mirror of https://gitee.com/topiam/eiam
8447 lines
3.3 MiB
8447 lines
3.3 MiB
/*
|
|
* eiam-console - Employee Identity and Access Management Program
|
|
* Copyright © 2020-2023 TopIAM (support@topiam.cn)
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[2236],{95742:function(pn){"use strict";(function(Ot,nt){pn.exports=nt()})(this,function(){function Ot(pt){var et=[];return pt.AMapUI&&et.push(nt(pt.AMapUI)),pt.Loca&&et.push(kt(pt.Loca)),Promise.all(et)}function nt(pt){return new Promise(function(et,_e){var ot=[];if(pt.plugins)for(var ut=0;ut<pt.plugins.length;ut+=1)k.AMapUI.plugins.indexOf(pt.plugins[ut])==-1&&ot.push(pt.plugins[ut]);if(Et.AMapUI===gt.failed)_e("\u524D\u6B21\u8BF7\u6C42 AMapUI \u5931\u8D25");else if(Et.AMapUI===gt.notload){Et.AMapUI=gt.loading,k.AMapUI.version=pt.version||k.AMapUI.version,ut=k.AMapUI.version;var zt=document.body||document.head,P=document.createElement("script");P.type="text/javascript",P.src="https://webapi.amap.com/ui/"+ut+"/main.js",P.onerror=function(b){Et.AMapUI=gt.failed,_e("\u8BF7\u6C42 AMapUI \u5931\u8D25")},P.onload=function(){if(Et.AMapUI=gt.loaded,ot.length)window.AMapUI.loadUI(ot,function(){for(var b=0,W=ot.length;b<W;b++){var le=ot[b].split("/").slice(-1)[0];window.AMapUI[le]=arguments[b]}for(et();K.AMapUI.length;)K.AMapUI.splice(0,1)[0]()});else for(et();K.AMapUI.length;)K.AMapUI.splice(0,1)[0]()},zt.appendChild(P)}else Et.AMapUI===gt.loaded?pt.version&&pt.version!==k.AMapUI.version?_e("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C AMapUI \u6DF7\u7528"):ot.length?window.AMapUI.loadUI(ot,function(){for(var b=0,W=ot.length;b<W;b++){var le=ot[b].split("/").slice(-1)[0];window.AMapUI[le]=arguments[b]}et()}):et():pt.version&&pt.version!==k.AMapUI.version?_e("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C AMapUI \u6DF7\u7528"):K.AMapUI.push(function(b){b?_e(b):ot.length?window.AMapUI.loadUI(ot,function(){for(var W=0,le=ot.length;W<le;W++){var be=ot[W].split("/").slice(-1)[0];window.AMapUI[be]=arguments[W]}et()}):et()})})}function kt(pt){return new Promise(function(et,_e){if(Et.Loca===gt.failed)_e("\u524D\u6B21\u8BF7\u6C42 Loca \u5931\u8D25");else if(Et.Loca===gt.notload){Et.Loca=gt.loading,k.Loca.version=pt.version||k.Loca.version;var ot=k.Loca.version,ut=k.AMap.version.startsWith("2"),zt=ot.startsWith("2");if(ut&&!zt||!ut&&zt)_e("JSAPI \u4E0E Loca \u7248\u672C\u4E0D\u5BF9\u5E94\uFF01\uFF01");else{ut=k.key,zt=document.body||document.head;var P=document.createElement("script");P.type="text/javascript",P.src="https://webapi.amap.com/loca?v="+ot+"&key="+ut,P.onerror=function(b){Et.Loca=gt.failed,_e("\u8BF7\u6C42 AMapUI \u5931\u8D25")},P.onload=function(){for(Et.Loca=gt.loaded,et();K.Loca.length;)K.Loca.splice(0,1)[0]()},zt.appendChild(P)}}else Et.Loca===gt.loaded?pt.version&&pt.version!==k.Loca.version?_e("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C Loca \u6DF7\u7528"):et():pt.version&&pt.version!==k.Loca.version?_e("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C Loca \u6DF7\u7528"):K.Loca.push(function(b){b?_e(b):_e()})})}if(!window)throw Error("AMap JSAPI can only be used in Browser.");var gt;(function(pt){pt.notload="notload",pt.loading="loading",pt.loaded="loaded",pt.failed="failed"})(gt||(gt={}));var k={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},Et={AMap:gt.notload,AMapUI:gt.notload,Loca:gt.notload},K={AMap:[],AMapUI:[],Loca:[]},yt=[],J=function(pt){typeof pt=="function"&&(Et.AMap===gt.loaded?pt(window.AMap):yt.push(pt))};return{load:function(pt){return new Promise(function(et,_e){if(Et.AMap==gt.failed)_e("");else if(Et.AMap==gt.notload){var ot=pt.key,ut=pt.version,zt=pt.plugins;ot?(window.AMap&&location.host!=="lbs.amap.com"&&_e("\u7981\u6B62\u591A\u79CDAPI\u52A0\u8F7D\u65B9\u5F0F\u6DF7\u7528"),k.key=ot,k.AMap.version=ut||k.AMap.version,k.AMap.plugins=zt||k.AMap.plugins,Et.AMap=gt.loading,ut=document.body||document.head,window.___onAPILoaded=function(b){if(delete window.___onAPILoaded,b)Et.AMap=gt.failed,_e(b);else for(Et.AMap=gt.loaded,Ot(pt).then(function(){et(window.AMap)}).catch(_e);yt.length;)yt.splice(0,1)[0]()},zt=document.createElement("script"),zt.type="text/javascript",zt.src="https://webapi.amap.com/maps?callback=___onAPILoaded&v="+k.AMap.version+"&key="+ot+"&plugin="+k.AMap.plugins.join(","),zt.onerror=function(b){Et.AMap=gt.failed,_e(b)},ut.appendChild(zt)):_e("\u8BF7\u586B\u5199key")}else if(Et.AMap==gt.loaded)if(pt.key&&pt.key!==k.key)_e("\u591A\u4E2A\u4E0D\u4E00\u81F4\u7684 key");else if(pt.version&&pt.version!==k.AMap.version)_e("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C JSAPI \u6DF7\u7528");else{if(ot=[],pt.plugins)for(ut=0;ut<pt.plugins.length;ut+=1)k.AMap.plugins.indexOf(pt.plugins[ut])==-1&&ot.push(pt.plugins[ut]);ot.length?window.AMap.plugin(ot,function(){Ot(pt).then(function(){et(window.AMap)}).catch(_e)}):Ot(pt).then(function(){et(window.AMap)}).catch(_e)}else if(pt.key&&pt.key!==k.key)_e("\u591A\u4E2A\u4E0D\u4E00\u81F4\u7684 key");else if(pt.version&&pt.version!==k.AMap.version)_e("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C JSAPI \u6DF7\u7528");else{var P=[];if(pt.plugins)for(ut=0;ut<pt.plugins.length;ut+=1)k.AMap.plugins.indexOf(pt.plugins[ut])==-1&&P.push(pt.plugins[ut]);J(function(){P.length?window.AMap.plugin(P,function(){Ot(pt).then(function(){et(window.AMap)}).catch(_e)}):Ot(pt).then(function(){et(window.AMap)}).catch(_e)})}})},reset:function(){delete window.AMap,delete window.AMapUI,delete window.Loca,k={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},Et={AMap:gt.notload,AMapUI:gt.notload,Loca:gt.notload},K={AMap:[],AMapUI:[],Loca:[]}}}})},59258:function(pn,Ot,nt){"use strict";var kt=nt(5543),gt=nt(79685),k=nt(80568),Et=nt(20165),K=function(J,pt){return gt.createElement(Et.Z,(0,kt.Z)((0,kt.Z)({},J),{},{ref:pt,icon:k.Z}))};K.displayName="AppstoreOutlined",Ot.Z=gt.forwardRef(K)},92432:function(pn,Ot,nt){"use strict";nt.d(Ot,{Z:function(){return J}});var kt=nt(5543),gt=nt(79685),k={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z"}}]},name:"rocket",theme:"outlined"},Et=k,K=nt(20165),yt=function(et,_e){return gt.createElement(K.Z,(0,kt.Z)((0,kt.Z)({},et),{},{ref:_e,icon:Et}))};yt.displayName="RocketOutlined";var J=gt.forwardRef(yt)},16228:function(pn,Ot,nt){"use strict";var kt=nt(5543),gt=nt(79685),k=nt(53353),Et=nt(20165),K=function(J,pt){return gt.createElement(Et.Z,(0,kt.Z)((0,kt.Z)({},J),{},{ref:pt,icon:k.Z}))};K.displayName="SafetyCertificateOutlined",Ot.Z=gt.forwardRef(K)},49669:function(pn,Ot,nt){"use strict";var kt=nt(5543),gt=nt(79685),k=nt(58934),Et=nt(20165),K=function(J,pt){return gt.createElement(Et.Z,(0,kt.Z)((0,kt.Z)({},J),{},{ref:pt,icon:k.Z}))};K.displayName="TeamOutlined",Ot.Z=gt.forwardRef(K)},90710:function(pn,Ot,nt){"use strict";nt.d(Ot,{Z:function(){return o8}});var kt={};nt.r(kt),nt.d(kt,{add:function(){return d_},adjoint:function(){return Kr},clone:function(){return Ar},copy:function(){return Ye},create:function(){return qr},determinant:function(){return Nn},equals:function(){return d},exactEquals:function(){return f},frob:function(){return vy},fromQuat:function(){return nh},fromQuat2:function(){return Bf},fromRotation:function(){return ba},fromRotationTranslation:function(){return Do},fromRotationTranslationScale:function(){return _v},fromRotationTranslationScaleOrigin:function(){return Kl},fromScaling:function(){return Wi},fromTranslation:function(){return Zi},fromValues:function(){return Rr},fromXRotation:function(){return Jo},fromYRotation:function(){return Ru},fromZRotation:function(){return gs},frustum:function(){return jp},getRotation:function(){return Mc},getScaling:function(){return Zc},getTranslation:function(){return gl},identity:function(){return mr},invert:function(){return kr},lookAt:function(){return Id},mul:function(){return y},multiply:function(){return ti},multiplyScalar:function(){return Xp},multiplyScalarAndAdd:function(){return gy},ortho:function(){return Mh},orthoNO:function(){return Wp},orthoZO:function(){return py},perspective:function(){return lu},perspectiveFromFieldOfView:function(){return ih},perspectiveNO:function(){return s0},perspectiveZO:function(){return u0},rotate:function(){return gi},rotateX:function(){return zi},rotateY:function(){return Fi},rotateZ:function(){return Ui},scale:function(){return Ai},set:function(){return je},str:function(){return dy},sub:function(){return T},subtract:function(){return go},targetTo:function(){return tp},translate:function(){return ci},transpose:function(){return tr}});var gt=nt(79685),k=nt(29268),Et=nt(22374),K=nt(5543),yt=nt(88222),J=nt(81033),pt=nt(3836),et=nt(71320),_e=nt(34001),ot=nt.n(_e),ut=nt(55659),zt=nt(78001),P=nt(154),b=nt(26010),W=nt(16431),le=nt(14299),be=nt(11488),Me=nt.n(be),At=nt(31331),rt=nt(82615),Dt={IEventEmitter:Symbol.for("IEventEmitter"),ISceneService:Symbol.for("ISceneService"),IGlobalConfigService:Symbol.for("IGlobalConfigService"),ICameraService:Symbol.for("ICameraService"),ICoordinateSystemService:Symbol.for("ICoordinateSystemService"),ILayerService:Symbol.for("ILayerService"),ILayerMappingService:Symbol.for("ILayerMappingService"),ILayerStyleService:Symbol.for("ILayerStyleService"),IMapService:Symbol.for("IMapService"),IMarkerService:Symbol.for("IMarkerService"),IPopupService:Symbol.for("PopupService"),IFactoryMapService:Symbol.for("Factory<IMapService>"),IRendererService:Symbol.for("IRendererService"),IShaderModuleService:Symbol.for("IShaderModuleService"),IIconService:Symbol.for("IIconService"),IFontService:Symbol.for("IFontService"),IInteractionService:Symbol.for("IInteractionService"),IPickingService:Symbol.for("IPickingService"),IControlService:Symbol.for("IControlService"),IStyleAttributeService:Symbol.for("IStyleAttributeService"),ILayer:Symbol.for("ILayer"),ILayerPlugin:Symbol.for("ILayerPlugin"),INormalPass:Symbol.for("INormalPass"),IPostProcessor:Symbol.for("IPostProcessor"),IPostProcessingPass:Symbol.for("IPostProcessingPass"),IFactoryPostProcessingPass:Symbol.for("Factory<IPostProcessingPass>"),IFactoryNormalPass:Symbol.for("Factory<IFactoryNormalPass>"),IMultiPassRenderer:Symbol.for("IMultiPassRenderer"),SceneID:Symbol.for("SceneID"),MapConfig:Symbol.for("MapConfig")},Ee=nt(52446);function ge(n){return Function.toString.call(n).indexOf("[native code]")!==-1}var Ge=nt(79172);function Ue(n,l,a){return(0,Ge.Z)()?Ue=Reflect.construct.bind():Ue=function(u,h,v){var m=[null];m.push.apply(m,h);var w=Function.bind.apply(u,m),A=new w;return v&&(0,Ee.Z)(A,v.prototype),A},Ue.apply(null,arguments)}function xe(n){var l=typeof Map=="function"?new Map:void 0;return xe=function(s){if(s===null||!ge(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l!="undefined"){if(l.has(s))return l.get(s);l.set(s,u)}function u(){return Ue(s,arguments,(0,b.Z)(this).constructor)}return u.prototype=Object.create(s.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),(0,Ee.Z)(u,s)},xe(n)}var Ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Lt(n){this.message=n}Lt.prototype=new Error,Lt.prototype.name="InvalidCharacterError";function Jt(n){var l=String(n).replace(/=+$/,"");if(l.length%4===1)throw new Lt("'atob' failed: The string to be decoded is not correctly encoded.");for(var a="",s=0,u,h,v=0;h=l.charAt(v++);~h&&(u=s%4?u*64+h:h,s++%4)?a+=String.fromCharCode(255&u>>(-2*s&6)):0)h=Ke.indexOf(h);return a}function ft(n){n=String(n);for(var l,a,s,u,h="",v=0,m=n.length%3;v<n.length;){if((a=n.charCodeAt(v++))>255||(s=n.charCodeAt(v++))>255||(u=n.charCodeAt(v++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");l=a<<16|s<<8|u,h+=Ke.charAt(l>>18&63)+Ke.charAt(l>>12&63)+Ke.charAt(l>>6&63)+Ke.charAt(l&63)}return m?h.slice(0,m-3)+"===".substring(m):h}var St=function(){function n(l,a){(0,pt.Z)(this,n),this.buffers=l,this.type=a}return(0,et.Z)(n,[{key:"arraybuffer",value:function(){return Promise.resolve(this.buffers[0])}},{key:"stream",value:function(){throw new Error("not implemented")}},{key:"text",value:function(){throw new Error("not implemented")}},{key:"slice",value:function(a,s,u){throw new Error("not implemented")}}]),n}(),Y,mt=function(){return Y||(Y=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof nt.g!="undefined"?nt.g:{})};Y=mt();var se;typeof window=="undefined"?se={devicePixelRatio:1,navigator:{userAgent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36",browserLanguage:"zh-CN",language:"zh-CN",platform:""},location:"",document:{documentElement:{style:{}},createEvent:function(){return!0},getElementById:function(l){return!0},createElement:function(){return{className:"",classList:{add:function(){return""}}}},createElementNS:function(){return!0},addEventListener:function(){return!0},removeEventListener:function(){return!0},querySelector:function(){return!1}},performance:{mark:function(l){return null},clearMeasures:function(l){return null},clearMarks:function(l){return null},measure:function(l,a,s){return{duration:0}},now:function(){return new Date().getTime()}},Blob:"",dispatchEvent:function(l){return!0},Event:function(l,a){return!0},createElement:function(){return!0},createElementNS:function(){return!0},XMLHttpRequest:function(){return!0},addEventListener:function(){return!0},removeEventListener:function(){return!0},requestAnimationFrame:function(){return!0},cancelAnimationFrame:function(){return!0},clearTimeout:function(){return!0}}:se=window;var ke=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,Le=ke?my.getSystemInfoSync().pixelRatio:se.devicePixelRatio,Be=(0,et.Z)(function n(l,a){(0,pt.Z)(this,n),this.cancelBubble=!1,this.cancelable=!1,this.target=null,this.currentTarget=null,this.preventDefault=function(){},this.stopPropagation=function(){},this.type=l,this.timeStamp=Date.now()});function Bt(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=ee(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,u=function(){};return{s:u,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function ee(n,l){if(n){if(typeof n=="string")return me(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return me(n,l)}}function me(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a<l;a++)s[a]=n[a];return s}var Yt=new WeakMap,qe=function(){function n(){(0,pt.Z)(this,n),Yt.set(this,{})}return(0,et.Z)(n,[{key:"addEventListener",value:function(a,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=Yt.get(this);h||(h={}),h[a]||(h[a]=[]),h[a].push(s),Yt.set(this,h),u.capture,u.once,u.passive}},{key:"removeEventListener",value:function(a,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=Yt.get(this);if(h){var v=h[a];if(v&&v.length>0){for(var m=v.length;m--;m>0)if(v[m]===s){v.splice(m,1);break}}}}},{key:"dispatchEvent",value:function(a){var s=Yt.get(this)[a.type];if(s){var u=Bt(s),h;try{for(u.s();!(h=u.n()).done;){var v=h.value;v(a)}}catch(m){u.e(m)}finally{u.f()}}}}]),n}();function vr(n){var l=ie();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function ie(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var qt=function(n){(0,zt.Z)(a,n);var l=vr(a);function a(){var s;return(0,pt.Z)(this,a),s=l.call(this),s.childNodes=[],s}return(0,et.Z)(a,[{key:"appendChild",value:function(u){this.childNodes.push(u)}},{key:"cloneNode",value:function(){var u=Object.create(this);return Object.assign(u,this),u}},{key:"removeChild",value:function(u){var h=this.childNodes.findIndex(function(v){return v===u});return h>-1?this.childNodes.splice(h,1):null}}]),a}(qe);function bt(n){var l=Xt();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Xt(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var $t=function(n){(0,zt.Z)(a,n);var l=bt(a);function a(){var s;return(0,pt.Z)(this,a),s=l.call(this),s.className="",s.children=[],s}return(0,et.Z)(a,[{key:"setAttribute",value:function(u,h){this[u]=h}},{key:"getAttribute",value:function(u){return this[u]}},{key:"setAttributeNS",value:function(u,h){this[u]=h}},{key:"getAttributeNS",value:function(u){return this[u]}}]),a}(qt),xt=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,wt,ue,Ie,Ne;if(xt){var Zt=my.getSystemInfoSync();wt=Zt.screenWidth,ue=Zt.screenHeight,Ie=Zt.windowWidth,Ne=Zt.windowHeight}else{var Ct=se.innerWidth,Tt=se.innerHeight;wt=Ct,ue=Tt,Ie=Ct,Ne=Tt}var Nt={width:wt,height:ue,availWidth:Ie,availHeight:Ne,availLeft:0,availTop:0},tt=Nt.availWidth,vt=Nt.availHeight,Ht={style:[]};function he(n,l){if(!("parentNode"in n)){var a;l===0?a=function(){return null}:l===1?a=function(){return Ht}:a=function(){return null},Object.defineProperty(n,"parentNode",{enumerable:!0,get:a})}if(!("parentElement"in n)){var s;l===0?s=function(){return null}:l===1?s=function(){return Ht}:s=function(){return null},Object.defineProperty(n,"parentElement",{enumerable:!0,get:s})}}function jt(n){n.style=n.style||{},Object.assign(n.style,{top:"0px",left:"0px",width:tt+"px",height:vt+"px",margin:"0px",padding:"0px"})}function Te(n){"clientLeft"in n||(n.clientLeft=0,n.clientTop=0),"clientWidth"in n||(n.clientWidth=tt,n.clientHeight=vt),"getBoundingClientRect"in n||(n.getBoundingClientRect=function(){var l={x:0,y:0,top:0,left:0,width:this.clientWidth,height:this.clientHeight,right:this.clientWidth,bottom:this.clientHeight};return l})}function We(n){"offsetLeft"in n||(n.offsetLeft=0,n.offsetTop=0),"offsetWidth"in n||(n.offsetWidth=tt,n.offsetHeight=vt)}function Qe(n){"scrollLeft"in n||(n.scrollLeft=0,n.scrollTop=0),"scrollWidth"in n||(n.scrollWidth=tt,n.scrollHeight=vt)}function pr(n){var l=function(){return!0};n.classList=[],n.classList.add=l,n.classList.remove=l,n.classList.contains=l,n.classList.toggle=l}function lr(n){var l=Vr();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Vr(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}function Pr(){}var Br=function(n){(0,zt.Z)(a,n);var l=lr(a);function a(){var s,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",h=arguments.length>1?arguments[1]:void 0;return(0,pt.Z)(this,a),s=l.call(this),s.className="",s.children=[],s.focus=Pr,s.blur=Pr,s.insertBefore=Pr,s.appendChild=Pr,s.removeChild=Pr,s.remove=Pr,s.innerHTML="",s.tagName=u.toUpperCase(),he((0,ut.Z)(s),h),jt((0,ut.Z)(s)),pr((0,ut.Z)(s)),Te((0,ut.Z)(s)),We((0,ut.Z)(s)),Qe((0,ut.Z)(s)),s}return(0,et.Z)(a)}($t);function Sn(n){var l=an();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function an(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var zn=function(n){(0,zt.Z)(a,n);var l=Sn(a);function a(s){return(0,pt.Z)(this,a),l.call(this,s)}return(0,et.Z)(a,[{key:"addTextTrack",value:function(){}},{key:"captureStream",value:function(){}},{key:"fastSeek",value:function(){}},{key:"load",value:function(){}},{key:"pause",value:function(){}},{key:"play",value:function(){}}]),a}(Br);function Zn(n){var l=Wn();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Wn(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Dn=function(n){(0,zt.Z)(a,n);var l=Zn(a);function a(){return(0,pt.Z)(this,a),l.call(this,"video")}return(0,et.Z)(a)}(zn),Xn={},Ft={};function Wt(n,l){Xn=n,Xn.id=l,"tagName"in Xn||(Xn.tagName="CANVAS"),Xn.type="canvas",Mixin.parentNode(Xn),Mixin.style(Xn),Mixin.classList(Xn),Mixin.clientRegion(Xn),Mixin.offsetRegion(Xn),Xn.focus=function(){},Xn.blur=function(){}}function oe(n,l){var a=1024,s=1024;Ft={width:a,height:s,clientWidth:a/devicePixelRatio,clientHeight:s/devicePixelRatio,id:l,type:"canvas"},"tagName"in Ft||(Ft.tagName="CANVAS"),Mixin.parentNode(Ft),Mixin.style(Ft),Mixin.classList(Ft),Mixin.clientRegion(Ft),Mixin.offsetRegion(Ft),Ft.getContext=function(u){if(u==="2d")return n},Ft.focus=function(){},Ft.blur=function(){}}function ye(){return Xn}function Ze(){return Ft}var fr=(0,et.Z)(function n(){(0,pt.Z)(this,n);var l=ye(),a=l.createImage&&l.createImage()||{};return"tagName"in a||(a.tagName="IMG",a.__proto__=n.prototype),he(a),pr(a),Object.assign(a,{addEventListener:function(u,h){a["on".concat(u)]=h.bind(a)},removeEventListener:function(u){a["on".concat(u)]=null}}),a}),_r={href:"",protocol:"",host:""};function we(n){var l=ir();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function ir(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Hr=function(n){(0,zt.Z)(a,n);var l=we(a);function a(){return(0,pt.Z)(this,a),l.call(this,"body",0)}return(0,et.Z)(a,[{key:"addEventListener",value:function(u,h){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}}},{key:"removeEventListener",value:function(u,h,v){}},{key:"dispatchEvent",value:function(u){}}]),a}(Br),In=function(n){(0,zt.Z)(a,n);var l=we(a);function a(){return(0,pt.Z)(this,a),l.call(this,"html",0)}return(0,et.Z)(a,[{key:"addEventListener",value:function(u,h){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}}},{key:"removeEventListener",value:function(u,h){}},{key:"dispatchEvent",value:function(u){}}]),a}(Br),nn={},Yr={readyState:"complete",visibilityState:"visible",hidden:!1,fullscreen:!0,scripts:[],style:{},location:_r,ontouchstart:null,ontouchmove:null,ontouchend:null,onvisibilitychange:null,parentNode:null,parentElement:null,head:null,body:null,documentElement:{style:[]},createElement:function(l){return l=l.toLowerCase(),l==="canvas"?my.createOffscreenCanvas(1024,128,"2d"):l==="img"?new fr:l==="video"?new Dn:new Br(l)},createElementNS:function(l,a){return this.createElement(a)},createTextNode:function(l){return l},getElementById:function(l){return null},getElementsByTagName:function(l){return l=l.toLowerCase(),[]},getElementsByTagNameNS:function(l,a){return this.getElementsByTagName(a)},getElementsByName:function(l){return[]},querySelector:function(l){return null},querySelectorAll:function(l){return[]},addEventListener:function(l,a,s){nn[l]||(nn[l]=[]),nn[l].push(a)},removeEventListener:function(l,a){var s=nn[l];if(s&&s.length>0){for(var u=s.length;u--;u>0)if(s[u]===a){s.splice(u,1);break}}},dispatchEvent:function(l){var a=l.type,s=nn[a];if(s)for(var u=0;u<s.length;u++)s[u](l);l.target&&typeof l.target["on"+a]=="function"&&l.target["on"+a](l)},createEvent:function(l){return new Be(l)}};Yr.documentElement=new In,Yr.head=new Br("head"),Yr.body=new Hr;var On=Object,bi=nt(56151),Mi=function(){function n(){(0,pt.Z)(this,n);var l=arguments.length;if(l===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){this._w=arguments[0],this._h=arguments[1],this._data=new Uint8ClampedArray(this._w*this._h*4);return}}else l===3&&(0,bi.Z)(arguments[0])==="object"&&typeof arguments[1]=="number"&&typeof arguments[2]=="number"&&(this._data=arguments[0],this._w=arguments[1],this._h=arguments[2]);throw new Error("ImageData: params error")}return(0,et.Z)(n,[{key:"width",get:function(){return this._w}},{key:"height",get:function(){return this._h}},{key:"data",get:function(){return this._data}}]),n}(),tn=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,mi,Yn,fi;if(tn){var Ea=my.getSystemInfoSync();mi=Ea.system,Yn=Ea.platform,fi=Ea.language}else{var si={versions:function(){var n=se.navigator.userAgent;return{trident:n.indexOf("Trident")>-1,presto:n.indexOf("Presto")>-1,webKit:n.indexOf("AppleWebKit")>-1,gecko:n.indexOf("Gecko")>-1&&n.indexOf("KHTML")===-1,mobile:!!n.match(/AppleWebKit.*Mobile.*/),ios:!!n.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:n.indexOf("Android")>-1||n.indexOf("Linux")>-1,iPhone:n.indexOf("iPhone")>-1,iPad:n.indexOf("iPad")>-1,webApp:n.indexOf("Safari")===-1,weixin:n.indexOf("MicroMessenger")>-1,qq:n.match(/\sQQ/i)===" qq"}}(),language:(se.navigator.browserLanguage||se.navigator.language).toLowerCase()};si.versions.android?Yn="android":si.versions.trident?Yn="IE":si.versions.presto?Yn="Opera":si.versions.webKit?Yn="webKit":si.versions.gecko?Yn="Firefox":si.versions.mobile?Yn="mobile":si.versions.ios?Yn="ios":si.versions.iPhone?Yn="iPhone":si.versions.iPad?Yn="ipad":si.versions.webApp?Yn="webApp":si.versions.weixin?Yn="weixin":si.versions.qq&&(Yn="qq"),mi=se.navigator.userAgent,fi=si.language}var Ia=mi.toLowerCase().indexOf("android")!==-1,vo=Ia?"Android; CPU Android 6.0":"iPhone; CPU iPhone OS 10_3_1 like Mac OS X",Oa="Mozilla/5.0 (".concat(vo,") AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E8301 MicroMessenger/6.6.0 MiniGame NetType/WIFI Language/").concat(fi),Ha={platform:Yn,language:fi,appVersion:"5.0 (".concat(vo,") AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"),userAgent:Oa},wa={mark:function(l){return null},clearMeasures:function(l){return null},clearMarks:function(l){return null},measure:function(l,a,s){return{duration:0}},now:function(){}},ya=0,Qa=0;function Wo(n){var l=Date.now(),a=Math.max(ya+23,l);return Qa=setTimeout(function(){n(ya=a)},a-l),Qa}function yo(n){var l=ye();return l.requestAnimationFrame?l.requestAnimationFrame(n):Wo(n)}function Va(n){var l=ye();return l.cancelAnimationFrame?l.cancelAnimationFrame(n):clearTimeout(n)}var Ya=function(){function n(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if((0,pt.Z)(this,n),l.indexOf("http://")==0||l.indexOf("https://")==0){this.href=l;return}this.href=a+l}return(0,et.Z)(n,null,[{key:"createObjectURL",value:function(a){var s=a.buffers[0],u=a.type,h=No(s),v="data:".concat(u,";base64, ");return v+h}}]),n}();function No(n){for(var l="",a=new Uint8Array(n),s=a.byteLength,u=0;u<s;u++)l+=String.fromCharCode(a[u]);return ft(l)}var Nu={GCCSO_SHADER_BINARY_FJ:37472,_3DC_XY_AMD:34810,_3DC_X_AMD:34809,ACTIVE_ATTRIBUTES:35721,ACTIVE_ATTRIBUTE_MAX_LENGTH:35722,ACTIVE_PROGRAM_EXT:33369,ACTIVE_TEXTURE:34016,ACTIVE_UNIFORMS:35718,ACTIVE_UNIFORM_MAX_LENGTH:35719,ALIASED_LINE_WIDTH_RANGE:33902,ALIASED_POINT_SIZE_RANGE:33901,ALL_COMPLETED_NV:34034,ALL_SHADER_BITS_EXT:4294967295,ALPHA:6406,ALPHA16F_EXT:34844,ALPHA32F_EXT:34838,ALPHA8_EXT:32828,ALPHA8_OES:32828,ALPHA_BITS:3413,ALPHA_TEST_FUNC_QCOM:3009,ALPHA_TEST_QCOM:3008,ALPHA_TEST_REF_QCOM:3010,ALREADY_SIGNALED_APPLE:37146,ALWAYS:519,AMD_compressed_3DC_texture:1,AMD_compressed_ATC_texture:1,AMD_performance_monitor:1,AMD_program_binary_Z400:1,ANGLE_depth_texture:1,ANGLE_framebuffer_blit:1,ANGLE_framebuffer_multisample:1,ANGLE_instanced_arrays:1,ANGLE_pack_reverse_row_order:1,ANGLE_program_binary:1,ANGLE_texture_compression_dxt3:1,ANGLE_texture_compression_dxt5:1,ANGLE_texture_usage:1,ANGLE_translated_shader_source:1,ANY_SAMPLES_PASSED_CONSERVATIVE_EXT:36202,ANY_SAMPLES_PASSED_EXT:35887,APPLE_copy_texture_levels:1,APPLE_framebuffer_multisample:1,APPLE_rgb_422:1,APPLE_sync:1,APPLE_texture_format_BGRA8888:1,APPLE_texture_max_level:1,ARM_mali_program_binary:1,ARM_mali_shader_binary:1,ARM_rgba8:1,ARRAY_BUFFER:34962,ARRAY_BUFFER_BINDING:34964,ATC_RGBA_EXPLICIT_ALPHA_AMD:35987,ATC_RGBA_INTERPOLATED_ALPHA_AMD:34798,ATC_RGB_AMD:35986,ATTACHED_SHADERS:35717,BACK:1029,BGRA8_EXT:37793,BGRA_EXT:32993,BGRA_IMG:32993,BINNING_CONTROL_HINT_QCOM:36784,BLEND:3042,BLEND_COLOR:32773,BLEND_DST_ALPHA:32970,BLEND_DST_RGB:32968,BLEND_EQUATION:32777,BLEND_EQUATION_ALPHA:34877,BLEND_EQUATION_RGB:32777,BLEND_SRC_ALPHA:32971,BLEND_SRC_RGB:32969,BLUE_BITS:3412,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,BUFFER:33504,BUFFER_ACCESS_OES:35003,BUFFER_MAPPED_OES:35004,BUFFER_MAP_POINTER_OES:35005,BUFFER_OBJECT_EXT:37201,BUFFER_SIZE:34660,BUFFER_USAGE:34661,BYTE:5120,CCW:2305,CLAMP_TO_BORDER_NV:33069,CLAMP_TO_EDGE:33071,COLOR_ATTACHMENT0:36064,COLOR_ATTACHMENT0_NV:36064,COLOR_ATTACHMENT10_NV:36074,COLOR_ATTACHMENT11_NV:36075,COLOR_ATTACHMENT12_NV:36076,COLOR_ATTACHMENT13_NV:36077,COLOR_ATTACHMENT14_NV:36078,COLOR_ATTACHMENT15_NV:36079,COLOR_ATTACHMENT1_NV:36065,COLOR_ATTACHMENT2_NV:36066,COLOR_ATTACHMENT3_NV:36067,COLOR_ATTACHMENT4_NV:36068,COLOR_ATTACHMENT5_NV:36069,COLOR_ATTACHMENT6_NV:36070,COLOR_ATTACHMENT7_NV:36071,COLOR_ATTACHMENT8_NV:36072,COLOR_ATTACHMENT9_NV:36073,COLOR_ATTACHMENT_EXT:37104,COLOR_BUFFER_BIT:16384,COLOR_BUFFER_BIT0_QCOM:1,COLOR_BUFFER_BIT1_QCOM:2,COLOR_BUFFER_BIT2_QCOM:4,COLOR_BUFFER_BIT3_QCOM:8,COLOR_BUFFER_BIT4_QCOM:16,COLOR_BUFFER_BIT5_QCOM:32,COLOR_BUFFER_BIT6_QCOM:64,COLOR_BUFFER_BIT7_QCOM:128,COLOR_CLEAR_VALUE:3106,COLOR_EXT:6144,COLOR_WRITEMASK:3107,COMPARE_REF_TO_TEXTURE_EXT:34894,COMPILE_STATUS:35713,COMPRESSED_RGBA_ASTC_10x10_KHR:37819,COMPRESSED_RGBA_ASTC_10x5_KHR:37816,COMPRESSED_RGBA_ASTC_10x6_KHR:37817,COMPRESSED_RGBA_ASTC_10x8_KHR:37818,COMPRESSED_RGBA_ASTC_12x10_KHR:37820,COMPRESSED_RGBA_ASTC_12x12_KHR:37821,COMPRESSED_RGBA_ASTC_4x4_KHR:37808,COMPRESSED_RGBA_ASTC_5x4_KHR:37809,COMPRESSED_RGBA_ASTC_5x5_KHR:37810,COMPRESSED_RGBA_ASTC_6x5_KHR:37811,COMPRESSED_RGBA_ASTC_6x6_KHR:37812,COMPRESSED_RGBA_ASTC_8x5_KHR:37813,COMPRESSED_RGBA_ASTC_8x6_KHR:37814,COMPRESSED_RGBA_ASTC_8x8_KHR:37815,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_PVRTC_2BPPV2_IMG:37175,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_4BPPV2_IMG:37176,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_ANGLE:33778,COMPRESSED_RGBA_S3TC_DXT5_ANGLE:33779,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:37853,COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:37847,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV:35919,COMPRESSED_SRGB_S3TC_DXT1_NV:35916,COMPRESSED_TEXTURE_FORMATS:34467,CONDITION_SATISFIED_APPLE:37148,CONSTANT_ALPHA:32771,CONSTANT_COLOR:32769,CONTEXT_FLAG_DEBUG_BIT:2,CONTEXT_ROBUST_ACCESS_EXT:37107,COUNTER_RANGE_AMD:35777,COUNTER_TYPE_AMD:35776,COVERAGE_ALL_FRAGMENTS_NV:36565,COVERAGE_ATTACHMENT_NV:36562,COVERAGE_AUTOMATIC_NV:36567,COVERAGE_BUFFERS_NV:36563,COVERAGE_BUFFER_BIT_NV:32768,COVERAGE_COMPONENT4_NV:36561,COVERAGE_COMPONENT_NV:36560,COVERAGE_EDGE_FRAGMENTS_NV:36566,COVERAGE_SAMPLES_NV:36564,CPU_OPTIMIZED_QCOM:36785,CULL_FACE:2884,CULL_FACE_MODE:2885,CURRENT_PROGRAM:35725,CURRENT_QUERY_EXT:34917,CURRENT_VERTEX_ATTRIB:34342,CW:2304,DEBUG_CALLBACK_FUNCTION:33348,DEBUG_CALLBACK_USER_PARAM:33349,DEBUG_GROUP_STACK_DEPTH:33389,DEBUG_LOGGED_MESSAGES:37189,DEBUG_NEXT_LOGGED_MESSAGE_LENGTH:33347,DEBUG_OUTPUT:37600,DEBUG_OUTPUT_SYNCHRONOUS:33346,DEBUG_SEVERITY_HIGH:37190,DEBUG_SEVERITY_LOW:37192,DEBUG_SEVERITY_MEDIUM:37191,DEBUG_SEVERITY_NOTIFICATION:33387,DEBUG_SOURCE_API:33350,DEBUG_SOURCE_APPLICATION:33354,DEBUG_SOURCE_OTHER:33355,DEBUG_SOURCE_SHADER_COMPILER:33352,DEBUG_SOURCE_THIRD_PARTY:33353,DEBUG_SOURCE_WINDOW_SYSTEM:33351,DEBUG_TYPE_DEPRECATED_BEHAVIOR:33357,DEBUG_TYPE_ERROR:33356,DEBUG_TYPE_MARKER:33384,DEBUG_TYPE_OTHER:33361,DEBUG_TYPE_PERFORMANCE:33360,DEBUG_TYPE_POP_GROUP:33386,DEBUG_TYPE_PORTABILITY:33359,DEBUG_TYPE_PUSH_GROUP:33385,DEBUG_TYPE_UNDEFINED_BEHAVIOR:33358,DECR:7683,DECR_WRAP:34056,DELETE_STATUS:35712,DEPTH24_STENCIL8_OES:35056,DEPTH_ATTACHMENT:36096,DEPTH_STENCIL_ATTACHMENT:33306,DEPTH_BITS:3414,DEPTH_BUFFER_BIT:256,DEPTH_BUFFER_BIT0_QCOM:256,DEPTH_BUFFER_BIT1_QCOM:512,DEPTH_BUFFER_BIT2_QCOM:1024,DEPTH_BUFFER_BIT3_QCOM:2048,DEPTH_BUFFER_BIT4_QCOM:4096,DEPTH_BUFFER_BIT5_QCOM:8192,DEPTH_BUFFER_BIT6_QCOM:16384,DEPTH_BUFFER_BIT7_QCOM:32768,DEPTH_CLEAR_VALUE:2931,DEPTH_COMPONENT:6402,DEPTH_COMPONENT16:33189,DEPTH_COMPONENT16_NONLINEAR_NV:36396,DEPTH_COMPONENT16_OES:33189,DEPTH_COMPONENT24_OES:33190,DEPTH_COMPONENT32_OES:33191,DEPTH_EXT:6145,DEPTH_FUNC:2932,DEPTH_RANGE:2928,DEPTH_STENCIL:34041,DEPTH_STENCIL_OES:34041,DEPTH_TEST:2929,DEPTH_WRITEMASK:2930,DITHER:3024,DMP_shader_binary:1,DONT_CARE:4352,DRAW_BUFFER0_NV:34853,DRAW_BUFFER10_NV:34863,DRAW_BUFFER11_NV:34864,DRAW_BUFFER12_NV:34865,DRAW_BUFFER13_NV:34866,DRAW_BUFFER14_NV:34867,DRAW_BUFFER15_NV:34868,DRAW_BUFFER1_NV:34854,DRAW_BUFFER2_NV:34855,DRAW_BUFFER3_NV:34856,DRAW_BUFFER4_NV:34857,DRAW_BUFFER5_NV:34858,DRAW_BUFFER6_NV:34859,DRAW_BUFFER7_NV:34860,DRAW_BUFFER8_NV:34861,DRAW_BUFFER9_NV:34862,DRAW_BUFFER_EXT:3073,DRAW_FRAMEBUFFER_ANGLE:36009,DRAW_FRAMEBUFFER_APPLE:36009,DRAW_FRAMEBUFFER_BINDING_ANGLE:36006,DRAW_FRAMEBUFFER_BINDING_APPLE:36006,DRAW_FRAMEBUFFER_BINDING_NV:36006,DRAW_FRAMEBUFFER_NV:36009,DST_ALPHA:772,DST_COLOR:774,DYNAMIC_DRAW:35048,ELEMENT_ARRAY_BUFFER:34963,ELEMENT_ARRAY_BUFFER_BINDING:34965,EQUAL:514,ES_VERSION_2_0:1,ETC1_RGB8_OES:36196,ETC1_SRGB8_NV:35054,EXTENSIONS:7939,EXT_blend_minmax:1,EXT_color_buffer_half_float:1,EXT_debug_label:1,EXT_debug_marker:1,EXT_discard_framebuffer:1,EXT_map_buffer_range:1,EXT_multi_draw_arrays:1,EXT_multisampled_render_to_texture:1,EXT_multiview_draw_buffers:1,EXT_occlusion_query_boolean:1,EXT_read_format_bgra:1,EXT_robustness:1,EXT_sRGB:1,EXT_separate_shader_objects:1,EXT_shader_framebuffer_fetch:1,EXT_shader_texture_lod:1,EXT_shadow_samplers:1,EXT_texture_compression_dxt1:1,EXT_texture_filter_anisotropic:1,EXT_texture_format_BGRA8888:1,EXT_texture_rg:1,EXT_texture_storage:1,EXT_texture_type_2_10_10_10_REV:1,EXT_unpack_subimage:1,FALSE:0,FASTEST:4353,FENCE_CONDITION_NV:34036,FENCE_STATUS_NV:34035,FIXED:5132,FJ_shader_binary_GCCSO:1,FLOAT:5126,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,FRAGMENT_SHADER:35632,FRAGMENT_SHADER_BIT_EXT:2,FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723,FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT:35410,FRAMEBUFFER:36160,FRAMEBUFFER_ATTACHMENT_ANGLE:37795,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES:36052,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT:36204,FRAMEBUFFER_BINDING:36006,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE:36182,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE:36182,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT:36182,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG:37172,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV:36182,FRAMEBUFFER_UNDEFINED_OES:33305,FRAMEBUFFER_UNSUPPORTED:36061,FRONT:1028,FRONT_AND_BACK:1032,FRONT_FACE:2886,FUNC_ADD:32774,FUNC_REVERSE_SUBTRACT:32779,FUNC_SUBTRACT:32778,GENERATE_MIPMAP_HINT:33170,GEQUAL:518,GPU_OPTIMIZED_QCOM:36786,GREATER:516,GREEN_BITS:3411,GUILTY_CONTEXT_RESET_EXT:33363,HALF_FLOAT_OES:36193,HIGH_FLOAT:36338,HIGH_INT:36341,IMG_multisampled_render_to_texture:1,IMG_program_binary:1,IMG_read_format:1,IMG_shader_binary:1,IMG_texture_compression_pvrtc:1,IMG_texture_compression_pvrtc2:1,IMPLEMENTATION_COLOR_READ_FORMAT:35739,IMPLEMENTATION_COLOR_READ_TYPE:35738,INCR:7682,INCR_WRAP:34055,INFO_LOG_LENGTH:35716,INNOCENT_CONTEXT_RESET_EXT:33364,INT:5124,INT_10_10_10_2_OES:36343,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,INVALID_ENUM:1280,INVALID_FRAMEBUFFER_OPERATION:1286,INVALID_OPERATION:1282,INVALID_VALUE:1281,INVERT:5386,KEEP:7680,KHR_debug:1,KHR_texture_compression_astc_ldr:1,LEFT:1030,LEQUAL:515,LESS:513,LINEAR:9729,LINEAR_MIPMAP_LINEAR:9987,LINEAR_MIPMAP_NEAREST:9985,LINES:1,LINE_LOOP:2,LINE_STRIP:3,LINE_WIDTH:2849,LINK_STATUS:35714,LOSE_CONTEXT_ON_RESET_EXT:33362,LOW_FLOAT:36336,LOW_INT:36339,LUMINANCE:6409,LUMINANCE16F_EXT:34846,LUMINANCE32F_EXT:34840,LUMINANCE4_ALPHA4_OES:32835,LUMINANCE8_ALPHA8_EXT:32837,LUMINANCE8_ALPHA8_OES:32837,LUMINANCE8_EXT:32832,LUMINANCE8_OES:32832,LUMINANCE_ALPHA:6410,LUMINANCE_ALPHA16F_EXT:34847,LUMINANCE_ALPHA32F_EXT:34841,MALI_PROGRAM_BINARY_ARM:36705,MALI_SHADER_BINARY_ARM:36704,MAP_FLUSH_EXPLICIT_BIT_EXT:16,MAP_INVALIDATE_BUFFER_BIT_EXT:8,MAP_INVALIDATE_RANGE_BIT_EXT:4,MAP_READ_BIT_EXT:1,MAP_UNSYNCHRONIZED_BIT_EXT:32,MAP_WRITE_BIT_EXT:2,MAX_3D_TEXTURE_SIZE_OES:32883,MAX_COLOR_ATTACHMENTS_NV:36063,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_CUBE_MAP_TEXTURE_SIZE:34076,MAX_DEBUG_GROUP_STACK_DEPTH:33388,MAX_DEBUG_LOGGED_MESSAGES:37188,MAX_DEBUG_MESSAGE_LENGTH:37187,MAX_DRAW_BUFFERS_NV:34852,MAX_EXT:32776,MAX_FRAGMENT_UNIFORM_VECTORS:36349,MAX_LABEL_LENGTH:33512,MAX_MULTIVIEW_BUFFERS_EXT:37106,MAX_RENDERBUFFER_SIZE:34024,MAX_SAMPLES_ANGLE:36183,MAX_SAMPLES_APPLE:36183,MAX_SAMPLES_EXT:36183,MAX_SAMPLES_IMG:37173,MAX_SAMPLES_NV:36183,MAX_SERVER_WAIT_TIMEOUT_APPLE:37137,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047,MAX_TEXTURE_SIZE:3379,MAX_VARYING_VECTORS:36348,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VIEWPORT_DIMS:3386,MEDIUM_FLOAT:36337,MEDIUM_INT:36340,MIN_EXT:32775,MIRRORED_REPEAT:33648,MULTISAMPLE_BUFFER_BIT0_QCOM:16777216,MULTISAMPLE_BUFFER_BIT1_QCOM:33554432,MULTISAMPLE_BUFFER_BIT2_QCOM:67108864,MULTISAMPLE_BUFFER_BIT3_QCOM:134217728,MULTISAMPLE_BUFFER_BIT4_QCOM:268435456,MULTISAMPLE_BUFFER_BIT5_QCOM:536870912,MULTISAMPLE_BUFFER_BIT6_QCOM:1073741824,MULTISAMPLE_BUFFER_BIT7_QCOM:2147483648,MULTIVIEW_EXT:37105,NEAREST:9728,NEAREST_MIPMAP_LINEAR:9986,NEAREST_MIPMAP_NEAREST:9984,NEVER:512,NICEST:4354,NONE:0,NOTEQUAL:517,NO_ERROR:0,NO_RESET_NOTIFICATION_EXT:33377,NUM_COMPRESSED_TEXTURE_FORMATS:34466,NUM_PROGRAM_BINARY_FORMATS_OES:34814,NUM_SHADER_BINARY_FORMATS:36345,NV_coverage_sample:1,NV_depth_nonlinear:1,NV_draw_buffers:1,NV_draw_instanced:1,NV_fbo_color_attachments:1,NV_fence:1,NV_framebuffer_blit:1,NV_framebuffer_multisample:1,NV_generate_mipmap_sRGB:1,NV_instanced_arrays:1,NV_read_buffer:1,NV_read_buffer_front:1,NV_read_depth:1,NV_read_depth_stencil:1,NV_read_stencil:1,NV_sRGB_formats:1,NV_shadow_samplers_array:1,NV_shadow_samplers_cube:1,NV_texture_border_clamp:1,NV_texture_compression_s3tc_update:1,NV_texture_npot_2D_mipmap:1,OBJECT_TYPE_APPLE:37138,OES_EGL_image:1,OES_EGL_image_external:1,OES_compressed_ETC1_RGB8_texture:1,OES_compressed_paletted_texture:1,OES_depth24:1,OES_depth32:1,OES_depth_texture:1,OES_element_index_uint:1,OES_fbo_render_mipmap:1,OES_fragment_precision_high:1,OES_get_program_binary:1,OES_mapbuffer:1,OES_packed_depth_stencil:1,OES_required_internalformat:1,OES_rgb8_rgba8:1,OES_standard_derivatives:1,OES_stencil1:1,OES_stencil4:1,OES_surfaceless_context:1,OES_texture_3D:1,OES_texture_float:1,OES_texture_float_linear:1,OES_texture_half_float:1,OES_texture_half_float_linear:1,OES_texture_npot:1,OES_vertex_array_object:1,OES_vertex_half_float:1,OES_vertex_type_10_10_10_2:1,ONE:1,ONE_MINUS_CONSTANT_ALPHA:32772,ONE_MINUS_CONSTANT_COLOR:32770,ONE_MINUS_DST_ALPHA:773,ONE_MINUS_DST_COLOR:775,ONE_MINUS_SRC_ALPHA:771,ONE_MINUS_SRC_COLOR:769,OUT_OF_MEMORY:1285,PACK_ALIGNMENT:3333,PACK_REVERSE_ROW_ORDER_ANGLE:37796,PALETTE4_R5_G6_B5_OES:35730,PALETTE4_RGB5_A1_OES:35732,PALETTE4_RGB8_OES:35728,PALETTE4_RGBA4_OES:35731,PALETTE4_RGBA8_OES:35729,PALETTE8_R5_G6_B5_OES:35735,PALETTE8_RGB5_A1_OES:35737,PALETTE8_RGB8_OES:35733,PALETTE8_RGBA4_OES:35736,PALETTE8_RGBA8_OES:35734,PERCENTAGE_AMD:35779,PERFMON_GLOBAL_MODE_QCOM:36768,PERFMON_RESULT_AMD:35782,PERFMON_RESULT_AVAILABLE_AMD:35780,PERFMON_RESULT_SIZE_AMD:35781,POINTS:0,POLYGON_OFFSET_FACTOR:32824,POLYGON_OFFSET_FILL:32823,POLYGON_OFFSET_UNITS:10752,PROGRAM:33506,PROGRAM_BINARY_ANGLE:37798,PROGRAM_BINARY_FORMATS_OES:34815,PROGRAM_BINARY_LENGTH_OES:34625,PROGRAM_OBJECT_EXT:35648,PROGRAM_PIPELINE_BINDING_EXT:33370,PROGRAM_PIPELINE_OBJECT_EXT:35407,PROGRAM_SEPARABLE_EXT:33368,QCOM_alpha_test:1,QCOM_binning_control:1,QCOM_driver_control:1,QCOM_extended_get:1,QCOM_extended_get2:1,QCOM_perfmon_global_mode:1,QCOM_tiled_rendering:1,QCOM_writeonly_rendering:1,QUERY:33507,QUERY_OBJECT_EXT:37203,QUERY_RESULT_AVAILABLE_EXT:34919,QUERY_RESULT_EXT:34918,R16F_EXT:33325,R32F_EXT:33326,R8_EXT:33321,READ_BUFFER_EXT:3074,READ_BUFFER_NV:3074,READ_FRAMEBUFFER_ANGLE:36008,READ_FRAMEBUFFER_APPLE:36008,READ_FRAMEBUFFER_BINDING_ANGLE:36010,READ_FRAMEBUFFER_BINDING_APPLE:36010,READ_FRAMEBUFFER_BINDING_NV:36010,READ_FRAMEBUFFER_NV:36008,RED_BITS:3410,RED_EXT:6403,RENDERBUFFER:36161,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_BINDING:36007,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_SAMPLES_ANGLE:36011,RENDERBUFFER_SAMPLES_APPLE:36011,RENDERBUFFER_SAMPLES_EXT:36011,RENDERBUFFER_SAMPLES_IMG:37171,RENDERBUFFER_SAMPLES_NV:36011,RENDERBUFFER_STENCIL_SIZE:36181,RENDERBUFFER_WIDTH:36162,RENDERER:7937,RENDER_DIRECT_TO_FRAMEBUFFER_QCOM:36787,REPEAT:10497,REPLACE:7681,REQUIRED_TEXTURE_IMAGE_UNITS_OES:36200,RESET_NOTIFICATION_STRATEGY_EXT:33366,RG16F_EXT:33327,RG32F_EXT:33328,RG8_EXT:33323,RGB:6407,RGB10_A2_EXT:32857,RGB10_EXT:32850,RGB16F_EXT:34843,RGB32F_EXT:34837,RGB565:36194,RGB565_OES:36194,RGB5_A1:32855,RGB5_A1_OES:32855,RGB8_OES:32849,RGBA:6408,RGBA16F_EXT:34842,RGBA32F_EXT:34836,RGBA4:32854,RGBA4_OES:32854,RGBA8_OES:32856,RGB_422_APPLE:35359,RG_EXT:33319,RIGHT:1031,SAMPLER:33510,SAMPLER_2D:35678,SAMPLER_2D_ARRAY_SHADOW_NV:36292,SAMPLER_2D_SHADOW_EXT:35682,SAMPLER_3D_OES:35679,SAMPLER_CUBE:35680,SAMPLER_CUBE_SHADOW_NV:36293,SAMPLER_EXTERNAL_OES:36198,SAMPLES:32937,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_BUFFERS:32936,SAMPLE_COVERAGE:32928,SAMPLE_COVERAGE_INVERT:32939,SAMPLE_COVERAGE_VALUE:32938,SCISSOR_BOX:3088,SCISSOR_TEST:3089,SGX_BINARY_IMG:35850,SGX_PROGRAM_BINARY_IMG:37168,SHADER:33505,SHADER_BINARY_DMP:37456,SHADER_BINARY_FORMATS:36344,SHADER_BINARY_VIV:36804,SHADER_COMPILER:36346,SHADER_OBJECT_EXT:35656,SHADER_SOURCE_LENGTH:35720,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,SHORT:5122,SIGNALED_APPLE:37145,SLUMINANCE8_ALPHA8_NV:35909,SLUMINANCE8_NV:35911,SLUMINANCE_ALPHA_NV:35908,SLUMINANCE_NV:35910,SRC_ALPHA:770,SRC_ALPHA_SATURATE:776,SRC_COLOR:768,SRGB8_ALPHA8_EXT:35907,SRGB8_NV:35905,SRGB_ALPHA_EXT:35906,SRGB_EXT:35904,STACK_OVERFLOW:1283,STACK_UNDERFLOW:1284,STATE_RESTORE:35804,STATIC_DRAW:35044,STENCIL_ATTACHMENT:36128,STENCIL_BACK_FAIL:34817,STENCIL_BACK_FUNC:34816,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,STENCIL_BITS:3415,STENCIL_BUFFER_BIT:1024,STENCIL_BUFFER_BIT0_QCOM:65536,STENCIL_BUFFER_BIT1_QCOM:131072,STENCIL_BUFFER_BIT2_QCOM:262144,STENCIL_BUFFER_BIT3_QCOM:524288,STENCIL_BUFFER_BIT4_QCOM:1048576,STENCIL_BUFFER_BIT5_QCOM:2097152,STENCIL_BUFFER_BIT6_QCOM:4194304,STENCIL_BUFFER_BIT7_QCOM:8388608,STENCIL_CLEAR_VALUE:2961,STENCIL_EXT:6146,STENCIL_FAIL:2964,STENCIL_FUNC:2962,STENCIL_INDEX1_OES:36166,STENCIL_INDEX4_OES:36167,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_TEST:2960,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STREAM_DRAW:35040,SUBPIXEL_BITS:3408,SYNC_CONDITION_APPLE:37139,SYNC_FENCE_APPLE:37142,SYNC_FLAGS_APPLE:37141,SYNC_FLUSH_COMMANDS_BIT_APPLE:1,SYNC_GPU_COMMANDS_COMPLETE_APPLE:37143,SYNC_OBJECT_APPLE:35411,SYNC_STATUS_APPLE:37140,TEXTURE:5890,TEXTURE0:33984,TEXTURE1:33985,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE2:33986,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE3:33987,TEXTURE30:34014,TEXTURE31:34015,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE_2D:3553,TEXTURE_3D_OES:32879,TEXTURE_BINDING_2D:32873,TEXTURE_BINDING_3D_OES:32874,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_BINDING_EXTERNAL_OES:36199,TEXTURE_BORDER_COLOR_NV:4100,TEXTURE_COMPARE_FUNC_EXT:34893,TEXTURE_COMPARE_MODE_EXT:34892,TEXTURE_CUBE_MAP:34067,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_DEPTH_QCOM:35796,TEXTURE_EXTERNAL_OES:36197,TEXTURE_FORMAT_QCOM:35798,TEXTURE_HEIGHT_QCOM:35795,TEXTURE_IMAGE_VALID_QCOM:35800,TEXTURE_IMMUTABLE_FORMAT_EXT:37167,TEXTURE_INTERNAL_FORMAT_QCOM:35797,TEXTURE_MAG_FILTER:10240,TEXTURE_MAX_ANISOTROPY_EXT:34046,TEXTURE_MAX_LEVEL_APPLE:33085,TEXTURE_MIN_FILTER:10241,TEXTURE_NUM_LEVELS_QCOM:35801,TEXTURE_OBJECT_VALID_QCOM:35803,TEXTURE_SAMPLES_IMG:37174,TEXTURE_TARGET_QCOM:35802,TEXTURE_TYPE_QCOM:35799,TEXTURE_USAGE_ANGLE:37794,TEXTURE_WIDTH_QCOM:35794,TEXTURE_WRAP_R_OES:32882,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TIMEOUT_EXPIRED_APPLE:37147,TIMEOUT_IGNORED_APPLE:18446744073709552e3,TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE:37792,TRIANGLES:4,TRIANGLE_FAN:6,TRIANGLE_STRIP:5,TRUE:1,UNKNOWN_CONTEXT_RESET_EXT:33365,UNPACK_ALIGNMENT:3317,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_PIXELS:3316,UNPACK_SKIP_ROWS:3315,UNSIGNALED_APPLE:37144,UNSIGNED_BYTE:5121,UNSIGNED_INT:5125,UNSIGNED_INT64_AMD:35778,UNSIGNED_INT_10_10_10_2_OES:36342,UNSIGNED_INT_24_8_OES:34042,UNSIGNED_INT_2_10_10_10_REV_EXT:33640,UNSIGNED_NORMALIZED_EXT:35863,UNSIGNED_SHORT:5123,UNSIGNED_SHORT_1_5_5_5_REV_EXT:33638,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_4_4_4_4_REV_EXT:33637,UNSIGNED_SHORT_4_4_4_4_REV_IMG:33637,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,UNSIGNED_SHORT_8_8_APPLE:34234,UNSIGNED_SHORT_8_8_REV_APPLE:34235,VALIDATE_STATUS:35715,VENDOR:7936,VERSION:7938,VERTEX_ARRAY_BINDING_OES:34229,VERTEX_ARRAY_OBJECT_EXT:37204,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,VERTEX_ATTRIB_ARRAY_DIVISOR_NV:35070,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_SHADER:35633,VERTEX_SHADER_BIT_EXT:1,VIEWPORT:2978,VIV_shader_binary:1,WAIT_FAILED_APPLE:37149,WRITEONLY_RENDERING_QCOM:34851,WRITE_ONLY_OES:35001,Z400_BINARY_AMD:34624,ZERO:0,RASTERIZER_DISCARD:35977,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444},ts={};function bo(n){var l=rr();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function rr(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var de=new Map,Ve=new Map,Mr=new Map,rn={json:"application/json",text:"application/text",arraybuffer:"application/octet-stream"};function kn(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:this};typeof this["on".concat(n)]=="function"&&this["on".concat(n)].call(this,l)}function $n(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{readyState:n};this.readyState=n,kn.call(this,"readystatechange",l)}var Cn=function(n){(0,zt.Z)(a,n);var l=bo(a);function a(){var s;return(0,pt.Z)(this,a),s=l.call(this),s.onabort=null,s.onerror=null,s.onload=null,s.onloadstart=null,s.onprogress=null,s.ontimeout=null,s.onloadend=null,s.onreadystatechange=null,s.readyState=0,s.response=null,s.responseText=null,s._responseType="text",s.responseXML=null,s.status=0,s.statusText="",s.upload={},s.withCredentials=!1,de.set("requestHeader",{"content-type":"application/x-www-form-urlencoded"}),s}return(0,et.Z)(a,[{key:"responseType",set:function(u){this._responseType=u}},{key:"abort",value:function(){var u=Mr.get("requestTask");u&&u.abort()}},{key:"getAllResponseHeaders",value:function(){var u=Ve.get("responseHeader");return Object.keys(u).map(function(h){return"".concat(h,": ").concat(u[h])}).join(`
|
|
`)}},{key:"getResponseHeader",value:function(u){return Ve.get("responseHeader")[u]}},{key:"open",value:function(u,h,v){this._method=u,this._url=h}},{key:"overrideMimeType",value:function(){}},{key:"send",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:""}},{key:"setRequestHeader",value:function(u,h){var v=de.get("requestHeader");v[u]=h,de.set("requestHeader",v)}},{key:"addEventListener",value:function(u,h){var v=this;typeof h=="function"&&(this["on"+u]=function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};m.target=m.target||v,h.call(v,m)})}},{key:"removeEventListener",value:function(u,h){this["on"+u]===h&&(this["on"+u]=null)}}]),a}(qe);Cn.UNSEND=0,Cn.OPENED=1,Cn.HEADERS_RECEIVED=2,Cn.LOADING=3,Cn.DONE=4;function Ki(n){var l=Fa();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Fa(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Ss=function(n){(0,zt.Z)(a,n);var l=Ki(a);function a(s){var u;return(0,pt.Z)(this,a),u=l.call(this,s),u.touches=[],u.targetTouches=[],u.changedTouches=[],u.target=ye(),u.currentTarget=ye(),u}return(0,et.Z)(a)}(Be);function ko(n){var l=n||{},a=l.x,s=a===void 0?0:a,u=l.y,h=u===void 0?0:u,v=l.clientX,m=v===void 0?0:v,w=l.clientY,A=w===void 0?0:w;Object.keys(n).indexOf("x")!==-1?(n.pageX=n.clientX=s,n.pageY=n.clientY=h):(n.x=m,n.y=A)}function zo(n){return function(l){var a=new Ss(n);a.changedTouches=l.changedTouches,a.touches=l.touches,a.targetTouches=Array.prototype.slice.call(l.touches),a.timeStamp=l.timeStamp,a.changedTouches.forEach(function(s){return ko(s)}),a.touches.forEach(function(s){return ko(s)}),a.targetTouches.forEach(function(s){return ko(s)}),Yr.dispatchEvent(a)}}function oo(n){return function(l){l.type=n,Yr.dispatchEvent(l)}}var Xo=zo("touchstart"),iu=zo("touchmove"),Ko=zo("touchend"),Ul=oo("mapCameaParams");function $c(n){var l=Ku();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Ku(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Ce=function(n){(0,zt.Z)(a,n);var l=$c(a);function a(s){var u;return(0,pt.Z)(this,a),u=l.call(this,s),u.target=ye(),u.currentTarget=ye(),u}return(0,et.Z)(a)}(Be),Xe=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","pointerId","width","height","pressure","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","pageX","pageY","timeStamp"],Cr=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0,0,0,0,0,0,"",0,!1,0,0,0],on="touch";function li(n,l,a){for(var s=new Ce(n),u=0;u<Xe.length;u++){var h=Xe[u];s[h]=l[h]||Cr[u]}return s.type=n,s.target=ye(),s.currentTarget=ye(),s.buttons=Di(n),s.which=s.buttons,s.pointerId=(l.identifier||0)+2,s.bubbles=!0,s.cancelable=!0,s.button=0,s.width=(l.radiusX||.5)*2,s.height=(l.radiusY||.5)*2,s.pressure=l.force||.5,s.isPrimary=xs(l),s.pointerType=on,s.altKey=a.altKey,s.ctrlKey=a.ctrlKey,s.metaKey=a.metaKey,s.shiftKey=a.shiftKey,a.preventDefault&&(s.preventDefault=function(){a.preventDefault()}),s}function Di(n){var l=0;return(n==="touchstart"||n==="touchmove"||n==="pointerdown"||n==="pointermove")&&(l=1),l}var Ba=null;function xs(n){return Ba===n.identifier}function es(n){Ba===null&&(Ba=n.identifier)}function ls(n){Ba===n.identifier&&(Ba=null)}function zs(n){return function(l){for(var a=l.changedTouches,s=0;s<a.length;s++){var u=a[s];s===0&&n==="pointerdown"?es(u):(n==="pointerup"||n==="pointercancel")&&ls(u);var h=li(n,u,l);Yr.dispatchEvent(h)}}}var Qu=zs("pointerdown"),Cu=zs("pointermove"),Ks=zs("pointerup");function Au(n){var l=zu();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function zu(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var xl=function(n){(0,zt.Z)(a,n);var l=Au(a);function a(s){return(0,pt.Z)(this,a),l.call(this,s)}return(0,et.Z)(a)}(Be);function Ju(n){return function(l){l.type=n,Yr.dispatchEvent(l)}}var Uu=Ju("mousedown"),Uo=Ju("mousemove"),js=Ju("mouseup"),Rc=!1;function qc(n){Rc=n}var Tu=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,Zl=typeof wx!="undefined"&&wx!==null&&(typeof wx.request!="undefined"||typeof wx.miniProgram!="undefined"),Cs=(Tu||Zl)&&Rc,Zu={atob:Jt,btoa:ft,devicePixelRatio:Le,Blob:St,document:Yr,Element:$t,Event:Be,EventTarget:qe,HTMLCanvasElement:On,HTMLElement:Br,HTMLMediaElement:zn,HTMLVideoElement:Dn,Image:fr,ImageData:Mi,navigator:Ha,Node:qt,requestAnimationFrame:yo,cancelAnimationFrame:Va,screen:Nt,XMLHttpRequest:Cn,performance:wa,URL:Ya,WebGLRenderingContext:Nu,WebGL2RenderingContext:ts,addEventListener:function(l,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Yr.addEventListener(l,a,s)},removeEventListener:function(l,a,s){Yr.removeEventListener(l,a)},dispatchEvent:function(l){Yr.dispatchEvent(l)},innerWidth:Nt.availWidth,innerHeight:Nt.availHeight,setTimeout,clearTimeout,setInterval,clearInterval},ja=Cs?Zu:se,Dc=Cs?Cn:se.XMLHttpRequest,D=Cs?_r:se.location;function X(n){var l=Mt();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Mt(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var it=function(n){(0,zt.Z)(a,n);var l=X(a);function a(s,u,h,v){var m;return(0,pt.Z)(this,a),m=l.call(this,"AJAXError: ".concat(u," (").concat(s,"): ").concat(h)),m.status=s,m.statusText=u,m.url=h,m.body=v,m}return(0,et.Z)(a)}(xe(Error));function fe(n,l){var a=new Dc,s=Array.isArray(n.url)?n.url[0]:n.url;a.open(n.method||"GET",s,!0),n.type==="arrayBuffer"&&(a.responseType="arraybuffer");for(var u in n.headers)n.headers.hasOwnProperty(u)&&a.setRequestHeader(u,n.headers[u]);return n.type==="json"&&(a.responseType="text",a.setRequestHeader("Accept","application/json")),a.withCredentials=n.credentials==="include",a.onerror=function(){l(new Error(a.statusText))},a.onload=function(){if((a.status>=200&&a.status<300||a.status===0)&&a.response!==null){var h=a.response;if(n.type==="json")try{h=JSON.parse(a.response)}catch(m){return l(m)}l(null,h,a.getResponseHeader("Cache-Control"),a.getResponseHeader("Expires"),a)}else{var v=new Blob([a.response],{type:a.getResponseHeader("Content-Type")});l(new it(a.status,a.statusText,s.toString(),v))}},a.send(n.body),a}function He(n){return new Promise(function(l,a){fe(n,function(s,u,h,v,m){s?a({err:s,data:null,xhr:m}):l({err:null,data:u,cacheControl:h,expires:v,xhr:m})})})}function br(n,l){return fe(n,l)}var Ur=function(l,a){return br((0,K.Z)((0,K.Z)({},l),{},{type:"json"}),a)},Nr=function(l,a){return br((0,K.Z)((0,K.Z)({},l),{},{type:"arrayBuffer"}),a)},An=function(l,a){return br(_objectSpread(_objectSpread({},l),{},{method:"POST"}),a)};function Hn(n){var l=$window.document.createElement("a");return l.href=n,l.protocol===$window.document.location.protocol&&l.host===$window.document.location.host}var Ji="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function ka(n,l){var a=new ja.Image,s=ja.URL||ja.webkitURL;a.crossOrigin="anonymous",a.onload=function(){l(null,a),s.revokeObjectURL(a.src),a.onload=null,window.requestAnimationFrame(function(){a.src=Ji})},a.onerror=function(){return l(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var u=new Blob([new Uint8Array(n)],{type:"image/png"});a.src=n.byteLength?s.createObjectURL(u):Ji}function Sa(n,l){var a=new Blob([new Uint8Array(n)],{type:"image/png"});createImageBitmap(a).then(function(s){l(null,s)}).catch(function(s){l(new Error("Could not load image because of ".concat(s.message,". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.")))})}var eo=function(l,a,s){var u=function(v,m){if(v)a(v);else if(m){var w=typeof createImageBitmap=="function",A=s?s(m):m;w?Sa(A,a):ka(A,a)}};return l.type==="json"?Ur(l,u):Nr(l,u)},Eo;(function(n){n.CENTER="center",n.TOP="top",n["TOP-LEFT"]="top-left",n["TOP-RIGHT"]="top-right",n.BOTTOM="bottom",n["BOTTOM-LEFT"]="bottom-left",n["BOTTOM-RIGHT"]="bottom-right",n.LEFT="left",n.RIGHT="right"})(Eo||(Eo={}));var So={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function ro(n,l,a){var s=n.classList;for(var u in So)So.hasOwnProperty(u)&&s.remove("l7-".concat(a,"-anchor-").concat(u));s.add("l7-".concat(a,"-anchor-").concat(l))}function pu(n,l,a){n.prototype=l.prototype=a,a.constructor=n}function Il(n,l){var a=Object.create(n.prototype);for(var s in l)a[s]=l[s];return a}function bl(){}var Vl=.7,ul=1/Vl,Gl="\\s*([+-]?\\d+)\\s*",Vu="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",cs="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",pe=/^#([0-9a-f]{3,8})$/,ar=new RegExp("^rgb\\("+[Gl,Gl,Gl]+"\\)$"),Fr=new RegExp("^rgb\\("+[cs,cs,cs]+"\\)$"),Xr=new RegExp("^rgba\\("+[Gl,Gl,Gl,Vu]+"\\)$"),_n=new RegExp("^rgba\\("+[cs,cs,cs,Vu]+"\\)$"),ki=new RegExp("^hsl\\("+[Vu,cs,cs]+"\\)$"),ia=new RegExp("^hsla\\("+[Vu,cs,cs,Vu]+"\\)$"),$a={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};pu(bl,Gu,{copy:function(n){return Object.assign(new this.constructor,this,n)},displayable:function(){return this.rgb().displayable()},hex:du,formatHex:du,formatHsl:au,formatRgb:Xa,toString:Xa});function du(){return this.rgb().formatHex()}function au(){return Sf(this).formatHsl()}function Xa(){return this.rgb().formatRgb()}function Gu(n){var l,a;return n=(n+"").trim().toLowerCase(),(l=pe.exec(n))?(a=l[1].length,l=parseInt(l[1],16),a===6?Vh(l):a===3?new kl(l>>8&15|l>>4&240,l>>4&15|l&240,(l&15)<<4|l&15,1):a===8?Hl(l>>24&255,l>>16&255,l>>8&255,(l&255)/255):a===4?Hl(l>>12&15|l>>8&240,l>>8&15|l>>4&240,l>>4&15|l&240,((l&15)<<4|l&15)/255):null):(l=ar.exec(n))?new kl(l[1],l[2],l[3],1):(l=Fr.exec(n))?new kl(l[1]*255/100,l[2]*255/100,l[3]*255/100,1):(l=Xr.exec(n))?Hl(l[1],l[2],l[3],l[4]):(l=_n.exec(n))?Hl(l[1]*255/100,l[2]*255/100,l[3]*255/100,l[4]):(l=ki.exec(n))?wf(l[1],l[2]/100,l[3]/100,1):(l=ia.exec(n))?wf(l[1],l[2]/100,l[3]/100,l[4]):$a.hasOwnProperty(n)?Vh($a[n]):n==="transparent"?new kl(NaN,NaN,NaN,0):null}function Vh(n){return new kl(n>>16&255,n>>8&255,n&255,1)}function Hl(n,l,a,s){return s<=0&&(n=l=a=NaN),new kl(n,l,a,s)}function fd(n){return n instanceof bl||(n=Gu(n)),n?(n=n.rgb(),new kl(n.r,n.g,n.b,n.opacity)):new kl}function Bc(n,l,a,s){return arguments.length===1?fd(n):new kl(n,l,a,s==null?1:s)}function kl(n,l,a,s){this.r=+n,this.g=+l,this.b=+a,this.opacity=+s}pu(kl,Bc,Il(bl,{brighter:function(n){return n=n==null?ul:Math.pow(ul,n),new kl(this.r*n,this.g*n,this.b*n,this.opacity)},darker:function(n){return n=n==null?Vl:Math.pow(Vl,n),new kl(this.r*n,this.g*n,this.b*n,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ap,formatHex:Ap,formatRgb:Ef,toString:Ef}));function Ap(){return"#"+Kc(this.r)+Kc(this.g)+Kc(this.b)}function Ef(){var n=this.opacity;return n=isNaN(n)?1:Math.max(0,Math.min(1,n)),(n===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(n===1?")":", "+n+")")}function Kc(n){return n=Math.max(0,Math.min(255,Math.round(n)||0)),(n<16?"0":"")+n.toString(16)}function wf(n,l,a,s){return s<=0?n=l=a=NaN:a<=0||a>=1?n=l=NaN:l<=0&&(n=NaN),new ll(n,l,a,s)}function Sf(n){if(n instanceof ll)return new ll(n.h,n.s,n.l,n.opacity);if(n instanceof bl||(n=Gu(n)),!n)return new ll;if(n instanceof ll)return n;n=n.rgb();var l=n.r/255,a=n.g/255,s=n.b/255,u=Math.min(l,a,s),h=Math.max(l,a,s),v=NaN,m=h-u,w=(h+u)/2;return m?(l===h?v=(a-s)/m+(a<s)*6:a===h?v=(s-l)/m+2:v=(l-a)/m+4,m/=w<.5?h+u:2-h-u,v*=60):m=w>0&&w<1?0:v,new ll(v,m,w,n.opacity)}function Cf(n,l,a,s){return arguments.length===1?Sf(n):new ll(n,l,a,s==null?1:s)}function ll(n,l,a,s){this.h=+n,this.s=+l,this.l=+a,this.opacity=+s}pu(ll,Cf,Il(bl,{brighter:function(n){return n=n==null?ul:Math.pow(ul,n),new ll(this.h,this.s,this.l*n,this.opacity)},darker:function(n){return n=n==null?Vl:Math.pow(Vl,n),new ll(this.h,this.s,this.l*n,this.opacity)},rgb:function(){var n=this.h%360+(this.h<0)*360,l=isNaN(n)||isNaN(this.s)?0:this.s,a=this.l,s=a+(a<.5?a:1-a)*l,u=2*a-s;return new kl(Nc(n>=240?n-240:n+120,u,s),Nc(n,u,s),Nc(n<120?n+240:n-120,u,s),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var n=this.opacity;return n=isNaN(n)?1:Math.max(0,Math.min(1,n)),(n===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(n===1?")":", "+n+")")}}));function Nc(n,l,a){return(n<60?l+(a-l)*n/60:n<180?a:n<240?l+(a-l)*(240-n)/60:l)*255}function nc(n){return typeof n=="string"?!!d3.color(n):!1}function Lo(n){var l=Gu(n),a=[0,0,0,0];return l!=null&&(a[0]=l.r/255,a[1]=l.g/255,a[2]=l.b/255,a[3]=l.opacity),a}function zc(n){var l=n&&n[0],a=n&&n[1],s=n&&n[2],u=l+a*256+s*65536-1;return u}function vc(n){return[n+1&255,n+1>>8&255,n+1>>8>>8&255]}function Qc(n){var l=ja.document.createElement("canvas"),a=l.getContext("2d");l.width=256,l.height=1;for(var s=null,u=a.createLinearGradient(0,0,256,1),h=n.positions[0],v=n.positions[n.positions.length-1],m=0;m<n.colors.length;++m){var w=(n.positions[m]-h)/(v-h);u.addColorStop(w,n.colors[m])}if(a.fillStyle=u,a.fillRect(0,0,256,1),Cs)return s=new Uint8ClampedArray(a.getImageData(0,0,256,1).data),l=null,a=null,{data:s,width:256,height:1};s=a.getImageData(0,0,256,1).data;for(var A=a.createImageData(256,1),R=0;R<A.data.length;R+=4)A.data[R+0]=s[R+0],A.data[R+1]=s[R+1],A.data[R+2]=s[R+2],A.data[R+3]=s[R+3];return l=null,a=null,A}function ch(n,l){var a=ja.document.createElement("canvas"),s=a.getContext("2d");a.width=256,a.height=1;for(var u=s.createLinearGradient(0,0,256,1),h=l[1]-l[0],v=0;v<n.colors.length;++v){var m=Math.max((n.positions[v]-l[0])/h,0);u.addColorStop(m,n.colors[v])}s.fillStyle=u,s.fillRect(0,0,256,1);var w=s.getImageData(0,0,256,1).data,A=Mp(s,w);return a=null,s=null,A}function fh(n){var l=ja.document.createElement("canvas"),a=l.getContext("2d");l.width=256,l.height=1;var s=a.createImageData(256,1);return s.data.fill(0),n.positions.forEach(function(u,h){var v=Lo(n.colors[h]);s.data[u*4+0]=v[0]*255,s.data[u*4+1]=v[1]*255,s.data[u*4+2]=v[2]*255,s.data[u*4+3]=v[3]*255}),l=null,a=null,s}function Tp(n){var l=ja.document.createElement("canvas"),a=l.getContext("2d");a.globalAlpha=1,l.width=256,l.height=1;for(var s=256/n.colors.length,u=0;u<n.colors.length;u++)a.beginPath(),a.lineWidth=2,a.strokeStyle=n.colors[u],a.moveTo(u*s,0),a.lineTo((u+1)*s,0),a.stroke();var h=a.getImageData(0,0,256,1).data,v=Mp(a,h);return l=null,a=null,v}function Gh(n,l){var a=ja.document.createElement("canvas"),s=a.getContext("2d");s.globalAlpha=1,a.width=256,a.height=1;var u=l[1]-l[0];n.positions.length-n.colors.length!==1&&console.warn("positions \u7684\u6570\u5B57\u4E2A\u6570\u5E94\u5F53\u6BD4 colors \u7684\u6837\u5F0F\u591A\u4E00\u4E2A,poisitions \u7684\u9996\u5C3E\u503C\u4E00\u822C\u4E3A\u6570\u636E\u7684\u6700\u5927\u6700\u65B0\u503C");for(var h=0;h<n.colors.length;h++)s.beginPath(),s.lineWidth=2,s.strokeStyle=n.colors[h],s.moveTo((n.positions[h]-l[0])/u*255,0),s.lineTo((n.positions[h+1]-l[0])/u*255,0),s.stroke();var v=s.getImageData(0,0,256,1).data,m=Mp(s,v);return a=null,s=null,m}function Mp(n,l){for(var a=n.createImageData(256,1),s=0;s<a.data.length;s+=4)a.data[s+0]=l[s+0],a.data[s+1]=l[s+1],a.data[s+2]=l[s+2],a.data[s+3]=l[s+3];return a}function Gf(n){switch(n.type){case"cat":return[0,255];default:}}var Ll={BACK:1029,FRONT:1028};function hh(n){switch(n){case"GAODE1.x":return Ll.BACK;case"GAODE2.x":return Ll.BACK;case"MAPBOX":return Ll.FRONT;case"SIMPLE":return Ll.FRONT;case"GLOBEL":return Ll.BACK;case"DEBAULT":return Ll.FRONT;default:return Ll.FRONT}}var Oi=nt(23570),Fn=nt(97207);function ph(n){var l=n;return typeof n=="string"&&(l=ja.document.getElementById(n)),l}function Ip(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function hd(n){return Ip(n).split(/\s+/)}function Hf(n){var l,a,s=ja==null||(l=ja.document)===null||l===void 0||(a=l.documentElement)===null||a===void 0?void 0:a.style;if(!s)return n[0];for(var u in n)if(n[u]&&n[u]in s)return n[u];return n[0]}function so(n,l,a){var s=ja.document.createElement(n);return l&&(s.className=l||""),a&&a.appendChild(s),s}function Mu(n){var l=n.parentNode;l&&l.removeChild(n)}function Po(n,l){if(n.classList!==void 0)for(var a=hd(l),s=0,u=a.length;s<u;s++)n.classList.add(a[s]);else if(!Af(n,l)){var h=qa(n);El(n,(h?h+" ":"")+l)}}function jl(n,l){n.classList!==void 0?n.classList.remove(l):El(n,Ip((" "+qa(n)+" ").replace(" "+l+" "," ")))}function Af(n,l){if(n.classList!==void 0)return n.classList.contains(l);var a=qa(n);return a.length>0&&new RegExp("(^|\\s)"+l+"(\\s|$)").test(a)}function El(n,l){n instanceof HTMLElement?n.className=l:n.className.baseVal=l}function qa(n){return n instanceof SVGElement&&(n=n.correspondingElement),n.className.baseVal===void 0?n.className:n.className.baseVal}function ds(n){for(;n&&n.firstChild;)n.removeChild(n.firstChild)}var no=Hf(["transform","WebkitTransform"]);function dh(n,l){n.style[no]=l}function gc(){if(typeof Event=="function")ja.dispatchEvent(new Event("resize"));else{var n=ja.document.createEvent("UIEvents");n.initUIEvent("resize",!0,!1,ja,0),ja.dispatchEvent(n)}}function kp(n){var l=["padding: "+(n.height/2-8)+"px "+n.width/2+"px;","line-height: "+n.height+"px;","background-image: url("+n.toDataURL()+");"];console.log(`%c
|
|
`,l.join(""))}function uv(){var n,l=ja.document.querySelector('meta[name="viewport"]');if(!l)return 1;var a=(n=l.content)===null||n===void 0?void 0:n.split(","),s=a.find(function(u){var h=u.split("="),v=(0,yt.Z)(h,1),m=v[0];return m==="initial-scale"});return s?s.split("=")[1]*1:1}var Qi=uv()<1?1:ja.devicePixelRatio;function vh(n,l){n.setAttribute("style","".concat(n.style.cssText).concat(l))}function gh(n){return n.split(";").map(function(l){return l.trim()}).filter(function(l){return l})}function Tf(n,l){var a,s=gh((a=n.getAttribute("style"))!==null&&a!==void 0?a:""),u=gh(l),h=Fn.pull.apply(void 0,[s].concat((0,Oi.Z)(u)));n.setAttribute("style",h.join(";"))}function ou(n){return Object.entries(n).map(function(l){var a=(0,yt.Z)(l,2),s=a[0],u=a[1];return"".concat(s,": ").concat(u)}).join(";")}function jf(n,l){return{left:n.left-l.left,top:n.top-l.top,right:l.left+l.width-n.left-n.width,bottom:l.top+l.height-n.top-n.height}}function Mf(n,l){n.checked=l,l?n.setAttribute("checked","true"):n.removeAttribute("checked")}function vs(n){n.innerHTML=""}function Hi(n){n.setAttribute("draggable","false")}function rs(n,l){if(typeof l=="string"){var a=document.createElement("div");for(a.innerHTML=l;a.firstChild;)n.append(a.firstChild)}else Array.isArray(l)?n.append.apply(n,(0,Oi.Z)(l)):n.append(l)}function wl(n){return typeof ImageBitmap!="undefined"&&n instanceof ImageBitmap}function Jc(){return typeof importScripts=="function"}var mc=Jc()?function(){return self.worker&&self.worker.referrer}:function(){return(window.location.protocol==="blob:"?window.parent:window).location.href};function Iu(n,l){n.forEach(function(a){l[a]&&(l[a]=l[a].bind(l))})}var pd=null,ei=63710088e-1,tf={centimeters:ei*100,centimetres:ei*100,degrees:ei/111325,feet:ei*3.28084,inches:ei*39.37,kilometers:ei/1e3,kilometres:ei/1e3,meters:ei,metres:ei,miles:ei/1609.344,millimeters:ei*1e3,millimetres:ei*1e3,nauticalmiles:ei/1852,radians:1,yards:ei*1.0936},mh={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/ei,yards:1.0936133},yc={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Oo(n,l,a){a===void 0&&(a={});var s={type:"Feature"};return(a.id===0||a.id)&&(s.id=a.id),a.bbox&&(s.bbox=a.bbox),s.properties=l||{},s.geometry=n,s}function Hu(n,l,a){switch(a===void 0&&(a={}),n){case"Point":return yh(l).geometry;case"LineString":return Lp(l).geometry;case"Polygon":return Os(l).geometry;case"MultiPoint":return ic(l).geometry;case"MultiLineString":return vd(l).geometry;case"MultiPolygon":return cl(l).geometry;default:throw new Error(n+" is invalid")}}function yh(n,l,a){if(a===void 0&&(a={}),!n)throw new Error("coordinates is required");if(!Array.isArray(n))throw new Error("coordinates must be an Array");if(n.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ii(n[0])||!Ii(n[1]))throw new Error("coordinates must contain numbers");var s={type:"Point",coordinates:n};return Oo(s,l,a)}function Wl(n,l,a){return a===void 0&&(a={}),ef(n.map(function(s){return yh(s,l)}),a)}function Os(n,l,a){a===void 0&&(a={});for(var s=0,u=n;s<u.length;s++){var h=u[s];if(h.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var v=0;v<h[h.length-1].length;v++)if(h[h.length-1][v]!==h[0][v])throw new Error("First and last Position are not equivalent.")}var m={type:"Polygon",coordinates:n};return Oo(m,l,a)}function Pl(n,l,a){return a===void 0&&(a={}),ef(n.map(function(s){return Os(s,l)}),a)}function Lp(n,l,a){if(a===void 0&&(a={}),n.length<2)throw new Error("coordinates must be an array of two or more positions");var s={type:"LineString",coordinates:n};return Oo(s,l,a)}function dd(n,l,a){return a===void 0&&(a={}),ef(n.map(function(s){return Lp(s,l)}),a)}function ef(n,l){l===void 0&&(l={});var a={type:"FeatureCollection"};return l.id&&(a.id=l.id),l.bbox&&(a.bbox=l.bbox),a.features=n,a}function vd(n,l,a){a===void 0&&(a={});var s={type:"MultiLineString",coordinates:n};return Oo(s,l,a)}function ic(n,l,a){a===void 0&&(a={});var s={type:"MultiPoint",coordinates:n};return Oo(s,l,a)}function cl(n,l,a){a===void 0&&(a={});var s={type:"MultiPolygon",coordinates:n};return Oo(s,l,a)}function io(n,l,a){a===void 0&&(a={});var s={type:"GeometryCollection",geometries:n};return Oo(s,l,a)}function Ws(n,l){if(l===void 0&&(l=0),l&&!(l>=0))throw new Error("precision must be a positive number");var a=Math.pow(10,l||0);return Math.round(n*a)/a}function Ol(n,l){l===void 0&&(l="kilometers");var a=tf[l];if(!a)throw new Error(l+" units is invalid");return n*a}function vu(n,l){l===void 0&&(l="kilometers");var a=tf[l];if(!a)throw new Error(l+" units is invalid");return n/a}function Wf(n,l){return gu(vu(n,l))}function If(n){var l=n%360;return l<0&&(l+=360),l}function gu(n){var l=n%(2*Math.PI);return l*180/Math.PI}function ku(n){var l=n%360;return l*Math.PI/180}function _c(n,l,a){if(l===void 0&&(l="kilometers"),a===void 0&&(a="kilometers"),!(n>=0))throw new Error("length must be a positive number");return Ol(vu(n,l),a)}function aa(n,l,a){if(l===void 0&&(l="meters"),a===void 0&&(a="kilometers"),!(n>=0))throw new Error("area must be a positive number");var s=yc[l];if(!s)throw new Error("invalid original units");var u=yc[a];if(!u)throw new Error("invalid final units");return n/s*u}function Ii(n){return!isNaN(n)&&n!==null&&!Array.isArray(n)}function _h(n){return!!n&&n.constructor===Object}function fl(n){if(!n)throw new Error("bbox is required");if(!Array.isArray(n))throw new Error("bbox must be an Array");if(n.length!==4&&n.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");n.forEach(function(l){if(!Ii(l))throw new Error("bbox must only contain numbers")})}function tl(n){if(!n)throw new Error("id is required");if(["string","number"].indexOf(typeof n)===-1)throw new Error("id must be a number or a string")}function su(n){return typeof n=="number"}function Sl(n,l,a){if(n!==null)for(var s,u,h,v,m,w,A,R=0,B=0,G,j=n.type,lt=j==="FeatureCollection",ct=j==="Feature",_t=lt?n.features.length:1,Vt=0;Vt<_t;Vt++){A=lt?n.features[Vt].geometry:ct?n.geometry:n,G=A?A.type==="GeometryCollection":!1,m=G?A.geometries.length:1;for(var ce=0;ce<m;ce++){var ae=0,ze=0;if(v=G?A.geometries[ce]:A,v!==null){w=v.coordinates;var $e=v.type;switch(R=a&&($e==="Polygon"||$e==="MultiPolygon")?1:0,$e){case null:break;case"Point":if(l(w,B,Vt,ae,ze)===!1)return!1;B++,ae++;break;case"LineString":case"MultiPoint":for(s=0;s<w.length;s++){if(l(w[s],B,Vt,ae,ze)===!1)return!1;B++,$e==="MultiPoint"&&ae++}$e==="LineString"&&ae++;break;case"Polygon":case"MultiLineString":for(s=0;s<w.length;s++){for(u=0;u<w[s].length-R;u++){if(l(w[s][u],B,Vt,ae,ze)===!1)return!1;B++}$e==="MultiLineString"&&ae++,$e==="Polygon"&&ze++}$e==="Polygon"&&ae++;break;case"MultiPolygon":for(s=0;s<w.length;s++){for(ze=0,u=0;u<w[s].length;u++){for(h=0;h<w[s][u].length-R;h++){if(l(w[s][u][h],B,Vt,ae,ze)===!1)return!1;B++}ze++}ae++}break;case"GeometryCollection":for(s=0;s<v.geometries.length;s++)if(Sl(v.geometries[s],l,a)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function gd(n,l,a,s){var u=a;return Sl(n,function(h,v,m,w,A){v===0&&a===void 0?u=h:u=l(u,h,v,m,w,A)},s),u}function Hh(n,l){var a;switch(n.type){case"FeatureCollection":for(a=0;a<n.features.length&&l(n.features[a].properties,a)!==!1;a++);break;case"Feature":l(n.properties,0);break}}function Yo(n,l,a){var s=a;return Hh(n,function(u,h){h===0&&a===void 0?s=u:s=l(s,u,h)}),s}function os(n,l){if(n.type==="Feature")l(n,0);else if(n.type==="FeatureCollection")for(var a=0;a<n.features.length&&l(n.features[a],a)!==!1;a++);}function lv(n,l,a){var s=a;return os(n,function(u,h){h===0&&a===void 0?s=u:s=l(s,u,h)}),s}function jh(n){var l=[];return Sl(n,function(a){l.push(a)}),l}function hl(n,l){var a,s,u,h,v,m,w,A,R,B,G=0,j=n.type==="FeatureCollection",lt=n.type==="Feature",ct=j?n.features.length:1;for(a=0;a<ct;a++){for(m=j?n.features[a].geometry:lt?n.geometry:n,A=j?n.features[a].properties:lt?n.properties:{},R=j?n.features[a].bbox:lt?n.bbox:void 0,B=j?n.features[a].id:lt?n.id:void 0,w=m?m.type==="GeometryCollection":!1,v=w?m.geometries.length:1,u=0;u<v;u++){if(h=w?m.geometries[u]:m,h===null){if(l(null,G,A,R,B)===!1)return!1;continue}switch(h.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(l(h,G,A,R,B)===!1)return!1;break}case"GeometryCollection":{for(s=0;s<h.geometries.length;s++)if(l(h.geometries[s],G,A,R,B)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}G++}}function Xl(n,l,a){var s=a;return hl(n,function(u,h,v,m,w){h===0&&a===void 0?s=u:s=l(s,u,h,v,m,w)}),s}function fa(n,l){hl(n,function(a,s,u,h,v){var m=a===null?null:a.type;switch(m){case null:case"Point":case"LineString":case"Polygon":return l(Oo(a,u,{bbox:h,id:v}),s,0)===!1?!1:void 0}var w;switch(m){case"MultiPoint":w="Point";break;case"MultiLineString":w="LineString";break;case"MultiPolygon":w="Polygon";break}for(var A=0;A<a.coordinates.length;A++){var R=a.coordinates[A],B={type:w,coordinates:R};if(l(Oo(B,u),s,A)===!1)return!1}})}function kf(n,l,a){var s=a;return fa(n,function(u,h,v){h===0&&v===0&&a===void 0?s=u:s=l(s,u,h,v)}),s}function xc(n,l){fa(n,function(a,s,u){var h=0;if(a.geometry){var v=a.geometry.type;if(!(v==="Point"||v==="MultiPoint")){var m,w=0,A=0,R=0;if(Sl(a,function(B,G,j,lt,ct){if(m===void 0||s>w||lt>A||ct>R){m=B,w=s,A=lt,R=ct,h=0;return}var _t=lineString([m,B],a.properties);if(l(_t,s,u,ct,h)===!1)return!1;h++,m=B})===!1)return!1}}})}function Pp(n,l,a){var s=a,u=!1;return xc(n,function(h,v,m,w,A){u===!1&&a===void 0?s=h:s=l(s,h,v,m,w,A),u=!0}),s}function Xf(n,l){if(!n)throw new Error("geojson is required");fa(n,function(a,s,u){if(a.geometry!==null){var h=a.geometry.type,v=a.geometry.coordinates;switch(h){case"LineString":if(l(a,s,u,0,0)===!1)return!1;break;case"Polygon":for(var m=0;m<v.length;m++)if(l(lineString(v[m],a.properties),s,u,m)===!1)return!1;break}}})}function Wh(n,l,a){var s=a;return Xf(n,function(u,h,v,m){h===0&&a===void 0?s=u:s=l(s,u,h,v,m)}),s}function md(n,l){if(l=l||{},!isObject(l))throw new Error("options is invalid");var a=l.featureIndex||0,s=l.multiFeatureIndex||0,u=l.geometryIndex||0,h=l.segmentIndex||0,v=l.properties,m;switch(n.type){case"FeatureCollection":a<0&&(a=n.features.length+a),v=v||n.features[a].properties,m=n.features[a].geometry;break;case"Feature":v=v||n.properties,m=n.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":m=n;break;default:throw new Error("geojson is invalid")}if(m===null)return null;var w=m.coordinates;switch(m.type){case"Point":case"MultiPoint":return null;case"LineString":return h<0&&(h=w.length+h-1),lineString([w[h],w[h+1]],v,l);case"Polygon":return u<0&&(u=w.length+u),h<0&&(h=w[u].length+h-1),lineString([w[u][h],w[u][h+1]],v,l);case"MultiLineString":return s<0&&(s=w.length+s),h<0&&(h=w[s].length+h-1),lineString([w[s][h],w[s][h+1]],v,l);case"MultiPolygon":return s<0&&(s=w.length+s),u<0&&(u=w[s].length+u),h<0&&(h=w[s][u].length-h-1),lineString([w[s][u][h],w[s][u][h+1]],v,l)}throw new Error("geojson is invalid")}function Xh(n,l){if(l=l||{},!isObject(l))throw new Error("options is invalid");var a=l.featureIndex||0,s=l.multiFeatureIndex||0,u=l.geometryIndex||0,h=l.coordIndex||0,v=l.properties,m;switch(n.type){case"FeatureCollection":a<0&&(a=n.features.length+a),v=v||n.features[a].properties,m=n.features[a].geometry;break;case"Feature":v=v||n.properties,m=n.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":m=n;break;default:throw new Error("geojson is invalid")}if(m===null)return null;var w=m.coordinates;switch(m.type){case"Point":return point(w,v,l);case"MultiPoint":return s<0&&(s=w.length+s),point(w[s],v,l);case"LineString":return h<0&&(h=w.length+h),point(w[h],v,l);case"Polygon":return u<0&&(u=w.length+u),h<0&&(h=w[u].length+h),point(w[u][h],v,l);case"MultiLineString":return s<0&&(s=w.length+s),h<0&&(h=w[s].length+h),point(w[s][h],v,l);case"MultiPolygon":return s<0&&(s=w.length+s),u<0&&(u=w[s].length+u),h<0&&(h=w[s][u].length-h),point(w[s][u][h],v,l)}throw new Error("geojson is invalid")}function rf(n){var l=[1/0,1/0,-1/0,-1/0];return Sl(n,function(a){l[0]>a[0]&&(l[0]=a[0]),l[1]>a[1]&&(l[1]=a[1]),l[2]<a[0]&&(l[2]=a[0]),l[3]<a[1]&&(l[3]=a[1])}),l}rf.default=rf;var yd=rf,bc=2*Math.PI*6378137/2;function Lf(n,l){var a=(0,yt.Z)(l,4),s=a[0],u=a[1],h=a[2],v=a[3];return n.lng>s&&n.lng<=h&&n.lat>u&&n.lat<=v}function Op(n){var l=[1/0,1/0,-1/0,-1/0];return n.forEach(function(a){var s=a.coordinates;nf(l,s)}),l}function nf(n,l){return Array.isArray(l[0])?l.forEach(function(a){nf(n,a)}):(n[0]>l[0]&&(n[0]=l[0]),n[1]>l[1]&&(n[1]=l[1]),n[2]<l[0]&&(n[2]=l[0]),n[3]<l[1]&&(n[3]=l[1])),n}function ac(n,l){return Yh(n,l)}function Yh(n,l){return Array.isArray(n[0])?n.map(function(a){return Yh(a,l)}):l(n)}function Yf(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{enable:!0,decimal:1};n=C(n,l);var s=n[0],u=n[1],h=s*bc/180,v=Math.log(Math.tan((90+u)*Math.PI/360))/(Math.PI/180);return v=v*bc/180,a.enable&&(h=Number(h.toFixed(a.decimal)),v=Number(v.toFixed(a.decimal))),n.length===3?[h,v,n[2]]:[h,v]}function cv(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=n[0],s=n[1],u=a/bc*180,h=s/bc*180;return h=180/Math.PI*(2*Math.atan(Math.exp(h*Math.PI/180))-Math.PI/2),l!=null&&(u=Number(u.toFixed(l)),h=Number(h.toFixed(l))),n.length===3?[u,h,n[2]]:[u,h]}function xh(n){if(n==null)throw new Error("lng is required");return(n>180||n<-180)&&(n=n%360,n>180&&(n=-360+n),n<-180&&(n=360+n),n===0&&(n=0)),n}function x(n){if(n==null)throw new Error("lat is required");return(n>90||n<-90)&&(n=n%180,n>90&&(n=-180+n),n<-90&&(n=180+n),n===0&&(n=0)),n}function C(n,l){if(l===!1)return n;var a=xh(n[0]),s=x(n[1]);return s>85&&(s=85),s<-85&&(s=-85),n.length===3?[a,s,n[2]]:[a,s]}function E(n){var l=85.0511287798,a=Math.max(Math.min(l,n[1]),-l),s=256<<20,u=Math.PI/180,h=n[0]*u,v=a*u;v=Math.log(Math.tan(Math.PI/4+v/2));var m=.5/Math.PI,w=.5,A=-.5/Math.PI;return u=.5,h=s*(m*h+w),v=s*(A*v+u),[Math.floor(h),Math.floor(v)]}function M(n){var l=.5/Math.PI,a=.5,s=-.5/Math.PI,u=.5,h=256<<20,v=_slicedToArray(n,2),m=v[0],w=v[1];m=(m/h-a)/l,w=(w/h-u)/s,w=(Math.atan(Math.pow(Math.E,w))-Math.PI/4)*2,u=Math.PI/180;var A=w/u,R=m/u;return[R,A]}function U(n,l){var a=85.0511287798,s=Math.PI/180,u=6378137;return l=Math.max(Math.min(a,l),-a),n*=s,l*=s,l=Math.log(Math.tan(Math.PI/4+l/2)),[n*u,l*u]}function H(n,l){var a=Math.PI/180,s=6378137,u=n/s/a,h=2*(Math.atan(Math.exp(l/s))-Math.PI/4)/a;return[u,h]}function $(n,l,a){var s=ku(l[1]-n[1]),u=ku(l[0]-n[0]),h=ku(n[1]),v=ku(l[1]),m=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(h)*Math.cos(v);return Ol(2*Math.atan2(Math.sqrt(m),Math.sqrt(1-m)),a="meters")}function ht(n){var l=Math.PI/180,a=85.0511287798,s=6378137,u=Math.max(Math.min(a,n[1]),-a),h=Math.sin(u*l),v=s*n[0]*l,m=s*Math.log((1+h)/(1-h))/2;return[v,m]}function Ut(n,l){var a=Math.abs(n[1][1]-n[0][1])*l,s=Math.abs(n[1][0]-n[0][0])*l;return[[n[0][0]-s,n[0][1]-a],[n[1][0]+s,n[1][1]+a]]}function re(n,l){return n[0][0]<=l[0][0]&&n[0][1]<=l[0][1]&&n[1][0]>=l[1][0]&&n[1][1]>=l[1][1]}function Fe(n){return[[n[0],n[1]],[n[2],n[3]]]}function Re(n){var l=De(n,[0,0]);return[n[0]/l,n[1]/l]}function De(n,l){return Math.sqrt(Math.pow(n[0]-l[0],2)+Math.pow(n[1]-l[1],2))}function cr(n,l){return n[0]*l[0]+n[1]*l[1]}function ur(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1])}function Er(n,l){return Math.acos(cr(n,l)/(ur(n)*ur(l)))*180/Math.PI}function nr(n,l){return l[0]>0?l[1]>0?90-Math.atan(l[1]/l[0])*180/Math.PI:90+Math.atan(-l[1]/l[0])*180/Math.PI:l[1]<0?180+(90-Math.atan(l[1]/l[0])*180/Math.PI):270+Math.atan(l[1]/-l[0])*180/Math.PI}function wr(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;if(!(!n||n.length<2)){for(var a=[0,1],s=0,u=[],h=0;h<n.length-1;h++){var v=n[h],m=n[h+1],w=De(v,m);s+=w;var A=[v[0]-m[0],v[1]-m[1]],R=nr(a,A);if(h>0){var B=u[h-1].rotation;B-R>360-B+R&&(R=R+360)}u.push({start:v,end:m,dis:w,rotation:R,duration:0})}return u.map(function(G){G.duration=l*(G.dis/s)}),u}}function Ir(n){if(su(n[0]))return n;if(su(n[0][0]))throw new Error("\u5F53\u524D\u6570\u636E\u4E0D\u652F\u6301\u6807\u6CE8");if(su(n[0][0][0])){var l=n,a=0,s=0,u=0;return l.forEach(function(h){h.forEach(function(v){a+=v[0],s+=v[1],u++})}),[a/u,s/u,0]}else throw new Error("\u5F53\u524D\u6570\u636E\u4E0D\u652F\u6301\u6807\u6CE8")}function $r(n){for(var l=n[0],a=n[1],s=n[0],u=n[1],h=0,v=0,m=0,w=0;w<n.length;w+=2){var A=n[w],R=n[w+1];A&&R&&(l=Math.max(A,l),a=Math.max(R,a),s=Math.min(A,s),u=Math.min(R,u),h+=A,v+=R,m++)}return{center:[h/m,v/m],radius:Math.sqrt(Math.pow(l-s,2)+Math.pow(a-u,2))/2}}function gn(n){return yd(ef([Lp(n)]))}function dn(n){var l=131,a=137,s=0;n+="x";for(var u=Math.floor(9007199254740991/a),h=0;h<n.length;h++)s>u&&(s=Math.floor(s/a)),s=s*l+n.charCodeAt(h);return s}function xn(n){n=n.toString();for(var l=5381,a=n.length;a;)l=l*33^n.charCodeAt(--a);return l>>>0}var Un;(function(n){n["GAODE1.x"]="GAODE1.x",n["GAODE2.x"]="GAODE2.x",n.MAPBOX="MAPBOX",n.DEFAULT="DEFAUlTMAP",n.SIMPLE="SIMPLE",n.GLOBEL="GLOBEL"})(Un||(Un={}));function yi(n,l,a,s,u){var h=arguments.length>5&&arguments[5]!==void 0?arguments[5]:30,v=arguments.length>6?arguments[6]:void 0,m=a;return v&&(m=Math.round(a*(h-1))/(h-1)),s?ua(n,l,m,s,u):ua(n,l,m,.314,u)}function ui(n,l){var a=1-l;return(n[0]*a+n[1]*l)*a+(n[1]*a+n[2]*l)*l}function Bi(n,l){return Math.sqrt(Math.pow(n[0]-l[0],2)+Math.pow(n[1]-l[1],2))}function sa(n,l,a){var s=[l[0]-n[0],l[1]-n[1]],u=Bi(s,[0,0]),h=Math.atan2(s[1],s[0]),v=u/2/Math.cos(a),m=h+a,w=[v*Math.cos(m)+n[0],v*Math.sin(m)+n[1]];return w}function ua(n,l,a,s,u){if(u===Version["GAODE2.x"]){var h=amap2Project(n[0],n[1]),v=amap2Project(l[0],l[1]),m=sa(h,v,s),w=[h[0],m[0],v[0]],A=[h[1],m[1],v[1]];return[].concat(_toConsumableArray(amap2UnProject(ui(w,a),ui(A,a))),[0])}else{var R=sa(n,l,s),B=[n[0],R[0],l[0]],G=[n[1],R[1],l[1]];return[ui(B,a),ui(G,a),0]}}function ha(n,l,a,s,u){var h=arguments.length>5&&arguments[5]!==void 0?arguments[5]:30,v=arguments.length>6?arguments[6]:void 0,m=a;return v&&(m=Math.round(a*29)/29),Ra(n,l,m,u)}function uo(n,l){var a=[l[0]-n[0],l[1]-n[1]],s=calDistance(a,[0,0]),u=Math.atan2(a[1],a[0]),h=.314,v=s/2/Math.cos(h),m=u+h,w=[v*Math.cos(m)+n[0],v*Math.sin(m)+n[1]];return w}function Ni(n,l){var a=1-l;return(n[0]*a+n[1]*l)*a+(n[1]*a+n[2]*l)*l}function La(n,l){var a=[n[0]-l[0],n[1]-l[1]],s=[Math.sin(a[0]/2),Math.sin(a[1]/2)],u=s[1]*s[1]+Math.cos(n[1])*Math.cos(l[1])*s[0]*s[0];return 2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))}function Ra(n,l,a,s){var u=[degreesToRadians(n[0]),degreesToRadians(n[1])],h=[degreesToRadians(l[0]),degreesToRadians(l[1])];if(s==="GAODE2.x"){var v=uo(u,h),m=[u[0],v[0],h[0]],w=[u[1],v[1],h[1]];return[Ni(m,a),Ni(w,a),0]}else{var A=La(u,h);if(Math.abs(A-Math.PI)<.001)return[(1-a)*u[0]+a*h[0],(1-a)*u[1]+a*h[1]];var R=Math.sin((1-a)*A)/Math.sin(A),B=Math.sin(a*A)/Math.sin(A),G=[Math.sin(u[0]),Math.sin(u[1])],j=[Math.cos(u[0]),Math.cos(u[1])],lt=[Math.sin(h[0]),Math.sin(h[1])],ct=[Math.cos(h[0]),Math.cos(h[1])],_t=R*j[1]*j[0]+B*ct[1]*ct[0],Vt=R*j[1]*G[0]+B*ct[1]*lt[0],ce=R*G[1]+B*lt[1];return[radiansToDegrees(Math.atan2(Vt,_t)),radiansToDegrees(Math.atan2(ce,Math.sqrt(_t*_t+Vt*Vt)))]}}function Ta(n,l){for(var a=0,s=[],u=0;u<n.length-1;u++){var h=n[u],v=n[u+1],m=za(h,v),w=a;a+=m,s.push({p1:h,p2:v,totalDistance:a,distance:m,lastTotalDistance:w})}for(var A=a*l,R,B,G=0,j=s;G<j.length;G++){var lt=j[G],ct=lt.totalDistance;if(ct>A){var _t=lt.p1,Vt=lt.p2,ce=(A-lt.lastTotalDistance)/lt.distance,ae=_a(Vt,_t,ce);R=ae[0],B=ae[1];break}}return{lng:R,lat:B,height:0}}function _a(n,l,a){return[n[0]*a+l[0]*(1-a),n[1]*a+l[1]*(1-a)]}function za(n,l){return Math.sqrt(Math.pow(n[0]-l[0],2)+Math.pow(n[1]-l[1],2))}function xa(n,l){var a=l.featureId,s=n.data.dataArray;return typeof a=="number"&&(s=s.filter(function(u){var h=u.id;return h===a})),s.map(function(u){var h=Qs(u,l);return _objectSpread(_objectSpread({},u),h)})}function ga(n,l){return new Promise(function(a){n.inited?a(xa(n,l)):n.once("update",function(){a(xa(n,l))})})}function Qs(n,l){var a=l.offset,s=l.shape,u=l.thetaOffset,h=l.mapVersion,v=l.segmentNumber,m=v===void 0?30:v,w=l.autoFit,A=w===void 0?!0:w,R=n.coordinates;if(s==="line")return pathLineAtOffset(R,a);var B=R[0],G=R[1],j=typeof u=="string"?n[u]||0:u,lt;switch(s){case"arc":lt=arcLineAtOffset;break;case"greatcircle":lt=greatCircleLineAtOffset;break;default:lt=arcLineAtOffset}var ct=lt(B,G,a,j,h,m,A),_t=_slicedToArray(ct,3),Vt=_t[0],ce=_t[1],ae=_t[2];return{lng:Vt,lat:ce,height:ae}}var As=function(){function n(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:50,a=arguments.length>1?arguments[1]:void 0;(0,pt.Z)(this,n),this.limit=l,this.destroy=a||this.defaultDestroy,this.order=[],this.clear()}return(0,et.Z)(n,[{key:"clear",value:function(){var a=this;this.order.forEach(function(s){a.delete(s)}),this.cache={},this.order=[]}},{key:"get",value:function(a){var s=this.cache[a];return s&&(this.deleteOrder(a),this.appendOrder(a)),s}},{key:"set",value:function(a,s){this.cache[a]?(this.delete(a),this.cache[a]=s,this.appendOrder(a)):(Object.keys(this.cache).length===this.limit&&this.delete(this.order[0]),this.cache[a]=s,this.appendOrder(a))}},{key:"delete",value:function(a){var s=this.cache[a];s&&(this.deleteCache(a),this.deleteOrder(a),this.destroy(s,a))}},{key:"deleteCache",value:function(a){delete this.cache[a]}},{key:"deleteOrder",value:function(a){var s=this.order.findIndex(function(u){return u===a});s>=0&&this.order.splice(s,1)}},{key:"appendOrder",value:function(a){this.order.push(a)}},{key:"defaultDestroy",value:function(a,s){return null}}]),n}();function mu(n){if(n.length===0)throw new Error("max requires at least one data point");for(var l=n[0],a=1;a<n.length;a++)n[a]>l&&(l=n[a]);return l*1}function yu(n){if(n.length===0)throw new Error("min requires at least one data point");for(var l=n[0],a=1;a<n.length;a++)n[a]<l&&(l=n[a]);return l*1}function ss(n){if(n.length===0)return 0;for(var l=n[0]*1,a=1;a<n.length;a++)l+=n[a]*1;return l}function Ms(n){if(n.length===0)throw new Error("mean requires at least one data point");return ss(n)/n.length}function el(n){if(n.length===0)throw new Error("mean requires at least one data point");if(n.length<3)return n[0];n.sort();for(var l=n[0],a=NaN,s=0,u=1,h=1;h<n.length+1;h++)n[h]!==l?(u>s&&(s=u,a=l),u=1,l=n[h]):u++;return a*1}var Xs={min:yu,max:mu,mean:Ms,sum:ss,mode:el};function oc(n,l){return n.map(function(a){return a[l]})}function rl(n,l){return Xs[n](l)}function Zo(n,l){return{enable:n,mask:255,func:{cmp:514,ref:l?1:0,mask:255}}}function Yl(n,l){l===void 0&&(l={});var a=Number(n[0]),s=Number(n[1]),u=Number(n[2]),h=Number(n[3]);if(n.length===6)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var v=[a,s],m=[a,h],w=[u,h],A=[u,s];return Os([[v,A,w,m,v]],l.properties,{bbox:n,id:l.id})}var sc;(function(n){n.Realtime="realtime",n.Overlap="overlap",n.Replace="replace"})(sc||(sc={}));var Lu;(function(n){n.Loading="Loading",n.Loaded="Loaded",n.Failure="Failure",n.Cancelled="Cancelled"})(Lu||(Lu={}));var Ec=0,Pf=1,af=2;function uc(n){n.forEach(function(l){l.isCurrent&&(l.isVisible=l.isLoaded)})}function $f(n){n.forEach(function(l){l.properties.state=Ec}),n.forEach(function(l){l.isCurrent&&!Fs(l)&&Cl(l)}),n.forEach(function(l){l.isVisible=Boolean(l.properties.state&af)})}function lc(n){n.forEach(function(a){a.properties.state=Ec}),n.forEach(function(a){a.isCurrent&&Fs(a)});var l=n.slice().sort(function(a,s){return a.z-s.z});l.forEach(function(a){a.isVisible=Boolean(a.properties.state&af),a.children.length&&(a.isVisible||a.properties.state&Pf)?a.children.forEach(function(s){s.properties.state=Pf}):a.isCurrent&&Cl(a)})}function Fs(n){for(;n;){if(n.isLoaded)return n.properties.state|=af,!0;n=n.parent}return!1}function Cl(n){n.children.forEach(function(l){l.isLoaded?l.properties.state|=af:Cl(l)})}var Al,Uc=256,Co=[-1/0,-1/0,1/0,1/0],Fl=.2,nl=5,of=(Al={},(0,W.Z)(Al,sc.Realtime,uc),(0,W.Z)(Al,sc.Overlap,$f),(0,W.Z)(Al,sc.Replace,lc),Al),bh=function(){};function qf(n,l,a){var s=Math.floor((n+180)/360*Math.pow(2,a)),u=Math.floor((1-Math.log(Math.tan(l*Math.PI/180)+1/Math.cos(l*Math.PI/180))/Math.PI)/2*Math.pow(2,a));return[s,u]}function $h(n,l,a){var s=n/Math.pow(2,a)*360-180,u=Math.PI-2*Math.PI*l/Math.pow(2,a),h=180/Math.PI*Math.atan(.5*(Math.exp(u)-Math.exp(-u)));return[s,h]}var Js=function(l,a,s){var u=$h(l,a,s),h=(0,yt.Z)(u,2),v=h[0],m=h[1],w=$h(l+1,a+1,s),A=(0,yt.Z)(w,2),R=A[0],B=A[1];return[v,B,R,m]};function Rl(n){var l=n.zoom,a=n.latLonBounds,s=n.maxZoom,u=s===void 0?1/0:s,h=n.minZoom,v=h===void 0?0:h,m=n.zoomOffset,w=m===void 0?0:m,A=n.extent,R=A===void 0?Co:A,B=Math.ceil(l)+w;if(Number.isFinite(v)&&B<v)return[];Number.isFinite(u)&&B>u&&(B=u);for(var G=(0,yt.Z)(a,4),j=G[0],lt=G[1],ct=G[2],_t=G[3],Vt=[Math.max(j,R[0]),Math.max(lt,R[1]),Math.min(ct,R[2]),Math.min(_t,R[3])],ce=[],ae=qf(Vt[0],Vt[1],B),ze=(0,yt.Z)(ae,2),$e=ze[0],xr=ze[1],Or=qf(Vt[2],Vt[3],B),Zr=(0,yt.Z)(Or,2),Wr=Zr[0],wn=Zr[1],vn=$e;vn<=Wr;vn++)for(var Kn=wn;Kn<=xr;Kn++)ce.push({x:vn,y:Kn,z:B});var Ei=(Wr+$e)/2,qi=(xr+wn)/2,_o=function(Gs,hu){return Math.abs(Gs-Ei)+Math.abs(hu-qi)};return ce.sort(function(jo,Gs){return _o(jo.x,jo.y)-_o(Gs.x,Gs.y)}),ce}var pl=function(l,a,s){var u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,h=Math.pow(2,s),v=h-1,m=h,w=l,A=a;return u&&(w<0?w=w+m:w>v&&(w=w%m)),{warpX:w,warpY:A}};function wc(n){var l=Of();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Of(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Dl=function(n){(0,zt.Z)(a,n);var l=wc(a);function a(s){var u;(0,pt.Z)(this,a),u=l.call(this),(0,W.Z)((0,ut.Z)(u),"tileSize",256),(0,W.Z)((0,ut.Z)(u),"isVisible",!1),(0,W.Z)((0,ut.Z)(u),"isCurrent",!1),(0,W.Z)((0,ut.Z)(u),"isVisibleChange",!1),(0,W.Z)((0,ut.Z)(u),"loadedLayers",0),(0,W.Z)((0,ut.Z)(u),"isLayerLoaded",!1),(0,W.Z)((0,ut.Z)(u),"isLoad",!1),(0,W.Z)((0,ut.Z)(u),"isChildLoad",!1),(0,W.Z)((0,ut.Z)(u),"parent",null),(0,W.Z)((0,ut.Z)(u),"children",[]),(0,W.Z)((0,ut.Z)(u),"data",null),(0,W.Z)((0,ut.Z)(u),"properties",{}),(0,W.Z)((0,ut.Z)(u),"loadDataId",0);var h=s.x,v=s.y,m=s.z,w=s.tileSize,A=s.warp,R=A===void 0?!0:A;return u.x=h,u.y=v,u.z=m,u.warp=R||!0,u.tileSize=w,u}return(0,et.Z)(a,[{key:"isLoading",get:function(){return this.loadStatus===Lu.Loading}},{key:"isLoaded",get:function(){return this.loadStatus===Lu.Loaded}},{key:"isFailure",get:function(){return this.loadStatus===Lu.Failure}},{key:"setTileLayerLoaded",value:function(){this.isLayerLoaded=!0}},{key:"isCancelled",get:function(){return this.loadStatus===Lu.Cancelled}},{key:"isDone",get:function(){return[Lu.Loaded,Lu.Cancelled,Lu.Failure].includes(this.loadStatus)}},{key:"bounds",get:function(){return Js(this.x,this.y,this.z)}},{key:"bboxPolygon",get:function(){var u=(0,yt.Z)(this.bounds,4),h=u[0],v=u[1],m=u[2],w=u[3],A=[(m-h)/2,(w-v)/2],R=Yl(this.bounds,{properties:{key:this.key,id:this.key,bbox:this.bounds,center:A,meta:`
|
|
`.concat(this.key,`
|
|
`)}});return R}},{key:"key",get:function(){var u="".concat(this.x,"_").concat(this.y,"_").concat(this.z);return u}},{key:"layerLoad",value:function(){this.loadedLayers++,this.emit("layerLoaded")}},{key:"loadData",value:function(){var s=(0,J.Z)(ot().mark(function h(v){var m,w,A,R,B,G,j,lt,ct,_t,Vt,ce,ae,ze,$e,xr,Or;return ot().wrap(function(Wr){for(;;)switch(Wr.prev=Wr.next){case 0:return m=v.getData,w=v.onLoad,A=v.onError,this.loadDataId++,R=this.loadDataId,this.isLoading&&this.abortLoad(),this.abortController=new AbortController,this.loadStatus=Lu.Loading,B=null,Wr.prev=7,j=this.x,lt=this.y,ct=this.z,_t=this.bounds,Vt=this.tileSize,ce=this.warp,ae=pl(j,lt,ct,ce),ze=ae.warpX,$e=ae.warpY,xr=this.abortController.signal,Or={x:ze,y:$e,z:ct,bounds:_t,tileSize:Vt,signal:xr,warp:ce},Wr.next=14,m(Or,this);case 14:B=Wr.sent,Wr.next=20;break;case 17:Wr.prev=17,Wr.t0=Wr.catch(7),G=Wr.t0;case 20:if(R===this.loadDataId){Wr.next=22;break}return Wr.abrupt("return");case 22:if(!(this.isCancelled&&!B)){Wr.next=24;break}return Wr.abrupt("return");case 24:if(!(G||!B)){Wr.next=28;break}return this.loadStatus=Lu.Failure,A(G,this),Wr.abrupt("return");case 28:this.loadStatus=Lu.Loaded,this.data=B,w(this);case 31:case"end":return Wr.stop()}},h,this,[[7,17]])}));function u(h){return s.apply(this,arguments)}return u}()},{key:"reloadData",value:function(u){this.isLoading&&this.abortLoad(),this.loadData(u)}},{key:"abortLoad",value:function(){this.isLoaded||this.isCancelled||(this.loadStatus=Lu.Cancelled,this.abortController.abort(),this.xhrCancel&&this.xhrCancel())}}]),a}(be.EventEmitter),uu=function(l,a){var s=Fe(l),u=Ut(s,a),h=360*3-180,v=85.0511287798065,m=[Math.max(u[0][0],-h),Math.max(u[0][1],-v),Math.min(u[1][0],h),Math.min(u[1][1],v)];return m},Kf=function(l,a){var s=Fe(l),u=Fe(a),h=re(s,u);return h};function cc(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=Sc(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,u=function(){};return{s:u,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function Sc(n,l){if(n){if(typeof n=="string")return Fp(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Fp(n,l)}}function Fp(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a<l;a++)s[a]=n[a];return s}function Jv(n){var l=t0();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function t0(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Eh=function(n){(0,zt.Z)(a,n);var l=Jv(a);function a(s){var u;return(0,pt.Z)(this,a),u=l.call(this),(0,W.Z)((0,ut.Z)(u),"currentTiles",[]),(0,W.Z)((0,ut.Z)(u),"cacheTiles",new Map),(0,W.Z)((0,ut.Z)(u),"throttleUpdate",(0,Fn.throttle)(function(h,v){u.update(h,v)},16)),(0,W.Z)((0,ut.Z)(u),"onTileLoad",function(h){u.emit("tile-loaded",h),u.updateTileVisible()}),(0,W.Z)((0,ut.Z)(u),"onTileError",function(h,v){u.emit("tile-error",{error:h,tile:v}),u.updateTileVisible()}),(0,W.Z)((0,ut.Z)(u),"onTileUnload",function(h){u.emit("tile-unload",h)}),u.options={tileSize:256,minZoom:0,maxZoom:1/0,zoomOffset:0,extent:Co,getTileData:bh,warp:!0,updateStrategy:sc.Overlap},u.updateOptions(s),u}return(0,et.Z)(a,[{key:"isLoaded",get:function(){return this.currentTiles.every(function(u){return u.isDone})}},{key:"tiles",get:function(){var u=Array.from(this.cacheTiles.values()).sort(function(h,v){return h.z-v.z});return u}},{key:"updateOptions",value:function(u){var h=u.minZoom===void 0?this.options.minZoom:Math.ceil(u.minZoom),v=u.maxZoom===void 0?this.options.maxZoom:Math.floor(u.maxZoom);this.options=(0,K.Z)((0,K.Z)((0,K.Z)({},this.options),u),{},{minZoom:h,maxZoom:v})}},{key:"update",value:function(u,h){var v=this,m=Math.max(0,Math.ceil(u));if(!(this.lastViewStates&&this.lastViewStates.zoom===m&&Kf(this.lastViewStates.latLonBoundsBuffer,h))){var w=uu(h,Fl);this.lastViewStates={zoom:m,latLonBounds:h,latLonBoundsBuffer:w};var A=!1,R=this.getTileIndices(m,w).filter(function(B){return v.options.warp||B.x>=0&&B.x<Math.pow(2,m)});this.currentTiles=R.map(function(B){var G=B.x,j=B.y,lt=B.z,ct=v.getTile(G,j,lt);if(ct){var _t,Vt,ce=((_t=ct)===null||_t===void 0?void 0:_t.isFailure)||((Vt=ct)===null||Vt===void 0?void 0:Vt.isCancelled);return ce&&ct.loadData({getData:v.options.getTileData,onLoad:v.onTileLoad,onError:v.onTileError}),ct}return ct=v.createTile(G,j,lt),A=!0,ct}),A&&this.resizeCacheTiles(),this.updateTileVisible(),this.pruneRequests()}}},{key:"reloadAll",value:function(){var u=cc(this.cacheTiles),h;try{for(u.s();!(h=u.n()).done;){var v=(0,yt.Z)(h.value,2),m=v[0],w=v[1];this.currentTiles.includes(w)||(this.cacheTiles.delete(m),this.onTileUnload(w)),this.onTileUnload(w),w.loadData({getData:this.options.getTileData,onLoad:this.onTileLoad,onError:this.onTileError})}}catch(A){u.e(A)}finally{u.f()}}},{key:"pruneRequests",value:function(){var u=[],h=cc(this.cacheTiles.values()),v;try{for(h.s();!(v=h.n()).done;){var m=v.value;m.isLoading&&!m.isCurrent&&!m.isVisible&&u.push(m)}}catch(A){h.e(A)}finally{h.f()}for(;u.length>0;){var w=u.shift();w.abortLoad()}}},{key:"getTileByLngLat",value:function(u,h,v){var m=this.options.zoomOffset,w=Math.ceil(v)+m,A=qf(u,h,w),R=this.tiles.filter(function(B){return B.key==="".concat(A[0],"_").concat(A[1],"_").concat(w)});return R[0]}},{key:"destroy",value:function(){var u=cc(this.cacheTiles.values()),h;try{for(u.s();!(h=u.n()).done;){var v=h.value;v.isLoading&&v.abortLoad()}}catch(m){u.e(m)}finally{u.f()}this.cacheTiles.clear(),this.currentTiles=[],this.removeAllListeners()}},{key:"updateTileVisible",value:function(){var u=this.options.updateStrategy,h=new Map,v=cc(this.cacheTiles.values()),m;try{for(v.s();!(m=v.n()).done;){var w=m.value;h.set(w.key,w.isVisible),w.isCurrent=!1,w.isVisible=!1}}catch(lt){v.e(lt)}finally{v.f()}var A=cc(this.currentTiles),R;try{for(A.s();!(R=A.n()).done;){var B=R.value;B.isCurrent=!0,B.isVisible=!0}}catch(lt){A.e(lt)}finally{A.f()}var G=Array.from(this.cacheTiles.values());typeof u=="function"?u(G):of[u](G);var j=!1;Array.from(this.cacheTiles.values()).forEach(function(lt){lt.isVisible!==h.get(lt.key)?(lt.isVisibleChange=!0,j=!0):lt.isVisibleChange=!1}),j&&this.emit("tile-update")}},{key:"getTileIndices",value:function(u,h){var v=this.options,m=v.tileSize,w=v.extent,A=v.zoomOffset,R=Math.floor(this.options.maxZoom),B=Math.ceil(this.options.minZoom),G=Rl({maxZoom:R,minZoom:B,zoomOffset:A,tileSize:m,zoom:u,latLonBounds:h,extent:w});return G}},{key:"getTileId",value:function(u,h,v){var m="".concat(u,",").concat(h,",").concat(v);return m}},{key:"getTile",value:function(u,h,v){var m=this.getTileId(u,h,v),w=this.cacheTiles.get(m);return w}},{key:"createTile",value:function(u,h,v){var m=this.getTileId(u,h,v),w=new Dl({x:u,y:h,z:v,tileSize:this.options.tileSize,warp:this.options.warp});return this.cacheTiles.set(m,w),w.loadData({getData:this.options.getTileData,onLoad:this.onTileLoad,onError:this.onTileError}),w}},{key:"resizeCacheTiles",value:function(){var u=nl*this.currentTiles.length,h=this.cacheTiles.size>u;if(h){var v=cc(this.cacheTiles),m;try{for(v.s();!(m=v.n()).done;){var w=(0,yt.Z)(m.value,2),A=w[0],R=w[1];if(!R.isVisible&&!this.currentTiles.includes(R)&&(this.cacheTiles.delete(A),this.onTileUnload(R)),this.cacheTiles.size<=u)break}}catch(B){v.e(B)}finally{v.f()}}this.rebuildTileTree()}},{key:"rebuildTileTree",value:function(){var u=cc(this.cacheTiles.values()),h;try{for(u.s();!(h=u.n()).done;){var v=h.value;v.parent=null,v.children.length=0}}catch(B){u.e(B)}finally{u.f()}var m=cc(this.cacheTiles.values()),w;try{for(m.s();!(w=m.n()).done;){var A=w.value,R=this.getNearestAncestor(A.x,A.y,A.z);A.parent=R,R!=null&&R.children&&R.children.push(A)}}catch(B){m.e(B)}finally{m.f()}}},{key:"getNearestAncestor",value:function(u,h,v){for(;v>this.options.minZoom;){u=Math.floor(u/2),h=Math.floor(h/2),v=v-1;var m=this.getTile(u,h,v);if(m)return m}return null}}]),a}(Me());function _d(n){return/(?=.*{z})(?=.*{x})(?=.*({y}|{-y}))/.test(n)}function fv(n){var l=[],a=/\{([a-z])-([a-z])\}/.exec(n);if(a){var s=a[1].charCodeAt(0),u=a[2].charCodeAt(0),h;for(h=s;h<=u;++h)l.push(n.replace(a[0],String.fromCharCode(h)));return l}if(a=/\{(\d+)-(\d+)\}/.exec(n),a){for(var v=parseInt(a[2],10),m=parseInt(a[1],10);m<=v;m++)l.push(n.replace(a[0],m.toString()));return l}return l.push(n),l}function Rp(n,l){if(!n||!n.length)throw new Error("url is not allowed to be empty");var a=l.x,s=l.y,u=l.z,h=fv(n),v=Math.abs(a+s)%h.length,m=h[v];return m.replace(/\{x\}/g,a.toString()).replace(/\{y\}/g,s.toString()).replace(/\{z\}/g,u.toString()).replace(/\{bbox\}/g,Js(a,s,u).join(",")).replace(/\{-y\}/g,(Math.pow(2,u)-s-1).toString())}function Qf(n,l){var a=l.x,s=l.y,u=l.z,h=l.layer,v=l.version,m=v===void 0?"1.0.0":v,w=l.style,A=w===void 0?"default":w,R=l.format,B=l.service,G=B===void 0?"WMTS":B,j=l.tileMatrixset,lt="".concat(n,"&SERVICE=").concat(G,"&REQUEST=GetTile&VERSION=").concat(m,"&LAYER=").concat(h,"&STYLE=").concat(A,"&TILEMATRIXSET=").concat(j,"&FORMAT=").concat(R,"&TILECOL=").concat(a,"&TILEROW=").concat(s,"&TILEMATRIX=").concat(u);return lt}function Ff(n,l){if(!n)throw new Error(l||"web worker helper assertion failed.")}var wh={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,document:typeof document!="undefined"&&document},xd=wh.self||wh.window||{},bd=wh.window||wh.self||{},e0=wh.self||wh.window||{},fy=wh.document||{},hy=typeof importScripts=="function",j0=typeof window!="undefined"&&typeof window.orientation!="undefined",r0=function(){function n(l,a){var s=this;this.name=l,this.workerThread=a,this.isRunning=!0,this.resolve=function(){},this.reject=function(){},this.result=new Promise(function(u,h){s.resolve=u,s.reject=h})}return n.prototype.postMessage=function(l,a){this.workerThread.postMessage({source:"Main thread",type:l,payload:a})},n.prototype.done=function(l){Ff(this.isRunning,"WorkerJob isRunning false."),this.isRunning=!1,this.resolve(l)},n.prototype.error=function(l){Ff(this.isRunning,"WorkerJob isRunning false."),this.isRunning=!1,this.reject(l)},n}(),Og=r0,qh=new Map;function W0(n){Ff(n.source&&!n.url||!n.source&&n.url);var l=qh.get(n.source||n.url);return l||(n.url&&(l=tu(n.url),qh.set(n.url,l)),n.source&&(l=hv(n.source),qh.set(n.source,l))),Ff(l),l}function tu(n){if(!n.startsWith("http"))return n;var l=X0(n);return hv(l)}function hv(n){var l=new Blob([n],{type:"application/javascript"});return URL.createObjectURL(l)}function X0(n){return`try {
|
|
importScripts('`+n+`');
|
|
} catch (error) {
|
|
console.error(error);
|
|
throw error;
|
|
}`}function Dp(n,l,a){l===void 0&&(l=!0);var s=a||new Set;if(n){if(Sh(n))s.add(n);else if(Sh(n.buffer))s.add(n.buffer);else if(!ArrayBuffer.isView(n)){if(l&&typeof n=="object")for(var u in n)Dp(n[u],l,s)}}return a===void 0?Array.from(s):[]}function Sh(n){return n?n instanceof ArrayBuffer||typeof MessagePort!="undefined"&&n instanceof MessagePort||typeof ImageBitmap!="undefined"&&n instanceof ImageBitmap||typeof OffscreenCanvas!="undefined"&&n instanceof OffscreenCanvas:!1}var Kh=function(){},pv=function(){function n(l){this.terminated=!1,this.loadableURL="";var a=l.name,s=l.source,u=l.url;Ff(s||u),this.name=a,this.source=s,this.url=u,this.onMessage=Kh,this.onError=function(h){return console.log(h)},this.worker=this.createBrowserWorker()}return n.isSupported=function(){return typeof Worker!="undefined"},n.prototype.destroy=function(){this.onMessage=Kh,this.onError=Kh,this.worker.terminate(),this.terminated=!0},Object.defineProperty(n.prototype,"isRunning",{get:function(){return Boolean(this.onMessage)},enumerable:!1,configurable:!0}),n.prototype.postMessage=function(l,a){a=a||Dp(l),this.worker.postMessage(l,a)},n.prototype.getErrorFromErrorEvent=function(l){var a="Failed to load ";return a+="worker "+this.name+" from "+this.url+". ",l.message&&(a+=l.message+" in "),l.lineno&&(a+=":"+l.lineno+":"+l.colno),new Error(a)},n.prototype.createBrowserWorker=function(){var l=this;this.loadableURL=W0({source:this.source,url:this.url});var a=new Worker(this.loadableURL,{name:this.name});return a.onmessage=function(s){s.data?l.onMessage(s.data):l.onError(new Error("No data received"))},a.onerror=function(s){l.onError(l.getErrorFromErrorEvent(s)),l.terminated=!0},a.onmessageerror=function(s){return console.error("worker "+l.name+", message error: "+s)},a},n}(),Bp=pv,sf=function(){return sf=Object.assign||function(n){for(var l,a=1,s=arguments.length;a<s;a++){l=arguments[a];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(n[u]=l[u])}return n},sf.apply(this,arguments)},Np=function(n,l,a,s){function u(h){return h instanceof a?h:new a(function(v){v(h)})}return new(a||(a=Promise))(function(h,v){function m(R){try{A(s.next(R))}catch(B){v(B)}}function w(R){try{A(s.throw(R))}catch(B){v(B)}}function A(R){R.done?h(R.value):u(R.value).then(m,w)}A((s=s.apply(n,l||[])).next())})},uf=function(n,l){var a={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},s,u,h,v;return v={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function m(A){return function(R){return w([A,R])}}function w(A){if(s)throw new TypeError("Generator is already executing.");for(;a;)try{if(s=1,u&&(h=A[0]&2?u.return:A[0]?u.throw||((h=u.return)&&h.call(u),0):u.next)&&!(h=h.call(u,A[1])).done)return h;switch(u=0,h&&(A=[A[0]&2,h.value]),A[0]){case 0:case 1:h=A;break;case 4:return a.label++,{value:A[1],done:!1};case 5:a.label++,u=A[1],A=[0];continue;case 7:A=a.ops.pop(),a.trys.pop();continue;default:if(h=a.trys,!(h=h.length>0&&h[h.length-1])&&(A[0]===6||A[0]===2)){a=0;continue}if(A[0]===3&&(!h||A[1]>h[0]&&A[1]<h[3])){a.label=A[1];break}if(A[0]===6&&a.label<h[1]){a.label=h[1],h=A;break}if(h&&a.label<h[2]){a.label=h[2],a.ops.push(A);break}h[2]&&a.ops.pop(),a.trys.pop();continue}A=l.call(n,a)}catch(R){A=[6,R],u=0}finally{s=h=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}},dv=function(){function n(l){this.name="unnamed",this.maxConcurrency=1,this.maxMobileConcurrency=1,this.onDebug=function(){},this.reuseWorkers=!0,this.props={},this.jobQueue=[],this.idleQueue=[],this.count=0,this.isDestroyed=!1,this.source=l.source,this.url=l.url,this.setProps(l)}return n.prototype.destroy=function(){this.idleQueue.forEach(function(l){return l.destroy()}),this.isDestroyed=!0},n.prototype.setProps=function(l){this.props=sf(sf({},this.props),l),l.name!==void 0&&(this.name=l.name),l.maxConcurrency!==void 0&&(this.maxConcurrency=l.maxConcurrency),l.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=l.maxMobileConcurrency),l.reuseWorkers!==void 0&&(this.reuseWorkers=l.reuseWorkers),l.onDebug!==void 0&&(this.onDebug=l.onDebug)},n.prototype.startJob=function(l,a,s){return a===void 0&&(a=function(u,h,v){return u.done(v)}),s===void 0&&(s=function(u,h){return u.error(h)}),Np(this,void 0,void 0,function(){var u,h=this;return uf(this,function(v){switch(v.label){case 0:return u=new Promise(function(m){return h.jobQueue.push({name:l,onMessage:a,onError:s,onStart:m}),h}),this.startQueuedJob(),[4,u];case 1:return[2,v.sent()]}})})},n.prototype.startQueuedJob=function(){return Np(this,void 0,void 0,function(){var l,a,s;return uf(this,function(u){switch(u.label){case 0:if(!this.jobQueue.length)return[2];if(l=this.getAvailableWorker(),!l)return[2];if(a=this.jobQueue.shift(),!a)return[3,4];this.onDebug({message:"Starting job",name:a.name,backlog:this.jobQueue.length,workerThread:l}),s=new Og(a.name,l),l.onMessage=function(h){return a.onMessage(s,h.type,h.payload)},l.onError=function(h){return a.onError(s,h)},a.onStart(s),u.label=1;case 1:return u.trys.push([1,,3,4]),[4,s.result];case 2:return u.sent(),[3,4];case 3:return this.returnWorkerToQueue(l),[7];case 4:return[2]}})})},n.prototype.returnWorkerToQueue=function(l){var a=this.isDestroyed||!this.reuseWorkers||this.count>this.getMaxConcurrency();a?(l.destroy(),this.count--):this.idleQueue.push(l),this.isDestroyed||this.startQueuedJob()},n.prototype.getAvailableWorker=function(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this.getMaxConcurrency()){this.count++;var l=this.name.toLowerCase()+" (#"+this.count+" of "+this.maxConcurrency+")";return new Bp({name:l,source:this.source,url:this.url})}return null},n.prototype.getMaxConcurrency=function(){return j0?this.maxMobileConcurrency:this.maxConcurrency},n}(),Rf=dv,Ch=function(){return Ch=Object.assign||function(n){for(var l,a=1,s=arguments.length;a<s;a++){l=arguments[a];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(n[u]=l[u])}return n},Ch.apply(this,arguments)},zp=function(n){var l=typeof Symbol=="function"&&Symbol.iterator,a=l&&n[l],s=0;if(a)return a.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},vv={maxConcurrency:3,maxMobileConcurrency:1,onDebug:function(){},reuseWorkers:!0},Up=function(){function n(l){this.workerPools=new Map,this.props=Ch({},vv),this.setProps(l),this.workerPools=new Map}return n.isSupported=function(){return Bp.isSupported()},n.getWorkerFarm=function(l){return l===void 0&&(l={}),n.workerFarm=n.workerFarm||new n({}),n.workerFarm.setProps(l),n.workerFarm},n.prototype.destroy=function(){var l,a;try{for(var s=zp(this.workerPools.values()),u=s.next();!u.done;u=s.next()){var h=u.value;h.destroy()}}catch(v){l={error:v}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(l)throw l.error}}},n.prototype.setProps=function(l){var a,s;this.props=Ch(Ch({},this.props),l);try{for(var u=zp(this.workerPools.values()),h=u.next();!h.done;h=u.next()){var v=h.value;v.setProps(this.getWorkerPoolProps())}}catch(m){a={error:m}}finally{try{h&&!h.done&&(s=u.return)&&s.call(u)}finally{if(a)throw a.error}}},n.prototype.getWorkerPool=function(l){var a=l.name,s=l.source,u=l.url,h=this.workerPools.get(a);return h||(h=new Rf({name:a,source:s,url:u}),h.setProps(this.getWorkerPoolProps()),this.workerPools.set(a,h)),h},n.prototype.getWorkerPoolProps=function(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}},n}(),Zp=Up,dl=new Map,Ed=function(){function n(){}return Object.defineProperty(n,"onmessage",{set:function(l){self.onmessage=function(a){if(Vp(a)){var s=a.data,u=s.type,h=s.payload;l(u,h)}}},enumerable:!1,configurable:!0}),n.addEventListener=function(l){var a=dl.get(l);a||(a=function(s){if(Vp(s)){var u=s.data,h=u.type,v=u.payload;l(h,v)}}),self.addEventListener("message",a)},n.removeEventListener=function(l){var a=dl.get(l);dl.delete(l),self.removeEventListener("message",a)},n.postMessage=function(l,a){if(self){var s={source:"Worker thread",type:l,payload:a},u=Dp(a);self.postMessage(s,u)}},n}(),Bl=Ed;function Vp(n){var l=n.type,a=n.data;return l==="message"&&a&&typeof a.source=="string"&&a.source==="Main thread"}function wd(n){return JSON.parse(Sd(n))}function Sd(n){var l=new Set;return JSON.stringify(n,function(a,s){if(typeof s=="object"&&s!==null){if(l.has(s))try{return JSON.parse(JSON.stringify(s))}catch(u){return}l.add(s)}return s})}function bs(n){return""+n.name}function Cc(n,l){l===void 0&&(l={});var a=l[n.id]||{},s=n.name+".worker.js",u=a.workerUrl;return l._workerType==="test"&&(u=n.module+"/dist/"+s),u||(u="https://unpkg.com/"+n.module+"/dist/"+s),assert(u),u}var gv=function(n,l,a,s){function u(h){return h instanceof a?h:new a(function(v){v(h)})}return new(a||(a=Promise))(function(h,v){function m(R){try{A(s.next(R))}catch(B){v(B)}}function w(R){try{A(s.throw(R))}catch(B){v(B)}}function A(R){R.done?h(R.value):u(R.value).then(m,w)}A((s=s.apply(n,l||[])).next())})},Jf=function(n,l){var a={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},s,u,h,v;return v={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function m(A){return function(R){return w([A,R])}}function w(A){if(s)throw new TypeError("Generator is already executing.");for(;a;)try{if(s=1,u&&(h=A[0]&2?u.return:A[0]?u.throw||((h=u.return)&&h.call(u),0):u.next)&&!(h=h.call(u,A[1])).done)return h;switch(u=0,h&&(A=[A[0]&2,h.value]),A[0]){case 0:case 1:h=A;break;case 4:return a.label++,{value:A[1],done:!1};case 5:a.label++,u=A[1],A=[0];continue;case 7:A=a.ops.pop(),a.trys.pop();continue;default:if(h=a.trys,!(h=h.length>0&&h[h.length-1])&&(A[0]===6||A[0]===2)){a=0;continue}if(A[0]===3&&(!h||A[1]>h[0]&&A[1]<h[3])){a.label=A[1];break}if(A[0]===6&&a.label<h[1]){a.label=h[1],h=A;break}if(h&&a.label<h[2]){a.label=h[2],a.ops.push(A);break}h[2]&&a.ops.pop(),a.trys.pop();continue}A=l.call(n,a)}catch(R){A=[6,R],u=0}finally{s=h=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};function Fg(n,l){return WorkerFarm.isSupported()?n.worker&&(l==null?void 0:l.worker):!1}function Rg(n,l,a,s){return a===void 0&&(a={}),s===void 0&&(s={}),gv(this,void 0,void 0,function(){var u,h,v,m,w,A,R,B;return Jf(this,function(G){switch(G.label){case 0:return u=getWorkerName(n),h=getWorkerURL(n,a),v=WorkerFarm.getWorkerFarm(a),m=v.getWorkerPool({name:u,url:h}),w=a.jobName||n.name,[4,m.startJob(w,Gp.bind(null,s))];case 1:return A=G.sent(),R=removeNontransferableOptions(a),A.postMessage("process",{input:l,options:R}),[4,A.result];case 2:return B=G.sent(),[2,B.result]}})})}function Gp(n,l,a,s){return gv(this,void 0,void 0,function(){var u,h,v,m,w,A,R;return Jf(this,function(B){switch(B.label){case 0:switch(u=a,u){case"done":return[3,1];case"error":return[3,2];case"process":return[3,3]}return[3,8];case 1:return l.done(s),[3,9];case 2:return l.error(new Error(s.error)),[3,9];case 3:h=s.id,v=s.input,m=s.options,B.label=4;case 4:return B.trys.push([4,6,,7]),n.process?[4,n.process(v,m)]:(l.postMessage("error",{id:h,error:"Worker not set up to process on main thread"}),[2]);case 5:return w=B.sent(),l.postMessage("done",{id:h,result:w}),[3,7];case 6:return A=B.sent(),R=A instanceof Error?A.message:"unknown error",l.postMessage("error",{id:h,error:R}),[3,7];case 7:return[3,9];case 8:console.warn("process-on-worker: unknown message "+a),B.label=9;case 9:return[2]}})})}var Ac=function(){function n(){this._values=[],this._settlers=[],this._closed=!1}return n.prototype[Symbol.asyncIterator]=function(){return this},n.prototype.push=function(l){return this.enqueue(l)},n.prototype.enqueue=function(l){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");var a=this._settlers.shift();l instanceof Error?a.reject(l):a.resolve({value:l})}else this._values.push(l)},n.prototype.close=function(){for(;this._settlers.length>0;){var l=this._settlers.shift();l.resolve({done:!0})}this._closed=!0},n.prototype.next=function(){var l=this;if(this._values.length>0){var a=this._values.shift();return a instanceof Error?Promise.reject(a):Promise.resolve({done:!1,value:a})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0,value:void 0})}return new Promise(function(s,u){l._settlers.push({resolve:s,reject:u})})},n}(),$l=Ac,lf=function(n,l,a,s){function u(h){return h instanceof a?h:new a(function(v){v(h)})}return new(a||(a=Promise))(function(h,v){function m(R){try{A(s.next(R))}catch(B){v(B)}}function w(R){try{A(s.throw(R))}catch(B){v(B)}}function A(R){R.done?h(R.value):u(R.value).then(m,w)}A((s=s.apply(n,l||[])).next())})},Pu=function(n,l){var a={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},s,u,h,v;return v={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function m(A){return function(R){return w([A,R])}}function w(A){if(s)throw new TypeError("Generator is already executing.");for(;a;)try{if(s=1,u&&(h=A[0]&2?u.return:A[0]?u.throw||((h=u.return)&&h.call(u),0):u.next)&&!(h=h.call(u,A[1])).done)return h;switch(u=0,h&&(A=[A[0]&2,h.value]),A[0]){case 0:case 1:h=A;break;case 4:return a.label++,{value:A[1],done:!1};case 5:a.label++,u=A[1],A=[0];continue;case 7:A=a.ops.pop(),a.trys.pop();continue;default:if(h=a.trys,!(h=h.length>0&&h[h.length-1])&&(A[0]===6||A[0]===2)){a=0;continue}if(A[0]===3&&(!h||A[1]>h[0]&&A[1]<h[3])){a.label=A[1];break}if(A[0]===6&&a.label<h[1]){a.label=h[1],h=A;break}if(h&&a.label<h[2]){a.label=h[2],a.ops.push(A);break}h[2]&&a.ops.pop(),a.trys.pop();continue}A=l.call(n,a)}catch(R){A=[6,R],u=0}finally{s=h=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}},Df=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=n[Symbol.asyncIterator],a;return l?l.call(n):(n=typeof __values=="function"?__values(n):n[Symbol.iterator](),a={},s("next"),s("throw"),s("return"),a[Symbol.asyncIterator]=function(){return this},a);function s(h){a[h]=n[h]&&function(v){return new Promise(function(m,w){v=n[h](v),u(m,w,v.done,v.value)})}}function u(h,v,m,w){Promise.resolve(w).then(function(A){h({value:A,done:m})},v)}},Y0=0,Ah,cf;function th(n,l){var a=this;if(typeof self!="undefined"){var s={process:Qh};Bl.onmessage=function(u,h){return lf(a,void 0,void 0,function(){var v,m,w,A,R,B,G,j,lt,ct,_t;return Pu(this,function(Vt){switch(Vt.label){case 0:switch(Vt.trys.push([0,19,,20]),v=u,v){case"process":return[3,1];case"process-in-batches":return[3,3];case"input-batch":return[3,16];case"input-done":return[3,17]}return[3,18];case 1:if(!n)throw new Error("Worker does not support atomic processing");return[4,n(h.input,h.options||{},s)];case 2:return m=Vt.sent(),Bl.postMessage("done",{result:m}),[3,18];case 3:if(!l)throw new Error("Worker does not support batched processing");Ah=new $l,cf=h.options||{},w=l(Ah,cf,s),Vt.label=4;case 4:Vt.trys.push([4,9,10,15]),A=Df(w),Vt.label=5;case 5:return[4,A.next()];case 6:if(R=Vt.sent(),!!R.done)return[3,8];B=R.value,Bl.postMessage("output-batch",{result:B}),Vt.label=7;case 7:return[3,5];case 8:return[3,15];case 9:return G=Vt.sent(),ct={error:G},[3,15];case 10:return Vt.trys.push([10,,13,14]),R&&!R.done&&(_t=A.return)?[4,_t.call(A)]:[3,12];case 11:Vt.sent(),Vt.label=12;case 12:return[3,14];case 13:if(ct)throw ct.error;return[7];case 14:return[7];case 15:return Bl.postMessage("done",{}),[3,18];case 16:return Ah.push(h.input),[3,18];case 17:return Ah.close(),[3,18];case 18:return[3,20];case 19:return j=Vt.sent(),lt=j instanceof Error?j.message:"",Bl.postMessage("error",{error:lt}),[3,20];case 20:return[2]}})})}}}function Qh(n,l){return l===void 0&&(l={}),new Promise(function(a,s){var u=Y0++,h=function(m,w){if(w.id===u)switch(m){case"done":Bl.removeEventListener(h),a(w.result);break;case"error":Bl.removeEventListener(h),s(w.error);break;default:}};Bl.addEventListener(h);var v={id:u,input:n,options:l};Bl.postMessage("process",v)})}var fc=function(n,l,a,s){function u(h){return h instanceof a?h:new a(function(v){v(h)})}return new(a||(a=Promise))(function(h,v){function m(R){try{A(s.next(R))}catch(B){v(B)}}function w(R){try{A(s.throw(R))}catch(B){v(B)}}function A(R){R.done?h(R.value):u(R.value).then(m,w)}A((s=s.apply(n,l||[])).next())})},Cd=function(n,l){var a={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},s,u,h,v;return v={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function m(A){return function(R){return w([A,R])}}function w(A){if(s)throw new TypeError("Generator is already executing.");for(;a;)try{if(s=1,u&&(h=A[0]&2?u.return:A[0]?u.throw||((h=u.return)&&h.call(u),0):u.next)&&!(h=h.call(u,A[1])).done)return h;switch(u=0,h&&(A=[A[0]&2,h.value]),A[0]){case 0:case 1:h=A;break;case 4:return a.label++,{value:A[1],done:!1};case 5:a.label++,u=A[1],A=[0];continue;case 7:A=a.ops.pop(),a.trys.pop();continue;default:if(h=a.trys,!(h=h.length>0&&h[h.length-1])&&(A[0]===6||A[0]===2)){a=0;continue}if(A[0]===3&&(!h||A[1]>h[0]&&A[1]<h[3])){a.label=A[1];break}if(A[0]===6&&a.label<h[1]){a.label=h[1],h=A;break}if(h&&a.label<h[2]){a.label=h[2],a.ops.push(A);break}h[2]&&a.ops.pop(),a.trys.pop();continue}A=l.call(n,a)}catch(R){A=[6,R],u=0}finally{s=h=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}},Ad={};function n0(n,l,a){return l===void 0&&(l=null),a===void 0&&(a={}),fc(this,void 0,void 0,function(){return Cd(this,function(s){switch(s.label){case 0:return l&&(n=i0(n,l,a)),Ad[n]=Ad[n]||Vo(n),[4,Ad[n]];case 1:return[2,s.sent()]}})})}function i0(n,l,a){if(n.startsWith("http"))return n;var s=a.modules||{};return s[n]?s[n]:a.CDN?(assert(a.CDN.startsWith("http")),a.CDN+"/"+l+"/dist/libs/"+n):isWorker?"../src/libs/"+n:"modules/"+l+"/src/libs/"+n}function Vo(n){return fc(this,void 0,void 0,function(){var l,a,s;return Cd(this,function(u){switch(u.label){case 0:return n.endsWith("wasm")?[4,fetch(n)]:[3,3];case 1:return l=u.sent(),[4,l.arrayBuffer()];case 2:return[2,u.sent()];case 3:return isWorker?[2,importScripts(n)]:[4,fetch(n)];case 4:return a=u.sent(),[4,a.text()];case 5:return s=u.sent(),[2,Th(s,n)]}})})}function Th(n,l){if(isWorker)return eval.call(global,n),null;var a=document.createElement("script");a.id=l;try{a.appendChild(document.createTextNode(n))}catch(s){a.text=n}return document.body.appendChild(a),null}var _u="0.0.3",vl={id:"null",name:"null",module:"web-worker-helper",options:{}};function Td(n){var l=n.color;return!l||!l.length?[1,1,1,1]:l}function mv(n,l,a){return a.length===2?[a[0],a[1],0]:[a[0],a[1],a[2]]}function a0(n){var l=n.filter;return l?[1]:[0]}function o0(n,l){return[l]}var yv=nt(89675),eh=nt.n(yv),ai=nt(1153),Md=ai.Ue(),Jh=ai.Ue(),xu=ai.Ue(),ff=ai.Ue(),Tc=ai.Ue();function Qo(n,l,a,s,u){ai.IH(n,a,s),ai.Fv(n,n),l=ai.al(-n[1],n[0]);var h=ai.al(-a[1],a[0]);return[u/ai.AK(l,h),l]}function hf(n,l){return ai.t8(n,-l[1],l[0])}function il(n,l,a){return ai.lu(n,l,a),ai.Fv(n,n),n}function rh(n,l){return n[0]===l[0]&&n[1]===l[1]}function $0(n){for(var l=new Map,a=0;a<n.length;a++){var s=n[0].toString()+"-"+n[1].toString();l.get(s)?(n.splice(a,1),a++):l.set(s,s)}return n}var Hp=function(){function n(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,pt.Z)(this,n),(0,W.Z)(this,"lastFlip",-1),(0,W.Z)(this,"miter",ai.al(0,0)),(0,W.Z)(this,"started",!1),(0,W.Z)(this,"dash",!1),(0,W.Z)(this,"totalDistance",0),(0,W.Z)(this,"currentIndex",0),this.join=l.join||"miter",this.cap=l.cap||"butt",this.miterLimit=l.miterLimit||10,this.thickness=l.thickness||1,this.dash=l.dash||!1,this.complex={positions:[],indices:[],normals:[],startIndex:0,indexes:[]}}return(0,et.Z)(n,[{key:"extrude_gaode2",value:function(a,s){var u=this.complex;if(a.length<=1)return u;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var h=a.length,v=u.startIndex,m=1;m<h;m++){var w,A,R,B=a[m-1];B.push((w=s[m-1][2])!==null&&w!==void 0?w:0);var G=s[m-1],j=a[m];j.push((A=s[m][2])!==null&&A!==void 0?A:0);var lt=s[m],ct=m<a.length-1?[].concat((0,Oi.Z)(a[m+1]),[(R=s[m+1][2])!==null&&R!==void 0?R:0]):null,_t=m<s.length-1?s[m+1]:null,Vt=this.segment_gaode2(u,v,B,j,ct,G,lt,_t);v+=Vt}if(this.dash)for(var ce=0;ce<u.positions.length/6;ce++)u.positions[ce*6+5]=this.totalDistance;return u.startIndex=u.positions.length/6,u}},{key:"simpleExtrude_gaode2",value:function(a,s){var u=this.complex;if(a.length<=1)return u;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var h=a.length,v=u.startIndex,m=1;m<h;m++){var w,A,R,B=a[m-1];B.push((w=s[m-1][2])!==null&&w!==void 0?w:0);var G=s[m-1],j=a[m];j.push((A=s[m][2])!==null&&A!==void 0?A:0);var lt=s[m],ct=m<a.length-1?[].concat((0,Oi.Z)(a[m+1]),[(R=s[m+1][2])!==null&&R!==void 0?R:0]):null,_t=m<s.length-1?s[m+1]:null,Vt=this.simpleSegment(u,v,B,j,ct,G,lt,_t);v+=Vt}if(this.dash)for(var ce=0;ce<u.positions.length/6;ce++)u.positions[ce*6+5]=this.totalDistance;return u.startIndex=u.positions.length/6,u}},{key:"extrude",value:function(a){var s=this.complex;if(a.length<=1)return s;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var u=a.length,h=s.startIndex,v=1;v<u;v++){var m=a[v-1],w=a[v],A=v<a.length-1?a[v+1]:null,R=this.segment(s,h,m,w,A);h+=R}if(this.dash)for(var B=0;B<s.positions.length/6;B++)s.positions[B*6+5]=this.totalDistance;return s.startIndex=s.positions.length/6,s}},{key:"simpleExtrude",value:function(a){var s=this.complex;if(a.length<=1)return s;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var u=a.length,h=s.startIndex,v=1;v<u;v++){var m=a[v-1],w=a[v],A=v<a.length-1?a[v+1]:null,R=this.simpleSegment(s,h,m,w,A);h+=R}if(this.dash)for(var B=0;B<s.positions.length/6;B++)s.positions[B*6+5]=this.totalDistance;return s.startIndex=s.positions.length/6,s}},{key:"segment_gaode2",value:function(a,s,u,h,v,m,w,A){var R=0,B=a.indices,G=a.positions,j=a.normals,lt=this.cap==="square",ct=this.join==="bevel",_t=E([w[0],w[1]]),Vt=E([m[0],m[1]]);il(xu,h,u);var ce=0;if(this.dash&&(ce=this.lineSegmentDistance(_t,Vt),this.totalDistance+=ce),this.normal||(this.normal=ai.Ue(),hf(this.normal,xu)),!this.started)if(this.started=!0,lt){var ae=ai.Ue(),ze=ai.Ue();ai.IH(ae,this.normal,xu),ai.IH(ze,this.normal,xu),j.push(ze[0],ze[1],0),j.push(ae[0],ae[1],0),G.push(u[0],u[1],u[2]|0,this.totalDistance-ce,-this.thickness,u[2]|0),this.complex.indexes.push(this.currentIndex),G.push(u[0],u[1],u[2]|0,this.totalDistance-ce,this.thickness,u[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(G,j,u,this.normal,this.thickness,this.totalDistance-ce);if(B.push(s+0,s+1,s+2),v){rh(h,v)&&ai.IH(v,h,ai.Fv(v,ai.$X(v,h,u))),il(ff,v,h);var Or=Qo(Tc,ai.Ue(),xu,ff,this.thickness),Zr=(0,yt.Z)(Or,2),Wr=Zr[0],wn=Zr[1],vn=ai.AK(Tc,this.normal)<0?-1:1,Kn=ct;if(!Kn&&this.join==="miter"){var Ei=Wr;Ei>this.miterLimit&&(Kn=!0)}Kn?(j.push(this.normal[0],this.normal[1],0),j.push(wn[0],wn[1],0),G.push(h[0],h[1],h[2]|0,this.totalDistance,-this.thickness*vn,h[2]|0),this.complex.indexes.push(this.currentIndex),G.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness*vn,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,B.push.apply(B,(0,Oi.Z)(this.lastFlip!==-vn?[s,s+2,s+3]:[s+2,s+1,s+3])),B.push(s+2,s+3,s+4),hf(Md,ff),ai.JG(this.normal,Md),j.push(this.normal[0],this.normal[1],0),G.push(h[0],h[1],h[2]|0,this.totalDistance,-this.thickness*vn,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,R+=3):(this.extrusions(G,j,h,wn,Wr,this.totalDistance),B.push.apply(B,(0,Oi.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),vn=-1,ai.JG(this.normal,wn),R+=2),this.lastFlip=vn}else{if(hf(this.normal,xu),lt){var $e=ai.Ue(),xr=ai.Ue();ai.lu(xr,xu,this.normal),ai.IH($e,xu,this.normal),j.push(xr[0],xr[1],0),j.push($e[0],$e[1],0),G.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness,h[2]|0),this.complex.indexes.push(this.currentIndex),G.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(G,j,h,this.normal,this.thickness,this.totalDistance);B.push.apply(B,(0,Oi.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),R+=2}return R}},{key:"simpleSegment",value:function(a,s,u,h,v){var m=0,w=a.indices,A=a.positions,R=a.normals,B=E([h[0],h[1]]),G=E([u[0],u[1]]);il(xu,B,G);var j=0;if(this.dash&&(j=this.lineSegmentDistance(B,G),this.totalDistance+=j),this.normal||(this.normal=ai.Ue(),hf(this.normal,xu)),this.started||(this.started=!0,this.extrusions(A,R,u,this.normal,this.thickness,this.totalDistance-j)),w.push(s+0,s+1,s+2),!v)hf(this.normal,xu),this.extrusions(A,R,h,this.normal,this.thickness,this.totalDistance),w.push.apply(w,(0,Oi.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),m+=2;else{var lt=E([v[0],v[1]]);rh(B,lt)&&ai.IH(lt,B,ai.Fv(lt,ai.$X(lt,B,G))),il(ff,lt,B);var ct=Qo(Tc,ai.Ue(),xu,ff,this.thickness),_t=(0,yt.Z)(ct,2),Vt=_t[0],ce=_t[1],ae=ai.AK(Tc,this.normal)<0?-1:1;this.extrusions(A,R,h,ce,Vt,this.totalDistance),w.push.apply(w,(0,Oi.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),ae=-1,ai.JG(this.normal,ce),m+=2,this.lastFlip=ae}return m}},{key:"segment",value:function(a,s,u,h,v){var m=0,w=a.indices,A=a.positions,R=a.normals,B=this.cap==="square",G=this.join==="bevel",j=E([h[0],h[1]]),lt=E([u[0],u[1]]);il(xu,j,lt);var ct=0;if(this.dash&&(ct=this.lineSegmentDistance(j,lt),this.totalDistance+=ct),this.normal||(this.normal=ai.Ue(),hf(this.normal,xu)),!this.started)if(this.started=!0,B){var _t=ai.Ue(),Vt=ai.Ue();ai.IH(_t,this.normal,xu),ai.IH(Vt,this.normal,xu),R.push(Vt[0],Vt[1],0),R.push(_t[0],_t[1],0),A.push(u[0],u[1],u[2]|0,this.totalDistance-ct,-this.thickness,u[2]|0),this.complex.indexes.push(this.currentIndex),A.push(u[0],u[1],u[2]|0,this.totalDistance-ct,this.thickness,u[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(A,R,u,this.normal,this.thickness,this.totalDistance-ct);if(w.push(s+0,s+1,s+2),v){var ze=E([v[0],v[1]]);rh(j,ze)&&ai.IH(ze,j,ai.Fv(ze,ai.$X(ze,j,lt))),il(ff,ze,j);var $e=Qo(Tc,ai.Ue(),xu,ff,this.thickness),xr=(0,yt.Z)($e,2),Or=xr[0],Zr=xr[1],Wr=ai.AK(Tc,this.normal)<0?-1:1,wn=G;if(!wn&&this.join==="miter"){var vn=Or;vn>this.miterLimit&&(wn=!0)}wn?(R.push(this.normal[0],this.normal[1],0),R.push(Zr[0],Zr[1],0),A.push(h[0],h[1],h[2]|0,this.totalDistance,-this.thickness*Wr,h[2]|0),this.complex.indexes.push(this.currentIndex),A.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness*Wr,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,w.push.apply(w,(0,Oi.Z)(this.lastFlip!==-Wr?[s,s+2,s+3]:[s+2,s+1,s+3])),w.push(s+2,s+3,s+4),hf(Md,ff),ai.JG(this.normal,Md),R.push(this.normal[0],this.normal[1],0),A.push(h[0],h[1],h[2]|0,this.totalDistance,-this.thickness*Wr,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,m+=3):(this.extrusions(A,R,h,Zr,Or,this.totalDistance),w.push.apply(w,(0,Oi.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),Wr=-1,ai.JG(this.normal,Zr),m+=2),this.lastFlip=Wr}else{if(hf(this.normal,xu),B){var ce=ai.Ue(),ae=ai.Ue();ai.lu(ae,xu,this.normal),ai.IH(ce,xu,this.normal),R.push(ae[0],ae[1],0),R.push(ce[0],ce[1],0),A.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness,h[2]|0),this.complex.indexes.push(this.currentIndex),A.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(A,R,h,this.normal,this.thickness,this.totalDistance);w.push.apply(w,(0,Oi.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),m+=2}return m}},{key:"extrusions",value:function(a,s,u,h,v,m){s.push(h[0],h[1],0),s.push(h[0],h[1],0),a.push(u[0],u[1],u[2]|0,m,-v,u[2]|0),this.complex.indexes.push(this.currentIndex),a.push(u[0],u[1],u[2]|0,m,v,u[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}},{key:"lineSegmentDistance",value:function(a,s){var u=s[0]-a[0],h=s[1]-a[1];return Math.sqrt(u*u+h*h)}}]),n}(),It=85.0511287798;function Pe(n){var l=n.coordinates,a=n.originCoordinates,s=n.version,u=new Hp({dash:!0,join:"bevel"});if(s==="GAODE2.x"){var h=l;Array.isArray(h[0][0])||(h=[l]);var v=a;Array.isArray(v[0][0])||(v=[a]);for(var m=0;m<h.length;m++){var w=h[m],A=v[m];u.extrude_gaode2(w,A)}}else{var R=l;R[0]&&!Array.isArray(R[0][0])&&(R=[l]),R.forEach(function(G){u.extrude(G)})}var B=u.complex;return{vertices:B.positions,indices:B.indices,normals:B.normals,indexes:B.indexes,size:6}}function dr(n){var l=Ir(n.coordinates);return{vertices:[].concat((0,Oi.Z)(l),(0,Oi.Z)(l),(0,Oi.Z)(l),(0,Oi.Z)(l)),indices:[0,1,2,2,3,0],size:l.length}}function sn(n){var l=n.coordinates,a=eh().flatten(l),s=a.vertices,u=a.dimensions,h=a.holes,v=eh()(s,h,u);return{indices:v,vertices:s,size:u}}function Ln(n,l){var a=l;return l>It&&(a=It),l<-It&&(a=-It),[Math.PI*n/180+Math.PI,Math.PI-Math.log(Math.tan(Math.PI*.25+Math.PI*a/180*.5))]}function un(n,l){return[(n-Math.PI)*180/Math.PI,(Math.atan(Math.exp(Math.PI-l))-Math.PI*.25)*2*180/Math.PI]}var bn=function(){var n=(0,J.Z)(ot().mark(function l(a){var s,u,h,v,m,w,A,R,B;return ot().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return s=a.descriptors,u=a.features,h=a.enablePicking,v=a.iconMap,m={a_Color:Td,a_Position:mv,filter:a0,a_vertexId:o0,a_PickingColor:function(ct){var _t=ct.id;return h?vc(_t):[0,0,0]},a_DistanceAndIndex:function(ct,_t,Vt,ce,ae,ze){return ze===void 0?[Vt[3],10]:[Vt[3],ze]},a_Total_Distance:function(ct,_t,Vt){return[Vt[5]]},a_Size:function(ct){var _t=ct.size,Vt=_t===void 0?1:_t;return Array.isArray(Vt)?[Vt[0],Vt[1]]:[Vt,0]},a_Normal:function(ct,_t,Vt,ce,ae){return ae},a_Miter:function(ct,_t,Vt){return[Vt[4]]},a_iconMapUV:function(ct){var _t=ct.texture,Vt=v[_t]||{x:0,y:0},ce=Vt.x,ae=Vt.y;return[ce,ae]}},w={sizePerElement:0,elements:[]},A=0,R=[],B=3,u.forEach(function(lt,ct){var _t=Pe(lt),Vt=_t.indices,ce=_t.vertices,ae=_t.normals,ze=_t.size,$e=_t.indexes;Vt.forEach(function(Wr){R.push(Wr+A)}),B=ze;var xr=ce.length/ze;w.sizePerElement=B,w.elements.push({featureIdx:ct,vertices:ce,normals:ae,offset:A}),A+=xr;for(var Or=function(wn){var vn=(ae==null?void 0:ae.slice(wn*3,wn*3+3))||[],Kn=ce.slice(wn*ze,wn*ze+ze),Ei=0;$e&&$e[wn]!==void 0&&(Ei=$e[wn]),s.forEach(function(qi){if(qi&&m[qi.name]){var _o;(_o=qi.buffer.data).push.apply(_o,(0,Oi.Z)(m[qi.name](lt,ct,Kn,wn,vn,Ei)))}})},Zr=0;Zr<xr;Zr++)Or(Zr)}),j.abrupt("return",{descriptors:s,featureLayout:w,indices:R});case 8:case"end":return j.stop()}},l)}));return function(a){return n.apply(this,arguments)}}(),jr=function(){var n=(0,J.Z)(ot().mark(function l(a){var s,u,h,v,m,w,A,R,B;return ot().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return s=a.descriptors,u=a.features,h=a.enablePicking,v=a.shape2d,m={a_Color:Td,a_Position:mv,filter:a0,a_vertexId:o0,a_PickingColor:function(ct){var _t=ct.id;return h?vc(_t):[0,0,0]},a_Shape:function(ct){var _t=ct.shape,Vt=_t===void 0?2:_t,ce=v.indexOf(Vt);return[ce]},a_Extrude:function(ct,_t,Vt,ce){var ae=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],ze=ce%4*3;return[ae[ze],ae[ze+1],ae[ze+2]]},a_Size:function(ct){var _t=ct.size,Vt=_t===void 0?5:_t;return Array.isArray(Vt)?[Vt[0]]:[Vt]}},w={sizePerElement:0,elements:[]},A=0,R=[],B=3,u.forEach(function(lt,ct){var _t=dr(lt),Vt=_t.indices,ce=_t.vertices,ae=_t.normals,ze=_t.size,$e=_t.indexes;Vt.forEach(function(Wr){R.push(Wr+A)}),B=ze;var xr=ce.length/ze;w.sizePerElement=B,w.elements.push({featureIdx:ct,vertices:ce,normals:ae,offset:A}),A+=xr;for(var Or=function(wn){var vn=(ae==null?void 0:ae.slice(wn*3,wn*3+3))||[],Kn=ce.slice(wn*ze,wn*ze+ze),Ei=0;$e&&$e[wn]!==void 0&&(Ei=$e[wn]),s.forEach(function(qi){if(qi&&m[qi.name]){var _o;(_o=qi.buffer.data).push.apply(_o,(0,Oi.Z)(m[qi.name](lt,ct,Kn,wn,vn,Ei)))}})},Zr=0;Zr<xr;Zr++)Or(Zr)}),j.abrupt("return",{descriptors:s,featureLayout:w,indices:R});case 8:case"end":return j.stop()}},l)}));return function(a){return n.apply(this,arguments)}}(),jn=function(){var n=(0,J.Z)(ot().mark(function l(a){var s,u,h,v,m,w,A,R;return ot().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return s=a.descriptors,u=a.features,h=a.enablePicking,v={a_Color:Td,a_Position:mv,filter:a0,a_vertexId:o0,a_PickingColor:function(lt){var ct=lt.id;return h?vc(ct):[0,0,0]}},m={sizePerElement:0,elements:[]},w=0,A=[],R=3,u.forEach(function(j,lt){var ct=sn(j),_t=ct.indices,Vt=ct.vertices,ce=ct.normals,ae=ct.size,ze=ct.indexes;_t.forEach(function(Zr){A.push(Zr+w)}),R=ae;var $e=Vt.length/ae;m.sizePerElement=R,m.elements.push({featureIdx:lt,vertices:Vt,normals:ce,offset:w}),w+=$e;for(var xr=function(Wr){var wn=(ce==null?void 0:ce.slice(Wr*3,Wr*3+3))||[],vn=Vt.slice(Wr*ae,Wr*ae+ae),Kn=0;ze&&ze[Wr]!==void 0&&(Kn=ze[Wr]),s.forEach(function(Ei){if(Ei&&v[Ei.name]){var qi;(qi=Ei.buffer.data).push.apply(qi,(0,Oi.Z)(v[Ei.name](j,lt,vn,Wr,wn,Kn)))}})},Or=0;Or<$e;Or++)xr(Or)}),G.abrupt("return",{descriptors:s,featureLayout:m,indices:A});case 8:case"end":return G.stop()}},l)}));return function(a){return n.apply(this,arguments)}}(),Qn={pointFill:jr,line:bn,polygonFill:jn},ri=(0,K.Z)({},Qn);function ni(n){return _i.apply(this,arguments)}function _i(){return _i=(0,J.Z)(ot().mark(function n(l){var a,s;return ot().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(a=l.workerType,s=l.data,!ri[a]){h.next=3;break}return h.abrupt("return",ri[a](s));case 3:return h.abrupt("return",Promise.reject(new Error('Worker with type "'.concat(a,'" non-existent.'))));case 4:case"end":return h.stop()}},n)})),_i.apply(this,arguments)}th(ni);var qn=new Map;function ii(n,l){qn.set(n,l)}function Gr(n){var l=qn.get(n);return l}var mn=`var L7=function(t){"use strict";function e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function r(){r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var h={};function p(){}function v(){}function d(){}var y={};c(y,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(k([])));m&&m!==e&&n.call(m,a)&&(y=m);var x=d.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var r;o(this,"_invoke",{value:function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,u){var s=l(t[o],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,u)}))}u(s.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return I()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=A(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function A(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function k(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:I}}function I(){return{value:void 0,done:!0}}return v.prototype=d,o(x,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:v,configurable:!0}),v.displayName=c(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,s,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},b(w.prototype),c(w.prototype,u,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(x),c(x,s,"Generator"),c(x,a,(function(){return this})),c(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=k,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function n(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function u(t){n(a,o,i,u,s,"next",t)}function s(t){n(a,o,i,u,s,"throw",t)}u(void 0)}))}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||g(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||g(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){if(t){if("string"==typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(t,e):void 0}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function b(t,e){return t(e={exports:{}},e.exports),e.exports}var w,E,A=function(t){return t&&t.Math==Math&&t},O=A("object"==typeof globalThis&&globalThis)||A("object"==typeof window&&window)||A("object"==typeof self&&self)||A("object"==typeof x&&x)||function(){return this}()||Function("return this")(),S=Object.defineProperty,T=function(t,e){try{S(O,t,{value:e,configurable:!0,writable:!0})}catch(r){O[t]=e}return e},k=O["__core-js_shared__"]||T("__core-js_shared__",{}),I=b((function(t){(t.exports=function(t,e){return k[t]||(k[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),j=function(t){try{return!!t()}catch(t){return!0}},P=!j((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),_=Function.prototype,M=_.call,L=P&&_.bind.bind(M,M),R=P?L:function(t){return function(){return M.apply(t,arguments)}},C=function(t){return null==t},N=TypeError,D=function(t){if(C(t))throw N("Can't call method on "+t);return t},F=Object,W=function(t){return F(D(t))},z=R({}.hasOwnProperty),B=Object.hasOwn||function(t,e){return z(W(t),e)},U=0,G=Math.random(),H=R(1..toString),V=function(t){return"Symbol("+(void 0===t?"":t)+")_"+H(++U+G,36)},q="object"==typeof document&&document.all,Z={all:q,IS_HTMLDDA:void 0===q&&void 0!==q},Y=Z.all,$=Z.IS_HTMLDDA?function(t){return"function"==typeof t||t===Y}:function(t){return"function"==typeof t},K=function(t){return $(t)?t:void 0},Q=function(t,e){return arguments.length<2?K(O[t]):O[t]&&O[t][e]},X=Q("navigator","userAgent")||"",J=O.process,tt=O.Deno,et=J&&J.versions||tt&&tt.version,rt=et&&et.v8;rt&&(E=(w=rt.split("."))[0]>0&&w[0]<4?1:+(w[0]+w[1])),!E&&X&&(!(w=X.match(/Edge\\/(\\d+)/))||w[1]>=74)&&(w=X.match(/Chrome\\/(\\d+)/))&&(E=+w[1]);var nt=E,ot=!!Object.getOwnPropertySymbols&&!j((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&nt&&nt<41})),it=ot&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,at=I("wks"),ut=O.Symbol,st=ut&&ut.for,ct=it?ut:ut&&ut.withoutSetter||V,ft=function(t){if(!B(at,t)||!ot&&"string"!=typeof at[t]){var e="Symbol."+t;ot&&B(ut,t)?at[t]=ut[t]:at[t]=it&&st?st(e):ct(e)}return at[t]},lt={};lt[ft("toStringTag")]="z";var ht="[object z]"===String(lt),pt=!j((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),vt=Z.all,dt=Z.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:$(t)||t===vt}:function(t){return"object"==typeof t?null!==t:$(t)},yt=O.document,gt=dt(yt)&&dt(yt.createElement),mt=function(t){return gt?yt.createElement(t):{}},xt=!pt&&!j((function(){return 7!=Object.defineProperty(mt("div"),"a",{get:function(){return 7}}).a})),bt=pt&&j((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),wt=String,Et=TypeError,At=function(t){if(dt(t))return t;throw Et(wt(t)+" is not an object")},Ot=Function.prototype.call,St=P?Ot.bind(Ot):function(){return Ot.apply(Ot,arguments)},Tt=R({}.isPrototypeOf),kt=Object,It=it?function(t){return"symbol"==typeof t}:function(t){var e=Q("Symbol");return $(e)&&Tt(e.prototype,kt(t))},jt=String,Pt=function(t){try{return jt(t)}catch(t){return"Object"}},_t=TypeError,Mt=function(t){if($(t))return t;throw _t(Pt(t)+" is not a function")},Lt=function(t,e){var r=t[e];return C(r)?void 0:Mt(r)},Rt=TypeError,Ct=TypeError,Nt=ft("toPrimitive"),Dt=function(t,e){if(!dt(t)||It(t))return t;var r,n=Lt(t,Nt);if(n){if(void 0===e&&(e="default"),r=St(n,t,e),!dt(r)||It(r))return r;throw Ct("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&$(r=t.toString)&&!dt(n=St(r,t)))return n;if($(r=t.valueOf)&&!dt(n=St(r,t)))return n;if("string"!==e&&$(r=t.toString)&&!dt(n=St(r,t)))return n;throw Rt("Can't convert object to primitive value")}(t,e)},Ft=function(t){var e=Dt(t,"string");return It(e)?e:e+""},Wt=TypeError,zt=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor,Ut={f:pt?bt?function(t,e,r){if(At(t),e=Ft(e),At(r),"function"==typeof t&&"prototype"===e&&"value"in r&&"writable"in r&&!r.writable){var n=Bt(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return zt(t,e,r)}:zt:function(t,e,r){if(At(t),e=Ft(e),At(r),xt)try{return zt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Wt("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},Gt=Function.prototype,Ht=pt&&Object.getOwnPropertyDescriptor,Vt=B(Gt,"name"),qt={EXISTS:Vt,PROPER:Vt&&"something"===function(){}.name,CONFIGURABLE:Vt&&(!pt||pt&&Ht(Gt,"name").configurable)},Zt=R(Function.toString);$(k.inspectSource)||(k.inspectSource=function(t){return Zt(t)});var Yt,$t,Kt,Qt=k.inspectSource,Xt=O.WeakMap,Jt=$(Xt)&&/native code/.test(String(Xt)),te=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},ee=pt?function(t,e,r){return Ut.f(t,e,te(1,r))}:function(t,e,r){return t[e]=r,t},re=I("keys"),ne=function(t){return re[t]||(re[t]=V(t))},oe={},ie=O.TypeError,ae=O.WeakMap;if(Jt||k.state){var ue=k.state||(k.state=new ae);ue.get=ue.get,ue.has=ue.has,ue.set=ue.set,Yt=function(t,e){if(ue.has(t))throw ie("Object already initialized");return e.facade=t,ue.set(t,e),e},$t=function(t){return ue.get(t)||{}},Kt=function(t){return ue.has(t)}}else{var se=ne("state");oe[se]=!0,Yt=function(t,e){if(B(t,se))throw ie("Object already initialized");return e.facade=t,ee(t,se,e),e},$t=function(t){return B(t,se)?t[se]:{}},Kt=function(t){return B(t,se)}}var ce={set:Yt,get:$t,has:Kt,enforce:function(t){return Kt(t)?$t(t):Yt(t,{})},getterFor:function(t){return function(e){var r;if(!dt(e)||(r=$t(e)).type!==t)throw ie("Incompatible receiver, "+t+" required");return r}}},fe=b((function(t){var e=qt.CONFIGURABLE,r=ce.enforce,n=ce.get,o=Object.defineProperty,i=pt&&!j((function(){return 8!==o((function(){}),"length",{value:8}).length})),a=String(String).split("String"),u=t.exports=function(t,n,u){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\\(([^)]*)\\)/,"$1")+"]"),u&&u.getter&&(n="get "+n),u&&u.setter&&(n="set "+n),(!B(t,"name")||e&&t.name!==n)&&(pt?o(t,"name",{value:n,configurable:!0}):t.name=n),i&&u&&B(u,"arity")&&t.length!==u.arity&&o(t,"length",{value:u.arity});try{u&&B(u,"constructor")&&u.constructor?pt&&o(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var s=r(t);return B(s,"source")||(s.source=a.join("string"==typeof n?n:"")),t};Function.prototype.toString=u((function(){return $(this)&&n(this).source||Qt(this)}),"toString")})),le=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if($(r)&&fe(r,i,n),n.global)o?t[e]=r:T(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:Ut.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},he=R({}.toString),pe=R("".slice),ve=function(t){return pe(he(t),8,-1)},de=ft("toStringTag"),ye=Object,ge="Arguments"==ve(function(){return arguments}()),me=ht?ve:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=ye(t),de))?r:ge?ve(e):"Object"==(n=ve(e))&&$(e.callee)?"Arguments":n},xe=ht?{}.toString:function(){return"[object "+me(this)+"]"};ht||le(Object.prototype,"toString",xe,{unsafe:!0});var be={}.propertyIsEnumerable,we=Object.getOwnPropertyDescriptor,Ee={f:we&&!be.call({1:2},1)?function(t){var e=we(this,t);return!!e&&e.enumerable}:be},Ae=Object,Oe=R("".split),Se=j((function(){return!Ae("z").propertyIsEnumerable(0)}))?function(t){return"String"==ve(t)?Oe(t,""):Ae(t)}:Ae,Te=function(t){return Se(D(t))},ke=Object.getOwnPropertyDescriptor,Ie={f:pt?ke:function(t,e){if(t=Te(t),e=Ft(e),xt)try{return ke(t,e)}catch(t){}if(B(t,e))return te(!St(Ee.f,t,e),t[e])}},je=Math.ceil,Pe=Math.floor,_e=Math.trunc||function(t){var e=+t;return(e>0?Pe:je)(e)},Me=function(t){var e=+t;return e!=e||0===e?0:_e(e)},Le=Math.max,Re=Math.min,Ce=function(t,e){var r=Me(t);return r<0?Le(r+e,0):Re(r,e)},Ne=Math.min,De=function(t){return t>0?Ne(Me(t),9007199254740991):0},Fe=function(t){return De(t.length)},We=function(t){return function(e,r,n){var o,i=Te(e),a=Fe(i),u=Ce(n,a);if(t&&r!=r){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===r)return t||u||0;return!t&&-1}},ze={includes:We(!0),indexOf:We(!1)},Be=ze.indexOf,Ue=R([].push),Ge=function(t,e){var r,n=Te(t),o=0,i=[];for(r in n)!B(oe,r)&&B(n,r)&&Ue(i,r);for(;e.length>o;)B(n,r=e[o++])&&(~Be(i,r)||Ue(i,r));return i},He=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ve=He.concat("length","prototype"),qe={f:Object.getOwnPropertyNames||function(t){return Ge(t,Ve)}},Ze={f:Object.getOwnPropertySymbols},Ye=R([].concat),$e=Q("Reflect","ownKeys")||function(t){var e=qe.f(At(t)),r=Ze.f;return r?Ye(e,r(t)):e},Ke=function(t,e,r){for(var n=$e(e),o=Ut.f,i=Ie.f,a=0;a<n.length;a++){var u=n[a];B(t,u)||r&&B(r,u)||o(t,u,i(e,u))}},Qe=/#|\\.prototype\\./,Xe=function(t,e){var r=tr[Je(t)];return r==rr||r!=er&&($(e)?j(e):!!e)},Je=Xe.normalize=function(t){return String(t).replace(Qe,".").toLowerCase()},tr=Xe.data={},er=Xe.NATIVE="N",rr=Xe.POLYFILL="P",nr=Xe,or=Ie.f,ir=function(t,e){var r,n,o,i,a,u=t.target,s=t.global,c=t.stat;if(r=s?O:c?O[u]||T(u,{}):(O[u]||{}).prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(a=or(r,n))&&a.value:r[n],!nr(s?n:u+(c?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ke(i,o)}(t.sham||o&&o.sham)&&ee(i,"sham",!0),le(r,n,i,t)}},ar="process"==ve(O.process),ur=String,sr=TypeError,cr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=R(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return At(r),function(t){if("object"==typeof t||$(t))return t;throw sr("Can't set "+ur(t)+" as a prototype")}(n),e?t(r,n):r.__proto__=n,r}}():void 0),fr=Ut.f,lr=ft("toStringTag"),hr=function(t,e,r){t&&!r&&(t=t.prototype),t&&!B(t,lr)&&fr(t,lr,{configurable:!0,value:e})},pr=ft("species"),vr=function(t){var e=Q(t),r=Ut.f;pt&&e&&!e[pr]&&r(e,pr,{configurable:!0,get:function(){return this}})},dr=TypeError,yr=function(t,e){if(Tt(e,t))return t;throw dr("Incorrect invocation")},gr=function(){},mr=[],xr=Q("Reflect","construct"),br=/^\\s*(?:class|function)\\b/,wr=R(br.exec),Er=!br.exec(gr),Ar=function(t){if(!$(t))return!1;try{return xr(gr,mr,t),!0}catch(t){return!1}},Or=function(t){if(!$(t))return!1;switch(me(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Er||!!wr(br,Qt(t))}catch(t){return!0}};Or.sham=!0;var Sr,Tr,kr,Ir,jr=!xr||j((function(){var t;return Ar(Ar.call)||!Ar(Object)||!Ar((function(){t=!0}))||t}))?Or:Ar,Pr=TypeError,_r=function(t){if(jr(t))return t;throw Pr(Pt(t)+" is not a constructor")},Mr=ft("species"),Lr=function(t,e){var r,n=At(t).constructor;return void 0===n||C(r=At(n)[Mr])?e:_r(r)},Rr=Function.prototype,Cr=Rr.apply,Nr=Rr.call,Dr="object"==typeof Reflect&&Reflect.apply||(P?Nr.bind(Cr):function(){return Nr.apply(Cr,arguments)}),Fr=function(t){if("Function"===ve(t))return R(t)},Wr=Fr(Fr.bind),zr=function(t,e){return Mt(t),void 0===e?t:P?Wr(t,e):function(){return t.apply(e,arguments)}},Br=Q("document","documentElement"),Ur=R([].slice),Gr=TypeError,Hr=function(t,e){if(t<e)throw Gr("Not enough arguments");return t},Vr=/(?:ipad|iphone|ipod).*applewebkit/i.test(X),qr=O.setImmediate,Zr=O.clearImmediate,Yr=O.process,$r=O.Dispatch,Kr=O.Function,Qr=O.MessageChannel,Xr=O.String,Jr=0,tn={};try{Sr=O.location}catch(t){}var en=function(t){if(B(tn,t)){var e=tn[t];delete tn[t],e()}},rn=function(t){return function(){en(t)}},nn=function(t){en(t.data)},on=function(t){O.postMessage(Xr(t),Sr.protocol+"//"+Sr.host)};qr&&Zr||(qr=function(t){Hr(arguments.length,1);var e=$(t)?t:Kr(t),r=Ur(arguments,1);return tn[++Jr]=function(){Dr(e,void 0,r)},Tr(Jr),Jr},Zr=function(t){delete tn[t]},ar?Tr=function(t){Yr.nextTick(rn(t))}:$r&&$r.now?Tr=function(t){$r.now(rn(t))}:Qr&&!Vr?(Ir=(kr=new Qr).port2,kr.port1.onmessage=nn,Tr=zr(Ir.postMessage,Ir)):O.addEventListener&&$(O.postMessage)&&!O.importScripts&&Sr&&"file:"!==Sr.protocol&&!j(on)?(Tr=on,O.addEventListener("message",nn,!1)):Tr="onreadystatechange"in mt("script")?function(t){Br.appendChild(mt("script")).onreadystatechange=function(){Br.removeChild(this),en(t)}}:function(t){setTimeout(rn(t),0)});var an,un,sn,cn,fn,ln,hn,pn,vn={set:qr,clear:Zr},dn=/ipad|iphone|ipod/i.test(X)&&void 0!==O.Pebble,yn=/web0s(?!.*chrome)/i.test(X),gn=Ie.f,mn=vn.set,xn=O.MutationObserver||O.WebKitMutationObserver,bn=O.document,wn=O.process,En=O.Promise,An=gn(O,"queueMicrotask"),On=An&&An.value;On||(an=function(){var t,e;for(ar&&(t=wn.domain)&&t.exit();un;){e=un.fn,un=un.next;try{e()}catch(t){throw un?cn():sn=void 0,t}}sn=void 0,t&&t.enter()},Vr||ar||yn||!xn||!bn?!dn&&En&&En.resolve?((hn=En.resolve(void 0)).constructor=En,pn=zr(hn.then,hn),cn=function(){pn(an)}):ar?cn=function(){wn.nextTick(an)}:(mn=zr(mn,O),cn=function(){mn(an)}):(fn=!0,ln=bn.createTextNode(""),new xn(an).observe(ln,{characterData:!0}),cn=function(){ln.data=fn=!fn}));var Sn=On||function(t){var e={fn:t,next:void 0};sn&&(sn.next=e),un||(un=e,cn()),sn=e},Tn=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},kn=function(){this.head=null,this.tail=null};kn.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}};var In,jn,Pn,_n=kn,Mn=O.Promise,Ln="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Rn=!Ln&&!ar&&"object"==typeof window&&"object"==typeof document,Cn=(Mn&&Mn.prototype,ft("species")),Nn=!1,Dn=$(O.PromiseRejectionEvent),Fn={CONSTRUCTOR:nr("Promise",(function(){var t=Qt(Mn),e=t!==String(Mn);if(!e&&66===nt)return!0;if(!nt||nt<51||!/native code/.test(t)){var r=new Mn((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[Cn]=n,!(Nn=r.then((function(){}))instanceof n))return!0}return!e&&(Rn||Ln)&&!Dn})),REJECTION_EVENT:Dn,SUBCLASSING:Nn},Wn=TypeError,zn=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw Wn("Bad Promise constructor");e=t,r=n})),this.resolve=Mt(e),this.reject=Mt(r)},Bn={f:function(t){return new zn(t)}},Un=vn.set,Gn=Fn.CONSTRUCTOR,Hn=Fn.REJECTION_EVENT,Vn=Fn.SUBCLASSING,qn=ce.getterFor("Promise"),Zn=ce.set,Yn=Mn&&Mn.prototype,$n=Mn,Kn=Yn,Qn=O.TypeError,Xn=O.document,Jn=O.process,to=Bn.f,eo=to,ro=!!(Xn&&Xn.createEvent&&O.dispatchEvent),no=function(t){var e;return!(!dt(t)||!$(e=t.then))&&e},oo=function(t,e){var r,n,o,i=e.value,a=1==e.state,u=a?t.ok:t.fail,s=t.resolve,c=t.reject,f=t.domain;try{u?(a||(2===e.rejection&&co(e),e.rejection=1),!0===u?r=i:(f&&f.enter(),r=u(i),f&&(f.exit(),o=!0)),r===t.promise?c(Qn("Promise-chain cycle")):(n=no(r))?St(n,r,s,c):s(r)):c(i)}catch(t){f&&!o&&f.exit(),c(t)}},io=function(t,e){t.notified||(t.notified=!0,Sn((function(){for(var r,n=t.reactions;r=n.get();)oo(r,t);t.notified=!1,e&&!t.rejection&&uo(t)})))},ao=function(t,e,r){var n,o;ro?((n=Xn.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),O.dispatchEvent(n)):n={promise:e,reason:r},!Hn&&(o=O["on"+t])?o(n):"unhandledrejection"===t&&function(t,e){var r=O.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}("Unhandled promise rejection",r)},uo=function(t){St(Un,O,(function(){var e,r=t.facade,n=t.value;if(so(t)&&(e=Tn((function(){ar?Jn.emit("unhandledRejection",n,r):ao("unhandledrejection",r,n)})),t.rejection=ar||so(t)?2:1,e.error))throw e.value}))},so=function(t){return 1!==t.rejection&&!t.parent},co=function(t){St(Un,O,(function(){var e=t.facade;ar?Jn.emit("rejectionHandled",e):ao("rejectionhandled",e,t.value)}))},fo=function(t,e,r){return function(n){t(e,n,r)}},lo=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,io(t,!0))},ho=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw Qn("Promise can't be resolved itself");var n=no(e);n?Sn((function(){var r={done:!1};try{St(n,e,fo(ho,r,t),fo(lo,r,t))}catch(e){lo(r,e,t)}})):(t.value=e,t.state=1,io(t,!1))}catch(e){lo({done:!1},e,t)}}};if(Gn&&(Kn=($n=function(t){yr(this,Kn),Mt(t),St(In,this);var e=qn(this);try{t(fo(ho,e),fo(lo,e))}catch(t){lo(e,t)}}).prototype,(In=function(t){Zn(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new _n,rejection:!1,state:0,value:void 0})}).prototype=le(Kn,"then",(function(t,e){var r=qn(this),n=to(Lr(this,$n));return r.parent=!0,n.ok=!$(t)||t,n.fail=$(e)&&e,n.domain=ar?Jn.domain:void 0,0==r.state?r.reactions.add(n):Sn((function(){oo(n,r)})),n.promise})),jn=function(){var t=new In,e=qn(t);this.promise=t,this.resolve=fo(ho,e),this.reject=fo(lo,e)},Bn.f=to=function(t){return t===$n||void 0===t?new jn(t):eo(t)},$(Mn)&&Yn!==Object.prototype)){Pn=Yn.then,Vn||le(Yn,"then",(function(t,e){var r=this;return new $n((function(t,e){St(Pn,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete Yn.constructor}catch(t){}cr&&cr(Yn,Kn)}ir({global:!0,constructor:!0,wrap:!0,forced:Gn},{Promise:$n}),hr($n,"Promise",!1),vr("Promise");var po={},vo=ft("iterator"),yo=Array.prototype,go=function(t){return void 0!==t&&(po.Array===t||yo[vo]===t)},mo=ft("iterator"),xo=function(t){if(!C(t))return Lt(t,mo)||Lt(t,"@@iterator")||po[me(t)]},bo=TypeError,wo=function(t,e){var r=arguments.length<2?xo(t):e;if(Mt(r))return At(St(r,t));throw bo(Pt(t)+" is not iterable")},Eo=function(t,e,r){var n,o;At(t);try{if(!(n=Lt(t,"return"))){if("throw"===e)throw r;return r}n=St(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return At(n),r},Ao=TypeError,Oo=function(t,e){this.stopped=t,this.result=e},So=Oo.prototype,To=function(t,e,r){var n,o,i,a,u,s,c,f=r&&r.that,l=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),d=zr(e,f),y=function(t){return n&&Eo(n,"normal",t),new Oo(!0,t)},g=function(t){return l?(At(t),v?d(t[0],t[1],y):d(t[0],t[1])):v?d(t,y):d(t)};if(h)n=t.iterator;else if(p)n=t;else{if(!(o=xo(t)))throw Ao(Pt(t)+" is not iterable");if(go(o)){for(i=0,a=Fe(t);a>i;i++)if((u=g(t[i]))&&Tt(So,u))return u;return new Oo(!1)}n=wo(t,o)}for(s=h?t.next:n.next;!(c=St(s,n)).done;){try{u=g(c.value)}catch(t){Eo(n,"throw",t)}if("object"==typeof u&&u&&Tt(So,u))return u}return new Oo(!1)},ko=ft("iterator"),Io=!1;try{var jo=0,Po={next:function(){return{done:!!jo++}},return:function(){Io=!0}};Po[ko]=function(){return this},Array.from(Po,(function(){throw 2}))}catch(t){}var _o=function(t,e){if(!e&&!Io)return!1;var r=!1;try{var n={};n[ko]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},Mo=Fn.CONSTRUCTOR||!_o((function(t){Mn.all(t).then(void 0,(function(){}))}));ir({target:"Promise",stat:!0,forced:Mo},{all:function(t){var e=this,r=Bn.f(e),n=r.resolve,o=r.reject,i=Tn((function(){var r=Mt(e.resolve),i=[],a=0,u=1;To(t,(function(t){var s=a++,c=!1;u++,St(r,e,t).then((function(t){c||(c=!0,i[s]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise}});var Lo=Fn.CONSTRUCTOR,Ro=Mn&&Mn.prototype;if(ir({target:"Promise",proto:!0,forced:Lo,real:!0},{catch:function(t){return this.then(void 0,t)}}),$(Mn)){var Co=Q("Promise").prototype.catch;Ro.catch!==Co&&le(Ro,"catch",Co,{unsafe:!0})}ir({target:"Promise",stat:!0,forced:Mo},{race:function(t){var e=this,r=Bn.f(e),n=r.reject,o=Tn((function(){var o=Mt(e.resolve);To(t,(function(t){St(o,e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}}),ir({target:"Promise",stat:!0,forced:Fn.CONSTRUCTOR},{reject:function(t){var e=Bn.f(this);return St(e.reject,void 0,t),e.promise}});var No=Fn.CONSTRUCTOR;Q("Promise");function Do(t,e){if(!t)throw new Error(e||"web worker helper assertion failed.")}ir({target:"Promise",stat:!0,forced:No},{resolve:function(t){return function(t,e){if(At(t),dt(e)&&e.constructor===t)return e;var r=Bn.f(t);return(0,r.resolve)(e),r.promise}(this,t)}});var Fo="undefined"!=typeof window&&void 0!==window.orientation,Wo=function(){function t(t,e){var r=this;this.name=t,this.workerThread=e,this.isRunning=!0,this.resolve=function(){},this.reject=function(){},this.result=new Promise((function(t,e){r.resolve=t,r.reject=e}))}return t.prototype.postMessage=function(t,e){this.workerThread.postMessage({source:"Main thread",type:t,payload:e})},t.prototype.done=function(t){Do(this.isRunning,"WorkerJob isRunning false."),this.isRunning=!1,this.resolve(t)},t.prototype.error=function(t){Do(this.isRunning,"WorkerJob isRunning false."),this.isRunning=!1,this.reject(t)},t}(),zo=new Map;function Bo(t){Do(t.source&&!t.url||!t.source&&t.url);var e=zo.get(t.source||t.url);return e||(t.url&&(e=function(t){if(!t.startsWith("http"))return t;return Uo((e=t,"try {\\n importScripts('"+e+"');\\n} catch (error) {\\n console.error(error);\\n throw error;\\n}"));var e}(t.url),zo.set(t.url,e)),t.source&&(e=Uo(t.source),zo.set(t.source,e))),Do(e),e}function Uo(t){var e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function Go(t,e,r){void 0===e&&(e=!0);var n=r||new Set;if(t){if(Ho(t))n.add(t);else if(Ho(t.buffer))n.add(t.buffer);else if(ArrayBuffer.isView(t));else if(e&&"object"==typeof t)for(var o in t)Go(t[o],e,n)}else;return void 0===r?Array.from(n):[]}function Ho(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}var Vo=function(){},qo=function(){function t(t){this.terminated=!1,this.loadableURL="";var e=t.name,r=t.source,n=t.url;Do(r||n),this.name=e,this.source=r,this.url=n,this.onMessage=Vo,this.onError=function(t){return console.log(t)},this.worker=this.createBrowserWorker()}return t.isSupported=function(){return"undefined"!=typeof Worker},t.prototype.destroy=function(){this.onMessage=Vo,this.onError=Vo,this.worker.terminate(),this.terminated=!0},Object.defineProperty(t.prototype,"isRunning",{get:function(){return Boolean(this.onMessage)},enumerable:!1,configurable:!0}),t.prototype.postMessage=function(t,e){e=e||Go(t),this.worker.postMessage(t,e)},t.prototype.getErrorFromErrorEvent=function(t){var e="Failed to load ";return e+="worker "+this.name+" from "+this.url+". ",t.message&&(e+=t.message+" in "),t.lineno&&(e+=":"+t.lineno+":"+t.colno),new Error(e)},t.prototype.createBrowserWorker=function(){var t=this;this.loadableURL=Bo({source:this.source,url:this.url});var e=new Worker(this.loadableURL,{name:this.name});return e.onmessage=function(e){e.data?t.onMessage(e.data):t.onError(new Error("No data received"))},e.onerror=function(e){t.onError(t.getErrorFromErrorEvent(e)),t.terminated=!0},e.onmessageerror=function(e){return console.error("worker "+t.name+", message error: "+e)},e},t}(),Zo=self&&self.__assign||function(){return(Zo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Yo=self&&self.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}s((n=n.apply(t,e||[])).next())}))},$o=self&&self.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Ko=function(){function t(t){this.name="unnamed",this.maxConcurrency=1,this.maxMobileConcurrency=1,this.onDebug=function(){},this.reuseWorkers=!0,this.props={},this.jobQueue=[],this.idleQueue=[],this.count=0,this.isDestroyed=!1,this.source=t.source,this.url=t.url,this.setProps(t)}return t.prototype.destroy=function(){this.idleQueue.forEach((function(t){return t.destroy()})),this.isDestroyed=!0},t.prototype.setProps=function(t){this.props=Zo(Zo({},this.props),t),void 0!==t.name&&(this.name=t.name),void 0!==t.maxConcurrency&&(this.maxConcurrency=t.maxConcurrency),void 0!==t.maxMobileConcurrency&&(this.maxMobileConcurrency=t.maxMobileConcurrency),void 0!==t.reuseWorkers&&(this.reuseWorkers=t.reuseWorkers),void 0!==t.onDebug&&(this.onDebug=t.onDebug)},t.prototype.startJob=function(t,e,r){return void 0===e&&(e=function(t,e,r){return t.done(r)}),void 0===r&&(r=function(t,e){return t.error(e)}),Yo(this,void 0,void 0,(function(){var n,o=this;return $o(this,(function(i){switch(i.label){case 0:return n=new Promise((function(n){return o.jobQueue.push({name:t,onMessage:e,onError:r,onStart:n}),o})),this.startQueuedJob(),[4,n];case 1:return[2,i.sent()]}}))}))},t.prototype.startQueuedJob=function(){return Yo(this,void 0,void 0,(function(){var t,e,r;return $o(this,(function(n){switch(n.label){case 0:if(!this.jobQueue.length)return[2];if(!(t=this.getAvailableWorker()))return[2];if(!(e=this.jobQueue.shift()))return[3,4];this.onDebug({message:"Starting job",name:e.name,backlog:this.jobQueue.length,workerThread:t}),r=new Wo(e.name,t),t.onMessage=function(t){return e.onMessage(r,t.type,t.payload)},t.onError=function(t){return e.onError(r,t)},e.onStart(r),n.label=1;case 1:return n.trys.push([1,,3,4]),[4,r.result];case 2:return n.sent(),[3,4];case 3:return this.returnWorkerToQueue(t),[7];case 4:return[2]}}))}))},t.prototype.returnWorkerToQueue=function(t){this.isDestroyed||!this.reuseWorkers||this.count>this.getMaxConcurrency()?(t.destroy(),this.count--):this.idleQueue.push(t),this.isDestroyed||this.startQueuedJob()},t.prototype.getAvailableWorker=function(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this.getMaxConcurrency()){this.count++;var t=this.name.toLowerCase()+" (#"+this.count+" of "+this.maxConcurrency+")";return new qo({name:t,source:this.source,url:this.url})}return null},t.prototype.getMaxConcurrency=function(){return Fo?this.maxMobileConcurrency:this.maxConcurrency},t}(),Qo=self&&self.__assign||function(){return(Qo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Xo=self&&self.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Jo={maxConcurrency:3,maxMobileConcurrency:1,onDebug:function(){},reuseWorkers:!0},ti=(function(){function t(t){this.workerPools=new Map,this.props=Qo({},Jo),this.setProps(t),this.workerPools=new Map}t.isSupported=function(){return qo.isSupported()},t.getWorkerFarm=function(e){return void 0===e&&(e={}),t.workerFarm=t.workerFarm||new t({}),t.workerFarm.setProps(e),t.workerFarm},t.prototype.destroy=function(){var t,e;try{for(var r=Xo(this.workerPools.values()),n=r.next();!n.done;n=r.next()){n.value.destroy()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},t.prototype.setProps=function(t){var e,r;this.props=Qo(Qo({},this.props),t);try{for(var n=Xo(this.workerPools.values()),o=n.next();!o.done;o=n.next()){o.value.setProps(this.getWorkerPoolProps())}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.getWorkerPool=function(t){var e=t.name,r=t.source,n=t.url,o=this.workerPools.get(e);return o||((o=new Ko({name:e,source:r,url:n})).setProps(this.getWorkerPoolProps()),this.workerPools.set(e,o)),o},t.prototype.getWorkerPoolProps=function(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}(),new Map),ei=function(){function t(){}return Object.defineProperty(t,"onmessage",{set:function(t){self.onmessage=function(e){if(ri(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}},enumerable:!1,configurable:!0}),t.addEventListener=function(t){var e=ti.get(t);e||(e=function(e){if(ri(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}),self.addEventListener("message",e)},t.removeEventListener=function(t){var e=ti.get(t);ti.delete(t),self.removeEventListener("message",e)},t.postMessage=function(t,e){if(self){var r={source:"Worker thread",type:t,payload:e},n=Go(e);self.postMessage(r,n)}},t}();function ri(t){var e=t.type,r=t.data;return"message"===e&&r&&"string"==typeof r.source&&"Main thread"===r.source}self&&self.__awaiter,self&&self.__generator;var ni,oi,ii=function(){function t(){this._values=[],this._settlers=[],this._closed=!1}return t.prototype[Symbol.asyncIterator]=function(){return this},t.prototype.push=function(t){return this.enqueue(t)},t.prototype.enqueue=function(t){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");var e=this._settlers.shift();t instanceof Error?e.reject(t):e.resolve({value:t})}else this._values.push(t)},t.prototype.close=function(){for(;this._settlers.length>0;){this._settlers.shift().resolve({done:!0})}this._closed=!0},t.prototype.next=function(){var t=this;if(this._values.length>0){var e=this._values.shift();return e instanceof Error?Promise.reject(e):Promise.resolve({done:!1,value:e})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0,value:void 0})}return new Promise((function(e,r){t._settlers.push({resolve:e,reject:r})}))},t}(),ai=self&&self.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}s((n=n.apply(t,e||[])).next())}))},ui=self&&self.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},si=self&&self.__asyncValues||function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,o){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,o,(e=t[r](e)).done,e.value)}))}}},ci=0;function fi(t,e){var r=this;if("undefined"!=typeof self){var n={process:li};ei.onmessage=function(o,i){return ai(r,void 0,void 0,(function(){var r,a,u,s,c,f,l,h,p,v;return ui(this,(function(d){switch(d.label){case 0:switch(d.trys.push([0,19,,20]),o){case"process":return[3,1];case"process-in-batches":return[3,3];case"input-batch":return[3,16];case"input-done":return[3,17]}return[3,18];case 1:if(!t)throw new Error("Worker does not support atomic processing");return[4,t(i.input,i.options||{},n)];case 2:return r=d.sent(),ei.postMessage("done",{result:r}),[3,18];case 3:if(!e)throw new Error("Worker does not support batched processing");ni=new ii,oi=i.options||{},a=e(ni,oi,n),d.label=4;case 4:d.trys.push([4,9,10,15]),u=si(a),d.label=5;case 5:return[4,u.next()];case 6:if((s=d.sent()).done)return[3,8];c=s.value,ei.postMessage("output-batch",{result:c}),d.label=7;case 7:return[3,5];case 8:return[3,15];case 9:return f=d.sent(),p={error:f},[3,15];case 10:return d.trys.push([10,,13,14]),s&&!s.done&&(v=u.return)?[4,v.call(u)]:[3,12];case 11:d.sent(),d.label=12;case 12:return[3,14];case 13:if(p)throw p.error;return[7];case 14:return[7];case 15:return ei.postMessage("done",{}),[3,18];case 16:return ni.push(i.input),[3,18];case 17:return ni.close(),[3,18];case 18:return[3,20];case 19:return l=d.sent(),h=l instanceof Error?l.message:"",ei.postMessage("error",{error:h}),[3,20];case 20:return[2]}}))}))}}}function li(t,e){return void 0===e&&(e={}),new Promise((function(r,n){var o=ci++,i=function(t,e){if(e.id===o)switch(t){case"done":ei.removeEventListener(i),r(e.result);break;case"error":ei.removeEventListener(i),n(e.error)}};ei.addEventListener(i);var a={id:o,input:t,options:e};ei.postMessage("process",a)}))}self&&self.__awaiter,self&&self.__generator;var hi={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},pi=mt("span").classList,vi=pi&&pi.constructor&&pi.constructor.prototype,di=vi===Object.prototype?void 0:vi,yi=Array.isArray||function(t){return"Array"==ve(t)},gi=ft("species"),mi=Array,xi=function(t,e){return new(function(t){var e;return yi(t)&&(e=t.constructor,(jr(e)&&(e===mi||yi(e.prototype))||dt(e)&&null===(e=e[gi]))&&(e=void 0)),void 0===e?mi:e}(t))(0===e?0:e)},bi=R([].push),wi=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,a=7==t,u=5==t||i;return function(s,c,f,l){for(var h,p,v=W(s),d=Se(v),y=zr(c,f),g=Fe(d),m=0,x=l||xi,b=e?x(s,g):r||a?x(s,0):void 0;g>m;m++)if((u||m in d)&&(p=y(h=d[m],m,v),t))if(e)b[m]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:bi(b,h)}else switch(t){case 4:return!1;case 7:bi(b,h)}return i?-1:n||o?o:b}},Ei={forEach:wi(0),map:wi(1),filter:wi(2),some:wi(3),every:wi(4),find:wi(5),findIndex:wi(6),filterReject:wi(7)},Ai=function(t,e){var r=[][t];return!!r&&j((function(){r.call(null,e||function(){return 1},1)}))},Oi=Ei.forEach,Si=Ai("forEach")?[].forEach:function(t){return Oi(this,t,arguments.length>1?arguments[1]:void 0)},Ti=function(t){if(t&&t.forEach!==Si)try{ee(t,"forEach",Si)}catch(e){t.forEach=Si}};for(var ki in hi)hi[ki]&&Ti(O[ki]&&O[ki].prototype);Ti(di);var Ii=function(t,e,r){var n=Ft(e);n in t?Ut.f(t,n,te(0,r)):t[n]=r},ji=ft("species"),Pi=function(t){return nt>=51||!j((function(){var e=[];return(e.constructor={})[ji]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},_i=Pi("slice"),Mi=ft("species"),Li=Array,Ri=Math.max;ir({target:"Array",proto:!0,forced:!_i},{slice:function(t,e){var r,n,o,i=Te(this),a=Fe(i),u=Ce(t,a),s=Ce(void 0===e?a:e,a);if(yi(i)&&(r=i.constructor,(jr(r)&&(r===Li||yi(r.prototype))||dt(r)&&null===(r=r[Mi]))&&(r=void 0),r===Li||void 0===r))return Ur(i,u,s);for(n=new(void 0===r?Li:r)(Ri(s-u,0)),o=0;u<s;u++,o++)u in i&&Ii(n,o,i[u]);return n.length=o,n}});var Ci=qt.EXISTS,Ni=Ut.f,Di=Function.prototype,Fi=R(Di.toString),Wi=/function\\b(?:\\s|\\/\\*[\\S\\s]*?\\*\\/|\\/\\/[^\\n\\r]*[\\n\\r]+)*([^\\s(/]*)/,zi=R(Wi.exec);pt&&!Ci&&Ni(Di,"name",{configurable:!0,get:function(){try{return zi(Wi,Fi(this))[1]}catch(t){return""}}});var Bi=Ei.map,Ui=Pi("map");ir({target:"Array",proto:!0,forced:!Ui},{map:function(t){return Bi(this,t,arguments.length>1?arguments[1]:void 0)}});var Gi,Hi=Object.keys||function(t){return Ge(t,He)},Vi={f:pt&&!bt?Object.defineProperties:function(t,e){At(t);for(var r,n=Te(e),o=Hi(e),i=o.length,a=0;i>a;)Ut.f(t,r=o[a++],n[r]);return t}},qi=ne("IE_PROTO"),Zi=function(){},Yi=function(t){return"<script>"+t+"<\\/script>"},$i=function(t){t.write(Yi("")),t.close();var e=t.parentWindow.Object;return t=null,e},Ki=function(){try{Gi=new ActiveXObject("htmlfile")}catch(t){}var t,e;Ki="undefined"!=typeof document?document.domain&&Gi?$i(Gi):((e=mt("iframe")).style.display="none",Br.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Yi("document.F=Object")),t.close(),t.F):$i(Gi);for(var r=He.length;r--;)delete Ki.prototype[He[r]];return Ki()};oe[qi]=!0;var Qi=Object.create||function(t,e){var r;return null!==t?(Zi.prototype=At(t),r=new Zi,Zi.prototype=null,r[qi]=t):r=Ki(),void 0===e?r:Vi.f(r,e)},Xi=Ut.f,Ji=ft("unscopables"),ta=Array.prototype;null==ta[Ji]&&Xi(ta,Ji,{configurable:!0,value:Qi(null)});var ea,ra,na,oa=function(t){ta[Ji][t]=!0},ia=!j((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),aa=ne("IE_PROTO"),ua=Object,sa=ua.prototype,ca=ia?ua.getPrototypeOf:function(t){var e=W(t);if(B(e,aa))return e[aa];var r=e.constructor;return $(r)&&e instanceof r?r.prototype:e instanceof ua?sa:null},fa=ft("iterator"),la=!1;[].keys&&("next"in(na=[].keys())?(ra=ca(ca(na)))!==Object.prototype&&(ea=ra):la=!0),(!dt(ea)||j((function(){var t={};return ea[fa].call(t)!==t})))&&(ea={}),$(ea[fa])||le(ea,fa,(function(){return this}));var ha={IteratorPrototype:ea,BUGGY_SAFARI_ITERATORS:la},pa=ha.IteratorPrototype,va=function(){return this},da=qt.PROPER,ya=qt.CONFIGURABLE,ga=ha.IteratorPrototype,ma=ha.BUGGY_SAFARI_ITERATORS,xa=ft("iterator"),ba=function(){return this},wa=function(t,e,r,n,o,i,a){!function(t,e,r,n){var o=e+" Iterator";t.prototype=Qi(pa,{next:te(+!n,r)}),hr(t,o,!1),po[o]=va}(r,e,n);var u,s,c,f=function(t){if(t===o&&d)return d;if(!ma&&t in p)return p[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},l=e+" Iterator",h=!1,p=t.prototype,v=p[xa]||p["@@iterator"]||o&&p[o],d=!ma&&v||f(o),y="Array"==e&&p.entries||v;if(y&&(u=ca(y.call(new t)))!==Object.prototype&&u.next&&(ca(u)!==ga&&(cr?cr(u,ga):$(u[xa])||le(u,xa,ba)),hr(u,l,!0)),da&&"values"==o&&v&&"values"!==v.name&&(ya?ee(p,"name","values"):(h=!0,d=function(){return St(v,this)})),o)if(s={values:f("values"),keys:i?d:f("keys"),entries:f("entries")},a)for(c in s)(ma||h||!(c in p))&&le(p,c,s[c]);else ir({target:e,proto:!0,forced:ma||h},s);return p[xa]!==d&&le(p,xa,d,{name:o}),po[e]=d,s},Ea=function(t,e){return{value:t,done:e}},Aa=Ut.f,Oa=ce.set,Sa=ce.getterFor("Array Iterator"),Ta=wa(Array,"Array",(function(t,e){Oa(this,{type:"Array Iterator",target:Te(t),index:0,kind:e})}),(function(){var t=Sa(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,Ea(void 0,!0)):Ea("keys"==r?n:"values"==r?e[n]:[n,e[n]],!1)}),"values"),ka=po.Arguments=po.Array;if(oa("keys"),oa("values"),oa("entries"),pt&&"values"!==ka.name)try{Aa(ka,"name",{value:"values"})}catch(t){}var Ia,ja,Pa,_a="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Ma=Ut.f,La=ce.enforce,Ra=ce.get,Ca=O.Int8Array,Na=Ca&&Ca.prototype,Da=O.Uint8ClampedArray,Fa=Da&&Da.prototype,Wa=Ca&&ca(Ca),za=Na&&ca(Na),Ba=Object.prototype,Ua=O.TypeError,Ga=ft("toStringTag"),Ha=V("TYPED_ARRAY_TAG"),Va=_a&&!!cr&&"Opera"!==me(O.opera),qa=!1,Za={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Ya={BigInt64Array:8,BigUint64Array:8},$a=function(t){var e=ca(t);if(dt(e)){var r=Ra(e);return r&&B(r,"TypedArrayConstructor")?r.TypedArrayConstructor:$a(e)}},Ka=function(t){if(!dt(t))return!1;var e=me(t);return B(Za,e)||B(Ya,e)};for(Ia in Za)(Pa=(ja=O[Ia])&&ja.prototype)?La(Pa).TypedArrayConstructor=ja:Va=!1;for(Ia in Ya)(Pa=(ja=O[Ia])&&ja.prototype)&&(La(Pa).TypedArrayConstructor=ja);if((!Va||!$(Wa)||Wa===Function.prototype)&&(Wa=function(){throw Ua("Incorrect invocation")},Va))for(Ia in Za)O[Ia]&&cr(O[Ia],Wa);if((!Va||!za||za===Ba)&&(za=Wa.prototype,Va))for(Ia in Za)O[Ia]&&cr(O[Ia].prototype,za);if(Va&&ca(Fa)!==za&&cr(Fa,za),pt&&!B(za,Ga))for(Ia in qa=!0,Ma(za,Ga,{get:function(){return dt(this)?this[Ha]:void 0}}),Za)O[Ia]&&ee(O[Ia],Ha,Ia);var Qa={NATIVE_ARRAY_BUFFER_VIEWS:Va,TYPED_ARRAY_TAG:qa&&Ha,aTypedArray:function(t){if(Ka(t))return t;throw Ua("Target is not a typed array")},aTypedArrayConstructor:function(t){if($(t)&&(!cr||Tt(Wa,t)))return t;throw Ua(Pt(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,n){if(pt){if(r)for(var o in Za){var i=O[o];if(i&&B(i.prototype,t))try{delete i.prototype[t]}catch(r){try{i.prototype[t]=e}catch(t){}}}za[t]&&!r||le(za,t,r?e:Va&&Na[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,r){var n,o;if(pt){if(cr){if(r)for(n in Za)if((o=O[n])&&B(o,t))try{delete o[t]}catch(t){}if(Wa[t]&&!r)return;try{return le(Wa,t,r?e:Va&&Wa[t]||e)}catch(t){}}for(n in Za)!(o=O[n])||o[t]&&!r||le(o,t,e)}},getTypedArrayConstructor:$a,isView:function(t){if(!dt(t))return!1;var e=me(t);return"DataView"===e||B(Za,e)||B(Ya,e)},isTypedArray:Ka,TypedArray:Wa,TypedArrayPrototype:za},Xa=Qa.NATIVE_ARRAY_BUFFER_VIEWS,Ja=O.ArrayBuffer,tu=O.Int8Array,eu=!Xa||!j((function(){tu(1)}))||!j((function(){new tu(-1)}))||!_o((function(t){new tu,new tu(null),new tu(1.5),new tu(t)}),!0)||j((function(){return 1!==new tu(new Ja(2),1,void 0).length})),ru=function(t,e,r){for(var n in e)le(t,n,e[n],r);return t},nu=RangeError,ou=function(t){if(void 0===t)return 0;var e=Me(t),r=De(e);if(e!==r)throw nu("Wrong length or index");return r},iu=Array,au=Math.abs,uu=Math.pow,su=Math.floor,cu=Math.log,fu=Math.LN2,lu=function(t,e,r){var n,o,i,a=iu(r),u=8*r-e-1,s=(1<<u)-1,c=s>>1,f=23===e?uu(2,-24)-uu(2,-77):0,l=t<0||0===t&&1/t<0?1:0,h=0;for((t=au(t))!=t||t===1/0?(o=t!=t?1:0,n=s):(n=su(cu(t)/fu),t*(i=uu(2,-n))<1&&(n--,i*=2),(t+=n+c>=1?f/i:f*uu(2,1-c))*i>=2&&(n++,i/=2),n+c>=s?(o=0,n=s):n+c>=1?(o=(t*i-1)*uu(2,e),n+=c):(o=t*uu(2,c-1)*uu(2,e),n=0));e>=8;)a[h++]=255&o,o/=256,e-=8;for(n=n<<e|o,u+=e;u>0;)a[h++]=255&n,n/=256,u-=8;return a[--h]|=128*l,a},hu=function(t,e){var r,n=t.length,o=8*n-e-1,i=(1<<o)-1,a=i>>1,u=o-7,s=n-1,c=t[s--],f=127&c;for(c>>=7;u>0;)f=256*f+t[s--],u-=8;for(r=f&(1<<-u)-1,f>>=-u,u+=e;u>0;)r=256*r+t[s--],u-=8;if(0===f)f=1-a;else{if(f===i)return r?NaN:c?-1/0:1/0;r+=uu(2,e),f-=a}return(c?-1:1)*r*uu(2,f-e)},pu=function(t){for(var e=W(this),r=Fe(e),n=arguments.length,o=Ce(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,a=void 0===i?r:Ce(i,r);a>o;)e[o++]=t;return e},vu=Array,du=Math.max,yu=function(t,e,r){for(var n=Fe(t),o=Ce(e,n),i=Ce(void 0===r?n:r,n),a=vu(du(i-o,0)),u=0;o<i;o++,u++)Ii(a,u,t[o]);return a.length=u,a},gu=qe.f,mu=Ut.f,xu=qt.PROPER,bu=qt.CONFIGURABLE,wu=ce.get,Eu=ce.set,Au=O.ArrayBuffer,Ou=Au,Su=Ou&&Ou.prototype,Tu=O.DataView,ku=Tu&&Tu.prototype,Iu=Object.prototype,ju=O.Array,Pu=O.RangeError,_u=R(pu),Mu=R([].reverse),Lu=lu,Ru=hu,Cu=function(t){return[255&t]},Nu=function(t){return[255&t,t>>8&255]},Du=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},Fu=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},Wu=function(t){return Lu(t,23,4)},zu=function(t){return Lu(t,52,8)},Bu=function(t,e){mu(t.prototype,e,{get:function(){return wu(this)[e]}})},Uu=function(t,e,r,n){var o=ou(r),i=wu(t);if(o+e>i.byteLength)throw Pu("Wrong index");var a=wu(i.buffer).bytes,u=o+i.byteOffset,s=yu(a,u,u+e);return n?s:Mu(s)},Gu=function(t,e,r,n,o,i){var a=ou(r),u=wu(t);if(a+e>u.byteLength)throw Pu("Wrong index");for(var s=wu(u.buffer).bytes,c=a+u.byteOffset,f=n(+o),l=0;l<e;l++)s[c+l]=f[i?l:e-l-1]};if(_a){var Hu=xu&&"ArrayBuffer"!==Au.name;if(j((function(){Au(1)}))&&j((function(){new Au(-1)}))&&!j((function(){return new Au,new Au(1.5),new Au(NaN),1!=Au.length||Hu&&!bu})))Hu&&bu&&ee(Au,"name","ArrayBuffer");else{(Ou=function(t){return yr(this,Su),new Au(ou(t))}).prototype=Su;for(var Vu,qu=gu(Au),Zu=0;qu.length>Zu;)(Vu=qu[Zu++])in Ou||ee(Ou,Vu,Au[Vu]);Su.constructor=Ou}cr&&ca(ku)!==Iu&&cr(ku,Iu);var Yu=new Tu(new Ou(2)),$u=R(ku.setInt8);Yu.setInt8(0,2147483648),Yu.setInt8(1,2147483649),!Yu.getInt8(0)&&Yu.getInt8(1)||ru(ku,{setInt8:function(t,e){$u(this,t,e<<24>>24)},setUint8:function(t,e){$u(this,t,e<<24>>24)}},{unsafe:!0})}else Su=(Ou=function(t){yr(this,Su);var e=ou(t);Eu(this,{bytes:_u(ju(e),0),byteLength:e}),pt||(this.byteLength=e)}).prototype,ku=(Tu=function(t,e,r){yr(this,ku),yr(t,Su);var n=wu(t).byteLength,o=Me(e);if(o<0||o>n)throw Pu("Wrong offset");if(o+(r=void 0===r?n-o:De(r))>n)throw Pu("Wrong length");Eu(this,{buffer:t,byteLength:r,byteOffset:o}),pt||(this.buffer=t,this.byteLength=r,this.byteOffset=o)}).prototype,pt&&(Bu(Ou,"byteLength"),Bu(Tu,"buffer"),Bu(Tu,"byteLength"),Bu(Tu,"byteOffset")),ru(ku,{getInt8:function(t){return Uu(this,1,t)[0]<<24>>24},getUint8:function(t){return Uu(this,1,t)[0]},getInt16:function(t){var e=Uu(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=Uu(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return Fu(Uu(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return Fu(Uu(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return Ru(Uu(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return Ru(Uu(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){Gu(this,1,t,Cu,e)},setUint8:function(t,e){Gu(this,1,t,Cu,e)},setInt16:function(t,e){Gu(this,2,t,Nu,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){Gu(this,2,t,Nu,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){Gu(this,4,t,Du,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){Gu(this,4,t,Du,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){Gu(this,4,t,Wu,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){Gu(this,8,t,zu,e,arguments.length>2?arguments[2]:void 0)}});hr(Ou,"ArrayBuffer"),hr(Tu,"DataView");var Ku={ArrayBuffer:Ou,DataView:Tu},Qu=Math.floor,Xu=Number.isInteger||function(t){return!dt(t)&&isFinite(t)&&Qu(t)===t},Ju=RangeError,ts=RangeError,es=function(t,e){var r=function(t){var e=Me(t);if(e<0)throw Ju("The argument can't be less than 0");return e}(t);if(r%e)throw ts("Wrong offset");return r},rs=R("".slice),ns=function(t){return"Big"===rs(me(t),0,3)},os=TypeError,is=function(t){var e=Dt(t,"number");if("number"==typeof e)throw os("Can't convert number to bigint");return BigInt(e)},as=Qa.aTypedArrayConstructor,us=function(t){var e,r,n,o,i,a,u,s,c=_r(this),f=W(t),l=arguments.length,h=l>1?arguments[1]:void 0,p=void 0!==h,v=xo(f);if(v&&!go(v))for(s=(u=wo(f,v)).next,f=[];!(a=St(s,u)).done;)f.push(a.value);for(p&&l>2&&(h=zr(h,arguments[2])),r=Fe(f),n=new(as(c))(r),o=ns(n),e=0;r>e;e++)i=p?h(f[e],e):f[e],n[e]=o?is(i):+i;return n},ss=function(t,e,r){var n,o;return cr&&$(n=e.constructor)&&n!==r&&dt(o=n.prototype)&&o!==r.prototype&&cr(t,o),t},cs=b((function(t){var e=qe.f,r=Ei.forEach,n=ce.get,o=ce.set,i=ce.enforce,a=Ut.f,u=Ie.f,s=Math.round,c=O.RangeError,f=Ku.ArrayBuffer,l=f.prototype,h=Ku.DataView,p=Qa.NATIVE_ARRAY_BUFFER_VIEWS,v=Qa.TYPED_ARRAY_TAG,d=Qa.TypedArray,y=Qa.TypedArrayPrototype,g=Qa.aTypedArrayConstructor,m=Qa.isTypedArray,x=function(t,e){g(t);for(var r=0,n=e.length,o=new t(n);n>r;)o[r]=e[r++];return o},b=function(t,e){a(t,e,{get:function(){return n(this)[e]}})},w=function(t){var e;return Tt(l,t)||"ArrayBuffer"==(e=me(t))||"SharedArrayBuffer"==e},E=function(t,e){return m(t)&&!It(e)&&e in t&&Xu(+e)&&e>=0},A=function(t,e){return e=Ft(e),E(t,e)?te(2,t[e]):u(t,e)},S=function(t,e,r){return e=Ft(e),!(E(t,e)&&dt(r)&&B(r,"value"))||B(r,"get")||B(r,"set")||r.configurable||B(r,"writable")&&!r.writable||B(r,"enumerable")&&!r.enumerable?a(t,e,r):(t[e]=r.value,t)};pt?(p||(Ie.f=A,Ut.f=S,b(y,"buffer"),b(y,"byteOffset"),b(y,"byteLength"),b(y,"length")),ir({target:"Object",stat:!0,forced:!p},{getOwnPropertyDescriptor:A,defineProperty:S}),t.exports=function(t,u,l){var g=t.match(/\\d+$/)[0]/8,b=t+(l?"Clamped":"")+"Array",E="get"+t,A="set"+t,S=O[b],T=S,k=T&&T.prototype,I={},j=function(t,e){a(t,e,{get:function(){return function(t,e){var r=n(t);return r.view[E](e*g+r.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,r){var o=n(t);l&&(r=(r=s(r))<0?0:r>255?255:255&r),o.view[A](e*g+o.byteOffset,r,!0)}(this,e,t)},enumerable:!0})};p?eu&&(T=u((function(t,e,r,n){return yr(t,k),ss(dt(e)?w(e)?void 0!==n?new S(e,es(r,g),n):void 0!==r?new S(e,es(r,g)):new S(e):m(e)?x(T,e):St(us,T,e):new S(ou(e)),t,T)})),cr&&cr(T,d),r(e(S),(function(t){t in T||ee(T,t,S[t])})),T.prototype=k):(T=u((function(t,e,r,n){yr(t,k);var i,a,u,s=0,l=0;if(dt(e)){if(!w(e))return m(e)?x(T,e):St(us,T,e);i=e,l=es(r,g);var p=e.byteLength;if(void 0===n){if(p%g)throw c("Wrong length");if((a=p-l)<0)throw c("Wrong length")}else if((a=De(n)*g)+l>p)throw c("Wrong length");u=a/g}else u=ou(e),i=new f(a=u*g);for(o(t,{buffer:i,byteOffset:l,byteLength:a,length:u,view:new h(i)});s<u;)j(t,s++)})),cr&&cr(T,d),k=T.prototype=Qi(y)),k.constructor!==T&&ee(k,"constructor",T),i(k).TypedArrayConstructor=T,v&&ee(k,v,b);var P=T!=S;I[b]=T,ir({global:!0,constructor:!0,forced:P,sham:!p},I),"BYTES_PER_ELEMENT"in T||ee(T,"BYTES_PER_ELEMENT",g),"BYTES_PER_ELEMENT"in k||ee(k,"BYTES_PER_ELEMENT",g),vr(b)}):t.exports=function(){}}));cs("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}),!0);var fs=TypeError,ls=function(t,e){if(!delete t[e])throw fs("Cannot delete property "+Pt(e)+" of "+Pt(t))},hs=Math.min,ps=R([].copyWithin||function(t,e){var r=W(this),n=Fe(r),o=Ce(t,n),i=Ce(e,n),a=arguments.length>2?arguments[2]:void 0,u=hs((void 0===a?n:Ce(a,n))-i,n-o),s=1;for(i<o&&o<i+u&&(s=-1,i+=u-1,o+=u-1);u-- >0;)i in r?r[o]=r[i]:ls(r,o),o+=s,i+=s;return r}),vs=Qa.aTypedArray;(0,Qa.exportTypedArrayMethod)("copyWithin",(function(t,e){return ps(vs(this),t,e,arguments.length>2?arguments[2]:void 0)}));var ds=Ei.every,ys=Qa.aTypedArray;(0,Qa.exportTypedArrayMethod)("every",(function(t){return ds(ys(this),t,arguments.length>1?arguments[1]:void 0)}));var gs=Qa.aTypedArray,ms=Qa.exportTypedArrayMethod,xs=R("".slice);ms("fill",(function(t){var e=arguments.length;gs(this);var r="Big"===xs(me(this),0,3)?is(t):+t;return St(pu,this,r,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),j((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})));var bs=Qa.aTypedArrayConstructor,ws=Qa.getTypedArrayConstructor,Es=function(t){return bs(Lr(t,ws(t)))},As=function(t,e){return function(t,e){for(var r=0,n=Fe(e),o=new t(n);n>r;)o[r]=e[r++];return o}(Es(t),e)},Os=Ei.filter,Ss=Qa.aTypedArray;(0,Qa.exportTypedArrayMethod)("filter",(function(t){var e=Os(Ss(this),t,arguments.length>1?arguments[1]:void 0);return As(this,e)}));var Ts=Ei.find,ks=Qa.aTypedArray;(0,Qa.exportTypedArrayMethod)("find",(function(t){return Ts(ks(this),t,arguments.length>1?arguments[1]:void 0)}));var Is=Ei.findIndex,js=Qa.aTypedArray;(0,Qa.exportTypedArrayMethod)("findIndex",(function(t){return Is(js(this),t,arguments.length>1?arguments[1]:void 0)}));var Ps=Ei.forEach,_s=Qa.aTypedArray;(0,Qa.exportTypedArrayMethod)("forEach",(function(t){Ps(_s(this),t,arguments.length>1?arguments[1]:void 0)}));var Ms=ze.includes,Ls=Qa.aTypedArray;(0,Qa.exportTypedArrayMethod)("includes",(function(t){return Ms(Ls(this),t,arguments.length>1?arguments[1]:void 0)}));var Rs=ze.indexOf,Cs=Qa.aTypedArray;(0,Qa.exportTypedArrayMethod)("indexOf",(function(t){return Rs(Cs(this),t,arguments.length>1?arguments[1]:void 0)}));var Ns=ft("iterator"),Ds=O.Uint8Array,Fs=R(Ta.values),Ws=R(Ta.keys),zs=R(Ta.entries),Bs=Qa.aTypedArray,Us=Qa.exportTypedArrayMethod,Gs=Ds&&Ds.prototype,Hs=!j((function(){Gs[Ns].call([1])})),Vs=!!Gs&&Gs.values&&Gs[Ns]===Gs.values&&"values"===Gs.values.name,qs=function(){return Fs(Bs(this))};Us("entries",(function(){return zs(Bs(this))}),Hs),Us("keys",(function(){return Ws(Bs(this))}),Hs),Us("values",qs,Hs||!Vs,{name:"values"}),Us(Ns,qs,Hs||!Vs,{name:"values"});var Zs=Qa.aTypedArray,Ys=Qa.exportTypedArrayMethod,$s=R([].join);Ys("join",(function(t){return $s(Zs(this),t)}));var Ks=Math.min,Qs=[].lastIndexOf,Xs=!!Qs&&1/[1].lastIndexOf(1,-0)<0,Js=Ai("lastIndexOf"),tc=Xs||!Js?function(t){if(Xs)return Dr(Qs,this,arguments)||0;var e=Te(this),r=Fe(e),n=r-1;for(arguments.length>1&&(n=Ks(n,Me(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in e&&e[n]===t)return n||0;return-1}:Qs,ec=Qa.aTypedArray;(0,Qa.exportTypedArrayMethod)("lastIndexOf",(function(t){var e=arguments.length;return Dr(tc,ec(this),e>1?[t,arguments[1]]:[t])}));var rc=Ei.map,nc=Qa.aTypedArray;(0,Qa.exportTypedArrayMethod)("map",(function(t){return rc(nc(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(Es(t))(e)}))}));var oc=TypeError,ic=function(t){return function(e,r,n,o){Mt(r);var i=W(e),a=Se(i),u=Fe(i),s=t?u-1:0,c=t?-1:1;if(n<2)for(;;){if(s in a){o=a[s],s+=c;break}if(s+=c,t?s<0:u<=s)throw oc("Reduce of empty array with no initial value")}for(;t?s>=0:u>s;s+=c)s in a&&(o=r(o,a[s],s,i));return o}},ac={left:ic(!1),right:ic(!0)},uc=ac.left,sc=Qa.aTypedArray;(0,Qa.exportTypedArrayMethod)("reduce",(function(t){var e=arguments.length;return uc(sc(this),t,e,e>1?arguments[1]:void 0)}));var cc=ac.right,fc=Qa.aTypedArray;(0,Qa.exportTypedArrayMethod)("reduceRight",(function(t){var e=arguments.length;return cc(fc(this),t,e,e>1?arguments[1]:void 0)}));var lc=Qa.aTypedArray,hc=Qa.exportTypedArrayMethod,pc=Math.floor;hc("reverse",(function(){for(var t,e=lc(this).length,r=pc(e/2),n=0;n<r;)t=this[n],this[n++]=this[--e],this[e]=t;return this}));var vc=O.RangeError,dc=O.Int8Array,yc=dc&&dc.prototype,gc=yc&&yc.set,mc=Qa.aTypedArray,xc=Qa.exportTypedArrayMethod,bc=!j((function(){var t=new Uint8ClampedArray(2);return St(gc,t,{length:1,0:3},1),3!==t[1]})),wc=bc&&Qa.NATIVE_ARRAY_BUFFER_VIEWS&&j((function(){var t=new dc(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));xc("set",(function(t){mc(this);var e=es(arguments.length>1?arguments[1]:void 0,1),r=W(t);if(bc)return St(gc,this,r,e);var n=this.length,o=Fe(r),i=0;if(o+e>n)throw vc("Wrong length");for(;i<o;)this[e+i]=r[i++]}),!bc||wc);var Ec=Qa.aTypedArray;(0,Qa.exportTypedArrayMethod)("slice",(function(t,e){for(var r=Ur(Ec(this),t,e),n=Es(this),o=0,i=r.length,a=new n(i);i>o;)a[o]=r[o++];return a}),j((function(){new Int8Array(1).slice()})));var Ac=Ei.some,Oc=Qa.aTypedArray;(0,Qa.exportTypedArrayMethod)("some",(function(t){return Ac(Oc(this),t,arguments.length>1?arguments[1]:void 0)}));var Sc=Math.floor,Tc=function(t,e){var r=t.length,n=Sc(r/2);return r<8?kc(t,e):Ic(t,Tc(yu(t,0,n),e),Tc(yu(t,n),e),e)},kc=function(t,e){for(var r,n,o=t.length,i=1;i<o;){for(n=i,r=t[i];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},Ic=function(t,e,r,n){for(var o=e.length,i=r.length,a=0,u=0;a<o||u<i;)t[a+u]=a<o&&u<i?n(e[a],r[u])<=0?e[a++]:r[u++]:a<o?e[a++]:r[u++];return t},jc=Tc,Pc=X.match(/firefox\\/(\\d+)/i),_c=!!Pc&&+Pc[1],Mc=/MSIE|Trident/.test(X),Lc=X.match(/AppleWebKit\\/(\\d+)\\./),Rc=!!Lc&&+Lc[1],Cc=Qa.aTypedArray,Nc=Qa.exportTypedArrayMethod,Dc=O.Uint16Array,Fc=Dc&&Fr(Dc.prototype.sort),Wc=!(!Fc||j((function(){Fc(new Dc(2),null)}))&&j((function(){Fc(new Dc(2),{})}))),zc=!!Fc&&!j((function(){if(nt)return nt<74;if(_c)return _c<67;if(Mc)return!0;if(Rc)return Rc<602;var t,e,r=new Dc(516),n=Array(516);for(t=0;t<516;t++)e=t%4,r[t]=515-t,n[t]=t-2*e+3;for(Fc(r,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(r[t]!==n[t])return!0}));Nc("sort",(function(t){return void 0!==t&&Mt(t),zc?Fc(this,t):jc(Cc(this),function(t){return function(e,r){return void 0!==t?+t(e,r)||0:r!=r?-1:e!=e?1:0===e&&0===r?1/e>0&&1/r<0?1:-1:e>r}}(t))}),!zc||Wc);var Bc=Qa.aTypedArray;(0,Qa.exportTypedArrayMethod)("subarray",(function(t,e){var r=Bc(this),n=r.length,o=Ce(t,n);return new(Es(r))(r.buffer,r.byteOffset+o*r.BYTES_PER_ELEMENT,De((void 0===e?n:Ce(e,n))-o))}));var Uc=O.Int8Array,Gc=Qa.aTypedArray,Hc=Qa.exportTypedArrayMethod,Vc=[].toLocaleString,qc=!!Uc&&j((function(){Vc.call(new Uc(1))}));Hc("toLocaleString",(function(){return Dr(Vc,qc?Ur(Gc(this)):Gc(this),Ur(arguments))}),j((function(){return[1,2].toLocaleString()!=new Uc([1,2]).toLocaleString()}))||!j((function(){Uc.prototype.toLocaleString.call([1,2])})));var Zc=Qa.exportTypedArrayMethod,Yc=O.Uint8Array,$c=Yc&&Yc.prototype||{},Kc=[].toString,Qc=R([].join);j((function(){Kc.call({})}))&&(Kc=function(){return Qc(this)});var Xc=$c.toString!=Kc;Zc("toString",Kc,Xc);var Jc,tf,ef=String,rf=function(t){if("Symbol"===me(t))throw TypeError("Cannot convert a Symbol value to a string");return ef(t)},nf=function(){var t=At(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},of=O.RegExp,af=j((function(){var t=of("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),uf=af||j((function(){return!of("a","y").sticky})),sf={BROKEN_CARET:af||j((function(){var t=of("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:uf,UNSUPPORTED_Y:af},cf=O.RegExp,ff=j((function(){var t=cf(".","s");return!(t.dotAll&&t.exec("\\n")&&"s"===t.flags)})),lf=O.RegExp,hf=j((function(){var t=lf("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),pf=ce.get,vf=I("native-string-replace",String.prototype.replace),df=RegExp.prototype.exec,yf=df,gf=R("".charAt),mf=R("".indexOf),xf=R("".replace),bf=R("".slice),wf=(tf=/b*/g,St(df,Jc=/a/,"a"),St(df,tf,"a"),0!==Jc.lastIndex||0!==tf.lastIndex),Ef=sf.BROKEN_CARET,Af=void 0!==/()??/.exec("")[1];(wf||Af||Ef||ff||hf)&&(yf=function(t){var e,r,n,o,i,a,u,s=this,c=pf(s),f=rf(t),l=c.raw;if(l)return l.lastIndex=s.lastIndex,e=St(yf,l,f),s.lastIndex=l.lastIndex,e;var h=c.groups,p=Ef&&s.sticky,v=St(nf,s),d=s.source,y=0,g=f;if(p&&(v=xf(v,"y",""),-1===mf(v,"g")&&(v+="g"),g=bf(f,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\\n"!==gf(f,s.lastIndex-1))&&(d="(?: "+d+")",g=" "+g,y++),r=new RegExp("^(?:"+d+")",v)),Af&&(r=new RegExp("^"+d+"$(?!\\\\s)",v)),wf&&(n=s.lastIndex),o=St(df,p?r:s,g),p?o?(o.input=bf(o.input,y),o[0]=bf(o[0],y),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:wf&&o&&(s.lastIndex=s.global?o.index+o[0].length:n),Af&&o&&o.length>1&&St(vf,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&h)for(o.groups=a=Qi(null),i=0;i<h.length;i++)a[(u=h[i])[0]]=o[u[1]];return o});var Of=yf;ir({target:"RegExp",proto:!0,forced:/./.exec!==Of},{exec:Of});var Sf,Tf=ft("species"),kf=RegExp.prototype,If=function(t,e,r,n){var o=ft(t),i=!j((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!j((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[Tf]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!a||r){var u=Fr(/./[o]),s=e(o,""[t],(function(t,e,r,n,o){var a=Fr(t),s=e.exec;return s===Of||s===kf.exec?i&&!o?{done:!0,value:u(e,r,n)}:{done:!0,value:a(r,e,n)}:{done:!1}}));le(String.prototype,t,s[0]),le(kf,o,s[1])}n&&ee(kf[o],"sham",!0)},jf=R("".charAt),Pf=R("".charCodeAt),_f=R("".slice),Mf=function(t){return function(e,r){var n,o,i=rf(D(e)),a=Me(r),u=i.length;return a<0||a>=u?t?"":void 0:(n=Pf(i,a))<55296||n>56319||a+1===u||(o=Pf(i,a+1))<56320||o>57343?t?jf(i,a):n:t?_f(i,a,a+2):o-56320+(n-55296<<10)+65536}},Lf={codeAt:Mf(!1),charAt:Mf(!0)},Rf=Lf.charAt,Cf=function(t,e,r){return e+(r?Rf(t,e).length:1)},Nf=Math.floor,Df=R("".charAt),Ff=R("".replace),Wf=R("".slice),zf=/\\$([$&'\`]|\\d{1,2}|<[^>]*>)/g,Bf=/\\$([$&'\`]|\\d{1,2})/g,Uf=function(t,e,r,n,o,i){var a=r+t.length,u=n.length,s=Bf;return void 0!==o&&(o=W(o),s=zf),Ff(i,s,(function(i,s){var c;switch(Df(s,0)){case"$":return"$";case"&":return t;case"\`":return Wf(e,0,r);case"'":return Wf(e,a);case"<":c=o[Wf(s,1,-1)];break;default:var f=+s;if(0===f)return i;if(f>u){var l=Nf(f/10);return 0===l?i:l<=u?void 0===n[l-1]?Df(s,1):n[l-1]+Df(s,1):i}c=n[f-1]}return void 0===c?"":c}))},Gf=TypeError,Hf=function(t,e){var r=t.exec;if($(r)){var n=St(r,t,e);return null!==n&&At(n),n}if("RegExp"===ve(t))return St(Of,t,e);throw Gf("RegExp#exec called on incompatible receiver")},Vf=ft("replace"),qf=Math.max,Zf=Math.min,Yf=R([].concat),$f=R([].push),Kf=R("".indexOf),Qf=R("".slice),Xf="$0"==="a".replace(/./,"$0"),Jf=!!/./[Vf]&&""===/./[Vf]("a","$0");function tl(t){this.message=t}If("replace",(function(t,e,r){var n=Jf?"$":"$0";return[function(t,r){var n=D(this),o=C(t)?void 0:Lt(t,Vf);return o?St(o,t,n,r):St(e,rf(n),t,r)},function(t,o){var i=At(this),a=rf(t);if("string"==typeof o&&-1===Kf(o,n)&&-1===Kf(o,"$<")){var u=r(e,i,a,o);if(u.done)return u.value}var s=$(o);s||(o=rf(o));var c=i.global;if(c){var f=i.unicode;i.lastIndex=0}for(var l=[];;){var h=Hf(i,a);if(null===h)break;if($f(l,h),!c)break;""===rf(h[0])&&(i.lastIndex=Cf(a,De(i.lastIndex),f))}for(var p,v="",d=0,y=0;y<l.length;y++){for(var g=rf((h=l[y])[0]),m=qf(Zf(Me(h.index),a.length),0),x=[],b=1;b<h.length;b++)$f(x,void 0===(p=h[b])?p:String(p));var w=h.groups;if(s){var E=Yf([g],x,m,a);void 0!==w&&$f(E,w);var A=rf(Dr(o,void 0,E))}else A=Uf(g,a,m,x,w,o);m>=d&&(v+=Qf(a,d,m)+A,d=m+g.length)}return v+Qf(a,d)}]}),!!j((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Xf||Jf),tl.prototype=new Error,tl.prototype.name="InvalidCharacterError",ir({global:!0,forced:O.globalThis!==O},{globalThis:O}),Sf="undefined"==typeof window?{devicePixelRatio:1,navigator:{userAgent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36",browserLanguage:"zh-CN",language:"zh-CN",platform:""},location:"",document:{documentElement:{style:{}},createEvent:function(){return!0},getElementById:function(t){return!0},createElement:function(){return{className:"",classList:{add:function(){return""}}}},createElementNS:function(){return!0},addEventListener:function(){return!0},removeEventListener:function(){return!0},querySelector:function(){return!1}},performance:{mark:function(t){return null},clearMeasures:function(t){return null},clearMarks:function(t){return null},measure:function(t,e,r){return{duration:0}},now:function(){return(new Date).getTime()}},Blob:"",dispatchEvent:function(t){return!0},Event:function(t,e){return!0},createElement:function(){return!0},createElementNS:function(){return!0},XMLHttpRequest:function(){return!0},addEventListener:function(){return!0},removeEventListener:function(){return!0},requestAnimationFrame:function(){return!0},cancelAnimationFrame:function(){return!0},clearTimeout:function(){return!0}}:window,"undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM?my.getSystemInfoSync().pixelRatio:Sf.devicePixelRatio;var el=TypeError,rl=Object.getOwnPropertyDescriptor,nl=pt&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}()?function(t,e){if(yi(t)&&!rl(t,"length").writable)throw el("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},ol=TypeError,il=function(t){if(t>9007199254740991)throw ol("Maximum allowed index exceeded");return t},al=Pi("splice"),ul=Math.max,sl=Math.min;ir({target:"Array",proto:!0,forced:!al},{splice:function(t,e){var r,n,o,i,a,u,s=W(this),c=Fe(s),f=Ce(t,c),l=arguments.length;for(0===l?r=n=0:1===l?(r=0,n=c-f):(r=l-2,n=sl(ul(Me(e),0),c-f)),il(c+r-n),o=xi(s,n),i=0;i<n;i++)(a=f+i)in s&&Ii(o,i,s[a]);if(o.length=n,r<n){for(i=f;i<c-n;i++)u=i+r,(a=i+n)in s?s[u]=s[a]:ls(s,u);for(i=c;i>c-n+r;i--)ls(s,i-1)}else if(r>n)for(i=c-n;i>f;i--)u=i+r-1,(a=i+n-1)in s?s[u]=s[a]:ls(s,u);for(i=0;i<r;i++)s[i+f]=arguments[i+2];return nl(s,c-n+r),o}});var cl=u((function t(e,r){i(this,t),s(this,"cancelBubble",void 0),s(this,"cancelable",void 0),s(this,"target",void 0),s(this,"currentTarget",void 0),s(this,"preventDefault",void 0),s(this,"stopPropagation",void 0),s(this,"type",void 0),s(this,"timeStamp",void 0),this.cancelBubble=!1,this.cancelable=!1,this.target=null,this.currentTarget=null,this.preventDefault=function(){},this.stopPropagation=function(){},this.type=e,this.timeStamp=Date.now()})),fl=Object.assign,ll=Object.defineProperty,hl=R([].concat),pl=!fl||j((function(){if(pt&&1!==fl({b:1},fl(ll({},"a",{enumerable:!0,get:function(){ll(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=fl({},t)[r]||"abcdefghijklmnopqrst"!=Hi(fl({},e)).join("")}))?function(t,e){for(var r=W(t),n=arguments.length,o=1,i=Ze.f,a=Ee.f;n>o;)for(var u,s=Se(arguments[o++]),c=i?hl(Hi(s),i(s)):Hi(s),f=c.length,l=0;f>l;)u=c[l++],pt&&!St(a,s,u)||(r[u]=s[u]);return r}:fl;ir({target:"Object",stat:!0,arity:2,forced:Object.assign!==pl},{assign:pl});var vl=Ei.findIndex,dl=!0;"findIndex"in[]&&Array(1).findIndex((function(){dl=!1})),ir({target:"Array",proto:!0,forced:dl},{findIndex:function(t){return vl(this,t,arguments.length>1?arguments[1]:void 0)}}),oa("findIndex");var yl=Lf.charAt,gl=ce.set,ml=ce.getterFor("String Iterator");wa(String,"String",(function(t){gl(this,{type:"String Iterator",string:rf(t),index:0})}),(function(){var t,e=ml(this),r=e.string,n=e.index;return n>=r.length?Ea(void 0,!0):(t=yl(r,n),e.index+=t.length,Ea(t,!1))}));var xl=qe.f,bl="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],wl={f:function(t){return bl&&"Window"==ve(t)?function(t){try{return xl(t)}catch(t){return yu(bl)}}(t):xl(Te(t))}},El=j((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Al=Object.isExtensible,Ol=j((function(){Al(1)}))||El?function(t){return!!dt(t)&&((!El||"ArrayBuffer"!=ve(t))&&(!Al||Al(t)))}:Al,Sl=!j((function(){return Object.isExtensible(Object.preventExtensions({}))})),Tl=b((function(t){var e=Ut.f,r=!1,n=V("meta"),o=0,i=function(t){e(t,n,{value:{objectID:"O"+o++,weakData:{}}})},a=t.exports={enable:function(){a.enable=function(){},r=!0;var t=qe.f,e=R([].splice),o={};o[n]=1,t(o).length&&(qe.f=function(r){for(var o=t(r),i=0,a=o.length;i<a;i++)if(o[i]===n){e(o,i,1);break}return o},ir({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:wl.f}))},fastKey:function(t,e){if(!dt(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!B(t,n)){if(!Ol(t))return"F";if(!e)return"E";i(t)}return t[n].objectID},getWeakData:function(t,e){if(!B(t,n)){if(!Ol(t))return!0;if(!e)return!1;i(t)}return t[n].weakData},onFreeze:function(t){return Sl&&r&&Ol(t)&&!B(t,n)&&i(t),t}};oe[n]=!0})),kl=(Tl.enable,Tl.fastKey,Tl.getWeakData,Tl.onFreeze,function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",a=O[t],u=a&&a.prototype,s=a,c={},f=function(t){var e=R(u[t]);le(u,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(o&&!dt(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return o&&!dt(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(o&&!dt(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(nr(t,!$(a)||!(o||u.forEach&&!j((function(){(new a).entries().next()})))))s=r.getConstructor(e,t,n,i),Tl.enable();else if(nr(t,!0)){var l=new s,h=l[i](o?{}:-0,1)!=l,p=j((function(){l.has(1)})),v=_o((function(t){new a(t)})),d=!o&&j((function(){for(var t=new a,e=5;e--;)t[i](e,e);return!t.has(-0)}));v||((s=e((function(t,e){yr(t,u);var r=ss(new a,t,s);return C(e)||To(e,r[i],{that:r,AS_ENTRIES:n}),r}))).prototype=u,u.constructor=s),(p||d)&&(f("delete"),f("has"),n&&f("get")),(d||h)&&f(i),o&&u.clear&&delete u.clear}return c[t]=s,ir({global:!0,constructor:!0,forced:s!=a},c),hr(s,t),o||r.setStrong(s,t,n),s}),Il=Tl.getWeakData,jl=ce.set,Pl=ce.getterFor,_l=Ei.find,Ml=Ei.findIndex,Ll=R([].splice),Rl=0,Cl=function(t){return t.frozen||(t.frozen=new Nl)},Nl=function(){this.entries=[]},Dl=function(t,e){return _l(t.entries,(function(t){return t[0]===e}))};Nl.prototype={get:function(t){var e=Dl(this,t);if(e)return e[1]},has:function(t){return!!Dl(this,t)},set:function(t,e){var r=Dl(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=Ml(this.entries,(function(e){return e[0]===t}));return~e&&Ll(this.entries,e,1),!!~e}};var Fl,Wl={getConstructor:function(t,e,r,n){var o=t((function(t,o){yr(t,i),jl(t,{type:e,id:Rl++,frozen:void 0}),C(o)||To(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,a=Pl(e),u=function(t,e,r){var n=a(t),o=Il(At(e),!0);return!0===o?Cl(n).set(e,r):o[n.id]=r,t};return ru(i,{delete:function(t){var e=a(this);if(!dt(t))return!1;var r=Il(t);return!0===r?Cl(e).delete(t):r&&B(r,e.id)&&delete r[e.id]},has:function(t){var e=a(this);if(!dt(t))return!1;var r=Il(t);return!0===r?Cl(e).has(t):r&&B(r,e.id)}}),ru(i,r?{get:function(t){var e=a(this);if(dt(t)){var r=Il(t);return!0===r?Cl(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return u(this,t,e)}}:{add:function(t){return u(this,t,!0)}}),o}},zl=ce.enforce,Bl=!O.ActiveXObject&&"ActiveXObject"in O,Ul=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Gl=kl("WeakMap",Ul,Wl);if(Jt&&Bl){Fl=Wl.getConstructor(Ul,"WeakMap",!0),Tl.enable();var Hl=Gl.prototype,Vl=R(Hl.delete),ql=R(Hl.has),Zl=R(Hl.get),Yl=R(Hl.set);ru(Hl,{delete:function(t){if(dt(t)&&!Ol(t)){var e=zl(this);return e.frozen||(e.frozen=new Fl),Vl(this,t)||e.frozen.delete(t)}return Vl(this,t)},has:function(t){if(dt(t)&&!Ol(t)){var e=zl(this);return e.frozen||(e.frozen=new Fl),ql(this,t)||e.frozen.has(t)}return ql(this,t)},get:function(t){if(dt(t)&&!Ol(t)){var e=zl(this);return e.frozen||(e.frozen=new Fl),ql(this,t)?Zl(this,t):e.frozen.get(t)}return Zl(this,t)},set:function(t,e){if(dt(t)&&!Ol(t)){var r=zl(this);r.frozen||(r.frozen=new Fl),ql(this,t)?Yl(this,t,e):r.frozen.set(t,e)}else Yl(this,t,e);return this}})}var $l=ft("iterator"),Kl=ft("toStringTag"),Ql=Ta.values,Xl=function(t,e){if(t){if(t[$l]!==Ql)try{ee(t,$l,Ql)}catch(e){t[$l]=Ql}if(t[Kl]||ee(t,Kl,e),hi[e])for(var r in Ta)if(t[r]!==Ta[r])try{ee(t,r,Ta[r])}catch(e){t[r]=Ta[r]}}};for(var Jl in hi)Xl(O[Jl]&&O[Jl].prototype,Jl);Xl(di,"DOMTokenList");var th,eh,rh,nh,oh=new WeakMap,ih=function(){function t(){i(this,t),oh.set(this,{})}return u(t,[{key:"addEventListener",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=oh.get(this);n||(n={}),n[t]||(n[t]=[]),n[t].push(e),oh.set(this,n),r.capture,r.once,r.passive}},{key:"removeEventListener",value:function(t,e){var r=oh.get(this);if(r){var n=r[t];if(n&&n.length>0)for(var o=n.length;o--;o>0)if(n[o]===e){n.splice(o,1);break}}}},{key:"dispatchEvent",value:function(t){var e=oh.get(this)[t.type];if(e){var r,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=g(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{for(n.s();!(r=n.n()).done;){(0,r.value)(t)}}catch(t){n.e(t)}finally{n.f()}}}}]),t}(),ah=function(t){c(r,t);var e=v(r);function r(){var t;return i(this,r),s(h(t=e.call(this)),"className",void 0),s(h(t),"children",void 0),t.className="",t.children=[],t}return u(r,[{key:"setAttribute",value:function(t,e){this[t]=e}},{key:"getAttribute",value:function(t){return this[t]}},{key:"setAttributeNS",value:function(t,e){this[t]=e}},{key:"getAttributeNS",value:function(t){return this[t]}}]),r}(function(t){c(r,t);var e=v(r);function r(){var t;return i(this,r),s(h(t=e.call(this)),"childNodes",void 0),t.childNodes=[],t}return u(r,[{key:"appendChild",value:function(t){this.childNodes.push(t)}},{key:"cloneNode",value:function(){var t=Object.create(this);return Object.assign(t,this),t}},{key:"removeChild",value:function(t){var e=this.childNodes.findIndex((function(e){return e===t}));return e>-1?this.childNodes.splice(e,1):null}}]),r}(ih));if("undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM){var uh=my.getSystemInfoSync();th=uh.screenWidth,eh=uh.screenHeight,rh=uh.windowWidth,nh=uh.windowHeight}else{var sh=Sf.innerWidth,ch=Sf.innerHeight;th=sh,eh=ch,rh=sh,nh=ch}var fh={width:th,height:eh,availWidth:rh,availHeight:nh,availLeft:0,availTop:0},lh=fh.availWidth,hh=fh.availHeight,ph={style:[]};function vh(t,e){var r,n;"parentNode"in t||(r=0===e?function(){return null}:1===e?function(){return ph}:function(){return null},Object.defineProperty(t,"parentNode",{enumerable:!0,get:r}));"parentElement"in t||(n=0===e?function(){return null}:1===e?function(){return ph}:function(){return null},Object.defineProperty(t,"parentElement",{enumerable:!0,get:n}))}function dh(t){t.style=t.style||{},Object.assign(t.style,{top:"0px",left:"0px",width:lh+"px",height:hh+"px",margin:"0px",padding:"0px"})}function yh(t){"clientLeft"in t||(t.clientLeft=0,t.clientTop=0),"clientWidth"in t||(t.clientWidth=lh,t.clientHeight=hh),"getBoundingClientRect"in t||(t.getBoundingClientRect=function(){return{x:0,y:0,top:0,left:0,width:this.clientWidth,height:this.clientHeight,right:this.clientWidth,bottom:this.clientHeight}})}function gh(t){"offsetLeft"in t||(t.offsetLeft=0,t.offsetTop=0),"offsetWidth"in t||(t.offsetWidth=lh,t.offsetHeight=hh)}function mh(t){"scrollLeft"in t||(t.scrollLeft=0,t.scrollTop=0),"scrollWidth"in t||(t.scrollWidth=lh,t.scrollHeight=hh)}function xh(t){var e=function(){return!0};t.classList=[],t.classList.add=e,t.classList.remove=e,t.classList.contains=e,t.classList.toggle=e}function bh(){}var wh=function(t){c(r,t);var e=v(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1?arguments[1]:void 0;return i(this,r),s(h(t=e.call(this)),"className",void 0),s(h(t),"children",void 0),s(h(t),"focus",void 0),s(h(t),"blur",void 0),s(h(t),"insertBefore",void 0),s(h(t),"appendChild",void 0),s(h(t),"removeChild",void 0),s(h(t),"remove",void 0),s(h(t),"innerHTML",void 0),s(h(t),"tagName",void 0),t.className="",t.children=[],t.focus=bh,t.blur=bh,t.insertBefore=bh,t.appendChild=bh,t.removeChild=bh,t.remove=bh,t.innerHTML="",t.tagName=n.toUpperCase(),vh(h(t),o),dh(h(t)),xh(h(t)),yh(h(t)),gh(h(t)),mh(h(t)),t}return u(r)}(ah),Eh=function(t){c(r,t);var e=v(r);function r(){return i(this,r),e.call(this,"video")}return u(r)}(function(t){c(r,t);var e=v(r);function r(t){return i(this,r),e.call(this,t)}return u(r,[{key:"addTextTrack",value:function(){}},{key:"captureStream",value:function(){}},{key:"fastSeek",value:function(){}},{key:"load",value:function(){}},{key:"pause",value:function(){}},{key:"play",value:function(){}}]),r}(wh)),Ah={};function Oh(){return Ah}var Sh=u((function t(){i(this,t);var e=Oh(),r=e.createImage&&e.createImage()||{};return"tagName"in r||(r.tagName="IMG",r.__proto__=t.prototype),vh(r),xh(r),Object.assign(r,{addEventListener:function(t,e){r["on".concat(t)]=e.bind(r)},removeEventListener:function(t){r["on".concat(t)]=null}}),r})),Th={href:"",protocol:"",host:""},kh=function(t){c(r,t);var e=v(r);function r(){return i(this,r),e.call(this,"body",0)}return u(r,[{key:"addEventListener",value:function(t,e){}},{key:"removeEventListener",value:function(t,e,r){}},{key:"dispatchEvent",value:function(t){}}]),r}(wh),Ih=function(t){c(r,t);var e=v(r);function r(){return i(this,r),e.call(this,"html",0)}return u(r,[{key:"addEventListener",value:function(t,e){}},{key:"removeEventListener",value:function(t,e){}},{key:"dispatchEvent",value:function(t){}}]),r}(wh),jh={},Ph={readyState:"complete",visibilityState:"visible",hidden:!1,fullscreen:!0,scripts:[],style:{},location:Th,ontouchstart:null,ontouchmove:null,ontouchend:null,onvisibilitychange:null,parentNode:null,parentElement:null,head:null,body:null,documentElement:{style:[]},createElement:function(t){return"canvas"===(t=t.toLowerCase())?my.createOffscreenCanvas(1024,128,"2d"):"img"===t?new Sh:"video"===t?new Eh:new wh(t)},createElementNS:function(t,e){return this.createElement(e)},createTextNode:function(t){return t},getElementById:function(t){return null},getElementsByTagName:function(t){return t=t.toLowerCase(),[]},getElementsByTagNameNS:function(t,e){return this.getElementsByTagName(e)},getElementsByName:function(t){return[]},querySelector:function(t){return null},querySelectorAll:function(t){return[]},addEventListener:function(t,e,r){jh[t]||(jh[t]=[]),jh[t].push(e)},removeEventListener:function(t,e){var r=jh[t];if(r&&r.length>0)for(var n=r.length;n--;n>0)if(r[n]===e){r.splice(n,1);break}},dispatchEvent:function(t){var e=t.type,r=jh[e];if(r)for(var n=0;n<r.length;n++)r[n](t);t.target&&"function"==typeof t.target["on"+e]&&t.target["on"+e](t)},createEvent:function(t){return new cl(t)}};Ph.documentElement=new Ih,Ph.head=new wh("head"),Ph.body=new kh,If("match",(function(t,e,r){return[function(e){var r=D(this),n=C(e)?void 0:Lt(e,t);return n?St(n,e,r):new RegExp(e)[t](rf(r))},function(t){var n=At(this),o=rf(t),i=r(e,n,o);if(i.done)return i.value;if(!n.global)return Hf(n,o);var a=n.unicode;n.lastIndex=0;for(var u,s=[],c=0;null!==(u=Hf(n,o));){var f=rf(u[0]);s[c]=f,""===f&&(n.lastIndex=Cf(o,De(n.lastIndex),a)),c++}return 0===c?null:s}]}));var _h,Mh,Lh=ft("isConcatSpreadable"),Rh=nt>=51||!j((function(){var t=[];return t[Lh]=!1,t.concat()[0]!==t})),Ch=Pi("concat"),Nh=function(t){if(!dt(t))return!1;var e=t[Lh];return void 0!==e?!!e:yi(t)};if(ir({target:"Array",proto:!0,arity:1,forced:!Rh||!Ch},{concat:function(t){var e,r,n,o,i,a=W(this),u=xi(a,0),s=0;for(e=-1,n=arguments.length;e<n;e++)if(Nh(i=-1===e?a:arguments[e]))for(o=Fe(i),il(s+o),r=0;r<o;r++,s++)r in i&&Ii(u,s,i[r]);else il(s+1),Ii(u,s++,i);return u.length=s,u}}),"undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM){var Dh=my.getSystemInfoSync();_h=Dh.system,Dh.platform,Dh.language}else{var Fh={versions:(Mh=Sf.navigator.userAgent,{trident:Mh.indexOf("Trident")>-1,presto:Mh.indexOf("Presto")>-1,webKit:Mh.indexOf("AppleWebKit")>-1,gecko:Mh.indexOf("Gecko")>-1&&-1===Mh.indexOf("KHTML"),mobile:!!Mh.match(/AppleWebKit.*Mobile.*/),ios:!!Mh.match(/\\(i[^;]+;( U;)? CPU.+Mac OS X/),android:Mh.indexOf("Android")>-1||Mh.indexOf("Linux")>-1,iPhone:Mh.indexOf("iPhone")>-1,iPad:Mh.indexOf("iPad")>-1,webApp:-1===Mh.indexOf("Safari"),weixin:Mh.indexOf("MicroMessenger")>-1,qq:" qq"===Mh.match(/\\sQQ/i)}),language:(Sf.navigator.browserLanguage||Sf.navigator.language).toLowerCase()};Fh.versions.android?"android":Fh.versions.trident?"IE":Fh.versions.presto?"Opera":Fh.versions.webKit?"webKit":Fh.versions.gecko?"Firefox":Fh.versions.mobile?"mobile":Fh.versions.ios?"ios":Fh.versions.iPhone?"iPhone":Fh.versions.iPad?"ipad":Fh.versions.webApp?"webApp":Fh.versions.weixin?"weixin":Fh.versions.qq&&"qq",_h=Sf.navigator.userAgent,Fh.language}_h.toLowerCase().indexOf("android");cs("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}));var Wh=Ut.f,zh=Tl.fastKey,Bh=ce.set,Uh=ce.getterFor;kl("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),{getConstructor:function(t,e,r,n){var o=t((function(t,o){yr(t,i),Bh(t,{type:e,index:Qi(null),first:void 0,last:void 0,size:0}),pt||(t.size=0),C(o)||To(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,a=Uh(e),u=function(t,e,r){var n,o,i=a(t),u=s(t,e);return u?u.value=r:(i.last=u={index:o=zh(e,!0),key:e,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=u),n&&(n.next=u),pt?i.size++:t.size++,"F"!==o&&(i.index[o]=u)),t},s=function(t,e){var r,n=a(t),o=zh(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return ru(i,{clear:function(){for(var t=a(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,pt?t.size=0:this.size=0},delete:function(t){var e=a(this),r=s(this,t);if(r){var n=r.next,o=r.previous;delete e.index[r.index],r.removed=!0,o&&(o.next=n),n&&(n.previous=o),e.first==r&&(e.first=n),e.last==r&&(e.last=o),pt?e.size--:this.size--}return!!r},forEach:function(t){for(var e,r=a(this),n=zr(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!s(this,t)}}),ru(i,r?{get:function(t){var e=s(this,t);return e&&e.value},set:function(t,e){return u(this,0===t?0:t,e)}}:{add:function(t){return u(this,t=0===t?0:t,t)}}),pt&&Wh(i,"size",{get:function(){return a(this).size}}),o},setStrong:function(t,e,r){var n=e+" Iterator",o=Uh(e),i=Uh(n);wa(t,e,(function(t,e){Bh(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?Ea("keys"==e?r.key:"values"==e?r.value:[r.key,r.value],!1):(t.target=void 0,Ea(void 0,!0))}),r?"entries":"values",!r,!0),vr(e)}});var Gh=R([].join),Hh=Se!=Object,Vh=Ai("join",",");ir({target:"Array",proto:!0,forced:Hh||!Vh},{join:function(t){return Gh(Te(this),void 0===t?",":t)}});var qh=j((function(){Hi(1)}));ir({target:"Object",stat:!0,forced:qh},{keys:function(t){return Hi(W(t))}});var Zh=new Map,Yh=new Map,$h=new Map,Kh=function(t){c(r,t);var e=v(r);function r(){var t;return i(this,r),s(h(t=e.call(this)),"onabort",void 0),s(h(t),"onerror",void 0),s(h(t),"onload",void 0),s(h(t),"onloadstart",void 0),s(h(t),"onprogress",void 0),s(h(t),"ontimeout",void 0),s(h(t),"onloadend",void 0),s(h(t),"onreadystatechange",void 0),s(h(t),"readyState",void 0),s(h(t),"response",void 0),s(h(t),"responseText",void 0),s(h(t),"_responseType",void 0),s(h(t),"responseXML",void 0),s(h(t),"status",void 0),s(h(t),"statusText",void 0),s(h(t),"upload",void 0),s(h(t),"withCredentials",void 0),s(h(t),"timeout",void 0),s(h(t),"_url",void 0),s(h(t),"_method",void 0),t.onabort=null,t.onerror=null,t.onload=null,t.onloadstart=null,t.onprogress=null,t.ontimeout=null,t.onloadend=null,t.onreadystatechange=null,t.readyState=0,t.response=null,t.responseText=null,t._responseType="text",t.responseXML=null,t.status=0,t.statusText="",t.upload={},t.withCredentials=!1,Zh.set("requestHeader",{"content-type":"application/x-www-form-urlencoded"}),t}return u(r,[{key:"responseType",set:function(t){this._responseType=t}},{key:"abort",value:function(){var t=$h.get("requestTask");t&&t.abort()}},{key:"getAllResponseHeaders",value:function(){var t=Yh.get("responseHeader");return Object.keys(t).map((function(e){return"".concat(e,": ").concat(t[e])})).join("\\n")}},{key:"getResponseHeader",value:function(t){return Yh.get("responseHeader")[t]}},{key:"open",value:function(t,e,r){this._method=t,this._url=e}},{key:"overrideMimeType",value:function(){}},{key:"send",value:function(){}},{key:"setRequestHeader",value:function(t,e){var r=Zh.get("requestHeader");r[t]=e,Zh.set("requestHeader",r)}},{key:"addEventListener",value:function(t,e){var r=this;"function"==typeof e&&(this["on"+t]=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.target=t.target||r,e.call(r,t)})}},{key:"removeEventListener",value:function(t,e){this["on"+t]===e&&(this["on"+t]=null)}}]),r}(ih);s(Kh,"UNSEND",void 0),s(Kh,"OPENED",void 0),s(Kh,"HEADERS_RECEIVED",void 0),s(Kh,"LOADING",void 0),s(Kh,"DONE",void 0),Kh.UNSEND=0,Kh.OPENED=1,Kh.HEADERS_RECEIVED=2,Kh.LOADING=3,Kh.DONE=4;var Qh="undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM,Xh="undefined"!=typeof wx&&null!==wx&&(void 0!==wx.request||void 0!==wx.miniProgram),Jh=Qh||Xh;Jh||Sf.XMLHttpRequest,Jh||Sf.location;function tp(t){return[t+1&255,t+1>>8&255,t+1>>8>>8&255]}var ep=Ei.filter,rp=Pi("filter");function np(t){var e=t.color;return e&&e.length?e:[1,1,1,1]}function op(t,e,r){return 2===r.length?[r[0],r[1],0]:[r[0],r[1],r[2]]}function ip(t){return t.filter?[1]:[0]}function ap(t,e){return[e]}ir({target:"Array",proto:!0,forced:!rp},{filter:function(t){return ep(this,t,arguments.length>1?arguments[1]:void 0)}});var up=cp,sp=cp;function cp(t,e,r){r=r||2;var n,o,i,a,u,s,c,f=e&&e.length,l=f?e[0]*r:t.length,h=fp(t,0,l,r,!0),p=[];if(!h||h.next===h.prev)return p;if(f&&(h=function(t,e,r,n){var o,i,a,u,s,c=[];for(o=0,i=e.length;o<i;o++)a=e[o]*n,u=o<i-1?e[o+1]*n:t.length,(s=fp(t,a,u,n,!1))===s.next&&(s.steiner=!0),c.push(wp(s));for(c.sort(gp),o=0;o<c.length;o++)r=mp(c[o],r);return r}(t,e,h,r)),t.length>80*r){n=i=t[0],o=a=t[1];for(var v=r;v<l;v+=r)(u=t[v])<n&&(n=u),(s=t[v+1])<o&&(o=s),u>i&&(i=u),s>a&&(a=s);c=0!==(c=Math.max(i-n,a-o))?32767/c:0}return hp(h,p,r,n,o,c,0),p}function fp(t,e,r,n,o){var i,a;if(o===Rp(t,e,r,n)>0)for(i=e;i<r;i+=n)a=_p(i,t[i],t[i+1],a);else for(i=r-n;i>=e;i-=n)a=_p(i,t[i],t[i+1],a);return a&&Sp(a,a.next)&&(Mp(a),a=a.next),a}function lp(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!Sp(n,n.next)&&0!==Op(n.prev,n,n.next))n=n.next;else{if(Mp(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function hp(t,e,r,n,o,i,a){if(t){!a&&i&&function(t,e,r,n){var o=t;do{0===o.z&&(o.z=bp(o.x,o.y,e,r,n)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==t);o.prevZ.nextZ=null,o.prevZ=null,function(t){var e,r,n,o,i,a,u,s,c=1;do{for(r=t,t=null,i=null,a=0;r;){for(a++,n=r,u=0,e=0;e<c&&(u++,n=n.nextZ);e++);for(s=c;u>0||s>0&&n;)0!==u&&(0===s||!n||r.z<=n.z)?(o=r,r=r.nextZ,u--):(o=n,n=n.nextZ,s--),i?i.nextZ=o:t=o,o.prevZ=i,i=o;r=n}i.nextZ=null,c*=2}while(a>1)}(o)}(t,n,o,i);for(var u,s,c=t;t.prev!==t.next;)if(u=t.prev,s=t.next,i?vp(t,n,o,i):pp(t))e.push(u.i/r|0),e.push(t.i/r|0),e.push(s.i/r|0),Mp(t),t=s.next,c=s.next;else if((t=s)===c){a?1===a?hp(t=dp(lp(t),e,r),e,r,n,o,i,2):2===a&&yp(t,e,r,n,o,i):hp(lp(t),e,r,n,o,i,1);break}}}function pp(t){var e=t.prev,r=t,n=t.next;if(Op(e,r,n)>=0)return!1;for(var o=e.x,i=r.x,a=n.x,u=e.y,s=r.y,c=n.y,f=o<i?o<a?o:a:i<a?i:a,l=u<s?u<c?u:c:s<c?s:c,h=o>i?o>a?o:a:i>a?i:a,p=u>s?u>c?u:c:s>c?s:c,v=n.next;v!==e;){if(v.x>=f&&v.x<=h&&v.y>=l&&v.y<=p&&Ep(o,u,i,s,a,c,v.x,v.y)&&Op(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function vp(t,e,r,n){var o=t.prev,i=t,a=t.next;if(Op(o,i,a)>=0)return!1;for(var u=o.x,s=i.x,c=a.x,f=o.y,l=i.y,h=a.y,p=u<s?u<c?u:c:s<c?s:c,v=f<l?f<h?f:h:l<h?l:h,d=u>s?u>c?u:c:s>c?s:c,y=f>l?f>h?f:h:l>h?l:h,g=bp(p,v,e,r,n),m=bp(d,y,e,r,n),x=t.prevZ,b=t.nextZ;x&&x.z>=g&&b&&b.z<=m;){if(x.x>=p&&x.x<=d&&x.y>=v&&x.y<=y&&x!==o&&x!==a&&Ep(u,f,s,l,c,h,x.x,x.y)&&Op(x.prev,x,x.next)>=0)return!1;if(x=x.prevZ,b.x>=p&&b.x<=d&&b.y>=v&&b.y<=y&&b!==o&&b!==a&&Ep(u,f,s,l,c,h,b.x,b.y)&&Op(b.prev,b,b.next)>=0)return!1;b=b.nextZ}for(;x&&x.z>=g;){if(x.x>=p&&x.x<=d&&x.y>=v&&x.y<=y&&x!==o&&x!==a&&Ep(u,f,s,l,c,h,x.x,x.y)&&Op(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;b&&b.z<=m;){if(b.x>=p&&b.x<=d&&b.y>=v&&b.y<=y&&b!==o&&b!==a&&Ep(u,f,s,l,c,h,b.x,b.y)&&Op(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function dp(t,e,r){var n=t;do{var o=n.prev,i=n.next.next;!Sp(o,i)&&Tp(o,n,n.next,i)&&jp(o,i)&&jp(i,o)&&(e.push(o.i/r|0),e.push(n.i/r|0),e.push(i.i/r|0),Mp(n),Mp(n.next),n=t=i),n=n.next}while(n!==t);return lp(n)}function yp(t,e,r,n,o,i){var a=t;do{for(var u=a.next.next;u!==a.prev;){if(a.i!==u.i&&Ap(a,u)){var s=Pp(a,u);return a=lp(a,a.next),s=lp(s,s.next),hp(a,e,r,n,o,i,0),void hp(s,e,r,n,o,i,0)}u=u.next}a=a.next}while(a!==t)}function gp(t,e){return t.x-e.x}function mp(t,e){var r=function(t,e){var r,n=e,o=t.x,i=t.y,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var u=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(u<=o&&u>a&&(a=u,r=n.x<n.next.x?n:n.next,u===o))return r}n=n.next}while(n!==e);if(!r)return null;var s,c=r,f=r.x,l=r.y,h=1/0;n=r;do{o>=n.x&&n.x>=f&&o!==n.x&&Ep(i<l?o:a,i,f,l,i<l?a:o,i,n.x,n.y)&&(s=Math.abs(i-n.y)/(o-n.x),jp(n,t)&&(s<h||s===h&&(n.x>r.x||n.x===r.x&&xp(r,n)))&&(r=n,h=s)),n=n.next}while(n!==c);return r}(t,e);if(!r)return e;var n=Pp(r,t);return lp(n,n.next),lp(r,r.next)}function xp(t,e){return Op(t.prev,t,e.prev)<0&&Op(e.next,t,t.next)<0}function bp(t,e,r,n,o){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*o|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*o|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function wp(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function Ep(t,e,r,n,o,i,a,u){return(o-a)*(e-u)>=(t-a)*(i-u)&&(t-a)*(n-u)>=(r-a)*(e-u)&&(r-a)*(i-u)>=(o-a)*(n-u)}function Ap(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&Tp(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(jp(t,e)&&jp(e,t)&&function(t,e){var r=t,n=!1,o=(t.x+e.x)/2,i=(t.y+e.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&o<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(Op(t.prev,t,e.prev)||Op(t,e.prev,e))||Sp(t,e)&&Op(t.prev,t,t.next)>0&&Op(e.prev,e,e.next)>0)}function Op(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Sp(t,e){return t.x===e.x&&t.y===e.y}function Tp(t,e,r,n){var o=Ip(Op(t,e,r)),i=Ip(Op(t,e,n)),a=Ip(Op(r,n,t)),u=Ip(Op(r,n,e));return o!==i&&a!==u||(!(0!==o||!kp(t,r,e))||(!(0!==i||!kp(t,n,e))||(!(0!==a||!kp(r,t,n))||!(0!==u||!kp(r,e,n)))))}function kp(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function Ip(t){return t>0?1:t<0?-1:0}function jp(t,e){return Op(t.prev,t,t.next)<0?Op(t,e,t.next)>=0&&Op(t,t.prev,e)>=0:Op(t,e,t.prev)<0||Op(t,t.next,e)<0}function Pp(t,e){var r=new Lp(t.i,t.x,t.y),n=new Lp(e.i,e.x,e.y),o=t.next,i=e.prev;return t.next=e,e.prev=t,r.next=o,o.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function _p(t,e,r,n){var o=new Lp(t,e,r);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function Mp(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Lp(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Rp(t,e,r,n){for(var o=0,i=e,a=r-n;i<r;i+=n)o+=(t[a]-t[i])*(t[i+1]+t[a+1]),a=i;return o}cp.deviation=function(t,e,r,n){var o=e&&e.length,i=o?e[0]*r:t.length,a=Math.abs(Rp(t,0,i,r));if(o)for(var u=0,s=e.length;u<s;u++){var c=e[u]*r,f=u<s-1?e[u+1]*r:t.length;a-=Math.abs(Rp(t,c,f,r))}var l=0;for(u=0;u<n.length;u+=3){var h=n[u]*r,p=n[u+1]*r,v=n[u+2]*r;l+=Math.abs((t[h]-t[v])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[v+1]-t[h+1]))}return 0===a&&0===l?0:Math.abs((l-a)/a)},cp.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,o=0;o<t.length;o++){for(var i=0;i<t[o].length;i++)for(var a=0;a<e;a++)r.vertices.push(t[o][i][a]);o>0&&(n+=t[o-1].length,r.holes.push(n))}return r},up.default=sp;var Cp=R(1..valueOf),Np=R("".replace),Dp="[\\t\\n\\v\\f\\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\\u2028\\u2029\\ufeff]",Fp=RegExp("^"+Dp+Dp+"*"),Wp=RegExp(Dp+Dp+"*$"),zp=function(t){return function(e){var r=rf(D(e));return 1&t&&(r=Np(r,Fp,"")),2&t&&(r=Np(r,Wp,"")),r}},Bp={start:zp(1),end:zp(2),trim:zp(3)},Up=qe.f,Gp=Ie.f,Hp=Ut.f,Vp=Bp.trim,qp=O.Number,Zp=qp.prototype,Yp=O.TypeError,$p=R("".slice),Kp=R("".charCodeAt),Qp=function(t){var e=Dt(t,"number");return"bigint"==typeof e?e:Xp(e)},Xp=function(t){var e,r,n,o,i,a,u,s,c=Dt(t,"number");if(It(c))throw Yp("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=Vp(c),43===(e=Kp(c,0))||45===e){if(88===(r=Kp(c,2))||120===r)return NaN}else if(48===e){switch(Kp(c,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(a=(i=$p(c,2)).length,u=0;u<a;u++)if((s=Kp(i,u))<48||s>o)return NaN;return parseInt(i,n)}return+c};if(nr("Number",!qp(" 0o1")||!qp("0b1")||qp("+0x1"))){for(var Jp,tv=function(t){var e=arguments.length<1?0:qp(Qp(t)),r=this;return Tt(Zp,r)&&j((function(){Cp(r)}))?ss(Object(e),r,tv):e},ev=pt?Up(qp):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),rv=0;ev.length>rv;rv++)B(qp,Jp=ev[rv])&&!B(tv,Jp)&&Hp(tv,Jp,Gp(qp,Jp));tv.prototype=Zp,Zp.constructor=tv,le(O,"Number",tv,{constructor:!0})}var nv=RangeError,ov=RangeError,iv=String,av=Math.floor,uv=R((function(t){var e=rf(D(this)),r="",n=Me(t);if(n<0||n==1/0)throw nv("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(r+=e);return r})),sv=R("".slice),cv=R(1..toFixed),fv=function(t,e,r){return 0===e?r:e%2==1?fv(t,e-1,r*t):fv(t*t,e/2,r)},lv=function(t,e,r){for(var n=-1,o=r;++n<6;)o+=e*t[n],t[n]=o%1e7,o=av(o/1e7)},hv=function(t,e){for(var r=6,n=0;--r>=0;)n+=t[r],t[r]=av(n/e),n=n%e*1e7},pv=function(t){for(var e=6,r="";--e>=0;)if(""!==r||0===e||0!==t[e]){var n=iv(t[e]);r=""===r?n:r+uv("0",7-n.length)+n}return r},vv=j((function(){return"0.000"!==cv(8e-5,3)||"1"!==cv(.9,0)||"1.25"!==cv(1.255,2)||"1000000000000000128"!==cv(0xde0b6b3a7640080,0)}))||!j((function(){cv({})}));function dv(t){return"number"==typeof t}function yv(t){var e=Math.max(Math.min(85.0511287798,t[1]),-85.0511287798),r=Math.PI/180,n=t[0]*r,o=e*r;o=Math.log(Math.tan(Math.PI/4+o/2));return n=(256<<20)*(.5/Math.PI*n+.5),o=(256<<20)*(-.5/Math.PI*o+(r=.5)),[Math.floor(n),Math.floor(o)]}ir({target:"Number",proto:!0,forced:vv},{toFixed:function(t){var e,r,n,o,i=Cp(this),a=Me(t),u=[0,0,0,0,0,0],s="",c="0";if(a<0||a>20)throw ov("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return iv(i);if(i<0&&(s="-",i=-i),i>1e-21)if(r=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(i*fv(2,69,1))-69)<0?i*fv(2,-e,1):i/fv(2,e,1),r*=4503599627370496,(e=52-e)>0){for(lv(u,0,r),n=a;n>=7;)lv(u,1e7,0),n-=7;for(lv(u,fv(10,n,1),0),n=e-1;n>=23;)hv(u,1<<23),n-=23;hv(u,1<<n),lv(u,1,1),hv(u,2),c=pv(u)}else lv(u,0,r),lv(u,1<<-e,0),c=pv(u)+uv("0",a);return c=a>0?s+((o=c.length)<=a?"0."+uv("0",a-o)+c:sv(c,0,o-a)+"."+sv(c,o-a)):s+c}});var gv,mv=/"/g,xv=R("".replace);ir({target:"String",proto:!0,forced:(gv="sub",j((function(){var t=""[gv]('"');return t!==t.toLowerCase()||t.split('"').length>3})))},{sub:function(){return t="sub",e="",r="",n=rf(D(this)),o="<"+t,""!==e&&(o+=" "+e+'="'+xv(rf(r),mv,""")+'"'),o+">"+n+"</"+t+">";var t,e,r,n,o}});var bv=RegExp.prototype,wv=qt.PROPER,Ev=RegExp.prototype.toString,Av=j((function(){return"/a/b"!=Ev.call({source:"a",flags:"b"})})),Ov=wv&&"toString"!=Ev.name;(Av||Ov)&&le(RegExp.prototype,"toString",(function(){var t=At(this);return"/"+rf(t.source)+"/"+rf(function(t){var e=t.flags;return void 0!==e||"flags"in bv||B(t,"flags")||!Tt(bv,t)?e:St(nf,t)}(t))}),{unsafe:!0});var Sv="undefined"!=typeof Float32Array?Float32Array:Array;function Tv(){var t=new Sv(2);return Sv!=Float32Array&&(t[0]=0,t[1]=0),t}function kv(t,e){var r=new Sv(2);return r[0]=t,r[1]=e,r}function Iv(t,e){return t[0]=e[0],t[1]=e[1],t}function jv(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function Pv(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function _v(t,e){var r=e[0],n=e[1],o=r*r+n*n;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t}function Mv(t,e){return t[0]*e[0]+t[1]*e[1]}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var Lv,Rv=Pv,Cv=(Lv=Tv(),Tv()),Nv=(Tv(),Tv()),Dv=Tv(),Fv=Tv();function Wv(t,e,r,n,o){return jv(t,r,n),_v(t,t),[o/Mv(e=kv(-t[1],t[0]),kv(-r[1],r[0])),e]}function zv(t,e){return function(t,e,r){return t[0]=e,t[1]=r,t}(t,-e[1],e[0])}function Bv(t,e,r){return Rv(t,e,r),_v(t,t),t}function Uv(t,e){return t[0]===e[0]&&t[1]===e[1]}var Gv=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),s(this,"complex",void 0),s(this,"join",void 0),s(this,"cap",void 0),s(this,"miterLimit",void 0),s(this,"thickness",void 0),s(this,"normal",void 0),s(this,"lastFlip",-1),s(this,"miter",kv(0,0)),s(this,"started",!1),s(this,"dash",!1),s(this,"totalDistance",0),s(this,"currentIndex",0),this.join=e.join||"miter",this.cap=e.cap||"butt",this.miterLimit=e.miterLimit||10,this.thickness=e.thickness||1,this.dash=e.dash||!1,this.complex={positions:[],indices:[],normals:[],startIndex:0,indexes:[]}}return u(t,[{key:"extrude_gaode2",value:function(t,e){var r=this.complex;if(t.length<=1)return r;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var n=t.length,o=r.startIndex,i=1;i<n;i++){var a,u,s,c=t[i-1];c.push(null!==(a=e[i-1][2])&&void 0!==a?a:0);var f=e[i-1],l=t[i];l.push(null!==(u=e[i][2])&&void 0!==u?u:0);var h=e[i],p=i<t.length-1?[].concat(y(t[i+1]),[null!==(s=e[i+1][2])&&void 0!==s?s:0]):null,v=i<e.length-1?e[i+1]:null;o+=this.segment_gaode2(r,o,c,l,p,f,h,v)}if(this.dash)for(var d=0;d<r.positions.length/6;d++)r.positions[6*d+5]=this.totalDistance;return r.startIndex=r.positions.length/6,r}},{key:"simpleExtrude_gaode2",value:function(t,e){var r=this.complex;if(t.length<=1)return r;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var n=t.length,o=r.startIndex,i=1;i<n;i++){var a,u,s,c=t[i-1];c.push(null!==(a=e[i-1][2])&&void 0!==a?a:0);var f=e[i-1],l=t[i];l.push(null!==(u=e[i][2])&&void 0!==u?u:0);var h=e[i],p=i<t.length-1?[].concat(y(t[i+1]),[null!==(s=e[i+1][2])&&void 0!==s?s:0]):null,v=i<e.length-1?e[i+1]:null;o+=this.simpleSegment(r,o,c,l,p,f,h,v)}if(this.dash)for(var d=0;d<r.positions.length/6;d++)r.positions[6*d+5]=this.totalDistance;return r.startIndex=r.positions.length/6,r}},{key:"extrude",value:function(t){var e=this.complex;if(t.length<=1)return e;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var r=t.length,n=e.startIndex,o=1;o<r;o++){var i=t[o-1],a=t[o],u=o<t.length-1?t[o+1]:null;n+=this.segment(e,n,i,a,u)}if(this.dash)for(var s=0;s<e.positions.length/6;s++)e.positions[6*s+5]=this.totalDistance;return e.startIndex=e.positions.length/6,e}},{key:"simpleExtrude",value:function(t){var e=this.complex;if(t.length<=1)return e;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var r=t.length,n=e.startIndex,o=1;o<r;o++){var i=t[o-1],a=t[o],u=o<t.length-1?t[o+1]:null;n+=this.simpleSegment(e,n,i,a,u)}if(this.dash)for(var s=0;s<e.positions.length/6;s++)e.positions[6*s+5]=this.totalDistance;return e.startIndex=e.positions.length/6,e}},{key:"segment_gaode2",value:function(t,e,r,n,o,i,a,u){var s=0,c=t.indices,f=t.positions,l=t.normals,h="square"===this.cap,p="bevel"===this.join,v=yv([a[0],a[1]]),g=yv([i[0],i[1]]);Bv(Nv,n,r);var m=0;if(this.dash&&(m=this.lineSegmentDistance(v,g),this.totalDistance+=m),this.normal||(this.normal=Tv(),zv(this.normal,Nv)),!this.started)if(this.started=!0,h){var x=Tv(),b=Tv();jv(x,this.normal,Nv),jv(b,this.normal,Nv),l.push(b[0],b[1],0),l.push(x[0],x[1],0),f.push(r[0],r[1],0|r[2],this.totalDistance-m,-this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),f.push(r[0],r[1],0|r[2],this.totalDistance-m,this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(f,l,r,this.normal,this.thickness,this.totalDistance-m);if(c.push(e+0,e+1,e+2),o){Uv(n,o)&&jv(o,n,_v(o,Pv(o,n,r))),Bv(Dv,o,n);var w=d(Wv(Fv,Tv(),Nv,Dv,this.thickness),2),E=w[0],A=w[1],O=Mv(Fv,this.normal)<0?-1:1,S=p;if(!S&&"miter"===this.join)E>this.miterLimit&&(S=!0);S?(l.push(this.normal[0],this.normal[1],0),l.push(A[0],A[1],0),f.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*O,0|n[2]),this.complex.indexes.push(this.currentIndex),f.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness*O,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,c.push.apply(c,y(this.lastFlip!==-O?[e,e+2,e+3]:[e+2,e+1,e+3])),c.push(e+2,e+3,e+4),zv(Cv,Dv),Iv(this.normal,Cv),l.push(this.normal[0],this.normal[1],0),f.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*O,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,s+=3):(this.extrusions(f,l,n,A,E,this.totalDistance),c.push.apply(c,y(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),O=-1,Iv(this.normal,A),s+=2),this.lastFlip=O}else{if(zv(this.normal,Nv),h){var T=Tv(),k=Tv();Rv(k,Nv,this.normal),jv(T,Nv,this.normal),l.push(k[0],k[1],0),l.push(T[0],T[1],0),f.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),f.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(f,l,n,this.normal,this.thickness,this.totalDistance);c.push.apply(c,y(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),s+=2}return s}},{key:"simpleSegment",value:function(t,e,r,n,o){var i=0,a=t.indices,u=t.positions,s=t.normals,c=yv([n[0],n[1]]),f=yv([r[0],r[1]]);Bv(Nv,c,f);var l=0;if(this.dash&&(l=this.lineSegmentDistance(c,f),this.totalDistance+=l),this.normal||(this.normal=Tv(),zv(this.normal,Nv)),this.started||(this.started=!0,this.extrusions(u,s,r,this.normal,this.thickness,this.totalDistance-l)),a.push(e+0,e+1,e+2),o){var h=yv([o[0],o[1]]);Uv(c,h)&&jv(h,c,_v(h,Pv(h,c,f))),Bv(Dv,h,c);var p=d(Wv(Fv,Tv(),Nv,Dv,this.thickness),2),v=p[0],g=p[1];Mv(Fv,this.normal);this.extrusions(u,s,n,g,v,this.totalDistance),a.push.apply(a,y(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),-1,Iv(this.normal,g),i+=2,this.lastFlip=-1}else zv(this.normal,Nv),this.extrusions(u,s,n,this.normal,this.thickness,this.totalDistance),a.push.apply(a,y(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),i+=2;return i}},{key:"segment",value:function(t,e,r,n,o){var i=0,a=t.indices,u=t.positions,s=t.normals,c="square"===this.cap,f="bevel"===this.join,l=yv([n[0],n[1]]),h=yv([r[0],r[1]]);Bv(Nv,l,h);var p=0;if(this.dash&&(p=this.lineSegmentDistance(l,h),this.totalDistance+=p),this.normal||(this.normal=Tv(),zv(this.normal,Nv)),!this.started)if(this.started=!0,c){var v=Tv(),g=Tv();jv(v,this.normal,Nv),jv(g,this.normal,Nv),s.push(g[0],g[1],0),s.push(v[0],v[1],0),u.push(r[0],r[1],0|r[2],this.totalDistance-p,-this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),u.push(r[0],r[1],0|r[2],this.totalDistance-p,this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(u,s,r,this.normal,this.thickness,this.totalDistance-p);if(a.push(e+0,e+1,e+2),o){var m=yv([o[0],o[1]]);Uv(l,m)&&jv(m,l,_v(m,Pv(m,l,h))),Bv(Dv,m,l);var x=d(Wv(Fv,Tv(),Nv,Dv,this.thickness),2),b=x[0],w=x[1],E=Mv(Fv,this.normal)<0?-1:1,A=f;if(!A&&"miter"===this.join)b>this.miterLimit&&(A=!0);A?(s.push(this.normal[0],this.normal[1],0),s.push(w[0],w[1],0),u.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*E,0|n[2]),this.complex.indexes.push(this.currentIndex),u.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness*E,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,a.push.apply(a,y(this.lastFlip!==-E?[e,e+2,e+3]:[e+2,e+1,e+3])),a.push(e+2,e+3,e+4),zv(Cv,Dv),Iv(this.normal,Cv),s.push(this.normal[0],this.normal[1],0),u.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*E,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,i+=3):(this.extrusions(u,s,n,w,b,this.totalDistance),a.push.apply(a,y(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),E=-1,Iv(this.normal,w),i+=2),this.lastFlip=E}else{if(zv(this.normal,Nv),c){var O=Tv(),S=Tv();Rv(S,Nv,this.normal),jv(O,Nv,this.normal),s.push(S[0],S[1],0),s.push(O[0],O[1],0),u.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),u.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(u,s,n,this.normal,this.thickness,this.totalDistance);a.push.apply(a,y(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),i+=2}return i}},{key:"extrusions",value:function(t,e,r,n,o,i){e.push(n[0],n[1],0),e.push(n[0],n[1],0),t.push(r[0],r[1],0|r[2],i,-o,0|r[2]),this.complex.indexes.push(this.currentIndex),t.push(r[0],r[1],0|r[2],i,o,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}},{key:"lineSegmentDistance",value:function(t,e){var r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)}}]),t}();function Hv(t){var e=t.coordinates,r=t.originCoordinates,n=t.version,o=new Gv({dash:!0,join:"bevel"});if("GAODE2.x"===n){var i=e;Array.isArray(i[0][0])||(i=[e]);var a=r;Array.isArray(a[0][0])||(a=[r]);for(var u=0;u<i.length;u++){var s=i[u],c=a[u];o.extrude_gaode2(s,c)}}else{var f=e;f[0]&&!Array.isArray(f[0][0])&&(f=[e]),f.forEach((function(t){o.extrude(t)}))}var l=o.complex;return{vertices:l.positions,indices:l.indices,normals:l.normals,indexes:l.indexes,size:6}}function Vv(t){var e=function(t){if(dv(t[0]))return t;if(dv(t[0][0]))throw new Error("\u5F53\u524D\u6570\u636E\u4E0D\u652F\u6301\u6807\u6CE8");if(dv(t[0][0][0])){var e=0,r=0,n=0;return t.forEach((function(t){t.forEach((function(t){e+=t[0],r+=t[1],n++}))})),[e/n,r/n,0]}throw new Error("\u5F53\u524D\u6570\u636E\u4E0D\u652F\u6301\u6807\u6CE8")}(t.coordinates);return{vertices:[].concat(y(e),y(e),y(e),y(e)),indices:[0,1,2,2,3,0],size:e.length}}function qv(t){var e=t.coordinates,r=up.flatten(e),n=r.vertices,o=r.dimensions,i=r.holes;return{indices:up(n,i,o),vertices:n,size:o}}var Zv=function(){var t=o(r().mark((function t(e){var n,o,i,a,u,s,c,f,l;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.descriptors,o=e.features,i=e.enablePicking,a=e.iconMap,u={a_Color:np,a_Position:op,filter:ip,a_vertexId:ap,a_PickingColor:function(t){var e=t.id;return i?tp(e):[0,0,0]},a_DistanceAndIndex:function(t,e,r,n,o,i){return void 0===i?[r[3],10]:[r[3],i]},a_Total_Distance:function(t,e,r){return[r[5]]},a_Size:function(t){var e=t.size,r=void 0===e?1:e;return Array.isArray(r)?[r[0],r[1]]:[r,0]},a_Normal:function(t,e,r,n,o){return o},a_Miter:function(t,e,r){return[r[4]]},a_iconMapUV:function(t){var e=t.texture,r=a[e]||{x:0,y:0};return[r.x,r.y]}},s={sizePerElement:0,elements:[]},c=0,f=[],l=3,o.forEach((function(t,e){var r=Hv(t),o=r.indices,i=r.vertices,a=r.normals,h=r.size,p=r.indexes;o.forEach((function(t){f.push(t+c)})),l=h;var v=i.length/h;s.sizePerElement=l,s.elements.push({featureIdx:e,vertices:i,normals:a,offset:c}),c+=v;for(var d=function(r){var o=(null==a?void 0:a.slice(3*r,3*r+3))||[],s=i.slice(r*h,r*h+h),c=0;p&&void 0!==p[r]&&(c=p[r]),n.forEach((function(n){var i;n&&u[n.name]&&(i=n.buffer.data).push.apply(i,y(u[n.name](t,e,s,r,o,c)))}))},g=0;g<v;g++)d(g)})),t.abrupt("return",{descriptors:n,featureLayout:s,indices:f});case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Yv={pointFill:function(){var t=o(r().mark((function t(e){var n,o,i,a,u,s,c,f,l;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.descriptors,o=e.features,i=e.enablePicking,a=e.shape2d,u={a_Color:np,a_Position:op,filter:ip,a_vertexId:ap,a_PickingColor:function(t){var e=t.id;return i?tp(e):[0,0,0]},a_Shape:function(t){var e=t.shape,r=void 0===e?2:e;return[a.indexOf(r)]},a_Extrude:function(t,e,r,n){var o=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],i=n%4*3;return[o[i],o[i+1],o[i+2]]},a_Size:function(t){var e=t.size,r=void 0===e?5:e;return Array.isArray(r)?[r[0]]:[r]}},s={sizePerElement:0,elements:[]},c=0,f=[],l=3,o.forEach((function(t,e){var r=Vv(t),o=r.indices,i=r.vertices,a=r.normals,h=r.size;o.forEach((function(t){f.push(t+c)})),l=h;var p=i.length/h;s.sizePerElement=l,s.elements.push({featureIdx:e,vertices:i,normals:a,offset:c}),c+=p;for(var v=function(r){var o=[],a=i.slice(r*h,r*h+h);n.forEach((function(n){var i;n&&u[n.name]&&(i=n.buffer.data).push.apply(i,y(u[n.name](t,e,a,r,o,0)))}))},d=0;d<p;d++)v(d)})),t.abrupt("return",{descriptors:n,featureLayout:s,indices:f});case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),line:Zv,polygonFill:function(){var t=o(r().mark((function t(e){var n,o,i,a,u,s,c,f;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.descriptors,o=e.features,i=e.enablePicking,a={a_Color:np,a_Position:op,filter:ip,a_vertexId:ap,a_PickingColor:function(t){var e=t.id;return i?tp(e):[0,0,0]}},u={sizePerElement:0,elements:[]},s=0,c=[],f=3,o.forEach((function(t,e){var r=qv(t),o=r.indices,i=r.vertices,l=r.normals,h=r.size;o.forEach((function(t){c.push(t+s)})),f=h;var p=i.length/h;u.sizePerElement=f,u.elements.push({featureIdx:e,vertices:i,normals:l,offset:s}),s+=p;for(var v=function(r){var o=[],u=i.slice(r*h,r*h+h);n.forEach((function(n){var i;n&&a[n.name]&&(i=n.buffer.data).push.apply(i,y(a[n.name](t,e,u,r,o,0)))}))},d=0;d<p;d++)v(d)})),t.abrupt("return",{descriptors:n,featureLayout:u,indices:c});case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},$v=function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?e(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Yv);function Kv(t){return Qv.apply(this,arguments)}function Qv(){return(Qv=o(r().mark((function t(e){var n,o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.workerType,o=e.data,!$v[n]){t.next=3;break}return t.abrupt("return",$v[n](o));case 3:return t.abrupt("return",Promise.reject(new Error('Worker with type "'.concat(n,'" non-existent.'))));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return fi(Kv),t.WorkerSourceMap=Yv,t.createWorker=fi,t.worker=Kv,t}({});
|
|
`,Vn="l7-worker",di=3,Bn=!0;function hi(n){ii(Vn,n)}function Li(){var n=Gr(Vn);if(!n)throw new Error("get worker failed by workerName: ".concat(Vn,"."));return n}function la(n,l){return En.apply(this,arguments)}function En(){return En=(0,J.Z)(ot().mark(function n(l,a){var s,u,h,v,m;return ot().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return s=Li(),u=Zp.getWorkerFarm({maxConcurrency:di,reuseWorkers:Bn}),h=u.getWorkerPool({name:Vn,source:s}),A.next=5,h.startJob(Vn,function(R,B,G){return R.done(G)});case 5:return v=A.sent,v.postMessage("process",{input:{workerType:l,data:a}}),A.next=9,v.result;case 9:return m=A.sent,A.abrupt("return",m.result);case 11:case"end":return A.stop()}},n)})),En.apply(this,arguments)}hi(mn);var Mn=nt(78962),Xi=nt.n(Mn);function Si(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=Jn(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,u=function(){};return{s:u,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function Jn(n,l){if(n){if(typeof n=="string")return vi(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return vi(n,l)}}function vi(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a<l;a++)s[a]=n[a];return s}var pi=30;function Ua(n){var l=n.characterSet,a=n.getFontWidth,s=n.fontHeight,u=n.buffer,h=n.maxCanvasWidth,v=n.mapping,m=v===void 0?{}:v,w=n.xOffset,A=w===void 0?0:w,R=n.yOffset,B=R===void 0?0:R,G=0,j=A;Array.from(l).forEach(function(ct,_t){if(!m[ct]){var Vt=a(ct,_t);j+pi>h&&(j=0,G++),m[ct]={x:j,y:B+G*pi,width:pi,height:pi,advance:Vt},j+=pi}});var lt=s+u*2;return{mapping:m,xOffset:j,yOffset:B+G*lt,canvasHeight:Pi(B+(G+1)*lt)}}function Ca(n,l,a){var s=0,u=0,h=0,v=[],m={},w=Si(n),A;try{for(w.s();!(A=w.n()).done;){var R=A.value;if(!m[R.id]){var B=R.size;s+B+l>a&&(Ci(m,v,u),s=0,u=h+u+l,h=0,v=[]),v.push({icon:R,xOffset:s}),s=s+B+l,h=Math.max(h,B)}}}catch(j){w.e(j)}finally{w.f()}v.length>0&&Ci(m,v,u);var G=Pi(h+u+l);return{mapping:m,canvasHeight:G}}function Ci(n,l,a){var s=Si(l),u;try{for(s.s();!(u=s.n()).done;){var h=u.value,v=h.icon,m=h.xOffset;n[v.id]=(0,K.Z)((0,K.Z)({},v),{},{x:m,y:a,image:v.image,width:v.width,height:v.height})}}catch(w){s.e(w)}finally{s.f()}}function Pi(n){return Math.pow(2,Math.ceil(Math.log2(n)))}var ma,Ma;function lo(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=Is(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,u=function(){};return{s:u,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function Is(n,l){if(n){if(typeof n=="string")return ks(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return ks(n,l)}}function ks(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a<l;a++)s[a]=n[a];return s}function co(n){var l=Go();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Go(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Ts=fo(),bu="sans-serif",ns="normal",Ou=24,Ys=3,ju=.25,Rs=8,Na=1024,eu=1,Ao=1,Fu=3,pa=null;function fo(){for(var n=[],l=32;l<128;l++)n.push(String.fromCharCode(l));return n}function To(n,l,a,s){n.font="".concat(s," ").concat(a,"px ").concat(l),n.fillStyle="black",n.textBaseline="middle"}function Us(n,l){for(var a=0;a<n.length;a++)l.data[4*a+3]=n[a]}var ql=(ma=(0,At.b2)(),ma(Ma=function(n){(0,zt.Z)(a,n);var l=co(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"fontAtlas",void 0),(0,W.Z)((0,ut.Z)(s),"iconFontMap",void 0),(0,W.Z)((0,ut.Z)(s),"iconFontGlyphs",{}),(0,W.Z)((0,ut.Z)(s),"fontOptions",void 0),(0,W.Z)((0,ut.Z)(s),"key",void 0),(0,W.Z)((0,ut.Z)(s),"cache",new As(Fu)),s}return(0,et.Z)(a,[{key:"scale",get:function(){return Ao}},{key:"canvas",get:function(){var u=this.cache.get(this.key);return u&&u.data}},{key:"mapping",get:function(){var u=this.cache.get(this.key);return u&&u.mapping||{}}},{key:"init",value:function(){this.cache.clear(),this.fontOptions={fontFamily:bu,fontWeight:ns,characterSet:Ts,fontSize:Ou,buffer:Ys,sdf:!0,cutoff:ju,radius:Rs,iconfont:!1},this.key="",this.iconFontMap=new Map}},{key:"addIconGlyphs",value:function(u){var h=this;u.forEach(function(v){h.iconFontGlyphs[v.name]=v.unicode})}},{key:"addIconFont",value:function(u,h){this.iconFontMap.set(u,h)}},{key:"getIconFontKey",value:function(u){return this.iconFontMap.get(u)||u}},{key:"getGlyph",value:function(u){return this.iconFontGlyphs[u]?String.fromCharCode(parseInt(this.iconFontGlyphs[u],16)):""}},{key:"setFontOptions",value:function(u){this.fontOptions=(0,K.Z)((0,K.Z)({},this.fontOptions),u),this.key=this.getKey();var h=this.getNewChars(this.key,this.fontOptions.characterSet),v=this.cache.get(this.key);if(!(v&&h.length===0)){var m=this.generateFontAtlas(this.key,h,v);this.fontAtlas=m,this.cache.set(this.key,m)}}},{key:"addFontFace",value:function(u,h){var v=this,m=document.createElement("style");m.type="text/css",m.innerText=`
|
|
@font-face{
|
|
font-family: '`.concat(u,`';
|
|
src: url('`).concat(h,`') format('woff2'),
|
|
url('`).concat(h,`') format('woff'),
|
|
url('`).concat(h,`') format('truetype');
|
|
}`),m.onload=function(){if(document.fonts)try{document.fonts.load("24px ".concat(u),"L7text"),document.fonts.ready.then(function(){v.emit("fontloaded",{fontFamily:u})})}catch(w){console.warn("\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301 document.fonts !"),console.warn("\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301 iconfont !"),console.warn(w)}},document.getElementsByTagName("head")[0].appendChild(m)}},{key:"destroy",value:function(){this.cache.clear(),this.iconFontMap.clear()}},{key:"generateFontAtlas",value:function(u,h,v){var m=this.fontOptions,w=m.fontFamily,A=m.fontWeight,R=m.fontSize,B=m.buffer,G=m.sdf,j=m.radius,lt=m.cutoff,ct=m.iconfont,_t=v&&v.data;_t||(_t=ja.document.createElement("canvas"),_t.width=Na);var Vt=_t.getContext("2d",{willReadFrequently:!0});To(Vt,w,R,A);var ce=Ua((0,K.Z)({getFontWidth:function($u){return Vt.measureText($u).width},fontHeight:R*Ao,buffer:B,characterSet:h,maxCanvasWidth:Na},v&&{mapping:v.mapping,xOffset:v.xOffset,yOffset:v.yOffset})),ae=ce.mapping,ze=ce.canvasHeight,$e=ce.xOffset,xr=ce.yOffset,Or=Vt.getImageData(0,0,_t.width,_t.height);if(_t.height=ze,Vt.putImageData(Or,0,0),To(Vt,w,R,A),G){var Zr=new(Xi())(R,B,j,lt,w,A),Wr=Vt.getImageData(0,0,Zr.size,Zr.size),wn=lo(h),vn;try{for(wn.s();!(vn=wn.n()).done;){var Kn=vn.value;if(ct){var Ei=String.fromCharCode(parseInt(Kn.replace("&#x","").replace(";",""),16)),qi=Zr.draw(Ei);Us(qi,Wr)}else Us(Zr.draw(Kn),Wr);Vt.putImageData(Wr,ae[Kn].x,ae[Kn].y)}}catch(hu){wn.e(hu)}finally{wn.f()}}else{var _o=lo(h),jo;try{for(_o.s();!(jo=_o.n()).done;){var Gs=jo.value;Vt.fillText(Gs,ae[Gs].x,ae[Gs].y+R*eu)}}catch(hu){_o.e(hu)}finally{_o.f()}}return{xOffset:$e,yOffset:xr,mapping:ae,data:_t,width:_t.width,height:_t.height}}},{key:"getKey",value:function(){var u=this.fontOptions,h=u.fontFamily,v=u.fontWeight;return"".concat(h,"_").concat(v)}},{key:"getNewChars",value:function(u,h){var v=this.cache.get(u);if(!v)return h;var m=[],w=v.mapping,A=new Set(Object.keys(w)),R=new Set(h);return R.forEach(function(B){A.has(B)||m.push(B)}),m}}]),a}(be.EventEmitter))||Ma),or,fn;function en(n){var l=ji();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function ji(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var ho=3,Je=1024,Se=64,yr=(or=(0,At.b2)(),or(fn=function(n){(0,zt.Z)(a,n);var l=en(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"canvasHeight",128),(0,W.Z)((0,ut.Z)(s),"texture",void 0),(0,W.Z)((0,ut.Z)(s),"canvas",void 0),(0,W.Z)((0,ut.Z)(s),"iconData",void 0),(0,W.Z)((0,ut.Z)(s),"iconMap",void 0),(0,W.Z)((0,ut.Z)(s),"ctx",void 0),(0,W.Z)((0,ut.Z)(s),"loadingImageCount",0),s}return(0,et.Z)(a,[{key:"isLoading",value:function(){return this.loadingImageCount===0}},{key:"init",value:function(){this.iconData=[],this.iconMap={},this.canvas=ja.document.createElement("canvas"),this.canvas.width=128,this.canvas.height=128,this.ctx=this.canvas.getContext("2d")}},{key:"addImage",value:function(){var s=(0,J.Z)(ot().mark(function h(v,m){var w,A;return ot().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return w=new Image,this.loadingImageCount++,this.hasImage(v)?console.warn("Image Id already exists"):this.iconData.push({id:v,size:Se}),this.updateIconMap(),B.next=6,this.loadImage(m);case 6:w=B.sent,A=this.iconData.find(function(G){return G.id===v}),A&&(A.image=w,A.width=w.width,A.height=w.height),this.update();case 10:case"end":return B.stop()}},h,this)}));function u(h,v){return s.apply(this,arguments)}return u}()},{key:"addImageMini",value:function(u,h,v){var m=this,w=v.getSceneConfig().canvas,A=w.createImage();if(this.loadingImageCount++,this.hasImage(u))throw new Error("Image Id already exists");this.iconData.push({id:u,size:Se}),this.updateIconMap(),this.loadImageMini(h,w).then(function(R){A=R;var B=m.iconData.find(function(G){return G.id===u});B&&(B.image=A,B.width=A.width,B.height=A.height),m.update()})}},{key:"getTexture",value:function(){return this.texture}},{key:"getIconMap",value:function(){return this.iconMap}},{key:"getCanvas",value:function(){return this.canvas}},{key:"hasImage",value:function(u){return this.iconMap.hasOwnProperty(u)}},{key:"removeImage",value:function(u){this.hasImage(u)&&(this.iconData=this.iconData.filter(function(h){return h.id!==u}),delete this.iconMap[u],this.update())}},{key:"destroy",value:function(){this.removeAllListeners("imageUpdate"),this.iconData=[],this.iconMap={}}},{key:"loadImage",value:function(u){return new Promise(function(h,v){if(u instanceof HTMLImageElement){h(u);return}var m=new Image;m.crossOrigin="anonymous",m.onload=function(){h(m)},m.onerror=function(){v(new Error("Could not load image at "+u))},m.src=u instanceof File?URL.createObjectURL(u):u})}},{key:"update",value:function(){this.updateIconMap(),this.updateIconAtlas(),this.loadingImageCount--,this.loadingImageCount===0&&this.emit("imageUpdate")}},{key:"updateIconAtlas",value:function(){var u=this;this.canvas.width=Je,this.canvas.height=this.canvasHeight,Object.keys(this.iconMap).forEach(function(h){var v=u.iconMap[h],m=v.x,w=v.y,A=v.image,R=v.width,B=R===void 0?64:R,G=v.height,j=G===void 0?64:G,lt=Math.max(B,j),ct=lt/Se,_t=j/ct,Vt=B/ct;A&&u.ctx.drawImage(A,m+(Se-Vt)/2,w+(Se-_t)/2,Vt,_t)})}},{key:"updateIconMap",value:function(){var u=Ca(this.iconData,ho,Je),h=u.mapping,v=u.canvasHeight;this.iconMap=h,this.canvasHeight=v}},{key:"loadImageMini",value:function(u,h){return new Promise(function(v,m){var w=h.createImage();w.crossOrigin="anonymous",w.onload=function(){v(w)},w.onerror=function(){m(new Error("Could not load image at "+u))},w.src=u})}}]),a}(be.EventEmitter))||fn),Lr=nt(96140);function qr(){var n=new Lr.WT(16);return Lr.WT!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0),n[0]=1,n[5]=1,n[10]=1,n[15]=1,n}function Ar(n){var l=new Lr.WT(16);return l[0]=n[0],l[1]=n[1],l[2]=n[2],l[3]=n[3],l[4]=n[4],l[5]=n[5],l[6]=n[6],l[7]=n[7],l[8]=n[8],l[9]=n[9],l[10]=n[10],l[11]=n[11],l[12]=n[12],l[13]=n[13],l[14]=n[14],l[15]=n[15],l}function Ye(n,l){return n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3],n[4]=l[4],n[5]=l[5],n[6]=l[6],n[7]=l[7],n[8]=l[8],n[9]=l[9],n[10]=l[10],n[11]=l[11],n[12]=l[12],n[13]=l[13],n[14]=l[14],n[15]=l[15],n}function Rr(n,l,a,s,u,h,v,m,w,A,R,B,G,j,lt,ct){var _t=new Lr.WT(16);return _t[0]=n,_t[1]=l,_t[2]=a,_t[3]=s,_t[4]=u,_t[5]=h,_t[6]=v,_t[7]=m,_t[8]=w,_t[9]=A,_t[10]=R,_t[11]=B,_t[12]=G,_t[13]=j,_t[14]=lt,_t[15]=ct,_t}function je(n,l,a,s,u,h,v,m,w,A,R,B,G,j,lt,ct,_t){return n[0]=l,n[1]=a,n[2]=s,n[3]=u,n[4]=h,n[5]=v,n[6]=m,n[7]=w,n[8]=A,n[9]=R,n[10]=B,n[11]=G,n[12]=j,n[13]=lt,n[14]=ct,n[15]=_t,n}function mr(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function tr(n,l){if(n===l){var a=l[1],s=l[2],u=l[3],h=l[6],v=l[7],m=l[11];n[1]=l[4],n[2]=l[8],n[3]=l[12],n[4]=a,n[6]=l[9],n[7]=l[13],n[8]=s,n[9]=h,n[11]=l[14],n[12]=u,n[13]=v,n[14]=m}else n[0]=l[0],n[1]=l[4],n[2]=l[8],n[3]=l[12],n[4]=l[1],n[5]=l[5],n[6]=l[9],n[7]=l[13],n[8]=l[2],n[9]=l[6],n[10]=l[10],n[11]=l[14],n[12]=l[3],n[13]=l[7],n[14]=l[11],n[15]=l[15];return n}function kr(n,l){var a=l[0],s=l[1],u=l[2],h=l[3],v=l[4],m=l[5],w=l[6],A=l[7],R=l[8],B=l[9],G=l[10],j=l[11],lt=l[12],ct=l[13],_t=l[14],Vt=l[15],ce=a*m-s*v,ae=a*w-u*v,ze=a*A-h*v,$e=s*w-u*m,xr=s*A-h*m,Or=u*A-h*w,Zr=R*ct-B*lt,Wr=R*_t-G*lt,wn=R*Vt-j*lt,vn=B*_t-G*ct,Kn=B*Vt-j*ct,Ei=G*Vt-j*_t,qi=ce*Ei-ae*Kn+ze*vn+$e*wn-xr*Wr+Or*Zr;return qi?(qi=1/qi,n[0]=(m*Ei-w*Kn+A*vn)*qi,n[1]=(u*Kn-s*Ei-h*vn)*qi,n[2]=(ct*Or-_t*xr+Vt*$e)*qi,n[3]=(G*xr-B*Or-j*$e)*qi,n[4]=(w*wn-v*Ei-A*Wr)*qi,n[5]=(a*Ei-u*wn+h*Wr)*qi,n[6]=(_t*ze-lt*Or-Vt*ae)*qi,n[7]=(R*Or-G*ze+j*ae)*qi,n[8]=(v*Kn-m*wn+A*Zr)*qi,n[9]=(s*wn-a*Kn-h*Zr)*qi,n[10]=(lt*xr-ct*ze+Vt*ce)*qi,n[11]=(B*ze-R*xr-j*ce)*qi,n[12]=(m*Wr-v*vn-w*Zr)*qi,n[13]=(a*vn-s*Wr+u*Zr)*qi,n[14]=(ct*ae-lt*$e-_t*ce)*qi,n[15]=(R*$e-B*ae+G*ce)*qi,n):null}function Kr(n,l){var a=l[0],s=l[1],u=l[2],h=l[3],v=l[4],m=l[5],w=l[6],A=l[7],R=l[8],B=l[9],G=l[10],j=l[11],lt=l[12],ct=l[13],_t=l[14],Vt=l[15];return n[0]=m*(G*Vt-j*_t)-B*(w*Vt-A*_t)+ct*(w*j-A*G),n[1]=-(s*(G*Vt-j*_t)-B*(u*Vt-h*_t)+ct*(u*j-h*G)),n[2]=s*(w*Vt-A*_t)-m*(u*Vt-h*_t)+ct*(u*A-h*w),n[3]=-(s*(w*j-A*G)-m*(u*j-h*G)+B*(u*A-h*w)),n[4]=-(v*(G*Vt-j*_t)-R*(w*Vt-A*_t)+lt*(w*j-A*G)),n[5]=a*(G*Vt-j*_t)-R*(u*Vt-h*_t)+lt*(u*j-h*G),n[6]=-(a*(w*Vt-A*_t)-v*(u*Vt-h*_t)+lt*(u*A-h*w)),n[7]=a*(w*j-A*G)-v*(u*j-h*G)+R*(u*A-h*w),n[8]=v*(B*Vt-j*ct)-R*(m*Vt-A*ct)+lt*(m*j-A*B),n[9]=-(a*(B*Vt-j*ct)-R*(s*Vt-h*ct)+lt*(s*j-h*B)),n[10]=a*(m*Vt-A*ct)-v*(s*Vt-h*ct)+lt*(s*A-h*m),n[11]=-(a*(m*j-A*B)-v*(s*j-h*B)+R*(s*A-h*m)),n[12]=-(v*(B*_t-G*ct)-R*(m*_t-w*ct)+lt*(m*G-w*B)),n[13]=a*(B*_t-G*ct)-R*(s*_t-u*ct)+lt*(s*G-u*B),n[14]=-(a*(m*_t-w*ct)-v*(s*_t-u*ct)+lt*(s*w-u*m)),n[15]=a*(m*G-w*B)-v*(s*G-u*B)+R*(s*w-u*m),n}function Nn(n){var l=n[0],a=n[1],s=n[2],u=n[3],h=n[4],v=n[5],m=n[6],w=n[7],A=n[8],R=n[9],B=n[10],G=n[11],j=n[12],lt=n[13],ct=n[14],_t=n[15],Vt=l*v-a*h,ce=l*m-s*h,ae=l*w-u*h,ze=a*m-s*v,$e=a*w-u*v,xr=s*w-u*m,Or=A*lt-R*j,Zr=A*ct-B*j,Wr=A*_t-G*j,wn=R*ct-B*lt,vn=R*_t-G*lt,Kn=B*_t-G*ct;return Vt*Kn-ce*vn+ae*wn+ze*Wr-$e*Zr+xr*Or}function ti(n,l,a){var s=l[0],u=l[1],h=l[2],v=l[3],m=l[4],w=l[5],A=l[6],R=l[7],B=l[8],G=l[9],j=l[10],lt=l[11],ct=l[12],_t=l[13],Vt=l[14],ce=l[15],ae=a[0],ze=a[1],$e=a[2],xr=a[3];return n[0]=ae*s+ze*m+$e*B+xr*ct,n[1]=ae*u+ze*w+$e*G+xr*_t,n[2]=ae*h+ze*A+$e*j+xr*Vt,n[3]=ae*v+ze*R+$e*lt+xr*ce,ae=a[4],ze=a[5],$e=a[6],xr=a[7],n[4]=ae*s+ze*m+$e*B+xr*ct,n[5]=ae*u+ze*w+$e*G+xr*_t,n[6]=ae*h+ze*A+$e*j+xr*Vt,n[7]=ae*v+ze*R+$e*lt+xr*ce,ae=a[8],ze=a[9],$e=a[10],xr=a[11],n[8]=ae*s+ze*m+$e*B+xr*ct,n[9]=ae*u+ze*w+$e*G+xr*_t,n[10]=ae*h+ze*A+$e*j+xr*Vt,n[11]=ae*v+ze*R+$e*lt+xr*ce,ae=a[12],ze=a[13],$e=a[14],xr=a[15],n[12]=ae*s+ze*m+$e*B+xr*ct,n[13]=ae*u+ze*w+$e*G+xr*_t,n[14]=ae*h+ze*A+$e*j+xr*Vt,n[15]=ae*v+ze*R+$e*lt+xr*ce,n}function ci(n,l,a){var s=a[0],u=a[1],h=a[2],v,m,w,A,R,B,G,j,lt,ct,_t,Vt;return l===n?(n[12]=l[0]*s+l[4]*u+l[8]*h+l[12],n[13]=l[1]*s+l[5]*u+l[9]*h+l[13],n[14]=l[2]*s+l[6]*u+l[10]*h+l[14],n[15]=l[3]*s+l[7]*u+l[11]*h+l[15]):(v=l[0],m=l[1],w=l[2],A=l[3],R=l[4],B=l[5],G=l[6],j=l[7],lt=l[8],ct=l[9],_t=l[10],Vt=l[11],n[0]=v,n[1]=m,n[2]=w,n[3]=A,n[4]=R,n[5]=B,n[6]=G,n[7]=j,n[8]=lt,n[9]=ct,n[10]=_t,n[11]=Vt,n[12]=v*s+R*u+lt*h+l[12],n[13]=m*s+B*u+ct*h+l[13],n[14]=w*s+G*u+_t*h+l[14],n[15]=A*s+j*u+Vt*h+l[15]),n}function Ai(n,l,a){var s=a[0],u=a[1],h=a[2];return n[0]=l[0]*s,n[1]=l[1]*s,n[2]=l[2]*s,n[3]=l[3]*s,n[4]=l[4]*u,n[5]=l[5]*u,n[6]=l[6]*u,n[7]=l[7]*u,n[8]=l[8]*h,n[9]=l[9]*h,n[10]=l[10]*h,n[11]=l[11]*h,n[12]=l[12],n[13]=l[13],n[14]=l[14],n[15]=l[15],n}function gi(n,l,a,s){var u=s[0],h=s[1],v=s[2],m=Math.hypot(u,h,v),w,A,R,B,G,j,lt,ct,_t,Vt,ce,ae,ze,$e,xr,Or,Zr,Wr,wn,vn,Kn,Ei,qi,_o;return m<Lr.Ib?null:(m=1/m,u*=m,h*=m,v*=m,w=Math.sin(a),A=Math.cos(a),R=1-A,B=l[0],G=l[1],j=l[2],lt=l[3],ct=l[4],_t=l[5],Vt=l[6],ce=l[7],ae=l[8],ze=l[9],$e=l[10],xr=l[11],Or=u*u*R+A,Zr=h*u*R+v*w,Wr=v*u*R-h*w,wn=u*h*R-v*w,vn=h*h*R+A,Kn=v*h*R+u*w,Ei=u*v*R+h*w,qi=h*v*R-u*w,_o=v*v*R+A,n[0]=B*Or+ct*Zr+ae*Wr,n[1]=G*Or+_t*Zr+ze*Wr,n[2]=j*Or+Vt*Zr+$e*Wr,n[3]=lt*Or+ce*Zr+xr*Wr,n[4]=B*wn+ct*vn+ae*Kn,n[5]=G*wn+_t*vn+ze*Kn,n[6]=j*wn+Vt*vn+$e*Kn,n[7]=lt*wn+ce*vn+xr*Kn,n[8]=B*Ei+ct*qi+ae*_o,n[9]=G*Ei+_t*qi+ze*_o,n[10]=j*Ei+Vt*qi+$e*_o,n[11]=lt*Ei+ce*qi+xr*_o,l!==n&&(n[12]=l[12],n[13]=l[13],n[14]=l[14],n[15]=l[15]),n)}function zi(n,l,a){var s=Math.sin(a),u=Math.cos(a),h=l[4],v=l[5],m=l[6],w=l[7],A=l[8],R=l[9],B=l[10],G=l[11];return l!==n&&(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3],n[12]=l[12],n[13]=l[13],n[14]=l[14],n[15]=l[15]),n[4]=h*u+A*s,n[5]=v*u+R*s,n[6]=m*u+B*s,n[7]=w*u+G*s,n[8]=A*u-h*s,n[9]=R*u-v*s,n[10]=B*u-m*s,n[11]=G*u-w*s,n}function Fi(n,l,a){var s=Math.sin(a),u=Math.cos(a),h=l[0],v=l[1],m=l[2],w=l[3],A=l[8],R=l[9],B=l[10],G=l[11];return l!==n&&(n[4]=l[4],n[5]=l[5],n[6]=l[6],n[7]=l[7],n[12]=l[12],n[13]=l[13],n[14]=l[14],n[15]=l[15]),n[0]=h*u-A*s,n[1]=v*u-R*s,n[2]=m*u-B*s,n[3]=w*u-G*s,n[8]=h*s+A*u,n[9]=v*s+R*u,n[10]=m*s+B*u,n[11]=w*s+G*u,n}function Ui(n,l,a){var s=Math.sin(a),u=Math.cos(a),h=l[0],v=l[1],m=l[2],w=l[3],A=l[4],R=l[5],B=l[6],G=l[7];return l!==n&&(n[8]=l[8],n[9]=l[9],n[10]=l[10],n[11]=l[11],n[12]=l[12],n[13]=l[13],n[14]=l[14],n[15]=l[15]),n[0]=h*u+A*s,n[1]=v*u+R*s,n[2]=m*u+B*s,n[3]=w*u+G*s,n[4]=A*u-h*s,n[5]=R*u-v*s,n[6]=B*u-m*s,n[7]=G*u-w*s,n}function Zi(n,l){return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=l[0],n[13]=l[1],n[14]=l[2],n[15]=1,n}function Wi(n,l){return n[0]=l[0],n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=l[1],n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=l[2],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function ba(n,l,a){var s=a[0],u=a[1],h=a[2],v=Math.hypot(s,u,h),m,w,A;return v<Lr.Ib?null:(v=1/v,s*=v,u*=v,h*=v,m=Math.sin(l),w=Math.cos(l),A=1-w,n[0]=s*s*A+w,n[1]=u*s*A+h*m,n[2]=h*s*A-u*m,n[3]=0,n[4]=s*u*A-h*m,n[5]=u*u*A+w,n[6]=h*u*A+s*m,n[7]=0,n[8]=s*h*A+u*m,n[9]=u*h*A-s*m,n[10]=h*h*A+w,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n)}function Jo(n,l){var a=Math.sin(l),s=Math.cos(l);return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=s,n[6]=a,n[7]=0,n[8]=0,n[9]=-a,n[10]=s,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function Ru(n,l){var a=Math.sin(l),s=Math.cos(l);return n[0]=s,n[1]=0,n[2]=-a,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=a,n[9]=0,n[10]=s,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function gs(n,l){var a=Math.sin(l),s=Math.cos(l);return n[0]=s,n[1]=a,n[2]=0,n[3]=0,n[4]=-a,n[5]=s,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function Do(n,l,a){var s=l[0],u=l[1],h=l[2],v=l[3],m=s+s,w=u+u,A=h+h,R=s*m,B=s*w,G=s*A,j=u*w,lt=u*A,ct=h*A,_t=v*m,Vt=v*w,ce=v*A;return n[0]=1-(j+ct),n[1]=B+ce,n[2]=G-Vt,n[3]=0,n[4]=B-ce,n[5]=1-(R+ct),n[6]=lt+_t,n[7]=0,n[8]=G+Vt,n[9]=lt-_t,n[10]=1-(R+j),n[11]=0,n[12]=a[0],n[13]=a[1],n[14]=a[2],n[15]=1,n}function Bf(n,l){var a=new Lr.WT(3),s=-l[0],u=-l[1],h=-l[2],v=l[3],m=l[4],w=l[5],A=l[6],R=l[7],B=s*s+u*u+h*h+v*v;return B>0?(a[0]=(m*v+R*s+w*h-A*u)*2/B,a[1]=(w*v+R*u+A*s-m*h)*2/B,a[2]=(A*v+R*h+m*u-w*s)*2/B):(a[0]=(m*v+R*s+w*h-A*u)*2,a[1]=(w*v+R*u+A*s-m*h)*2,a[2]=(A*v+R*h+m*u-w*s)*2),Do(n,l,a),n}function gl(n,l){return n[0]=l[12],n[1]=l[13],n[2]=l[14],n}function Zc(n,l){var a=l[0],s=l[1],u=l[2],h=l[4],v=l[5],m=l[6],w=l[8],A=l[9],R=l[10];return n[0]=Math.hypot(a,s,u),n[1]=Math.hypot(h,v,m),n[2]=Math.hypot(w,A,R),n}function Mc(n,l){var a=new Lr.WT(3);Zc(a,l);var s=1/a[0],u=1/a[1],h=1/a[2],v=l[0]*s,m=l[1]*u,w=l[2]*h,A=l[4]*s,R=l[5]*u,B=l[6]*h,G=l[8]*s,j=l[9]*u,lt=l[10]*h,ct=v+R+lt,_t=0;return ct>0?(_t=Math.sqrt(ct+1)*2,n[3]=.25*_t,n[0]=(B-j)/_t,n[1]=(G-w)/_t,n[2]=(m-A)/_t):v>R&&v>lt?(_t=Math.sqrt(1+v-R-lt)*2,n[3]=(B-j)/_t,n[0]=.25*_t,n[1]=(m+A)/_t,n[2]=(G+w)/_t):R>lt?(_t=Math.sqrt(1+R-v-lt)*2,n[3]=(G-w)/_t,n[0]=(m+A)/_t,n[1]=.25*_t,n[2]=(B+j)/_t):(_t=Math.sqrt(1+lt-v-R)*2,n[3]=(m-A)/_t,n[0]=(G+w)/_t,n[1]=(B+j)/_t,n[2]=.25*_t),n}function _v(n,l,a,s){var u=l[0],h=l[1],v=l[2],m=l[3],w=u+u,A=h+h,R=v+v,B=u*w,G=u*A,j=u*R,lt=h*A,ct=h*R,_t=v*R,Vt=m*w,ce=m*A,ae=m*R,ze=s[0],$e=s[1],xr=s[2];return n[0]=(1-(lt+_t))*ze,n[1]=(G+ae)*ze,n[2]=(j-ce)*ze,n[3]=0,n[4]=(G-ae)*$e,n[5]=(1-(B+_t))*$e,n[6]=(ct+Vt)*$e,n[7]=0,n[8]=(j+ce)*xr,n[9]=(ct-Vt)*xr,n[10]=(1-(B+lt))*xr,n[11]=0,n[12]=a[0],n[13]=a[1],n[14]=a[2],n[15]=1,n}function Kl(n,l,a,s,u){var h=l[0],v=l[1],m=l[2],w=l[3],A=h+h,R=v+v,B=m+m,G=h*A,j=h*R,lt=h*B,ct=v*R,_t=v*B,Vt=m*B,ce=w*A,ae=w*R,ze=w*B,$e=s[0],xr=s[1],Or=s[2],Zr=u[0],Wr=u[1],wn=u[2],vn=(1-(ct+Vt))*$e,Kn=(j+ze)*$e,Ei=(lt-ae)*$e,qi=(j-ze)*xr,_o=(1-(G+Vt))*xr,jo=(_t+ce)*xr,Gs=(lt+ae)*Or,hu=(_t-ce)*Or,$u=(1-(G+ct))*Or;return n[0]=vn,n[1]=Kn,n[2]=Ei,n[3]=0,n[4]=qi,n[5]=_o,n[6]=jo,n[7]=0,n[8]=Gs,n[9]=hu,n[10]=$u,n[11]=0,n[12]=a[0]+Zr-(vn*Zr+qi*Wr+Gs*wn),n[13]=a[1]+Wr-(Kn*Zr+_o*Wr+hu*wn),n[14]=a[2]+wn-(Ei*Zr+jo*Wr+$u*wn),n[15]=1,n}function nh(n,l){var a=l[0],s=l[1],u=l[2],h=l[3],v=a+a,m=s+s,w=u+u,A=a*v,R=s*v,B=s*m,G=u*v,j=u*m,lt=u*w,ct=h*v,_t=h*m,Vt=h*w;return n[0]=1-B-lt,n[1]=R+Vt,n[2]=G-_t,n[3]=0,n[4]=R-Vt,n[5]=1-A-lt,n[6]=j+ct,n[7]=0,n[8]=G+_t,n[9]=j-ct,n[10]=1-A-B,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function jp(n,l,a,s,u,h,v){var m=1/(a-l),w=1/(u-s),A=1/(h-v);return n[0]=h*2*m,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=h*2*w,n[6]=0,n[7]=0,n[8]=(a+l)*m,n[9]=(u+s)*w,n[10]=(v+h)*A,n[11]=-1,n[12]=0,n[13]=0,n[14]=v*h*2*A,n[15]=0,n}function s0(n,l,a,s,u){var h=1/Math.tan(l/2),v;return n[0]=h/a,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=h,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=-1,n[12]=0,n[13]=0,n[15]=0,u!=null&&u!==1/0?(v=1/(s-u),n[10]=(u+s)*v,n[14]=2*u*s*v):(n[10]=-1,n[14]=-2*s),n}var lu=s0;function u0(n,l,a,s,u){var h=1/Math.tan(l/2),v;return n[0]=h/a,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=h,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=-1,n[12]=0,n[13]=0,n[15]=0,u!=null&&u!==1/0?(v=1/(s-u),n[10]=u*v,n[14]=u*s*v):(n[10]=-1,n[14]=-s),n}function ih(n,l,a,s){var u=Math.tan(l.upDegrees*Math.PI/180),h=Math.tan(l.downDegrees*Math.PI/180),v=Math.tan(l.leftDegrees*Math.PI/180),m=Math.tan(l.rightDegrees*Math.PI/180),w=2/(v+m),A=2/(u+h);return n[0]=w,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=A,n[6]=0,n[7]=0,n[8]=-((v-m)*w*.5),n[9]=(u-h)*A*.5,n[10]=s/(a-s),n[11]=-1,n[12]=0,n[13]=0,n[14]=s*a/(a-s),n[15]=0,n}function Wp(n,l,a,s,u,h,v){var m=1/(l-a),w=1/(s-u),A=1/(h-v);return n[0]=-2*m,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=-2*w,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=2*A,n[11]=0,n[12]=(l+a)*m,n[13]=(u+s)*w,n[14]=(v+h)*A,n[15]=1,n}var Mh=Wp;function py(n,l,a,s,u,h,v){var m=1/(l-a),w=1/(s-u),A=1/(h-v);return n[0]=-2*m,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=-2*w,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=A,n[11]=0,n[12]=(l+a)*m,n[13]=(u+s)*w,n[14]=h*A,n[15]=1,n}function Id(n,l,a,s){var u,h,v,m,w,A,R,B,G,j,lt=l[0],ct=l[1],_t=l[2],Vt=s[0],ce=s[1],ae=s[2],ze=a[0],$e=a[1],xr=a[2];return Math.abs(lt-ze)<Lr.Ib&&Math.abs(ct-$e)<Lr.Ib&&Math.abs(_t-xr)<Lr.Ib?mr(n):(R=lt-ze,B=ct-$e,G=_t-xr,j=1/Math.hypot(R,B,G),R*=j,B*=j,G*=j,u=ce*G-ae*B,h=ae*R-Vt*G,v=Vt*B-ce*R,j=Math.hypot(u,h,v),j?(j=1/j,u*=j,h*=j,v*=j):(u=0,h=0,v=0),m=B*v-G*h,w=G*u-R*v,A=R*h-B*u,j=Math.hypot(m,w,A),j?(j=1/j,m*=j,w*=j,A*=j):(m=0,w=0,A=0),n[0]=u,n[1]=m,n[2]=R,n[3]=0,n[4]=h,n[5]=w,n[6]=B,n[7]=0,n[8]=v,n[9]=A,n[10]=G,n[11]=0,n[12]=-(u*lt+h*ct+v*_t),n[13]=-(m*lt+w*ct+A*_t),n[14]=-(R*lt+B*ct+G*_t),n[15]=1,n)}function tp(n,l,a,s){var u=l[0],h=l[1],v=l[2],m=s[0],w=s[1],A=s[2],R=u-a[0],B=h-a[1],G=v-a[2],j=R*R+B*B+G*G;j>0&&(j=1/Math.sqrt(j),R*=j,B*=j,G*=j);var lt=w*G-A*B,ct=A*R-m*G,_t=m*B-w*R;return j=lt*lt+ct*ct+_t*_t,j>0&&(j=1/Math.sqrt(j),lt*=j,ct*=j,_t*=j),n[0]=lt,n[1]=ct,n[2]=_t,n[3]=0,n[4]=B*_t-G*ct,n[5]=G*lt-R*_t,n[6]=R*ct-B*lt,n[7]=0,n[8]=R,n[9]=B,n[10]=G,n[11]=0,n[12]=u,n[13]=h,n[14]=v,n[15]=1,n}function dy(n){return"mat4("+n[0]+", "+n[1]+", "+n[2]+", "+n[3]+", "+n[4]+", "+n[5]+", "+n[6]+", "+n[7]+", "+n[8]+", "+n[9]+", "+n[10]+", "+n[11]+", "+n[12]+", "+n[13]+", "+n[14]+", "+n[15]+")"}function vy(n){return Math.hypot(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15])}function d_(n,l,a){return n[0]=l[0]+a[0],n[1]=l[1]+a[1],n[2]=l[2]+a[2],n[3]=l[3]+a[3],n[4]=l[4]+a[4],n[5]=l[5]+a[5],n[6]=l[6]+a[6],n[7]=l[7]+a[7],n[8]=l[8]+a[8],n[9]=l[9]+a[9],n[10]=l[10]+a[10],n[11]=l[11]+a[11],n[12]=l[12]+a[12],n[13]=l[13]+a[13],n[14]=l[14]+a[14],n[15]=l[15]+a[15],n}function go(n,l,a){return n[0]=l[0]-a[0],n[1]=l[1]-a[1],n[2]=l[2]-a[2],n[3]=l[3]-a[3],n[4]=l[4]-a[4],n[5]=l[5]-a[5],n[6]=l[6]-a[6],n[7]=l[7]-a[7],n[8]=l[8]-a[8],n[9]=l[9]-a[9],n[10]=l[10]-a[10],n[11]=l[11]-a[11],n[12]=l[12]-a[12],n[13]=l[13]-a[13],n[14]=l[14]-a[14],n[15]=l[15]-a[15],n}function Xp(n,l,a){return n[0]=l[0]*a,n[1]=l[1]*a,n[2]=l[2]*a,n[3]=l[3]*a,n[4]=l[4]*a,n[5]=l[5]*a,n[6]=l[6]*a,n[7]=l[7]*a,n[8]=l[8]*a,n[9]=l[9]*a,n[10]=l[10]*a,n[11]=l[11]*a,n[12]=l[12]*a,n[13]=l[13]*a,n[14]=l[14]*a,n[15]=l[15]*a,n}function gy(n,l,a,s){return n[0]=l[0]+a[0]*s,n[1]=l[1]+a[1]*s,n[2]=l[2]+a[2]*s,n[3]=l[3]+a[3]*s,n[4]=l[4]+a[4]*s,n[5]=l[5]+a[5]*s,n[6]=l[6]+a[6]*s,n[7]=l[7]+a[7]*s,n[8]=l[8]+a[8]*s,n[9]=l[9]+a[9]*s,n[10]=l[10]+a[10]*s,n[11]=l[11]+a[11]*s,n[12]=l[12]+a[12]*s,n[13]=l[13]+a[13]*s,n[14]=l[14]+a[14]*s,n[15]=l[15]+a[15]*s,n}function f(n,l){return n[0]===l[0]&&n[1]===l[1]&&n[2]===l[2]&&n[3]===l[3]&&n[4]===l[4]&&n[5]===l[5]&&n[6]===l[6]&&n[7]===l[7]&&n[8]===l[8]&&n[9]===l[9]&&n[10]===l[10]&&n[11]===l[11]&&n[12]===l[12]&&n[13]===l[13]&&n[14]===l[14]&&n[15]===l[15]}function d(n,l){var a=n[0],s=n[1],u=n[2],h=n[3],v=n[4],m=n[5],w=n[6],A=n[7],R=n[8],B=n[9],G=n[10],j=n[11],lt=n[12],ct=n[13],_t=n[14],Vt=n[15],ce=l[0],ae=l[1],ze=l[2],$e=l[3],xr=l[4],Or=l[5],Zr=l[6],Wr=l[7],wn=l[8],vn=l[9],Kn=l[10],Ei=l[11],qi=l[12],_o=l[13],jo=l[14],Gs=l[15];return Math.abs(a-ce)<=Lr.Ib*Math.max(1,Math.abs(a),Math.abs(ce))&&Math.abs(s-ae)<=Lr.Ib*Math.max(1,Math.abs(s),Math.abs(ae))&&Math.abs(u-ze)<=Lr.Ib*Math.max(1,Math.abs(u),Math.abs(ze))&&Math.abs(h-$e)<=Lr.Ib*Math.max(1,Math.abs(h),Math.abs($e))&&Math.abs(v-xr)<=Lr.Ib*Math.max(1,Math.abs(v),Math.abs(xr))&&Math.abs(m-Or)<=Lr.Ib*Math.max(1,Math.abs(m),Math.abs(Or))&&Math.abs(w-Zr)<=Lr.Ib*Math.max(1,Math.abs(w),Math.abs(Zr))&&Math.abs(A-Wr)<=Lr.Ib*Math.max(1,Math.abs(A),Math.abs(Wr))&&Math.abs(R-wn)<=Lr.Ib*Math.max(1,Math.abs(R),Math.abs(wn))&&Math.abs(B-vn)<=Lr.Ib*Math.max(1,Math.abs(B),Math.abs(vn))&&Math.abs(G-Kn)<=Lr.Ib*Math.max(1,Math.abs(G),Math.abs(Kn))&&Math.abs(j-Ei)<=Lr.Ib*Math.max(1,Math.abs(j),Math.abs(Ei))&&Math.abs(lt-qi)<=Lr.Ib*Math.max(1,Math.abs(lt),Math.abs(qi))&&Math.abs(ct-_o)<=Lr.Ib*Math.max(1,Math.abs(ct),Math.abs(_o))&&Math.abs(_t-jo)<=Lr.Ib*Math.max(1,Math.abs(_t),Math.abs(jo))&&Math.abs(Vt-Gs)<=Lr.Ib*Math.max(1,Math.abs(Vt),Math.abs(Gs))}var y=ti,T=go,O,N,Z=(O=(0,At.b2)(),O(N=function(){function n(){(0,pt.Z)(this,n),(0,W.Z)(this,"viewport",void 0),(0,W.Z)(this,"overridedViewProjectionMatrix",void 0),(0,W.Z)(this,"jitteredViewProjectionMatrix",void 0),(0,W.Z)(this,"jitteredProjectionMatrix",void 0),(0,W.Z)(this,"viewMatrixInverse",void 0),(0,W.Z)(this,"cameraPosition",void 0)}return(0,et.Z)(n,[{key:"init",value:function(){}},{key:"update",value:function(a){this.viewport=a,this.viewMatrixInverse=qr(),kr(this.viewMatrixInverse,a.getViewMatrix()),this.cameraPosition=[this.viewMatrixInverse[12],this.viewMatrixInverse[13],this.viewMatrixInverse[14]]}},{key:"getProjectionMatrix",value:function(){return this.jitteredProjectionMatrix||this.viewport.getProjectionMatrix()}},{key:"getModelMatrix",value:function(){return this.viewport.getModelMatrix()}},{key:"getViewMatrix",value:function(){return this.viewport.getViewMatrix()}},{key:"getViewMatrixUncentered",value:function(){return this.viewport.getViewMatrixUncentered()}},{key:"getViewProjectionMatrixUncentered",value:function(){return this.viewport.getViewProjectionMatrixUncentered()}},{key:"getViewProjectionMatrix",value:function(){return this.overridedViewProjectionMatrix||this.jitteredViewProjectionMatrix||this.viewport.getViewProjectionMatrix()}},{key:"getZoom",value:function(){return this.viewport.getZoom()}},{key:"getZoomScale",value:function(){return this.viewport.getZoomScale()}},{key:"getCenter",value:function(){var a=this.viewport.getCenter(),s=(0,yt.Z)(a,2),u=s[0],h=s[1];return[u,h]}},{key:"getFocalDistance",value:function(){return this.viewport.getFocalDistance()}},{key:"getCameraPosition",value:function(){return this.cameraPosition}},{key:"projectFlat",value:function(a,s){return this.viewport.projectFlat(a,s)}},{key:"setViewProjectionMatrix",value:function(a){this.overridedViewProjectionMatrix=a}},{key:"jitterProjectionMatrix",value:function(a,s){var u=Zi(qr(),[a,s,0]);this.jitteredProjectionMatrix=ti(qr(),u,this.viewport.getProjectionMatrix()),this.jitteredViewProjectionMatrix=ti(qr(),this.jitteredProjectionMatrix,this.viewport.getViewMatrix())}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0,this.jitteredViewProjectionMatrix=void 0}}]),n}())||N),q;(function(n){n.TOPRIGHT="topright",n.TOPLEFT="topleft",n.BOTTOMRIGHT="bottomright",n.BOTTOMLEFT="bottomleft",n.TOPCENTER="topcenter",n.BOTTOMCENTER="bottomcenter",n.LEFTCENTER="leftcenter",n.RIGHTCENTER="rightcenter",n.LEFTTOP="lefttop",n.RIGHTTOP="righttop",n.LEFTBOTTOM="leftbottom",n.RIGHTBOTTOM="rightbottom"})(q||(q={}));var dt,Pt;function Gt(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=Qt(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,u=function(){};return{s:u,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function Qt(n,l){if(n){if(typeof n=="string")return ve(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return ve(n,l)}}function ve(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a<l;a++)s[a]=n[a];return s}var Oe={topleft:"column",topright:"column",bottomright:"column",bottomleft:"column",leftcenter:"column",rightcenter:"column",topcenter:"row",bottomcenter:"row",lefttop:"row",righttop:"row",leftbottom:"row",rightbottom:"row"},er=(dt=(0,At.b2)(),dt(Pt=function(){function n(){(0,pt.Z)(this,n),(0,W.Z)(this,"container",void 0),(0,W.Z)(this,"controlCorners",void 0),(0,W.Z)(this,"controlContainer",void 0),(0,W.Z)(this,"scene",void 0),(0,W.Z)(this,"mapsService",void 0),(0,W.Z)(this,"controls",[]),(0,W.Z)(this,"unAddControls",[])}return(0,et.Z)(n,[{key:"init",value:function(a,s){this.container=a.container,this.scene=s,this.mapsService=s.get(Dt.IMapService),this.initControlPos()}},{key:"addControl",value:function(a,s){var u=s.get(Dt.IMapService);u.map?(a.addTo(this.scene),this.controls.push(a)):this.unAddControls.push(a)}},{key:"getControlByName",value:function(a){return this.controls.find(function(s){return s.controlOption.name===a})}},{key:"removeControl",value:function(a){var s=this.controls.indexOf(a);return s>-1&&this.controls.splice(s,1),a.remove(),this}},{key:"addControls",value:function(){var a=this;this.unAddControls.forEach(function(s){s.addTo(a.scene),a.controls.push(s)}),this.unAddControls=[]}},{key:"destroy",value:function(){var a=Gt(this.controls),s;try{for(a.s();!(s=a.n()).done;){var u=s.value;u.remove()}}catch(h){a.e(h)}finally{a.f()}this.controls=[],this.clearControlPos()}},{key:"initControlPos",value:function(){var a=this.controlCorners={},s="l7-",u=this.controlContainer=so("div",s+"control-container",this.container);function h(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],w=m.map(function(A){return s+A}).join(" ");a[m.filter(function(A){return!["row","column"].includes(A)}).join("")]=so("div",w,u)}function v(m){var w=m.replace(/^(top|bottom|left|right|center)/,"$1-").split("-");return[].concat((0,Oi.Z)(w),[Oe[m]])}Object.values(q).forEach(function(m){h(v(m))})}},{key:"clearControlPos",value:function(){for(var a in this.controlCorners)this.controlCorners[a]&&Mu(this.controlCorners[a]);this.controlContainer&&Mu(this.controlContainer)}}]),n}())||Pt),sr,Sr,gr=(sr=(0,At.b2)(),sr(Sr=function(){function n(){(0,pt.Z)(this,n),(0,W.Z)(this,"container",void 0),(0,W.Z)(this,"scene",void 0),(0,W.Z)(this,"mapsService",void 0),(0,W.Z)(this,"markers",[]),(0,W.Z)(this,"markerLayers",[]),(0,W.Z)(this,"unAddMarkers",[]),(0,W.Z)(this,"unAddMarkerLayers",[])}return(0,et.Z)(n,[{key:"addMarkerLayer",value:function(a){this.mapsService.map&&this.mapsService.getMarkerContainer()?(this.markerLayers.push(a),a.addTo(this.scene)):this.unAddMarkerLayers.push(a)}},{key:"removeMarkerLayer",value:function(a){a.destroy(),this.markerLayers.indexOf(a);var s=this.markerLayers.indexOf(a);s>-1&&this.markerLayers.splice(s,1)}},{key:"addMarker",value:function(a){this.mapsService.map&&this.mapsService.getMarkerContainer()?(this.markers.push(a),a.addTo(this.scene)):this.unAddMarkers.push(a)}},{key:"addMarkers",value:function(){var a=this;this.unAddMarkers.forEach(function(s){s.addTo(a.scene),a.markers.push(s)}),this.unAddMarkers=[]}},{key:"addMarkerLayers",value:function(){var a=this;this.unAddMarkerLayers.forEach(function(s){a.markerLayers.push(s),s.addTo(a.scene)}),this.unAddMarkers=[]}},{key:"removeMarker",value:function(a){a.remove(),this.markers.indexOf(a);var s=this.markers.indexOf(a);s>-1&&this.markers.splice(s,1)}},{key:"removeAllMarkers",value:function(){this.destroy()}},{key:"init",value:function(a){this.scene=a,this.mapsService=a.get(Dt.IMapService)}},{key:"destroy",value:function(){this.markers.forEach(function(a){a.remove()}),this.markers=[],this.markerLayers.forEach(function(a){a.destroy()}),this.markerLayers=[]}},{key:"removeMakerLayerMarker",value:function(a){a.destroy()}}]),n}())||Sr),zr,Jr,ln=(zr=(0,At.b2)(),zr(Jr=function(){function n(){(0,pt.Z)(this,n),(0,W.Z)(this,"scene",void 0),(0,W.Z)(this,"mapsService",void 0),(0,W.Z)(this,"popups",[]),(0,W.Z)(this,"unAddPopups",[])}return(0,et.Z)(n,[{key:"isMarkerReady",get:function(){return this.mapsService.map&&this.mapsService.getMarkerContainer()}},{key:"removePopup",value:function(a){a!=null&&a.isOpen()&&a.remove();var s=this.popups.indexOf(a);s>-1&&this.popups.splice(s,1);var u=this.unAddPopups.indexOf(a);u>-1&&this.unAddPopups.splice(u,1)}},{key:"destroy",value:function(){this.popups.forEach(function(a){return a.remove()})}},{key:"addPopup",value:function(a){var s=this;a&&a.getOptions().autoClose&&[].concat((0,Oi.Z)(this.popups),(0,Oi.Z)(this.unAddPopups)).forEach(function(u){u.getOptions().autoClose&&s.removePopup(u)}),this.isMarkerReady?(a.addTo(this.scene),this.popups.push(a)):this.unAddPopups.push(a),a.on("close",function(){s.removePopup(a)})}},{key:"initPopup",value:function(){var a=this;this.unAddPopups.length&&this.unAddPopups.forEach(function(s){a.addPopup(s),a.unAddPopups=[]})}},{key:"init",value:function(a){this.scene=a,this.mapsService=a.get(Dt.IMapService)}}]),n}())||Jr),yn={MapToken:"\u60A8\u6B63\u5728\u4F7F\u7528 Demo \u6D4B\u8BD5 Token, \u751F\u4EA7\u73AF\u5883\u52A1\u5FC5\u81EA\u884C\u6CE8\u518C Token \u786E\u4FDD\u670D\u52A1\u7A33\u5B9A",SDK:"\u8BF7\u786E\u8BA4\u5F15\u5165\u4E86mapbox-gl api\u4E14\u5728L7\u4E4B\u524D\u5F15\u5165"},Pn=yn,oi,Ti,oa={id:"map",logoPosition:"bottomleft",logoVisible:!0,antialias:!0,stencil:!0,isMini:!1,preserveDrawingBuffer:!1,pickBufferScale:1,fitBoundsOptions:{animate:!1}},Vi={colors:["rgb(103,0,31)","rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(247,247,247)","rgb(209,229,240)","rgb(146,197,222)","rgb(67,147,195)","rgb(33,102,172)","rgb(5,48,97)"],size:10,shape:"circle",scales:{},shape2d:["circle","triangle","square","pentagon","hexagon","octogon","hexagram","rhombus","vesica"],shape3d:["cylinder","triangleColumn","hexagonColumn","squareColumn"],minZoom:-1,maxZoom:24,visible:!0,autoFit:!1,pickingBuffer:0,enablePropagation:!1,zIndex:0,blend:"normal",pickedFeatureID:-1,enableMultiPassRenderer:!1,enablePicking:!0,active:!1,activeColor:"#2f54eb",enableHighlight:!1,enableSelect:!1,highlightColor:"#2f54eb",activeMix:0,selectColor:"blue",selectMix:0,enableTAA:!1,jitterScale:1,enableLighting:!1,animateOption:{enable:!1,interval:.2,duration:4,trailLength:.15},forward:!0},da=(oi=(0,At.b2)(),oi(Ti=function(){function n(){(0,pt.Z)(this,n),(0,W.Z)(this,"sceneConfigCache",{}),(0,W.Z)(this,"layerConfigCache",{}),(0,W.Z)(this,"layerAttributeConfigCache",{})}return(0,et.Z)(n,[{key:"getSceneConfig",value:function(a){return this.sceneConfigCache[a]}},{key:"getSceneWarninfo",value:function(a){return Pn[a]}},{key:"setSceneConfig",value:function(a,s){this.sceneConfigCache[a]=(0,K.Z)((0,K.Z)({},oa),s)}},{key:"getLayerConfig",value:function(a){return this.layerConfigCache[a]}},{key:"setLayerConfig",value:function(a,s,u){this.layerConfigCache[s]=(0,K.Z)({},(0,Fn.merge)({},this.sceneConfigCache[a],Vi,u))}},{key:"getAttributeConfig",value:function(a){return this.layerAttributeConfigCache[a]}},{key:"setAttributeConfig",value:function(a,s){this.layerAttributeConfigCache[a]=(0,K.Z)((0,K.Z)({},this.layerAttributeConfigCache[a]),s)}},{key:"clean",value:function(){this.sceneConfigCache={},this.layerConfigCache={}}}]),n}())||Ti);function Rn(n,l,a,s){a&&Object.defineProperty(n,l,{enumerable:a.enumerable,configurable:a.configurable,writable:a.writable,value:a.initializer?a.initializer.call(s):void 0})}function Ri(n,l,a,s,u){var h={};return Object.keys(s).forEach(function(v){h[v]=s[v]}),h.enumerable=!!h.enumerable,h.configurable=!!h.configurable,("value"in h||h.initializer)&&(h.writable=!0),h=a.slice().reverse().reduce(function(v,m){return m(n,l,v)||v},h),u&&h.initializer!==void 0&&(h.value=h.initializer?h.initializer.call(u):void 0,h.initializer=void 0),h.initializer===void 0&&(Object.defineProperty(n,l,h),h=null),h}function na(){var n=new Lr.WT(4);return Lr.WT!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0,n[3]=0),n}function ta(n){var l=new glMatrix.ARRAY_TYPE(4);return l[0]=n[0],l[1]=n[1],l[2]=n[2],l[3]=n[3],l}function mo(n,l,a,s){var u=new Lr.WT(4);return u[0]=n,u[1]=l,u[2]=a,u[3]=s,u}function Wa(n,l){return n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3],n}function po(n,l,a,s,u){return n[0]=l,n[1]=a,n[2]=s,n[3]=u,n}function wi(n,l,a){return n[0]=l[0]+a[0],n[1]=l[1]+a[1],n[2]=l[2]+a[2],n[3]=l[3]+a[3],n}function Ho(n,l,a){return n[0]=l[0]-a[0],n[1]=l[1]-a[1],n[2]=l[2]-a[2],n[3]=l[3]-a[3],n}function Zs(n,l,a){return n[0]=l[0]*a[0],n[1]=l[1]*a[1],n[2]=l[2]*a[2],n[3]=l[3]*a[3],n}function ru(n,l,a){return n[0]=l[0]/a[0],n[1]=l[1]/a[1],n[2]=l[2]/a[2],n[3]=l[3]/a[3],n}function Ls(n,l){return n[0]=Math.ceil(l[0]),n[1]=Math.ceil(l[1]),n[2]=Math.ceil(l[2]),n[3]=Math.ceil(l[3]),n}function Ds(n,l){return n[0]=Math.floor(l[0]),n[1]=Math.floor(l[1]),n[2]=Math.floor(l[2]),n[3]=Math.floor(l[3]),n}function cu(n,l,a){return n[0]=Math.min(l[0],a[0]),n[1]=Math.min(l[1],a[1]),n[2]=Math.min(l[2],a[2]),n[3]=Math.min(l[3],a[3]),n}function Vs(n,l,a){return n[0]=Math.max(l[0],a[0]),n[1]=Math.max(l[1],a[1]),n[2]=Math.max(l[2],a[2]),n[3]=Math.max(l[3],a[3]),n}function Eu(n,l){return n[0]=Math.round(l[0]),n[1]=Math.round(l[1]),n[2]=Math.round(l[2]),n[3]=Math.round(l[3]),n}function Wu(n,l,a){return n[0]=l[0]*a,n[1]=l[1]*a,n[2]=l[2]*a,n[3]=l[3]*a,n}function ml(n,l,a,s){return n[0]=l[0]+a[0]*s,n[1]=l[1]+a[1]*s,n[2]=l[2]+a[2]*s,n[3]=l[3]+a[3]*s,n}function Tl(n,l){var a=l[0]-n[0],s=l[1]-n[1],u=l[2]-n[2],h=l[3]-n[3];return Math.hypot(a,s,u,h)}function Du(n,l){var a=l[0]-n[0],s=l[1]-n[1],u=l[2]-n[2],h=l[3]-n[3];return a*a+s*s+u*u+h*h}function yl(n){var l=n[0],a=n[1],s=n[2],u=n[3];return Math.hypot(l,a,s,u)}function Ja(n){var l=n[0],a=n[1],s=n[2],u=n[3];return l*l+a*a+s*s+u*u}function ms(n,l){return n[0]=-l[0],n[1]=-l[1],n[2]=-l[2],n[3]=-l[3],n}function fs(n,l){return n[0]=1/l[0],n[1]=1/l[1],n[2]=1/l[2],n[3]=1/l[3],n}function Bo(n,l){var a=l[0],s=l[1],u=l[2],h=l[3],v=a*a+s*s+u*u+h*h;return v>0&&(v=1/Math.sqrt(v)),n[0]=a*v,n[1]=s*v,n[2]=u*v,n[3]=h*v,n}function Ql(n,l){return n[0]*l[0]+n[1]*l[1]+n[2]*l[2]+n[3]*l[3]}function Nl(n,l,a,s){var u=a[0]*s[1]-a[1]*s[0],h=a[0]*s[2]-a[2]*s[0],v=a[0]*s[3]-a[3]*s[0],m=a[1]*s[2]-a[2]*s[1],w=a[1]*s[3]-a[3]*s[1],A=a[2]*s[3]-a[3]*s[2],R=l[0],B=l[1],G=l[2],j=l[3];return n[0]=B*A-G*w+j*m,n[1]=-(R*A)+G*v-j*h,n[2]=R*w-B*v+j*u,n[3]=-(R*m)+B*h-G*u,n}function Bs(n,l,a,s){var u=l[0],h=l[1],v=l[2],m=l[3];return n[0]=u+s*(a[0]-u),n[1]=h+s*(a[1]-h),n[2]=v+s*(a[2]-v),n[3]=m+s*(a[3]-m),n}function wu(n,l){l=l||1;var a,s,u,h,v,m;do a=glMatrix.RANDOM()*2-1,s=glMatrix.RANDOM()*2-1,v=a*a+s*s;while(v>=1);do u=glMatrix.RANDOM()*2-1,h=glMatrix.RANDOM()*2-1,m=u*u+h*h;while(m>=1);var w=Math.sqrt((1-v)/m);return n[0]=l*a,n[1]=l*s,n[2]=l*u*w,n[3]=l*h*w,n}function al(n,l,a){var s=l[0],u=l[1],h=l[2],v=l[3];return n[0]=a[0]*s+a[4]*u+a[8]*h+a[12]*v,n[1]=a[1]*s+a[5]*u+a[9]*h+a[13]*v,n[2]=a[2]*s+a[6]*u+a[10]*h+a[14]*v,n[3]=a[3]*s+a[7]*u+a[11]*h+a[15]*v,n}function Fo(n,l,a){var s=l[0],u=l[1],h=l[2],v=a[0],m=a[1],w=a[2],A=a[3],R=A*s+m*h-w*u,B=A*u+w*s-v*h,G=A*h+v*u-m*s,j=-v*s-m*u-w*h;return n[0]=R*A+j*-v+B*-w-G*-m,n[1]=B*A+j*-m+G*-v-R*-w,n[2]=G*A+j*-w+R*-m-B*-v,n[3]=l[3],n}function ah(n){return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n}function Ml(n){return"vec4("+n[0]+", "+n[1]+", "+n[2]+", "+n[3]+")"}function ep(n,l){return n[0]===l[0]&&n[1]===l[1]&&n[2]===l[2]&&n[3]===l[3]}function Su(n,l){var a=n[0],s=n[1],u=n[2],h=n[3],v=l[0],m=l[1],w=l[2],A=l[3];return Math.abs(a-v)<=glMatrix.EPSILON*Math.max(1,Math.abs(a),Math.abs(v))&&Math.abs(s-m)<=glMatrix.EPSILON*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(u-w)<=glMatrix.EPSILON*Math.max(1,Math.abs(u),Math.abs(w))&&Math.abs(h-A)<=glMatrix.EPSILON*Math.max(1,Math.abs(h),Math.abs(A))}var rp=null,Nf=null,kd=null,Ld=null,l0=null,np=null,Pd=null,q0=function(){var n=na();return function(l,a,s,u,h,v){var m,w;for(a||(a=4),s||(s=0),u?w=Math.min(u*a+s,l.length):w=l.length,m=s;m<w;m+=a)n[0]=l[m],n[1]=l[m+1],n[2]=l[m+2],n[3]=l[m+3],h(n,n,v),l[m]=n[0],l[m+1]=n[1],l[m+2]=n[2],l[m+3]=n[3];return l}}(),oh=Math.PI/180,xv=512,bv=4003e4;function $s(n){var l=n.latitude,a=l===void 0?0:l,s=n.zoom,u=s===void 0?0:s,h=n.scale,v=n.highPrecision,m=v===void 0?!1:v,w=n.flipY,A=w===void 0?!1:w;h=h!==void 0?h:Math.pow(2,u);var R={},B=xv*h,G=Math.cos(a*oh),j=B/360,lt=j/G,ct=B/bv/G;if(R.pixelsPerMeter=[ct,-ct,ct],R.metersPerPixel=[1/ct,-1/ct,1/ct],R.pixelsPerDegree=[j,-lt,ct],R.degreesPerPixel=[1/j,-1/lt,1/ct],m){var _t=oh*Math.tan(a*oh)/G,Vt=j*_t/2,ce=B/bv*_t,ae=ce/lt*ct;R.pixelsPerDegree2=[0,-Vt,ce],R.pixelsPerMeter2=[ae,0,ae],A&&(R.pixelsPerDegree2[1]=-R.pixelsPerDegree2[1],R.pixelsPerMeter2[1]=-R.pixelsPerMeter2[1])}return A&&(R.pixelsPerMeter[1]=-R.pixelsPerMeter[1],R.metersPerPixel[1]=-R.metersPerPixel[1],R.pixelsPerDegree[1]=-R.pixelsPerDegree[1],R.degreesPerPixel[1]=-R.degreesPerPixel[1]),R}var ol;(function(n){n[n.LNGLAT=1]="LNGLAT",n[n.LNGLAT_OFFSET=2]="LNGLAT_OFFSET",n[n.VECTOR_TILE=3]="VECTOR_TILE",n[n.IDENTITY=4]="IDENTITY",n[n.P20=5]="P20",n[n.P20_OFFSET=6]="P20_OFFSET",n[n.METER_OFFSET=7]="METER_OFFSET",n[n.P20_2=8]="P20_2"})(ol||(ol={}));var pf={CoordinateSystem:"u_CoordinateSystem",ViewportCenter:"u_ViewportCenter",ViewportCenterProjection:"u_ViewportCenterProjection",PixelsPerDegree:"u_PixelsPerDegree",PixelsPerDegree2:"u_PixelsPerDegree2",PixelsPerMeter:"u_PixelsPerMeter",Mvp:"u_Mvp"},Od,Ih,Fd,Yp,c0,Ev=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],K0=(Od=(0,At.b2)(),Ih=(0,At.f3)(Dt.ICameraService),Od(Fd=(Yp=function(){function n(){(0,pt.Z)(this,n),(0,W.Z)(this,"needRefresh",!0),Rn(this,"cameraService",c0,this),(0,W.Z)(this,"coordinateSystem",void 0),(0,W.Z)(this,"viewportCenter",void 0),(0,W.Z)(this,"viewportCenterProjection",void 0),(0,W.Z)(this,"pixelsPerDegree",void 0),(0,W.Z)(this,"pixelsPerDegree2",void 0),(0,W.Z)(this,"pixelsPerMeter",void 0)}return(0,et.Z)(n,[{key:"refresh",value:function(a){var s=this.cameraService.getZoom(),u=this.cameraService.getZoomScale(),h=a||this.cameraService.getCenter(),v=$s({latitude:h[1],zoom:s}),m=v.pixelsPerMeter,w=v.pixelsPerDegree;this.viewportCenter=h,this.viewportCenterProjection=[0,0,0,0],this.pixelsPerMeter=m,this.pixelsPerDegree=w,this.pixelsPerDegree2=[0,0,0],this.coordinateSystem===ol.LNGLAT||this.coordinateSystem===ol.P20?this.cameraService.setViewProjectionMatrix(void 0):this.coordinateSystem===ol.LNGLAT_OFFSET?this.calculateLnglatOffset(h,s):this.coordinateSystem===ol.P20_OFFSET&&this.calculateLnglatOffset(h,s,u,!0),this.needRefresh=!1}},{key:"getCoordinateSystem",value:function(){return this.coordinateSystem}},{key:"setCoordinateSystem",value:function(a){this.coordinateSystem=a}},{key:"getViewportCenter",value:function(){return this.viewportCenter}},{key:"getViewportCenterProjection",value:function(){return this.viewportCenterProjection}},{key:"getPixelsPerDegree",value:function(){return this.pixelsPerDegree}},{key:"getPixelsPerDegree2",value:function(){return this.pixelsPerDegree2}},{key:"getPixelsPerMeter",value:function(){return this.pixelsPerMeter}},{key:"calculateLnglatOffset",value:function(a,s,u,h){var v=$s({latitude:a[1],zoom:s,scale:u,flipY:h,highPrecision:!0}),m=v.pixelsPerMeter,w=v.pixelsPerDegree,A=v.pixelsPerDegree2,R=this.cameraService.getViewMatrix(),B=this.cameraService.getProjectionMatrix(),G=ti([],B,R),j=this.cameraService.projectFlat([Math.fround(a[0]),Math.fround(a[1])],Math.pow(2,s));this.viewportCenterProjection=al([],[j[0],j[1],0,1],G),R=this.cameraService.getViewMatrixUncentered()||R,G=ti([],B,R),G=ti([],G,Ev),this.cameraService.setViewProjectionMatrix(G),this.pixelsPerMeter=m,this.pixelsPerDegree=w,this.pixelsPerDegree2=A}}]),n}(),c0=Ri(Yp.prototype,"cameraService",[Ih],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Yp))||Fd),Dg=nt(86105),$p=nt.n(Dg),hs;(function(n){n.Hover="hover",n.Click="click",n.Select="select",n.Active="active",n.Drag="drag"})(hs||(hs={}));var df,is,Jl,wv,Rd;function f0(n){var l=Dd();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Dd(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var h0={panstart:"dragstart",panmove:"dragging",panend:"dragend",pancancel:"dragcancel"},Bd=(df=(0,At.b2)(),is=(0,At.f3)(Dt.IMapService),df(Jl=(wv=function(n){(0,zt.Z)(a,n);var l=f0(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"indragging",!1),Rn((0,ut.Z)(s),"mapService",Rd,(0,ut.Z)(s)),(0,W.Z)((0,ut.Z)(s),"hammertime",void 0),(0,W.Z)((0,ut.Z)(s),"lastClickTime",0),(0,W.Z)((0,ut.Z)(s),"lastClickXY",[-1,-1]),(0,W.Z)((0,ut.Z)(s),"clickTimer",void 0),(0,W.Z)((0,ut.Z)(s),"$containter",void 0),(0,W.Z)((0,ut.Z)(s),"onDrag",function(m){var w=s.interactionEvent(m);w.type=h0[w.type],w.type==="dragging"?s.indragging=!0:s.indragging=!1,s.emit(hs.Drag,w)}),(0,W.Z)((0,ut.Z)(s),"onHammer",function(m){m.srcEvent.stopPropagation();var w=s.interactionEvent(m);s.emit(hs.Hover,w)}),(0,W.Z)((0,ut.Z)(s),"onTouch",function(m){var w=m.touches[0];s.onHover({x:w.pageX,y:w.pageY,type:"touch"})}),(0,W.Z)((0,ut.Z)(s),"onHover",function(m){var w=m.clientX,A=m.clientY,R=w,B=A,G=m.type,j=s.mapService.getMapContainer();if(j)if(Cs)R=R-j.left-0,B=B-j.top-0;else{var lt=j.getBoundingClientRect(),ct=lt.top,_t=lt.left;R=R-_t-j.clientLeft,B=B-ct-j.clientTop}var Vt=s.mapService.containerToLngLat([R,B]);if(G==="click"){if(!Cs&&"ontouchstart"in document.documentElement)return;s.isDoubleTap(R,B,Vt);return}if(G==="touch"){s.isDoubleTap(R,B,Vt);return}G!=="click"&&G!=="dblclick"&&s.emit(hs.Hover,{x:R,y:B,lngLat:Vt,type:G,target:m})}),s}return(0,et.Z)(a,[{key:"init",value:function(){this.addEventListenerOnMap(),this.$containter=this.mapService.getMapContainer()}},{key:"destroy",value:function(){this.hammertime&&this.hammertime.destroy(),this.removeEventListenerOnMap(),this.off(hs.Hover)}},{key:"triggerHover",value:function(u){var h=u.x,v=u.y;this.emit(hs.Hover,{x:h,y:v})}},{key:"triggerSelect",value:function(u){this.emit(hs.Select,{featureId:u})}},{key:"triggerActive",value:function(u){this.emit(hs.Active,{featureId:u})}},{key:"handleMiniEvent",value:function(u){this.onHover({clientX:u.touches[0].pageX,clientY:u.touches[0].pageY,type:"touch"})}},{key:"addEventListenerOnMap",value:function(){var u=this.mapService.getMapContainer();if(u)if(Cs)ja.document.addEventListener("touchstart",this.handleMiniEvent.bind(this));else{var h=new($p()).Manager(u);h.add(new($p()).Tap({event:"dblclick",taps:2})),h.add(new($p()).Tap({event:"click"})),h.add(new($p()).Pan({threshold:0,pointers:0})),h.add(new($p()).Press({})),h.on("dblclick click",this.onHammer),h.on("panstart panmove panend pancancel",this.onDrag),u.addEventListener("mousemove",this.onHover),u.addEventListener("mousedown",this.onHover,!0),u.addEventListener("mouseup",this.onHover),u.addEventListener("contextmenu",this.onHover),this.hammertime=h}}},{key:"removeEventListenerOnMap",value:function(){if(Cs)ja.document.removeEventListener("touchstart",this.handleMiniEvent.bind(this));else{var u=this.mapService.getMapContainer();u&&(u.removeEventListener("mousemove",this.onHover),this.hammertime.off("dblclick click",this.onHammer),this.hammertime.off("panstart panmove panend pancancel",this.onDrag),u.removeEventListener("mousedown",this.onHover),u.removeEventListener("mouseup",this.onHover),u.removeEventListener("contextmenu",this.onHover))}}},{key:"interactionEvent",value:function(u){var h=u.type,v=u.pointerType,m,w;v==="touch"?(w=Math.floor(u.pointers[0].clientY),m=Math.floor(u.pointers[0].clientX)):(w=Math.floor(u.srcEvent.y),m=Math.floor(u.srcEvent.x));var A=this.mapService.getMapContainer();if(A){var R=A.getBoundingClientRect(),B=R.top,G=R.left;m-=G,w-=B}var j=this.mapService.containerToLngLat([m,w]);return{x:m,y:w,lngLat:j,type:h,target:u.srcEvent}}},{key:"isDoubleTap",value:function(u,h,v){var m=this,w=new Date().getTime(),A="click";w-this.lastClickTime<400&&Math.abs(this.lastClickXY[0]-u)<10&&Math.abs(this.lastClickXY[1]-h)<10?(this.lastClickTime=0,this.lastClickXY=[-1,-1],this.clickTimer&&clearTimeout(this.clickTimer),A="dblclick",this.emit(hs.Hover,{x:u,y:h,lngLat:v,type:A})):(this.lastClickTime=w,this.lastClickXY=[u,h],this.clickTimer=setTimeout(function(){A="click",m.emit(hs.Hover,{x:u,y:h,lngLat:v,type:A})},400))}}]),a}(Me()),Rd=Ri(wv.prototype,"mapService",[is],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),wv))||Jl),ip=0;function Sv(n){if(Cs)return null;var l=n;if(typeof n=="string"&&(l=document.getElementById(n)),l){var a=document.createElement("div");return a.style.cssText+=`
|
|
position: absolute;
|
|
z-index:2;
|
|
height: 100%;
|
|
width: 100%;
|
|
pointer-events: none;
|
|
`,a.id="l7-scene-".concat(ip++),a.classList.add("l7-scene"),l.appendChild(a),a}return null}function Bg(n){var l,a,s=!0;return n==null||(l=n.target)===null||l===void 0||(a=l.path)===null||a===void 0||a.map(function(u){if(u!=null&&u.classList){var h;u==null||(h=u.classList)===null||h===void 0||h.forEach(function(v){(v==="l7-marker"||v==="l7-popup")&&(s=!1)})}}),s}var ne;(function(n){n[n.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",n[n.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",n[n.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT",n[n.POINTS=0]="POINTS",n[n.LINES=1]="LINES",n[n.LINE_LOOP=2]="LINE_LOOP",n[n.LINE_STRIP=3]="LINE_STRIP",n[n.TRIANGLES=4]="TRIANGLES",n[n.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",n[n.TRIANGLE_FAN=6]="TRIANGLE_FAN",n[n.ZERO=0]="ZERO",n[n.ONE=1]="ONE",n[n.SRC_COLOR=768]="SRC_COLOR",n[n.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",n[n.SRC_ALPHA=770]="SRC_ALPHA",n[n.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",n[n.DST_ALPHA=772]="DST_ALPHA",n[n.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",n[n.DST_COLOR=774]="DST_COLOR",n[n.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",n[n.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",n[n.FUNC_ADD=32774]="FUNC_ADD",n[n.BLEND_EQUATION=32777]="BLEND_EQUATION",n[n.BLEND_EQUATION_RGB=32777]="BLEND_EQUATION_RGB",n[n.BLEND_EQUATION_ALPHA=34877]="BLEND_EQUATION_ALPHA",n[n.FUNC_SUBTRACT=32778]="FUNC_SUBTRACT",n[n.FUNC_REVERSE_SUBTRACT=32779]="FUNC_REVERSE_SUBTRACT",n[n.MAX_EXT=32776]="MAX_EXT",n[n.MIN_EXT=32775]="MIN_EXT",n[n.BLEND_DST_RGB=32968]="BLEND_DST_RGB",n[n.BLEND_SRC_RGB=32969]="BLEND_SRC_RGB",n[n.BLEND_DST_ALPHA=32970]="BLEND_DST_ALPHA",n[n.BLEND_SRC_ALPHA=32971]="BLEND_SRC_ALPHA",n[n.CONSTANT_COLOR=32769]="CONSTANT_COLOR",n[n.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",n[n.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",n[n.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA",n[n.BLEND_COLOR=32773]="BLEND_COLOR",n[n.ARRAY_BUFFER=34962]="ARRAY_BUFFER",n[n.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",n[n.ARRAY_BUFFER_BINDING=34964]="ARRAY_BUFFER_BINDING",n[n.ELEMENT_ARRAY_BUFFER_BINDING=34965]="ELEMENT_ARRAY_BUFFER_BINDING",n[n.STREAM_DRAW=35040]="STREAM_DRAW",n[n.STATIC_DRAW=35044]="STATIC_DRAW",n[n.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",n[n.BUFFER_SIZE=34660]="BUFFER_SIZE",n[n.BUFFER_USAGE=34661]="BUFFER_USAGE",n[n.CURRENT_VERTEX_ATTRIB=34342]="CURRENT_VERTEX_ATTRIB",n[n.FRONT=1028]="FRONT",n[n.BACK=1029]="BACK",n[n.FRONT_AND_BACK=1032]="FRONT_AND_BACK",n[n.CULL_FACE=2884]="CULL_FACE",n[n.BLEND=3042]="BLEND",n[n.DITHER=3024]="DITHER",n[n.STENCIL_TEST=2960]="STENCIL_TEST",n[n.DEPTH_TEST=2929]="DEPTH_TEST",n[n.SCISSOR_TEST=3089]="SCISSOR_TEST",n[n.POLYGON_OFFSET_FILL=32823]="POLYGON_OFFSET_FILL",n[n.SAMPLE_ALPHA_TO_COVERAGE=32926]="SAMPLE_ALPHA_TO_COVERAGE",n[n.SAMPLE_COVERAGE=32928]="SAMPLE_COVERAGE",n[n.NO_ERROR=0]="NO_ERROR",n[n.INVALID_ENUM=1280]="INVALID_ENUM",n[n.INVALID_VALUE=1281]="INVALID_VALUE",n[n.INVALID_OPERATION=1282]="INVALID_OPERATION",n[n.OUT_OF_MEMORY=1285]="OUT_OF_MEMORY",n[n.CW=2304]="CW",n[n.CCW=2305]="CCW",n[n.LINE_WIDTH=2849]="LINE_WIDTH",n[n.ALIASED_POINT_SIZE_RANGE=33901]="ALIASED_POINT_SIZE_RANGE",n[n.ALIASED_LINE_WIDTH_RANGE=33902]="ALIASED_LINE_WIDTH_RANGE",n[n.CULL_FACE_MODE=2885]="CULL_FACE_MODE",n[n.FRONT_FACE=2886]="FRONT_FACE",n[n.DEPTH_RANGE=2928]="DEPTH_RANGE",n[n.DEPTH_WRITEMASK=2930]="DEPTH_WRITEMASK",n[n.DEPTH_CLEAR_VALUE=2931]="DEPTH_CLEAR_VALUE",n[n.DEPTH_FUNC=2932]="DEPTH_FUNC",n[n.STENCIL_CLEAR_VALUE=2961]="STENCIL_CLEAR_VALUE",n[n.STENCIL_FUNC=2962]="STENCIL_FUNC",n[n.STENCIL_FAIL=2964]="STENCIL_FAIL",n[n.STENCIL_PASS_DEPTH_FAIL=2965]="STENCIL_PASS_DEPTH_FAIL",n[n.STENCIL_PASS_DEPTH_PASS=2966]="STENCIL_PASS_DEPTH_PASS",n[n.STENCIL_REF=2967]="STENCIL_REF",n[n.STENCIL_VALUE_MASK=2963]="STENCIL_VALUE_MASK",n[n.STENCIL_WRITEMASK=2968]="STENCIL_WRITEMASK",n[n.STENCIL_BACK_FUNC=34816]="STENCIL_BACK_FUNC",n[n.STENCIL_BACK_FAIL=34817]="STENCIL_BACK_FAIL",n[n.STENCIL_BACK_PASS_DEPTH_FAIL=34818]="STENCIL_BACK_PASS_DEPTH_FAIL",n[n.STENCIL_BACK_PASS_DEPTH_PASS=34819]="STENCIL_BACK_PASS_DEPTH_PASS",n[n.STENCIL_BACK_REF=36003]="STENCIL_BACK_REF",n[n.STENCIL_BACK_VALUE_MASK=36004]="STENCIL_BACK_VALUE_MASK",n[n.STENCIL_BACK_WRITEMASK=36005]="STENCIL_BACK_WRITEMASK",n[n.VIEWPORT=2978]="VIEWPORT",n[n.SCISSOR_BOX=3088]="SCISSOR_BOX",n[n.COLOR_CLEAR_VALUE=3106]="COLOR_CLEAR_VALUE",n[n.COLOR_WRITEMASK=3107]="COLOR_WRITEMASK",n[n.UNPACK_ALIGNMENT=3317]="UNPACK_ALIGNMENT",n[n.PACK_ALIGNMENT=3333]="PACK_ALIGNMENT",n[n.MAX_TEXTURE_SIZE=3379]="MAX_TEXTURE_SIZE",n[n.MAX_VIEWPORT_DIMS=3386]="MAX_VIEWPORT_DIMS",n[n.SUBPIXEL_BITS=3408]="SUBPIXEL_BITS",n[n.RED_BITS=3410]="RED_BITS",n[n.GREEN_BITS=3411]="GREEN_BITS",n[n.BLUE_BITS=3412]="BLUE_BITS",n[n.ALPHA_BITS=3413]="ALPHA_BITS",n[n.DEPTH_BITS=3414]="DEPTH_BITS",n[n.STENCIL_BITS=3415]="STENCIL_BITS",n[n.POLYGON_OFFSET_UNITS=10752]="POLYGON_OFFSET_UNITS",n[n.POLYGON_OFFSET_FACTOR=32824]="POLYGON_OFFSET_FACTOR",n[n.TEXTURE_BINDING_2D=32873]="TEXTURE_BINDING_2D",n[n.SAMPLE_BUFFERS=32936]="SAMPLE_BUFFERS",n[n.SAMPLES=32937]="SAMPLES",n[n.SAMPLE_COVERAGE_VALUE=32938]="SAMPLE_COVERAGE_VALUE",n[n.SAMPLE_COVERAGE_INVERT=32939]="SAMPLE_COVERAGE_INVERT",n[n.COMPRESSED_TEXTURE_FORMATS=34467]="COMPRESSED_TEXTURE_FORMATS",n[n.DONT_CARE=4352]="DONT_CARE",n[n.FASTEST=4353]="FASTEST",n[n.NICEST=4354]="NICEST",n[n.GENERATE_MIPMAP_HINT=33170]="GENERATE_MIPMAP_HINT",n[n.BYTE=5120]="BYTE",n[n.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",n[n.SHORT=5122]="SHORT",n[n.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",n[n.INT=5124]="INT",n[n.UNSIGNED_INT=5125]="UNSIGNED_INT",n[n.FLOAT=5126]="FLOAT",n[n.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",n[n.ALPHA=6406]="ALPHA",n[n.RGB=6407]="RGB",n[n.RGBA=6408]="RGBA",n[n.LUMINANCE=6409]="LUMINANCE",n[n.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",n[n.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",n[n.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",n[n.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",n[n.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",n[n.VERTEX_SHADER=35633]="VERTEX_SHADER",n[n.MAX_VERTEX_ATTRIBS=34921]="MAX_VERTEX_ATTRIBS",n[n.MAX_VERTEX_UNIFORM_VECTORS=36347]="MAX_VERTEX_UNIFORM_VECTORS",n[n.MAX_VARYING_VECTORS=36348]="MAX_VARYING_VECTORS",n[n.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661]="MAX_COMBINED_TEXTURE_IMAGE_UNITS",n[n.MAX_VERTEX_TEXTURE_IMAGE_UNITS=35660]="MAX_VERTEX_TEXTURE_IMAGE_UNITS",n[n.MAX_TEXTURE_IMAGE_UNITS=34930]="MAX_TEXTURE_IMAGE_UNITS",n[n.MAX_FRAGMENT_UNIFORM_VECTORS=36349]="MAX_FRAGMENT_UNIFORM_VECTORS",n[n.SHADER_TYPE=35663]="SHADER_TYPE",n[n.DELETE_STATUS=35712]="DELETE_STATUS",n[n.LINK_STATUS=35714]="LINK_STATUS",n[n.VALIDATE_STATUS=35715]="VALIDATE_STATUS",n[n.ATTACHED_SHADERS=35717]="ATTACHED_SHADERS",n[n.ACTIVE_UNIFORMS=35718]="ACTIVE_UNIFORMS",n[n.ACTIVE_ATTRIBUTES=35721]="ACTIVE_ATTRIBUTES",n[n.SHADING_LANGUAGE_VERSION=35724]="SHADING_LANGUAGE_VERSION",n[n.CURRENT_PROGRAM=35725]="CURRENT_PROGRAM",n[n.NEVER=512]="NEVER",n[n.LESS=513]="LESS",n[n.EQUAL=514]="EQUAL",n[n.LEQUAL=515]="LEQUAL",n[n.GREATER=516]="GREATER",n[n.NOTEQUAL=517]="NOTEQUAL",n[n.GEQUAL=518]="GEQUAL",n[n.ALWAYS=519]="ALWAYS",n[n.KEEP=7680]="KEEP",n[n.REPLACE=7681]="REPLACE",n[n.INCR=7682]="INCR",n[n.DECR=7683]="DECR",n[n.INVERT=5386]="INVERT",n[n.INCR_WRAP=34055]="INCR_WRAP",n[n.DECR_WRAP=34056]="DECR_WRAP",n[n.VENDOR=7936]="VENDOR",n[n.RENDERER=7937]="RENDERER",n[n.VERSION=7938]="VERSION",n[n.NEAREST=9728]="NEAREST",n[n.LINEAR=9729]="LINEAR",n[n.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",n[n.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",n[n.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",n[n.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR",n[n.TEXTURE_MAG_FILTER=10240]="TEXTURE_MAG_FILTER",n[n.TEXTURE_MIN_FILTER=10241]="TEXTURE_MIN_FILTER",n[n.TEXTURE_WRAP_S=10242]="TEXTURE_WRAP_S",n[n.TEXTURE_WRAP_T=10243]="TEXTURE_WRAP_T",n[n.TEXTURE_2D=3553]="TEXTURE_2D",n[n.TEXTURE=5890]="TEXTURE",n[n.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",n[n.TEXTURE_BINDING_CUBE_MAP=34068]="TEXTURE_BINDING_CUBE_MAP",n[n.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",n[n.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",n[n.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",n[n.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",n[n.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",n[n.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",n[n.MAX_CUBE_MAP_TEXTURE_SIZE=34076]="MAX_CUBE_MAP_TEXTURE_SIZE",n[n.TEXTURE0=33984]="TEXTURE0",n[n.TEXTURE1=33985]="TEXTURE1",n[n.TEXTURE2=33986]="TEXTURE2",n[n.TEXTURE3=33987]="TEXTURE3",n[n.TEXTURE4=33988]="TEXTURE4",n[n.TEXTURE5=33989]="TEXTURE5",n[n.TEXTURE6=33990]="TEXTURE6",n[n.TEXTURE7=33991]="TEXTURE7",n[n.TEXTURE8=33992]="TEXTURE8",n[n.TEXTURE9=33993]="TEXTURE9",n[n.TEXTURE10=33994]="TEXTURE10",n[n.TEXTURE11=33995]="TEXTURE11",n[n.TEXTURE12=33996]="TEXTURE12",n[n.TEXTURE13=33997]="TEXTURE13",n[n.TEXTURE14=33998]="TEXTURE14",n[n.TEXTURE15=33999]="TEXTURE15",n[n.TEXTURE16=34e3]="TEXTURE16",n[n.TEXTURE17=34001]="TEXTURE17",n[n.TEXTURE18=34002]="TEXTURE18",n[n.TEXTURE19=34003]="TEXTURE19",n[n.TEXTURE20=34004]="TEXTURE20",n[n.TEXTURE21=34005]="TEXTURE21",n[n.TEXTURE22=34006]="TEXTURE22",n[n.TEXTURE23=34007]="TEXTURE23",n[n.TEXTURE24=34008]="TEXTURE24",n[n.TEXTURE25=34009]="TEXTURE25",n[n.TEXTURE26=34010]="TEXTURE26",n[n.TEXTURE27=34011]="TEXTURE27",n[n.TEXTURE28=34012]="TEXTURE28",n[n.TEXTURE29=34013]="TEXTURE29",n[n.TEXTURE30=34014]="TEXTURE30",n[n.TEXTURE31=34015]="TEXTURE31",n[n.ACTIVE_TEXTURE=34016]="ACTIVE_TEXTURE",n[n.REPEAT=10497]="REPEAT",n[n.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",n[n.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",n[n.FLOAT_VEC2=35664]="FLOAT_VEC2",n[n.FLOAT_VEC3=35665]="FLOAT_VEC3",n[n.FLOAT_VEC4=35666]="FLOAT_VEC4",n[n.INT_VEC2=35667]="INT_VEC2",n[n.INT_VEC3=35668]="INT_VEC3",n[n.INT_VEC4=35669]="INT_VEC4",n[n.BOOL=35670]="BOOL",n[n.BOOL_VEC2=35671]="BOOL_VEC2",n[n.BOOL_VEC3=35672]="BOOL_VEC3",n[n.BOOL_VEC4=35673]="BOOL_VEC4",n[n.FLOAT_MAT2=35674]="FLOAT_MAT2",n[n.FLOAT_MAT3=35675]="FLOAT_MAT3",n[n.FLOAT_MAT4=35676]="FLOAT_MAT4",n[n.SAMPLER_2D=35678]="SAMPLER_2D",n[n.SAMPLER_CUBE=35680]="SAMPLER_CUBE",n[n.VERTEX_ATTRIB_ARRAY_ENABLED=34338]="VERTEX_ATTRIB_ARRAY_ENABLED",n[n.VERTEX_ATTRIB_ARRAY_SIZE=34339]="VERTEX_ATTRIB_ARRAY_SIZE",n[n.VERTEX_ATTRIB_ARRAY_STRIDE=34340]="VERTEX_ATTRIB_ARRAY_STRIDE",n[n.VERTEX_ATTRIB_ARRAY_TYPE=34341]="VERTEX_ATTRIB_ARRAY_TYPE",n[n.VERTEX_ATTRIB_ARRAY_NORMALIZED=34922]="VERTEX_ATTRIB_ARRAY_NORMALIZED",n[n.VERTEX_ATTRIB_ARRAY_POINTER=34373]="VERTEX_ATTRIB_ARRAY_POINTER",n[n.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=34975]="VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",n[n.COMPILE_STATUS=35713]="COMPILE_STATUS",n[n.LOW_FLOAT=36336]="LOW_FLOAT",n[n.MEDIUM_FLOAT=36337]="MEDIUM_FLOAT",n[n.HIGH_FLOAT=36338]="HIGH_FLOAT",n[n.LOW_INT=36339]="LOW_INT",n[n.MEDIUM_INT=36340]="MEDIUM_INT",n[n.HIGH_INT=36341]="HIGH_INT",n[n.FRAMEBUFFER=36160]="FRAMEBUFFER",n[n.RENDERBUFFER=36161]="RENDERBUFFER",n[n.RGBA4=32854]="RGBA4",n[n.RGB5_A1=32855]="RGB5_A1",n[n.RGB565=36194]="RGB565",n[n.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",n[n.STENCIL_INDEX=6401]="STENCIL_INDEX",n[n.STENCIL_INDEX8=36168]="STENCIL_INDEX8",n[n.DEPTH_STENCIL=34041]="DEPTH_STENCIL",n[n.RENDERBUFFER_WIDTH=36162]="RENDERBUFFER_WIDTH",n[n.RENDERBUFFER_HEIGHT=36163]="RENDERBUFFER_HEIGHT",n[n.RENDERBUFFER_INTERNAL_FORMAT=36164]="RENDERBUFFER_INTERNAL_FORMAT",n[n.RENDERBUFFER_RED_SIZE=36176]="RENDERBUFFER_RED_SIZE",n[n.RENDERBUFFER_GREEN_SIZE=36177]="RENDERBUFFER_GREEN_SIZE",n[n.RENDERBUFFER_BLUE_SIZE=36178]="RENDERBUFFER_BLUE_SIZE",n[n.RENDERBUFFER_ALPHA_SIZE=36179]="RENDERBUFFER_ALPHA_SIZE",n[n.RENDERBUFFER_DEPTH_SIZE=36180]="RENDERBUFFER_DEPTH_SIZE",n[n.RENDERBUFFER_STENCIL_SIZE=36181]="RENDERBUFFER_STENCIL_SIZE",n[n.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048]="FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",n[n.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=36049]="FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",n[n.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050]="FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",n[n.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051]="FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",n[n.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",n[n.DEPTH_ATTACHMENT=36096]="DEPTH_ATTACHMENT",n[n.STENCIL_ATTACHMENT=36128]="STENCIL_ATTACHMENT",n[n.DEPTH_STENCIL_ATTACHMENT=33306]="DEPTH_STENCIL_ATTACHMENT",n[n.NONE=0]="NONE",n[n.FRAMEBUFFER_COMPLETE=36053]="FRAMEBUFFER_COMPLETE",n[n.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054]="FRAMEBUFFER_INCOMPLETE_ATTACHMENT",n[n.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055]="FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",n[n.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057]="FRAMEBUFFER_INCOMPLETE_DIMENSIONS",n[n.FRAMEBUFFER_UNSUPPORTED=36061]="FRAMEBUFFER_UNSUPPORTED",n[n.FRAMEBUFFER_BINDING=36006]="FRAMEBUFFER_BINDING",n[n.RENDERBUFFER_BINDING=36007]="RENDERBUFFER_BINDING",n[n.MAX_RENDERBUFFER_SIZE=34024]="MAX_RENDERBUFFER_SIZE",n[n.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",n[n.UNPACK_FLIP_Y_WEBGL=37440]="UNPACK_FLIP_Y_WEBGL",n[n.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441]="UNPACK_PREMULTIPLY_ALPHA_WEBGL",n[n.CONTEXT_LOST_WEBGL=37442]="CONTEXT_LOST_WEBGL",n[n.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443]="UNPACK_COLORSPACE_CONVERSION_WEBGL",n[n.BROWSER_DEFAULT_WEBGL=37444]="BROWSER_DEFAULT_WEBGL"})(ne||(ne={}));var Q0,yy,Cv,qs,vf,_y,ap,op,Ng,p0,Vc,Nd,zd,Ud=(Q0=(0,At.b2)(),yy=(0,At.f3)(Dt.IMapService),Cv=(0,At.f3)(Dt.IRendererService),qs=(0,At.f3)(Dt.IGlobalConfigService),vf=(0,At.f3)(Dt.IInteractionService),_y=(0,At.f3)(Dt.ILayerService),Q0(ap=(op=function(){function n(){var l=this;(0,pt.Z)(this,n),(0,W.Z)(this,"pickedColors",void 0),(0,W.Z)(this,"pickedTileLayers",[]),Rn(this,"mapService",Ng,this),Rn(this,"rendererService",p0,this),Rn(this,"configService",Vc,this),Rn(this,"interactionService",Nd,this),Rn(this,"layerService",zd,this),(0,W.Z)(this,"pickingFBO",void 0),(0,W.Z)(this,"width",0),(0,W.Z)(this,"height",0),(0,W.Z)(this,"alreadyInPicking",!1),(0,W.Z)(this,"pickBufferScale",1),(0,W.Z)(this,"pickFromPickingFBO",function(a,s){var u=s.x,h=s.y,v=s.lngLat,m=s.type,w=s.target,A=!1,R=l.rendererService,B=R.readPixels,G=R.getContainer,j=l.getContainerSize(G()),lt=j.width,ct=j.height;lt*=Qi,ct*=Qi;var _t=a.getLayerConfig(),Vt=_t.enableHighlight,ce=_t.enableSelect,ae=u*Qi,ze=h*Qi;if(ae>lt-1*Qi||ae<0||ze>ct-1*Qi||ze<0)return!1;var $e=B({x:Math.floor(ae/l.pickBufferScale),y:Math.floor((ct-(h+1)*Qi)/l.pickBufferScale),width:1,height:1,data:new Uint8Array(1*1*4),framebuffer:l.pickingFBO});if(l.pickedColors=$e,$e[0]!==0||$e[1]!==0||$e[2]!==0){var xr=zc($e),Or=a.layerPickService.getFeatureById(xr);xr!==a.getCurrentPickId()&&m==="mousemove"&&(m="mouseenter");var Zr={x:u,y:h,type:m,lngLat:v,featureId:xr,feature:Or,target:w};Or&&(A=!0,a.setCurrentPickId(xr),l.triggerHoverOnLayer(a,Zr))}else{var Wr={x:u,y:h,lngLat:v,type:a.getCurrentPickId()!==null&&m==="mousemove"?"mouseout":"un"+m,featureId:null,target:w,feature:null};l.triggerHoverOnLayer(a,(0,K.Z)((0,K.Z)({},Wr),{},{type:"unpick"})),l.triggerHoverOnLayer(a,Wr),a.setCurrentPickId(null)}if(Vt&&a.layerPickService.highlightPickedFeature($e),ce&&m==="click"&&($e==null?void 0:$e.toString())!==[0,0,0,0].toString()){var wn=zc($e);a.getCurrentSelectedId()===null||wn!==a.getCurrentSelectedId()?(a.layerPickService.selectFeature($e),a.setCurrentSelectedId(wn)):(a.layerPickService.selectFeature(new Uint8Array([0,0,0,0])),a.setCurrentSelectedId(null))}return A})}return(0,et.Z)(n,[{key:"init",value:function(a){var s=this.rendererService,u=s.createTexture2D,h=s.createFramebuffer,v=s.getContainer,m=this.getContainerSize(v()),w=m.width,A=m.height;w*=Qi,A*=Qi,this.pickBufferScale=this.configService.getSceneConfig(a).pickBufferScale||1,this.pickingFBO=h({color:u({width:Math.round(w/this.pickBufferScale),height:Math.round(A/this.pickBufferScale),wrapS:ne.CLAMP_TO_EDGE,wrapT:ne.CLAMP_TO_EDGE})}),this.interactionService.on(hs.Hover,this.pickingAllLayer.bind(this))}},{key:"boxPickLayer",value:function(){var l=(0,J.Z)(ot().mark(function s(u,h,v){var m=this,w,A,R;return ot().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:w=this.rendererService,A=w.useFramebuffer,R=w.clear,this.resizePickingFBO(),A(this.pickingFBO,function(){R({framebuffer:m.pickingFBO,color:[0,0,0,0],stencil:0,depth:1}),u.hooks.beforePickingEncode.call(),u.renderModels(),u.hooks.afterPickingEncode.call();var j=m.pickBox(u,h);v(j)});case 3:case"end":return G.stop()}},s,this)}));function a(s,u,h){return l.apply(this,arguments)}return a}()},{key:"pickBox",value:function(a,s){var u=this,h=s.map(function(wn){var vn=wn<0?0:wn;return Math.floor(vn*Qi/u.pickBufferScale)}),v=(0,yt.Z)(h,4),m=v[0],w=v[1],A=v[2],R=v[3],B=this.rendererService,G=B.readPixels,j=B.getContainer,lt=this.getContainerSize(j()),ct=lt.width,_t=lt.height;if(ct*=Qi,_t*=Qi,m>(ct-1)*Qi/this.pickBufferScale||A<0||w>(_t-1)*Qi/this.pickBufferScale||R<0)return[];for(var Vt=Math.min(ct/this.pickBufferScale,A)-m,ce=Math.min(_t/this.pickBufferScale,R)-w,ae=G({x:m,y:Math.floor(_t/this.pickBufferScale-(R+1)),width:Vt,height:ce,data:new Uint8Array(Vt*ce*4),framebuffer:this.pickingFBO}),ze=[],$e={},xr=0;xr<ae.length/4;xr=xr+1){var Or=ae.slice(xr*4,xr*4+4),Zr=zc(Or);if(Zr!==-1&&!$e[Zr]){var Wr=a.layerPickService.getFeatureById(Zr);ze.push((0,K.Z)((0,K.Z)({},Wr),{},{pickedFeatureIdx:Zr})),$e[Zr]=!0}}return ze}},{key:"handleCursor",value:function(a,s){var u=a.getLayerConfig(),h=u.cursor,v=h===void 0?"":h,m=u.cursorEnabled;if(m){var w=this.mapService.version,A=w==="GAODE2.x"?this.mapService.getMapContainer():this.mapService.getMarkerContainer(),R=A==null?void 0:A.style.getPropertyValue("cursor");s==="unmousemove"&&R!==""?A==null||A.style.setProperty("cursor",""):s==="mousemove"&&(A==null||A.style.setProperty("cursor",v))}}},{key:"destroy",value:function(){this.pickingFBO.destroy(),this.pickingFBO=null}},{key:"getContainerSize",value:function(a){return a.getContext?{width:a.width/Qi,height:a.height/Qi}:a.getBoundingClientRect()}},{key:"pickingAllLayer",value:function(){var l=(0,J.Z)(ot().mark(function s(u){return ot().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(!(!this.layerService.needPick(u.type)||!this.isPickingAllLayer())){v.next=2;break}return v.abrupt("return");case 2:return this.alreadyInPicking=!0,v.next=5,this.pickingLayers(u);case 5:this.layerService.renderLayers(),this.alreadyInPicking=!1;case 7:case"end":return v.stop()}},s,this)}));function a(s){return l.apply(this,arguments)}return a}()},{key:"isPickingAllLayer",value:function(){return!(this.alreadyInPicking||this.layerService.alreadyInRendering||this.interactionService.indragging||!this.layerService.getShaderPickStat())}},{key:"resizePickingFBO",value:function(){var a=this.rendererService.getContainer,s=this.getContainerSize(a()),u=s.width,h=s.height;u*=Qi,h*=Qi,(this.width!==u||this.height!==h)&&(this.pickingFBO.resize({width:Math.round(u/this.pickBufferScale),height:Math.round(h/this.pickBufferScale)}),this.width=u,this.height=h)}},{key:"pickingLayers",value:function(){var l=(0,J.Z)(ot().mark(function s(u){var h=this,v,m,w;return ot().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:v=this.rendererService,m=v.useFramebuffer,w=v.clear,this.resizePickingFBO(),m(this.pickingFBO,function(){var B=h.layerService.getRenderList();B.filter(function(G){return G.needPick(u.type)}).reverse().some(function(G){w({framebuffer:h.pickingFBO,color:[0,0,0,0],stencil:0,depth:1}),G.layerPickService.pickRender(u);var j=h.pickFromPickingFBO(G,u);return h.layerService.pickedLayerId=j?+G.id:-1,j&&!G.getLayerConfig().enablePropagation})});case 3:case"end":return R.stop()}},s,this)}));function a(s){return l.apply(this,arguments)}return a}()},{key:"triggerHoverOnLayer",value:function(a,s){Bg(s)&&(this.handleCursor(a,s.type),a.emit(s.type,s))}}]),n}(),Ng=Ri(op.prototype,"mapService",[yy],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),p0=Ri(op.prototype,"rendererService",[Cv],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Vc=Ri(op.prototype,"configService",[qs],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Nd=Ri(op.prototype,"interactionService",[vf],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),zd=Ri(op.prototype,"layerService",[_y],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),op))||ap),Zd=function(){function n(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;(0,pt.Z)(this,n),(0,W.Z)(this,"autoStart",void 0),(0,W.Z)(this,"startTime",0),(0,W.Z)(this,"oldTime",0),(0,W.Z)(this,"running",!1),(0,W.Z)(this,"elapsedTime",0),this.autoStart=l}return(0,et.Z)(n,[{key:"start",value:function(){this.startTime=(typeof performance=="undefined"?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}},{key:"stop",value:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}},{key:"getElapsedTime",value:function(){return this.getDelta(),this.elapsedTime}},{key:"getDelta",value:function(){var a=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var s=(typeof performance=="undefined"?Date:performance).now();a=(s-this.oldTime)/1e3,this.oldTime=s,this.elapsedTime+=a}return a}}]),n}(),Vd,d0,sp,J0,Av,up,v0;function tg(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=Ic(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,u=function(){};return{s:u,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function Ic(n,l){if(n){if(typeof n=="string")return kh(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return kh(n,l)}}function kh(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a<l;a++)s[a]=n[a];return s}function eg(n){var l=Lh();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Lh(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var zg=(Vd=(0,At.b2)(),d0=(0,At.f3)(Dt.IRendererService),sp=(0,At.f3)(Dt.IMapService),Vd(J0=(Av=function(n){(0,zt.Z)(a,n);var l=eg(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"pickedLayerId",-1),(0,W.Z)((0,ut.Z)(s),"clock",new Zd),(0,W.Z)((0,ut.Z)(s),"alreadyInRendering",!1),(0,W.Z)((0,ut.Z)(s),"layers",[]),(0,W.Z)((0,ut.Z)(s),"layerList",[]),(0,W.Z)((0,ut.Z)(s),"layerRenderID",void 0),(0,W.Z)((0,ut.Z)(s),"sceneInited",!1),(0,W.Z)((0,ut.Z)(s),"animateInstanceCount",0),(0,W.Z)((0,ut.Z)(s),"shaderPicking",!0),(0,W.Z)((0,ut.Z)(s),"enableRender",!0),Rn((0,ut.Z)(s),"renderService",up,(0,ut.Z)(s)),Rn((0,ut.Z)(s),"mapService",v0,(0,ut.Z)(s)),(0,W.Z)((0,ut.Z)(s),"reRender",(0,Fn.throttle)(function(){s.updateLayerRenderList(),s.renderLayers()},32)),(0,W.Z)((0,ut.Z)(s),"throttleRenderLayers",(0,Fn.throttle)(function(){s.renderLayers()},16)),s}return(0,et.Z)(a,[{key:"needPick",value:function(u){return this.layerList.some(function(h){return h.needPick(u)})}},{key:"add",value:function(u){var h=this;this.layers.push(u),this.sceneInited&&u.init().then(function(){h.updateLayerRenderList(),h.renderLayers()})}},{key:"addMask",value:function(u){var h=this;this.sceneInited&&u.init().then(function(){h.renderLayers()})}},{key:"initLayers",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v=this;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:this.sceneInited=!0,this.layers.forEach(function(){var A=(0,J.Z)(ot().mark(function R(B){return ot().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(B.startInit){j.next=4;break}return j.next=3,B.init();case 3:v.updateLayerRenderList();case 4:case"end":return j.stop()}},R)}));return function(R){return A.apply(this,arguments)}}());case 2:case"end":return w.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getSceneInited",value:function(){return this.sceneInited}},{key:"getRenderList",value:function(){return this.layerList}},{key:"getLayers",value:function(){return this.layers}},{key:"getLayer",value:function(u){return this.layers.find(function(h){return h.id===u})}},{key:"getLayerByName",value:function(u){return this.layers.find(function(h){return h.name===u})}},{key:"remove",value:function(){var s=(0,J.Z)(ot().mark(function h(v,m){var w,A;return ot().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:m?(w=m.layerChildren.indexOf(v),w>-1&&m.layerChildren.splice(w,1)):(A=this.layers.indexOf(v),A>-1&&this.layers.splice(A,1)),this.updateLayerRenderList(),v.destroy(),this.reRender(),this.emit("layerChange",this.layers);case 5:case"end":return B.stop()}},h,this)}));function u(h,v){return s.apply(this,arguments)}return u}()},{key:"removeAllLayers",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:this.destroy(),this.reRender();case 2:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"setEnableRender",value:function(u){this.enableRender=u}},{key:"renderLayers",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w;return ot().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(!(this.alreadyInRendering||!this.enableRender)){R.next=2;break}return R.abrupt("return");case 2:this.alreadyInRendering=!0,this.clear(),v=tg(this.layerList),R.prev=5,v.s();case 7:if((m=v.n()).done){R.next=19;break}if(w=m.value,w.masks.filter(function(B){return B.inited}).length>0&&(this.renderService.clear({stencil:0,depth:1,framebuffer:null}),w.masks.map(function(){var B=(0,J.Z)(ot().mark(function G(j){return ot().wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:j.render();case 1:case"end":return ct.stop()}},G)}));return function(G){return B.apply(this,arguments)}}())),!w.getLayerConfig().enableMultiPassRenderer){R.next=15;break}return R.next=13,w.renderMultiPass();case 13:R.next=17;break;case 15:return R.next=17,w.render();case 17:R.next=7;break;case 19:R.next=24;break;case 21:R.prev=21,R.t0=R.catch(5),v.e(R.t0);case 24:return R.prev=24,v.f(),R.finish(24);case 27:this.alreadyInRendering=!1;case 28:case"end":return R.stop()}},h,this,[[5,21,24,27]])}));function u(){return s.apply(this,arguments)}return u}()},{key:"renderMask",value:function(u){u.filter(function(h){return h.inited}).map(function(h){h.render()})}},{key:"beforeRenderData",value:function(){var s=(0,J.Z)(ot().mark(function h(v){var m;return ot().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,v.hooks.beforeRenderData.promise();case 2:m=A.sent,m&&this.renderLayers();case 4:case"end":return A.stop()}},h,this)}));function u(h){return s.apply(this,arguments)}return u}()},{key:"renderLayer",value:function(){var s=(0,J.Z)(ot().mark(function h(v){var m=this;return ot().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(v.masks.filter(function(R){return R.inited}).length>0&&v.masks.map(function(R){m.renderService.clear({stencil:0,depth:1,framebuffer:null}),R.render()}),!v.getLayerConfig().enableMultiPassRenderer){A.next=6;break}return A.next=4,v.renderMultiPass();case 4:A.next=8;break;case 6:return A.next=8,v.render();case 8:case"end":return A.stop()}},h)}));function u(h){return s.apply(this,arguments)}return u}()},{key:"updateLayerRenderList",value:function(){var u=this;this.layerList=[],this.layers.filter(function(h){return h.inited}).filter(function(h){return h.isVisible()}).sort(function(h,v){return h.zIndex-v.zIndex}).forEach(function(h){u.layerList.push(h)})}},{key:"destroy",value:function(){this.layers.forEach(function(u){u.destroy()}),this.layers=[],this.layerList=[],this.emit("layerChange",this.layers)}},{key:"startAnimate",value:function(){this.animateInstanceCount++===0&&(this.clock.start(),this.runRender())}},{key:"stopAnimate",value:function(){--this.animateInstanceCount===0&&(this.stopRender(),this.clock.stop())}},{key:"getOESTextureFloat",value:function(){return this.renderService.extensionObject.OES_texture_float}},{key:"enableShaderPick",value:function(){this.shaderPicking=!0}},{key:"disableShaderPick",value:function(){this.shaderPicking=!1}},{key:"getShaderPickStat",value:function(){return this.shaderPicking}},{key:"clear",value:function(){var u=Lo(this.mapService.bgColor);this.renderService.clear({color:u,depth:1,stencil:0,framebuffer:null})}},{key:"runRender",value:function(){this.renderLayers(),this.layerRenderID=ja.requestAnimationFrame(this.runRender.bind(this))}},{key:"stopRender",value:function(){ja.cancelAnimationFrame(this.layerRenderID)}}]),a}(be.EventEmitter),up=Ri(Av.prototype,"renderService",[d0],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),v0=Ri(Av.prototype,"mapService",[sp],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Av))||J0),tc=nt(66105),lp=function(){function n(l){var a=this;(0,pt.Z)(this,n),(0,W.Z)(this,"name",void 0),(0,W.Z)(this,"type",void 0),(0,W.Z)(this,"scale",void 0),(0,W.Z)(this,"descriptor",void 0),(0,W.Z)(this,"featureBufferLayout",[]),(0,W.Z)(this,"needRescale",!1),(0,W.Z)(this,"needRemapping",!1),(0,W.Z)(this,"needRegenerateVertices",!1),(0,W.Z)(this,"featureRange",{startIndex:0,endIndex:1/0}),(0,W.Z)(this,"vertexAttribute",void 0),(0,W.Z)(this,"defaultCallback",function(s){if(s.length===0){var u;return((u=a.scale)===null||u===void 0?void 0:u.defaultValues)||[]}return s.map(function(h,v){var m,w=(m=a.scale)===null||m===void 0?void 0:m.scalers[v].func,A=w(h);return A})}),this.setProps(l)}return(0,et.Z)(n,[{key:"setProps",value:function(a){Object.assign(this,a)}},{key:"mapping",value:function(a){var s;if((s=this.scale)!==null&&s!==void 0&&s.callback){var u,h=(u=this.scale)===null||u===void 0?void 0:u.callback.apply(u,(0,Oi.Z)(a));if(!(0,Fn.isNil)(h))return[h]}return this.defaultCallback(a)}},{key:"resetDescriptor",value:function(){this.descriptor&&(this.descriptor.buffer.data=[])}}]),n}(),Tv=["modelType"],Gd=["buffer","update","name"],Hd=["buffer","update","name"],Mv=["buffer","update","name"],Iv,Ug,Zg,g0,m0,Gc,cp=(Iv={},(0,W.Z)(Iv,ne.FLOAT,4),(0,W.Z)(Iv,ne.UNSIGNED_BYTE,1),(0,W.Z)(Iv,ne.UNSIGNED_SHORT,2),Iv),xy=(Ug=(0,At.b2)(),Zg=(0,At.f3)(Dt.IRendererService),Ug(g0=(m0=function(){function n(){(0,pt.Z)(this,n),(0,W.Z)(this,"attributesAndIndices",void 0),Rn(this,"rendererService",Gc,this),(0,W.Z)(this,"attributes",[]),(0,W.Z)(this,"triangulation",void 0),(0,W.Z)(this,"featureLayout",{sizePerElement:0,elements:[]})}return(0,et.Z)(n,[{key:"registerStyleAttribute",value:function(a){var s=this.getLayerStyleAttribute(a.name||"");return s?s.setProps(a):(s=new lp(a),this.attributes.push(s)),s}},{key:"updateScaleAttribute",value:function(a){this.attributes.forEach(function(s){var u,h=s.name,v=(u=s.scale)===null||u===void 0?void 0:u.field;(a[h]||v&&a[v])&&(s.needRescale=!0,s.needRemapping=!0,s.needRegenerateVertices=!0)})}},{key:"updateStyleAttribute",value:function(a,s,u){var h=this.getLayerStyleAttribute(a);h||(h=this.registerStyleAttribute((0,K.Z)((0,K.Z)({},s),{},{name:a})));var v=s.scale;v&&h&&(h.scale=v,h.needRescale=!0,h.needRemapping=!0,h.needRegenerateVertices=!0,u&&u.featureRange&&(h.featureRange=u.featureRange))}},{key:"getLayerStyleAttributes",value:function(){return this.attributes}},{key:"getLayerStyleAttribute",value:function(a){return this.attributes.find(function(s){return s.name===a})}},{key:"getLayerAttributeScale",value:function(a){var s,u=this.getLayerStyleAttribute(a),h=u==null||(s=u.scale)===null||s===void 0?void 0:s.scalers;return h&&h[0]?h[0].func:null}},{key:"updateAttributeByFeatureRange",value:function(a,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,h=arguments.length>3?arguments[3]:void 0,v=arguments.length>4?arguments[4]:void 0,m=this.attributes.find(function($e){return $e.name===a});if(m&&m.descriptor){var w=m.descriptor,A=w.update,R=w.buffer,B=w.size,G=B===void 0?0:B,j=cp[R.type||ne.FLOAT];if(A){var lt=this.featureLayout,ct=lt.elements,_t=lt.sizePerElement,Vt=ct.slice(u,h);if(!Vt.length)return;var ce=Vt[0].offset,ae=ce*G*j,ze=Vt.map(function($e,xr){for(var Or=$e.featureIdx,Zr=$e.vertices,Wr=$e.normals,wn=Zr.length/_t,vn=[],Kn=0;Kn<wn;Kn++){var Ei=Wr?Wr.slice(Kn*3,Kn*3+3):[];vn.push.apply(vn,(0,Oi.Z)(A(s[Or],Or,Zr.slice(Kn*_t,Kn*_t+_t),xr,Ei)))}return vn}).reduce(function($e,xr){return $e.push.apply($e,(0,Oi.Z)(xr)),$e},[]);m.vertexAttribute.updateBuffer({data:ze,offset:ae}),v==null||v.emit("legend:".concat(a),{type:a,attr:m})}}}},{key:"createAttributesAndIndicesAscy",value:function(a,s,u){var h=this;this.featureLayout={sizePerElement:0,elements:[]};var v=this.attributes.map(function(lt){return lt.resetDescriptor(),lt.descriptor}).filter(function(lt){return lt}),m=u.modelType,w=(0,tc.Z)(u,Tv),A=this.rendererService,R=A.createAttribute,B=A.createBuffer,G=A.createElements,j={};return new Promise(function(lt,ct){la(m,(0,K.Z)({descriptors:h.getDescriptorsWithOutFunc(v),features:a,segmentNumber:s},w)).then(function(_t){_t.descriptors.forEach(function(ce,ae){if(ce){var ze=ce.buffer,$e=ce.update,xr=ce.name,Or=(0,tc.Z)(ce,Gd),Zr=R((0,K.Z)({buffer:B(ze)},Or));j[ce.name||""]=Zr,h.attributes[ae].vertexAttribute=Zr}}),h.featureLayout=_t.featureLayout;var Vt=G({data:_t.indices,type:ne.UNSIGNED_INT,count:_t.indices.length});h.attributesAndIndices={attributes:j,elements:Vt,count:null},lt(h.attributesAndIndices)}).catch(function(_t){console.warn(_t),ct(_t)})})}},{key:"createAttributesAndIndices",value:function(a,s,u){var h=this;this.featureLayout={sizePerElement:0,elements:[]},s&&(this.triangulation=s);var v=this.attributes.map(function(ae){return ae.resetDescriptor(),ae.descriptor}),m=0,w=0,A=[],R=[],B=[],G=3;a.forEach(function(ae,ze){var $e=h.triangulation(ae,u),xr=$e.indices,Or=$e.vertices,Zr=$e.normals,Wr=$e.size,wn=$e.indexes,vn=$e.count;typeof vn=="number"&&(w+=vn),xr.forEach(function(_o){R.push(_o+m)}),G=Wr;var Kn=Or.length/Wr;h.featureLayout.sizePerElement=G,h.featureLayout.elements.push({featureIdx:ze,vertices:Or,normals:Zr,offset:m}),m+=Kn;for(var Ei=function(jo){var Gs=(Zr==null?void 0:Zr.slice(jo*3,jo*3+3))||[],hu=Or.slice(jo*Wr,jo*Wr+Wr),$u=0;wn&&wn[jo]!==void 0&&($u=wn[jo]),v.forEach(function(Uh,m2){if(Uh&&Uh.update){var p_;(p_=Uh.buffer.data).push.apply(p_,(0,Oi.Z)(Uh.update(ae,ze,hu,jo,Gs,$u)))}})},qi=0;qi<Kn;qi++)Ei(qi)});var j=this.rendererService,lt=j.createAttribute,ct=j.createBuffer,_t=j.createElements,Vt={};v.forEach(function(ae,ze){if(ae){var $e=ae.buffer,xr=ae.update,Or=ae.name,Zr=(0,tc.Z)(ae,Hd),Wr=lt((0,K.Z)({buffer:ct($e)},Zr));Vt[ae.name||""]=Wr,h.attributes[ze].vertexAttribute=Wr}});var ce=_t({data:R,type:ne.UNSIGNED_INT,count:R.length});return this.attributesAndIndices={attributes:Vt,elements:ce,count:w},this.attributesAndIndices}},{key:"createAttributes",value:function(a,s){var u=this;this.featureLayout={sizePerElement:0,elements:[]},s&&(this.triangulation=s);var h=this.attributes.map(function(j){return j.resetDescriptor(),j.descriptor}),v=0,m=[],w=3;a.forEach(function(j,lt){var ct=u.triangulation(j),_t=ct.indices,Vt=ct.vertices,ce=ct.normals,ae=ct.size,ze=ct.indexes;_t.forEach(function(Zr){m.push(Zr+v)}),w=ae;var $e=Vt.length/ae;u.featureLayout.sizePerElement=w,u.featureLayout.elements.push({featureIdx:lt,vertices:Vt,normals:ce,offset:v}),v+=$e;for(var xr=function(Wr){var wn=(ce==null?void 0:ce.slice(Wr*3,Wr*3+3))||[],vn=Vt.slice(Wr*ae,Wr*ae+ae),Kn=0;ze&&ze[Wr]!==void 0&&(Kn=ze[Wr]),h.forEach(function(Ei,qi){if(Ei&&Ei.update){var _o;(_o=Ei.buffer.data).push.apply(_o,(0,Oi.Z)(Ei.update(j,lt,vn,Wr,wn,Kn)))}})},Or=0;Or<$e;Or++)xr(Or)});var A=this.rendererService,R=A.createAttribute,B=A.createBuffer,G={};return h.forEach(function(j,lt){if(j){var ct=j.buffer,_t=j.update,Vt=j.name,ce=(0,tc.Z)(j,Mv),ae=R((0,K.Z)({buffer:B(ct)},ce));G[j.name||""]=ae,u.attributes[lt].vertexAttribute=ae}}),{attributes:G}}},{key:"clearAllAttributes",value:function(){var a;this.attributes.forEach(function(s){s.vertexAttribute&&s.vertexAttribute.destroy()}),(a=this.attributesAndIndices)===null||a===void 0||a.elements.destroy(),this.attributes=[]}},{key:"getDescriptorsWithOutFunc",value:function(a){return a.map(function(s){return{buffer:s.buffer,name:s.name,size:s.size}})}}]),n}(),Gc=Ri(m0.prototype,"rendererService",[Zg],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),m0))||g0),qp=nt(93738);function y0(n,l,a,s){function u(h){return h instanceof a?h:new a(function(v){v(h)})}return new(a||(a=Promise))(function(h,v){function m(R){try{A(s.next(R))}catch(B){v(B)}}function w(R){try{A(s.throw(R))}catch(B){v(B)}}function A(R){R.done?h(R.value):u(R.value).then(m,w)}A((s=s.apply(n,l||[])).next())})}function rg(n,l){var a={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},s,u,h,v;return v={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function m(A){return function(R){return w([A,R])}}function w(A){if(s)throw new TypeError("Generator is already executing.");for(;a;)try{if(s=1,u&&(h=A[0]&2?u.return:A[0]?u.throw||((h=u.return)&&h.call(u),0):u.next)&&!(h=h.call(u,A[1])).done)return h;switch(u=0,h&&(A=[A[0]&2,h.value]),A[0]){case 0:case 1:h=A;break;case 4:return a.label++,{value:A[1],done:!1};case 5:a.label++,u=A[1],A=[0];continue;case 7:A=a.ops.pop(),a.trys.pop();continue;default:if(h=a.trys,!(h=h.length>0&&h[h.length-1])&&(A[0]===6||A[0]===2)){a=0;continue}if(A[0]===3&&(!h||A[1]>h[0]&&A[1]<h[3])){a.label=A[1];break}if(A[0]===6&&a.label<h[1]){a.label=h[1],h=A;break}if(h&&a.label<h[2]){a.label=h[2],a.ops.push(A);break}h[2]&&a.ops.pop(),a.trys.pop();continue}A=l.call(n,a)}catch(R){A=[6,R],u=0}finally{s=h=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}}function jd(n,l){var a=typeof Symbol=="function"&&n[Symbol.iterator];if(!a)return n;var s=a.call(n),u,h=[],v;try{for(;(l===void 0||l-- >0)&&!(u=s.next()).done;)h.push(u.value)}catch(m){v={error:m}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(v)throw v.error}}return h}function _0(n,l,a){if(a||arguments.length===2)for(var s=0,u=l.length,h;s<u;s++)(h||!(s in l))&&(h||(h=Array.prototype.slice.call(l,0,s)),h[s]=l[s]);return n.concat(h||Array.prototype.slice.call(l))}function ng(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var _l={exports:{}},zf={exports:{}},fp={exports:{}};(function(n,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=a;function a(s){return s&&typeof s.length=="number"&&s.length>=0&&s.length%1===0}n.exports=l.default})(fp,fp.exports);var kc={},kv={exports:{}},Vg={exports:{}};(function(n,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(a){return function(){for(var s=[],u=arguments.length;u--;)s[u]=arguments[u];var h=s.pop();return a.call(this,s,h)}},n.exports=l.default})(Vg,Vg.exports);var hp={};Object.defineProperty(hp,"__esModule",{value:!0}),hp.fallback=Ey,hp.wrap=Hg;var by=hp.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,v_=hp.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,Gg=hp.hasNextTick=typeof qp=="object"&&typeof qp.nextTick=="function";function Ey(n){setTimeout(n,0)}function Hg(n){return function(l){for(var a=[],s=arguments.length-1;s-- >0;)a[s]=arguments[s+1];return n(function(){return l.apply(void 0,a)})}}var pp;by?pp=queueMicrotask:v_?pp=setImmediate:Gg?pp=qp.nextTick:pp=Ey,hp.default=Hg(pp),function(n,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=w;var a=Vg.exports,s=m(a),u=hp,h=m(u),v=kc;function m(B){return B&&B.__esModule?B:{default:B}}function w(B){return(0,v.isAsync)(B)?function(){for(var G=[],j=arguments.length;j--;)G[j]=arguments[j];var lt=G.pop(),ct=B.apply(this,G);return A(ct,lt)}:(0,s.default)(function(G,j){var lt;try{lt=B.apply(this,G)}catch(ct){return j(ct)}if(lt&&typeof lt.then=="function")return A(lt,j);j(null,lt)})}function A(B,G){return B.then(function(j){R(G,null,j)},function(j){R(G,j&&j.message?j:new Error(j))})}function R(B,G,j){try{B(G,j)}catch(lt){(0,h.default)(function(ct){throw ct},lt)}}n.exports=l.default}(kv,kv.exports),Object.defineProperty(kc,"__esModule",{value:!0}),kc.isAsyncIterable=kc.isAsyncGenerator=kc.isAsync=void 0;var g_=kv.exports,m_=Ph(g_);function Ph(n){return n&&n.__esModule?n:{default:n}}function x0(n){return n[Symbol.toStringTag]==="AsyncFunction"}function b0(n){return n[Symbol.toStringTag]==="AsyncGenerator"}function Lv(n){return typeof n[Symbol.asyncIterator]=="function"}function wy(n){if(typeof n!="function")throw new Error("expected a function");return x0(n)?(0,m_.default)(n):n}kc.default=wy,kc.isAsync=x0,kc.isAsyncGenerator=b0,kc.isAsyncIterable=Lv;var Wd={exports:{}};(function(n,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=a;function a(s,u){if(u===void 0&&(u=s.length),!u)throw new Error("arity is undefined");function h(){for(var v=this,m=[],w=arguments.length;w--;)m[w]=arguments[w];return typeof m[u-1]=="function"?s.apply(this,m):new Promise(function(A,R){m[u-1]=function(B){for(var G=[],j=arguments.length-1;j-- >0;)G[j]=arguments[j+1];if(B)return R(B);A(G.length>1?G:G[0])},s.apply(v,m)})}return h}n.exports=l.default})(Wd,Wd.exports),function(n,l){Object.defineProperty(l,"__esModule",{value:!0});var a=fp.exports,s=w(a),u=kc,h=w(u),v=Wd.exports,m=w(v);function w(A){return A&&A.__esModule?A:{default:A}}l.default=(0,m.default)(function(A,R,B){var G=(0,s.default)(R)?[]:{};A(R,function(j,lt,ct){(0,h.default)(j)(function(_t){for(var Vt,ce=[],ae=arguments.length-1;ae-- >0;)ce[ae]=arguments[ae+1];ce.length<2&&(Vt=ce,ce=Vt[0]),G[lt]=ce,ct(_t)})},function(j){return B(j,G)})},3),n.exports=l.default}(zf,zf.exports);var Sy={exports:{}},Cy={exports:{}},y_={exports:{}},jg={exports:{}};(function(n,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=a;function a(s){function u(){for(var h=[],v=arguments.length;v--;)h[v]=arguments[v];if(s!==null){var m=s;s=null,m.apply(this,h)}}return Object.assign(u,s),u}n.exports=l.default})(jg,jg.exports);var __={exports:{}},x_={exports:{}};(function(n,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(a){return a[Symbol.iterator]&&a[Symbol.iterator]()},n.exports=l.default})(x_,x_.exports),function(n,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=R;var a=fp.exports,s=v(a),u=x_.exports,h=v(u);function v(B){return B&&B.__esModule?B:{default:B}}function m(B){var G=-1,j=B.length;return function(){return++G<j?{value:B[G],key:G}:null}}function w(B){var G=-1;return function(){var lt=B.next();return lt.done?null:(G++,{value:lt.value,key:G})}}function A(B){var G=B?Object.keys(B):[],j=-1,lt=G.length;return function ct(){var _t=G[++j];return _t==="__proto__"?ct():j<lt?{value:B[_t],key:_t}:null}}function R(B){if((0,s.default)(B))return m(B);var G=(0,h.default)(B);return G?w(G):A(B)}n.exports=l.default}(__,__.exports);var Wg={exports:{}};(function(n,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=a;function a(s){return function(){for(var u=[],h=arguments.length;h--;)u[h]=arguments[h];if(s===null)throw new Error("Callback was already called.");var v=s;s=null,v.apply(this,u)}}n.exports=l.default})(Wg,Wg.exports);var b_={exports:{}},Xg={exports:{}};(function(n,l){Object.defineProperty(l,"__esModule",{value:!0});var a={};l.default=a,n.exports=l.default})(Xg,Xg.exports),function(n,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=h;var a=Xg.exports,s=u(a);function u(v){return v&&v.__esModule?v:{default:v}}function h(v,m,w,A){var R=!1,B=!1,G=!1,j=0,lt=0;function ct(){j>=m||G||R||(G=!0,v.next().then(function(ce){var ae=ce.value,ze=ce.done;if(!(B||R)){if(G=!1,ze){R=!0,j<=0&&A(null);return}j++,w(ae,lt,_t),lt++,ct()}}).catch(Vt))}function _t(ce,ae){if(j-=1,!B){if(ce)return Vt(ce);if(ce===!1){R=!0,B=!0;return}if(ae===s.default||R&&j<=0)return R=!0,A(null);ct()}}function Vt(ce){B||(G=!1,R=!0,A(ce))}ct()}n.exports=l.default}(b_,b_.exports),function(n,l){Object.defineProperty(l,"__esModule",{value:!0});var a=jg.exports,s=j(a),u=__.exports,h=j(u),v=Wg.exports,m=j(v),w=kc,A=b_.exports,R=j(A),B=Xg.exports,G=j(B);function j(lt){return lt&<.__esModule?lt:{default:lt}}l.default=function(lt){return function(ct,_t,Vt){if(Vt=(0,s.default)(Vt),lt<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!ct)return Vt(null);if((0,w.isAsyncGenerator)(ct))return(0,R.default)(ct,lt,_t,Vt);if((0,w.isAsyncIterable)(ct))return(0,R.default)(ct[Symbol.asyncIterator](),lt,_t,Vt);var ce=(0,h.default)(ct),ae=!1,ze=!1,$e=0,xr=!1;function Or(Wr,wn){if(!ze)if($e-=1,Wr)ae=!0,Vt(Wr);else if(Wr===!1)ae=!0,ze=!0;else{if(wn===G.default||ae&&$e<=0)return ae=!0,Vt(null);xr||Zr()}}function Zr(){for(xr=!0;$e<lt&&!ae;){var Wr=ce();if(Wr===null){ae=!0,$e<=0&&Vt(null);return}$e+=1,_t(Wr.value,Wr.key,(0,m.default)(Or))}xr=!1}Zr()}},n.exports=l.default}(y_,y_.exports),function(n,l){Object.defineProperty(l,"__esModule",{value:!0});var a=y_.exports,s=w(a),u=kc,h=w(u),v=Wd.exports,m=w(v);function w(R){return R&&R.__esModule?R:{default:R}}function A(R,B,G,j){return(0,s.default)(B)(R,(0,h.default)(G),j)}l.default=(0,m.default)(A,4),n.exports=l.default}(Cy,Cy.exports),function(n,l){Object.defineProperty(l,"__esModule",{value:!0});var a=Cy.exports,s=v(a),u=Wd.exports,h=v(u);function v(w){return w&&w.__esModule?w:{default:w}}function m(w,A,R){return(0,s.default)(w,1,A,R)}l.default=(0,h.default)(m,3),n.exports=l.default}(Sy,Sy.exports),function(n,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=m;var a=zf.exports,s=v(a),u=Sy.exports,h=v(u);function v(w){return w&&w.__esModule?w:{default:w}}function m(w,A){return(0,s.default)(h.default,w,A)}n.exports=l.default}(_l,_l.exports);var Ay=ng(_l.exports),Kp=function(){function n(){this.args=[],this.tasks=[]}return n.prototype.call=function(){for(var l=arguments,a=[],s=0;s<arguments.length;s++)a[s]=l[s];return this.args=a,Ay(this.tasks)},n.prototype.tap=function(l,a){var s=this;this.tasks.push(function(u){a.apply(void 0,_0([],jd(s.args),!1)),u(null,l)})},n}(),E_={exports:{}},Ty={exports:{}};(function(n,l){Object.defineProperty(l,"__esModule",{value:!0});var a=fp.exports,s=_t(a),u=Xg.exports,h=_t(u),v=Cy.exports,m=_t(v),w=jg.exports,A=_t(w),R=Wg.exports,B=_t(R),G=kc,j=_t(G),lt=Wd.exports,ct=_t(lt);function _t(ze){return ze&&ze.__esModule?ze:{default:ze}}function Vt(ze,$e,xr){xr=(0,A.default)(xr);var Or=0,Zr=0,Wr=ze.length,wn=!1;Wr===0&&xr(null);function vn(Kn,Ei){Kn===!1&&(wn=!0),wn!==!0&&(Kn?xr(Kn):(++Zr===Wr||Ei===h.default)&&xr(null))}for(;Or<Wr;Or++)$e(ze[Or],Or,(0,B.default)(vn))}function ce(ze,$e,xr){return(0,m.default)(ze,1/0,$e,xr)}function ae(ze,$e,xr){var Or=(0,s.default)(ze)?Vt:ce;return Or(ze,(0,j.default)($e),xr)}l.default=(0,ct.default)(ae,3),n.exports=l.default})(Ty,Ty.exports),function(n,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=m;var a=Ty.exports,s=v(a),u=zf.exports,h=v(u);function v(w){return w&&w.__esModule?w:{default:w}}function m(w,A){return(0,h.default)(s.default,w,A)}n.exports=l.default}(E_,E_.exports);var _2=ng(E_.exports),OT=function(){function n(){this.tasks=[]}return n.prototype.promise=function(){return _2(this.tasks)},n.prototype.tapPromise=function(l,a){var s=this;this.tasks.push(function(u){return y0(s,void 0,void 0,function(){return rg(this,function(h){switch(h.label){case 0:return[4,a()];case 1:return h.sent(),u(null,l),[2]}})})})},n}(),w_={exports:{}};(function(n,l){Object.defineProperty(l,"__esModule",{value:!0});var a=jg.exports,s=R(a),u=Wg.exports,h=R(u),v=kc,m=R(v),w=Wd.exports,A=R(w);function R(G){return G&&G.__esModule?G:{default:G}}function B(G,j){if(j=(0,s.default)(j),!Array.isArray(G))return j(new Error("First argument to waterfall must be an array of functions"));if(!G.length)return j();var lt=0;function ct(Vt){var ce=(0,m.default)(G[lt++]);ce.apply(void 0,Vt.concat([(0,h.default)(_t)]))}function _t(Vt){for(var ce=[],ae=arguments.length-1;ae-- >0;)ce[ae]=arguments[ae+1];if(Vt!==!1){if(Vt||lt===G.length)return j.apply(void 0,[Vt].concat(ce));ct(ce)}}ct([])}l.default=(0,A.default)(B),n.exports=l.default})(w_,w_.exports);var x2=ng(w_.exports),fO=function(){function n(){this.tasks=[]}return n.prototype.call=function(){return x2(this.tasks)},n.prototype.tap=function(l,a){this.tasks.length===0?this.tasks.push(function(s){var u=a();s(u?null:!1,u)}):this.tasks.push(function(s,u){var h=a.apply(void 0,_0([],jd(s),!1));u(h?null:!1,l)})},n}(),My=function(){function n(){this.tasks=[]}return n.prototype.call=function(){return Ay(this.tasks)},n.prototype.tap=function(l,a){this.tasks.push(function(s){var u=a();s(u,l)})},n}(),us=function(){function n(){this.args=[],this.tasks=[]}return n.prototype.promise=function(){for(var l=arguments,a=[],s=0;s<arguments.length;s++)a[s]=l[s];return this.args=a,Ay(this.tasks)},n.prototype.tapPromise=function(l,a){var s=this;this.tasks.push(function(u){return y0(s,void 0,void 0,function(){return rg(this,function(h){switch(h.label){case 0:return[4,a.apply(void 0,_0([],jd(this.args),!1))];case 1:return h.sent(),u(null,l),[2]}})})})},n}(),hO=function(){function n(){this.args=[],this.tasks=[]}return n.prototype.promise=function(){for(var l=arguments,a=[],s=0;s<arguments.length;s++)a[s]=l[s];return this.args=a,Ay(this.tasks)},n.prototype.tapPromise=function(l,a){var s=this;this.tasks.push(function(u){return y0(s,void 0,void 0,function(){var h;return rg(this,function(v){switch(v.label){case 0:return[4,a.apply(void 0,_0([],jd(this.args),!1))];case 1:return h=v.sent(),u(h,l),[2]}})})})},n}(),Oh=function(){function n(){this.tasks=[]}return n.prototype.promise=function(){return x2(this.tasks)},n.prototype.tapPromise=function(l,a){this.tasks.length===0?this.tasks.push(function(s){a().then(function(u){s(null,u)})}):this.tasks.push(function(s,u){a(s).then(function(h){u(null,h)})})},n}(),S_=nt(73827),b2=nt.n(S_),E2,w2,ig,ag,C_,A_,S2,Iy,C2,sh,A2,T2,M2,I2,k2,L2,P2,Lc,O2,F2,Yg,T_,R2,D2,B2,N2,z2,U2,Z2,V2,G2,H2,j2;function pO(n){var l=FT();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function FT(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var RT=(E2=(0,At.b2)(),w2=(0,At.f3)(Dt.SceneID),ig=(0,At.f3)(Dt.IIconService),ag=(0,At.f3)(Dt.IFontService),C_=(0,At.f3)(Dt.IControlService),A_=(0,At.f3)(Dt.IGlobalConfigService),S2=(0,At.f3)(Dt.IMapService),Iy=(0,At.f3)(Dt.ICoordinateSystemService),C2=(0,At.f3)(Dt.IRendererService),sh=(0,At.f3)(Dt.ILayerService),A2=(0,At.f3)(Dt.ICameraService),T2=(0,At.f3)(Dt.IInteractionService),M2=(0,At.f3)(Dt.IPickingService),I2=(0,At.f3)(Dt.IShaderModuleService),k2=(0,At.f3)(Dt.IMarkerService),L2=(0,At.f3)(Dt.IPopupService),E2(P2=(Lc=function(n){(0,zt.Z)(a,n);var l=pO(a);function a(){var s;return(0,pt.Z)(this,a),s=l.call(this),(0,W.Z)((0,ut.Z)(s),"destroyed",!1),(0,W.Z)((0,ut.Z)(s),"loaded",!1),Rn((0,ut.Z)(s),"id",O2,(0,ut.Z)(s)),Rn((0,ut.Z)(s),"iconService",F2,(0,ut.Z)(s)),Rn((0,ut.Z)(s),"fontService",Yg,(0,ut.Z)(s)),Rn((0,ut.Z)(s),"controlService",T_,(0,ut.Z)(s)),Rn((0,ut.Z)(s),"configService",R2,(0,ut.Z)(s)),Rn((0,ut.Z)(s),"map",D2,(0,ut.Z)(s)),Rn((0,ut.Z)(s),"coordinateSystemService",B2,(0,ut.Z)(s)),Rn((0,ut.Z)(s),"rendererService",N2,(0,ut.Z)(s)),Rn((0,ut.Z)(s),"layerService",z2,(0,ut.Z)(s)),Rn((0,ut.Z)(s),"cameraService",U2,(0,ut.Z)(s)),Rn((0,ut.Z)(s),"interactionService",Z2,(0,ut.Z)(s)),Rn((0,ut.Z)(s),"pickingService",V2,(0,ut.Z)(s)),Rn((0,ut.Z)(s),"shaderModuleService",G2,(0,ut.Z)(s)),Rn((0,ut.Z)(s),"markerService",H2,(0,ut.Z)(s)),Rn((0,ut.Z)(s),"popupService",j2,(0,ut.Z)(s)),(0,W.Z)((0,ut.Z)(s),"inited",!1),(0,W.Z)((0,ut.Z)(s),"initPromise",void 0),(0,W.Z)((0,ut.Z)(s),"rendering",!1),(0,W.Z)((0,ut.Z)(s),"$container",void 0),(0,W.Z)((0,ut.Z)(s),"canvas",void 0),(0,W.Z)((0,ut.Z)(s),"markerContainer",void 0),(0,W.Z)((0,ut.Z)(s),"hooks",void 0),(0,W.Z)((0,ut.Z)(s),"handleWindowResized",function(){s.emit("resize"),s.$container&&(s.initContainer(),gc(),s.coordinateSystemService.needRefresh=!0,s.render())}),(0,W.Z)((0,ut.Z)(s),"handleMapCameraChanged",function(u){s.cameraService.update(u),s.render()}),s.hooks={init:new us},s}return(0,et.Z)(a,[{key:"init",value:function(u){var h=this;this.configService.setSceneConfig(this.id,u),this.shaderModuleService.registerBuiltinModules(),this.iconService.init(),this.iconService.on("imageUpdate",function(){return h.render()}),this.fontService.init(),this.hooks.init.tapPromise("initMap",(0,J.Z)(ot().mark(function v(){return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,new Promise(function(A){h.map.onCameraChanged(function(R){h.cameraService.init(),h.cameraService.update(R),A()}),h.map.init()});case 2:h.map.onCameraChanged(h.handleMapCameraChanged),h.map.addMarkerContainer(),h.markerService.addMarkers(),h.markerService.addMarkerLayers(),h.popupService.initPopup(),h.interactionService.init(),h.interactionService.on(hs.Drag,h.addSceneEvent.bind(h));case 9:case"end":return w.stop()}},v)}))),this.hooks.init.tapPromise("initRenderer",(0,J.Z)(ot().mark(function v(){var m,w;return ot().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(m=h.map.getOverlayContainer(),m?h.$container=m:h.$container=Sv(h.configService.getSceneConfig(h.id).id||""),!h.$container){R.next=12;break}return h.canvas=so("canvas","",h.$container),h.setCanvas(),R.next=7,h.rendererService.init(h.canvas,h.configService.getSceneConfig(h.id),u.gl);case 7:h.initContainer(),b2()(h.$container,h.handleWindowResized),ja.matchMedia&&((w=ja.matchMedia("screen and (-webkit-min-device-pixel-ratio: 1.5)"))===null||w===void 0||w.addListener(h.handleWindowResized)),R.next=13;break;case 12:console.error("\u5BB9\u5668 id \u4E0D\u5B58\u5728");case 13:h.pickingService.init(h.id);case 14:case"end":return R.stop()}},v)}))),this.render()}},{key:"initMiniScene",value:function(u){var h=this;this.configService.setSceneConfig(this.id,u),this.shaderModuleService.registerBuiltinModules(),this.iconService.init(),this.iconService.on("imageUpdate",function(){return h.render()}),this.fontService.init(),this.hooks.init.tapPromise("initMap",(0,J.Z)(ot().mark(function v(){return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,new Promise(function(A){h.map.onCameraChanged(function(R){h.cameraService.init(),h.cameraService.update(R),h.map.version!=="GAODE2.x"&&A()}),h.map.initMiniMap()});case 2:h.map.onCameraChanged(h.handleMapCameraChanged),h.interactionService.init(),h.interactionService.on(hs.Drag,h.addSceneEvent.bind(h));case 5:case"end":return w.stop()}},v)}))),this.hooks.init.tapPromise("initRenderer",(0,J.Z)(ot().mark(function v(){var m;return ot().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(m=u.canvas,h.$container=m||null,!h.$container){A.next=7;break}return A.next=5,h.rendererService.init(u.canvas,h.configService.getSceneConfig(h.id),void 0);case 5:A.next=8;break;case 7:console.error("\u5BB9\u5668 id \u4E0D\u5B58\u5728");case 8:h.pickingService.init(h.id);case 9:case"end":return A.stop()}},v)}))),this.initPromise=this.hooks.init.promise(),this.render()}},{key:"addLayer",value:function(u){this.layerService.sceneService=this,this.layerService.add(u)}},{key:"addMask",value:function(u){this.layerService.sceneService=this,this.layerService.addMask(u)}},{key:"render",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(!(this.rendering||this.destroyed)){m.next=2;break}return m.abrupt("return");case 2:if(this.rendering=!0,this.inited){m.next=16;break}return m.next=6,this.hooks.init.promise();case 6:return this.destroyed&&this.destroy(),m.next=9,this.layerService.initLayers();case 9:this.layerService.renderLayers(),this.controlService.addControls(),this.loaded=!0,this.emit("loaded"),this.inited=!0,m.next=20;break;case 16:return m.next=18,this.layerService.initLayers();case 18:return m.next=20,this.layerService.renderLayers();case 20:this.rendering=!1;case 21:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"addFontFace",value:function(u,h){this.fontService.addFontFace(u,h)}},{key:"getSceneContainer",value:function(){return this.$container}},{key:"exportPng",value:function(){var s=(0,J.Z)(ot().mark(function h(v){var m,w,A;return ot().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return w=(m=this.$container)===null||m===void 0?void 0:m.getElementsByTagName("canvas")[0],B.next=3,this.render();case 3:return A=v==="jpg"?w==null?void 0:w.toDataURL("image/jpeg"):w==null?void 0:w.toDataURL("image/png"),B.abrupt("return",A);case 5:case"end":return B.stop()}},h,this)}));function u(h){return s.apply(this,arguments)}return u}()},{key:"getSceneConfig",value:function(){return this.configService.getSceneConfig(this.id)}},{key:"getPointSizeRange",value:function(){return this.rendererService.getPointSizeRange()}},{key:"addMarkerContainer",value:function(){var u=this.$container.parentElement;u!==null&&(this.markerContainer=so("div","l7-marker-container",u))}},{key:"getMarkerContainer",value:function(){return this.markerContainer}},{key:"destroy",value:function(){var u=this,h,v;if(!this.inited){this.destroyed=!0;return}if((0,S_.unbind)(this.$container,this.handleWindowResized),ja.matchMedia){var m;(m=ja.matchMedia("screen and (min-resolution: 2dppx)"))===null||m===void 0||m.removeListener(this.handleWindowResized)}this.pickingService.destroy(),this.layerService.destroy(),this.interactionService.destroy(),this.controlService.destroy(),this.markerService.destroy(),this.fontService.destroy(),this.iconService.destroy(),this.removeAllListeners(),this.inited=!1,this.map.destroy(),setTimeout(function(){var w;(w=u.$container)===null||w===void 0||w.removeChild(u.canvas),u.canvas=null,u.rendererService.destroy()}),(h=this.$container)===null||h===void 0||(v=h.parentNode)===null||v===void 0||v.removeChild(this.$container),this.emit("destroy")}},{key:"initContainer",value:function(){var u,h,v=Qi,m=((u=this.$container)===null||u===void 0?void 0:u.clientWidth)||400,w=((h=this.$container)===null||h===void 0?void 0:h.clientHeight)||300,A=this.canvas;A&&(A.width=m*v,A.height=w*v),this.rendererService.viewport({x:0,y:0,width:v*m,height:v*w})}},{key:"setCanvas",value:function(){var u,h,v=Qi,m=((u=this.$container)===null||u===void 0?void 0:u.clientWidth)||400,w=((h=this.$container)===null||h===void 0?void 0:h.clientHeight)||300,A=this.canvas;A.width=m*v,A.height=w*v,A.style.width="100%",A.style.height="100%"}},{key:"addSceneEvent",value:function(u){this.emit(u.type,u)}}]),a}(be.EventEmitter),O2=Ri(Lc.prototype,"id",[w2],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),F2=Ri(Lc.prototype,"iconService",[ig],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Yg=Ri(Lc.prototype,"fontService",[ag],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),T_=Ri(Lc.prototype,"controlService",[C_],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),R2=Ri(Lc.prototype,"configService",[A_],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),D2=Ri(Lc.prototype,"map",[S2],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),B2=Ri(Lc.prototype,"coordinateSystemService",[Iy],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),N2=Ri(Lc.prototype,"rendererService",[C2],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),z2=Ri(Lc.prototype,"layerService",[sh],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),U2=Ri(Lc.prototype,"cameraService",[A2],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Z2=Ri(Lc.prototype,"interactionService",[T2],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),V2=Ri(Lc.prototype,"pickingService",[M2],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),G2=Ri(Lc.prototype,"shaderModuleService",[I2],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),H2=Ri(Lc.prototype,"markerService",[k2],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),j2=Ri(Lc.prototype,"popupService",[L2],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Lc))||P2);function DT(n){var l=0;switch(n){case"vec2":case"ivec2":l=2;break;case"vec3":case"ivec3":l=3;break;case"vec4":case"ivec4":case"mat2":l=4;break;case"mat3":l=9;break;case"mat4":l=16;break;default:}return l}var W2=/uniform\s+(bool|float|int|vec2|vec3|vec4|ivec2|ivec3|ivec4|mat2|mat3|mat4|sampler2D|samplerCube)\s+([\s\S]*?);/g;function X2(n){var l={};return n=n.replace(W2,function(a,s,u){var h=u.split(":"),v=h[0].trim(),m="";switch(h.length>1&&(m=h[1].trim()),s){case"bool":m=m==="true";break;case"float":case"int":m=Number(m);break;case"vec2":case"vec3":case"vec4":case"ivec2":case"ivec3":case"ivec4":case"mat2":case"mat3":case"mat4":m?m=m.replace("[","").replace("]","").split(",").reduce(function(w,A){return w.push(Number(A.trim())),w},[]):m=new Array(DT(s)).fill(0);break;default:}return l[v]=m,"uniform ".concat(s," ").concat(v,`;
|
|
`)}),{content:n,uniforms:l}}var Y2,$2,q2="#define PI 3.14159265359",BT=`#define SHIFT_RIGHT17 1.0 / 131072.0
|
|
#define SHIFT_RIGHT18 1.0 / 262144.0
|
|
#define SHIFT_RIGHT19 1.0 / 524288.0
|
|
#define SHIFT_RIGHT20 1.0 / 1048576.0
|
|
#define SHIFT_RIGHT21 1.0 / 2097152.0
|
|
#define SHIFT_RIGHT22 1.0 / 4194304.0
|
|
#define SHIFT_RIGHT23 1.0 / 8388608.0
|
|
#define SHIFT_RIGHT24 1.0 / 16777216.0
|
|
|
|
#define SHIFT_LEFT17 131072.0
|
|
#define SHIFT_LEFT18 262144.0
|
|
#define SHIFT_LEFT19 524288.0
|
|
#define SHIFT_LEFT20 1048576.0
|
|
#define SHIFT_LEFT21 2097152.0
|
|
#define SHIFT_LEFT22 4194304.0
|
|
#define SHIFT_LEFT23 8388608.0
|
|
#define SHIFT_LEFT24 16777216.0
|
|
|
|
vec2 unpack_float(float packedValue) {
|
|
int packedIntValue = int(packedValue);
|
|
int v0 = packedIntValue / 256;
|
|
return vec2(v0, packedIntValue - v0 * 256);
|
|
}
|
|
|
|
vec4 decode_color(vec2 encodedColor) {
|
|
return vec4(
|
|
unpack_float(encodedColor[0]) / 255.0,
|
|
unpack_float(encodedColor[1]) / 255.0
|
|
);
|
|
}
|
|
`,NT=`#define ambientRatio 0.5
|
|
#define diffuseRatio 0.3
|
|
#define specularRatio 0.2
|
|
|
|
|
|
float calc_lighting(vec4 pos) {
|
|
|
|
vec3 worldPos = vec3(pos * u_ModelMatrix);
|
|
|
|
vec3 worldNormal = a_Normal;
|
|
// //cal light weight
|
|
vec3 viewDir = normalize(u_CameraPosition - worldPos);
|
|
|
|
vec3 lightDir = normalize(vec3(1, -10.5, 12));
|
|
|
|
vec3 halfDir = normalize(viewDir+lightDir);
|
|
// //lambert
|
|
float lambert = dot(worldNormal, lightDir);
|
|
//specular
|
|
float specular = pow(max(0.0, dot(worldNormal, halfDir)), 32.0);
|
|
//sum to light weight
|
|
float lightWeight = ambientRatio + diffuseRatio * lambert + specularRatio * specular;
|
|
|
|
return lightWeight;
|
|
}
|
|
`,zT=`// Blinn-Phong model
|
|
// apply lighting in vertex shader instead of fragment shader
|
|
// @see https://learnopengl.com/Advanced-Lighting/Advanced-Lighting
|
|
uniform float u_Ambient : 1.0;
|
|
uniform float u_Diffuse : 1.0;
|
|
uniform float u_Specular : 1.0;
|
|
uniform int u_NumOfDirectionalLights : 1;
|
|
uniform int u_NumOfSpotLights : 0;
|
|
|
|
#define SHININESS 32.0
|
|
#define MAX_NUM_OF_DIRECTIONAL_LIGHTS 3
|
|
#define MAX_NUM_OF_SPOT_LIGHTS 3
|
|
|
|
struct DirectionalLight {
|
|
vec3 direction;
|
|
vec3 ambient;
|
|
vec3 diffuse;
|
|
vec3 specular;
|
|
};
|
|
|
|
struct SpotLight {
|
|
vec3 position;
|
|
vec3 direction;
|
|
vec3 ambient;
|
|
vec3 diffuse;
|
|
vec3 specular;
|
|
float constant;
|
|
float linear;
|
|
float quadratic;
|
|
float angle;
|
|
float blur;
|
|
float exponent;
|
|
};
|
|
|
|
uniform DirectionalLight u_DirectionalLights[MAX_NUM_OF_DIRECTIONAL_LIGHTS];
|
|
uniform SpotLight u_SpotLights[MAX_NUM_OF_SPOT_LIGHTS];
|
|
|
|
vec3 calc_directional_light(DirectionalLight light, vec3 normal, vec3 viewDir) {
|
|
vec3 lightDir = normalize(light.direction);
|
|
// diffuse shading
|
|
float diff = max(dot(normal, lightDir), 0.0);
|
|
// Blinn-Phong specular shading
|
|
vec3 halfwayDir = normalize(lightDir + viewDir);
|
|
float spec = pow(max(dot(normal, halfwayDir), 0.0), SHININESS);
|
|
|
|
vec3 ambient = light.ambient * u_Ambient;
|
|
vec3 diffuse = light.diffuse * diff * u_Diffuse;
|
|
vec3 specular = light.specular * spec * u_Specular;
|
|
|
|
return ambient + diffuse + specular;
|
|
}
|
|
|
|
// vec3 calc_spot_light(SpotLight light, vec3 normal, vec3 fragPos, vec3 viewDir) {
|
|
// vec3 lightDir = normalize(light.position - fragPos);
|
|
// // diffuse shading
|
|
// float diff = max(dot(normal, lightDir), 0.0);
|
|
// // specular shading
|
|
// vec3 reflectDir = reflect(-lightDir, normal);
|
|
// float spec = pow(max(dot(viewDir, reflectDir), 0.0), SHININESS);
|
|
// // attenuation
|
|
// float distance = length(light.position - fragPos);
|
|
// float attenuation = 1.0 / (light.constant + light.linear * distance +
|
|
// light.quadratic * (distance * distance));
|
|
|
|
// vec3 ambient = light.ambient * u_Ambient;
|
|
// vec3 diffuse = light.diffuse * diff * u_Diffuse;
|
|
// vec3 specular = light.specular * spec * u_Specular;
|
|
|
|
// float spotEffect = dot(normalize(light.direction), -lightDir);
|
|
// float spotCosCutoff = cos(light.angle / 180.0 * PI);
|
|
// float spotCosOuterCutoff = cos((light.angle + light.blur) / 180.0 * PI);
|
|
// float spotCosInnerCutoff = cos((light.angle - light.blur) / 180.0 * PI);
|
|
// if (spotEffect > spotCosCutoff) {
|
|
// spotEffect = pow(smoothstep(spotCosOuterCutoff, spotCosInnerCutoff, spotEffect), light.exponent);
|
|
// } else {
|
|
// spotEffect = 0.0;
|
|
// }
|
|
|
|
// return ambient + attenuation * (spotEffect * diffuse + specular);
|
|
// }
|
|
|
|
vec3 calc_lighting(vec3 position, vec3 normal, vec3 viewDir) {
|
|
vec3 weight = vec3(0.0);
|
|
for (int i = 0; i < MAX_NUM_OF_DIRECTIONAL_LIGHTS; i++) {
|
|
if (i >= u_NumOfDirectionalLights) {
|
|
break;
|
|
}
|
|
weight += calc_directional_light(u_DirectionalLights[i], normal, viewDir);
|
|
}
|
|
// for (int i = 0; i < MAX_NUM_OF_SPOT_LIGHTS; i++) {
|
|
// if (i >= u_NumOfSpotLights) {
|
|
// break;
|
|
// }
|
|
// weight += calc_spot_light(u_SpotLights[i], normal, position, viewDir);
|
|
// }
|
|
return weight;
|
|
}
|
|
`,UT=`varying vec4 v_PickingResult;
|
|
uniform vec4 u_HighlightColor : [0, 0, 0, 0];
|
|
uniform vec4 u_SelectColor : [0, 0, 0, 0];
|
|
uniform float u_PickingStage : 0.0;
|
|
uniform float u_shaderPick;
|
|
|
|
uniform float u_activeMix: 0;
|
|
|
|
#define PICKING_NONE 0.0
|
|
#define PICKING_ENCODE 1.0
|
|
#define PICKING_HIGHLIGHT 2.0
|
|
#define COLOR_SCALE 1. / 255.
|
|
|
|
#define HIGHLIGHT 1.0
|
|
#define SELECT 2.0
|
|
|
|
/*
|
|
* Returns highlight color if this item is selected.
|
|
*/
|
|
vec4 filterHighlightColor(vec4 color, float weight) {
|
|
// float selected = v_PickingResult.a;
|
|
bool selected = bool(v_PickingResult.a);
|
|
|
|
// if (selected == SELECT) {
|
|
if (selected) {
|
|
// // \u70B9\u51FB\u9009\u4E2D\u72B6\u6001
|
|
// vec4 selectColor = u_SelectColor * COLOR_SCALE;
|
|
// return selectColor;
|
|
// } else if (selected == HIGHLIGHT) {
|
|
// // hover \u9AD8\u4EAE\u72B6\u6001
|
|
vec4 highLightColor = u_HighlightColor * COLOR_SCALE;
|
|
|
|
float highLightAlpha = highLightColor.a;
|
|
float highLightRatio = highLightAlpha / (highLightAlpha + color.a * (1.0 - highLightAlpha));
|
|
|
|
vec3 resultRGB = mix(color.rgb, highLightColor.rgb, highLightRatio);
|
|
return vec4(mix(resultRGB * weight, color.rgb, u_activeMix), color.a);
|
|
} else {
|
|
return color;
|
|
}
|
|
}
|
|
|
|
/*
|
|
* Returns picking color if picking enabled else unmodified argument.
|
|
*/
|
|
vec4 filterPickingColor(vec4 color) {
|
|
vec3 pickingColor = v_PickingResult.rgb;
|
|
if (u_PickingStage == PICKING_ENCODE && length(pickingColor) < 0.001) {
|
|
discard;
|
|
}
|
|
return u_PickingStage == PICKING_ENCODE ? vec4(pickingColor, step(0.001,color.a)): color;
|
|
}
|
|
|
|
/*
|
|
* Returns picking color if picking is enabled if not
|
|
* highlight color if this item is selected, otherwise unmodified argument.
|
|
*/
|
|
vec4 filterColor(vec4 color) {
|
|
// \u8FC7\u6EE4\u591A\u4F59\u7684 shader \u8BA1\u7B97
|
|
// return color;
|
|
if(u_shaderPick < 0.5) {
|
|
return color; // \u6682\u65F6\u53BB\u9664 \u76F4\u63A5\u53D6\u6D88\u8BA1\u7B97\u5728\u9009\u4E2D\u65F6\u62D6\u62FD\u5730\u56FE\u4F1A\u6709\u95EE\u9898
|
|
} else {
|
|
return filterPickingColor(filterHighlightColor(color, 1.0));
|
|
}
|
|
|
|
}
|
|
|
|
vec4 filterColorAlpha(vec4 color, float alpha) {
|
|
// \u8FC7\u6EE4\u591A\u4F59\u7684 shader \u8BA1\u7B97
|
|
// return color;
|
|
if(u_shaderPick < 0.5) {
|
|
return color; // \u6682\u65F6\u53BB\u9664 \u76F4\u63A5\u53D6\u6D88\u8BA1\u7B97\u5728\u9009\u4E2D\u65F6\u62D6\u62FD\u5730\u56FE\u4F1A\u6709\u95EE\u9898
|
|
} else {
|
|
return filterPickingColor(filterHighlightColor(color, alpha));
|
|
}
|
|
}
|
|
|
|
`,K2=`attribute vec3 a_PickingColor;
|
|
varying vec4 v_PickingResult;
|
|
|
|
uniform vec3 u_PickingColor : [0, 0, 0];
|
|
uniform vec3 u_CurrentSelectedId : [0, 0, 0];
|
|
uniform vec4 u_HighlightColor : [0, 0, 0, 0];
|
|
uniform vec4 u_SelectColor : [0, 0, 0, 0];
|
|
uniform float u_PickingStage : 0.0;
|
|
uniform float u_PickingThreshold : 1.0;
|
|
uniform float u_PickingBuffer: 0.0;
|
|
uniform float u_shaderPick;
|
|
uniform float u_EnableSelect: 0.0;
|
|
|
|
#define PICKING_NONE 0.0
|
|
#define PICKING_ENCODE 1.0
|
|
#define PICKING_HIGHLIGHT 2.0
|
|
#define COLOR_SCALE 1. / 255.
|
|
|
|
#define NORMAL 0.0
|
|
#define HIGHLIGHT 1.0
|
|
#define SELECT 2.0
|
|
|
|
bool isVertexPicked(vec3 vertexColor) {
|
|
return
|
|
abs(vertexColor.r - u_PickingColor.r) < u_PickingThreshold &&
|
|
abs(vertexColor.g - u_PickingColor.g) < u_PickingThreshold &&
|
|
abs(vertexColor.b - u_PickingColor.b) < u_PickingThreshold;
|
|
}
|
|
|
|
// \u5224\u65AD\u5F53\u524D\u70B9\u662F\u5426\u5DF2\u7ECF\u88AB select \u9009\u4E2D
|
|
bool isVertexSelected(vec3 vertexColor) {
|
|
return
|
|
abs(vertexColor.r - u_CurrentSelectedId.r) < u_PickingThreshold &&
|
|
abs(vertexColor.g - u_CurrentSelectedId.g) < u_PickingThreshold &&
|
|
abs(vertexColor.b - u_CurrentSelectedId.b) < u_PickingThreshold;
|
|
}
|
|
|
|
void setPickingColor(vec3 pickingColor) {
|
|
if(u_shaderPick < 0.5) {
|
|
return;
|
|
}
|
|
// compares only in highlight stage
|
|
|
|
v_PickingResult.a = float((u_PickingStage == PICKING_HIGHLIGHT) && isVertexPicked(pickingColor));
|
|
|
|
// if (u_EnableSelect == 1.0 && u_PickingStage == PICKING_HIGHLIGHT && isVertexSelected(pickingColor)) {
|
|
// // \u9009\u4E2D\u6001
|
|
// v_PickingResult.a = SELECT;
|
|
// } else if (u_PickingStage == PICKING_HIGHLIGHT && isVertexPicked(pickingColor)) {
|
|
// // \u9AD8\u4EAE\u6001
|
|
// v_PickingResult.a = HIGHLIGHT;
|
|
// } else {
|
|
// v_PickingResult.a = NORMAL;
|
|
// }
|
|
|
|
// Stores the picking color so that the fragment shader can render it during picking
|
|
v_PickingResult.rgb = pickingColor * COLOR_SCALE;
|
|
}
|
|
|
|
float setPickingSize(float x) {
|
|
return u_PickingStage == PICKING_ENCODE ? x + u_PickingBuffer : x;
|
|
}
|
|
|
|
float setPickingOrder(float z) {
|
|
bool selected = bool(v_PickingResult.a);
|
|
return selected ? z + 1. : 0.;
|
|
}
|
|
`,ZT=`
|
|
#define E 2.718281828459045
|
|
vec2 ProjectFlat(vec2 lnglat){
|
|
float maxs=85.0511287798;
|
|
float lat=max(min(maxs,lnglat.y),-maxs);
|
|
float scale= 268435456.;
|
|
float d=PI/180.;
|
|
float x=lnglat.x*d;
|
|
float y=lat*d;
|
|
y=log(tan((PI/4.)+(y/2.)));
|
|
|
|
float a=.5/PI,
|
|
b=.5,
|
|
c=-.5/PI;
|
|
d=.5;
|
|
x=scale*(a*x+b);
|
|
y=scale*(c*y+d);
|
|
return vec2(x,y);
|
|
}
|
|
|
|
vec2 unProjectFlat(vec2 px){
|
|
float a=.5/PI;
|
|
float b=.5;
|
|
float c=-.5/PI;
|
|
float d=.5;
|
|
float scale = 268435456.;
|
|
float x=(px.x/scale-b)/a;
|
|
float y=(px.y/scale-d)/c;
|
|
y=(atan(pow(E,y))-(PI/4.))*2.;
|
|
d=PI/180.;
|
|
float lat=y/d;
|
|
float lng=x/d;
|
|
return vec2(lng,lat);
|
|
}
|
|
|
|
float pixelDistance(vec2 from, vec2 to) {
|
|
vec2 a1 = ProjectFlat(from);
|
|
vec2 b1 = ProjectFlat(to);
|
|
return distance(a1, b1);
|
|
}
|
|
|
|
// gaode2.0
|
|
vec2 customProject(vec2 lnglat) { // \u7ECF\u7EAC\u5EA6 => \u5E73\u9762\u5750\u6807
|
|
float t = lnglat.x;
|
|
float e = lnglat.y;
|
|
float Sm = 180.0 / PI;
|
|
float Tm = 6378137.0;
|
|
float Rm = PI / 180.0;
|
|
float r = 85.0511287798;
|
|
e = max(min(r, e), -r);
|
|
t *= Rm;
|
|
e *= Rm;
|
|
e = log(tan(PI / 4.0 + e / 2.0));
|
|
return vec2(t * Tm, e * Tm);
|
|
}
|
|
|
|
vec2 unProjCustomCoord(vec2 point) { // \u5E73\u9762\u5750\u6807 => \u7ECF\u7EAC\u5EA6
|
|
float Sm = 57.29577951308232; //180 / Math.PI
|
|
float Tm = 6378137.0;
|
|
float t = point.x;
|
|
float e = point.y;
|
|
return vec2(t / Tm * Sm, (2.0 * atan(exp(e / Tm)) - PI / 2.0) * Sm);
|
|
}
|
|
|
|
|
|
float customPixelDistance(vec2 from, vec2 to) {
|
|
vec2 a1 = ProjectFlat(from);
|
|
vec2 b1 = ProjectFlat(to);
|
|
return distance(a1, b1);
|
|
}`,VT=`#define TILE_SIZE 512.0
|
|
#define PI 3.1415926536
|
|
#define WORLD_SCALE TILE_SIZE / (PI * 2.0)
|
|
|
|
#define COORDINATE_SYSTEM_LNGLAT 1.0 // mapbox
|
|
#define COORDINATE_SYSTEM_LNGLAT_OFFSET 2.0 // mapbox offset
|
|
#define COORDINATE_SYSTEM_VECTOR_TILE 3.0
|
|
#define COORDINATE_SYSTEM_IDENTITY 4.0
|
|
#define COORDINATE_SYSTEM_P20 5.0 // amap
|
|
#define COORDINATE_SYSTEM_P20_OFFSET 6.0 // amap offset
|
|
#define COORDINATE_SYSTEM_METER_OFFSET 7.0
|
|
|
|
#define COORDINATE_SYSTEM_P20_2 8.0 // amap2.0
|
|
|
|
uniform mat4 u_ViewMatrix;
|
|
uniform mat4 u_ProjectionMatrix;
|
|
uniform mat4 u_ViewProjectionMatrix;
|
|
uniform float u_Zoom : 1;
|
|
uniform float u_ZoomScale : 1;
|
|
|
|
uniform float u_CoordinateSystem;
|
|
uniform vec2 u_ViewportCenter;
|
|
uniform vec4 u_ViewportCenterProjection;
|
|
uniform vec3 u_PixelsPerDegree;
|
|
uniform vec3 u_PixelsPerDegree2;
|
|
uniform vec3 u_PixelsPerMeter;
|
|
|
|
uniform vec2 u_ViewportSize;
|
|
uniform float u_DevicePixelRatio;
|
|
uniform float u_FocalDistance;
|
|
uniform vec3 u_CameraPosition;
|
|
|
|
// uniform mat4 u_Mvp;
|
|
|
|
// web mercator coords -> world coords
|
|
vec2 project_mercator(vec2 lnglat) {
|
|
float x = lnglat.x;
|
|
return vec2(
|
|
radians(x) + PI,
|
|
PI - log(tan(PI * 0.25 + radians(lnglat.y) * 0.5))
|
|
);
|
|
}
|
|
|
|
float project_scale(float meters) {
|
|
return meters * u_PixelsPerMeter.z;
|
|
}
|
|
|
|
|
|
// offset coords -> world coords
|
|
vec4 project_offset(vec4 offset) {
|
|
float dy = offset.y;
|
|
dy = clamp(dy, -1., 1.);
|
|
vec3 pixels_per_unit = u_PixelsPerDegree + u_PixelsPerDegree2 * dy;
|
|
return vec4(offset.xyz * pixels_per_unit, offset.w);
|
|
}
|
|
|
|
vec3 project_normal(vec3 normal) {
|
|
vec4 normal_modelspace = u_ModelMatrix * vec4(normal, 0.0);
|
|
return normalize(normal_modelspace.xyz * u_PixelsPerMeter);
|
|
}
|
|
|
|
vec3 project_offset_normal(vec3 vector) {
|
|
if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01
|
|
|| u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
// normals generated by the polygon tesselator are in lnglat offsets instead of meters
|
|
return normalize(vector * u_PixelsPerDegree);
|
|
}
|
|
return project_normal(vector);
|
|
}
|
|
// || u_CoordinateSystem < COORDINATE_SYSTEM_P20_OFFSET + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_P20_OFFSET - 0.01
|
|
// reverse Y
|
|
vec3 reverse_offset_normal(vec3 vector) {
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 ||u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET ) {
|
|
return vector * vec3(1.0, -1.0, 1.0);
|
|
}
|
|
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.0
|
|
return vector;
|
|
}
|
|
return vector;
|
|
}
|
|
|
|
vec4 project_mvt_offset_position(vec4 position) {
|
|
float a = COORDINATE_SYSTEM_LNGLAT_OFFSET;
|
|
float b = COORDINATE_SYSTEM_P20_OFFSET;
|
|
float c = COORDINATE_SYSTEM_LNGLAT;
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {
|
|
return project_offset(vec4(0.0, 0.0, position.z, position.w));
|
|
}
|
|
if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01) {
|
|
return vec4(
|
|
project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale,
|
|
project_scale(position.z),
|
|
position.w
|
|
);
|
|
}
|
|
return position;
|
|
}
|
|
|
|
vec4 project_position(vec4 position) {
|
|
float a = COORDINATE_SYSTEM_LNGLAT_OFFSET;
|
|
float b = COORDINATE_SYSTEM_P20_OFFSET;
|
|
float c = COORDINATE_SYSTEM_LNGLAT;
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET
|
|
|| u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {
|
|
float X = position.x - u_ViewportCenter.x;
|
|
float Y = position.y - u_ViewportCenter.y;
|
|
return project_offset(vec4(X, Y, position.z, position.w));
|
|
}
|
|
if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01) {
|
|
return vec4(
|
|
project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale,
|
|
project_scale(position.z),
|
|
position.w
|
|
);
|
|
}
|
|
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) {
|
|
return vec4(
|
|
(project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale - vec2(215440491., 106744817.)) * vec2(1., -1.),
|
|
project_scale(position.z),
|
|
position.w
|
|
);
|
|
}
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {
|
|
// return vec4(
|
|
// (position.xy * WORLD_SCALE * u_ZoomScale) * vec2(1., -1.),
|
|
// project_scale(position.z),
|
|
// position.w);
|
|
|
|
return vec4(
|
|
position.xy,
|
|
project_scale(position.z),
|
|
position.w);
|
|
}
|
|
return position;
|
|
|
|
// TODO: \u74E6\u7247\u5750\u6807\u7CFB & \u5E38\u89C4\u4E16\u754C\u5750\u6807\u7CFB
|
|
}
|
|
vec2 project_pixel_size_to_clipspace(vec2 pixels) {
|
|
vec2 offset = pixels / u_ViewportSize * u_DevicePixelRatio * 2.0;
|
|
return offset * u_FocalDistance;
|
|
}
|
|
|
|
float project_pixel_allmap(float pixel) {
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {
|
|
return pixel * pow(2.0, u_Zoom);
|
|
}
|
|
return pixel * u_FocalDistance ;
|
|
}
|
|
|
|
// \u9002\u914D\u7EB9\u7406\u8D34\u56FE\u7684\u7B49\u50CF\u7D20\u5927\u5C0F
|
|
float project_pixel_texture(float pixel) {
|
|
// mapbox zoom > 12
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
return pixel * pow(0.5, u_Zoom) * u_FocalDistance ;
|
|
}
|
|
|
|
// amap2 zoom > 12
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {
|
|
return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom))* u_FocalDistance ;
|
|
}
|
|
|
|
// amap zoom > 12
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {
|
|
return pixel * pow(0.5, u_Zoom)* u_FocalDistance ;
|
|
}
|
|
|
|
// amap zoom < 12
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) {
|
|
return pixel * pow(2.0, (20.0 - u_Zoom))* u_FocalDistance ;
|
|
}
|
|
return pixel * 2.0 * u_FocalDistance;;
|
|
}
|
|
|
|
// \u5728\u4E0D\u8BBA\u4EC0\u4E48\u5E95\u56FE\u4E0B\u9700\u8981\u7EDF\u4E00\u5904\u7406\u7684\u65F6\u5019\u4F7F\u7528
|
|
float project_float_pixel(float pixel) {
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
// mapbox P20 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF1
|
|
return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ;
|
|
}
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {
|
|
// amap P20 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF1
|
|
return pixel * pow(2.0, (19.0 - u_Zoom));
|
|
}
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {
|
|
// amap2 P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3
|
|
return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom))* u_FocalDistance ;
|
|
}
|
|
return pixel * u_FocalDistance;
|
|
}
|
|
|
|
float project_pixel(float pixel) {
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {
|
|
// amap P20 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF1
|
|
return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ;
|
|
}
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {
|
|
// amap2 P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3
|
|
return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom)) * u_FocalDistance ;
|
|
}
|
|
return pixel * u_FocalDistance;
|
|
}
|
|
vec2 project_pixel(vec2 pixel) {
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {
|
|
// P20 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF1
|
|
return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ;
|
|
}
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {
|
|
// P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3
|
|
return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom)) * u_FocalDistance ;
|
|
}
|
|
return pixel * -1. * u_FocalDistance;
|
|
}
|
|
vec3 project_pixel(vec3 pixel) {
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {
|
|
// P20 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF1
|
|
return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ;
|
|
}
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {
|
|
// P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3
|
|
return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom)) * u_FocalDistance ;
|
|
}
|
|
return pixel * -1. * u_FocalDistance;
|
|
}
|
|
|
|
vec4 project_common_position_to_clipspace(vec4 position, mat4 viewProjectionMatrix, vec4 center) {
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET ||
|
|
u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
// Needs to be divided with project_uCommonUnitsPerMeter
|
|
position.w *= u_PixelsPerMeter.z;
|
|
}
|
|
|
|
return viewProjectionMatrix * position + center;
|
|
}
|
|
|
|
// Projects from common space coordinates to clip space
|
|
vec4 project_common_position_to_clipspace(vec4 position) {
|
|
return project_common_position_to_clipspace(
|
|
position,
|
|
u_ViewProjectionMatrix,
|
|
u_ViewportCenterProjection
|
|
);
|
|
}
|
|
|
|
vec4 unproject_clipspace_to_position(vec4 clipspacePos, mat4 u_InverseViewProjectionMatrix) {
|
|
vec4 pos = u_InverseViewProjectionMatrix * (clipspacePos - u_ViewportCenterProjection);
|
|
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET ||
|
|
u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
// Needs to be divided with project_uCommonUnitsPerMeter
|
|
pos.w = pos.w / u_PixelsPerMeter.z;
|
|
}
|
|
return pos;
|
|
}
|
|
|
|
|
|
bool isEqual( float a, float b) {
|
|
return a< b + 0.001 && a > b - 0.001;
|
|
}`,GT=`/**
|
|
* 2D signed distance field functions
|
|
* @see http://www.iquilezles.org/www/articles/distfunctions2d/distfunctions2d.htm
|
|
*/
|
|
|
|
float ndot(vec2 a, vec2 b ) { return a.x*b.x - a.y*b.y; }
|
|
|
|
float sdCircle(vec2 p, float r) {
|
|
return length(p) - r;
|
|
}
|
|
|
|
float sdEquilateralTriangle(vec2 p) {
|
|
float k = sqrt(3.0);
|
|
p.x = abs(p.x) - 1.0;
|
|
p.y = p.y + 1.0/k;
|
|
if( p.x + k*p.y > 0.0 ) p = vec2(p.x-k*p.y,-k*p.x-p.y)/2.0;
|
|
p.x -= clamp( p.x, -2.0, 0.0 );
|
|
return -length(p)*sign(p.y);
|
|
}
|
|
|
|
float sdBox(vec2 p, vec2 b) {
|
|
vec2 d = abs(p)-b;
|
|
return length(max(d,vec2(0))) + min(max(d.x,d.y),0.0);
|
|
}
|
|
|
|
float sdPentagon(vec2 p, float r) {
|
|
vec3 k = vec3(0.809016994,0.587785252,0.726542528);
|
|
p.x = abs(p.x);
|
|
p -= 2.0*min(dot(vec2(-k.x,k.y),p),0.0)*vec2(-k.x,k.y);
|
|
p -= 2.0*min(dot(vec2( k.x,k.y),p),0.0)*vec2( k.x,k.y);
|
|
p -= vec2(clamp(p.x,-r*k.z,r*k.z),r);
|
|
return length(p)*sign(p.y);
|
|
}
|
|
|
|
float sdHexagon(vec2 p, float r) {
|
|
vec3 k = vec3(-0.866025404,0.5,0.577350269);
|
|
p = abs(p);
|
|
p -= 2.0*min(dot(k.xy,p),0.0)*k.xy;
|
|
p -= vec2(clamp(p.x, -k.z*r, k.z*r), r);
|
|
return length(p)*sign(p.y);
|
|
}
|
|
|
|
float sdOctogon(vec2 p, float r) {
|
|
vec3 k = vec3(-0.9238795325, 0.3826834323, 0.4142135623 );
|
|
p = abs(p);
|
|
p -= 2.0*min(dot(vec2( k.x,k.y),p),0.0)*vec2( k.x,k.y);
|
|
p -= 2.0*min(dot(vec2(-k.x,k.y),p),0.0)*vec2(-k.x,k.y);
|
|
p -= vec2(clamp(p.x, -k.z*r, k.z*r), r);
|
|
return length(p)*sign(p.y);
|
|
}
|
|
|
|
float sdHexagram(vec2 p, float r) {
|
|
vec4 k=vec4(-0.5,0.8660254038,0.5773502692,1.7320508076);
|
|
p = abs(p);
|
|
p -= 2.0*min(dot(k.xy,p),0.0)*k.xy;
|
|
p -= 2.0*min(dot(k.yx,p),0.0)*k.yx;
|
|
p -= vec2(clamp(p.x,r*k.z,r*k.w),r);
|
|
return length(p)*sign(p.y);
|
|
}
|
|
|
|
float sdRhombus(vec2 p, vec2 b) {
|
|
vec2 q = abs(p);
|
|
float h = clamp((-2.0*ndot(q,b)+ndot(b,b))/dot(b,b),-1.0,1.0);
|
|
float d = length( q - 0.5*b*vec2(1.0-h,1.0+h) );
|
|
return d * sign( q.x*b.y + q.y*b.x - b.x*b.y );
|
|
}
|
|
|
|
float sdVesica(vec2 p, float r, float d) {
|
|
p = abs(p);
|
|
float b = sqrt(r*r-d*d); // can delay this sqrt
|
|
return ((p.y-b)*d>p.x*b)
|
|
? length(p-vec2(0.0,b))
|
|
: length(p-vec2(-d,0.0))-r;
|
|
}
|
|
`,HT=`attribute float a_vertexId;
|
|
|
|
uniform mat4 u_cellTypeLayout; // \u63CF\u8FF0\u6570\u636E\u7EB9\u7406 cell \u7ED3\u6784\u7684\u77E9\u9635
|
|
uniform sampler2D u_dataTexture; // \u6570\u636E\u7EB9\u7406
|
|
|
|
bool hasOpacity() { // \u5224\u65AD cell \u4E2D\u662F\u5426\u5B58\u5728 opacity \u7684\u6570\u636E
|
|
return u_cellTypeLayout[1][0] > 0.0 && u_cellTypeLayout[3][3] > 0.0;
|
|
}
|
|
|
|
bool hasStrokeOpacity() { // \u5224\u65AD cell \u4E2D\u662F\u5426\u5B58\u5728 strokeOpacity \u7684\u6570\u636E
|
|
return u_cellTypeLayout[1][1] > 0.0 && u_cellTypeLayout[3][3] > 0.0;
|
|
}
|
|
|
|
bool hasStrokeWidth() { // \u5224\u65AD cell \u4E2D\u662F\u5426\u5B58\u5728 strokeWidth \u7684\u6570\u636E
|
|
return u_cellTypeLayout[1][2] > 0.0 && u_cellTypeLayout[3][3] > 0.0;
|
|
}
|
|
|
|
bool hasStroke() { // \u5224\u65AD cell \u4E2D\u662F\u5426\u5B58\u5728 stroke \u7684\u6570\u636E
|
|
return u_cellTypeLayout[1][3] > 0.0 && u_cellTypeLayout[3][3] > 0.0;
|
|
}
|
|
|
|
bool hasOffsets() { // \u5224\u65AD cell \u4E2D\u662F\u5426\u5B58\u5728 offsets \u7684\u6570\u636E
|
|
return u_cellTypeLayout[2][0] > 0.0 && u_cellTypeLayout[3][3] > 0.0;
|
|
}
|
|
|
|
bool hasThetaOffset() { // \u5224\u65AD cell \u4E2D\u662F\u5426\u5B58\u5728 thetaOffset \u7684\u6570\u636E
|
|
return u_cellTypeLayout[2][1] > 0.0 && u_cellTypeLayout[3][3] > 0.0;
|
|
}
|
|
|
|
// \u6839\u636E\u5750\u6807\u4F4D\u7F6E\u5148\u662F\u8BA1\u7B97 uv \uFF0C\u7136\u540E\u6839\u636E uv \u4ECE\u6570\u636E\u7EB9\u7406\u4E2D\u53D6\u503C
|
|
float pos2value(vec2 pos, float columnWidth, float rowHeight) {
|
|
float u = (pos.r - 1.0) * columnWidth + columnWidth/2.0;
|
|
float v = 1.0 - ((pos.g - 1.0) * rowHeight + rowHeight/2.0);
|
|
return texture2D(u_dataTexture, vec2(u, v)).r;
|
|
}
|
|
|
|
/*
|
|
currentRow \u5F53\u524D\u884C
|
|
currentColumn \u5F53\u524D\u5217
|
|
columnCount \u6709\u591A\u5C11\u5217
|
|
nextStep \u9700\u8981\u8BA1\u7B97\u5F53\u524D cell \u540E\u7684\u7B2C\u51E0\u4E2A cell \uFF08\u5F53\u524D cell \u5219 nextStep = 0\uFF09
|
|
*/
|
|
vec2 nextPos(float currentRow, float currentColumn, float columnCount, float nextStep) {
|
|
float nextColumn = currentColumn;
|
|
float nextRow = currentRow;
|
|
if(currentColumn + nextStep <= columnCount){
|
|
nextColumn = currentColumn + nextStep;
|
|
} else {
|
|
nextColumn = mod(currentColumn + nextStep, columnCount); // \u4E0D\u4F1A\u51FA\u73B0\u8DE8\u4E24\u884C
|
|
nextRow = currentRow + 1.0;
|
|
}
|
|
return vec2(nextColumn, nextRow);
|
|
}
|
|
|
|
// \u8BA1\u7B97\u5F53\u524D\u5355\u4E2A cell \u7684\u5927\u5C0F
|
|
float calCellCount() {
|
|
// u_cellTypeLayout
|
|
// cal_height, WIDTH, 0.0, 0.0, // rowCount columnCount - \u51E0\u884C\u51E0\u5217
|
|
// 1.0, 1.0, 1.0, 0.0, // opacity strokeOpacity strokeWidth stroke - 1.0 \u8868\u793A\u6709\u6570\u636E\u6620\u5C04\u30010.0 \u8868\u793A\u6CA1\u6709
|
|
// 1.0, 1.0, 0.0, 0.0, // offsets thetaOffset
|
|
// 0.0, 0.0, 0.0, 0.0
|
|
|
|
return u_cellTypeLayout[1][0] + // opacity
|
|
u_cellTypeLayout[1][1] + // strokeOpacity
|
|
u_cellTypeLayout[1][2] + // strokeWidth
|
|
u_cellTypeLayout[1][3] * 4.0 + // stroke
|
|
u_cellTypeLayout[2][0] * 2.0 + // offsets
|
|
u_cellTypeLayout[2][1]; // thetaOffset
|
|
}`,jT=`
|
|
// \u8BA1\u7B97 opacity \u548C\u6807\u793A\u5728 cell \u4E2D\u53D6\u503C\u4F4D\u7F6E\u7684\u504F\u79FB\u91CF textureOffset
|
|
vec2 calOpacityAndOffset(float cellCurrentRow, float cellCurrentColumn, float columnCount, float textureOffset, float columnWidth, float rowHeight) {
|
|
if(!hasOpacity()) { // \u6570\u636E\u7EB9\u7406\u4E2D\u4E0D\u5B58\u5728 opacity \u7684\u65F6\u5019\u53D6\u9ED8\u8BA4\u503C\uFF08\u7528\u6237\u5728 style \u4E2D\u4F20\u5165\u7684\u662F\u5E38\u91CF\uFF09
|
|
return vec2(u_opacity, textureOffset);
|
|
} else {
|
|
vec2 valuePos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
float textureOpacity = pos2value(valuePos, columnWidth, rowHeight);
|
|
return vec2(textureOpacity, textureOffset + 1.0);
|
|
}
|
|
}
|
|
`,WT=`
|
|
// \u8BA1\u7B97 strokeOpaicty \u548C\u6807\u793A\u5728 cell \u4E2D\u53D6\u503C\u4F4D\u7F6E\u7684\u504F\u79FB\u91CF textureOffset
|
|
vec2 calStrokeOpacityAndOffset(float cellCurrentRow, float cellCurrentColumn, float columnCount, float textureOffset, float columnWidth, float rowHeight) {
|
|
if(!hasStrokeOpacity()) {
|
|
return vec2(u_stroke_opacity, textureOffset);
|
|
} else {
|
|
vec2 valuePos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
float textureStrokeOpacity = pos2value(valuePos, columnWidth, rowHeight);
|
|
return vec2(textureStrokeOpacity, textureOffset + 1.0);
|
|
}
|
|
}
|
|
`,XT=`
|
|
// \u8BA1\u7B97 strokeWidth \u548C\u6807\u793A\u5728 cell \u4E2D\u53D6\u503C\u4F4D\u7F6E\u7684\u504F\u79FB\u91CF textureOffset
|
|
vec2 calStrokeWidthAndOffset(float cellCurrentRow, float cellCurrentColumn, float columnCount, float textureOffset, float columnWidth, float rowHeight) {
|
|
if(!hasStrokeWidth()) {
|
|
return vec2(u_stroke_width, textureOffset);
|
|
} else {
|
|
vec2 valuePos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
float textureStrokeWidth = pos2value(valuePos, columnWidth, rowHeight);
|
|
return vec2(textureStrokeWidth, textureOffset + 1.0);
|
|
}
|
|
}
|
|
`,YT=`
|
|
// \u8BA1\u7B97 thetaOffset \u548C\u6807\u793A\u5728 cell \u4E2D\u53D6\u503C\u4F4D\u7F6E\u7684\u504F\u79FB\u91CF textureOffset
|
|
vec2 calThetaOffsetAndOffset(float cellCurrentRow, float cellCurrentColumn, float columnCount, float textureOffset, float columnWidth, float rowHeight) {
|
|
if(!hasThetaOffset()) { // \u6570\u636E\u7EB9\u7406\u4E2D\u4E0D\u5B58\u5728 thetaOffset \u7684\u65F6\u5019\u53D6\u9ED8\u8BA4\u503C\uFF08\u7528\u6237\u5728 style \u4E2D\u4F20\u5165\u7684\u662F\u5E38\u91CF\uFF09
|
|
return vec2(u_thetaOffset, textureOffset);
|
|
} else {
|
|
vec2 valuePos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
float textureThetaOffset = pos2value(valuePos, columnWidth, rowHeight);
|
|
return vec2(textureThetaOffset, textureOffset + 1.0);
|
|
}
|
|
}
|
|
`,$T=/precision\s+(high|low|medium)p\s+float/,Q2=`#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
precision highp float;
|
|
#else
|
|
precision mediump float;
|
|
#endif
|
|
`,qT=/#pragma include (["^+"]?["[a-zA-Z_0-9](.*)"]*?)/g,KT=(Y2=(0,At.b2)(),Y2($2=function(){function n(){(0,pt.Z)(this,n),(0,W.Z)(this,"moduleCache",{}),(0,W.Z)(this,"rawContentCache",{})}return(0,et.Z)(n,[{key:"registerBuiltinModules",value:function(){this.destroy(),this.registerModule("common",{vs:q2,fs:q2}),this.registerModule("decode",{vs:BT,fs:""}),this.registerModule("projection",{vs:VT,fs:""}),this.registerModule("project",{vs:ZT,fs:""}),this.registerModule("sdf_2d",{vs:"",fs:GT}),this.registerModule("lighting",{vs:zT,fs:""}),this.registerModule("light",{vs:NT,fs:""}),this.registerModule("picking",{vs:K2,fs:UT}),this.registerModule("styleMapping",{vs:HT,fs:""}),this.registerModule("styleMappingCalThetaOffset",{vs:YT,fs:""}),this.registerModule("styleMappingCalOpacity",{vs:jT,fs:""}),this.registerModule("styleMappingCalStrokeOpacity",{vs:WT,fs:""}),this.registerModule("styleMappingCalStrokeWidth",{vs:XT,fs:""})}},{key:"registerModule",value:function(a,s){if(!this.rawContentCache[a]){var u=s.vs,h=s.fs,v=s.uniforms,m=X2(u),w=m.content,A=m.uniforms,R=X2(h),B=R.content,G=R.uniforms;this.rawContentCache[a]={fs:B,uniforms:(0,K.Z)((0,K.Z)((0,K.Z)({},A),G),v),vs:w}}}},{key:"destroy",value:function(){this.moduleCache={},this.rawContentCache={}}},{key:"getModule",value:function(a){var s=this;if(this.moduleCache[a])return this.moduleCache[a];var u=this.rawContentCache[a].vs,h=this.rawContentCache[a].fs,v=this.processModule(u,[],"vs"),m=v.content,w=v.includeList,A=this.processModule(h,[],"fs"),R=A.content,B=A.includeList,G=R,j=(0,Fn.uniq)(w.concat(B).concat(a)).reduce(function(lt,ct){return(0,K.Z)((0,K.Z)({},lt),s.rawContentCache[ct].uniforms)},{});return $T.test(R)||(G=Q2+R),this.moduleCache[a]={fs:G.trim(),uniforms:j,vs:m.trim()},this.moduleCache[a]}},{key:"processModule",value:function(a,s,u){var h=this,v=a.replace(qT,function(m,w){var A=w.split(" "),R=A[0].replace(/"/g,"");if(s.indexOf(R)>-1)return"";var B=h.rawContentCache[R][u];s.push(R);var G=h.processModule(B,s,u),j=G.content;return j});return{content:v,includeList:s}}}]),n}())||$2);function QT(n,l){for(;!Object.prototype.hasOwnProperty.call(n,l)&&(n=(0,b.Z)(n),n!==null););return n}function as(){return typeof Reflect!="undefined"&&Reflect.get?as=Reflect.get.bind():as=function(l,a,s){var u=QT(l,a);if(u){var h=Object.getOwnPropertyDescriptor(u,a);return h.get?h.get.call(arguments.length<3?l:s):h.value}},as.apply(this,arguments)}var Pv;(function(n){n.Normal="normal",n.PostProcessing="post-processing"})(Pv||(Pv={}));var J2,tE,ky=(J2=(0,At.b2)(),J2(tE=function(){function n(){(0,pt.Z)(this,n),(0,W.Z)(this,"shaderModuleService",void 0),(0,W.Z)(this,"rendererService",void 0),(0,W.Z)(this,"cameraService",void 0),(0,W.Z)(this,"mapService",void 0),(0,W.Z)(this,"interactionService",void 0),(0,W.Z)(this,"layerService",void 0),(0,W.Z)(this,"config",void 0)}return(0,et.Z)(n,[{key:"getName",value:function(){return""}},{key:"getType",value:function(){return Pv.Normal}},{key:"init",value:function(a,s){this.config=s,this.rendererService=a.getContainer().get(Dt.IRendererService),this.cameraService=a.getContainer().get(Dt.ICameraService),this.mapService=a.getContainer().get(Dt.IMapService),this.interactionService=a.getContainer().get(Dt.IInteractionService),this.layerService=a.getContainer().get(Dt.ILayerService),this.shaderModuleService=a.getContainer().get(Dt.IShaderModuleService)}},{key:"render",value:function(a){}}]),n}())||tE),eE,rE;function JT(n){var l=M_();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function M_(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var tM=(eE=(0,At.b2)(),eE(rE=function(n){(0,zt.Z)(a,n);var l=JT(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getName",value:function(){return"clear"}},{key:"init",value:function(u,h){as((0,b.Z)(a.prototype),"init",this).call(this,u,h)}},{key:"render",value:function(){this.rendererService.clear({color:[0,0,0,0],depth:1,framebuffer:null})}}]),a}(ky))||rE),$g,I_,eM,nE,iE;function rM(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=dO(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,u=function(){};return{s:u,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function dO(n,l){if(n){if(typeof n=="string")return nM(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return nM(n,l)}}function nM(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a<l;a++)s[a]=n[a];return s}var iM=($g=(0,At.b2)(),I_=(0,At.f3)(Dt.IPostProcessor),$g(eM=(nE=function(){function n(){(0,pt.Z)(this,n),(0,W.Z)(this,"passes",[]),Rn(this,"postProcessor",iE,this),(0,W.Z)(this,"layer",void 0),(0,W.Z)(this,"renderFlag",void 0),(0,W.Z)(this,"width",0),(0,W.Z)(this,"height",0)}return(0,et.Z)(n,[{key:"setLayer",value:function(a){this.layer=a}},{key:"setRenderFlag",value:function(a){this.renderFlag=a}},{key:"getRenderFlag",value:function(){return this.renderFlag}},{key:"getPostProcessor",value:function(){return this.postProcessor}},{key:"render",value:function(){var l=(0,J.Z)(ot().mark(function s(){var u,h,v;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:u=rM(this.passes),w.prev=1,u.s();case 3:if((h=u.n()).done){w.next=9;break}return v=h.value,w.next=7,v.render(this.layer);case 7:w.next=3;break;case 9:w.next=14;break;case 11:w.prev=11,w.t0=w.catch(1),u.e(w.t0);case 14:return w.prev=14,u.f(),w.finish(14);case 17:return w.next=19,this.postProcessor.render(this.layer);case 19:case"end":return w.stop()}},s,this,[[1,11,14,17]])}));function a(){return l.apply(this,arguments)}return a}()},{key:"resize",value:function(a,s){(this.width!==a||this.height!==s)&&(this.postProcessor.resize(a,s),this.width=a,this.height=s)}},{key:"add",value:function(a,s){a.getType()===Pv.PostProcessing?this.postProcessor.add(a,this.layer,s):(a.init(this.layer,s),this.passes.push(a))}},{key:"insert",value:function(a,s,u){a.init(this.layer,s),this.passes.splice(u,0,a)}},{key:"destroy",value:function(){this.passes.length=0}}]),n}(),iE=Ri(nE.prototype,"postProcessor",[I_],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),nE))||eM),aE,oE;function aM(n){var l=k_();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function k_(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var L_=(aE=(0,At.b2)(),aE(oE=function(n){(0,zt.Z)(a,n);var l=aM(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"pickingFBO",void 0),(0,W.Z)((0,ut.Z)(s),"layer",void 0),(0,W.Z)((0,ut.Z)(s),"width",0),(0,W.Z)((0,ut.Z)(s),"height",0),(0,W.Z)((0,ut.Z)(s),"alreadyInRendering",!1),(0,W.Z)((0,ut.Z)(s),"pickFromPickingFBO",function(m){var w=m.x,A=m.y,R=m.lngLat,B=m.type;if(!(!s.layer.isVisible()||!s.layer.needPick(B))){var G=s.rendererService,j=G.getViewportSize,lt=G.readPixels,ct=G.useFramebuffer,_t=j(),Vt=_t.width,ce=_t.height,ae=s.layer.getLayerConfig(),ze=ae.enableHighlight,$e=ae.enableSelect,xr=w*Qi,Or=A*Qi;if(!(xr>Vt||xr<0||Or>ce||Or<0)){var Zr;ct(s.pickingFBO,function(){var Wr;if(Zr=lt({x:Math.round(xr),y:Math.round(ce-(A+1)*Qi),width:1,height:1,data:new Uint8Array(1*1*4),framebuffer:s.pickingFBO}),Zr[0]!==0||Zr[1]!==0||Zr[2]!==0){var wn=zc(Zr),vn=s.layer.getSource().getFeatureById(wn),Kn={x:w,y:A,type:B,lngLat:R,featureId:wn,feature:vn};vn&&(s.layer.setCurrentPickId(wn),s.triggerHoverOnLayer(Kn))}else{var Ei={x:w,y:A,lngLat:R,type:s.layer.getCurrentPickId()===null?"un"+B:"mouseout",featureId:null,feature:null};s.triggerHoverOnLayer((0,K.Z)((0,K.Z)({},Ei),{},{type:"unpick"})),s.triggerHoverOnLayer(Ei),s.layer.setCurrentPickId(null)}ze&&s.highlightPickedFeature(Zr),$e&&B==="click"&&((Wr=Zr)===null||Wr===void 0?void 0:Wr.toString())!==[0,0,0,0].toString()&&s.selectFeature(Zr)})}}}),s}return(0,et.Z)(a,[{key:"getType",value:function(){return Pv.Normal}},{key:"getName",value:function(){return"pixelPicking"}},{key:"init",value:function(u,h){as((0,b.Z)(a.prototype),"init",this).call(this,u,h),this.layer=u;var v=this.rendererService,m=v.createTexture2D,w=v.createFramebuffer,A=v.getViewportSize,R=A(),B=R.width,G=R.height;this.pickingFBO=w({color:m({width:B,height:G,wrapS:ne.CLAMP_TO_EDGE,wrapT:ne.CLAMP_TO_EDGE})}),this.interactionService.on(hs.Hover,this.pickFromPickingFBO),this.interactionService.on(hs.Select,this.selectFeatureHandle.bind(this)),this.interactionService.on(hs.Active,this.highlightFeatureHandle.bind(this))}},{key:"render",value:function(u){var h=this;if(!this.alreadyInRendering){var v=this.rendererService,m=v.getViewportSize,w=v.useFramebuffer,A=v.clear,R=m(),B=R.width,G=R.height;this.alreadyInRendering=!0,(this.width!==B||this.height!==G)&&(this.pickingFBO.resize({width:B,height:G}),this.width=B,this.height=G),w(this.pickingFBO,function(){A({framebuffer:h.pickingFBO,color:[0,0,0,0],stencil:0,depth:1});var j=h.layer.multiPassRenderer.getRenderFlag();h.layer.multiPassRenderer.setRenderFlag(!1),u.hooks.beforePickingEncode.call(),u.render(),u.hooks.afterPickingEncode.call(),h.layer.multiPassRenderer.setRenderFlag(j),h.alreadyInRendering=!1})}}},{key:"triggerHoverOnLayer",value:function(u){this.layer.emit(u.type,u)}},{key:"highlightPickedFeature",value:function(u){var h=(0,yt.Z)(u,3),v=h[0],m=h[1],w=h[2];this.layer.hooks.beforeHighlight.call([v,m,w]),this.layerService.renderLayers()}},{key:"selectFeature",value:function(u){var h=(0,yt.Z)(u,3),v=h[0],m=h[1],w=h[2];this.layer.hooks.beforeSelect.call([v,m,w]),this.layerService.renderLayers()}},{key:"selectFeatureHandle",value:function(u){var h=u.featureId,v=vc(h);this.selectFeature(new Uint8Array(v))}},{key:"highlightFeatureHandle",value:function(u){var h=u.featureId,v=vc(h);this.highlightPickedFeature(new Uint8Array(v))}}]),a}(ky))||oE),P_,O_,sE,Ly,og,oM=`attribute vec2 a_Position;
|
|
|
|
varying vec2 v_UV;
|
|
|
|
void main() {
|
|
v_UV = 0.5 * (a_Position + 1.0);
|
|
gl_Position = vec4(a_Position, 0., 1.);
|
|
}`,Ov=(P_=(0,At.b2)(),O_=(0,At.f3)(Dt.IShaderModuleService),P_(sE=(Ly=function(){function n(){(0,pt.Z)(this,n),Rn(this,"shaderModuleService",og,this),(0,W.Z)(this,"rendererService",void 0),(0,W.Z)(this,"config",void 0),(0,W.Z)(this,"quad",oM),(0,W.Z)(this,"enabled",!0),(0,W.Z)(this,"renderToScreen",!1),(0,W.Z)(this,"model",void 0),(0,W.Z)(this,"name",void 0),(0,W.Z)(this,"optionsToUpdate",{})}return(0,et.Z)(n,[{key:"getName",value:function(){return this.name}},{key:"setName",value:function(a){this.name=a}},{key:"getType",value:function(){return Pv.PostProcessing}},{key:"init",value:function(a,s){this.config=s,this.rendererService=a.getContainer().get(Dt.IRendererService),this.shaderModuleService=a.getContainer().get(Dt.IShaderModuleService);var u=this.rendererService,h=u.createAttribute,v=u.createBuffer,m=u.createModel,w=this.setupShaders(),A=w.vs,R=w.fs,B=w.uniforms;this.model=m({vs:A,fs:R,attributes:{a_Position:h({buffer:v({data:[-4,-4,4,-4,0,4],type:ne.FLOAT}),size:2})},uniforms:(0,K.Z)((0,K.Z)({u_Texture:null},B),this.config&&this.convertOptionsToUniforms(this.config)),depth:{enable:!1},count:3,blend:{enable:this.getName()==="copy"}})}},{key:"render",value:function(a,s){var u=this,h=a.multiPassRenderer.getPostProcessor(),v=this.rendererService,m=v.useFramebuffer,w=v.getViewportSize,A=v.clear,R=w(),B=R.width,G=R.height;m(this.renderToScreen?null:h.getWriteFBO(),function(){A({framebuffer:h.getWriteFBO(),color:[0,0,0,0],depth:1,stencil:0});var j=(0,K.Z)({u_BloomFinal:0,u_Texture:h.getReadFBO(),u_ViewportSize:[B,G]},u.convertOptionsToUniforms(u.optionsToUpdate));s&&(j.u_BloomFinal=1,j.u_Texture2=s),u.model.draw({uniforms:j})})}},{key:"isEnabled",value:function(){return this.enabled}},{key:"setEnabled",value:function(a){this.enabled=a}},{key:"setRenderToScreen",value:function(a){this.renderToScreen=a}},{key:"updateOptions",value:function(a){this.optionsToUpdate=(0,K.Z)((0,K.Z)({},this.optionsToUpdate),a)}},{key:"setupShaders",value:function(){throw new Error("Method not implemented.")}},{key:"convertOptionsToUniforms",value:function(a){var s={};return Object.keys(a).forEach(function(u){(0,Fn.isNil)(a[u])||(s["u_".concat((0,Fn.upperFirst)((0,Fn.camelCase)(u)))]=a[u])}),s}}]),n}(),og=Ri(Ly.prototype,"shaderModuleService",[O_],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ly))||sE),sM,uE;function uM(n){var l=F_();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function F_(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var lM=`varying vec2 v_UV;
|
|
|
|
uniform float u_BloomFinal: 0.0;
|
|
uniform sampler2D u_Texture;
|
|
uniform sampler2D u_Texture2;
|
|
|
|
uniform vec2 u_ViewportSize: [1.0, 1.0];
|
|
uniform float u_radius: 5.0;
|
|
uniform float u_intensity: 0.3;
|
|
uniform float u_baseRadio: 0.5;
|
|
|
|
// https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/9.glsl
|
|
vec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) {
|
|
vec4 color = vec4(0.0);
|
|
vec2 off1 = vec2(1.3846153846) * direction;
|
|
vec2 off2 = vec2(3.2307692308) * direction;
|
|
color += texture2D(image, uv) * 0.2270270270;
|
|
color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162;
|
|
color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162;
|
|
color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703;
|
|
color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703;
|
|
return color;
|
|
}
|
|
|
|
float luminance(vec4 color) {
|
|
return 0.2125 * color.r + 0.7154 * color.g + 0.0721 * color.b;
|
|
}
|
|
|
|
void main() {
|
|
// vec4 baseColor = texture2D(u_Texture, v_UV);
|
|
|
|
float r = sqrt(u_radius);
|
|
|
|
vec4 c1 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(u_radius, 0.0));
|
|
// c1 *= luminance(c1);
|
|
vec4 c2 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(0.0, u_radius));
|
|
// c2 *= luminance(c2);
|
|
vec4 c3 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(r, r));
|
|
// c3 *= luminance(c3);
|
|
vec4 c4 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(r, -r));
|
|
// c4 *= luminance(c4);
|
|
vec4 inbloomColor = (c1 + c2 + c3 + c4) * 0.25;
|
|
|
|
// float lum = luminance(inbloomColor);
|
|
// inbloomColor.rgb *= lum;
|
|
|
|
if(u_BloomFinal > 0.0) {
|
|
vec4 baseColor = texture2D(u_Texture2, v_UV);
|
|
float baselum = luminance(baseColor);
|
|
gl_FragColor = mix(inbloomColor, baseColor, u_baseRadio);
|
|
if(baselum <= 0.2) {
|
|
gl_FragColor = inbloomColor * u_intensity;
|
|
}
|
|
} else {
|
|
gl_FragColor = inbloomColor;
|
|
}
|
|
}`,cM=`attribute vec2 a_Position;
|
|
|
|
varying vec2 v_UV;
|
|
|
|
void main() {
|
|
v_UV = 0.5 * (a_Position + 1.0);
|
|
gl_Position = vec4(a_Position, 0., 1.);
|
|
}`,fM=(sM=(0,At.b2)(),sM(uE=function(n){(0,zt.Z)(a,n);var l=uM(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("blur-pass",{vs:cM,fs:lM});var u=this.shaderModuleService.getModule("blur-pass"),h=u.vs,v=u.fs,m=u.uniforms,w=this.rendererService.getViewportSize(),A=w.width,R=w.height;return{vs:h,fs:v,uniforms:(0,K.Z)((0,K.Z)({},m),{},{u_ViewportSize:[A,R]})}}},{key:"convertOptionsToUniforms",value:function(u){var h={};return(0,Fn.isNil)(u.bloomRadius)||(h.u_radius=u.bloomRadius),(0,Fn.isNil)(u.bloomIntensity)||(h.u_intensity=u.bloomIntensity),(0,Fn.isNil)(u.bloomBaseRadio)||(h.u_baseRadio=u.bloomBaseRadio),h}}]),a}(Ov))||uE),lE,R_;function hM(n){var l=D_();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function D_(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var vO=`varying vec2 v_UV;
|
|
|
|
uniform sampler2D u_Texture;
|
|
|
|
uniform vec2 u_ViewportSize: [1.0, 1.0];
|
|
uniform vec2 u_BlurDir: [1.0, 0.0];
|
|
|
|
// https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/9.glsl
|
|
vec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) {
|
|
vec4 color = vec4(0.0);
|
|
vec2 off1 = vec2(1.3846153846) * direction;
|
|
vec2 off2 = vec2(3.2307692308) * direction;
|
|
color += texture2D(image, uv) * 0.2270270270;
|
|
color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162;
|
|
color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162;
|
|
color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703;
|
|
color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703;
|
|
return color;
|
|
}
|
|
|
|
void main() {
|
|
gl_FragColor = blur9(u_Texture, v_UV, u_ViewportSize, u_BlurDir);
|
|
}`,gO=`attribute vec2 a_Position;
|
|
|
|
varying vec2 v_UV;
|
|
|
|
void main() {
|
|
v_UV = 0.5 * (a_Position + 1.0);
|
|
gl_Position = vec4(a_Position, 0., 1.);
|
|
}`,pM=(lE=(0,At.b2)(),lE(R_=function(n){(0,zt.Z)(a,n);var l=hM(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("blur-pass",{vs:gO,fs:vO});var u=this.shaderModuleService.getModule("blur-pass"),h=u.vs,v=u.fs,m=u.uniforms,w=this.rendererService.getViewportSize(),A=w.width,R=w.height;return{vs:h,fs:v,uniforms:(0,K.Z)((0,K.Z)({},m),{},{u_ViewportSize:[A,R]})}}},{key:"convertOptionsToUniforms",value:function(u){var h={};return(0,Fn.isNil)(u.blurRadius)||(h.u_BlurDir=[u.blurRadius,0]),h}}]),a}(Ov))||R_),cE,fE;function mO(n){var l=yO();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function yO(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var dM=`varying vec2 v_UV;
|
|
|
|
uniform sampler2D u_Texture;
|
|
|
|
uniform vec2 u_ViewportSize: [1.0, 1.0];
|
|
uniform vec2 u_BlurDir: [1.0, 0.0];
|
|
|
|
// https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/9.glsl
|
|
vec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) {
|
|
vec4 color = vec4(0.0);
|
|
vec2 off1 = vec2(1.3846153846) * direction;
|
|
vec2 off2 = vec2(3.2307692308) * direction;
|
|
color += texture2D(image, uv) * 0.2270270270;
|
|
color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162;
|
|
color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162;
|
|
color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703;
|
|
color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703;
|
|
return color;
|
|
}
|
|
|
|
void main() {
|
|
gl_FragColor = blur9(u_Texture, v_UV, u_ViewportSize, u_BlurDir);
|
|
}`,vM=`attribute vec2 a_Position;
|
|
|
|
varying vec2 v_UV;
|
|
|
|
void main() {
|
|
v_UV = 0.5 * (a_Position + 1.0);
|
|
gl_Position = vec4(a_Position, 0., 1.);
|
|
}`,_O=(cE=(0,At.b2)(),cE(fE=function(n){(0,zt.Z)(a,n);var l=mO(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("blur-pass",{vs:vM,fs:dM});var u=this.shaderModuleService.getModule("blur-pass"),h=u.vs,v=u.fs,m=u.uniforms,w=this.rendererService.getViewportSize(),A=w.width,R=w.height;return{vs:h,fs:v,uniforms:(0,K.Z)((0,K.Z)({},m),{},{u_ViewportSize:[A,R]})}}},{key:"convertOptionsToUniforms",value:function(u){var h={};return(0,Fn.isNil)(u.blurRadius)||(h.u_BlurDir=[0,u.blurRadius]),h}}]),a}(Ov))||fE),gM,hE;function mM(n){var l=yM();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function yM(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var xO=`varying vec2 v_UV;
|
|
|
|
uniform sampler2D u_Texture;
|
|
uniform vec2 u_ViewportSize: [1.0, 1.0];
|
|
uniform vec2 u_Center : [0.5, 0.5];
|
|
uniform float u_Angle : 0;
|
|
uniform float u_Size : 8;
|
|
|
|
#pragma include "common"
|
|
|
|
float scale = PI / u_Size;
|
|
|
|
float pattern(float u_Angle, vec2 texSize, vec2 texCoord) {
|
|
float s = sin(u_Angle), c = cos(u_Angle);
|
|
vec2 tex = texCoord * texSize - u_Center * texSize;
|
|
vec2 point = vec2(
|
|
c * tex.x - s * tex.y,
|
|
s * tex.x + c * tex.y
|
|
) * scale;
|
|
return (sin(point.x) * sin(point.y)) * 4.0;
|
|
}
|
|
|
|
// https://github.com/evanw/glfx.js/blob/master/src/filters/fun/colorhalftone.js
|
|
vec4 colorHalftone_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
|
|
vec3 cmy = 1.0 - color.rgb;
|
|
float k = min(cmy.x, min(cmy.y, cmy.z));
|
|
cmy = (cmy - k) / (1.0 - k);
|
|
cmy = clamp(
|
|
cmy * 10.0 - 3.0 + vec3(
|
|
pattern(u_Angle + 0.26179, texSize, texCoord),
|
|
pattern(u_Angle + 1.30899, texSize, texCoord),
|
|
pattern(u_Angle, texSize, texCoord)
|
|
),
|
|
0.0,
|
|
1.0
|
|
);
|
|
k = clamp(k * 10.0 - 5.0 + pattern(u_Angle + 0.78539, texSize, texCoord), 0.0, 1.0);
|
|
return vec4(1.0 - cmy - k, color.a);
|
|
}
|
|
|
|
void main() {
|
|
gl_FragColor = vec4(texture2D(u_Texture, v_UV));
|
|
gl_FragColor = colorHalftone_filterColor(gl_FragColor, u_ViewportSize, v_UV);
|
|
}`,bO=`attribute vec2 a_Position;
|
|
|
|
varying vec2 v_UV;
|
|
|
|
void main() {
|
|
v_UV = 0.5 * (a_Position + 1.0);
|
|
gl_Position = vec4(a_Position, 0., 1.);
|
|
}`,_M=(gM=(0,At.b2)(),gM(hE=function(n){(0,zt.Z)(a,n);var l=mM(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("colorhalftone-pass",{vs:bO,fs:xO});var u=this.shaderModuleService.getModule("colorhalftone-pass"),h=u.vs,v=u.fs,m=u.uniforms,w=this.rendererService.getViewportSize(),A=w.width,R=w.height;return{vs:h,fs:v,uniforms:(0,K.Z)((0,K.Z)({},m),{},{u_ViewportSize:[A,R]})}}}]),a}(Ov))||hE),pE,Py;function B_(n){var l=xM();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function xM(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var bM=`varying vec2 v_UV;
|
|
|
|
uniform sampler2D u_Texture;
|
|
|
|
void main() {
|
|
gl_FragColor = vec4(texture2D(u_Texture, v_UV));
|
|
}`,EM=`attribute vec2 a_Position;
|
|
|
|
varying vec2 v_UV;
|
|
|
|
void main() {
|
|
v_UV = 0.5 * (a_Position + 1.0);
|
|
gl_Position = vec4(a_Position, 0., 1.);
|
|
}`,Oy=(pE=(0,At.b2)(),pE(Py=function(n){(0,zt.Z)(a,n);var l=B_(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"setupShaders",value:function(){return this.shaderModuleService.registerModule("copy-pass",{vs:EM,fs:bM}),this.shaderModuleService.getModule("copy-pass")}}]),a}(Ov))||Py),dE,vE;function wM(n){var l=SM();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function SM(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var CM=`varying vec2 v_UV;
|
|
|
|
uniform sampler2D u_Texture;
|
|
uniform vec2 u_ViewportSize: [1.0, 1.0];
|
|
uniform vec2 u_Center : [0.5, 0.5];
|
|
uniform float u_Scale : 10;
|
|
|
|
// https://github.com/evanw/glfx.js/blob/master/src/filters/fun/hexagonalpixelate.js
|
|
vec4 hexagonalPixelate_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {
|
|
vec2 tex = (texCoord * texSize - u_Center * texSize) / u_Scale;
|
|
tex.y /= 0.866025404;
|
|
tex.x -= tex.y * 0.5;
|
|
vec2 a;
|
|
if (tex.x + tex.y - floor(tex.x) - floor(tex.y) < 1.0) {
|
|
a = vec2(floor(tex.x), floor(tex.y));
|
|
}
|
|
else a = vec2(ceil(tex.x), ceil(tex.y));
|
|
vec2 b = vec2(ceil(tex.x), floor(tex.y));
|
|
vec2 c = vec2(floor(tex.x), ceil(tex.y));
|
|
vec3 TEX = vec3(tex.x, tex.y, 1.0 - tex.x - tex.y);
|
|
vec3 A = vec3(a.x, a.y, 1.0 - a.x - a.y);
|
|
vec3 B = vec3(b.x, b.y, 1.0 - b.x - b.y);
|
|
vec3 C = vec3(c.x, c.y, 1.0 - c.x - c.y);
|
|
float alen = length(TEX - A);
|
|
float blen = length(TEX - B);
|
|
float clen = length(TEX - C);
|
|
vec2 choice;
|
|
if (alen < blen) {
|
|
if (alen < clen) choice = a;
|
|
else choice = c;
|
|
} else {
|
|
if (blen < clen) choice = b;
|
|
else choice = c;
|
|
}
|
|
choice.x += choice.y * 0.5;
|
|
choice.y *= 0.866025404;
|
|
choice *= u_Scale / texSize;
|
|
return texture2D(texture, choice + u_Center);
|
|
}
|
|
|
|
void main() {
|
|
gl_FragColor = vec4(texture2D(u_Texture, v_UV));
|
|
gl_FragColor = hexagonalPixelate_sampleColor(u_Texture, u_ViewportSize, v_UV);
|
|
}`,AM=`attribute vec2 a_Position;
|
|
|
|
varying vec2 v_UV;
|
|
|
|
void main() {
|
|
v_UV = 0.5 * (a_Position + 1.0);
|
|
gl_Position = vec4(a_Position, 0., 1.);
|
|
}`,TM=(dE=(0,At.b2)(),dE(vE=function(n){(0,zt.Z)(a,n);var l=wM(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("hexagonalpixelate-pass",{vs:AM,fs:CM});var u=this.shaderModuleService.getModule("hexagonalpixelate-pass"),h=u.vs,v=u.fs,m=u.uniforms,w=this.rendererService.getViewportSize(),A=w.width,R=w.height;return{vs:h,fs:v,uniforms:(0,K.Z)((0,K.Z)({},m),{},{u_ViewportSize:[A,R]})}}}]),a}(Ov))||vE),gE,N_;function mE(n){var l=MM();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function MM(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var IM=`varying vec2 v_UV;
|
|
|
|
uniform sampler2D u_Texture;
|
|
uniform vec2 u_ViewportSize: [1.0, 1.0];
|
|
uniform float u_Strength : 0.6;
|
|
|
|
vec4 ink_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {
|
|
vec2 dx = vec2(1.0 / texSize.x, 0.0);
|
|
vec2 dy = vec2(0.0, 1.0 / texSize.y);
|
|
vec4 color = texture2D(texture, texCoord);
|
|
float bigTotal = 0.0;
|
|
float smallTotal = 0.0;
|
|
vec3 bigAverage = vec3(0.0);
|
|
vec3 smallAverage = vec3(0.0);
|
|
for (float x = -2.0; x <= 2.0; x += 1.0) {
|
|
for (float y = -2.0; y <= 2.0; y += 1.0) {
|
|
vec3 sample = texture2D(texture, texCoord + dx * x + dy * y).rgb;
|
|
bigAverage += sample;
|
|
bigTotal += 1.0;
|
|
if (abs(x) + abs(y) < 2.0) {
|
|
smallAverage += sample;
|
|
smallTotal += 1.0;
|
|
}
|
|
}
|
|
}
|
|
vec3 edge = max(vec3(0.0), bigAverage / bigTotal - smallAverage / smallTotal);
|
|
float power = u_Strength * u_Strength * u_Strength * u_Strength * u_Strength;
|
|
return vec4(color.rgb - dot(edge, edge) * power * 100000.0, color.a);
|
|
}
|
|
|
|
void main() {
|
|
gl_FragColor = vec4(texture2D(u_Texture, v_UV));
|
|
gl_FragColor = ink_sampleColor(u_Texture, u_ViewportSize, v_UV);
|
|
}`,yE=`attribute vec2 a_Position;
|
|
|
|
varying vec2 v_UV;
|
|
|
|
void main() {
|
|
v_UV = 0.5 * (a_Position + 1.0);
|
|
gl_Position = vec4(a_Position, 0., 1.);
|
|
}`,kM=(gE=(0,At.b2)(),gE(N_=function(n){(0,zt.Z)(a,n);var l=mE(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("ink-pass",{vs:yE,fs:IM});var u=this.shaderModuleService.getModule("ink-pass"),h=u.vs,v=u.fs,m=u.uniforms,w=this.rendererService.getViewportSize(),A=w.width,R=w.height;return{vs:h,fs:v,uniforms:(0,K.Z)((0,K.Z)({},m),{},{u_ViewportSize:[A,R]})}}}]),a}(Ov))||N_),_E,xE;function LM(n){var l=Fy();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Fy(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var PM=`varying vec2 v_UV;
|
|
|
|
uniform sampler2D u_Texture;
|
|
uniform float u_Amount : 0.5;
|
|
|
|
float rand(vec2 co) {
|
|
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
|
|
}
|
|
|
|
// https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js
|
|
vec4 noise_filterColor(vec4 color, vec2 texCoord) {
|
|
float diff = (rand(texCoord) - 0.5) * u_Amount;
|
|
color.r += diff;
|
|
color.g += diff;
|
|
color.b += diff;
|
|
return color;
|
|
}
|
|
|
|
void main() {
|
|
gl_FragColor = vec4(texture2D(u_Texture, v_UV));
|
|
gl_FragColor = noise_filterColor(gl_FragColor, v_UV);
|
|
}`,bE=`attribute vec2 a_Position;
|
|
|
|
varying vec2 v_UV;
|
|
|
|
void main() {
|
|
v_UV = 0.5 * (a_Position + 1.0);
|
|
gl_Position = vec4(a_Position, 0., 1.);
|
|
}`,OM=(_E=(0,At.b2)(),_E(xE=function(n){(0,zt.Z)(a,n);var l=LM(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"setupShaders",value:function(){return this.shaderModuleService.registerModule("noise-pass",{vs:bE,fs:PM}),this.shaderModuleService.getModule("noise-pass")}}]),a}(Ov))||xE),EE,z_;function FM(n){var l=RM();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function RM(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var wE=`attribute vec2 a_Position;
|
|
|
|
varying vec2 v_UV;
|
|
|
|
void main() {
|
|
v_UV = 0.5 * (a_Position + 1.0);
|
|
gl_Position = vec4(a_Position, 0., 1.);
|
|
}`,SE=`varying vec2 v_UV;
|
|
|
|
uniform sampler2D u_Texture;
|
|
|
|
uniform float u_Amount : 0.5;
|
|
|
|
// https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/sepia.js
|
|
vec4 sepia_filterColor(vec4 color) {
|
|
float r = color.r;
|
|
float g = color.g;
|
|
float b = color.b;
|
|
color.r =
|
|
min(1.0, (r * (1.0 - (0.607 * u_Amount))) + (g * (0.769 * u_Amount)) + (b * (0.189 * u_Amount)));
|
|
color.g = min(1.0, (r * 0.349 * u_Amount) + (g * (1.0 - (0.314 * u_Amount))) + (b * 0.168 * u_Amount));
|
|
color.b = min(1.0, (r * 0.272 * u_Amount) + (g * 0.534 * u_Amount) + (b * (1.0 - (0.869 * u_Amount))));
|
|
return color;
|
|
}
|
|
|
|
void main() {
|
|
gl_FragColor = vec4(texture2D(u_Texture, v_UV));
|
|
gl_FragColor = sepia_filterColor(gl_FragColor);
|
|
}`,DM=(EE=(0,At.b2)(),EE(z_=function(n){(0,zt.Z)(a,n);var l=FM(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"setupShaders",value:function(){return this.shaderModuleService.registerModule("sepia-pass",{vs:wE,fs:SE}),this.shaderModuleService.getModule("sepia-pass")}}]),a}(Ov))||z_),CE,Ry,AE,U_,sg,TE,BM=(CE=(0,At.b2)(),Ry=(0,At.f3)(Dt.IRendererService),AE=(0,At.zY)(),CE(U_=(sg=function(){function n(){(0,pt.Z)(this,n),Rn(this,"rendererService",TE,this),(0,W.Z)(this,"passes",[]),(0,W.Z)(this,"readFBO",void 0),(0,W.Z)(this,"writeFBO",void 0)}return(0,et.Z)(n,[{key:"getReadFBO",value:function(){return this.readFBO}},{key:"getWriteFBO",value:function(){return this.writeFBO}},{key:"getCurrentFBOTex",value:function(){var a=this.rendererService,s=a.getViewportSize,u=a.createTexture2D,h=s(),v=h.width,m=h.height;return u({x:0,y:0,width:v,height:m,copy:!0})}},{key:"getReadFBOTex",value:function(){var a=this,s=this.rendererService.useFramebuffer;return new Promise(function(u){s(a.readFBO,(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:u(a.getCurrentFBOTex());case 1:case"end":return m.stop()}},h)})))})}},{key:"renderBloomPass",value:function(){var l=(0,J.Z)(ot().mark(function s(u,h){var v,m;return ot().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,this.getReadFBOTex();case 2:v=A.sent,m=0;case 4:if(!(m<4)){A.next=11;break}return A.next=7,h.render(u,v);case 7:this.swap(),m++,A.next=4;break;case 11:case"end":return A.stop()}},s,this)}));function a(s,u){return l.apply(this,arguments)}return a}()},{key:"render",value:function(){var l=(0,J.Z)(ot().mark(function s(u){var h,v;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:h=0;case 1:if(!(h<this.passes.length)){w.next=15;break}if(v=this.passes[h],v.setRenderToScreen(this.isLastEnabledPass(h)),v.getName()!=="bloom"){w.next=9;break}return w.next=7,this.renderBloomPass(u,v);case 7:w.next=12;break;case 9:return w.next=11,v.render(u);case 11:h!==this.passes.length-1&&this.swap();case 12:h++,w.next=1;break;case 15:case"end":return w.stop()}},s,this)}));function a(s){return l.apply(this,arguments)}return a}()},{key:"resize",value:function(a,s){this.readFBO.resize({width:a,height:s}),this.writeFBO.resize({width:a,height:s})}},{key:"add",value:function(a,s,u){a.init(s,u),this.passes.push(a)}},{key:"insert",value:function(a,s,u,h){a.init(u,h),this.passes.splice(s,0,a)}},{key:"getPostProcessingPassByName",value:function(a){return this.passes.find(function(s){return s.getName()===a})}},{key:"init",value:function(){var a=this.rendererService,s=a.createFramebuffer,u=a.createTexture2D;this.readFBO=s({color:u({width:1,height:1,wrapS:ne.CLAMP_TO_EDGE,wrapT:ne.CLAMP_TO_EDGE})}),this.writeFBO=s({color:u({width:1,height:1,wrapS:ne.CLAMP_TO_EDGE,wrapT:ne.CLAMP_TO_EDGE})})}},{key:"isLastEnabledPass",value:function(a){for(var s=a+1;s<this.passes.length;s++)if(this.passes[s].isEnabled())return!1;return!0}},{key:"swap",value:function(){var a=this.readFBO;this.readFBO=this.writeFBO,this.writeFBO=a}}]),n}(),TE=Ri(sg.prototype,"rendererService",[Ry],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ri(sg.prototype,"init",[AE],Object.getOwnPropertyDescriptor(sg.prototype,"init"),sg.prototype),sg))||U_),ME,IE;function kE(n){var l=NM();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function NM(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var zM=(ME=(0,At.b2)(),ME(IE=function(n){(0,zt.Z)(a,n);var l=kE(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getType",value:function(){return Pv.Normal}},{key:"getName",value:function(){return"render"}},{key:"init",value:function(u,h){as((0,b.Z)(a.prototype),"init",this).call(this,u,h)}},{key:"render",value:function(u){var h=this.rendererService,v=h.useFramebuffer,m=h.clear,w=u.multiPassRenderer.getPostProcessor().getReadFBO();v(w,function(){m({color:[0,0,0,0],depth:1,stencil:0,framebuffer:w}),u.multiPassRenderer.setRenderFlag(!1),u.models.forEach(function(A){A.draw({uniforms:u.layerModel.getUninforms()})}),u.multiPassRenderer.setRenderFlag(!0)})}}]),a}(ky))||IE),LE,PE,OE,Dy,qg;function FE(n){var l=RE();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function RE(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var UM=`uniform float u_opacity : 1.0;
|
|
uniform float u_MixRatio : 0.5;
|
|
|
|
uniform sampler2D u_Diffuse1;
|
|
uniform sampler2D u_Diffuse2;
|
|
|
|
varying vec2 v_UV;
|
|
|
|
void main() {
|
|
vec4 texel1 = texture2D(u_Diffuse1, v_UV);
|
|
vec4 texel2 = texture2D(u_Diffuse2, v_UV);
|
|
gl_FragColor = u_opacity * mix(texel1, texel2, u_MixRatio);
|
|
}
|
|
`,DE=`varying vec2 v_UV;
|
|
|
|
uniform sampler2D u_Texture;
|
|
|
|
void main() {
|
|
gl_FragColor = vec4(texture2D(u_Texture, v_UV));
|
|
}`,BE=`attribute vec2 a_Position;
|
|
|
|
varying vec2 v_UV;
|
|
|
|
void main() {
|
|
v_UV = 0.5 * (a_Position + 1.0);
|
|
gl_Position = vec4(a_Position, 0., 1.);
|
|
}`;function NE(n,l){for(var a=0,s=1/l,u=n;u>0;)a=a+s*(u%l),u=Math.floor(u/l),s=s/l;return a}var ZM=1,VM=(LE=(0,At.b2)(),PE=(0,At.f3)(Dt.IShaderModuleService),LE(OE=(Dy=function(n){(0,zt.Z)(a,n);var l=FE(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),Rn((0,ut.Z)(s),"shaderModuleService",qg,(0,ut.Z)(s)),(0,W.Z)((0,ut.Z)(s),"haltonSequence",[]),(0,W.Z)((0,ut.Z)(s),"accumulatingId",0),(0,W.Z)((0,ut.Z)(s),"frame",0),(0,W.Z)((0,ut.Z)(s),"timer",void 0),(0,W.Z)((0,ut.Z)(s),"sampleRenderTarget",void 0),(0,W.Z)((0,ut.Z)(s),"prevRenderTarget",void 0),(0,W.Z)((0,ut.Z)(s),"outputRenderTarget",void 0),(0,W.Z)((0,ut.Z)(s),"copyRenderTarget",void 0),(0,W.Z)((0,ut.Z)(s),"blendModel",void 0),(0,W.Z)((0,ut.Z)(s),"outputModel",void 0),(0,W.Z)((0,ut.Z)(s),"copyModel",void 0),s}return(0,et.Z)(a,[{key:"getType",value:function(){return Pv.Normal}},{key:"getName",value:function(){return"taa"}},{key:"init",value:function(u,h){as((0,b.Z)(a.prototype),"init",this).call(this,u,h);var v=this.rendererService,m=v.createFramebuffer,w=v.createTexture2D;this.sampleRenderTarget=m({color:w({width:1,height:1,wrapS:ne.CLAMP_TO_EDGE,wrapT:ne.CLAMP_TO_EDGE})}),this.prevRenderTarget=m({color:w({width:1,height:1,wrapS:ne.CLAMP_TO_EDGE,wrapT:ne.CLAMP_TO_EDGE})}),this.outputRenderTarget=m({color:w({width:1,height:1,wrapS:ne.CLAMP_TO_EDGE,wrapT:ne.CLAMP_TO_EDGE})}),this.copyRenderTarget=m({color:w({width:1,height:1,wrapS:ne.CLAMP_TO_EDGE,wrapT:ne.CLAMP_TO_EDGE})});for(var A=0;A<30;A++)this.haltonSequence.push([NE(A,2),NE(A,3)]);this.blendModel=this.createTriangleModel("blend-pass",UM),this.outputModel=this.createTriangleModel("copy-pass",DE,{blend:{enable:!0,func:{srcRGB:ne.ONE,dstRGB:ne.ONE_MINUS_SRC_ALPHA,srcAlpha:ne.ONE,dstAlpha:ne.ONE_MINUS_SRC_ALPHA},equation:{rgb:ne.FUNC_ADD,alpha:ne.FUNC_ADD}}}),this.copyModel=this.createTriangleModel("copy-pass",DE)}},{key:"render",value:function(u){var h=this,v=this.rendererService,m=v.clear,w=v.getViewportSize,A=v.useFramebuffer,R=w(),B=R.width,G=R.height;this.sampleRenderTarget.resize({width:B,height:G}),this.prevRenderTarget.resize({width:B,height:G}),this.outputRenderTarget.resize({width:B,height:G}),this.copyRenderTarget.resize({width:B,height:G}),this.resetFrame(),this.stopAccumulating();var j=u.multiPassRenderer.getPostProcessor().getReadFBO();A(j,function(){m({color:[0,0,0,0],depth:1,stencil:0,framebuffer:j}),u.multiPassRenderer.setRenderFlag(!1),u.render(),u.multiPassRenderer.setRenderFlag(!0)});var lt=function ct(_t){!h.accumulatingId||_t!==h.accumulatingId||h.isFinished()||(h.doRender(u),ja.requestAnimationFrame(function(){ct(_t)}))};this.accumulatingId=ZM++,this.timer=ja.setTimeout(function(){lt(h.accumulatingId)},50)}},{key:"doRender",value:function(u){var h=this,v=this.rendererService,m=v.clear,w=v.getViewportSize,A=v.useFramebuffer,R=w(),B=R.width,G=R.height,j=u.getLayerConfig(),lt=j.jitterScale,ct=lt===void 0?1:lt,_t=this.haltonSequence[this.frame%this.haltonSequence.length];this.cameraService.jitterProjectionMatrix((_t[0]*2-1)/B*ct,(_t[1]*2-1)/G*ct),u.multiPassRenderer.setRenderFlag(!1),u.hooks.beforeRender.call(),A(this.sampleRenderTarget,function(){m({color:[0,0,0,0],depth:1,stencil:0,framebuffer:h.sampleRenderTarget}),u.render()}),u.hooks.afterRender.call(),u.multiPassRenderer.setRenderFlag(!0);var Vt=u.getLayerConfig();A(this.outputRenderTarget,function(){h.blendModel.draw({uniforms:{u_opacity:Vt.opacity||1,u_MixRatio:h.frame===0?1:.9,u_Diffuse1:h.sampleRenderTarget,u_Diffuse2:h.frame===0?u.multiPassRenderer.getPostProcessor().getReadFBO():h.prevRenderTarget}})}),this.frame===0&&m({color:[0,0,0,0],depth:1,stencil:0,framebuffer:this.copyRenderTarget}),this.frame>=1&&(A(this.copyRenderTarget,function(){h.outputModel.draw({uniforms:{u_Texture:h.outputRenderTarget}})}),A(u.multiPassRenderer.getPostProcessor().getReadFBO(),function(){h.copyModel.draw({uniforms:{u_Texture:h.copyRenderTarget}})}),u.multiPassRenderer.getPostProcessor().render(u));var ce=this.prevRenderTarget;this.prevRenderTarget=this.outputRenderTarget,this.outputRenderTarget=ce,this.frame++,this.cameraService.clearJitterProjectionMatrix()}},{key:"isFinished",value:function(){return this.frame>=this.haltonSequence.length}},{key:"resetFrame",value:function(){this.frame=0}},{key:"stopAccumulating",value:function(){this.accumulatingId=0,ja.clearTimeout(this.timer)}},{key:"createTriangleModel",value:function(u,h,v){this.shaderModuleService.registerModule(u,{vs:BE,fs:h});var m=this.shaderModuleService.getModule(u),w=m.vs,A=m.fs,R=m.uniforms,B=this.rendererService,G=B.createAttribute,j=B.createBuffer,lt=B.createModel;return lt((0,K.Z)({vs:w,fs:A,attributes:{a_Position:G({buffer:j({data:[-4,-4,4,-4,0,4],type:ne.FLOAT}),size:2})},uniforms:(0,K.Z)({},R),depth:{enable:!1},count:3},v))}}]),a}(ky),qg=Ri(Dy.prototype,"shaderModuleService",[PE],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Dy))||OE),Kg=new At.W2;Kg.bind(Dt.IGlobalConfigService).to(da).inSingletonScope(),(0,At.GW)((0,At.b2)(),be.EventEmitter),Kg.bind(Dt.IEventEmitter).to(be.EventEmitter);var zE=(0,rt.Z)(Kg,!1),Z_=function(l){var a=zE.lazyInject(l);return function(s,u,h){a.call(this,s,u),h&&(h.initializer=function(){return s[u]})}},UE=function(l){var a=zE.lazyMultiInject(l);return function(s,u,h){a.call(this,s,u),h&&(h.initializer=function(){return s[u]})}},gf=Kg,ZE=0;function GM(){var n=new At.W2;return n.parent=Kg,n.bind(Dt.SceneID).toConstantValue("".concat(ZE++)),n.bind(Dt.IShaderModuleService).to(KT).inSingletonScope(),n.bind(Dt.ILayerService).to(zg).inSingletonScope(),n.bind(Dt.ISceneService).to(RT).inSingletonScope(),n.bind(Dt.ICameraService).to(Z).inSingletonScope(),n.bind(Dt.ICoordinateSystemService).to(K0).inSingletonScope(),n.bind(Dt.IInteractionService).to(Bd).inSingletonScope(),n.bind(Dt.IPickingService).to(Ud).inSingletonScope(),n.bind(Dt.IControlService).to(er).inSingletonScope(),n.bind(Dt.IMarkerService).to(gr).inSingletonScope(),n.bind(Dt.IIconService).to(yr).inSingletonScope(),n.bind(Dt.IFontService).to(ql).inSingletonScope(),n.bind(Dt.IPopupService).to(ln).inSingletonScope(),n.bind(Dt.INormalPass).to(tM).whenTargetNamed("clear"),n.bind(Dt.INormalPass).to(L_).whenTargetNamed("pixelPicking"),n.bind(Dt.INormalPass).to(zM).whenTargetNamed("render"),n.bind(Dt.INormalPass).to(VM).whenTargetNamed("taa"),n.bind(Dt.IFactoryNormalPass).toFactory(function(l){return function(a){return l.container.getNamed(Dt.INormalPass,a)}}),n.bind(Dt.IPostProcessingPass).to(Oy).whenTargetNamed("copy"),n.bind(Dt.IPostProcessingPass).to(fM).whenTargetNamed("bloom"),n.bind(Dt.IPostProcessingPass).to(pM).whenTargetNamed("blurH"),n.bind(Dt.IPostProcessingPass).to(_O).whenTargetNamed("blurV"),n.bind(Dt.IPostProcessingPass).to(OM).whenTargetNamed("noise"),n.bind(Dt.IPostProcessingPass).to(DM).whenTargetNamed("sepia"),n.bind(Dt.IPostProcessingPass).to(_M).whenTargetNamed("colorHalftone"),n.bind(Dt.IPostProcessingPass).to(TM).whenTargetNamed("hexagonalPixelate"),n.bind(Dt.IPostProcessingPass).to(kM).whenTargetNamed("ink"),n.bind(Dt.IFactoryPostProcessingPass).toFactory(function(l){return function(a){var s=l.container.getNamed(Dt.IPostProcessingPass,a);return s.setName(a),s}}),n}function Qg(n){var l=new At.W2;return l.parent=n,l.bind(Dt.IStyleAttributeService).to(xy).inSingletonScope(),l.bind(Dt.IMultiPassRenderer).to(iM).inSingletonScope(),l.bind(Dt.IPostProcessor).to(BM).inSingletonScope(),l}var HM=null;function EO(n){return HM.indexOf(n)}var jM=2,wO=4,WM=64,SO=128,XM=256,YM=512,CO=8192,$M=16384,AO=32768,VE=null,GE=131072,TO=262144,HE=524288,MO=1048576,jE=2097152,IO=4194304,V_=8388608,qM=16777216,By=null;function Ny(n,l){return n=clamp(Math.floor(n),0,255),l=clamp(Math.floor(l),0,255),256*n+l}function kO(n){var l=n.color,a=n.radius,s=n.tileX,u=n.tileY,h=n.shape,v=n.opacity,m=n.stroke,w=n.strokeWidth,A=n.strokeOpacity,R=[],B=[],G=[],j=[Ny(l[0],l[1]),Ny(l[2],l[3])],lt=[Ny(m[0],m[1]),Ny(m[2],m[3])];return[[-1,-1],[1,-1],[1,1],[-1,1]].forEach(function(ct){var _t=_slicedToArray(ct,2),Vt=_t[0],ce=_t[1];R.push([].concat(j,[(Vt+1)*V_+(ce+1)*jE+getShapeIndex(h)*GE+a,(s+512)*HE+(u+512)*WM])),B.push([].concat(lt,[w,A])),G.push([v,0,0,0])}),{packedBuffer:R,packedBuffer2:B,packedBuffer3:G}}function LO(n,l){if(n===0&&!l)return 0;if(n===1&&l)return 4294967295;var a=l?1:0,s=Math.floor(n*127);return s*By+a*qM+s*GE+a*VE+s*YM+a*XM+s*jM+a}var dp;(function(n){n.normal="normal",n.additive="additive",n.subtractive="subtractive",n.min="min",n.max="max",n.none="none"})(dp||(dp={}));var Ns;(function(n){n.LINEAR="linear",n.SEQUENTIAL="sequential",n.POWER="power",n.LOG="log",n.IDENTITY="identity",n.TIME="time",n.QUANTILE="quantile",n.QUANTIZE="quantize",n.THRESHOLD="threshold",n.CAT="cat",n.DIVERGING="diverging"})(Ns||(Ns={}));var Qp;(function(n){n.CONSTANT="constant",n.VARIABLE="variable"})(Qp||(Qp={}));var ea;(function(n){n[n.Attribute=0]="Attribute",n[n.InstancedAttribute=1]="InstancedAttribute",n[n.Uniform=2]="Uniform"})(ea||(ea={}));var vp;(function(n){n.IMAGE="image",n.ARRAYBUFFER="arraybuffer",n.RGB="rgb",n.CUSTOMRGB="customRGB",n.CUSTOMARRAYBUFFER="customArrayBuffer"})(vp||(vp={}));var G_=["mapload","mapchange","mapAfterFrameChange"],E0={ProjectionMatrix:"u_ProjectionMatrix",ViewMatrix:"u_ViewMatrix",ViewProjectionMatrix:"u_ViewProjectionMatrix",Zoom:"u_Zoom",ZoomScale:"u_ZoomScale",FocalDistance:"u_FocalDistance",CameraPosition:"u_CameraPosition"},zy=["loaded","fontloaded","maploaded","resize","destroy","dragstart","dragging","dragend","dragcancel"];function KM(n){var l=QM();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function QM(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Uy=function(n){(0,zt.Z)(a,n);var l=KM(a);function a(s){var u;return(0,pt.Z)(this,a),u=l.call(this),(0,W.Z)((0,ut.Z)(u),"added",!1),(0,W.Z)((0,ut.Z)(u),"eventHandle",function(h){u.emit(h.type,{target:h,data:u.markerOption.extData,lngLat:u.lngLat})}),u.markerOption=(0,K.Z)((0,K.Z)({},u.getDefault()),s),Iu(["update","onMove","onMapClick"],(0,ut.Z)(u)),u.init(),u}return(0,et.Z)(a,[{key:"getMarkerLayerContainerSize",value:function(){}},{key:"getDefault",value:function(){return{element:void 0,anchor:Eo.BOTTOM,offsets:[0,0],color:"#5B8FF9",draggable:!1}}},{key:"addTo",value:function(u){this.scene=u,this.mapsService=u.get(Dt.IMapService),this.sceneSerive=u.get(Dt.ISceneService);var h=this.markerOption.element;return this.mapsService.getMarkerContainer().appendChild(h),this.registerMarkerEvent(h),this.mapsService.on("camerachange",this.update),this.mapsService.on("viewchange",this.update),this.update(),this.added=!0,this.emit("added"),this}},{key:"remove",value:function(){this.mapsService&&(this.mapsService.off("click",this.onMapClick),this.mapsService.off("move",this.update),this.mapsService.off("moveend",this.update)),this.unRegisterMarkerEvent(),this.removeAllListeners();var u=this.markerOption.element;return u&&Mu(u),this.popup&&this.popup.remove(),this}},{key:"setLnglat",value:function(u){return this.lngLat=u,Array.isArray(u)&&(this.lngLat={lng:u[0],lat:u[1]}),this.popup&&this.popup.setLnglat(this.lngLat),this.update(),this}},{key:"getLnglat",value:function(){return this.lngLat}},{key:"getElement",value:function(){return this.markerOption.element}},{key:"setElement",value:function(u){var h=this;if(!this.added)return this.once("added",function(){h.setElement(u)}),this;var v=this.markerOption.element;return v&&Mu(v),this.markerOption.element=u,this.init(),this.mapsService.getMarkerContainer().appendChild(u),this.registerMarkerEvent(u),this.update(),this}},{key:"openPopup",value:function(){var u=this;if(!this.added)return this.once("added",function(){u.openPopup()}),this;var h=this.popup;return h?(h.isOpen()||h.addTo(this.scene),this):this}},{key:"closePopup",value:function(){var u=this;this.added||this.once("added",function(){u.closePopup()});var h=this.popup;return h&&h.remove(),this}},{key:"setPopup",value:function(u){return this.popup=u,this.lngLat&&this.popup.setLnglat(this.lngLat),this}},{key:"togglePopup",value:function(){var u=this.popup;if(u)u.isOpen()?u.remove():u.addTo(this.scene);else return this;return this}},{key:"getPopup",value:function(){return this.popup}},{key:"getOffset",value:function(){return this.markerOption.offsets}},{key:"setDraggable",value:function(u){throw new Error("Method not implemented.")}},{key:"isDraggable",value:function(){return this.markerOption.draggable}},{key:"getExtData",value:function(){return this.markerOption.extData}},{key:"setExtData",value:function(u){this.markerOption.extData=u}},{key:"update",value:function(){if(this.mapsService){var u=this.markerOption,h=u.element,v=u.anchor;this.updatePosition(),dh(h,"".concat(So[v]))}}},{key:"onMapClick",value:function(u){var h=this.markerOption.element;this.popup&&h&&this.togglePopup()}},{key:"getCurrentContainerSize",value:function(){var u=this.mapsService.getContainer();return{containerHeight:(u==null?void 0:u.scrollHeight)||0,containerWidth:(u==null?void 0:u.scrollWidth)||0,bounds:this.mapsService.getBounds()}}},{key:"updatePosition",value:function(){if(this.mapsService){var u=this.markerOption,h=u.element,v=u.offsets,m=this.lngLat,w=m.lng,A=m.lat,R=this.mapsService.lngLatToContainer([w,A]);if(h){h.style.display="block",h.style.whiteSpace="nowrap";var B=this.getMarkerLayerContainerSize()||this.getCurrentContainerSize(),G=B.containerHeight,j=B.containerWidth,lt=B.bounds;if(!lt)return;if(Math.abs(lt[0][0])>180||Math.abs(lt[1][0])>180){if(R.x>j){var ct=this.mapsService.lngLatToContainer([w-360,A]);R.x=ct.x}if(R.x<0){var _t=this.mapsService.lngLatToContainer([w+360,A]);R.x=_t.x}}(R.x>j||R.x<0||R.y>G||R.y<0)&&(h.style.display="none"),h.style.left=R.x+v[0]+"px",h.style.top=R.y-v[1]+"px"}}}},{key:"init",value:function(){var u=this,h=this.markerOption.element,v=this.markerOption,m=v.color,w=v.anchor;if(!h){this.defaultMarker=!0,h=so("div"),this.markerOption.element=h;var A=document.createElementNS("http://www.w3.org/2000/svg","svg");A.setAttributeNS(null,"display","block"),A.setAttributeNS(null,"height","48px"),A.setAttributeNS(null,"width","48px"),A.setAttributeNS(null,"viewBox","0 0 1024 1024");var R=document.createElementNS("http://www.w3.org/2000/svg","path");R.setAttributeNS(null,"d","M512 490.666667C453.12 490.666667 405.333333 442.88 405.333333 384 405.333333 325.12 453.12 277.333333 512 277.333333 570.88 277.333333 618.666667 325.12 618.666667 384 618.666667 442.88 570.88 490.666667 512 490.666667M512 85.333333C346.88 85.333333 213.333333 218.88 213.333333 384 213.333333 608 512 938.666667 512 938.666667 512 938.666667 810.666667 608 810.666667 384 810.666667 218.88 677.12 85.333333 512 85.333333Z"),R.setAttributeNS(null,"fill",m),A.appendChild(R),h.appendChild(A)}Po(h,"l7-marker"),Object.keys(this.markerOption.style||{}).forEach(function(B){var G,j,lt=((G=u.markerOption)===null||G===void 0?void 0:G.style)&&((j=u.markerOption)===null||j===void 0?void 0:j.style[B]);h&&(h.style[B]=lt)}),h.addEventListener("click",function(B){u.onMapClick(B)}),h.addEventListener("click",this.eventHandle),ro(h,w,"marker")}},{key:"registerMarkerEvent",value:function(u){u.addEventListener("mousemove",this.eventHandle),u.addEventListener("click",this.eventHandle),u.addEventListener("mousedown",this.eventHandle),u.addEventListener("mouseup",this.eventHandle),u.addEventListener("dblclick",this.eventHandle),u.addEventListener("contextmenu",this.eventHandle),u.addEventListener("mouseover",this.eventHandle),u.addEventListener("mouseout",this.eventHandle)}},{key:"unRegisterMarkerEvent",value:function(){var u=this.getElement();u.removeEventListener("mousemove",this.eventHandle),u.removeEventListener("click",this.eventHandle),u.removeEventListener("mousedown",this.eventHandle),u.removeEventListener("mouseup",this.eventHandle),u.removeEventListener("dblclick",this.eventHandle),u.removeEventListener("contextmenu",this.eventHandle),u.removeEventListener("mouseover",this.eventHandle),u.removeEventListener("mouseout",this.eventHandle)}},{key:"addDragHandler",value:function(u){return null}},{key:"onUp",value:function(u){throw new Error("Method not implemented.")}}]),a}(be.EventEmitter),WE=nt(39720),H_=nt.n(WE);function JM(n){var l=t3();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function t3(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var XE=function(n){(0,zt.Z)(a,n);var l=JM(a);function a(s){var u,h;return(0,pt.Z)(this,a),h=l.call(this),(0,W.Z)((0,ut.Z)(h),"markers",[]),(0,W.Z)((0,ut.Z)(h),"points",[]),(0,W.Z)((0,ut.Z)(h),"clusterMarkers",[]),h.markerLayerOption=(0,Fn.merge)(h.getDefault(),s),Iu(["update"],(0,ut.Z)(h)),h.zoom=((u=h.markerLayerOption.clusterOption)===null||u===void 0?void 0:u.zoom)||-99,h}return(0,et.Z)(a,[{key:"getDefault",value:function(){return{cluster:!1,clusterOption:{radius:80,maxZoom:20,minZoom:0,zoom:-99,style:{},className:""}}}},{key:"addTo",value:function(u){return this.scene=u,this.mapsService=u.get(Dt.IMapService),this.markerLayerOption.cluster&&(this.initCluster(),this.update(),this.mapsService.on("camerachange",this.update),this.mapsService.on("viewchange",this.update)),this.mapsService.on("camerachange",this.setContainerSize.bind(this)),this.mapsService.on("viewchange",this.setContainerSize.bind(this)),this.addMarkers(),this.inited=!0,this}},{key:"setContainerSize",value:function(){if(this.mapsService){var u=this.mapsService.getContainer();this.containerSize={containerWidth:(u==null?void 0:u.scrollWidth)||0,containerHeight:(u==null?void 0:u.scrollHeight)||0,bounds:this.mapsService.getBounds()}}}},{key:"getContainerSize",value:function(){return this.containerSize}},{key:"addMarker",value:function(u){var h=this.markerLayerOption.cluster;if(u.getMarkerLayerContainerSize=this.getContainerSize.bind(this),h&&(this.addPoint(u,this.markers.length),this.mapsService)){var v=this.mapsService.getZoom(),m=this.mapsService.getBounds();this.bbox=Ut(m,.5),this.zoom=Math.floor(v),this.getClusterMarker(this.bbox,this.zoom)}this.markers.push(u)}},{key:"removeMarker",value:function(u){this.markers.indexOf(u);var h=this.markers.indexOf(u);h>-1&&this.markers.splice(h,1)}},{key:"hide",value:function(){this.markers.map(function(u){u.getElement().style.opacity="0"}),this.clusterMarkers.map(function(u){u.getElement().style.opacity="0"})}},{key:"show",value:function(){this.markers.map(function(u){u.getElement().style.opacity="1"}),this.clusterMarkers.map(function(u){u.getElement().style.opacity="1"})}},{key:"getMarkers",value:function(){var u=this.markerLayerOption.cluster;return u?this.clusterMarkers:this.markers}},{key:"addMarkers",value:function(){var u=this;this.getMarkers().forEach(function(h){h.addTo(u.scene)})}},{key:"clear",value:function(){this.markers.forEach(function(u){u.remove()}),this.clusterMarkers.forEach(function(u){u.remove()}),this.markers=[],this.points=[],this.clusterMarkers=[]}},{key:"destroy",value:function(){this.clear(),this.removeAllListeners(),this.mapsService.off("camerachange",this.update),this.mapsService.off("viewchange",this.update),this.mapsService.off("camerachange",this.setContainerSize.bind(this)),this.mapsService.off("viewchange",this.setContainerSize.bind(this))}},{key:"addPoint",value:function(u,h){var v=u.getLnglat(),m=v.lng,w=v.lat,A={geometry:{type:"Point",coordinates:[m,w]},properties:(0,K.Z)((0,K.Z)({},u.getExtData()),{},{marker_id:h})};this.points.push(A),this.clusterIndex&&this.clusterIndex.load(this.points)}},{key:"initCluster",value:function(){if(this.markerLayerOption.cluster){var u=this.markerLayerOption.clusterOption,h=u.radius,v=u.minZoom,m=v===void 0?0:v,w=u.maxZoom;this.clusterIndex=new(H_())({radius:h,minZoom:m,maxZoom:w}),this.clusterIndex.load(this.points)}}},{key:"getClusterMarker",value:function(u,h){var v=this,m=u[0].concat(u[1]),w=this.clusterIndex.getClusters(m,h);this.clusterMarkers.forEach(function(A){A.remove()}),this.clusterMarkers=[],w.forEach(function(A){var R,B=v.markerLayerOption.clusterOption,G=B.field,j=B.method;if((R=A.properties)!==null&&R!==void 0&&R.cluster_id){var lt,ct=v.getLeaves((lt=A.properties)===null||lt===void 0?void 0:lt.cluster_id);if(A.properties.clusterData=ct,G&&j){var _t=ct==null?void 0:ct.map(function($e){var xr=(0,W.Z)({},G,$e.properties[G]);return xr}),Vt=oc(_t,G),ce=rl(j,Vt),ae="point_"+j;A.properties[ae]=ce.toFixed(2)}}var ze=v.clusterMarker(A);v.clusterMarkers.push(ze),ze.addTo(v.scene)})}},{key:"getLeaves",value:function(u){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1/0,v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return u?this.clusterIndex.getLeaves(u,h,v):null}},{key:"clusterMarker",value:function(u){var h=this.markerLayerOption.clusterOption,v=h,m=v.element,w=m===void 0?this.generateElement.bind(this):m,A=new Uy({element:w(u)}).setLnglat({lng:u.geometry.coordinates[0],lat:u.geometry.coordinates[1]});return A}},{key:"normalMarker",value:function(u){var h=u.properties.marker_id;return this.markers[h]}},{key:"update",value:function(){if(this.mapsService&&this.markers.length!==0){var u=this.mapsService.getZoom(),h=this.mapsService.getBounds();(!this.bbox||Math.abs(u-this.zoom)>=1||!re(this.bbox,h))&&(this.bbox=Ut(h,.5),this.zoom=Math.floor(u),this.getClusterMarker(this.bbox,this.zoom))}}},{key:"generateElement",value:function(u){var h=so("div","l7-marker-cluster"),v=so("div","",h),m=so("span","",v),w=this.markerLayerOption.clusterOption,A=w.field,R=w.method;u.properties.point_count=u.properties.point_count||1;var B=A&&R?u.properties["point_"+R]||u.properties[A]:u.properties.point_count;return m.textContent=B,h}}]),a}(be.EventEmitter),PO=nt(14827);function e3(n){var l=Xd();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Xd(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Yd=function(n){(0,zt.Z)(a,n);var l=e3(a);function a(s){var u;return(0,pt.Z)(this,a),u=l.call(this),a.controlCount++,u.controlOption=(0,K.Z)((0,K.Z)({},u.getDefault(s)),s||{}),u}return(0,et.Z)(a,[{key:"getOptions",value:function(){return this.controlOption}},{key:"setOptions",value:function(u){var h=this.getDefault(u);Object.entries(u).forEach(function(v){var m=(0,yt.Z)(v,2),w=m[0],A=m[1];A===void 0&&(u[w]=h[w])}),"position"in u&&this.setPosition(u.position),"className"in u&&this.setClassName(u.className),"style"in u&&this.setStyle(u.style),this.controlOption=(0,K.Z)((0,K.Z)({},this.controlOption),u)}},{key:"addTo",value:function(u){this.mapsService=u.get(Dt.IMapService),this.renderService=u.get(Dt.IRendererService),this.layerService=u.get(Dt.ILayerService),this.controlService=u.get(Dt.IControlService),this.configService=u.get(Dt.IGlobalConfigService),this.scene=u.get(Dt.ISceneService),this.sceneContainer=u,this.isShow=!0,this.container=this.onAdd(),Po(this.container,"l7-control");var h=this.controlOption,v=h.className,m=h.style;return v&&this.setClassName(v),m&&this.setStyle(m),this.insertContainer(),this.emit("add",this),this}},{key:"remove",value:function(){if(!this.mapsService)return this;Mu(this.container),this.onRemove(),this.emit("remove",this)}},{key:"onAdd",value:function(){return so("div")}},{key:"onRemove",value:function(){}},{key:"show",value:function(){var u=this.container;jl(u,"l7-control--hide"),this.isShow=!0,this.emit("show",this)}},{key:"hide",value:function(){var u=this.container;Po(u,"l7-control--hide"),this.isShow=!1,this.emit("hide",this)}},{key:"getDefault",value:function(u){return{position:q.TOPRIGHT,name:"".concat(a.controlCount)}}},{key:"getContainer",value:function(){return this.container}},{key:"getIsShow",value:function(){return this.isShow}},{key:"_refocusOnMap",value:function(u){if(this.mapsService&&u&&u.screenX>0&&u.screenY>0){var h=this.mapsService.getContainer();h!==null&&h.focus()}}},{key:"setPosition",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:q.TOPLEFT,h=this.controlService;return h&&h.removeControl(this),this.controlOption.position=u,h&&h.addControl(this,this.sceneContainer),this}},{key:"setClassName",value:function(u){var h=this.container,v=this.controlOption.className;v&&jl(h,v),u&&Po(h,u)}},{key:"setStyle",value:function(u){var h=this.container;u?h.setAttribute("style",u):h.removeAttribute("style")}},{key:"insertContainer",value:function(){var u=this.controlOption.position,h=this.container;if(u instanceof Element)u.appendChild(h);else{var v=this.controlService.controlCorners[u];u.indexOf("bottom")!==-1?v.insertBefore(h,v.firstChild):v.appendChild(h)}}},{key:"checkUpdateOption",value:function(u,h){return h.some(function(v){return v in u})}}]),a}(Me());(0,W.Z)(Yd,"controlCount",0);function r3(n){var l=n3();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function n3(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Zy=function(n){(0,zt.Z)(a,n);var l=r3(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"isDisable",!1),s}return(0,et.Z)(a,[{key:"setIsDisable",value:function(u){if(this.isDisable=u,u){var h;(h=this.button)===null||h===void 0||h.setAttribute("disabled","true")}else{var v;(v=this.button)===null||v===void 0||v.removeAttribute("disabled")}}},{key:"createButton",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return so("button","l7-button-control ".concat(u))}},{key:"onAdd",value:function(){this.button=this.createButton(),this.isDisable=!1;var u=this.controlOption,h=u.title,v=u.btnText,m=u.btnIcon;return this.setBtnTitle(h),this.setBtnText(v),this.setBtnIcon(m),this.button}},{key:"onRemove",value:function(){this.button=this.buttonIcon=this.buttonText=void 0,this.isDisable=!1}},{key:"setOptions",value:function(u){var h=u.title,v=u.btnText,m=u.btnIcon;this.checkUpdateOption(u,["title"])&&this.setBtnTitle(h),this.checkUpdateOption(u,["btnIcon"])&&this.setBtnIcon(m),this.checkUpdateOption(u,["btnText"])&&this.setBtnText(v),as((0,b.Z)(a.prototype),"setOptions",this).call(this,u)}},{key:"setBtnTitle",value:function(u){var h;(h=this.button)===null||h===void 0||h.setAttribute("title",u!=null?u:"")}},{key:"setBtnIcon",value:function(u){if(this.buttonIcon&&Mu(this.buttonIcon),u){var h,v=(h=this.button)===null||h===void 0?void 0:h.firstChild;if(v){var m;(m=this.button)===null||m===void 0||m.insertBefore(u,v)}else{var w;(w=this.button)===null||w===void 0||w.appendChild(u)}this.buttonIcon=u}}},{key:"setBtnText",value:function(u){if(this.button)if(jl(this.button,"l7-button-control--row"),jl(this.button,"l7-button-control--column"),u){var h=this.buttonText;if(!h){var v;h=so("div","l7-button-control__text"),(v=this.button)===null||v===void 0||v.appendChild(h),this.buttonText=h}h.innerText=u,Po(this.button,this.controlOption.vertical?"l7-button-control--column":"l7-button-control--row")}else!u&&this.buttonText&&(Mu(this.buttonText),this.buttonText=void 0)}}]),a}(Yd);function i3(n){var l=a3();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function a3(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var YE=function(n){(0,zt.Z)(a,n);var l=i3(a);function a(s,u){var h;return(0,pt.Z)(this,a),h=l.call(this),(0,W.Z)((0,ut.Z)(h),"isShow",!1),(0,W.Z)((0,ut.Z)(h),"timeout",null),(0,W.Z)((0,ut.Z)(h),"show",function(){return h.isShow||!h.contentDOM.innerHTML||(h.resetPopperPosition(),jl(h.popperDOM,"l7-popper-hide"),h.isShow=!0,h.option.unique&&a.conflictPopperList.forEach(function(v){v!==(0,ut.Z)(h)&&v.isShow&&v.hide()}),h.emit("show")),(0,ut.Z)(h)}),(0,W.Z)((0,ut.Z)(h),"hide",function(){return h.isShow&&(Po(h.popperDOM,"l7-popper-hide"),h.isShow=!1,h.emit("hide")),(0,ut.Z)(h)}),(0,W.Z)((0,ut.Z)(h),"setHideTimeout",function(){h.timeout||(h.timeout=window.setTimeout(function(){h.isShow&&(h.hide(),h.timeout=null)},300))}),(0,W.Z)((0,ut.Z)(h),"clearHideTimeout",function(){h.timeout&&(window.clearTimeout(h.timeout),h.timeout=null)}),(0,W.Z)((0,ut.Z)(h),"onBtnClick",function(){h.isShow?h.hide():h.show()}),(0,W.Z)((0,ut.Z)(h),"onBtnMouseLeave",function(){h.setHideTimeout()}),(0,W.Z)((0,ut.Z)(h),"onBtnMouseMove",function(){h.clearHideTimeout(),!h.isShow&&h.show()}),h.button=s,h.option=u,h.init(),u.unique&&a.conflictPopperList.push((0,ut.Z)(h)),h}return(0,et.Z)(a,[{key:"buttonRect",get:function(){return this.button.getBoundingClientRect()}},{key:"getPopperDOM",value:function(){return this.popperDOM}},{key:"getIsShow",value:function(){return this.isShow}},{key:"getContent",value:function(){return this.content}},{key:"setContent",value:function(u){typeof u=="string"?this.contentDOM.innerHTML=u:u instanceof HTMLElement&&(vs(this.contentDOM),this.contentDOM.appendChild(u)),this.content=u}},{key:"init",value:function(){var u=this.option.trigger;this.popperDOM=this.createPopper(),u==="click"?this.button.addEventListener("click",this.onBtnClick):(this.button.addEventListener("mousemove",this.onBtnMouseMove),this.button.addEventListener("mouseleave",this.onBtnMouseLeave),this.popperDOM.addEventListener("mousemove",this.onBtnMouseMove),this.popperDOM.addEventListener("mouseleave",this.onBtnMouseLeave))}},{key:"destroy",value:function(){this.button.removeEventListener("click",this.onBtnClick),this.button.removeEventListener("mousemove",this.onBtnMouseMove),this.button.removeEventListener("mousemove",this.onBtnMouseLeave),this.popperDOM.removeEventListener("mousemove",this.onBtnMouseMove),this.popperDOM.removeEventListener("mouseleave",this.onBtnMouseLeave),Mu(this.popperDOM)}},{key:"resetPopperPosition",value:function(){var u={},h=this.option,v=h.container,m=h.offset,w=m===void 0?[0,0]:m,A=h.placement,R=(0,yt.Z)(w,2),B=R[0],G=R[1],j=this.button.getBoundingClientRect(),lt=v.getBoundingClientRect(),ct=jf(j,lt),_t=ct.left,Vt=ct.right,ce=ct.top,ae=ct.bottom,ze=!1,$e=!1;/^(left|right)/.test(A)?(A.includes("left")?u.right="".concat(j.width+Vt,"px"):A.includes("right")&&(u.left="".concat(j.width+_t,"px")),A.includes("start")?u.top="".concat(ce,"px"):A.includes("end")?u.bottom="".concat(ae,"px"):(u.top="".concat(ce+j.height/2,"px"),$e=!0,u.transform="translate(".concat(B,"px, calc(").concat(G,"px - 50%))"))):/^(top|bottom)/.test(A)&&(A.includes("top")?u.bottom="".concat(j.height+ae,"px"):A.includes("bottom")&&(u.top="".concat(j.height+ce,"px")),A.includes("start")?u.left="".concat(_t,"px"):A.includes("end")?u.right="".concat(Vt,"px"):(u.left="".concat(_t+j.width/2,"px"),ze=!0,u.transform="translate(calc(".concat(B,"px - 50%), ").concat(G,"px)"))),u.transform="translate(calc(".concat(B,"px - ").concat(ze?"50%":"0%","), calc(").concat(G,"px - ").concat($e?"50%":"0%",")");var xr=A.split("-");xr.length&&Po(this.popperDOM,xr.map(function(Or){return"l7-popper-".concat(Or)}).join(" ")),vh(this.popperDOM,ou(u))}},{key:"createPopper",value:function(){var u=this.option,h=u.container,v=u.className,m=v===void 0?"":v,w=u.content,A=so("div","l7-popper l7-popper-hide ".concat(m)),R=so("div","l7-popper-content"),B=so("div","l7-popper-arrow");return A.appendChild(R),A.appendChild(B),h.appendChild(A),this.popperDOM=A,this.contentDOM=R,w&&this.setContent(w),A}}]),a}(be.EventEmitter);(0,W.Z)(YE,"conflictPopperList",[]);function o3(n){var l=s3();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function s3(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var u3={topleft:"right-start",topcenter:"bottom",topright:"left-start",bottomleft:"right-end",bottomcenter:"top",bottomright:"left-end",lefttop:"bottom-start",leftcenter:"right",leftbottom:"top-start",righttop:"bottom-end",rightcenter:"left",rightbottom:"top-end"},l3=function(n){(0,zt.Z)(a,n);var l=o3(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getPopper",value:function(){return this.popper}},{key:"hide",value:function(){this.popper.hide(),as((0,b.Z)(a.prototype),"hide",this).call(this)}},{key:"getDefault",value:function(u){var h,v=as((0,b.Z)(a.prototype),"getDefault",this).call(this,u),m=(h=u==null?void 0:u.position)!==null&&h!==void 0?h:v.position;return(0,K.Z)((0,K.Z)({},as((0,b.Z)(a.prototype),"getDefault",this).call(this,u)),{},{popperPlacement:m instanceof Element?"bottom":u3[m],popperTrigger:"click"})}},{key:"onAdd",value:function(){var u=as((0,b.Z)(a.prototype),"onAdd",this).call(this);return this.initPopper(),u}},{key:"onRemove",value:function(){this.popper.destroy()}},{key:"initPopper",value:function(){var u=this,h=this.controlOption,v=h.popperClassName,m=h.popperPlacement,w=h.popperTrigger,A=this.mapsService.getMapContainer();return this.popper=new YE(this.button,{className:v,placement:m,trigger:w,container:A,unique:!0}),this.popper.on("show",function(){u.emit("popperShow",u)}).on("hide",function(){u.emit("popperHide",u)}),this.popper}},{key:"setOptions",value:function(u){if(as((0,b.Z)(a.prototype),"setOptions",this).call(this,u),this.checkUpdateOption(u,["popperPlacement","popperTrigger","popperClassName"])){var h=this.popper.getContent();this.popper.destroy(),this.initPopper(),this.popper.setContent(h)}}}]),a}(Zy);function c3(n){var l=f3();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function f3(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Jp;(function(n){n.ActiveOptionClassName="l7-select-control-item-active",n.OptionValueAttrKey="data-option-value",n.OptionIndexAttrKey="data-option-index"})(Jp||(Jp={}));var $E=function(n){(0,zt.Z)(a,n);var l=c3(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"selectValue",[]),(0,W.Z)((0,ut.Z)(s),"createNormalOption",function(m){var w=s.selectValue.includes(m.value),A=so("div","l7-select-control-item ".concat(w?Jp.ActiveOptionClassName:""));s.getIsMultiple()&&A.appendChild(s.createCheckbox(w)),m.icon&&A.appendChild(m.icon);var R=so("span");return R.innerText=m.text,A.appendChild(R),A}),(0,W.Z)((0,ut.Z)(s),"onItemClick",function(m){if(s.getIsMultiple()){var w=s.selectValue.findIndex(function(A){return A===m.value});w>-1?s.selectValue.splice(w,1):s.selectValue=[].concat((0,Oi.Z)(s.selectValue),[m.value])}else s.selectValue=[m.value];s.setSelectValue(s.selectValue)}),s}return(0,et.Z)(a,[{key:"setOptions",value:function(u){as((0,b.Z)(a.prototype),"setOptions",this).call(this,u);var h=u.options;h&&this.popper.setContent(this.getPopperContent(h))}},{key:"onAdd",value:function(){var u=as((0,b.Z)(a.prototype),"onAdd",this).call(this),h=this.controlOption.defaultValue;return h&&(this.selectValue=this.transSelectValue(h)),this.popper.setContent(this.getPopperContent(this.controlOption.options)),u}},{key:"getSelectValue",value:function(){return this.getIsMultiple()?this.selectValue:this.selectValue[0]}},{key:"setSelectValue",value:function(u){var h=this,v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,m=this.transSelectValue(u);this.optionDOMList.forEach(function(w){var A=w.getAttribute(Jp.OptionValueAttrKey),R=h.getIsMultiple()?w.querySelector("input[type=checkbox]"):void 0;m.includes(A)?(Po(w,Jp.ActiveOptionClassName),R&&Mf(R,!0)):(jl(w,Jp.ActiveOptionClassName),R&&Mf(R,!1))}),this.selectValue=m,v&&this.emit("selectChange",this.getIsMultiple()?m:m[0])}},{key:"getIsMultiple",value:function(){return!1}},{key:"getPopperContent",value:function(u){var h=this,v=this.isImageOptions(),m=so("div",v?"l7-select-control--image":"l7-select-control--normal");this.getIsMultiple()&&Po(m,"l7-select-control--multiple");var w=u.map(function(A,R){var B=v?h.createImageOption(A):h.createNormalOption(A);return B.setAttribute(Jp.OptionValueAttrKey,A.value),B.setAttribute(Jp.OptionIndexAttrKey,window.String(R)),B.addEventListener("click",h.onItemClick.bind(h,A)),B});return m.append.apply(m,(0,Oi.Z)(w)),this.optionDOMList=w,m}},{key:"createImageOption",value:function(u){var h=this.selectValue.includes(u.value),v=so("div","l7-select-control-item ".concat(h?Jp.ActiveOptionClassName:"")),m=so("img");m.setAttribute("src",u.img),Hi(m),v.appendChild(m);var w=so("div","l7-select-control-item-row");this.getIsMultiple()&&v.appendChild(this.createCheckbox(h));var A=so("span");return A.innerText=u.text,w.appendChild(A),v.appendChild(w),v}},{key:"createCheckbox",value:function(u){var h=so("input");return h.setAttribute("type","checkbox"),u&&Mf(h,!0),h}},{key:"isImageOptions",value:function(){return!!this.controlOption.options.find(function(u){return u.img})}},{key:"transSelectValue",value:function(u){return Array.isArray(u)?u:[u]}}]),a}(l3);function Vy(n){var l=Gy();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Gy(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var h3=function(n){(0,zt.Z)(a,n);var l=Vy(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getDefault",value:function(){return{position:q.BOTTOMLEFT,name:"logo",href:"https://l7.antv.antgroup.com/",img:"https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*GRb1TKp4HcMAAAAAAAAAAAAAARQnAQ"}}},{key:"onAdd",value:function(){var u=so("div","l7-control-logo");return this.setLogoContent(u),u}},{key:"onRemove",value:function(){return null}},{key:"setOptions",value:function(u){as((0,b.Z)(a.prototype),"setOptions",this).call(this,u),this.checkUpdateOption(u,["img","href"])&&(vs(this.container),this.setLogoContent(this.container))}},{key:"setLogoContent",value:function(u){var h=this.controlOption,v=h.href,m=h.img,w=so("img");if(w.setAttribute("src",m),w.setAttribute("aria-label","AntV logo"),Hi(w),v){var A=so("a","l7-control-logo-link");A.target="_blank",A.href=v,A.rel="noopener nofollow",A.setAttribute("rel","noopener nofollow"),A.appendChild(w),u.appendChild(A)}else u.appendChild(w)}}]),a}(Yd),$d=function(l){var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("l7-iconfont"),a.setAttribute("aria-hidden","true");var s=document.createElementNS("http://www.w3.org/2000/svg","use");return s.setAttributeNS("http://www.w3.org/1999/xlink","href","#".concat(l)),a.appendChild(s),a};function j_(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=Hy(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,u=function(){};return{s:u,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function Hy(n,l){if(n){if(typeof n=="string")return jy(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return jy(n,l)}}function jy(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a<l;a++)s[a]=n[a];return s}var W_=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Hc=function(){if(typeof document=="undefined")return!1;var n=W_[0],l={},a=j_(W_),s;try{for(a.s();!(s=a.n()).done;){var u=s.value,h=u==null?void 0:u[1];if(h in document){var v=j_(u.entries()),m;try{for(v.s();!(m=v.n()).done;){var w=(0,yt.Z)(m.value,2),A=w[0],R=w[1];l[n[A]]=R}}catch(B){v.e(B)}finally{v.f()}return l}}}catch(B){a.e(B)}finally{a.f()}return!1}(),X_={change:Hc.fullscreenchange,error:Hc.fullscreenerror},uh={request:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document.documentElement,a=arguments.length>1?arguments[1]:void 0;return new Promise(function(s,u){var h=function m(){uh.off("change",m),s()};uh.on("change",h);var v=l[Hc.requestFullscreen](a);v instanceof Promise&&v.then(h).catch(u)})},exit:function(){return new Promise(function(l,a){if(!uh.isFullscreen){l();return}var s=function h(){uh.off("change",h),l()};uh.on("change",s);var u=document[Hc.exitFullscreen]();u instanceof Promise&&u.then(s).catch(a)})},toggle:function(l,a){return uh.isFullscreen?uh.exit():uh.request(l,a)},onchange:function(l){uh.on("change",l)},onerror:function(l){uh.on("error",l)},on:function(l,a){var s=X_[l];s&&document.addEventListener(s,a,!1)},off:function(l,a){var s=X_[l];s&&document.removeEventListener(s,a,!1)},raw:Hc};Object.defineProperties(uh,{isFullscreen:{get:function(){return Boolean(document[Hc.fullscreenElement])}},element:{enumerable:!0,get:function(){var l;return(l=document[Hc.fullscreenElement])!==null&&l!==void 0?l:void 0}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[Hc.fullscreenEnabled])}}}),Hc||(uh={isEnabled:!1});var Y_=uh;function Fv(n){var l=p3();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function p3(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var v3=function(n){(0,zt.Z)(a,n);var l=Fv(a);function a(s){var u;return(0,pt.Z)(this,a),u=l.call(this,s),(0,W.Z)((0,ut.Z)(u),"isFullscreen",!1),(0,W.Z)((0,ut.Z)(u),"toggleFullscreen",(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(!Y_.isEnabled){m.next=3;break}return m.next=3,Y_.toggle(u.mapContainer);case 3:case"end":return m.stop()}},h)}))),(0,W.Z)((0,ut.Z)(u),"onClick",function(){u.toggleFullscreen()}),(0,W.Z)((0,ut.Z)(u),"onFullscreenChange",function(){u.isFullscreen=!!document.fullscreenElement;var h=u.controlOption,v=h.btnText,m=h.btnIcon,w=h.title,A=h.exitBtnText,R=h.exitBtnIcon,B=h.exitTitle;u.isFullscreen?(u.setBtnTitle(B),u.setBtnText(A),u.setBtnIcon(R)):(u.setBtnTitle(w),u.setBtnText(v),u.setBtnIcon(m)),u.emit("fullscreenChange",u.isFullscreen)}),Y_.isEnabled||console.warn("\u5F53\u524D\u6D4F\u89C8\u5668\u73AF\u5883\u4E0D\u652F\u6301\u5BF9\u5730\u56FE\u5168\u5C4F\u5316"),u}return(0,et.Z)(a,[{key:"setOptions",value:function(u){var h=u.exitBtnText,v=u.exitBtnIcon,m=u.exitTitle;this.isFullscreen&&(this.checkUpdateOption(u,["exitBtnIcon"])&&this.setBtnIcon(v),this.checkUpdateOption(u,["exitBtnText"])&&this.setBtnText(h),this.checkUpdateOption(u,["exitTitle"])&&this.setBtnTitle(m)),as((0,b.Z)(a.prototype),"setOptions",this).call(this,u)}},{key:"onAdd",value:function(){var u=as((0,b.Z)(a.prototype),"onAdd",this).call(this);return u.addEventListener("click",this.onClick),this.mapContainer=ph(this.scene.getSceneConfig().id),this.mapContainer.addEventListener("fullscreenchange",this.onFullscreenChange),u}},{key:"onRemove",value:function(){as((0,b.Z)(a.prototype),"onRemove",this).call(this),this.mapContainer.removeEventListener("fullscreenchange",this.onFullscreenChange)}},{key:"getDefault",value:function(u){return(0,K.Z)((0,K.Z)({},as((0,b.Z)(a.prototype),"getDefault",this).call(this,u)),{},{title:"\u5168\u5C4F",btnIcon:$d("l7-icon-fullscreen"),exitTitle:"\u9000\u51FA\u5168\u5C4F",exitBtnIcon:$d("l7-icon-exit-fullscreen")})}}]),a}(Zy);function qE(n){var l=g3();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function g3(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var OO=function(n){(0,zt.Z)(a,n);var l=qE(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"onClick",(0,J.Z)(ot().mark(function m(){var w;return ot().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(w=s.controlOption.onExport,w!=null){R.next=5;break}R.next=10;break;case 5:return R.t0=w,R.next=8,s.getImage();case 8:R.t1=R.sent,(0,R.t0)(R.t1);case 10:case"end":return R.stop()}},m)}))),(0,W.Z)((0,ut.Z)(s),"mergeImage",(0,J.Z)(ot().mark(function m(){var w,A,R,B,G,j,lt,ct,_t,Vt,ce,ae,ze,$e,xr=arguments;return ot().wrap(function(Zr){for(;;)switch(Zr.prev=Zr.next){case 0:for(R=s.controlOption.imageType,B=(w=(A=s.mapsService.getContainer())===null||A===void 0?void 0:A.getBoundingClientRect())!==null&&w!==void 0?w:{},G=B.width,j=G===void 0?0:G,lt=B.height,ct=lt===void 0?0:lt,_t=document.createElement("canvas"),_t.width=j,_t.height=ct,Vt=_t.getContext("2d"),ce=xr.length,ae=new Array(ce),ze=0;ze<ce;ze++)ae[ze]=xr[ze];return Zr.next=9,Promise.all(ae.map(function(Wr){return new Promise(function(wn){var vn=new Image;vn.onload=function(){wn(vn)},vn.src=Wr})}));case 9:return $e=Zr.sent,$e.forEach(function(Wr){Vt==null||Vt.drawImage(Wr,0,0,j,ct)}),Zr.abrupt("return",_t.toDataURL("image/".concat(R)));case 12:case"end":return Zr.stop()}},m)}))),s}return(0,et.Z)(a,[{key:"onAdd",value:function(){var u=as((0,b.Z)(a.prototype),"onAdd",this).call(this);return u.addEventListener("click",this.onClick),u}},{key:"getDefault",value:function(u){return(0,K.Z)((0,K.Z)({},as((0,b.Z)(a.prototype),"getDefault",this).call(this,u)),{},{title:"\u5BFC\u51FA\u56FE\u7247",btnIcon:$d("l7-icon-export-picture"),imageType:"png"})}},{key:"getImage",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m;return ot().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,this.mapsService.exportMap("png");case 2:return v=A.sent,A.next=5,this.scene.exportPng("png");case 5:return m=A.sent,A.abrupt("return",this.mergeImage(v,m));case 7:case"end":return A.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()}]),a}(Zy);function FO(n){var l=KE();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function KE(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var $_=function(n){(0,zt.Z)(a,n);var l=FO(a);function a(s){var u;return(0,pt.Z)(this,a),u=l.call(this,s),(0,W.Z)((0,ut.Z)(u),"getGeoLocation",function(){return new Promise(function(h,v){window.navigator.geolocation.getCurrentPosition(function(m){var w=m.coords,A=w!=null?w:{},R=A.longitude,B=A.latitude;!(0,Fn.isNaN)(R)&&!(0,Fn.isNaN)(B)?h([R,B]):v()},function(m){v(m)})})}),(0,W.Z)((0,ut.Z)(u),"onClick",(0,J.Z)(ot().mark(function h(){var v,m,w;return ot().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(window.navigator.geolocation){R.next=2;break}return R.abrupt("return");case 2:return v=u.controlOption.transform,R.next=5,u.getGeoLocation();case 5:if(m=R.sent,w=u.mapsService.getZoom(),R.t0=u.mapsService,R.t1=w>15?w:15,!v){R.next=15;break}return R.next=12,v(m);case 12:R.t2=R.sent,R.next=16;break;case 15:R.t2=m;case 16:R.t3=R.t2,R.t0.setZoomAndCenter.call(R.t0,R.t1,R.t3);case 18:case"end":return R.stop()}},h)}))),window.navigator.geolocation||console.warn("\u5F53\u524D\u6D4F\u89C8\u5668\u73AF\u5883\u4E0D\u652F\u6301\u83B7\u53D6\u5730\u7406\u5B9A\u4F4D"),u}return(0,et.Z)(a,[{key:"getDefault",value:function(u){return(0,K.Z)((0,K.Z)({},as((0,b.Z)(a.prototype),"getDefault",this).call(this,u)),{},{title:"\u5B9A\u4F4D",btnIcon:$d("l7-icon-reposition")})}},{key:"onAdd",value:function(){var u=as((0,b.Z)(a.prototype),"onAdd",this).call(this);return u.addEventListener("click",this.onClick),u}}]),a}(Zy),m3={normal:{text:"\u6807\u51C6",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*qdFDSbvIalgAAAAAAAAAAAAADmJ7AQ/original"},light:{text:"\u6708\u5149\u94F6",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*d-vcRLzu8WIAAAAAAAAAAAAADmJ7AQ/original"},dark:{text:"\u5E7B\u5F71\u9ED1",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*HMbRTI3XnpIAAAAAAAAAAAAADmJ7AQ/original"},fresh:{text:"\u8349\u8272\u9752",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*kqaGQ5kjSiAAAAAAAAAAAAAADmJ7AQ/original"},grey:{text:"\u96C5\u58EB\u7070",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*XegrTpZIbqAAAAAAAAAAAAAADmJ7AQ/original"},graffiti:{text:"\u6D82\u9E26",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*G5g9SZ_Jg4cAAAAAAAAAAAAADmJ7AQ/original"},macaron:{text:"\u9A6C\u5361\u9F99",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*irVvQbDpQMwAAAAAAAAAAAAADmJ7AQ/original"},darkblue:{text:"\u6781\u591C\u84DD",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*lKRzQYB4iR0AAAAAAAAAAAAADmJ7AQ/original"},wine:{text:"\u9171\u7C7D",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*orY0T7QL-lwAAAAAAAAAAAAADmJ7AQ/original"}},y3={normal:{text:"\u6807\u51C6",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*kIyZTok4Uk0AAAAAAAAAAAAADmJ7AQ/original"},light:{text:"\u4EAE",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*Z3JRQKDI-cIAAAAAAAAAAAAADmJ7AQ/original"},dark:{text:"\u6697",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*d7HCQbfmyaoAAAAAAAAAAAAADmJ7AQ/original"},satellite:{text:"\u536B\u661F",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*TytUT6pS9okAAAAAAAAAAAAADmJ7AQ/original"},outdoors:{text:"\u6237\u5916",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*hWwFSYJEFWsAAAAAAAAAAAAADmJ7AQ/original"}};function _3(n){var l=x3();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function x3(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var q_=function(n){(0,zt.Z)(a,n);var l=_3(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"onMapThemeChange",function(){s.mapsService.setMapStyle(s.selectValue[0])}),s}return(0,et.Z)(a,[{key:"getDefault",value:function(u){return(0,K.Z)((0,K.Z)({},as((0,b.Z)(a.prototype),"getDefault",this).call(this,u)),{},{title:"\u5730\u56FE\u6837\u5F0F",btnIcon:$d("l7-icon-color"),options:[]})}},{key:"getStyleOptions",value:function(){var u=this.mapsService.getType()==="mapbox"?y3:m3;return Object.entries(this.mapsService.getMapStyleConfig()).filter(function(h){var v=(0,yt.Z)(h,2),m=v[0],w=v[1];return typeof w=="string"&&m!=="blank"}).map(function(h){var v,m=(0,yt.Z)(h,2),w=m[0],A=m[1],R=(v=u[w])!==null&&v!==void 0?v:{},B=R.text,G=R.img;return{text:B!=null?B:w,value:A,img:G,key:w}})}},{key:"getMapStyle",value:function(){return this.mapsService.getMapStyle()}},{key:"onAdd",value:function(){var u,h=this;if((u=this.controlOption.options)!==null&&u!==void 0&&u.length||(this.controlOption.options=this.getStyleOptions()),this.controlOption.defaultValue){var v,m,w=this.controlOption.defaultValue;this.controlOption.defaultValue=(v=(m=this.controlOption.options.find(function(R){return R.key===w}))===null||m===void 0?void 0:m.value)!==null&&v!==void 0?v:w}else{var A=this.getMapStyle();A?this.controlOption.defaultValue=A:this.mapsService.map.once("styledata",function(){var R=h.mapsService.getMapStyle();h.controlOption.defaultValue=R,h.setSelectValue(R,!1)})}return this.on("selectChange",this.onMapThemeChange),as((0,b.Z)(a.prototype),"onAdd",this).call(this)}},{key:"getIsMultiple",value:function(){return!1}}]),a}($E);function QE(n){var l=b3();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function b3(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var RO=function(n){(0,zt.Z)(a,n);var l=QE(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"onLayerChange",function(){var m;(m=s.controlOption.layers)!==null&&m!==void 0&&m.length||(s.selectValue=s.getLayerVisible(),s.setOptions({options:s.getLayerOptions()}))}),(0,W.Z)((0,ut.Z)(s),"onLayerVisibleChane",function(){s.setSelectValue(s.getLayerVisible())}),(0,W.Z)((0,ut.Z)(s),"onSelectChange",function(){s.layers.forEach(function(m){var w=s.selectValue.includes(m.name),A=m.isVisible();w&&!A&&m.show(),!w&&A&&m.hide()})}),s}return(0,et.Z)(a,[{key:"layers",get:function(){var u=this.layerService,h=this.controlOption.layers;if(Array.isArray(h)&&h.length){var v=[];return h.forEach(function(m){if(m instanceof Object&&v.push(m),typeof m=="string"){var w=u.getLayer(m)||u.getLayerByName(m);w&&v.push(w)}}),v}return u.getLayers()||[]}},{key:"getDefault",value:function(u){return(0,K.Z)((0,K.Z)({},as((0,b.Z)(a.prototype),"getDefault",this).call(this,u)),{},{title:"\u56FE\u5C42\u63A7\u5236",btnIcon:$d("l7-icon-layer"),options:[]})}},{key:"getLayerVisible",value:function(){return this.layers.filter(function(u){return u.isVisible()}).map(function(u){return u.name})}},{key:"getLayerOptions",value:function(){return this.layers.map(function(u){return{text:u.name,value:u.name}})}},{key:"setOptions",value:function(u){var h=this.checkUpdateOption(u,["layers"]);as((0,b.Z)(a.prototype),"setOptions",this).call(this,u),h&&(this.selectValue=this.getLayerVisible(),this.controlOption.options=this.getLayerOptions(),this.popper.setContent(this.getPopperContent(this.controlOption.options)))}},{key:"onAdd",value:function(){var u;return(u=this.controlOption.options)!==null&&u!==void 0&&u.length||(this.controlOption.options=this.getLayerOptions()),this.controlOption.defaultValue||(this.controlOption.defaultValue=this.getLayerVisible()),this.on("selectChange",this.onSelectChange),this.layerService.on("layerChange",this.onLayerChange),as((0,b.Z)(a.prototype),"onAdd",this).call(this)}},{key:"onRemove",value:function(){this.off("selectChange",this.onSelectChange),this.layerService.off("layerChange",this.onLayerChange)}},{key:"getIsMultiple",value:function(){return!0}}]),a}($E);function E3(n){var l=w3();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function w3(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var DO=function(n){(0,zt.Z)(a,n);var l=E3(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"location",[0,0]),(0,W.Z)((0,ut.Z)(s),"onMouseMove",function(m){var w=s.location,A=m.lngLat||m.lnglat,R=s.controlOption.transform;A&&(w=[A.lng,A.lat]),s.location=w,R&&(w=R(w)),s.insertLocation2HTML(w),s.emit("locationChange",w)}),s}return(0,et.Z)(a,[{key:"getLocation",value:function(){return this.location}},{key:"getDefault",value:function(u){return(0,K.Z)((0,K.Z)({},as((0,b.Z)(a.prototype),"getDefault",this).call(this,u)),{},{position:q.BOTTOMLEFT,transform:function(v){var m=(0,yt.Z)(v,2),w=m[0],A=m[1];return[+(+w).toFixed(6),+(+A).toFixed(6)]}})}},{key:"onAdd",value:function(){var u=so("div","l7-control-mouse-location");return u.innerHTML=" ",this.mapsService.on("mousemove",this.onMouseMove),u}},{key:"onRemove",value:function(){this.mapsService.off("mousemove",this.onMouseMove)}},{key:"insertLocation2HTML",value:function(u){this.container.innerText=u.join(", ")}}]),a}(Yd);function S3(n){var l=C3();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function C3(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var A3=function(n){(0,zt.Z)(a,n);var l=S3(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"zoomIn",function(){!s.disabled&&s.mapsService.getZoom()<s.mapsService.getMaxZoom()&&s.mapsService.zoomIn()}),(0,W.Z)((0,ut.Z)(s),"zoomOut",function(){!s.disabled&&s.mapsService.getZoom()>s.mapsService.getMinZoom()&&s.mapsService.zoomOut()}),(0,W.Z)((0,ut.Z)(s),"updateDisabled",function(){var m=s.mapsService;s.zoomInButton.removeAttribute("disabled"),s.zoomOutButton.removeAttribute("disabled"),(s.disabled||m.getZoom()<=m.getMinZoom())&&s.zoomOutButton.setAttribute("disabled","true"),(s.disabled||m.getZoom()>=m.getMaxZoom())&&s.zoomInButton.setAttribute("disabled","true")}),s}return(0,et.Z)(a,[{key:"getDefault",value:function(u){return(0,K.Z)((0,K.Z)({},as((0,b.Z)(a.prototype),"getDefault",this).call(this,u)),{},{position:q.BOTTOMRIGHT,name:"zoom",zoomInText:$d("l7-icon-enlarge"),zoomInTitle:"Zoom in",zoomOutText:$d("l7-icon-narrow"),zoomOutTitle:"Zoom out"})}},{key:"setOptions",value:function(u){as((0,b.Z)(a.prototype),"setOptions",this).call(this,u),this.checkUpdateOption(u,["zoomInText","zoomInTitle","zoomOutText","zoomOutTitle"])&&this.resetButtonGroup(this.container)}},{key:"onAdd",value:function(){var u=so("div","l7-control-zoom");return this.resetButtonGroup(u),this.mapsService.on("zoomend",this.updateDisabled),this.mapsService.on("zoomchange",this.updateDisabled),u}},{key:"onRemove",value:function(){this.mapsService.off("zoomend",this.updateDisabled),this.mapsService.off("zoomchange",this.updateDisabled)}},{key:"disable",value:function(){return this.disabled=!0,this.updateDisabled(),this}},{key:"enable",value:function(){return this.disabled=!1,this.updateDisabled(),this}},{key:"resetButtonGroup",value:function(u){vs(u),this.zoomInButton=this.createButton(this.controlOption.zoomInText,this.controlOption.zoomInTitle,"l7-button-control",u,this.zoomIn),this.zoomOutButton=this.createButton(this.controlOption.zoomOutText,this.controlOption.zoomOutTitle,"l7-button-control",u,this.zoomOut),this.updateDisabled()}},{key:"createButton",value:function(u,h,v,m,w){var A=so("button",v,m);return typeof u=="string"?A.innerHTML=u:A.append(u),A.title=h,A.addEventListener("click",w),A}}]),a}(Yd);function T3(n){var l=JE();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function JE(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var M3=function(n){(0,zt.Z)(a,n);var l=T3(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"update",function(){var m=s.mapsService,w=s.controlOption.maxWidth,A=m.getSize()[1]/2,R=m.containerToLngLat([0,A]),B=m.containerToLngLat([w,A]),G=$([R.lng,R.lat],[B.lng,B.lat]);s.updateScales(G)}),s}return(0,et.Z)(a,[{key:"getDefault",value:function(u){return(0,K.Z)((0,K.Z)({},as((0,b.Z)(a.prototype),"getDefault",this).call(this,u)),{},{name:"scale",position:q.BOTTOMLEFT,maxWidth:100,metric:!0,updateWhenIdle:!1,imperial:!1,lockWidth:!0})}},{key:"onAdd",value:function(){var u="l7-control-scale",h=so("div",u);this.resetScaleLines(h);var v=this.controlOption.updateWhenIdle;return this.mapsService.on(v?"moveend":"mapmove",this.update),this.mapsService.on(v?"zoomend":"zoomchange",this.update),h}},{key:"onRemove",value:function(){var u=this.controlOption.updateWhenIdle;this.mapsService.off(u?"zoomend":"zoomchange",this.update),this.mapsService.off(u?"moveend":"mapmove",this.update)}},{key:"setOptions",value:function(u){as((0,b.Z)(a.prototype),"setOptions",this).call(this,u),this.checkUpdateOption(u,["lockWidth","maxWidth","metric","updateWhenIdle","imperial"])&&this.resetScaleLines(this.container)}},{key:"updateScales",value:function(u){var h=this.controlOption,v=h.metric,m=h.imperial;v&&u&&this.updateMetric(u),m&&u&&this.updateImperial(u)}},{key:"resetScaleLines",value:function(u){vs(u);var h=this.controlOption,v=h.metric,m=h.imperial,w=h.maxWidth,A=h.lockWidth;A&&vh(u,"width: ".concat(w,"px")),v&&(this.mScale=so("div","l7-control-scale-line",u)),m&&(this.iScale=so("div","l7-control-scale-line",u)),this.update()}},{key:"updateScale",value:function(u,h,v){var m=this.controlOption.maxWidth;u.style.width=Math.round(m*v)+"px",u.innerHTML=h}},{key:"getRoundNum",value:function(u){var h=Math.pow(10,(Math.floor(u)+"").length-1),v=u/h;return v=v>=10?10:v>=5?5:v>=3?3:v>=2?2:1,h*v}},{key:"updateMetric",value:function(u){var h=this.getRoundNum(u),v=h<1e3?h+" m":h/1e3+" km";this.updateScale(this.mScale,v,h/u)}},{key:"updateImperial",value:function(u){var h=u*3.2808399,v,m,w;h>5280?(v=h/5280,m=this.getRoundNum(v),this.updateScale(this.iScale,m+" mi",m/v)):(w=this.getRoundNum(h),this.updateScale(this.iScale,w+" ft",w/h))}}]),a}(Yd);function I3(n){var l=k3();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function k3(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var L3=function(n){(0,zt.Z)(a,n);var l=I3(a);function a(s){var u;(0,pt.Z)(this,a),u=l.call(this),(0,W.Z)((0,ut.Z)(u),"isShow",!0),(0,W.Z)((0,ut.Z)(u),"onMouseMove",function(v){var m,w=u.mapsService.getMapContainer(),A=(m=w==null?void 0:w.getBoundingClientRect())!==null&&m!==void 0?m:{},R=A.left,B=R===void 0?0:R,G=A.top,j=G===void 0?0:G;u.setPopupPosition(v.clientX-B,v.clientY-j)}),(0,W.Z)((0,ut.Z)(u),"updateLngLatPosition",function(){if(!(!u.mapsService||u.popupOption.followCursor)){var v=u.lngLat,m=v.lng,w=v.lat,A=u.mapsService.lngLatToContainer([m,w]),R=A.x,B=A.y;u.setPopupPosition(R,B)}}),(0,W.Z)((0,ut.Z)(u),"onKeyDown",function(v){v.keyCode===27&&u.remove()}),(0,W.Z)((0,ut.Z)(u),"onCloseButtonClick",function(v){v.stopPropagation&&v.stopPropagation(),u.hide()}),(0,W.Z)((0,ut.Z)(u),"update",function(){var v=!!u.lngLat,m=u.popupOption,w=m.className,A=m.style,R=m.maxWidth,B=m.anchor,G=m.stopPropagation;if(!(!u.mapsService||!v||!u.content)){var j=u.mapsService.getMarkerContainer();if(!u.container&&j&&(u.container=so("div","l7-popup ".concat(w!=null?w:""," ").concat(u.isShow?"":"l7-popup-hide"),j),A&&u.container.setAttribute("style",A),u.tip=so("div","l7-popup-tip",u.container),u.container.appendChild(u.content),G&&["mousemove","mousedown","mouseup","click","dblclick"].forEach(function(_t){u.container.addEventListener(_t,function(Vt){Vt.stopPropagation()})}),u.container.style.whiteSpace="nowrap"),u.updateLngLatPosition(),dh(u.container,"".concat(So[B])),ro(u.container,B,"popup"),R){var lt=u.container.getBoundingClientRect(),ct=lt.width;ct>parseFloat(R)&&(u.container.style.width=R)}else u.container.style.removeProperty("width")}}),u.popupOption=(0,K.Z)((0,K.Z)({},u.getDefault(s!=null?s:{})),s);var h=u.popupOption.lngLat;return h&&(u.lngLat=h),u}return(0,et.Z)(a,[{key:"lngLat",get:function(){var u;return(u=this.popupOption.lngLat)!==null&&u!==void 0?u:{lng:0,lat:0}},set:function(u){this.popupOption.lngLat=u}},{key:"getIsShow",value:function(){return this.isShow}},{key:"addTo",value:function(u){this.mapsService=u.get(Dt.IMapService),this.sceneService=u.get(Dt.ISceneService),this.layerService=u.get(Dt.ILayerService),this.mapsService.on("camerachange",this.update),this.mapsService.on("viewchange",this.update),this.scene=u,this.update(),this.updateCloseOnClick(),this.updateCloseOnEsc(),this.updateFollowCursor();var h=this.popupOption,v=h.html,m=h.text,w=h.title;return v?this.setHTML(v):m&&this.setText(m),w&&this.setTitle(w),this.emit("open"),this}},{key:"remove",value:function(){if(this!==null&&this!==void 0&&this.isOpen())return this.content&&Mu(this.content),this.container&&(Mu(this.container),delete this.container),this.mapsService&&(this.mapsService.off("camerachange",this.update),this.mapsService.off("viewchange",this.update),this.updateCloseOnClick(!0),this.updateCloseOnEsc(!0),this.updateFollowCursor(!0),delete this.mapsService),this.emit("close"),this}},{key:"getOptions",value:function(){return this.popupOption}},{key:"setOptions",value:function(u){return this.show(),this.popupOption=(0,K.Z)((0,K.Z)({},this.popupOption),u),this.checkUpdateOption(u,["html","text","title","closeButton","closeButtonOffsets","maxWidth","anchor","stopPropagation","className","style","lngLat","offsets"])&&(this.container&&(Mu(this.container),this.container=void 0),this.popupOption.html?this.setHTML(this.popupOption.html):this.popupOption.text&&this.setText(this.popupOption.text),this.popupOption.title&&this.setTitle(this.popupOption.title)),this.checkUpdateOption(u,["closeOnEsc"])&&this.updateCloseOnEsc(),this.checkUpdateOption(u,["closeOnClick"])&&this.updateCloseOnClick(),this.checkUpdateOption(u,["followCursor"])&&this.updateFollowCursor(),this.checkUpdateOption(u,["html"])&&u.html?this.setHTML(u.html):this.checkUpdateOption(u,["text"])&&u.text&&this.setText(u.text),this.checkUpdateOption(u,["lngLat"])&&u.lngLat&&this.setLnglat(u.lngLat),this}},{key:"open",value:function(){return this.addTo(this.scene),this}},{key:"close",value:function(){return this.remove(),this}},{key:"show",value:function(){if(!this.isShow)return this.container&&jl(this.container,"l7-popup-hide"),this.isShow=!0,this.emit("show"),this}},{key:"hide",value:function(){if(this.isShow)return this.container&&Po(this.container,"l7-popup-hide"),this.isShow=!1,this.emit("hide"),this}},{key:"setHTML",value:function(u){return this.popupOption.html=u,this.setDOMContent(u)}},{key:"setText",value:function(u){return this.popupOption.text=u,this.setDOMContent(window.document.createTextNode(u))}},{key:"setTitle",value:function(u){this.show(),this.popupOption.title=u,u?(this.contentTitle||(this.contentTitle=so("div","l7-popup-content__title"),this.content.firstChild?this.content.insertBefore(this.contentTitle,this.content.firstChild):this.content.append(this.contentTitle)),vs(this.contentTitle),rs(this.contentTitle,u)):this.contentTitle&&(Mu(this.contentTitle),this.contentTitle=void 0)}},{key:"panToPopup",value:function(){var u=this.lngLat,h=u.lng,v=u.lat;return this.popupOption.autoPan&&this.mapsService.panTo([h,v]),this}},{key:"setLngLat",value:function(u){return this.setLnglat(u)}},{key:"setLnglat",value:function(u){var h=this;return this.show(),this.lngLat=u,Array.isArray(u)&&(this.lngLat={lng:u[0],lat:u[1]}),this.mapsService&&(this.mapsService.off("camerachange",this.update),this.mapsService.off("viewchange",this.update),this.mapsService.on("camerachange",this.update),this.mapsService.on("viewchange",this.update)),this.update(),this.popupOption.autoPan&&setTimeout(function(){h.panToPopup()},0),this}},{key:"getLnglat",value:function(){return this.lngLat}},{key:"setMaxWidth",value:function(u){return this.popupOption.maxWidth=u,this.update(),this}},{key:"isOpen",value:function(){return!!this.mapsService}},{key:"getDefault",value:function(u){return{closeButton:!0,closeOnClick:!1,maxWidth:"240px",offsets:[0,0],anchor:Eo.BOTTOM,stopPropagation:!0,autoPan:!1,autoClose:!0,closeOnEsc:!1,followCursor:!1}}},{key:"setDOMContent",value:function(u){return this.show(),this.createContent(),rs(this.contentPanel,u),this.update(),this}},{key:"updateCloseOnClick",value:function(u){var h=this,v=this.mapsService;v&&(v==null||v.off("click",this.onCloseButtonClick),this.popupOption.closeOnClick&&!u&&requestAnimationFrame(function(){v==null||v.on("click",h.onCloseButtonClick)}))}},{key:"updateCloseOnEsc",value:function(u){window.removeEventListener("keydown",this.onKeyDown),this.popupOption.closeOnEsc&&!u&&window.addEventListener("keydown",this.onKeyDown)}},{key:"updateFollowCursor",value:function(u){var h,v=(h=this.mapsService)===null||h===void 0?void 0:h.getContainer();v&&(v==null||v.removeEventListener("mousemove",this.onMouseMove),this.popupOption.followCursor&&!u&&(v==null||v.addEventListener("mousemove",this.onMouseMove)))}},{key:"createContent",value:function(){var u=this;if(this.content&&Mu(this.content),this.contentTitle=void 0,this.content=so("div","l7-popup-content",this.container),this.setTitle(this.popupOption.title),this.popupOption.closeButton){var h=$d("l7-icon-guanbi");Po(h,"l7-popup-close-button"),this.content.appendChild(h),this.popupOption.closeButtonOffsets&&(h.style.right=this.popupOption.closeButtonOffsets[0]+"px",h.style.top=this.popupOption.closeButtonOffsets[1]+"px"),h.setAttribute("aria-label","Close popup"),h.addEventListener("click",function(){u.hide()}),this.closeButton=h}else this.closeButton=void 0;this.contentPanel=so("div","l7-popup-content__panel",this.content)}},{key:"setPopupPosition",value:function(u,h){if(this.container){var v=this.popupOption.offsets;this.container.style.left=u+v[0]+"px",this.container.style.top=h-v[1]+"px"}}},{key:"checkUpdateOption",value:function(u,h){return h.some(function(v){return v in u})}}]),a}(be.EventEmitter);function P3(n){var l=K_();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function K_(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var O3=function(n){(0,zt.Z)(a,n);var l=P3(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"layerConfigMap",new WeakMap),s}return(0,et.Z)(a,[{key:"layerConfigItems",get:function(){var u,h=this.popupOption,v=h.config,m=h.items;return(u=v!=null?v:m)!==null&&u!==void 0?u:[]}},{key:"addTo",value:function(u){return as((0,b.Z)(a.prototype),"addTo",this).call(this,u),this.bindLayerEvent(),this.hide(),this}},{key:"remove",value:function(){return as((0,b.Z)(a.prototype),"remove",this).call(this),this.unbindLayerEvent(),this}},{key:"setOptions",value:function(u){return this.unbindLayerEvent(),as((0,b.Z)(a.prototype),"setOptions",this).call(this,u),this.bindLayerEvent(),this}},{key:"getDefault",value:function(u){var h=u.trigger==="click";return(0,K.Z)((0,K.Z)({},as((0,b.Z)(a.prototype),"getDefault",this).call(this,u)),{},{trigger:"hover",followCursor:!h,lngLat:{lng:0,lat:0},offsets:[0,10],closeButton:!1,closeOnClick:!1,autoClose:!1,closeOnEsc:!1})}},{key:"bindLayerEvent",value:function(){var u=this,h=this.popupOption.trigger;this.layerConfigItems.forEach(function(v){var m,w=u.getLayerByConfig(v);if(w){var A=(0,K.Z)({},v);if(h==="hover"){var R=u.onLayerMouseMove.bind(u,w),B=u.onLayerMouseOut.bind(u,w);A.onMouseMove=R,A.onMouseOut=B,w==null||w.on("mousemove",R),w==null||w.on("mouseout",B)}else{var G=u.onLayerClick.bind(u,w);A.onClick=G,w==null||w.on("click",G)}var j=w==null||(m=w.getSource)===null||m===void 0?void 0:m.call(w),lt=u.onSourceUpdate.bind(u,w);j==null||j.on("update",lt),A.onSourceUpdate=lt,u.layerConfigMap.set(w,A)}})}},{key:"unbindLayerEvent",value:function(){var u=this;this.layerConfigItems.forEach(function(h){var v=u.getLayerByConfig(h),m=v&&u.layerConfigMap.get(v);if(m){var w=m.onMouseMove,A=m.onMouseOut,R=m.onClick,B=m.onSourceUpdate;if(w&&v.off("mousemove",w),A&&v.off("mouseout",A),R&&v.off("click",R),B){var G;v==null||(G=v.getSource())===null||G===void 0||G.off("update",B)}}})}},{key:"onLayerMouseMove",value:function(u,h){if(!this.isSameFeature(u,h.featureId)){var v=this.getLayerInfoFrag(u,h),m=v.title,w=v.content;this.setDOMContent(w),this.setTitle(m),this.displayFeatureInfo={layer:u,featureId:h.featureId},this.show()}}},{key:"onLayerMouseOut",value:function(u,h){this.displayFeatureInfo=void 0,this.isShow&&this.hide()}},{key:"onLayerClick",value:function(u,h){if(this.isShow&&this.isSameFeature(u,h.featureId))this.hide();else{var v=this.getLayerInfoFrag(u,h),m=v.title,w=v.content;this.setDOMContent(w),this.setLnglat(h.lngLat),this.setTitle(m),this.displayFeatureInfo={layer:u,featureId:h.featureId},this.show()}}},{key:"onSourceUpdate",value:function(u){var h;((h=this.displayFeatureInfo)===null||h===void 0?void 0:h.layer)===u&&(this.hide(),this.displayFeatureInfo=void 0)}},{key:"getLayerInfoFrag",value:function(u,h){var v=this.layerConfigMap.get(u),m,w=document.createDocumentFragment();if(v){var A=h.feature;A.type==="Feature"&&"properties"in A&&"geometry"in A&&(A=A.properties);var R=v.title,B=v.fields,G=v.customContent;if(R){m=document.createDocumentFragment();var j=R instanceof Function?R(A):R;rs(m,j)}if(G){var lt=G instanceof Function?G(A):G;rs(w,lt)}else B!=null&&B.length&&(B==null||B.forEach(function(ct){var _t,Vt,ce=typeof ct=="string"?{field:ct}:ct,ae=ce.field,ze=ce.formatField,$e=ce.formatValue,xr=ce.getValue,Or=so("div","l7-layer-popup__row"),Zr=xr?xr(h.feature):(0,Fn.get)(A,ae),Wr=(_t=ze instanceof Function?ze(ae,A):ze)!==null&&_t!==void 0?_t:ae,wn=(Vt=$e instanceof Function?$e(Zr,A):$e)!==null&&Vt!==void 0?Vt:Zr,vn=so("span","l7-layer-popup__key",Or);rs(vn,Wr),rs(vn,document.createTextNode("\uFF1A"));var Kn=so("span","l7-layer-popup__value",Or);rs(Kn,wn),w.appendChild(Or)}))}return{title:m,content:w}}},{key:"getLayerByConfig",value:function(u){var h=u.layer;if(h instanceof Object)return h;if(typeof h=="string")return this.layerService.getLayer(h)||this.layerService.getLayerByName(h)}},{key:"isSameFeature",value:function(u,h){var v=this.displayFeatureInfo;return v&&u===v.layer&&h===v.featureId}}]),a}(L3);function F3(n,l){var a=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,s=typeof wx!="undefined"&&wx!==null&&(typeof wx.request!="undefined"||typeof wx.miniProgram!="undefined");if(!(a||s)&&(l||(l=document),!!l)){var u=l.head||l.getElementsByTagName("head")[0];if(!u){u=l.createElement("head");var h=l.body||l.getElementsByTagName("body")[0];h?h.parentNode.insertBefore(u,h):l.documentElement.appendChild(u)}var v=l.createElement("style");return v.type="text/css",v.styleSheet?v.styleSheet.cssText=n:v.appendChild(l.createTextNode(n)),u.appendChild(v),v}}F3(`.l7-marker-container {
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
}
|
|
.l7-marker {
|
|
position: absolute !important;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 5;
|
|
cursor: pointer;
|
|
}
|
|
.l7-marker-cluster {
|
|
width: 40px;
|
|
height: 40px;
|
|
background-color: rgba(181, 226, 140, 0.6);
|
|
background-clip: padding-box;
|
|
border-radius: 20px;
|
|
}
|
|
.l7-marker-cluster div {
|
|
width: 30px;
|
|
height: 30px;
|
|
margin-top: 5px;
|
|
margin-left: 5px;
|
|
font: 12px 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
|
text-align: center;
|
|
background-color: rgba(110, 204, 57, 0.6);
|
|
border-radius: 15px;
|
|
}
|
|
.l7-marker-cluster span {
|
|
line-height: 30px;
|
|
}
|
|
.l7-touch .l7-control-attribution,
|
|
.l7-touch .l7-control-layers,
|
|
.l7-touch .l7-bar {
|
|
-webkit-box-shadow: none;
|
|
box-shadow: none;
|
|
}
|
|
.l7-touch .l7-control-layers,
|
|
.l7-touch .l7-bar {
|
|
background-clip: padding-box;
|
|
border: 2px solid rgba(0, 0, 0, 0.2);
|
|
}
|
|
.mapboxgl-ctrl-logo,
|
|
.amap-logo {
|
|
display: none !important;
|
|
}
|
|
.l7-select-box {
|
|
border: 3px dashed gray;
|
|
border-radius: 2px;
|
|
position: absolute;
|
|
z-index: 1000;
|
|
-webkit-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
.l7-control-container {
|
|
font: 12px/1.5 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
|
}
|
|
.l7-control-container .l7-control {
|
|
position: relative;
|
|
z-index: 800;
|
|
float: left;
|
|
clear: both;
|
|
color: #595959;
|
|
font-size: 12px;
|
|
pointer-events: visiblePainted;
|
|
/* IE 9-10 doesn't have auto */
|
|
pointer-events: auto;
|
|
}
|
|
.l7-control-container .l7-control.l7-control--hide {
|
|
display: none;
|
|
}
|
|
.l7-control-container .l7-top {
|
|
top: 0;
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
position: absolute;
|
|
z-index: 1000;
|
|
pointer-events: none;
|
|
}
|
|
.l7-control-container .l7-top .l7-control:not(.l7-control--hide) {
|
|
margin-top: 8px;
|
|
}
|
|
.l7-control-container .l7-right {
|
|
right: 0;
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
position: absolute;
|
|
z-index: 1000;
|
|
pointer-events: none;
|
|
}
|
|
.l7-control-container .l7-right .l7-control:not(.l7-control--hide) {
|
|
margin-right: 8px;
|
|
}
|
|
.l7-control-container .l7-bottom {
|
|
bottom: 0;
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
position: absolute;
|
|
z-index: 1000;
|
|
pointer-events: none;
|
|
}
|
|
.l7-control-container .l7-bottom .l7-control:not(.l7-control--hide) {
|
|
margin-bottom: 8px;
|
|
}
|
|
.l7-control-container .l7-left {
|
|
left: 0;
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
position: absolute;
|
|
z-index: 1000;
|
|
pointer-events: none;
|
|
}
|
|
.l7-control-container .l7-left .l7-control:not(.l7-control--hide) {
|
|
margin-left: 8px;
|
|
}
|
|
.l7-control-container .l7-center {
|
|
position: absolute;
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
-webkit-box-pack: center;
|
|
-ms-flex-pack: center;
|
|
justify-content: center;
|
|
}
|
|
.l7-control-container .l7-center.l7-top,
|
|
.l7-control-container .l7-center.l7-bottom {
|
|
width: 100%;
|
|
}
|
|
.l7-control-container .l7-center.l7-left,
|
|
.l7-control-container .l7-center.l7-right {
|
|
height: 100%;
|
|
}
|
|
.l7-control-container .l7-center .l7-control {
|
|
margin-right: 8px;
|
|
margin-bottom: 8px;
|
|
}
|
|
.l7-control-container .l7-row {
|
|
-webkit-box-orient: horizontal;
|
|
-webkit-box-direction: normal;
|
|
-ms-flex-direction: row;
|
|
flex-direction: row;
|
|
}
|
|
.l7-control-container .l7-row.l7-top {
|
|
-webkit-box-align: start;
|
|
-ms-flex-align: start;
|
|
align-items: flex-start;
|
|
}
|
|
.l7-control-container .l7-row.l7-bottom {
|
|
-webkit-box-align: end;
|
|
-ms-flex-align: end;
|
|
align-items: flex-end;
|
|
}
|
|
.l7-control-container .l7-column {
|
|
-webkit-box-orient: vertical;
|
|
-webkit-box-direction: normal;
|
|
-ms-flex-direction: column;
|
|
flex-direction: column;
|
|
}
|
|
.l7-control-container .l7-column.l7-left {
|
|
-webkit-box-align: start;
|
|
-ms-flex-align: start;
|
|
align-items: flex-start;
|
|
}
|
|
.l7-control-container .l7-column.l7-right {
|
|
-webkit-box-align: end;
|
|
-ms-flex-align: end;
|
|
align-items: flex-end;
|
|
}
|
|
.l7-button-control {
|
|
min-width: 28px;
|
|
height: 28px;
|
|
background-color: #fff;
|
|
border-width: 0;
|
|
border-radius: 2px;
|
|
outline: 0;
|
|
cursor: pointer;
|
|
-webkit-transition: all 0.2s;
|
|
transition: all 0.2s;
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
-webkit-box-pack: center;
|
|
-ms-flex-pack: center;
|
|
justify-content: center;
|
|
-webkit-box-align: center;
|
|
-ms-flex-align: center;
|
|
align-items: center;
|
|
padding: 0 6px;
|
|
-webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);
|
|
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);
|
|
line-height: 16px;
|
|
}
|
|
.l7-button-control .l7-iconfont {
|
|
fill: #595959;
|
|
color: #595959;
|
|
width: 16px;
|
|
height: 16px;
|
|
}
|
|
.l7-button-control.l7-button-control--row {
|
|
padding: 0 16px 0 13px;
|
|
}
|
|
.l7-button-control.l7-button-control--row * + .l7-button-control__text {
|
|
margin-left: 8px;
|
|
}
|
|
.l7-button-control.l7-button-control--column {
|
|
height: 44px;
|
|
-webkit-box-orient: vertical;
|
|
-webkit-box-direction: normal;
|
|
-ms-flex-direction: column;
|
|
flex-direction: column;
|
|
}
|
|
.l7-button-control.l7-button-control--column .l7-iconfont {
|
|
margin-top: 3px;
|
|
}
|
|
.l7-button-control.l7-button-control--column .l7-button-control__text {
|
|
margin-top: 3px;
|
|
font-size: 10px;
|
|
-webkit-transform: scale(0.83333);
|
|
transform: scale(0.83333);
|
|
}
|
|
.l7-button-control:not(:disabled):hover {
|
|
background-color: #f3f3f3;
|
|
}
|
|
.l7-button-control:not(:disabled):active {
|
|
background-color: #f3f3f3;
|
|
}
|
|
.l7-button-control:disabled {
|
|
background-color: #fafafa;
|
|
color: #bdbdbd;
|
|
cursor: not-allowed;
|
|
}
|
|
.l7-button-control:disabled .l7-iconfont {
|
|
fill: #bdbdbd;
|
|
color: #bdbdbd;
|
|
}
|
|
.l7-button-control:disabled:hover {
|
|
background-color: #fafafa;
|
|
}
|
|
.l7-button-control:disabled:active {
|
|
background-color: #fafafa;
|
|
}
|
|
.l7-popper {
|
|
position: absolute;
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
-webkit-box-pack: center;
|
|
-ms-flex-pack: center;
|
|
justify-content: center;
|
|
-webkit-box-align: center;
|
|
-ms-flex-align: center;
|
|
align-items: center;
|
|
z-index: 5;
|
|
color: #595959;
|
|
}
|
|
.l7-popper.l7-popper-hide {
|
|
display: none;
|
|
}
|
|
.l7-popper .l7-popper-content {
|
|
min-height: 28px;
|
|
background: #fff;
|
|
border-radius: 2px;
|
|
-webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);
|
|
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);
|
|
}
|
|
.l7-popper .l7-popper-arrow {
|
|
width: 0;
|
|
height: 0;
|
|
border-width: 4px;
|
|
border-style: solid;
|
|
border-top-color: transparent;
|
|
border-bottom-color: transparent;
|
|
border-left-color: transparent;
|
|
border-right-color: transparent;
|
|
-webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);
|
|
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);
|
|
}
|
|
.l7-popper.l7-popper-left {
|
|
-webkit-box-orient: horizontal;
|
|
-webkit-box-direction: normal;
|
|
-ms-flex-direction: row;
|
|
flex-direction: row;
|
|
}
|
|
.l7-popper.l7-popper-left .l7-popper-arrow {
|
|
border-left-color: #fff;
|
|
margin: 10px 0;
|
|
}
|
|
.l7-popper.l7-popper-right {
|
|
-webkit-box-orient: horizontal;
|
|
-webkit-box-direction: reverse;
|
|
-ms-flex-direction: row-reverse;
|
|
flex-direction: row-reverse;
|
|
}
|
|
.l7-popper.l7-popper-right .l7-popper-arrow {
|
|
border-right-color: #fff;
|
|
margin: 10px 0;
|
|
}
|
|
.l7-popper.l7-popper-top {
|
|
-webkit-box-orient: vertical;
|
|
-webkit-box-direction: normal;
|
|
-ms-flex-direction: column;
|
|
flex-direction: column;
|
|
}
|
|
.l7-popper.l7-popper-top .l7-popper-arrow {
|
|
border-top-color: #fff;
|
|
margin: 0 10px;
|
|
}
|
|
.l7-popper.l7-popper-bottom {
|
|
-webkit-box-orient: vertical;
|
|
-webkit-box-direction: reverse;
|
|
-ms-flex-direction: column-reverse;
|
|
flex-direction: column-reverse;
|
|
}
|
|
.l7-popper.l7-popper-bottom .l7-popper-arrow {
|
|
border-bottom-color: #fff;
|
|
margin: 0 10px;
|
|
}
|
|
.l7-popper.l7-popper-start {
|
|
-webkit-box-align: start;
|
|
-ms-flex-align: start;
|
|
align-items: flex-start;
|
|
}
|
|
.l7-popper.l7-popper-end {
|
|
-webkit-box-align: end;
|
|
-ms-flex-align: end;
|
|
align-items: flex-end;
|
|
}
|
|
.l7-select-control--normal {
|
|
padding: 4px 0;
|
|
}
|
|
.l7-select-control--normal .l7-select-control-item {
|
|
height: 24px;
|
|
line-height: 24px;
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
-webkit-box-align: center;
|
|
-ms-flex-align: center;
|
|
align-items: center;
|
|
padding: 0 16px;
|
|
font-size: 12px;
|
|
}
|
|
.l7-select-control--normal .l7-select-control-item > * + * {
|
|
margin-left: 6px;
|
|
}
|
|
.l7-select-control--normal .l7-select-control-item input[type='checkbox'] {
|
|
height: 14px;
|
|
width: 14px;
|
|
}
|
|
.l7-select-control--normal .l7-select-control-item:hover {
|
|
background-color: #f3f3f3;
|
|
}
|
|
.l7-select-control--image {
|
|
padding: 12px 12px 0 12px;
|
|
width: 474px;
|
|
height: 320px;
|
|
overflow: auto;
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
-ms-flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
-webkit-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
-webkit-box-align: start;
|
|
-ms-flex-align: start;
|
|
align-items: flex-start;
|
|
}
|
|
.l7-select-control--image .l7-select-control-item {
|
|
margin-right: 12px;
|
|
border-radius: 2px;
|
|
overflow: hidden;
|
|
border: 1px solid #fff;
|
|
-webkit-box-sizing: content-box;
|
|
box-sizing: content-box;
|
|
width: calc((100% - 36px) / 3);
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
-webkit-box-orient: vertical;
|
|
-webkit-box-direction: normal;
|
|
-ms-flex-direction: column;
|
|
flex-direction: column;
|
|
-webkit-box-pack: center;
|
|
-ms-flex-pack: center;
|
|
justify-content: center;
|
|
margin-bottom: 12px;
|
|
position: relative;
|
|
font-size: 12px;
|
|
}
|
|
.l7-select-control--image .l7-select-control-item img {
|
|
width: 142px;
|
|
height: 80px;
|
|
}
|
|
.l7-select-control--image .l7-select-control-item input[type='checkbox'] {
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
}
|
|
.l7-select-control--image .l7-select-control-item .l7-select-control-item-row {
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
-webkit-box-pack: center;
|
|
-ms-flex-pack: center;
|
|
justify-content: center;
|
|
-webkit-box-align: center;
|
|
-ms-flex-align: center;
|
|
align-items: center;
|
|
line-height: 26px;
|
|
}
|
|
.l7-select-control--image .l7-select-control-item .l7-select-control-item-row > * + * {
|
|
margin-left: 8px;
|
|
}
|
|
.l7-select-control--image .l7-select-control-item.l7-select-control-item-active {
|
|
border-color: #0370fe;
|
|
}
|
|
.l7-select-control--image .l7-select-control-item:nth-child(3n) {
|
|
margin-right: 0;
|
|
}
|
|
.l7-select-control-item {
|
|
cursor: pointer;
|
|
}
|
|
.l7-select-control-item input[type='checkbox'] {
|
|
margin: 0;
|
|
cursor: pointer;
|
|
}
|
|
.l7-select-control--multiple .l7-select-control-item:hover {
|
|
background-color: transparent;
|
|
}
|
|
.l7-control-logo {
|
|
width: 89px;
|
|
height: 16px;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
.l7-control-logo img {
|
|
height: 100%;
|
|
width: 100%;
|
|
}
|
|
.l7-control-logo .l7-control-logo-link {
|
|
display: block;
|
|
cursor: pointer;
|
|
}
|
|
.l7-control-logo .l7-control-logo-link img {
|
|
cursor: pointer;
|
|
}
|
|
.l7-control-mouse-location {
|
|
background-color: #fff;
|
|
border-radius: 2px;
|
|
-webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);
|
|
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);
|
|
padding: 2px 4px;
|
|
min-width: 130px;
|
|
}
|
|
.l7-control-zoom {
|
|
-webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);
|
|
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);
|
|
border-radius: 2px;
|
|
overflow: hidden;
|
|
}
|
|
.l7-control-zoom .l7-button-control {
|
|
-webkit-box-shadow: 0 0 0;
|
|
box-shadow: 0 0 0;
|
|
border-radius: 0;
|
|
font-size: 16px;
|
|
}
|
|
.l7-control-zoom .l7-button-control .l7-iconfont {
|
|
width: 14px;
|
|
height: 14px;
|
|
}
|
|
.l7-control-zoom .l7-button-control:first-child {
|
|
border-bottom: 1px solid #f0f0f0;
|
|
}
|
|
.l7-control-scale {
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
-webkit-box-orient: vertical;
|
|
-webkit-box-direction: normal;
|
|
-ms-flex-direction: column;
|
|
flex-direction: column;
|
|
}
|
|
.l7-control-scale .l7-control-scale-line {
|
|
-webkit-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 2px 5px 1px;
|
|
overflow: hidden;
|
|
color: #595959;
|
|
font-size: 10px;
|
|
line-height: 1.1;
|
|
white-space: nowrap;
|
|
background: #fff;
|
|
border: 2px solid #000;
|
|
border-top: 0;
|
|
-webkit-transition: width 0.1s;
|
|
transition: width 0.1s;
|
|
}
|
|
.l7-control-scale .l7-control-scale-line + .l7-control-scale .l7-control-scale-line {
|
|
margin-top: -2px;
|
|
border-top: 2px solid #777;
|
|
border-bottom: none;
|
|
}
|
|
.l7-right .l7-control-scale {
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
-webkit-box-align: end;
|
|
-ms-flex-align: end;
|
|
align-items: flex-end;
|
|
}
|
|
.l7-right .l7-control-scale .l7-control-scale-line {
|
|
text-align: right;
|
|
}
|
|
.l7-popup {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 5;
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
will-change: transform;
|
|
pointer-events: none;
|
|
}
|
|
.l7-popup.l7-popup-hide {
|
|
display: none;
|
|
}
|
|
.l7-popup .l7-popup-content {
|
|
position: relative;
|
|
padding: 16px;
|
|
font-size: 14px;
|
|
background: #fff;
|
|
border-radius: 3px;
|
|
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
}
|
|
.l7-popup .l7-popup-content .l7-popup-content__title {
|
|
margin-bottom: 8px;
|
|
font-weight: bold;
|
|
}
|
|
.l7-popup .l7-popup-content .l7-popup-close-button,
|
|
.l7-popup .l7-popup-content .l7-popup-content__title,
|
|
.l7-popup .l7-popup-content .l7-popup-content__panel {
|
|
white-space: normal;
|
|
-webkit-user-select: text;
|
|
-moz-user-select: text;
|
|
-ms-user-select: text;
|
|
user-select: text;
|
|
pointer-events: initial;
|
|
}
|
|
.l7-popup .l7-popup-content .l7-popup-close-button {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
width: 18px;
|
|
height: 18px;
|
|
padding: 0;
|
|
font-size: 14px;
|
|
line-height: 18px;
|
|
text-align: center;
|
|
background-color: transparent;
|
|
border: 0;
|
|
border-radius: 0 3px 0 0;
|
|
cursor: pointer;
|
|
}
|
|
.l7-popup .l7-popup-tip {
|
|
position: relative;
|
|
z-index: 1;
|
|
width: 0;
|
|
height: 0;
|
|
border: 10px solid transparent;
|
|
}
|
|
.l7-popup.l7-popup-anchor-bottom,
|
|
.l7-popup.l7-popup-anchor-bottom-left,
|
|
.l7-popup.l7-popup-anchor-bottom-right {
|
|
-webkit-box-orient: vertical;
|
|
-webkit-box-direction: reverse;
|
|
-ms-flex-direction: column-reverse;
|
|
flex-direction: column-reverse;
|
|
}
|
|
.l7-popup.l7-popup-anchor-bottom .l7-popup-tip,
|
|
.l7-popup.l7-popup-anchor-bottom-left .l7-popup-tip,
|
|
.l7-popup.l7-popup-anchor-bottom-right .l7-popup-tip {
|
|
bottom: 1px;
|
|
}
|
|
.l7-popup.l7-popup-anchor-top,
|
|
.l7-popup.l7-popup-anchor-top-left,
|
|
.l7-popup.l7-popup-anchor-top-right {
|
|
-webkit-box-orient: vertical;
|
|
-webkit-box-direction: normal;
|
|
-ms-flex-direction: column;
|
|
flex-direction: column;
|
|
}
|
|
.l7-popup.l7-popup-anchor-top .l7-popup-tip,
|
|
.l7-popup.l7-popup-anchor-top-left .l7-popup-tip,
|
|
.l7-popup.l7-popup-anchor-top-right .l7-popup-tip {
|
|
top: 1px;
|
|
}
|
|
.l7-popup.l7-popup-anchor-left {
|
|
-webkit-box-orient: horizontal;
|
|
-webkit-box-direction: normal;
|
|
-ms-flex-direction: row;
|
|
flex-direction: row;
|
|
}
|
|
.l7-popup.l7-popup-anchor-right {
|
|
-webkit-box-orient: horizontal;
|
|
-webkit-box-direction: reverse;
|
|
-ms-flex-direction: row-reverse;
|
|
flex-direction: row-reverse;
|
|
}
|
|
.l7-popup-anchor-top .l7-popup-tip {
|
|
position: relative;
|
|
-webkit-align-self: center;
|
|
-ms-flex-item-align: center;
|
|
align-self: center;
|
|
border-top: none;
|
|
border-bottom-color: #fff;
|
|
}
|
|
.l7-popup-anchor-top-left .l7-popup-tip {
|
|
-webkit-align-self: flex-start;
|
|
-ms-flex-item-align: start;
|
|
align-self: flex-start;
|
|
border-top: none;
|
|
border-bottom-color: #fff;
|
|
border-left: none;
|
|
}
|
|
.l7-popup-anchor-top-right .l7-popup-tip {
|
|
-webkit-align-self: flex-end;
|
|
-ms-flex-item-align: end;
|
|
align-self: flex-end;
|
|
border-top: none;
|
|
border-right: none;
|
|
border-bottom-color: #fff;
|
|
}
|
|
.l7-popup-anchor-bottom .l7-popup-tip {
|
|
-webkit-align-self: center;
|
|
-ms-flex-item-align: center;
|
|
align-self: center;
|
|
border-top-color: #fff;
|
|
border-bottom: none;
|
|
}
|
|
.l7-popup-anchor-bottom-left .l7-popup-tip {
|
|
-webkit-align-self: flex-start;
|
|
-ms-flex-item-align: start;
|
|
align-self: flex-start;
|
|
border-top-color: #fff;
|
|
border-bottom: none;
|
|
border-left: none;
|
|
}
|
|
.l7-popup-anchor-bottom-right .l7-popup-tip {
|
|
-webkit-align-self: flex-end;
|
|
-ms-flex-item-align: end;
|
|
align-self: flex-end;
|
|
border-top-color: #fff;
|
|
border-right: none;
|
|
border-bottom: none;
|
|
}
|
|
.l7-popup-anchor-left .l7-popup-tip {
|
|
-webkit-align-self: center;
|
|
-ms-flex-item-align: center;
|
|
align-self: center;
|
|
border-right-color: #fff;
|
|
border-left: none;
|
|
}
|
|
.l7-popup-anchor-right .l7-popup-tip {
|
|
right: 1px;
|
|
-webkit-align-self: center;
|
|
-ms-flex-item-align: center;
|
|
align-self: center;
|
|
border-right: none;
|
|
border-left-color: #fff;
|
|
}
|
|
.l7-popup-anchor-top-left .l7-popup-content {
|
|
border-top-left-radius: 0;
|
|
}
|
|
.l7-popup-anchor-top-right .l7-popup-content {
|
|
border-top-right-radius: 0;
|
|
}
|
|
.l7-popup-anchor-bottom-left .l7-popup-content {
|
|
border-bottom-left-radius: 0;
|
|
}
|
|
.l7-popup-anchor-bottom-right .l7-popup-content {
|
|
border-bottom-right-radius: 0;
|
|
}
|
|
.l7-popup-track-pointer {
|
|
display: none;
|
|
}
|
|
.l7-popup-track-pointer * {
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
pointer-events: none;
|
|
}
|
|
.l7-map:hover .l7-popup-track-pointer {
|
|
display: -webkit-box;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
}
|
|
.l7-map:active .l7-popup-track-pointer {
|
|
display: none;
|
|
}
|
|
.l7-layer-popup__row {
|
|
font-size: 12px;
|
|
}
|
|
.l7-layer-popup__row + .l7-layer-popup__row {
|
|
margin-top: 4px;
|
|
}
|
|
`);var Wy={},tw={},ew=function(l){return tw[l]},td=function(l,a){tw[l]=a},R3=function(l){return Wy[l]},ug=function(l,a){Wy[l]=a},Xy={},Q_={},J_=34,Jg=10,tm=13;function rw(n){return new Function("d","return {"+n.map(function(l,a){return JSON.stringify(l)+": d["+a+'] || ""'}).join(",")+"}")}function D3(n,l){var a=rw(n);return function(s,u){return l(a(s),u,n)}}function lg(n){var l=Object.create(null),a=[];return n.forEach(function(s){for(var u in s)u in l||a.push(l[u]=u)}),a}function hc(n,l){var a=n+"",s=a.length;return s<l?new Array(l-s+1).join(0)+a:a}function tx(n){return n<0?"-"+hc(-n,6):n>9999?"+"+hc(n,6):hc(n,4)}function nw(n){var l=n.getUTCHours(),a=n.getUTCMinutes(),s=n.getUTCSeconds(),u=n.getUTCMilliseconds();return isNaN(n)?"Invalid Date":tx(n.getUTCFullYear(),4)+"-"+hc(n.getUTCMonth()+1,2)+"-"+hc(n.getUTCDate(),2)+(u?"T"+hc(l,2)+":"+hc(a,2)+":"+hc(s,2)+"."+hc(u,3)+"Z":s?"T"+hc(l,2)+":"+hc(a,2)+":"+hc(s,2)+"Z":a||l?"T"+hc(l,2)+":"+hc(a,2)+"Z":"")}function w0(n){var l=new RegExp('["'+n+`
|
|
\r]`),a=n.charCodeAt(0);function s(B,G){var j,lt,ct=u(B,function(_t,Vt){if(j)return j(_t,Vt-1);lt=_t,j=G?D3(_t,G):rw(_t)});return ct.columns=lt||[],ct}function u(B,G){var j=[],lt=B.length,ct=0,_t=0,Vt,ce=lt<=0,ae=!1;B.charCodeAt(lt-1)===Jg&&--lt,B.charCodeAt(lt-1)===tm&&--lt;function ze(){if(ce)return Q_;if(ae)return ae=!1,Xy;var xr,Or=ct,Zr;if(B.charCodeAt(Or)===J_){for(;ct++<lt&&B.charCodeAt(ct)!==J_||B.charCodeAt(++ct)===J_;);return(xr=ct)>=lt?ce=!0:(Zr=B.charCodeAt(ct++))===Jg?ae=!0:Zr===tm&&(ae=!0,B.charCodeAt(ct)===Jg&&++ct),B.slice(Or+1,xr-1).replace(/""/g,'"')}for(;ct<lt;){if((Zr=B.charCodeAt(xr=ct++))===Jg)ae=!0;else if(Zr===tm)ae=!0,B.charCodeAt(ct)===Jg&&++ct;else if(Zr!==a)continue;return B.slice(Or,xr)}return ce=!0,B.slice(Or,lt)}for(;(Vt=ze())!==Q_;){for(var $e=[];Vt!==Xy&&Vt!==Q_;)$e.push(Vt),Vt=ze();G&&($e=G($e,_t++))==null||j.push($e)}return j}function h(B,G){return B.map(function(j){return G.map(function(lt){return R(j[lt])}).join(n)})}function v(B,G){return G==null&&(G=lg(B)),[G.map(R).join(n)].concat(h(B,G)).join(`
|
|
`)}function m(B,G){return G==null&&(G=lg(B)),h(B,G).join(`
|
|
`)}function w(B){return B.map(A).join(`
|
|
`)}function A(B){return B.map(R).join(n)}function R(B){return B==null?"":B instanceof Date?nw(B):l.test(B+="")?'"'+B.replace(/"/g,'""')+'"':B}return{parse:s,parseRows:u,format:v,formatBody:m,formatRows:w,formatRow:A,formatValue:R}}var mf=w0(","),B3=mf.parse,iw=mf.parseRows,BO=mf.format,NO=mf.formatBody,zO=mf.formatRows,UO=mf.formatRow,qd=mf.formatValue,N3=nt(70309),Yy=nt.n(N3);function ZO(n){if(!n)throw new Error("coord is required");if(!Array.isArray(n)){if(n.type==="Feature"&&n.geometry!==null&&n.geometry.type==="Point")return n.geometry.coordinates;if(n.type==="Point")return n.coordinates}if(Array.isArray(n)&&n.length>=2&&!Array.isArray(n[0])&&!Array.isArray(n[1]))return n;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function aw(n){if(Array.isArray(n))return n;if(n.type==="Feature"){if(n.geometry!==null)return n.geometry.coordinates}else if(n.coordinates)return n.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function z3(n){if(n.length>1&&isNumber(n[0])&&isNumber(n[1]))return!0;if(Array.isArray(n[0])&&n[0].length)return z3(n[0]);throw new Error("coordinates must only contain numbers")}function VO(n,l,a){if(!l||!a)throw new Error("type and name required");if(!n||n.type!==l)throw new Error("Invalid input to "+a+": must be a "+l+", given "+n.type)}function GO(n,l,a){if(!n)throw new Error("No feature passed");if(!a)throw new Error(".featureOf() requires a name");if(!n||n.type!=="Feature"||!n.geometry)throw new Error("Invalid input to "+a+", Feature with geometry required");if(!n.geometry||n.geometry.type!==l)throw new Error("Invalid input to "+a+": must be a "+l+", given "+n.geometry.type)}function HO(n,l,a){if(!n)throw new Error("No featureCollection passed");if(!a)throw new Error(".collectionOf() requires a name");if(!n||n.type!=="FeatureCollection")throw new Error("Invalid input to "+a+", FeatureCollection required");for(var s=0,u=n.features;s<u.length;s++){var h=u[s];if(!h||h.type!=="Feature"||!h.geometry)throw new Error("Invalid input to "+a+", Feature with geometry required");if(!h.geometry||h.geometry.type!==l)throw new Error("Invalid input to "+a+": must be a "+l+", given "+h.geometry.type)}}function ow(n){return n.type==="Feature"?n.geometry:n}function jO(n,l){return n.type==="FeatureCollection"?"FeatureCollection":n.type==="GeometryCollection"?"GeometryCollection":n.type==="Feature"&&n.geometry!==null?n.geometry.type:n.type}function sw(n,l){var a=l.x,s=l.y,u=l.x1,h=l.y1,v=l.coordinates,m=l.geometry,w=[];if(!Array.isArray(n))return{dataArray:[]};if(m)return n.filter(function(Vt){return Vt[m]&&Vt[m].type&&Vt[m].coordinates&&Vt[m].coordinates.length>0}).forEach(function(Vt,ce){var ae=Yy()((0,K.Z)({},Vt[m]),!0);fa(ae,function(ze){var $e=aw(ze),xr=(0,K.Z)((0,K.Z)({},Vt),{},{_id:ce,coordinates:$e});w.push(xr)})}),{dataArray:w};for(var A=0;A<n.length;A++){var R=n[A],B=[];if(v){var G="Polygon";Array.isArray(v[0])||(G="Point"),Array.isArray(v[0])&&!Array.isArray(v[0][0])&&(G="LineString");var j=Yy()({type:G,coordinates:(0,Oi.Z)(R[v])},!0);B=j.coordinates}else if(a&&s&&u&&h){var lt=[parseFloat(R[a]),parseFloat(R[s])],ct=[parseFloat(R[u]),parseFloat(R[h])];B=[lt,ct]}else a&&s&&(B=[parseFloat(R[a]),parseFloat(R[s])]);var _t=(0,K.Z)((0,K.Z)({},R),{},{_id:A,coordinates:B});w.push(_t)}return{dataArray:w}}function S0(n,l){var a=B3(n);return sw(a,l)}function U3(n){for(var l=n.toString(),a=5381,s=l.length;s;)a=a*33^l.charCodeAt(--s);return a>>>0}function Z3(n,l){return l===void 0?null:n.properties[l]?n.properties[l]:n.properties&&n.properties[l]?U3(n.properties[l]+"")%1000019:null}function uw(n,l){var a=[],s={};return n.features?(n.features=n.features.filter(function(u){var h=u.geometry;return u!=null&&h&&h.type&&h.coordinates&&h.coordinates.length>0}),Yy()(n,!0),n.features.length===0?{dataArray:[],featureKeys:s}:(fa(n,function(u,h){var v=Z3(u,l==null?void 0:l.featureId);v===null&&(v=h);var m=v,w=aw(u),A=(0,K.Z)((0,K.Z)({},u.properties),{},{coordinates:w,_id:m});a.push(A)}),{dataArray:a,featureKeys:s})):(n.features=[],{dataArray:[]})}function ex(n,l){var a=l.extent,s=a===void 0?[121.168,30.2828,121.384,30.4219]:a,u=new Promise(function(v){n instanceof HTMLImageElement||wl(n)?v([n]):V3(n,function(m){v(m)})}),h={originData:n,images:u,_id:1,dataArray:[{_id:0,coordinates:[[s[0],s[1]],[s[2],s[3]]]}]};return h}function V3(n,l){var a=n,s=[];if(typeof a=="string")eo({url:a},function(v,m){m&&(s.push(m),l(s))});else{var u=a.length,h=0;a.forEach(function(v){eo({url:v},function(m,w){h++,w&&s.push(w),h===u&&l(s)})})}return ex}var em=nt(85143),C0=nt(43548),G3=nt.n(C0),$y=function(){function n(l,a,s,u){(0,pt.Z)(this,n),(0,W.Z)(this,"vectorLayerCache",{}),this.x=a,this.y=s,this.z=u,this.vectorTile=new em.VectorTile(new(G3())(l))}return(0,et.Z)(n,[{key:"getTileData",value:function(a){if(!a||!this.vectorTile.layers[a])return[];if(this.vectorLayerCache[a])return this.vectorLayerCache[a];var s=this.vectorTile.layers[a];if(Array.isArray(s.features))return this.vectorLayerCache[a]=s.features,s.features;for(var u=[],h=0;h<s.length;h++){var v=s.feature(h),m=v.toGeoJSON(this.x,this.y,this.z);u.push((0,K.Z)((0,K.Z)({},m),{},{properties:(0,K.Z)({id:m.id},m.properties)}))}return this.vectorLayerCache[a]=u,u}},{key:"getFeatureById",value:function(){throw new Error("Method not implemented.")}}]),n}(),H3={tileSize:256,minZoom:0,maxZoom:1/0,zoomOffset:0,warp:!0},j3=function(){var n=(0,J.Z)(ot().mark(function l(a,s,u,h,v){var m;return ot().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return m=Rp(a,s),A.abrupt("return",new Promise(function(R){if(v)v({x:u.x,y:u.y,z:u.z},function(G,j){if(G||!j)R(void 0);else{var lt=new $y(j,u.x,u.y,u.z);R(lt)}});else{var B=Nr((0,K.Z)((0,K.Z)({},h),{},{url:m}),function(G,j){if(G||!j)R(void 0);else{var lt=new $y(j,u.x,u.y,u.z);R(lt)}});u.xhrCancel=function(){return B.abort()}}}));case 2:case"end":return A.stop()}},l)}));return function(a,s,u,h,v){return n.apply(this,arguments)}}();function W3(n,l){var a=Array.isArray(n)?n[0]:n,s=function(v,m){return j3(a,v,m,l==null?void 0:l.requestParameters,l==null?void 0:l.getCustomData)},u=(0,K.Z)((0,K.Z)((0,K.Z)({},H3),l),{},{getTileData:s});return{data:a,dataArray:[],tilesetOptions:u,isTile:!0}}function rx(n,l,a,s){for(var u=s,h=a-l>>1,v=a-l,m,w=n[l],A=n[l+1],R=n[a],B=n[a+1],G=l+3;G<a;G+=3){var j=cg(n[G],n[G+1],w,A,R,B);if(j>u)m=G,u=j;else if(j===u){var lt=Math.abs(G-h);lt<v&&(m=G,v=lt)}}u>s&&(m-l>3&&rx(n,l,m,s),n[m+2]=u,a-m>3&&rx(n,m,a,s))}function cg(n,l,a,s,u,h){var v=u-a,m=h-s;if(v!==0||m!==0){var w=((n-a)*v+(l-s)*m)/(v*v+m*m);w>1?(a=u,s=h):w>0&&(a+=v*w,s+=m*w)}return v=n-a,m=l-s,v*v+m*m}function Rv(n,l,a,s){var u={id:typeof n=="undefined"?null:n,type:l,geometry:a,tags:s,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return X3(u),u}function X3(n){var l=n.geometry,a=n.type;if(a==="Point"||a==="MultiPoint"||a==="LineString")nx(n,l);else if(a==="Polygon"||a==="MultiLineString")for(var s=0;s<l.length;s++)nx(n,l[s]);else if(a==="MultiPolygon")for(s=0;s<l.length;s++)for(var u=0;u<l[s].length;u++)nx(n,l[s][u])}function nx(n,l){for(var a=0;a<l.length;a+=3)n.minX=Math.min(n.minX,l[a]),n.minY=Math.min(n.minY,l[a+1]),n.maxX=Math.max(n.maxX,l[a]),n.maxY=Math.max(n.maxY,l[a+1])}function fg(n,l){var a=[];if(n.type==="FeatureCollection")for(var s=0;s<n.features.length;s++)qy(a,n.features[s],l,s);else n.type==="Feature"?qy(a,n,l):qy(a,{geometry:n},l);return a}function qy(n,l,a,s){if(l.geometry){var u=l.geometry.coordinates,h=l.geometry.type,v=Math.pow(a.tolerance/((1<<a.maxZoom)*a.extent),2),m=[],w=l.id;if(a.promoteId?w=l.properties[a.promoteId]:a.generateId&&(w=s||0),h==="Point")lw(u,m);else if(h==="MultiPoint")for(var A=0;A<u.length;A++)lw(u[A],m);else if(h==="LineString")Ky(u,m,v,!1);else if(h==="MultiLineString")if(a.lineMetrics){for(A=0;A<u.length;A++)m=[],Ky(u[A],m,v,!1),n.push(Rv(w,"LineString",m,l.properties));return}else rm(u,m,v,!1);else if(h==="Polygon")rm(u,m,v,!0);else if(h==="MultiPolygon")for(A=0;A<u.length;A++){var R=[];rm(u[A],R,v,!0),m.push(R)}else if(h==="GeometryCollection"){for(A=0;A<l.geometry.geometries.length;A++)qy(n,{id:w,geometry:l.geometry.geometries[A],properties:l.properties},a,s);return}else throw new Error("Input data is not a valid GeoJSON object.");n.push(Rv(w,h,m,l.properties))}}function lw(n,l){l.push(cw(n[0])),l.push(fw(n[1])),l.push(0)}function Ky(n,l,a,s){for(var u,h,v=0,m=0;m<n.length;m++){var w=cw(n[m][0]),A=fw(n[m][1]);l.push(w),l.push(A),l.push(0),m>0&&(s?v+=(u*A-w*h)/2:v+=Math.sqrt(Math.pow(w-u,2)+Math.pow(A-h,2))),u=w,h=A}var R=l.length-3;l[2]=1,rx(l,0,R,a),l[R+2]=1,l.size=Math.abs(v),l.start=0,l.end=l.size}function rm(n,l,a,s){for(var u=0;u<n.length;u++){var h=[];Ky(n[u],h,a,s),l.push(h)}}function cw(n){return n/360+.5}function fw(n){var l=Math.sin(n*Math.PI/180),a=.5-.25*Math.log((1+l)/(1-l))/Math.PI;return a<0?0:a>1?1:a}function Kd(n,l,a,s,u,h,v,m){if(a/=l,s/=l,h>=a&&v<s)return n;if(v<a||h>=s)return null;for(var w=[],A=0;A<n.length;A++){var R=n[A],B=R.geometry,G=R.type,j=u===0?R.minX:R.minY,lt=u===0?R.maxX:R.maxY;if(j>=a&<<s){w.push(R);continue}else if(lt<a||j>=s)continue;var ct=[];if(G==="Point"||G==="MultiPoint")ix(B,ct,a,s,u);else if(G==="LineString")ax(B,ct,a,s,u,!1,m.lineMetrics);else if(G==="MultiLineString")ox(B,ct,a,s,u,!1);else if(G==="Polygon")ox(B,ct,a,s,u,!0);else if(G==="MultiPolygon")for(var _t=0;_t<B.length;_t++){var Vt=[];ox(B[_t],Vt,a,s,u,!0),Vt.length&&ct.push(Vt)}if(ct.length){if(m.lineMetrics&&G==="LineString"){for(_t=0;_t<ct.length;_t++)w.push(Rv(R.id,G,ct[_t],R.tags));continue}(G==="LineString"||G==="MultiLineString")&&(ct.length===1?(G="LineString",ct=ct[0]):G="MultiLineString"),(G==="Point"||G==="MultiPoint")&&(G=ct.length===3?"Point":"MultiPoint"),w.push(Rv(R.id,G,ct,R.tags))}}return w.length?w:null}function ix(n,l,a,s,u){for(var h=0;h<n.length;h+=3){var v=n[h+u];v>=a&&v<=s&&(l.push(n[h]),l.push(n[h+1]),l.push(n[h+2]))}}function ax(n,l,a,s,u,h,v){for(var m=hw(n),w=u===0?pw:Y3,A=n.start,R,B,G=0;G<n.length-3;G+=3){var j=n[G],lt=n[G+1],ct=n[G+2],_t=n[G+3],Vt=n[G+4],ce=u===0?j:lt,ae=u===0?_t:Vt,ze=!1;v&&(R=Math.sqrt(Math.pow(j-_t,2)+Math.pow(lt-Vt,2))),ce<a?ae>a&&(B=w(m,j,lt,_t,Vt,a),v&&(m.start=A+R*B)):ce>s?ae<s&&(B=w(m,j,lt,_t,Vt,s),v&&(m.start=A+R*B)):Qy(m,j,lt,ct),ae<a&&ce>=a&&(B=w(m,j,lt,_t,Vt,a),ze=!0),ae>s&&ce<=s&&(B=w(m,j,lt,_t,Vt,s),ze=!0),!h&&ze&&(v&&(m.end=A+R*B),l.push(m),m=hw(n)),v&&(A+=R)}var $e=n.length-3;j=n[$e],lt=n[$e+1],ct=n[$e+2],ce=u===0?j:lt,ce>=a&&ce<=s&&Qy(m,j,lt,ct),$e=m.length-3,h&&$e>=3&&(m[$e]!==m[0]||m[$e+1]!==m[1])&&Qy(m,m[0],m[1],m[2]),m.length&&l.push(m)}function hw(n){var l=[];return l.size=n.size,l.start=n.start,l.end=n.end,l}function ox(n,l,a,s,u,h){for(var v=0;v<n.length;v++)ax(n[v],l,a,s,u,h,!1)}function Qy(n,l,a,s){n.push(l),n.push(a),n.push(s)}function pw(n,l,a,s,u,h){var v=(h-l)/(s-l);return n.push(h),n.push(a+(u-a)*v),n.push(1),v}function Y3(n,l,a,s,u,h){var v=(h-a)/(u-a);return n.push(l+(s-l)*v),n.push(h),n.push(1),v}function dw(n,l){var a=l.buffer/l.extent,s=n,u=Kd(n,1,-1-a,a,0,-1,2,l),h=Kd(n,1,1-a,2+a,0,-1,2,l);return(u||h)&&(s=Kd(n,1,-a,1+a,0,-1,2,l)||[],u&&(s=sx(u,1).concat(s)),h&&(s=s.concat(sx(h,-1)))),s}function sx(n,l){for(var a=[],s=0;s<n.length;s++){var u=n[s],h=u.type,v;if(h==="Point"||h==="MultiPoint"||h==="LineString")v=Jy(u.geometry,l);else if(h==="MultiLineString"||h==="Polygon"){v=[];for(var m=0;m<u.geometry.length;m++)v.push(Jy(u.geometry[m],l))}else if(h==="MultiPolygon")for(v=[],m=0;m<u.geometry.length;m++){for(var w=[],A=0;A<u.geometry[m].length;A++)w.push(Jy(u.geometry[m][A],l));v.push(w)}a.push(Rv(u.id,h,v,u.tags))}return a}function Jy(n,l){var a=[];a.size=n.size,n.start!==void 0&&(a.start=n.start,a.end=n.end);for(var s=0;s<n.length;s+=3)a.push(n[s]+l,n[s+1],n[s+2]);return a}function vw(n,l){if(n.transformed)return n;var a=1<<n.z,s=n.x,u=n.y,h,v,m;for(h=0;h<n.features.length;h++){var w=n.features[h],A=w.geometry,R=w.type;if(w.geometry=[],R===1)for(v=0;v<A.length;v+=2)w.geometry.push(ux(A[v],A[v+1],l,a,s,u));else for(v=0;v<A.length;v++){var B=[];for(m=0;m<A[v].length;m+=2)B.push(ux(A[v][m],A[v][m+1],l,a,s,u));w.geometry.push(B)}}return n.transformed=!0,n}function ux(n,l,a,s,u,h){return[Math.round(a*(n*s-u)),Math.round(a*(l*s-h))]}function lx(n,l,a,s,u){for(var h=l===u.maxZoom?0:u.tolerance/((1<<l)*u.extent),v={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:a,y:s,z:l,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},m=0;m<n.length;m++){v.numFeatures++,gw(v,n[m],h,u);var w=n[m].minX,A=n[m].minY,R=n[m].maxX,B=n[m].maxY;w<v.minX&&(v.minX=w),A<v.minY&&(v.minY=A),R>v.maxX&&(v.maxX=R),B>v.maxY&&(v.maxY=B)}return v}function gw(n,l,a,s){var u=l.geometry,h=l.type,v=[];if(h==="Point"||h==="MultiPoint")for(var m=0;m<u.length;m+=3)v.push(u[m]),v.push(u[m+1]),n.numPoints++,n.numSimplified++;else if(h==="LineString")cx(v,u,n,a,!1,!1);else if(h==="MultiLineString"||h==="Polygon")for(m=0;m<u.length;m++)cx(v,u[m],n,a,h==="Polygon",m===0);else if(h==="MultiPolygon")for(var w=0;w<u.length;w++){var A=u[w];for(m=0;m<A.length;m++)cx(v,A[m],n,a,!0,m===0)}if(v.length){var R=l.tags||null;if(h==="LineString"&&s.lineMetrics){R={};for(var B in l.tags)R[B]=l.tags[B];R.mapbox_clip_start=u.start/u.size,R.mapbox_clip_end=u.end/u.size}var G={geometry:v,type:h==="Polygon"||h==="MultiPolygon"?3:h==="LineString"||h==="MultiLineString"?2:1,tags:R};l.id!==null&&(G.id=l.id),n.features.push(G)}}function cx(n,l,a,s,u,h){var v=s*s;if(s>0&&l.size<(u?v:s)){a.numPoints+=l.length/3;return}for(var m=[],w=0;w<l.length;w+=3)(s===0||l[w+2]>v)&&(a.numSimplified++,m.push(l[w]),m.push(l[w+1])),a.numPoints++;u&&mw(m,h),n.push(m)}function mw(n,l){for(var a=0,s=0,u=n.length,h=u-2;s<u;h=s,s+=2)a+=(n[s]-n[h])*(n[s+1]+n[h+1]);if(a>0===l)for(s=0,u=n.length;s<u/2;s+=2){var v=n[s],m=n[s+1];n[s]=n[u-2-s],n[s+1]=n[u-1-s],n[u-2-s]=v,n[u-1-s]=m}}function fx(n,l){return new nm(n,l)}function nm(n,l){l=this.options=$3(Object.create(this.options),l);var a=l.debug;if(a&&console.time("preprocess data"),l.maxZoom<0||l.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(l.promoteId&&l.generateId)throw new Error("promoteId and generateId cannot be used together.");var s=fg(n,l);this.tiles={},this.tileCoords=[],a&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",l.indexMaxZoom,l.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),s=dw(s,l),s.length&&this.splitTile(s,0,0,0),a&&(s.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}nm.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},nm.prototype.splitTile=function(n,l,a,s,u,h,v){for(var m=[n,l,a,s],w=this.options,A=w.debug;m.length;){s=m.pop(),a=m.pop(),l=m.pop(),n=m.pop();var R=1<<l,B=hx(l,a,s),G=this.tiles[B];if(!G&&(A>1&&console.time("creation"),G=this.tiles[B]=lx(n,l,a,s,w),this.tileCoords.push({z:l,x:a,y:s}),A)){A>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",l,a,s,G.numFeatures,G.numPoints,G.numSimplified),console.timeEnd("creation"));var j="z"+l;this.stats[j]=(this.stats[j]||0)+1,this.total++}if(G.source=n,u){if(l===w.maxZoom||l===u)continue;var lt=1<<u-l;if(a!==Math.floor(h/lt)||s!==Math.floor(v/lt))continue}else if(l===w.indexMaxZoom||G.numPoints<=w.indexMaxPoints)continue;if(G.source=null,n.length!==0){A>1&&console.time("clipping");var ct=.5*w.buffer/w.extent,_t=.5-ct,Vt=.5+ct,ce=1+ct,ae,ze,$e,xr,Or,Zr;ae=ze=$e=xr=null,Or=Kd(n,R,a-ct,a+Vt,0,G.minX,G.maxX,w),Zr=Kd(n,R,a+_t,a+ce,0,G.minX,G.maxX,w),n=null,Or&&(ae=Kd(Or,R,s-ct,s+Vt,1,G.minY,G.maxY,w),ze=Kd(Or,R,s+_t,s+ce,1,G.minY,G.maxY,w),Or=null),Zr&&($e=Kd(Zr,R,s-ct,s+Vt,1,G.minY,G.maxY,w),xr=Kd(Zr,R,s+_t,s+ce,1,G.minY,G.maxY,w),Zr=null),A>1&&console.timeEnd("clipping"),m.push(ae||[],l+1,a*2,s*2),m.push(ze||[],l+1,a*2,s*2+1),m.push($e||[],l+1,a*2+1,s*2),m.push(xr||[],l+1,a*2+1,s*2+1)}}},nm.prototype.getTile=function(n,l,a){var s=this.options,u=s.extent,h=s.debug;if(n<0||n>24)return null;var v=1<<n;l=(l%v+v)%v;var m=hx(n,l,a);if(this.tiles[m])return vw(this.tiles[m],u);h>1&&console.log("drilling down to z%d-%d-%d",n,l,a);for(var w=n,A=l,R=a,B;!B&&w>0;)w--,A=Math.floor(A/2),R=Math.floor(R/2),B=this.tiles[hx(w,A,R)];return!B||!B.source?null:(h>1&&console.log("found parent tile z%d-%d-%d",w,A,R),h>1&&console.time("drilling down"),this.splitTile(B.source,w,A,R,n,l,a),h>1&&console.timeEnd("drilling down"),this.tiles[m]?vw(this.tiles[m],u):null)};function hx(n,l,a){return((1<<n)*a+l)*32+n}function $3(n,l){for(var a in l)n[a]=l[a];return n}var q3=function(){function n(l,a,s,u){(0,pt.Z)(this,n),(0,W.Z)(this,"vectorLayerCache",{}),this.x=a,this.y=s,this.z=u,this.vectorTile=l}return(0,et.Z)(n,[{key:"getTileData",value:function(a){if(!a||!this.vectorTile.layers[a])return[];if(this.vectorLayerCache[a])return this.vectorLayerCache[a];var s=this.vectorTile.layers[a];return s.features}},{key:"getFeatureById",value:function(){throw new Error("Method not implemented.")}}]),n}(),px={tileSize:256,minZoom:0,maxZoom:1/0,zoomOffset:0};function K3(n){for(var l=0,a=0,s=n.length,u=s-1,h,v;a<s;u=a++)h=n[a],v=n[u],l+=(v.x-h.x)*(h.y+v.y);return l}function yw(n){var l=n.length;if(l<=1)return[n];for(var a=[],s,u,h=0;h<l;h++){var v=K3(n[h]);v!==0&&(u===void 0&&(u=v<0),u===v<0?(s&&a.push(s),s=[n[h]]):s.push(n[h]))}return s&&a.push(s),a}var Q3=["Unknown","Point","LineString","Polygon"];function _w(n,l,a,s,u){var h=u.geometry,v=u.type,m=u.tags,w=u.id,A=n*Math.pow(2,s),R=n*l,B=n*a,G=Q3[v],j,lt;function ct(ce){for(var ae=0;ae<ce.length;ae++){var ze=ce[ae];if(ze[3])break;var $e=180-(ze[1]+B)*360/A,xr=(ze[0]+R)*360/A-180,Or=360/Math.PI*Math.atan(Math.exp($e*Math.PI/180))-90;ce[ae]=[xr,Or,0,1]}}switch(v){case 1:var _t=[];for(j=0;j<h.length;j++)_t[j]=h[j][0];h=_t,ct(h);break;case 2:for(j=0;j<h.length;j++)ct(h[j]);break;case 3:for(h=yw(h),j=0;j<h.length;j++)for(lt=0;lt<h[j].length;lt++)ct(h[j][lt]);break}h.length===1?h=h[0]:G="Multi"+G;var Vt={type:"Feature",geometry:{type:G,coordinates:h},properties:m,id:w,tileOrigin:[0,0],coord:""};return Vt}var J3=function(){var n=(0,J.Z)(ot().mark(function l(a,s,u,h){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.abrupt("return",new Promise(function(w){var A=s.getTile(a.z,a.x,a.y),R=A?A.features.map(function(j){return _w(h,u.x,u.y,u.z,j)}):[],B={layers:{defaultLayer:{features:R}}},G=new q3(B,a.x,a.y,a.z);w(G)}));case 1:case"end":return m.stop()}},l)}));return function(a,s,u,h){return n.apply(this,arguments)}}();function t5(n){var l={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!0,debug:0};return n===void 0||typeof n.geojsonvtOptions=="undefined"?l:(0,K.Z)((0,K.Z)({},l),n.geojsonvtOptions)}function e5(n,l){var a=t5(l),s=a.extent||4096,u=fx(n,a),h=function(w,A){return J3(A,u,w,s)},v=(0,K.Z)((0,K.Z)((0,K.Z)({},px),l),{},{getTileData:h});return{data:n,dataArray:[],tilesetOptions:v,isTile:!0}}function xw(n,l,a){switch(n){case"+":return l+a;case"-":return l-a;case"*":return l*a;case"/":return l/a;case"%":return l%a;case"^":return Math.pow(l,a);case"abs":return Math.abs(l);case"floor":return Math.floor(l);case"round":return Math.round(l);case"ceil":return Math.ceil(l);case"sin":return Math.sin(l);case"cos":return Math.cos(l);case"atan":return a===-1?Math.atan(l):Math.atan2(l,a);case"min":return Math.min(l,a);case"max":return Math.max(l,a);case"log10":return Math.log(l);case"log2":return Math.log2(l);default:return console.warn("Calculate symbol err! Return default 0"),0}}function im(n,l){for(var a=l[0],s=a.width,u=a.height,h=l.map(function(j){return j.rasterData}),v=s*u,m=[],w=JSON.stringify(n),A=0;A<v;A++){var R=JSON.parse(w),B=bw(R,h,A);if(typeof B=="number")m.push(B);else{var G=dx(R);m.push(G)}}return m}function bw(n,l,a){if(n.length===2&&n[0]==="band"&&typeof n[1]=="number")try{return l[n[1]][a]}catch(s){return console.warn("Raster Data err!"),0}n.map(function(s,u){if(Array.isArray(s)&&s.length>0)switch(s[0]){case"band":try{n[u]=l[s[1]][a]}catch(h){console.warn("Raster Data err!"),n[u]=0}break;default:bw(s,l,a)}})}function r5(n){var l=(0,yt.Z)(n,3),a=l[0],s=l[1],u=s===void 0?-1:s,h=l[2],v=h===void 0?-1:h;if(a===void 0)return console.warn("Express err!"),["+",0,0];var m=a.replace(/\s+/g,"");return[m,u,v]}function dx(n){var l=r5(n),a=l[0],s=l[1],u=l[2];return Array.isArray(s)&&(s=dx(n[1])),Array.isArray(u)&&(u=dx(n[2])),xw(a,s,u)}var n5={nd:{type:"operation",expression:["/",["-",["band",1],["band",0]],["+",["band",1],["band",0]]]},rgb:{type:"function",method:i5}};function i5(n,l){for(var a=n[0].rasterData,s=n[1].rasterData,u=n[2].rasterData,h=[],v=(l==null?void 0:l.countCut)||[2,98],m=(0,yt.Z)(v,2),w=m[0],A=m[1],R=(l==null?void 0:l.RMinMax)||t1(a,w,A),B=(l==null?void 0:l.GMinMax)||t1(s,w,A),G=(l==null?void 0:l.BMinMax)||t1(u,w,A),j=0;j<a.length;j++)h.push(Math.max(0,a[j]-R[0])),h.push(Math.max(0,s[j]-B[0])),h.push(Math.max(0,u[j]-G[0]));return{rasterData:h,rMinMax:R,gMinMax:B,bMinMax:G}}function t1(n,l,a){var s=n.slice().sort(function(m,w){return m-w}),u=s.length,h=s[Math.ceil(u*l/100)],v=s[Math.ceil(u*a/100)];return[h,v]}function jc(n,l,a){return vx.apply(this,arguments)}function vx(){return vx=(0,J.Z)(ot().mark(function n(l,a,s){var u,h,v,m,w,A;return ot().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(l.length!==0){B.next=2;break}return B.abrupt("return",{rasterData:[0],width:1,heigh:1});case 2:return B.next=4,Promise.all(l.map(function(G){var j=G.data,lt=G.bands,ct=lt===void 0?[0]:lt;return a(j,ct)}));case 4:u=B.sent,h=[],u.forEach(function(G){Array.isArray(G)?h.push.apply(h,(0,Oi.Z)(G)):h.push(G)}),v=h[0],m=v.width,w=v.height,B.t0=(0,bi.Z)(s),B.next=B.t0==="function"?11:B.t0==="object"?13:15;break;case 11:return A=s(h),B.abrupt("break",16);case 13:return Array.isArray(s)?A={rasterData:im(s,h)}:A=e1(s,h),B.abrupt("break",16);case 15:A={rasterData:h[0].rasterData};case 16:return B.abrupt("return",(0,K.Z)((0,K.Z)({},A),{},{width:m,height:w}));case 17:case"end":return B.stop()}},n)})),vx.apply(this,arguments)}function e1(n,l){var a=n5[n.type];if(a.type==="function")return a.method(l,n==null?void 0:n.options);if(a.type==="operation")return n.type==="rgb"?a5(a.expression,l):{rasterData:im(a.expression,l)}}function a5(n,l){n.r===void 0&&console.warn("Channel R lost in Operation! Use band[0] to fill!"),n.g===void 0&&console.warn("Channel G lost in Operation! Use band[0] to fill!"),n.b===void 0&&console.warn("Channel B lost in Operation! Use band[0] to fill!");var a=im(n.r||["band",0],l),s=im(n.g||["band",0],l),u=im(n.b||["band",0],l);return[a,s,u]}function am(n,l,a,s){return gx.apply(this,arguments)}function gx(){return gx=(0,J.Z)(ot().mark(function n(l,a,s,u){var h;return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,jc(l,a,s);case 2:h=m.sent,u(null,{data:h});case 4:case"end":return m.stop()}},n)})),gx.apply(this,arguments)}function o5(n,l){return n.map(function(a){return a[l]*1})}function s5(n){return n===void 0?!1:!Array.isArray(n)&&n.data!==void 0}function u5(n){return Array.isArray(n)?n.length===0?!1:!!s5(n[0]):!1}function Ew(n){return Array.isArray(n)?n.length===0||typeof n[0]=="number":!1}function l5(n,l){var a=l.extent,s=l.width,u=l.height,h=l.min,v=l.max,m=l.format,w=l.operation,A,R,B;if(m===void 0||Ew(n))A=Array.from(n),R=s,B=u;else{var G=Array.isArray(n)?n:[n];A=jc(G,m,w)}var j={_id:1,dataArray:[{_id:1,data:A,width:R,height:B,min:h,max:v,coordinates:[[a[0],a[1]],[a[2],a[3]]]}]};return j}var c5=["extent","min","max","width","height","format","operation"];function f5(n,l){var a=l.extent,s=l.min,u=l.max,h=l.width,v=l.height,m=l.format,w=l.operation,A=(0,tc.Z)(l,c5),R;if(m===void 0||Ew(n))R=Array.from(n);else{var B=Array.isArray(n)?n:[n];R=jc(B,m,w)}var G={_id:1,dataArray:[(0,K.Z)((0,K.Z)({_id:1,data:R,width:h,height:v},A),{},{min:s,max:u,coordinates:[[a[0],a[1]],[a[2],a[3]]]})]};return G}var h5=function(){var n=(0,J.Z)(ot().mark(function l(a,s,u,h){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.abrupt("return",new Promise(function(w,A){s({x:a.x,y:a.y,z:a.z},function(R,B){if(R||B.length===0){A(R);return}B&&am([{data:B,bands:[0]}],u,h,function(G,j){G?A(G):j&&w(j)})})}));case 1:case"end":return m.stop()}},l)}));return function(a,s,u,h){return n.apply(this,arguments)}}();function p5(n,l){return Array.isArray(n)?typeof n[0]=="string"?n.map(function(a){return Rp(a,l)}):n.map(function(a){return{url:Rp(a.url,l),bands:a.bands||[0]}}):Rp(n,l)}function d5(n){return typeof n=="string"?[{url:n,bands:[0]}]:typeof n[0]=="string"?n.map(function(l){return{url:l,bands:[0]}}):n}function ww(n,l){n.xhrCancel=function(){l.map(function(a){a.abort()})}}var v5=function(){var n=(0,J.Z)(ot().mark(function l(a,s,u,h,v){var m,w,A,R,B,G;return ot().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:if(m=d5(s.url),!(m.length>1)){lt.next=15;break}return lt.next=4,g5(m,s);case 4:if(w=lt.sent,A=w.rasterFiles,R=w.xhrList,B=w.errList,ww(a,R),!(B.length>0)){lt.next=12;break}return u(B,null),lt.abrupt("return");case 12:am(A,h,v,u),lt.next=17;break;case 15:G=Nr(s,function(ct,_t){if(ct)u(ct);else if(_t){var Vt=[{data:_t,bands:m[0].bands}];am(Vt,h,v,u)}}),ww(a,[G]);case 17:case"end":return lt.stop()}},l)}));return function(a,s,u,h,v){return n.apply(this,arguments)}}();function g5(n,l){return r1.apply(this,arguments)}function r1(){return r1=(0,J.Z)(ot().mark(function n(l,a){var s,u,h,v,m,w,A,R,B,G,j;return ot().wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:s=[],u=[],h=[],v=0;case 4:if(!(v<l.length)){ct.next=20;break}return m=l[v],w=(0,K.Z)((0,K.Z)({},a),{},{url:m.url}),A=m.bands,ct.next=10,He((0,K.Z)((0,K.Z)({},w),{},{type:"arrayBuffer"}));case 10:R=ct.sent,B=R.err,G=R.data,j=R.xhr,B&&h.push(B),u.push(j),s.push({data:G,bands:A});case 17:v++,ct.next=4;break;case 20:return ct.abrupt("return",{rasterFiles:s,xhrList:u,errList:h});case 21:case"end":return ct.stop()}},n)})),r1.apply(this,arguments)}var Sw=function(){var n=(0,J.Z)(ot().mark(function l(a,s,u,h,v){var m;return ot().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return m={url:p5(a,s)},A.abrupt("return",new Promise(function(R,B){v5(u,m,function(G,j){G?B(G):j&&R(j)},h,v)}));case 2:case"end":return A.stop()}},l)}));return function(a,s,u,h,v){return n.apply(this,arguments)}}(),Cw=function(){var n=(0,J.Z)(ot().mark(function l(a,s,u,h){var v,m,w,A;return ot().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return m=Array.isArray(a)?a[0]:a,h.wmtsOptions?(w=(h==null?void 0:h.getURLFromTemplate)||Qf,v=w(m,(0,K.Z)((0,K.Z)({},s),h.wmtsOptions))):(A=(h==null?void 0:h.getURLFromTemplate)||Rp,v=A(m,s)),B.abrupt("return",new Promise(function(G,j){var lt,ct=eo({url:v,type:(h==null||(lt=h.requestParameters)===null||lt===void 0?void 0:lt.type)||"arrayBuffer"},function(_t,Vt){_t?j(_t):Vt&&G(Vt)},h.transformResponse);u.xhrCancel=function(){return ct.abort()}}));case 3:case"end":return B.stop()}},l)}));return function(a,s,u,h){return n.apply(this,arguments)}}(),mx=function(){return{rasterData:new Uint8Array([0]),width:1,height:1}},m5={tileSize:256,minZoom:0,maxZoom:1/0,zoomOffset:0,warp:!0},WO=[vp.ARRAYBUFFER,vp.RGB];function y5(n){return!!(Array.isArray(n)&&n.length===0||!Array.isArray(n)&&typeof n!="string")}function _5(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(y5(n))throw new Error("tile server url is error");var a=(l==null?void 0:l.dataType)||vp.IMAGE;a===vp.RGB&&(a=vp.ARRAYBUFFER);var s=function(v,m){switch(a){case vp.IMAGE:return Cw(n,v,m,l);case vp.ARRAYBUFFER:return Sw(n,v,m,(l==null?void 0:l.format)||mx,l==null?void 0:l.operation);case vp.CUSTOMARRAYBUFFER:case vp.CUSTOMRGB:return h5(m,l==null?void 0:l.getCustomData,(l==null?void 0:l.format)||mx,l==null?void 0:l.operation);default:return Cw(n,v,m,l)}},u=(0,K.Z)((0,K.Z)((0,K.Z)({},m5),l),{},{getTileData:s});return{data:n,dataArray:[],tilesetOptions:u,isTile:!0}}var x5={tileSize:256,minZoom:0,maxZoom:1/0,zoomOffset:0},b5=function(){var n=(0,J.Z)(ot().mark(function l(a){return ot().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",new Promise(function(h){var v=(0,yt.Z)(a.bounds,4),m=v[0],w=v[1],A=v[2],R=v[3],B={layers:{testTile:{features:[{type:"Feature",properties:{key:a.x+"/"+a.y+"/"+a.z,textLng:(m+A)/2,textLat:(w+R)/2},geometry:{type:"LineString",coordinates:[[A,R],[A,w],[m,w],[m,w]]}}]}}};h(B)}));case 1:case"end":return u.stop()}},l)}));return function(a){return n.apply(this,arguments)}}();function E5(n,l){var a=function(h){return b5(h)},s=(0,K.Z)((0,K.Z)((0,K.Z)({},x5),l),{},{getTileData:a});return{data:n,dataArray:[],tilesetOptions:s,isTile:!0}}function Aw(n,l){var a=l.radius,s=a===void 0?40:a,u=l.maxZoom,h=u===void 0?18:u,v=l.minZoom,m=v===void 0?0:v,w=l.zoom,A=w===void 0?2:w;if(n.pointIndex){var R=n.pointIndex.getClusters(n.extent,Math.floor(A));return n.dataArray=w5(R),n}var B=new(H_())({radius:s,minZoom:m,maxZoom:h}),G={type:"FeatureCollection",features:[]};return G.features=n.dataArray.map(function(j){return{type:"Feature",geometry:{type:"Point",coordinates:j.coordinates},properties:(0,K.Z)({},j)}}),B.load(G.features),B}function w5(n){return n.map(function(l,a){return(0,K.Z)({coordinates:l.geometry.coordinates,_id:a+1},l.properties)})}function S5(n){if(n.length===0)throw new Error("max requires at least one data point");for(var l=n[0],a=1;a<n.length;a++)n[a]>l&&(l=n[a]);return l}function C5(n){if(n.length===0)throw new Error("min requires at least one data point");for(var l=n[0],a=1;a<n.length;a++)n[a]<l&&(l=n[a]);return l}function ed(n){if(n.length===0)return 0;for(var l=n[0],a=0,s,u=1;u<n.length;u++)s=l+n[u]*1,Math.abs(l)>=Math.abs(n[u])?a+=l-s+n[u]:a+=n[u]-s+l,l=s;return l+a*1}function Tw(n){if(n.length===0)throw new Error("mean requires at least one data point");return ed(n)/n.length}var Uf={min:C5,max:S5,mean:Tw,sum:ed};function gp(n){var l=Mw();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Mw(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}function Iw(n,l){if(Array.isArray(l))return l}var XO=function(n){(0,zt.Z)(a,n);var l=gp(a);function a(s,u){var h;return(0,pt.Z)(this,a),h=l.call(this),(0,W.Z)((0,ut.Z)(h),"type","source"),(0,W.Z)((0,ut.Z)(h),"isTile",!1),(0,W.Z)((0,ut.Z)(h),"inited",!1),(0,W.Z)((0,ut.Z)(h),"hooks",{init:new Kp}),(0,W.Z)((0,ut.Z)(h),"parser",{type:"geojson"}),(0,W.Z)((0,ut.Z)(h),"transforms",[]),(0,W.Z)((0,ut.Z)(h),"cluster",!1),(0,W.Z)((0,ut.Z)(h),"clusterOptions",{enable:!1,radius:40,maxZoom:20,zoom:-99,method:"count"}),(0,W.Z)((0,ut.Z)(h),"invalidExtent",!1),(0,W.Z)((0,ut.Z)(h),"dataArrayChanged",!1),(0,W.Z)((0,ut.Z)(h),"cfg",{autoRender:!0}),h.originData=s,h.initCfg(u),h.init().then(function(){h.inited=!0,h.emit("update",{type:"inited"})}),h}return(0,et.Z)(a,[{key:"getSourceCfg",value:function(){return this.cfg}},{key:"getClusters",value:function(u){return this.clusterIndex.getClusters(this.caculClusterExtent(2),u)}},{key:"getClustersLeaves",value:function(u){return this.clusterIndex.getLeaves(u,1/0)}},{key:"getParserType",value:function(){return this.parser.type}},{key:"updateClusterData",value:function(u){var h=this,v=this.clusterOptions,m=v.method,w=m===void 0?"sum":m,A=v.field,R=this.clusterIndex.getClusters(this.caculClusterExtent(2),Math.floor(u));this.clusterOptions.zoom=u,R.forEach(function(B){B.id||(B.properties.point_count=1)}),(A||(0,Fn.isFunction)(w))&&(R=R.map(function(B){var G=B.id;if(G){var j=h.clusterIndex.getLeaves(G,1/0),lt=j.map(function(Vt){return Vt.properties}),ct;if((0,Fn.isString)(w)&&A){var _t=o5(lt,A);ct=Uf[w](_t)}(0,Fn.isFunction)(w)&&(ct=w(lt)),B.properties.stat=ct}else B.properties.point_count=1;return B})),this.data=ew("geojson")({type:"FeatureCollection",features:R}),this.executeTrans()}},{key:"getFeatureById",value:function(u){var h=this.parser,v=h.type,m=v===void 0?"geojson":v,w=h.geometry;if(m==="geojson"&&!this.cluster){var A=u<this.originData.features.length?this.originData.features[u]:"null",R=(0,Fn.cloneDeep)(A);if(R!=null&&R.properties&&(this.transforms.length!==0||this.dataArrayChanged)){var B=this.data.dataArray.find(function(G){return G._id===u});R.properties=B}return R}else return m==="json"&&w?this.data.dataArray.find(function(G){return G._id===u}):u<this.data.dataArray.length?this.data.dataArray[u]:"null"}},{key:"updateFeaturePropertiesById",value:function(u,h){this.data.dataArray=this.data.dataArray.map(function(v){return v._id===u?(0,K.Z)((0,K.Z)({},v),h):v}),this.dataArrayChanged=!0,this.emit("update",{type:"update"})}},{key:"getFeatureId",value:function(u,h){var v=this.data.dataArray.find(function(m){return m[u]===h});return v==null?void 0:v._id}},{key:"setData",value:function(u,h){var v=this;this.originData=u,this.dataArrayChanged=!1,this.initCfg(h),this.init().then(function(){v.emit("update",{type:"update"})})}},{key:"destroy",value:function(){var u;this.removeAllListeners(),this.originData=null,this.clusterIndex=null,this.data=null,(u=this.tileset)===null||u===void 0||u.destroy()}},{key:"processData",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v=this;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,new Promise(function(A,R){try{v.excuteParser(),v.initCluster(),v.executeTrans(),A({})}catch(B){R(B)}});case 2:return w.abrupt("return",w.sent);case 3:case"end":return w.stop()}},h)}));function u(){return s.apply(this,arguments)}return u}()},{key:"initCfg",value:function(u){this.cfg=(0,Fn.mergeWith)(this.cfg,u,Iw);var h=this.cfg;h&&(h.parser&&(this.parser=h.parser),h.transforms&&(this.transforms=h.transforms),this.cluster=h.cluster||!1,h.clusterOptions&&(this.cluster=!0,this.clusterOptions=(0,K.Z)((0,K.Z)({},this.clusterOptions),h.clusterOptions)))}},{key:"init",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return this.inited=!1,m.next=3,this.processData();case 3:this.inited=!0;case 4:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"excuteParser",value:function(){var u=this.parser,h=u.type||"geojson",v=ew(h);this.data=v(this.originData,u),this.tileset=this.initTileset(),!u.cancelExtent&&(this.extent=Op(this.data.dataArray),this.setCenter(this.extent),this.invalidExtent=this.extent[0]===this.extent[2]||this.extent[1]===this.extent[3])}},{key:"setCenter",value:function(u){this.center=[(u[0]+u[2])/2,(u[1]+u[3])/2],(isNaN(this.center[0])||isNaN(this.center[1]))&&(this.center=[108.92361111111111,34.54083333333333])}},{key:"initTileset",value:function(){var u=this.data.tilesetOptions;if(u){if(this.isTile=!0,this.tileset)return this.tileset.updateOptions(u),this.tileset;var h=new Eh((0,K.Z)({},u));return h}}},{key:"executeTrans",value:function(){var u=this,h=this.transforms;h.forEach(function(v){var m=v.type,w=R3(m)(u.data,v);Object.assign(u.data,w)})}},{key:"initCluster",value:function(){if(this.cluster){var u=this.clusterOptions||{};this.clusterIndex=Aw(this.data,u)}}},{key:"caculClusterExtent",value:function(u){var h=[[-1/0,-1/0],[1/0,1/0]];return this.invalidExtent||(h=Ut(Fe(this.extent),u)),h[0].concat(h[1])}}]),a}(be.EventEmitter);function Qd(n,l){var a=l.callback;return a&&(n.dataArray=n.dataArray.filter(a)),n}function ys(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=yx(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,u=function(){};return{s:u,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function yx(n,l){if(n){if(typeof n=="string")return _x(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _x(n,l)}}function _x(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a<l;a++)s[a]=n[a];return s}var Dv=6378e3;function A5(n,l){var a=n.dataArray,s=l.size,u=s===void 0?10:s,h=u/(2*Math.PI*Dv)*(256<<20)/2,v=T5(a,u),m=v.gridHash,w=v.gridOffset,A=Lw(m,w,l);return{yOffset:h,xOffset:h,radius:h,type:"grid",dataArray:A}}function T5(n,l){var a=1/0,s=-1/0,u,h=ys(n),v;try{for(h.s();!(v=h.n()).done;){var m=v.value;u=m.coordinates[1],Number.isFinite(u)&&(a=u<a?u:a,s=u>s?u:s)}}catch(ae){h.e(ae)}finally{h.f()}var w=(a+s)/2,A=kw(l,w);if(A.xOffset<=0||A.yOffset<=0)return{gridHash:{},gridOffset:A};var R={},B=ys(n),G;try{for(B.s();!(G=B.n()).done;){var j=G.value,lt=j.coordinates[1],ct=j.coordinates[0];if(Number.isFinite(lt)&&Number.isFinite(ct)){var _t=Math.floor((lt+90)/A.yOffset),Vt=Math.floor((ct+180)/A.xOffset),ce="".concat(_t,"-").concat(Vt);R[ce]=R[ce]||{count:0,points:[]},R[ce].count+=1,R[ce].points.push(j)}}}catch(ae){B.e(ae)}finally{B.f()}return{gridHash:R,gridOffset:A}}function kw(n,l){var a=M5(n),s=I5(l,n);return{yOffset:a,xOffset:s}}function M5(n){return n/Dv*(180/Math.PI)}function I5(n,l){return l/Dv*(180/Math.PI)/Math.cos(n*Math.PI/180)}function Lw(n,l,a){return Object.keys(n).reduce(function(s,u,h){var v=u.split("-"),m=parseInt(v[0],10),w=parseInt(v[1],10),A={};if(a.field&&a.method){var R=oc(n[u].points,a.field);A[a.method]=Xs[a.method](R)}return Object.assign(A,{_id:h,coordinates:E([-180+l.xOffset*(w+.5),-90+l.yOffset*(m+.5)]),rawData:n[u].points,count:n[u].count}),s.push(A),s},[])}var A0=Math.PI/3,hn=[0,A0,2*A0,3*A0,4*A0,5*A0];function xx(n){return n[0]}function Za(n){return n[1]}function Pc(){var n=0,l=0,a=1,s=1,u=xx,h=Za,v,m,w;function A(B){var G={},j=[],lt,ct=B.length;for(lt=0;lt<ct;++lt)if(!(isNaN(Vt=+u.call(null,_t=B[lt],lt,B))||isNaN(ce=+h.call(null,_t,lt,B)))){var _t,Vt,ce,ae=Math.round(ce=ce/w),ze=Math.round(Vt=Vt/m-(ae&1)/2),$e=ce-ae;if(Math.abs($e)*3>1){var xr=Vt-ze,Or=ze+(Vt<ze?-1:1)/2,Zr=ae+(ce<ae?-1:1),Wr=Vt-Or,wn=ce-Zr;xr*xr+$e*$e>Wr*Wr+wn*wn&&(ze=Or+(ae&1?1:-1)/2,ae=Zr)}var vn=ze+"-"+ae,Kn=G[vn];Kn?Kn.push(_t):(j.push(Kn=G[vn]=[_t]),Kn.x=(ze+(ae&1)/2)*m,Kn.y=ae*w)}return j}function R(B){var G=0,j=0;return hn.map(function(lt){var ct=Math.sin(lt)*B,_t=-Math.cos(lt)*B,Vt=ct-G,ce=_t-j;return G=ct,j=_t,[Vt,ce]})}return A.hexagon=function(B){return"m"+R(B==null?v:+B).join("l")+"z"},A.centers=function(){for(var B=[],G=Math.round(l/w),j=Math.round(n/m),lt=G*w;lt<s+v;lt+=w,++G)for(var ct=j*m+(G&1)*m/2;ct<a+m/2;ct+=m)B.push([ct,lt]);return B},A.mesh=function(){var B=R(v).slice(0,4).join("l");return A.centers().map(function(G){return"M"+G+"m"+B}).join("")},A.x=function(B){return arguments.length?(u=B,A):u},A.y=function(B){return arguments.length?(h=B,A):h},A.radius=function(B){return arguments.length?(v=+B,m=v*2*Math.sin(A0),w=v*1.5,A):v},A.size=function(B){return arguments.length?(n=l=0,a=+B[0],s=+B[1],A):[a-n,s-l]},A.extent=function(B){return arguments.length?(n=+B[0][0],l=+B[0][1],a=+B[1][0],s=+B[1][1],A):[[n,l],[a,s]]},A.radius(1)}var n1=6378e3;function om(n,l){var a=n.dataArray,s=l.size,u=s===void 0?10:s,h=l.method,v=h===void 0?"sum":h,m=u/(2*Math.PI*n1)*(256<<20)/2,w=a.map(function(G){var j=E(G.coordinates),lt=(0,yt.Z)(j,2),ct=lt[0],_t=lt[1];return(0,K.Z)((0,K.Z)({},G),{},{coordinates:[ct,_t]})}),A=Pc().radius(m).x(function(G){return G.coordinates[0]}).y(function(G){return G.coordinates[1]}),R=A(w),B={dataArray:R.map(function(G,j){var lt;if(l.field&&v){var ct=oc(G,l.field);G[v]=Xs[v](ct)}return lt={},(0,W.Z)(lt,l.method,G[v]),(0,W.Z)(lt,"count",G.length),(0,W.Z)(lt,"rawData",G),(0,W.Z)(lt,"coordinates",[G.x,G.y]),(0,W.Z)(lt,"_id",j),lt}),radius:m,xOffset:m,yOffset:m,type:"hexagon"};return B}function k5(n,l){var a=l.sourceField,s=l.targetField,u=l.data,h={};return u.forEach(function(v){h[v[a]]=v}),n.dataArray=n.dataArray.map(function(v){var m=v[s];return(0,K.Z)((0,K.Z)({},v),h[m])}),n}function ec(n,l){var a=l.callback;return a&&(n.dataArray=n.dataArray.map(a)),n}td("rasterTile",_5),td("mvt",W3),td("geojsonvt",e5),td("testTile",E5),td("geojson",uw),td("image",ex),td("csv",S0),td("json",sw),td("raster",l5),td("rasterRgb",f5),ug("cluster",Aw),ug("filter",Qd),ug("join",k5),ug("map",ec),ug("grid",A5),ug("hexagon",om);var T0=XO,Bv,Pw=(Bv={},(0,W.Z)(Bv,dp.additive,{enable:!0,func:{srcRGB:ne.ONE,dstRGB:ne.ONE,srcAlpha:1,dstAlpha:1}}),(0,W.Z)(Bv,dp.none,{enable:!1}),(0,W.Z)(Bv,dp.normal,{enable:!0,func:{srcRGB:ne.SRC_ALPHA,dstRGB:ne.ONE_MINUS_SRC_ALPHA,srcAlpha:1,dstAlpha:1}}),(0,W.Z)(Bv,dp.subtractive,{enable:!0,func:{srcRGB:ne.ONE,dstRGB:ne.ONE,srcAlpha:ne.ZERO,dstAlpha:ne.ONE_MINUS_SRC_COLOR},equation:{rgb:ne.FUNC_SUBTRACT,alpha:ne.FUNC_SUBTRACT}}),(0,W.Z)(Bv,dp.max,{enable:!0,func:{srcRGB:ne.ONE,dstRGB:ne.ONE},equation:{rgb:ne.MAX_EXT}}),(0,W.Z)(Bv,dp.min,{enable:!0,func:{srcRGB:ne.ONE,dstRGB:ne.ONE},equation:{rgb:ne.MIN_EXT}}),Bv);function rc(n,l,a,s,u){l.updateStyleAttribute(n,a,s,u)}function L5(n,l){l.tileLayer||l.isTileLayer||(n.opacity&&mp("opacity",l,n.opacity),n.strokeWidth&&mp("strokeWidth",l,n.strokeWidth),n.strokeOpacity&&mp("strokeOpacity",l,n.strokeOpacity),n.stroke&&bx("stroke",l,n.stroke),n.offsets&&sm("offsets",l,n.offsets),n.textOffset&&sm("textOffset",l,n.textOffset),n.thetaOffset&&mp("thetaOffset",l,n.thetaOffset))}function mp(n,l,a){(0,Fn.isString)(a)?rc(n,l,a,function(s){return s}):(0,Fn.isNumber)(a)||(Array.isArray(a)&&a.length===2?(0,Fn.isString)(a[0])&&(0,Fn.isFunction)(a[1])||(0,Fn.isString)(a[0])&&Array.isArray(a[1])&&(0,Fn.isNumber)(a[1][0])&&(0,Fn.isNumber)(a[1][1])?rc(n,l,a[0],a[1]):rc(n,l,[1],void 0):rc(n,l,[1],void 0))}function sm(n,l,a){(0,Fn.isString)(a)?rc(n,l,a,function(s){return s}):Array.isArray(a)&&a.length===2&&(0,Fn.isString)(a[0])&&(0,Fn.isFunction)(a[1])?rc(n,l,a[0],a[1]):Array.isArray(a)&&a.length===2&&(0,Fn.isNumber)(a[0])&&(0,Fn.isNumber)(a[1])?rc(n,l,a,void 0):rc(n,l,[0,0],void 0)}function bx(n,l,a){(0,Fn.isString)(a)||(Array.isArray(a)&&a.length===2&&((0,Fn.isString)(a[0])&&(0,Fn.isFunction)(a[1])||(0,Fn.isString)(a[0])&&Array.isArray(a[1])&&a[1].length>0)?rc(n,l,a[0],a[1]):rc(n,l,"#fff",void 0))}var Oc;(function(n){n["GAODE1.x"]="GAODE1.x",n["GAODE2.x"]="GAODE2.x",n.MAPBOX="MAPBOX",n.DEFUALT="DEFUALTMAP",n.SIMPLE="SIMPLE",n.GLOBEL="GLOBEL"})(Oc||(Oc={}));function P5(n,l){var a=[l[0]-n[0],l[1]-n[1]],s=Re(a),u=[n[0]+s[0]*1e-4,n[1]+s[1]*1e-4];return u}function O5(n,l,a){if(n.length>0&&l.version===Oc["GAODE2.x"]){var s=a.coordCenter;typeof n[0].coordinates[0]=="number"?n.filter(function(u){return!u.originCoordinates}).map(function(u){u.version=Oc["GAODE2.x"],u.originCoordinates=(0,Fn.cloneDeep)(u.coordinates),u.coordinates=l.lngLatToCoordByLayer(u.coordinates,s)}):n.filter(function(u){return!u.originCoordinates}).map(function(u){u.version=Oc["GAODE2.x"],u.originCoordinates=(0,Fn.cloneDeep)(u.coordinates),u.coordinates=l.lngLatToCoordsByLayer(u.coordinates,s)})}}function F5(n,l){n.length>0&&l.version===Oc.SIMPLE&&n.map(function(a){a.simpleCoordinate||(a.coordinates=Ow(a.coordinates,l),a.simpleCoordinate=!0)})}function Ow(n,l){if(typeof n[0]=="number")return l.simpleMapCoord.unproject(n);if(n[0]&&n[0][0]instanceof Array){var a=[];return n.map(function(u){var h=[];u.map(function(v){h.push(l.simpleMapCoord.unproject(v))}),a.push(h)}),a}else{var s=[];return n.map(function(u){s.push(l.simpleMapCoord.unproject(u))}),s}}function Fw(n,l){var a;if(!n.scale)return[];var s=(n==null||(a=n.scale)===null||a===void 0?void 0:a.scalers)||[],u=[];s.forEach(function(v){var m,w=v.field;(l.hasOwnProperty(w)||((m=n.scale)===null||m===void 0?void 0:m.type)==="variable")&&u.push(l[w])});var h=n.mapping?n.mapping(u):[];return h}function Rw(n,l,a,s,u){var h=u==null?void 0:u.getLayerConfig(),v=h.arrow,m=v===void 0?{enable:!1}:v,w=l.map(function(A){var R={id:A._id,coordinates:A.coordinates};if(n.filter(function(j){return j.scale!==void 0}).forEach(function(j){var lt=Fw(j,A);j.needRemapping=!1,j.name==="color"&&(lt=lt.map(function(ct){return Lo(ct)})),R[j.name]=Array.isArray(lt)&<.length===1?lt[0]:lt,j.name==="shape"&&(R.shape=a.getIconFontKey(R[j.name]))}),R.shape==="line"&&m.enable){var B=R.coordinates,G=P5(B[0],B[1]);R.coordinates.splice(1,0,G,G)}return R});return O5(w,s,u),F5(w,s),w}function i1(n,l,a,s,u,h){var v=new T0(u,h),m=s.getLayerStyleAttributes()||[],w=v.data.dataArray,A=w,R=Rw(m,A,l,a,n);return v.destroy(),R}function Dw(n){return n.map(function(l){return typeof l=="string"&&(l=[l,{}]),l})}function Ex(n,l,a,s){var u=n.multiPassRenderer,h=n.getLayerConfig(),v=h.enableTAA;return v?u.add(s("taa")):u.add(s("render")),Dw(l).forEach(function(m){var w=(0,yt.Z)(m,2),A=w[0],R=w[1];u.add(a(A),R)}),u.add(a("copy")),u}var xo=function(){function n(l){(0,pt.Z)(this,n),this.layer=l}return(0,et.Z)(n,[{key:"pickRender",value:function(a){var s=this.layer;if(s.tileLayer)return s.tileLayer.pickRender(a);s.hooks.beforePickingEncode.call(),s.masks.length>0&&s.masks.filter(function(u){return u.inited}).forEach(function(){var u=(0,J.Z)(ot().mark(function h(v){return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:v.render();case 1:case"end":return w.stop()}},h)}));return function(h){return u.apply(this,arguments)}}()),s.renderModels(!0),s.hooks.afterPickingEncode.call()}},{key:"pick",value:function(a,s){var u=this.layer.getContainer(),h=u.get(Dt.IPickingService);return a.type==="RasterLayer"?this.pickRasterLayer(a,s):(this.pickRender(s),h.pickFromPickingFBO(a,s))}},{key:"pickRasterLayer",value:function(a,s,u){var h=this.layer.getContainer(),v=h.get(Dt.IPickingService),m=h.get(Dt.IMapService),w=this.layer.getSource().extent,A=Lf(s.lngLat,w),R={x:s.x,y:s.y,type:s.type,lngLat:s.lngLat,target:s,rasterValue:null},B=u||a;if(A){var G=this.readRasterValue(a,w,m,s.x,s.y);return R.rasterValue=G,v.triggerHoverOnLayer(B,R),!0}else return R.type=s.type==="mousemove"?"mouseout":"un"+s.type,v.triggerHoverOnLayer(B,(0,K.Z)((0,K.Z)({},R),{},{type:"unpick"})),v.triggerHoverOnLayer(B,R),!1}},{key:"readRasterValue",value:function(a,s,u,h,v){var m=a.getSource().data.dataArray[0],w=(0,yt.Z)(s,4),A=w[0],R=A===void 0?0:A,B=w[1],G=B===void 0?0:B,j=w[2],lt=j===void 0?10:j,ct=w[3],_t=ct===void 0?-10:ct,Vt=u.lngLatToContainer([R,G]),ce=u.lngLatToContainer([lt,_t]),ae=ce.x-Vt.x,ze=Vt.y-ce.y,$e=[(h-Vt.x)/ae,(v-ce.y)/ze],xr=m.width||1,Or=m.height||1,Zr=Math.floor($e[0]*xr),Wr=Math.floor($e[1]*Or),wn=Math.max(0,Wr-1)*xr+Zr,vn=m.data[wn];return vn}},{key:"selectFeature",value:function(a){var s=this.layer,u=(0,yt.Z)(a,3),h=u[0],v=u[1],m=u[2];s.hooks.beforeSelect.call([h,v,m])}},{key:"highlightPickedFeature",value:function(a){var s=(0,yt.Z)(a,3),u=s[0],h=s[1],v=s[2];this.layer.hooks.beforeHighlight.call([u,h,v])}},{key:"getFeatureById",value:function(a){return this.layer.getSource().getFeatureById(a)}}]),n}(),um=function(){function n(l){(0,pt.Z)(this,n),this.layer=l;var a=this.layer.getContainer();this.rendererService=a.get(Dt.IRendererService)}return(0,et.Z)(n,[{key:"getColorTexture",value:function(a,s){var u=this.getTextureKey(a,s);return this.key===u?this.colorTexture:(this.createColorTexture(a,s),this.key=u,this.colorTexture)}},{key:"createColorTexture",value:function(a,s){var u=this.rendererService.createTexture2D,h=this.getColorRampBar(a,s),v=u({data:h.data,width:h.width,height:h.height,flipY:!1});return this.colorTexture=v,v}},{key:"setColorTexture",value:function(a,s,u){this.key=this.getTextureKey(s,u),this.colorTexture=a}},{key:"destroy",value:function(){var a;(a=this.colorTexture)===null||a===void 0||a.destroy()}},{key:"getColorRampBar",value:function(a,s){switch(a.type){case"cat":return fh(a);case"quantize":return Tp(a);case"custom":return Gh(a,s);case"linear":return ch(a,s);default:return Qc(a)}}},{key:"getTextureKey",value:function(a,s){var u;return"".concat(a.colors.join("_"),"_").concat(a==null||(u=a.positions)===null||u===void 0?void 0:u.join("_"),"_").concat(a.type,"_").concat(s==null?void 0:s.join("_"))}}]),n}(),Bw=["passes"],lm=["moduleName","vertexShader","fragmentShader","triangulation","segmentNumber","workerEnabled","workerOptions"],cm,fm,a1;function Nw(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=zw(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,u=function(){};return{s:u,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function zw(n,l){if(n){if(typeof n=="string")return o1(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return o1(n,l)}}function o1(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a<l;a++)s[a]=n[a];return s}function R5(n){var l=D5();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function D5(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Uw=0,hg=(cm=Z_(Dt.IGlobalConfigService),fm=function(n){(0,zt.Z)(a,n);var l=R5(a);function a(){var s,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,pt.Z)(this,a),s=l.call(this),(0,W.Z)((0,ut.Z)(s),"id","".concat(Uw++)),(0,W.Z)((0,ut.Z)(s),"name","".concat(Uw)),(0,W.Z)((0,ut.Z)(s),"visible",!0),(0,W.Z)((0,ut.Z)(s),"zIndex",0),(0,W.Z)((0,ut.Z)(s),"inited",!1),(0,W.Z)((0,ut.Z)(s),"layerModelNeedUpdate",!1),(0,W.Z)((0,ut.Z)(s),"pickedFeatureID",null),(0,W.Z)((0,ut.Z)(s),"selectedFeatureID",null),(0,W.Z)((0,ut.Z)(s),"styleNeedUpdate",!1),(0,W.Z)((0,ut.Z)(s),"forceRender",!1),(0,W.Z)((0,ut.Z)(s),"clusterZoom",0),(0,W.Z)((0,ut.Z)(s),"defaultSourceConfig",{data:[],options:{parser:{type:"json"}}}),(0,W.Z)((0,ut.Z)(s),"dataState",{dataSourceNeedUpdate:!1,dataMappingNeedUpdate:!1,filterNeedUpdate:!1,featureScaleNeedUpdate:!1,StyleAttrNeedUpdate:!1}),(0,W.Z)((0,ut.Z)(s),"hooks",{init:new hO,afterInit:new My,beforeRender:new My,beforeRenderData:new Oh,afterRender:new Kp,beforePickingEncode:new Kp,afterPickingEncode:new Kp,beforeHighlight:new Kp(["pickedColor"]),afterHighlight:new Kp,beforeSelect:new Kp(["pickedColor"]),afterSelect:new Kp,beforeDestroy:new Kp,afterDestroy:new Kp}),(0,W.Z)((0,ut.Z)(s),"models",[]),(0,W.Z)((0,ut.Z)(s),"startInit",!1),(0,W.Z)((0,ut.Z)(s),"layerChildren",[]),(0,W.Z)((0,ut.Z)(s),"masks",[]),Rn((0,ut.Z)(s),"configService",a1,(0,ut.Z)(s)),(0,W.Z)((0,ut.Z)(s),"animateOptions",{enable:!1}),(0,W.Z)((0,ut.Z)(s),"currentPickId",null),(0,W.Z)((0,ut.Z)(s),"pendingStyleAttributes",[]),(0,W.Z)((0,ut.Z)(s),"scaleOptions",{}),(0,W.Z)((0,ut.Z)(s),"animateStatus",!1),(0,W.Z)((0,ut.Z)(s),"isDestroyed",!1),(0,W.Z)((0,ut.Z)(s),"encodeDataLength",0),(0,W.Z)((0,ut.Z)(s),"sourceEvent",function(){s.dataState.dataSourceNeedUpdate=!0;var h=s.getLayerConfig();h&&h.autoFit&&s.fitBounds(h.fitBoundsOptions);var v=s.layerSource.getSourceCfg().autoRender;v&&s.reRender()}),s.name=u.name||s.id,s.zIndex=u.zIndex||0,s.rawConfig=u,s}return(0,et.Z)(a,[{key:"addMaskLayer",value:function(u){this.masks.push(u)}},{key:"removeMaskLayer",value:function(u){var h=this.masks.indexOf(u);h>-1&&this.masks.splice(h,1),u.destroy()}},{key:"getAttribute",value:function(u){return this.styleAttributeService.getLayerStyleAttribute(u)}},{key:"getLayerConfig",value:function(){return this.configService.getLayerConfig(this.id)}},{key:"updateLayerConfig",value:function(u){var h=this;if(Object.keys(u).map(function(m){m in h.rawConfig&&(h.rawConfig[m]=u[m])}),!this.startInit)this.needUpdateConfig=(0,K.Z)((0,K.Z)({},this.needUpdateConfig),u);else{var v=this.container.get(Dt.SceneID);L5(u,this),this.configService.setLayerConfig(v,this.id,(0,K.Z)((0,K.Z)((0,K.Z)({},this.configService.getLayerConfig(this.id)),this.needUpdateConfig),u)),this.needUpdateConfig={}}}},{key:"setContainer",value:function(u,h){this.container=u,this.sceneContainer=h}},{key:"getContainer",value:function(){return this.container}},{key:"addPlugin",value:function(u){return this.plugins.push(u),this}},{key:"init",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v=this,m,w,A,R,B,G,j;return ot().wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:m=this.container.get(Dt.SceneID),this.startInit=!0,this.configService.setLayerConfig(m,this.id,this.rawConfig),this.layerType=this.rawConfig.layerType,this.iconService=this.container.get(Dt.IIconService),this.fontService=this.container.get(Dt.IFontService),this.rendererService=this.container.get(Dt.IRendererService),this.layerService=this.container.get(Dt.ILayerService),this.interactionService=this.container.get(Dt.IInteractionService),this.pickingService=this.container.get(Dt.IPickingService),this.mapService=this.container.get(Dt.IMapService),w=this.getLayerConfig(),A=w.enableMultiPassRenderer,R=w.passes,A&&R!==null&&R!==void 0&&R.length&&R.length>0&&this.mapService.on("mapAfterFrameChange",function(){v.renderLayers()}),this.cameraService=this.container.get(Dt.ICameraService),this.coordinateService=this.container.get(Dt.ICoordinateSystemService),this.shaderModuleService=this.container.get(Dt.IShaderModuleService),this.postProcessingPassFactory=this.container.get(Dt.IFactoryPostProcessingPass),this.normalPassFactory=this.container.get(Dt.IFactoryNormalPass),this.styleAttributeService=this.container.get(Dt.IStyleAttributeService),A&&(this.multiPassRenderer=this.container.get(Dt.IMultiPassRenderer),this.multiPassRenderer.setLayer(this)),this.pendingStyleAttributes.forEach(function(_t){var Vt=_t.attributeName,ce=_t.attributeField,ae=_t.attributeValues,ze=_t.updateOptions;v.styleAttributeService.updateStyleAttribute(Vt,{scale:(0,K.Z)({field:ce},v.splitValuesAndCallbackInAttribute(ae,v.getLayerConfig()[Vt]))},ze)}),this.pendingStyleAttributes=[],this.plugins=this.container.getAll(Dt.ILayerPlugin),B=Nw(this.plugins);try{for(B.s();!(G=B.n()).done;)j=G.value,j.apply(this,{rendererService:this.rendererService,mapService:this.mapService,styleAttributeService:this.styleAttributeService,normalPassFactory:this.normalPassFactory,postProcessingPassFactory:this.postProcessingPassFactory})}catch(_t){B.e(_t)}finally{B.f()}return this.layerPickService=new xo(this),this.textureService=new um(this),ct.next=29,this.hooks.init.promise();case 29:this.inited=!0,this.emit("inited",{target:this,type:"inited"}),this.emit("add",{target:this,type:"add"}),this.hooks.afterInit.call();case 33:case"end":return ct.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"updateModelData",value:function(u){u.attributes&&u.elements?this.models.map(function(h){h.updateAttributesAndElements(u.attributes,u.elements)}):console.warn("data error")}},{key:"createModelData",value:function(u,h){var v;if((v=this.layerModel)!==null&&v!==void 0&&v.createModelData)return this.layerModel.createModelData(h);var m=this.calculateEncodeData(u,h),w=this.triangulation;return m&&w?this.styleAttributeService.createAttributesAndIndices(m,w):{attributes:void 0,elements:void 0}}},{key:"setLayerPickService",value:function(u){this.layerPickService=u}},{key:"calculateEncodeData",value:function(u,h){return this.inited?i1(this,this.fontService,this.mapService,this.styleAttributeService,u,h):(console.warn("layer not inited!"),null)}},{key:"prepareBuildModel",value:function(){this.updateLayerConfig((0,K.Z)((0,K.Z)((0,K.Z)({},this.getDefaultConfig()),this.rawConfig),this.needUpdateConfig));var u=this.getLayerConfig(),h=u.animateOption;h!=null&&h.enable&&(this.layerService.startAnimate(),this.animateStatus=!0)}},{key:"color",value:function(u,h,v){return this.updateStyleAttribute("color",u,h,v),this}},{key:"texture",value:function(u,h,v){return this.updateStyleAttribute("texture",u,h,v),this}},{key:"rotate",value:function(u,h,v){return this.updateStyleAttribute("rotate",u,h,v),this}},{key:"size",value:function(u,h,v){return this.updateStyleAttribute("size",u,h,v),this}},{key:"filter",value:function(u,h,v){var m=this.updateStyleAttribute("filter",u,h,v);return this.dataState.dataSourceNeedUpdate=m,this}},{key:"shape",value:function(u,h,v){this.shapeOption={field:u,values:h};var m=this.updateStyleAttribute("shape",u,h,v);return this.dataState.dataSourceNeedUpdate=m,this}},{key:"label",value:function(u,h,v){return this.pendingStyleAttributes.push({attributeName:"label",attributeField:u,attributeValues:h,updateOptions:v}),this}},{key:"animate",value:function(u){var h={};return(0,Fn.isObject)(u)?(h.enable=!0,h=(0,K.Z)((0,K.Z)({},h),u)):h.enable=u,this.updateLayerConfig({animateOption:h}),this}},{key:"source",value:function(u,h){return(u==null?void 0:u.type)==="source"?(this.setSource(u),this):(this.sourceOption={data:u,options:h},this.clusterZoom=0,this)}},{key:"setData",value:function(u,h){var v=this;return this.inited?this.layerSource.setData(u,h):this.on("inited",function(){var m=v.getSource();m?v.layerSource.setData(u,h):v.source(new T0(u,h))}),this}},{key:"style",value:function(u){var h=this,v=u.passes,m=(0,tc.Z)(u,Bw);return v&&Dw(v).forEach(function(w){var A=h.multiPassRenderer.getPostProcessor().getPostProcessingPassByName(w[0]);A&&A.updateOptions(w[1])}),this.rawConfig=(0,K.Z)((0,K.Z)({},this.rawConfig),m),this.container&&(this.updateLayerConfig(this.rawConfig),this.styleNeedUpdate=!0),this}},{key:"scale",value:function(u,h){var v=(0,K.Z)({},this.scaleOptions);if((0,Fn.isObject)(u)?this.scaleOptions=(0,K.Z)((0,K.Z)({},this.scaleOptions),u):this.scaleOptions[u]=h,this.styleAttributeService&&!(0,Fn.isEqual)(v,this.scaleOptions)){var m=(0,Fn.isObject)(u)?u:(0,W.Z)({},u,h);this.styleAttributeService.updateScaleAttribute(m)}return this}},{key:"renderLayers",value:function(){this.rendering=!0,this.layerService.renderLayers(),this.rendering=!1}},{key:"render",value:function(){return this.tileLayer?(this.tileLayer.render(),this):(this.layerService.beforeRenderData(this),this.encodeDataLength<=0&&!this.forceRender?this:(this.renderModels(),this))}},{key:"renderMultiPass",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(!(this.encodeDataLength<=0&&!this.forceRender)){m.next=2;break}return m.abrupt("return");case 2:if(!(this.multiPassRenderer&&this.multiPassRenderer.getRenderFlag())){m.next=7;break}return m.next=5,this.multiPassRenderer.render();case 5:m.next=8;break;case 7:this.multiPassRenderer?this.renderModels():this.renderModels();case 8:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"active",value:function(u){var h={};return h.enableHighlight=(0,Fn.isObject)(u)?!0:u,(0,Fn.isObject)(u)?(h.enableHighlight=!0,u.color&&(h.highlightColor=u.color),u.mix&&(h.activeMix=u.mix)):h.enableHighlight=!!u,this.updateLayerConfig(h),this}},{key:"setActive",value:function(u,h){var v=this;if((0,Fn.isObject)(u)){var m=u.x,w=m===void 0?0:m,A=u.y,R=A===void 0?0:A;this.updateLayerConfig({highlightColor:(0,Fn.isObject)(h)?h.color:this.getLayerConfig().highlightColor,activeMix:(0,Fn.isObject)(h)?h.mix:this.getLayerConfig().activeMix}),this.pick({x:w,y:R})}else this.updateLayerConfig({pickedFeatureID:u,highlightColor:(0,Fn.isObject)(h)?h.color:this.getLayerConfig().highlightColor,activeMix:(0,Fn.isObject)(h)?h.mix:this.getLayerConfig().activeMix}),this.hooks.beforeSelect.call(vc(u)).then(function(){setTimeout(function(){v.reRender()},1)})}},{key:"select",value:function(u){var h={};return h.enableSelect=(0,Fn.isObject)(u)?!0:u,(0,Fn.isObject)(u)?(h.enableSelect=!0,u.color&&(h.selectColor=u.color),u.mix&&(h.selectMix=u.mix)):h.enableSelect=!!u,this.updateLayerConfig(h),this}},{key:"setSelect",value:function(u,h){var v=this;if((0,Fn.isObject)(u)){var m=u.x,w=m===void 0?0:m,A=u.y,R=A===void 0?0:A;this.updateLayerConfig({selectColor:(0,Fn.isObject)(h)?h.color:this.getLayerConfig().selectColor,selectMix:(0,Fn.isObject)(h)?h.mix:this.getLayerConfig().selectMix}),this.pick({x:w,y:R})}else this.updateLayerConfig({pickedFeatureID:u,selectColor:(0,Fn.isObject)(h)?h.color:this.getLayerConfig().selectColor,selectMix:(0,Fn.isObject)(h)?h.mix:this.getLayerConfig().selectMix}),this.hooks.beforeSelect.call(vc(u)).then(function(){setTimeout(function(){v.reRender()},1)})}},{key:"setBlend",value:function(u){return this.updateLayerConfig({blend:u}),this.layerModelNeedUpdate=!0,this.reRender(),this}},{key:"show",value:function(){return this.updateLayerConfig({visible:!0}),this.reRender(),this.emit("show"),this}},{key:"hide",value:function(){return this.updateLayerConfig({visible:!1}),this.reRender(),this.emit("hide"),this}},{key:"setIndex",value:function(u){return this.zIndex=u,this.layerService.updateLayerRenderList(),this.layerService.renderLayers(),this}},{key:"setCurrentPickId",value:function(u){this.currentPickId=u}},{key:"getCurrentPickId",value:function(){return this.currentPickId}},{key:"setCurrentSelectedId",value:function(u){this.selectedFeatureID=u}},{key:"getCurrentSelectedId",value:function(){return this.selectedFeatureID}},{key:"isVisible",value:function(){var u=this.mapService.getZoom(),h=this.getLayerConfig(),v=h.visible,m=h.minZoom,w=m===void 0?-1/0:m,A=h.maxZoom,R=A===void 0?1/0:A;return!!v&&u>=w&&u<R}},{key:"setMultiPass",value:function(u,h){if(this.updateLayerConfig({enableMultiPassRenderer:u}),h&&this.updateLayerConfig({passes:h}),u){var v=this.getLayerConfig(),m=v.passes,w=m===void 0?[]:m;this.multiPassRenderer=Ex(this,w,this.postProcessingPassFactory,this.normalPassFactory),this.multiPassRenderer.setRenderFlag(!0);var A=this.rendererService.getViewportSize(),R=A.width,B=A.height;this.multiPassRenderer.resize(R,B)}return this}},{key:"setMinZoom",value:function(u){return this.updateLayerConfig({minZoom:u}),this}},{key:"getMinZoom",value:function(){var u=this.getLayerConfig(),h=u.minZoom;return h}},{key:"getMaxZoom",value:function(){var u=this.getLayerConfig(),h=u.maxZoom;return h}},{key:"get",value:function(u){var h=this.getLayerConfig();return h[u]}},{key:"setMaxZoom",value:function(u){return this.updateLayerConfig({maxZoom:u}),this}},{key:"setAutoFit",value:function(u){return this.updateLayerConfig({autoFit:u}),this}},{key:"fitBounds",value:function(u){if(!this.inited)return this.updateLayerConfig({autoFit:!0}),this;var h=this.getSource(),v=h.extent,m=v.some(function(w){return Math.abs(w)===1/0});return m?this:(this.mapService.fitBounds([[v[0],v[1]],[v[2],v[3]]],u),this)}},{key:"destroy",value:function(){var u,h,v,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isDestroyed||(this.layerChildren.map(function(w){return w.destroy(!1)}),this.layerChildren=[],this.masks.map(function(w){return w.destroy(!1)}),this.masks=[],this.hooks.beforeDestroy.call(),this.layerSource.off("update",this.sourceEvent),(u=this.multiPassRenderer)===null||u===void 0||u.destroy(),this.textureService.destroy(),this.styleAttributeService.clearAllAttributes(),this.hooks.afterDestroy.call(),(h=this.layerModel)===null||h===void 0||h.clearModels(m),(v=this.tileLayer)===null||v===void 0||v.destroy(),this.models=[],this.emit("remove",{target:this,type:"remove"}),this.emit("destroy",{target:this,type:"destroy"}),this.removeAllListeners(),this.isDestroyed=!0)}},{key:"clear",value:function(){this.styleAttributeService.clearAllAttributes()}},{key:"clearModels",value:function(){var u;this.models.forEach(function(h){return h.destroy()}),(u=this.layerModel)===null||u===void 0||u.clearModels(),this.models=[]}},{key:"isDirty",value:function(){return!!(this.styleAttributeService.getLayerStyleAttributes()||[]).filter(function(u){return u.needRescale||u.needRemapping||u.needRegenerateVertices}).length}},{key:"setSource",value:function(u){var h=this;if(this.layerSource&&this.layerSource.off("update",this.sourceEvent),this.layerSource=u,this.clusterZoom=0,this.inited&&this.layerSource.cluster){var v=this.mapService.getZoom();this.layerSource.updateClusterData(v)}this.layerSource.inited&&this.sourceEvent(),this.layerSource.on("update",function(m){var w=m.type;if(h.coordCenter===void 0){var A,R=h.layerSource.center;h.coordCenter=R,(A=h.mapService)!==null&&A!==void 0&&A.setCoordCenter&&h.mapService.setCoordCenter(R)}w==="update"&&h.sourceEvent()})}},{key:"initSource",value:function(u){this.layerSource=u,this.clusterZoom=0,this.addSourceEvent()}},{key:"getSource",value:function(){return this.layerSource}},{key:"addSourceEvent",value:function(){var u=this;this.layerSource.on("update",function(){if(u.coordCenter===void 0){var h,v=u.layerSource.center;u.coordCenter=v,(h=u.mapService)!==null&&h!==void 0&&h.setCoordCenter&&u.mapService.setCoordCenter(v)}u.sourceEvent()})}},{key:"getScaleOptions",value:function(){return this.scaleOptions}},{key:"setEncodedData",value:function(u){this.encodedData=u,this.encodeDataLength=u.length}},{key:"getEncodedData",value:function(){return this.encodedData}},{key:"getScale",value:function(u){return this.styleAttributeService.getLayerAttributeScale(u)}},{key:"getLegend",value:function(u){var h,v,m,w=this.styleAttributeService.getLayerStyleAttribute(u),A=(w==null||(h=w.scale)===null||h===void 0?void 0:h.scalers)||[];return{type:(v=A[0].option)===null||v===void 0?void 0:v.type,field:w==null||(m=w.scale)===null||m===void 0?void 0:m.field,items:this.getLegendItems(u)}}},{key:"getLegendItems",value:function(u){var h=this.styleAttributeService.getLayerAttributeScale(u);if(!h)return[];if(h.invertExtent){var v=h.range().map(function(A){return(0,W.Z)({value:h.invertExtent(A)},u,A)});return v}else if(h.ticks){var m=h.ticks().map(function(A){return(0,W.Z)({value:A},u,h(A))});return m}else if(h!=null&&h.domain){var w=h.domain().filter(function(A){return!(0,Fn.isUndefined)(A)}).map(function(A){return(0,W.Z)({value:A},u,h(A))});return w}return[]}},{key:"pick",value:function(u){var h=u.x,v=u.y;this.interactionService.triggerHover({x:h,y:v})}},{key:"boxSelect",value:function(u,h){this.pickingService.boxPickLayer(this,u,h)}},{key:"buildLayerModel",value:function(){var s=(0,J.Z)(ot().mark(function h(v){var m=this,w,A,R,B,G,j,lt,ct,_t,Vt,ce,ae,ze,$e;return ot().wrap(function(Or){for(;;)switch(Or.prev=Or.next){case 0:return w=v.moduleName,A=v.vertexShader,R=v.fragmentShader,B=v.triangulation,G=v.segmentNumber,j=v.workerEnabled,lt=j===void 0?!1:j,ct=v.workerOptions,_t=(0,tc.Z)(v,lm),this.shaderModuleService.registerModule(w,{vs:A,fs:R}),Vt=this.shaderModuleService.getModule(w),ce=Vt.vs,ae=Vt.fs,ze=Vt.uniforms,$e=this.rendererService.createModel,Or.abrupt("return",new Promise(function(Zr,Wr){if(ct&&ct.modelType in Qn&<)m.styleAttributeService.createAttributesAndIndicesAscy(m.encodedData,G,ct).then(function(jo){var Gs=jo.attributes,hu=jo.elements,$u=$e((0,K.Z)({attributes:Gs,uniforms:ze,fs:ae,vs:ce,elements:hu,blend:Pw[dp.normal]},_t));Zr($u)}).catch(function(jo){return Wr(jo)});else{var wn=m.styleAttributeService.createAttributesAndIndices(m.encodedData,B,G),vn=wn.attributes,Kn=wn.elements,Ei=wn.count,qi=(0,K.Z)({attributes:vn,uniforms:ze,fs:ae,vs:ce,elements:Kn,blend:Pw[dp.normal]},_t);Ei&&(qi.count=Ei);var _o=$e(qi);Zr(_o)}}));case 5:case"end":return Or.stop()}},h,this)}));function u(h){return s.apply(this,arguments)}return u}()},{key:"createAttributes",value:function(u){var h=u.triangulation,v=this.styleAttributeService.createAttributes(this.encodedData,h),m=v.attributes;return m}},{key:"getTime",value:function(){return this.layerService.clock.getDelta()}},{key:"setAnimateStartTime",value:function(){this.animateStartTime=this.layerService.clock.getElapsedTime()}},{key:"stopAnimate",value:function(){this.animateStatus&&(this.layerService.stopAnimate(),this.animateStatus=!1,this.updateLayerConfig({animateOption:{enable:!1}}))}},{key:"getLayerAnimateTime",value:function(){return this.layerService.clock.getElapsedTime()-this.animateStartTime}},{key:"needPick",value:function(u){var h=this.getLayerConfig(),v=h.enableHighlight,m=v===void 0?!0:v,w=h.enableSelect,A=w===void 0?!0:w,R=this.eventNames().indexOf(u)!==-1||this.eventNames().indexOf("un"+u)!==-1;return(u==="click"||u==="dblclick")&&A&&(R=!0),u==="mousemove"&&(m||this.eventNames().indexOf("mouseenter")!==-1||this.eventNames().indexOf("unmousemove")!==-1||this.eventNames().indexOf("mouseout")!==-1)&&(R=!0),this.isVisible()&&R}},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:throw new Error("Method not implemented.");case 1:case"end":return m.stop()}},h)}));function u(){return s.apply(this,arguments)}return u}()},{key:"rebuildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.buildModels();case 2:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"renderMulPass",value:function(){var s=(0,J.Z)(ot().mark(function h(v){return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,v.render();case 2:case"end":return w.stop()}},h)}));function u(h){return s.apply(this,arguments)}return u}()},{key:"renderModels",value:function(u){var h=this;return this.encodeDataLength<=0&&!this.forceRender?this:(this.hooks.beforeRender.call(),this.models.forEach(function(v){v.draw({uniforms:h.layerModel.getUninforms()},u)}),this.hooks.afterRender.call(),this)}},{key:"updateStyleAttribute",value:function(u,h,v,m){var w=this.configService.getAttributeConfig(this.id)||{};return(0,Fn.isEqual)(w[u],{field:h,values:v})?!1:(["color","size","texture","rotate","filter","label","shape"].indexOf(u)!==-1&&this.configService.setAttributeConfig(this.id,(0,W.Z)({},u,{field:h,values:v})),this.startInit?this.styleAttributeService.updateStyleAttribute(u,{scale:(0,K.Z)({field:h},this.splitValuesAndCallbackInAttribute(v,this.getLayerConfig()[h]))},m):this.pendingStyleAttributes.push({attributeName:u,attributeField:h,attributeValues:v,updateOptions:m}),!0)}},{key:"getLayerAttributeConfig",value:function(){return this.configService.getAttributeConfig(this.id)}},{key:"getShaderPickStat",value:function(){return this.layerService.getShaderPickStat()}},{key:"setEarthTime",value:function(u){console.warn("empty fn")}},{key:"processData",value:function(u){return u}},{key:"getModelType",value:function(){throw new Error("Method not implemented.")}},{key:"getDefaultConfig",value:function(){return{}}},{key:"initLayerModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return this.models.forEach(function(w){return w.destroy()}),this.models=[],m.next=4,this.layerModel.initModels();case 4:this.models=m.sent;case 5:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"reRender",value:function(){this.inited&&this.layerService.reRender()}},{key:"splitValuesAndCallbackInAttribute",value:function(u,h){return{values:(0,Fn.isFunction)(u)?void 0:u||h,callback:(0,Fn.isFunction)(u)?u:void 0}}}]),a}(be.EventEmitter),a1=Ri(fm.prototype,"configService",[cm],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),fm),Zw,Sx,Vw;function B5(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=N5(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,u=function(){};return{s:u,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function N5(n,l){if(n){if(typeof n=="string")return Gw(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Gw(n,l)}}function Gw(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a<l;a++)s[a]=n[a];return s}var $o=(Zw=Z_(Dt.IGlobalConfigService),Sx=function(){function n(l){(0,pt.Z)(this,n),Rn(this,"configService",Vw,this),this.layer=l,this.rendererService=l.getContainer().get(Dt.IRendererService),this.pickingService=l.getContainer().get(Dt.IPickingService),this.shaderModuleService=l.getContainer().get(Dt.IShaderModuleService),this.styleAttributeService=l.getContainer().get(Dt.IStyleAttributeService),this.mapService=l.getContainer().get(Dt.IMapService),this.iconService=l.getContainer().get(Dt.IIconService),this.fontService=l.getContainer().get(Dt.IFontService),this.cameraService=l.getContainer().get(Dt.ICameraService),this.layerService=l.getContainer().get(Dt.ILayerService),this.registerBuiltinAttributes(),this.startModelAnimate();var a=this.rendererService.createTexture2D;this.createTexture2D=a,this.DATA_TEXTURE_WIDTH=1024,this.rowCount=1,this.cellLength=0,this.cellProperties=[],this.cacheStyleProperties={thetaOffset:void 0,opacity:void 0,strokeOpacity:void 0,strokeWidth:void 0,stroke:void 0,offsets:void 0},this.stylePropertiesExist={hasThetaOffset:0,hasOpacity:0,hasStrokeOpacity:0,hasStrokeWidth:0,hasStroke:0,hasOffsets:0},this.dataTextureTest=this.layerService.getOESTextureFloat(),this.dataTextureTest||(this.dataTexture=this.createTexture2D({data:new Uint8Array(4),mag:ne.NEAREST,min:ne.NEAREST,width:1,height:1}))}return(0,et.Z)(n,[{key:"clearLastCalRes",value:function(){this.cellProperties=[],this.cellLength=0,this.stylePropertiesExist={hasThetaOffset:0,hasOpacity:0,hasStrokeOpacity:0,hasStrokeWidth:0,hasStroke:0,hasOffsets:0}}},{key:"getCellTypeLayout",value:function(){return this.dataTextureTest?[this.rowCount,this.DATA_TEXTURE_WIDTH,0,0,this.stylePropertiesExist.hasOpacity,this.stylePropertiesExist.hasStrokeOpacity,this.stylePropertiesExist.hasStrokeWidth,this.stylePropertiesExist.hasStroke,this.stylePropertiesExist.hasOffsets,this.stylePropertiesExist.hasThetaOffset,0,0,0,0,0,1]:[1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,-1]}},{key:"dataTextureNeedUpdate",value:function(a){var s=!1;return(0,Fn.isEqual)(a.thetaOffset,this.cacheStyleProperties.thetaOffset)||(s=!0,this.cacheStyleProperties.thetaOffset=a.thetaOffset),(0,Fn.isEqual)(a.opacity,this.cacheStyleProperties.opacity)||(s=!0,this.cacheStyleProperties.opacity=a.opacity),(0,Fn.isEqual)(a.strokeOpacity,this.cacheStyleProperties.strokeOpacity)||(s=!0,this.cacheStyleProperties.strokeOpacity=a.strokeOpacity),(0,Fn.isEqual)(a.strokeWidth,this.cacheStyleProperties.strokeWidth)||(s=!0,this.cacheStyleProperties.strokeWidth=a.strokeWidth),(0,Fn.isEqual)(a.stroke,this.cacheStyleProperties.stroke)||(s=!0,this.cacheStyleProperties.stroke=a.stroke),(0,Fn.isEqual)(a.offsets,this.cacheStyleProperties.offsets)||(s=!0,this.cacheStyleProperties.offsets=a.offsets),this.dataTexture===void 0&&(s=!0),s}},{key:"judgeStyleAttributes",value:function(a){this.clearLastCalRes(),a.opacity!==void 0&&!(0,Fn.isNumber)(a.opacity)&&(this.cellProperties.push({attr:"opacity",count:1}),this.stylePropertiesExist.hasOpacity=1,this.cellLength+=1),a.strokeOpacity!==void 0&&!(0,Fn.isNumber)(a.strokeOpacity)&&(this.cellProperties.push({attr:"strokeOpacity",count:1}),this.stylePropertiesExist.hasStrokeOpacity=1,this.cellLength+=1),a.strokeWidth!==void 0&&!(0,Fn.isNumber)(a.strokeWidth)&&(this.cellProperties.push({attr:"strokeWidth",count:1}),this.stylePropertiesExist.hasStrokeWidth=1,this.cellLength+=1),a.stroke!==void 0&&!this.isStaticColor(a.stroke)&&(this.cellProperties.push({attr:"stroke",count:4}),this.stylePropertiesExist.hasStroke=1,this.cellLength+=4),a.offsets!==void 0&&!this.isOffsetStatic(a.offsets)&&(this.cellProperties.push({attr:"offsets",count:2}),this.stylePropertiesExist.hasOffsets=1,this.cellLength+=2),a.thetaOffset!==void 0&&!(0,Fn.isNumber)(a.thetaOffset)&&(this.cellProperties.push({attr:"thetaOffset",count:1}),this.stylePropertiesExist.hasThetaOffset=1,this.cellLength+=1)}},{key:"isStaticColor",value:function(a){return(0,Fn.isString)(a)?!!Gu(a):!1}},{key:"getStrokeColor",value:function(a){if(this.isStaticColor(a)){var s=Lo(a);return s[0]=s[0]?s[0]:0,s[1]=s[1]?s[1]:0,s[2]=s[2]?s[2]:0,s[3]=s[3]?s[3]:0,s}else return[0,0,0,0]}},{key:"isOffsetStatic",value:function(a){return!!(Array.isArray(a)&&a.length===2&&(0,Fn.isNumber)(a[0])&&(0,Fn.isNumber)(a[1]))}},{key:"patchMod",value:function(a,s){for(var u=0;u<s;u++)a.push(-1)}},{key:"patchData",value:function(a,s,u){var h=B5(u),v;try{for(h.s();!(v=h.n()).done;){var m=v.value,w=m.attr,A=m.count,R=s[w];R!==void 0?w==="stroke"?a.push.apply(a,(0,Oi.Z)(Lo(R))):w==="offsets"?this.isOffsetStatic(R)?a.push(-R[0],R[1]):a.push(0,0):a.push((0,Fn.isNumber)(R)?R:1):this.patchMod(a,A)}}catch(B){h.e(B)}finally{h.f()}}},{key:"calDataFrame",value:function(a,s,u){for(var h=s.length,v=Math.ceil(h*a/this.DATA_TEXTURE_WIDTH),m=v*this.DATA_TEXTURE_WIDTH,w=[],A=0;A<h;A++){var R=s[A];this.patchData(w,R,u)}for(var B=w.length;B<m;B++)w.push(-1);return{data:w,width:this.DATA_TEXTURE_WIDTH,height:v}}},{key:"getBlend",value:function(){var a=this.layer.getLayerConfig(),s=a.blend,u=s===void 0?"normal":s;return Pw[dp[u]]}},{key:"getDefaultStyle",value:function(){return{}}},{key:"getUninforms",value:function(){throw new Error("Method not implemented.")}},{key:"getAnimateUniforms",value:function(){return{}}},{key:"needUpdate",value:function(){var l=(0,J.Z)(ot().mark(function s(){return ot().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.abrupt("return",!1);case 1:case"end":return h.stop()}},s)}));function a(){return l.apply(this,arguments)}return a}()},{key:"buildModels",value:function(){var l=(0,J.Z)(ot().mark(function s(){return ot().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:throw new Error("Method not implemented.");case 1:case"end":return h.stop()}},s)}));function a(){return l.apply(this,arguments)}return a}()},{key:"initModels",value:function(){var l=(0,J.Z)(ot().mark(function s(){return ot().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:throw new Error("Method not implemented.");case 1:case"end":return h.stop()}},s)}));function a(){return l.apply(this,arguments)}return a}()},{key:"clearModels",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0}},{key:"getAttribute",value:function(){throw new Error("Method not implemented.")}},{key:"render",value:function(){throw new Error("Method not implemented.")}},{key:"registerBuiltinAttributes",value:function(){throw new Error("Method not implemented.")}},{key:"animateOption2Array",value:function(a){return[a.enable?0:1,a.duration||4,a.interval||.2,a.trailLength||.1]}},{key:"startModelAnimate",value:function(){var a=this.layer.getLayerConfig(),s=a.animateOption;s.enable&&this.layer.setAnimateStartTime()}}]),n}(),Vw=Ri(Sx.prototype,"configService",[Zw],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Sx),Jd=100,zl=36,fu=40;function _s(n){return n/180*Math.acos(-1)}function qo(n){var l=_s(n[0])+Math.PI/2,a=_s(n[1]),s=Jd+Math.random()*.4,u=s*Math.cos(a)*Math.cos(l),h=s*Math.cos(a)*Math.sin(l),v=s*Math.sin(a);return[h,v,u]}function M0(n,l){var a=mat4.create(),s=mat4.create(),u=vec3.fromValues(0,1,0),h=vec3.fromValues(0,0,0);l=l||{},n=typeof n!="undefined"?n:1;for(var v=typeof l.segments!="undefined"?l.segments:32,m=2+v,w=2*m,A=[],R=[],B=[],G=[],j=[],lt=[],ct=0;ct<=m;ct++){for(var _t=ct/m,Vt=_t*Math.PI,ce=0;ce<=w;ce++){var ae=ce/w,ze=ae*Math.PI*2;mat4.identity(s),mat4.rotateZ(s,s,-Vt),mat4.identity(a),mat4.rotateY(a,a,ze),vec3.transformMat4(h,u,s),vec3.transformMat4(h,h,a),vec3.scale(h,h,-n),B.push(h.slice()),G.push.apply(G,_toConsumableArray(h.slice())),vec3.normalize(h,h),j.push.apply(j,_toConsumableArray(h.slice())),lt.push([ae,1-_t]),G.push(ae,1-_t)}if(ct>0)for(var $e=B.length,xr=$e-2*(w+1);xr+w+2<$e;xr++)A.push([xr,xr+1,xr+w+1]),R.push(xr,xr+1,xr+w+1),A.push([xr+w+1,xr+1,xr+w+2]),R.push(xr+w+1,xr+1,xr+w+2)}return{cells:A,positions:B,uvs:lt,positionsArr:G,indicesArr:R,normalArr:j}}var Nv=ai.Ue(),Hw=ai.Ue(),Mo=ai.Ue(),Es=ai.Ue(),Fh=ai.Ue();function s1(n,l,a,s,u){ai.IH(n,a,s),ai.Fv(n,n),l=ai.al(-n[1],n[0]);var h=ai.al(-a[1],a[0]);return[u/ai.AK(l,h),l]}function tv(n,l){return ai.t8(n,-l[1],l[0])}function hm(n,l,a){return ai.lu(n,l,a),ai.Fv(n,n),n}function pg(n,l){return n[0]===l[0]&&n[1]===l[1]}function z5(n){for(var l=new Map,a=0;a<n.length;a++){var s=n[0].toString()+"-"+n[1].toString();l.get(s)?(n.splice(a,1),a++):l.set(s,s)}return n}var u1=function(){function n(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,pt.Z)(this,n),(0,W.Z)(this,"lastFlip",-1),(0,W.Z)(this,"miter",ai.al(0,0)),(0,W.Z)(this,"started",!1),(0,W.Z)(this,"dash",!1),(0,W.Z)(this,"totalDistance",0),(0,W.Z)(this,"currentIndex",0),this.join=l.join||"miter",this.cap=l.cap||"butt",this.miterLimit=l.miterLimit||10,this.thickness=l.thickness||1,this.dash=l.dash||!1,this.complex={positions:[],indices:[],normals:[],startIndex:0,indexes:[]}}return(0,et.Z)(n,[{key:"simpleExtrude",value:function(a){var s=this.complex;if(a.length<=1)return s;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var u=a.length,h=s.startIndex,v=1;v<u;v++){var m=a[v-1],w=a[v],A=v<a.length-1?a[v+1]:null,R=this.simpleSegment(s,h,m,w,A);h+=R}if(this.dash)for(var B=0;B<s.positions.length/6;B++)s.positions[B*6+5]=this.totalDistance;return s.startIndex=s.positions.length/6,s}},{key:"simpleExtrude_gaode2",value:function(a,s){var u=this.complex;if(a.length<=1)return u;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var h=a.length,v=u.startIndex,m=1;m<h;m++){var w,A,R,B=a[m-1];B.push((w=s[m-1][2])!==null&&w!==void 0?w:0);var G=s[m-1],j=a[m];j.push((A=s[m][2])!==null&&A!==void 0?A:0);var lt=s[m],ct=m<a.length-1?[].concat((0,Oi.Z)(a[m+1]),[(R=s[m+1][2])!==null&&R!==void 0?R:0]):null,_t=m<s.length-1?s[m+1]:null,Vt=this.simpleSegment(u,v,B,j,ct,G,lt,_t);v+=Vt}if(this.dash)for(var ce=0;ce<u.positions.length/6;ce++)u.positions[ce*6+5]=this.totalDistance;return u.startIndex=u.positions.length/6,u}},{key:"extrude_gaode2",value:function(a,s){var u=this.complex;if(a.length<=1)return u;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var h=a.length,v=u.startIndex,m=1;m<h;m++){var w,A,R,B=a[m-1];B.push((w=s[m-1][2])!==null&&w!==void 0?w:0);var G=s[m-1],j=a[m];j.push((A=s[m][2])!==null&&A!==void 0?A:0);var lt=s[m],ct=m<a.length-1?[].concat((0,Oi.Z)(a[m+1]),[(R=s[m+1][2])!==null&&R!==void 0?R:0]):null,_t=m<s.length-1?s[m+1]:null,Vt=this.segment_gaode2(u,v,B,j,ct,G,lt,_t);v+=Vt}if(this.dash)for(var ce=0;ce<u.positions.length/6;ce++)u.positions[ce*6+5]=this.totalDistance;return u.startIndex=u.positions.length/6,u}},{key:"extrude",value:function(a){var s=this.complex;if(a.length<=1)return s;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var u=a.length,h=s.startIndex,v=1;v<u;v++){var m=a[v-1],w=a[v],A=v<a.length-1?a[v+1]:null,R=this.segment(s,h,m,w,A);h+=R}if(this.dash)for(var B=0;B<s.positions.length/6;B++)s.positions[B*6+5]=this.totalDistance;return s.startIndex=s.positions.length/6,s}},{key:"simpleSegment",value:function(a,s,u,h,v){var m=0,w=a.indices,A=a.positions,R=a.normals,B=E([h[0],h[1]]),G=E([u[0],u[1]]);hm(Mo,B,G);var j=0;if(this.dash&&(j=this.lineSegmentDistance(B,G),this.totalDistance+=j),this.normal||(this.normal=ai.Ue(),tv(this.normal,Mo)),this.started||(this.started=!0,this.extrusions(A,R,u,this.normal,this.thickness,this.totalDistance-j)),w.push(s+0,s+1,s+2),!v)tv(this.normal,Mo),this.extrusions(A,R,h,this.normal,this.thickness,this.totalDistance),w.push.apply(w,(0,Oi.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),m+=2;else{var lt=E([v[0],v[1]]);pg(B,lt)&&ai.IH(lt,B,ai.Fv(lt,ai.$X(lt,B,G))),hm(Es,lt,B);var ct=s1(Fh,ai.Ue(),Mo,Es,this.thickness),_t=(0,yt.Z)(ct,2),Vt=_t[0],ce=_t[1],ae=ai.AK(Fh,this.normal)<0?-1:1;this.extrusions(A,R,h,ce,Vt,this.totalDistance),w.push.apply(w,(0,Oi.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),ae=-1,ai.JG(this.normal,ce),m+=2,this.lastFlip=ae}return m}},{key:"segment_gaode2",value:function(a,s,u,h,v,m,w,A){var R=0,B=a.indices,G=a.positions,j=a.normals,lt=this.cap==="square",ct=this.join==="bevel",_t=E([w[0],w[1]]),Vt=E([m[0],m[1]]);hm(Mo,h,u);var ce=0;if(this.dash&&(ce=this.lineSegmentDistance(_t,Vt),this.totalDistance+=ce),this.normal||(this.normal=ai.Ue(),tv(this.normal,Mo)),!this.started)if(this.started=!0,lt){var ae=ai.Ue(),ze=ai.Ue();ai.IH(ae,this.normal,Mo),ai.IH(ze,this.normal,Mo),j.push(ze[0],ze[1],0),j.push(ae[0],ae[1],0),G.push(u[0],u[1],u[2]|0,this.totalDistance-ce,-this.thickness,u[2]|0),this.complex.indexes.push(this.currentIndex),G.push(u[0],u[1],u[2]|0,this.totalDistance-ce,this.thickness,u[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(G,j,u,this.normal,this.thickness,this.totalDistance-ce);if(B.push(s+0,s+1,s+2),v){pg(h,v)&&ai.IH(v,h,ai.Fv(v,ai.$X(v,h,u))),hm(Es,v,h);var Or=s1(Fh,ai.Ue(),Mo,Es,this.thickness),Zr=(0,yt.Z)(Or,2),Wr=Zr[0],wn=Zr[1],vn=ai.AK(Fh,this.normal)<0?-1:1,Kn=ct;if(!Kn&&this.join==="miter"){var Ei=Wr;Ei>this.miterLimit&&(Kn=!0)}Kn?(j.push(this.normal[0],this.normal[1],0),j.push(wn[0],wn[1],0),G.push(h[0],h[1],h[2]|0,this.totalDistance,-this.thickness*vn,h[2]|0),this.complex.indexes.push(this.currentIndex),G.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness*vn,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,B.push.apply(B,(0,Oi.Z)(this.lastFlip!==-vn?[s,s+2,s+3]:[s+2,s+1,s+3])),B.push(s+2,s+3,s+4),tv(Nv,Es),ai.JG(this.normal,Nv),j.push(this.normal[0],this.normal[1],0),G.push(h[0],h[1],h[2]|0,this.totalDistance,-this.thickness*vn,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,R+=3):(this.extrusions(G,j,h,wn,Wr,this.totalDistance),B.push.apply(B,(0,Oi.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),vn=-1,ai.JG(this.normal,wn),R+=2),this.lastFlip=vn}else{if(tv(this.normal,Mo),lt){var $e=ai.Ue(),xr=ai.Ue();ai.lu(xr,Mo,this.normal),ai.IH($e,Mo,this.normal),j.push(xr[0],xr[1],0),j.push($e[0],$e[1],0),G.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness,h[2]|0),this.complex.indexes.push(this.currentIndex),G.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(G,j,h,this.normal,this.thickness,this.totalDistance);B.push.apply(B,(0,Oi.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),R+=2}return R}},{key:"segment",value:function(a,s,u,h,v){var m=0,w=a.indices,A=a.positions,R=a.normals,B=this.cap==="square",G=this.join==="bevel",j=E([h[0],h[1]]),lt=E([u[0],u[1]]);hm(Mo,j,lt);var ct=0;if(this.dash&&(ct=this.lineSegmentDistance(j,lt),this.totalDistance+=ct),this.normal||(this.normal=ai.Ue(),tv(this.normal,Mo)),!this.started)if(this.started=!0,B){var _t=ai.Ue(),Vt=ai.Ue();ai.IH(_t,this.normal,Mo),ai.IH(Vt,this.normal,Mo),R.push(Vt[0],Vt[1],0),R.push(_t[0],_t[1],0),A.push(u[0],u[1],u[2]|0,this.totalDistance-ct,-this.thickness,u[2]|0),this.complex.indexes.push(this.currentIndex),A.push(u[0],u[1],u[2]|0,this.totalDistance-ct,this.thickness,u[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(A,R,u,this.normal,this.thickness,this.totalDistance-ct);if(w.push(s+0,s+1,s+2),v){var ze=E([v[0],v[1]]);pg(j,ze)&&ai.IH(ze,j,ai.Fv(ze,ai.$X(ze,j,lt))),hm(Es,ze,j);var $e=s1(Fh,ai.Ue(),Mo,Es,this.thickness),xr=(0,yt.Z)($e,2),Or=xr[0],Zr=xr[1],Wr=ai.AK(Fh,this.normal)<0?-1:1,wn=G;if(!wn&&this.join==="miter"){var vn=Or;vn>this.miterLimit&&(wn=!0)}wn?(R.push(this.normal[0],this.normal[1],0),R.push(Zr[0],Zr[1],0),A.push(h[0],h[1],h[2]|0,this.totalDistance,-this.thickness*Wr,h[2]|0),this.complex.indexes.push(this.currentIndex),A.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness*Wr,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,w.push.apply(w,(0,Oi.Z)(this.lastFlip!==-Wr?[s,s+2,s+3]:[s+2,s+1,s+3])),w.push(s+2,s+3,s+4),tv(Nv,Es),ai.JG(this.normal,Nv),R.push(this.normal[0],this.normal[1],0),A.push(h[0],h[1],h[2]|0,this.totalDistance,-this.thickness*Wr,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,m+=3):(this.extrusions(A,R,h,Zr,Or,this.totalDistance),w.push.apply(w,(0,Oi.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),Wr=-1,ai.JG(this.normal,Zr),m+=2),this.lastFlip=Wr}else{if(tv(this.normal,Mo),B){var ce=ai.Ue(),ae=ai.Ue();ai.lu(ae,Mo,this.normal),ai.IH(ce,Mo,this.normal),R.push(ae[0],ae[1],0),R.push(ce[0],ce[1],0),A.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness,h[2]|0),this.complex.indexes.push(this.currentIndex),A.push(h[0],h[1],h[2]|0,this.totalDistance,this.thickness,h[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(A,R,h,this.normal,this.thickness,this.totalDistance);w.push.apply(w,(0,Oi.Z)(this.lastFlip===1?[s,s+2,s+3]:[s+2,s+1,s+3])),m+=2}return m}},{key:"extrusions",value:function(a,s,u,h,v,m){s.push(h[0],h[1],0),s.push(h[0],h[1],0),a.push(u[0],u[1],u[2]|0,m,-v,u[2]|0),this.complex.indexes.push(this.currentIndex),a.push(u[0],u[1],u[2]|0,m,v,u[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}},{key:"lineSegmentDistance",value:function(a,s){var u=s[0]-a[0],h=s[1]-a[1];return Math.sqrt(u*u+h*h)}}]),n}(),Io=nt(68072);function YO(n){var l=n[0][0],a=n[0][n[0].length-1];l[0]===a[0]&&l[1]===a[1]&&(n[0]=n[0].slice(0,n[0].length-1));for(var s=n[0].length,u=earcut.flatten(n),h=u.vertices,v=u.dimensions,m=[],w=[],A=0;A<h.length/v;A++)v===2?m.push(h[A*2],h[A*2+1],1):m.push(h[A*3],h[A*3+1],1);var R=earcut(u.vertices,u.holes,u.dimensions);w.push.apply(w,_toConsumableArray(R));for(var B=function(lt){var ct=u.vertices.slice(lt*v,(lt+1)*v),_t=u.vertices.slice((lt+1)*v,(lt+2)*v);_t.length===0&&(_t=u.vertices.slice(0,v));var Vt=m.length/3;m.push(ct[0],ct[1],1,_t[0],_t[1],1,ct[0],ct[1],0,_t[0],_t[1],0),w.push.apply(w,_toConsumableArray([0,2,1,2,3,1].map(function(ce){return ce+Vt})))},G=0;G<s;G++)B(G);return{positions:m,index:w}}function yp(n){var l=earcut.flatten(n),a=earcut(l.vertices,l.holes,l.dimensions);return{positions:l.vertices,index:a}}function pm(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=n[0][0],s=n[0][n[0].length-1];a[0]===s[0]&&a[1]===s[1]&&(n[0]=n[0].slice(0,n[0].length-1));for(var u=n[0].length,h=eh().flatten(n),v=h.vertices,m=h.dimensions,w=[],A=[],R=[],B=0;B<v.length/m;B++)m===2?w.push(v[B*2],v[B*2+1],1,-1,-1):w.push(v[B*3],v[B*3+1],1,-1,-1),R.push(0,0,1);var G=eh()(h.vertices,h.holes,h.dimensions);A.push.apply(A,(0,Oi.Z)(G));for(var j=function(_t){var Vt=h.vertices.slice(_t*m,(_t+1)*m),ce=h.vertices.slice((_t+1)*m,(_t+2)*m);ce.length===0&&(ce=h.vertices.slice(0,m));var ae=w.length/5;w.push(Vt[0],Vt[1],1,0,0,ce[0],ce[1],1,.1,0,Vt[0],Vt[1],0,0,.8,ce[0],ce[1],0,.1,.8);var ze=dg([ce[0],ce[1],1],[Vt[0],Vt[1],0],[Vt[0],Vt[1],1],l);R.push.apply(R,(0,Oi.Z)(ze).concat((0,Oi.Z)(ze),(0,Oi.Z)(ze),(0,Oi.Z)(ze))),A.push.apply(A,(0,Oi.Z)([1,2,0,3,2,1].map(function($e){return $e+ae})))},lt=0;lt<u;lt++)j(lt);return{positions:w,index:A,normals:R}}function dg(n,l,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,u=Io.create(),h=Io.create(),v=Io.create();s&&(n=Yf(n),l=Yf(l),a=Yf(a));var m=Io.fromValues.apply(Io,(0,Oi.Z)(n)),w=Io.fromValues.apply(Io,(0,Oi.Z)(l)),A=Io.fromValues.apply(Io,(0,Oi.Z)(a));Io.sub(u,A,w),Io.sub(h,m,w),Io.cross(v,u,h);var R=Io.create();return Io.normalize(R,v),R}var Bu,rd;(function(n){n.CYLINDER="cylinder",n.SQUARECOLUMN="squareColumn",n.TRIANGLECOLUMN="triangleColumn",n.HEXAGONCOLUMN="hexagonColumn",n.PENTAGONCOLUMN="pentagonColumn"})(rd||(rd={}));var zv;(function(n){n.CIRCLE="circle",n.SQUARE="square",n.TRIANGLE="triangle",n.HEXAGON="hexagon",n.PENTAGON="pentagon"})(zv||(zv={}));function dm(n){for(var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Math.PI*2/n,s=[],u=0;u<n;u++)s.push(a*u+l*Math.PI/12);var h=s.map(function(v){var m=Math.sin(v+Math.PI/4),w=Math.cos(v+Math.PI/4);return[m,w,0]});return h}function pc(){return dm(30)}function I0(){return dm(4)}function Zf(){return dm(3)}function vm(){return dm(6,1)}function l1(){return dm(5)}var Cx=(Bu={},(0,W.Z)(Bu,zv.CIRCLE,pc),(0,W.Z)(Bu,zv.HEXAGON,vm),(0,W.Z)(Bu,zv.TRIANGLE,Zf),(0,W.Z)(Bu,zv.SQUARE,I0),(0,W.Z)(Bu,zv.PENTAGON,l1),(0,W.Z)(Bu,rd.CYLINDER,pc),(0,W.Z)(Bu,rd.HEXAGONCOLUMN,vm),(0,W.Z)(Bu,rd.TRIANGLECOLUMN,Zf),(0,W.Z)(Bu,rd.SQUARECOLUMN,I0),(0,W.Z)(Bu,rd.PENTAGONCOLUMN,l1),Bu),c1={};function gm(n){var l=Ir(n.coordinates);return{vertices:[].concat((0,Oi.Z)(l),(0,Oi.Z)(l),(0,Oi.Z)(l),(0,Oi.Z)(l)),indices:[0,1,2,2,3,0],size:l.length}}function Ax(n){var l=Ir(n.coordinates),a=qo(l);return{vertices:[].concat((0,Oi.Z)(a),(0,Oi.Z)(a),(0,Oi.Z)(a),(0,Oi.Z)(a)),indices:[0,1,2,2,3,0],size:a.length}}function to(n){var l=n.shape,a=V5(l,!1),s=a.positions,u=a.index,h=a.normals;return{vertices:s,indices:u,normals:h,size:5}}function jw(n){var l=Ir(n.coordinates);return{vertices:(0,Oi.Z)(l),indices:[0],size:l.length}}function mm(n){var l=n.coordinates,a=n.originCoordinates,s=n.version,u=new u1({dash:!0,join:"bevel"});if(s==="GAODE2.x"){var h=l;Array.isArray(h[0][0])||(h=[l]);var v=a;Array.isArray(v[0][0])||(v=[a]);for(var m=0;m<h.length;m++){var w=h[m],A=v[m];u.extrude_gaode2(w,A)}}else{var R=l;R[0]&&!Array.isArray(R[0][0])&&(R=[l]),R.forEach(function(G){u.extrude(G)})}var B=u.complex;return{vertices:B.positions,indices:B.indices,normals:B.normals,indexes:B.indexes,size:6}}function ym(n){var l=n.coordinates,a=[];if(!Array.isArray(l[0]))return{vertices:[],indices:[],normals:[],size:6,count:0};var s=Ww(l),u=s.results,h=s.totalDistance;return u.map(function(v){a.push(v[0],v[1],v[2],v[3],0,h)}),{vertices:a,indices:[],normals:[],size:6,count:u.length}}function $O(n){var l=n.coordinates,a=[];if(!Array.isArray(l[0]))return{vertices:[],indices:[],size:4,count:0};var s=Xw(l),u=s.results;return u.map(function(h){a.push(h[0],h[1],h[2],h[3])}),{vertices:a,indices:[],size:4,count:u.length}}function _m(n,l){var a=l[0]-n[0],s=l[1]-n[1];return Math.sqrt(a*a+s*s)}function vg(n,l){return n.length<3&&n.push(0),l!==void 0&&n.push(l),n}function Ww(n){var l=n;Array.isArray(l)&&Array.isArray(l[0])&&Array.isArray(l[0][0])&&(l=n.flat());var a=0;if(l.length<2)return{results:l,totalDistance:0};var s=[],u=vg(l[0],a);s.push(u);for(var h=1;h<l.length-1;h++){var v=_m(l[h-1],l[h]);a+=v;var m=vg(l[h],a);s.push(m),s.push(m)}var w=_m(l[l.length-2],l[l.length-1]);return a+=w,s.push(vg(l[l.length-1],a)),{results:s,totalDistance:a}}function Xw(n){if(n.length<2)return{results:n};var l=[],a=vg(n[0]);l.push(a);for(var s=1;s<n.length-1;s++){var u=vg(n[s]);l.push(u),l.push(u)}return l.push(vg(n[n.length-1])),{results:l}}function Tx(n){var l=n.coordinates,a=eh().flatten(l),s=a.vertices,u=a.dimensions,h=a.holes;return{indices:eh()(s,h,u),vertices:s,size:u}}function U5(n){var l=n.coordinates,a=eh().flatten(l),s=a.vertices,u=a.dimensions,h=a.holes;return{indices:eh()(s,h,u),vertices:Yw(s),size:u+4}}function Yw(n){for(var l=[],a=$r(n),s=a.center,u=a.radius,h=0;h<n.length;h+=2){var v=n[h],m=n[h+1];l.push.apply(l,[v,m,0].concat((0,Oi.Z)(s),[u]))}return l}function Z5(n){var l=n.coordinates,a=pm(l,!0),s=a.positions,u=a.index,h=a.normals;return{vertices:s,indices:u,normals:h,size:5}}function qO(n){var l=n.shape,a=H5(l),s=a.positions,u=a.index;return{vertices:s,indices:u,size:3}}function f1(n){var l=n.coordinates,a=[].concat((0,Oi.Z)(l[0]),[0,0,1,l[1][0],l[0][1],0,1,1],(0,Oi.Z)(l[1]),[0,1,0],(0,Oi.Z)(l[0]),[0,0,1],(0,Oi.Z)(l[1]),[0,1,0,l[0][0],l[1][1],0,0,0]),s=[0,1,2,3,4,5];return{vertices:a,indices:s,size:5}}function xm(n,l){for(var a=l||30,s=n.coordinates,u=[],h=[],v=function(A){u.push(A,1,A,s[0][0],s[0][1],s[1][0],s[1][1],A,-1,A,s[0][0],s[0][1],s[1][0],s[1][1]),A!==a-1&&h.push.apply(h,(0,Oi.Z)([0,1,2,1,3,2].map(function(R){return A*2+R})))},m=0;m<a;m++)v(m);return{vertices:u,indices:h,size:7}}function KO(n){var l=n.coordinates;l.length===2&&l.push(0);var a=Rh(-1,1),s=Rh(1,1),u=Rh(-1,-1),h=Rh(1,-1),v=[].concat(_toConsumableArray(l),_toConsumableArray(a),_toConsumableArray(l),_toConsumableArray(u),_toConsumableArray(l),_toConsumableArray(h),_toConsumableArray(l),_toConsumableArray(s)),m=[0,1,2,3,0,2];return{vertices:v,indices:m,size:5}}function V5(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(c1&&c1[n])return c1[n];var a=Cx[n]?Cx[n]():Cx.cylinder(),s=pm([a],l);return c1[n]=s,s}function QO(n,l){for(var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:3,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,u=new Float32Array(n.length/a*3),h,v,m,w=vec3.create(),A=vec3.create(),R=vec3.create(),B=0,G=l.length;B<G;B+=3){h=l[B+0]*3,v=l[B+1]*3,m=l[B+2]*3;var j=[n[h],n[h+1]],lt=[n[v],n[v+1]],ct=[n[m],n[m+1]];s&&(j=lngLatToMeters(j),lt=lngLatToMeters(lt),ct=lngLatToMeters(ct));var _t=j,Vt=_slicedToArray(_t,2),ce=Vt[0],ae=Vt[1],ze=vec3.fromValues(ce,ae,n[h+2]),$e=lt,xr=_slicedToArray($e,2),Or=xr[0],Zr=xr[1],Wr=vec3.fromValues(Or,Zr,n[v+2]),wn=ct,vn=_slicedToArray(wn,2),Kn=vn[0],Ei=vn[1],qi=vec3.fromValues(Kn,Ei,n[m+2]);vec3.sub(w,qi,Wr),vec3.sub(A,ze,Wr),vec3.cross(R,w,A),u[h]+=w[0],u[h+1]+=w[1],u[h+2]+=w[2],u[v]+=w[0],u[v+1]+=w[1],u[v+2]+=w[2],u[m]+=w[0],u[m+1]+=w[1],u[m+2]+=w[2]}return G5(u),u}function G5(n){for(var l=0,a=n.length;l<a;l+=3){var s=vec3.fromValues(n[l],n[l+1],n[l+2]),u=vec3.create();vec3.normalize(u,s),n.set(u,l)}}function JO(n){var l=n[0][0],a=n[0][n[0].length-1];return l[0]===a[0]&&l[1]===a[1]}function H5(n){var l=["cylinder","triangleColumn","hexagonColumn","squareColumn"],a=geometryShape[n]?geometryShape[n]():geometryShape.circle(),s=l.indexOf(n)===-1?fillPolygon([a]):extrudePolygon([a]);return s}function Rh(n,l){var a=(n+1)/2,s=(l+1)/2;return[a,s]}function gg(){var n=primitiveSphere(EARTH_RADIUS,{segments:EARTH_SEGMENTS}),l=n.positionsArr,a=n.indicesArr,s=n.normalArr;return{vertices:l,indices:a,size:5,normals:s}}function j5(){var n=primitiveSphere(EARTH_RADIUS+EARTH_RADIUS_OUTER,{segments:EARTH_SEGMENTS}),l=n.positionsArr,a=n.indicesArr,s=n.normalArr;return{vertices:l,indices:a,size:5,normals:s}}function $w(n){var l=k0();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function k0(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Mx=`
|
|
uniform float u_opacity;
|
|
|
|
varying vec4 v_dash_array;
|
|
varying vec4 v_color;
|
|
|
|
uniform float segmentNumber;
|
|
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float d_distance_ratio = styleMappingMat[3].b; // \u5F53\u524D\u9876\u70B9\u5728\u5F27\u7EBF\u4E2D\u6240\u5904\u7684\u5206\u6BB5\u6BD4\u4F8B
|
|
|
|
gl_FragColor = v_color;
|
|
gl_FragColor.a *= opacity;
|
|
|
|
float flag = 0.;
|
|
float dashLength = mod(d_distance_ratio, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w);
|
|
if(dashLength < v_dash_array.x || (dashLength > (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z)) {
|
|
flag = 1.;
|
|
};
|
|
gl_FragColor.a *=flag;
|
|
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}`,W5=`
|
|
attribute vec4 a_Color;
|
|
attribute vec3 a_Position;
|
|
attribute vec4 a_Instance;
|
|
attribute float a_Size;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform float segmentNumber;
|
|
varying vec4 v_color;
|
|
|
|
|
|
uniform vec4 u_dash_array: [10.0, 5., 0, 0];
|
|
uniform float u_lineDir: 1.0;
|
|
varying vec4 v_dash_array;
|
|
|
|
uniform float u_thetaOffset: 0.314;
|
|
|
|
uniform float u_opacity: 1.0;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
#pragma include "styleMappingCalThetaOffset"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "project"
|
|
#pragma include "picking"
|
|
|
|
float bezier3(vec3 arr, float t) {
|
|
float ut = 1. - t;
|
|
return (arr.x * ut + arr.y * t) * ut + (arr.y * ut + arr.z * t) * t;
|
|
}
|
|
vec2 midPoint(vec2 source, vec2 target, float arcThetaOffset) {
|
|
vec2 center = target - source;
|
|
float r = length(center);
|
|
float theta = atan(center.y, center.x);
|
|
float thetaOffset = arcThetaOffset;
|
|
float r2 = r / 2.0 / cos(thetaOffset);
|
|
float theta2 = theta + thetaOffset;
|
|
vec2 mid = vec2(r2*cos(theta2) + source.x, r2*sin(theta2) + source.y);
|
|
if(u_lineDir == 1.0) { // \u6B63\u5411
|
|
return mid;
|
|
} else { // \u9006\u5411
|
|
// (mid + vmin)/2 = (s + t)/2
|
|
vec2 vmid = source + target - mid;
|
|
return vmid;
|
|
}
|
|
// return mid;
|
|
}
|
|
float getSegmentRatio(float index) {
|
|
// dash: index / (segmentNumber - 1.);
|
|
// normal: smoothstep(0.0, 1.0, index / (segmentNumber - 1.));
|
|
return index / (segmentNumber - 1.);
|
|
}
|
|
vec2 interpolate (vec2 source, vec2 target, float t, float arcThetaOffset) {
|
|
// if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation
|
|
vec2 mid = midPoint(source, target, arcThetaOffset);
|
|
vec3 x = vec3(source.x, mid.x, target.x);
|
|
vec3 y = vec3(source.y, mid.y, target.y);
|
|
return vec2(bezier3(x ,t), bezier3(y,t));
|
|
}
|
|
vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;
|
|
return offset;
|
|
}
|
|
vec2 getNormal(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);
|
|
}
|
|
|
|
void main() {
|
|
v_color = a_Color;
|
|
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0 // dataset \u6570\u636E\u96C6
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke -> thetaOffset...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
|
|
vec2 thetaOffsetAndOffset = calThetaOffsetAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][1] = thetaOffsetAndOffset.r;
|
|
textureOffset = thetaOffsetAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
|
|
vec2 source = a_Instance.rg; // \u8D77\u59CB\u70B9
|
|
vec2 target = a_Instance.ba; // \u7EC8\u70B9
|
|
float segmentIndex = a_Position.x;
|
|
float segmentRatio = getSegmentRatio(segmentIndex);
|
|
|
|
float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));
|
|
float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);
|
|
|
|
vec2 s = source;
|
|
vec2 t = target;
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
s = unProjCustomCoord(source);
|
|
t = unProjCustomCoord(target);
|
|
}
|
|
float total_Distance = pixelDistance(s, t) / 2.0 * PI;
|
|
v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / total_Distance;
|
|
|
|
styleMappingMat[3].b = segmentIndex / segmentNumber;
|
|
|
|
// styleMappingMat[0][1] - arcThetaOffset
|
|
vec4 curr = project_position(vec4(interpolate(source, target, segmentRatio, styleMappingMat[0][1]), 0.0, 1.0));
|
|
vec4 next = project_position(vec4(interpolate(source, target, nextSegmentRatio, styleMappingMat[0][1]), 0.0, 1.0));
|
|
// v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);
|
|
//unProjCustomCoord
|
|
|
|
vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y));
|
|
|
|
|
|
// gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, 0, 1.0));
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
// gl_Position = u_Mvp * (vec4(curr.xy + offset, 0, 1.0));
|
|
gl_Position = u_Mvp * (vec4(curr.xy + offset, 0, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, 0, 1.0));
|
|
}
|
|
gl_PointSize = 5.0;
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,qw=`
|
|
#define Animate 0.0
|
|
#define LineTexture 1.0
|
|
|
|
uniform float u_opacity;
|
|
uniform float u_textureBlend;
|
|
uniform float u_blur : 0.9;
|
|
uniform float u_line_type: 0.0;
|
|
// varying vec2 v_normal;
|
|
varying vec4 v_dash_array;
|
|
varying vec4 v_color;
|
|
|
|
uniform float u_time;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
|
|
uniform float u_line_texture;
|
|
uniform sampler2D u_texture;
|
|
uniform vec2 u_textSize;
|
|
|
|
uniform float segmentNumber;
|
|
varying vec2 v_iconMapUV;
|
|
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float animateSpeed = 0.0; // \u8FD0\u52A8\u901F\u5EA6
|
|
float d_segmentIndex = styleMappingMat[3].r; // \u5F53\u524D\u9876\u70B9\u5728\u5F27\u7EBF\u4E2D\u6240\u5904\u7684\u5206\u6BB5\u4F4D\u7F6E
|
|
float d_distance_ratio = styleMappingMat[3].b; // \u5F53\u524D\u9876\u70B9\u5728\u5F27\u7EBF\u4E2D\u6240\u5904\u7684\u5206\u6BB5\u6BD4\u4F8B
|
|
|
|
gl_FragColor = v_color;
|
|
|
|
gl_FragColor.a *= opacity;
|
|
|
|
if(u_animate.x == Animate && u_line_texture != LineTexture) {
|
|
animateSpeed = u_time / u_animate.y;
|
|
float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y);
|
|
alpha = (alpha + u_animate.w -1.0) / u_animate.w;
|
|
// alpha = smoothstep(0., 1., alpha);
|
|
alpha = clamp(alpha, 0.0, 1.0);
|
|
gl_FragColor.a *= alpha;
|
|
}
|
|
|
|
// \u5F53\u5B58\u5728\u8D34\u56FE\u65F6\u5728\u5E95\u8272\u4E0A\u8D34\u4E0A\u8D34\u56FE
|
|
if(u_line_texture == LineTexture) { // while load texture
|
|
float arcRadio = smoothstep( 0.0, 1.0, (d_segmentIndex / segmentNumber));
|
|
// float arcRadio = smoothstep( 0.0, 1.0, d_distance_ratio);
|
|
|
|
float count = styleMappingMat[3].g; // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF
|
|
|
|
float time = 0.0;
|
|
if(u_animate.x == Animate) {
|
|
time = u_time / u_animate.y;
|
|
}
|
|
float redioCount = arcRadio * count;
|
|
|
|
float u = fract(redioCount - time);
|
|
float v = styleMappingMat[3].a; // \u6A2A\u5411 v
|
|
vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;
|
|
|
|
vec4 pattern = texture2D(u_texture, uv);
|
|
|
|
if(u_animate.x == Animate) {
|
|
float currentPlane = floor(redioCount - time);
|
|
float textureStep = floor(count * u_animate.z);
|
|
float a = mod(currentPlane, textureStep);
|
|
if(a < textureStep - 1.0) {
|
|
pattern = vec4(0.0);
|
|
}
|
|
}
|
|
|
|
if(u_textureBlend == 0.0) { // normal
|
|
pattern.a = 0.0;
|
|
gl_FragColor = filterColor(gl_FragColor + pattern);
|
|
} else { // replace
|
|
pattern.a *= opacity;
|
|
if(gl_FragColor.a <= 0.0) {
|
|
pattern.a = 0.0;
|
|
}
|
|
gl_FragColor = filterColor(pattern);
|
|
}
|
|
|
|
} else {
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
}`,X5=`#define Animate 0.0
|
|
#define LineTexture 1.0
|
|
|
|
attribute vec4 a_Color;
|
|
attribute vec3 a_Position;
|
|
attribute vec4 a_Instance;
|
|
attribute float a_Size;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform float segmentNumber;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
varying vec4 v_color;
|
|
|
|
uniform float u_lineDir: 1.0;
|
|
|
|
uniform float u_thetaOffset: 0.314;
|
|
uniform float u_icon_step: 100;
|
|
uniform float u_line_texture: 0.0;
|
|
attribute vec2 a_iconMapUV;
|
|
varying vec2 v_iconMapUV;
|
|
|
|
uniform float u_opacity: 1.0;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
#pragma include "styleMappingCalThetaOffset"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "project"
|
|
#pragma include "picking"
|
|
|
|
float bezier3(vec3 arr, float t) {
|
|
float ut = 1. - t;
|
|
return (arr.x * ut + arr.y * t) * ut + (arr.y * ut + arr.z * t) * t;
|
|
}
|
|
vec2 midPoint(vec2 source, vec2 target, float arcThetaOffset) {
|
|
vec2 center = target - source;
|
|
float r = length(center);
|
|
float theta = atan(center.y, center.x);
|
|
float thetaOffset = arcThetaOffset;
|
|
float r2 = r / 2.0 / cos(thetaOffset);
|
|
float theta2 = theta + thetaOffset;
|
|
vec2 mid = vec2(r2*cos(theta2) + source.x, r2*sin(theta2) + source.y);
|
|
if(u_lineDir == 1.0) { // \u6B63\u5411
|
|
return mid;
|
|
} else { // \u9006\u5411
|
|
// (mid + vmin)/2 = (s + t)/2
|
|
vec2 vmid = source + target - mid;
|
|
return vmid;
|
|
}
|
|
// return mid;
|
|
}
|
|
float getSegmentRatio(float index) {
|
|
// dash: index / (segmentNumber - 1.);
|
|
// normal: smoothstep(0.0, 1.0, index / (segmentNumber - 1.));
|
|
return smoothstep(0.0, 1.0, index / (segmentNumber - 1.));
|
|
// return index / (segmentNumber - 1.);
|
|
}
|
|
vec2 interpolate (vec2 source, vec2 target, float t, float arcThetaOffset) {
|
|
// if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation
|
|
vec2 mid = midPoint(source, target, arcThetaOffset);
|
|
vec3 x = vec3(source.x, mid.x, target.x);
|
|
vec3 y = vec3(source.y, mid.y, target.y);
|
|
return vec2(bezier3(x ,t), bezier3(y,t));
|
|
}
|
|
vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;
|
|
return offset;
|
|
}
|
|
vec2 getNormal(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);
|
|
}
|
|
|
|
void main() {
|
|
v_color = a_Color;
|
|
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0 // dataset \u6570\u636E\u96C6
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke -> thetaOffset...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
|
|
vec2 thetaOffsetAndOffset = calThetaOffsetAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][1] = thetaOffsetAndOffset.r;
|
|
textureOffset = thetaOffsetAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
|
|
vec2 source = a_Instance.rg; // \u8D77\u59CB\u70B9
|
|
vec2 target = a_Instance.ba; // \u7EC8\u70B9
|
|
float segmentIndex = a_Position.x;
|
|
float segmentRatio = getSegmentRatio(segmentIndex);
|
|
|
|
float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));
|
|
float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);
|
|
float d_distance_ratio;
|
|
|
|
if(u_animate.x == Animate) {
|
|
d_distance_ratio = segmentIndex / segmentNumber;
|
|
if(u_lineDir != 1.0) {
|
|
d_distance_ratio = 1.0 - d_distance_ratio;
|
|
}
|
|
}
|
|
|
|
styleMappingMat[3].b = d_distance_ratio;
|
|
|
|
// styleMappingMat[0][1] - arcThetaOffset
|
|
float arcThetaOffset = styleMappingMat[0][1];
|
|
vec4 curr = project_position(vec4(interpolate(source, target, segmentRatio, arcThetaOffset), 0.0, 1.0));
|
|
vec4 next = project_position(vec4(interpolate(source, target, nextSegmentRatio, arcThetaOffset), 0.0, 1.0));
|
|
// v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);
|
|
//unProjCustomCoord
|
|
|
|
vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y));
|
|
|
|
|
|
float d_segmentIndex = a_Position.x + 1.0; // \u5F53\u524D\u9876\u70B9\u5728\u5F27\u7EBF\u4E2D\u6240\u5904\u7684\u5206\u6BB5\u4F4D\u7F6E
|
|
styleMappingMat[3].r = d_segmentIndex;
|
|
|
|
if(LineTexture == u_line_texture) { // \u5F00\u542F\u8D34\u56FE\u6A21\u5F0F
|
|
|
|
float arcDistrance = length(source - target); // \u8D77\u59CB\u70B9\u548C\u7EC8\u70B9\u7684\u8DDD\u79BB
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20) { // amap
|
|
arcDistrance *= 1000000.0;
|
|
}
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // mapbox
|
|
// arcDistrance *= 8.0;
|
|
arcDistrance = project_pixel_allmap(arcDistrance);
|
|
}
|
|
v_iconMapUV = a_iconMapUV;
|
|
|
|
float pixelLen = project_pixel_texture(u_icon_step); // \u8D34\u56FE\u6CBF\u5F27\u7EBF\u65B9\u5411\u7684\u957F\u5EA6 - \u968F\u5730\u56FE\u7F29\u653E\u6539\u53D8
|
|
float texCount = floor(arcDistrance/pixelLen); // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF
|
|
styleMappingMat[3].g = texCount;
|
|
|
|
float lineOffsetWidth = length(offset + offset * sign(a_Position.y)); // \u7EBF\u6A2A\u5411\u504F\u79FB\u7684\u8DDD\u79BB
|
|
float linePixelSize = project_pixel(a_Size); // \u5B9A\u70B9\u4F4D\u7F6E\u504F\u79FB
|
|
styleMappingMat[3].a = lineOffsetWidth/linePixelSize; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C
|
|
}
|
|
|
|
|
|
// gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, 0, 1.0));
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
// gl_Position = u_Mvp * (vec4(curr.xy + offset, 0, 1.0));
|
|
gl_Position = u_Mvp * (vec4(curr.xy + offset, 0, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, 0, 1.0));
|
|
}
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,h1=`#define Animate 0.0
|
|
#define LineTexture 1.0
|
|
|
|
uniform float u_opacity;
|
|
uniform float u_textureBlend;
|
|
uniform float u_blur : 0.9;
|
|
uniform float u_line_type: 0.0;
|
|
// varying vec2 v_normal;
|
|
varying vec4 v_dash_array;
|
|
varying vec4 v_color;
|
|
|
|
uniform float u_time;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
|
|
uniform float u_line_texture;
|
|
uniform sampler2D u_texture;
|
|
uniform vec2 u_textSize;
|
|
|
|
uniform float segmentNumber;
|
|
varying vec2 v_iconMapUV;
|
|
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
|
|
uniform float u_linearColor: 0;
|
|
uniform vec4 u_sourceColor;
|
|
uniform vec4 u_targetColor;
|
|
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float d_segmentIndex = styleMappingMat[3].r; // \u5F53\u524D\u9876\u70B9\u5728\u5F27\u7EBF\u4E2D\u6240\u5904\u7684\u5206\u6BB5\u4F4D\u7F6E
|
|
|
|
// \u8BBE\u7F6E\u5F27\u7EBF\u7684\u5E95\u8272
|
|
gl_FragColor = mix(u_sourceColor, u_targetColor, d_segmentIndex/segmentNumber);
|
|
gl_FragColor.a *= opacity;
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}`,Y5=`
|
|
attribute vec4 a_Color;
|
|
attribute vec3 a_Position;
|
|
attribute vec4 a_Instance;
|
|
attribute float a_Size;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform float segmentNumber;
|
|
varying vec4 v_color;
|
|
|
|
uniform float u_lineDir: 1.0;
|
|
|
|
uniform float u_thetaOffset: 0.314;
|
|
|
|
uniform float u_opacity: 1.0;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
#pragma include "styleMappingCalThetaOffset"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "project"
|
|
#pragma include "picking"
|
|
|
|
float bezier3(vec3 arr, float t) {
|
|
float ut = 1. - t;
|
|
return (arr.x * ut + arr.y * t) * ut + (arr.y * ut + arr.z * t) * t;
|
|
}
|
|
vec2 midPoint(vec2 source, vec2 target, float arcThetaOffset) {
|
|
vec2 center = target - source;
|
|
float r = length(center);
|
|
float theta = atan(center.y, center.x);
|
|
float thetaOffset = arcThetaOffset;
|
|
float r2 = r / 2.0 / cos(thetaOffset);
|
|
float theta2 = theta + thetaOffset;
|
|
vec2 mid = vec2(r2*cos(theta2) + source.x, r2*sin(theta2) + source.y);
|
|
if(u_lineDir == 1.0) { // \u6B63\u5411
|
|
return mid;
|
|
} else { // \u9006\u5411
|
|
// (mid + vmin)/2 = (s + t)/2
|
|
vec2 vmid = source + target - mid;
|
|
return vmid;
|
|
}
|
|
// return mid;
|
|
}
|
|
float getSegmentRatio(float index) {
|
|
return smoothstep(0.0, 1.0, index / (segmentNumber - 1.));
|
|
}
|
|
vec2 interpolate (vec2 source, vec2 target, float t, float arcThetaOffset) {
|
|
// if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation
|
|
vec2 mid = midPoint(source, target, arcThetaOffset);
|
|
vec3 x = vec3(source.x, mid.x, target.x);
|
|
vec3 y = vec3(source.y, mid.y, target.y);
|
|
return vec2(bezier3(x ,t), bezier3(y,t));
|
|
}
|
|
vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;
|
|
return offset;
|
|
}
|
|
vec2 getNormal(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);
|
|
}
|
|
|
|
void main() {
|
|
v_color = a_Color;
|
|
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0 // dataset \u6570\u636E\u96C6
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke -> thetaOffset...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
|
|
vec2 thetaOffsetAndOffset = calThetaOffsetAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][1] = thetaOffsetAndOffset.r;
|
|
textureOffset = thetaOffsetAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
|
|
vec2 source = a_Instance.rg; // \u8D77\u59CB\u70B9
|
|
vec2 target = a_Instance.ba; // \u7EC8\u70B9
|
|
float segmentIndex = a_Position.x;
|
|
float segmentRatio = getSegmentRatio(segmentIndex);
|
|
|
|
float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));
|
|
float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);
|
|
float d_distance_ratio;
|
|
|
|
styleMappingMat[3].b = d_distance_ratio;
|
|
|
|
// styleMappingMat[0][1] - arcThetaOffset
|
|
vec4 curr = project_position(vec4(interpolate(source, target, segmentRatio, styleMappingMat[0][1]), 0.0, 1.0));
|
|
vec4 next = project_position(vec4(interpolate(source, target, nextSegmentRatio, styleMappingMat[0][1]), 0.0, 1.0));
|
|
// v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);
|
|
//unProjCustomCoord
|
|
|
|
vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y));
|
|
|
|
|
|
float d_segmentIndex = a_Position.x + 1.0; // \u5F53\u524D\u9876\u70B9\u5728\u5F27\u7EBF\u4E2D\u6240\u5904\u7684\u5206\u6BB5\u4F4D\u7F6E
|
|
styleMappingMat[3].r = d_segmentIndex;
|
|
|
|
// gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, 0, 1.0));
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
// gl_Position = u_Mvp * (vec4(curr.xy + offset, 0, 1.0));
|
|
gl_Position = u_Mvp * (vec4(curr.xy + offset, 0, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, 0, 1.0));
|
|
}
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,$5={solid:0,dash:1},q5=function(n){(0,zt.Z)(a,n);var l=$w(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"updateTexture",function(){var m=s.rendererService.createTexture2D;if(s.texture){s.texture.update({data:s.iconService.getCanvas()}),s.layer.render();return}s.texture=m({data:s.iconService.getCanvas(),mag:ne.NEAREST,min:ne.NEAREST,premultiplyAlpha:!1,width:1024,height:s.iconService.canvasHeight||128})}),s}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.sourceColor,w=u.targetColor,A=u.textureBlend,R=A===void 0?"normal":A,B=u.lineType,G=B===void 0?"solid":B,j=u.dashArray,lt=j===void 0?[10,5]:j,ct=u.forward,_t=ct===void 0?!0:ct,Vt=u.lineTexture,ce=Vt===void 0?!1:Vt,ae=u.iconStep,ze=ae===void 0?100:ae,$e=u.segmentNumber,xr=$e===void 0?30:$e,Or=u.thetaOffset,Zr=Or===void 0?.314:Or;if(this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:v,thetaOffset:Zr})){this.judgeStyleAttributes({opacity:v,thetaOffset:Zr});var Wr=this.layer.getEncodedData(),wn=this.calDataFrame(this.cellLength,Wr,this.cellProperties),vn=wn.data,Kn=wn.width,Ei=wn.height;this.rowCount=Ei,this.dataTexture=this.cellLength>0&&vn.length>0?this.createTexture2D({flipY:!0,data:vn,format:ne.LUMINANCE,type:ne.FLOAT,width:Kn,height:Ei}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}lt.length===2&<.push(0,0);var qi=0,_o=[0,0,0,0],jo=[0,0,0,0];return m&&w&&(_o=Lo(m),jo=Lo(w),qi=1),this.rendererService.getDirty()&&this.texture.bind(),{u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_thetaOffset:(0,Fn.isNumber)(Zr)?Zr:0,u_opacity:(0,Fn.isNumber)(v)?v:1,u_textureBlend:R==="normal"?0:1,segmentNumber:xr,u_line_type:$5[G||"solid"],u_dash_array:lt,u_blur:.9,u_lineDir:_t?1:-1,u_texture:this.texture,u_line_texture:ce?1:0,u_icon_step:ze,u_textSize:[1024,this.iconService.canvasHeight||128],u_linearColor:qi,u_sourceColor:_o,u_targetColor:jo}}},{key:"getAnimateUniforms",value:function(){var u=this.layer.getLayerConfig(),h=u.animateOption;return{u_animate:this.animateOption2Array(h),u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return this.updateTexture(),this.iconService.on("imageUpdate",this.updateTexture),m.next=4,this.buildModels();case 4:return m.abrupt("return",m.sent);case 5:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u,h;(u=this.texture)===null||u===void 0||u.destroy(),(h=this.dataTexture)===null||h===void 0||h.destroy(),this.iconService.off("imageUpdate",this.updateTexture)}},{key:"getShaders",value:function(){var u=this.layer.getLayerConfig(),h=u.sourceColor,v=u.targetColor,m=u.lineType;return m==="dash"?{frag:Mx,vert:W5,type:"Dash"}:h&&v?{frag:h1,vert:Y5,type:"Linear"}:{frag:qw,vert:X5,type:""}}},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j,lt,ct,_t,Vt;return ot().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return v=this.layer.getLayerConfig(),m=v.segmentNumber,w=m===void 0?30:m,A=v.mask,R=A===void 0?!1:A,B=v.maskInside,G=B===void 0?!0:B,j=this.getShaders(),lt=j.frag,ct=j.vert,_t=j.type,ae.next=4,this.layer.buildLayerModel({moduleName:"lineArc2d"+_t,vertexShader:ct,fragmentShader:lt,triangulation:xm,depth:{enable:!1},blend:this.getBlend(),segmentNumber:w,stencil:Zo(R,G)});case 4:return Vt=ae.sent,ae.abrupt("return",[Vt]);case 6:case"end":return ae.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"registerBuiltinAttributes",value:function(){var u=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v){var m=v.size,w=m===void 0?1:m;return Array.isArray(w)?[w[0]]:[w]}}}),this.styleAttributeService.registerStyleAttribute({name:"instance",type:ea.Attribute,descriptor:{name:"a_Instance",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:4,update:function(v,m,w){return[w[3],w[4],w[5],w[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:ea.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(v){var m=u.iconService.getIconMap(),w=v.texture,A=m[w]||{x:0,y:0},R=A.x,B=A.y;return[R,B]}}})}}]),a}($o);function K5(n){var l=Q5();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Q5(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var J5=`#define LineTypeSolid 0.0
|
|
#define LineTypeDash 1.0
|
|
#define Animate 0.0
|
|
#define LineTexture 1.0
|
|
|
|
uniform float u_opacity;
|
|
uniform float u_textureBlend;
|
|
uniform float u_blur : 0.9;
|
|
uniform float u_line_type: 0.0;
|
|
// varying vec2 v_normal;
|
|
varying vec4 v_dash_array;
|
|
varying vec4 v_color;
|
|
|
|
uniform float u_line_texture: 0.0;
|
|
uniform sampler2D u_texture;
|
|
uniform vec2 u_textSize;
|
|
varying float v_segmentIndex;
|
|
uniform float segmentNumber;
|
|
|
|
varying vec2 v_iconMapUV;
|
|
|
|
uniform float u_time;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
|
|
varying mat4 styleMappingMat;
|
|
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float animateSpeed = 0.0; // \u8FD0\u52A8\u901F\u5EA6
|
|
float d_distance_ratio = styleMappingMat[3].g; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
gl_FragColor = v_color;
|
|
|
|
gl_FragColor.a *= opacity;
|
|
if(u_line_type == LineTypeDash) {
|
|
float flag = 0.;
|
|
float dashLength = mod(d_distance_ratio, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w);
|
|
if(dashLength < v_dash_array.x || (dashLength > (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z)) {
|
|
flag = 1.;
|
|
}
|
|
gl_FragColor.a *=flag;
|
|
}
|
|
|
|
if(u_animate.x == Animate && u_line_texture != LineTexture) {
|
|
animateSpeed = u_time / u_animate.y;
|
|
float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y);
|
|
|
|
alpha = (alpha + u_animate.w -1.0) / u_animate.w;
|
|
// alpha = smoothstep(0., 1., alpha);
|
|
alpha = clamp(alpha, 0.0, 1.0);
|
|
gl_FragColor.a *= alpha;
|
|
|
|
// u_animate
|
|
// x enable
|
|
// y duration
|
|
// z interval
|
|
// w trailLength
|
|
}
|
|
|
|
if(u_line_texture == LineTexture && u_line_type != LineTypeDash) { // while load texture
|
|
// float arcRadio = smoothstep( 0.0, 1.0, (v_segmentIndex / segmentNumber));
|
|
float arcRadio = v_segmentIndex / (segmentNumber - 1.0);
|
|
float count = styleMappingMat[3].b; // // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF
|
|
|
|
float time = 0.0;
|
|
if(u_animate.x == Animate) {
|
|
time = u_time / u_animate.y;
|
|
}
|
|
float redioCount = arcRadio * count;
|
|
|
|
float u = fract(redioCount - time);
|
|
|
|
float v = styleMappingMat[3].a; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C
|
|
vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;
|
|
vec4 pattern = texture2D(u_texture, uv);
|
|
|
|
if(u_animate.x == Animate) {
|
|
float currentPlane = floor(redioCount - time);
|
|
float textureStep = floor(count * u_animate.z);
|
|
float a = mod(currentPlane, textureStep);
|
|
if(a < textureStep - 1.0) {
|
|
pattern = vec4(0.0);
|
|
}
|
|
}
|
|
|
|
if(u_textureBlend == 0.0) { // normal
|
|
pattern.a = 0.0;
|
|
gl_FragColor = filterColor(gl_FragColor + pattern);
|
|
} else { // replace
|
|
pattern.a *= opacity;
|
|
if(gl_FragColor.a <= 0.0) {
|
|
pattern.a = 0.0;
|
|
discard;
|
|
} else {
|
|
gl_FragColor = filterColor(pattern);
|
|
}
|
|
}
|
|
|
|
} else {
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
}
|
|
`,Ix=`#define LineTypeSolid 0.0
|
|
#define LineTypeDash 1.0
|
|
#define Animate 0.0
|
|
#define LineTexture 1.0
|
|
attribute vec3 a_Position;
|
|
attribute vec4 a_Instance;
|
|
attribute vec4 a_Color;
|
|
attribute float a_Size;
|
|
|
|
uniform float u_globel;
|
|
uniform float u_globel_radius;
|
|
uniform float u_global_height: 10;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform float segmentNumber;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
varying vec4 v_color;
|
|
|
|
uniform float u_line_type: 0.0;
|
|
uniform vec4 u_dash_array: [10.0, 5., 0, 0];
|
|
varying vec4 v_dash_array;
|
|
|
|
uniform float u_icon_step: 100;
|
|
uniform float u_line_texture: 0.0;
|
|
varying float v_segmentIndex;
|
|
|
|
attribute vec2 a_iconMapUV;
|
|
varying vec2 v_iconMapUV;
|
|
|
|
uniform float u_opacity: 1.0;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "project"
|
|
#pragma include "picking"
|
|
|
|
float maps (float value, float start1, float stop1, float start2, float stop2) {
|
|
return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1));
|
|
}
|
|
|
|
float getSegmentRatio(float index) {
|
|
return smoothstep(0.0, 1.0, index / (segmentNumber - 1.0));
|
|
}
|
|
|
|
float paraboloid(vec2 source, vec2 target, float ratio) {
|
|
vec2 x = mix(source, target, ratio);
|
|
vec2 center = mix(source, target, 0.5);
|
|
float dSourceCenter = distance(source, center);
|
|
float dXCenter = distance(x, center);
|
|
return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter);
|
|
}
|
|
|
|
vec3 getPos(vec2 source, vec2 target, float segmentRatio) {
|
|
float vertex_height = paraboloid(source, target, segmentRatio);
|
|
|
|
return vec3(
|
|
mix(source, target, segmentRatio),
|
|
sqrt(max(0.0, vertex_height))
|
|
);
|
|
}
|
|
vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
|
|
vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;
|
|
|
|
return offset;
|
|
}
|
|
vec2 getNormal(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);
|
|
}
|
|
|
|
float torad(float deg) {
|
|
return (deg / 180.0) * acos(-1.0);
|
|
}
|
|
|
|
vec3 lglt2xyz(vec2 lnglat) {
|
|
float pi = 3.1415926;
|
|
// + Math.PI/2 \u662F\u4E3A\u4E86\u5BF9\u9F50\u5750\u6807
|
|
float lng = torad(lnglat.x) + pi / 2.0;
|
|
float lat = torad(lnglat.y);
|
|
|
|
// \u624B\u52A8\u589E\u52A0\u4E00\u4E9B\u504F\u79FB\uFF0C\u51CF\u8F7B\u9762\u7684\u51B2\u7A81
|
|
float radius = u_globel_radius;
|
|
|
|
float z = radius * cos(lat) * cos(lng);
|
|
float x = radius * cos(lat) * sin(lng);
|
|
float y = radius * sin(lat);
|
|
return vec3(x, y, z);
|
|
}
|
|
|
|
void main() {
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0 // dataset \u6570\u636E\u96C6
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
v_color = a_Color;
|
|
vec2 source = project_position(vec4(a_Instance.rg, 0, 0)).xy;
|
|
vec2 target = project_position(vec4(a_Instance.ba, 0, 0)).xy;
|
|
float segmentIndex = a_Position.x;
|
|
float segmentRatio = getSegmentRatio(segmentIndex);
|
|
float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));
|
|
|
|
float d_distance_ratio;
|
|
if(u_line_type == LineTypeDash) {
|
|
d_distance_ratio = segmentIndex / segmentNumber;
|
|
vec2 s = source;
|
|
vec2 t = target;
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
s = unProjCustomCoord(source);
|
|
t = unProjCustomCoord(target);
|
|
}
|
|
float total_Distance = pixelDistance(s, t) / 2.0 * PI;
|
|
v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / (total_Distance / segmentNumber * segmentIndex);
|
|
}
|
|
if(u_animate.x == Animate) {
|
|
d_distance_ratio = segmentIndex / segmentNumber;
|
|
}
|
|
styleMappingMat[3].g = d_distance_ratio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
|
|
float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);
|
|
vec3 curr = getPos(source, target, segmentRatio);
|
|
vec3 next = getPos(source, target, nextSegmentRatio);
|
|
vec2 offset = getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y);
|
|
// v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);
|
|
|
|
|
|
v_segmentIndex = a_Position.x;
|
|
if(LineTexture == u_line_texture && u_line_type != LineTypeDash) { // \u5F00\u542F\u8D34\u56FE\u6A21\u5F0F
|
|
|
|
float arcDistrance = length(source - target);
|
|
float pixelLen = project_pixel_texture(u_icon_step);
|
|
styleMappingMat[3].b = floor(arcDistrance/pixelLen); // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF
|
|
|
|
vec2 projectOffset = project_pixel(offset);
|
|
float lineOffsetWidth = length(projectOffset + projectOffset * sign(a_Position.y)); // \u7EBF\u6A2A\u5411\u504F\u79FB\u7684\u8DDD\u79BB
|
|
float linePixelSize = project_pixel(a_Size); // \u5B9A\u70B9\u4F4D\u7F6E\u504F\u79FB\uFF0C\u6309\u5730\u56FE\u7B49\u7EA7\u7F29\u653E\u540E\u7684\u8DDD\u79BB
|
|
styleMappingMat[3].a = lineOffsetWidth/linePixelSize; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C
|
|
|
|
v_iconMapUV = a_iconMapUV;
|
|
}
|
|
|
|
|
|
// gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(curr.xy + project_pixel(offset), curr.z, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));
|
|
}
|
|
|
|
// \u5730\u7403\u6A21\u5F0F
|
|
if(u_globel > 0.0) {
|
|
vec3 startLngLat = lglt2xyz(a_Instance.rg);
|
|
vec3 endLngLat = lglt2xyz(a_Instance.ba);
|
|
float globalRadius = length(startLngLat);
|
|
|
|
vec3 lineDir = normalize(endLngLat - startLngLat);
|
|
vec3 midPointDir = normalize((startLngLat + endLngLat)/2.0);
|
|
|
|
// \u7EBF\u7684\u504F\u79FB
|
|
vec3 lnglatOffset = cross(lineDir, midPointDir) * a_Position.y;
|
|
// \u8BA1\u7B97\u8D77\u59CB\u70B9\u548C\u7EC8\u6B62\u70B9\u7684\u8DDD\u79BB
|
|
float lnglatLength = length(a_Instance.rg - a_Instance.ba)/50.0;
|
|
// \u8BA1\u7B97\u98DE\u7EBF\u5404\u4E2A\u8282\u70B9\u76F8\u5E94\u7684\u9AD8\u5EA6
|
|
float lineHeight = u_global_height * (-4.0*segmentRatio*segmentRatio + 4.0 * segmentRatio) * lnglatLength;
|
|
// \u5730\u7403\u70B9\u4F4D
|
|
vec3 globalPoint = normalize(mix(startLngLat, endLngLat, segmentRatio)) * (globalRadius + lineHeight) + lnglatOffset * a_Size;
|
|
|
|
gl_Position = u_ViewProjectionMatrix * vec4(globalPoint, 1.0);
|
|
}
|
|
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,tI=`
|
|
#define Animate 0.0
|
|
|
|
uniform float u_opacity;
|
|
uniform float u_blur : 0.9;
|
|
varying float v_segmentIndex;
|
|
uniform float segmentNumber;
|
|
|
|
uniform float u_time;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
|
|
uniform float u_linearColor: 0;
|
|
uniform vec4 u_sourceColor;
|
|
uniform vec4 u_targetColor;
|
|
|
|
varying mat4 styleMappingMat;
|
|
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float animateSpeed = 0.0; // \u8FD0\u52A8\u901F\u5EA6
|
|
float d_distance_ratio = styleMappingMat[3].g; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
|
|
gl_FragColor = mix(u_sourceColor, u_targetColor, v_segmentIndex/segmentNumber);
|
|
|
|
gl_FragColor.a *= opacity;
|
|
|
|
if(u_animate.x == Animate) {
|
|
animateSpeed = u_time / u_animate.y;
|
|
float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y);
|
|
|
|
alpha = (alpha + u_animate.w -1.0) / u_animate.w;
|
|
// alpha = smoothstep(0., 1., alpha);
|
|
alpha = clamp(alpha, 0.0, 1.0);
|
|
gl_FragColor.a *= alpha;
|
|
|
|
// u_animate
|
|
// x enable
|
|
// y duration
|
|
// z interval
|
|
// w trailLength
|
|
}
|
|
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
`,eI=`#define LineTypeSolid 0.0
|
|
#define LineTypeDash 1.0
|
|
#define Animate 0.0
|
|
#define LineTexture 1.0
|
|
attribute vec3 a_Position;
|
|
attribute vec4 a_Instance;
|
|
attribute vec4 a_Color;
|
|
attribute float a_Size;
|
|
attribute vec2 a_iconMapUV;
|
|
|
|
uniform float u_globel;
|
|
uniform float u_globel_radius;
|
|
uniform float u_global_height: 10;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform float segmentNumber;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
|
|
uniform float u_line_type: 0.0;
|
|
uniform vec4 u_dash_array: [10.0, 5., 0, 0];
|
|
uniform float u_icon_step: 100;
|
|
uniform float u_line_texture: 0.0;
|
|
uniform float u_opacity: 1.0;
|
|
|
|
varying vec4 v_dash_array;
|
|
varying vec4 v_color;
|
|
varying float v_segmentIndex;
|
|
varying vec2 v_iconMapUV;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "project"
|
|
#pragma include "picking"
|
|
|
|
float maps (float value, float start1, float stop1, float start2, float stop2) {
|
|
return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1));
|
|
}
|
|
|
|
float getSegmentRatio(float index) {
|
|
return smoothstep(0.0, 1.0, index / (segmentNumber - 1.0));
|
|
}
|
|
|
|
float paraboloid(vec2 source, vec2 target, float ratio) {
|
|
vec2 x = mix(source, target, ratio);
|
|
vec2 center = mix(source, target, 0.5);
|
|
float dSourceCenter = distance(source, center);
|
|
float dXCenter = distance(x, center);
|
|
return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter);
|
|
}
|
|
|
|
vec3 getPos(vec2 source, vec2 target, float segmentRatio) {
|
|
float vertex_height = paraboloid(source, target, segmentRatio);
|
|
|
|
return vec3(
|
|
mix(source, target, segmentRatio),
|
|
sqrt(max(0.0, vertex_height))
|
|
);
|
|
}
|
|
vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
|
|
vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;
|
|
|
|
return offset;
|
|
}
|
|
vec2 getNormal(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);
|
|
}
|
|
|
|
float torad(float deg) {
|
|
return (deg / 180.0) * acos(-1.0);
|
|
}
|
|
|
|
vec3 lglt2xyz(vec2 lnglat) {
|
|
float pi = 3.1415926;
|
|
// + Math.PI/2 \u662F\u4E3A\u4E86\u5BF9\u9F50\u5750\u6807
|
|
float lng = torad(lnglat.x) + pi / 2.0;
|
|
float lat = torad(lnglat.y);
|
|
|
|
// \u624B\u52A8\u589E\u52A0\u4E00\u4E9B\u504F\u79FB\uFF0C\u51CF\u8F7B\u9762\u7684\u51B2\u7A81
|
|
float radius = u_globel_radius;
|
|
|
|
float z = radius * cos(lat) * cos(lng);
|
|
float x = radius * cos(lat) * sin(lng);
|
|
float y = radius * sin(lat);
|
|
return vec3(x, y, z);
|
|
}
|
|
|
|
void main() {
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0 // dataset \u6570\u636E\u96C6
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
v_color = a_Color;
|
|
vec2 source = project_position(vec4(a_Instance.rg, 0, 0)).xy;
|
|
vec2 target = project_position(vec4(a_Instance.ba, 0, 0)).xy;
|
|
float segmentIndex = a_Position.x;
|
|
float segmentRatio = getSegmentRatio(segmentIndex);
|
|
float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));
|
|
|
|
float d_distance_ratio;
|
|
if(u_line_type == LineTypeDash) {
|
|
d_distance_ratio = segmentIndex / segmentNumber;
|
|
// float total_Distance = pixelDistance(a_Instance.rg, a_Instance.ba) / 2.0 * PI;
|
|
vec2 s = source;
|
|
vec2 t = target;
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
s = unProjCustomCoord(source);
|
|
t = unProjCustomCoord(target);
|
|
}
|
|
float total_Distance = pixelDistance(s, t) / 2.0 * PI;
|
|
v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / (total_Distance / segmentNumber * segmentIndex);
|
|
}
|
|
if(u_animate.x == Animate) {
|
|
d_distance_ratio = segmentIndex / segmentNumber;
|
|
}
|
|
styleMappingMat[3].g = d_distance_ratio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
|
|
float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);
|
|
vec3 curr = getPos(source, target, segmentRatio);
|
|
vec3 next = getPos(source, target, nextSegmentRatio);
|
|
vec2 offset = getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y);
|
|
// v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);
|
|
|
|
|
|
v_segmentIndex = a_Position.x;
|
|
if(LineTexture == u_line_texture && u_line_type != LineTypeDash) { // \u5F00\u542F\u8D34\u56FE\u6A21\u5F0F
|
|
|
|
float arcDistrance = length(source - target);
|
|
float pixelLen = project_pixel_texture(u_icon_step);
|
|
styleMappingMat[3].b = floor(arcDistrance/pixelLen); // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF
|
|
|
|
vec2 projectOffset = project_pixel(offset);
|
|
float lineOffsetWidth = length(projectOffset + projectOffset * sign(a_Position.y)); // \u7EBF\u6A2A\u5411\u504F\u79FB\u7684\u8DDD\u79BB
|
|
float linePixelSize = project_pixel(a_Size); // \u5B9A\u70B9\u4F4D\u7F6E\u504F\u79FB\uFF0C\u6309\u5730\u56FE\u7B49\u7EA7\u7F29\u653E\u540E\u7684\u8DDD\u79BB
|
|
styleMappingMat[3].a = lineOffsetWidth/linePixelSize; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C
|
|
|
|
v_iconMapUV = a_iconMapUV;
|
|
}
|
|
|
|
|
|
// gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(curr.xy + project_pixel(offset), curr.z, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));
|
|
}
|
|
|
|
// \u5730\u7403\u6A21\u5F0F
|
|
if(u_globel > 0.0) {
|
|
vec3 startLngLat = lglt2xyz(a_Instance.rg);
|
|
vec3 endLngLat = lglt2xyz(a_Instance.ba);
|
|
float globalRadius = length(startLngLat);
|
|
|
|
vec3 lineDir = normalize(endLngLat - startLngLat);
|
|
vec3 midPointDir = normalize((startLngLat + endLngLat)/2.0);
|
|
|
|
// \u7EBF\u7684\u504F\u79FB
|
|
vec3 lnglatOffset = cross(lineDir, midPointDir) * a_Position.y;
|
|
// \u8BA1\u7B97\u8D77\u59CB\u70B9\u548C\u7EC8\u6B62\u70B9\u7684\u8DDD\u79BB
|
|
float lnglatLength = length(a_Instance.rg - a_Instance.ba)/50.0;
|
|
// \u8BA1\u7B97\u98DE\u7EBF\u5404\u4E2A\u8282\u70B9\u76F8\u5E94\u7684\u9AD8\u5EA6
|
|
float lineHeight = u_global_height * (-4.0*segmentRatio*segmentRatio + 4.0 * segmentRatio) * lnglatLength;
|
|
// \u5730\u7403\u70B9\u4F4D
|
|
vec3 globalPoint = normalize(mix(startLngLat, endLngLat, segmentRatio)) * (globalRadius + lineHeight) + lnglatOffset * a_Size;
|
|
|
|
gl_Position = u_ViewProjectionMatrix * vec4(globalPoint, 1.0);
|
|
}
|
|
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,rI={solid:0,dash:1},nI=function(n){(0,zt.Z)(a,n);var l=K5(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"updateTexture",function(){var m=s.rendererService.createTexture2D;if(s.texture){s.texture.update({data:s.iconService.getCanvas()}),s.layer.render();return}s.texture=m({data:s.iconService.getCanvas(),mag:ne.NEAREST,min:ne.NEAREST,premultiplyAlpha:!1,width:1024,height:s.iconService.canvasHeight||128})}),s}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.sourceColor,w=u.targetColor,A=u.textureBlend,R=A===void 0?"normal":A,B=u.lineType,G=B===void 0?"solid":B,j=u.dashArray,lt=j===void 0?[10,5]:j,ct=u.lineTexture,_t=ct===void 0?!1:ct,Vt=u.iconStep,ce=Vt===void 0?100:Vt,ae=u.segmentNumber,ze=ae===void 0?30:ae,$e=u.globalArcHeight,xr=$e===void 0?10:$e;lt.length===2&<.push(0,0);var Or=0,Zr=[0,0,0,0],Wr=[0,0,0,0];if(m&&w&&(Zr=Lo(m),Wr=Lo(w),Or=1),this.rendererService.getDirty()&&this.texture.bind(),this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:v})){this.judgeStyleAttributes({opacity:v});var wn=this.layer.getEncodedData(),vn=this.calDataFrame(this.cellLength,wn,this.cellProperties),Kn=vn.data,Ei=vn.width,qi=vn.height;this.rowCount=qi,this.dataTexture=this.cellLength>0&&Kn.length>0?this.createTexture2D({flipY:!0,data:Kn,format:ne.LUMINANCE,type:ne.FLOAT,width:Ei,height:qi}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}return{u_globel:this.mapService.version==="GLOBEL"?1:0,u_globel_radius:Jd,u_global_height:xr,u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_opacity:(0,Fn.isNumber)(v)?v:1,u_textureBlend:R==="normal"?0:1,segmentNumber:ze,u_line_type:rI[G]||0,u_dash_array:lt,u_texture:this.texture,u_line_texture:_t?1:0,u_icon_step:ce,u_textSize:[1024,this.iconService.canvasHeight||128],u_linearColor:Or,u_sourceColor:Zr,u_targetColor:Wr}}},{key:"getAnimateUniforms",value:function(){var u=this.layer.getLayerConfig(),h=u.animateOption;return{u_animate:this.animateOption2Array(h),u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return this.updateTexture(),this.iconService.on("imageUpdate",this.updateTexture),m.next=4,this.buildModels();case 4:return m.abrupt("return",m.sent);case 5:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u,h;(u=this.texture)===null||u===void 0||u.destroy(),(h=this.dataTexture)===null||h===void 0||h.destroy(),this.iconService.off("imageUpdate",this.updateTexture)}},{key:"getShaders",value:function(){var u=this.layer.getLayerConfig(),h=u.sourceColor,v=u.targetColor;return h&&v?{frag:tI,vert:eI,type:"Linear"}:{frag:J5,vert:Ix,type:""}}},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j,lt,ct,_t,Vt;return ot().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return v=this.layer.getLayerConfig(),m=v.segmentNumber,w=m===void 0?30:m,A=v.mask,R=A===void 0?!1:A,B=v.maskInside,G=B===void 0?!0:B,j=this.getShaders(),lt=j.frag,ct=j.vert,_t=j.type,ae.next=4,this.layer.buildLayerModel({moduleName:"lineArc3d"+_t,vertexShader:ct,fragmentShader:lt,triangulation:xm,blend:this.getBlend(),segmentNumber:w,stencil:Zo(R,G)});case 4:return Vt=ae.sent,ae.abrupt("return",[Vt]);case 6:case"end":return ae.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"registerBuiltinAttributes",value:function(){var u=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v){var m=v.size,w=m===void 0?1:m;return Array.isArray(w)?[w[0]]:[w]}}}),this.styleAttributeService.registerStyleAttribute({name:"instance",type:ea.Attribute,descriptor:{name:"a_Instance",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:4,update:function(v,m,w){return[w[3],w[4],w[5],w[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:ea.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(v){var m=u.iconService.getIconMap(),w=v.texture,A=m[w]||{x:0,y:0},R=A.x,B=A.y;return[R,B]}}})}}]),a}($o);function p1(n){var l=iI();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function iI(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var aI=`#define LineTypeSolid 0.0
|
|
#define LineTypeDash 1.0
|
|
#define Animate 0.0
|
|
#define LineTexture 1.0
|
|
|
|
uniform float u_opacity;
|
|
uniform float u_textureBlend;
|
|
uniform float u_blur : 0.9;
|
|
uniform float u_line_type: 0.0;
|
|
// varying vec2 v_normal;
|
|
varying vec4 v_dash_array;
|
|
varying vec4 v_color;
|
|
|
|
uniform float u_line_texture: 0.0;
|
|
uniform sampler2D u_texture;
|
|
uniform vec2 u_textSize;
|
|
varying float v_segmentIndex;
|
|
uniform float segmentNumber;
|
|
|
|
varying vec2 v_iconMapUV;
|
|
|
|
uniform float u_time;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
|
|
varying mat4 styleMappingMat;
|
|
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float animateSpeed = 0.0; // \u8FD0\u52A8\u901F\u5EA6
|
|
float d_distance_ratio = styleMappingMat[3].g; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
gl_FragColor = v_color;
|
|
|
|
gl_FragColor.a *= opacity;
|
|
if(u_line_type == LineTypeDash) {
|
|
float flag = 0.;
|
|
float dashLength = mod(d_distance_ratio, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w);
|
|
if(dashLength < v_dash_array.x || (dashLength > (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z)) {
|
|
flag = 1.;
|
|
}
|
|
gl_FragColor.a *=flag;
|
|
}
|
|
|
|
if(u_animate.x == Animate && u_line_texture != LineTexture) {
|
|
animateSpeed = u_time / u_animate.y;
|
|
float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y);
|
|
|
|
alpha = (alpha + u_animate.w -1.0) / u_animate.w;
|
|
// alpha = smoothstep(0., 1., alpha);
|
|
alpha = clamp(alpha, 0.0, 1.0);
|
|
gl_FragColor.a *= alpha;
|
|
|
|
// u_animate
|
|
// x enable
|
|
// y duration
|
|
// z interval
|
|
// w trailLength
|
|
}
|
|
|
|
if(u_line_texture == LineTexture && u_line_type != LineTypeDash) { // while load texture
|
|
// float arcRadio = smoothstep( 0.0, 1.0, (v_segmentIndex / segmentNumber));
|
|
float arcRadio = v_segmentIndex / (segmentNumber - 1.0);
|
|
float count = styleMappingMat[3].b; // // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF
|
|
|
|
float time = 0.0;
|
|
if(u_animate.x == Animate) {
|
|
time = u_time / u_animate.y;
|
|
}
|
|
float redioCount = arcRadio * count;
|
|
|
|
float u = fract(redioCount - time);
|
|
|
|
float v = styleMappingMat[3].a; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C
|
|
vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;
|
|
vec4 pattern = texture2D(u_texture, uv);
|
|
|
|
if(u_animate.x == Animate) {
|
|
float currentPlane = floor(redioCount - time);
|
|
float textureStep = floor(count * u_animate.z);
|
|
float a = mod(currentPlane, textureStep);
|
|
if(a < textureStep - 1.0) {
|
|
pattern = vec4(0.0);
|
|
}
|
|
}
|
|
|
|
if(u_textureBlend == 0.0) { // normal
|
|
pattern.a = 0.0;
|
|
gl_FragColor = filterColor(gl_FragColor + pattern);
|
|
} else { // replace
|
|
pattern.a *= opacity;
|
|
if(gl_FragColor.a <= 0.0) {
|
|
pattern.a = 0.0;
|
|
discard;
|
|
} else {
|
|
gl_FragColor = filterColor(pattern);
|
|
}
|
|
}
|
|
|
|
} else {
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
}
|
|
`,oI=`#define LineTypeSolid 0.0
|
|
#define LineTypeDash 1.0
|
|
#define Animate 0.0
|
|
#define LineTexture 1.0
|
|
attribute vec3 a_Position;
|
|
attribute vec4 a_Instance;
|
|
attribute vec4 a_Color;
|
|
attribute float a_Size;
|
|
|
|
uniform float u_globel;
|
|
uniform float u_globel_radius;
|
|
uniform float u_global_height: 10;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform float segmentNumber;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
varying vec4 v_color;
|
|
|
|
uniform float u_line_type: 0.0;
|
|
uniform vec4 u_dash_array: [10.0, 5., 0, 0];
|
|
varying vec4 v_dash_array;
|
|
|
|
uniform float u_icon_step: 100;
|
|
uniform float u_line_texture: 0.0;
|
|
varying float v_segmentIndex;
|
|
|
|
attribute vec2 a_iconMapUV;
|
|
varying vec2 v_iconMapUV;
|
|
|
|
uniform float u_opacity: 1.0;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "project"
|
|
#pragma include "picking"
|
|
|
|
float maps (float value, float start1, float stop1, float start2, float stop2) {
|
|
return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1));
|
|
}
|
|
|
|
float getSegmentRatio(float index) {
|
|
return smoothstep(0.0, 1.0, index / (segmentNumber - 1.0));
|
|
}
|
|
|
|
float paraboloid(vec2 source, vec2 target, float ratio) {
|
|
vec2 x = mix(source, target, ratio);
|
|
vec2 center = mix(source, target, 0.5);
|
|
float dSourceCenter = distance(source, center);
|
|
float dXCenter = distance(x, center);
|
|
return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter);
|
|
}
|
|
|
|
vec3 getPos(vec2 source, vec2 target, float segmentRatio) {
|
|
float vertex_height = paraboloid(source, target, segmentRatio);
|
|
|
|
return vec3(
|
|
mix(source, target, segmentRatio),
|
|
sqrt(max(0.0, vertex_height))
|
|
);
|
|
}
|
|
vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
|
|
vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;
|
|
|
|
return offset;
|
|
}
|
|
vec2 getNormal(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);
|
|
}
|
|
|
|
float torad(float deg) {
|
|
return (deg / 180.0) * acos(-1.0);
|
|
}
|
|
|
|
vec3 lglt2xyz(vec2 lnglat) {
|
|
float pi = 3.1415926;
|
|
// + Math.PI/2 \u662F\u4E3A\u4E86\u5BF9\u9F50\u5750\u6807
|
|
float lng = torad(lnglat.x) + pi / 2.0;
|
|
float lat = torad(lnglat.y);
|
|
|
|
// \u624B\u52A8\u589E\u52A0\u4E00\u4E9B\u504F\u79FB\uFF0C\u51CF\u8F7B\u9762\u7684\u51B2\u7A81
|
|
float radius = u_globel_radius;
|
|
|
|
float z = radius * cos(lat) * cos(lng);
|
|
float x = radius * cos(lat) * sin(lng);
|
|
float y = radius * sin(lat);
|
|
return vec3(x, y, z);
|
|
}
|
|
|
|
void main() {
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0 // dataset \u6570\u636E\u96C6
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
v_color = a_Color;
|
|
vec2 source = project_position(vec4(a_Instance.rg, 0, 0)).xy;
|
|
vec2 target = project_position(vec4(a_Instance.ba, 0, 0)).xy;
|
|
float segmentIndex = a_Position.x;
|
|
float segmentRatio = getSegmentRatio(segmentIndex);
|
|
float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));
|
|
|
|
float d_distance_ratio;
|
|
if(u_line_type == LineTypeDash) {
|
|
d_distance_ratio = segmentIndex / segmentNumber;
|
|
vec2 s = source;
|
|
vec2 t = target;
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
s = unProjCustomCoord(source);
|
|
t = unProjCustomCoord(target);
|
|
}
|
|
float total_Distance = pixelDistance(s, t) / 2.0 * PI;
|
|
v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / (total_Distance / segmentNumber * segmentIndex);
|
|
}
|
|
if(u_animate.x == Animate) {
|
|
d_distance_ratio = segmentIndex / segmentNumber;
|
|
}
|
|
styleMappingMat[3].g = d_distance_ratio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
|
|
float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);
|
|
vec3 curr = getPos(source, target, segmentRatio);
|
|
vec3 next = getPos(source, target, nextSegmentRatio);
|
|
vec2 offset = getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y);
|
|
// v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);
|
|
|
|
|
|
v_segmentIndex = a_Position.x;
|
|
if(LineTexture == u_line_texture && u_line_type != LineTypeDash) { // \u5F00\u542F\u8D34\u56FE\u6A21\u5F0F
|
|
|
|
float arcDistrance = length(source - target);
|
|
float pixelLen = project_pixel_texture(u_icon_step);
|
|
styleMappingMat[3].b = floor(arcDistrance/pixelLen); // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF
|
|
|
|
vec2 projectOffset = project_pixel(offset);
|
|
float lineOffsetWidth = length(projectOffset + projectOffset * sign(a_Position.y)); // \u7EBF\u6A2A\u5411\u504F\u79FB\u7684\u8DDD\u79BB
|
|
float linePixelSize = project_pixel(a_Size); // \u5B9A\u70B9\u4F4D\u7F6E\u504F\u79FB\uFF0C\u6309\u5730\u56FE\u7B49\u7EA7\u7F29\u653E\u540E\u7684\u8DDD\u79BB
|
|
styleMappingMat[3].a = lineOffsetWidth/linePixelSize; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C
|
|
|
|
v_iconMapUV = a_iconMapUV;
|
|
}
|
|
|
|
|
|
// gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(curr.xy + project_pixel(offset), curr.z, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));
|
|
}
|
|
|
|
// \u5730\u7403\u6A21\u5F0F
|
|
if(u_globel > 0.0) {
|
|
vec3 startLngLat = lglt2xyz(a_Instance.rg);
|
|
vec3 endLngLat = lglt2xyz(a_Instance.ba);
|
|
float globalRadius = length(startLngLat);
|
|
|
|
vec3 lineDir = normalize(endLngLat - startLngLat);
|
|
vec3 midPointDir = normalize((startLngLat + endLngLat)/2.0);
|
|
|
|
// \u7EBF\u7684\u504F\u79FB
|
|
vec3 lnglatOffset = cross(lineDir, midPointDir) * a_Position.y;
|
|
// \u8BA1\u7B97\u8D77\u59CB\u70B9\u548C\u7EC8\u6B62\u70B9\u7684\u8DDD\u79BB
|
|
float lnglatLength = length(a_Instance.rg - a_Instance.ba)/50.0;
|
|
// \u8BA1\u7B97\u98DE\u7EBF\u5404\u4E2A\u8282\u70B9\u76F8\u5E94\u7684\u9AD8\u5EA6
|
|
float lineHeight = u_global_height * (-4.0*segmentRatio*segmentRatio + 4.0 * segmentRatio) * lnglatLength;
|
|
// \u5730\u7403\u70B9\u4F4D
|
|
vec3 globalPoint = normalize(mix(startLngLat, endLngLat, segmentRatio)) * (globalRadius + lineHeight) + lnglatOffset * a_Size;
|
|
|
|
gl_Position = u_ViewProjectionMatrix * vec4(globalPoint, 1.0);
|
|
}
|
|
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,sI=`
|
|
#define Animate 0.0
|
|
|
|
uniform float u_opacity;
|
|
uniform float u_blur : 0.9;
|
|
varying float v_segmentIndex;
|
|
uniform float segmentNumber;
|
|
|
|
uniform float u_time;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
|
|
uniform float u_linearColor: 0;
|
|
uniform vec4 u_sourceColor;
|
|
uniform vec4 u_targetColor;
|
|
|
|
varying mat4 styleMappingMat;
|
|
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float animateSpeed = 0.0; // \u8FD0\u52A8\u901F\u5EA6
|
|
float d_distance_ratio = styleMappingMat[3].g; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
|
|
gl_FragColor = mix(u_sourceColor, u_targetColor, v_segmentIndex/segmentNumber);
|
|
|
|
gl_FragColor.a *= opacity;
|
|
|
|
if(u_animate.x == Animate) {
|
|
animateSpeed = u_time / u_animate.y;
|
|
float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y);
|
|
|
|
alpha = (alpha + u_animate.w -1.0) / u_animate.w;
|
|
// alpha = smoothstep(0., 1., alpha);
|
|
alpha = clamp(alpha, 0.0, 1.0);
|
|
gl_FragColor.a *= alpha;
|
|
|
|
// u_animate
|
|
// x enable
|
|
// y duration
|
|
// z interval
|
|
// w trailLength
|
|
}
|
|
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
`,uI=`#define LineTypeSolid 0.0
|
|
#define LineTypeDash 1.0
|
|
#define Animate 0.0
|
|
#define LineTexture 1.0
|
|
attribute vec3 a_Position;
|
|
attribute vec4 a_Instance;
|
|
attribute vec4 a_Color;
|
|
attribute float a_Size;
|
|
attribute vec2 a_iconMapUV;
|
|
|
|
uniform float u_globel;
|
|
uniform float u_globel_radius;
|
|
uniform float u_global_height: 10;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform float segmentNumber;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
|
|
uniform float u_line_type: 0.0;
|
|
uniform vec4 u_dash_array: [10.0, 5., 0, 0];
|
|
uniform float u_icon_step: 100;
|
|
uniform float u_line_texture: 0.0;
|
|
uniform float u_opacity: 1.0;
|
|
|
|
varying vec4 v_dash_array;
|
|
varying vec4 v_color;
|
|
varying float v_segmentIndex;
|
|
varying vec2 v_iconMapUV;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "project"
|
|
#pragma include "picking"
|
|
|
|
float maps (float value, float start1, float stop1, float start2, float stop2) {
|
|
return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1));
|
|
}
|
|
|
|
float getSegmentRatio(float index) {
|
|
return smoothstep(0.0, 1.0, index / (segmentNumber - 1.0));
|
|
}
|
|
|
|
float paraboloid(vec2 source, vec2 target, float ratio) {
|
|
vec2 x = mix(source, target, ratio);
|
|
vec2 center = mix(source, target, 0.5);
|
|
float dSourceCenter = distance(source, center);
|
|
float dXCenter = distance(x, center);
|
|
return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter);
|
|
}
|
|
|
|
vec3 getPos(vec2 source, vec2 target, float segmentRatio) {
|
|
float vertex_height = paraboloid(source, target, segmentRatio);
|
|
|
|
return vec3(
|
|
mix(source, target, segmentRatio),
|
|
sqrt(max(0.0, vertex_height))
|
|
);
|
|
}
|
|
vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
|
|
vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;
|
|
|
|
return offset;
|
|
}
|
|
vec2 getNormal(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);
|
|
}
|
|
|
|
float torad(float deg) {
|
|
return (deg / 180.0) * acos(-1.0);
|
|
}
|
|
|
|
vec3 lglt2xyz(vec2 lnglat) {
|
|
float pi = 3.1415926;
|
|
// + Math.PI/2 \u662F\u4E3A\u4E86\u5BF9\u9F50\u5750\u6807
|
|
float lng = torad(lnglat.x) + pi / 2.0;
|
|
float lat = torad(lnglat.y);
|
|
|
|
// \u624B\u52A8\u589E\u52A0\u4E00\u4E9B\u504F\u79FB\uFF0C\u51CF\u8F7B\u9762\u7684\u51B2\u7A81
|
|
float radius = u_globel_radius;
|
|
|
|
float z = radius * cos(lat) * cos(lng);
|
|
float x = radius * cos(lat) * sin(lng);
|
|
float y = radius * sin(lat);
|
|
return vec3(x, y, z);
|
|
}
|
|
|
|
void main() {
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0 // dataset \u6570\u636E\u96C6
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
v_color = a_Color;
|
|
vec2 source = project_position(vec4(a_Instance.rg, 0, 0)).xy;
|
|
vec2 target = project_position(vec4(a_Instance.ba, 0, 0)).xy;
|
|
float segmentIndex = a_Position.x;
|
|
float segmentRatio = getSegmentRatio(segmentIndex);
|
|
float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));
|
|
|
|
float d_distance_ratio;
|
|
if(u_line_type == LineTypeDash) {
|
|
d_distance_ratio = segmentIndex / segmentNumber;
|
|
// float total_Distance = pixelDistance(a_Instance.rg, a_Instance.ba) / 2.0 * PI;
|
|
vec2 s = source;
|
|
vec2 t = target;
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
s = unProjCustomCoord(source);
|
|
t = unProjCustomCoord(target);
|
|
}
|
|
float total_Distance = pixelDistance(s, t) / 2.0 * PI;
|
|
v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / (total_Distance / segmentNumber * segmentIndex);
|
|
}
|
|
if(u_animate.x == Animate) {
|
|
d_distance_ratio = segmentIndex / segmentNumber;
|
|
}
|
|
styleMappingMat[3].g = d_distance_ratio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
|
|
float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);
|
|
vec3 curr = getPos(source, target, segmentRatio);
|
|
vec3 next = getPos(source, target, nextSegmentRatio);
|
|
vec2 offset = getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y);
|
|
// v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);
|
|
|
|
|
|
v_segmentIndex = a_Position.x;
|
|
if(LineTexture == u_line_texture && u_line_type != LineTypeDash) { // \u5F00\u542F\u8D34\u56FE\u6A21\u5F0F
|
|
|
|
float arcDistrance = length(source - target);
|
|
float pixelLen = project_pixel_texture(u_icon_step);
|
|
styleMappingMat[3].b = floor(arcDistrance/pixelLen); // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF
|
|
|
|
vec2 projectOffset = project_pixel(offset);
|
|
float lineOffsetWidth = length(projectOffset + projectOffset * sign(a_Position.y)); // \u7EBF\u6A2A\u5411\u504F\u79FB\u7684\u8DDD\u79BB
|
|
float linePixelSize = project_pixel(a_Size); // \u5B9A\u70B9\u4F4D\u7F6E\u504F\u79FB\uFF0C\u6309\u5730\u56FE\u7B49\u7EA7\u7F29\u653E\u540E\u7684\u8DDD\u79BB
|
|
styleMappingMat[3].a = lineOffsetWidth/linePixelSize; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C
|
|
|
|
v_iconMapUV = a_iconMapUV;
|
|
}
|
|
|
|
|
|
// gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(curr.xy + project_pixel(offset), curr.z, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));
|
|
}
|
|
|
|
// \u5730\u7403\u6A21\u5F0F
|
|
if(u_globel > 0.0) {
|
|
vec3 startLngLat = lglt2xyz(a_Instance.rg);
|
|
vec3 endLngLat = lglt2xyz(a_Instance.ba);
|
|
float globalRadius = length(startLngLat);
|
|
|
|
vec3 lineDir = normalize(endLngLat - startLngLat);
|
|
vec3 midPointDir = normalize((startLngLat + endLngLat)/2.0);
|
|
|
|
// \u7EBF\u7684\u504F\u79FB
|
|
vec3 lnglatOffset = cross(lineDir, midPointDir) * a_Position.y;
|
|
// \u8BA1\u7B97\u8D77\u59CB\u70B9\u548C\u7EC8\u6B62\u70B9\u7684\u8DDD\u79BB
|
|
float lnglatLength = length(a_Instance.rg - a_Instance.ba)/50.0;
|
|
// \u8BA1\u7B97\u98DE\u7EBF\u5404\u4E2A\u8282\u70B9\u76F8\u5E94\u7684\u9AD8\u5EA6
|
|
float lineHeight = u_global_height * (-4.0*segmentRatio*segmentRatio + 4.0 * segmentRatio) * lnglatLength;
|
|
// \u5730\u7403\u70B9\u4F4D
|
|
vec3 globalPoint = normalize(mix(startLngLat, endLngLat, segmentRatio)) * (globalRadius + lineHeight) + lnglatOffset * a_Size;
|
|
|
|
gl_Position = u_ViewProjectionMatrix * vec4(globalPoint, 1.0);
|
|
}
|
|
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,Kw={solid:0,dash:1},lI=function(n){(0,zt.Z)(a,n);var l=p1(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"updateTexture",function(){var m=s.rendererService.createTexture2D;if(s.texture){s.texture.update({data:s.iconService.getCanvas()}),s.layer.render();return}s.texture=m({data:s.iconService.getCanvas(),mag:ne.NEAREST,min:ne.NEAREST,premultiplyAlpha:!1,width:1024,height:s.iconService.canvasHeight||128})}),s}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.sourceColor,w=u.targetColor,A=u.textureBlend,R=A===void 0?"normal":A,B=u.lineType,G=B===void 0?"solid":B,j=u.dashArray,lt=j===void 0?[10,5]:j,ct=u.lineTexture,_t=ct===void 0?!1:ct,Vt=u.iconStep,ce=Vt===void 0?100:Vt,ae=u.segmentNumber,ze=ae===void 0?30:ae,$e=u.globalArcHeight,xr=$e===void 0?10:$e;lt.length===2&<.push(0,0);var Or=0,Zr=[0,0,0,0],Wr=[0,0,0,0];if(m&&w&&(Zr=Lo(m),Wr=Lo(w),Or=1),this.rendererService.getDirty()&&this.texture.bind(),this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:v})){this.judgeStyleAttributes({opacity:v});var wn=this.layer.getEncodedData(),vn=this.calDataFrame(this.cellLength,wn,this.cellProperties),Kn=vn.data,Ei=vn.width,qi=vn.height;this.rowCount=qi,this.dataTexture=this.cellLength>0&&Kn.length>0?this.createTexture2D({flipY:!0,data:Kn,format:ne.LUMINANCE,type:ne.FLOAT,width:Ei,height:qi}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}return{u_globel:1,u_globel_radius:Jd,u_global_height:xr,u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_opacity:(0,Fn.isNumber)(v)?v:1,u_textureBlend:R==="normal"?0:1,segmentNumber:ze,u_line_type:Kw[G]||0,u_dash_array:lt,u_texture:this.texture,u_line_texture:_t?1:0,u_icon_step:ce,u_textSize:[1024,this.iconService.canvasHeight||128],u_linearColor:Or,u_sourceColor:Zr,u_targetColor:Wr}}},{key:"getAnimateUniforms",value:function(){var u=this.layer.getLayerConfig(),h=u.animateOption;return{u_animate:this.animateOption2Array(h),u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return this.updateTexture(),this.iconService.on("imageUpdate",this.updateTexture),m.next=4,this.buildModels();case 4:return m.abrupt("return",m.sent);case 5:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u,h;(u=this.texture)===null||u===void 0||u.destroy(),(h=this.dataTexture)===null||h===void 0||h.destroy(),this.iconService.off("imageUpdate",this.updateTexture)}},{key:"getShaders",value:function(){var u=this.layer.getLayerConfig(),h=u.sourceColor,v=u.targetColor;return h&&v?{frag:sI,vert:uI,type:"Linear"}:{frag:aI,vert:oI,type:""}}},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j,lt,ct,_t,Vt;return ot().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return v=this.layer.getLayerConfig(),m=v.segmentNumber,w=m===void 0?30:m,A=v.mask,R=A===void 0?!1:A,B=v.maskInside,G=B===void 0?!0:B,j=this.getShaders(),lt=j.frag,ct=j.vert,_t=j.type,ae.next=4,this.layer.buildLayerModel({moduleName:"lineEarthArc3d"+_t,vertexShader:ct,fragmentShader:lt,triangulation:xm,depth:{enable:!0},blend:this.getBlend(),segmentNumber:w,stencil:Zo(R,G)});case 4:return Vt=ae.sent,ae.abrupt("return",[Vt]);case 6:case"end":return ae.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"registerBuiltinAttributes",value:function(){var u=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v){var m=v.size,w=m===void 0?1:m;return Array.isArray(w)?[w[0]]:[w]}}}),this.styleAttributeService.registerStyleAttribute({name:"instance",type:ea.Attribute,descriptor:{name:"a_Instance",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:4,update:function(v,m,w){return[w[3],w[4],w[5],w[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:ea.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(v){var m=u.iconService.getIconMap(),w=v.texture,A=m[w]||{x:0,y:0},R=A.x,B=A.y;return[R,B]}}})}}]),a}($o);function Qw(n){var l=cI();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function cI(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Jw=`#define LineTypeSolid 0.0
|
|
#define LineTypeDash 1.0
|
|
#define Animate 0.0
|
|
#define LineTexture 1.0
|
|
|
|
uniform float u_opacity;
|
|
uniform float u_textureBlend;
|
|
uniform float u_blur : 0.9;
|
|
uniform float u_line_type: 0.0;
|
|
// varying vec2 v_normal;
|
|
varying vec4 v_dash_array;
|
|
varying float v_distance_ratio;
|
|
varying vec4 v_color;
|
|
|
|
uniform float u_time;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
|
|
uniform float u_line_texture: 0.0;
|
|
uniform sampler2D u_texture;
|
|
uniform vec2 u_textSize;
|
|
uniform float segmentNumber;
|
|
|
|
varying vec2 v_iconMapUV;
|
|
|
|
uniform float u_linearColor: 0;
|
|
uniform vec4 u_sourceColor;
|
|
uniform vec4 u_targetColor;
|
|
|
|
varying mat4 styleMappingMat;
|
|
|
|
#pragma include "picking"
|
|
#pragma include "project"
|
|
#pragma include "projection"
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float animateSpeed = 0.0;
|
|
float d_segmentIndex = styleMappingMat[3].g;
|
|
|
|
// \u8BBE\u7F6E\u5F27\u7EBF\u7684\u5E95\u8272
|
|
if(u_linearColor == 1.0) { // \u4F7F\u7528\u6E10\u53D8\u989C\u8272
|
|
gl_FragColor = mix(u_sourceColor, u_targetColor, d_segmentIndex/segmentNumber);
|
|
} else { // \u4F7F\u7528 color \u65B9\u6CD5\u4F20\u5165\u7684\u989C\u8272
|
|
gl_FragColor = v_color;
|
|
}
|
|
|
|
// float blur = 1.- smoothstep(u_blur, 1., length(v_normal.xy));
|
|
// float blur = smoothstep(1.0, u_blur, length(v_normal.xy));
|
|
gl_FragColor.a *= opacity;
|
|
if(u_line_type == LineTypeDash) {
|
|
float dashLength = mod(v_distance_ratio, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w);
|
|
if(dashLength < v_dash_array.x || (dashLength > (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z)) {
|
|
// \u5B9E\u7EBF\u90E8\u5206
|
|
} else {
|
|
// \u865A\u7EBF\u90E8\u5206
|
|
discard;
|
|
};
|
|
}
|
|
|
|
// \u8BBE\u7F6E\u5F27\u7EBF\u7684\u52A8\u753B\u6A21\u5F0F
|
|
if(u_animate.x == Animate) {
|
|
animateSpeed = u_time / u_animate.y;
|
|
float alpha =1.0 - fract( mod(1.0- v_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y);
|
|
alpha = (alpha + u_animate.w -1.0) / u_animate.w;
|
|
alpha = smoothstep(0., 1., alpha);
|
|
gl_FragColor.a *= alpha;
|
|
}
|
|
|
|
// \u8BBE\u7F6E\u5F27\u7EBF\u7684\u8D34\u56FE
|
|
if(LineTexture == u_line_texture && u_line_type != LineTypeDash) {
|
|
float arcRadio = smoothstep( 0.0, 1.0, (d_segmentIndex / (segmentNumber - 1.0)));
|
|
// float arcRadio = d_segmentIndex / (segmentNumber - 1.0);
|
|
float count = styleMappingMat[3].b; // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF
|
|
float u = fract(arcRadio * count - animateSpeed * count);
|
|
// float u = fract(arcRadio * count - animateSpeed);
|
|
if(u_animate.x == Animate) {
|
|
u = gl_FragColor.a/opacity;
|
|
}
|
|
|
|
float v = styleMappingMat[3].a; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C
|
|
|
|
vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;
|
|
vec4 pattern = texture2D(u_texture, uv);
|
|
|
|
// \u8BBE\u7F6E\u8D34\u56FE\u548C\u5E95\u8272\u7684\u53E0\u52A0\u6A21\u5F0F
|
|
if(u_textureBlend == 0.0) { // normal
|
|
pattern.a = 0.0;
|
|
gl_FragColor = filterColor(gl_FragColor + pattern);
|
|
} else { // replace
|
|
pattern.a *= opacity;
|
|
if(gl_FragColor.a <= 0.0) {
|
|
pattern.a = 0.0;
|
|
}
|
|
gl_FragColor = filterColor(pattern);
|
|
}
|
|
} else {
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
|
|
// gl_FragColor = filterColor(gl_FragColor);
|
|
}`,kx=`#define LineTypeSolid 0.0
|
|
#define LineTypeDash 1.0
|
|
#define Animate 0.0
|
|
#define LineTexture 1.0
|
|
|
|
attribute vec4 a_Color;
|
|
attribute vec3 a_Position;
|
|
attribute vec4 a_Instance;
|
|
attribute float a_Size;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform float segmentNumber;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
varying vec4 v_color;
|
|
|
|
varying float v_distance_ratio;
|
|
uniform float u_line_type: 0.0;
|
|
uniform vec4 u_dash_array: [10.0, 5., 0, 0];
|
|
varying vec4 v_dash_array;
|
|
|
|
uniform float u_icon_step: 100;
|
|
uniform float u_line_texture: 0.0;
|
|
|
|
attribute vec2 a_iconMapUV;
|
|
varying vec2 v_iconMapUV;
|
|
|
|
uniform float u_opacity: 1.0;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "project"
|
|
#pragma include "picking"
|
|
|
|
float maps (float value, float start1, float stop1, float start2, float stop2) {
|
|
return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1));
|
|
}
|
|
|
|
float getSegmentRatio(float index) {
|
|
return index / (segmentNumber - 1.);
|
|
}
|
|
|
|
float paraboloid(vec2 source, vec2 target, float ratio) {
|
|
vec2 x = mix(source, target, ratio);
|
|
vec2 center = mix(source, target, 0.5);
|
|
float dSourceCenter = distance(source, center);
|
|
float dXCenter = distance(x, center);
|
|
return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter);
|
|
}
|
|
|
|
vec3 getPos(vec2 source, vec2 target, float segmentRatio) {
|
|
float vertex_height = paraboloid(source, target, segmentRatio);
|
|
|
|
return vec3(
|
|
mix(source, target, segmentRatio),
|
|
sqrt(max(0.0, vertex_height))
|
|
);
|
|
}
|
|
vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size)/ 2.0;
|
|
return offset;
|
|
}
|
|
vec2 getNormal(vec2 line_clipspace, float offset_direction) {
|
|
// normalized direction of the line
|
|
vec2 dir_screenspace = normalize(line_clipspace);
|
|
// rotate by 90 degrees
|
|
dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
|
|
return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);
|
|
}
|
|
float getAngularDist (vec2 source, vec2 target) {
|
|
vec2 delta = source - target;
|
|
vec2 sin_half_delta = sin(delta / 2.0);
|
|
float a =
|
|
sin_half_delta.y * sin_half_delta.y +
|
|
cos(source.y) * cos(target.y) *
|
|
sin_half_delta.x * sin_half_delta.x;
|
|
return 2.0 * atan(sqrt(a), sqrt(1.0 - a));
|
|
}
|
|
|
|
vec2 midPoint(vec2 source, vec2 target) {
|
|
vec2 center = target - source;
|
|
float r = length(center);
|
|
float theta = atan(center.y, center.x);
|
|
float thetaOffset = 0.314;
|
|
float r2 = r / 2.0 / cos(thetaOffset);
|
|
float theta2 = theta + thetaOffset;
|
|
vec2 mid = vec2(r2*cos(theta2) + source.x, r2*sin(theta2) + source.y);
|
|
return mid;
|
|
}
|
|
float bezier3(vec3 arr, float t) {
|
|
float ut = 1. - t;
|
|
return (arr.x * ut + arr.y * t) * ut + (arr.y * ut + arr.z * t) * t;
|
|
}
|
|
|
|
vec2 interpolate (vec2 source, vec2 target, float angularDist, float t) {
|
|
// if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
vec2 mid = midPoint(source, target);
|
|
vec3 x = vec3(source.x, mid.x, target.x);
|
|
vec3 y = vec3(source.y, mid.y, target.y);
|
|
return vec2(bezier3(x ,t), bezier3(y,t));
|
|
}else {
|
|
if(abs(angularDist - PI) < 0.001) {
|
|
return (1.0 - t) * source + t * target;
|
|
}
|
|
float a = sin((1.0 - t) * angularDist) / sin(angularDist);
|
|
float b = sin(t * angularDist) / sin(angularDist);
|
|
vec2 sin_source = sin(source);
|
|
vec2 cos_source = cos(source);
|
|
vec2 sin_target = sin(target);
|
|
vec2 cos_target = cos(target);
|
|
float x = a * cos_source.y * cos_source.x + b * cos_target.y * cos_target.x;
|
|
float y = a * cos_source.y * sin_source.x + b * cos_target.y * sin_target.x;
|
|
float z = a * sin_source.y + b * sin_target.y;
|
|
return vec2(atan(y, x), atan(z, sqrt(x * x + y * y)));
|
|
}
|
|
}
|
|
|
|
void main() {
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0 // dataset \u6570\u636E\u96C6
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
v_color = a_Color;
|
|
vec2 source = radians(a_Instance.rg);
|
|
vec2 target = radians(a_Instance.ba);
|
|
float angularDist = getAngularDist(source, target);
|
|
float segmentIndex = a_Position.x;
|
|
float segmentRatio = getSegmentRatio(segmentIndex);
|
|
float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));
|
|
|
|
if(u_line_type == LineTypeDash) {
|
|
v_distance_ratio = segmentIndex / segmentNumber;
|
|
vec2 s = source;
|
|
vec2 t = target;
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
s = unProjCustomCoord(source);
|
|
t = unProjCustomCoord(target);
|
|
}
|
|
float total_Distance = pixelDistance(s, t) / 2.0 * PI;
|
|
total_Distance = total_Distance*16.0; // total_Distance*16.0 \u8C03\u6574\u9ED8\u8BA4\u7684\u6548\u679C
|
|
v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / total_Distance;
|
|
}
|
|
|
|
if(u_animate.x == Animate) {
|
|
v_distance_ratio = segmentIndex / segmentNumber;
|
|
}
|
|
|
|
float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);
|
|
v_distance_ratio = segmentIndex / segmentNumber;
|
|
vec4 curr = project_position(vec4(degrees(interpolate(source, target, angularDist, segmentRatio)), 0.0, 1.0));
|
|
vec4 next = project_position(vec4(degrees(interpolate(source, target, angularDist, nextSegmentRatio)), 0.0, 1.0));
|
|
// v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);
|
|
vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y));
|
|
// vec4 project_pos = project_position(vec4(curr.xy, 0, 1.0));
|
|
// gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, curr.z, 1.0));
|
|
|
|
styleMappingMat[3].g = a_Position.x; // \u8BE5\u9876\u70B9\u5728\u5F27\u7EBF\u4E0A\u7684\u5206\u6BB5\u6392\u5E8F
|
|
if(LineTexture == u_line_texture) { // \u5F00\u542F\u8D34\u56FE\u6A21\u5F0F
|
|
// float mapZoomScale = u_CoordinateSystem !== COORDINATE_SYSTEM_P20_2?10000000.0:1.0;
|
|
float d_arcDistrance = length(source - target);
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20) { // amap
|
|
d_arcDistrance = d_arcDistrance * 1000000.0;
|
|
}
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // mapbox
|
|
d_arcDistrance = project_pixel_allmap(d_arcDistrance);
|
|
}
|
|
float d_pixelLen = project_pixel(u_icon_step)/8.0;
|
|
styleMappingMat[3].b = floor(d_arcDistrance/d_pixelLen); // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF
|
|
|
|
float lineOffsetWidth = length(offset + offset * sign(a_Position.y)); // \u7EBF\u6A2A\u5411\u504F\u79FB\u7684\u8DDD\u79BB
|
|
float linePixelSize = project_pixel(a_Size); // \u5B9A\u70B9\u4F4D\u7F6E\u504F\u79FB\uFF0C\u6309\u5730\u56FE\u7B49\u7EA7\u7F29\u653E\u540E\u7684\u8DDD\u79BB
|
|
styleMappingMat[3].a = lineOffsetWidth/linePixelSize; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C
|
|
|
|
v_iconMapUV = a_iconMapUV;
|
|
}
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(curr.xy + offset, curr.z, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, curr.z, 1.0));
|
|
}
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
|
|
`,Uv={solid:0,dash:1},Zv=function(n){(0,zt.Z)(a,n);var l=Qw(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"updateTexture",function(){var m=s.rendererService.createTexture2D;if(s.texture){s.texture.update({data:s.iconService.getCanvas()}),s.layer.render();return}s.texture=m({data:s.iconService.getCanvas(),mag:ne.NEAREST,min:ne.NEAREST,premultiplyAlpha:!1,width:1024,height:s.iconService.canvasHeight||128})}),s}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.sourceColor,w=u.targetColor,A=u.textureBlend,R=A===void 0?"normal":A,B=u.lineType,G=B===void 0?"solid":B,j=u.dashArray,lt=j===void 0?[10,5]:j,ct=u.lineTexture,_t=ct===void 0?!1:ct,Vt=u.iconStep,ce=Vt===void 0?100:Vt,ae=u.segmentNumber,ze=ae===void 0?30:ae;lt.length===2&<.push(0,0),this.rendererService.getDirty()&&this.texture.bind();var $e=0,xr=[0,0,0,0],Or=[0,0,0,0];if(m&&w&&(xr=Lo(m),Or=Lo(w),$e=1),this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:v})){this.judgeStyleAttributes({opacity:v});var Zr=this.layer.getEncodedData(),Wr=this.calDataFrame(this.cellLength,Zr,this.cellProperties),wn=Wr.data,vn=Wr.width,Kn=Wr.height;this.rowCount=Kn,this.dataTexture=this.cellLength>0&&wn.length>0?this.createTexture2D({flipY:!0,data:wn,format:ne.LUMINANCE,type:ne.FLOAT,width:vn,height:Kn}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}return{u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_opacity:(0,Fn.isNumber)(v)?v:1,u_textureBlend:R==="normal"?0:1,segmentNumber:ze,u_line_type:Uv[G]||0,u_dash_array:lt,u_texture:this.texture,u_line_texture:_t?1:0,u_icon_step:ce,u_textSize:[1024,this.iconService.canvasHeight||128],u_linearColor:$e,u_sourceColor:xr,u_targetColor:Or}}},{key:"getAnimateUniforms",value:function(){var u=this.layer.getLayerConfig(),h=u.animateOption;return{u_animate:this.animateOption2Array(h),u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return this.updateTexture(),this.iconService.on("imageUpdate",this.updateTexture),m.next=4,this.buildModels();case 4:return m.abrupt("return",m.sent);case 5:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u,h;(u=this.texture)===null||u===void 0||u.destroy(),(h=this.dataTexture)===null||h===void 0||h.destroy(),this.iconService.off("imageUpdate",this.updateTexture)}},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B;return ot().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,j.next=3,this.layer.buildLayerModel({moduleName:"lineGreatCircle",vertexShader:kx,fragmentShader:Jw,triangulation:xm,depth:{enable:!1},blend:this.getBlend(),stencil:Zo(w,R)});case 3:return B=j.sent,j.abrupt("return",[B]);case 5:case"end":return j.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"registerBuiltinAttributes",value:function(){var u=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v){var m=v.size,w=m===void 0?1:m;return Array.isArray(w)?[w[0]]:[w]}}}),this.styleAttributeService.registerStyleAttribute({name:"instance",type:ea.Attribute,descriptor:{name:"a_Instance",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:4,update:function(v,m,w){return[w[3],w[4],w[5],w[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:ea.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(v){var m=u.iconService.getIconMap(),w=v.texture,A=m[w]||{x:0,y:0},R=A.x,B=A.y;return[R,B]}}})}}]),a}($o);function ev(n){var l=Lx();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Lx(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var bm=`#define COORDINATE_SYSTEM_LNGLAT 1.0 // mapbox
|
|
#define COORDINATE_SYSTEM_LNGLAT_OFFSET 2.0 // mapbox offset
|
|
#define COORDINATE_SYSTEM_VECTOR_TILE 3.0
|
|
#define COORDINATE_SYSTEM_IDENTITY 4.0
|
|
#define COORDINATE_SYSTEM_P20 5.0 // amap
|
|
#define COORDINATE_SYSTEM_P20_OFFSET 6.0 // amap offset
|
|
#define COORDINATE_SYSTEM_METER_OFFSET 7.0
|
|
|
|
#define COORDINATE_SYSTEM_P20_2 8.0 // amap2.0
|
|
uniform float u_CoordinateSystem;
|
|
varying vec4 v_color;
|
|
uniform float u_arrow: 0.0;
|
|
uniform float u_linearColor: 0;
|
|
uniform vec4 u_sourceColor;
|
|
uniform vec4 u_targetColor;
|
|
|
|
#pragma include "picking"
|
|
|
|
varying mat4 styleMappingMat;
|
|
void main() {
|
|
float distanceAndIndex = styleMappingMat[0][3];
|
|
float miter = styleMappingMat[0][2];
|
|
|
|
float opacity = styleMappingMat[0][0];
|
|
float d_distance_ratio = styleMappingMat[3].r; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
|
|
|
|
if(u_arrow > 0.0 && distanceAndIndex < 2.0) { // arrow
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {
|
|
if(cross(vec3(styleMappingMat[1].rg, 0.0), vec3(styleMappingMat[1].ba, 0.0)).z < 0.0) { // amap
|
|
discard;
|
|
}
|
|
} else { // amap2 mapbox map
|
|
if(cross(vec3(styleMappingMat[1].rg, 0.0), vec3(styleMappingMat[1].ba, 0.0)).z > 0.0) {
|
|
discard;
|
|
}
|
|
}
|
|
} else { // line body
|
|
if(miter < 0.0) {
|
|
discard;
|
|
}
|
|
}
|
|
|
|
|
|
if(u_linearColor == 1.0) { // \u4F7F\u7528\u6E10\u53D8\u989C\u8272
|
|
gl_FragColor = mix(u_sourceColor, u_targetColor, d_distance_ratio);
|
|
} else { // \u4F7F\u7528 color \u65B9\u6CD5\u4F20\u5165\u7684\u989C\u8272
|
|
gl_FragColor = v_color;
|
|
}
|
|
|
|
gl_FragColor.a *= opacity; // \u5168\u5C40\u900F\u660E\u5EA6
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
`,Em=`attribute float a_Miter;
|
|
attribute vec4 a_Color;
|
|
attribute vec2 a_Size;
|
|
attribute vec3 a_Normal;
|
|
attribute vec3 a_Position;
|
|
|
|
// dash line
|
|
attribute vec4 a_dirPoints;
|
|
attribute vec3 a_DistanceAndIndex;
|
|
|
|
uniform vec4 u_lineDir;
|
|
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
|
|
#pragma include "projection"
|
|
#pragma include "picking"
|
|
|
|
varying vec4 v_color;
|
|
|
|
uniform float u_linearColor: 0;
|
|
uniform float u_arrow: 0.0;
|
|
uniform float u_arrowHeight: 3.0;
|
|
uniform float u_arrowWidth: 2.0;
|
|
uniform float u_tailWidth: 1.0;
|
|
|
|
uniform float u_opacity: 1.0;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
vec2 calculateArrow(vec2 offset) {
|
|
/*
|
|
* \u5728\u652F\u6301\u7BAD\u5934\u7684\u65F6\u5019\uFF0C\u7B2C\u4E8C\u3001\u7B2C\u4E09\u7EC4\u9876\u70B9\u662F\u989D\u5916\u63D2\u5165\u7528\u4E8E\u6784\u5EFA\u9876\u70B9\u7684
|
|
*/
|
|
float arrowFlag = -1.0;
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {
|
|
// \u9AD8\u5FB7 2.0 \u7684\u65CB\u8F6C\u89D2\u5EA6\u4E0D\u540C
|
|
arrowFlag = 1.0;
|
|
}
|
|
float pi = arrowFlag * 3.1415926/2.;
|
|
if(a_Miter < 0.) {
|
|
// \u6839\u636E\u7EBF\u7684\u4E24\u4FA7\u504F\u79FB\u4E0D\u540C\u3001\u65CB\u8F6C\u7684\u65B9\u5411\u76F8\u53CD
|
|
pi = -pi;
|
|
}
|
|
highp float angle_sin = sin(pi);
|
|
highp float angle_cos = cos(pi);
|
|
// \u8BA1\u7B97\u5782\u76F4\u4E0E\u7EBF\u65B9\u5411\u7684\u65CB\u8F6C\u77E9\u9635
|
|
mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);
|
|
float arrowWidth = u_arrowWidth;
|
|
float arrowHeight = u_arrowHeight;
|
|
|
|
vec2 arrowOffset = vec2(0.0);
|
|
/*
|
|
* a_DistanceAndIndex.y \u7528\u4E8E\u6807\u8BB0\u5F53\u524D\u9876\u70B9\u5C5E\u4E8E\u54EA\u4E00\u7EC4\uFF08\u4E24\u4E2A\u9876\u70B9\u4E00\u7EC4\uFF0C\u6784\u6210\u7EBF\u7684\u5176\u5B9E\u662F\u77E9\u5F62\uFF0C\u6700\u7B80\u9700\u8981\u56DB\u4E2A\u9876\u70B9\u3001\u4E24\u7EC4\u9876\u70B9\u6784\u6210\uFF09
|
|
*/
|
|
if(a_DistanceAndIndex.y == 0.0) {
|
|
// \u7BAD\u5934\u5C16\u90E8
|
|
offset = vec2(0.0);
|
|
} else if(a_DistanceAndIndex.y == 1.0) {
|
|
// \u7BAD\u5934\u4E24\u4FA7
|
|
arrowOffset = rotation_matrix*(offset * arrowHeight);
|
|
offset += arrowOffset; // \u6CBF\u7EBF\u504F\u79FB
|
|
offset = offset * arrowWidth; // \u5782\u76F4\u7EBF\u5411\u5916\u504F\u79FB\uFF08\u662F\u6784\u5EFA\u7BAD\u5934\u4E24\u4FA7\u7684\u9876\u70B9\uFF09
|
|
} else if(a_DistanceAndIndex.y == 2.0 || a_DistanceAndIndex.y == 3.0 || a_DistanceAndIndex.y == 4.0) {
|
|
// \u504F\u79FB\u5176\u4F59\u7684\u70B9\u4F4D\uFF08\u5C06\u957F\u5EA6\u8BA9\u4F4D\u7ED9\u7BAD\u5934\uFF09
|
|
arrowOffset = rotation_matrix*(offset * arrowHeight) * arrowWidth;
|
|
offset += arrowOffset;// \u6CBF\u7EBF\u504F\u79FB
|
|
}
|
|
|
|
return offset;
|
|
}
|
|
|
|
void main() {
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - a_Miter - a_DistanceAndIndex
|
|
0.0, 0.0, 0.0, 0.0, // originX - originY - vectorX - vectorY
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0 // distance_ratio/distance/pixelLen/texV
|
|
);
|
|
styleMappingMat[0][3] = a_DistanceAndIndex.y;
|
|
styleMappingMat[0][2] = a_Miter;
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
|
|
v_color = a_Color;
|
|
|
|
vec3 size = a_Miter * setPickingSize(a_Size.x) * reverse_offset_normal(a_Normal);
|
|
|
|
vec2 offset = project_pixel(size.xy);
|
|
|
|
// styleMappingMat[1].rg = a_Position.xy + offset;
|
|
|
|
vec2 copyOffset = vec2(offset.x, offset.y);
|
|
|
|
float lineDistance = a_DistanceAndIndex.x;
|
|
float total_Distance = a_DistanceAndIndex.z;
|
|
float currentLinePointRatio = lineDistance / total_Distance;
|
|
|
|
if(u_arrow > 0.0) {
|
|
// \u8BA1\u7B97\u7BAD\u5934
|
|
offset = calculateArrow(offset);
|
|
|
|
if(a_DistanceAndIndex.y > 4.0) {
|
|
offset *= mix(1.0, u_tailWidth, currentLinePointRatio);
|
|
}
|
|
}
|
|
|
|
float lineOffsetWidth = length(offset + offset * sign(a_Miter)); // \u7EBF\u6A2A\u5411\u504F\u79FB\u7684\u8DDD\u79BB\uFF08\u5411\u4E24\u4FA7\u504F\u79FB\u7684\u548C\uFF09
|
|
float linePixelSize = project_pixel(a_Size.x) * 2.0; // \u5B9A\u70B9\u4F4D\u7F6E\u504F\u79FB\uFF0C\u6309\u5730\u56FE\u7B49\u7EA7\u7F29\u653E\u540E\u7684\u8DDD\u79BB \u5355\u4FA7 * 2
|
|
|
|
// \u8BBE\u7F6E\u6570\u636E\u96C6\u7684\u53C2\u6570
|
|
styleMappingMat[3][0] = currentLinePointRatio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
styleMappingMat[3][1] = lineDistance; // \u5F53\u524D\u9876\u70B9\u7684\u8DDD\u79BB
|
|
|
|
vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));
|
|
|
|
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, a_Size.y, 1.0));
|
|
|
|
float h = float(a_Position.z); // \u7EBF\u9876\u70B9\u7684\u9AD8\u5EA6 - \u517C\u5BB9\u4E0D\u5B58\u5728\u7B2C\u4E09\u4E2A\u6570\u503C\u7684\u60C5\u51B5 vertex height
|
|
float lineHeight = a_Size.y; // size \u7B2C\u4E8C\u4E2A\u53C2\u6570\u4EE3\u8868\u7684\u9AD8\u5EA6 [linewidth, lineheight]
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
lineHeight *= 0.2; // \u4FDD\u6301\u548C amap/mapbox \u4E00\u81F4\u7684\u6548\u679C
|
|
gl_Position = u_Mvp * (vec4(project_pos.xy + offset, lineHeight, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, lineHeight, 1.0));
|
|
}
|
|
|
|
if(u_arrow > 0.0 && a_DistanceAndIndex.y < 2.0) {
|
|
vec2 startPoint = a_dirPoints.rg;
|
|
vec2 endPoint = a_dirPoints.ba;
|
|
vec4 t1 = project_position(vec4(startPoint, 0, 1.0));
|
|
vec4 t2 = project_position(vec4(endPoint, 0, 1.0));
|
|
// TODO\uFF1A \u540E\u7EED\u4F18\u5316\u53EF\u4EE5\u628A\u4F4D\u7F6E\u8BA1\u7B97\u653E\u5728 cpu \u4E2D\u5B8C\u6210
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
vec2 p1 = (u_Mvp * vec4(t1.xy, 0.0, 1.0)).xy;
|
|
vec2 p2 = (u_Mvp * vec4(t2.xy, 0.0, 1.0)).xy;
|
|
styleMappingMat[1].rg = normalize(p1 - p2);
|
|
styleMappingMat[1].ba = normalize(gl_Position.xy - p2);
|
|
} else {
|
|
vec2 p1 = project_common_position_to_clipspace(vec4(t1.xy, 0.0, 1.0)).xy;
|
|
vec2 p2 = project_common_position_to_clipspace(vec4(t2.xy, 0.0, 1.0)).xy;
|
|
styleMappingMat[1].rg = normalize(p1 - p2);
|
|
styleMappingMat[1].ba = normalize(gl_Position.xy - p2);
|
|
}
|
|
}
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,fI=function(n){(0,zt.Z)(a,n);var l=ev(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.sourceColor,w=u.targetColor,A=u.arrow,R=A===void 0?{enable:!1,arrowWidth:2,arrowHeight:3,tailWidth:1}:A,B=0,G=[0,0,0,0],j=[0,0,0,0];if(m&&w&&(G=Lo(m),j=Lo(w),B=1),this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:v})){this.judgeStyleAttributes({opacity:v});var lt=this.layer.getEncodedData(),ct=this.calDataFrame(this.cellLength,lt,this.cellProperties),_t=ct.data,Vt=ct.width,ce=ct.height;this.rowCount=ce,this.dataTexture=this.cellLength>0&&_t.length>0?this.createTexture2D({flipY:!0,data:_t,format:ne.LUMINANCE,type:ne.FLOAT,width:Vt,height:ce}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}return{u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_opacity:(0,Fn.isNumber)(v)?v:1,u_linearColor:B,u_sourceColor:G,u_targetColor:j,u_arrow:Number(R.enable),u_arrowHeight:R.arrowHeight||3,u_arrowWidth:R.arrowWidth||2,u_tailWidth:R.tailWidth===void 0?1:R.tailWidth}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.buildModels();case 2:return m.abrupt("return",m.sent);case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u;(u=this.dataTexture)===null||u===void 0||u.destroy()}},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j,lt,ct,_t;return ot().wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,B=v.depth,G=B===void 0?!1:B,j=this.getShaders(),lt=j.frag,ct=j.vert,this.layer.triangulation=mm,ce.next=5,this.layer.buildLayerModel({moduleName:"lineHalf",vertexShader:ct,fragmentShader:lt,triangulation:mm,depth:{enable:G},blend:this.getBlend(),stencil:Zo(w,R)});case 5:return _t=ce.sent,ce.abrupt("return",[_t]);case 7:case"end":return ce.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getShaders",value:function(){return{frag:bm,vert:Em,type:"normal"}}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"distanceAndIndex",type:ea.Attribute,descriptor:{name:"a_DistanceAndIndex",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(h,v,m,w,A,R){return R===void 0?[m[3],10,m[5]]:[m[3],R,m[5]]}}}),this.styleAttributeService.registerStyleAttribute({name:"dirPoints",type:ea.Attribute,descriptor:{name:"a_dirPoints",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:4,update:function(h){var v=h.coordinates[0]||[0,0],m=h.coordinates[3]||[0,0];return[v[0],v[1],m[0],m[1]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(h){var v=h.size,m=v===void 0?1:v;return Array.isArray(m)?[m[0],m[1]]:[m,0]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:ea.Attribute,descriptor:{name:"a_Normal",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(h,v,m,w,A){return A}}}),this.styleAttributeService.registerStyleAttribute({name:"miter",type:ea.Attribute,descriptor:{name:"a_Miter",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(h,v,m){return[m[4]]}}})}}]),a}($o),Px;(function(n){n[n.solid=0]="solid",n[n.dash=1]="dash"})(Px||(Px={}));var Vv;(function(n){n.VERTICAL="vertical",n.HORIZONTAL="horizontal"})(Vv||(Vv={}));var wm;(function(n){n.NORMAL="normal",n.REPLACE="replace"})(wm||(wm={}));var Sm;(function(n){n[n.pixel=0]="pixel",n[n.meter=1]="meter"})(Sm||(Sm={}));var tS;(function(n){n.ALWAYS="always",n.DRAGEND="dragend"})(tS||(tS={}));function hI(n){var l=eS();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function eS(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var rS=`#define LineTypeSolid 0.0
|
|
uniform float u_opacity : 1.0;
|
|
|
|
varying vec4 v_color;
|
|
|
|
// dash
|
|
varying vec4 v_dash_array;
|
|
|
|
#pragma include "picking"
|
|
|
|
uniform float u_time;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; // \u63A7\u5236\u8FD0\u52A8
|
|
|
|
varying mat4 styleMappingMat;
|
|
// [animate, duration, interval, trailLength],
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float d_distance_ratio = styleMappingMat[3].r; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
gl_FragColor = v_color;
|
|
gl_FragColor.a *= opacity; // \u5168\u5C40\u900F\u660E\u5EA6
|
|
|
|
float dashLength = mod(d_distance_ratio, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w);
|
|
if(dashLength < v_dash_array.x || (dashLength > (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z)) {
|
|
// \u5B9E\u7EBF\u90E8\u5206
|
|
} else {
|
|
// \u865A\u7EBF\u90E8\u5206
|
|
discard;
|
|
};
|
|
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
`,pI=`#define LineTypeSolid 0.0
|
|
#define LineTypeDash 1.0
|
|
#define Animate 0.0
|
|
|
|
attribute float a_Miter;
|
|
attribute vec4 a_Color;
|
|
attribute vec2 a_Size;
|
|
attribute vec3 a_Normal;
|
|
attribute vec3 a_Position;
|
|
|
|
attribute vec2 a_iconMapUV;
|
|
|
|
// dash line
|
|
attribute float a_Total_Distance;
|
|
attribute vec2 a_DistanceAndIndex;
|
|
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform vec4 u_dash_array: [10.0, 5., 0, 0];
|
|
|
|
uniform float u_vertexScale: 1.0;
|
|
|
|
#pragma include "projection"
|
|
#pragma include "picking"
|
|
|
|
varying vec4 v_color;
|
|
varying vec4 v_dash_array;
|
|
|
|
uniform float u_opacity: 1.0;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
void main() {
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0 // distance_ratio/distance/pixelLen/texV
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / a_Total_Distance;
|
|
v_color = a_Color;
|
|
|
|
vec3 size = a_Miter * setPickingSize(a_Size.x) * reverse_offset_normal(a_Normal);
|
|
vec2 offset = project_pixel(size.xy);
|
|
|
|
// \u8BBE\u7F6E\u6570\u636E\u96C6\u7684\u53C2\u6570
|
|
styleMappingMat[3][0] = a_DistanceAndIndex.x / a_Total_Distance; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
styleMappingMat[3][1] = a_DistanceAndIndex.x; // \u5F53\u524D\u9876\u70B9\u7684\u8DDD\u79BB
|
|
|
|
vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));
|
|
|
|
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, a_Size.y, 1.0));
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(project_pos.xy + offset, project_pixel(a_Size.y), 1.0));
|
|
} else {
|
|
float lineHeight = a_Size.y;
|
|
|
|
// #define COORDINATE_SYSTEM_P20 5.0
|
|
// #define COORDINATE_SYSTEM_P20_OFFSET 6.0
|
|
// amap1.x
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {
|
|
// \u4FDD\u6301\u9AD8\u5EA6\u76F8\u5BF9\u4E0D\u53D8
|
|
lineHeight *= pow(2.0, 20.0 - u_Zoom);
|
|
}
|
|
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, lineHeight, 1.0));
|
|
}
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,dI=`#define Animate 0.0
|
|
#define LineTexture 1.0
|
|
uniform float u_opacity : 1.0;
|
|
uniform float u_textureBlend;
|
|
|
|
uniform float u_borderWidth: 0.0;
|
|
|
|
uniform vec3 u_blur;
|
|
uniform vec4 u_borderColor;
|
|
varying vec4 v_color;
|
|
|
|
// line texture
|
|
uniform float u_line_texture;
|
|
uniform sampler2D u_texture;
|
|
uniform vec2 u_textSize;
|
|
|
|
varying vec2 v_iconMapUV;
|
|
|
|
#pragma include "picking"
|
|
|
|
uniform float u_time;
|
|
uniform vec4 u_animate: [ 1, 2., 1.0, 0.2 ]; // \u63A7\u5236\u8FD0\u52A8
|
|
|
|
varying mat4 styleMappingMat;
|
|
// [animate, duration, interval, trailLength],
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float animateSpeed = 0.0; // \u8FD0\u52A8\u901F\u5EA6
|
|
float d_distance_ratio = styleMappingMat[3].r; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
gl_FragColor = v_color;
|
|
// anti-alias
|
|
// float blur = 1.0 - smoothstep(u_blur, 1., length(v_normal.xy));
|
|
gl_FragColor.a *= opacity; // \u5168\u5C40\u900F\u660E\u5EA6
|
|
if(u_animate.x == Animate) {
|
|
animateSpeed = u_time / u_animate.y;
|
|
float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + animateSpeed);
|
|
alpha = (alpha + u_animate.w -1.0) / u_animate.w;
|
|
alpha = smoothstep(0., 1., alpha);
|
|
gl_FragColor.a *= alpha;
|
|
}
|
|
|
|
if(u_line_texture == LineTexture) { // while load texture
|
|
float aDistance = styleMappingMat[3].g; // \u5F53\u524D\u9876\u70B9\u7684\u8DDD\u79BB
|
|
float d_texPixelLen = styleMappingMat[3].b; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E
|
|
float u = fract(mod(aDistance, d_texPixelLen)/d_texPixelLen - animateSpeed);
|
|
float v = styleMappingMat[3].a; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C
|
|
|
|
// v = max(smoothstep(0.95, 1.0, v), v);
|
|
vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;
|
|
|
|
// gl_FragColor = filterColor(gl_FragColor + texture2D(u_texture, vec2(u, v)));
|
|
// gl_FragColor = filterColor(gl_FragColor + texture2D(u_texture, uv));
|
|
vec4 pattern = texture2D(u_texture, uv);
|
|
|
|
if(u_textureBlend == 0.0) { // normal
|
|
pattern.a = 0.0;
|
|
gl_FragColor += pattern;
|
|
} else { // replace
|
|
pattern.a *= opacity;
|
|
if(gl_FragColor.a <= 0.0) {
|
|
pattern.a = 0.0;
|
|
}
|
|
gl_FragColor = pattern;
|
|
}
|
|
}
|
|
|
|
float v = styleMappingMat[3].a;
|
|
float borderWidth = min(0.5, u_borderWidth);
|
|
// \u7ED8\u5236 border
|
|
if(borderWidth > 0.01) {
|
|
float borderOuterWidth = borderWidth/2.0;
|
|
|
|
if(v >= 1.0 - borderWidth || v <= borderWidth) {
|
|
if(v > borderWidth) {
|
|
float linear = smoothstep(0.0, 1.0, (v - (1.0 - borderWidth))/borderWidth);
|
|
gl_FragColor.rgb = mix(gl_FragColor.rgb, u_borderColor.rgb, linear);
|
|
} else if(v <= borderWidth) {
|
|
float linear = smoothstep(0.0, 1.0, v/borderWidth);
|
|
gl_FragColor.rgb = mix(u_borderColor.rgb, gl_FragColor.rgb, linear);
|
|
}
|
|
}
|
|
|
|
if(v < borderOuterWidth) {
|
|
gl_FragColor.a = mix(0.0, gl_FragColor.a, v/borderOuterWidth);
|
|
} else if(v > 1.0 - borderOuterWidth) {
|
|
gl_FragColor.a = mix(gl_FragColor.a, 0.0, (v - (1.0 - borderOuterWidth))/borderOuterWidth);
|
|
}
|
|
}
|
|
|
|
// blur
|
|
float blurV = styleMappingMat[3][3];
|
|
if(blurV < 0.5) {
|
|
gl_FragColor.a *= mix(u_blur.r, u_blur.g, blurV/0.5);
|
|
} else {
|
|
gl_FragColor.a *= mix(u_blur.g, u_blur.b, (blurV - 0.5)/0.5);
|
|
}
|
|
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
`,Ox=`
|
|
#define Animate 0.0
|
|
|
|
attribute float a_Miter;
|
|
attribute vec4 a_Color;
|
|
attribute vec2 a_Size;
|
|
attribute vec3 a_Normal;
|
|
attribute vec3 a_Position;
|
|
|
|
attribute vec2 a_iconMapUV;
|
|
|
|
// dash line
|
|
attribute float a_Total_Distance;
|
|
attribute vec2 a_DistanceAndIndex;
|
|
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
uniform float u_icon_step: 100;
|
|
|
|
uniform float u_heightfixed: 0.0;
|
|
uniform float u_vertexScale: 1.0;
|
|
uniform float u_raisingHeight: 0.0;
|
|
|
|
#pragma include "projection"
|
|
#pragma include "picking"
|
|
|
|
varying vec4 v_color;
|
|
|
|
// texV \u7EBF\u56FE\u5C42 - \u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\uFF08\u7EBF\u7684\u5BBD\u5EA6\u65B9\u5411\uFF09
|
|
varying vec2 v_iconMapUV;
|
|
|
|
|
|
uniform float u_linearColor: 0;
|
|
uniform float u_arrow: 0.0;
|
|
uniform float u_arrowHeight: 3.0;
|
|
uniform float u_arrowWidth: 2.0;
|
|
uniform float u_tailWidth: 1.0;
|
|
|
|
uniform float u_opacity: 1.0;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
vec2 calculateArrow(vec2 offset) {
|
|
/*
|
|
* \u5728\u652F\u6301\u7BAD\u5934\u7684\u65F6\u5019\uFF0C\u7B2C\u4E8C\u3001\u7B2C\u4E09\u7EC4\u9876\u70B9\u662F\u989D\u5916\u63D2\u5165\u7528\u4E8E\u6784\u5EFA\u9876\u70B9\u7684
|
|
*/
|
|
float arrowFlag = -1.0;
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {
|
|
// \u9AD8\u5FB7 2.0 \u7684\u65CB\u8F6C\u89D2\u5EA6\u4E0D\u540C
|
|
arrowFlag = 1.0;
|
|
}
|
|
float pi = arrowFlag * 3.1415926/2.;
|
|
if(a_Miter < 0.) {
|
|
// \u6839\u636E\u7EBF\u7684\u4E24\u4FA7\u504F\u79FB\u4E0D\u540C\u3001\u65CB\u8F6C\u7684\u65B9\u5411\u76F8\u53CD
|
|
pi = -pi;
|
|
}
|
|
highp float angle_sin = sin(pi);
|
|
highp float angle_cos = cos(pi);
|
|
// \u8BA1\u7B97\u5782\u76F4\u4E0E\u7EBF\u65B9\u5411\u7684\u65CB\u8F6C\u77E9\u9635
|
|
mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);
|
|
float arrowWidth = u_arrowWidth;
|
|
float arrowHeight = u_arrowHeight;
|
|
|
|
vec2 arrowOffset = vec2(0.0);
|
|
/*
|
|
* a_DistanceAndIndex.y \u7528\u4E8E\u6807\u8BB0\u5F53\u524D\u9876\u70B9\u5C5E\u4E8E\u54EA\u4E00\u7EC4\uFF08\u4E24\u4E2A\u9876\u70B9\u4E00\u7EC4\uFF0C\u6784\u6210\u7EBF\u7684\u5176\u5B9E\u662F\u77E9\u5F62\uFF0C\u6700\u7B80\u9700\u8981\u56DB\u4E2A\u9876\u70B9\u3001\u4E24\u7EC4\u9876\u70B9\u6784\u6210\uFF09
|
|
*/
|
|
if(a_DistanceAndIndex.y == 0.0) {
|
|
// \u7BAD\u5934\u5C16\u90E8
|
|
offset = vec2(0.0);
|
|
} else if(a_DistanceAndIndex.y == 1.0) {
|
|
// \u7BAD\u5934\u4E24\u4FA7
|
|
arrowOffset = rotation_matrix*(offset * arrowHeight);
|
|
offset += arrowOffset; // \u6CBF\u7EBF\u504F\u79FB
|
|
offset = offset * arrowWidth; // \u5782\u76F4\u7EBF\u5411\u5916\u504F\u79FB\uFF08\u662F\u6784\u5EFA\u7BAD\u5934\u4E24\u4FA7\u7684\u9876\u70B9\uFF09
|
|
} else if(a_DistanceAndIndex.y == 2.0 || a_DistanceAndIndex.y == 3.0 || a_DistanceAndIndex.y == 4.0) {
|
|
// \u504F\u79FB\u5176\u4F59\u7684\u70B9\u4F4D\uFF08\u5C06\u957F\u5EA6\u8BA9\u4F4D\u7ED9\u7BAD\u5934\uFF09
|
|
arrowOffset = rotation_matrix*(offset * arrowHeight) * arrowWidth;
|
|
offset += arrowOffset;// \u6CBF\u7EBF\u504F\u79FB
|
|
}
|
|
|
|
return offset;
|
|
}
|
|
|
|
void main() {
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0 // distance_ratio/distance/pixelLen/texV
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
float d_texPixelLen; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E
|
|
|
|
v_iconMapUV = a_iconMapUV;
|
|
d_texPixelLen = project_float_pixel(u_icon_step);
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {
|
|
d_texPixelLen *= 10.0;
|
|
}
|
|
|
|
v_color = a_Color;
|
|
|
|
vec3 size = a_Miter * setPickingSize(a_Size.x) * reverse_offset_normal(a_Normal);
|
|
|
|
vec2 offset = project_pixel(size.xy);
|
|
|
|
float lineDistance = a_DistanceAndIndex.x;
|
|
float currentLinePointRatio = lineDistance / a_Total_Distance;
|
|
|
|
if(u_arrow > 0.0) {
|
|
// \u8BA1\u7B97\u7BAD\u5934
|
|
offset = calculateArrow(offset);
|
|
|
|
if(a_DistanceAndIndex.y > 4.0) {
|
|
offset *= mix(1.0, u_tailWidth, currentLinePointRatio);
|
|
}
|
|
}
|
|
|
|
float lineOffsetWidth = length(offset + offset * sign(a_Miter)); // \u7EBF\u6A2A\u5411\u504F\u79FB\u7684\u8DDD\u79BB\uFF08\u5411\u4E24\u4FA7\u504F\u79FB\u7684\u548C\uFF09
|
|
float linePixelSize = project_pixel(a_Size.x) * 2.0; // \u5B9A\u70B9\u4F4D\u7F6E\u504F\u79FB\uFF0C\u6309\u5730\u56FE\u7B49\u7EA7\u7F29\u653E\u540E\u7684\u8DDD\u79BB \u5355\u4FA7 * 2
|
|
float texV = lineOffsetWidth/linePixelSize; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C
|
|
|
|
// \u8BBE\u7F6E\u6570\u636E\u96C6\u7684\u53C2\u6570
|
|
styleMappingMat[3][0] = currentLinePointRatio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
styleMappingMat[3][1] = lineDistance; // \u5F53\u524D\u9876\u70B9\u7684\u8DDD\u79BB
|
|
styleMappingMat[3][2] = d_texPixelLen; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E
|
|
styleMappingMat[3][3] = texV; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C
|
|
|
|
vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));
|
|
|
|
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, a_Size.y, 1.0));
|
|
|
|
float h = float(a_Position.z) * u_vertexScale; // \u7EBF\u9876\u70B9\u7684\u9AD8\u5EA6 - \u517C\u5BB9\u4E0D\u5B58\u5728\u7B2C\u4E09\u4E2A\u6570\u503C\u7684\u60C5\u51B5 vertex height
|
|
float lineHeight = a_Size.y; // size \u7B2C\u4E8C\u4E2A\u53C2\u6570\u4EE3\u8868\u7684\u9AD8\u5EA6 [linewidth, lineheight]
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
lineHeight *= 0.2; // \u4FDD\u6301\u548C amap/mapbox \u4E00\u81F4\u7684\u6548\u679C
|
|
h *= 0.2;
|
|
if(u_heightfixed < 1.0) {
|
|
lineHeight = project_pixel(a_Size.y);
|
|
}
|
|
gl_Position = u_Mvp * (vec4(project_pos.xy + offset, lineHeight + h + u_raisingHeight, 1.0));
|
|
} else {
|
|
// mapbox - amap
|
|
|
|
// \u517C\u5BB9 mapbox \u5728\u7EBF\u9AD8\u5EA6\u4E0A\u7684\u6548\u679C\u8868\u73B0\u57FA\u672C\u4E00\u81F4
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
// mapbox
|
|
// \u4FDD\u6301\u9AD8\u5EA6\u76F8\u5BF9\u4E0D\u53D8
|
|
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
h *= mapboxZoomScale;
|
|
h += u_raisingHeight * mapboxZoomScale;
|
|
if(u_heightfixed > 0.0) {
|
|
lineHeight *= mapboxZoomScale;
|
|
}
|
|
|
|
} else {
|
|
// amap
|
|
h += u_raisingHeight;
|
|
// lineHeight \u9876\u70B9\u504F\u79FB\u9AD8\u5EA6
|
|
if(u_heightfixed < 1.0) {
|
|
lineHeight *= pow(2.0, 20.0 - u_Zoom);
|
|
}
|
|
}
|
|
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, lineHeight + h, 1.0));
|
|
}
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,vI=`varying vec4 v_color;
|
|
uniform float u_linearDir: 1.0;
|
|
uniform float u_linearColor: 0;
|
|
uniform vec4 u_sourceColor;
|
|
uniform vec4 u_targetColor;
|
|
|
|
#pragma include "picking"
|
|
|
|
|
|
varying mat4 styleMappingMat;
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float linearRadio = styleMappingMat[3][0]; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
if(u_linearDir < 1.0) {
|
|
linearRadio = styleMappingMat[3][3];
|
|
}
|
|
|
|
if(u_linearColor == 1.0) { // \u4F7F\u7528\u6E10\u53D8\u989C\u8272
|
|
gl_FragColor = mix(u_sourceColor, u_targetColor, linearRadio);
|
|
} else { // \u4F7F\u7528 color \u65B9\u6CD5\u4F20\u5165\u7684\u989C\u8272
|
|
gl_FragColor = v_color;
|
|
}
|
|
|
|
gl_FragColor.a *= opacity; // \u5168\u5C40\u900F\u660E\u5EA6
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
`,gI={solid:0,dash:1},nS=function(n){(0,zt.Z)(a,n);var l=hI(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"texture",s.createTexture2D({data:[0,0,0,0],mag:ne.NEAREST,min:ne.NEAREST,premultiplyAlpha:!1,width:1,height:1})),(0,W.Z)((0,ut.Z)(s),"updateTexture",function(){var m=s.rendererService.createTexture2D;if(s.texture){s.texture.update({data:s.iconService.getCanvas()}),s.layer.render();return}s.texture=m({data:s.iconService.getCanvas(),mag:ne.NEAREST,min:ne.NEAREST,premultiplyAlpha:!1,width:1024,height:s.iconService.canvasHeight||128})}),s}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.sourceColor,w=u.targetColor,A=u.textureBlend,R=A===void 0?"normal":A,B=u.lineType,G=B===void 0?"solid":B,j=u.dashArray,lt=j===void 0?[10,5,0,0]:j,ct=u.lineTexture,_t=ct===void 0?!1:ct,Vt=u.iconStep,ce=Vt===void 0?100:Vt,ae=u.vertexHeightScale,ze=ae===void 0?20:ae,$e=u.borderWidth,xr=$e===void 0?0:$e,Or=u.borderColor,Zr=Or===void 0?"#ccc":Or,Wr=u.raisingHeight,wn=Wr===void 0?0:Wr,vn=u.heightfixed,Kn=vn===void 0?!1:vn,Ei=u.linearDir,qi=Ei===void 0?Vv.VERTICAL:Ei,_o=u.blur,jo=_o===void 0?[1,1,1]:_o,Gs=u.arrow,hu=Gs===void 0?{enable:!1,arrowWidth:2,arrowHeight:3,tailWidth:1}:Gs;lt.length===2&<.push(0,0),this.rendererService.getDirty()&&this.texture&&this.texture.bind();var $u=0,Uh=[0,0,0,0],m2=[0,0,0,0];if(m&&w&&(Uh=Lo(m),m2=Lo(w),$u=1),this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:v})){this.judgeStyleAttributes({opacity:v});var p_=this.layer.getEncodedData(),y2=this.calDataFrame(this.cellLength,p_,this.cellProperties),LT=y2.data,cO=y2.width,PT=y2.height;this.rowCount=PT,this.dataTexture=this.cellLength>0&<.length>0?this.createTexture2D({flipY:!0,data:LT,format:ne.LUMINANCE,type:ne.FLOAT,width:cO,height:PT}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}return{u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_opacity:(0,Fn.isNumber)(v)?v:1,u_textureBlend:R===wm.NORMAL?0:1,u_line_type:gI[G],u_dash_array:lt,u_blur:jo,u_texture:this.texture,u_line_texture:_t?1:0,u_icon_step:ce,u_textSize:[1024,this.iconService.canvasHeight||128],u_borderWidth:xr,u_borderColor:Lo(Zr),u_linearDir:qi===Vv.VERTICAL?1:0,u_linearColor:$u,u_sourceColor:Uh,u_targetColor:m2,u_heightfixed:Number(Kn),u_vertexScale:ze,u_raisingHeight:Number(wn),u_arrow:Number(hu.enable),u_arrowHeight:hu.arrowHeight||3,u_arrowWidth:hu.arrowWidth||2,u_tailWidth:hu.tailWidth===void 0?1:hu.tailWidth}}},{key:"getAnimateUniforms",value:function(){var u=this.layer.getLayerConfig(),h=u.animateOption;return{u_animate:this.animateOption2Array(h),u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.buildModels();case 2:return m.abrupt("return",m.sent);case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u,h;(u=this.texture)===null||u===void 0||u.destroy(),(h=this.dataTexture)===null||h===void 0||h.destroy(),this.iconService.off("imageUpdate",this.updateTexture)}},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j,lt,ct,_t,Vt,ce,ae,ze;return ot().wrap(function(xr){for(;;)switch(xr.prev=xr.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,B=v.depth,G=B===void 0?!1:B,j=v.workerEnabled,lt=j===void 0?!1:j,ct=v.enablePicking,_t=this.getShaders(),Vt=_t.frag,ce=_t.vert,ae=_t.type,this.layer.triangulation=Pe,xr.next=5,this.layer.buildLayerModel({moduleName:"line"+ae,vertexShader:ce,fragmentShader:Vt,triangulation:Pe,depth:{enable:G},blend:this.getBlend(),stencil:Zo(w,R),workerEnabled:lt,workerOptions:{modelType:"line"+ae,enablePicking:ct,iconMap:this.iconService.getIconMap()}});case 5:return ze=xr.sent,xr.abrupt("return",[ze]);case 7:case"end":return xr.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getShaders",value:function(){var u=this.layer.getLayerConfig(),h=u.sourceColor,v=u.targetColor,m=u.lineType;return m==="dash"?{frag:rS,vert:pI,type:"Dash"}:h&&v?{frag:vI,vert:Ox,type:"Linear"}:{frag:dI,vert:Ox,type:""}}},{key:"registerBuiltinAttributes",value:function(){var u=this;this.styleAttributeService.registerStyleAttribute({name:"distanceAndIndex",type:ea.Attribute,descriptor:{name:"a_DistanceAndIndex",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(v,m,w,A,R,B){return B===void 0?[w[3],10]:[w[3],B]}}}),this.styleAttributeService.registerStyleAttribute({name:"total_distance",type:ea.Attribute,descriptor:{name:"a_Total_Distance",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v,m,w){return[w[5]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(v){var m=v.size,w=m===void 0?1:m;return Array.isArray(w)?[w[0],w[1]]:[w,0]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:ea.Attribute,descriptor:{name:"a_Normal",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(v,m,w,A,R){return R}}}),this.styleAttributeService.registerStyleAttribute({name:"miter",type:ea.Attribute,descriptor:{name:"a_Miter",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v,m,w){return[w[4]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:ea.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(v){var m=u.iconService.getIconMap(),w=v.texture,A=m[w]||{x:0,y:0},R=A.x,B=A.y;return[R,B]}}})}}]),a}($o);function mI(n){var l=yI();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function yI(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var _I=`uniform float u_opacity : 1.0;
|
|
uniform sampler2D u_texture;
|
|
uniform float u_linearDir: 1.0;
|
|
|
|
#pragma include "picking"
|
|
|
|
varying mat4 styleMappingMat;
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float linearRadio = styleMappingMat[3].r; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
if(u_linearDir < 1.0) {
|
|
linearRadio = styleMappingMat[3][3];
|
|
}
|
|
|
|
gl_FragColor = texture2D(u_texture, vec2(linearRadio, 0.5));
|
|
|
|
gl_FragColor.a *= opacity; // \u5168\u5C40\u900F\u660E\u5EA6
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
`,xI=`
|
|
attribute float a_Miter;
|
|
attribute vec2 a_Size;
|
|
attribute vec3 a_Normal;
|
|
attribute vec3 a_Position;
|
|
|
|
// dash line
|
|
attribute float a_Total_Distance;
|
|
attribute vec2 a_DistanceAndIndex;
|
|
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
|
|
uniform float u_heightfixed: 0.0;
|
|
uniform float u_vertexScale: 1.0;
|
|
uniform float u_raisingHeight: 0.0;
|
|
|
|
uniform float u_opacity: 1.0;
|
|
|
|
#pragma include "projection"
|
|
#pragma include "picking"
|
|
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
void main() {
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0 // distance_ratio/distance/pixelLen/texV
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
vec3 size = a_Miter * setPickingSize(a_Size.x) * reverse_offset_normal(a_Normal);
|
|
|
|
vec2 offset = project_pixel(size.xy);
|
|
|
|
float lineDistance = a_DistanceAndIndex.x;
|
|
float currentLinePointRatio = lineDistance / a_Total_Distance;
|
|
|
|
|
|
float lineOffsetWidth = length(offset + offset * sign(a_Miter)); // \u7EBF\u6A2A\u5411\u504F\u79FB\u7684\u8DDD\u79BB\uFF08\u5411\u4E24\u4FA7\u504F\u79FB\u7684\u548C\uFF09
|
|
float linePixelSize = project_pixel(a_Size.x) * 2.0; // \u5B9A\u70B9\u4F4D\u7F6E\u504F\u79FB\uFF0C\u6309\u5730\u56FE\u7B49\u7EA7\u7F29\u653E\u540E\u7684\u8DDD\u79BB \u5355\u4FA7 * 2
|
|
float texV = lineOffsetWidth/linePixelSize; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C
|
|
|
|
// \u8BBE\u7F6E\u6570\u636E\u96C6\u7684\u53C2\u6570
|
|
styleMappingMat[3][0] = currentLinePointRatio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
styleMappingMat[3][3] = texV; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C
|
|
|
|
vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));
|
|
|
|
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, a_Size.y, 1.0));
|
|
|
|
float h = float(a_Position.z) * u_vertexScale; // \u7EBF\u9876\u70B9\u7684\u9AD8\u5EA6 - \u517C\u5BB9\u4E0D\u5B58\u5728\u7B2C\u4E09\u4E2A\u6570\u503C\u7684\u60C5\u51B5 vertex height
|
|
float lineHeight = a_Size.y; // size \u7B2C\u4E8C\u4E2A\u53C2\u6570\u4EE3\u8868\u7684\u9AD8\u5EA6 [linewidth, lineheight]
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
lineHeight *= 0.2; // \u4FDD\u6301\u548C amap/mapbox \u4E00\u81F4\u7684\u6548\u679C
|
|
h *= 0.2;
|
|
if(u_heightfixed < 1.0) {
|
|
lineHeight = project_pixel(a_Size.y);
|
|
}
|
|
gl_Position = u_Mvp * (vec4(project_pos.xy + offset, lineHeight + h + u_raisingHeight, 1.0));
|
|
} else {
|
|
// mapbox - amap
|
|
|
|
// \u517C\u5BB9 mapbox \u5728\u7EBF\u9AD8\u5EA6\u4E0A\u7684\u6548\u679C\u8868\u73B0\u57FA\u672C\u4E00\u81F4
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
// mapbox
|
|
// \u4FDD\u6301\u9AD8\u5EA6\u76F8\u5BF9\u4E0D\u53D8
|
|
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
h *= mapboxZoomScale;
|
|
h += u_raisingHeight * mapboxZoomScale;
|
|
if(u_heightfixed > 0.0) {
|
|
lineHeight *= mapboxZoomScale;
|
|
}
|
|
|
|
} else {
|
|
// amap
|
|
h += u_raisingHeight;
|
|
// lineHeight \u9876\u70B9\u504F\u79FB\u9AD8\u5EA6
|
|
if(u_heightfixed < 1.0) {
|
|
lineHeight *= pow(2.0, 20.0 - u_Zoom);
|
|
}
|
|
}
|
|
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, lineHeight + h, 1.0));
|
|
}
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,bI=function(n){(0,zt.Z)(a,n);var l=mI(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"updateTexture",function(){var m=s.rendererService.createTexture2D;s.colorTexture&&s.colorTexture.destroy();var w=s.layer.getLayerConfig(),A=w.rampColors,R=Qc(A);s.colorTexture=m({data:new Uint8Array(R.data),width:R.width,height:R.height,wrapS:ne.CLAMP_TO_EDGE,wrapT:ne.CLAMP_TO_EDGE,min:ne.NEAREST,mag:ne.NEAREST,flipY:!1})}),s}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.vertexHeightScale,w=m===void 0?20:m,A=u.raisingHeight,R=A===void 0?0:A,B=u.heightfixed,G=B===void 0?!1:B,j=u.linearDir,lt=j===void 0?Vv.VERTICAL:j;if(this.rendererService.getDirty()&&this.colorTexture.bind(),this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:v})){this.judgeStyleAttributes({opacity:v});var ct=this.layer.getEncodedData(),_t=this.calDataFrame(this.cellLength,ct,this.cellProperties),Vt=_t.data,ce=_t.width,ae=_t.height;this.rowCount=ae,this.dataTexture=this.cellLength>0&&Vt.length>0?this.createTexture2D({flipY:!0,data:Vt,format:ne.LUMINANCE,type:ne.FLOAT,width:ce,height:ae}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}return{u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_linearDir:lt===Vv.VERTICAL?1:0,u_opacity:(0,Fn.isNumber)(v)?v:1,u_texture:this.colorTexture,u_heightfixed:Number(G),u_vertexScale:w,u_raisingHeight:Number(R)}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return this.updateTexture(),m.next=3,this.buildModels();case 3:return m.abrupt("return",m.sent);case 4:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u,h;(u=this.colorTexture)===null||u===void 0||u.destroy(),(h=this.dataTexture)===null||h===void 0||h.destroy()}},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j;return ot().wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,B=v.depth,G=B===void 0?!1:B,this.layer.triangulation=mm,ct.next=4,this.layer.buildLayerModel({moduleName:"lineRampColors",vertexShader:xI,fragmentShader:_I,triangulation:mm,depth:{enable:G},blend:this.getBlend(),stencil:Zo(w,R)});case 4:return j=ct.sent,ct.abrupt("return",[j]);case 6:case"end":return ct.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"distanceAndIndex",type:ea.Attribute,descriptor:{name:"a_DistanceAndIndex",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(h,v,m,w,A,R){return R===void 0?[m[3],10]:[m[3],R]}}}),this.styleAttributeService.registerStyleAttribute({name:"total_distance",type:ea.Attribute,descriptor:{name:"a_Total_Distance",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(h,v,m){return[m[5]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(h){var v=h.size,m=v===void 0?1:v;return Array.isArray(m)?[m[0],m[1]]:[m,0]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:ea.Attribute,descriptor:{name:"a_Normal",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(h,v,m,w,A){return A}}}),this.styleAttributeService.registerStyleAttribute({name:"miter",type:ea.Attribute,descriptor:{name:"a_Miter",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(h,v,m){return[m[4]]}}})}}]),a}($o);function EI(n){var l=wI();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function wI(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var SI=`
|
|
varying vec4 v_color;
|
|
varying mat4 styleMappingMat;
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float d_distance_ratio = styleMappingMat[3].r; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
|
|
gl_FragColor = v_color;
|
|
gl_FragColor.a *= opacity; // \u5168\u5C40\u900F\u660E\u5EA6
|
|
}
|
|
`,iS=`uniform vec4 u_sourceColor;
|
|
uniform vec4 u_targetColor;
|
|
|
|
varying mat4 styleMappingMat;
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
|
|
// styleMappingMat[3][0] \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
gl_FragColor = mix(u_sourceColor, u_targetColor, styleMappingMat[3][0]);
|
|
gl_FragColor.a *= opacity; // \u5168\u5C40\u900F\u660E\u5EA6
|
|
}
|
|
`,d1=`attribute vec4 a_Color;
|
|
attribute vec2 a_Size;
|
|
attribute vec3 a_Position;
|
|
|
|
attribute float a_Total_Distance;
|
|
attribute float a_Distance;
|
|
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
|
|
uniform float u_opacity: 1.0;
|
|
uniform float u_vertexScale: 1.0;
|
|
|
|
#pragma include "projection"
|
|
|
|
varying vec4 v_color;
|
|
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
void main() {
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0 // distance_ratio/distance/pixelLen/texV
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
|
|
v_color = a_Color;
|
|
styleMappingMat[3][0] = a_Distance / a_Total_Distance;
|
|
|
|
vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));
|
|
|
|
float h = float(a_Position.z) * u_vertexScale; // \u7EBF\u9876\u70B9\u7684\u9AD8\u5EA6 - \u517C\u5BB9\u4E0D\u5B58\u5728\u7B2C\u4E09\u4E2A\u6570\u503C\u7684\u60C5\u51B5
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(project_pos.xy, project_pixel(a_Size.y) + h * 0.2, 1.0));
|
|
} else {
|
|
float lineHeight = a_Size.y;
|
|
// \u517C\u5BB9 mapbox \u5728\u7EBF\u9AD8\u5EA6\u4E0A\u7684\u6548\u679C\u8868\u73B0\u57FA\u672C\u4E00\u81F4
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
// \u4FDD\u6301\u9AD8\u5EA6\u76F8\u5BF9\u4E0D\u53D8
|
|
h *= 2.0/pow(2.0, 20.0 - u_Zoom);
|
|
}
|
|
|
|
// #define COORDINATE_SYSTEM_P20 5.0
|
|
// #define COORDINATE_SYSTEM_P20_OFFSET 6.0
|
|
// amap1.x
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {
|
|
// \u4FDD\u6301\u9AD8\u5EA6\u76F8\u5BF9\u4E0D\u53D8
|
|
lineHeight *= pow(2.0, 20.0 - u_Zoom);
|
|
}
|
|
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, lineHeight + h, 1.0));
|
|
gl_PointSize = 10.0;
|
|
}
|
|
}
|
|
`,aS=function(n){(0,zt.Z)(a,n);var l=EI(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.sourceColor,w=u.targetColor,A=u.vertexHeightScale,R=A===void 0?20:A,B=0,G=[0,0,0,0],j=[0,0,0,0];if(m&&w&&(G=Lo(m),j=Lo(w),B=1),this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:v})){this.judgeStyleAttributes({opacity:v});var lt=this.layer.getEncodedData(),ct=this.calDataFrame(this.cellLength,lt,this.cellProperties),_t=ct.data,Vt=ct.width,ce=ct.height;this.rowCount=ce,this.dataTexture=this.cellLength>0&&_t.length>0?this.createTexture2D({flipY:!0,data:_t,format:ne.LUMINANCE,type:ne.FLOAT,width:Vt,height:ce}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}return{u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_opacity:(0,Fn.isNumber)(v)?v:1,u_linearColor:B,u_sourceColor:G,u_targetColor:j,u_vertexScale:R}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.buildModels();case 2:return m.abrupt("return",m.sent);case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u;(u=this.dataTexture)===null||u===void 0||u.destroy()}},{key:"getShaders",value:function(){var u=this.layer.getLayerConfig(),h=u.sourceColor,v=u.targetColor;return h&&v?{frag:iS,vert:d1,type:"lineSimpleLinear"}:{frag:SI,vert:d1,type:"lineSimpleNormal"}}},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j,lt,ct;return ot().wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,B=this.getShaders(),G=B.frag,j=B.vert,lt=B.type,Vt.next=4,this.layer.buildLayerModel({moduleName:lt,vertexShader:j,fragmentShader:G,triangulation:ym,primitive:ne.LINES,depth:{enable:!1},blend:this.getBlend(),stencil:Zo(w,R),pick:!1});case 4:return ct=Vt.sent,Vt.abrupt("return",[ct]);case 6:case"end":return Vt.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"distance",type:ea.Attribute,descriptor:{name:"a_Distance",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(h,v,m){return[m[3]]}}}),this.styleAttributeService.registerStyleAttribute({name:"total_distance",type:ea.Attribute,descriptor:{name:"a_Total_Distance",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(h,v,m){return[m[5]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(h){var v=h.size,m=v===void 0?1:v;return Array.isArray(m)?[m[0],m[1]]:[m,0]}}})}}]),a}($o);function CI(n){var l=AI();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function AI(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var TI=`#define Animate 0.0
|
|
#define LineTexture 1.0
|
|
|
|
// line texture
|
|
uniform float u_line_texture;
|
|
uniform sampler2D u_texture;
|
|
uniform vec2 u_textSize;
|
|
uniform float u_linearColor: 0;
|
|
uniform vec4 u_sourceColor;
|
|
uniform vec4 u_targetColor;
|
|
uniform float u_opacity : 1.0;
|
|
uniform float u_textureBlend;
|
|
uniform float u_iconStepCount;
|
|
uniform float u_time;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; // \u63A7\u5236\u8FD0\u52A8
|
|
|
|
varying vec2 v_iconMapUV;
|
|
varying float v_blur;
|
|
varying float v_radio;
|
|
varying vec4 v_color;
|
|
varying vec4 v_dataset;
|
|
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
float opacity = u_opacity;
|
|
float animateSpeed = 0.0; // \u8FD0\u52A8\u901F\u5EA6
|
|
float d_distance_ratio = v_dataset.r; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
float v = v_dataset.a;
|
|
|
|
if(u_linearColor == 1.0) { // \u4F7F\u7528\u6E10\u53D8\u989C\u8272
|
|
gl_FragColor = mix(u_sourceColor, u_targetColor, v);
|
|
} else { // \u4F7F\u7528 color \u65B9\u6CD5\u4F20\u5165\u7684\u989C\u8272
|
|
gl_FragColor = v_color;
|
|
}
|
|
|
|
gl_FragColor.a *= opacity; // \u5168\u5C40\u900F\u660E\u5EA6
|
|
if(u_animate.x == Animate) {
|
|
animateSpeed = u_time / u_animate.y;
|
|
float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + animateSpeed);
|
|
alpha = (alpha + u_animate.w -1.0) / u_animate.w;
|
|
alpha = smoothstep(0., 1., alpha);
|
|
gl_FragColor.a *= alpha;
|
|
}
|
|
|
|
if(u_line_texture == LineTexture) { // while load texture
|
|
float aDistance = v_dataset.g; // \u5F53\u524D\u9876\u70B9\u7684\u8DDD\u79BB
|
|
float d_texPixelLen = v_dataset.b; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E
|
|
float u = fract(mod(aDistance, d_texPixelLen)/d_texPixelLen - animateSpeed);
|
|
float v = v_dataset.a; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C
|
|
|
|
// \u8BA1\u7B97\u7EB9\u7406\u95F4\u9694 start
|
|
float flag = 0.0;
|
|
if(u > 1.0/u_iconStepCount) {
|
|
flag = 1.0;
|
|
}
|
|
u = fract(u*u_iconStepCount);
|
|
// \u8BA1\u7B97\u7EB9\u7406\u95F4\u9694 end
|
|
|
|
vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;
|
|
vec4 pattern = texture2D(u_texture, uv);
|
|
|
|
// Tip: \u5224\u65AD\u7EB9\u7406\u95F4\u9694
|
|
if(flag > 0.0) {
|
|
pattern = vec4(0.0);
|
|
}
|
|
|
|
if(u_textureBlend == 0.0) { // normal
|
|
pattern.a = 0.0;
|
|
gl_FragColor = filterColor(gl_FragColor + pattern);
|
|
} else { // replace
|
|
pattern.a *= opacity;
|
|
if(gl_FragColor.a <= 0.0) {
|
|
pattern.a = 0.0;
|
|
}
|
|
gl_FragColor = filterColor(pattern);
|
|
}
|
|
}
|
|
|
|
|
|
// blur - AA
|
|
if(v < v_blur) {
|
|
gl_FragColor.a = mix(0.0, gl_FragColor.a, v/v_blur);
|
|
} else if(v > 1.0 - v_blur) {
|
|
gl_FragColor.a = mix(gl_FragColor.a, 0.0, (v - (1.0 - v_blur))/v_blur);
|
|
}
|
|
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
`,MI=`#define Animate 0.0
|
|
|
|
attribute float a_Miter;
|
|
attribute vec4 a_Color;
|
|
attribute vec2 a_Size;
|
|
attribute vec3 a_Normal;
|
|
attribute vec3 a_Position;
|
|
attribute vec2 a_iconMapUV;
|
|
attribute float a_Total_Distance;
|
|
attribute float a_Distance;
|
|
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
uniform float u_icon_step: 100;
|
|
uniform float u_heightfixed;
|
|
uniform float u_linearColor: 0;
|
|
|
|
#pragma include "projection"
|
|
#pragma include "light"
|
|
#pragma include "picking"
|
|
|
|
// texV \u7EBF\u56FE\u5C42 - \u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\uFF08\u7EBF\u7684\u5BBD\u5EA6\u65B9\u5411\uFF09
|
|
varying vec2 v_iconMapUV;
|
|
varying vec4 v_color;
|
|
varying float v_blur;
|
|
varying float v_radio;
|
|
varying vec4 v_dataset;
|
|
|
|
void main() {
|
|
|
|
|
|
float d_distance_ratio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
float d_texPixelLen; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E
|
|
|
|
v_iconMapUV = a_iconMapUV;
|
|
if(u_heightfixed < 1.0) { // \u9AD8\u5EA6\u968F zoom \u8C03\u6574
|
|
d_texPixelLen = project_pixel(u_icon_step);
|
|
} else {
|
|
d_texPixelLen = u_icon_step;
|
|
}
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {
|
|
d_texPixelLen *= 10.0;
|
|
}
|
|
|
|
if(u_animate.x == Animate || u_linearColor == 1.0) {
|
|
d_distance_ratio = a_Distance / a_Total_Distance;
|
|
}
|
|
|
|
float miter = (a_Miter + 1.0)/2.0;
|
|
// \u8BBE\u7F6E\u6570\u636E\u96C6\u7684\u53C2\u6570
|
|
v_dataset[0] = d_distance_ratio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B
|
|
v_dataset[1] = a_Distance; // \u5F53\u524D\u9876\u70B9\u7684\u8DDD\u79BB
|
|
v_dataset[2] = d_texPixelLen; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E
|
|
v_dataset[3] = miter; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C 0 - 1
|
|
|
|
vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));
|
|
|
|
float originSize = a_Size.x; // \u56FA\u5B9A\u9AD8\u5EA6
|
|
if(u_heightfixed < 1.0) { // \u9AD8\u5EA6\u968F zoom \u8C03\u6574
|
|
originSize = project_float_pixel(a_Size.x);
|
|
}
|
|
|
|
float wallHeight = originSize * miter;
|
|
float lightWeight = calc_lighting(vec4(project_pos.xy, wallHeight, 1.0));
|
|
|
|
v_blur = min(project_float_pixel(2.0) / originSize, 0.05);
|
|
v_color = vec4(a_Color.rgb * lightWeight, a_Color.w);
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(project_pos.xy, wallHeight, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, wallHeight, 1.0));
|
|
}
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,II=function(n){(0,zt.Z)(a,n);var l=CI(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"updateTexture",function(){var m=s.rendererService.createTexture2D;if(s.texture){s.texture.update({data:s.iconService.getCanvas()}),s.layer.render();return}s.texture=m({data:s.iconService.getCanvas(),mag:ne.NEAREST,min:ne.NEAREST,premultiplyAlpha:!1,width:1024,height:s.iconService.canvasHeight||128})}),s}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.sourceColor,w=u.targetColor,A=u.textureBlend,R=A===void 0?"normal":A,B=u.heightfixed,G=B===void 0?!1:B,j=u.lineTexture,lt=j===void 0?!1:j,ct=u.iconStep,_t=ct===void 0?100:ct,Vt=u.iconStepCount,ce=Vt===void 0?1:Vt;this.rendererService.getDirty()&&this.texture.bind();var ae=0,ze=[0,0,0,0],$e=[0,0,0,0];return m&&w&&(ze=Lo(m),$e=Lo(w),ae=1),{u_heightfixed:Number(G),u_opacity:(0,Fn.isNumber)(v)?v:1,u_textureBlend:R==="normal"?0:1,u_texture:this.texture,u_line_texture:lt?1:0,u_iconStepCount:ce,u_icon_step:_t,u_textSize:[1024,this.iconService.canvasHeight||128],u_linearColor:ae,u_sourceColor:ze,u_targetColor:$e}}},{key:"getAnimateUniforms",value:function(){var u=this.layer.getLayerConfig(),h=u.animateOption;return{u_animate:this.animateOption2Array(h),u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return this.updateTexture(),this.iconService.on("imageUpdate",this.updateTexture),m.next=4,this.buildModels();case 4:return m.abrupt("return",m.sent);case 5:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u;(u=this.texture)===null||u===void 0||u.destroy(),this.iconService.off("imageUpdate",this.updateTexture)}},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.layer.buildLayerModel({moduleName:"lineWall",vertexShader:MI,fragmentShader:TI,triangulation:mm,depth:{enable:!1},blend:this.getBlend()});case 2:return v=w.sent,w.abrupt("return",[v]);case 4:case"end":return w.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"registerBuiltinAttributes",value:function(){var u=this;this.styleAttributeService.registerStyleAttribute({name:"distance",type:ea.Attribute,descriptor:{name:"a_Distance",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v,m,w){return[w[3]]}}}),this.styleAttributeService.registerStyleAttribute({name:"total_distance",type:ea.Attribute,descriptor:{name:"a_Total_Distance",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v,m,w){return[w[5]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(v){var m=v.size,w=m===void 0?1:m;return Array.isArray(w)?[w[0],w[1]]:[w,0]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:ea.Attribute,descriptor:{name:"a_Normal",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(v,m,w,A,R){return R}}}),this.styleAttributeService.registerStyleAttribute({name:"miter",type:ea.Attribute,descriptor:{name:"a_Miter",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v,m,w){return[w[4]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:ea.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(v){var m=u.iconService.getIconMap(),w=v.texture,A=m[w]||{x:0,y:0},R=A.x,B=A.y;return[R,B]}}})}}]),a}($o),kI={arc:q5,arc3d:nI,greatcircle:Zv,wall:II,line:nS,halfLine:fI,simple:aS,linearline:bI,earthArc3d:lI},oS=kI;function LI(n){var l=v1();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function v1(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var L0=function(n){(0,zt.Z)(a,n);var l=LI(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"type","LineLayer"),(0,W.Z)((0,ut.Z)(s),"arrowInsertCount",0),(0,W.Z)((0,ut.Z)(s),"defaultSourceConfig",{data:[{lng1:100,lat1:30,lng2:130,lat2:30}],options:{parser:{type:"json",x:"lng1",y:"lat1",x1:"lng2",y1:"lat2"}}}),s}return(0,et.Z)(a,[{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return v=this.getModelType(),this.layerModel=new oS[v](this),w.next=4,this.initLayerModels();case 4:case"end":return w.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getDefaultConfig",value:function(){var u=this.getModelType(),h={line:{},linearline:{},simple:{},wall:{},arc3d:{blend:"additive"},arc:{blend:"additive"},greatcircle:{blend:"additive"},tileLine:{},halfLine:{},earthArc3d:{}};return h[u]}},{key:"getModelType",value:function(){var u;if(this.layerType)return this.layerType;var h=this.styleAttributeService.getLayerStyleAttribute("shape"),v=h==null||(u=h.scale)===null||u===void 0?void 0:u.field;return v||"line"}},{key:"processData",value:function(u){if(this.getModelType()!=="simple")return u;var h=[];return u.map(function(v){if(Array.isArray(v.coordinates)&&Array.isArray(v.coordinates[0])&&Array.isArray(v.coordinates[0][0])){var m=(0,K.Z)({},v);v.coordinates.map(function(w){h.push((0,K.Z)((0,K.Z)({},m),{},{coordinates:w}))})}else h.push(v)}),h}}]),a}(hg);function sS(n){var l=rv();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function rv(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var PI=`varying vec4 v_color;
|
|
uniform float u_opacity: 1.0;
|
|
|
|
uniform float u_pickLight: 0.0;
|
|
|
|
#pragma include "picking"
|
|
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
|
|
uniform float u_linearColor: 0;
|
|
uniform vec4 u_sourceColor;
|
|
uniform vec4 u_targetColor;
|
|
|
|
uniform float u_opacitylinear: 0.0;
|
|
uniform float u_opacitylinear_dir: 1.0;
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float lightWeight = styleMappingMat[1][3];
|
|
float barLinearZ = styleMappingMat[2][3];
|
|
|
|
// \u8BBE\u7F6E\u5706\u67F1\u7684\u5E95\u8272
|
|
if(u_linearColor == 1.0) { // \u4F7F\u7528\u6E10\u53D8\u989C\u8272
|
|
gl_FragColor = mix(u_sourceColor, u_targetColor, barLinearZ);
|
|
gl_FragColor.rgb *= lightWeight;
|
|
} else { // \u4F7F\u7528 color \u65B9\u6CD5\u4F20\u5165\u7684\u989C\u8272
|
|
gl_FragColor = v_color;
|
|
}
|
|
|
|
// \u5E94\u7528\u900F\u660E\u5EA6
|
|
gl_FragColor.a *= opacity;
|
|
|
|
// \u5F00\u542F\u900F\u660E\u5EA6\u6E10\u53D8
|
|
if(u_opacitylinear > 0.0) {
|
|
gl_FragColor.a *= u_opacitylinear_dir > 0.0 ? (1.0 - barLinearZ): barLinearZ;
|
|
}
|
|
|
|
// picking
|
|
if(u_pickLight > 0.0) {
|
|
gl_FragColor = filterColorAlpha(gl_FragColor, lightWeight);
|
|
} else {
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
}
|
|
`,uS=`precision highp float;
|
|
|
|
#define pi 3.1415926535
|
|
#define ambientRatio 0.5
|
|
#define diffuseRatio 0.3
|
|
#define specularRatio 0.2
|
|
|
|
attribute vec3 a_Position;
|
|
attribute vec3 a_Pos;
|
|
attribute vec4 a_Color;
|
|
attribute vec3 a_Size;
|
|
attribute vec3 a_Normal;
|
|
|
|
uniform float u_heightfixed: 0.0; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A
|
|
uniform float u_globel;
|
|
uniform float u_r;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
varying vec4 v_color;
|
|
|
|
uniform float u_opacity : 1;
|
|
uniform float u_lightEnable: 1;
|
|
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "light"
|
|
#pragma include "picking"
|
|
|
|
float getYRadian(float x, float z) {
|
|
if(x > 0.0 && z > 0.0) {
|
|
return atan(x/z);
|
|
} else if(x > 0.0 && z <= 0.0){
|
|
return atan(-z/x) + pi/2.0;
|
|
} else if(x <= 0.0 && z <= 0.0) {
|
|
return pi + atan(x/z); //atan(x/z) +
|
|
} else {
|
|
return atan(z/-x) + pi*3.0/2.0;
|
|
}
|
|
}
|
|
|
|
float getXRadian(float y, float r) {
|
|
return atan(y/r);
|
|
}
|
|
|
|
void main() {
|
|
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA - lightWeight
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1] - linearZ(\u5782\u76F4\u65B9\u5411 0 - 1 \u7684\u503C)
|
|
0.0, 0.0, 0.0, 0.0
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
vec3 size = a_Size * a_Position;
|
|
|
|
// a_Position.z \u662F\u5728\u6784\u5EFA\u7F51\u683C\u7684\u65F6\u5019\u4F20\u5165\u7684\u6807\u51C6\u503C 0 - 1\uFF0C\u5728\u63D2\u503C\u5668\u63D2\u503C\u53EF\u4EE5\u83B7\u53D6 0\uFF5E1 \u7EBF\u6027\u6E10\u53D8\u7684\u503C
|
|
styleMappingMat[2][3] = a_Position.z;
|
|
|
|
vec3 offset = size; // \u63A7\u5236\u5706\u67F1\u4F53\u7684\u5927\u5C0F - \u4ECE\u6807\u51C6\u5355\u4F4D\u5706\u67F1\u4F53\u8FDB\u884C\u504F\u79FB
|
|
if(u_heightfixed < 1.0) { // \u5706\u67F1\u4F53\u4E0D\u56FA\u5B9A\u9AD8\u5EA6
|
|
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {
|
|
// P20 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF1
|
|
offset = offset * pow(2.0, (19.0 - u_Zoom));
|
|
}
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {
|
|
// P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3
|
|
offset = offset * pow(2.0, (19.0 - 3.0 - u_Zoom));
|
|
}
|
|
} else {// \u5706\u67F1\u4F53\u56FA\u5B9A\u9AD8\u5EA6 \uFF08 \u5904\u7406 mapbox \uFF09
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
offset *= 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
}
|
|
}
|
|
|
|
|
|
vec4 project_pos = project_position(vec4(a_Pos.xy, 0., 1.0));
|
|
|
|
// u_r \u63A7\u5236\u5706\u67F1\u7684\u751F\u957F
|
|
vec4 pos = vec4(project_pos.xy + offset.xy, offset.z * u_r, 1.0);
|
|
|
|
// \u5706\u67F1\u5149\u7167\u6548\u679C
|
|
float lightWeight = 1.0;
|
|
if(u_lightEnable > 0.0) { // \u53D6\u6D88\u4E09\u5143\u8868\u8FBE\u5F0F\uFF0C\u589E\u5F3A\u5065\u58EE\u6027
|
|
lightWeight = calc_lighting(pos);
|
|
}
|
|
styleMappingMat[1][3] = lightWeight;
|
|
|
|
v_color =vec4(a_Color.rgb * lightWeight, a_Color.w);
|
|
|
|
|
|
// \u5728\u5730\u7403\u6A21\u5F0F\u4E0B\uFF0C\u5C06\u539F\u672C\u5782\u76F4\u4E8E xy \u5E73\u9762\u7684\u5706\u67F1\u8C03\u6574\u59FF\u6001\u5230\u9002\u5E94\u5706\u7684\u89D2\u5EA6
|
|
//\u65CB\u8F6C\u77E9\u9635mx\uFF0C\u521B\u5EFA\u7ED5x\u8F74\u65CB\u8F6C\u77E9\u9635
|
|
float r = sqrt(a_Pos.z*a_Pos.z + a_Pos.x*a_Pos.x);
|
|
float xRadian = getXRadian(a_Pos.y, r);
|
|
float xcos = cos(xRadian);//\u6C42\u89E3\u65CB\u8F6C\u89D2\u5EA6\u4F59\u5F26\u503C
|
|
float xsin = sin(xRadian);//\u6C42\u89E3\u65CB\u8F6C\u89D2\u5EA6\u6B63\u5F26\u503C
|
|
mat4 mx = mat4(
|
|
1,0,0,0,
|
|
0,xcos,-xsin,0,
|
|
0,xsin,xcos,0,
|
|
0,0,0,1);
|
|
|
|
//\u65CB\u8F6C\u77E9\u9635my\uFF0C\u521B\u5EFA\u7ED5y\u8F74\u65CB\u8F6C\u77E9\u9635
|
|
float yRadian = getYRadian(a_Pos.x, a_Pos.z);
|
|
float ycos = cos(yRadian);//\u6C42\u89E3\u65CB\u8F6C\u89D2\u5EA6\u4F59\u5F26\u503C
|
|
float ysin = sin(yRadian);//\u6C42\u89E3\u65CB\u8F6C\u89D2\u5EA6\u6B63\u5F26\u503C
|
|
mat4 my = mat4(
|
|
ycos,0,-ysin,0,
|
|
0,1,0,0,
|
|
ysin,0,ycos,0,
|
|
0,0,0,1);
|
|
|
|
gl_Position = u_ViewProjectionMatrix * vec4(( my * mx * vec4(a_Position * a_Size, 1.0)).xyz + a_Pos, 1.0);
|
|
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,lS=function(n){(0,zt.Z)(a,n);var l=sS(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"raiseCount",0),(0,W.Z)((0,ut.Z)(s),"raiseRepeat",0),s}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.animateOption,v=h===void 0?{enable:!1,speed:.01,repeat:!1}:h,m=u.opacity,w=m===void 0?1:m,A=u.sourceColor,R=u.targetColor,B=u.pickLight,G=B===void 0?!1:B,j=u.heightfixed,lt=j===void 0?!1:j,ct=u.opacityLinear,_t=ct===void 0?{enable:!1,dir:"up"}:ct,Vt=u.lightEnable,ce=Vt===void 0?!0:Vt;if(this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:w})){this.judgeStyleAttributes({opacity:w});var ae=this.layer.getEncodedData(),ze=this.calDataFrame(this.cellLength,ae,this.cellProperties),$e=ze.data,xr=ze.width,Or=ze.height;this.rowCount=Or,this.dataTexture=this.cellLength>0&&$e.length>0?this.createTexture2D({flipY:!0,data:$e,format:ne.LUMINANCE,type:ne.FLOAT,width:xr,height:Or}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}var Zr=0,Wr=[0,0,0,0],wn=[0,0,0,0];if(A&&R&&(Wr=Lo(A),wn=Lo(R),Zr=1),this.raiseCount<1&&this.raiseRepeat>0&&v.enable){var vn=v.speed,Kn=vn===void 0?.01:vn;this.raiseCount+=Kn,this.raiseCount>=1&&(this.raiseRepeat>1?(this.raiseCount=0,this.raiseRepeat--):this.raiseCount=1)}return{u_pickLight:Number(G),u_heightfixed:Number(lt),u_r:v.enable&&this.raiseRepeat>0?this.raiseCount:1,u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_opacity:(0,Fn.isNumber)(w)?w:1,u_linearColor:Zr,u_sourceColor:Wr,u_targetColor:wn,u_opacitylinear:Number(_t.enable),u_opacitylinear_dir:_t.dir==="up"?1:0,u_lightEnable:Number(ce)}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.buildModels();case 2:return m.abrupt("return",m.sent);case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A;return ot().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return v=this.layer.getLayerConfig(),m=v.animateOption.repeat,w=m===void 0?1:m,this.raiseRepeat=w,B.next=4,this.layer.buildLayerModel({moduleName:"pointEarthExtrude",vertexShader:uS,fragmentShader:PI,triangulation:to,depth:{enable:!0},cull:{enable:!0,face:hh(this.mapService.version)},blend:this.getBlend()});case 4:return A=B.sent,B.abrupt("return",[A]);case 6:case"end":return B.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u;(u=this.dataTexture)===null||u===void 0||u.destroy()}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(h){var v=h.size;if(v){var m=[];return Array.isArray(v)&&(m=v.length===2?[v[0],v[0],v[1]]:v),Array.isArray(v)||(m=[v,v,v]),m}else return[2,2,2]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:ea.Attribute,descriptor:{name:"a_Normal",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(h,v,m,w,A){return A}}}),this.styleAttributeService.registerStyleAttribute({name:"pos",type:ea.Attribute,descriptor:{name:"a_Pos",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(h){var v=Ir(h.coordinates);return qo([v[0],v[1]])}}})}}]),a}($o);function OI(n){var l=FI();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function FI(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var cS=`uniform float u_additive;
|
|
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
|
|
varying vec4 v_data;
|
|
varying vec4 v_color;
|
|
varying float v_radius;
|
|
|
|
#pragma include "sdf_2d"
|
|
#pragma include "picking"
|
|
|
|
|
|
void main() {
|
|
int shape = int(floor(v_data.w + 0.5));
|
|
|
|
vec4 textrueStroke = vec4(
|
|
styleMappingMat[1][0],
|
|
styleMappingMat[1][1],
|
|
styleMappingMat[1][2],
|
|
styleMappingMat[1][3]
|
|
);
|
|
|
|
float opacity = styleMappingMat[0][0];
|
|
float stroke_opacity = styleMappingMat[0][1];
|
|
float strokeWidth = styleMappingMat[0][2];
|
|
vec4 strokeColor = textrueStroke == vec4(0) ? v_color : textrueStroke;
|
|
|
|
lowp float antialiasblur = v_data.z;
|
|
float r = v_radius / (v_radius + strokeWidth);
|
|
|
|
float outer_df;
|
|
float inner_df;
|
|
// 'circle', 'triangle', 'square', 'pentagon', 'hexagon', 'octogon', 'hexagram', 'rhombus', 'vesica'
|
|
if (shape == 0) {
|
|
outer_df = sdCircle(v_data.xy, 1.0);
|
|
inner_df = sdCircle(v_data.xy, r);
|
|
} else if (shape == 1) {
|
|
outer_df = sdEquilateralTriangle(1.1 * v_data.xy);
|
|
inner_df = sdEquilateralTriangle(1.1 / r * v_data.xy);
|
|
} else if (shape == 2) {
|
|
outer_df = sdBox(v_data.xy, vec2(1.));
|
|
inner_df = sdBox(v_data.xy, vec2(r));
|
|
} else if (shape == 3) {
|
|
outer_df = sdPentagon(v_data.xy, 0.8);
|
|
inner_df = sdPentagon(v_data.xy, r * 0.8);
|
|
} else if (shape == 4) {
|
|
outer_df = sdHexagon(v_data.xy, 0.8);
|
|
inner_df = sdHexagon(v_data.xy, r * 0.8);
|
|
} else if (shape == 5) {
|
|
outer_df = sdOctogon(v_data.xy, 1.0);
|
|
inner_df = sdOctogon(v_data.xy, r);
|
|
} else if (shape == 6) {
|
|
outer_df = sdHexagram(v_data.xy, 0.52);
|
|
inner_df = sdHexagram(v_data.xy, r * 0.52);
|
|
} else if (shape == 7) {
|
|
outer_df = sdRhombus(v_data.xy, vec2(1.0));
|
|
inner_df = sdRhombus(v_data.xy, vec2(r));
|
|
} else if (shape == 8) {
|
|
outer_df = sdVesica(v_data.xy, 1.1, 0.8);
|
|
inner_df = sdVesica(v_data.xy, r * 1.1, r * 0.8);
|
|
}
|
|
|
|
if(outer_df > antialiasblur + 0.018) discard;
|
|
|
|
float opacity_t = smoothstep(0.0, antialiasblur, outer_df);
|
|
|
|
float color_t = strokeWidth < 0.01 ? 0.0 : smoothstep(
|
|
antialiasblur,
|
|
0.0,
|
|
inner_df
|
|
);
|
|
|
|
if(strokeWidth < 0.01) {
|
|
gl_FragColor = vec4(v_color.rgb, v_color.a * opacity);
|
|
} else {
|
|
gl_FragColor = mix(vec4(v_color.rgb, v_color.a * opacity), strokeColor * stroke_opacity, color_t);
|
|
}
|
|
|
|
if(u_additive > 0.0) {
|
|
gl_FragColor *= opacity_t;
|
|
gl_FragColor = filterColorAlpha(gl_FragColor, gl_FragColor.a);
|
|
} else {
|
|
gl_FragColor.a *= opacity_t;
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
}
|
|
`,fS=`attribute vec4 a_Color;
|
|
attribute vec3 a_Position;
|
|
attribute vec3 a_Extrude;
|
|
attribute float a_Size;
|
|
attribute float a_Shape;
|
|
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
|
|
varying vec4 v_data;
|
|
varying vec4 v_color;
|
|
varying float v_radius;
|
|
|
|
uniform float u_opacity : 1;
|
|
uniform float u_stroke_opacity : 1;
|
|
uniform float u_stroke_width : 2;
|
|
uniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];
|
|
uniform vec2 u_offsets;
|
|
|
|
uniform float u_blur : 0.0;
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
#pragma include "styleMappingCalStrokeOpacity"
|
|
#pragma include "styleMappingCalStrokeWidth"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "picking"
|
|
|
|
|
|
void main() {
|
|
vec3 extrude = a_Extrude;
|
|
float shape_type = a_Shape;
|
|
/*
|
|
* setPickingSize \u8BBE\u7F6E\u62FE\u53D6\u5927\u5C0F
|
|
*/
|
|
float newSize = setPickingSize(a_Size);
|
|
// float newSize = setPickingSize(a_Size) * 0.00001038445708445579;
|
|
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
|
|
vec2 strokeOpacityAndOffset = calStrokeOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][1] = strokeOpacityAndOffset.r;
|
|
textureOffset = strokeOpacityAndOffset.g;
|
|
|
|
vec2 strokeWidthAndOffset = calStrokeWidthAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][2] = strokeWidthAndOffset.r;
|
|
textureOffset = strokeWidthAndOffset.g;
|
|
|
|
vec4 textrueStroke = vec4(-1.0, -1.0, -1.0, -1.0);
|
|
if(hasStroke()) {
|
|
vec2 valueRPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
styleMappingMat[1][0] = pos2value(valueRPos, columnWidth, rowHeight); // R
|
|
textureOffset += 1.0;
|
|
|
|
vec2 valueGPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
styleMappingMat[1][1] = pos2value(valueGPos, columnWidth, rowHeight); // G
|
|
textureOffset += 1.0;
|
|
|
|
vec2 valueBPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
styleMappingMat[1][2] = pos2value(valueBPos, columnWidth, rowHeight); // B
|
|
textureOffset += 1.0;
|
|
|
|
vec2 valueAPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
styleMappingMat[1][3] = pos2value(valueAPos, columnWidth, rowHeight); // A
|
|
textureOffset += 1.0;
|
|
} else {
|
|
if(u_stroke_color == vec4(0.0)) {
|
|
styleMappingMat[1][0] = v_color.r;
|
|
styleMappingMat[1][1] = v_color.g;
|
|
styleMappingMat[1][2] = v_color.b;
|
|
styleMappingMat[1][3] = v_color.a;
|
|
} else {
|
|
styleMappingMat[1][0] = u_stroke_color.r;
|
|
styleMappingMat[1][1] = u_stroke_color.g;
|
|
styleMappingMat[1][2] = u_stroke_color.b;
|
|
styleMappingMat[1][3] = u_stroke_color.a;
|
|
}
|
|
}
|
|
|
|
// cal style mapping
|
|
|
|
// unpack color(vec2)
|
|
v_color = a_Color;
|
|
|
|
// radius(16-bit)
|
|
v_radius = newSize;
|
|
|
|
// anti-alias
|
|
// float antialiased_blur = -max(u_blur, antialiasblur);
|
|
float antialiasblur = -max(2.0 / u_DevicePixelRatio / newSize, u_blur);
|
|
|
|
// TODP: /abs(extrude.x) \u662F\u4E3A\u4E86\u517C\u5BB9\u5730\u7403\u6A21\u5F0F
|
|
v_data = vec4(extrude.x/abs(extrude.x), extrude.y/abs(extrude.y), antialiasblur,shape_type);
|
|
|
|
|
|
gl_Position = u_ViewProjectionMatrix * vec4(a_Position + extrude * newSize * 0.1, 1.0);
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,RI=function(n){(0,zt.Z)(a,n);var l=OI(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.strokeOpacity,w=m===void 0?1:m,A=u.strokeWidth,R=A===void 0?0:A,B=u.stroke,G=B===void 0?"rgba(0,0,0,0)":B,j=u.offsets,lt=j===void 0?[0,0]:j,ct=u.blend,_t=u.blur,Vt=_t===void 0?0:_t;if(this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:v,strokeOpacity:w,strokeWidth:R,stroke:G,offsets:lt})){this.judgeStyleAttributes({opacity:v,strokeOpacity:w,strokeWidth:R,stroke:G,offsets:lt});var ce=this.layer.getEncodedData(),ae=this.calDataFrame(this.cellLength,ce,this.cellProperties),ze=ae.data,$e=ae.width,xr=ae.height;this.rowCount=xr,this.dataTexture=this.cellLength>0&&ze.length>0?this.createTexture2D({flipY:!0,data:ze,format:ne.LUMINANCE,type:ne.FLOAT,width:$e,height:xr}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}return{u_blur:Vt,u_additive:ct==="additive"?1:0,u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_opacity:(0,Fn.isNumber)(v)?v:1,u_stroke_opacity:(0,Fn.isNumber)(w)?w:1,u_stroke_width:(0,Fn.isNumber)(R)?R:1,u_stroke_color:this.getStrokeColor(G),u_offsets:this.isOffsetStatic(lt)?lt:[0,0]}}},{key:"getAnimateUniforms",value:function(){var u=this.layer.getLayerConfig(),h=u.animateOption,v=h===void 0?{enable:!1}:h;return{u_animate:this.animateOption2Array(v),u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.buildModels();case 2:return m.abrupt("return",m.sent);case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return this.layer.triangulation=Ax,w.next=3,this.layer.buildLayerModel({moduleName:"pointEarthFill",vertexShader:fS,fragmentShader:cS,triangulation:Ax,depth:{enable:!0},blend:this.getBlend()});case 3:return v=w.sent,w.abrupt("return",[v]);case 5:case"end":return w.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u;(u=this.dataTexture)===null||u===void 0||u.destroy()}},{key:"animateOption2Array",value:function(u){return[u.enable?0:1,u.speed||1,u.rings||3,0]}},{key:"registerBuiltinAttributes",value:function(){var u=this;this.styleAttributeService.registerStyleAttribute({name:"extrude",type:ea.Attribute,descriptor:{name:"a_Extrude",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(v,m,w,A){var R=(0,yt.Z)(w,3),B=R[0],G=R[1],j=R[2],lt=Io.fromValues(0,0,1),ct=Io.fromValues(B,0,j),_t=B>=0?Io.angle(lt,ct):Math.PI*2-Io.angle(lt,ct),Vt=Math.PI*2-Math.asin(G/100),ce=qr();Fi(ce,ce,_t),zi(ce,ce,Vt);var ae=Io.fromValues(1,1,0);Io.transformMat4(ae,ae,ce),Io.normalize(ae,ae);var ze=Io.fromValues(-1,1,0);Io.transformMat4(ze,ze,ce),Io.normalize(ze,ze);var $e=Io.fromValues(-1,-1,0);Io.transformMat4($e,$e,ce),Io.normalize($e,$e);var xr=Io.fromValues(1,-1,0);Io.transformMat4(xr,xr,ce),Io.normalize(xr,xr);var Or=[].concat((0,Oi.Z)(ae),(0,Oi.Z)(ze),(0,Oi.Z)($e),(0,Oi.Z)(xr)),Zr=A%4*3;return[Or[Zr],Or[Zr+1],Or[Zr+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v){var m=v.size,w=m===void 0?5:m;return Array.isArray(w)?[w[0]]:[w]}}}),this.styleAttributeService.registerStyleAttribute({name:"shape",type:ea.Attribute,descriptor:{name:"a_Shape",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v){var m=v.shape,w=m===void 0?2:m,A=u.layer.getLayerConfig().shape2d,R=A.indexOf(w);return[R]}}})}}]),a}($o);function DI(n){var l=hS();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function hS(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var BI=`varying vec4 v_color;
|
|
uniform float u_opacity: 1.0;
|
|
|
|
uniform float u_pickLight: 0.0;
|
|
|
|
#pragma include "picking"
|
|
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
|
|
uniform float u_linearColor: 0;
|
|
uniform vec4 u_sourceColor;
|
|
uniform vec4 u_targetColor;
|
|
|
|
uniform float u_opacitylinear: 0.0;
|
|
uniform float u_opacitylinear_dir: 1.0;
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float lightWeight = styleMappingMat[1][3];
|
|
float barLinearZ = styleMappingMat[2][3];
|
|
|
|
// \u8BBE\u7F6E\u5706\u67F1\u7684\u5E95\u8272
|
|
if(u_linearColor == 1.0) { // \u4F7F\u7528\u6E10\u53D8\u989C\u8272
|
|
gl_FragColor = mix(u_sourceColor, u_targetColor, barLinearZ);
|
|
gl_FragColor.rgb *= lightWeight;
|
|
} else { // \u4F7F\u7528 color \u65B9\u6CD5\u4F20\u5165\u7684\u989C\u8272
|
|
gl_FragColor = v_color;
|
|
}
|
|
|
|
// \u5E94\u7528\u900F\u660E\u5EA6
|
|
gl_FragColor.a *= opacity;
|
|
|
|
// \u5F00\u542F\u900F\u660E\u5EA6\u6E10\u53D8
|
|
if(u_opacitylinear > 0.0) {
|
|
gl_FragColor.a *= u_opacitylinear_dir > 0.0 ? (1.0 - barLinearZ): barLinearZ;
|
|
}
|
|
|
|
// picking
|
|
if(u_pickLight > 0.0) {
|
|
gl_FragColor = filterColorAlpha(gl_FragColor, lightWeight);
|
|
} else {
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
}
|
|
`,NI=`precision highp float;
|
|
|
|
#define pi 3.1415926535
|
|
#define ambientRatio 0.5
|
|
#define diffuseRatio 0.3
|
|
#define specularRatio 0.2
|
|
|
|
attribute vec3 a_Position;
|
|
attribute vec3 a_Pos;
|
|
attribute vec4 a_Color;
|
|
attribute vec3 a_Size;
|
|
attribute vec3 a_Normal;
|
|
|
|
uniform float u_heightfixed: 0.0; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A
|
|
uniform float u_r;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
varying vec4 v_color;
|
|
|
|
uniform float u_opacity : 1;
|
|
uniform float u_lightEnable: 1;
|
|
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "light"
|
|
#pragma include "picking"
|
|
|
|
float getYRadian(float x, float z) {
|
|
if(x > 0.0 && z > 0.0) {
|
|
return atan(x/z);
|
|
} else if(x > 0.0 && z <= 0.0){
|
|
return atan(-z/x) + pi/2.0;
|
|
} else if(x <= 0.0 && z <= 0.0) {
|
|
return pi + atan(x/z); //atan(x/z) +
|
|
} else {
|
|
return atan(z/-x) + pi*3.0/2.0;
|
|
}
|
|
}
|
|
|
|
float getXRadian(float y, float r) {
|
|
return atan(y/r);
|
|
}
|
|
|
|
void main() {
|
|
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA - lightWeight
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1] - linearZ(\u5782\u76F4\u65B9\u5411 0 - 1 \u7684\u503C)
|
|
0.0, 0.0, 0.0, 0.0
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
vec3 size = a_Size * a_Position;
|
|
|
|
// a_Position.z \u662F\u5728\u6784\u5EFA\u7F51\u683C\u7684\u65F6\u5019\u4F20\u5165\u7684\u6807\u51C6\u503C 0 - 1\uFF0C\u5728\u63D2\u503C\u5668\u63D2\u503C\u53EF\u4EE5\u83B7\u53D6 0\uFF5E1 \u7EBF\u6027\u6E10\u53D8\u7684\u503C
|
|
styleMappingMat[2][3] = a_Position.z;
|
|
|
|
vec3 offset = size; // \u63A7\u5236\u5706\u67F1\u4F53\u7684\u5927\u5C0F - \u4ECE\u6807\u51C6\u5355\u4F4D\u5706\u67F1\u4F53\u8FDB\u884C\u504F\u79FB
|
|
if(u_heightfixed < 1.0) { // \u5706\u67F1\u4F53\u4E0D\u56FA\u5B9A\u9AD8\u5EA6
|
|
|
|
if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {
|
|
// P20 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF1
|
|
offset = offset * pow(2.0, (19.0 - u_Zoom));
|
|
}
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {
|
|
// P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3
|
|
offset = offset * pow(2.0, (19.0 - 3.0 - u_Zoom));
|
|
}
|
|
} else {// \u5706\u67F1\u4F53\u56FA\u5B9A\u9AD8\u5EA6 \uFF08 \u5904\u7406 mapbox \uFF09
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
offset *= 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
}
|
|
}
|
|
|
|
|
|
vec4 project_pos = project_position(vec4(a_Pos.xy, 0., 1.0));
|
|
|
|
// u_r \u63A7\u5236\u5706\u67F1\u7684\u751F\u957F
|
|
vec4 pos = vec4(project_pos.xy + offset.xy, offset.z * u_r, 1.0);
|
|
|
|
// \u5706\u67F1\u5149\u7167\u6548\u679C
|
|
float lightWeight = 1.0;
|
|
if(u_lightEnable > 0.0) { // \u53D6\u6D88\u4E09\u5143\u8868\u8FBE\u5F0F\uFF0C\u589E\u5F3A\u5065\u58EE\u6027
|
|
lightWeight = calc_lighting(pos);
|
|
}
|
|
styleMappingMat[1][3] = lightWeight;
|
|
|
|
v_color =vec4(a_Color.rgb * lightWeight, a_Color.w);
|
|
|
|
// gl_Position = project_common_position_to_clipspace(pos);
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * pos;
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(pos);
|
|
}
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,Fx=function(n){(0,zt.Z)(a,n);var l=DI(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"raiseCount",0),(0,W.Z)((0,ut.Z)(s),"raiseRepeat",0),s}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.animateOption,v=h===void 0?{enable:!1,speed:.01,repeat:!1}:h,m=u.opacity,w=m===void 0?1:m,A=u.sourceColor,R=u.targetColor,B=u.pickLight,G=B===void 0?!1:B,j=u.heightfixed,lt=j===void 0?!1:j,ct=u.opacityLinear,_t=ct===void 0?{enable:!1,dir:"up"}:ct,Vt=u.lightEnable,ce=Vt===void 0?!0:Vt;if(this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:w})){this.judgeStyleAttributes({opacity:w});var ae=this.layer.getEncodedData(),ze=this.calDataFrame(this.cellLength,ae,this.cellProperties),$e=ze.data,xr=ze.width,Or=ze.height;this.rowCount=Or,this.dataTexture=this.cellLength>0&&$e.length>0?this.createTexture2D({flipY:!0,data:$e,format:ne.LUMINANCE,type:ne.FLOAT,width:xr,height:Or}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}var Zr=0,Wr=[0,0,0,0],wn=[0,0,0,0];if(A&&R&&(Wr=Lo(A),wn=Lo(R),Zr=1),this.raiseCount<1&&this.raiseRepeat>0&&v.enable){var vn=v.speed,Kn=vn===void 0?.01:vn;this.raiseCount+=Kn,this.raiseCount>=1&&(this.raiseRepeat>1?(this.raiseCount=0,this.raiseRepeat--):this.raiseCount=1)}return{u_pickLight:Number(G),u_heightfixed:Number(lt),u_r:v.enable&&this.raiseRepeat>0?this.raiseCount:1,u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_opacity:(0,Fn.isNumber)(w)?w:1,u_linearColor:Zr,u_sourceColor:Wr,u_targetColor:wn,u_opacitylinear:Number(_t.enable),u_opacitylinear_dir:_t.dir==="up"?1:0,u_lightEnable:Number(ce)}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.buildModels();case 2:return m.abrupt("return",m.sent);case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B;return ot().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return v=this.layer.getLayerConfig(),m=v.depth,w=m===void 0?!0:m,A=v.animateOption.repeat,R=A===void 0?1:A,this.raiseRepeat=R,j.next=4,this.layer.buildLayerModel({moduleName:"pointExtrude",vertexShader:NI,fragmentShader:BI,triangulation:to,blend:this.getBlend(),cull:{enable:!0,face:hh(this.mapService.version)},depth:{enable:w}});case 4:return B=j.sent,j.abrupt("return",[B]);case 6:case"end":return j.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u;(u=this.dataTexture)===null||u===void 0||u.destroy()}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(h){var v=h.size;if(v){var m=[];return Array.isArray(v)&&(m=v.length===2?[v[0],v[0],v[1]]:v),Array.isArray(v)||(m=[v,v,v]),m}else return[2,2,2]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:ea.Attribute,descriptor:{name:"a_Normal",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(h,v,m,w,A){return A}}}),this.styleAttributeService.registerStyleAttribute({name:"pos",type:ea.Attribute,descriptor:{name:"a_Pos",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(h){var v=Ir(h.coordinates);return[v[0],v[1],0]}}})}}]),a}($o);function zI(n){var l=pS();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function pS(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var dS=`
|
|
uniform float u_additive;
|
|
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
|
|
varying vec4 v_data;
|
|
varying vec4 v_color;
|
|
varying float v_radius;
|
|
uniform float u_time;
|
|
uniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];
|
|
|
|
#pragma include "sdf_2d"
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
|
|
vec4 textrueStroke = vec4(
|
|
styleMappingMat[1][0],
|
|
styleMappingMat[1][1],
|
|
styleMappingMat[1][2],
|
|
styleMappingMat[1][3]
|
|
);
|
|
|
|
float opacity = styleMappingMat[0][0];
|
|
|
|
lowp float antialiasblur = v_data.z;
|
|
float r = v_radius / (v_radius);
|
|
|
|
float outer_df;
|
|
float inner_df;
|
|
// 'circle', 'triangle', 'square', 'pentagon', 'hexagon', 'octogon', 'hexagram', 'rhombus', 'vesica'
|
|
|
|
outer_df = sdCircle(v_data.xy, 1.0);
|
|
inner_df = sdCircle(v_data.xy, r);
|
|
|
|
|
|
float opacity_t = smoothstep(0.0, antialiasblur, outer_df);
|
|
|
|
float color_t = smoothstep(
|
|
antialiasblur,
|
|
0.0,
|
|
inner_df
|
|
);
|
|
float PI = 3.14159;
|
|
float N_RINGS = 3.0;
|
|
float FREQ = 1.0;
|
|
|
|
gl_FragColor = vec4(v_color.rgb, v_color.a * opacity);
|
|
|
|
float d = length(v_data.xy);
|
|
if(d > 0.5) {
|
|
discard;
|
|
}
|
|
float intensity = clamp(cos(d * PI), 0.0, 1.0) * clamp(cos(2.0 * PI * (d * 2.0 * u_animate.z - u_animate.y * u_time)), 0.0, 1.0);
|
|
|
|
// \u6839\u636E\u53E0\u52A0\u6A21\u5F0F\u9009\u62E9\u6548\u679C
|
|
if(u_additive > 0.0) {
|
|
gl_FragColor *= intensity;
|
|
// \u4F18\u5316\u6C34\u6CE2\u70B9 blend additive \u6A21\u5F0F\u4E0B\u6709\u7684\u62FE\u53D6\u6548\u679C
|
|
gl_FragColor = filterColorAlpha(gl_FragColor, gl_FragColor.a);
|
|
} else {
|
|
gl_FragColor = vec4(gl_FragColor.xyz, gl_FragColor.a * intensity);
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
}
|
|
`,vS=`uniform float u_additive;
|
|
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
|
|
varying vec4 v_data;
|
|
varying vec4 v_color;
|
|
varying float v_radius;
|
|
|
|
#pragma include "sdf_2d"
|
|
#pragma include "picking"
|
|
|
|
|
|
void main() {
|
|
int shape = int(floor(v_data.w + 0.5));
|
|
|
|
vec4 textrueStroke = vec4(
|
|
styleMappingMat[1][0],
|
|
styleMappingMat[1][1],
|
|
styleMappingMat[1][2],
|
|
styleMappingMat[1][3]
|
|
);
|
|
|
|
float opacity = styleMappingMat[0][0];
|
|
float stroke_opacity = styleMappingMat[0][1];
|
|
float strokeWidth = styleMappingMat[0][2];
|
|
vec4 strokeColor = textrueStroke == vec4(0) ? v_color : textrueStroke;
|
|
|
|
lowp float antialiasblur = v_data.z;
|
|
float r = v_radius / (v_radius + strokeWidth);
|
|
|
|
float outer_df;
|
|
float inner_df;
|
|
// 'circle', 'triangle', 'square', 'pentagon', 'hexagon', 'octogon', 'hexagram', 'rhombus', 'vesica'
|
|
if (shape == 0) {
|
|
outer_df = sdCircle(v_data.xy, 1.0);
|
|
inner_df = sdCircle(v_data.xy, r);
|
|
} else if (shape == 1) {
|
|
outer_df = sdEquilateralTriangle(1.1 * v_data.xy);
|
|
inner_df = sdEquilateralTriangle(1.1 / r * v_data.xy);
|
|
} else if (shape == 2) {
|
|
outer_df = sdBox(v_data.xy, vec2(1.));
|
|
inner_df = sdBox(v_data.xy, vec2(r));
|
|
} else if (shape == 3) {
|
|
outer_df = sdPentagon(v_data.xy, 0.8);
|
|
inner_df = sdPentagon(v_data.xy, r * 0.8);
|
|
} else if (shape == 4) {
|
|
outer_df = sdHexagon(v_data.xy, 0.8);
|
|
inner_df = sdHexagon(v_data.xy, r * 0.8);
|
|
} else if (shape == 5) {
|
|
outer_df = sdOctogon(v_data.xy, 1.0);
|
|
inner_df = sdOctogon(v_data.xy, r);
|
|
} else if (shape == 6) {
|
|
outer_df = sdHexagram(v_data.xy, 0.52);
|
|
inner_df = sdHexagram(v_data.xy, r * 0.52);
|
|
} else if (shape == 7) {
|
|
outer_df = sdRhombus(v_data.xy, vec2(1.0));
|
|
inner_df = sdRhombus(v_data.xy, vec2(r));
|
|
} else if (shape == 8) {
|
|
outer_df = sdVesica(v_data.xy, 1.1, 0.8);
|
|
inner_df = sdVesica(v_data.xy, r * 1.1, r * 0.8);
|
|
}
|
|
|
|
float opacity_t = smoothstep(0.0, antialiasblur, outer_df);
|
|
|
|
float color_t = strokeWidth < 0.01 ? 0.0 : smoothstep(
|
|
antialiasblur,
|
|
0.0,
|
|
inner_df
|
|
);
|
|
|
|
if(strokeWidth < 0.01) {
|
|
gl_FragColor = vec4(v_color.rgb, v_color.a * opacity);
|
|
} else {
|
|
gl_FragColor = mix(vec4(v_color.rgb, v_color.a * opacity), strokeColor * stroke_opacity, color_t);
|
|
}
|
|
|
|
if(u_additive > 0.0) {
|
|
gl_FragColor *= opacity_t;
|
|
gl_FragColor = filterColorAlpha(gl_FragColor, gl_FragColor.a);
|
|
} else {
|
|
gl_FragColor.a *= opacity_t;
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
}
|
|
`,mg=`attribute vec4 a_Color;
|
|
attribute vec3 a_Position;
|
|
attribute vec3 a_Extrude;
|
|
attribute float a_Size;
|
|
attribute float a_Shape;
|
|
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform int u_Size_Unit;
|
|
|
|
varying vec4 v_data;
|
|
varying vec4 v_color;
|
|
varying float v_radius;
|
|
|
|
uniform float u_opacity : 1;
|
|
uniform float u_stroke_opacity : 1;
|
|
uniform float u_stroke_width : 2;
|
|
uniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];
|
|
uniform vec2 u_offsets;
|
|
|
|
uniform float u_blur : 0.0;
|
|
uniform float u_raisingHeight: 0.0;
|
|
uniform float u_heightfixed: 0.0;
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
#pragma include "styleMappingCalStrokeOpacity"
|
|
#pragma include "styleMappingCalStrokeWidth"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "picking"
|
|
|
|
|
|
void main() {
|
|
vec3 extrude = a_Extrude;
|
|
float shape_type = a_Shape;
|
|
/*
|
|
* setPickingSize \u8BBE\u7F6E\u62FE\u53D6\u5927\u5C0F
|
|
* u_meter2coord \u5728\u7B49\u9762\u79EF\u5927\u5C0F\u7684\u65F6\u5019\u8BBE\u7F6E\u5355\u4F4D
|
|
*/
|
|
float newSize = setPickingSize(a_Size);
|
|
// float newSize = setPickingSize(a_Size) * 0.00001038445708445579;
|
|
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
|
|
vec2 strokeOpacityAndOffset = calStrokeOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][1] = strokeOpacityAndOffset.r;
|
|
textureOffset = strokeOpacityAndOffset.g;
|
|
|
|
vec2 strokeWidthAndOffset = calStrokeWidthAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][2] = strokeWidthAndOffset.r;
|
|
textureOffset = strokeWidthAndOffset.g;
|
|
|
|
vec4 textrueStroke = vec4(-1.0, -1.0, -1.0, -1.0);
|
|
if(hasStroke()) {
|
|
vec2 valueRPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
styleMappingMat[1][0] = pos2value(valueRPos, columnWidth, rowHeight); // R
|
|
textureOffset += 1.0;
|
|
|
|
vec2 valueGPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
styleMappingMat[1][1] = pos2value(valueGPos, columnWidth, rowHeight); // G
|
|
textureOffset += 1.0;
|
|
|
|
vec2 valueBPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
styleMappingMat[1][2] = pos2value(valueBPos, columnWidth, rowHeight); // B
|
|
textureOffset += 1.0;
|
|
|
|
vec2 valueAPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
styleMappingMat[1][3] = pos2value(valueAPos, columnWidth, rowHeight); // A
|
|
textureOffset += 1.0;
|
|
} else {
|
|
if(u_stroke_color == vec4(0.0)) {
|
|
styleMappingMat[1][0] = v_color.r;
|
|
styleMappingMat[1][1] = v_color.g;
|
|
styleMappingMat[1][2] = v_color.b;
|
|
styleMappingMat[1][3] = v_color.a;
|
|
} else {
|
|
styleMappingMat[1][0] = u_stroke_color.r;
|
|
styleMappingMat[1][1] = u_stroke_color.g;
|
|
styleMappingMat[1][2] = u_stroke_color.b;
|
|
styleMappingMat[1][3] = u_stroke_color.a;
|
|
}
|
|
}
|
|
|
|
vec2 textrueOffsets = vec2(0.0, 0.0);
|
|
if(hasOffsets()) {
|
|
vec2 valueXPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
textrueOffsets.r = pos2value(valueXPos, columnWidth, rowHeight); // x
|
|
textureOffset += 1.0;
|
|
|
|
vec2 valueYPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
textrueOffsets.g = pos2value(valueYPos, columnWidth, rowHeight); // x
|
|
textureOffset += 1.0;
|
|
} else {
|
|
textrueOffsets = u_offsets;
|
|
}
|
|
|
|
// cal style mapping
|
|
|
|
// unpack color(vec2)
|
|
v_color = a_Color;
|
|
if(u_Size_Unit == 1) {
|
|
newSize = newSize * u_PixelsPerMeter.z;
|
|
}
|
|
|
|
v_radius = newSize;
|
|
|
|
// anti-alias
|
|
// float antialiased_blur = -max(u_blur, antialiasblur);
|
|
float antialiasblur = -max(2.0 / u_DevicePixelRatio / newSize, u_blur);
|
|
|
|
vec2 offset = (extrude.xy * (newSize + u_stroke_width) + textrueOffsets);
|
|
vec3 aPosition = a_Position;
|
|
|
|
offset = project_pixel(offset);
|
|
|
|
// TODP: /abs(extrude.x) \u662F\u4E3A\u4E86\u517C\u5BB9\u5730\u7403\u6A21\u5F0F
|
|
v_data = vec4(extrude.x/abs(extrude.x), extrude.y/abs(extrude.y), antialiasblur,shape_type);
|
|
|
|
|
|
// vec4 project_pos = project_position(vec4(a_Position.xy, 0.0, 1.0));
|
|
vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0));
|
|
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0));
|
|
|
|
float raisingHeight = u_raisingHeight;
|
|
|
|
if(u_heightfixed < 1.0) { // false
|
|
raisingHeight = project_pixel(u_raisingHeight);
|
|
} else {
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
raisingHeight = u_raisingHeight * mapboxZoomScale;
|
|
}
|
|
}
|
|
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * vec4(project_pos.xy + offset, raisingHeight, 1.0);
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));
|
|
}
|
|
|
|
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0));
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,yg=function(n){(0,zt.Z)(a,n);var l=zI(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.strokeOpacity,w=m===void 0?1:m,A=u.strokeWidth,R=A===void 0?0:A,B=u.stroke,G=B===void 0?"rgba(0,0,0,0)":B,j=u.offsets,lt=j===void 0?[0,0]:j,ct=u.blend,_t=u.blur,Vt=_t===void 0?0:_t,ce=u.raisingHeight,ae=ce===void 0?0:ce,ze=u.heightfixed,$e=ze===void 0?!1:ze,xr=u.unit,Or=xr===void 0?"pixel":xr;if(this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:v,strokeOpacity:w,strokeWidth:R,stroke:G,offsets:lt})){this.judgeStyleAttributes({opacity:v,strokeOpacity:w,strokeWidth:R,stroke:G,offsets:lt});var Zr=this.layer.getEncodedData(),Wr=this.calDataFrame(this.cellLength,Zr,this.cellProperties),wn=Wr.data,vn=Wr.width,Kn=Wr.height;this.rowCount=Kn,this.dataTexture=this.cellLength>0&&wn.length>0?this.createTexture2D({flipY:!0,data:wn,format:ne.LUMINANCE,type:ne.FLOAT,width:vn,height:Kn}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}return{u_raisingHeight:Number(ae),u_heightfixed:Number($e),u_blur:Vt,u_additive:ct==="additive"?1:0,u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_opacity:(0,Fn.isNumber)(v)?v:1,u_stroke_opacity:(0,Fn.isNumber)(w)?w:1,u_stroke_width:(0,Fn.isNumber)(R)?R:1,u_stroke_color:this.getStrokeColor(G),u_Size_Unit:Sm[Or],u_offsets:this.isOffsetStatic(lt)?lt:[0,0]}}},{key:"getAnimateUniforms",value:function(){var u=this.layer.getLayerConfig(),h=u.animateOption,v=h===void 0?{enable:!1}:h;return{u_animate:this.animateOption2Array(v),u_time:this.layer.getLayerAnimateTime()}}},{key:"getAttribute",value:function(){return this.styleAttributeService.createAttributesAndIndices(this.layer.getEncodedData(),dr)}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.abrupt("return",this.buildModels());case 1:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j,lt,ct,_t,Vt,ce,ae,ze,$e;return ot().wrap(function(Or){for(;;)switch(Or.prev=Or.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,B=v.animateOption,G=B===void 0?{enable:!1}:B,j=v.workerEnabled,lt=j===void 0?!1:j,ct=v.enablePicking,_t=v.shape2d,Vt=this.getShaders(G),ce=Vt.frag,ae=Vt.vert,ze=Vt.type,this.layer.triangulation=dr,Or.next=5,this.layer.buildLayerModel({moduleName:ze,vertexShader:ae,fragmentShader:ce,triangulation:dr,depth:{enable:!1},blend:this.getBlend(),stencil:Zo(w,R),workerEnabled:lt,workerOptions:{modelType:ze,enablePicking:ct,shape2d:_t}});case 5:return $e=Or.sent,Or.abrupt("return",[$e]);case 7:case"end":return Or.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getShaders",value:function(u){if(u.enable)switch(u.type){case"wave":return{frag:dS,vert:mg,type:"pointWave"};default:return{frag:dS,vert:mg,type:"pointWave"}}else return{frag:vS,vert:mg,type:"pointFill"}}},{key:"clearModels",value:function(){var u;(u=this.dataTexture)===null||u===void 0||u.destroy()}},{key:"animateOption2Array",value:function(u){return[u.enable?0:1,u.speed||1,u.rings||3,0]}},{key:"registerBuiltinAttributes",value:function(){var u=this.layer.getLayerConfig().shape2d;this.styleAttributeService.registerStyleAttribute({name:"extrude",type:ea.Attribute,descriptor:{name:"a_Extrude",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(v,m,w,A){var R=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],B=A%4*3;return[R[B],R[B+1],R[B+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v){var m=v.size,w=m===void 0?5:m;return Array.isArray(w)?[w[0]]:[w]}}}),this.styleAttributeService.registerStyleAttribute({name:"shape",type:ea.Attribute,descriptor:{name:"a_Shape",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v){var m=v.shape,w=m===void 0?2:m,A=u.indexOf(w);return[A]}}})}}]),a}($o);function UI(n){var l=ZI();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function ZI(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var VI=`uniform sampler2D u_texture;
|
|
uniform vec2 u_textSize;
|
|
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
|
|
#pragma include "sdf_2d"
|
|
#pragma include "picking"
|
|
varying vec2 v_uv; // \u672C\u8EAB\u7684 uv \u5750\u6807
|
|
varying vec2 v_Iconuv;
|
|
|
|
void main() {
|
|
|
|
float opacity = styleMappingMat[0][0];
|
|
|
|
vec2 pos = v_Iconuv / u_textSize + v_uv / u_textSize * 64.;
|
|
gl_FragColor = texture2D(u_texture, pos);
|
|
gl_FragColor.a *= opacity;
|
|
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
`,GI=`attribute vec4 a_Color;
|
|
attribute vec3 a_Position;
|
|
attribute vec3 a_Extrude;
|
|
attribute float a_Size;
|
|
attribute vec2 a_Uv;
|
|
attribute float a_Rotate;
|
|
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform mat2 u_RotateMatrix;
|
|
uniform int u_Size_Unit;
|
|
|
|
varying vec2 v_uv; // \u672C\u8EAB\u7684 uv \u5750\u6807
|
|
varying vec2 v_Iconuv; // icon \u8D34\u56FE\u7684 uv \u5750\u6807
|
|
|
|
uniform float u_raisingHeight: 0.0;
|
|
uniform float u_heightfixed: 0.0;
|
|
uniform float u_opacity : 1;
|
|
uniform vec2 u_offsets;
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
vec3 extrude = a_Extrude;
|
|
|
|
v_uv = (a_Extrude.xy + 1.0)/2.0;
|
|
v_uv.y = 1.0 - v_uv.y;
|
|
v_Iconuv = a_Uv;
|
|
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - empty - empty - empty
|
|
0.0, 0.0, 0.0, 0.0, // empty - empty - empty - empty
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
|
|
vec2 textrueOffsets = vec2(0.0, 0.0);
|
|
if(hasOffsets()) {
|
|
vec2 valueXPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
textrueOffsets.r = pos2value(valueXPos, columnWidth, rowHeight); // x
|
|
textureOffset += 1.0;
|
|
|
|
vec2 valueYPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
textrueOffsets.g = pos2value(valueYPos, columnWidth, rowHeight); // x
|
|
textureOffset += 1.0;
|
|
} else {
|
|
textrueOffsets = u_offsets;
|
|
}
|
|
|
|
// cal style mapping
|
|
|
|
highp float angle_sin = sin(a_Rotate);
|
|
highp float angle_cos = cos(a_Rotate);
|
|
mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);
|
|
float newSize = a_Size;
|
|
if(u_Size_Unit == 1) {
|
|
newSize = newSize * u_PixelsPerMeter.z;
|
|
}
|
|
|
|
// vec2 offset = (u_RotateMatrix * extrude.xy * (a_Size) + textrueOffsets);
|
|
vec2 offset = (rotation_matrix * u_RotateMatrix * extrude.xy * (newSize) + textrueOffsets);
|
|
vec3 aPosition = a_Position;
|
|
|
|
offset = project_pixel(offset);
|
|
|
|
vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0));
|
|
float raisingHeight = u_raisingHeight;
|
|
if(u_heightfixed < 1.0) { // height fixed
|
|
raisingHeight = project_pixel(u_raisingHeight);
|
|
} else {
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
raisingHeight = u_raisingHeight * mapboxZoomScale;
|
|
}
|
|
}
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp *vec4(project_pos.xy + offset, raisingHeight, 1.0);
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));
|
|
}
|
|
|
|
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0));
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,HI=function(n){(0,zt.Z)(a,n);var l=UI(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"meter2coord",1),(0,W.Z)((0,ut.Z)(s),"isMeter",!1),(0,W.Z)((0,ut.Z)(s),"radian",0),(0,W.Z)((0,ut.Z)(s),"updateTexture",function(){var m=s.rendererService.createTexture2D;if(s.texture){s.texture.update({data:s.iconService.getCanvas(),mag:"linear",min:"linear mipmap nearest",mipmap:!0}),s.layerService.throttleRenderLayers();return}s.texture=m({data:s.iconService.getCanvas(),mag:ne.LINEAR,min:ne.LINEAR_MIPMAP_LINEAR,premultiplyAlpha:!1,width:1024,height:s.iconService.canvasHeight||128,mipmap:!0})}),s}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.offsets,w=m===void 0?[0,0]:m,A=u.rotation,R=u.raisingHeight,B=R===void 0?0:R,G=u.heightfixed,j=G===void 0?!1:G,lt=u.unit,ct=lt===void 0?"pixel":lt;this.rendererService.getDirty()&&this.texture.bind();var _t=1;if((this.mapService.version==="GAODE2.x"||this.mapService.version==="GAODE1.x")&&(_t=-1),this.radian=A!==void 0?_t*Math.PI*A/180:_t*Math.PI*(this.mapService.getRotation()%360)/180,this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:v,offsets:w})){this.judgeStyleAttributes({opacity:v,offsets:w});var Vt=this.layer.getEncodedData(),ce=this.calDataFrame(this.cellLength,Vt,this.cellProperties),ae=ce.data,ze=ce.width,$e=ce.height;this.rowCount=$e,this.dataTexture=this.cellLength>0&&ae.length>0?this.createTexture2D({flipY:!0,data:ae,format:ne.LUMINANCE,type:ne.FLOAT,width:ze,height:$e}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}return{u_raisingHeight:Number(B),u_heightfixed:Number(j),u_Size_Unit:Sm[ct],u_RotateMatrix:new Float32Array([Math.cos(this.radian),Math.sin(this.radian),-Math.sin(this.radian),Math.cos(this.radian)]),u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_texture:this.texture,u_textSize:[1024,this.iconService.canvasHeight||128],u_opacity:(0,Fn.isNumber)(v)?v:1,u_offsets:this.isOffsetStatic(w)?w:[0,0]}}},{key:"getAttribute",value:function(){return this.styleAttributeService.createAttributesAndIndices(this.layer.getEncodedData(),gm)}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return this.iconService.on("imageUpdate",this.updateTexture),this.updateTexture(),m.abrupt("return",this.buildModels());case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B;return ot().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,j.next=3,this.layer.buildLayerModel({moduleName:"pointFillImage",vertexShader:GI,fragmentShader:VI,triangulation:gm,depth:{enable:!1},blend:this.getBlend(),stencil:Zo(w,R),cull:{enable:!0,face:hh(this.mapService.version)}});case 3:return B=j.sent,j.abrupt("return",[B]);case 5:case"end":return j.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u,h;this.iconService.off("imageUpdate",this.updateTexture),(u=this.texture)===null||u===void 0||u.destroy(),(h=this.dataTexture)===null||h===void 0||h.destroy()}},{key:"registerBuiltinAttributes",value:function(){var u=this;this.styleAttributeService.registerStyleAttribute({name:"rotate",type:ea.Attribute,descriptor:{name:"a_Rotate",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v){var m=v.rotate,w=m===void 0?0:m;return Array.isArray(w)?[w[0]]:[w]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:ea.Attribute,descriptor:{name:"a_Uv",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(v){var m=u.iconService.getIconMap(),w=v.shape,A=m[w]||{x:-64,y:-64},R=A.x,B=A.y;return[R,B]}}}),this.styleAttributeService.registerStyleAttribute({name:"extrude",type:ea.Attribute,descriptor:{name:"a_Extrude",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(v,m,w,A){var R=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],B=A%4*3;return[R[B],R[B+1],R[B+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v){var m=v.size,w=m===void 0?5:m;return Array.isArray(w)?[w[0]]:[w]}}})}}]),a}($o);function gS(n){var l=jI();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function jI(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var WI=`
|
|
uniform sampler2D u_texture;
|
|
varying vec4 v_color;
|
|
varying vec2 v_uv;
|
|
uniform vec2 u_textSize;
|
|
uniform float u_opacity : 1;
|
|
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
|
|
#pragma include "picking"
|
|
|
|
void main(){
|
|
float opacity = styleMappingMat[0][0];
|
|
float size = styleMappingMat[1][0];
|
|
vec2 pos = v_uv / u_textSize + gl_PointCoord / u_textSize * 64.;
|
|
vec4 textureColor;
|
|
|
|
// Y = 0.299R + 0.587G + 0.114B // \u4EAE\u5EA6\u63D0\u53D6
|
|
|
|
textureColor = texture2D(u_texture, pos);
|
|
|
|
// Tip: \u53BB\u9664\u8FB9\u7F18\u90E8\u5206 mipmap \u5BFC\u81F4\u7684\u6DF7\u5408\u53D8\u6697
|
|
float fragmengTocenter = distance(vec2(0.5), gl_PointCoord);
|
|
if(fragmengTocenter >= 0.5) {
|
|
float luma = 0.299 * textureColor.r + 0.587 * textureColor.g + 0.114 * textureColor.b;
|
|
textureColor.a *= luma;
|
|
}
|
|
|
|
|
|
|
|
if(all(lessThan(v_color, vec4(1.0+0.00001))) && all(greaterThan(v_color, vec4(1.0-0.00001))) || v_color==vec4(1.0)){
|
|
gl_FragColor= textureColor;
|
|
}else {
|
|
gl_FragColor= step(0.01, textureColor.z) * v_color;
|
|
}
|
|
|
|
gl_FragColor.a = gl_FragColor.a * opacity;
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
`,XI=`precision highp float;
|
|
attribute vec3 a_Position;
|
|
attribute vec4 a_Color;
|
|
attribute vec2 a_Uv;
|
|
attribute float a_Size;
|
|
varying vec4 v_color;
|
|
varying vec2 v_uv;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform vec2 u_offsets;
|
|
|
|
uniform float u_opacity : 1;
|
|
uniform float u_raisingHeight: 0.0;
|
|
uniform float u_heightfixed: 0.0;
|
|
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
|
|
styleMappingMat[1][0] = a_Size;
|
|
|
|
vec2 textrueOffsets = vec2(0.0, 0.0);
|
|
if(hasOffsets()) {
|
|
vec2 valueXPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
textrueOffsets.r = pos2value(valueXPos, columnWidth, rowHeight); // x
|
|
textureOffset += 1.0;
|
|
|
|
vec2 valueYPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
textrueOffsets.g = pos2value(valueYPos, columnWidth, rowHeight); // x
|
|
textureOffset += 1.0;
|
|
} else {
|
|
textrueOffsets = u_offsets;
|
|
}
|
|
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
v_color = a_Color;
|
|
v_uv = a_Uv;
|
|
vec4 project_pos = project_position(vec4(a_Position, 1.0));
|
|
|
|
vec2 offset = project_pixel(textrueOffsets);
|
|
|
|
float raisingHeight = u_raisingHeight;
|
|
if(u_heightfixed < 1.0) { // false
|
|
raisingHeight = project_pixel(u_raisingHeight);
|
|
} else {
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
raisingHeight = u_raisingHeight * mapboxZoomScale;
|
|
}
|
|
}
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * vec4(project_pos.xy + offset, raisingHeight, 1.0);
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));
|
|
}
|
|
|
|
gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,mS=function(n){(0,zt.Z)(a,n);var l=gS(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"updateTexture",function(){var m=s.rendererService.createTexture2D;if(s.texture){s.texture.update({data:s.iconService.getCanvas(),mag:"linear",min:"linear mipmap nearest",mipmap:!0}),setTimeout(function(){s.layerService.throttleRenderLayers()});return}s.texture=m({data:s.iconService.getCanvas(),mag:ne.LINEAR,min:ne.LINEAR_MIPMAP_LINEAR,premultiplyAlpha:!1,width:1024,height:s.iconService.canvasHeight||128,mipmap:!0})}),s}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.offsets,w=m===void 0?[0,0]:m,A=u.raisingHeight,R=A===void 0?0:A,B=u.heightfixed,G=B===void 0?!1:B;if(this.rendererService.getDirty()&&this.texture.bind(),this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:v,offsets:w})){this.judgeStyleAttributes({opacity:v,offsets:w});var j=this.layer.getEncodedData(),lt=this.calDataFrame(this.cellLength,j,this.cellProperties),ct=lt.data,_t=lt.width,Vt=lt.height;this.rowCount=Vt,this.dataTexture=this.cellLength>0&&ct.length>0?this.createTexture2D({flipY:!0,data:ct,format:ne.LUMINANCE,type:ne.FLOAT,width:_t,height:Vt}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}return{u_raisingHeight:Number(R),u_heightfixed:Number(G),u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_texture:this.texture,u_textSize:[1024,this.iconService.canvasHeight||128],u_opacity:(0,Fn.isNumber)(v)?v:1,u_offsets:this.isOffsetStatic(w)?w:[0,0]}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return this.iconService.on("imageUpdate",this.updateTexture),this.updateTexture(),m.abrupt("return",this.buildModels());case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u,h;(u=this.texture)===null||u===void 0||u.destroy(),(h=this.dataTexture)===null||h===void 0||h.destroy(),this.iconService.off("imageUpdate",this.updateTexture)}},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B;return ot().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,j.next=3,this.layer.buildLayerModel({moduleName:"pointImage",vertexShader:XI,fragmentShader:WI,triangulation:jw,depth:{enable:!1},primitive:ne.POINTS,blend:this.getBlend(),stencil:Zo(w,R)});case 3:return B=j.sent,j.abrupt("return",[B]);case 5:case"end":return j.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"registerBuiltinAttributes",value:function(){var u=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(v){var m=v.size,w=m===void 0?5:m;return Array.isArray(w)?[w[0]]:[w]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:ea.Attribute,descriptor:{name:"a_Uv",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(v){var m=u.iconService.getIconMap(),w=v.shape,A=m[w]||{x:-64,y:-64},R=A.x,B=A.y;return[R,B]}}})}}]),a}($o);function yS(n){var l=YI();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function YI(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Rx=`uniform float u_opacity : 1;
|
|
varying vec4 v_color;
|
|
void main() {
|
|
gl_FragColor = v_color;
|
|
gl_FragColor.a *= u_opacity;
|
|
}
|
|
`,$I=`
|
|
attribute vec3 a_Position;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
attribute float a_Size;
|
|
attribute vec4 a_Color;
|
|
|
|
varying vec4 v_color;
|
|
|
|
#pragma include "projection"
|
|
#pragma include "project"
|
|
|
|
void main() {
|
|
v_color = a_Color;
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * vec4(a_Position.xy, a_Position.z, 1.0);
|
|
} else {
|
|
vec4 project_pos = project_position(vec4(a_Position, 1.0)) + vec4(a_Size / 2.,-a_Size /2.,0.,0.);
|
|
gl_Position = project_common_position_to_clipspace(vec4(vec2(project_pos.xy),project_pos.z,project_pos.w));
|
|
}
|
|
|
|
gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;
|
|
}
|
|
`;function _S(n){var l=n.coordinates;return{vertices:(0,Oi.Z)(l),indices:[0],size:l.length}}var xS=function(n){(0,zt.Z)(a,n);var l=yS(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getDefaultStyle",value:function(){return{blend:"additive"}}},{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h;return{u_opacity:(0,Fn.isNumber)(v)?v:1}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.buildModels();case 2:return m.abrupt("return",m.sent);case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B;return ot().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,this.layer.triangulation=_S,j.next=4,this.layer.buildLayerModel({moduleName:"pointNormal",vertexShader:$I,fragmentShader:Rx,triangulation:_S,depth:{enable:!1},primitive:ne.POINTS,blend:this.getBlend(),stencil:Zo(w,R),pick:!1});case 4:return B=j.sent,j.abrupt("return",[B]);case 6:case"end":return j.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(h){var v=h.size,m=v===void 0?1:v;return Array.isArray(m)?[m[0]]:[m]}}})}}]),a}($o);function bS(n){var l=qI();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function qI(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var KI=`
|
|
uniform float u_additive;
|
|
uniform float u_opacity: 1.0;
|
|
|
|
varying vec4 v_data;
|
|
varying vec4 v_color;
|
|
varying float v_radius;
|
|
varying vec2 v_exteude;
|
|
#pragma include "sdf_2d"
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
|
|
lowp float antialiasblur = v_data.z;
|
|
float r = v_radius / (v_radius);
|
|
|
|
float outer_df = sdCircle(v_data.xy, 1.0);
|
|
float inner_df = sdCircle(v_data.xy, r);
|
|
|
|
float opacity_t = smoothstep(0.0, antialiasblur, outer_df);
|
|
|
|
gl_FragColor = vec4(v_color.rgb, v_color.a * u_opacity);
|
|
|
|
if(u_additive > 0.0) {
|
|
gl_FragColor *= opacity_t;
|
|
} else {
|
|
gl_FragColor.a *= opacity_t;
|
|
}
|
|
|
|
if(gl_FragColor.a > 0.0) {
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
|
|
vec2 extrude = v_exteude;
|
|
vec2 dir = normalize(extrude);
|
|
vec2 baseDir = vec2(1.0, 0.0);
|
|
float pi = 3.14159265359;
|
|
// full circle
|
|
// float rades = dot(dir, baseDir);
|
|
// float flag = sign(dir.y);
|
|
// float radar_v = (flag - 1.0) * -0.5 + flag * acos(rades)/pi/2.0;
|
|
|
|
// half circle
|
|
float flag = sign(dir.y);
|
|
float rades = dot(dir, baseDir);
|
|
float radar_v = (flag - 1.0) * -0.5 * acos(rades)/pi;
|
|
// simple AA
|
|
if(radar_v > 0.99) {
|
|
radar_v = 1.0 - (radar_v - 0.99)/0.01;
|
|
}
|
|
|
|
gl_FragColor.a *= radar_v;
|
|
}
|
|
`,g1=`attribute vec4 a_Color;
|
|
attribute vec3 a_Position;
|
|
attribute vec3 a_Extrude;
|
|
attribute float a_Size;
|
|
uniform float u_speed: 1.0;
|
|
uniform float u_time;
|
|
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform int u_Size_Unit;
|
|
|
|
varying vec4 v_data;
|
|
varying vec4 v_color;
|
|
varying float v_radius;
|
|
varying vec2 v_exteude;
|
|
|
|
#pragma include "projection"
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
vec3 extrude = a_Extrude;
|
|
float newSize = setPickingSize(a_Size);
|
|
|
|
float time = u_time * u_speed;
|
|
mat2 rotateMatrix = mat2(
|
|
cos(time), sin(time),
|
|
-sin(time), cos(time)
|
|
);
|
|
v_exteude = rotateMatrix * a_Extrude.xy;
|
|
|
|
// unpack color(vec2)
|
|
v_color = a_Color;
|
|
|
|
|
|
|
|
// anti-alias
|
|
float blur = 0.0;
|
|
float antialiasblur = -max(2.0 / u_DevicePixelRatio / a_Size, blur);
|
|
|
|
if(u_Size_Unit == 1) {
|
|
newSize = newSize * u_PixelsPerMeter.z;
|
|
}
|
|
// radius(16-bit)
|
|
v_radius = newSize;
|
|
|
|
vec2 offset = (extrude.xy * (newSize));
|
|
vec3 aPosition = a_Position;
|
|
|
|
// \u4E0D\u4EE5\u7C73\u4E3A\u5B9E\u9645\u5355\u4F4D
|
|
offset = project_pixel(offset);
|
|
|
|
v_data = vec4(extrude.x, extrude.y, antialiasblur, -1.0);
|
|
|
|
vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0));
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp *vec4(project_pos.xy + offset, 0.0, 1.0);
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0));
|
|
}
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,QI=function(n){(0,zt.Z)(a,n);var l=bS(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.blend,w=u.speed,A=w===void 0?1:w,R=u.unit,B=R===void 0?"pixel":R;return{u_Size_Unit:Sm[B],u_speed:A,u_additive:m==="additive"?1:0,u_opacity:(0,Fn.isNumber)(v)?v:1}}},{key:"getAnimateUniforms",value:function(){var u=this.layer.getLayerConfig(),h=u.animateOption,v=h===void 0?{enable:!1}:h;return{u_animate:this.animateOption2Array(v),u_time:this.layer.getLayerAnimateTime()}}},{key:"getAttribute",value:function(){return this.styleAttributeService.createAttributesAndIndices(this.layer.getEncodedData(),gm)}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.buildModels();case 2:return m.abrupt("return",m.sent);case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B;return ot().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,j.next=3,this.layer.buildLayerModel({moduleName:"pointRadar",vertexShader:g1,fragmentShader:KI,triangulation:gm,depth:{enable:!1},blend:this.getBlend(),stencil:Zo(w,R)});case 3:return B=j.sent,j.abrupt("return",[B]);case 5:case"end":return j.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u;(u=this.dataTexture)===null||u===void 0||u.destroy()}},{key:"animateOption2Array",value:function(u){return[u.enable?0:1,u.speed||1,u.rings||3,0]}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"extrude",type:ea.Attribute,descriptor:{name:"a_Extrude",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(h,v,m,w){var A=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],R=w%4*3;return[A[R],A[R+1],A[R+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(h){var v=h.size,m=v===void 0?5:v;return Array.isArray(m)?[m[0]]:[m]}}})}}]),a}($o);function JI(n){var l=tk();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function tk(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var ek=`
|
|
uniform float u_opacity : 1;
|
|
uniform vec2 u_offsets;
|
|
uniform float u_additive;
|
|
|
|
uniform float u_stroke_opacity : 1;
|
|
|
|
uniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];
|
|
|
|
varying vec4 v_color;
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
varying float v_blur;
|
|
varying float v_innerRadius;
|
|
|
|
#pragma include "picking"
|
|
void main() {
|
|
vec2 center = vec2(0.5);
|
|
|
|
float opacity = styleMappingMat[0][0];
|
|
// Tip: \u7247\u5143\u5230\u4E2D\u5FC3\u70B9\u7684\u8DDD\u79BB 0 - 1
|
|
float fragmengTocenter = distance(center, gl_PointCoord) * 2.0;
|
|
// Tip: \u7247\u5143\u7684\u526A\u5207\u6210\u5706\u5F62
|
|
float circleClipOpacity = 1.0 - smoothstep(v_blur, 1.0, fragmengTocenter);
|
|
|
|
|
|
if(v_innerRadius < 0.99) {
|
|
// \u5F53\u5B58\u5728 stroke \u4E14 stroke > 0.01
|
|
float blurWidth = (1.0 - v_blur)/2.0;
|
|
vec4 stroke = vec4(u_stroke_color.rgb, u_stroke_opacity);
|
|
if(fragmengTocenter > v_innerRadius + blurWidth) {
|
|
gl_FragColor = stroke;
|
|
} else if(fragmengTocenter > v_innerRadius - blurWidth){
|
|
float mixR = (fragmengTocenter - (v_innerRadius - blurWidth)) / (blurWidth * 2.0);
|
|
gl_FragColor = mix(v_color, stroke, mixR);
|
|
} else {
|
|
gl_FragColor = v_color;
|
|
}
|
|
} else {
|
|
// \u5F53\u4E0D\u5B58\u5728 stroke \u6216 stroke <= 0.01
|
|
gl_FragColor = v_color;
|
|
}
|
|
|
|
gl_FragColor.a *= opacity;
|
|
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
|
|
if(u_additive > 0.0) {
|
|
gl_FragColor *= circleClipOpacity;
|
|
} else {
|
|
gl_FragColor.a *= circleClipOpacity;
|
|
}
|
|
|
|
}
|
|
`,ES=`
|
|
attribute vec3 a_Position;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
attribute float a_Size;
|
|
attribute vec4 a_Color;
|
|
varying vec4 v_color;
|
|
|
|
uniform float u_opacity : 1;
|
|
uniform vec2 u_offsets;
|
|
uniform float u_stroke_width;
|
|
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
varying float v_blur;
|
|
varying float v_innerRadius;
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "picking"
|
|
#pragma include "project"
|
|
void main() {
|
|
v_color = a_Color;
|
|
v_blur = 1.0 - max(2.0/a_Size, 0.05);
|
|
v_innerRadius = max((a_Size - u_stroke_width) / a_Size, 0.0);
|
|
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
|
|
vec2 textrueOffsets = vec2(0.0, 0.0);
|
|
if(hasOffsets()) {
|
|
vec2 valueXPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
textrueOffsets.r = pos2value(valueXPos, columnWidth, rowHeight); // x
|
|
textureOffset += 1.0;
|
|
|
|
vec2 valueYPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
textrueOffsets.g = pos2value(valueYPos, columnWidth, rowHeight); // x
|
|
textureOffset += 1.0;
|
|
} else {
|
|
textrueOffsets = u_offsets;
|
|
}
|
|
|
|
// cal style mapping
|
|
|
|
vec2 offset = project_pixel(textrueOffsets);
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * vec4(a_Position.xy + offset, a_Position.z, 1.0);
|
|
} else { // else
|
|
vec4 project_pos = project_position(vec4(a_Position, 1.0)) + vec4(a_Size / 2.,-a_Size /2.,0.,0.);
|
|
gl_Position = project_common_position_to_clipspace(vec4(vec2(project_pos.xy+offset),project_pos.z,project_pos.w));
|
|
}
|
|
|
|
gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`;function Dx(n){var l=n.coordinates;return{vertices:(0,Oi.Z)(l),indices:[0],size:l.length}}var rk=function(n){(0,zt.Z)(a,n);var l=JI(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getDefaultStyle",value:function(){return{blend:"additive"}}},{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.offsets,w=m===void 0?[0,0]:m,A=u.blend,R=u.strokeOpacity,B=R===void 0?1:R,G=u.strokeWidth,j=G===void 0?0:G,lt=u.stroke,ct=lt===void 0?"#fff":lt;if(this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:v,offsets:w})){this.judgeStyleAttributes({opacity:v,offsets:w});var _t=this.layer.getEncodedData(),Vt=this.calDataFrame(this.cellLength,_t,this.cellProperties),ce=Vt.data,ae=Vt.width,ze=Vt.height;this.rowCount=ze,this.dataTexture=this.cellLength>0&&ce.length>0?this.createTexture2D({flipY:!0,data:ce,format:ne.LUMINANCE,type:ne.FLOAT,width:ae,height:ze}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}return{u_additive:A==="additive"?1:0,u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_opacity:(0,Fn.isNumber)(v)?v:1,u_offsets:this.isOffsetStatic(w)?w:[0,0],u_stroke_opacity:(0,Fn.isNumber)(B)?B:1,u_stroke_width:(0,Fn.isNumber)(j)?j:1,u_stroke_color:this.getStrokeColor(ct)}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.buildModels();case 2:return m.abrupt("return",m.sent);case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B;return ot().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,this.layer.triangulation=Dx,j.next=4,this.layer.buildLayerModel({moduleName:"pointSimple",vertexShader:ES,fragmentShader:ek,triangulation:Dx,depth:{enable:!1},primitive:ne.POINTS,blend:this.getBlend(),stencil:Zo(w,R)});case 4:return B=j.sent,j.abrupt("return",[B]);case 6:case"end":return j.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u;(u=this.dataTexture)===null||u===void 0||u.destroy()}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(h){var v=h.size,m=v===void 0?1:v;return Array.isArray(m)?[m[0]]:[m]}}})}}]),a}($o);function nk(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=wS(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,u=function(){};return{s:u,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function wS(n,l){if(n){if(typeof n=="string")return Bx(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Bx(n,l)}}function Bx(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a<l;a++)s[a]=n[a];return s}var SS=function(){function n(l,a,s){(0,pt.Z)(this,n),(0,W.Z)(this,"boxCells",[]);var u=this.boxCells;this.xCellCount=Math.ceil(l/s),this.yCellCount=Math.ceil(a/s);for(var h=0;h<this.xCellCount*this.yCellCount;h++)u.push([]);this.boxKeys=[],this.bboxes=[],this.width=l,this.height=a,this.xScale=this.xCellCount/l,this.yScale=this.yCellCount/a,this.boxUid=0}return(0,et.Z)(n,[{key:"insert",value:function(a,s,u,h,v){this.forEachCell(s,u,h,v,this.insertBoxCell,this.boxUid++),this.boxKeys.push(a),this.bboxes.push(s),this.bboxes.push(u),this.bboxes.push(h),this.bboxes.push(v)}},{key:"query",value:function(a,s,u,h,v){return this.queryHitTest(a,s,u,h,!1,v)}},{key:"hitTest",value:function(a,s,u,h,v){return this.queryHitTest(a,s,u,h,!0,v)}},{key:"insertBoxCell",value:function(a,s,u,h,v,m){this.boxCells[v].push(m)}},{key:"queryHitTest",value:function(a,s,u,h,v,m){if(u<0||a>this.width||h<0||s>this.height)return v?!1:[];var w=[];if(a<=0&&s<=0&&this.width<=u&&this.height<=h){if(v)return!0;for(var A=0;A<this.boxKeys.length;A++)w.push({key:this.boxKeys[A],x1:this.bboxes[A*4],y1:this.bboxes[A*4+1],x2:this.bboxes[A*4+2],y2:this.bboxes[A*4+3]});return m?w.filter(m):w}var R={hitTest:v,seenUids:{box:{},circle:{}}};return this.forEachCell(a,s,u,h,this.queryCell,w,R,m),v?w.length>0:w}},{key:"queryCell",value:function(a,s,u,h,v,m,w,A){var R=w.seenUids,B=this.boxCells[v];if(B!==null){var G=this.bboxes,j=nk(B),lt;try{for(j.s();!(lt=j.n()).done;){var ct=lt.value;if(!R.box[ct]){R.box[ct]=!0;var _t=ct*4;if(a<=G[_t+2]&&s<=G[_t+3]&&u>=G[_t+0]&&h>=G[_t+1]&&(!A||A(this.boxKeys[ct]))){if(w.hitTest)return m.push(!0),!0;m.push({key:this.boxKeys[ct],x1:G[_t],y1:G[_t+1],x2:G[_t+2],y2:G[_t+3]})}}}}catch(Vt){j.e(Vt)}finally{j.f()}}return!1}},{key:"forEachCell",value:function(a,s,u,h,v,m,w,A){for(var R=this.convertToXCellCoord(a),B=this.convertToYCellCoord(s),G=this.convertToXCellCoord(u),j=this.convertToYCellCoord(h),lt=R;lt<=G;lt++)for(var ct=B;ct<=j;ct++){var _t=this.xCellCount*ct+lt;if(v.call(this,a,s,u,h,_t,m,w,A))return}}},{key:"convertToXCellCoord",value:function(a){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(a*this.xScale)))}},{key:"convertToYCellCoord",value:function(a){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(a*this.yScale)))}}]),n}(),ik=SS,Nx=function(){function n(l,a){(0,pt.Z)(this,n),(0,W.Z)(this,"viewportPadding",100),this.width=l,this.height=a,this.viewportPadding=Math.max(l,a),this.grid=new ik(l+this.viewportPadding,a+this.viewportPadding,25),this.screenRightBoundary=l+this.viewportPadding,this.screenBottomBoundary=a+this.viewportPadding,this.gridRightBoundary=l+2*this.viewportPadding,this.gridBottomBoundary=a+2*this.viewportPadding}return(0,et.Z)(n,[{key:"placeCollisionBox",value:function(a){var s=a.x1+a.anchorPointX+this.viewportPadding,u=a.y1+a.anchorPointY+this.viewportPadding,h=a.x2+a.anchorPointX+this.viewportPadding,v=a.y2+a.anchorPointY+this.viewportPadding;return!this.isInsideGrid(s,u,h,v)||this.grid.hitTest(s,u,h,v)?{box:[]}:{box:[s,u,h,v]}}},{key:"insertCollisionBox",value:function(a,s){var u={featureIndex:s};this.grid.insert(u,a[0],a[1],a[2],a[3])}},{key:"project",value:function(a,s,u){var h=mo(s,u,0,1),v=na(),m=Rr.apply(kt,(0,Oi.Z)(a));return al(v,h,m),{x:(v[0]/v[3]+1)/2*this.width+this.viewportPadding,y:(-v[1]/v[3]+1)/2*this.height+this.viewportPadding}}},{key:"isInsideGrid",value:function(a,s,u,h){return u>=0&&a<this.gridRightBoundary&&h>=0&&s<this.gridBottomBoundary}}]),n}();function zx(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=ak(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,u=function(){};return{s:u,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function ak(n,l){if(n){if(typeof n=="string")return Ux(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Ux(n,l)}}function Ux(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a<l;a++)s[a]=n[a];return s}function CS(n){var l=.5,a=.5;switch(n){case"right":case"top-right":case"bottom-right":l=1;break;case"left":case"top-left":case"bottom-left":l=0;break;default:l=.5}switch(n){case"bottom":case"bottom-right":case"bottom-left":a=1;break;case"top":case"top-right":case"top-left":a=0;break;default:a=.5}return{horizontalAlign:l,verticalAlign:a}}function AS(n,l,a,s,u){if(u){var h=n[s],v=h.glyph;if(v)for(var m=l[v].advance*h.scale,w=(n[s].x+m)*u,A=a;A<=s;A++)n[A].x-=w}}function Zx(n,l,a,s,u,h,v){var m=(l-a)*u,w=(-s*v+.5)*h,A=zx(n),R;try{for(A.s();!(R=A.n()).done;){var B=R.value;B.x+=m,B.y+=w}}catch(G){A.e(G)}finally{A.f()}}function TS(n,l,a,s,u,h,v){var m=-8,w=0,A=m,R=0,B=n.positionedGlyphs,G=h==="right"?1:h==="left"?0:.5,j=B.length;a.forEach(function(ce){if(ce.split("").forEach(function(ze){var $e=l[ze],xr=0;$e&&(B.push({glyph:ze,x:w,y:A+xr,vertical:!1,scale:1,metrics:$e}),w+=$e.advance+v)}),B.length!==j){var ae=w-v;R=Math.max(ae,R),AS(B,l,j,B.length-1,G)}w=0,A-=s+5});var lt=CS(u),ct=lt.horizontalAlign,_t=lt.verticalAlign;Zx(B,G,ct,_t,R,s,a.length);var Vt=A-m;n.top+=-_t*Vt,n.bottom=n.top-Vt,n.left+=-ct*R,n.right=n.left+R}function ok(n,l,a,s,u,h,v){var m=-8,w=0,A=m,R=0,B=n.positionedGlyphs,G=h==="right"?1:h==="left"?0:.5,j=B.length;a.forEach(function(ce){var ae=l[ce],ze=0;if(ae&&(B.push({glyph:ce,x:ae.advance/2,y:A+ze,vertical:!1,scale:1,metrics:ae}),w+=ae.advance+v),B.length!==j){var $e=w-v;R=Math.max($e,R),AS(B,l,j,B.length-1,G)}w=0,A-=s+5});var lt=CS(u),ct=lt.horizontalAlign,_t=lt.verticalAlign;Zx(B,G,ct,_t,R,s,a.length);var Vt=A-m;n.top+=-_t*Vt,n.bottom=n.top-Vt,n.left+=-ct*R,n.right=n.left+R}function sk(n,l,a,s,u,h){var v=arguments.length>6&&arguments[6]!==void 0?arguments[6]:[0,0],m=arguments.length>7?arguments[7]:void 0,w=n.split(`
|
|
`),A=[],R={positionedGlyphs:A,top:v[1],bottom:v[1],left:v[0],right:v[0],lineCount:w.length,text:n};return m?ok(R,l,w,a,s,u,h):TS(R,l,w,a,s,u,h),A.length?R:!1}function P0(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0],a=arguments.length>2?arguments[2]:void 0,s=n.positionedGlyphs,u=s===void 0?[]:s,h=[],v=zx(u),m;try{for(v.s();!(m=v.n()).done;){var w=m.value,A=w.metrics,R=4,B=A.advance*w.scale/2,G=a?[w.x+B,w.y]:[0,0],j=a?[0,0]:[w.x+B+l[0],w.y+l[1]],lt=(0-R)*w.scale-B+j[0],ct=(0-R)*w.scale+j[1],_t=lt+A.width*w.scale,Vt=ct+A.height*w.scale,ce={x:lt,y:ct},ae={x:_t,y:ct},ze={x:lt,y:Vt},$e={x:_t,y:Vt};h.push({tl:ce,tr:ae,bl:ze,br:$e,tex:A,glyphOffset:G})}}catch(xr){v.e(xr)}finally{v.f()}return h}function uk(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=lk(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,u=function(){};return{s:u,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function lk(n,l){if(n){if(typeof n=="string")return MS(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return MS(n,l)}}function MS(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a<l;a++)s[a]=n[a];return s}function ck(n){var l=fk();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function fk(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Vx=`#define SDF_PX 8.0
|
|
#define EDGE_GAMMA 0.105
|
|
#define FONT_SIZE 48.0
|
|
uniform sampler2D u_sdf_map;
|
|
uniform float u_gamma_scale : 0.5;
|
|
// uniform float u_font_size : 24.0;
|
|
uniform float u_opacity : 1.0;
|
|
uniform vec4 u_stroke_color : [0, 0, 0, 1];
|
|
uniform float u_stroke_width : 2.0;
|
|
uniform float u_halo_blur : 0.5;
|
|
uniform float u_DevicePixelRatio;
|
|
|
|
varying vec4 v_color;
|
|
varying vec2 v_uv;
|
|
varying float v_gamma_scale;
|
|
varying float v_fontScale;
|
|
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
|
|
#pragma include "picking"
|
|
void main() {
|
|
// get style data mapping
|
|
float opacity = styleMappingMat[0][0];
|
|
float strokeWidth = styleMappingMat[0][2];
|
|
vec4 textrueStroke = vec4(
|
|
styleMappingMat[1][0],
|
|
styleMappingMat[1][1],
|
|
styleMappingMat[1][2],
|
|
styleMappingMat[1][3]
|
|
);
|
|
|
|
// get sdf from atlas
|
|
float dist = texture2D(u_sdf_map, v_uv).a;
|
|
|
|
// float fontScale = u_font_size / FONT_SIZE;
|
|
|
|
// lowp float buff = (6.0 - u_stroke_width / v_fontScale) / SDF_PX;
|
|
lowp float buff = (6.0 - strokeWidth / v_fontScale) / SDF_PX;
|
|
highp float gamma = (u_halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (v_fontScale * u_gamma_scale) / 1.0;
|
|
|
|
highp float gamma_scaled = gamma * v_gamma_scale;
|
|
|
|
highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);
|
|
// gl_FragColor = mix(vec4(v_color.rgb, v_color.a * u_opacity), vec4(u_stroke_color.rgb, u_stroke_color.a * u_opacity), smoothstep(0., 0.5, 1. - dist));
|
|
gl_FragColor = mix(vec4(v_color.rgb, v_color.a * opacity), vec4(textrueStroke.rgb, textrueStroke.a * opacity), smoothstep(0., 0.5, 1. - dist));
|
|
gl_FragColor.a= gl_FragColor.a * alpha;
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
`,IS=`#define SDF_PX 8.0
|
|
#define EDGE_GAMMA 0.105
|
|
#define FONT_SIZE 24.0
|
|
attribute vec3 a_Position;
|
|
attribute vec2 a_tex;
|
|
attribute vec2 a_textOffsets;
|
|
attribute vec4 a_Color;
|
|
attribute float a_Size;
|
|
attribute float a_Rotate;
|
|
|
|
uniform vec2 u_sdf_map_size;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform float u_raisingHeight: 0.0;
|
|
|
|
varying vec2 v_uv;
|
|
varying float v_gamma_scale;
|
|
varying vec4 v_color;
|
|
varying float v_fontScale;
|
|
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
uniform float u_opacity : 1;
|
|
uniform float u_stroke_width : 2;
|
|
uniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
#pragma include "styleMappingCalStrokeWidth"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
|
|
vec2 strokeWidthAndOffset = calStrokeWidthAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][2] = strokeWidthAndOffset.r;
|
|
textureOffset = strokeWidthAndOffset.g;
|
|
|
|
vec4 textrueStroke = vec4(-1.0, -1.0, -1.0, -1.0);
|
|
if(hasStroke()) {
|
|
vec2 valueRPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
styleMappingMat[1][0] = pos2value(valueRPos, columnWidth, rowHeight); // R
|
|
textureOffset += 1.0;
|
|
|
|
vec2 valueGPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
styleMappingMat[1][1] = pos2value(valueGPos, columnWidth, rowHeight); // G
|
|
textureOffset += 1.0;
|
|
|
|
vec2 valueBPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
styleMappingMat[1][2] = pos2value(valueBPos, columnWidth, rowHeight); // B
|
|
textureOffset += 1.0;
|
|
|
|
vec2 valueAPos = nextPos(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset);
|
|
styleMappingMat[1][3] = pos2value(valueAPos, columnWidth, rowHeight); // A
|
|
textureOffset += 1.0;
|
|
} else {
|
|
if(u_stroke_color == vec4(0.0)) {
|
|
styleMappingMat[1][0] = v_color.r;
|
|
styleMappingMat[1][1] = v_color.g;
|
|
styleMappingMat[1][2] = v_color.b;
|
|
styleMappingMat[1][3] = v_color.a;
|
|
} else {
|
|
styleMappingMat[1][0] = u_stroke_color.r;
|
|
styleMappingMat[1][1] = u_stroke_color.g;
|
|
styleMappingMat[1][2] = u_stroke_color.b;
|
|
styleMappingMat[1][3] = u_stroke_color.a;
|
|
}
|
|
}
|
|
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
v_color = a_Color;
|
|
v_uv = a_tex / u_sdf_map_size;
|
|
|
|
// \u6587\u672C\u7F29\u653E\u6BD4\u4F8B
|
|
float fontScale = a_Size / FONT_SIZE;
|
|
v_fontScale = fontScale;
|
|
|
|
vec4 project_pos = project_position(vec4(a_Position, 1.0));
|
|
// vec4 projected_position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));
|
|
|
|
highp float angle_sin = sin(a_Rotate);
|
|
highp float angle_cos = cos(a_Rotate);
|
|
mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);
|
|
|
|
// gl_Position = vec4(projected_position.xy / projected_position.w + rotation_matrix * a_textOffsets * fontScale / u_ViewportSize * 2.0 * u_DevicePixelRatio, 0.0, 1.0);
|
|
|
|
float raiseHeight = u_raisingHeight;
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
raiseHeight = u_raisingHeight * mapboxZoomScale;
|
|
}
|
|
|
|
vec4 projected_position;
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
projected_position = u_Mvp *(vec4(a_Position.xyz + vec3(0.0, 0.0, raiseHeight), 1.0));
|
|
} else { // else
|
|
projected_position = project_common_position_to_clipspace(vec4(project_pos.xyz + vec3(0.0, 0.0, raiseHeight), 1.0));
|
|
}
|
|
|
|
gl_Position = vec4(
|
|
projected_position.xy / projected_position.w + rotation_matrix * a_textOffsets * fontScale / u_ViewportSize * 2.0 * u_DevicePixelRatio, 0.0, 1.0);
|
|
v_gamma_scale = gl_Position.w;
|
|
setPickingColor(a_PickingColor);
|
|
|
|
}
|
|
`;function Cm(n){var l=this,a=n.id,s=[],u=[];if(!l.glyphInfoMap||!l.glyphInfoMap[a])return{vertices:[],indices:[],size:7};var h=l.glyphInfoMap[a].centroid,v=h.length===2?[h[0],h[1],0]:h;return l.glyphInfoMap[a].glyphQuads.forEach(function(m,w){s.push.apply(s,(0,Oi.Z)(v).concat([m.tex.x,m.tex.y+m.tex.height,m.tl.x,m.tl.y],(0,Oi.Z)(v),[m.tex.x+m.tex.width,m.tex.y+m.tex.height,m.tr.x,m.tr.y],(0,Oi.Z)(v),[m.tex.x+m.tex.width,m.tex.y,m.br.x,m.br.y],(0,Oi.Z)(v),[m.tex.x,m.tex.y,m.bl.x,m.bl.y])),u.push(0+w*4,1+w*4,2+w*4,2+w*4,3+w*4,0+w*4)}),{vertices:s,indices:u,size:7}}var kS=function(n){(0,zt.Z)(a,n);var l=ck(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"glyphInfoMap",{}),(0,W.Z)((0,ut.Z)(s),"currentZoom",-1),(0,W.Z)((0,ut.Z)(s),"textureHeight",0),(0,W.Z)((0,ut.Z)(s),"textCount",0),(0,W.Z)((0,ut.Z)(s),"preTextStyle",{}),(0,W.Z)((0,ut.Z)(s),"mapping",(0,J.Z)(ot().mark(function m(){return ot().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return s.initGlyph(),s.updateTexture(),A.next=4,s.reBuildModel();case 4:case"end":return A.stop()}},m)}))),s}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.stroke,w=m===void 0?"#fff":m,A=u.strokeWidth,R=A===void 0?0:A,B=u.halo,G=B===void 0?.5:B,j=u.gamma,lt=j===void 0?2:j,ct=u.raisingHeight,_t=ct===void 0?0:ct,Vt=this.fontService,ce=Vt.canvas,ae=Vt.mapping;if(ae&&Object.keys(ae).length!==this.textCount&&ce&&(this.updateTexture(),this.textCount=Object.keys(ae).length),this.preTextStyle=this.getTextStyle(),this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:v,strokeWidth:R,stroke:w})){this.judgeStyleAttributes({opacity:v,strokeWidth:R,stroke:w});var ze=this.layer.getEncodedData(),$e=this.calDataFrame(this.cellLength,ze,this.cellProperties),xr=$e.data,Or=$e.width,Zr=$e.height;this.rowCount=Zr,this.dataTexture=this.cellLength>0&&xr.length>0?this.createTexture2D({flipY:!0,data:xr,format:ne.LUMINANCE,type:ne.FLOAT,width:Or,height:Zr}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}return{u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_raisingHeight:Number(_t),u_opacity:(0,Fn.isNumber)(v)?v:1,u_stroke_width:(0,Fn.isNumber)(R)?R:1,u_stroke_color:this.getStrokeColor(w),u_sdf_map:this.texture,u_halo_blur:G,u_gamma_scale:lt,u_sdf_map_size:[(ce==null?void 0:ce.width)||1,(ce==null?void 0:ce.height)||1]}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return this.bindEvent(),this.extent=this.textExtent(),this.preTextStyle=this.getTextStyle(),m.abrupt("return",this.buildModels());case 4:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j;return ot().wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,B=v.textAllowOverlap,G=B===void 0?!1:B,this.initGlyph(),this.updateTexture(),G||this.filterGlyphs(),ct.next=6,this.layer.buildLayerModel({moduleName:"pointText",vertexShader:IS,fragmentShader:Vx,triangulation:Cm.bind(this),depth:{enable:!1},blend:this.getBlend(),stencil:Zo(w,R)});case 6:return j=ct.sent,ct.abrupt("return",[j]);case 8:case"end":return ct.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"needUpdate",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j,lt,ct,_t,Vt;return ot().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(v=this.getTextStyle(),m=v.textAllowOverlap,w=m===void 0?!1:m,A=v.textAnchor,R=A===void 0?"center":A,B=v.textOffset,G=v.padding,j=v.fontFamily,lt=v.fontWeight,!(!(0,Fn.isEqual)(G,this.preTextStyle.padding)||!(0,Fn.isEqual)(B,this.preTextStyle.textOffset)||!(0,Fn.isEqual)(R,this.preTextStyle.textAnchor)||!(0,Fn.isEqual)(j,this.preTextStyle.fontFamily)||!(0,Fn.isEqual)(lt,this.preTextStyle.fontWeight))){ae.next=5;break}return ae.next=4,this.mapping();case 4:return ae.abrupt("return",!0);case 5:if(!w){ae.next=7;break}return ae.abrupt("return",!1);case 7:if(ct=this.mapService.getZoom(),_t=this.mapService.getBounds(),Vt=re(this.extent,_t),!(Math.abs(this.currentZoom-ct)>.5||!Vt||w!==this.preTextStyle.textAllowOverlap)){ae.next=14;break}return ae.next=13,this.reBuildModel();case 13:return ae.abrupt("return",!0);case 14:return ae.abrupt("return",!1);case 15:case"end":return ae.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u,h;(u=this.texture)===null||u===void 0||u.destroy(),(h=this.dataTexture)===null||h===void 0||h.destroy(),this.layer.off("remapping",this.mapping)}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"rotate",type:ea.Attribute,descriptor:{name:"a_Rotate",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(h){var v=h.rotate,m=v===void 0?0:v;return Array.isArray(m)?[m[0]]:[m]}}}),this.styleAttributeService.registerStyleAttribute({name:"textOffsets",type:ea.Attribute,descriptor:{name:"a_textOffsets",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(h,v,m){return[m[5],m[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(h){var v=h.size,m=v===void 0?12:v;return Array.isArray(m)?[m[0]]:[m]}}}),this.styleAttributeService.registerStyleAttribute({name:"textUv",type:ea.Attribute,descriptor:{name:"a_tex",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(h,v,m){return[m[3],m[4]]}}})}},{key:"bindEvent",value:function(){this.layer.isTileLayer||this.layer.on("remapping",this.mapping)}},{key:"textExtent",value:function(){var u=this.mapService.getBounds();return Ut(u,.5)}},{key:"initTextFont",value:function(){var u=this.getTextStyle(),h=u.fontWeight,v=u.fontFamily,m=this.layer.getEncodedData(),w=[];m.forEach(function(A){var R=A.shape,B=R===void 0?"":R;B=B.toString();var G=uk(B),j;try{for(G.s();!(j=G.n()).done;){var lt=j.value;w.indexOf(lt)===-1&&w.push(lt)}}catch(ct){G.e(ct)}finally{G.f()}}),this.fontService.setFontOptions({characterSet:w,fontWeight:h,fontFamily:v,iconfont:!1})}},{key:"initIconFontTex",value:function(){var u=this.getTextStyle(),h=u.fontWeight,v=u.fontFamily,m=this.layer.getEncodedData(),w=[];m.forEach(function(A){var R=A.shape,B=R===void 0?"":R;B="".concat(B),w.indexOf(B)===-1&&w.push(B)}),this.fontService.setFontOptions({characterSet:w,fontWeight:h,fontFamily:v,iconfont:!0})}},{key:"getTextStyle",value:function(){var u=this.layer.getLayerConfig(),h=u.fontWeight,v=h===void 0?"400":h,m=u.fontFamily,w=m===void 0?"sans-serif":m,A=u.textAllowOverlap,R=A===void 0?!1:A,B=u.padding,G=B===void 0?[0,0]:B,j=u.textAnchor,lt=j===void 0?"center":j,ct=u.textOffset,_t=ct===void 0?[0,0]:ct,Vt=u.opacity,ce=Vt===void 0?1:Vt,ae=u.strokeOpacity,ze=ae===void 0?1:ae,$e=u.strokeWidth,xr=$e===void 0?0:$e,Or=u.stroke,Zr=Or===void 0?"#000":Or;return{fontWeight:v,fontFamily:w,textAllowOverlap:R,padding:G,textAnchor:lt,textOffset:_t,opacity:ce,strokeOpacity:ze,strokeWidth:xr,stroke:Zr}}},{key:"generateGlyphLayout",value:function(u){var h=this,v=this.fontService.mapping,m=this.layer.getLayerConfig(),w=m.spacing,A=w===void 0?2:w,R=m.textAnchor,B=R===void 0?"center":R,G=m.textOffset,j=this.layer.getEncodedData();this.glyphInfo=j.map(function(lt){var ct=lt.shape,_t=ct===void 0?"":ct,Vt=lt.id,ce=lt.size,ae=ce===void 0?1:ce,ze=sk(_t.toString(),v,ae,B,"left",A,G||lt.textOffset||[0,0],u),$e=P0(ze,G,!1);return lt.shaping=ze,lt.glyphQuads=$e,lt.centroid=Ir(lt.coordinates),lt.originCentroid=lt.version==="GAODE2.x"?Ir(lt.originCoordinates):lt.originCentroid=lt.centroid,h.glyphInfoMap[Vt]={shaping:ze,glyphQuads:$e,centroid:Ir(lt.coordinates)},lt})}},{key:"filterGlyphs",value:function(){var u=this,h=this.layer.getLayerConfig(),v=h.padding,m=v===void 0?[0,0]:v,w=h.textAllowOverlap,A=w===void 0?!1:w;if(!A){this.glyphInfoMap={},this.currentZoom=this.mapService.getZoom(),this.extent=this.textExtent();var R=this.rendererService.getViewportSize(),B=R.width,G=R.height,j=new Nx(B,G),lt=this.glyphInfo.filter(function(ct){var _t=ct.shaping,Vt=ct.id,ce=Vt===void 0?0:Vt,ae=ct.version==="GAODE2.x"?ct.originCentroid:ct.centroid,ze=ct.size,$e=ze/16,xr=u.mapService.lngLatToContainer(ae),Or=j.placeCollisionBox({x1:_t.left*$e-m[0],x2:_t.right*$e+m[0],y1:_t.top*$e-m[1],y2:_t.bottom*$e+m[1],anchorPointX:xr.x,anchorPointY:xr.y}),Zr=Or.box;return Zr&&Zr.length?(j.insertCollisionBox(Zr,ce),!0):!1});lt.forEach(function(ct){u.glyphInfoMap[ct.id]=ct})}}},{key:"initGlyph",value:function(){var u=this.layer.getLayerConfig(),h=u.iconfont,v=h===void 0?!1:h;v?this.initIconFontTex():this.initTextFont(),this.generateGlyphLayout(v)}},{key:"updateTexture",value:function(){var u=this.rendererService.createTexture2D,h=this.fontService.canvas;this.textureHeight=h.height,this.texture&&this.texture.destroy(),this.texture=u({data:h,mag:ne.LINEAR,min:ne.LINEAR,width:h.width,height:h.height})}},{key:"reBuildModel",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B;return ot().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,this.filterGlyphs(),j.next=4,this.layer.buildLayerModel({moduleName:"pointText",vertexShader:IS,fragmentShader:Vx,triangulation:Cm.bind(this),depth:{enable:!1},blend:this.getBlend(),stencil:Zo(w,R)});case 4:B=j.sent,this.layer.models=[B];case 6:case"end":return j.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()}]),a}($o),hk={fillImage:HI,fill:yg,radar:QI,image:mS,normal:xS,simplePoint:rk,extrude:Fx,text:kS,earthFill:RI,earthExtrude:lS},pk=hk;function dk(n,l){var a=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=vk(n))||l&&n&&typeof n.length=="number"){a&&(n=a);var s=0,u=function(){};return{s:u,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(A){throw A},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,v=!1,m;return{s:function(){a=a.call(n)},n:function(){var A=a.next();return h=A.done,A},e:function(A){v=!0,m=A},f:function(){try{!h&&a.return!=null&&a.return()}finally{if(v)throw m}}}}function vk(n,l){if(n){if(typeof n=="string")return LS(n,l);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return LS(n,l)}}function LS(n,l){(l==null||l>n.length)&&(l=n.length);for(var a=0,s=new Array(l);a<l;a++)s[a]=n[a];return s}function PS(n){var l=gk();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function gk(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var m1=function(n){(0,zt.Z)(a,n);var l=PS(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"type","PointLayer"),(0,W.Z)((0,ut.Z)(s),"defaultSourceConfig",{data:[],options:{parser:{type:"json",x:"lng",y:"lat"}}}),s}return(0,et.Z)(a,[{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return v=this.getModelType(),this.layerModel&&this.layerModel.clearModels(),this.layerModel=new pk[v](this),w.next=5,this.initLayerModels();case 5:case"end":return w.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"rebuildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.buildModels();case 2:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getModelTypeWillEmptyData",value:function(){if(this.shapeOption){var u=this.shapeOption,h=u.field,v=u.values,m=this.getLayerConfig(),w=m.shape2d,A=this.iconService.getIconMap();if(h&&(w==null?void 0:w.indexOf(h))!==-1)return"fill";if(v==="text")return"text";if(v&&v instanceof Array){var R=dk(v),B;try{for(R.s();!(B=R.n()).done;){var G=B.value;if(typeof G=="string"&&A.hasOwnProperty(G))return"image"}}catch(j){R.e(j)}finally{R.f()}}}return"normal"}},{key:"getDefaultConfig",value:function(){var u=this.getModelType(),h={fillImage:{},normal:{blend:"additive"},radar:{},simplePoint:{},fill:{blend:"normal"},extrude:{},image:{},text:{blend:"normal"},tile:{},tileText:{},earthFill:{},earthExtrude:{}};return h[u]}},{key:"getModelType",value:function(){var u=this.getEncodedData(),h=this.getLayerConfig(),v=h.shape2d,m=h.shape3d,w=this.iconService.getIconMap(),A=u.find(function(B){return B.hasOwnProperty("shape")});if(A){var R=A.shape;return R==="dot"?"normal":R==="simple"?"simplePoint":R==="radar"?"radar":this.layerType==="fillImage"?"fillImage":(v==null?void 0:v.indexOf(R))!==-1?this.mapService.version==="GLOBEL"?"earthFill":"fill":(m==null?void 0:m.indexOf(R))!==-1?this.mapService.version==="GLOBEL"?"earthExtrude":"extrude":w.hasOwnProperty(R)?"image":"text"}else return this.getModelTypeWillEmptyData()}}]),a}(hg);function Am(n){var l=y1();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function y1(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var OS=`uniform float u_opacity: 1.0;
|
|
uniform vec4 u_sourceColor;
|
|
uniform vec4 u_targetColor;
|
|
uniform float u_linearColor: 0;
|
|
|
|
uniform float u_topsurface: 1.0;
|
|
uniform float u_sidesurface: 1.0;
|
|
|
|
varying vec4 v_Color;
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float isSide = styleMappingMat[0][3];
|
|
float sidey = styleMappingMat[3][0];
|
|
float lightWeight = styleMappingMat[3][1];
|
|
|
|
// Tip: \u90E8\u5206\u673A\u578B GPU \u8BA1\u7B97\u7CBE\u5EA6\u517C\u5BB9
|
|
if(isSide < 0.999) {
|
|
// side face
|
|
if(u_sidesurface < 1.0) {
|
|
discard;
|
|
}
|
|
|
|
if(u_linearColor == 1.0) {
|
|
vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey);
|
|
linearColor.rgb *= lightWeight;
|
|
gl_FragColor = linearColor;
|
|
} else {
|
|
gl_FragColor = v_Color;
|
|
}
|
|
|
|
} else {
|
|
// top face
|
|
if(u_topsurface < 1.0) {
|
|
discard;
|
|
}
|
|
|
|
gl_FragColor = v_Color;
|
|
}
|
|
|
|
gl_FragColor.a *= opacity;
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
`,FS=`precision highp float;
|
|
|
|
#define ambientRatio 0.5
|
|
#define diffuseRatio 0.3
|
|
#define specularRatio 0.2
|
|
|
|
attribute vec4 a_Color;
|
|
attribute vec3 a_Position;
|
|
attribute vec3 a_Normal;
|
|
attribute float a_Size;
|
|
attribute vec3 a_uvs;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
|
|
varying vec4 v_Color;
|
|
uniform float u_heightfixed: 0.0; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A
|
|
uniform float u_raisingHeight: 0.0;
|
|
uniform float u_opacity: 1.0;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "light"
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - isSide
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0 // sidey
|
|
);
|
|
styleMappingMat[0][3] = a_Position.z;
|
|
styleMappingMat[3][0] = a_uvs[2];
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);
|
|
vec4 project_pos = project_position(pos);
|
|
|
|
if(u_heightfixed > 0.0) { // \u5224\u65AD\u51E0\u4F55\u4F53\u662F\u5426\u56FA\u5B9A\u9AD8\u5EA6
|
|
project_pos.z = a_Position.z * a_Size;
|
|
project_pos.z += u_raisingHeight;
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
project_pos.z *= mapboxZoomScale;
|
|
project_pos.z += u_raisingHeight * mapboxZoomScale;
|
|
}
|
|
}
|
|
|
|
// project_pos.z += 500000.0; // amap1
|
|
|
|
// project_pos.z += (500000.0 * 4.0)/pow(2.0, 21.0 - u_Zoom); // mapbox
|
|
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
// gl_Position = u_Mvp * (vec4(project_pos.xyz * vec3(1.0, 1.0, -1.0), 1.0));
|
|
gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));
|
|
}
|
|
|
|
float lightWeight = calc_lighting(pos);
|
|
// v_Color = a_Color;
|
|
v_Color = vec4(a_Color.rgb * lightWeight, a_Color.w);
|
|
|
|
styleMappingMat[3][1] = lightWeight;
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,mk=`uniform sampler2D u_texture;
|
|
uniform float u_opacity: 1.0;
|
|
uniform vec4 u_sourceColor;
|
|
uniform vec4 u_targetColor;
|
|
uniform float u_linearColor: 0;
|
|
|
|
uniform float u_topsurface: 1.0;
|
|
uniform float u_sidesurface: 1.0;
|
|
|
|
varying vec4 v_Color;
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float isSide = styleMappingMat[0][3];
|
|
float lightWeight = styleMappingMat[3][1];
|
|
float topU = styleMappingMat[2][2];
|
|
float topV = styleMappingMat[2][3];
|
|
|
|
float sidey = styleMappingMat[3][0];
|
|
// Tip: \u90E8\u5206\u673A\u578B GPU \u8BA1\u7B97\u7CBE\u5EA6\u517C\u5BB9
|
|
if(isSide < 0.999) {
|
|
// side face
|
|
if(u_sidesurface < 1.0) {
|
|
discard;
|
|
}
|
|
|
|
if(u_linearColor == 1.0) {
|
|
vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey);
|
|
linearColor.rgb *= lightWeight;
|
|
gl_FragColor = linearColor;
|
|
} else {
|
|
gl_FragColor = v_Color;
|
|
}
|
|
} else {
|
|
|
|
// top face
|
|
if(u_topsurface < 1.0) {
|
|
discard;
|
|
}
|
|
|
|
gl_FragColor = texture2D(u_texture, vec2(topU, topV));
|
|
}
|
|
|
|
|
|
gl_FragColor.a *= opacity;
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
`,yk=`precision highp float;
|
|
|
|
#define ambientRatio 0.5
|
|
#define diffuseRatio 0.3
|
|
#define specularRatio 0.2
|
|
|
|
attribute vec4 a_Color;
|
|
attribute vec3 a_Position;
|
|
attribute vec3 a_Normal;
|
|
attribute float a_Size;
|
|
attribute vec3 a_uvs;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
|
|
varying vec4 v_Color;
|
|
uniform float u_heightfixed: 0.0; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A
|
|
uniform float u_raisingHeight: 0.0;
|
|
uniform float u_opacity: 1.0;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "light"
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
v_Color = a_Color;
|
|
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - a_Position.z(judge side by a_Position.z)
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1] - u - v
|
|
0.0, 0.0, 0.0, 0.0 // sidey
|
|
);
|
|
|
|
styleMappingMat[0][3] = a_Position.z;
|
|
styleMappingMat[2][2] = a_uvs[0];
|
|
styleMappingMat[2][3] = 1.0 - a_uvs[1];
|
|
styleMappingMat[3][0] = a_uvs[2];
|
|
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);
|
|
vec4 project_pos = project_position(pos);
|
|
|
|
if(u_heightfixed > 0.0) { // \u5224\u65AD\u51E0\u4F55\u4F53\u662F\u5426\u56FA\u5B9A\u9AD8\u5EA6
|
|
project_pos.z = a_Position.z * a_Size;
|
|
project_pos.z += u_raisingHeight;
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
project_pos.z *= mapboxZoomScale;
|
|
project_pos.z += u_raisingHeight * mapboxZoomScale;
|
|
}
|
|
}
|
|
|
|
// project_pos.z += 500000.0; // amap1
|
|
|
|
// project_pos.z += (500000.0 * 4.0)/pow(2.0, 21.0 - u_Zoom); // mapbox
|
|
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
// gl_Position = u_Mvp * (vec4(project_pos.xyz * vec3(1.0, 1.0, -1.0), 1.0));
|
|
gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));
|
|
}
|
|
|
|
float lightWeight = calc_lighting(pos);
|
|
styleMappingMat[3][1] = lightWeight;
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,RS=`uniform float u_opacity: 1.0;
|
|
uniform vec4 u_sourceColor;
|
|
uniform vec4 u_targetColor;
|
|
uniform float u_linearColor: 0;
|
|
|
|
uniform float u_topsurface: 1.0;
|
|
uniform float u_sidesurface: 1.0;
|
|
|
|
varying vec4 v_Color;
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
float isSide = styleMappingMat[0][3];
|
|
float sidey = styleMappingMat[3][0];
|
|
float lightWeight = styleMappingMat[3][1];
|
|
|
|
// Tip: \u90E8\u5206\u673A\u578B GPU \u8BA1\u7B97\u7CBE\u5EA6\u517C\u5BB9
|
|
if(isSide < 0.999) {
|
|
// side face
|
|
if(u_sidesurface < 1.0) {
|
|
discard;
|
|
}
|
|
|
|
if( u_linearColor == 1.0) {
|
|
// side use linear
|
|
vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey);
|
|
linearColor.rgb *= lightWeight;
|
|
gl_FragColor = linearColor;
|
|
} else {
|
|
// side notuse linear
|
|
gl_FragColor = v_Color;
|
|
}
|
|
} else {
|
|
// top face
|
|
if(u_topsurface < 1.0) {
|
|
discard;
|
|
}
|
|
gl_FragColor = v_Color;
|
|
}
|
|
|
|
gl_FragColor.a *= opacity;
|
|
gl_FragColor = filterColorAlpha(gl_FragColor, lightWeight);
|
|
}
|
|
`,_k=`precision highp float;
|
|
|
|
#define ambientRatio 0.5
|
|
#define diffuseRatio 0.3
|
|
#define specularRatio 0.2
|
|
|
|
attribute vec4 a_Color;
|
|
attribute vec3 a_Position;
|
|
attribute vec3 a_Normal;
|
|
attribute float a_Size;
|
|
attribute vec3 a_uvs;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
|
|
varying vec4 v_Color;
|
|
uniform float u_heightfixed: 0.0; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A
|
|
uniform float u_raisingHeight: 0.0;
|
|
uniform float u_opacity: 1.0;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "light"
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - isSide
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0 // sidey
|
|
);
|
|
styleMappingMat[0][3] = a_Position.z;
|
|
styleMappingMat[3][0] = a_uvs[2];
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);
|
|
vec4 project_pos = project_position(pos);
|
|
|
|
if(u_heightfixed > 0.0) { // \u5224\u65AD\u51E0\u4F55\u4F53\u662F\u5426\u56FA\u5B9A\u9AD8\u5EA6
|
|
project_pos.z = a_Position.z * a_Size;
|
|
project_pos.z += u_raisingHeight;
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
project_pos.z *= mapboxZoomScale;
|
|
project_pos.z += u_raisingHeight * mapboxZoomScale;
|
|
}
|
|
}
|
|
|
|
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
// gl_Position = u_Mvp * (vec4(project_pos.xyz * vec3(1.0, 1.0, -1.0), 1.0));
|
|
gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));
|
|
}
|
|
|
|
float lightWeight = calc_lighting(pos);
|
|
// v_Color = a_Color;
|
|
v_Color = vec4(a_Color.rgb * lightWeight, a_Color.w);
|
|
|
|
styleMappingMat[3][1] = lightWeight;
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
`,xk=function(n){(0,zt.Z)(a,n);var l=Am(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.heightfixed,w=m===void 0?!1:m,A=u.raisingHeight,R=A===void 0?0:A,B=u.topsurface,G=B===void 0?!0:B,j=u.sidesurface,lt=j===void 0?!0:j,ct=u.sourceColor,_t=u.targetColor;if(this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:v})){this.judgeStyleAttributes({opacity:v});var Vt=this.layer.getEncodedData(),ce=this.calDataFrame(this.cellLength,Vt,this.cellProperties),ae=ce.data,ze=ce.width,$e=ce.height;this.rowCount=$e,this.dataTexture=this.cellLength>0&&ae.length>0?this.createTexture2D({flipY:!0,data:ae,format:ne.LUMINANCE,type:ne.FLOAT,width:ze,height:$e}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}var xr=0,Or=[1,1,1,1],Zr=[1,1,1,1];return ct&&_t&&(Or=Lo(ct),Zr=Lo(_t),xr=1),{u_topsurface:Number(G),u_sidesurface:Number(lt),u_heightfixed:Number(w),u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_raisingHeight:Number(R),u_opacity:(0,Fn.isNumber)(v)?v:1,u_linearColor:xr,u_sourceColor:Or,u_targetColor:Zr,u_texture:this.texture}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return this.loadTexture(),m.next=3,this.buildModels();case 3:return m.abrupt("return",m.sent);case 4:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j,lt,ct;return ot().wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,B=this.getShaders(),G=B.frag,j=B.vert,lt=B.type,Vt.next=4,this.layer.buildLayerModel({moduleName:lt,vertexShader:j,fragmentShader:G,triangulation:Z5,stencil:Zo(w,R)});case 4:return ct=Vt.sent,Vt.abrupt("return",[ct]);case 6:case"end":return Vt.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getShaders",value:function(){var u=this.layer.getLayerConfig(),h=u.pickLight,v=u.mapTexture;return v?{frag:mk,vert:yk,type:"polygonExtrudeTexture"}:h?{frag:RS,vert:_k,type:"polygonExtrudePickLight"}:{frag:OS,vert:FS,type:"polygonExtrude"}}},{key:"clearModels",value:function(){var u,h;(u=this.dataTexture)===null||u===void 0||u.destroy(),(h=this.texture)===null||h===void 0||h.destroy()}},{key:"registerBuiltinAttributes",value:function(){var u=this.layer.getSource().extent,h=(0,yt.Z)(u,4),v=h[0],m=h[1],w=h[2],A=h[3],R=w-v,B=A-m;this.styleAttributeService.registerStyleAttribute({name:"uvs",type:ea.Attribute,descriptor:{name:"a_uvs",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(j,lt,ct){var _t=ct[0],Vt=ct[1];return[(_t-v)/R,(Vt-m)/B,ct[4]]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:ea.Attribute,descriptor:{name:"a_Normal",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(j,lt,ct,_t,Vt){return Vt}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:ea.Attribute,descriptor:{name:"a_Size",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(j){var lt=j.size,ct=lt===void 0?10:lt;return Array.isArray(ct)?[ct[0]]:[ct]}}})}},{key:"loadTexture",value:function(){var u=this,h=this.layer.getLayerConfig(),v=h.mapTexture,m=this.rendererService.createTexture2D;if(this.texture=m({height:0,width:0}),v){var w=new Image;w.crossOrigin="",w.src=v,w.onload=function(){u.texture=m({data:w,width:w.width,height:w.height,wrapS:ne.CLAMP_TO_EDGE,wrapT:ne.CLAMP_TO_EDGE,min:ne.LINEAR,mag:ne.LINEAR}),u.layerService.reRender()}}}}]),a}($o);function bk(n){var l=Ek();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Ek(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var wk=`uniform float u_opacity: 1.0;
|
|
varying vec4 v_color;
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
gl_FragColor = v_color;
|
|
gl_FragColor.a *= opacity;
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
`,DS=`uniform float u_opacity: 1.0;
|
|
varying vec4 v_Color;
|
|
varying mat4 styleMappingMat; // \u4F20\u9012\u4ECE\u7247\u5143\u4E2D\u4F20\u9012\u7684\u6620\u5C04\u6570\u636E
|
|
|
|
#pragma include "picking"
|
|
uniform float u_opacitylinear: 0.0;
|
|
uniform float u_dir: 1.0;
|
|
varying vec3 v_linear;
|
|
varying vec2 v_pos;
|
|
|
|
|
|
void main() {
|
|
float opacity = styleMappingMat[0][0];
|
|
gl_FragColor = v_Color;
|
|
|
|
if(u_opacitylinear > 0.0) {
|
|
gl_FragColor.a *= u_dir == 1.0 ? 1.0 - length(v_pos - v_linear.xy)/v_linear.z : length(v_pos - v_linear.xy)/v_linear.z;
|
|
}
|
|
|
|
gl_FragColor.a *= opacity;
|
|
gl_FragColor = filterColor(gl_FragColor);
|
|
}
|
|
`,Sk=`attribute vec4 a_Color;
|
|
attribute vec3 a_Position;
|
|
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
uniform float u_opacity: 1.0;
|
|
uniform float u_raisingHeight: 0.0;
|
|
|
|
varying vec4 v_Color;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "picking"
|
|
|
|
uniform float u_opacitylinear: 0.0;
|
|
|
|
attribute vec3 a_linear;
|
|
varying vec3 v_linear;
|
|
varying vec2 v_pos;
|
|
|
|
void main() {
|
|
if(u_opacitylinear > 0.0) {
|
|
v_linear = a_linear;
|
|
v_pos = a_Position.xy;
|
|
}
|
|
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
v_Color = a_Color;
|
|
vec4 project_pos = project_position(vec4(a_Position, 1.0));
|
|
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));
|
|
project_pos.z += u_raisingHeight;
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
project_pos.z *= mapboxZoomScale;
|
|
project_pos.z += u_raisingHeight * mapboxZoomScale;
|
|
}
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));
|
|
}
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}`,O0=`attribute vec4 a_Color;
|
|
attribute vec3 a_Position;
|
|
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
|
|
uniform float u_opacity: 1.0;
|
|
uniform float u_raisingHeight: 0.0;
|
|
|
|
varying vec4 v_color;
|
|
varying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143
|
|
|
|
#pragma include "styleMapping"
|
|
#pragma include "styleMappingCalOpacity"
|
|
|
|
#pragma include "projection"
|
|
#pragma include "picking"
|
|
|
|
void main() {
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
styleMappingMat = mat4(
|
|
0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty
|
|
0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA
|
|
0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]
|
|
0.0, 0.0, 0.0, 0.0
|
|
);
|
|
|
|
float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C
|
|
float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217
|
|
float columnWidth = 1.0/columnCount; // \u5217\u5BBD
|
|
float rowHeight = 1.0/rowCount; // \u884C\u9AD8
|
|
float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets
|
|
float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9
|
|
float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C
|
|
float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217
|
|
|
|
// cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ...
|
|
// \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C
|
|
float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF
|
|
|
|
vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);
|
|
styleMappingMat[0][0] = opacityAndOffset.r;
|
|
textureOffset = opacityAndOffset.g;
|
|
// cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97
|
|
|
|
v_color = a_Color;
|
|
vec4 project_pos = project_position(vec4(a_Position, 1.0));
|
|
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));
|
|
|
|
project_pos.z += u_raisingHeight;
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
|
|
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
|
|
project_pos.z *= mapboxZoomScale;
|
|
project_pos.z += u_raisingHeight * mapboxZoomScale;
|
|
}
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));
|
|
}
|
|
|
|
setPickingColor(a_PickingColor);
|
|
}
|
|
|
|
`,Tm=function(n){(0,zt.Z)(a,n);var l=bk(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.raisingHeight,v=h===void 0?0:h,m=u.opacity,w=m===void 0?1:m,A=u.opacityLinear,R=A===void 0?{enable:!1,dir:"in"}:A;if(this.dataTextureTest&&this.dataTextureNeedUpdate({opacity:w})){this.judgeStyleAttributes({opacity:w});var B=this.layer.getEncodedData(),G=this.calDataFrame(this.cellLength,B,this.cellProperties),j=G.data,lt=G.width,ct=G.height;this.rowCount=ct,this.dataTexture=this.cellLength>0&&j.length>0?this.createTexture2D({flipY:!0,data:j,format:ne.LUMINANCE,type:ne.FLOAT,width:lt,height:ct}):this.createTexture2D({flipY:!0,data:[1],format:ne.LUMINANCE,type:ne.FLOAT,width:1,height:1})}return{u_dataTexture:this.dataTexture,u_cellTypeLayout:this.getCellTypeLayout(),u_raisingHeight:Number(v),u_opacity:(0,Fn.isNumber)(w)?w:1,u_opacitylinear:Number(R.enable),u_dir:R.dir==="in"?1:0}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.buildModels();case 2:return m.abrupt("return",m.sent);case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j,lt,ct,_t,Vt,ce,ae;return ot().wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return v=this.getModelParams(),m=v.frag,w=v.vert,A=v.triangulation,R=v.type,B=this.layer.getLayerConfig(),G=B.mask,j=G===void 0?!1:G,lt=B.maskInside,ct=lt===void 0?!0:lt,_t=B.workerEnabled,Vt=_t===void 0?!1:_t,ce=B.enablePicking,this.layer.triangulation=A,$e.next=5,this.layer.buildLayerModel({moduleName:R,vertexShader:w,fragmentShader:m,triangulation:A,primitive:ne.TRIANGLES,depth:{enable:!1},blend:this.getBlend(),stencil:Zo(j,ct),workerEnabled:Vt,workerOptions:{modelType:R,enablePicking:ce}});case 5:return ae=$e.sent,$e.abrupt("return",[ae]);case 7:case"end":return $e.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u;(u=this.dataTexture)===null||u===void 0||u.destroy()}},{key:"registerBuiltinAttributes",value:function(){var u=this.layer.getLayerConfig(),h=u.opacityLinear,v=h===void 0?{enable:!1,dir:"in"}:h;v.enable&&this.styleAttributeService.registerStyleAttribute({name:"linear",type:ea.Attribute,descriptor:{name:"a_linear",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:3,update:function(w,A,R){return[R[3],R[4],R[5]]}}})}},{key:"getModelParams",value:function(){var u=this.layer.getLayerConfig(),h=u.opacityLinear,v=h===void 0?{enable:!1}:h;return v.enable?{frag:DS,vert:Sk,type:"polygonLinear",triangulation:U5}:{frag:wk,vert:O0,type:"polygonFill",triangulation:sn}}}]),a}($o);function _g(n){var l=BS();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function BS(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Ck=`
|
|
uniform float u_time: 0.0;
|
|
uniform float u_opacity: 1.0;
|
|
|
|
varying vec2 v_uv;
|
|
|
|
float coast2water_fadedepth = 0.10;
|
|
float large_waveheight = .750; // change to adjust the "heavy" waves
|
|
float large_wavesize = 3.4; // factor to adjust the large wave size
|
|
float small_waveheight = 0.6; // change to adjust the small random waves
|
|
float small_wavesize = 0.5; // factor to ajust the small wave size
|
|
float water_softlight_fact = 15.; // range [1..200] (should be << smaller than glossy-fact)
|
|
float water_glossylight_fact= 120.; // range [1..200]
|
|
float particle_amount = 70.;
|
|
// vec3 watercolor = vec3(0.43, 0.60, 0.66); // 'transparent' low-water color (RGB)
|
|
// vec3 watercolor2 = vec3(0.06, 0.07, 0.11); // deep-water color (RGB, should be darker than the low-water color)
|
|
uniform vec4 u_watercolor;
|
|
uniform vec4 u_watercolor2;
|
|
vec3 water_specularcolor = vec3(1.3, 1.3, 0.9); // specular Color (RGB) of the water-highlights
|
|
#define light vec3(-0., sin(u_time*0.5)*.5 + .35, 2.8) // position of the sun
|
|
|
|
uniform sampler2D u_texture1;
|
|
uniform sampler2D u_texture2;
|
|
uniform sampler2D u_texture3;
|
|
|
|
|
|
|
|
float hash( float n ) {
|
|
return fract(sin(n)*43758.5453123);
|
|
}
|
|
|
|
// 2d noise function
|
|
float noise1( in vec2 x ) {
|
|
vec2 p = floor(x);
|
|
vec2 f = smoothstep(0.0, 1.0, fract(x));
|
|
float n = p.x + p.y*57.0;
|
|
return mix(mix( hash(n+ 0.0), hash(n+ 1.0),f.x),
|
|
mix( hash(n+ 57.0), hash(n+ 58.0),f.x),f.y);
|
|
}
|
|
|
|
float noise(vec2 p) {
|
|
return texture2D(u_texture2,p*vec2(1./256.)).x;
|
|
}
|
|
|
|
vec4 highness(vec2 p) {
|
|
vec4 t = texture2D(u_texture1,fract(p));
|
|
float clipped = -2.0-smoothstep(3.,10.,t.a)*6.9-smoothstep(10.,100.,t.a)*89.9-smoothstep(0.,10000.,t.a)*10000.0;
|
|
return clamp(t, 0.0,3.0)+clamp(t/3.0-1.0, 0.0,1.0)+clamp(t/16.0-1.0, 0.0,1.0);
|
|
}
|
|
|
|
float height_map( vec2 p ) {
|
|
vec4 height=highness(p);
|
|
/*
|
|
height = -0.5+
|
|
0.5*smoothstep(-100.,0.,-height)+
|
|
2.75*smoothstep(0.,2.,height)+
|
|
1.75*smoothstep(2.,4.,height)+
|
|
2.75*smoothstep(4.,16.,height)+
|
|
1.5*smoothstep(16.,1000.,height);
|
|
*/
|
|
|
|
mat2 m = mat2( 0.9563*1.4, -0.2924*1.4, 0.2924*1.4, 0.9563*1.4 );
|
|
//p = p*6.;
|
|
float f = 0.6000*noise1( p ); p = m*p*1.1*6.;
|
|
f += 0.2500*noise( p ); p = m*p*1.32;
|
|
f += 0.1666*noise( p ); p = m*p*1.11;
|
|
f += 0.0834*noise( p ); p = m*p*1.12;
|
|
f += 0.0634*noise( p ); p = m*p*1.13;
|
|
f += 0.0444*noise( p ); p = m*p*1.14;
|
|
f += 0.0274*noise( p ); p = m*p*1.15;
|
|
f += 0.0134*noise( p ); p = m*p*1.16;
|
|
f += 0.0104*noise( p ); p = m*p*1.17;
|
|
f += 0.0084*noise( p );
|
|
f = .25*f+dot(height,vec4(-.03125,-.125,.25,.25))*.5;
|
|
const float FLAT_LEVEL = 0.92525;
|
|
//f = f*0.25+height*0.75;
|
|
if (f<FLAT_LEVEL)
|
|
f = f;
|
|
else
|
|
f = pow((f-FLAT_LEVEL)/(1.-FLAT_LEVEL), 2.)*(1.-FLAT_LEVEL)*2.0+FLAT_LEVEL; // makes a smooth coast-increase
|
|
return clamp(f, 0., 10.);
|
|
}
|
|
|
|
vec3 plasma_quintic( float x ) {
|
|
x = clamp( x, 0.0, 1.0);
|
|
vec4 x1 = vec4( 1.0, x, x * x, x * x * x ); // 1 x x2 x3
|
|
vec4 x2 = x1 * x1.w * x; // x4 x5 x6 x7
|
|
return vec3(
|
|
dot( x1.xyzw, vec4( +0.063861086, +1.992659096, -1.023901152, -0.490832805 ) ) + dot( x2.xy, vec2( +1.308442123, -0.914547012 ) ),
|
|
dot( x1.xyzw, vec4( +0.049718590, -0.791144343, +2.892305078, +0.811726816 ) ) + dot( x2.xy, vec2( -4.686502417, +2.717794514 ) ),
|
|
dot( x1.xyzw, vec4( +0.513275779, +1.580255060, -5.164414457, +4.559573646 ) ) + dot( x2.xy, vec2( -1.916810682, +0.570638854 ) ) );
|
|
}
|
|
|
|
vec4 color(vec2 p){
|
|
vec4 c1 = vec4(1.7,1.6,.9,1);
|
|
vec4 c2 = vec4(.2,.94,.1,1);
|
|
vec4 c3 = vec4(.3,.2,.0,1);
|
|
vec4 c4 = vec4(.99,.99,1.6,1);
|
|
vec4 v = highness(p);
|
|
float los = smoothstep(0.1,1.1,v.b);
|
|
float his = smoothstep(3.5,6.5,v.b);
|
|
float ces = smoothstep(1.,5.,v.a);
|
|
vec4 lo = mix(c1,c2,los);
|
|
vec4 hi = mix(c3,c4,his);
|
|
vec4 ce = mix(lo,hi,ces);
|
|
|
|
return vec4(plasma_quintic(ces),1).ragb;
|
|
}
|
|
|
|
vec3 terrain_map( vec2 p )
|
|
{
|
|
return color(p).rgb*0.75+0.25*vec3(0.7, .55, .4)+texture2D(u_texture3, fract(p*5.)).rgb*.5; // test-terrain is simply 'sandstone'
|
|
}
|
|
|
|
const mat2 m = mat2( 0.72, -1.60, 1.60, 0.72 );
|
|
|
|
float water_map( vec2 p, float height ) {
|
|
vec2 p2 = p*large_wavesize;
|
|
vec2 shift1 = 0.001*vec2( u_time*160.0*2.0, u_time*120.0*2.0 );
|
|
vec2 shift2 = 0.001*vec2( u_time*190.0*2.0, -u_time*130.0*2.0 );
|
|
|
|
// coarse crossing 'ocean' waves...
|
|
float f = 0.6000*noise( p );
|
|
f += 0.2500*noise( p*m );
|
|
f += 0.1666*noise( p*m*m );
|
|
float wave = sin(p2.x*0.622+p2.y*0.622+shift2.x*4.269)*large_waveheight*f*height*height ;
|
|
|
|
p *= small_wavesize;
|
|
f = 0.;
|
|
float amp = 1.0, s = .5;
|
|
for (int i=0; i<9; i++)
|
|
{ p = m*p*.947; f -= amp*abs(sin((noise( p+shift1*s )-.5)*2.)); amp = amp*.59; s*=-1.329; }
|
|
|
|
return wave+f*small_waveheight;
|
|
}
|
|
|
|
float nautic(vec2 p) {
|
|
p *= 18.;
|
|
float f = 0.;
|
|
float amp = 1.0, s = .5;
|
|
for (int i=0; i<3; i++)
|
|
{ p = m*p*1.2; f += amp*abs(smoothstep(0., 1., noise( p+u_time*s ))-.5); amp = amp*.5; s*=-1.227; }
|
|
return pow(1.-f, 5.);
|
|
}
|
|
|
|
float particles(vec2 p) {
|
|
p *= 200.;
|
|
float f = 0.;
|
|
float amp = 1.0, s = 1.5;
|
|
for (int i=0; i<3; i++)
|
|
{ p = m*p*1.2; f += amp*noise( p+u_time*s ); amp = amp*.5; s*=-1.227; }
|
|
return pow(f*.35, 7.)*particle_amount;
|
|
}
|
|
|
|
float test_shadow( vec2 xy, float height) {
|
|
vec3 r0 = vec3(xy, height);
|
|
vec3 rd = normalize( light - r0 );
|
|
|
|
float hit = 1.0;
|
|
float t = 0.001;
|
|
for (int j=1; j<25; j++)
|
|
{
|
|
vec3 p = r0 + t*rd;
|
|
float h = height_map( p.xy );
|
|
float height_diff = p.z - h;
|
|
if (height_diff<0.0)
|
|
{
|
|
return 0.0;
|
|
}
|
|
t += 0.01+height_diff*.02;
|
|
hit = min(hit, 2.*height_diff/t); // soft shaddow
|
|
}
|
|
return hit;
|
|
}
|
|
|
|
vec3 CalcTerrain(vec2 uv, float height) {
|
|
vec3 col = terrain_map( uv );
|
|
vec2 iResolution = vec2(512.);
|
|
float h1 = height_map(uv-vec2(0., 0.5)/ iResolution.xy);
|
|
float h2 = height_map(uv+vec2(0., 0.5)/ iResolution.xy);
|
|
float h3 = height_map(uv-vec2(0.5, 0.)/ iResolution.xy);
|
|
float h4 = height_map(uv+vec2(0.5, 0.)/ iResolution.xy);
|
|
vec3 norm = normalize(vec3(h3-h4, h1-h2, 1.));
|
|
vec3 r0 = vec3(uv, height);
|
|
vec3 rd = normalize( light - r0 );
|
|
float grad = dot(norm, rd);
|
|
col *= grad+pow(grad, 8.);
|
|
float terrainshade = test_shadow( uv, height );
|
|
col = mix(col*.25, col, terrainshade);
|
|
return col;
|
|
}
|
|
|
|
|
|
void main() {
|
|
vec3 watercolor = u_watercolor.rgb;
|
|
vec3 watercolor2 = u_watercolor2.rgb;
|
|
vec2 uv = v_uv;
|
|
float WATER_LEVEL = 0.84; // Water level (range: 0.0 - 2.0)
|
|
float deepwater_fadedepth = 0.4 + coast2water_fadedepth;
|
|
float height = height_map( uv );
|
|
vec3 col;
|
|
|
|
float waveheight = clamp(WATER_LEVEL*3.-1.5, 0., 1.);
|
|
float level = WATER_LEVEL + .2*water_map(uv*15. + vec2(u_time*.1), waveheight);
|
|
if (height > level)
|
|
{
|
|
col = CalcTerrain(uv, height);
|
|
}
|
|
if (height <= level)
|
|
{
|
|
vec2 dif = vec2(.0, .01);
|
|
vec2 pos = uv*15. + vec2(u_time*.01);
|
|
float h1 = water_map(pos-dif,waveheight);
|
|
float h2 = water_map(pos+dif,waveheight);
|
|
float h3 = water_map(pos-dif.yx,waveheight);
|
|
float h4 = water_map(pos+dif.yx,waveheight);
|
|
vec3 normwater = normalize(vec3(h3-h4, h1-h2, .125)); // norm-vector of the 'bumpy' water-plane
|
|
uv += normwater.xy*.002*(level-height);
|
|
|
|
col = CalcTerrain(uv, height);
|
|
|
|
float coastfade = clamp((level-height)/coast2water_fadedepth, 0., 1.);
|
|
float coastfade2= clamp((level-height)/deepwater_fadedepth, 0., 1.);
|
|
float intensity = col.r*.2126+col.g*.7152+col.b*.0722;
|
|
watercolor = mix(watercolor*intensity, watercolor2, smoothstep(0., 1., coastfade2));
|
|
|
|
vec3 r0 = vec3(uv, WATER_LEVEL);
|
|
vec3 rd = normalize( light - r0 ); // ray-direction to the light from water-position
|
|
float grad = dot(normwater, rd); // dot-product of norm-vector and light-direction
|
|
float specular = pow(grad, water_softlight_fact); // used for soft highlights
|
|
float specular2= pow(grad, water_glossylight_fact); // used for glossy highlights
|
|
float gradpos = dot(vec3(0., 0., 1.), rd);
|
|
float specular1= smoothstep(0., 1., pow(gradpos, 5.)); // used for diffusity (some darker corona around light's specular reflections...)
|
|
float watershade = test_shadow( uv, level );
|
|
watercolor *= 2.2+watershade;
|
|
watercolor += (.2+.8*watershade) * ((grad-1.0)*.5+specular) * .25;
|
|
watercolor /= (1.+specular1*1.25);
|
|
watercolor += watershade*specular2*water_specularcolor;
|
|
watercolor += watershade*coastfade*(1.-coastfade2)*(vec3(.5, .6, .7)*nautic(uv)+vec3(1., 1., 1.)*particles(uv));
|
|
|
|
col = mix(col, watercolor, coastfade);
|
|
}
|
|
|
|
|
|
float opacity = u_opacity;
|
|
gl_FragColor = vec4(col, opacity);
|
|
}
|
|
`,Ak=`attribute vec2 a_uv;
|
|
attribute vec3 a_Position;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
|
|
varying vec2 v_uv;
|
|
|
|
#pragma include "projection"
|
|
|
|
void main() {
|
|
v_uv = a_uv;
|
|
|
|
vec4 project_pos = project_position(vec4(a_Position, 1.0));
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));
|
|
}
|
|
}
|
|
|
|
`,xg=function(n){(0,zt.Z)(a,n);var l=_g(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.watercolor,w=m===void 0?"#6D99A8":m,A=u.watercolor2,R=A===void 0?"#0F121C":A;return{u_texture1:this.texture1,u_texture2:this.texture2,u_texture3:this.texture3,u_watercolor:Lo(w),u_watercolor2:Lo(R),u_opacity:(0,Fn.isNumber)(v)?v:1}}},{key:"getAnimateUniforms",value:function(){return{u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return this.loadTexture(),m.next=3,this.buildModels();case 3:return m.abrupt("return",m.sent);case 4:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B;return ot().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,j.next=3,this.layer.buildLayerModel({moduleName:"polygonOcean",vertexShader:Ak,fragmentShader:Ck,triangulation:Tx,primitive:ne.TRIANGLES,depth:{enable:!1},stencil:Zo(w,R)});case 3:return B=j.sent,j.abrupt("return",[B]);case 5:case"end":return j.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u,h,v;(u=this.texture1)===null||u===void 0||u.destroy(),(h=this.texture2)===null||h===void 0||h.destroy(),(v=this.texture3)===null||v===void 0||v.destroy()}},{key:"registerBuiltinAttributes",value:function(){var u=this.layer.getSource().extent,h=(0,yt.Z)(u,4),v=h[0],m=h[1],w=h[2],A=h[3],R=w-v,B=A-m;this.styleAttributeService.registerStyleAttribute({name:"oceanUv",type:ea.Attribute,descriptor:{name:"a_uv",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(j,lt,ct,_t){var Vt=j.version===Oc["GAODE2.x"]?j.originCoordinates[0][_t]:ct,ce=(0,yt.Z)(Vt,2),ae=ce[0],ze=ce[1];return[(ae-v)/R,(ze-m)/B]}}})}},{key:"loadTexture",value:function(){var u=this,h=this.rendererService.createTexture2D,v={height:0,width:0};this.texture1=h(v),this.texture2=h(v),this.texture3=h(v),m(function(A){u.texture1=w(A[0]),u.texture2=w(A[1]),u.texture3=w(A[2]),u.layerService.reRender()});function m(A){var R=0,B=[],G=["https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*EojwT4VzSiYAAAAAAAAAAAAAARQnAQ","https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*MJ22QbpuCzIAAAAAAAAAAAAAARQnAQ","https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*-z2HSIVDsHIAAAAAAAAAAAAAARQnAQ"];G.map(function(j){var lt=new Image;lt.crossOrigin="",lt.src=j,B.push(lt),lt.onload=function(){R++,R===3&&A(B)}})}function w(A){return h({data:A,width:A.width,height:A.height,wrapS:ne.MIRRORED_REPEAT,wrapT:ne.MIRRORED_REPEAT,min:ne.LINEAR,mag:ne.LINEAR})}}}]),a}($o);function NS(n){var l=Tk();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Tk(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Mk=`uniform sampler2D u_texture;
|
|
uniform float u_time: 0.0;
|
|
uniform float u_speed: 1.0;
|
|
uniform float u_opacity: 1.0;
|
|
|
|
varying vec4 v_Color;
|
|
varying vec2 v_uv;
|
|
|
|
float rand(vec2 n) { return 0.5 + 0.5 * fract(sin(dot(n.xy, vec2(12.9898, 78.233)))* 43758.5453); }
|
|
|
|
float water(vec3 p) {
|
|
float t = u_time * u_speed;
|
|
p.z += t * 2.; p.x += t * 2.;
|
|
vec3 c1 = texture2D(u_texture, p.xz / 30.).xyz;
|
|
p.z += t * 3.; p.x += t * 0.52;
|
|
vec3 c2 = texture2D(u_texture, p.xz / 30.).xyz;
|
|
p.z += t * 4.; p.x += t * 0.8;
|
|
vec3 c3 = texture2D(u_texture, p.xz / 30.).xyz;
|
|
c1 += c2 - c3;
|
|
float z = (c1.x + c1.y + c1.z) / 3.;
|
|
return p.y + z / 4.;
|
|
}
|
|
|
|
float map(vec3 p) {
|
|
float d = 100.0;
|
|
d = water(p);
|
|
return d;
|
|
}
|
|
|
|
float intersect(vec3 ro, vec3 rd) {
|
|
float d = 0.0;
|
|
for (int i = 0; i <= 100; i++) {
|
|
float h = map(ro + rd * d);
|
|
if (h < 0.1) return d;
|
|
d += h;
|
|
}
|
|
return 0.0;
|
|
}
|
|
|
|
vec3 norm(vec3 p) {
|
|
float eps = .1;
|
|
return normalize(vec3(
|
|
map(p + vec3(eps, 0, 0)) - map(p + vec3(-eps, 0, 0)),
|
|
map(p + vec3(0, eps, 0)) - map(p + vec3(0, -eps, 0)),
|
|
map(p + vec3(0, 0, eps)) - map(p + vec3(0, 0, -eps))
|
|
));
|
|
}
|
|
|
|
float calSpc() {
|
|
vec3 l1 = normalize(vec3(1, 1, 1));
|
|
vec3 ro = vec3(-3, 20, -8);
|
|
vec3 rc = vec3(0, 0, 0);
|
|
vec3 ww = normalize(rc - ro);
|
|
vec3 uu = normalize(cross(vec3(0,1,0), ww));
|
|
vec3 vv = normalize(cross(rc - ro, uu));
|
|
vec3 rd = normalize(uu * v_uv.x + vv * v_uv.y + ww);
|
|
float d = intersect(ro, rd);
|
|
vec3 p = ro + rd * d;
|
|
vec3 n = norm(p);
|
|
float spc = pow(max(0.0, dot(reflect(l1, n), rd)), 30.0);
|
|
return spc;
|
|
}
|
|
|
|
void main() {
|
|
float opacity = u_opacity;
|
|
gl_FragColor = v_Color;
|
|
gl_FragColor.a *= opacity;
|
|
|
|
float spc = calSpc();
|
|
gl_FragColor += spc * 0.4;
|
|
}
|
|
`,Ik=`attribute vec4 a_Color;
|
|
attribute vec2 a_uv;
|
|
attribute vec3 a_Position;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
|
|
varying vec4 v_Color;
|
|
varying vec2 v_uv;
|
|
uniform float u_opacity: 1.0;
|
|
|
|
|
|
#pragma include "projection"
|
|
|
|
void main() {
|
|
v_uv = a_uv;
|
|
|
|
v_Color = a_Color;
|
|
vec4 project_pos = project_position(vec4(a_Position, 1.0));
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));
|
|
}
|
|
}
|
|
|
|
`,zS=function(n){(0,zt.Z)(a,n);var l=NS(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.speed,w=m===void 0?.5:m;return{u_texture:this.texture,u_speed:w,u_opacity:(0,Fn.isNumber)(v)?v:1}}},{key:"getAnimateUniforms",value:function(){return{u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return this.loadTexture(),m.next=3,this.buildModels();case 3:return m.abrupt("return",m.sent);case 4:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B;return ot().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,j.next=3,this.layer.buildLayerModel({moduleName:"polygonWater",vertexShader:Ik,fragmentShader:Mk,triangulation:Tx,primitive:ne.TRIANGLES,depth:{enable:!1},stencil:Zo(w,R)});case 3:return B=j.sent,j.abrupt("return",[B]);case 5:case"end":return j.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u;(u=this.texture)===null||u===void 0||u.destroy()}},{key:"registerBuiltinAttributes",value:function(){var u=this.layer.getSource().extent,h=(0,yt.Z)(u,4),v=h[0],m=h[1],w=h[2],A=h[3],R=w-v,B=A-m;this.styleAttributeService.registerStyleAttribute({name:"waterUv",type:ea.Attribute,descriptor:{name:"a_uv",buffer:{usage:ne.STATIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(j,lt,ct,_t){var Vt=j.version===Oc["GAODE2.x"]?j.originCoordinates[0][_t]:ct,ce=(0,yt.Z)(Vt,2),ae=ce[0],ze=ce[1];return[(ae-v)/R,(ze-m)/B]}}})}},{key:"loadTexture",value:function(){var u=this,h=this.layer.getLayerConfig(),v=h.waterTexture,m=this.rendererService.createTexture2D;this.texture=m({height:0,width:0});var w=new Image;w.crossOrigin="",v?(console.warn("L7 recommend\uFF1Ahttps://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*EojwT4VzSiYAAAAAAAAAAAAAARQnAQ"),w.src=v):w.src="https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*EojwT4VzSiYAAAAAAAAAAAAAARQnAQ",w.onload=function(){u.texture=m({data:w,width:w.width,height:w.height,wrapS:ne.MIRRORED_REPEAT,wrapT:ne.MIRRORED_REPEAT,min:ne.LINEAR,mag:ne.LINEAR}),u.layerService.reRender()}}}]),a}($o),kk={fill:Tm,line:nS,extrude:xk,text:kS,point_fill:yg,point_image:mS,point_normal:xS,point_extrude:Fx,water:zS,ocean:xg},Lk=kk;function Pk(n){var l=Ok();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Ok(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var _1=function(n){(0,zt.Z)(a,n);var l=Pk(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"type","PolygonLayer"),s}return(0,et.Z)(a,[{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return v=this.getModelType(),this.layerModel=new Lk[v](this),w.next=4,this.initLayerModels();case 4:case"end":return w.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getModelType",value:function(){var u,h=this.styleAttributeService.getLayerStyleAttribute("shape"),v=h==null||(u=h.scale)===null||u===void 0?void 0:u.field;return v==="fill"?"fill":v==="extrude"?"extrude":v==="water"?"water":v==="ocean"?"ocean":v==="line"?"line":this.getPointModelType()}},{key:"getPointModelType",value:function(){var u=this.getEncodedData(),h=this.getLayerConfig(),v=h.shape2d,m=h.shape3d,w=this.iconService.getIconMap(),A=u.find(function(B){return B.hasOwnProperty("shape")});if(A){var R=A.shape;return R==="dot"?"point_normal":(v==null?void 0:v.indexOf(R))!==-1?"point_fill":(m==null?void 0:m.indexOf(R))!==-1?"point_extrude":w.hasOwnProperty(R)?"point_image":"text"}else return"fill"}}]),a}(hg);function Fk(n){var l=Rk();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Rk(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Dk=`uniform float u_opacity : 1.0;
|
|
uniform vec4 u_color;
|
|
|
|
void main() {
|
|
gl_FragColor = u_color;
|
|
gl_FragColor.a *= u_opacity;
|
|
}
|
|
`,Bk=`attribute vec3 a_Position;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
|
|
#pragma include "projection"
|
|
|
|
void main() {
|
|
vec4 project_pos = project_position(vec4(a_Position, 1.0));
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));
|
|
}
|
|
}
|
|
|
|
`,Gx=function(n){(0,zt.Z)(a,n);var l=Fk(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?0:h,m=u.color,w=m===void 0?"#000":m;return{u_opacity:(0,Fn.isNumber)(v)?v:0,u_color:Lo(w)}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.buildModels();case 2:return m.abrupt("return",m.sent);case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.layer.buildLayerModel({moduleName:"mask",vertexShader:Bk,fragmentShader:Dk,triangulation:Tx,depth:{enable:!1},blend:this.getBlend(),stencil:{enable:!0,mask:255,func:{cmp:ne.ALWAYS,ref:1,mask:255},opFront:{fail:ne.REPLACE,zfail:ne.REPLACE,zpass:ne.REPLACE}},pick:!1});case 2:return v=w.sent,w.abrupt("return",[v]);case 4:case"end":return w.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;u&&this.layerService.clear()}},{key:"registerBuiltinAttributes",value:function(){return""}}]),a}($o),Nk={fill:Gx},zk=Nk;function Uk(n){var l=Zk();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Zk(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Hx=function(n){(0,zt.Z)(a,n);var l=Uk(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"type","MaskLayer"),s}return(0,et.Z)(a,[{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return v=this.getModelType(),this.layerModel=new zk[v](this),w.next=4,this.initLayerModels();case 4:case"end":return w.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getModelType",value:function(){return"fill"}}]),a}(hg),US,ZS,VS,F0,x1,Vk,_p,nd=(US=(0,At.b2)(),ZS=(0,At.f3)(Dt.IMapService),VS=(0,At.f3)(Dt.IFontService),US(F0=(x1=function(){function n(){(0,pt.Z)(this,n),Rn(this,"mapService",Vk,this),Rn(this,"fontService",_p,this)}return(0,et.Z)(n,[{key:"apply",value:function(a,s){var u=this,h=s.styleAttributeService;a.hooks.init.tapPromise("DataMappingPlugin",(0,J.Z)(ot().mark(function v(){return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:u.generateMaping(a,{styleAttributeService:h});case 1:case"end":return w.stop()}},v)}))),a.hooks.beforeRenderData.tapPromise("DataMappingPlugin",function(){var v=(0,J.Z)(ot().mark(function m(w){return ot().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(w){R.next=2;break}return R.abrupt("return",w);case 2:return a.dataState.dataMappingNeedUpdate=!1,R.abrupt("return",u.generateMaping(a,{styleAttributeService:h}));case 4:case"end":return R.stop()}},m)}));return function(m){return v.apply(this,arguments)}}()),a.hooks.beforeRender.tap("DataMappingPlugin",function(){var v=a.getSource();if(!(a.layerModelNeedUpdate||!v||!v.inited)){var m=h.getLayerStyleAttributes()||[],w=h.getLayerStyleAttribute("filter"),A=v.data.dataArray;if(!(Array.isArray(A)&&A.length===0)){var R=m.filter(function(j){return j.needRemapping}),B=A;if(w!=null&&w.needRemapping&&w!==null&&w!==void 0&&w.scale&&(B=A.filter(function(j){return u.applyAttributeMapping(w,j)[0]})),R.length){var G=u.mapping(a,R,B,a.getEncodedData());a.setEncodedData(G)}}}})}},{key:"generateMaping",value:function(a,s){var u=this,h=s.styleAttributeService,v=h.getLayerStyleAttributes()||[],m=h.getLayerStyleAttribute("filter"),w=a.getSource().data.dataArray,A=w;m!=null&&m.scale&&(A=w.filter(function(B){return u.applyAttributeMapping(m,B)[0]})),A=a.processData(A);var R=this.mapping(a,v,A,void 0);return a.setEncodedData(R),w.length===0&&a.encodeDataLength===0?!1:(a.emit("dataUpdate",null),!0)}},{key:"mapping",value:function(a,s,u,h){var v=this,m=a.getLayerConfig(),w=m.arrow,A=w===void 0?{enable:!1}:w,R=s.filter(function(G){return G.scale!==void 0}).filter(function(G){return G.name!=="filter"}),B=u.map(function(G,j){var lt=h?h[j]:{},ct=(0,K.Z)({id:G._id,coordinates:G.coordinates},lt);if(R.forEach(function(ce){var ae=v.applyAttributeMapping(ce,G);ce.name==="color"&&(ae=ae.map(function(ze){return Lo(ze)})),ct[ce.name]=Array.isArray(ae)&&ae.length===1?ae[0]:ae,ce.name==="shape"&&(ct.shape=v.fontService.getIconFontKey(ct[ce.name]))}),A.enable&&(ct.shape==="line"||ct.shape==="halfLine")){var _t=ct.coordinates;if(a.arrowInsertCount<a.encodeDataLength){var Vt=v.getArrowPoints(_t[0],_t[1]);ct.coordinates.splice(1,0,Vt,Vt),a.arrowInsertCount++}}return ct});return s.forEach(function(G){G.needRemapping=!1}),this.adjustData2Amap2Coordinates(B,a),this.adjustData2SimpleCoordinates(B),B}},{key:"adjustData2Amap2Coordinates",value:function(a,s){var u=this;if(a.length>0&&this.mapService.version===Oc["GAODE2.x"]){var h=s.coordCenter||s.getSource().center;typeof a[0].coordinates[0]=="number"?a.filter(function(v){return!v.originCoordinates}).map(function(v){v.version=Oc["GAODE2.x"],v.originCoordinates=(0,Fn.cloneDeep)(v.coordinates),v.coordinates=u.mapService.lngLatToCoordByLayer(v.coordinates,h)}):a.filter(function(v){return!v.originCoordinates}).map(function(v){v.version=Oc["GAODE2.x"],v.originCoordinates=(0,Fn.cloneDeep)(v.coordinates),v.coordinates=u.mapService.lngLatToCoordsByLayer(v.coordinates,h)})}}},{key:"adjustData2SimpleCoordinates",value:function(a){var s=this;a.length>0&&this.mapService.version===Oc.SIMPLE&&a.map(function(u){u.simpleCoordinate||(u.coordinates=s.unProjectCoordinates(u.coordinates),u.simpleCoordinate=!0)})}},{key:"unProjectCoordinates",value:function(a){var s=this;if(typeof a[0]=="number")return this.mapService.simpleMapCoord.unproject(a);if(a[0]&&a[0][0]instanceof Array){var u=[];return a.map(function(v){var m=[];v.map(function(w){m.push(s.mapService.simpleMapCoord.unproject(w))}),u.push(m)}),u}else{var h=[];return a.map(function(v){h.push(s.mapService.simpleMapCoord.unproject(v))}),h}}},{key:"applyAttributeMapping",value:function(a,s){var u;if(!a.scale)return[];var h=(a==null||(u=a.scale)===null||u===void 0?void 0:u.scalers)||[],v=[];h.forEach(function(w){var A,R=w.field;(s.hasOwnProperty(R)||((A=a.scale)===null||A===void 0?void 0:A.type)==="variable")&&v.push(s[R])});var m=a.mapping?a.mapping(v):[];return m}},{key:"getArrowPoints",value:function(a,s){var u=[s[0]-a[0],s[1]-a[1]],h=Re(u),v=[a[0]+h[0]*1e-4,a[1]+h[1]*1e-4];return v}}]),n}(),Vk=Ri(x1.prototype,"mapService",[ZS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),_p=Ri(x1.prototype,"fontService",[VS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),x1))||F0),Gv,jx,nv=(Gv=(0,At.b2)(),Gv(jx=function(){function n(){(0,pt.Z)(this,n)}return(0,et.Z)(n,[{key:"apply",value:function(a){var s=this;this.mapService=a.getContainer().get(Dt.IMapService),a.hooks.init.tapPromise("DataSourcePlugin",(0,J.Z)(ot().mark(function u(){var h,v,m,w;return ot().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(h=a.getSource(),h||(v=a.sourceOption||a.defaultSourceConfig,m=v.data,w=v.options,h=new T0(m,w),a.setSource(h)),!h.inited){R.next=6;break}s.updateClusterData(a),R.next=8;break;case 6:return R.next=8,new Promise(function(B){h.on("update",function(G){G.type==="inited"&&s.updateClusterData(a),B(null)})});case 8:case"end":return R.stop()}},u)}))),a.hooks.beforeRenderData.tapPromise("DataSourcePlugin",(0,J.Z)(ot().mark(function u(){var h,v;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return h=s.updateClusterData(a),v=a.dataState.dataSourceNeedUpdate,a.dataState.dataSourceNeedUpdate=!1,w.abrupt("return",h||v);case 4:case"end":return w.stop()}},u)})))}},{key:"updateClusterData",value:function(a){if(a.isTileLayer||a.tileLayer||!a.getSource())return!1;var s=a.getSource(),u=s.cluster,h=s.clusterOptions.zoom,v=h===void 0?0:h,m=this.mapService.getZoom()-1,w=a.dataState.dataSourceNeedUpdate;return u&&w&&s.updateClusterData(Math.floor(m)),u&&Math.abs(a.clusterZoom-m)>=1?(v!==Math.floor(m)&&s.updateClusterData(Math.floor(m)),a.clusterZoom=m,!0):!1}}]),n}())||jx);function Wx(n,l){return n<l?-1:n>l?1:n>=l?0:NaN}function GS(n){return n.length===1&&(n=Gk(n)),{left:function(l,a,s,u){for(s==null&&(s=0),u==null&&(u=l.length);s<u;){var h=s+u>>>1;n(l[h],a)<0?s=h+1:u=h}return s},right:function(l,a,s,u){for(s==null&&(s=0),u==null&&(u=l.length);s<u;){var h=s+u>>>1;n(l[h],a)>0?u=h:s=h+1}return s}}}function Gk(n){return function(l,a){return Wx(n(l),a)}}var HS=GS(Wx),Hk=HS.right,tF=HS.left,b1=Hk;function jS(n,l){var a=n.length,s=-1,u,h,v;if(l==null){for(;++s<a;)if((u=n[s])!=null&&u>=u)for(h=v=u;++s<a;)(u=n[s])!=null&&(h>u&&(h=u),v<u&&(v=u))}else for(;++s<a;)if((u=l(n[s],s,n))!=null&&u>=u)for(h=v=u;++s<a;)(u=l(n[s],s,n))!=null&&(h>u&&(h=u),v<u&&(v=u));return[h,v]}var WS=Array.prototype,eF=WS.slice,DR=WS.map,Mm=Math.sqrt(50),Hv=Math.sqrt(10),Xx=Math.sqrt(2);function XS(n,l,a){var s,u=-1,h,v,m;if(l=+l,n=+n,a=+a,n===l&&a>0)return[n];if((s=l<n)&&(h=n,n=l,l=h),(m=Im(n,l,a))===0||!isFinite(m))return[];if(m>0)for(n=Math.ceil(n/m),l=Math.floor(l/m),v=new Array(h=Math.ceil(l-n+1));++u<h;)v[u]=(n+u)*m;else for(n=Math.floor(n*m),l=Math.ceil(l*m),v=new Array(h=Math.ceil(n-l+1));++u<h;)v[u]=(n-u)/m;return s&&v.reverse(),v}function Im(n,l,a){var s=(l-n)/Math.max(0,a),u=Math.floor(Math.log(s)/Math.LN10),h=s/Math.pow(10,u);return u>=0?(h>=Mm?10:h>=Hv?5:h>=Xx?2:1)*Math.pow(10,u):-Math.pow(10,-u)/(h>=Mm?10:h>=Hv?5:h>=Xx?2:1)}function Yx(n,l,a){var s=Math.abs(l-n)/Math.max(0,a),u=Math.pow(10,Math.floor(Math.log(s)/Math.LN10)),h=s/u;return h>=Mm?u*=10:h>=Hv?u*=5:h>=Xx&&(u*=2),l<n?-u:u}function jk(){var n=identity,l=extent,a=sturges;function s(u){var h,v=u.length,m,w=new Array(v);for(h=0;h<v;++h)w[h]=n(u[h],h,u);var A=l(w),R=A[0],B=A[1],G=a(w,R,B);Array.isArray(G)||(G=tickStep(R,B,G),G=range(Math.ceil(R/G)*G,B,G));for(var j=G.length;G[0]<=R;)G.shift(),--j;for(;G[j-1]>B;)G.pop(),--j;var lt=new Array(j+1),ct;for(h=0;h<=j;++h)ct=lt[h]=[],ct.x0=h>0?G[h-1]:R,ct.x1=h<j?G[h]:B;for(h=0;h<v;++h)m=w[h],R<=m&&m<=B&<[bisect(G,m,0,j)].push(u[h]);return lt}return s.value=function(u){return arguments.length?(n=typeof u=="function"?u:constant(u),s):n},s.domain=function(u){return arguments.length?(l=typeof u=="function"?u:constant([u[0],u[1]]),s):l},s.thresholds=function(u){return arguments.length?(a=typeof u=="function"?u:Array.isArray(u)?constant(slice.call(u)):constant(u),s):a},s}function rF(n,l,a){return n=map.call(n,number).sort(ascending),Math.ceil((a-l)/(2*(quantile(n,.75)-quantile(n,.25))*Math.pow(n.length,-1/3)))}function Wk(n){return n===null?NaN:+n}function Xk(n,l,a){if(a==null&&(a=Wk),!!(s=n.length)){if((l=+l)<=0||s<2)return+a(n[0],0,n);if(l>=1)return+a(n[s-1],s-1,n);var s,u=(s-1)*l,h=Math.floor(u),v=+a(n[h],h,n),m=+a(n[h+1],h+1,n);return v+(m-v)*(u-h)}}function YS(n,l,a,s,u){var h=n*n,v=h*n;return((1-3*n+3*h-v)*l+(4-6*h+3*v)*a+(1+3*n+3*h-3*v)*s+v*u)/6}function Yk(n){var l=n.length-1;return function(a){var s=a<=0?a=0:a>=1?(a=1,l-1):Math.floor(a*l),u=n[s],h=n[s+1],v=s>0?n[s-1]:2*u-h,m=s<l-1?n[s+2]:2*h-u;return YS((a-s/l)*l,v,u,h,m)}}function $k(n){var l=n.length;return function(a){var s=Math.floor(((a%=1)<0?++a:a)*l),u=n[(s+l-1)%l],h=n[s%l],v=n[(s+1)%l],m=n[(s+2)%l];return YS((a-s/l)*l,u,h,v,m)}}function $S(n){return function(){return n}}function $x(n,l){return function(a){return n+a*l}}function qS(n,l,a){return n=Math.pow(n,a),l=Math.pow(l,a)-n,a=1/a,function(s){return Math.pow(n+s*l,a)}}function nF(n,l){var a=l-n;return a?$x(n,a>180||a<-180?a-360*Math.round(a/360):a):constant(isNaN(n)?l:n)}function KS(n){return(n=+n)==1?QS:function(l,a){return a-l?qS(l,a,n):$S(isNaN(l)?a:l)}}function QS(n,l){var a=l-n;return a?$x(n,a):$S(isNaN(n)?l:n)}var JS=function n(l){var a=KS(l);function s(u,h){var v=a((u=Bc(u)).r,(h=Bc(h)).r),m=a(u.g,h.g),w=a(u.b,h.b),A=QS(u.opacity,h.opacity);return function(R){return u.r=v(R),u.g=m(R),u.b=w(R),u.opacity=A(R),u+""}}return s.gamma=n,s}(1);function tC(n){return function(l){var a=l.length,s=new Array(a),u=new Array(a),h=new Array(a),v,m;for(v=0;v<a;++v)m=Bc(l[v]),s[v]=m.r||0,u[v]=m.g||0,h[v]=m.b||0;return s=n(s),u=n(u),h=n(h),m.opacity=1,function(w){return m.r=s(w),m.g=u(w),m.b=h(w),m+""}}}var qk=tC(Yk),iF=tC($k),xp="$";function E1(){}E1.prototype=eC.prototype={constructor:E1,has:function(n){return xp+n in this},get:function(n){return this[xp+n]},set:function(n,l){return this[xp+n]=l,this},remove:function(n){var l=xp+n;return l in this&&delete this[l]},clear:function(){for(var n in this)n[0]===xp&&delete this[n]},keys:function(){var n=[];for(var l in this)l[0]===xp&&n.push(l.slice(1));return n},values:function(){var n=[];for(var l in this)l[0]===xp&&n.push(this[l]);return n},entries:function(){var n=[];for(var l in this)l[0]===xp&&n.push({key:l.slice(1),value:this[l]});return n},size:function(){var n=0;for(var l in this)l[0]===xp&&++n;return n},empty:function(){for(var n in this)if(n[0]===xp)return!1;return!0},each:function(n){for(var l in this)l[0]===xp&&n(this[l],l.slice(1),this)}};function eC(n,l){var a=new E1;if(n instanceof E1)n.each(function(m,w){a.set(w,m)});else if(Array.isArray(n)){var s=-1,u=n.length,h;if(l==null)for(;++s<u;)a.set(s,n[s]);else for(;++s<u;)a.set(l(h=n[s],s,n),h)}else if(n)for(var v in n)a.set(v,n[v]);return a}var qx=eC;function aF(){var n=[],l=[],a,s,u;function h(m,w,A,R){if(w>=n.length)return a!=null&&m.sort(a),s!=null?s(m):m;for(var B=-1,G=m.length,j=n[w++],lt,ct,_t=map(),Vt,ce=A();++B<G;)(Vt=_t.get(lt=j(ct=m[B])+""))?Vt.push(ct):_t.set(lt,[ct]);return _t.each(function(ae,ze){R(ce,ze,h(ae,w,A,R))}),ce}function v(m,w){if(++w>n.length)return m;var A,R=l[w-1];return s!=null&&w>=n.length?A=m.entries():(A=[],m.each(function(B,G){A.push({key:G,values:v(B,w)})})),R!=null?A.sort(function(B,G){return R(B.key,G.key)}):A}return u={object:function(m){return h(m,0,Kk,Qk)},map:function(m){return h(m,0,rC,Kx)},entries:function(m){return v(h(m,0,rC,Kx),0)},key:function(m){return n.push(m),u},sortKeys:function(m){return l[n.length-1]=m,u},sortValues:function(m){return a=m,u},rollup:function(m){return s=m,u}}}function Kk(){return{}}function Qk(n,l,a){n[l]=a}function rC(){return map()}function Kx(n,l,a){n.set(l,a)}function km(){}var jv=qx.prototype;km.prototype=nC.prototype={constructor:km,has:jv.has,add:function(n){return n+="",this[xp+n]=n,this},remove:jv.remove,clear:jv.clear,values:jv.keys,size:jv.size,empty:jv.empty,each:jv.each};function nC(n,l){var a=new km;if(n instanceof km)n.each(function(h){a.add(h)});else if(n){var s=-1,u=n.length;if(l==null)for(;++s<u;)a.add(n[s]);else for(;++s<u;)a.add(l(n[s],s,n))}return a}var oF=null,iC=Array.prototype,aC=iC.map,R0=iC.slice;function Wv(n,l){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(l).domain(n);break}return this}function oC(n,l){switch(arguments.length){case 0:break;case 1:this.interpolator(n);break;default:this.interpolator(l).domain(n);break}return this}var sC={name:"implicit"};function w1(){var n=qx(),l=[],a=[],s=sC;function u(h){var v=h+"",m=n.get(v);if(!m){if(s!==sC)return s;n.set(v,m=l.push(h))}return a[(m-1)%a.length]}return u.domain=function(h){if(!arguments.length)return l.slice();l=[],n=qx();for(var v=-1,m=h.length,w,A;++v<m;)n.has(A=(w=h[v])+"")||n.set(A,l.push(w));return u},u.range=function(h){return arguments.length?(a=R0.call(h),u):a.slice()},u.unknown=function(h){return arguments.length?(s=h,u):s},u.copy=function(){return w1(l,a).unknown(s)},Wv.apply(u,arguments),u}function uC(){var n=ordinal().unknown(void 0),l=n.domain,a=n.range,s=[0,1],u,h,v=!1,m=0,w=0,A=.5;delete n.unknown;function R(){var B=l().length,G=s[1]<s[0],j=s[G-0],lt=s[1-G];u=(lt-j)/Math.max(1,B-m+w*2),v&&(u=Math.floor(u)),j+=(lt-j-u*(B-m))*A,h=u*(1-m),v&&(j=Math.round(j),h=Math.round(h));var ct=sequence(B).map(function(_t){return j+u*_t});return a(G?ct.reverse():ct)}return n.domain=function(B){return arguments.length?(l(B),R()):l()},n.range=function(B){return arguments.length?(s=[+B[0],+B[1]],R()):s.slice()},n.rangeRound=function(B){return s=[+B[0],+B[1]],v=!0,R()},n.bandwidth=function(){return h},n.step=function(){return u},n.round=function(B){return arguments.length?(v=!!B,R()):v},n.padding=function(B){return arguments.length?(m=Math.min(1,w=+B),R()):m},n.paddingInner=function(B){return arguments.length?(m=Math.min(1,B),R()):m},n.paddingOuter=function(B){return arguments.length?(w=+B,R()):w},n.align=function(B){return arguments.length?(A=Math.max(0,Math.min(1,B)),R()):A},n.copy=function(){return uC(l(),s).round(v).paddingInner(m).paddingOuter(w).align(A)},initRange.apply(R(),arguments)}function lC(n){var l=n.copy;return n.padding=n.paddingOuter,delete n.paddingInner,delete n.paddingOuter,n.copy=function(){return lC(l())},n}function sF(){return lC(uC.apply(null,arguments).paddingInner(1))}function BR(n,l){return(isNumberArray(l)?numberArray:cC)(n,l)}function cC(n,l){var a=l?l.length:0,s=n?Math.min(a,n.length):0,u=new Array(s),h=new Array(a),v;for(v=0;v<s;++v)u[v]=A1(n[v],l[v]);for(;v<a;++v)h[v]=l[v];return function(m){for(v=0;v<s;++v)h[v]=u[v](m);return h}}function Jk(n,l){var a=new Date;return n=+n,l=+l,function(s){return a.setTime(n*(1-s)+l*s),a}}function Lm(n,l){return n=+n,l=+l,function(a){return n*(1-a)+l*a}}function tL(n,l){var a={},s={},u;(n===null||typeof n!="object")&&(n={}),(l===null||typeof l!="object")&&(l={});for(u in l)u in n?a[u]=A1(n[u],l[u]):s[u]=l[u];return function(h){for(u in a)s[u]=a[u](h);return s}}var S1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,C1=new RegExp(S1.source,"g");function eL(n){return function(){return n}}function Pm(n){return function(l){return n(l)+""}}function rL(n,l){var a=S1.lastIndex=C1.lastIndex=0,s,u,h,v=-1,m=[],w=[];for(n=n+"",l=l+"";(s=S1.exec(n))&&(u=C1.exec(l));)(h=u.index)>a&&(h=l.slice(a,h),m[v]?m[v]+=h:m[++v]=h),(s=s[0])===(u=u[0])?m[v]?m[v]+=u:m[++v]=u:(m[++v]=null,w.push({i:v,x:Lm(s,u)})),a=C1.lastIndex;return a<l.length&&(h=l.slice(a),m[v]?m[v]+=h:m[++v]=h),m.length<2?w[0]?Pm(w[0].x):eL(l):(l=w.length,function(A){for(var R=0,B;R<l;++R)m[(B=w[R]).i]=B.x(A);return m.join("")})}function nL(n,l){l||(l=[]);var a=n?Math.min(l.length,n.length):0,s=l.slice(),u;return function(h){for(u=0;u<a;++u)s[u]=n[u]*(1-h)+l[u]*h;return s}}function iL(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function A1(n,l){var a=typeof l,s;return l==null||a==="boolean"?$S(l):(a==="number"?Lm:a==="string"?(s=Gu(l))?(l=s,JS):rL:l instanceof Gu?JS:l instanceof Date?Jk:iL(l)?nL:Array.isArray(l)?cC:typeof l.valueOf!="function"&&typeof l.toString!="function"||isNaN(l)?tL:Lm)(n,l)}function aL(n,l){return n=+n,l=+l,function(a){return Math.round(n*(1-a)+l*a)}}function T1(n){return function(){return n}}function fC(n){return+n}var M1=[0,1];function Wc(n){return n}function Qx(n,l){return(l-=n=+n)?function(a){return(a-n)/l}:T1(isNaN(l)?NaN:.5)}function bg(n){var l=n[0],a=n[n.length-1],s;return l>a&&(s=l,l=a,a=s),function(u){return Math.max(l,Math.min(a,u))}}function hC(n,l,a){var s=n[0],u=n[1],h=l[0],v=l[1];return u<s?(s=Qx(u,s),h=a(v,h)):(s=Qx(s,u),h=a(h,v)),function(m){return h(s(m))}}function pC(n,l,a){var s=Math.min(n.length,l.length)-1,u=new Array(s),h=new Array(s),v=-1;for(n[s]<n[0]&&(n=n.slice().reverse(),l=l.slice().reverse());++v<s;)u[v]=Qx(n[v],n[v+1]),h[v]=a(l[v],l[v+1]);return function(m){var w=b1(n,m,1,s)-1;return h[w](u[w](m))}}function Om(n,l){return l.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function I1(){var n=M1,l=M1,a=A1,s,u,h,v=Wc,m,w,A;function R(){return m=Math.min(n.length,l.length)>2?pC:hC,w=A=null,B}function B(G){return isNaN(G=+G)?h:(w||(w=m(n.map(s),l,a)))(s(v(G)))}return B.invert=function(G){return v(u((A||(A=m(l,n.map(s),Lm)))(G)))},B.domain=function(G){return arguments.length?(n=aC.call(G,fC),v===Wc||(v=bg(n)),R()):n.slice()},B.range=function(G){return arguments.length?(l=R0.call(G),R()):l.slice()},B.rangeRound=function(G){return l=R0.call(G),a=aL,R()},B.clamp=function(G){return arguments.length?(v=G?bg(n):Wc,B):v!==Wc},B.interpolate=function(G){return arguments.length?(a=G,R()):a},B.unknown=function(G){return arguments.length?(h=G,B):h},function(G,j){return s=G,u=j,R()}}function Fm(n,l){return I1()(n,l)}var dC=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function k1(n){if(!(l=dC.exec(n)))throw new Error("invalid format: "+n);var l;return new Jx({fill:l[1],align:l[2],sign:l[3],symbol:l[4],zero:l[5],width:l[6],comma:l[7],precision:l[8]&&l[8].slice(1),trim:l[9],type:l[10]})}k1.prototype=Jx.prototype;function Jx(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}Jx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function L1(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function id(n,l){if((a=(n=l?n.toExponential(l-1):n.toExponential()).indexOf("e"))<0)return null;var a,s=n.slice(0,a);return[s.length>1?s[0]+s.slice(2):s,+n.slice(a+1)]}function bp(n){return n=id(Math.abs(n)),n?n[1]:NaN}function oL(n,l){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(bp(l)/3)))*3-bp(Math.abs(n)))}function vC(n,l){return function(a,s){for(var u=a.length,h=[],v=0,m=n[0],w=0;u>0&&m>0&&(w+m+1>s&&(m=Math.max(1,s-w)),h.push(a.substring(u-=m,u+m)),!((w+=m+1)>s));)m=n[v=(v+1)%n.length];return h.reverse().join(l)}}function gC(n){return function(l){return l.replace(/[0-9]/g,function(a){return n[+a]})}}function tb(n){t:for(var l=n.length,a=1,s=-1,u;a<l;++a)switch(n[a]){case".":s=u=a;break;case"0":s===0&&(s=a),u=a;break;default:if(!+n[a])break t;s>0&&(s=0);break}return s>0?n.slice(0,s)+n.slice(u+1):n}var eb;function sL(n,l){var a=id(n,l);if(!a)return n+"";var s=a[0],u=a[1],h=u-(eb=Math.max(-8,Math.min(8,Math.floor(u/3)))*3)+1,v=s.length;return h===v?s:h>v?s+new Array(h-v+1).join("0"):h>0?s.slice(0,h)+"."+s.slice(h):"0."+new Array(1-h).join("0")+id(n,Math.max(0,l+h-1))[0]}function mC(n,l){var a=id(n,l);if(!a)return n+"";var s=a[0],u=a[1];return u<0?"0."+new Array(-u).join("0")+s:s.length>u+1?s.slice(0,u+1)+"."+s.slice(u+1):s+new Array(u-s.length+2).join("0")}var yC={"%":function(n,l){return(n*100).toFixed(l)},b:function(n){return Math.round(n).toString(2)},c:function(n){return n+""},d:L1,e:function(n,l){return n.toExponential(l)},f:function(n,l){return n.toFixed(l)},g:function(n,l){return n.toPrecision(l)},o:function(n){return Math.round(n).toString(8)},p:function(n,l){return mC(n*100,l)},r:mC,s:sL,X:function(n){return Math.round(n).toString(16).toUpperCase()},x:function(n){return Math.round(n).toString(16)}};function _C(n){return n}var xC=Array.prototype.map,rb=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function uL(n){var l=n.grouping===void 0||n.thousands===void 0?_C:vC(xC.call(n.grouping,Number),n.thousands+""),a=n.currency===void 0?"":n.currency[0]+"",s=n.currency===void 0?"":n.currency[1]+"",u=n.decimal===void 0?".":n.decimal+"",h=n.numerals===void 0?_C:gC(xC.call(n.numerals,String)),v=n.percent===void 0?"%":n.percent+"",m=n.minus===void 0?"-":n.minus+"",w=n.nan===void 0?"NaN":n.nan+"";function A(B){B=k1(B);var G=B.fill,j=B.align,lt=B.sign,ct=B.symbol,_t=B.zero,Vt=B.width,ce=B.comma,ae=B.precision,ze=B.trim,$e=B.type;$e==="n"?(ce=!0,$e="g"):yC[$e]||(ae===void 0&&(ae=12),ze=!0,$e="g"),(_t||G==="0"&&j==="=")&&(_t=!0,G="0",j="=");var xr=ct==="$"?a:ct==="#"&&/[boxX]/.test($e)?"0"+$e.toLowerCase():"",Or=ct==="$"?s:/[%p]/.test($e)?v:"",Zr=yC[$e],Wr=/[defgprs%]/.test($e);ae=ae===void 0?6:/[gprs]/.test($e)?Math.max(1,Math.min(21,ae)):Math.max(0,Math.min(20,ae));function wn(vn){var Kn=xr,Ei=Or,qi,_o,jo;if($e==="c")Ei=Zr(vn)+Ei,vn="";else{vn=+vn;var Gs=vn<0||1/vn<0;if(vn=isNaN(vn)?w:Zr(Math.abs(vn),ae),ze&&(vn=tb(vn)),Gs&&+vn==0&<!=="+"&&(Gs=!1),Kn=(Gs?lt==="("?lt:m:lt==="-"||lt==="("?"":lt)+Kn,Ei=($e==="s"?rb[8+eb/3]:"")+Ei+(Gs&<==="("?")":""),Wr){for(qi=-1,_o=vn.length;++qi<_o;)if(jo=vn.charCodeAt(qi),48>jo||jo>57){Ei=(jo===46?u+vn.slice(qi+1):vn.slice(qi))+Ei,vn=vn.slice(0,qi);break}}}ce&&!_t&&(vn=l(vn,1/0));var hu=Kn.length+vn.length+Ei.length,$u=hu<Vt?new Array(Vt-hu+1).join(G):"";switch(ce&&_t&&(vn=l($u+vn,$u.length?Vt-Ei.length:1/0),$u=""),j){case"<":vn=Kn+vn+Ei+$u;break;case"=":vn=Kn+$u+vn+Ei;break;case"^":vn=$u.slice(0,hu=$u.length>>1)+Kn+vn+Ei+$u.slice(hu);break;default:vn=$u+Kn+vn+Ei;break}return h(vn)}return wn.toString=function(){return B+""},wn}function R(B,G){var j=A((B=k1(B),B.type="f",B)),lt=Math.max(-8,Math.min(8,Math.floor(bp(G)/3)))*3,ct=Math.pow(10,-lt),_t=rb[8+lt/3];return function(Vt){return j(ct*Vt)+_t}}return{format:A,formatPrefix:R}}var P1,nb,bC;lL({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function lL(n){return P1=uL(n),nb=P1.format,bC=P1.formatPrefix,P1}function cL(n,l){return n=Math.abs(n),l=Math.abs(l)-n,Math.max(0,bp(l)-bp(n))+1}function fL(n){return Math.max(0,-bp(Math.abs(n)))}function hL(n,l,a,s){var u=Yx(n,l,a),h;switch(s=k1(s==null?",f":s),s.type){case"s":{var v=Math.max(Math.abs(n),Math.abs(l));return s.precision==null&&!isNaN(h=oL(u,v))&&(s.precision=h),bC(s,v)}case"":case"e":case"g":case"p":case"r":{s.precision==null&&!isNaN(h=cL(u,Math.max(Math.abs(n),Math.abs(l))))&&(s.precision=h-(s.type==="e"));break}case"f":case"%":{s.precision==null&&!isNaN(h=fL(u))&&(s.precision=h-(s.type==="%")*2);break}}return nb(s)}function Rm(n){var l=n.domain;return n.ticks=function(a){var s=l();return XS(s[0],s[s.length-1],a==null?10:a)},n.tickFormat=function(a,s){var u=l();return hL(u[0],u[u.length-1],a==null?10:a,s)},n.nice=function(a){a==null&&(a=10);var s=l(),u=0,h=s.length-1,v=s[u],m=s[h],w;return m<v&&(w=v,v=m,m=w,w=u,u=h,h=w),w=Im(v,m,a),w>0?(v=Math.floor(v/w)*w,m=Math.ceil(m/w)*w,w=Im(v,m,a)):w<0&&(v=Math.ceil(v*w)/w,m=Math.floor(m*w)/w,w=Im(v,m,a)),w>0?(s[u]=Math.floor(v/w)*w,s[h]=Math.ceil(m/w)*w,l(s)):w<0&&(s[u]=Math.ceil(v*w)/w,s[h]=Math.floor(m*w)/w,l(s)),n},n}function EC(){var n=Fm(Wc,Wc);return n.copy=function(){return Om(n,EC())},Wv.apply(n,arguments),Rm(n)}function pL(n){var l;function a(s){return isNaN(s=+s)?l:s}return a.invert=a,a.domain=a.range=function(s){return arguments.length?(n=map.call(s,number),a):n.slice()},a.unknown=function(s){return arguments.length?(l=s,a):l},a.copy=function(){return pL(n).unknown(l)},n=arguments.length?map.call(n,number):[0,1],linearish(a)}function wC(n,l){n=n.slice();var a=0,s=n.length-1,u=n[a],h=n[s],v;return h<u&&(v=a,a=s,s=v,v=u,u=h,h=v),n[a]=l.floor(u),n[s]=l.ceil(h),n}function SC(n){return Math.log(n)}function ib(n){return Math.exp(n)}function dL(n){return-Math.log(-n)}function CC(n){return-Math.exp(-n)}function Eg(n){return isFinite(n)?+("1e"+n):n<0?0:n}function vL(n){return n===10?Eg:n===Math.E?Math.exp:function(l){return Math.pow(n,l)}}function gL(n){return n===Math.E?Math.log:n===10&&Math.log10||n===2&&Math.log2||(n=Math.log(n),function(l){return Math.log(l)/n})}function AC(n){return function(l){return-n(-l)}}function mL(n){var l=n(SC,ib),a=l.domain,s=10,u,h;function v(){return u=gL(s),h=vL(s),a()[0]<0?(u=AC(u),h=AC(h),n(dL,CC)):n(SC,ib),l}return l.base=function(m){return arguments.length?(s=+m,v()):s},l.domain=function(m){return arguments.length?(a(m),v()):a()},l.ticks=function(m){var w=a(),A=w[0],R=w[w.length-1],B;(B=R<A)&&(G=A,A=R,R=G);var G=u(A),j=u(R),lt,ct,_t,Vt=m==null?10:+m,ce=[];if(!(s%1)&&j-G<Vt){if(G=Math.round(G)-1,j=Math.round(j)+1,A>0){for(;G<j;++G)for(ct=1,lt=h(G);ct<s;++ct)if(_t=lt*ct,!(_t<A)){if(_t>R)break;ce.push(_t)}}else for(;G<j;++G)for(ct=s-1,lt=h(G);ct>=1;--ct)if(_t=lt*ct,!(_t<A)){if(_t>R)break;ce.push(_t)}}else ce=XS(G,j,Math.min(j-G,Vt)).map(h);return B?ce.reverse():ce},l.tickFormat=function(m,w){if(w==null&&(w=s===10?".0e":","),typeof w!="function"&&(w=nb(w)),m===1/0)return w;m==null&&(m=10);var A=Math.max(1,s*m/l.ticks().length);return function(R){var B=R/h(Math.round(u(R)));return B*s<s-.5&&(B*=s),B<=A?w(R):""}},l.nice=function(){return a(wC(a(),{floor:function(m){return h(Math.floor(u(m)))},ceil:function(m){return h(Math.ceil(u(m)))}}))},l}function ab(){var n=mL(I1()).domain([1,10]);return n.copy=function(){return Om(n,ab()).base(n.base())},Wv.apply(n,arguments),n}function D0(n){return function(l){return Math.sign(l)*Math.log1p(Math.abs(l/n))}}function ob(n){return function(l){return Math.sign(l)*Math.expm1(Math.abs(l))*n}}function TC(n){var l=1,a=n(D0(l),ob(l));return a.constant=function(s){return arguments.length?n(D0(l=+s),ob(l)):l},linearish(a)}function sb(){var n=TC(transformer());return n.copy=function(){return copy(n,sb()).constant(n.constant())},initRange.apply(n,arguments)}function O1(n){return function(l){return l<0?-Math.pow(-l,n):Math.pow(l,n)}}function ub(n){return n<0?-Math.sqrt(-n):Math.sqrt(n)}function lb(n){return n<0?-n*n:n*n}function yL(n){var l=n(Wc,Wc),a=1;function s(){return a===1?n(Wc,Wc):a===.5?n(ub,lb):n(O1(a),O1(1/a))}return l.exponent=function(u){return arguments.length?(a=+u,s()):a},Rm(l)}function cb(){var n=yL(I1());return n.copy=function(){return Om(n,cb()).exponent(n.exponent())},Wv.apply(n,arguments),n}function _L(){return cb.apply(null,arguments).exponent(.5)}function fb(){var n=[],l=[],a=[],s;function u(){var v=0,m=Math.max(1,l.length);for(a=new Array(m-1);++v<m;)a[v-1]=Xk(n,v/m);return h}function h(v){return isNaN(v=+v)?s:l[b1(a,v)]}return h.invertExtent=function(v){var m=l.indexOf(v);return m<0?[NaN,NaN]:[m>0?a[m-1]:n[0],m<a.length?a[m]:n[n.length-1]]},h.domain=function(v){if(!arguments.length)return n.slice();n=[];for(var m=0,w=v.length,A;m<w;++m)A=v[m],A!=null&&!isNaN(A=+A)&&n.push(A);return n.sort(Wx),u()},h.range=function(v){return arguments.length?(l=R0.call(v),u()):l.slice()},h.unknown=function(v){return arguments.length?(s=v,h):s},h.quantiles=function(){return a.slice()},h.copy=function(){return fb().domain(n).range(l).unknown(s)},Wv.apply(h,arguments)}function MC(){var n=0,l=1,a=1,s=[.5],u=[0,1],h;function v(w){return w<=w?u[b1(s,w,0,a)]:h}function m(){var w=-1;for(s=new Array(a);++w<a;)s[w]=((w+1)*l-(w-a)*n)/(a+1);return v}return v.domain=function(w){return arguments.length?(n=+w[0],l=+w[1],m()):[n,l]},v.range=function(w){return arguments.length?(a=(u=R0.call(w)).length-1,m()):u.slice()},v.invertExtent=function(w){var A=u.indexOf(w);return A<0?[NaN,NaN]:A<1?[n,s[0]]:A>=a?[s[a-1],l]:[s[A-1],s[A]]},v.unknown=function(w){return arguments.length&&(h=w),v},v.thresholds=function(){return s.slice()},v.copy=function(){return MC().domain([n,l]).range(u).unknown(h)},Wv.apply(Rm(v),arguments)}function IC(){var n=[.5],l=[0,1],a,s=1;function u(h){return h<=h?l[b1(n,h,0,s)]:a}return u.domain=function(h){return arguments.length?(n=R0.call(h),s=Math.min(n.length,l.length-1),u):n.slice()},u.range=function(h){return arguments.length?(l=R0.call(h),s=Math.min(n.length,l.length-1),u):l.slice()},u.invertExtent=function(h){var v=l.indexOf(h);return[n[v-1],n[v]]},u.unknown=function(h){return arguments.length?(a=h,u):a},u.copy=function(){return IC().domain(n).range(l).unknown(a)},Wv.apply(u,arguments)}var hb=new Date,pb=new Date;function yf(n,l,a,s){function u(h){return n(h=arguments.length===0?new Date:new Date(+h)),h}return u.floor=function(h){return n(h=new Date(+h)),h},u.ceil=function(h){return n(h=new Date(h-1)),l(h,1),n(h),h},u.round=function(h){var v=u(h),m=u.ceil(h);return h-v<m-h?v:m},u.offset=function(h,v){return l(h=new Date(+h),v==null?1:Math.floor(v)),h},u.range=function(h,v,m){var w=[],A;if(h=u.ceil(h),m=m==null?1:Math.floor(m),!(h<v)||!(m>0))return w;do w.push(A=new Date(+h)),l(h,m),n(h);while(A<h&&h<v);return w},u.filter=function(h){return yf(function(v){if(v>=v)for(;n(v),!h(v);)v.setTime(v-1)},function(v,m){if(v>=v)if(m<0)for(;++m<=0;)for(;l(v,-1),!h(v););else for(;--m>=0;)for(;l(v,1),!h(v););})},a&&(u.count=function(h,v){return hb.setTime(+h),pb.setTime(+v),n(hb),n(pb),Math.floor(a(hb,pb))},u.every=function(h){return h=Math.floor(h),!isFinite(h)||!(h>0)?null:h>1?u.filter(s?function(v){return s(v)%h===0}:function(v){return u.count(0,v)%h===0}):u}),u}var db=yf(function(n){n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,l){n.setFullYear(n.getFullYear()+l)},function(n,l){return l.getFullYear()-n.getFullYear()},function(n){return n.getFullYear()});db.every=function(n){return!isFinite(n=Math.floor(n))||!(n>0)?null:yf(function(l){l.setFullYear(Math.floor(l.getFullYear()/n)*n),l.setMonth(0,1),l.setHours(0,0,0,0)},function(l,a){l.setFullYear(l.getFullYear()+a*n)})};var wg=db,uF=db.range,kC=yf(function(n){n.setDate(1),n.setHours(0,0,0,0)},function(n,l){n.setMonth(n.getMonth()+l)},function(n,l){return l.getMonth()-n.getMonth()+(l.getFullYear()-n.getFullYear())*12},function(n){return n.getMonth()}),LC=kC,xL=kC.range,vb=1e3,Fc=6e4,Vf=36e5,gb=864e5,PC=6048e5;function B0(n){return yf(function(l){l.setDate(l.getDate()-(l.getDay()+7-n)%7),l.setHours(0,0,0,0)},function(l,a){l.setDate(l.getDate()+a*7)},function(l,a){return(a-l-(a.getTimezoneOffset()-l.getTimezoneOffset())*Fc)/PC})}var Xv=B0(0),ad=B0(1),mb=B0(2),yb=B0(3),N0=B0(4),OC=B0(5),FC=B0(6),lF=Xv.range,bL=ad.range,EL=mb.range,cF=yb.range,fF=N0.range,hF=OC.range,pF=FC.range,RC=yf(function(n){n.setHours(0,0,0,0)},function(n,l){n.setDate(n.getDate()+l)},function(n,l){return(l-n-(l.getTimezoneOffset()-n.getTimezoneOffset())*Fc)/gb},function(n){return n.getDate()-1}),_b=RC,dF=RC.range,DC=yf(function(n){n.setTime(n-n.getMilliseconds()-n.getSeconds()*vb-n.getMinutes()*Fc)},function(n,l){n.setTime(+n+l*Vf)},function(n,l){return(l-n)/Vf},function(n){return n.getHours()}),wL=DC,vF=DC.range,BC=yf(function(n){n.setTime(n-n.getMilliseconds()-n.getSeconds()*vb)},function(n,l){n.setTime(+n+l*Fc)},function(n,l){return(l-n)/Fc},function(n){return n.getMinutes()}),SL=BC,gF=BC.range,NC=yf(function(n){n.setTime(n-n.getMilliseconds())},function(n,l){n.setTime(+n+l*vb)},function(n,l){return(l-n)/vb},function(n){return n.getUTCSeconds()}),CL=NC,NR=NC.range,F1=yf(function(){},function(n,l){n.setTime(+n+l)},function(n,l){return l-n});F1.every=function(n){return n=Math.floor(n),!isFinite(n)||!(n>0)?null:n>1?yf(function(l){l.setTime(Math.floor(l/n)*n)},function(l,a){l.setTime(+l+a*n)},function(l,a){return(a-l)/n}):F1};var AL=F1,mF=F1.range;function z0(n){return yf(function(l){l.setUTCDate(l.getUTCDate()-(l.getUTCDay()+7-n)%7),l.setUTCHours(0,0,0,0)},function(l,a){l.setUTCDate(l.getUTCDate()+a*7)},function(l,a){return(a-l)/PC})}var zC=z0(0),xb=z0(1),TL=z0(2),ML=z0(3),Sg=z0(4),IL=z0(5),kL=z0(6),yF=zC.range,_F=xb.range,xF=TL.range,zR=ML.range,bF=Sg.range,LL=IL.range,EF=kL.range,bb=yf(function(n){n.setUTCHours(0,0,0,0)},function(n,l){n.setUTCDate(n.getUTCDate()+l)},function(n,l){return(l-n)/gb},function(n){return n.getUTCDate()-1}),UC=bb,wF=bb.range,R1=yf(function(n){n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,l){n.setUTCFullYear(n.getUTCFullYear()+l)},function(n,l){return l.getUTCFullYear()-n.getUTCFullYear()},function(n){return n.getUTCFullYear()});R1.every=function(n){return!isFinite(n=Math.floor(n))||!(n>0)?null:yf(function(l){l.setUTCFullYear(Math.floor(l.getUTCFullYear()/n)*n),l.setUTCMonth(0,1),l.setUTCHours(0,0,0,0)},function(l,a){l.setUTCFullYear(l.getUTCFullYear()+a*n)})};var Cg=R1,SF=R1.range;function Eb(n){if(0<=n.y&&n.y<100){var l=new Date(-1,n.m,n.d,n.H,n.M,n.S,n.L);return l.setFullYear(n.y),l}return new Date(n.y,n.m,n.d,n.H,n.M,n.S,n.L)}function wb(n){if(0<=n.y&&n.y<100){var l=new Date(Date.UTC(-1,n.m,n.d,n.H,n.M,n.S,n.L));return l.setUTCFullYear(n.y),l}return new Date(Date.UTC(n.y,n.m,n.d,n.H,n.M,n.S,n.L))}function Dm(n,l,a){return{y:n,m:l,d:a,H:0,M:0,S:0,L:0}}function PL(n){var l=n.dateTime,a=n.date,s=n.time,u=n.periods,h=n.days,v=n.shortDays,m=n.months,w=n.shortMonths,A=D1(u),R=Bm(u),B=D1(h),G=Bm(h),j=D1(v),lt=Bm(v),ct=D1(m),_t=Bm(m),Vt=D1(w),ce=Bm(w),ae={a:Gs,A:hu,b:$u,B:Uh,c:null,d:YC,e:YC,f:KL,g:r4,G:Sb,H:YL,I:$L,j:qL,L:$C,m:TF,M:qC,p:m2,q:p_,Q:rA,s:kb,S:KC,u:QC,U:B1,V:QL,w:JL,W:t4,x:null,X:null,y:e4,Y:n4,Z:i4,"%":eA},ze={a:y2,A:LT,b:cO,B:PT,c:null,d:zm,e:zm,f:JC,g:h4,G:d4,H:Cb,I:Ab,j:a4,L:Tb,m:N1,M:Mb,p:s8,q:u8,Q:rA,s:kb,S:o4,u:s4,U:u4,V:tA,w:l4,W:c4,x:null,X:null,y:f4,Y:p4,Z:v4,"%":eA},$e={a:wn,A:vn,b:Kn,B:Ei,c:qi,d:jC,e:jC,f:jL,g:HC,G:GC,H:XC,I:XC,j:WC,L:HL,m:ZL,M:VL,p:Wr,q:UL,Q:WL,s:XL,S:GL,u:DL,U:BL,V:NL,w:RL,W:zL,x:_o,X:jo,y:HC,Y:GC,Z:CF,"%":AF};ae.x=xr(a,ae),ae.X=xr(s,ae),ae.c=xr(l,ae),ze.x=xr(a,ze),ze.X=xr(s,ze),ze.c=xr(l,ze);function xr(Da,ws){return function(Hs){var $i=[],Zh=-1,qu=0,Sp=Da.length,Cp,cy,RR;for(Hs instanceof Date||(Hs=new Date(+Hs));++Zh<Sp;)Da.charCodeAt(Zh)===37&&($i.push(Da.slice(qu,Zh)),(cy=ZC[Cp=Da.charAt(++Zh)])!=null?Cp=Da.charAt(++Zh):cy=Cp==="e"?" ":"0",(RR=ws[Cp])&&(Cp=RR(Hs,cy)),$i.push(Cp),qu=Zh+1);return $i.push(Da.slice(qu,Zh)),$i.join("")}}function Or(Da,ws){return function(Hs){var $i=Dm(1900,void 0,1),Zh=Zr($i,Da,Hs+="",0),qu,Sp;if(Zh!=Hs.length)return null;if("Q"in $i)return new Date($i.Q);if("s"in $i)return new Date($i.s*1e3+("L"in $i?$i.L:0));if(ws&&!("Z"in $i)&&($i.Z=0),"p"in $i&&($i.H=$i.H%12+$i.p*12),$i.m===void 0&&($i.m="q"in $i?$i.q:0),"V"in $i){if($i.V<1||$i.V>53)return null;"w"in $i||($i.w=1),"Z"in $i?(qu=wb(Dm($i.y,0,1)),Sp=qu.getUTCDay(),qu=Sp>4||Sp===0?xb.ceil(qu):xb(qu),qu=UC.offset(qu,($i.V-1)*7),$i.y=qu.getUTCFullYear(),$i.m=qu.getUTCMonth(),$i.d=qu.getUTCDate()+($i.w+6)%7):(qu=Eb(Dm($i.y,0,1)),Sp=qu.getDay(),qu=Sp>4||Sp===0?ad.ceil(qu):ad(qu),qu=_b.offset(qu,($i.V-1)*7),$i.y=qu.getFullYear(),$i.m=qu.getMonth(),$i.d=qu.getDate()+($i.w+6)%7)}else("W"in $i||"U"in $i)&&("w"in $i||($i.w="u"in $i?$i.u%7:"W"in $i?1:0),Sp="Z"in $i?wb(Dm($i.y,0,1)).getUTCDay():Eb(Dm($i.y,0,1)).getDay(),$i.m=0,$i.d="W"in $i?($i.w+6)%7+$i.W*7-(Sp+5)%7:$i.w+$i.U*7-(Sp+6)%7);return"Z"in $i?($i.H+=$i.Z/100|0,$i.M+=$i.Z%100,wb($i)):Eb($i)}}function Zr(Da,ws,Hs,$i){for(var Zh=0,qu=ws.length,Sp=Hs.length,Cp,cy;Zh<qu;){if($i>=Sp)return-1;if(Cp=ws.charCodeAt(Zh++),Cp===37){if(Cp=ws.charAt(Zh++),cy=$e[Cp in ZC?ws.charAt(Zh++):Cp],!cy||($i=cy(Da,Hs,$i))<0)return-1}else if(Cp!=Hs.charCodeAt($i++))return-1}return $i}function Wr(Da,ws,Hs){var $i=A.exec(ws.slice(Hs));return $i?(Da.p=R[$i[0].toLowerCase()],Hs+$i[0].length):-1}function wn(Da,ws,Hs){var $i=j.exec(ws.slice(Hs));return $i?(Da.w=lt[$i[0].toLowerCase()],Hs+$i[0].length):-1}function vn(Da,ws,Hs){var $i=B.exec(ws.slice(Hs));return $i?(Da.w=G[$i[0].toLowerCase()],Hs+$i[0].length):-1}function Kn(Da,ws,Hs){var $i=Vt.exec(ws.slice(Hs));return $i?(Da.m=ce[$i[0].toLowerCase()],Hs+$i[0].length):-1}function Ei(Da,ws,Hs){var $i=ct.exec(ws.slice(Hs));return $i?(Da.m=_t[$i[0].toLowerCase()],Hs+$i[0].length):-1}function qi(Da,ws,Hs){return Zr(Da,l,ws,Hs)}function _o(Da,ws,Hs){return Zr(Da,a,ws,Hs)}function jo(Da,ws,Hs){return Zr(Da,s,ws,Hs)}function Gs(Da){return v[Da.getDay()]}function hu(Da){return h[Da.getDay()]}function $u(Da){return w[Da.getMonth()]}function Uh(Da){return m[Da.getMonth()]}function m2(Da){return u[+(Da.getHours()>=12)]}function p_(Da){return 1+~~(Da.getMonth()/3)}function y2(Da){return v[Da.getUTCDay()]}function LT(Da){return h[Da.getUTCDay()]}function cO(Da){return w[Da.getUTCMonth()]}function PT(Da){return m[Da.getUTCMonth()]}function s8(Da){return u[+(Da.getUTCHours()>=12)]}function u8(Da){return 1+~~(Da.getUTCMonth()/3)}return{format:function(Da){var ws=xr(Da+="",ae);return ws.toString=function(){return Da},ws},parse:function(Da){var ws=Or(Da+="",!1);return ws.toString=function(){return Da},ws},utcFormat:function(Da){var ws=xr(Da+="",ze);return ws.toString=function(){return Da},ws},utcParse:function(Da){var ws=Or(Da+="",!0);return ws.toString=function(){return Da},ws}}}var ZC={"-":"",_:" ",0:"0"},dc=/^\s*\d+/,OL=/^%/,FL=/[\\^$*+?|[\]().{}]/g;function Ps(n,l,a){var s=n<0?"-":"",u=(s?-n:n)+"",h=u.length;return s+(h<a?new Array(a-h+1).join(l)+u:u)}function VC(n){return n.replace(FL,"\\$&")}function D1(n){return new RegExp("^(?:"+n.map(VC).join("|")+")","i")}function Bm(n){for(var l={},a=-1,s=n.length;++a<s;)l[n[a].toLowerCase()]=a;return l}function RL(n,l,a){var s=dc.exec(l.slice(a,a+1));return s?(n.w=+s[0],a+s[0].length):-1}function DL(n,l,a){var s=dc.exec(l.slice(a,a+1));return s?(n.u=+s[0],a+s[0].length):-1}function BL(n,l,a){var s=dc.exec(l.slice(a,a+2));return s?(n.U=+s[0],a+s[0].length):-1}function NL(n,l,a){var s=dc.exec(l.slice(a,a+2));return s?(n.V=+s[0],a+s[0].length):-1}function zL(n,l,a){var s=dc.exec(l.slice(a,a+2));return s?(n.W=+s[0],a+s[0].length):-1}function GC(n,l,a){var s=dc.exec(l.slice(a,a+4));return s?(n.y=+s[0],a+s[0].length):-1}function HC(n,l,a){var s=dc.exec(l.slice(a,a+2));return s?(n.y=+s[0]+(+s[0]>68?1900:2e3),a+s[0].length):-1}function CF(n,l,a){var s=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(l.slice(a,a+6));return s?(n.Z=s[1]?0:-(s[2]+(s[3]||"00")),a+s[0].length):-1}function UL(n,l,a){var s=dc.exec(l.slice(a,a+1));return s?(n.q=s[0]*3-3,a+s[0].length):-1}function ZL(n,l,a){var s=dc.exec(l.slice(a,a+2));return s?(n.m=s[0]-1,a+s[0].length):-1}function jC(n,l,a){var s=dc.exec(l.slice(a,a+2));return s?(n.d=+s[0],a+s[0].length):-1}function WC(n,l,a){var s=dc.exec(l.slice(a,a+3));return s?(n.m=0,n.d=+s[0],a+s[0].length):-1}function XC(n,l,a){var s=dc.exec(l.slice(a,a+2));return s?(n.H=+s[0],a+s[0].length):-1}function VL(n,l,a){var s=dc.exec(l.slice(a,a+2));return s?(n.M=+s[0],a+s[0].length):-1}function GL(n,l,a){var s=dc.exec(l.slice(a,a+2));return s?(n.S=+s[0],a+s[0].length):-1}function HL(n,l,a){var s=dc.exec(l.slice(a,a+3));return s?(n.L=+s[0],a+s[0].length):-1}function jL(n,l,a){var s=dc.exec(l.slice(a,a+6));return s?(n.L=Math.floor(s[0]/1e3),a+s[0].length):-1}function AF(n,l,a){var s=OL.exec(l.slice(a,a+1));return s?a+s[0].length:-1}function WL(n,l,a){var s=dc.exec(l.slice(a));return s?(n.Q=+s[0],a+s[0].length):-1}function XL(n,l,a){var s=dc.exec(l.slice(a));return s?(n.s=+s[0],a+s[0].length):-1}function YC(n,l){return Ps(n.getDate(),l,2)}function YL(n,l){return Ps(n.getHours(),l,2)}function $L(n,l){return Ps(n.getHours()%12||12,l,2)}function qL(n,l){return Ps(1+_b.count(wg(n),n),l,3)}function $C(n,l){return Ps(n.getMilliseconds(),l,3)}function KL(n,l){return $C(n,l)+"000"}function TF(n,l){return Ps(n.getMonth()+1,l,2)}function qC(n,l){return Ps(n.getMinutes(),l,2)}function KC(n,l){return Ps(n.getSeconds(),l,2)}function QC(n){var l=n.getDay();return l===0?7:l}function B1(n,l){return Ps(Xv.count(wg(n)-1,n),l,2)}function Nm(n){var l=n.getDay();return l>=4||l===0?N0(n):N0.ceil(n)}function QL(n,l){return n=Nm(n),Ps(N0.count(wg(n),n)+(wg(n).getDay()===4),l,2)}function JL(n){return n.getDay()}function t4(n,l){return Ps(ad.count(wg(n)-1,n),l,2)}function e4(n,l){return Ps(n.getFullYear()%100,l,2)}function r4(n,l){return n=Nm(n),Ps(n.getFullYear()%100,l,2)}function n4(n,l){return Ps(n.getFullYear()%1e4,l,4)}function Sb(n,l){var a=n.getDay();return n=a>=4||a===0?N0(n):N0.ceil(n),Ps(n.getFullYear()%1e4,l,4)}function i4(n){var l=n.getTimezoneOffset();return(l>0?"-":(l*=-1,"+"))+Ps(l/60|0,"0",2)+Ps(l%60,"0",2)}function zm(n,l){return Ps(n.getUTCDate(),l,2)}function Cb(n,l){return Ps(n.getUTCHours(),l,2)}function Ab(n,l){return Ps(n.getUTCHours()%12||12,l,2)}function a4(n,l){return Ps(1+UC.count(Cg(n),n),l,3)}function Tb(n,l){return Ps(n.getUTCMilliseconds(),l,3)}function JC(n,l){return Tb(n,l)+"000"}function N1(n,l){return Ps(n.getUTCMonth()+1,l,2)}function Mb(n,l){return Ps(n.getUTCMinutes(),l,2)}function o4(n,l){return Ps(n.getUTCSeconds(),l,2)}function s4(n){var l=n.getUTCDay();return l===0?7:l}function u4(n,l){return Ps(zC.count(Cg(n)-1,n),l,2)}function Ib(n){var l=n.getUTCDay();return l>=4||l===0?Sg(n):Sg.ceil(n)}function tA(n,l){return n=Ib(n),Ps(Sg.count(Cg(n),n)+(Cg(n).getUTCDay()===4),l,2)}function l4(n){return n.getUTCDay()}function c4(n,l){return Ps(xb.count(Cg(n)-1,n),l,2)}function f4(n,l){return Ps(n.getUTCFullYear()%100,l,2)}function h4(n,l){return n=Ib(n),Ps(n.getUTCFullYear()%100,l,2)}function p4(n,l){return Ps(n.getUTCFullYear()%1e4,l,4)}function d4(n,l){var a=n.getUTCDay();return n=a>=4||a===0?Sg(n):Sg.ceil(n),Ps(n.getUTCFullYear()%1e4,l,4)}function v4(){return"+0000"}function eA(){return"%"}function rA(n){return+n}function kb(n){return Math.floor(+n/1e3)}var Ag,nA,g4,m4,y4;_4({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"]});function _4(n){return Ag=PL(n),nA=Ag.format,g4=Ag.parse,m4=Ag.utcFormat,y4=Ag.utcParse,Ag}var Um=1e3,z1=Um*60,U0=z1*60,Tg=U0*24,Zm=Tg*7,iA=Tg*30,Lb=Tg*365;function aA(n){return new Date(n)}function Vm(n){return n instanceof Date?+n:+new Date(+n)}function Pb(n,l,a,s,u,h,v,m,w){var A=Fm(Wc,Wc),R=A.invert,B=A.domain,G=w(".%L"),j=w(":%S"),lt=w("%I:%M"),ct=w("%I %p"),_t=w("%a %d"),Vt=w("%b %d"),ce=w("%B"),ae=w("%Y"),ze=[[v,1,Um],[v,5,5*Um],[v,15,15*Um],[v,30,30*Um],[h,1,z1],[h,5,5*z1],[h,15,15*z1],[h,30,30*z1],[u,1,U0],[u,3,3*U0],[u,6,6*U0],[u,12,12*U0],[s,1,Tg],[s,2,2*Tg],[a,1,Zm],[l,1,iA],[l,3,3*iA],[n,1,Lb]];function $e(Or){return(v(Or)<Or?G:h(Or)<Or?j:u(Or)<Or?lt:s(Or)<Or?ct:l(Or)<Or?a(Or)<Or?_t:Vt:n(Or)<Or?ce:ae)(Or)}function xr(Or,Zr,Wr,wn){if(Or==null&&(Or=10),typeof Or=="number"){var vn=Math.abs(Wr-Zr)/Or,Kn=GS(function(Ei){return Ei[2]}).right(ze,vn);Kn===ze.length?(wn=Yx(Zr/Lb,Wr/Lb,Or),Or=n):Kn?(Kn=ze[vn/ze[Kn-1][2]<ze[Kn][2]/vn?Kn-1:Kn],wn=Kn[1],Or=Kn[0]):(wn=Math.max(Yx(Zr,Wr,Or),1),Or=m)}return wn==null?Or:Or.every(wn)}return A.invert=function(Or){return new Date(R(Or))},A.domain=function(Or){return arguments.length?B(aC.call(Or,Vm)):B().map(aA)},A.ticks=function(Or,Zr){var Wr=B(),wn=Wr[0],vn=Wr[Wr.length-1],Kn=vn<wn,Ei;return Kn&&(Ei=wn,wn=vn,vn=Ei),Ei=xr(Or,wn,vn,Zr),Ei=Ei?Ei.range(wn,vn+1):[],Kn?Ei.reverse():Ei},A.tickFormat=function(Or,Zr){return Zr==null?$e:w(Zr)},A.nice=function(Or,Zr){var Wr=B();return(Or=xr(Or,Wr[0],Wr[Wr.length-1],Zr))?B(wC(Wr,Or)):A},A.copy=function(){return Om(A,Pb(n,l,a,s,u,h,v,m,w))},A}function x4(){return Wv.apply(Pb(wg,LC,Xv,_b,wL,SL,CL,AL,nA).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function MF(){return initRange.apply(calendar(utcYear,utcMonth,utcWeek,utcDay,utcHour,utcMinute,utcSecond,utcMillisecond,utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function U1(){var n=0,l=1,a,s,u,h,v=Wc,m=!1,w;function A(R){return isNaN(R=+R)?w:v(u===0?.5:(R=(h(R)-a)*u,m?Math.max(0,Math.min(1,R)):R))}return A.domain=function(R){return arguments.length?(a=h(n=+R[0]),s=h(l=+R[1]),u=a===s?0:1/(s-a),A):[n,l]},A.clamp=function(R){return arguments.length?(m=!!R,A):m},A.interpolator=function(R){return arguments.length?(v=R,A):v},A.unknown=function(R){return arguments.length?(w=R,A):w},function(R){return h=R,a=R(n),s=R(l),u=a===s?0:1/(s-a),A}}function Gm(n,l){return l.domain(n.domain()).interpolator(n.interpolator()).clamp(n.clamp()).unknown(n.unknown())}function oA(){var n=Rm(U1()(Wc));return n.copy=function(){return Gm(n,oA())},oC.apply(n,arguments)}function b4(){var n=loggish(U1()).domain([1,10]);return n.copy=function(){return Gm(n,b4()).base(n.base())},initInterpolator.apply(n,arguments)}function E4(){var n=symlogish(U1());return n.copy=function(){return Gm(n,E4()).constant(n.constant())},initInterpolator.apply(n,arguments)}function sA(){var n=powish(U1());return n.copy=function(){return Gm(n,sA()).exponent(n.exponent())},initInterpolator.apply(n,arguments)}function IF(){return sA.apply(null,arguments).exponent(.5)}function w4(){var n=[],l=identity;function a(s){if(!isNaN(s=+s))return l((bisect(n,s)-1)/(n.length-1))}return a.domain=function(s){if(!arguments.length)return n.slice();n=[];for(var u=0,h=s.length,v;u<h;++u)v=s[u],v!=null&&!isNaN(v=+v)&&n.push(v);return n.sort(ascending),a},a.interpolator=function(s){return arguments.length?(l=s,a):l},a.copy=function(){return w4(l).domain(n)},initInterpolator.apply(a,arguments)}function Z1(){var n=0,l=.5,a=1,s,u,h,v,m,w=Wc,A,R=!1,B;function G(j){return isNaN(j=+j)?B:(j=.5+((j=+A(j))-u)*(j<u?v:m),w(R?Math.max(0,Math.min(1,j)):j))}return G.domain=function(j){return arguments.length?(s=A(n=+j[0]),u=A(l=+j[1]),h=A(a=+j[2]),v=s===u?0:.5/(u-s),m=u===h?0:.5/(h-u),G):[n,l,a]},G.clamp=function(j){return arguments.length?(R=!!j,G):R},G.interpolator=function(j){return arguments.length?(w=j,G):w},G.unknown=function(j){return arguments.length?(B=j,G):B},function(j){return A=j,s=j(n),u=j(l),h=j(a),v=s===u?0:.5/(u-s),m=u===h?0:.5/(h-u),G}}function Ob(){var n=Rm(Z1()(Wc));return n.copy=function(){return Gm(n,Ob())},oC.apply(n,arguments)}function S4(){var n=loggish(Z1()).domain([.1,1,10]);return n.copy=function(){return copy(n,S4()).base(n.base())},initInterpolator.apply(n,arguments)}function C4(){var n=symlogish(Z1());return n.copy=function(){return copy(n,C4()).constant(n.constant())},initInterpolator.apply(n,arguments)}function uA(){var n=powish(Z1());return n.copy=function(){return copy(n,uA()).exponent(n.exponent())},initInterpolator.apply(n,arguments)}function kF(){return uA.apply(null,arguments).exponent(.5)}function V1(n){var l,a=[];function s(u){return u==null?l:u}return s.invert=s,s.domain=s.range=function(u){return u?(a=u,u):a},s.unknown=function(u){return u?(l=u,u):l},s.copy=function(){return V1(n).unknown(l)},s}var _f,lA,cA,A4=/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]?)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/,G1=(_f={},(0,W.Z)(_f,Ns.LINEAR,EC),(0,W.Z)(_f,Ns.POWER,cb),(0,W.Z)(_f,Ns.LOG,ab),(0,W.Z)(_f,Ns.IDENTITY,V1),(0,W.Z)(_f,Ns.SEQUENTIAL,oA),(0,W.Z)(_f,Ns.TIME,x4),(0,W.Z)(_f,Ns.QUANTILE,fb),(0,W.Z)(_f,Ns.QUANTIZE,MC),(0,W.Z)(_f,Ns.THRESHOLD,IC),(0,W.Z)(_f,Ns.CAT,w1),(0,W.Z)(_f,Ns.DIVERGING,Ob),_f),T4=(lA=(0,At.b2)(),lA(cA=function(){function n(){(0,pt.Z)(this,n),(0,W.Z)(this,"scaleOptions",{})}return(0,et.Z)(n,[{key:"apply",value:function(a,s){var u=this,h=s.styleAttributeService;a.hooks.init.tapPromise("FeatureScalePlugin",(0,J.Z)(ot().mark(function v(){var m,w,A;return ot().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(u.scaleOptions=a.getScaleOptions(),w=h.getLayerStyleAttributes(),A=(m=a.getSource())===null||m===void 0?void 0:m.data.dataArray,!(Array.isArray(A)&&A.length===0)){B.next=7;break}return B.abrupt("return");case 7:u.caculateScalesForAttributes(w||[],A);case 8:case"end":return B.stop()}},v)}))),a.hooks.beforeRenderData.tapPromise("FeatureScalePlugin",function(){var v=(0,J.Z)(ot().mark(function m(w){var A,R;return ot().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(w){G.next=2;break}return G.abrupt("return",w);case 2:if(u.scaleOptions=a.getScaleOptions(),A=h.getLayerStyleAttributes(),R=a.getSource().data.dataArray,!(Array.isArray(R)&&R.length===0)){G.next=7;break}return G.abrupt("return",!0);case 7:return u.caculateScalesForAttributes(A||[],R),a.layerModelNeedUpdate=!0,G.abrupt("return",!0);case 10:case"end":return G.stop()}},m)}));return function(m){return v.apply(this,arguments)}}()),a.hooks.beforeRender.tap("FeatureScalePlugin",function(){if(!a.layerModelNeedUpdate){u.scaleOptions=a.getScaleOptions();var v=h.getLayerStyleAttributes(),m=a.getSource().data.dataArray;if(!(Array.isArray(m)&&m.length===0)&&v){var w=v.filter(function(A){return A.needRescale});w.length&&u.caculateScalesForAttributes(w,m)}}})}},{key:"isNumber",value:function(a){return!isNaN(parseFloat(a))&&isFinite(a)}},{key:"caculateScalesForAttributes",value:function(a,s){var u=this;a.forEach(function(h){if(h.scale){var v=h.scale;v.names=u.parseFields(h.scale.field||[]);var m=[];v.names.forEach(function(w){var A;m.push(u.createScale(w,h.name,(A=h.scale)===null||A===void 0?void 0:A.values,s))}),m.some(function(w){return w.type===Qp.VARIABLE})?(v.type=Qp.VARIABLE,m.forEach(function(w){var A;if(!v.callback&&v.values!=="text")switch((A=w.option)===null||A===void 0?void 0:A.type){case Ns.LOG:case Ns.LINEAR:case Ns.POWER:if(v.values&&v.values.length>2){var R=w.scale.ticks(v.values.length);w.scale.domain(R)}v.values?w.scale.range(v.values):w.scale.range(w.option.domain);break;case Ns.QUANTILE:case Ns.QUANTIZE:case Ns.THRESHOLD:w.scale.range(v.values);break;case Ns.IDENTITY:break;case Ns.CAT:v.values?w.scale.range(v.values):w.scale.range(w.option.domain);break;case Ns.DIVERGING:case Ns.SEQUENTIAL:w.scale.interpolator(qk(v.values));break}if(v.values==="text"){var B;w.scale.range((B=w.option)===null||B===void 0?void 0:B.domain)}})):(v.type=Qp.CONSTANT,v.defaultValues=m.map(function(w,A){return w.scale(v.names[A])})),v.scalers=m.map(function(w){return{field:w.field,func:w.scale,option:w.option}}),h.needRescale=!1}})}},{key:"parseFields",value:function(a){return Array.isArray(a)?a:(0,Fn.isString)(a)?a.split("*"):[a]}},{key:"createScale",value:function(a,s,u,h){var v,m,w=this.scaleOptions[s]&&((v=this.scaleOptions[s])===null||v===void 0?void 0:v.field)===a?this.scaleOptions[s]:this.scaleOptions[a],A={field:a,scale:void 0,type:Qp.VARIABLE,option:w};if(!h||!h.length)return w&&w.type?A.scale=this.createDefaultScale(w):(A.scale=w1([a]),A.type=Qp.CONSTANT),A;var R=(m=h.find(function(j){return!(0,Fn.isNil)(j[a])}))===null||m===void 0?void 0:m[a];if(this.isNumber(a)||(0,Fn.isNil)(R)&&!w)A.scale=w1([a]),A.type=Qp.CONSTANT;else{var B=w&&w.type||this.getDefaultType(R);u==="text"&&(B=Ns.CAT);var G=this.createScaleConfig(B,a,w,h);A.scale=this.createDefaultScale(G),A.option=G}return A}},{key:"getDefaultType",value:function(a){var s=Ns.LINEAR;return typeof a=="string"&&(s=A4.test(a)?Ns.TIME:Ns.CAT),s}},{key:"createScaleConfig",value:function(a,s,u,h){var v={type:a},m=(h==null?void 0:h.map(function(R){return R[s]}))||[];if(u!=null&&u.domain)v.domain=u==null?void 0:u.domain;else if(a===Ns.CAT||a===Ns.IDENTITY)v.domain=(0,Fn.uniq)(m);else if(a===Ns.QUANTILE)v.domain=m;else if(a===Ns.DIVERGING){var w=jS(m),A=(u==null?void 0:u.neutral)!==void 0?u==null?void 0:u.neutral:(w[0]+w[1])/2;v.domain=[w[0],A,w[1]]}else v.domain=jS(m);return(0,K.Z)((0,K.Z)({},v),u)}},{key:"createDefaultScale",value:function(a){var s=a.type,u=a.domain,h=a.unknown,v=a.clamp,m=a.nice,w=G1[s]();return u&&w.domain&&w.domain(u),h&&w.unknown(h),v!==void 0&&w.clamp&&w.clamp(v),m!==void 0&&w.nice&&w.nice(m),w}}]),n}())||cA),fA,Hm,hA=(fA=(0,At.b2)(),fA(Hm=function(){function n(){(0,pt.Z)(this,n)}return(0,et.Z)(n,[{key:"apply",value:function(a){a.hooks.beforeRender.tap("LayerAnimateStylePlugin",function(){var s=a.animateStatus;s&&a.models.forEach(function(u){u.addUniforms((0,K.Z)({},a.layerModel.getAnimateUniforms()))})})}}]),n}())||Hm),pA=function(){function n(l){var a=l.rendererService,s=l.layerService,u=l.parent;(0,pt.Z)(this,n),(0,W.Z)(this,"tileResource",new Map),(0,W.Z)(this,"_tiles",[]),this.rendererService=a,this.layerService=s,this.parent=u}return(0,et.Z)(n,[{key:"tiles",get:function(){return this._tiles}},{key:"hasTile",value:function(a){return this._tiles.some(function(s){return s.key===a})}},{key:"addTile",value:function(a){this._tiles.push(a)}},{key:"getTile",value:function(a){return this._tiles.find(function(s){return s.key===a})}},{key:"getVisibleTileBylngLat",value:function(a){return this._tiles.find(function(s){return s.isLoaded&&s.visible&&s.lnglatInBounds(a)})}},{key:"removeTile",value:function(a){var s=this._tiles.findIndex(function(h){return h.key===a}),u=this._tiles.splice(s,1);u[0]&&u[0].destroy()}},{key:"updateTileVisible",value:function(a){var s=this.getTile(a.key);s==null||s.updateVisible(a.isVisible)}},{key:"isParentLoaded",value:function(a){var s=a.parent;if(!s)return!0;var u=this.getTile(s==null?void 0:s.key);return!!(u!=null&&u.isLoaded)}},{key:"isChildrenLoaded",value:function(a){var s=this,u=a==null?void 0:a.children;return u.length===0?!0:u.some(function(h){var v=s.getTile(h==null?void 0:h.key);return(v==null?void 0:v.isLoaded)===!1})}},{key:"render",value:function(){var l=(0,J.Z)(ot().mark(function s(){var u=this,h;return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:h=this.getRenderLayers(),h.map(function(){var w=(0,J.Z)(ot().mark(function A(R){return ot().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.next=2,u.layerService.renderLayer(R);case 2:case"end":return G.stop()}},A)}));return function(A){return w.apply(this,arguments)}}());case 2:case"end":return m.stop()}},s,this)}));function a(){return l.apply(this,arguments)}return a}()},{key:"getRenderLayers",value:function(){var a=this._tiles.filter(function(u){return u.visible&&u.isLoaded}),s=[];return a.map(function(u){return s.push.apply(s,(0,Oi.Z)(u.getLayers()))}),s}},{key:"getLayers",value:function(){var a=this._tiles.filter(function(u){return u.isLoaded}),s=[];return a.map(function(u){return s.push.apply(s,(0,Oi.Z)(u.getLayers()))}),s}},{key:"getTiles",value:function(){return this._tiles}},{key:"destroy",value:function(){this._tiles.forEach(function(a){return a.destroy()}),this.tileResource.clear()}}]),n}(),dA=nt(37824);function vA(n,l,a){a===void 0&&(a={});var s=ow(n),u=ow(l),h=dA.union(s.coordinates,u.coordinates);return h.length===0?null:h.length===1?Os(h[0],a.properties):cl(h,a.properties)}var M4=vA,I4=function(){function n(){(0,pt.Z)(this,n)}return(0,et.Z)(n,[{key:"getCombineFeature",value:function(a){var s=null,u=a[0];return a.map(function(h){var v=Os(h.coordinates);s===null?s=v:s=M4(s,v)}),u&&(s.properties=(0,K.Z)({},u)),s}}]),n}(),jm="select",Wm="active",k4=function(){function n(l){var a=l.layerService,s=l.tileLayerService,u=l.parent;(0,pt.Z)(this,n),(0,W.Z)(this,"tilePickID",new Map),this.layerService=a,this.tileLayerService=s,this.parent=u,this.tileSourceService=new I4}return(0,et.Z)(n,[{key:"pickRender",value:function(a){var s=this.tileLayerService.getVisibleTileBylngLat(a.lngLat);if(s){var u=s.getMainLayer();u==null||u.layerPickService.pickRender(a)}}},{key:"pick",value:function(a,s){var u=this.parent.getContainer(),h=u.get(Dt.IPickingService);if(a.type==="RasterLayer"){var v=this.tileLayerService.getVisibleTileBylngLat(s.lngLat);if(v&&v.getMainLayer()!==void 0){var m=v.getMainLayer();return m.layerPickService.pickRasterLayer(m,s,this.parent)}return!1}return this.pickRender(s),h.pickFromPickingFBO(a,s)}},{key:"selectFeature",value:function(a){var s=(0,yt.Z)(a,3),u=s[0],h=s[1],v=s[2],m=this.color2PickId(u,h,v);this.tilePickID.set(jm,m),this.updateHighLight(u,h,v,jm)}},{key:"highlightPickedFeature",value:function(a){var s=(0,yt.Z)(a,3),u=s[0],h=s[1],v=s[2],m=this.color2PickId(u,h,v);this.tilePickID.set(Wm,m),this.updateHighLight(u,h,v,Wm)}},{key:"updateHighLight",value:function(a,s,u,h){this.tileLayerService.tiles.map(function(v){var m=v.getMainLayer();switch(h){case jm:m==null||m.hooks.beforeSelect.call([a,s,u]);break;case Wm:m==null||m.hooks.beforeHighlight.call([a,s,u]);break}})}},{key:"setPickState",value:function(){var a=this.tilePickID.get(jm),s=this.tilePickID.get(Wm);if(a){var u=this.pickId2Color(a),h=(0,yt.Z)(u,3),v=h[0],m=h[1],w=h[2];this.updateHighLight(v,m,w,jm);return}if(s){var A=this.pickId2Color(s),R=(0,yt.Z)(A,3),B=R[0],G=R[1],j=R[2];this.updateHighLight(B,G,j,Wm);return}}},{key:"color2PickId",value:function(a,s,u){return zc(new Uint8Array([a,s,u]))}},{key:"pickId2Color",value:function(a){return vc(a)}},{key:"getFeatureById",value:function(a){var s=this.tileLayerService.getTiles().filter(function(h){return h.visible}),u=[];return s.forEach(function(h){u.push.apply(u,(0,Oi.Z)(h.getFeatureById(a)))}),u}},{key:"pickRasterLayer",value:function(a,s,u){return!1}}]),n}();function gA(n){return n==="PolygonLayer"?_1:n==="LineLayer"?L0:m1}function mA(n){return["PolygonLayer","LineLayer"].indexOf(n)!==-1}var Z0=function(){function n(l,a){(0,pt.Z)(this,n),(0,W.Z)(this,"visible",!0),(0,W.Z)(this,"layers",[]),(0,W.Z)(this,"isLoaded",!1),this.parent=a,this.sourceTile=l,this.x=l.x,this.y=l.y,this.z=l.z,this.key="".concat(this.x,"_").concat(this.y,"_").concat(this.z)}return(0,et.Z)(n,[{key:"getLayers",value:function(){return this.layers}},{key:"styleUpdate",value:function(){}},{key:"lnglatInBounds",value:function(a){var s=(0,yt.Z)(this.sourceTile.bounds,4),u=s[0],h=s[1],v=s[2],m=s[3],w=a.lng,A=a.lat;return w>=u&&w<=v&&A>=h&&A<=m}},{key:"getLayerOptions",value:function(){var a=this.parent.getLayerConfig();return(0,K.Z)((0,K.Z)({},a),{},{autoFit:!1,mask:mA(this.parent.type)||a.mask})}},{key:"addMask",value:function(){var l=(0,J.Z)(ot().mark(function s(u,h){var v;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return v=Qg(this.parent.sceneContainer),h.setContainer(v,this.parent.sceneContainer),w.next=4,h.init();case 4:u.addMaskLayer(h);case 5:case"end":return w.stop()}},s,this)}));function a(s,u){return l.apply(this,arguments)}return a}()},{key:"addLayer",value:function(){var l=(0,J.Z)(ot().mark(function s(u){var h;return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return u.isTileLayer=!0,h=Qg(this.parent.sceneContainer),u.setContainer(h,this.parent.sceneContainer),this.layers.push(u),m.next=6,u.init();case 6:case"end":return m.stop()}},s,this)}));function a(s){return l.apply(this,arguments)}return a}()},{key:"updateVisible",value:function(a){this.visible=a,this.updateOptions("visible",a)}},{key:"updateOptions",value:function(a,s){this.layers.forEach(function(u){u.updateLayerConfig((0,W.Z)({},a,s))})}},{key:"getMainLayer",value:function(){return this.layers[0]}},{key:"getFeatures",value:function(a){return[]}},{key:"getFeatureById",value:function(a){return[]}},{key:"destroy",value:function(){this.layers.forEach(function(a){return a.destroy()})}}]),n}();function L4(n){var l=P4();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function P4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var H1=function(n){(0,zt.Z)(a,n);var l=L4(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"initTileLayer",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R;return ot().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(v=this.parent.getLayerAttributeConfig(),m=this.getLayerOptions(),w=gA(this.parent.type),A=this.getSourceOption(),A){G.next=7;break}return this.isLoaded=!0,G.abrupt("return");case 7:if(R=new w((0,K.Z)({},m)).source(A.data,A.options),Object.keys(v).forEach(function(j){var lt,ct,_t=j;R[_t]((lt=v[_t])===null||lt===void 0?void 0:lt.field,(ct=v[_t])===null||ct===void 0?void 0:ct.values)}),!m.mask){G.next=12;break}return G.next=12,this.addTileMask(R);case 12:return G.next=14,this.addLayer(R);case 14:this.setLayerMinMaxZoom(R),this.isLoaded=!0;case 16:case"end":return G.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"addTileMask",value:function(){var s=(0,J.Z)(ot().mark(function h(v){var m;return ot().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return m=new Hx({layerType:"MaskLayer"}).source({type:"FeatureCollection",features:[this.sourceTile.bboxPolygon]},{parser:{type:"geojson",featureId:"id"}}),A.next=3,this.addMask(v,m);case 3:case"end":return A.stop()}},h,this)}));function u(h){return s.apply(this,arguments)}return u}()},{key:"getSourceOption",value:function(){var u=this.parent.getSource(),h=this.parent.getLayerConfig(),v=h.sourceLayer,m=v===void 0?"defaultLayer":v,w=h.featureId,A=w===void 0?"id":w,R=this.getFeatures(m);return{data:{type:"FeatureCollection",features:R},options:{parser:{type:"geojson",featureId:A},transforms:u.transforms}}}},{key:"setLayerMinMaxZoom",value:function(u){u.getModelType()==="text"&&u.updateLayerConfig({maxZoom:this.z+1,minZoom:this.z-1})}},{key:"getFeatures",value:function(u){var h=this.sourceTile.data;return h.getTileData(u)}},{key:"getFeatureById",value:function(u){var h=this.getMainLayer();if(!h)return[];var v=h.getSource().data.dataArray.filter(function(m){return m._id===u});return v}}]),a}(Z0);function O4(n){var l=F4();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function F4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var R4=function(n){(0,zt.Z)(a,n);var l=O4(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"initTileLayer",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A;return ot().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return v=this.getSourceOption(),m=v.data.features[0].properties,w=new L0().source(v.data,v.options).size(1).shape("line").color("red"),A=new m1({minZoom:this.z-1,maxZoom:this.z+1}).source([m],{parser:{type:"json",x:"textLng",y:"textLat"}}).size(20).color("red").shape(this.key).style({stroke:"#fff",strokeWidth:2}),B.next=6,this.addLayer(w);case 6:return B.next=8,this.addLayer(A);case 8:this.isLoaded=!0;case 9:case"end":return B.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getSourceOption",value:function(){var u=this.parent.getSource(),h=this.sourceTile.data.layers.testTile.features;return{data:{type:"FeatureCollection",features:h},options:{parser:{type:"geojson"},transforms:u.transforms}}}}]),a}(Z0);function D4(n){var l=B4();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function B4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var LF=`precision mediump float;
|
|
uniform float u_opacity: 1.0;
|
|
uniform sampler2D u_texture;
|
|
varying vec2 v_texCoord;
|
|
void main() {
|
|
vec4 color = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y));
|
|
gl_FragColor = color;
|
|
gl_FragColor.a *= u_opacity;
|
|
}
|
|
`,yA=`precision highp float;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
attribute vec3 a_Position;
|
|
attribute vec2 a_Uv;
|
|
varying vec2 v_texCoord;
|
|
#pragma include "projection"
|
|
void main() {
|
|
v_texCoord = a_Uv;
|
|
vec4 project_pos = project_position(vec4(a_Position, 1.0));
|
|
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(project_pos.xy,0., 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));
|
|
}
|
|
}
|
|
`,_A=function(n){(0,zt.Z)(a,n);var l=D4(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity;return{u_opacity:h||1,u_texture:this.texture}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v=this,m,w,A,R,B,G,j,lt,ct,_t,Vt;return ot().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(m=this.layer.getLayerConfig(),w=m.mask,A=w===void 0?!1:w,R=m.maskInside,B=R===void 0?!0:R,G=this.layer.getSource(),j=this.rendererService.createTexture2D,this.texture=j({height:0,width:0}),!Cs){ae.next=12;break}lt=this.layerService.sceneService.getSceneConfig().canvas,ct=lt.createImage(),ct.crossOrigin="anonymous",ct.src=G.data.originData,ct.onload=function(){v.texture=j({data:ct,width:ct.width,height:ct.height}),v.layerService.reRender()},ae.next=16;break;case 12:return ae.next=14,G.data.images;case 14:_t=ae.sent,this.texture=j({data:_t[0],width:_t[0].width,height:_t[0].height,mag:ne.LINEAR,min:ne.LINEAR});case 16:return ae.next=18,this.layer.buildLayerModel({moduleName:"rasterImage",vertexShader:yA,fragmentShader:LF,triangulation:f1,primitive:ne.TRIANGLES,blend:{enable:!0},depth:{enable:!1},stencil:Zo(A,B)});case 18:return Vt=ae.sent,ae.abrupt("return",[Vt]);case 20:case"end":return ae.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u;(u=this.texture)===null||u===void 0||u.destroy()}},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.initModels();case 2:return m.abrupt("return",m.sent);case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:ea.Attribute,descriptor:{name:"a_Uv",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(h,v,m){return[m[3],m[4]]}}})}}]),a}($o),Fb={image:_A},N4=Fb;function Rb(n){var l=z4();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function z4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var U4=function(n){(0,zt.Z)(a,n);var l=Rb(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"type","ImageLayer"),s}return(0,et.Z)(a,[{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return v=this.getModelType(),this.layerModel=new N4[v](this),w.next=4,this.initLayerModels();case 4:case"end":return w.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getDefaultConfig",value:function(){var u=this.getModelType(),h={image:{}};return h[u]}},{key:"getModelType",value:function(){return"image"}}]),a}(hg);function Z4(n){var l=V4();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function V4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var G4=function(n){(0,zt.Z)(a,n);var l=Z4(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"initTileLayer",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A;return ot().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return v=this.parent.getLayerAttributeConfig(),m=this.getLayerOptions(),w=this.getSourceOption(),A=new U4((0,K.Z)({},m)).source(w.data,w.options),v&&Object.keys(v).forEach(function(G){var j,lt,ct=G;A[ct]((j=v[ct])===null||j===void 0?void 0:j.field,(lt=v[ct])===null||lt===void 0?void 0:lt.values)}),B.next=7,this.addLayer(A);case 7:this.isLoaded=!0;case 8:case"end":return B.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getSourceOption",value:function(){var u=this.parent.getSource();return{data:this.sourceTile.data,options:{parser:{type:"image",extent:this.sourceTile.bounds},transforms:u.transforms}}}}]),a}(Z0);function H4(n){var l=j4();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function j4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var PF=`precision mediump float;
|
|
uniform float u_opacity: 1.0;
|
|
uniform sampler2D u_texture;
|
|
uniform sampler2D u_colorTexture;
|
|
uniform float u_min;
|
|
uniform float u_max;
|
|
uniform vec2 u_domain;
|
|
uniform float u_noDataValue;
|
|
uniform bool u_clampLow: true;
|
|
uniform bool u_clampHigh: true;
|
|
varying vec2 v_texCoord;
|
|
bool isnan_emu(float x) { return (x > 0.0 || x < 0.0) ? x != x : x != 0.0; }
|
|
|
|
|
|
void main() {
|
|
|
|
float value = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y)).r;
|
|
if (value == u_noDataValue || isnan_emu(value))
|
|
gl_FragColor = vec4(0.0, 0, 0, 0.0);
|
|
else if ((!u_clampLow && value < u_domain[0]) || (!u_clampHigh && value > u_domain[1]))
|
|
gl_FragColor = vec4(0, 0, 0, 0);
|
|
else {
|
|
|
|
float normalisedValue =(value - u_domain[0]) / (u_domain[1] -u_domain[0]);
|
|
vec4 color = texture2D(u_colorTexture,vec2(normalisedValue, 0));
|
|
gl_FragColor = color;
|
|
gl_FragColor.a = gl_FragColor.a * u_opacity ;
|
|
}
|
|
}
|
|
`,iv=`precision highp float;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
attribute vec3 a_Position;
|
|
attribute vec2 a_Uv;
|
|
varying vec2 v_texCoord;
|
|
#pragma include "projection"
|
|
void main() {
|
|
v_texCoord = a_Uv;
|
|
vec4 project_pos = project_position(vec4(a_Position, 1.0));
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(project_pos.xy,0., 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));
|
|
}
|
|
}
|
|
`,j1=function(n){(0,zt.Z)(a,n);var l=H4(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.clampLow,w=m===void 0?!0:m,A=u.clampHigh,R=A===void 0?!0:A,B=u.noDataValue,G=B===void 0?-9999999:B,j=u.domain,lt=u.rampColors,ct=j||Gf(lt);return this.colorTexture=this.layer.textureService.getColorTexture(lt,ct),{u_opacity:v||1,u_texture:this.texture,u_domain:ct,u_clampLow:w,u_clampHigh:typeof R!="undefined"?R:w,u_noDataValue:G,u_colorTexture:this.colorTexture}}},{key:"getRasterData",value:function(){var s=(0,J.Z)(ot().mark(function h(v){var m,w,A,R;return ot().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(!Array.isArray(v.data)){G.next=4;break}return G.abrupt("return",{data:v.data,width:v.width,height:v.height});case 4:return G.next=6,v.data;case 6:return m=G.sent,w=m.rasterData,A=m.width,R=m.height,G.abrupt("return",{data:Array.from(w),width:A,height:R});case 11:case"end":return G.stop()}},h)}));function u(h){return s.apply(this,arguments)}return u}()},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j,lt,ct,_t,Vt,ce;return ot().wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,B=this.layer.getSource(),G=this.rendererService.createTexture2D,j=B.data.dataArray[0],ze.next=6,this.getRasterData(j);case 6:return lt=ze.sent,ct=lt.data,_t=lt.width,Vt=lt.height,this.texture=G({data:ct,width:_t,height:Vt,format:ne.LUMINANCE,type:ne.FLOAT}),ze.next=13,this.layer.buildLayerModel({moduleName:"rasterImageData",vertexShader:iv,fragmentShader:PF,triangulation:f1,primitive:ne.TRIANGLES,depth:{enable:!1},stencil:Zo(w,R)});case 13:return ce=ze.sent,ze.abrupt("return",[ce]);case 15:case"end":return ze.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.initModels();case 2:return m.abrupt("return",m.sent);case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u,h;(u=this.texture)===null||u===void 0||u.destroy(),(h=this.colorTexture)===null||h===void 0||h.destroy()}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:ea.Attribute,descriptor:{name:"a_Uv",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(h,v,m){return[m[3],m[4]]}}})}}]),a}($o),W4=["data"],W1=["rasterData"];function X4(n){var l=Y4();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Y4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var $4=`precision mediump float;
|
|
uniform vec2 u_rminmax: vec2(0,255);
|
|
uniform vec2 u_gminmax: vec2(0,255);
|
|
uniform vec2 u_bminmax: vec2(0,255);
|
|
uniform float u_opacity: 1.0;
|
|
uniform sampler2D u_texture;
|
|
uniform float u_noDataValue : 0.0;
|
|
varying vec2 v_texCoord;
|
|
|
|
void main() {
|
|
vec3 rgb = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y)).rgb;
|
|
if(rgb == vec3(u_noDataValue)) {
|
|
gl_FragColor = vec4(0.0, 0, 0, 0.0);
|
|
} else {
|
|
gl_FragColor = vec4(rgb.r / (u_rminmax.y -u_rminmax.x), rgb.g /(u_gminmax.y -u_gminmax.x), rgb.b/ (u_bminmax.y - u_bminmax.x), u_opacity);
|
|
}
|
|
|
|
}`,q4=`precision highp float;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
attribute vec3 a_Position;
|
|
attribute vec2 a_Uv;
|
|
varying vec2 v_texCoord;
|
|
#pragma include "projection"
|
|
void main() {
|
|
v_texCoord = a_Uv;
|
|
vec4 project_pos = project_position(vec4(a_Position, 1.0));
|
|
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(project_pos.xy,0., 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));
|
|
}
|
|
}
|
|
`,K4=function(n){(0,zt.Z)(a,n);var l=X4(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"dataOption",{}),s}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=h===void 0?1:h,m=u.noDataValue,w=m===void 0?0:m,A=this.dataOption,R=A.rMinMax,B=A.gMinMax,G=A.bMinMax;return{u_opacity:v||1,u_texture:this.texture,u_noDataValue:w,u_rminmax:R,u_gminmax:B,u_bminmax:G}}},{key:"getRasterData",value:function(){var s=(0,J.Z)(ot().mark(function h(v){var m,w,A,R,B;return ot().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(!Array.isArray(v.data)){j.next=4;break}return m=v.data,w=(0,tc.Z)(v,W4),this.dataOption=w,j.abrupt("return",(0,K.Z)({data:m},w));case 4:return j.next=6,v.data;case 6:if(A=j.sent,R=A.rasterData,B=(0,tc.Z)(A,W1),this.dataOption=B,!Array.isArray(R)){j.next=14;break}return j.abrupt("return",(0,K.Z)({data:R},B));case 14:return j.abrupt("return",(0,K.Z)({data:Array.from(R)},B));case 15:case"end":return j.stop()}},h,this)}));function u(h){return s.apply(this,arguments)}return u}()},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j,lt,ct,_t,Vt,ce;return ot().wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,B=this.layer.getSource(),G=this.rendererService.createTexture2D,j=B.data.dataArray[0],ze.next=6,this.getRasterData(j);case 6:return lt=ze.sent,ct=lt.data,_t=lt.width,Vt=lt.height,this.texture=G({data:ct,width:_t,height:Vt,format:ne.RGB,type:ne.FLOAT}),ze.next=13,this.layer.buildLayerModel({moduleName:"rasterImageDataRGBA",vertexShader:q4,fragmentShader:$4,triangulation:f1,primitive:ne.TRIANGLES,depth:{enable:!1},stencil:Zo(w,R)});case 13:return ce=ze.sent,ze.abrupt("return",[ce]);case 15:case"end":return ze.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.initModels();case 2:return m.abrupt("return",m.sent);case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u;(u=this.texture)===null||u===void 0||u.destroy()}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:ea.Attribute,descriptor:{name:"a_Uv",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(h,v,m){return[m[3],m[4]]}}})}}]),a}($o);function Q4(n){var l=J4();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function J4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var tP=`precision mediump float;
|
|
uniform float u_opacity: 1.0;
|
|
|
|
uniform sampler2D u_texture;
|
|
uniform sampler2D u_colorTexture;
|
|
|
|
varying vec2 v_texCoord;
|
|
|
|
uniform vec2 u_domain;
|
|
uniform float u_noDataValue;
|
|
uniform bool u_clampLow: true;
|
|
uniform bool u_clampHigh: true;
|
|
|
|
void main() {
|
|
vec4 baseColor = texture2D(u_texture, vec2(v_texCoord.x, v_texCoord.y)) * 256.0;
|
|
float r = baseColor.r * 256.0 * 256.0;
|
|
float g = baseColor.g * 256.0;
|
|
float b = baseColor.b;
|
|
float value = (r + g + b) * 0.1 - 10000.0;
|
|
|
|
if (value == u_noDataValue) {
|
|
gl_FragColor = vec4(0.0, 0, 0, 0.0);
|
|
} else if ((!u_clampLow && value < u_domain[0]) || (!u_clampHigh && value > u_domain[1])) {
|
|
gl_FragColor = vec4(0.0, 0, 0, 0.0);
|
|
} else {
|
|
float normalisedValue =(value - u_domain[0]) / (u_domain[1] - u_domain[0]);
|
|
vec4 color = texture2D(u_colorTexture, vec2(normalisedValue, 0));
|
|
gl_FragColor = color;
|
|
gl_FragColor.a = gl_FragColor.a * u_opacity ;
|
|
}
|
|
}
|
|
`,eP=`precision highp float;
|
|
uniform mat4 u_ModelMatrix;
|
|
uniform mat4 u_Mvp;
|
|
attribute vec3 a_Position;
|
|
attribute vec2 a_Uv;
|
|
varying vec2 v_texCoord;
|
|
#pragma include "projection"
|
|
void main() {
|
|
v_texCoord = a_Uv;
|
|
vec4 project_pos = project_position(vec4(a_Position, 1.0));
|
|
// gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));
|
|
if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x
|
|
gl_Position = u_Mvp * (vec4(project_pos.xy,0., 1.0));
|
|
} else {
|
|
gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));
|
|
}
|
|
}
|
|
`,rP=function(n){(0,zt.Z)(a,n);var l=Q4(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getUninforms",value:function(){var u=this.layer.getLayerConfig(),h=u.opacity,v=u.clampLow,m=v===void 0?!0:v,w=u.clampHigh,A=w===void 0?!0:w,R=u.noDataValue,B=R===void 0?-9999999:R,G=u.domain,j=u.rampColors,lt=u.colorTexture,ct=G||Gf(j),_t=lt;return lt?this.layer.textureService.setColorTexture(lt,j,ct):_t=this.layer.textureService.getColorTexture(j,ct),{u_opacity:h||1,u_texture:this.texture,u_domain:ct,u_clampLow:m,u_clampHigh:typeof A!="undefined"?A:m,u_noDataValue:B,u_colorTexture:_t}}},{key:"initModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j,lt;return ot().wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return v=this.layer.getLayerConfig(),m=v.mask,w=m===void 0?!1:m,A=v.maskInside,R=A===void 0?!0:A,B=this.layer.getSource(),G=this.rendererService.createTexture2D,_t.next=5,B.data.images;case 5:return j=_t.sent,this.texture=G({data:j[0],width:j[0].width,height:j[0].height}),_t.next=9,this.layer.buildLayerModel({moduleName:"RasterTileDataImage",vertexShader:eP,fragmentShader:tP,triangulation:f1,primitive:ne.TRIANGLES,depth:{enable:!1},blend:this.getBlend(),stencil:Zo(w,R)});case 9:return lt=_t.sent,_t.abrupt("return",[lt]);case 11:case"end":return _t.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"clearModels",value:function(){var u;(u=this.texture)===null||u===void 0||u.destroy()}},{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.initModels();case 2:return m.abrupt("return",m.sent);case 3:case"end":return m.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:ea.Attribute,descriptor:{name:"a_Uv",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:2,update:function(h,v,m){return[m[3],m[4]]}}})}}]),a}($o),Xm={raster:j1,rasterRgb:K4,raster3d:j1,rasterTerrainRgb:rP},nP=Xm;function iP(n){var l=aP();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function aP(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Db=function(n){(0,zt.Z)(a,n);var l=iP(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"type","RasterLayer"),s}return(0,et.Z)(a,[{key:"buildModels",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return v=this.getModelType(),this.layerModel=new nP[v](this),w.next=4,this.initLayerModels();case 4:case"end":return w.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getDefaultConfig",value:function(){var u=this.getModelType(),h={raster:{},rasterRgb:{},raster3d:{},rasterTerrainRgb:{}};return h[u]}},{key:"getModelType",value:function(){var u=this.layerSource.getParserType();switch(u){case"raster":return"raster";case"rasterRgb":return"rasterRgb";case"image":return"rasterTerrainRgb";default:return"raster"}}}]),a}(hg),xA=["rasterData"];function OF(n){var l=Ym();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Ym(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Bb={positions:[0,1],colors:["#000","#fff"]},oP=function(n){(0,zt.Z)(a,n);var l=OF(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"initTileLayer",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G;return ot().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return v=this.parent.getLayerAttributeConfig(),m=this.getLayerOptions(),w=this.getSourceOption(),A=this.getLayerOptions(),R=A.rampColors,B=A.domain,this.colorTexture=this.parent.textureService.getColorTexture(R,B),G=new Db((0,K.Z)((0,K.Z)({},m),{},{colorTexture:this.colorTexture})).source(w.data,w.options),v&&Object.keys(v).forEach(function(ct){var _t,Vt,ce=ct;G[ce]((_t=v[ce])===null||_t===void 0?void 0:_t.field,(Vt=v[ce])===null||Vt===void 0?void 0:Vt.values)}),lt.next=9,this.addLayer(G);case 9:this.isLoaded=!0;case 10:case"end":return lt.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getSourceOption",value:function(){var u=this.parent.getSource(),h=this.sourceTile.data.data,v=h.rasterData,m=(0,tc.Z)(h,xA);return{data:v,options:{parser:(0,K.Z)({type:"raster",extent:this.sourceTile.bounds},m),transforms:u.transforms}}}},{key:"styleUpdate",value:function(){for(var u=this,h=arguments.length,v=new Array(h),m=0;m<h;m++)v[m]=arguments[m];var w=v,A=w.rampColors,R=A===void 0?Bb:A,B=w.domain;this.colorTexture=this.parent.textureService.getColorTexture(R,B||Gf(R)),this.layers.forEach(function(G){return G.style({colorTexture:u.colorTexture})})}},{key:"destroy",value:function(){this.layers.forEach(function(u){return u.destroy()})}}]),a}(Z0),bA=["rasterData"];function sP(n){var l=uP();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function uP(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var FF=function(n){(0,zt.Z)(a,n);var l=sP(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"initTileLayer",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A;return ot().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return v=this.parent.getLayerAttributeConfig(),m=this.getLayerOptions(),w=this.getSourceOption(),A=new Db((0,K.Z)({},m)).source(w.data,w.options),v&&Object.keys(v).forEach(function(G){var j,lt,ct=G;A[ct]((j=v[ct])===null||j===void 0?void 0:j.field,(lt=v[ct])===null||lt===void 0?void 0:lt.values)}),B.next=7,this.addLayer(A);case 7:this.isLoaded=!0;case 8:case"end":return B.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getSourceOption",value:function(){var u=this.parent.getSource(),h=this.sourceTile.data.data,v=h.rasterData,m=(0,tc.Z)(h,bA);return{data:v,options:{parser:(0,K.Z)({type:"rasterRgb",extent:this.sourceTile.bounds},m),transforms:u.transforms}}}}]),a}(Z0);function RF(n){var l=DF();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function DF(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var lP=function(n){(0,zt.Z)(a,n);var l=RF(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"initTileLayer",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A;return ot().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return v=this.parent.getLayerAttributeConfig(),m=this.getLayerOptions(),w=this.getSourceOption(),A=new Db((0,K.Z)({},m)).source(w.data,w.options),v&&Object.keys(v).forEach(function(G){var j,lt,ct=G;A[ct]((j=v[ct])===null||j===void 0?void 0:j.field,(lt=v[ct])===null||lt===void 0?void 0:lt.values)}),B.next=7,this.addLayer(A);case 7:this.isLoaded=!0;case 8:case"end":return B.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getSourceOption",value:function(){var u=this.parent.getSource();return{data:this.sourceTile.data,options:{parser:{type:"image",extent:this.sourceTile.bounds},transforms:u.transforms}}}}]),a}(Z0);function EA(n){var l=wA();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function wA(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var cP=function(n){(0,zt.Z)(a,n);var l=EA(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"initTileLayer",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A;return ot().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return v=this.parent.getLayerAttributeConfig(),m=this.getLayerOptions(),w=this.getSourceOption(),A=new Hx((0,K.Z)({},m)).source(w.data,w.options),v&&Object.keys(v).forEach(function(G){var j,lt,ct=G;A[ct]((j=v[ct])===null||j===void 0?void 0:j.field,(lt=v[ct])===null||lt===void 0?void 0:lt.values)}),B.next=7,this.addLayer(A);case 7:this.isLoaded=!0;case 8:case"end":return B.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getFeatures",value:function(u){if(!u)return[];var h=this.sourceTile.data;return h.getTileData(u)}},{key:"getSourceOption",value:function(){var u=this.parent.getSource(),h=this.parent.getLayerConfig(),v=h.sourceLayer,m=h.featureId,w=this.getFeatures(v);return{data:{type:"FeatureCollection",features:w},options:{parser:{type:"geojson",featureId:m},transforms:u.transforms}}}}]),a}(Z0);function fP(n){var l=n.type;switch(l){case"PolygonLayer":return H1;case"LineLayer":return H1;case"PointLayer":return H1;case"TileDebugLayer":return R4;case"MaskLayer":return cP;case"RasterLayer":var a=n.getSource().parser.dataType;switch(a){case"rgb":case"customRGB":return FF;case"arraybuffer":case"customArrayBuffer":return oP;case"terrainRGB":return lP;default:return G4}default:return H1}}var Yv=["shape","color","size","style","animate","filter","rotate","scale","setBlend","setSelect","setActive"],X1=function(){function n(l){(0,pt.Z)(this,n),(0,W.Z)(this,"initedTileset",!1),(0,W.Z)(this,"viewchange",(0,Fn.debounce)(this.mapchange,24)),this.parent=l;var a=this.parent.getContainer();this.rendererService=a.get(Dt.IRendererService),this.layerService=a.get(Dt.ILayerService),this.mapService=a.get(Dt.IMapService),this.pickingService=a.get(Dt.IPickingService),this.tileLayerService=new pA({rendererService:this.rendererService,layerService:this.layerService,parent:l}),this.tilePickService=new k4({tileLayerService:this.tileLayerService,layerService:this.layerService,parent:l}),this.parent.setLayerPickService(this.tilePickService),this.proxy(l),this.initTileSetManager()}return(0,et.Z)(n,[{key:"initTileSetManager",value:function(){var a,s=this.parent.getSource();this.tilesetManager=s.tileset,this.initedTileset||(this.bindTilesetEvent(),this.initedTileset=!0);var u=this.getCurrentView(),h=u.latLonBounds,v=u.zoom;(a=this.tilesetManager)===null||a===void 0||a.update(v,h)}},{key:"mapchange",value:function(){var a,s=this.getCurrentView(),u=s.latLonBounds,h=s.zoom;if(this.mapService.version==="GAODE1.x"){var v=this.parent.getLayerConfig(),m=v.visible;h<2&&m?(this.parent.updateLayerConfig({visible:!1}),this.layerService.reRender()):h>=2&&!m&&(this.parent.updateLayerConfig({visible:!0}),this.layerService.reRender())}this.lastViewStates&&this.lastViewStates.zoom===h&&this.lastViewStates.latLonBounds.toString()===u.toString()||(this.lastViewStates={zoom:h,latLonBounds:u},(a=this.tilesetManager)===null||a===void 0||a.throttleUpdate(h,u))}},{key:"getCurrentView",value:function(){var a=this.mapService.getBounds(),s=[a[0][0],a[0][1],a[1][0],a[1][1]],u=this.mapService.getZoom();return{latLonBounds:s,zoom:u}}},{key:"bindTilesetEvent",value:function(){var a=this;this.tilesetManager.on("tile-loaded",function(s){}),this.tilesetManager.on("tile-unload",function(s){a.tileUnLoad(s)}),this.tilesetManager.on("tile-error",function(s,u){a.tileError(s)}),this.tilesetManager.on("tile-update",function(){a.tileUpdate()}),this.mapService.on("zoomend",function(){return a.mapchange()}),this.mapService.on("moveend",function(){return a.viewchange()})}},{key:"render",value:function(){this.tileLayerService.render()}},{key:"getLayers",value:function(){return this.tileLayerService.getLayers()}},{key:"getTiles",value:function(){return this.tileLayerService.getTiles()}},{key:"tileLoaded",value:function(a){}},{key:"tileError",value:function(a){console.warn("error:",a)}},{key:"destroy",value:function(){var a;(a=this.tilesetManager)===null||a===void 0||a.destroy(),this.tileLayerService.destroy()}},{key:"tileUnLoad",value:function(a){this.tileLayerService.removeTile(a.key)}},{key:"tileUpdate",value:function(){var l=(0,J.Z)(ot().mark(function s(){var u=this,h,v;return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(this.tilesetManager){w.next=2;break}return w.abrupt("return");case 2:return h=this.parent.getMinZoom(),v=this.parent.getMaxZoom(),w.next=6,Promise.all(this.tilesetManager.tiles.filter(function(A){return A.isLoaded}).filter(function(A){return A.isVisibleChange}).filter(function(A){return A.data}).filter(function(A){return A.z>=h&&A.z<v}).map(function(){var A=(0,J.Z)(ot().mark(function R(B){var G,j;return ot().wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:if(u.tileLayerService.hasTile(B.key)){ct.next=9;break}return G=fP(u.parent),j=new G(B,u.parent),ct.next=5,j.initTileLayer();case 5:u.tilePickService.setPickState(),j.getLayers().length!==0&&(u.tileLayerService.addTile(j),u.tileLayerService.updateTileVisible(B),u.layerService.reRender()),ct.next=12;break;case 9:u.tileLayerService.updateTileVisible(B),u.tilePickService.setPickState(),u.layerService.reRender();case 12:case"end":return ct.stop()}},R)}));return function(R){return A.apply(this,arguments)}}()));case 6:this.tilesetManager.isLoaded&&this.parent.emit("tiles-loaded",this.tilesetManager.currentTiles);case 7:case"end":return w.stop()}},s,this)}));function a(){return l.apply(this,arguments)}return a}()},{key:"setPickState",value:function(a){}},{key:"pickRender",value:function(a){this.tilePickService.pickRender(a)}},{key:"selectFeature",value:function(a){this.tilePickService.selectFeature(a)}},{key:"highlightPickedFeature",value:function(a){this.tilePickService.highlightPickedFeature(a)}},{key:"proxy",value:function(a){var s=this;Yv.forEach(function(u){var h=a[u].bind(a);a[u]=function(){for(var v=arguments.length,m=new Array(v),w=0;w<v;w++)m[w]=arguments[w];return h.apply(void 0,m),s.getLayers().map(function(A){A[u].apply(A,m)}),u==="style"&&s.getTiles().forEach(function(A){return A.styleUpdate.apply(A,m)}),a}})}}]),n}(),SA,Nb,CA=(SA=(0,At.b2)(),SA(Nb=function(){function n(){(0,pt.Z)(this,n)}return(0,et.Z)(n,[{key:"initLayerModel",value:function(){var l=(0,J.Z)(ot().mark(function s(u){return ot().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return u.prepareBuildModel(),v.next=3,u.buildModels();case 3:u.styleNeedUpdate=!1;case 4:case"end":return v.stop()}},s)}));function a(s){return l.apply(this,arguments)}return a}()},{key:"prepareLayerModel",value:function(){var l=(0,J.Z)(ot().mark(function s(u){return ot().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return u.prepareBuildModel(),v.next=3,u.buildModels();case 3:case"end":return v.stop()}},s)}));function a(s){return l.apply(this,arguments)}return a}()},{key:"apply",value:function(a){var s=this;a.hooks.init.tapPromise("LayerModelPlugin",(0,J.Z)(ot().mark(function u(){return ot().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(!a.getSource().isTile){v.next=4;break}return a.prepareBuildModel(),a.tileLayer=new X1(a),v.abrupt("return");case 4:return v.next=6,s.initLayerModel(a);case 6:case"end":return v.stop()}},u)}))),a.hooks.beforeRenderData.tapPromise("LayerModelPlugin",function(){var u=(0,J.Z)(ot().mark(function h(v){return ot().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(v){w.next=2;break}return w.abrupt("return",!1);case 2:if(!a.getSource().isTile){w.next=5;break}return a.tileLayer=new X1(a),w.abrupt("return",!1);case 5:return w.next=7,s.prepareLayerModel(a);case 7:return w.abrupt("return",!0);case 8:case"end":return w.stop()}},h)}));return function(h){return u.apply(this,arguments)}}())}}]),n}())||Nb),AA,TA,BF=(AA=(0,At.b2)(),AA(TA=function(){function n(){(0,pt.Z)(this,n)}return(0,et.Z)(n,[{key:"apply",value:function(a){a.hooks.afterInit.tap("LayerStylePlugin",function(){var s=a.getLayerConfig(),u=s.autoFit,h=s.fitBoundsOptions;u&&a.fitBounds(h)})}}]),n}())||TA),MA,IA,kA=["type"],LA={directional:{lights:"u_DirectionalLights",num:"u_NumOfDirectionalLights"},spot:{lights:"u_SpotLights",num:"u_NumOfSpotLights"}},hP={type:"directional",direction:[1,10.5,12],ambient:[.2,.2,.2],diffuse:[.6,.6,.6],specular:[.1,.1,.1]},Y1={direction:[0,0,0],ambient:[0,0,0],diffuse:[0,0,0],specular:[0,0,0]},od={position:[0,0,0],direction:[0,0,0],ambient:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],constant:1,linear:0,quadratic:0,angle:14,exponent:40,blur:5};function PA(n){var l={u_DirectionalLights:new Array(3).fill((0,K.Z)({},Y1)),u_NumOfDirectionalLights:0,u_SpotLights:new Array(3).fill((0,K.Z)({},od)),u_NumOfSpotLights:0};return(!n||!n.length)&&(n=[hP]),n.forEach(function(a){var s=a.type,u=s===void 0?"directional":s,h=(0,tc.Z)(a,kA),v=LA[u].lights,m=LA[u].num,w=l[m];l[v][w]=(0,K.Z)((0,K.Z)({},l[v][w]),h),l[m]++}),l}var zb=(MA=(0,At.b2)(),MA(IA=function(){function n(){(0,pt.Z)(this,n)}return(0,et.Z)(n,[{key:"apply",value:function(a){a.hooks.beforeRender.tap("LightingPlugin",function(){var s=a.getLayerConfig(),u=s.enableLighting;u&&a.models.forEach(function(h){return h.addUniforms((0,K.Z)({},PA()))})})}}]),n}())||IA),OA,FA,Ub=(OA=(0,At.b2)(),OA(FA=function(){function n(){(0,pt.Z)(this,n)}return(0,et.Z)(n,[{key:"apply",value:function(a,s){var u=this,h=s.rendererService,v=s.postProcessingPassFactory,m=s.normalPassFactory;a.hooks.init.tapPromise("MultiPassRendererPlugin",function(){var w=a.getLayerConfig(),A=w.enableMultiPassRenderer,R=w.passes,B=R===void 0?[]:R;u.enabled=!!A&&a.getLayerConfig().enableMultiPassRenderer!==!1,u.enabled&&(a.multiPassRenderer=Ex(a,B,v,m),a.multiPassRenderer.setRenderFlag(!0))}),a.hooks.beforeRender.tap("MultiPassRendererPlugin",function(){if(u.enabled){var w=h.getViewportSize(),A=w.width,R=w.height;a.multiPassRenderer.resize(A,R)}})}}]),n}())||FA),Dh,Zb,$m={NONE:0,ENCODE:1,HIGHLIGHT:2},RA=(Dh=(0,At.b2)(),Dh(Zb=function(){function n(){(0,pt.Z)(this,n)}return(0,et.Z)(n,[{key:"apply",value:function(a,s){var u=s.styleAttributeService;a.hooks.init.tapPromise("PixelPickingPlugin",function(){var h=a.getLayerConfig(),v=h.enablePicking;u.registerStyleAttribute({name:"pickingColor",type:ea.Attribute,descriptor:{name:"a_PickingColor",buffer:{data:[],type:ne.FLOAT},size:3,update:function(w){var A=w.id;return v?vc(A):[0,0,0]}}})}),a.hooks.beforePickingEncode.tap("PixelPickingPlugin",function(){var h=a.getLayerConfig(),v=h.enablePicking;v&&a.isVisible()&&a.models.forEach(function(m){return m.addUniforms({u_PickingStage:$m.ENCODE})})}),a.hooks.afterPickingEncode.tap("PixelPickingPlugin",function(){var h=a.getLayerConfig(),v=h.enablePicking;v&&a.isVisible()&&a.models.forEach(function(m){return m.addUniforms({u_PickingStage:$m.HIGHLIGHT})})}),a.hooks.beforeHighlight.tap("PixelPickingPlugin",function(h){var v=a.getLayerConfig(),m=v.highlightColor,w=v.activeMix,A=w===void 0?0:w,R=typeof m=="string"?Lo(m):m||[1,0,0,1];a.updateLayerConfig({pickedFeatureID:zc(new Uint8Array(h))}),a.models.forEach(function(B){return B.addUniforms({u_PickingStage:$m.HIGHLIGHT,u_PickingColor:h,u_HighlightColor:R.map(function(G){return G*255}),u_activeMix:A})})}),a.hooks.beforeSelect.tap("PixelPickingPlugin",function(h){var v=a.getLayerConfig(),m=v.selectColor,w=v.selectMix,A=w===void 0?0:w,R=typeof m=="string"?Lo(m):m||[1,0,0,1];a.updateLayerConfig({pickedFeatureID:zc(new Uint8Array(h))}),a.models.forEach(function(B){return B.addUniforms({u_PickingStage:$m.HIGHLIGHT,u_PickingColor:h,u_HighlightColor:R.map(function(G){return G*255}),u_activeMix:A,u_CurrentSelectedId:h,u_SelectColor:R.map(function(G){return G*255}),u_EnableSelect:1})})})}}]),n}())||Zb),Vb=["mvt","geojsonvt","testTile"];function DA(n){var l=n.getSource();return Vb.includes(l.parser.type)}function NF(n){return n.getContext?{width:n.width/DOM.DPR,height:n.height/DOM.DPR}:n.getBoundingClientRect()}var BA,NA,zF=(BA=(0,At.b2)(),BA(NA=function(){function n(){(0,pt.Z)(this,n)}return(0,et.Z)(n,[{key:"apply",value:function(a,s){var u=this,h=s.styleAttributeService;a.hooks.init.tapPromise("RegisterStyleAttributePlugin",function(){DA(a)||u.registerBuiltinAttributes(h,a)})}},{key:"registerBuiltinAttributes",value:function(a,s){if(s.type==="MaskLayer"){this.registerPositionAttribute(a);return}this.registerPositionAttribute(a),this.registerColorAttribute(a),this.registerVertexIdAttribute(a)}},{key:"registerPositionAttribute",value:function(a){a.registerStyleAttribute({name:"position",type:ea.Attribute,descriptor:{name:"a_Position",buffer:{data:[],type:ne.FLOAT},size:3,update:function(u,h,v){return v.length===2?[v[0],v[1],0]:[v[0],v[1],v[2]]}}})}},{key:"registerFilterAttribute",value:function(a){a.registerStyleAttribute({name:"filter",type:ea.Attribute,descriptor:{name:"filter",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(u){var h=u.filter;return h?[1]:[0]}}})}},{key:"registerColorAttribute",value:function(a){a.registerStyleAttribute({name:"color",type:ea.Attribute,descriptor:{name:"a_Color",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:4,update:function(u){var h=u.color;return!h||!h.length?[1,1,1,1]:h}}})}},{key:"registerVertexIdAttribute",value:function(a){a.registerStyleAttribute({name:"vertexId",type:ea.Attribute,descriptor:{name:"a_vertexId",buffer:{usage:ne.DYNAMIC_DRAW,data:[],type:ne.FLOAT},size:1,update:function(u,h){return[h]}}})}}]),n}())||NA),zA,UA,Gb,$1,ZA,VA,Mg,GA,HA,jA,q1,pP=(zA=(0,At.b2)(),UA=(0,At.f3)(Dt.ICameraService),Gb=(0,At.f3)(Dt.ICoordinateSystemService),$1=(0,At.f3)(Dt.IRendererService),ZA=(0,At.f3)(Dt.IMapService),zA(VA=(Mg=function(){function n(){(0,pt.Z)(this,n),Rn(this,"cameraService",GA,this),Rn(this,"coordinateSystemService",HA,this),Rn(this,"rendererService",jA,this),Rn(this,"mapService",q1,this)}return(0,et.Z)(n,[{key:"apply",value:function(a){var s=this,u=this.mapService.version,h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],v=[0,0];a.hooks.beforeRender.tap("ShaderUniformPlugin",function(){var m=a.getLayerConfig().tileOrigin;s.coordinateSystemService.refresh(m),u==="GAODE2.x"&&(s.setLayerCenter(a),h=s.mapService.map.customCoords.getMVPMatrix(),v=s.mapService.getCustomCoordCenter());var w=s.rendererService.getViewportSize(),A=w.width,R=w.height;a.models.forEach(function(B){var G;B.addUniforms((G={},(0,W.Z)(G,E0.ProjectionMatrix,s.cameraService.getProjectionMatrix()),(0,W.Z)(G,E0.ViewMatrix,s.cameraService.getViewMatrix()),(0,W.Z)(G,E0.ViewProjectionMatrix,s.cameraService.getViewProjectionMatrix()),(0,W.Z)(G,E0.Zoom,s.cameraService.getZoom()),(0,W.Z)(G,E0.ZoomScale,s.cameraService.getZoomScale()),(0,W.Z)(G,E0.FocalDistance,s.cameraService.getFocalDistance()),(0,W.Z)(G,E0.CameraPosition,s.cameraService.getCameraPosition()),(0,W.Z)(G,pf.CoordinateSystem,s.coordinateSystemService.getCoordinateSystem()),(0,W.Z)(G,pf.ViewportCenter,s.coordinateSystemService.getViewportCenter()),(0,W.Z)(G,pf.ViewportCenterProjection,s.coordinateSystemService.getViewportCenterProjection()),(0,W.Z)(G,pf.PixelsPerDegree,s.coordinateSystemService.getPixelsPerDegree()),(0,W.Z)(G,pf.PixelsPerDegree2,s.coordinateSystemService.getPixelsPerDegree2()),(0,W.Z)(G,pf.PixelsPerMeter,s.coordinateSystemService.getPixelsPerMeter()),(0,W.Z)(G,pf.Mvp,h),(0,W.Z)(G,"u_SceneCenterMKT",v),(0,W.Z)(G,"u_ViewportSize",[A,R]),(0,W.Z)(G,"u_ModelMatrix",s.cameraService.getModelMatrix()),(0,W.Z)(G,"u_DevicePixelRatio",ja.devicePixelRatio),(0,W.Z)(G,"u_PickingBuffer",a.getLayerConfig().pickingBuffer||0),(0,W.Z)(G,"u_shaderPick",Number(a.getShaderPickStat())),G))})})}},{key:"setLayerCenter",value:function(a){a.coordCenter===void 0&&(a.coordCenter=a.getSource().center),this.mapService.setCoordCenter&&this.mapService.setCoordCenter(a.coordCenter)}}]),n}(),GA=Ri(Mg.prototype,"cameraService",[UA],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),HA=Ri(Mg.prototype,"coordinateSystemService",[Gb],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),jA=Ri(Mg.prototype,"rendererService",[$1],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),q1=Ri(Mg.prototype,"mapService",[ZA],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Mg))||VA),WA,K1,UF=(WA=(0,At.b2)(),WA(K1=function(){function n(){(0,pt.Z)(this,n)}return(0,et.Z)(n,[{key:"apply",value:function(a){a.hooks.beforeRender.tap("UpdateModelPlugin",function(){a.layerModel&&a.layerModel.needUpdate().then(function(s){s&&a.renderLayers()})}),a.hooks.afterRender.tap("UpdateModelPlugin",function(){a.layerModelNeedUpdate=!1})}}]),n}())||K1),XA,YA,dP=(XA=(0,At.b2)(),XA(YA=function(){function n(){(0,pt.Z)(this,n)}return(0,et.Z)(n,[{key:"apply",value:function(a,s){var u=this,h=s.styleAttributeService;a.hooks.init.tapPromise("UpdateStyleAttributePlugin",function(){u.initStyleAttribute(a,{styleAttributeService:h})}),a.hooks.beforeRender.tap("UpdateStyleAttributePlugin",function(){a.layerModelNeedUpdate||a.inited&&u.updateStyleAttribute(a,{styleAttributeService:h})})}},{key:"updateStyleAttribute",value:function(a,s){var u=s.styleAttributeService,h=u.getLayerStyleAttributes()||[],v=u.getLayerStyleAttribute("filter");if(v&&v.needRegenerateVertices){a.layerModelNeedUpdate=!0,h.forEach(function(m){return m.needRegenerateVertices=!1});return}h.filter(function(m){return m.needRegenerateVertices}).forEach(function(m){u.updateAttributeByFeatureRange(m.name,a.getEncodedData(),m.featureRange.startIndex,m.featureRange.endIndex,a),m.needRegenerateVertices=!1})}},{key:"initStyleAttribute",value:function(a,s){var u=s.styleAttributeService,h=u.getLayerStyleAttributes()||[];h.filter(function(v){return v.needRegenerateVertices}).forEach(function(v){u.updateAttributeByFeatureRange(v.name,a.getEncodedData(),v.featureRange.startIndex,v.featureRange.endIndex),v.needRegenerateVertices=!1})}}]),n}())||YA);gf.bind(Dt.ILayerPlugin).to(nv).inRequestScope(),gf.bind(Dt.ILayerPlugin).to(zF).inRequestScope(),gf.bind(Dt.ILayerPlugin).to(T4).inRequestScope(),gf.bind(Dt.ILayerPlugin).to(nd).inRequestScope(),gf.bind(Dt.ILayerPlugin).to(BF).inRequestScope(),gf.bind(Dt.ILayerPlugin).to(dP).inRequestScope(),gf.bind(Dt.ILayerPlugin).to(UF).inRequestScope(),gf.bind(Dt.ILayerPlugin).to(Ub).inRequestScope(),gf.bind(Dt.ILayerPlugin).to(pP).inRequestScope(),gf.bind(Dt.ILayerPlugin).to(hA).inRequestScope(),gf.bind(Dt.ILayerPlugin).to(zb).inRequestScope(),gf.bind(Dt.ILayerPlugin).to(RA).inRequestScope(),gf.bind(Dt.ILayerPlugin).to(CA).inRequestScope();var vP=nt(87781),gP=nt.n(vP),$A=function(){function n(l,a){(0,pt.Z)(this,n);var s=a.buffer,u=a.offset,h=a.stride,v=a.normalized,m=a.size,w=a.divisor;this.buffer=s,this.attribute={buffer:s.get(),offset:u||0,stride:h||0,normalized:v||!1,divisor:w||0},m&&(this.attribute.size=m)}return(0,et.Z)(n,[{key:"get",value:function(){return this.attribute}},{key:"updateBuffer",value:function(a){this.buffer.subData(a)}},{key:"destroy",value:function(){this.buffer.destroy()}}]),n}(),av,qm,ov,Bh,Km,$v,Qm,Q1,sd,Ig,nu,Xc,ud,Jm,qA=(av={},(0,W.Z)(av,ne.POINTS,"points"),(0,W.Z)(av,ne.LINES,"lines"),(0,W.Z)(av,ne.LINE_LOOP,"line loop"),(0,W.Z)(av,ne.LINE_STRIP,"line strip"),(0,W.Z)(av,ne.TRIANGLES,"triangles"),(0,W.Z)(av,ne.TRIANGLE_FAN,"triangle fan"),(0,W.Z)(av,ne.TRIANGLE_STRIP,"triangle strip"),av),Hb=(qm={},(0,W.Z)(qm,ne.STATIC_DRAW,"static"),(0,W.Z)(qm,ne.DYNAMIC_DRAW,"dynamic"),(0,W.Z)(qm,ne.STREAM_DRAW,"stream"),qm),ty=(ov={},(0,W.Z)(ov,ne.BYTE,"int8"),(0,W.Z)(ov,ne.UNSIGNED_INT,"int16"),(0,W.Z)(ov,ne.INT,"int32"),(0,W.Z)(ov,ne.UNSIGNED_BYTE,"uint8"),(0,W.Z)(ov,ne.UNSIGNED_SHORT,"uint16"),(0,W.Z)(ov,ne.UNSIGNED_INT,"uint32"),(0,W.Z)(ov,ne.FLOAT,"float"),ov),mP=(Bh={},(0,W.Z)(Bh,ne.ALPHA,"alpha"),(0,W.Z)(Bh,ne.LUMINANCE,"luminance"),(0,W.Z)(Bh,ne.LUMINANCE_ALPHA,"luminance alpha"),(0,W.Z)(Bh,ne.RGB,"rgb"),(0,W.Z)(Bh,ne.RGBA,"rgba"),(0,W.Z)(Bh,ne.RGBA4,"rgba4"),(0,W.Z)(Bh,ne.RGB5_A1,"rgb5 a1"),(0,W.Z)(Bh,ne.RGB565,"rgb565"),(0,W.Z)(Bh,ne.DEPTH_COMPONENT,"depth"),(0,W.Z)(Bh,ne.DEPTH_STENCIL,"depth stencil"),Bh),yP=(Km={},(0,W.Z)(Km,ne.DONT_CARE,"dont care"),(0,W.Z)(Km,ne.NICEST,"nice"),(0,W.Z)(Km,ne.FASTEST,"fast"),Km),KA=($v={},(0,W.Z)($v,ne.NEAREST,"nearest"),(0,W.Z)($v,ne.LINEAR,"linear"),(0,W.Z)($v,ne.LINEAR_MIPMAP_LINEAR,"mipmap"),(0,W.Z)($v,ne.NEAREST_MIPMAP_LINEAR,"nearest mipmap linear"),(0,W.Z)($v,ne.LINEAR_MIPMAP_NEAREST,"linear mipmap nearest"),(0,W.Z)($v,ne.NEAREST_MIPMAP_NEAREST,"nearest mipmap nearest"),$v),QA=(Qm={},(0,W.Z)(Qm,ne.REPEAT,"repeat"),(0,W.Z)(Qm,ne.CLAMP_TO_EDGE,"clamp"),(0,W.Z)(Qm,ne.MIRRORED_REPEAT,"mirror"),Qm),_P=(Q1={},(0,W.Z)(Q1,ne.NONE,"none"),(0,W.Z)(Q1,ne.BROWSER_DEFAULT_WEBGL,"browser"),Q1),xP=(sd={},(0,W.Z)(sd,ne.NEVER,"never"),(0,W.Z)(sd,ne.ALWAYS,"always"),(0,W.Z)(sd,ne.LESS,"less"),(0,W.Z)(sd,ne.LEQUAL,"lequal"),(0,W.Z)(sd,ne.GREATER,"greater"),(0,W.Z)(sd,ne.GEQUAL,"gequal"),(0,W.Z)(sd,ne.EQUAL,"equal"),(0,W.Z)(sd,ne.NOTEQUAL,"notequal"),sd),jb=(Ig={},(0,W.Z)(Ig,ne.FUNC_ADD,"add"),(0,W.Z)(Ig,ne.MIN_EXT,"min"),(0,W.Z)(Ig,ne.MAX_EXT,"max"),(0,W.Z)(Ig,ne.FUNC_SUBTRACT,"subtract"),(0,W.Z)(Ig,ne.FUNC_REVERSE_SUBTRACT,"reverse subtract"),Ig),qv=(nu={},(0,W.Z)(nu,ne.ZERO,"zero"),(0,W.Z)(nu,ne.ONE,"one"),(0,W.Z)(nu,ne.SRC_COLOR,"src color"),(0,W.Z)(nu,ne.ONE_MINUS_SRC_COLOR,"one minus src color"),(0,W.Z)(nu,ne.SRC_ALPHA,"src alpha"),(0,W.Z)(nu,ne.ONE_MINUS_SRC_ALPHA,"one minus src alpha"),(0,W.Z)(nu,ne.DST_COLOR,"dst color"),(0,W.Z)(nu,ne.ONE_MINUS_DST_COLOR,"one minus dst color"),(0,W.Z)(nu,ne.DST_ALPHA,"dst alpha"),(0,W.Z)(nu,ne.ONE_MINUS_DST_ALPHA,"one minus dst alpha"),(0,W.Z)(nu,ne.CONSTANT_COLOR,"constant color"),(0,W.Z)(nu,ne.ONE_MINUS_CONSTANT_COLOR,"one minus constant color"),(0,W.Z)(nu,ne.CONSTANT_ALPHA,"constant alpha"),(0,W.Z)(nu,ne.ONE_MINUS_CONSTANT_ALPHA,"one minus constant alpha"),(0,W.Z)(nu,ne.SRC_ALPHA_SATURATE,"src alpha saturate"),nu),J1=(Xc={},(0,W.Z)(Xc,ne.NEVER,"never"),(0,W.Z)(Xc,ne.ALWAYS,"always"),(0,W.Z)(Xc,ne.LESS,"less"),(0,W.Z)(Xc,ne.LEQUAL,"lequal"),(0,W.Z)(Xc,ne.GREATER,"greater"),(0,W.Z)(Xc,ne.GEQUAL,"gequal"),(0,W.Z)(Xc,ne.EQUAL,"equal"),(0,W.Z)(Xc,ne.NOTEQUAL,"notequal"),Xc),ld=(ud={},(0,W.Z)(ud,ne.ZERO,"zero"),(0,W.Z)(ud,ne.KEEP,"keep"),(0,W.Z)(ud,ne.REPLACE,"replace"),(0,W.Z)(ud,ne.INVERT,"invert"),(0,W.Z)(ud,ne.INCR,"increment"),(0,W.Z)(ud,ne.DECR,"decrement"),(0,W.Z)(ud,ne.INCR_WRAP,"increment wrap"),(0,W.Z)(ud,ne.DECR_WRAP,"decrement wrap"),ud),JA=(Jm={},(0,W.Z)(Jm,ne.FRONT,"front"),(0,W.Z)(Jm,ne.BACK,"back"),Jm),bP=function(){function n(l,a){(0,pt.Z)(this,n);var s=a.data,u=a.usage,h=a.type;this.buffer=l.buffer({data:s,usage:Hb[u||ne.STATIC_DRAW],type:ty[h||ne.UNSIGNED_BYTE]})}return(0,et.Z)(n,[{key:"get",value:function(){return this.buffer}},{key:"destroy",value:function(){this.buffer.destroy()}},{key:"subData",value:function(a){var s=a.data,u=a.offset;this.buffer.subdata(s,u)}}]),n}(),EP=function(){function n(l,a){(0,pt.Z)(this,n);var s=a.data,u=a.usage,h=a.type,v=a.count;this.elements=l.elements({data:s,usage:Hb[u||ne.STATIC_DRAW],type:ty[h||ne.UNSIGNED_BYTE],count:v})}return(0,et.Z)(n,[{key:"get",value:function(){return this.elements}},{key:"subData",value:function(a){var s=a.data;this.elements.subdata(s)}},{key:"destroy",value:function(){}}]),n}(),tT=function(){function n(l,a){(0,pt.Z)(this,n);var s=a.width,u=a.height,h=a.color,v=a.colors,m={width:s,height:u};Array.isArray(v)&&(m.colors=v.map(function(w){return w.get()})),h&&typeof h!="boolean"&&(m.color=h.get()),this.framebuffer=l.framebuffer(m)}return(0,et.Z)(n,[{key:"get",value:function(){return this.framebuffer}},{key:"destroy",value:function(){this.framebuffer.destroy()}},{key:"resize",value:function(a){var s=a.width,u=a.height;this.framebuffer.resize(s,u)}}]),n}(),eT=function(){function n(l,a){(0,pt.Z)(this,n),(0,W.Z)(this,"destroyed",!1),(0,W.Z)(this,"uniforms",{}),this.reGl=l;var s=a.pick,u=s===void 0?!0:s,h=a.vs,v=a.fs,m=a.attributes,w=a.uniforms,A=a.primitive,R=a.count,B=a.elements,G=a.depth,j=a.blend,lt=a.stencil,ct=a.cull,_t=a.instances,Vt={};this.options=a,w&&(this.uniforms=this.extractUniforms(w),Object.keys(w).forEach(function($e){Vt[$e]=l.prop($e)}));var ce={};Object.keys(m).forEach(function($e){ce[$e]=m[$e].get()});var ae={attributes:ce,frag:v,uniforms:Vt,vert:h,blend:{},primitive:qA[A===void 0?ne.TRIANGLES:A]};if(_t&&(ae.instances=_t),R?ae.count=R:B&&(ae.elements=B.get()),this.initDepthDrawParams({depth:G},ae),this.initBlendDrawParams({blend:j},ae),this.initStencilDrawParams({stencil:lt},ae),this.initCullDrawParams({cull:ct},ae),this.drawCommand=l(ae),u){var ze=(0,Fn.cloneDeep)(ae);ze.blend=(0,K.Z)((0,K.Z)({},ze.blend),{},{enable:!1}),this.drawPickCommand=l(ze)}this.drawParams=ae}return(0,et.Z)(n,[{key:"updateAttributesAndElements",value:function(a,s){var u={};if(Object.keys(a).forEach(function(v){u[v]=a[v].get()}),this.drawParams.attributes=u,this.drawParams.elements=s.get(),this.drawCommand=this.reGl(this.drawParams),this.options.pick){var h=(0,Fn.cloneDeep)(this.drawParams);h.blend=(0,K.Z)((0,K.Z)({},h.blend),{},{enable:!1}),this.drawPickCommand=this.reGl(h)}}},{key:"updateAttributes",value:function(a){var s={};if(Object.keys(a).forEach(function(h){s[h]=a[h].get()}),this.drawParams.attributes=s,this.drawCommand=this.reGl(this.drawParams),this.options.pick){var u=(0,Fn.cloneDeep)(this.drawParams);u.blend=(0,K.Z)((0,K.Z)({},u.blend),{},{enable:!1}),this.drawPickCommand=this.reGl(u)}}},{key:"addUniforms",value:function(a){this.uniforms=(0,K.Z)((0,K.Z)({},this.uniforms),this.extractUniforms(a))}},{key:"draw",value:function(a,s){if(!(this.drawParams.attributes&&Object.keys(this.drawParams.attributes).length===0)){var u=(0,K.Z)((0,K.Z)({},this.uniforms),this.extractUniforms(a.uniforms||{})),h={};Object.keys(u).forEach(function(v){var m=(0,bi.Z)(u[v]);m==="boolean"||m==="number"||Array.isArray(u[v])||u[v].BYTES_PER_ELEMENT?h[v]=u[v]:h[v]=u[v].get()}),s?this.drawPickCommand&&this.drawPickCommand(h):this.drawCommand(h)}}},{key:"destroy",value:function(){var a,s;(a=this.drawParams)===null||a===void 0||(s=a.elements)===null||s===void 0||s.destroy(),this.options.attributes&&Object.values(this.options.attributes).forEach(function(u){u==null||u.destroy()}),this.destroyed=!0}},{key:"initDepthDrawParams",value:function(a,s){var u=a.depth;u&&(s.depth={enable:u.enable===void 0?!0:!!u.enable,mask:u.mask===void 0?!0:!!u.mask,func:xP[u.func||ne.LESS],range:u.range||[0,1]})}},{key:"initBlendDrawParams",value:function(a,s){var u=a.blend;if(u){var h=u.enable,v=u.func,m=u.equation,w=u.color,A=w===void 0?[0,0,0,0]:w;s.blend={enable:!!h,func:{srcRGB:qv[v&&v.srcRGB||ne.SRC_ALPHA],srcAlpha:qv[v&&v.srcAlpha||ne.SRC_ALPHA],dstRGB:qv[v&&v.dstRGB||ne.ONE_MINUS_SRC_ALPHA],dstAlpha:qv[v&&v.dstAlpha||ne.ONE_MINUS_SRC_ALPHA]},equation:{rgb:jb[m&&m.rgb||ne.FUNC_ADD],alpha:jb[m&&m.alpha||ne.FUNC_ADD]},color:A}}}},{key:"initStencilDrawParams",value:function(a,s){var u=a.stencil;if(u){var h=u.enable,v=u.mask,m=v===void 0?-1:v,w=u.func,A=w===void 0?{cmp:ne.ALWAYS,ref:0,mask:-1}:w,R=u.opFront,B=R===void 0?{fail:ne.KEEP,zfail:ne.KEEP,zpass:ne.KEEP}:R,G=u.opBack,j=G===void 0?{fail:ne.KEEP,zfail:ne.KEEP,zpass:ne.KEEP}:G;s.stencil={enable:!!h,mask:m,func:(0,K.Z)((0,K.Z)({},A),{},{cmp:J1[A.cmp]}),opFront:{fail:ld[B.fail],zfail:ld[B.zfail],zpass:ld[B.zpass]},opBack:{fail:ld[j.fail],zfail:ld[j.zfail],zpass:ld[j.zpass]}}}}},{key:"initCullDrawParams",value:function(a,s){var u=a.cull;if(u){var h=u.enable,v=u.face,m=v===void 0?ne.BACK:v;s.cull={enable:!!h,face:JA[m]}}}},{key:"extractUniforms",value:function(a){var s=this,u={};return Object.keys(a).forEach(function(h){s.extractUniformsRecursively(h,a[h],u,"")}),u}},{key:"extractUniformsRecursively",value:function(a,s,u,h){var v=this;if(s===null||typeof s=="number"||typeof s=="boolean"||Array.isArray(s)&&typeof s[0]=="number"||(0,Fn.isTypedArray)(s)||s===""||"resize"in s){u["".concat(h&&h+".").concat(a)]=s;return}(0,Fn.isPlainObject)(s)&&Object.keys(s).forEach(function(m){v.extractUniformsRecursively(m,s[m],u,"".concat(h&&h+".").concat(a))}),Array.isArray(s)&&s.forEach(function(m,w){Object.keys(m).forEach(function(A){v.extractUniformsRecursively(A,m[A],u,"".concat(h&&h+".").concat(a,"[").concat(w,"]"))})})}}]),n}(),rT=function(){function n(l,a){(0,pt.Z)(this,n),(0,W.Z)(this,"isDestroy",!1);var s=a.data,u=a.type,h=u===void 0?ne.UNSIGNED_BYTE:u,v=a.width,m=a.height,w=a.flipY,A=w===void 0?!1:w,R=a.format,B=R===void 0?ne.RGBA:R,G=a.mipmap,j=G===void 0?!1:G,lt=a.wrapS,ct=lt===void 0?ne.CLAMP_TO_EDGE:lt,_t=a.wrapT,Vt=_t===void 0?ne.CLAMP_TO_EDGE:_t,ce=a.aniso,ae=ce===void 0?0:ce,ze=a.alignment,$e=ze===void 0?1:ze,xr=a.premultiplyAlpha,Or=xr===void 0?!1:xr,Zr=a.mag,Wr=Zr===void 0?ne.NEAREST:Zr,wn=a.min,vn=wn===void 0?ne.NEAREST:wn,Kn=a.colorSpace,Ei=Kn===void 0?ne.BROWSER_DEFAULT_WEBGL:Kn,qi=a.x,_o=qi===void 0?0:qi,jo=a.y,Gs=jo===void 0?0:jo,hu=a.copy,$u=hu===void 0?!1:hu;this.width=v,this.height=m;var Uh={width:v,height:m,type:ty[h],format:mP[B],wrapS:QA[ct],wrapT:QA[Vt],mag:KA[Wr],min:KA[vn],alignment:$e,flipY:A,colorSpace:_P[Ei],premultiplyAlpha:Or,aniso:ae,x:_o,y:Gs,copy:$u};s&&(Uh.data=s),typeof j=="number"?Uh.mipmap=yP[j]:typeof j=="boolean"&&(Uh.mipmap=j),this.texture=l.texture(Uh)}return(0,et.Z)(n,[{key:"get",value:function(){return this.texture}},{key:"update",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.texture(a)}},{key:"bind",value:function(){this.texture._texture.bind()}},{key:"resize",value:function(a){var s=a.width,u=a.height;this.texture.resize(s,u),this.width=s,this.height=u}},{key:"getSize",value:function(){return[this.width,this.height]}},{key:"destroy",value:function(){if(!this.isDestroy){var a;(a=this.texture)===null||a===void 0||a.destroy()}this.isDestroy=!0}}]),n}(),Wb,ey,t_=(Wb=(0,At.b2)(),Wb(ey=function(){function n(){var l=this;(0,pt.Z)(this,n),(0,W.Z)(this,"createModel",function(a){return new eT(l.gl,a)}),(0,W.Z)(this,"createAttribute",function(a){return new $A(l.gl,a)}),(0,W.Z)(this,"createBuffer",function(a){return new bP(l.gl,a)}),(0,W.Z)(this,"createElements",function(a){return new EP(l.gl,a)}),(0,W.Z)(this,"createTexture2D",function(a){return new rT(l.gl,a)}),(0,W.Z)(this,"createFramebuffer",function(a){return new tT(l.gl,a)}),(0,W.Z)(this,"useFramebuffer",function(a,s){l.gl({framebuffer:a?a.get():null})(s)}),(0,W.Z)(this,"clear",function(a){var s,u=a.color,h=a.depth,v=a.stencil,m=a.framebuffer,w=m===void 0?null:m,A={color:u,depth:h,stencil:v};A.framebuffer=w===null?w:w.get(),(s=l.gl)===null||s===void 0||s.clear(A)}),(0,W.Z)(this,"viewport",function(a){var s=a.x,u=a.y,h=a.width,v=a.height;l.gl._gl.viewport(s,u,h,v),l.width=h,l.height=v,l.gl._refresh()}),(0,W.Z)(this,"readPixels",function(a){var s=a.framebuffer,u=a.x,h=a.y,v=a.width,m=a.height,w={x:u,y:h,width:v,height:m};return s&&(w.framebuffer=s.get()),l.gl.read(w)}),(0,W.Z)(this,"getViewportSize",function(){return{width:l.gl._gl.drawingBufferWidth,height:l.gl._gl.drawingBufferHeight}}),(0,W.Z)(this,"getContainer",function(){if(Cs)return l.canvas;var a;return(a=l.canvas)===null||a===void 0?void 0:a.parentElement}),(0,W.Z)(this,"getCanvas",function(){return l.canvas}),(0,W.Z)(this,"getGLContext",function(){return l.gl._gl}),(0,W.Z)(this,"destroy",function(){var a,s,u;l.canvas=null,(a=l.gl)===null||a===void 0||(s=a._gl)===null||s===void 0||(u=s.getExtension("WEBGL_lose_context"))===null||u===void 0||u.loseContext(),l.gl.destroy(),l.gl=null})}return(0,et.Z)(n,[{key:"init",value:function(){var l=(0,J.Z)(ot().mark(function s(u,h,v){var m=this;return ot().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(this.canvas=u,!v){A.next=5;break}this.gl=v,A.next=8;break;case 5:return A.next=7,new Promise(function(R,B){gP()({canvas:m.canvas,attributes:{alpha:!0,antialias:h.antialias,premultipliedAlpha:!0,preserveDrawingBuffer:h.preserveDrawingBuffer,stencil:h.stencil},extensions:["OES_element_index_uint","OES_standard_derivatives","ANGLE_instanced_arrays"],optionalExtensions:["oes_texture_float_linear","OES_texture_float","EXT_texture_filter_anisotropic","EXT_blend_minmax","WEBGL_depth_texture"],profile:!0,onDone:function(j,lt){(j||!lt)&&B(j),R(lt)}})});case 7:this.gl=A.sent;case 8:this.extensionObject={OES_texture_float:this.testExtension("OES_texture_float")};case 9:case"end":return A.stop()}},s,this)}));function a(s,u,h){return l.apply(this,arguments)}return a}()},{key:"getPointSizeRange",value:function(){return this.gl._gl.getParameter(this.gl._gl.ALIASED_POINT_SIZE_RANGE)}},{key:"testExtension",value:function(a){return!!this.getGLContext().getExtension(a)}},{key:"setState",value:function(){this.gl({cull:{enable:!1,face:"back"},viewport:{x:0,y:0,height:this.width,width:this.height},blend:{enable:!0,equation:"add"},framebuffer:null}),this.gl._refresh()}},{key:"setBaseState",value:function(){this.gl({cull:{enable:!1,face:"back"},viewport:{x:0,y:0,height:this.width,width:this.height},blend:{enable:!1,equation:"add"},framebuffer:null}),this.gl._refresh()}},{key:"setCustomLayerDefaults",value:function(){var a=this.getGLContext();a.disable(a.CULL_FACE)}},{key:"setDirty",value:function(a){this.isDirty=a}},{key:"getDirty",value:function(){return this.isDirty}}]),n}())||ey);function wP(n){var l=SP();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function SP(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var Xb=["selectstart","selecting","selectend"],CP=function(n){(0,zt.Z)(a,n);var l=wP(a);function a(s){var u,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,pt.Z)(this,a),u=l.call(this),(0,W.Z)((0,ut.Z)(u),"isEnable",!1),(0,W.Z)((0,ut.Z)(u),"onDragStart",function(v){u.box.style.display="block",u.startEvent=u.endEvent=v,u.syncBoxBound(),u.emit("selectstart",u.getLngLatBox(),u.startEvent,u.endEvent)}),(0,W.Z)((0,ut.Z)(u),"onDragging",function(v){u.endEvent=v,u.syncBoxBound(),u.emit("selecting",u.getLngLatBox(),u.startEvent,u.endEvent)}),(0,W.Z)((0,ut.Z)(u),"onDragEnd",function(v){u.endEvent=v,u.box.style.display="none",u.emit("selectend",u.getLngLatBox(),u.startEvent,u.endEvent)}),u.scene=s,u.options=h,u}return(0,et.Z)(a,[{key:"container",get:function(){return this.scene.getMapService().getMarkerContainer()}},{key:"enable",value:function(){if(!this.isEnable){var u=this.options.className;if(this.scene.setMapStatus({dragEnable:!1}),this.container.style.cursor="crosshair",!this.box){var h=so("div",void 0,this.container);h.classList.add("l7-select-box"),u&&h.classList.add(u),h.style.display="none",this.box=h}this.scene.on("dragstart",this.onDragStart),this.scene.on("dragging",this.onDragging),this.scene.on("dragend",this.onDragEnd),this.isEnable=!0}}},{key:"disable",value:function(){this.isEnable&&(this.scene.setMapStatus({dragEnable:!0}),this.container.style.cursor="auto",this.scene.off("dragstart",this.onDragStart),this.scene.off("dragging",this.onDragging),this.scene.off("dragend",this.onDragEnd),this.isEnable=!1)}},{key:"syncBoxBound",value:function(){var u=this.startEvent,h=u.x,v=u.y,m=this.endEvent,w=m.x,A=m.y,R=Math.min(h,w),B=Math.min(v,A),G=Math.abs(h-w),j=Math.abs(v-A);this.box.style.top="".concat(B,"px"),this.box.style.left="".concat(R,"px"),this.box.style.width="".concat(G,"px"),this.box.style.height="".concat(j,"px")}},{key:"getLngLatBox",value:function(){var u=this.startEvent.lngLat,h=u.lng,v=u.lat,m=this.endEvent.lngLat,w=m.lng,A=m.lat;return gn([[h,v],[w,A]])}}]),a}(be.EventEmitter),AP=function(){function n(l){(0,pt.Z)(this,n);var a=l.id,s=l.map,u=l.canvas,h=l.hasBaseMap,v=GM();this.container=v,s.setContainer(v,a,u,h),v.bind(Dt.IRendererService).to(t_).inSingletonScope(),this.sceneService=v.get(Dt.ISceneService),this.mapService=v.get(Dt.IMapService),this.iconService=v.get(Dt.IIconService),this.fontService=v.get(Dt.IFontService),this.controlService=v.get(Dt.IControlService),this.layerService=v.get(Dt.ILayerService),this.markerService=v.get(Dt.IMarkerService),this.interactionService=v.get(Dt.IInteractionService),this.popupService=v.get(Dt.IPopupService),this.boxSelect=new CP(this,{}),qc((l==null?void 0:l.isMini)||!1),Cs?this.sceneService.initMiniScene(l):(this.initComponent(a),this.sceneService.init(l),this.initControl())}return(0,et.Z)(n,[{key:"map",get:function(){return this.mapService.map}},{key:"loaded",get:function(){return this.sceneService.loaded}},{key:"getServiceContainer",value:function(){return this.container}},{key:"getSize",value:function(){return this.mapService.getSize()}},{key:"getMinZoom",value:function(){return this.mapService.getMinZoom()}},{key:"getMaxZoom",value:function(){return this.mapService.getMaxZoom()}},{key:"getType",value:function(){return this.mapService.getType()}},{key:"getMapContainer",value:function(){return this.mapService.getMapContainer()}},{key:"getMapCanvasContainer",value:function(){return this.mapService.getMapCanvasContainer()}},{key:"getMapService",value:function(){return this.mapService}},{key:"exportPng",value:function(){var l=(0,J.Z)(ot().mark(function s(u){return ot().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,this.sceneService.exportPng(u);case 2:return v.abrupt("return",v.sent);case 3:case"end":return v.stop()}},s,this)}));function a(s){return l.apply(this,arguments)}return a}()},{key:"exportMap",value:function(){var l=(0,J.Z)(ot().mark(function s(u){return ot().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,this.sceneService.exportPng(u);case 2:return v.abrupt("return",v.sent);case 3:case"end":return v.stop()}},s,this)}));function a(s){return l.apply(this,arguments)}return a}()},{key:"registerRenderService",value:function(a){var s=this;if(this.sceneService.loaded){var u=new a(this);u.init()}else this.on("loaded",function(){var h=new a(s);h.init()})}},{key:"setBgColor",value:function(a){this.mapService.setBgColor(a)}},{key:"addLayer",value:function(a){var s=this,u=Qg(this.container);if(a.setContainer(u,this.container),this.sceneService.addLayer(a),a.inited){var h=this.initMask(a);this.addMask(h,a.id)}else a.on("inited",function(){var v=s.initMask(a);s.addMask(v,a.id)})}},{key:"initMask",value:function(a){var s=a.getLayerConfig(),u=s.mask,h=s.maskfence,v=s.maskColor,m=v===void 0?"#000":v,w=s.maskOpacity,A=w===void 0?0:w;if(!(!u||!h)){var R=new Hx().source(h).shape("fill").style({color:m,opacity:A});return R}}},{key:"addMask",value:function(a,s){if(a){var u=this.getLayer(s);if(u){var h=Qg(this.container);a.setContainer(h,this.container),u.addMaskLayer(a),this.sceneService.addMask(a)}else console.warn("parent layer not find!")}}},{key:"getPickedLayer",value:function(){return this.layerService.pickedLayerId}},{key:"getLayers",value:function(){return this.layerService.getLayers()}},{key:"getLayer",value:function(a){return this.layerService.getLayer(a)}},{key:"getLayerByName",value:function(a){return this.layerService.getLayerByName(a)}},{key:"removeLayer",value:function(){var l=(0,J.Z)(ot().mark(function s(u,h){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.layerService.remove(u,h);case 2:case"end":return m.stop()}},s,this)}));function a(s,u){return l.apply(this,arguments)}return a}()},{key:"removeAllLayer",value:function(){var l=(0,J.Z)(ot().mark(function s(){return ot().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,this.layerService.removeAllLayers();case 2:case"end":return h.stop()}},s,this)}));function a(){return l.apply(this,arguments)}return a}()},{key:"render",value:function(){this.sceneService.render()}},{key:"setEnableRender",value:function(a){this.layerService.setEnableRender(a)}},{key:"addIconFont",value:function(a,s){this.fontService.addIconFont(a,s)}},{key:"addIconFonts",value:function(a){var s=this;a.forEach(function(u){var h=(0,yt.Z)(u,2),v=h[0],m=h[1];s.fontService.addIconFont(v,m)})}},{key:"addFontFace",value:function(a,s){var u=this;this.fontService.once("fontloaded",function(h){u.emit("fontloaded",h)}),this.fontService.addFontFace(a,s)}},{key:"addImage",value:function(){var l=(0,J.Z)(ot().mark(function s(u,h){return ot().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(Cs){m.next=5;break}return m.next=3,this.iconService.addImage(u,h);case 3:m.next=6;break;case 5:this.iconService.addImageMini(u,h,this.sceneService);case 6:case"end":return m.stop()}},s,this)}));function a(s,u){return l.apply(this,arguments)}return a}()},{key:"hasImage",value:function(a){return this.iconService.hasImage(a)}},{key:"removeImage",value:function(a){this.iconService.removeImage(a)}},{key:"addIconFontGlyphs",value:function(a,s){this.fontService.addIconGlyphs(s)}},{key:"addControl",value:function(a){this.controlService.addControl(a,this.container)}},{key:"removeControl",value:function(a){this.controlService.removeControl(a)}},{key:"getControlByName",value:function(a){return this.controlService.getControlByName(a)}},{key:"addMarker",value:function(a){this.markerService.addMarker(a)}},{key:"addMarkerLayer",value:function(a){this.markerService.addMarkerLayer(a)}},{key:"removeMarkerLayer",value:function(a){this.markerService.removeMarkerLayer(a)}},{key:"removeAllMakers",value:function(){this.markerService.removeAllMarkers()}},{key:"addPopup",value:function(a){this.popupService.addPopup(a)}},{key:"removePopup",value:function(a){this.popupService.removePopup(a)}},{key:"on",value:function(a,s){if(Xb.includes(a)){var u;(u=this.boxSelect)===null||u===void 0||u.on(a,s)}else zy.includes(a)?this.sceneService.on(a,s):this.mapService.on(a,s)}},{key:"once",value:function(a,s){if(Xb.includes(a)){var u;(u=this.boxSelect)===null||u===void 0||u.once(a,s)}else zy.includes(a)?this.sceneService.once(a,s):this.mapService.once(a,s)}},{key:"emit",value:function(a,s){zy.indexOf(a)===-1?this.mapService.on(a,s):this.sceneService.emit(a,s)}},{key:"off",value:function(a,s){if(Xb.includes(a)){var u;(u=this.boxSelect)===null||u===void 0||u.off(a,s)}else zy.includes(a)?this.sceneService.off(a,s):this.mapService.off(a,s)}},{key:"getZoom",value:function(){return this.mapService.getZoom()}},{key:"getCenter",value:function(a){return this.mapService.getCenter(a)}},{key:"setCenter",value:function(a,s){return this.mapService.setCenter(a,s)}},{key:"getPitch",value:function(){return this.mapService.getPitch()}},{key:"setPitch",value:function(a){return this.mapService.setPitch(a)}},{key:"getRotation",value:function(){return this.mapService.getRotation()}},{key:"getBounds",value:function(){return this.mapService.getBounds()}},{key:"setRotation",value:function(a){this.mapService.setRotation(a)}},{key:"zoomIn",value:function(){this.mapService.zoomIn()}},{key:"zoomOut",value:function(){this.mapService.zoomOut()}},{key:"panTo",value:function(a){this.mapService.panTo(a)}},{key:"panBy",value:function(a,s){this.mapService.panBy(a,s)}},{key:"getContainer",value:function(){return this.mapService.getContainer()}},{key:"setZoom",value:function(a){this.mapService.setZoom(a)}},{key:"fitBounds",value:function(a,s){var u=this.sceneService.getSceneConfig(),h=u.fitBoundsOptions,v=u.animate;this.mapService.fitBounds(a,s||(0,K.Z)((0,K.Z)({},h),{},{animate:v}))}},{key:"setZoomAndCenter",value:function(a,s){this.mapService.setZoomAndCenter(a,s)}},{key:"setMapStyle",value:function(a){this.mapService.setMapStyle(a)}},{key:"setMapStatus",value:function(a){this.mapService.setMapStatus(a)}},{key:"pixelToLngLat",value:function(a){return this.mapService.pixelToLngLat(a)}},{key:"lngLatToPixel",value:function(a){return this.mapService.lngLatToPixel(a)}},{key:"containerToLngLat",value:function(a){return this.mapService.containerToLngLat(a)}},{key:"lngLatToContainer",value:function(a){return this.mapService.lngLatToContainer(a)}},{key:"destroy",value:function(){this.sceneService.destroy()}},{key:"registerPostProcessingPass",value:function(a,s){this.container.bind(Dt.IPostProcessingPass).to(a).whenTargetNamed(s)}},{key:"enableShaderPick",value:function(){this.layerService.enableShaderPick()}},{key:"diasbleShaderPick",value:function(){this.layerService.disableShaderPick()}},{key:"enableBoxSelect",value:function(){var a=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.boxSelect.enable(),s&&this.boxSelect.once("selectend",function(){a.disableBoxSelect()})}},{key:"disableBoxSelect",value:function(){this.boxSelect.disable()}},{key:"getPointSizeRange",value:function(){return this.sceneService.getPointSizeRange()}},{key:"initComponent",value:function(a){this.controlService.init({container:ph(a)},this.container),this.markerService.init(this.container),this.popupService.init(this.container)}},{key:"initControl",value:function(){var a=this.sceneService.getSceneConfig(),s=a.logoVisible,u=a.logoPosition;s&&this.addControl(new h3({position:u}))}}]),n}(),nT,Yb,iT,aT=(nT=Z_(Dt.IGlobalConfigService),Yb=function(){function n(l){(0,pt.Z)(this,n),Rn(this,"configService",iT,this),this.config=l}return(0,et.Z)(n,[{key:"setContainer",value:function(a,s,u,h){a.bind(Dt.MapConfig).toConstantValue((0,K.Z)((0,K.Z)({},this.config),{},{id:s,canvas:u,hasBaseMap:h})),a.bind(Dt.IMapService).to(this.getServiceConstructor()).inSingletonScope()}},{key:"getServiceConstructor",value:function(){throw new Error("Method not implemented.")}}]),n}(),iT=Ri(Yb.prototype,"configService",[nT],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Yb),ZF=nt(95742),lh=nt.n(ZF),ry=function(){function n(l){(0,pt.Z)(this,n),(0,W.Z)(this,"size",1e4),this.size=l||1e4}return(0,et.Z)(n,[{key:"setSize",value:function(a){this.size=a}},{key:"getSize",value:function(){return[this.size,this.size]}},{key:"mercatorXfromLng",value:function(a){return(180+a)/360*this.size}},{key:"mercatorYfromLat",value:function(a){return(1-(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+a*Math.PI/360)))/360)*this.size}},{key:"lngFromMercatorX",value:function(a){return a/this.size*360-180}},{key:"latFromMercatorY",value:function(a){var s=180-(1-a/this.size)*360;return 360/Math.PI*Math.atan(Math.exp(s*Math.PI/180))-90}},{key:"project",value:function(a){var s=this.mercatorXfromLng(a[0]),u=this.mercatorYfromLat(a[1]);return[s,u]}},{key:"unproject",value:function(a){var s=this.lngFromMercatorX(a[0]),u=this.latFromMercatorY(a[1]);return[s,u]}}]),n}();function e_(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l={top:0,right:0,bottom:0,left:0};if(typeof n=="number")return{top:n,right:n,bottom:n,left:n};if(Array.isArray(n)){if(n.length===4)return{top:n[0],right:n[1],bottom:n[2],left:n[3]};if(n.length===2)return{top:n[0],right:n[1],bottom:n[0],left:n[1]}}return(0,K.Z)((0,K.Z)({},l),n)}function V0(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function r_(n,l){var a=al([],l,n);return Wu(a,a,1/a[3]),a}function VF(n,l){var a=n%l;return a<0?l+a:a}function GF(n,l,a){return a*l+(1-a)*n}function G0(n,l){if(!n)throw new Error(l||"viewport-mercator-project: assertion failed.")}var Nh=Math.PI,oT=Nh/4,sv=Nh/180,sT=180/Nh,$b=512,qb=4003e4,TP=1.5;function uT(n){return Math.pow(2,n)}function MP(n){return Math.log2(n)}function Kb(n,l){var a=(0,yt.Z)(n,2),s=a[0],u=a[1];G0(Number.isFinite(s)&&Number.isFinite(l)),G0(Number.isFinite(u)&&u>=-90&&u<=90,"invalid latitude"),l*=$b;var h=s*sv,v=u*sv,m=l*(h+Nh)/(2*Nh),w=l*(Nh-Math.log(Math.tan(oT+v*.5)))/(2*Nh);return[m,w]}function ny(n,l){var a=(0,yt.Z)(n,2),s=a[0],u=a[1];l*=$b;var h=s/l*(2*Nh)-Nh,v=2*(Math.atan(Math.exp(Nh-u/l*(2*Nh)))-oT);return[h*sT,v*sT]}function HF(n){var l=n.latitude;assert(Number.isFinite(l));var a=Math.cos(l*sv);return MP(qb*a)-9}function lT(n){var l=n.latitude,a=n.longitude,s=n.zoom,u=n.scale,h=n.highPrecision,v=h===void 0?!1:h;u=u!==void 0?u:uT(s),G0(Number.isFinite(l)&&Number.isFinite(a)&&Number.isFinite(u));var m={},w=$b*u,A=Math.cos(l*sv),R=w/360,B=R/A,G=w/qb/A;if(m.pixelsPerMeter=[G,-G,G],m.metersPerPixel=[1/G,-1/G,1/G],m.pixelsPerDegree=[R,-B,G],m.degreesPerPixel=[1/R,-1/B,1/G],v){var j=sv*Math.tan(l*sv)/A,lt=R*j/2,ct=w/qb*j,_t=ct/B*G;m.pixelsPerDegree2=[0,-lt,ct],m.pixelsPerMeter2=[_t,0,_t]}return m}function jF(n,l){var a=_slicedToArray(n,3),s=a[0],u=a[1],h=a[2],v=_slicedToArray(l,3),m=v[0],w=v[1],A=v[2],R=1,B=lT({longitude:s,latitude:u,scale:R,highPrecision:!0}),G=B.pixelsPerMeter,j=B.pixelsPerMeter2,lt=Kb(n,R);lt[0]+=m*(G[0]+j[0]*w),lt[1]+=w*(G[1]+j[1]*w);var ct=ny(lt,R),_t=(h||0)+(A||0);return Number.isFinite(h)||Number.isFinite(A)?[ct[0],ct[1],_t]:ct}function IP(n){var l=n.height,a=n.pitch,s=n.bearing,u=n.altitude,h=n.center,v=h===void 0?null:h,m=n.flipY,w=m===void 0?!1:m,A=V0();return ci(A,A,[0,0,-u]),Ai(A,A,[1,1,1/l]),zi(A,A,-a*sv),Ui(A,A,s*sv),w&&Ai(A,A,[1,-1,1]),v&&ci(A,A,Io.negate([],v)),A}function Qb(n){var l=n.width,a=n.height,s=n.altitude,u=s===void 0?TP:s,h=n.pitch,v=h===void 0?0:h,m=n.nearZMultiplier,w=m===void 0?1:m,A=n.farZMultiplier,R=A===void 0?1:A,B=v*sv,G=Math.atan(.5/u),j=Math.sin(G)*u/Math.sin(Math.PI/2-B-G),lt=Math.cos(Math.PI/2-B)*j+u;return{fov:2*Math.atan(a/2/u),aspect:l/a,focalDistance:u,near:w,far:lt*R}}function iy(n){var l=n.width,a=n.height,s=n.pitch,u=n.altitude,h=n.nearZMultiplier,v=n.farZMultiplier,m=Qb({width:l,height:a,altitude:u,pitch:s,nearZMultiplier:h,farZMultiplier:v}),w=m.fov,A=m.aspect,R=m.near,B=m.far,G=lu([],w,A,R,B);return G}function n_(n,l){var a=(0,yt.Z)(n,3),s=a[0],u=a[1],h=a[2],v=h===void 0?0:h;return G0(Number.isFinite(s)&&Number.isFinite(u)&&Number.isFinite(v)),r_(l,[s,u,v,1])}function cT(n,l){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,s=(0,yt.Z)(n,3),u=s[0],h=s[1],v=s[2];if(G0(Number.isFinite(u)&&Number.isFinite(h),"invalid pixel coordinate"),Number.isFinite(v)){var m=r_(l,[u,h,v,1]);return m}var w=r_(l,[u,h,0,1]),A=r_(l,[u,h,1,1]),R=w[2],B=A[2],G=R===B?0:((a||0)-R)/(B-R);return ai.t7([],w,A,G)}var fT=V0(),hT=function(){function n(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=l.width,s=l.height,u=l.viewMatrix,h=u===void 0?fT:u,v=l.projectionMatrix,m=v===void 0?fT:v;(0,pt.Z)(this,n),this.width=a||1,this.height=s||1,this.scale=1,this.pixelsPerMeter=1,this.viewMatrix=h,this.projectionMatrix=m;var w=V0();ti(w,w,this.projectionMatrix),ti(w,w,this.viewMatrix),this.viewProjectionMatrix=w;var A=V0();Ai(A,A,[this.width/2,-this.height/2,1]),ci(A,A,[1,-1,0]),ti(A,A,this.viewProjectionMatrix);var R=kr(V0(),A);if(!R)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=A,this.pixelUnprojectionMatrix=R,this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}return(0,et.Z)(n,[{key:"equals",value:function(a){return a instanceof n?a.width===this.width&&a.height===this.height&&d(a.projectionMatrix,this.projectionMatrix)&&d(a.viewMatrix,this.viewMatrix):!1}},{key:"project",value:function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=s.topLeft,h=u===void 0?!0:u,v=this.projectPosition(a),m=n_(v,this.pixelProjectionMatrix),w=(0,yt.Z)(m,2),A=w[0],R=w[1],B=h?R:this.height-R;return a.length===2?[A,B]:[A,B,m[2]]}},{key:"unproject",value:function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=s.topLeft,h=u===void 0?!0:u,v=s.targetZ,m=(0,yt.Z)(a,3),w=m[0],A=m[1],R=m[2],B=h?A:this.height-A,G=v&&v*this.pixelsPerMeter,j=cT([w,B,R],this.pixelUnprojectionMatrix,G),lt=this.unprojectPosition(j),ct=(0,yt.Z)(lt,3),_t=ct[0],Vt=ct[1],ce=ct[2];return Number.isFinite(R)?[_t,Vt,ce]:Number.isFinite(v)?[_t,Vt,v]:[_t,Vt]}},{key:"projectPosition",value:function(a){var s=this.projectFlat(a),u=(0,yt.Z)(s,2),h=u[0],v=u[1],m=(a[2]||0)*this.pixelsPerMeter;return[h,v,m]}},{key:"unprojectPosition",value:function(a){var s=this.unprojectFlat(a),u=(0,yt.Z)(s,2),h=u[0],v=u[1],m=(a[2]||0)/this.pixelsPerMeter;return[h,v,m]}},{key:"projectFlat",value:function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.scale;return a}},{key:"unprojectFlat",value:function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.scale;return a}}]),n}();function kP(n){var l=n.width,a=n.height,s=n.bounds,u=n.minExtent,h=u===void 0?0:u,v=n.maxZoom,m=v===void 0?24:v,w=n.padding,A=w===void 0?0:w,R=n.offset,B=R===void 0?[0,0]:R,G=(0,yt.Z)(s,2),j=(0,yt.Z)(G[0],2),lt=j[0],ct=j[1],_t=(0,yt.Z)(G[1],2),Vt=_t[0],ce=_t[1];if(Number.isFinite(A)){var ae=A;A={top:ae,bottom:ae,left:ae,right:ae}}else G0(Number.isFinite(A.top)&&Number.isFinite(A.bottom)&&Number.isFinite(A.left)&&Number.isFinite(A.right));var ze=new Jb({width:l,height:a,longitude:0,latitude:0,zoom:0}),$e=ze.project([lt,ce]),xr=ze.project([Vt,ct]),Or=[Math.max(Math.abs(xr[0]-$e[0]),h),Math.max(Math.abs(xr[1]-$e[1]),h)],Zr=[l-A.left-A.right-Math.abs(B[0])*2,a-A.top-A.bottom-Math.abs(B[1])*2];G0(Zr[0]>0&&Zr[1]>0);var Wr=Zr[0]/Or[0],wn=Zr[1]/Or[1],vn=(A.right-A.left)/2/Wr,Kn=(A.bottom-A.top)/2/wn,Ei=[(xr[0]+$e[0])/2+vn,(xr[1]+$e[1])/2+Kn],qi=ze.unproject(Ei),_o=ze.zoom+Math.log2(Math.abs(Math.min(Wr,wn)));return{longitude:qi[0],latitude:qi[1],zoom:Math.min(_o,m)}}var Jb=function(n){(0,zt.Z)(l,n);function l(){var a,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=s.width,h=s.height,v=s.latitude,m=v===void 0?0:v,w=s.longitude,A=w===void 0?0:w,R=s.zoom,B=R===void 0?0:R,G=s.pitch,j=G===void 0?0:G,lt=s.bearing,ct=lt===void 0?0:lt,_t=s.altitude,Vt=_t===void 0?1.5:_t,ce=s.nearZMultiplier,ae=s.farZMultiplier;(0,pt.Z)(this,l),u=u||1,h=h||1;var ze=uT(B);Vt=Math.max(.75,Vt);var $e=Kb([A,m],ze);$e[2]=0;var xr=iy({width:u,height:h,pitch:j,bearing:ct,altitude:Vt,nearZMultiplier:ce||1/h,farZMultiplier:ae||1.01}),Or=IP({height:h,center:$e,pitch:j,bearing:ct,altitude:Vt,flipY:!0});return a=(0,P.Z)(this,(0,b.Z)(l).call(this,{width:u,height:h,viewMatrix:Or,projectionMatrix:xr})),a.latitude=m,a.longitude=A,a.zoom=B,a.pitch=j,a.bearing=ct,a.altitude=Vt,a.scale=ze,a.center=$e,a.pixelsPerMeter=lT((0,ut.Z)((0,ut.Z)(a))).pixelsPerMeter[2],Object.freeze((0,ut.Z)((0,ut.Z)(a))),a}return(0,et.Z)(l,[{key:"projectFlat",value:function(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.scale;return Kb(s,u)}},{key:"unprojectFlat",value:function(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.scale;return ny(s,u)}},{key:"getMapCenterByLngLatPosition",value:function(s){var u=s.lngLat,h=s.pos,v=cT(h,this.pixelUnprojectionMatrix),m=Kb(u,this.scale),w=ai.IH([],m,ai.tk([],v)),A=ai.IH([],this.center,w);return ny(A,this.scale)}},{key:"getLocationAtPoint",value:function(s){var u=s.lngLat,h=s.pos;return this.getMapCenterByLngLatPosition({lngLat:u,pos:h})}},{key:"fitBounds",value:function(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=this.width,v=this.height,m=kP(Object.assign({width:h,height:v,bounds:s},u)),w=m.longitude,A=m.latitude,R=m.zoom;return new l({width:h,height:v,longitude:w,latitude:A,zoom:R})}}]),l}(hT),LP=function(){function n(){(0,pt.Z)(this,n)}return(0,et.Z)(n,[{key:"syncWithMapCamera",value:function(a){var s=a.center,u=a.zoom,h=a.pitch,v=a.bearing,m=a.viewportHeight,w=a.viewportWidth,A=this.viewport?{width:this.viewport.width,height:this.viewport.height,longitude:this.viewport.center[0],latitude:this.viewport.center[1],zoom:this.viewport.zoom,pitch:this.viewport.pitch,bearing:this.viewport.bearing}:{};this.viewport=new Jb((0,K.Z)((0,K.Z)({},A),{},{width:w,height:m,longitude:s&&s[0],latitude:s&&s[1],zoom:u,pitch:h,bearing:v}))}},{key:"getZoom",value:function(){return this.viewport.zoom}},{key:"getZoomScale",value:function(){return Math.pow(2,this.getZoom())}},{key:"getCenter",value:function(){return[this.viewport.longitude,this.viewport.latitude]}},{key:"getProjectionMatrix",value:function(){return this.viewport.projectionMatrix}},{key:"getModelMatrix",value:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}},{key:"getViewMatrix",value:function(){return this.viewport.viewMatrix}},{key:"getViewMatrixUncentered",value:function(){return this.viewport.viewMatrixUncentered}},{key:"getViewProjectionMatrix",value:function(){return this.viewport.viewProjectionMatrix}},{key:"getViewProjectionMatrixUncentered",value:function(){return this.viewport.viewProjectionMatrix}},{key:"getFocalDistance",value:function(){return 1}},{key:"projectFlat",value:function(a,s){return this.viewport.projectFlat(a,s)}}]),n}(),PP={normal:"amap://styles/normal",light:"amap://styles/c422f5c0cfced5be9fe3a83f05f28a68?isPublic=true",dark:"amap://styles/c9f1d10cae34f8ab05e425462c5a58d7?isPublic=true",blank:"amap://styles/07c17002b38775b32a7a76c66cf90e99?isPublic=true",fresh:"amap://styles/fresh",grey:"amap://styles/grey",graffiti:"amap://styles/graffiti",macaron:"amap://styles/macaron",darkblue:"amap://styles/darkblue",wine:"amap://styles/wine"},OP=["id","style","minZoom","maxZoom","token","mapInstance","plugin"],pT,dT,t2,vT,e2,gT,xf,mT,yT,r2,_T;function FP(n,l){var a=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,s=typeof wx!="undefined"&&wx!==null&&(typeof wx.request!="undefined"||typeof wx.miniProgram!="undefined");if(!(a||s)&&(l||(l=document),!!l)){var u=l.head||l.getElementsByTagName("head")[0];if(!u){u=l.createElement("head");var h=l.body||l.getElementsByTagName("body")[0];h?h.parentNode.insertBefore(u,h):l.documentElement.appendChild(u)}var v=l.createElement("style");return v.type="text/css",v.styleSheet?v.styleSheet.cssText=n:v.appendChild(l.createTextNode(n)),u.appendChild(v),v}}FP(`.amap-logo{
|
|
display: none !important;
|
|
}
|
|
`);var xT={contextmenu:"rightclick"},RP=0;window.forceWebGL=!0;var bT="15cd8a57710d40c9b7c0e3cc120f1200",DP="1.4.15",BP="amap-script",n2=!1,i_=[],NP=12,zP=(pT=(0,At.b2)(),dT=(0,At.f3)(Dt.IGlobalConfigService),t2=(0,At.f3)(Dt.MapConfig),vT=(0,At.f3)(Dt.ICoordinateSystemService),e2=(0,At.f3)(Dt.IEventEmitter),pT(gT=(xf=function(){function n(){var l=this;(0,pt.Z)(this,n),(0,W.Z)(this,"version",Oc["GAODE1.x"]),(0,W.Z)(this,"simpleMapCoord",new ry),(0,W.Z)(this,"bgColor","rgba(0, 0, 0, 0)"),Rn(this,"configService",mT,this),Rn(this,"config",yT,this),Rn(this,"coordinateSystemService",r2,this),Rn(this,"eventEmitter",_T,this),(0,W.Z)(this,"handleCameraChanged",function(a){var s=a.camera,u=s.fov,h=s.near,v=s.far,m=s.height,w=s.pitch,A=s.rotation,R=s.aspect,B=s.position,G=l.getCenter(),j=G.lng,lt=G.lat;if(l.emit("mapchange"),l.cameraChangedCallback){l.viewport.syncWithMapCamera({aspect:R,bearing:360-A,far:v,fov:u,cameraHeight:m,near:h,pitch:w,zoom:l.map.getZoom()-1,center:[j,lt],offsetOrigin:[B.x,B.y]});var ct=l.config.offsetZoom,_t=ct===void 0?NP:ct;l.viewport.getZoom()>_t?l.coordinateSystemService.setCoordinateSystem(ol.P20_OFFSET):l.coordinateSystemService.setCoordinateSystem(ol.P20),l.cameraChangedCallback(l.viewport)}})}return(0,et.Z)(n,[{key:"setBgColor",value:function(a){this.bgColor=a}},{key:"addMarkerContainer",value:function(){var a=this.map.getContainer();if(a!==null){var s=a.getElementsByClassName("amap-maps")[0];this.markerContainer=so("div","l7-marker-container",s)}}},{key:"getMarkerContainer",value:function(){return this.markerContainer}},{key:"on",value:function(a,s){G_.indexOf(a)!==-1?this.eventEmitter.on(a,s):this.map.on(xT[a]||a,s)}},{key:"off",value:function(a,s){G_.indexOf(a)!==-1?this.eventEmitter.off(a,s):this.map.off(xT[a]||a,s)}},{key:"getContainer",value:function(){return this.map.getContainer()}},{key:"getMapCanvasContainer",value:function(){var a;return(a=this.map.getContainer())===null||a===void 0?void 0:a.getElementsByClassName("amap-maps")[0]}},{key:"getSize",value:function(){var a=this.map.getSize();return[a.getWidth(),a.getHeight()]}},{key:"getType",value:function(){return"amap"}},{key:"getZoom",value:function(){return this.map.getZoom()-1}},{key:"setZoom",value:function(a){return this.map.setZoom(a+1)}},{key:"getCenter",value:function(a){if(a!=null&&a.padding){var s=this.getCenter(),u=e_(a.padding),h=this.lngLatToPixel([s.lng,s.lat]),v=[(u.right-u.left)/2,(u.bottom-u.top)/2],m=this.pixelToLngLat([h.x-v[0],h.y-v[1]]);return m}var w=this.map.getCenter();return{lng:w.getLng(),lat:w.getLat()}}},{key:"setCenter",value:function(a,s){if(s!=null&&s.padding){var u=e_(s.padding),h=this.lngLatToPixel(a),v=[(u.right-u.left)/2,(u.bottom-u.top)/2],m=this.pixelToLngLat([h.x+v[0],h.y+v[1]]);this.map.setCenter([m.lng,m.lat])}else this.map.setCenter(a)}},{key:"getPitch",value:function(){return this.map.getPitch()}},{key:"getRotation",value:function(){return 360-this.map.getRotation()}},{key:"getBounds",value:function(){var a=this.map.getBounds().toBounds(),s=a.getNorthEast(),u=a.getSouthWest(),h=this.getCenter(),v=h.lng>s.getLng()||h.lng<u.getLng()?180-s.getLng():s.getLng(),m=h.lng<u.getLng()?u.getLng()-180:u.getLng();return[[m,u.getLat()],[v,s.getLat()]]}},{key:"getMinZoom",value:function(){var a=this.map.get("zooms");return a[0]-1}},{key:"getMaxZoom",value:function(){var a=this.map.get("zooms");return a[1]-1}},{key:"setRotation",value:function(a){return this.map.setRotation(a)}},{key:"setPitch",value:function(a){return this.map.setPitch(a)}},{key:"zoomIn",value:function(){this.map.zoomIn()}},{key:"zoomOut",value:function(){this.map.zoomOut()}},{key:"panTo",value:function(a){this.map.panTo(a)}},{key:"panBy",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.map.panBy(a,s)}},{key:"fitBounds",value:function(a){this.map.setBounds(new AMap.Bounds([a[0][0],a[0][1],a[1][0],a[1][1]]))}},{key:"setZoomAndCenter",value:function(a,s){this.map.setZoomAndCenter(a+1,s)}},{key:"setMapStyle",value:function(a){this.map.setMapStyle(this.getMapStyleValue(a))}},{key:"setMapStatus",value:function(a){this.map.setStatus(a)}},{key:"getMapStyleConfig",value:function(){return PP}},{key:"getMapStyleValue",value:function(a){return this.getMapStyleConfig()[a]||a}},{key:"getMapStyle",value:function(){return this.map.getMapStyle()}},{key:"pixelToLngLat",value:function(a){var s=this.map.pixelToLngLat(new AMap.Pixel(a[0],a[1]));return{lng:s.getLng(),lat:s.getLat()}}},{key:"lngLatToPixel",value:function(a){var s=this.map.lnglatToPixel(new AMap.LngLat(a[0],a[1]));return{x:s.getX(),y:s.getY()}}},{key:"containerToLngLat",value:function(a){var s=new AMap.Pixel(a[0],a[1]),u=this.map.containerToLngLat(s);return{lng:u==null?void 0:u.getLng(),lat:u==null?void 0:u.getLat()}}},{key:"lngLatToContainer",value:function(a){var s=new AMap.LngLat(a[0],a[1]),u=this.map.lngLatToContainer(s);return{x:u.getX(),y:u.getY()}}},{key:"lngLatToCoord",value:function(a){var s=this.map.lngLatToGeodeticCoord(a),u=s.x,h=s.y;return[u,-h]}},{key:"lngLatToMercator",value:function(a,s){return{x:0,y:0,z:0}}},{key:"getModelMatrix",value:function(a,s,u){var h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[1,1,1],v=this.viewport.projectFlat(a),m=qr();return ci(m,m,Io.fromValues(v[0],v[1],s)),Ai(m,m,Io.fromValues(h[0],h[1],h[2])),zi(m,m,u[0]),Fi(m,m,u[1]),Ui(m,m,u[2]),m}},{key:"init",value:function(){var l=(0,J.Z)(ot().mark(function s(){var u=this,h,v,m,w,A,R,B,G,j,lt,ct,_t,Vt,ce;return ot().wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return h=this.config,v=h.id,m=h.style,w=m===void 0?"light":m,A=h.minZoom,R=A===void 0?0:A,B=h.maxZoom,G=B===void 0?18:B,j=h.token,lt=j===void 0?bT:j,ct=h.mapInstance,_t=h.plugin,Vt=_t===void 0?[]:_t,ce=(0,tc.Z)(h,OP),ze.next=3,new Promise(function($e){var xr=function(){if(ct)u.map=ct,u.$mapContainer=u.map.getContainer(),setTimeout(function(){u.map.on("camerachange",u.handleCameraChanged),$e()},30);else{u.$mapContainer=u.creatMapContainer(v);var Zr=(0,K.Z)({mapStyle:u.getMapStyleValue(w),zooms:[R,G],viewMode:"3D"},ce);Zr.zoom&&(Zr.zoom+=1);var Wr=new AMap.Map(u.$mapContainer,Zr);Wr.on("camerachange",u.handleCameraChanged),Wr.on("camerachange",function(){setTimeout(function(){return u.handleAfterMapChange()})}),u.map=Wr,setTimeout(function(){$e()},10)}};!n2&&!ct?(lt===bT&&console.warn("%c".concat(u.configService.getSceneWarninfo("MapToken"),"!"),"color: #873bf4;font-weigh:900;font-size: 16px;"),n2=!0,Vt.push("Map3D"),lh().load({key:lt,version:DP,plugins:Vt}).then(function(){xr(),i_.length&&(i_.forEach(function(Or){return Or()}),i_=[])}).catch(function(Or){throw new Error(Or)})):n2&&window.AMap||ct?xr():i_.push(xr)});case 3:this.viewport=new LP;case 4:case"end":return ze.stop()}},s,this)}));function a(){return l.apply(this,arguments)}return a}()},{key:"meterToCoord",value:function(a,s){var u=AMap.GeometryUtil.distance(Ue(AMap.LngLat,(0,Oi.Z)(a)),Ue(AMap.LngLat,(0,Oi.Z)(s))),h=this.lngLatToCoord(a),v=(0,yt.Z)(h,2),m=v[0],w=v[1],A=this.lngLatToCoord(s),R=(0,yt.Z)(A,2),B=R[0],G=R[1],j=Math.sqrt(Math.pow(m-B,2)+Math.pow(w-G,2));return j/u}},{key:"updateView",value:function(a){}},{key:"getOverlayContainer",value:function(){}},{key:"exportMap",value:function(a){var s,u=(s=this.getContainer())===null||s===void 0?void 0:s.getElementsByClassName("amap-layer")[0],h=a==="jpg"?u==null?void 0:u.toDataURL("image/jpeg"):u==null?void 0:u.toDataURL("image/png");return h}},{key:"emit",value:function(a){for(var s,u=arguments.length,h=new Array(u>1?u-1:0),v=1;v<u;v++)h[v-1]=arguments[v];(s=this.eventEmitter).emit.apply(s,[a].concat(h))}},{key:"once",value:function(a){for(var s,u=arguments.length,h=new Array(u>1?u-1:0),v=1;v<u;v++)h[v-1]=arguments[v];(s=this.eventEmitter).once.apply(s,[a].concat(h))}},{key:"destroy",value:function(){var a,s;(a=this.$mapContainer)===null||a===void 0||(s=a.parentNode)===null||s===void 0||s.removeChild(this.$mapContainer),delete window.initAMap;var u=document.getElementById(BP);u&&document.head.removeChild(u),this.map.destroy()}},{key:"getMapContainer",value:function(){return this.$mapContainer}},{key:"onCameraChanged",value:function(a){this.cameraChangedCallback=a}},{key:"handleAfterMapChange",value:function(){this.emit("mapAfterFrameChange")}},{key:"creatMapContainer",value:function(a){var s=a;typeof a=="string"&&(s=document.getElementById(a));var u=document.createElement("div");return u.style.cssText+=`
|
|
position: absolute;
|
|
top: 0;
|
|
height: 100%;
|
|
width: 100%;
|
|
`,u.id="l7_amap_div"+RP++,s.appendChild(u),u}}]),n}(),mT=Ri(xf.prototype,"configService",[dT],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),yT=Ri(xf.prototype,"config",[t2],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),r2=Ri(xf.prototype,"coordinateSystemService",[vT],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),_T=Ri(xf.prototype,"eventEmitter",[e2],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),xf))||gT),UP=function(){function n(){(0,pt.Z)(this,n),(0,W.Z)(this,"projectionMatrix",qr()),(0,W.Z)(this,"viewMatrix",qr()),(0,W.Z)(this,"viewProjectionMatrix",qr()),(0,W.Z)(this,"ViewProjectionMatrixUncentered",qr()),(0,W.Z)(this,"viewUncenteredMatrix",qr())}return(0,et.Z)(n,[{key:"syncWithMapCamera",value:function(a){var s=a.zoom,u=s===void 0?1:s,h=a.center,v=h===void 0?[0,0]:h,m=a.offsetOrigin,w=m===void 0?[0,0]:m,A=a.cameraPosition,R=A===void 0?[0,0,0]:A,B=a.up,G=B===void 0?[0,1,0]:B,j=a.lookAt,lt=j===void 0?[0,0,0]:j,ct=a.aspect,_t=ct===void 0?1:ct,Vt=a.near,ce=Vt===void 0?.1:Vt,ae=a.far,ze=ae===void 0?1e3:ae,$e=a.fov,xr=$e===void 0?45:$e;this.zoom=u,this.center=v,lu(this.projectionMatrix,xr/180*Math.PI,_t,ce,ze);var Or=Io.fromValues.apply(Io,(0,Oi.Z)(R)),Zr=Io.fromValues.apply(Io,(0,Oi.Z)(lt)),Wr=Io.fromValues.apply(Io,(0,Oi.Z)(G));Id(this.viewMatrix,Or,Zr,Wr),this.viewUncenteredMatrix=Ar(this.viewMatrix),ci(this.viewMatrix,this.viewMatrix,Io.fromValues(-w[0],w[1],0)),ti(this.viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),ti(this.ViewProjectionMatrixUncentered,this.projectionMatrix,this.viewMatrix)}},{key:"getZoom",value:function(){return this.zoom}},{key:"getZoomScale",value:function(){return 1048576}},{key:"getCenter",value:function(){var a=(0,yt.Z)(this.center,2),s=a[0],u=a[1];return[s,u]}},{key:"getProjectionMatrix",value:function(){return this.projectionMatrix}},{key:"getModelMatrix",value:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}},{key:"getViewMatrix",value:function(){return this.viewMatrix}},{key:"getViewMatrixUncentered",value:function(){return this.viewUncenteredMatrix}},{key:"getViewProjectionMatrix",value:function(){return this.viewProjectionMatrix}},{key:"getViewProjectionMatrixUncentered",value:function(){return this.ViewProjectionMatrixUncentered}},{key:"getFocalDistance",value:function(){return 1.2}},{key:"projectFlat",value:function(a){var s=85.0511287798,u=Math.max(Math.min(s,a[1]),-s),h=256<<20,v=Math.PI/180,m=a[0]*v,w=u*v;w=Math.log(Math.tan(Math.PI/4+w/2));var A=.5/Math.PI,R=.5,B=-.5/Math.PI;return v=.5,m=h*(A*m+R)-215440491,w=-(h*(B*w+v)-106744817),[m,w]}}]),n}(),ZP=["id","style","minZoom","maxZoom","token","mapInstance","plugin","version"],ET,VP;function WF(n){var l=XF();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function XF(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}function YF(n,l){var a=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,s=typeof wx!="undefined"&&wx!==null&&(typeof wx.request!="undefined"||typeof wx.miniProgram!="undefined");if(!(a||s)&&(l||(l=document),!!l)){var u=l.head||l.getElementsByTagName("head")[0];if(!u){u=l.createElement("head");var h=l.body||l.getElementsByTagName("body")[0];h?h.parentNode.insertBefore(u,h):l.documentElement.appendChild(u)}var v=l.createElement("style");return v.type="text/css",v.styleSheet?v.styleSheet.cssText=n:v.appendChild(l.createTextNode(n)),u.appendChild(v),v}}YF(`.amap-logo{
|
|
display: none !important;
|
|
}
|
|
`);var r=[108.92361,34.54083];window.forceWebGL=!0;var e="ff533602d57df6f8ab3b0fea226ae52f",t="2.0",i=!1,o=null,c=(ET=(0,At.b2)(),ET(VP=function(n){(0,zt.Z)(a,n);var l=WF(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"version",Oc["GAODE2.x"]),(0,W.Z)((0,ut.Z)(s),"handleViewChanged",function(m){var w=s.map.customCoords.getCameraParams(),A=w.fov,R=w.near,B=w.far,G=w.aspect,j=w.position,lt=w.lookAt,ct=w.up;s.emit("mapchange");var _t=s.map.customCoords.getCenter();s.cameraChangedCallback&&(s.viewport.syncWithMapCamera({aspect:G,far:B,fov:A,cameraPosition:j,lookAt:lt,up:ct,near:R,zoom:s.map.getZoom()-1,center:_t,offsetOrigin:[j[0],j[1]]}),s.coordinateSystemService.setCoordinateSystem(ol.P20_2),s.cameraChangedCallback(s.viewport))}),s}return(0,et.Z)(a,[{key:"setCustomCoordCenter",value:function(u){this.sceneCenter=u,this.sceneCenterMKT=U.apply(void 0,(0,Oi.Z)(u))}},{key:"getCustomCoordCenter",value:function(){return this.sceneCenterMKT}},{key:"lngLatToCoordByLayer",value:function(u,h){var v=h||this.sceneCenter,m=U.apply(void 0,(0,Oi.Z)(v)),w=this._sub(U(u[0],u[1]),m);return u[2]&&w.push(u[2]),w}},{key:"lngLatToCoordsByLayer",value:function(u,h){var v=this;return u.map(function(m){return typeof m[0]=="number"?v.lngLatToCoordByLayer(m,h):m.map(function(w){return v.lngLatToCoordByLayer(w,h)})})}},{key:"setCoordCenter",value:function(u){this.map.customCoords.setCenter(u||r),this.setCustomCoordCenter(u||r)}},{key:"lngLatToCoord",value:function(u){return this.sceneCenter||(this.map.customCoords.setCenter(u),this.setCustomCoordCenter(u)),this._sub(U(u[0],u[1]),this.sceneCenterMKT)}},{key:"lngLatToCoords",value:function(u){var h=this;return u.map(function(v){return typeof v[0]=="number"?h.lngLatToCoord(v):v.map(function(m){return h.lngLatToCoord(m)})})}},{key:"addMarkerContainer",value:function(){if(this.map){var u=this.map.getContainer();if(u!==null){var h=u.getElementsByClassName("amap-maps")[0];h.style.zIndex="auto",this.markerContainer=so("div","l7-marker-container2",h)}}}},{key:"updateView",value:function(u){}},{key:"getOverlayContainer",value:function(){}},{key:"getType",value:function(){return"amap2"}},{key:"getBounds",value:function(){var u=this.map.getBounds(),h=u.getNorthEast(),v=u.getSouthWest(),m=this.getCenter(),w=m.lng>h.getLng()||m.lng<v.getLng()?180-h.getLng():h.getLng(),A=m.lng<v.getLng()?v.getLng()-180:v.getLng();return[[A,v.getLat()],[w,h.getLat()]]}},{key:"getMinZoom",value:function(){var u=this.map.getZooms();return u[0]-1}},{key:"getMaxZoom",value:function(){var u=this.map.getZooms();return u[1]-1}},{key:"lngLatToContainer",value:function(u){var h=this.map.lngLatToContainer(u);return{x:h.getX(),y:h.getY()}}},{key:"getModelMatrix",value:function(u,h,v){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[1,1,1],w=this.map.customCoords.lngLatToCoord(u),A=qr();return ci(A,A,Io.fromValues(w[0],w[1],h)),Ai(A,A,Io.fromValues(m[0],m[1],m[2])),zi(A,A,v[0]),Fi(A,A,v[1]),Ui(A,A,v[2]),A}},{key:"init",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v,m,w,A,R,B,G,j,lt,ct,_t,Vt,ce,ae,ze,$e,xr,Or,Zr,Wr,wn,vn;return ot().wrap(function(Ei){for(;;)switch(Ei.prev=Ei.next){case 0:if(v=this.config,m=v.id,w=v.style,A=w===void 0?"light":w,R=v.minZoom,B=R===void 0?0:R,G=v.maxZoom,j=G===void 0?18:G,lt=v.token,ct=lt===void 0?e:lt,_t=v.mapInstance,Vt=v.plugin,ce=Vt===void 0?[]:Vt,ae=v.version,ze=ae===void 0?t:ae,$e=(0,tc.Z)(v,ZP),this.viewport=new UP,window.AMap||_t){Ei.next=6;break}return ce.push("Map3D"),Ei.next=6,lh().load({key:ct,version:t,plugins:ce});case 6:_t?(this.map=_t,this.$mapContainer=this.map.getContainer(),Or=this.map.getCenter(),(xr=this.map.customCoords)===null||xr===void 0||xr.setCenter([Or.lng,Or.lat]),this.setCustomCoordCenter([Or.lng,Or.lat]),this.map.on("viewchange",this.handleViewChanged)):(this.$mapContainer=this.creatMapContainer(m),Wr=(0,K.Z)({mapStyle:this.getMapStyleValue(A),zooms:[B,j],viewMode:"3D"},$e),Wr.zoom&&(Wr.zoom+=1),ct===e&&console.warn("%c".concat(this.configService.getSceneWarninfo("MapToken"),"!"),"color: #873bf4;font-weigh:900;font-size: 16px;"),wn=new AMap.Map(this.$mapContainer,Wr),this.map=wn,vn=wn.getCenter(),(Zr=this.map.customCoords)===null||Zr===void 0||Zr.setCenter([vn.lng,vn.lat]),this.setCustomCoordCenter([vn.lng,vn.lat]),wn.on("viewchange",this.handleViewChanged)),this.initViewPort();case 8:case"end":return Ei.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"getMapContainer",value:function(){return this.$mapContainer}},{key:"onCameraChanged",value:function(u){this.cameraChangedCallback=u}},{key:"initViewPort",value:function(){var u,h=(u=this.map.customCoords)===null||u===void 0?void 0:u.getCameraParams(),v=h.fov,m=h.near,w=h.far,A=h.aspect,R=h.position,B=h.lookAt,G=h.up;this.emit("mapchange");var j=this.map.customCoords.getCenter(),lt=this.map.getZoom();this.cameraChangedCallback&&(this.viewport.syncWithMapCamera({aspect:A,far:w,fov:v,cameraPosition:R,lookAt:B,near:m,up:G,zoom:lt-1,center:j,offsetOrigin:[R[0],R[1]]}),this.coordinateSystemService.setCoordinateSystem(ol.P20_2),this.cameraChangedCallback(this.viewport))}},{key:"_sub",value:function(u,h){var v=[0,0];return v[0]=u[0]-h[0],v[1]=u[1]-h[1],v}}]),a}(zP))||VP);function p(n){var l=g();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function g(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}var _=function(n){(0,zt.Z)(a,n);var l=p(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getServiceConstructor",value:function(){return c}}]),a}(aT),S=nt(80966),I=nt.n(S),L={light:"mapbox://styles/zcxduo/ck2ypyb1r3q9o1co1766dex29",dark:"mapbox://styles/zcxduo/ck241p6413s0b1cpayzldv7x7",normal:"mapbox://styles/mapbox/streets-v11",blank:{version:8,sources:{},layers:[{id:"background",type:"background",layout:{visibility:"none"}}]}},F,z,V,Q,st,at,Rt,Kt,te,Ae,hr,Tr={mapmove:"move",camerachange:"move",zoomchange:"zoom",dragging:"drag"},Dr=12,cn=(F=(0,At.b2)(),z=(0,At.f3)(Dt.MapConfig),V=(0,At.f3)(Dt.IGlobalConfigService),Q=(0,At.f3)(Dt.ICoordinateSystemService),st=(0,At.f3)(Dt.IEventEmitter),F(at=(Rt=function(){function n(){var l=this;(0,pt.Z)(this,n),(0,W.Z)(this,"version",Oc.DEFUALT),(0,W.Z)(this,"simpleMapCoord",new ry),(0,W.Z)(this,"bgColor","rgba(0.0, 0.0, 0.0, 0.0)"),Rn(this,"config",Kt,this),Rn(this,"configService",te,this),Rn(this,"coordinateSystemService",Ae,this),Rn(this,"eventEmitter",hr,this),(0,W.Z)(this,"handleCameraChanged",function(a){var s=l.map.getCenter(),u=s.lat,h=s.lng;l.emit("mapchange"),l.viewport.syncWithMapCamera({bearing:l.map.getBearing(),center:[h,u],viewportHeight:l.map.transform.height,pitch:l.map.getPitch(),viewportWidth:l.map.transform.width,zoom:l.map.getZoom(),cameraHeight:0}),l.updateCoordinateSystemService(),l.cameraChangedCallback(l.viewport)})}return(0,et.Z)(n,[{key:"setBgColor",value:function(a){this.bgColor=a}},{key:"addMarkerContainer",value:function(){var a=this.map.getCanvasContainer();this.markerContainer=so("div","l7-marker-container",a),this.markerContainer.setAttribute("tabindex","-1")}},{key:"getMarkerContainer",value:function(){return this.markerContainer}},{key:"getOverlayContainer",value:function(){}},{key:"on",value:function(a,s){G_.indexOf(a)!==-1?this.eventEmitter.on(a,s):this.map.on(Tr[a]||a,s)}},{key:"off",value:function(a,s){this.map.off(Tr[a]||a,s),this.eventEmitter.off(a,s)}},{key:"getContainer",value:function(){return this.map.getContainer()}},{key:"getMapCanvasContainer",value:function(){return this.map.getCanvasContainer()}},{key:"getSize",value:function(){if(this.version===Oc.SIMPLE)return this.simpleMapCoord.getSize();var a=this.map.transform;return[a.width,a.height]}},{key:"getType",value:function(){return"default"}},{key:"getZoom",value:function(){return this.map.getZoom()}},{key:"setZoom",value:function(a){return this.map.setZoom(a)}},{key:"getCenter",value:function(){return this.map.getCenter()}},{key:"setCenter",value:function(a){this.map.setCenter(a)}},{key:"getPitch",value:function(){return this.map.getPitch()}},{key:"getRotation",value:function(){return this.map.getBearing()}},{key:"getBounds",value:function(){return this.map.getBounds().toArray()}},{key:"getMinZoom",value:function(){return this.map.getMinZoom()}},{key:"getMaxZoom",value:function(){return this.map.getMaxZoom()}},{key:"setRotation",value:function(a){this.map.setBearing(a)}},{key:"zoomIn",value:function(a,s){this.map.zoomIn(a,s)}},{key:"zoomOut",value:function(a,s){this.map.zoomOut(a,s)}},{key:"setPitch",value:function(a){return this.map.setPitch(a)}},{key:"panTo",value:function(a){this.map.panTo(a)}},{key:"panBy",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.panTo([a,s])}},{key:"fitBounds",value:function(a,s){this.map.fitBounds(a,s)}},{key:"setMaxZoom",value:function(a){this.map.setMaxZoom(a)}},{key:"setMinZoom",value:function(a){this.map.setMinZoom(a)}},{key:"setMapStatus",value:function(a){a.doubleClickZoom===!0&&this.map.doubleClickZoom.enable(),a.doubleClickZoom===!1&&this.map.doubleClickZoom.disable(),a.dragEnable===!1&&this.map.dragPan.disable(),a.dragEnable===!0&&this.map.dragPan.enable(),a.rotateEnable===!1&&this.map.dragRotate.disable(),a.dragEnable===!0&&this.map.dragRotate.enable(),a.keyboardEnable===!1&&this.map.keyboard.disable(),a.keyboardEnable===!0&&this.map.keyboard.enable(),a.zoomEnable===!1&&this.map.scrollZoom.disable(),a.zoomEnable===!0&&this.map.scrollZoom.enable()}},{key:"setZoomAndCenter",value:function(a,s){this.map.flyTo({zoom:a,center:s})}},{key:"setMapStyle",value:function(a){this.map.setStyle(this.getMapStyleValue(a))}},{key:"meterToCoord",value:function(a,s){return 1}},{key:"pixelToLngLat",value:function(a){return this.map.unproject(a)}},{key:"lngLatToPixel",value:function(a){return this.map.project(a)}},{key:"containerToLngLat",value:function(a){return this.map.unproject(a)}},{key:"lngLatToContainer",value:function(a){return this.map.project(a)}},{key:"getMapStyle",value:function(){try{var a,s=(a=this.map.getStyle().sprite)!==null&&a!==void 0?a:"";return/^mapbox:\/\/sprites\/zcxduo\/\w+\/\w+$/.test(s)?s==null?void 0:s.replace(/\/\w+$/,"").replace(/sprites/,"styles"):s}catch(u){return""}}},{key:"getMapStyleConfig",value:function(){return L}},{key:"getMapStyleValue",value:function(a){var s;return(s=this.getMapStyleConfig()[a])!==null&&s!==void 0?s:a}},{key:"destroy",value:function(){this.eventEmitter.removeAllListeners(),this.map&&(this.map.remove(),this.$mapContainer=null)}},{key:"emit",value:function(a){for(var s,u=arguments.length,h=new Array(u>1?u-1:0),v=1;v<u;v++)h[v-1]=arguments[v];(s=this.eventEmitter).emit.apply(s,[a].concat(h))}},{key:"once",value:function(a){for(var s,u=arguments.length,h=new Array(u>1?u-1:0),v=1;v<u;v++)h[v-1]=arguments[v];(s=this.eventEmitter).once.apply(s,[a].concat(h))}},{key:"getMapContainer",value:function(){return this.$mapContainer}},{key:"exportMap",value:function(a){var s=this.map.getCanvas(),u=a==="jpg"?s==null?void 0:s.toDataURL("image/jpeg"):s==null?void 0:s.toDataURL("image/png");return u}},{key:"onCameraChanged",value:function(a){this.cameraChangedCallback=a}},{key:"creatMapContainer",value:function(a){var s=a;return typeof a=="string"&&(s=document.getElementById(a)),s}},{key:"updateView",value:function(a){this.emit("mapchange"),this.viewport.syncWithMapCamera({bearing:a.bearing,center:a.center,viewportHeight:a.viewportHeight,pitch:a.pitch,viewportWidth:a.viewportWidth,zoom:a.zoom,cameraHeight:0}),this.updateCoordinateSystemService(),this.cameraChangedCallback(this.viewport)}},{key:"updateCoordinateSystemService",value:function(){var a=this.config.offsetCoordinate,s=a===void 0?!0:a;this.viewport.getZoom()>Dr&&s?this.coordinateSystemService.setCoordinateSystem(ol.LNGLAT_OFFSET):this.coordinateSystemService.setCoordinateSystem(ol.LNGLAT)}}]),n}(),Kt=Ri(Rt.prototype,"config",[z],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),te=Ri(Rt.prototype,"configService",[V],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ae=Ri(Rt.prototype,"coordinateSystemService",[Q],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),hr=Ri(Rt.prototype,"eventEmitter",[st],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Rt))||at),Qr=function(){function n(){(0,pt.Z)(this,n)}return(0,et.Z)(n,[{key:"syncWithMapCamera",value:function(a){var s=a.center,u=a.zoom,h=a.pitch,v=a.bearing,m=a.viewportHeight,w=a.viewportWidth;this.viewport=new Jb({width:w,height:m,longitude:s&&s[0],latitude:s&&s[1],zoom:u,pitch:h,bearing:v})}},{key:"getZoom",value:function(){return this.viewport.zoom}},{key:"getZoomScale",value:function(){return Math.pow(2,this.getZoom())}},{key:"getCenter",value:function(){return[this.viewport.longitude,this.viewport.latitude]}},{key:"getProjectionMatrix",value:function(){return this.viewport.projectionMatrix}},{key:"getModelMatrix",value:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}},{key:"getViewMatrix",value:function(){return this.viewport.viewMatrix}},{key:"getViewMatrixUncentered",value:function(){return this.viewport.viewMatrixUncentered}},{key:"getViewProjectionMatrix",value:function(){return this.viewport.viewProjectionMatrix}},{key:"getViewProjectionMatrixUncentered",value:function(){return this.viewport.viewProjectionMatrix}},{key:"getFocalDistance",value:function(){return 1}},{key:"projectFlat",value:function(a,s){return this.viewport.projectFlat(a,s)}}]),n}(),Tn=["id","attributionControl","style","token","rotation","mapInstance"],xi,va;function Aa(n){var l=ao();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function ao(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}function Gn(n,l){var a=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,s=typeof wx!="undefined"&&wx!==null&&(typeof wx.request!="undefined"||typeof wx.miniProgram!="undefined");if(!(a||s)&&(l||(l=document),!!l)){var u=l.head||l.getElementsByTagName("head")[0];if(!u){u=l.createElement("head");var h=l.body||l.getElementsByTagName("body")[0];h?h.parentNode.insertBefore(u,h):l.documentElement.appendChild(u)}var v=l.createElement("style");return v.type="text/css",v.styleSheet?v.styleSheet.cssText=n:v.appendChild(l.createTextNode(n)),u.appendChild(v),v}}Gn(`.mapboxgl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mapboxgl-canvas{position:absolute;left:0;top:0}.mapboxgl-map:-webkit-full-screen{width:100%;height:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass{cursor:-webkit-grab;cursor:grab;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer{cursor:pointer}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active{cursor:-webkit-grabbing;cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{-ms-touch-action:pinch-zoom;touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{-ms-touch-action:none;touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{position:absolute;pointer-events:none;z-index:2}.mapboxgl-ctrl-top-left{top:0;left:0}.mapboxgl-ctrl-top-right{top:0;right:0}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-bottom-right{right:0;bottom:0}.mapboxgl-ctrl{clear:both;pointer-events:auto;-webkit-transform:translate(0);transform:translate(0)}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{margin:10px 0 0 10px;float:left}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{margin:10px 10px 0 0;float:right}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{margin:0 0 10px 10px;float:left}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{margin:0 10px 10px 0;float:right}.mapboxgl-ctrl-group{border-radius:4px;background:#fff}.mapboxgl-ctrl-group:not(:empty){-webkit-box-shadow:0 0 2px rgba(0,0,0,.1);box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (-ms-high-contrast:active){.mapboxgl-ctrl-group:not(:empty){-webkit-box-shadow:0 0 0 2px ButtonText;box-shadow:0 0 0 2px ButtonText}}.mapboxgl-ctrl-group button{width:29px;height:29px;display:block;padding:0;outline:none;border:0;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:transparent;cursor:pointer}.mapboxgl-ctrl-group button+button{border-top:1px solid #ddd}.mapboxgl-ctrl button .mapboxgl-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@media (-ms-high-contrast:active){.mapboxgl-ctrl-icon{background-color:transparent}.mapboxgl-ctrl-group button+button{border-top:1px solid ButtonText}}.mapboxgl-ctrl button::-moz-focus-inner{border:0;padding:0}.mapboxgl-ctrl-attrib-button:focus,.mapboxgl-ctrl-group button:focus{-webkit-box-shadow:0 0 2px 2px #0096ff;box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl button:disabled{cursor:not-allowed}.mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon{opacity:.25}.mapboxgl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-group button:focus:focus-visible{-webkit-box-shadow:0 0 2px 2px #0096ff;box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl-group button:focus:not(:focus-visible){-webkit-box-shadow:none;box-shadow:none}.mapboxgl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.mapboxgl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.mapboxgl-ctrl-group button:focus:only-child{border-radius:inherit}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23999'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23aaa'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting .mapboxgl-ctrl-icon{-webkit-animation:mapboxgl-spin 2s linear infinite;animation:mapboxgl-spin 2s linear infinite}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23999'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23666'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E")}}@-webkit-keyframes mapboxgl-spin{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes mapboxgl-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}a.mapboxgl-ctrl-logo{width:88px;height:23px;margin:0 0 -4px -4px;display:block;background-repeat:no-repeat;cursor:pointer;overflow:hidden;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg opacity='.3' stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cg opacity='.9' fill='%23fff'%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/g%3E%3C/svg%3E")}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:23px}@media (-ms-high-contrast:active){a.mapboxgl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/g%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){a.mapboxgl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg stroke='%23fff' stroke-width='3' fill='%23fff'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/svg%3E")}}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{min-height:20px;padding:2px 24px 2px 0;margin:10px;position:relative;background-color:#fff;border-radius:12px}.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 8px 2px 28px;border-radius:12px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib-button{display:none;cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:12px;outline:none;top:0;right:0;border:0}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-top-left .mapboxgl-ctrl-attrib-button{left:0}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner,.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;right:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;left:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' fill='%23fff'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E")}}@media screen and (-ms-high-contrast:black-on-white){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E")}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);font-size:10px;border:2px solid #333;border-top:#333;padding:0 5px;color:#333;-webkit-box-sizing:border-box;box-sizing:border-box}.mapboxgl-popup{position:absolute;top:0;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;will-change:transform;pointer-events:none}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.mapboxgl-popup-anchor-left{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.mapboxgl-popup-anchor-right{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.mapboxgl-popup-tip{width:0;height:0;border:10px solid transparent;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-top:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-right:none;border-left-color:#fff}.mapboxgl-popup-close-button{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.mapboxgl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-popup-content{position:relative;background:#fff;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-track-pointer{display:none}.mapboxgl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-map:hover .mapboxgl-popup-track-pointer{display:-webkit-box;display:-ms-flexbox;display:flex}.mapboxgl-map:active .mapboxgl-popup-track-pointer{display:none}.mapboxgl-marker{position:absolute;top:0;left:0;will-change:transform}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.mapboxgl-user-location-dot:before{content:"";position:absolute;-webkit-animation:mapboxgl-user-location-dot-pulse 2s infinite;animation:mapboxgl-user-location-dot-pulse 2s infinite}.mapboxgl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 0 3px rgba(0,0,0,.35);box-shadow:0 0 3px rgba(0,0,0,.35)}@-webkit-keyframes mapboxgl-user-location-dot-pulse{0%{-webkit-transform:scale(1);opacity:1}70%{-webkit-transform:scale(3);opacity:0}to{-webkit-transform:scale(1);opacity:0}}@keyframes mapboxgl-user-location-dot-pulse{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}70%{-webkit-transform:scale(3);transform:scale(3);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:0}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-user-location-accuracy-circle{background-color:rgba(29,161,242,.2);width:1px;height:1px;border-radius:100%}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}@media print{.mapbox-improve-map{display:none}}`),window.mapboxgl=I();var Gi=0,ca="101MlGsZ2AmmA&access_token=pk.eyJ1IjoiZXhhbXBsZXMiLCJhIjoiY2p0MG01MXRqMW45cjQzb2R6b2ptc3J4MSJ9.zA2W0IkI0c6KaAhJfk9bWg",Yi=(xi=(0,At.b2)(),xi(va=function(n){(0,zt.Z)(a,n);var l=Aa(a);function a(){var s;(0,pt.Z)(this,a);for(var u=arguments.length,h=new Array(u),v=0;v<u;v++)h[v]=arguments[v];return s=l.call.apply(l,[this].concat(h)),(0,W.Z)((0,ut.Z)(s),"version",Oc.MAPBOX),s}return(0,et.Z)(a,[{key:"getType",value:function(){return"mapbox"}},{key:"lngLatToCoord",value:function(u){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{x:0,y:0,z:0},v=this.lngLatToMercator(u,0),m=v.x,w=v.y;return[m-h.x,w-h.y]}},{key:"lngLatToMercator",value:function(u,h){var v=window.mapboxgl.MercatorCoordinate.fromLngLat(u,h),m=v.x,w=m===void 0?0:m,A=v.y,R=A===void 0?0:A,B=v.z,G=B===void 0?0:B;return{x:w,y:R,z:G}}},{key:"getModelMatrix",value:function(u,h,v){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[1,1,1],w=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{x:0,y:0,z:0},A=window.mapboxgl.MercatorCoordinate.fromLngLat(u,h),R=A.meterInMercatorCoordinateUnits(),B=qr();return ci(B,B,Io.fromValues(A.x-w.x,A.y-w.y,A.z||0-w.z)),Ai(B,B,Io.fromValues(R*m[0],-R*m[1],R*m[2])),zi(B,B,v[0]),Fi(B,B,v[1]),Ui(B,B,v[2]),B}},{key:"init",value:function(){var s=(0,J.Z)(ot().mark(function h(){var v=this,m,w,A,R,B,G,j,lt,ct,_t,Vt,ce,ae;return ot().wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:m=this.config,w=m.id,A=w===void 0?"map":w,R=m.attributionControl,B=R===void 0?!1:R,G=m.style,j=G===void 0?"light":G,lt=m.token,ct=lt===void 0?ca:lt,_t=m.rotation,Vt=_t===void 0?0:_t,ce=m.mapInstance,ae=(0,tc.Z)(m,Tn),this.viewport=new Qr,!ce&&!window.mapboxgl&&console.error(this.configService.getSceneWarninfo("SDK")),ct===ca&&j!=="blank"&&!window.mapboxgl.accessToken&&!ce&&console.warn(this.configService.getSceneWarninfo("MapToken")),!ce&&!window.mapboxgl.accessToken&&(window.mapboxgl.accessToken=ct),ce?(this.map=ce,this.$mapContainer=this.map.getContainer()):(this.$mapContainer=this.creatMapContainer(A),this.map=new window.mapboxgl.Map((0,K.Z)({container:this.$mapContainer,style:this.getMapStyleValue(j),attributionControl:B,bearing:Vt},ae))),this.map.on("load",function(){v.handleCameraChanged()}),this.map.on("move",this.handleCameraChanged),this.handleCameraChanged();case 9:case"end":return $e.stop()}},h,this)}));function u(){return s.apply(this,arguments)}return u}()},{key:"destroy",value:function(){var u,h;(u=this.$mapContainer)===null||u===void 0||(h=u.parentNode)===null||h===void 0||h.removeChild(this.$mapContainer),this.eventEmitter.removeAllListeners(),this.map&&(this.map.remove(),this.$mapContainer=null)}},{key:"emit",value:function(u){for(var h,v=arguments.length,m=new Array(v>1?v-1:0),w=1;w<v;w++)m[w-1]=arguments[w];(h=this.eventEmitter).emit.apply(h,[u].concat(m))}},{key:"once",value:function(u){for(var h,v=arguments.length,m=new Array(v>1?v-1:0),w=1;w<v;w++)m[w-1]=arguments[w];(h=this.eventEmitter).once.apply(h,[u].concat(m))}},{key:"getMapContainer",value:function(){return this.$mapContainer}},{key:"meterToCoord",value:function(u,h){var v=new(I()).LngLat(u[0],u[1]),m=new(I()).LngLat(h[0],h[1]),w=v.distanceTo(m),A=I().MercatorCoordinate.fromLngLat({lng:u[0],lat:u[1]}),R=I().MercatorCoordinate.fromLngLat({lng:h[0],lat:h[1]}),B=A.x,G=A.y,j=R.x,lt=R.y,ct=Math.sqrt(Math.pow(B-j,2)+Math.pow(G-lt,2))*4194304*2;return ct/w}},{key:"exportMap",value:function(u){var h=this.map.getCanvas(),v=u==="jpg"?h==null?void 0:h.toDataURL("image/jpeg"):h==null?void 0:h.toDataURL("image/png");return v}},{key:"creatMapContainer",value:function(u){var h=u;typeof u=="string"&&(h=document.getElementById(u));var v=document.createElement("div");return v.style.cssText+=`
|
|
position: absolute;
|
|
top: 0;
|
|
height: 100%;
|
|
width: 100%;
|
|
`,v.id="l7_mapbox_div"+Gi++,h.appendChild(v),v}}]),a}(cn))||va);function ra(n){var l=Pa();return function(){var s=(0,b.Z)(n),u;if(l){var h=(0,b.Z)(this).constructor;u=Reflect.construct(s,arguments,h)}else u=s.apply(this,arguments);return(0,P.Z)(this,u)}}function Pa(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}function wo(n,l){var a=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,s=typeof wx!="undefined"&&wx!==null&&(typeof wx.request!="undefined"||typeof wx.miniProgram!="undefined");if(!(a||s)&&(l||(l=document),!!l)){var u=l.head||l.getElementsByTagName("head")[0];if(!u){u=l.createElement("head");var h=l.body||l.getElementsByTagName("body")[0];h?h.parentNode.insertBefore(u,h):l.documentElement.appendChild(u)}var v=l.createElement("style");return v.type="text/css",v.styleSheet?v.styleSheet.cssText=n:v.appendChild(l.createTextNode(n)),u.appendChild(v),v}}wo(`.mapboxgl-ctrl-logo {
|
|
display: none !important;
|
|
}
|
|
`);var Ro=function(n){(0,zt.Z)(a,n);var l=ra(a);function a(){return(0,pt.Z)(this,a),l.apply(this,arguments)}return(0,et.Z)(a,[{key:"getServiceConstructor",value:function(){return Yi}}]),a}(aT),Ka=nt(42090),Ga=nt(85306),ps={fontFamily:`
|
|
"-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue",
|
|
Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
|
|
SimSun, "sans-serif"`},Xu="l7plot-tooltip",Yu="l7plot-tooltip__title",zh="l7plot-tooltip__list",Kv="l7plot-tooltip__list-item",cd="l7plot-tooltip__name",H0="l7plot-tooltip__value",kg='<div class="'.concat(Xu,`">
|
|
<div class="`).concat(Yu,`"></div>
|
|
<ul class="`).concat(zh,`"></ul>
|
|
</div>`),i2='<li class="'.concat(Kv,`" data-index={index}>
|
|
<span class="`).concat(cd,`">{name}</span>
|
|
<span class="`).concat(H0,`">{value}</span>
|
|
</li>`),Qv,GP=(Qv={},Qv[Xu]={visibility:"visible",zIndex:999,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"rgb(0 0 0 / 16%) 0px 6px 12px 0px",borderRadius:"2px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:ps.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},Qv[Yu]={marginBottom:"4px"},Qv[zh]={margin:"0px",listStyleType:"none",padding:"0px"},Qv[Kv]={listStyleType:"none",marginBottom:"4px",whiteSpace:"nowrap",display:"flex",justifyContent:"space-between"},Qv[cd]={},Qv[H0]={marginLeft:"30px"},Qv),wT=nt(71452);function a2(n,l){return!!n.className.match(new RegExp("(\\s|^)".concat(l,"(\\s|$)")))}function a_(n){for(var l=n.childNodes,a=l.length,s=a-1;s>=0;s--)n.removeChild(l[s])}var o2=function(){function n(l){this.destroyed=!1,this.options=(0,Et.b$)({},this.getDefaultOptions(),l),this.container=this.initContainer(),this.initDom(),this.applyStyles(),this.initEvent(),this.initCapture(),this.initVisible(),this.render()}return n.prototype.getDefaultOptions=function(){return{name:"",containerTpl:"<div></div>",visible:!0,capture:!0,domStyles:{}}},n.prototype.getContainer=function(){return this.container},n.prototype.getParentContainer=function(){var l=this.options.parent,a;if(!l)return a;if((0,Et.HD)(l)){var s=document.getElementById(l);if(s)a=s;else throw new Error("No parent id ".concat(l))}else a=l;return a},n.prototype.initContainer=function(){var l=this.createDom(this.options.containerTpl),a=this.getParentContainer();return a&&a.appendChild(l),l},n.prototype.initVisible=function(){this.options.visible?this.show():this.hide()},n.prototype.initCapture=function(){this.setCapture(this.options.capture)},n.prototype.update=function(l){this.options=(0,Et.b$)({},this.options,l),this.updateInner(l),this.afterUpdate(l)},n.prototype.updateInner=function(l){l.domStyles&&this.applyStyles()},n.prototype.afterUpdate=function(l){l.capture&&this.setCapture(l.capture)},n.prototype.setCapture=function(l){var a=this.container,s=l?"auto":"none";a.style.pointerEvents=s},n.prototype.applyStyles=function(){var l=this.options.domStyles;if(l){var a=this.container;this.applyChildrenStyles(a,l);var s=this.options.className;if(s&&a2(a,s)){var u=l[s];(0,Ga.Z)(a,u)}}},n.prototype.applyChildrenStyles=function(l,a){(0,Et.S6)(a,function(s,u){var h=l.getElementsByClassName(u);(0,Et.S6)(h,function(v){(0,Ga.Z)(v,s)})})},n.prototype.applyStyle=function(l,a){var s=this.options.domStyles;s&&(0,Ga.Z)(a,s[l])},n.prototype.createDom=function(l){return l===void 0&&(l="<div></div>"),(0,wT.Z)(l)},n.prototype.removeDom=function(){var l=this.container;l&&l.parentNode&&l.parentNode.removeChild(l)},n.prototype.destroy=function(){this.removeEvent(),this.removeDom(),this.destroyed=!0},n}(),s2=function(n){(0,k.ZT)(l,n);function l(){return n!==null&&n.apply(this,arguments)||this}return l.prototype.getDefaultOptions=function(){return(0,Et.b$)({},n.prototype.getDefaultOptions.call(this),{id:"l7plot-tooltip",name:"l7plot-tooltip",title:"",showTitle:!0,items:[],containerTpl:kg,itemTpl:i2,domStyles:GP,className:Xu})},l.prototype.initContainer=function(){var a=this.options.customContent;if(a){var s=this.getHtmlContentNode(a),u=this.getParentContainer();return u&&u.appendChild(s),s}else return n.prototype.initContainer.call(this)},l.prototype.initDom=function(){this.cacheDoms()},l.prototype.initEvent=function(){},l.prototype.removeEvent=function(){},l.prototype.cacheDoms=function(){var a=this.container,s=a.getElementsByClassName(Yu)[0],u=a.getElementsByClassName(zh)[0];this.titleDom=s,this.listDom=u},l.prototype.render=function(){this.options.customContent?this.renderCustomContent(this.options.customContent):(this.resetTitle(),this.renderItems())},l.prototype.show=function(){var a=this.container;!a||this.destroyed||(0,Ga.Z)(a,{visibility:"visible"})},l.prototype.hide=function(){var a=this.container;!a||this.destroyed||(0,Ga.Z)(a,{visibility:"hidden"})},l.prototype.updateInner=function(a){this.options.customContent?this.renderCustomContent(this.options.customContent):(a.title&&this.resetTitle(),a.items&&this.renderItems()),n.prototype.updateInner.call(this,a)},l.prototype.renderCustomContent=function(a){var s=this.container.parentNode,u=this.getHtmlContentNode(a),h=this.container;s&&s.replaceChild(u,h),this.container=u,this.applyStyles()},l.prototype.getHtmlContentNode=function(a){var s,u=a(this.options.title||"",this.options.items);return(0,Et.HD)(u)?s=this.createDom(u):s=u,s},l.prototype.resetTitle=function(){var a=this.options.title,s=this.options.showTitle;s&&a?(this.showTitle(),this.setTitle(a)):this.hideTitle()},l.prototype.showTitle=function(){var a=this.titleDom;a&&(0,Ga.Z)(a,{display:"block"})},l.prototype.hideTitle=function(){var a=this.titleDom;a&&(0,Ga.Z)(a,{display:"none"})},l.prototype.setTitle=function(a){var s=this.titleDom;s&&(s.innerHTML=a)},l.prototype.renderItems=function(){var a=this;this.clearItemDoms();var s=this.options.items,u=this.options.itemTpl||i2,h=this.listDom;h&&(s.forEach(function(v){var m=(0,k.pi)({},v),w=(0,Et.ng)(u,m),A=a.createDom(w);h.appendChild(A)}),this.applyChildrenStyles(h,this.options.domStyles))},l.prototype.clearItemDoms=function(){this.listDom&&a_(this.listDom)},l.prototype.clear=function(){this.setTitle(""),this.clearItemDoms()},l}(o2),u2=nt(39588),l2=typeof global=="object"&&global&&global.Object===Object&&global,c2=l2,$F=typeof self=="object"&&self&&self.Object===Object&&self,HP=c2||$F||Function("return this")(),Ep=HP,jP=Ep.Symbol,bf=jP,Lg=Object.prototype,UR=Lg.hasOwnProperty,ZR=Lg.toString,f2=bf?bf.toStringTag:void 0;function VR(n){var l=UR.call(n,f2),a=n[f2];try{n[f2]=void 0;var s=!0}catch(h){}var u=ZR.call(n);return s&&(l?n[f2]=a:delete n[f2]),u}var GR=VR,HR=Object.prototype,jR=HR.toString;function WR(n){return jR.call(n)}var XR=WR,YR="[object Null]",$R="[object Undefined]",qF=bf?bf.toStringTag:void 0;function qR(n){return n==null?n===void 0?$R:YR:qF&&qF in Object(n)?GR(n):XR(n)}var KF=qR;function KR(n){return n!=null&&typeof n=="object"}var QR=KR,JR="[object Symbol]";function t6(n){return typeof n=="symbol"||QR(n)&&KF(n)==JR}var ST=t6,e6=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r6=/^\w*$/;function n6(n,l){if((0,u2.Z)(n))return!1;var a=typeof n;return a=="number"||a=="symbol"||a=="boolean"||n==null||ST(n)?!0:r6.test(n)||!e6.test(n)||l!=null&&n in Object(l)}var i6=n6;function a6(n){var l=typeof n;return n!=null&&(l=="object"||l=="function")}var CT=a6,o6="[object AsyncFunction]",s6="[object Function]",u6="[object GeneratorFunction]",l6="[object Proxy]";function c6(n){if(!CT(n))return!1;var l=KF(n);return l==s6||l==u6||l==o6||l==l6}var f6=c6,h6=Ep["__core-js_shared__"],WP=h6,QF=function(){var n=/[^.]+$/.exec(WP&&WP.keys&&WP.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function p6(n){return!!QF&&QF in n}var d6=p6,v6=Function.prototype,g6=v6.toString;function m6(n){if(n!=null){try{return g6.call(n)}catch(l){}try{return n+""}catch(l){}}return""}var y6=m6,_6=/[\\^$.*+?()[\]{}|]/g,x6=/^\[object .+?Constructor\]$/,b6=Function.prototype,E6=Object.prototype,w6=b6.toString,S6=E6.hasOwnProperty,C6=RegExp("^"+w6.call(S6).replace(_6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function A6(n){if(!CT(n)||d6(n))return!1;var l=f6(n)?C6:x6;return l.test(y6(n))}var T6=A6;function M6(n,l){return n==null?void 0:n[l]}var I6=M6;function k6(n,l){var a=I6(n,l);return T6(a)?a:void 0}var JF=k6,L6=JF(Object,"create"),h2=L6;function P6(){this.__data__=h2?h2(null):{},this.size=0}var O6=P6;function F6(n){var l=this.has(n)&&delete this.__data__[n];return this.size-=l?1:0,l}var R6=F6,D6="__lodash_hash_undefined__",B6=Object.prototype,N6=B6.hasOwnProperty;function z6(n){var l=this.__data__;if(h2){var a=l[n];return a===D6?void 0:a}return N6.call(l,n)?l[n]:void 0}var U6=z6,Z6=Object.prototype,V6=Z6.hasOwnProperty;function G6(n){var l=this.__data__;return h2?l[n]!==void 0:V6.call(l,n)}var H6=G6,j6="__lodash_hash_undefined__";function W6(n,l){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=h2&&l===void 0?j6:l,this}var X6=W6;function o_(n){var l=-1,a=n==null?0:n.length;for(this.clear();++l<a;){var s=n[l];this.set(s[0],s[1])}}o_.prototype.clear=O6,o_.prototype.delete=R6,o_.prototype.get=U6,o_.prototype.has=H6,o_.prototype.set=X6;var tR=o_;function Y6(){this.__data__=[],this.size=0}var $6=Y6;function q6(n,l){return n===l||n!==n&&l!==l}var K6=q6;function Q6(n,l){for(var a=n.length;a--;)if(K6(n[a][0],l))return a;return-1}var AT=Q6,J6=Array.prototype,tD=J6.splice;function eD(n){var l=this.__data__,a=AT(l,n);if(a<0)return!1;var s=l.length-1;return a==s?l.pop():tD.call(l,a,1),--this.size,!0}var rD=eD;function nD(n){var l=this.__data__,a=AT(l,n);return a<0?void 0:l[a][1]}var iD=nD;function aD(n){return AT(this.__data__,n)>-1}var oD=aD;function sD(n,l){var a=this.__data__,s=AT(a,n);return s<0?(++this.size,a.push([n,l])):a[s][1]=l,this}var uD=sD;function s_(n){var l=-1,a=n==null?0:n.length;for(this.clear();++l<a;){var s=n[l];this.set(s[0],s[1])}}s_.prototype.clear=$6,s_.prototype.delete=rD,s_.prototype.get=iD,s_.prototype.has=oD,s_.prototype.set=uD;var lD=s_,cD=JF(Ep,"Map"),fD=cD;function hD(){this.size=0,this.__data__={hash:new tR,map:new(fD||lD),string:new tR}}var pD=hD;function dD(n){var l=typeof n;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?n!=="__proto__":n===null}var vD=dD;function gD(n,l){var a=n.__data__;return vD(l)?a[typeof l=="string"?"string":"hash"]:a.map}var TT=gD;function mD(n){var l=TT(this,n).delete(n);return this.size-=l?1:0,l}var yD=mD;function _D(n){return TT(this,n).get(n)}var xD=_D;function bD(n){return TT(this,n).has(n)}var ED=bD;function wD(n,l){var a=TT(this,n),s=a.size;return a.set(n,l),this.size+=a.size==s?0:1,this}var SD=wD;function u_(n){var l=-1,a=n==null?0:n.length;for(this.clear();++l<a;){var s=n[l];this.set(s[0],s[1])}}u_.prototype.clear=pD,u_.prototype.delete=yD,u_.prototype.get=xD,u_.prototype.has=ED,u_.prototype.set=SD;var eR=u_,CD="Expected a function";function XP(n,l){if(typeof n!="function"||l!=null&&typeof l!="function")throw new TypeError(CD);var a=function(){var s=arguments,u=l?l.apply(this,s):s[0],h=a.cache;if(h.has(u))return h.get(u);var v=n.apply(this,s);return a.cache=h.set(u,v)||h,v};return a.cache=new(XP.Cache||eR),a}XP.Cache=eR;var AD=XP,TD=500;function MD(n){var l=AD(n,function(s){return a.size===TD&&a.clear(),s}),a=l.cache;return l}var ID=MD,kD=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,LD=/\\(\\)?/g,PD=ID(function(n){var l=[];return n.charCodeAt(0)===46&&l.push(""),n.replace(kD,function(a,s,u,h){l.push(u?h.replace(LD,"$1"):s||a)}),l}),OD=PD;function FD(n,l){for(var a=-1,s=n==null?0:n.length,u=Array(s);++a<s;)u[a]=l(n[a],a,n);return u}var RD=FD,DD=1/0,rR=bf?bf.prototype:void 0,nR=rR?rR.toString:void 0;function iR(n){if(typeof n=="string")return n;if((0,u2.Z)(n))return RD(n,iR)+"";if(ST(n))return nR?nR.call(n):"";var l=n+"";return l=="0"&&1/n==-DD?"-0":l}var BD=iR;function ND(n){return n==null?"":BD(n)}var YP=ND;function zD(n,l){return(0,u2.Z)(n)?n:i6(n,l)?[n]:OD(YP(n))}var UD=zD,ZD=1/0;function VD(n){if(typeof n=="string"||ST(n))return n;var l=n+"";return l=="0"&&1/n==-ZD?"-0":l}var GD=VD;function HD(n,l){l=UD(l,n);for(var a=0,s=l.length;n!=null&&a<s;)n=n[GD(l[a++])];return a&&a==s?n:void 0}var jD=HD;function WD(n,l,a){var s=n==null?void 0:jD(n,l);return s===void 0?a:s}var aR=WD,XD=5,YD=new Object().toString,oR=function(n,l){return YD.call(n)==="[object "+l+"]"},$D=function(n){return oR(n,"Array")},qD=function(n){return typeof n=="object"&&n!==null},sR=function(n){if(!qD(n)||!oR(n,"Object"))return!1;for(var l=n;Object.getPrototypeOf(l)!==null;)l=Object.getPrototypeOf(l);return Object.getPrototypeOf(n)===l},uR=function(n,l,a,s){a=a||0,s=s||XD;for(var u in l)if(Object.prototype.hasOwnProperty.call(l,u)){var h=l[u];h?sR(h)?(sR(n[u])||(n[u]={}),a<s?uR(n[u],h,a+1,s):n[u]=l[u]):$D(h)?(n[u]=[],n[u]=n[u].concat(h)):n[u]=h:n[u]=h}},wp=function(n){for(var l=[],a=1;a<arguments.length;a++)l[a-1]=arguments[a];for(var s=0;s<l.length;s+=1)uR(n,l[s]);return n},KD=["mousemove","click"],QD=function(n){(0,k.ZT)(l,n);function l(a,s,u){var h=n.call(this)||this;h.currentVisible=!1,h.interactionTriggerHander=function(lt){var ct=lt.feature,_t=lt.featureId,Vt=h.options,ce=Vt.title,ae=Vt.customTitle,ze=Vt.items,$e=Vt.customItems,xr=ct.type==="Feature"&&ct.geometry&&ct.properties,Or=xr?ct.properties:ct,Zr=[];if($e){var Wr=$e(ct);if(Array.isArray(Wr))Zr=Wr;else throw new Error("customItems return array")}else ze&&ze.forEach(function(vn){if((0,Et.HD)(vn)){var Kn=vn.split(".").pop()||vn,Ei=aR(Or,vn);Ei!==void 0&&Zr.push({name:Kn,value:Ei})}else{var qi=vn.field,_o=vn.alias,jo=vn.customValue,Gs=_o||qi.split(".").pop()||qi,Ei=aR(Or,qi);Ei!==void 0&&Zr.push({name:Gs,value:jo?jo(Ei,Or,_t):Ei})}});var wn={title:ae?ae(Or):ce,items:Zr};h.updateTooltip(lt,wn)},h.interactionUntriggerHander=function(){h.hideTooltip()},h.scene=a,h.interactionLayers=s,h.options=wp({},h.getDefaultOptions(),u);var v=h.options,m=v.offsets,w=v.title,A=v.showTitle,R=v.customContent,B=v.domStyles,G=v.anchor,j=v.className;return h.marker=new Uy({offsets:m,anchor:G,draggable:!1}),h.tooltipComponent=new s2({title:w,showTitle:A,items:[],customContent:R,domStyles:B,className:j}),h.setComponent(),h.initInteractionEvent(),h}return l.prototype.getDefaultOptions=function(){return{showTitle:!0,showComponent:!0,items:[],offsets:[15,0],trigger:"mousemove",anchor:Eo["TOP-LEFT"]}},l.prototype.update=function(a){this.marker.remove(),this.currentVisible=!1,this.options=wp({},this.options,a);var s=this.options,u=s.offsets,h=s.showTitle,v=s.customContent,m=s.domStyles,w=s.anchor,A=s.className;this.marker=new Uy({offsets:u,anchor:w,draggable:!1}),this.tooltipComponent.update({showTitle:h,customContent:v,domStyles:m,className:A}),this.setComponent()},l.prototype.initInteractionEvent=function(){var a=this,s=this.options.trigger||"mousemove";if(!KD.includes(s))throw new Error("trigger is mousemove or click");this.interactionLayers.forEach(function(u){var h=u.layer;h.on(s,a.interactionTriggerHander),h.on("un".concat(s),a.interactionUntriggerHander)})},l.prototype.unBindInteractionEvent=function(){var a=this,s=this.options.trigger||"mousemove";this.interactionLayers.forEach(function(u){var h=u.layer;h.off(s,a.interactionTriggerHander),h.off("un".concat(s),a.interactionUntriggerHander)})},l.prototype.updateTooltip=function(a,s){var u=a.lngLat,h=a.x,v=a.y;if(this.options.showComponent&&(this.updateComponent(s),this.setPostion(u)),this.currentVisible){var m={type:"tooltip:change",data:s,lngLat:u,x:h,y:v};this.emit("tooltip:change",m)}else{this.showTooltip();var w={type:"tooltip:show",data:s,lngLat:u,x:h,y:v};this.emit("tooltip:show",w)}},l.prototype.showTooltip=function(){this.currentVisible||(this.options.showComponent&&this.scene.addMarker(this.marker),this.currentVisible=!0)},l.prototype.hideTooltip=function(){if(this.currentVisible){this.options.showComponent&&this.marker.remove(),this.currentVisible=!1;var a={type:"tooltip:hide"};this.emit("tooltip:hide",a)}},l.prototype.updateComponent=function(a){(0,Et.Xy)(this.lastComponentOptions,a)||(this.tooltipComponent.update(a),this.lastComponentOptions=a)},l.prototype.setComponent=function(){var a=this.tooltipComponent.getContainer(),s=window.document.createElement("div");s.style.cursor="auto",s.style.userSelect="text",s.className="l7plot-tooltip-container",["mousemove","mousedown","mouseup","click","dblclick"].forEach(function(u){s.addEventListener(u,function(h){return h.stopPropagation()})}),s.appendChild(a),this.marker.setElement(s)},l.prototype.setPostion=function(a){this.marker.setLnglat(a)},l.prototype.destroy=function(){this.unBindInteractionEvent(),this.off(),this.marker.remove(),this.tooltipComponent.destroy()},l}(Ka.Z),$P="l7plot-legend l7plot-legend__category",qP="l7plot-legend__title",KP="l7plot-legend__category-list",lR="l7plot-legend__list-item",cR="l7plot-legend__category-marker",fR="l7plot-legend__category-value",JD='<div class="'.concat($P,`">
|
|
<div class="`).concat(qP,`"></div>
|
|
<ul class="`).concat(KP,`"></ul>
|
|
</div>`),hR='<li class="'.concat(lR,`" data-index={index}>
|
|
<span class="`).concat(cR,`" style="background:{color}"></span>
|
|
<span class="`).concat(fR,`">{value}</span>
|
|
</li>`),Pg,t7=(Pg={},Pg[$P]={visibility:"visible",zIndex:1,backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"rgb(0 0 0 / 16%) 0px 6px 12px 0px",borderRadius:"2px",color:"rgb(87, 87, 87)",fontFamily:ps.fontFamily,padding:"10px 10px 6px 10px",lineHeight:1,fontSize:"12px"},Pg[qP]={fontSize:"13px",lineHeight:"19px",marginBottom:"8px"},Pg[KP]={margin:"0px",listStyleType:"none",padding:"0px"},Pg[lR]={listStyleType:"none",display:"flex",alignItems:"center",marginBottom:"2px"},Pg[cR]={width:"10px",height:"10px"},Pg[fR]={paddingLeft:"8px"},Pg),e7=function(n){(0,k.ZT)(l,n);function l(){return n!==null&&n.apply(this,arguments)||this}return l.prototype.getDefaultOptions=function(){return(0,Et.b$)({},n.prototype.getDefaultOptions.call(this),{id:"l7plot-category-legend",name:"l7plot-category-legend",title:"",items:[],containerTpl:JD,itemTpl:hR,domStyles:t7,className:$P})},l.prototype.initContainer=function(){var a=this.options.customContent;if(a){var s=this.getHtmlContentNode(a),u=this.getParentContainer();return u&&u.appendChild(s),s}else return n.prototype.initContainer.call(this)},l.prototype.initDom=function(){this.cacheDoms()},l.prototype.initEvent=function(){},l.prototype.removeEvent=function(){},l.prototype.cacheDoms=function(){var a=this.container,s=a.getElementsByClassName(qP)[0],u=a.getElementsByClassName(KP)[0];this.titleDom=s,this.listDom=u},l.prototype.render=function(){this.options.customContent?this.renderCustomContent(this.options.customContent):(this.resetTitle(),this.renderItems())},l.prototype.show=function(){var a=this.container;!a||this.destroyed||(0,Ga.Z)(a,{visibility:"visible"})},l.prototype.hide=function(){var a=this.container;!a||this.destroyed||(0,Ga.Z)(a,{visibility:"hidden"})},l.prototype.updateInner=function(a){this.options.customContent?this.renderCustomContent(this.options.customContent):(a.title&&this.resetTitle(),a.items&&this.renderItems()),n.prototype.updateInner.call(this,a)},l.prototype.renderCustomContent=function(a){var s=this.container.parentNode,u=this.getHtmlContentNode(a),h=this.container;s&&s.replaceChild(u,h),this.container=u,this.applyStyles()},l.prototype.getHtmlContentNode=function(a){var s,u=a(this.options.title||"",this.options.items);return(0,Et.HD)(u)?s=this.createDom(u):s=u,s},l.prototype.resetTitle=function(){var a=this.options.title;a?(this.showTitle(),this.setTitle(a)):this.hideTitle()},l.prototype.showTitle=function(){var a=this.titleDom;a&&(0,Ga.Z)(a,{display:"block"})},l.prototype.hideTitle=function(){var a=this.titleDom;a&&(0,Ga.Z)(a,{display:"none"})},l.prototype.setTitle=function(a){var s=this.titleDom;s&&(s.innerHTML=a)},l.prototype.renderItems=function(){var a=this;this.clearItemDoms();var s=this.options.items.length>30?this.options.items.slice(0,30):this.options.items,u=this.options.itemTpl||hR,h=this.listDom;h&&(s.forEach(function(v){var m=v.value==="",w=m?"\u2014":Array.isArray(v.value)?v.value.join(" - "):v.value,A=(0,k.pi)((0,k.pi)({},v),{value:w}),R=(0,Et.ng)(u,A),B=a.createDom(R);h.appendChild(B)}),this.applyChildrenStyles(h,this.options.domStyles))},l.prototype.clearItemDoms=function(){this.listDom&&a_(this.listDom)},l.prototype.clear=function(){this.setTitle(""),this.clearItemDoms()},l}(o2),QP="l7plot-legend l7plot-legend__continue",JP="l7plot-legend__title",pR="l7plot-legend__ribbon-container",dR="l7plot-legend__ribbon",vR="l7plot-legend__gradient-bar",tO="l7plot-legend__value-range",r7='<div class="'.concat(QP,`">
|
|
<div class="`).concat(JP,`"></div>
|
|
<div class="`).concat(pR,`"></div>
|
|
</div>`),gR='<div class="'.concat(dR,`">
|
|
<span class="`).concat(tO,`">{min}</span>
|
|
<div class="`).concat(vR,`" style="background-image: {backgroundImage}"></div>
|
|
<span class="`).concat(tO,`">{max}</span>
|
|
</div>`),ay,n7=(ay={},ay[QP]={visibility:"visible",zIndex:1,backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"rgb(0 0 0 / 16%) 0px 6px 12px 0px",borderRadius:"2px",color:"rgb(87, 87, 87)",fontFamily:ps.fontFamily,padding:"10px",lineHeight:1,fontSize:"12px"},ay[JP]={fontSize:"13px",lineHeight:"19px",marginBottom:"8px"},ay[dR]={display:"flex",alignItems:"center"},ay[vR]={width:"140px",height:"14px",margin:"0px 5px"},ay[tO]={padding:"0px"},ay),i7=function(n){(0,k.ZT)(l,n);function l(){return n!==null&&n.apply(this,arguments)||this}return l.prototype.getDefaultOptions=function(){return(0,Et.b$)({},n.prototype.getDefaultOptions.call(this),{id:"l7plot-continue-legend",name:"l7plot-continue-legend",title:"",containerTpl:r7,ribbonTpl:gR,domStyles:n7,className:QP})},l.prototype.initContainer=function(){var a=this.options.customContent;if(a){var s=this.getHtmlContentNode(a),u=this.getParentContainer();return u&&u.appendChild(s),s}else return n.prototype.initContainer.call(this)},l.prototype.initDom=function(){this.cacheDoms()},l.prototype.initEvent=function(){},l.prototype.removeEvent=function(){},l.prototype.cacheDoms=function(){var a=this.container,s=a.getElementsByClassName(JP)[0],u=a.getElementsByClassName(pR)[0];this.titleDom=s,this.ribbonContainerDom=u},l.prototype.render=function(){this.options.customContent?this.renderCustomContent(this.options.customContent):(this.resetTitle(),this.renderRibbon())},l.prototype.show=function(){var a=this.container;!a||this.destroyed||(0,Ga.Z)(a,{visibility:"visible"})},l.prototype.hide=function(){var a=this.container;!a||this.destroyed||(0,Ga.Z)(a,{visibility:"hidden"})},l.prototype.updateInner=function(a){this.options.customContent?this.renderCustomContent(this.options.customContent):(a.title&&this.resetTitle(),a.colors&&this.renderRibbon()),n.prototype.updateInner.call(this,a)},l.prototype.renderCustomContent=function(a){var s=this.container.parentNode,u=this.getHtmlContentNode(a),h=this.container;s&&s.replaceChild(u,h),this.container=u,this.applyStyles()},l.prototype.getHtmlContentNode=function(a){var s,u=a(this.options.title||"",this.options.min,this.options.max,this.options.colors);return(0,Et.HD)(u)?s=this.createDom(u):s=u,s},l.prototype.resetTitle=function(){var a=this.options.title;a?(this.showTitle(),this.setTitle(a)):this.hideTitle()},l.prototype.showTitle=function(){var a=this.titleDom;a&&(0,Ga.Z)(a,{display:"block"})},l.prototype.hideTitle=function(){var a=this.titleDom;a&&(0,Ga.Z)(a,{display:"none"})},l.prototype.setTitle=function(a){var s=this.titleDom;s&&(s.innerHTML=a)},l.prototype.renderRibbon=function(){this.clearRibbonContainerDoms();var a=this.options,s=a.min,u=a.max,h=a.colors,v=a.ribbonTpl,m=v===void 0?gR:v,w=this.ribbonContainerDom;if(w){var A="linear-gradient(to right, ".concat(h.join(", "),")"),R={min:s,max:u,backgroundImage:A},B=(0,Et.ng)(m,R),G=this.createDom(B);w.appendChild(G),this.applyChildrenStyles(w,this.options.domStyles)}},l.prototype.clearRibbonContainerDoms=function(){this.ribbonContainerDom&&a_(this.ribbonContainerDom)},l.prototype.clear=function(){this.setTitle(""),this.clearRibbonContainerDoms()},l}(o2),a7=function(n){(0,k.ZT)(l,n);function l(a){var s=n.call(this,a)||this;return s.legendComponents=[],s.options=a,s.legendComponents=s.initLegendComponents(a.items),s}return l.prototype.initLegendComponents=function(a){for(var s=[],u=0;u<a.length;u++){var h=a[u];if(h.type==="category"){var v=new e7({title:h.options.title,items:h.options.items,className:h.options.className,customContent:h.options.customContent,domStyles:h.options.domStyles});s.push(v)}else if(h.type==="continue"){var v=new i7({title:h.options.title,min:h.options.min,max:h.options.max,colors:h.options.colors,className:h.options.className,customContent:h.options.customContent,domStyles:h.options.domStyles});s.push(v)}}return s},l.prototype.getDefaultOptions=function(){return{position:"bottomleft"}},l.prototype.onAdd=function(){var a=window.document.createElement("div");return a.className="l7plot-legend-container",this.legendComponents.forEach(function(s){var u=s.getContainer();a.appendChild(u)}),a},l.prototype.onRemove=function(){this.legendComponents.forEach(function(a){a.destroy()})},l}(Yd),l_;(function(n){n.Amap="amap",n.Mapbox="mapbox"})(l_||(l_={}));var mR=function(n){(0,k.ZT)(l,n);function l(a,s){a===void 0&&(a=[]),s===void 0&&(s={});var u=n.call(this)||this;return u.name=s.name?s.name:(0,Et.EL)("layerGroup"),u.layers=a,u}return l.prototype.addTo=function(a){var s=this;this.scene=a;var u=0,h=this.layers.length;this.layers.forEach(function(v){v.once("inited",function(m){u++,s.emit("inited",m),u===h&&s.emit("inited-all")}),v.addTo(a)})},l.prototype.hasLayer=function(a){return this.layers.some(function(s){return s===a})},l.prototype.addLayer=function(a){var s=this;this.layers.push(a),this.scene&&(a.once("inited",function(u){return s.emit("inited",u)}),a.addTo(this.scene))},l.prototype.removeLayer=function(a){var s=this.layers.findIndex(function(u){return u===a});return s===-1?!1:(this.layers.splice(s,1),this.scene&&a.remove(this.scene),!0)},l.prototype.getLayers=function(){return this.layers},l.prototype.getInteractionLayers=function(){return this.layers.filter(function(a){var s=a.interaction;return s})},l.prototype.getLayer=function(a){return this.layers.find(function(s){var u=s.layer;return u.id===a})},l.prototype.getLayerByName=function(a){return this.layers.find(function(s){return s.name===a})},l.prototype.removeAllLayer=function(){var a=this;this.layers.forEach(function(s){a.scene&&s.remove(a.scene)}),this.layers=[]},l.prototype.isEmpty=function(){return this.layers.length===0},l}(Ka.Z),o7=[{original:"loaded",adaptation:"scene-loaded"},{original:"resize",adaptation:"resize"},{original:"destroy",adaptation:"destroy"},{original:"resize",adaptation:"resize"}],s7=["mapmove","movestart","moveend","zoomchange","zoomstart","zoomend","click","dblclick","contextmenu","mousemove","mousewheel","mouseover","mouseout","mouseup","mousedown","dragstart","dragging","dragend"],MT=["inited","add","remove","dataUpdate","click","unclick","contextmenu","uncontextmenu","mouseenter","mousemove","unmousemove","mouseout","mouseup","unmouseup","mousedown","uncontextmenu","unpick"],oy=new Map;function l8(n,l){oy.set(n,l)}function c8(n){n.forEach(function(l){oy.set(l.id,l.image)})}function f8(n){return oy.get(n)}function h8(n){return oy.has(n)}function p8(n){return oy.delete(n)}var IT=new Map;function d8(n,l){IT.set(n,l)}function v8(n){return IT.delete(n)}var p2=new Map;function g8(n,l){p2.set(n,l)}function m8(n){n.forEach(function(l){p2.set(l.name,l.fontUnicode)})}function y8(n){return p2.delete(n)}var c_=nt(84593),f_=nt(52789),d2=nt(34996);function yR(n){var l,a,s,u={point:{default:{fill:n.pointFillColor,size:n.pointSize,stroke:n.pointBorderColor,lineWidth:n.pointBorder,fillOpacity:n.pointFillOpacity},active:{fill:n.pointActiveFillColor},selected:{fill:n.pointSelectedFillColor}}};return{mapStyle:n.mapStyle,defaultColor:n.brandColor,subColor:n.subColor,semanticRed:n.paletteSemanticRed,semanticGreen:n.paletteSemanticGreen,fontFamily:n.fontFamily,colors10:n.paletteQualitative10,colors20:n.paletteQualitative20,sequenceColors:n.paletteSequence,shapes:{point:["circle","square"],line:["line"]},sizes:[1,10],geometries:{point:{circle:{default:{style:u.point.default},active:{style:u.point.active},selected:{style:u.point.selected}}},line:{},polygon:{}},components:{legend:{category:{domStyles:(l={},l[f_.rC]={visibility:"visible",zIndex:1,backgroundColor:n.legendContainerFillColor,boxShadow:n.legendContainerShadow,borderRadius:"".concat(n.legendContainerBorderRadius,"px"),color:n.legendTextFillColor,fontFamily:n.fontFamily,padding:"10px",lineHeight:"1",fontSize:"".concat(n.legendTextFontSize,"px")},l[f_.O6]={fontSize:"13px",lineHeight:"19px",marginBottom:"8px"},l[f_.fL]={margin:"0px",padding:"0px"},l[f_.jp]={marginBottom:"2px"},l[f_.Bc]={width:"10px",height:"10px"},l[f_.Tf]={paddingLeft:"8px"},l)},continue:{domStyles:(a={},a[d2.rC]={visibility:"visible",zIndex:1,backgroundColor:n.legendContainerFillColor,boxShadow:n.legendContainerShadow,borderRadius:"".concat(n.legendContainerBorderRadius,"px"),color:n.legendTextFillColor,fontFamily:n.fontFamily,padding:"10px",lineHeight:1,fontSize:"".concat(n.legendTextFontSize,"px")},a[d2.O6]={fontSize:"13px",lineHeight:"19px",marginBottom:"8px"},a[d2.el]={display:"flex",alignItems:"center"},a[d2.bl]={width:"140px",height:"14px",margin:"0px 5px"},a[d2.VI]={padding:"0px"},a)}},tooltip:{domStyles:(s={},s[c_.rC]={visibility:"visible",zIndex:999,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:n.tooltipContainerFillColor,boxShadow:n.tooltipContainerShadow,borderRadius:"".concat(n.tooltipContainerBorderRadius,"px"),color:n.tooltipTextFillColor,fontSize:"".concat(n.tooltipTextFontSize,"px"),fontFamily:n.fontFamily,lineHeight:n.tooltipTextLineHeight},s[c_.O6]={marginBottom:"4px"},s[c_.fL]={margin:"0px",padding:"0px"},s[c_.jp]={marginBottom:"4px"},s[c_.bX]={color:n.tooltipItemNameFillColor},s[c_.Tf]={color:n.tooltipItemValueFillColor,marginLeft:"30px"},s)},label:{style:{textAnchor:"center",textOffset:[0,0],fill:n.labelFillColor,fontSize:n.labelFontSize,fontFamily:n.fontFamily,fillColorDark:n.labelFillColorDark,fillColorLight:n.labelFillColorLight}}}}}var sy={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},u7={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},l7=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],c7=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],f7=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],_R=function(n){n===void 0&&(n={});var l=n.mapStyle,a=l===void 0?"light":l,s=n.subColor,u=s===void 0?"rgba(0,0,0,0.05)":s,h=n.paletteQualitative10,v=h===void 0?l7:h,m=n.paletteQualitative20,w=m===void 0?c7:m,A=n.paletteSemanticRed,R=A===void 0?"#F4664A":A,B=n.paletteSemanticGreen,G=B===void 0?"#30BF78":B,j=n.paletteSemanticYellow,lt=j===void 0?"#FAAD14":j,ct=n.paletteSequence,_t=ct===void 0?f7:ct,Vt=n.fontFamily,ce=Vt===void 0?`"-apple-system", "Segoe UI", Roboto, "Helvetica Neue", Arial,
|
|
"Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
|
|
"Noto Color Emoji"`:Vt,ae=n.brandColor,ze=ae===void 0?v[0]:ae;return{mapStyle:a,brandColor:ze,subColor:u,paletteQualitative10:v,paletteQualitative20:w,paletteSemanticRed:R,paletteSemanticGreen:G,paletteSemanticYellow:lt,paletteSequence:_t,fontFamily:ce,legendContainerFillColor:"rgba(255, 255, 255, 0.85)",legendContainerShadow:"0 2px 8px 0 rgba(166, 166, 166, 0.20)",legendContainerBorderRadius:2,legendTextFillColor:sy[65],legendTextFontSize:12,tooltipContainerFillColor:"rgba(255, 255, 255, 0.9)",tooltipContainerShadow:"rgb(0 0 0 / 16%) 0px 6px 12px 0px",tooltipContainerBorderRadius:2,tooltipTextFillColor:sy[65],tooltipItemNameFillColor:sy[65],tooltipItemValueFillColor:sy[65],tooltipTextFontSize:12,tooltipTextLineHeight:"20px",labelFillColor:sy[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,pointFillColor:ze,pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:u7[100],pointActiveBorderColor:sy[100],pointSelectedBorderColor:sy[100]}},_8=_R(),h7={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},uy={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},xR=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E86452","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],p7=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#E86452","#F8D0CB","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],d7=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],bR=function(n){n===void 0&&(n={});var l=n.mapStyle,a=l===void 0?"dark":l,s=n.subColor,u=s===void 0?"rgba(255,255,255,0.05)":s,h=n.paletteQualitative10,v=h===void 0?xR:h,m=n.paletteQualitative20,w=m===void 0?p7:m,A=n.paletteSemanticRed,R=A===void 0?"#F4664A":A,B=n.paletteSemanticGreen,G=B===void 0?"#30BF78":B,j=n.paletteSemanticYellow,lt=j===void 0?"#FAAD14":j,ct=n.paletteSequence,_t=ct===void 0?d7:ct,Vt=n.fontFamily,ce=Vt===void 0?`"-apple-system", "Segoe UI", Roboto, "Helvetica Neue", Arial,
|
|
"Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
|
|
"Noto Color Emoji"`:Vt,ae=n.brandColor,ze=ae===void 0?v[0]:ae;return{mapStyle:a,brandColor:ze,subColor:u,paletteQualitative10:v,paletteQualitative20:w,paletteSemanticRed:R,paletteSemanticGreen:G,paletteSemanticYellow:lt,paletteSequence:_t,fontFamily:ce,legendContainerFillColor:"rgba(31, 31, 31, 0.85)",legendContainerShadow:"0 2px 8px 0 rgba(166, 166, 166, 0.20)",legendContainerBorderRadius:2,legendTextFillColor:uy[65],legendTextFontSize:12,tooltipContainerFillColor:"rgba(31, 31, 31, 0.9)",tooltipContainerShadow:"0px 2px 4px rgba(0, 0, 0, 0.5)",tooltipContainerBorderRadius:2,tooltipTextFillColor:uy[65],tooltipItemNameFillColor:uy[65],tooltipItemValueFillColor:uy[65],tooltipTextFontSize:12,tooltipTextLineHeight:"20px",labelFillColor:uy[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,pointFillColor:xR[0],pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:h7[100],pointActiveBorderColor:uy[100],pointSelectedBorderColor:uy[100]}},x8=bR();function ER(n){var l=n.styleSheet,a=l===void 0?{}:l,s=(0,k._T)(n,["styleSheet"]),u=_R(a);return(0,Et.b$)({},yR(u),s)}function v7(n){var l=n.styleSheet,a=l===void 0?{}:l,s=(0,k._T)(n,["styleSheet"]),u=bR(a);return(0,Et.b$)({},yR(u),s)}var wR=ER({}),g7=v7({}),eO={default:wR,light:wR,dark:g7};function rO(n){return n===void 0&&(n="default"),(0,Et.U2)(eO,(0,Et.vl)(n),eO.default)}function b8(n,l,a){a===void 0&&(a="light"),eO[lowerCase(n)]=a==="light"?createTheme(l):createDarkTheme(l)}var SR={map:{type:l_.Amap},logo:!0},m7=function(n){(0,k.ZT)(l,n);function l(a){var s=n.call(this)||this;return s.inited=!1,s.sceneLoaded=!1,s.layersLoaded=!1,s.loaded=!1,s.layerGroup=new mR,s.options=wp({},s.getDefaultOptions(),a),s.lastOptions=s.options,s}return l.prototype.getDefaultOptions=function(){return l.DefaultOptions},l.prototype.createContainer=function(a){var s=this.options,u=s.width,h=s.height,v=typeof a=="string"?document.getElementById(a):a;return v.style.position||(v.style.position="relative"),u&&(v.style.width||(v.style.width="".concat(u,"px"))),h&&(v.style.height||(v.style.height="".concat(h,"px"))),v},l.prototype.createTheme=function(){var a=(0,Et.Kn)(this.options.theme)?wp({},rO("default"),ER(this.options.theme)):rO(this.options.theme);return a},l.prototype.createMap=function(){var a=this.options.map?this.options.map:SR.map,s=a.type,u=(0,k._T)(a,["type"]),h=Object.assign({style:this.theme.mapStyle},u);return s===l_.Amap?new _(h):new Ro(h)},l.prototype.createScene=function(){var a=this.options,s=a.logo,u=a.antialias,h=a.preserveDrawingBuffer,v=(0,Et.jn)(s)?{logoVisible:s}:{logoVisible:s==null?void 0:s.visible,logoPosition:s==null?void 0:s.position},m=Object.assign({antialias:u,preserveDrawingBuffer:h},v),w=this.createMap(),A=new AP((0,k.pi)({id:this.container,map:w},m));return A},l.prototype.registerResources=function(){var a=this;oy.size&&oy.forEach(function(s,u){!a.scene.hasImage(u)&&a.scene.addImage(u,s)}),IT.size&&IT.forEach(function(s,u){a.scene.addFontFace(u,s)}),p2.size&&p2.forEach(function(s,u){a.scene.addIconFont(u,s)})},l.prototype.update=function(a){this.updateOption(a),a.map&&!(0,Et.Xy)(this.lastOptions.map,this.options.map)&&this.updateMap(a.map),this.render(),this.emit("update")},l.prototype.updateOption=function(a){this.lastOptions=this.options,this.options=wp({},this.options,a)},l.prototype.updateMap=function(a){var s;if(this.scene){var u=a.style,h=a.center,v=a.zoom,m=a.rotation,w=a.pitch;(0,Et.o8)(w)||this.scene.setPitch(w),(0,Et.o8)(m)||this.scene.setRotation(m),u&&u!==((s=this.lastOptions.map)===null||s===void 0?void 0:s.style)&&this.scene.setMapStyle(u),v&&h&&this.scene.setZoomAndCenter(v,h)}},l.prototype.changeSize=function(a,s){this.options.width===a&&this.options.height===s||(this.container.style.width="".concat(a,"px"),this.container.style.height="".concat(s,"px"),this.options=Object.assign(this.options,{width:a,height:s}))},l.prototype.on=function(a,s,u){return this.proxyEventHander("on",a,s,u),this},l.prototype.once=function(a,s){return this.proxyEventHander("once",a,s),this},l.prototype.off=function(a,s){return this.proxyEventHander("off",a,s),this},l.prototype.proxyEventHander=function(a,s,u,h){var v=o7.find(function(B){return B.adaptation===s});if(v)this.scene[a](v.original,u);else if(s7.indexOf(s)!==-1)this.scene[a](s,u);else if(s.includes("Layer:")){var m=(0,k.CR)(s.split(":"),2),w=m[0],A=m[1],R=this[w]&&this[w][a];if(R&&MT.indexOf(A)!==-1)this[w][a](A,u);else throw new Error('No event name "'.concat(s,'"'))}else n.prototype[a].call(this,s,u,h)},l.prototype.getScene=function(){return this.scene},l.prototype.getMap=function(){var a,s;return((a=this.options.map)===null||a===void 0?void 0:a.type)===l_.Amap?this.scene.map:((s=this.options.map)===null||s===void 0?void 0:s.type)===l_.Mapbox?this.scene.map:this.scene.map},l.prototype.addLayer=function(a){this.layerGroup.addLayer(a)},l.prototype.getLayes=function(){return console.warn("Replace to use getLayers()"),this.getLayers()},l.prototype.getLayers=function(){return this.layerGroup.getLayers()},l.prototype.getLayerByName=function(a){return this.layerGroup.getLayerByName(a)},l.prototype.removeLayer=function(a){return this.layerGroup.removeLayer(a)},l.prototype.removeAllLayer=function(){this.layerGroup.removeAllLayer()},l.prototype.zoomIn=function(){this.scene.zoomIn()},l.prototype.zoomOut=function(){this.scene.zoomOut()},l.prototype.setPitch=function(a){this.scene.setPitch(a)},l.prototype.fitBounds=function(a){this.scene.fitBounds(a)},l.prototype.setMapStatus=function(a){this.scene.setMapStatus(a)},l.prototype.setBgColor=function(a){this.scene.setBgColor(a)},l.prototype.initComponents=function(){this.initControls(),this.initTooltip()},l.prototype.updateComponents=function(){this.updateControls(),this.initTooltip()},l.prototype.initControls=function(){var a=this,s=this.options,u=s.zoom,h=s.scale,v=s.layerMenu,m=s.legend;h&&this.addScaleControl(h),u&&this.addZoomControl(u),v&&this.addLayerMenuControl(v),m&&setTimeout(function(){a.addLegendControl(m),a.emit("add-legend")},1e3)},l.prototype.updateControls=function(){var a=this.options,s=a.zoom,u=a.scale,h=a.layerMenu,v=a.legend;(0,Et.Xy)(this.lastOptions.zoom,s)||(s?this.updateZoomControl(s):this.removeZoomControl()),(0,Et.Xy)(this.lastOptions.scale,u)||(u?this.updateScaleControl(u):this.removeScaleControl()),(0,Et.Xy)(this.lastOptions.layerMenu,h)||(h?this.updateLayerMenuControl(h):this.removeLayerMenuControl()),(0,Et.Xy)(this.lastOptions.legend,v)||(v?this.updateLegendControl(v):this.removeLegendControl())},l.prototype.addZoomControl=function(a){this.zoomControl||(this.zoomControl=new A3(a),this.scene.addControl(this.zoomControl))},l.prototype.updateZoomControl=function(a){if(!this.zoomControl){this.addZoomControl(a);return}this.removeZoomControl(),this.addZoomControl(a)},l.prototype.removeZoomControl=function(){this.zoomControl&&(this.zoomControl.remove(),this.zoomControl=void 0)},l.prototype.addScaleControl=function(a){this.scaleControl||(this.scaleControl=new M3(a),this.scene.addControl(this.scaleControl))},l.prototype.updateScaleControl=function(a){if(!this.scaleControl){this.addScaleControl(a);return}this.removeScaleControl(),this.addScaleControl(a)},l.prototype.removeScaleControl=function(){this.scaleControl&&(this.scaleControl.remove(),this.scaleControl=void 0)},l.prototype.addLayerMenuControl=function(a){var s={},u={};this.layerGroup.getLayers().forEach(function(h){var v=h.name,m=h.layer;u[v]=m})},l.prototype.updateLayerMenuControl=function(a){this.removeLayerMenuControl(),this.addLayerMenuControl(a)},l.prototype.removeLayerMenuControl=function(){},l.prototype.getLegendOptions=function(){return{}},l.prototype.addLegendControl=function(a){if(!this.legendControl){var s=this.theme.components.legend,u=wp({},this.getLegendOptions(),a),h=u.type,v=u.position,m=(0,k._T)(u,["type","position"]),w=[];if(h==="category"){var A=wp({},{domStyles:s.category.domStyles},m);w.push({type:h,options:A})}else if(h==="continue"){var R=wp({},{domStyles:s.continue.domStyles},m);w.push({type:h,options:R})}w.length&&(this.legendControl=new a7({position:v,items:w}),this.scene.addControl(this.legendControl))}},l.prototype.updateLegendControl=function(a){if(!this.legendControl){this.addLegendControl(a);return}this.removeLegendControl(),this.addLegendControl(a)},l.prototype.removeLegendControl=function(){this.legendControl&&(this.legendControl.remove(),this.legendControl=void 0)},l.prototype.initTooltip=function(){var a=this;this.tooltip&&this.tooltip.destroy();var s=this.options.tooltip;if(s){var u=wp({},{domStyles:this.theme.components.tooltip.domStyles},s),h=this.layerGroup.getInteractionLayers();this.tooltip=new QD(this.scene,h,u),this.tooltip.on("*",function(v){return a.emit(v.type,v)})}},l.prototype.exportPng=function(a){return this.scene.exportPng(a)},l.prototype.destroy=function(){var a;n.prototype.off.call(this,"*"),this.removeScaleControl(),this.removeZoomControl(),this.removeLayerMenuControl(),this.removeLegendControl(),(a=this.tooltip)===null||a===void 0||a.destroy(),this.scene.destroy()},l.DefaultOptions=SR,l}(Ka.Z),CR;(function(n){n[n.solid=0]="solid",n[n.dash=1]="dash"})(CR||(CR={}));var nO;(function(n){n.TextLayer="textLayer",n.DotLayer="dotLayer",n.IconLayer="iconLayer",n.DotDensity="dotDensityLayer",n.ColumnLayer="columnLayer",n.HeatmapLayer="heatmapLayer",n.GridLayer="gridLayer",n.HexbinLayer="hexbinLayer",n.LinesLayer="linesLayer",n.PathLayer="pathLayer",n.ArcLayer="arcLayer",n.AreaLayer="areaLayer",n.PrismLayer="prismLayer"})(nO||(nO={}));var iO=function(){function n(){}return n.aggregation=function(l,a){var s=a.type,u=s===void 0?"grid":s,h=a.radius,v=a.method,m=a.field,w={type:u,size:h,method:v,field:m};l.transforms?(l.transforms=l.transforms.filter(function(A){return A.type!==w.type}),l.transforms.push(w)):l.transforms=[w]},n}(),AR=["name","zIndex","visible","minZoom","maxZoom","pickingBuffer","autoFit","blend"],h_=function(n){(0,k.ZT)(l,n);function l(a){var s=n.call(this)||this;return s.options=wp({},s.getDefaultOptions(),a),s.lastOptions=s.options,s}return l.prototype.getDefaultOptions=function(){return{}},l.prototype.pickLayerConfig=function(a){var s=(0,Et.ei)(a,AR);return s},l.prototype.addTo=function(a){a.addLayer(this.layer)},l.prototype.remove=function(a){a.removeLayer(this.layer)},l.prototype.update=function(a){this.updateOption(a),this.updateConfig(a)},l.prototype.updateOption=function(a){this.lastOptions=this.options,this.options=wp({},this.options,a)},l.prototype.updateConfig=function(a){!(0,Et.o8)(a.zIndex)&&!(0,Et.Xy)(this.lastOptions.zIndex,this.options.zIndex)&&this.setIndex(a.zIndex),!(0,Et.o8)(a.blend)&&!(0,Et.Xy)(this.lastOptions.blend,this.options.blend)&&this.setBlend(a.blend),!(0,Et.o8)(a.minZoom)&&!(0,Et.Xy)(this.lastOptions.minZoom,this.options.minZoom)&&this.setMinZoom(a.minZoom),!(0,Et.o8)(a.maxZoom)&&!(0,Et.Xy)(this.lastOptions.maxZoom,this.options.maxZoom)&&this.setMinZoom(a.maxZoom),!(0,Et.o8)(a.visible)&&!(0,Et.Xy)(this.lastOptions.visible,this.options.visible)&&(a.visible?this.show():this.hide())},l.prototype.render=function(){this.layer.renderLayers()},l.prototype.setSource=function(a){if(a instanceof T0)this.layer.setSource(a);else{var s=a.data,u=a.aggregation,h=(0,k._T)(a,["data","aggregation"]);u&&iO.aggregation(h,u);var v=this.layer.getSource();v?this.layer.setData(s,h):this.layer.source(s,h)}},l.prototype.changeData=function(a){this.setSource(a)},l.prototype.setIndex=function(a){this.layer.setIndex(a)},l.prototype.setBlend=function(a){this.layer.setBlend(a)},l.prototype.setMinZoom=function(a){this.layer.setMinZoom(a)},l.prototype.setMaxZoom=function(a){this.layer.setMaxZoom(a)},l.prototype.show=function(){this.layer.inited&&this.layer.show()},l.prototype.hide=function(){this.layer.inited&&this.layer.hide()},l.prototype.toggleVisible=function(){this.isVisible()?this.hide():this.show()},l.prototype.isVisible=function(){return this.layer.inited?this.layer.isVisible():this.options.visible},l.prototype.fitBounds=function(a){this.layer.fitBounds(a)},l.prototype.on=function(a,s){return MT.indexOf(a)!==-1?this.layer.on(a,s):n.prototype.on.call(this,a,s),this},l.prototype.once=function(a,s){return MT.indexOf(a)!==-1?this.layer.once(a,s):n.prototype.once.call(this,a,s),this},l.prototype.off=function(a,s){return MT.indexOf(a)!==-1?this.layer.off(a,s):n.prototype.off.call(this,a,s),this},l.LayerType=nO,l.LayerConfigkeys=AR,l}(Ka.Z);function ly(n,l){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var u={};return n.forEach(function(h,v){u[h]=a[v]}),delete u.undefined,l(u)}}var sl=function(){function n(){}return n.shape=function(l,a){if((0,Et.HD)(a))l.shape(a);else if((0,Et.mf)(a)){var s=[];l.shape(s.join("*"),ly(s,a))}else if((0,Et.Kn)(a)){var u=a.field?a.field:"";if((0,Et.mf)(a.value)){var s=(0,Et.kJ)(u)?u:u.split("*");l.shape(u,ly(s,a.value))}else l.shape(u,a.value);(0,Et.HD)(u)&&a.scale&&n.scale(l,u,a.scale)}},n.size=function(l,a){if((0,Et.hj)(a))l.size(a);else if((0,Et.kJ)(a))l.size(a);else if((0,Et.mf)(a)){var s=[];l.size(s.join("*"),ly(s,a))}else if((0,Et.Kn)(a)){var u=a.field?a.field:"";if((0,Et.mf)(a.value)){var s=(0,Et.kJ)(u)?u:u.split("*");l.size(u,ly(s,a.value))}else l.size(u,a.value);(0,Et.HD)(u)&&a.scale&&n.scale(l,u,a.scale)}},n.color=function(l,a){if((0,Et.HD)(a))l.color(a);else if((0,Et.mf)(a)){var s=[];l.color(s.join("*"),ly(s,a))}else if((0,Et.Kn)(a)){var u=a.field?a.field:"";if((0,Et.mf)(a.value)){var s=(0,Et.kJ)(u)?u:u.split("*");l.color(u,ly(s,a.value))}else l.color(u,a.value);(0,Et.HD)(u)&&a.scale&&n.scale(l,u,a.scale)}},n.style=function(l,a){a&&l.style(a)},n.state=function(l,a){var s=a.active,u=a.select;s&&l.active(s),u&&l.select(u)},n.rotate=function(l,a){(0,Et.HD)(a)||(0,Et.mf)(a)||(0,Et.Kn)(a)},n.texture=function(l,a){(0,Et.HD)(a)&&l.texture(a)},n.animate=function(l,a){((0,Et.jn)(a)||(0,Et.Kn)(a))&&l.animate(a)},n.scale=function(l,a,s){l.scale(a,s)},n.filter=function(l,a){var s=a.field?a.field:"",u=(0,Et.kJ)(s)?s:s.split("*");l.filter(u.join("*"),ly(u,a.value))},n}();function y7(n,l){var a=l.field,s=l.content,u=l.style,h=u===void 0?{}:u,v=l.state,m=h.fontSize,w=h.fill,A=a||s||"",R={field:A,value:"text"};sl.shape(n,R),m&&sl.size(n,m),w&&sl.color(n,w),h&&sl.style(n,h),v&&sl.state(n,v)}var TR={style:{fontSize:12}},_7=[],x7=function(n){(0,k.ZT)(l,n);function l(a){var s=n.call(this,a)||this;s.type=h_.LayerType.TextLayer,s.interaction=!1;var u=s.options,h=u.name,v=u.source,m=s.pickLayerConfig(s.options);return s.name=h||(0,Et.EL)(s.type),s.layer=new m1((0,k.pi)((0,k.pi)({},m),{name:s.name})),s.mappingLayer(s.layer,s.options),s.setSource(v),s}return l.prototype.getDefaultOptions=function(){return TR},l.prototype.mappingLayer=function(a,s){y7(a,s)},l.prototype.update=function(a){n.prototype.update.call(this,a),this.mappingLayer(this.layer,this.options)},l.DefaultOptions=TR,l.LayerOptionsKeys=h_.LayerConfigkeys.concat(_7),l}(h_),aO;(function(n){n.Dot="dot",n.DotDensity="dotDensity",n.Heatmap="heatmap",n.Grid="grid",n.Hexbin="hexbin",n.Path="path",n.Flow="flow",n.Area="area",n.Choropleth="choropleth"})(aO||(aO={}));var b7={autoFit:!1},oO=function(n){(0,k.ZT)(l,n);function l(a,s){var u=this;if(typeof a=="string"||a instanceof Element){if(s===void 0)throw new Error("options is undefined");u=n.call(this,s)||this,u.container=u.createContainer(a),u.theme=u.createTheme(),u.scene=u.createScene(),u.registerResources(),u.initSource()}else u=n.call(this,a)||this;return u}return l.prototype.initSource=function(){this.source=this.createSource(),this.render(),this.inited=!0},l.prototype.initLayersEvent=function(){},l.prototype.getDefaultOptions=function(){return l.DefaultOptions},l.prototype.createSource=function(){var a=this.options.source,s=a.data,u=a.aggregation,h=(0,k._T)(a,["data","aggregation"]);u&&iO.aggregation(h,u);var v=new T0(s,h);return v},l.prototype.createLabelLayer=function(a,s,u){var h=u||{},v=h.visible,m=h.minZoom,w=h.maxZoom,A=h.zIndex,R=A===void 0?0:A,B=new x7((0,k.pi)({name:"labelLayer",visible:v,minZoom:m,maxZoom:w,zIndex:R+.1,source:a},s));return B},l.prototype.updateLabelLayer=function(a,s,u,h){s?h?h.update((0,k.pi)({},s)):(h=this.createLabelLayer(a,s,u),this.layerGroup.addLayer(h)):s===!1&&h&&this.layerGroup.removeLayer(h)},l.prototype.render=function(){var a=this,s=this.createLayers(this.source);this.inited?(this.layerGroup.removeAllLayer(),s.addTo(this.scene),this.layerGroup=s):(this.layerGroup=s,this.scene.sceneService.loaded?this.onSceneLoaded():this.scene.once("loaded",function(){a.onSceneLoaded()})),this.initLayersEvent()},l.prototype.onSceneLoaded=function(){var a=this;this.sceneLoaded=!0,this.layerGroup.isEmpty()?this.onLayersLoaded():this.layerGroup.once("inited-all",function(){a.onLayersLoaded()}),this.layerGroup.addTo(this.scene)},l.prototype.onLayersLoaded=function(){this.layersLoaded=!0,this.initComponents(),this.loaded=!0,this.emit("loaded")},l.prototype.attachToScene=function(a,s){this.scene=a,this.theme=s||rO("default"),this.registerResources(),this.initSource()},l.prototype.unattachFromScene=function(){var a;this.removeAllLayer(),(a=this.tooltip)===null||a===void 0||a.destroy()},l.prototype.addToScene=function(a){this.attachToScene(a)},l.prototype.removeFromScene=function(){var a;this.removeAllLayer(),this.removeScaleControl(),this.removeZoomControl(),this.removeLayerMenuControl(),this.removeLegendControl(),(a=this.tooltip)===null||a===void 0||a.destroy()},l.prototype.update=function(a){if(this.updateOption(a),a.map&&!(0,Et.Xy)(this.lastOptions.map,this.options.map)&&this.updateMap(a.map),this.scene.setEnableRender(!1),a.source&&!(0,Et.Xy)(this.lastOptions.source,this.options.source)){var s=a.source,u=s.data,h=(0,k._T)(s,["data"]);this.changeData(u,h)}this.scene.setEnableRender(!0),this.render(),this.updateComponents(),this.emit("update")},l.prototype.changeData=function(a,s){var u=this;this.options.source=wp({},this.options.source,(0,k.pi)({data:a},s));var h=this.options.source,v=h.aggregation,m=(0,k._T)(h,["aggregation"]);v&&iO.aggregation(m,v),this.source.setData(this.options.source.data,m);var w=this.options.legend;w&&setTimeout(function(){u.updateLegendControl(w)}),this.emit("change-data")},l.DefaultOptions=b7,l.PlotType=aO,l}(m7),E7=wp({},oO.DefaultOptions,{source:{data:{type:"FeatureCollection",features:[]},parser:{type:"geojson"}}}),MR="#2f54eb",Yc={active:{fill:!1,stroke:MR,lineWidth:1.5,lineOpacity:.8},select:{fill:!1,stroke:MR,lineWidth:1.5,lineOpacity:.8}},v2=function(n){return(0,Et.o8)(n)||(n.active===!1?Yc.active=Object.assign(Yc.active,{fill:!1,stroke:!1}):typeof n.active=="object"&&(n.active.fill===!1?Yc.active.fill=!1:typeof n.active.fill=="string"&&(Yc.active.fill=n.active.fill),n.active.stroke===!1?Yc.active.stroke=!1:typeof n.active.stroke=="string"&&(Yc.active.stroke=n.active.stroke),typeof n.active.lineWidth=="number"&&(Yc.active.lineWidth=n.active.lineWidth),typeof n.active.lineOpacity=="number"&&(Yc.active.lineOpacity=n.active.lineOpacity)),n.select===!1?Yc.select=Object.assign(Yc.select,{fill:!1,stroke:!1}):typeof n.select=="object"&&(n.select.fill===!1?Yc.select.fill=!1:typeof n.select.fill=="string"&&(Yc.select.fill=n.select.fill),n.select.stroke===!1?Yc.select.stroke=!1:typeof n.select.stroke=="string"&&(Yc.select.stroke=n.select.stroke),typeof n.select.lineWidth=="number"&&(Yc.select.lineWidth=n.select.lineWidth),typeof n.select.lineOpacity=="number"&&(Yc.select.lineOpacity=n.select.lineOpacity))),Yc};function w7(n,l,a,s,u,h){var v=h.color,m=h.style,w=h.state,A=v2(w),R={active:A.active.fill===!1?!1:{color:A.active.fill},select:!1},B={opacity:m==null?void 0:m.opacity},G=m==null?void 0:m.fillBottomColor,j=m==null?void 0:m.lineWidth,lt=m==null?void 0:m.stroke,ct={opacity:m==null?void 0:m.lineOpacity,dashArray:m==null?void 0:m.lineDash,lineType:m==null?void 0:m.lineType};if(sl.shape(n,"fill"),v&&sl.color(n,v),B&&sl.style(n,B),R&&sl.state(n,R),G&&n.setBottomColor(G),sl.shape(l,"line"),j&&sl.size(l,j),lt&&sl.color(l,lt),ct&&sl.style(l,ct),A.active.stroke){var _t=A.active.stroke,Vt=A.active.lineWidth||j,ce={opacity:A.active.lineOpacity};sl.shape(a,"line"),Vt&&sl.size(a,Vt),_t&&sl.color(a,_t),ce&&sl.style(a,ce)}if(A.select.fill){var ae=A.select.fill;sl.shape(s,"fill"),ae&&sl.color(s,ae),B&&sl.style(s,B),sl.state(s,{select:!1,active:!1})}if(A.select.stroke){var ze=A.select.stroke,Vt=A.select.lineWidth||j,$e={opacity:A.select.lineOpacity};sl.shape(u,"line"),Vt&&sl.size(u,Vt),ze&&sl.color(u,ze),$e&&sl.style(u,$e)}}var S7=/\s/;function C7(n){for(var l=n.length;l--&&S7.test(n.charAt(l)););return l}var A7=C7,T7=/^\s+/;function M7(n){return n&&n.slice(0,A7(n)+1).replace(T7,"")}var I7=M7,IR=0/0,k7=/^[-+]0x[0-9a-f]+$/i,L7=/^0b[01]+$/i,P7=/^0o[0-7]+$/i,O7=parseInt;function F7(n){if(typeof n=="number")return n;if(ST(n))return IR;if(CT(n)){var l=typeof n.valueOf=="function"?n.valueOf():n;n=CT(l)?l+"":l}if(typeof n!="string")return n===0?n:+n;n=I7(n);var a=L7.test(n);return a||P7.test(n)?O7(n.slice(2),a?2:8):k7.test(n)?IR:+n}var kR=F7,LR=1/0,R7=17976931348623157e292;function D7(n){if(!n)return n===0?n:0;if(n=kR(n),n===LR||n===-LR){var l=n<0?-1:1;return l*R7}return n===n?n:0}var B7=D7;function N7(n){var l=B7(n),a=l%1;return l===l?a?l-a:l:0}var z7=N7,U7=Ep.isFinite,Z7=Math.min;function V7(n){var l=Math[n];return function(a,s){if(a=kR(a),s=s==null?0:Z7(z7(s),292),s&&U7(a)){var u=(YP(a)+"e").split("e"),h=l(u[0]+"e"+(+u[1]+s));return u=(YP(h)+"e").split("e"),+(u[0]+"e"+(+u[1]-s))}return l(a)}}var G7=V7,H7=G7("round"),PR=H7,j7=function(n){return!Array.isArray(n[0].value)},W7=function(n){if(j7(n))return n;var l=n.map(function(a){return(0,k.pi)((0,k.pi)({},a),{value:[PR(a.value[0],2),PR(a.value[1],2)]})});return l},OR={visible:!0,state:{active:!1,select:!1},enabledMultiSelect:!1},X7=["color","style","state","enabledMultiSelect"],sO=function(n){(0,k.ZT)(l,n);function l(a){var s=n.call(this,a)||this;s.selectData=[],s.type=h_.LayerType.AreaLayer,s.interaction=!0,s.onHighlighHandle=function(lt){var ct=lt.feature,_t=lt.featureId;s.setHighlightLayerSource(ct,_t)},s.onUnhighlighHandle=function(){s.setHighlightLayerSource()},s.onSelectHandle=function(lt){var ct=s.options.enabledMultiSelect,_t=lt.feature,Vt=lt.featureId,ce=(0,Et.d9)(s.selectData),ae=ce.findIndex(function($e){return $e.featureId===Vt});if(ae===-1)ct?ce.push({feature:_t,featureId:Vt}):ce=[{feature:_t,featureId:Vt}],s.emit("select",_t,(0,Et.d9)(ce));else{var ze=ce[ae];ct?ce.splice(ae,1):ce=[],s.emit("unselect",ze,(0,Et.d9)(ce))}s.setSelectLayerSource(ce)};var u=s.options,h=u.name,v=u.source,m=u.visible,w=u.minZoom,A=u.maxZoom,R=u.zIndex,B=R===void 0?0:R,G=s.pickLayerConfig(s.options),j=v2(s.options.state);return s.name=h||(0,Et.EL)(s.type),s.layer=new _1((0,k.pi)((0,k.pi)({},G),{name:s.name})),s.strokeLayer=new L0({name:"strokeLayer",visible:m,zIndex:B,minZoom:w,maxZoom:A}),s.highlightLayer=new L0({name:"highlightLayer",visible:m&&Boolean(j.active.stroke),zIndex:B+.1,minZoom:w,maxZoom:A}),s.selectFillLayer=new _1({name:"selectFillLayer",visible:m&&Boolean(j.select.fill),zIndex:B+.1,minZoom:w,maxZoom:A}),s.selectStrokeLayer=new L0({name:"selectStrokeLayer",visible:m&&Boolean(j.select.stroke),zIndex:B+.1,minZoom:w,maxZoom:A}),s.mappingLayer(s.options),s.setSource(v),s.initEvent(),s}return l.prototype.getDefaultOptions=function(){return OR},l.prototype.mappingLayer=function(a){w7(this.layer,this.strokeLayer,this.highlightLayer,this.selectFillLayer,this.selectStrokeLayer,a)},l.prototype.setSource=function(a){n.prototype.setSource.call(this,a),this.setStrokeLayerSource(),this.setHighlightLayerSource(),this.selectFillLayer.source({type:"FeatureCollection",features:[]},{parser:{type:"geojson"}}),this.selectStrokeLayer.source({type:"FeatureCollection",features:[]},{parser:{type:"geojson"}})},l.prototype.setStrokeLayerSource=function(){var a=this.layer.getSource();if(a)this.strokeLayer.setSource(a);else{var s=this.layer.sourceOption,u=s.data,h=s.options;this.strokeLayer.source(u,h)}},l.prototype.setHighlightLayerSource=function(a,s){if(s===void 0&&(s=-999),this.highlightLayerData!==s){var u=a?[a]:[];this.highlightLayer.setData({type:"FeatureCollection",features:u},{parser:{type:"geojson"}}),this.highlightLayerData=s}},l.prototype.setSelectLayerSource=function(a){if(a===void 0&&(a=[]),!(this.selectData.length===a.length&&(0,Et.Xy)(this.selectData.map(function(u){var h=u.featureId;return h}),a.map(function(u){var h=u.featureId;return h})))){var s=a.map(function(u){var h=u.feature;return h});this.selectFillLayer.setData({type:"FeatureCollection",features:s},{parser:{type:"geojson"}}),this.selectStrokeLayer.setData({type:"FeatureCollection",features:s},{parser:{type:"geojson"}}),this.selectData=a}},l.prototype.initEvent=function(){this.layer.off("mousemove",this.onHighlighHandle),this.layer.off("unmousemove",this.onHighlighHandle),this.layer.off("click",this.onSelectHandle),this.selectData=[],this.highlightLayerData=null,this.options.state&&(this.options.state.active&&(this.layer.on("mousemove",this.onHighlighHandle),this.layer.on("unmousemove",this.onUnhighlighHandle)),this.options.state.select&&this.layer.on("click",this.onSelectHandle))},l.prototype.addTo=function(a){a.addLayer(this.layer),a.addLayer(this.strokeLayer),a.addLayer(this.highlightLayer),a.addLayer(this.selectFillLayer),a.addLayer(this.selectStrokeLayer)},l.prototype.remove=function(a){a.removeLayer(this.layer),a.removeLayer(this.strokeLayer),a.removeLayer(this.highlightLayer),a.removeLayer(this.selectFillLayer),a.removeLayer(this.selectStrokeLayer)},l.prototype.update=function(a){if(n.prototype.update.call(this,a),this.mappingLayer(this.options),this.options.visible){!(0,Et.o8)(a.state)&&!(0,Et.Xy)(this.lastOptions.state,this.options.state)&&this.updateHighlightLayer();var s=v2(this.options.state);s.active.stroke&&this.setHighlightLayerSource(),(s.select.fill||s.select.stroke)&&this.setSelectLayerSource()}this.initEvent()},l.prototype.updateHighlightLayer=function(){var a=v2(this.options.state),s=v2(this.lastOptions.state);s.active.stroke!==a.active.stroke&&(a.active.stroke?this.highlightLayer.show():this.highlightLayer.hide()),s.select.fill!==a.select.fill&&(a.select.fill?this.selectFillLayer.show():this.selectFillLayer.hide()),s.select.stroke!==a.select.stroke&&(a.select.stroke?this.selectStrokeLayer.show():this.selectStrokeLayer.hide())},l.prototype.setIndex=function(a){this.layer.setIndex(a),this.strokeLayer.setIndex(a),this.highlightLayer.setIndex(a+.1),this.selectFillLayer.setIndex(a+.1),this.selectStrokeLayer.setIndex(a+.1)},l.prototype.setMinZoom=function(a){this.layer.setMinZoom(a),this.strokeLayer.setMinZoom(a),this.highlightLayer.setMinZoom(a),this.selectFillLayer.setMinZoom(a),this.selectStrokeLayer.setMinZoom(a)},l.prototype.setMaxZoom=function(a){this.layer.setMaxZoom(a),this.strokeLayer.setMaxZoom(a),this.highlightLayer.setMaxZoom(a),this.selectFillLayer.setMaxZoom(a),this.selectStrokeLayer.setMaxZoom(a)},l.prototype.show=function(){this.layer.inited&&(this.layer.show(),this.strokeLayer.show(),this.selectFillLayer.show(),this.selectStrokeLayer.show())},l.prototype.hide=function(){this.layer.inited&&(this.layer.hide(),this.strokeLayer.hide(),this.selectFillLayer.hide(),this.selectStrokeLayer.hide())},l.prototype.getColorLegendItems=function(){var a=this.layer.getLegendItems("color");if(Array.isArray(a)&&a.length!==0){var s=W7(a);return s}return[]},l.prototype.setActive=function(a){},l.prototype.setSelect=function(a){},l.DefaultOptions=OR,l.LayerOptionsKeys=h_.LayerConfigkeys.concat(X7),l}(h_),Y7=function(n){(0,k.ZT)(l,n);function l(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=oO.PlotType.Area,a}return l.prototype.getDefaultOptions=function(){return l.DefaultOptions},l.prototype.createLayers=function(a){this.areaLayer=new sO((0,k.pi)({source:a},(0,Et.ei)(this.options,sO.LayerOptionsKeys)));var s=new mR([this.areaLayer]);return this.options.label&&(this.labelLayer=this.createLabelLayer(a,this.options.label,this.options),s.addLayer(this.labelLayer)),s},l.prototype.updateLayers=function(a){var s=(0,Et.ei)(a,sO.LayerOptionsKeys);this.areaLayer.update(s),this.updateLabelLayer(this.source,a.label,this.options,this.labelLayer)},l.prototype.initLayersEvent=function(){},l.prototype.getLegendOptions=function(){var a=this.areaLayer.getColorLegendItems();return a.length!==0?{type:"category",items:a}:{}},l.DefaultOptions=E7,l}(oO),E8=function(n,l){var a={}.toString;return a.call(n)==="[object ".concat(l,"]")},w8=function(n){return Object.prototype.toString.call(n).slice(8,-1)},uO=function(n){if(!n||typeof n!="object")return n;var l;return Array.isArray(n)?l=n.map(function(a){return uO(a)}):(l={},Object.keys(n).forEach(function(a){return l[a]=uO(n[a])})),l},S8=function(n){if(!n)return n;var l={};for(var a in n)l[a]=n[a];return l},g2=function(){return g2=Object.assign||function(n){for(var l,a=1,s=arguments.length;a<s;a++){l=arguments[a];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(n[u]=l[u])}return n},g2.apply(this,arguments)},$7=function(n,l){var a={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&l.indexOf(s)<0&&(a[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,s=Object.getOwnPropertySymbols(n);u<s.length;u++)l.indexOf(s[u])<0&&Object.prototype.propertyIsEnumerable.call(n,s[u])&&(a[s[u]]=n[s[u]]);return a},FR=function(n){var l=n.source,a=$7(n,["source"]),s=g2(g2({},uO(a)),{source:g2({},l)});return s},lO=function(){return lO=Object.assign||function(n){for(var l,a=1,s=arguments.length;a<s;a++){l=arguments[a];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(n[u]=l[u])}return n},lO.apply(this,arguments)},kT=function(n,l){var a={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&l.indexOf(s)<0&&(a[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,s=Object.getOwnPropertySymbols(n);u<s.length;u++)l.indexOf(s[u])<0&&Object.prototype.propertyIsEnumerable.call(n,s[u])&&(a[s[u]]=n[s[u]]);return a};function q7(n,l){var a=(0,gt.useRef)(),s=(0,gt.useRef)(),u=(0,gt.useRef)(null),h=l.onReady;return(0,gt.useEffect)(function(){if(!(!a.current||!s.current||(0,Et.Xy)(s.current,l))){var v=!1,m=!1,w=!1,A=s.current,R=A.onReady,B=A.map,G=A.source,j=G.data,lt=kT(G,["data"]),ct=kT(A,["onReady","map","source"]),_t=l.onReady,Vt=l.map,ce=l.source,ae=ce.data,ze=kT(ce,["data"]),$e=kT(l,["onReady","map","source"]);if(m=!(0,Et.Xy)(B,Vt),v=!(0,Et.Xy)(lt,ze)||j!==ae,w=!(0,Et.Xy)(ct,$e),s.current=FR(l),m){var xr=(0,Et.ei)(Vt,["center","pitch","rotation","zoom","style"]);a.current.updateMap(xr)}v&&(a.current.loaded?a.current.changeData(ae,ze):a.current.once("loaded",function(){var Or;(Or=a.current)===null||Or===void 0||Or.changeData(ae,ze)})),w&&(a.current.loaded?a.current.update($e):a.current.once("loaded",function(){var Or;(Or=a.current)===null||Or===void 0||Or.update($e)}))}},[l]),(0,gt.useEffect)(function(){return u.current?(s.current||(s.current=FR(l)),a.current=new n(u.current,lO({},l)),h&&a.current.once("loaded",function(){h(a.current)}),function(){a.current&&(a.current.destroy(),a.current=void 0)}):function(){return null}},[]),{plotRef:a,containerRef:u}}var K7=function(n,l){n&&((0,Et.mf)(n)?n(l):n.current=l)},Q7=function(){var n=function(l,a){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,u){s.__proto__=u}||function(s,u){for(var h in u)Object.prototype.hasOwnProperty.call(u,h)&&(s[h]=u[h])},n(l,a)};return function(l,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");n(l,a);function s(){this.constructor=l}l.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}}(),J7=function(n){Q7(l,n);function l(){var a=n!==null&&n.apply(this,arguments)||this;return a.state={hasError:!1},a.renderError=function(s){var u=a.props.errorTemplate;switch(s){default:return typeof u=="function"?u(s):u||gt.createElement("h5",null,"\u7EC4\u4EF6\u51FA\u9519\u4E86\uFF0C\u8BF7\u6838\u67E5\u540E\u91CD\u8BD5\uFF1A ",s.message)}},a}return l.getDerivedStateFromError=function(a){return{hasError:!0,error:a}},l.getDerivedStateFromProps=function(a,s){return s.children!==a.children?{children:a.children,hasError:!1,error:void 0}:null},l.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):gt.createElement(gt.Fragment,null,this.props.children)},l}(gt.Component),t8=J7,e8=nt(87488),r8=function(n){var l=n.loadingTemplate,a=function(){return l||gt.createElement(e8.ZP,{viewBox:"0 0 400 180",width:200,height:90,speed:1},gt.createElement("rect",{x:"20",y:"5",rx:"0",ry:"0",width:"1",height:"170"}),gt.createElement("rect",{x:"20",y:"175",rx:"0",ry:"0",width:"360",height:"1"}),gt.createElement("rect",{x:"40",y:"75",rx:"0",ry:"0",width:"35",height:"100"}),gt.createElement("rect",{x:"80",y:"125",rx:"0",ry:"0",width:"35",height:"50"}),gt.createElement("rect",{x:"120",y:"105",rx:"0",ry:"0",width:"35",height:"70"}),gt.createElement("rect",{x:"160",y:"35",rx:"0",ry:"0",width:"35",height:"140"}),gt.createElement("rect",{x:"200",y:"55",rx:"0",ry:"0",width:"35",height:"120"}),gt.createElement("rect",{x:"240",y:"15",rx:"0",ry:"0",width:"35",height:"160"}),gt.createElement("rect",{x:"280",y:"135",rx:"0",ry:"0",width:"35",height:"40"}),gt.createElement("rect",{x:"320",y:"85",rx:"0",ry:"0",width:"35",height:"90"}))};return gt.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",left:0,top:0,zIndex:99,backgroundColor:"#fff"}},a())},n8=r8,i8=function(n,l){var a={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&l.indexOf(s)<0&&(a[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,s=Object.getOwnPropertySymbols(n);u<s.length;u++)l.indexOf(s[u])<0&&Object.prototype.propertyIsEnumerable.call(n,s[u])&&(a[s[u]]=n[s[u]]);return a},a8=(0,gt.forwardRef)(function(n,l){var a=n.chartRef,s=n.containerStyle,u=s===void 0?{height:"inherit"}:s,h=n.className,v=n.loading,m=n.loadingTemplate,w=n.errorTemplate,A=i8(n,["chartRef","containerStyle","className","loading","loadingTemplate","errorTemplate"]),R=q7(Y7,A),B=R.plotRef,G=R.containerRef;return(0,gt.useEffect)(function(){K7(a,B.current)},[B.current]),(0,gt.useImperativeHandle)(l,function(){return{getChart:function(){return B.current}}}),gt.createElement(t8,{errorTemplate:w},v&>.createElement(n8,{loadingTemplate:m}),gt.createElement("div",{className:h,style:u,ref:G}))}),o8=a8},61841:function(pn,Ot,nt){"use strict";var kt=nt(79685),gt=nt(17904),k=nt(80157),Et=nt(68141),K=nt(29722),yt=nt(44903),J=function(et,_e){var ot={};for(var ut in et)Object.prototype.hasOwnProperty.call(et,ut)&&_e.indexOf(ut)<0&&(ot[ut]=et[ut]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var zt=0,ut=Object.getOwnPropertySymbols(et);zt<ut.length;zt++)_e.indexOf(ut[zt])<0&&Object.prototype.propertyIsEnumerable.call(et,ut[zt])&&(ot[ut[zt]]=et[ut[zt]]);return ot},pt=(0,kt.forwardRef)(function(et,_e){var ot=et.chartRef,ut=et.style,zt=ut===void 0?{height:"inherit"}:ut,P=et.className,b=et.loading,W=et.loadingTemplate,le=et.errorTemplate,be=J(et,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),Me=(0,k.Z)(gt.Bar,be),At=Me.chart,rt=Me.container;return(0,kt.useEffect)(function(){(0,Et.J)(ot,At.current)},[At.current]),(0,kt.useImperativeHandle)(_e,function(){return{getChart:function(){return At.current}}}),kt.createElement(K.Z,{errorTemplate:le},b&&kt.createElement(yt.Z,{loadingTemplate:W,theme:et.theme}),kt.createElement("div",{className:P,style:zt,ref:rt}))});Ot.Z=pt},29554:function(pn,Ot,nt){"use strict";var kt=nt(79685),gt=nt(17904),k=nt(80157),Et=nt(68141),K=nt(29722),yt=nt(44903),J=function(et,_e){var ot={};for(var ut in et)Object.prototype.hasOwnProperty.call(et,ut)&&_e.indexOf(ut)<0&&(ot[ut]=et[ut]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var zt=0,ut=Object.getOwnPropertySymbols(et);zt<ut.length;zt++)_e.indexOf(ut[zt])<0&&Object.prototype.propertyIsEnumerable.call(et,ut[zt])&&(ot[ut[zt]]=et[ut[zt]]);return ot},pt=(0,kt.forwardRef)(function(et,_e){var ot=et.chartRef,ut=et.style,zt=ut===void 0?{height:"inherit"}:ut,P=et.className,b=et.loading,W=et.loadingTemplate,le=et.errorTemplate,be=J(et,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),Me=(0,k.Z)(gt.Column,be),At=Me.chart,rt=Me.container;return(0,kt.useEffect)(function(){(0,Et.J)(ot,At.current)},[At.current]),(0,kt.useImperativeHandle)(_e,function(){return{getChart:function(){return At.current}}}),kt.createElement(K.Z,{errorTemplate:le},b&&kt.createElement(yt.Z,{loadingTemplate:W,theme:et.theme}),kt.createElement("div",{className:P,style:zt,ref:rt}))});Ot.Z=pt},74425:function(pn,Ot,nt){"use strict";var kt=nt(79685),gt=nt(17904),k=nt(80157),Et=nt(68141),K=nt(29722),yt=nt(44903),J=function(et,_e){var ot={};for(var ut in et)Object.prototype.hasOwnProperty.call(et,ut)&&_e.indexOf(ut)<0&&(ot[ut]=et[ut]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var zt=0,ut=Object.getOwnPropertySymbols(et);zt<ut.length;zt++)_e.indexOf(ut[zt])<0&&Object.prototype.propertyIsEnumerable.call(et,ut[zt])&&(ot[ut[zt]]=et[ut[zt]]);return ot},pt=(0,kt.forwardRef)(function(et,_e){var ot=et.chartRef,ut=et.style,zt=ut===void 0?{height:"inherit"}:ut,P=et.className,b=et.loading,W=et.loadingTemplate,le=et.errorTemplate,be=J(et,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),Me=(0,k.Z)(gt.Pie,be),At=Me.chart,rt=Me.container;return(0,kt.useEffect)(function(){(0,Et.J)(ot,At.current)},[At.current]),(0,kt.useImperativeHandle)(_e,function(){return{getChart:function(){return At.current}}}),kt.createElement(K.Z,{errorTemplate:le},b&&kt.createElement(yt.Z,{loadingTemplate:W,theme:et.theme}),kt.createElement("div",{className:P,style:zt,ref:rt}))});Ot.Z=pt},29722:function(pn,Ot,nt){"use strict";var kt=nt(79685),gt=function(){var Et=function(K,yt){return Et=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,pt){J.__proto__=pt}||function(J,pt){for(var et in pt)Object.prototype.hasOwnProperty.call(pt,et)&&(J[et]=pt[et])},Et(K,yt)};return function(K,yt){if(typeof yt!="function"&&yt!==null)throw new TypeError("Class extends value "+String(yt)+" is not a constructor or null");Et(K,yt);function J(){this.constructor=K}K.prototype=yt===null?Object.create(yt):(J.prototype=yt.prototype,new J)}}(),k=function(Et){gt(K,Et);function K(){var yt=Et!==null&&Et.apply(this,arguments)||this;return yt.state={hasError:!1},yt.renderError=function(J){var pt=yt.props.errorTemplate;switch(J){default:return typeof pt=="function"?pt(J):pt||kt.createElement("h5",null,"\u7EC4\u4EF6\u51FA\u9519\u4E86\uFF0C\u8BF7\u6838\u67E5\u540E\u91CD\u8BD5\uFF1A ",J.message)}},yt}return K.getDerivedStateFromError=function(yt){return{hasError:!0,error:yt}},K.getDerivedStateFromProps=function(yt,J){return J.children!==yt.children?{children:yt.children,hasError:!1,error:void 0}:null},K.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):kt.createElement(kt.Fragment,null,this.props.children)},K}(kt.Component);Ot.Z=k},80157:function(pn,Ot,nt){"use strict";nt.d(Ot,{Z:function(){return ke}});var kt=nt(79685),gt=nt(22374),k=nt(50374),Et=nt.t(k,2),K=function(){return K=Object.assign||function(Le){for(var Be,Bt=1,ee=arguments.length;Bt<ee;Bt++){Be=arguments[Bt];for(var me in Be)Object.prototype.hasOwnProperty.call(Be,me)&&(Le[me]=Be[me])}return Le},K.apply(this,arguments)},yt=function(Le,Be,Bt,ee){function me(Yt){return Yt instanceof Bt?Yt:new Bt(function(qe){qe(Yt)})}return new(Bt||(Bt=Promise))(function(Yt,qe){function vr(bt){try{qt(ee.next(bt))}catch(Xt){qe(Xt)}}function ie(bt){try{qt(ee.throw(bt))}catch(Xt){qe(Xt)}}function qt(bt){bt.done?Yt(bt.value):me(bt.value).then(vr,ie)}qt((ee=ee.apply(Le,Be||[])).next())})},J=function(Le,Be){var Bt={label:0,sent:function(){if(Yt[0]&1)throw Yt[1];return Yt[1]},trys:[],ops:[]},ee,me,Yt,qe;return qe={next:vr(0),throw:vr(1),return:vr(2)},typeof Symbol=="function"&&(qe[Symbol.iterator]=function(){return this}),qe;function vr(qt){return function(bt){return ie([qt,bt])}}function ie(qt){if(ee)throw new TypeError("Generator is already executing.");for(;qe&&(qe=0,qt[0]&&(Bt=0)),Bt;)try{if(ee=1,me&&(Yt=qt[0]&2?me.return:qt[0]?me.throw||((Yt=me.return)&&Yt.call(me),0):me.next)&&!(Yt=Yt.call(me,qt[1])).done)return Yt;switch(me=0,Yt&&(qt=[qt[0]&2,Yt.value]),qt[0]){case 0:case 1:Yt=qt;break;case 4:return Bt.label++,{value:qt[1],done:!1};case 5:Bt.label++,me=qt[1],qt=[0];continue;case 7:qt=Bt.ops.pop(),Bt.trys.pop();continue;default:if(Yt=Bt.trys,!(Yt=Yt.length>0&&Yt[Yt.length-1])&&(qt[0]===6||qt[0]===2)){Bt=0;continue}if(qt[0]===3&&(!Yt||qt[1]>Yt[0]&&qt[1]<Yt[3])){Bt.label=qt[1];break}if(qt[0]===6&&Bt.label<Yt[1]){Bt.label=Yt[1],Yt=qt;break}if(Yt&&Bt.label<Yt[2]){Bt.label=Yt[2],Bt.ops.push(qt);break}Yt[2]&&Bt.ops.pop(),Bt.trys.pop();continue}qt=Be.call(Le,Bt)}catch(bt){qt=[6,bt],me=0}finally{ee=Yt=0}if(qt[0]&5)throw qt[1];return{value:qt[0]?qt[1]:void 0,done:!0}}},pt=K({},Et),et=pt.version,_e=pt.render,ot=pt.unmountComponentAtNode,ut;try{var zt=Number((et||"").split(".")[0]);zt>=18&&(ut=pt.createRoot)}catch(Le){}function P(Le){var Be=pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Be&&typeof Be=="object"&&(Be.usingClientEntryPoint=Le)}var b="__rc_react_root__";function W(Le,Be){P(!0);var Bt=Be[b]||ut(Be);P(!1),Bt.render(Le),Be[b]=Bt}function le(Le,Be){_e(Le,Be)}function be(Le,Be){}function Me(Le,Be){if(ut){W(Le,Be);return}le(Le,Be)}function At(Le){return yt(this,void 0,void 0,function(){return J(this,function(Be){return[2,Promise.resolve().then(function(){var Bt;(Bt=Le[b])===null||Bt===void 0||Bt.unmount(),delete Le[b]})]})})}function rt(Le){ot(Le)}function Dt(Le){}function Ee(Le){return yt(this,void 0,void 0,function(){return J(this,function(Be){return ut!==void 0?[2,At(Le)]:(rt(Le),[2])})})}var ge=new Map,Ge=function(Le,Be,Bt){var ee=document.createElement("div");return Be==="tooltip"&&(ee.setAttribute("data-uuid",Bt),ge.has(Bt)?ee=ge.get(Bt):ge.set(Bt,ee),ee.className="g2-tooltip"),Me(Le,ee),ee},Ue=Ge,xe=function(Le,Be){var Bt={}.toString;return Bt.call(Le)==="[object ".concat(Be,"]")},Ke=function(Le){if(!Le)return Le;var Be={};for(var Bt in Le)Be[Bt]=Le[Bt];return Be},Lt=function(Le){return Object.prototype.toString.call(Le).slice(8,-1)},Jt=function(Le){if(!Le||typeof Le!="object")return Le;var Be;return Array.isArray(Le)?Be=Le.map(function(Bt){return Jt(Bt)}):(Be={},Object.keys(Le).forEach(function(Bt){return Be[Bt]=Jt(Le[Bt])})),Be},ft=function(Le,Be){for(var Bt=Le,ee=0;ee<Be.length;ee+=1)if(Bt!=null&&Bt[Be[ee]])Bt=Bt[Be[ee]];else{Bt=void 0;break}return Bt},St=function(Le,Be,Bt){if(!Le)return Le;var ee=Le;return Be.forEach(function(me,Yt){Yt<Be.length-1?ee=ee[me]:ee[me]=Bt}),Le},Y=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(Le){var Be=Math.random()*16|0,Bt=Le=="x"?Be:Be&3|8;return Bt.toString(16)})},mt=function(){return mt=Object.assign||function(Le){for(var Be,Bt=1,ee=arguments.length;Bt<ee;Bt++){Be=arguments[Bt];for(var me in Be)Object.prototype.hasOwnProperty.call(Be,me)&&(Le[me]=Be[me])}return Le},mt.apply(this,arguments)},se=function(Le,Be){var Bt={};for(var ee in Le)Object.prototype.hasOwnProperty.call(Le,ee)&&Be.indexOf(ee)<0&&(Bt[ee]=Le[ee]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var me=0,ee=Object.getOwnPropertySymbols(Le);me<ee.length;me++)Be.indexOf(ee[me])<0&&Object.prototype.propertyIsEnumerable.call(Le,ee[me])&&(Bt[ee[me]]=Le[ee[me]]);return Bt};function ke(Le,Be){var Bt=(0,kt.useRef)(),ee=(0,kt.useRef)(),me=(0,kt.useRef)(null),Yt=Be.onReady,qe=Be.onEvent,vr=function(Xt,$t){var xt;return Xt===void 0&&(Xt="image/png"),(xt=Bt.current)===null||xt===void 0?void 0:xt.chart.canvas.cfg.el.toDataURL(Xt,$t)},ie=function(Xt,$t,xt){var wt;Xt===void 0&&(Xt="download"),$t===void 0&&($t="image/png");var ue=Xt;Xt.indexOf(".")===-1&&(ue="".concat(Xt,".").concat($t.split("/")[1]));var Ie=(wt=Bt.current)===null||wt===void 0?void 0:wt.chart.canvas.cfg.el.toDataURL($t,xt),Ne=document.createElement("a");return Ne.href=Ie,Ne.download=ue,document.body.appendChild(Ne),Ne.click(),document.body.removeChild(Ne),Ne=null,ue},qt=function(Xt,$t,xt,wt){var ue=ft(Xt,$t);St(Xt,$t,function(){for(var Ie=[],Ne=0;Ne<arguments.length;Ne++)Ie[Ne]=arguments[Ne];var Zt=xe(ue,"Function")?ue.apply(void 0,Ie):ue;return xe(Zt,"String")||xe(Zt,"Number")||xe(Zt,"HTMLDivElement")?Zt:Ue(Zt,xt,wt)})},bt=function(){var Xt=Y();ft(Be,["statistic","content","customHtml"])&&qt(Be,["statistic","content","customHtml"]),ft(Be,["statistic","title","customHtml"])&&qt(Be,["statistic","title","customHtml"]),typeof Be.tooltip=="object"&&(ft(Be,["tooltip","container"])&&qt(Be,["tooltip","container"],"tooltip",Xt),ft(Be,["tooltip","customContent"])&&qt(Be,["tooltip","customContent"],"tooltip",Xt))};return(0,kt.useEffect)(function(){if(Bt.current&&!(0,gt.Xy)(ee.current,Be)){var Xt=!1;if(ee.current){var $t=ee.current,xt=$t.data,wt=$t.value,ue=$t.percent,Ie=se($t,["data","value","percent"]),Ne=Be.data,Zt=Be.value,Ct=Be.percent,Tt=se(Be,["data","value","percent"]);Xt=(0,gt.Xy)(Ie,Tt)}if(ee.current=Jt(Be),Xt&&(0,gt.U2)(Be,"chartType")!=="Mix"){var Nt="data",tt=["percent"],vt=Object.keys(Be);tt.forEach(function(Ht){vt.includes(Ht)&&(Nt=Ht)}),Bt.current.changeData((Be==null?void 0:Be[Nt])||[]),Bt.current.render()}else bt(),Bt.current.update(Be)}},[Be]),(0,kt.useEffect)(function(){if(!me.current)return function(){return null};ee.current||(ee.current=Jt(Be)),bt();var Xt=new Le(me.current,mt({},Be));Xt.toDataURL=function(xt,wt){return vr(xt,wt)},Xt.downloadImage=function(xt,wt,ue){return ie(xt,wt,ue)},Xt.render(),Bt.current=Ke(Xt),Yt&&Yt(Xt);var $t=function(xt){qe&&qe(Xt,xt)};return Xt.on("*",$t),function(){Bt.current&&(Bt.current.destroy(),Bt.current.off("*",$t),Bt.current=void 0)}},[]),{chart:Bt,container:me}}},44903:function(pn,Ot,nt){"use strict";var kt=nt(79685),gt=nt(87488),k=function(Et){var K=Et.loadingTemplate,yt=Et.theme,J=yt===void 0?"light":yt,pt=function(){return K||kt.createElement(gt.ZP,{viewBox:"0 0 400 180",width:200,height:90,speed:1,backgroundColor:J==="dark"?"#262626":"#D9D9D9"},kt.createElement("rect",{x:"20",y:"5",rx:"0",ry:"0",width:"1",height:"170"}),kt.createElement("rect",{x:"20",y:"175",rx:"0",ry:"0",width:"360",height:"1"}),kt.createElement("rect",{x:"40",y:"75",rx:"0",ry:"0",width:"35",height:"100"}),kt.createElement("rect",{x:"80",y:"125",rx:"0",ry:"0",width:"35",height:"50"}),kt.createElement("rect",{x:"120",y:"105",rx:"0",ry:"0",width:"35",height:"70"}),kt.createElement("rect",{x:"160",y:"35",rx:"0",ry:"0",width:"35",height:"140"}),kt.createElement("rect",{x:"200",y:"55",rx:"0",ry:"0",width:"35",height:"120"}),kt.createElement("rect",{x:"240",y:"15",rx:"0",ry:"0",width:"35",height:"160"}),kt.createElement("rect",{x:"280",y:"135",rx:"0",ry:"0",width:"35",height:"40"}),kt.createElement("rect",{x:"320",y:"85",rx:"0",ry:"0",width:"35",height:"90"}))};return kt.createElement("div",{className:"charts-loading-container",style:{position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",left:0,top:0,zIndex:99,backgroundColor:J==="dark"?"rgb(20, 20, 20)":"rgb(255, 255, 255)"}},pt())};Ot.Z=k},68141:function(pn,Ot,nt){"use strict";nt.d(Ot,{J:function(){return gt}});var kt=nt(22374),gt=function(k,Et){k&&((0,kt.mf)(k)?k(Et):k.current=Et)}},71124:function(pn,Ot,nt){"use strict";nt.d(Ot,{Z:function(){return Ie}});var kt=nt(16431),gt=nt(5543),k=nt(66105),Et=nt(69567),K=nt(68591),yt=nt.n(K),J=nt(79685),pt=nt(47732),et=nt(77681),_e=nt(32788),ot=function(Zt){return(0,kt.Z)({},Zt.componentCls,{display:"flex",flexDirection:"column",justifyContent:"flex-end",marginBlock:Zt.marginLG,marginInline:0,color:Zt.colorText,fontWeight:"500",fontSize:"20px",lineHeight:"38px"})};function ut(Ne){return(0,_e.Xj)("ProCardOperation",function(Zt){var Ct=(0,gt.Z)((0,gt.Z)({},Zt),{},{componentCls:".".concat(Ne)});return[ot(Ct)]})}var zt=nt(63342),P=function(Zt){var Ct=Zt.className,Tt=Zt.style,Nt=Tt===void 0?{}:Tt,tt=Zt.children,vt=(0,J.useContext)(Et.ZP.ConfigContext),Ht=vt.getPrefixCls,he=Ht("pro-card-operation"),jt=ut(he),Te=jt.wrapSSR,We=jt.hashId,Qe=yt()(he,Ct,We);return Te((0,zt.jsx)("div",{className:Qe,style:Nt,children:tt}))},b=P,W=nt(44992),le=nt(30877),be=function(Zt,Ct){return J.createElement(le.Z,(0,gt.Z)((0,gt.Z)({},Zt),{},{ref:Ct,icon:W.Z}))};be.displayName="QuestionCircleOutlined";var Me=J.forwardRef(be),At=nt(41653),rt=nt(20645),Dt=nt(86787),Ee=nt(869),Ge=Ne=>{const{value:Zt,formatter:Ct,precision:Tt,decimalSeparator:Nt,groupSeparator:tt="",prefixCls:vt}=Ne;let Ht;if(typeof Ct=="function")Ht=Ct(Zt);else{const he=String(Zt),jt=he.match(/^(-?)(\d*)(\.(\d+))?$/);if(!jt||he==="-")Ht=he;else{const Te=jt[1];let We=jt[2]||"0",Qe=jt[4]||"";We=We.replace(/\B(?=(\d{3})+(?!\d))/g,tt),typeof Tt=="number"&&(Qe=Qe.padEnd(Tt,"0").slice(0,Tt>0?Tt:0)),Qe&&(Qe=`${Nt}${Qe}`),Ht=[J.createElement("span",{key:"int",className:`${vt}-content-value-int`},Te,We),Qe&&J.createElement("span",{key:"decimal",className:`${vt}-content-value-decimal`},Qe)]}}return J.createElement("span",{className:`${vt}-content-value`},Ht)},Ue=nt(83763),xe=nt(92232),Ke=nt(62371);const Lt=Ne=>{const{componentCls:Zt,marginXXS:Ct,padding:Tt,colorTextDescription:Nt,statisticTitleFontSize:tt,colorTextHeading:vt,statisticContentFontSize:Ht,statisticFontFamily:he}=Ne;return{[`${Zt}`]:Object.assign(Object.assign({},(0,Ke.Wf)(Ne)),{[`${Zt}-title`]:{marginBottom:Ct,color:Nt,fontSize:tt},[`${Zt}-skeleton`]:{paddingTop:Tt},[`${Zt}-content`]:{color:vt,fontSize:Ht,fontFamily:he,[`${Zt}-content-value`]:{display:"inline-block",direction:"ltr"},[`${Zt}-content-prefix, ${Zt}-content-suffix`]:{display:"inline-block"},[`${Zt}-content-prefix`]:{marginInlineEnd:Ct},[`${Zt}-content-suffix`]:{marginInlineStart:Ct}}})}};var Jt=(0,Ue.Z)("Statistic",Ne=>{const{fontSizeHeading3:Zt,fontSize:Ct,fontFamily:Tt}=Ne,Nt=(0,xe.TS)(Ne,{statisticTitleFontSize:Ct,statisticContentFontSize:Zt,statisticFontFamily:Tt});return[Lt(Nt)]}),ft=nt(68325),St=nt(28764);const Y=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function mt(Ne,Zt){let Ct=Ne;const Tt=/\[[^\]]*]/g,Nt=(Zt.match(Tt)||[]).map(he=>he.slice(1,-1)),tt=Zt.replace(Tt,"[]"),vt=Y.reduce((he,jt)=>{let[Te,We]=jt;if(he.includes(Te)){const Qe=Math.floor(Ct/We);return Ct-=Qe*We,he.replace(new RegExp(`${Te}+`,"g"),pr=>{const lr=pr.length;return Qe.toString().padStart(lr,"0")})}return he},tt);let Ht=0;return vt.replace(Tt,()=>{const he=Nt[Ht];return Ht+=1,he})}function se(Ne,Zt){const{format:Ct=""}=Zt,Tt=new Date(Ne).getTime(),Nt=Date.now(),tt=Math.max(Tt-Nt,0);return mt(tt,Ct)}const ke=1e3/30;function Le(Ne){return new Date(Ne).getTime()}const Be=Ne=>{const{value:Zt,format:Ct="HH:mm:ss",onChange:Tt,onFinish:Nt}=Ne,tt=(0,ft.Z)(),vt=J.useRef(null),Ht=()=>{Nt==null||Nt(),vt.current&&(clearInterval(vt.current),vt.current=null)},he=()=>{const We=Le(Zt);We>=Date.now()&&(vt.current=setInterval(()=>{tt(),Tt==null||Tt(We-Date.now()),We<Date.now()&&Ht()},ke))};J.useEffect(()=>(he(),()=>{vt.current&&(clearInterval(vt.current),vt.current=null)}),[Zt]);const jt=(We,Qe)=>se(We,Object.assign(Object.assign({},Qe),{format:Ct})),Te=We=>(0,St.Tm)(We,{title:void 0});return J.createElement(me,Object.assign({},Ne,{valueRender:Te,formatter:jt}))};var Bt=J.memo(Be);const ee=Ne=>{const{prefixCls:Zt,className:Ct,rootClassName:Tt,style:Nt,valueStyle:tt,value:vt=0,title:Ht,valueRender:he,prefix:jt,suffix:Te,loading:We=!1,onMouseEnter:Qe,onMouseLeave:pr,decimalSeparator:lr=".",groupSeparator:Vr=","}=Ne,{getPrefixCls:Pr,direction:Br}=J.useContext(Dt.E_),Sn=Pr("statistic",Zt),[an,zn]=Jt(Sn),Zn=J.createElement(Ge,Object.assign({decimalSeparator:lr,groupSeparator:Vr,prefixCls:Sn},Ne,{value:vt})),Wn=yt()(Sn,{[`${Sn}-rtl`]:Br==="rtl"},Ct,Tt,zn);return an(J.createElement("div",{className:Wn,style:Nt,onMouseEnter:Qe,onMouseLeave:pr},Ht&&J.createElement("div",{className:`${Sn}-title`},Ht),J.createElement(Ee.Z,{paragraph:!1,loading:We,className:`${Sn}-skeleton`},J.createElement("div",{style:tt,className:`${Sn}-content`},jt&&J.createElement("span",{className:`${Sn}-content-prefix`},jt),he?he(Zn):Zn,Te&&J.createElement("span",{className:`${Sn}-content-suffix`},Te)))))};ee.Countdown=Bt;var me=ee,Yt=me,qe=function(Zt){var Ct,Tt,Nt;return(0,kt.Z)({},Zt.componentCls,(Nt={display:"flex",fontSize:Zt.fontSize,"& + &":{marginBlockStart:4},"&-tip":{marginInlineStart:4},"&-wrapper":(0,kt.Z)({display:"flex",width:"100%"},"".concat(Zt.componentCls,"-status"),{width:"14px"}),"&-icon":{marginInlineEnd:16},"&-trend-icon":{width:0,height:0,borderInlineEnd:"3.5px solid transparent",borderBlockEnd:"9px solid #000",borderInlineStart:"3.5px solid transparent","&-up":{transform:"rotate(0deg)"},"&-down":{transform:"rotate(180deg)"}},"&-content":{width:"100%"},"&-description":{width:"100%"}},(0,kt.Z)(Nt,"".concat(Zt.antCls,"-statistic-title"),{color:Zt.colorText}),(0,kt.Z)(Nt,"&-trend-up",(0,kt.Z)({},"".concat(Zt.antCls,"-statistic-content"),(0,kt.Z)({color:"#f5222d"},"".concat(Zt.componentCls,"-trend-icon"),{borderBlockEndColor:"#f5222d"}))),(0,kt.Z)(Nt,"&-trend-down",(0,kt.Z)({},"".concat(Zt.antCls,"-statistic-content"),(0,kt.Z)({color:"#389e0d"},"".concat(Zt.componentCls,"-trend-icon"),{borderBlockEndColor:"#52c41a"}))),(0,kt.Z)(Nt,"& &-layout-horizontal",(Ct={display:"flex",justifyContent:"space-between"},(0,kt.Z)(Ct,"".concat(Zt.antCls,"-statistic-title"),{marginBlockEnd:0}),(0,kt.Z)(Ct,"".concat(Zt.antCls,"-statistic-content-value"),{fontWeight:500}),(0,kt.Z)(Ct,"".concat(Zt.antCls,"-statistic-title,").concat(Zt.antCls,"-statistic-content,").concat(Zt.antCls,"-statistic-content-suffix,").concat(Zt.antCls,"-statistic-content-prefix,").concat(Zt.antCls,"-statistic-content-value-decimal"),{fontSize:Zt.fontSize}),Ct)),(0,kt.Z)(Nt,"& &-layout-inline",(Tt={display:"inline-flex",color:Zt.colorTextSecondary},(0,kt.Z)(Tt,"".concat(Zt.antCls,"-statistic-title"),{marginInlineEnd:"6px",marginBlockEnd:0}),(0,kt.Z)(Tt,"".concat(Zt.antCls,"-statistic-content"),{color:Zt.colorTextSecondary}),(0,kt.Z)(Tt,"".concat(Zt.antCls,"-statistic-title,").concat(Zt.antCls,"-statistic-content,").concat(Zt.antCls,"-statistic-content-suffix,").concat(Zt.antCls,"-statistic-content-prefix,").concat(Zt.antCls,"-statistic-content-value-decimal"),{fontSize:Zt.fontSizeSM}),Tt)),Nt))};function vr(Ne){return(0,_e.Xj)("Statistic",function(Zt){var Ct=(0,gt.Z)((0,gt.Z)({},Zt),{},{componentCls:".".concat(Ne)});return[qe(Ct)]})}var ie=["className","layout","style","description","children","title","tip","status","trend","prefix","icon"],qt=function(Zt){var Ct,Tt=Zt.className,Nt=Zt.layout,tt=Nt===void 0?"inline":Nt,vt=Zt.style,Ht=vt===void 0?{}:vt,he=Zt.description,jt=Zt.children,Te=Zt.title,We=Zt.tip,Qe=Zt.status,pr=Zt.trend,lr=Zt.prefix,Vr=Zt.icon,Pr=(0,k.Z)(Zt,ie),Br=(0,J.useContext)(Et.ZP.ConfigContext),Sn=Br.getPrefixCls,an=Sn("pro-card-statistic"),zn=vr(an),Zn=zn.wrapSSR,Wn=zn.hashId,Dn=yt()(an,Tt,Wn),Xn=yt()("".concat(an,"-status"),Wn),Ft=yt()("".concat(an,"-icon"),Wn),Wt=yt()("".concat(an,"-wrapper"),Wn),oe=yt()("".concat(an,"-content"),Wn),ye=yt()(Wn,(Ct={},(0,kt.Z)(Ct,"".concat(an,"-layout-").concat(tt),tt),(0,kt.Z)(Ct,"".concat(an,"-trend-").concat(pr),pr),Ct)),Ze=We&&(0,zt.jsx)(At.Z,{title:We,children:(0,zt.jsx)(Me,{className:"".concat(an,"-tip ").concat(Wn)})}),fr=yt()("".concat(an,"-trend-icon"),Wn,(0,kt.Z)({},"".concat(an,"-trend-icon-").concat(pr),pr)),_r=pr&&(0,zt.jsx)("div",{className:fr}),we=Qe&&(0,zt.jsx)("div",{className:Xn,children:(0,zt.jsx)(rt.Z,{status:Qe,text:null})}),ir=Vr&&(0,zt.jsx)("div",{className:Ft,children:Vr});return Zn((0,zt.jsxs)("div",{className:Dn,style:Ht,children:[ir,(0,zt.jsxs)("div",{className:Wt,children:[we,(0,zt.jsxs)("div",{className:oe,children:[(0,zt.jsx)(Yt,(0,gt.Z)({title:(Te||Ze)&&(0,zt.jsxs)(zt.Fragment,{children:[Te,Ze]}),prefix:(_r||lr)&&(0,zt.jsxs)(zt.Fragment,{children:[_r,lr]}),className:ye},Pr)),he&&(0,zt.jsx)("div",{className:"".concat(an,"-description ").concat(Wn),children:he})]})]})]}))},bt=qt,Xt=function(Zt){return(0,kt.Z)({},Zt.componentCls,{"&-chart":{display:"flex",flexDirection:"column",marginBlockStart:8,marginBlockEnd:8,"&-left":{marginBlockStart:0,marginInlineEnd:"16px"},"&-right":{marginBlockStart:0,marginInlineStart:"16px"}},"&-content":{display:"flex",flexDirection:"column","&-horizontal":(0,kt.Z)({flexDirection:"row"},"".concat(Zt.componentCls,"-chart"),{alignItems:"center",alignSelf:"flex-start"})},"&-footer":{marginBlockStart:8,paddingBlockStart:"16px",borderBlockStart:"rgba(0, 0, 0, 0.08) solid ".concat(Zt.colorBorder)}})};function $t(Ne){return(0,_e.Xj)("StatisticCard",function(Zt){var Ct=(0,gt.Z)((0,gt.Z)({},Zt),{},{componentCls:".".concat(Ne)});return[Xt(Ct)]})}var xt=["children","statistic","className","chart","chartPlacement","footer"],wt=function(Zt){var Ct,Tt=Zt.children,Nt=Zt.statistic,tt=Zt.className,vt=Zt.chart,Ht=Zt.chartPlacement,he=Zt.footer,jt=(0,k.Z)(Zt,xt),Te=(0,J.useContext)(Et.ZP.ConfigContext),We=Te.getPrefixCls,Qe=We("pro-statistic-card"),pr=$t(Qe),lr=pr.wrapSSR,Vr=pr.hashId,Pr=yt()(Qe,tt,Vr),Br=Nt&&(0,zt.jsx)(bt,(0,gt.Z)({layout:"vertical"},Nt)),Sn=yt()("".concat(Qe,"-chart"),Vr,(Ct={},(0,kt.Z)(Ct,"".concat(Qe,"-chart-left"),Ht==="left"&&vt&&Nt),(0,kt.Z)(Ct,"".concat(Qe,"-chart-right"),Ht==="right"&&vt&&Nt),Ct)),an=vt&&(0,zt.jsx)("div",{className:Sn,children:vt}),zn=yt()("".concat(Qe,"-content "),Vr,(0,kt.Z)({},"".concat(Qe,"-content-horizontal"),Ht==="left"||Ht==="right")),Zn=(an||Br)&&(Ht==="left"?(0,zt.jsxs)("div",{className:zn,children:[an,Br]}):(0,zt.jsxs)("div",{className:zn,children:[Br,an]})),Wn=he&&(0,zt.jsx)("div",{className:"".concat(Qe,"-footer ").concat(Vr),children:he});return lr((0,zt.jsxs)(pt.Z,(0,gt.Z)((0,gt.Z)({className:Pr},jt),{},{children:[Zn,Tt,Wn]})))},ue=function(Zt){return(0,zt.jsx)(wt,(0,gt.Z)({bodyStyle:{padding:0}},Zt))};wt.Statistic=bt,wt.Divider=et.Z,wt.Operation=b,wt.isProCard=!0,wt.Group=ue;var Ie=wt},71452:function(pn,Ot,nt){"use strict";nt.d(Ot,{Z:function(){return yt}});var kt,gt,k,Et;function K(){kt=document.createElement("table"),gt=document.createElement("tr"),k=/^\s*<(\w+|!)[^>]*>/,Et={tr:document.createElement("tbody"),tbody:kt,thead:kt,tfoot:kt,td:gt,th:gt,"*":document.createElement("div")}}function yt(J){kt||K();var pt=k.test(J)&&RegExp.$1;(!pt||!(pt in Et))&&(pt="*");var et=Et[pt];J=typeof J=="string"?J.replace(/(^\s*)|(\s*$)/g,""):J,et.innerHTML=""+J;var _e=et.childNodes[0];return _e&&et.contains(_e)&&et.removeChild(_e),_e}},85306:function(pn,Ot,nt){"use strict";nt.d(Ot,{Z:function(){return kt}});function kt(gt,k){if(gt)for(var Et in k)k.hasOwnProperty(Et)&&(gt.style[Et]=k[Et]);return gt}},42090:function(pn,Ot){"use strict";var nt="*",kt=function(){function gt(){this._events={}}return gt.prototype.on=function(k,Et,K){return this._events[k]||(this._events[k]=[]),this._events[k].push({callback:Et,once:!!K}),this},gt.prototype.once=function(k,Et){return this.on(k,Et,!0)},gt.prototype.emit=function(k){for(var Et=this,K=[],yt=1;yt<arguments.length;yt++)K[yt-1]=arguments[yt];var J=this._events[k]||[],pt=this._events[nt]||[],et=function(_e){for(var ot=_e.length,ut=0;ut<ot;ut++)if(_e[ut]){var zt=_e[ut],P=zt.callback,b=zt.once;b&&(_e.splice(ut,1),_e.length===0&&delete Et._events[k],ot--,ut--),P.apply(Et,K)}};et(J),et(pt)},gt.prototype.off=function(k,Et){if(!k)this._events={};else if(!Et)delete this._events[k];else{for(var K=this._events[k]||[],yt=K.length,J=0;J<yt;J++)K[J].callback===Et&&(K.splice(J,1),yt--,J--);K.length===0&&delete this._events[k]}return this},gt.prototype.getEvents=function(){return this._events},gt}();Ot.Z=kt},53079:function(pn,Ot,nt){"use strict";var kt=nt(29268),gt=nt(42090),k=nt(91220),Et=function(K){(0,kt.ZT)(yt,K);function yt(J){var pt=K.call(this)||this;pt.destroyed=!1;var et=pt.getDefaultCfg();return pt.cfg=(0,k.CD)(et,J),pt}return yt.prototype.getDefaultCfg=function(){return{}},yt.prototype.get=function(J){return this.cfg[J]},yt.prototype.set=function(J,pt){this.cfg[J]=pt},yt.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},yt}(gt.Z);Ot.Z=Et},32632:function(pn,Ot,nt){"use strict";nt.d(Ot,{Z:function(){return bo}});var kt=nt(29268),gt=nt(74348),k=nt(51030),Et=nt(91220),K=nt(22374),yt=0,J=0,pt=0,et=1e3,_e,ot,ut=0,zt=0,P=0,b=typeof performance=="object"&&performance.now?performance:Date,W=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(rr){setTimeout(rr,17)};function le(){return zt||(W(be),zt=b.now()+P)}function be(){zt=0}function Me(){this._call=this._time=this._next=null}Me.prototype=At.prototype={constructor:Me,restart:function(rr,de,Ve){if(typeof rr!="function")throw new TypeError("callback is not a function");Ve=(Ve==null?le():+Ve)+(de==null?0:+de),!this._next&&ot!==this&&(ot?ot._next=this:_e=this,ot=this),this._call=rr,this._time=Ve,Ge()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ge())}};function At(rr,de,Ve){var Mr=new Me;return Mr.restart(rr,de,Ve),Mr}function rt(){le(),++yt;for(var rr=_e,de;rr;)(de=zt-rr._time)>=0&&rr._call.call(null,de),rr=rr._next;--yt}function Dt(){zt=(ut=b.now())+P,yt=J=0;try{rt()}finally{yt=0,ge(),zt=0}}function Ee(){var rr=b.now(),de=rr-ut;de>et&&(P-=de,ut=rr)}function ge(){for(var rr,de=_e,Ve,Mr=1/0;de;)de._call?(Mr>de._time&&(Mr=de._time),rr=de,de=de._next):(Ve=de._next,de._next=null,de=rr?rr._next=Ve:_e=Ve);ot=rr,Ge(Mr)}function Ge(rr){if(!yt){J&&(J=clearTimeout(J));var de=rr-zt;de>24?(rr<1/0&&(J=setTimeout(Dt,rr-b.now()-P)),pt&&(pt=clearInterval(pt))):(pt||(ut=b.now(),pt=setInterval(Ee,et)),yt=1,W(Dt))}}var Ue=nt(4620);function xe(rr,de,Ve){rr.prototype=de.prototype=Ve,Ve.constructor=rr}function Ke(rr,de){var Ve=Object.create(rr.prototype);for(var Mr in de)Ve[Mr]=de[Mr];return Ve}function Lt(){}var Jt=.7,ft=1/Jt,St="\\s*([+-]?\\d+)\\s*",Y="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",se=/^#([0-9a-f]{3,8})$/,ke=new RegExp("^rgb\\(".concat(St,",").concat(St,",").concat(St,"\\)$")),Le=new RegExp("^rgb\\(".concat(mt,",").concat(mt,",").concat(mt,"\\)$")),Be=new RegExp("^rgba\\(".concat(St,",").concat(St,",").concat(St,",").concat(Y,"\\)$")),Bt=new RegExp("^rgba\\(".concat(mt,",").concat(mt,",").concat(mt,",").concat(Y,"\\)$")),ee=new RegExp("^hsl\\(".concat(Y,",").concat(mt,",").concat(mt,"\\)$")),me=new RegExp("^hsla\\(".concat(Y,",").concat(mt,",").concat(mt,",").concat(Y,"\\)$")),Yt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};xe(Lt,bt,{copy:function(de){return Object.assign(new this.constructor,this,de)},displayable:function(){return this.rgb().displayable()},hex:qe,formatHex:qe,formatHex8:vr,formatHsl:ie,formatRgb:qt,toString:qt});function qe(){return this.rgb().formatHex()}function vr(){return this.rgb().formatHex8()}function ie(){return vt(this).formatHsl()}function qt(){return this.rgb().formatRgb()}function bt(rr){var de,Ve;return rr=(rr+"").trim().toLowerCase(),(de=se.exec(rr))?(Ve=de[1].length,de=parseInt(de[1],16),Ve===6?Xt(de):Ve===3?new ue(de>>8&15|de>>4&240,de>>4&15|de&240,(de&15)<<4|de&15,1):Ve===8?$t(de>>24&255,de>>16&255,de>>8&255,(de&255)/255):Ve===4?$t(de>>12&15|de>>8&240,de>>8&15|de>>4&240,de>>4&15|de&240,((de&15)<<4|de&15)/255):null):(de=ke.exec(rr))?new ue(de[1],de[2],de[3],1):(de=Le.exec(rr))?new ue(de[1]*255/100,de[2]*255/100,de[3]*255/100,1):(de=Be.exec(rr))?$t(de[1],de[2],de[3],de[4]):(de=Bt.exec(rr))?$t(de[1]*255/100,de[2]*255/100,de[3]*255/100,de[4]):(de=ee.exec(rr))?tt(de[1],de[2]/100,de[3]/100,1):(de=me.exec(rr))?tt(de[1],de[2]/100,de[3]/100,de[4]):Yt.hasOwnProperty(rr)?Xt(Yt[rr]):rr==="transparent"?new ue(NaN,NaN,NaN,0):null}function Xt(rr){return new ue(rr>>16&255,rr>>8&255,rr&255,1)}function $t(rr,de,Ve,Mr){return Mr<=0&&(rr=de=Ve=NaN),new ue(rr,de,Ve,Mr)}function xt(rr){return rr instanceof Lt||(rr=bt(rr)),rr?(rr=rr.rgb(),new ue(rr.r,rr.g,rr.b,rr.opacity)):new ue}function wt(rr,de,Ve,Mr){return arguments.length===1?xt(rr):new ue(rr,de,Ve,Mr==null?1:Mr)}function ue(rr,de,Ve,Mr){this.r=+rr,this.g=+de,this.b=+Ve,this.opacity=+Mr}xe(ue,wt,Ke(Lt,{brighter:function(de){return de=de==null?ft:Math.pow(ft,de),new ue(this.r*de,this.g*de,this.b*de,this.opacity)},darker:function(de){return de=de==null?Jt:Math.pow(Jt,de),new ue(this.r*de,this.g*de,this.b*de,this.opacity)},rgb:function(){return this},clamp:function(){return new ue(Tt(this.r),Tt(this.g),Tt(this.b),Ct(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ie,formatHex:Ie,formatHex8:Ne,formatRgb:Zt,toString:Zt}));function Ie(){return"#".concat(Nt(this.r)).concat(Nt(this.g)).concat(Nt(this.b))}function Ne(){return"#".concat(Nt(this.r)).concat(Nt(this.g)).concat(Nt(this.b)).concat(Nt((isNaN(this.opacity)?1:this.opacity)*255))}function Zt(){var rr=Ct(this.opacity);return"".concat(rr===1?"rgb(":"rgba(").concat(Tt(this.r),", ").concat(Tt(this.g),", ").concat(Tt(this.b)).concat(rr===1?")":", ".concat(rr,")"))}function Ct(rr){return isNaN(rr)?1:Math.max(0,Math.min(1,rr))}function Tt(rr){return Math.max(0,Math.min(255,Math.round(rr)||0))}function Nt(rr){return rr=Tt(rr),(rr<16?"0":"")+rr.toString(16)}function tt(rr,de,Ve,Mr){return Mr<=0?rr=de=Ve=NaN:Ve<=0||Ve>=1?rr=de=NaN:de<=0&&(rr=NaN),new he(rr,de,Ve,Mr)}function vt(rr){if(rr instanceof he)return new he(rr.h,rr.s,rr.l,rr.opacity);if(rr instanceof Lt||(rr=bt(rr)),!rr)return new he;if(rr instanceof he)return rr;rr=rr.rgb();var de=rr.r/255,Ve=rr.g/255,Mr=rr.b/255,rn=Math.min(de,Ve,Mr),kn=Math.max(de,Ve,Mr),$n=NaN,Cn=kn-rn,Ki=(kn+rn)/2;return Cn?(de===kn?$n=(Ve-Mr)/Cn+(Ve<Mr)*6:Ve===kn?$n=(Mr-de)/Cn+2:$n=(de-Ve)/Cn+4,Cn/=Ki<.5?kn+rn:2-kn-rn,$n*=60):Cn=Ki>0&&Ki<1?0:$n,new he($n,Cn,Ki,rr.opacity)}function Ht(rr,de,Ve,Mr){return arguments.length===1?vt(rr):new he(rr,de,Ve,Mr==null?1:Mr)}function he(rr,de,Ve,Mr){this.h=+rr,this.s=+de,this.l=+Ve,this.opacity=+Mr}xe(he,Ht,Ke(Lt,{brighter:function(de){return de=de==null?ft:Math.pow(ft,de),new he(this.h,this.s,this.l*de,this.opacity)},darker:function(de){return de=de==null?Jt:Math.pow(Jt,de),new he(this.h,this.s,this.l*de,this.opacity)},rgb:function(){var de=this.h%360+(this.h<0)*360,Ve=isNaN(de)||isNaN(this.s)?0:this.s,Mr=this.l,rn=Mr+(Mr<.5?Mr:1-Mr)*Ve,kn=2*Mr-rn;return new ue(We(de>=240?de-240:de+120,kn,rn),We(de,kn,rn),We(de<120?de+240:de-120,kn,rn),this.opacity)},clamp:function(){return new he(jt(this.h),Te(this.s),Te(this.l),Ct(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var de=Ct(this.opacity);return"".concat(de===1?"hsl(":"hsla(").concat(jt(this.h),", ").concat(Te(this.s)*100,"%, ").concat(Te(this.l)*100,"%").concat(de===1?")":", ".concat(de,")"))}}));function jt(rr){return rr=(rr||0)%360,rr<0?rr+360:rr}function Te(rr){return Math.max(0,Math.min(1,rr||0))}function We(rr,de,Ve){return(rr<60?de+(Ve-de)*rr/60:rr<180?Ve:rr<240?de+(Ve-de)*(240-rr)/60:de)*255}function Qe(rr,de,Ve,Mr,rn){var kn=rr*rr,$n=kn*rr;return((1-3*rr+3*kn-$n)*de+(4-6*kn+3*$n)*Ve+(1+3*rr+3*kn-3*$n)*Mr+$n*rn)/6}function pr(rr){var de=rr.length-1;return function(Ve){var Mr=Ve<=0?Ve=0:Ve>=1?(Ve=1,de-1):Math.floor(Ve*de),rn=rr[Mr],kn=rr[Mr+1],$n=Mr>0?rr[Mr-1]:2*rn-kn,Cn=Mr<de-1?rr[Mr+2]:2*kn-rn;return Qe((Ve-Mr/de)*de,$n,rn,kn,Cn)}}function lr(rr){var de=rr.length;return function(Ve){var Mr=Math.floor(((Ve%=1)<0?++Ve:Ve)*de),rn=rr[(Mr+de-1)%de],kn=rr[Mr%de],$n=rr[(Mr+1)%de],Cn=rr[(Mr+2)%de];return Qe((Ve-Mr/de)*de,rn,kn,$n,Cn)}}var Vr=function(rr){return function(){return rr}};function Pr(rr,de){return function(Ve){return rr+Ve*de}}function Br(rr,de,Ve){return rr=Math.pow(rr,Ve),de=Math.pow(de,Ve)-rr,Ve=1/Ve,function(Mr){return Math.pow(rr+Mr*de,Ve)}}function Sn(rr,de){var Ve=de-rr;return Ve?Pr(rr,Ve>180||Ve<-180?Ve-360*Math.round(Ve/360):Ve):constant(isNaN(rr)?de:rr)}function an(rr){return(rr=+rr)==1?zn:function(de,Ve){return Ve-de?Br(de,Ve,rr):Vr(isNaN(de)?Ve:de)}}function zn(rr,de){var Ve=de-rr;return Ve?Pr(rr,Ve):Vr(isNaN(rr)?de:rr)}var Zn=function rr(de){var Ve=an(de);function Mr(rn,kn){var $n=Ve((rn=wt(rn)).r,(kn=wt(kn)).r),Cn=Ve(rn.g,kn.g),Ki=Ve(rn.b,kn.b),Fa=zn(rn.opacity,kn.opacity);return function(Ss){return rn.r=$n(Ss),rn.g=Cn(Ss),rn.b=Ki(Ss),rn.opacity=Fa(Ss),rn+""}}return Mr.gamma=rr,Mr}(1);function Wn(rr){return function(de){var Ve=de.length,Mr=new Array(Ve),rn=new Array(Ve),kn=new Array(Ve),$n,Cn;for($n=0;$n<Ve;++$n)Cn=wt(de[$n]),Mr[$n]=Cn.r||0,rn[$n]=Cn.g||0,kn[$n]=Cn.b||0;return Mr=rr(Mr),rn=rr(rn),kn=rr(kn),Cn.opacity=1,function(Ki){return Cn.r=Mr(Ki),Cn.g=rn(Ki),Cn.b=kn(Ki),Cn+""}}}var Dn=Wn(pr),Xn=Wn(lr);function Ft(rr,de){de||(de=[]);var Ve=rr?Math.min(de.length,rr.length):0,Mr=de.slice(),rn;return function(kn){for(rn=0;rn<Ve;++rn)Mr[rn]=rr[rn]*(1-kn)+de[rn]*kn;return Mr}}function Wt(rr){return ArrayBuffer.isView(rr)&&!(rr instanceof DataView)}function oe(rr,de){return(Wt(de)?Ft:ye)(rr,de)}function ye(rr,de){var Ve=de?de.length:0,Mr=rr?Math.min(Ve,rr.length):0,rn=new Array(Mr),kn=new Array(Ve),$n;for($n=0;$n<Mr;++$n)rn[$n]=Yr(rr[$n],de[$n]);for(;$n<Ve;++$n)kn[$n]=de[$n];return function(Cn){for($n=0;$n<Mr;++$n)kn[$n]=rn[$n](Cn);return kn}}function Ze(rr,de){var Ve=new Date;return rr=+rr,de=+de,function(Mr){return Ve.setTime(rr*(1-Mr)+de*Mr),Ve}}function fr(rr,de){return rr=+rr,de=+de,function(Ve){return rr*(1-Ve)+de*Ve}}function _r(rr,de){var Ve={},Mr={},rn;(rr===null||Ue(rr)!=="object")&&(rr={}),(de===null||Ue(de)!=="object")&&(de={});for(rn in de)rn in rr?Ve[rn]=Yr(rr[rn],de[rn]):Mr[rn]=de[rn];return function(kn){for(rn in Ve)Mr[rn]=Ve[rn](kn);return Mr}}var we=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ir=new RegExp(we.source,"g");function Hr(rr){return function(){return rr}}function In(rr){return function(de){return rr(de)+""}}function nn(rr,de){var Ve=we.lastIndex=ir.lastIndex=0,Mr,rn,kn,$n=-1,Cn=[],Ki=[];for(rr=rr+"",de=de+"";(Mr=we.exec(rr))&&(rn=ir.exec(de));)(kn=rn.index)>Ve&&(kn=de.slice(Ve,kn),Cn[$n]?Cn[$n]+=kn:Cn[++$n]=kn),(Mr=Mr[0])===(rn=rn[0])?Cn[$n]?Cn[$n]+=rn:Cn[++$n]=rn:(Cn[++$n]=null,Ki.push({i:$n,x:fr(Mr,rn)})),Ve=ir.lastIndex;return Ve<de.length&&(kn=de.slice(Ve),Cn[$n]?Cn[$n]+=kn:Cn[++$n]=kn),Cn.length<2?Ki[0]?In(Ki[0].x):Hr(de):(de=Ki.length,function(Fa){for(var Ss=0,ko;Ss<de;++Ss)Cn[(ko=Ki[Ss]).i]=ko.x(Fa);return Cn.join("")})}function Yr(rr,de){var Ve=Ue(de),Mr;return de==null||Ve==="boolean"?Vr(de):(Ve==="number"?fr:Ve==="string"?(Mr=bt(de))?(de=Mr,Zn):nn:de instanceof bt?Zn:de instanceof Date?Ze:Wt(de)?Ft:Array.isArray(de)?ye:typeof de.valueOf!="function"&&typeof de.toString!="function"||isNaN(de)?_r:fr)(rr,de)}var On=nt(97338),bi=nt(63007),Mi=function(rr){return["fill","stroke","fillStyle","strokeStyle"].includes(rr)},tn=function(rr){return/^[r,R,L,l]{1}[\s]*\(/.test(rr)},mi=[1,0,0,0,1,0,0,0,1];function Yn(rr,de,Ve){var Mr={},rn=de.fromAttrs,kn=de.toAttrs;if(!rr.destroyed){var $n;for(var Cn in kn)if(!(0,K.Xy)(rn[Cn],kn[Cn]))if(Cn==="path"){var Ki=kn[Cn],Fa=rn[Cn];Ki.length>Fa.length?(Ki=bi.parsePathString(kn[Cn]),Fa=bi.parsePathString(rn[Cn]),Fa=bi.fillPathByDiff(Fa,Ki),Fa=bi.formatPath(Fa,Ki),de.fromAttrs.path=Fa,de.toAttrs.path=Ki):de.pathFormatted||(Ki=bi.parsePathString(kn[Cn]),Fa=bi.parsePathString(rn[Cn]),Fa=bi.formatPath(Fa,Ki),de.fromAttrs.path=Fa,de.toAttrs.path=Ki,de.pathFormatted=!0),Mr[Cn]=[];for(var Ss=0;Ss<Ki.length;Ss++){for(var ko=Ki[Ss],zo=Fa[Ss],oo=[],Xo=0;Xo<ko.length;Xo++)(0,K.hj)(ko[Xo])&&zo&&(0,K.hj)(zo[Xo])?($n=Yr(zo[Xo],ko[Xo]),oo.push($n(Ve))):oo.push(ko[Xo]);Mr[Cn].push(oo)}}else if(Cn==="matrix"){var iu=oe(rn[Cn]||mi,kn[Cn]||mi),Ko=iu(Ve);Mr[Cn]=Ko}else Mi(Cn)&&tn(kn[Cn])?Mr[Cn]=kn[Cn]:(0,K.mf)(kn[Cn])||($n=Yr(rn[Cn],kn[Cn]),Mr[Cn]=$n(Ve));rr.attr(Mr)}}function fi(rr,de,Ve){var Mr=de.startTime,rn=de.delay;if(Ve<Mr+rn||de._paused)return!1;var kn,$n=de.duration,Cn=de.easing,Ki=(0,On._)(Cn);if(Ve=Ve-Mr-de.delay,de.repeat)kn=Ve%$n/$n,kn=Ki(kn);else if(kn=Ve/$n,kn<1)kn=Ki(kn);else return de.onFrame?rr.attr(de.onFrame(1)):rr.attr(de.toAttrs),!0;if(de.onFrame){var Fa=de.onFrame(kn);rr.attr(Fa)}else Yn(rr,de,kn);return!1}var Ea=function(){function rr(de){this.animators=[],this.current=0,this.timer=null,this.canvas=de}return rr.prototype.initTimer=function(){var de=this,Ve=!1,Mr,rn,kn;this.timer=At(function($n){if(de.current=$n,de.animators.length>0){for(var Cn=de.animators.length-1;Cn>=0;Cn--){if(Mr=de.animators[Cn],Mr.destroyed){de.removeAnimator(Cn);continue}if(!Mr.isAnimatePaused()){rn=Mr.get("animations");for(var Ki=rn.length-1;Ki>=0;Ki--)kn=rn[Ki],Ve=fi(Mr,kn,$n),Ve&&(rn.splice(Ki,1),Ve=!1,kn.callback&&kn.callback())}rn.length===0&&de.removeAnimator(Cn)}var Fa=de.canvas.get("autoDraw");Fa||de.canvas.draw()}})},rr.prototype.addAnimator=function(de){this.animators.push(de)},rr.prototype.removeAnimator=function(de){this.animators.splice(de,1)},rr.prototype.isAnimating=function(){return!!this.animators.length},rr.prototype.stop=function(){this.timer&&this.timer.stop()},rr.prototype.stopAllAnimations=function(de){de===void 0&&(de=!0),this.animators.forEach(function(Ve){Ve.stopAnimate(de)}),this.animators=[],this.canvas.draw()},rr.prototype.getTime=function(){return this.current},rr}(),si=Ea,Ia=nt(83302),vo=40,Oa=0,Ha=":",wa=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function ya(rr,de){for(var Ve in rr)if(rr.hasOwnProperty(Ve)&&Ve.indexOf(Ha+de)>=0)return!0;return!1}function Qa(rr,de,Ve){Ve.name=de,Ve.target=rr,Ve.currentTarget=rr,Ve.delegateTarget=rr,rr.emit(de,Ve)}function Wo(rr,de,Ve){if(Ve.bubbles){var Mr=void 0,rn=!1;if(de==="mouseenter"?(Mr=Ve.fromShape,rn=!0):de==="mouseleave"&&(rn=!0,Mr=Ve.toShape),rr.isCanvas()&&rn)return;if(Mr&&(0,Et.UY)(rr,Mr)){Ve.bubbles=!1;return}Ve.name=de,Ve.currentTarget=rr,Ve.delegateTarget=rr,rr.emit(de,Ve)}}var yo=function(){function rr(de){var Ve=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(Mr){var rn=Mr.type;Ve._triggerEvent(rn,Mr)},this._onDocumentMove=function(Mr){var rn=Ve.canvas,kn=rn.get("el");if(kn!==Mr.target&&(Ve.dragging||Ve.currentShape)){var $n=Ve._getPointInfo(Mr);Ve.dragging&&Ve._emitEvent("drag",Mr,$n,Ve.draggingShape)}},this._onDocumentMouseUp=function(Mr){var rn=Ve.canvas,kn=rn.get("el");if(kn!==Mr.target&&Ve.dragging){var $n=Ve._getPointInfo(Mr);Ve.draggingShape&&Ve._emitEvent("drop",Mr,$n,null),Ve._emitEvent("dragend",Mr,$n,Ve.draggingShape),Ve._afterDrag(Ve.draggingShape,$n,Mr)}},this.canvas=de.canvas}return rr.prototype.init=function(){this._bindEvents()},rr.prototype._bindEvents=function(){var de=this,Ve=this.canvas.get("el");(0,Et.S6)(wa,function(Mr){Ve.addEventListener(Mr,de._eventCallback)}),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},rr.prototype._clearEvents=function(){var de=this,Ve=this.canvas.get("el");(0,Et.S6)(wa,function(Mr){Ve.removeEventListener(Mr,de._eventCallback)}),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},rr.prototype._getEventObj=function(de,Ve,Mr,rn,kn,$n){var Cn=new Ia.Z(de,Ve);return Cn.fromShape=kn,Cn.toShape=$n,Cn.x=Mr.x,Cn.y=Mr.y,Cn.clientX=Mr.clientX,Cn.clientY=Mr.clientY,Cn.propagationPath.push(rn),Cn},rr.prototype._getShape=function(de,Ve){return this.canvas.getShape(de.x,de.y,Ve)},rr.prototype._getPointInfo=function(de){var Ve=this.canvas,Mr=Ve.getClientByEvent(de),rn=Ve.getPointByEvent(de);return{x:rn.x,y:rn.y,clientX:Mr.x,clientY:Mr.y}},rr.prototype._triggerEvent=function(de,Ve){var Mr=this._getPointInfo(Ve),rn=this._getShape(Mr,Ve),kn=this["_on"+de],$n=!1;if(kn)kn.call(this,Mr,rn,Ve);else{var Cn=this.currentShape;de==="mouseenter"||de==="dragenter"||de==="mouseover"?(this._emitEvent(de,Ve,Mr,null,null,rn),rn&&this._emitEvent(de,Ve,Mr,rn,null,rn),de==="mouseenter"&&this.draggingShape&&this._emitEvent("dragenter",Ve,Mr,null)):de==="mouseleave"||de==="dragleave"||de==="mouseout"?($n=!0,Cn&&this._emitEvent(de,Ve,Mr,Cn,Cn,null),this._emitEvent(de,Ve,Mr,null,Cn,null),de==="mouseleave"&&this.draggingShape&&this._emitEvent("dragleave",Ve,Mr,null)):this._emitEvent(de,Ve,Mr,rn,null,null)}if($n||(this.currentShape=rn),rn&&!rn.get("destroyed")){var Ki=this.canvas,Fa=Ki.get("el");Fa.style.cursor=rn.attr("cursor")||Ki.get("cursor")}},rr.prototype._onmousedown=function(de,Ve,Mr){Mr.button===Oa&&(this.mousedownShape=Ve,this.mousedownPoint=de,this.mousedownTimeStamp=Mr.timeStamp),this._emitEvent("mousedown",Mr,de,Ve,null,null)},rr.prototype._emitMouseoverEvents=function(de,Ve,Mr,rn){var kn=this.canvas.get("el");Mr!==rn&&(Mr&&(this._emitEvent("mouseout",de,Ve,Mr,Mr,rn),this._emitEvent("mouseleave",de,Ve,Mr,Mr,rn),(!rn||rn.get("destroyed"))&&(kn.style.cursor=this.canvas.get("cursor"))),rn&&(this._emitEvent("mouseover",de,Ve,rn,Mr,rn),this._emitEvent("mouseenter",de,Ve,rn,Mr,rn)))},rr.prototype._emitDragoverEvents=function(de,Ve,Mr,rn,kn){rn?(rn!==Mr&&(Mr&&this._emitEvent("dragleave",de,Ve,Mr,Mr,rn),this._emitEvent("dragenter",de,Ve,rn,Mr,rn)),kn||this._emitEvent("dragover",de,Ve,rn)):Mr&&this._emitEvent("dragleave",de,Ve,Mr,Mr,rn),kn&&this._emitEvent("dragover",de,Ve,rn)},rr.prototype._afterDrag=function(de,Ve,Mr){de&&(de.set("capture",!0),this.draggingShape=null),this.dragging=!1;var rn=this._getShape(Ve,Mr);rn!==de&&this._emitMouseoverEvents(Mr,Ve,de,rn),this.currentShape=rn},rr.prototype._onmouseup=function(de,Ve,Mr){if(Mr.button===Oa){var rn=this.draggingShape;this.dragging?(rn&&this._emitEvent("drop",Mr,de,Ve),this._emitEvent("dragend",Mr,de,rn),this._afterDrag(rn,de,Mr)):(this._emitEvent("mouseup",Mr,de,Ve),Ve===this.mousedownShape&&this._emitEvent("click",Mr,de,Ve),this.mousedownShape=null,this.mousedownPoint=null)}},rr.prototype._ondragover=function(de,Ve,Mr){Mr.preventDefault();var rn=this.currentShape;this._emitDragoverEvents(Mr,de,rn,Ve,!0)},rr.prototype._onmousemove=function(de,Ve,Mr){var rn=this.canvas,kn=this.currentShape,$n=this.draggingShape;if(this.dragging)$n&&this._emitDragoverEvents(Mr,de,kn,Ve,!1),this._emitEvent("drag",Mr,de,$n);else{var Cn=this.mousedownPoint;if(Cn){var Ki=this.mousedownShape,Fa=Mr.timeStamp,Ss=Fa-this.mousedownTimeStamp,ko=Cn.clientX-de.clientX,zo=Cn.clientY-de.clientY,oo=ko*ko+zo*zo;Ss>120||oo>vo?Ki&&Ki.get("draggable")?($n=this.mousedownShape,$n.set("capture",!1),this.draggingShape=$n,this.dragging=!0,this._emitEvent("dragstart",Mr,de,$n),this.mousedownShape=null,this.mousedownPoint=null):!Ki&&rn.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",Mr,de,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(Mr,de,kn,Ve),this._emitEvent("mousemove",Mr,de,Ve)):(this._emitMouseoverEvents(Mr,de,kn,Ve),this._emitEvent("mousemove",Mr,de,Ve))}else this._emitMouseoverEvents(Mr,de,kn,Ve),this._emitEvent("mousemove",Mr,de,Ve)}},rr.prototype._emitEvent=function(de,Ve,Mr,rn,kn,$n){var Cn=this._getEventObj(de,Ve,Mr,rn,kn,$n);if(rn){Cn.shape=rn,Qa(rn,de,Cn);for(var Ki=rn.getParent();Ki;)Ki.emitDelegation(de,Cn),Cn.propagationStopped||Wo(Ki,de,Cn),Cn.propagationPath.push(Ki),Ki=Ki.getParent()}else{var Fa=this.canvas;Qa(Fa,de,Cn)}},rr.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},rr}(),Va=yo,Ya="px",No=(0,gt.qY)(),Nu=No&&No.name==="firefox",ts=function(rr){(0,kt.ZT)(de,rr);function de(Ve){var Mr=rr.call(this,Ve)||this;return Mr.initContainer(),Mr.initDom(),Mr.initEvents(),Mr.initTimeline(),Mr}return de.prototype.getDefaultCfg=function(){var Ve=rr.prototype.getDefaultCfg.call(this);return Ve.cursor="default",Ve.supportCSSTransform=!1,Ve},de.prototype.initContainer=function(){var Ve=this.get("container");(0,Et.HD)(Ve)&&(Ve=document.getElementById(Ve),this.set("container",Ve))},de.prototype.initDom=function(){var Ve=this.createDom();this.set("el",Ve);var Mr=this.get("container");Mr.appendChild(Ve),this.setDOMSize(this.get("width"),this.get("height"))},de.prototype.initEvents=function(){var Ve=new Va({canvas:this});Ve.init(),this.set("eventController",Ve)},de.prototype.initTimeline=function(){var Ve=new si(this);this.set("timeline",Ve)},de.prototype.setDOMSize=function(Ve,Mr){var rn=this.get("el");Et.jU&&(rn.style.width=Ve+Ya,rn.style.height=Mr+Ya)},de.prototype.changeSize=function(Ve,Mr){this.setDOMSize(Ve,Mr),this.set("width",Ve),this.set("height",Mr),this.onCanvasChange("changeSize")},de.prototype.getRenderer=function(){return this.get("renderer")},de.prototype.getCursor=function(){return this.get("cursor")},de.prototype.setCursor=function(Ve){this.set("cursor",Ve);var Mr=this.get("el");Et.jU&&Mr&&(Mr.style.cursor=Ve)},de.prototype.getPointByEvent=function(Ve){var Mr=this.get("supportCSSTransform");if(Mr){if(Nu&&!(0,Et.kK)(Ve.layerX)&&Ve.layerX!==Ve.offsetX)return{x:Ve.layerX,y:Ve.layerY};if(!(0,Et.kK)(Ve.offsetX))return{x:Ve.offsetX,y:Ve.offsetY}}var rn=this.getClientByEvent(Ve),kn=rn.x,$n=rn.y;return this.getPointByClient(kn,$n)},de.prototype.getClientByEvent=function(Ve){var Mr=Ve;return Ve.touches&&(Ve.type==="touchend"?Mr=Ve.changedTouches[0]:Mr=Ve.touches[0]),{x:Mr.clientX,y:Mr.clientY}},de.prototype.getPointByClient=function(Ve,Mr){var rn=this.get("el"),kn=rn.getBoundingClientRect();return{x:Ve-kn.left,y:Mr-kn.top}},de.prototype.getClientByPoint=function(Ve,Mr){var rn=this.get("el"),kn=rn.getBoundingClientRect();return{x:Ve+kn.left,y:Mr+kn.top}},de.prototype.draw=function(){},de.prototype.removeDom=function(){var Ve=this.get("el");Ve.parentNode.removeChild(Ve)},de.prototype.clearEvents=function(){var Ve=this.get("eventController");Ve.destroy()},de.prototype.isCanvas=function(){return!0},de.prototype.getParent=function(){return null},de.prototype.destroy=function(){var Ve=this.get("timeline");this.get("destroyed")||(this.clear(),Ve&&Ve.stop(),this.clearEvents(),this.removeDom(),rr.prototype.destroy.call(this))},de}(k.Z),bo=ts},51030:function(pn,Ot,nt){"use strict";var kt=nt(29268),gt=nt(22374),k=nt(16087),Et=nt(91220),K={},yt="_INDEX";function J(zt,P){if(zt.set("canvas",P),zt.isGroup()){var b=zt.get("children");b.length&&b.forEach(function(W){J(W,P)})}}function pt(zt,P){if(zt.set("timeline",P),zt.isGroup()){var b=zt.get("children");b.length&&b.forEach(function(W){pt(W,P)})}}function et(zt,P){var b=zt.getChildren();return b.indexOf(P)>=0}function _e(zt,P,b){b===void 0&&(b=!0),b?P.destroy():(P.set("parent",null),P.set("canvas",null)),(0,Et.As)(zt.getChildren(),P)}function ot(zt){return function(P,b){var W=zt(P,b);return W===0?P[yt]-b[yt]:W}}var ut=function(zt){(0,kt.ZT)(P,zt);function P(){return zt!==null&&zt.apply(this,arguments)||this}return P.prototype.isCanvas=function(){return!1},P.prototype.getBBox=function(){var b=1/0,W=-1/0,le=1/0,be=-1/0,Me=[],At=[],rt=this.getChildren().filter(function(Ee){return Ee.get("visible")&&(!Ee.isGroup()||Ee.isGroup()&&Ee.getChildren().length>0)});rt.length>0?((0,Et.S6)(rt,function(Ee){var ge=Ee.getBBox();Me.push(ge.minX,ge.maxX),At.push(ge.minY,ge.maxY)}),b=(0,gt.VV)(Me),W=(0,gt.Fp)(Me),le=(0,gt.VV)(At),be=(0,gt.Fp)(At)):(b=0,W=0,le=0,be=0);var Dt={x:b,y:le,minX:b,minY:le,maxX:W,maxY:be,width:W-b,height:be-le};return Dt},P.prototype.getCanvasBBox=function(){var b=1/0,W=-1/0,le=1/0,be=-1/0,Me=[],At=[],rt=this.getChildren().filter(function(Ee){return Ee.get("visible")&&(!Ee.isGroup()||Ee.isGroup()&&Ee.getChildren().length>0)});rt.length>0?((0,Et.S6)(rt,function(Ee){var ge=Ee.getCanvasBBox();Me.push(ge.minX,ge.maxX),At.push(ge.minY,ge.maxY)}),b=(0,gt.VV)(Me),W=(0,gt.Fp)(Me),le=(0,gt.VV)(At),be=(0,gt.Fp)(At)):(b=0,W=0,le=0,be=0);var Dt={x:b,y:le,minX:b,minY:le,maxX:W,maxY:be,width:W-b,height:be-le};return Dt},P.prototype.getDefaultCfg=function(){var b=zt.prototype.getDefaultCfg.call(this);return b.children=[],b},P.prototype.onAttrChange=function(b,W,le){if(zt.prototype.onAttrChange.call(this,b,W,le),b==="matrix"){var be=this.getTotalMatrix();this._applyChildrenMarix(be)}},P.prototype.applyMatrix=function(b){var W=this.getTotalMatrix();zt.prototype.applyMatrix.call(this,b);var le=this.getTotalMatrix();le!==W&&this._applyChildrenMarix(le)},P.prototype._applyChildrenMarix=function(b){var W=this.getChildren();(0,Et.S6)(W,function(le){le.applyMatrix(b)})},P.prototype.addShape=function(){for(var b=[],W=0;W<arguments.length;W++)b[W]=arguments[W];var le=b[0],be=b[1];(0,Et.Kn)(le)?be=le:be.type=le;var Me=K[be.type];Me||(Me=(0,Et.jC)(be.type),K[be.type]=Me);var At=this.getShapeBase(),rt=new At[Me](be);return this.add(rt),rt},P.prototype.addGroup=function(){for(var b=[],W=0;W<arguments.length;W++)b[W]=arguments[W];var le=b[0],be=b[1],Me;if((0,Et.mf)(le))be?Me=new le(be):Me=new le({parent:this});else{var At=le||{},rt=this.getGroupBase();Me=new rt(At)}return this.add(Me),Me},P.prototype.getCanvas=function(){var b;return this.isCanvas()?b=this:b=this.get("canvas"),b},P.prototype.getShape=function(b,W,le){if(!(0,Et.pP)(this))return null;var be=this.getChildren(),Me;if(this.isCanvas())Me=this._findShape(be,b,W,le);else{var At=[b,W,1];At=this.invertFromMatrix(At),this.isClipped(At[0],At[1])||(Me=this._findShape(be,At[0],At[1],le))}return Me},P.prototype._findShape=function(b,W,le,be){for(var Me=null,At=b.length-1;At>=0;At--){var rt=b[At];if((0,Et.pP)(rt)&&(rt.isGroup()?Me=rt.getShape(W,le,be):rt.isHit(W,le)&&(Me=rt)),Me)break}return Me},P.prototype.add=function(b){var W=this.getCanvas(),le=this.getChildren(),be=this.get("timeline"),Me=b.getParent();Me&&_e(Me,b,!1),b.set("parent",this),W&&J(b,W),be&&pt(b,be),le.push(b),b.onCanvasChange("add"),this._applyElementMatrix(b)},P.prototype._applyElementMatrix=function(b){var W=this.getTotalMatrix();W&&b.applyMatrix(W)},P.prototype.getChildren=function(){return this.get("children")},P.prototype.sort=function(){var b=this.getChildren();(0,Et.S6)(b,function(W,le){return W[yt]=le,W}),b.sort(ot(function(W,le){return W.get("zIndex")-le.get("zIndex")})),this.onCanvasChange("sort")},P.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var b=this.getChildren(),W=b.length-1;W>=0;W--)b[W].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},P.prototype.destroy=function(){this.get("destroyed")||(this.clear(),zt.prototype.destroy.call(this))},P.prototype.getFirst=function(){return this.getChildByIndex(0)},P.prototype.getLast=function(){var b=this.getChildren();return this.getChildByIndex(b.length-1)},P.prototype.getChildByIndex=function(b){var W=this.getChildren();return W[b]},P.prototype.getCount=function(){var b=this.getChildren();return b.length},P.prototype.contain=function(b){var W=this.getChildren();return W.indexOf(b)>-1},P.prototype.removeChild=function(b,W){W===void 0&&(W=!0),this.contain(b)&&b.remove(W)},P.prototype.findAll=function(b){var W=[],le=this.getChildren();return(0,Et.S6)(le,function(be){b(be)&&W.push(be),be.isGroup()&&(W=W.concat(be.findAll(b)))}),W},P.prototype.find=function(b){var W=null,le=this.getChildren();return(0,Et.S6)(le,function(be){if(b(be)?W=be:be.isGroup()&&(W=be.find(b)),W)return!1}),W},P.prototype.findById=function(b){return this.find(function(W){return W.get("id")===b})},P.prototype.findByClassName=function(b){return this.find(function(W){return W.get("className")===b})},P.prototype.findAllByName=function(b){return this.findAll(function(W){return W.get("name")===b})},P}(k.Z);Ot.Z=ut},16087:function(pn,Ot,nt){"use strict";var kt=nt(29268),gt=nt(22374),k=nt(32071),Et=nt(91220),K=nt(55885),yt=nt(53079),J=k.vs,pt="matrix",et=["zIndex","capture","visible","type"],_e=["repeat"],ot=":",ut="*";function zt(be){for(var Me=[],At=0;At<be.length;At++)(0,gt.kJ)(be[At])?Me.push([].concat(be[At])):Me.push(be[At]);return Me}function P(be,Me){var At={},rt=Me.attrs;for(var Dt in be)At[Dt]=rt[Dt];return At}function b(be,Me){var At={},rt=Me.attr();return(0,gt.S6)(be,function(Dt,Ee){_e.indexOf(Ee)===-1&&!(0,gt.Xy)(rt[Ee],Dt)&&(At[Ee]=Dt)}),At}function W(be,Me){if(Me.onFrame)return be;var At=Me.startTime,rt=Me.delay,Dt=Me.duration,Ee=Object.prototype.hasOwnProperty;return(0,gt.S6)(be,function(ge){At+rt<ge.startTime+ge.delay+ge.duration&&Dt>ge.delay&&(0,gt.S6)(Me.toAttrs,function(Ge,Ue){Ee.call(ge.toAttrs,Ue)&&(delete ge.toAttrs[Ue],delete ge.fromAttrs[Ue])})}),be}var le=function(be){(0,kt.ZT)(Me,be);function Me(At){var rt=be.call(this,At)||this;rt.attrs={};var Dt=rt.getDefaultAttrs();return(0,gt.CD)(Dt,At.attrs),rt.attrs=Dt,rt.initAttrs(Dt),rt.initAnimate(),rt}return Me.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},Me.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},Me.prototype.onCanvasChange=function(At){},Me.prototype.initAttrs=function(At){},Me.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},Me.prototype.isGroup=function(){return!1},Me.prototype.getParent=function(){return this.get("parent")},Me.prototype.getCanvas=function(){return this.get("canvas")},Me.prototype.attr=function(){for(var At,rt=[],Dt=0;Dt<arguments.length;Dt++)rt[Dt]=arguments[Dt];var Ee=rt[0],ge=rt[1];if(!Ee)return this.attrs;if((0,gt.Kn)(Ee)){for(var Ge in Ee)this.setAttr(Ge,Ee[Ge]);return this.afterAttrsChange(Ee),this}return rt.length===2?(this.setAttr(Ee,ge),this.afterAttrsChange((At={},At[Ee]=ge,At)),this):this.attrs[Ee]},Me.prototype.isClipped=function(At,rt){var Dt=this.getClip();return Dt&&!Dt.isHit(At,rt)},Me.prototype.setAttr=function(At,rt){var Dt=this.attrs[At];Dt!==rt&&(this.attrs[At]=rt,this.onAttrChange(At,rt,Dt))},Me.prototype.onAttrChange=function(At,rt,Dt){At==="matrix"&&this.set("totalMatrix",null)},Me.prototype.afterAttrsChange=function(At){if(this.cfg.isClipShape){var rt=this.cfg.applyTo;rt&&rt.onCanvasChange("clip")}else this.onCanvasChange("attr")},Me.prototype.show=function(){return this.set("visible",!0),this.onCanvasChange("show"),this},Me.prototype.hide=function(){return this.set("visible",!1),this.onCanvasChange("hide"),this},Me.prototype.setZIndex=function(At){this.set("zIndex",At);var rt=this.getParent();return rt&&rt.sort(),this},Me.prototype.toFront=function(){var At=this.getParent();if(At){var rt=At.getChildren(),Dt=this.get("el"),Ee=rt.indexOf(this);rt.splice(Ee,1),rt.push(this),this.onCanvasChange("zIndex")}},Me.prototype.toBack=function(){var At=this.getParent();if(At){var rt=At.getChildren(),Dt=this.get("el"),Ee=rt.indexOf(this);rt.splice(Ee,1),rt.unshift(this),this.onCanvasChange("zIndex")}},Me.prototype.remove=function(At){At===void 0&&(At=!0);var rt=this.getParent();rt?((0,Et.As)(rt.getChildren(),this),rt.get("clearing")||this.onCanvasChange("remove")):this.onCanvasChange("remove"),At&&this.destroy()},Me.prototype.resetMatrix=function(){this.attr(pt,this.getDefaultMatrix()),this.onCanvasChange("matrix")},Me.prototype.getMatrix=function(){return this.attr(pt)},Me.prototype.setMatrix=function(At){this.attr(pt,At),this.onCanvasChange("matrix")},Me.prototype.getTotalMatrix=function(){var At=this.cfg.totalMatrix;if(!At){var rt=this.attr("matrix"),Dt=this.cfg.parentMatrix;Dt&&rt?At=(0,K.xq)(Dt,rt):At=rt||Dt,this.set("totalMatrix",At)}return At},Me.prototype.applyMatrix=function(At){var rt=this.attr("matrix"),Dt=null;At&&rt?Dt=(0,K.xq)(At,rt):Dt=rt||At,this.set("totalMatrix",Dt),this.set("parentMatrix",At)},Me.prototype.getDefaultMatrix=function(){return null},Me.prototype.applyToMatrix=function(At){var rt=this.attr("matrix");return rt?(0,K.rG)(rt,At):At},Me.prototype.invertFromMatrix=function(At){var rt=this.attr("matrix");if(rt){var Dt=(0,K.U_)(rt);if(Dt)return(0,K.rG)(Dt,At)}return At},Me.prototype.setClip=function(At){var rt=this.getCanvas(),Dt=null;if(At){var Ee=this.getShapeBase(),ge=(0,gt.jC)(At.type),Ge=Ee[ge];Ge&&(Dt=new Ge({type:At.type,isClipShape:!0,applyTo:this,attrs:At.attrs,canvas:rt}))}return this.set("clipShape",Dt),this.onCanvasChange("clip"),Dt},Me.prototype.getClip=function(){var At=this.cfg.clipShape;return At||null},Me.prototype.clone=function(){var At=this,rt=this.attrs,Dt={};(0,gt.S6)(rt,function(Ge,Ue){(0,gt.kJ)(rt[Ue])?Dt[Ue]=zt(rt[Ue]):Dt[Ue]=rt[Ue]});var Ee=this.constructor,ge=new Ee({attrs:Dt});return(0,gt.S6)(et,function(Ge){ge.set(Ge,At.get(Ge))}),ge},Me.prototype.destroy=function(){var At=this.destroyed;At||(this.attrs={},be.prototype.destroy.call(this))},Me.prototype.isAnimatePaused=function(){return this.get("_pause").isPaused},Me.prototype.animate=function(){for(var At=[],rt=0;rt<arguments.length;rt++)At[rt]=arguments[rt];if(!(!this.get("timeline")&&!this.get("canvas"))){this.set("animating",!0);var Dt=this.get("timeline");Dt||(Dt=this.get("canvas").get("timeline"),this.set("timeline",Dt));var Ee=this.get("animations")||[];Dt.timer||Dt.initTimer();var ge=At[0],Ge=At[1],Ue=At[2],xe=Ue===void 0?"easeLinear":Ue,Ke=At[3],Lt=Ke===void 0?gt.ZT:Ke,Jt=At[4],ft=Jt===void 0?0:Jt,St,Y,mt,se,ke;(0,gt.mf)(ge)?(St=ge,ge={}):(0,gt.Kn)(ge)&&ge.onFrame&&(St=ge.onFrame,Y=ge.repeat),(0,gt.Kn)(Ge)?(ke=Ge,Ge=ke.duration,xe=ke.easing||"easeLinear",ft=ke.delay||0,Y=ke.repeat||Y||!1,Lt=ke.callback||gt.ZT,mt=ke.pauseCallback||gt.ZT,se=ke.resumeCallback||gt.ZT):((0,gt.hj)(Lt)&&(ft=Lt,Lt=null),(0,gt.mf)(xe)?(Lt=xe,xe="easeLinear"):xe=xe||"easeLinear");var Le=b(ge,this),Be={fromAttrs:P(Le,this),toAttrs:Le,duration:Ge,easing:xe,repeat:Y,callback:Lt,pauseCallback:mt,resumeCallback:se,delay:ft,startTime:Dt.getTime(),id:(0,gt.EL)(),onFrame:St,pathFormatted:!1};Ee.length>0?Ee=W(Ee,Be):Dt.addAnimator(this),Ee.push(Be),this.set("animations",Ee),this.set("_pause",{isPaused:!1})}},Me.prototype.stopAnimate=function(At){var rt=this;At===void 0&&(At=!0);var Dt=this.get("animations");(0,gt.S6)(Dt,function(Ee){At&&(Ee.onFrame?rt.attr(Ee.onFrame(1)):rt.attr(Ee.toAttrs)),Ee.callback&&Ee.callback()}),this.set("animating",!1),this.set("animations",[])},Me.prototype.pauseAnimate=function(){var At=this.get("timeline"),rt=this.get("animations"),Dt=At.getTime();return(0,gt.S6)(rt,function(Ee){Ee._paused=!0,Ee._pauseTime=Dt,Ee.pauseCallback&&Ee.pauseCallback()}),this.set("_pause",{isPaused:!0,pauseTime:Dt}),this},Me.prototype.resumeAnimate=function(){var At=this.get("timeline"),rt=At.getTime(),Dt=this.get("animations"),Ee=this.get("_pause").pauseTime;return(0,gt.S6)(Dt,function(ge){ge.startTime=ge.startTime+(rt-Ee),ge._paused=!1,ge._pauseTime=null,ge.resumeCallback&&ge.resumeCallback()}),this.set("_pause",{isPaused:!1}),this.set("animations",Dt),this},Me.prototype.emitDelegation=function(At,rt){var Dt=this,Ee=rt.propagationPath,ge=this.getEvents(),Ge;At==="mouseenter"?Ge=rt.fromShape:At==="mouseleave"&&(Ge=rt.toShape);for(var Ue=function(Jt){var ft=Ee[Jt],St=ft.get("name");if(St){if((ft.isGroup()||ft.isCanvas&&ft.isCanvas())&&Ge&&(0,Et.UY)(ft,Ge))return"break";(0,gt.kJ)(St)?(0,gt.S6)(St,function(Y){Dt.emitDelegateEvent(ft,Y,rt)}):xe.emitDelegateEvent(ft,St,rt)}},xe=this,Ke=0;Ke<Ee.length;Ke++){var Lt=Ue(Ke);if(Lt==="break")break}},Me.prototype.emitDelegateEvent=function(At,rt,Dt){var Ee=this.getEvents(),ge=rt+ot+Dt.type;(Ee[ge]||Ee[ut])&&(Dt.name=ge,Dt.currentTarget=At,Dt.delegateTarget=this,Dt.delegateObject=At.get("delegateObject"),this.emit(ge,Dt))},Me.prototype.translate=function(At,rt){At===void 0&&(At=0),rt===void 0&&(rt=0);var Dt=this.getMatrix(),Ee=J(Dt,[["t",At,rt]]);return this.setMatrix(Ee),this},Me.prototype.move=function(At,rt){var Dt=this.attr("x")||0,Ee=this.attr("y")||0;return this.translate(At-Dt,rt-Ee),this},Me.prototype.moveTo=function(At,rt){return this.move(At,rt)},Me.prototype.scale=function(At,rt){var Dt=this.getMatrix(),Ee=J(Dt,[["s",At,rt||At]]);return this.setMatrix(Ee),this},Me.prototype.rotate=function(At){var rt=this.getMatrix(),Dt=J(rt,[["r",At]]);return this.setMatrix(Dt),this},Me.prototype.rotateAtStart=function(At){var rt=this.attr(),Dt=rt.x,Ee=rt.y,ge=this.getMatrix(),Ge=J(ge,[["t",-Dt,-Ee],["r",At],["t",Dt,Ee]]);return this.setMatrix(Ge),this},Me.prototype.rotateAtPoint=function(At,rt,Dt){var Ee=this.getMatrix(),ge=J(Ee,[["t",-At,-rt],["r",Dt],["t",At,rt]]);return this.setMatrix(ge),this},Me}(yt.Z);Ot.Z=le},14629:function(pn,Ot,nt){"use strict";var kt=nt(29268),gt=nt(51030),k=function(Et){(0,kt.ZT)(K,Et);function K(){return Et!==null&&Et.apply(this,arguments)||this}return K.prototype.isGroup=function(){return!0},K.prototype.isEntityGroup=function(){return!1},K.prototype.clone=function(){for(var yt=Et.prototype.clone.call(this),J=this.getChildren(),pt=0;pt<J.length;pt++){var et=J[pt];yt.add(et.clone())}return yt},K}(gt.Z);Ot.Z=k},40073:function(pn,Ot,nt){"use strict";var kt=nt(29268),gt=nt(16087),k=nt(55885),Et=function(K){(0,kt.ZT)(yt,K);function yt(J){return K.call(this,J)||this}return yt.prototype._isInBBox=function(J,pt){var et=this.getBBox();return et.minX<=J&&et.maxX>=J&&et.minY<=pt&&et.maxY>=pt},yt.prototype.afterAttrsChange=function(J){K.prototype.afterAttrsChange.call(this,J),this.clearCacheBBox()},yt.prototype.getBBox=function(){var J=this.cfg.bbox;return J||(J=this.calculateBBox(),this.set("bbox",J)),J},yt.prototype.getCanvasBBox=function(){var J=this.cfg.canvasBBox;return J||(J=this.calculateCanvasBBox(),this.set("canvasBBox",J)),J},yt.prototype.applyMatrix=function(J){K.prototype.applyMatrix.call(this,J),this.set("canvasBBox",null)},yt.prototype.calculateCanvasBBox=function(){var J=this.getBBox(),pt=this.getTotalMatrix(),et=J.minX,_e=J.minY,ot=J.maxX,ut=J.maxY;if(pt){var zt=(0,k.rG)(pt,[J.minX,J.minY]),P=(0,k.rG)(pt,[J.maxX,J.minY]),b=(0,k.rG)(pt,[J.minX,J.maxY]),W=(0,k.rG)(pt,[J.maxX,J.maxY]);et=Math.min(zt[0],P[0],b[0],W[0]),ot=Math.max(zt[0],P[0],b[0],W[0]),_e=Math.min(zt[1],P[1],b[1],W[1]),ut=Math.max(zt[1],P[1],b[1],W[1])}var le=this.attrs;if(le.shadowColor){var be=le.shadowBlur,Me=be===void 0?0:be,At=le.shadowOffsetX,rt=At===void 0?0:At,Dt=le.shadowOffsetY,Ee=Dt===void 0?0:Dt,ge=et-Me+rt,Ge=ot+Me+rt,Ue=_e-Me+Ee,xe=ut+Me+Ee;et=Math.min(et,ge),ot=Math.max(ot,Ge),_e=Math.min(_e,Ue),ut=Math.max(ut,xe)}return{x:et,y:_e,minX:et,minY:_e,maxX:ot,maxY:ut,width:ot-et,height:ut-_e}},yt.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},yt.prototype.isClipShape=function(){return this.get("isClipShape")},yt.prototype.isInShape=function(J,pt){return!1},yt.prototype.isOnlyHitBox=function(){return!1},yt.prototype.isHit=function(J,pt){var et=this.get("startArrowShape"),_e=this.get("endArrowShape"),ot=[J,pt,1];ot=this.invertFromMatrix(ot);var ut=ot[0],zt=ot[1],P=this._isInBBox(ut,zt);return this.isOnlyHitBox()?P:!!(P&&!this.isClipped(ut,zt)&&(this.isInShape(ut,zt)||et&&et.isHit(ut,zt)||_e&&_e.isHit(ut,zt)))},yt}(gt.Z);Ot.Z=Et},97338:function(pn,Ot,nt){"use strict";nt.d(Ot,{_:function(){return $t},C:function(){return xt}});var kt={};nt.r(kt),nt.d(kt,{easeBack:function(){return me},easeBackIn:function(){return Bt},easeBackInOut:function(){return me},easeBackOut:function(){return ee},easeBounce:function(){return ke},easeBounceIn:function(){return se},easeBounceInOut:function(){return Le},easeBounceOut:function(){return ke},easeCircle:function(){return ge},easeCircleIn:function(){return Dt},easeCircleInOut:function(){return ge},easeCircleOut:function(){return Ee},easeCubic:function(){return pt},easeCubicIn:function(){return yt},easeCubicInOut:function(){return pt},easeCubicOut:function(){return J},easeElastic:function(){return qt},easeElasticIn:function(){return ie},easeElasticInOut:function(){return bt},easeElasticOut:function(){return qt},easeExp:function(){return rt},easeExpIn:function(){return Me},easeExpInOut:function(){return rt},easeExpOut:function(){return At},easeLinear:function(){return gt},easePoly:function(){return ut},easePolyIn:function(){return _e},easePolyInOut:function(){return ut},easePolyOut:function(){return ot},easeQuad:function(){return K},easeQuadIn:function(){return k},easeQuadInOut:function(){return K},easeQuadOut:function(){return Et},easeSin:function(){return le},easeSinIn:function(){return b},easeSinInOut:function(){return le},easeSinOut:function(){return W}});function gt(wt){return+wt}function k(wt){return wt*wt}function Et(wt){return wt*(2-wt)}function K(wt){return((wt*=2)<=1?wt*wt:--wt*(2-wt)+1)/2}function yt(wt){return wt*wt*wt}function J(wt){return--wt*wt*wt+1}function pt(wt){return((wt*=2)<=1?wt*wt*wt:(wt-=2)*wt*wt+2)/2}var et=3,_e=function wt(ue){ue=+ue;function Ie(Ne){return Math.pow(Ne,ue)}return Ie.exponent=wt,Ie}(et),ot=function wt(ue){ue=+ue;function Ie(Ne){return 1-Math.pow(1-Ne,ue)}return Ie.exponent=wt,Ie}(et),ut=function wt(ue){ue=+ue;function Ie(Ne){return((Ne*=2)<=1?Math.pow(Ne,ue):2-Math.pow(2-Ne,ue))/2}return Ie.exponent=wt,Ie}(et),zt=Math.PI,P=zt/2;function b(wt){return+wt==1?1:1-Math.cos(wt*P)}function W(wt){return Math.sin(wt*P)}function le(wt){return(1-Math.cos(zt*wt))/2}function be(wt){return(Math.pow(2,-10*wt)-.0009765625)*1.0009775171065494}function Me(wt){return be(1-+wt)}function At(wt){return 1-be(wt)}function rt(wt){return((wt*=2)<=1?be(1-wt):2-be(wt-1))/2}function Dt(wt){return 1-Math.sqrt(1-wt*wt)}function Ee(wt){return Math.sqrt(1- --wt*wt)}function ge(wt){return((wt*=2)<=1?1-Math.sqrt(1-wt*wt):Math.sqrt(1-(wt-=2)*wt)+1)/2}var Ge=4/11,Ue=6/11,xe=8/11,Ke=3/4,Lt=9/11,Jt=10/11,ft=15/16,St=21/22,Y=63/64,mt=1/Ge/Ge;function se(wt){return 1-ke(1-wt)}function ke(wt){return(wt=+wt)<Ge?mt*wt*wt:wt<xe?mt*(wt-=Ue)*wt+Ke:wt<Jt?mt*(wt-=Lt)*wt+ft:mt*(wt-=St)*wt+Y}function Le(wt){return((wt*=2)<=1?1-ke(1-wt):ke(wt-1)+1)/2}var Be=1.70158,Bt=function wt(ue){ue=+ue;function Ie(Ne){return(Ne=+Ne)*Ne*(ue*(Ne-1)+Ne)}return Ie.overshoot=wt,Ie}(Be),ee=function wt(ue){ue=+ue;function Ie(Ne){return--Ne*Ne*((Ne+1)*ue+Ne)+1}return Ie.overshoot=wt,Ie}(Be),me=function wt(ue){ue=+ue;function Ie(Ne){return((Ne*=2)<1?Ne*Ne*((ue+1)*Ne-ue):(Ne-=2)*Ne*((ue+1)*Ne+ue)+2)/2}return Ie.overshoot=wt,Ie}(Be),Yt=2*Math.PI,qe=1,vr=.3,ie=function wt(ue,Ie){var Ne=Math.asin(1/(ue=Math.max(1,ue)))*(Ie/=Yt);function Zt(Ct){return ue*be(- --Ct)*Math.sin((Ne-Ct)/Ie)}return Zt.amplitude=function(Ct){return wt(Ct,Ie*Yt)},Zt.period=function(Ct){return wt(ue,Ct)},Zt}(qe,vr),qt=function wt(ue,Ie){var Ne=Math.asin(1/(ue=Math.max(1,ue)))*(Ie/=Yt);function Zt(Ct){return 1-ue*be(Ct=+Ct)*Math.sin((Ct+Ne)/Ie)}return Zt.amplitude=function(Ct){return wt(Ct,Ie*Yt)},Zt.period=function(Ct){return wt(ue,Ct)},Zt}(qe,vr),bt=function wt(ue,Ie){var Ne=Math.asin(1/(ue=Math.max(1,ue)))*(Ie/=Yt);function Zt(Ct){return((Ct=Ct*2-1)<0?ue*be(-Ct)*Math.sin((Ne-Ct)/Ie):2-ue*be(Ct)*Math.sin((Ne+Ct)/Ie))/2}return Zt.amplitude=function(Ct){return wt(Ct,Ie*Yt)},Zt.period=function(Ct){return wt(ue,Ct)},Zt}(qe,vr),Xt={};function $t(wt){return Xt[wt.toLowerCase()]||kt[wt]}function xt(wt,ue){Xt[wt.toLowerCase()]=ue}},71626:function(pn,Ot,nt){"use strict";nt.d(Ot,{b:function(){return k},W:function(){return gt}});var kt=new Map;function gt(At,rt){kt.set(At,rt)}function k(At){return kt.get(At)}function Et(At){var rt=At.attr(),Dt=rt.x,Ee=rt.y,ge=rt.width,Ge=rt.height;return{x:Dt,y:Ee,width:ge,height:Ge}}function K(At){var rt=At.attr(),Dt=rt.x,Ee=rt.y,ge=rt.r;return{x:Dt-ge,y:Ee-ge,width:ge*2,height:ge*2}}var yt=nt(62930);function J(At,rt){return!At||!rt?At||rt:{minX:Math.min(At.minX,rt.minX),minY:Math.min(At.minY,rt.minY),maxX:Math.max(At.maxX,rt.maxX),maxY:Math.max(At.maxY,rt.maxY)}}function pt(At,rt){var Dt=At.get("startArrowShape"),Ee=At.get("endArrowShape"),ge=null,Ge=null;return Dt&&(ge=Dt.getCanvasBBox(),rt=J(rt,ge)),Ee&&(Ge=Ee.getCanvasBBox(),rt=J(rt,Ge)),rt}function et(At){for(var rt=At.attr(),Dt=rt.points,Ee=[],ge=[],Ge=0;Ge<Dt.length;Ge++){var Ue=Dt[Ge];Ee.push(Ue[0]),ge.push(Ue[1])}var xe=yt.Zr.getBBoxByArray(Ee,ge),Ke=xe.x,Lt=xe.y,Jt=xe.width,ft=xe.height,St={minX:Ke,minY:Lt,maxX:Ke+Jt,maxY:Lt+ft};return St=pt(At,St),{x:St.minX,y:St.minY,width:St.maxX-St.minX,height:St.maxY-St.minY}}function _e(At){for(var rt=At.attr(),Dt=rt.points,Ee=[],ge=[],Ge=0;Ge<Dt.length;Ge++){var Ue=Dt[Ge];Ee.push(Ue[0]),ge.push(Ue[1])}return yt.Zr.getBBoxByArray(Ee,ge)}var ot=nt(56430);function ut(At){var rt=At.attr(),Dt=rt.x,Ee=rt.y,ge=rt.text,Ge=rt.fontSize,Ue=rt.lineHeight,xe=rt.font;xe||(xe=(0,ot.$O)(rt));var Ke=(0,ot.mY)(ge,xe),Lt;if(!Ke)Lt={x:Dt,y:Ee,width:0,height:0};else{var Jt=rt.textAlign,ft=rt.textBaseline,St=(0,ot.FE)(ge,Ge,Ue),Y={x:Dt,y:Ee-St};Jt&&(Jt==="end"||Jt==="right"?Y.x-=Ke:Jt==="center"&&(Y.x-=Ke/2)),ft&&(ft==="top"?Y.y+=St:ft==="middle"&&(Y.y+=St/2)),Lt={x:Y.x,y:Y.y,width:Ke,height:St}}return Lt}var zt=nt(34357),P=nt(22374);function b(At,rt){for(var Dt=[],Ee=[],ge=[],Ge=0;Ge<At.length;Ge++){var Ue=At[Ge],xe=Ue.currentPoint,Ke=Ue.params,Lt=Ue.prePoint,Jt=void 0;switch(Ue.command){case"Q":Jt=yt.lD.box(Lt[0],Lt[1],Ke[1],Ke[2],Ke[3],Ke[4]);break;case"C":Jt=yt.Ll.box(Lt[0],Lt[1],Ke[1],Ke[2],Ke[3],Ke[4],Ke[5],Ke[6]);break;case"A":var ft=Ue.arcParams;Jt=yt.wN.box(ft.cx,ft.cy,ft.rx,ft.ry,ft.xRotation,ft.startAngle,ft.endAngle);break;default:Dt.push(xe[0]),Ee.push(xe[1]);break}Jt&&(Ue.box=Jt,Dt.push(Jt.x,Jt.x+Jt.width),Ee.push(Jt.y,Jt.y+Jt.height)),rt&&(Ue.command==="L"||Ue.command==="M")&&Ue.prePoint&&Ue.nextPoint&&ge.push(Ue)}Dt=Dt.filter(function(Le){return!Number.isNaN(Le)&&Le!==1/0&&Le!==-1/0}),Ee=Ee.filter(function(Le){return!Number.isNaN(Le)&&Le!==1/0&&Le!==-1/0});var St=(0,P.VV)(Dt),Y=(0,P.VV)(Ee),mt=(0,P.Fp)(Dt),se=(0,P.Fp)(Ee);if(ge.length===0)return{x:St,y:Y,width:mt-St,height:se-Y};for(var Ge=0;Ge<ge.length;Ge++){var Ue=ge[Ge],xe=Ue.currentPoint,ke=void 0;xe[0]===St?(ke=W(Ue,rt),St=St-ke.xExtra):xe[0]===mt&&(ke=W(Ue,rt),mt=mt+ke.xExtra),xe[1]===Y?(ke=W(Ue,rt),Y=Y-ke.yExtra):xe[1]===se&&(ke=W(Ue,rt),se=se+ke.yExtra)}return{x:St,y:Y,width:mt-St,height:se-Y}}function W(At,rt){var Dt=At.prePoint,Ee=At.currentPoint,ge=At.nextPoint,Ge=Math.pow(Ee[0]-Dt[0],2)+Math.pow(Ee[1]-Dt[1],2),Ue=Math.pow(Ee[0]-ge[0],2)+Math.pow(Ee[1]-ge[1],2),xe=Math.pow(Dt[0]-ge[0],2)+Math.pow(Dt[1]-ge[1],2),Ke=Math.acos((Ge+Ue-xe)/(2*Math.sqrt(Ge)*Math.sqrt(Ue)));if(!Ke||Math.sin(Ke)===0||(0,P.vQ)(Ke,0))return{xExtra:0,yExtra:0};var Lt=Math.abs(Math.atan2(ge[1]-Ee[1],ge[0]-Ee[0])),Jt=Math.abs(Math.atan2(ge[0]-Ee[0],ge[1]-Ee[1]));Lt=Lt>Math.PI/2?Math.PI-Lt:Lt,Jt=Jt>Math.PI/2?Math.PI-Jt:Jt;var ft={xExtra:Math.cos(Ke/2-Lt)*(rt/2*(1/Math.sin(Ke/2)))-rt/2||0,yExtra:Math.cos(Jt-Ke/2)*(rt/2*(1/Math.sin(Ke/2)))-rt/2||0};return ft}function le(At){var rt=At.attr(),Dt=rt.path,Ee=rt.stroke,ge=Ee?rt.lineWidth:0,Ge=At.get("segments")||(0,zt.zx)(Dt),Ue=b(Ge,ge),xe=Ue.x,Ke=Ue.y,Lt=Ue.width,Jt=Ue.height,ft={minX:xe,minY:Ke,maxX:xe+Lt,maxY:Ke+Jt};return ft=pt(At,ft),{x:ft.minX,y:ft.minY,width:ft.maxX-ft.minX,height:ft.maxY-ft.minY}}function be(At){var rt=At.attr(),Dt=rt.x1,Ee=rt.y1,ge=rt.x2,Ge=rt.y2,Ue=Math.min(Dt,ge),xe=Math.max(Dt,ge),Ke=Math.min(Ee,Ge),Lt=Math.max(Ee,Ge),Jt={minX:Ue,maxX:xe,minY:Ke,maxY:Lt};return Jt=pt(At,Jt),{x:Jt.minX,y:Jt.minY,width:Jt.maxX-Jt.minX,height:Jt.maxY-Jt.minY}}function Me(At){var rt=At.attr(),Dt=rt.x,Ee=rt.y,ge=rt.rx,Ge=rt.ry;return{x:Dt-ge,y:Ee-Ge,width:ge*2,height:Ge*2}}gt("rect",Et),gt("image",Et),gt("circle",K),gt("marker",K),gt("polyline",et),gt("polygon",_e),gt("text",ut),gt("path",le),gt("line",be),gt("ellipse",Me)},83302:function(pn,Ot){"use strict";var nt=function(){function kt(gt,k){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=gt,this.name=gt,this.originalEvent=k,this.timeStamp=k.timeStamp}return kt.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},kt.prototype.stopPropagation=function(){this.propagationStopped=!0},kt.prototype.toString=function(){var gt=this.type;return"[Event (type="+gt+")]"},kt.prototype.save=function(){},kt.prototype.restore=function(){},kt}();Ot.Z=nt},22479:function(pn,Ot,nt){"use strict";nt.r(Ot),nt.d(Ot,{AbstractCanvas:function(){return _e.Z},AbstractGroup:function(){return ot.Z},AbstractShape:function(){return ut.Z},Base:function(){return et.Z},Event:function(){return pt.Z},PathUtil:function(){return kt},assembleFont:function(){return P.$O},getBBoxMethod:function(){return zt.b},getOffScreenContext:function(){return le.L},getTextHeight:function(){return P.FE},invert:function(){return W.U_},isAllowCapture:function(){return b.pP},multiplyVec2:function(){return W.rG},registerBBox:function(){return zt.W},registerEasing:function(){return be.C},version:function(){return Me}});var kt=nt(63007),gt=nt(54153),k=nt.n(gt),J={};for(var Et in gt)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","registerEasing","version"].indexOf(Et)<0&&(J[Et]=function(At){return gt[At]}.bind(0,Et));nt.d(Ot,J);var K=nt(97750),yt=nt.n(K),J={};for(var Et in K)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","registerEasing","version"].indexOf(Et)<0&&(J[Et]=function(rt){return K[rt]}.bind(0,Et));nt.d(Ot,J);var pt=nt(83302),et=nt(53079),_e=nt(32632),ot=nt(14629),ut=nt(40073),zt=nt(71626),P=nt(56430),b=nt(91220),W=nt(55885),le=nt(69307),be=nt(97338),Me="0.5.11"},97750:function(){},54153:function(){},55885:function(pn,Ot,nt){"use strict";nt.d(Ot,{U_:function(){return k},rG:function(){return gt},xq:function(){return kt}});function kt(Et,K){var yt=[],J=Et[0],pt=Et[1],et=Et[2],_e=Et[3],ot=Et[4],ut=Et[5],zt=Et[6],P=Et[7],b=Et[8],W=K[0],le=K[1],be=K[2],Me=K[3],At=K[4],rt=K[5],Dt=K[6],Ee=K[7],ge=K[8];return yt[0]=W*J+le*_e+be*zt,yt[1]=W*pt+le*ot+be*P,yt[2]=W*et+le*ut+be*b,yt[3]=Me*J+At*_e+rt*zt,yt[4]=Me*pt+At*ot+rt*P,yt[5]=Me*et+At*ut+rt*b,yt[6]=Dt*J+Ee*_e+ge*zt,yt[7]=Dt*pt+Ee*ot+ge*P,yt[8]=Dt*et+Ee*ut+ge*b,yt}function gt(Et,K){var yt=[],J=K[0],pt=K[1];return yt[0]=Et[0]*J+Et[3]*pt+Et[6],yt[1]=Et[1]*J+Et[4]*pt+Et[7],yt}function k(Et){var K=[],yt=Et[0],J=Et[1],pt=Et[2],et=Et[3],_e=Et[4],ot=Et[5],ut=Et[6],zt=Et[7],P=Et[8],b=P*_e-ot*zt,W=-P*et+ot*ut,le=zt*et-_e*ut,be=yt*b+J*W+pt*le;return be?(be=1/be,K[0]=b*be,K[1]=(-P*J+pt*zt)*be,K[2]=(ot*J-pt*_e)*be,K[3]=W*be,K[4]=(P*yt-pt*ut)*be,K[5]=(-ot*yt+pt*et)*be,K[6]=le*be,K[7]=(-zt*yt+J*ut)*be,K[8]=(_e*yt-J*et)*be,K):null}},69307:function(pn,Ot,nt){"use strict";nt.d(Ot,{L:function(){return gt}});var kt=null;function gt(){if(!kt){var k=document.createElement("canvas");k.width=1,k.height=1,kt=k.getContext("2d")}return kt}},63007:function(pn,Ot,nt){"use strict";nt.r(Ot),nt.d(Ot,{catmullRomToBezier:function(){return yt},fillPath:function(){return ft},fillPathByDiff:function(){return se},formatPath:function(){return Be},intersection:function(){return xe},parsePathArray:function(){return P},parsePathString:function(){return K},pathToAbsolute:function(){return pt},pathToCurve:function(){return ut},rectPath:function(){return At}});var kt=nt(22374),gt=`
|
|
\v\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029`,k=new RegExp("([a-z])["+gt+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+gt+"]*,?["+gt+"]*)+)","ig"),Et=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+gt+"]*,?["+gt+"]*","ig"),K=function(Bt){if(!Bt)return null;if((0,kt.kJ)(Bt))return Bt;var ee={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},me=[];return String(Bt).replace(k,function(Yt,qe,vr){var ie=[],qt=qe.toLowerCase();if(vr.replace(Et,function(bt,Xt){Xt&&ie.push(+Xt)}),qt==="m"&&ie.length>2&&(me.push([qe].concat(ie.splice(0,2))),qt="l",qe=qe==="m"?"l":"L"),qt==="o"&&ie.length===1&&me.push([qe,ie[0]]),qt==="r")me.push([qe].concat(ie));else for(;ie.length>=ee[qt]&&(me.push([qe].concat(ie.splice(0,ee[qt]))),!!ee[qt]););return Bt}),me},yt=function(Bt,ee){for(var me=[],Yt=0,qe=Bt.length;qe-2*!ee>Yt;Yt+=2){var vr=[{x:+Bt[Yt-2],y:+Bt[Yt-1]},{x:+Bt[Yt],y:+Bt[Yt+1]},{x:+Bt[Yt+2],y:+Bt[Yt+3]},{x:+Bt[Yt+4],y:+Bt[Yt+5]}];ee?Yt?qe-4===Yt?vr[3]={x:+Bt[0],y:+Bt[1]}:qe-2===Yt&&(vr[2]={x:+Bt[0],y:+Bt[1]},vr[3]={x:+Bt[2],y:+Bt[3]}):vr[0]={x:+Bt[qe-2],y:+Bt[qe-1]}:qe-4===Yt?vr[3]=vr[2]:Yt||(vr[0]={x:+Bt[Yt],y:+Bt[Yt+1]}),me.push(["C",(-vr[0].x+6*vr[1].x+vr[2].x)/6,(-vr[0].y+6*vr[1].y+vr[2].y)/6,(vr[1].x+6*vr[2].x-vr[3].x)/6,(vr[1].y+6*vr[2].y-vr[3].y)/6,vr[2].x,vr[2].y])}return me},J=function(Bt,ee,me,Yt,qe){var vr=[];if(qe===null&&Yt===null&&(Yt=me),Bt=+Bt,ee=+ee,me=+me,Yt=+Yt,qe!==null){var ie=Math.PI/180,qt=Bt+me*Math.cos(-Yt*ie),bt=Bt+me*Math.cos(-qe*ie),Xt=ee+me*Math.sin(-Yt*ie),$t=ee+me*Math.sin(-qe*ie);vr=[["M",qt,Xt],["A",me,me,0,+(qe-Yt>180),0,bt,$t]]}else vr=[["M",Bt,ee],["m",0,-Yt],["a",me,Yt,0,1,1,0,2*Yt],["a",me,Yt,0,1,1,0,-2*Yt],["z"]];return vr},pt=function(Bt){if(Bt=K(Bt),!Bt||!Bt.length)return[["M",0,0]];var ee=[],me=0,Yt=0,qe=0,vr=0,ie=0,qt,bt;Bt[0][0]==="M"&&(me=+Bt[0][1],Yt=+Bt[0][2],qe=me,vr=Yt,ie++,ee[0]=["M",me,Yt]);for(var Xt=Bt.length===3&&Bt[0][0]==="M"&&Bt[1][0].toUpperCase()==="R"&&Bt[2][0].toUpperCase()==="Z",$t=void 0,xt=void 0,wt=ie,ue=Bt.length;wt<ue;wt++){if(ee.push($t=[]),xt=Bt[wt],qt=xt[0],qt!==qt.toUpperCase())switch($t[0]=qt.toUpperCase(),$t[0]){case"A":$t[1]=xt[1],$t[2]=xt[2],$t[3]=xt[3],$t[4]=xt[4],$t[5]=xt[5],$t[6]=+xt[6]+me,$t[7]=+xt[7]+Yt;break;case"V":$t[1]=+xt[1]+Yt;break;case"H":$t[1]=+xt[1]+me;break;case"R":bt=[me,Yt].concat(xt.slice(1));for(var Ie=2,Ne=bt.length;Ie<Ne;Ie++)bt[Ie]=+bt[Ie]+me,bt[++Ie]=+bt[Ie]+Yt;ee.pop(),ee=ee.concat(yt(bt,Xt));break;case"O":ee.pop(),bt=J(me,Yt,xt[1],xt[2]),bt.push(bt[0]),ee=ee.concat(bt);break;case"U":ee.pop(),ee=ee.concat(J(me,Yt,xt[1],xt[2],xt[3])),$t=["U"].concat(ee[ee.length-1].slice(-2));break;case"M":qe=+xt[1]+me,vr=+xt[2]+Yt;break;default:for(var Ie=1,Ne=xt.length;Ie<Ne;Ie++)$t[Ie]=+xt[Ie]+(Ie%2?me:Yt)}else if(qt==="R")bt=[me,Yt].concat(xt.slice(1)),ee.pop(),ee=ee.concat(yt(bt,Xt)),$t=["R"].concat(xt.slice(-2));else if(qt==="O")ee.pop(),bt=J(me,Yt,xt[1],xt[2]),bt.push(bt[0]),ee=ee.concat(bt);else if(qt==="U")ee.pop(),ee=ee.concat(J(me,Yt,xt[1],xt[2],xt[3])),$t=["U"].concat(ee[ee.length-1].slice(-2));else for(var Zt=0,Ct=xt.length;Zt<Ct;Zt++)$t[Zt]=xt[Zt];if(qt=qt.toUpperCase(),qt!=="O")switch($t[0]){case"Z":me=+qe,Yt=+vr;break;case"H":me=$t[1];break;case"V":Yt=$t[1];break;case"M":qe=$t[$t.length-2],vr=$t[$t.length-1];break;default:me=$t[$t.length-2],Yt=$t[$t.length-1]}}return ee},et=function(Bt,ee,me,Yt){return[Bt,ee,me,Yt,me,Yt]},_e=function(Bt,ee,me,Yt,qe,vr){var ie=.3333333333333333,qt=2/3;return[ie*Bt+qt*me,ie*ee+qt*Yt,ie*qe+qt*me,ie*vr+qt*Yt,qe,vr]},ot=function(Bt,ee,me,Yt,qe,vr,ie,qt,bt,Xt){me===Yt&&(me+=1);var $t=Math.PI*120/180,xt=Math.PI/180*(+qe||0),wt=[],ue,Ie,Ne,Zt,Ct,Tt=function(ye,Ze,fr){var _r=ye*Math.cos(fr)-Ze*Math.sin(fr),we=ye*Math.sin(fr)+Ze*Math.cos(fr);return{x:_r,y:we}};if(Xt)Ie=Xt[0],Ne=Xt[1],Zt=Xt[2],Ct=Xt[3];else{ue=Tt(Bt,ee,-xt),Bt=ue.x,ee=ue.y,ue=Tt(qt,bt,-xt),qt=ue.x,bt=ue.y,Bt===qt&&ee===bt&&(qt+=1,bt+=1);var Nt=(Bt-qt)/2,tt=(ee-bt)/2,vt=Nt*Nt/(me*me)+tt*tt/(Yt*Yt);vt>1&&(vt=Math.sqrt(vt),me=vt*me,Yt=vt*Yt);var Ht=me*me,he=Yt*Yt,jt=(vr===ie?-1:1)*Math.sqrt(Math.abs((Ht*he-Ht*tt*tt-he*Nt*Nt)/(Ht*tt*tt+he*Nt*Nt)));Zt=jt*me*tt/Yt+(Bt+qt)/2,Ct=jt*-Yt*Nt/me+(ee+bt)/2,Ie=Math.asin(((ee-Ct)/Yt).toFixed(9)),Ne=Math.asin(((bt-Ct)/Yt).toFixed(9)),Ie=Bt<Zt?Math.PI-Ie:Ie,Ne=qt<Zt?Math.PI-Ne:Ne,Ie<0&&(Ie=Math.PI*2+Ie),Ne<0&&(Ne=Math.PI*2+Ne),ie&&Ie>Ne&&(Ie=Ie-Math.PI*2),!ie&&Ne>Ie&&(Ne=Ne-Math.PI*2)}var Te=Ne-Ie;if(Math.abs(Te)>$t){var We=Ne,Qe=qt,pr=bt;Ne=Ie+$t*(ie&&Ne>Ie?1:-1),qt=Zt+me*Math.cos(Ne),bt=Ct+Yt*Math.sin(Ne),wt=ot(qt,bt,me,Yt,qe,0,ie,Qe,pr,[Ne,We,Zt,Ct])}Te=Ne-Ie;var lr=Math.cos(Ie),Vr=Math.sin(Ie),Pr=Math.cos(Ne),Br=Math.sin(Ne),Sn=Math.tan(Te/4),an=4/3*me*Sn,zn=4/3*Yt*Sn,Zn=[Bt,ee],Wn=[Bt+an*Vr,ee-zn*lr],Dn=[qt+an*Br,bt-zn*Pr],Xn=[qt,bt];if(Wn[0]=2*Zn[0]-Wn[0],Wn[1]=2*Zn[1]-Wn[1],Xt)return[Wn,Dn,Xn].concat(wt);wt=[Wn,Dn,Xn].concat(wt).join().split(",");for(var Ft=[],Wt=0,oe=wt.length;Wt<oe;Wt++)Ft[Wt]=Wt%2?Tt(wt[Wt-1],wt[Wt],xt).y:Tt(wt[Wt],wt[Wt+1],xt).x;return Ft},ut=function(Bt,ee){var me=pt(Bt),Yt=ee&&pt(ee),qe={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},vr={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},ie=[],qt=[],bt="",Xt="",$t,xt=function(Nt,tt,vt){var Ht,he;if(!Nt)return["C",tt.x,tt.y,tt.x,tt.y,tt.x,tt.y];switch(!(Nt[0]in{T:1,Q:1})&&(tt.qx=tt.qy=null),Nt[0]){case"M":tt.X=Nt[1],tt.Y=Nt[2];break;case"A":Nt=["C"].concat(ot.apply(0,[tt.x,tt.y].concat(Nt.slice(1))));break;case"S":vt==="C"||vt==="S"?(Ht=tt.x*2-tt.bx,he=tt.y*2-tt.by):(Ht=tt.x,he=tt.y),Nt=["C",Ht,he].concat(Nt.slice(1));break;case"T":vt==="Q"||vt==="T"?(tt.qx=tt.x*2-tt.qx,tt.qy=tt.y*2-tt.qy):(tt.qx=tt.x,tt.qy=tt.y),Nt=["C"].concat(_e(tt.x,tt.y,tt.qx,tt.qy,Nt[1],Nt[2]));break;case"Q":tt.qx=Nt[1],tt.qy=Nt[2],Nt=["C"].concat(_e(tt.x,tt.y,Nt[1],Nt[2],Nt[3],Nt[4]));break;case"L":Nt=["C"].concat(et(tt.x,tt.y,Nt[1],Nt[2]));break;case"H":Nt=["C"].concat(et(tt.x,tt.y,Nt[1],tt.y));break;case"V":Nt=["C"].concat(et(tt.x,tt.y,tt.x,Nt[1]));break;case"Z":Nt=["C"].concat(et(tt.x,tt.y,tt.X,tt.Y));break;default:break}return Nt},wt=function(Nt,tt){if(Nt[tt].length>7){Nt[tt].shift();for(var vt=Nt[tt];vt.length;)ie[tt]="A",Yt&&(qt[tt]="A"),Nt.splice(tt++,0,["C"].concat(vt.splice(0,6)));Nt.splice(tt,1),$t=Math.max(me.length,Yt&&Yt.length||0)}},ue=function(Nt,tt,vt,Ht,he){Nt&&tt&&Nt[he][0]==="M"&&tt[he][0]!=="M"&&(tt.splice(he,0,["M",Ht.x,Ht.y]),vt.bx=0,vt.by=0,vt.x=Nt[he][1],vt.y=Nt[he][2],$t=Math.max(me.length,Yt&&Yt.length||0))};$t=Math.max(me.length,Yt&&Yt.length||0);for(var Ie=0;Ie<$t;Ie++){me[Ie]&&(bt=me[Ie][0]),bt!=="C"&&(ie[Ie]=bt,Ie&&(Xt=ie[Ie-1])),me[Ie]=xt(me[Ie],qe,Xt),ie[Ie]!=="A"&&bt==="C"&&(ie[Ie]="C"),wt(me,Ie),Yt&&(Yt[Ie]&&(bt=Yt[Ie][0]),bt!=="C"&&(qt[Ie]=bt,Ie&&(Xt=qt[Ie-1])),Yt[Ie]=xt(Yt[Ie],vr,Xt),qt[Ie]!=="A"&&bt==="C"&&(qt[Ie]="C"),wt(Yt,Ie)),ue(me,Yt,qe,vr,Ie),ue(Yt,me,vr,qe,Ie);var Ne=me[Ie],Zt=Yt&&Yt[Ie],Ct=Ne.length,Tt=Yt&&Zt.length;qe.x=Ne[Ct-2],qe.y=Ne[Ct-1],qe.bx=parseFloat(Ne[Ct-4])||qe.x,qe.by=parseFloat(Ne[Ct-3])||qe.y,vr.bx=Yt&&(parseFloat(Zt[Tt-4])||vr.x),vr.by=Yt&&(parseFloat(Zt[Tt-3])||vr.y),vr.x=Yt&&Zt[Tt-2],vr.y=Yt&&Zt[Tt-1]}return Yt?[me,Yt]:me},zt=/,?([a-z]),?/gi,P=function(Bt){return Bt.join(",").replace(zt,"$1")},b=function(Bt,ee,me,Yt,qe){var vr=-3*ee+9*me-9*Yt+3*qe,ie=Bt*vr+6*ee-12*me+6*Yt;return Bt*ie-3*ee+3*me},W=function(Bt,ee,me,Yt,qe,vr,ie,qt,bt){bt===null&&(bt=1),bt=bt>1?1:bt<0?0:bt;for(var Xt=bt/2,$t=12,xt=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],wt=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],ue=0,Ie=0;Ie<$t;Ie++){var Ne=Xt*xt[Ie]+Xt,Zt=b(Ne,Bt,me,qe,ie),Ct=b(Ne,ee,Yt,vr,qt),Tt=Zt*Zt+Ct*Ct;ue+=wt[Ie]*Math.sqrt(Tt)}return Xt*ue},le=function(Bt,ee,me,Yt,qe,vr,ie,qt){for(var bt=[],Xt=[[],[]],$t,xt,wt,ue,Ie=0;Ie<2;++Ie){if(Ie===0?(xt=6*Bt-12*me+6*qe,$t=-3*Bt+9*me-9*qe+3*ie,wt=3*me-3*Bt):(xt=6*ee-12*Yt+6*vr,$t=-3*ee+9*Yt-9*vr+3*qt,wt=3*Yt-3*ee),Math.abs($t)<1e-12){if(Math.abs(xt)<1e-12)continue;ue=-wt/xt,ue>0&&ue<1&&bt.push(ue);continue}var Ne=xt*xt-4*wt*$t,Zt=Math.sqrt(Ne);if(!(Ne<0)){var Ct=(-xt+Zt)/(2*$t);Ct>0&&Ct<1&&bt.push(Ct);var Tt=(-xt-Zt)/(2*$t);Tt>0&&Tt<1&&bt.push(Tt)}}for(var Nt=bt.length,tt=Nt,vt;Nt--;)ue=bt[Nt],vt=1-ue,Xt[0][Nt]=vt*vt*vt*Bt+3*vt*vt*ue*me+3*vt*ue*ue*qe+ue*ue*ue*ie,Xt[1][Nt]=vt*vt*vt*ee+3*vt*vt*ue*Yt+3*vt*ue*ue*vr+ue*ue*ue*qt;return Xt[0][tt]=Bt,Xt[1][tt]=ee,Xt[0][tt+1]=ie,Xt[1][tt+1]=qt,Xt[0].length=Xt[1].length=tt+2,{min:{x:Math.min.apply(0,Xt[0]),y:Math.min.apply(0,Xt[1])},max:{x:Math.max.apply(0,Xt[0]),y:Math.max.apply(0,Xt[1])}}},be=function(Bt,ee,me,Yt,qe,vr,ie,qt){if(!(Math.max(Bt,me)<Math.min(qe,ie)||Math.min(Bt,me)>Math.max(qe,ie)||Math.max(ee,Yt)<Math.min(vr,qt)||Math.min(ee,Yt)>Math.max(vr,qt))){var bt=(Bt*Yt-ee*me)*(qe-ie)-(Bt-me)*(qe*qt-vr*ie),Xt=(Bt*Yt-ee*me)*(vr-qt)-(ee-Yt)*(qe*qt-vr*ie),$t=(Bt-me)*(vr-qt)-(ee-Yt)*(qe-ie);if($t){var xt=bt/$t,wt=Xt/$t,ue=+xt.toFixed(2),Ie=+wt.toFixed(2);if(!(ue<+Math.min(Bt,me).toFixed(2)||ue>+Math.max(Bt,me).toFixed(2)||ue<+Math.min(qe,ie).toFixed(2)||ue>+Math.max(qe,ie).toFixed(2)||Ie<+Math.min(ee,Yt).toFixed(2)||Ie>+Math.max(ee,Yt).toFixed(2)||Ie<+Math.min(vr,qt).toFixed(2)||Ie>+Math.max(vr,qt).toFixed(2)))return{x:xt,y:wt}}}},Me=function(Bt,ee,me){return ee>=Bt.x&&ee<=Bt.x+Bt.width&&me>=Bt.y&&me<=Bt.y+Bt.height},At=function(Bt,ee,me,Yt,qe){if(qe)return[["M",+Bt+ +qe,ee],["l",me-qe*2,0],["a",qe,qe,0,0,1,qe,qe],["l",0,Yt-qe*2],["a",qe,qe,0,0,1,-qe,qe],["l",qe*2-me,0],["a",qe,qe,0,0,1,-qe,-qe],["l",0,qe*2-Yt],["a",qe,qe,0,0,1,qe,-qe],["z"]];var vr=[["M",Bt,ee],["l",me,0],["l",0,Yt],["l",-me,0],["z"]];return vr.parsePathArray=P,vr},rt=function(Bt,ee,me,Yt){return Bt===null&&(Bt=ee=me=Yt=0),ee===null&&(ee=Bt.y,me=Bt.width,Yt=Bt.height,Bt=Bt.x),{x:Bt,y:ee,width:me,w:me,height:Yt,h:Yt,x2:Bt+me,y2:ee+Yt,cx:Bt+me/2,cy:ee+Yt/2,r1:Math.min(me,Yt)/2,r2:Math.max(me,Yt)/2,r0:Math.sqrt(me*me+Yt*Yt)/2,path:At(Bt,ee,me,Yt),vb:[Bt,ee,me,Yt].join(" ")}},Dt=function(Bt,ee){return Bt=rt(Bt),ee=rt(ee),Me(ee,Bt.x,Bt.y)||Me(ee,Bt.x2,Bt.y)||Me(ee,Bt.x,Bt.y2)||Me(ee,Bt.x2,Bt.y2)||Me(Bt,ee.x,ee.y)||Me(Bt,ee.x2,ee.y)||Me(Bt,ee.x,ee.y2)||Me(Bt,ee.x2,ee.y2)||(Bt.x<ee.x2&&Bt.x>ee.x||ee.x<Bt.x2&&ee.x>Bt.x)&&(Bt.y<ee.y2&&Bt.y>ee.y||ee.y<Bt.y2&&ee.y>Bt.y)},Ee=function(Bt,ee,me,Yt,qe,vr,ie,qt){(0,kt.kJ)(Bt)||(Bt=[Bt,ee,me,Yt,qe,vr,ie,qt]);var bt=le.apply(null,Bt);return rt(bt.min.x,bt.min.y,bt.max.x-bt.min.x,bt.max.y-bt.min.y)},ge=function(Bt,ee,me,Yt,qe,vr,ie,qt,bt){var Xt=1-bt,$t=Math.pow(Xt,3),xt=Math.pow(Xt,2),wt=bt*bt,ue=wt*bt,Ie=$t*Bt+xt*3*bt*me+Xt*3*bt*bt*qe+ue*ie,Ne=$t*ee+xt*3*bt*Yt+Xt*3*bt*bt*vr+ue*qt,Zt=Bt+2*bt*(me-Bt)+wt*(qe-2*me+Bt),Ct=ee+2*bt*(Yt-ee)+wt*(vr-2*Yt+ee),Tt=me+2*bt*(qe-me)+wt*(ie-2*qe+me),Nt=Yt+2*bt*(vr-Yt)+wt*(qt-2*vr+Yt),tt=Xt*Bt+bt*me,vt=Xt*ee+bt*Yt,Ht=Xt*qe+bt*ie,he=Xt*vr+bt*qt,jt=90-Math.atan2(Zt-Tt,Ct-Nt)*180/Math.PI;return{x:Ie,y:Ne,m:{x:Zt,y:Ct},n:{x:Tt,y:Nt},start:{x:tt,y:vt},end:{x:Ht,y:he},alpha:jt}},Ge=function(Bt,ee,me){var Yt=Ee(Bt),qe=Ee(ee);if(!Dt(Yt,qe))return me?0:[];for(var vr=W.apply(0,Bt),ie=W.apply(0,ee),qt=~~(vr/8),bt=~~(ie/8),Xt=[],$t=[],xt={},wt=me?0:[],ue=0;ue<qt+1;ue++){var Ie=ge.apply(0,Bt.concat(ue/qt));Xt.push({x:Ie.x,y:Ie.y,t:ue/qt})}for(var ue=0;ue<bt+1;ue++){var Ie=ge.apply(0,ee.concat(ue/bt));$t.push({x:Ie.x,y:Ie.y,t:ue/bt})}for(var ue=0;ue<qt;ue++)for(var Ne=0;Ne<bt;Ne++){var Zt=Xt[ue],Ct=Xt[ue+1],Tt=$t[Ne],Nt=$t[Ne+1],tt=Math.abs(Ct.x-Zt.x)<.001?"y":"x",vt=Math.abs(Nt.x-Tt.x)<.001?"y":"x",Ht=be(Zt.x,Zt.y,Ct.x,Ct.y,Tt.x,Tt.y,Nt.x,Nt.y);if(Ht){if(xt[Ht.x.toFixed(4)]===Ht.y.toFixed(4))continue;xt[Ht.x.toFixed(4)]=Ht.y.toFixed(4);var he=Zt.t+Math.abs((Ht[tt]-Zt[tt])/(Ct[tt]-Zt[tt]))*(Ct.t-Zt.t),jt=Tt.t+Math.abs((Ht[vt]-Tt[vt])/(Nt[vt]-Tt[vt]))*(Nt.t-Tt.t);he>=0&&he<=1&&jt>=0&&jt<=1&&(me?wt+=1:wt.push({x:Ht.x,y:Ht.y,t1:he,t2:jt}))}}return wt},Ue=function(Bt,ee,me){Bt=ut(Bt),ee=ut(ee);for(var Yt,qe,vr,ie,qt,bt,Xt,$t,xt,wt,ue=me?0:[],Ie=0,Ne=Bt.length;Ie<Ne;Ie++){var Zt=Bt[Ie];if(Zt[0]==="M")Yt=qt=Zt[1],qe=bt=Zt[2];else{Zt[0]==="C"?(xt=[Yt,qe].concat(Zt.slice(1)),Yt=xt[6],qe=xt[7]):(xt=[Yt,qe,Yt,qe,qt,bt,qt,bt],Yt=qt,qe=bt);for(var Ct=0,Tt=ee.length;Ct<Tt;Ct++){var Nt=ee[Ct];if(Nt[0]==="M")vr=Xt=Nt[1],ie=$t=Nt[2];else{Nt[0]==="C"?(wt=[vr,ie].concat(Nt.slice(1)),vr=wt[6],ie=wt[7]):(wt=[vr,ie,vr,ie,Xt,$t,Xt,$t],vr=Xt,ie=$t);var tt=Ge(xt,wt,me);if(me)ue+=tt;else{for(var vt=0,Ht=tt.length;vt<Ht;vt++)tt[vt].segment1=Ie,tt[vt].segment2=Ct,tt[vt].bez1=xt,tt[vt].bez2=wt;ue=ue.concat(tt)}}}}}return ue},xe=function(Bt,ee){return Ue(Bt,ee)};function Ke(Bt,ee){var me=[],Yt=[];function qe(vr,ie){if(vr.length===1)me.push(vr[0]),Yt.push(vr[0]);else{for(var qt=[],bt=0;bt<vr.length-1;bt++)bt===0&&me.push(vr[0]),bt===vr.length-2&&Yt.push(vr[bt+1]),qt[bt]=[(1-ie)*vr[bt][0]+ie*vr[bt+1][0],(1-ie)*vr[bt][1]+ie*vr[bt+1][1]];qe(qt,ie)}}return Bt.length&&qe(Bt,ee),{left:me,right:Yt.reverse()}}function Lt(Bt,ee,me){var Yt=[[Bt[1],Bt[2]]];me=me||2;var qe=[];ee[0]==="A"?(Yt.push(ee[6]),Yt.push(ee[7])):ee[0]==="C"?(Yt.push([ee[1],ee[2]]),Yt.push([ee[3],ee[4]]),Yt.push([ee[5],ee[6]])):ee[0]==="S"||ee[0]==="Q"?(Yt.push([ee[1],ee[2]]),Yt.push([ee[3],ee[4]])):Yt.push([ee[1],ee[2]]);for(var vr=Yt,ie=1/me,qt=0;qt<me-1;qt++){var bt=ie/(1-ie*qt),Xt=Ke(vr,bt);qe.push(Xt.left),vr=Xt.right}qe.push(vr);var $t=qe.map(function(xt){var wt=[];return xt.length===4&&(wt.push("C"),wt=wt.concat(xt[2])),xt.length>=3&&(xt.length===3&&wt.push("Q"),wt=wt.concat(xt[1])),xt.length===2&&wt.push("L"),wt=wt.concat(xt[xt.length-1]),wt});return $t}var Jt=function(Bt,ee,me){if(me===1)return[[].concat(Bt)];var Yt=[];if(ee[0]==="L"||ee[0]==="C"||ee[0]==="Q")Yt=Yt.concat(Lt(Bt,ee,me));else{var qe=[].concat(Bt);qe[0]==="M"&&(qe[0]="L");for(var vr=0;vr<=me-1;vr++)Yt.push(qe)}return Yt},ft=function(Bt,ee){if(Bt.length===1)return Bt;var me=Bt.length-1,Yt=ee.length-1,qe=me/Yt,vr=[];if(Bt.length===1&&Bt[0][0]==="M"){for(var ie=0;ie<Yt-me;ie++)Bt.push(Bt[0]);return Bt}for(var ie=0;ie<Yt;ie++){var qt=Math.floor(qe*ie);vr[qt]=(vr[qt]||0)+1}var bt=vr.reduce(function(Xt,$t,xt){return xt===me?Xt.concat(Bt[me]):Xt.concat(Jt(Bt[xt],Bt[xt+1],$t))},[]);return bt.unshift(Bt[0]),(ee[Yt]==="Z"||ee[Yt]==="z")&&bt.push("Z"),bt},St=function(Bt,ee){if(Bt.length!==ee.length)return!1;var me=!0;return(0,kt.S6)(Bt,function(Yt,qe){if(Yt!==ee[qe])return me=!1,!1}),me};function Y(Bt,ee,me){var Yt=null,qe=me;return ee<qe&&(qe=ee,Yt="add"),Bt<qe&&(qe=Bt,Yt="del"),{type:Yt,min:qe}}var mt=function(Bt,ee){var me=Bt.length,Yt=ee.length,qe,vr,ie=0;if(me===0||Yt===0)return null;for(var qt=[],bt=0;bt<=me;bt++)qt[bt]=[],qt[bt][0]={min:bt};for(var Xt=0;Xt<=Yt;Xt++)qt[0][Xt]={min:Xt};for(var bt=1;bt<=me;bt++){qe=Bt[bt-1];for(var Xt=1;Xt<=Yt;Xt++){vr=ee[Xt-1],St(qe,vr)?ie=0:ie=1;var $t=qt[bt-1][Xt].min+1,xt=qt[bt][Xt-1].min+1,wt=qt[bt-1][Xt-1].min+ie;qt[bt][Xt]=Y($t,xt,wt)}}return qt},se=function(Bt,ee){var me=mt(Bt,ee),Yt=Bt.length,qe=ee.length,vr=[],ie=1,qt=1;if(me[Yt][qe].min!==Yt){for(var bt=1;bt<=Yt;bt++){var Xt=me[bt][bt].min;qt=bt;for(var $t=ie;$t<=qe;$t++)me[bt][$t].min<Xt&&(Xt=me[bt][$t].min,qt=$t);ie=qt,me[bt][ie].type&&vr.push({index:bt-1,type:me[bt][ie].type})}for(var bt=vr.length-1;bt>=0;bt--)ie=vr[bt].index,vr[bt].type==="add"?Bt.splice(ie,0,[].concat(Bt[ie])):Bt.splice(ie,1)}Yt=Bt.length;var xt=qe-Yt;if(Yt<qe)for(var bt=0;bt<xt;bt++)Bt[Yt-1][0]==="z"||Bt[Yt-1][0]==="Z"?Bt.splice(Yt-2,0,Bt[Yt-2]):Bt.push(Bt[Yt-1]),Yt+=1;return Bt};function ke(Bt,ee,me){for(var Yt=[].concat(Bt),qe,vr=1/(me+1),ie=Le(ee)[0],qt=1;qt<=me;qt++)vr*=qt,qe=Math.floor(Bt.length*vr),qe===0?Yt.unshift([ie[0]*vr+Bt[qe][0]*(1-vr),ie[1]*vr+Bt[qe][1]*(1-vr)]):Yt.splice(qe,0,[ie[0]*vr+Bt[qe][0]*(1-vr),ie[1]*vr+Bt[qe][1]*(1-vr)]);return Yt}function Le(Bt){var ee=[];switch(Bt[0]){case"M":ee.push([Bt[1],Bt[2]]);break;case"L":ee.push([Bt[1],Bt[2]]);break;case"A":ee.push([Bt[6],Bt[7]]);break;case"Q":ee.push([Bt[3],Bt[4]]),ee.push([Bt[1],Bt[2]]);break;case"T":ee.push([Bt[1],Bt[2]]);break;case"C":ee.push([Bt[5],Bt[6]]),ee.push([Bt[1],Bt[2]]),ee.push([Bt[3],Bt[4]]);break;case"S":ee.push([Bt[3],Bt[4]]),ee.push([Bt[1],Bt[2]]);break;case"H":ee.push([Bt[1],Bt[1]]);break;case"V":ee.push([Bt[1],Bt[1]]);break;default:}return ee}var Be=function(Bt,ee){if(Bt.length<=1)return Bt;for(var me,Yt=0;Yt<ee.length;Yt++)if(Bt[Yt][0]!==ee[Yt][0])switch(me=Le(Bt[Yt]),ee[Yt][0]){case"M":Bt[Yt]=["M"].concat(me[0]);break;case"L":Bt[Yt]=["L"].concat(me[0]);break;case"A":Bt[Yt]=[].concat(ee[Yt]),Bt[Yt][6]=me[0][0],Bt[Yt][7]=me[0][1];break;case"Q":if(me.length<2)if(Yt>0)me=ke(me,Bt[Yt-1],1);else{Bt[Yt]=ee[Yt];break}Bt[Yt]=["Q"].concat(me.reduce(function(qe,vr){return qe.concat(vr)},[]));break;case"T":Bt[Yt]=["T"].concat(me[0]);break;case"C":if(me.length<3)if(Yt>0)me=ke(me,Bt[Yt-1],2);else{Bt[Yt]=ee[Yt];break}Bt[Yt]=["C"].concat(me.reduce(function(qe,vr){return qe.concat(vr)},[]));break;case"S":if(me.length<2)if(Yt>0)me=ke(me,Bt[Yt-1],1);else{Bt[Yt]=ee[Yt];break}Bt[Yt]=["S"].concat(me.reduce(function(qe,vr){return qe.concat(vr)},[]));break;default:Bt[Yt]=ee[Yt]}return Bt}},56430:function(pn,Ot,nt){"use strict";nt.d(Ot,{$O:function(){return yt},FE:function(){return k},mY:function(){return K}});var kt=nt(91220),gt=nt(69307);function k(J,pt,et){var _e=1;if((0,kt.HD)(J)&&(_e=J.split(`
|
|
`).length),_e>1){var ot=Et(pt,et);return pt*_e+ot*(_e-1)}return pt}function Et(J,pt){return pt?pt-J:J*.14}function K(J,pt){var et=(0,gt.L)(),_e=0;if((0,kt.kK)(J)||J==="")return _e;if(et.save(),et.font=pt,(0,kt.HD)(J)&&J.includes(`
|
|
`)){var ot=J.split(`
|
|
`);(0,kt.S6)(ot,function(ut){var zt=et.measureText(ut).width;_e<zt&&(_e=zt)})}else _e=et.measureText(J).width;return et.restore(),_e}function yt(J){var pt=J.fontSize,et=J.fontFamily,_e=J.fontWeight,ot=J.fontStyle,ut=J.fontVariant;return[ot,ut,_e,pt+"px",et].join(" ").trim()}},91220:function(pn,Ot,nt){"use strict";nt.d(Ot,{As:function(){return gt},CD:function(){return kt.CD},HD:function(){return kt.HD},Kn:function(){return kt.Kn},S6:function(){return kt.S6},UY:function(){return Et},jC:function(){return kt.jC},jU:function(){return k},kK:function(){return kt.UM},mf:function(){return kt.mf},pP:function(){return K}});var kt=nt(22374);function gt(yt,J){var pt=yt.indexOf(J);pt!==-1&&yt.splice(pt,1)}var k=typeof window!="undefined"&&typeof window.document!="undefined";function Et(yt,J){if(yt.isCanvas())return!0;for(var pt=J.getParent(),et=!1;pt;){if(pt===yt){et=!0;break}pt=pt.getParent()}return et}function K(yt){return yt.cfg.visible&&yt.cfg.capture}},62930:function(pn,Ot,nt){"use strict";nt.d(Ot,{wN:function(){return ke},Ll:function(){return ge},x1:function(){return et},aH:function(){return Yt},lD:function(){return be},Zr:function(){return kt}});var kt={};nt.r(kt),nt.d(kt,{distance:function(){return k},getBBoxByArray:function(){return K},getBBoxRange:function(){return yt},isNumberEqual:function(){return Et},piMod:function(){return J}});var gt=nt(22374);function k(ie,qt,bt,Xt){var $t=ie-bt,xt=qt-Xt;return Math.sqrt($t*$t+xt*xt)}function Et(ie,qt){return Math.abs(ie-qt)<.001}function K(ie,qt){var bt=(0,gt.VV)(ie),Xt=(0,gt.VV)(qt),$t=(0,gt.Fp)(ie),xt=(0,gt.Fp)(qt);return{x:bt,y:Xt,width:$t-bt,height:xt-Xt}}function yt(ie,qt,bt,Xt){return{minX:(0,gt.VV)([ie,bt]),maxX:(0,gt.Fp)([ie,bt]),minY:(0,gt.VV)([qt,Xt]),maxY:(0,gt.Fp)([qt,Xt])}}function J(ie){return(ie+Math.PI*2)%(Math.PI*2)}var pt=nt(1153),et={box:function(ie,qt,bt,Xt){return K([ie,bt],[qt,Xt])},length:function(ie,qt,bt,Xt){return k(ie,qt,bt,Xt)},pointAt:function(ie,qt,bt,Xt,$t){return{x:(1-$t)*ie+$t*bt,y:(1-$t)*qt+$t*Xt}},pointDistance:function(ie,qt,bt,Xt,$t,xt){var wt=(bt-ie)*($t-ie)+(Xt-qt)*(xt-qt);if(wt<0)return k(ie,qt,$t,xt);var ue=(bt-ie)*(bt-ie)+(Xt-qt)*(Xt-qt);return wt>ue?k(bt,Xt,$t,xt):this.pointToLine(ie,qt,bt,Xt,$t,xt)},pointToLine:function(ie,qt,bt,Xt,$t,xt){var wt=[bt-ie,Xt-qt];if(pt.I6(wt,[0,0]))return Math.sqrt(($t-ie)*($t-ie)+(xt-qt)*(xt-qt));var ue=[-wt[1],wt[0]];pt.Fv(ue,ue);var Ie=[$t-ie,xt-qt];return Math.abs(pt.AK(Ie,ue))},tangentAngle:function(ie,qt,bt,Xt){return Math.atan2(Xt-qt,bt-ie)}},_e=1e-4;function ot(ie,qt,bt,Xt,$t,xt){var wt,ue=1/0,Ie=[bt,Xt],Ne=20;xt&&xt>200&&(Ne=xt/10);for(var Zt=1/Ne,Ct=Zt/10,Tt=0;Tt<=Ne;Tt++){var Nt=Tt*Zt,tt=[$t.apply(null,ie.concat([Nt])),$t.apply(null,qt.concat([Nt]))],vt=k(Ie[0],Ie[1],tt[0],tt[1]);vt<ue&&(wt=Nt,ue=vt)}if(wt===0)return{x:ie[0],y:qt[0]};if(wt===1){var Ht=ie.length;return{x:ie[Ht-1],y:qt[Ht-1]}}ue=1/0;for(var Tt=0;Tt<32&&!(Ct<_e);Tt++){var he=wt-Ct,jt=wt+Ct,tt=[$t.apply(null,ie.concat([he])),$t.apply(null,qt.concat([he]))],vt=k(Ie[0],Ie[1],tt[0],tt[1]);if(he>=0&&vt<ue)wt=he,ue=vt;else{var Te=[$t.apply(null,ie.concat([jt])),$t.apply(null,qt.concat([jt]))],We=k(Ie[0],Ie[1],Te[0],Te[1]);jt<=1&&We<ue?(wt=jt,ue=We):Ct*=.5}}return{x:$t.apply(null,ie.concat([wt])),y:$t.apply(null,qt.concat([wt]))}}function ut(ie,qt){for(var bt=0,Xt=ie.length,$t=0;$t<Xt;$t++){var xt=ie[$t],wt=qt[$t],ue=ie[($t+1)%Xt],Ie=qt[($t+1)%Xt];bt+=k(xt,wt,ue,Ie)}return bt/2}function zt(ie,qt,bt,Xt){var $t=1-Xt;return $t*$t*ie+2*Xt*$t*qt+Xt*Xt*bt}function P(ie,qt,bt){var Xt=ie+bt-2*qt;if(Et(Xt,0))return[.5];var $t=(ie-qt)/Xt;return $t<=1&&$t>=0?[$t]:[]}function b(ie,qt,bt,Xt){return 2*(1-Xt)*(qt-ie)+2*Xt*(bt-qt)}function W(ie,qt,bt,Xt,$t,xt,wt){var ue=zt(ie,bt,$t,wt),Ie=zt(qt,Xt,xt,wt),Ne=et.pointAt(ie,qt,bt,Xt,wt),Zt=et.pointAt(bt,Xt,$t,xt,wt);return[[ie,qt,Ne.x,Ne.y,ue,Ie],[ue,Ie,Zt.x,Zt.y,$t,xt]]}function le(ie,qt,bt,Xt,$t,xt,wt){if(wt===0)return(k(ie,qt,bt,Xt)+k(bt,Xt,$t,xt)+k(ie,qt,$t,xt))/2;var ue=W(ie,qt,bt,Xt,$t,xt,.5),Ie=ue[0],Ne=ue[1];return Ie.push(wt-1),Ne.push(wt-1),le.apply(null,Ie)+le.apply(null,Ne)}var be={box:function(ie,qt,bt,Xt,$t,xt){var wt=P(ie,bt,$t)[0],ue=P(qt,Xt,xt)[0],Ie=[ie,$t],Ne=[qt,xt];return wt!==void 0&&Ie.push(zt(ie,bt,$t,wt)),ue!==void 0&&Ne.push(zt(qt,Xt,xt,ue)),K(Ie,Ne)},length:function(ie,qt,bt,Xt,$t,xt){return le(ie,qt,bt,Xt,$t,xt,3)},nearestPoint:function(ie,qt,bt,Xt,$t,xt,wt,ue){return ot([ie,bt,$t],[qt,Xt,xt],wt,ue,zt)},pointDistance:function(ie,qt,bt,Xt,$t,xt,wt,ue){var Ie=this.nearestPoint(ie,qt,bt,Xt,$t,xt,wt,ue);return k(Ie.x,Ie.y,wt,ue)},interpolationAt:zt,pointAt:function(ie,qt,bt,Xt,$t,xt,wt){return{x:zt(ie,bt,$t,wt),y:zt(qt,Xt,xt,wt)}},divide:function(ie,qt,bt,Xt,$t,xt,wt){return W(ie,qt,bt,Xt,$t,xt,wt)},tangentAngle:function(ie,qt,bt,Xt,$t,xt,wt){var ue=b(ie,bt,$t,wt),Ie=b(qt,Xt,xt,wt),Ne=Math.atan2(Ie,ue);return J(Ne)}};function Me(ie,qt,bt,Xt,$t){var xt=1-$t;return xt*xt*xt*ie+3*qt*$t*xt*xt+3*bt*$t*$t*xt+Xt*$t*$t*$t}function At(ie,qt,bt,Xt,$t){var xt=1-$t;return 3*(xt*xt*(qt-ie)+2*xt*$t*(bt-qt)+$t*$t*(Xt-bt))}function rt(ie,qt,bt,Xt){var $t=-3*ie+9*qt-9*bt+3*Xt,xt=6*ie-12*qt+6*bt,wt=3*qt-3*ie,ue=[],Ie,Ne,Zt;if(Et($t,0))Et(xt,0)||(Ie=-wt/xt,Ie>=0&&Ie<=1&&ue.push(Ie));else{var Ct=xt*xt-4*$t*wt;Et(Ct,0)?ue.push(-xt/(2*$t)):Ct>0&&(Zt=Math.sqrt(Ct),Ie=(-xt+Zt)/(2*$t),Ne=(-xt-Zt)/(2*$t),Ie>=0&&Ie<=1&&ue.push(Ie),Ne>=0&&Ne<=1&&ue.push(Ne))}return ue}function Dt(ie,qt,bt,Xt,$t,xt,wt,ue,Ie){var Ne=Me(ie,bt,$t,wt,Ie),Zt=Me(qt,Xt,xt,ue,Ie),Ct=et.pointAt(ie,qt,bt,Xt,Ie),Tt=et.pointAt(bt,Xt,$t,xt,Ie),Nt=et.pointAt($t,xt,wt,ue,Ie),tt=et.pointAt(Ct.x,Ct.y,Tt.x,Tt.y,Ie),vt=et.pointAt(Tt.x,Tt.y,Nt.x,Nt.y,Ie);return[[ie,qt,Ct.x,Ct.y,tt.x,tt.y,Ne,Zt],[Ne,Zt,vt.x,vt.y,Nt.x,Nt.y,wt,ue]]}function Ee(ie,qt,bt,Xt,$t,xt,wt,ue,Ie){if(Ie===0)return ut([ie,bt,$t,wt],[qt,Xt,xt,ue]);var Ne=Dt(ie,qt,bt,Xt,$t,xt,wt,ue,.5),Zt=Ne[0],Ct=Ne[1];return Zt.push(Ie-1),Ct.push(Ie-1),Ee.apply(null,Zt)+Ee.apply(null,Ct)}var ge={extrema:rt,box:function(ie,qt,bt,Xt,$t,xt,wt,ue){for(var Ie=[ie,wt],Ne=[qt,ue],Zt=rt(ie,bt,$t,wt),Ct=rt(qt,Xt,xt,ue),Tt=0;Tt<Zt.length;Tt++)Ie.push(Me(ie,bt,$t,wt,Zt[Tt]));for(var Tt=0;Tt<Ct.length;Tt++)Ne.push(Me(qt,Xt,xt,ue,Ct[Tt]));return K(Ie,Ne)},length:function(ie,qt,bt,Xt,$t,xt,wt,ue){return Ee(ie,qt,bt,Xt,$t,xt,wt,ue,3)},nearestPoint:function(ie,qt,bt,Xt,$t,xt,wt,ue,Ie,Ne,Zt){return ot([ie,bt,$t,wt],[qt,Xt,xt,ue],Ie,Ne,Me,Zt)},pointDistance:function(ie,qt,bt,Xt,$t,xt,wt,ue,Ie,Ne,Zt){var Ct=this.nearestPoint(ie,qt,bt,Xt,$t,xt,wt,ue,Ie,Ne,Zt);return k(Ct.x,Ct.y,Ie,Ne)},interpolationAt:Me,pointAt:function(ie,qt,bt,Xt,$t,xt,wt,ue,Ie){return{x:Me(ie,bt,$t,wt,Ie),y:Me(qt,Xt,xt,ue,Ie)}},divide:function(ie,qt,bt,Xt,$t,xt,wt,ue,Ie){return Dt(ie,qt,bt,Xt,$t,xt,wt,ue,Ie)},tangentAngle:function(ie,qt,bt,Xt,$t,xt,wt,ue,Ie){var Ne=At(ie,bt,$t,wt,Ie),Zt=At(qt,Xt,xt,ue,Ie);return J(Math.atan2(Zt,Ne))}};function Ge(ie,qt){var bt=Math.abs(ie);return qt>0?bt:bt*-1}var Ue={box:function(ie,qt,bt,Xt){return{x:ie-bt,y:qt-Xt,width:bt*2,height:Xt*2}},length:function(ie,qt,bt,Xt){return Math.PI*(3*(bt+Xt)-Math.sqrt((3*bt+Xt)*(bt+3*Xt)))},nearestPoint:function(ie,qt,bt,Xt,$t,xt){var wt=bt,ue=Xt;if(wt===0||ue===0)return{x:ie,y:qt};for(var Ie=$t-ie,Ne=xt-qt,Zt=Math.abs(Ie),Ct=Math.abs(Ne),Tt=wt*wt,Nt=ue*ue,tt=Math.PI/4,vt,Ht,he=0;he<4;he++){vt=wt*Math.cos(tt),Ht=ue*Math.sin(tt);var jt=(Tt-Nt)*Math.pow(Math.cos(tt),3)/wt,Te=(Nt-Tt)*Math.pow(Math.sin(tt),3)/ue,We=vt-jt,Qe=Ht-Te,pr=Zt-jt,lr=Ct-Te,Vr=Math.hypot(Qe,We),Pr=Math.hypot(lr,pr),Br=Vr*Math.asin((We*lr-Qe*pr)/(Vr*Pr)),Sn=Br/Math.sqrt(Tt+Nt-vt*vt-Ht*Ht);tt+=Sn,tt=Math.min(Math.PI/2,Math.max(0,tt))}return{x:ie+Ge(vt,Ie),y:qt+Ge(Ht,Ne)}},pointDistance:function(ie,qt,bt,Xt,$t,xt){var wt=this.nearestPoint(ie,qt,bt,Xt,$t,xt);return k(wt.x,wt.y,$t,xt)},pointAt:function(ie,qt,bt,Xt,$t){var xt=2*Math.PI*$t;return{x:ie+bt*Math.cos(xt),y:qt+Xt*Math.sin(xt)}},tangentAngle:function(ie,qt,bt,Xt,$t){var xt=2*Math.PI*$t,wt=Math.atan2(Xt*Math.cos(xt),-bt*Math.sin(xt));return J(wt)}};function xe(ie,qt,bt,Xt,$t,xt,wt,ue){return-1*bt*Math.cos($t)*Math.sin(ue)-Xt*Math.sin($t)*Math.cos(ue)}function Ke(ie,qt,bt,Xt,$t,xt,wt,ue){return-1*bt*Math.sin($t)*Math.sin(ue)+Xt*Math.cos($t)*Math.cos(ue)}function Lt(ie,qt,bt){return Math.atan(-qt/ie*Math.tan(bt))}function Jt(ie,qt,bt){return Math.atan(qt/(ie*Math.tan(bt)))}function ft(ie,qt,bt,Xt,$t,xt){return bt*Math.cos($t)*Math.cos(xt)-Xt*Math.sin($t)*Math.sin(xt)+ie}function St(ie,qt,bt,Xt,$t,xt){return bt*Math.sin($t)*Math.cos(xt)+Xt*Math.cos($t)*Math.sin(xt)+qt}function Y(ie,qt,bt,Xt){var $t=Math.atan2(Xt*ie,bt*qt);return($t+Math.PI*2)%(Math.PI*2)}function mt(ie,qt,bt){return{x:ie*Math.cos(bt),y:qt*Math.sin(bt)}}function se(ie,qt,bt){var Xt=Math.cos(bt),$t=Math.sin(bt);return[ie*Xt-qt*$t,ie*$t+qt*Xt]}var ke={box:function(ie,qt,bt,Xt,$t,xt,wt){for(var ue=Lt(bt,Xt,$t),Ie=1/0,Ne=-1/0,Zt=[xt,wt],Ct=-Math.PI*2;Ct<=Math.PI*2;Ct+=Math.PI){var Tt=ue+Ct;xt<wt?xt<Tt&&Tt<wt&&Zt.push(Tt):wt<Tt&&Tt<xt&&Zt.push(Tt)}for(var Ct=0;Ct<Zt.length;Ct++){var Nt=ft(ie,qt,bt,Xt,$t,Zt[Ct]);Nt<Ie&&(Ie=Nt),Nt>Ne&&(Ne=Nt)}for(var tt=Jt(bt,Xt,$t),vt=1/0,Ht=-1/0,he=[xt,wt],Ct=-Math.PI*2;Ct<=Math.PI*2;Ct+=Math.PI){var jt=tt+Ct;xt<wt?xt<jt&&jt<wt&&he.push(jt):wt<jt&&jt<xt&&he.push(jt)}for(var Ct=0;Ct<he.length;Ct++){var Te=St(ie,qt,bt,Xt,$t,he[Ct]);Te<vt&&(vt=Te),Te>Ht&&(Ht=Te)}return{x:Ie,y:vt,width:Ne-Ie,height:Ht-vt}},length:function(ie,qt,bt,Xt,$t,xt,wt){},nearestPoint:function(ie,qt,bt,Xt,$t,xt,wt,ue,Ie){var Ne=se(ue-ie,Ie-qt,-$t),Zt=Ne[0],Ct=Ne[1],Tt=Ue.nearestPoint(0,0,bt,Xt,Zt,Ct),Nt=Y(bt,Xt,Tt.x,Tt.y);Nt<xt?Tt=mt(bt,Xt,xt):Nt>wt&&(Tt=mt(bt,Xt,wt));var tt=se(Tt.x,Tt.y,$t);return{x:tt[0]+ie,y:tt[1]+qt}},pointDistance:function(ie,qt,bt,Xt,$t,xt,wt,ue,Ie){var Ne=this.nearestPoint(ie,qt,bt,Xt,ue,Ie);return k(Ne.x,Ne.y,ue,Ie)},pointAt:function(ie,qt,bt,Xt,$t,xt,wt,ue){var Ie=(wt-xt)*ue+xt;return{x:ft(ie,qt,bt,Xt,$t,Ie),y:St(ie,qt,bt,Xt,$t,Ie)}},tangentAngle:function(ie,qt,bt,Xt,$t,xt,wt,ue){var Ie=(wt-xt)*ue+xt,Ne=xe(ie,qt,bt,Xt,$t,xt,wt,Ie),Zt=Ke(ie,qt,bt,Xt,$t,xt,wt,Ie);return J(Math.atan2(Zt,Ne))}};function Le(ie){for(var qt=0,bt=[],Xt=0;Xt<ie.length-1;Xt++){var $t=ie[Xt],xt=ie[Xt+1],wt=k($t[0],$t[1],xt[0],xt[1]),ue={from:$t,to:xt,length:wt};bt.push(ue),qt+=wt}return{segments:bt,totalLength:qt}}function Be(ie){if(ie.length<2)return 0;for(var qt=0,bt=0;bt<ie.length-1;bt++){var Xt=ie[bt],$t=ie[bt+1];qt+=k(Xt[0],Xt[1],$t[0],$t[1])}return qt}function Bt(ie,qt){if(qt>1||qt<0||ie.length<2)return null;var bt=Le(ie),Xt=bt.segments,$t=bt.totalLength;if($t===0)return{x:ie[0][0],y:ie[0][1]};for(var xt=0,wt=null,ue=0;ue<Xt.length;ue++){var Ie=Xt[ue],Ne=Ie.from,Zt=Ie.to,Ct=Ie.length/$t;if(qt>=xt&&qt<=xt+Ct){var Tt=(qt-xt)/Ct;wt=et.pointAt(Ne[0],Ne[1],Zt[0],Zt[1],Tt);break}xt+=Ct}return wt}function ee(ie,qt){if(qt>1||qt<0||ie.length<2)return 0;for(var bt=Le(ie),Xt=bt.segments,$t=bt.totalLength,xt=0,wt=0,ue=0;ue<Xt.length;ue++){var Ie=Xt[ue],Ne=Ie.from,Zt=Ie.to,Ct=Ie.length/$t;if(qt>=xt&&qt<=xt+Ct){wt=Math.atan2(Zt[1]-Ne[1],Zt[0]-Ne[0]);break}xt+=Ct}return wt}function me(ie,qt,bt){for(var Xt=1/0,$t=0;$t<ie.length-1;$t++){var xt=ie[$t],wt=ie[$t+1],ue=et.pointDistance(xt[0],xt[1],wt[0],wt[1],qt,bt);ue<Xt&&(Xt=ue)}return Xt}var Yt={box:function(ie){for(var qt=[],bt=[],Xt=0;Xt<ie.length;Xt++){var $t=ie[Xt];qt.push($t[0]),bt.push($t[1])}return K(qt,bt)},length:function(ie){return Be(ie)},pointAt:function(ie,qt){return Bt(ie,qt)},pointDistance:function(ie,qt,bt){return me(ie,qt,bt)},tangentAngle:function(ie,qt){return ee(ie,qt)}};function qe(ie){var qt=ie.slice(0);return ie.length&&qt.push(ie[0]),qt}var vr={box:function(ie){return Yt.box(ie)},length:function(ie){return Be(qe(ie))},pointAt:function(ie,qt){return Bt(qe(ie),qt)},pointDistance:function(ie,qt,bt){return me(qe(ie),qt,bt)},tangentAngle:function(ie,qt){return ee(qe(ie),qt)}}},17904:function(pn,Ot,nt){"use strict";nt.d(Ot,{Bar:function(){return Qw},Column:function(){return Jw},Pie:function(){return Bx}});var kt={};nt.r(kt),nt.d(kt,{assign:function(){return Ko},default:function(){return Uu},defaultI18n:function(){return Xe},format:function(){return zu},parse:function(){return xl},setGlobalDateI18n:function(){return on},setGlobalDateMasks:function(){return Au}});var gt={};nt.r(gt),nt.d(gt,{Arc:function(){return md},DataMarker:function(){return Op},DataRegion:function(){return ac},Html:function(){return Ut},Image:function(){return bc},Line:function(){return xc},Region:function(){return rf},RegionFilter:function(){return Yf},Shape:function(){return xh},Text:function(){return Xf}});var k={};nt.r(k),nt.d(k,{ellipsisHead:function(){return ur},ellipsisMiddle:function(){return nr},ellipsisTail:function(){return Er},getDefault:function(){return cr}});var Et={};nt.r(Et),nt.d(Et,{equidistance:function(){return Bi},equidistanceWithReverseBoth:function(){return sa},getDefault:function(){return xn},reserveBoth:function(){return ui},reserveFirst:function(){return Un},reserveLast:function(){return yi}});var K={};nt.r(K),nt.d(K,{fixedAngle:function(){return Ni},getDefault:function(){return uo},unfixedAngle:function(){return La}});var yt={};nt.r(yt),nt.d(yt,{autoEllipsis:function(){return k},autoHide:function(){return Et},autoRotate:function(){return K}});var J={};nt.r(J),nt.d(J,{Base:function(){return ga},Circle:function(){return yu},Html:function(){return Zo},Line:function(){return As}});var pt={};nt.r(pt),nt.d(pt,{CONTAINER_CLASS:function(){return Js},CROSSHAIR_X:function(){return Kf},CROSSHAIR_Y:function(){return cc},LIST_CLASS:function(){return pl},LIST_ITEM_CLASS:function(){return wc},MARKER_CLASS:function(){return Of},NAME_CLASS:function(){return uu},TITLE_CLASS:function(){return Rl},VALUE_CLASS:function(){return Dl}});var et={};nt.r(et),nt.d(et,{Base:function(){return Gc},Circle:function(){return xy},Ellipse:function(){return rg},Image:function(){return ng},Line:function(){return kc},Marker:function(){return hp},Path:function(){return Wd},Polygon:function(){return y_},Polyline:function(){return __},Rect:function(){return Xg},Text:function(){return Kp}});var _e={};nt.r(_e),nt.d(_e,{Canvas:function(){return x2},Group:function(){return g0},Shape:function(){return et},getArcParams:function(){return Ud},version:function(){return fO}});var ot={};nt.r(ot),nt.d(ot,{Base:function(){return sh},Circle:function(){return T2},Dom:function(){return I2},Ellipse:function(){return L2},Image:function(){return Lc},Line:function(){return F2},Marker:function(){return D2},Path:function(){return N2},Polygon:function(){return U2},Polyline:function(){return V2},Rect:function(){return RT},Text:function(){return BT}});var ut={};nt.r(ut),nt.d(ut,{Canvas:function(){return eE},Group:function(){return Iy},Shape:function(){return ot},version:function(){return rE}});var zt={};nt.r(zt),nt.d(zt,{cluster:function(){return w4},hierarchy:function(){return Eg},pack:function(){return vC},packEnclose:function(){return A1},packSiblings:function(){return k1},partition:function(){return Pb},stratify:function(){return uA},tree:function(){return fA},treemap:function(){return vA},treemapBinary:function(){return M4},treemapDice:function(){return Vm},treemapResquarify:function(){return jm},treemapSlice:function(){return Hm},treemapSliceDice:function(){return I4},treemapSquarify:function(){return dA}});var P=nt(29268),b=nt(22374),W;(function(r){r.FORE="fore",r.MID="mid",r.BG="bg"})(W||(W={}));var le;(function(r){r.TOP="top",r.TOP_LEFT="top-left",r.TOP_RIGHT="top-right",r.RIGHT="right",r.RIGHT_TOP="right-top",r.RIGHT_BOTTOM="right-bottom",r.LEFT="left",r.LEFT_TOP="left-top",r.LEFT_BOTTOM="left-bottom",r.BOTTOM="bottom",r.BOTTOM_LEFT="bottom-left",r.BOTTOM_RIGHT="bottom-right",r.RADIUS="radius",r.CIRCLE="circle",r.NONE="none"})(le||(le={}));var be;(function(r){r.AXIS="axis",r.GRID="grid",r.LEGEND="legend",r.TOOLTIP="tooltip",r.ANNOTATION="annotation",r.SLIDER="slider",r.SCROLLBAR="scrollbar",r.OTHER="other"})(be||(be={}));var Me={FORE:3,MID:2,BG:1},At;(function(r){r.BEFORE_RENDER="beforerender",r.AFTER_RENDER="afterrender",r.BEFORE_PAINT="beforepaint",r.AFTER_PAINT="afterpaint",r.BEFORE_CHANGE_DATA="beforechangedata",r.AFTER_CHANGE_DATA="afterchangedata",r.BEFORE_CLEAR="beforeclear",r.AFTER_CLEAR="afterclear",r.BEFORE_DESTROY="beforedestroy",r.BEFORE_CHANGE_SIZE="beforechangesize",r.AFTER_CHANGE_SIZE="afterchangesize"})(At||(At={}));var rt;(function(r){r.BEFORE_DRAW_ANIMATE="beforeanimate",r.AFTER_DRAW_ANIMATE="afteranimate",r.BEFORE_RENDER_LABEL="beforerenderlabel",r.AFTER_RENDER_LABEL="afterrenderlabel"})(rt||(rt={}));var Dt;(function(r){r.MOUSE_ENTER="plot:mouseenter",r.MOUSE_DOWN="plot:mousedown",r.MOUSE_MOVE="plot:mousemove",r.MOUSE_UP="plot:mouseup",r.MOUSE_LEAVE="plot:mouseleave",r.TOUCH_START="plot:touchstart",r.TOUCH_MOVE="plot:touchmove",r.TOUCH_END="plot:touchend",r.TOUCH_CANCEL="plot:touchcancel",r.CLICK="plot:click",r.DBLCLICK="plot:dblclick",r.CONTEXTMENU="plot:contextmenu",r.LEAVE="plot:leave",r.ENTER="plot:enter"})(Dt||(Dt={}));var Ee;(function(r){r.ACTIVE="active",r.INACTIVE="inactive",r.SELECTED="selected",r.DEFAULT="default"})(Ee||(Ee={}));var ge=["color","shape","size"],Ge="_origin",Ue=1,xe=1,Ke=.25,Lt={};function Jt(r){var e=Lt[r];if(!e)throw new Error("G engine '".concat(r,"' is not exist, please register it at first."));return e}function ft(r,e){Lt[r]=e}var St=nt(71452),Y=nt(85306);function mt(r){var e=getComputedStyle(r);return{width:(r.clientWidth||parseInt(e.width,10))-parseInt(e.paddingLeft,10)-parseInt(e.paddingRight,10),height:(r.clientHeight||parseInt(e.height,10))-parseInt(e.paddingTop,10)-parseInt(e.paddingBottom,10)}}function se(r){return typeof r=="number"&&!isNaN(r)}function ke(r,e,t,i){var o=t,c=i;if(e){var p=mt(r);o=p.width?p.width:o,c=p.height?p.height:c}return{width:Math.max(se(o)?o:Ue,Ue),height:Math.max(se(c)?c:xe,xe)}}function Le(r){var e=r.parentNode;e&&e.removeChild(r)}var Be=nt(42090),Bt=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this)||this;i.destroyed=!1;var o=t.visible,c=o===void 0?!0:o;return i.visible=c,i}return e.prototype.show=function(){var t=this.visible;t||this.changeVisible(!0)},e.prototype.hide=function(){var t=this.visible;t&&this.changeVisible(!1)},e.prototype.destroy=function(){this.off(),this.destroyed=!0},e.prototype.changeVisible=function(t){this.visible!==t&&(this.visible=t)},e}(Be.Z),ee=Bt,me=nt(22479),Yt=0,qe=1/2,vr=1/2,ie=.05,qt=function(){function r(e){var t=e.xField,i=e.yField,o=e.adjustNames,c=o===void 0?["x","y"]:o,p=e.dimValuesMap;this.adjustNames=c,this.xField=t,this.yField=i,this.dimValuesMap=p}return r.prototype.isAdjust=function(e){return this.adjustNames.indexOf(e)>=0},r.prototype.getAdjustRange=function(e,t,i){var o=this.yField,c=i.indexOf(t),p=i.length,g,_;return!o&&this.isAdjust("y")?(g=0,_=1):p>1?(g=i[c===0?0:c-1],_=i[c===p-1?p-1:c+1],c!==0?g+=(t-g)/2:g-=(_-t)/2,c!==p-1?_-=(_-t)/2:_+=(t-i[p-2])/2):(g=t===0?0:t-.5,_=t===0?1:t+.5),{pre:g,next:_}},r.prototype.adjustData=function(e,t){var i=this,o=this.getDimValues(t);b.S6(e,function(c,p){b.S6(o,function(g,_){i.adjustDim(_,g,c,p)})})},r.prototype.groupData=function(e,t){return b.S6(e,function(i){i[t]===void 0&&(i[t]=Yt)}),b.vM(e,t)},r.prototype.adjustDim=function(e,t,i,o){},r.prototype.getDimValues=function(e){var t=this,i=t.xField,o=t.yField,c=b.f0({},this.dimValuesMap),p=[];if(i&&this.isAdjust("x")&&p.push(i),o&&this.isAdjust("y")&&p.push(o),p.forEach(function(_){c&&c[_]||(c[_]=b.I(e,_).sort(function(S,I){return S-I}))}),!o&&this.isAdjust("y")){var g="y";c[g]=[Yt,1]}return c},r}(),bt=qt,Xt={},$t=function(r){return Xt[r.toLowerCase()]},xt=function(r,e){if($t(r))throw new Error("Adjust type '"+r+"' existed.");Xt[r.toLowerCase()]=e},wt=nt(4620),ue=nt.n(wt);var Ie=function(e,t){return Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var c in o)o.hasOwnProperty(c)&&(i[c]=o[c])},Ie(e,t)};function Ne(r,e){Ie(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Zt=function(){return Zt=Object.assign||function(t){for(var i,o=1,c=arguments.length;o<c;o++){i=arguments[o];for(var p in i)Object.prototype.hasOwnProperty.call(i,p)&&(t[p]=i[p])}return t},Zt.apply(this,arguments)};function Ct(r,e){var t={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.indexOf(i)<0&&(t[i]=r[i]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(r);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(r,i[o])&&(t[i[o]]=r[i[o]]);return t}function Tt(r,e,t,i){var o=arguments.length,c=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,p;if((typeof Reflect=="undefined"?"undefined":_typeof(Reflect))==="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,e,t,i);else for(var g=r.length-1;g>=0;g--)(p=r[g])&&(c=(o<3?p(c):o>3?p(e,t,c):p(e,t))||c);return o>3&&c&&Object.defineProperty(e,t,c),c}function Nt(r,e){return function(t,i){e(t,i,r)}}function tt(r,e){if((typeof Reflect=="undefined"?"undefined":_typeof(Reflect))==="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)}function vt(r,e,t,i){function o(c){return c instanceof t?c:new t(function(p){p(c)})}return new(t||(t=Promise))(function(c,p){function g(I){try{S(i.next(I))}catch(L){p(L)}}function _(I){try{S(i.throw(I))}catch(L){p(L)}}function S(I){I.done?c(I.value):o(I.value).then(g,_)}S((i=i.apply(r,e||[])).next())})}function Ht(r,e){var t={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},i,o,c,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(S){return function(I){return _([S,I])}}function _(S){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,o&&(c=S[0]&2?o.return:S[0]?o.throw||((c=o.return)&&c.call(o),0):o.next)&&!(c=c.call(o,S[1])).done)return c;switch(o=0,c&&(S=[S[0]&2,c.value]),S[0]){case 0:case 1:c=S;break;case 4:return t.label++,{value:S[1],done:!1};case 5:t.label++,o=S[1],S=[0];continue;case 7:S=t.ops.pop(),t.trys.pop();continue;default:if(c=t.trys,!(c=c.length>0&&c[c.length-1])&&(S[0]===6||S[0]===2)){t=0;continue}if(S[0]===3&&(!c||S[1]>c[0]&&S[1]<c[3])){t.label=S[1];break}if(S[0]===6&&t.label<c[1]){t.label=c[1],c=S;break}if(c&&t.label<c[2]){t.label=c[2],t.ops.push(S);break}c[2]&&t.ops.pop(),t.trys.pop();continue}S=e.call(r,t)}catch(I){S=[6,I],o=0}finally{i=c=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}}function he(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}function jt(r,e){for(var t in r)t!=="default"&&!e.hasOwnProperty(t)&&(e[t]=r[t])}function Te(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function We(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var i=t.call(r),o,c=[],p;try{for(;(e===void 0||e-- >0)&&!(o=i.next()).done;)c.push(o.value)}catch(g){p={error:g}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(p)throw p.error}}return c}function Qe(){for(var r=[],e=0;e<arguments.length;e++)r=r.concat(We(arguments[e]));return r}function pr(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var i=Array(r),o=0,e=0;e<t;e++)for(var c=arguments[e],p=0,g=c.length;p<g;p++,o++)i[o]=c[p];return i}function lr(r){return this instanceof lr?(this.v=r,this):new lr(r)}function Vr(r,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t.apply(r,e||[]),o,c=[];return o={},p("next"),p("throw"),p("return"),o[Symbol.asyncIterator]=function(){return this},o;function p(F){i[F]&&(o[F]=function(z){return new Promise(function(V,Q){c.push([F,z,V,Q])>1||g(F,z)})})}function g(F,z){try{_(i[F](z))}catch(V){L(c[0][3],V)}}function _(F){F.value instanceof lr?Promise.resolve(F.value.v).then(S,I):L(c[0][2],F)}function S(F){g("next",F)}function I(F){g("throw",F)}function L(F,z){F(z),c.shift(),c.length&&g(c[0][0],c[0][1])}}function Pr(r){var e,t;return e={},i("next"),i("throw",function(o){throw o}),i("return"),e[Symbol.iterator]=function(){return this},e;function i(o,c){e[o]=r[o]?function(p){return(t=!t)?{value:lr(r[o](p)),done:o==="return"}:c?c(p):p}:c}}function Br(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof Te=="function"?Te(r):r[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(c){t[c]=r[c]&&function(p){return new Promise(function(g,_){p=r[c](p),o(g,_,p.done,p.value)})}}function o(c,p,g,_){Promise.resolve(_).then(function(S){c({value:S,done:g})},p)}}function Sn(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}function an(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)Object.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e.default=r,e}function zn(r){return r&&r.__esModule?r:{default:r}}function Zn(r,e){if(!e.has(r))throw new TypeError("attempted to get private field on non-instance");return e.get(r)}function Wn(r,e,t){if(!e.has(r))throw new TypeError("attempted to set private field on non-instance");return e.set(r,t),t}var Dn=function(r){Ne(e,r);function e(t){var i=r.call(this,t)||this;i.cacheMap={},i.adjustDataArray=[],i.mergeData=[];var o=t.marginRatio,c=o===void 0?qe:o,p=t.dodgeRatio,g=p===void 0?vr:p,_=t.dodgeBy,S=t.intervalPadding,I=t.dodgePadding,L=t.xDimensionLength,F=t.groupNum,z=t.defaultSize,V=t.maxColumnWidth,Q=t.minColumnWidth,st=t.columnWidthRatio,at=t.customOffset;return i.marginRatio=c,i.dodgeRatio=g,i.dodgeBy=_,i.intervalPadding=S,i.dodgePadding=I,i.xDimensionLegenth=L,i.groupNum=F,i.defaultSize=z,i.maxColumnWidth=V,i.minColumnWidth=Q,i.columnWidthRatio=st,i.customOffset=at,i}return e.prototype.process=function(t){var i=b.d9(t),o=b.xH(i),c=this.dodgeBy,p=c?b.ru(o,c):i;return this.cacheMap={},this.adjustDataArray=p,this.mergeData=o,this.adjustData(p,o),this.adjustDataArray=[],this.mergeData=[],i},e.prototype.adjustDim=function(t,i,o,c){var p=this,g=this.customOffset,_=this.getDistribution(t),S=this.groupData(o,t);return b.S6(S,function(I,L){var F;i.length===1?F={pre:i[0]-1,next:i[0]+1}:F=p.getAdjustRange(t,parseFloat(L),i),b.S6(I,function(z){var V=z[t],Q=_[V],st=Q.indexOf(c);if(b.UM(g))z[t]=p.getDodgeOffset(F,st,Q.length);else{var at=F.pre,Rt=F.next;z[t]=b.mf(g)?g(z,F):(at+Rt)/2+g}})}),[]},e.prototype.getDodgeOffset=function(t,i,o){var c=this,p=c.dodgeRatio,g=c.marginRatio,_=c.intervalPadding,S=c.dodgePadding,I=t.pre,L=t.next,F=L-I,z;if(!b.UM(_)&&b.UM(S)&&_>=0){var V=this.getIntervalOnlyOffset(o,i);z=I+V}else if(!b.UM(S)&&b.UM(_)&&S>=0){var V=this.getDodgeOnlyOffset(o,i);z=I+V}else if(!b.UM(_)&&!b.UM(S)&&_>=0&&S>=0){var V=this.getIntervalAndDodgeOffset(o,i);z=I+V}else{var Q=F*p/o,st=g*Q,V=1/2*(F-o*Q-(o-1)*st)+((i+1)*Q+i*st)-1/2*Q-1/2*F;z=(I+L)/2+V}return z},e.prototype.getIntervalOnlyOffset=function(t,i){var o=this,c=o.defaultSize,p=o.intervalPadding,g=o.xDimensionLegenth,_=o.groupNum,S=o.dodgeRatio,I=o.maxColumnWidth,L=o.minColumnWidth,F=o.columnWidthRatio,z=p/g,V=(1-(_-1)*z)/_*S/(t-1),Q=((1-z*(_-1))/_-V*(t-1))/t;if(Q=b.UM(F)?Q:1/_/t*F,!b.UM(I)){var st=I/g;Q=Math.min(Q,st)}if(!b.UM(L)){var at=L/g;Q=Math.max(Q,at)}Q=c?c/g:Q,V=((1-(_-1)*z)/_-t*Q)/(t-1);var Rt=((1/2+i)*Q+i*V+1/2*z)*_-z/2;return Rt},e.prototype.getDodgeOnlyOffset=function(t,i){var o=this,c=o.defaultSize,p=o.dodgePadding,g=o.xDimensionLegenth,_=o.groupNum,S=o.marginRatio,I=o.maxColumnWidth,L=o.minColumnWidth,F=o.columnWidthRatio,z=p/g,V=1*S/(_-1),Q=((1-V*(_-1))/_-z*(t-1))/t;if(Q=F?1/_/t*F:Q,!b.UM(I)){var st=I/g;Q=Math.min(Q,st)}if(!b.UM(L)){var at=L/g;Q=Math.max(Q,at)}Q=c?c/g:Q,V=(1-(Q*t+z*(t-1))*_)/(_-1);var Rt=((1/2+i)*Q+i*z+1/2*V)*_-V/2;return Rt},e.prototype.getIntervalAndDodgeOffset=function(t,i){var o=this,c=o.intervalPadding,p=o.dodgePadding,g=o.xDimensionLegenth,_=o.groupNum,S=c/g,I=p/g,L=((1-S*(_-1))/_-I*(t-1))/t,F=((1/2+i)*L+i*I+1/2*S)*_-S/2;return F},e.prototype.getDistribution=function(t){var i=this.adjustDataArray,o=this.cacheMap,c=o[t];return c||(c={},b.S6(i,function(p,g){var _=b.I(p,t);_.length||_.push(0),b.S6(_,function(S){c[S]||(c[S]=[]),c[S].push(g)})}),o[t]=c),c},e}(bt),Xn=Dn;function Ft(r,e){return(e-r)*Math.random()+r}var Wt=function(r){Ne(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.process=function(t){var i=b.d9(t),o=b.xH(i);return this.adjustData(i,o),i},e.prototype.adjustDim=function(t,i,o){var c=this,p=this.groupData(o,t);return b.S6(p,function(g,_){return c.adjustGroup(g,t,parseFloat(_),i)})},e.prototype.getAdjustOffset=function(t){var i=t.pre,o=t.next,c=(o-i)*ie;return Ft(i+c,o-c)},e.prototype.adjustGroup=function(t,i,o,c){var p=this,g=this.getAdjustRange(i,o,c);return b.S6(t,function(_){_[i]=p.getAdjustOffset(g)}),t},e}(bt),oe=Wt,ye=b.Ct,Ze=function(r){Ne(e,r);function e(t){var i=r.call(this,t)||this,o=t.adjustNames,c=o===void 0?["y"]:o,p=t.height,g=p===void 0?NaN:p,_=t.size,S=_===void 0?10:_,I=t.reverseOrder,L=I===void 0?!1:I;return i.adjustNames=c,i.height=g,i.size=S,i.reverseOrder=L,i}return e.prototype.process=function(t){var i=this,o=i.yField,c=i.reverseOrder,p=o?this.processStack(t):this.processOneDimStack(t);return c?this.reverse(p):p},e.prototype.reverse=function(t){return t.slice(0).reverse()},e.prototype.processStack=function(t){var i=this,o=i.xField,c=i.yField,p=i.reverseOrder,g=p?this.reverse(t):t,_=new ye,S=new ye;return g.map(function(I){return I.map(function(L){var F,z=b.U2(L,o,0),V=b.U2(L,[c]),Q=z.toString();if(V=b.kJ(V)?V[1]:V,!b.UM(V)){var st=V>=0?_:S;st.has(Q)||st.set(Q,0);var at=st.get(Q),Rt=V+at;return st.set(Q,Rt),Zt(Zt({},L),(F={},F[c]=[at,Rt],F))}return L})})},e.prototype.processOneDimStack=function(t){var i=this,o=this,c=o.xField,p=o.height,g=o.reverseOrder,_="y",S=g?this.reverse(t):t,I=new ye;return S.map(function(L){return L.map(function(F){var z,V=i.size,Q=F[c],st=V*2/p;I.has(Q)||I.set(Q,st/2);var at=I.get(Q);return I.set(Q,at+st),Zt(Zt({},F),(z={},z[_]=at,z))})})},e}(bt),fr=Ze,_r=function(r){Ne(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.process=function(t){var i=b.xH(t),o=this,c=o.xField,p=o.yField,g=this.getXValuesMaxMap(i),_=Math.max.apply(Math,Object.keys(g).map(function(S){return g[S]}));return b.UI(t,function(S){return b.UI(S,function(I){var L,F,z=I[p],V=I[c];if(b.kJ(z)){var Q=(_-g[V])/2;return Zt(Zt({},I),(L={},L[p]=b.UI(z,function(at){return Q+at}),L))}var st=(_-z)/2;return Zt(Zt({},I),(F={},F[p]=[st,z+st],F))})})},e.prototype.getXValuesMaxMap=function(t){var i=this,o=this,c=o.xField,p=o.yField,g=b.vM(t,function(_){return _[c]});return b.Q8(g,function(_){return i.getDimMaxValue(_,p)})},e.prototype.getDimMaxValue=function(t,i){var o=b.UI(t,function(p){return b.U2(p,i,[])}),c=b.xH(o);return Math.max.apply(Math,c)},e}(bt),we=_r;xt("Dodge",Xn),xt("Jitter",oe),xt("Stack",fr),xt("Symmetric",we);var ir=function(r,e){return(0,b.HD)(e)?e:r.invert(r.scale(e))},Hr=function(){function r(e){this.names=[],this.scales=[],this.linear=!1,this.values=[],this.callback=function(){return[]},this._parseCfg(e)}return r.prototype.mapping=function(){for(var e=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var o=t.map(function(c,p){return e._toOriginParam(c,e.scales[p])});return this.callback.apply(this,o)},r.prototype.getLinearValue=function(e){var t=this.values.length-1,i=Math.floor(t*e),o=t*e-i,c=this.values[i],p=i===t?c:this.values[i+1];return c+(p-c)*o},r.prototype.getNames=function(){for(var e=this.scales,t=this.names,i=Math.min(e.length,t.length),o=[],c=0;c<i;c+=1)o.push(t[c]);return o},r.prototype.getFields=function(){return this.scales.map(function(e){return e.field})},r.prototype.getScale=function(e){return this.scales[this.names.indexOf(e)]},r.prototype.defaultCallback=function(){for(var e=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return t.length===0?this.values:t.map(function(o,c){var p=e.scales[c];return p.type==="identity"?p.values[0]:e._getAttributeValue(p,o)})},r.prototype._parseCfg=function(e){var t=this,i=e.type,o=i===void 0?"base":i,c=e.names,p=c===void 0?[]:c,g=e.scales,_=g===void 0?[]:g,S=e.values,I=S===void 0?[]:S,L=e.callback;this.type=o,this.scales=_,this.values=I,this.names=p,this.callback=function(){for(var F=[],z=0;z<arguments.length;z++)F[z]=arguments[z];if(L){var V=L.apply(void 0,F);if(!(0,b.UM)(V))return[V]}return t.defaultCallback.apply(t,F)}},r.prototype._getAttributeValue=function(e,t){if(e.isCategory&&!this.linear){var i=e.translate(t);return this.values[i%this.values.length]}var o=e.scale(t);return this.getLinearValue(o)},r.prototype._toOriginParam=function(e,t){return t.isLinear?e:(0,b.kJ)(e)?e.map(function(i){return ir(t,i)}):ir(t,e)},r}(),In=Hr,nn=/rgba?\(([\s.,0-9]+)\)/,Yr=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,On=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,bi=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,Mi=function(r){return/^[r,R,L,l]{1}[\s]*\(/.test(r)},tn=function(){var r=document.createElement("i");return r.title="Web Colour Picker",r.style.display="none",document.body.appendChild(r),r},mi=function(r,e,t,i){return r[i]+(e[i]-r[i])*t};function Yn(r){return"#"+Ea(r[0])+Ea(r[1])+Ea(r[2])}var fi=function(r){return[parseInt(r.substr(1,2),16),parseInt(r.substr(3,2),16),parseInt(r.substr(5,2),16)]},Ea=function(r){var e=Math.round(r).toString(16);return e.length===1?"0"+e:e},si=function(r,e){var t=isNaN(Number(e))||e<0?0:e>1?1:Number(e),i=r.length-1,o=Math.floor(i*t),c=i*t-o,p=r[o],g=o===i?p:r[o+1];return Yn([mi(p,g,c,0),mi(p,g,c,1),mi(p,g,c,2)])},Ia,vo=function(r){if(r[0]==="#"&&r.length===7)return r;Ia||(Ia=tn()),Ia.style.color=r;var e=document.defaultView.getComputedStyle(Ia,"").getPropertyValue("color"),t=nn.exec(e),i=t[1].split(/\s*,\s*/).map(function(o){return Number(o)});return e=Yn(i),e},Oa=function(r){var e=(0,b.HD)(r)?r.split("-"):r,t=(0,b.UI)(e,function(i){return fi(i.indexOf("#")===-1?vo(i):i)});return function(i){return si(t,i)}},Ha=function(r){if(Mi(r)){var e,t=void 0;if(r[0]==="l"){var i=Yr.exec(r),o=+i[1]+90;t=i[2],e="linear-gradient("+o+"deg, "}else if(r[0]==="r"){e="radial-gradient(";var i=On.exec(r);t=i[4]}var c=t.match(bi);return(0,b.S6)(c,function(p,g){var _=p.split(":");e+=_[1]+" "+_[0]*100+"%",g!==c.length-1&&(e+=", ")}),e+=")",e}return r},wa={rgb2arr:fi,gradient:Oa,toRGB:(0,b.HP)(vo),toCSSGradient:Ha},ya=function(r){Ne(e,r);function e(t){var i=r.call(this,t)||this;return i.type="color",i.names=["color"],(0,b.HD)(i.values)&&(i.linear=!0),i.gradient=wa.gradient(i.values),i}return e.prototype.getLinearValue=function(t){return this.gradient(t)},e}(In),Qa=ya,Wo=function(r){Ne(e,r);function e(t){var i=r.call(this,t)||this;return i.type="opacity",i.names=["opacity"],i}return e}(In),yo=Wo,Va=function(r){Ne(e,r);function e(t){var i=r.call(this,t)||this;return i.names=["x","y"],i.type="position",i}return e.prototype.mapping=function(t,i){var o=this.scales,c=o[0],p=o[1];return(0,b.UM)(t)||(0,b.UM)(i)?[]:[(0,b.kJ)(t)?t.map(function(g){return c.scale(g)}):c.scale(t),(0,b.kJ)(i)?i.map(function(g){return p.scale(g)}):p.scale(i)]},e}(In),Ya=Va,No=function(r){Ne(e,r);function e(t){var i=r.call(this,t)||this;return i.type="shape",i.names=["shape"],i}return e.prototype.getLinearValue=function(t){var i=Math.round((this.values.length-1)*t);return this.values[i]},e}(In),Nu=No,ts=function(r){Ne(e,r);function e(t){var i=r.call(this,t)||this;return i.type="size",i.names=["size"],i}return e}(In),bo=ts,rr={};function de(r){return rr[r]}function Ve(r,e){rr[r]=e}var Mr=function(){function r(e){this.type="base",this.isCategory=!1,this.isLinear=!1,this.isContinuous=!1,this.isIdentity=!1,this.values=[],this.range=[0,1],this.ticks=[],this.__cfg__=e,this.initCfg(),this.init()}return r.prototype.translate=function(e){return e},r.prototype.change=function(e){(0,b.f0)(this.__cfg__,e),this.init()},r.prototype.clone=function(){return this.constructor(this.__cfg__)},r.prototype.getTicks=function(){var e=this;return(0,b.UI)(this.ticks,function(t,i){return(0,b.Kn)(t)?t:{text:e.getText(t,i),tickValue:t,value:e.scale(t)}})},r.prototype.getText=function(e,t){var i=this.formatter,o=i?i(e,t):e;return(0,b.UM)(o)||!(0,b.mf)(o.toString)?"":o.toString()},r.prototype.getConfig=function(e){return this.__cfg__[e]},r.prototype.init=function(){(0,b.f0)(this,this.__cfg__),this.setDomain(),(0,b.xb)(this.getConfig("ticks"))&&(this.ticks=this.calculateTicks())},r.prototype.initCfg=function(){},r.prototype.setDomain=function(){},r.prototype.calculateTicks=function(){var e=this.tickMethod,t=[];if((0,b.HD)(e)){var i=de(e);if(!i)throw new Error("There is no method to to calculate ticks!");t=i(this)}else(0,b.mf)(e)&&(t=e(this));return t},r.prototype.rangeMin=function(){return this.range[0]},r.prototype.rangeMax=function(){return this.range[1]},r.prototype.calcPercent=function(e,t,i){return(0,b.hj)(e)?(e-t)/(i-t):NaN},r.prototype.calcValue=function(e,t,i){return t+e*(i-t)},r}(),rn=Mr,kn=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cat",t.isCategory=!0,t}return e.prototype.buildIndexMap=function(){if(!this.translateIndexMap){this.translateIndexMap=new Map;for(var t=0;t<this.values.length;t++)this.translateIndexMap.set(this.values[t],t)}},e.prototype.translate=function(t){this.buildIndexMap();var i=this.translateIndexMap.get(t);return i===void 0&&(i=(0,b.hj)(t)?t:NaN),i},e.prototype.scale=function(t){var i=this.translate(t),o=this.calcPercent(i,this.min,this.max);return this.calcValue(o,this.rangeMin(),this.rangeMax())},e.prototype.invert=function(t){var i=this.max-this.min,o=this.calcPercent(t,this.rangeMin(),this.rangeMax()),c=Math.round(i*o)+this.min;return c<this.min||c>this.max?NaN:this.values[c]},e.prototype.getText=function(t){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];var c=t;return(0,b.hj)(t)&&!this.values.includes(t)&&(c=this.values[c]),r.prototype.getText.apply(this,(0,P.pr)([c],i))},e.prototype.initCfg=function(){this.tickMethod="cat"},e.prototype.setDomain=function(){if((0,b.UM)(this.getConfig("min"))&&(this.min=0),(0,b.UM)(this.getConfig("max"))){var t=this.values.length;this.max=t>1?t-1:t}this.translateIndexMap&&(this.translateIndexMap=void 0)},e}(rn),$n=kn,Cn=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Ki="\\d\\d?",Fa="\\d\\d",Ss="\\d{3}",ko="\\d{4}",zo="[^\\s]+",oo=/\[([^]*?)\]/gm;function Xo(r,e){for(var t=[],i=0,o=r.length;i<o;i++)t.push(r[i].substr(0,e));return t}var iu=function(r){return function(e,t){var i=t[r].map(function(c){return c.toLowerCase()}),o=i.indexOf(e.toLowerCase());return o>-1?o:null}};function Ko(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var i=0,o=e;i<o.length;i++){var c=o[i];for(var p in c)r[p]=c[p]}return r}var Ul=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],$c=["January","February","March","April","May","June","July","August","September","October","November","December"],Ku=Xo($c,3),Ce=Xo(Ul,3),Xe={dayNamesShort:Ce,dayNames:Ul,monthNamesShort:Ku,monthNames:$c,amPm:["am","pm"],DoFn:function(r){return r+["th","st","nd","rd"][r%10>3?0:(r-r%10!==10?1:0)*r%10]}},Cr=Ko({},Xe),on=function(r){return Cr=Ko(Cr,r)},li=function(r){return r.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Di=function(r,e){for(e===void 0&&(e=2),r=String(r);r.length<e;)r="0"+r;return r},Ba={D:function(r){return String(r.getDate())},DD:function(r){return Di(r.getDate())},Do:function(r,e){return e.DoFn(r.getDate())},d:function(r){return String(r.getDay())},dd:function(r){return Di(r.getDay())},ddd:function(r,e){return e.dayNamesShort[r.getDay()]},dddd:function(r,e){return e.dayNames[r.getDay()]},M:function(r){return String(r.getMonth()+1)},MM:function(r){return Di(r.getMonth()+1)},MMM:function(r,e){return e.monthNamesShort[r.getMonth()]},MMMM:function(r,e){return e.monthNames[r.getMonth()]},YY:function(r){return Di(String(r.getFullYear()),4).substr(2)},YYYY:function(r){return Di(r.getFullYear(),4)},h:function(r){return String(r.getHours()%12||12)},hh:function(r){return Di(r.getHours()%12||12)},H:function(r){return String(r.getHours())},HH:function(r){return Di(r.getHours())},m:function(r){return String(r.getMinutes())},mm:function(r){return Di(r.getMinutes())},s:function(r){return String(r.getSeconds())},ss:function(r){return Di(r.getSeconds())},S:function(r){return String(Math.round(r.getMilliseconds()/100))},SS:function(r){return Di(Math.round(r.getMilliseconds()/10),2)},SSS:function(r){return Di(r.getMilliseconds(),3)},a:function(r,e){return r.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(r,e){return r.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(r){var e=r.getTimezoneOffset();return(e>0?"-":"+")+Di(Math.floor(Math.abs(e)/60)*100+Math.abs(e)%60,4)},Z:function(r){var e=r.getTimezoneOffset();return(e>0?"-":"+")+Di(Math.floor(Math.abs(e)/60),2)+":"+Di(Math.abs(e)%60,2)}},xs=function(r){return+r-1},es=[null,Ki],ls=[null,zo],zs=["isPm",zo,function(r,e){var t=r.toLowerCase();return t===e.amPm[0]?0:t===e.amPm[1]?1:null}],Qu=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(r){var e=(r+"").match(/([+-]|\d\d)/gi);if(e){var t=+e[1]*60+parseInt(e[2],10);return e[0]==="+"?t:-t}return 0}],Cu={D:["day",Ki],DD:["day",Fa],Do:["day",Ki+zo,function(r){return parseInt(r,10)}],M:["month",Ki,xs],MM:["month",Fa,xs],YY:["year",Fa,function(r){var e=new Date,t=+(""+e.getFullYear()).substr(0,2);return+(""+(+r>68?t-1:t)+r)}],h:["hour",Ki,void 0,"isPm"],hh:["hour",Fa,void 0,"isPm"],H:["hour",Ki],HH:["hour",Fa],m:["minute",Ki],mm:["minute",Fa],s:["second",Ki],ss:["second",Fa],YYYY:["year",ko],S:["millisecond","\\d",function(r){return+r*100}],SS:["millisecond",Fa,function(r){return+r*10}],SSS:["millisecond",Ss],d:es,dd:es,ddd:ls,dddd:ls,MMM:["month",zo,iu("monthNamesShort")],MMMM:["month",zo,iu("monthNames")],a:zs,A:zs,ZZ:Qu,Z:Qu},Ks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},Au=function(r){return Ko(Ks,r)},zu=function(r,e,t){if(e===void 0&&(e=Ks.default),t===void 0&&(t={}),typeof r=="number"&&(r=new Date(r)),Object.prototype.toString.call(r)!=="[object Date]"||isNaN(r.getTime()))throw new Error("Invalid Date pass to format");e=Ks[e]||e;var i=[];e=e.replace(oo,function(c,p){return i.push(p),"@@@"});var o=Ko(Ko({},Cr),t);return e=e.replace(Cn,function(c){return Ba[c](r,o)}),e.replace(/@@@/g,function(){return i.shift()})};function xl(r,e,t){if(t===void 0&&(t={}),typeof e!="string")throw new Error("Invalid format in fecha parse");if(e=Ks[e]||e,r.length>1e3)return null;var i=new Date,o={year:i.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},c=[],p=[],g=e.replace(oo,function(te,Ae){return p.push(li(Ae)),"@@@"}),_={},S={};g=li(g).replace(Cn,function(te){var Ae=Cu[te],hr=Ae[0],Tr=Ae[1],Dr=Ae[3];if(_[hr])throw new Error("Invalid format. "+hr+" specified twice in format");return _[hr]=!0,Dr&&(S[Dr]=!0),c.push(Ae),"("+Tr+")"}),Object.keys(S).forEach(function(te){if(!_[te])throw new Error("Invalid format. "+te+" is required in specified format")}),g=g.replace(/@@@/g,function(){return p.shift()});var I=r.match(new RegExp(g,"i"));if(!I)return null;for(var L=Ko(Ko({},Cr),t),F=1;F<I.length;F++){var z=c[F-1],V=z[0],Q=z[2],st=Q?Q(I[F],L):+I[F];if(st==null)return null;o[V]=st}o.isPm===1&&o.hour!=null&&+o.hour!=12?o.hour=+o.hour+12:o.isPm===0&&+o.hour==12&&(o.hour=0);var at;if(o.timezoneOffset==null){at=new Date(o.year,o.month,o.day,o.hour,o.minute,o.second,o.millisecond);for(var Rt=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],F=0,Kt=Rt.length;F<Kt;F++)if(_[Rt[F][0]]&&o[Rt[F][0]]!==at[Rt[F][1]]())return null}else if(at=new Date(Date.UTC(o.year,o.month,o.day,o.hour,o.minute-o.timezoneOffset,o.second,o.millisecond)),o.month>11||o.month<0||o.day>31||o.day<1||o.hour>23||o.hour<0||o.minute>59||o.minute<0||o.second>59||o.second<0)return null;return at}var Ju={format:zu,parse:xl,defaultI18n:Xe,setGlobalDateI18n:on,setGlobalDateMasks:Au},Uu=Ju;function Uo(r){return function(e,t,i,o){for(var c=(0,b.UM)(i)?0:i,p=(0,b.UM)(o)?e.length:o;c<p;){var g=c+p>>>1;r(e[g])>t?p=g:c=g+1}return c}}var js="format";function Rc(r,e){var t=kt[js]||Uu[js];return t(r,e)}function qc(r){return(0,b.HD)(r)&&(r.indexOf("T")>0?r=new Date(r).getTime():r=new Date(r.replace(/-/gi,"/")).getTime()),(0,b.J_)(r)&&(r=r.getTime()),r}var Tu=1e3,Zl=60*Tu,Cs=60*Zl,Zu=24*Cs,ja=Zu*31,Dc=Zu*365,D=[["HH:mm:ss",Tu],["HH:mm:ss",Tu*10],["HH:mm:ss",Tu*30],["HH:mm",Zl],["HH:mm",Zl*10],["HH:mm",Zl*30],["HH",Cs],["HH",Cs*6],["HH",Cs*12],["YYYY-MM-DD",Zu],["YYYY-MM-DD",Zu*4],["YYYY-WW",Zu*7],["YYYY-MM",ja],["YYYY-MM",ja*4],["YYYY-MM",ja*6],["YYYY",Zu*380]];function X(r,e,t){var i=(e-r)/t,o=Uo(function(p){return p[1]})(D,i)-1,c=D[o];return o<0?c=D[0]:o>=D.length&&(c=(0,b.Z$)(D)),c}var Mt=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="timeCat",t}return e.prototype.translate=function(t){t=qc(t);var i=this.values.indexOf(t);return i===-1&&((0,b.hj)(t)&&t<this.values.length?i=t:i=NaN),i},e.prototype.getText=function(t,i){var o=this.translate(t);if(o>-1){var c=this.values[o],p=this.formatter;return c=p?p(c,i):Rc(c,this.mask),c}return t},e.prototype.initCfg=function(){this.tickMethod="time-cat",this.mask="YYYY-MM-DD",this.tickCount=7},e.prototype.setDomain=function(){var t=this.values;(0,b.S6)(t,function(i,o){t[o]=qc(i)}),t.sort(function(i,o){return i-o}),r.prototype.setDomain.call(this)},e}($n),it=Mt,fe=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.isContinuous=!0,t}return e.prototype.scale=function(t){if((0,b.UM)(t))return NaN;var i=this.rangeMin(),o=this.rangeMax(),c=this.max,p=this.min;if(c===p)return i;var g=this.getScalePercent(t);return i+g*(o-i)},e.prototype.init=function(){r.prototype.init.call(this);var t=this.ticks,i=(0,b.YM)(t),o=(0,b.Z$)(t);i<this.min&&(this.min=i),o>this.max&&(this.max=o),(0,b.UM)(this.minLimit)||(this.min=i),(0,b.UM)(this.maxLimit)||(this.max=o)},e.prototype.setDomain=function(){var t=(0,b.rx)(this.values),i=t.min,o=t.max;(0,b.UM)(this.min)&&(this.min=i),(0,b.UM)(this.max)&&(this.max=o),this.min>this.max&&(this.min=i,this.max=o)},e.prototype.calculateTicks=function(){var t=this,i=r.prototype.calculateTicks.call(this);return this.nice||(i=(0,b.hX)(i,function(o){return o>=t.min&&o<=t.max})),i},e.prototype.getScalePercent=function(t){var i=this.max,o=this.min;return(t-o)/(i-o)},e.prototype.getInvertPercent=function(t){return(t-this.rangeMin())/(this.rangeMax()-this.rangeMin())},e}(rn),He=fe,br=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="linear",t.isLinear=!0,t}return e.prototype.invert=function(t){var i=this.getInvertPercent(t);return this.min+i*(this.max-this.min)},e.prototype.initCfg=function(){this.tickMethod="wilkinson-extended",this.nice=!1},e}(He),Ur=br;function Nr(r,e){var t=Math.E,i;return e>=0?i=Math.pow(t,Math.log(e)/r):i=Math.pow(t,Math.log(-e)/r)*-1,i}function An(r,e){return r===1?1:Math.log(e)/Math.log(r)}function Hn(r,e,t){(0,b.UM)(t)&&(t=Math.max.apply(null,r));var i=t;return(0,b.S6)(r,function(o){o>0&&o<i&&(i=o)}),i===t&&(i=t/e),i>1&&(i=1),i}function Ji(r){var e=r.toString().split(/[eE]/),t=(e[0].split(".")[1]||"").length-+(e[1]||0);return t>0?t:0}function ka(r,e){var t=Ji(r),i=Ji(e),o=Math.pow(10,Math.max(t,i));return(r*o+e*o)/o}var Sa=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t}return e.prototype.invert=function(t){var i=this.base,o=An(i,this.max),c=this.rangeMin(),p=this.rangeMax()-c,g,_=this.positiveMin;if(_){if(t===0)return 0;g=An(i,_/i);var S=1/(o-g)*p;if(t<S)return t/S*_}else g=An(i,this.min);var I=(t-c)/p,L=I*(o-g)+g;return Math.pow(i,L)},e.prototype.initCfg=function(){this.tickMethod="log",this.base=10,this.tickCount=6,this.nice=!0},e.prototype.setDomain=function(){r.prototype.setDomain.call(this);var t=this.min;if(t<0)throw new Error("When you use log scale, the minimum value must be greater than zero!");t===0&&(this.positiveMin=Hn(this.values,this.base,this.max))},e.prototype.getScalePercent=function(t){var i=this.max,o=this.min;if(i===o||t<=0)return 0;var c=this.base,p=this.positiveMin;p&&(o=p*1/c);var g;return t<p?g=t/p/(An(c,i)-An(c,o)):g=(An(c,t)-An(c,o))/(An(c,i)-An(c,o)),g},e}(He),eo=Sa,Eo=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="pow",t}return e.prototype.invert=function(t){var i=this.getInvertPercent(t),o=this.exponent,c=Nr(o,this.max),p=Nr(o,this.min),g=i*(c-p)+p,_=g>=0?1:-1;return Math.pow(g,o)*_},e.prototype.initCfg=function(){this.tickMethod="pow",this.exponent=2,this.tickCount=5,this.nice=!0},e.prototype.getScalePercent=function(t){var i=this.max,o=this.min;if(i===o)return 0;var c=this.exponent,p=(Nr(c,t)-Nr(c,o))/(Nr(c,i)-Nr(c,o));return p},e}(He),So=Eo,ro=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="time",t}return e.prototype.getText=function(t,i){var o=this.translate(t),c=this.formatter;return c?c(o,i):Rc(o,this.mask)},e.prototype.scale=function(t){var i=t;return((0,b.HD)(i)||(0,b.J_)(i))&&(i=this.translate(i)),r.prototype.scale.call(this,i)},e.prototype.translate=function(t){return qc(t)},e.prototype.initCfg=function(){this.tickMethod="time-pretty",this.mask="YYYY-MM-DD",this.tickCount=7,this.nice=!1},e.prototype.setDomain=function(){var t=this.values,i=this.getConfig("min"),o=this.getConfig("max");if((!(0,b.UM)(i)||!(0,b.hj)(i))&&(this.min=this.translate(this.min)),(!(0,b.UM)(o)||!(0,b.hj)(o))&&(this.max=this.translate(this.max)),t&&t.length){var c=[],p=1/0,g=p,_=0;(0,b.S6)(t,function(S){var I=qc(S);if(isNaN(I))throw new TypeError("Invalid Time: "+S+" in time scale!");p>I?(g=p,p=I):g>I&&(g=I),_<I&&(_=I),c.push(I)}),t.length>1&&(this.minTickInterval=g-p),(0,b.UM)(i)&&(this.min=p),(0,b.UM)(o)&&(this.max=_)}},e}(Ur),pu=ro,Il=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="quantize",t}return e.prototype.invert=function(t){var i=this.ticks,o=i.length,c=this.getInvertPercent(t),p=Math.floor(c*(o-1));if(p>=o-1)return(0,b.Z$)(i);if(p<0)return(0,b.YM)(i);var g=i[p],_=i[p+1],S=p/(o-1),I=(p+1)/(o-1);return g+(c-S)/(I-S)*(_-g)},e.prototype.initCfg=function(){this.tickMethod="r-pretty",this.tickCount=5,this.nice=!0},e.prototype.calculateTicks=function(){var t=r.prototype.calculateTicks.call(this);return this.nice||((0,b.Z$)(t)!==this.max&&t.push(this.max),(0,b.YM)(t)!==this.min&&t.unshift(this.min)),t},e.prototype.getScalePercent=function(t){var i=this.ticks;if(t<(0,b.YM)(i))return 0;if(t>(0,b.Z$)(i))return 1;var o=0;return(0,b.S6)(i,function(c,p){if(t>=c)o=p;else return!1}),o/(i.length-1)},e}(He),bl=Il,Vl=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="quantile",t}return e.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},e}(bl),ul=Vl,Gl={};function Vu(r){return Gl[r]}function cs(r,e){if(Vu(r))throw new Error("type '"+r+"' existed.");Gl[r]=e}var pe=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="identity",t.isIdentity=!0,t}return e.prototype.calculateTicks=function(){return this.values},e.prototype.scale=function(t){return this.values[0]!==t&&(0,b.hj)(t)?t:this.range[0]},e.prototype.invert=function(t){var i=this.range;return t<i[0]||t>i[1]?NaN:this.values[0]},e}(rn),ar=pe;function Fr(r){var e=r.values,t=r.tickInterval,i=r.tickCount,o=r.showLast;if((0,b.hj)(t)){var c=(0,b.hX)(e,function(V,Q){return Q%t===0}),p=(0,b.Z$)(e);return o&&(0,b.Z$)(c)!==p&&c.push(p),c}var g=e.length,_=r.min,S=r.max;if((0,b.UM)(_)&&(_=0),(0,b.UM)(S)&&(S=e.length-1),!(0,b.hj)(i)||i>=g)return e.slice(_,S+1);if(i<=0||S<=0)return[];for(var I=i===1?g:Math.floor(g/(i-1)),L=[],F=_,z=0;z<i&&!(F>=S);z++)F=Math.min(_+z*I,S),z===i-1&&o?L.push(e[S]):L.push(e[F]);return L}function Xr(r){var e=r.min,t=r.max,i=r.nice,o=r.tickCount,c=new du;return c.domain([e,t]),i&&c.nice(o),c.ticks(o)}var _n=5,ki=Math.sqrt(50),ia=Math.sqrt(10),$a=Math.sqrt(2),du=function(){function r(){this._domain=[0,1]}return r.prototype.domain=function(e){return e?(this._domain=Array.from(e,Number),this):this._domain.slice()},r.prototype.nice=function(e){var t,i;e===void 0&&(e=_n);var o=this._domain.slice(),c=0,p=this._domain.length-1,g=this._domain[c],_=this._domain[p],S;return _<g&&(t=[_,g],g=t[0],_=t[1],i=[p,c],c=i[0],p=i[1]),S=Xa(g,_,e),S>0?(g=Math.floor(g/S)*S,_=Math.ceil(_/S)*S,S=Xa(g,_,e)):S<0&&(g=Math.ceil(g*S)/S,_=Math.floor(_*S)/S,S=Xa(g,_,e)),S>0?(o[c]=Math.floor(g/S)*S,o[p]=Math.ceil(_/S)*S,this.domain(o)):S<0&&(o[c]=Math.ceil(g*S)/S,o[p]=Math.floor(_*S)/S,this.domain(o)),this},r.prototype.ticks=function(e){return e===void 0&&(e=_n),au(this._domain[0],this._domain[this._domain.length-1],e||_n)},r}();function au(r,e,t){var i,o=-1,c,p,g;if(e=+e,r=+r,t=+t,r===e&&t>0)return[r];if((i=e<r)&&(c=r,r=e,e=c),(g=Xa(r,e,t))===0||!isFinite(g))return[];if(g>0)for(r=Math.ceil(r/g),e=Math.floor(e/g),p=new Array(c=Math.ceil(e-r+1));++o<c;)p[o]=(r+o)*g;else for(r=Math.floor(r*g),e=Math.ceil(e*g),p=new Array(c=Math.ceil(r-e+1));++o<c;)p[o]=(r-o)/g;return i&&p.reverse(),p}function Xa(r,e,t){var i=(e-r)/Math.max(0,t),o=Math.floor(Math.log(i)/Math.LN10),c=i/Math.pow(10,o);return o>=0?(c>=ki?10:c>=ia?5:c>=$a?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(c>=ki?10:c>=ia?5:c>=$a?2:1)}function Gu(r,e,t){var i;return t==="ceil"?i=Math.ceil(r/e):t==="floor"?i=Math.floor(r/e):i=Math.round(r/e),i*e}function Vh(r,e,t){var i=Gu(r,t,"floor"),o=Gu(e,t,"ceil");i=(0,b.ri)(i,t),o=(0,b.ri)(o,t);for(var c=[],p=Math.max((o-i)/(Math.pow(2,12)-1),t),g=i;g<=o;g=g+p){var _=(0,b.ri)(g,p);c.push(_)}return{min:i,max:o,ticks:c}}function Hl(r,e,t){var i,o=r.minLimit,c=r.maxLimit,p=r.min,g=r.max,_=r.tickCount,S=_===void 0?5:_,I=(0,b.UM)(o)?(0,b.UM)(e)?p:e:o,L=(0,b.UM)(c)?(0,b.UM)(t)?g:t:c;if(I>L&&(i=[I,L],L=i[0],I=i[1]),S<=2)return[I,L];for(var F=(L-I)/(S-1),z=[],V=0;V<S;V++)z.push(I+F*V);return z}function fd(r){var e=r.min,t=r.max,i=r.tickInterval,o=r.minLimit,c=r.maxLimit,p=Xr(r);return!(0,b.UM)(o)||!(0,b.UM)(c)?Hl(r,(0,b.YM)(p),(0,b.Z$)(p)):i?Vh(e,t,i).ticks:p}function Bc(r){return Math.abs(r)<1e-15?r:parseFloat(r.toFixed(15))}var kl=[1,5,2,2.5,4,3],Ap=null,Ef=Number.EPSILON*100;function Kc(r,e){return(r%e+e)%e}function wf(r){return Math.round(r*1e12)/1e12}function Sf(r,e,t,i,o,c){var p=(0,b.dp)(e),g=(0,b.cq)(e,r),_=0,S=Kc(i,c);return(S<Ef||c-S<Ef)&&i<=0&&o>=0&&(_=1),1-g/(p-1)-t+_}function Cf(r,e,t){var i=(0,b.dp)(e),o=(0,b.cq)(e,r),c=1;return 1-o/(i-1)-t+c}function ll(r,e,t,i,o,c){var p=(r-1)/(c-o),g=(e-1)/(Math.max(c,i)-Math.min(t,o));return 2-Math.max(p/g,g/p)}function Nc(r,e){return r>=e?2-(r-1)/(e-1):1}function nc(r,e,t,i){var o=e-r;return 1-.5*(Math.pow(e-i,2)+Math.pow(r-t,2))/Math.pow(.1*o,2)}function Lo(r,e,t){var i=e-r;if(t>i){var o=(t-i)/2;return 1-Math.pow(o,2)/Math.pow(.1*i,2)}return 1}function zc(){return 1}function vc(r,e,t,i,o,c){t===void 0&&(t=5),i===void 0&&(i=!0),o===void 0&&(o=kl),c===void 0&&(c=[.25,.2,.5,.05]);var p=t<0?0:Math.round(t);if(Number.isNaN(r)||Number.isNaN(e)||typeof r!="number"||typeof e!="number"||!p)return{min:0,max:0,ticks:[]};if(e-r<1e-15||p===1)return{min:r,max:e,ticks:[r]};if(e-r>1e148){var g=t||5,_=(e-r)/g;return{min:r,max:e,ticks:Array(g).fill(null).map(function(Pa,wo){return Bc(r+_*wo)})}}for(var S={score:-2,lmin:0,lmax:0,lstep:0},I=1;I<1/0;){for(var L=0;L<o.length;L+=1){var F=o[L],z=Cf(F,o,I);if(c[0]*z+c[1]+c[2]+c[3]<S.score){I=1/0;break}for(var V=2;V<1/0;){var Q=Nc(V,p);if(c[0]*z+c[1]+c[2]*Q+c[3]<S.score)break;for(var st=(e-r)/(V+1)/I/F,at=Math.ceil(Math.log10(st));at<1/0;){var Rt=I*F*Math.pow(10,at),Kt=Lo(r,e,Rt*(V-1));if(c[0]*z+c[1]*Kt+c[2]*Q+c[3]<S.score)break;var te=Math.floor(e/Rt)*I-(V-1)*I,Ae=Math.ceil(r/Rt)*I;if(te<=Ae)for(var g=Ae-te,hr=0;hr<=g;hr+=1){var Tr=te+hr,Dr=Tr*(Rt/I),cn=Dr+Rt*(V-1),Qr=Rt,Tn=Sf(F,o,I,Dr,cn,Qr),xi=nc(r,e,Dr,cn),va=ll(V,p,r,e,Dr,cn),Aa=zc(),ao=c[0]*Tn+c[1]*xi+c[2]*va+c[3]*Aa;ao>S.score&&(!i||Dr<=r&&cn>=e)&&(S.lmin=Dr,S.lmax=cn,S.lstep=Qr,S.score=ao)}at+=1}V+=1}}I+=1}var Gn=Bc(S.lmax),Gi=Bc(S.lmin),ca=Bc(S.lstep),Yi=Math.floor(wf((Gn-Gi)/ca))+1,ra=new Array(Yi);ra[0]=Bc(Gi);for(var L=1;L<Yi;L++)ra[L]=Bc(ra[L-1]+ca);return{min:Math.min(r,(0,b.YM)(ra)),max:Math.max(e,(0,b.Z$)(ra)),ticks:ra}}function Qc(r){var e=r.min,t=r.max,i=r.tickCount,o=r.nice,c=r.tickInterval,p=r.minLimit,g=r.maxLimit,_=vc(e,t,i,o).ticks;return!(0,b.UM)(p)||!(0,b.UM)(g)?Hl(r,(0,b.YM)(_),(0,b.Z$)(_)):c?Vh(e,t,c).ticks:_}function ch(r){var e=r.base,t=r.tickCount,i=r.min,o=r.max,c=r.values,p,g=An(e,o);if(i>0)p=Math.floor(An(e,i));else{var _=Hn(c,e,o);p=Math.floor(An(e,_))}for(var S=g-p,I=Math.ceil(S/t),L=[],F=p;F<g+I;F=F+I)L.push(Math.pow(e,F));return i<=0&&L.unshift(0),L}function fh(r,e,t){if(t===void 0&&(t=5),r===e)return{max:e,min:r,ticks:[r]};var i=t<0?0:Math.round(t);if(i===0)return{max:e,min:r,ticks:[]};var o=1.5,c=.5+1.5*o,p=e-r,g=p/i,_=Math.pow(10,Math.floor(Math.log10(g))),S=_;2*_-g<o*(g-S)&&(S=2*_,5*_-g<c*(g-S)&&(S=5*_,10*_-g<o*(g-S)&&(S=10*_)));for(var I=Math.ceil(e/S),L=Math.floor(r/S),F=Math.max(I*S,e),z=Math.min(L*S,r),V=Math.floor((F-z)/S)+1,Q=new Array(V),st=0;st<V;st++)Q[st]=Bc(z+st*S);return{min:z,max:F,ticks:Q}}function Tp(r){var e=r.exponent,t=r.tickCount,i=Math.ceil(Nr(e,r.max)),o=Math.floor(Nr(e,r.min)),c=fh(o,i,t).ticks;return c.map(function(p){var g=p>=0?1:-1;return Math.pow(p,e)*g})}function Gh(r,e){var t=r.length*e;return e===1?r[r.length-1]:e===0?r[0]:t%1!==0?r[Math.ceil(t)-1]:r.length%2===0?(r[t-1]+r[t])/2:r[t]}function Mp(r){var e=r.tickCount,t=r.values;if(!t||!t.length)return[];for(var i=t.slice().sort(function(g,_){return g-_}),o=[],c=0;c<e;c++){var p=c/(e-1);o.push(Gh(i,p))}return o}function Gf(r){var e=r.min,t=r.max,i=r.tickCount,o=r.tickInterval,c=r.minLimit,p=r.maxLimit,g=fh(e,t,i).ticks;return!(0,b.UM)(c)||!(0,b.UM)(p)?Hl(r,(0,b.YM)(g),(0,b.Z$)(g)):o?Vh(e,t,o).ticks:g}function Ll(r){var e=r.min,t=r.max,i=r.minTickInterval,o=r.tickInterval,c=r.tickCount;if(o)c=Math.ceil((t-e)/o);else{o=X(e,t,c)[1];var p=(t-e)/o,g=p/c;g>1&&(o=o*Math.ceil(g)),i&&o<i&&(o=i)}o=Math.max(Math.floor((t-e)/(Math.pow(2,12)-1)),o);for(var _=[],S=e;S<t+o;S+=o)_.push(S);return _}function hh(r){var e=Fr((0,P.pi)({showLast:!0},r));return e}function Oi(r){return new Date(r).getFullYear()}function Fn(r){return new Date(r,0,1).getTime()}function ph(r){return new Date(r).getMonth()}function Ip(r,e){var t=Oi(r),i=Oi(e),o=ph(r),c=ph(e);return(i-t)*12+(c-o)%12}function hd(r,e){return new Date(r,e,1).getTime()}function Hf(r,e){return Math.ceil((e-r)/Zu)}function so(r,e){return Math.ceil((e-r)/Cs)}function Mu(r,e){return Math.ceil((e-r)/(60*1e3))}function Po(r){var e=r.min,t=r.max,i=r.minTickInterval,o=r.tickCount,c=r.tickInterval,p=[];c||(c=(t-e)/o,i&&c<i&&(c=i)),c=Math.max(Math.floor((t-e)/(Math.pow(2,12)-1)),c);var g=Oi(e);if(c>Dc)for(var _=Oi(t),S=Math.ceil(c/Dc),I=g;I<=_+S;I=I+S)p.push(Fn(I));else if(c>ja)for(var L=Math.ceil(c/ja),F=ph(e),z=Ip(e,t),I=0;I<=z+L;I=I+L)p.push(hd(g,I+F));else if(c>Zu)for(var V=new Date(e),Q=V.getFullYear(),st=V.getMonth(),at=V.getDate(),Rt=Math.ceil(c/Zu),Kt=Hf(e,t),I=0;I<Kt+Rt;I=I+Rt)p.push(new Date(Q,st,at+I).getTime());else if(c>Cs)for(var V=new Date(e),Q=V.getFullYear(),st=V.getMonth(),Rt=V.getDate(),te=V.getHours(),Ae=Math.ceil(c/Cs),hr=so(e,t),I=0;I<=hr+Ae;I=I+Ae)p.push(new Date(Q,st,Rt,te+I).getTime());else if(c>Zl)for(var Tr=Mu(e,t),Dr=Math.ceil(c/Zl),I=0;I<=Tr+Dr;I=I+Dr)p.push(e+I*Zl);else{var cn=c;cn<Tu&&(cn=Tu);for(var Qr=Math.floor(e/Tu)*Tu,Tn=Math.ceil((t-e)/Tu),xi=Math.ceil(cn/Tu),I=0;I<Tn+xi;I=I+xi)p.push(Qr+I*Tu)}return p.length>=512&&console.warn("Notice: current ticks length("+p.length+') >= 512, may cause performance issues, even out of memory. Because of the configure "tickInterval"(in milliseconds, current is '+c+") is too small, increase the value to solve the problem!"),p}Ve("cat",Fr),Ve("time-cat",hh),Ve("wilkinson-extended",Qc),Ve("r-pretty",Gf),Ve("time",Ll),Ve("time-pretty",Po),Ve("log",ch),Ve("pow",Tp),Ve("quantile",Mp),Ve("d3-linear",fd),cs("cat",$n),cs("category",$n),cs("identity",ar),cs("linear",Ur),cs("log",eo),cs("pow",So),cs("time",pu),cs("timeCat",it),cs("quantize",bl),cs("quantile",ul);var jl={},Af=function(r){return jl[r.toLowerCase()]},El=function(r,e){if(Af(r))throw new Error("Attribute type '"+r+"' existed.");jl[r.toLowerCase()]=e};El("Color",Qa),El("Opacity",yo),El("Position",Ya),El("Shape",Nu),El("Size",bo);var qa=nt(68072),ds=nt(99250),no=nt(32071),dh=function(){function r(e){this.type="coordinate",this.isRect=!1,this.isHelix=!1,this.isPolar=!1,this.isReflectX=!1,this.isReflectY=!1;var t=e.start,i=e.end,o=e.matrix,c=o===void 0?[1,0,0,0,1,0,0,0,1]:o,p=e.isTransposed,g=p===void 0?!1:p;this.start=t,this.end=i,this.matrix=c,this.originalMatrix=(0,P.ev)([],c),this.isTransposed=g}return r.prototype.initial=function(){this.center={x:(this.start.x+this.end.x)/2,y:(this.start.y+this.end.y)/2},this.width=Math.abs(this.end.x-this.start.x),this.height=Math.abs(this.end.y-this.start.y)},r.prototype.update=function(e){(0,b.f0)(this,e),this.initial()},r.prototype.convertDim=function(e,t){var i,o=this[t],c=o.start,p=o.end;return this.isReflect(t)&&(i=[p,c],c=i[0],p=i[1]),c+e*(p-c)},r.prototype.invertDim=function(e,t){var i,o=this[t],c=o.start,p=o.end;return this.isReflect(t)&&(i=[p,c],c=i[0],p=i[1]),(e-c)/(p-c)},r.prototype.applyMatrix=function(e,t,i){i===void 0&&(i=0);var o=this.matrix,c=[e,t,i];return qa.transformMat3(c,c,o),c},r.prototype.invertMatrix=function(e,t,i){i===void 0&&(i=0);var o=this.matrix,c=ds.U_([0,0,0,0,0,0,0,0,0],o),p=[e,t,i];return c&&qa.transformMat3(p,p,c),p},r.prototype.convert=function(e){var t=this.convertPoint(e),i=t.x,o=t.y,c=this.applyMatrix(i,o,1);return{x:c[0],y:c[1]}},r.prototype.invert=function(e){var t=this.invertMatrix(e.x,e.y,1);return this.invertPoint({x:t[0],y:t[1]})},r.prototype.rotate=function(e){var t=this.matrix,i=this.center;return no.m$(t,t,[-i.x,-i.y]),no.zu(t,t,e),no.m$(t,t,[i.x,i.y]),this},r.prototype.reflect=function(e){return e==="x"?this.isReflectX=!this.isReflectX:this.isReflectY=!this.isReflectY,this},r.prototype.scale=function(e,t){var i=this.matrix,o=this.center;return no.m$(i,i,[-o.x,-o.y]),no.lh(i,i,[e,t]),no.m$(i,i,[o.x,o.y]),this},r.prototype.translate=function(e,t){var i=this.matrix;return no.m$(i,i,[e,t]),this},r.prototype.transpose=function(){return this.isTransposed=!this.isTransposed,this},r.prototype.getCenter=function(){return this.center},r.prototype.getWidth=function(){return this.width},r.prototype.getHeight=function(){return this.height},r.prototype.getRadius=function(){return this.radius},r.prototype.isReflect=function(e){return e==="x"?this.isReflectX:this.isReflectY},r.prototype.resetMatrix=function(e){this.matrix=e||(0,P.ev)([],this.originalMatrix)},r}(),gc=dh,kp=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,t)||this;return i.isRect=!0,i.type="cartesian",i.initial(),i}return e.prototype.initial=function(){r.prototype.initial.call(this);var t=this.start,i=this.end;this.x={start:t.x,end:i.x},this.y={start:t.y,end:i.y}},e.prototype.convertPoint=function(t){var i,o=t.x,c=t.y;return this.isTransposed&&(i=[c,o],o=i[0],c=i[1]),{x:this.convertDim(o,"x"),y:this.convertDim(c,"y")}},e.prototype.invertPoint=function(t){var i,o=this.invertDim(t.x,"x"),c=this.invertDim(t.y,"y");return this.isTransposed&&(i=[c,o],o=i[0],c=i[1]),{x:o,y:c}},e}(gc),uv=kp,Qi=nt(1153),vh=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,t)||this;i.isHelix=!0,i.type="helix";var o=t.startAngle,c=o===void 0?1.25*Math.PI:o,p=t.endAngle,g=p===void 0?7.25*Math.PI:p,_=t.innerRadius,S=_===void 0?0:_,I=t.radius;return i.startAngle=c,i.endAngle=g,i.innerRadius=S,i.radius=I,i.initial(),i}return e.prototype.initial=function(){r.prototype.initial.call(this);var t=(this.endAngle-this.startAngle)/(2*Math.PI)+1,i=Math.min(this.width,this.height)/2;this.radius&&this.radius>=0&&this.radius<=1&&(i=i*this.radius),this.d=Math.floor(i*(1-this.innerRadius)/t),this.a=this.d/(Math.PI*2),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*i,end:this.innerRadius*i+this.d*.99}},e.prototype.convertPoint=function(t){var i,o=t.x,c=t.y;this.isTransposed&&(i=[c,o],o=i[0],c=i[1]);var p=this.convertDim(o,"x"),g=this.a*p,_=this.convertDim(c,"y");return{x:this.center.x+Math.cos(p)*(g+_),y:this.center.y+Math.sin(p)*(g+_)}},e.prototype.invertPoint=function(t){var i,o=this.d+this.y.start,c=Qi.$X([0,0],[t.x,t.y],[this.center.x,this.center.y]),p=no.Dg(c,[1,0],!0),g=p*this.a;Qi.kE(c)<g&&(g=Qi.kE(c));var _=Math.floor((Qi.kE(c)-g)/o);p=2*_*Math.PI+p;var S=this.a*p,I=Qi.kE(c)-S;I=(0,b.vQ)(I,0)?0:I;var L=this.invertDim(p,"x"),F=this.invertDim(I,"y");return L=(0,b.vQ)(L,0)?0:L,F=(0,b.vQ)(F,0)?0:F,this.isTransposed&&(i=[F,L],L=i[0],F=i[1]),{x:L,y:F}},e}(gc),gh=vh,Tf=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,t)||this;i.isPolar=!0,i.type="polar";var o=t.startAngle,c=o===void 0?-Math.PI/2:o,p=t.endAngle,g=p===void 0?Math.PI*3/2:p,_=t.innerRadius,S=_===void 0?0:_,I=t.radius;return i.startAngle=c,i.endAngle=g,i.innerRadius=S,i.radius=I,i.initial(),i}return e.prototype.initial=function(){for(r.prototype.initial.call(this);this.endAngle<this.startAngle;)this.endAngle+=Math.PI*2;var t=this.getOneBox(),i=t.maxX-t.minX,o=t.maxY-t.minY,c=Math.abs(t.minX)/i,p=Math.abs(t.minY)/o,g;this.height/o>this.width/i?(g=this.width/i,this.circleCenter={x:this.center.x-(.5-c)*this.width,y:this.center.y-(.5-p)*g*o}):(g=this.height/o,this.circleCenter={x:this.center.x-(.5-c)*g*i,y:this.center.y-(.5-p)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=g*this.radius:(this.radius<=0||this.radius>g)&&(this.polarRadius=g):this.polarRadius=g,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},e.prototype.getRadius=function(){return this.polarRadius},e.prototype.convertPoint=function(t){var i,o=this.getCenter(),c=t.x,p=t.y;return this.isTransposed&&(i=[p,c],c=i[0],p=i[1]),c=this.convertDim(c,"x"),p=this.convertDim(p,"y"),{x:o.x+Math.cos(c)*p,y:o.y+Math.sin(c)*p}},e.prototype.invertPoint=function(t){var i,o=this.getCenter(),c=[t.x-o.x,t.y-o.y],p=this,g=p.startAngle,_=p.endAngle;this.isReflect("x")&&(i=[_,g],g=i[0],_=i[1]);var S=[1,0,0,0,1,0,0,0,1];no.zu(S,S,g);var I=[1,0,0];qa.transformMat3(I,I,S);var L=[I[0],I[1]],F=no.Dg(L,c,_<g);(0,b.vQ)(F,Math.PI*2)&&(F=0);var z=Qi.kE(c),V=F/(_-g);V=_-g>0?V:-V;var Q=this.invertDim(z,"y"),st={x:0,y:0};return st.x=this.isTransposed?Q:V,st.y=this.isTransposed?V:Q,st},e.prototype.getCenter=function(){return this.circleCenter},e.prototype.getOneBox=function(){var t=this.startAngle,i=this.endAngle;if(Math.abs(i-t)>=Math.PI*2)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var o=[0,Math.cos(t),Math.cos(i)],c=[0,Math.sin(t),Math.sin(i)],p=Math.min(t,i);p<Math.max(t,i);p+=Math.PI/18)o.push(Math.cos(p)),c.push(Math.sin(p));return{minX:Math.min.apply(Math,o),maxX:Math.max.apply(Math,o),minY:Math.min.apply(Math,c),maxY:Math.max.apply(Math,c)}},e}(gc),ou=Tf,jf={},Mf=function(r){return jf[r.toLowerCase()]},vs=function(r,e){jf[r.toLowerCase()]=e};vs("rect",uv),vs("cartesian",uv),vs("polar",ou),vs("helix",gh);function Hi(r,e,t){var i=new me.Event(e,t);i.target=r,i.propagationPath.push(r),r.emitDelegation(e,i);for(var o=r.getParent();o;)o.emitDelegation(e,i),i.propagationPath.push(o),o=o.getParent()}var rs=[1,0,0,0,1,0,0,0,1];function wl(r,e,t){if(t===void 0&&(t=rs),!e)return null;var i=no.vs(t,[["t",-r.x,-r.y],["r",e],["t",r.x,r.y]]);return i}function Jc(r,e){return!r.x&&!r.y?null:no.vs(e||rs,[["t",r.x,r.y]])}function mc(r){var e=[1,0,0],t=[0,0,0];return qa.transformMat3(t,e,r),Math.atan2(t[1],t[0])}function Iu(r,e){var t=[0,0];return Qi.kK(t,e,r),t}function pd(r,e){var t=Iu(r,[e.minX,e.minY]),i=Iu(r,[e.maxX,e.minY]),o=Iu(r,[e.minX,e.maxY]),c=Iu(r,[e.maxX,e.maxY]),p=Math.min(t[0],i[0],o[0],c[0]),g=Math.max(t[0],i[0],o[0],c[0]),_=Math.min(t[1],i[1],o[1],c[1]),S=Math.max(t[1],i[1],o[1],c[1]);return{x:p,y:_,minX:p,minY:_,maxX:g,maxY:S,width:g-p,height:S-_}}function ei(r,e,t,i){if(e){var o=wl({x:t,y:i},e,r.getMatrix());r.setMatrix(o)}}function tf(r,e,t){var i=Jc({x:e,y:t});r.attr("matrix",i)}function mh(r){var e=0,t=0,i=0,o=0;return(0,b.hj)(r)?e=t=i=o=r:(0,b.kJ)(r)&&(e=r[0],i=(0,b.UM)(r[1])?r[0]:r[1],o=(0,b.UM)(r[2])?r[0]:r[2],t=(0,b.UM)(r[3])?i:r[3]),[e,i,o,t]}function yc(r){for(var e=r.childNodes,t=e.length,i=t-1;i>=0;i--)r.removeChild(e[i])}function Oo(r,e){return!!r.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}function Hu(r){var e=r.start,t=r.end,i=Math.min(e.x,t.x),o=Math.min(e.y,t.y),c=Math.max(e.x,t.x),p=Math.max(e.y,t.y);return{x:i,y:o,minX:i,minY:o,maxX:c,maxY:p,width:c-i,height:p-o}}function yh(r){var e=r.map(function(g){return g.x}),t=r.map(function(g){return g.y}),i=Math.min.apply(Math,e),o=Math.min.apply(Math,t),c=Math.max.apply(Math,e),p=Math.max.apply(Math,t);return{x:i,y:o,minX:i,minY:o,maxX:c,maxY:p,width:c-i,height:p-o}}function Wl(r,e,t,i){var o=r+t,c=e+i;return{x:r,y:e,width:t,height:i,minX:r,minY:e,maxX:isNaN(o)?0:o,maxY:isNaN(c)?0:c}}function Os(r,e,t){return(1-t)*r+e*t}function Pl(r,e,t){return{x:r.x+Math.cos(t)*e,y:r.y+Math.sin(t)*e}}function Lp(r,e){var t=e.x-r.x,i=e.y-r.y;return Math.sqrt(t*t+i*i)}var dd=function(r){return new Promise(function(e){setTimeout(e,r)})},ef=function(r,e,t){return t===void 0&&(t=Math.pow(Number.EPSILON,.5)),[r,e].includes(1/0)?Math.abs(r)===Math.abs(e):Math.abs(r-e)<t};function vd(r,e){var t=Math.max(r.minX,e.minX),i=Math.max(r.minY,e.minY),o=Math.min(r.maxX,e.maxX),c=Math.min(r.maxY,e.maxY);return Wl(t,i,o-t,c-i)}function ic(r,e){var t=Math.min(r.minX,e.minX),i=Math.min(r.minY,e.minY),o=Math.max(r.maxX,e.maxX),c=Math.max(r.maxY,e.maxY);return Wl(t,i,o-t,c-i)}function cl(r){var e=r.getClip(),t=e&&e.getBBox(),i;if(!r.isGroup())i=r.getBBox();else{var o=1/0,c=-1/0,p=1/0,g=-1/0,_=r.getChildren();_.length>0?(0,b.S6)(_,function(S){if(S.get("visible")){if(S.isGroup()&&S.get("children").length===0)return!0;var I=cl(S),L=S.applyToMatrix([I.minX,I.minY,1]),F=S.applyToMatrix([I.minX,I.maxY,1]),z=S.applyToMatrix([I.maxX,I.minY,1]),V=S.applyToMatrix([I.maxX,I.maxY,1]),Q=Math.min(L[0],F[0],z[0],V[0]),st=Math.max(L[0],F[0],z[0],V[0]),at=Math.min(L[1],F[1],z[1],V[1]),Rt=Math.max(L[1],F[1],z[1],V[1]);Q<o&&(o=Q),st>c&&(c=st),at<p&&(p=at),Rt>g&&(g=Rt)}}):(o=0,c=0,p=0,g=0),i=Wl(o,p,c-o,g-p)}return t?vd(i,t):i}function io(r,e){if(!(!r.getClip()&&!e.getClip())){var t=e.getClip();if(!t){r.setClip(null);return}var i={type:t.get("type"),attrs:t.attr()};r.setClip(i)}}function Ws(r){return r+"px"}function Ol(r,e,t,i){var o=Lp(r,e),c=i/o,p=0;return t==="start"?p=0-c:t==="end"&&(p=1+c),{x:Os(r.x,e.x,p),y:Os(r.y,e.y,p)}}var vu={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},Wf=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,t)||this;return i.initCfg(),i}return e.prototype.getDefaultCfg=function(){return{id:"",name:"",type:"",locationType:"none",offsetX:0,offsetY:0,animate:!1,capture:!0,updateAutoRender:!1,animateOption:{appear:null,update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},events:null,defaultCfg:{},visible:!0}},e.prototype.clear=function(){},e.prototype.update=function(t){var i=this,o=this.get("defaultCfg")||{};(0,b.S6)(t,function(c,p){var g=i.get(p),_=c;g!==c&&((0,b.Kn)(c)&&o[p]&&(_=(0,b.b$)({},o[p],c)),i.set(p,_))}),this.updateInner(t),this.afterUpdate(t)},e.prototype.updateInner=function(t){},e.prototype.afterUpdate=function(t){(0,b.wH)(t,"visible")&&(t.visible?this.show():this.hide()),(0,b.wH)(t,"capture")&&this.setCapture(t.capture)},e.prototype.getLayoutBBox=function(){return this.getBBox()},e.prototype.getLocationType=function(){return this.get("locationType")},e.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},e.prototype.setOffset=function(t,i){this.update({offsetX:t,offsetY:i})},e.prototype.setLocation=function(t){var i=(0,P.pi)({},t);this.update(i)},e.prototype.getLocation=function(){var t=this,i={},o=this.get("locationType"),c=vu[o];return(0,b.S6)(c,function(p){i[p]=t.get(p)}),i},e.prototype.isList=function(){return!1},e.prototype.isSlider=function(){return!1},e.prototype.init=function(){},e.prototype.initCfg=function(){var t=this,i=this.get("defaultCfg");(0,b.S6)(i,function(o,c){var p=t.get(c);if((0,b.Kn)(p)){var g=(0,b.b$)({},o,p);t.set(c,g)}})},e}(me.Base),If=Wf,gu="update_status",ku=["visible","tip","delegateObject"],_c=["container","group","shapesMap","isRegister","isUpdating","destroyed"],aa=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{container:null,shapesMap:{},group:null,capture:!0,isRegister:!1,isUpdating:!1,isInit:!0})},e.prototype.remove=function(){this.clear();var t=this.get("group");t.remove()},e.prototype.clear=function(){var t=this.get("group");t.clear(),this.set("shapesMap",{}),this.clearOffScreenCache(),this.set("isInit",!0)},e.prototype.getChildComponentById=function(t){var i=this.getElementById(t),o=i&&i.get("component");return o},e.prototype.getElementById=function(t){return this.get("shapesMap")[t]},e.prototype.getElementByLocalId=function(t){var i=this.getElementId(t);return this.getElementById(i)},e.prototype.getElementsByName=function(t){var i=[];return(0,b.S6)(this.get("shapesMap"),function(o){o.get("name")===t&&i.push(o)}),i},e.prototype.getContainer=function(){return this.get("container")},e.prototype.updateInner=function(t){this.offScreenRender(),this.get("updateAutoRender")&&this.render()},e.prototype.render=function(){var t=this.get("offScreenGroup");t||(t=this.offScreenRender());var i=this.get("group");this.updateElements(t,i),this.deleteElements(),this.applyOffset(),this.get("eventInitted")||(this.initEvent(),this.set("eventInitted",!0)),this.set("isInit",!1)},e.prototype.show=function(){var t=this.get("group");t.show(),this.set("visible",!0)},e.prototype.hide=function(){var t=this.get("group");t.hide(),this.set("visible",!1)},e.prototype.setCapture=function(t){var i=this.get("group");i.set("capture",t),this.set("capture",t)},e.prototype.destroy=function(){this.removeEvent(),this.remove(),r.prototype.destroy.call(this)},e.prototype.getBBox=function(){return this.get("group").getCanvasBBox()},e.prototype.getLayoutBBox=function(){var t=this.get("group"),i=this.getInnerLayoutBBox(),o=t.getTotalMatrix();return o&&(i=pd(o,i)),i},e.prototype.on=function(t,i,o){var c=this.get("group");return c.on(t,i,o),this},e.prototype.off=function(t,i){var o=this.get("group");return o&&o.off(t,i),this},e.prototype.emit=function(t,i){var o=this.get("group");o.emit(t,i)},e.prototype.init=function(){r.prototype.init.call(this),this.get("group")||this.initGroup(),this.offScreenRender()},e.prototype.getInnerLayoutBBox=function(){return this.get("offScreenBBox")||this.get("group").getBBox()},e.prototype.delegateEmit=function(t,i){var o=this.get("group");i.target=o,o.emit(t,i),Hi(o,t,i)},e.prototype.createOffScreenGroup=function(){var t=this.get("group"),i=t.getGroupBase(),o=new i({delegateObject:this.getDelegateObject()});return o},e.prototype.applyOffset=function(){var t=this.get("offsetX"),i=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t,y:i})},e.prototype.initGroup=function(){var t=this.get("container");this.set("group",t.addGroup({id:this.get("id"),name:this.get("name"),capture:this.get("capture"),visible:this.get("visible"),isComponent:!0,component:this,delegateObject:this.getDelegateObject()}))},e.prototype.offScreenRender=function(){this.clearOffScreenCache();var t=this.createOffScreenGroup();return this.renderInner(t),this.set("offScreenGroup",t),this.set("offScreenBBox",cl(t)),t},e.prototype.addGroup=function(t,i){this.appendDelegateObject(t,i);var o=t.addGroup(i);return this.get("isRegister")&&this.registerElement(o),o},e.prototype.addShape=function(t,i){this.appendDelegateObject(t,i);var o=t.addShape(i);return this.get("isRegister")&&this.registerElement(o),o},e.prototype.addComponent=function(t,i){var o=i.id,c=i.component,p=(0,P._T)(i,["id","component"]),g=new c((0,P.pi)((0,P.pi)({},p),{id:o,container:t,updateAutoRender:this.get("updateAutoRender")}));return g.init(),g.render(),this.get("isRegister")&&this.registerElement(g.get("group")),g},e.prototype.initEvent=function(){},e.prototype.removeEvent=function(){var t=this.get("group");t.off()},e.prototype.getElementId=function(t){var i=this.get("id"),o=this.get("name");return i+"-"+o+"-"+t},e.prototype.registerElement=function(t){var i=t.get("id");this.get("shapesMap")[i]=t},e.prototype.unregisterElement=function(t){var i=t.get("id");delete this.get("shapesMap")[i]},e.prototype.moveElementTo=function(t,i){var o=Jc(i);t.attr("matrix",o)},e.prototype.addAnimation=function(t,i,o){var c=i.attr("opacity");(0,b.UM)(c)&&(c=1),i.attr("opacity",0),i.animate({opacity:c},o)},e.prototype.removeAnimation=function(t,i,o){i.animate({opacity:0},o)},e.prototype.updateAnimation=function(t,i,o,c){i.animate(o,c)},e.prototype.updateElements=function(t,i){var o=this,c=this.get("animate"),p=this.get("animateOption"),g=t.getChildren().slice(0),_;(0,b.S6)(g,function(S){var I=S.get("id"),L=o.getElementById(I),F=S.get("name");if(L)if(S.get("isComponent")){var z=S.get("component"),V=L.get("component"),Q=(0,b.ei)(z.cfg,(0,b.e5)((0,b.XP)(z.cfg),_c));V.update(Q),L.set(gu,"update")}else{var st=o.getReplaceAttrs(L,S);c&&p.update?o.updateAnimation(F,L,st,p.update):L.attr(st),S.isGroup()&&o.updateElements(S,L),(0,b.S6)(ku,function(te){L.set(te,S.get(te))}),io(L,S),_=L,L.set(gu,"update")}else{i.add(S);var at=i.getChildren();if(at.splice(at.length-1,1),_){var Rt=at.indexOf(_);at.splice(Rt+1,0,S)}else at.unshift(S);if(o.registerElement(S),S.set(gu,"add"),S.get("isComponent")){var z=S.get("component");z.set("container",i)}else S.isGroup()&&o.registerNewGroup(S);if(_=S,c){var Kt=o.get("isInit")?p.appear:p.enter;Kt&&o.addAnimation(F,S,Kt)}}})},e.prototype.clearUpdateStatus=function(t){var i=t.getChildren();(0,b.S6)(i,function(o){o.set(gu,null)})},e.prototype.clearOffScreenCache=function(){var t=this.get("offScreenGroup");t&&t.destroy(),this.set("offScreenGroup",null),this.set("offScreenBBox",null)},e.prototype.getDelegateObject=function(){var t,i=this.get("name"),o=(t={},t[i]=this,t.component=this,t);return o},e.prototype.appendDelegateObject=function(t,i){var o=t.get("delegateObject");i.delegateObject||(i.delegateObject={}),(0,b.CD)(i.delegateObject,o)},e.prototype.getReplaceAttrs=function(t,i){var o=t.attr(),c=i.attr();return(0,b.S6)(o,function(p,g){c[g]===void 0&&(c[g]=void 0)}),c},e.prototype.registerNewGroup=function(t){var i=this,o=t.getChildren();(0,b.S6)(o,function(c){i.registerElement(c),c.set(gu,"add"),c.isGroup()&&i.registerNewGroup(c)})},e.prototype.deleteElements=function(){var t=this,i=this.get("shapesMap"),o=[];(0,b.S6)(i,function(g,_){!g.get(gu)||g.destroyed?o.push([_,g]):g.set(gu,null)});var c=this.get("animate"),p=this.get("animateOption");(0,b.S6)(o,function(g){var _=g[0],S=g[1];if(!S.destroyed){var I=S.get("name");if(c&&p.leave){var L=(0,b.CD)({callback:function(){t.removeElement(S)}},p.leave);t.removeAnimation(I,S,L)}else t.removeElement(S)}delete i[_]})},e.prototype.removeElement=function(t){if(t.get("isGroup")){var i=t.get("component");i&&i.destroy()}t.remove()},e}(If),Ii=aa,_h="\u2026";function fl(r){for(var e=0,t=0;t<r.length;t++)e+=tl(r,t);return e}function tl(r,e){return r.charCodeAt(e)>0&&r.charCodeAt(e)<128?1:2}function su(r,e,t){t===void 0&&(t="tail");var i=r.length,o="";if(t==="tail"){for(var c=0,p=0;c<e;){var g=tl(r,p);if(c+g<=e)o+=r[p],c+=tl(r,p),p++;else break}o+=_h}else if(t==="head"){for(var c=0,p=i-1;c<e;){var g=tl(r,p);if(c+g<=e)o+=r[p],c+=tl(r,p),p--;else break}o=_h+o}else{for(var _="",S="",c=0,I=0,L=i-1;c<e;){var F=tl(r,I),z=!1;F+c<=e&&(_+=r[I],I++,c+=F,z=!0);var V=tl(r,L);if(V+c<=e&&(S=r[L]+S,c+=V,L--,z=!0),!z)break}o=_+_h+S}return o}var Sl="\u2026",gd=2,Hh=400;function Yo(r){for(var e=r.map(function(_){var S=_.attr("text");return(0,b.UM)(S)?"":""+S}),t=0,i=0,o=0;o<e.length;o+=1){for(var c=0,p=0;p<=e[o].length;p+=1){var g=e[o].charCodeAt(p);g>=19968&&g<=40869?c+=2:c+=1}c>t&&(t=c,i=o)}return r[i].getBBox().width}function os(r){if(r.length>Hh)return Yo(r);var e=0;return(0,b.S6)(r,function(t){var i=t.getBBox(),o=i.width;e<o&&(e=o)}),e}function lv(r,e){var t=e.getCanvasBBox();return r?t.width:t.height}function jh(r,e){return r.getBBox().width<e}function hl(r,e,t,i){var o;i===void 0&&(i="tail");var c=(o=e.attr("text"))!==null&&o!==void 0?o:"";if(i==="tail"){var p=(0,b.ei)(e.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),g=(0,b.Lo)(c,t,p,"\u2026");return c!==g?(e.attr("text",g),e.set("tip",c),!0):(e.set("tip",null),!1)}var _=lv(r,e),S=fl(c),I=!1;if(t<_){var L=Math.floor(t/_*S)-gd,F=void 0;L>=0?F=su(c,L,i):F=Sl,F&&(e.attr("text",F),I=!0)}return I?e.set("tip",c):e.set("tip",null),I}function Xl(r,e){var t=e.x,i=e.y,o=e.content,c=e.style,p=e.id,g=e.name,_=e.rotate,S=e.maxLength,I=e.autoEllipsis,L=e.isVertical,F=e.ellipsisPosition,z=e.background,V=r.addGroup({id:p+"-group",name:g+"-group",attrs:{x:t,y:i}}),Q=V.addShape({type:"text",id:p,name:g,attrs:(0,P.pi)({x:0,y:0,text:o},c)}),st=mh((0,b.U2)(z,"padding",0));if(S&&I){var at=S-(st[1]+st[3]);hl(!L,Q,at,F)}if(z){var Rt=(0,b.U2)(z,"style",{}),Kt=Q.getCanvasBBox(),te=Kt.minX,Ae=Kt.minY,hr=Kt.width,Tr=Kt.height,Dr=V.addShape("rect",{id:p+"-bg",name:p+"-bg",attrs:(0,P.pi)({x:te-st[3],y:Ae-st[0],width:hr+st[1]+st[3],height:Tr+st[0]+st[2]},Rt)});Dr.toBack()}tf(V,t,i),ei(V,_,t,i)}var fa={fontFamily:`
|
|
BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue",
|
|
Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
|
|
SimSun, "sans-serif"`,textColor:"#2C3542",activeTextColor:"#333333",uncheckedColor:"#D8D8D8",lineColor:"#416180",regionColor:"#CCD7EB",verticalAxisRotate:-Math.PI/4,horizontalAxisRotate:Math.PI/4,descriptionIconStroke:"#fff",descriptionIconFill:"rgba(58, 73, 101, .25)"},kf=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"annotation",type:"line",locationType:"region",start:null,end:null,style:{},text:null,defaultCfg:{style:{fill:fa.textColor,fontSize:12,textAlign:"center",textBaseline:"bottom",fontFamily:fa.fontFamily},text:{position:"center",autoRotate:!0,content:null,offsetX:0,offsetY:0,style:{stroke:fa.lineColor,lineWidth:1}}}})},e.prototype.renderInner=function(t){this.renderLine(t),this.get("text")&&this.renderLabel(t)},e.prototype.renderLine=function(t){var i=this.get("start"),o=this.get("end"),c=this.get("style");this.addShape(t,{type:"line",id:this.getElementId("line"),name:"annotation-line",attrs:(0,P.pi)({x1:i.x,y1:i.y,x2:o.x,y2:o.y},c)})},e.prototype.getLabelPoint=function(t,i,o){var c;return o==="start"?c=0:o==="center"?c=.5:(0,b.HD)(o)&&o.indexOf("%")!==-1?c=parseInt(o,10)/100:(0,b.hj)(o)?c=o:c=1,(c>1||c<0)&&(c=1),{x:Os(t.x,i.x,c),y:Os(t.y,i.y,c)}},e.prototype.renderLabel=function(t){var i=this.get("text"),o=this.get("start"),c=this.get("end"),p=i.position,g=i.content,_=i.style,S=i.offsetX,I=i.offsetY,L=i.autoRotate,F=i.maxLength,z=i.autoEllipsis,V=i.ellipsisPosition,Q=i.background,st=i.isVertical,at=st===void 0?!1:st,Rt=this.getLabelPoint(o,c,p),Kt=Rt.x+S,te=Rt.y+I,Ae={id:this.getElementId("line-text"),name:"annotation-line-text",x:Kt,y:te,content:g,style:_,maxLength:F,autoEllipsis:z,ellipsisPosition:V,background:Q,isVertical:at};if(L){var hr=[c.x-o.x,c.y-o.y];Ae.rotate=Math.atan2(hr[1],hr[0])}Xl(t,Ae)},e}(Ii),xc=kf,Pp=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"annotation",type:"text",locationType:"point",x:0,y:0,content:"",rotate:null,style:{},background:null,maxLength:null,autoEllipsis:!0,isVertical:!1,ellipsisPosition:"tail",defaultCfg:{style:{fill:fa.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:fa.fontFamily}}})},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.renderInner=function(t){var i=this.getLocation(),o=i.x,c=i.y,p=this.get("content"),g=this.get("style"),_=this.getElementId("text"),S=this.get("name")+"-text",I=this.get("maxLength"),L=this.get("autoEllipsis"),F=this.get("isVertical"),z=this.get("ellipsisPosition"),V=this.get("background"),Q=this.get("rotate"),st={id:_,name:S,x:o,y:c,content:p,style:g,maxLength:I,autoEllipsis:L,isVertical:F,ellipsisPosition:z,background:V,rotate:Q};Xl(t,st)},e.prototype.resetLocation=function(){var t=this.getElementByLocalId("text-group");if(t){var i=this.getLocation(),o=i.x,c=i.y,p=this.get("rotate");tf(t,o,c),ei(t,p,o,c)}},e}(Ii),Xf=Pp,Wh=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"annotation",type:"arc",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:Math.PI*3/2,style:{stroke:"#999",lineWidth:1}})},e.prototype.renderInner=function(t){this.renderArc(t)},e.prototype.getArcPath=function(){var t=this.getLocation(),i=t.center,o=t.radius,c=t.startAngle,p=t.endAngle,g=Pl(i,o,c),_=Pl(i,o,p),S=p-c>Math.PI?1:0,I=[["M",g.x,g.y]];if(p-c===Math.PI*2){var L=Pl(i,o,c+Math.PI);I.push(["A",o,o,0,S,1,L.x,L.y]),I.push(["A",o,o,0,S,1,_.x,_.y])}else I.push(["A",o,o,0,S,1,_.x,_.y]);return I},e.prototype.renderArc=function(t){var i=this.getArcPath(),o=this.get("style");this.addShape(t,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:(0,P.pi)({path:i},o)})},e}(Ii),md=Wh,Xh=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:fa.regionColor,opacity:.4}}})},e.prototype.renderInner=function(t){this.renderRegion(t)},e.prototype.renderRegion=function(t){var i=this.get("start"),o=this.get("end"),c=this.get("style"),p=Hu({start:i,end:o});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:(0,P.pi)({x:p.x,y:p.y,width:p.width,height:p.height},c)})},e}(Ii),rf=Xh,yd=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"annotation",type:"image",locationType:"region",start:null,end:null,src:null,style:{}})},e.prototype.renderInner=function(t){this.renderImage(t)},e.prototype.getImageAttrs=function(){var t=this.get("start"),i=this.get("end"),o=this.get("style"),c=Hu({start:t,end:i}),p=this.get("src");return(0,P.pi)({x:c.x,y:c.y,img:p,width:c.width,height:c.height},o)},e.prototype.renderImage=function(t){this.addShape(t,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})},e}(Ii),bc=yd,Lf=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"annotation",type:"dataMarker",locationType:"point",x:0,y:0,point:{},line:{},text:{},direction:"upward",autoAdjust:!0,coordinateBBox:null,defaultCfg:{point:{display:!0,style:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2}},line:{display:!0,length:20,style:{stroke:fa.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:fa.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:fa.fontFamily}}}})},e.prototype.renderInner=function(t){(0,b.U2)(this.get("line"),"display")&&this.renderLine(t),(0,b.U2)(this.get("text"),"display")&&this.renderText(t),(0,b.U2)(this.get("point"),"display")&&this.renderPoint(t),this.get("autoAdjust")&&this.autoAdjust(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x")+this.get("offsetX"),y:this.get("y")+this.get("offsetY")})},e.prototype.renderPoint=function(t){var i=this.getShapeAttrs().point;this.addShape(t,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:i})},e.prototype.renderLine=function(t){var i=this.getShapeAttrs().line;this.addShape(t,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:i})},e.prototype.renderText=function(t){var i=this.getShapeAttrs().text,o=i.x,c=i.y,p=i.text,g=(0,P._T)(i,["x","y","text"]),_=this.get("text"),S=_.background,I=_.maxLength,L=_.autoEllipsis,F=_.isVertival,z=_.ellipsisPosition,V={x:o,y:c,id:this.getElementId("text"),name:"annotation-text",content:p,style:g,background:S,maxLength:I,autoEllipsis:L,isVertival:F,ellipsisPosition:z};Xl(t,V)},e.prototype.autoAdjust=function(t){var i=this.get("direction"),o=this.get("x"),c=this.get("y"),p=(0,b.U2)(this.get("line"),"length",0),g=this.get("coordinateBBox"),_=t.getBBox(),S=_.minX,I=_.maxX,L=_.minY,F=_.maxY,z=t.findById(this.getElementId("text-group")),V=t.findById(this.getElementId("text")),Q=t.findById(this.getElementId("line"));if(g){if(z){if(o+S<=g.minX){var st=g.minX-(o+S);tf(z,z.attr("x")+st,z.attr("y"))}if(o+I>=g.maxX){var st=o+I-g.maxX;tf(z,z.attr("x")-st,z.attr("y"))}}if(i==="upward"&&c+L<=g.minY||i!=="upward"&&c+F>=g.maxY){var at=void 0,Rt=void 0;i==="upward"&&c+L<=g.minY?(at="top",Rt=1):(at="bottom",Rt=-1),V.attr("textBaseline",at),Q&&Q.attr("path",[["M",0,0],["L",0,p*Rt]]),tf(z,z.attr("x"),(p+2)*Rt)}}},e.prototype.getShapeAttrs=function(){var t=(0,b.U2)(this.get("line"),"display"),i=(0,b.U2)(this.get("point"),"style",{}),o=(0,b.U2)(this.get("line"),"style",{}),c=(0,b.U2)(this.get("text"),"style",{}),p=this.get("direction"),g=t?(0,b.U2)(this.get("line"),"length",0):0,_=p==="upward"?-1:1;return{point:(0,P.pi)({x:0,y:0},i),line:(0,P.pi)({path:[["M",0,0],["L",0,g*_]]},o),text:(0,P.pi)({x:0,y:(g+2)*_,text:(0,b.U2)(this.get("text"),"content",""),textBaseline:p==="upward"?"bottom":"top"},c)}},e}(Ii),Op=Lf,nf=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:fa.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:fa.textColor,fontFamily:fa.fontFamily}}}})},e.prototype.renderInner=function(t){var i=(0,b.U2)(this.get("region"),"style",{}),o=(0,b.U2)(this.get("text"),"style",{}),c=this.get("lineLength")||0,p=this.get("points");if(p.length){var g=yh(p),_=[];_.push(["M",p[0].x,g.minY-c]),p.forEach(function(I){_.push(["L",I.x,I.y])}),_.push(["L",p[p.length-1].x,p[p.length-1].y-c]),this.addShape(t,{type:"path",id:this.getElementId("region"),name:"annotation-region",attrs:(0,P.pi)({path:_},i)});var S=(0,P.pi)({id:this.getElementId("text"),name:"annotation-text",x:(g.minX+g.maxX)/2,y:g.minY-c},this.get("text"));Xl(t,S)}},e}(Ii),ac=nf,Yh=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},e.prototype.renderInner=function(t){var i=this,o=this.get("start"),c=this.get("end"),p=this.addGroup(t,{id:this.getElementId("region-filter"),capture:!1});(0,b.S6)(this.get("shapes"),function(_,S){var I=_.get("type"),L=(0,b.d9)(_.attr());i.adjustShapeAttrs(L),i.addShape(p,{id:i.getElementId("shape-"+I+"-"+S),capture:!1,type:I,attrs:L})});var g=Hu({start:o,end:c});p.setClip({type:"rect",attrs:{x:g.minX,y:g.minY,width:g.width,height:g.height}})},e.prototype.adjustShapeAttrs=function(t){var i=this.get("color");t.fill&&(t.fill=t.fillStyle=i),t.stroke=t.strokeStyle=i},e}(Ii),Yf=Yh,cv=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"annotation",type:"shape",draw:b.ZT})},e.prototype.renderInner=function(t){var i=this.get("render");(0,b.mf)(i)&&i(t)},e}(Ii),xh=cv;function x(r,e,t){var i;try{i=window.getComputedStyle?window.getComputedStyle(r,null)[e]:r.style[e]}catch(o){}finally{i=i===void 0?t:i}return i}function C(r,e){var t=x(r,"width",e);return t==="auto"&&(t=r.offsetWidth),parseFloat(t)}function E(r,e){var t=C(r,e),i=parseFloat(x(r,"borderLeftWidth"))||0,o=parseFloat(x(r,"paddingLeft"))||0,c=parseFloat(x(r,"paddingRight"))||0,p=parseFloat(x(r,"borderRightWidth"))||0,g=parseFloat(x(r,"marginRight"))||0,_=parseFloat(x(r,"marginLeft"))||0;return t+i+p+o+c+_+g}function M(r,e){var t=x(r,"height",e);return t==="auto"&&(t=r.offsetHeight),parseFloat(t)}function U(r,e){var t=M(r,e),i=parseFloat(x(r,"borderTopWidth"))||0,o=parseFloat(x(r,"paddingTop"))||0,c=parseFloat(x(r,"paddingBottom"))||0,p=parseFloat(x(r,"borderBottomWidth"))||0,g=parseFloat(x(r,"marginTop"))||0,_=parseFloat(x(r,"marginBottom"))||0;return t+i+p+o+c+g+_}var H=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{container:null,containerTpl:"<div></div>",updateAutoRender:!0,containerClassName:"",parent:null})},e.prototype.getContainer=function(){return this.get("container")},e.prototype.show=function(){var t=this.get("container");t.style.display="",this.set("visible",!0)},e.prototype.hide=function(){var t=this.get("container");t.style.display="none",this.set("visible",!1)},e.prototype.setCapture=function(t){var i=this.getContainer(),o=t?"auto":"none";i.style.pointerEvents=o,this.set("capture",t)},e.prototype.getBBox=function(){var t=this.getContainer(),i=parseFloat(t.style.left)||0,o=parseFloat(t.style.top)||0;return Wl(i,o,t.clientWidth,t.clientHeight)},e.prototype.clear=function(){var t=this.get("container");yc(t)},e.prototype.destroy=function(){this.removeEvent(),this.removeDom(),r.prototype.destroy.call(this)},e.prototype.init=function(){r.prototype.init.call(this),this.initContainer(),this.initDom(),this.resetStyles(),this.applyStyles(),this.initEvent(),this.initCapture(),this.initVisible()},e.prototype.initCapture=function(){this.setCapture(this.get("capture"))},e.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},e.prototype.initDom=function(){},e.prototype.initContainer=function(){var t=this.get("container");if((0,b.UM)(t)){t=this.createDom();var i=this.get("parent");(0,b.HD)(i)&&(i=document.getElementById(i),this.set("parent",i)),i.appendChild(t),this.get("containerId")&&t.setAttribute("id",this.get("containerId")),this.set("container",t)}else(0,b.HD)(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},e.prototype.resetStyles=function(){var t=this.get("domStyles"),i=this.get("defaultStyles");t?t=(0,b.b$)({},i,t):t=i,this.set("domStyles",t)},e.prototype.applyStyles=function(){var t=this.get("domStyles");if(t){var i=this.getContainer();this.applyChildrenStyles(i,t);var o=this.get("containerClassName");if(o&&Oo(i,o)){var c=t[o];(0,Y.Z)(i,c)}}},e.prototype.applyChildrenStyles=function(t,i){(0,b.S6)(i,function(o,c){var p=t.getElementsByClassName(c);(0,b.S6)(p,function(g){(0,Y.Z)(g,o)})})},e.prototype.applyStyle=function(t,i){var o=this.get("domStyles");(0,Y.Z)(i,o[t])},e.prototype.createDom=function(){var t=this.get("containerTpl");return(0,St.Z)(t)},e.prototype.initEvent=function(){},e.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode&&t.parentNode.removeChild(t)},e.prototype.removeEvent=function(){},e.prototype.updateInner=function(t){(0,b.wH)(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},e.prototype.resetPosition=function(){},e}(If),$=H,ht=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"annotation",type:"html",locationType:"point",x:0,y:0,containerTpl:'<div class="g2-html-annotation" style="position:absolute"></div>',alignX:"left",alignY:"top",html:"",zIndex:7})},e.prototype.render=function(){var t=this.getContainer(),i=this.get("html");yc(t);var o=(0,b.mf)(i)?i(t):i;if((0,b.kK)(o))t.appendChild(o);else if((0,b.HD)(o)||(0,b.hj)(o)){var c=(0,St.Z)(""+o);c&&t.appendChild(c)}this.resetPosition()},e.prototype.resetPosition=function(){var t=this.getContainer(),i=this.getLocation(),o=i.x,c=i.y,p=this.get("alignX"),g=this.get("alignY"),_=this.get("offsetX"),S=this.get("offsetY"),I=E(t),L=U(t),F={x:o,y:c};p==="middle"?F.x-=Math.round(I/2):p==="right"&&(F.x-=Math.round(I)),g==="middle"?F.y-=Math.round(L/2):g==="bottom"&&(F.y-=Math.round(L)),_&&(F.x+=_),S&&(F.y+=S),(0,Y.Z)(t,{position:"absolute",left:F.x+"px",top:F.y+"px",zIndex:this.get("zIndex")})},e}($),Ut=ht;function re(r,e,t){var i=e+"Style",o=null;return(0,b.S6)(t,function(c,p){r[p]&&c[i]&&(o||(o={}),(0,b.CD)(o,c[i]))}),o}var Fe=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"axis",ticks:[],line:{},tickLine:{},subTickLine:null,title:null,label:{},verticalFactor:1,verticalLimitLength:null,overlapOrder:["autoRotate","autoEllipsis","autoHide"],tickStates:{},optimize:{},defaultCfg:{line:{style:{lineWidth:1,stroke:fa.lineColor}},tickLine:{style:{lineWidth:1,stroke:fa.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:fa.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:fa.textColor,fontFamily:fa.fontFamily,fontWeight:"normal"},offset:10,offsetX:0,offsetY:0},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:fa.textColor,textBaseline:"middle",fontFamily:fa.fontFamily,textAlign:"center"},iconStyle:{fill:fa.descriptionIconFill,stroke:fa.descriptionIconStroke},description:""},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:fa.uncheckedColor}}},optimize:{enable:!0,threshold:400}},theme:{}})},e.prototype.renderInner=function(t){this.get("line")&&this.drawLine(t),this.drawTicks(t),this.get("title")&&this.drawTitle(t)},e.prototype.isList=function(){return!0},e.prototype.getItems=function(){return this.get("ticks")},e.prototype.setItems=function(t){this.update({ticks:t})},e.prototype.updateItem=function(t,i){(0,b.CD)(t,i),this.clear(),this.render()},e.prototype.clearItems=function(){var t=this.getElementByLocalId("label-group");t&&t.clear()},e.prototype.setItemState=function(t,i,o){t[i]=o,this.updateTickStates(t)},e.prototype.hasState=function(t,i){return!!t[i]},e.prototype.getItemStates=function(t){var i=this.get("tickStates"),o=[];return(0,b.S6)(i,function(c,p){t[p]&&o.push(p)}),o},e.prototype.clearItemsState=function(t){var i=this,o=this.getItemsByState(t);(0,b.S6)(o,function(c){i.setItemState(c,t,!1)})},e.prototype.getItemsByState=function(t){var i=this,o=this.getItems();return(0,b.hX)(o,function(c){return i.hasState(c,t)})},e.prototype.getSidePoint=function(t,i){var o=this,c=o.getSideVector(i,t);return{x:t.x+c[0],y:t.y+c[1]}},e.prototype.getTextAnchor=function(t){var i;return(0,b.vQ)(t[0],0)?i="center":t[0]>0?i="start":t[0]<0&&(i="end"),i},e.prototype.getTextBaseline=function(t){var i;return(0,b.vQ)(t[1],0)?i="middle":t[1]>0?i="top":t[1]<0&&(i="bottom"),i},e.prototype.processOverlap=function(t){},e.prototype.drawLine=function(t){var i=this.getLinePath(),o=this.get("line");this.addShape(t,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:(0,b.CD)({path:i},o.style)})},e.prototype.getTickLineItems=function(t){var i=this,o=[],c=this.get("tickLine"),p=c.alignTick,g=c.length,_=1,S=t.length;return S>=2&&(_=t[1].value-t[0].value),(0,b.S6)(t,function(I){var L=I.point;p||(L=i.getTickPoint(I.value-_/2));var F=i.getSidePoint(L,g);o.push({startPoint:L,tickValue:I.value,endPoint:F,tickId:I.id,id:"tickline-"+I.id})}),o},e.prototype.getSubTickLineItems=function(t){var i=[],o=this.get("subTickLine"),c=o.count,p=t.length;if(p>=2)for(var g=0;g<p-1;g++)for(var _=t[g],S=t[g+1],I=0;I<c;I++){var L=(I+1)/(c+1),F=(1-L)*_.tickValue+L*S.tickValue,z=this.getTickPoint(F),V=this.getSidePoint(z,o.length);i.push({startPoint:z,endPoint:V,tickValue:F,id:"sub-"+_.id+"-"+I})}return i},e.prototype.getTickLineAttrs=function(t,i,o,c){var p=this.get(i).style,g={points:[t.startPoint,t.endPoint]},_=(0,b.U2)(this.get("theme"),["tickLine","style"],{});p=(0,b.mf)(p)?(0,b.CD)({},_,p(g,o,c)):p;var S=t.startPoint,I=t.endPoint;return(0,P.pi)({x1:S.x,y1:S.y,x2:I.x,y2:I.y},p)},e.prototype.drawTick=function(t,i,o,c,p){this.addShape(i,{type:"line",id:this.getElementId(t.id),name:"axis-"+o,attrs:this.getTickLineAttrs(t,o,c,p)})},e.prototype.drawTickLines=function(t){var i=this,o=this.get("ticks"),c=this.get("subTickLine"),p=this.getTickLineItems(o),g=this.addGroup(t,{name:"axis-tickline-group",id:this.getElementId("tickline-group")}),_=this.get("tickLine");if((0,b.S6)(p,function(I,L){if(_.displayWithLabel){var F=i.getElementId("label-"+I.tickId);t.findById(F)&&i.drawTick(I,g,"tickLine",L,p)}else i.drawTick(I,g,"tickLine",L,p)}),c){var S=this.getSubTickLineItems(p);(0,b.S6)(S,function(I,L){i.drawTick(I,g,"subTickLine",L,S)})}},e.prototype.processTicks=function(){var t=this,i=this.get("ticks");(0,b.S6)(i,function(o){o.point=t.getTickPoint(o.value),(0,b.UM)(o.id)&&(o.id=o.name)})},e.prototype.drawTicks=function(t){var i=this;this.optimizeTicks(),this.processTicks(),this.get("label")&&this.drawLabels(t),this.get("tickLine")&&this.drawTickLines(t);var o=this.get("ticks");(0,b.S6)(o,function(c){i.applyTickStates(c,t)})},e.prototype.optimizeTicks=function(){var t=this.get("optimize"),i=this.get("ticks");if(t&&t.enable&&t.threshold>0){var o=(0,b.dp)(i);if(o>t.threshold){var c=Math.ceil(o/t.threshold),p=i.filter(function(g,_){return _%c===0});this.set("ticks",p),this.set("originalTicks",i)}}},e.prototype.getLabelAttrs=function(t,i,o){var c=this.get("label"),p=c.offset,g=c.offsetX,_=c.offsetY,S=c.rotate,I=c.formatter,L=this.getSidePoint(t.point,p),F=this.getSideVector(p,L),z=I?I(t.name,t,i):t.name,V=c.style;V=(0,b.mf)(V)?(0,b.U2)(this.get("theme"),["label","style"],{}):V;var Q=(0,b.CD)({x:L.x+g,y:L.y+_,text:z,textAlign:this.getTextAnchor(F),textBaseline:this.getTextBaseline(F)},V);return S&&(Q.matrix=wl(L,S)),Q},e.prototype.drawLabels=function(t){var i=this,o=this.get("ticks"),c=this.addGroup(t,{name:"axis-label-group",id:this.getElementId("label-group")});(0,b.S6)(o,function(F,z){i.addShape(c,{type:"text",name:"axis-label",id:i.getElementId("label-"+F.id),attrs:i.getLabelAttrs(F,z,o),delegateObject:{tick:F,item:F,index:z}})}),this.processOverlap(c);var p=c.getChildren(),g=(0,b.U2)(this.get("theme"),["label","style"],{}),_=this.get("label"),S=_.style,I=_.formatter;if((0,b.mf)(S)){var L=p.map(function(F){return(0,b.U2)(F.get("delegateObject"),"tick")});(0,b.S6)(p,function(F,z){var V=F.get("delegateObject").tick,Q=I?I(V.name,V,z):V.name,st=(0,b.CD)({},g,S(Q,z,L));F.attr(st)})}},e.prototype.getTitleAttrs=function(){var t=this.get("title"),i=t.style,o=t.position,c=t.offset,p=t.spacing,g=p===void 0?0:p,_=t.autoRotate,S=i.fontSize,I=.5;o==="start"?I=0:o==="end"&&(I=1);var L=this.getTickPoint(I),F=this.getSidePoint(L,c||g+S/2),z=(0,b.CD)({x:F.x,y:F.y,text:t.text},i),V=t.rotate,Q=V;if((0,b.UM)(V)&&_){var st=this.getAxisVector(L),at=[1,0];Q=no.Dg(st,at,!0)}if(Q){var Rt=wl(F,Q);z.matrix=Rt}return z},e.prototype.drawTitle=function(t){var i,o=this.getTitleAttrs(),c=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"axis-title",attrs:o});!((i=this.get("title"))===null||i===void 0)&&i.description&&this.drawDescriptionIcon(t,c,o.matrix)},e.prototype.drawDescriptionIcon=function(t,i,o){var c=this.addGroup(t,{name:"axis-description",id:this.getElementById("description")}),p=i.getBBox(),g=p.maxX,_=p.maxY,S=p.height,I=this.get("title").iconStyle,L=4,F=S/2,z=F/6,V=g+L,Q=_-S/2,st=[V+F,Q-F],at=st[0],Rt=st[1],Kt=[at+F,Rt+F],te=Kt[0],Ae=Kt[1],hr=[at,Ae+F],Tr=hr[0],Dr=hr[1],cn=[V,Rt+F],Qr=cn[0],Tn=cn[1],xi=[V+F,Q-S/4],va=xi[0],Aa=xi[1],ao=[va,Aa+z],Gn=ao[0],Gi=ao[1],ca=[Gn,Gi+z],Yi=ca[0],ra=ca[1],Pa=[Yi,ra+F*3/4],wo=Pa[0],Ro=Pa[1];this.addShape(c,{type:"path",id:this.getElementId("title-description-icon"),name:"axis-title-description-icon",attrs:(0,P.pi)({path:[["M",at,Rt],["A",F,F,0,0,1,te,Ae],["A",F,F,0,0,1,Tr,Dr],["A",F,F,0,0,1,Qr,Tn],["A",F,F,0,0,1,at,Rt],["M",va,Aa],["L",Gn,Gi],["M",Yi,ra],["L",wo,Ro]],lineWidth:z,matrix:o},I)}),this.addShape(c,{type:"rect",id:this.getElementId("title-description-rect"),name:"axis-title-description-rect",attrs:{x:V,y:Q-S/2,width:S,height:S,stroke:"#000",fill:"#000",opacity:0,matrix:o,cursor:"pointer"}})},e.prototype.applyTickStates=function(t,i){var o=this.getItemStates(t);if(o.length){var c=this.get("tickStates"),p=this.getElementId("label-"+t.id),g=i.findById(p);if(g){var _=re(t,"label",c);_&&g.attr(_)}var S=this.getElementId("tickline-"+t.id),I=i.findById(S);if(I){var L=re(t,"tickLine",c);L&&I.attr(L)}}},e.prototype.updateTickStates=function(t){var i=this.getItemStates(t),o=this.get("tickStates"),c=this.get("label"),p=this.getElementByLocalId("label-"+t.id),g=this.get("tickLine"),_=this.getElementByLocalId("tickline-"+t.id);if(i.length){if(p){var S=re(t,"label",o);S&&p.attr(S)}if(_){var I=re(t,"tickLine",o);I&&_.attr(I)}}else p&&p.attr(c.style),_&&_.attr(g.style)},e}(Ii),Re=Fe;function De(r,e,t,i){var o=e.getChildren(),c=!1;return(0,b.S6)(o,function(p){var g=hl(r,p,t,i);c=c||g}),c}function cr(){return Er}function ur(r,e,t){return De(r,e,t,"head")}function Er(r,e,t){return De(r,e,t,"tail")}function nr(r,e,t){return De(r,e,t,"middle")}function wr(r){var e=r.attr("matrix");return e&&e[0]!==1}function Ir(r){var e=wr(r)?mc(r.attr("matrix")):0;return e%360}function $r(r,e,t,i){var o=!1,c=Ir(e),p=Math.abs(r?t.attr("y")-e.attr("y"):t.attr("x")-e.attr("x")),g=(r?t.attr("y")>e.attr("y"):t.attr("x")>e.attr("x"))?e.getBBox():t.getBBox();if(r){var _=Math.abs(Math.cos(c));ef(_,0,Math.PI/180)?o=g.width+i>p:o=g.height/_+i>p}else{var _=Math.abs(Math.sin(c));ef(_,0,Math.PI/180)?o=g.width+i>p:o=g.height/_+i>p}return o}function gn(r,e,t,i){var o=(i==null?void 0:i.minGap)||0,c=e.getChildren().slice().filter(function(V){return V.get("visible")});if(!c.length)return!1;var p=!1;t&&c.reverse();for(var g=c.length,_=c[0],S=_,I=1;I<g;I++){var L=c[I],F=L.getBBox(),z=$r(r,S,L,o);z?(L.hide(),p=!0):S=L}return p}function dn(r,e,t){var i=(t==null?void 0:t.minGap)||0,o=e.getChildren().slice();if(o.length<2)return!1;var c=!1,p=o[0],g=p.getBBox(),_=o[1],S=o.length,I=Ir(p),L=Math.abs(r?_.attr("y")-p.attr("y"):_.attr("x")-p.attr("x")),F=0;if(r){var z=Math.abs(Math.cos(I));if(ef(z,0,Math.PI/180)){var V=os(o);F=(V+i)/L}else F=(g.height/z+i)/L}else{var z=Math.abs(Math.sin(I));if(ef(z,0,Math.PI/180)){var V=os(o);F=(V+i)/L}else F=(g.height/z+i)/L}if(F>1){F=Math.ceil(F);for(var Q=0;Q<S;Q++)Q%F!==0&&(o[Q].hide(),c=!0)}return c}function xn(){return Bi}function Un(r,e,t,i){return gn(r,e,!1,i)}function yi(r,e,t,i){return gn(r,e,!0,i)}function ui(r,e,t,i){var o=(i==null?void 0:i.minGap)||0,c=e.getChildren().slice();if(c.length<=2)return!1;for(var p=!1,g=c.length,_=c[0],S=c[g-1],I=_,L=1;L<g-1;L++){var F=c[L],z=F.getBBox(),V=$r(r,I,F,o);V?(F.hide(),p=!0):I=F}var Q=$r(r,I,S,o);return Q&&(I.hide(),p=!0),p}function Bi(r,e,t,i){var o=dn(r,e,i);return gn(r,e,!1)&&(o=!0),o}function sa(r,e,t,i){var o=e.getChildren().slice(),c=dn(r,e,i);if(o.length>2){var p=o[0],g=o[o.length-1];p.get("visible")||(p.show(),gn(r,e,!1,i)&&(c=!0)),g.get("visible")||(g.show(),gn(r,e,!0,i)&&(c=!0))}return c}function ua(r,e){(0,b.S6)(r,function(t){var i=t.attr("x"),o=t.attr("y"),c=wl({x:i,y:o},e);t.attr("matrix",c)})}function ha(r,e,t,i){var o=e.getChildren();if(!o.length||!r&&o.length<2)return!1;var c=os(o),p=!1;if(r)p=!!t&&c>t;else{var g=Math.abs(o[1].attr("x")-o[0].attr("x"));p=c>g}if(p){var _=i(t,c);ua(o,_)}return p}function uo(){return Ni}function Ni(r,e,t,i){return ha(r,e,t,function(){return(0,b.hj)(i)?i:r?fa.verticalAxisRotate:fa.horizontalAxisRotate})}function La(r,e,t){return ha(r,e,t,function(i,o){if(!i)return r?fa.verticalAxisRotate:fa.horizontalAxisRotate;if(r)return-Math.acos(i/o);var c=0;return i>o?c=Math.PI/4:(c=Math.asin(i/o),c>Math.PI/4&&(c=Math.PI/4)),c})}var Ra=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getLinePath=function(){var t=this.get("start"),i=this.get("end"),o=[];return o.push(["M",t.x,t.y]),o.push(["L",i.x,i.y]),o},e.prototype.getInnerLayoutBBox=function(){var t=this.get("start"),i=this.get("end"),o=r.prototype.getInnerLayoutBBox.call(this),c=Math.min(t.x,i.x,o.x),p=Math.min(t.y,i.y,o.y),g=Math.max(t.x,i.x,o.maxX),_=Math.max(t.y,i.y,o.maxY);return{x:c,y:p,minX:c,minY:p,maxX:g,maxY:_,width:g-c,height:_-p}},e.prototype.isVertical=function(){var t=this.get("start"),i=this.get("end");return(0,b.vQ)(t.x,i.x)},e.prototype.isHorizontal=function(){var t=this.get("start"),i=this.get("end");return(0,b.vQ)(t.y,i.y)},e.prototype.getTickPoint=function(t){var i=this,o=i.get("start"),c=i.get("end"),p=c.x-o.x,g=c.y-o.y;return{x:o.x+p*t,y:o.y+g*t}},e.prototype.getSideVector=function(t){var i=this.getAxisVector(),o=Qi.Fv([0,0],i),c=this.get("verticalFactor"),p=[o[1],o[0]*-1];return Qi.bA([0,0],p,t*c)},e.prototype.getAxisVector=function(){var t=this.get("start"),i=this.get("end");return[i.x-t.x,i.y-t.y]},e.prototype.processOverlap=function(t){var i=this,o=this.isVertical(),c=this.isHorizontal();if(!(!o&&!c)){var p=this.get("label"),g=this.get("title"),_=this.get("verticalLimitLength"),S=p.offset,I=_,L=0,F=0;g&&(L=g.style.fontSize,F=g.spacing),I&&(I=I-S-F-L);var z=this.get("overlapOrder");if((0,b.S6)(z,function(st){p[st]&&i.canProcessOverlap(st)&&i.autoProcessOverlap(st,p[st],t,I)}),g&&(0,b.UM)(g.offset)){var V=t.getCanvasBBox(),Q=o?V.width:V.height;g.offset=S+Q+F+L/2}}},e.prototype.canProcessOverlap=function(t){var i=this.get("label");return t==="autoRotate"?(0,b.UM)(i.rotate):!0},e.prototype.autoProcessOverlap=function(t,i,o,c){var p=this,g=this.isVertical(),_=!1,S=yt[t];if(i===!0){var I=this.get("label");_=S.getDefault()(g,o,c)}else if((0,b.mf)(i))_=i(g,o,c);else if((0,b.Kn)(i)){var L=i;S[L.type]&&(_=S[L.type](g,o,c,L.cfg))}else S[i]&&(_=S[i](g,o,c));if(t==="autoRotate"){if(_){var F=o.getChildren(),z=this.get("verticalFactor");(0,b.S6)(F,function(Q){var st=Q.attr("textAlign");if(st==="center"){var at=z>0?"end":"start";Q.attr("textAlign",at)}})}}else if(t==="autoHide"){var V=o.getChildren().slice(0);(0,b.S6)(V,function(Q){Q.get("visible")||(p.get("isRegister")&&p.unregisterElement(Q),Q.remove())})}},e}(Re),Ta=Ra,_a=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:Math.PI*3/2})},e.prototype.getLinePath=function(){var t=this.get("center"),i=t.x,o=t.y,c=this.get("radius"),p=c,g=this.get("startAngle"),_=this.get("endAngle"),S=[];if(Math.abs(_-g)===Math.PI*2)S=[["M",i,o-p],["A",c,p,0,1,1,i,o+p],["A",c,p,0,1,1,i,o-p],["Z"]];else{var I=this.getCirclePoint(g),L=this.getCirclePoint(_),F=Math.abs(_-g)>Math.PI?1:0,z=g>_?0:1;S=[["M",i,o],["L",I.x,I.y],["A",c,p,0,F,z,L.x,L.y],["L",i,o]]}return S},e.prototype.getTickPoint=function(t){var i=this.get("startAngle"),o=this.get("endAngle"),c=i+(o-i)*t;return this.getCirclePoint(c)},e.prototype.getSideVector=function(t,i){var o=this.get("center"),c=[i.x-o.x,i.y-o.y],p=this.get("verticalFactor"),g=Qi.kE(c);return Qi.bA(c,c,p*t/g),c},e.prototype.getAxisVector=function(t){var i=this.get("center"),o=[t.x-i.x,t.y-i.y];return[o[1],-1*o[0]]},e.prototype.getCirclePoint=function(t,i){var o=this.get("center");return i=i||this.get("radius"),{x:o.x+Math.cos(t)*i,y:o.y+Math.sin(t)*i}},e.prototype.canProcessOverlap=function(t){var i=this.get("label");return t==="autoRotate"?(0,b.UM)(i.rotate):!0},e.prototype.processOverlap=function(t){var i=this,o=this.get("label"),c=this.get("title"),p=this.get("verticalLimitLength"),g=o.offset,_=p,S=0,I=0;c&&(S=c.style.fontSize,I=c.spacing),_&&(_=_-g-I-S);var L=this.get("overlapOrder");if((0,b.S6)(L,function(z){o[z]&&i.canProcessOverlap(z)&&i.autoProcessOverlap(z,o[z],t,_)}),c&&(0,b.UM)(c.offset)){var F=t.getCanvasBBox().height;c.offset=g+F+I+S/2}},e.prototype.autoProcessOverlap=function(t,i,o,c){var p=this,g=!1,_=yt[t];if(c>0)if(i===!0)g=_.getDefault()(!1,o,c);else if((0,b.mf)(i))g=i(!1,o,c);else if((0,b.Kn)(i)){var S=i;_[S.type]&&(g=_[S.type](!1,o,c,S.cfg))}else _[i]&&(g=_[i](!1,o,c));if(t==="autoRotate"){if(g){var I=o.getChildren(),L=this.get("verticalFactor");(0,b.S6)(I,function(z){var V=z.attr("textAlign");if(V==="center"){var Q=L>0?"end":"start";z.attr("textAlign",Q)}})}}else if(t==="autoHide"){var F=o.getChildren().slice(0);(0,b.S6)(F,function(z){z.get("visible")||(p.get("isRegister")&&p.unregisterElement(z),z.remove())})}},e}(Re),za=_a,xa=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:fa.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:fa.textColor,textAlign:"center",textBaseline:"middle",fontFamily:fa.fontFamily}},textBackground:{padding:5,style:{stroke:fa.lineColor}}}})},e.prototype.renderInner=function(t){this.get("line")&&this.renderLine(t),this.get("text")&&(this.renderText(t),this.renderBackground(t))},e.prototype.renderText=function(t){var i=this.get("text"),o=i.style,c=i.autoRotate,p=i.content;if(!(0,b.UM)(p)){var g=this.getTextPoint(),_=null;if(c){var S=this.getRotateAngle();_=wl(g,S)}this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:(0,P.pi)((0,P.pi)((0,P.pi)({},g),{text:p,matrix:_}),o)})}},e.prototype.renderLine=function(t){var i=this.getLinePath(),o=this.get("line"),c=o.style;this.addShape(t,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:(0,P.pi)({path:i},c)})},e.prototype.renderBackground=function(t){var i=this.getElementId("text"),o=t.findById(i),c=this.get("textBackground");if(c&&o){var p=o.getBBox(),g=mh(c.padding),_=c.style,S=this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:(0,P.pi)({x:p.x-g[3],y:p.y-g[0],width:p.width+g[1]+g[3],height:p.height+g[0]+g[2],matrix:o.attr("matrix")},_)});S.toBack()}},e}(Ii),ga=xa,Qs=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),i=t.start,o=t.end,c=this.get("text").position,p=Math.atan2(o.y-i.y,o.x-i.x),g=c==="start"?p-Math.PI/2:p+Math.PI/2;return g},e.prototype.getTextPoint=function(){var t=this.getLocation(),i=t.start,o=t.end,c=this.get("text"),p=c.position,g=c.offset;return Ol(i,o,p,g)},e.prototype.getLinePath=function(){var t=this.getLocation(),i=t.start,o=t.end;return[["M",i.x,i.y],["L",o.x,o.y]]},e}(ga),As=Qs,mu=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:Math.PI*3/2})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),i=t.startAngle,o=t.endAngle,c=this.get("text").position,p=c==="start"?i+Math.PI/2:o-Math.PI/2;return p},e.prototype.getTextPoint=function(){var t=this.get("text"),i=t.position,o=t.offset,c=this.getLocation(),p=c.center,g=c.radius,_=c.startAngle,S=c.endAngle,I=i==="start"?_:S,L=this.getRotateAngle()-Math.PI,F=Pl(p,g,I),z=Math.cos(L)*o,V=Math.sin(L)*o;return{x:F.x+z,y:F.y+V}},e.prototype.getLinePath=function(){var t=this.getLocation(),i=t.center,o=t.radius,c=t.startAngle,p=t.endAngle,g=null;if(p-c===Math.PI*2){var _=i.x,S=i.y;g=[["M",_,S-o],["A",o,o,0,1,1,_,S+o],["A",o,o,0,1,1,_,S-o],["Z"]]}else{var I=Pl(i,o,c),L=Pl(i,o,p),F=Math.abs(p-c)>Math.PI?1:0,z=c>p?0:1;g=[["M",I.x,I.y],["A",o,o,0,F,z,L.x,L.y]]}return g},e}(ga),yu=mu,ss="g2-crosshair",Ms=ss+"-line",el=ss+"-text",Xs,oc=(Xs={},Xs[""+ss]={position:"relative"},Xs[""+Ms]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},Xs[""+el]={position:"absolute",color:fa.textColor,fontFamily:fa.fontFamily},Xs),rl=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"crosshair",type:"html",locationType:"region",start:{x:0,y:0},end:{x:0,y:0},capture:!1,text:null,containerTpl:'<div class="'+ss+'"></div>',crosshairTpl:'<div class="'+Ms+'"></div>',textTpl:'<span class="'+el+'">{content}</span>',domStyles:null,containerClassName:ss,defaultStyles:oc,defaultCfg:{text:{position:"start",content:null,align:"center",offset:10}}})},e.prototype.render=function(){this.resetText(),this.resetPosition()},e.prototype.initCrossHair=function(){var t=this.getContainer(),i=this.get("crosshairTpl"),o=(0,St.Z)(i);t.appendChild(o),this.applyStyle(Ms,o),this.set("crosshairEl",o)},e.prototype.getTextPoint=function(){var t=this.getLocation(),i=t.start,o=t.end,c=this.get("text"),p=c.position,g=c.offset;return Ol(i,o,p,g)},e.prototype.resetText=function(){var t=this.get("text"),i=this.get("textEl");if(t){var o=t.content;if(!i){var c=this.getContainer(),p=(0,b.ng)(this.get("textTpl"),t);i=(0,St.Z)(p),c.appendChild(i),this.applyStyle(el,i),this.set("textEl",i)}i.innerHTML=o}else i&&i.remove()},e.prototype.isVertical=function(t,i){return t.x===i.x},e.prototype.resetPosition=function(){var t=this.get("crosshairEl");t||(this.initCrossHair(),t=this.get("crosshairEl"));var i=this.get("start"),o=this.get("end"),c=Math.min(i.x,o.x),p=Math.min(i.y,o.y);this.isVertical(i,o)?(0,Y.Z)(t,{width:"1px",height:Ws(Math.abs(o.y-i.y))}):(0,Y.Z)(t,{height:"1px",width:Ws(Math.abs(o.x-i.x))}),(0,Y.Z)(t,{top:Ws(p),left:Ws(c)}),this.alignText()},e.prototype.alignText=function(){var t=this.get("textEl");if(t){var i=this.get("text").align,o=t.clientWidth,c=this.getTextPoint();switch(i){case"center":c.x=c.x-o/2;break;case"right":c.x=c.x-o;case"left":break}(0,Y.Z)(t,{top:Ws(c.y),left:Ws(c.x)})}},e.prototype.updateInner=function(t){(0,b.wH)(t,"text")&&this.resetText(),r.prototype.updateInner.call(this,t)},e}($),Zo=rl,Yl=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:fa.lineColor}}}})},e.prototype.getLineType=function(){var t=this.get("line")||this.get("defaultCfg").line;return t.type},e.prototype.renderInner=function(t){this.drawGrid(t)},e.prototype.getAlternatePath=function(t,i){var o=this.getGridPath(t),c=i.slice(0).reverse(),p=this.getGridPath(c,!0),g=this.get("closed");return g?o=o.concat(p):(p[0][0]="L",o=o.concat(p),o.push(["Z"])),o},e.prototype.getPathStyle=function(){return this.get("line").style},e.prototype.drawGrid=function(t){var i=this,o=this.get("line"),c=this.get("items"),p=this.get("alternateColor"),g=null;(0,b.S6)(c,function(_,S){var I=_.id||S;if(o){var L=i.getPathStyle();L=(0,b.mf)(L)?L(_,S,c):L;var F=i.getElementId("line-"+I),z=i.getGridPath(_.points);i.addShape(t,{type:"path",name:"grid-line",id:F,attrs:(0,b.CD)({path:z},L)})}if(p&&S>0){var V=i.getElementId("region-"+I),Q=S%2===0;if((0,b.HD)(p))Q&&i.drawAlternateRegion(V,t,g.points,_.points,p);else{var st=Q?p[1]:p[0];i.drawAlternateRegion(V,t,g.points,_.points,st)}}g=_})},e.prototype.drawAlternateRegion=function(t,i,o,c,p){var g=this.getAlternatePath(o,c);this.addShape(i,{type:"path",id:t,name:"grid-region",attrs:{path:g,fill:p}})},e}(Ii),sc=Yl;function Lu(r,e,t,i){var o=t-r,c=i-e;return Math.sqrt(o*o+c*c)}var Ec=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{type:"circle",center:null,closed:!0})},e.prototype.getGridPath=function(t,i){var o=this.getLineType(),c=this.get("closed"),p=[];if(t.length)if(o==="circle"){var g=this.get("center"),_=t[0],S=Lu(g.x,g.y,_.x,_.y),I=i?0:1;c?(p.push(["M",g.x,g.y-S]),p.push(["A",S,S,0,0,I,g.x,g.y+S]),p.push(["A",S,S,0,0,I,g.x,g.y-S]),p.push(["Z"])):(0,b.S6)(t,function(L,F){F===0?p.push(["M",L.x,L.y]):p.push(["A",S,S,0,0,I,L.x,L.y])})}else(0,b.S6)(t,function(L,F){F===0?p.push(["M",L.x,L.y]):p.push(["L",L.x,L.y])}),c&&p.push(["Z"]);return p},e}(sc),Pf=Ec,af=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{type:"line"})},e.prototype.getGridPath=function(t){var i=[];return(0,b.S6)(t,function(o,c){c===0?i.push(["M",o.x,o.y]):i.push(["L",o.x,o.y])}),i},e}(sc),uc=af,$f=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},e.prototype.getLayoutBBox=function(){var t=r.prototype.getLayoutBBox.call(this),i=this.get("maxWidth"),o=this.get("maxHeight"),c=t.width,p=t.height;return i&&(c=Math.min(c,i)),o&&(p=Math.min(p,o)),Wl(t.minX,t.minY,c,p)},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.resetLocation=function(){var t=this.get("x"),i=this.get("y"),o=this.get("offsetX"),c=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+o,y:i+c})},e.prototype.applyOffset=function(){this.resetLocation()},e.prototype.getDrawPoint=function(){return this.get("currentPoint")},e.prototype.setDrawPoint=function(t){return this.set("currentPoint",t)},e.prototype.renderInner=function(t){this.resetDraw(),this.get("title")&&this.drawTitle(t),this.drawLegendContent(t),this.get("background")&&this.drawBackground(t)},e.prototype.drawBackground=function(t){var i=this.get("background"),o=t.getBBox(),c=mh(i.padding),p=(0,P.pi)({x:0,y:0,width:o.width+c[1]+c[3],height:o.height+c[0]+c[2]},i.style),g=this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:p});g.toBack()},e.prototype.drawTitle=function(t){var i=this.get("currentPoint"),o=this.get("title"),c=o.spacing,p=o.style,g=o.text,_=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:(0,P.pi)({text:g,x:i.x,y:i.y},p)}),S=_.getBBox();this.set("currentPoint",{x:i.x,y:S.maxY+c})},e.prototype.resetDraw=function(){var t=this.get("background"),i={x:0,y:0};if(t){var o=mh(t.padding);i.x=o[3],i.y=o[0]}this.set("currentPoint",i)},e}(Ii),lc=$f,Fs={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},Cl={fill:fa.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:fa.fontFamily,fontWeight:"normal",lineHeight:12},Al="navigation-arrow-right",Uc="navigation-arrow-left",Co={right:90*Math.PI/180,left:(360-90)*Math.PI/180,up:0,down:180*Math.PI/180},Fl=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.currentPageIndex=1,t.totalPagesCnt=1,t.pageWidth=0,t.pageHeight=0,t.startX=0,t.startY=0,t.onNavigationBack=function(){var i=t.getElementByLocalId("item-group");if(t.currentPageIndex>1){t.currentPageIndex-=1,t.updateNavigation();var o=t.getCurrentNavigationMatrix();t.get("animate")?i.animate({matrix:o},100):i.attr({matrix:o})}},t.onNavigationAfter=function(){var i=t.getElementByLocalId("item-group");if(t.currentPageIndex<t.totalPagesCnt){t.currentPageIndex+=1,t.updateNavigation();var o=t.getCurrentNavigationMatrix();t.get("animate")?i.animate({matrix:o},100):i.attr({matrix:o})}},t}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"legend",type:"category",itemSpacing:24,itemMarginBottom:8,maxItemWidth:null,itemWidth:null,itemHeight:null,itemName:{},itemValue:null,maxWidth:null,maxHeight:null,marker:{},radio:null,items:[],itemStates:{},itemBackground:{},pageNavigator:{},defaultCfg:{title:{spacing:5,style:{fill:fa.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}},background:{padding:5,style:{stroke:fa.lineColor}},itemBackground:{style:{opacity:0,fill:"#fff"}},pageNavigator:Fs,itemName:{spacing:16,style:Cl},marker:{spacing:8,style:{r:6,symbol:"circle"}},itemValue:{alignRight:!1,formatter:null,style:Cl,spacing:6},itemStates:{active:{nameStyle:{opacity:.8}},unchecked:{nameStyle:{fill:fa.uncheckedColor},markerStyle:{fill:fa.uncheckedColor,stroke:fa.uncheckedColor}},inactive:{nameStyle:{fill:fa.uncheckedColor},markerStyle:{opacity:.2}}}}})},e.prototype.isList=function(){return!0},e.prototype.getItems=function(){return this.get("items")},e.prototype.setItems=function(t){this.update({items:t})},e.prototype.updateItem=function(t,i){(0,b.CD)(t,i),this.clear(),this.render()},e.prototype.clearItems=function(){var t=this.getElementByLocalId("item-group");t&&t.clear()},e.prototype.setItemState=function(t,i,o){t[i]=o;var c=this.getElementByLocalId("item-"+t.id);if(c){var p=this.getItems(),g=p.indexOf(t),_=this.createOffScreenGroup(),S=this.drawItem(t,g,this.getItemHeight(),_);this.updateElements(S,c),this.clearUpdateStatus(c)}},e.prototype.hasState=function(t,i){return!!t[i]},e.prototype.getItemStates=function(t){var i=this.get("itemStates"),o=[];return(0,b.S6)(i,function(c,p){t[p]&&o.push(p)}),o},e.prototype.clearItemsState=function(t){var i=this,o=this.getItemsByState(t);(0,b.S6)(o,function(c){i.setItemState(c,t,!1)})},e.prototype.getItemsByState=function(t){var i=this,o=this.getItems();return(0,b.hX)(o,function(c){return i.hasState(c,t)})},e.prototype.drawLegendContent=function(t){this.processItems(),this.drawItems(t)},e.prototype.processItems=function(){var t=this.get("items");(0,b.S6)(t,function(i){i.id||(i.id=i.name)})},e.prototype.drawItems=function(t){var i=this,o=this.addGroup(t,{id:this.getElementId("item-container-group"),name:"legend-item-container-group"}),c=this.addGroup(o,{id:this.getElementId("item-group"),name:"legend-item-group"}),p=this.getItemHeight(),g=this.get("itemWidth"),_=this.get("itemSpacing"),S=this.get("itemMarginBottom"),I=this.get("currentPoint"),L=I.x,F=I.y,z=this.get("layout"),V=this.get("items"),Q=!1,st=0,at=this.get("maxWidth"),Rt=this.get("maxHeight");(0,b.S6)(V,function(Kt,te){var Ae=i.drawItem(Kt,te,p,c),hr=Ae.getBBox(),Tr=g||hr.width;Tr>st&&(st=Tr),z==="horizontal"?(at&&at<I.x+Tr-L&&(Q=!0,I.x=L,I.y+=p+S),i.moveElementTo(Ae,I),I.x+=Tr+_):(Rt&&Rt<I.y+p+S-F&&(Q=!0,I.x+=st+_,I.y=F,st=0),i.moveElementTo(Ae,I),I.y+=p+S)}),Q&&this.get("flipPage")&&(this.pageHeight=0,this.pageWidth=0,this.totalPagesCnt=1,this.startX=L,this.startY=F,this.adjustNavigation(t,c))},e.prototype.getItemHeight=function(){var t=this.get("itemHeight");if(!t){var i=(this.get("itemName")||{}).style;if((0,b.mf)(i)){var o=this.getItems();o.forEach(function(c,p){var g=(0,P.pi)((0,P.pi)({},Cl),i(c,p,o)).fontSize;t<g&&(t=g)})}else i&&(t=i.fontSize)}return t},e.prototype.drawMarker=function(t,i,o,c){var p=(0,P.pi)((0,P.pi)((0,P.pi)({x:0,y:c/2},i.style),{symbol:(0,b.U2)(o.marker,"symbol","circle")}),(0,b.U2)(o.marker,"style",{})),g=this.addShape(t,{type:"marker",id:this.getElementId("item-"+o.id+"-marker"),name:"legend-item-marker",attrs:p}),_=g.getBBox();g.attr("x",_.width/2);var S=g.attr(),I=S.stroke,L=S.fill;return I&&g.set("isStroke",!0),L&&g.set("isFill",!0),g},e.prototype.drawItemText=function(t,i,o,c,p,g,_){var S=o.formatter,I=o.style,L=(0,P.pi)((0,P.pi)({x:g,y:p/2,text:S?S(c[i],c,_):c[i]},Cl),(0,b.mf)(I)?I(c,_,this.getItems()):I);return this.addShape(t,{type:"text",id:this.getElementId("item-"+c.id+"-"+i),name:"legend-item-"+i,attrs:L})},e.prototype.drawRadio=function(t,i,o,c,p){var g,_,S=i.style||{},I=(g=S.r)!==null&&g!==void 0?g:c/2,L=I*3.6/8,F=[p+I,c/2-I],z=F[0],V=F[1],Q=[z+I,V+I],st=Q[0],at=Q[1],Rt=[z,at+I],Kt=Rt[0],te=Rt[1],Ae=[p,V+I],hr=Ae[0],Tr=Ae[1],Dr=o.showRadio,cn=(0,P.pi)((0,P.pi)({path:[["M",z,V],["A",I,I,0,0,1,st,at],["L",st-L,at],["L",st,at],["A",I,I,0,0,1,Kt,te],["L",Kt,te-L],["L",Kt,te],["A",I,I,0,0,1,hr,Tr],["L",hr+L,Tr],["L",hr,Tr],["A",I,I,0,0,1,z,V],["L",z,V+L]],stroke:"#000000",fill:"#ffffff"},S),{opacity:Dr?(_=S==null?void 0:S.opacity)!==null&&_!==void 0?_:.45:0}),Qr=this.addShape(t,{type:"path",id:this.getElementId("item-"+o.id+"-radio"),name:"legend-item-radio",attrs:cn});return Qr.set("tip",i.tip),Qr},e.prototype.drawItem=function(t,i,o,c){var p="item-"+t.id,g=this.addGroup(c,{name:"legend-item-container",id:this.getElementId("item-container-"+p),delegateObject:{item:t,index:i}}),_=this.addGroup(g,{name:"legend-item",id:this.getElementId(p),delegateObject:{item:t,index:i}}),S=this.get("marker"),I=this.get("itemName"),L=this.get("itemValue"),F=this.get("itemBackground"),z=this.get("radio"),V=this.getLimitItemWidth(),Q=0;if(S){var st=this.drawMarker(_,S,t,o),at=S.spacing,Rt=(0,b.U2)(t,["marker","spacing"]);(0,b.hj)(Rt)&&(at=Rt),Q=st.getBBox().maxX+at}if(I){var Kt=this.drawItemText(_,"name",I,t,o,Q,i);V&&hl(!0,Kt,(0,b.uZ)(V-Q,0,V)),Q=Kt.getBBox().maxX+I.spacing}if(L){var te=this.drawItemText(_,"value",L,t,o,Q,i);V&&(L.alignRight?(te.attr({textAlign:"right",x:V}),hl(!0,te,(0,b.uZ)(V-Q,0,V),"head")):hl(!0,te,(0,b.uZ)(V-Q,0,V))),Q=te.getBBox().maxX+L.spacing}if(z&&this.drawRadio(_,z,t,o,Q),F){var Ae=_.getBBox(),hr=this.addShape(_,{type:"rect",name:"legend-item-background",id:this.getElementId(p+"-background"),attrs:(0,P.pi)({x:0,y:0,width:Ae.width,height:o},F.style)});hr.toBack()}return this.applyItemStates(t,_),_},e.prototype.adjustNavigation=function(t,i){var o=this,c=this.startX,p=this.startY,g=this.get("layout"),_=i.findAll(function(Qr){return Qr.get("name")==="legend-item"}),S=this.get("maxWidth"),I=this.get("maxHeight"),L=this.get("itemWidth"),F=this.get("itemSpacing"),z=this.getItemHeight(),V=(0,b.b$)({},Fs,this.get("pageNavigator")),Q=this.drawNavigation(t,g,"00/00",V),st=Q.getBBox(),at={x:c,y:p},Rt=1,Kt=0,te=0,Ae=0,hr=this.get("itemMarginBottom");if(g==="horizontal"){var Tr=this.get("maxRow")||1,Dr=z+(Tr===1?0:hr);this.pageHeight=Dr*Tr,(0,b.S6)(_,function(Qr){var Tn=Qr.getBBox(),xi=L||Tn.width;(Kt&&Kt<at.x+xi+F||S<at.x+xi+F+st.width)&&(Rt===1&&(Kt=at.x+F,o.pageWidth=Kt,o.moveElementTo(Q,{x:S-F-st.width-st.minX,y:at.y+z/2-st.height/2-st.minY})),Rt+=1,at.x=c,at.y+=Dr),o.moveElementTo(Qr,at),Qr.getParent().setClip({type:"rect",attrs:{x:at.x,y:at.y,width:xi+F,height:z}}),at.x+=xi+F})}else{(0,b.S6)(_,function(Qr){var Tn=Qr.getBBox();Tn.width>te&&(te=Tn.width)}),Ae=te,te+=F,S&&(te=Math.min(S,te),Ae=Math.min(S,Ae)),this.pageWidth=te,this.pageHeight=I-Math.max(st.height,z+hr);var cn=Math.floor(this.pageHeight/(z+hr));(0,b.S6)(_,function(Qr,Tn){Tn!==0&&Tn%cn===0&&(Rt+=1,at.x+=te,at.y=p),o.moveElementTo(Qr,at),Qr.getParent().setClip({type:"rect",attrs:{x:at.x,y:at.y,width:te,height:z}}),at.y+=z+hr}),this.totalPagesCnt=Rt,this.moveElementTo(Q,{x:c+Ae/2-st.width/2-st.minX,y:I-st.height-st.minY})}this.pageHeight&&this.pageWidth&&i.getParent().setClip({type:"rect",attrs:{x:this.startX,y:this.startY,width:this.pageWidth,height:this.pageHeight}}),g==="horizontal"&&this.get("maxRow")?this.totalPagesCnt=Math.ceil(Rt/this.get("maxRow")):this.totalPagesCnt=Rt,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(Q),i.attr("matrix",this.getCurrentNavigationMatrix())},e.prototype.drawNavigation=function(t,i,o,c){var p={x:0,y:0},g=this.addGroup(t,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),_=(0,b.U2)(c.marker,"style",{}),S=_.size,I=S===void 0?12:S,L=(0,P._T)(_,["size"]),F=this.drawArrow(g,p,Uc,i==="horizontal"?"up":"left",I,L);F.on("click",this.onNavigationBack);var z=F.getBBox();p.x+=z.width+2;var V=this.addShape(g,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:(0,P.pi)({x:p.x,y:p.y+I/2,text:o,textBaseline:"middle"},(0,b.U2)(c.text,"style"))}),Q=V.getBBox();p.x+=Q.width+2;var st=this.drawArrow(g,p,Al,i==="horizontal"?"down":"right",I,L);return st.on("click",this.onNavigationAfter),g},e.prototype.updateNavigation=function(t){var i=(0,b.b$)({},Fs,this.get("pageNavigator")),o=i.marker.style,c=o.fill,p=o.opacity,g=o.inactiveFill,_=o.inactiveOpacity,S=this.currentPageIndex+"/"+this.totalPagesCnt,I=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),L=t?t.findById(this.getElementId(Uc)):this.getElementByLocalId(Uc),F=t?t.findById(this.getElementId(Al)):this.getElementByLocalId(Al);I.attr("text",S),L.attr("opacity",this.currentPageIndex===1?_:p),L.attr("fill",this.currentPageIndex===1?g:c),L.attr("cursor",this.currentPageIndex===1?"not-allowed":"pointer"),F.attr("opacity",this.currentPageIndex===this.totalPagesCnt?_:p),F.attr("fill",this.currentPageIndex===this.totalPagesCnt?g:c),F.attr("cursor",this.currentPageIndex===this.totalPagesCnt?"not-allowed":"pointer");var z=L.getBBox().maxX+2;I.attr("x",z),z+=I.getBBox().width+2,this.updateArrowPath(F,{x:z,y:0})},e.prototype.drawArrow=function(t,i,o,c,p,g){var _=i.x,S=i.y,I=this.addShape(t,{type:"path",id:this.getElementId(o),name:o,attrs:(0,P.pi)({size:p,direction:c,path:[["M",_+p/2,S],["L",_,S+p],["L",_+p,S+p],["Z"]],cursor:"pointer"},g)});return I.attr("matrix",wl({x:_+p/2,y:S+p/2},Co[c])),I},e.prototype.updateArrowPath=function(t,i){var o=i.x,c=i.y,p=t.attr(),g=p.size,_=p.direction,S=wl({x:o+g/2,y:c+g/2},Co[_]);t.attr("path",[["M",o+g/2,c],["L",o,c+g],["L",o+g,c+g],["Z"]]),t.attr("matrix",S)},e.prototype.getCurrentNavigationMatrix=function(){var t=this,i=t.currentPageIndex,o=t.pageWidth,c=t.pageHeight,p=this.get("layout"),g=p==="horizontal"?{x:0,y:c*(1-i)}:{x:o*(1-i),y:0};return Jc(g)},e.prototype.applyItemStates=function(t,i){var o=this.getItemStates(t),c=o.length>0;if(c){var p=i.getChildren(),g=this.get("itemStates");(0,b.S6)(p,function(_){var S=_.get("name"),I=S.split("-")[2],L=re(t,I,g);L&&(_.attr(L),I==="marker"&&!(_.get("isStroke")&&_.get("isFill"))&&(_.get("isStroke")&&_.attr("fill",null),_.get("isFill")&&_.attr("stroke",null)))})}},e.prototype.getLimitItemWidth=function(){var t=this.get("itemWidth"),i=this.get("maxItemWidth");return i?t&&(i=t<=i?t:i):t&&(i=t),i},e}(lc),nl=Fl,of=1.4,bh=.4,qf=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{type:"continue",min:0,max:100,value:null,colors:[],track:{},rail:{},label:{},handler:{},slidable:!0,tip:null,step:null,maxWidth:null,maxHeight:null,defaultCfg:{label:{align:"rail",spacing:5,formatter:null,style:{fontSize:12,fill:fa.textColor,textBaseline:"middle",fontFamily:fa.fontFamily}},handler:{size:10,style:{fill:"#fff",stroke:"#333"}},track:{},rail:{type:"color",size:20,defaultLength:100,style:{fill:"#DCDEE2"}},title:{spacing:5,style:{fill:fa.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}}}})},e.prototype.isSlider=function(){return!0},e.prototype.getValue=function(){return this.getCurrentValue()},e.prototype.getRange=function(){return{min:this.get("min"),max:this.get("max")}},e.prototype.setRange=function(t,i){this.update({min:t,max:i})},e.prototype.setValue=function(t){var i=this.getValue();this.set("value",t);var o=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(o),this.delegateEmit("valuechanged",{originValue:i,value:t})},e.prototype.initEvent=function(){var t=this.get("group");this.bindSliderEvent(t),this.bindRailEvent(t),this.bindTrackEvent(t)},e.prototype.drawLegendContent=function(t){this.drawRail(t),this.drawLabels(t),this.fixedElements(t),this.resetTrack(t),this.resetTrackClip(t),this.get("slidable")&&this.resetHandlers(t)},e.prototype.bindSliderEvent=function(t){this.bindHandlersEvent(t)},e.prototype.bindHandlersEvent=function(t){var i=this;t.on("legend-handler-min:drag",function(o){var c=i.getValueByCanvasPoint(o.x,o.y),p=i.getCurrentValue(),g=p[1];g<c&&(g=c),i.setValue([c,g])}),t.on("legend-handler-max:drag",function(o){var c=i.getValueByCanvasPoint(o.x,o.y),p=i.getCurrentValue(),g=p[0];g>c&&(g=c),i.setValue([g,c])})},e.prototype.bindRailEvent=function(t){},e.prototype.bindTrackEvent=function(t){var i=this,o=null;t.on("legend-track:dragstart",function(c){o={x:c.x,y:c.y}}),t.on("legend-track:drag",function(c){if(o){var p=i.getValueByCanvasPoint(o.x,o.y),g=i.getValueByCanvasPoint(c.x,c.y),_=i.getCurrentValue(),S=_[1]-_[0],I=i.getRange(),L=g-p;L<0?_[0]+L>I.min?i.setValue([_[0]+L,_[1]+L]):i.setValue([I.min,I.min+S]):L>0&&(L>0&&_[1]+L<I.max?i.setValue([_[0]+L,_[1]+L]):i.setValue([I.max-S,I.max])),o={x:c.x,y:c.y}}}),t.on("legend-track:dragend",function(c){o=null})},e.prototype.drawLabels=function(t){this.drawLabel("min",t),this.drawLabel("max",t)},e.prototype.drawLabel=function(t,i){var o=this.get("label"),c=o.style,p=o.align,g=o.formatter,_=this.get(t),S=this.getLabelAlignAttrs(t,p),I="label-"+t;this.addShape(i,{type:"text",id:this.getElementId(I),name:"legend-label-"+t,attrs:(0,P.pi)((0,P.pi)({x:0,y:0,text:(0,b.mf)(g)?g(_):_},c),S)})},e.prototype.getLabelAlignAttrs=function(t,i){var o=this.isVertical(),c="center",p="middle";return o?(c="start",i!=="rail"?t==="min"?p="top":p="bottom":p="top"):i!=="rail"?(p="top",t==="min"?c="start":c="end"):(c="start",p="middle"),{textAlign:c,textBaseline:p}},e.prototype.getRailPath=function(t,i,o,c){var p=this.get("rail"),g=p.size,_=p.defaultLength,S=p.type,I=this.isVertical(),L=_,F=o,z=c;F||(F=I?g:L),z||(z=I?L:g);var V=[];return S==="color"?(V.push(["M",t,i]),V.push(["L",t+F,i]),V.push(["L",t+F,i+z]),V.push(["L",t,i+z]),V.push(["Z"])):(V.push(["M",t+F,i]),V.push(["L",t+F,i+z]),V.push(["L",t,i+z]),V.push(["Z"])),V},e.prototype.drawRail=function(t){var i=this.get("rail"),o=i.style;this.addShape(t,{type:"path",id:this.getElementId("rail"),name:"legend-rail",attrs:(0,P.pi)({path:this.getRailPath(0,0)},o)})},e.prototype.getTrackColor=function(t){var i=t.length;if(!i)return null;if(i===1)return t[0];var o;this.isVertical()?o="l(90)":o="l(0)";for(var c=0;c<i;c++){var p=c/(i-1);o+=" "+p+":"+t[c]}return o},e.prototype.getTrackPath=function(t){var i=this.getRailShape(t),o=i.attr("path");return(0,b.d9)(o)},e.prototype.getClipTrackAttrs=function(t){var i=this.getCurrentValue(),o=i[0],c=i[1],p=this.getRailBBox(t),g=this.getPointByValue(o,t),_=this.getPointByValue(c,t),S=this.isVertical(),I,L,F,z;return S?(I=p.minX,L=g.y,F=p.width,z=_.y-g.y):(I=g.x,L=p.minY,F=_.x-g.x,z=p.height),{x:I,y:L,width:F,height:z}},e.prototype.getTrackAttrs=function(t){var i=this.get("track"),o=this.get("colors"),c=this.getTrackPath(t);return(0,b.CD)({path:c,fill:this.getTrackColor(o)},i.style)},e.prototype.resetTrackClip=function(t){var i=t||this.get("group"),o=this.getElementId("track"),c=i.findById(o),p=c.getClip(),g=this.getClipTrackAttrs(t);p?p.attr(g):c.setClip({type:"rect",attrs:g})},e.prototype.resetTrack=function(t){var i=this.getElementId("track"),o=t.findById(i),c=this.getTrackAttrs(t);o?o.attr(c):this.addShape(t,{type:"path",id:i,draggable:this.get("slidable"),name:"legend-track",attrs:c})},e.prototype.getPointByValue=function(t,i){var o=this.getRange(),c=o.min,p=o.max,g=(t-c)/(p-c),_=this.getRailBBox(i),S=this.isVertical(),I={x:0,y:0};return S?(I.x=_.minX+_.width/2,I.y=Os(_.minY,_.maxY,g)):(I.x=Os(_.minX,_.maxX,g),I.y=_.minY+_.height/2),I},e.prototype.getRailShape=function(t){var i=t||this.get("group");return i.findById(this.getElementId("rail"))},e.prototype.getRailBBox=function(t){var i=this.getRailShape(t),o=i.getBBox();return o},e.prototype.getRailCanvasBBox=function(){var t=this.get("group"),i=t.findById(this.getElementId("rail")),o=i.getCanvasBBox();return o},e.prototype.isVertical=function(){return this.get("layout")==="vertical"},e.prototype.getValueByCanvasPoint=function(t,i){var o=this.getRange(),c=o.min,p=o.max,g=this.getRailCanvasBBox(),_=this.isVertical(),S=this.get("step"),I;_?I=(i-g.minY)/g.height:I=(t-g.minX)/g.width;var L=Os(c,p,I);if(S){var F=Math.round((L-c)/S);L=c+F*S}return L>p&&(L=p),L<c&&(L=c),L},e.prototype.getCurrentValue=function(){var t=this.get("value");if(!t){var i=this.get("values");return i?[Math.max(Math.min.apply(Math,(0,P.pr)(i,[this.get("max")])),this.get("min")),Math.min(Math.max.apply(Math,(0,P.pr)(i,[this.get("min")])),this.get("max"))]:[this.get("min"),this.get("max")]}return t},e.prototype.resetHandlers=function(t){var i=this.getCurrentValue(),o=i[0],c=i[1];this.resetHandler(t,"min",o),this.resetHandler(t,"max",c)},e.prototype.getHandlerPath=function(t,i){var o=this.isVertical(),c=[],p=t.size,g=i.x,_=i.y,S=p*of,I=p/2,L=p/6;if(o){var F=g+S*bh;c.push(["M",g,_]),c.push(["L",F,_+I]),c.push(["L",g+S,_+I]),c.push(["L",g+S,_-I]),c.push(["L",F,_-I]),c.push(["Z"]),c.push(["M",F,_+L]),c.push(["L",g+S-2,_+L]),c.push(["M",F,_-L]),c.push(["L",g+S-2,_-L])}else{var z=_+S*bh;c.push(["M",g,_]),c.push(["L",g-I,z]),c.push(["L",g-I,_+S]),c.push(["L",g+I,_+S]),c.push(["L",g+I,z]),c.push(["Z"]),c.push(["M",g-L,z]),c.push(["L",g-L,_+S-2]),c.push(["M",g+L,z]),c.push(["L",g+L,_+S-2])}return c},e.prototype.resetHandler=function(t,i,o){var c=this.getPointByValue(o,t),p=this.get("handler"),g=this.getHandlerPath(p,c),_=this.getElementId("handler-"+i),S=t.findById(_),I=this.isVertical();S?S.attr("path",g):this.addShape(t,{type:"path",name:"legend-handler-"+i,draggable:!0,id:_,attrs:(0,P.pi)((0,P.pi)({path:g},p.style),{cursor:I?"ns-resize":"ew-resize"})})},e.prototype.fixedElements=function(t){var i=t.findById(this.getElementId("rail")),o=t.findById(this.getElementId("label-min")),c=t.findById(this.getElementId("label-max")),p=this.getDrawPoint();this.isVertical()?this.fixedVertail(o,c,i,p):this.fixedHorizontal(o,c,i,p)},e.prototype.fitRailLength=function(t,i,o,c){var p=this.isVertical(),g=p?"height":"width",_=this.get("label"),S=_.align,I=_.spacing,L=this.get("max"+(0,b.jC)(g));if(L){var F=S==="rail"?o[g]+t[g]+i[g]+I*2:o[g],z=F-L;z>0&&this.changeRailLength(c,g,o[g]-z)}},e.prototype.changeRailLength=function(t,i,o){var c=t.getBBox(),p;i==="height"?p=this.getRailPath(c.x,c.y,c.width,o):p=this.getRailPath(c.x,c.y,o,c.height),t.attr("path",p)},e.prototype.changeRailPosition=function(t,i,o){var c=t.getBBox(),p=this.getRailPath(i,o,c.width,c.height);t.attr("path",p)},e.prototype.fixedHorizontal=function(t,i,o,c){var p=this.get("label"),g=p.align,_=p.spacing,S=o.getBBox(),I=t.getBBox(),L=i.getBBox(),F=S.height;this.fitRailLength(I,L,S,o),S=o.getBBox(),g==="rail"?(t.attr({x:c.x,y:c.y+F/2}),this.changeRailPosition(o,c.x+I.width+_,c.y),i.attr({x:c.x+I.width+S.width+_*2,y:c.y+F/2})):g==="top"?(t.attr({x:c.x,y:c.y}),i.attr({x:c.x+S.width,y:c.y}),this.changeRailPosition(o,c.x,c.y+I.height+_)):(this.changeRailPosition(o,c.x,c.y),t.attr({x:c.x,y:c.y+S.height+_}),i.attr({x:c.x+S.width,y:c.y+S.height+_}))},e.prototype.fixedVertail=function(t,i,o,c){var p=this.get("label"),g=p.align,_=p.spacing,S=o.getBBox(),I=t.getBBox(),L=i.getBBox();if(this.fitRailLength(I,L,S,o),S=o.getBBox(),g==="rail")t.attr({x:c.x,y:c.y}),this.changeRailPosition(o,c.x,c.y+I.height+_),i.attr({x:c.x,y:c.y+I.height+S.height+_*2});else if(g==="right")t.attr({x:c.x+S.width+_,y:c.y}),this.changeRailPosition(o,c.x,c.y),i.attr({x:c.x+S.width+_,y:c.y+S.height});else{var F=Math.max(I.width,L.width);t.attr({x:c.x,y:c.y}),this.changeRailPosition(o,c.x+F+_,c.y),i.attr({x:c.x,y:c.y+S.height})}},e}(lc),$h=qf,Js="g2-tooltip",Rl="g2-tooltip-title",pl="g2-tooltip-list",wc="g2-tooltip-list-item",Of="g2-tooltip-marker",Dl="g2-tooltip-value",uu="g2-tooltip-name",Kf="g2-tooltip-crosshair-x",cc="g2-tooltip-crosshair-y",Sc,Fp=(Sc={},Sc[""+Js]={position:"absolute",visibility:"visible",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:fa.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},Sc[""+Rl]={marginBottom:"4px"},Sc[""+pl]={margin:"0px",listStyleType:"none",padding:"0px"},Sc[""+wc]={listStyleType:"none",marginBottom:"4px"},Sc[""+Of]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},Sc[""+Dl]={display:"inline-block",float:"right",marginLeft:"30px"},Sc[""+Kf]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Sc[""+cc]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Sc);function Jv(r,e,t,i,o){var c={left:r<o.x,right:r+t>o.x+o.width,top:e<o.y,bottom:e+i>o.y+o.height};return c}function t0(r,e,t,i,o,c){var p=r,g=e;switch(c){case"left":p=r-i-t,g=e-o/2;break;case"right":p=r+t,g=e-o/2;break;case"top":p=r-i/2,g=e-o-t;break;case"bottom":p=r-i/2,g=e+t;break;default:p=r+t,g=e-o-t;break}return{x:p,y:g}}function Eh(r,e,t,i,o,c,p){var g=t0(r,e,t,i,o,c);if(p){var _=Jv(g.x,g.y,i,o,p);c==="auto"?(_.right&&(g.x=Math.max(0,r-i-t)),_.top&&(g.y=Math.max(0,e-o-t))):c==="top"||c==="bottom"?(_.left&&(g.x=p.x),_.right&&(g.x=p.x+p.width-i),c==="top"&&_.top&&(g.y=e+t),c==="bottom"&&_.bottom&&(g.y=e-o-t)):(_.top&&(g.y=p.y),_.bottom&&(g.y=p.y+p.height-o),c==="left"&&_.left&&(g.x=r+t),c==="right"&&_.right&&(g.x=r-i-t))}return g}function _d(r,e){var t=!1;return(0,b.S6)(e,function(i){if((0,b.wH)(r,i))return t=!0,!1}),t}var fv=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"tooltip",type:"html",x:0,y:0,items:[],customContent:null,containerTpl:'<div class="'+Js+'"><div class="'+Rl+'"></div><ul class="'+pl+'"></ul></div>',itemTpl:'<li class="'+wc+`" data-index={index}>
|
|
<span class="`+Of+`" style="background:{color}"></span>
|
|
<span class="`+uu+`">{name}</span>:
|
|
<span class="`+Dl+`">{value}</span>
|
|
</li>`,xCrosshairTpl:'<div class="'+Kf+'"></div>',yCrosshairTpl:'<div class="'+cc+'"></div>',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:Js,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:Fp})},e.prototype.render=function(){this.get("customContent")?this.renderCustomContent():(this.resetTitle(),this.renderItems()),this.resetPosition()},e.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},e.prototype.show=function(){var t=this.getContainer();!t||this.destroyed||(this.set("visible",!0),(0,Y.Z)(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},e.prototype.hide=function(){var t=this.getContainer();!t||this.destroyed||(this.set("visible",!1),(0,Y.Z)(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},e.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},e.prototype.setCrossHairsVisible=function(t){var i=t?"":"none",o=this.get("xCrosshairDom"),c=this.get("yCrosshairDom");o&&(0,Y.Z)(o,{display:i}),c&&(0,Y.Z)(c,{display:i})},e.prototype.initContainer=function(){if(r.prototype.initContainer.call(this),this.get("customContent")){this.get("container")&&this.get("container").remove();var t=this.getHtmlContentNode();this.get("parent").appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()}},e.prototype.updateInner=function(t){this.get("customContent")?this.renderCustomContent():(_d(t,["title","showTitle"])&&this.resetTitle(),(0,b.wH)(t,"items")&&this.renderItems()),r.prototype.updateInner.call(this,t)},e.prototype.initDom=function(){this.cacheDoms()},e.prototype.removeDom=function(){r.prototype.removeDom.call(this),this.clearCrosshairs()},e.prototype.resetPosition=function(){var t=this.get("x"),i=this.get("y"),o=this.get("offset"),c=this.getOffset(),p=c.offsetX,g=c.offsetY,_=this.get("position"),S=this.get("region"),I=this.getContainer(),L=this.getBBox(),F=L.width,z=L.height,V;S&&(V=Hu(S));var Q=Eh(t,i,o,F,z,_,V);(0,Y.Z)(I,{left:Ws(Q.x+p),top:Ws(Q.y+g)}),this.resetCrosshairs()},e.prototype.renderCustomContent=function(){var t=this.getHtmlContentNode(),i=this.get("parent"),o=this.get("container");o&&o.parentNode===i?i.replaceChild(t,o):i.appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()},e.prototype.getHtmlContentNode=function(){var t,i=this.get("customContent");if(i){var o=i(this.get("title"),this.get("items"));(0,b.kK)(o)?t=o:t=(0,St.Z)(o)}return t},e.prototype.cacheDoms=function(){var t=this.getContainer(),i=t.getElementsByClassName(Rl)[0],o=t.getElementsByClassName(pl)[0];this.set("titleDom",i),this.set("listDom",o)},e.prototype.resetTitle=function(){var t=this.get("title"),i=this.get("showTitle");i&&t?this.setTitle(t):this.setTitle("")},e.prototype.setTitle=function(t){var i=this.get("titleDom");i&&(i.innerText=t)},e.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),i=this.get("crosshairs");if(!t||!i)this.clearCrosshairs();else{var o=Hu(t),c=this.get("xCrosshairDom"),p=this.get("yCrosshairDom");i==="x"?(this.resetCrosshair("x",o),p&&(p.remove(),this.set("yCrosshairDom",null))):i==="y"?(this.resetCrosshair("y",o),c&&(c.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",o),this.resetCrosshair("y",o)),this.setCrossHairsVisible(this.get("visible"))}},e.prototype.resetCrosshair=function(t,i){var o=this.checkCrosshair(t),c=this.get(t);t==="x"?(0,Y.Z)(o,{left:Ws(c),top:Ws(i.y),height:Ws(i.height)}):(0,Y.Z)(o,{top:Ws(c),left:Ws(i.x),width:Ws(i.width)})},e.prototype.checkCrosshair=function(t){var i=t+"CrosshairDom",o=t+"CrosshairTpl",c="CROSSHAIR_"+t.toUpperCase(),p=pt[c],g=this.get(i),_=this.get("parent");return g||(g=(0,St.Z)(this.get(o)),this.applyStyle(p,g),_.appendChild(g),this.set(i,g)),g},e.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),i=this.get("itemTpl"),o=this.get("listDom");o&&((0,b.S6)(t,function(c){var p=wa.toCSSGradient(c.color),g=(0,P.pi)((0,P.pi)({},c),{color:p}),_=(0,b.ng)(i,g),S=(0,St.Z)(_);o.appendChild(S)}),this.applyChildrenStyles(o,this.get("domStyles")))},e.prototype.clearItemDoms=function(){this.get("listDom")&&yc(this.get("listDom"))},e.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),i=this.get("yCrosshairDom");t&&t.remove(),i&&i.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},e}($),Rp=fv,Qf={opacity:0},Ff={stroke:"#C5C5C5",strokeOpacity:.85},wh={fill:"#CACED4",opacity:.85},xd=nt(34357);function bd(r){return(0,b.UI)(r,function(e,t){var i=t===0?"M":"L",o=e[0],c=e[1];return[i,o,c]})}function e0(r){return bd(r)}function fy(r){if(r.length<=2)return e0(r);var e=[];(0,b.S6)(r,function(p){(0,b.Xy)(p,e.slice(e.length-2))||e.push(p[0],p[1])});var t=(0,xd.e9)(e,!1),i=(0,b.YM)(r),o=i[0],c=i[1];return t.unshift(["M",o,c]),t}function hy(r,e,t,i){i===void 0&&(i=!0);var o=new Ur({values:r}),c=new $n({values:(0,b.UI)(r,function(g,_){return _})}),p=(0,b.UI)(r,function(g,_){return[c.scale(_)*e,t-o.scale(g)*t]});return i?fy(p):e0(p)}function j0(r,e){var t=new Ur({values:r}),i=t.max<0?t.max:Math.max(0,t.min);return e-t.scale(i)*e}function r0(r,e,t,i){var o=(0,P.pr)(r),c=j0(i,t);return o.push(["L",e,c]),o.push(["L",0,c]),o.push(["Z"]),o}var Og=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:Qf,lineStyle:Ff,areaStyle:wh})},e.prototype.renderInner=function(t){var i=this.cfg,o=i.width,c=i.height,p=i.data,g=i.smooth,_=i.isArea,S=i.backgroundStyle,I=i.lineStyle,L=i.areaStyle;this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,P.pi)({x:0,y:0,width:o,height:c},S)});var F=hy(p,o,c,g);if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:(0,P.pi)({path:F},I)}),_){var z=r0(F,o,c,p);this.addShape(t,{id:this.getElementId("area"),type:"path",attrs:(0,P.pi)({path:z},L)})}},e.prototype.applyOffset=function(){var t=this.cfg,i=t.x,o=t.y;this.moveElementTo(this.get("group"),{x:i,y:o})},e}(Ii),qh=null,W0={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},tu=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"handler",x:0,y:0,width:10,height:24,style:W0})},e.prototype.renderInner=function(t){var i=this.cfg,o=i.width,c=i.height,p=i.style,g=p.fill,_=p.stroke,S=p.radius,I=p.opacity,L=p.cursor;this.addShape(t,{type:"rect",id:this.getElementId("background"),attrs:{x:0,y:0,width:o,height:c,fill:g,stroke:_,radius:S,opacity:I,cursor:L}});var F=1/3*o,z=2/3*o,V=1/4*c,Q=3/4*c;this.addShape(t,{id:this.getElementId("line-left"),type:"line",attrs:{x1:F,y1:V,x2:F,y2:Q,stroke:_,cursor:L}}),this.addShape(t,{id:this.getElementId("line-right"),type:"line",attrs:{x1:z,y1:V,x2:z,y2:Q,stroke:_,cursor:L}})},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.bindEvents=function(){var t=this;this.get("group").on("mouseenter",function(){var i=t.get("style").highLightFill;t.getElementByLocalId("background").attr("fill",i),t.draw()}),this.get("group").on("mouseleave",function(){var i=t.get("style").fill;t.getElementByLocalId("background").attr("fill",i),t.draw()})},e.prototype.draw=function(){var t=this.get("container").get("canvas");t&&t.draw()},e}(Ii),hv=null,X0={fill:"#416180",opacity:.05},Dp={fill:"#5B8FF9",opacity:.15,cursor:"move"},Sh=10,Kh={width:Sh,height:24},pv={textBaseline:"middle",fill:"#000",opacity:.45},Bp="sliderchange",sf=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.onMouseDown=function(i){return function(o){t.currentTarget=i;var c=o.originalEvent;c.stopPropagation(),c.preventDefault(),t.prevX=(0,b.U2)(c,"touches.0.pageX",c.pageX),t.prevY=(0,b.U2)(c,"touches.0.pageY",c.pageY);var p=t.getContainerDOM();p.addEventListener("mousemove",t.onMouseMove),p.addEventListener("mouseup",t.onMouseUp),p.addEventListener("mouseleave",t.onMouseUp),p.addEventListener("touchmove",t.onMouseMove),p.addEventListener("touchend",t.onMouseUp),p.addEventListener("touchcancel",t.onMouseUp)}},t.onMouseMove=function(i){var o=t.cfg.width,c=[t.get("start"),t.get("end")];i.stopPropagation(),i.preventDefault();var p=(0,b.U2)(i,"touches.0.pageX",i.pageX),g=(0,b.U2)(i,"touches.0.pageY",i.pageY),_=p-t.prevX,S=t.adjustOffsetRange(_/o);t.updateStartEnd(S),t.updateUI(t.getElementByLocalId("foreground"),t.getElementByLocalId("minText"),t.getElementByLocalId("maxText")),t.prevX=p,t.prevY=g,t.draw(),t.emit(Bp,[t.get("start"),t.get("end")].sort()),t.delegateEmit("valuechanged",{originValue:c,value:[t.get("start"),t.get("end")]})},t.onMouseUp=function(){t.currentTarget&&(t.currentTarget=void 0);var i=t.getContainerDOM();i&&(i.removeEventListener("mousemove",t.onMouseMove),i.removeEventListener("mouseup",t.onMouseUp),i.removeEventListener("mouseleave",t.onMouseUp),i.removeEventListener("touchmove",t.onMouseMove),i.removeEventListener("touchend",t.onMouseUp),i.removeEventListener("touchcancel",t.onMouseUp))},t}return e.prototype.setRange=function(t,i){this.set("minLimit",t),this.set("maxLimit",i);var o=this.get("start"),c=this.get("end"),p=(0,b.uZ)(o,t,i),g=(0,b.uZ)(c,t,i);!this.get("isInit")&&(o!==p||c!==g)&&this.setValue([p,g])},e.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},e.prototype.setValue=function(t){var i=this.getRange();if((0,b.kJ)(t)&&t.length===2){var o=[this.get("start"),this.get("end")];this.update({start:(0,b.uZ)(t[0],i.min,i.max),end:(0,b.uZ)(t[1],i.min,i.max)}),this.get("updateAutoRender")||this.render(),this.delegateEmit("valuechanged",{originValue:o,value:t})}},e.prototype.getValue=function(){return[this.get("start"),this.get("end")]},e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:X0,foregroundStyle:Dp,handlerStyle:Kh,textStyle:pv}})},e.prototype.update=function(t){var i=t.start,o=t.end,c=(0,P.pi)({},t);(0,b.UM)(i)||(c.start=(0,b.uZ)(i,0,1)),(0,b.UM)(o)||(c.end=(0,b.uZ)(o,0,1)),r.prototype.update.call(this,c),this.minHandler=this.getChildComponentById(this.getElementId("minHandler")),this.maxHandler=this.getChildComponentById(this.getElementId("maxHandler")),this.trend=this.getChildComponentById(this.getElementId("trend"))},e.prototype.init=function(){this.set("start",(0,b.uZ)(this.get("start"),0,1)),this.set("end",(0,b.uZ)(this.get("end"),0,1)),r.prototype.init.call(this)},e.prototype.render=function(){r.prototype.render.call(this),this.updateUI(this.getElementByLocalId("foreground"),this.getElementByLocalId("minText"),this.getElementByLocalId("maxText"))},e.prototype.renderInner=function(t){var i=this.cfg,o=i.start,c=i.end,p=i.width,g=i.height,_=i.trendCfg,S=_===void 0?{}:_,I=i.minText,L=i.maxText,F=i.backgroundStyle,z=F===void 0?{}:F,V=i.foregroundStyle,Q=V===void 0?{}:V,st=i.textStyle,at=st===void 0?{}:st,Rt=(0,b.b$)({},W0,this.cfg.handlerStyle),Kt=o*p,te=c*p;(0,b.dp)((0,b.U2)(S,"data"))&&(this.trend=this.addComponent(t,(0,P.pi)({component:Og,id:this.getElementId("trend"),x:0,y:0,width:p,height:g},S))),this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,P.pi)({x:0,y:0,width:p,height:g},z)});var Ae=this.addShape(t,{id:this.getElementId("minText"),type:"text",attrs:(0,P.pi)({y:g/2,textAlign:"right",text:I,silent:!1},at)}),hr=this.addShape(t,{id:this.getElementId("maxText"),type:"text",attrs:(0,P.pi)({y:g/2,textAlign:"left",text:L,silent:!1},at)}),Tr=this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:(0,P.pi)({y:0,height:g},Q)}),Dr=(0,b.U2)(Rt,"width",Sh),cn=(0,b.U2)(Rt,"height",24);this.minHandler=this.addComponent(t,{component:tu,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(g-cn)/2,width:Dr,height:cn,cursor:"ew-resize",style:Rt}),this.maxHandler=this.addComponent(t,{component:tu,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(g-cn)/2,width:Dr,height:cn,cursor:"ew-resize",style:Rt})},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.updateUI=function(t,i,o){var c=this.cfg,p=c.start,g=c.end,_=c.width,S=c.minText,I=c.maxText,L=c.handlerStyle,F=c.height,z=p*_,V=g*_;this.trend&&(this.trend.update({width:_,height:F}),this.get("updateAutoRender")||this.trend.render()),t.attr("x",z),t.attr("width",V-z);var Q=(0,b.U2)(L,"width",Sh);i.attr("text",S),o.attr("text",I);var st=this._dodgeText([z,V],i,o),at=st[0],Rt=st[1];this.minHandler&&(this.minHandler.update({x:z-Q/2}),this.get("updateAutoRender")||this.minHandler.render()),(0,b.S6)(at,function(Kt,te){return i.attr(te,Kt)}),this.maxHandler&&(this.maxHandler.update({x:V-Q/2}),this.get("updateAutoRender")||this.maxHandler.render()),(0,b.S6)(Rt,function(Kt,te){return o.attr(te,Kt)})},e.prototype.bindEvents=function(){var t=this.get("group");t.on("handler-min:mousedown",this.onMouseDown("minHandler")),t.on("handler-min:touchstart",this.onMouseDown("minHandler")),t.on("handler-max:mousedown",this.onMouseDown("maxHandler")),t.on("handler-max:touchstart",this.onMouseDown("maxHandler"));var i=t.findById(this.getElementId("foreground"));i.on("mousedown",this.onMouseDown("foreground")),i.on("touchstart",this.onMouseDown("foreground"))},e.prototype.adjustOffsetRange=function(t){var i=this.cfg,o=i.start,c=i.end;switch(this.currentTarget){case"minHandler":{var p=0-o,g=1-o;return Math.min(g,Math.max(p,t))}case"maxHandler":{var p=0-c,g=1-c;return Math.min(g,Math.max(p,t))}case"foreground":{var p=0-o,g=1-c;return Math.min(g,Math.max(p,t))}}},e.prototype.updateStartEnd=function(t){var i=this.cfg,o=i.start,c=i.end;switch(this.currentTarget){case"minHandler":o+=t;break;case"maxHandler":c+=t;break;case"foreground":o+=t,c+=t;break}this.set("start",o),this.set("end",c)},e.prototype._dodgeText=function(t,i,o){var c,p,g=this.cfg,_=g.handlerStyle,S=g.width,I=2,L=(0,b.U2)(_,"width",Sh),F=t[0],z=t[1],V=!1;F>z&&(c=[z,F],F=c[0],z=c[1],p=[o,i],i=p[0],o=p[1],V=!0);var Q=i.getBBox(),st=o.getBBox(),at=Q.width>F-I?{x:F+L/2+I,textAlign:"left"}:{x:F-L/2-I,textAlign:"right"},Rt=st.width>S-z-I?{x:z-L/2-I,textAlign:"right"}:{x:z+L/2+I,textAlign:"left"};return V?[Rt,at]:[at,Rt]},e.prototype.draw=function(){var t=this.get("container"),i=t&&t.get("canvas");i&&i.draw()},e.prototype.getContainerDOM=function(){var t=this.get("container"),i=t&&t.get("canvas");return i&&i.get("container")},e}(Ii),Np=null;function uf(r,e,t){if(r){if(typeof r.addEventListener=="function")return r.addEventListener(e,t,!1),{remove:function(){r.removeEventListener(e,t,!1)}};if(typeof r.attachEvent=="function")return r.attachEvent("on"+e,t),{remove:function(){r.detachEvent("on"+e,t)}}}}var dv={trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},Rf={default:dv,hover:{thumbColor:"rgba(0,0,0,0.2)"}},Ch=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.clearEvents=b.ZT,t.onStartEvent=function(i){return function(o){t.isMobile=i,o.originalEvent.preventDefault();var c=i?(0,b.U2)(o.originalEvent,"touches.0.clientX"):o.clientX,p=i?(0,b.U2)(o.originalEvent,"touches.0.clientY"):o.clientY;t.startPos=t.cfg.isHorizontal?c:p,t.bindLaterEvent()}},t.bindLaterEvent=function(){var i=t.getContainerDOM(),o=[];t.isMobile?o=[uf(i,"touchmove",t.onMouseMove),uf(i,"touchend",t.onMouseUp),uf(i,"touchcancel",t.onMouseUp)]:o=[uf(i,"mousemove",t.onMouseMove),uf(i,"mouseup",t.onMouseUp),uf(i,"mouseleave",t.onMouseUp)],t.clearEvents=function(){o.forEach(function(c){c.remove()})}},t.onMouseMove=function(i){var o=t.cfg,c=o.isHorizontal,p=o.thumbOffset;i.preventDefault();var g=t.isMobile?(0,b.U2)(i,"touches.0.clientX"):i.clientX,_=t.isMobile?(0,b.U2)(i,"touches.0.clientY"):i.clientY,S=c?g:_,I=S-t.startPos;t.startPos=S,t.updateThumbOffset(p+I)},t.onMouseUp=function(i){i.preventDefault(),t.clearEvents()},t.onTrackClick=function(i){var o=t.cfg,c=o.isHorizontal,p=o.x,g=o.y,_=o.thumbLen,S=t.getContainerDOM(),I=S.getBoundingClientRect(),L=i.clientX,F=i.clientY,z=c?L-I.left-p-_/2:F-I.top-g-_/2,V=t.validateRange(z);t.updateThumbOffset(V)},t.onThumbMouseOver=function(){var i=t.cfg.theme.hover.thumbColor;t.getElementByLocalId("thumb").attr("stroke",i),t.draw()},t.onThumbMouseOut=function(){var i=t.cfg.theme.default.thumbColor;t.getElementByLocalId("thumb").attr("stroke",i),t.draw()},t}return e.prototype.setRange=function(t,i){this.set("minLimit",t),this.set("maxLimit",i);var o=this.getValue(),c=(0,b.uZ)(o,t,i);o!==c&&!this.get("isInit")&&this.setValue(c)},e.prototype.getRange=function(){var t=this.get("minLimit")||0,i=this.get("maxLimit")||1;return{min:t,max:i}},e.prototype.setValue=function(t){var i=this.getRange(),o=this.getValue();this.update({thumbOffset:(this.get("trackLen")-this.get("thumbLen"))*(0,b.uZ)(t,i.min,i.max)}),this.delegateEmit("valuechange",{originalValue:o,value:this.getValue()})},e.prototype.getValue=function(){return(0,b.uZ)(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,P.pi)((0,P.pi)({},t),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:Rf})},e.prototype.renderInner=function(t){this.renderTrackShape(t),this.renderThumbShape(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.renderTrackShape=function(t){var i=this.cfg,o=i.trackLen,c=i.theme,p=c===void 0?{default:{}}:c,g=(0,b.b$)({},Rf,p).default,_=g.lineCap,S=g.trackColor,I=g.size,L=(0,b.U2)(this.cfg,"size",I),F=this.get("isHorizontal")?{x1:0+L/2,y1:L/2,x2:o-L/2,y2:L/2,lineWidth:L,stroke:S,lineCap:_}:{x1:L/2,y1:0+L/2,x2:L/2,y2:o-L/2,lineWidth:L,stroke:S,lineCap:_};return this.addShape(t,{id:this.getElementId("track"),name:"track",type:"line",attrs:F})},e.prototype.renderThumbShape=function(t){var i=this.cfg,o=i.thumbOffset,c=i.thumbLen,p=i.theme,g=(0,b.b$)({},Rf,p).default,_=g.size,S=g.lineCap,I=g.thumbColor,L=(0,b.U2)(this.cfg,"size",_),F=this.get("isHorizontal")?{x1:o+L/2,y1:L/2,x2:o+c-L/2,y2:L/2,lineWidth:L,stroke:I,lineCap:S,cursor:"default"}:{x1:L/2,y1:o+L/2,x2:L/2,y2:o+c-L/2,lineWidth:L,stroke:I,lineCap:S,cursor:"default"};return this.addShape(t,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:F})},e.prototype.bindEvents=function(){var t=this.get("group");t.on("mousedown",this.onStartEvent(!1)),t.on("mouseup",this.onMouseUp),t.on("touchstart",this.onStartEvent(!0)),t.on("touchend",this.onMouseUp);var i=t.findById(this.getElementId("track"));i.on("click",this.onTrackClick);var o=t.findById(this.getElementId("thumb"));o.on("mouseover",this.onThumbMouseOver),o.on("mouseout",this.onThumbMouseOut)},e.prototype.getContainerDOM=function(){var t=this.get("container"),i=t&&t.get("canvas");return i&&i.get("container")},e.prototype.validateRange=function(t){var i=this.cfg,o=i.thumbLen,c=i.trackLen,p=t;return t+o>c?p=c-o:t+o<o&&(p=0),p},e.prototype.draw=function(){var t=this.get("container"),i=t&&t.get("canvas");i&&i.draw()},e.prototype.updateThumbOffset=function(t){var i=this.cfg,o=i.thumbOffset,c=i.isHorizontal,p=i.thumbLen,g=i.size,_=this.validateRange(t);if(_!==o){var S=this.getElementByLocalId("thumb");c?S.attr({x1:_+g/2,x2:_+p-g/2}):S.attr({y1:_+g/2,y2:_+p-g/2}),this.emitOffsetChange(_)}},e.prototype.emitOffsetChange=function(t){var i=this.cfg,o=i.thumbOffset,c=i.trackLen,p=i.thumbLen;this.cfg.thumbOffset=t,this.emit("scrollchange",{thumbOffset:t,ratio:(0,b.uZ)(t/(c-p),0,1)}),this.delegateEmit("valuechange",{originalValue:o,value:t})},e}(Ii),zp=Ta,vv=za,Up=uc,Zp=Pf,dl=nl,Ed=$h,Bl=Rp;function Vp(r){if((0,b.xb)(r))return null;var e=r[0].x,t=r[0].x,i=r[0].y,o=r[0].y;return(0,b.S6)(r,function(c){e=e>c.x?c.x:e,t=t<c.x?c.x:t,i=i>c.y?c.y:i,o=o<c.y?c.y:o}),{minX:e,maxX:t,minY:i,maxY:o,centerX:(e+t)/2,centerY:(i+o)/2}}function wd(r){return Array.from(new Set(r)).length===1}function Sd(r){return((0,b.VV)(r)+(0,b.Fp)(r))/2}function bs(r,e,t,i){return{x:r+t*Math.cos(i),y:e+t*Math.sin(i)}}function Cc(r,e,t,i,o,c){c===void 0&&(c=0);var p=bs(r,e,t,i),g=bs(r,e,t,o),_=bs(r,e,c,i),S=bs(r,e,c,o);if(o-i===Math.PI*2){var I=bs(r,e,t,i+Math.PI),L=bs(r,e,c,i+Math.PI),F=[["M",p.x,p.y],["A",t,t,0,1,1,I.x,I.y],["A",t,t,0,1,1,g.x,g.y],["M",_.x,_.y]];return c&&(F.push(["A",c,c,0,1,0,L.x,L.y]),F.push(["A",c,c,0,1,0,S.x,S.y])),F.push(["M",p.x,p.y]),F.push(["Z"]),F}var z=o-i<=Math.PI?0:1,V=[["M",p.x,p.y],["A",t,t,0,z,1,g.x,g.y],["L",S.x,S.y]];return c&&V.push(["A",c,c,0,z,0,_.x,_.y]),V.push(["L",p.x,p.y]),V.push(["Z"]),V}function gv(r,e,t,i,o){var c=bs(r,e,t,i),p=bs(r,e,t,o);if((0,b.vQ)(o-i,Math.PI*2)){var g=bs(r,e,t,i+Math.PI);return[["M",c.x,c.y],["A",t,t,0,1,1,g.x,g.y],["A",t,t,0,1,1,c.x,c.y],["A",t,t,0,1,0,g.x,g.y],["A",t,t,0,1,0,c.x,c.y],["Z"]]}var _=o-i<=Math.PI?0:1;return[["M",c.x,c.y],["A",t,t,0,_,1,p.x,p.y]]}function Jf(r,e){var t=r.points,i=Vp(t),o,c,p=e.startAngle,g=e.endAngle,_=g-p;return e.isTransposed?(o=i.maxY*_,c=i.minY*_):(o=i.maxX*_,c=i.minX*_),o+=p,c+=p,{startAngle:c,endAngle:o}}function Fg(r,e){if((0,b.hj)(r)&&(0,b.hj)(e))return[r,e];if(r=r,e=e,wd(r)||wd(e))return[Sd(r),Sd(e)];for(var t=-1,i=0,o=0,c,p=r.length-1,g,_=0;++t<r.length;)c=p,p=t,_+=g=r[c]*e[p]-r[p]*e[c],i+=(r[c]+r[p])*g,o+=(e[c]+e[p])*g;return _*=3,[i/_,o/_]}function Rg(r,e){var t=r.attr(),i=e.attr();return(0,b.S6)(t,function(o,c){i[c]===void 0&&(i[c]=void 0)}),i}function Gp(r,e,t){var i=Math.min(e,t),o=Math.max(e,t);return r>=i&&r<=o}function Ac(r,e,t){if((0,b.HD)(r))return r.padEnd(e,t);if((0,b.kJ)(r)){var i=r.length;if(i<e)for(var o=e-i,c=0;c<o;c++)r.push(t)}return r}function $l(r,e){return typeof r=="object"&&e.forEach(function(t){delete r[t]}),r}function lf(r,e,t){var i,o;e===void 0&&(e=[]),t===void 0&&(t=new Map);try{for(var c=(0,P.XA)(r),p=c.next();!p.done;p=c.next()){var g=p.value;t.has(g)||(e.push(g),t.set(g,!0))}}catch(_){i={error:_}}finally{try{p&&!p.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}return e}var Pu=function(){function r(e,t,i,o){e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0),o===void 0&&(o=0),this.x=e,this.y=t,this.height=o,this.width=i}return r.fromRange=function(e,t,i,o){return new r(e,t,i-e,o-t)},r.fromObject=function(e){return new r(e.minX,e.minY,e.width,e.height)},Object.defineProperty(r.prototype,"minX",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"maxX",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"minY",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"maxY",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"tl",{get:function(){return{x:this.x,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"tr",{get:function(){return{x:this.maxX,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"bl",{get:function(){return{x:this.x,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"br",{get:function(){return{x:this.maxX,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"top",{get:function(){return{x:this.x+this.width/2,y:this.minY}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"right",{get:function(){return{x:this.maxX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"bottom",{get:function(){return{x:this.x+this.width/2,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"left",{get:function(){return{x:this.minX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),r.prototype.isEqual=function(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height},r.prototype.contains=function(e){return e.minX>=this.minX&&e.maxX<=this.maxX&&e.minY>=this.minY&&e.maxY<=this.maxY},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.add=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.clone();return(0,b.S6)(e,function(o){i.x=Math.min(o.x,i.x),i.y=Math.min(o.y,i.y),i.width=Math.max(o.maxX,i.maxX)-i.x,i.height=Math.max(o.maxY,i.maxY)-i.y}),i},r.prototype.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.clone();return(0,b.S6)(e,function(o){i.x=Math.max(o.x,i.x),i.y=Math.max(o.y,i.y),i.width=Math.min(o.maxX,i.maxX)-i.x,i.height=Math.min(o.maxY,i.maxY)-i.y}),i},r.prototype.cut=function(e,t){var i=e.width,o=e.height;switch(t){case le.TOP:case le.TOP_LEFT:case le.TOP_RIGHT:return r.fromRange(this.minX,this.minY+o,this.maxX,this.maxY);case le.RIGHT:case le.RIGHT_TOP:case le.RIGHT_BOTTOM:return r.fromRange(this.minX,this.minY,this.maxX-i,this.maxY);case le.BOTTOM:case le.BOTTOM_LEFT:case le.BOTTOM_RIGHT:return r.fromRange(this.minX,this.minY,this.maxX,this.maxY-o);case le.LEFT:case le.LEFT_TOP:case le.LEFT_BOTTOM:return r.fromRange(this.minX+i,this.minY,this.maxX,this.maxY);default:return this}},r.prototype.shrink=function(e){var t=(0,P.CR)(e,4),i=t[0],o=t[1],c=t[2],p=t[3];return new r(this.x+p,this.y+i,this.width-p-o,this.height-i-c)},r.prototype.expand=function(e){var t=(0,P.CR)(e,4),i=t[0],o=t[1],c=t[2],p=t[3];return new r(this.x-p,this.y-i,this.width+p+o,this.height+i+c)},r.prototype.exceed=function(e){return[Math.max(-this.minY+e.minY,0),Math.max(this.maxX-e.maxX,0),Math.max(this.maxY-e.maxY,0),Math.max(-this.minX+e.minX,0)]},r.prototype.collide=function(e){return this.minX<e.maxX&&this.maxX>e.minX&&this.minY<e.maxY&&this.maxY>e.minY},r.prototype.size=function(){return this.width*this.height},r.prototype.isPointIn=function(e){return e.x>=this.minX&&e.x<=this.maxX&&e.y>=this.minY&&e.y<=this.maxY},r}(),Df=function(r,e){var t=e.start,i=e.end;return new Pu(r.x+r.width*t.x,r.y+r.height*t.y,r.width*Math.abs(i.x-t.x),r.height*Math.abs(i.y-t.y))};function Y0(r){return[[r.minX,r.minY],[r.maxX,r.minY],[r.maxX,r.maxY],[r.minX,r.maxY]]}function Ah(r){if(r.isPolar&&!r.isTransposed)return(r.endAngle-r.startAngle)*r.getRadius();var e=r.convert({x:0,y:0}),t=r.convert({x:1,y:0});return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function cf(r){if(r.isPolar){var e=r.startAngle,t=r.endAngle;return t-e===Math.PI*2}return!1}function th(r,e){var t=r.getCenter();return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Qh(r,e){var t=!1;if(r)if(r.type==="theta"){var i=r.start,o=r.end;t=Gp(e.x,i.x,o.x)&&Gp(e.y,i.y,o.y)}else{var c=r.invert(e);t=Gp(c.x,0,1)&&Gp(c.y,0,1)}return t}function fc(r,e){var t=r.getCenter();return Math.atan2(e.y-t.y,e.x-t.x)}function Cd(r,e){e===void 0&&(e=0);var t=r.start,i=r.end,o=r.getWidth(),c=r.getHeight();if(r.isPolar){var p=r.startAngle,g=r.endAngle,_=r.getCenter(),S=r.getRadius();return{type:"path",startState:{path:Cc(_.x,_.y,S+e,p,p)},endState:function(L){var F=(g-p)*L+p,z=Cc(_.x,_.y,S+e,p,F);return{path:z}},attrs:{path:Cc(_.x,_.y,S+e,p,g)}}}var I;return r.isTransposed?I={height:c+e*2}:I={width:o+e*2},{type:"rect",startState:{x:t.x-e,y:i.y-e,width:r.isTransposed?o+e*2:0,height:r.isTransposed?0:c+e*2},endState:I,attrs:{x:t.x-e,y:i.y-e,width:o+e*2,height:c+e*2}}}function Ad(r,e){e===void 0&&(e=0);var t=r.start,i=r.end,o=r.getWidth(),c=r.getHeight(),p=Math.min(t.x,i.x),g=Math.min(t.y,i.y);return Pu.fromRange(p-e,g-e,p+o+e,g+c+e)}var n0=/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]+)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/;function i0(r){var e="linear";return n0.test(r)?e="timeCat":(0,b.HD)(r)&&(e="cat"),e}function Vo(r,e,t,i){return e===void 0&&(e={}),e.type?e.type:r.type!=="identity"&&ge.includes(t)&&["interval"].includes(i)||r.isCategory?"cat":r.type}function Th(r,e,t){var i=e||[];if((0,b.hj)(r)||(0,b.UM)((0,b.Wx)(i,r))&&(0,b.xb)(t)){var o=Vu("identity");return new o({field:r.toString(),values:[r]})}var c=(0,b.I)(i,r),p=(0,b.U2)(t,"type",i0(c[0])),g=Vu(p);return new g((0,P.pi)({field:r,values:c},t))}function _u(r,e){if(r.type!=="identity"&&e.type!=="identity"){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);r.change(t)}}function vl(r){return r.alias||r.field}function Td(r,e,t){var i=r.values,o=i.length,c;if(o===1)c=[.5,1];else{var p=1,g=0;cf(e)?e.isTransposed?(p=(0,b.U2)(t,"widthRatio.multiplePie",1/1.3),g=1/o*p,c=[g/2,1-g/2]):c=[0,1-1/o]:(g=1/o/2,c=[g,1-g])}return c}function mv(r){var e=r.values.filter(function(t){return!(0,b.UM)(t)&&!isNaN(t)});return Math.max.apply(Math,(0,P.ev)((0,P.ev)([],(0,P.CR)(e),!1),[(0,b.UM)(r.max)?-1/0:r.max],!1))}function a0(r){var e,t;switch(r){case le.TOP:e={x:0,y:1},t={x:1,y:1};break;case le.RIGHT:e={x:1,y:0},t={x:1,y:1};break;case le.BOTTOM:e={x:0,y:0},t={x:1,y:0};break;case le.LEFT:e={x:0,y:0},t={x:0,y:1};break;default:e=t={x:0,y:0}}return{start:e,end:t}}function o0(r){var e,t;return r.isTransposed?(e={x:0,y:0},t={x:1,y:0}):(e={x:0,y:0},t={x:0,y:1}),{start:e,end:t}}function yv(r,e){var t={start:{x:0,y:0},end:{x:0,y:0}};r.isRect?t=a0(e):r.isPolar&&(t=o0(r));var i=t.start,o=t.end;return{start:r.convert(i),end:r.convert(o)}}function eh(r,e){if(r.isRect)return r.isTransposed?[DIRECTION.RIGHT,DIRECTION.BOTTOM].includes(e)?1:-1:[DIRECTION.BOTTOM,DIRECTION.RIGHT].includes(e)?-1:1;if(r.isPolar){var t=r.x.start;return t<0?-1:1}return 1}function ai(r){var e=r.start,t=r.end;return e.x===t.x}function Md(r,e){var t=r.start,i=r.end,o=ai(r);return o?(t.y-i.y)*(e.x-t.x)>0?1:-1:(i.x-t.x)*(t.y-e.y)>0?-1:1}function Jh(r,e){var t=(0,b.U2)(r,["components","axis"],{});return(0,b.b$)({},(0,b.U2)(t,["common"],{}),(0,b.b$)({},(0,b.U2)(t,[e],{})))}function xu(r,e,t){var i=(0,b.U2)(r,["components","axis"],{});return(0,b.b$)({},(0,b.U2)(i,["common","title"],{}),(0,b.b$)({},(0,b.U2)(i,[e,"title"],{})),t)}function ff(r){var e=r.x,t=r.y,i=r.circleCenter,o=t.start>t.end,c=r.isTransposed?r.convert({x:o?0:1,y:0}):r.convert({x:0,y:o?0:1}),p=[c.x-i.x,c.y-i.y],g=[1,0],_=c.y>i.y?Qi.EU(p,g):Qi.EU(p,g)*-1,S=_+(e.end-e.start),I=Math.sqrt(Math.pow(c.x-i.x,2)+Math.pow(c.y-i.y,2));return{center:i,radius:I,startAngle:_,endAngle:S}}function Tc(r,e){return(0,b.jn)(r)?r===!1?!1:{}:(0,b.U2)(r,[e])}function Qo(r,e){return(0,b.U2)(r,"position",e)}function hf(r,e){return(0,b.U2)(e,["title","text"],vl(r))}var il=function(){function r(e,t){this.destroyed=!1,this.facets=[],this.view=e,this.cfg=(0,b.b$)({},this.getDefaultCfg(),t)}return r.prototype.init=function(){this.container||(this.container=this.createContainer());var e=this.view.getData();this.facets=this.generateFacets(e)},r.prototype.render=function(){this.renderViews()},r.prototype.update=function(){},r.prototype.clear=function(){this.clearFacetViews()},r.prototype.destroy=function(){this.clear(),this.container&&(this.container.remove(!0),this.container=void 0),this.destroyed=!0,this.view=void 0,this.facets=[]},r.prototype.facetToView=function(e){var t=e.region,i=e.data,o=e.padding,c=o===void 0?this.cfg.padding:o,p=this.view.createView({region:t,padding:c});p.data(i||[]),e.view=p,this.beforeEachView(p,e);var g=this.cfg.eachView;return g&&g(p,e),this.afterEachView(p,e),p},r.prototype.createContainer=function(){var e=this.view.getLayer(W.FORE);return e.addGroup()},r.prototype.renderViews=function(){this.createFacetViews()},r.prototype.createFacetViews=function(){var e=this;return this.facets.map(function(t){return e.facetToView(t)})},r.prototype.clearFacetViews=function(){var e=this;(0,b.S6)(this.facets,function(t){t.view&&(e.view.removeView(t.view),t.view=void 0)})},r.prototype.parseSpacing=function(){var e=this.view.viewBBox,t=e.width,i=e.height,o=this.cfg.spacing;return o.map(function(c,p){return(0,b.hj)(c)?c/(p===0?t:i):parseFloat(c)/100})},r.prototype.getFieldValues=function(e,t){var i=[],o={};return(0,b.S6)(e,function(c){var p=c[t];!(0,b.UM)(p)&&!o[p]&&(i.push(p),o[p]=!0)}),i},r.prototype.getRegion=function(e,t,i,o){var c=(0,P.CR)(this.parseSpacing(),2),p=c[0],g=c[1],_=(1+p)/(t===0?1:t)-p,S=(1+g)/(e===0?1:e)-g,I={x:(_+p)*i,y:(S+g)*o},L={x:I.x+_,y:I.y+S};return{start:I,end:L}},r.prototype.getDefaultCfg=function(){return{eachView:void 0,showTitle:!0,spacing:[0,0],padding:10,fields:[]}},r.prototype.getDefaultTitleCfg=function(){var e=this.view.getTheme().fontFamily;return{style:{fontSize:14,fill:"#666",fontFamily:e}}},r.prototype.processAxis=function(e,t){var i=e.getOptions(),o=i.coordinate,c=e.geometries,p=(0,b.U2)(o,"type","rect");if(p==="rect"&&c.length){(0,b.UM)(i.axes)&&(i.axes={});var g=i.axes,_=(0,P.CR)(c[0].getXYFields(),2),S=_[0],I=_[1],L=Tc(g,S),F=Tc(g,I);L!==!1&&(i.axes[S]=this.getXAxisOption(S,g,L,t)),F!==!1&&(i.axes[I]=this.getYAxisOption(I,g,F,t))}},r.prototype.getFacetDataFilter=function(e){return function(t){return(0,b.yW)(e,function(i){var o=i.field,c=i.value;return!(0,b.UM)(c)&&o?t[o]===c:!0})}},r}(),rh={},$0=function(r){return rh[(0,b.vl)(r)]},Hp=function(r,e){rh[(0,b.vl)(r)]=e},It=function(){function r(e,t){this.context=e,this.cfg=t,e.addAction(this)}return r.prototype.applyCfg=function(e){(0,b.f0)(this,e)},r.prototype.init=function(){this.applyCfg(this.cfg)},r.prototype.destroy=function(){this.context.removeAction(this),this.context=null},r}(),Pe=It,dr=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.execute=function(){this.callback&&this.callback(this.context)},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.callback=null},e}(Pe),sn=dr,Ln={};function un(r,e){var t=Ln[r],i=null;if(t){var o=t.ActionClass,c=t.cfg;i=new o(e,c),i.name=r,i.init()}return i}function bn(r){var e=Ln[r];return(0,b.U2)(e,"ActionClass")}function jr(r,e,t){Ln[r]={ActionClass:e,cfg:t}}function jn(r){delete Ln[r]}function Qn(r,e){var t=new sn(e);return t.callback=r,t.name="callback",t}function ri(r,e){var t=[];if(r.length){t.push(["M",r[0].x,r[0].y]);for(var i=1,o=r.length;i<o;i+=1){var c=r[i];t.push(["L",c.x,c.y])}e&&t.push(["Z"])}return t}function ni(r,e){for(var t=[r[0]],i=1,o=r.length;i<o;i=i+2){var c=e.convert({x:r[i],y:r[i+1]});t.push(c.x,c.y)}return t}function _i(r,e){var t=e.isTransposed,i=r[1],o=r[6],c=r[7],p=e.convert({x:o,y:c}),g=t?0:1;return["A",i,i,0,0,g,p.x,p.y]}function qn(r,e,t){var i=t.isTransposed,o=t.startAngle,c=t.endAngle,p=r[0].toLowerCase()==="a"?{x:r[6],y:r[7]}:{x:r[1],y:r[2]},g={x:e[1],y:e[2]},_=[],S=i?"y":"x",I=Math.abs(g[S]-p[S])*(c-o),L=g[S]>=p[S]?1:0,F=I>Math.PI?1:0,z=t.convert(g),V=th(t,z);if(V>=.5)if(I===Math.PI*2){var Q={x:(g.x+p.x)/2,y:(g.y+p.y)/2},st=t.convert(Q);_.push(["A",V,V,0,F,L,st.x,st.y]),_.push(["A",V,V,0,F,L,z.x,z.y])}else _.push(["A",V,V,0,F,L,z.x,z.y]);return _}function ii(r){(0,b.S6)(r,function(e,t){var i=e;if(i[0].toLowerCase()==="a"){var o=r[t-1],c=r[t+1];c&&c[0].toLowerCase()==="a"?o&&o[0].toLowerCase()==="l"&&(o[0]="M"):o&&o[0].toLowerCase()==="a"&&c&&c[0].toLowerCase()==="l"&&(c[0]="M")}})}var Gr=function(r,e,t,i){var o,c=[],p=!!i,g,_,S,I,L,F,z;if(p){o=(0,P.CR)(i,2),S=o[0],I=o[1];for(var V=0,Q=r.length;V<Q;V++){var st=r[V];S=Qi.VV([0,0],S,st),I=Qi.Fp([0,0],I,st)}}for(var V=0,at=r.length;V<at;V++){var st=r[V];if(V===0&&!t)z=st;else if(V===at-1&&!t)F=st,c.push(z),c.push(F);else{g=r[t?V?V-1:at-1:V-1],_=r[t?(V+1)%at:V+1];var Rt=[0,0];Rt=Qi.lu(Rt,_,g),Rt=Qi.bA(Rt,Rt,e);var Kt=Qi.TE(st,g),te=Qi.TE(st,_),Ae=Kt+te;Ae!==0&&(Kt/=Ae,te/=Ae);var hr=Qi.bA([0,0],Rt,-Kt),Tr=Qi.bA([0,0],Rt,te);F=Qi.IH([0,0],st,hr),L=Qi.IH([0,0],st,Tr),L=Qi.VV([0,0],L,Qi.Fp([0,0],_,st)),L=Qi.Fp([0,0],L,Qi.VV([0,0],_,st)),hr=Qi.lu([0,0],L,st),hr=Qi.bA([0,0],hr,-Kt/te),F=Qi.IH([0,0],st,hr),F=Qi.VV([0,0],F,Qi.Fp([0,0],g,st)),F=Qi.Fp([0,0],F,Qi.VV([0,0],g,st)),Tr=Qi.lu([0,0],st,F),Tr=Qi.bA([0,0],Tr,te/Kt),L=Qi.IH([0,0],st,Tr),p&&(F=Qi.Fp([0,0],F,S),F=Qi.VV([0,0],F,I),L=Qi.Fp([0,0],L,S),L=Qi.VV([0,0],L,I)),c.push(z),c.push(F),z=L}}return t&&c.push(c.shift()),c};function mn(r,e,t){for(var i=!!e,o=[],c=0,p=r.length;c<p;c+=2)o.push([r[c],r[c+1]]);for(var g=Gr(o,.4,i,t),_=o.length,S=[],I,L,F,c=0;c<_-1;c++)I=g[c*2],L=g[c*2+1],F=o[c+1],S.push(["C",I[0],I[1],L[0],L[1],F[0],F[1]]);return i&&(I=g[_],L=g[_+1],F=o[0],S.push(["C",I[0],I[1],L[0],L[1],F[0],F[1]])),S}function Vn(r,e){return ri(r,e)}function di(r,e,t){var i=[],o=r[0],c=null;if(r.length<=2)return Vn(r,e);for(var p=0,g=r.length;p<g;p++){var _=r[p];(!c||!(c.x===_.x&&c.y===_.y))&&(i.push(_.x),i.push(_.y),c=_)}var S=t||[[0,0],[1,1]],I=mn(i,e,S);return I.unshift(["M",o.x,o.y]),I}function Bn(r,e){var t=[];return(0,b.S6)(e,function(i){var o=i[0];switch(o.toLowerCase()){case"m":case"l":case"c":t.push(ni(i,r));break;case"a":t.push(_i(i,r));break;case"z":default:t.push(i);break}}),t}function hi(r,e){var t=[],i,o,c,p;return(0,b.S6)(e,function(g,_){var S=g[0];switch(S.toLowerCase()){case"m":case"c":case"q":t.push(ni(g,r));break;case"l":i=e[_-1],o=g,c=r.isTransposed,p=c?i[i.length-2]===o[1]:i[i.length-1]===o[2],p?t=t.concat(qn(i,o,r)):t.push(ni(g,r));break;case"a":t.push(_i(g,r));break;case"z":default:t.push(g);break}}),ii(t),t}function Li(r,e){var t=r.event,i=t.target;return En(i,e)}function la(r,e){var t=r.getCanvasBBox(),i=t.width,o=t.height;return i>0&&o>0&&(i>=e||o>=e)}function En(r,e){var t=r.getCanvasBBox();return la(r,e)?t:null}function Mn(r,e){var t=r.event.maskShapes;return t.map(function(i){return En(i,e)}).filter(function(i){return!!i})}function Xi(r,e){var t=r.event,i=t.target;return Si(i,e)}function Si(r,e){return la(r,e)?r.attr("path"):null}function Jn(r,e){var t=r.event.maskShapes;return t.map(function(i){return Si(i,e)})}function vi(r){var e=r.event,t,i=e.target;return i&&(t=i.get("element")),t}function pi(r){var e=r.event,t=e.target,i;return t&&(i=t.get("delegateObject")),i}function Ua(r){var e=r.event.gEvent;return!(e&&e.fromShape&&e.toShape&&e.fromShape.get("element")===e.toShape.get("element"))}function Ca(r){return r&&r.component&&r.component.isList()}function Ci(r){return r&&r.component&&r.component.isSlider()}function Pi(r){var e=r.event,t=e.target;return t&&(t==null?void 0:t.get("name"))==="mask"||ma(r)}function ma(r){var e;return((e=r.event.target)===null||e===void 0?void 0:e.get("name"))==="multi-mask"}function Ma(r,e){var t=r.event.target;if(ma(r))return lo(r,e);if(t.get("type")==="path"){var i=Xi(r,e);return i?Rs(r.view,i):void 0}var o=Li(r,e);return o?Ys(r.view,o):null}function lo(r,e){var t=r.event.target;if(t.get("type")==="path"){var i=Jn(r,e);return i.length>0?i.flatMap(function(c){return Rs(r.view,c)}):null}var o=Mn(r,e);return o.length>0?o.flatMap(function(c){return Ys(r.view,c)}):null}function Is(r,e,t){if(ma(r))return co(r,e,t);var i=Li(r,t);return i?ks(i,r,e):null}function ks(r,e,t){var i=e.view,o=To(i,t,{x:r.x,y:r.y}),c=To(i,t,{x:r.maxX,y:r.maxY}),p={minX:o.x,minY:o.y,maxX:c.x,maxY:c.y};return Ys(t,p)}function co(r,e,t){var i=Mn(r,t);return i.length>0?i.flatMap(function(o){return ks(o,r,e)}):null}function Go(r){var e=r.geometries,t=[];return(0,b.S6)(e,function(i){var o=i.elements;t=t.concat(o)}),r.views&&r.views.length&&(0,b.S6)(r.views,function(i){t=t.concat(Go(i))}),t}function Ts(r,e,t){var i=Go(r);return i.filter(function(o){return ns(o,e)===t})}function bu(r,e){var t=r.geometries,i=[];return(0,b.S6)(t,function(o){var c=o.getElementsBy(function(p){return p.hasState(e)});i=i.concat(c)}),i}function ns(r,e){var t=r.getModel(),i=t.data,o;return(0,b.kJ)(i)?o=i[0][e]:o=i[e],o}function Ou(r,e){return!(e.minX>r.maxX||e.maxX<r.minX||e.minY>r.maxY||e.maxY<r.minY)}function Ys(r,e){var t=Go(r),i=[];return(0,b.S6)(t,function(o){var c=o.shape,p=c.getCanvasBBox();Ou(e,p)&&i.push(o)}),i}function ju(r){var e=[];return(0,b.S6)(r,function(t){var i=t[0];if(i!=="A")for(var o=1;o<t.length;o=o+2)e.push([t[o],t[o+1]]);else{var c=t.length;e.push([t[c-2],t[c-1]])}}),e}function Rs(r,e){var t=Go(r),i=ju(e),o=t.filter(function(c){var p=c.shape,g;if(p.get("type")==="path")g=ju(p.attr("path"));else{var _=p.getCanvasBBox();g=Y0(_)}return(0,xd.Wq)(i,g)});return o}function Na(r){return r.getComponents().map(function(e){return e.component})}function eu(r,e){var t=e.x-r.x,i=e.y-r.y;return Math.sqrt(t*t+i*i)}function Ao(r,e){if(r.length<=2)return Vn(r,!1);var t=r[0],i=[];(0,b.S6)(r,function(c){i.push(c.x),i.push(c.y)});var o=mn(i,e,null);return o.unshift(["M",t.x,t.y]),o}function Fu(r,e){return r.x<=e.x&&r.maxX>=e.x&&r.y<=e.y&&r.maxY>e.y}function pa(r){var e=r.parent,t=null;return e&&(t=e.views.filter(function(i){return i!==r})),t}function fo(r,e){var t=r.getCoordinate();return t.invert(e)}function To(r,e,t){var i=fo(r,t);return e.getCoordinate().convert(i)}function Us(r,e,t,i){var o=!1;return(0,b.S6)(r,function(c){if(c[t]===e[t]&&c[i]===e[i])return o=!0,!1}),o}function ql(r,e){var t=r.getScaleByField(e);return!t&&r.views&&(0,b.S6)(r.views,function(i){if(t=ql(i,e),t)return!1}),t}var or=function(){function r(e){this.actions=[],this.event=null,this.cacheMap={},this.view=e}return r.prototype.cache=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===1)return this.cacheMap[e[0]];e.length===2&&(this.cacheMap[e[0]]=e[1])},r.prototype.getAction=function(e){return this.actions.find(function(t){return t.name===e})},r.prototype.addAction=function(e){this.actions.push(e)},r.prototype.removeAction=function(e){var t=this.actions,i=this.actions.indexOf(e);i>=0&&t.splice(i,1)},r.prototype.getCurrentPoint=function(){var e=this.event;if(e)if(e.target instanceof HTMLElement){var t=this.view.getCanvas(),i=t.getPointByClient(e.clientX,e.clientY);return i}else return{x:e.x,y:e.y};return null},r.prototype.getCurrentShape=function(){return(0,b.U2)(this.event,["gEvent","shape"])},r.prototype.isInPlot=function(){var e=this.getCurrentPoint();return e?this.view.isPointInPlot(e):!1},r.prototype.isInShape=function(e){var t=this.getCurrentShape();return t?t.get("name")===e:!1},r.prototype.isInComponent=function(e){var t=Na(this.view),i=this.getCurrentPoint();return i?!!t.find(function(o){var c=o.getBBox();return e?o.get("name")===e&&Fu(c,i):Fu(c,i)}):!1},r.prototype.destroy=function(){(0,b.S6)(this.actions.slice(),function(e){e.destroy()}),this.view=null,this.event=null,this.actions=null,this.cacheMap=null},r}(),fn=or,en=function(){function r(e,t){this.view=e,this.cfg=t}return r.prototype.init=function(){this.initEvents()},r.prototype.initEvents=function(){},r.prototype.clearEvents=function(){},r.prototype.destroy=function(){this.clearEvents()},r}(),ji=en;function ho(r,e,t){var i=r.split(":"),o=i[0],c=e.getAction(o)||un(o,e);if(!c)throw new Error("There is no action named ".concat(o));var p=i[1];return{action:c,methodName:p,arg:t}}function Je(r){var e=r.action,t=r.methodName,i=r.arg;if(e[t])e[t](i);else throw new Error("Action(".concat(e.name,") doesn't have a method called ").concat(t))}var Se={START:"start",SHOW_ENABLE:"showEnable",END:"end",ROLLBACK:"rollback",PROCESSING:"processing"},yr=function(r){(0,P.ZT)(e,r);function e(t,i){var o=r.call(this,t,i)||this;return o.callbackCaches={},o.emitCaches={},o.steps=i,o}return e.prototype.init=function(){this.initContext(),r.prototype.init.call(this)},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.steps=null,this.context&&(this.context.destroy(),this.context=null),this.callbackCaches=null,this.view=null},e.prototype.initEvents=function(){var t=this;(0,b.S6)(this.steps,function(i,o){(0,b.S6)(i,function(c){var p=t.getActionCallback(o,c);p&&t.bindEvent(c.trigger,p)})})},e.prototype.clearEvents=function(){var t=this;(0,b.S6)(this.steps,function(i,o){(0,b.S6)(i,function(c){var p=t.getActionCallback(o,c);p&&t.offEvent(c.trigger,p)})})},e.prototype.initContext=function(){var t=this.view,i=new fn(t);this.context=i;var o=this.steps;(0,b.S6)(o,function(c){(0,b.S6)(c,function(p){if((0,b.mf)(p.action))p.actionObject={action:Qn(p.action,i),methodName:"execute"};else if((0,b.HD)(p.action))p.actionObject=ho(p.action,i,p.arg);else if((0,b.kJ)(p.action)){var g=p.action,_=(0,b.kJ)(p.arg)?p.arg:[p.arg];p.actionObject=[],(0,b.S6)(g,function(S,I){p.actionObject.push(ho(S,i,_[I]))})}})})},e.prototype.isAllowStep=function(t){var i=this.currentStepName,o=this.steps;if(i===t||t===Se.SHOW_ENABLE)return!0;if(t===Se.PROCESSING)return i===Se.START;if(t===Se.START)return i!==Se.PROCESSING;if(t===Se.END)return i===Se.PROCESSING||i===Se.START;if(t===Se.ROLLBACK){if(o[Se.END])return i===Se.END;if(i===Se.START)return!0}return!1},e.prototype.isAllowExecute=function(t,i){if(this.isAllowStep(t)){var o=this.getKey(t,i);return i.once&&this.emitCaches[o]?!1:i.isEnable?i.isEnable(this.context):!0}return!1},e.prototype.enterStep=function(t){this.currentStepName=t,this.emitCaches={}},e.prototype.afterExecute=function(t,i){t!==Se.SHOW_ENABLE&&this.currentStepName!==t&&this.enterStep(t);var o=this.getKey(t,i);this.emitCaches[o]=!0},e.prototype.getKey=function(t,i){return t+i.trigger+i.action},e.prototype.getActionCallback=function(t,i){var o=this,c=this.context,p=this.callbackCaches,g=i.actionObject;if(i.action&&g){var _=this.getKey(t,i);if(!p[_]){var S=function(I){c.event=I,o.isAllowExecute(t,i)?((0,b.kJ)(g)?(0,b.S6)(g,function(L){c.event=I,Je(L)}):(c.event=I,Je(g)),o.afterExecute(t,i),i.callback&&(c.event=I,i.callback(c))):c.event=null};i.debounce?p[_]=(0,b.Ds)(S,i.debounce.wait,i.debounce.immediate):i.throttle?p[_]=(0,b.P2)(S,i.throttle.wait,{leading:i.throttle.leading,trailing:i.throttle.trailing}):p[_]=S}return p[_]}return null},e.prototype.bindEvent=function(t,i){var o=t.split(":");o[0]==="window"?window.addEventListener(o[1],i):o[0]==="document"?document.addEventListener(o[1],i):this.view.on(t,i)},e.prototype.offEvent=function(t,i){var o=t.split(":");o[0]==="window"?window.removeEventListener(o[1],i):o[0]==="document"?document.removeEventListener(o[1],i):this.view.off(t,i)},e}(ji),Lr=yr,qr={};function Ar(r){return qr[(0,b.vl)(r)]}function Ye(r,e){qr[(0,b.vl)(r)]=e}function Rr(r,e,t){var i=Ar(r);if(!i)return null;if((0,b.PO)(i)){var o=(0,b.CD)((0,b.d9)(i),t);return new Lr(e,o)}else{var c=i;return new c(e,t)}}function je(r){return{title:{autoRotate:!0,position:"center",spacing:r.axisTitleSpacing,style:{fill:r.axisTitleTextFillColor,fontSize:r.axisTitleTextFontSize,lineHeight:r.axisTitleTextLineHeight,textBaseline:"middle",fontFamily:r.fontFamily},iconStyle:{fill:r.axisDescriptionIconFillColor}},label:{autoRotate:!1,autoEllipsis:!1,autoHide:{type:"equidistance",cfg:{minGap:6}},offset:r.axisLabelOffset,style:{fill:r.axisLabelFillColor,fontSize:r.axisLabelFontSize,lineHeight:r.axisLabelLineHeight,fontFamily:r.fontFamily}},line:{style:{lineWidth:r.axisLineBorder,stroke:r.axisLineBorderColor}},grid:{line:{type:"line",style:{stroke:r.axisGridBorderColor,lineWidth:r.axisGridBorder,lineDash:r.axisGridLineDash}},alignTick:!0,animate:!0},tickLine:{style:{lineWidth:r.axisTickLineBorder,stroke:r.axisTickLineBorderColor},alignTick:!0,length:r.axisTickLineLength},subTickLine:null,animate:!0}}function mr(r){return{title:null,marker:{symbol:"circle",spacing:r.legendMarkerSpacing,style:{r:r.legendCircleMarkerSize,fill:r.legendMarkerColor}},itemName:{spacing:5,style:{fill:r.legendItemNameFillColor,fontFamily:r.fontFamily,fontSize:r.legendItemNameFontSize,lineHeight:r.legendItemNameLineHeight,fontWeight:r.legendItemNameFontWeight,textAlign:"start",textBaseline:"middle"}},itemStates:{active:{nameStyle:{opacity:.8}},unchecked:{nameStyle:{fill:"#D8D8D8"},markerStyle:{fill:"#D8D8D8",stroke:"#D8D8D8"}},inactive:{nameStyle:{fill:"#D8D8D8"},markerStyle:{opacity:.2}}},flipPage:!0,pageNavigator:{marker:{style:{size:r.legendPageNavigatorMarkerSize,inactiveFill:r.legendPageNavigatorMarkerInactiveFillColor,inactiveOpacity:r.legendPageNavigatorMarkerInactiveFillOpacity,fill:r.legendPageNavigatorMarkerFillColor,opacity:r.legendPageNavigatorMarkerFillOpacity}},text:{style:{fill:r.legendPageNavigatorTextFillColor,fontSize:r.legendPageNavigatorTextFontSize}}},animate:!1,maxItemWidth:200,itemSpacing:r.legendItemSpacing,itemMarginBottom:r.legendItemMarginBottom,padding:r.legendPadding}}function tr(r){var e,t={point:{default:{fill:r.pointFillColor,r:r.pointSize,stroke:r.pointBorderColor,lineWidth:r.pointBorder,fillOpacity:r.pointFillOpacity},active:{stroke:r.pointActiveBorderColor,lineWidth:r.pointActiveBorder},selected:{stroke:r.pointSelectedBorderColor,lineWidth:r.pointSelectedBorder},inactive:{fillOpacity:r.pointInactiveFillOpacity,strokeOpacity:r.pointInactiveBorderOpacity}},hollowPoint:{default:{fill:r.hollowPointFillColor,lineWidth:r.hollowPointBorder,stroke:r.hollowPointBorderColor,strokeOpacity:r.hollowPointBorderOpacity,r:r.hollowPointSize},active:{stroke:r.hollowPointActiveBorderColor,strokeOpacity:r.hollowPointActiveBorderOpacity},selected:{lineWidth:r.hollowPointSelectedBorder,stroke:r.hollowPointSelectedBorderColor,strokeOpacity:r.hollowPointSelectedBorderOpacity},inactive:{strokeOpacity:r.hollowPointInactiveBorderOpacity}},area:{default:{fill:r.areaFillColor,fillOpacity:r.areaFillOpacity,stroke:null},active:{fillOpacity:r.areaActiveFillOpacity},selected:{fillOpacity:r.areaSelectedFillOpacity},inactive:{fillOpacity:r.areaInactiveFillOpacity}},hollowArea:{default:{fill:null,stroke:r.hollowAreaBorderColor,lineWidth:r.hollowAreaBorder,strokeOpacity:r.hollowAreaBorderOpacity},active:{fill:null,lineWidth:r.hollowAreaActiveBorder},selected:{fill:null,lineWidth:r.hollowAreaSelectedBorder},inactive:{strokeOpacity:r.hollowAreaInactiveBorderOpacity}},interval:{default:{fill:r.intervalFillColor,fillOpacity:r.intervalFillOpacity},active:{stroke:r.intervalActiveBorderColor,lineWidth:r.intervalActiveBorder},selected:{stroke:r.intervalSelectedBorderColor,lineWidth:r.intervalSelectedBorder},inactive:{fillOpacity:r.intervalInactiveFillOpacity,strokeOpacity:r.intervalInactiveBorderOpacity}},hollowInterval:{default:{fill:r.hollowIntervalFillColor,stroke:r.hollowIntervalBorderColor,lineWidth:r.hollowIntervalBorder,strokeOpacity:r.hollowIntervalBorderOpacity},active:{stroke:r.hollowIntervalActiveBorderColor,lineWidth:r.hollowIntervalActiveBorder,strokeOpacity:r.hollowIntervalActiveBorderOpacity},selected:{stroke:r.hollowIntervalSelectedBorderColor,lineWidth:r.hollowIntervalSelectedBorder,strokeOpacity:r.hollowIntervalSelectedBorderOpacity},inactive:{stroke:r.hollowIntervalInactiveBorderColor,lineWidth:r.hollowIntervalInactiveBorder,strokeOpacity:r.hollowIntervalInactiveBorderOpacity}},line:{default:{stroke:r.lineBorderColor,lineWidth:r.lineBorder,strokeOpacity:r.lineBorderOpacity,fill:null,lineAppendWidth:10,lineCap:"round",lineJoin:"round"},active:{lineWidth:r.lineActiveBorder},selected:{lineWidth:r.lineSelectedBorder},inactive:{strokeOpacity:r.lineInactiveBorderOpacity}}},i=je(r),o=mr(r);return{background:r.backgroundColor,defaultColor:r.brandColor,subColor:r.subColor,semanticRed:r.paletteSemanticRed,semanticGreen:r.paletteSemanticGreen,padding:"auto",fontFamily:r.fontFamily,columnWidthRatio:1/2,maxColumnWidth:null,minColumnWidth:null,roseWidthRatio:.9999999,multiplePieWidthRatio:1/1.3,colors10:r.paletteQualitative10,colors20:r.paletteQualitative20,sequenceColors:r.paletteSequence,shapes:{point:["hollow-circle","hollow-square","hollow-bowtie","hollow-diamond","hollow-hexagon","hollow-triangle","hollow-triangle-down","circle","square","bowtie","diamond","hexagon","triangle","triangle-down","cross","tick","plus","hyphen","line"],line:["line","dash","dot","smooth"],area:["area","smooth","line","smooth-line"],interval:["rect","hollow-rect","line","tick"]},sizes:[1,10],geometries:{interval:{rect:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:function(c){var p=c.geometry.coordinate;if(p.isPolar&&p.isTransposed){var g=Jf(c.getModel(),p),_=g.startAngle,S=g.endAngle,I=(_+S)/2,L=7.5,F=L*Math.cos(I),z=L*Math.sin(I);return{matrix:no.vs(null,[["t",F,z]])}}return t.interval.selected}}},"hollow-rect":{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},line:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},tick:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},funnel:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}},pyramid:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}}},line:{line:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},dot:{default:{style:(0,P.pi)((0,P.pi)({},t.line.default),{lineCap:null,lineDash:[1,1]})},active:{style:(0,P.pi)((0,P.pi)({},t.line.active),{lineCap:null,lineDash:[1,1]})},inactive:{style:(0,P.pi)((0,P.pi)({},t.line.inactive),{lineCap:null,lineDash:[1,1]})},selected:{style:(0,P.pi)((0,P.pi)({},t.line.selected),{lineCap:null,lineDash:[1,1]})}},dash:{default:{style:(0,P.pi)((0,P.pi)({},t.line.default),{lineCap:null,lineDash:[5.5,1]})},active:{style:(0,P.pi)((0,P.pi)({},t.line.active),{lineCap:null,lineDash:[5.5,1]})},inactive:{style:(0,P.pi)((0,P.pi)({},t.line.inactive),{lineCap:null,lineDash:[5.5,1]})},selected:{style:(0,P.pi)((0,P.pi)({},t.line.selected),{lineCap:null,lineDash:[5.5,1]})}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vh:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hvh:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vhv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}}},polygon:{polygon:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}}},point:{circle:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},square:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},bowtie:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},diamond:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},hexagon:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},triangle:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},"triangle-down":{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},"hollow-circle":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-square":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-bowtie":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-diamond":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-hexagon":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-triangle":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-triangle-down":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},cross:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},tick:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},plus:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},hyphen:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},line:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}}},area:{area:{default:{style:t.area.default},active:{style:t.area.active},inactive:{style:t.area.inactive},selected:{style:t.area.selected}},smooth:{default:{style:t.area.default},active:{style:t.area.active},inactive:{style:t.area.inactive},selected:{style:t.area.selected}},line:{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}},"smooth-line":{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}}},schema:{candle:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},box:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}}},edge:{line:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vhv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},arc:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}}},violin:{violin:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hollow:{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}},"hollow-smooth":{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}}}},components:{axis:{common:i,top:{position:"top",grid:null,title:null,verticalLimitLength:1/2},bottom:{position:"bottom",grid:null,title:null,verticalLimitLength:1/2},left:{position:"left",title:null,line:null,tickLine:null,verticalLimitLength:1/3},right:{position:"right",title:null,line:null,tickLine:null,verticalLimitLength:1/3},circle:{title:null,grid:(0,b.b$)({},i.grid,{line:{type:"line"}})},radius:{title:null,grid:(0,b.b$)({},i.grid,{line:{type:"circle"}})}},legend:{common:o,right:{layout:"vertical",padding:r.legendVerticalPadding},left:{layout:"vertical",padding:r.legendVerticalPadding},top:{layout:"horizontal",padding:r.legendHorizontalPadding},bottom:{layout:"horizontal",padding:r.legendHorizontalPadding},continuous:{title:null,background:null,track:{},rail:{type:"color",size:r.sliderRailHeight,defaultLength:r.sliderRailWidth,style:{fill:r.sliderRailFillColor,stroke:r.sliderRailBorderColor,lineWidth:r.sliderRailBorder}},label:{align:"rail",spacing:4,formatter:null,style:{fill:r.sliderLabelTextFillColor,fontSize:r.sliderLabelTextFontSize,lineHeight:r.sliderLabelTextLineHeight,textBaseline:"middle",fontFamily:r.fontFamily}},handler:{size:r.sliderHandlerWidth,style:{fill:r.sliderHandlerFillColor,stroke:r.sliderHandlerBorderColor}},slidable:!0,padding:o.padding}},tooltip:{showContent:!0,follow:!0,showCrosshairs:!1,showMarkers:!0,shared:!1,enterable:!1,position:"auto",marker:{symbol:"circle",stroke:"#fff",shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0,0,0,0.09)",lineWidth:2,r:4},crosshairs:{line:{style:{stroke:r.tooltipCrosshairsBorderColor,lineWidth:r.tooltipCrosshairsBorder}},text:null,textBackground:{padding:2,style:{fill:"rgba(0, 0, 0, 0.25)",lineWidth:0,stroke:null}},follow:!1},domStyles:(e={},e["".concat(Js)]={position:"absolute",visibility:"hidden",zIndex:8,transition:"left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s",backgroundColor:r.tooltipContainerFillColor,opacity:r.tooltipContainerFillOpacity,boxShadow:r.tooltipContainerShadow,borderRadius:"".concat(r.tooltipContainerBorderRadius,"px"),color:r.tooltipTextFillColor,fontSize:"".concat(r.tooltipTextFontSize,"px"),fontFamily:r.fontFamily,lineHeight:"".concat(r.tooltipTextLineHeight,"px"),padding:"0 12px 0 12px"},e["".concat(Rl)]={marginBottom:"12px",marginTop:"12px"},e["".concat(pl)]={margin:0,listStyleType:"none",padding:0},e["".concat(wc)]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},e["".concat(Of)]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},e["".concat(Dl)]={display:"inline-block",float:"right",marginLeft:"30px"},e)},annotation:{arc:{style:{stroke:r.annotationArcBorderColor,lineWidth:r.annotationArcBorder},animate:!0},line:{style:{stroke:r.annotationLineBorderColor,lineDash:r.annotationLineDash,lineWidth:r.annotationLineBorder},text:{position:"start",autoRotate:!0,style:{fill:r.annotationTextFillColor,stroke:r.annotationTextBorderColor,lineWidth:r.annotationTextBorder,fontSize:r.annotationTextFontSize,textAlign:"start",fontFamily:r.fontFamily,textBaseline:"bottom"}},animate:!0},text:{style:{fill:r.annotationTextFillColor,stroke:r.annotationTextBorderColor,lineWidth:r.annotationTextBorder,fontSize:r.annotationTextFontSize,textBaseline:"middle",textAlign:"start",fontFamily:r.fontFamily},animate:!0},region:{top:!1,style:{lineWidth:r.annotationRegionBorder,stroke:r.annotationRegionBorderColor,fill:r.annotationRegionFillColor,fillOpacity:r.annotationRegionFillOpacity},animate:!0},image:{top:!1,animate:!0},dataMarker:{top:!0,point:{style:{r:3,stroke:r.brandColor,lineWidth:2}},line:{style:{stroke:r.annotationLineBorderColor,lineWidth:r.annotationLineBorder},length:r.annotationDataMarkerLineLength},text:{style:{textAlign:"start",fill:r.annotationTextFillColor,stroke:r.annotationTextBorderColor,lineWidth:r.annotationTextBorder,fontSize:r.annotationTextFontSize,fontFamily:r.fontFamily}},direction:"upward",autoAdjust:!0,animate:!0},dataRegion:{style:{region:{fill:r.annotationRegionFillColor,fillOpacity:r.annotationRegionFillOpacity},text:{textAlign:"center",textBaseline:"bottom",fill:r.annotationTextFillColor,stroke:r.annotationTextBorderColor,lineWidth:r.annotationTextBorder,fontSize:r.annotationTextFontSize,fontFamily:r.fontFamily}},animate:!0}},slider:{common:{padding:[8,8,8,8],backgroundStyle:{fill:r.cSliderBackgroundFillColor,opacity:r.cSliderBackgroundFillOpacity},foregroundStyle:{fill:r.cSliderForegroundFillColor,opacity:r.cSliderForegroundFillOpacity},handlerStyle:{width:r.cSliderHandlerWidth,height:r.cSliderHandlerHeight,fill:r.cSliderHandlerFillColor,opacity:r.cSliderHandlerFillOpacity,stroke:r.cSliderHandlerBorderColor,lineWidth:r.cSliderHandlerBorder,radius:r.cSliderHandlerBorderRadius,highLightFill:r.cSliderHandlerHighlightFillColor},textStyle:{fill:r.cSliderTextFillColor,opacity:r.cSliderTextFillOpacity,fontSize:r.cSliderTextFontSize,lineHeight:r.cSliderTextLineHeight,fontWeight:r.cSliderTextFontWeight,stroke:r.cSliderTextBorderColor,lineWidth:r.cSliderTextBorder}}},scrollbar:{common:{padding:[8,8,8,8]},default:{style:{trackColor:r.scrollbarTrackFillColor,thumbColor:r.scrollbarThumbFillColor}},hover:{style:{thumbColor:r.scrollbarThumbHighlightFillColor}}}},labels:{offset:12,style:{fill:r.labelFillColor,fontSize:r.labelFontSize,fontFamily:r.fontFamily,stroke:r.labelBorderColor,lineWidth:r.labelBorder},fillColorDark:r.labelFillColorDark,fillColorLight:r.labelFillColorLight,autoRotate:!0},innerLabels:{style:{fill:r.innerLabelFillColor,fontSize:r.innerLabelFontSize,fontFamily:r.fontFamily,stroke:r.innerLabelBorderColor,lineWidth:r.innerLabelBorder},autoRotate:!0},overflowLabels:{style:{fill:r.overflowLabelFillColor,fontSize:r.overflowLabelFontSize,fontFamily:r.fontFamily,stroke:r.overflowLabelBorderColor,lineWidth:r.overflowLabelBorder}},pieLabels:{labelHeight:14,offset:10,labelLine:{style:{lineWidth:r.labelLineBorder}},autoRotate:!0}}}var kr={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},Kr={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},Nn=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],ti=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],ci=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],Ai=function(r){r===void 0&&(r={});var e=r.paletteQualitative10,t=e===void 0?Nn:e,i=r.paletteQualitative20,o=i===void 0?ti:i,c=r.brandColor,p=c===void 0?t[0]:c,g={backgroundColor:"transparent",brandColor:p,subColor:"rgba(0,0,0,0.05)",paletteQualitative10:t,paletteQualitative20:o,paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",paletteSequence:ci,fontFamily:`"Segoe UI", Roboto, "Helvetica Neue", Arial,
|
|
"Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
|
|
"Noto Color Emoji"`,axisLineBorderColor:kr[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:kr[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:Kr[85],axisTickLineBorderColor:kr[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:kr[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:kr[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:kr[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:kr[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:p,legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:kr[65],legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",legendItemSpacing:24,legendItemMarginBottom:12,legendPadding:[8,8,8,8],legendHorizontalPadding:[8,0,8,0],legendVerticalPadding:[0,8,0,8],legendPageNavigatorMarkerSize:12,legendPageNavigatorMarkerInactiveFillColor:kr[100],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:kr[100],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:kr[45],legendPageNavigatorTextFontSize:12,sliderRailFillColor:kr[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:kr[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:kr[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:kr[25],annotationArcBorderColor:kr[15],annotationArcBorder:1,annotationLineBorderColor:kr[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:kr[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:kr[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:kr[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:kr[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:kr[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:Kr[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:kr[65],overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:Kr[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:kr[25],cSliderRailHieght:16,cSliderBackgroundFillColor:"#416180",cSliderBackgroundFillOpacity:.05,cSliderForegroundFillColor:"#5B8FF9",cSliderForegroundFillOpacity:.15,cSliderHandlerHeight:24,cSliderHandlerWidth:10,cSliderHandlerFillColor:"#F7F7F7",cSliderHandlerFillOpacity:1,cSliderHandlerHighlightFillColor:"#FFF",cSliderHandlerBorderColor:"#BFBFBF",cSliderHandlerBorder:1,cSliderHandlerBorderRadius:2,cSliderTextFillColor:"#000",cSliderTextFillOpacity:.45,cSliderTextFontSize:12,cSliderTextLineHeight:12,cSliderTextFontWeight:"normal",cSliderTextBorderColor:null,cSliderTextBorder:0,scrollbarTrackFillColor:"rgba(0,0,0,0)",scrollbarThumbFillColor:"rgba(0,0,0,0.15)",scrollbarThumbHighlightFillColor:"rgba(0,0,0,0.2)",pointFillColor:p,pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:Kr[100],pointBorderOpacity:1,pointActiveBorderColor:kr[100],pointSelectedBorder:2,pointSelectedBorderColor:kr[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:p,hollowPointBorderOpacity:.95,hollowPointFillColor:Kr[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:kr[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:kr[100],hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:p,lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:p,areaFillOpacity:.25,areaActiveFillColor:p,areaActiveFillOpacity:.5,areaSelectedFillColor:p,areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:p,hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:kr[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:kr[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:p,intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:kr[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:kr[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:p,hollowIntervalBorderOpacity:1,hollowIntervalFillColor:Kr[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:kr[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:kr[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3};return(0,P.pi)((0,P.pi)({},g),r)},gi=Ai();function zi(r){var e=r.styleSheet,t=e===void 0?{}:e,i=(0,P._T)(r,["styleSheet"]),o=Ai(t);return(0,b.b$)({},tr(o),i)}var Fi=zi({}),Ui={default:Fi};function Zi(r){return(0,b.U2)(Ui,(0,b.vl)(r),Ui.default)}function Wi(r,e){Ui[(0,b.vl)(r)]=zi(e)}function ba(r,e,t){var i=t.translate(r),o=t.translate(e);return(0,b.vQ)(i,o)}function Jo(r,e){var t=e.coordinate,i=e.getXScale(),o=i.range,c=o[o.length-1],p=o[0],g=t.invert(r),_=g.x;return t.isPolar&&_>(1+c)/2&&(_=p),i.translate(i.invert(_))}function Ru(r,e,t){var i=t.coordinate,o=t.getYScale(),c=o.field,p=i.invert(e),g=o.invert(p.y),_=(0,b.sE)(r,function(S){var I=S[Ge];return I[c][0]<=g&&I[c][1]>=g});return _||r[r.length-1]}var gs=(0,b.HP)(function(r){if(r.isCategory)return 1;for(var e=r.values,t=e.length,i=r.translate(e[0]),o=i,c=0;c<t;c++){var p=e[c],g=r.translate(p);g<i&&(i=g),g>o&&(o=g)}return(o-i)/(t-1)});function Do(r,e,t){var i=e.getAttribute("position"),o=i.getFields(),c=e.scales,p=(0,b.mf)(t)||!t?o[0]:t,g=c[p],_=g?g.getText(r[p]):r[p]||p;return(0,b.mf)(t)?t(_,r):_}function Bf(r){var e=(0,b.VO)(r.attributes);return(0,b.hX)(e,function(t){return(0,b.FX)(ge,t.type)})}function gl(r){var e,t,i=Bf(r),o;try{for(var c=(0,P.XA)(i),p=c.next();!p.done;p=c.next()){var g=p.value,_=g.getScale(g.type);if(_&&_.isLinear){var S=(0,b.U2)(r.scaleDefs,_.field),I=Vo(_,S,g.type,r.type);if(I!=="cat"){o=_;break}}}}catch(z){e={error:z}}finally{try{p&&!p.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}var L=r.getXScale(),F=r.getYScale();return o||F||L}function Zc(r,e){var t=e.field,i=r[t];if((0,b.kJ)(i)){var o=i.map(function(c){return e.getText(c)});return o.join("-")}return e.getText(i)}function Mc(r,e){var t,i=e.getGroupScales();if(i.length&&(t=i[0]),t){var o=t.field;return t.getText(r[o])}var c=gl(e);return vl(c)}function _v(r,e,t){if(e.length===0)return null;var i=t.type,o=t.getXScale(),c=t.getYScale(),p=o.field,g=c.field,_=null;if(i==="heatmap"||i==="point"){for(var S=t.coordinate,I=S.invert(r),L=o.invert(I.x),F=c.invert(I.y),z=1/0,V=0;V<e.length;V++){var Q=e[V],st=Q[Ge],at=Math.pow(st[p]-L,2)+Math.pow(st[g]-F,2);at<z&&(z=at,_=Q)}return _}var Rt=e[0],Kt=e[e.length-1],te=Jo(r,t),Ae=Rt[Ge][p],hr=Rt[Ge][g],Tr=Kt[Ge][p],Dr=c.isLinear&&(0,b.kJ)(hr);if((0,b.kJ)(Ae)){for(var V=0;V<e.length;V++){var cn=e[V],st=cn[Ge];if(o.translate(st[p][0])<=te&&o.translate(st[p][1])>=te)if(Dr)(0,b.kJ)(_)||(_=[]),_.push(cn);else{_=cn;break}}(0,b.kJ)(_)&&(_=Ru(_,r,t))}else{var Qr=void 0;if(!o.isLinear&&o.type!=="timeCat"){for(var V=0;V<e.length;V++){var cn=e[V],st=cn[Ge];if(ba(st[p],te,o))if(Dr)(0,b.kJ)(_)||(_=[]),_.push(cn);else{_=cn;break}else o.translate(st[p])<=te&&(Kt=cn,Qr=e[V+1])}(0,b.kJ)(_)&&(_=Ru(_,r,t))}else{if((te>o.translate(Tr)||te<o.translate(Ae))&&(te>o.max||te<o.min))return null;for(var Tn=0,xi=e.length-1,va=void 0;Tn<=xi;){va=Math.floor((Tn+xi)/2);var Aa=e[va][Ge][p];if(ba(Aa,te,o))return e[va];o.translate(Aa)<=o.translate(te)?(Tn=va+1,Kt=e[va],Qr=e[va+1]):(xi===0&&(Kt=e[0]),xi=va-1)}}Kt&&Qr&&Math.abs(o.translate(Kt[Ge][p])-te)>Math.abs(o.translate(Qr[Ge][p])-te)&&(Kt=Qr)}var ao=gs(t.getXScale());return!_&&Math.abs(o.translate(Kt[Ge][p])-te)<=ao/2&&(_=Kt),_}function Kl(r,e,t,i){var o,c;t===void 0&&(t=""),i===void 0&&(i=!1);var p=r[Ge],g=Do(p,e,t),_=e.tooltipOption,S=e.theme.defaultColor,I=[],L,F;function z(cn,Qr){if(i||!(0,b.UM)(Qr)&&Qr!==""){var Tn={title:g,data:p,mappingData:r,name:cn,value:Qr,color:r.color||S,marker:!0};I.push(Tn)}}if((0,b.Kn)(_)){var V=_.fields,Q=_.callback;if(Q){var st=V.map(function(cn){return r[Ge][cn]}),at=Q.apply(void 0,(0,P.ev)([],(0,P.CR)(st),!1)),Rt=(0,P.pi)({data:r[Ge],mappingData:r,title:g,color:r.color||S,marker:!0},at);I.push(Rt)}else{var Kt=e.scales;try{for(var te=(0,P.XA)(V),Ae=te.next();!Ae.done;Ae=te.next()){var hr=Ae.value;if(!(0,b.UM)(p[hr])){var Tr=Kt[hr];L=vl(Tr),F=Tr.getText(p[hr]),z(L,F)}}}catch(cn){o={error:cn}}finally{try{Ae&&!Ae.done&&(c=te.return)&&c.call(te)}finally{if(o)throw o.error}}}}else{var Dr=gl(e);F=Zc(p,Dr),L=Mc(p,e),z(L,F)}return I}function nh(r,e,t,i){var o,c,p=i.showNil,g=[],_=r.dataArray;if(!(0,b.xb)(_)){r.sort(_);try{for(var S=(0,P.XA)(_),I=S.next();!I.done;I=S.next()){var L=I.value,F=_v(e,L,r);if(F){var z=r.getElementId(F),V=r.elementsMap[z];if(r.type==="heatmap"||V.visible){var Q=Kl(F,r,t,p);Q.length&&g.push(Q)}}}}catch(st){o={error:st}}finally{try{I&&!I.done&&(c=S.return)&&c.call(S)}finally{if(o)throw o.error}}}return g}function jp(r,e,t,i){var o=i.showNil,c=[],p=r.container,g=p.getShape(e.x,e.y);if(g&&g.get("visible")&&g.get("origin")){var _=g.get("origin").mappingData,S=Kl(_,r,t,o);S.length&&c.push(S)}return c}function s0(r,e,t){var i,o,c=[],p=r.geometries,g=t.shared,_=t.title,S=t.reversed;try{for(var I=(0,P.XA)(p),L=I.next();!L.done;L=I.next()){var F=L.value;if(F.visible&&F.tooltipOption!==!1){var z=F.type,V=void 0;["point","edge","polygon"].includes(z)?V=jp(F,e,_,t):["area","line","path","heatmap"].includes(z)||g!==!1?V=nh(F,e,_,t):V=jp(F,e,_,t),V.length&&(S&&V.reverse(),c.push(V))}}}catch(Q){i={error:Q}}finally{try{L&&!L.done&&(o=I.return)&&o.call(I)}finally{if(i)throw i.error}}return c}function lu(r,e,t){var i,o,c=s0(r,e,t);try{for(var p=(0,P.XA)(r.views),g=p.next();!g.done;g=p.next()){var _=g.value;c=c.concat(s0(_,e,t))}}catch(S){i={error:S}}finally{try{g&&!g.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return c}function u0(r){return!(0,b.hj)(r)&&!(0,b.kJ)(r)}function ih(r){r===void 0&&(r=0);var e=(0,b.kJ)(r)?r:[r];switch(e.length){case 0:e=[0,0,0,0];break;case 1:e=new Array(4).fill(e[0]);break;case 2:e=(0,P.ev)((0,P.ev)([],(0,P.CR)(e),!1),(0,P.CR)(e),!1);break;case 3:e=(0,P.ev)((0,P.ev)([],(0,P.CR)(e),!1),[e[1]],!1);break;default:e=e.slice(0,4);break}return e}var Wp={};function Mh(r,e){Wp[r]=e}function py(r){delete Wp[r]}function Id(){return Object.keys(Wp)}function tp(r){return Wp[r]}var dy=function(){function r(e){this.option=this.wrapperOption(e)}return r.prototype.update=function(e){return this.option=this.wrapperOption(e),this},r.prototype.hasAction=function(e){var t=this.option.actions;return(0,b.G)(t,function(i){return i[0]===e})},r.prototype.create=function(e,t){var i=this.option,o=i.type,c=i.cfg,p=o==="theta",g=(0,P.pi)({start:e,end:t},c),_=Mf(p?"polar":o);return this.coordinate=new _(g),this.coordinate.type=o,p&&(this.hasAction("transpose")||this.transpose()),this.execActions(),this.coordinate},r.prototype.adjust=function(e,t){return this.coordinate.update({start:e,end:t}),this.coordinate.resetMatrix(),this.execActions(["scale","rotate","translate"]),this.coordinate},r.prototype.rotate=function(e){return this.option.actions.push(["rotate",e]),this},r.prototype.reflect=function(e){return this.option.actions.push(["reflect",e]),this},r.prototype.scale=function(e,t){return this.option.actions.push(["scale",e,t]),this},r.prototype.transpose=function(){return this.option.actions.push(["transpose"]),this},r.prototype.getOption=function(){return this.option},r.prototype.getCoordinate=function(){return this.coordinate},r.prototype.wrapperOption=function(e){return(0,P.pi)({type:"rect",actions:[],cfg:{}},e)},r.prototype.execActions=function(e){var t=this,i=this.option.actions;(0,b.S6)(i,function(o){var c,p=(0,P.CR)(o),g=p[0],_=p.slice(1),S=(0,b.UM)(e)?!0:e.includes(g);S&&(c=t.coordinate)[g].apply(c,(0,P.ev)([],(0,P.CR)(_),!1))})},r}(),vy=dy,d_=function(){function r(e,t,i){this.view=e,this.gEvent=t,this.data=i,this.type=t.type}return r.fromData=function(e,t,i){return new r(e,new me.Event(t,{}),i)},Object.defineProperty(r.prototype,"target",{get:function(){return this.gEvent.target},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"event",{get:function(){return this.gEvent.originalEvent},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"x",{get:function(){return this.gEvent.x},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"y",{get:function(){return this.gEvent.y},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"clientX",{get:function(){return this.gEvent.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"clientY",{get:function(){return this.gEvent.clientY},enumerable:!1,configurable:!0}),r.prototype.toString=function(){return"[Event (type=".concat(this.type,")]")},r.prototype.clone=function(){return new r(this.view,this.gEvent,this.data)},r}(),go=d_;function Xp(r){var e=r.getController("axis"),t=r.getController("legend"),i=r.getController("annotation"),o=r.getController("slider"),c=r.getController("scrollbar");[e,o,c,t,i].forEach(function(p){p&&p.layout()})}var gy=function(){function r(){this.scales=new Map,this.syncScales=new Map}return r.prototype.createScale=function(e,t,i,o){var c=i,p=this.getScaleMeta(o);if(t.length===0&&p){var g=p.scale,_={type:g.type};g.isCategory&&(_.values=g.values),c=(0,b.b$)(_,p.scaleDef,i)}var S=Th(e,t,c);return this.cacheScale(S,i,o),S},r.prototype.sync=function(e,t){var i=this;this.syncScales.forEach(function(o,c){var p=Number.MAX_SAFE_INTEGER,g=Number.MIN_SAFE_INTEGER,_=[];(0,b.S6)(o,function(S){var I=i.getScale(S);g=(0,b.hj)(I.max)?Math.max(g,I.max):g,p=(0,b.hj)(I.min)?Math.min(p,I.min):p,(0,b.S6)(I.values,function(L){_.includes(L)||_.push(L)})}),(0,b.S6)(o,function(S){var I=i.getScale(S);if(I.isContinuous)I.change({min:p,max:g,values:_});else if(I.isCategory){var L=I.range,F=i.getScaleMeta(S);_&&!(0,b.U2)(F,["scaleDef","range"])&&(L=Td((0,b.b$)({},I,{values:_}),e,t)),I.change({values:_,range:L})}})})},r.prototype.cacheScale=function(e,t,i){var o=this.getScaleMeta(i);o&&o.scale.type===e.type?(_u(o.scale,e),o.scaleDef=t):(o={key:i,scale:e,scaleDef:t},this.scales.set(i,o));var c=this.getSyncKey(o);if(o.syncKey=c,this.removeFromSyncScales(i),c){var p=this.syncScales.get(c);p||(p=[],this.syncScales.set(c,p)),p.push(i)}},r.prototype.getScale=function(e){var t=this.getScaleMeta(e);if(!t){var i=(0,b.Z$)(e.split("-")),o=this.syncScales.get(i);o&&o.length&&(t=this.getScaleMeta(o[0]))}return t&&t.scale},r.prototype.deleteScale=function(e){var t=this.getScaleMeta(e);if(t){var i=t.syncKey,o=this.syncScales.get(i);if(o&&o.length){var c=o.indexOf(e);c!==-1&&o.splice(c,1)}}this.scales.delete(e)},r.prototype.clear=function(){this.scales.clear(),this.syncScales.clear()},r.prototype.removeFromSyncScales=function(e){var t=this;this.syncScales.forEach(function(i,o){var c=i.indexOf(e);if(c!==-1)return i.splice(c,1),i.length===0&&t.syncScales.delete(o),!1})},r.prototype.getSyncKey=function(e){var t=e.scale,i=e.scaleDef,o=t.field,c=(0,b.U2)(i,["sync"]);return c===!0?o:c===!1?void 0:c},r.prototype.getScaleMeta=function(e){return this.scales.get(e)},r}(),f=function(){function r(e,t,i,o){e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0),o===void 0&&(o=0),this.top=e,this.right=t,this.bottom=i,this.left=o}return r.instance=function(e,t,i,o){return e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0),o===void 0&&(o=0),new r(e,t,i,o)},r.prototype.max=function(e){var t=(0,P.CR)(e,4),i=t[0],o=t[1],c=t[2],p=t[3];return this.top=Math.max(this.top,i),this.right=Math.max(this.right,o),this.bottom=Math.max(this.bottom,c),this.left=Math.max(this.left,p),this},r.prototype.shrink=function(e){var t=(0,P.CR)(e,4),i=t[0],o=t[1],c=t[2],p=t[3];return this.top+=i,this.right+=o,this.bottom+=c,this.left+=p,this},r.prototype.inc=function(e,t){var i=e.width,o=e.height;switch(t){case le.TOP:case le.TOP_LEFT:case le.TOP_RIGHT:this.top+=o;break;case le.RIGHT:case le.RIGHT_TOP:case le.RIGHT_BOTTOM:this.right+=i;break;case le.BOTTOM:case le.BOTTOM_LEFT:case le.BOTTOM_RIGHT:this.bottom+=o;break;case le.LEFT:case le.LEFT_TOP:case le.LEFT_BOTTOM:this.left+=i;break;default:break}return this},r.prototype.getPadding=function(){return[this.top,this.right,this.bottom,this.left]},r.prototype.clone=function(){return new(r.bind.apply(r,(0,P.ev)([void 0],(0,P.CR)(this.getPadding()),!1)))},r}();function d(r){var e=r.padding;if(!u0(e))return new(f.bind.apply(f,(0,P.ev)([void 0],(0,P.CR)(ih(e)),!1)));var t=r.viewBBox,i=new f,o=[],c=[],p=[];return(0,b.S6)(r.getComponents(),function(g){var _=g.type;_===be.AXIS?o.push(g):[be.LEGEND,be.SLIDER,be.SCROLLBAR].includes(_)?c.push(g):_!==be.GRID&&_!==be.TOOLTIP&&p.push(g)}),(0,b.S6)(o,function(g){var _=g.component,S=_.getLayoutBBox(),I=new Pu(S.x,S.y,S.width,S.height),L=I.exceed(t);i.max(L)}),(0,b.S6)(c,function(g){var _=g.component,S=g.direction,I=_.getLayoutBBox(),L=_.get("padding"),F=new Pu(I.x,I.y,I.width,I.height).expand(L);i.inc(F,S)}),(0,b.S6)(p,function(g){var _=g.component,S=g.direction,I=_.getLayoutBBox(),L=new Pu(I.x,I.y,I.width,I.height);i.inc(L,S)}),i}function y(r,e,t){var i=t.instance();e.forEach(function(o){o.autoPadding=i.max(o.autoPadding.getPadding())})}var T=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,{visible:t.visible})||this;i.views=[],i.geometries=[],i.controllers=[],i.interactions={},i.limitInPlot=!1,i.options={data:[],animate:!0},i.usedControllers=Id(),i.scalePool=new gy,i.layoutFunc=Xp,i.isPreMouseInPlot=!1,i.isDataChanged=!1,i.isCoordinateChanged=!1,i.createdScaleKeys=new Map,i.onCanvasEvent=function(Kt){var te=Kt.name;if(!te.includes(":")){var Ae=i.createViewEvent(Kt);i.doPlotEvent(Ae),i.emit(te,Ae)}},i.onDelegateEvents=function(Kt){var te=Kt.name;if(te.includes(":")){var Ae=i.createViewEvent(Kt);i.emit(te,Ae)}};var o=t.id,c=o===void 0?(0,b.EL)("view"):o,p=t.parent,g=t.canvas,_=t.backgroundGroup,S=t.middleGroup,I=t.foregroundGroup,L=t.region,F=L===void 0?{start:{x:0,y:0},end:{x:1,y:1}}:L,z=t.padding,V=t.appendPadding,Q=t.theme,st=t.options,at=t.limitInPlot,Rt=t.syncViewPadding;return i.parent=p,i.canvas=g,i.backgroundGroup=_,i.middleGroup=S,i.foregroundGroup=I,i.region=F,i.padding=z,i.appendPadding=V,i.options=(0,P.pi)((0,P.pi)({},i.options),st),i.limitInPlot=at,i.id=c,i.syncViewPadding=Rt,i.themeObject=(0,b.Kn)(Q)?(0,b.b$)({},Zi("default"),zi(Q)):Zi(Q),i.init(),i}return e.prototype.setLayout=function(t){this.layoutFunc=t},e.prototype.init=function(){this.calculateViewBBox(),this.initEvents(),this.initComponentController(),this.initOptions()},e.prototype.render=function(t,i){t===void 0&&(t=!1),this.emit(At.BEFORE_RENDER,go.fromData(this,At.BEFORE_RENDER,i)),this.paint(t),this.emit(At.AFTER_RENDER,go.fromData(this,At.AFTER_RENDER,i)),this.visible===!1&&this.changeVisible(!1)},e.prototype.clear=function(){var t=this;this.emit(At.BEFORE_CLEAR),this.filteredData=[],this.coordinateInstance=void 0,this.isDataChanged=!1,this.isCoordinateChanged=!1;for(var i=this.geometries,o=0;o<i.length;o++)i[o].clear(),i[o].container.remove(!0),i[o].labelsContainer.remove(!0);this.geometries=[];for(var c=this.controllers,o=0;o<c.length;o++)c[o].name==="annotation"?c[o].clear(!0):c[o].clear();this.createdScaleKeys.forEach(function(g,_){t.getRootView().scalePool.deleteScale(_)}),this.createdScaleKeys.clear();for(var p=this.views,o=0;o<p.length;o++)p[o].clear();this.emit(At.AFTER_CLEAR)},e.prototype.destroy=function(){this.emit(At.BEFORE_DESTROY);var t=this.interactions;(0,b.S6)(t,function(g){g&&g.destroy()}),this.clear();for(var i=this.controllers,o=0,c=i.length;o<c;o++){var p=i[o];p.destroy()}this.backgroundGroup.remove(!0),this.middleGroup.remove(!0),this.foregroundGroup.remove(!0),r.prototype.destroy.call(this)},e.prototype.changeVisible=function(t){r.prototype.changeVisible.call(this,t);for(var i=this.geometries,o=0,c=i.length;o<c;o++){var p=i[o];p.changeVisible(t)}for(var g=this.controllers,o=0,c=g.length;o<c;o++){var _=g[o];_.changeVisible(t)}return this.foregroundGroup.set("visible",t),this.middleGroup.set("visible",t),this.backgroundGroup.set("visible",t),this.getCanvas().draw(),this},e.prototype.data=function(t){return(0,b.t8)(this.options,"data",t),this.isDataChanged=!0,this},e.prototype.source=function(t){return console.warn("This method will be removed at G2 V4.1. Please use chart.data() instead."),this.data(t)},e.prototype.filter=function(t,i){return(0,b.mf)(i)?((0,b.t8)(this.options,["filters",t],i),this):(!i&&(0,b.U2)(this.options,["filters",t])&&delete this.options.filters[t],this)},e.prototype.axis=function(t,i){return(0,b.jn)(t)?(0,b.t8)(this.options,["axes"],t):(0,b.t8)(this.options,["axes",t],i),this},e.prototype.legend=function(t,i){return(0,b.jn)(t)?(0,b.t8)(this.options,["legends"],t):(0,b.HD)(t)?((0,b.t8)(this.options,["legends",t],i),(0,b.PO)(i)&&(i!=null&&i.selected)&&(0,b.t8)(this.options,["filters",t],function(o){var c;return(c=i==null?void 0:i.selected[o])!==null&&c!==void 0?c:!0})):(0,b.t8)(this.options,["legends"],t),this},e.prototype.scale=function(t,i){var o=this;return(0,b.HD)(t)?(0,b.t8)(this.options,["scales",t],i):(0,b.Kn)(t)&&(0,b.S6)(t,function(c,p){(0,b.t8)(o.options,["scales",p],c)}),this},e.prototype.tooltip=function(t){return(0,b.t8)(this.options,"tooltip",t),this},e.prototype.annotation=function(){return this.getController("annotation")},e.prototype.guide=function(){return console.warn("This method will be removed at G2 V4.1. Please use chart.annotation() instead."),this.annotation()},e.prototype.coordinate=function(t,i){return(0,b.HD)(t)?(0,b.t8)(this.options,"coordinate",{type:t,cfg:i}):(0,b.t8)(this.options,"coordinate",t),this.coordinateController.update(this.options.coordinate),this.coordinateController},e.prototype.coord=function(t,i){return console.warn("This method will be removed at G2 V4.1. Please use chart.coordinate() instead."),this.coordinate(t,i)},e.prototype.facet=function(t,i){this.facetInstance&&this.facetInstance.destroy();var o=$0(t);if(!o)throw new Error("facet '".concat(t,"' is not exist!"));return this.facetInstance=new o(this,(0,P.pi)((0,P.pi)({},i),{type:t})),this},e.prototype.animate=function(t){return(0,b.t8)(this.options,"animate",t),this},e.prototype.updateOptions=function(t){return this.clear(),(0,b.CD)(this.options,t),this.views.forEach(function(i){return i.destroy()}),this.views=[],this.initOptions(),this.coordinateBBox=this.viewBBox,this},e.prototype.option=function(t,i){if(e.prototype[t])throw new Error(`Can't use built in variable name "`.concat(t,'", please change another one.'));return(0,b.t8)(this.options,t,i),this},e.prototype.theme=function(t){return this.themeObject=(0,b.Kn)(t)?(0,b.b$)({},this.themeObject,zi(t)):Zi(t),this},e.prototype.interaction=function(t,i){var o=this.interactions[t];o&&o.destroy();var c=Rr(t,this,i);return c&&(c.init(),this.interactions[t]=c),this},e.prototype.removeInteraction=function(t){var i=this.interactions[t];i&&(i.destroy(),this.interactions[t]=void 0)},e.prototype.changeData=function(t){this.isDataChanged=!0,this.emit(At.BEFORE_CHANGE_DATA,go.fromData(this,At.BEFORE_CHANGE_DATA,null)),this.data(t),this.paint(!0);for(var i=this.views,o=0,c=i.length;o<c;o++){var p=i[o];p.changeData(t)}this.emit(At.AFTER_CHANGE_DATA,go.fromData(this,At.AFTER_CHANGE_DATA,null))},e.prototype.createView=function(t){this.parent&&this.parent.parent&&console.warn("The view nesting recursive feature will be removed at G2 V4.1. Please avoid to use it.");var i={data:this.options.data,scales:(0,b.d9)(this.options.scales),axes:(0,b.d9)(this.options.axes),coordinate:(0,b.d9)(this.coordinateController.getOption()),tooltip:(0,b.d9)(this.options.tooltip),legends:(0,b.d9)(this.options.legends),animate:this.options.animate,visible:this.visible},o=new e((0,P.pi)((0,P.pi)({parent:this,canvas:this.canvas,backgroundGroup:this.backgroundGroup.addGroup({zIndex:Me.BG}),middleGroup:this.middleGroup.addGroup({zIndex:Me.MID}),foregroundGroup:this.foregroundGroup.addGroup({zIndex:Me.FORE}),theme:this.themeObject,padding:this.padding},t),{options:(0,P.pi)((0,P.pi)({},i),(0,b.U2)(t,"options",{}))}));return this.views.push(o),o},e.prototype.view=function(t){return console.warn("This method will be removed at G2 V4.1. Please use chart.createView() instead."),this.createView(t)},e.prototype.removeView=function(t){var i=(0,b.Od)(this.views,function(o){return o===t})[0];return i&&i.destroy(),i},e.prototype.getCoordinate=function(){return this.coordinateInstance},e.prototype.getTheme=function(){return this.themeObject},e.prototype.getXScale=function(){var t=this.geometries[0];return t?t.getXScale():null},e.prototype.getYScales=function(){var t={},i=[];return this.geometries.forEach(function(o){var c=o.getYScale(),p=c.field;t[p]||(t[p]=!0,i.push(c))}),i},e.prototype.getScalesByDim=function(t){for(var i=this.geometries,o={},c=0,p=i.length;c<p;c++){var g=i[c],_=t==="x"?g.getXScale():g.getYScale();_&&!o[_.field]&&(o[_.field]=_)}return o},e.prototype.getScale=function(t,i){var o=i||this.getScaleKey(t);return this.getRootView().scalePool.getScale(o)},e.prototype.getScaleByField=function(t,i){return this.getScale(t,i)},e.prototype.getOptions=function(){return this.options},e.prototype.getData=function(){return this.filteredData},e.prototype.getOriginalData=function(){return this.options.data},e.prototype.getPadding=function(){return this.autoPadding.getPadding()},e.prototype.getGeometries=function(){return this.geometries},e.prototype.getElements=function(){return(0,b.u4)(this.geometries,function(t,i){return t.concat(i.getElements())},[])},e.prototype.getElementsBy=function(t){return this.getElements().filter(function(i){return t(i)})},e.prototype.getLayer=function(t){return t===W.BG?this.backgroundGroup:t===W.MID?this.middleGroup:t===W.FORE?this.foregroundGroup:this.foregroundGroup},e.prototype.isPointInPlot=function(t){return Qh(this.getCoordinate(),t)},e.prototype.getLegendAttributes=function(){return(0,b.xH)(this.geometries.map(function(t){return t.getGroupAttributes()}))},e.prototype.getGroupScales=function(){var t=this.geometries.map(function(i){return i.getGroupScales()});return lf((0,b.xH)(t))},e.prototype.getCanvas=function(){return this.getRootView().canvas},e.prototype.getRootView=function(){for(var t=this;;){if(t.parent){t=t.parent;continue}break}return t},e.prototype.getXY=function(t){var i=this.getCoordinate(),o=this.getScalesByDim("x"),c=this.getScalesByDim("y"),p,g;if((0,b.S6)(t,function(_,S){o[S]&&(p=o[S].scale(_)),c[S]&&(g=c[S].scale(_))}),!(0,b.UM)(p)&&!(0,b.UM)(g))return i.convert({x:p,y:g})},e.prototype.getController=function(t){return(0,b.sE)(this.controllers,function(i){return i.name===t})},e.prototype.showTooltip=function(t){var i=this.getController("tooltip");return i&&i.showTooltip(t),this},e.prototype.hideTooltip=function(){var t=this.getController("tooltip");return t&&t.hideTooltip(),this},e.prototype.lockTooltip=function(){var t=this.getController("tooltip");return t&&t.lockTooltip(),this},e.prototype.unlockTooltip=function(){var t=this.getController("tooltip");return t&&t.unlockTooltip(),this},e.prototype.isTooltipLocked=function(){var t=this.getController("tooltip");return t&&t.isTooltipLocked()},e.prototype.getTooltipItems=function(t){var i=this.getController("tooltip");return i?i.getTooltipItems(t):[]},e.prototype.getSnapRecords=function(t){for(var i=this.geometries,o=[],c=0,p=i.length;c<p;c++){var g=i[c],_=g.dataArray;g.sort(_);for(var S=void 0,I=0,L=_.length;I<L;I++){var F=_[I];S=_v(t,F,g),S&&o.push(S)}}for(var z=this.views,c=0,p=z.length;c<p;c++){var V=z[c],Q=V.getSnapRecords(t);o=o.concat(Q)}return o},e.prototype.getComponents=function(){for(var t=[],i=this.controllers,o=0,c=i.length;o<c;o++){var p=i[o];t=t.concat(p.getComponents())}return t},e.prototype.filterData=function(t){var i=this.options.filters;return(0,b.dp)(i)===0?t:(0,b.hX)(t,function(o,c){var p=Object.keys(i);return p.every(function(g){var _=i[g];return _(o[g],o,c)})})},e.prototype.filterFieldData=function(t,i){var o=this.options.filters,c=(0,b.U2)(o,t);return(0,b.o8)(c)?i:i.filter(function(p,g){return c(p[t],p,g)})},e.prototype.adjustCoordinate=function(){var t=this.getCoordinate(),i=t.start,o=t.end,c=this.coordinateBBox.bl,p=this.coordinateBBox.tr;if((0,b.Xy)(i,c)&&(0,b.Xy)(o,p)){this.isCoordinateChanged=!1;return}this.isCoordinateChanged=!0,this.coordinateInstance=this.coordinateController.adjust(c,p)},e.prototype.paint=function(t){this.renderDataRecursive(t),this.syncScale(),this.emit(At.BEFORE_PAINT),this.renderPaddingRecursive(t),this.renderLayoutRecursive(t),this.renderBackgroundStyleShape(),this.renderPaintRecursive(t),this.emit(At.AFTER_PAINT),this.isDataChanged=!1},e.prototype.renderBackgroundStyleShape=function(){if(!this.parent){var t=(0,b.U2)(this.themeObject,"background");if(t){this.backgroundStyleRectShape||(this.backgroundStyleRectShape=this.backgroundGroup.addShape("rect",{attrs:{},zIndex:-1,capture:!1}),this.backgroundStyleRectShape.toBack());var i=this.viewBBox,o=i.x,c=i.y,p=i.width,g=i.height;this.backgroundStyleRectShape.attr({fill:t,x:o,y:c,width:p,height:g})}else this.backgroundStyleRectShape&&(this.backgroundStyleRectShape.remove(!0),this.backgroundStyleRectShape=void 0)}},e.prototype.renderPaddingRecursive=function(t){this.calculateViewBBox(),this.adjustCoordinate(),this.initComponents(t),this.autoPadding=d(this).shrink(ih(this.appendPadding)),this.coordinateBBox=this.viewBBox.shrink(this.autoPadding.getPadding()),this.adjustCoordinate();var i=this.controllers.find(function(_){return _.name==="tooltip"});i.update();for(var o=this.views,c=0,p=o.length;c<p;c++){var g=o[c];g.renderPaddingRecursive(t)}},e.prototype.renderLayoutRecursive=function(t){var i=this.syncViewPadding===!0?y:(0,b.mf)(this.syncViewPadding)?this.syncViewPadding:void 0;i&&(i(this,this.views,f),this.views.forEach(function(_){_.coordinateBBox=_.viewBBox.shrink(_.autoPadding.getPadding()),_.adjustCoordinate()})),this.doLayout();for(var o=this.views,c=0,p=o.length;c<p;c++){var g=o[c];g.renderLayoutRecursive(t)}},e.prototype.renderPaintRecursive=function(t){var i=this.middleGroup;if(this.limitInPlot){var o=Cd(this.coordinateInstance),c=o.type,p=o.attrs;i.setClip({type:c,attrs:p})}else i.setClip(void 0);this.paintGeometries(t),this.renderComponents(t);for(var g=this.views,_=0,S=g.length;_<S;_++){var I=g[_];I.renderPaintRecursive(t)}},e.prototype.createScale=function(t,i,o,c){var p=(0,b.U2)(this.options.scales,[t]),g=(0,P.pi)((0,P.pi)({},p),o);return this.parent?this.parent.createScale(t,i,g,c):this.scalePool.createScale(t,i,g,c)},e.prototype.renderDataRecursive=function(t){this.doFilterData(),this.createCoordinate(),this.initGeometries(t),this.renderFacet(t);for(var i=this.views,o=0,c=i.length;o<c;o++){var p=i[o];p.renderDataRecursive(t)}},e.prototype.calculateViewBBox=function(){var t,i,o,c;if(this.parent){var p=this.parent.coordinateBBox;t=p.x,i=p.y,o=p.width,c=p.height}else t=0,i=0,o=this.canvas.get("width"),c=this.canvas.get("height");var g=this.region,_=g.start,S=g.end,I=new Pu(t+o*_.x,i+c*_.y,o*(S.x-_.x),c*(S.y-_.y));(!this.viewBBox||!this.viewBBox.isEqual(I))&&(this.viewBBox=new Pu(t+o*_.x,i+c*_.y,o*(S.x-_.x),c*(S.y-_.y))),this.coordinateBBox=this.viewBBox},e.prototype.initEvents=function(){this.foregroundGroup.on("*",this.onDelegateEvents),this.middleGroup.on("*",this.onDelegateEvents),this.backgroundGroup.on("*",this.onDelegateEvents),this.canvas.on("*",this.onCanvasEvent)},e.prototype.initComponentController=function(){for(var t=this.usedControllers,i=0,o=t.length;i<o;i++){var c=t[i],p=tp(c);p&&this.controllers.push(new p(this))}},e.prototype.createViewEvent=function(t){var i=t.shape,o=t.name,c=i?i.get("origin"):null,p=new go(this,t,c);return p.type=o,p},e.prototype.doPlotEvent=function(t){var i=t.type,o=t.x,c=t.y,p={x:o,y:c},g=["mousedown","mouseup","mousemove","mouseleave","mousewheel","touchstart","touchmove","touchend","touchcancel","click","dblclick","contextmenu"];if(g.includes(i)){var _=this.isPointInPlot(p),S=t.clone();if(_){var I="plot:".concat(i);S.type=I,this.emit(I,S),(i==="mouseleave"||i==="touchend")&&(this.isPreMouseInPlot=!1)}i==="mousemove"||i==="touchmove"?(this.isPreMouseInPlot&&!_?(i==="mousemove"&&(S.type=Dt.MOUSE_LEAVE,this.emit(Dt.MOUSE_LEAVE,S)),S.type=Dt.LEAVE,this.emit(Dt.LEAVE,S)):!this.isPreMouseInPlot&&_&&(i==="mousemove"&&(S.type=Dt.MOUSE_ENTER,this.emit(Dt.MOUSE_ENTER,S)),S.type=Dt.ENTER,this.emit(Dt.ENTER,S)),this.isPreMouseInPlot=_):(i==="mouseleave"||i==="touchend")&&this.isPreMouseInPlot&&(i==="mouseleave"&&(S.type=Dt.MOUSE_LEAVE,this.emit(Dt.MOUSE_LEAVE,S)),S.type=Dt.LEAVE,this.emit(Dt.LEAVE,S),this.isPreMouseInPlot=!1)}},e.prototype.doFilterData=function(){var t=this.options.data;this.filteredData=this.filterData(t)},e.prototype.initGeometries=function(t){this.createOrUpdateScales();for(var i=this.getCoordinate(),o=(0,b.U2)(this.options,"scales",{}),c=this.geometries,p=0,g=c.length;p<g;p++){var _=c[p];_.scales=this.getGeometryScales();var S={coordinate:i,scaleDefs:o,data:this.filteredData,theme:this.themeObject,isDataChanged:this.isDataChanged,isCoordinateChanged:this.isCoordinateChanged};t?_.update(S):_.init(S)}this.adjustScales()},e.prototype.createOrUpdateScales=function(){for(var t=this.getScaleFields(),i=this.getGroupedFields(),o=this.getOptions(),c=o.data,p=o.scales,g=p===void 0?{}:p,_=this.filteredData,S=0,I=t.length;S<I;S++){var L=t[S],F=g[L],z=this.getScaleKey(L);this.createScale(L,i.includes(L)?c:_,F,z),this.createdScaleKeys.set(z,!0)}},e.prototype.syncScale=function(){this.getRootView().scalePool.sync(this.getCoordinate(),this.theme)},e.prototype.getGeometryScales=function(){for(var t=this.getScaleFields(),i={},o=0;o<t.length;o++){var c=t[o];i[c]=this.getScaleByField(c)}return i},e.prototype.getScaleFields=function(){for(var t=[],i=new Map,o=this.geometries,c=0;c<o.length;c++){var p=o[c],g=p.getScaleFields();lf(g,t,i)}return t},e.prototype.getGroupedFields=function(){for(var t=[],i=new Map,o=this.geometries,c=0;c<o.length;c++){var p=o[c],g=p.getGroupFields();lf(g,t,i)}return t},e.prototype.adjustScales=function(){this.adjustCategoryScaleRange()},e.prototype.adjustCategoryScaleRange=function(){var t=this,i=(0,P.ev)([this.getXScale()],(0,P.CR)(this.getYScales()),!1).filter(function(p){return!!p}),o=this.getCoordinate(),c=this.options.scales;(0,b.S6)(i,function(p){var g=p.field,_=p.values,S=p.isCategory,I=p.isIdentity;(S||I)&&_&&!(0,b.U2)(c,[g,"range"])&&(p.range=Td(p,o,t.theme))})},e.prototype.initComponents=function(t){for(var i=this.controllers,o=0;o<i.length;o++){var c=i[o];t?c.update():(c.clear(),c.render())}},e.prototype.doLayout=function(){this.layoutFunc(this)},e.prototype.createCoordinate=function(){var t=this.coordinateBBox.bl,i=this.coordinateBBox.tr;this.coordinateInstance=this.coordinateController.create(t,i)},e.prototype.paintGeometries=function(t){for(var i=this.options.animate,o=this.getCoordinate(),c={x:this.viewBBox.x,y:this.viewBBox.y,minX:this.viewBBox.minX,minY:this.viewBBox.minY,maxX:this.viewBBox.maxX,maxY:this.viewBBox.maxY,width:this.viewBBox.width,height:this.viewBBox.height},p=this.geometries,g=0;g<p.length;g++){var _=p[g];_.coordinate=o,_.canvasRegion=c,i||_.animate(!1),_.paint(t)}},e.prototype.renderComponents=function(t){for(var i=this.getComponents(),o=0;o<i.length;o++){var c=i[o];c.component.render()}},e.prototype.renderFacet=function(t){this.facetInstance&&(t?this.facetInstance.update():(this.facetInstance.clear(),this.facetInstance.init(),this.facetInstance.render()))},e.prototype.initOptions=function(){var t=this,i=this.options,o=i.geometries,c=o===void 0?[]:o,p=i.interactions,g=p===void 0?[]:p,_=i.views,S=_===void 0?[]:_,I=i.annotations,L=I===void 0?[]:I,F=i.coordinate,z=i.events,V=i.facets;this.coordinateController?F&&this.coordinateController.update(F):this.coordinateController=new vy(F);for(var Q=0;Q<c.length;Q++){var st=c[Q];this.createGeometry(st)}for(var at=0;at<g.length;at++){var Rt=g[at],Kt=Rt.type,te=Rt.cfg;this.interaction(Kt,te)}for(var Ae=0;Ae<S.length;Ae++){var hr=S[Ae];this.createView(hr)}for(var Tr=this.getController("annotation"),Dr=0;Dr<L.length;Dr++){var cn=L[Dr];Tr.annotation(cn)}z&&(0,b.S6)(z,function(Qr,Tn){t.on(Tn,Qr)}),V&&(0,b.S6)(V,function(Qr){var Tn=Qr.type,xi=(0,P._T)(Qr,["type"]);t.facet(Tn,xi)})},e.prototype.createGeometry=function(t){var i=t.type,o=t.cfg,c=o===void 0?{}:o;if(this[i]){var p=this[i](c);(0,b.S6)(t,function(g,_){(0,b.mf)(p[_])&&p[_](g)})}},e.prototype.getScaleKey=function(t){return"".concat(this.id,"-").concat(t)},e}(ee);function O(r,e){T.prototype[r.toLowerCase()]=function(t){t===void 0&&(t={});var i=(0,P.pi)({container:this.middleGroup.addGroup(),labelsContainer:this.foregroundGroup.addGroup()},t),o=new e(i);return this.geometries.push(o),o}}var N=T,Z=function(r){(0,P.ZT)(e,r);function e(t){var i=this,o=t.container,c=t.width,p=t.height,g=t.autoFit,_=g===void 0?!1:g,S=t.padding,I=t.appendPadding,L=t.renderer,F=L===void 0?"canvas":L,z=t.pixelRatio,V=t.localRefresh,Q=V===void 0?!0:V,st=t.visible,at=st===void 0?!0:st,Rt=t.supportCSSTransform,Kt=Rt===void 0?!1:Rt,te=t.defaultInteractions,Ae=te===void 0?["tooltip","legend-filter","legend-active","continuous-filter","ellipsis-text","axis-description"]:te,hr=t.options,Tr=t.limitInPlot,Dr=t.theme,cn=t.syncViewPadding,Qr=(0,b.HD)(o)?document.getElementById(o):o,Tn=(0,St.Z)('<div style="position:relative;"></div>');Qr.appendChild(Tn);var xi=ke(Qr,_,c,p),va=Jt(F),Aa=new va.Canvas((0,P.pi)({container:Tn,pixelRatio:z,localRefresh:Q,supportCSSTransform:Kt},xi));return i=r.call(this,{parent:null,canvas:Aa,backgroundGroup:Aa.addGroup({zIndex:Me.BG}),middleGroup:Aa.addGroup({zIndex:Me.MID}),foregroundGroup:Aa.addGroup({zIndex:Me.FORE}),padding:S,appendPadding:I,visible:at,options:hr,limitInPlot:Tr,theme:Dr,syncViewPadding:cn})||this,i.onResize=(0,b.Ds)(function(){i.forceFit()},300),i.ele=Qr,i.canvas=Aa,i.width=xi.width,i.height=xi.height,i.autoFit=_,i.localRefresh=Q,i.renderer=F,i.wrapperElement=Tn,i.updateCanvasStyle(),i.bindAutoFit(),i.initDefaultInteractions(Ae),i}return e.prototype.initDefaultInteractions=function(t){var i=this;(0,b.S6)(t,function(o){i.interaction(o)})},e.prototype.aria=function(t){var i="aria-label";t===!1?this.ele.removeAttribute(i):this.ele.setAttribute(i,t.label)},e.prototype.changeSize=function(t,i){return this.width===t&&this.height===i?this:(this.emit(At.BEFORE_CHANGE_SIZE),this.width=t,this.height=i,this.canvas.changeSize(t,i),this.render(!0),this.emit(At.AFTER_CHANGE_SIZE),this)},e.prototype.clear=function(){r.prototype.clear.call(this),this.aria(!1)},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.unbindAutoFit(),this.canvas.destroy(),Le(this.wrapperElement),this.wrapperElement=null},e.prototype.changeVisible=function(t){return r.prototype.changeVisible.call(this,t),this.wrapperElement.style.display=t?"":"none",this},e.prototype.forceFit=function(){if(!this.destroyed){var t=ke(this.ele,!0,this.width,this.height),i=t.width,o=t.height;this.changeSize(i,o)}},e.prototype.updateCanvasStyle=function(){(0,Y.Z)(this.canvas.get("el"),{display:"inline-block",verticalAlign:"middle"})},e.prototype.bindAutoFit=function(){this.autoFit&&window.addEventListener("resize",this.onResize)},e.prototype.unbindAutoFit=function(){this.autoFit&&window.removeEventListener("resize",this.onResize)},e}(N),q=Z,dt=function(){function r(e){this.visible=!0,this.components=[],this.view=e}return r.prototype.clear=function(e){(0,b.S6)(this.components,function(t){t.component.destroy()}),this.components=[]},r.prototype.destroy=function(){this.clear()},r.prototype.getComponents=function(){return this.components},r.prototype.changeVisible=function(e){this.visible!==e&&(this.components.forEach(function(t){e?t.component.show():t.component.hide()}),this.visible=e)},r}();function Pt(r){for(var e=[],t=function(o){var c=r[o],p=(0,b.sE)(e,function(g){return g.color===c.color&&g.name===c.name&&g.value===c.value&&g.title===c.title});p||e.push(c)},i=0;i<r.length;i++)t(i);return e}var Gt=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.isLocked=!1,t}return Object.defineProperty(e.prototype,"name",{get:function(){return"tooltip"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.isVisible=function(){var t=this.view.getOptions().tooltip;return t!==!1},e.prototype.render=function(){},e.prototype.showTooltip=function(t){if(this.point=t,!!this.isVisible()){var i=this.view,o=this.getTooltipItems(t);if(!o.length){this.hideTooltip();return}var c=this.getTitle(o),p={x:o[0].x,y:o[0].y};i.emit("tooltip:show",go.fromData(i,"tooltip:show",(0,P.pi)({items:o,title:c},t)));var g=this.getTooltipCfg(),_=g.follow,S=g.showMarkers,I=g.showCrosshairs,L=g.showContent,F=g.marker,z=this.items,V=this.title;if(!(0,b.Xy)(V,c)||!(0,b.Xy)(z,o)?(i.emit("tooltip:change",go.fromData(i,"tooltip:change",(0,P.pi)({items:o,title:c},t))),((0,b.mf)(L)?L(o):L)&&(this.tooltip||this.renderTooltip(),this.tooltip.update((0,b.CD)({},g,{items:this.getItemsAfterProcess(o),title:c},_?t:{})),this.tooltip.show()),S&&this.renderTooltipMarkers(o,F)):(this.tooltip&&_&&(this.tooltip.update(t),this.tooltip.show()),this.tooltipMarkersGroup&&this.tooltipMarkersGroup.show()),this.items=o,this.title=c,I){var Q=(0,b.U2)(g,["crosshairs","follow"],!1);this.renderCrosshairs(Q?t:p,g)}}},e.prototype.hideTooltip=function(){var t=this.getTooltipCfg().follow;if(!t){this.point=null;return}var i=this.tooltipMarkersGroup;i&&i.hide();var o=this.xCrosshair,c=this.yCrosshair;o&&o.hide(),c&&c.hide();var p=this.tooltip;p&&p.hide(),this.view.emit("tooltip:hide",go.fromData(this.view,"tooltip:hide",{})),this.point=null},e.prototype.lockTooltip=function(){this.isLocked=!0,this.tooltip&&this.tooltip.setCapture(!0)},e.prototype.unlockTooltip=function(){this.isLocked=!1;var t=this.getTooltipCfg();this.tooltip&&this.tooltip.setCapture(t.capture)},e.prototype.isTooltipLocked=function(){return this.isLocked},e.prototype.clear=function(){var t=this,i=t.tooltip,o=t.xCrosshair,c=t.yCrosshair,p=t.tooltipMarkersGroup;i&&(i.hide(),i.clear()),o&&o.clear(),c&&c.clear(),p&&p.clear(),i!=null&&i.get("customContent")&&(this.tooltip.destroy(),this.tooltip=null),this.title=null,this.items=null},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),this.xCrosshair&&this.xCrosshair.destroy(),this.yCrosshair&&this.yCrosshair.destroy(),this.guideGroup&&this.guideGroup.remove(!0),this.reset()},e.prototype.reset=function(){this.items=null,this.title=null,this.tooltipMarkersGroup=null,this.tooltipCrosshairsGroup=null,this.xCrosshair=null,this.yCrosshair=null,this.tooltip=null,this.guideGroup=null,this.isLocked=!1,this.point=null},e.prototype.changeVisible=function(t){if(this.visible!==t){var i=this,o=i.tooltip,c=i.tooltipMarkersGroup,p=i.xCrosshair,g=i.yCrosshair;t?(o&&o.show(),c&&c.show(),p&&p.show(),g&&g.show()):(o&&o.hide(),c&&c.hide(),p&&p.hide(),g&&g.hide()),this.visible=t}},e.prototype.getTooltipItems=function(t){var i,o,c,p,g,_,S=this.findItemsFromView(this.view,t);if(S.length){S=(0,b.xH)(S);try{for(var I=(0,P.XA)(S),L=I.next();!L.done;L=I.next()){var F=L.value;try{for(var z=(c=void 0,(0,P.XA)(F)),V=z.next();!V.done;V=z.next()){var Q=V.value,st=Q.mappingData,at=st.x,Rt=st.y;Q.x=(0,b.kJ)(at)?at[at.length-1]:at,Q.y=(0,b.kJ)(Rt)?Rt[Rt.length-1]:Rt}}catch(Qr){c={error:Qr}}finally{try{V&&!V.done&&(p=z.return)&&p.call(z)}finally{if(c)throw c.error}}}}catch(Qr){i={error:Qr}}finally{try{L&&!L.done&&(o=I.return)&&o.call(I)}finally{if(i)throw i.error}}var Kt=this.getTooltipCfg().shared;if(Kt===!1&&S.length>1){var te=S[0],Ae=Math.abs(t.y-te[0].y);try{for(var hr=(0,P.XA)(S),Tr=hr.next();!Tr.done;Tr=hr.next()){var Dr=Tr.value,cn=Math.abs(t.y-Dr[0].y);cn<=Ae&&(te=Dr,Ae=cn)}}catch(Qr){g={error:Qr}}finally{try{Tr&&!Tr.done&&(_=hr.return)&&_.call(hr)}finally{if(g)throw g.error}}S=[te]}return Pt((0,b.xH)(S))}return[]},e.prototype.layout=function(){},e.prototype.update=function(){if(this.point&&this.showTooltip(this.point),this.tooltip){var t=this.view.getCanvas();this.tooltip.set("region",{start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}})}},e.prototype.isCursorEntered=function(t){if(this.tooltip){var i=this.tooltip.getContainer(),o=this.tooltip.get("capture");if(i&&o){var c=i.getBoundingClientRect(),p=c.x,g=c.y,_=c.width,S=c.height;return new Pu(p,g,_,S).isPointIn(t)}}return!1},e.prototype.getTooltipCfg=function(){var t=this.view,i=t.getOptions().tooltip,o=this.processCustomContent(i),c=t.getTheme(),p=(0,b.U2)(c,["components","tooltip"],{}),g=(0,b.U2)(o,"enterable",p.enterable);return(0,b.b$)({},p,o,{capture:!!(g||this.isLocked)})},e.prototype.processCustomContent=function(t){if((0,b.jn)(t)||!(0,b.U2)(t,"customContent"))return t;var i=t.customContent,o=function(c,p){var g=i(c,p)||"";return(0,b.HD)(g)?'<div class="g2-tooltip">'+g+"</div>":g};return(0,P.pi)((0,P.pi)({},t),{customContent:o})},e.prototype.getTitle=function(t){var i=t[0].title||t[0].name;return this.title=i,i},e.prototype.renderTooltip=function(){var t=this.view.getCanvas(),i={start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}},o=this.getTooltipCfg(),c=new Bl((0,P.pi)((0,P.pi)({parent:t.get("el").parentNode,region:i},o),{visible:!1,crosshairs:null}));c.init(),this.tooltip=c},e.prototype.renderTooltipMarkers=function(t,i){var o,c,p=this.getTooltipMarkersGroup(),g=this.view.getRootView(),_=g.limitInPlot;try{for(var S=(0,P.XA)(t),I=S.next();!I.done;I=S.next()){var L=I.value,F=L.x,z=L.y;if(_||p!=null&&p.getClip()){var V=Cd(g.getCoordinate()),Q=V.type,st=V.attrs;p==null||p.setClip({type:Q,attrs:st})}else p==null||p.setClip(void 0);var at=this.view.getTheme(),Rt=(0,b.U2)(at,["components","tooltip","marker"],{}),Kt=(0,P.pi)((0,P.pi)({fill:L.color,symbol:"circle",shadowColor:L.color},(0,b.mf)(i)?(0,P.pi)((0,P.pi)({},Rt),i(L)):i),{x:F,y:z});p.addShape("marker",{attrs:Kt})}}catch(te){o={error:te}}finally{try{I&&!I.done&&(c=S.return)&&c.call(S)}finally{if(o)throw o.error}}},e.prototype.renderCrosshairs=function(t,i){var o=(0,b.U2)(i,["crosshairs","type"],"x");o==="x"?(this.yCrosshair&&this.yCrosshair.hide(),this.renderXCrosshairs(t,i)):o==="y"?(this.xCrosshair&&this.xCrosshair.hide(),this.renderYCrosshairs(t,i)):o==="xy"&&(this.renderXCrosshairs(t,i),this.renderYCrosshairs(t,i))},e.prototype.renderXCrosshairs=function(t,i){var o=this.getViewWithGeometry(this.view).getCoordinate(),c,p;if(o.isRect)o.isTransposed?(c={x:o.start.x,y:t.y},p={x:o.end.x,y:t.y}):(c={x:t.x,y:o.end.y},p={x:t.x,y:o.start.y});else{var g=fc(o,t),_=o.getCenter(),S=o.getRadius();p=bs(_.x,_.y,S,g),c=_}var I=(0,b.b$)({start:c,end:p,container:this.getTooltipCrosshairsGroup()},(0,b.U2)(i,"crosshairs",{}),this.getCrosshairsText("x",t,i));delete I.type;var L=this.xCrosshair;L?L.update(I):(L=new As(I),L.init()),L.render(),L.show(),this.xCrosshair=L},e.prototype.renderYCrosshairs=function(t,i){var o=this.getViewWithGeometry(this.view).getCoordinate(),c,p;if(o.isRect){var g=void 0,_=void 0;o.isTransposed?(g={x:t.x,y:o.end.y},_={x:t.x,y:o.start.y}):(g={x:o.start.x,y:t.y},_={x:o.end.x,y:t.y}),c={start:g,end:_},p="Line"}else c={center:o.getCenter(),radius:th(o,t),startAngle:o.startAngle,endAngle:o.endAngle},p="Circle";c=(0,b.b$)({container:this.getTooltipCrosshairsGroup()},c,(0,b.U2)(i,"crosshairs",{}),this.getCrosshairsText("y",t,i)),delete c.type;var S=this.yCrosshair;S?o.isRect&&S.get("type")==="circle"||!o.isRect&&S.get("type")==="line"?(S=new J[p](c),S.init()):S.update(c):(S=new J[p](c),S.init()),S.render(),S.show(),this.yCrosshair=S},e.prototype.getCrosshairsText=function(t,i,o){var c=(0,b.U2)(o,["crosshairs","text"]),p=(0,b.U2)(o,["crosshairs","follow"]),g=this.items;if(c){var _=this.getViewWithGeometry(this.view),S=g[0],I=_.getXScale(),L=_.getYScales()[0],F=void 0,z=void 0;if(p){var V=this.view.getCoordinate().invert(i);F=I.invert(V.x),z=L.invert(V.y)}else F=S.data[I.field],z=S.data[L.field];var Q=t==="x"?F:z;return(0,b.mf)(c)?c=c(t,Q,g,i):c.content=Q,{text:c}}},e.prototype.getGuideGroup=function(){if(!this.guideGroup){var t=this.view.foregroundGroup;this.guideGroup=t.addGroup({name:"tooltipGuide",capture:!1})}return this.guideGroup},e.prototype.getTooltipMarkersGroup=function(){var t=this.tooltipMarkersGroup;return t&&!t.destroyed?(t.clear(),t.show()):(t=this.getGuideGroup().addGroup({name:"tooltipMarkersGroup"}),t.toFront(),this.tooltipMarkersGroup=t),t},e.prototype.getTooltipCrosshairsGroup=function(){var t=this.tooltipCrosshairsGroup;return t||(t=this.getGuideGroup().addGroup({name:"tooltipCrosshairsGroup",capture:!1}),t.toBack(),this.tooltipCrosshairsGroup=t),t},e.prototype.findItemsFromView=function(t,i){var o,c;if(t.getOptions().tooltip===!1)return[];var p=this.getTooltipCfg(),g=s0(t,i,p);try{for(var _=(0,P.XA)(t.views),S=_.next();!S.done;S=_.next()){var I=S.value;g=g.concat(this.findItemsFromView(I,i))}}catch(L){o={error:L}}finally{try{S&&!S.done&&(c=_.return)&&c.call(_)}finally{if(o)throw o.error}}return g},e.prototype.getViewWithGeometry=function(t){var i=this;return t.geometries.length?t:(0,b.sE)(t.views,function(o){return i.getViewWithGeometry(o)})},e.prototype.getItemsAfterProcess=function(t){var i=this.getTooltipCfg().customItems,o=i||function(c){return c};return o(t)},e}(dt),Qt=Gt,ve={};function Oe(r){return ve[r.toLowerCase()]}function er(r,e){ve[r.toLowerCase()]=e}var sr={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},Sr={interval:function(r){return{enter:{animation:r.isRect?r.isTransposed?"scale-in-x":"scale-in-y":"fade-in"},update:{animation:r.isPolar&&r.isTransposed?"sector-path-update":null},leave:{animation:"fade-out"}}},line:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},path:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},point:{appear:{animation:"zoom-in"},enter:{animation:"zoom-in"},leave:{animation:"zoom-out"}},area:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},polygon:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},schema:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},edge:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},label:{appear:{animation:"fade-in",delay:450},enter:{animation:"fade-in"},update:{animation:"position-update"},leave:{animation:"fade-out"}}},gr={line:function(){return{animation:"wave-in"}},area:function(){return{animation:"wave-in"}},path:function(){return{animation:"fade-in"}},interval:function(r){var e;return r.isRect?e=r.isTransposed?"grow-in-x":"grow-in-y":(e="grow-in-xy",r.isPolar&&r.isTransposed&&(e="wave-in")),{animation:e}},schema:function(r){var e;return r.isRect?e=r.isTransposed?"grow-in-x":"grow-in-y":e="grow-in-xy",{animation:e}},polygon:function(){return{animation:"fade-in",duration:500}},edge:function(){return{animation:"fade-in"}}};function zr(r,e){return{delay:(0,b.mf)(r.delay)?r.delay(e):r.delay,easing:(0,b.mf)(r.easing)?r.easing(e):r.easing,duration:(0,b.mf)(r.duration)?r.duration(e):r.duration,callback:r.callback,repeat:r.repeat}}function Jr(r,e,t){var i=Sr[r];return i&&((0,b.mf)(i)&&(i=i(e)),i=(0,b.b$)({},sr,i),t)?i[t]:i}function ln(r,e,t){var i=(0,b.U2)(r.get("origin"),"data",Ge),o=e.animation,c=zr(e,i);if(o){var p=Oe(o);p&&p(r,c,t)}else r.animate(t.toAttrs,c)}function yn(r,e,t,i,o){if(gr[t]){var c=gr[t](i),p=Oe((0,b.U2)(c,"animation",""));if(p){var g=(0,P.pi)((0,P.pi)((0,P.pi)({},sr.appear),c),e);r.stopAnimate(),p(r,g,{coordinate:i,minYPoint:o,toAttrs:null})}}}var Pn="element-background",oi=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,t)||this;i.labelShape=[],i.states=[];var o=t.shapeFactory,c=t.container,p=t.offscreenGroup,g=t.elementIndex,_=t.visible,S=_===void 0?!0:_;return i.shapeFactory=o,i.container=c,i.offscreenGroup=p,i.visible=S,i.elementIndex=g,i}return e.prototype.draw=function(t,i){i===void 0&&(i=!1),this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.drawShape(t,i),this.visible===!1&&this.changeVisible(!1)},e.prototype.update=function(t){var i=this,o=i.shapeFactory,c=i.shape;if(c){this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.setShapeInfo(c,t);var p=this.getOffscreenGroup(),g=o.drawShape(this.shapeType,t,p);g.cfg.data=this.data,g.cfg.origin=t,g.cfg.element=this,this.syncShapeStyle(c,g,this.getStates(),this.getAnimateCfg("update"))}},e.prototype.destroy=function(){var t=this,i=t.shapeFactory,o=t.shape;if(o){var c=this.getAnimateCfg("leave");c?ln(o,c,{coordinate:i.coordinate,toAttrs:(0,P.pi)({},o.attr())}):o.remove(!0)}this.states=[],this.shapeFactory=void 0,this.container=void 0,this.shape=void 0,this.animate=void 0,this.geometry=void 0,this.labelShape=[],this.model=void 0,this.data=void 0,this.offscreenGroup=void 0,this.statesStyle=void 0,r.prototype.destroy.call(this)},e.prototype.changeVisible=function(t){r.prototype.changeVisible.call(this,t),t?(this.shape&&this.shape.show(),this.labelShape&&this.labelShape.forEach(function(i){i.show()})):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach(function(i){i.hide()}))},e.prototype.setState=function(t,i){var o=this,c=o.states,p=o.shapeFactory,g=o.model,_=o.shape,S=o.shapeType,I=c.indexOf(t);if(i){if(I>-1)return;c.push(t),(t==="active"||t==="selected")&&(_==null||_.toFront())}else{if(I===-1)return;if(c.splice(I,1),t==="active"||t==="selected"){var L=this.geometry,F=L.sortZIndex,z=L.zIndexReversed,V=z?this.geometry.elements.length-this.elementIndex:this.elementIndex;F?_.setZIndex(V):_.set("zIndex",V)}}var Q=p.drawShape(S,g,this.getOffscreenGroup());c.length?this.syncShapeStyle(_,Q,c,null):this.syncShapeStyle(_,Q,["reset"],null),Q.remove(!0);var st={state:t,stateStatus:i,element:this,target:this.container};this.container.emit("statechange",st),Hi(this.shape,"statechange",st)},e.prototype.clearStates=function(){var t=this,i=this.states;(0,b.S6)(i,function(o){t.setState(o,!1)}),this.states=[]},e.prototype.hasState=function(t){return this.states.includes(t)},e.prototype.getStates=function(){return this.states},e.prototype.getData=function(){return this.data},e.prototype.getModel=function(){return this.model},e.prototype.getBBox=function(){var t=this,i=t.shape,o=t.labelShape,c={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return i&&(c=i.getCanvasBBox()),o&&o.forEach(function(p){var g=p.getCanvasBBox();c.x=Math.min(g.x,c.x),c.y=Math.min(g.y,c.y),c.minX=Math.min(g.minX,c.minX),c.minY=Math.min(g.minY,c.minY),c.maxX=Math.max(g.maxX,c.maxX),c.maxY=Math.max(g.maxY,c.maxY)}),c.width=c.maxX-c.minX,c.height=c.maxY-c.minY,c},e.prototype.getStatesStyle=function(){if(!this.statesStyle){var t=this,i=t.shapeType,o=t.geometry,c=t.shapeFactory,p=o.stateOption,g=c.defaultShapeType,_=c.theme[i]||c.theme[g];this.statesStyle=(0,b.b$)({},_,p)}return this.statesStyle},e.prototype.getStateStyle=function(t,i){var o=this.getStatesStyle(),c=(0,b.U2)(o,[t,"style"],{}),p=c[i]||c;return(0,b.mf)(p)?p(this):p},e.prototype.getAnimateCfg=function(t){var i=this,o=this.animate;if(o){var c=o[t];return c&&(0,P.pi)((0,P.pi)({},c),{callback:function(){var p;(0,b.mf)(c.callback)&&c.callback(),(p=i.geometry)===null||p===void 0||p.emit(rt.AFTER_DRAW_ANIMATE)}})}return null},e.prototype.drawShape=function(t,i){var o;i===void 0&&(i=!1);var c=this,p=c.shapeFactory,g=c.container,_=c.shapeType;if(this.shape=p.drawShape(_,t,g),this.shape){this.setShapeInfo(this.shape,t);var S=this.shape.cfg.name;S?(0,b.HD)(S)&&(this.shape.cfg.name=["element",S]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var I=i?"enter":"appear",L=this.getAnimateCfg(I);L&&((o=this.geometry)===null||o===void 0||o.emit(rt.BEFORE_DRAW_ANIMATE),ln(this.shape,L,{coordinate:p.coordinate,toAttrs:(0,P.pi)({},this.shape.attr())}))}},e.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},e.prototype.setShapeInfo=function(t,i){var o=this;if(t.cfg.origin=i,t.cfg.element=this,t.isGroup()){var c=t.get("children");c.forEach(function(p){o.setShapeInfo(p,i)})}},e.prototype.syncShapeStyle=function(t,i,o,c,p){var g=this,_;if(o===void 0&&(o=[]),p===void 0&&(p=0),!(!t||!i)){var S=t.get("clipShape"),I=i.get("clipShape");if(this.syncShapeStyle(S,I,o,c),t.isGroup())for(var L=t.get("children"),F=i.get("children"),z=0;z<L.length;z++)this.syncShapeStyle(L[z],F[z],o,c,p+z);else{if(!(0,b.xb)(o)&&!(0,b.Xy)(o,["reset"])){var V=t.get("name");(0,b.kJ)(V)&&(V=V[1]),(0,b.S6)(o,function(st){if(i.get("name")!==Pn){var at=g.getStateStyle(st,V||p);i.attr(at)}})}var Q=Rg(t,i);this.animate?c?((_=this.geometry)===null||_===void 0||_.emit(rt.BEFORE_DRAW_ANIMATE),ln(t,c,{coordinate:this.shapeFactory.coordinate,toAttrs:Q,shapeModel:this.model})):(0,b.xb)(o)?t.attr(Q):(t.stopAnimate(),t.animate(Q,{duration:300})):t.attr(Q)}}},e.prototype.getShapeType=function(t){var i=(0,b.U2)(t,"shape");return(0,b.kJ)(i)?i[0]:i},e}(ee),Ti=oi,oa={},Vi={};function da(r){return oa[r.toLowerCase()]}function Rn(r,e){oa[r.toLowerCase()]=e}function Ri(r){return Vi[r.toLowerCase()]}function na(r,e){Vi[r.toLowerCase()]=e}var ta={coordinate:null,defaultShapeType:null,theme:null,getShapePoints:function(r,e){var t=this.getShape(r);return t.getPoints?t.getPoints(e):this.getDefaultPoints(e)},getShape:function(r){var e=this[r]||this[this.defaultShapeType];return e.coordinate=this.coordinate,e},getDefaultPoints:function(){return[]},getDefaultStyle:function(r){return(0,b.U2)(r,[this.defaultShapeType,"default","style"],{})},getMarker:function(r,e){var t=this.getShape(r);if(!t.getMarker){var i=this.defaultShapeType;t=this.getShape(i)}var o=this.theme,c=(0,b.U2)(o,[r,"default"],{}),p=t.getMarker(e);return(0,b.b$)({},c,p)},drawShape:function(r,e,t){var i=this.getShape(r);return i.draw(e,t)}},mo={coordinate:null,parsePath:function(r){var e=this.coordinate,t=(0,xd.tr)(r);return e.isPolar?t=hi(e,t):t=Bn(e,t),t},parsePoint:function(r){var e=this.coordinate;return e.convert(r)},parsePoints:function(r){var e=this.coordinate;return r.map(function(t){return e.convert(t)})},draw:function(r,e){}},Wa={};function po(r,e){var t=(0,b.jC)(r),i=(0,P.pi)((0,P.pi)((0,P.pi)({},ta),e),{geometryType:r});return Wa[t]=i,i}function wi(r,e,t){var i=(0,b.jC)(r),o=Wa[i],c=(0,P.pi)((0,P.pi)({},mo),t);return o[e]=c,c}function Ho(r){var e=(0,b.jC)(r);return Wa[e]}function Zs(r,e,t){var i,o;if(t===void 0&&(t={}),!e)return[r];var c=(0,b.Ms)(r,e),p=[];if(e.length===1&&t[e[0]]){var g=t[e[0]];try{for(var _=(0,P.XA)(g),S=_.next();!S.done;S=_.next()){var I=S.value,L=c["_".concat(I)];L&&p.push(L)}}catch(V){i={error:V}}finally{try{S&&!S.done&&(o=_.return)&&o.call(_)}finally{if(i)throw i.error}}}else for(var F in c)if(c.hasOwnProperty(F)){var z=c[F];p.push(z)}return p}function ru(r,e){return(0,b.G)(["color","shape","size","x","y","isInCircle","data","style","defaultStyle","points","mappingData"],function(t){return!(0,b.Xy)(r[t],e[t])})}function Ls(r){return(0,b.kJ)(r)?r:r.split("*")}function Ds(r,e){for(var t=[],i=[],o=[],c=new Map,p=0;p<e.length;p++){var g=e[p];r[g]?i.push(g):t.push(g),c.set(g,!0)}return Object.keys(r).forEach(function(_){c.has(_)||o.push(_)}),{added:t,updated:i,removed:o}}var cu=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,t)||this;i.type="base",i.attributes={},i.elements=[],i.elementsMap={},i.animateOption=!0,i.attributeOption={},i.lastElementsMap={},i.generatePoints=!1,i.beforeMappingData=null,i.adjusts={},i.idFields=[],i.hasSorted=!1,i.isCoordinateChanged=!1;var o=t.container,c=t.labelsContainer,p=t.coordinate,g=t.data,_=t.sortable,S=_===void 0?!1:_,I=t.visible,L=I===void 0?!0:I,F=t.theme,z=t.scales,V=z===void 0?{}:z,Q=t.scaleDefs,st=Q===void 0?{}:Q,at=t.intervalPadding,Rt=t.dodgePadding,Kt=t.maxColumnWidth,te=t.minColumnWidth,Ae=t.columnWidthRatio,hr=t.roseWidthRatio,Tr=t.multiplePieWidthRatio,Dr=t.zIndexReversed,cn=t.sortZIndex,Qr=t.useDeferredLabel;return i.container=o,i.labelsContainer=c,i.coordinate=p,i.data=g,i.sortable=S,i.visible=L,i.userTheme=F,i.scales=V,i.scaleDefs=st,i.intervalPadding=at,i.dodgePadding=Rt,i.maxColumnWidth=Kt,i.minColumnWidth=te,i.columnWidthRatio=Ae,i.roseWidthRatio=hr,i.multiplePieWidthRatio=Tr,i.zIndexReversed=Dr,i.sortZIndex=cn,i.useDeferredLabel=Qr?typeof Qr=="number"?Qr:1/0:null,i}return e.prototype.position=function(t){var i=t;(0,b.PO)(t)||(i={fields:Ls(t)});var o=(0,b.U2)(i,"fields");return o.length===1&&(o.unshift("1"),(0,b.t8)(i,"fields",o)),(0,b.t8)(this.attributeOption,"position",i),this},e.prototype.color=function(t,i){return this.createAttrOption("color",t,i),this},e.prototype.shape=function(t,i){return this.createAttrOption("shape",t,i),this},e.prototype.size=function(t,i){return this.createAttrOption("size",t,i),this},e.prototype.adjust=function(t){var i=t;return((0,b.HD)(t)||(0,b.PO)(t))&&(i=[t]),(0,b.S6)(i,function(o,c){(0,b.Kn)(o)||(i[c]={type:o})}),this.adjustOption=i,this},e.prototype.style=function(t,i){if((0,b.HD)(t)){var o=Ls(t);this.styleOption={fields:o,callback:i}}else{var c=t,o=c.fields,p=c.callback,g=c.cfg;o||p||g?this.styleOption=t:this.styleOption={cfg:t}}return this},e.prototype.tooltip=function(t,i){if((0,b.HD)(t)){var o=Ls(t);this.tooltipOption={fields:o,callback:i}}else this.tooltipOption=t;return this},e.prototype.animate=function(t){return this.animateOption=t,this},e.prototype.label=function(t,i,o){if((0,b.HD)(t)){var c={},p=Ls(t);c.fields=p,(0,b.mf)(i)?c.callback=i:(0,b.PO)(i)&&(c.cfg=i),o&&(c.cfg=o),this.labelOption=c}else this.labelOption=t;return this},e.prototype.state=function(t){return this.stateOption=t,this},e.prototype.customInfo=function(t){return this.customOption=t,this},e.prototype.init=function(t){t===void 0&&(t={}),this.setCfg(t),this.initAttributes(),this.processData(this.data),this.adjustScale()},e.prototype.update=function(t){t===void 0&&(t={});var i=t.data,o=t.isDataChanged,c=t.isCoordinateChanged,p=this,g=p.attributeOption,_=p.lastAttributeOption;(0,b.Xy)(g,_)?i&&(o||!(0,b.Xy)(i,this.data))?(this.setCfg(t),this.initAttributes(),this.processData(i)):this.setCfg(t):this.init(t),this.adjustScale(),this.isCoordinateChanged=c},e.prototype.paint=function(t){var i=this;t===void 0&&(t=!1),this.animateOption&&(this.animateOption=(0,b.b$)({},Jr(this.type,this.coordinate),this.animateOption)),this.defaultSize=void 0,this.elementsMap={},this.elements=[];var o=this.getOffscreenGroup();o.clear();var c=this.beforeMappingData,p=this.beforeMapping(c);this.dataArray=new Array(p.length);for(var g=0;g<p.length;g++){var _=p[g];this.dataArray[g]=this.mapping(_)}if(this.updateElements(this.dataArray,t),this.lastElementsMap=this.elementsMap,this.canDoGroupAnimation(t)){var S=this.container,I=this.type,L=this.coordinate,F=(0,b.U2)(this.animateOption,"appear"),z=this.getYScale(),V=L.convert({x:0,y:z.scale(this.getYMinValue())});yn(S,F,I,L,V)}if(this.labelOption){var Q=this.useDeferredLabel,st=function(){return i.renderLabels((0,b.xH)(i.dataArray),t)}.bind(this);if(typeof Q=="number"){var at=typeof Q=="number"&&Q!==1/0?Q:0;if(!window.requestIdleCallback)setTimeout(st,at);else{var Rt=at&&at!==1/0?{timeout:at}:void 0;window.requestIdleCallback(st,Rt)}}else st()}this.lastAttributeOption=(0,P.pi)({},this.attributeOption),this.visible===!1&&this.changeVisible(!1)},e.prototype.clear=function(){var t=this,i=t.container,o=t.geometryLabel,c=t.offscreenGroup;i&&i.clear(),o&&o.clear(),c&&c.clear(),this.scaleDefs=void 0,this.attributes={},this.scales={},this.elementsMap={},this.lastElementsMap={},this.elements=[],this.adjusts={},this.dataArray=null,this.beforeMappingData=null,this.lastAttributeOption=void 0,this.defaultSize=void 0,this.idFields=[],this.groupScales=void 0,this.hasSorted=!1,this.isCoordinateChanged=!1},e.prototype.destroy=function(){this.clear();var t=this.container;t.remove(!0),this.offscreenGroup&&(this.offscreenGroup.remove(!0),this.offscreenGroup=null),this.geometryLabel&&(this.geometryLabel.destroy(),this.geometryLabel=null),this.theme=void 0,this.shapeFactory=void 0,r.prototype.destroy.call(this)},e.prototype.getGroupScales=function(){return this.groupScales},e.prototype.getAttribute=function(t){return this.attributes[t]},e.prototype.getXScale=function(){return this.getAttribute("position").scales[0]},e.prototype.getYScale=function(){return this.getAttribute("position").scales[1]},e.prototype.getGroupAttributes=function(){var t=[];return(0,b.S6)(this.attributes,function(i){ge.includes(i.type)&&t.push(i)}),t},e.prototype.getDefaultValue=function(t){var i,o=this.getAttribute(t);return o&&(0,b.xb)(o.scales)&&(i=o.values[0]),i},e.prototype.getAttributeValues=function(t,i){for(var o=[],c=t.scales,p=0,g=c.length;p<g;p++){var _=c[p],S=_.field;_.isIdentity?o.push(_.values):o.push(i[S])}return t.mapping.apply(t,(0,P.ev)([],(0,P.CR)(o),!1))},e.prototype.getAdjust=function(t){return this.adjusts[t]},e.prototype.getCoordinate=function(){return this.coordinate},e.prototype.getData=function(){return this.data},e.prototype.getShapeMarker=function(t,i){var o=this.getShapeFactory();return o.getMarker(t,i)},e.prototype.getElementsBy=function(t){return this.elements.filter(function(i){return t(i)})},e.prototype.getElements=function(){return this.elements},e.prototype.getElementId=function(t){t=(0,b.kJ)(t)?t[0]:t;var i=t[Ge];if(this.idFields.length){for(var o=i[this.idFields[0]],c=1;c<this.idFields.length;c++)o+="-"+i[this.idFields[c]];return o}var p=this.type,g=this.getXScale(),_=this.getYScale(),S=g.field||"x",I=_.field||"y",L=i[I],F;g.type==="identity"?F=g.values[0]:F=i[S];var z;p==="interval"||p==="schema"?z="".concat(F):p==="line"||p==="area"||p==="path"?z=p:z="".concat(F,"-").concat(L);for(var V=this.groupScales,c=0,Q=V.length;c<Q;c++){var st=V[c],at=st.field;z="".concat(z,"-").concat(i[at])}var Rt=this.getAdjust("dodge");if(Rt){var Kt=Rt.dodgeBy;Kt&&(z="".concat(z,"-").concat(i[Kt]))}return this.getAdjust("jitter")&&(z="".concat(z,"-").concat(t.x,"-").concat(t.y)),z},e.prototype.getScaleFields=function(){var t=[],i=new Map,o=this,c=o.attributeOption,p=o.labelOption,g=o.tooltipOption;for(var _ in c)if(c.hasOwnProperty(_)){var S=c[_];S.fields?lf(S.fields,t,i):S.values&&lf(S.values,t,i)}return p&&p.fields&&lf(p.fields,t,i),(0,b.Kn)(g)&&g.fields&&lf(g.fields,t,i),t},e.prototype.changeVisible=function(t){r.prototype.changeVisible.call(this,t);for(var i=this.elements,o=0,c=i.length;o<c;o++){var p=i[o];p.changeVisible(t)}t?(this.container&&this.container.show(),this.labelsContainer&&this.labelsContainer.show()):(this.container&&this.container.hide(),this.labelsContainer&&this.labelsContainer.hide())},e.prototype.getFields=function(){var t=new Map,i=[];return Object.values(this.attributeOption).forEach(function(o){var c=(o==null?void 0:o.fields)||[];c.forEach(function(p){t.has(p)||i.push(p),t.set(p,!0)})},[]),i},e.prototype.getGroupFields=function(){for(var t=[],i=new Map,o=0,c=ge.length;o<c;o++){var p=ge[o],g=this.attributeOption[p];g&&g.fields&&lf(g.fields,t,i)}return t},e.prototype.getXYFields=function(){var t=(0,P.CR)(this.attributeOption.position.fields,2),i=t[0],o=t[1];return[i,o]},e.prototype.getXField=function(){return(0,b.U2)(this.getXYFields(),[0])},e.prototype.getYField=function(){return(0,b.U2)(this.getXYFields(),[1])},e.prototype.getShapes=function(){return this.elements.map(function(t){return t.shape})},e.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},e.prototype.sort=function(t){if(!this.hasSorted)for(var i=this.getXScale(),o=i.field,c=0;c<t.length;c++){var p=t[c];p.sort(function(g,_){return i.translate(g[Ge][o])-i.translate(_[Ge][o])})}this.hasSorted=!0},e.prototype.adjustScale=function(){var t=this.getYScale();t&&this.getAdjust("stack")&&this.updateStackRange(t,this.beforeMappingData)},e.prototype.getShapeFactory=function(){var t=this.shapeType;if(Ho(t))return this.shapeFactory||(this.shapeFactory=(0,b.d9)(Ho(t))),this.shapeFactory.coordinate=this.coordinate,this.shapeFactory.theme=this.theme.geometries[t]||{},this.shapeFactory},e.prototype.createShapePointsCfg=function(t){var i=this.getXScale(),o=this.getYScale(),c=this.normalizeValues(t[i.field],i),p;return o?p=this.normalizeValues(t[o.field],o):p=t.y?t.y:.1,{x:c,y:p,y0:o?o.scale(this.getYMinValue()):void 0}},e.prototype.createElement=function(t,i,o){o===void 0&&(o=!1);var c=this.container,p=this.getDrawCfg(t),g=this.getShapeFactory(),_=new Ti({shapeFactory:g,container:c,offscreenGroup:this.getOffscreenGroup(),elementIndex:i});return _.animate=this.animateOption,_.geometry=this,_.draw(p,o),_},e.prototype.getDrawCfg=function(t){var i=t[Ge],o={mappingData:t,data:i,x:t.x,y:t.y,color:t.color,size:t.size,isInCircle:this.coordinate.isPolar,customInfo:this.customOption},c=t.shape;!c&&this.getShapeFactory()&&(c=this.getShapeFactory().defaultShapeType),o.shape=c;var p=this.theme.geometries[this.shapeType];o.defaultStyle=(0,b.U2)(p,[c,"default"],{}).style,!o.defaultStyle&&this.getShapeFactory()&&(o.defaultStyle=this.getShapeFactory().getDefaultStyle(p));var g=this.styleOption;return g&&(o.style=this.getStyleCfg(g,i)),this.generatePoints&&(o.points=t.points,o.nextPoints=t.nextPoints),o},e.prototype.updateElements=function(t,i){var o,c,p,g,_,S;i===void 0&&(i=!1);for(var I=new Map,L=[],F=new Map,z=0,V=0;V<t.length;V++)for(var Q=t[V],st=0;st<Q.length;st++){var at=Q[st],Rt=this.getElementId(at),Kt=I.has(Rt)?"".concat(Rt,"-").concat(V,"-").concat(st):Rt;L.push(Kt),I.set(Kt,at),F.set(Kt,z),z++}this.elements=new Array(z);var te=Ds(this.lastElementsMap,L),Ae=te.added,hr=te.updated,Tr=te.removed;try{for(var Dr=(0,P.XA)(Ae),cn=Dr.next();!cn.done;cn=Dr.next()){var Rt=cn.value,at=I.get(Rt),V=F.get(Rt),Qr=this.createElement(at,V,i);this.elements[V]=Qr,this.elementsMap[Rt]=Qr,Qr.shape&&Qr.shape.set("zIndex",this.zIndexReversed?this.elements.length-V:V)}}catch(Gi){o={error:Gi}}finally{try{cn&&!cn.done&&(c=Dr.return)&&c.call(Dr)}finally{if(o)throw o.error}}try{for(var Tn=(0,P.XA)(hr),xi=Tn.next();!xi.done;xi=Tn.next()){var Rt=xi.value,Qr=this.lastElementsMap[Rt],at=I.get(Rt),va=this.getDrawCfg(at),Aa=Qr.getModel(),V=F.get(Rt);(this.isCoordinateChanged||ru(va,Aa))&&(Qr.animate=this.animateOption,Qr.update(va)),this.elements[V]=Qr,this.elementsMap[Rt]=Qr,Qr.shape&&Qr.shape.set("zIndex",this.zIndexReversed?this.elements.length-V:V)}}catch(Gi){p={error:Gi}}finally{try{xi&&!xi.done&&(g=Tn.return)&&g.call(Tn)}finally{if(p)throw p.error}}this.container&&this.container.sort();try{for(var ao=(0,P.XA)(Tr),Gn=ao.next();!Gn.done;Gn=ao.next()){var Rt=Gn.value,Qr=this.lastElementsMap[Rt];Qr.animate=this.animateOption,Qr.destroy()}}catch(Gi){_={error:Gi}}finally{try{Gn&&!Gn.done&&(S=ao.return)&&S.call(ao)}finally{if(_)throw _.error}}},e.prototype.getLabelType=function(){var t=this,i=t.labelOption,o=t.coordinate,c=t.type,p=o.type,g=o.isTransposed,_=(0,b.U2)(i,["cfg","type"]);return _||(p==="polar"?_=g?"pie":"polar":p==="theta"?_="pie":c==="interval"||c==="polygon"?_="interval":_="base"),_},e.prototype.getYMinValue=function(){var t=this.getYScale(),i=t.min,o=t.max,c;return i>=0?c=i:o<=0?c=o:c=0,c},e.prototype.createAttrOption=function(t,i,o){if((0,b.UM)(i)||(0,b.Kn)(i))(0,b.Kn)(i)&&(0,b.Xy)(Object.keys(i),["values"])?(0,b.t8)(this.attributeOption,t,{fields:i.values}):(0,b.t8)(this.attributeOption,t,i);else{var c={};(0,b.hj)(i)?c.values=[i]:c.fields=Ls(i),o&&((0,b.mf)(o)?c.callback=o:c.values=o),(0,b.t8)(this.attributeOption,t,c)}},e.prototype.initAttributes=function(){var t=this,i=this,o=i.attributes,c=i.attributeOption,p=i.theme,g=i.shapeType;this.groupScales=[];var _={},S=function(F){if(c.hasOwnProperty(F)){var z=c[F];if(!z)return{value:void 0};var V=(0,P.pi)({},z),Q=V.callback,st=V.values,at=V.fields,Rt=at===void 0?[]:at,Kt=Rt.map(function(Ae){var hr=t.scales[Ae];if(!_[Ae]&&ge.includes(F)){var Tr=Vo(hr,(0,b.U2)(t.scaleDefs,Ae),F,t.type);Tr==="cat"&&(t.groupScales.push(hr),_[Ae]=!0)}return hr});V.scales=Kt,F!=="position"&&Kt.length===1&&Kt[0].type==="identity"?V.values=Kt[0].values:!Q&&!st&&(F==="size"?V.values=p.sizes:F==="shape"?V.values=p.shapes[g]||[]:F==="color"&&(Kt.length?V.values=Kt[0].values.length<=10?p.colors10:p.colors20:V.values=p.colors10));var te=Af(F);o[F]=new te(V)}};for(var I in c){var L=S(I);if(typeof L=="object")return L.value}},e.prototype.processData=function(t){var i,o;this.hasSorted=!1;for(var c=this.getAttribute("position").scales,p=c.filter(function(Tr){return Tr.isCategory}),g=this.groupData(t),_=[],S=0,I=g.length;S<I;S++){for(var L=g[S],F=[],z=0,V=L.length;z<V;z++){var Q=L[z],st={};for(var at in Q)st[at]=Q[at];st[Ge]=Q;try{for(var Rt=(i=void 0,(0,P.XA)(p)),Kt=Rt.next();!Kt.done;Kt=Rt.next()){var te=Kt.value,Ae=te.field;st[Ae]=te.translate(st[Ae])}}catch(Tr){i={error:Tr}}finally{try{Kt&&!Kt.done&&(o=Rt.return)&&o.call(Rt)}finally{if(i)throw i.error}}F.push(st)}_.push(F)}var hr=this.adjustData(_);return this.beforeMappingData=hr,hr},e.prototype.adjustData=function(t){var i=this.adjustOption,o=this,c=o.intervalPadding,p=o.dodgePadding,g=o.theme,_=this.maxColumnWidth||g.maxColumnWidth,S=this.minColumnWidth||g.minColumnWidth,I=this.columnWidthRatio||g.columnWidthRatio,L=t;if(i){var F=this.getXScale(),z=this.getYScale(),V=F.field,Q=z?z.field:null,st=Ah(this.coordinate),at=F.values.length,Rt=this.getAttribute("size"),Kt=void 0;Rt&&(Kt=Rt.values[0]);for(var te=0,Ae=i.length;te<Ae;te++){var hr=i[te],Tr=(0,P.pi)({xField:V,yField:Q,intervalPadding:c,dodgePadding:p,xDimensionLength:st,groupNum:at,defaultSize:Kt,maxColumnWidth:_,minColumnWidth:S,columnWidthRatio:I},hr),Dr=hr.type;if(Dr==="dodge"){var cn=[];if(F.isCategory||F.type==="identity")cn.push("x");else if(!z)cn.push("y");else throw new Error("dodge is not support linear attribute, please use category attribute!");Tr.adjustNames=cn,Tr.dodgeRatio=I}else if(Dr==="stack"){var Qr=this.coordinate;if(!z){Tr.height=Qr.getHeight();var Tn=this.getDefaultValue("size")||3;Tr.size=Tn}!Qr.isTransposed&&(0,b.UM)(Tr.reverseOrder)&&(Tr.reverseOrder=!0)}var xi=$t(Dr);Tr.dimValuesMap={},F&&F.values&&(Tr.dimValuesMap[F.field]=F.values.map(function(Aa){return F.translate(Aa)}));var va=new xi(Tr);L=va.process(L),this.adjusts[Dr]=va}}return L},e.prototype.groupData=function(t){for(var i=this.getGroupScales(),o=this.scaleDefs,c={},p=[],g=0;g<i.length;g++){var _=i[g],S=_.field;p.push(S),(0,b.U2)(o,[S,"values"])&&(c[S]=o[S].values)}return Zs(t,p,c)},e.prototype.updateStackRange=function(t,i){for(var o=(0,b.xH)(i),c=t.field,p=t.min,g=t.max,_=0;_<o.length;_++){var S=o[_],I=Math.min.apply(null,S[c]),L=Math.max.apply(null,S[c]);I<p&&(p=I),L>g&&(g=L)}var F=this.scaleDefs,z={};p<t.min&&!(0,b.U2)(F,[c,"min"])&&(z.min=p),g>t.max&&!(0,b.U2)(F,[c,"max"])&&(z.max=g),t.change(z)},e.prototype.beforeMapping=function(t){var i=t;if(this.sortable&&this.sort(i),this.generatePoints)for(var o=0,c=i.length;o<c;o++){var p=i[o];this.generateShapePoints(p);var g=i[o+1];g&&(this.generateShapePoints(g),p[0].nextPoints=g[0].points)}return i},e.prototype.generateShapePoints=function(t){for(var i=this.getShapeFactory(),o=this.getAttribute("shape"),c=0;c<t.length;c++){var p=t[c],g=this.createShapePointsCfg(p),_=o?this.getAttributeValues(o,p):null,S=i.getShapePoints(_,g);p.points=S}},e.prototype.normalizeValues=function(t,i){var o=[];if((0,b.kJ)(t))for(var c=0;c<t.length;c++){var p=t[c];o.push(i.scale(p))}else o=i.scale(t);return o},e.prototype.mapping=function(t){for(var i=this.attributes,o=[],c=0;c<t.length;c++){var p=t[c],g={_origin:p[Ge],points:p.points,nextPoints:p.nextPoints};for(var _ in i)if(i.hasOwnProperty(_)){var S=i[_],I=S.names,L=this.getAttributeValues(S,p);if(I.length>1)for(var F=0;F<L.length;F+=1){var z=L[F],V=I[F];g[V]=(0,b.kJ)(z)&&z.length===1?z[0]:z}else g[I[0]]=L.length===1?L[0]:L}this.convertPoint(g),o.push(g)}return o},e.prototype.convertPoint=function(t){var i=t.x,o=t.y,c,p,g,_=this.coordinate;if((0,b.kJ)(i)&&(0,b.kJ)(o)){c=[],p=[];for(var S=0,I=0,L=i.length,F=o.length;S<L&&I<F;S+=1,I+=1)g=_.convert({x:i[S],y:o[I]}),c.push(g.x),p.push(g.y)}else if((0,b.kJ)(o)){p=[];for(var z=0;z<o.length;z++){var V=o[z];g=_.convert({x:i,y:V}),c&&c!==g.x?((0,b.kJ)(c)||(c=[c]),c.push(g.x)):c=g.x,p.push(g.y)}}else if((0,b.kJ)(i)){c=[];for(var z=0;z<i.length;z++){var Q=i[z];g=_.convert({x:Q,y:o}),p&&p!==g.y?((0,b.kJ)(p)||(p=[p]),p.push(g.y)):p=g.y,c.push(g.x)}}else{var st=_.convert({x:i,y:o});c=st.x,p=st.y}t.x=c,t.y=p},e.prototype.getStyleCfg=function(t,i){var o=t.fields,c=o===void 0?[]:o,p=t.callback,g=t.cfg;if(g)return g;var _=c.map(function(S){return i[S]});return p.apply(void 0,(0,P.ev)([],(0,P.CR)(_),!1))},e.prototype.setCfg=function(t){var i=this,o=t.coordinate,c=t.data,p=t.theme,g=t.scaleDefs;o&&(this.coordinate=o),c&&(this.data=c),g&&(this.scaleDefs=g,this.idFields=[],(0,b.S6)(g,function(_,S){_&&_.key&&i.idFields.push(S)})),p&&(this.theme=this.userTheme?(0,b.b$)({},p,this.userTheme):p)},e.prototype.renderLabels=function(t,i){return i===void 0&&(i=!1),(0,P.mG)(this,void 0,void 0,function(){var o,c,p,g,_,S,I,L,F,z,V,Q,st=this;return(0,P.Jh)(this,function(at){switch(at.label){case 0:return o=this.geometryLabel,this.emit(rt.BEFORE_RENDER_LABEL),o||(c=this.getLabelType(),p=da(c),o=new p(this),this.geometryLabel=o),[4,o.render(t,i)];case 1:at.sent(),g=o.labelsRenderer.shapesMap,_=new Map,(0,b.S6)(g,function(Rt,Kt){for(var te=Rt.getChildren()||[],Ae=0;Ae<te.length;Ae++){var hr=te[Ae],Tr=st.elementsMap[hr.get("elementId")||Kt.split(" ")[0]];if(Tr){hr.cfg.name=["element","label"],hr.cfg.element=Tr;var Dr=_.get(Tr)||new Set;Dr.add(Rt),_.set(Tr,Dr)}}});try{for(S=(0,P.XA)(_.entries()),I=S.next();!I.done;I=S.next())L=(0,P.CR)(I.value,2),F=L[0],z=L[1],F.labelShape=(0,P.ev)([],(0,P.CR)(z),!1)}catch(Rt){V={error:Rt}}finally{try{I&&!I.done&&(Q=S.return)&&Q.call(S)}finally{if(V)throw V.error}}return this.emit(rt.AFTER_RENDER_LABEL),[2]}})})},e.prototype.canDoGroupAnimation=function(t){return!t&&this.animateOption&&((0,b.U2)(this.animateOption,"appear")===void 0||(0,b.U2)(this.animateOption,"appear")&&(0,b.U2)(this.animateOption,["appear","animation"])===void 0)},e}(ee),Vs=cu,Eu=no.vs;function Wu(r,e,t){var i=Eu(r.getMatrix(),[["t",e,t]]);r.setMatrix(i)}function ml(r,e){var t=r.attr(),i=t.x,o=t.y,c=Eu(r.getMatrix(),[["t",-i,-o],["r",e],["t",i,o]]);return c}function Tl(r,e){var t=ml(r,e);r.setMatrix(t)}function Du(){return[1,0,0,0,1,0,0,0,1]}function yl(r,e){var t=r.getBBox(),i=(t.minX+t.maxX)/2,o=(t.minY+t.maxY)/2;r.applyToMatrix([i,o,1]);var c=Eu(r.getMatrix(),[["t",-i,-o],["s",e,e],["t",i,o]]);r.setMatrix(c)}function Ja(r){return r.find(function(e){return e.get("type")==="text"})}function ms(r,e,t){t===void 0&&(t=[0,0,0,0]);var i=r&&r.getChildren()[0];if(i){var o=i.clone();e!=null&&e.rotate&&Tl(o,-e.rotate);var c=o.getCanvasBBox(),p=c.x,g=c.y,_=c.width,S=c.height;o.destroy();var I=t;return(0,b.UM)(I)?I=[2,2,2,2]:(0,b.hj)(I)&&(I=new Array(4).fill(I)),{x:p-I[3],y:g-I[0],width:_+I[1]+I[3],height:S+I[0]+I[2],rotation:(e==null?void 0:e.rotate)||0}}return{x:0,y:0,width:0,height:0,rotation:0}}function fs(r,e,t){t===void 0&&(t=0);var i=Math.max(0,Math.min(r.x+r.width+t,e.x+e.width+t)-Math.max(r.x-t,e.x-t)),o=Math.max(0,Math.min(r.y+r.height+t,e.y+e.height+t)-Math.max(r.y-t,e.y-t));return i*o}function Bo(r,e){var t=r.getBBox();return(0,b.G)(e,function(i){var o=i.getBBox();return fs(t,o,2)>0})}function Ql(r,e,t){var i=t.data,o=t.origin,c=t.animateCfg,p=t.coordinate,g=(0,b.U2)(c,"update");r.set("data",i),r.set("origin",o),r.set("animateCfg",c),r.set("coordinate",p),r.set("visible",e.get("visible")),(r.getChildren()||[]).forEach(function(_,S){var I=e.getChildByIndex(S);if(!I)r.removeChild(_),_.remove(!0);else{_.set("data",i),_.set("origin",o),_.set("animateCfg",c),_.set("coordinate",p);var L=Rg(_,I);g?ln(_,g,{toAttrs:L,coordinate:p}):_.attr(L),I.isGroup()&&Ql(_,I,t)}}),(0,b.S6)(e.getChildren(),function(_,S){S>=r.getCount()&&(_.destroyed||r.add(_))})}var Nl=function(){function r(e){this.shapesMap={};var t=e.layout,i=e.container;this.layout=t,this.container=i}return r.prototype.render=function(e,t,i){return i===void 0&&(i=!1),(0,P.mG)(this,void 0,void 0,function(){var o,c,p,g,_,S,I,L,F=this;return(0,P.Jh)(this,function(z){switch(z.label){case 0:if(o={},c=this.createOffscreenGroup(),!e.length)return[3,2];try{for(p=(0,P.XA)(e),g=p.next();!g.done;g=p.next())_=g.value,_&&(o[_.id]=this.renderLabel(_,c))}catch(V){I={error:V}}finally{try{g&&!g.done&&(L=p.return)&&L.call(p)}finally{if(I)throw I.error}}return[4,this.doLayout(e,t,o)];case 1:z.sent(),this.renderLabelLine(e,o),this.renderLabelBackground(e,o),this.adjustLabel(e,o),z.label=2;case 2:return S=this.shapesMap,(0,b.S6)(o,function(V,Q){if(V.destroyed)delete o[Q];else{if(S[Q]){var st=V.get("data"),at=V.get("origin"),Rt=V.get("coordinate"),Kt=V.get("animateCfg"),te=S[Q];Ql(te,o[Q],{data:st,origin:at,animateCfg:Kt,coordinate:Rt}),o[Q]=te}else{if(F.container.destroyed)return;F.container.add(V);var Ae=(0,b.U2)(V.get("animateCfg"),i?"enter":"appear");Ae&&ln(V,Ae,{toAttrs:(0,P.pi)({},V.attr()),coordinate:V.get("coordinate")})}delete S[Q]}}),(0,b.S6)(S,function(V){var Q=(0,b.U2)(V.get("animateCfg"),"leave");Q?ln(V,Q,{toAttrs:null,coordinate:V.get("coordinate")}):V.remove(!0)}),this.shapesMap=o,c.destroy(),[2]}})})},r.prototype.clear=function(){this.container.clear(),this.shapesMap={}},r.prototype.destroy=function(){this.container.destroy(),this.shapesMap=null},r.prototype.renderLabel=function(e,t){var i=e.id,o=e.elementId,c=e.data,p=e.mappingData,g=e.coordinate,_=e.animate,S=e.content,I=e.capture,L={id:i,elementId:o,capture:I,data:c,origin:(0,P.pi)((0,P.pi)({},p),{data:p[Ge]}),coordinate:g},F=t.addGroup((0,P.pi)({name:"label",animateCfg:this.animate===!1||_===null||_===!1?!1:(0,b.b$)({},this.animate,_)},L)),z;if(S.isGroup&&S.isGroup()||S.isShape&&S.isShape()){var V=S.getCanvasBBox(),Q=V.width,st=V.height,at=(0,b.U2)(e,"textAlign","left"),Rt=e.x,Kt=e.y-st/2;at==="center"?Rt=Rt-Q/2:(at==="right"||at==="end")&&(Rt=Rt-Q),Wu(S,Rt,Kt),z=S,F.add(S)}else{var te=(0,b.U2)(e,["style","fill"]);z=F.addShape("text",(0,P.pi)({attrs:(0,P.pi)((0,P.pi)({x:e.x,y:e.y,textAlign:e.textAlign,textBaseline:(0,b.U2)(e,"textBaseline","middle"),text:e.content},e.style),{fill:(0,b.Ft)(te)?e.color:te})},L))}return e.rotate&&Tl(z,e.rotate),F},r.prototype.doLayout=function(e,t,i){return(0,P.mG)(this,void 0,void 0,function(){var o,c=this;return(0,P.Jh)(this,function(p){switch(p.label){case 0:return this.layout?(o=(0,b.kJ)(this.layout)?this.layout:[this.layout],[4,Promise.all(o.map(function(g){var _=Ri((0,b.U2)(g,"type",""));if(_){var S=[],I=[];return(0,b.S6)(i,function(L,F){S.push(L),I.push(t[L.get("elementId")])}),_(e,S,I,c.region,g.cfg)}}))]):[3,2];case 1:p.sent(),p.label=2;case 2:return[2]}})})},r.prototype.renderLabelLine=function(e,t){(0,b.S6)(e,function(i){var o=(0,b.U2)(i,"coordinate");if(!(!i||!o)){var c=o.getCenter(),p=o.getRadius();if(i.labelLine){var g=(0,b.U2)(i,"labelLine",{}),_=i.id,S=g.path;if(!S){var I=bs(c.x,c.y,p,i.angle);S=[["M",I.x,I.y],["L",i.x,i.y]]}var L=t[_];L.destroyed||L.addShape("path",{capture:!1,attrs:(0,P.pi)({path:S,stroke:i.color?i.color:(0,b.U2)(i,["style","fill"],"#000"),fill:null},g.style),id:_,origin:i.mappingData,data:i.data,coordinate:i.coordinate})}}})},r.prototype.renderLabelBackground=function(e,t){(0,b.S6)(e,function(i){var o=(0,b.U2)(i,"coordinate"),c=(0,b.U2)(i,"background");if(!(!c||!o)){var p=i.id,g=t[p];if(!g.destroyed){var _=g.getChildren()[0];if(_){var S=ms(g,i,c.padding),I=S.rotation,L=(0,P._T)(S,["rotation"]),F=g.addShape("rect",{attrs:(0,P.pi)((0,P.pi)({},L),c.style||{}),id:p,origin:i.mappingData,data:i.data,coordinate:i.coordinate});if(F.setZIndex(-1),I){var z=_.getMatrix();F.setMatrix(z)}}}}})},r.prototype.createOffscreenGroup=function(){var e=this.container,t=e.getGroupBase(),i=new t({});return i},r.prototype.adjustLabel=function(e,t){(0,b.S6)(e,function(i){if(i){var o=i.id,c=t[o];if(!c.destroyed){var p=c.findAll(function(g){return g.get("type")!=="path"});(0,b.S6)(p,function(g){g&&(i.offsetX&&g.attr("x",g.attr("x")+i.offsetX),i.offsetY&&g.attr("y",g.attr("y")+i.offsetY))})}}})},r}(),Bs=Nl;function wu(r){var e=0;return(0,b.S6)(r,function(t){e+=t}),e/r.length}var al=function(){function r(e){this.geometry=e}return r.prototype.getLabelItems=function(e){var t=this,i=[],o=this.getLabelCfgs(e);return(0,b.S6)(e,function(c,p){var g=o[p];if(!g||(0,b.UM)(c.x)||(0,b.UM)(c.y)){i.push(null);return}var _=(0,b.kJ)(g.content)?g.content:[g.content];g.content=_;var S=_.length;(0,b.S6)(_,function(I,L){if((0,b.UM)(I)||I===""){i.push(null);return}var F=(0,P.pi)((0,P.pi)({},g),t.getLabelPoint(g,c,L));F.textAlign||(F.textAlign=t.getLabelAlign(F,L,S)),F.offset<=0&&(F.labelLine=null),i.push(F)})}),i},r.prototype.render=function(e,t){return t===void 0&&(t=!1),(0,P.mG)(this,void 0,void 0,function(){var i,o,c;return(0,P.Jh)(this,function(p){switch(p.label){case 0:return i=this.getLabelItems(e),o=this.getLabelsRenderer(),c=this.getGeometryShapes(),[4,o.render(i,c,t)];case 1:return p.sent(),[2]}})})},r.prototype.clear=function(){var e=this.labelsRenderer;e&&e.clear()},r.prototype.destroy=function(){var e=this.labelsRenderer;e&&e.destroy(),this.labelsRenderer=null},r.prototype.getCoordinate=function(){return this.geometry.coordinate},r.prototype.getDefaultLabelCfg=function(e,t){var i=this.geometry,o=i.type,c=i.theme;return o==="polygon"||o==="interval"&&t==="middle"||e<0&&!["line","point","path"].includes(o)?(0,b.U2)(c,"innerLabels",{}):(0,b.U2)(c,"labels",{})},r.prototype.getThemedLabelCfg=function(e){var t=this.geometry,i=this.getDefaultLabelCfg(),o=t.type,c=t.theme,p;return o==="polygon"||e.offset<0&&!["line","point","path"].includes(o)?p=(0,b.b$)({},i,c.innerLabels,e):p=(0,b.b$)({},i,c.labels,e),p},r.prototype.setLabelPosition=function(e,t,i,o){},r.prototype.getLabelOffset=function(e){var t=this.getCoordinate(),i=this.getOffsetVector(e);return t.isTransposed?i[0]:i[1]},r.prototype.getLabelOffsetPoint=function(e,t,i){var o=e.offset,c=this.getCoordinate(),p=c.isTransposed,g=p?"x":"y",_=p?1:-1,S={x:0,y:0};return t>0||i===1?S[g]=o*_:S[g]=o*_*-1,S},r.prototype.getLabelPoint=function(e,t,i){var o=this.getCoordinate(),c=e.content.length;function p(st,at,Rt){Rt===void 0&&(Rt=!1);var Kt=st;return(0,b.kJ)(Kt)&&(e.content.length===1?Rt?Kt=wu(Kt):Kt.length<=2?Kt=Kt[st.length-1]:Kt=wu(Kt):Kt=Kt[at]),Kt}var g={content:e.content[i],x:0,y:0,start:{x:0,y:0},color:"#fff"},_=(0,b.kJ)(t.shape)?t.shape[0]:t.shape,S=_==="funnel"||_==="pyramid";if(this.geometry.type==="polygon"){var I=Fg(t.x,t.y);g.x=I[0],g.y=I[1]}else this.geometry.type==="interval"&&!S?(g.x=p(t.x,i,!0),g.y=p(t.y,i)):(g.x=p(t.x,i),g.y=p(t.y,i));if(S){var L=(0,b.U2)(t,"nextPoints"),F=(0,b.U2)(t,"points");if(L){var z=o.convert(F[1]),V=o.convert(L[1]);g.x=(z.x+V.x)/2,g.y=(z.y+V.y)/2}else if(_==="pyramid"){var z=o.convert(F[1]),V=o.convert(F[2]);g.x=(z.x+V.x)/2,g.y=(z.y+V.y)/2}}e.position&&this.setLabelPosition(g,t,i,e.position);var Q=this.getLabelOffsetPoint(e,i,c);return g.start={x:g.x,y:g.y},g.x+=Q.x,g.y+=Q.y,g.color=t.color,g},r.prototype.getLabelAlign=function(e,t,i){var o="center",c=this.getCoordinate();if(c.isTransposed){var p=e.offset;p<0?o="right":p===0?o="center":o="left",i>1&&t===0&&(o==="right"?o="left":o==="left"&&(o="right"))}return o},r.prototype.getLabelId=function(e){var t=this.geometry,i=t.type,o=t.getXScale(),c=t.getYScale(),p=e[Ge],g=t.getElementId(e);return i==="line"||i==="area"?g+=" ".concat(p[o.field]):i==="path"&&(g+=" ".concat(p[o.field],"-").concat(p[c.field])),g},r.prototype.getLabelsRenderer=function(){var e=this.geometry,t=e.labelsContainer,i=e.labelOption,o=e.canvasRegion,c=e.animateOption,p=this.geometry.coordinate,g=this.labelsRenderer;return g||(g=new Bs({container:t,layout:(0,b.U2)(i,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=g),g.region=o,g.animate=c?Jr("label",p):!1,g},r.prototype.getLabelCfgs=function(e){var t=this,i=this.geometry,o=i.labelOption,c=i.scales,p=i.coordinate,g=o,_=g.fields,S=g.callback,I=g.cfg,L=_.map(function(z){return c[z]}),F=[];return(0,b.S6)(e,function(z,V){var Q=z[Ge],st=t.getLabelText(Q,L),at;if(S){var Rt=_.map(function(Tr){return Q[Tr]});if(at=S.apply(void 0,(0,P.ev)([],(0,P.CR)(Rt),!1)),(0,b.UM)(at)){F.push(null);return}}var Kt=(0,P.pi)((0,P.pi)({id:t.getLabelId(z),elementId:t.geometry.getElementId(z),data:Q,mappingData:z,coordinate:p},I),at);(0,b.mf)(Kt.position)&&(Kt.position=Kt.position(Q,z,V));var te=t.getLabelOffset(Kt.offset||0),Ae=t.getDefaultLabelCfg(te,Kt.position);Kt=(0,b.b$)({},Ae,Kt),Kt.offset=t.getLabelOffset(Kt.offset||0);var hr=Kt.content;(0,b.mf)(hr)?Kt.content=hr(Q,z,V):(0,b.o8)(hr)&&(Kt.content=st[0]),F.push(Kt)}),F},r.prototype.getLabelText=function(e,t){var i=[];return(0,b.S6)(t,function(o){var c=e[o.field];(0,b.kJ)(c)?c=c.map(function(p){return o.getText(p)}):c=o.getText(c),(0,b.UM)(c)||c===""?i.push(null):i.push(c)}),i},r.prototype.getOffsetVector=function(e){e===void 0&&(e=0);var t=this.getCoordinate(),i=0;return(0,b.hj)(e)&&(i=e),t.isTransposed?t.applyMatrix(i,0):t.applyMatrix(0,i)},r.prototype.getGeometryShapes=function(){var e=this.geometry,t={};return(0,b.S6)(e.elementsMap,function(i,o){t[o]=i.shape}),(0,b.S6)(e.getOffscreenGroup().getChildren(),function(i){var o=e.getElementId(i.get("origin").mappingData);t[o]=i}),t},r}(),Fo=al;function ah(r,e,t){if(!r)return t;var i;if(r.callback&&r.callback.length>1){var o=Array(r.callback.length-1).fill("");i=r.mapping.apply(r,(0,P.ev)([e],(0,P.CR)(o),!1)).join("")}else i=r.mapping(e).join("");return i||t}var Ml={hexagon:function(r,e,t){var i=t/2*Math.sqrt(3);return[["M",r,e-t],["L",r+i,e-t/2],["L",r+i,e+t/2],["L",r,e+t],["L",r-i,e+t/2],["L",r-i,e-t/2],["Z"]]},bowtie:function(r,e,t){var i=t-1.5;return[["M",r-t,e-i],["L",r+t,e+i],["L",r+t,e-i],["L",r-t,e+i],["Z"]]},cross:function(r,e,t){return[["M",r-t,e-t],["L",r+t,e+t],["M",r+t,e-t],["L",r-t,e+t]]},tick:function(r,e,t){return[["M",r-t/2,e-t],["L",r+t/2,e-t],["M",r,e-t],["L",r,e+t],["M",r-t/2,e+t],["L",r+t/2,e+t]]},plus:function(r,e,t){return[["M",r-t,e],["L",r+t,e],["M",r,e-t],["L",r,e+t]]},hyphen:function(r,e,t){return[["M",r-t,e],["L",r+t,e]]},line:function(r,e,t){return[["M",r,e-t],["L",r,e+t]]}},ep=["line","cross","tick","plus","hyphen"];function Su(r,e){return(0,b.mf)(e)?e(r):(0,b.b$)({},r,e)}function rp(r,e){var t=r.symbol;if((0,b.HD)(t)&&ep.indexOf(t)!==-1){var i=(0,b.U2)(r,"style",{}),o=(0,b.U2)(i,"lineWidth",1),c=i.stroke||i.fill||e;r.style=(0,b.b$)({},r.style,{lineWidth:o,stroke:c,fill:null})}}function Nf(r){var e=r.symbol;(0,b.HD)(e)&&Ml[e]&&(r.symbol=Ml[e])}function kd(r){return r.startsWith(le.LEFT)||r.startsWith(le.RIGHT)?"vertical":"horizontal"}function Ld(r,e,t,i,o){var c=t.getScale(t.type);if(c.isCategory){var p=c.field,g=e.getAttribute("color"),_=e.getAttribute("shape"),S=r.getTheme().defaultColor,I=e.coordinate.isPolar;return c.getTicks().map(function(L,F){var z,V=L.text,Q=L.value,st=V,at=c.invert(Q),Rt=r.filterFieldData(p,[(z={},z[p]=at,z)]).length===0;(0,b.S6)(r.views,function(Tr){var Dr;Tr.filterFieldData(p,[(Dr={},Dr[p]=at,Dr)]).length||(Rt=!0)});var Kt=ah(g,at,S),te=ah(_,at,"point"),Ae=e.getShapeMarker(te,{color:Kt,isInPolar:I}),hr=o;return(0,b.mf)(hr)&&(hr=hr(st,F,(0,P.pi)({name:st,value:at},(0,b.b$)({},i,Ae)))),Ae=(0,b.b$)({},i,Ae,$l((0,P.pi)({},hr),["style"])),rp(Ae,Kt),hr&&hr.style&&(Ae.style=Su(Ae.style,hr.style)),Nf(Ae),{id:at,name:st,value:at,marker:Ae,unchecked:Rt}})}return[]}function l0(r,e,t){return t.map(function(i,o){var c=e;(0,b.mf)(c)&&(c=c(i.name,o,(0,b.b$)({},r,i)));var p=(0,b.mf)(i.marker)?i.marker(i.name,o,(0,b.b$)({},r,i)):i.marker,g=(0,b.b$)({},r,c,p);return Nf(g),i.marker=g,i})}function np(r,e){var t=(0,b.U2)(r,["components","legend"],{});return(0,b.b$)({},(0,b.U2)(t,["common"],{}),(0,b.b$)({},(0,b.U2)(t,[e],{})))}function Pd(r){return r?!1:r==null||isNaN(r)}function q0(r){if((0,b.kJ)(r))return Pd(r[1].y);var e=r.y;return(0,b.kJ)(e)?Pd(e[0]):Pd(e)}function oh(r,e,t){if(e===void 0&&(e=!1),t===void 0&&(t=!0),!r.length||r.length===1&&!t)return[];if(e){for(var i=[],o=0,c=r.length;o<c;o++){var p=r[o];q0(p)||i.push(p)}return[i]}for(var g=[],_=[],o=0,c=r.length;o<c;o++){var p=r[o];q0(p)?_.length&&(_.length===1&&!t||g.push(_),_=[]):_.push(p)}return _.length&&g.push(_),g}function xv(r){for(var e=[],t=0;t<r.length;t++){var i=r[t];if(i){var o=t===0?"M":"L";e.push([o,i.x,i.y])}}var c=r[0];return c&&(e.push(["L",c.x,c.y]),e.push(["z"])),e}function bv(r){for(var e=r.length/2,t=[],i=[],o=0;o<r.length;o++)o<e?t.push(r[o]):i.push(r[o]);var c=di(t,!1),p=di(i,!1);i.length&&c.push(["L",i[0].x,i[0].y]),p.shift();var g=c.concat(p);return t.length&&g.push(["L",t[0].x,t[0].y]),g.push(["z"]),g}function $s(r,e,t,i){i===void 0&&(i="");var o=r.style,c=o===void 0?{}:o,p=r.defaultStyle,g=r.color,_=r.size,S=(0,P.pi)((0,P.pi)({},p),c);return g&&(e&&(c.stroke||(S.stroke=g)),t&&(c.fill||(S.fill=g))),i&&(0,b.UM)(c[i])&&!(0,b.UM)(_)&&(S[i]=_),S}function ol(r){return(0,b.b$)({},{fill:"#CCD6EC",fillOpacity:.3},(0,b.U2)(r,["background","style"]))}function pf(r){var e=r.x,t=(0,b.kJ)(r.y)?r.y:[r.y];return t.map(function(i,o){return{x:(0,b.kJ)(e)?e[o]:e,y:i}})}var Od={line:function(r,e,t){return[["M",r-t,e],["L",r+t,e]]},dot:function(r,e,t){return[["M",r-t,e],["L",r+t,e]]},dash:function(r,e,t){return[["M",r-t,e],["L",r+t,e]]},smooth:function(r,e,t){return[["M",r-t,e],["A",t/2,t/2,0,1,1,r,e],["A",t/2,t/2,0,1,0,r+t,e]]},hv:function(r,e,t){return[["M",r-t-1,e-2.5],["L",r,e-2.5],["L",r,e+2.5],["L",r+t+1,e+2.5]]},vh:function(r,e,t){return[["M",r-t-1,e+2.5],["L",r,e+2.5],["L",r,e-2.5],["L",r+t+1,e-2.5]]},hvh:function(r,e,t){return[["M",r-(t+1),e+2.5],["L",r-t/2,e+2.5],["L",r-t/2,e-2.5],["L",r+t/2,e-2.5],["L",r+t/2,e+2.5],["L",r+t+1,e+2.5]]},vhv:function(r,e){return[["M",r-5,e+2.5],["L",r-5,e],["L",r,e],["L",r,e-3],["L",r,e+3],["L",r+6.5,e+3]]}};function Ih(r,e){var t=r.color;return{symbol:Od[e],style:{lineWidth:2,r:6,stroke:t}}}function Fd(r,e,t){for(var i=r.isStack,o=r.connectNulls,c=r.isInCircle,p=r.showSinglePoint,g=$s(r,!0,!1,"lineWidth"),_=oh(r.points,o,p),S=[],I=0,L=_.length;I<L;I++){var F=_[I];S=S.concat(Ev(F,c,i,e,t,g))}return g.path=S,g}function Yp(r,e,t,i,o){if(r.length===1)return[["M",r[0].x,r[0].y-o.lineWidth/2],["L",r[0].x,r[0].y],["L",r[0].x,r[0].y+o.lineWidth/2]];var c;return t?(e&&r.length&&r.push({x:r[0].x,y:r[0].y}),c=di(r,!1,i)):(c=Vn(r,!1),e&&c.push(["Z"])),c}function c0(r,e,t,i,o,c){var p=[],g=[];(0,b.S6)(r,function(I){var L=pf(I);p.push(L[1]),g.push(L[0])});var _=Yp(p,e,i,o,c),S=Yp(g,e,i,o,c);return t?_:_.concat(S)}function Ev(r,e,t,i,o,c){if(r.length){var p=r[0];return(0,b.kJ)(p.y)?c0(r,e,t,i,o,c):Yp(r,e,i,o,c)}return[]}var K0=po("line",{defaultShapeType:"line"});(0,b.S6)(["line","dot","dash","smooth"],function(r){wi("line",r,{draw:function(e,t){var i=r==="smooth",o;if(i){var c=this.coordinate,p=c.start,g=c.end;o=[[p.x,g.y],[g.x,p.y]]}var _=Fd(e,i,o),S=t.addShape({type:"path",attrs:_,name:"line",capture:!i});return S},getMarker:function(e){return Ih(e,r)}})});var Dg=null,$p="4.2.9",hs={getLegendItems:Ld,translate:Wu,rotate:Tl,zoom:yl,transform:Eu,getAngle:Jf,getSectorPath:Cc,polarToCartesian:bs,getDelegationObject:pi,getTooltipItems:Kl,getMappingValue:ah,getPath:Ev,getPathPoints:oh},df={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},is={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},Jl=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E86452","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],wv=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#E86452","#F8D0CB","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],Rd=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],f0=function(r){r===void 0&&(r={});var e=r.paletteQualitative10,t=e===void 0?Jl:e,i=r.paletteQualitative20,o=i===void 0?wv:i,c=r.brandColor,p=c===void 0?t[0]:c,g={backgroundColor:"#141414",brandColor:p,subColor:"rgba(255,255,255,0.05)",paletteQualitative10:t,paletteQualitative20:o,paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",paletteSequence:Rd,fontFamily:`"Segoe UI", Roboto, "Helvetica Neue", Arial,
|
|
"Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
|
|
"Noto Color Emoji"`,axisLineBorderColor:is[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:is[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:df[85],axisTickLineBorderColor:is[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:is[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:is[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:is[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:is[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:Jl[0],legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:is[65],legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",legendItemSpacing:24,legendItemMarginBottom:12,legendSpacing:16,legendPadding:[8,8,8,8],legendHorizontalPadding:[8,0,8,0],legendVerticalPadding:[0,8,0,8],legendPageNavigatorMarkerSize:12,legendPageNavigatorMarkerInactiveFillColor:is[45],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:is[45],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:is[65],legendPageNavigatorTextFontSize:12,sliderRailFillColor:is[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:is[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:df[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:df[25],annotationArcBorderColor:is[15],annotationArcBorder:1,annotationLineBorderColor:is[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:is[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:is[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:is[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"#1f1f1f",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 2px 4px rgba(0,0,0,.5)",tooltipContainerBorderRadius:3,tooltipTextFillColor:is[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:is[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:df[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:is[65],overflowLabelFillColorDark:"#2c3542",overflowLabelFillColorLight:"#ffffff",overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:df[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:is[25],cSliderRailHieght:16,cSliderBackgroundFillColor:"#416180",cSliderBackgroundFillOpacity:.05,cSliderForegroundFillColor:"#5B8FF9",cSliderForegroundFillOpacity:.15,cSliderHandlerHeight:24,cSliderHandlerWidth:10,cSliderHandlerFillColor:"#F7F7F7",cSliderHandlerFillOpacity:1,cSliderHandlerHighlightFillColor:"#FFF",cSliderHandlerBorderColor:"#BFBFBF",cSliderHandlerBorder:1,cSliderHandlerBorderRadius:2,cSliderTextFillColor:"#fff",cSliderTextFillOpacity:.45,cSliderTextFontSize:12,cSliderTextLineHeight:12,cSliderTextFontWeight:"normal",cSliderTextBorderColor:null,cSliderTextBorder:0,scrollbarTrackFillColor:"rgba(255,255,255,0.65)",scrollbarThumbFillColor:"rgba(0,0,0,0.35)",scrollbarThumbHighlightFillColor:"rgba(0,0,0,0.45)",pointFillColor:Jl[0],pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:df[100],pointBorderOpacity:1,pointActiveBorderColor:is[100],pointSelectedBorder:2,pointSelectedBorderColor:is[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:Jl[0],hollowPointBorderOpacity:.95,hollowPointFillColor:df[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:is[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:is[100],hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:Jl[0],lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:Jl[0],areaFillOpacity:.25,areaActiveFillColor:Jl[0],areaActiveFillOpacity:.5,areaSelectedFillColor:Jl[0],areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:Jl[0],hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:is[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:is[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:Jl[0],intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:is[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:is[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:Jl[0],hollowIntervalBorderOpacity:1,hollowIntervalFillColor:df[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:is[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:is[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3};return(0,P.pi)((0,P.pi)({},g),r)},Dd=f0();function h0(){return window?window.devicePixelRatio:1}function Bd(r,e,t,i){var o=r-t,c=e-i;return Math.sqrt(o*o+c*c)}function ip(r,e,t,i,o,c){return o>=r&&o<=r+t&&c>=e&&c<=e+i}function Sv(r,e){return!(e.minX>r.maxX||e.maxX<r.minX||e.minY>r.maxY||e.maxY<r.minY)}function Bg(r,e){return!r||!e?r||e:{minX:Math.min(r.minX,e.minX),minY:Math.min(r.minY,e.minY),maxX:Math.max(r.maxX,e.maxX),maxY:Math.max(r.maxY,e.maxY)}}function ne(r,e){return r[0]===e[0]&&r[1]===e[1]}var Q0=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,yy=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Cv=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,qs=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function vf(r,e){var t=r.match(qs);(0,b.S6)(t,function(i){var o=i.split(":");e.addColorStop(o[0],o[1])})}function _y(r,e,t){var i=Q0.exec(t),o=parseFloat(i[1])%360*(Math.PI/180),c=i[2],p=e.getBBox(),g,_;o>=0&&o<1/2*Math.PI?(g={x:p.minX,y:p.minY},_={x:p.maxX,y:p.maxY}):1/2*Math.PI<=o&&o<Math.PI?(g={x:p.maxX,y:p.minY},_={x:p.minX,y:p.maxY}):Math.PI<=o&&o<3/2*Math.PI?(g={x:p.maxX,y:p.maxY},_={x:p.minX,y:p.minY}):(g={x:p.minX,y:p.maxY},_={x:p.maxX,y:p.minY});var S=Math.tan(o),I=S*S,L=(_.x-g.x+S*(_.y-g.y))/(I+1)+g.x,F=S*(_.x-g.x+S*(_.y-g.y))/(I+1)+g.y,z=r.createLinearGradient(g.x,g.y,L,F);return vf(c,z),z}function ap(r,e,t){var i=yy.exec(t),o=parseFloat(i[1]),c=parseFloat(i[2]),p=parseFloat(i[3]),g=i[4];if(p===0){var _=g.match(qs);return _[_.length-1].split(":")[1]}var S=e.getBBox(),I=S.maxX-S.minX,L=S.maxY-S.minY,F=Math.sqrt(I*I+L*L)/2,z=r.createRadialGradient(S.minX+I*o,S.minY+L*c,0,S.minX+I/2,S.minY+L/2,p*F);return vf(g,z),z}function op(r,e,t){if(e.get("patternSource")&&e.get("patternSource")===t)return e.get("pattern");var i,o,c=Cv.exec(t),p=c[1],g=c[2];function _(){i=r.createPattern(o,p),e.set("pattern",i),e.set("patternSource",t)}switch(p){case"a":p="repeat";break;case"x":p="repeat-x";break;case"y":p="repeat-y";break;case"n":p="no-repeat";break;default:p="no-repeat"}return o=new Image,g.match(/^data:/i)||(o.crossOrigin="Anonymous"),o.src=g,o.complete?_():(o.onload=_,o.src=o.src),i}function Ng(r,e,t){var i=e.getBBox();if(isNaN(i.x)||isNaN(i.y)||isNaN(i.width)||isNaN(i.height))return t;if((0,b.HD)(t)){if(t[1]==="("||t[2]==="("){if(t[0]==="l")return _y(r,e,t);if(t[0]==="r")return ap(r,e,t);if(t[0]==="p")return op(r,e,t)}return t}if(t instanceof CanvasPattern)return t}function p0(r){var e=0,t=0,i=0,o=0;return(0,b.kJ)(r)?r.length===1?e=t=i=o=r[0]:r.length===2?(e=i=r[0],t=o=r[1]):r.length===3?(e=r[0],t=o=r[1],i=r[2]):(e=r[0],t=r[1],i=r[2],o=r[3]):e=t=i=o=r,[e,t,i,o]}function Vc(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function Nd(r,e){return Vc(r)*Vc(e)?(r[0]*e[0]+r[1]*e[1])/(Vc(r)*Vc(e)):1}function zd(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(Nd(r,e))}function Ud(r,e){var t=e[1],i=e[2],o=(0,b.wQ)((0,b.c$)(e[3]),Math.PI*2),c=e[4],p=e[5],g=r[0],_=r[1],S=e[6],I=e[7],L=Math.cos(o)*(g-S)/2+Math.sin(o)*(_-I)/2,F=-1*Math.sin(o)*(g-S)/2+Math.cos(o)*(_-I)/2,z=L*L/(t*t)+F*F/(i*i);z>1&&(t*=Math.sqrt(z),i*=Math.sqrt(z));var V=t*t*(F*F)+i*i*(L*L),Q=V?Math.sqrt((t*t*(i*i)-V)/V):1;c===p&&(Q*=-1),isNaN(Q)&&(Q=0);var st=i?Q*t*F/i:0,at=t?Q*-i*L/t:0,Rt=(g+S)/2+Math.cos(o)*st-Math.sin(o)*at,Kt=(_+I)/2+Math.sin(o)*st+Math.cos(o)*at,te=[(L-st)/t,(F-at)/i],Ae=[(-1*L-st)/t,(-1*F-at)/i],hr=zd([1,0],te),Tr=zd(te,Ae);return Nd(te,Ae)<=-1&&(Tr=Math.PI),Nd(te,Ae)>=1&&(Tr=0),p===0&&Tr>0&&(Tr=Tr-2*Math.PI),p===1&&Tr<0&&(Tr=Tr+2*Math.PI),{cx:Rt,cy:Kt,rx:ne(r,[S,I])?0:t,ry:ne(r,[S,I])?0:i,startAngle:hr,endAngle:hr+Tr,xRotation:o,arcFlag:c,sweepFlag:p}}var Zd=Math.sin,Vd=Math.cos,d0=Math.atan2,sp=Math.PI;function J0(r,e,t,i,o,c,p){var g=e.stroke,_=e.lineWidth,S=t-o,I=i-c,L=d0(I,S),F=new Wd({type:"path",canvas:r.get("canvas"),isArrowShape:!0,attrs:{path:"M"+10*Vd(sp/6)+","+10*Zd(sp/6)+" L0,0 L"+10*Vd(sp/6)+",-"+10*Zd(sp/6),stroke:g,lineWidth:_}});F.translate(o,c),F.rotateAtPoint(o,c,L),r.set(p?"startArrowShape":"endArrowShape",F)}function Av(r,e,t,i,o,c,p){var g=e.startArrow,_=e.endArrow,S=e.stroke,I=e.lineWidth,L=p?g:_,F=L.d,z=L.fill,V=L.stroke,Q=L.lineWidth,st=(0,P._T)(L,["d","fill","stroke","lineWidth"]),at=t-o,Rt=i-c,Kt=d0(Rt,at);F&&(o=o-Vd(Kt)*F,c=c-Zd(Kt)*F);var te=new Wd({type:"path",canvas:r.get("canvas"),isArrowShape:!0,attrs:(0,P.pi)((0,P.pi)({},st),{stroke:V||S,lineWidth:Q||I,fill:z})});te.translate(o,c),te.rotateAtPoint(o,c,Kt),r.set(p?"startArrowShape":"endArrowShape",te)}function up(r,e,t,i,o){var c=d0(i-e,t-r);return{dx:Vd(c)*o,dy:Zd(c)*o}}function v0(r,e,t,i,o,c){typeof e.startArrow=="object"?Av(r,e,t,i,o,c,!0):e.startArrow?J0(r,e,t,i,o,c,!0):r.set("startArrowShape",null)}function tg(r,e,t,i,o,c){typeof e.endArrow=="object"?Av(r,e,t,i,o,c,!1):e.endArrow?J0(r,e,t,i,o,c,!1):r.set("startArrowShape",null)}var Ic={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function kh(r,e){var t=e.attr();for(var i in t){var o=t[i],c=Ic[i]?Ic[i]:i;c==="matrix"&&o?r.transform(o[0],o[1],o[3],o[4],o[6],o[7]):c==="lineDash"&&r.setLineDash?(0,b.kJ)(o)&&r.setLineDash(o):(c==="strokeStyle"||c==="fillStyle"?o=Ng(r,e,o):c==="globalAlpha"&&(o=o*r.globalAlpha),r[c]=o)}}function eg(r,e,t){for(var i=0;i<e.length;i++){var o=e[i];o.cfg.visible?o.draw(r,t):o.skipDraw()}}function Lh(r,e,t){var i=r.get("refreshElements");(0,b.S6)(i,function(o){if(o!==r)for(var c=o.cfg.parent;c&&c!==r&&!c.cfg.refresh;)c.cfg.refresh=!0,c=c.cfg.parent}),i[0]===r?lp(e,t):zg(e,t)}function zg(r,e){for(var t=0;t<r.length;t++){var i=r[t];if(i.cfg.visible)if(i.cfg.hasChanged)i.cfg.refresh=!0,i.isGroup()&&lp(i.cfg.children,e);else if(i.cfg.refresh)i.isGroup()&&zg(i.cfg.children,e);else{var o=Tv(i,e);i.cfg.refresh=o,o&&i.isGroup()&&zg(i.cfg.children,e)}}}function tc(r){for(var e=0;e<r.length;e++){var t=r[e];t.cfg.hasChanged=!1,t.isGroup()&&!t.destroyed&&tc(t.cfg.children)}}function lp(r,e){for(var t=0;t<r.length;t++){var i=r[t];i.cfg.refresh=!0,i.isGroup()&&lp(i.get("children"),e)}}function Tv(r,e){var t=r.cfg.cacheCanvasBBox,i=r.cfg.isInView&&t&&Sv(t,e);return i}function Gd(r,e,t,i){var o=t.path,c=t.startArrow,p=t.endArrow;if(o){var g=[0,0],_=[0,0],S={dx:0,dy:0};e.beginPath();for(var I=0;I<o.length;I++){var L=o[I],F=L[0];if(I===0&&c&&c.d){var z=r.getStartTangent();S=up(z[0][0],z[0][1],z[1][0],z[1][1],c.d)}else if(I===o.length-2&&o[I+1][0]==="Z"&&p&&p.d){var V=o[I+1];if(V[0]==="Z"){var z=r.getEndTangent();S=up(z[0][0],z[0][1],z[1][0],z[1][1],p.d)}}else if(I===o.length-1&&p&&p.d&&o[0]!=="Z"){var z=r.getEndTangent();S=up(z[0][0],z[0][1],z[1][0],z[1][1],p.d)}var Q=S.dx,st=S.dy;switch(F){case"M":e.moveTo(L[1]-Q,L[2]-st),_=[L[1],L[2]];break;case"L":e.lineTo(L[1]-Q,L[2]-st);break;case"Q":e.quadraticCurveTo(L[1],L[2],L[3]-Q,L[4]-st);break;case"C":e.bezierCurveTo(L[1],L[2],L[3],L[4],L[5]-Q,L[6]-st);break;case"A":{var at=void 0;i?(at=i[I],at||(at=Ud(g,L),i[I]=at)):at=Ud(g,L);var Rt=at.cx,Kt=at.cy,te=at.rx,Ae=at.ry,hr=at.startAngle,Tr=at.endAngle,Dr=at.xRotation,cn=at.sweepFlag;if(e.ellipse)e.ellipse(Rt,Kt,te,Ae,Dr,hr,Tr,1-cn);else{var Qr=te>Ae?te:Ae,Tn=te>Ae?1:te/Ae,xi=te>Ae?Ae/te:1;e.translate(Rt,Kt),e.rotate(Dr),e.scale(Tn,xi),e.arc(0,0,Qr,hr,Tr,1-cn),e.scale(1/Tn,1/xi),e.rotate(-Dr),e.translate(-Rt,-Kt)}break}case"Z":e.closePath();break;default:break}if(F==="Z")g=_;else{var va=L.length;g=[L[va-2],L[va-1]]}}}}function Hd(r,e){var t=r.get("canvas");t&&(e==="remove"&&(r._cacheCanvasBBox=r.get("cacheCanvasBBox")),r.get("hasChanged")||(r.set("hasChanged",!0),r.cfg.parent&&r.cfg.parent.get("hasChanged")||(t.refreshElement(r,e,t),t.get("autoDraw")&&t.draw())))}function Mv(r){var e;if(r.destroyed)e=r._cacheCanvasBBox;else{var t=r.get("cacheCanvasBBox"),i=t&&!!(t.width&&t.height),o=r.getCanvasBBox(),c=o&&!!(o.width&&o.height);i&&c?e=Bg(t,o):i?e=t:c&&(e=o)}return e}function Iv(r){if(!r.length)return null;var e=[],t=[],i=[],o=[];return(0,b.S6)(r,function(c){var p=Mv(c);p&&(e.push(p.minX),t.push(p.minY),i.push(p.maxX),o.push(p.maxY))}),{minX:(0,b.VV)(e),minY:(0,b.VV)(t),maxX:(0,b.Fp)(i),maxY:(0,b.Fp)(o)}}function Ug(r,e){return!r||!e||!Sv(r,e)?null:{minX:Math.max(r.minX,e.minX),minY:Math.max(r.minY,e.minY),maxX:Math.min(r.maxX,e.maxX),maxY:Math.min(r.maxY,e.maxY)}}var Zg=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onCanvasChange=function(t){Hd(this,t)},e.prototype.getShapeBase=function(){return et},e.prototype.getGroupBase=function(){return e},e.prototype._applyClip=function(t,i){i&&(t.save(),kh(t,i),i.createPath(t),t.restore(),t.clip(),i._afterDraw())},e.prototype.cacheCanvasBBox=function(){var t=this.cfg.children,i=[],o=[];(0,b.S6)(t,function(F){var z=F.cfg.cacheCanvasBBox;z&&F.cfg.isInView&&(i.push(z.minX,z.maxX),o.push(z.minY,z.maxY))});var c=null;if(i.length){var p=(0,b.VV)(i),g=(0,b.Fp)(i),_=(0,b.VV)(o),S=(0,b.Fp)(o);c={minX:p,minY:_,x:p,y:_,maxX:g,maxY:S,width:g-p,height:S-_};var I=this.cfg.canvas;if(I){var L=I.getViewRange();this.set("isInView",Sv(c,L))}}else this.set("isInView",!1);this.set("cacheCanvasBBox",c)},e.prototype.draw=function(t,i){var o=this.cfg.children,c=i?this.cfg.refresh:!0;o.length&&c&&(t.save(),kh(t,this),this._applyClip(t,this.getClip()),eg(t,o,i),t.restore(),this.cacheCanvasBBox()),this.cfg.refresh=null,this.set("hasChanged",!1)},e.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("hasChanged",!1)},e}(me.AbstractGroup),g0=Zg,m0=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},e.prototype.getShapeBase=function(){return et},e.prototype.getGroupBase=function(){return g0},e.prototype.onCanvasChange=function(t){Hd(this,t)},e.prototype.calculateBBox=function(){var t=this.get("type"),i=this.getHitLineWidth(),o=(0,me.getBBoxMethod)(t),c=o(this),p=i/2,g=c.x-p,_=c.y-p,S=c.x+c.width+p,I=c.y+c.height+p;return{x:g,minX:g,y:_,minY:_,width:c.width+i,height:c.height+i,maxX:S,maxY:I}},e.prototype.isFill=function(){return!!this.attrs.fill||this.isClipShape()},e.prototype.isStroke=function(){return!!this.attrs.stroke},e.prototype._applyClip=function(t,i){i&&(t.save(),kh(t,i),i.createPath(t),t.restore(),t.clip(),i._afterDraw())},e.prototype.draw=function(t,i){var o=this.cfg.clipShape;if(i){if(this.cfg.refresh===!1){this.set("hasChanged",!1);return}var c=this.getCanvasBBox();if(!Sv(i,c)){this.set("hasChanged",!1),this.cfg.isInView&&this._afterDraw();return}}t.save(),kh(t,this),this._applyClip(t,o),this.drawPath(t),t.restore(),this._afterDraw()},e.prototype.getCanvasViewBox=function(){var t=this.cfg.canvas;return t?t.getViewRange():null},e.prototype.cacheCanvasBBox=function(){var t=this.getCanvasViewBox();if(t){var i=this.getCanvasBBox(),o=Sv(i,t);this.set("isInView",o),o?this.set("cacheCanvasBBox",i):this.set("cacheCanvasBBox",null)}},e.prototype._afterDraw=function(){this.cacheCanvasBBox(),this.set("hasChanged",!1),this.set("refresh",null)},e.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("isInView",null),this.set("hasChanged",!1)},e.prototype.drawPath=function(t){this.createPath(t),this.strokeAndFill(t),this.afterDrawPath(t)},e.prototype.fill=function(t){t.fill()},e.prototype.stroke=function(t){t.stroke()},e.prototype.strokeAndFill=function(t){var i=this.attrs,o=i.lineWidth,c=i.opacity,p=i.strokeOpacity,g=i.fillOpacity;this.isFill()&&(!(0,b.UM)(g)&&g!==1?(t.globalAlpha=g,this.fill(t),t.globalAlpha=c):this.fill(t)),this.isStroke()&&o>0&&(!(0,b.UM)(p)&&p!==1&&(t.globalAlpha=p),this.stroke(t)),this.afterDrawPath(t)},e.prototype.createPath=function(t){},e.prototype.afterDrawPath=function(t){},e.prototype.isInShape=function(t,i){var o=this.isStroke(),c=this.isFill(),p=this.getHitLineWidth();return this.isInStrokeOrPath(t,i,o,c,p)},e.prototype.isInStrokeOrPath=function(t,i,o,c,p){return!1},e.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},e}(me.AbstractShape),Gc=m0,cp=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{x:0,y:0,r:0})},e.prototype.isInStrokeOrPath=function(t,i,o,c,p){var g=this.attr(),_=g.x,S=g.y,I=g.r,L=p/2,F=Bd(_,S,t,i);return c&&o?F<=I+L:c?F<=I:o?F>=I-L&&F<=I+L:!1},e.prototype.createPath=function(t){var i=this.attr(),o=i.x,c=i.y,p=i.r;t.beginPath(),t.arc(o,c,p,0,Math.PI*2,!1),t.closePath()},e}(Gc),xy=cp;function qp(r,e,t,i){return r/(t*t)+e/(i*i)}var y0=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{x:0,y:0,rx:0,ry:0})},e.prototype.isInStrokeOrPath=function(t,i,o,c,p){var g=this.attr(),_=p/2,S=g.x,I=g.y,L=g.rx,F=g.ry,z=(t-S)*(t-S),V=(i-I)*(i-I);return c&&o?qp(z,V,L+_,F+_)<=1:c?qp(z,V,L,F)<=1:o?qp(z,V,L-_,F-_)>=1&&qp(z,V,L+_,F+_)<=1:!1},e.prototype.createPath=function(t){var i=this.attr(),o=i.x,c=i.y,p=i.rx,g=i.ry;if(t.beginPath(),t.ellipse)t.ellipse(o,c,p,g,0,0,Math.PI*2,!1);else{var _=p>g?p:g,S=p>g?1:p/g,I=p>g?g/p:1;t.save(),t.translate(o,c),t.scale(S,I),t.arc(0,0,_,0,Math.PI*2),t.restore(),t.closePath()}},e}(Gc),rg=y0;function jd(r){return r instanceof HTMLElement&&(0,b.HD)(r.nodeName)&&r.nodeName.toUpperCase()==="CANVAS"}var _0=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{x:0,y:0,width:0,height:0})},e.prototype.initAttrs=function(t){this._setImage(t.img)},e.prototype.isStroke=function(){return!1},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._afterLoading=function(){if(this.get("toDraw")===!0){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},e.prototype._setImage=function(t){var i=this,o=this.attrs;if((0,b.HD)(t)){var c=new Image;c.onload=function(){if(i.destroyed)return!1;i.attr("img",c),i.set("loading",!1),i._afterLoading();var p=i.get("callback");p&&p.call(i)},c.crossOrigin="Anonymous",c.src=t,this.set("loading",!0)}else t instanceof Image?(o.width||(o.width=t.width),o.height||(o.height=t.height)):jd(t)&&(o.width||(o.width=Number(t.getAttribute("width"))),o.height||(o.height,Number(t.getAttribute("height"))))},e.prototype.onAttrChange=function(t,i,o){r.prototype.onAttrChange.call(this,t,i,o),t==="img"&&this._setImage(i)},e.prototype.createPath=function(t){if(this.get("loading")){this.set("toDraw",!0),this.set("context",t);return}var i=this.attr(),o=i.x,c=i.y,p=i.width,g=i.height,_=i.sx,S=i.sy,I=i.swidth,L=i.sheight,F=i.img;(F instanceof Image||jd(F))&&(!(0,b.UM)(_)&&!(0,b.UM)(S)&&!(0,b.UM)(I)&&!(0,b.UM)(L)?t.drawImage(F,_,S,I,L,o,c,p,g):t.drawImage(F,o,c,p,g))},e}(Gc),ng=_0,_l=nt(62930);function zf(r,e,t,i,o,c,p){var g=Math.min(r,t),_=Math.max(r,t),S=Math.min(e,i),I=Math.max(e,i),L=o/2;return c>=g-L&&c<=_+L&&p>=S-L&&p<=I+L?_l.x1.pointToLine(r,e,t,i,c,p)<=o/2:!1}var fp=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.initAttrs=function(t){this.setArrow()},e.prototype.onAttrChange=function(t,i,o){r.prototype.onAttrChange.call(this,t,i,o),this.setArrow()},e.prototype.setArrow=function(){var t=this.attr(),i=t.x1,o=t.y1,c=t.x2,p=t.y2,g=t.startArrow,_=t.endArrow;g&&v0(this,t,c,p,i,o),_&&tg(this,t,i,o,c,p)},e.prototype.isInStrokeOrPath=function(t,i,o,c,p){if(!o||!p)return!1;var g=this.attr(),_=g.x1,S=g.y1,I=g.x2,L=g.y2;return zf(_,S,I,L,p,t,i)},e.prototype.createPath=function(t){var i=this.attr(),o=i.x1,c=i.y1,p=i.x2,g=i.y2,_=i.startArrow,S=i.endArrow,I={dx:0,dy:0},L={dx:0,dy:0};_&&_.d&&(I=up(o,c,p,g,i.startArrow.d)),S&&S.d&&(L=up(o,c,p,g,i.endArrow.d)),t.beginPath(),t.moveTo(o+I.dx,c+I.dy),t.lineTo(p-L.dx,g-L.dy)},e.prototype.afterDrawPath=function(t){var i=this.get("startArrowShape"),o=this.get("endArrowShape");i&&i.draw(t),o&&o.draw(t)},e.prototype.getTotalLength=function(){var t=this.attr(),i=t.x1,o=t.y1,c=t.x2,p=t.y2;return _l.x1.length(i,o,c,p)},e.prototype.getPoint=function(t){var i=this.attr(),o=i.x1,c=i.y1,p=i.x2,g=i.y2;return _l.x1.pointAt(o,c,p,g,t)},e}(Gc),kc=fp,kv={circle:function(r,e,t){return[["M",r-t,e],["A",t,t,0,1,0,r+t,e],["A",t,t,0,1,0,r-t,e]]},square:function(r,e,t){return[["M",r-t,e-t],["L",r+t,e-t],["L",r+t,e+t],["L",r-t,e+t],["Z"]]},diamond:function(r,e,t){return[["M",r-t,e],["L",r,e-t],["L",r+t,e],["L",r,e+t],["Z"]]},triangle:function(r,e,t){var i=t*Math.sin(.3333333333333333*Math.PI);return[["M",r-t,e+i],["L",r,e-i],["L",r+t,e+i],["Z"]]},"triangle-down":function(r,e,t){var i=t*Math.sin(.3333333333333333*Math.PI);return[["M",r-t,e-i],["L",r+t,e-i],["L",r,e+i],["Z"]]}},Vg=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.initAttrs=function(t){this._resetParamsCache()},e.prototype._resetParamsCache=function(){this.set("paramsCache",{})},e.prototype.onAttrChange=function(t,i,o){r.prototype.onAttrChange.call(this,t,i,o),["symbol","x","y","r","radius"].indexOf(t)!==-1&&this._resetParamsCache()},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._getR=function(t){return(0,b.UM)(t.r)?t.radius:t.r},e.prototype._getPath=function(){var t=this.attr(),i=t.x,o=t.y,c=t.symbol||"circle",p=this._getR(t),g,_;if((0,b.mf)(c))g=c,_=g(i,o,p),_=(0,xd.wb)(_);else{if(g=e.Symbols[c],!g)return console.warn(c+" marker is not supported."),null;_=g(i,o,p)}return _},e.prototype.createPath=function(t){var i=this._getPath(),o=this.get("paramsCache");Gd(this,t,{path:i},o)},e.Symbols=kv,e}(Gc),hp=Vg;function by(r,e,t){var i=(0,me.getOffScreenContext)();return r.createPath(i),i.isPointInPath(e,t)}var v_=1e-6;function Gg(r){return Math.abs(r)<v_?0:r<0?-1:1}function Ey(r,e,t){return(t[0]-r[0])*(e[1]-r[1])===(e[0]-r[0])*(t[1]-r[1])&&Math.min(r[0],e[0])<=t[0]&&t[0]<=Math.max(r[0],e[0])&&Math.min(r[1],e[1])<=t[1]&&t[1]<=Math.max(r[1],e[1])}function Hg(r,e,t){var i=!1,o=r.length;if(o<=2)return!1;for(var c=0;c<o;c++){var p=r[c],g=r[(c+1)%o];if(Ey(p,g,[e,t]))return!0;Gg(p[1]-t)>0!=Gg(g[1]-t)>0&&Gg(e-(t-p[1])*(p[0]-g[0])/(p[1]-g[1])-p[0])<0&&(i=!i)}return i}function pp(r,e,t,i,o,c,p,g){var _=(Math.atan2(g-e,p-r)+Math.PI*2)%(Math.PI*2);if(_<i||_>o)return!1;var S={x:r+t*Math.cos(_),y:e+t*Math.sin(_)};return Bd(S.x,S.y,p,g)<=c/2}var g_=no.vs;function m_(r){for(var e=!1,t=r.length,i=0;i<t;i++){var o=r[i],c=o[0];if(c==="C"||c==="A"||c==="Q"){e=!0;break}}return e}function Ph(r,e,t,i,o){for(var c=!1,p=e/2,g=0;g<r.length;g++){var _=r[g],S=_.currentPoint,I=_.params,L=_.prePoint,F=_.box;if(!(F&&!ip(F.x-p,F.y-p,F.width+e,F.height+e,t,i))){switch(_.command){case"L":case"Z":c=zf(L[0],L[1],S[0],S[1],e,t,i);break;case"Q":var z=_l.lD.pointDistance(L[0],L[1],I[1],I[2],I[3],I[4],t,i);c=z<=e/2;break;case"C":var V=_l.Ll.pointDistance(L[0],L[1],I[1],I[2],I[3],I[4],I[5],I[6],t,i,o);c=V<=e/2;break;case"A":var Q=_.arcParams,st=Q.cx,at=Q.cy,Rt=Q.rx,Kt=Q.ry,te=Q.startAngle,Ae=Q.endAngle,hr=Q.xRotation,Tr=[t,i,1],Dr=Rt>Kt?Rt:Kt,cn=Rt>Kt?1:Rt/Kt,Qr=Rt>Kt?Kt/Rt:1,Tn=g_(null,[["t",-st,-at],["r",-hr],["s",1/cn,1/Qr]]);qa.transformMat3(Tr,Tr,Tn),c=pp(0,0,Dr,te,Ae,e,Tr[0],Tr[1]);break;default:break}if(c)break}}return c}function x0(r){for(var e=r.length,t=[],i=[],o=[],c=0;c<e;c++){var p=r[c],g=p[0];g==="M"?(o.length&&(i.push(o),o=[]),o.push([p[1],p[2]])):g==="Z"?o.length&&(t.push(o),o=[]):o.push([p[1],p[2]])}return o.length>0&&i.push(o),{polygons:t,polylines:i}}var b0=(0,P.pi)({hasArc:m_,extractPolygons:x0,isPointInStroke:Ph},me.PathUtil);function Lv(r,e,t){for(var i=!1,o=0;o<r.length;o++){var c=r[o];if(i=Hg(c,e,t),i)break}return i}var wy=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{startArrow:!1,endArrow:!1})},e.prototype.initAttrs=function(t){this._setPathArr(t.path),this.setArrow()},e.prototype.onAttrChange=function(t,i,o){r.prototype.onAttrChange.call(this,t,i,o),t==="path"&&this._setPathArr(i),this.setArrow()},e.prototype._setPathArr=function(t){this.attrs.path=(0,xd.wb)(t);var i=b0.hasArc(t);this.set("hasArc",i),this.set("paramsCache",{}),this.set("segments",null),this.set("curve",null),this.set("tCache",null),this.set("totalLength",null)},e.prototype.getSegments=function(){var t=this.get("segements");return t||(t=(0,xd.zx)(this.attr("path")),this.set("segments",t)),t},e.prototype.setArrow=function(){var t=this.attr(),i=t.startArrow,o=t.endArrow;if(i){var c=this.getStartTangent();v0(this,t,c[0][0],c[0][1],c[1][0],c[1][1])}if(o){var c=this.getEndTangent();tg(this,t,c[0][0],c[0][1],c[1][0],c[1][1])}},e.prototype.isInStrokeOrPath=function(t,i,o,c,p){var g=this.getSegments(),_=this.get("hasArc"),S=!1;if(o){var I=this.getTotalLength();S=b0.isPointInStroke(g,p,t,i,I)}if(!S&&c)if(_)S=by(this,t,i);else{var L=this.attr("path"),F=b0.extractPolygons(L);S=Lv(F.polygons,t,i)||Lv(F.polylines,t,i)}return S},e.prototype.createPath=function(t){var i=this.attr(),o=this.get("paramsCache");Gd(this,t,i,o)},e.prototype.afterDrawPath=function(t){var i=this.get("startArrowShape"),o=this.get("endArrowShape");i&&i.draw(t),o&&o.draw(t)},e.prototype.getTotalLength=function(){var t=this.get("totalLength");return(0,b.UM)(t)?(this._calculateCurve(),this._setTcache(),this.get("totalLength")):t},e.prototype.getPoint=function(t){var i=this.get("tCache");i||(this._calculateCurve(),this._setTcache(),i=this.get("tCache"));var o,c,p=this.get("curve");if(!i||i.length===0)return p?{x:p[0][1],y:p[0][2]}:null;(0,b.S6)(i,function(I,L){t>=I[0]&&t<=I[1]&&(o=(t-I[0])/(I[1]-I[0]),c=L)});var g=p[c];if((0,b.UM)(g)||(0,b.UM)(c))return null;var _=g.length,S=p[c+1];return _l.Ll.pointAt(g[_-2],g[_-1],S[1],S[2],S[3],S[4],S[5],S[6],o)},e.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",b0.pathToCurve(t))},e.prototype._setTcache=function(){var t=0,i=0,o=[],c,p,g,_,S=this.get("curve");if(S){if((0,b.S6)(S,function(I,L){g=S[L+1],_=I.length,g&&(t+=_l.Ll.length(I[_-2],I[_-1],g[1],g[2],g[3],g[4],g[5],g[6])||0)}),this.set("totalLength",t),t===0){this.set("tCache",[]);return}(0,b.S6)(S,function(I,L){g=S[L+1],_=I.length,g&&(c=[],c[0]=i/t,p=_l.Ll.length(I[_-2],I[_-1],g[1],g[2],g[3],g[4],g[5],g[6]),i+=p||0,c[1]=i/t,o.push(c))}),this.set("tCache",o)}},e.prototype.getStartTangent=function(){var t=this.getSegments(),i;if(t.length>1){var o=t[0].currentPoint,c=t[1].currentPoint,p=t[1].startTangent;i=[],p?(i.push([o[0]-p[0],o[1]-p[1]]),i.push([o[0],o[1]])):(i.push([c[0],c[1]]),i.push([o[0],o[1]]))}return i},e.prototype.getEndTangent=function(){var t=this.getSegments(),i=t.length,o;if(i>1){var c=t[i-2].currentPoint,p=t[i-1].currentPoint,g=t[i-1].endTangent;o=[],g?(o.push([p[0]-g[0],p[1]-g[1]]),o.push([p[0],p[1]])):(o.push([c[0],c[1]]),o.push([p[0],p[1]]))}return o},e}(Gc),Wd=wy;function Sy(r,e,t,i,o){var c=r.length;if(c<2)return!1;for(var p=0;p<c-1;p++){var g=r[p][0],_=r[p][1],S=r[p+1][0],I=r[p+1][1];if(zf(g,_,S,I,e,t,i))return!0}if(o){var L=r[0],F=r[c-1];if(zf(L[0],L[1],F[0],F[1],e,t,i))return!0}return!1}var Cy=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.isInStrokeOrPath=function(t,i,o,c,p){var g=this.attr().points,_=!1;return o&&(_=Sy(g,p,t,i,!0)),!_&&c&&(_=Hg(g,t,i)),_},e.prototype.createPath=function(t){var i=this.attr(),o=i.points;if(!(o.length<2)){t.beginPath();for(var c=0;c<o.length;c++){var p=o[c];c===0?t.moveTo(p[0],p[1]):t.lineTo(p[0],p[1])}t.closePath()}},e}(Gc),y_=Cy,jg=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{startArrow:!1,endArrow:!1})},e.prototype.initAttrs=function(t){this.setArrow()},e.prototype.onAttrChange=function(t,i,o){r.prototype.onAttrChange.call(this,t,i,o),this.setArrow(),["points"].indexOf(t)!==-1&&this._resetCache()},e.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},e.prototype.setArrow=function(){var t=this.attr(),i=this.attrs,o=i.points,c=i.startArrow,p=i.endArrow,g=o.length,_=o[0][0],S=o[0][1],I=o[g-1][0],L=o[g-1][1];c&&v0(this,t,o[1][0],o[1][1],_,S),p&&tg(this,t,o[g-2][0],o[g-2][1],I,L)},e.prototype.isFill=function(){return!1},e.prototype.isInStrokeOrPath=function(t,i,o,c,p){if(!o||!p)return!1;var g=this.attr().points;return Sy(g,p,t,i,!1)},e.prototype.isStroke=function(){return!0},e.prototype.createPath=function(t){var i=this.attr(),o=i.points,c=i.startArrow,p=i.endArrow,g=o.length;if(!(o.length<2)){var _=o[0][0],S=o[0][1],I=o[g-1][0],L=o[g-1][1];if(c&&c.d){var F=up(_,S,o[1][0],o[1][1],c.d);_+=F.dx,S+=F.dy}if(p&&p.d){var F=up(o[g-2][0],o[g-2][1],I,L,p.d);I-=F.dx,L-=F.dy}t.beginPath(),t.moveTo(_,S);for(var z=0;z<g-1;z++){var V=o[z];t.lineTo(V[0],V[1])}t.lineTo(I,L)}},e.prototype.afterDrawPath=function(t){var i=this.get("startArrowShape"),o=this.get("endArrowShape");i&&i.draw(t),o&&o.draw(t)},e.prototype.getTotalLength=function(){var t=this.attr().points,i=this.get("totalLength");return(0,b.UM)(i)?(this.set("totalLength",_l.aH.length(t)),this.get("totalLength")):i},e.prototype.getPoint=function(t){var i=this.attr().points,o=this.get("tCache");o||(this._setTcache(),o=this.get("tCache"));var c,p;return(0,b.S6)(o,function(g,_){t>=g[0]&&t<=g[1]&&(c=(t-g[0])/(g[1]-g[0]),p=_)}),_l.x1.pointAt(i[p][0],i[p][1],i[p+1][0],i[p+1][1],c)},e.prototype._setTcache=function(){var t=this.attr().points;if(!(!t||t.length===0)){var i=this.getTotalLength();if(!(i<=0)){var o=0,c=[],p,g;(0,b.S6)(t,function(_,S){t[S+1]&&(p=[],p[0]=o/i,g=_l.x1.length(_[0],_[1],t[S+1][0],t[S+1][1]),o+=g,p[1]=o/i,c.push(p))}),this.set("tCache",c)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,i=[];return i.push([t[1][0],t[1][1]]),i.push([t[0][0],t[0][1]]),i},e.prototype.getEndTangent=function(){var t=this.attr().points,i=t.length-1,o=[];return o.push([t[i-1][0],t[i-1][1]]),o.push([t[i][0],t[i][1]]),o},e}(Gc),__=jg;function x_(r,e,t,i,o,c,p){var g=o/2;return ip(r-g,e-g,t,o,c,p)||ip(r+t-g,e-g,o,i,c,p)||ip(r+g,e+i-g,t,o,c,p)||ip(r-g,e+g,o,i,c,p)}function Wg(r,e,t,i,o,c,p,g){var _=c/2;return zf(r+o,e,r+t-o,e,c,p,g)||zf(r+t,e+o,r+t,e+i-o,c,p,g)||zf(r+t-o,e+i,r+o,e+i,c,p,g)||zf(r,e+i-o,r,e+o,c,p,g)||pp(r+t-o,e+o,o,1.5*Math.PI,2*Math.PI,c,p,g)||pp(r+t-o,e+i-o,o,0,.5*Math.PI,c,p,g)||pp(r+o,e+i-o,o,.5*Math.PI,Math.PI,c,p,g)||pp(r+o,e+o,o,Math.PI,1.5*Math.PI,c,p,g)}var b_=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.isInStrokeOrPath=function(t,i,o,c,p){var g=this.attr(),_=g.x,S=g.y,I=g.width,L=g.height,F=g.radius;if(F){var V=!1;return o&&(V=Wg(_,S,I,L,F,p,t,i)),!V&&c&&(V=by(this,t,i)),V}else{var z=p/2;if(c&&o)return ip(_-z,S-z,I+z,L+z,t,i);if(c)return ip(_,S,I,L,t,i);if(o)return x_(_,S,I,L,p,t,i)}},e.prototype.createPath=function(t){var i=this.attr(),o=i.x,c=i.y,p=i.width,g=i.height,_=i.radius;if(t.beginPath(),_===0)t.rect(o,c,p,g);else{var S=p0(_),I=S[0],L=S[1],F=S[2],z=S[3];t.moveTo(o+I,c),t.lineTo(o+p-L,c),L!==0&&t.arc(o+p-L,c+L,L,-Math.PI/2,0),t.lineTo(o+p,c+g-F),F!==0&&t.arc(o+p-F,c+g-F,F,0,Math.PI/2),t.lineTo(o+z,c+g),z!==0&&t.arc(o+z,c+g-z,z,Math.PI/2,Math.PI),t.lineTo(o,c+I),I!==0&&t.arc(o+I,c+I,I,Math.PI,Math.PI*1.5),t.closePath()}},e}(Gc),Xg=b_,Ay=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.isOnlyHitBox=function(){return!0},e.prototype.initAttrs=function(t){this._assembleFont(),t.text&&this._setText(t.text)},e.prototype._assembleFont=function(){var t=this.attrs;t.font=(0,me.assembleFont)(t)},e.prototype._setText=function(t){var i=null;(0,b.HD)(t)&&t.indexOf(`
|
|
`)!==-1&&(i=t.split(`
|
|
`)),this.set("textArr",i)},e.prototype.onAttrChange=function(t,i,o){r.prototype.onAttrChange.call(this,t,i,o),t.startsWith("font")&&this._assembleFont(),t==="text"&&this._setText(i)},e.prototype._getSpaceingY=function(){var t=this.attrs,i=t.lineHeight,o=t.fontSize*1;return i?i-o:o*.14},e.prototype._drawTextArr=function(t,i,o){var c=this.attrs,p=c.textBaseline,g=c.x,_=c.y,S=c.fontSize*1,I=this._getSpaceingY(),L=(0,me.getTextHeight)(c.text,c.fontSize,c.lineHeight),F;(0,b.S6)(i,function(z,V){F=_+V*(I+S)-L+S,p==="middle"&&(F+=L-S-(L-S)/2),p==="top"&&(F+=L-S),(0,b.UM)(z)||(o?t.fillText(z,g,F):t.strokeText(z,g,F))})},e.prototype._drawText=function(t,i){var o=this.attr(),c=o.x,p=o.y,g=this.get("textArr");if(g)this._drawTextArr(t,g,i);else{var _=o.text;(0,b.UM)(_)||(i?t.fillText(_,c,p):t.strokeText(_,c,p))}},e.prototype.strokeAndFill=function(t){var i=this.attrs,o=i.lineWidth,c=i.opacity,p=i.strokeOpacity,g=i.fillOpacity;this.isStroke()&&o>0&&(!(0,b.UM)(p)&&p!==1&&(t.globalAlpha=c),this.stroke(t)),this.isFill()&&(!(0,b.UM)(g)&&g!==1?(t.globalAlpha=g,this.fill(t),t.globalAlpha=c):this.fill(t)),this.afterDrawPath(t)},e.prototype.fill=function(t){this._drawText(t,!0)},e.prototype.stroke=function(t){this._drawText(t,!1)},e}(Gc),Kp=Ay;function E_(r,e){if(e){var t=(0,me.invert)(e);return(0,me.multiplyVec2)(t,r)}return r}function Ty(r,e,t){var i=r.getTotalMatrix();if(i){var o=E_([e,t,1],i),c=o[0],p=o[1];return[c,p]}return[e,t]}function _2(r,e,t){if(r.isCanvas&&r.isCanvas())return!0;if(!(0,me.isAllowCapture)(r)||r.cfg.isInView===!1)return!1;if(r.cfg.clipShape){var i=Ty(r,e,t),o=i[0],c=i[1];if(r.isClipped(o,c))return!1}var p=r.cfg.cacheCanvasBBox||r.getCanvasBBox();return e>=p.minX&&e<=p.maxX&&t>=p.minY&&t<=p.maxY}function OT(r,e,t){if(!_2(r,e,t))return null;for(var i=null,o=r.getChildren(),c=o.length,p=c-1;p>=0;p--){var g=o[p];if(g.isGroup())i=OT(g,e,t);else if(_2(g,e,t)){var _=g,S=Ty(g,e,t),I=S[0],L=S[1];_.isInShape(I,L)&&(i=g)}if(i)break}return i}var w_=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return t.renderer="canvas",t.autoDraw=!0,t.localRefresh=!0,t.refreshElements=[],t.clipView=!0,t.quickHit=!1,t},e.prototype.onCanvasChange=function(t){(t==="attr"||t==="sort"||t==="changeSize")&&(this.set("refreshElements",[this]),this.draw())},e.prototype.getShapeBase=function(){return et},e.prototype.getGroupBase=function(){return g0},e.prototype.getPixelRatio=function(){var t=this.get("pixelRatio")||h0();return t>=1?Math.ceil(t):1},e.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.cfg.width,maxY:this.cfg.height}},e.prototype.createDom=function(){var t=document.createElement("canvas"),i=t.getContext("2d");return this.set("context",i),t},e.prototype.setDOMSize=function(t,i){r.prototype.setDOMSize.call(this,t,i);var o=this.get("context"),c=this.get("el"),p=this.getPixelRatio();c.width=p*t,c.height=p*i,p>1&&o.scale(p,p)},e.prototype.clear=function(){r.prototype.clear.call(this),this._clearFrame();var t=this.get("context"),i=this.get("el");t.clearRect(0,0,i.width,i.height)},e.prototype.getShape=function(t,i){var o;return this.get("quickHit")?o=OT(this,t,i):o=r.prototype.getShape.call(this,t,i,null),o},e.prototype._getRefreshRegion=function(){var t=this.get("refreshElements"),i=this.getViewRange(),o;if(t.length&&t[0]===this)o=i;else if(o=Iv(t),o){o.minX=Math.floor(o.minX),o.minY=Math.floor(o.minY),o.maxX=Math.ceil(o.maxX),o.maxY=Math.ceil(o.maxY),o.maxY+=1;var c=this.get("clipView");c&&(o=Ug(o,i))}return o},e.prototype.refreshElement=function(t){var i=this.get("refreshElements");i.push(t)},e.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&((0,b.VS)(t),this.set("drawFrame",null),this.set("refreshElements",[]))},e.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},e.prototype._drawAll=function(){var t=this.get("context"),i=this.get("el"),o=this.getChildren();t.clearRect(0,0,i.width,i.height),kh(t,this),eg(t,o),this.set("refreshElements",[])},e.prototype._drawRegion=function(){var t=this.get("context"),i=this.get("refreshElements"),o=this.getChildren(),c=this._getRefreshRegion();c?(t.clearRect(c.minX,c.minY,c.maxX-c.minX,c.maxY-c.minY),t.save(),t.beginPath(),t.rect(c.minX,c.minY,c.maxX-c.minX,c.maxY-c.minY),t.clip(),kh(t,this),Lh(this,o,c),eg(t,o,c),t.restore()):i.length&&tc(i),(0,b.S6)(i,function(p){p.get("hasChanged")&&p.set("hasChanged",!1)}),this.set("refreshElements",[])},e.prototype._startDraw=function(){var t=this,i=this.get("drawFrame");i||(i=(0,b.U7)(function(){t.get("localRefresh")?t._drawRegion():t._drawAll(),t.set("drawFrame",null)}),this.set("drawFrame",i))},e.prototype.skipDraw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.width=0,t.height=0,t.parentNode.removeChild(t)},e}(me.AbstractCanvas),x2=w_,fO="0.5.12",My={rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polyline:"polyline",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject"},us={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",x:"x",y:"y",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",x1:"x1",x2:"x2",y1:"y1",y2:"y2",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",startArrow:"marker-start",endArrow:"marker-end",path:"d",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio"},hO=null;function Oh(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function S_(r){var e=My[r.type],t=r.getParent();if(!e)throw new Error("the type "+r.type+" is not supported by svg");var i=Oh(e);if(r.get("id")&&(i.id=r.get("id")),r.set("el",i),r.set("attrs",{}),t){var o=t.get("el");o||(o=t.createDom(),t.set("el",o)),o.appendChild(i)}return i}function b2(r,e){var t=r.get("el"),i=(0,b.qo)(t.children).sort(e),o=document.createDocumentFragment();i.forEach(function(c){o.appendChild(c)}),t.appendChild(o)}function E2(r,e){var t=r.parentNode,i=Array.from(t.childNodes).filter(function(g){return g.nodeType===1&&g.nodeName.toLowerCase()!=="defs"}),o=i[e],c=i.indexOf(r);if(o){if(c>e)t.insertBefore(r,o);else if(c<e){var p=i[e+1];p?t.insertBefore(r,p):t.appendChild(r)}}else t.appendChild(r)}function w2(r,e){var t=r.cfg.el,i=r.attr(),o={dx:i.shadowOffsetX,dy:i.shadowOffsetY,blur:i.shadowBlur,color:i.shadowColor};if(!o.dx&&!o.dy&&!o.blur&&!o.color)t.removeAttribute("filter");else{var c=e.find("filter",o);c||(c=e.addShadow(o)),t.setAttribute("filter","url(#"+c+")")}}function ig(r){var e=r.attr().matrix;if(e){for(var t=r.cfg.el,i=[],o=0;o<9;o+=3)i.push(e[o]+","+e[o+1]);i=i.join(","),i.indexOf("NaN")===-1?t.setAttribute("transform","matrix("+i+")"):console.warn("invalid matrix:",e)}}function ag(r,e){var t=r.getClip(),i=r.get("el");if(!t)i.removeAttribute("clip-path");else if(t&&!i.hasAttribute("clip-path")){S_(t),t.createPath(e);var o=e.addClip(t);i.setAttribute("clip-path","url(#"+o+")")}}function C_(r,e){e.forEach(function(t){t.draw(r)})}function A_(r,e){var t=r.get("canvas");if(t&&t.get("autoDraw")){var i=t.get("context"),o=r.getParent(),c=o?o.getChildren():[t],p=r.get("el");if(e==="remove"){var g=r.get("isClipShape");if(g){var _=p&&p.parentNode,S=_&&_.parentNode;_&&S&&S.removeChild(_)}else p&&p.parentNode&&p.parentNode.removeChild(p)}else if(e==="show")p.setAttribute("visibility","visible");else if(e==="hide")p.setAttribute("visibility","hidden");else if(e==="zIndex")E2(p,c.indexOf(r));else if(e==="sort"){var I=r.get("children");I&&I.length&&b2(r,function(L,F){return I.indexOf(L)-I.indexOf(F)?1:0})}else e==="clear"?p&&(p.innerHTML=""):e==="matrix"?ig(r):e==="clip"?ag(r,i):e==="attr"||e==="add"&&r.draw(i)}}var S2=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.isEntityGroup=function(){return!0},e.prototype.createDom=function(){var t=Oh("g");this.set("el",t);var i=this.getParent();if(i){var o=i.get("el");o||(o=i.createDom(),i.set("el",o)),o.appendChild(t)}return t},e.prototype.afterAttrsChange=function(t){r.prototype.afterAttrsChange.call(this,t);var i=this.get("canvas");if(i&&i.get("autoDraw")){var o=i.get("context");this.createPath(o,t)}},e.prototype.onCanvasChange=function(t){A_(this,t)},e.prototype.getShapeBase=function(){return ot},e.prototype.getGroupBase=function(){return e},e.prototype.draw=function(t){var i=this.getChildren(),o=this.get("el");this.get("destroyed")?o&&o.parentNode.removeChild(o):(o||this.createDom(),ag(this,t),this.createPath(t),i.length&&C_(t,i))},e.prototype.createPath=function(t,i){var o=this.attr(),c=this.get("el");(0,b.S6)(i||o,function(p,g){us[g]&&c.setAttribute(us[g],p)}),ig(this)},e}(me.AbstractGroup),Iy=S2,C2=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="svg",t.canFill=!1,t.canStroke=!1,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},e.prototype.afterAttrsChange=function(t){r.prototype.afterAttrsChange.call(this,t);var i=this.get("canvas");if(i&&i.get("autoDraw")){var o=i.get("context");this.draw(o,t)}},e.prototype.getShapeBase=function(){return ot},e.prototype.getGroupBase=function(){return Iy},e.prototype.onCanvasChange=function(t){A_(this,t)},e.prototype.calculateBBox=function(){var t=this.get("el"),i=null;if(t)i=t.getBBox();else{var o=(0,me.getBBoxMethod)(this.get("type"));o&&(i=o(this))}if(i){var c=i.x,p=i.y,g=i.width,_=i.height,S=this.getHitLineWidth(),I=S/2,L=c-I,F=p-I,z=c+g+I,V=p+_+I;return{x:L,y:F,minX:L,minY:F,maxX:z,maxY:V,width:g+S,height:_+S}}return{x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0}},e.prototype.isFill=function(){var t=this.attr(),i=t.fill,o=t.fillStyle;return(i||o||this.isClipShape())&&this.canFill},e.prototype.isStroke=function(){var t=this.attr(),i=t.stroke,o=t.strokeStyle;return(i||o)&&this.canStroke},e.prototype.draw=function(t,i){var o=this.get("el");this.get("destroyed")?o&&o.parentNode.removeChild(o):(o||S_(this),ag(this,t),this.createPath(t,i),this.shadow(t,i),this.strokeAndFill(t,i),this.transform(i))},e.prototype.createPath=function(t,i){},e.prototype.strokeAndFill=function(t,i){var o=i||this.attr(),c=o.fill,p=o.fillStyle,g=o.stroke,_=o.strokeStyle,S=o.fillOpacity,I=o.strokeOpacity,L=o.lineWidth,F=this.get("el");this.canFill&&(i?"fill"in o?this._setColor(t,"fill",c):"fillStyle"in o&&this._setColor(t,"fill",p):this._setColor(t,"fill",c||p),S&&F.setAttribute(us.fillOpacity,S)),this.canStroke&&L>0&&(i?"stroke"in o?this._setColor(t,"stroke",g):"strokeStyle"in o&&this._setColor(t,"stroke",_):this._setColor(t,"stroke",g||_),I&&F.setAttribute(us.strokeOpacity,I),L&&F.setAttribute(us.lineWidth,L))},e.prototype._setColor=function(t,i,o){var c=this.get("el");if(!o){c.setAttribute(us[i],"none");return}if(o=o.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(o)){var p=t.find("gradient",o);p||(p=t.addGradient(o)),c.setAttribute(us[i],"url(#"+p+")")}else if(/^[p,P]{1}[\s]*\(/.test(o)){var p=t.find("pattern",o);p||(p=t.addPattern(o)),c.setAttribute(us[i],"url(#"+p+")")}else c.setAttribute(us[i],o)},e.prototype.shadow=function(t,i){var o=this.attr(),c=i||o,p=c.shadowOffsetX,g=c.shadowOffsetY,_=c.shadowBlur,S=c.shadowColor;(p||g||_||S)&&w2(this,t)},e.prototype.transform=function(t){var i=this.attr(),o=(t||i).matrix;o&&ig(this)},e.prototype.isInShape=function(t,i){return this.isPointInPath(t,i)},e.prototype.isPointInPath=function(t,i){var o=this.get("el"),c=this.get("canvas"),p=c.get("el").getBoundingClientRect(),g=t+p.left,_=i+p.top,S=document.elementFromPoint(g,_);return!!(S&&S.isEqualNode(o))},e.prototype.getHitLineWidth=function(){var t=this.attrs,i=t.lineWidth,o=t.lineAppendWidth;return this.isStroke()?i+o:0},e}(me.AbstractShape),sh=C2,A2=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="circle",t.canFill=!0,t.canStroke=!0,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{x:0,y:0,r:0})},e.prototype.createPath=function(t,i){var o=this.attr(),c=this.get("el");(0,b.S6)(i||o,function(p,g){g==="x"||g==="y"?c.setAttribute("c"+g,p):us[g]&&c.setAttribute(us[g],p)})},e}(sh),T2=A2,M2=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dom",t.canFill=!1,t.canStroke=!1,t}return e.prototype.createPath=function(t,i){var o=this.attr(),c=this.get("el");if((0,b.S6)(i||o,function(S,I){us[I]&&c.setAttribute(us[I],S)}),typeof o.html=="function"){var p=o.html.call(this,o);if(p instanceof Element||p instanceof HTMLDocument){for(var g=c.childNodes,_=g.length-1;_>=0;_--)c.removeChild(g[_]);c.appendChild(p)}else c.innerHTML=p}else c.innerHTML=o.html},e}(sh),I2=M2,k2=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="ellipse",t.canFill=!0,t.canStroke=!0,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{x:0,y:0,rx:0,ry:0})},e.prototype.createPath=function(t,i){var o=this.attr(),c=this.get("el");(0,b.S6)(i||o,function(p,g){g==="x"||g==="y"?c.setAttribute("c"+g,p):us[g]&&c.setAttribute(us[g],p)})},e}(sh),L2=k2,P2=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="image",t.canFill=!1,t.canStroke=!1,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{x:0,y:0,width:0,height:0})},e.prototype.createPath=function(t,i){var o=this,c=this.attr(),p=this.get("el");(0,b.S6)(i||c,function(g,_){_==="img"?o._setImage(c.img):us[_]&&p.setAttribute(us[_],g)})},e.prototype.setAttr=function(t,i){this.attrs[t]=i,t==="img"&&this._setImage(i)},e.prototype._setImage=function(t){var i=this.attr(),o=this.get("el");if((0,b.HD)(t))o.setAttribute("href",t);else if(t instanceof window.Image)i.width||(o.setAttribute("width",t.width),this.attr("width",t.width)),i.height||(o.setAttribute("height",t.height),this.attr("height",t.height)),o.setAttribute("href",t.src);else if(t instanceof HTMLElement&&(0,b.HD)(t.nodeName)&&t.nodeName.toUpperCase()==="CANVAS")o.setAttribute("href",t.toDataURL());else if(t instanceof ImageData){var c=document.createElement("canvas");c.setAttribute("width",""+t.width),c.setAttribute("height",""+t.height),c.getContext("2d").putImageData(t,0,0),i.width||(o.setAttribute("width",""+t.width),this.attr("width",t.width)),i.height||(o.setAttribute("height",""+t.height),this.attr("height",t.height)),o.setAttribute("href",c.toDataURL())}},e}(sh),Lc=P2,O2=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="line",t.canFill=!1,t.canStroke=!0,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.createPath=function(t,i){var o=this.attr(),c=this.get("el");(0,b.S6)(i||o,function(p,g){if(g==="startArrow"||g==="endArrow")if(p){var _=(0,b.Kn)(p)?t.addArrow(o,us[g]):t.getDefaultArrow(o,us[g]);c.setAttribute(us[g],"url(#"+_+")")}else c.removeAttribute(us[g]);else us[g]&&c.setAttribute(us[g],p)})},e.prototype.getTotalLength=function(){var t=this.attr(),i=t.x1,o=t.y1,c=t.x2,p=t.y2;return _l.x1.length(i,o,c,p)},e.prototype.getPoint=function(t){var i=this.attr(),o=i.x1,c=i.y1,p=i.x2,g=i.y2;return _l.x1.pointAt(o,c,p,g,t)},e}(sh),F2=O2,Yg={circle:function(r,e,t){return[["M",r,e],["m",-t,0],["a",t,t,0,1,0,t*2,0],["a",t,t,0,1,0,-t*2,0]]},square:function(r,e,t){return[["M",r-t,e-t],["L",r+t,e-t],["L",r+t,e+t],["L",r-t,e+t],["Z"]]},diamond:function(r,e,t){return[["M",r-t,e],["L",r,e-t],["L",r+t,e],["L",r,e+t],["Z"]]},triangle:function(r,e,t){var i=t*Math.sin(.3333333333333333*Math.PI);return[["M",r-t,e+i],["L",r,e-i],["L",r+t,e+i],["z"]]},triangleDown:function(r,e,t){var i=t*Math.sin(.3333333333333333*Math.PI);return[["M",r-t,e-i],["L",r+t,e-i],["L",r,e+i],["Z"]]}},T_={get:function(r){return Yg[r]},register:function(r,e){Yg[r]=e},remove:function(r){delete Yg[r]},getAll:function(){return Yg}},R2=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="marker",t.canFill=!0,t.canStroke=!0,t}return e.prototype.createPath=function(t){var i=this.get("el");i.setAttribute("d",this._assembleMarker())},e.prototype._assembleMarker=function(){var t=this._getPath();return(0,b.kJ)(t)?t.map(function(i){return i.join(" ")}).join(""):t},e.prototype._getPath=function(){var t=this.attr(),i=t.x,o=t.y,c=t.r||t.radius,p=t.symbol||"circle",g;return(0,b.mf)(p)?g=p:g=T_.get(p),g?g(i,o,c):(console.warn(g+" symbol is not exist."),null)},e.symbolsFactory=T_,e}(sh),D2=R2,B2=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="path",t.canFill=!0,t.canStroke=!0,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{startArrow:!1,endArrow:!1})},e.prototype.createPath=function(t,i){var o=this,c=this.attr(),p=this.get("el");(0,b.S6)(i||c,function(g,_){if(_==="path"&&(0,b.kJ)(g))p.setAttribute("d",o._formatPath(g));else if(_==="startArrow"||_==="endArrow")if(g){var S=(0,b.Kn)(g)?t.addArrow(c,us[_]):t.getDefaultArrow(c,us[_]);p.setAttribute(us[_],"url(#"+S+")")}else p.removeAttribute(us[_]);else us[_]&&p.setAttribute(us[_],g)})},e.prototype._formatPath=function(t){var i=t.map(function(o){return o.join(" ")}).join("");return~i.indexOf("NaN")?"":i},e.prototype.getTotalLength=function(){var t=this.get("el");return t?t.getTotalLength():null},e.prototype.getPoint=function(t){var i=this.get("el"),o=this.getTotalLength();if(o===0)return null;var c=i?i.getPointAtLength(t*o):null;return c?{x:c.x,y:c.y}:null},e}(sh),N2=B2,z2=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="polygon",t.canFill=!0,t.canStroke=!0,t}return e.prototype.createPath=function(t,i){var o=this.attr(),c=this.get("el");(0,b.S6)(i||o,function(p,g){g==="points"&&(0,b.kJ)(p)&&p.length>=2?c.setAttribute("points",p.map(function(_){return _[0]+","+_[1]}).join(" ")):us[g]&&c.setAttribute(us[g],p)})},e}(sh),U2=z2,Z2=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="polyline",t.canFill=!0,t.canStroke=!0,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{startArrow:!1,endArrow:!1})},e.prototype.onAttrChange=function(t,i,o){r.prototype.onAttrChange.call(this,t,i,o),["points"].indexOf(t)!==-1&&this._resetCache()},e.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},e.prototype.createPath=function(t,i){var o=this.attr(),c=this.get("el");(0,b.S6)(i||o,function(p,g){g==="points"&&(0,b.kJ)(p)&&p.length>=2?c.setAttribute("points",p.map(function(_){return _[0]+","+_[1]}).join(" ")):us[g]&&c.setAttribute(us[g],p)})},e.prototype.getTotalLength=function(){var t=this.attr().points,i=this.get("totalLength");return(0,b.UM)(i)?(this.set("totalLength",_l.aH.length(t)),this.get("totalLength")):i},e.prototype.getPoint=function(t){var i=this.attr().points,o=this.get("tCache");o||(this._setTcache(),o=this.get("tCache"));var c,p;return(0,b.S6)(o,function(g,_){t>=g[0]&&t<=g[1]&&(c=(t-g[0])/(g[1]-g[0]),p=_)}),_l.x1.pointAt(i[p][0],i[p][1],i[p+1][0],i[p+1][1],c)},e.prototype._setTcache=function(){var t=this.attr().points;if(!(!t||t.length===0)){var i=this.getTotalLength();if(!(i<=0)){var o=0,c=[],p,g;(0,b.S6)(t,function(_,S){t[S+1]&&(p=[],p[0]=o/i,g=_l.x1.length(_[0],_[1],t[S+1][0],t[S+1][1]),o+=g,p[1]=o/i,c.push(p))}),this.set("tCache",c)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,i=[];return i.push([t[1][0],t[1][1]]),i.push([t[0][0],t[0][1]]),i},e.prototype.getEndTangent=function(){var t=this.attr().points,i=t.length-1,o=[];return o.push([t[i-1][0],t[i-1][1]]),o.push([t[i][0],t[i][1]]),o},e}(sh),V2=Z2,G2=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,H2=/[^\s,]+/gi;function j2(r){var e=0,t=0,i=0,o=0;return(0,b.kJ)(r)?r.length===1?e=t=i=o=r[0]:r.length===2?(e=i=r[0],t=o=r[1]):r.length===3?(e=r[0],t=o=r[1],i=r[2]):(e=r[0],t=r[1],i=r[2],o=r[3]):e=t=i=o=r,{r1:e,r2:t,r3:i,r4:o}}function pO(r){if(r=r||[],isArray(r))return r;if(isString(r))return r=r.match(G2),each(r,function(e,t){if(e=e.match(H2),e[0].length>1){var i=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=i}each(e,function(o,c){isNaN(o)||(e[c]=+o)}),r[t]=e}),r}var FT=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="rect",t.canFill=!0,t.canStroke=!0,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.createPath=function(t,i){var o=this,c=this.attr(),p=this.get("el"),g=!1,_=["x","y","width","height","radius"];(0,b.S6)(i||c,function(S,I){_.indexOf(I)!==-1&&!g?(p.setAttribute("d",o._assembleRect(c)),g=!0):_.indexOf(I)===-1&&us[I]&&p.setAttribute(us[I],S)})},e.prototype._assembleRect=function(t){var i=t.x,o=t.y,c=t.width,p=t.height,g=t.radius;if(!g)return"M "+i+","+o+" l "+c+",0 l 0,"+p+" l"+-c+" 0 z";var _=j2(g);(0,b.kJ)(g)?g.length===1?_.r1=_.r2=_.r3=_.r4=g[0]:g.length===2?(_.r1=_.r3=g[0],_.r2=_.r4=g[1]):g.length===3?(_.r1=g[0],_.r2=_.r4=g[1],_.r3=g[2]):(_.r1=g[0],_.r2=g[1],_.r3=g[2],_.r4=g[3]):_.r1=_.r2=_.r3=_.r4=g;var S=[["M "+(i+_.r1)+","+o],["l "+(c-_.r1-_.r2)+",0"],["a "+_.r2+","+_.r2+",0,0,1,"+_.r2+","+_.r2],["l 0,"+(p-_.r2-_.r3)],["a "+_.r3+","+_.r3+",0,0,1,"+-_.r3+","+_.r3],["l "+(_.r3+_.r4-c)+",0"],["a "+_.r4+","+_.r4+",0,0,1,"+-_.r4+","+-_.r4],["l 0,"+(_.r4+_.r1-p)],["a "+_.r1+","+_.r1+",0,0,1,"+_.r1+","+-_.r1],["z"]];return S.join(" ")},e}(sh),RT=FT,DT=nt(74348),W2=.3,X2={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},Y2={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},$2={left:"left",start:"left",center:"middle",right:"end",end:"end"},q2=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="text",t.canFill=!0,t.canStroke=!0,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,P.pi)((0,P.pi)({},t),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.createPath=function(t,i){var o=this,c=this.attr(),p=this.get("el");this._setFont(),(0,b.S6)(i||c,function(g,_){_==="text"?o._setText(""+g):_==="matrix"&&g?ig(o):us[_]&&p.setAttribute(us[_],g)}),p.setAttribute("paint-order","stroke"),p.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},e.prototype._setFont=function(){var t=this.get("el"),i=this.attr(),o=i.textBaseline,c=i.textAlign,p=(0,DT.qY)();p&&p.name==="firefox"?t.setAttribute("dominant-baseline",Y2[o]||"alphabetic"):t.setAttribute("alignment-baseline",X2[o]||"baseline"),t.setAttribute("text-anchor",$2[c]||"left")},e.prototype._setText=function(t){var i=this.get("el"),o=this.attr(),c=o.x,p=o.textBaseline,g=p===void 0?"bottom":p;if(!t)i.innerHTML="";else if(~t.indexOf(`
|
|
`)){var _=t.split(`
|
|
`),S=_.length-1,I="";(0,b.S6)(_,function(L,F){F===0?g==="alphabetic"?I+='<tspan x="'+c+'" dy="'+-S+'em">'+L+"</tspan>":g==="top"?I+='<tspan x="'+c+'" dy="0.9em">'+L+"</tspan>":g==="middle"?I+='<tspan x="'+c+'" dy="'+-(S-1)/2+'em">'+L+"</tspan>":g==="bottom"?I+='<tspan x="'+c+'" dy="-'+(S+W2)+'em">'+L+"</tspan>":g==="hanging"&&(I+='<tspan x="'+c+'" dy="'+(-(S-1)-W2)+'em">'+L+"</tspan>"):I+='<tspan x="'+c+'" dy="1em">'+L+"</tspan>"}),i.innerHTML=I}else i.innerHTML=t},e}(sh),BT=q2,NT=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,zT=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,UT=/[\d.]+:(#[^\s]+|[^)]+\))/gi;function K2(r){var e=r.match(UT);if(!e)return"";var t="";return e.sort(function(i,o){return i=i.split(":"),o=o.split(":"),Number(i[0])-Number(o[0])}),(0,b.S6)(e,function(i){i=i.split(":"),t+='<stop offset="'+i[0]+'" stop-color="'+i[1]+'"></stop>'}),t}function ZT(r,e){var t=NT.exec(r),i=(0,b.wQ)((0,b.c$)(parseFloat(t[1])),Math.PI*2),o=t[2],c,p;i>=0&&i<.5*Math.PI?(c={x:0,y:0},p={x:1,y:1}):.5*Math.PI<=i&&i<Math.PI?(c={x:1,y:0},p={x:0,y:1}):Math.PI<=i&&i<1.5*Math.PI?(c={x:1,y:1},p={x:0,y:0}):(c={x:0,y:1},p={x:1,y:0});var g=Math.tan(i),_=g*g,S=(p.x-c.x+g*(p.y-c.y))/(_+1)+c.x,I=g*(p.x-c.x+g*(p.y-c.y))/(_+1)+c.y;e.setAttribute("x1",c.x),e.setAttribute("y1",c.y),e.setAttribute("x2",S),e.setAttribute("y2",I),e.innerHTML=K2(o)}function VT(r,e){var t=zT.exec(r),i=parseFloat(t[1]),o=parseFloat(t[2]),c=parseFloat(t[3]),p=t[4];e.setAttribute("cx",i),e.setAttribute("cy",o),e.setAttribute("r",c),e.innerHTML=K2(p)}var GT=function(){function r(e){this.cfg={};var t=null,i=(0,b.EL)("gradient_");return e.toLowerCase()[0]==="l"?(t=Oh("linearGradient"),ZT(e,t)):(t=Oh("radialGradient"),VT(e,t)),t.setAttribute("id",i),this.el=t,this.id=i,this.cfg=e,this}return r.prototype.match=function(e,t){return this.cfg===t},r}(),HT=GT,jT={shadowColor:"color",shadowOpacity:"opacity",shadowBlur:"blur",shadowOffsetX:"dx",shadowOffsetY:"dy"},WT={x:"-40%",y:"-40%",width:"200%",height:"200%"},XT=function(){function r(e){this.type="filter",this.cfg={},this.type="filter";var t=Oh("filter");return(0,b.S6)(WT,function(i,o){t.setAttribute(o,i)}),this.el=t,this.id=(0,b.EL)("filter_"),this.el.id=this.id,this.cfg=e,this._parseShadow(e,t),this}return r.prototype.match=function(e,t){if(this.type!==e)return!1;var i=!0,o=this.cfg;return(0,b.S6)(Object.keys(o),function(c){if(o[c]!==t[c])return i=!1,!1}),i},r.prototype.update=function(e,t){var i=this.cfg;return i[jT[e]]=t,this._parseShadow(i,this.el),this},r.prototype._parseShadow=function(e,t){var i=`<feDropShadow
|
|
dx="`+(e.dx||0)+`"
|
|
dy="`+(e.dy||0)+`"
|
|
stdDeviation="`+(e.blur?e.blur/10:0)+`"
|
|
flood-color="`+(e.color?e.color:"#000")+`"
|
|
flood-opacity="`+(e.opacity?e.opacity:1)+`"
|
|
/>`;t.innerHTML=i},r}(),YT=XT,$T=function(){function r(e,t){this.cfg={};var i=Oh("marker"),o=(0,b.EL)("marker_");i.setAttribute("id",o);var c=Oh("path");c.setAttribute("stroke",e.stroke||"none"),c.setAttribute("fill",e.fill||"none"),i.appendChild(c),i.setAttribute("overflow","visible"),i.setAttribute("orient","auto-start-reverse"),this.el=i,this.child=c,this.id=o;var p=e[t==="marker-start"?"startArrow":"endArrow"];return this.stroke=e.stroke||"#000",p===!0?this._setDefaultPath(t,c):(this.cfg=p,this._setMarker(e.lineWidth,c)),this}return r.prototype.match=function(){return!1},r.prototype._setDefaultPath=function(e,t){var i=this.el;t.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),i.setAttribute("refX",""+10*Math.cos(Math.PI/6)),i.setAttribute("refY",""+5)},r.prototype._setMarker=function(e,t){var i=this.el,o=this.cfg.path,c=this.cfg.d;(0,b.kJ)(o)&&(o=o.map(function(p){return p.join(" ")}).join("")),t.setAttribute("d",o),i.appendChild(t),c&&i.setAttribute("refX",""+c/e)},r.prototype.update=function(e){var t=this.child;t.attr?t.attr("fill",e):t.setAttribute("fill",e)},r}(),Q2=$T,qT=function(){function r(e){this.type="clip",this.cfg={};var t=Oh("clipPath");this.el=t,this.id=(0,b.EL)("clip_"),t.id=this.id;var i=e.cfg.el;return t.appendChild(i),this.cfg=e,this}return r.prototype.match=function(){return!1},r.prototype.remove=function(){var e=this.el;e.parentNode.removeChild(e)},r}(),KT=qT,QT=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,as=function(){function r(e){this.cfg={};var t=Oh("pattern");t.setAttribute("patternUnits","userSpaceOnUse");var i=Oh("image");t.appendChild(i);var o=(0,b.EL)("pattern_");t.id=o,this.el=t,this.id=o,this.cfg=e;var c=QT.exec(e),p=c[2];i.setAttribute("href",p);var g=new Image;p.match(/^data:/i)||(g.crossOrigin="Anonymous"),g.src=p;function _(){t.setAttribute("width",""+g.width),t.setAttribute("height",""+g.height)}return g.complete?_():(g.onload=_,g.src=g.src),this}return r.prototype.match=function(e,t){return this.cfg===t},r}(),Pv=as,J2=function(){function r(e){var t=Oh("defs"),i=(0,b.EL)("defs_");t.id=i,e.appendChild(t),this.children=[],this.defaultArrow={},this.el=t,this.canvas=e}return r.prototype.find=function(e,t){for(var i=this.children,o=null,c=0;c<i.length;c++)if(i[c].match(e,t)){o=i[c].id;break}return o},r.prototype.findById=function(e){for(var t=this.children,i=null,o=0;o<t.length;o++)if(t[o].id===e){i=t[o];break}return i},r.prototype.add=function(e){this.children.push(e),e.canvas=this.canvas,e.parent=this},r.prototype.getDefaultArrow=function(e,t){var i=e.stroke||e.strokeStyle;if(this.defaultArrow[i])return this.defaultArrow[i].id;var o=new Q2(e,t);return this.defaultArrow[i]=o,this.el.appendChild(o.el),this.add(o),o.id},r.prototype.addGradient=function(e){var t=new HT(e);return this.el.appendChild(t.el),this.add(t),t.id},r.prototype.addArrow=function(e,t){var i=new Q2(e,t);return this.el.appendChild(i.el),this.add(i),i.id},r.prototype.addShadow=function(e){var t=new YT(e);return this.el.appendChild(t.el),this.add(t),t.id},r.prototype.addPattern=function(e){var t=new Pv(e);return this.el.appendChild(t.el),this.add(t),t.id},r.prototype.addClip=function(e){var t=new KT(e);return this.el.appendChild(t.el),this.add(t),t.id},r}(),tE=J2,ky=function(r){(0,P.ZT)(e,r);function e(t){return r.call(this,(0,P.pi)((0,P.pi)({},t),{autoDraw:!0,renderer:"svg"}))||this}return e.prototype.getShapeBase=function(){return ot},e.prototype.getGroupBase=function(){return Iy},e.prototype.getShape=function(t,i,o){var c=o.target||o.srcElement;if(!My[c.tagName]){for(var p=c.parentNode;p&&!My[p.tagName];)p=p.parentNode;c=p}return this.find(function(g){return g.get("el")===c})},e.prototype.createDom=function(){var t=Oh("svg"),i=new tE(t);return t.setAttribute("width",""+this.get("width")),t.setAttribute("height",""+this.get("height")),this.set("context",i),t},e.prototype.onCanvasChange=function(t){var i=this.get("context"),o=this.get("el");if(t==="sort"){var c=this.get("children");c&&c.length&&b2(this,function(g,_){return c.indexOf(g)-c.indexOf(_)?1:0})}else if(t==="clear"){if(o){o.innerHTML="";var p=i.el;p.innerHTML="",o.appendChild(p)}}else t==="matrix"?ig(this):t==="clip"?ag(this,i):t==="changeSize"&&(o.setAttribute("width",""+this.get("width")),o.setAttribute("height",""+this.get("height")))},e.prototype.draw=function(){var t=this.get("context"),i=this.getChildren();ag(this,t),i.length&&C_(t,i)},e}(me.AbstractCanvas),eE=ky,rE="0.5.6",JT=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,t)||this;i.type="path",i.shapeType="line";var o=t.connectNulls,c=o===void 0?!1:o,p=t.showSinglePoint,g=p===void 0?!0:p;return i.connectNulls=c,i.showSinglePoint=g,i}return e.prototype.updateElements=function(t,i){var o,c,p,g,_,S;i===void 0&&(i=!1);for(var I=new Map,L=new Map,F=[],z=0,V=0;V<t.length;V++){var Q=t[V],st=this.getElementId(Q);F.push(st),I.set(st,Q),L.set(st,z),z++}this.elements=new Array(z);var at=Ds(this.lastElementsMap,F),Rt=at.added,Kt=at.updated,te=at.removed;try{for(var Ae=(0,P.XA)(Rt),hr=Ae.next();!hr.done;hr=Ae.next()){var st=hr.value,Q=I.get(st),Tr=this.getShapeFactory(),Dr=this.getShapeInfo(Q),V=L.get(st),cn=new Ti({shapeFactory:Tr,container:this.container,offscreenGroup:this.getOffscreenGroup(),elementIndex:V});cn.geometry=this,cn.animate=this.animateOption,cn.draw(Dr,i),this.elementsMap[st]=cn,this.elements[V]=cn}}catch(ao){o={error:ao}}finally{try{hr&&!hr.done&&(c=Ae.return)&&c.call(Ae)}finally{if(o)throw o.error}}try{for(var Qr=(0,P.XA)(Kt),Tn=Qr.next();!Tn.done;Tn=Qr.next()){var st=Tn.value,Q=I.get(st),cn=this.lastElementsMap[st],V=L.get(st),Dr=this.getShapeInfo(Q),xi=cn.getModel();(this.isCoordinateChanged||ru(xi,Dr))&&(cn.animate=this.animateOption,cn.update(Dr)),this.elementsMap[st]=cn,this.elements[V]=cn}}catch(ao){p={error:ao}}finally{try{Tn&&!Tn.done&&(g=Qr.return)&&g.call(Qr)}finally{if(p)throw p.error}}try{for(var va=(0,P.XA)(te),Aa=va.next();!Aa.done;Aa=va.next()){var st=Aa.value,cn=this.lastElementsMap[st];cn.animate=this.animateOption,cn.destroy()}}catch(ao){_={error:ao}}finally{try{Aa&&!Aa.done&&(S=va.return)&&S.call(va)}finally{if(_)throw _.error}}},e.prototype.getPointsAndData=function(t){for(var i=[],o=[],c=0,p=t.length;c<p;c++){var g=t[c];i.push({x:g.x,y:g.y}),o.push(g[Ge])}return{points:i,data:o}},e.prototype.getShapeInfo=function(t){var i=this.getDrawCfg(t[0]),o=this.getPointsAndData(t),c=o.points,p=o.data;return i.mappingData=t,i.data=p,i.isStack=!!this.getAdjust("stack"),i.points=c,i.connectNulls=this.connectNulls,i.showSinglePoint=this.showSinglePoint,i},e}(Vs),M_=JT;function tM(r,e,t,i,o){var c=[];if(r.length){for(var p=[],g=[],_=0,S=r.length;_<S;_++){var I=r[_];p.push(I[1]),g.push(I[0])}g=g.reverse(),(0,b.S6)([p,g],function(L,F){var z=[],V=i.parsePoints(L),Q=V[0];p.length===1&&g.length===1?z=F===0?[["M",Q.x-.5,Q.y],["L",Q.x+.5,Q.y]]:[["L",Q.x+.5,Q.y],["L",Q.x-.5,Q.y]]:(e&&V.push({x:Q.x,y:Q.y}),t?z=di(V,!1,o):z=Vn(V,!1),F>0&&(z[0][0]="L")),c=c.concat(z)}),c.push(["Z"])}return c}function $g(r,e,t,i,o){for(var c=$s(r,e,!e,"lineWidth"),p=r.connectNulls,g=r.isInCircle,_=r.points,S=r.showSinglePoint,I=oh(_,p,S),L=[],F=0,z=I.length;F<z;F++){var V=I[F];L=L.concat(tM(V,g,t,i,o))}return c.path=L,c}function I_(r){var e=r.start,t=r.end;return[[e.x,t.y],[t.x,e.y]]}var eM=po("area",{defaultShapeType:"area",getDefaultPoints:function(r){var e=r.x,t=r.y0,i=(0,b.kJ)(r.y)?r.y:[t,r.y];return i.map(function(o){return{x:e,y:o}})}});wi("area","area",{draw:function(r,e){var t=$g(r,!1,!1,this),i=e.addShape({type:"path",attrs:t,name:"area"});return i},getMarker:function(r){var e=r.color;return{symbol:function(t,i,o){return o===void 0&&(o=5.5),[["M",t-o,i-4],["L",t+o,i-4],["L",t+o,i+4],["L",t-o,i+4],["Z"]]},style:{r:5,fill:e,fillOpacity:1}}}});var nE=null,iE=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,t)||this;i.type="area",i.shapeType="area",i.generatePoints=!0,i.startOnZero=!0;var o=t.startOnZero,c=o===void 0?!0:o,p=t.sortable,g=p===void 0?!1:p,_=t.showSinglePoint,S=_===void 0?!1:_;return i.startOnZero=c,i.sortable=g,i.showSinglePoint=S,i}return e.prototype.getPointsAndData=function(t){for(var i=[],o=[],c=0,p=t.length;c<p;c++){var g=t[c];i.push(g.points),o.push(g[Ge])}return{points:i,data:o}},e.prototype.getYMinValue=function(){if(this.startOnZero)return r.prototype.getYMinValue.call(this);var t=this.getYScale();return t.min},e}(M_),rM=iE,dO=po("edge",{defaultShapeType:"line",getDefaultPoints:function(r){return pf(r)}});wi("edge","line",{draw:function(r,e){var t=$s(r,!0,!1,"lineWidth"),i=Vn(this.parsePoints(r.points),this.coordinate.isPolar);return e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:i})})},getMarker:function(r){return{symbol:"circle",style:{r:4.5,fill:r.color}}}});var nM=null,iM=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="edge",t.shapeType="edge",t.generatePoints=!0,t}return e}(Vs),aE=iM,oE=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="heatmap",t.paletteCache={},t}return e.prototype.updateElements=function(t,i){i===void 0&&(i=!1);for(var o=0;o<t.length;o++){var c=t[o],p=this.prepareRange(c),g=this.prepareSize(),_=(0,b.U2)(this.styleOption,["cfg","shadowBlur"]);(0,b.hj)(_)||(_=g/2),this.prepareGreyScaleBlurredCircle(g,_),this.drawWithRange(c,p,g,_)}},e.prototype.color=function(t,i){return this.createAttrOption("color",t,typeof i!="function"?i:""),this},e.prototype.clear=function(){r.prototype.clear.call(this),this.clearShadowCanvasCtx(),this.paletteCache={}},e.prototype.prepareRange=function(t){var i=this.getAttribute("color"),o=i.getFields()[0],c=1/0,p=-1/0;return t.forEach(function(g){var _=g[Ge][o];_>p&&(p=_),_<c&&(c=_)}),c===p&&(c=p-1),[c,p]},e.prototype.prepareSize=function(){var t=this.getDefaultValue("size");return(0,b.hj)(t)||(t=this.getDefaultSize()),t},e.prototype.prepareGreyScaleBlurredCircle=function(t,i){var o=this.getGrayScaleBlurredCanvas(),c=t+i,p=o.getContext("2d");o.width=o.height=c*2,p.clearRect(0,0,o.width,o.height),p.shadowOffsetX=p.shadowOffsetY=c*2,p.shadowBlur=i,p.shadowColor="black",p.beginPath(),p.arc(-c,-c,t,0,Math.PI*2,!0),p.closePath(),p.fill()},e.prototype.drawWithRange=function(t,i,o,c){var p,g,_=this.coordinate,S=_.start,I=_.end,L=this.coordinate.getWidth(),F=this.coordinate.getHeight(),z=this.getAttribute("color"),V=z.getFields()[0];this.clearShadowCanvasCtx();var Q=this.getShadowCanvasCtx();i&&(t=t.filter(function(Qr){return Qr[Ge][V]<=i[1]&&Qr[Ge][V]>=i[0]}));var st=this.scales[V];try{for(var at=(0,P.XA)(t),Rt=at.next();!Rt.done;Rt=at.next()){var Kt=Rt.value,te=this.getDrawCfg(Kt),Ae=te.x,hr=te.y,Tr=st.scale(Kt[Ge][V]);this.drawGrayScaleBlurredCircle(Ae-S.x,hr-I.y,o+c,Tr,Q)}}catch(Qr){p={error:Qr}}finally{try{Rt&&!Rt.done&&(g=at.return)&&g.call(at)}finally{if(p)throw p.error}}var Dr=Q.getImageData(0,0,L,F);this.clearShadowCanvasCtx(),this.colorize(Dr),Q.putImageData(Dr,0,0);var cn=this.getImageShape();cn.attr("x",S.x),cn.attr("y",I.y),cn.attr("width",L),cn.attr("height",F),cn.attr("img",Q.canvas),cn.set("origin",this.getShapeInfo(t))},e.prototype.getDefaultSize=function(){var t=this.getAttribute("position"),i=this.coordinate;return Math.min(i.getWidth()/(t.scales[0].ticks.length*4),i.getHeight()/(t.scales[1].ticks.length*4))},e.prototype.clearShadowCanvasCtx=function(){var t=this.getShadowCanvasCtx();t.clearRect(0,0,t.canvas.width,t.canvas.height)},e.prototype.getShadowCanvasCtx=function(){var t=this.shadowCanvas;return t||(t=document.createElement("canvas"),this.shadowCanvas=t),t.width=this.coordinate.getWidth(),t.height=this.coordinate.getHeight(),t.getContext("2d")},e.prototype.getGrayScaleBlurredCanvas=function(){return this.grayScaleBlurredCanvas||(this.grayScaleBlurredCanvas=document.createElement("canvas")),this.grayScaleBlurredCanvas},e.prototype.drawGrayScaleBlurredCircle=function(t,i,o,c,p){var g=this.getGrayScaleBlurredCanvas();p.globalAlpha=c,p.drawImage(g,t-o,i-o)},e.prototype.colorize=function(t){for(var i=this.getAttribute("color"),o=t.data,c=this.paletteCache,p=3;p<o.length;p+=4){var g=o[p];if((0,b.hj)(g)){var _=c[g]?c[g]:wa.rgb2arr(i.gradient(g/256));o[p-3]=_[0],o[p-2]=_[1],o[p-1]=_[2],o[p]=g}}},e.prototype.getImageShape=function(){var t=this.imageShape;if(t)return t;var i=this.container;return t=i.addShape({type:"image",attrs:{}}),this.imageShape=t,t},e.prototype.getShapeInfo=function(t){var i=this.getDrawCfg(t[0]),o=t.map(function(c){return c[Ge]});return(0,P.pi)((0,P.pi)({},i),{mappingData:t,data:o})},e}(Vs),aM=oE;function k_(r){var e,t,i=r.x,o=r.y,c=r.y0,p=r.size,g,_;(0,b.kJ)(o)?(e=(0,P.CR)(o,2),g=e[0],_=e[1]):(g=c,_=o);var S,I;(0,b.kJ)(i)?(t=(0,P.CR)(i,2),S=t[0],I=t[1]):(S=i-p/2,I=i+p/2);var L=[{x:S,y:g},{x:S,y:_}];return L.push({x:I,y:_},{x:I,y:g}),L}function L_(r,e){e===void 0&&(e=!0);var t=[],i=r[0];t.push(["M",i.x,i.y]);for(var o=1,c=r.length;o<c;o++)t.push(["L",r[o].x,r[o].y]);return e&&(t.push(["L",i.x,i.y]),t.push(["z"])),t}function P_(r,e){var t=0,i=0,o=0,c=0;return(0,b.kJ)(r)?r.length===1?t=i=o=c=r[0]:r.length===2?(t=o=r[0],i=c=r[1]):r.length===3?(t=r[0],i=c=r[1],o=r[2]):(t=r[0],i=r[1],o=r[2],c=r[3]):t=i=o=c=r,t+i>e&&(t=t?e/(1+i/t):0,i=e-t),o+c>e&&(o=o?e/(1+c/o):0,c=e-o),[t||0,i||0,o||0,c||0]}function O_(r,e,t){var i=[];if(t.isRect){var o=t.isTransposed?{x:t.start.x,y:e[0].y}:{x:e[0].x,y:t.start.y},c=t.isTransposed?{x:t.end.x,y:e[2].y}:{x:e[3].x,y:t.end.y},p=(0,b.U2)(r,["background","style","radius"]);if(p){var g=t.isTransposed?Math.abs(e[0].y-e[2].y):e[2].x-e[1].x,_=t.isTransposed?t.getWidth():t.getHeight(),S=(0,P.CR)(P_(p,Math.min(g,_)),4),I=S[0],L=S[1],F=S[2],z=S[3],V=t.isTransposed&&t.isReflect("y"),Q=V?0:1,st=function(hr){return V?-hr:hr};i.push(["M",o.x,c.y+st(I)]),I!==0&&i.push(["A",I,I,0,0,Q,o.x+I,c.y]),i.push(["L",c.x-L,c.y]),L!==0&&i.push(["A",L,L,0,0,Q,c.x,c.y+st(L)]),i.push(["L",c.x,o.y-st(F)]),F!==0&&i.push(["A",F,F,0,0,Q,c.x-F,o.y]),i.push(["L",o.x+z,o.y]),z!==0&&i.push(["A",z,z,0,0,Q,o.x,o.y-st(z)])}else i.push(["M",o.x,o.y]),i.push(["L",c.x,o.y]),i.push(["L",c.x,c.y]),i.push(["L",o.x,c.y]),i.push(["L",o.x,o.y]);i.push(["z"])}if(t.isPolar){var at=t.getCenter(),Rt=Jf(r,t),Kt=Rt.startAngle,te=Rt.endAngle;if(t.type!=="theta"&&!t.isTransposed)i=Cc(at.x,at.y,t.getRadius(),Kt,te);else{var Ae=function(Dr){return Math.pow(Dr,2)},I=Math.sqrt(Ae(at.x-e[0].x)+Ae(at.y-e[0].y)),L=Math.sqrt(Ae(at.x-e[2].x)+Ae(at.y-e[2].y));i=Cc(at.x,at.y,I,t.startAngle,t.endAngle,L)}}return i}function sE(r,e,t){var i=t.getWidth(),o=t.getHeight(),c=t.type==="rect",p=[],g=(r[2].x-r[1].x)/2,_=t.isTransposed?g*o/i:g*i/o;return e==="round"?(c?(p.push(["M",r[0].x,r[0].y+_]),p.push(["L",r[1].x,r[1].y-_]),p.push(["A",g,g,0,0,1,r[2].x,r[2].y-_]),p.push(["L",r[3].x,r[3].y+_]),p.push(["A",g,g,0,0,1,r[0].x,r[0].y+_])):(p.push(["M",r[0].x,r[0].y]),p.push(["L",r[1].x,r[1].y]),p.push(["A",g,g,0,0,1,r[2].x,r[2].y]),p.push(["L",r[3].x,r[3].y]),p.push(["A",g,g,0,0,1,r[0].x,r[0].y])),p.push(["z"])):p=L_(r),p}function Ly(r,e,t){var i=[];return(0,b.UM)(e)?t?i.push(["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["L",(r[2].x+r[3].x)/2,(r[2].y+r[3].y)/2],["Z"]):i.push(["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["L",r[2].x,r[2].y],["L",r[3].x,r[3].y],["Z"]):i.push(["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["L",e[1].x,e[1].y],["L",e[0].x,e[0].y],["Z"]),i}function og(r,e){return[e,r]}function oM(r,e,t){var i,o,c,p,g,_,S,I=(0,P.CR)((0,P.ev)([],(0,P.CR)(r),!1),4),L=I[0],F=I[1],z=I[2],V=I[3],Q=(0,P.CR)(typeof t=="number"?Array(4).fill(t):t,4),st=Q[0],at=Q[1],Rt=Q[2],Kt=Q[3];e.isTransposed&&(i=(0,P.CR)(og(F,V),2),F=i[0],V=i[1]),e.isReflect("y")&&(o=(0,P.CR)(og(L,F),2),L=o[0],F=o[1],c=(0,P.CR)(og(z,V),2),z=c[0],V=c[1]),e.isReflect("x")&&(p=(0,P.CR)(og(L,V),2),L=p[0],V=p[1],g=(0,P.CR)(og(F,z),2),F=g[0],z=g[1]);var te=[],Ae=function(hr){return Math.abs(hr)};return _=(0,P.CR)(P_([st,at,Rt,Kt],Math.min(Ae(V.x-L.x),Ae(F.y-L.y))).map(function(hr){return Ae(hr)}),4),st=_[0],at=_[1],Rt=_[2],Kt=_[3],e.isTransposed&&(S=(0,P.CR)([Kt,st,at,Rt],4),st=S[0],at=S[1],Rt=S[2],Kt=S[3]),L.y<F.y?(te.push(["M",V.x,V.y+Rt]),Rt!==0&&te.push(["A",Rt,Rt,0,0,0,V.x-Rt,V.y]),te.push(["L",L.x+Kt,L.y]),Kt!==0&&te.push(["A",Kt,Kt,0,0,0,L.x,L.y+Kt]),te.push(["L",F.x,F.y-st]),st!==0&&te.push(["A",st,st,0,0,0,F.x+st,F.y]),te.push(["L",z.x-at,z.y]),at!==0&&te.push(["A",at,at,0,0,0,z.x,z.y-at]),te.push(["L",V.x,V.y+Rt]),te.push(["z"])):V.x<L.x?(te.push(["M",z.x+at,z.y]),at!==0&&te.push(["A",at,at,0,0,0,z.x,z.y+at]),te.push(["L",V.x,V.y-Rt]),Rt!==0&&te.push(["A",Rt,Rt,0,0,0,V.x+Rt,V.y]),te.push(["L",L.x-Kt,L.y]),Kt!==0&&te.push(["A",Kt,Kt,0,0,0,L.x,L.y-Kt]),te.push(["L",F.x,F.y+st]),st!==0&&te.push(["A",st,st,0,0,0,F.x-st,F.y]),te.push(["L",z.x+at,z.y]),te.push(["z"])):(te.push(["M",F.x,F.y+st]),st!==0&&te.push(["A",st,st,0,0,1,F.x+st,F.y]),te.push(["L",z.x-at,z.y]),at!==0&&te.push(["A",at,at,0,0,1,z.x,z.y+at]),te.push(["L",V.x,V.y-Rt]),Rt!==0&&te.push(["A",Rt,Rt,0,0,1,V.x-Rt,V.y]),te.push(["L",L.x+Kt,L.y]),Kt!==0&&te.push(["A",Kt,Kt,0,0,1,L.x,L.y-Kt]),te.push(["L",F.x,F.y+st]),te.push(["z"])),te}var Ov=po("interval",{defaultShapeType:"rect",getDefaultPoints:function(r){return k_(r)}});wi("interval","rect",{draw:function(r,e){var t=$s(r,!1,!0),i=e,o=r==null?void 0:r.background;if(o){i=e.addGroup({name:"interval-group"});var c=ol(r),p=O_(r,this.parsePoints(r.points),this.coordinate);i.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},c),{path:p}),zIndex:-1,name:Pn})}var g;t.radius&&this.coordinate.isRect?g=oM(this.parsePoints(r.points),this.coordinate,t.radius):g=this.parsePath(sE(r.points,t.lineCap,this.coordinate));var _=i.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:g}),name:"interval"});return o?i:_},getMarker:function(r){var e=r.color,t=r.isInPolar;return t?{symbol:"circle",style:{r:4.5,fill:e}}:{symbol:"square",style:{r:4,fill:e}}}});var sM=null;function uE(r,e){var t=r.length,i=r;(0,b.HD)(i[0])&&(i=r.map(function(g){return e.translate(g)}));for(var o=i[1]-i[0],c=2;c<t;c++){var p=i[c]-i[c-1];o>p&&(o=p)}return o}function uM(r,e){if(e){var t=(0,b.xH)(r),i=(0,b.I)(t,e);return i.length}return r.length}function F_(r){var e=r.theme,t=r.coordinate,i=r.getXScale(),o=i.values,c=r.beforeMappingData,p=o.length,g=Ah(r.coordinate),_=r.intervalPadding,S=r.dodgePadding,I=r.maxColumnWidth||e.maxColumnWidth,L=r.minColumnWidth||e.minColumnWidth,F=r.columnWidthRatio||e.columnWidthRatio,z=r.multiplePieWidthRatio||e.multiplePieWidthRatio,V=r.roseWidthRatio||e.roseWidthRatio;if(i.isLinear&&o.length>1){o.sort();var Q=uE(o,i);p=(i.max-i.min)/Q,o.length>p&&(p=o.length)}var st=i.range,at=1/p,Rt=1;if(t.isPolar?t.isTransposed&&p>1?Rt=z:Rt=V:(i.isLinear&&(at*=st[1]-st[0]),Rt=F),!(0,b.UM)(_)&&_>=0){var Kt=_/g;at=(1-(p-1)*Kt)/p}else at*=Rt;if(r.getAdjust("dodge")){var te=r.getAdjust("dodge"),Ae=te.dodgeBy,hr=uM(c,Ae);if(!(0,b.UM)(S)&&S>=0){var Tr=S/g;at=(at-Tr*(hr-1))/hr}else!(0,b.UM)(_)&&_>=0&&(at*=Rt),at=at/hr;at=at>=0?at:0}if(!(0,b.UM)(I)&&I>=0){var Dr=I/g;at>Dr&&(at=Dr)}if(!(0,b.UM)(L)&&L>=0){var cn=L/g;at<cn&&(at=cn)}return at}var lM=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,t)||this;i.type="interval",i.shapeType="interval",i.generatePoints=!0;var o=t.background;return i.background=o,i}return e.prototype.createShapePointsCfg=function(t){var i=r.prototype.createShapePointsCfg.call(this,t),o,c=this.getAttribute("size");if(c){o=this.getAttributeValues(c,t)[0];var p=this.coordinate,g=Ah(p);o=o/g}else this.defaultSize||(this.defaultSize=F_(this)),o=this.defaultSize;return i.size=o,i},e.prototype.adjustScale=function(){r.prototype.adjustScale.call(this);var t=this.getYScale();if(this.coordinate.type==="theta")t.change({nice:!1,min:0,max:mv(t)});else{var i=this.scaleDefs,o=t.field,c=t.min,p=t.max,g=t.type;g!=="time"&&(c>0&&!(0,b.U2)(i,[o,"min"])&&t.change({min:0}),p<=0&&!(0,b.U2)(i,[o,"max"])&&t.change({max:0}))}},e.prototype.getDrawCfg=function(t){var i=r.prototype.getDrawCfg.call(this,t);return i.background=this.background,i},e}(Vs),cM=lM,fM=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,t)||this;i.type="line";var o=t.sortable,c=o===void 0?!1:o;return i.sortable=c,i}return e}(M_),lE=fM,R_=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"],hM=["cross","tick","plus","hyphen","line"];function D_(r,e,t,i,o){var c,p,g=$s(e,o,!o,"r"),_=r.parsePoints(e.points),S=_[0];if(e.isStack)S=_[1];else if(_.length>1){var I=t.addGroup();try{for(var L=(0,P.XA)(_),F=L.next();!F.done;F=L.next()){var z=F.value;I.addShape({type:"marker",attrs:(0,P.pi)((0,P.pi)((0,P.pi)({},g),{symbol:Ml[i]||i}),z)})}}catch(V){c={error:V}}finally{try{F&&!F.done&&(p=L.return)&&p.call(L)}finally{if(c)throw c.error}}return I}return t.addShape({type:"marker",attrs:(0,P.pi)((0,P.pi)((0,P.pi)({},g),{symbol:Ml[i]||i}),S)})}var vO=po("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(r){return pf(r)}});(0,b.S6)(R_,function(r){wi("point","hollow-".concat(r),{draw:function(e,t){return D_(this,e,t,r,!0)},getMarker:function(e){var t=e.color;return{symbol:Ml[r]||r,style:{r:4.5,stroke:t,fill:null}}}})});var gO=null,pM=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="point",t.shapeType="point",t.generatePoints=!0,t}return e.prototype.getDrawCfg=function(t){var i=r.prototype.getDrawCfg.call(this,t);return(0,P.pi)((0,P.pi)({},i),{isStack:!!this.getAdjust("stack")})},e}(Vs),cE=pM;function fE(r){for(var e=r[0],t=1,i=[["M",e.x,e.y]];t<r.length;){var o=r[t];(o.x!==r[t-1].x||o.y!==r[t-1].y)&&(i.push(["L",o.x,o.y]),o.x===e.x&&o.y===e.y&&t<r.length-1&&(e=r[t+1],i.push(["Z"]),i.push(["M",e.x,e.y]),t++)),t++}return(0,b.Xy)((0,b.Z$)(i),e)||i.push(["L",e.x,e.y]),i.push(["Z"]),i}var mO=po("polygon",{defaultShapeType:"polygon",getDefaultPoints:function(r){var e=[];return(0,b.S6)(r.x,function(t,i){var o=r.y[i];e.push({x:t,y:o})}),e}});wi("polygon","polygon",{draw:function(r,e){if(!(0,b.xb)(r.points)){var t=$s(r,!0,!0),i=this.parsePath(fE(r.points));return e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:i}),name:"polygon"})}},getMarker:function(r){var e=r.color;return{symbol:"square",style:{r:4,fill:e}}}});var yO=null,dM=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="polygon",t.shapeType="polygon",t.generatePoints=!0,t}return e.prototype.createShapePointsCfg=function(t){var i=r.prototype.createShapePointsCfg.call(this,t),o=i.x,c=i.y,p;if(!((0,b.kJ)(o)&&(0,b.kJ)(c))){var g=this.getXScale(),_=this.getYScale(),S=g.values.length,I=_.values.length,L=.5*1/S,F=.5*1/I;g.isCategory&&_.isCategory?(o=[o-L,o-L,o+L,o+L],c=[c-F,c+F,c+F,c-F]):(0,b.kJ)(o)?(p=o,o=[p[0],p[0],p[1],p[1]],c=[c-F/2,c+F/2,c+F/2,c-F/2]):(0,b.kJ)(c)&&(p=c,c=[p[0],p[1],p[1],p[0]],o=[o-L/2,o-L/2,o+L/2,o+L/2]),i.x=o,i.y=c}return i},e}(Vs),vM=dM,_O=po("schema",{defaultShapeType:""}),gM=null,hE=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="schema",t.shapeType="schema",t.generatePoints=!0,t}return e.prototype.createShapePointsCfg=function(t){var i=r.prototype.createShapePointsCfg.call(this,t),o,c=this.getAttribute("size");if(c){o=this.getAttributeValues(c,t)[0];var p=this.coordinate,g=Ah(p);o=o/g}else this.defaultSize||(this.defaultSize=F_(this)),o=this.defaultSize;return i.size=o,i},e}(Vs),mM=hE;function yM(r){if(!(0,b.kJ)(r))return[];var e=(0,b.Fp)(r);return(0,b.UI)(r,function(t){return t/e})}var xO=po("violin",{defaultShapeType:"violin",getDefaultPoints:function(r){var e=r.size/2,t=[],i=yM(r._size);return(0,b.S6)(r.y,function(o,c){var p=i[c]*e,g=c===0,_=c===r.y.length-1;t.push({isMin:g,isMax:_,x:r.x-p,y:o}),t.unshift({isMin:g,isMax:_,x:r.x+p,y:o})}),t}});wi("violin","violin",{draw:function(r,e){var t=$s(r,!0,!0),i=this.parsePath(xv(r.points));return e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:i}),name:"violin"})},getMarker:function(r){var e=r.color;return{symbol:"circle",style:{r:4,fill:e}}}});var bO=null,_M=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="violin",t.shapeType="violin",t.generatePoints=!0,t}return e.prototype.createShapePointsCfg=function(t){var i=r.prototype.createShapePointsCfg.call(this,t),o,c=this.getAttribute("size");if(c){o=this.getAttributeValues(c,t)[0];var p=this.coordinate,g=Ah(p);o=o/g}else this.defaultSize||(this.defaultSize=F_(this)),o=this.defaultSize;return i.size=o,i._size=(0,b.U2)(t[Ge],[this._sizeField]),i},e.prototype.initAttributes=function(){var t=this.attributeOption,i=t.size?t.size.fields[0]:this._sizeField?this._sizeField:"size";this._sizeField=i,delete t.size,r.prototype.initAttributes.call(this)},e}(Vs),pE=_M;wi("area","line",{draw:function(r,e){var t=$g(r,!0,!1,this),i=e.addShape({type:"path",attrs:t,name:"area"});return i},getMarker:function(r){var e=r.color;return{symbol:function(t,i,o){return o===void 0&&(o=5.5),[["M",t-o,i-4],["L",t+o,i-4],["L",t+o,i+4],["L",t-o,i+4],["Z"]]},style:{r:5,stroke:e,fill:null}}}}),wi("area","smooth",{draw:function(r,e){var t=this.coordinate,i=$g(r,!1,!0,this,I_(t)),o=e.addShape({type:"path",attrs:i,name:"area"});return o},getMarker:function(r){var e=r.color;return{symbol:function(t,i,o){return o===void 0&&(o=5.5),[["M",t-o,i-4],["L",t+o,i-4],["L",t+o,i+4],["L",t-o,i+4],["Z"]]},style:{r:5,fill:e,fillOpacity:1}}}}),wi("area","smooth-line",{draw:function(r,e){var t=this.coordinate,i=$g(r,!0,!0,this,I_(t)),o=e.addShape({type:"path",attrs:i,name:"area"});return o},getMarker:function(r){var e=r.color;return{symbol:function(t,i,o){return o===void 0&&(o=5.5),[["M",t-o,i-4],["L",t+o,i-4],["L",t+o,i+4],["L",t-o,i+4],["Z"]]},style:{r:5,stroke:e,fill:null}}}});function Py(r,e){return["C",r.x*1/2+e.x*1/2,r.y,r.x*1/2+e.x*1/2,e.y,e.x,e.y]}function B_(r,e){var t=[];t.push({x:e.x,y:e.y}),t.push(r);var i=["Q"];return(0,b.S6)(t,function(o){i.push(o.x,o.y)}),i}function xM(r,e,t){var i=B_(e,t),o=[["M",r.x,r.y]];return o.push(i),o}function bM(r,e){var t=B_(r[1],e),i=B_(r[3],e),o=[["M",r[0].x,r[0].y]];return o.push(i),o.push(["L",r[3].x,r[3].y]),o.push(["L",r[2].x,r[2].y]),o.push(t),o.push(["L",r[1].x,r[1].y]),o.push(["L",r[0].x,r[0].y]),o.push(["Z"]),o}wi("edge","arc",{draw:function(r,e){var t=$s(r,!0,!1,"lineWidth"),i=r.points,o=i.length>2?"weight":"normal",c;if(r.isInCircle){var p={x:0,y:1};return o==="normal"?c=xM(i[0],i[1],p):(t.fill=t.stroke,c=bM(i,p)),c=this.parsePath(c),e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:c})})}else{if(o==="normal")return i=this.parsePoints(i),c=gv((i[1].x+i[0].x)/2,i[0].y,Math.abs(i[1].x-i[0].x)/2,Math.PI,Math.PI*2),e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:c})});var g=Py(i[1],i[3]),_=Py(i[2],i[0]);return c=[["M",i[0].x,i[0].y],["L",i[1].x,i[1].y],g,["L",i[3].x,i[3].y],["L",i[2].x,i[2].y],_,["Z"]],c=this.parsePath(c),t.fill=t.stroke,e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:c})})}},getMarker:function(r){return{symbol:"circle",style:{r:4.5,fill:r.color}}}});function EM(r,e){var t=Py(r,e),i=[["M",r.x,r.y]];return i.push(t),i}wi("edge","smooth",{draw:function(r,e){var t=$s(r,!0,!1,"lineWidth"),i=r.points,o=this.parsePath(EM(i[0],i[1]));return e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:o})})},getMarker:function(r){return{symbol:"circle",style:{r:4.5,fill:r.color}}}});var Oy=1/3;function dE(r,e){var t=[];t.push({x:r.x,y:r.y*(1-Oy)+e.y*Oy}),t.push({x:e.x,y:r.y*(1-Oy)+e.y*Oy}),t.push(e);var i=[["M",r.x,r.y]];return(0,b.S6)(t,function(o){i.push(["L",o.x,o.y])}),i}wi("edge","vhv",{draw:function(r,e){var t=$s(r,!0,!1,"lineWidth"),i=r.points,o=this.parsePath(dE(i[0],i[1]));return e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:o})})},getMarker:function(r){return{symbol:"circle",style:{r:4.5,fill:r.color}}}}),wi("interval","funnel",{getPoints:function(r){return r.size=r.size*2,k_(r)},draw:function(r,e){var t=$s(r,!1,!0),i=this.parsePath(Ly(r.points,r.nextPoints,!1)),o=e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:i}),name:"interval"});return o},getMarker:function(r){var e=r.color;return{symbol:"square",style:{r:4,fill:e}}}}),wi("interval","hollow-rect",{draw:function(r,e){var t=$s(r,!0,!1),i=e,o=r==null?void 0:r.background;if(o){i=e.addGroup();var c=ol(r),p=O_(r,this.parsePoints(r.points),this.coordinate);i.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},c),{path:p}),zIndex:-1,name:Pn})}var g=this.parsePath(L_(r.points)),_=i.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:g}),name:"interval"});return o?i:_},getMarker:function(r){var e=r.color,t=r.isInPolar;return t?{symbol:"circle",style:{r:4.5,stroke:e,fill:null}}:{symbol:"square",style:{r:4,stroke:e,fill:null}}}});function vE(r){var e=r.x,t=r.y,i=r.y0;return(0,b.kJ)(t)?t.map(function(o,c){return{x:(0,b.kJ)(e)?e[c]:e,y:o}}):[{x:e,y:i},{x:e,y:t}]}wi("interval","line",{getPoints:function(r){return vE(r)},draw:function(r,e){var t=$s(r,!0,!1,"lineWidth"),i=$l((0,P.pi)({},t),["fill"]),o=this.parsePath(L_(r.points,!1)),c=e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},i),{path:o}),name:"interval"});return c},getMarker:function(r){var e=r.color;return{symbol:function(t,i,o){return[["M",t,i-o],["L",t,i+o]]},style:{r:5,stroke:e}}}}),wi("interval","pyramid",{getPoints:function(r){return r.size=r.size*2,k_(r)},draw:function(r,e){var t=$s(r,!1,!0),i=this.parsePath(Ly(r.points,r.nextPoints,!0)),o=e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:i}),name:"interval"});return o},getMarker:function(r){var e=r.color;return{symbol:"square",style:{r:4,fill:e}}}});function wM(r){var e,t=r.x,i=r.y,o=r.y0,c=r.size,p,g;(0,b.kJ)(i)?(e=(0,P.CR)(i,2),p=e[0],g=e[1]):(p=o,g=i);var _=t+c/2,S=t-c/2;return[{x:t,y:p},{x:t,y:g},{x:S,y:p},{x:_,y:p},{x:S,y:g},{x:_,y:g}]}function SM(r){return[["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["M",r[2].x,r[2].y],["L",r[3].x,r[3].y],["M",r[4].x,r[4].y],["L",r[5].x,r[5].y]]}wi("interval","tick",{getPoints:function(r){return wM(r)},draw:function(r,e){var t=$s(r,!0,!1),i=this.parsePath(SM(r.points)),o=e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:i}),name:"interval"});return o},getMarker:function(r){var e=r.color;return{symbol:function(t,i,o){return[["M",t-o/2,i-o],["L",t+o/2,i-o],["M",t,i-o],["L",t,i+o],["M",t-o/2,i+o],["L",t+o/2,i+o]]},style:{r:5,stroke:e}}}});var CM=function(r,e,t){var i=r.x,o=r.y,c=e.x,p=e.y,g;switch(t){case"hv":g=[{x:c,y:o}];break;case"vh":g=[{x:i,y:p}];break;case"hvh":var _=(c+i)/2;g=[{x:_,y:o},{x:_,y:p}];break;case"vhv":var S=(o+p)/2;g=[{x:i,y:S},{x:c,y:S}];break;default:break}return g};function AM(r,e){var t=[];return(0,b.S6)(r,function(i,o){var c=r[o+1];if(t.push(i),c){var p=CM(i,c,e);t=t.concat(p)}}),t}function TM(r){return r.map(function(e,t){return t===0?["M",e.x,e.y]:["L",e.x,e.y]})}function gE(r,e){var t=oh(r.points,r.connectNulls,r.showSinglePoint),i=[];return(0,b.S6)(t,function(o){var c=AM(o,e);i=i.concat(TM(c))}),(0,P.pi)((0,P.pi)({},$s(r,!0,!1,"lineWidth")),{path:i})}(0,b.S6)(["hv","vh","hvh","vhv"],function(r){wi("line",r,{draw:function(e,t){var i=gE(e,r),o=t.addShape({type:"path",attrs:i,name:"line"});return o},getMarker:function(e){return Ih(e,r)}})}),(0,b.S6)(hM,function(r){wi("point",r,{draw:function(e,t){return D_(this,e,t,r,!0)},getMarker:function(e){var t=e.color;return{symbol:Ml[r],style:{r:4.5,stroke:t,fill:null}}}})}),wi("point","image",{draw:function(r,e){var t,i,o=$s(r,!1,!1,"r").r,c=this.parsePoints(r.points),p=c[0];if(r.isStack)p=c[1];else if(c.length>1){var g=e.addGroup();try{for(var _=(0,P.XA)(c),S=_.next();!S.done;S=_.next()){var I=S.value;g.addShape("image",{attrs:{x:I.x-o/2,y:I.y-o,width:o,height:o,img:r.shape[1]}})}}catch(L){t={error:L}}finally{try{S&&!S.done&&(i=_.return)&&i.call(_)}finally{if(t)throw t.error}}return g}return e.addShape("image",{attrs:{x:p.x-o/2,y:p.y-o,width:o,height:o,img:r.shape[1]}})},getMarker:function(r){var e=r.color;return{symbol:"circle",style:{r:4.5,fill:e}}}}),(0,b.S6)(R_,function(r){wi("point",r,{draw:function(e,t){return D_(this,e,t,r,!1)},getMarker:function(e){var t=e.color;return{symbol:Ml[r]||r,style:{r:4.5,fill:t}}}})});function N_(r){var e=(0,b.kJ)(r)?r:[r],t=e[0],i=e[e.length-1],o=e.length>1?e[1]:t,c=e.length>3?e[3]:i,p=e.length>2?e[2]:o;return{min:t,max:i,min1:o,max1:c,median:p}}function mE(r,e,t){var i=t/2,o;if((0,b.kJ)(e)){var c=N_(e),p=c.min,g=c.max,_=c.median,S=c.min1,I=c.max1,L=r-i,F=r+i;o=[[L,g],[F,g],[r,g],[r,I],[L,S],[L,I],[F,I],[F,S],[r,S],[r,p],[L,p],[F,p],[L,_],[F,_]]}else{e=(0,b.UM)(e)?.5:e;var z=N_(r),p=z.min,g=z.max,_=z.median,S=z.min1,I=z.max1,V=e-i,Q=e+i;o=[[p,V],[p,Q],[p,e],[S,e],[S,V],[S,Q],[I,Q],[I,V],[I,e],[g,e],[g,V],[g,Q],[_,V],[_,Q]]}return o.map(function(st){return{x:st[0],y:st[1]}})}function MM(r){return[["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["M",r[2].x,r[2].y],["L",r[3].x,r[3].y],["M",r[4].x,r[4].y],["L",r[5].x,r[5].y],["L",r[6].x,r[6].y],["L",r[7].x,r[7].y],["L",r[4].x,r[4].y],["Z"],["M",r[8].x,r[8].y],["L",r[9].x,r[9].y],["M",r[10].x,r[10].y],["L",r[11].x,r[11].y],["M",r[12].x,r[12].y],["L",r[13].x,r[13].y]]}wi("schema","box",{getPoints:function(r){var e=r.x,t=r.y,i=r.size;return mE(e,t,i)},draw:function(r,e){var t=$s(r,!0,!1),i=this.parsePath(MM(r.points)),o=e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:i,name:"schema"})});return o},getMarker:function(r){var e=r.color;return{symbol:function(t,i,o){var c=[i-6,i-3,i,i+3,i+6],p=mE(t,c,o);return[["M",p[0].x+1,p[0].y],["L",p[1].x-1,p[1].y],["M",p[2].x,p[2].y],["L",p[3].x,p[3].y],["M",p[4].x,p[4].y],["L",p[5].x,p[5].y],["L",p[6].x,p[6].y],["L",p[7].x,p[7].y],["L",p[4].x,p[4].y],["Z"],["M",p[8].x,p[8].y],["L",p[9].x,p[9].y],["M",p[10].x+1,p[10].y],["L",p[11].x-1,p[11].y],["M",p[12].x,p[12].y],["L",p[13].x,p[13].y]]},style:{r:6,lineWidth:1,stroke:e}}}});function IM(r){var e=(0,b.kJ)(r)?r:[r],t=e.sort(function(i,o){return o-i});return Ac(t,4,t[t.length-1])}function yE(r,e,t){var i=IM(e);return[{x:r,y:i[0]},{x:r,y:i[1]},{x:r-t/2,y:i[2]},{x:r-t/2,y:i[1]},{x:r+t/2,y:i[1]},{x:r+t/2,y:i[2]},{x:r,y:i[2]},{x:r,y:i[3]}]}function kM(r){return[["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["M",r[2].x,r[2].y],["L",r[3].x,r[3].y],["L",r[4].x,r[4].y],["L",r[5].x,r[5].y],["Z"],["M",r[6].x,r[6].y],["L",r[7].x,r[7].y]]}wi("schema","candle",{getPoints:function(r){var e=r.x,t=r.y,i=r.size;return yE(e,t,i)},draw:function(r,e){var t=$s(r,!0,!0),i=this.parsePath(kM(r.points)),o=e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:i,name:"schema"})});return o},getMarker:function(r){var e=r.color;return{symbol:function(t,i,o){var c=[i+7.5,i+3,i-3,i-7.5],p=yE(t,c,o);return[["M",p[0].x,p[0].y],["L",p[1].x,p[1].y],["M",p[2].x,p[2].y],["L",p[3].x,p[3].y],["L",p[4].x,p[4].y],["L",p[5].x,p[5].y],["Z"],["M",p[6].x,p[6].y],["L",p[7].x,p[7].y]]},style:{lineWidth:1,stroke:e,fill:e,r:6}}}});function _E(r,e){var t=Math.abs(r[0].x-r[2].x),i=Math.abs(r[0].y-r[2].y),o=Math.min(t,i);e&&(o=(0,b.uZ)(e,0,Math.min(t,i))),o=o/2;var c=(r[0].x+r[2].x)/2,p=(r[0].y+r[2].y)/2;return{x:c-o,y:p-o,width:o*2,height:o*2}}wi("polygon","square",{draw:function(r,e){if(!(0,b.xb)(r.points)){var t=$s(r,!0,!0),i=this.parsePoints(r.points);return e.addShape("rect",{attrs:(0,P.pi)((0,P.pi)({},t),_E(i,r.size)),name:"polygon"})}},getMarker:function(r){var e=r.color;return{symbol:"square",style:{r:4,fill:e}}}}),wi("violin","smooth",{draw:function(r,e){var t=$s(r,!0,!0),i=this.parsePath(bv(r.points));return e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:i})})},getMarker:function(r){var e=r.color;return{symbol:"circle",style:{stroke:null,r:4,fill:e}}}}),wi("violin","hollow",{draw:function(r,e){var t=$s(r,!0,!1),i=this.parsePath(xv(r.points));return e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:i})})},getMarker:function(r){var e=r.color;return{symbol:"circle",style:{r:4,fill:null,stroke:e}}}}),wi("violin","hollow-smooth",{draw:function(r,e){var t=$s(r,!0,!1),i=this.parsePath(bv(r.points));return e.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},t),{path:i})})},getMarker:function(r){var e=r.color;return{symbol:"circle",style:{r:4,fill:null,stroke:e}}}});var xE=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getLabelValueDir=function(t){var i="y",o=t.points;return o[0][i]<=o[2][i]?1:-1},e.prototype.getLabelOffsetPoint=function(t,i,o,c){var p,g=r.prototype.getLabelOffsetPoint.call(this,t,i,o),_=this.getCoordinate(),S=_.isTransposed,I=S?"x":"y",L=this.getLabelValueDir(t.mappingData);return g=(0,P.pi)((0,P.pi)({},g),(p={},p[I]=g[I]*L,p)),_.isReflect("x")&&(g=(0,P.pi)((0,P.pi)({},g),{x:g.x*-1})),_.isReflect("y")&&(g=(0,P.pi)((0,P.pi)({},g),{y:g.y*-1})),g},e.prototype.getThemedLabelCfg=function(t){var i=this.geometry,o=this.getDefaultLabelCfg(),c=i.theme;return(0,b.b$)({},o,c.labels,t.position==="middle"?{offset:0}:{},t)},e.prototype.setLabelPosition=function(t,i,o,c){var p=this.getCoordinate(),g=p.isTransposed,_=i.points,S=p.convert(_[0]),I=p.convert(_[2]),L=this.getLabelValueDir(i),F,z,V,Q,st=(0,b.kJ)(i.shape)?i.shape[0]:i.shape;if(st==="funnel"||st==="pyramid"){var at=(0,b.U2)(i,"nextPoints"),Rt=(0,b.U2)(i,"points");if(at){var Kt=p.convert(Rt[0]),te=p.convert(Rt[1]),Ae=p.convert(at[0]),hr=p.convert(at[1]);g?(F=Math.min(Ae.y,Kt.y),V=Math.max(Ae.y,Kt.y),z=(te.x+hr.x)/2,Q=(Kt.x+Ae.x)/2):(F=Math.min((te.y+hr.y)/2,(Kt.y+Ae.y)/2),V=Math.max((te.y+hr.y)/2,(Kt.y+Ae.y)/2),z=hr.x,Q=Kt.x)}else F=Math.min(I.y,S.y),V=Math.max(I.y,S.y),z=I.x,Q=S.x}else F=Math.min(I.y,S.y),V=Math.max(I.y,S.y),z=I.x,Q=S.x;switch(c){case"right":t.x=z,t.y=(F+V)/2,t.textAlign=(0,b.U2)(t,"textAlign",L>0?"left":"right");break;case"left":t.x=Q,t.y=(F+V)/2,t.textAlign=(0,b.U2)(t,"textAlign",L>0?"left":"right");break;case"bottom":g&&(t.x=(z+Q)/2),t.y=V,t.textAlign=(0,b.U2)(t,"textAlign","center"),t.textBaseline=(0,b.U2)(t,"textBaseline",L>0?"bottom":"top");break;case"middle":g&&(t.x=(z+Q)/2),t.y=(F+V)/2,t.textAlign=(0,b.U2)(t,"textAlign","center"),t.textBaseline=(0,b.U2)(t,"textBaseline","middle");break;case"top":g&&(t.x=(z+Q)/2),t.y=F,t.textAlign=(0,b.U2)(t,"textAlign","center"),t.textBaseline=(0,b.U2)(t,"textBaseline",L>0?"bottom":"top");break;default:break}},e}(Fo),LM=xE,Fy=Math.PI/2,PM=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getLabelOffset=function(t){var i=this.getCoordinate(),o=0;if((0,b.hj)(t))o=t;else if((0,b.HD)(t)&&t.indexOf("%")!==-1){var c=i.getRadius();i.innerRadius>0&&(c=c*(1-i.innerRadius)),o=parseFloat(t)*.01*c}return o},e.prototype.getLabelItems=function(t){var i=r.prototype.getLabelItems.call(this,t),o=this.geometry.getYScale();return(0,b.UI)(i,function(c){if(c&&o){var p=o.scale((0,b.U2)(c.data,o.field));return(0,P.pi)((0,P.pi)({},c),{percent:p})}return c})},e.prototype.getLabelAlign=function(t){var i=this.getCoordinate(),o;if(t.labelEmit)o=t.angle<=Math.PI/2&&t.angle>=-Math.PI/2?"left":"right";else if(!i.isTransposed)o="center";else{var c=i.getCenter(),p=t.offset;Math.abs(t.x-c.x)<1?o="center":t.angle>Math.PI||t.angle<=0?o=p>0?"left":"right":o=p>0?"right":"left"}return o},e.prototype.getLabelPoint=function(t,i,o){var c=1,p,g=t.content[o];this.isToMiddle(i)?p=this.getMiddlePoint(i.points):(t.content.length===1&&o===0?o=1:o===0&&(c=-1),p=this.getArcPoint(i,o));var _=t.offset*c,S=this.getPointAngle(p),I=t.labelEmit,L=this.getCirclePoint(S,_,p,I);return L.r===0?L.content="":(L.content=g,L.angle=S,L.color=i.color),L.rotate=t.autoRotate?this.getLabelRotate(S,_,I):t.rotate,L.start={x:p.x,y:p.y},L},e.prototype.getArcPoint=function(t,i){return i===void 0&&(i=0),!(0,b.kJ)(t.x)&&!(0,b.kJ)(t.y)?{x:t.x,y:t.y}:{x:(0,b.kJ)(t.x)?t.x[i]:t.x,y:(0,b.kJ)(t.y)?t.y[i]:t.y}},e.prototype.getPointAngle=function(t){return fc(this.getCoordinate(),t)},e.prototype.getCirclePoint=function(t,i,o,c){var p=this.getCoordinate(),g=p.getCenter(),_=th(p,o);if(_===0)return(0,P.pi)((0,P.pi)({},g),{r:_});var S=t;if(p.isTransposed&&_>i&&!c){var I=Math.asin(i/(2*_));S=t+I*2}else _=_+i;return{x:g.x+_*Math.cos(S),y:g.y+_*Math.sin(S),r:_}},e.prototype.getLabelRotate=function(t,i,o){var c=t+Fy;return o&&(c-=Fy),c&&(c>Fy?c=c-Math.PI:c<-Fy&&(c=c+Math.PI)),c},e.prototype.getMiddlePoint=function(t){var i=this.getCoordinate(),o=t.length,c={x:0,y:0};return(0,b.S6)(t,function(p){c.x+=p.x,c.y+=p.y}),c.x/=o,c.y/=o,c=i.convert(c),c},e.prototype.isToMiddle=function(t){return t.x.length>2},e}(Fo),bE=PM,OM=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.defaultLayout="distribute",t}return e.prototype.getDefaultLabelCfg=function(t,i){var o=r.prototype.getDefaultLabelCfg.call(this,t,i);return(0,b.b$)({},o,(0,b.U2)(this.geometry.theme,"pieLabels",{}))},e.prototype.getLabelOffset=function(t){return r.prototype.getLabelOffset.call(this,t)||0},e.prototype.getLabelRotate=function(t,i,o){var c;return i<0&&(c=t,c>Math.PI/2&&(c=c-Math.PI),c<-Math.PI/2&&(c=c+Math.PI)),c},e.prototype.getLabelAlign=function(t){var i=this.getCoordinate(),o=i.getCenter(),c;return t.angle<=Math.PI/2&&t.x>=o.x?c="left":c="right",t.offset<=0&&(c==="right"?c="left":c="right"),c},e.prototype.getArcPoint=function(t){return t},e.prototype.getPointAngle=function(t){var i=this.getCoordinate(),o={x:(0,b.kJ)(t.x)?t.x[0]:t.x,y:t.y[0]},c={x:(0,b.kJ)(t.x)?t.x[1]:t.x,y:t.y[1]},p,g=fc(i,o);if(t.points&&t.points[0].y===t.points[1].y)p=g;else{var _=fc(i,c);g>=_&&(_=_+Math.PI*2),p=g+(_-g)/2}return p},e.prototype.getCirclePoint=function(t,i){var o=this.getCoordinate(),c=o.getCenter(),p=o.getRadius()+i;return(0,P.pi)((0,P.pi)({},bs(c.x,c.y,p,t)),{angle:t,r:p})},e}(bE),EE=OM,z_=4;function FM(r,e,t,i,o,c){var p,g,_=!0,S=i.start,I=i.end,L=Math.min(S.y,I.y),F=Math.abs(S.y-I.y),z,V=0,Q=Number.MIN_VALUE,st=e.map(function(Tr){return Tr.y>V&&(V=Tr.y),Tr.y<Q&&(Q=Tr.y),{size:t,targets:[Tr.y-L]}});for(Q-=L,V-L>F&&(F=V-L);_;)for(st.forEach(function(Tr){var Dr=(Math.min.apply(Q,Tr.targets)+Math.max.apply(Q,Tr.targets))/2;Tr.pos=Math.min(Math.max(Q,Dr-Tr.size/2),F-Tr.size)}),_=!1,z=st.length;z--;)if(z>0){var at=st[z-1],Rt=st[z];at.pos+at.size>Rt.pos&&(at.size+=Rt.size,at.targets=at.targets.concat(Rt.targets),at.pos+at.size>F&&(at.pos=F-at.size),st.splice(z,1),_=!0)}z=0,st.forEach(function(Tr){var Dr=L+t/2;Tr.targets.forEach(function(){e[z].y=Tr.pos+Dr,Dr+=t,z++})});var Kt={};try{for(var te=(0,P.XA)(r),Ae=te.next();!Ae.done;Ae=te.next()){var hr=Ae.value;Kt[hr.get("id")]=hr}}catch(Tr){p={error:Tr}}finally{try{Ae&&!Ae.done&&(g=te.return)&&g.call(te)}finally{if(p)throw p.error}}e.forEach(function(Tr){var Dr=Tr.r*Tr.r,cn=Math.pow(Math.abs(Tr.y-o.y),2);if(Dr<cn)Tr.x=o.x;else{var Qr=Math.sqrt(Dr-cn);c?Tr.x=o.x+Qr:Tr.x=o.x-Qr}var Tn=Kt[Tr.id];Tn.attr("x",Tr.x),Tn.attr("y",Tr.y);var xi=(0,b.sE)(Tn.getChildren(),function(va){return va.get("type")==="text"});xi&&(xi.attr("y",Tr.y),xi.attr("x",Tr.x))})}function RM(r,e,t,i){if(!(!r.length||!e.length)){var o=r[0]?r[0].offset:0,c=e[0].get("coordinate"),p=c.getRadius(),g=c.getCenter();if(o>0){var _=14,S=p+o,I=S*2+_*2,L={start:c.start,end:c.end},F=[[],[]];r.forEach(function(z){z&&(z.textAlign==="right"?F[0].push(z):F[1].push(z))}),F.forEach(function(z,V){var Q=I/_;z.length>Q&&(z.sort(function(st,at){return at["..percent"]-st["..percent"]}),z.splice(Q,z.length-Q)),z.sort(function(st,at){return st.y-at.y}),FM(e,z,_,L,g,V)})}(0,b.S6)(r,function(z){if(z&&z.labelLine){var V=z.offset,Q=z.angle,st=bs(g.x,g.y,p,Q),at=bs(g.x,g.y,p+V/2,Q),Rt=z.x+(0,b.U2)(z,"offsetX",0),Kt=z.y+(0,b.U2)(z,"offsetY",0),te={x:Rt-Math.cos(Q)*z_,y:Kt-Math.sin(Q)*z_};(0,b.Kn)(z.labelLine)||(z.labelLine={}),z.labelLine.path=["M ".concat(st.x),"".concat(st.y," Q").concat(at.x),"".concat(at.y," ").concat(te.x),te.y].join(",")}})}}function wE(r,e,t){var i=r.filter(function(V){return!V.invisible});i.sort(function(V,Q){return V.y-Q.y});var o=!0,c=t.minY,p=t.maxY,g=Math.abs(c-p),_,S=0,I=Number.MIN_VALUE,L=i.map(function(V){return V.y>S&&(S=V.y),V.y<I&&(I=V.y),{content:V.content,size:e,targets:[V.y-c],pos:null}});for(I-=c,S-c>g&&(g=S-c);o;)for(L.forEach(function(V){var Q=(Math.min.apply(I,V.targets)+Math.max.apply(I,V.targets))/2;V.pos=Math.min(Math.max(I,Q-V.size/2),g-V.size),V.pos=Math.max(0,V.pos)}),o=!1,_=L.length;_--;)if(_>0){var F=L[_-1],z=L[_];F.pos+F.size>z.pos&&(F.size+=z.size,F.targets=F.targets.concat(z.targets),F.pos+F.size>g&&(F.pos=g-F.size),L.splice(_,1),o=!0)}_=0,L.forEach(function(V){var Q=c+e/2;V.targets.forEach(function(){i[_].y=V.pos+Q,Q+=e,_++})})}var SE=4;function DM(r,e){var t=e.getCenter(),i=e.getRadius();if(r&&r.labelLine){var o=r.angle,c=r.offset,p=bs(t.x,t.y,i,o),g=r.x+(0,b.U2)(r,"offsetX",0)*(Math.cos(o)>0?1:-1),_=r.y+(0,b.U2)(r,"offsetY",0)*(Math.sin(o)>0?1:-1),S={x:g-Math.cos(o)*SE,y:_-Math.sin(o)*SE},I=r.labelLine.smooth,L=[],F=S.x-t.x,z=S.y-t.y,V=Math.atan(z/F);if(F<0&&(V+=Math.PI),I===!1){(0,b.Kn)(r.labelLine)||(r.labelLine={});var Q=0;(o<0&&o>-Math.PI/2||o>Math.PI*1.5)&&S.y>p.y&&(Q=1),o>=0&&o<Math.PI/2&&S.y>p.y&&(Q=1),o>=Math.PI/2&&o<Math.PI&&p.y>S.y&&(Q=1),(o<-Math.PI/2||o>=Math.PI&&o<Math.PI*1.5)&&p.y>S.y&&(Q=1);var st=c/2>4?4:Math.max(c/2-1,0),at=bs(t.x,t.y,i+st,o),Rt=bs(t.x,t.y,i+c/2,V),Kt=0;L.push("M ".concat(p.x," ").concat(p.y)),L.push("L ".concat(at.x," ").concat(at.y)),L.push("A ".concat(t.x," ").concat(t.y," 0 ").concat(Kt," ").concat(Q," ").concat(Rt.x," ").concat(Rt.y)),L.push("L ".concat(S.x," ").concat(S.y))}else{var at=bs(t.x,t.y,i+(c/2>4?4:Math.max(c/2-1,0)),o),te=p.x<t.x?1:-1;L.push("M ".concat(S.x," ").concat(S.y));var Ae=(p.y-t.y)/(p.x-t.x),hr=(S.y-t.y)/(S.x-t.x);Math.abs(Ae-hr)>Math.pow(Math.E,-16)&&L.push.apply(L,["C",S.x+te*4,S.y,2*at.x-p.x,2*at.y-p.y,p.x,p.y]),L.push("L ".concat(p.x," ").concat(p.y))}r.labelLine.path=L.join(" ")}}function CE(r,e,t,i){var o,c,p=(0,b.hX)(r,function(Dr){return!(0,b.UM)(Dr)}),g=e[0]&&e[0].get("coordinate");if(g){var _=g.getCenter(),S=g.getRadius(),I={};try{for(var L=(0,P.XA)(e),F=L.next();!F.done;F=L.next()){var z=F.value;I[z.get("id")]=z}}catch(Dr){o={error:Dr}}finally{try{F&&!F.done&&(c=L.return)&&c.call(L)}finally{if(o)throw o.error}}var V=(0,b.U2)(p[0],"labelHeight",14),Q=(0,b.U2)(p[0],"offset",0);if(!(Q<=0)){var st="left",at="right",Rt=(0,b.vM)(p,function(Dr){return Dr.x<_.x?st:at}),Kt=g.start,te=g.end,Ae=Math.min((S+Q+V)*2,g.getHeight()),hr=Ae/2,Tr={minX:Kt.x,maxX:te.x,minY:_.y-hr,maxY:_.y+hr};(0,b.S6)(Rt,function(Dr,cn){var Qr=Math.floor(Ae/V);Dr.length>Qr&&(Dr.sort(function(Tn,xi){return xi.percent-Tn.percent}),(0,b.S6)(Dr,function(Tn,xi){xi+1>Qr&&(I[Tn.id].set("visible",!1),Tn.invisible=!0)})),wE(Dr,V,Tr)}),(0,b.S6)(Rt,function(Dr,cn){(0,b.S6)(Dr,function(Qr){var Tn=cn===at,xi=I[Qr.id],va=xi.getChildByIndex(0);if(va){var Aa=S+Q,ao=Qr.y-_.y,Gn=Math.pow(Aa,2),Gi=Math.pow(ao,2),ca=Gn-Gi>0?Gn-Gi:0,Yi=Math.sqrt(ca),ra=Math.abs(Math.cos(Qr.angle)*Aa);Tn?Qr.x=_.x+Math.max(Yi,ra):Qr.x=_.x-Math.max(Yi,ra)}va&&(va.attr("y",Qr.y),va.attr("x",Qr.x)),DM(Qr,g)})})}}}var Ry=4,AE=4,U_=4;function sg(r,e,t){var i=e.getCenter(),o=e.getRadius(),c={x:r.x-(t?U_:-U_),y:r.y},p=bs(i.x,i.y,o+Ry,r.angle),g={x:c.x,y:c.y},_={x:p.x,y:p.y},S=bs(i.x,i.y,o,r.angle),I="";if(c.y!==p.y){var L=t?4:-4;g.y=c.y,r.angle<0&&r.angle>=-Math.PI/2&&(g.x=Math.max(p.x,c.x-L),c.y<p.y?_.y=g.y:(_.y=p.y,_.x=Math.max(_.x,g.x-L))),r.angle>0&&r.angle<Math.PI/2&&(g.x=Math.max(p.x,c.x-L),c.y>p.y?_.y=g.y:(_.y=p.y,_.x=Math.max(_.x,g.x-L))),r.angle>Math.PI/2&&(g.x=Math.min(p.x,c.x-L),c.y>p.y?_.y=g.y:(_.y=p.y,_.x=Math.min(_.x,g.x-L))),r.angle<-Math.PI/2&&(g.x=Math.min(p.x,c.x-L),c.y<p.y?_.y=g.y:(_.y=p.y,_.x=Math.min(_.x,g.x-L)))}I=["M ".concat(c.x,",").concat(c.y),"L ".concat(g.x,",").concat(g.y),"L ".concat(_.x,",").concat(_.y),"L ".concat(p.x,",").concat(p.y),"L ".concat(S.x,",").concat(S.y)].join(" "),r.labelLine=(0,b.b$)({},r.labelLine,{path:I})}function TE(r,e,t,i){var o,c,p=e[0]&&e[0].get("coordinate");if(p){var g=p.getCenter(),_=p.getRadius(),S={};try{for(var I=(0,P.XA)(e),L=I.next();!L.done;L=I.next()){var F=L.value;S[F.get("id")]=F}}catch(Dr){o={error:Dr}}finally{try{L&&!L.done&&(c=I.return)&&c.call(I)}finally{if(o)throw o.error}}var z=(0,b.U2)(r[0],"labelHeight",14),V=Math.max((0,b.U2)(r[0],"offset",0),Ry);(0,b.S6)(r,function(Dr){if(Dr){var cn=(0,b.U2)(S,[Dr.id]);if(cn){var Qr=Dr.x>g.x||Dr.x===g.x&&Dr.y>g.y,Tn=(0,b.UM)(Dr.offsetX)?AE:Dr.offsetX,xi=bs(g.x,g.y,_+Ry,Dr.angle),va=V+Tn;Dr.x=g.x+(Qr?1:-1)*(_+va),Dr.y=xi.y}}});var Q=p.start,st=p.end,at="left",Rt="right",Kt=(0,b.vM)(r,function(Dr){return Dr.x<g.x?at:Rt}),te=(_+V)*2+z;(0,b.S6)(Kt,function(Dr){var cn=Dr.length*z;cn>te&&(te=Math.min(cn,Math.abs(Q.y-st.y)))});var Ae={minX:Q.x,maxX:st.x,minY:g.y-te/2,maxY:g.y+te/2};(0,b.S6)(Kt,function(Dr,cn){var Qr=te/z;Dr.length>Qr&&(Dr.sort(function(Tn,xi){return xi.percent-Tn.percent}),(0,b.S6)(Dr,function(Tn,xi){xi>Qr&&(S[Tn.id].set("visible",!1),Tn.invisible=!0)})),wE(Dr,z,Ae)});var hr=Ae.minY,Tr=Ae.maxY;(0,b.S6)(Kt,function(Dr,cn){var Qr=cn===Rt;(0,b.S6)(Dr,function(Tn){var xi=(0,b.U2)(S,Tn&&[Tn.id]);if(xi){if(Tn.y<hr||Tn.y>Tr){xi.set("visible",!1);return}var va=xi.getChildByIndex(0),Aa=va.getCanvasBBox(),ao={x:Qr?Aa.x:Aa.maxX,y:Aa.y+Aa.height/2};Wu(va,Tn.x-ao.x,Tn.y-ao.y),Tn.labelLine&&sg(Tn,p,Qr)}})})}}function BM(r,e,t,i){(0,b.S6)(e,function(o){var c=i.minX,p=i.minY,g=i.maxX,_=i.maxY,S=o.getCanvasBBox(),I=S.minX,L=S.minY,F=S.maxX,z=S.maxY,V=S.x,Q=S.y,st=S.width,at=S.height,Rt=V,Kt=Q;(I<c||F<c)&&(Rt=c),(L<p||z<p)&&(Kt=p),I>g?Rt=g-st:F>g&&(Rt=Rt-(F-g)),L>_?Kt=_-at:z>_&&(Kt=Kt-(z-_)),(Rt!==V||Kt!==Q)&&Wu(o,Rt-V,Kt-Q)})}function ME(r,e,t,i){(0,b.S6)(e,function(o,c){var p=o.getCanvasBBox(),g=t[c].getBBox();(p.minX<g.minX||p.minY<g.minY||p.maxX>g.maxX||p.maxY>g.maxY)&&o.remove(!0)})}var IE=100,kE=function(){function r(e){e===void 0&&(e={}),this.bitmap={};var t=e.xGap,i=t===void 0?1:t,o=e.yGap,c=o===void 0?8:o;this.xGap=i,this.yGap=c}return r.prototype.hasGap=function(e){for(var t=!0,i=this.bitmap,o=Math.round(e.minX),c=Math.round(e.maxX),p=Math.round(e.minY),g=Math.round(e.maxY),_=o;_<=c;_+=1){if(!i[_]){i[_]={};continue}if(_===o||_===c){for(var S=p;S<=g;S++)if(i[_][S]){t=!1;break}}else if(i[_][p]||i[_][g]){t=!1;break}}return t},r.prototype.fillGap=function(e){for(var t=this.bitmap,i=Math.round(e.minX),o=Math.round(e.maxX),c=Math.round(e.minY),p=Math.round(e.maxY),g=i;g<=o;g+=1)t[g]||(t[g]={});for(var g=i;g<=o;g+=this.xGap){for(var _=c;_<=p;_+=this.yGap)t[g][_]=!0;t[g][p]=!0}if(this.yGap!==1)for(var g=c;g<=p;g+=1)t[i][g]=!0,t[o][g]=!0;if(this.xGap!==1)for(var g=i;g<=o;g+=1)t[g][c]=!0,t[g][p]=!0},r.prototype.destroy=function(){this.bitmap={}},r}();function NM(r,e,t){t===void 0&&(t=IE);var i=-1,o=r.attr(),c=o.x,p=o.y,g=r.getCanvasBBox(),_=Math.sqrt(g.width*g.width+g.height*g.height),S,I=-i,L=0,F=0,z=function(at){var Rt=at*.1;return[Rt*Math.cos(Rt),Rt*Math.sin(Rt)]};if(e.hasGap(g))return e.fillGap(g),!0;for(var V=!1,Q=0,st={};Math.min(Math.abs(L),Math.abs(F))<_&&Q<t;)if(S=z(I+=i),L=~~S[0],F=~~S[1],!(!L&&!F||st["".concat(L,"-").concat(F)])&&(r.attr({x:c+L,y:p+F}),L+F<0&&r.attr("textAlign","right"),Q++,e.hasGap(r.getCanvasBBox()))){e.fillGap(r.getCanvasBBox()),V=!0,st["".concat(L,"-").concat(F)]=!0;break}return V}function zM(r,e,t,i){var o=r.getCanvasBBox(),c=o.width,p=o.height,g={x:e,y:t,textAlign:"center"};switch(i){case 0:g.y-=p+1,g.x+=1,g.textAlign="left";break;case 1:g.y-=p+1,g.x-=1,g.textAlign="right";break;case 2:g.y+=p+1,g.x-=1,g.textAlign="right";break;case 3:g.y+=p+1,g.x+=1,g.textAlign="left";break;case 5:g.y-=p*2+2;break;case 6:g.y+=p*2+2;break;case 7:g.x+=c+1,g.textAlign="left";break;case 8:g.x-=c+1,g.textAlign="right";break;default:break}return r.attr(g),r.getCanvasBBox()}function LE(r,e,t,i){var o=new kE;(0,b.S6)(e,function(c){var p=c.find(function(g){return g.get("type")==="text"});NM(p,o)||c.remove(!0)}),o.destroy()}function PE(r,e,t,i){var o=new kE;(0,b.S6)(e,function(c){for(var p=c.find(function(z){return z.get("type")==="text"}),g=p.attr(),_=g.x,S=g.y,I=!1,L=0;L<=8;L++){var F=zM(p,_,S,L);if(o.hasGap(F)){o.fillGap(F),I=!0;break}}I||c.remove(!0)}),o.destroy()}function OE(r,e){return(r[0]||0)*(e[0]||0)+(r[1]||0)*(e[1]||0)+(r[2]||0)*(e[2]||0)}function Dy(r){if(r.length>4)return[];var e=function(o,c){return[c.x-o.x,c.y-o.y]},t=e(r[0],r[1]),i=e(r[1],r[2]);return[t,i]}function qg(r,e,t){e===void 0&&(e=0),t===void 0&&(t={x:0,y:0});var i=r.x,o=r.y;return{x:(i-t.x)*Math.cos(-e)+(o-t.y)*Math.sin(-e)+t.x,y:(t.x-i)*Math.sin(-e)+(o-t.y)*Math.cos(-e)+t.y}}function FE(r){var e=[{x:r.x,y:r.y},{x:r.x+r.width,y:r.y},{x:r.x+r.width,y:r.y+r.height},{x:r.x,y:r.y+r.height}],t=r.rotation;return t?[qg(e[0],t,e[0]),qg(e[1],t,e[0]),qg(e[2],t,e[0]),qg(e[3],t,e[0])]:e}function RE(r,e){if(r.length>4)return{min:0,max:0};var t=[];return r.forEach(function(i){t.push(OE([i.x,i.y],e))}),{min:Math.min.apply(Math,(0,P.ev)([],(0,P.CR)(t),!1)),max:Math.max.apply(Math,(0,P.ev)([],(0,P.CR)(t),!1))}}function UM(r,e){return r.max>e.min&&r.min<e.max}function DE(r){return typeof r=="number"&&!Number.isNaN(r)&&r!==1/0&&r!==-1/0}function BE(r){return["x","y","width","height"].every(function(e){return DE(r[e])})}function NE(r,e,t){return t===void 0&&(t=0),!(e.x>r.x+r.width+t||e.x+e.width<r.x-t||e.y>r.y+r.height+t||e.y+e.height<r.y-t)}function ZM(r,e,t){if(t===void 0&&(t=0),!BE(r)||!BE(e))return!1;if(!r.rotation&&!e.rotation)return NE(r,e,t);for(var i=FE(r),o=FE(e),c=Dy(i).concat(Dy(o)),p=0;p<c.length;p++){var g=c[p],_=RE(i,g),S=RE(o,g);if(!UM(_,S))return!1}return!0}var VM=function(){function r(e){var t=this;this.queue=[],this.worker=new Worker(e),this.worker.onmessage=function(i){var o;(o=t.queue.shift())===null||o===void 0||o.resolve(i)},this.worker.onmessageerror=function(i){var o;console.warn("[AntV G2] Web worker is not available"),(o=t.queue.shift())===null||o===void 0||o.reject(i)}}return r.prototype.post=function(e,t){var i=this;return new Promise(function(o,c){i.queue.push({resolve:o,reject:c});try{i.worker.postMessage(e)}catch(p){console.warn("[AntV G2] Web worker is not available"),(0,b.mf)(t)&&t()}})},r.prototype.destroy=function(){this.worker.terminate()},r}();function Kg(r){if(typeof window!="undefined"){var e;try{e=new Blob([r.toString()],{type:"application/javascript"})}catch(t){e=new window.BlobBuilder,e.append(r.toString()),e=e.getBlob()}return new VM(URL.createObjectURL(e))}}var zE=function(r){function e(){function S(Kt,te){return(Kt[0]||0)*(te[0]||0)+(Kt[1]||0)*(te[1]||0)+(Kt[2]||0)*(te[2]||0)}function I(Kt){if(Kt.length>4)return[];var te=function(Tr,Dr){return[Dr.x-Tr.x,Dr.y-Tr.y]},Ae=te(Kt[0],Kt[1]),hr=te(Kt[1],Kt[2]);return[Ae,hr]}function L(Kt,te,Ae){te===void 0&&(te=0),Ae===void 0&&(Ae={x:0,y:0});var hr=Kt.x,Tr=Kt.y;return{x:(hr-Ae.x)*Math.cos(-te)+(Tr-Ae.y)*Math.sin(-te)+Ae.x,y:(Ae.x-hr)*Math.sin(-te)+(Tr-Ae.y)*Math.cos(-te)+Ae.y}}function F(Kt){var te=[{x:Kt.x,y:Kt.y},{x:Kt.x+Kt.width,y:Kt.y},{x:Kt.x+Kt.width,y:Kt.y+Kt.height},{x:Kt.x,y:Kt.y+Kt.height}],Ae=Kt.rotation;return Ae?[L(te[0],Ae,te[0]),L(te[1],Ae,te[0]),L(te[2],Ae,te[0]),L(te[3],Ae,te[0])]:te}function z(Kt,te){if(Kt.length>4)return{min:0,max:0};var Ae=[];return Kt.forEach(function(hr){Ae.push(S([hr.x,hr.y],te))}),{min:Math.min.apply(null,Ae),max:Math.max.apply(null,Ae)}}function V(Kt,te){return Kt.max>te.min&&Kt.min<te.max}function Q(Kt){return typeof Kt=="number"&&!Number.isNaN(Kt)&&Kt!==1/0&&Kt!==-1/0}function st(Kt){return["x","y","width","height"].every(function(te){return Q(Kt[te])})}function at(Kt,te,Ae){return Ae===void 0&&(Ae=0),!(te.x>Kt.x+Kt.width+Ae||te.x+te.width<Kt.x-Ae||te.y>Kt.y+Kt.height+Ae||te.y+te.height<Kt.y-Ae)}function Rt(Kt,te,Ae){if(Ae===void 0&&(Ae=0),!st(Kt)||!st(te))return!1;if(!Kt.rotation&&!te.rotation)return at(Kt,te,Ae);for(var hr=F(Kt),Tr=F(te),Dr=I(hr).concat(I(Tr)),cn=0;cn<Dr.length;cn++){var Qr=Dr[cn],Tn=z(hr,Qr),xi=z(Tr,Qr);if(!V(Tn,xi))return!1}return!0}return{intersect:Rt}}var t=e().intersect;function i(S){for(var I=S.slice(),L=0;L<I.length;L++){var F=I[L];if(F.visible)for(var z=L+1;z<I.length;z++){var V=I[z];F!==V&&V.visible&&t(F,V)&&(V.visible=!1)}}return I}var o={"hide-overlap":i};try{var c=JSON.parse(r.data);if(!c||!c.type||!o[c.type])return;var p=c.type,g=c.items,_=o[p](g);self.postMessage(_)}catch(S){throw S}},Z_=`
|
|
self.onmessage = `.concat(zE.toString(),`
|
|
`),UE=function(r){for(var e=r.slice(),t=0;t<e.length;t++){var i=e[t];if(i.visible)for(var o=t+1;o<e.length;o++){var c=e[o];i!==c&&c.visible&&ZM(i,c)&&(c.visible=!1)}}return e},gf=new Map,ZE=Kg(Z_);function GM(r,e,t,i){return(0,P.mG)(this,void 0,void 0,function(){var o,c,p,g,_,S;return(0,P.Jh)(this,function(I){switch(I.label){case 0:return o=e.map(function(L,F){return(0,P.pi)((0,P.pi)({},ms(L,r[F],(0,b.U2)(r[F],"background.padding"))),{visible:!0})}),c=JSON.stringify(o),p=function(L){return gf.set(c,L),(0,b.S6)(L,function(F,z){var V=F.visible,Q=e[z];V?Q==null||Q.show():Q==null||Q.hide()}),L},gf.get(c)?(p(gf.get(c)),[3,7]):[3,1];case 1:if(!ZE)return[3,6];I.label=2;case 2:return I.trys.push([2,4,,5]),g=JSON.stringify({type:"hide-overlap",items:o}),[4,ZE.post(g,function(){return p(UE(o))})];case 3:return _=I.sent(),p(Array.isArray(_.data)?_.data:[]),[3,5];case 4:return S=I.sent(),console.error(S),p(UE(o)),[3,5];case 5:return[3,7];case 6:p(UE(o)),I.label=7;case 7:return[2]}})})}var Qg={"#5B8FF9":!0},HM=function(r){var e=wa.toRGB(r).toUpperCase();if(Qg[e])return Qg[e];var t=(0,P.CR)(wa.rgb2arr(e),3),i=t[0],o=t[1],c=t[2],p=(i*299+o*587+c*114)/1e3<128;return p};function EO(r,e,t){if(t.length!==0){var i=t[0].get("element"),o=i.geometry.theme,c=o.labels||{},p=c.fillColorLight,g=c.fillColorDark;t.forEach(function(_,S){var I=e[S],L=I.find(function(at){return at.get("type")==="text"}),F=Pu.fromObject(_.getBBox()),z=Pu.fromObject(L.getCanvasBBox()),V=!F.contains(z),Q=_.attr("fill"),st=HM(Q);V?L.attr(o.overflowLabels.style):st?p&&L.attr("fill",p):g&&L.attr("fill",g)})}}function jM(r,e,t){var i=r.coordinate,o=Ja(e),c=Pu.fromObject(o.getCanvasBBox()),p=Pu.fromObject(t.getBBox());return i.isTransposed?p.height>=c.height:p.width>=c.width}function wO(r,e,t){var i=!!r.getAdjust("stack");return i||e.every(function(o,c){var p=t[c];return jM(r,o,p)})}function WM(r,e,t){var i=r.coordinate,o=Pu.fromObject(t.getBBox()),c=Ja(e);i.isTransposed?c.attr({x:o.minX+o.width/2,textAlign:"center"}):c.attr({y:o.minY+o.height/2,textBaseline:"middle"})}function SO(r,e,t){var i;if(t.length!==0){var o=(i=t[0])===null||i===void 0?void 0:i.get("element"),c=o==null?void 0:o.geometry;if(!(!c||c.type!=="interval")){var p=wO(c,e,t);p&&t.forEach(function(g,_){var S=e[_];WM(c,S,g)})}}}function XM(r){var e=500,t=[],i=Math.max(Math.floor(r.length/e),1);return(0,b.S6)(r,function(o,c){c%i===0?t.push(o):o.set("visible",!1)}),t}function YM(r,e,t){var i;if(t.length!==0){var o=(i=t[0])===null||i===void 0?void 0:i.get("element"),c=o==null?void 0:o.geometry;if(!(!c||c.type!=="interval")){var p=XM(e),g=(0,P.CR)(c.getXYFields(),1),_=g[0],S=[],I=[],L=(0,b.vM)(p,function(st){return st.get("data")[_]}),F=(0,b.jj)((0,b.UI)(p,function(st){return st.get("data")[_]})),z;p.forEach(function(st){st.set("visible",!0)});var V=function(st){st&&(st.length&&I.push(st.pop()),I.push.apply(I,(0,P.ev)([],(0,P.CR)(st),!1)))};for((0,b.dp)(F)>0&&(z=F.shift(),V(L[z])),(0,b.dp)(F)>0&&(z=F.pop(),V(L[z])),(0,b.S6)(F.reverse(),function(st){V(L[st])});I.length>0;){var Q=I.shift();Q.get("visible")&&(Bo(Q,S)?Q.set("visible",!1):S.push(Q))}}}}function CO(r,e){var t=r.getXYFields()[1],i=[],o=e.sort(function(c,p){return c.get("data")[t]-c.get("data")[t]});return o.length>0&&i.push(o.shift()),o.length>0&&i.push(o.pop()),i.push.apply(i,(0,P.ev)([],(0,P.CR)(o),!1)),i}function $M(r,e,t){return r.some(function(i){return t(i,e)})}function AO(r,e,t){t===void 0&&(t=0);var i=Math.max(0,Math.min(r.x+r.width+t,e.x+e.width+t)-Math.max(r.x-t,e.x-t)),o=Math.max(0,Math.min(r.y+r.height+t,e.y+e.height+t)-Math.max(r.y-t,e.y-t));return i*o}function VE(r,e){return $M(r,e,function(t,i){var o=Ja(t),c=Ja(i);return AO(o.getCanvasBBox(),c.getCanvasBBox(),2)>0})}function GE(r,e,t,i,o){var c,p;if(t.length!==0){var g=(c=t[0])===null||c===void 0?void 0:c.get("element"),_=g==null?void 0:g.geometry;if(!(!_||_.type!=="point")){var S=(0,P.CR)(_.getXYFields(),2),I=S[0],L=S[1],F=(0,b.vM)(e,function(Q){return Q.get("data")[I]}),z=[],V=o&&o.offset||((p=r[0])===null||p===void 0?void 0:p.offset)||12;(0,b.UI)((0,b.XP)(F).reverse(),function(Q){for(var st=CO(_,F[Q]);st.length;){var at=st.shift(),Rt=Ja(at);if($M(z,at,function(Ae,hr){return Ae.get("data")[I]===hr.get("data")[I]&&Ae.get("data")[L]===hr.get("data")[L]})){Rt.set("visible",!1);continue}var Kt=VE(z,at),te=!1;if(Kt&&(Rt.attr("y",Rt.attr("y")+2*V),te=VE(z,at)),te){Rt.set("visible",!1);continue}z.push(at)}})}}}function TO(r,e){var t=r.getXYFields()[1],i=[],o=e.sort(function(c,p){return c.get("data")[t]-c.get("data")[t]});return o.length>0&&i.push(o.shift()),o.length>0&&i.push(o.pop()),i.push.apply(i,(0,P.ev)([],(0,P.CR)(o),!1)),i}function HE(r,e,t){return r.some(function(i){return t(i,e)})}function MO(r,e,t){t===void 0&&(t=0);var i=Math.max(0,Math.min(r.x+r.width+t,e.x+e.width+t)-Math.max(r.x-t,e.x-t)),o=Math.max(0,Math.min(r.y+r.height+t,e.y+e.height+t)-Math.max(r.y-t,e.y-t));return i*o}function jE(r,e){return HE(r,e,function(t,i){var o=Ja(t),c=Ja(i);return MO(o.getCanvasBBox(),c.getCanvasBBox(),2)>0})}function IO(r,e,t,i,o){var c,p;if(t.length!==0){var g=(c=t[0])===null||c===void 0?void 0:c.get("element"),_=g==null?void 0:g.geometry;if(!(!_||["path","line","area"].indexOf(_.type)<0)){var S=(0,P.CR)(_.getXYFields(),2),I=S[0],L=S[1],F=(0,b.vM)(e,function(Q){return Q.get("data")[I]}),z=[],V=o&&o.offset||((p=r[0])===null||p===void 0?void 0:p.offset)||12;(0,b.UI)((0,b.XP)(F).reverse(),function(Q){for(var st=TO(_,F[Q]);st.length;){var at=st.shift(),Rt=Ja(at);if(HE(z,at,function(Ae,hr){return Ae.get("data")[I]===hr.get("data")[I]&&Ae.get("data")[L]===hr.get("data")[L]})){Rt.set("visible",!1);continue}var Kt=jE(z,at),te=!1;if(Kt&&(Rt.attr("y",Rt.attr("y")+2*V),te=jE(z,at)),te){Rt.set("visible",!1);continue}z.push(at)}})}}}var V_;function qM(){return V_||(V_=document.createElement("canvas").getContext("2d")),V_}var By=(0,b.HP)(function(r,e){e===void 0&&(e={});var t=e.fontSize,i=e.fontFamily,o=e.fontWeight,c=e.fontStyle,p=e.fontVariant,g=qM();return g.font=[c,p,o,"".concat(t,"px"),i].join(" "),g.measureText((0,b.HD)(r)?r:"").width},function(r,e){return e===void 0&&(e={}),(0,P.ev)([r],(0,P.CR)((0,b.VO)(e)),!1).join("")}),Ny=function(r,e,t){var i=16,o=By("...",t),c;(0,b.HD)(r)?c=r:c=(0,b.BB)(r);var p=e,g=[],_,S;if(By(r,t)<=e)return r;for(;_=c.substr(0,i),S=By(_,t),!(S+o>p&&S>p);)if(g.push(_),p-=S,c=c.substr(i),!c)return g.join("");for(;_=c.substr(0,1),S=By(_,t),!(S+o>p);)if(g.push(_),p-=S,c=c.substr(1),!c)return g.join("");return"".concat(g.join(""),"...")};function kO(r,e,t,i,o){if(!(e.length<=0)){var c=(o==null?void 0:o.direction)||["top","right","bottom","left"],p=(o==null?void 0:o.action)||"translate",g=(o==null?void 0:o.margin)||0,_=e[0].get("coordinate");if(_){var S=Ad(_,g),I=S.minX,L=S.minY,F=S.maxX,z=S.maxY;(0,b.S6)(e,function(V){var Q=V.getCanvasBBox(),st=Q.minX,at=Q.minY,Rt=Q.maxX,Kt=Q.maxY,te=Q.x,Ae=Q.y,hr=Q.width,Tr=Q.height,Dr=te,cn=Ae;if(c.indexOf("left")>=0&&(st<I||Rt<I)&&(Dr=I),c.indexOf("top")>=0&&(at<L||Kt<L)&&(cn=L),c.indexOf("right")>=0&&(st>F?Dr=F-hr:Rt>F&&(Dr=Dr-(Rt-F))),c.indexOf("bottom")>=0&&(at>z?cn=z-Tr:Kt>z&&(cn=cn-(Kt-z))),Dr!==te||cn!==Ae){var Qr=Dr-te;if(p==="translate")Wu(V,Qr,cn-Ae);else if(p==="ellipsis"){var Tn=V.findAll(function(xi){return xi.get("type")==="text"});Tn.forEach(function(xi){var va=(0,b.ei)(xi.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),Aa=xi.getCanvasBBox(),ao=Ny(xi.attr("text"),Aa.width-Math.abs(Qr),va);xi.attr("text",ao)})}else V.hide()}})}}}function LO(r,e,t){var i={fillOpacity:(0,b.UM)(r.attr("fillOpacity"))?1:r.attr("fillOpacity"),strokeOpacity:(0,b.UM)(r.attr("strokeOpacity"))?1:r.attr("strokeOpacity"),opacity:(0,b.UM)(r.attr("opacity"))?1:r.attr("opacity")};r.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),r.animate(i,e)}function dp(r,e,t){var i={fillOpacity:0,strokeOpacity:0,opacity:0},o=e.easing,c=e.duration,p=e.delay;r.animate(i,c,o,function(){r.remove(!0)},p)}function Ns(r,e,t){var i,o=(0,P.CR)(e,2),c=o[0],p=o[1];return r.applyToMatrix([c,p,1]),t==="x"?(r.setMatrix(no.vs(r.getMatrix(),[["t",-c,-p],["s",.01,1],["t",c,p]])),i=no.vs(r.getMatrix(),[["t",-c,-p],["s",100,1],["t",c,p]])):t==="y"?(r.setMatrix(no.vs(r.getMatrix(),[["t",-c,-p],["s",1,.01],["t",c,p]])),i=no.vs(r.getMatrix(),[["t",-c,-p],["s",1,100],["t",c,p]])):t==="xy"&&(r.setMatrix(no.vs(r.getMatrix(),[["t",-c,-p],["s",.01,.01],["t",c,p]])),i=no.vs(r.getMatrix(),[["t",-c,-p],["s",100,100],["t",c,p]])),i}function Qp(r,e,t,i,o){var c=t.start,p=t.end,g=t.getWidth(),_=t.getHeight(),S,I;o==="y"?(S=c.x+g/2,I=i.y<c.y?i.y:c.y):o==="x"?(S=i.x>c.x?i.x:c.x,I=c.y+_/2):o==="xy"&&(t.isPolar?(S=t.getCenter().x,I=t.getCenter().y):(S=(c.x+p.x)/2,I=(c.y+p.y)/2));var L=Ns(r,[S,I],o);r.animate({matrix:L},e)}function ea(r,e,t){var i=t.coordinate,o=t.minYPoint;Qp(r,e,i,o,"x")}function vp(r,e,t){var i=t.coordinate,o=t.minYPoint;Qp(r,e,i,o,"y")}function G_(r,e,t){var i=t.coordinate,o=t.minYPoint;Qp(r,e,i,o,"xy")}function E0(r,e,t){var i=r.getTotalLength();r.attr("lineDash",[i]),r.animate(function(o){return{lineDashOffset:(1-o)*i}},e)}function zy(r,e,t){var i=t.toAttrs,o=i.x,c=i.y;delete i.x,delete i.y,r.attr(i),r.animate({x:o,y:c},e)}function KM(r,e,t){var i=r.getBBox(),o=r.get("origin").mappingData,c=o.points,p=c[0].y-c[1].y>0?i.maxX:i.minX,g=(i.minY+i.maxY)/2;r.applyToMatrix([p,g,1]);var _=no.vs(r.getMatrix(),[["t",-p,-g],["s",.01,1],["t",p,g]]);r.setMatrix(_),r.animate({matrix:no.vs(r.getMatrix(),[["t",-p,-g],["s",100,1],["t",p,g]])},e)}function QM(r,e,t){var i=r.getBBox(),o=r.get("origin").mappingData,c=(i.minX+i.maxX)/2,p=o.points,g=p[0].y-p[1].y<=0?i.maxY:i.minY;r.applyToMatrix([c,g,1]);var _=no.vs(r.getMatrix(),[["t",-c,-g],["s",1,.01],["t",c,g]]);r.setMatrix(_),r.animate({matrix:no.vs(r.getMatrix(),[["t",-c,-g],["s",1,100],["t",c,g]])},e)}function Uy(r,e){var t,i=Ud(r,e),o=i.startAngle,c=i.endAngle;return!(0,b.vQ)(o,-Math.PI*.5)&&o<-Math.PI*.5&&(o+=Math.PI*2),!(0,b.vQ)(c,-Math.PI*.5)&&c<-Math.PI*.5&&(c+=Math.PI*2),e[5]===0&&(t=(0,P.CR)([c,o],2),o=t[0],c=t[1]),(0,b.vQ)(o,Math.PI*1.5)&&(o=Math.PI*-.5),(0,b.vQ)(c,Math.PI*-.5)&&!(0,b.vQ)(o,c)&&(c=Math.PI*1.5),{startAngle:o,endAngle:c}}function WE(r){var e;return r[0]==="M"||r[0]==="L"?e=[r[1],r[2]]:(r[0]==="a"||r[0]==="A"||r[0]==="C")&&(e=[r[r.length-2],r[r.length-1]]),e}function H_(r){var e,t,i,o=r.filter(function(Kt){return Kt[0]==="A"||Kt[0]==="a"});if(o.length===0)return{startAngle:0,endAngle:0,radius:0,innerRadius:0};var c=o[0],p=o.length>1?o[1]:o[0],g=r.indexOf(c),_=r.indexOf(p),S=WE(r[g-1]),I=WE(r[_-1]),L=Uy(S,c),F=L.startAngle,z=L.endAngle,V=Uy(I,p),Q=V.startAngle,st=V.endAngle;(0,b.vQ)(F,Q)&&(0,b.vQ)(z,st)?(t=F,i=z):(t=Math.min(F,Q),i=Math.max(z,st));var at=c[1],Rt=o[o.length-1][1];return at<Rt?(e=(0,P.CR)([Rt,at],2),at=e[0],Rt=e[1]):at===Rt&&(Rt=0),{startAngle:t,endAngle:i,radius:at,innerRadius:Rt}}function JM(r,e,t){var i=t.toAttrs,o=t.coordinate,c=i.path||[],p=c.map(function(Rt){return Rt[0]});if(!(c.length<1)){var g=H_(c),_=g.startAngle,S=g.endAngle,I=g.radius,L=g.innerRadius,F=H_(r.attr("path")),z=F.startAngle,V=F.endAngle,Q=o.getCenter(),st=_-z,at=S-V;if(st===0&&at===0){r.attr("path",c);return}r.animate(function(Rt){var Kt=z+Rt*st,te=V+Rt*at;return(0,P.pi)((0,P.pi)({},i),{path:(0,b.Xy)(p,["M","A","A","Z"])?gv(Q.x,Q.y,I,Kt,te):Cc(Q.x,Q.y,I,Kt,te,L)})},(0,P.pi)((0,P.pi)({},e),{callback:function(){r.attr("path",c)}}))}}function t3(r,e,t){var i=Cd(t.coordinate,20),o=i.type,c=i.startState,p=i.endState,g=r.setClip({type:o,attrs:c});t.toAttrs&&r.attr(t.toAttrs),g.animate(p,(0,P.pi)((0,P.pi)({},e),{callback:function(){r&&!r.get("destroyed")&&r.set("clipShape",null),g.remove(!0)}}))}function XE(r,e,t){if(r.isGroup())(0,b.S6)(r.getChildren(),function(g){XE(g,e,t)});else{var i=r.getBBox(),o=(i.minX+i.maxX)/2,c=(i.minY+i.maxY)/2;if(r.applyToMatrix([o,c,1]),t==="zoomIn"){var p=no.vs(r.getMatrix(),[["t",-o,-c],["s",.01,.01],["t",o,c]]);r.setMatrix(p),r.animate({matrix:no.vs(r.getMatrix(),[["t",-o,-c],["s",100,100],["t",o,c]])},e)}else r.animate({matrix:no.vs(r.getMatrix(),[["t",-o,-c],["s",.01,.01],["t",o,c]])},(0,P.pi)((0,P.pi)({},e),{callback:function(){r.remove(!0)}}))}}function PO(r,e,t){XE(r,e,"zoomIn")}function e3(r,e,t){XE(r,e,"zoomOut")}function Xd(r){return[le.TOP,le.BOTTOM].includes(r)?{offsetX:0,offsetY:r===le.TOP?-8:8,style:{textAlign:"center",textBaseline:r===le.TOP?"bottom":"top"}}:[le.LEFT,le.RIGHT].includes(r)?{offsetX:r===le.LEFT?-8:8,offsetY:0,style:{textAlign:r===le.LEFT?"right":"left",textBaseline:"middle",rotate:Math.PI/2}}:{}}function Yd(r,e,t){return{x:r.x+e*Math.cos(t),y:r.y+e*Math.sin(t)}}var r3=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){return(0,b.b$)({},r.prototype.getDefaultCfg.call(this),{type:"circle",showTitle:!0,title:r.prototype.getDefaultTitleCfg.call(this)})},e.prototype.render=function(){r.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},e.prototype.getRegion=function(t,i){var o=.5,c={x:.5,y:.5},p=Math.PI*2/t,g=-1*Math.PI/2+p*i,_=o/(1+1/Math.sin(p/2)),S=Yd(c,o-_,g),I=Math.PI*5/4,L=Math.PI*1/4;return{start:Yd(S,_,I),end:Yd(S,_,L)}},e.prototype.afterEachView=function(t,i){this.processAxis(t,i)},e.prototype.beforeEachView=function(t,i){},e.prototype.generateFacets=function(t){var i=this,o=this.cfg,c=o.fields,p=o.type,g=(0,P.CR)(c,1),_=g[0];if(!_)throw new Error("No `fields` specified!");var S=this.getFieldValues(t,_),I=S.length,L=[];return S.forEach(function(F,z){var V=[{field:_,value:F,values:S}],Q=(0,b.hX)(t,i.getFacetDataFilter(V)),st={type:p,data:Q,region:i.getRegion(I,z),columnValue:F,columnField:_,columnIndex:z,columnValuesLength:I,rowValue:null,rowField:null,rowIndex:0,rowValuesLength:1};L.push(st)}),L},e.prototype.getXAxisOption=function(t,i,o,c){return o},e.prototype.getYAxisOption=function(t,i,o,c){return o},e.prototype.renderTitle=function(){var t=this;(0,b.S6)(this.facets,function(i){var o=i.columnValue,c=i.view,p=(0,b.U2)(t.cfg.title,"formatter"),g=(0,b.b$)({position:["50%","0%"],content:p?p(o):o},Xd(le.TOP),t.cfg.title);c.annotation().text(g)})},e}(il),n3=r3,Zy=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){return(0,b.b$)({},r.prototype.getDefaultCfg.call(this),{type:"list",cols:null,showTitle:!0,title:r.prototype.getDefaultTitleCfg.call(this)})},e.prototype.render=function(){r.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},e.prototype.afterEachView=function(t,i){this.processAxis(t,i)},e.prototype.beforeEachView=function(t,i){},e.prototype.generateFacets=function(t){var i=this,o=this.cfg.fields,c=this.cfg.cols,p=(0,P.CR)(o,1),g=p[0];if(!g)throw new Error("No `fields` specified!");var _=this.getFieldValues(t,g),S=_.length;c=c||S;var I=this.getPageCount(S,c),L=[];return _.forEach(function(F,z){var V=i.getRowCol(z,c),Q=V.row,st=V.col,at=[{field:g,value:F,values:_}],Rt=(0,b.hX)(t,i.getFacetDataFilter(at)),Kt={type:i.cfg.type,data:Rt,region:i.getRegion(I,c,st,Q),columnValue:F,rowValue:F,columnField:g,rowField:null,columnIndex:st,rowIndex:Q,columnValuesLength:c,rowValuesLength:I,total:S};L.push(Kt)}),L},e.prototype.getXAxisOption=function(t,i,o,c){return c.rowIndex!==c.rowValuesLength-1&&c.columnValuesLength*c.rowIndex+c.columnIndex+1+c.columnValuesLength<=c.total?(0,P.pi)((0,P.pi)({},o),{label:null,title:null}):o},e.prototype.getYAxisOption=function(t,i,o,c){return c.columnIndex!==0?(0,P.pi)((0,P.pi)({},o),{title:null,label:null}):o},e.prototype.renderTitle=function(){var t=this;(0,b.S6)(this.facets,function(i){var o=i.columnValue,c=i.view,p=(0,b.U2)(t.cfg.title,"formatter"),g=(0,b.b$)({position:["50%","0%"],content:p?p(o):o},Xd(le.TOP),t.cfg.title);c.annotation().text(g)})},e.prototype.getPageCount=function(t,i){return Math.floor((t+i-1)/i)},e.prototype.getRowCol=function(t,i){var o=Math.floor(t/i),c=t%i;return{row:o,col:c}},e}(il),i3=Zy,a3=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){return(0,b.b$)({},r.prototype.getDefaultCfg.call(this),{type:"matrix",showTitle:!1,columnTitle:(0,P.pi)({},r.prototype.getDefaultTitleCfg.call(this)),rowTitle:(0,P.pi)({},r.prototype.getDefaultTitleCfg.call(this))})},e.prototype.render=function(){r.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},e.prototype.afterEachView=function(t,i){this.processAxis(t,i)},e.prototype.beforeEachView=function(t,i){},e.prototype.generateFacets=function(t){for(var i=this.cfg,o=i.fields,c=i.type,p=o.length,g=p,_=[],S=0;S<g;S++)for(var I=o[S],L=0;L<p;L++){var F=o[L],z={type:c,data:t,region:this.getRegion(p,g,S,L),columnValue:I,rowValue:F,columnField:I,rowField:F,columnIndex:S,rowIndex:L,columnValuesLength:g,rowValuesLength:p};_.push(z)}return _},e.prototype.getXAxisOption=function(t,i,o,c){return c.rowIndex!==c.rowValuesLength-1?(0,P.pi)((0,P.pi)({},o),{label:null,title:null}):o},e.prototype.getYAxisOption=function(t,i,o,c){return c.columnIndex!==0?(0,P.pi)((0,P.pi)({},o),{title:null,label:null}):o},e.prototype.renderTitle=function(){var t=this;(0,b.S6)(this.facets,function(i,o){var c=i.columnIndex,p=i.rowIndex,g=i.columnValuesLength,_=i.rowValuesLength,S=i.columnValue,I=i.rowValue,L=i.view;if(p===0){var F=(0,b.U2)(t.cfg.columnTitle,"formatter"),z=(0,b.b$)({position:["50%","0%"],content:F?F(S):S},Xd(le.TOP),t.cfg.columnTitle);L.annotation().text(z)}if(c===g-1){var F=(0,b.U2)(t.cfg.rowTitle,"formatter"),z=(0,b.b$)({position:["100%","50%"],content:F?F(I):I},Xd(le.RIGHT),t.cfg.rowTitle);L.annotation().text(z)}})},e}(il),YE=a3,o3=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){return(0,b.b$)({},r.prototype.getDefaultCfg.call(this),{type:"mirror",showTitle:!0,title:r.prototype.getDefaultTitleCfg.call(this),transpose:!1})},e.prototype.render=function(){r.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},e.prototype.beforeEachView=function(t,i){this.cfg.transpose?i.columnIndex%2===0?t.coordinate().transpose().reflect("x"):t.coordinate().transpose():i.rowIndex%2!==0&&t.coordinate().reflect("y")},e.prototype.afterEachView=function(t,i){this.processAxis(t,i)},e.prototype.generateFacets=function(t){var i=this,o=(0,P.CR)(this.cfg.fields,1),c=o[0],p=[],g=1,_=1,S=[""],I=[""],L,F;return this.cfg.transpose?(L=c,S=this.getFieldValues(t,L).slice(0,2),g=S.length):(F=c,I=this.getFieldValues(t,F).slice(0,2),_=I.length),S.forEach(function(z,V){I.forEach(function(Q,st){var at=[{field:L,value:z,values:S},{field:F,value:Q,values:I}],Rt=(0,b.hX)(t,i.getFacetDataFilter(at)),Kt={type:i.cfg.type,data:Rt,region:i.getRegion(_,g,V,st),columnValue:z,rowValue:Q,columnField:L,rowField:F,columnIndex:V,rowIndex:st,columnValuesLength:g,rowValuesLength:_};p.push(Kt)})}),p},e.prototype.getXAxisOption=function(t,i,o,c){return c.columnIndex===1||c.rowIndex===1?(0,P.pi)((0,P.pi)({},o),{label:null,title:null}):o},e.prototype.getYAxisOption=function(t,i,o,c){return o},e.prototype.renderTitle=function(){var t=this;(0,b.S6)(this.facets,function(i,o){var c=i.columnValue,p=i.rowValue,g=i.view,_=(0,b.U2)(t.cfg.title,"formatter");if(t.cfg.transpose){var S=(0,b.b$)({position:["50%","0%"],content:_?_(c):c},Xd(le.TOP),t.cfg.title);g.annotation().text(S)}else{var S=(0,b.b$)({position:["100%","50%"],content:_?_(p):p},Xd(le.RIGHT),t.cfg.title);g.annotation().text(S)}})},e}(il),s3=o3,u3=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.afterEachView=function(t,i){this.processAxis(t,i)},e.prototype.beforeEachView=function(t,i){},e.prototype.getDefaultCfg=function(){return(0,b.b$)({},r.prototype.getDefaultCfg.call(this),{type:"rect",columnTitle:(0,P.pi)({},r.prototype.getDefaultTitleCfg.call(this)),rowTitle:(0,P.pi)({},r.prototype.getDefaultTitleCfg.call(this))})},e.prototype.render=function(){r.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},e.prototype.generateFacets=function(t){var i=this,o=(0,P.CR)(this.cfg.fields,2),c=o[0],p=o[1],g=[],_=1,S=1,I=[""],L=[""];return c&&(I=this.getFieldValues(t,c),_=I.length),p&&(L=this.getFieldValues(t,p),S=L.length),I.forEach(function(F,z){L.forEach(function(V,Q){var st=[{field:c,value:F,values:I},{field:p,value:V,values:L}],at=(0,b.hX)(t,i.getFacetDataFilter(st)),Rt={type:i.cfg.type,data:at,region:i.getRegion(S,_,z,Q),columnValue:F,rowValue:V,columnField:c,rowField:p,columnIndex:z,rowIndex:Q,columnValuesLength:_,rowValuesLength:S};g.push(Rt)})}),g},e.prototype.renderTitle=function(){var t=this;(0,b.S6)(this.facets,function(i,o){var c=i.columnIndex,p=i.rowIndex,g=i.columnValuesLength,_=i.columnValue,S=i.rowValue,I=i.view;if(p===0){var L=(0,b.U2)(t.cfg.columnTitle,"formatter"),F=(0,b.b$)({position:["50%","0%"],content:L?L(_):_},Xd(le.TOP),t.cfg.columnTitle);I.annotation().text(F)}if(c===g-1){var L=(0,b.U2)(t.cfg.rowTitle,"formatter"),F=(0,b.b$)({position:["100%","50%"],content:L?L(S):S},Xd(le.RIGHT),t.cfg.rowTitle);I.annotation().text(F)}})},e.prototype.getXAxisOption=function(t,i,o,c){return c.rowIndex!==c.rowValuesLength-1?(0,P.pi)((0,P.pi)({},o),{title:null,label:null}):c.columnIndex!==Math.floor((c.columnValuesLength-1)/2)?(0,P.pi)((0,P.pi)({},o),{title:null}):o},e.prototype.getYAxisOption=function(t,i,o,c){return c.columnIndex!==0?(0,P.pi)((0,P.pi)({},o),{title:null,label:null}):c.rowIndex!==Math.floor((c.rowValuesLength-1)/2)?(0,P.pi)((0,P.pi)({},o),{title:null}):o},e}(il),l3=u3,c3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.afterChartRender=function(){t.facets&&t.cfg.line&&(t.container.clear(),t.drawLines(t.facets))},t}return e.prototype.afterEachView=function(t,i){this.processAxis(t,i)},e.prototype.beforeEachView=function(t,i){},e.prototype.init=function(){r.prototype.init.call(this),this.view.on(At.AFTER_RENDER,this.afterChartRender)},e.prototype.getDefaultCfg=function(){return(0,b.b$)({},r.prototype.getDefaultCfg.call(this),{type:"tree",line:{style:{lineWidth:1,stroke:"#ddd"},smooth:!1},showTitle:!0,title:r.prototype.getDefaultTitleCfg.call(this)})},e.prototype.generateFacets=function(t){var i=this.cfg.fields;if(!i.length)throw new Error("Please specify for the fields for rootFacet!");var o=[],c={type:this.cfg.type,data:t,region:null,rowValuesLength:this.getRows(),columnValuesLength:1,rowIndex:0,columnIndex:0,rowField:"",columnField:"",rowValue:"",columnValue:""};return o.push(c),c.children=this.getChildFacets(t,1,o),this.setRegion(o),o},e.prototype.setRegion=function(t){var i=this;this.forceColIndex(t),t.forEach(function(o){o.region=i.getRegion(o.rowValuesLength,o.columnValuesLength,o.columnIndex,o.rowIndex)})},e.prototype.getRegion=function(t,i,o,c){var p=1/i,g=1/t,_={x:p*o,y:g*c},S={x:_.x+p,y:_.y+g*2/3};return{start:_,end:S}},e.prototype.forceColIndex=function(t){var i,o,c=this,p=[],g=0;t.forEach(function(V){c.isLeaf(V)&&(p.push(V),V.columnIndex=g,g++)}),p.forEach(function(V){V.columnValuesLength=p.length});for(var _=this.cfg.fields.length,S=_-1;S>=0;S--){var I=this.getFacetsByLevel(t,S);try{for(var L=(i=void 0,(0,P.XA)(I)),F=L.next();!F.done;F=L.next()){var z=F.value;this.isLeaf(z)||(z.originColIndex=z.columnIndex,z.columnIndex=this.getRegionIndex(z.children),z.columnValuesLength=p.length)}}catch(V){i={error:V}}finally{try{F&&!F.done&&(o=L.return)&&o.call(L)}finally{if(i)throw i.error}}}},e.prototype.getFacetsByLevel=function(t,i){var o=[];return t.forEach(function(c){c.rowIndex===i&&o.push(c)}),o},e.prototype.getRegionIndex=function(t){var i=t[0],o=t[t.length-1];return(o.columnIndex-i.columnIndex)/2+i.columnIndex},e.prototype.isLeaf=function(t){return!t.children||!t.children.length},e.prototype.getRows=function(){return this.cfg.fields.length+1},e.prototype.getChildFacets=function(t,i,o){var c=this,p=this.cfg.fields,g=p.length;if(!(g<i)){var _=[],S=p[i-1],I=this.getFieldValues(t,S);return I.forEach(function(L,F){var z=[{field:S,value:L,values:I}],V=t.filter(c.getFacetDataFilter(z));if(V.length){var Q={type:c.cfg.type,data:V,region:null,columnValue:L,rowValue:"",columnField:S,rowField:"",columnIndex:F,rowValuesLength:c.getRows(),columnValuesLength:1,rowIndex:i,children:c.getChildFacets(V,i+1,o)};_.push(Q),o.push(Q)}}),_}},e.prototype.render=function(){r.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},e.prototype.renderTitle=function(){var t=this;(0,b.S6)(this.facets,function(i){var o=i.columnValue,c=i.view,p=(0,b.U2)(t.cfg.title,"formatter"),g=(0,b.b$)({position:["50%","0%"],content:p?p(o):o},Xd(le.TOP),t.cfg.title);c.annotation().text(g)})},e.prototype.drawLines=function(t){var i=this;t.forEach(function(o){if(!i.isLeaf(o)){var c=o.children;i.addFacetLines(o,c)}})},e.prototype.addFacetLines=function(t,i){var o=this,c=t.view,p=c.coordinateBBox,g={x:p.x+p.width/2,y:p.y+p.height};i.forEach(function(_){var S=_.view.coordinateBBox,I={x:S.bl.x+(S.tr.x-S.bl.x)/2,y:S.tr.y},L={x:g.x,y:g.y+(I.y-g.y)/2},F={x:I.x,y:L.y};o.drawLine([g,L,F,I])})},e.prototype.getPath=function(t){var i=[],o=this.cfg.line.smooth;return o?(i.push(["M",t[0].x,t[0].y]),i.push(["C",t[1].x,t[1].y,t[2].x,t[2].y,t[3].x,t[3].y])):t.forEach(function(c,p){p===0?i.push(["M",c.x,c.y]):i.push(["L",c.x,c.y])}),i},e.prototype.drawLine=function(t){var i=this.getPath(t),o=this.cfg.line.style;this.container.addShape("path",{attrs:(0,b.f0)({path:i},o)})},e.prototype.getXAxisOption=function(t,i,o,c){return c.rowIndex!==c.rowValuesLength-1?(0,P.pi)((0,P.pi)({},o),{title:null,label:null}):o},e.prototype.getYAxisOption=function(t,i,o,c){return c.originColIndex!==0&&c.columnIndex!==0?(0,P.pi)((0,P.pi)({},o),{title:null,label:null}):o},e}(il),f3=c3;function Jp(r){var e=(0,P.ev)([],(0,P.CR)(r),!1);e.sort(function(i,o){return i-o});var t=e.length;return t===0?0:t%2===1?e[(t-1)/2]:(e[t/2]+e[t/2-1])/2}function $E(r){var e=(0,b.u4)(r,function(t,i){return t+=isNaN(i)||!(0,b.hj)(i)?0:i},0);return r.length===0?0:e/r.length}function Vy(r,e){if(!e)return null;var t;switch(r){case"start":return 0;case"center":return .5;case"end":return 1;case"median":{t=e.isCategory?Jp(e.values.map(function(i,o){return o})):Jp(e.values);break}case"mean":{t=e.isCategory?(e.values.length-1)/2:$E(e.values);break}case"min":t=e.isCategory?0:e[r];break;case"max":t=e.isCategory?e.values.length-1:e[r];break;default:t=r;break}return e.scale(t)}var Gy=["regionFilter","shape"],h3=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,t)||this;return i.cache=new Map,i.foregroundContainer=i.view.getLayer(W.FORE).addGroup(),i.backgroundContainer=i.view.getLayer(W.BG).addGroup(),i.option=[],i}return Object.defineProperty(e.prototype,"name",{get:function(){return"annotation"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.layout=function(){this.update()},e.prototype.render=function(){},e.prototype.update=function(){var t=this;this.onAfterRender(function(){var o=new Map;(0,b.S6)(t.option,function(c){if((0,b.q9)(Gy,c.type)){var p=t.updateOrCreate(c);p&&o.set(t.getCacheKey(c),p)}}),t.cache=t.syncCache(o)});var i=new Map;(0,b.S6)(this.option,function(o){if(!(0,b.q9)(Gy,o.type)){var c=t.updateOrCreate(o);c&&i.set(t.getCacheKey(o),c)}}),this.cache=this.syncCache(i)},e.prototype.clear=function(t){t===void 0&&(t=!1),r.prototype.clear.call(this),this.clearComponents(),this.foregroundContainer.clear(),this.backgroundContainer.clear(),t&&(this.option=[])},e.prototype.destroy=function(){this.clear(!0),this.foregroundContainer.remove(!0),this.backgroundContainer.remove(!0)},e.prototype.getComponents=function(){var t=[];return this.cache.forEach(function(i){t.push(i)}),t},e.prototype.clearComponents=function(){this.getComponents().forEach(function(t){t.component.destroy()}),this.cache.clear()},e.prototype.onAfterRender=function(t){var i=!1;this.view.getOptions().animate&&this.view.geometries.forEach(function(o){o.animateOption&&(o.once(rt.AFTER_DRAW_ANIMATE,function(){t()}),i=!0)}),i||this.view.getRootView().once(At.AFTER_RENDER,function(){t()})},e.prototype.createAnnotation=function(t){var i=t.type,o=gt[(0,b.jC)(i)];if(o){var c=this.getAnnotationTheme(i),p=this.getAnnotationCfg(i,t,c);if(!p)return null;var g=new o(p);return{component:g,layer:this.isTop(p)?W.FORE:W.BG,direction:le.NONE,type:be.ANNOTATION,extra:t}}},e.prototype.annotation=function(t){this.option.push(t)},e.prototype.arc=function(t){return this.annotation((0,P.pi)({type:"arc"},t)),this},e.prototype.image=function(t){return this.annotation((0,P.pi)({type:"image"},t)),this},e.prototype.line=function(t){return this.annotation((0,P.pi)({type:"line"},t)),this},e.prototype.region=function(t){return this.annotation((0,P.pi)({type:"region"},t)),this},e.prototype.text=function(t){return this.annotation((0,P.pi)({type:"text"},t)),this},e.prototype.dataMarker=function(t){return this.annotation((0,P.pi)({type:"dataMarker"},t)),this},e.prototype.dataRegion=function(t){this.annotation((0,P.pi)({type:"dataRegion"},t))},e.prototype.regionFilter=function(t){this.annotation((0,P.pi)({type:"regionFilter"},t))},e.prototype.shape=function(t){this.annotation((0,P.pi)({type:"shape"},t))},e.prototype.html=function(t){this.annotation((0,P.pi)({type:"html"},t))},e.prototype.parsePosition=function(t){var i,o,c=this.view.getXScale(),p=this.view.getScalesByDim("y"),g=(0,b.mf)(t)?t.call(null,c,p):t,_=0,S=0;if((0,b.kJ)(g)){var I=(0,P.CR)(g,2),L=I[0],F=I[1];if((0,b.HD)(L)&&L.indexOf("%")!==-1&&!isNaN(L.slice(0,-1)))return this.parsePercentPosition(g);_=Vy(L,c),S=Vy(F,Object.values(p)[0])}else if(!(0,b.UM)(g))try{for(var z=(0,P.XA)((0,b.XP)(g)),V=z.next();!V.done;V=z.next()){var Q=V.value,st=g[Q];Q===c.field&&(_=Vy(st,c)),p[Q]&&(S=Vy(st,p[Q]))}}catch(at){i={error:at}}finally{try{V&&!V.done&&(o=z.return)&&o.call(z)}finally{if(i)throw i.error}}return isNaN(_)||isNaN(S)?null:this.view.getCoordinate().convert({x:_,y:S})},e.prototype.getRegionPoints=function(t,i){var o=this,c=this.view.getXScale(),p=this.view.getScalesByDim("y"),g=Object.values(p)[0],_=c.field,S=this.view.getData(),I=(0,b.kJ)(t)?t[0]:t[_],L=(0,b.kJ)(i)?i[0]:i[_],F=[],z;return(0,b.S6)(S,function(V,Q){if(V[_]===I&&(z=Q),Q>=z){var st=o.parsePosition([V[_],V[g.field]]);st&&F.push(st)}if(V[_]===L)return!1}),F},e.prototype.parsePercentPosition=function(t){var i=parseFloat(t[0])/100,o=parseFloat(t[1])/100,c=this.view.getCoordinate(),p=c.start,g=c.end,_={x:Math.min(p.x,g.x),y:Math.min(p.y,g.y)},S=c.getWidth()*i+_.x,I=c.getHeight()*o+_.y;return{x:S,y:I}},e.prototype.getCoordinateBBox=function(){var t=this.view.getCoordinate(),i=t.start,o=t.end,c=t.getWidth(),p=t.getHeight(),g={x:Math.min(i.x,o.x),y:Math.min(i.y,o.y)};return{x:g.x,y:g.y,minX:g.x,minY:g.y,maxX:g.x+c,maxY:g.y+p,width:c,height:p}},e.prototype.getAnnotationCfg=function(t,i,o){var c=this,p=this.view.getCoordinate(),g=this.view.getCanvas(),_={};if((0,b.UM)(i))return null;var S=i.start,I=i.end,L=i.position,F=this.parsePosition(S),z=this.parsePosition(I),V=this.parsePosition(L);if(["arc","image","line","region","regionFilter"].includes(t)&&(!F||!z))return null;if(["text","dataMarker","html"].includes(t)&&!V)return null;if(t==="arc"){var Q=i,st=Q.start,at=Q.end,Rt=(0,P._T)(Q,["start","end"]),Kt=fc(p,F),te=fc(p,z);Kt>te&&(te=Math.PI*2+te),_=(0,P.pi)((0,P.pi)({},Rt),{center:p.getCenter(),radius:th(p,F),startAngle:Kt,endAngle:te})}else if(t==="image"){var Ae=i,hr=Ae.start,Tr=Ae.end,Rt=(0,P._T)(Ae,["start","end"]);_=(0,P.pi)((0,P.pi)({},Rt),{start:F,end:z,src:i.src})}else if(t==="line"){var Dr=i,cn=Dr.start,Qr=Dr.end,Rt=(0,P._T)(Dr,["start","end"]);_=(0,P.pi)((0,P.pi)({},Rt),{start:F,end:z,text:(0,b.U2)(i,"text",null)})}else if(t==="region"){var Tn=i,xi=Tn.start,va=Tn.end,Rt=(0,P._T)(Tn,["start","end"]);_=(0,P.pi)((0,P.pi)({},Rt),{start:F,end:z})}else if(t==="text"){var Aa=this.view.getData(),ao=i,Gn=ao.position,Gi=ao.content,Rt=(0,P._T)(ao,["position","content"]),ca=Gi;(0,b.mf)(Gi)&&(ca=Gi(Aa)),_=(0,P.pi)((0,P.pi)((0,P.pi)({},V),Rt),{content:ca})}else if(t==="dataMarker"){var Yi=i,ra=Yi.position,Pa=Yi.point,wo=Yi.line,Ro=Yi.text,Ka=Yi.autoAdjust,Ga=Yi.direction,Rt=(0,P._T)(Yi,["position","point","line","text","autoAdjust","direction"]);_=(0,P.pi)((0,P.pi)((0,P.pi)({},Rt),V),{coordinateBBox:this.getCoordinateBBox(),point:Pa,line:wo,text:Ro,autoAdjust:Ka,direction:Ga})}else if(t==="dataRegion"){var ps=i,Xu=ps.start,Yu=ps.end,zh=ps.region,Ro=ps.text,Kv=ps.lineLength,Rt=(0,P._T)(ps,["start","end","region","text","lineLength"]);_=(0,P.pi)((0,P.pi)({},Rt),{points:this.getRegionPoints(Xu,Yu),region:zh,text:Ro,lineLength:Kv})}else if(t==="regionFilter"){var cd=i,H0=cd.start,kg=cd.end,i2=cd.apply,Qv=cd.color,Rt=(0,P._T)(cd,["start","end","apply","color"]),GP=this.view.geometries,wT=[],a2=function(bf){bf&&(bf.isGroup()?bf.getChildren().forEach(function(Lg){return a2(Lg)}):wT.push(bf))};(0,b.S6)(GP,function(bf){i2?(0,b.FX)(i2,bf.type)&&(0,b.S6)(bf.elements,function(Lg){a2(Lg.shape)}):(0,b.S6)(bf.elements,function(Lg){a2(Lg.shape)})}),_=(0,P.pi)((0,P.pi)({},Rt),{color:Qv,shapes:wT,start:F,end:z})}else if(t==="shape"){var a_=i,o2=a_.render,s2=(0,P._T)(a_,["render"]),u2=function(jP){if((0,b.mf)(i.render))return o2(jP,c.view,{parsePosition:c.parsePosition.bind(c)})};_=(0,P.pi)((0,P.pi)({},s2),{render:u2})}else if(t==="html"){var l2=i,c2=l2.html,$F=l2.position,s2=(0,P._T)(l2,["html","position"]),HP=function(bf){return(0,b.mf)(c2)?c2(bf,c.view):c2};_=(0,P.pi)((0,P.pi)((0,P.pi)({},s2),V),{parent:g.get("el").parentNode,html:HP})}var Ep=(0,b.b$)({},o,(0,P.pi)((0,P.pi)({},_),{top:i.top,style:i.style,offsetX:i.offsetX,offsetY:i.offsetY}));return t!=="html"&&(Ep.container=this.getComponentContainer(Ep)),Ep.animate=this.view.getOptions().animate&&Ep.animate&&(0,b.U2)(i,"animate",Ep.animate),Ep.animateOption=(0,b.b$)({},sr,Ep.animateOption,i.animateOption),Ep},e.prototype.isTop=function(t){return(0,b.U2)(t,"top",!0)},e.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},e.prototype.getAnnotationTheme=function(t){return(0,b.U2)(this.view.getTheme(),["components","annotation",t],{})},e.prototype.updateOrCreate=function(t){var i=this.cache.get(this.getCacheKey(t));if(i){var o=t.type,c=this.getAnnotationTheme(o),p=this.getAnnotationCfg(o,t,c);p&&$l(p,["container"]),i.component.update((0,P.pi)((0,P.pi)({},p||{}),{visible:!!p})),(0,b.q9)(Gy,t.type)&&i.component.render()}else i=this.createAnnotation(t),i&&(i.component.init(),(0,b.q9)(Gy,t.type)&&i.component.render());return i},e.prototype.syncCache=function(t){var i=this,o=new Map(this.cache);return t.forEach(function(c,p){o.set(p,c)}),o.forEach(function(c,p){(0,b.sE)(i.option,function(g){return p===i.getCacheKey(g)})||(c.component.destroy(),o.delete(p))}),o},e.prototype.getCacheKey=function(t){return t},e}(dt),$d=h3;function j_(r,e){var t=(0,b.b$)({},(0,b.U2)(r,["components","axis","common"]),(0,b.U2)(r,["components","axis",e]));return(0,b.U2)(t,["grid"],{})}function Hy(r,e,t,i){var o=[],c=e.getTicks();return r.isPolar&&c.push({value:1,text:"",tickValue:""}),c.reduce(function(p,g,_){var S=g.value;if(i)o.push({points:[r.convert(t==="y"?{x:0,y:S}:{x:S,y:0}),r.convert(t==="y"?{x:1,y:S}:{x:S,y:1})]});else if(_){var I=p.value,L=(I+S)/2;o.push({points:[r.convert(t==="y"?{x:0,y:L}:{x:L,y:0}),r.convert(t==="y"?{x:1,y:L}:{x:L,y:1})]})}return g},c[0]),o}function jy(r,e,t,i,o){var c=e.values.length,p=[],g=t.getTicks();return g.reduce(function(_,S){var I=_?_.value:S.value,L=S.value,F=(I+L)/2;return o==="x"?p.push({points:[r.convert({x:i?L:F,y:0}),r.convert({x:i?L:F,y:1})]}):p.push({points:(0,b.UI)(Array(c+1),function(z,V){return r.convert({x:V/c,y:i?L:F})})}),S},g[0]),p}function W_(r,e){var t=(0,b.U2)(e,"grid");if(t===null)return!1;var i=(0,b.U2)(r,"grid");return!(t===void 0&&i===null)}var Hc=["container"],X_=(0,P.pi)((0,P.pi)({},sr),{appear:null}),uh=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,t)||this;return i.cache=new Map,i.gridContainer=i.view.getLayer(W.BG).addGroup(),i.gridForeContainer=i.view.getLayer(W.FORE).addGroup(),i.axisContainer=i.view.getLayer(W.BG).addGroup(),i.axisForeContainer=i.view.getLayer(W.FORE).addGroup(),i}return Object.defineProperty(e.prototype,"name",{get:function(){return"axis"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){this.update()},e.prototype.layout=function(){var t=this,i=this.view.getCoordinate();(0,b.S6)(this.getComponents(),function(o){var c=o.component,p=o.direction,g=o.type,_=o.extra,S=_.dim,I=_.scale,L=_.alignTick,F;if(g===be.AXIS)i.isPolar?S==="x"?F=i.isTransposed?yv(i,p):ff(i):S==="y"&&(F=i.isTransposed?ff(i):yv(i,p)):F=yv(i,p);else if(g===be.GRID)if(i.isPolar){var z=void 0;i.isTransposed?z=S==="x"?jy(i,t.view.getYScales()[0],I,L,S):Hy(i,I,S,L):z=S==="x"?Hy(i,I,S,L):jy(i,t.view.getXScale(),I,L,S),F={items:z,center:t.view.getCoordinate().getCenter()}}else F={items:Hy(i,I,S,L)};c.update(F)})},e.prototype.update=function(){this.option=this.view.getOptions().axes;var t=new Map;this.updateXAxes(t),this.updateYAxes(t);var i=new Map;this.cache.forEach(function(o,c){t.has(c)?i.set(c,o):o.component.destroy()}),this.cache=i},e.prototype.clear=function(){r.prototype.clear.call(this),this.cache.clear(),this.gridContainer.clear(),this.gridForeContainer.clear(),this.axisContainer.clear(),this.axisForeContainer.clear()},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.gridContainer.remove(!0),this.gridForeContainer.remove(!0),this.axisContainer.remove(!0),this.axisForeContainer.remove(!0)},e.prototype.getComponents=function(){var t=[];return this.cache.forEach(function(i){t.push(i)}),t},e.prototype.updateXAxes=function(t){var i=this.view.getXScale();if(!(!i||i.isIdentity)){var o=Tc(this.option,i.field);if(o!==!1){var c=Qo(o,le.BOTTOM),p=W.BG,g="x",_=this.view.getCoordinate(),S=this.getId("axis",i.field),I=this.getId("grid",i.field);if(_.isRect){var L=this.cache.get(S);if(L){var F=this.getLineAxisCfg(i,o,c);$l(F,Hc),L.component.update(F),t.set(S,L)}else L=this.createLineAxis(i,o,p,c,g),this.cache.set(S,L),t.set(S,L);var z=this.cache.get(I);if(z){var F=this.getLineGridCfg(i,o,c,g);$l(F,Hc),z.component.update(F),t.set(I,z)}else z=this.createLineGrid(i,o,p,c,g),z&&(this.cache.set(I,z),t.set(I,z))}else if(_.isPolar){var L=this.cache.get(S);if(L){var F=_.isTransposed?this.getLineAxisCfg(i,o,le.RADIUS):this.getCircleAxisCfg(i,o,c);$l(F,Hc),L.component.update(F),t.set(S,L)}else{if(_.isTransposed){if((0,b.o8)(o))return;L=this.createLineAxis(i,o,p,le.RADIUS,g)}else L=this.createCircleAxis(i,o,p,c,g);this.cache.set(S,L),t.set(S,L)}var z=this.cache.get(I);if(z){var F=_.isTransposed?this.getCircleGridCfg(i,o,le.RADIUS,g):this.getLineGridCfg(i,o,le.CIRCLE,g);$l(F,Hc),z.component.update(F),t.set(I,z)}else{if(_.isTransposed){if((0,b.o8)(o))return;z=this.createCircleGrid(i,o,p,le.RADIUS,g)}else z=this.createLineGrid(i,o,p,le.CIRCLE,g);z&&(this.cache.set(I,z),t.set(I,z))}}}}},e.prototype.updateYAxes=function(t){var i=this,o=this.view.getYScales();(0,b.S6)(o,function(c,p){if(!(!c||c.isIdentity)){var g=c.field,_=Tc(i.option,g);if(_!==!1){var S=W.BG,I="y",L=i.getId("axis",g),F=i.getId("grid",g),z=i.view.getCoordinate();if(z.isRect){var V=Qo(_,p===0?le.LEFT:le.RIGHT),Q=i.cache.get(L);if(Q){var st=i.getLineAxisCfg(c,_,V);$l(st,Hc),Q.component.update(st),t.set(L,Q)}else Q=i.createLineAxis(c,_,S,V,I),i.cache.set(L,Q),t.set(L,Q);var at=i.cache.get(F);if(at){var st=i.getLineGridCfg(c,_,V,I);$l(st,Hc),at.component.update(st),t.set(F,at)}else at=i.createLineGrid(c,_,S,V,I),at&&(i.cache.set(F,at),t.set(F,at))}else if(z.isPolar){var Q=i.cache.get(L);if(Q){var st=z.isTransposed?i.getCircleAxisCfg(c,_,le.CIRCLE):i.getLineAxisCfg(c,_,le.RADIUS);$l(st,Hc),Q.component.update(st),t.set(L,Q)}else{if(z.isTransposed){if((0,b.o8)(_))return;Q=i.createCircleAxis(c,_,S,le.CIRCLE,I)}else Q=i.createLineAxis(c,_,S,le.RADIUS,I);i.cache.set(L,Q),t.set(L,Q)}var at=i.cache.get(F);if(at){var st=z.isTransposed?i.getLineGridCfg(c,_,le.CIRCLE,I):i.getCircleGridCfg(c,_,le.RADIUS,I);$l(st,Hc),at.component.update(st),t.set(F,at)}else{if(z.isTransposed){if((0,b.o8)(_))return;at=i.createLineGrid(c,_,S,le.CIRCLE,I)}else at=i.createCircleGrid(c,_,S,le.RADIUS,I);at&&(i.cache.set(F,at),t.set(F,at))}}}}})},e.prototype.createLineAxis=function(t,i,o,c,p){var g={component:new zp(this.getLineAxisCfg(t,i,c)),layer:o,direction:c===le.RADIUS?le.NONE:c,type:be.AXIS,extra:{dim:p,scale:t}};return g.component.set("field",t.field),g.component.init(),g},e.prototype.createLineGrid=function(t,i,o,c,p){var g=this.getLineGridCfg(t,i,c,p);if(g){var _={component:new Up(g),layer:o,direction:le.NONE,type:be.GRID,extra:{dim:p,scale:t,alignTick:(0,b.U2)(g,"alignTick",!0)}};return _.component.init(),_}},e.prototype.createCircleAxis=function(t,i,o,c,p){var g={component:new vv(this.getCircleAxisCfg(t,i,c)),layer:o,direction:c,type:be.AXIS,extra:{dim:p,scale:t}};return g.component.set("field",t.field),g.component.init(),g},e.prototype.createCircleGrid=function(t,i,o,c,p){var g=this.getCircleGridCfg(t,i,c,p);if(g){var _={component:new Zp(g),layer:o,direction:le.NONE,type:be.GRID,extra:{dim:p,scale:t,alignTick:(0,b.U2)(g,"alignTick",!0)}};return _.component.init(),_}},e.prototype.getLineAxisCfg=function(t,i,o){var c=(0,b.U2)(i,["top"])?this.axisForeContainer:this.axisContainer,p=this.view.getCoordinate(),g=yv(p,o),_=hf(t,i),S=Jh(this.view.getTheme(),o),I=(0,b.U2)(i,["title"])?(0,b.b$)({title:{style:{text:_}}},{title:xu(this.view.getTheme(),o,i.title)},i):i,L=(0,b.b$)((0,P.pi)((0,P.pi)({container:c},g),{ticks:t.getTicks().map(function(Kt){return{id:"".concat(Kt.tickValue),name:Kt.text,value:Kt.value}}),verticalFactor:p.isPolar?Md(g,p.getCenter())*-1:Md(g,p.getCenter()),theme:S}),S,I),F=this.getAnimateCfg(L),z=F.animate,V=F.animateOption;L.animateOption=V,L.animate=z;var Q=ai(g),st=(0,b.U2)(L,"verticalLimitLength",Q?1/3:1/2);if(st<=1){var at=this.view.getCanvas().get("width"),Rt=this.view.getCanvas().get("height");L.verticalLimitLength=st*(Q?at:Rt)}return L},e.prototype.getLineGridCfg=function(t,i,o,c){if(W_(Jh(this.view.getTheme(),o),i)){var p=j_(this.view.getTheme(),o),g=(0,b.b$)({container:(0,b.U2)(i,["top"])?this.gridForeContainer:this.gridContainer},p,(0,b.U2)(i,"grid"),this.getAnimateCfg(i));return g.items=Hy(this.view.getCoordinate(),t,c,(0,b.U2)(g,"alignTick",!0)),g}},e.prototype.getCircleAxisCfg=function(t,i,o){var c=(0,b.U2)(i,["top"])?this.axisForeContainer:this.axisContainer,p=this.view.getCoordinate(),g=t.getTicks().map(function(Q){return{id:"".concat(Q.tickValue),name:Q.text,value:Q.value}});!t.isCategory&&Math.abs(p.endAngle-p.startAngle)===Math.PI*2&&g.length&&(g[g.length-1].name="");var _=hf(t,i),S=Jh(this.view.getTheme(),le.CIRCLE),I=(0,b.U2)(i,["title"])?(0,b.b$)({title:{style:{text:_}}},{title:xu(this.view.getTheme(),o,i.title)},i):i,L=(0,b.b$)((0,P.pi)((0,P.pi)({container:c},ff(this.view.getCoordinate())),{ticks:g,verticalFactor:1,theme:S}),S,I),F=this.getAnimateCfg(L),z=F.animate,V=F.animateOption;return L.animate=z,L.animateOption=V,L},e.prototype.getCircleGridCfg=function(t,i,o,c){if(W_(Jh(this.view.getTheme(),o),i)){var p=j_(this.view.getTheme(),le.RADIUS),g=(0,b.b$)({container:(0,b.U2)(i,["top"])?this.gridForeContainer:this.gridContainer,center:this.view.getCoordinate().getCenter()},p,(0,b.U2)(i,"grid"),this.getAnimateCfg(i)),_=(0,b.U2)(g,"alignTick",!0),S=c==="x"?this.view.getYScales()[0]:this.view.getXScale();return g.items=jy(this.view.getCoordinate(),S,t,_,c),g}},e.prototype.getId=function(t,i){var o=this.view.getCoordinate();return"".concat(t,"-").concat(i,"-").concat(o.type)},e.prototype.getAnimateCfg=function(t){return{animate:this.view.getOptions().animate&&(0,b.U2)(t,"animate"),animateOption:t&&t.animateOption?(0,b.b$)({},X_,t.animateOption):X_}},e}(dt),Y_=uh;function Fv(r,e,t){return t===le.TOP?[r.minX+r.width/2-e.width/2,r.minY]:t===le.BOTTOM?[r.minX+r.width/2-e.width/2,r.maxY-e.height]:t===le.LEFT?[r.minX,r.minY+r.height/2-e.height/2]:t===le.RIGHT?[r.maxX-e.width,r.minY+r.height/2-e.height/2]:t===le.TOP_LEFT||t===le.LEFT_TOP?[r.tl.x,r.tl.y]:t===le.TOP_RIGHT||t===le.RIGHT_TOP?[r.tr.x-e.width,r.tr.y]:t===le.BOTTOM_LEFT||t===le.LEFT_BOTTOM?[r.bl.x,r.bl.y-e.height]:t===le.BOTTOM_RIGHT||t===le.RIGHT_BOTTOM?[r.br.x-e.width,r.br.y-e.height]:[0,0]}function p3(r,e){if(e.isTransposed)switch(r){case DIRECTION.BOTTOM:return DIRECTION.LEFT;case DIRECTION.LEFT:return DIRECTION.BOTTOM;case DIRECTION.RIGHT:return DIRECTION.TOP;case DIRECTION.TOP:return DIRECTION.RIGHT}return r}function v3(r){return r===DIRECTION.LEFT?DIRECTION.RIGHT:r===DIRECTION.RIGHT?DIRECTION.LEFT:r}function qE(r){return r===DIRECTION.TOP?DIRECTION.BOTTOM:r===DIRECTION.BOTTOM?DIRECTION.TOP:r}function g3(r,e){var t=e.matrix[0],i=e.matrix[4],o=r;return t<0&&(o=v3(o)),i<0&&(o=qE(o)),o}function OO(r,e){var t=r;return e.isReflect("x")&&(t=v3(t)),e.isReflect("y")&&(t=qE(t)),t}function FO(r,e){var t=r;return t=p3(t,e),t=g3(t,e),t=OO(t,e),t}function KE(r,e){return(0,b.jn)(r)?r===!1?!1:{}:(0,b.U2)(r,[e],r)}function $_(r){return(0,b.U2)(r,"position",le.BOTTOM)}var m3=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,t)||this;return i.container=i.view.getLayer(W.FORE).addGroup(),i}return Object.defineProperty(e.prototype,"name",{get:function(){return"legend"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){this.update()},e.prototype.layout=function(){var t=this;this.layoutBBox=this.view.viewBBox,(0,b.S6)(this.components,function(i){var o=i.component,c=i.direction,p=kd(c),g=o.get("maxWidthRatio"),_=o.get("maxHeightRatio"),S=t.getCategoryLegendSizeCfg(p,g,_),I=o.get("maxWidth"),L=o.get("maxHeight");o.update({maxWidth:Math.min(S.maxWidth,I||0),maxHeight:Math.min(S.maxHeight,L||0)});var F=o.get("padding"),z=o.getLayoutBBox(),V=new Pu(z.x,z.y,z.width,z.height).expand(F),Q=(0,P.CR)(Fv(t.view.viewBBox,V,c),2),st=Q[0],at=Q[1],Rt=(0,P.CR)(Fv(t.layoutBBox,V,c),2),Kt=Rt[0],te=Rt[1],Ae=0,hr=0;c.startsWith("top")||c.startsWith("bottom")?(Ae=st,hr=te):(Ae=Kt,hr=at),o.setLocation({x:Ae+F[3],y:hr+F[0]}),t.layoutBBox=t.layoutBBox.cut(V,c)})},e.prototype.update=function(){var t=this;this.option=this.view.getOptions().legends;var i={},o=function(F,z,V){var Q=t.getId(V.field),st=t.getComponentById(Q);if(st){var at=void 0,Rt=KE(t.option,V.field);Rt!==!1&&((0,b.U2)(Rt,"custom")?at=t.getCategoryCfg(F,z,V,Rt,!0):V.isLinear?at=t.getContinuousCfg(F,z,V,Rt):V.isCategory&&(at=t.getCategoryCfg(F,z,V,Rt))),at&&($l(at,["container"]),st.direction=$_(Rt),st.component.update(at),i[Q]=!0)}else{var Kt=t.createFieldLegend(F,z,V);Kt&&(Kt.component.init(),t.components.push(Kt),i[Q]=!0)}};if((0,b.U2)(this.option,"custom")){var c="global-custom",p=this.getComponentById(c);if(p){var g=this.getCategoryCfg(void 0,void 0,void 0,this.option,!0);$l(g,["container"]),p.component.update(g),i[c]=!0}else{var _=this.createCustomLegend(void 0,void 0,void 0,this.option);if(_){_.init();var S=W.FORE,I=$_(this.option);this.components.push({id:c,component:_,layer:S,direction:I,type:be.LEGEND,extra:void 0}),i[c]=!0}}}else this.loopLegends(o);var L=[];(0,b.S6)(this.getComponents(),function(F){i[F.id]?L.push(F):F.component.destroy()}),this.components=L},e.prototype.clear=function(){r.prototype.clear.call(this),this.container.clear()},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.container.remove(!0)},e.prototype.getGeometries=function(t){var i=this,o=t.geometries;return(0,b.S6)(t.views,function(c){o=o.concat(i.getGeometries(c))}),o},e.prototype.loopLegends=function(t){var i=this.view.getRootView()===this.view;if(i){var o=this.getGeometries(this.view),c={};(0,b.S6)(o,function(p){var g=p.getGroupAttributes();(0,b.S6)(g,function(_){var S=_.getScale(_.type);!S||S.type==="identity"||c[S.field]||(t(p,_,S),c[S.field]=!0)})})}},e.prototype.createFieldLegend=function(t,i,o){var c,p=KE(this.option,o.field),g=W.FORE,_=$_(p);if(p!==!1&&((0,b.U2)(p,"custom")?c=this.createCustomLegend(t,i,o,p):o.isLinear?c=this.createContinuousLegend(t,i,o,p):o.isCategory&&(c=this.createCategoryLegend(t,i,o,p))),c)return c.set("field",o.field),{id:this.getId(o.field),component:c,layer:g,direction:_,type:be.LEGEND,extra:{scale:o}}},e.prototype.createCustomLegend=function(t,i,o,c){var p=this.getCategoryCfg(t,i,o,c,!0);return new dl(p)},e.prototype.createContinuousLegend=function(t,i,o,c){var p=this.getContinuousCfg(t,i,o,$l(c,["value"]));return new Ed(p)},e.prototype.createCategoryLegend=function(t,i,o,c){var p=this.getCategoryCfg(t,i,o,c);return new dl(p)},e.prototype.getContinuousCfg=function(t,i,o,c){var p=o.getTicks(),g=(0,b.sE)(p,function(Q){return Q.value===0}),_=(0,b.sE)(p,function(Q){return Q.value===1}),S=p.map(function(Q){var st=Q.value,at=Q.tickValue,Rt=i.mapping(o.invert(st)).join("");return{value:at,attrValue:Rt,color:Rt,scaleValue:st}});g||S.push({value:o.min,attrValue:i.mapping(o.invert(0)).join(""),color:i.mapping(o.invert(0)).join(""),scaleValue:0}),_||S.push({value:o.max,attrValue:i.mapping(o.invert(1)).join(""),color:i.mapping(o.invert(1)).join(""),scaleValue:1}),S.sort(function(Q,st){return Q.value-st.value});var I={min:(0,b.YM)(S).value,max:(0,b.Z$)(S).value,colors:[],rail:{type:i.type},track:{}};i.type==="size"&&(I.track={style:{fill:i.type==="size"?this.view.getTheme().defaultColor:void 0}}),i.type==="color"&&(I.colors=S.map(function(Q){return Q.attrValue}));var L=this.container,F=$_(c),z=kd(F),V=(0,b.U2)(c,"title");return V&&(V=(0,b.b$)({text:vl(o)},V)),I.container=L,I.layout=z,I.title=V,I.animateOption=sr,this.mergeLegendCfg(I,c,"continuous")},e.prototype.getCategoryCfg=function(t,i,o,c,p){var g=this.container,_=(0,b.U2)(c,"position",le.BOTTOM),S=np(this.view.getTheme(),_),I=(0,b.U2)(S,["marker"]),L=(0,b.U2)(c,"marker"),F=kd(_),z=(0,b.U2)(S,["pageNavigator"]),V=(0,b.U2)(c,"pageNavigator"),Q=p?l0(I,L,c.items):Ld(this.view,t,i,I,L),st=(0,b.U2)(c,"title");st&&(st=(0,b.b$)({text:o?vl(o):""},st));var at=(0,b.U2)(c,"maxWidthRatio"),Rt=(0,b.U2)(c,"maxHeightRatio"),Kt=this.getCategoryLegendSizeCfg(F,at,Rt);Kt.container=g,Kt.layout=F,Kt.items=Q,Kt.title=st,Kt.animateOption=sr,Kt.pageNavigator=(0,b.b$)({},z,V);var te=this.mergeLegendCfg(Kt,c,_);te.reversed&&te.items.reverse();var Ae=(0,b.U2)(te,"maxItemWidth");return Ae&&Ae<=1&&(te.maxItemWidth=this.view.viewBBox.width*Ae),te},e.prototype.mergeLegendCfg=function(t,i,o){var c=o.split("-")[0],p=np(this.view.getTheme(),c);return(0,b.b$)({},p,t,i)},e.prototype.getId=function(t){return"".concat(this.name,"-").concat(t)},e.prototype.getComponentById=function(t){return(0,b.sE)(this.components,function(i){return i.id===t})},e.prototype.getCategoryLegendSizeCfg=function(t,i,o){i===void 0&&(i=Ke),o===void 0&&(o=Ke);var c=this.view.viewBBox,p=c.width,g=c.height;return t==="vertical"?{maxWidth:p*i,maxHeight:g}:{maxWidth:p,maxHeight:g*o}},e}(dt),y3=m3,_3=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,t)||this;return i.onChangeFn=b.ZT,i.resetMeasure=function(){i.clear()},i.onValueChange=function(o){var c=(0,P.CR)(o,2),p=c[0],g=c[1];i.start=p,i.end=g,i.changeViewData(p,g)},i.container=i.view.getLayer(W.FORE).addGroup(),i.onChangeFn=(0,b.P2)(i.onValueChange,20,{leading:!0}),i.width=0,i.view.on(At.BEFORE_CHANGE_DATA,i.resetMeasure),i.view.on(At.BEFORE_CHANGE_SIZE,i.resetMeasure),i}return Object.defineProperty(e.prototype,"name",{get:function(){return"slider"},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){r.prototype.destroy.call(this),this.view.off(At.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(At.BEFORE_CHANGE_SIZE,this.resetMeasure)},e.prototype.init=function(){},e.prototype.render=function(){this.option=this.view.getOptions().slider;var t=this.getSliderCfg(),i=t.start,o=t.end;(0,b.UM)(this.start)&&(this.start=i,this.end=o);var c=this.view.getOptions().data;this.option&&!(0,b.xb)(c)?this.slider?this.slider=this.updateSlider():(this.slider=this.createSlider(),this.slider.component.on("sliderchange",this.onChangeFn)):this.slider&&(this.slider.component.destroy(),this.slider=void 0)},e.prototype.layout=function(){var t=this;if(this.option&&!this.width&&(this.measureSlider(),setTimeout(function(){t.view.destroyed||t.changeViewData(t.start,t.end)},0)),this.slider){var i=this.view.coordinateBBox.width,o=this.slider.component.get("padding"),c=(0,P.CR)(o,4),p=c[0],g=c[1],_=c[2],S=c[3],I=this.slider.component.getLayoutBBox(),L=new Pu(I.x,I.y,Math.min(I.width,i),I.height).expand(o),F=this.getMinMaxText(this.start,this.end),z=F.minText,V=F.maxText,Q=(0,P.CR)(Fv(this.view.viewBBox,L,le.BOTTOM),2),st=Q[0],at=Q[1],Rt=(0,P.CR)(Fv(this.view.coordinateBBox,L,le.BOTTOM),2),Kt=Rt[0],te=Rt[1];this.slider.component.update((0,P.pi)((0,P.pi)({},this.getSliderCfg()),{x:Kt+S,y:at+p,width:this.width,start:this.start,end:this.end,minText:z,maxText:V})),this.view.viewBBox=this.view.viewBBox.cut(L,le.BOTTOM)}},e.prototype.update=function(){this.render()},e.prototype.createSlider=function(){var t=this.getSliderCfg(),i=new sf((0,P.pi)({container:this.container},t));return i.init(),{component:i,layer:W.FORE,direction:le.BOTTOM,type:be.SLIDER}},e.prototype.updateSlider=function(){var t=this.getSliderCfg();if(this.width){var i=this.getMinMaxText(this.start,this.end),o=i.minText,c=i.maxText;t=(0,P.pi)((0,P.pi)({},t),{width:this.width,start:this.start,end:this.end,minText:o,maxText:c})}return this.slider.component.update(t),this.slider},e.prototype.measureSlider=function(){var t=this.getSliderCfg().width;this.width=t},e.prototype.getSliderCfg=function(){var t={height:16,start:0,end:1,minText:"",maxText:"",x:0,y:0,width:this.view.coordinateBBox.width};if((0,b.Kn)(this.option)){var i=(0,P.pi)({data:this.getData()},(0,b.U2)(this.option,"trendCfg",{}));t=(0,b.b$)({},t,this.getThemeOptions(),this.option),t=(0,P.pi)((0,P.pi)({},t),{trendCfg:i})}return t.start=(0,b.uZ)(Math.min((0,b.UM)(t.start)?0:t.start,(0,b.UM)(t.end)?1:t.end),0,1),t.end=(0,b.uZ)(Math.max((0,b.UM)(t.start)?0:t.start,(0,b.UM)(t.end)?1:t.end),0,1),t},e.prototype.getData=function(){var t=this.view.getOptions().data,i=(0,P.CR)(this.view.getYScales(),1),o=i[0],c=this.view.getGroupScales();if(c.length){var p=c[0],g=p.field,_=p.ticks;return t.reduce(function(S,I){return I[g]===_[0]&&S.push(I[o.field]),S},[])}return t.map(function(S){return S[o.field]||0})},e.prototype.getThemeOptions=function(){var t=this.view.getTheme();return(0,b.U2)(t,["components","slider","common"],{})},e.prototype.getMinMaxText=function(t,i){var o=this.view.getOptions().data,c=this.view.getXScale(),p=!0,g=(0,b.I)(o,c.field);c.isLinear&&(g=g.sort());var _=p?g:g.reverse(),S=(0,b.dp)(o);if(!c||!S)return{};var I=(0,b.dp)(_),L=Math.round(t*(I-1)),F=Math.round(i*(I-1)),z=(0,b.U2)(_,[L]),V=(0,b.U2)(_,[F]),Q=this.getSliderCfg().formatter;return Q&&(z=Q(z,o[L],L),V=Q(V,o[F],F)),{minText:z,maxText:V}},e.prototype.changeViewData=function(t,i){var o=this.view.getOptions().data,c=this.view.getXScale(),p=(0,b.dp)(o);if(!(!c||!p)){var g=!0,_=(0,b.I)(o,c.field),S=this.view.getXScale().isLinear?_.sort(function(V,Q){return Number(V)-Number(Q)}):_,I=g?S:S.reverse(),L=(0,b.dp)(I),F=Math.round(t*(L-1)),z=Math.round(i*(L-1));this.view.filter(c.field,function(V,Q){var st=I.indexOf(V);return st>-1?Gp(st,F,z):!0}),this.view.render(!0)}},e.prototype.getComponents=function(){return this.slider?[this.slider]:[]},e.prototype.clear=function(){this.slider&&(this.slider.component.destroy(),this.slider=void 0),this.width=0,this.start=void 0,this.end=void 0},e}(dt),x3=_3,q_=0,QE=8,b3=32,RO=20,E3=function(r){(0,P.ZT)(e,r);function e(t){var i=r.call(this,t)||this;return i.onChangeFn=b.ZT,i.resetMeasure=function(){i.clear()},i.onValueChange=function(o){var c=o.ratio,p=i.getValidScrollbarCfg().animate;i.ratio=(0,b.uZ)(c,0,1);var g=i.view.getOptions().animate;p||i.view.animate(!1),i.changeViewData(i.getScrollRange(),!0),i.view.animate(g)},i.container=i.view.getLayer(W.FORE).addGroup(),i.onChangeFn=(0,b.P2)(i.onValueChange,20,{leading:!0}),i.trackLen=0,i.thumbLen=0,i.ratio=0,i.view.on(At.BEFORE_CHANGE_DATA,i.resetMeasure),i.view.on(At.BEFORE_CHANGE_SIZE,i.resetMeasure),i}return Object.defineProperty(e.prototype,"name",{get:function(){return"scrollbar"},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){r.prototype.destroy.call(this),this.view.off(At.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(At.BEFORE_CHANGE_SIZE,this.resetMeasure)},e.prototype.init=function(){},e.prototype.render=function(){this.option=this.view.getOptions().scrollbar,this.option?this.scrollbar?this.scrollbar=this.updateScrollbar():(this.scrollbar=this.createScrollbar(),this.scrollbar.component.on("scrollchange",this.onChangeFn)):this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0)},e.prototype.layout=function(){var t=this;if(this.option&&!this.trackLen&&(this.measureScrollbar(),setTimeout(function(){t.view.destroyed||t.changeViewData(t.getScrollRange(),!0)})),this.scrollbar){var i=this.view.coordinateBBox.width,o=this.scrollbar.component.get("padding"),c=this.scrollbar.component.getLayoutBBox(),p=new Pu(c.x,c.y,Math.min(c.width,i),c.height).expand(o),g=this.getScrollbarComponentCfg(),_=void 0,S=void 0;if(g.isHorizontal){var I=(0,P.CR)(Fv(this.view.viewBBox,p,le.BOTTOM),2),L=I[0],F=I[1],z=(0,P.CR)(Fv(this.view.coordinateBBox,p,le.BOTTOM),2),V=z[0],Q=z[1];_=V,S=F}else{var st=(0,P.CR)(Fv(this.view.viewBBox,p,le.RIGHT),2),L=st[0],F=st[1],at=(0,P.CR)(Fv(this.view.viewBBox,p,le.RIGHT),2),V=at[0],Q=at[1];_=V,S=F}_+=o[3],S+=o[0],this.trackLen?this.scrollbar.component.update((0,P.pi)((0,P.pi)({},g),{x:_,y:S,trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio})):this.scrollbar.component.update((0,P.pi)((0,P.pi)({},g),{x:_,y:S})),this.view.viewBBox=this.view.viewBBox.cut(p,g.isHorizontal?le.BOTTOM:le.RIGHT)}},e.prototype.update=function(){this.render()},e.prototype.getComponents=function(){return this.scrollbar?[this.scrollbar]:[]},e.prototype.clear=function(){this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0),this.trackLen=0,this.thumbLen=0,this.ratio=0,this.cnt=0,this.step=0,this.data=void 0,this.xScaleCfg=void 0,this.yScalesCfg=[]},e.prototype.setValue=function(t){this.onValueChange({ratio:t})},e.prototype.getValue=function(){return this.ratio},e.prototype.getThemeOptions=function(){var t=this.view.getTheme();return(0,b.U2)(t,["components","scrollbar","common"],{})},e.prototype.getScrollbarTheme=function(t){var i=(0,b.U2)(this.view.getTheme(),["components","scrollbar"]),o=t||{},c=o.thumbHighlightColor,p=(0,P._T)(o,["thumbHighlightColor"]);return{default:(0,b.b$)({},(0,b.U2)(i,["default","style"],{}),p),hover:(0,b.b$)({},(0,b.U2)(i,["hover","style"],{}),{thumbColor:c})}},e.prototype.measureScrollbar=function(){var t=this.view.getXScale(),i=this.view.getYScales().slice();this.data=this.getScrollbarData(),this.step=this.getStep(),this.cnt=this.getCnt();var o=this.getScrollbarComponentCfg(),c=o.trackLen,p=o.thumbLen;this.trackLen=c,this.thumbLen=p,this.xScaleCfg={field:t.field,values:t.values||[]},this.yScalesCfg=i},e.prototype.getScrollRange=function(){var t=Math.floor((this.cnt-this.step)*(0,b.uZ)(this.ratio,0,1)),i=Math.min(t+this.step-1,this.cnt-1);return[t,i]},e.prototype.changeViewData=function(t,i){var o=this,c=(0,P.CR)(t,2),p=c[0],g=c[1],_=this.getValidScrollbarCfg().type,S=_!=="vertical",I=(0,b.I)(this.data,this.xScaleCfg.field),L=this.view.getXScale().isLinear?I.sort(function(z,V){return Number(z)-Number(V)}):I,F=S?L:L.reverse();this.yScalesCfg.forEach(function(z){o.view.scale(z.field,{formatter:z.formatter,type:z.type,min:z.min,max:z.max,tickMethod:z.tickMethod})}),this.view.filter(this.xScaleCfg.field,function(z){var V=F.indexOf(z);return V>-1?Gp(V,p,g):!0}),this.view.render(!0)},e.prototype.createScrollbar=function(){var t=this.getValidScrollbarCfg().type,i=t!=="vertical",o=new Ch((0,P.pi)((0,P.pi)({container:this.container},this.getScrollbarComponentCfg()),{x:0,y:0}));return o.init(),{component:o,layer:W.FORE,direction:i?le.BOTTOM:le.RIGHT,type:be.SCROLLBAR}},e.prototype.updateScrollbar=function(){var t=this.getScrollbarComponentCfg(),i=this.trackLen?(0,P.pi)((0,P.pi)({},t),{trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio}):(0,P.pi)({},t);return this.scrollbar.component.update(i),this.scrollbar},e.prototype.getStep=function(){if(this.step)return this.step;var t=this.view.coordinateBBox,i=this.getValidScrollbarCfg(),o=i.type,c=i.categorySize,p=o!=="vertical";return Math.floor((p?t.width:t.height)/c)},e.prototype.getCnt=function(){if(this.cnt)return this.cnt;var t=this.view.getXScale(),i=this.getScrollbarData(),o=(0,b.I)(i,t.field);return(0,b.dp)(o)},e.prototype.getScrollbarComponentCfg=function(){var t=this.view,i=t.coordinateBBox,o=t.viewBBox,c=this.getValidScrollbarCfg(),p=c.type,g=c.padding,_=c.width,S=c.height,I=c.style,L=p!=="vertical",F=(0,P.CR)(g,4),z=F[0],V=F[1],Q=F[2],st=F[3],at=L?{x:i.minX+st,y:o.maxY-S-Q}:{x:o.maxX-_-V,y:i.minY+z},Rt=this.getStep(),Kt=this.getCnt(),te=L?i.width-st-V:i.height-z-Q,Ae=Math.max(te*(0,b.uZ)(Rt/Kt,0,1),RO);return(0,P.pi)((0,P.pi)({},this.getThemeOptions()),{x:at.x,y:at.y,size:L?S:_,isHorizontal:L,trackLen:te,thumbLen:Ae,thumbOffset:0,theme:this.getScrollbarTheme(I)})},e.prototype.getValidScrollbarCfg=function(){var t={type:"horizontal",categorySize:b3,width:QE,height:QE,padding:[0,0,0,0],animate:!0,style:{}};return(0,b.Kn)(this.option)&&(t=(0,P.pi)((0,P.pi)({},t),this.option)),(!(0,b.Kn)(this.option)||!this.option.padding)&&(t.padding=t.type==="horizontal"?[q_,0,q_,0]:[0,q_,0,q_]),t},e.prototype.getScrollbarData=function(){var t=this.view.getCoordinate(),i=this.getValidScrollbarCfg(),o=this.view.getOptions().data||[];return t.isReflect("y")&&i.type==="vertical"&&(o=(0,P.ev)([],(0,P.CR)(o),!1).reverse()),o},e}(dt),w3=E3,DO={fill:"#CCD6EC",opacity:.3};function S3(r,e,t){var i,o,c,p,g,_,S=lu(r,e,t);if(S.length){S=(0,b.xH)(S);try{for(var I=(0,P.XA)(S),L=I.next();!L.done;L=I.next()){var F=L.value;try{for(var z=(c=void 0,(0,P.XA)(F)),V=z.next();!V.done;V=z.next()){var Q=V.value,st=Q.mappingData,at=st.x,Rt=st.y;Q.x=(0,b.kJ)(at)?at[at.length-1]:at,Q.y=(0,b.kJ)(Rt)?Rt[Rt.length-1]:Rt}}catch(Qr){c={error:Qr}}finally{try{V&&!V.done&&(p=z.return)&&p.call(z)}finally{if(c)throw c.error}}}}catch(Qr){i={error:Qr}}finally{try{L&&!L.done&&(o=I.return)&&o.call(I)}finally{if(i)throw i.error}}var Kt=t.shared;if(Kt===!1&&S.length>1){var te=S[0],Ae=Math.abs(e.y-te[0].y);try{for(var hr=(0,P.XA)(S),Tr=hr.next();!Tr.done;Tr=hr.next()){var Dr=Tr.value,cn=Math.abs(e.y-Dr[0].y);cn<=Ae&&(te=Dr,Ae=cn)}}catch(Qr){g={error:Qr}}finally{try{Tr&&!Tr.done&&(_=hr.return)&&_.call(hr)}finally{if(g)throw g.error}}S=[te]}return(0,b.jj)((0,b.xH)(S))}return[]}var C3=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.show=function(t){var i=this.context.view,o=this.context.event,c=i.getController("tooltip").getTooltipCfg(),p=S3(i,{x:o.x,y:o.y},c);if(!(0,b.Xy)(p,this.items)&&(this.items=p,p.length)){var g=i.getXScale().field,_=p[0].data[g],S=[],I=i.geometries;if((0,b.S6)(I,function(ca){if(ca.type==="interval"||ca.type==="schema"){var Yi=ca.getElementsBy(function(ra){var Pa=ra.getData();return Pa[g]===_});S=S.concat(Yi)}}),S.length){var L=i.getCoordinate(),F=S[0].shape.getCanvasBBox(),z=S[0].shape.getCanvasBBox(),V=F;(0,b.S6)(S,function(ca){var Yi=ca.shape.getCanvasBBox();L.isTransposed?(Yi.minY<F.minY&&(F=Yi),Yi.maxY>z.maxY&&(z=Yi)):(Yi.minX<F.minX&&(F=Yi),Yi.maxX>z.maxX&&(z=Yi)),V.x=Math.min(Yi.minX,V.minX),V.y=Math.min(Yi.minY,V.minY),V.width=Math.max(Yi.maxX,V.maxX)-V.x,V.height=Math.max(Yi.maxY,V.maxY)-V.y});var Q=i.backgroundGroup,st=i.coordinateBBox,at=void 0;if(L.isRect){var Rt=i.getXScale(),Kt=t||{},te=Kt.appendRatio,Ae=Kt.appendWidth;(0,b.UM)(Ae)&&(te=(0,b.UM)(te)?Rt.isLinear?0:.25:te,Ae=L.isTransposed?te*z.height:te*F.width);var hr=void 0,Tr=void 0,Dr=void 0,cn=void 0;L.isTransposed?(hr=st.minX,Tr=Math.min(z.minY,F.minY)-Ae,Dr=st.width,cn=V.height+Ae*2):(hr=Math.min(F.minX,z.minX)-Ae,Tr=st.minY,Dr=V.width+Ae*2,cn=st.height),at=[["M",hr,Tr],["L",hr+Dr,Tr],["L",hr+Dr,Tr+cn],["L",hr,Tr+cn],["Z"]]}else{var Qr=(0,b.YM)(S),Tn=(0,b.Z$)(S),xi=Jf(Qr.getModel(),L).startAngle,va=Jf(Tn.getModel(),L).endAngle,Aa=L.getCenter(),ao=L.getRadius(),Gn=L.innerRadius*ao;at=Cc(Aa.x,Aa.y,ao,xi,va,Gn)}if(this.regionPath)this.regionPath.attr("path",at),this.regionPath.show();else{var Gi=(0,b.U2)(t,"style",DO);this.regionPath=Q.addShape({type:"path",name:"active-region",capture:!1,attrs:(0,P.pi)((0,P.pi)({},Gi),{path:at})})}}}},e.prototype.hide=function(){this.regionPath&&this.regionPath.hide(),this.items=null},e.prototype.destroy=function(){this.hide(),this.regionPath&&this.regionPath.remove(!0),r.prototype.destroy.call(this)},e}(Pe),A3=C3,T3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.timeStamp=0,t}return e.prototype.show=function(){var t=this.context,i=t.event,o=t.view,c=o.isTooltipLocked();if(!c){var p=this.timeStamp,g=+new Date,_=(0,b.U2)(t.view.getOptions(),"tooltip.showDelay",16);if(g-p>_){var S=this.location,I={x:i.x,y:i.y};(!S||!(0,b.Xy)(S,I))&&this.showTooltip(o,I),this.timeStamp=g,this.location=I}}},e.prototype.hide=function(){var t=this.context.view,i=t.getController("tooltip"),o=this.context.event,c=o.clientX,p=o.clientY;i.isCursorEntered({x:c,y:p})||t.isTooltipLocked()||(this.hideTooltip(t),this.location=null)},e.prototype.showTooltip=function(t,i){t.showTooltip(i)},e.prototype.hideTooltip=function(t){t.hideTooltip()},e}(Pe),JE=T3,M3=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.showTooltip=function(t,i){var o=pa(t);(0,b.S6)(o,function(c){var p=To(t,c,i);c.showTooltip(p)})},e.prototype.hideTooltip=function(t){var i=pa(t);(0,b.S6)(i,function(o){o.hideTooltip()})},e}(JE),I3=M3,k3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.timeStamp=0,t}return e.prototype.destroy=function(){r.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.show=function(){var t=this.context,i=t.event,o=this.timeStamp,c=+new Date;if(c-o>16){var p=this.location,g={x:i.x,y:i.y};(!p||!(0,b.Xy)(p,g))&&this.showTooltip(g),this.timeStamp=c,this.location=g}},e.prototype.hide=function(){this.hideTooltip(),this.location=null},e.prototype.showTooltip=function(t){var i=this.context,o=i.event,c=o.target;if(c&&c.get("tip")){this.tooltip||this.renderTooltip();var p=c.get("tip");this.tooltip.update((0,P.pi)({title:p},t)),this.tooltip.show()}},e.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,i=this.context.view,o=i.canvas,c={start:{x:0,y:0},end:{x:o.get("width"),y:o.get("height")}},p=i.getTheme(),g=(0,b.U2)(p,["components","tooltip","domStyles"],{}),_=new Bl({parent:o.get("el").parentNode,region:c,visible:!1,crosshairs:null,domStyles:(0,P.pi)({},(0,b.b$)({},g,(t={},t[Js]={"max-width":"50%"},t[Rl]={"word-break":"break-all"},t)))});_.init(),_.setCapture(!1),this.tooltip=_},e}(Pe),L3=k3,P3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="",t}return e.prototype.hasState=function(t){return t.hasState(this.stateName)},e.prototype.setElementState=function(t,i){t.setState(this.stateName,i)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.clear=function(){var t=this.context.view;this.clearViewState(t)},e.prototype.clearViewState=function(t){var i=this,o=bu(t,this.stateName);(0,b.S6)(o,function(c){i.setElementState(c,!1)})},e}(Pe),K_=P3;function O3(r){return(0,b.U2)(r.get("delegateObject"),"item")}var F3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.ignoreListItemStates=["unchecked"],t}return e.prototype.isItemIgnore=function(t,i){var o=this.ignoreListItemStates,c=o.filter(function(p){return i.hasState(t,p)});return!!c.length},e.prototype.setStateByComponent=function(t,i,o){var c=this.context.view,p=t.get("field"),g=Go(c);this.setElementsStateByItem(g,p,i,o)},e.prototype.setStateByElement=function(t,i){this.setElementState(t,i)},e.prototype.isMathItem=function(t,i,o){var c=this.context.view,p=ql(c,i),g=ns(t,i);return!(0,b.UM)(g)&&o.name===p.getText(g)},e.prototype.setElementsStateByItem=function(t,i,o,c){var p=this;(0,b.S6)(t,function(g){p.isMathItem(g,i,o)&&g.setState(p.stateName,c)})},e.prototype.setStateEnable=function(t){var i=vi(this.context);if(i)Ua(this.context)&&this.setStateByElement(i,t);else{var o=pi(this.context);if(Ca(o)){var c=o.item,p=o.component;if(c&&p&&!this.isItemIgnore(c,p)){var g=this.context.event.gEvent;if(g&&g.fromShape&&g.toShape&&O3(g.fromShape)===O3(g.toShape))return;this.setStateByComponent(p,c,t)}}}},e.prototype.toggle=function(){var t=vi(this.context);if(t){var i=t.hasState(this.stateName);this.setElementState(t,!i)}},e.prototype.reset=function(){this.setStateEnable(!1)},e}(K_),Wy=F3,tw=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="active",t}return e.prototype.active=function(){this.setState()},e}(Wy),ew=tw,td=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.cache={},t}return e.prototype.getColorScale=function(t,i){var o=i.geometry.getAttribute("color");if(!o)return null;var c=t.getScaleByField(o.getFields()[0]);return c},e.prototype.getLinkPath=function(t,i){var o=this.context.view,c=o.getCoordinate().isTransposed,p=t.shape.getCanvasBBox(),g=i.shape.getCanvasBBox(),_=c?[["M",p.minX,p.minY],["L",g.minX,g.maxY],["L",g.maxX,g.maxY],["L",p.maxX,p.minY],["Z"]]:[["M",p.maxX,p.minY],["L",g.minX,g.minY],["L",g.minX,g.maxY],["L",p.maxX,p.maxY],["Z"]];return _},e.prototype.addLinkShape=function(t,i,o,c){var p={opacity:.4,fill:i.shape.attr("fill")};t.addShape({type:"path",attrs:(0,P.pi)((0,P.pi)({},(0,b.b$)({},p,(0,b.mf)(c)?c(p,i):c)),{path:this.getLinkPath(i,o)})})},e.prototype.linkByElement=function(t,i){var o=this,c=this.context.view,p=this.getColorScale(c,t);if(p){var g=ns(t,p.field);if(!this.cache[g]){var _=Ts(c,p.field,g),S=this.linkGroup,I=S.addGroup();this.cache[g]=I;var L=_.length;(0,b.S6)(_,function(F,z){if(z<L-1){var V=_[z+1];o.addLinkShape(I,F,V,i)}})}}},e.prototype.removeLink=function(t){var i=this.getColorScale(this.context.view,t);if(i){var o=ns(t,i.field);this.cache[o]&&(this.cache[o].remove(),this.cache[o]=null)}},e.prototype.link=function(t){var i=this.context;this.linkGroup||(this.linkGroup=i.view.foregroundGroup.addGroup({id:"link-by-color-group",capture:!1}));var o=vi(i);o&&this.linkByElement(o,t==null?void 0:t.style)},e.prototype.unlink=function(){var t=vi(this.context);t&&this.removeLink(t)},e.prototype.clear=function(){this.linkGroup&&this.linkGroup.clear(),this.cache={}},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.linkGroup&&this.linkGroup.remove()},e}(Pe),R3=td,ug=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.startPoint=null,t.endPoint=null,t.isStarted=!1,t.effectSiblings=!1,t.effectByRecord=!1,t}return e.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},e.prototype.start=function(){this.clear(),this.startPoint=this.getCurrentPoint(),this.isStarted=!0},e.prototype.getIntersectElements=function(){var t=null;if(Pi(this.context))t=Ma(this.context,10);else{var i=this.startPoint,o=this.isStarted?this.getCurrentPoint():this.endPoint;if(!i||!o)return;var c={minX:Math.min(i.x,o.x),minY:Math.min(i.y,o.y),maxX:Math.max(i.x,o.x),maxY:Math.max(i.y,o.y)},p=this.context.view;t=Ys(p,c)}return t},e.prototype.setStateEnable=function(t){if(this.effectSiblings&&!this.effectByRecord)this.setSiblingsState(t);else{var i=Go(this.context.view),o=this.getIntersectElements();o&&o.length?this.effectByRecord?this.setSiblingsStateByRecord(o,t):this.setElementsState(o,t,i):this.clear()}},e.prototype.setSiblingsStateByRecord=function(t,i){var o=this,c=this.context.view,p=pa(c),g=t.map(function(I){return I.getModel().data}),_=c.getXScale().field,S=c.getYScales()[0].field;(0,b.S6)(p,function(I){var L=Go(I),F=L.filter(function(z){var V=z.getModel().data;return Us(g,V,_,S)});o.setElementsState(F,i,L)})},e.prototype.setSiblingsState=function(t){var i=this,o=this.context.view,c=pa(o);Pi(this.context)&&(0,b.S6)(c,function(p){var g=Go(p),_=Is(i.context,p,10);_&&_.length?i.setElementsState(_,t,g):i.clearViewState(p)})},e.prototype.setElementsState=function(t,i,o){var c=this;(0,b.S6)(o,function(p){t.includes(p)?c.setElementState(p,i):c.setElementState(p,!1)})},e.prototype.end=function(){this.isStarted=!1,this.endPoint=this.getCurrentPoint()},e.prototype.clear=function(){var t=this,i=this.context.view;if(this.effectSiblings){var o=pa(i);(0,b.S6)(o,function(c){t.clearViewState(c)})}else this.clearViewState(i)},e}(K_),Xy=ug,Q_=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="active",t}return e.prototype.active=function(){this.setState()},e}(Xy),J_=Q_,Jg=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.setStateEnable=function(t){var i=vi(this.context);if(i){if(!Ua(this.context))return;t?(this.clear(),this.setElementState(i,!0)):this.hasState(i)&&this.setElementState(i,!1)}},e.prototype.toggle=function(){var t=vi(this.context);if(t){var i=this.hasState(t);i||this.clear(),this.setElementState(t,!i)}},e.prototype.reset=function(){this.setStateEnable(!1)},e}(K_),tm=Jg,rw=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="active",t}return e.prototype.active=function(){this.setState()},e}(tm),D3=rw,lg="inactive",hc="active";function tx(r){var e=Go(r);(0,b.S6)(e,function(t){t.hasState(hc)&&t.setState(hc,!1),t.hasState(lg)&&t.setState(lg,!1)})}function nw(r,e,t){(0,b.S6)(r,function(i){e(i)?(i.hasState(lg)&&i.setState(lg,!1),i.setState(hc,t)):(i.hasState(hc)&&i.setState(hc,!1),i.setState(lg,t))})}var w0=Ee.INACTIVE,mf=Ee.ACTIVE,B3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName=mf,t}return e.prototype.setElementsStateByItem=function(t,i,o,c){var p=this,g=function(_){return p.isMathItem(_,i,o)};this.setHighlightBy(t,g,c)},e.prototype.setElementHighlight=function(t,i){i(t)?(t.hasState(w0)&&t.setState(w0,!1),t.setState(mf,!0)):t.hasState(mf)||t.setState(w0,!0)},e.prototype.setHighlightBy=function(t,i,o){var c=this;if(o)(0,b.S6)(t,function(_){c.setElementHighlight(_,i)});else{var p=bu(this.context.view,mf),g=!0;(0,b.S6)(p,function(_){if(!i(_))return g=!1,!1}),g?this.clear():(0,b.S6)(t,function(_){i(_)&&(_.hasState(mf)&&_.setState(mf,!1),_.setState(w0,!0))})}},e.prototype.setElementState=function(t,i){var o=this.context.view,c=Go(o);this.setHighlightBy(c,function(p){return t===p},i)},e.prototype.highlight=function(){this.setState()},e.prototype.clear=function(){var t=this.context.view;tx(t)},e}(Wy),iw=B3,BO=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.setStateByElement=function(t,i){var o=this.context.view,c=t.geometry.getAttribute("color");if(c){var p=o.getScaleByField(c.getFields()[0]),g=ns(t,p.field),_=Go(o),S=_.filter(function(I){return ns(I,p.field)===g});this.setHighlightBy(_,function(I){return S.includes(I)},i)}},e}(iw),NO=BO,zO=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.setElementHighlight=function(t,i){i(t)?(t.hasState(w0)&&t.setState(w0,!1),t.setState(mf,!0)):(t.setState(w0,!0),t.hasState(mf)&&t.setState(mf,!1))},e.prototype.setStateByElement=function(t,i){var o=this.context.view,c=o.getXScale(),p=ns(t,c.field),g=Go(o),_=g.filter(function(S){return ns(S,c.field)===p});this.setHighlightBy(g,function(S){return _.includes(S)},i)},e.prototype.toggle=function(){var t=vi(this.context);if(t){var i=t.hasState(this.stateName);this.setStateByElement(t,!i)}},e}(iw),UO=zO,qd;(function(r){r.BEFORE_HIGHLIGHT="element-range-highlight:beforehighlight",r.AFTER_HIGHLIGHT="element-range-highlight:afterhighlight",r.BEFORE_CLEAR="element-range-highlight:beforeclear",r.AFTER_CLEAR="element-range-highlight:afterclear"})(qd||(qd={}));var N3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="active",t}return e.prototype.clearViewState=function(t){tx(t)},e.prototype.highlight=function(){var t=this.context,i=t.view,o=t.event,c=this.getIntersectElements(),p={view:i,event:o,highlightElements:c};i.emit(qd.BEFORE_HIGHLIGHT,go.fromData(i,qd.BEFORE_HIGHLIGHT,p)),this.setState(),i.emit(qd.AFTER_HIGHLIGHT,go.fromData(i,qd.AFTER_HIGHLIGHT,p))},e.prototype.clear=function(){var t=this.context.view;t.emit(qd.BEFORE_CLEAR,go.fromData(t,qd.BEFORE_CLEAR,{})),r.prototype.clear.call(this),t.emit(qd.AFTER_CLEAR,go.fromData(t,qd.AFTER_CLEAR,{}))},e.prototype.setElementsState=function(t,i,o){nw(o,function(c){return t.indexOf(c)>=0},i)},e}(Xy),Yy=N3,ZO=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="active",t}return e.prototype.highlight=function(){this.setState()},e.prototype.setElementState=function(t,i){var o=this.context.view,c=Go(o);nw(c,function(p){return t===p},i)},e.prototype.clear=function(){var t=this.context.view;tx(t)},e}(tm),aw=ZO,z3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="selected",t}return e.prototype.selected=function(){this.setState()},e}(Xy),VO=z3,GO=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="selected",t}return e.prototype.selected=function(){this.setState()},e}(Wy),HO=GO,ow=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="selected",t}return e.prototype.selected=function(){this.setState()},e}(tm),jO=ow,sw=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="",t.ignoreItemStates=[],t}return e.prototype.getTriggerListInfo=function(){var t=pi(this.context),i=null;return Ca(t)&&(i={item:t.item,list:t.component}),i},e.prototype.getAllowComponents=function(){var t=this,i=this.context.view,o=Na(i),c=[];return(0,b.S6)(o,function(p){p.isList()&&t.allowSetStateByElement(p)&&c.push(p)}),c},e.prototype.hasState=function(t,i){return t.hasState(i,this.stateName)},e.prototype.clearAllComponentsState=function(){var t=this,i=this.getAllowComponents();(0,b.S6)(i,function(o){o.clearItemsState(t.stateName)})},e.prototype.allowSetStateByElement=function(t){var i=t.get("field");if(!i)return!1;if(this.cfg&&this.cfg.componentNames){var o=t.get("name");if(this.cfg.componentNames.indexOf(o)===-1)return!1}var c=this.context.view,p=ql(c,i);return p&&p.isCategory},e.prototype.allowSetStateByItem=function(t,i){var o=this.ignoreItemStates;if(o.length){var c=o.filter(function(p){return i.hasState(t,p)});return c.length===0}return!0},e.prototype.setStateByElement=function(t,i,o){var c=t.get("field"),p=this.context.view,g=ql(p,c),_=ns(i,c),S=g.getText(_);this.setItemsState(t,S,o)},e.prototype.setStateEnable=function(t){var i=this,o=vi(this.context);if(o){var c=this.getAllowComponents();(0,b.S6)(c,function(S){i.setStateByElement(S,o,t)})}else{var p=pi(this.context);if(Ca(p)){var g=p.item,_=p.component;this.allowSetStateByElement(_)&&this.allowSetStateByItem(g,_)&&this.setItemState(_,g,t)}}},e.prototype.setItemsState=function(t,i,o){var c=this,p=t.getItems();(0,b.S6)(p,function(g){g.name===i&&c.setItemState(t,g,o)})},e.prototype.setItemState=function(t,i,o){t.setItemState(i,this.stateName,o)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.reset=function(){this.setStateEnable(!1)},e.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var i=t.list,o=t.item,c=this.hasState(i,o);this.setItemState(i,o,!c)}},e.prototype.clear=function(){var t=this.getTriggerListInfo();t?t.list.clearItemsState(this.stateName):this.clearAllComponentsState()},e}(Pe),S0=sw,U3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="active",t}return e.prototype.active=function(){this.setState()},e}(S0),Z3=U3,uw="inactive",ex="active";function V3(r){var e=r.getItems();(0,b.S6)(e,function(t){r.hasState(t,ex)&&r.setItemState(t,ex,!1),r.hasState(t,uw)&&r.setItemState(t,uw,!1)})}var em="inactive",C0="active",G3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName=C0,t.ignoreItemStates=["unchecked"],t}return e.prototype.setItemsState=function(t,i,o){this.setHighlightBy(t,function(c){return c.name===i},o)},e.prototype.setItemState=function(t,i,o){var c=t.getItems();this.setHighlightBy(t,function(p){return p===i},o)},e.prototype.setHighlightBy=function(t,i,o){var c=t.getItems();if(o)(0,b.S6)(c,function(_){i(_)?(t.hasState(_,em)&&t.setItemState(_,em,!1),t.setItemState(_,C0,!0)):t.hasState(_,C0)||t.setItemState(_,em,!0)});else{var p=t.getItemsByState(C0),g=!0;(0,b.S6)(p,function(_){if(!i(_))return g=!1,!1}),g?this.clear():(0,b.S6)(c,function(_){i(_)&&(t.hasState(_,C0)&&t.setItemState(_,C0,!1),t.setItemState(_,em,!0))})}},e.prototype.highlight=function(){this.setState()},e.prototype.clear=function(){var t=this.getTriggerListInfo();if(t)V3(t.list);else{var i=this.getAllowComponents();(0,b.S6)(i,function(o){o.clearItemsState(C0),o.clearItemsState(em)})}},e}(S0),$y=G3,H3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="selected",t}return e.prototype.selected=function(){this.setState()},e}(S0),j3=H3,W3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="unchecked",t}return e.prototype.unchecked=function(){this.setState()},e}(S0),rx=W3,cg="unchecked",Rv="checked",X3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName=Rv,t}return e.prototype.setItemState=function(t,i,o){this.setCheckedBy(t,function(c){return c===i},o)},e.prototype.setCheckedBy=function(t,i,o){var c=t.getItems();o&&(0,b.S6)(c,function(p){i(p)?(t.hasState(p,cg)&&t.setItemState(p,cg,!1),t.setItemState(p,Rv,!0)):t.hasState(p,Rv)||t.setItemState(p,cg,!0)})},e.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var i=t.list,o=t.item,c=!(0,b.G)(i.getItems(),function(p){return i.hasState(p,cg)});c||i.hasState(o,cg)?this.setItemState(i,o,!0):this.reset()}},e.prototype.checked=function(){this.setState()},e.prototype.reset=function(){var t=this.getAllowComponents();(0,b.S6)(t,function(i){i.clearItemsState(Rv),i.clearItemsState(cg)})},e}(S0),nx=X3,fg="unchecked",qy=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.toggle=function(){var t,i,o,c,p,g,_,S,I=this.getTriggerListInfo();if(I!=null&&I.item){var L=I.list,F=I.item,z=L.getItems(),V=z.filter(function(Qr){return!L.hasState(Qr,fg)}),Q=z.filter(function(Qr){return L.hasState(Qr,fg)}),st=V[0];if(z.length===V.length)try{for(var at=(0,P.XA)(z),Rt=at.next();!Rt.done;Rt=at.next()){var Kt=Rt.value;L.setItemState(Kt,fg,Kt.id!==F.id)}}catch(Qr){t={error:Qr}}finally{try{Rt&&!Rt.done&&(i=at.return)&&i.call(at)}finally{if(t)throw t.error}}else if(z.length-Q.length===1)if(st.id===F.id)try{for(var te=(0,P.XA)(z),Ae=te.next();!Ae.done;Ae=te.next()){var Kt=Ae.value;L.setItemState(Kt,fg,!1)}}catch(Qr){o={error:Qr}}finally{try{Ae&&!Ae.done&&(c=te.return)&&c.call(te)}finally{if(o)throw o.error}}else try{for(var hr=(0,P.XA)(z),Tr=hr.next();!Tr.done;Tr=hr.next()){var Kt=Tr.value;L.setItemState(Kt,fg,Kt.id!==F.id)}}catch(Qr){p={error:Qr}}finally{try{Tr&&!Tr.done&&(g=hr.return)&&g.call(hr)}finally{if(p)throw p.error}}else try{for(var Dr=(0,P.XA)(z),cn=Dr.next();!cn.done;cn=Dr.next()){var Kt=cn.value;L.setItemState(Kt,fg,Kt.id!==F.id)}}catch(Qr){_={error:Qr}}finally{try{cn&&!cn.done&&(S=Dr.return)&&S.call(Dr)}finally{if(_)throw _.error}}}},e}(S0),lw=qy,Ky="showRadio",rm="legend-radio-tip",cw=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.timeStamp=0,t}return e.prototype.show=function(){var t=this.getTriggerListInfo();if(t!=null&&t.item){var i=t.list,o=t.item;i.setItemState(o,Ky,!0)}},e.prototype.hide=function(){var t=this.getTriggerListInfo();if(t!=null&&t.item){var i=t.list,o=t.item;i.setItemState(o,Ky,!1)}},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.showTip=function(){var t=this.context,i=t.event,o=this.timeStamp,c=+new Date,p=this.context.event.target;if(c-o>16&&p.get("name")==="legend-item-radio"){var g=this.location,_={x:i.x,y:i.y};this.timeStamp=c,this.location=_,(!g||!(0,b.Xy)(g,_))&&this.showTooltip(_)}},e.prototype.hideTip=function(){this.hideTooltip(),this.location=null},e.prototype.showTooltip=function(t){var i=this.context,o=i.event,c=o.target;if(c&&c.get("tip")){this.tooltip||this.renderTooltip();var p=i.view.getCanvas().get("el").getBoundingClientRect(),g=p.x,_=p.y;this.tooltip.update((0,P.pi)((0,P.pi)({title:c.get("tip")},t),{x:t.x+g,y:t.y+_})),this.tooltip.show()}},e.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,i=(t={},t[Js]={padding:"6px 8px",transform:"translate(-50%, -80%)",background:"rgba(0,0,0,0.75)",color:"#fff","border-radius":"2px","z-index":100},t[Rl]={"font-size":"12px","line-height":"14px","margin-bottom":0,"word-break":"break-all"},t);document.getElementById(rm)&&document.body.removeChild(document.getElementById(rm));var o=new Bl({parent:document.body,region:null,visible:!1,crosshairs:null,domStyles:i,containerId:rm});o.init(),o.setCapture(!1),this.tooltip=o},e}(S0),fw=cw,Kd=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.maskShape=null,t.points=[],t.starting=!1,t.moving=!1,t.preMovePoint=null,t.shapeType="path",t}return e.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},e.prototype.emitEvent=function(t){var i="mask:".concat(t),o=this.context.view,c=this.context.event;o.emit(i,{target:this.maskShape,shape:this.maskShape,points:this.points,x:c.x,y:c.y})},e.prototype.createMask=function(){var t=this.context.view,i=this.getMaskAttrs(),o=t.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:(0,P.pi)({fill:"#C5D4EB",opacity:.3},i)});return o},e.prototype.getMaskPath=function(){return[]},e.prototype.show=function(){this.maskShape&&(this.maskShape.show(),this.emitEvent("show"))},e.prototype.start=function(t){this.starting=!0,this.moving=!1,this.points=[this.getCurrentPoint()],this.maskShape||(this.maskShape=this.createMask(),this.maskShape.set("capture",!1)),this.updateMask(t==null?void 0:t.maskStyle),this.emitEvent("start")},e.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint()},e.prototype.move=function(){if(!(!this.moving||!this.maskShape)){var t=this.getCurrentPoint(),i=this.preMovePoint,o=t.x-i.x,c=t.y-i.y,p=this.points;(0,b.S6)(p,function(g){g.x+=o,g.y+=c}),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t}},e.prototype.updateMask=function(t){var i=(0,b.b$)({},this.getMaskAttrs(),t);this.maskShape.attr(i)},e.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null},e.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.maskShape&&this.maskShape.set("capture",!0)},e.prototype.hide=function(){this.maskShape&&(this.maskShape.hide(),this.emitEvent("hide"))},e.prototype.resize=function(){this.starting&&this.maskShape&&(this.points.push(this.getCurrentPoint()),this.updateMask(),this.emitEvent("change"))},e.prototype.destroy=function(){this.points=[],this.maskShape&&this.maskShape.remove(),this.maskShape=null,this.preMovePoint=null,r.prototype.destroy.call(this)},e}(Pe),ix=Kd;function ax(r){var e=(0,b.Z$)(r),t=0,i=0,o=0;if(r.length){var c=r[0];t=eu(c,e)/2,i=(e.x+c.x)/2,o=(e.y+c.y)/2}return{x:i,y:o,r:t}}var hw=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.shapeType="circle",t}return e.prototype.getMaskAttrs=function(){return ax(this.points)},e}(ix),ox=hw;function Qy(r){return{start:(0,b.YM)(r),end:(0,b.Z$)(r)}}function pw(r,e){var t=Math.min(r.x,e.x),i=Math.min(r.y,e.y),o=Math.abs(e.x-r.x),c=Math.abs(e.y-r.y);return{x:t,y:i,width:o,height:c}}var Y3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.shapeType="rect",t}return e.prototype.getRegion=function(){return Qy(this.points)},e.prototype.getMaskAttrs=function(){var t=this.getRegion(),i=t.start,o=t.end;return pw(i,o)},e}(ix),dw=Y3;function sx(r){r.x=(0,b.uZ)(r.x,0,1),r.y=(0,b.uZ)(r.y,0,1)}function Jy(r,e,t,i){var o=null,c=null,p=i.invert((0,b.YM)(r)),g=i.invert((0,b.Z$)(r));return t&&(sx(p),sx(g)),e==="x"?(o=i.convert({x:p.x,y:0}),c=i.convert({x:g.x,y:1})):(o=i.convert({x:0,y:p.y}),c=i.convert({x:1,y:g.y})),{start:o,end:c}}var vw=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.dim="x",t.inPlot=!0,t}return e.prototype.getRegion=function(){var t=this.context.view.getCoordinate();return Jy(this.points,this.dim,this.inPlot,t)},e}(dw),ux=vw;function lx(r){var e=[];return r.length&&((0,b.S6)(r,function(t,i){i===0?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])}),e.push(["L",r[0].x,r[0].y])),e}function gw(r){return{path:lx(r)}}var cx=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getMaskPath=function(){return lx(this.points)},e.prototype.getMaskAttrs=function(){return gw(this.points)},e.prototype.addPoint=function(){this.resize()},e}(ix),mw=cx;function fx(r){return Ao(r,!0)}function nm(r){return{path:fx(r)}}var hx=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getMaskPath=function(){return fx(this.points)},e.prototype.getMaskAttrs=function(){return nm(this.points)},e}(mw),$3=hx,q3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.maskShapes=[],t.starting=!1,t.moving=!1,t.recordPoints=null,t.preMovePoint=null,t.shapeType="path",t.maskType="multi-mask",t}return e.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},e.prototype.emitEvent=function(t){var i="".concat(this.maskType,":").concat(t),o=this.context.view,c=this.context.event,p={type:this.shapeType,name:this.maskType,get:function(g){return p.hasOwnProperty(g)?p[g]:void 0}};o.emit(i,{target:p,maskShapes:this.maskShapes,multiPoints:this.recordPoints,x:c.x,y:c.y})},e.prototype.createMask=function(t){var i=this.context.view,o=this.recordPoints[t],c=this.getMaskAttrs(o),p=i.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:(0,P.pi)({fill:"#C5D4EB",opacity:.3},c)});this.maskShapes.push(p)},e.prototype.getMaskPath=function(t){return[]},e.prototype.show=function(){this.maskShapes.length>0&&(this.maskShapes.forEach(function(t){return t.show()}),this.emitEvent("show"))},e.prototype.start=function(t){this.recordPointStart(),this.starting=!0,this.moving=!1;var i=this.recordPoints.length-1;this.createMask(i),this.updateShapesCapture(!1),this.updateMask(t==null?void 0:t.maskStyle),this.emitEvent("start")},e.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint(),this.updateShapesCapture(!1)},e.prototype.move=function(){if(!(!this.moving||this.maskShapes.length===0)){var t=this.getCurrentPoint(),i=this.preMovePoint,o=t.x-i.x,c=t.y-i.y,p=this.getCurMaskShapeIndex();p>-1&&(this.recordPoints[p].forEach(function(g){g.x+=o,g.y+=c}),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t)}},e.prototype.updateMask=function(t){var i=this;this.recordPoints.forEach(function(o,c){var p=(0,b.b$)({},i.getMaskAttrs(o),t);i.maskShapes[c].attr(p)})},e.prototype.resize=function(){this.starting&&this.maskShapes.length>0&&(this.recordPointContinue(),this.updateMask(),this.emitEvent("change"))},e.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null,this.updateShapesCapture(!0)},e.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.updateShapesCapture(!0)},e.prototype.hide=function(){this.maskShapes.length>0&&(this.maskShapes.forEach(function(t){return t.hide()}),this.emitEvent("hide"))},e.prototype.remove=function(){var t=this.getCurMaskShapeIndex();t>-1&&(this.recordPoints.splice(t,1),this.maskShapes[t].remove(),this.maskShapes.splice(t,1),this.preMovePoint=null,this.updateShapesCapture(!0),this.emitEvent("change"))},e.prototype.clearAll=function(){this.recordPointClear(),this.maskShapes.forEach(function(t){return t.remove()}),this.maskShapes=[],this.preMovePoint=null},e.prototype.clear=function(){var t=this.getCurMaskShapeIndex();t===-1?(this.recordPointClear(),this.maskShapes.forEach(function(i){return i.remove()}),this.maskShapes=[],this.emitEvent("clearAll")):(this.recordPoints.splice(t,1),this.maskShapes[t].remove(),this.maskShapes.splice(t,1),this.preMovePoint=null,this.emitEvent("clearSingle")),this.preMovePoint=null},e.prototype.destroy=function(){this.clear(),r.prototype.destroy.call(this)},e.prototype.getRecordPoints=function(){var t;return(0,P.ev)([],(0,P.CR)((t=this.recordPoints)!==null&&t!==void 0?t:[]),!1)},e.prototype.recordPointStart=function(){var t=this.getRecordPoints(),i=this.getCurrentPoint();this.recordPoints=(0,P.ev)((0,P.ev)([],(0,P.CR)(t),!1),[[i]],!1)},e.prototype.recordPointContinue=function(){var t=this.getRecordPoints(),i=this.getCurrentPoint(),o=t.splice(-1,1)[0]||[];o.push(i),this.recordPoints=(0,P.ev)((0,P.ev)([],(0,P.CR)(t),!1),[o],!1)},e.prototype.recordPointClear=function(){this.recordPoints=[]},e.prototype.updateShapesCapture=function(t){this.maskShapes.forEach(function(i){return i.set("capture",t)})},e.prototype.getCurMaskShapeIndex=function(){var t=this.getCurrentPoint();return this.maskShapes.findIndex(function(i){var o=i.attrs,c=o.width,p=o.height,g=o.r,_=c===0||p===0||g===0;return!_&&i.isHit(t.x,t.y)})},e}(Pe),px=q3,K3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.shapeType="rect",t}return e.prototype.getRegion=function(t){return Qy(t)},e.prototype.getMaskAttrs=function(t){var i=this.getRegion(t),o=i.start,c=i.end;return pw(o,c)},e}(px),yw=K3,Q3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.dim="x",t.inPlot=!0,t}return e.prototype.getRegion=function(t){var i=this.context.view.getCoordinate();return Jy(t,this.dim,this.inPlot,i)},e}(yw),_w=Q3,J3=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.shapeType="circle",t.getMaskAttrs=ax,t}return e}(px),t5=J3,e5=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.getMaskPath=lx,t.getMaskAttrs=gw,t}return e.prototype.addPoint=function(){this.resize()},e}(px),xw=e5,im=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.getMaskPath=fx,t.getMaskAttrs=nm,t}return e}(xw),bw=im,r5=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.setCursor=function(t){var i=this.context.view;i.getCanvas().setCursor(t)},e.prototype.default=function(){this.setCursor("default")},e.prototype.pointer=function(){this.setCursor("pointer")},e.prototype.move=function(){this.setCursor("move")},e.prototype.crosshair=function(){this.setCursor("crosshair")},e.prototype.wait=function(){this.setCursor("wait")},e.prototype.help=function(){this.setCursor("help")},e.prototype.text=function(){this.setCursor("text")},e.prototype.eResize=function(){this.setCursor("e-resize")},e.prototype.wResize=function(){this.setCursor("w-resize")},e.prototype.nResize=function(){this.setCursor("n-resize")},e.prototype.sResize=function(){this.setCursor("s-resize")},e.prototype.neResize=function(){this.setCursor("ne-resize")},e.prototype.nwResize=function(){this.setCursor("nw-resize")},e.prototype.seResize=function(){this.setCursor("se-resize")},e.prototype.swResize=function(){this.setCursor("sw-resize")},e.prototype.nsResize=function(){this.setCursor("ns-resize")},e.prototype.ewResize=function(){this.setCursor("ew-resize")},e.prototype.zoomIn=function(){this.setCursor("zoom-in")},e.prototype.zoomOut=function(){this.setCursor("zoom-out")},e}(Pe),dx=r5,n5=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.filterView=function(t,i,o){var c=this;t.getScaleByField(i)&&t.filter(i,o),t.views&&t.views.length&&(0,b.S6)(t.views,function(p){c.filterView(p,i,o)})},e.prototype.filter=function(){var t=pi(this.context);if(t){var i=this.context.view,o=t.component,c=o.get("field");if(Ca(t)){if(c){var p=o.getItemsByState("unchecked"),g=ql(i,c),_=p.map(function(z){return z.name});_.length?this.filterView(i,c,function(z){var V=g.getText(z);return!_.includes(V)}):this.filterView(i,c,null),i.render(!0)}}else if(Ci(t)){var S=o.getValue(),I=(0,P.CR)(S,2),L=I[0],F=I[1];this.filterView(i,c,function(z){return z>=L&&z<=F}),i.render(!0)}}},e}(Pe),i5=n5;function t1(r,e,t,i){var o=Math.min(t[e],i[e]),c=Math.max(t[e],i[e]),p=(0,P.CR)(r.range,2),g=p[0],_=p[1];if(o<g&&(o=g),c>_&&(c=_),o===_&&c===_)return null;var S=r.invert(o),I=r.invert(c);if(r.isCategory){var L=r.values.indexOf(S),F=r.values.indexOf(I),z=r.values.slice(L,F+1);return function(V){return z.includes(V)}}else return function(V){return V>=S&&V<=I}}var jc;(function(r){r.FILTER="brush-filter-processing",r.RESET="brush-filter-reset",r.BEFORE_FILTER="brush-filter:beforefilter",r.AFTER_FILTER="brush-filter:afterfilter",r.BEFORE_RESET="brush-filter:beforereset",r.AFTER_RESET="brush-filter:afterreset"})(jc||(jc={}));var vx=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.dims=["x","y"],t.startPoint=null,t.isStarted=!1,t}return e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.start=function(){var t=this.context;this.isStarted=!0,this.startPoint=t.getCurrentPoint()},e.prototype.filter=function(){var t,i;if(Pi(this.context)){var o=this.context.event.target,c=o.getCanvasBBox();t={x:c.x,y:c.y},i={x:c.maxX,y:c.maxY}}else{if(!this.isStarted)return;t=this.startPoint,i=this.context.getCurrentPoint()}if(!(Math.abs(t.x-i.x)<5||Math.abs(t.x-i.y)<5)){var p=this.context,g=p.view,_=p.event,S={view:g,event:_,dims:this.dims};g.emit(jc.BEFORE_FILTER,go.fromData(g,jc.BEFORE_FILTER,S));var I=g.getCoordinate(),L=I.invert(i),F=I.invert(t);if(this.hasDim("x")){var z=g.getXScale(),V=t1(z,"x",L,F);this.filterView(g,z.field,V)}if(this.hasDim("y")){var Q=g.getYScales()[0],V=t1(Q,"y",L,F);this.filterView(g,Q.field,V)}this.reRender(g,{source:jc.FILTER}),g.emit(jc.AFTER_FILTER,go.fromData(g,jc.AFTER_FILTER,S))}},e.prototype.end=function(){this.isStarted=!1},e.prototype.reset=function(){var t=this.context.view;if(t.emit(jc.BEFORE_RESET,go.fromData(t,jc.BEFORE_RESET,{})),this.isStarted=!1,this.hasDim("x")){var i=t.getXScale();this.filterView(t,i.field,null)}if(this.hasDim("y")){var o=t.getYScales()[0];this.filterView(t,o.field,null)}this.reRender(t,{source:jc.RESET}),t.emit(jc.AFTER_RESET,go.fromData(t,jc.AFTER_RESET,{}))},e.prototype.filterView=function(t,i,o){t.filter(i,o)},e.prototype.reRender=function(t,i){t.render(!0,i)},e}(Pe),e1=vx,a5=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.filterView=function(t,i,o){var c=pa(t);(0,b.S6)(c,function(p){p.filter(i,o)})},e.prototype.reRender=function(t){var i=pa(t);(0,b.S6)(i,function(o){o.render(!0)})},e}(e1),am=a5,gx=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.filter=function(){var t=pi(this.context),i=this.context.view,o=Go(i);if(Pi(this.context)){var c=Ma(this.context,10);c&&(0,b.S6)(o,function(Q){c.includes(Q)?Q.show():Q.hide()})}else if(t){var p=t.component,g=p.get("field");if(Ca(t)){if(g){var _=p.getItemsByState("unchecked"),S=ql(i,g),I=_.map(function(Q){return Q.name});(0,b.S6)(o,function(Q){var st=ns(Q,g),at=S.getText(st);I.indexOf(at)>=0?Q.hide():Q.show()})}}else if(Ci(t)){var L=p.getValue(),F=(0,P.CR)(L,2),z=F[0],V=F[1];(0,b.S6)(o,function(Q){var st=ns(Q,g);st>=z&&st<=V?Q.show():Q.hide()})}}},e.prototype.clear=function(){var t=Go(this.context.view);(0,b.S6)(t,function(i){i.show()})},e.prototype.reset=function(){this.clear()},e}(Pe),o5=gx,s5=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.byRecord=!1,t}return e.prototype.filter=function(){Pi(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},e.prototype.filterByRecord=function(){var t=this.context.view,i=Ma(this.context,10);if(i){var o=t.getXScale().field,c=t.getYScales()[0].field,p=i.map(function(_){return _.getModel().data}),g=pa(t);(0,b.S6)(g,function(_){var S=Go(_);(0,b.S6)(S,function(I){var L=I.getModel().data;Us(p,L,o,c)?I.show():I.hide()})})}},e.prototype.filterByBBox=function(){var t=this,i=this.context.view,o=pa(i);(0,b.S6)(o,function(c){var p=Is(t.context,c,10),g=Go(c);p&&(0,b.S6)(g,function(_){p.includes(_)?_.show():_.hide()})})},e.prototype.reset=function(){var t=pa(this.context.view);(0,b.S6)(t,function(i){var o=Go(i);(0,b.S6)(o,function(c){c.show()})})},e}(Pe),u5=s5,Ew=10,l5=5,c5=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.buttonGroup=null,t.buttonCfg={name:"button",text:"button",textStyle:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"},padding:[8,10],style:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},activeStyle:{fill:"#e6e6e6"}},t}return e.prototype.getButtonCfg=function(){return(0,b.b$)(this.buttonCfg,this.cfg)},e.prototype.drawButton=function(){var t=this.getButtonCfg(),i=this.context.view.foregroundGroup.addGroup({name:t.name}),o=i.addShape({type:"text",name:"button-text",attrs:(0,P.pi)({text:t.text},t.textStyle)}),c=o.getBBox(),p=ih(t.padding),g=i.addShape({type:"rect",name:"button-rect",attrs:(0,P.pi)({x:c.x-p[3],y:c.y-p[0],width:c.width+p[1]+p[3],height:c.height+p[0]+p[2]},t.style)});g.toBack(),i.on("mouseenter",function(){g.attr(t.activeStyle)}),i.on("mouseleave",function(){g.attr(t.style)}),this.buttonGroup=i},e.prototype.resetPosition=function(){var t=this.context.view,i=t.getCoordinate(),o=i.convert({x:1,y:1}),c=this.buttonGroup,p=c.getBBox(),g=no.vs(null,[["t",o.x-p.width-Ew,o.y+p.height+l5]]);c.setMatrix(g)},e.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},e.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},e.prototype.destroy=function(){var t=this.buttonGroup;t&&t.remove(),r.prototype.destroy.call(this)},e}(Pe),f5=c5,h5=4,p5=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.starting=!1,t.dragStart=!1,t}return e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},e.prototype.drag=function(){if(this.startPoint){var t=this.context.getCurrentPoint(),i=this.context.view,o=this.context.event;this.dragStart?i.emit("drag",{target:o.target,x:o.x,y:o.y}):eu(t,this.startPoint)>h5&&(i.emit("dragstart",{target:o.target,x:o.x,y:o.y}),this.dragStart=!0)}},e.prototype.end=function(){if(this.dragStart){var t=this.context.view,i=this.context.event;t.emit("dragend",{target:i.target,x:i.x,y:i.y})}this.starting=!1,this.dragStart=!1},e}(Pe),d5=p5,ww=5,v5=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.starting=!1,t.isMoving=!1,t.startPoint=null,t.startMatrix=null,t}return e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},e.prototype.move=function(){if(this.starting){var t=this.startPoint,i=this.context.getCurrentPoint(),o=eu(t,i);if(o>ww&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var c=this.context.view,p=no.vs(this.startMatrix,[["t",i.x-t.x,i.y-t.y]]);c.backgroundGroup.setMatrix(p),c.foregroundGroup.setMatrix(p),c.middleGroup.setMatrix(p)}}},e.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},e.prototype.reset=function(){this.starting=!1,this.startPoint=null,this.isMoving=!1;var t=this.context.view;t.backgroundGroup.resetMatrix(),t.foregroundGroup.resetMatrix(),t.middleGroup.resetMatrix(),this.isMoving=!1},e}(Pe),g5=v5,r1="x",Sw="y",Cw=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.dims=[r1,Sw],t.cfgFields=["dims"],t.cacheScaleDefs={},t}return e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.getScale=function(t){var i=this.context.view;return t==="x"?i.getXScale():i.getYScales()[0]},e.prototype.resetDim=function(t){var i=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var o=this.getScale(t);i.scale(o.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},e.prototype.reset=function(){this.resetDim(r1),this.resetDim(Sw);var t=this.context.view;t.render(!0)},e}(Pe),mx=Cw,m5=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.startPoint=null,t.starting=!1,t.startCache={},t}return e.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0;var i=this.dims;(0,b.S6)(i,function(o){var c=t.getScale(o),p=c.min,g=c.max,_=c.values;t.startCache[o]={min:p,max:g,values:_}})},e.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},e.prototype.translate=function(){var t=this;if(this.starting){var i=this.startPoint,o=this.context.view.getCoordinate(),c=this.context.getCurrentPoint(),p=o.invert(i),g=o.invert(c),_=g.x-p.x,S=g.y-p.y,I=this.context.view,L=this.dims;(0,b.S6)(L,function(F){t.translateDim(F,{x:_*-1,y:S*-1})}),I.render(!0)}},e.prototype.translateDim=function(t,i){if(this.hasDim(t)){var o=this.getScale(t);o.isLinear&&this.translateLinear(t,o,i)}},e.prototype.translateLinear=function(t,i,o){var c=this.context.view,p=this.startCache[t],g=p.min,_=p.max,S=_-g,I=o[t]*S;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:i.nice,min:g,max:_}),c.scale(i.field,{nice:!1,min:g+I,max:_+I})},e.prototype.reset=function(){r.prototype.reset.call(this),this.startPoint=null,this.starting=!1},e}(mx),WO=m5,y5=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.zoomRatio=.05,t}return e.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},e.prototype.zoom=function(t){var i=this,o=this.dims;(0,b.S6)(o,function(c){i.zoomDim(c,t)}),this.context.view.render(!0)},e.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},e.prototype.zoomDim=function(t,i){if(this.hasDim(t)){var o=this.getScale(t);o.isLinear&&this.zoomLinear(t,o,i)}},e.prototype.zoomLinear=function(t,i,o){var c=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:i.nice,min:i.min,max:i.max});var p=this.cacheScaleDefs[t],g=p.max-p.min,_=i.min,S=i.max,I=o*g,L=_-I,F=S+I,z=F-L,V=z/g;F>L&&V<100&&V>.01&&c.scale(i.field,{nice:!1,min:_-I,max:S+I})},e}(mx),_5=y5;function x5(r){var e=r.gEvent.originalEvent;return e.deltaY>0}var b5=1,E5=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.scroll=function(t){var i=this.context,o=i.view,c=i.event;if(o.getOptions().scrollbar){var p=(t==null?void 0:t.wheelDelta)||b5,g=o.getController("scrollbar"),_=o.getXScale(),S=o.getOptions().data,I=(0,b.dp)((0,b.I)(S,_.field)),L=(0,b.dp)(_.values),F=g.getValue(),z=Math.floor((I-L)*F),V=z+(x5(c)?p:-p),Q=p/(I-L)/1e4,st=(0,b.uZ)(V/(I-L)+Q,0,1);g.setValue(st)}},e}(Pe),Aw=E5,w5="aixs-description-tooltip",S5=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.show=function(){var t=this.context,i=pi(t).axis,o=i.cfg.title,c=o.description,p=o.text,g=o.descriptionTooltipStyle,_=t.event,S=_.x,I=_.y;this.tooltip||this.renderTooltip(),this.tooltip.update({title:p||"",customContent:function(){return`
|
|
<div class="`.concat(Js,'" style={').concat(g,`}>
|
|
<div class="`).concat(Rl,`">
|
|
\u5B57\u6BB5\u8BF4\u660E\uFF1A`).concat(c,`
|
|
</div>
|
|
</div>
|
|
`)},x:S,y:I}),this.tooltip.show()},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.hide=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,i=this.context.view,o=i.canvas,c={start:{x:0,y:0},end:{x:o.get("width"),y:o.get("height")}},p=new Bl({parent:o.get("el").parentNode,region:c,visible:!1,containerId:w5,domStyles:(0,P.pi)({},(0,b.b$)({},(t={},t[Js]={"max-width":"50%",padding:"10px","line-height":"15px","font-size":"12px",color:"rgba(0, 0, 0, .65)"},t[Rl]={"word-break":"break-all","margin-bottom":"3px"},t)))});p.init(),p.setCapture(!1),this.tooltip=p},e}(Pe),C5=S5;Wi("dark",tr(Dd)),ft("canvas",_e),ft("svg",ut),O("Polygon",vM),O("Interval",cM),O("Schema",mM),O("Path",M_),O("Point",cE),O("Line",lE),O("Area",rM),O("Edge",aE),O("Heatmap",aM),O("Violin",pE),Rn("base",Fo),Rn("interval",LM),Rn("pie",EE),Rn("polar",bE),na("overlap",PE),na("distribute",RM),na("fixed-overlap",LE),na("hide-overlap",GM),na("limit-in-shape",ME),na("limit-in-canvas",BM),na("limit-in-plot",kO),na("pie-outer",CE),na("adjust-color",EO),na("interval-adjust-position",SO),na("interval-hide-overlap",YM),na("point-adjust-position",GE),na("pie-spider",TE),na("path-adjust-position",IO),er("fade-in",LO),er("fade-out",dp),er("grow-in-x",ea),er("grow-in-xy",G_),er("grow-in-y",vp),er("scale-in-x",KM),er("scale-in-y",QM),er("wave-in",t3),er("zoom-in",PO),er("zoom-out",e3),er("position-update",zy),er("sector-path-update",JM),er("path-in",E0),Hp("rect",l3),Hp("mirror",s3),Hp("list",i3),Hp("matrix",YE),Hp("circle",n3),Hp("tree",f3),Mh("axis",Y_),Mh("legend",y3),Mh("tooltip",Qt),Mh("annotation",$d),Mh("slider",x3),Mh("scrollbar",w3),jr("tooltip",JE),jr("sibling-tooltip",I3),jr("ellipsis-text",L3),jr("element-active",ew),jr("element-single-active",D3),jr("element-range-active",J_),jr("element-highlight",iw),jr("element-highlight-by-x",UO),jr("element-highlight-by-color",NO),jr("element-single-highlight",aw),jr("element-range-highlight",Yy),jr("element-sibling-highlight",Yy,{effectSiblings:!0,effectByRecord:!0}),jr("element-selected",HO),jr("element-single-selected",jO),jr("element-range-selected",VO),jr("element-link-by-color",R3),jr("active-region",A3),jr("list-active",Z3),jr("list-selected",j3),jr("list-highlight",$y),jr("list-unchecked",rx),jr("list-checked",nx),jr("list-focus",lw),jr("list-radio",fw),jr("legend-item-highlight",$y,{componentNames:["legend"]}),jr("axis-label-highlight",$y,{componentNames:["axis"]}),jr("axis-description",C5),jr("rect-mask",dw),jr("x-rect-mask",ux,{dim:"x"}),jr("y-rect-mask",ux,{dim:"y"}),jr("circle-mask",ox),jr("path-mask",mw),jr("smooth-path-mask",$3),jr("rect-multi-mask",yw),jr("x-rect-multi-mask",_w,{dim:"x"}),jr("y-rect-multi-mask",_w,{dim:"y"}),jr("circle-multi-mask",t5),jr("path-multi-mask",xw),jr("smooth-path-multi-mask",bw),jr("cursor",dx),jr("data-filter",i5),jr("brush",e1),jr("brush-x",e1,{dims:["x"]}),jr("brush-y",e1,{dims:["y"]}),jr("sibling-filter",am),jr("sibling-x-filter",am),jr("sibling-y-filter",am),jr("element-filter",o5),jr("element-sibling-filter",u5),jr("element-sibling-filter-record",u5,{byRecord:!0}),jr("view-drag",d5),jr("view-move",g5),jr("scale-translate",WO),jr("scale-zoom",_5),jr("reset-button",f5,{name:"reset-button",text:"reset"}),jr("mousewheel-scroll",Aw);function ed(r){return r.isInPlot()}Ye("tooltip",{start:[{trigger:"plot:mousemove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"plot:touchmove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseleave",action:"tooltip:hide"},{trigger:"plot:leave",action:"tooltip:hide"},{trigger:"plot:touchend",action:"tooltip:hide"}]}),Ye("ellipsis-text",{start:[{trigger:"legend-item-name:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"legend-item-name:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"legend-item-name:mouseleave",action:"ellipsis-text:hide"},{trigger:"legend-item-name:touchend",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseleave",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseout",action:"ellipsis-text:hide"},{trigger:"axis-label:touchend",action:"ellipsis-text:hide"}]}),Ye("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),Ye("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),Ye("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),Ye("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),Ye("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),Ye("legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","element-active:reset"]}]}),Ye("legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","element-highlight:reset"]}]}),Ye("axis-label-highlight",{start:[{trigger:"axis-label:mouseenter",action:["axis-label-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"axis-label:mouseleave",action:["axis-label-highlight:reset","element-highlight:reset"]}]}),Ye("element-list-highlight",{start:[{trigger:"element:mouseenter",action:["list-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"element:mouseleave",action:["list-highlight:reset","element-highlight:reset"]}]}),Ye("element-range-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:function(r){return!r.isInShape("mask")},action:["rect-mask:start","rect-mask:show"]},{trigger:"mask:dragstart",action:["rect-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:drag",action:["rect-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end"]},{trigger:"mask:dragend",action:["rect-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(r){return!r.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]}),Ye("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:ed,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:ed,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:ed,action:["brush:filter","brush:end","rect-mask:end","rect-mask:hide","reset-button:show"]}],rollback:[{trigger:"reset-button:click",action:["brush:reset","reset-button:hide","cursor:crosshair"]}]}),Ye("brush-visible",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"plot:mousedown",action:["rect-mask:start","rect-mask:show"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end","rect-mask:hide","element-filter:filter","element-range-highlight:clear"]}],rollback:[{trigger:"dblclick",action:["element-filter:clear"]}]}),Ye("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:ed,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:ed,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:ed,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),Ye("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:ed,action:"path-mask:start"},{trigger:"mousedown",isEnable:ed,action:"path-mask:show"}],processing:[{trigger:"mousemove",action:"path-mask:addPoint"}],end:[{trigger:"mouseup",action:"path-mask:end"}],rollback:[{trigger:"dblclick",action:"path-mask:hide"}]}),Ye("brush-x-multi",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"mousedown",isEnable:ed,action:["x-rect-multi-mask:start","x-rect-multi-mask:show"]},{trigger:"mask:dragstart",action:["x-rect-multi-mask:moveStart"]}],processing:[{trigger:"mousemove",isEnable:function(r){return!ma(r)},action:["x-rect-multi-mask:resize"]},{trigger:"multi-mask:change",action:"element-range-highlight:highlight"},{trigger:"mask:drag",action:["x-rect-multi-mask:move"]}],end:[{trigger:"mouseup",action:["x-rect-multi-mask:end"]},{trigger:"mask:dragend",action:["x-rect-multi-mask:moveEnd"]}],rollback:[{trigger:"dblclick",action:["x-rect-multi-mask:clear","cursor:crosshair"]},{trigger:"multi-mask:clearAll",action:["element-range-highlight:clear"]},{trigger:"multi-mask:clearSingle",action:["element-range-highlight:highlight"]}]}),Ye("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),Ye("legend-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:["cursor:pointer","list-radio:show"]},{trigger:"legend-item:mouseleave",action:["cursor:default","list-radio:hide"]}],start:[{trigger:"legend-item:click",isEnable:function(r){return!r.isInShape("legend-item-radio")},action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","data-filter:filter","list-radio:show"]},{trigger:"legend-item-radio:mouseenter",action:["list-radio:showTip"]},{trigger:"legend-item-radio:mouseleave",action:["list-radio:hideTip"]},{trigger:"legend-item-radio:click",action:["list-focus:toggle","data-filter:filter","list-radio:show"]}]}),Ye("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),Ye("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),Ye("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","element-filter:filter"]}]}),Ye("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),Ye("axis-description",{start:[{trigger:"axis-description:mousemove",action:"axis-description:show"}],end:[{trigger:"axis-description:mouseleave",action:"axis-description:hide"}]});function Tw(r){return r.gEvent.preventDefault(),r.gEvent.originalEvent.deltaY>0}Ye("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(r){return Tw(r.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(r){return!Tw(r.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),Ye("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),Ye("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]});var Uf=["type","alias","tickCount","tickInterval","min","max","nice","minLimit","maxLimit","range","tickMethod","base","exponent","mask","sync"],gp;(function(r){r.ERROR="error",r.WARN="warn",r.INFO="log"})(gp||(gp={}));var Mw="AntV/G2Plot";function Iw(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var i=0;return Mw+": "+r.replace(/%s/g,function(){return""+e[i++]})}function XO(r,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];if(!r){var o=new Error(Iw.apply(void 0,__spreadArrays([e],t)));throw o.name=Mw,o}}function Qd(r,e,t){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];e||console[r](Iw.apply(void 0,(0,P.pr)([t],i)))}function ys(r,e){var t={};return r!==null&&typeof r=="object"&&e.forEach(function(i){var o=r[i];o!==void 0&&(t[i]=o)}),t}function yx(r,e){if(!r)return{};var t=r.filter(function(c){var p=(0,b.U2)(c,[e]);return(0,b.hj)(p)&&!isNaN(p)}),i=t.every(function(c){return(0,b.U2)(c,[e])>=0}),o=t.every(function(c){return(0,b.U2)(c,[e])<=0});return i?{min:0}:o?{max:0}:{}}function _x(r,e,t,i,o){if(o===void 0&&(o=[]),!Array.isArray(r))return{nodes:[],links:[]};var c=[],p={},g=-1;return r.forEach(function(_){var S=_[e],I=_[t],L=_[i],F=ys(_,o);p[S]||(p[S]=(0,P.pi)({id:++g,name:S},F)),p[I]||(p[I]=(0,P.pi)({id:++g,name:I},F)),c.push((0,P.pi)({source:p[S].id,target:p[I].id,value:L},F))}),{nodes:Object.values(p).sort(function(_,S){return _.id-S.id}),links:c}}function Dv(r,e){var t=(0,b.hX)(r,function(i){var o=i[e];return o===null||typeof o=="number"&&!isNaN(o)});return Qd(gp.WARN,t.length===r.length,"illegal data existed in chart data."),t}var A5=5,T5={}.toString,kw=function(r,e){return T5.call(r)==="[object "+e+"]"},M5=function(r){return kw(r,"Array")},I5=function(r){return typeof r=="object"&&r!==null},Lw=function(r){if(!I5(r)||!kw(r,"Object"))return!1;for(var e=r;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e},A0=function(r,e,t,i){t=t||0,i=i||A5;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var c=e[o];c?Lw(c)?(Lw(r[o])||(r[o]={}),t<i?A0(r[o],c,t+1,i):r[o]=e[o]):M5(c)?(r[o]=[],r[o]=r[o].concat(c)):r[o]=c:r[o]=c}},hn=function(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var i=0;i<e.length;i+=1)A0(r,e[i]);return r};function xx(r){if(!r)return{width:0,height:0};var e=getComputedStyle(r);return{width:(r.clientWidth||parseInt(e.width,10))-parseInt(e.paddingLeft,10)-parseInt(e.paddingRight,10),height:(r.clientHeight||parseInt(e.height,10))-parseInt(e.paddingTop,10)-parseInt(e.paddingBottom,10)}}function Za(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return function(t){return r.reduce(function(i,o){return o(i)},t)}}function Pc(r,e){return r.geometries.find(function(t){return t.type===e})}function n1(r){return(0,b.u4)(r.geometries,function(e,t){return e.concat(t.elements)},[])}function om(r){return(0,b.U2)(r,["views","length"],0)<=0?n1(r):(0,b.u4)(r.views,function(e,t){return e.concat(om(t))},n1(r))}function k5(r){return(0,b.U2)(r,["views","length"],0)<=0?r.geometries:(0,b.u4)(r.views,function(e,t){return e.concat(t.geometries)},r.geometries)}function ec(r){if(!(0,b.P9)(r,"Object"))return r;var e=(0,P.pi)({},r);return e.formatter&&!e.content&&(e.content=e.formatter),e}var T0;function Bv(){return T0||(T0=document.createElement("canvas").getContext("2d")),T0}var Pw=(0,b.HP)(function(r,e){e===void 0&&(e={});var t=e.fontSize,i=e.fontFamily,o=i===void 0?"sans-serif":i,c=e.fontWeight,p=e.fontStyle,g=e.fontVariant,_=Bv();_.font=[p,c,g,t+"px",o].join(" ");var S=_.measureText((0,b.HD)(r)?r:"");return S.width},function(r,e){return e===void 0&&(e={}),(0,P.pr)([r],(0,b.VO)(e)).join("")});function rc(r){return typeof r=="number"&&!isNaN(r)}function L5(r,e,t){var i=Math.min(e,t),o=Math.max(e,t);return r>=i&&r<=o}function mp(r){if((0,b.hj)(r))return[r,r,r,r];if((0,b.kJ)(r)){var e=r.length;if(e===1)return[r[0],r[0],r[0],r[0]];if(e===2)return[r[0],r[1],r[0],r[1]];if(e===3)return[r[0],r[1],r[2],r[1]];if(e===4)return r}return[0,0,0,0]}function sm(r,e,t){e===void 0&&(e="bottom"),t===void 0&&(t=25);var i=mp(r),o=[e.startsWith("top")?t:0,e.startsWith("right")?t:0,e.startsWith("bottom")?t:0,e.startsWith("left")?t:0];return[i[0]+o[0],i[1]+o[1],i[2]+o[2],i[3]+o[3]]}function bx(r){var e=r.map(function(i){return mp(i)}),t=[0,0,0,0];return e.length>0&&(t=t.map(function(i,o){return e.forEach(function(c,p){i+=e[p][o]}),i})),t}function Oc(r,e){var t=[];if(r.length){t.push(["M",r[0].x,r[0].y]);for(var i=1,o=r.length;i<o;i+=1){var c=r[i];t.push(["L",c.x,c.y])}e&&t.push(["Z"])}return t}var P5=function(r,e,t,i){var o=[],c,p,g=!!i,_,S;if(g){_=[1/0,1/0],S=[-1/0,-1/0];for(var I=0,L=r.length;I<L;I++){var F=r[I];_=Qi.VV([0,0],_,F),S=Qi.Fp([0,0],S,F)}_=Qi.VV([0,0],_,i[0]),S=Qi.Fp([0,0],S,i[1])}for(var I=0,z=r.length;I<z;I++){var F=r[I];if(t)c=r[I?I-1:z-1],p=r[(I+1)%z];else if(I===0||I===z-1){o.push(F);continue}else c=r[I-1],p=r[I+1];var V=[0,0];V=Qi.lu(V,p,c),V=Qi.bA(V,V,e);var Q=Qi.TE(F,c),st=Qi.TE(F,p),at=Q+st;at!==0&&(Q/=at,st/=at);var Rt=Qi.bA([0,0],V,-Q),Kt=Qi.bA([0,0],V,st),te=Qi.IH([0,0],F,Rt),Ae=Qi.IH([0,0],F,Kt);g&&(te=Qi.Fp([0,0],te,_),te=Qi.VV([0,0],te,S),Ae=Qi.Fp([0,0],Ae,_),Ae=Qi.VV([0,0],Ae,S)),o.push(te),o.push(Ae)}return t&&o.push(o.shift()),o};function O5(r,e,t){for(var i=!!e,o=[],c=0,p=r.length;c<p;c+=2)o.push([r[c],r[c+1]]);for(var g=P5(o,.4,i,t),_=o.length,S=[],I,L,F,c=0;c<_-1;c++)I=g[c*2],L=g[c*2+1],F=o[c+1],S.push(["C",I[0],I[1],L[0],L[1],F[0],F[1]]);return i&&(I=g[_],L=g[_+1],F=o[0],S.push(["C",I[0],I[1],L[0],L[1],F[0],F[1]])),S}function F5(r,e,t){var i=[],o=r[0],c=null;if(r.length<=2)return Oc(r,e);for(var p=0,g=r.length;p<g;p++){var _=r[p];(!c||!(c.x===_.x&&c.y===_.y))&&(i.push(_.x),i.push(_.y),c=_)}var S=t||[[0,0],[1,1]],I=O5(i,e,S);return I.unshift(["M",o.x,o.y]),I}function Ow(r){if(!r)return r;var e=r.match(/(([A-Z]{0,1}[a-z]*[^A-Z])|([A-Z]{1}))/g);return e.map(function(t){return t.toLowerCase()}).join("-")}function Fw(r){var e={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis",display:"flex",justifyContent:"center",alignItems:"center"},t=["stroke","lineWidth","shadowColor","strokeOpacity","shadowBlur","shadowOffsetX","shadowOffsetY","fill"];(0,b.U2)(r,"fill")&&(e.color=r.fill);var i=ys(r,t),o=i.shadowColor,c=i.shadowBlur,p=c===void 0?0:c,g=i.shadowOffsetX,_=g===void 0?0:g,S=i.shadowOffsetY,I=S===void 0?0:S;e["text-shadow"]=""+[o,_+"px",I+"px",p+"px"].join(" ");var L=ys(r,t),F=L.stroke,z=L.lineWidth,V=z===void 0?0:z;return e["-webkit-text-stroke"]=""+[V+"px",F].join(" "),(0,b.S6)(r,function(Q,st){["fontSize"].includes(st)&&(0,b.hj)(Q)?e[Ow(st)]=Q+"px":st&&!t.includes(st)&&(e[Ow(st)]=""+Q)}),e}function Rw(r,e){r.style["pointer-events"]="none",(0,b.S6)(e,function(t,i){i&&t&&(r.style[i]=t)})}var i1=function(r,e,t){var i=e.statistic,o=e.plotType,c=i.title,p=i.content;[c,p].forEach(function(g,_){if(g){var S="";_===0?S=p?"translate(-50%, -100%)":"translate(-50%, -50%)":S=c?"translate(-50%, 0)":"translate(-50%, -50%)";var I=(0,b.mf)(g.style)?g.style(t):g.style;r.annotation().html((0,P.pi)({position:["50%","50%"],html:function(L,F){var z=F.getCoordinate(),V=0;if(o==="pie"||o==="ring-progress")V=z.getRadius()*z.innerRadius*2;else if(o==="liquid"){var Q=(0,b.U2)(F.geometries,[0,"elements",0,"shape"]);if(Q){var st=Q.find(function(te){return te.get("name")==="wrap"}),at=st.getCanvasBBox().width;V=at}}else V||(V=z.getWidth());Rw(L,(0,P.pi)({width:V+"px",transform:S},Fw(I)));var Rt=F.getData();if(g.customHtml)return g.customHtml(L,F,t,Rt);var Kt=g.content;return g.formatter&&(Kt=g.formatter(t,Rt)),Kt?(0,b.HD)(Kt)?Kt:""+Kt:"<div></div>"},key:(_===0?"top":"bottom")+"-statistic"},ys(g,["offsetX","offsetY","rotate","style","formatter"])))}})},Dw=function(r,e,t){var i=e.statistic,o=i.title,c=i.content;[o,c].forEach(function(p){if(p){var g=(0,b.mf)(p.style)?p.style(t):p.style;r.annotation().html((0,P.pi)({position:["50%","100%"],html:function(_,S){var I=S.getCoordinate(),L=S.views[0].getCoordinate(),F=L.getCenter(),z=L.getRadius(),V=Math.max(Math.sin(L.startAngle),Math.sin(L.endAngle))*z,Q=F.y+V-I.y.start-parseFloat((0,b.U2)(g,"fontSize",0)),st=I.getRadius()*I.innerRadius*2;Rw(_,(0,P.pi)({width:st+"px",transform:"translate(-50%, "+Q+"px)"},Fw(g)));var at=S.getData();if(p.customHtml)return p.customHtml(_,S,t,at);var Rt=p.content;return p.formatter&&(Rt=p.formatter(t,at)),Rt?(0,b.HD)(Rt)?Rt:""+Rt:"<div></div>"}},ys(p,["offsetX","offsetY","rotate","style","formatter"])))}})};function Ex(r,e){return e?(0,b.u4)(e,function(t,i,o){return t.replace(new RegExp("{\\s*"+o+"\\s*}","g"),i)},r):r}function xo(r,e){return r.views.find(function(t){return t.id===e})}function um(r){var e=r.parent;return e?e.views:[]}function Bw(r){return um(r).filter(function(e){return e!==r})}function lm(r,e,t){t===void 0&&(t=r.geometries),typeof e=="boolean"?r.animate(e):r.animate(!0),(0,b.S6)(t,function(i){var o;(0,b.mf)(e)?o=e(i.type||i.shapeType,i)||!0:o=e,i.animate(o)})}function cm(){return typeof window=="object"?window==null?void 0:window.devicePixelRatio:2}function fm(r,e){e===void 0&&(e=r);var t=document.createElement("canvas"),i=cm();t.width=r*i,t.height=e*i,t.style.width=r+"px",t.style.height=e+"px";var o=t.getContext("2d");return o.scale(i,i),t}function a1(r,e,t,i){i===void 0&&(i=t);var o=e.backgroundColor,c=e.opacity;r.globalAlpha=c,r.fillStyle=o,r.beginPath(),r.fillRect(0,0,t,i),r.closePath()}function Nw(r,e,t){var i=r+e;return t?i*2:i}function zw(r,e){var t=e?[[r*.25,r*.25],[r*.75,r*.75]]:[[r*.5,r*.5]];return t}function o1(r,e){var t=e*Math.PI/180,i={a:Math.cos(t)*(1/r),b:Math.sin(t)*(1/r),c:-Math.sin(t)*(1/r),d:Math.cos(t)*(1/r),e:0,f:0};return i}var R5={size:6,padding:2,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0,isStagger:!0};function D5(r,e,t,i){var o=e.size,c=e.fill,p=e.lineWidth,g=e.stroke,_=e.fillOpacity;r.beginPath(),r.globalAlpha=_,r.fillStyle=c,r.strokeStyle=g,r.lineWidth=p,r.arc(t,i,o/2,0,2*Math.PI,!1),r.fill(),p&&r.stroke(),r.closePath()}function Uw(r){var e=hn({},R5,r),t=e.size,i=e.padding,o=e.isStagger,c=e.rotation,p=Nw(t,i,o),g=zw(p,o),_=fm(p,p),S=_.getContext("2d");a1(S,e,p);for(var I=0,L=g;I<L.length;I++){var F=L[I],z=F[0],V=F[1];D5(S,e,z,V)}var Q=S.createPattern(_,"repeat");if(Q){var st=cm(),at=o1(st,c);Q.setTransform(at)}return Q}var hg={rotation:45,spacing:5,opacity:1,backgroundColor:"transparent",strokeOpacity:.5,stroke:"#fff",lineWidth:2};function Zw(r,e,t){var i=e.stroke,o=e.lineWidth,c=e.strokeOpacity,p=new Path2D(t);r.globalAlpha=c,r.lineCap="square",r.strokeStyle=o?i:"transparent",r.lineWidth=o,r.stroke(p)}function Sx(r){var e=hn({},hg,r),t=e.spacing,i=e.rotation,o=e.lineWidth,c=t+o||1,p=t+o||1,g=`
|
|
M 0 0 L `+c+` 0
|
|
M 0 `+p+" L "+c+" "+p+`
|
|
`,_=fm(c,p),S=_.getContext("2d");a1(S,e,c,p),Zw(S,e,g);var I=S.createPattern(_,"repeat");if(I){var L=cm(),F=o1(L,i);I.setTransform(F)}return I}var Vw={size:6,padding:1,isStagger:!0,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0};function B5(r,e,t,i){var o=e.stroke,c=e.size,p=e.fill,g=e.lineWidth,_=e.fillOpacity;r.globalAlpha=_,r.strokeStyle=o,r.lineWidth=g,r.fillStyle=p,r.strokeRect(t-c/2,i-c/2,c,c),r.fillRect(t-c/2,i-c/2,c,c)}function N5(r){var e=hn({},Vw,r),t=e.size,i=e.padding,o=e.isStagger,c=e.rotation,p=Nw(t,i,o),g=zw(p,o),_=fm(p,p),S=_.getContext("2d");a1(S,e,p);for(var I=0,L=g;I<L.length;I++){var F=L[I],z=F[0],V=F[1];B5(S,e,z,V)}var Q=S.createPattern(_,"repeat");if(Q){var st=cm(),at=o1(st,c);Q.setTransform(at)}return Q}function Gw(r){var e=r.type,t=r.cfg,i;switch(e){case"dot":i=Uw(t);break;case"line":i=Sx(t);break;case"square":i=N5(t);break;default:break}return i}function $o(r){var e=this;return function(t){var i,o=t.options,c=t.chart,p=o.pattern;if(!p)return t;var g=function(_){for(var S,I,L,F=[],z=1;z<arguments.length;z++)F[z-1]=arguments[z];var V=c.getTheme().defaultColor,Q=V,st=(I=(S=c.geometries)===null||S===void 0?void 0:S[0])===null||I===void 0?void 0:I.getAttribute("color");if(st){var at=st.getFields()[0],Rt=(0,b.U2)(_,at);Q=hs.getMappingValue(st,Rt,((L=st.values)===null||L===void 0?void 0:L[0])||V)}var Kt=p;typeof p=="function"&&(Kt=p.call(e,_,Q)),Kt instanceof CanvasPattern||(Kt=Gw(hn({},{cfg:{backgroundColor:Q}},Kt)));var te=o[r];return(0,P.pi)((0,P.pi)({},typeof te=="function"?te.call.apply(te,(0,P.pr)([e,_],F)):te||{}),{fill:Kt||Q})};return hn({},t,{options:(i={},i[r]=g,i)})}}function Jd(r){var e=r.chart,t=r.options,i=t.legend,o=t.colorField,c=t.seriesField;return i===!1?e.legend(!1):(o||c)&&e.legend(o||c,i),r}function zl(r){var e=r.chart,t=r.options,i=t.tooltip;return i!==void 0&&e.tooltip(i),r}function fu(r){var e=r.chart,t=r.options,i=t.interactions;return(0,b.S6)(i,function(o){o.enable===!1?e.removeInteraction(o.type):e.interaction(o.type,o.cfg||{})}),r}function _s(r){var e=r.chart,t=r.options,i=t.animation;return lm(e,i),r}function qo(r){var e=r.chart,t=r.options,i=t.theme;return i&&e.theme(i),r}function M0(r){var e=r.chart,t=r.options,i=t.state;return i&&(0,b.S6)(e.geometries,function(o){o.state(i)}),r}function Nv(r){var e=r.chart,t=r.options,i=t.slider;return e.option("slider",i),r}function Hw(r){var e=r.chart,t=r.options,i=t.scrollbar;return e.option("scrollbar",i),r}function Mo(r,e){return function(t){var i=t.chart,o=t.options,c={};return(0,b.S6)(r,function(p,g){c[g]=ys(p,Uf)}),c=hn({},e,o.meta,c),i.scale(c),t}}function Es(r){return function(e){var t=e.chart,i=e.options,o=t.getController("annotation");return(0,b.S6)((0,P.pr)(i.annotations||[],r||[]),function(c){o.annotation(c)}),e}}function Fh(r){var e=r.chart,t=r.options,i=t.yAxis,o=t.limitInPlot,c=o;return(0,b.Kn)(i)&&(0,b.UM)(o)&&(Object.values(ys(i,["min","max","minLimit","maxLimit"])).some(function(p){return!(0,b.UM)(p)})?c=!0:c=!1),e.limitInPlot=c,r}function s1(r){return r===void 0&&(r="rect"),function(e){var t=e.chart,i=e.options,o=i.coordinate,c=Array.from(o||[]).map(function(p){return p.type==="reflectX"?["reflect","x"]:p.type==="reflectY"?["reflect","y"]:p.type==="transpose"?["transpose"]:null}).filter(function(p){return!!p});return c.length!==0&&t.coordinate({type:r,actions:c}),e}}var tv={locale:"en-US"};function hm(r){each(r,function(e,t){return tv[t]=e})}var pg={};function z5(r,e){pg[r]=e}function u1(r){return{get:function(e,t){return Ex((0,b.U2)(pg[r],e)||(0,b.U2)(pg[tv.locale],e)||(0,b.U2)(pg["en-US"],e)||e,t)}}}var Io={locale:"en-US",general:{increase:"Increase",decrease:"Decrease",root:"Root"},statistic:{total:"Total"},conversionTag:{label:"Rate"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"Total"}},YO={locale:"zh-CN",general:{increase:"\u589E\u52A0",decrease:"\u51CF\u5C11",root:"\u521D\u59CB"},statistic:{total:"\u603B\u8BA1"},conversionTag:{label:"\u8F6C\u5316\u7387"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"\u603B\u8BA1"}};function yp(r,e){if(r===!1)return{fields:!1};var t=(0,b.U2)(r,"fields"),i=(0,b.U2)(r,"formatter");return i&&!t&&(t=e),{fields:t,formatter:i}}function pm(r,e){var t=r.type,i=r.xField,o=r.yField,c=r.colorField,p=r.shapeField,g=r.sizeField,_=r.styleField,S=r.rawFields,I=[];if(S=((0,b.mf)(S)?S(t,e):S)||[],e==="color")I=(0,P.pr)([c||i],S);else if(e==="shape")I=(0,P.pr)([p||i],S);else if(e==="size")I=(0,P.pr)([g||i],S);else{I=(0,P.pr)([i,o,c,p,g,_],S);var L=["x","y","color","shape","size","style"].indexOf(e),F=I[L];I.splice(L,1),I.unshift(F)}var z=(0,b.jj)(I.filter(function(Q){return!!Q})),V=t==="line"&&[i,o].includes(z.join("*"))?"":z.join("*");return{mappingFields:z,tileMappingField:V}}function dg(r,e){if(e)return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var o={};return r.forEach(function(c,p){o[c]=t[p]}),delete o.undefined,e(o)}}function Bu(r){var e=r.chart,t=r.options,i=t.type,o=t.args,c=t.mapping,p=t.xField,g=t.yField,_=t.colorField,S=t.shapeField,I=t.sizeField,L=t.tooltipFields,F=t.label,z=t.state,V=t.customInfo;if(!c)return r;var Q=c.color,st=c.shape,at=c.size,Rt=c.style,Kt=c.tooltip,te=e[i](o).position(p+"*"+g);if((0,b.HD)(Q))_?te.color(_,Q):te.color(Q);else if((0,b.mf)(Q)){var Ae=pm(t,"color"),hr=Ae.mappingFields,Tr=Ae.tileMappingField;te.color(Tr,dg(hr,Q))}else _&&te.color(_,Q);if((0,b.HD)(st))S?te.shape(S,[st]):te.shape(st);else if((0,b.mf)(st)){var Dr=pm(t,"shape"),hr=Dr.mappingFields,Tr=Dr.tileMappingField;te.shape(Tr,dg(hr,st))}else S&&te.shape(S,st);if((0,b.hj)(at))I?te.size(I,at):te.size(at);else if((0,b.mf)(at)){var cn=pm(t,"size"),hr=cn.mappingFields,Tr=cn.tileMappingField;te.size(Tr,dg(hr,at))}else I&&te.size(I,at);if((0,b.mf)(Rt)){var Qr=pm(t,"style"),hr=Qr.mappingFields,Tr=Qr.tileMappingField;te.style(Tr,dg(hr,Rt))}else(0,b.Kn)(Rt)&&te.style(Rt);if(L===!1?te.tooltip(!1):(0,b.xb)(L)||te.tooltip(L.join("*"),dg(L,Kt)),F===!1)te.label(!1);else if(F){var Tn=F.callback,xi=F.fields,va=(0,P._T)(F,["callback","fields"]);te.label({fields:xi||[g],callback:Tn,cfg:ec(va)})}return z&&te.state(z),V&&te.customInfo(V),[p,g].filter(function(Aa){return Aa!==_}).forEach(function(Aa){e.legend(Aa,!1)}),(0,P.pi)((0,P.pi)({},r),{ext:{geometry:te}})}function rd(r){var e=r.options,t=e.area,i=e.xField,o=e.yField,c=e.seriesField,p=e.smooth,g=e.tooltip,_=e.useDeferredLabel,S=yp(g,[i,o,c]),I=S.fields,L=S.formatter;return t?Bu(hn({},r,{options:{type:"area",colorField:c,tooltipFields:I,mapping:(0,P.pi)({shape:p?"smooth":"area",tooltip:L},t),args:{useDeferredLabel:_}}})):r}function zv(r){var e=r.options,t=e.edge,i=e.xField,o=e.yField,c=e.seriesField,p=e.tooltip,g=e.useDeferredLabel,_=yp(p,[i,o,c]),S=_.fields,I=_.formatter;return t?Bu(hn({},r,{options:{type:"edge",colorField:c,tooltipFields:S,mapping:(0,P.pi)({tooltip:I},t),args:{useDeferredLabel:g}}})):r}function dm(r){var e=r.chart,t=r.options,i=r.ext,o=t.seriesField,c=t.isGroup,p=t.isStack,g=t.marginRatio,_=t.widthRatio,S=t.groupField,I=t.theme,L=[];if(o&&(c&&L.push({type:"dodge",dodgeBy:S||o,marginRatio:g}),p&&L.push({type:"stack",marginRatio:g})),L.length&&(i!=null&&i.geometry)){var F=i==null?void 0:i.geometry;F.adjust(L)}return(0,b.UM)(_)||e.theme(hn({},(0,b.Kn)(I)?I:Zi(I),{columnWidthRatio:_})),r}function pc(r){var e=r.options,t=e.xField,i=e.yField,o=e.interval,c=e.seriesField,p=e.tooltip,g=e.minColumnWidth,_=e.maxColumnWidth,S=e.columnBackground,I=e.dodgePadding,L=e.intervalPadding,F=e.useDeferredLabel,z=yp(p,[t,i,c]),V=z.fields,Q=z.formatter,st=(o?Bu(hn({},r,{options:{type:"interval",colorField:c,tooltipFields:V,mapping:(0,P.pi)({tooltip:Q},o),args:{dodgePadding:I,intervalPadding:L,minColumnWidth:g,maxColumnWidth:_,background:S,useDeferredLabel:F}}})):r).ext;return dm((0,P.pi)((0,P.pi)({},r),{ext:st}))}function I0(r){var e=r.options,t=e.line,i=e.stepType,o=e.xField,c=e.yField,p=e.seriesField,g=e.smooth,_=e.connectNulls,S=e.tooltip,I=e.useDeferredLabel,L=yp(S,[o,c,p]),F=L.fields,z=L.formatter;return t?Bu(hn({},r,{options:{type:"line",colorField:p,tooltipFields:F,mapping:(0,b.b$)({shape:i||(g?"smooth":"line"),tooltip:z},t),args:{connectNulls:_,useDeferredLabel:I}}})):r}function Zf(r){var e=r.options,t=e.point,i=e.xField,o=e.yField,c=e.seriesField,p=e.sizeField,g=e.shapeField,_=e.tooltip,S=e.useDeferredLabel,I=yp(_,[i,o,c,p,g]),L=I.fields,F=I.formatter;return t?Bu(hn({},r,{options:{type:"point",colorField:c,shapeField:g,tooltipFields:L,mapping:(0,P.pi)({tooltip:F},t),args:{useDeferredLabel:S}}})):r}function vm(r){var e=r.options,t=e.polygon,i=e.xField,o=e.yField,c=e.seriesField,p=e.tooltip,g=e.useDeferredLabel,_=yp(p,[i,o,c]),S=_.fields,I=_.formatter;return t?Bu(hn({},r,{options:{type:"polygon",colorField:c,tooltipFields:S,mapping:(0,P.pi)({tooltip:I},t),args:{useDeferredLabel:g}}})):r}function l1(r){var e=r.options,t=e.schema,i=e.xField,o=e.yField,c=e.seriesField,p=e.tooltip,g=e.useDeferredLabel,_=yp(p,[i,o,c]),S=_.fields,I=_.formatter;return t?Bu(hn({},r,{options:{type:"schema",colorField:c,tooltipFields:S,mapping:(0,P.pi)({tooltip:I},t),args:{useDeferredLabel:g}}})):r}function Cx(r){var e=r.options,t=e.violin,i=e.xField,o=e.yField,c=e.seriesField,p=e.sizeField,g=e.tooltip,_=yp(g,[i,o,c,p]),S=_.fields,I=_.formatter;return t?Bu(hn({},r,{options:{type:"violin",colorField:c,tooltipFields:S,mapping:(0,P.pi)({tooltip:I},t)}})):r}var c1=nt(1375),gm="data-chart-source-type",Ax=["padding","appendPadding","renderer","pixelRatio","syncViewPadding","supportCSSTransform","limitInPlot"],to=function(r){(0,P.ZT)(e,r);function e(t,i){var o=r.call(this)||this;return o.container=typeof t=="string"?document.getElementById(t):t,o.options=hn({},o.getDefaultOptions(),i),o.createG2(),o.bindEvents(),o}return e.getDefaultOptions=function(){return{renderer:"canvas",xAxis:{nice:!0,label:{autoRotate:!1,autoHide:{type:"equidistance",cfg:{minGap:6}}}},yAxis:{nice:!0,label:{autoHide:!0,autoRotate:!1}},animation:!0}},e.prototype.createG2=function(){var t=this.options,i=t.width,o=t.height,c=t.defaultInteractions;this.chart=new q((0,P.pi)((0,P.pi)((0,P.pi)((0,P.pi)({container:this.container,autoFit:!1},this.getChartSize(i,o)),{localRefresh:!1}),ys(this.options,Ax)),{defaultInteractions:c})),this.container.setAttribute(gm,"G2Plot")},e.prototype.getChartSize=function(t,i){var o=xx(this.container);return{width:t||o.width||400,height:i||o.height||400}},e.prototype.bindEvents=function(){var t=this;this.chart&&this.chart.on("*",function(i){i!=null&&i.type&&t.emit(i.type,i)})},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.render=function(){this.chart.clear(),this.chart.options={data:[],animate:!0},this.chart.views=[],this.execAdaptor(),this.chart.render(),this.bindSizeSensor()},e.prototype.update=function(t){this.updateOption(t),this.render()},e.prototype.updateOption=function(t){this.options=hn({},this.options,t)},e.prototype.setState=function(t,i,o){o===void 0&&(o=!0);var c=om(this.chart);(0,b.S6)(c,function(p){i(p.getData())&&p.setState(t,o)})},e.prototype.getStates=function(){var t=om(this.chart),i=[];return(0,b.S6)(t,function(o){var c=o.getData(),p=o.getStates();(0,b.S6)(p,function(g){i.push({data:c,state:g,geometry:o.geometry,element:o})})}),i},e.prototype.changeData=function(t){this.update({data:t})},e.prototype.changeSize=function(t,i){this.chart.changeSize(t,i)},e.prototype.addAnnotations=function(t,i){i=i||this.chart;var o=(0,P.pr)(t),c=i.getController("annotation"),p=c.getComponents().map(function(S){return S.extra});c.clear(!0);for(var g=function(S){var I=p[S],L=o.findIndex(function(F){return F.id&&F.id===I.id});L!==-1&&(I=hn({},I,o[L]),o.splice(L,1)),c.annotation(I)},_=0;_<p.length;_++)g(_);o.forEach(function(S){return c.annotation(S)}),i.render(!0)},e.prototype.removeAnnotations=function(t){var i=this.chart.getController("annotation"),o=i.getComponents().map(function(g){return g.extra});i.clear(!0);for(var c=function(g){var _=o[g];t.find(function(S){return S.id&&S.id===_.id})||i.annotation(_)},p=0;p<o.length;p++)c(p);this.chart.render(!0)},e.prototype.destroy=function(){this.unbindSizeSensor(),this.chart.destroy(),this.off(),this.container.removeAttribute(gm)},e.prototype.execAdaptor=function(){var t=this.getSchemaAdaptor(),i=this.options,o=i.padding,c=i.appendPadding;this.chart.padding=o,this.chart.appendPadding=c,t({chart:this.chart,options:this.options})},e.prototype.triggerResize=function(){this.chart.forceFit()},e.prototype.bindSizeSensor=function(){var t=this;if(!this.unbind){var i=this.options.autoFit,o=i===void 0?!0:i;o&&(this.unbind=(0,c1.ak)(this.container,function(){var c=xx(t.container),p=c.width,g=c.height;(p!==t.chart.width||g!==t.chart.height)&&t.triggerResize()}))}},e.prototype.unbindSizeSensor=function(){this.unbind&&(this.unbind(),this.unbind=void 0)},e}(Be.Z);function jw(r,e,t,i){var o=(0,b.u4)(r,function(c,p){var g=p[t],_=c.has(g)?c.get(g):0,S=p[e];return _=rc(S)?_+S:_,c.set(g,_),c},new Map);return(0,b.UI)(r,function(c){var p,g=c[e],_=c[t],S=rc(g)&&o.get(_)!==0?g/o.get(_):0;return(0,P.pi)((0,P.pi)({},c),(p={},p[i]=S,p))})}function mm(r,e,t,i){var o=(0,b.u4)(r,function(c,p){var g=(0,b.u4)(t,function(I,L){return""+I+p[L]},""),_=c.has(g)?c.get(g):0,S=p[e];return _=rc(S)?_+S:_,c.set(g,_),c},new Map);return(0,b.UI)(r,function(c){var p,g=c[e],_=(0,b.u4)(t,function(I,L){return""+I+c[L]},""),S=rc(g)&&o.get(_)!==0?g/o.get(_):0;return(0,P.pi)((0,P.pi)({},c),(p={},p[i]=S,p))})}function ym(r,e,t,i,o){return o?jw(r,e,t,i):r}function $O(r){var e=r.chart,t=r.options,i=t.data,o=t.color,c=t.lineStyle,p=t.lineShape,g=t.point,_=t.area,S=t.seriesField,I=g==null?void 0:g.state,L=_==null?void 0:_.state;e.data(i);var F=hn({},r,{options:{shapeField:S,line:{color:o,style:c,shape:p},point:g&&(0,P.pi)({color:o,shape:"circle"},g),area:_&&(0,P.pi)({color:o},_),label:void 0}}),z=hn({},F,{options:{tooltip:!1,state:I}}),V=hn({},F,{options:{tooltip:!1,state:L}});return I0(F),Zf(z),rd(V),r}function _m(r){var e,t,i=r.options,o=i.xAxis,c=i.yAxis,p=i.xField,g=i.yField,_=i.data;return Za(Mo((e={},e[p]=o,e[g]=c,e),(t={},t[p]={type:"cat"},t[g]=yx(_,g),t)))(r)}function vg(r){var e=r.chart,t=r.options,i=t.reflect;if(i){var o=i;(0,b.kJ)(o)||(o=[o]);var c=o.map(function(p){return["reflect",p]});e.coordinate({type:"rect",actions:c})}return r}function Ww(r){var e=r.chart,t=r.options,i=t.xAxis,o=t.yAxis,c=t.xField,p=t.yField;return i===!1?e.axis(c,!1):e.axis(c,i),o===!1?e.axis(p,!1):e.axis(p,o),r}function Xw(r){var e=r.chart,t=r.options,i=t.legend,o=t.seriesField;return i&&o?e.legend(o,i):i===!1&&e.legend(!1),r}function Tx(r){var e=r.chart,t=r.options,i=t.label,o=t.yField,c=Pc(e,"line");if(!i)c.label(!1);else{var p=i.callback,g=(0,P._T)(i,["callback"]);c.label({fields:[o],callback:p,cfg:(0,P.pi)({layout:[{type:"limit-in-plot"},{type:"path-adjust-position"},{type:"point-adjust-position"},{type:"limit-in-plot",cfg:{action:"hide"}}]},ec(g))})}return r}function U5(r){var e=r.chart,t=r.options,i=t.isStack;return i&&(0,b.S6)(e.geometries,function(o){o.adjust("stack")}),r}function Yw(r){return Za($O,_m,U5,qo,vg,Ww,Xw,zl,Tx,Nv,Hw,fu,_s,Es(),Fh)(r)}function Z5(r){var e=r.chart,t=r.options,i=t.data,o=t.areaStyle,c=t.color,p=t.point,g=t.line,_=t.isPercent,S=t.xField,I=t.yField,L=t.tooltip,F=t.seriesField,z=t.startOnZero,V=p==null?void 0:p.state,Q=ym(i,I,S,I,_);e.data(Q);var st=_?(0,P.pi)({formatter:function(te){return{name:te[F]||te[S],value:(Number(te[I])*100).toFixed(2)+"%"}}},L):L,at=hn({},r,{options:{area:{color:c,style:o},point:p&&(0,P.pi)({color:c},p),tooltip:st,label:void 0,args:{startOnZero:z}}}),Rt={chart:e,options:hn({line:{size:2}},(0,b.CE)(t,["state"]),{line:g&&(0,P.pi)({color:c},g),sizeField:F,state:g==null?void 0:g.state,tooltip:!1,label:void 0,args:{startOnZero:z}})},Kt=hn({},at,{options:{tooltip:!1,state:V}});return rd(at),I0(Rt),Zf(Kt),r}function qO(r){var e=r.chart,t=r.options,i=t.label,o=t.yField,c=Pc(e,"area");if(!i)c.label(!1);else{var p=i.callback,g=(0,P._T)(i,["callback"]);c.label({fields:[o],callback:p,cfg:(0,P.pi)({layout:[{type:"limit-in-plot"},{type:"path-adjust-position"},{type:"point-adjust-position"},{type:"limit-in-plot",cfg:{action:"hide"}}]},ec(g))})}return r}function f1(r){var e=r.chart,t=r.options,i=t.isStack,o=t.isPercent,c=t.seriesField;return(o||i)&&c&&(0,b.S6)(e.geometries,function(p){p.adjust("stack")}),r}function xm(r){return Za(qo,$o("areaStyle"),s1("rect"),Z5,_m,f1,Ww,Xw,zl,qO,Nv,Es(),fu,_s,Fh)(r)}var KO=hn({},to.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},isStack:!0,line:{},legend:{position:"top-left",radio:{}}}),V5=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="area",t}return e.getDefaultOptions=function(){return KO},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options,o=i.isPercent,c=i.xField,p=i.yField,g=this,_=g.chart,S=g.options;_m({chart:_,options:S}),this.chart.changeData(ym(t,p,c,p,o))},e.prototype.getSchemaAdaptor=function(){return xm},e}(to),QO=10,G5=5,JO={padding:[8,10],text:"reset",textStyle:{default:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"}},buttonStyle:{default:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},active:{fill:"#e6e6e6"}}},H5=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.buttonGroup=null,t.buttonCfg=(0,P.pi)({name:"button"},JO),t}return e.prototype.getButtonCfg=function(){var t=this.context.view,i=(0,b.U2)(t,["interactions","filter-action","cfg","buttonConfig"]);return hn(this.buttonCfg,i,this.cfg)},e.prototype.drawButton=function(){var t=this.getButtonCfg(),i=this.context.view.foregroundGroup.addGroup({name:t.name}),o=this.drawText(i);this.drawBackground(i,o.getBBox()),this.buttonGroup=i},e.prototype.drawText=function(t){var i,o=this.getButtonCfg();return t.addShape({type:"text",name:"button-text",attrs:(0,P.pi)({text:o.text},(i=o.textStyle)===null||i===void 0?void 0:i.default)})},e.prototype.drawBackground=function(t,i){var o,c=this.getButtonCfg(),p=mp(c.padding),g=t.addShape({type:"rect",name:"button-rect",attrs:(0,P.pi)({x:i.x-p[3],y:i.y-p[0],width:i.width+p[1]+p[3],height:i.height+p[0]+p[2]},(o=c.buttonStyle)===null||o===void 0?void 0:o.default)});return g.toBack(),t.on("mouseenter",function(){var _;g.attr((_=c.buttonStyle)===null||_===void 0?void 0:_.active)}),t.on("mouseleave",function(){var _;g.attr((_=c.buttonStyle)===null||_===void 0?void 0:_.default)}),g},e.prototype.resetPosition=function(){var t=this.context.view,i=t.getCoordinate(),o=i.convert({x:1,y:1}),c=this.buttonGroup,p=c.getBBox(),g=hs.transform(null,[["t",o.x-p.width-QO,o.y+p.height+G5]]);c.setMatrix(g)},e.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},e.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},e.prototype.destroy=function(){var t=this.buttonGroup;t&&t.remove(),r.prototype.destroy.call(this)},e}(Pe);jr("brush-reset-button",H5,{name:"brush-reset-button"}),Ye("filter-action",{});function Rh(r){return r.isInPlot()}function gg(r,e,t){var i=t||{},o=i.mask,c=i.isStartEnable,p=e||"rect";switch(r){case"brush":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:c||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:c||Rh,action:["brush:start",p+"-mask:start",p+"-mask:show"],arg:[null,{maskStyle:o==null?void 0:o.style}]}],processing:[{trigger:"mousemove",isEnable:Rh,action:[p+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Rh,action:["brush:filter","brush:end",p+"-mask:end",p+"-mask:hide","brush-reset-button:show"]}],rollback:[{trigger:"brush-reset-button:click",action:["brush:reset","brush-reset-button:hide","cursor:crosshair"]}]};case"brush-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:c||function(){return!0}},{trigger:"plot:mousemove",action:"cursor:crosshair",isEnable:c||function(){return!0}},{trigger:"plot:mousemove",action:"cursor:default",isEnable:function(g){return c?!c(g):!1}},{trigger:"mask:mouseenter",action:"cursor:move",isEnable:c||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:c||function(g){return!g.isInShape("mask")},action:[p+"-mask:start",p+"-mask:show"],arg:[{maskStyle:o==null?void 0:o.style}]},{trigger:"mask:dragstart",action:[p+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[p+"-mask:resize"]},{trigger:"mask:drag",action:[p+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[p+"-mask:end"]},{trigger:"mask:dragend",action:[p+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(g){return!g.isInPlot()},action:["element-range-highlight:clear",p+"-mask:end",p+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",p+"-mask:hide"]}]};case"brush-x":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:c||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:c||Rh,action:["brush-x:start",p+"-mask:start",p+"-mask:show"],arg:[null,{maskStyle:o==null?void 0:o.style}]}],processing:[{trigger:"mousemove",isEnable:Rh,action:[p+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Rh,action:["brush-x:filter","brush-x:end",p+"-mask:end",p+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]};case"brush-x-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:c||function(){return!0}},{trigger:"mask:mouseenter",action:"cursor:move",isEnable:c||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:c||function(g){return!g.isInShape("mask")},action:[p+"-mask:start",p+"-mask:show"],arg:[{maskStyle:o==null?void 0:o.style}]},{trigger:"mask:dragstart",action:[p+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[p+"-mask:resize"]},{trigger:"mask:drag",action:[p+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[p+"-mask:end"]},{trigger:"mask:dragend",action:[p+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(g){return!g.isInPlot()},action:["element-range-highlight:clear",p+"-mask:end",p+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",p+"-mask:hide"]}]};case"brush-y":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:c||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:c||Rh,action:["brush-y:start",p+"-mask:start",p+"-mask:show"],arg:[null,{maskStyle:o==null?void 0:o.style}]}],processing:[{trigger:"mousemove",isEnable:Rh,action:[p+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Rh,action:["brush-y:filter","brush-y:end",p+"-mask:end",p+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-y:reset"]}]};case"brush-y-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:c||function(){return!0}},{trigger:"mask:mouseenter",action:"cursor:move",isEnable:c||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:c||function(g){return!g.isInShape("mask")},action:[p+"-mask:start",p+"-mask:show"],arg:[{maskStyle:o==null?void 0:o.style}]},{trigger:"mask:dragstart",action:[p+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[p+"-mask:resize"]},{trigger:"mask:drag",action:[p+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[p+"-mask:end"]},{trigger:"mask:dragend",action:[p+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(g){return!g.isInPlot()},action:["element-range-highlight:clear",p+"-mask:end",p+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",p+"-mask:hide"]}]};default:return{}}}Ye("brush",gg("brush")),Ye("brush-highlight",gg("brush-highlight")),Ye("brush-x",gg("brush-x","x-rect")),Ye("brush-y",gg("brush-y","y-rect")),Ye("brush-x-highlight",gg("brush-x-highlight","x-rect")),Ye("brush-y-highlight",gg("brush-y-highlight","y-rect"));var j5=["brush","brush-x","brush-y","brush-highlight","brush-x-highlight","brush-y-highlight"];function $w(r){var e=r.options,t=e.brush,i=(0,b.hX)(e.interactions||[],function(o){return j5.indexOf(o.type)===-1});return t!=null&&t.enabled&&(j5.forEach(function(o){var c=!1;switch(t.type){case"x-rect":c=o===(t.action==="highlight"?"brush-x-highlight":"brush-x");break;case"y-rect":c=o===(t.action==="highlight"?"brush-y-highlight":"brush-y");break;default:c=o===(t.action==="highlight"?"brush-highlight":"brush");break}var p={type:o,enable:c};t&&(p.cfg=gg(o,t.type,t)),i.push(p)}),(t==null?void 0:t.action)!=="highlight"&&i.push({type:"filter-action",cfg:{buttonConfig:t.button}})),hn({},r,{options:{interactions:i}})}var k0={hover:"__interval-connected-area-hover__",click:"__interval-connected-area-click__"},Mx=function(r,e){return r==="hover"?[{trigger:"interval:mouseenter",action:["element-highlight-by-color:highlight","element-link-by-color:link"],arg:[null,{style:e}]}]:[{trigger:"interval:click",action:["element-highlight-by-color:clear","element-highlight-by-color:highlight","element-link-by-color:clear","element-link-by-color:unlink","element-link-by-color:link"],arg:[null,null,null,null,{style:e}]}]};Ye(k0.hover,{start:Mx(k0.hover),end:[{trigger:"interval:mouseleave",action:["element-highlight-by-color:reset","element-link-by-color:unlink"]}]}),Ye(k0.click,{start:Mx(k0.click),end:[{trigger:"document:mousedown",action:["element-highlight-by-color:clear","element-link-by-color:clear"]}]});function W5(r){return r===void 0&&(r=!1),function(e){var t=e.chart,i=e.options,o=i.connectedArea,c=function(){t.removeInteraction(k0.hover),t.removeInteraction(k0.click)};if(!r&&o){var p=o.trigger||"hover";c(),t.interaction(k0[p],{start:Mx(p,o.style)})}else c();return e}}function qw(r,e){return!(0,b.hj)(r)||!(0,b.hj)(e)||r===0&&e===0?"-":r===e?"100%":r===0?"\u221E":(100*e/r).toFixed(2)+"%"}function X5(r,e){return hn({size:e?32:80,spacing:e?8:12,offset:e?32:0,arrow:r.arrow!==!1&&{headSize:12,style:{fill:"rgba(0, 0, 0, 0.05)"}},text:r.text!==!1&&{style:{fontSize:12,fill:"rgba(0, 0, 0, 0.85)",textAlign:"center",textBaseline:"middle"},formatter:qw}},r)}function h1(r,e){return(0,b.UI)(e.getModel().points,function(t){return r.convertPoint(t)})}function Y5(r,e,t){var i=r.view,o=r.geometry,c=r.group,p=r.options,g=r.horizontal,_=p.offset,S=p.size,I=p.arrow,L=i.getCoordinate(),F=h1(L,e)[3],z=h1(L,t)[0],V=z.y-F.y,Q=z.x-F.x;if(typeof I!="boolean"){var st=I.headSize,at=p.spacing,Rt;g?(Q-st)/2<at?(at=Math.max(1,(Q-st)/2),Rt=[[F.x+at,F.y-_],[F.x+at,F.y-_-S],[z.x-at,z.y-_-S/2]]):Rt=[[F.x+at,F.y-_],[F.x+at,F.y-_-S],[z.x-at-st,z.y-_-S],[z.x-at,z.y-_-S/2],[z.x-at-st,z.y-_]]:(V-st)/2<at?(at=Math.max(1,(V-st)/2),Rt=[[F.x+_,F.y+at],[F.x+_+S,F.y+at],[z.x+_+S/2,z.y-at]]):Rt=[[F.x+_,F.y+at],[F.x+_+S,F.y+at],[z.x+_+S,z.y-at-st],[z.x+_+S/2,z.y-at],[z.x+_,z.y-at-st]],c.addShape("polygon",{id:i.id+"-conversion-tag-arrow-"+o.getElementId(e.getModel().mappingData),name:"conversion-tag-arrow",origin:{element:e,nextElement:t},attrs:(0,P.pi)((0,P.pi)({},I.style||{}),{points:Rt})})}}function $5(r,e,t){var i,o,c,p=r.view,g=r.geometry,_=r.group,S=r.options,I=r.field,L=r.horizontal,F=S.offset,z=S.size;if(typeof S.text!="boolean"){var V=p.getCoordinate(),Q=((i=S.text)===null||i===void 0?void 0:i.formatter)&&((o=S.text)===null||o===void 0?void 0:o.formatter(e.getData()[I],t.getData()[I])),st=h1(V,e)[L?3:0],at=h1(V,t)[L?0:3],Rt=_.addShape("text",{id:p.id+"-conversion-tag-text-"+g.getElementId(e.getModel().mappingData),name:"conversion-tag-text",origin:{element:e,nextElement:t},attrs:(0,P.pi)((0,P.pi)({},((c=S.text)===null||c===void 0?void 0:c.style)||{}),{text:Q,x:L?(st.x+at.x)/2:st.x+F+z/2,y:L?st.y-F-z/2:(st.y+at.y)/2})});if(L){var Kt=at.x-st.x,te=Rt.getBBox().width;if(te>Kt){var Ae=te/Q.length,hr=Math.max(1,Math.ceil(Kt/Ae)-1),Tr=Q.slice(0,hr)+"...";Rt.attr("text",Tr)}}}}function q5(r,e,t){Y5(r,e,t),$5(r,e,t)}function K5(r,e,t){return e===void 0&&(e=!0),t===void 0&&(t=!1),function(i){var o=i.options,c=i.chart,p=o.conversionTag,g=o.theme;return p&&!t&&(c.theme(hn({},(0,b.Kn)(g)?g:Zi(g),{columnWidthRatio:1/3})),c.annotation().shape({render:function(_,S){var I=_.addGroup({id:c.id+"-conversion-tag-group",name:"conversion-tag-group"}),L=(0,b.sE)(c.geometries,function(V){return V.type==="interval"}),F={view:S,geometry:L,group:I,field:r,horizontal:e,options:X5(p,e)},z=L.elements;(0,b.S6)(z,function(V,Q){Q>0&&q5(F,z[Q-1],V)})}})),i}}function Q5(r){var e=r.options,t=e.legend,i=e.seriesField,o=e.isStack;return i?t!==!1&&(t=(0,P.pi)({position:o?"right-top":"top-left"},t)):t=!1,r.options.legend=t,r}function J5(r){var e=r.chart,t=r.options,i=t.data,o=t.columnStyle,c=t.color,p=t.columnWidthRatio,g=t.isPercent,_=t.isGroup,S=t.isStack,I=t.xField,L=t.yField,F=t.seriesField,z=t.groupField,V=t.tooltip,Q=t.shape,st=g&&_&&S?mm(i,L,[I,z],L):ym(i,L,I,L,g),at=[];S&&F&&!_?st.forEach(function(te){var Ae=at.find(function(hr){return hr[I]===te[I]&&hr[F]===te[F]});Ae?Ae[L]+=te[L]||0:at.push((0,P.pi)({},te))}):at=st,e.data(at);var Rt=g?(0,P.pi)({formatter:function(te){return{name:_&&S?te[F]+" - "+te[z]:te[F]||te[I],value:(Number(te[L])*100).toFixed(2)+"%"}}},V):V,Kt=hn({},r,{options:{data:at,widthRatio:p,tooltip:Rt,interval:{shape:Q,style:o,color:c}}});return pc(Kt),Kt}function Ix(r){var e,t,i=r.options,o=i.xAxis,c=i.yAxis,p=i.xField,g=i.yField,_=i.data,S=i.isPercent,I=S?{max:1,min:0,minLimit:0,maxLimit:1}:{};return Za(Mo((e={},e[p]=o,e[g]=c,e),(t={},t[p]={type:"cat"},t[g]=(0,P.pi)((0,P.pi)({},yx(_,g)),I),t)))(r)}function tI(r){var e=r.chart,t=r.options,i=t.xAxis,o=t.yAxis,c=t.xField,p=t.yField;return i===!1?e.axis(c,!1):e.axis(c,i),o===!1?e.axis(p,!1):e.axis(p,o),r}function eI(r){var e=r.chart,t=r.options,i=t.legend,o=t.seriesField;return i&&o?e.legend(o,i):i===!1&&e.legend(!1),r}function rI(r){var e=r.chart,t=r.options,i=t.label,o=t.yField,c=t.isRange,p=Pc(e,"interval");if(!i)p.label(!1);else{var g=i.callback,_=(0,P._T)(i,["callback"]);p.label({fields:[o],callback:g,cfg:(0,P.pi)({layout:_!=null&&_.position?void 0:[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}]},ec(c?(0,P.pi)({content:function(S){var I;return(I=S[o])===null||I===void 0?void 0:I.join("-")}},_):_))})}return r}function nI(r){var e=r.chart,t=r.options,i=t.tooltip,o=t.isGroup,c=t.isStack,p=t.groupField,g=t.data,_=t.xField,S=t.yField,I=t.seriesField;if(i===!1)e.tooltip(!1);else{var L=i;if(o&&c){var F=L.customItems,z=(L==null?void 0:L.formatter)||function(V){return{name:V[I]+" - "+V[p],value:V[S]}};L=(0,P.pi)((0,P.pi)({},L),{customItems:function(V){var Q=[];return(0,b.S6)(V,function(st){var at=(0,b.hX)(g,function(Rt){return(0,b.BD)(Rt,ys(st.data,[_,I]))});at.forEach(function(Rt){Q.push((0,P.pi)((0,P.pi)((0,P.pi)({},st),{value:Rt[S],data:Rt,mappingData:{_origin:Rt}}),z(Rt)))})}),F?F(Q):Q}})}e.tooltip(L)}return r}function p1(r,e){e===void 0&&(e=!1);var t=r.options,i=t.seriesField;return Za(Q5,qo,$o("columnStyle"),M0,s1("rect"),J5,Ix,tI,eI,nI,Nv,Hw,rI,$w,fu,_s,Es(),K5(t.yField,!e,!!i),W5(!t.isStack),Fh)(r)}function iI(r){var e=r.options,t=e.xField,i=e.yField,o=e.xAxis,c=e.yAxis,p={left:"bottom",right:"top",top:"left",bottom:"right"},g=c!==!1?(0,P.pi)({position:p[(c==null?void 0:c.position)||"left"]},c):!1,_=o!==!1?(0,P.pi)({position:p[(o==null?void 0:o.position)||"bottom"]},o):!1;return(0,P.pi)((0,P.pi)({},r),{options:(0,P.pi)((0,P.pi)({},e),{xField:i,yField:t,xAxis:g,yAxis:_})})}function aI(r){var e=r.options,t=e.label;return t&&!t.position&&(t.position="left",t.layout||(t.layout=[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}])),hn({},r,{options:{label:t}})}function oI(r){var e=r.options,t=e.seriesField,i=e.isStack,o=e.legend;return t?o!==!1&&(o=(0,P.pi)({position:i?"top-left":"right-top"},o||{})):o=!1,hn({},r,{options:{legend:o}})}function sI(r){var e=r.options,t=[{type:"transpose"},{type:"reflectY"}].concat(e.coordinate||[]);return hn({},r,{options:{coordinate:t}})}function uI(r){var e=r.chart,t=r.options,i=t.barStyle,o=t.barWidthRatio,c=t.minBarWidth,p=t.maxBarWidth,g=t.barBackground;return p1({chart:e,options:(0,P.pi)((0,P.pi)({},t),{columnStyle:i,columnWidthRatio:o,minColumnWidth:c,maxColumnWidth:p,columnBackground:g})},!0)}function Kw(r){return Za(iI,aI,oI,zl,sI,uI)(r)}var lI=hn({},to.getDefaultOptions(),{barWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),Qw=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="bar",t}return e.getDefaultOptions=function(){return lI},e.prototype.changeData=function(t){var i,o;this.updateOption({data:t});var c=this,p=c.chart,g=c.options,_=g.isPercent,S=g.xField,I=g.yField,L=g.xAxis,F=g.yAxis;i=[I,S],S=i[0],I=i[1],o=[F,L],L=o[0],F=o[1];var z=(0,P.pi)((0,P.pi)({},g),{xField:S,yField:I,yAxis:F,xAxis:L});Ix({chart:p,options:z}),p.changeData(ym(t,S,I,S,_))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Kw},e}(to),cI=hn({},to.getDefaultOptions(),{columnWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),Jw=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="column",t}return e.getDefaultOptions=function(){return cI},e.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options,o=i.yField,c=i.xField,p=i.isPercent,g=this,_=g.chart,S=g.options;Ix({chart:_,options:S}),this.chart.changeData(ym(t,o,c,o,p))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return p1},e}(to),kx,Uv="$$percentage$$",Zv="$$mappingValue$$",ev="$$conversion$$",Lx="$$totalPercentage$$",bm="$$x$$",Em="$$y$$",fI={appendPadding:[0,80],minSize:0,maxSize:1,meta:(kx={},kx[Zv]={min:0,max:1,nice:!1},kx),label:{style:{fill:"#fff",fontSize:12}},tooltip:{showTitle:!1,showMarkers:!1,shared:!1},conversionTag:{offsetX:10,offsetY:0,style:{fontSize:12,fill:"rgba(0,0,0,0.45)"}}},Px="CONVERSION_TAG_NAME";function Vv(r,e,t){var i=[],o=t.yField,c=t.maxSize,p=t.minSize,g=(0,b.U2)((0,b.UT)(e,o),[o]),_=(0,b.hj)(c)?c:1,S=(0,b.hj)(p)?p:0;return i=(0,b.UI)(r,function(I,L){var F=(I[o]||0)/g;return I[Uv]=F,I[Zv]=(_-S)*F+S,I[ev]=[(0,b.U2)(r,[L-1,o]),I[o]],I}),i}function wm(r){return function(e){var t=e.chart,i=e.options,o=i.conversionTag,c=i.filteredData,p=c||t.getOptions().data;if(o){var g=o.formatter;p.forEach(function(_,S){if(!(S<=0||Number.isNaN(_[Zv]))){var I=r(_,S,p,{top:!0,name:Px,text:{content:(0,b.mf)(g)?g(_,p):g,offsetX:o.offsetX,offsetY:o.offsetY,position:"end",autoRotate:!1,style:(0,P.pi)({textAlign:"start",textBaseline:"middle"},o.style)}});t.annotation().line(I)}})}return e}}function Sm(r){var e=r.chart,t=r.options,i=t.data,o=i===void 0?[]:i,c=t.yField,p=t.maxSize,g=t.minSize,_=Vv(o,o,{yField:c,maxSize:p,minSize:g});return e.data(_),r}function tS(r){var e=r.chart,t=r.options,i=t.xField,o=t.yField,c=t.color,p=t.tooltip,g=t.label,_=t.shape,S=_===void 0?"funnel":_,I=t.funnelStyle,L=t.state,F=yp(p,[i,o]),z=F.fields,V=F.formatter;Bu({chart:e,options:{type:"interval",xField:i,yField:Zv,colorField:i,tooltipFields:(0,b.kJ)(z)&&z.concat([Uv,ev]),mapping:{shape:S,tooltip:V,color:c,style:I},label:g,state:L}});var Q=Pc(r.chart,"interval");return Q.adjust("symmetric"),r}function hI(r){var e=r.chart,t=r.options,i=t.isTransposed;return e.coordinate({type:"rect",actions:i?[]:[["transpose"],["scale",1,-1]]}),r}function eS(r){var e=r.options,t=r.chart,i=e.maxSize,o=(0,b.U2)(t,["geometries","0","dataArray"],[]),c=(0,b.U2)(t,["options","data","length"]),p=(0,b.UI)(o,function(_){return(0,b.U2)(_,["0","nextPoints","0","x"])*c-.5}),g=function(_,S,I,L){var F=i-(i-_[Zv])/2;return(0,P.pi)((0,P.pi)({},L),{start:[p[S-1]||S-.5,F],end:[p[S-1]||S-.5,F+.05]})};return wm(g)(r),r}function rS(r){return Za(Sm,tS,hI,eS)(r)}function pI(r){var e,t=r.chart,i=r.options,o=i.data,c=o===void 0?[]:o,p=i.yField;return t.data(c),t.scale((e={},e[p]={sync:!0},e)),r}function dI(r){var e=r.chart,t=r.options,i=t.data,o=t.xField,c=t.yField,p=t.color,g=t.compareField,_=t.isTransposed,S=t.tooltip,I=t.maxSize,L=t.minSize,F=t.label,z=t.funnelStyle,V=t.state,Q=t.showFacetTitle;return e.facet("mirror",{fields:[g],transpose:!_,padding:_?0:[32,0,0,0],showTitle:Q,eachView:function(st,at){var Rt=_?at.rowIndex:at.columnIndex;_||st.coordinate({type:"rect",actions:[["transpose"],["scale",Rt===0?-1:1,-1]]});var Kt=Vv(at.data,i,{yField:c,maxSize:I,minSize:L});st.data(Kt);var te=yp(S,[o,c,g]),Ae=te.fields,hr=te.formatter,Tr=_?{offset:Rt===0?10:-23,position:Rt===0?"bottom":"top"}:{offset:10,position:"left",style:{textAlign:Rt===0?"end":"start"}};Bu({chart:st,options:{type:"interval",xField:o,yField:Zv,colorField:o,tooltipFields:(0,b.kJ)(Ae)&&Ae.concat([Uv,ev]),mapping:{shape:"funnel",tooltip:hr,color:p,style:z},label:F===!1?!1:hn({},Tr,F),state:V}})}}),r}function Ox(r){var e=r.chart,t=r.index,i=r.options,o=i.conversionTag,c=i.isTransposed;((0,b.hj)(t)?[e]:e.views).forEach(function(p,g){var _=(0,b.U2)(p,["geometries","0","dataArray"],[]),S=(0,b.U2)(p,["options","data","length"]),I=(0,b.UI)(_,function(F){return(0,b.U2)(F,["0","nextPoints","0","x"])*S-.5}),L=function(F,z,V,Q){var st=(t||g)===0?-1:1;return hn({},Q,{start:[I[z-1]||z-.5,F[Zv]],end:[I[z-1]||z-.5,F[Zv]+.05],text:c?{style:{textAlign:"start"}}:{offsetX:o!==!1?st*o.offsetX:0,style:{textAlign:(t||g)===0?"end":"start"}}})};wm(L)(hn({},{chart:p,options:i}))})}function vI(r){var e=r.chart;return e.once("beforepaint",function(){return Ox(r)}),r}function gI(r){return Za(pI,dI,vI)(r)}function nS(r){var e=r.chart,t=r.options,i=t.data,o=i===void 0?[]:i,c=t.yField,p=(0,b.u4)(o,function(S,I){return S+(I[c]||0)},0),g=(0,b.UT)(o,c)[c],_=(0,b.UI)(o,function(S,I){var L=[],F=[];if(S[Lx]=(S[c]||0)/p,I){var z=o[I-1][bm],V=o[I-1][Em];L[0]=z[3],F[0]=V[3],L[1]=z[2],F[1]=V[2]}else L[0]=-.5,F[0]=1,L[1]=.5,F[1]=1;return F[2]=F[1]-S[Lx],L[2]=(F[2]+1)/4,F[3]=F[2],L[3]=-L[2],S[bm]=L,S[Em]=F,S[Uv]=(S[c]||0)/g,S[ev]=[(0,b.U2)(o,[I-1,c]),S[c]],S});return e.data(_),r}function mI(r){var e=r.chart,t=r.options,i=t.xField,o=t.yField,c=t.color,p=t.tooltip,g=t.label,_=t.funnelStyle,S=t.state,I=yp(p,[i,o]),L=I.fields,F=I.formatter;return Bu({chart:e,options:{type:"polygon",xField:bm,yField:Em,colorField:i,tooltipFields:(0,b.kJ)(L)&&L.concat([Uv,ev]),label:g,state:S,mapping:{tooltip:F,color:c,style:_}}}),r}function yI(r){var e=r.chart,t=r.options,i=t.isTransposed;return e.coordinate({type:"rect",actions:i?[["transpose"],["reflect","x"]]:[]}),r}function _I(r){var e=function(t,i,o,c){return(0,P.pi)((0,P.pi)({},c),{start:[t[bm][1],t[Em][1]],end:[t[bm][1]+.05,t[Em][1]]})};return wm(e)(r),r}function xI(r){return Za(nS,mI,yI,_I)(r)}function bI(r){var e,t=r.chart,i=r.options,o=i.data,c=o===void 0?[]:o,p=i.yField;return t.data(c),t.scale((e={},e[p]={sync:!0},e)),r}function EI(r){var e=r.chart,t=r.options,i=t.seriesField,o=t.isTransposed,c=t.showFacetTitle;return e.facet("rect",{fields:[i],padding:[o?0:32,10,0,10],showTitle:c,eachView:function(p,g){rS(hn({},r,{chart:p,options:{data:g.data}}))}}),r}function wI(r){return Za(bI,EI)(r)}var SI=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.rendering=!1,t}return e.prototype.change=function(t){var i=this;if(!this.rendering){var o=t.seriesField,c=t.compareField,p=c?Ox:eS,g=this.context.view,_=o||c?g.views:[g];(0,b.UI)(_,function(S,I){var L=S.getController("annotation"),F=(0,b.hX)((0,b.U2)(L,["option"],[]),function(V){var Q=V.name;return Q!==Px});L.clear(!0),(0,b.S6)(F,function(V){typeof V=="object"&&S.annotation()[V.type](V)});var z=(0,b.U2)(S,["filteredData"],S.getOptions().data);p({chart:S,index:I,options:(0,P.pi)((0,P.pi)({},t),{filteredData:Vv(z,z,t)})}),S.filterData(z),i.rendering=!0,S.render(!0)})}this.rendering=!1},e}(Pe),iS="funnel-conversion-tag",d1="funnel-afterrender",aS={trigger:"afterrender",action:iS+":change"};jr(iS,SI),Ye(d1,{start:[aS]});function CI(r){var e=r.options,t=e.compareField,i=e.xField,o=e.yField,c=e.locale,p=e.funnelStyle,g=e.data,_=u1(c),S={label:t?{fields:[i,o,t,Uv,ev],formatter:function(L){return""+L[o]}}:{fields:[i,o,Uv,ev],offset:0,position:"middle",formatter:function(L){return L[i]+" "+L[o]}},tooltip:{title:i,formatter:function(L){return{name:L[i],value:L[o]}}},conversionTag:{formatter:function(L){return _.get(["conversionTag","label"])+": "+qw.apply(void 0,L[ev])}}},I;return(t||p)&&(I=function(L){return hn({},t&&{lineWidth:1,stroke:"#fff"},(0,b.mf)(p)?p(L):p)}),hn({options:S},r,{options:{funnelStyle:I,data:(0,b.d9)(g)}})}function AI(r){var e=r.options,t=e.compareField,i=e.dynamicHeight,o=e.seriesField;return o?wI(r):t?gI(r):i?xI(r):rS(r)}function TI(r){var e,t=r.options,i=t.xAxis,o=t.yAxis,c=t.xField,p=t.yField;return Za(Mo((e={},e[c]=i,e[p]=o,e)))(r)}function MI(r){var e=r.chart;return e.axis(!1),r}function II(r){var e=r.chart,t=r.options,i=t.legend;return i===!1?e.legend(!1):e.legend(i),r}function kI(r){var e=r.chart,t=r.options,i=t.interactions,o=t.dynamicHeight;return(0,b.S6)(i,function(c){c.enable===!1?e.removeInteraction(c.type):e.interaction(c.type,c.cfg||{})}),o?e.removeInteraction(d1):e.interaction(d1,{start:[(0,P.pi)((0,P.pi)({},aS),{arg:t})]}),r}function oS(r){return Za(CI,AI,TI,MI,zl,kI,II,_s,qo,Es())(r)}var LI=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="funnel",t}return e.getDefaultOptions=function(){return fI},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return oS},e.prototype.setState=function(t,i,o){o===void 0&&(o=!0);var c=om(this.chart);(0,b.S6)(c,function(p){i(p.getData())&&p.setState(t,o)})},e.prototype.getStates=function(){var t=om(this.chart),i=[];return(0,b.S6)(t,function(o){var c=o.getData(),p=o.getStates();(0,b.S6)(p,function(g){i.push({data:c,state:g,geometry:o.geometry,element:o})})}),i},e.CONVERSATION_FIELD=ev,e.PERCENT_FIELD=Uv,e.TOTAL_PERCENT_FIELD=Lx,e}(to),v1,L0="range",sS="type",rv="percent",PI="#f0f0f0",uS="indicator-view",lS="range-view",OI={percent:0,range:{ticks:[]},innerRadius:.9,radius:.95,startAngle:-7/6*Math.PI,endAngle:1/6*Math.PI,syncViewPadding:!0,axis:{line:null,label:{offset:-24,style:{textAlign:"center",textBaseline:"middle"}},subTickLine:{length:-8},tickLine:{length:-12},grid:null},indicator:{pointer:{style:{lineWidth:5,lineCap:"round"}},pin:{style:{r:9.75,lineWidth:4.5,fill:"#fff"}}},statistic:{title:!1},meta:(v1={},v1[L0]={sync:"v"},v1[rv]={sync:"v",tickCount:5,tickInterval:.2},v1),animation:!1};function FI(r,e){return r.map(function(t,i){var o;return o={},o[L0]=t-(r[i-1]||0),o[sS]=""+i,o[rv]=e,o})}function cS(r){var e;return[(e={},e[rv]=(0,b.uZ)(r,0,1),e)]}function fS(r,e){var t=(0,b.U2)(e,["ticks"],[]),i=(0,b.dp)(t)?(0,b.jj)(t):[0,(0,b.uZ)(r,0,1),1];return i[0]||i.shift(),FI(i,r)}function RI(r){var e=r.chart,t=r.options,i=t.percent,o=t.range,c=t.radius,p=t.innerRadius,g=t.startAngle,_=t.endAngle,S=t.axis,I=t.indicator,L=t.gaugeStyle,F=t.type,z=t.meter,V=o.color,Q=o.width;if(I){var st=cS(i),at=e.createView({id:uS});at.data(st),at.point().position(rv+"*1").shape(I.shape||"gauge-indicator").customInfo({defaultColor:e.getTheme().defaultColor,indicator:I}),at.coordinate("polar",{startAngle:g,endAngle:_,radius:p*c}),at.axis(rv,S),at.scale(rv,ys(S,Uf))}var Rt=fS(i,t.range),Kt=e.createView({id:lS});Kt.data(Rt);var te=(0,b.HD)(V)?[V,PI]:V,Ae=pc({chart:Kt,options:{xField:"1",yField:L0,seriesField:sS,rawFields:[rv],isStack:!0,interval:{color:te,style:L,shape:F==="meter"?"meter-gauge":null},args:{zIndexReversed:!0,sortZIndex:!0},minColumnWidth:Q,maxColumnWidth:Q}}).ext,hr=Ae.geometry;return hr.customInfo({meter:z}),Kt.coordinate("polar",{innerRadius:p,radius:c,startAngle:g,endAngle:_}).transpose(),r}function DI(r){var e;return Za(Mo((e={range:{min:0,max:1,maxLimit:1,minLimit:0}},e[rv]={},e)))(r)}function hS(r,e){var t=r.chart,i=r.options,o=i.statistic,c=i.percent;if(t.getController("annotation").clear(!0),o){var p=o.content,g=void 0;p&&(g=hn({},{content:(c*100).toFixed(2)+"%",style:{opacity:.75,fontSize:"30px",lineHeight:1,textAlign:"center",color:"rgba(44,53,66,0.85)"}},p)),Dw(t,{statistic:(0,P.pi)((0,P.pi)({},o),{content:g})},{percent:c})}return e&&t.render(!0),r}function BI(r){var e=r.chart,t=r.options,i=t.tooltip;return i?e.tooltip(hn({showTitle:!1,showMarkers:!1,containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',domStyles:{"g2-tooltip":{padding:"4px 8px",fontSize:"10px"}},customContent:function(o,c){var p=(0,b.U2)(c,[0,"data",rv],0);return(p*100).toFixed(2)+"%"}},i)):e.tooltip(!1),r}function NI(r){var e=r.chart;return e.legend(!1),r}function Fx(r){return Za(qo,_s,RI,DI,BI,hS,fu,Es(),NI)(r)}wi("point","gauge-indicator",{draw:function(r,e){var t=r.customInfo,i=t.indicator,o=t.defaultColor,c=i,p=c.pointer,g=c.pin,_=e.addGroup(),S=this.parsePoint({x:0,y:0});return p&&_.addShape("line",{name:"pointer",attrs:(0,P.pi)({x1:S.x,y1:S.y,x2:r.x,y2:r.y,stroke:o},p.style)}),g&&_.addShape("circle",{name:"pin",attrs:(0,P.pi)({x:S.x,y:S.y,stroke:o},g.style)}),_}}),wi("interval","meter-gauge",{draw:function(r,e){var t=r.customInfo.meter,i=t===void 0?{}:t,o=i.steps,c=o===void 0?50:o,p=i.stepRatio,g=p===void 0?.5:p;c=c<1?1:c,g=(0,b.uZ)(g,0,1);var _=this.coordinate,S=_.startAngle,I=_.endAngle,L=0;if(g>0&&g<1){var F=I-S;L=F/c/(g/(1-g)+1-1/c)}for(var z=L/(1-g)*g,V=e.addGroup(),Q=this.coordinate.getCenter(),st=this.coordinate.getRadius(),at=hs.getAngle(r,this.coordinate),Rt=at.startAngle,Kt=at.endAngle,te=Rt;te<Kt;){var Ae=void 0,hr=(te-S)%(z+L);hr<z?Ae=te+(z-hr):(te+=z+L-hr,Ae=te+z);var Tr=hs.getSectorPath(Q.x,Q.y,st,te,Math.min(Ae,Kt),st*this.coordinate.innerRadius);V.addShape("path",{name:"meter-gauge",attrs:{path:Tr,fill:r.color,stroke:r.color,lineWidth:.5}}),te=Ae+L}return V}});var zI=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="gauge",t}return e.getDefaultOptions=function(){return OI},e.prototype.changeData=function(t){this.chart.emit(At.BEFORE_CHANGE_DATA,go.fromData(this.chart,At.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t});var i=this.chart.views.find(function(c){return c.id===uS});i&&i.data(cS(t));var o=this.chart.views.find(function(c){return c.id===lS});o&&o.data(fS(t,this.options.range)),hS({chart:this.chart,options:this.options},!0),this.chart.emit(At.AFTER_CHANGE_DATA,go.fromData(this.chart,At.AFTER_CHANGE_DATA,null))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Fx},e}(to);function pS(r,e,t){if(t===1)return[0,e];var i=Math.floor(r/e);return[e*i,e*(i+1)]}function dS(r){return Math.ceil(Math.log(r.length)/Math.LN2)+1}function vS(r,e,t,i,o){var c=(0,b.d9)(r);(0,b.MR)(c,e);var p=(0,b.I)(c,e),g=(0,b.rx)(p),_=g.max-g.min,S=t;if(!t&&i&&(S=i>1?_/(i-1):g.max),!t&&!i){var I=dS(p);S=_/I}var L={},F=(0,b.vM)(c,o);(0,b.xb)(F)?(0,b.S6)(c,function(V){var Q=V[e],st=pS(Q,S,i),at=st[0]+"-"+st[1];(0,b.wH)(L,at)||(L[at]={range:st,count:0}),L[at].count+=1}):Object.keys(F).forEach(function(V){(0,b.S6)(F[V],function(Q){var st=Q[e],at=pS(st,S,i),Rt=at[0]+"-"+at[1],Kt=Rt+"-"+V;(0,b.wH)(L,Kt)||(L[Kt]={range:at,count:0},L[Kt][o]=V),L[Kt].count+=1})});var z=[];return(0,b.S6)(L,function(V){z.push(V)}),z}var mg="range",yg="count",UI=hn({},to.getDefaultOptions(),{columnStyle:{stroke:"#FFFFFF"},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});function ZI(r){var e=r.chart,t=r.options,i=t.data,o=t.binField,c=t.binNumber,p=t.binWidth,g=t.color,_=t.stackField,S=t.legend,I=t.columnStyle,L=vS(i,o,p,c,_);e.data(L);var F=hn({},r,{options:{xField:mg,yField:yg,seriesField:_,isStack:!0,interval:{color:g,style:I}}});return pc(F),S&&_?e.legend(_,S):e.legend(!1),r}function VI(r){var e,t=r.options,i=t.xAxis,o=t.yAxis;return Za(Mo((e={},e[mg]=i,e[yg]=o,e)))(r)}function GI(r){var e=r.chart,t=r.options,i=t.xAxis,o=t.yAxis;return i===!1?e.axis(mg,!1):e.axis(mg,i),o===!1?e.axis(yg,!1):e.axis(yg,o),r}function HI(r){var e=r.chart,t=r.options,i=t.label,o=Pc(e,"interval");if(!i)o.label(!1);else{var c=i.callback,p=(0,P._T)(i,["callback"]);o.label({fields:[yg],callback:c,cfg:ec(p)})}return r}function gS(r){return Za(qo,$o("columnStyle"),ZI,VI,GI,M0,HI,zl,fu,_s)(r)}var jI=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="histogram",t}return e.getDefaultOptions=function(){return UI},e.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options,o=i.binField,c=i.binNumber,p=i.binWidth,g=i.stackField;this.chart.changeData(vS(t,o,p,c,g))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return gS},e}(to),WI=hn({},to.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},legend:{position:"top-left",radio:{}},isStack:!1}),XI=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.active=function(){var t=this.getView(),i=this.context.event;if(i.data){var o=i.data.items,c=t.geometries.filter(function(p){return p.type==="point"});(0,b.S6)(c,function(p){(0,b.S6)(p.elements,function(g){var _=(0,b.cx)(o,function(S){return S.data===g.data})!==-1;g.setState("active",_)})})}},e.prototype.reset=function(){var t=this.getView(),i=t.geometries.filter(function(o){return o.type==="point"});(0,b.S6)(i,function(o){(0,b.S6)(o.elements,function(c){c.setState("active",!1)})})},e.prototype.getView=function(){return this.context.view},e}(Pe);jr("marker-active",XI),Ye("marker-active",{start:[{trigger:"tooltip:show",action:"marker-active:active"}],end:[{trigger:"tooltip:hide",action:"marker-active:reset"}]});var mS=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="line",t}return e.getDefaultOptions=function(){return WI},e.prototype.changeData=function(t){this.updateOption({data:t});var i=this,o=i.chart,c=i.options;_m({chart:o,options:c}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Yw},e}(to),yS=hn({},to.getDefaultOptions(),{legend:{position:"right",radio:{}},tooltip:{shared:!1,showTitle:!1,showMarkers:!1},label:{layout:{type:"limit-in-plot",cfg:{action:"ellipsis"}}},pieStyle:{stroke:"white",lineWidth:1},statistic:{title:{style:{fontWeight:300,color:"#4B535E",textAlign:"center",fontSize:"20px",lineHeight:1}},content:{style:{fontWeight:"bold",color:"rgba(44,53,66,0.85)",textAlign:"center",fontSize:"32px",lineHeight:1}}},theme:{components:{annotation:{text:{animate:!1}}}}}),YI=[1,0,0,0,1,0,0,0,1];function Rx(r,e){var t=e?(0,P.pr)(e):(0,P.pr)(YI);return hs.transform(t,r)}var $I=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getActiveElements=function(){var t=hs.getDelegationObject(this.context);if(t){var i=this.context.view,o=t.component,c=t.item,p=o.get("field");if(p){var g=i.geometries[0].elements;return g.filter(function(_){return _.getModel().data[p]===c.value})}}return[]},e.prototype.getActiveElementLabels=function(){var t=this.context.view,i=this.getActiveElements(),o=t.geometries[0].labelsContainer.getChildren();return o.filter(function(c){return i.find(function(p){return(0,b.Xy)(p.getData(),c.get("data"))})})},e.prototype.transfrom=function(t){t===void 0&&(t=7.5);var i=this.getActiveElements(),o=this.getActiveElementLabels();i.forEach(function(c,p){var g=o[p],_=c.geometry.coordinate;if(_.isPolar&&_.isTransposed){var S=hs.getAngle(c.getModel(),_),I=S.startAngle,L=S.endAngle,F=(I+L)/2,z=t,V=z*Math.cos(F),Q=z*Math.sin(F);c.shape.setMatrix(Rx([["t",V,Q]])),g.setMatrix(Rx([["t",V,Q]]))}})},e.prototype.active=function(){this.transfrom()},e.prototype.reset=function(){this.transfrom(0)},e}(Pe);function _S(r){var e=r.event,t,i=e.target;return i&&(t=i.get("element")),t}var xS=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getAnnotations=function(t){var i=t||this.context.view;return i.getController("annotation").option},e.prototype.getInitialAnnotation=function(){return this.initialAnnotation},e.prototype.init=function(){var t=this,i=this.context.view;i.removeInteraction("tooltip"),i.on("afterchangesize",function(){var o=t.getAnnotations(i);t.initialAnnotation=o})},e.prototype.change=function(t){var i=this.context,o=i.view,c=i.event;this.initialAnnotation||(this.initialAnnotation=this.getAnnotations());var p=(0,b.U2)(c,["data","data"]);if(c.type.match("legend-item")){var g=hs.getDelegationObject(this.context),_=o.getGroupedFields()[0];if(g&&_){var S=g.item;p=o.getData().find(function(z){return z[_]===S.value})}}if(p){var I=(0,b.U2)(t,"annotations",[]),L=(0,b.U2)(t,"statistic",{});o.getController("annotation").clear(!0),(0,b.S6)(I,function(z){typeof z=="object"&&o.annotation()[z.type](z)}),i1(o,{statistic:L,plotType:"pie"},p),o.render(!0)}var F=_S(this.context);F&&F.shape.toFront()},e.prototype.reset=function(){var t=this.context.view,i=t.getController("annotation");i.clear(!0);var o=this.getInitialAnnotation();(0,b.S6)(o,function(c){t.annotation()[c.type](c)}),t.render(!0)},e}(Pe),bS="pie-statistic";jr(bS,xS),Ye("pie-statistic-active",{start:[{trigger:"element:mouseenter",action:"pie-statistic:change"}],end:[{trigger:"element:mouseleave",action:"pie-statistic:reset"}]}),jr("pie-legend",$I),Ye("pie-legend-active",{start:[{trigger:"legend-item:mouseenter",action:"pie-legend:active"}],end:[{trigger:"legend-item:mouseleave",action:"pie-legend:reset"}]});function qI(r,e){var t=null;return(0,b.S6)(r,function(i){typeof i[e]=="number"&&(t+=i[e])}),t}function KI(r,e){var t;switch(r){case"inner":return t="-30%",(0,b.HD)(e)&&e.endsWith("%")?parseFloat(e)*.01>0?t:e:e<0?e:t;case"outer":return t=12,(0,b.HD)(e)&&e.endsWith("%")?parseFloat(e)*.01<0?t:e:e>0?e:t;default:return e}}function g1(r,e){return(0,b.yW)(Dv(r,e),function(t){return t[e]===0})}function QI(r){var e=r.chart,t=r.options,i=t.data,o=t.angleField,c=t.colorField,p=t.color,g=t.pieStyle,_=t.shape,S=Dv(i,o);if(g1(S,o)){var I="$$percentage$$";S=S.map(function(F){var z;return(0,P.pi)((0,P.pi)({},F),(z={},z[I]=1/S.length,z))}),e.data(S);var L=hn({},r,{options:{xField:"1",yField:I,seriesField:c,isStack:!0,interval:{color:p,shape:_,style:g},args:{zIndexReversed:!0,sortZIndex:!0}}});pc(L)}else{e.data(S);var L=hn({},r,{options:{xField:"1",yField:o,seriesField:c,isStack:!0,interval:{color:p,shape:_,style:g},args:{zIndexReversed:!0,sortZIndex:!0}}});pc(L)}return r}function JI(r){var e,t=r.chart,i=r.options,o=i.meta,c=i.colorField,p=hn({},o);return t.scale(p,(e={},e[c]={type:"cat"},e)),r}function tk(r){var e=r.chart,t=r.options,i=t.radius,o=t.innerRadius,c=t.startAngle,p=t.endAngle;return e.coordinate({type:"theta",cfg:{radius:i,innerRadius:o,startAngle:c,endAngle:p}}),r}function ek(r){var e=r.chart,t=r.options,i=t.label,o=t.colorField,c=t.angleField,p=e.geometries[0];if(!i)p.label(!1);else{var g=i.callback,_=(0,P._T)(i,["callback"]),S=ec(_);if(S.content){var I=S.content;S.content=function(V,Q,st){var at=V[o],Rt=V[c],Kt=e.getScaleByField(c),te=Kt==null?void 0:Kt.scale(Rt);return(0,b.mf)(I)?I((0,P.pi)((0,P.pi)({},V),{percent:te}),Q,st):(0,b.HD)(I)?Ex(I,{value:Rt,name:at,percentage:(0,b.hj)(te)&&!(0,b.UM)(Rt)?(te*100).toFixed(2)+"%":null}):I}}var L={inner:"",outer:"pie-outer",spider:"pie-spider"},F=S.type?L[S.type]:"pie-outer",z=S.layout?(0,b.kJ)(S.layout)?S.layout:[S.layout]:[];S.layout=(F?[{type:F}]:[]).concat(z),p.label({fields:o?[c,o]:[c],callback:g,cfg:(0,P.pi)((0,P.pi)({},S),{offset:KI(S.type,S.offset),type:"pie"})})}return r}function ES(r){var e=r.innerRadius,t=r.statistic,i=r.angleField,o=r.colorField,c=r.meta,p=r.locale,g=u1(p);if(e&&t){var _=hn({},yS.statistic,t),S=_.title,I=_.content;return S!==!1&&(S=hn({},{formatter:function(L){var F=L?L[o]:(0,b.UM)(S.content)?g.get(["statistic","total"]):S.content,z=(0,b.U2)(c,[o,"formatter"])||function(V){return V};return z(F)}},S)),I!==!1&&(I=hn({},{formatter:function(L,F){var z=L?L[i]:qI(F,i),V=(0,b.U2)(c,[i,"formatter"])||function(Q){return Q};return L||(0,b.UM)(I.content)?V(z):I.content}},I)),hn({},{statistic:{title:S,content:I}},r)}return r}function Dx(r){var e=r.chart,t=r.options,i=ES(t),o=i.innerRadius,c=i.statistic;return e.getController("annotation").clear(!0),Za(Es())(r),o&&c&&i1(e,{statistic:c,plotType:"pie"}),r}function rk(r){var e=r.chart,t=r.options,i=t.tooltip,o=t.colorField,c=t.angleField,p=t.data;if(i===!1)e.tooltip(i);else if(e.tooltip(hn({},i,{shared:!1})),g1(p,c)){var g=(0,b.U2)(i,"fields"),_=(0,b.U2)(i,"formatter");(0,b.xb)((0,b.U2)(i,"fields"))&&(g=[o,c],_=_||function(S){return{name:S[o],value:(0,b.BB)(S[c])}}),e.geometries[0].tooltip(g.join("*"),dg(g,_))}return r}function nk(r){var e=r.chart,t=r.options,i=ES(t),o=i.interactions,c=i.statistic,p=i.annotations;return(0,b.S6)(o,function(g){var _,S;if(g.enable===!1)e.removeInteraction(g.type);else if(g.type==="pie-statistic-active"){var I=[];!((_=g.cfg)===null||_===void 0)&&_.start||(I=[{trigger:"element:mouseenter",action:bS+":change",arg:{statistic:c,annotations:p}}]),(0,b.S6)((S=g.cfg)===null||S===void 0?void 0:S.start,function(L){I.push((0,P.pi)((0,P.pi)({},L),{arg:{statistic:c,annotations:p}}))}),e.interaction(g.type,hn({},g.cfg,{start:I}))}else e.interaction(g.type,g.cfg||{})}),r}function wS(r){return Za($o("pieStyle"),QI,JI,qo,tk,Jd,rk,ek,M0,Dx,nk,_s)(r)}var Bx=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="pie",t}return e.getDefaultOptions=function(){return yS},e.prototype.changeData=function(t){this.chart.emit(At.BEFORE_CHANGE_DATA,go.fromData(this.chart,At.BEFORE_CHANGE_DATA,null));var i=this.options,o=this.options.angleField,c=Dv(i.data,o),p=Dv(t,o);g1(c,o)||g1(p,o)?this.update({data:t}):(this.updateOption({data:t}),this.chart.data(p),Dx({chart:this.chart,options:this.options}),this.chart.render(!0)),this.chart.emit(At.AFTER_CHANGE_DATA,go.fromData(this.chart,At.AFTER_CHANGE_DATA,null))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return wS},e}(to),SS=["#FAAD14","#E8EDF3"],ik={percent:.2,color:SS,animation:{}};function Nx(r){var e=(0,b.uZ)(rc(r)?r:0,0,1);return[{current:""+e,type:"current",percent:e},{current:""+e,type:"target",percent:1}]}function zx(r){var e=r.chart,t=r.options,i=t.percent,o=t.progressStyle,c=t.color,p=t.barWidthRatio;e.data(Nx(i));var g=hn({},r,{options:{xField:"current",yField:"percent",seriesField:"type",widthRatio:p,interval:{style:o,color:(0,b.HD)(c)?[c,SS[1]]:c},args:{zIndexReversed:!0,sortZIndex:!0}}});return pc(g),e.tooltip(!1),e.axis(!1),e.legend(!1),r}function ak(r){var e=r.chart;return e.coordinate("rect").transpose(),r}function Ux(r){return Za(zx,Mo({}),ak,_s,qo,Es())(r)}var CS=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="process",t}return e.getDefaultOptions=function(){return ik},e.prototype.changeData=function(t){this.updateOption({percent:t}),this.chart.changeData(Nx(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Ux},e}(to);function AS(r){var e=r.chart,t=r.options,i=t.innerRadius,o=t.radius;return e.coordinate("theta",{innerRadius:i,radius:o}),r}function Zx(r,e){var t=r.chart,i=r.options,o=i.innerRadius,c=i.statistic,p=i.percent,g=i.meta;if(t.getController("annotation").clear(!0),o&&c){var _=(0,b.U2)(g,["percent","formatter"])||function(I){return(I*100).toFixed(2)+"%"},S=c.content;S&&(S=hn({},S,{content:(0,b.UM)(S.content)?_(p):S.content})),i1(t,{statistic:(0,P.pi)((0,P.pi)({},c),{content:S}),plotType:"ring-progress"},{percent:p})}return e&&t.render(!0),r}function TS(r){return Za(zx,Mo({}),AS,Zx,_s,qo,Es())(r)}var ok={percent:.2,innerRadius:.8,radius:.98,color:["#FAAD14","#E8EDF3"],statistic:{title:!1,content:{style:{fontSize:"14px",fontWeight:300,fill:"#4D4D4D",textAlign:"center",textBaseline:"middle"}}},animation:{}},sk=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="ring-process",t}return e.getDefaultOptions=function(){return ok},e.prototype.changeData=function(t){this.chart.emit(At.BEFORE_CHANGE_DATA,go.fromData(this.chart,At.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(Nx(t)),Zx({chart:this.chart,options:this.options},!0),this.chart.emit(At.AFTER_CHANGE_DATA,go.fromData(this.chart,At.AFTER_CHANGE_DATA,null))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return TS},e}(to),P0=nt(44334),uk={exp:P0.regressionExp,linear:P0.regressionLinear,loess:P0.regressionLoess,log:P0.regressionLog,poly:P0.regressionPoly,pow:P0.regressionPow,quad:P0.regressionQuad};function lk(r,e){var t=10,i={regionStyle:[{position:{start:[r,"max"],end:["max",e]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:["min","max"],end:[r,e]},style:{fill:"#a3dda1",opacity:.4}},{position:{start:["min",e],end:[r,"min"]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:[r,e],end:["max","min"]},style:{fill:"#a3dda1",opacity:.4}}],lineStyle:{stroke:"#9ba29a",lineWidth:1},labelStyle:[{position:["max",e],offsetX:-t,offsetY:-t,style:{textAlign:"right",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",e],offsetX:t,offsetY:-t,style:{textAlign:"left",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",e],offsetX:t,offsetY:t,style:{textAlign:"left",textBaseline:"top",fontSize:14,fill:"#ccc"}},{position:["max",e],offsetX:-t,offsetY:t,style:{textAlign:"right",textBaseline:"top",fontSize:14,fill:"#ccc"}}]};return i}var MS=function(r,e){var t=e.view,i=e.options,o=i.xField,c=i.yField,p=t.getScaleByField(o),g=t.getScaleByField(c),_=r.map(function(S){return t.getCoordinate().convert({x:p.scale(S[0]),y:g.scale(S[1])})});return F5(_,!1)},ck=function(r){var e=r.options,t=e.xField,i=e.yField,o=e.data,c=e.regressionLine,p=c.type,g=p===void 0?"linear":p,_=c.algorithm,S;if(_)S=(0,b.kJ)(_)?_:_(o);else{var I=uk[g]().x(function(L){return L[t]}).y(function(L){return L[i]});S=I(o)}return MS(S,r)},fk=function(r){var e,t=r.meta,i=t===void 0?{}:t,o=r.xField,c=r.yField,p=r.data,g=p[0][o],_=p[0][c],S=g>0,I=_>0;function L(F,z){var V=(0,b.U2)(i,[F]);function Q(at){return(0,b.U2)(V,at)}var st={};return z==="x"?((0,b.hj)(g)&&((0,b.hj)(Q("min"))||(st.min=S?0:g*2),(0,b.hj)(Q("max"))||(st.max=S?g*2:0)),st):((0,b.hj)(_)&&((0,b.hj)(Q("min"))||(st.min=I?0:_*2),(0,b.hj)(Q("max"))||(st.max=I?_*2:0)),st)}return(0,P.pi)((0,P.pi)({},i),(e={},e[o]=(0,P.pi)((0,P.pi)({},i[o]),L(o,"x")),e[c]=(0,P.pi)((0,P.pi)({},i[c]),L(c,"y")),e))};function Vx(r){var e=r.data,t=e===void 0?[]:e,i=r.xField,o=r.yField;if(t.length){for(var c=!0,p=!0,g=t[0],_=void 0,S=1;S<t.length&&(_=t[S],g[i]!==_[i]&&(c=!1),g[o]!==_[o]&&(p=!1),!(!c&&!p));S++)g=_;var I=[];c&&I.push(i),p&&I.push(o);var L=ys(fk(r),I);return hn({},r,{meta:L})}return r}function IS(r){var e=r.chart,t=r.options,i=t.data,o=t.type,c=t.color,p=t.shape,g=t.pointStyle,_=t.shapeField,S=t.colorField,I=t.xField,L=t.yField,F=t.sizeField,z=t.size,V=t.tooltip;F&&(z||(z=[2,8]),(0,b.hj)(z)&&(z=[z,z])),V&&!V.fields&&(V=(0,P.pi)((0,P.pi)({},V),{fields:[I,L,S,F,_]})),e.data(i),Zf(hn({},r,{options:{seriesField:S,point:{color:c,shape:p,size:z,style:g},tooltip:V}}));var Q=Pc(e,"point");return o&&Q.adjust(o),r}function Cm(r){var e,t=r.options,i=t.xAxis,o=t.yAxis,c=t.xField,p=t.yField,g=Vx(t);return Za(Mo((e={},e[c]=i,e[p]=o,e)))(hn({},r,{options:g}))}function kS(r){var e=r.chart,t=r.options,i=t.xAxis,o=t.yAxis,c=t.xField,p=t.yField;return e.axis(c,i),e.axis(p,o),r}function hk(r){var e=r.chart,t=r.options,i=t.legend,o=t.colorField,c=t.shapeField,p=t.sizeField,g=t.shapeLegend,_=t.sizeLegend,S=i!==!1;return o&&e.legend(o,S?i:!1),c&&(g?e.legend(c,g):e.legend(c,g===!1?!1:i)),p&&e.legend(p,_||!1),!S&&!g&&!_&&e.legend(!1),r}function pk(r){var e=r.chart,t=r.options,i=t.label,o=t.yField,c=Pc(e,"point");if(!i)c.label(!1);else{var p=i.callback,g=(0,P._T)(i,["callback"]);c.label({fields:[o],callback:p,cfg:ec(g)})}return r}function dk(r){var e=r.options,t=e.quadrant,i=[];if(t){var o=t.xBaseline,c=o===void 0?0:o,p=t.yBaseline,g=p===void 0?0:p,_=t.labels,S=t.regionStyle,I=t.lineStyle,L=lk(c,g),F=new Array(4).join(",").split(",");F.forEach(function(z,V){i.push((0,P.pi)((0,P.pi)({type:"region",top:!1},L.regionStyle[V].position),{style:hn({},L.regionStyle[V].style,S==null?void 0:S[V])}),(0,P.pi)({type:"text",top:!0},hn({},L.labelStyle[V],_==null?void 0:_[V])))}),i.push({type:"line",top:!1,start:["min",g],end:["max",g],style:hn({},L.lineStyle,I)},{type:"line",top:!1,start:[c,"min"],end:[c,"max"],style:hn({},L.lineStyle,I)})}return Za(Es(i))(r)}function vk(r){var e=r.options,t=r.chart,i=e.regressionLine;if(i){var o=i.style,c=i.top,p=c===void 0?!1:c,g={stroke:"#9ba29a",lineWidth:2,opacity:.5};t.annotation().shape({top:p,render:function(_,S){var I=_.addGroup({id:t.id+"-regression-line",name:"regression-line-group"}),L=ck({view:S,options:e});I.addShape("path",{name:"regression-line",attrs:(0,P.pi)((0,P.pi)({path:L},g),o)})}})}return r}function LS(r){var e=r.chart,t=r.options,i=t.tooltip;return i?e.tooltip(i):i===!1&&e.tooltip(!1),r}function PS(r){return Za(IS,Cm,kS,hk,LS,pk,$w,Nv,Hw,fu,dk,_s,qo,vk)(r)}var gk=hn({},to.getDefaultOptions(),{size:4,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!0,crosshairs:{type:"xy"}}});Ye("drag-move",{start:[{trigger:"plot:mousedown",action:"scale-translate:start"}],processing:[{trigger:"plot:mousemove",action:"scale-translate:translate",throttle:{wait:100,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseup",action:"scale-translate:end"}]});var m1=function(r){(0,P.ZT)(e,r);function e(t,i){var o=r.call(this,t,i)||this;return o.type="scatter",o.on(At.BEFORE_RENDER,function(c){var p,g,_=o,S=_.options,I=_.chart;if(((p=c.data)===null||p===void 0?void 0:p.source)===jc.FILTER){var L=o.chart.filterData(o.chart.getData());Cm({chart:I,options:(0,P.pi)((0,P.pi)({},S),{data:L})})}((g=c.data)===null||g===void 0?void 0:g.source)===jc.RESET&&Cm({chart:I,options:S})}),o}return e.getDefaultOptions=function(){return gk},e.prototype.changeData=function(t){this.updateOption(Vx(hn({},this.options,{data:t})));var i=this,o=i.options,c=i.chart;Cm({chart:c,options:o}),this.chart.changeData(t)},e.prototype.getSchemaAdaptor=function(){return PS},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e}(to),Am="$$stock-range$$",y1="trend",OS="up",FS="down",mk={showMarkers:!1,showCrosshairs:!0,shared:!0,crosshairs:{type:"xy",follow:!0,text:function(r,e,t){var i;if(r==="x"){var o=t[0];i=o?o.title:e}else i=e;return{position:r==="y"?"start":"end",content:i,style:{fill:"#dfdfdf"}}},textBackground:{padding:[2,4],style:{fill:"#666"}}}},yk=hn({},to.getDefaultOptions(),{tooltip:mk,interactions:[{type:"tooltip"}],legend:{position:"top-left"},risingFill:"#ef5350",fallingFill:"#26a69a"});function RS(r,e){return(0,b.UI)(r,function(t){var i=t&&(0,P.pi)({},t);if((0,b.kJ)(e)&&i){var o=e[0],c=e[1],p=e[2],g=e[3];i[y1]=i[o]<=i[c]?OS:FS,i[Am]=[i[o],i[c],i[p],i[g]]}return i})}function _k(r){var e=r.chart,t=r.options,i=t.yField,o=t.data,c=t.risingFill,p=t.fallingFill,g=t.tooltip,_=t.stockStyle;e.data(RS(o,i));var S=g;return S!==!1&&(S=hn({},{fields:i},S)),l1(hn({},r,{options:{schema:{shape:"candle",color:[c,p],style:_},yField:Am,seriesField:y1,rawFields:i,tooltip:S}})),r}function xk(r){var e,t,i=r.chart,o=r.options,c=o.meta,p=o.xAxis,g=o.yAxis,_=o.xField,S=(e={},e[_]={type:"timeCat",tickCount:6},e[y1]={values:[OS,FS]},e),I=hn(S,c,(t={},t[_]=ys(p,Uf),t[Am]=ys(g,Uf),t));return i.scale(I),r}function bk(r){var e=r.chart,t=r.options,i=t.xAxis,o=t.yAxis,c=t.xField;return i===!1?e.axis(c,!1):e.axis(c,i),o===!1?e.axis(Am,!1):e.axis(Am,o),r}function Ek(r){var e=r.chart,t=r.options,i=t.tooltip;return i!==!1?e.tooltip(i):e.tooltip(!1),r}function wk(r){var e=r.chart,t=r.options,i=t.legend;return i?e.legend(y1,i):i===!1&&e.legend(!1),r}function DS(r){Za(qo,_k,xk,bk,Ek,wk,fu,_s,Es(),Nv)(r)}var Sk=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="stock",t}return e.getDefaultOptions=function(){return yk},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return DS},e.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options.yField;this.chart.changeData(RS(t,i))},e}(to);function O0(r){return(0,b.UI)(r||[],function(e,t){return{x:""+t,y:e}})}var Tm="x",_g="y",BS={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(r,e){return""+(0,b.U2)(e,[0,"data","y"],0)},containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',itemTpl:"<span>{value}</span>",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}},showCrosshairs:!0,crosshairs:{type:"x"}},Ck={appendPadding:2,tooltip:(0,P.pi)({},BS),animation:{}};function Ak(r){var e=r.chart,t=r.options,i=t.data,o=t.color,c=t.areaStyle,p=t.point,g=t.line,_=p==null?void 0:p.state,S=O0(i);e.data(S);var I=hn({},r,{options:{xField:Tm,yField:_g,area:{color:o,style:c},line:g,point:p}}),L=hn({},I,{options:{tooltip:!1}}),F=hn({},I,{options:{tooltip:!1,state:_}});return rd(I),I0(L),Zf(F),e.axis(!1),e.legend(!1),r}function xg(r){var e,t,i=r.options,o=i.xAxis,c=i.yAxis,p=i.data,g=O0(p);return Za(Mo((e={},e[Tm]=o,e[_g]=c,e),(t={},t[Tm]={type:"cat"},t[_g]=yx(g,_g),t)))(r)}function NS(r){return Za($o("areaStyle"),Ak,xg,zl,qo,_s,Es())(r)}var Tk={appendPadding:2,tooltip:(0,P.pi)({},BS),color:"l(90) 0:#E5EDFE 1:#ffffff",areaStyle:{fillOpacity:.6},line:{size:1,color:"#5B8FF9"},animation:{}},Mk=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="tiny-area",t}return e.getDefaultOptions=function(){return Tk},e.prototype.changeData=function(t){this.updateOption({data:t});var i=this,o=i.chart,c=i.options;xg({chart:o,options:c}),o.changeData(O0(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return NS},e}(to);function Ik(r){var e=r.chart,t=r.options,i=t.data,o=t.color,c=t.columnStyle,p=t.columnWidthRatio,g=O0(i);e.data(g);var _=hn({},r,{options:{xField:Tm,yField:_g,widthRatio:p,interval:{style:c,color:o}}});return pc(_),e.axis(!1),e.legend(!1),e.interaction("element-active"),r}function zS(r){return Za(qo,$o("columnStyle"),Ik,xg,zl,_s,Es())(r)}var kk={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(r,e){return""+(0,b.U2)(e,[0,"data","y"],0)},containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',itemTpl:"<span>{value}</span>",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}}},Lk={appendPadding:2,tooltip:(0,P.pi)({},kk),animation:{}},Pk=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="tiny-column",t}return e.getDefaultOptions=function(){return Lk},e.prototype.changeData=function(t){this.updateOption({data:t});var i=this,o=i.chart,c=i.options;xg({chart:o,options:c}),o.changeData(O0(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return zS},e}(to);function Ok(r){var e=r.chart,t=r.options,i=t.data,o=t.color,c=t.lineStyle,p=t.point,g=p==null?void 0:p.state,_=O0(i);e.data(_);var S=hn({},r,{options:{xField:Tm,yField:_g,line:{color:o,style:c},point:p}}),I=hn({},S,{options:{tooltip:!1,state:g}});return I0(S),Zf(I),e.axis(!1),e.legend(!1),r}function _1(r){return Za(Ok,xg,qo,zl,_s,Es())(r)}var Fk=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="tiny-line",t}return e.getDefaultOptions=function(){return Ck},e.prototype.changeData=function(t){this.updateOption({data:t});var i=this,o=i.chart,c=i.options;xg({chart:o,options:c}),o.changeData(O0(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return _1},e}(to),Rk={line:Yw,pie:wS,column:p1,bar:Kw,area:xm,gauge:Fx,"tiny-line":_1,"tiny-column":zS,"tiny-area":NS,"ring-progress":TS,progress:Ux,scatter:PS,histogram:gS,funnel:oS,stock:DS},Dk={line:mS,pie:Bx,column:Jw,bar:Qw,area:V5,gauge:zI,"tiny-line":Fk,"tiny-column":Pk,"tiny-area":Mk,"ring-progress":sk,progress:CS,scatter:m1,histogram:jI,funnel:LI,stock:Sk},Bk={pie:{label:!1},column:{tooltip:{showMarkers:!1}},bar:{tooltip:{showMarkers:!1}}};function Gx(r,e,t){var i=Dk[r];if(!i){console.error("could not find "+r+" plot");return}var o=Rk[r];o({chart:e,options:hn({},i.getDefaultOptions(),(0,b.U2)(Bk,r,{}),t)})}function Nk(r){var e=r.chart,t=r.options,i=t.views,o=t.legend;return(0,b.S6)(i,function(c){var p=c.region,g=c.data,_=c.meta,S=c.axes,I=c.coordinate,L=c.interactions,F=c.annotations,z=c.tooltip,V=c.geometries,Q=e.createView({region:p});Q.data(g);var st={};S&&(0,b.S6)(S,function(at,Rt){st[Rt]=ys(at,Uf)}),st=hn({},_,st),Q.scale(st),S?(0,b.S6)(S,function(at,Rt){Q.axis(Rt,at)}):Q.axis(!1),Q.coordinate(I),(0,b.S6)(V,function(at){var Rt=Bu({chart:Q,options:at}).ext,Kt=at.adjust;Kt&&Rt.geometry.adjust(Kt)}),(0,b.S6)(L,function(at){at.enable===!1?Q.removeInteraction(at.type):Q.interaction(at.type,at.cfg)}),(0,b.S6)(F,function(at){Q.annotation()[at.type]((0,P.pi)({},at))}),typeof c.animation=="boolean"?Q.animate(!1):(Q.animate(!0),(0,b.S6)(Q.geometries,function(at){at.animate(c.animation)})),z&&(Q.interaction("tooltip"),Q.tooltip(z))}),o?(0,b.S6)(o,function(c,p){e.legend(p,c)}):e.legend(!1),e.tooltip(t.tooltip),r}function zk(r){var e=r.chart,t=r.options,i=t.plots,o=t.data,c=o===void 0?[]:o;return(0,b.S6)(i,function(p){var g=p.type,_=p.region,S=p.options,I=S===void 0?{}:S,L=p.top,F=I.tooltip;if(L){Gx(g,e,(0,P.pi)((0,P.pi)({},I),{data:c}));return}var z=e.createView((0,P.pi)({region:_},ys(I,Ax)));F&&z.interaction("tooltip"),Gx(g,z,(0,P.pi)({data:c},I))}),r}function Uk(r){var e=r.chart,t=r.options;return e.option("slider",t.slider),r}function Zk(r){return Za(_s,Nk,zk,fu,_s,qo,zl,Uk,Es())(r)}function Hx(r,e){var t=r.getModel(),i=t.data,o;return(0,b.kJ)(i)?o=i[0][e]:o=i[e],o}function US(r){var e=n1(r);(0,b.S6)(e,function(t){t.hasState("active")&&t.setState("active",!1),t.hasState("selected")&&t.setState("selected",!1),t.hasState("inactive")&&t.setState("inactive",!1)})}var ZS=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getAssociationItems=function(t,i){var o,c=this.context.event,p=i||{},g=p.linkField,_=p.dim,S=[];if(!((o=c.data)===null||o===void 0)&&o.data){var I=c.data.data;(0,b.S6)(t,function(L){var F,z,V=g;if(_==="x"?V=L.getXScale().field:_==="y"?V=(F=L.getYScales().find(function(st){return st.field===V}))===null||F===void 0?void 0:F.field:V||(V=(z=L.getGroupScales()[0])===null||z===void 0?void 0:z.field),!!V){var Q=(0,b.UI)(n1(L),function(st){var at=!1,Rt=!1,Kt=(0,b.kJ)(I)?(0,b.U2)(I[0],V):(0,b.U2)(I,V);return Hx(st,V)===Kt?at=!0:Rt=!0,{element:st,view:L,active:at,inactive:Rt}});S.push.apply(S,Q)}})}return S},e.prototype.showTooltip=function(t){var i=Bw(this.context.view),o=this.getAssociationItems(i,t);(0,b.S6)(o,function(c){if(c.active){var p=c.element.shape.getCanvasBBox();c.view.showTooltip({x:p.minX+p.width/2,y:p.minY+p.height/2})}})},e.prototype.hideTooltip=function(){var t=Bw(this.context.view);(0,b.S6)(t,function(i){i.hideTooltip()})},e.prototype.active=function(t){var i=um(this.context.view),o=this.getAssociationItems(i,t);(0,b.S6)(o,function(c){var p=c.active,g=c.element;p&&g.setState("active",!0)})},e.prototype.selected=function(t){var i=um(this.context.view),o=this.getAssociationItems(i,t);(0,b.S6)(o,function(c){var p=c.active,g=c.element;p&&g.setState("selected",!0)})},e.prototype.highlight=function(t){var i=um(this.context.view),o=this.getAssociationItems(i,t);(0,b.S6)(o,function(c){var p=c.inactive,g=c.element;p&&g.setState("inactive",!0)})},e.prototype.reset=function(){var t=um(this.context.view);(0,b.S6)(t,function(i){US(i)})},e}(Pe);jr("association",ZS),Ye("association-active",{start:[{trigger:"element:mouseenter",action:"association:active"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Ye("association-selected",{start:[{trigger:"element:mouseenter",action:"association:selected"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Ye("association-highlight",{start:[{trigger:"element:mouseenter",action:"association:highlight"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Ye("association-tooltip",{start:[{trigger:"element:mousemove",action:"association:showTooltip"}],end:[{trigger:"element:mouseleave",action:"association:hideTooltip"}]});var VS=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="mix",t}return e.prototype.getSchemaAdaptor=function(){return Zk},e}(to),F0;(function(r){r.DEV="DEV",r.BETA="BETA",r.STABLE="STABLE"})(F0||(F0={}));function x1(r,e){console.warn(r===F0.DEV?"Plot '"+e+"' is in DEV stage, just give us issues.":r===F0.BETA?"Plot '"+e+"' is in BETA stage, DO NOT use it in production env.":r===F0.STABLE?"Plot '"+e+`' is in STABLE stage, import it by "import { `+e+` } from '@antv/g2plot'".`:"invalid Stage type.")}var Vk=function(){function r(){}return Object.defineProperty(r,"MultiView",{get:function(){return x1(F0.STABLE,"MultiView"),VS},enumerable:!1,configurable:!0}),r}(),_p="first-axes-view",nd="second-axes-view",Gv="series-field-key";function jx(r,e,t,i,o){var c=[];e.forEach(function(L){i.forEach(function(F){var z,V=(z={},z[r]=F[r],z[t]=L,z[L]=F[L],z);c.push(V)})});var p=Object.values((0,b.vM)(c,t)),g=p[0],_=g===void 0?[]:g,S=p[1],I=S===void 0?[]:S;return o?[_.reverse(),I.reverse()]:[_,I]}function nv(r){return r!=="vertical"}function Wx(r,e,t){var i=e[0],o=e[1],c=i.autoPadding,p=o.autoPadding,g=r.__axisPosition,_=g.layout,S=g.position;if(nv(_)&&S==="top"&&(i.autoPadding=t.instance(c.top,0,c.bottom,c.left),o.autoPadding=t.instance(p.top,c.left,p.bottom,0)),nv(_)&&S==="bottom"&&(i.autoPadding=t.instance(c.top,c.right/2+5,c.bottom,c.left),o.autoPadding=t.instance(p.top,p.right,p.bottom,c.right/2+5)),!nv(_)&&S==="bottom"){var I=c.left>=p.left?c.left:p.left;i.autoPadding=t.instance(c.top,c.right,c.bottom/2+5,I),o.autoPadding=t.instance(c.bottom/2+5,p.right,p.bottom,I)}if(!nv(_)&&S==="top"){var I=c.left>=p.left?c.left:p.left;i.autoPadding=t.instance(c.top,c.right,0,I),o.autoPadding=t.instance(0,p.right,c.top,I)}}function GS(r){var e=r.chart,t=r.options,i=t.data,o=t.xField,c=t.yField,p=t.color,g=t.barStyle,_=t.widthRatio,S=t.legend,I=t.layout,L=jx(o,c,Gv,i,nv(I));S?e.legend(Gv,S):S===!1&&e.legend(!1);var F,z,V=L[0],Q=L[1];nv(I)?(F=e.createView({region:{start:{x:0,y:0},end:{x:.5,y:1}},id:_p}),F.coordinate().transpose().reflect("x"),z=e.createView({region:{start:{x:.5,y:0},end:{x:1,y:1}},id:nd}),z.coordinate().transpose(),F.data(V),z.data(Q)):(F=e.createView({region:{start:{x:0,y:0},end:{x:1,y:.5}},id:_p}),z=e.createView({region:{start:{x:0,y:.5},end:{x:1,y:1}},id:nd}),z.coordinate().reflect("y"),F.data(V),z.data(Q));var st=hn({},r,{chart:F,options:{widthRatio:_,xField:o,yField:c[0],seriesField:Gv,interval:{color:p,style:g}}});pc(st);var at=hn({},r,{chart:z,options:{xField:o,yField:c[1],seriesField:Gv,widthRatio:_,interval:{color:p,style:g}}});return pc(at),r}function Gk(r){var e,t,i,o=r.options,c=r.chart,p=o.xAxis,g=o.yAxis,_=o.xField,S=o.yField,I=xo(c,_p),L=xo(c,nd),F={};return(0,b.XP)((o==null?void 0:o.meta)||{}).map(function(z){(0,b.U2)(o==null?void 0:o.meta,[z,"alias"])&&(F[z]=o.meta[z].alias)}),c.scale((e={},e[Gv]={sync:!0,formatter:function(z){return(0,b.U2)(F,z,z)}},e)),Mo((t={},t[_]=p,t[S[0]]=g[S[0]],t))(hn({},r,{chart:I})),Mo((i={},i[_]=p,i[S[1]]=g[S[1]],i))(hn({},r,{chart:L})),r}function HS(r){var e=r.chart,t=r.options,i=t.xAxis,o=t.yAxis,c=t.xField,p=t.yField,g=t.layout,_=xo(e,_p),S=xo(e,nd);return(i==null?void 0:i.position)==="bottom"?S.axis(c,(0,P.pi)((0,P.pi)({},i),{label:{formatter:function(){return""}}})):S.axis(c,!1),i===!1?_.axis(c,!1):_.axis(c,(0,P.pi)({position:nv(g)?"top":"bottom"},i)),o===!1?(_.axis(p[0],!1),S.axis(p[1],!1)):(_.axis(p[0],o[p[0]]),S.axis(p[1],o[p[1]])),e.__axisPosition={position:_.getOptions().axes[c].position,layout:g},r}function Hk(r){var e=r.chart;return fu(hn({},r,{chart:xo(e,_p)})),fu(hn({},r,{chart:xo(e,nd)})),r}function tF(r){var e=r.chart,t=r.options,i=t.yField,o=t.yAxis;return Fh(hn({},r,{chart:xo(e,_p),options:{yAxis:o[i[0]]}})),Fh(hn({},r,{chart:xo(e,nd),options:{yAxis:o[i[1]]}})),r}function b1(r){var e=r.chart;return qo(hn({},r,{chart:xo(e,_p)})),qo(hn({},r,{chart:xo(e,nd)})),qo(r),r}function jS(r){var e=r.chart;return _s(hn({},r,{chart:xo(e,_p)})),_s(hn({},r,{chart:xo(e,nd)})),r}function WS(r){var e=this,t,i,o=r.chart,c=r.options,p=c.label,g=c.yField,_=c.layout,S=xo(o,_p),I=xo(o,nd),L=Pc(S,"interval"),F=Pc(I,"interval");if(!p)L.label(!1),F.label(!1);else{var z=p.callback,V=(0,P._T)(p,["callback"]);V.position||(V.position="middle"),V.offset===void 0&&(V.offset=2);var Q=(0,P.pi)({},V);if(nv(_)){var st=((t=Q.style)===null||t===void 0?void 0:t.textAlign)||(V.position==="middle"?"center":"left");V.style=hn({},V.style,{textAlign:st});var at={left:"right",right:"left",center:"center"};Q.style=hn({},Q.style,{textAlign:at[st]})}else{var Rt={top:"bottom",bottom:"top",middle:"middle"};typeof V.position=="string"?V.position=Rt[V.position]:typeof V.position=="function"&&(V.position=function(){for(var Ae=[],hr=0;hr<arguments.length;hr++)Ae[hr]=arguments[hr];return Rt[V.position.apply(e,Ae)]});var Kt=((i=Q.style)===null||i===void 0?void 0:i.textBaseline)||"bottom";Q.style=hn({},Q.style,{textBaseline:Kt});var te={top:"bottom",bottom:"top",middle:"middle"};V.style=hn({},V.style,{textBaseline:te[Kt]})}L.label({fields:[g[0]],callback:z,cfg:ec(Q)}),F.label({fields:[g[1]],callback:z,cfg:ec(V)})}return r}function eF(r){return Za(GS,Gk,HS,tF,b1,WS,zl,Hk,jS)(r)}var DR=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="bidirectional-bar",t}return e.getDefaultOptions=function(){return hn({},r.getDefaultOptions.call(this),{syncViewPadding:Wx})},e.prototype.changeData=function(t){t===void 0&&(t=[]),this.chart.emit(At.BEFORE_CHANGE_DATA,go.fromData(this.chart,At.BEFORE_CHANGE_DATA,null)),this.updateOption({data:t});var i=this.options,o=i.xField,c=i.yField,p=i.layout,g=jx(o,c,Gv,t,nv(p)),_=g[0],S=g[1],I=xo(this.chart,_p),L=xo(this.chart,nd);I.data(_),L.data(S),this.chart.render(!0),this.chart.emit(At.AFTER_CHANGE_DATA,go.fromData(this.chart,At.AFTER_CHANGE_DATA,null))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return eF},e.SERIES_FIELD_KEY=Gv,e}(to),Mm,Hv="$$range$$",Xx="low-q1-median-q3-high",XS="$$y_outliers$$",Im="outliers_view",Yx=hn({},to.getDefaultOptions(),{meta:(Mm={},Mm[Hv]={min:0,alias:Xx},Mm),interactions:[{type:"active-region"}],tooltip:{showMarkers:!1,shared:!0},boxStyle:{lineWidth:1}}),jk=function(r,e){var t=r;if(Array.isArray(e)){var i=e[0],o=e[1],c=e[2],p=e[3],g=e[4];t=(0,b.UI)(r,function(_){return _[Hv]=[_[i],_[o],_[c],_[p],_[g]],_})}return t};function rF(r){var e=r.chart,t=r.options,i=t.xField,o=t.yField,c=t.groupField,p=t.color,g=t.tooltip,_=t.boxStyle;e.data(jk(t.data,o));var S=(0,b.kJ)(o)?Hv:o,I=o?(0,b.kJ)(o)?o:[o]:[],L=g;L!==!1&&(L=hn({},{fields:(0,b.kJ)(o)?o:[]},L));var F=l1(hn({},r,{options:{xField:i,yField:S,seriesField:c,tooltip:L,rawFields:I,label:!1,schema:{shape:"box",color:p,style:_}}})).ext;return c&&F.geometry.adjust("dodge"),r}function Wk(r){var e=r.chart,t=r.options,i=t.xField,o=t.data,c=t.outliersField,p=t.outliersStyle,g=t.padding,_=t.label;if(!c)return r;var S=e.createView({padding:g,id:Im}),I=o.reduce(function(L,F){var z=F[c];return z.forEach(function(V){var Q;return L.push((0,P.pi)((0,P.pi)({},F),(Q={},Q[c]=V,Q)))}),L},[]);return S.data(I),Zf({chart:S,options:{xField:i,yField:c,point:{shape:"circle",style:p},label:_}}),S.axis(!1),r}function Xk(r){var e,t,i=r.chart,o=r.options,c=o.meta,p=o.xAxis,g=o.yAxis,_=o.xField,S=o.yField,I=o.outliersField,L=Array.isArray(S)?Hv:S,F={};if(I){var z=XS;F=(e={},e[I]={sync:z,nice:!0},e[L]={sync:z,nice:!0},e)}var V=hn(F,c,(t={},t[_]=ys(p,Uf),t[L]=ys(g,Uf),t));return i.scale(V),r}function YS(r){var e=r.chart,t=r.options,i=t.xAxis,o=t.yAxis,c=t.xField,p=t.yField,g=Array.isArray(p)?Hv:p;return i===!1?e.axis(c,!1):e.axis(c,i),o===!1?e.axis(Hv,!1):e.axis(g,o),r}function Yk(r){var e=r.chart,t=r.options,i=t.legend,o=t.groupField;return o?i?e.legend(o,i):e.legend(o,{position:"bottom"}):e.legend(!1),r}function $k(r){return Za(rF,Wk,Xk,YS,Yk,zl,Es(),fu,_s,qo)(r)}var $S=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="box",t}return e.getDefaultOptions=function(){return Yx},e.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options.yField,o=this.chart.views.find(function(c){return c.id===Im});o&&o.data(t),this.chart.changeData(jk(t,i))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return $k},e}(to);function $x(r,e,t){return r.length>1?e+"_"+t:""+e}function qS(r){var e=r.data,t=r.xField,i=r.measureField,o=r.rangeField,c=r.targetField,p=r.layout,g=[],_=[];e.forEach(function(L,F){var z=[L[o]].flat();z.sort(function(st,at){return st-at}),z.forEach(function(st,at){var Rt,Kt=at===0?st:z[at]-z[at-1];g.push((Rt={rKey:o+"_"+at},Rt[t]=t?L[t]:String(F),Rt[o]=Kt,Rt))});var V=[L[i]].flat();V.forEach(function(st,at){var Rt;g.push((Rt={mKey:$x(V,i,at)},Rt[t]=t?L[t]:String(F),Rt[i]=st,Rt))});var Q=[L[c]].flat();Q.forEach(function(st,at){var Rt;g.push((Rt={tKey:$x(Q,c,at)},Rt[t]=t?L[t]:String(F),Rt[c]=st,Rt))}),_.push(L[o],L[i],L[c])});var S=Math.min.apply(Math,_.flat(1/0)),I=Math.max.apply(Math,_.flat(1/0));return S=S>0?0:S,p==="vertical"&&g.reverse(),{min:S,max:I,ds:g}}function nF(r){var e=r.chart,t=r.options,i=t.bulletStyle,o=t.targetField,c=t.rangeField,p=t.measureField,g=t.xField,_=t.color,S=t.layout,I=t.size,L=t.label,F=qS(t),z=F.min,V=F.max,Q=F.ds;e.data(Q);var st=hn({},r,{options:{xField:g,yField:c,seriesField:"rKey",isStack:!0,label:(0,b.U2)(L,"range"),interval:{color:(0,b.U2)(_,"range"),style:(0,b.U2)(i,"range"),size:(0,b.U2)(I,"range")}}});pc(st),e.geometries[0].tooltip(!1);var at=hn({},r,{options:{xField:g,yField:p,seriesField:"mKey",isStack:!0,label:(0,b.U2)(L,"measure"),interval:{color:(0,b.U2)(_,"measure"),style:(0,b.U2)(i,"measure"),size:(0,b.U2)(I,"measure")}}});pc(at);var Rt=hn({},r,{options:{xField:g,yField:o,seriesField:"tKey",label:(0,b.U2)(L,"target"),point:{color:(0,b.U2)(_,"target"),style:(0,b.U2)(i,"target"),size:(0,b.mf)((0,b.U2)(I,"target"))?function(Kt){return(0,b.U2)(I,"target")(Kt)/2}:(0,b.U2)(I,"target")/2,shape:S==="horizontal"?"line":"hyphen"}}});return Zf(Rt),S==="horizontal"&&e.coordinate().transpose(),(0,P.pi)((0,P.pi)({},r),{ext:{data:{min:z,max:V}}})}function KS(r){var e,t,i=r.options,o=r.ext,c=i.xAxis,p=i.yAxis,g=i.targetField,_=i.rangeField,S=i.measureField,I=i.xField,L=o.data;return Za(Mo((e={},e[I]=c,e[S]=p,e),(t={},t[S]={min:L==null?void 0:L.min,max:L==null?void 0:L.max,sync:!0},t[g]={sync:""+S},t[_]={sync:""+S},t)))(r)}function QS(r){var e=r.chart,t=r.options,i=t.xAxis,o=t.yAxis,c=t.xField,p=t.measureField,g=t.rangeField,_=t.targetField;return e.axis(""+g,!1),e.axis(""+_,!1),i===!1?e.axis(""+c,!1):e.axis(""+c,i),o===!1?e.axis(""+p,!1):e.axis(""+p,o),r}function JS(r){var e=r.chart,t=r.options,i=t.legend;return e.removeInteraction("legend-filter"),e.legend(i),e.legend("rKey",!1),e.legend("mKey",!1),e.legend("tKey",!1),r}function tC(r){var e=r.chart,t=r.options,i=t.label,o=t.measureField,c=t.targetField,p=t.rangeField,g=e.geometries,_=g[0],S=g[1],I=g[2];return(0,b.U2)(i,"range")?_.label(""+p,(0,P.pi)({layout:[{type:"limit-in-plot"}]},ec(i.range))):_.label(!1),(0,b.U2)(i,"measure")?S.label(""+o,(0,P.pi)({layout:[{type:"limit-in-plot"}]},ec(i.measure))):S.label(!1),(0,b.U2)(i,"target")?I.label(""+c,(0,P.pi)({layout:[{type:"limit-in-plot"}]},ec(i.target))):I.label(!1),r}function qk(r){Za(nF,KS,QS,JS,qo,tC,zl,fu,_s)(r)}var iF=hn({},to.getDefaultOptions(),{layout:"horizontal",size:{range:30,measure:20,target:20},xAxis:{tickLine:!1,line:null},bulletStyle:{range:{fillOpacity:.5}},label:{measure:{position:"right"}},tooltip:{showMarkers:!1}}),xp=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="bullet",t}return e.getDefaultOptions=function(){return iF},e.prototype.changeData=function(t){this.updateOption({data:t});var i=qS(this.options),o=i.min,c=i.max,p=i.ds;KS({options:this.options,ext:{data:{min:o,max:c}},chart:this.chart}),this.chart.changeData(p)},e.prototype.getSchemaAdaptor=function(){return qk},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e}(to),E1={y:0,nodeWidthRatio:.05,weight:!1,nodePaddingRatio:.1,id:function(r){return r.id},source:function(r){return r.source},target:function(r){return r.target},sourceWeight:function(r){return r.value||1},targetWeight:function(r){return r.value||1},sortBy:null};function eC(r,e,t){(0,b.U5)(r,function(i,o){i.inEdges=e.filter(function(c){return""+t.target(c)==""+o}),i.outEdges=e.filter(function(c){return""+t.source(c)==""+o}),i.edges=i.outEdges.concat(i.inEdges),i.frequency=i.edges.length,i.value=0,i.inEdges.forEach(function(c){i.value+=t.targetWeight(c)}),i.outEdges.forEach(function(c){i.value+=t.sourceWeight(c)})})}function qx(r,e){var t={weight:function(o,c){return c.value-o.value},frequency:function(o,c){return c.frequency-o.frequency},id:function(o,c){return(""+e.id(o)).localeCompare(""+e.id(c))}},i=t[e.sortBy];!i&&(0,b.mf)(e.sortBy)&&(i=e.sortBy),i&&r.sort(i)}function aF(r,e){var t=r.length;if(!t)throw new TypeError("Invalid nodes: it's empty!");if(e.weight){var i=e.nodePaddingRatio;if(i<0||i>=1)throw new TypeError("Invalid nodePaddingRatio: it must be in range [0, 1)!");var o=i/(2*t),c=e.nodeWidthRatio;if(c<=0||c>=1)throw new TypeError("Invalid nodeWidthRatio: it must be in range (0, 1)!");var p=0;r.forEach(function(_){p+=_.value}),r.forEach(function(_){_.weight=_.value/p,_.width=_.weight*(1-i),_.height=c}),r.forEach(function(_,S){for(var I=0,L=S-1;L>=0;L--)I+=r[L].width+2*o;var F=_.minX=o+I,z=_.maxX=_.minX+_.width,V=_.minY=e.y-c/2,Q=_.maxY=V+c;_.x=[F,z,z,F],_.y=[V,V,Q,Q]})}else{var g=1/t;r.forEach(function(_,S){_.x=(S+.5)*g,_.y=e.y})}return r}function Kk(r,e,t){if(t.weight){var i={};(0,b.U5)(r,function(o,c){i[c]=o.value}),e.forEach(function(o){var c=t.source(o),p=t.target(o),g=r[c],_=r[p];if(g&&_){var S=i[c],I=t.sourceWeight(o),L=g.minX+(g.value-S)/g.value*g.width,F=L+I/g.value*g.width;i[c]-=I;var z=i[p],V=t.targetWeight(o),Q=_.minX+(_.value-z)/_.value*_.width,st=Q+V/_.value*_.width;i[p]-=V;var at=t.y;o.x=[L,F,Q,st],o.y=[at,at,at,at],o.source=g,o.target=_}})}else e.forEach(function(o){var c=r[t.source(o)],p=r[t.target(o)];c&&p&&(o.x=[c.x,p.x],o.y=[c.y,p.y],o.source=c,o.target=p)});return e}function Qk(r){return(0,b.f0)({},E1,r)}function rC(r,e){var t=Qk(r),i={},o=e.nodes,c=e.links;o.forEach(function(_){var S=t.id(_);i[S]=_}),eC(i,c,t),qx(o,t);var p=aF(o,t),g=Kk(i,c,t);return{nodes:p,links:g}}var Kx="x",km="y",jv="name",nC="source",oF={nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.5,lineWidth:2},label:{fields:["x","name"],callback:function(r,e){var t=(r[0]+r[1])/2,i=t>.5?-4:4;return{offsetX:i,content:e}},labelEmit:!0,style:{fill:"#8c8c8c"}},tooltip:{showTitle:!1,showMarkers:!1,fields:["source","target","value","isNode"],showContent:function(r){return!(0,b.U2)(r,[0,"data","isNode"])},formatter:function(r){var e=r.source,t=r.target,i=r.value;return{name:e+" -> "+t,value:i}}},interactions:[{type:"element-active"}],weight:!0,nodePaddingRatio:.1,nodeWidthRatio:.05};function iC(r){var e=r.options,t=e.data,i=e.sourceField,o=e.targetField,c=e.weightField,p=e.nodePaddingRatio,g=e.nodeWidthRatio,_=e.rawFields,S=_===void 0?[]:_,I=_x(t,i,o,c),L=rC({weight:!0,nodePaddingRatio:p,nodeWidthRatio:g},I),F=L.nodes,z=L.links,V=F.map(function(st){return(0,P.pi)((0,P.pi)({},ys(st,(0,P.pr)(["id","x","y","name"],S))),{isNode:!0})}),Q=z.map(function(st){return(0,P.pi)((0,P.pi)({source:st.source.name,target:st.target.name,name:st.source.name||st.target.name},ys(st,(0,P.pr)(["x","y","value"],S))),{isNode:!1})});return(0,P.pi)((0,P.pi)({},r),{ext:(0,P.pi)((0,P.pi)({},r.ext),{chordData:{nodesData:V,edgesData:Q}})})}function aC(r){var e,t=r.chart;return t.scale((e={x:{sync:!0,nice:!0},y:{sync:!0,nice:!0,max:1}},e[jv]={sync:"color"},e[nC]={sync:"color"},e)),r}function R0(r){var e=r.chart;return e.axis(!1),r}function Wv(r){var e=r.chart;return e.legend(!1),r}function oC(r){var e=r.chart,t=r.options,i=t.tooltip;return e.tooltip(i),r}function sC(r){var e=r.chart;return e.coordinate("polar").reflect("y"),r}function w1(r){var e=r.chart,t=r.options,i=r.ext.chordData.nodesData,o=t.nodeStyle,c=t.label,p=t.tooltip,g=e.createView();return g.data(i),vm({chart:g,options:{xField:Kx,yField:km,seriesField:jv,polygon:{style:o},label:c,tooltip:p}}),r}function uC(r){var e=r.chart,t=r.options,i=r.ext.chordData.edgesData,o=t.edgeStyle,c=t.tooltip,p=e.createView();p.data(i);var g={xField:Kx,yField:km,seriesField:nC,edge:{style:o,shape:"arc"},tooltip:c};return zv({chart:p,options:g}),r}function lC(r){var e=r.chart,t=r.options,i=t.animation;return lm(e,i,k5(e)),r}function sF(r){return Za(qo,iC,sC,aC,R0,Wv,oC,uC,w1,fu,M0,lC)(r)}var BR=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="chord",t}return e.getDefaultOptions=function(){return oF},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return sF},e}(to),cC=["x","y","r","name","value","path","depth"],Jk={colorField:"name",autoFit:!0,pointStyle:{lineWidth:0,stroke:"#fff"},legend:!1,hierarchyConfig:{size:[1,1],padding:0},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1}},Lm=4,tL=0,S1=5,C1="drilldown-bread-crumb",eL={position:"top-left",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}},Pm="hierarchy-data-transform-params",rL=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.name="drill-down",t.historyCache=[],t.breadCrumbGroup=null,t.breadCrumbCfg=eL,t}return e.prototype.click=function(){var t=(0,b.U2)(this.context,["event","data","data"]);if(!t)return!1;this.drill(t),this.drawBreadCrumb()},e.prototype.resetPosition=function(){if(this.breadCrumbGroup){var t=this.context.view.getCoordinate(),i=this.breadCrumbGroup,o=i.getBBox(),c=this.getButtonCfg().position,p={x:t.start.x,y:t.end.y-(o.height+S1*2)};t.isPolar&&(p={x:0,y:0}),c==="bottom-left"&&(p={x:t.start.x,y:t.start.y});var g=hs.transform(null,[["t",p.x+tL,p.y+o.height+S1]]);i.setMatrix(g)}},e.prototype.back=function(){(0,b.dp)(this.historyCache)&&this.backTo(this.historyCache.slice(0,-1))},e.prototype.reset=function(){this.historyCache[0]&&this.backTo(this.historyCache.slice(0,1)),this.historyCache=[],this.hideCrumbGroup()},e.prototype.drill=function(t){var i=this.context.view,o=(0,b.U2)(i,["interactions","drill-down","cfg","transformData"],function(S){return S}),c=o((0,P.pi)({data:t.data},t[Pm]));i.changeData(c);for(var p=[],g=t;g;){var _=g.data;p.unshift({id:_.name+"_"+g.height+"_"+g.depth,name:_.name,children:o((0,P.pi)({data:_},t[Pm]))}),g=g.parent}this.historyCache=(this.historyCache||[]).slice(0,-1).concat(p)},e.prototype.backTo=function(t){if(!(!t||t.length<=0)){var i=this.context.view,o=(0,b.Z$)(t).children;i.changeData(o),t.length>1?(this.historyCache=t,this.drawBreadCrumb()):(this.historyCache=[],this.hideCrumbGroup())}},e.prototype.getButtonCfg=function(){var t=this.context.view,i=(0,b.U2)(t,["interactions","drill-down","cfg","drillDownConfig"]);return hn(this.breadCrumbCfg,i==null?void 0:i.breadCrumb,this.cfg)},e.prototype.drawBreadCrumb=function(){this.drawBreadCrumbGroup(),this.resetPosition(),this.breadCrumbGroup.show()},e.prototype.drawBreadCrumbGroup=function(){var t=this,i=this.getButtonCfg(),o=this.historyCache;this.breadCrumbGroup?this.breadCrumbGroup.clear():this.breadCrumbGroup=this.context.view.foregroundGroup.addGroup({name:C1});var c=0;o.forEach(function(p,g){var _=t.breadCrumbGroup.addShape({type:"text",id:p.id,name:C1+"_"+p.name+"_text",attrs:(0,P.pi)((0,P.pi)({text:g===0&&!(0,b.UM)(i.rootText)?i.rootText:p.name},i.textStyle),{x:c,y:0})}),S=_.getBBox();if(c+=S.width+Lm,_.on("click",function(F){var z,V=F.target.get("id");if(V!==((z=(0,b.Z$)(o))===null||z===void 0?void 0:z.id)){var Q=o.slice(0,o.findIndex(function(st){return st.id===V})+1);t.backTo(Q)}}),_.on("mouseenter",function(F){var z,V=F.target.get("id");V!==((z=(0,b.Z$)(o))===null||z===void 0?void 0:z.id)?_.attr(i.activeTextStyle):_.attr({cursor:"default"})}),_.on("mouseleave",function(){_.attr(i.textStyle)}),g<o.length-1){var I=t.breadCrumbGroup.addShape({type:"text",name:i.name+"_"+p.name+"_divider",attrs:(0,P.pi)((0,P.pi)({text:i.dividerText},i.textStyle),{x:c,y:0})}),L=I.getBBox();c+=L.width+Lm}})},e.prototype.hideCrumbGroup=function(){this.breadCrumbGroup&&this.breadCrumbGroup.hide()},e.prototype.destroy=function(){this.breadCrumbGroup&&this.breadCrumbGroup.remove(),r.prototype.destroy.call(this)},e}(Pe);function nL(r){return ue()(r)==="object"&&"length"in r?r:Array.from(r)}function iL(r){for(var e=r.length,t,i;e;)i=Math.random()*e--|0,t=r[e],r[e]=r[i],r[i]=t;return r}function A1(r){for(var e=0,t=(r=iL(Array.from(r))).length,i=[],o,c;e<t;)o=r[e],c&&fC(c,o)?++e:(c=Wc(i=aL(i,o)),e=0);return c}function aL(r,e){var t,i;if(M1(e,r))return[e];for(t=0;t<r.length;++t)if(T1(e,r[t])&&M1(bg(r[t],e),r))return[r[t],e];for(t=0;t<r.length-1;++t)for(i=t+1;i<r.length;++i)if(T1(bg(r[t],r[i]),e)&&T1(bg(r[t],e),r[i])&&T1(bg(r[i],e),r[t])&&M1(hC(r[t],r[i],e),r))return[r[t],r[i],e];throw new Error}function T1(r,e){var t=r.r-e.r,i=e.x-r.x,o=e.y-r.y;return t<0||t*t<i*i+o*o}function fC(r,e){var t=r.r-e.r+Math.max(r.r,e.r,1)*1e-9,i=e.x-r.x,o=e.y-r.y;return t>0&&t*t>i*i+o*o}function M1(r,e){for(var t=0;t<e.length;++t)if(!fC(r,e[t]))return!1;return!0}function Wc(r){switch(r.length){case 1:return Qx(r[0]);case 2:return bg(r[0],r[1]);case 3:return hC(r[0],r[1],r[2])}}function Qx(r){return{x:r.x,y:r.y,r:r.r}}function bg(r,e){var t=r.x,i=r.y,o=r.r,c=e.x,p=e.y,g=e.r,_=c-t,S=p-i,I=g-o,L=Math.sqrt(_*_+S*S);return{x:(t+c+_/L*I)/2,y:(i+p+S/L*I)/2,r:(L+o+g)/2}}function hC(r,e,t){var i=r.x,o=r.y,c=r.r,p=e.x,g=e.y,_=e.r,S=t.x,I=t.y,L=t.r,F=i-p,z=i-S,V=o-g,Q=o-I,st=_-c,at=L-c,Rt=i*i+o*o-c*c,Kt=Rt-p*p-g*g+_*_,te=Rt-S*S-I*I+L*L,Ae=z*V-F*Q,hr=(V*te-Q*Kt)/(Ae*2)-i,Tr=(Q*st-V*at)/Ae,Dr=(z*Kt-F*te)/(Ae*2)-o,cn=(F*at-z*st)/Ae,Qr=Tr*Tr+cn*cn-1,Tn=2*(c+hr*Tr+Dr*cn),xi=hr*hr+Dr*Dr-c*c,va=-(Qr?(Tn+Math.sqrt(Tn*Tn-4*Qr*xi))/(2*Qr):xi/Tn);return{x:i+hr+Tr*va,y:o+Dr+cn*va,r:va}}function pC(r,e,t){var i=r.x-e.x,o,c,p=r.y-e.y,g,_,S=i*i+p*p;S?(c=e.r+t.r,c*=c,_=r.r+t.r,_*=_,c>_?(o=(S+_-c)/(2*S),g=Math.sqrt(Math.max(0,_/S-o*o)),t.x=r.x-o*i-g*p,t.y=r.y-o*p+g*i):(o=(S+c-_)/(2*S),g=Math.sqrt(Math.max(0,c/S-o*o)),t.x=e.x+o*i-g*p,t.y=e.y+o*p+g*i)):(t.x=e.x+t.r,t.y=e.y)}function Om(r,e){var t=r.r+e.r-1e-6,i=e.x-r.x,o=e.y-r.y;return t>0&&t*t>i*i+o*o}function I1(r){var e=r._,t=r.next._,i=e.r+t.r,o=(e.x*t.r+t.x*e.r)/i,c=(e.y*t.r+t.y*e.r)/i;return o*o+c*c}function Fm(r){this._=r,this.next=null,this.previous=null}function dC(r){if(!(o=(r=nL(r)).length))return 0;var e,t,i,o,c,p,g,_,S,I,L;if(e=r[0],e.x=0,e.y=0,!(o>1))return e.r;if(t=r[1],e.x=-t.r,t.x=e.r,t.y=0,!(o>2))return e.r+t.r;pC(t,e,i=r[2]),e=new Fm(e),t=new Fm(t),i=new Fm(i),e.next=i.previous=t,t.next=e.previous=i,i.next=t.previous=e;t:for(g=3;g<o;++g){pC(e._,t._,i=r[g]),i=new Fm(i),_=t.next,S=e.previous,I=t._.r,L=e._.r;do if(I<=L){if(Om(_._,i._)){t=_,e.next=t,t.previous=e,--g;continue t}I+=_._.r,_=_.next}else{if(Om(S._,i._)){e=S,e.next=t,t.previous=e,--g;continue t}L+=S._.r,S=S.previous}while(_!==S.next);for(i.previous=e,i.next=t,e.next=t.previous=t=i,c=I1(e);(i=i.next)!==t;)(p=I1(i))<c&&(e=i,c=p);t=e.next}for(e=[t._],i=t;(i=i.next)!==t;)e.push(i._);for(i=A1(e),g=0;g<o;++g)e=r[g],e.x-=i.x,e.y-=i.y;return i.r}function k1(r){return dC(r),r}function Jx(r){return r==null?null:L1(r)}function L1(r){if(typeof r!="function")throw new Error;return r}function id(){return 0}function bp(r){return function(){return r}}function oL(r){return Math.sqrt(r.value)}function vC(){var r=null,e=1,t=1,i=id;function o(c){return c.x=e/2,c.y=t/2,r?c.eachBefore(gC(r)).eachAfter(tb(i,.5)).eachBefore(eb(1)):c.eachBefore(gC(oL)).eachAfter(tb(id,1)).eachAfter(tb(i,c.r/Math.min(e,t))).eachBefore(eb(Math.min(e,t)/(2*c.r))),c}return o.radius=function(c){return arguments.length?(r=Jx(c),o):r},o.size=function(c){return arguments.length?(e=+c[0],t=+c[1],o):[e,t]},o.padding=function(c){return arguments.length?(i=typeof c=="function"?c:bp(+c),o):i},o}function gC(r){return function(e){e.children||(e.r=Math.max(0,+r(e)||0))}}function tb(r,e){return function(t){if(i=t.children){var i,o,c=i.length,p=r(t)*e||0,g;if(p)for(o=0;o<c;++o)i[o].r+=p;if(g=dC(i),p)for(o=0;o<c;++o)i[o].r-=p;t.r=g+p}}}function eb(r){return function(e){var t=e.parent;e.r*=r,t&&(e.x=t.x+r*e.x,e.y=t.y+r*e.y)}}var sL=nt(39620),mC=nt.n(sL);function yC(r){var e=0,t=r.children,i=t&&t.length;if(!i)e=1;else for(;--i>=0;)e+=t[i].value;r.value=e}function _C(){return this.eachAfter(yC)}var xC=nt(14912),rb=nt.n(xC);function uL(r,e){var t=-1,i=rb()(this),o;try{for(i.s();!(o=i.n()).done;){var c=o.value;r.call(e,c,++t,this)}}catch(p){i.e(p)}finally{i.f()}return this}function P1(r,e){for(var t=this,i=[t],o,c,p=-1;t=i.pop();)if(r.call(e,t,++p,this),o=t.children)for(c=o.length-1;c>=0;--c)i.push(o[c]);return this}function nb(r,e){for(var t=this,i=[t],o=[],c,p,g,_=-1;t=i.pop();)if(o.push(t),c=t.children)for(p=0,g=c.length;p<g;++p)i.push(c[p]);for(;t=o.pop();)r.call(e,t,++_,this);return this}function bC(r,e){var t=-1,i=rb()(this),o;try{for(i.s();!(o=i.n()).done;){var c=o.value;if(r.call(e,c,++t,this))return c}}catch(p){i.e(p)}finally{i.f()}}function lL(r){return this.eachAfter(function(e){for(var t=+r(e.data)||0,i=e.children,o=i&&i.length;--o>=0;)t+=i[o].value;e.value=t})}function cL(r){return this.eachBefore(function(e){e.children&&e.children.sort(r)})}function fL(r){for(var e=this,t=hL(e,r),i=[e];e!==t;)e=e.parent,i.push(e);for(var o=i.length;r!==t;)i.splice(o,0,r),r=r.parent;return i}function hL(r,e){if(r===e)return r;var t=r.ancestors(),i=e.ancestors(),o=null;for(r=t.pop(),e=i.pop();r===e;)o=r,r=t.pop(),e=i.pop();return o}function Rm(){for(var r=this,e=[r];r=r.parent;)e.push(r);return e}function EC(){return Array.from(this)}function pL(){var r=[];return this.eachBefore(function(e){e.children||r.push(e)}),r}function wC(){var r=this,e=[];return r.each(function(t){t!==r&&e.push({source:t.parent,target:t})}),e}var SC=nt(84019),ib=nt.n(SC),dL=ib()().mark(CC);function CC(){var r,e,t,i,o,c;return ib()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:r=this,t=[r];case 1:e=t.reverse(),t=[];case 2:if(!(r=e.pop())){g.next=8;break}return g.next=5,r;case 5:if(i=r.children)for(o=0,c=i.length;o<c;++o)t.push(i[o]);g.next=2;break;case 8:if(t.length){g.next=1;break}case 9:case"end":return g.stop()}},dL,this)}function Eg(r,e){r instanceof Map?(r=[void 0,r],e===void 0&&(e=AC)):e===void 0&&(e=gL);for(var t=new D0(r),i,o=[t],c,p,g,_;i=o.pop();)if((p=e(i.data))&&(_=(p=Array.from(p)).length))for(i.children=p,g=_-1;g>=0;--g)o.push(c=p[g]=new D0(p[g])),c.parent=i,c.depth=i.depth+1;return t.eachBefore(ab)}function vL(){return Eg(this).eachBefore(mL)}function gL(r){return r.children}function AC(r){return Array.isArray(r)?r[1]:null}function mL(r){r.data.value!==void 0&&(r.value=r.data.value),r.data=r.data.data}function ab(r){var e=0;do r.height=e;while((r=r.parent)&&r.height<++e)}function D0(r){this.data=r,this.depth=this.height=0,this.parent=null}D0.prototype=Eg.prototype=mC()({constructor:D0,count:_C,each:uL,eachAfter:nb,eachBefore:P1,find:bC,sum:lL,sort:cL,path:fL,ancestors:Rm,descendants:EC,leaves:pL,links:wC,copy:vL},Symbol.iterator,CC);var ob="nodeIndex",TC="childNodeCount",sb="nodeAncestor",O1="Invalid field: it must be a string!";function ub(r,e){var t=r.field,i=r.fields;if((0,b.HD)(t))return t;if((0,b.kJ)(t))return console.warn(O1),t[0];if(console.warn(O1+" will try to get fields instead."),(0,b.HD)(i))return i;if((0,b.kJ)(i)&&i.length)return i[0];if(e)return e;throw new TypeError(O1)}function lb(r){var e=[];if(r&&r.each){var t,i;r.each(function(o){var c,p;o.parent!==t?(t=o.parent,i=0):i+=1;var g=(0,b.hX)((((c=o.ancestors)===null||c===void 0?void 0:c.call(o))||[]).map(function(_){return e.find(function(S){return S.name===_.name})||_}),function(_){var S=_.depth;return S>0&&S<o.depth});o[sb]=g,o[TC]=((p=o.children)===null||p===void 0?void 0:p.length)||0,o[ob]=i,e.push(o)})}else r&&r.eachNode&&r.eachNode(function(o){e.push(o)});return e}var yL={field:"value",as:["x","y","r"],sort:function(r,e){return e.value-r.value}};function cb(r,e){e=(0,b.f0)({},yL,e);var t=e.as;if(!(0,b.kJ)(t)||t.length!==3)throw new TypeError('Invalid as: it must be an array with 3 strings (e.g. [ "x", "y", "r" ])!');var i;try{i=ub(e)}catch(S){console.warn(S)}var o=function(S){return vC().size(e.size).padding(e.padding)(Eg(S).sum(function(I){return I[i]}).sort(e.sort))},c=o(r),p=t[0],g=t[1],_=t[2];return c.each(function(S){S[p]=S.x,S[g]=S.y,S[_]=S.r}),lb(c)}function _L(r){var e=r.data,t=r.hierarchyConfig,i=r.rawFields,o=i===void 0?[]:i,c=r.enableDrillDown,p=cb(e,(0,P.pi)((0,P.pi)({},t),{field:"value",as:["x","y","r"]})),g=[];return p.forEach(function(_){for(var S,I=_.data.name,L=(0,P.pi)({},_);L.depth>1;)I=((S=L.parent.data)===null||S===void 0?void 0:S.name)+" / "+I,L=L.parent;if(c&&_.depth>2)return null;var F=hn({},_.data,(0,P.pi)((0,P.pi)((0,P.pi)({},ys(_.data,o)),{path:I}),_));F.ext=t,F[Pm]={hierarchyConfig:t,rawFields:o,enableDrillDown:c},g.push(F)}),g}function fb(r,e,t){var i=bx([r,e]),o=i[0],c=i[1],p=i[2],g=i[3],_=t.width,S=t.height,I=_-(g+c),L=S-(o+p),F=Math.min(I,L),z=(I-F)/2,V=(L-F)/2,Q=o+V,st=c+z,at=p+V,Rt=g+z,Kt=[Q,st,at,Rt],te=F<0?0:F;return{finalPadding:Kt,finalSize:te}}function MC(r){var e=r.chart,t=Math.min(e.viewBBox.width,e.viewBBox.height);return hn({options:{size:function(i){var o=i.r;return o*t}}},r)}function IC(r){var e=r.options,t=r.chart,i=t.viewBBox,o=e.padding,c=e.appendPadding,p=e.drilldown,g=c;if(p!=null&&p.enabled){var _=sm(t.appendPadding,(0,b.U2)(p,["breadCrumb","position"]));g=bx([_,c])}var S=fb(o,g,i).finalPadding;return t.padding=S,t.appendPadding=0,r}function hb(r){var e=r.chart,t=r.options,i=e.padding,o=e.appendPadding,c=t.color,p=t.colorField,g=t.pointStyle,_=t.hierarchyConfig,S=t.sizeField,I=t.rawFields,L=I===void 0?[]:I,F=t.drilldown,z=_L({data:t.data,hierarchyConfig:_,enableDrillDown:F==null?void 0:F.enabled,rawFields:L});e.data(z);var V=e.viewBBox,Q=fb(i,o,V).finalSize,st=function(at){var Rt=at.r;return Rt*Q};return S&&(st=function(at){return at[S]*Q}),Zf(hn({},r,{options:{xField:"x",yField:"y",seriesField:p,sizeField:S,rawFields:(0,P.pr)(cC,L),point:{color:c,style:g,shape:"circle",size:st}}})),r}function pb(r){return Za(Mo({},{x:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0},y:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0}}))(r)}function yf(r){var e=r.chart,t=r.options,i=t.tooltip;if(i===!1)e.tooltip(!1);else{var o=i;(0,b.U2)(i,"fields")||(o=hn({},{customItems:function(c){return c.map(function(p){var g=(0,b.U2)(e.getOptions(),"scales"),_=(0,b.U2)(g,["name","formatter"],function(I){return I}),S=(0,b.U2)(g,["value","formatter"],function(I){return I});return(0,P.pi)((0,P.pi)({},p),{name:_(p.data.name),value:S(p.data.value)})})}},o)),e.tooltip(o)}return r}function db(r){var e=r.chart;return e.axis(!1),r}function wg(r){var e=r.drilldown,t=r.interactions,i=t===void 0?[]:t;return e!=null&&e.enabled?hn({},r,{interactions:(0,P.pr)(i,[{type:"drill-down",cfg:{drillDownConfig:e,transformData:_L,enableDrillDown:!0}}])}):r}function uF(r){var e=r.chart,t=r.options;return fu({chart:e,options:wg(t)}),r}function kC(r){return Za($o("pointStyle"),MC,IC,qo,pb,hb,db,Jd,yf,uF,_s,Es())(r)}function LC(r){var e=(0,b.U2)(r,["event","data","data"],{});return(0,b.kJ)(e.children)&&e.children.length>0}function xL(r){var e=r.view.getCoordinate(),t=e.innerRadius;if(t){var i=r.event,o=i.x,c=i.y,p=e.center,g=p.x,_=p.y,S=e.getRadius()*t,I=Math.sqrt(Math.pow(g-o,2)+Math.pow(_-c,2));return I<S}return!1}jr("drill-down-action",rL),Ye("drill-down",{showEnable:[{trigger:"element:mouseenter",action:"cursor:pointer",isEnable:LC},{trigger:"element:mouseleave",action:"cursor:default"},{trigger:"element:mouseleave",action:"cursor:pointer",isEnable:xL}],start:[{trigger:"element:click",isEnable:LC,action:["drill-down-action:click"]},{trigger:"afterchangesize",action:["drill-down-action:resetPosition"]},{trigger:"click",isEnable:xL,action:["drill-down-action:back"]}]});var vb=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="circle-packing",t}return e.getDefaultOptions=function(){return Jk},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return kC},e.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},e}(to),Fc="left-axes-view",Vf="right-axes-view",gb={nice:!0,label:{autoHide:!0,autoRotate:!1}},PC=(0,P.pi)((0,P.pi)({},gb),{position:"left"}),B0=(0,P.pi)((0,P.pi)({},gb),{position:"right",grid:null}),Xv;(function(r){r.Left="Left",r.Right="Right"})(Xv||(Xv={}));var ad;(function(r){r.Line="line",r.Column="column"})(ad||(ad={}));function mb(r){return(0,b.U2)(r,"geometry")===ad.Line}function yb(r){return(0,b.U2)(r,"geometry")===ad.Column}function N0(r,e,t){return yb(t)?hn({},{geometry:ad.Column,label:t.label&&t.isRange?{content:function(i){var o;return(o=i[e])===null||o===void 0?void 0:o.join("-")}}:void 0},t):(0,P.pi)({geometry:ad.Line},t)}function OC(r,e){var t=r[0],i=r[1];if((0,b.kJ)(e)){var o=e[0],c=e[1];return[o,c]}var p=(0,b.U2)(e,t),g=(0,b.U2)(e,i);return[p,g]}function FC(r,e){return e===Xv.Left?r===!1?!1:hn({},PC,r):e===Xv.Right?r===!1?!1:hn({},B0,r):r}function lF(r){var e=r.options,t=r.chart,i=e.geometryOption,o=i.isStack,c=i.color,p=i.seriesField,g=i.groupField,_=i.isGroup,S=["xField","yField"];if(mb(i)){I0(hn({},r,{options:(0,P.pi)((0,P.pi)((0,P.pi)({},ys(e,S)),i),{line:{color:i.color,style:i.lineStyle}})})),Zf(hn({},r,{options:(0,P.pi)((0,P.pi)((0,P.pi)({},ys(e,S)),i),{point:i.point&&(0,P.pi)({color:c,shape:"circle"},i.point)})}));var I=[];_&&I.push({type:"dodge",dodgeBy:g||p,customOffset:0}),o&&I.push({type:"stack"}),I.length&&(0,b.S6)(t.geometries,function(L){L.adjust(I)})}return yb(i)&&p1(hn({},r,{options:(0,P.pi)((0,P.pi)((0,P.pi)({},ys(e,S)),i),{widthRatio:i.columnWidthRatio,interval:(0,P.pi)((0,P.pi)({},ys(i,["color"])),{style:i.columnStyle})})})),r}function bL(r){var e=r.view,t=r.geometryOption,i=r.yField,o=r.legend,c=(0,b.U2)(o,"marker"),p=Pc(e,mb(t)?"line":"interval");if(!t.seriesField){var g=(0,b.U2)(e,"options.scales."+i+".alias")||i,_=p.getAttribute("color"),S=e.getTheme().defaultColor;_&&(S=hs.getMappingValue(_,g,(0,b.U2)(_,["values",0],S)));var I=((0,b.mf)(c)?c:!(0,b.xb)(c)&&hn({},{style:{stroke:S,fill:S}},c))||(mb(t)?{symbol:function(F,z,V){return[["M",F-V,z],["L",F+V,z]]},style:{lineWidth:2,r:6,stroke:S}}:{symbol:"square",style:{fill:S}});return[{value:i,name:g,marker:I,isGeometry:!0,viewId:e.id}]}var L=p.getGroupAttributes();return(0,b.u4)(L,function(F,z){var V=hs.getLegendItems(e,p,z,e.getTheme(),c);return F.concat(V)},[])}var EL=function(r,e){var t=e[0],i=e[1],o=r.getOptions().data,c=r.getXScale(),p=(0,b.dp)(o);if(!(!c||!p)){var g=!0,_=(0,b.I)(o,c.field),S=g?_:_.reverse(),I=(0,b.dp)(S),L=Math.floor(t*(I-1)),F=Math.floor(i*(I-1));r.filter(c.field,function(z){var V=S.indexOf(z);return V>-1?L5(V,L,F):!0}),r.getRootView().render(!0)}};function cF(r){var e,t=r.options,i=t.geometryOptions,o=i===void 0?[]:i,c=t.xField,p=t.yField,g=(0,b.yW)(o,function(_){var S=_.geometry;return S===ad.Line||S===void 0});return hn({},{options:{geometryOptions:[],meta:(e={},e[c]={type:"cat",sync:!0,range:g?[0,1]:void 0},e),tooltip:{showMarkers:g,showCrosshairs:g,shared:!0,crosshairs:{type:"x"}},interactions:g?[{type:"legend-visible-filter"}]:[{type:"legend-visible-filter"},{type:"active-region"}],legend:{position:"top-left"}}},r,{options:{yAxis:OC(p,t.yAxis),geometryOptions:[N0(c,p[0],o[0]),N0(c,p[1],o[1])],annotations:OC(p,t.annotations)}})}function fF(r){var e,t,i=r.chart,o=r.options,c=o.geometryOptions,p={line:0,column:1},g=[{type:(e=c[0])===null||e===void 0?void 0:e.geometry,id:Fc},{type:(t=c[1])===null||t===void 0?void 0:t.geometry,id:Vf}];return g.sort(function(_,S){return-p[_.type]+p[S.type]}).forEach(function(_){return i.createView({id:_.id})}),r}function hF(r){var e=r.chart,t=r.options,i=t.xField,o=t.yField,c=t.geometryOptions,p=t.data,g=t.tooltip,_=[(0,P.pi)((0,P.pi)({},c[0]),{id:Fc,data:p[0],yField:o[0]}),(0,P.pi)((0,P.pi)({},c[1]),{id:Vf,data:p[1],yField:o[1]})];return _.forEach(function(S){var I=S.id,L=S.data,F=S.yField,z=yb(S)&&S.isPercent,V=z?jw(L,F,i,F):L,Q=xo(e,I).data(V),st=z?(0,P.pi)({formatter:function(at){return{name:at[S.seriesField]||F,value:(Number(at[F])*100).toFixed(2)+"%"}}},g):g;lF({chart:Q,options:{xField:i,yField:F,tooltip:st,geometryOption:S}})}),r}function pF(r){var e,t=r.chart,i=r.options,o=i.geometryOptions,c=((e=t.getTheme())===null||e===void 0?void 0:e.colors10)||[],p=0;return t.once("beforepaint",function(){(0,b.S6)(o,function(g,_){var S=xo(t,_===0?Fc:Vf);if(!g.color){var I=S.getGroupScales(),L=(0,b.U2)(I,[0,"values","length"],1),F=c.slice(p,p+L).concat(_===0?[]:c);S.geometries.forEach(function(z){g.seriesField?z.color(g.seriesField,F):z.color(F[0])}),p+=L}}),t.render(!0)}),r}function RC(r){var e,t,i=r.chart,o=r.options,c=o.xAxis,p=o.yAxis,g=o.xField,_=o.yField;return Mo((e={},e[g]=c,e[_[0]]=p[0],e))(hn({},r,{chart:xo(i,Fc)})),Mo((t={},t[g]=c,t[_[1]]=p[1],t))(hn({},r,{chart:xo(i,Vf)})),r}function _b(r){var e=r.chart,t=r.options,i=xo(e,Fc),o=xo(e,Vf),c=t.xField,p=t.yField,g=t.xAxis,_=t.yAxis;return e.axis(c,!1),e.axis(p[0],!1),e.axis(p[1],!1),i.axis(c,g),i.axis(p[0],FC(_[0],Xv.Left)),o.axis(c,!1),o.axis(p[1],FC(_[1],Xv.Right)),r}function dF(r){var e=r.chart,t=r.options,i=t.tooltip,o=xo(e,Fc),c=xo(e,Vf);return e.tooltip(i),o.tooltip({shared:!0}),c.tooltip({shared:!0}),r}function DC(r){var e=r.chart;return fu(hn({},r,{chart:xo(e,Fc)})),fu(hn({},r,{chart:xo(e,Vf)})),r}function wL(r){var e=r.chart,t=r.options,i=t.annotations,o=(0,b.U2)(i,[0]),c=(0,b.U2)(i,[1]);return Es(o)(hn({},r,{chart:xo(e,Fc),options:{annotations:o}})),Es(c)(hn({},r,{chart:xo(e,Vf),options:{annotations:c}})),r}function vF(r){var e=r.chart;return qo(hn({},r,{chart:xo(e,Fc)})),qo(hn({},r,{chart:xo(e,Vf)})),qo(r),r}function BC(r){var e=r.chart;return _s(hn({},r,{chart:xo(e,Fc)})),_s(hn({},r,{chart:xo(e,Vf)})),r}function SL(r){var e=r.chart,t=r.options,i=t.yAxis;return Fh(hn({},r,{chart:xo(e,Fc),options:{yAxis:i[0]}})),Fh(hn({},r,{chart:xo(e,Vf),options:{yAxis:i[1]}})),r}function gF(r){var e=r.chart,t=r.options,i=t.legend,o=t.geometryOptions,c=t.yField,p=t.data,g=xo(e,Fc),_=xo(e,Vf);if(i===!1)e.legend(!1);else if((0,b.Kn)(i)&&i.custom===!0)e.legend(i);else{var S=(0,b.U2)(o,[0,"legend"],i),I=(0,b.U2)(o,[1,"legend"],i);e.once("beforepaint",function(){var L=p[0].length?bL({view:g,geometryOption:o[0],yField:c[0],legend:S}):[],F=p[1].length?bL({view:_,geometryOption:o[1],yField:c[1],legend:I}):[];e.legend(hn({},i,{custom:!0,items:L.concat(F)}))}),o[0].seriesField&&g.legend(o[0].seriesField,S),o[1].seriesField&&_.legend(o[1].seriesField,I),e.on("legend-item:click",function(L){var F=(0,b.U2)(L,"gEvent.delegateObject",{});if(F&&F.item){var z=F.item,V=z.value,Q=z.isGeometry,st=z.viewId;if(Q){var at=(0,b.cx)(c,function(te){return te===V});if(at>-1){var Rt=(0,b.U2)(xo(e,st),"geometries");(0,b.S6)(Rt,function(te){te.changeVisible(!F.item.unchecked)})}}else{var Kt=(0,b.U2)(e.getController("legend"),"option.items",[]);(0,b.S6)(e.views,function(te){var Ae=te.getGroupScales();(0,b.S6)(Ae,function(hr){hr.values&&hr.values.indexOf(V)>-1&&te.filter(hr.field,function(Tr){var Dr=(0,b.sE)(Kt,function(cn){return cn.value===Tr});return!Dr.unchecked})}),e.render(!0)})}}})}return r}function NC(r){var e=r.chart,t=r.options,i=t.slider,o=xo(e,Fc),c=xo(e,Vf);return i&&(o.option("slider",i),o.on("slider:valuechanged",function(p){var g=p.event,_=g.value,S=g.originValue;(0,b.Xy)(_,S)||EL(c,_)}),e.once("afterpaint",function(){if(!(0,b.jn)(i)){var p=i.start,g=i.end;(p||g)&&EL(c,[p,g])}})),r}function CL(r){return Za(cF,fF,vF,hF,RC,_b,SL,dF,DC,wL,BC,pF,gF,NC)(r)}var NR=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dual-axes",t}return e.prototype.getDefaultOptions=function(){return hn({},r.prototype.getDefaultOptions.call(this),{yAxis:[],syncViewPadding:!0})},e.prototype.getSchemaAdaptor=function(){return CL},e}(to);function F1(r,e){var t=e.data,i=e.coordinate,o=e.interactions,c=e.annotations,p=e.animation,g=e.tooltip,_=e.axes,S=e.meta,I=e.geometries;t&&r.data(t);var L={};_&&(0,b.S6)(_,function(F,z){L[z]=ys(F,Uf)}),L=hn({},S,L),r.scale(L),i&&r.coordinate(i),_===!1?r.axis(!1):(0,b.S6)(_,function(F,z){r.axis(z,F)}),(0,b.S6)(I,function(F){var z=Bu({chart:r,options:F}).ext,V=F.adjust;V&&z.geometry.adjust(V)}),(0,b.S6)(o,function(F){F.enable===!1?r.removeInteraction(F.type):r.interaction(F.type,F.cfg)}),(0,b.S6)(c,function(F){r.annotation()[F.type]((0,P.pi)({},F))}),lm(r,p),g?(r.interaction("tooltip"),r.tooltip(g)):g===!1&&r.removeInteraction("tooltip")}function AL(r){var e=r.chart,t=r.options,i=t.type,o=t.data,c=t.fields,p=t.eachView,g=(0,b.CE)(t,["type","data","fields","eachView","axes","meta","tooltip","coordinate","theme","legend","interactions","annotations"]);return e.data(o),e.facet(i,(0,P.pi)((0,P.pi)({},g),{fields:c,eachView:function(_,S){var I=p(_,S);if(I.geometries)F1(_,I);else{var L=I,F=L.options;F.tooltip&&_.interaction("tooltip"),Gx(L.type,_,F)}}})),r}function mF(r){var e=r.chart,t=r.options,i=t.axes,o=t.meta,c=t.tooltip,p=t.coordinate,g=t.theme,_=t.legend,S=t.interactions,I=t.annotations,L={};return i&&(0,b.S6)(i,function(F,z){L[z]=ys(F,Uf)}),L=hn({},o,L),e.scale(L),e.coordinate(p),i?(0,b.S6)(i,function(F,z){e.axis(z,F)}):e.axis(!1),c?(e.interaction("tooltip"),e.tooltip(c)):c===!1&&e.removeInteraction("tooltip"),e.legend(_),g&&e.theme(g),(0,b.S6)(S,function(F){F.enable===!1?e.removeInteraction(F.type):e.interaction(F.type,F.cfg)}),(0,b.S6)(I,function(F){e.annotation()[F.type]((0,P.pi)({},F))}),r}function z0(r){return Za(qo,AL,mF)(r)}var zC={title:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},rowTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},columnTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}}},xb=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="area",t}return e.getDefaultOptions=function(){return zC},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return z0},e}(to);function TL(r){var e=r.chart,t=r.options,i=t.data,o=t.type,c=t.xField,p=t.yField,g=t.colorField,_=t.sizeField,S=t.sizeRatio,I=t.shape,L=t.color,F=t.tooltip,z=t.heatmapStyle,V=t.meta;e.data(i);var Q="polygon";o==="density"&&(Q="heatmap");var st=yp(F,[c,p,g]),at=st.fields,Rt=st.formatter,Kt=1;return(S||S===0)&&(!I&&!_?console.warn("sizeRatio is not in effect: Must define shape or sizeField first"):S<0||S>1?console.warn("sizeRatio is not in effect: It must be a number in [0,1]"):Kt=S),Bu(hn({},r,{options:{type:Q,colorField:g,tooltipFields:at,shapeField:_||"",label:void 0,mapping:{tooltip:Rt,shape:I&&(_?function(te){var Ae=i.map(function(cn){return cn[_]}),hr=(V==null?void 0:V[_])||{},Tr=hr.min,Dr=hr.max;return Tr=(0,b.hj)(Tr)?Tr:Math.min.apply(Math,Ae),Dr=(0,b.hj)(Dr)?Dr:Math.max.apply(Math,Ae),[I,((0,b.U2)(te,_)-Tr)/(Dr-Tr),Kt]}:function(){return[I,1,Kt]}),color:L||g&&e.getTheme().sequenceColors.join("-"),style:z}}})),r}function ML(r){var e,t=r.options,i=t.xAxis,o=t.yAxis,c=t.xField,p=t.yField;return Za(Mo((e={},e[c]=i,e[p]=o,e)))(r)}function Sg(r){var e=r.chart,t=r.options,i=t.xAxis,o=t.yAxis,c=t.xField,p=t.yField;return i===!1?e.axis(c,!1):e.axis(c,i),o===!1?e.axis(p,!1):e.axis(p,o),r}function IL(r){var e=r.chart,t=r.options,i=t.legend,o=t.colorField,c=t.sizeField,p=t.sizeLegend,g=i!==!1;return o&&e.legend(o,g?i:!1),c&&e.legend(c,p===void 0?i:p),!g&&!p&&e.legend(!1),r}function kL(r){var e=r.chart,t=r.options,i=t.label,o=t.colorField,c=t.type,p=Pc(e,c==="density"?"heatmap":"polygon");if(!i)p.label(!1);else if(o){var g=i.callback,_=(0,P._T)(i,["callback"]);p.label({fields:[o],callback:g,cfg:ec(_)})}return r}function yF(r){var e,t,i=r.chart,o=r.options,c=o.coordinate,p=o.reflect,g=hn({actions:[]},c!=null?c:{type:"rect"});return p&&((t=(e=g.actions)===null||e===void 0?void 0:e.push)===null||t===void 0||t.call(e,["reflect",p])),i.coordinate(g),r}function _F(r){return Za(qo,$o("heatmapStyle"),ML,yF,TL,Sg,IL,zl,kL,Es(),fu,_s,M0)(r)}var xF=hn({},to.getDefaultOptions(),{type:"polygon",legend:!1,coordinate:{type:"rect"},xAxis:{tickLine:null,line:null,grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}},yAxis:{grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}}});wi("polygon","circle",{draw:function(r,e){var t,i,o=r.x,c=r.y,p=this.parsePoints(r.points),g=Math.abs(p[2].x-p[1].x),_=Math.abs(p[1].y-p[0].y),S=Math.min(g,_)/2,I=Number(r.shape[1]),L=Number(r.shape[2]),F=Math.sqrt(L),z=S*F*Math.sqrt(I),V=((t=r.style)===null||t===void 0?void 0:t.fill)||r.color||((i=r.defaultStyle)===null||i===void 0?void 0:i.fill),Q=e.addShape("circle",{attrs:(0,P.pi)((0,P.pi)((0,P.pi)({x:o,y:c,r:z},r.defaultStyle),r.style),{fill:V})});return Q}}),wi("polygon","square",{draw:function(r,e){var t,i,o=r.x,c=r.y,p=this.parsePoints(r.points),g=Math.abs(p[2].x-p[1].x),_=Math.abs(p[1].y-p[0].y),S=Math.min(g,_),I=Number(r.shape[1]),L=Number(r.shape[2]),F=Math.sqrt(L),z=S*F*Math.sqrt(I),V=((t=r.style)===null||t===void 0?void 0:t.fill)||r.color||((i=r.defaultStyle)===null||i===void 0?void 0:i.fill),Q=e.addShape("rect",{attrs:(0,P.pi)((0,P.pi)((0,P.pi)({x:o-z/2,y:c-z/2,width:z,height:z},r.defaultStyle),r.style),{fill:V})});return Q}});var zR=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="heatmap",t}return e.getDefaultOptions=function(){return xF},e.prototype.getSchemaAdaptor=function(){return _F},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e}(to),bF="liquid";function LL(r){return[{percent:r,type:bF}]}function EF(r){var e=r.chart,t=r.options,i=t.percent,o=t.liquidStyle,c=t.radius,p=t.outline,g=t.wave,_=t.shape,S=t.shapeStyle,I=t.animation;e.scale({percent:{min:0,max:1}}),e.data(LL(i));var L=t.color||e.getTheme().defaultColor,F=hn({},r,{options:{xField:"type",yField:"percent",widthRatio:c,interval:{color:L,style:o,shape:"liquid-fill-gauge"}}}),z=pc(F).ext,V=z.geometry,Q=e.getTheme().background,st={percent:i,radius:c,outline:p,wave:g,shape:_,shapeStyle:S,background:Q,animation:I};return V.customInfo(st),e.legend(!1),e.axis(!1),e.tooltip(!1),r}function bb(r,e){var t=r.chart,i=r.options,o=i.statistic,c=i.percent,p=i.meta;t.getController("annotation").clear(!0);var g=(0,b.U2)(p,["percent","formatter"])||function(S){return(S*100).toFixed(2)+"%"},_=o.content;return _&&(_=hn({},_,{content:(0,b.UM)(_.content)?g(c):_.content})),i1(t,{statistic:(0,P.pi)((0,P.pi)({},o),{content:_}),plotType:"liquid"},{percent:c}),e&&t.render(!0),r}function UC(r){return Za(qo,$o("liquidStyle"),EF,bb,Mo({}),_s,fu)(r)}var wF={radius:.9,statistic:{title:!1,content:{style:{opacity:.75,fontSize:"30px",lineHeight:"30px",textAlign:"center"}}},outline:{border:2,distance:0},wave:{count:3,length:192},shape:"circle"},R1=5e3;function Cg(r,e,t){return r+(e-r)*t}function SF(r){var e=(0,P.pi)({opacity:1},r.style);return r.color&&!e.fill&&(e.fill=r.color),e}function Eb(r){var e={fill:"#fff",fillOpacity:0,lineWidth:4},t=(0,b.CD)({},e,r.style);return r.color&&!t.stroke&&(t.stroke=r.color),(0,b.hj)(r.opacity)&&(t.opacity=t.strokeOpacity=r.opacity),t}function wb(r,e,t,i){return e===0?[[r+1/2*t/Math.PI/2,i/2],[r+1/2*t/Math.PI,i],[r+t/4,i]]:e===1?[[r+1/2*t/Math.PI/2*(Math.PI-2),i],[r+1/2*t/Math.PI/2*(Math.PI-1),i/2],[r+t/4,0]]:e===2?[[r+1/2*t/Math.PI/2,-i/2],[r+1/2*t/Math.PI,-i],[r+t/4,-i]]:[[r+1/2*t/Math.PI/2*(Math.PI-2),-i],[r+1/2*t/Math.PI/2*(Math.PI-1),-i/2],[r+t/4,0]]}function Dm(r,e,t,i,o,c,p){for(var g=Math.ceil(2*r/t*4)*4,_=[],S=i;S<-Math.PI*2;)S+=Math.PI*2;for(;S>0;)S-=Math.PI*2;S=S/Math.PI/2*t;var I=c-r+S-r*2;_.push(["M",I,e]);for(var L=0,F=0;F<g;++F){var z=F%4,V=wb(F*t/4,z,t,o);_.push(["C",V[0][0]+I,-V[0][1]+e,V[1][0]+I,-V[1][1]+e,V[2][0]+I,-V[2][1]+e]),F===g-1&&(L=V[2][0])}return _.push(["L",L+I,p+r]),_.push(["L",I,p+r]),_.push(["Z"]),_}function PL(r,e,t,i,o,c,p,g,_,S){for(var I=o.fill,L=o.opacity,F=p.getBBox(),z=F.maxX-F.minX,V=F.maxY-F.minY,Q=0;Q<i;Q++){var st=i<=1?1:Q/(i-1),at=c.addShape("path",{name:"waterwave-path",attrs:{path:Dm(g,F.minY+V*t,_,0,z/32,r,e),fill:I,opacity:Cg(.2,.9,st)*L}});try{if(S===!1)return;var Rt=Rx([["t",_,0]]);at.stopAnimate(),at.animate({matrix:Rt},{duration:Cg(.5*R1,R1,st),repeat:!0})}catch(Kt){console.warn("off-screen group animate error!")}}}function ZC(r,e,t,i){var o=t*2/3,c=Math.max(o,i),p=o/2,g=r,_=p+e-c/2,S=Math.asin(p/((c-p)*.85)),I=Math.sin(S)*p,L=Math.cos(S)*p,F=g-L,z=_+I,V=r,Q=_+p/Math.sin(S);return`
|
|
M `+F+" "+z+`
|
|
A `+p+" "+p+" 0 1 1 "+(F+L*2)+" "+z+`
|
|
Q `+V+" "+Q+" "+r+" "+(e+c/2)+`
|
|
Q `+V+" "+Q+" "+F+" "+z+`
|
|
Z
|
|
`}function dc(r,e,t,i){var o=t/2,c=i/2;return`
|
|
M `+r+" "+(e-c)+`
|
|
a `+o+" "+c+" 0 1 0 0 "+c*2+`
|
|
a `+o+" "+c+" 0 1 0 0 "+-c*2+`
|
|
Z
|
|
`}function OL(r,e,t,i){var o=i/2,c=t/2;return`
|
|
M `+r+" "+(e-o)+`
|
|
L `+(r+c)+" "+e+`
|
|
L `+r+" "+(e+o)+`
|
|
L `+(r-c)+" "+e+`
|
|
Z
|
|
`}function FL(r,e,t,i){var o=i/2,c=t/2;return`
|
|
M `+r+" "+(e-o)+`
|
|
L `+(r+c)+" "+(e+o)+`
|
|
L `+(r-c)+" "+(e+o)+`
|
|
Z
|
|
`}function Ps(r,e,t,i){var o=.618,c=i/2,p=t/2*o;return`
|
|
M `+(r-p)+" "+(e-c)+`
|
|
L `+(r+p)+" "+(e-c)+`
|
|
L `+(r+p)+" "+(e+c)+`
|
|
L `+(r-p)+" "+(e+c)+`
|
|
Z
|
|
`}var VC={pin:ZC,circle:dc,diamond:OL,triangle:FL,rect:Ps};wi("interval","liquid-fill-gauge",{draw:function(r,e){var t=.5,i=.5,o=r.customInfo,c=o,p=c.percent,g=c.radius,_=c.shape,S=c.shapeStyle,I=c.background,L=c.animation,F=o.outline,z=o.wave,V=F.border,Q=F.distance,st=z.count,at=z.length,Rt=(0,b.u4)(r.points,function(Aa,ao){return Math.min(Aa,ao.x)},1/0),Kt=this.parsePoint({x:t,y:i}),te=this.parsePoint({x:Rt,y:i}),Ae=Kt.x-te.x,hr=Math.min(Ae,te.y*g),Tr=SF(r),Dr=Eb((0,b.CD)({},r,F)),cn=hr-V/2,Qr=typeof _=="function"?_:VC[_]||VC.circle,Tn=Qr(Kt.x,Kt.y,cn*2,cn*2);if(S&&e.addShape("path",{name:"shape",attrs:(0,P.pi)({path:Tn},S)}),p>0){var xi=e.addGroup({name:"waves"}),va=xi.setClip({type:"path",attrs:{path:Tn}});PL(Kt.x,Kt.y,1-r.points[1].y,st,Tr,xi,va,hr*2,at,L)}return e.addShape("path",{name:"distance",attrs:{path:Tn,fill:"transparent",lineWidth:V+Q*2,stroke:I==="transparent"?"#fff":I}}),e.addShape("path",{name:"wrap",attrs:(0,b.CD)(Dr,{path:Tn,fill:"transparent",lineWidth:V})}),e}});var D1=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="liquid",t}return e.getDefaultOptions=function(){return wF},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.changeData=function(t){this.chart.emit(At.BEFORE_CHANGE_DATA,go.fromData(this.chart,At.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(LL(t)),bb({chart:this.chart,options:this.options},!0),this.chart.emit(At.AFTER_CHANGE_DATA,go.fromData(this.chart,At.AFTER_CHANGE_DATA,null))},e.prototype.getSchemaAdaptor=function(){return UC},e}(to);function Bm(r){var e=r.chart,t=r.options,i=t.data,o=t.lineStyle,c=t.color,p=t.point,g=t.area;e.data(i);var _=hn({},r,{options:{line:{style:o,color:c},point:p&&(0,P.pi)({color:c},p),area:g&&(0,P.pi)({color:c},g),label:void 0}}),S=hn({},_,{options:{tooltip:!1}}),I=(p==null?void 0:p.state)||t.state,L=hn({},_,{options:{tooltip:!1,state:I}});return I0(_),Zf(L),rd(S),r}function RL(r){var e,t=r.options,i=t.xAxis,o=t.yAxis,c=t.xField,p=t.yField;return Za(Mo((e={},e[c]=i,e[p]=o,e)))(r)}function DL(r){var e=r.chart,t=r.options,i=t.radius,o=t.startAngle,c=t.endAngle;return e.coordinate("polar",{radius:i,startAngle:o,endAngle:c}),r}function BL(r){var e=r.chart,t=r.options,i=t.xField,o=t.xAxis,c=t.yField,p=t.yAxis;return e.axis(i,o),e.axis(c,p),r}function NL(r){var e=r.chart,t=r.options,i=t.label,o=t.yField,c=Pc(e,"line");if(!i)c.label(!1);else{var p=i.callback,g=(0,P._T)(i,["callback"]);c.label({fields:[o],callback:p,cfg:ec(g)})}return r}function zL(r){return Za(Bm,RL,qo,DL,BL,Jd,zl,NL,fu,_s,Es())(r)}var GC=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"radar-tooltip"},enumerable:!1,configurable:!0}),e.prototype.getTooltipItems=function(t){var i=this.getTooltipCfg(),o=i.shared,c=i.title,p=r.prototype.getTooltipItems.call(this,t);if(p.length>0){var g=this.view.geometries[0],_=g.dataArray,S=p[0].name,I=[];return _.forEach(function(L){L.forEach(function(F){var z=hs.getTooltipItems(F,g),V=z[0];if(!o&&V&&V.name===S){var Q=(0,b.UM)(c)?S:c;I.push((0,P.pi)((0,P.pi)({},V),{name:V.title,title:Q}))}else if(o&&V){var Q=(0,b.UM)(c)?V.name||S:c;I.push((0,P.pi)((0,P.pi)({},V),{name:V.title,title:Q}))}})}),I}return[]},e}(Qt);Mh("radar-tooltip",GC);var HC=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(){var t=this.context.view;t.removeInteraction("tooltip")},e.prototype.show=function(){var t=this.context.event,i=this.getTooltipController();i.showTooltip({x:t.x,y:t.y})},e.prototype.hide=function(){var t=this.getTooltipController();t.hideTooltip()},e.prototype.getTooltipController=function(){var t=this.context.view;return t.getController("radar-tooltip")},e}(Pe);jr("radar-tooltip",HC),Ye("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]});var CF=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="radar",t}return e.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return hn({},r.prototype.getDefaultOptions.call(this),{xAxis:{label:{offset:15},grid:{line:{type:"line"}}},yAxis:{grid:{line:{type:"circle"}}},legend:{position:"top"},tooltip:{shared:!0,showCrosshairs:!0,showMarkers:!0,crosshairs:{type:"xy",line:{style:{stroke:"#565656",lineDash:[4]}},follow:!0}}})},e.prototype.getSchemaAdaptor=function(){return zL},e}(to);function UL(r,e,t){var i=t.map(function(p){return p[e]}).filter(function(p){return p!==void 0}),o=i.length>0?Math.max.apply(Math,i):0,c=Math.abs(r)%360;return c?o*360/c:o}function ZL(r,e,t){var i=[];return r.forEach(function(o){var c=i.find(function(p){return p[e]===o[e]});c?c[t]+=o[t]||null:i.push((0,P.pi)({},o))}),i}function jC(r){var e=r.chart,t=r.options,i=t.barStyle,o=t.color,c=t.tooltip,p=t.colorField,g=t.type,_=t.xField,S=t.yField,I=t.data,L=Dv(I,S);e.data(L);var F=hn({},r,{options:{tooltip:c,seriesField:p,interval:{style:i,color:o,shape:g==="line"?"line":"intervel"},minColumnWidth:t.minBarWidth,maxColumnWidth:t.maxBarWidth,columnBackground:t.barBackground}});return pc(F),g==="line"&&Zf({chart:e,options:{xField:_,yField:S,seriesField:p,point:{shape:"circle",color:o}}}),r}function WC(r){var e,t=r.options,i=t.yField,o=t.xField,c=t.data,p=t.isStack,g=t.isGroup,_=t.colorField,S=t.maxAngle,I=p&&!g&&_?ZL(c,o,i):c,L=Dv(I,i);return Za(Mo((e={},e[i]={min:0,max:UL(S,i,L)},e)))(r)}function XC(r){var e=r.chart,t=r.options,i=t.radius,o=t.innerRadius,c=t.startAngle,p=t.endAngle;return e.coordinate({type:"polar",cfg:{radius:i,innerRadius:o,startAngle:c,endAngle:p}}).transpose(),r}function VL(r){var e=r.chart,t=r.options,i=t.xField,o=t.xAxis;return e.axis(i,o),r}function GL(r){var e=r.chart,t=r.options,i=t.label,o=t.yField,c=Pc(e,"interval");if(!i)c.label(!1);else{var p=i.callback,g=(0,P._T)(i,["callback"]);c.label({fields:[o],callback:p,cfg:(0,P.pi)((0,P.pi)({},ec(g)),{type:"polar"})})}return r}function HL(r){return Za($o("barStyle"),jC,WC,VL,XC,fu,_s,qo,zl,Jd,Es(),GL)(r)}var jL=hn({},to.getDefaultOptions(),{interactions:[{type:"element-active"}],legend:!1,tooltip:{showMarkers:!1},xAxis:{grid:null,tickLine:null,line:null},maxAngle:240}),AF=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="radial-bar",t}return e.getDefaultOptions=function(){return jL},e.prototype.changeData=function(t){this.updateOption({data:t}),WC({chart:this.chart,options:this.options}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return HL},e}(to);function WL(r){var e=r.chart,t=r.options,i=t.data,o=t.sectorStyle,c=t.color;return e.data(i),Za(pc)(hn({},r,{options:{marginRatio:1,interval:{style:o,color:c}}})),r}function XL(r){var e=r.chart,t=r.options,i=t.label,o=t.xField,c=Pc(e,"interval");if(i===!1)c.label(!1);else if((0,b.Kn)(i)){var p=i.callback,g=i.fields,_=(0,P._T)(i,["callback","fields"]),S=_.offset,I=_.layout;(S===void 0||S>=0)&&(I=I?(0,b.kJ)(I)?I:[I]:[],_.layout=(0,b.hX)(I,function(L){return L.type!=="limit-in-shape"}),_.layout.length||delete _.layout),c.label({fields:g||[o],callback:p,cfg:ec(_)})}else Qd(gp.WARN,i===null,"the label option must be an Object."),c.label({fields:[o]});return r}function YC(r){var e=r.chart,t=r.options,i=t.legend,o=t.seriesField;return i===!1?e.legend(!1):o&&e.legend(o,i),r}function YL(r){var e=r.chart,t=r.options,i=t.radius,o=t.innerRadius,c=t.startAngle,p=t.endAngle;return e.coordinate({type:"polar",cfg:{radius:i,innerRadius:o,startAngle:c,endAngle:p}}),r}function $L(r){var e,t=r.options,i=t.xAxis,o=t.yAxis,c=t.xField,p=t.yField;return Za(Mo((e={},e[c]=i,e[p]=o,e)))(r)}function qL(r){var e=r.chart,t=r.options,i=t.xAxis,o=t.yAxis,c=t.xField,p=t.yField;return i?e.axis(c,i):e.axis(c,!1),o?e.axis(p,o):e.axis(p,!1),r}function $C(r){Za($o("sectorStyle"),WL,$L,XL,YL,qL,YC,zl,fu,_s,qo,Es(),M0)(r)}var KL=hn({},to.getDefaultOptions(),{xAxis:!1,yAxis:!1,legend:{position:"right",radio:{}},sectorStyle:{stroke:"#fff",lineWidth:1},label:{layout:{type:"limit-in-shape"}},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]}),TF=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="rose",t}return e.getDefaultOptions=function(){return KL},e.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return $C},e}(to),qC="x",KC="y",QC="name",B1="nodes",Nm="edges";function QL(r,e,t){var i=[];return r.forEach(function(o){var c=o[e],p=o[t];i.includes(c)||i.push(c),i.includes(p)||i.push(p)}),i}function JL(r,e,t,i){var o={};return e.forEach(function(c){o[c]={},e.forEach(function(p){o[c][p]=0})}),r.forEach(function(c){o[c[t]][c[i]]=1}),o}function t4(r,e,t){if(!(0,b.kJ)(r))return[];var i=[],o=QL(r,e,t),c=JL(r,o,e,t),p={};o.forEach(function(_){p[_]=0});function g(_){p[_]=1,o.forEach(function(S){if(c[_][S]!=0)if(p[S]==1)i.push(_+"_"+S);else{if(p[S]==-1)return;g(S)}}),p[_]=-1}return o.forEach(function(_){p[_]!=-1&&g(_)}),i.length!==0&&console.warn("sankey data contains circle, "+i.length+" records removed.",i),r.filter(function(_){return i.findIndex(function(S){return S===_[e]+"_"+_[t]})<0})}function e4(r){return r.target.depth}function r4(r){return r.depth}function n4(r,e){return e-1-r.height}function Sb(r,e){return r.sourceLinks.length?r.depth:e-1}function i4(r){return r.targetLinks.length?r.depth:r.sourceLinks.length?(0,b.F)(r.sourceLinks,e4)-1:0}function zm(r){return function(){return r}}function Cb(r,e){for(var t=0,i=0;i<r.length;i++)t+=e(r[i]);return t}function Ab(r,e){for(var t=-1/0,i=0;i<r.length;i++)t=Math.max(e(r[i]),t);return t}function a4(r,e){for(var t=1/0,i=0;i<r.length;i++)t=Math.min(e(r[i]),t);return t}function Tb(r,e){return N1(r.source,e.source)||r.index-e.index}function JC(r,e){return N1(r.target,e.target)||r.index-e.index}function N1(r,e){return r.y0-e.y0}function Mb(r){return r.value}function o4(r){return r.index}function s4(r){return r.nodes}function u4(r){return r.links}function Ib(r,e){var t=r.get(e);if(!t)throw new Error("missing: "+e);return t}function tA(r){for(var e=r.nodes,t=0,i=e;t<i.length;t++){for(var o=i[t],c=o.y0,p=c,g=0,_=o.sourceLinks;g<_.length;g++){var S=_[g];S.y0=c+S.width/2,c+=S.width}for(var I=0,L=o.targetLinks;I<L.length;I++){var S=L[I];S.y1=p+S.width/2,p+=S.width}}}function l4(){var r=0,e=0,t=1,i=1,o=24,c=8,p,g=o4,_=Sb,S,I,L,F=s4,z=u4,V=6;function Q(Gn){var Gi={nodes:F(Gn),links:z(Gn)};return st(Gi),at(Gi),Rt(Gi),Kt(Gi),hr(Gi),tA(Gi),Gi}Q.update=function(Gn){return tA(Gn),Gn},Q.nodeId=function(Gn){return arguments.length?(g=typeof Gn=="function"?Gn:zm(Gn),Q):g},Q.nodeAlign=function(Gn){return arguments.length?(_=typeof Gn=="function"?Gn:zm(Gn),Q):_},Q.nodeDepth=function(Gn){return arguments.length?(S=Gn,Q):S},Q.nodeSort=function(Gn){return arguments.length?(I=Gn,Q):I},Q.nodeWidth=function(Gn){return arguments.length?(o=+Gn,Q):o},Q.nodePadding=function(Gn){return arguments.length?(c=p=+Gn,Q):c},Q.nodes=function(Gn){return arguments.length?(F=typeof Gn=="function"?Gn:zm(Gn),Q):F},Q.links=function(Gn){return arguments.length?(z=typeof Gn=="function"?Gn:zm(Gn),Q):z},Q.linkSort=function(Gn){return arguments.length?(L=Gn,Q):L},Q.size=function(Gn){return arguments.length?(r=e=0,t=+Gn[0],i=+Gn[1],Q):[t-r,i-e]},Q.extent=function(Gn){return arguments.length?(r=+Gn[0][0],t=+Gn[1][0],e=+Gn[0][1],i=+Gn[1][1],Q):[[r,e],[t,i]]},Q.iterations=function(Gn){return arguments.length?(V=+Gn,Q):V};function st(Gn){var Gi=Gn.nodes,ca=Gn.links;Gi.forEach(function(Ga,ps){Ga.index=ps,Ga.sourceLinks=[],Ga.targetLinks=[]});var Yi=new Map(Gi.map(function(Ga){return[g(Ga),Ga]}));if(ca.forEach(function(Ga,ps){Ga.index=ps;var Xu=Ga.source,Yu=Ga.target;typeof Xu!="object"&&(Xu=Ga.source=Ib(Yi,Xu)),typeof Yu!="object"&&(Yu=Ga.target=Ib(Yi,Yu)),Xu.sourceLinks.push(Ga),Yu.targetLinks.push(Ga)}),L!=null)for(var ra=0,Pa=Gi;ra<Pa.length;ra++){var wo=Pa[ra],Ro=wo.sourceLinks,Ka=wo.targetLinks;Ro.sort(L),Ka.sort(L)}}function at(Gn){for(var Gi=Gn.nodes,ca=0,Yi=Gi;ca<Yi.length;ca++){var ra=Yi[ca];ra.value=ra.fixedValue===void 0?Math.max(Cb(ra.sourceLinks,Mb),Cb(ra.targetLinks,Mb)):ra.fixedValue}}function Rt(Gn){for(var Gi=Gn.nodes,ca=Gi.length,Yi=new Set(Gi),ra=new Set,Pa=0;Yi.size;){if(Yi.forEach(function(Ga){Ga.depth=Pa;for(var ps=0,Xu=Ga.sourceLinks;ps<Xu.length;ps++){var Yu=Xu[ps].target;ra.add(Yu)}}),++Pa>ca)throw new Error("circular link");Yi=ra,ra=new Set}if(S)for(var wo=Math.max(Ab(Gi,function(Ga){return Ga.depth})+1,0),Ro=void 0,Ka=0;Ka<Gi.length;Ka++)Ro=Gi[Ka],Ro.depth=S.call(null,Ro,wo)}function Kt(Gn){for(var Gi=Gn.nodes,ca=Gi.length,Yi=new Set(Gi),ra=new Set,Pa=0;Yi.size;){if(Yi.forEach(function(wo){wo.height=Pa;for(var Ro=0,Ka=wo.targetLinks;Ro<Ka.length;Ro++){var Ga=Ka[Ro].source;ra.add(Ga)}}),++Pa>ca)throw new Error("circular link");Yi=ra,ra=new Set}}function te(Gn){for(var Gi=Gn.nodes,ca=Math.max(Ab(Gi,function(Yu){return Yu.depth})+1,0),Yi=(t-r-o)/(ca-1),ra=new Array(ca).fill(0).map(function(){return[]}),Pa=0,wo=Gi;Pa<wo.length;Pa++){var Ro=wo[Pa],Ka=Math.max(0,Math.min(ca-1,Math.floor(_.call(null,Ro,ca))));Ro.layer=Ka,Ro.x0=r+Ka*Yi,Ro.x1=Ro.x0+o,ra[Ka]?ra[Ka].push(Ro):ra[Ka]=[Ro]}if(I)for(var Ga=0,ps=ra;Ga<ps.length;Ga++){var Xu=ps[Ga];Xu.sort(I)}return ra}function Ae(Gn){for(var Gi=a4(Gn,function(zh){return(i-e-(zh.length-1)*p)/Cb(zh,Mb)}),ca=0,Yi=Gn;ca<Yi.length;ca++){for(var ra=Yi[ca],Pa=e,wo=0,Ro=ra;wo<Ro.length;wo++){var Ka=Ro[wo];Ka.y0=Pa,Ka.y1=Pa+Ka.value*Gi,Pa=Ka.y1+p;for(var Ga=0,ps=Ka.sourceLinks;Ga<ps.length;Ga++){var Xu=ps[Ga];Xu.width=Xu.value*Gi}}Pa=(i-Pa+p)/(ra.length+1);for(var Yu=0;Yu<ra.length;++Yu){var Ka=ra[Yu];Ka.y0+=Pa*(Yu+1),Ka.y1+=Pa*(Yu+1)}va(ra)}}function hr(Gn){var Gi=te(Gn);p=Math.min(c,(i-e)/(Ab(Gi,function(Pa){return Pa.length})-1)),Ae(Gi);for(var ca=0;ca<V;++ca){var Yi=Math.pow(.99,ca),ra=Math.max(1-Yi,(ca+1)/V);Dr(Gi,Yi,ra),Tr(Gi,Yi,ra)}}function Tr(Gn,Gi,ca){for(var Yi=1,ra=Gn.length;Yi<ra;++Yi){for(var Pa=Gn[Yi],wo=0,Ro=Pa;wo<Ro.length;wo++){for(var Ka=Ro[wo],Ga=0,ps=0,Xu=0,Yu=Ka.targetLinks;Xu<Yu.length;Xu++){var zh=Yu[Xu],Kv=zh.source,cd=zh.value,H0=cd*(Ka.layer-Kv.layer);Ga+=Aa(Kv,Ka)*H0,ps+=H0}if(ps>0){var kg=(Ga/ps-Ka.y0)*Gi;Ka.y0+=kg,Ka.y1+=kg,xi(Ka)}}I===void 0&&Pa.sort(N1),Pa.length&&cn(Pa,ca)}}function Dr(Gn,Gi,ca){for(var Yi=Gn.length,ra=Yi-2;ra>=0;--ra){for(var Pa=Gn[ra],wo=0,Ro=Pa;wo<Ro.length;wo++){for(var Ka=Ro[wo],Ga=0,ps=0,Xu=0,Yu=Ka.sourceLinks;Xu<Yu.length;Xu++){var zh=Yu[Xu],Kv=zh.target,cd=zh.value,H0=cd*(Kv.layer-Ka.layer);Ga+=ao(Ka,Kv)*H0,ps+=H0}if(ps>0){var kg=(Ga/ps-Ka.y0)*Gi;Ka.y0+=kg,Ka.y1+=kg,xi(Ka)}}I===void 0&&Pa.sort(N1),Pa.length&&cn(Pa,ca)}}function cn(Gn,Gi){var ca=Gn.length>>1,Yi=Gn[ca];Tn(Gn,Yi.y0-p,ca-1,Gi),Qr(Gn,Yi.y1+p,ca+1,Gi),Tn(Gn,i,Gn.length-1,Gi),Qr(Gn,e,0,Gi)}function Qr(Gn,Gi,ca,Yi){for(;ca<Gn.length;++ca){var ra=Gn[ca],Pa=(Gi-ra.y0)*Yi;Pa>1e-6&&(ra.y0+=Pa,ra.y1+=Pa),Gi=ra.y1+p}}function Tn(Gn,Gi,ca,Yi){for(;ca>=0;--ca){var ra=Gn[ca],Pa=(ra.y1-Gi)*Yi;Pa>1e-6&&(ra.y0-=Pa,ra.y1-=Pa),Gi=ra.y0-p}}function xi(Gn){var Gi=Gn.sourceLinks,ca=Gn.targetLinks;if(L===void 0){for(var Yi=0,ra=ca;Yi<ra.length;Yi++){var Pa=ra[Yi].source.sourceLinks;Pa.sort(JC)}for(var wo=0,Ro=Gi;wo<Ro.length;wo++){var Ka=Ro[wo].target.targetLinks;Ka.sort(Tb)}}}function va(Gn){if(L===void 0)for(var Gi=0,ca=Gn;Gi<ca.length;Gi++){var Yi=ca[Gi],ra=Yi.sourceLinks,Pa=Yi.targetLinks;ra.sort(JC),Pa.sort(Tb)}}function Aa(Gn,Gi){for(var ca=Gn.y0-(Gn.sourceLinks.length-1)*p/2,Yi=0,ra=Gn.sourceLinks;Yi<ra.length;Yi++){var Pa=ra[Yi],wo=Pa.target,Ro=Pa.width;if(wo===Gi)break;ca+=Ro+p}for(var Ka=0,Ga=Gi.targetLinks;Ka<Ga.length;Ka++){var ps=Ga[Ka],wo=ps.source,Ro=ps.width;if(wo===Gn)break;ca-=Ro}return ca}function ao(Gn,Gi){for(var ca=Gi.y0-(Gi.targetLinks.length-1)*p/2,Yi=0,ra=Gi.targetLinks;Yi<ra.length;Yi++){var Pa=ra[Yi],wo=Pa.source,Ro=Pa.width;if(wo===Gn)break;ca+=Ro+p}for(var Ka=0,Ga=Gn.sourceLinks;Ka<Ga.length;Ka++){var ps=Ga[Ka],wo=ps.target,Ro=ps.width;if(wo===Gi)break;ca-=Ro}return ca}return Q}var c4={left:r4,right:n4,center:i4,justify:Sb},f4={nodeId:function(r){return r.index},nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodeSort:void 0};function h4(r){var e=(0,b.HD)(r)?c4[r]:(0,b.mf)(r)?r:null;return e||Sb}function p4(r){return(0,b.f0)({},f4,r)}function d4(r,e){var t=p4(r),i=t.nodeId,o=t.nodeSort,c=t.nodeAlign,p=t.nodeWidth,g=t.nodePadding,_=t.nodeDepth,S=l4().nodeSort(o).nodeWidth(p).nodePadding(g).nodeDepth(_).nodeAlign(h4(c)).extent([[0,0],[1,1]]).nodeId(i),I=S(e),L=I.nodes.map(function(z){var V=z.x0,Q=z.x1,st=z.y0,at=z.y1;return z.x=[V,Q,Q,V],z.y=[st,st,at,at],z}).filter(function(z){return z.name!==null}),F=I.links.map(function(z){var V=z.source,Q=z.target,st=V.x1,at=Q.x0;z.x=[st,st,at,at];var Rt=z.width/2;return z.y=[z.y0+Rt,z.y0-Rt,z.y1+Rt,z.y1-Rt],z}).filter(function(z){var V=z.source,Q=z.target;return V.name!==null&&Q.name!==null});return{nodes:L,links:F}}function v4(r){return r==="node-link"}function eA(r,e,t){return rc(r)?r/t:e}function rA(r,e,t){return rc(r)?r/t:e}function kb(r,e,t){var i=r.dataType,o=r.data,c=r.sourceField,p=r.targetField,g=r.weightField,_=r.nodeAlign,S=r.nodeSort,I=r.nodePadding,L=r.nodePaddingRatio,F=r.nodeWidth,z=r.nodeWidthRatio,V=r.nodeDepth,Q=r.rawFields,st=Q===void 0?[]:Q,at;v4(i)?at=o:at=_x(t4(o,c,p),c,p,g,st);var Rt=d4({nodeAlign:_,nodePadding:rA(I,L,t),nodeWidth:eA(F,z,e),nodeSort:S,nodeDepth:V},at),Kt=Rt.nodes,te=Rt.links;return{nodes:Kt.map(function(Ae){return(0,P.pi)((0,P.pi)({},ys(Ae,(0,P.pr)(["x","y","name"],st))),{isNode:!0})}),edges:te.map(function(Ae){return(0,P.pi)((0,P.pi)({source:Ae.source.name,target:Ae.target.name,name:Ae.source.name||Ae.target.name},ys(Ae,(0,P.pr)(["x","y","value"],st))),{isNode:!1})})}}function Ag(r){var e=r.options,t=e.rawFields,i=t===void 0?[]:t;return hn({},{options:{tooltip:{fields:(0,b.jj)((0,P.pr)(["name","source","target","value","isNode"],i))},label:{fields:(0,b.jj)((0,P.pr)(["x","name"],i))}}},r)}function nA(r){var e=r.chart,t=r.options,i=t.color,o=t.nodeStyle,c=t.edgeStyle,p=t.label,g=t.tooltip,_=t.nodeState,S=t.edgeState;e.legend(!1),e.tooltip(g),e.axis(!1),e.coordinate().reflect("y");var I=kb(t,e.width,e.height),L=I.nodes,F=I.edges,z=e.createView({id:Nm});z.data(F),zv({chart:z,options:{xField:qC,yField:KC,seriesField:QC,edge:{color:i,style:c,shape:"arc"},tooltip:g,state:S}});var V=e.createView({id:B1});return V.data(L),vm({chart:V,options:{xField:qC,yField:KC,seriesField:QC,polygon:{color:i,style:o},label:p,tooltip:g,state:_}}),e.interaction("element-active"),e.scale({x:{sync:!0,nice:!0,min:0,max:1,minLimit:0,maxLimit:1},y:{sync:!0,nice:!0,min:0,max:1,minLimit:0,maxLimit:1},name:{sync:"color",type:"cat"}}),r}function g4(r){var e=r.chart,t=r.options,i=t.animation,o=(0,P.pr)(e.views[0].geometries,e.views[1].geometries);return lm(e,i,o),r}function m4(r){var e=r.chart,t=r.options,i=t.nodeDraggable,o="sankey-node-draggable";return i?e.interaction(o):e.removeInteraction(o),r}function y4(r){var e=r.chart,t=r.options,i=t.interactions,o=i===void 0?[]:i,c=[].concat(o,t.nodeInteractions||[]),p=[].concat(o,t.edgeInteractions||[]),g=xo(e,B1),_=xo(e,Nm);return c.forEach(function(S){(S==null?void 0:S.enable)===!1?g.removeInteraction(S.type):g.interaction(S.type,S.cfg||{})}),p.forEach(function(S){(S==null?void 0:S.enable)===!1?_.removeInteraction(S.type):_.interaction(S.type,S.cfg||{})}),r}function _4(r){return Za(Ag,nA,y4,m4,g4,qo)(r)}var Um=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.isDragging=!1,t}return e.prototype.isNodeElement=function(){var t=(0,b.U2)(this.context,"event.target");if(t){var i=t.get("element");return i&&i.getModel().data.isNode}return!1},e.prototype.getNodeView=function(){return xo(this.context.view,B1)},e.prototype.getEdgeView=function(){return xo(this.context.view,Nm)},e.prototype.getCurrentDatumIdx=function(t){return this.getNodeView().geometries[0].elements.indexOf(t)},e.prototype.start=function(){if(this.isNodeElement()){this.prevPoint={x:(0,b.U2)(this.context,"event.x"),y:(0,b.U2)(this.context,"event.y")};var t=this.context.event.target.get("element"),i=this.getCurrentDatumIdx(t);if(i===-1)return;this.currentElementIdx=i,this.context.isDragging=!0,this.isDragging=!0,this.prevNodeAnimateCfg=this.getNodeView().getOptions().animate,this.prevEdgeAnimateCfg=this.getEdgeView().getOptions().animate,this.getNodeView().animate(!1),this.getEdgeView().animate(!1)}},e.prototype.translate=function(){if(this.isDragging){var t=this.context.view,i={x:(0,b.U2)(this.context,"event.x"),y:(0,b.U2)(this.context,"event.y")},o=i.x-this.prevPoint.x,c=i.y-this.prevPoint.y,p=this.getNodeView(),g=p.geometries[0].elements[this.currentElementIdx];if(g&&g.getModel()){var _=g.getModel().data,S=p.getOptions().data,I=p.getCoordinate(),L={x:o/I.getWidth(),y:c/I.getHeight()},F=(0,P.pi)((0,P.pi)({},_),{x:_.x.map(function(at){return at+=L.x}),y:_.y.map(function(at){return at+=L.y})}),z=(0,P.pr)(S);z[this.currentElementIdx]=F,p.data(z);var V=_.name,Q=this.getEdgeView(),st=Q.getOptions().data;st.forEach(function(at){at.source===V&&(at.x[0]+=L.x,at.x[1]+=L.x,at.y[0]+=L.y,at.y[1]+=L.y),at.target===V&&(at.x[2]+=L.x,at.x[3]+=L.x,at.y[2]+=L.y,at.y[3]+=L.y)}),Q.data(st),this.prevPoint=i,t.render(!0)}}},e.prototype.end=function(){this.isDragging=!1,this.context.isDragging=!1,this.prevPoint=null,this.currentElementIdx=null,this.getNodeView().animate(this.prevNodeAnimateCfg),this.getEdgeView().animate(this.prevEdgeAnimateCfg)},e}(Pe);jr("sankey-node-drag",Um),Ye("sankey-node-draggable",{showEnable:[{trigger:"polygon:mouseenter",action:"cursor:pointer"},{trigger:"polygon:mouseleave",action:"cursor:default"}],start:[{trigger:"polygon:mousedown",action:"sankey-node-drag:start"}],processing:[{trigger:"plot:mousemove",action:"sankey-node-drag:translate"},{isEnable:function(r){return r.isDragging},trigger:"plot:mousemove",action:"cursor:move"}],end:[{trigger:"plot:mouseup",action:"sankey-node-drag:end"}]});var z1=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="sankey",t}return e.getDefaultOptions=function(){return{appendPadding:8,syncViewPadding:!0,nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.3,lineWidth:0},edgeState:{active:{style:{opacity:.8,lineWidth:0}}},label:{formatter:function(t){var i=t.name;return i},callback:function(t){var i=t[1]===1;return{style:{fill:"#545454",textAlign:i?"end":"start"},offsetX:i?-8:8}},layout:[{type:"hide-overlap"}]},tooltip:{showTitle:!1,showMarkers:!1,shared:!1,showContent:function(t){return!(0,b.U2)(t,[0,"data","isNode"])},formatter:function(t){var i=t.source,o=t.target,c=t.value;return{name:i+" -> "+o,value:c}}},nodeWidthRatio:.008,nodePaddingRatio:.01,animation:{appear:{animation:"wave-in"},enter:{animation:"wave-in"}}}},e.prototype.changeData=function(t){this.updateOption({data:t});var i=kb(this.options,this.chart.width,this.chart.height),o=i.nodes,c=i.edges,p=xo(this.chart,B1),g=xo(this.chart,Nm);p.changeData(o),g.changeData(c)},e.prototype.getSchemaAdaptor=function(){return _4},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e}(to),U0="ancestor-node",Tg="value",Zm="path",iA=[Zm,ob,sb,TC,"name","depth","height"],Lb=hn({},to.getDefaultOptions(),{innerRadius:0,radius:.85,hierarchyConfig:{field:"value"},tooltip:{shared:!0,showMarkers:!1,offset:20,showTitle:!1},legend:!1,sunburstStyle:{lineWidth:.5,stroke:"#FFF"},drilldown:{enabled:!0}});function aA(r){r.x0=Math.round(r.x0),r.y0=Math.round(r.y0),r.x1=Math.round(r.x1),r.y1=Math.round(r.y1)}function Vm(r,e,t,i,o){for(var c=r.children,p,g=-1,_=c.length,S=r.value&&(i-e)/r.value;++g<_;)p=c[g],p.y0=t,p.y1=o,p.x0=e,p.x1=e+=p.value*S}function Pb(){var r=1,e=1,t=0,i=!1;function o(p){var g=p.height+1;return p.x0=p.y0=t,p.x1=r,p.y1=e/g,p.eachBefore(c(e,g)),i&&p.eachBefore(aA),p}function c(p,g){return function(_){_.children&&Vm(_,_.x0,p*(_.depth+1)/g,_.x1,p*(_.depth+2)/g);var S=_.x0,I=_.y0,L=_.x1-t,F=_.y1-t;L<S&&(S=L=(S+L)/2),F<I&&(I=F=(I+F)/2),_.x0=S,_.y0=I,_.x1=L,_.y1=F}}return o.round=function(p){return arguments.length?(i=!!p,o):i},o.size=function(p){return arguments.length?(r=+p[0],e=+p[1],o):[r,e]},o.padding=function(p){return arguments.length?(t=+p,o):t},o}var x4={field:"value",size:[1,1],round:!1,padding:0,sort:function(r,e){return e.value-r.value},as:["x","y"],ignoreParentValue:!0};function MF(r,e){e=(0,b.f0)({},x4,e);var t=e.as;if(!(0,b.kJ)(t)||t.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var i;try{i=ub(e)}catch(_){console.warn(_)}var o=function(_){return Pb().size(e.size).round(e.round).padding(e.padding)(Eg(_).sum(function(S){return(0,b.dp)(S.children)?e.ignoreParentValue?0:S[i]-(0,b.u4)(S.children,function(I,L){return I+L[i]},0):S[i]}).sort(e.sort))},c=o(r),p=t[0],g=t[1];return c.each(function(_){var S,I;_[p]=[_.x0,_.x1,_.x1,_.x0],_[g]=[_.y1,_.y1,_.y0,_.y0],_.name=_.name||((S=_.data)===null||S===void 0?void 0:S.name)||((I=_.data)===null||I===void 0?void 0:I.label),_.data.name=_.name,["x0","x1","y0","y1"].forEach(function(L){t.indexOf(L)===-1&&delete _[L]})}),lb(c)}function U1(r,e){return r.parent===e.parent?1:2}function Gm(r){return r.reduce(oA,0)/r.length}function oA(r,e){return r+e.x}function b4(r){return 1+r.reduce(E4,0)}function E4(r,e){return Math.max(r,e.y)}function sA(r){for(var e;e=r.children;)r=e[0];return r}function IF(r){for(var e;e=r.children;)r=e[e.length-1];return r}function w4(){var r=U1,e=1,t=1,i=!1;function o(c){var p,g=0;c.eachAfter(function(F){var z=F.children;z?(F.x=Gm(z),F.y=b4(z)):(F.x=p?g+=r(F,p):0,F.y=0,p=F)});var _=sA(c),S=IF(c),I=_.x-r(_,S)/2,L=S.x+r(S,_)/2;return c.eachAfter(i?function(F){F.x=(F.x-c.x)*e,F.y=(c.y-F.y)*t}:function(F){F.x=(F.x-I)/(L-I)*e,F.y=(1-(c.y?F.y/c.y:1))*t})}return o.separation=function(c){return arguments.length?(r=c,o):r},o.size=function(c){return arguments.length?(i=!1,e=+c[0],t=+c[1],o):i?null:[e,t]},o.nodeSize=function(c){return arguments.length?(i=!0,e=+c[0],t=+c[1],o):i?[e,t]:null},o}var Z1={depth:-1},Ob={};function S4(r){return r.id}function C4(r){return r.parentId}function uA(){var r=S4,e=C4;function t(i){var o=Array.from(i),c=o.length,p,g,_,S,I,L,F,z=new Map;for(g=0;g<c;++g)p=o[g],I=o[g]=new D0(p),(L=r(p,g,i))!=null&&(L+="")&&(F=I.id=L,z.set(F,z.has(F)?Ob:I)),(L=e(p,g,i))!=null&&(L+="")&&(I.parent=L);for(g=0;g<c;++g)if(I=o[g],L=I.parent){if(S=z.get(L),!S)throw new Error("missing: "+L);if(S===Ob)throw new Error("ambiguous: "+L);S.children?S.children.push(I):S.children=[I],I.parent=S}else{if(_)throw new Error("multiple roots");_=I}if(!_)throw new Error("no root");if(_.parent=Z1,_.eachBefore(function(V){V.depth=V.parent.depth+1,--c}).eachBefore(ab),_.parent=null,c>0)throw new Error("cycle");return _}return t.id=function(i){return arguments.length?(r=L1(i),t):r},t.parentId=function(i){return arguments.length?(e=L1(i),t):e},t}function kF(r,e){return r.parent===e.parent?1:2}function V1(r){var e=r.children;return e?e[0]:r.t}function _f(r){var e=r.children;return e?e[e.length-1]:r.t}function lA(r,e,t){var i=t/(e.i-r.i);e.c-=i,e.s+=t,r.c+=i,e.z+=t,e.m+=t}function cA(r){for(var e=0,t=0,i=r.children,o=i.length,c;--o>=0;)c=i[o],c.z+=e,c.m+=e,e+=c.s+(t+=c.c)}function A4(r,e,t){return r.a.parent===e.parent?r.a:t}function G1(r,e){this._=r,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}G1.prototype=Object.create(D0.prototype);function T4(r){for(var e=new G1(r,0),t,i=[e],o,c,p,g;t=i.pop();)if(c=t._.children)for(t.children=new Array(g=c.length),p=g-1;p>=0;--p)i.push(o=t.children[p]=new G1(c[p],p)),o.parent=t;return(e.parent=new G1(null,0)).children=[e],e}function fA(){var r=kF,e=1,t=1,i=null;function o(S){var I=T4(S);if(I.eachAfter(c),I.parent.m=-I.z,I.eachBefore(p),i)S.eachBefore(_);else{var L=S,F=S,z=S;S.eachBefore(function(Rt){Rt.x<L.x&&(L=Rt),Rt.x>F.x&&(F=Rt),Rt.depth>z.depth&&(z=Rt)});var V=L===F?1:r(L,F)/2,Q=V-L.x,st=e/(F.x+V+Q),at=t/(z.depth||1);S.eachBefore(function(Rt){Rt.x=(Rt.x+Q)*st,Rt.y=Rt.depth*at})}return S}function c(S){var I=S.children,L=S.parent.children,F=S.i?L[S.i-1]:null;if(I){cA(S);var z=(I[0].z+I[I.length-1].z)/2;F?(S.z=F.z+r(S._,F._),S.m=S.z-z):S.z=z}else F&&(S.z=F.z+r(S._,F._));S.parent.A=g(S,F,S.parent.A||L[0])}function p(S){S._.x=S.z+S.parent.m,S.m+=S.parent.m}function g(S,I,L){if(I){for(var F=S,z=S,V=I,Q=F.parent.children[0],st=F.m,at=z.m,Rt=V.m,Kt=Q.m,te;V=_f(V),F=V1(F),V&&F;)Q=V1(Q),z=_f(z),z.a=S,te=V.z+Rt-F.z-st+r(V._,F._),te>0&&(lA(A4(V,S,L),S,te),st+=te,at+=te),Rt+=V.m,st+=F.m,Kt+=Q.m,at+=z.m;V&&!_f(z)&&(z.t=V,z.m+=Rt-at),F&&!V1(Q)&&(Q.t=F,Q.m+=st-Kt,L=S)}return L}function _(S){S.x*=e,S.y=S.depth*t}return o.separation=function(S){return arguments.length?(r=S,o):r},o.size=function(S){return arguments.length?(i=!1,e=+S[0],t=+S[1],o):i?null:[e,t]},o.nodeSize=function(S){return arguments.length?(i=!0,e=+S[0],t=+S[1],o):i?[e,t]:null},o}function Hm(r,e,t,i,o){for(var c=r.children,p,g=-1,_=c.length,S=r.value&&(o-t)/r.value;++g<_;)p=c[g],p.x0=e,p.x1=i,p.y0=t,p.y1=t+=p.value*S}var hA=(1+Math.sqrt(5))/2;function pA(r,e,t,i,o,c){for(var p=[],g=e.children,_,S,I=0,L=0,F=g.length,z,V,Q=e.value,st,at,Rt,Kt,te,Ae,hr;I<F;){z=o-t,V=c-i;do st=g[L++].value;while(!st&&L<F);for(at=Rt=st,Ae=Math.max(V/z,z/V)/(Q*r),hr=st*st*Ae,te=Math.max(Rt/hr,hr/at);L<F;++L){if(st+=S=g[L].value,S<at&&(at=S),S>Rt&&(Rt=S),hr=st*st*Ae,Kt=Math.max(Rt/hr,hr/at),Kt>te){st-=S;break}te=Kt}p.push(_={value:st,dice:z<V,children:g.slice(I,L)}),_.dice?Vm(_,t,i,o,Q?i+=V*st/Q:c):Hm(_,t,i,Q?t+=z*st/Q:o,c),Q-=st,I=L}return p}var dA=function r(e){function t(i,o,c,p,g){pA(e,i,o,c,p,g)}return t.ratio=function(i){return r((i=+i)>1?i:1)},t}(hA);function vA(){var r=dA,e=!1,t=1,i=1,o=[0],c=id,p=id,g=id,_=id,S=id;function I(F){return F.x0=F.y0=0,F.x1=t,F.y1=i,F.eachBefore(L),o=[0],e&&F.eachBefore(aA),F}function L(F){var z=o[F.depth],V=F.x0+z,Q=F.y0+z,st=F.x1-z,at=F.y1-z;st<V&&(V=st=(V+st)/2),at<Q&&(Q=at=(Q+at)/2),F.x0=V,F.y0=Q,F.x1=st,F.y1=at,F.children&&(z=o[F.depth+1]=c(F)/2,V+=S(F)-z,Q+=p(F)-z,st-=g(F)-z,at-=_(F)-z,st<V&&(V=st=(V+st)/2),at<Q&&(Q=at=(Q+at)/2),r(F,V,Q,st,at))}return I.round=function(F){return arguments.length?(e=!!F,I):e},I.size=function(F){return arguments.length?(t=+F[0],i=+F[1],I):[t,i]},I.tile=function(F){return arguments.length?(r=L1(F),I):r},I.padding=function(F){return arguments.length?I.paddingInner(F).paddingOuter(F):I.paddingInner()},I.paddingInner=function(F){return arguments.length?(c=typeof F=="function"?F:bp(+F),I):c},I.paddingOuter=function(F){return arguments.length?I.paddingTop(F).paddingRight(F).paddingBottom(F).paddingLeft(F):I.paddingTop()},I.paddingTop=function(F){return arguments.length?(p=typeof F=="function"?F:bp(+F),I):p},I.paddingRight=function(F){return arguments.length?(g=typeof F=="function"?F:bp(+F),I):g},I.paddingBottom=function(F){return arguments.length?(_=typeof F=="function"?F:bp(+F),I):_},I.paddingLeft=function(F){return arguments.length?(S=typeof F=="function"?F:bp(+F),I):S},I}function M4(r,e,t,i,o){var c=r.children,p,g=c.length,_,S=new Array(g+1);for(S[0]=_=p=0;p<g;++p)S[p+1]=_+=c[p].value;I(0,g,r.value,e,t,i,o);function I(L,F,z,V,Q,st,at){if(L>=F-1){var Rt=c[L];Rt.x0=V,Rt.y0=Q,Rt.x1=st,Rt.y1=at;return}for(var Kt=S[L],te=z/2+Kt,Ae=L+1,hr=F-1;Ae<hr;){var Tr=Ae+hr>>>1;S[Tr]<te?Ae=Tr+1:hr=Tr}te-S[Ae-1]<S[Ae]-te&&L+1<Ae&&--Ae;var Dr=S[Ae]-Kt,cn=z-Dr;if(st-V>at-Q){var Qr=z?(V*cn+st*Dr)/z:st;I(L,Ae,Dr,V,Q,Qr,at),I(Ae,F,cn,Qr,Q,st,at)}else{var Tn=z?(Q*cn+at*Dr)/z:at;I(L,Ae,Dr,V,Q,st,Tn),I(Ae,F,cn,V,Tn,st,at)}}}function I4(r,e,t,i,o){(r.depth&1?Hm:Vm)(r,e,t,i,o)}var jm=function r(e){function t(i,o,c,p,g){if((_=i._squarify)&&_.ratio===e)for(var _,S,I,L,F=-1,z,V=_.length,Q=i.value;++F<V;){for(S=_[F],I=S.children,L=S.value=0,z=I.length;L<z;++L)S.value+=I[L].value;S.dice?Vm(S,o,c,p,Q?c+=(g-c)*S.value/Q:g):Hm(S,o,c,Q?o+=(p-o)*S.value/Q:p,g),Q-=S.value}else i._squarify=_=pA(e,i,o,c,p,g),_.ratio=e}return t.ratio=function(i){return r((i=+i)>1?i:1)},t}(hA),Wm={field:"value",tile:"treemapSquarify",size:[1,1],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,as:["x","y"],sort:function(r,e){return e.value-r.value},ratio:.5*(1+Math.sqrt(5))};function k4(r,e){return r==="treemapSquarify"?zt[r].ratio(e):zt[r]}function gA(r,e){e=(0,b.f0)({},Wm,e);var t=e.as;if(!(0,b.kJ)(t)||t.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var i;try{i=ub(e)}catch(S){console.warn(S)}var o=k4(e.tile,e.ratio),c=function(S){return vA().tile(o).size(e.size).round(e.round).padding(e.padding).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(Eg(S).sum(function(I){return e.ignoreParentValue&&I.children?0:I[i]}).sort(e.sort))},p=c(r),g=t[0],_=t[1];return p.each(function(S){S[g]=[S.x0,S.x1,S.x1,S.x0],S[_]=[S.y1,S.y1,S.y0,S.y0],["x0","x1","y0","y1"].forEach(function(I){t.indexOf(I)===-1&&delete S[I]})}),lb(p)}function mA(r){var e=r.data,t=r.colorField,i=r.rawFields,o=r.hierarchyConfig,c=o===void 0?{}:o,p=c.activeDepth,g={partition:MF,treemap:gA},_=r.seriesField,S=r.type||"partition",I=g[S](e,(0,P.pi)((0,P.pi)({field:_||"value"},(0,b.CE)(c,["activeDepth"])),{type:"hierarchy."+S,as:["x","y"]})),L=[];return I.forEach(function(F){var z,V,Q,st,at,Rt;if(F.depth===0||p>0&&F.depth>p)return null;for(var Kt=F.data.name,te=(0,P.pi)({},F);te.depth>1;)Kt=((V=te.parent.data)===null||V===void 0?void 0:V.name)+" / "+Kt,te=te.parent;var Ae=(0,P.pi)((0,P.pi)((0,P.pi)({},ys(F.data,(0,P.pr)(i||[],[c.field]))),(z={},z[Zm]=Kt,z[U0]=te.data.name,z)),F);_&&(Ae[_]=F.data[_]||((st=(Q=F.parent)===null||Q===void 0?void 0:Q.data)===null||st===void 0?void 0:st[_])),t&&(Ae[t]=F.data[t]||((Rt=(at=F.parent)===null||at===void 0?void 0:at.data)===null||Rt===void 0?void 0:Rt[t])),Ae.ext=c,Ae[Pm]={hierarchyConfig:c,colorField:t,rawFields:i},L.push(Ae)}),L}function Z0(r){var e=r.chart,t=r.options,i=t.color,o=t.colorField,c=o===void 0?U0:o,p=t.sunburstStyle,g=t.rawFields,_=g===void 0?[]:g,S=mA(t);e.data(S);var I;return p&&(I=function(L){return hn({},{fillOpacity:Math.pow(.85,L.depth)},(0,b.mf)(p)?p(L):p)}),vm(hn({},r,{options:{xField:"x",yField:"y",seriesField:c,rawFields:(0,b.jj)((0,P.pr)(iA,_)),polygon:{color:i,style:I}}})),r}function L4(r){var e=r.chart;return e.axis(!1),r}function P4(r){var e=r.chart,t=r.options,i=t.label,o=Pc(e,"polygon");if(!i)o.label(!1);else{var c=i.fields,p=c===void 0?["name"]:c,g=i.callback,_=(0,P._T)(i,["fields","callback"]);o.label({fields:p,callback:g,cfg:ec(_)})}return r}function H1(r){var e=r.chart,t=r.options,i=t.innerRadius,o=t.radius,c=t.reflect,p=e.coordinate({type:"polar",cfg:{innerRadius:i,radius:o}});return c&&p.reflect(c),r}function O4(r){var e,t=r.options,i=t.hierarchyConfig,o=t.meta;return Za(Mo({},(e={},e[Tg]=(0,b.U2)(o,(0,b.U2)(i,["field"],"value")),e)))(r)}function F4(r){var e=r.chart,t=r.options,i=t.tooltip;if(i===!1)e.tooltip(!1);else{var o=i;(0,b.U2)(i,"fields")||(o=hn({},{customItems:function(c){return c.map(function(p){var g=(0,b.U2)(e.getOptions(),"scales"),_=(0,b.U2)(g,[Zm,"formatter"],function(I){return I}),S=(0,b.U2)(g,[Tg,"formatter"],function(I){return I});return(0,P.pi)((0,P.pi)({},p),{name:_(p.data[Zm]),value:S(p.data.value)})})}},o)),e.tooltip(o)}return r}function R4(r){var e=r.drilldown,t=r.interactions,i=t===void 0?[]:t;return e!=null&&e.enabled?hn({},r,{interactions:(0,P.pr)(i,[{type:"drill-down",cfg:{drillDownConfig:e,transformData:mA}}])}):r}function D4(r){var e=r.chart,t=r.options,i=t.drilldown;return fu({chart:e,options:R4(t)}),i!=null&&i.enabled&&(e.appendPadding=sm(e.appendPadding,(0,b.U2)(i,["breadCrumb","position"]))),r}function B4(r){return Za(qo,$o("sunburstStyle"),Z0,L4,O4,Jd,H1,F4,P4,D4,_s,Es())(r)}var LF=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="sunburst",t}return e.getDefaultOptions=function(){return Lb},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return B4},e.SUNBURST_ANCESTOR_FIELD=U0,e.SUNBURST_PATH_FIELD=Zm,e.NODE_ANCESTORS_FIELD=sb,e}(to);function yA(r,e){if((0,b.kJ)(r))return r.find(function(t){return t.type===e})}function _A(r,e){var t=yA(r,e);return t&&t.enable!==!1}function Fb(r){var e=r.interactions,t=r.drilldown;return(0,b.U2)(t,"enabled")||_A(e,"treemap-drill-down")}function N4(r){var e=r.interactions["drill-down"];if(e){var t=e.context.actions.find(function(i){return i.name==="drill-down-action"});t.reset()}}function Rb(r){var e=r.data,t=r.colorField,i=r.enableDrillDown,o=r.hierarchyConfig,c=gA(e,(0,P.pi)((0,P.pi)({},o),{type:"hierarchy.treemap",field:"value",as:["x","y"]})),p=[];return c.forEach(function(g){if(g.depth===0||i&&g.depth!==1||!i&&g.children)return null;var _=g.ancestors().map(function(F){return{data:F.data,height:F.height,value:F.value}}),S=i&&(0,b.kJ)(e.path)?_.concat(e.path.slice(1)):_,I=Object.assign({},g.data,(0,P.pi)({x:g.x,y:g.y,depth:g.depth,value:g.value,path:S},g));if(!g.data[t]&&g.parent){var L=g.ancestors().find(function(F){return F.data[t]});I[t]=L==null?void 0:L.data[t]}else I[t]=g.data[t];I[Pm]={hierarchyConfig:o,colorField:t,enableDrillDown:i},p.push(I)}),p}function z4(r){var e=r.options,t=e.colorField;return hn({options:{rawFields:["value"],tooltip:{fields:["name","value",t,"path"],formatter:function(i){return{name:i.name,value:i.value}}}}},r)}function U4(r){var e=r.chart,t=r.options,i=t.color,o=t.colorField,c=t.rectStyle,p=t.hierarchyConfig,g=t.rawFields,_=Rb({data:t.data,colorField:t.colorField,enableDrillDown:Fb(t),hierarchyConfig:p});return e.data(_),vm(hn({},r,{options:{xField:"x",yField:"y",seriesField:o,rawFields:g,polygon:{color:i,style:c}}})),e.coordinate().reflect("y"),r}function Z4(r){var e=r.chart;return e.axis(!1),r}function V4(r){var e=r.drilldown,t=r.interactions,i=t===void 0?[]:t,o=Fb(r);return o?hn({},r,{interactions:(0,P.pr)(i,[{type:"drill-down",cfg:{drillDownConfig:e,transformData:Rb}}])}):r}function G4(r){var e=r.chart,t=r.options,i=t.interactions,o=t.drilldown;fu({chart:e,options:V4(t)});var c=yA(i,"view-zoom");c&&(c.enable!==!1?e.getCanvas().on("mousewheel",function(g){g.preventDefault()}):e.getCanvas().off("mousewheel"));var p=Fb(t);return p&&(e.appendPadding=sm(e.appendPadding,(0,b.U2)(o,["breadCrumb","position"]))),r}function H4(r){return Za(z4,qo,$o("rectStyle"),U4,Z4,Jd,zl,G4,_s,Es())(r)}var j4={colorField:"name",rectStyle:{lineWidth:1,stroke:"#fff"},hierarchyConfig:{tile:"treemapSquarify"},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1,breadCrumb:{position:"bottom-left",rootText:"\u521D\u59CB",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}}}},PF=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="treemap",t}return e.getDefaultOptions=function(){return j4},e.prototype.changeData=function(t){var i=this.options,o=i.colorField,c=i.interactions,p=i.hierarchyConfig;this.updateOption({data:t});var g=Rb({data:t,colorField:o,enableDrillDown:_A(c,"treemap-drill-down"),hierarchyConfig:p});this.chart.changeData(g),N4(this.chart)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return H4},e}(to),iv="id",j1="path",W4={appendPadding:[10,0,20,0],blendMode:"multiply",tooltip:{showTitle:!1,showMarkers:!1,fields:["id","size"],formatter:function(r){return{name:r.id,value:r.size}}},legend:{position:"top-left"},label:{style:{textAlign:"center",fill:"#fff"}},interactions:[{type:"legend-filter",enable:!1}],state:{active:{style:{stroke:"#000"}},selected:{style:{stroke:"#000",lineWidth:2}},inactive:{style:{fillOpacity:.3,strokeOpacity:.3}}},defaultInteractions:["tooltip","venn-legend-active"]};function W1(r){if(r){var e=r.geometries[0].elements;e.forEach(function(t){t.shape.toFront()})}}var X4=bn("element-active"),Y4=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.syncElementsPos=function(){W1(this.context.view)},e.prototype.active=function(){r.prototype.active.call(this),this.syncElementsPos()},e.prototype.toggle=function(){r.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.reset=function(){r.prototype.reset.call(this),this.syncElementsPos()},e}(X4),$4=bn("element-highlight"),q4=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.syncElementsPos=function(){W1(this.context.view)},e.prototype.highlight=function(){r.prototype.highlight.call(this),this.syncElementsPos()},e.prototype.toggle=function(){r.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.clear=function(){r.prototype.clear.call(this),this.syncElementsPos()},e.prototype.reset=function(){r.prototype.reset.call(this),this.syncElementsPos()},e}($4),K4=bn("element-selected"),Q4=bn("element-single-selected"),J4=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.syncElementsPos=function(){W1(this.context.view)},e.prototype.selected=function(){r.prototype.selected.call(this),this.syncElementsPos()},e.prototype.toggle=function(){r.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.reset=function(){r.prototype.reset.call(this),this.syncElementsPos()},e}(K4),tP=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.syncElementsPos=function(){W1(this.context.view)},e.prototype.selected=function(){r.prototype.selected.call(this),this.syncElementsPos()},e.prototype.toggle=function(){r.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.reset=function(){r.prototype.reset.call(this),this.syncElementsPos()},e}(Q4);jr("venn-element-active",Y4),jr("venn-element-highlight",q4),jr("venn-element-selected",J4),jr("venn-element-single-selected",tP),Ye("venn-element-active",{start:[{trigger:"element:mouseenter",action:"venn-element-active:active"}],end:[{trigger:"element:mouseleave",action:"venn-element-active:reset"}]}),Ye("venn-element-highlight",{start:[{trigger:"element:mouseenter",action:"venn-element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"venn-element-highlight:reset"}]}),Ye("venn-element-selected",{start:[{trigger:"element:click",action:"venn-element-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-selected:reset"]}]}),Ye("venn-element-single-selected",{start:[{trigger:"element:click",action:"venn-element-single-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-single-selected:reset"]}]}),Ye("venn-legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","venn-element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","venn-element-active:reset"]}]}),Ye("venn-legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","venn-element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","venn-element-highlight:reset"]}]});var eP=function(r){(0,P.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getLabelPoint=function(t,i,o){var c=t.data,p=c.x,g=c.y,_=t.customLabelInfo,S=_.offsetX,I=_.offsetY;return{content:t.content[o],x:p+S,y:g+I}},e}(Fo);Rn("venn",eP);var rP=nt(39588),Xm=`
|
|
\v\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029`,nP=new RegExp("([a-z])["+Xm+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+Xm+"]*,?["+Xm+"]*)+)","ig"),iP=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+Xm+"]*,?["+Xm+"]*","ig");function aP(r){if(!r)return null;if((0,rP.Z)(r))return r;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},t=[];return String(r).replace(nP,function(i,o,c){var p=[],g=o.toLowerCase();if(c.replace(iP,function(_,S){S&&p.push(+S)}),g==="m"&&p.length>2&&(t.push([o].concat(p.splice(0,2))),g="l",o=o==="m"?"l":"L"),g==="o"&&p.length===1&&t.push([o,p[0]]),g==="r")t.push([o].concat(p));else for(;p.length>=e[g]&&(t.push([o].concat(p.splice(0,e[g]))),!!e[g]););return""}),t}var Db=/[a-z]/;function xA(r,e){return[e[0]+(e[0]-r[0]),e[1]+(e[1]-r[1])]}function OF(r){var e=parsePathString(r);if(!e||!e.length)return[["M",0,0]];for(var t=!1,i=0;i<e.length;i++){var o=e[i][0];if(Db.test(o)||["V","H","T","S"].indexOf(o)>=0){t=!0;break}}if(!t)return e;var c=[],p=0,g=0,_=0,S=0,I=0,L,F,z=e[0];(z[0]==="M"||z[0]==="m")&&(p=+z[1],g=+z[2],_=p,S=g,I++,c[0]=["M",p,g]);for(var i=I,V=e.length;i<V;i++){var Q=e[i],st=c[i-1],at=[],o=Q[0],Rt=o.toUpperCase();if(o!==Rt)switch(at[0]=Rt,Rt){case"A":at[1]=Q[1],at[2]=Q[2],at[3]=Q[3],at[4]=Q[4],at[5]=Q[5],at[6]=+Q[6]+p,at[7]=+Q[7]+g;break;case"V":at[1]=+Q[1]+g;break;case"H":at[1]=+Q[1]+p;break;case"M":_=+Q[1]+p,S=+Q[2]+g,at[1]=_,at[2]=S;break;default:for(var Kt=1,te=Q.length;Kt<te;Kt++)at[Kt]=+Q[Kt]+(Kt%2?p:g)}else at=e[i];switch(Rt){case"Z":p=+_,g=+S;break;case"H":p=at[1],at=["L",p,g];break;case"V":g=at[1],at=["L",p,g];break;case"T":p=at[1],g=at[2];var Ae=xA([st[1],st[2]],[st[3],st[4]]);at=["Q",Ae[0],Ae[1],p,g];break;case"S":p=at[at.length-2],g=at[at.length-1];var hr=st.length,Tr=xA([st[hr-4],st[hr-3]],[st[hr-2],st[hr-1]]);at=["C",Tr[0],Tr[1],at[1],at[2],p,g];break;case"M":_=at[at.length-2],S=at[at.length-1];break;default:p=at[at.length-2],g=at[at.length-1]}c.push(at)}return c}var Ym=Math.PI*2,Bb=function(r,e,t,i,o,c,p){var g=r.x,_=r.y;g*=e,_*=t;var S=i*g-o*_,I=o*g+i*_;return{x:S+c,y:I+p}},oP=function(r,e){var t=e===1.5707963267948966?.551915024494:e===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(e/4),i=Math.cos(r),o=Math.sin(r),c=Math.cos(r+e),p=Math.sin(r+e);return[{x:i-o*t,y:o+i*t},{x:c+p*t,y:p-c*t},{x:c,y:p}]},bA=function(r,e,t,i){var o=r*i-e*t<0?-1:1,c=r*t+e*i;return c>1&&(c=1),c<-1&&(c=-1),o*Math.acos(c)},sP=function(r,e,t,i,o,c,p,g,_,S,I,L){var F=Math.pow(o,2),z=Math.pow(c,2),V=Math.pow(I,2),Q=Math.pow(L,2),st=F*z-F*Q-z*V;st<0&&(st=0),st/=F*Q+z*V,st=Math.sqrt(st)*(p===g?-1:1);var at=st*o/c*L,Rt=st*-c/o*I,Kt=S*at-_*Rt+(r+t)/2,te=_*at+S*Rt+(e+i)/2,Ae=(I-at)/o,hr=(L-Rt)/c,Tr=(-I-at)/o,Dr=(-L-Rt)/c,cn=bA(1,0,Ae,hr),Qr=bA(Ae,hr,Tr,Dr);return g===0&&Qr>0&&(Qr-=Ym),g===1&&Qr<0&&(Qr+=Ym),[Kt,te,cn,Qr]},uP=function(r){var e=r.px,t=r.py,i=r.cx,o=r.cy,c=r.rx,p=r.ry,g=r.xAxisRotation,_=g===void 0?0:g,S=r.largeArcFlag,I=S===void 0?0:S,L=r.sweepFlag,F=L===void 0?0:L,z=[];if(c===0||p===0)return[{x1:0,y1:0,x2:0,y2:0,x:i,y:o}];var V=Math.sin(_*Ym/360),Q=Math.cos(_*Ym/360),st=Q*(e-i)/2+V*(t-o)/2,at=-V*(e-i)/2+Q*(t-o)/2;if(st===0&&at===0)return[{x1:0,y1:0,x2:0,y2:0,x:i,y:o}];c=Math.abs(c),p=Math.abs(p);var Rt=Math.pow(st,2)/Math.pow(c,2)+Math.pow(at,2)/Math.pow(p,2);Rt>1&&(c*=Math.sqrt(Rt),p*=Math.sqrt(Rt));var Kt=sP(e,t,i,o,c,p,I,F,V,Q,st,at),te=Kt[0],Ae=Kt[1],hr=Kt[2],Tr=Kt[3],Dr=Math.abs(Tr)/(Ym/4);Math.abs(1-Dr)<1e-7&&(Dr=1);var cn=Math.max(Math.ceil(Dr),1);Tr/=cn;for(var Qr=0;Qr<cn;Qr++)z.push(oP(hr,Tr)),hr+=Tr;return z.map(function(Tn){var xi=Bb(Tn[0],c,p,Q,V,te,Ae),va=xi.x,Aa=xi.y,ao=Bb(Tn[1],c,p,Q,V,te,Ae),Gn=ao.x,Gi=ao.y,ca=Bb(Tn[2],c,p,Q,V,te,Ae),Yi=ca.x,ra=ca.y;return{x1:va,y1:Aa,x2:Gn,y2:Gi,x:Yi,y:ra}})};function FF(r,e,t,i,o,c,p,g,_){var S=uP({px:r,py:e,cx:g,cy:_,rx:t,ry:i,xAxisRotation:o,largeArcFlag:c,sweepFlag:p});return S.reduce(function(I,L){var F=L.x1,z=L.y1,V=L.x2,Q=L.y2,st=L.x,at=L.y;return I.push(F,z,V,Q,st,at),I},[])}function RF(r,e){"TQ".indexOf(r[0])<0&&(e.qx=null,e.qy=null);var t=r.slice(1),i=t[0],o=t[1];switch(r[0]){case"M":return e.x=i,e.y=o,r;case"A":return["C"].concat(arcToCubic.apply(0,[e.x1,e.y1].concat(r.slice(1))));case"Q":return e.qx=i,e.qy=o,["C"].concat(quadToCubic.apply(0,[e.x1,e.y1].concat(r.slice(1))));case"L":return["C"].concat(lineToCubic(e.x1,e.y1,r[1],r[2]));case"H":return["C"].concat(lineToCubic(e.x1,e.y1,r[1],e.y1));case"V":return["C"].concat(lineToCubic(e.x1,e.y1,e.x1,r[1]));case"Z":return["C"].concat(lineToCubic(e.x1,e.y1,e.x,e.y));default:}return r}function DF(r,e){e===void 0&&(e=!1);for(var t=path2Absolute(r),i={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null},o=[],c="",p=t.length,g,_,S=[],I=0;I<p;I+=1)t[I]&&(c=t[I][0]),o[I]=c,t[I]=segmentToCubic(t[I],i),lP(t,o,I),p=t.length,c==="Z"&&S.push(I),g=t[I],_=g.length,i.x1=+g[_-2],i.y1=+g[_-1],i.x2=+g[_-4]||i.x1,i.y2=+g[_-3]||i.y1;return e?[t,S]:t}function lP(r,e,t){if(r[t].length>7){r[t].shift();for(var i=r[t],o=t;i.length;)e[t]="A",r.splice(o+=1,0,["C"].concat(i.splice(0,6)));r.splice(t,1)}}var EA=function(r,e,t,i,o){var c=-3*e+9*t-9*i+3*o,p=r*c+6*e-12*t+6*i;return r*p-3*e+3*t},wA=function(r,e,t,i,o,c,p,g,_){_===null&&(_=1),_=_>1?1:_<0?0:_;for(var S=_/2,I=12,L=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],F=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],z=0,V=0;V<I;V++){var Q=S*L[V]+S,st=EA(Q,r,t,o,p),at=EA(Q,e,i,c,g),Rt=st*st+at*at;z+=F[V]*Math.sqrt(Rt)}return S*z},cP=function(r,e,t,i,o,c,p,g){for(var _=[],S=[[],[]],I,L,F,z,V=0;V<2;++V){if(V===0?(L=6*r-12*t+6*o,I=-3*r+9*t-9*o+3*p,F=3*t-3*r):(L=6*e-12*i+6*c,I=-3*e+9*i-9*c+3*g,F=3*i-3*e),Math.abs(I)<1e-12){if(Math.abs(L)<1e-12)continue;z=-F/L,z>0&&z<1&&_.push(z);continue}var Q=L*L-4*F*I,st=Math.sqrt(Q);if(!(Q<0)){var at=(-L+st)/(2*I);at>0&&at<1&&_.push(at);var Rt=(-L-st)/(2*I);Rt>0&&Rt<1&&_.push(Rt)}}for(var Kt=_.length,te=Kt,Ae;Kt--;)z=_[Kt],Ae=1-z,S[0][Kt]=Ae*Ae*Ae*r+3*Ae*Ae*z*t+3*Ae*z*z*o+z*z*z*p,S[1][Kt]=Ae*Ae*Ae*e+3*Ae*Ae*z*i+3*Ae*z*z*c+z*z*z*g;return S[0][te]=r,S[1][te]=e,S[0][te+1]=p,S[1][te+1]=g,S[0].length=S[1].length=te+2,{min:{x:Math.min.apply(0,S[0]),y:Math.min.apply(0,S[1])},max:{x:Math.max.apply(0,S[0]),y:Math.max.apply(0,S[1])}}},fP=function(r,e,t,i,o,c,p,g){if(!(Math.max(r,t)<Math.min(o,p)||Math.min(r,t)>Math.max(o,p)||Math.max(e,i)<Math.min(c,g)||Math.min(e,i)>Math.max(c,g))){var _=(r*i-e*t)*(o-p)-(r-t)*(o*g-c*p),S=(r*i-e*t)*(c-g)-(e-i)*(o*g-c*p),I=(r-t)*(c-g)-(e-i)*(o-p);if(I){var L=_/I,F=S/I,z=+L.toFixed(2),V=+F.toFixed(2);if(!(z<+Math.min(r,t).toFixed(2)||z>+Math.max(r,t).toFixed(2)||z<+Math.min(o,p).toFixed(2)||z>+Math.max(o,p).toFixed(2)||V<+Math.min(e,i).toFixed(2)||V>+Math.max(e,i).toFixed(2)||V<+Math.min(c,g).toFixed(2)||V>+Math.max(c,g).toFixed(2)))return{x:L,y:F}}}},Yv=function(r,e,t){return e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height},X1=function(r,e,t,i){return r===null&&(r=e=t=i=0),e===null&&(e=r.y,t=r.width,i=r.height,r=r.x),{x:r,y:e,width:t,w:t,height:i,h:i,x2:r+t,y2:e+i,cx:r+t/2,cy:e+i/2,r1:Math.min(t,i)/2,r2:Math.max(t,i)/2,r0:Math.sqrt(t*t+i*i)/2,path:rectPath(r,e,t,i),vb:[r,e,t,i].join(" ")}},SA=function(r,e){return r=X1(r),e=X1(e),Yv(e,r.x,r.y)||Yv(e,r.x2,r.y)||Yv(e,r.x,r.y2)||Yv(e,r.x2,r.y2)||Yv(r,e.x,e.y)||Yv(r,e.x2,e.y)||Yv(r,e.x,e.y2)||Yv(r,e.x2,e.y2)||(r.x<e.x2&&r.x>e.x||e.x<r.x2&&e.x>r.x)&&(r.y<e.y2&&r.y>e.y||e.y<r.y2&&e.y>r.y)},Nb=function(r,e,t,i,o,c,p,g){isArray(r)||(r=[r,e,t,i,o,c,p,g]);var _=cP.apply(null,r);return X1(_.min.x,_.min.y,_.max.x-_.min.x,_.max.y-_.min.y)},CA=function(r,e,t,i,o,c,p,g,_){var S=1-_,I=Math.pow(S,3),L=Math.pow(S,2),F=_*_,z=F*_,V=I*r+L*3*_*t+S*3*_*_*o+z*p,Q=I*e+L*3*_*i+S*3*_*_*c+z*g,st=r+2*_*(t-r)+F*(o-2*t+r),at=e+2*_*(i-e)+F*(c-2*i+e),Rt=t+2*_*(o-t)+F*(p-2*o+t),Kt=i+2*_*(c-i)+F*(g-2*c+i),te=S*r+_*t,Ae=S*e+_*i,hr=S*o+_*p,Tr=S*c+_*g,Dr=90-Math.atan2(st-Rt,at-Kt)*180/Math.PI;return{x:V,y:Q,m:{x:st,y:at},n:{x:Rt,y:Kt},start:{x:te,y:Ae},end:{x:hr,y:Tr},alpha:Dr}},AA=function(r,e,t){var i=Nb(r),o=Nb(e);if(!SA(i,o))return t?0:[];for(var c=wA.apply(0,r),p=wA.apply(0,e),g=~~(c/8),_=~~(p/8),S=[],I=[],L={},F=t?0:[],z=0;z<g+1;z++){var V=CA.apply(0,r.concat(z/g));S.push({x:V.x,y:V.y,t:z/g})}for(var z=0;z<_+1;z++){var V=CA.apply(0,e.concat(z/_));I.push({x:V.x,y:V.y,t:z/_})}for(var z=0;z<g;z++)for(var Q=0;Q<_;Q++){var st=S[z],at=S[z+1],Rt=I[Q],Kt=I[Q+1],te=Math.abs(at.x-st.x)<.001?"y":"x",Ae=Math.abs(Kt.x-Rt.x)<.001?"y":"x",hr=fP(st.x,st.y,at.x,at.y,Rt.x,Rt.y,Kt.x,Kt.y);if(hr){if(L[hr.x.toFixed(4)]===hr.y.toFixed(4))continue;L[hr.x.toFixed(4)]=hr.y.toFixed(4);var Tr=st.t+Math.abs((hr[te]-st[te])/(at[te]-st[te]))*(at.t-st.t),Dr=Rt.t+Math.abs((hr[Ae]-Rt[Ae])/(Kt[Ae]-Rt[Ae]))*(Kt.t-Rt.t);Tr>=0&&Tr<=1&&Dr>=0&&Dr<=1&&(t?F++:F.push({x:hr.x,y:hr.y,t1:Tr,t2:Dr}))}}return F},TA=function(r,e,t){r=path2Curve(r),e=path2Curve(e);for(var i,o,c,p,g,_,S,I,L,F,z=t?0:[],V=0,Q=r.length;V<Q;V++){var st=r[V];if(st[0]==="M")i=g=st[1],o=_=st[2];else{st[0]==="C"?(L=[i,o].concat(st.slice(1)),i=L[6],o=L[7]):(L=[i,o,i,o,g,_,g,_],i=g,o=_);for(var at=0,Rt=e.length;at<Rt;at++){var Kt=e[at];if(Kt[0]==="M")c=S=Kt[1],p=I=Kt[2];else{Kt[0]==="C"?(F=[c,p].concat(Kt.slice(1)),c=F[6],p=F[7]):(F=[c,p,c,p,S,I,S,I],c=S,p=I);var te=AA(L,F,t);if(t)z+=te;else{for(var Ae=0,hr=te.length;Ae<hr;Ae++)te[Ae].segment1=V,te[Ae].segment2=at,te[Ae].bez1=L,te[Ae].bez2=F;z=z.concat(te)}}}}}return z};function BF(r,e){return TA(r,e)}function MA(r){return hn({},r.defaultStyle,{fill:r.color},r.style)}wi("schema","venn",{draw:function(r,e){var t=r.data,i=aP(t[j1]),o=MA(r),c=e.addGroup({name:"venn-shape"});c.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},o),{path:i}),name:"venn-path"});var p=r.customInfo,g=p.offsetX,_=p.offsetY,S=hs.transform(null,[["t",g,_]]);return c.setMatrix(S),c},getMarker:function(r){var e=r.color;return{symbol:"circle",style:{lineWidth:0,stroke:e,fill:e,r:4}}}});var IA=function(r){return function(e,t){var i=[];return i[0]=r(e[0],t[0]),i[1]=r(e[1],t[1]),i[2]=r(e[2],t[2]),i}},kA={normal:function(r){return r},multiply:function(r,e){return r*e/255},screen:function(r,e){return 255*(1-(1-r/255)*(1-e/255))},overlay:function(r,e){return e<128?2*r*e/255:255*(1-2*(1-r/255)*(1-e/255))},darken:function(r,e){return r>e?e:r},lighten:function(r,e){return r>e?r:e},dodge:function(r,e){return r===255?255:(r=255*(e/255)/(1-r/255),r>255?255:r)},burn:function(r,e){return e===255?255:r===0?0:255*(1-Math.min(1,(1-e/255)/(r/255)))}},LA=function(r){if(!kA[r])throw new Error("unknown blend mode "+r);return kA[r]};function hP(r,e,t){t===void 0&&(t="normal");var i=IA(LA(t))(Y1(r),Y1(e)),o=Y1(r),c=o[0],p=o[1],g=o[2],_=o[3],S=Y1(e),I=S[0],L=S[1],F=S[2],z=S[3],V=Number((_+z*(1-_)).toFixed(2)),Q=Math.round((_*(1-z)*(c/255)+_*z*(i[0]/255)+(1-_)*z*(I/255))/V*255),st=Math.round((_*(1-z)*(p/255)+_*z*(i[1]/255)+(1-_)*z*(L/255))/V*255),at=Math.round((_*(1-z)*(g/255)+_*z*(i[2]/255)+(1-_)*z*(F/255))/V*255);return"rgba("+Q+", "+st+", "+at+", "+V+")"}function Y1(r){var e=r.replace("/s+/g",""),t;return typeof e=="string"&&!e.startsWith("rgba")&&!e.startsWith("#")?t=wa.rgb2arr(wa.toRGB(e)).concat([1]):(e.startsWith("rgba")&&(t=e.replace("rgba(","").replace(")","").split(",")),e.startsWith("#")&&(t=wa.rgb2arr(e).concat([1])),t.map(function(i,o){return o===3?Number(i):i|0}))}var od=nt(12886),PA=1e-10;function zb(r,e){var t=FA(r),i=t.filter(function(Tr){return OA(Tr,r)}),o=0,c=0,p,g=[];if(i.length>1){var _=RA(i);for(p=0;p<i.length;++p){var S=i[p];S.angle=Math.atan2(S.x-_.x,S.y-_.y)}i.sort(function(Tr,Dr){return Dr.angle-Tr.angle});var I=i[i.length-1];for(p=0;p<i.length;++p){var L=i[p];c+=(I.x+L.x)*(L.y-I.y);for(var F={x:(L.x+I.x)/2,y:(L.y+I.y)/2},z=null,V=0;V<L.parentIndex.length;++V)if(I.parentIndex.indexOf(L.parentIndex[V])>-1){var Q=r[L.parentIndex[V]],st=Math.atan2(L.x-Q.x,L.y-Q.y),at=Math.atan2(I.x-Q.x,I.y-Q.y),Rt=at-st;Rt<0&&(Rt+=2*Math.PI);var Kt=at-Rt/2,te=Dh(F,{x:Q.x+Q.radius*Math.sin(Kt),y:Q.y+Q.radius*Math.cos(Kt)});te>Q.radius*2&&(te=Q.radius*2),(z===null||z.width>te)&&(z={circle:Q,width:te,p1:L,p2:I})}z!==null&&(g.push(z),o+=Ub(z.circle.radius,z.width),I=L)}}else{var Ae=r[0];for(p=1;p<r.length;++p)r[p].radius<Ae.radius&&(Ae=r[p]);var hr=!1;for(p=0;p<r.length;++p)if(Dh(r[p],Ae)>Math.abs(Ae.radius-r[p].radius)){hr=!0;break}hr?o=c=0:(o=Ae.radius*Ae.radius*Math.PI,g.push({circle:Ae,p1:{x:Ae.x,y:Ae.y+Ae.radius},p2:{x:Ae.x-PA,y:Ae.y+Ae.radius},width:Ae.radius*2}))}return c/=2,e&&(e.area=o+c,e.arcArea=o,e.polygonArea=c,e.arcs=g,e.innerPoints=i,e.intersectionPoints=t),o+c}function OA(r,e){for(var t=0;t<e.length;++t)if(Dh(r,e[t])>e[t].radius+PA)return!1;return!0}function FA(r){for(var e=[],t=0;t<r.length;++t)for(var i=t+1;i<r.length;++i)for(var o=$m(r[t],r[i]),c=0;c<o.length;++c){var p=o[c];p.parentIndex=[t,i],e.push(p)}return e}function Ub(r,e){return r*r*Math.acos(1-e/r)-(r-e)*Math.sqrt(e*(2*r-e))}function Dh(r,e){return Math.sqrt((r.x-e.x)*(r.x-e.x)+(r.y-e.y)*(r.y-e.y))}function Zb(r,e,t){if(t>=r+e)return 0;if(t<=Math.abs(r-e))return Math.PI*Math.min(r,e)*Math.min(r,e);var i=r-(t*t-e*e+r*r)/(2*t),o=e-(t*t-r*r+e*e)/(2*t);return Ub(r,i)+Ub(e,o)}function $m(r,e){var t=Dh(r,e),i=r.radius,o=e.radius;if(t>=i+o||t<=Math.abs(i-o))return[];var c=(i*i-o*o+t*t)/(2*t),p=Math.sqrt(i*i-c*c),g=r.x+c*(e.x-r.x)/t,_=r.y+c*(e.y-r.y)/t,S=-(e.y-r.y)*(p/t),I=-(e.x-r.x)*(p/t);return[{x:g+S,y:_-I},{x:g-S,y:_+I}]}function RA(r){for(var e={x:0,y:0},t=0;t<r.length;++t)e.x+=r[t].x,e.y+=r[t].y;return e.x/=r.length,e.y/=r.length,e}function Vb(r,e,t){var i=e[0].radius-Dh(e[0],r),o,c;for(o=1;o<e.length;++o)c=e[o].radius-Dh(e[o],r),c<=i&&(i=c);for(o=0;o<t.length;++o)c=Dh(t[o],r)-t[o].radius,c<=i&&(i=c);return i}function DA(r,e){var t=[],i;for(i=0;i<r.length;++i){var o=r[i];t.push({x:o.x,y:o.y}),t.push({x:o.x+o.radius/2,y:o.y}),t.push({x:o.x-o.radius/2,y:o.y}),t.push({x:o.x,y:o.y+o.radius/2}),t.push({x:o.x,y:o.y-o.radius/2})}var c=t[0],p=Vb(t[0],r,e);for(i=1;i<t.length;++i){var g=Vb(t[i],r,e);g>=p&&(c=t[i],p=g)}var _=(0,od.nelderMead)(function(F){return-1*Vb({x:F[0],y:F[1]},r,e)},[c.x,c.y],{maxIterations:500,minErrorDelta:1e-10}).x,S={x:_[0],y:_[1]},I=!0;for(i=0;i<r.length;++i)if(Dh(S,r[i])>r[i].radius){I=!1;break}for(i=0;i<e.length;++i)if(Dh(S,e[i])<e[i].radius){I=!1;break}if(!I)if(r.length==1)S={x:r[0].x,y:r[0].y};else{var L={};zb(r,L),L.arcs.length===0?S={x:0,y:-1e3,disjoint:!0}:L.arcs.length==1?S={x:L.arcs[0].circle.x,y:L.arcs[0].circle.y}:e.length?S=DA(r,[]):S=RA(L.arcs.map(function(F){return F.p1}))}return S}function NF(r){var e={},t=[];for(var i in r)t.push(i),e[i]=[];for(var o=0;o<t.length;o++)for(var c=r[t[o]],p=o+1;p<t.length;++p){var g=r[t[p]],_=Dh(c,g);_+g.radius<=c.radius+1e-10?e[t[p]].push(t[o]):_+c.radius<=g.radius+1e-10&&e[t[o]].push(t[p])}return e}function BA(r,e){for(var t={},i=NF(r),o=0;o<e.length;++o){for(var c=e[o].sets,p={},g={},_=0;_<c.length;++_){p[c[_]]=!0;for(var S=i[c[_]],I=0;I<S.length;++I)g[S[I]]=!0}var L=[],F=[];for(var z in r)z in p?L.push(r[z]):z in g||F.push(r[z]);var V=DA(L,F);t[c]=V,V.disjoint&&e[o].size>0&&console.log("WARNING: area "+c+" not represented on screen")}return t}function NA(r,e,t){var i=[],o=r-t,c=e;return i.push("M",o,c),i.push("A",t,t,0,1,0,o+2*t,c),i.push("A",t,t,0,1,0,o,c),i.join(" ")}function zF(r){var e=r.split(" ");return{x:parseFloat(e[1]),y:parseFloat(e[2]),radius:-parseFloat(e[4])}}function zA(r){var e={};zb(r,e);var t=e.arcs;if(t.length===0)return"M 0 0";if(t.length==1){var i=t[0].circle;return NA(i.x,i.y,i.radius)}else{for(var o=[`
|
|
M`,t[0].p2.x,t[0].p2.y],c=0;c<t.length;++c){var p=t[c],g=p.circle.radius,_=p.width>g;o.push(`
|
|
A`,g,g,0,_?1:0,1,p.p1.x,p.p1.y)}return o.join(" ")}}function UA(r,e){e=e||{},e.maxIterations=e.maxIterations||500;var t=e.initialLayout||GA,i=e.lossFunction||q1;r=ZA(r);var o=t(r,e),c=[],p=[],g;for(g in o)o.hasOwnProperty(g)&&(c.push(o[g].x),c.push(o[g].y),p.push(g));for(var _=(0,od.nelderMead)(function(L){for(var F={},z=0;z<p.length;++z){var V=p[z];F[V]={x:L[2*z],y:L[2*z+1],radius:o[V].radius}}return i(F,r)},c,e),S=_.x,I=0;I<p.length;++I)g=p[I],o[g].x=S[2*I],o[g].y=S[2*I+1];return o}var Gb=1e-10;function $1(r,e,t){return Math.min(r,e)*Math.min(r,e)*Math.PI<=t+Gb?Math.abs(r-e):(0,od.bisect)(function(i){return Zb(r,e,i)-t},0,r+e)}function ZA(r){r=r.slice();var e=[],t={},i,o,c,p;for(i=0;i<r.length;++i){var g=r[i];g.sets.length==1?e.push(g.sets[0]):g.sets.length==2&&(c=g.sets[0],p=g.sets[1],t[[c,p]]=!0,t[[p,c]]=!0)}for(e.sort(function(_,S){return _>S?1:-1}),i=0;i<e.length;++i)for(c=e[i],o=i+1;o<e.length;++o)p=e[o],[c,p]in t||r.push({sets:[c,p],size:0});return r}function VA(r,e,t){var i=(0,od.zerosM)(e.length,e.length),o=(0,od.zerosM)(e.length,e.length);return r.filter(function(c){return c.sets.length==2}).map(function(c){var p=t[c.sets[0]],g=t[c.sets[1]],_=Math.sqrt(e[p].size/Math.PI),S=Math.sqrt(e[g].size/Math.PI),I=$1(_,S,c.size);i[p][g]=i[g][p]=I;var L=0;c.size+1e-10>=Math.min(e[p].size,e[g].size)?L=1:c.size<=1e-10&&(L=-1),o[p][g]=o[g][p]=L}),{distances:i,constraints:o}}function Mg(r,e,t,i){var o=0,c;for(c=0;c<e.length;++c)e[c]=0;for(c=0;c<t.length;++c)for(var p=r[2*c],g=r[2*c+1],_=c+1;_<t.length;++_){var S=r[2*_],I=r[2*_+1],L=t[c][_],F=i[c][_],z=(S-p)*(S-p)+(I-g)*(I-g),V=Math.sqrt(z),Q=z-L*L;F>0&&V<=L||F<0&&V>=L||(o+=2*Q*Q,e[2*c]+=4*Q*(p-S),e[2*c+1]+=4*Q*(g-I),e[2*_]+=4*Q*(S-p),e[2*_+1]+=4*Q*(I-g))}return o}function GA(r,e){var t=jA(r,e),i=e.lossFunction||q1;if(r.length>=8){var o=HA(r,e),c=i(o,r),p=i(t,r);c+1e-8<p&&(t=o)}return t}function HA(r,e){e=e||{};var t=e.restarts||10,i=[],o={},c;for(c=0;c<r.length;++c){var p=r[c];p.sets.length==1&&(o[p.sets[0]]=i.length,i.push(p))}var g=VA(r,i,o),_=g.distances,S=g.constraints,I=(0,od.norm2)(_.map(od.norm2))/_.length;_=_.map(function(Rt){return Rt.map(function(Kt){return Kt/I})});var L=function(Rt,Kt){return Mg(Rt,Kt,_,S)},F,z;for(c=0;c<t;++c){var V=(0,od.zeros)(_.length*2).map(Math.random);z=(0,od.conjugateGradient)(L,V,e),(!F||z.fx<F.fx)&&(F=z)}var Q=F.x,st={};for(c=0;c<i.length;++c){var at=i[c];st[at.sets[0]]={x:Q[2*c]*I,y:Q[2*c+1]*I,radius:Math.sqrt(at.size/Math.PI)}}if(e.history)for(c=0;c<e.history.length;++c)(0,od.scale)(e.history[c].x,I);return st}function jA(r,e){for(var t=e&&e.lossFunction?e.lossFunction:q1,i={},o={},c,p=0;p<r.length;++p){var g=r[p];g.sets.length==1&&(c=g.sets[0],i[c]={x:1e10,y:1e10,rowid:Object.keys(i).length,size:g.size,radius:Math.sqrt(g.size/Math.PI)},o[c]=[])}r=r.filter(function(Gn){return Gn.sets.length==2});for(var p=0;p<r.length;++p){var _=r[p],S=_.hasOwnProperty("weight")?_.weight:1,I=_.sets[0],L=_.sets[1];_.size+Gb>=Math.min(i[I].size,i[L].size)&&(S=0),o[I].push({set:L,size:_.size,weight:S}),o[L].push({set:I,size:_.size,weight:S})}var F=[];for(c in o)if(o.hasOwnProperty(c)){for(var z=0,p=0;p<o[c].length;++p)z+=o[c][p].size*o[c][p].weight;F.push({set:c,size:z})}function V(Gn,Gi){return Gi.size-Gn.size}F.sort(V);var Q={};function st(Gn){return Gn.set in Q}function at(Gn,Gi){i[Gi].x=Gn.x,i[Gi].y=Gn.y,Q[Gi]=!0}at({x:0,y:0},F[0].set);for(var p=1;p<F.length;++p){var Rt=F[p].set,Kt=o[Rt].filter(st);if(c=i[Rt],Kt.sort(V),Kt.length===0)throw"ERROR: missing pairwise overlap information";for(var te=[],Ae=0;Ae<Kt.length;++Ae){var hr=i[Kt[Ae].set],Tr=$1(c.radius,hr.radius,Kt[Ae].size);te.push({x:hr.x+Tr,y:hr.y}),te.push({x:hr.x-Tr,y:hr.y}),te.push({y:hr.y+Tr,x:hr.x}),te.push({y:hr.y-Tr,x:hr.x});for(var Dr=Ae+1;Dr<Kt.length;++Dr)for(var cn=i[Kt[Dr].set],Qr=$1(c.radius,cn.radius,Kt[Dr].size),Tn=$m({x:hr.x,y:hr.y,radius:Tr},{x:cn.x,y:cn.y,radius:Qr}),xi=0;xi<Tn.length;++xi)te.push(Tn[xi])}for(var va=1e50,Aa=te[0],Ae=0;Ae<te.length;++Ae){i[Rt].x=te[Ae].x,i[Rt].y=te[Ae].y;var ao=t(i,r);ao<va&&(va=ao,Aa=te[Ae])}at(Aa,Rt)}return i}function q1(r,e){var t=0;function i(I){return I.map(function(L){return r[L]})}for(var o=0;o<e.length;++o){var c=e[o],p=void 0;if(c.sets.length!=1){if(c.sets.length==2){var g=r[c.sets[0]],_=r[c.sets[1]];p=Zb(g.radius,_.radius,Dh(g,_))}else p=zb(i(c.sets));var S=c.hasOwnProperty("weight")?c.weight:1;t+=S*(p-c.size)*(p-c.size)}}return t}function pP(r,e,t){t===null?r.sort(function(Q,st){return st.radius-Q.radius}):r.sort(t);var i;if(r.length>0){var o=r[0].x,c=r[0].y;for(i=0;i<r.length;++i)r[i].x-=o,r[i].y-=c}if(r.length==2){var p=distance(r[0],r[1]);p<Math.abs(r[1].radius-r[0].radius)&&(r[1].x=r[0].x+r[0].radius-r[1].radius-1e-10,r[1].y=r[0].y)}if(r.length>1){var g=Math.atan2(r[1].x,r[1].y)-e,_=void 0,S=void 0,I=Math.cos(g),L=Math.sin(g);for(i=0;i<r.length;++i)_=r[i].x,S=r[i].y,r[i].x=I*_-L*S,r[i].y=L*_+I*S}if(r.length>2){for(var F=Math.atan2(r[2].x,r[2].y)-e;F<0;)F+=2*Math.PI;for(;F>2*Math.PI;)F-=2*Math.PI;if(F>Math.PI){var z=r[1].y/(1e-10+r[1].x);for(i=0;i<r.length;++i){var V=(r[i].x+z*r[i].y)/(1+z*z);r[i].x=2*V-r[i].x,r[i].y=2*V*z-r[i].y}}}}function WA(r){r.map(function(S){S.parent=S});function e(S){return S.parent!==S&&(S.parent=e(S.parent)),S.parent}function t(S,I){var L=e(S),F=e(I);L.parent=F}for(var i=0;i<r.length;++i)for(var o=i+1;o<r.length;++o){var c=r[i].radius+r[o].radius;distance(r[i],r[o])+1e-10<c&&t(r[o],r[i])}for(var p={},g,i=0;i<r.length;++i)g=e(r[i]).parent.setid,g in p||(p[g]=[]),p[g].push(r[i]);r.map(function(S){delete S.parent});var _=[];for(g in p)p.hasOwnProperty(g)&&_.push(p[g]);return _}function K1(r){var e=function(t){var i=Math.max.apply(null,r.map(function(c){return c[t]+c.radius})),o=Math.min.apply(null,r.map(function(c){return c[t]-c.radius}));return{max:i,min:o}};return{xRange:e("x"),yRange:e("y")}}function UF(r,e,t){e===null&&(e=Math.PI/2);var i=[],o,c;for(c in r)if(r.hasOwnProperty(c)){var p=r[c];i.push({x:p.x,y:p.y,radius:p.radius,setid:c})}var g=WA(i);for(o=0;o<g.length;++o){pP(g[o],e,t);var _=K1(g[o]);g[o].size=(_.xRange.max-_.xRange.min)*(_.yRange.max-_.yRange.min),g[o].bounds=_}g.sort(function(V,Q){return Q.size-V.size}),i=g[0];var S=i.bounds,I=(S.xRange.max-S.xRange.min)/50;function L(V,Q,st){if(V){var at=V.bounds,Rt,Kt,te;Q?Rt=S.xRange.max-at.xRange.min+I:(Rt=S.xRange.max-at.xRange.max,te=(at.xRange.max-at.xRange.min)/2-(S.xRange.max-S.xRange.min)/2,te<0&&(Rt+=te)),st?Kt=S.yRange.max-at.yRange.min+I:(Kt=S.yRange.max-at.yRange.max,te=(at.yRange.max-at.yRange.min)/2-(S.yRange.max-S.yRange.min)/2,te<0&&(Kt+=te));for(var Ae=0;Ae<V.length;++Ae)V[Ae].x+=Rt,V[Ae].y+=Kt,i.push(V[Ae])}}for(var F=1;F<g.length;)L(g[F],!0,!1),L(g[F+1],!1,!0),L(g[F+2],!0,!0),F+=3,S=K1(i);var z={};for(o=0;o<i.length;++o)z[i[o].setid]=i[o];return z}function XA(r,e,t,i){var o=[],c=[];for(var p in r)r.hasOwnProperty(p)&&(c.push(p),o.push(r[p]));e-=2*i,t-=2*i;var g=K1(o),_=g.xRange,S=g.yRange;if(_.max==_.min||S.max==S.min)return console.log("not scaling solution: zero size detected"),r;for(var I=e/(_.max-_.min),L=t/(S.max-S.min),F=Math.min(L,I),z=(e-(_.max-_.min)*F)/2,V=(t-(S.max-S.min)*F)/2,Q={},st=0;st<o.length;++st){var at=o[st];Q[c[st]]={radius:F*at.radius,x:i+z+(at.x-_.min)*F,y:i+V+(at.y-S.min)*F}}return Q}var YA=(0,b.HP)(function(r,e,t,i){var o=new Map,c=r.length;return e.forEach(function(p,g){if(p[i].length===1)o.set(p[iv],r[(g+c)%c]);else{var _=p[i].map(function(S){return o.get(S)});o.set(p[iv],_.slice(1).reduce(function(S,I){return hP(S,I,t)},_[0]))}}),o},function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return JSON.stringify(r)});function dP(r,e,t,i){i===void 0&&(i=0);var o=r.data,c=r.setsField,p=r.sizeField;if(o.length===0)return Qd(gp.WARN,!1,"warn: %s","\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A"),[];var g=o.map(function(L){var F;return(0,P.pi)((0,P.pi)({},L),(F={sets:L[c]||[],size:L[p]},F[j1]="",F[iv]="",F))});g.sort(function(L,F){return L.sets.length-F.sets.length});var _=UA(g),S=XA(_,e,t,i),I=BA(S,g);return g.forEach(function(L){var F=L.sets,z=F.join(",");L[iv]=z;var V=F.map(function(at){return S[at]}),Q=zA(V);/[zZ]$/.test(Q)||(Q+=" Z"),L[j1]=Q;var st=I[z]||{x:0,y:0};(0,b.f0)(L,st)}),g}function vP(r,e){for(var t=0;t<e.length;t++)if(!r.includes(e[t]))return!1;return!0}var gP=40;function $A(r,e,t){var i=r.chart,o=r.options,c=o.blendMode,p=o.setsField,g=i.getTheme(),_=g.colors10,S=g.colors20,I=t;(0,b.kJ)(I)||(I=e.filter(function(F){return F[p].length===1}).length<=10?_:S);var L=YA(I,e,c,p);return function(F){return L.get(F)||I[0]}}function av(r,e){var t=r.options,i=t.color;if(typeof i!="function"){var o=typeof i=="string"?[i]:i,c=$A(r,e,o);return function(p){return c(p[iv])}}return i}function qm(r){var e=r.chart,t=r.options,i=t.legend,o=t.appendPadding,c=t.padding,p=mp(o);return i!==!1&&(p=sm(o,(0,b.U2)(i,"position"),gP)),e.appendPadding=bx([p,c]),r}function ov(r){var e=r.options,t=e.data;t||(Qd(gp.WARN,!1,"warn: %s","\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A"),t=[]);var i=t.filter(function(c){return c.sets.length===1}).map(function(c){return c.sets[0]}),o=t.filter(function(c){var p=c.sets;return vP(i,p)});return(0,b.Xy)(o,t)||Qd(gp.WARN,!1,"warn: %s","\u4EA4\u96C6\u4E2D\u4E0D\u80FD\u51FA\u73B0\u4E0D\u5B58\u5728\u7684\u96C6\u5408, \u8BF7\u8F93\u5165\u5408\u6CD5\u6570\u636E"),(0,b.b$)({},r,{options:{data:o}})}function Bh(r){var e=r.chart,t=r.options,i=t.pointStyle,o=t.setsField,c=t.sizeField,p=mp(e.appendPadding),g=p[0],_=p[1],S=p[2],I=p[3],L={offsetX:I,offsetY:g},F=e.viewBBox,z=F.width,V=F.height,Q=dP(t,Math.max(z-(_+I),0),Math.max(V-(g+S),0),0);e.data(Q);var st=l1(hn({},r,{options:{xField:"x",yField:"y",sizeField:c,seriesField:iv,rawFields:[o,c],schema:{shape:"venn",style:i}}})).ext,at=st.geometry;at.customInfo(L);var Rt=av(r,Q);return typeof Rt=="function"&&at.color(iv,function(Kt){var te=Q.find(function(hr){return hr[iv]===Kt}),Ae=$A(r,Q)(Kt);return Rt(te,Ae)}),r}function Km(r){var e=r.chart,t=r.options,i=t.label,o=mp(e.appendPadding),c=o[0],p=o[3],g={offsetX:p,offsetY:c},_=Pc(e,"schema");if(!i)_.label(!1);else{var S=i.callback,I=(0,P._T)(i,["callback"]);_.label({fields:["id"],callback:S,cfg:(0,b.b$)({},ec(I),{type:"venn",customLabelInfo:g})})}return r}function $v(r){var e=r.chart,t=r.options,i=t.legend,o=t.sizeField;return e.legend(iv,i),e.legend(o,!1),r}function Qm(r){var e=r.chart;return e.axis(!1),r}function Q1(r){var e=r.options,t=r.chart,i=e.interactions;if(i){var o={"legend-active":"venn-legend-active","legend-highlight":"venn-legend-highlight"};fu(hn({},r,{options:{interactions:i.map(function(c){return(0,P.pi)((0,P.pi)({},c),{type:o[c.type]||c.type})})}}))}return t.removeInteraction("legend-active"),t.removeInteraction("legend-highlight"),r}function sd(r){return Za(qm,qo,ov,Bh,Km,Mo({}),$v,Qm,zl,Q1,_s)(r)}var Ig=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="venn",t}return e.getDefaultOptions=function(){return W4},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return sd},e.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},e}(to),nu="x",Xc="violinY",ud="violinSize",Jm="minMax",qA="quantile",Hb="median",ty="violin_view",mP="min_max_view",yP="quantile_view",KA="median_view",QA=hn({},to.getDefaultOptions(),{syncViewPadding:!0,kde:{type:"triangular",sampleSize:32,width:3},violinStyle:{lineWidth:1,fillOpacity:.3,strokeOpacity:.75},xAxis:{grid:{line:null},tickLine:{alignTick:!1}},yAxis:{grid:{line:{style:{lineWidth:.5,lineDash:[4,4]}}}},legend:{position:"top-left"},tooltip:{showMarkers:!1}}),_P=nt(50517),xP=nt.n(_P);function jb(r,e){var t=r.length*e;if(r.length===0)throw new Error("quantile requires at least one data point.");if(e<0||e>1)throw new Error("quantiles must be between 0 and 1");return e===1?r[r.length-1]:e===0?r[0]:t%1!==0?r[Math.ceil(t)-1]:r.length%2===0?(r[t-1]+r[t])/2:r[t]}function qv(r,e,t){var i=r[e];r[e]=r[t],r[t]=i}function J1(r,e,t,i){for(t=t||0,i=i||r.length-1;i>t;){if(i-t>600){var o=i-t+1,c=e-t+1,p=Math.log(o),g=.5*Math.exp(2*p/3),_=.5*Math.sqrt(p*g*(o-g)/o);c-o/2<0&&(_*=-1);var S=Math.max(t,Math.floor(e-c*g/o+_)),I=Math.min(i,Math.floor(e+(o-c)*g/o+_));J1(r,e,S,I)}var L=r[e],F=t,z=i;for(qv(r,t,e),r[i]>L&&qv(r,t,i);F<z;){for(qv(r,F,z),F++,z--;r[F]<L;)F++;for(;r[z]>L;)z--}r[t]===L?qv(r,t,z):(z++,qv(r,z,i)),z<=e&&(t=z+1),e<=z&&(i=z-1)}}function ld(r,e){var t=r.slice();if(Array.isArray(e)){bP(t,e);for(var i=[],o=0;o<e.length;o++)i[o]=jb(t,e[o]);return i}else{var c=tT(t.length,e);return JA(t,c,0,t.length-1),jb(t,e)}}function JA(r,e,t,i){e%1===0?J1(r,e,t,i):(e=Math.floor(e),J1(r,e,t,i),J1(r,e+1,e+1,i))}function bP(r,e){for(var t=[0],i=0;i<e.length;i++)t.push(tT(r.length,e[i]));t.push(r.length-1),t.sort(EP);for(var o=[0,t.length-1];o.length;){var c=Math.ceil(o.pop()),p=Math.floor(o.pop());if(!(c-p<=1)){var g=Math.floor((p+c)/2);JA(r,t[g],Math.floor(t[p]),Math.ceil(t[c])),o.push(p,g,g,c)}}}function EP(r,e){return r-e}function tT(r,e){var t=r*e;return e===1?r-1:e===0?0:t%1!==0?Math.ceil(t)-1:r%2===0?t-.5:t}var eT=function(r){return{low:(0,b.VV)(r),high:(0,b.Fp)(r),q1:ld(r,.25),q3:ld(r,.75),median:ld(r,[.5]),minMax:[(0,b.VV)(r),(0,b.Fp)(r)],quantile:[ld(r,.25),ld(r,.75)]}},rT=function(r,e){var t=xP().create(r,e);return{violinSize:t.map(function(i){return i.y}),violinY:t.map(function(i){return i.x})}},Wb=function(r){var e=r.xField,t=r.yField,i=r.seriesField,o=r.data,c=r.kde,p={min:c.min,max:c.max,size:c.sampleSize,width:c.width};if(!i){var g=(0,b.vM)(o,e);return Object.keys(g).map(function(I){var L=g[I],F=L.map(function(z){return z[t]});return(0,P.pi)((0,P.pi)({x:I},rT(F,p)),eT(F))})}var _=[],S=(0,b.vM)(o,i);return Object.keys(S).forEach(function(I){var L=(0,b.vM)(S[I],e);return Object.keys(L).forEach(function(F){var z,V=L[F],Q=V.map(function(st){return st[t]});_.push((0,P.pi)((0,P.pi)((z={x:F},z[i]=I,z),rT(Q,p)),eT(Q)))})}),_},ey=["low","high","q1","q3","median"],t_=[{type:"dodge",marginRatio:1/32}];function wP(r){var e=r.chart,t=r.options;return e.data(Wb(t)),r}function SP(r){var e=r.chart,t=r.options,i=t.seriesField,o=t.color,c=t.shape,p=c===void 0?"violin":c,g=t.violinStyle,_=t.tooltip,S=t.state,I=e.createView({id:ty});return Cx({chart:I,options:{xField:nu,yField:Xc,seriesField:i||nu,sizeField:ud,tooltip:(0,P.pi)({fields:ey},_),violin:{style:g,color:o,shape:p},state:S}}),I.geometries[0].adjust(t_),r}function Xb(r){var e=r.chart,t=r.options,i=t.seriesField,o=t.color,c=t.tooltip,p=t.box;if(p===!1)return r;var g=e.createView({id:mP});pc({chart:g,options:{xField:nu,yField:Jm,seriesField:i||nu,tooltip:(0,P.pi)({fields:ey},c),state:typeof p=="object"?p.state:{},interval:{color:o,size:1,style:{lineWidth:0}}}}),g.geometries[0].adjust(t_);var _=e.createView({id:yP});pc({chart:_,options:{xField:nu,yField:qA,seriesField:i||nu,tooltip:(0,P.pi)({fields:ey},c),state:typeof p=="object"?p.state:{},interval:{color:o,size:8,style:{fillOpacity:1}}}}),_.geometries[0].adjust(t_);var S=e.createView({id:KA});return Zf({chart:S,options:{xField:nu,yField:Hb,seriesField:i||nu,tooltip:(0,P.pi)({fields:ey},c),state:typeof p=="object"?p.state:{},point:{color:o,size:1,style:{fill:"white",lineWidth:0}}}}),S.geometries[0].adjust(t_),_.axis(!1),g.axis(!1),S.axis(!1),S.legend(!1),g.legend(!1),_.legend(!1),r}function CP(r){var e,t=r.chart,i=r.options,o=i.meta,c=i.xAxis,p=i.yAxis,g={},_=hn(g,o,(e={},e[nu]=(0,P.pi)((0,P.pi)({sync:!0},ys(c,Uf)),{type:"cat"}),e[Xc]=(0,P.pi)({sync:!0},ys(p,Uf)),e[Jm]=(0,P.pi)({sync:Xc},ys(p,Uf)),e[qA]=(0,P.pi)({sync:Xc},ys(p,Uf)),e[Hb]=(0,P.pi)({sync:Xc},ys(p,Uf)),e));return t.scale(_),r}function AP(r){var e=r.chart,t=r.options,i=t.xAxis,o=t.yAxis,c=xo(e,ty);return i===!1?c.axis(nu,!1):c.axis(nu,i),o===!1?c.axis(Xc,!1):c.axis(Xc,o),e.axis(!1),r}function nT(r){var e=r.chart,t=r.options,i=t.legend,o=t.seriesField,c=t.shape;if(i===!1)e.legend(!1);else{var p=o||nu,g=(0,b.CE)(i,["selected"]);(!c||!c.startsWith("hollow"))&&((0,b.U2)(g,["marker","style","lineWidth"])||(0,b.t8)(g,["marker","style","lineWidth"],0)),e.legend(p,g),(0,b.U2)(i,"selected")&&(0,b.S6)(e.views,function(_){return _.legend(p,i)})}return r}function Yb(r){var e=r.chart,t=xo(e,ty);return Es()((0,P.pi)((0,P.pi)({},r),{chart:t})),r}function iT(r){var e=r.chart,t=r.options,i=t.animation;return(0,b.S6)(e.views,function(o){lm(o,i)}),r}function aT(r){return Za(qo,wP,SP,Xb,CP,zl,AP,nT,fu,Yb,iT)(r)}var ZF=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="violin",t}return e.getDefaultOptions=function(){return QA},e.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(Wb(this.options))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return aT},e}(to),lh="$$yField$$",ry="$$diffField$$",e_="$$absoluteField$$",V0="$$isTotal$$",r_={label:{},leaderLine:{style:{lineWidth:1,stroke:"#8c8c8c",lineDash:[4,2]}},total:{style:{fill:"rgba(0, 0, 0, 0.25)"}},interactions:[{type:"element-active"}],risingFill:"#f4664a",fallingFill:"#30bf78",waterfallStyle:{fill:"rgba(0, 0, 0, 0.25)"},yAxis:{grid:{line:{style:{lineDash:[4,2]}}}}};function VF(r){for(var e=[],t=0;t<r.length;t++){var i=r[t];if(i){var o=t===0?"M":"L";e.push([o,i.x,i.y])}}var c=r[0];return e.push(["L",c.x,c.y]),e.push(["z"]),e}function GF(r){return hn({},r.defaultStyle,r.style,{fill:r.color})}wi("interval","waterfall",{draw:function(r,e){var t=r.customInfo,i=r.points,o=r.nextPoints,c=e.addGroup(),p=this.parsePath(VF(i)),g=GF(r);c.addShape("path",{attrs:(0,P.pi)((0,P.pi)({},g),{path:p})});var _=(0,b.U2)(t,"leaderLine");if(_&&o){var S=[["M",i[2].x,i[2].y],["L",o[0].x,o[0].y]];i[2].y===o[1].y&&(S[1]=["L",o[1].x,o[1].y]),S=this.parsePath(S),c.addShape("path",{attrs:(0,P.pi)({path:S},_.style||{})})}return c}});function G0(r,e,t,i,o){var c,p=[];if((0,b.u4)(r,function(_,S){var I;Qd(gp.WARN,(0,b.hj)(S[t]),S[t]+" is not a valid number");var L=(0,b.o8)(S[t])?null:S[t];return p.push((0,P.pi)((0,P.pi)({},S),(I={},I[i]=[_,_+L],I))),_+L},0),p.length&&o){var g=(0,b.U2)(p,[[r.length-1],i,[1]]);p.push((c={},c[e]=o.label,c[t]=g,c[i]=[0,g],c))}return p}function Nh(r,e,t,i){var o=G0(r,e,t,lh,i);return o.map(function(c,p){var g;return(0,b.Kn)(c)?(0,P.pi)((0,P.pi)({},c),(g={},g[e_]=c[lh][1],g[ry]=c[lh][1]-c[lh][0],g[V0]=p===r.length,g)):c})}function oT(r){var e=r.options,t=e.locale,i=e.total,o=u1(t).get(["waterfall","total"]);return i&&typeof i.label!="string"&&o&&(r.options.total.label=o),r}function sv(r){var e=r.chart,t=r.options,i=t.data,o=t.xField,c=t.yField,p=t.total,g=t.leaderLine,_=t.columnWidthRatio,S=t.waterfallStyle,I=t.risingFill,L=t.fallingFill,F=t.color;e.data(Nh(i,o,c,p));var z=F||function(at){return(0,b.U2)(at,[V0])?(0,b.U2)(p,["style","fill"],""):(0,b.U2)(at,[lh,1])-(0,b.U2)(at,[lh,0])>0?I:L},V=hn({},r,{options:{xField:o,yField:lh,seriesField:o,rawFields:[c,ry,V0,lh],widthRatio:_,interval:{style:S,shape:"waterfall",color:z}}}),Q=pc(V).ext,st=Q.geometry;return st.customInfo({leaderLine:g}),r}function sT(r){var e,t,i=r.options,o=i.xAxis,c=i.yAxis,p=i.xField,g=i.yField,_=i.meta,S=hn({},{alias:g},(0,b.U2)(_,g));return Za(Mo((e={},e[p]=o,e[g]=c,e[lh]=c,e),hn({},_,(t={},t[lh]=S,t[ry]=S,t[e_]=S,t))))(r)}function $b(r){var e=r.chart,t=r.options,i=t.xAxis,o=t.yAxis,c=t.xField,p=t.yField;return i===!1?e.axis(c,!1):e.axis(c,i),o===!1?(e.axis(p,!1),e.axis(lh,!1)):(e.axis(p,o),e.axis(lh,o)),r}function qb(r){var e=r.chart,t=r.options,i=t.legend,o=t.total,c=t.risingFill,p=t.fallingFill,g=t.locale,_=u1(g);if(i===!1)e.legend(!1);else{var S=[{name:_.get(["general","increase"]),value:"increase",marker:{symbol:"square",style:{r:5,fill:c}}},{name:_.get(["general","decrease"]),value:"decrease",marker:{symbol:"square",style:{r:5,fill:p}}}];o&&S.push({name:o.label||"",value:"total",marker:{symbol:"square",style:hn({},{r:5},(0,b.U2)(o,"style"))}}),e.legend(hn({},{custom:!0,position:"top",items:S},i)),e.removeInteraction("legend-filter")}return r}function TP(r){var e=r.chart,t=r.options,i=t.label,o=t.labelMode,c=t.xField,p=Pc(e,"interval");if(!i)p.label(!1);else{var g=i.callback,_=(0,P._T)(i,["callback"]);p.label({fields:o==="absolute"?[e_,c]:[ry,c],callback:g,cfg:ec(_)})}return r}function uT(r){var e=r.chart,t=r.options,i=t.tooltip,o=t.xField,c=t.yField;if(i!==!1){e.tooltip((0,P.pi)({showCrosshairs:!1,showMarkers:!1,shared:!0,fields:[c]},i));var p=e.geometries[0];i!=null&&i.formatter?p.tooltip(o+"*"+c,i.formatter):p.tooltip(c)}else e.tooltip(!1);return r}function MP(r){return Za(oT,qo,sv,sT,$b,qb,uT,TP,M0,fu,_s,Es())(r)}var Kb=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="waterfall",t}return e.getDefaultOptions=function(){return r_},e.prototype.changeData=function(t){var i=this.options,o=i.xField,c=i.yField,p=i.total;this.updateOption({data:t}),this.chart.changeData(Nh(t,o,c,p))},e.prototype.getSchemaAdaptor=function(){return MP},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e}(to),ny="color",HF=hn({},to.getDefaultOptions(),{timeInterval:2e3,legend:!1,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!1,fields:["text","value",ny],formatter:function(r){return{name:r.text,value:r.value}}},wordStyle:{fontFamily:"Verdana",fontWeight:"normal",padding:1,fontSize:[12,60],rotation:[0,90],rotationSteps:2,rotateRatio:.5}}),lT={font:function(){return"serif"},padding:1,size:[500,500],spiral:"archimedean",timeInterval:3e3};function jF(r,e){return e=(0,b.f0)({},lT,e),IP(r,e)}function IP(r,e){var t=yT();["font","fontSize","fontWeight","padding","rotate","size","spiral","timeInterval","random"].forEach(function(_){(0,b.UM)(e[_])||t[_](e[_])}),t.words(r),e.imageMask&&t.createMask(e.imageMask);var i=t.start(),o=i._tags;o.forEach(function(_){_.x+=e.size[0]/2,_.y+=e.size[1]/2});var c=e.size,p=c[0],g=c[1];return o.push({text:"",value:0,x:0,y:0,opacity:0}),o.push({text:"",value:0,x:p,y:g,opacity:0}),o}var Qb=Math.PI/180,iy=1<<11>>5,n_=1<<11;function cT(r){return r.text}function fT(){return"serif"}function hT(){return"normal"}function kP(r){return r.value}function Jb(){return~~(Math.random()*2)*90}function LP(){return 1}function PP(r,e,t,i){if(!e.sprite){var o=r.context,c=r.ratio;o.clearRect(0,0,(iy<<5)/c,n_/c);var p=0,g=0,_=0,S=t.length;for(--i;++i<S;){e=t[i],o.save(),o.font=e.style+" "+e.weight+" "+~~((e.size+1)/c)+"px "+e.font;var I=o.measureText(e.text+"m").width*c,L=e.size<<1;if(e.rotate){var F=Math.sin(e.rotate*Qb),z=Math.cos(e.rotate*Qb),V=I*z,Q=I*F,st=L*z,at=L*F;I=Math.max(Math.abs(V+at),Math.abs(V-at))+31>>5<<5,L=~~Math.max(Math.abs(Q+st),Math.abs(Q-st))}else I=I+31>>5<<5;if(L>_&&(_=L),p+I>=iy<<5&&(p=0,g+=_,_=0),g+L>=n_)break;o.translate((p+(I>>1))/c,(g+(L>>1))/c),e.rotate&&o.rotate(e.rotate*Qb),o.fillText(e.text,0,0),e.padding&&(o.lineWidth=2*e.padding,o.strokeText(e.text,0,0)),o.restore(),e.width=I,e.height=L,e.xoff=p,e.yoff=g,e.x1=I>>1,e.y1=L>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,p+=I}for(var Rt=o.getImageData(0,0,(iy<<5)/c,n_/c).data,Kt=[];--i>=0;)if(e=t[i],!!e.hasText){for(var I=e.width,te=I>>5,L=e.y1-e.y0,Ae=0;Ae<L*te;Ae++)Kt[Ae]=0;if(p=e.xoff,p==null)return;g=e.yoff;for(var hr=0,Tr=-1,Dr=0;Dr<L;Dr++){for(var Ae=0;Ae<I;Ae++){var cn=te*Dr+(Ae>>5),Qr=Rt[(g+Dr)*(iy<<5)+(p+Ae)<<2]?1<<31-Ae%32:0;Kt[cn]|=Qr,hr|=Qr}hr?Tr=Dr:(e.y0++,L--,Dr--,g++)}e.y1=e.y0+Tr,e.sprite=Kt.slice(0,(e.y1-e.y0)*te)}}}function OP(r,e,t){t>>=5;for(var i=r.sprite,o=r.width>>5,c=r.x-(o<<4),p=c&127,g=32-p,_=r.y1-r.y0,S=(r.y+r.y0)*t+(c>>5),I,L=0;L<_;L++){I=0;for(var F=0;F<=o;F++)if((I<<g|(F<o?(I=i[L*o+F])>>>p:0))&e[S+F])return!0;S+=t}return!1}function pT(r,e){var t=r[0],i=r[1];e.x+e.x0<t.x&&(t.x=e.x+e.x0),e.y+e.y0<t.y&&(t.y=e.y+e.y0),e.x+e.x1>i.x&&(i.x=e.x+e.x1),e.y+e.y1>i.y&&(i.y=e.y+e.y1)}function dT(r,e){return r.x+r.x1>e[0].x&&r.x+r.x0<e[1].x&&r.y+r.y1>e[0].y&&r.y+r.y0<e[1].y}function t2(r){var e=r[0]/r[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function vT(r){var e=4,t=e*r[0]/r[1],i=0,o=0;return function(c){var p=c<0?-1:1;switch(Math.sqrt(1+4*p*c)-p&3){case 0:i+=t;break;case 1:o+=e;break;case 2:i-=t;break;default:o-=e;break}return[i,o]}}function e2(r){for(var e=[],t=-1;++t<r;)e[t]=0;return e}function gT(){return document.createElement("canvas")}function xf(r){return(0,b.mf)(r)?r:function(){return r}}var mT={archimedean:t2,rectangular:vT};function yT(){var r=[256,256],e=fT,t=kP,i=hT,o=Jb,c=LP,p=t2,g=Math.random,_=[],S=1/0,I=cT,L=hT,F=gT,z={};z.start=function(){var st=r[0],at=r[1],Rt=V(F()),Kt=z.board?z.board:e2((r[0]>>5)*r[1]),te=_.length,Ae=[],hr=_.map(function(Qr,Tn,xi){return Qr.text=I.call(this,Qr,Tn,xi),Qr.font=e.call(this,Qr,Tn,xi),Qr.style=L.call(this,Qr,Tn,xi),Qr.weight=i.call(this,Qr,Tn,xi),Qr.rotate=o.call(this,Qr,Tn,xi),Qr.size=~~t.call(this,Qr,Tn,xi),Qr.padding=c.call(this,Qr,Tn,xi),Qr}).sort(function(Qr,Tn){return Tn.size-Qr.size}),Tr=-1,Dr=z.board?[{x:0,y:0},{x:st,y:at}]:null;cn();function cn(){for(var Qr=Date.now();Date.now()-Qr<S&&++Tr<te;){var Tn=hr[Tr];Tn.x=st*(g()+.5)>>1,Tn.y=at*(g()+.5)>>1,PP(Rt,Tn,hr,Tr),Tn.hasText&&Q(Kt,Tn,Dr)&&(Ae.push(Tn),Dr?z.hasImage||pT(Dr,Tn):Dr=[{x:Tn.x+Tn.x0,y:Tn.y+Tn.y0},{x:Tn.x+Tn.x1,y:Tn.y+Tn.y1}],Tn.x-=r[0]>>1,Tn.y-=r[1]>>1)}z._tags=Ae,z._bounds=Dr}return z};function V(st){st.width=st.height=1;var at=Math.sqrt(st.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,1,1).data.length>>2);st.width=(iy<<5)/at,st.height=n_/at;var Rt=st.getContext("2d",{willReadFrequently:!0});return Rt.fillStyle=Rt.strokeStyle="red",Rt.textAlign="center",{context:Rt,ratio:at}}function Q(st,at,Rt){for(var Kt=at.x,te=at.y,Ae=Math.sqrt(r[0]*r[0]+r[1]*r[1]),hr=p(r),Tr=g()<.5?1:-1,Dr,cn=-Tr,Qr,Tn;(Dr=hr(cn+=Tr))&&(Qr=~~Dr[0],Tn=~~Dr[1],!(Math.min(Math.abs(Qr),Math.abs(Tn))>=Ae));)if(at.x=Kt+Qr,at.y=te+Tn,!(at.x+at.x0<0||at.y+at.y0<0||at.x+at.x1>r[0]||at.y+at.y1>r[1])&&(!Rt||!OP(at,st,r[0]))&&(!Rt||dT(at,Rt))){for(var xi=at.sprite,va=at.width>>5,Aa=r[0]>>5,ao=at.x-(va<<4),Gn=ao&127,Gi=32-Gn,ca=at.y1-at.y0,Yi=void 0,ra=(at.y+at.y0)*Aa+(ao>>5),Pa=0;Pa<ca;Pa++){Yi=0;for(var wo=0;wo<=va;wo++)st[ra+wo]|=Yi<<Gi|(wo<va?(Yi=xi[Pa*va+wo])>>>Gn:0);ra+=Aa}return delete at.sprite,!0}return!1}return z.createMask=function(st){var at=document.createElement("canvas"),Rt=r[0],Kt=r[1];if(!(!Rt||!Kt)){var te=Rt>>5,Ae=e2((Rt>>5)*Kt);at.width=Rt,at.height=Kt;var hr=at.getContext("2d");hr.drawImage(st,0,0,st.width,st.height,0,0,Rt,Kt);for(var Tr=hr.getImageData(0,0,Rt,Kt).data,Dr=0;Dr<Kt;Dr++)for(var cn=0;cn<Rt;cn++){var Qr=te*Dr+(cn>>5),Tn=Dr*Rt+cn<<2,xi=Tr[Tn]>=250&&Tr[Tn+1]>=250&&Tr[Tn+2]>=250,va=xi?1<<31-cn%32:0;Ae[Qr]|=va}z.board=Ae,z.hasImage=!0}},z.timeInterval=function(st){S=st==null?1/0:st},z.words=function(st){_=st},z.size=function(st){r=[+st[0],+st[1]]},z.font=function(st){e=xf(st)},z.fontWeight=function(st){i=xf(st)},z.rotate=function(st){o=xf(st)},z.spiral=function(st){p=mT[st]||st},z.fontSize=function(st){t=xf(st)},z.padding=function(st){c=xf(st)},z.random=function(st){g=xf(st)},z}function r2(r){var e=r.options,t=r.chart,i=t,o=i.width,c=i.height,p=i.padding,g=i.appendPadding,_=i.ele,S=e.data,I=e.imageMask,L=e.wordField,F=e.weightField,z=e.colorField,V=e.wordStyle,Q=e.timeInterval,st=e.random,at=e.spiral,Rt=e.autoFit,Kt=Rt===void 0?!0:Rt,te=e.placementStrategy;if(!S||!S.length)return[];var Ae=V.fontFamily,hr=V.fontWeight,Tr=V.padding,Dr=V.fontSize,cn=bT(S,F),Qr=[n2(cn),i_(cn)],Tn=S.map(function(Aa){return{text:Aa[L],value:Aa[F],color:Aa[z],datum:Aa}}),xi={imageMask:I,font:Ae,fontSize:RP(Dr,Qr),fontWeight:hr,size:_T({width:o,height:c,padding:p,appendPadding:g,autoFit:Kt,container:_}),padding:Tr,timeInterval:Q,random:st,spiral:at,rotate:DP(e)};if((0,b.mf)(te)){var va=Tn.map(function(Aa,ao,Gn){return(0,P.pi)((0,P.pi)((0,P.pi)({},Aa),{hasText:!!Aa.text,font:xf(xi.font)(Aa,ao,Gn),weight:xf(xi.fontWeight)(Aa,ao,Gn),rotate:xf(xi.rotate)(Aa,ao,Gn),size:xf(xi.fontSize)(Aa,ao,Gn),style:"normal"}),te.call(t,Aa,ao,Gn))});return va.push({text:"",value:0,x:0,y:0,opacity:0}),va.push({text:"",value:0,x:xi.size[0],y:xi.size[1],opacity:0}),va}return jF(Tn,xi)}function _T(r){var e=r.width,t=r.height,i=r.container,o=r.autoFit,c=r.padding,p=r.appendPadding;if(o){var g=xx(i);e=g.width,t=g.height}e=e||400,t=t||400;var _=FP({padding:c,appendPadding:p}),S=_[0],I=_[1],L=_[2],F=_[3],z=[e-(F+I),t-(S+L)];return z}function FP(r){var e=mp(r.padding),t=mp(r.appendPadding),i=e[0]+t[0],o=e[1]+t[1],c=e[2]+t[2],p=e[3]+t[3];return[i,o,c,p]}function xT(r){return new Promise(function(e,t){if(r instanceof HTMLImageElement){e(r);return}if((0,b.HD)(r)){var i=new Image;i.crossOrigin="anonymous",i.src=r,i.onload=function(){e(i)},i.onerror=function(){Qd(gp.ERROR,!1,"image %s load failed !!!",r),t()};return}Qd(gp.WARN,r===void 0,"The type of imageMask option must be String or HTMLImageElement."),t()})}function RP(r,e){if((0,b.mf)(r))return r;if((0,b.kJ)(r)){var t=r[0],i=r[1];if(!e)return function(){return(i+t)/2};var o=e[0],c=e[1];return c===o?function(){return(i+t)/2}:function(g){var _=g.value;return(i-t)/(c-o)*(_-o)+t}}return function(){return r}}function bT(r,e){return r.map(function(t){return t[e]}).filter(function(t){return typeof t=="number"&&!isNaN(t)})}function DP(r){var e=BP(r),t=e.rotation,i=e.rotationSteps;if(!(0,b.kJ)(t))return t;var o=t[0],c=t[1],p=i===1?0:(c-o)/(i-1);return function(){return c===o?c:Math.floor(Math.random()*i)*p}}function BP(r){var e=r.wordStyle.rotationSteps;return e<1&&(Qd(gp.WARN,!1,"The rotationSteps option must be greater than or equal to 1."),e=1),{rotation:r.wordStyle.rotation,rotationSteps:e}}function n2(r){return Math.min.apply(Math,r)}function i_(r){return Math.max.apply(Math,r)}function NP(r){var e=r.chart,t=r.options,i=t.colorField,o=t.color,c=r2(r);e.data(c);var p=hn({},r,{options:{xField:"x",yField:"y",seriesField:i&&ny,rawFields:(0,b.mf)(o)&&(0,P.pr)((0,b.U2)(t,"rawFields",[]),["datum"]),point:{color:o,shape:"word-cloud"}}}),g=Zf(p).ext;return g.geometry.label(!1),e.coordinate().reflect("y"),e.axis(!1),r}function zP(r){return Za(Mo({x:{nice:!1},y:{nice:!1}}))(r)}function UP(r){var e=r.chart,t=r.options,i=t.legend,o=t.colorField;return i===!1?e.legend(!1):o&&e.legend(ny,i),r}function ZP(r){Za(NP,zP,zl,UP,fu,_s,qo,M0)(r)}wi("point","word-cloud",{draw:function(r,e){var t=r.x,i=r.y,o=e.addShape("text",{attrs:(0,P.pi)((0,P.pi)({},ET(r)),{x:t,y:i})}),c=r.data.rotate;return typeof c=="number"&&hs.rotate(o,c*Math.PI/180),o}});function ET(r){return{fontSize:r.data.size,text:r.data.text,textAlign:"center",fontFamily:r.data.font,fontWeight:r.data.weight,fill:r.color||r.defaultStyle.stroke,textBaseline:"alphabetic"}}var VP=function(r){(0,P.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="word-cloud",t}return e.getDefaultOptions=function(){return HF},e.prototype.changeData=function(t){this.updateOption({data:t}),this.options.imageMask?this.render():this.chart.changeData(r2({chart:this.chart,options:this.options}))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.render=function(){var t=this;return new Promise(function(i){var o=t.options.imageMask;if(!o){r.prototype.render.call(t),i();return}var c=function(p){t.options=(0,P.pi)((0,P.pi)({},t.options),{imageMask:p||null}),r.prototype.render.call(t),i()};xT(o).then(c).catch(c)})},e.prototype.getSchemaAdaptor=function(){return ZP},e.prototype.triggerResize=function(){var t=this;this.chart.destroyed||(this.execAdaptor(),window.setTimeout(function(){r.prototype.triggerResize.call(t)}))},e}(to),WF=function(r){(0,P.ZT)(e,r);function e(t,i,o,c){var p=r.call(this,t,hn({},c,i))||this;return p.type="g2-plot",p.defaultOptions=c,p.adaptor=o,p}return e.prototype.getDefaultOptions=function(){return this.defaultOptions},e.prototype.getSchemaAdaptor=function(){return this.adaptor},e}(to),XF="2.4.25";z5("en-US",Io),z5("zh-CN",YO);var YF={scale:Mo,legend:Jd,tooltip:zl,annotation:Es,interaction:fu,theme:qo,animation:_s}},14827:function(){window._iconfont_svg_string_3580659='<svg><symbol id="l7-icon-area1" viewBox="0 0 1024 1024"><path d="M796.444444 56.888889a113.777778 113.777778 0 0 1 43.064889 219.136l38.798223 466.261333a113.777778 113.777778 0 1 1-133.518223 145.237334H279.210667a113.777778 113.777778 0 1 1-60.302223-137.272889L697.856 227.555556A113.777778 113.777778 0 0 1 796.444444 56.888889z m56.888889 750.933333a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m-682.666666 0a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m577.592889-534.072889L269.198222 796.444444c4.152889 7.168 7.509333 14.791111 10.012445 22.812445h465.578666a114.119111 114.119111 0 0 1 65.479111-71.224889l-38.798222-466.261333a112.924444 112.924444 0 0 1-23.210666-7.964445zM796.444444 125.155556a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z" ></path></symbol><symbol id="l7-icon-area" viewBox="0 0 1024 1024"><path d="M796.444444 56.888889a113.777778 113.777778 0 0 1 43.008 219.136l38.855112 466.261333a113.777778 113.777778 0 0 1-16.497778 224.540445L853.333333 967.111111a113.777778 113.777778 0 0 1-108.544-79.644444H279.210667a113.834667 113.834667 0 0 1-100.067556 79.36L170.666667 967.111111a113.777778 113.777778 0 0 1-17.066667-226.304l30.492444-351.175111a113.777778 113.777778 0 0 1 34.986667-218.680889L227.555556 170.666667a113.777778 113.777778 0 0 1 99.896888 59.221333l355.84-71.395556a113.777778 113.777778 0 0 1 104.675556-101.262222L796.444444 56.888889z m56.888889 750.933333a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m-682.666666 0a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m526.051555-582.314666L340.650667 296.903111a113.891556 113.891556 0 0 1-88.462223 98.645333l-30.947555 355.84c27.477333 13.653333 48.64 38.115556 58.026667 67.754667h465.521777a114.119111 114.119111 0 0 1 65.536-71.168l-38.855111-466.261333a113.948444 113.948444 0 0 1-74.752-56.206222zM227.555556 238.933333a45.511111 45.511111 0 1 0 0 91.022223 45.511111 45.511111 0 0 0 0-91.022223z m568.888888-113.777777a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z" ></path></symbol><symbol id="l7-icon-delete" viewBox="0 0 1024 1024"><path d="M705.422222 85.333333a34.133333 34.133333 0 0 1 34.133334 34.133334V227.555556h136.533333a34.133333 34.133333 0 0 1 0 68.266666h-25.543111l-24.348445 610.076445a34.133333 34.133333 0 0 1-34.133333 32.768H231.936a34.133333 34.133333 0 0 1-34.076444-32.768L173.340444 295.822222H147.911111a34.133333 34.133333 0 1 1 0-68.266666H284.444444V119.466667a34.133333 34.133333 0 0 1 34.133334-34.133334h386.844444zM241.720889 295.822222l22.983111 574.577778h494.535111l23.04-574.577778H241.720889zM671.288889 153.6H352.711111V227.555556h318.577778V153.6z" ></path></symbol><symbol id="l7-icon-color" viewBox="0 0 1024 1024"><path d="M512 56.888889c9.841778 0 19.626667 0.341333 29.354667 0.910222 69.176889 4.437333 119.068444 62.577778 124.302222 131.072l0.455111 9.386667c0.739556 44.600889 15.303111 84.935111 44.999111 114.631111 27.022222 27.022222 62.805333 41.528889 102.570667 44.430222l12.060444 0.568889c72.476444 1.194667 135.793778 52.451556 140.458667 124.757333 1.137778 18.261333 1.251556 36.807111 0.170667 55.637334-13.198222 233.585778-211.399111 424.220444-445.326223 428.714666L512 967.111111a455.111111 455.111111 0 0 1-455.054222-464.156444c4.551111-233.927111 195.185778-432.128 428.771555-445.326223C494.535111 57.116444 503.296 56.888889 512 56.888889z m0 68.266667a385.706667 385.706667 0 0 0-22.414222 0.625777C291.726222 136.988444 129.080889 305.948444 125.155556 504.263111c-4.152889 212.366222 163.100444 387.185778 372.508444 394.353778l13.425778 0.227555 8.533333-0.113777c198.371556-3.811556 367.331556-166.456889 378.538667-364.373334a396.174222 396.174222 0 0 0-0.170667-47.331555c-1.991111-31.232-29.127111-56.604444-67.128889-60.472889l-8.248889-0.455111-14.051555-0.682667c-56.547556-4.209778-107.406222-25.884444-145.806222-64.284444-38.855111-38.798222-60.416-90.225778-64.284445-145.749334l-0.910222-21.333333c-2.901333-38.001778-28.785778-66.048-60.302222-68.096A433.891556 433.891556 0 0 0 512 125.155556zM438.044444 682.666667a68.266667 68.266667 0 1 1 0 136.533333 68.266667 68.266667 0 0 1 0-136.533333z m-170.666666-227.555556a68.266667 68.266667 0 1 1 0 136.533333 68.266667 68.266667 0 0 1 0-136.533333z m142.222222-227.555555a68.266667 68.266667 0 1 1 0 136.533333 68.266667 68.266667 0 0 1 0-136.533333z" ></path></symbol><symbol id="l7-icon-base-map" viewBox="0 0 1024 1024"><path d="M923.761778 115.029333A34.133333 34.133333 0 0 1 967.111111 147.911111v624.128a34.133333 34.133333 0 0 1-22.186667 32.028445l-278.755555 103.992888a34.133333 34.133333 0 0 1-23.665778 0.056889L381.724444 812.714667a34.133333 34.133333 0 0 0-23.665777 0.113777L102.968889 908.060444a34.133333 34.133333 0 0 1-45.738667-26.965333L56.888889 876.088889V251.960889a34.133333 34.133333 0 0 1 22.186667-32.028445l278.755555-103.992888a34.133333 34.133333 0 0 1 20.992-0.967112l266.183111 72.988445a34.133333 34.133333 0 0 0 18.204445 0zM403.911111 192.625778v555.576889l216.177778 79.075555V251.960889l-216.177778-59.335111z m-68.266667 4.380444L125.155556 275.569778v551.310222l210.432-78.506667V197.006222zM898.844444 192.853333l-210.545777 58.936889v575.089778l210.545777-78.563556V192.853333z" ></path></symbol><symbol id="l7-icon-dot" viewBox="0 0 1024 1024"><path d="M341.333333 739.555556a113.777778 113.777778 0 0 1 8.533334 227.271111L341.333333 967.111111a113.777778 113.777778 0 0 1-8.533333-227.271111L341.333333 739.555556z m0 68.266666a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222zM910.222222 341.333333a113.777778 113.777778 0 0 1 8.533334 227.271111L910.222222 568.888889a113.777778 113.777778 0 0 1-8.533333-227.271111L910.222222 341.333333z m0 68.266667a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222zM227.555556 56.888889a113.777778 113.777778 0 0 1 8.533333 227.271111L227.555556 284.444444a113.777778 113.777778 0 0 1-8.533334-227.271111L227.555556 56.888889z m0 68.266667a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z" ></path></symbol><symbol id="l7-icon-display" viewBox="0 0 1024 1024"><path d="M512 170.666667c284.444444 0 455.111111 227.555556 455.111111 341.333333s-170.666667 341.333333-455.111111 341.333333-455.111111-227.555556-455.111111-341.333333 170.666667-341.333333 455.111111-341.333333z m0 68.266666C303.729778 238.933333 125.155556 401.237333 125.155556 512c0 110.762667 178.574222 273.066667 386.844444 273.066667s386.844444-162.304 386.844444-273.066667c0-110.762667-178.574222-273.066667-386.844444-273.066667zM512 341.333333a170.666667 170.666667 0 1 1 0 341.333334 170.666667 170.666667 0 0 1 0-341.333334z m0 68.266667a102.4 102.4 0 1 0 0 204.8 102.4 102.4 0 0 0 0-204.8z" ></path></symbol><symbol id="l7-icon-enlarge" viewBox="0 0 1024 1024"><path d="M546.133333 147.911111l-0.056889 329.955556H876.088889a34.133333 34.133333 0 0 1 0 68.266666H546.076444v329.955556a34.133333 34.133333 0 0 1-68.266666 0V546.133333H147.911111a34.133333 34.133333 0 1 1 0-68.266666h329.898667V147.911111a34.133333 34.133333 0 0 1 68.266666 0z" ></path></symbol><symbol id="l7-icon-export-picture" viewBox="0 0 1024 1024"><path d="M883.873684 161.684211a32.336842 32.336842 0 0 1 32.336842 32.336842v582.063158a32.336842 32.336842 0 0 1-32.336842 32.336842H86.231579a32.336842 32.336842 0 0 1-32.336842-32.336842V194.021053a32.336842 32.336842 0 0 1 32.336842-32.336842h797.642105z m-32.336842 64.673684H118.568421v517.389473h170.792421a32.175158 32.175158 0 0 1 0.431158-0.646736l3.772632-4.473264 330.320842-330.374736a32.336842 32.336842 0 0 1 38.588631-5.389474l4.473263 3.018105 184.589474 147.725474V226.357895z m-202.428631 248.131368L379.850105 743.747368H851.536842v-107.304421l-202.428631-161.953684zM323.368421 323.368421a107.789474 107.789474 0 1 1 0 215.578947 107.789474 107.789474 0 0 1 0-215.578947z m0 64.673684a43.115789 43.115789 0 1 0 0 86.231579 43.115789 43.115789 0 0 0 0-86.231579z" ></path></symbol><symbol id="l7-icon-exit-fullscreen" viewBox="0 0 1024 1024"><path d="M841.955556 591.644444a34.133333 34.133333 0 0 1 5.518222 67.811556l-5.518222 0.455111h-133.745778l192 192.056889a34.133333 34.133333 0 0 1-38.343111 55.182222l-5.176889-2.958222-4.721778-3.982222L659.911111 708.266667V841.955556a34.133333 34.133333 0 0 1-28.615111 33.678222L625.777778 876.088889a34.133333 34.133333 0 0 1-33.678222-28.615111L591.644444 841.955556V625.777778a34.133333 34.133333 0 0 1 28.615112-33.678222L625.777778 591.644444h216.177778z m-443.733334 0a34.133333 34.133333 0 0 1 33.678222 28.615112L432.355556 625.777778v216.177778a34.133333 34.133333 0 0 1-67.811556 5.518222L364.088889 841.955556v-133.745778l-192.056889 192a34.133333 34.133333 0 0 1-52.224-43.52l3.982222-4.721778L315.847111 659.911111H182.044444a34.133333 34.133333 0 0 1-33.678222-28.615111L147.911111 625.777778a34.133333 34.133333 0 0 1 28.615111-33.678222L182.044444 591.644444H398.222222zM167.310222 119.808l4.721778 3.982222L364.088889 315.847111V182.044444a34.133333 34.133333 0 0 1 28.615111-33.678222L398.222222 147.911111a34.133333 34.133333 0 0 1 33.678222 28.615111L432.355556 182.044444V398.222222a34.133333 34.133333 0 0 1-28.615112 33.678222L398.222222 432.355556H182.044444a34.133333 34.133333 0 0 1-5.518222-67.811556L182.044444 364.088889h133.802667L123.790222 172.032a34.133333 34.133333 0 0 1 43.52-52.224z m732.899556 3.982222a34.133333 34.133333 0 0 1 3.982222 43.52l-3.982222 4.721778L708.266667 364.088889H841.955556a34.133333 34.133333 0 0 1 33.678222 28.615111L876.088889 398.222222a34.133333 34.133333 0 0 1-28.615111 33.678222L841.955556 432.355556H625.777778a34.133333 34.133333 0 0 1-33.678222-28.615112L591.644444 398.222222V182.044444a34.133333 34.133333 0 0 1 67.811556-5.518222l0.455111 5.518222v133.802667l192.056889-192.056889a34.133333 34.133333 0 0 1 48.241778 0z" ></path></symbol><symbol id="l7-icon-line" viewBox="0 0 1024 1024"><path d="M853.333333 56.888889a113.777778 113.777778 0 0 1 8.533334 227.271111L853.333333 284.444444c-19.000889 0-36.864-4.664889-52.622222-12.856888l-529.123555 529.066666a113.777778 113.777778 0 0 1-92.387556 166.115556L170.666667 967.111111a113.777778 113.777778 0 0 1-8.533334-227.271111L170.666667 739.555556c19.000889 0 36.864 4.664889 52.622222 12.856888l529.123555-529.066666a113.777778 113.777778 0 0 1 92.387556-166.115556L853.333333 56.888889zM170.666667 807.822222a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m682.666666-682.666666a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z" ></path></symbol><symbol id="l7-icon-layer" viewBox="0 0 1024 1024"><path d="M767.089778 625.777778l180.167111 82.773333a34.133333 34.133333 0 0 1 4.892444 59.278222l-4.892444 2.730667-420.977778 193.422222a34.133333 34.133333 0 0 1-22.983111 1.991111l-5.575111-1.991111-420.977778-193.422222a34.133333 34.133333 0 0 1-4.892444-59.278222l4.892444-2.730667L256.853333 625.777778l81.749334 37.546666L172.771556 739.555556 512 895.374222 851.171556 739.555556l-165.831112-76.231112 81.749334-37.546666z m0-227.555556l180.167111 82.773334a34.133333 34.133333 0 0 1 4.892444 59.278222l-4.892444 2.730666-420.977778 193.422223a34.133333 34.133333 0 0 1-22.983111 1.991111l-5.575111-1.991111-420.977778-193.422223a34.133333 34.133333 0 0 1-4.892444-59.278222l4.892444-2.730666L256.853333 398.222222l81.749334 37.546667-165.831111 76.174222L512 667.818667l339.171556-155.875556-165.831112-76.174222L767.089778 398.222222zM497.720889 60.017778a34.133333 34.133333 0 0 1 28.558222 0l420.977778 193.422222a34.133333 34.133333 0 0 1 0 62.008889l-420.977778 193.422222a34.133333 34.133333 0 0 1-28.558222 0l-420.977778-193.422222a34.133333 34.133333 0 0 1 0-62.008889zM512 128.568889L172.771556 284.387556 512 440.263111l339.171556-155.875555L512 128.568889z" ></path></symbol><symbol id="l7-icon-narrow" viewBox="0 0 1024 1024"><path d="M910.222222 512a34.133333 34.133333 0 0 1-34.133333 34.133333H147.911111a34.133333 34.133333 0 1 1 0-68.266666h728.177778a34.133333 34.133333 0 0 1 34.133333 34.133333z" ></path></symbol><symbol id="l7-icon-fullscreen" viewBox="0 0 1024 1024"><path d="M645.176889 597.674667l4.721778 3.982222L841.955556 793.6l0.056888-133.688889a34.133333 34.133333 0 0 1 28.615112-33.678222L876.088889 625.777778a34.133333 34.133333 0 0 1 33.678222 28.615111L910.222222 659.911111v216.177778a34.133333 34.133333 0 0 1-28.615111 33.678222L876.088889 910.222222h-216.177778a34.133333 34.133333 0 0 1-5.518222-67.811555l5.518222-0.455111h133.745778l-192-192.056889a34.133333 34.133333 0 0 1 43.52-52.224z m-222.833778 3.982222a34.133333 34.133333 0 0 1 3.982222 43.52l-3.982222 4.721778L230.286222 841.955556H364.088889a34.133333 34.133333 0 0 1 33.678222 28.615111L398.222222 876.088889a34.133333 34.133333 0 0 1-28.615111 33.678222L364.088889 910.222222H147.911111a34.133333 34.133333 0 0 1-33.678222-28.615111L113.777778 876.088889v-216.177778a34.133333 34.133333 0 0 1 67.811555-5.518222l0.455111 5.518222-0.056888 133.745778 192.113777-192a34.133333 34.133333 0 0 1 48.241778 0zM364.088889 113.777778a34.133333 34.133333 0 0 1 5.518222 67.811555L364.088889 182.044444H230.343111l192 192.056889a34.133333 34.133333 0 0 1-43.52 52.224l-4.721778-3.982222-192.113777-192.056889L182.044444 364.088889a34.133333 34.133333 0 0 1-28.615111 33.678222L147.911111 398.222222a34.133333 34.133333 0 0 1-33.678222-28.615111L113.777778 364.088889V147.911111a34.133333 34.133333 0 0 1 28.615111-33.678222L147.911111 113.777778h216.177778z m512 0a34.133333 34.133333 0 0 1 33.678222 28.615111L910.222222 147.911111v216.177778a34.133333 34.133333 0 0 1-67.811555 5.518222L841.955556 364.088889l-0.056889-133.745778-192 192a34.133333 34.133333 0 0 1-52.224-43.52l3.982222-4.721778L793.6 182.044444H659.911111a34.133333 34.133333 0 0 1-33.678222-28.615111L625.777778 147.911111a34.133333 34.133333 0 0 1 28.615111-33.678222L659.911111 113.777778h216.177778z" ></path></symbol><symbol id="l7-icon-hide" viewBox="0 0 1024 1024"><path d="M875.52 87.836444a34.133333 34.133333 0 0 1 7.281778 43.121778l-3.527111 5.006222-682.666667 796.444445a34.133333 34.133333 0 0 1-55.409778-39.367111l3.527111-5.006222 97.166223-113.379556C123.164444 697.969778 56.888889 582.940444 56.888889 512c0-113.777778 170.666667-341.333333 455.111111-341.333333a496.64 496.64 0 0 1 208.952889 45.112889l106.439111-124.188445a34.133333 34.133333 0 0 1 48.128-3.754667z m-38.684444 202.524445C921.031111 362.951111 967.111111 452.835556 967.111111 512c0 113.777778-170.666667 341.333333-455.111111 341.333333-50.631111 0-97.678222-7.224889-140.8-19.740444l50.232889-58.595556A417.393778 417.393778 0 0 0 512 785.066667c208.270222 0 386.844444-162.304 386.844444-273.066667 0-52.849778-40.675556-117.418667-105.813333-170.496l43.804445-51.2zM512 238.933333C303.729778 238.933333 125.155556 401.237333 125.155556 512c0 66.787556 64.853333 152.291556 162.133333 209.692444L377.173333 616.675556a170.666667 170.666667 0 0 1 217.713778-253.895112l78.620445-91.704888A432.924444 432.924444 0 0 0 512 238.933333z m166.684444 236.088889a170.666667 170.666667 0 0 1-177.664 207.303111l177.607112-207.303111zM512 409.6a102.4 102.4 0 0 0-88.746667 153.486222L548.864 416.426667A102.172444 102.172444 0 0 0 512 409.6z" ></path></symbol><symbol id="l7-icon-rectangle" viewBox="0 0 1024 1024"><path d="M170.666667 56.888889a113.777778 113.777778 0 0 1 108.544 79.644444H853.333333a34.133333 34.133333 0 0 1 33.678223 28.615111L887.466667 170.666667v574.122666a113.777778 113.777778 0 1 1-142.677334 142.734223L170.666667 887.466667a34.133333 34.133333 0 0 1-33.678223-28.615111L136.533333 853.333333V279.210667A113.777778 113.777778 0 0 1 170.666667 56.888889z m682.666666 750.933333a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m-34.133333-603.022222H279.210667a114.062222 114.062222 0 0 1-74.353778 74.410667L204.8 819.2h539.989333a114.062222 114.062222 0 0 1 74.410667-74.410667V204.8zM170.666667 125.155556a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z" ></path></symbol><symbol id="l7-icon-ranging" viewBox="0 0 1024 1024"><path d="M723.171556 50.403556l250.424888 250.424888a31.061333 31.061333 0 0 1 0 43.918223L344.746667 973.596444a31.061333 31.061333 0 0 1-43.918223 0L50.403556 723.171556a31.061333 31.061333 0 0 1 0-43.918223L679.253333 50.403556a31.061333 31.061333 0 0 1 43.918223 0z m-21.959112 74.524444l-39.765333 39.822222 98.986667 98.872889a34.133333 34.133333 0 0 1-44.088889 51.882667l-4.209778-3.640889-98.929778-98.929778-63.886222 63.886222 62.179556 62.122667a34.133333 34.133333 0 0 1-44.088889 51.882667L563.2 387.242667 501.077333 325.063111 437.191111 388.949333l98.986667 98.929778a34.133333 34.133333 0 0 1-44.088889 51.882667l-4.209778-3.640889-98.929778-98.929778-63.886222 63.886222L387.242667 563.2a34.133333 34.133333 0 0 1-44.088889 51.882667l-4.209778-3.584-62.122667-62.179556-63.886222 63.886222 98.986667 98.929778a34.133333 34.133333 0 0 1-44.088889 51.882667l-4.209778-3.640889-98.929778-98.929778-39.765333 39.822222 197.802667 197.745778 576.284444-576.284444-197.802667-197.745778z" ></path></symbol><symbol id="l7-icon-reposition" viewBox="0 0 1024 1024"><path d="M512 56.888889a34.133333 34.133333 0 0 1 34.133333 34.133333v24.177778A398.336 398.336 0 0 1 908.856889 477.866667h24.177778a34.133333 34.133333 0 0 1 0 68.266666h-24.177778A398.336 398.336 0 0 1 546.133333 908.856889L546.133333 932.977778a34.133333 34.133333 0 0 1-68.266666 0v-24.177778A398.336 398.336 0 0 1 115.2 546.133333L91.022222 546.133333a34.133333 34.133333 0 1 1 0-68.266666h24.177778A398.336 398.336 0 0 1 477.866667 115.2V91.022222A34.133333 34.133333 0 0 1 512 56.888889z m34.190222 126.862222L546.133333 193.422222a34.133333 34.133333 0 1 1-68.266666 0v-9.671111A330.069333 330.069333 0 0 0 183.751111 477.866667h9.671111a34.133333 34.133333 0 1 1 0 68.266666l-9.671111 0.056889A330.069333 330.069333 0 0 0 477.866667 840.248889V830.577778a34.133333 34.133333 0 0 1 68.266666 0l0.056889 9.671111A330.069333 330.069333 0 0 0 840.248889 546.133333L830.577778 546.133333a34.133333 34.133333 0 0 1 0-68.266666h9.671111A330.069333 330.069333 0 0 0 546.133333 183.751111zM512 341.333333a170.666667 170.666667 0 1 1 0 341.333334 170.666667 170.666667 0 0 1 0-341.333334z m0 68.266667a102.4 102.4 0 1 0 0 204.8 102.4 102.4 0 0 0 0-204.8z" ></path></symbol><symbol id="l7-icon-round" viewBox="0 0 1024 1024"><path d="M512 56.888889a455.111111 455.111111 0 0 1 391.395556 687.502222 113.777778 113.777778 0 0 1-159.061334 158.890667A455.111111 455.111111 0 0 1 120.604444 279.608889 113.777778 113.777778 0 0 1 279.608889 120.604444 452.835556 452.835556 0 0 1 512 56.888889z m0 68.266667a384.910222 384.910222 0 0 0-191.715556 50.744888A113.777778 113.777778 0 0 1 175.957333 320.284444a386.844444 386.844444 0 0 0 527.815111 527.758223 113.777778 113.777778 0 0 1 144.270223-144.440889A386.844444 386.844444 0 0 0 512 125.155556z m299.406222 640.739555a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222zM212.593778 167.082667a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z" ></path></symbol><symbol id="l7-icon-guanbi" viewBox="0 0 1024 1024"><path d="M576 512l277.333333 277.333333-64 64-277.333333-277.333333L234.666667 853.333333 170.666667 789.333333l277.333333-277.333333L170.666667 234.666667 234.666667 170.666667l277.333333 277.333333L789.333333 170.666667 853.333333 234.666667 576 512z" ></path></symbol></svg>',function(pn){try{let et=function(){K||(K=!0,k())},_e=function(){try{Et.documentElement.doScroll("left")}catch(ot){return void setTimeout(_e,50)}et()};var J=et,pt=_e,nt=(nt=document.getElementsByTagName("script"))[nt.length-1],Ot=nt.getAttribute("data-injectcss"),nt=nt.getAttribute("data-disable-injectsvg");if(!nt){var kt,gt,k,Et,K,yt=function(ut,zt){zt.parentNode.insertBefore(ut,zt)};if(Ot&&!pn.__iconfont__svg__cssinject__){pn.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(ot){console&&console.log(ot)}}kt=function(){var ut,zt=document.createElement("div");zt.innerHTML=pn._iconfont_svg_string_3580659,(zt=zt.getElementsByTagName("svg")[0])&&(zt.setAttribute("aria-hidden","true"),zt.style.position="absolute",zt.style.width=0,zt.style.height=0,zt.style.overflow="hidden",zt=zt,(ut=document.body).firstChild?yt(zt,ut.firstChild):ut.appendChild(zt))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(kt,0):(gt=function(){document.removeEventListener("DOMContentLoaded",gt,!1),kt()},document.addEventListener("DOMContentLoaded",gt,!1)):document.attachEvent&&(k=kt,Et=pn.document,K=!1,_e(),Et.onreadystatechange=function(){Et.readyState=="complete"&&(Et.onreadystatechange=null,et())})}}catch(et){}}(window)},52789:function(pn,Ot){"use strict";var nt;nt={value:!0},nt=nt=Ot.Tf=Ot.Bc=Ot.jp=Ot.fL=Ot.O6=Ot.rC=void 0,Ot.rC="l7plot-legend l7plot-legend__category",Ot.O6="l7plot-legend__title",Ot.fL="l7plot-legend__category-list",Ot.jp="l7plot-legend__list-item",Ot.Bc="l7plot-legend__category-marker",Ot.Tf="l7plot-legend__category-value",nt='<div class="'.concat(Ot.rC,`">
|
|
<div class="`).concat(Ot.O6,`"></div>
|
|
<ul class="`).concat(Ot.fL,`"></ul>
|
|
</div>`),nt='<li class="'.concat(Ot.jp,`" data-index={index}>
|
|
<span class="`).concat(Ot.Bc,`" style="background:{color}"></span>
|
|
<span class="`).concat(Ot.Tf,`">{value}</span>
|
|
</li>`)},34996:function(pn,Ot){"use strict";var nt;nt={value:!0},nt=nt=Ot.VI=Ot.bl=Ot.el=Ot.I8=Ot.O6=Ot.rC=void 0,Ot.rC="l7plot-legend l7plot-legend__continue",Ot.O6="l7plot-legend__title",Ot.I8="l7plot-legend__ribbon-container",Ot.el="l7plot-legend__ribbon",Ot.bl="l7plot-legend__gradient-bar",Ot.VI="l7plot-legend__value-range",nt='<div class="'.concat(Ot.rC,`">
|
|
<div class="`).concat(Ot.O6,`"></div>
|
|
<div class="`).concat(Ot.I8,`"></div>
|
|
</div>`),nt='<div class="'.concat(Ot.el,`">
|
|
<span class="`).concat(Ot.VI,`">{min}</span>
|
|
<div class="`).concat(Ot.bl,`" style="background-image: {backgroundImage}"></div>
|
|
<span class="`).concat(Ot.VI,`">{max}</span>
|
|
</div>`)},84593:function(pn,Ot){"use strict";var nt;nt={value:!0},nt=nt=Ot.Tf=Ot.bX=Ot.jp=Ot.fL=Ot.O6=Ot.rC=void 0,Ot.rC="l7plot-tooltip",Ot.O6="l7plot-tooltip__title",Ot.fL="l7plot-tooltip__list",Ot.jp="l7plot-tooltip__list-item",Ot.bX="l7plot-tooltip__name",Ot.Tf="l7plot-tooltip__value",nt='<div class="'.concat(Ot.rC,`">
|
|
<div class="`).concat(Ot.O6,`"></div>
|
|
<ul class="`).concat(Ot.fL,`"></ul>
|
|
</div>`),nt='<li class="'.concat(Ot.jp,`" data-index={index}>
|
|
<span class="`).concat(Ot.bX,`">{name}</span>
|
|
<span class="`).concat(Ot.Tf,`">{value}</span>
|
|
</li>`)},32071:function(pn,Ot,nt){"use strict";nt.d(Ot,{Dg:function(){return et},lh:function(){return K},m$:function(){return k},vs:function(){return J},zu:function(){return Et}});var kt=nt(99250),gt=nt(1153);function k(ot,ut,zt){var P=[0,0,0,0,0,0,0,0,0];return kt.vc(P,zt),kt.Jp(ot,P,ut)}function Et(ot,ut,zt){var P=[0,0,0,0,0,0,0,0,0];return kt.Us(P,zt),kt.Jp(ot,P,ut)}function K(ot,ut,zt){var P=[0,0,0,0,0,0,0,0,0];return kt.xJ(P,zt),kt.Jp(ot,P,ut)}function yt(ot,ut,zt){return kt.Jp(ot,zt,ut)}function J(ot,ut){for(var zt=ot?[].concat(ot):[1,0,0,0,1,0,0,0,1],P=0,b=ut.length;P<b;P++){var W=ut[P];switch(W[0]){case"t":k(zt,zt,[W[1],W[2]]);break;case"s":K(zt,zt,[W[1],W[2]]);break;case"r":Et(zt,zt,W[1]);break;case"m":yt(zt,zt,W[1]);break;default:break}}return zt}function pt(ot,ut){return ot[0]*ut[1]-ut[0]*ot[1]}function et(ot,ut,zt){var P=gt.EU(ot,ut),b=pt(ot,ut)>=0;return zt?b?Math.PI*2-P:P:b?P:Math.PI*2-P}function _e(ot,ut,zt){return zt?(ot[0]=ut[1],ot[1]=-1*ut[0]):(ot[0]=-1*ut[1],ot[1]=ut[0]),ot}},34357:function(pn,Ot,nt){"use strict";nt.d(Ot,{e9:function(){return et},Wq:function(){return tt},tr:function(){return W},wb:function(){return Me},zx:function(){return Xt}});var kt=nt(22374),gt=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/ig,k=/[^\s\,]+/ig;function Et(vt){var Ht=vt||[];if((0,kt.kJ)(Ht))return Ht;if((0,kt.HD)(Ht))return Ht=Ht.match(gt),(0,kt.S6)(Ht,function(he,jt){if(he=he.match(k),he[0].length>1){var Te=he[0].charAt(0);he.splice(1,0,he[0].substr(1)),he[0]=Te}(0,kt.S6)(he,function(We,Qe){isNaN(We)||(he[Qe]=+We)}),Ht[jt]=he}),Ht}var K=Et,yt=nt(1153);function J(vt,Ht,he,jt){var Te=[],We=!!jt,Qe,pr,lr,Vr,Pr,Br,Sn;if(We){lr=jt[0],Vr=jt[1];for(var an=0,zn=vt.length;an<zn;an+=1){var Zn=vt[an];lr=yt.VV([0,0],lr,Zn),Vr=yt.Fp([0,0],Vr,Zn)}}for(var an=0,Wn=vt.length;an<Wn;an+=1){var Zn=vt[an];if(an===0&&!he)Sn=Zn;else if(an===Wn-1&&!he)Br=Zn,Te.push(Sn),Te.push(Br);else{var Dn=[an?an-1:Wn-1,an-1][he?0:1];Qe=vt[Dn],pr=vt[he?(an+1)%Wn:an+1];var Xn=[0,0];Xn=yt.lu(Xn,pr,Qe),Xn=yt.bA(Xn,Xn,Ht);var Ft=yt.TE(Zn,Qe),Wt=yt.TE(Zn,pr),oe=Ft+Wt;oe!==0&&(Ft/=oe,Wt/=oe);var ye=yt.bA([0,0],Xn,-Ft),Ze=yt.bA([0,0],Xn,Wt);Br=yt.IH([0,0],Zn,ye),Pr=yt.IH([0,0],Zn,Ze),Pr=yt.VV([0,0],Pr,yt.Fp([0,0],pr,Zn)),Pr=yt.Fp([0,0],Pr,yt.VV([0,0],pr,Zn)),ye=yt.lu([0,0],Pr,Zn),ye=yt.bA([0,0],ye,-Ft/Wt),Br=yt.IH([0,0],Zn,ye),Br=yt.VV([0,0],Br,yt.Fp([0,0],Qe,Zn)),Br=yt.Fp([0,0],Br,yt.VV([0,0],Qe,Zn)),Ze=yt.lu([0,0],Zn,Br),Ze=yt.bA([0,0],Ze,Wt/Ft),Pr=yt.IH([0,0],Zn,Ze),We&&(Br=yt.Fp([0,0],Br,lr),Br=yt.VV([0,0],Br,Vr),Pr=yt.Fp([0,0],Pr,lr),Pr=yt.VV([0,0],Pr,Vr)),Te.push(Sn),Te.push(Br),Sn=Pr}}return he&&Te.push(Te.shift()),Te}function pt(vt,Ht,he){Ht===void 0&&(Ht=!1),he===void 0&&(he=[[0,0],[1,1]]);for(var jt=!!Ht,Te=[],We=0,Qe=vt.length;We<Qe;We+=2)Te.push([vt[We],vt[We+1]]);for(var pr=J(Te,.4,jt,he),lr=Te.length,Vr=[],Pr,Br,Sn,We=0;We<lr-1;We+=1)Pr=pr[We*2],Br=pr[We*2+1],Sn=Te[We+1],Vr.push(["C",Pr[0],Pr[1],Br[0],Br[1],Sn[0],Sn[1]]);return jt&&(Pr=pr[lr],Br=pr[lr+1],Sn=Te[0],Vr.push(["C",Pr[0],Pr[1],Br[0],Br[1],Sn[0],Sn[1]])),Vr}var et=pt;function _e(vt,Ht,he){var jt=null,Te=he;return Ht<Te&&(Te=Ht,jt="add"),vt<Te&&(Te=vt,jt="del"),{type:jt,min:Te}}var ot=function(vt,Ht){var he=vt.length,jt=Ht.length,Te,We,Qe=0;if(he===0||jt===0)return null;for(var pr=[],lr=0;lr<=he;lr++)pr[lr]=[],pr[lr][0]={min:lr};for(var Vr=0;Vr<=jt;Vr++)pr[0][Vr]={min:Vr};for(var lr=1;lr<=he;lr++){Te=vt[lr-1];for(var Vr=1;Vr<=jt;Vr++){We=Ht[Vr-1],isEqual(Te,We)?Qe=0:Qe=1;var Pr=pr[lr-1][Vr].min+1,Br=pr[lr][Vr-1].min+1,Sn=pr[lr-1][Vr-1].min+Qe;pr[lr][Vr]=_e(Pr,Br,Sn)}}return pr};function ut(vt,Ht){var he=ot(vt,Ht),jt=vt.length,Te=Ht.length,We=[],Qe=1,pr=1;if(he[jt][Te]!==jt){for(var lr=1;lr<=jt;lr++){var Vr=he[lr][lr].min;pr=lr;for(var Pr=Qe;Pr<=Te;Pr++)he[lr][Pr].min<Vr&&(Vr=he[lr][Pr].min,pr=Pr);Qe=pr,he[lr][Qe].type&&We.push({index:lr-1,type:he[lr][Qe].type})}for(var lr=We.length-1;lr>=0;lr--)Qe=We[lr].index,We[lr].type==="add"?vt.splice(Qe,0,[].concat(vt[Qe])):vt.splice(Qe,1)}if(jt=vt.length,jt<Te)for(var lr=0;lr<Te-jt;lr++)vt[jt-1][0]==="z"||vt[jt-1][0]==="Z"?vt.splice(jt-2,0,vt[jt-2]):vt.push(vt[jt-1]);return vt}var zt=`
|
|
\v\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029`,P=new RegExp("([a-z])["+zt+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+zt+"]*,?["+zt+"]*)+)","ig"),b=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+zt+"]*,?["+zt+"]*","ig");function W(vt){if(!vt)return null;if((0,kt.kJ)(vt))return vt;var Ht={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},he=[];return String(vt).replace(P,function(jt,Te,We){var Qe=[],pr=Te.toLowerCase();if(We.replace(b,function(lr,Vr){Vr&&Qe.push(+Vr)}),pr==="m"&&Qe.length>2&&(he.push([Te].concat(Qe.splice(0,2))),pr="l",Te=Te==="m"?"l":"L"),pr==="o"&&Qe.length===1&&he.push([Te,Qe[0]]),pr==="r")he.push([Te].concat(Qe));else for(;Qe.length>=Ht[pr]&&(he.push([Te].concat(Qe.splice(0,Ht[pr]))),!!Ht[pr]););return""}),he}var le=/[a-z]/;function be(vt,Ht){return[Ht[0]+(Ht[0]-vt[0]),Ht[1]+(Ht[1]-vt[1])]}function Me(vt){var Ht=W(vt);if(!Ht||!Ht.length)return[["M",0,0]];for(var he=!1,jt=0;jt<Ht.length;jt++){var Te=Ht[jt][0];if(le.test(Te)||["V","H","T","S"].indexOf(Te)>=0){he=!0;break}}if(!he)return Ht;var We=[],Qe=0,pr=0,lr=0,Vr=0,Pr=0,Br,Sn,an=Ht[0];(an[0]==="M"||an[0]==="m")&&(Qe=+an[1],pr=+an[2],lr=Qe,Vr=pr,Pr++,We[0]=["M",Qe,pr]);for(var jt=Pr,zn=Ht.length;jt<zn;jt++){var Zn=Ht[jt],Wn=We[jt-1],Dn=[],Te=Zn[0],Xn=Te.toUpperCase();if(Te!==Xn)switch(Dn[0]=Xn,Xn){case"A":Dn[1]=Zn[1],Dn[2]=Zn[2],Dn[3]=Zn[3],Dn[4]=Zn[4],Dn[5]=Zn[5],Dn[6]=+Zn[6]+Qe,Dn[7]=+Zn[7]+pr;break;case"V":Dn[1]=+Zn[1]+pr;break;case"H":Dn[1]=+Zn[1]+Qe;break;case"M":lr=+Zn[1]+Qe,Vr=+Zn[2]+pr,Dn[1]=lr,Dn[2]=Vr;break;default:for(var Ft=1,Wt=Zn.length;Ft<Wt;Ft++)Dn[Ft]=+Zn[Ft]+(Ft%2?Qe:pr)}else Dn=Ht[jt];switch(Xn){case"Z":Qe=+lr,pr=+Vr;break;case"H":Qe=Dn[1],Dn=["L",Qe,pr];break;case"V":pr=Dn[1],Dn=["L",Qe,pr];break;case"T":Qe=Dn[1],pr=Dn[2];var oe=be([Wn[1],Wn[2]],[Wn[3],Wn[4]]);Dn=["Q",oe[0],oe[1],Qe,pr];break;case"S":Qe=Dn[Dn.length-2],pr=Dn[Dn.length-1];var ye=Wn.length,Ze=be([Wn[ye-4],Wn[ye-3]],[Wn[ye-2],Wn[ye-1]]);Dn=["C",Ze[0],Ze[1],Dn[1],Dn[2],Qe,pr];break;case"M":lr=Dn[Dn.length-2],Vr=Dn[Dn.length-1];break;default:Qe=Dn[Dn.length-2],pr=Dn[Dn.length-1]}We.push(Dn)}return We}var At=Math.PI*2,rt=function(vt,Ht,he,jt,Te,We,Qe){var pr=vt.x,lr=vt.y;pr*=Ht,lr*=he;var Vr=jt*pr-Te*lr,Pr=Te*pr+jt*lr;return{x:Vr+We,y:Pr+Qe}},Dt=function(vt,Ht){var he=Ht===1.5707963267948966?.551915024494:Ht===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(Ht/4),jt=Math.cos(vt),Te=Math.sin(vt),We=Math.cos(vt+Ht),Qe=Math.sin(vt+Ht);return[{x:jt-Te*he,y:Te+jt*he},{x:We+Qe*he,y:Qe-We*he},{x:We,y:Qe}]},Ee=function(vt,Ht,he,jt){var Te=vt*jt-Ht*he<0?-1:1,We=vt*he+Ht*jt;return We>1&&(We=1),We<-1&&(We=-1),Te*Math.acos(We)},ge=function(vt,Ht,he,jt,Te,We,Qe,pr,lr,Vr,Pr,Br){var Sn=Math.pow(Te,2),an=Math.pow(We,2),zn=Math.pow(Pr,2),Zn=Math.pow(Br,2),Wn=Sn*an-Sn*Zn-an*zn;Wn<0&&(Wn=0),Wn/=Sn*Zn+an*zn,Wn=Math.sqrt(Wn)*(Qe===pr?-1:1);var Dn=Wn*Te/We*Br,Xn=Wn*-We/Te*Pr,Ft=Vr*Dn-lr*Xn+(vt+he)/2,Wt=lr*Dn+Vr*Xn+(Ht+jt)/2,oe=(Pr-Dn)/Te,ye=(Br-Xn)/We,Ze=(-Pr-Dn)/Te,fr=(-Br-Xn)/We,_r=Ee(1,0,oe,ye),we=Ee(oe,ye,Ze,fr);return pr===0&&we>0&&(we-=At),pr===1&&we<0&&(we+=At),[Ft,Wt,_r,we]},Ge=function(vt){var Ht=vt.px,he=vt.py,jt=vt.cx,Te=vt.cy,We=vt.rx,Qe=vt.ry,pr=vt.xAxisRotation,lr=pr===void 0?0:pr,Vr=vt.largeArcFlag,Pr=Vr===void 0?0:Vr,Br=vt.sweepFlag,Sn=Br===void 0?0:Br,an=[];if(We===0||Qe===0)return[{x1:0,y1:0,x2:0,y2:0,x:jt,y:Te}];var zn=Math.sin(lr*At/360),Zn=Math.cos(lr*At/360),Wn=Zn*(Ht-jt)/2+zn*(he-Te)/2,Dn=-zn*(Ht-jt)/2+Zn*(he-Te)/2;if(Wn===0&&Dn===0)return[{x1:0,y1:0,x2:0,y2:0,x:jt,y:Te}];We=Math.abs(We),Qe=Math.abs(Qe);var Xn=Math.pow(Wn,2)/Math.pow(We,2)+Math.pow(Dn,2)/Math.pow(Qe,2);Xn>1&&(We*=Math.sqrt(Xn),Qe*=Math.sqrt(Xn));var Ft=ge(Ht,he,jt,Te,We,Qe,Pr,Sn,zn,Zn,Wn,Dn),Wt=Ft[0],oe=Ft[1],ye=Ft[2],Ze=Ft[3],fr=Math.abs(Ze)/(At/4);Math.abs(1-fr)<1e-7&&(fr=1);var _r=Math.max(Math.ceil(fr),1);Ze/=_r;for(var we=0;we<_r;we++)an.push(Dt(ye,Ze)),ye+=Ze;return an.map(function(ir){var Hr=rt(ir[0],We,Qe,Zn,zn,Wt,oe),In=Hr.x,nn=Hr.y,Yr=rt(ir[1],We,Qe,Zn,zn,Wt,oe),On=Yr.x,bi=Yr.y,Mi=rt(ir[2],We,Qe,Zn,zn,Wt,oe),tn=Mi.x,mi=Mi.y;return{x1:In,y1:nn,x2:On,y2:bi,x:tn,y:mi}})};function Ue(vt,Ht,he,jt,Te,We,Qe,pr,lr){var Vr=Ge({px:vt,py:Ht,cx:pr,cy:lr,rx:he,ry:jt,xAxisRotation:Te,largeArcFlag:We,sweepFlag:Qe});return Vr.reduce(function(Pr,Br){var Sn=Br.x1,an=Br.y1,zn=Br.x2,Zn=Br.y2,Wn=Br.x,Dn=Br.y;return Pr.push(Sn,an,zn,Zn,Wn,Dn),Pr},[])}function xe(vt,Ht){"TQ".indexOf(vt[0])<0&&(Ht.qx=null,Ht.qy=null);var he=vt.slice(1),jt=he[0],Te=he[1];switch(vt[0]){case"M":return Ht.x=jt,Ht.y=Te,vt;case"A":return["C"].concat(arcToCubic.apply(0,[Ht.x1,Ht.y1].concat(vt.slice(1))));case"Q":return Ht.qx=jt,Ht.qy=Te,["C"].concat(quadToCubic.apply(0,[Ht.x1,Ht.y1].concat(vt.slice(1))));case"L":return["C"].concat(lineToCubic(Ht.x1,Ht.y1,vt[1],vt[2]));case"H":return["C"].concat(lineToCubic(Ht.x1,Ht.y1,vt[1],Ht.y1));case"V":return["C"].concat(lineToCubic(Ht.x1,Ht.y1,Ht.x1,vt[1]));case"Z":return["C"].concat(lineToCubic(Ht.x1,Ht.y1,Ht.x,Ht.y));default:}return vt}function Ke(vt,Ht){Ht===void 0&&(Ht=!1);for(var he=path2Absolute(vt),jt={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null},Te=[],We="",Qe=he.length,pr,lr,Vr=[],Pr=0;Pr<Qe;Pr+=1)he[Pr]&&(We=he[Pr][0]),Te[Pr]=We,he[Pr]=segmentToCubic(he[Pr],jt),Lt(he,Te,Pr),Qe=he.length,We==="Z"&&Vr.push(Pr),pr=he[Pr],lr=pr.length,jt.x1=+pr[lr-2],jt.y1=+pr[lr-1],jt.x2=+pr[lr-4]||jt.x1,jt.y2=+pr[lr-3]||jt.y1;return Ht?[he,Vr]:he}function Lt(vt,Ht,he){if(vt[he].length>7){vt[he].shift();for(var jt=vt[he],Te=he;jt.length;)Ht[he]="A",vt.splice(Te+=1,0,["C"].concat(jt.splice(0,6)));vt.splice(he,1)}}var Jt=function(vt,Ht,he,jt,Te){var We=-3*Ht+9*he-9*jt+3*Te,Qe=vt*We+6*Ht-12*he+6*jt;return vt*Qe-3*Ht+3*he},ft=function(vt,Ht,he,jt,Te,We,Qe,pr,lr){lr===null&&(lr=1),lr=lr>1?1:lr<0?0:lr;for(var Vr=lr/2,Pr=12,Br=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],Sn=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],an=0,zn=0;zn<Pr;zn++){var Zn=Vr*Br[zn]+Vr,Wn=Jt(Zn,vt,he,Te,Qe),Dn=Jt(Zn,Ht,jt,We,pr),Xn=Wn*Wn+Dn*Dn;an+=Sn[zn]*Math.sqrt(Xn)}return Vr*an},St=function(vt,Ht,he,jt,Te,We,Qe,pr){for(var lr=[],Vr=[[],[]],Pr,Br,Sn,an,zn=0;zn<2;++zn){if(zn===0?(Br=6*vt-12*he+6*Te,Pr=-3*vt+9*he-9*Te+3*Qe,Sn=3*he-3*vt):(Br=6*Ht-12*jt+6*We,Pr=-3*Ht+9*jt-9*We+3*pr,Sn=3*jt-3*Ht),Math.abs(Pr)<1e-12){if(Math.abs(Br)<1e-12)continue;an=-Sn/Br,an>0&&an<1&&lr.push(an);continue}var Zn=Br*Br-4*Sn*Pr,Wn=Math.sqrt(Zn);if(!(Zn<0)){var Dn=(-Br+Wn)/(2*Pr);Dn>0&&Dn<1&&lr.push(Dn);var Xn=(-Br-Wn)/(2*Pr);Xn>0&&Xn<1&&lr.push(Xn)}}for(var Ft=lr.length,Wt=Ft,oe;Ft--;)an=lr[Ft],oe=1-an,Vr[0][Ft]=oe*oe*oe*vt+3*oe*oe*an*he+3*oe*an*an*Te+an*an*an*Qe,Vr[1][Ft]=oe*oe*oe*Ht+3*oe*oe*an*jt+3*oe*an*an*We+an*an*an*pr;return Vr[0][Wt]=vt,Vr[1][Wt]=Ht,Vr[0][Wt+1]=Qe,Vr[1][Wt+1]=pr,Vr[0].length=Vr[1].length=Wt+2,{min:{x:Math.min.apply(0,Vr[0]),y:Math.min.apply(0,Vr[1])},max:{x:Math.max.apply(0,Vr[0]),y:Math.max.apply(0,Vr[1])}}},Y=function(vt,Ht,he,jt,Te,We,Qe,pr){if(!(Math.max(vt,he)<Math.min(Te,Qe)||Math.min(vt,he)>Math.max(Te,Qe)||Math.max(Ht,jt)<Math.min(We,pr)||Math.min(Ht,jt)>Math.max(We,pr))){var lr=(vt*jt-Ht*he)*(Te-Qe)-(vt-he)*(Te*pr-We*Qe),Vr=(vt*jt-Ht*he)*(We-pr)-(Ht-jt)*(Te*pr-We*Qe),Pr=(vt-he)*(We-pr)-(Ht-jt)*(Te-Qe);if(Pr){var Br=lr/Pr,Sn=Vr/Pr,an=+Br.toFixed(2),zn=+Sn.toFixed(2);if(!(an<+Math.min(vt,he).toFixed(2)||an>+Math.max(vt,he).toFixed(2)||an<+Math.min(Te,Qe).toFixed(2)||an>+Math.max(Te,Qe).toFixed(2)||zn<+Math.min(Ht,jt).toFixed(2)||zn>+Math.max(Ht,jt).toFixed(2)||zn<+Math.min(We,pr).toFixed(2)||zn>+Math.max(We,pr).toFixed(2)))return{x:Br,y:Sn}}}},mt=function(vt,Ht,he){return Ht>=vt.x&&Ht<=vt.x+vt.width&&he>=vt.y&&he<=vt.y+vt.height},se=function(vt,Ht,he,jt){return vt===null&&(vt=Ht=he=jt=0),Ht===null&&(Ht=vt.y,he=vt.width,jt=vt.height,vt=vt.x),{x:vt,y:Ht,width:he,w:he,height:jt,h:jt,x2:vt+he,y2:Ht+jt,cx:vt+he/2,cy:Ht+jt/2,r1:Math.min(he,jt)/2,r2:Math.max(he,jt)/2,r0:Math.sqrt(he*he+jt*jt)/2,path:rectPath(vt,Ht,he,jt),vb:[vt,Ht,he,jt].join(" ")}},ke=function(vt,Ht){return vt=se(vt),Ht=se(Ht),mt(Ht,vt.x,vt.y)||mt(Ht,vt.x2,vt.y)||mt(Ht,vt.x,vt.y2)||mt(Ht,vt.x2,vt.y2)||mt(vt,Ht.x,Ht.y)||mt(vt,Ht.x2,Ht.y)||mt(vt,Ht.x,Ht.y2)||mt(vt,Ht.x2,Ht.y2)||(vt.x<Ht.x2&&vt.x>Ht.x||Ht.x<vt.x2&&Ht.x>vt.x)&&(vt.y<Ht.y2&&vt.y>Ht.y||Ht.y<vt.y2&&Ht.y>vt.y)},Le=function(vt,Ht,he,jt,Te,We,Qe,pr){isArray(vt)||(vt=[vt,Ht,he,jt,Te,We,Qe,pr]);var lr=St.apply(null,vt);return se(lr.min.x,lr.min.y,lr.max.x-lr.min.x,lr.max.y-lr.min.y)},Be=function(vt,Ht,he,jt,Te,We,Qe,pr,lr){var Vr=1-lr,Pr=Math.pow(Vr,3),Br=Math.pow(Vr,2),Sn=lr*lr,an=Sn*lr,zn=Pr*vt+Br*3*lr*he+Vr*3*lr*lr*Te+an*Qe,Zn=Pr*Ht+Br*3*lr*jt+Vr*3*lr*lr*We+an*pr,Wn=vt+2*lr*(he-vt)+Sn*(Te-2*he+vt),Dn=Ht+2*lr*(jt-Ht)+Sn*(We-2*jt+Ht),Xn=he+2*lr*(Te-he)+Sn*(Qe-2*Te+he),Ft=jt+2*lr*(We-jt)+Sn*(pr-2*We+jt),Wt=Vr*vt+lr*he,oe=Vr*Ht+lr*jt,ye=Vr*Te+lr*Qe,Ze=Vr*We+lr*pr,fr=90-Math.atan2(Wn-Xn,Dn-Ft)*180/Math.PI;return{x:zn,y:Zn,m:{x:Wn,y:Dn},n:{x:Xn,y:Ft},start:{x:Wt,y:oe},end:{x:ye,y:Ze},alpha:fr}},Bt=function(vt,Ht,he){var jt=Le(vt),Te=Le(Ht);if(!ke(jt,Te))return he?0:[];for(var We=ft.apply(0,vt),Qe=ft.apply(0,Ht),pr=~~(We/8),lr=~~(Qe/8),Vr=[],Pr=[],Br={},Sn=he?0:[],an=0;an<pr+1;an++){var zn=Be.apply(0,vt.concat(an/pr));Vr.push({x:zn.x,y:zn.y,t:an/pr})}for(var an=0;an<lr+1;an++){var zn=Be.apply(0,Ht.concat(an/lr));Pr.push({x:zn.x,y:zn.y,t:an/lr})}for(var an=0;an<pr;an++)for(var Zn=0;Zn<lr;Zn++){var Wn=Vr[an],Dn=Vr[an+1],Xn=Pr[Zn],Ft=Pr[Zn+1],Wt=Math.abs(Dn.x-Wn.x)<.001?"y":"x",oe=Math.abs(Ft.x-Xn.x)<.001?"y":"x",ye=Y(Wn.x,Wn.y,Dn.x,Dn.y,Xn.x,Xn.y,Ft.x,Ft.y);if(ye){if(Br[ye.x.toFixed(4)]===ye.y.toFixed(4))continue;Br[ye.x.toFixed(4)]=ye.y.toFixed(4);var Ze=Wn.t+Math.abs((ye[Wt]-Wn[Wt])/(Dn[Wt]-Wn[Wt]))*(Dn.t-Wn.t),fr=Xn.t+Math.abs((ye[oe]-Xn[oe])/(Ft[oe]-Xn[oe]))*(Ft.t-Xn.t);Ze>=0&&Ze<=1&&fr>=0&&fr<=1&&(he?Sn++:Sn.push({x:ye.x,y:ye.y,t1:Ze,t2:fr}))}}return Sn},ee=function(vt,Ht,he){vt=path2Curve(vt),Ht=path2Curve(Ht);for(var jt,Te,We,Qe,pr,lr,Vr,Pr,Br,Sn,an=he?0:[],zn=0,Zn=vt.length;zn<Zn;zn++){var Wn=vt[zn];if(Wn[0]==="M")jt=pr=Wn[1],Te=lr=Wn[2];else{Wn[0]==="C"?(Br=[jt,Te].concat(Wn.slice(1)),jt=Br[6],Te=Br[7]):(Br=[jt,Te,jt,Te,pr,lr,pr,lr],jt=pr,Te=lr);for(var Dn=0,Xn=Ht.length;Dn<Xn;Dn++){var Ft=Ht[Dn];if(Ft[0]==="M")We=Vr=Ft[1],Qe=Pr=Ft[2];else{Ft[0]==="C"?(Sn=[We,Qe].concat(Ft.slice(1)),We=Sn[6],Qe=Sn[7]):(Sn=[We,Qe,We,Qe,Vr,Pr,Vr,Pr],We=Vr,Qe=Pr);var Wt=Bt(Br,Sn,he);if(he)an+=Wt;else{for(var oe=0,ye=Wt.length;oe<ye;oe++)Wt[oe].segment1=zn,Wt[oe].segment2=Dn,Wt[oe].bez1=Br,Wt[oe].bez2=Sn;an=an.concat(Wt)}}}}}return an};function me(vt,Ht){return ee(vt,Ht)}function Yt(vt){return Math.sqrt(vt[0]*vt[0]+vt[1]*vt[1])}function qe(vt,Ht){return Yt(vt)*Yt(Ht)?(vt[0]*Ht[0]+vt[1]*Ht[1])/(Yt(vt)*Yt(Ht)):1}function vr(vt,Ht){return(vt[0]*Ht[1]<vt[1]*Ht[0]?-1:1)*Math.acos(qe(vt,Ht))}function ie(vt,Ht){return vt[0]===Ht[0]&&vt[1]===Ht[1]}function qt(vt,Ht){var he=Ht[1],jt=Ht[2],Te=(0,kt.wQ)((0,kt.c$)(Ht[3]),Math.PI*2),We=Ht[4],Qe=Ht[5],pr=vt[0],lr=vt[1],Vr=Ht[6],Pr=Ht[7],Br=Math.cos(Te)*(pr-Vr)/2+Math.sin(Te)*(lr-Pr)/2,Sn=-1*Math.sin(Te)*(pr-Vr)/2+Math.cos(Te)*(lr-Pr)/2,an=Br*Br/(he*he)+Sn*Sn/(jt*jt);an>1&&(he*=Math.sqrt(an),jt*=Math.sqrt(an));var zn=he*he*(Sn*Sn)+jt*jt*(Br*Br),Zn=zn?Math.sqrt((he*he*(jt*jt)-zn)/zn):1;We===Qe&&(Zn*=-1),isNaN(Zn)&&(Zn=0);var Wn=jt?Zn*he*Sn/jt:0,Dn=he?Zn*-jt*Br/he:0,Xn=(pr+Vr)/2+Math.cos(Te)*Wn-Math.sin(Te)*Dn,Ft=(lr+Pr)/2+Math.sin(Te)*Wn+Math.cos(Te)*Dn,Wt=[(Br-Wn)/he,(Sn-Dn)/jt],oe=[(-1*Br-Wn)/he,(-1*Sn-Dn)/jt],ye=vr([1,0],Wt),Ze=vr(Wt,oe);return qe(Wt,oe)<=-1&&(Ze=Math.PI),qe(Wt,oe)>=1&&(Ze=0),Qe===0&&Ze>0&&(Ze=Ze-2*Math.PI),Qe===1&&Ze<0&&(Ze=Ze+2*Math.PI),{cx:Xn,cy:Ft,rx:ie(vt,[Vr,Pr])?0:he,ry:ie(vt,[Vr,Pr])?0:jt,startAngle:ye,endAngle:ye+Ze,xRotation:Te,arcFlag:We,sweepFlag:Qe}}function bt(vt,Ht){return[Ht[0]+(Ht[0]-vt[0]),Ht[1]+(Ht[1]-vt[1])]}function Xt(vt){vt=K(vt);for(var Ht=[],he=null,jt=null,Te=null,We=0,Qe=vt.length,pr=0;pr<Qe;pr++){var lr=vt[pr];jt=vt[pr+1];var Vr=lr[0],Pr={command:Vr,prePoint:he,params:lr,startTangent:null,endTangent:null};switch(Vr){case"M":Te=[lr[1],lr[2]],We=pr;break;case"A":var Br=qt(he,lr);Pr.arcParams=Br;break;default:break}if(Vr==="Z")he=Te,jt=vt[We+1];else{var Sn=lr.length;he=[lr[Sn-2],lr[Sn-1]]}jt&&jt[0]==="Z"&&(jt=vt[We],Ht[We]&&(Ht[We].prePoint=he)),Pr.currentPoint=he,Ht[We]&&ie(he,Ht[We].currentPoint)&&(Ht[We].prePoint=Pr.prePoint);var an=jt?[jt[jt.length-2],jt[jt.length-1]]:null;Pr.nextPoint=an;var zn=Pr.prePoint;if(["L","H","V"].includes(Vr))Pr.startTangent=[zn[0]-he[0],zn[1]-he[1]],Pr.endTangent=[he[0]-zn[0],he[1]-zn[1]];else if(Vr==="Q"){var Zn=[lr[1],lr[2]];Pr.startTangent=[zn[0]-Zn[0],zn[1]-Zn[1]],Pr.endTangent=[he[0]-Zn[0],he[1]-Zn[1]]}else if(Vr==="T"){var Wn=Ht[pr-1],Zn=bt(Wn.currentPoint,zn);Wn.command==="Q"?(Pr.command="Q",Pr.startTangent=[zn[0]-Zn[0],zn[1]-Zn[1]],Pr.endTangent=[he[0]-Zn[0],he[1]-Zn[1]]):(Pr.command="TL",Pr.startTangent=[zn[0]-he[0],zn[1]-he[1]],Pr.endTangent=[he[0]-zn[0],he[1]-zn[1]])}else if(Vr==="C"){var Dn=[lr[1],lr[2]],Xn=[lr[3],lr[4]];Pr.startTangent=[zn[0]-Dn[0],zn[1]-Dn[1]],Pr.endTangent=[he[0]-Xn[0],he[1]-Xn[1]],Pr.startTangent[0]===0&&Pr.startTangent[1]===0&&(Pr.startTangent=[Dn[0]-Xn[0],Dn[1]-Xn[1]]),Pr.endTangent[0]===0&&Pr.endTangent[1]===0&&(Pr.endTangent=[Xn[0]-Dn[0],Xn[1]-Dn[1]])}else if(Vr==="S"){var Wn=Ht[pr-1],Dn=bt(Wn.currentPoint,zn),Xn=[lr[1],lr[2]];Wn.command==="C"?(Pr.command="C",Pr.startTangent=[zn[0]-Dn[0],zn[1]-Dn[1]],Pr.endTangent=[he[0]-Xn[0],he[1]-Xn[1]]):(Pr.command="SQ",Pr.startTangent=[zn[0]-Xn[0],zn[1]-Xn[1]],Pr.endTangent=[he[0]-Xn[0],he[1]-Xn[1]])}else if(Vr==="A"){var Ft=.001,Wt=Pr.arcParams||{},oe=Wt.cx,ye=oe===void 0?0:oe,Ze=Wt.cy,fr=Ze===void 0?0:Ze,_r=Wt.rx,we=_r===void 0?0:_r,ir=Wt.ry,Hr=ir===void 0?0:ir,In=Wt.sweepFlag,nn=In===void 0?0:In,Yr=Wt.startAngle,On=Yr===void 0?0:Yr,bi=Wt.endAngle,Mi=bi===void 0?0:bi;nn===0&&(Ft*=-1);var tn=we*Math.cos(On-Ft)+ye,mi=Hr*Math.sin(On-Ft)+fr;Pr.startTangent=[tn-Te[0],mi-Te[1]];var Yn=we*Math.cos(On+Mi+Ft)+ye,fi=Hr*Math.sin(On+Mi-Ft)+fr;Pr.endTangent=[zn[0]-Yn,zn[1]-fi]}Ht.push(Pr)}return Ht}var $t=1e-6;function xt(vt){return Math.abs(vt)<$t?0:vt<0?-1:1}function wt(vt,Ht,he){return(he[0]-vt[0])*(Ht[1]-vt[1])===(Ht[0]-vt[0])*(he[1]-vt[1])&&Math.min(vt[0],Ht[0])<=he[0]&&he[0]<=Math.max(vt[0],Ht[0])&&Math.min(vt[1],Ht[1])<=he[1]&&he[1]<=Math.max(vt[1],Ht[1])}function ue(vt,Ht,he){var jt=!1,Te=vt.length;if(Te<=2)return!1;for(var We=0;We<Te;We++){var Qe=vt[We],pr=vt[(We+1)%Te];if(wt(Qe,pr,[Ht,he]))return!0;xt(Qe[1]-he)>0!=xt(pr[1]-he)>0&&xt(Ht-(he-Qe[1])*(Qe[0]-pr[0])/(Qe[1]-pr[1])-Qe[0])<0&&(jt=!jt)}return jt}var Ie=function(vt,Ht,he){return vt>=Ht&&vt<=he};function Ne(vt,Ht,he,jt){var Te=.001,We={x:he.x-vt.x,y:he.y-vt.y},Qe={x:Ht.x-vt.x,y:Ht.y-vt.y},pr={x:jt.x-he.x,y:jt.y-he.y},lr=Qe.x*pr.y-Qe.y*pr.x,Vr=lr*lr,Pr=Qe.x*Qe.x+Qe.y*Qe.y,Br=pr.x*pr.x+pr.y*pr.y,Sn=null;if(Vr>Te*Pr*Br){var an=(We.x*pr.y-We.y*pr.x)/lr,zn=(We.x*Qe.y-We.y*Qe.x)/lr;Ie(an,0,1)&&Ie(zn,0,1)&&(Sn={x:vt.x+an*Qe.x,y:vt.y+an*Qe.y})}return Sn}function Zt(vt){for(var Ht=[],he=vt.length,jt=0;jt<he-1;jt++){var Te=vt[jt],We=vt[jt+1];Ht.push({from:{x:Te[0],y:Te[1]},to:{x:We[0],y:We[1]}})}if(Ht.length>1){var Qe=vt[0],pr=vt[he-1];Ht.push({from:{x:pr[0],y:pr[1]},to:{x:Qe[0],y:Qe[1]}})}return Ht}function Ct(vt,Ht){var he=!1;return(0,kt.S6)(vt,function(jt){if(Ne(jt.from,jt.to,Ht.from,Ht.to))return he=!0,!1}),he}function Tt(vt){var Ht=vt.map(function(jt){return jt[0]}),he=vt.map(function(jt){return jt[1]});return{minX:Math.min.apply(null,Ht),maxX:Math.max.apply(null,Ht),minY:Math.min.apply(null,he),maxY:Math.max.apply(null,he)}}function Nt(vt,Ht){return!(Ht.minX>vt.maxX||Ht.maxX<vt.minX||Ht.minY>vt.maxY||Ht.maxY<vt.minY)}function tt(vt,Ht){if(vt.length<2||Ht.length<2)return!1;var he=Tt(vt),jt=Tt(Ht);if(!Nt(he,jt))return!1;var Te=!1;if((0,kt.S6)(Ht,function(lr){if(ue(vt,lr[0],lr[1]))return Te=!0,!1}),Te||((0,kt.S6)(vt,function(lr){if(ue(Ht,lr[0],lr[1]))return Te=!0,!1}),Te))return!0;var We=Zt(vt),Qe=Zt(Ht),pr=!1;return(0,kt.S6)(Qe,function(lr){if(Ct(We,lr))return pr=!0,!1}),pr}},22374:function(pn,Ot,nt){"use strict";nt.d(Ot,{Ct:function(){return cs},f0:function(){return Nr},uZ:function(){return Ft},VS:function(){return zs},d9:function(){return Au},FX:function(){return Et},Ds:function(){return xl},b$:function(){return Rc},e5:function(){return pt},S6:function(){return be},yW:function(){return We},hX:function(){return yt},sE:function(){return Ke},cx:function(){return Jt},Wx:function(){return St},ri:function(){return oe},xH:function(){return mt},U5:function(){return yo},U2:function(){return An},Lo:function(){return Gl},rx:function(){return ee},ru:function(){return Sn},vM:function(){return Pr},Ms:function(){return Br},wH:function(){return Ya},YM:function(){return Nt},q9:function(){return Et},cq:function(){return Cs},kJ:function(){return b},jn:function(){return zo},J_:function(){return Xo},kK:function(){return es},xb:function(){return Dc},Xy:function(){return X},mf:function(){return ut},BD:function(){return Dt},UM:function(){return P},Ft:function(){return Ku},hj:function(){return Ze},vQ:function(){return bi},Kn:function(){return W},PO:function(){return Ue},HD:function(){return Ie},P9:function(){return ot},o8:function(){return Ba},XP:function(){return At},Z$:function(){return tt},vl:function(){return de},UI:function(){return fe},Q8:function(){return br},Fp:function(){return Le},UT:function(){return fi},HP:function(){return Ju},VV:function(){return Be},F:function(){return Ea},CD:function(){return Nr},wQ:function(){return Ia},ZT:function(){return pu},CE:function(){return Sa},ei:function(){return ka},u4:function(){return xt},Od:function(){return ue},U7:function(){return ls},t8:function(){return Hn},dp:function(){return Il},G:function(){return pr},MR:function(){return Zt},ng:function(){return Mr},P2:function(){return eo},qo:function(){return Eo},c$:function(){return Wo},BB:function(){return bo},jj:function(){return Ct},EL:function(){return ro},jC:function(){return kn},VO:function(){return Nu},I:function(){return Tt}});var kt=function(pe){return pe!==null&&typeof pe!="function"&&isFinite(pe.length)},gt=kt,k=function(pe,ar){return gt(pe)?pe.indexOf(ar)>-1:!1},Et=k,K=function(pe,ar){if(!gt(pe))return pe;for(var Fr=[],Xr=0;Xr<pe.length;Xr++){var _n=pe[Xr];ar(_n,Xr)&&Fr.push(_n)}return Fr},yt=K,J=function(pe,ar){return ar===void 0&&(ar=[]),yt(pe,function(Fr){return!Et(ar,Fr)})},pt=J,et={}.toString,_e=function(pe,ar){return et.call(pe)==="[object "+ar+"]"},ot=_e,ut=function(pe){return ot(pe,"Function")},zt=function(pe){return pe==null},P=zt,b=function(pe){return Array.isArray?Array.isArray(pe):ot(pe,"Array")},W=function(pe){var ar=typeof pe;return pe!==null&&ar==="object"||ar==="function"};function le(pe,ar){if(pe){var Fr;if(b(pe))for(var Xr=0,_n=pe.length;Xr<_n&&(Fr=ar(pe[Xr],Xr),Fr!==!1);Xr++);else if(W(pe)){for(var ki in pe)if(pe.hasOwnProperty(ki)&&(Fr=ar(pe[ki],ki),Fr===!1))break}}}var be=le,Me=Object.keys?function(pe){return Object.keys(pe)}:function(pe){var ar=[];return be(pe,function(Fr,Xr){ut(pe)&&Xr==="prototype"||ar.push(Xr)}),ar},At=Me;function rt(pe,ar){var Fr=At(ar),Xr=Fr.length;if(P(pe))return!Xr;for(var _n=0;_n<Xr;_n+=1){var ki=Fr[_n];if(ar[ki]!==pe[ki]||!(ki in pe))return!1}return!0}var Dt=rt,Ee=function(pe){return typeof pe=="object"&&pe!==null},ge=Ee,Ge=function(pe){if(!ge(pe)||!ot(pe,"Object"))return!1;if(Object.getPrototypeOf(pe)===null)return!0;for(var ar=pe;Object.getPrototypeOf(ar)!==null;)ar=Object.getPrototypeOf(ar);return Object.getPrototypeOf(pe)===ar},Ue=Ge;function xe(pe,ar){if(!b(pe))return null;var Fr;if(ut(ar)&&(Fr=ar),Ue(ar)&&(Fr=function(_n){return Dt(_n,ar)}),Fr){for(var Xr=0;Xr<pe.length;Xr+=1)if(Fr(pe[Xr]))return pe[Xr]}return null}var Ke=xe;function Lt(pe,ar,Fr){Fr===void 0&&(Fr=0);for(var Xr=Fr;Xr<pe.length;Xr++)if(ar(pe[Xr],Xr))return Xr;return-1}var Jt=Lt,ft=function(pe,ar){for(var Fr=null,Xr=0;Xr<pe.length;Xr++){var _n=pe[Xr],ki=_n[ar];if(!P(ki)){b(ki)?Fr=ki[0]:Fr=ki;break}}return Fr},St=ft,Y=function(pe){if(!b(pe))return[];for(var ar=[],Fr=0;Fr<pe.length;Fr++)ar=ar.concat(pe[Fr]);return ar},mt=Y,se=function(pe,ar){if(ar===void 0&&(ar=[]),!isArray(pe))ar.push(pe);else for(var Fr=0;Fr<pe.length;Fr+=1)se(pe[Fr],ar);return ar},ke=null,Le=function(pe){if(b(pe))return pe.reduce(function(ar,Fr){return Math.max(ar,Fr)},pe[0])},Be=function(pe){if(b(pe))return pe.reduce(function(ar,Fr){return Math.min(ar,Fr)},pe[0])},Bt=function(pe){var ar=pe.filter(function(ia){return!isNaN(ia)});if(!ar.length)return{min:0,max:0};if(b(pe[0])){for(var Fr=[],Xr=0;Xr<pe.length;Xr++)Fr=Fr.concat(pe[Xr]);ar=Fr}var _n=Le(ar),ki=Be(ar);return{min:ki,max:_n}},ee=Bt,me=Array.prototype,Yt=me.splice,qe=me.indexOf,vr=function(pe){for(var ar=[],Fr=1;Fr<arguments.length;Fr++)ar[Fr-1]=arguments[Fr];for(var Xr=0;Xr<ar.length;Xr++)for(var _n=ar[Xr],ki=-1;(ki=qe.call(pe,_n))>-1;)Yt.call(pe,ki,1);return pe},ie=null,qt=Array.prototype.splice,bt=function(ar,Fr){if(!gt(ar))return[];for(var Xr=ar?Fr.length:0,_n=Xr-1;Xr--;){var ki=void 0,ia=Fr[Xr];(Xr===_n||ia!==ki)&&(ki=ia,qt.call(ar,ia,1))}return ar},Xt=bt,$t=function(pe,ar,Fr){if(!b(pe)&&!Ue(pe))return pe;var Xr=Fr;return be(pe,function(_n,ki){Xr=ar(Xr,_n,ki)}),Xr},xt=$t,wt=function(pe,ar){var Fr=[];if(!gt(pe))return Fr;for(var Xr=-1,_n=[],ki=pe.length;++Xr<ki;){var ia=pe[Xr];ar(ia,Xr,pe)&&(Fr.push(ia),_n.push(Xr))}return Xt(pe,_n),Fr},ue=wt,Ie=function(pe){return ot(pe,"String")};function Ne(pe,ar){var Fr;if(ut(ar))Fr=function(_n,ki){return ar(_n)-ar(ki)};else{var Xr=[];Ie(ar)?Xr.push(ar):b(ar)&&(Xr=ar),Fr=function(_n,ki){for(var ia=0;ia<Xr.length;ia+=1){var $a=Xr[ia];if(_n[$a]>ki[$a])return 1;if(_n[$a]<ki[$a])return-1}return 0}}return pe.sort(Fr),pe}var Zt=Ne;function Ct(pe,ar){ar===void 0&&(ar=new Map);var Fr=[];if(Array.isArray(pe))for(var Xr=0,_n=pe.length;Xr<_n;Xr++){var ki=pe[Xr];ar.has(ki)||(Fr.push(ki),ar.set(ki,!0))}return Fr}var Tt=function(pe,ar){for(var Fr=[],Xr={},_n=0;_n<pe.length;_n++){var ki=pe[_n],ia=ki[ar];if(!P(ia)){b(ia)||(ia=[ia]);for(var $a=0;$a<ia.length;$a++){var du=ia[$a];Xr[du]||(Fr.push(du),Xr[du]=!0)}}}return Fr};function Nt(pe){if(gt(pe))return pe[0]}function tt(pe){if(gt(pe)){var ar=pe;return ar[ar.length-1]}}function vt(pe,ar){return isArray(pe)||isString(pe)?pe[0]===ar:!1}var Ht=null;function he(pe,ar){return isArray(pe)||isString(pe)?pe[pe.length-1]===ar:!1}var jt=null,Te=function(pe,ar){for(var Fr=0;Fr<pe.length;Fr++)if(!ar(pe[Fr],Fr))return!1;return!0},We=Te,Qe=function(pe,ar){for(var Fr=0;Fr<pe.length;Fr++)if(ar(pe[Fr],Fr))return!0;return!1},pr=Qe,lr=Object.prototype.hasOwnProperty;function Vr(pe,ar){if(!ar||!b(pe))return{};for(var Fr={},Xr=ut(ar)?ar:function($a){return $a[ar]},_n,ki=0;ki<pe.length;ki++){var ia=pe[ki];_n=Xr(ia),lr.call(Fr,_n)?Fr[_n].push(ia):Fr[_n]=[ia]}return Fr}var Pr=Vr;function Br(pe,ar){if(!ar)return{0:pe};if(!ut(ar)){var Fr=b(ar)?ar:ar.replace(/\s+/g,"").split("*");ar=function(Xr){for(var _n="_",ki=0,ia=Fr.length;ki<ia;ki++)_n+=Xr[Fr[ki]]&&Xr[Fr[ki]].toString();return _n}}return Pr(pe,ar)}var Sn=function(pe,ar){if(!ar)return[pe];var Fr=Br(pe,ar),Xr=[];for(var _n in Fr)Xr.push(Fr[_n]);return Xr},an={};function zn(pe){var ar=an[pe];if(!ar){for(var Fr=pe.toString(16),Xr=Fr.length;Xr<6;Xr++)Fr="0"+Fr;ar="#"+Fr,an[pe]=ar}return ar}var Zn=null;function Wn(pe){var ar=0,Fr=0,Xr=0,_n=0;return isArray(pe)?pe.length===1?ar=Fr=Xr=_n=pe[0]:pe.length===2?(ar=Xr=pe[0],Fr=_n=pe[1]):pe.length===3?(ar=pe[0],Fr=_n=pe[1],Xr=pe[2]):(ar=pe[0],Fr=pe[1],Xr=pe[2],_n=pe[3]):ar=Fr=Xr=_n=pe,{r1:ar,r2:Fr,r3:Xr,r4:_n}}var Dn=null,Xn=function(pe,ar,Fr){return pe<ar?ar:pe>Fr?Fr:pe},Ft=Xn,Wt=function(pe,ar){var Fr=ar.toString(),Xr=Fr.indexOf(".");if(Xr===-1)return Math.round(pe);var _n=Fr.substr(Xr+1).length;return _n>20&&(_n=20),parseFloat(pe.toFixed(_n))},oe=Wt,ye=function(pe){return ot(pe,"Number")},Ze=ye,fr=function(pe){return isNumber(pe)&&pe%1!==0},_r=null,we=function(pe){return isNumber(pe)&&pe%2===0},ir=null,Hr=Number.isInteger?Number.isInteger:function(pe){return Ze(pe)&&pe%1===0},In=null,nn=function(pe){return isNumber(pe)&&pe<0},Yr=null,On=1e-5;function bi(pe,ar,Fr){return Fr===void 0&&(Fr=On),Math.abs(pe-ar)<Fr}var Mi=function(pe){return isNumber(pe)&&pe%2!==0},tn=null,mi=function(pe){return isNumber(pe)&&pe>0},Yn=null,fi=function(pe,ar){if(b(pe)){for(var Fr,Xr=-1/0,_n=0;_n<pe.length;_n++){var ki=pe[_n],ia=ut(ar)?ar(ki):ki[ar];ia>Xr&&(Fr=ki,Xr=ia)}return Fr}},Ea=function(pe,ar){if(b(pe)){for(var Fr,Xr=1/0,_n=0;_n<pe.length;_n++){var ki=pe[_n],ia=ut(ar)?ar(ki):ki[ar];ia<Xr&&(Fr=ki,Xr=ia)}return Fr}},si=function(pe,ar){return(pe%ar+ar)%ar},Ia=si,vo=180/Math.PI,Oa=function(pe){return vo*pe},Ha=null,wa=parseInt,ya=Math.PI/180,Qa=function(pe){return ya*pe},Wo=Qa,yo=be,Va=function(pe,ar){return pe.hasOwnProperty(ar)},Ya=Va,No=Object.values?function(pe){return Object.values(pe)}:function(pe){var ar=[];return be(pe,function(Fr,Xr){ut(pe)&&Xr==="prototype"||ar.push(Fr)}),ar},Nu=No,ts=function(pe,ar){return contains(values(pe),ar)},bo=function(pe){return P(pe)?"":pe.toString()},rr=function(pe){return bo(pe).toLowerCase()},de=rr;function Ve(pe,ar){return!pe||!ar?pe:pe.replace(/\\?\{([^{}]+)\}/g,function(Fr,Xr){return Fr.charAt(0)==="\\"?Fr.slice(1):ar[Xr]===void 0?"":ar[Xr]})}var Mr=Ve,rn=function(pe){var ar=bo(pe);return ar.charAt(0).toUpperCase()+ar.substring(1)},kn=rn,$n={}.toString,Cn=function(pe){return $n.call(pe).replace(/^\[object /,"").replace(/]$/,"")},Ki=Cn,Fa=function(pe){return isType(pe,"Arguments")},Ss=null,ko=function(pe){return ot(pe,"Boolean")},zo=ko,oo=function(pe){return ot(pe,"Date")},Xo=oo,iu=function(pe){return isType(pe,"Error")},Ko=null;function Ul(pe){return isNumber(pe)&&isFinite(pe)}var $c=function(pe){return pe===null},Ku=$c,Ce=Object.prototype,Xe=function(pe){var ar=pe&&pe.constructor,Fr=typeof ar=="function"&&ar.prototype||Ce;return pe===Fr},Cr=Xe,on=function(pe){return isType(pe,"RegExp")},li=null,Di=function(pe){return pe===void 0},Ba=Di,xs=function(pe){return pe instanceof Element||pe instanceof HTMLDocument},es=xs;function ls(pe){var ar=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(Fr){return setTimeout(Fr,16)};return ar(pe)}function zs(pe){var ar=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout;ar(pe)}var Qu=function(){for(var pe=[],ar=0;ar<arguments.length;ar++)pe[ar]=arguments[ar];for(var Fr=pe[0],Xr=1;Xr<pe.length;Xr++){var _n=pe[Xr];isFunction(_n)&&(_n=_n.prototype),mix(Fr.prototype,_n)}},Cu=null,Ks=function(pe){if(typeof pe!="object"||pe===null)return pe;var ar;if(b(pe)){ar=[];for(var Fr=0,Xr=pe.length;Fr<Xr;Fr++)typeof pe[Fr]=="object"&&pe[Fr]!=null?ar[Fr]=Ks(pe[Fr]):ar[Fr]=pe[Fr]}else{ar={};for(var _n in pe)typeof pe[_n]=="object"&&pe[_n]!=null?ar[_n]=Ks(pe[_n]):ar[_n]=pe[_n]}return ar},Au=Ks;function zu(pe,ar,Fr){var Xr;return function(){var _n=this,ki=arguments,ia=function(){Xr=null,Fr||pe.apply(_n,ki)},$a=Fr&&!Xr;clearTimeout(Xr),Xr=setTimeout(ia,ar),$a&&pe.apply(_n,ki)}}var xl=zu,Ju=function(pe,ar){if(!ut(pe))throw new TypeError("Expected a function");var Fr=function(){for(var Xr=[],_n=0;_n<arguments.length;_n++)Xr[_n]=arguments[_n];var ki=ar?ar.apply(this,Xr):Xr[0],ia=Fr.cache;if(ia.has(ki))return ia.get(ki);var $a=pe.apply(this,Xr);return ia.set(ki,$a),$a};return Fr.cache=new Map,Fr},Uu=5;function Uo(pe,ar,Fr,Xr){Fr=Fr||0,Xr=Xr||Uu;for(var _n in ar)if(ar.hasOwnProperty(_n)){var ki=ar[_n];ki!==null&&Ue(ki)?(Ue(pe[_n])||(pe[_n]={}),Fr<Xr?Uo(pe[_n],ki,Fr+1,Xr):pe[_n]=ar[_n]):b(ki)?(pe[_n]=[],pe[_n]=pe[_n].concat(ki)):ki!==void 0&&(pe[_n]=ki)}}var js=function(pe){for(var ar=[],Fr=1;Fr<arguments.length;Fr++)ar[Fr-1]=arguments[Fr];for(var Xr=0;Xr<ar.length;Xr+=1)Uo(pe,ar[Xr]);return pe},Rc=js,qc=function(pe,ar,Fr,Xr){isFunction(ar)||(Fr=ar,ar=pe,pe=function(){});var _n=Object.create?function(ia,$a){return Object.create(ia,{constructor:{value:$a}})}:function(ia,$a){function du(){}du.prototype=ia;var au=new du;return au.constructor=$a,au},ki=_n(ar.prototype,pe);return pe.prototype=mix(ki,pe.prototype),pe.superclass=_n(ar.prototype,ar),mix(ki,Fr),mix(pe,Xr),pe},Tu=null,Zl=function(pe,ar){if(!gt(pe))return-1;var Fr=Array.prototype.indexOf;if(Fr)return Fr.call(pe,ar);for(var Xr=-1,_n=0;_n<pe.length;_n++)if(pe[_n]===ar){Xr=_n;break}return Xr},Cs=Zl,Zu=Object.prototype.hasOwnProperty;function ja(pe){if(P(pe))return!0;if(gt(pe))return!pe.length;var ar=Ki(pe);if(ar==="Map"||ar==="Set")return!pe.size;if(Cr(pe))return!Object.keys(pe).length;for(var Fr in pe)if(Zu.call(pe,Fr))return!1;return!0}var Dc=ja,D=function(pe,ar){if(pe===ar)return!0;if(!pe||!ar||Ie(pe)||Ie(ar))return!1;if(gt(pe)||gt(ar)){if(pe.length!==ar.length)return!1;for(var Fr=!0,Xr=0;Xr<pe.length&&(Fr=D(pe[Xr],ar[Xr]),!!Fr);Xr++);return Fr}if(ge(pe)||ge(ar)){var _n=Object.keys(pe),ki=Object.keys(ar);if(_n.length!==ki.length)return!1;for(var Fr=!0,Xr=0;Xr<_n.length&&(Fr=D(pe[_n[Xr]],ar[_n[Xr]]),!!Fr);Xr++);return Fr}return!1},X=D,Mt=function(pe,ar,Fr){return isFunction(Fr)?!!Fr(pe,ar):isEqual(pe,ar)},it=function(pe,ar){if(!gt(pe))return pe;for(var Fr=[],Xr=0;Xr<pe.length;Xr++){var _n=pe[Xr];Fr.push(ar(_n,Xr))}return Fr},fe=it,He=function(pe){return pe},br=function(pe,ar){ar===void 0&&(ar=He);var Fr={};return W(pe)&&!P(pe)&&Object.keys(pe).forEach(function(Xr){Fr[Xr]=ar(pe[Xr],Xr)}),Fr};function Ur(pe,ar){for(var Fr in ar)ar.hasOwnProperty(Fr)&&Fr!=="constructor"&&ar[Fr]!==void 0&&(pe[Fr]=ar[Fr])}function Nr(pe,ar,Fr,Xr){return ar&&Ur(pe,ar),Fr&&Ur(pe,Fr),Xr&&Ur(pe,Xr),pe}var An=function(pe,ar,Fr){for(var Xr=0,_n=Ie(ar)?ar.split("."):ar;pe&&Xr<_n.length;)pe=pe[_n[Xr++]];return pe===void 0||Xr<_n.length?Fr:pe},Hn=function(pe,ar,Fr){var Xr=pe,_n=Ie(ar)?ar.split("."):ar;return _n.forEach(function(ki,ia){ia<_n.length-1?(W(Xr[ki])||(Xr[ki]=Ze(_n[ia+1])?[]:{}),Xr=Xr[ki]):Xr[ki]=Fr}),pe},Ji=Object.prototype.hasOwnProperty,ka=function(pe,ar){if(pe===null||!Ue(pe))return{};var Fr={};return be(ar,function(Xr){Ji.call(pe,Xr)&&(Fr[Xr]=pe[Xr])}),Fr},Sa=function(pe,ar){return xt(pe,function(Fr,Xr,_n){return ar.includes(_n)||(Fr[_n]=Xr),Fr},{})},eo=function(pe,ar,Fr){var Xr,_n,ki,ia,$a=0;Fr||(Fr={});var du=function(){$a=Fr.leading===!1?0:Date.now(),Xr=null,ia=pe.apply(_n,ki),Xr||(_n=ki=null)},au=function(){var Xa=Date.now();!$a&&Fr.leading===!1&&($a=Xa);var Gu=ar-(Xa-$a);return _n=this,ki=arguments,Gu<=0||Gu>ar?(Xr&&(clearTimeout(Xr),Xr=null),$a=Xa,ia=pe.apply(_n,ki),Xr||(_n=ki=null)):!Xr&&Fr.trailing!==!1&&(Xr=setTimeout(du,Gu)),ia};return au.cancel=function(){clearTimeout(Xr),$a=0,Xr=_n=ki=null},au},Eo=function(pe){return gt(pe)?Array.prototype.slice.call(pe):[]},So={},ro=function(pe){return pe=pe||"g",So[pe]?So[pe]+=1:So[pe]=1,pe+So[pe]},pu=function(){};function Il(pe){return P(pe)?0:gt(pe)?pe.length:Object.keys(pe).length}var bl=nt(29268),Vl,ul=Ju(function(pe,ar){ar===void 0&&(ar={});var Fr=ar.fontSize,Xr=ar.fontFamily,_n=ar.fontWeight,ki=ar.fontStyle,ia=ar.fontVariant;return Vl||(Vl=document.createElement("canvas").getContext("2d")),Vl.font=[ki,ia,_n,Fr+"px",Xr].join(" "),Vl.measureText(Ie(pe)?pe:"").width},function(pe,ar){return ar===void 0&&(ar={}),(0,bl.pr)([pe],Nu(ar)).join("")}),Gl=function(pe,ar,Fr,Xr){Xr===void 0&&(Xr="...");var _n=16,ki=ul(Xr,Fr),ia=Ie(pe)?pe:bo(pe),$a=ar,du=[],au,Xa;if(ul(pe,Fr)<=ar)return pe;for(;au=ia.substr(0,_n),Xa=ul(au,Fr),!(Xa+ki>$a&&Xa>$a);)if(du.push(au),$a-=Xa,ia=ia.substr(_n),!ia)return du.join("");for(;au=ia.substr(0,1),Xa=ul(au,Fr),!(Xa+ki>$a);)if(du.push(au),$a-=Xa,ia=ia.substr(1),!ia)return du.join("");return""+du.join("")+Xr},Vu=function(){function pe(){this.map={}}return pe.prototype.has=function(ar){return this.map[ar]!==void 0},pe.prototype.get=function(ar,Fr){var Xr=this.map[ar];return Xr===void 0?Fr:Xr},pe.prototype.set=function(ar,Fr){this.map[ar]=Fr},pe.prototype.clear=function(){this.map={}},pe.prototype.delete=function(ar){delete this.map[ar]},pe.prototype.size=function(){return Object.keys(this.map).length},pe}(),cs=Vu},70309:function(pn){pn.exports=Ot;function Ot(gt,k){var Et=gt&>.type,K;if(Et==="FeatureCollection")for(K=0;K<gt.features.length;K++)Ot(gt.features[K],k);else if(Et==="GeometryCollection")for(K=0;K<gt.geometries.length;K++)Ot(gt.geometries[K],k);else if(Et==="Feature")Ot(gt.geometry,k);else if(Et==="Polygon")nt(gt.coordinates,k);else if(Et==="MultiPolygon")for(K=0;K<gt.coordinates.length;K++)nt(gt.coordinates[K],k);return gt}function nt(gt,k){if(gt.length!==0){kt(gt[0],k);for(var Et=1;Et<gt.length;Et++)kt(gt[Et],!k)}}function kt(gt,k){for(var Et=0,K=0,yt=0,J=gt.length,pt=J-1;yt<J;pt=yt++){var et=(gt[yt][0]-gt[pt][0])*(gt[pt][1]+gt[yt][1]),_e=Et+et;K+=Math.abs(Et)>=Math.abs(et)?Et-_e+et:et-_e+Et,Et=_e}Et+K>=0!=!!k&>.reverse()}},56834:function(pn){"use strict";pn.exports=Ot;function Ot(nt,kt){this.x=nt,this.y=kt}Ot.prototype={clone:function(){return new Ot(this.x,this.y)},add:function(nt){return this.clone()._add(nt)},sub:function(nt){return this.clone()._sub(nt)},multByPoint:function(nt){return this.clone()._multByPoint(nt)},divByPoint:function(nt){return this.clone()._divByPoint(nt)},mult:function(nt){return this.clone()._mult(nt)},div:function(nt){return this.clone()._div(nt)},rotate:function(nt){return this.clone()._rotate(nt)},rotateAround:function(nt,kt){return this.clone()._rotateAround(nt,kt)},matMult:function(nt){return this.clone()._matMult(nt)},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(nt){return this.x===nt.x&&this.y===nt.y},dist:function(nt){return Math.sqrt(this.distSqr(nt))},distSqr:function(nt){var kt=nt.x-this.x,gt=nt.y-this.y;return kt*kt+gt*gt},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(nt){return Math.atan2(this.y-nt.y,this.x-nt.x)},angleWith:function(nt){return this.angleWithSep(nt.x,nt.y)},angleWithSep:function(nt,kt){return Math.atan2(this.x*kt-this.y*nt,this.x*nt+this.y*kt)},_matMult:function(nt){var kt=nt[0]*this.x+nt[1]*this.y,gt=nt[2]*this.x+nt[3]*this.y;return this.x=kt,this.y=gt,this},_add:function(nt){return this.x+=nt.x,this.y+=nt.y,this},_sub:function(nt){return this.x-=nt.x,this.y-=nt.y,this},_mult:function(nt){return this.x*=nt,this.y*=nt,this},_div:function(nt){return this.x/=nt,this.y/=nt,this},_multByPoint:function(nt){return this.x*=nt.x,this.y*=nt.y,this},_divByPoint:function(nt){return this.x/=nt.x,this.y/=nt.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var nt=this.y;return this.y=this.x,this.x=-nt,this},_rotate:function(nt){var kt=Math.cos(nt),gt=Math.sin(nt),k=kt*this.x-gt*this.y,Et=gt*this.x+kt*this.y;return this.x=k,this.y=Et,this},_rotateAround:function(nt,kt){var gt=Math.cos(nt),k=Math.sin(nt),Et=kt.x+gt*(this.x-kt.x)-k*(this.y-kt.y),K=kt.y+k*(this.x-kt.x)+gt*(this.y-kt.y);return this.x=Et,this.y=K,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Ot.convert=function(nt){return nt instanceof Ot?nt:Array.isArray(nt)?new Ot(nt[0],nt[1]):nt}},85143:function(pn,Ot,nt){pn.exports.VectorTile=nt(7317),nt(26305),nt(65336)},7317:function(pn,Ot,nt){"use strict";var kt=nt(65336);pn.exports=gt;function gt(Et,K){this.layers=Et.readFields(k,{},K)}function k(Et,K,yt){if(Et===3){var J=new kt(yt,yt.readVarint()+yt.pos);J.length&&(K[J.name]=J)}}},26305:function(pn,Ot,nt){"use strict";var kt=nt(56834);pn.exports=gt;function gt(J,pt,et,_e,ot){this.properties={},this.extent=et,this.type=0,this._pbf=J,this._geometry=-1,this._keys=_e,this._values=ot,J.readFields(k,this,pt)}function k(J,pt,et){J==1?pt.id=et.readVarint():J==2?Et(et,pt):J==3?pt.type=et.readVarint():J==4&&(pt._geometry=et.pos)}function Et(J,pt){for(var et=J.readVarint()+J.pos;J.pos<et;){var _e=pt._keys[J.readVarint()],ot=pt._values[J.readVarint()];pt.properties[_e]=ot}}gt.types=["Unknown","Point","LineString","Polygon"],gt.prototype.loadGeometry=function(){var J=this._pbf;J.pos=this._geometry;for(var pt=J.readVarint()+J.pos,et=1,_e=0,ot=0,ut=0,zt=[],P;J.pos<pt;){if(_e<=0){var b=J.readVarint();et=b&7,_e=b>>3}if(_e--,et===1||et===2)ot+=J.readSVarint(),ut+=J.readSVarint(),et===1&&(P&&zt.push(P),P=[]),P.push(new kt(ot,ut));else if(et===7)P&&P.push(P[0].clone());else throw new Error("unknown command "+et)}return P&&zt.push(P),zt},gt.prototype.bbox=function(){var J=this._pbf;J.pos=this._geometry;for(var pt=J.readVarint()+J.pos,et=1,_e=0,ot=0,ut=0,zt=1/0,P=-1/0,b=1/0,W=-1/0;J.pos<pt;){if(_e<=0){var le=J.readVarint();et=le&7,_e=le>>3}if(_e--,et===1||et===2)ot+=J.readSVarint(),ut+=J.readSVarint(),ot<zt&&(zt=ot),ot>P&&(P=ot),ut<b&&(b=ut),ut>W&&(W=ut);else if(et!==7)throw new Error("unknown command "+et)}return[zt,b,P,W]},gt.prototype.toGeoJSON=function(J,pt,et){var _e=this.extent*Math.pow(2,et),ot=this.extent*J,ut=this.extent*pt,zt=this.loadGeometry(),P=gt.types[this.type],b,W;function le(At){for(var rt=0;rt<At.length;rt++){var Dt=At[rt],Ee=180-(Dt.y+ut)*360/_e;At[rt]=[(Dt.x+ot)*360/_e-180,360/Math.PI*Math.atan(Math.exp(Ee*Math.PI/180))-90]}}switch(this.type){case 1:var be=[];for(b=0;b<zt.length;b++)be[b]=zt[b][0];zt=be,le(zt);break;case 2:for(b=0;b<zt.length;b++)le(zt[b]);break;case 3:for(zt=K(zt),b=0;b<zt.length;b++)for(W=0;W<zt[b].length;W++)le(zt[b][W]);break}zt.length===1?zt=zt[0]:P="Multi"+P;var Me={type:"Feature",geometry:{type:P,coordinates:zt},properties:this.properties};return"id"in this&&(Me.id=this.id),Me};function K(J){var pt=J.length;if(pt<=1)return[J];for(var et=[],_e,ot,ut=0;ut<pt;ut++){var zt=yt(J[ut]);zt!==0&&(ot===void 0&&(ot=zt<0),ot===zt<0?(_e&&et.push(_e),_e=[J[ut]]):_e.push(J[ut]))}return _e&&et.push(_e),et}function yt(J){for(var pt=0,et=0,_e=J.length,ot=_e-1,ut,zt;et<_e;ot=et++)ut=J[et],zt=J[ot],pt+=(zt.x-ut.x)*(ut.y+zt.y);return pt}},65336:function(pn,Ot,nt){"use strict";var kt=nt(26305);pn.exports=gt;function gt(K,yt){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=K,this._keys=[],this._values=[],this._features=[],K.readFields(k,this,yt),this.length=this._features.length}function k(K,yt,J){K===15?yt.version=J.readVarint():K===1?yt.name=J.readString():K===5?yt.extent=J.readVarint():K===2?yt._features.push(J.pos):K===3?yt._keys.push(J.readString()):K===4&&yt._values.push(Et(J))}function Et(K){for(var yt=null,J=K.readVarint()+K.pos;K.pos<J;){var pt=K.readVarint()>>3;yt=pt===1?K.readString():pt===2?K.readFloat():pt===3?K.readDouble():pt===4?K.readVarint64():pt===5?K.readVarint():pt===6?K.readSVarint():pt===7?K.readBoolean():null}return yt}gt.prototype.feature=function(K){if(K<0||K>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[K];var yt=this._pbf.readVarint()+this._pbf.pos;return new kt(this._pbf,yt,this.extent,this._keys,this._values)}},44334:function(pn,Ot){(function(nt,kt){kt(Ot)})(this,function(nt){"use strict";function kt(xe,Ke){return gt(xe)||k(xe,Ke)||Et()}function gt(xe){if(Array.isArray(xe))return xe}function k(xe,Ke){var Lt=[],Jt=!0,ft=!1,St=void 0;try{for(var Y=xe[Symbol.iterator](),mt;!(Jt=(mt=Y.next()).done)&&(Lt.push(mt.value),!(Ke&&Lt.length===Ke));Jt=!0);}catch(se){ft=!0,St=se}finally{try{!Jt&&Y.return!=null&&Y.return()}finally{if(ft)throw St}}return Lt}function Et(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function K(xe,Ke,Lt,Jt){xe=xe.filter(function(me,Yt){var qe=Ke(me,Yt),vr=Lt(me,Yt);return qe!=null&&isFinite(qe)&&vr!=null&&isFinite(vr)}),Jt&&xe.sort(function(me,Yt){return Ke(me)-Ke(Yt)});for(var ft=xe.length,St=new Float64Array(ft),Y=new Float64Array(ft),mt=0,se=0,ke,Le,Be,Bt=0;Bt<ft;)Be=xe[Bt],St[Bt]=ke=+Ke(Be,Bt,xe),Y[Bt]=Le=+Lt(Be,Bt,xe),++Bt,mt+=(ke-mt)/Bt,se+=(Le-se)/Bt;for(var ee=0;ee<ft;++ee)St[ee]-=mt,Y[ee]-=se;return[St,Y,mt,se]}function yt(xe,Ke,Lt,Jt){for(var ft=0,St=0,Y=xe.length;St<Y;St++){var mt=xe[St],se=+Ke(mt,St,xe),ke=+Lt(mt,St,xe);se!=null&&isFinite(se)&&ke!=null&&isFinite(ke)&&Jt(se,ke,ft++)}}function J(xe,Ke,Lt,Jt,ft){var St=0,Y=0;return yt(xe,Ke,Lt,function(mt,se){var ke=se-ft(mt),Le=se-Jt;St+=ke*ke,Y+=Le*Le}),1-St/Y}function pt(xe){return Math.atan2(xe[1][1]-xe[0][1],xe[1][0]-xe[0][0])*180/Math.PI}function et(xe){return[(xe[0][0]+xe[1][0])/2,(xe[0][1]+xe[1][1])/2]}function _e(xe,Ke,Lt){for(var Jt=Math.log(Ke-xe)*Math.LOG10E+1|0,ft=1*Math.pow(10,-Jt/2-1),St=1e4,Y=[se(xe),se(Ke)],mt=0;ke(Y)&&mt<St;);return Y;function se(Le){return[Le,Lt(Le)]}function ke(Le){mt++;for(var Be=Le.length,Bt=!1,ee=0;ee<Be-1;ee++){var me=Le[ee],Yt=Le[ee+1],qe=et([me,Yt]),vr=se(qe[0]),ie=pt([me,qe]),qt=pt([me,vr]),bt=Math.abs(ie-qt);bt>ft&&(Le.splice(ee+1,0,vr),Bt=!0)}return Bt}}function ot(xe,Ke,Lt,Jt){var ft=Jt-xe*xe,St=Math.abs(ft)<1e-24?0:(Lt-xe*Ke)/ft,Y=Ke-St*xe;return[Y,St]}function ut(){var xe=function(St){return St[0]},Ke=function(St){return St[1]},Lt;function Jt(ft){var St=0,Y=0,mt=0,se=0,ke=0,Le=0,Be=Lt?+Lt[0]:1/0,Bt=Lt?+Lt[1]:-1/0;yt(ft,xe,Ke,function(qt,bt){var Xt=Math.log(bt),$t=qt*bt;++St,Y+=(bt-Y)/St,se+=($t-se)/St,Le+=(qt*$t-Le)/St,mt+=(bt*Xt-mt)/St,ke+=($t*Xt-ke)/St,Lt||(qt<Be&&(Be=qt),qt>Bt&&(Bt=qt))});var ee=ot(se/Y,mt/Y,ke/Y,Le/Y),me=kt(ee,2),Yt=me[0],qe=me[1];Yt=Math.exp(Yt);var vr=function(bt){return Yt*Math.exp(qe*bt)},ie=_e(Be,Bt,vr);return ie.a=Yt,ie.b=qe,ie.predict=vr,ie.rSquared=J(ft,xe,Ke,Y,vr),ie}return Jt.domain=function(ft){return arguments.length?(Lt=ft,Jt):Lt},Jt.x=function(ft){return arguments.length?(xe=ft,Jt):xe},Jt.y=function(ft){return arguments.length?(Ke=ft,Jt):Ke},Jt}function zt(){var xe=function(St){return St[0]},Ke=function(St){return St[1]},Lt;function Jt(ft){var St=0,Y=0,mt=0,se=0,ke=0,Le=Lt?+Lt[0]:1/0,Be=Lt?+Lt[1]:-1/0;yt(ft,xe,Ke,function(ie,qt){++St,Y+=(ie-Y)/St,mt+=(qt-mt)/St,se+=(ie*qt-se)/St,ke+=(ie*ie-ke)/St,Lt||(ie<Le&&(Le=ie),ie>Be&&(Be=ie))});var Bt=ot(Y,mt,se,ke),ee=kt(Bt,2),me=ee[0],Yt=ee[1],qe=function(qt){return Yt*qt+me},vr=[[Le,qe(Le)],[Be,qe(Be)]];return vr.a=Yt,vr.b=me,vr.predict=qe,vr.rSquared=J(ft,xe,Ke,mt,qe),vr}return Jt.domain=function(ft){return arguments.length?(Lt=ft,Jt):Lt},Jt.x=function(ft){return arguments.length?(xe=ft,Jt):xe},Jt.y=function(ft){return arguments.length?(Ke=ft,Jt):Ke},Jt}function P(xe){xe.sort(function(Lt,Jt){return Lt-Jt});var Ke=xe.length/2;return Ke%1===0?(xe[Ke-1]+xe[Ke])/2:xe[Math.floor(Ke)]}var b=2,W=1e-12;function le(){var xe=function(St){return St[0]},Ke=function(St){return St[1]},Lt=.3;function Jt(ft){for(var St=K(ft,xe,Ke,!0),Y=kt(St,4),mt=Y[0],se=Y[1],ke=Y[2],Le=Y[3],Be=mt.length,Bt=Math.max(2,~~(Lt*Be)),ee=new Float64Array(Be),me=new Float64Array(Be),Yt=new Float64Array(Be).fill(1),qe=-1;++qe<=b;){for(var vr=[0,Bt-1],ie=0;ie<Be;++ie){for(var qt=mt[ie],bt=vr[0],Xt=vr[1],$t=qt-mt[bt]>mt[Xt]-qt?bt:Xt,xt=0,wt=0,ue=0,Ie=0,Ne=0,Zt=1/Math.abs(mt[$t]-qt||1),Ct=bt;Ct<=Xt;++Ct){var Tt=mt[Ct],Nt=se[Ct],tt=be(Math.abs(qt-Tt)*Zt)*Yt[Ct],vt=Tt*tt;xt+=tt,wt+=vt,ue+=Nt*tt,Ie+=Nt*vt,Ne+=Tt*vt}var Ht=ot(wt/xt,ue/xt,Ie/xt,Ne/xt),he=kt(Ht,2),jt=he[0],Te=he[1];ee[ie]=jt+Te*qt,me[ie]=Math.abs(se[ie]-ee[ie]),Me(mt,ie+1,vr)}if(qe===b)break;var We=P(me);if(Math.abs(We)<W)break;for(var Qe=0,pr,lr;Qe<Be;++Qe)pr=me[Qe]/(6*We),Yt[Qe]=pr>=1?W:(lr=1-pr*pr)*lr}return At(mt,ee,ke,Le)}return Jt.bandwidth=function(ft){return arguments.length?(Lt=ft,Jt):Lt},Jt.x=function(ft){return arguments.length?(xe=ft,Jt):xe},Jt.y=function(ft){return arguments.length?(Ke=ft,Jt):Ke},Jt}function be(xe){return(xe=1-xe*xe*xe)*xe*xe}function Me(xe,Ke,Lt){var Jt=xe[Ke],ft=Lt[0],St=Lt[1]+1;if(!(St>=xe.length))for(;Ke>ft&&xe[St]-Jt<=Jt-xe[ft];)Lt[0]=++ft,Lt[1]=St,++St}function At(xe,Ke,Lt,Jt){for(var ft=xe.length,St=[],Y=0,mt=0,se=[],ke;Y<ft;++Y)ke=xe[Y]+Lt,se[0]===ke?se[1]+=(Ke[Y]-se[1])/++mt:(mt=0,se[1]+=Jt,se=[ke,Ke[Y]],St.push(se));return se[1]+=Jt,St}function rt(){var xe=function(Y){return Y[0]},Ke=function(Y){return Y[1]},Lt=Math.E,Jt;function ft(St){var Y=0,mt=0,se=0,ke=0,Le=0,Be=Jt?+Jt[0]:1/0,Bt=Jt?+Jt[1]:-1/0,ee=Math.log(Lt);yt(St,xe,Ke,function(bt,Xt){var $t=Math.log(bt)/ee;++Y,mt+=($t-mt)/Y,se+=(Xt-se)/Y,ke+=($t*Xt-ke)/Y,Le+=($t*$t-Le)/Y,Jt||(bt<Be&&(Be=bt),bt>Bt&&(Bt=bt))});var me=ot(mt,se,ke,Le),Yt=kt(me,2),qe=Yt[0],vr=Yt[1],ie=function(Xt){return vr*Math.log(Xt)/ee+qe},qt=_e(Be,Bt,ie);return qt.a=vr,qt.b=qe,qt.predict=ie,qt.rSquared=J(St,xe,Ke,se,ie),qt}return ft.domain=function(St){return arguments.length?(Jt=St,ft):Jt},ft.x=function(St){return arguments.length?(xe=St,ft):xe},ft.y=function(St){return arguments.length?(Ke=St,ft):Ke},ft.base=function(St){return arguments.length?(Lt=St,ft):Lt},ft}function Dt(){var xe=function(St){return St[0]},Ke=function(St){return St[1]},Lt;function Jt(ft){var St=K(ft,xe,Ke),Y=kt(St,4),mt=Y[0],se=Y[1],ke=Y[2],Le=Y[3],Be=mt.length,Bt=0,ee=0,me=0,Yt=0,qe=0,vr,ie,qt,bt;for(vr=0;vr<Be;)ie=mt[vr],qt=se[vr++],bt=ie*ie,Bt+=(bt-Bt)/vr,ee+=(bt*ie-ee)/vr,me+=(bt*bt-me)/vr,Yt+=(ie*qt-Yt)/vr,qe+=(bt*qt-qe)/vr;var Xt=0,$t=0,xt=Lt?+Lt[0]:1/0,wt=Lt?+Lt[1]:-1/0;yt(ft,xe,Ke,function(tt,vt){$t++,Xt+=(vt-Xt)/$t,Lt||(tt<xt&&(xt=tt),tt>wt&&(wt=tt))});var ue=me-Bt*Bt,Ie=Bt*ue-ee*ee,Ne=(qe*Bt-Yt*ee)/Ie,Zt=(Yt*ue-qe*ee)/Ie,Ct=-Ne*Bt,Tt=function(vt){return vt=vt-ke,Ne*vt*vt+Zt*vt+Ct+Le},Nt=_e(xt,wt,Tt);return Nt.a=Ne,Nt.b=Zt-2*Ne*ke,Nt.c=Ct-Zt*ke+Ne*ke*ke+Le,Nt.predict=Tt,Nt.rSquared=J(ft,xe,Ke,Xt,Tt),Nt}return Jt.domain=function(ft){return arguments.length?(Lt=ft,Jt):Lt},Jt.x=function(ft){return arguments.length?(xe=ft,Jt):xe},Jt.y=function(ft){return arguments.length?(Ke=ft,Jt):Ke},Jt}function Ee(){var xe=function(Y){return Y[0]},Ke=function(Y){return Y[1]},Lt=3,Jt;function ft(St){if(Lt===1){var Y=zt().x(xe).y(Ke).domain(Jt)(St);return Y.coefficients=[Y.b,Y.a],delete Y.a,delete Y.b,Y}if(Lt===2){var mt=Dt().x(xe).y(Ke).domain(Jt)(St);return mt.coefficients=[mt.c,mt.b,mt.a],delete mt.a,delete mt.b,delete mt.c,mt}var se=K(St,xe,Ke),ke=kt(se,4),Le=ke[0],Be=ke[1],Bt=ke[2],ee=ke[3],me=Le.length,Yt=[],qe=[],vr=Lt+1,ie=0,qt=0,bt=Jt?+Jt[0]:1/0,Xt=Jt?+Jt[1]:-1/0;yt(St,xe,Ke,function(Tt,Nt){++qt,ie+=(Nt-ie)/qt,Jt||(Tt<bt&&(bt=Tt),Tt>Xt&&(Xt=Tt))});var $t,xt,wt,ue,Ie;for($t=0;$t<vr;++$t){for(wt=0,ue=0;wt<me;++wt)ue+=Math.pow(Le[wt],$t)*Be[wt];for(Yt.push(ue),Ie=new Float64Array(vr),xt=0;xt<vr;++xt){for(wt=0,ue=0;wt<me;++wt)ue+=Math.pow(Le[wt],$t+xt);Ie[xt]=ue}qe.push(Ie)}qe.push(Yt);var Ne=Ge(qe),Zt=function(Nt){Nt-=Bt;var tt=ee+Ne[0]+Ne[1]*Nt+Ne[2]*Nt*Nt;for($t=3;$t<vr;++$t)tt+=Ne[$t]*Math.pow(Nt,$t);return tt},Ct=_e(bt,Xt,Zt);return Ct.coefficients=ge(vr,Ne,-Bt,ee),Ct.predict=Zt,Ct.rSquared=J(St,xe,Ke,ie,Zt),Ct}return ft.domain=function(St){return arguments.length?(Jt=St,ft):Jt},ft.x=function(St){return arguments.length?(xe=St,ft):xe},ft.y=function(St){return arguments.length?(Ke=St,ft):Ke},ft.order=function(St){return arguments.length?(Lt=St,ft):Lt},ft}function ge(xe,Ke,Lt,Jt){var ft=Array(xe),St,Y,mt,se;for(St=0;St<xe;++St)ft[St]=0;for(St=xe-1;St>=0;--St)for(mt=Ke[St],se=1,ft[St]+=mt,Y=1;Y<=St;++Y)se*=(St+1-Y)/Y,ft[St-Y]+=mt*Math.pow(Lt,Y)*se;return ft[0]+=Jt,ft}function Ge(xe){var Ke=xe.length-1,Lt=[],Jt,ft,St,Y,mt;for(Jt=0;Jt<Ke;++Jt){for(Y=Jt,ft=Jt+1;ft<Ke;++ft)Math.abs(xe[Jt][ft])>Math.abs(xe[Jt][Y])&&(Y=ft);for(St=Jt;St<Ke+1;++St)mt=xe[St][Jt],xe[St][Jt]=xe[St][Y],xe[St][Y]=mt;for(ft=Jt+1;ft<Ke;++ft)for(St=Ke;St>=Jt;St--)xe[St][ft]-=xe[St][Jt]*xe[Jt][ft]/xe[Jt][Jt]}for(ft=Ke-1;ft>=0;--ft){for(mt=0,St=ft+1;St<Ke;++St)mt+=xe[St][ft]*Lt[St];Lt[ft]=(xe[Ke][ft]-mt)/xe[ft][ft]}return Lt}function Ue(){var xe=function(St){return St[0]},Ke=function(St){return St[1]},Lt;function Jt(ft){var St=0,Y=0,mt=0,se=0,ke=0,Le=0,Be=Lt?+Lt[0]:1/0,Bt=Lt?+Lt[1]:-1/0;yt(ft,xe,Ke,function(qt,bt){var Xt=Math.log(qt),$t=Math.log(bt);++St,Y+=(Xt-Y)/St,mt+=($t-mt)/St,se+=(Xt*$t-se)/St,ke+=(Xt*Xt-ke)/St,Le+=(bt-Le)/St,Lt||(qt<Be&&(Be=qt),qt>Bt&&(Bt=qt))});var ee=ot(Y,mt,se,ke),me=kt(ee,2),Yt=me[0],qe=me[1];Yt=Math.exp(Yt);var vr=function(bt){return Yt*Math.pow(bt,qe)},ie=_e(Be,Bt,vr);return ie.a=Yt,ie.b=qe,ie.predict=vr,ie.rSquared=J(ft,xe,Ke,Le,vr),ie}return Jt.domain=function(ft){return arguments.length?(Lt=ft,Jt):Lt},Jt.x=function(ft){return arguments.length?(xe=ft,Jt):xe},Jt.y=function(ft){return arguments.length?(Ke=ft,Jt):Ke},Jt}nt.regressionExp=ut,nt.regressionLinear=zt,nt.regressionLoess=le,nt.regressionLog=rt,nt.regressionPoly=Ee,nt.regressionPow=Ue,nt.regressionQuad=Dt,Object.defineProperty(nt,"__esModule",{value:!0})})},74348:function(pn,Ot,nt){"use strict";nt.d(Ot,{qY:function(){return zt}});var kt=nt(93738),gt=function(At,rt,Dt){if(Dt||arguments.length===2)for(var Ee=0,ge=rt.length,Ge;Ee<ge;Ee++)(Ge||!(Ee in rt))&&(Ge||(Ge=Array.prototype.slice.call(rt,0,Ee)),Ge[Ee]=rt[Ee]);return At.concat(Ge||Array.prototype.slice.call(rt))},k=function(){function At(rt,Dt,Ee){this.name=rt,this.version=Dt,this.os=Ee,this.type="browser"}return At}(),Et=function(){function At(rt){this.version=rt,this.type="node",this.name="node",this.os=kt.platform}return At}(),K=function(){function At(rt,Dt,Ee,ge){this.name=rt,this.version=Dt,this.os=Ee,this.bot=ge,this.type="bot-device"}return At}(),yt=function(){function At(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return At}(),J=function(){function At(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return At}(),pt=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,et=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,_e=3,ot=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",pt]],ut=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function zt(At){return At?W(At):typeof document=="undefined"&&typeof navigator!="undefined"&&navigator.product==="ReactNative"?new J:typeof navigator!="undefined"?W(navigator.userAgent):be()}function P(At){return At!==""&&ot.reduce(function(rt,Dt){var Ee=Dt[0],ge=Dt[1];if(rt)return rt;var Ge=ge.exec(At);return!!Ge&&[Ee,Ge]},!1)}function b(At){var rt=P(At);return rt?rt[0]:null}function W(At){var rt=P(At);if(!rt)return null;var Dt=rt[0],Ee=rt[1];if(Dt==="searchbot")return new yt;var ge=Ee[1]&&Ee[1].split(".").join("_").split("_").slice(0,3);ge?ge.length<_e&&(ge=gt(gt([],ge,!0),Me(_e-ge.length),!0)):ge=[];var Ge=ge.join("."),Ue=le(At),xe=et.exec(At);return xe&&xe[1]?new K(Dt,Ge,Ue,xe[1]):new k(Dt,Ge,Ue)}function le(At){for(var rt=0,Dt=ut.length;rt<Dt;rt++){var Ee=ut[rt],ge=Ee[0],Ge=Ee[1],Ue=Ge.exec(At);if(Ue)return ge}return null}function be(){var At=typeof kt!="undefined"&&kt.version;return At?new Et(kt.version.slice(1)):null}function Me(At){for(var rt=[],Dt=0;Dt<At;Dt++)rt.push("0");return rt}},89675:function(pn){"use strict";pn.exports=Ot,pn.exports.default=Ot;function Ot(ft,St,Y){Y=Y||2;var mt=St&&St.length,se=mt?St[0]*Y:ft.length,ke=nt(ft,0,se,Y,!0),Le=[];if(!ke||ke.next===ke.prev)return Le;var Be,Bt,ee,me,Yt,qe,vr;if(mt&&(ke=J(ft,St,ke,Y)),ft.length>80*Y){Be=ee=ft[0],Bt=me=ft[1];for(var ie=Y;ie<se;ie+=Y)Yt=ft[ie],qe=ft[ie+1],Yt<Be&&(Be=Yt),qe<Bt&&(Bt=qe),Yt>ee&&(ee=Yt),qe>me&&(me=qe);vr=Math.max(ee-Be,me-Bt),vr=vr!==0?32767/vr:0}return gt(ke,Le,Y,Be,Bt,vr,0),Le}function nt(ft,St,Y,mt,se){var ke,Le;if(se===Jt(ft,St,Y,mt)>0)for(ke=St;ke<Y;ke+=mt)Le=xe(ke,ft[ke],ft[ke+1],Le);else for(ke=Y-mt;ke>=St;ke-=mt)Le=xe(ke,ft[ke],ft[ke+1],Le);return Le&&Me(Le,Le.next)&&(Ke(Le),Le=Le.next),Le}function kt(ft,St){if(!ft)return ft;St||(St=ft);var Y=ft,mt;do if(mt=!1,!Y.steiner&&(Me(Y,Y.next)||be(Y.prev,Y,Y.next)===0)){if(Ke(Y),Y=St=Y.prev,Y===Y.next)break;mt=!0}else Y=Y.next;while(mt||Y!==St);return St}function gt(ft,St,Y,mt,se,ke,Le){if(ft){!Le&&ke&&ut(ft,mt,se,ke);for(var Be=ft,Bt,ee;ft.prev!==ft.next;){if(Bt=ft.prev,ee=ft.next,ke?Et(ft,mt,se,ke):k(ft)){St.push(Bt.i/Y|0),St.push(ft.i/Y|0),St.push(ee.i/Y|0),Ke(ft),ft=ee.next,Be=ee.next;continue}if(ft=ee,ft===Be){Le?Le===1?(ft=K(kt(ft),St,Y),gt(ft,St,Y,mt,se,ke,2)):Le===2&&yt(ft,St,Y,mt,se,ke):gt(kt(ft),St,Y,mt,se,ke,1);break}}}}function k(ft){var St=ft.prev,Y=ft,mt=ft.next;if(be(St,Y,mt)>=0)return!1;for(var se=St.x,ke=Y.x,Le=mt.x,Be=St.y,Bt=Y.y,ee=mt.y,me=se<ke?se<Le?se:Le:ke<Le?ke:Le,Yt=Be<Bt?Be<ee?Be:ee:Bt<ee?Bt:ee,qe=se>ke?se>Le?se:Le:ke>Le?ke:Le,vr=Be>Bt?Be>ee?Be:ee:Bt>ee?Bt:ee,ie=mt.next;ie!==St;){if(ie.x>=me&&ie.x<=qe&&ie.y>=Yt&&ie.y<=vr&&W(se,Be,ke,Bt,Le,ee,ie.x,ie.y)&&be(ie.prev,ie,ie.next)>=0)return!1;ie=ie.next}return!0}function Et(ft,St,Y,mt){var se=ft.prev,ke=ft,Le=ft.next;if(be(se,ke,Le)>=0)return!1;for(var Be=se.x,Bt=ke.x,ee=Le.x,me=se.y,Yt=ke.y,qe=Le.y,vr=Be<Bt?Be<ee?Be:ee:Bt<ee?Bt:ee,ie=me<Yt?me<qe?me:qe:Yt<qe?Yt:qe,qt=Be>Bt?Be>ee?Be:ee:Bt>ee?Bt:ee,bt=me>Yt?me>qe?me:qe:Yt>qe?Yt:qe,Xt=P(vr,ie,St,Y,mt),$t=P(qt,bt,St,Y,mt),xt=ft.prevZ,wt=ft.nextZ;xt&&xt.z>=Xt&&wt&&wt.z<=$t;){if(xt.x>=vr&&xt.x<=qt&&xt.y>=ie&&xt.y<=bt&&xt!==se&&xt!==Le&&W(Be,me,Bt,Yt,ee,qe,xt.x,xt.y)&&be(xt.prev,xt,xt.next)>=0||(xt=xt.prevZ,wt.x>=vr&&wt.x<=qt&&wt.y>=ie&&wt.y<=bt&&wt!==se&&wt!==Le&&W(Be,me,Bt,Yt,ee,qe,wt.x,wt.y)&&be(wt.prev,wt,wt.next)>=0))return!1;wt=wt.nextZ}for(;xt&&xt.z>=Xt;){if(xt.x>=vr&&xt.x<=qt&&xt.y>=ie&&xt.y<=bt&&xt!==se&&xt!==Le&&W(Be,me,Bt,Yt,ee,qe,xt.x,xt.y)&&be(xt.prev,xt,xt.next)>=0)return!1;xt=xt.prevZ}for(;wt&&wt.z<=$t;){if(wt.x>=vr&&wt.x<=qt&&wt.y>=ie&&wt.y<=bt&&wt!==se&&wt!==Le&&W(Be,me,Bt,Yt,ee,qe,wt.x,wt.y)&&be(wt.prev,wt,wt.next)>=0)return!1;wt=wt.nextZ}return!0}function K(ft,St,Y){var mt=ft;do{var se=mt.prev,ke=mt.next.next;!Me(se,ke)&&At(se,mt,mt.next,ke)&&ge(se,ke)&&ge(ke,se)&&(St.push(se.i/Y|0),St.push(mt.i/Y|0),St.push(ke.i/Y|0),Ke(mt),Ke(mt.next),mt=ft=ke),mt=mt.next}while(mt!==ft);return kt(mt)}function yt(ft,St,Y,mt,se,ke){var Le=ft;do{for(var Be=Le.next.next;Be!==Le.prev;){if(Le.i!==Be.i&&le(Le,Be)){var Bt=Ue(Le,Be);Le=kt(Le,Le.next),Bt=kt(Bt,Bt.next),gt(Le,St,Y,mt,se,ke,0),gt(Bt,St,Y,mt,se,ke,0);return}Be=Be.next}Le=Le.next}while(Le!==ft)}function J(ft,St,Y,mt){var se=[],ke,Le,Be,Bt,ee;for(ke=0,Le=St.length;ke<Le;ke++)Be=St[ke]*mt,Bt=ke<Le-1?St[ke+1]*mt:ft.length,ee=nt(ft,Be,Bt,mt,!1),ee===ee.next&&(ee.steiner=!0),se.push(b(ee));for(se.sort(pt),ke=0;ke<se.length;ke++)Y=et(se[ke],Y);return Y}function pt(ft,St){return ft.x-St.x}function et(ft,St){var Y=_e(ft,St);if(!Y)return St;var mt=Ue(Y,ft);return kt(mt,mt.next),kt(Y,Y.next)}function _e(ft,St){var Y=St,mt=ft.x,se=ft.y,ke=-1/0,Le;do{if(se<=Y.y&&se>=Y.next.y&&Y.next.y!==Y.y){var Be=Y.x+(se-Y.y)*(Y.next.x-Y.x)/(Y.next.y-Y.y);if(Be<=mt&&Be>ke&&(ke=Be,Le=Y.x<Y.next.x?Y:Y.next,Be===mt))return Le}Y=Y.next}while(Y!==St);if(!Le)return null;var Bt=Le,ee=Le.x,me=Le.y,Yt=1/0,qe;Y=Le;do mt>=Y.x&&Y.x>=ee&&mt!==Y.x&&W(se<me?mt:ke,se,ee,me,se<me?ke:mt,se,Y.x,Y.y)&&(qe=Math.abs(se-Y.y)/(mt-Y.x),ge(Y,ft)&&(qe<Yt||qe===Yt&&(Y.x>Le.x||Y.x===Le.x&&ot(Le,Y)))&&(Le=Y,Yt=qe)),Y=Y.next;while(Y!==Bt);return Le}function ot(ft,St){return be(ft.prev,ft,St.prev)<0&&be(St.next,ft,ft.next)<0}function ut(ft,St,Y,mt){var se=ft;do se.z===0&&(se.z=P(se.x,se.y,St,Y,mt)),se.prevZ=se.prev,se.nextZ=se.next,se=se.next;while(se!==ft);se.prevZ.nextZ=null,se.prevZ=null,zt(se)}function zt(ft){var St,Y,mt,se,ke,Le,Be,Bt,ee=1;do{for(Y=ft,ft=null,ke=null,Le=0;Y;){for(Le++,mt=Y,Be=0,St=0;St<ee&&(Be++,mt=mt.nextZ,!!mt);St++);for(Bt=ee;Be>0||Bt>0&&mt;)Be!==0&&(Bt===0||!mt||Y.z<=mt.z)?(se=Y,Y=Y.nextZ,Be--):(se=mt,mt=mt.nextZ,Bt--),ke?ke.nextZ=se:ft=se,se.prevZ=ke,ke=se;Y=mt}ke.nextZ=null,ee*=2}while(Le>1);return ft}function P(ft,St,Y,mt,se){return ft=(ft-Y)*se|0,St=(St-mt)*se|0,ft=(ft|ft<<8)&16711935,ft=(ft|ft<<4)&252645135,ft=(ft|ft<<2)&858993459,ft=(ft|ft<<1)&1431655765,St=(St|St<<8)&16711935,St=(St|St<<4)&252645135,St=(St|St<<2)&858993459,St=(St|St<<1)&1431655765,ft|St<<1}function b(ft){var St=ft,Y=ft;do(St.x<Y.x||St.x===Y.x&&St.y<Y.y)&&(Y=St),St=St.next;while(St!==ft);return Y}function W(ft,St,Y,mt,se,ke,Le,Be){return(se-Le)*(St-Be)>=(ft-Le)*(ke-Be)&&(ft-Le)*(mt-Be)>=(Y-Le)*(St-Be)&&(Y-Le)*(ke-Be)>=(se-Le)*(mt-Be)}function le(ft,St){return ft.next.i!==St.i&&ft.prev.i!==St.i&&!Ee(ft,St)&&(ge(ft,St)&&ge(St,ft)&&Ge(ft,St)&&(be(ft.prev,ft,St.prev)||be(ft,St.prev,St))||Me(ft,St)&&be(ft.prev,ft,ft.next)>0&&be(St.prev,St,St.next)>0)}function be(ft,St,Y){return(St.y-ft.y)*(Y.x-St.x)-(St.x-ft.x)*(Y.y-St.y)}function Me(ft,St){return ft.x===St.x&&ft.y===St.y}function At(ft,St,Y,mt){var se=Dt(be(ft,St,Y)),ke=Dt(be(ft,St,mt)),Le=Dt(be(Y,mt,ft)),Be=Dt(be(Y,mt,St));return!!(se!==ke&&Le!==Be||se===0&&rt(ft,Y,St)||ke===0&&rt(ft,mt,St)||Le===0&&rt(Y,ft,mt)||Be===0&&rt(Y,St,mt))}function rt(ft,St,Y){return St.x<=Math.max(ft.x,Y.x)&&St.x>=Math.min(ft.x,Y.x)&&St.y<=Math.max(ft.y,Y.y)&&St.y>=Math.min(ft.y,Y.y)}function Dt(ft){return ft>0?1:ft<0?-1:0}function Ee(ft,St){var Y=ft;do{if(Y.i!==ft.i&&Y.next.i!==ft.i&&Y.i!==St.i&&Y.next.i!==St.i&&At(Y,Y.next,ft,St))return!0;Y=Y.next}while(Y!==ft);return!1}function ge(ft,St){return be(ft.prev,ft,ft.next)<0?be(ft,St,ft.next)>=0&&be(ft,ft.prev,St)>=0:be(ft,St,ft.prev)<0||be(ft,ft.next,St)<0}function Ge(ft,St){var Y=ft,mt=!1,se=(ft.x+St.x)/2,ke=(ft.y+St.y)/2;do Y.y>ke!=Y.next.y>ke&&Y.next.y!==Y.y&&se<(Y.next.x-Y.x)*(ke-Y.y)/(Y.next.y-Y.y)+Y.x&&(mt=!mt),Y=Y.next;while(Y!==ft);return mt}function Ue(ft,St){var Y=new Lt(ft.i,ft.x,ft.y),mt=new Lt(St.i,St.x,St.y),se=ft.next,ke=St.prev;return ft.next=St,St.prev=ft,Y.next=se,se.prev=Y,mt.next=Y,Y.prev=mt,ke.next=mt,mt.prev=ke,mt}function xe(ft,St,Y,mt){var se=new Lt(ft,St,Y);return mt?(se.next=mt.next,se.prev=mt,mt.next.prev=se,mt.next=se):(se.prev=se,se.next=se),se}function Ke(ft){ft.next.prev=ft.prev,ft.prev.next=ft.next,ft.prevZ&&(ft.prevZ.nextZ=ft.nextZ),ft.nextZ&&(ft.nextZ.prevZ=ft.prevZ)}function Lt(ft,St,Y){this.i=ft,this.x=St,this.y=Y,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Ot.deviation=function(ft,St,Y,mt){var se=St&&St.length,ke=se?St[0]*Y:ft.length,Le=Math.abs(Jt(ft,0,ke,Y));if(se)for(var Be=0,Bt=St.length;Be<Bt;Be++){var ee=St[Be]*Y,me=Be<Bt-1?St[Be+1]*Y:ft.length;Le-=Math.abs(Jt(ft,ee,me,Y))}var Yt=0;for(Be=0;Be<mt.length;Be+=3){var qe=mt[Be]*Y,vr=mt[Be+1]*Y,ie=mt[Be+2]*Y;Yt+=Math.abs((ft[qe]-ft[ie])*(ft[vr+1]-ft[qe+1])-(ft[qe]-ft[vr])*(ft[ie+1]-ft[qe+1]))}return Le===0&&Yt===0?0:Math.abs((Yt-Le)/Le)};function Jt(ft,St,Y,mt){for(var se=0,ke=St,Le=Y-mt;ke<Y;ke+=mt)se+=(ft[Le]-ft[ke])*(ft[ke+1]+ft[Le+1]),Le=ke;return se}Ot.flatten=function(ft){for(var St=ft[0][0].length,Y={vertices:[],holes:[],dimensions:St},mt=0,se=0;se<ft.length;se++){for(var ke=0;ke<ft[se].length;ke++)for(var Le=0;Le<St;Le++)Y.vertices.push(ft[se][ke][Le]);se>0&&(mt+=ft[se-1].length,Y.holes.push(mt))}return Y}},73827:function(pn){function Ot(kt){var gt=kt.target||kt.srcElement;gt.__resizeRAF__&&cancelAnimationFrame(gt.__resizeRAF__),gt.__resizeRAF__=requestAnimationFrame(function(){var k=gt.__resizeTrigger__,Et=k&&k.__resizeListeners__;Et&&Et.forEach(function(K){K.call(k,kt)})})}var nt=function(gt,k){var Et=this,K=Et.document,yt,J=K.attachEvent;typeof navigator!="undefined"&&(yt=navigator.userAgent.match(/Trident/)||navigator.userAgent.match(/Edge/));function pt(){this.contentDocument.defaultView.__resizeTrigger__=this.__resizeElement__,this.contentDocument.defaultView.addEventListener("resize",Ot)}if(!gt.__resizeListeners__)if(gt.__resizeListeners__=[],J)gt.__resizeTrigger__=gt,gt.attachEvent("onresize",Ot);else{getComputedStyle(gt).position==="static"&&(gt.style.position="relative");var et=gt.__resizeTrigger__=K.createElement("object");et.setAttribute("style","position: absolute; top: 0; left: 0; height: 100%; width: 100%; pointer-events: none; z-index: -1; opacity: 0;"),et.setAttribute("class","resize-sensor"),et.setAttribute("tabindex","-1"),et.setAttribute("title",""),et.__resizeElement__=gt,et.onload=pt,et.type="text/html",yt&>.appendChild(et),et.data="about:blank",yt||gt.appendChild(et)}gt.__resizeListeners__.push(k)};pn.exports=typeof window=="undefined"?nt:nt.bind(window),pn.exports.unbind=function(kt,gt){var k=document.attachEvent,Et=kt.__resizeListeners__||[];if(gt){var K=Et.indexOf(gt);K!==-1&&Et.splice(K,1)}else Et=kt.__resizeListeners__=[];if(!Et.length){if(k)kt.detachEvent("onresize",Ot);else if(kt.__resizeTrigger__){var yt=kt.__resizeTrigger__.contentDocument,J=yt&&yt.defaultView;J&&(J.removeEventListener("resize",Ot),delete J.__resizeTrigger__),kt.__resizeTrigger__=!kt.removeChild(kt.__resizeTrigger__)}delete kt.__resizeListeners__}}},11488:function(pn){"use strict";var Ot=Object.prototype.hasOwnProperty,nt="~";function kt(){}Object.create&&(kt.prototype=Object.create(null),new kt().__proto__||(nt=!1));function gt(yt,J,pt){this.fn=yt,this.context=J,this.once=pt||!1}function k(yt,J,pt,et,_e){if(typeof pt!="function")throw new TypeError("The listener must be a function");var ot=new gt(pt,et||yt,_e),ut=nt?nt+J:J;return yt._events[ut]?yt._events[ut].fn?yt._events[ut]=[yt._events[ut],ot]:yt._events[ut].push(ot):(yt._events[ut]=ot,yt._eventsCount++),yt}function Et(yt,J){--yt._eventsCount===0?yt._events=new kt:delete yt._events[J]}function K(){this._events=new kt,this._eventsCount=0}K.prototype.eventNames=function(){var J=[],pt,et;if(this._eventsCount===0)return J;for(et in pt=this._events)Ot.call(pt,et)&&J.push(nt?et.slice(1):et);return Object.getOwnPropertySymbols?J.concat(Object.getOwnPropertySymbols(pt)):J},K.prototype.listeners=function(J){var pt=nt?nt+J:J,et=this._events[pt];if(!et)return[];if(et.fn)return[et.fn];for(var _e=0,ot=et.length,ut=new Array(ot);_e<ot;_e++)ut[_e]=et[_e].fn;return ut},K.prototype.listenerCount=function(J){var pt=nt?nt+J:J,et=this._events[pt];return et?et.fn?1:et.length:0},K.prototype.emit=function(J,pt,et,_e,ot,ut){var zt=nt?nt+J:J;if(!this._events[zt])return!1;var P=this._events[zt],b=arguments.length,W,le;if(P.fn){switch(P.once&&this.removeListener(J,P.fn,void 0,!0),b){case 1:return P.fn.call(P.context),!0;case 2:return P.fn.call(P.context,pt),!0;case 3:return P.fn.call(P.context,pt,et),!0;case 4:return P.fn.call(P.context,pt,et,_e),!0;case 5:return P.fn.call(P.context,pt,et,_e,ot),!0;case 6:return P.fn.call(P.context,pt,et,_e,ot,ut),!0}for(le=1,W=new Array(b-1);le<b;le++)W[le-1]=arguments[le];P.fn.apply(P.context,W)}else{var be=P.length,Me;for(le=0;le<be;le++)switch(P[le].once&&this.removeListener(J,P[le].fn,void 0,!0),b){case 1:P[le].fn.call(P[le].context);break;case 2:P[le].fn.call(P[le].context,pt);break;case 3:P[le].fn.call(P[le].context,pt,et);break;case 4:P[le].fn.call(P[le].context,pt,et,_e);break;default:if(!W)for(Me=1,W=new Array(b-1);Me<b;Me++)W[Me-1]=arguments[Me];P[le].fn.apply(P[le].context,W)}}return!0},K.prototype.on=function(J,pt,et){return k(this,J,pt,et,!1)},K.prototype.once=function(J,pt,et){return k(this,J,pt,et,!0)},K.prototype.removeListener=function(J,pt,et,_e){var ot=nt?nt+J:J;if(!this._events[ot])return this;if(!pt)return Et(this,ot),this;var ut=this._events[ot];if(ut.fn)ut.fn===pt&&(!_e||ut.once)&&(!et||ut.context===et)&&Et(this,ot);else{for(var zt=0,P=[],b=ut.length;zt<b;zt++)(ut[zt].fn!==pt||_e&&!ut[zt].once||et&&ut[zt].context!==et)&&P.push(ut[zt]);P.length?this._events[ot]=P.length===1?P[0]:P:Et(this,ot)}return this},K.prototype.removeAllListeners=function(J){var pt;return J?(pt=nt?nt+J:J,this._events[pt]&&Et(this,pt)):(this._events=new kt,this._eventsCount=0),this},K.prototype.off=K.prototype.removeListener,K.prototype.addListener=K.prototype.on,K.prefixed=nt,K.EventEmitter=K,pn.exports=K},12886:function(pn,Ot){(function(nt,kt){kt(Ot)})(this,function(nt){"use strict";function kt(zt,P,b,W){W=W||{};var le=W.maxIterations||100,be=W.tolerance||1e-10,Me=zt(P),At=zt(b),rt=b-P;if(Me*At>0)throw"Initial bisect points must have opposite signs";if(Me===0)return P;if(At===0)return b;for(var Dt=0;Dt<le;++Dt){rt/=2;var Ee=P+rt,ge=zt(Ee);if(ge*Me>=0&&(P=Ee),Math.abs(rt)<be||ge===0)return Ee}return P+rt}function gt(zt){for(var P=new Array(zt),b=0;b<zt;++b)P[b]=0;return P}function k(zt,P){return gt(zt).map(function(){return gt(P)})}function Et(zt,P){for(var b=0,W=0;W<zt.length;++W)b+=zt[W]*P[W];return b}function K(zt){return Math.sqrt(Et(zt,zt))}function yt(zt,P,b){for(var W=0;W<P.length;++W)zt[W]=P[W]*b}function J(zt,P,b,W,le){for(var be=0;be<zt.length;++be)zt[be]=P*b[be]+W*le[be]}function pt(zt,P,b){b=b||{};var W=b.maxIterations||P.length*200,le=b.nonZeroDelta||1.05,be=b.zeroDelta||.001,Me=b.minErrorDelta||1e-6,At=b.minErrorDelta||1e-5,rt=b.rho!==void 0?b.rho:1,Dt=b.chi!==void 0?b.chi:2,Ee=b.psi!==void 0?b.psi:-.5,ge=b.sigma!==void 0?b.sigma:.5,Ge,Ue=P.length,xe=new Array(Ue+1);xe[0]=P,xe[0].fx=zt(P),xe[0].id=0;for(var Ke=0;Ke<Ue;++Ke){var Lt=P.slice();Lt[Ke]=Lt[Ke]?Lt[Ke]*le:be,xe[Ke+1]=Lt,xe[Ke+1].fx=zt(Lt),xe[Ke+1].id=Ke+1}function Jt(me){for(var Yt=0;Yt<me.length;Yt++)xe[Ue][Yt]=me[Yt];xe[Ue].fx=me.fx}for(var ft=function(me,Yt){return me.fx-Yt.fx},St=P.slice(),Y=P.slice(),mt=P.slice(),se=P.slice(),ke=0;ke<W;++ke){if(xe.sort(ft),b.history){var Le=xe.map(function(me){var Yt=me.slice();return Yt.fx=me.fx,Yt.id=me.id,Yt});Le.sort(function(me,Yt){return me.id-Yt.id}),b.history.push({x:xe[0].slice(),fx:xe[0].fx,simplex:Le})}for(Ge=0,Ke=0;Ke<Ue;++Ke)Ge=Math.max(Ge,Math.abs(xe[0][Ke]-xe[1][Ke]));if(Math.abs(xe[0].fx-xe[Ue].fx)<Me&&Ge<At)break;for(Ke=0;Ke<Ue;++Ke){St[Ke]=0;for(var Be=0;Be<Ue;++Be)St[Ke]+=xe[Be][Ke];St[Ke]/=Ue}var Bt=xe[Ue];if(J(Y,1+rt,St,-rt,Bt),Y.fx=zt(Y),Y.fx<xe[0].fx)J(se,1+Dt,St,-Dt,Bt),se.fx=zt(se),se.fx<Y.fx?Jt(se):Jt(Y);else if(Y.fx>=xe[Ue-1].fx){var ee=!1;if(Y.fx>Bt.fx?(J(mt,1+Ee,St,-Ee,Bt),mt.fx=zt(mt),mt.fx<Bt.fx?Jt(mt):ee=!0):(J(mt,1-Ee*rt,St,Ee*rt,Bt),mt.fx=zt(mt),mt.fx<Y.fx?Jt(mt):ee=!0),ee){if(ge>=1)break;for(Ke=1;Ke<xe.length;++Ke)J(xe[Ke],1-ge,xe[0],ge,xe[Ke]),xe[Ke].fx=zt(xe[Ke])}}else Jt(Y)}return xe.sort(ft),{fx:xe[0].fx,x:xe[0]}}function et(zt,P,b,W,le,be,Me){var At=b.fx,rt=Et(b.fxprime,P),Dt=At,Ee=At,ge=rt,Ge=0;le=le||1,be=be||1e-6,Me=Me||.1;function Ue(Ke,Lt,Jt){for(var ft=0;ft<16;++ft)if(le=(Ke+Lt)/2,J(W.x,1,b.x,le,P),Dt=W.fx=zt(W.x,W.fxprime),ge=Et(W.fxprime,P),Dt>At+be*le*rt||Dt>=Jt)Lt=le;else{if(Math.abs(ge)<=-Me*rt)return le;ge*(Lt-Ke)>=0&&(Lt=Ke),Ke=le,Jt=Dt}return 0}for(var xe=0;xe<10;++xe){if(J(W.x,1,b.x,le,P),Dt=W.fx=zt(W.x,W.fxprime),ge=Et(W.fxprime,P),Dt>At+be*le*rt||xe&&Dt>=Ee)return Ue(Ge,le,Ee);if(Math.abs(ge)<=-Me*rt)return le;if(ge>=0)return Ue(le,Ge,Dt);Ee=Dt,Ge=le,le*=2}return le}function _e(zt,P,b){var W={x:P.slice(),fx:0,fxprime:P.slice()},le={x:P.slice(),fx:0,fxprime:P.slice()},be=P.slice(),Me,At,rt=1,Dt;b=b||{},Dt=b.maxIterations||P.length*20,W.fx=zt(W.x,W.fxprime),Me=W.fxprime.slice(),yt(Me,W.fxprime,-1);for(var Ee=0;Ee<Dt;++Ee){if(rt=et(zt,Me,W,le,rt),b.history&&b.history.push({x:W.x.slice(),fx:W.fx,fxprime:W.fxprime.slice(),alpha:rt}),!rt)yt(Me,W.fxprime,-1);else{J(be,1,le.fxprime,-1,W.fxprime);var ge=Et(W.fxprime,W.fxprime),Ge=Math.max(0,Et(be,le.fxprime)/ge);J(Me,Ge,Me,-1,le.fxprime),At=W,W=le,le=At}if(K(W.fxprime)<=1e-5)break}return b.history&&b.history.push({x:W.x.slice(),fx:W.fx,fxprime:W.fxprime.slice(),alpha:rt}),W}function ot(zt,P,b){b=b||{};for(var W=b.maxIterations||P.length*100,le=b.learnRate||.001,be={x:P.slice(),fx:0,fxprime:P.slice()},Me=0;Me<W&&(be.fx=zt(be.x,be.fxprime),b.history&&b.history.push({x:be.x.slice(),fx:be.fx,fxprime:be.fxprime.slice()}),J(be.x,1,be.x,-le,be.fxprime),!(K(be.fxprime)<=1e-5));++Me);return be}function ut(zt,P,b){b=b||{};var W={x:P.slice(),fx:0,fxprime:P.slice()},le={x:P.slice(),fx:0,fxprime:P.slice()},be=b.maxIterations||P.length*100,Me=b.learnRate||1,At=P.slice(),rt=b.c1||.001,Dt=b.c2||.1,Ee,ge=[];if(b.history){var Ge=zt;zt=function(xe,Ke){return ge.push(xe.slice()),Ge(xe,Ke)}}W.fx=zt(W.x,W.fxprime);for(var Ue=0;Ue<be&&(yt(At,W.fxprime,-1),Me=et(zt,At,W,le,Me,rt,Dt),b.history&&(b.history.push({x:W.x.slice(),fx:W.fx,fxprime:W.fxprime.slice(),functionCalls:ge,learnRate:Me,alpha:Me}),ge=[]),Ee=W,W=le,le=Ee,!(Me===0||K(W.fxprime)<1e-5));++Ue);return W}nt.bisect=kt,nt.nelderMead=pt,nt.conjugateGradient=_e,nt.gradientDescent=ot,nt.gradientDescentLineSearch=ut,nt.zeros=gt,nt.zerosM=k,nt.norm2=K,nt.weightedSum=J,nt.scale=yt})},96140:function(pn,Ot,nt){"use strict";nt.d(Ot,{FD:function(){return k},Ib:function(){return kt},WT:function(){return gt}});var kt=1e-6,gt=typeof Float32Array!="undefined"?Float32Array:Array,k=Math.random;function Et(pt){gt=pt}var K=Math.PI/180;function yt(pt){return pt*K}function J(pt,et){return Math.abs(pt-et)<=kt*Math.max(1,Math.abs(pt),Math.abs(et))}Math.hypot||(Math.hypot=function(){for(var pt=0,et=arguments.length;et--;)pt+=arguments[et]*arguments[et];return Math.sqrt(pt)})},99250:function(pn,Ot,nt){"use strict";nt.d(Ot,{Jp:function(){return ut},U_:function(){return et},Us:function(){return le},vc:function(){return W},xJ:function(){return be}});function kt(){var Y=new glMatrix.ARRAY_TYPE(9);return glMatrix.ARRAY_TYPE!=Float32Array&&(Y[1]=0,Y[2]=0,Y[3]=0,Y[5]=0,Y[6]=0,Y[7]=0),Y[0]=1,Y[4]=1,Y[8]=1,Y}function gt(Y,mt){return Y[0]=mt[0],Y[1]=mt[1],Y[2]=mt[2],Y[3]=mt[4],Y[4]=mt[5],Y[5]=mt[6],Y[6]=mt[8],Y[7]=mt[9],Y[8]=mt[10],Y}function k(Y){var mt=new glMatrix.ARRAY_TYPE(9);return mt[0]=Y[0],mt[1]=Y[1],mt[2]=Y[2],mt[3]=Y[3],mt[4]=Y[4],mt[5]=Y[5],mt[6]=Y[6],mt[7]=Y[7],mt[8]=Y[8],mt}function Et(Y,mt){return Y[0]=mt[0],Y[1]=mt[1],Y[2]=mt[2],Y[3]=mt[3],Y[4]=mt[4],Y[5]=mt[5],Y[6]=mt[6],Y[7]=mt[7],Y[8]=mt[8],Y}function K(Y,mt,se,ke,Le,Be,Bt,ee,me){var Yt=new glMatrix.ARRAY_TYPE(9);return Yt[0]=Y,Yt[1]=mt,Yt[2]=se,Yt[3]=ke,Yt[4]=Le,Yt[5]=Be,Yt[6]=Bt,Yt[7]=ee,Yt[8]=me,Yt}function yt(Y,mt,se,ke,Le,Be,Bt,ee,me,Yt){return Y[0]=mt,Y[1]=se,Y[2]=ke,Y[3]=Le,Y[4]=Be,Y[5]=Bt,Y[6]=ee,Y[7]=me,Y[8]=Yt,Y}function J(Y){return Y[0]=1,Y[1]=0,Y[2]=0,Y[3]=0,Y[4]=1,Y[5]=0,Y[6]=0,Y[7]=0,Y[8]=1,Y}function pt(Y,mt){if(Y===mt){var se=mt[1],ke=mt[2],Le=mt[5];Y[1]=mt[3],Y[2]=mt[6],Y[3]=se,Y[5]=mt[7],Y[6]=ke,Y[7]=Le}else Y[0]=mt[0],Y[1]=mt[3],Y[2]=mt[6],Y[3]=mt[1],Y[4]=mt[4],Y[5]=mt[7],Y[6]=mt[2],Y[7]=mt[5],Y[8]=mt[8];return Y}function et(Y,mt){var se=mt[0],ke=mt[1],Le=mt[2],Be=mt[3],Bt=mt[4],ee=mt[5],me=mt[6],Yt=mt[7],qe=mt[8],vr=qe*Bt-ee*Yt,ie=-qe*Be+ee*me,qt=Yt*Be-Bt*me,bt=se*vr+ke*ie+Le*qt;return bt?(bt=1/bt,Y[0]=vr*bt,Y[1]=(-qe*ke+Le*Yt)*bt,Y[2]=(ee*ke-Le*Bt)*bt,Y[3]=ie*bt,Y[4]=(qe*se-Le*me)*bt,Y[5]=(-ee*se+Le*Be)*bt,Y[6]=qt*bt,Y[7]=(-Yt*se+ke*me)*bt,Y[8]=(Bt*se-ke*Be)*bt,Y):null}function _e(Y,mt){var se=mt[0],ke=mt[1],Le=mt[2],Be=mt[3],Bt=mt[4],ee=mt[5],me=mt[6],Yt=mt[7],qe=mt[8];return Y[0]=Bt*qe-ee*Yt,Y[1]=Le*Yt-ke*qe,Y[2]=ke*ee-Le*Bt,Y[3]=ee*me-Be*qe,Y[4]=se*qe-Le*me,Y[5]=Le*Be-se*ee,Y[6]=Be*Yt-Bt*me,Y[7]=ke*me-se*Yt,Y[8]=se*Bt-ke*Be,Y}function ot(Y){var mt=Y[0],se=Y[1],ke=Y[2],Le=Y[3],Be=Y[4],Bt=Y[5],ee=Y[6],me=Y[7],Yt=Y[8];return mt*(Yt*Be-Bt*me)+se*(-Yt*Le+Bt*ee)+ke*(me*Le-Be*ee)}function ut(Y,mt,se){var ke=mt[0],Le=mt[1],Be=mt[2],Bt=mt[3],ee=mt[4],me=mt[5],Yt=mt[6],qe=mt[7],vr=mt[8],ie=se[0],qt=se[1],bt=se[2],Xt=se[3],$t=se[4],xt=se[5],wt=se[6],ue=se[7],Ie=se[8];return Y[0]=ie*ke+qt*Bt+bt*Yt,Y[1]=ie*Le+qt*ee+bt*qe,Y[2]=ie*Be+qt*me+bt*vr,Y[3]=Xt*ke+$t*Bt+xt*Yt,Y[4]=Xt*Le+$t*ee+xt*qe,Y[5]=Xt*Be+$t*me+xt*vr,Y[6]=wt*ke+ue*Bt+Ie*Yt,Y[7]=wt*Le+ue*ee+Ie*qe,Y[8]=wt*Be+ue*me+Ie*vr,Y}function zt(Y,mt,se){var ke=mt[0],Le=mt[1],Be=mt[2],Bt=mt[3],ee=mt[4],me=mt[5],Yt=mt[6],qe=mt[7],vr=mt[8],ie=se[0],qt=se[1];return Y[0]=ke,Y[1]=Le,Y[2]=Be,Y[3]=Bt,Y[4]=ee,Y[5]=me,Y[6]=ie*ke+qt*Bt+Yt,Y[7]=ie*Le+qt*ee+qe,Y[8]=ie*Be+qt*me+vr,Y}function P(Y,mt,se){var ke=mt[0],Le=mt[1],Be=mt[2],Bt=mt[3],ee=mt[4],me=mt[5],Yt=mt[6],qe=mt[7],vr=mt[8],ie=Math.sin(se),qt=Math.cos(se);return Y[0]=qt*ke+ie*Bt,Y[1]=qt*Le+ie*ee,Y[2]=qt*Be+ie*me,Y[3]=qt*Bt-ie*ke,Y[4]=qt*ee-ie*Le,Y[5]=qt*me-ie*Be,Y[6]=Yt,Y[7]=qe,Y[8]=vr,Y}function b(Y,mt,se){var ke=se[0],Le=se[1];return Y[0]=ke*mt[0],Y[1]=ke*mt[1],Y[2]=ke*mt[2],Y[3]=Le*mt[3],Y[4]=Le*mt[4],Y[5]=Le*mt[5],Y[6]=mt[6],Y[7]=mt[7],Y[8]=mt[8],Y}function W(Y,mt){return Y[0]=1,Y[1]=0,Y[2]=0,Y[3]=0,Y[4]=1,Y[5]=0,Y[6]=mt[0],Y[7]=mt[1],Y[8]=1,Y}function le(Y,mt){var se=Math.sin(mt),ke=Math.cos(mt);return Y[0]=ke,Y[1]=se,Y[2]=0,Y[3]=-se,Y[4]=ke,Y[5]=0,Y[6]=0,Y[7]=0,Y[8]=1,Y}function be(Y,mt){return Y[0]=mt[0],Y[1]=0,Y[2]=0,Y[3]=0,Y[4]=mt[1],Y[5]=0,Y[6]=0,Y[7]=0,Y[8]=1,Y}function Me(Y,mt){return Y[0]=mt[0],Y[1]=mt[1],Y[2]=0,Y[3]=mt[2],Y[4]=mt[3],Y[5]=0,Y[6]=mt[4],Y[7]=mt[5],Y[8]=1,Y}function At(Y,mt){var se=mt[0],ke=mt[1],Le=mt[2],Be=mt[3],Bt=se+se,ee=ke+ke,me=Le+Le,Yt=se*Bt,qe=ke*Bt,vr=ke*ee,ie=Le*Bt,qt=Le*ee,bt=Le*me,Xt=Be*Bt,$t=Be*ee,xt=Be*me;return Y[0]=1-vr-bt,Y[3]=qe-xt,Y[6]=ie+$t,Y[1]=qe+xt,Y[4]=1-Yt-bt,Y[7]=qt-Xt,Y[2]=ie-$t,Y[5]=qt+Xt,Y[8]=1-Yt-vr,Y}function rt(Y,mt){var se=mt[0],ke=mt[1],Le=mt[2],Be=mt[3],Bt=mt[4],ee=mt[5],me=mt[6],Yt=mt[7],qe=mt[8],vr=mt[9],ie=mt[10],qt=mt[11],bt=mt[12],Xt=mt[13],$t=mt[14],xt=mt[15],wt=se*ee-ke*Bt,ue=se*me-Le*Bt,Ie=se*Yt-Be*Bt,Ne=ke*me-Le*ee,Zt=ke*Yt-Be*ee,Ct=Le*Yt-Be*me,Tt=qe*Xt-vr*bt,Nt=qe*$t-ie*bt,tt=qe*xt-qt*bt,vt=vr*$t-ie*Xt,Ht=vr*xt-qt*Xt,he=ie*xt-qt*$t,jt=wt*he-ue*Ht+Ie*vt+Ne*tt-Zt*Nt+Ct*Tt;return jt?(jt=1/jt,Y[0]=(ee*he-me*Ht+Yt*vt)*jt,Y[1]=(me*tt-Bt*he-Yt*Nt)*jt,Y[2]=(Bt*Ht-ee*tt+Yt*Tt)*jt,Y[3]=(Le*Ht-ke*he-Be*vt)*jt,Y[4]=(se*he-Le*tt+Be*Nt)*jt,Y[5]=(ke*tt-se*Ht-Be*Tt)*jt,Y[6]=(Xt*Ct-$t*Zt+xt*Ne)*jt,Y[7]=($t*Ie-bt*Ct-xt*ue)*jt,Y[8]=(bt*Zt-Xt*Ie+xt*wt)*jt,Y):null}function Dt(Y,mt,se){return Y[0]=2/mt,Y[1]=0,Y[2]=0,Y[3]=0,Y[4]=-2/se,Y[5]=0,Y[6]=-1,Y[7]=1,Y[8]=1,Y}function Ee(Y){return"mat3("+Y[0]+", "+Y[1]+", "+Y[2]+", "+Y[3]+", "+Y[4]+", "+Y[5]+", "+Y[6]+", "+Y[7]+", "+Y[8]+")"}function ge(Y){return Math.hypot(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5],Y[6],Y[7],Y[8])}function Ge(Y,mt,se){return Y[0]=mt[0]+se[0],Y[1]=mt[1]+se[1],Y[2]=mt[2]+se[2],Y[3]=mt[3]+se[3],Y[4]=mt[4]+se[4],Y[5]=mt[5]+se[5],Y[6]=mt[6]+se[6],Y[7]=mt[7]+se[7],Y[8]=mt[8]+se[8],Y}function Ue(Y,mt,se){return Y[0]=mt[0]-se[0],Y[1]=mt[1]-se[1],Y[2]=mt[2]-se[2],Y[3]=mt[3]-se[3],Y[4]=mt[4]-se[4],Y[5]=mt[5]-se[5],Y[6]=mt[6]-se[6],Y[7]=mt[7]-se[7],Y[8]=mt[8]-se[8],Y}function xe(Y,mt,se){return Y[0]=mt[0]*se,Y[1]=mt[1]*se,Y[2]=mt[2]*se,Y[3]=mt[3]*se,Y[4]=mt[4]*se,Y[5]=mt[5]*se,Y[6]=mt[6]*se,Y[7]=mt[7]*se,Y[8]=mt[8]*se,Y}function Ke(Y,mt,se,ke){return Y[0]=mt[0]+se[0]*ke,Y[1]=mt[1]+se[1]*ke,Y[2]=mt[2]+se[2]*ke,Y[3]=mt[3]+se[3]*ke,Y[4]=mt[4]+se[4]*ke,Y[5]=mt[5]+se[5]*ke,Y[6]=mt[6]+se[6]*ke,Y[7]=mt[7]+se[7]*ke,Y[8]=mt[8]+se[8]*ke,Y}function Lt(Y,mt){return Y[0]===mt[0]&&Y[1]===mt[1]&&Y[2]===mt[2]&&Y[3]===mt[3]&&Y[4]===mt[4]&&Y[5]===mt[5]&&Y[6]===mt[6]&&Y[7]===mt[7]&&Y[8]===mt[8]}function Jt(Y,mt){var se=Y[0],ke=Y[1],Le=Y[2],Be=Y[3],Bt=Y[4],ee=Y[5],me=Y[6],Yt=Y[7],qe=Y[8],vr=mt[0],ie=mt[1],qt=mt[2],bt=mt[3],Xt=mt[4],$t=mt[5],xt=mt[6],wt=mt[7],ue=mt[8];return Math.abs(se-vr)<=glMatrix.EPSILON*Math.max(1,Math.abs(se),Math.abs(vr))&&Math.abs(ke-ie)<=glMatrix.EPSILON*Math.max(1,Math.abs(ke),Math.abs(ie))&&Math.abs(Le-qt)<=glMatrix.EPSILON*Math.max(1,Math.abs(Le),Math.abs(qt))&&Math.abs(Be-bt)<=glMatrix.EPSILON*Math.max(1,Math.abs(Be),Math.abs(bt))&&Math.abs(Bt-Xt)<=glMatrix.EPSILON*Math.max(1,Math.abs(Bt),Math.abs(Xt))&&Math.abs(ee-$t)<=glMatrix.EPSILON*Math.max(1,Math.abs(ee),Math.abs($t))&&Math.abs(me-xt)<=glMatrix.EPSILON*Math.max(1,Math.abs(me),Math.abs(xt))&&Math.abs(Yt-wt)<=glMatrix.EPSILON*Math.max(1,Math.abs(Yt),Math.abs(wt))&&Math.abs(qe-ue)<=glMatrix.EPSILON*Math.max(1,Math.abs(qe),Math.abs(ue))}var ft=null,St=null},1153:function(pn,Ot,nt){"use strict";nt.d(Ot,{$X:function(){return pt},AK:function(){return Ge},EU:function(){return mt},Fp:function(){return P},Fv:function(){return ge},I6:function(){return Le},IH:function(){return J},JG:function(){return K},TE:function(){return be},Ue:function(){return gt},VV:function(){return zt},al:function(){return Et},bA:function(){return W},kE:function(){return At},kK:function(){return ft},lu:function(){return ee},t7:function(){return xe},t8:function(){return yt},tk:function(){return Dt}});var kt=nt(96140);function gt(){var bt=new kt.WT(2);return kt.WT!=Float32Array&&(bt[0]=0,bt[1]=0),bt}function k(bt){var Xt=new glMatrix.ARRAY_TYPE(2);return Xt[0]=bt[0],Xt[1]=bt[1],Xt}function Et(bt,Xt){var $t=new kt.WT(2);return $t[0]=bt,$t[1]=Xt,$t}function K(bt,Xt){return bt[0]=Xt[0],bt[1]=Xt[1],bt}function yt(bt,Xt,$t){return bt[0]=Xt,bt[1]=$t,bt}function J(bt,Xt,$t){return bt[0]=Xt[0]+$t[0],bt[1]=Xt[1]+$t[1],bt}function pt(bt,Xt,$t){return bt[0]=Xt[0]-$t[0],bt[1]=Xt[1]-$t[1],bt}function et(bt,Xt,$t){return bt[0]=Xt[0]*$t[0],bt[1]=Xt[1]*$t[1],bt}function _e(bt,Xt,$t){return bt[0]=Xt[0]/$t[0],bt[1]=Xt[1]/$t[1],bt}function ot(bt,Xt){return bt[0]=Math.ceil(Xt[0]),bt[1]=Math.ceil(Xt[1]),bt}function ut(bt,Xt){return bt[0]=Math.floor(Xt[0]),bt[1]=Math.floor(Xt[1]),bt}function zt(bt,Xt,$t){return bt[0]=Math.min(Xt[0],$t[0]),bt[1]=Math.min(Xt[1],$t[1]),bt}function P(bt,Xt,$t){return bt[0]=Math.max(Xt[0],$t[0]),bt[1]=Math.max(Xt[1],$t[1]),bt}function b(bt,Xt){return bt[0]=Math.round(Xt[0]),bt[1]=Math.round(Xt[1]),bt}function W(bt,Xt,$t){return bt[0]=Xt[0]*$t,bt[1]=Xt[1]*$t,bt}function le(bt,Xt,$t,xt){return bt[0]=Xt[0]+$t[0]*xt,bt[1]=Xt[1]+$t[1]*xt,bt}function be(bt,Xt){var $t=Xt[0]-bt[0],xt=Xt[1]-bt[1];return Math.hypot($t,xt)}function Me(bt,Xt){var $t=Xt[0]-bt[0],xt=Xt[1]-bt[1];return $t*$t+xt*xt}function At(bt){var Xt=bt[0],$t=bt[1];return Math.hypot(Xt,$t)}function rt(bt){var Xt=bt[0],$t=bt[1];return Xt*Xt+$t*$t}function Dt(bt,Xt){return bt[0]=-Xt[0],bt[1]=-Xt[1],bt}function Ee(bt,Xt){return bt[0]=1/Xt[0],bt[1]=1/Xt[1],bt}function ge(bt,Xt){var $t=Xt[0],xt=Xt[1],wt=$t*$t+xt*xt;return wt>0&&(wt=1/Math.sqrt(wt)),bt[0]=Xt[0]*wt,bt[1]=Xt[1]*wt,bt}function Ge(bt,Xt){return bt[0]*Xt[0]+bt[1]*Xt[1]}function Ue(bt,Xt,$t){var xt=Xt[0]*$t[1]-Xt[1]*$t[0];return bt[0]=bt[1]=0,bt[2]=xt,bt}function xe(bt,Xt,$t,xt){var wt=Xt[0],ue=Xt[1];return bt[0]=wt+xt*($t[0]-wt),bt[1]=ue+xt*($t[1]-ue),bt}function Ke(bt,Xt){Xt=Xt||1;var $t=glMatrix.RANDOM()*2*Math.PI;return bt[0]=Math.cos($t)*Xt,bt[1]=Math.sin($t)*Xt,bt}function Lt(bt,Xt,$t){var xt=Xt[0],wt=Xt[1];return bt[0]=$t[0]*xt+$t[2]*wt,bt[1]=$t[1]*xt+$t[3]*wt,bt}function Jt(bt,Xt,$t){var xt=Xt[0],wt=Xt[1];return bt[0]=$t[0]*xt+$t[2]*wt+$t[4],bt[1]=$t[1]*xt+$t[3]*wt+$t[5],bt}function ft(bt,Xt,$t){var xt=Xt[0],wt=Xt[1];return bt[0]=$t[0]*xt+$t[3]*wt+$t[6],bt[1]=$t[1]*xt+$t[4]*wt+$t[7],bt}function St(bt,Xt,$t){var xt=Xt[0],wt=Xt[1];return bt[0]=$t[0]*xt+$t[4]*wt+$t[12],bt[1]=$t[1]*xt+$t[5]*wt+$t[13],bt}function Y(bt,Xt,$t,xt){var wt=Xt[0]-$t[0],ue=Xt[1]-$t[1],Ie=Math.sin(xt),Ne=Math.cos(xt);return bt[0]=wt*Ne-ue*Ie+$t[0],bt[1]=wt*Ie+ue*Ne+$t[1],bt}function mt(bt,Xt){var $t=bt[0],xt=bt[1],wt=Xt[0],ue=Xt[1],Ie=Math.sqrt($t*$t+xt*xt)*Math.sqrt(wt*wt+ue*ue),Ne=Ie&&($t*wt+xt*ue)/Ie;return Math.acos(Math.min(Math.max(Ne,-1),1))}function se(bt){return bt[0]=0,bt[1]=0,bt}function ke(bt){return"vec2("+bt[0]+", "+bt[1]+")"}function Le(bt,Xt){return bt[0]===Xt[0]&&bt[1]===Xt[1]}function Be(bt,Xt){var $t=bt[0],xt=bt[1],wt=Xt[0],ue=Xt[1];return Math.abs($t-wt)<=glMatrix.EPSILON*Math.max(1,Math.abs($t),Math.abs(wt))&&Math.abs(xt-ue)<=glMatrix.EPSILON*Math.max(1,Math.abs(xt),Math.abs(ue))}var Bt=null,ee=pt,me=null,Yt=null,qe=null,vr=null,ie=null,qt=function(){var bt=gt();return function(Xt,$t,xt,wt,ue,Ie){var Ne,Zt;for($t||($t=2),xt||(xt=0),wt?Zt=Math.min(wt*$t+xt,Xt.length):Zt=Xt.length,Ne=xt;Ne<Zt;Ne+=$t)bt[0]=Xt[Ne],bt[1]=Xt[Ne+1],ue(bt,bt,Ie),Xt[Ne]=bt[0],Xt[Ne+1]=bt[1];return Xt}}()},68072:function(pn,Ot,nt){"use strict";nt.r(Ot),nt.d(Ot,{add:function(){return pt},angle:function(){return Le},bezier:function(){return Lt},ceil:function(){return ut},clone:function(){return k},copy:function(){return yt},create:function(){return gt},cross:function(){return Ue},dist:function(){return ie},distance:function(){return Me},div:function(){return vr},divide:function(){return ot},dot:function(){return Ge},equals:function(){return me},exactEquals:function(){return ee},floor:function(){return zt},forEach:function(){return $t},fromValues:function(){return K},hermite:function(){return Ke},inverse:function(){return Ee},len:function(){return bt},length:function(){return Et},lerp:function(){return xe},max:function(){return b},min:function(){return P},mul:function(){return qe},multiply:function(){return _e},negate:function(){return Dt},normalize:function(){return ge},random:function(){return Jt},rotateX:function(){return mt},rotateY:function(){return se},rotateZ:function(){return ke},round:function(){return W},scale:function(){return le},scaleAndAdd:function(){return be},set:function(){return J},sqrDist:function(){return qt},sqrLen:function(){return Xt},squaredDistance:function(){return At},squaredLength:function(){return rt},str:function(){return Bt},sub:function(){return Yt},subtract:function(){return et},transformMat3:function(){return St},transformMat4:function(){return ft},transformQuat:function(){return Y},zero:function(){return Be}});var kt=nt(96140);function gt(){var xt=new kt.WT(3);return kt.WT!=Float32Array&&(xt[0]=0,xt[1]=0,xt[2]=0),xt}function k(xt){var wt=new kt.WT(3);return wt[0]=xt[0],wt[1]=xt[1],wt[2]=xt[2],wt}function Et(xt){var wt=xt[0],ue=xt[1],Ie=xt[2];return Math.hypot(wt,ue,Ie)}function K(xt,wt,ue){var Ie=new kt.WT(3);return Ie[0]=xt,Ie[1]=wt,Ie[2]=ue,Ie}function yt(xt,wt){return xt[0]=wt[0],xt[1]=wt[1],xt[2]=wt[2],xt}function J(xt,wt,ue,Ie){return xt[0]=wt,xt[1]=ue,xt[2]=Ie,xt}function pt(xt,wt,ue){return xt[0]=wt[0]+ue[0],xt[1]=wt[1]+ue[1],xt[2]=wt[2]+ue[2],xt}function et(xt,wt,ue){return xt[0]=wt[0]-ue[0],xt[1]=wt[1]-ue[1],xt[2]=wt[2]-ue[2],xt}function _e(xt,wt,ue){return xt[0]=wt[0]*ue[0],xt[1]=wt[1]*ue[1],xt[2]=wt[2]*ue[2],xt}function ot(xt,wt,ue){return xt[0]=wt[0]/ue[0],xt[1]=wt[1]/ue[1],xt[2]=wt[2]/ue[2],xt}function ut(xt,wt){return xt[0]=Math.ceil(wt[0]),xt[1]=Math.ceil(wt[1]),xt[2]=Math.ceil(wt[2]),xt}function zt(xt,wt){return xt[0]=Math.floor(wt[0]),xt[1]=Math.floor(wt[1]),xt[2]=Math.floor(wt[2]),xt}function P(xt,wt,ue){return xt[0]=Math.min(wt[0],ue[0]),xt[1]=Math.min(wt[1],ue[1]),xt[2]=Math.min(wt[2],ue[2]),xt}function b(xt,wt,ue){return xt[0]=Math.max(wt[0],ue[0]),xt[1]=Math.max(wt[1],ue[1]),xt[2]=Math.max(wt[2],ue[2]),xt}function W(xt,wt){return xt[0]=Math.round(wt[0]),xt[1]=Math.round(wt[1]),xt[2]=Math.round(wt[2]),xt}function le(xt,wt,ue){return xt[0]=wt[0]*ue,xt[1]=wt[1]*ue,xt[2]=wt[2]*ue,xt}function be(xt,wt,ue,Ie){return xt[0]=wt[0]+ue[0]*Ie,xt[1]=wt[1]+ue[1]*Ie,xt[2]=wt[2]+ue[2]*Ie,xt}function Me(xt,wt){var ue=wt[0]-xt[0],Ie=wt[1]-xt[1],Ne=wt[2]-xt[2];return Math.hypot(ue,Ie,Ne)}function At(xt,wt){var ue=wt[0]-xt[0],Ie=wt[1]-xt[1],Ne=wt[2]-xt[2];return ue*ue+Ie*Ie+Ne*Ne}function rt(xt){var wt=xt[0],ue=xt[1],Ie=xt[2];return wt*wt+ue*ue+Ie*Ie}function Dt(xt,wt){return xt[0]=-wt[0],xt[1]=-wt[1],xt[2]=-wt[2],xt}function Ee(xt,wt){return xt[0]=1/wt[0],xt[1]=1/wt[1],xt[2]=1/wt[2],xt}function ge(xt,wt){var ue=wt[0],Ie=wt[1],Ne=wt[2],Zt=ue*ue+Ie*Ie+Ne*Ne;return Zt>0&&(Zt=1/Math.sqrt(Zt)),xt[0]=wt[0]*Zt,xt[1]=wt[1]*Zt,xt[2]=wt[2]*Zt,xt}function Ge(xt,wt){return xt[0]*wt[0]+xt[1]*wt[1]+xt[2]*wt[2]}function Ue(xt,wt,ue){var Ie=wt[0],Ne=wt[1],Zt=wt[2],Ct=ue[0],Tt=ue[1],Nt=ue[2];return xt[0]=Ne*Nt-Zt*Tt,xt[1]=Zt*Ct-Ie*Nt,xt[2]=Ie*Tt-Ne*Ct,xt}function xe(xt,wt,ue,Ie){var Ne=wt[0],Zt=wt[1],Ct=wt[2];return xt[0]=Ne+Ie*(ue[0]-Ne),xt[1]=Zt+Ie*(ue[1]-Zt),xt[2]=Ct+Ie*(ue[2]-Ct),xt}function Ke(xt,wt,ue,Ie,Ne,Zt){var Ct=Zt*Zt,Tt=Ct*(2*Zt-3)+1,Nt=Ct*(Zt-2)+Zt,tt=Ct*(Zt-1),vt=Ct*(3-2*Zt);return xt[0]=wt[0]*Tt+ue[0]*Nt+Ie[0]*tt+Ne[0]*vt,xt[1]=wt[1]*Tt+ue[1]*Nt+Ie[1]*tt+Ne[1]*vt,xt[2]=wt[2]*Tt+ue[2]*Nt+Ie[2]*tt+Ne[2]*vt,xt}function Lt(xt,wt,ue,Ie,Ne,Zt){var Ct=1-Zt,Tt=Ct*Ct,Nt=Zt*Zt,tt=Tt*Ct,vt=3*Zt*Tt,Ht=3*Nt*Ct,he=Nt*Zt;return xt[0]=wt[0]*tt+ue[0]*vt+Ie[0]*Ht+Ne[0]*he,xt[1]=wt[1]*tt+ue[1]*vt+Ie[1]*Ht+Ne[1]*he,xt[2]=wt[2]*tt+ue[2]*vt+Ie[2]*Ht+Ne[2]*he,xt}function Jt(xt,wt){wt=wt||1;var ue=kt.FD()*2*Math.PI,Ie=kt.FD()*2-1,Ne=Math.sqrt(1-Ie*Ie)*wt;return xt[0]=Math.cos(ue)*Ne,xt[1]=Math.sin(ue)*Ne,xt[2]=Ie*wt,xt}function ft(xt,wt,ue){var Ie=wt[0],Ne=wt[1],Zt=wt[2],Ct=ue[3]*Ie+ue[7]*Ne+ue[11]*Zt+ue[15];return Ct=Ct||1,xt[0]=(ue[0]*Ie+ue[4]*Ne+ue[8]*Zt+ue[12])/Ct,xt[1]=(ue[1]*Ie+ue[5]*Ne+ue[9]*Zt+ue[13])/Ct,xt[2]=(ue[2]*Ie+ue[6]*Ne+ue[10]*Zt+ue[14])/Ct,xt}function St(xt,wt,ue){var Ie=wt[0],Ne=wt[1],Zt=wt[2];return xt[0]=Ie*ue[0]+Ne*ue[3]+Zt*ue[6],xt[1]=Ie*ue[1]+Ne*ue[4]+Zt*ue[7],xt[2]=Ie*ue[2]+Ne*ue[5]+Zt*ue[8],xt}function Y(xt,wt,ue){var Ie=ue[0],Ne=ue[1],Zt=ue[2],Ct=ue[3],Tt=wt[0],Nt=wt[1],tt=wt[2],vt=Ne*tt-Zt*Nt,Ht=Zt*Tt-Ie*tt,he=Ie*Nt-Ne*Tt,jt=Ne*he-Zt*Ht,Te=Zt*vt-Ie*he,We=Ie*Ht-Ne*vt,Qe=Ct*2;return vt*=Qe,Ht*=Qe,he*=Qe,jt*=2,Te*=2,We*=2,xt[0]=Tt+vt+jt,xt[1]=Nt+Ht+Te,xt[2]=tt+he+We,xt}function mt(xt,wt,ue,Ie){var Ne=[],Zt=[];return Ne[0]=wt[0]-ue[0],Ne[1]=wt[1]-ue[1],Ne[2]=wt[2]-ue[2],Zt[0]=Ne[0],Zt[1]=Ne[1]*Math.cos(Ie)-Ne[2]*Math.sin(Ie),Zt[2]=Ne[1]*Math.sin(Ie)+Ne[2]*Math.cos(Ie),xt[0]=Zt[0]+ue[0],xt[1]=Zt[1]+ue[1],xt[2]=Zt[2]+ue[2],xt}function se(xt,wt,ue,Ie){var Ne=[],Zt=[];return Ne[0]=wt[0]-ue[0],Ne[1]=wt[1]-ue[1],Ne[2]=wt[2]-ue[2],Zt[0]=Ne[2]*Math.sin(Ie)+Ne[0]*Math.cos(Ie),Zt[1]=Ne[1],Zt[2]=Ne[2]*Math.cos(Ie)-Ne[0]*Math.sin(Ie),xt[0]=Zt[0]+ue[0],xt[1]=Zt[1]+ue[1],xt[2]=Zt[2]+ue[2],xt}function ke(xt,wt,ue,Ie){var Ne=[],Zt=[];return Ne[0]=wt[0]-ue[0],Ne[1]=wt[1]-ue[1],Ne[2]=wt[2]-ue[2],Zt[0]=Ne[0]*Math.cos(Ie)-Ne[1]*Math.sin(Ie),Zt[1]=Ne[0]*Math.sin(Ie)+Ne[1]*Math.cos(Ie),Zt[2]=Ne[2],xt[0]=Zt[0]+ue[0],xt[1]=Zt[1]+ue[1],xt[2]=Zt[2]+ue[2],xt}function Le(xt,wt){var ue=xt[0],Ie=xt[1],Ne=xt[2],Zt=wt[0],Ct=wt[1],Tt=wt[2],Nt=Math.sqrt(ue*ue+Ie*Ie+Ne*Ne),tt=Math.sqrt(Zt*Zt+Ct*Ct+Tt*Tt),vt=Nt*tt,Ht=vt&&Ge(xt,wt)/vt;return Math.acos(Math.min(Math.max(Ht,-1),1))}function Be(xt){return xt[0]=0,xt[1]=0,xt[2]=0,xt}function Bt(xt){return"vec3("+xt[0]+", "+xt[1]+", "+xt[2]+")"}function ee(xt,wt){return xt[0]===wt[0]&&xt[1]===wt[1]&&xt[2]===wt[2]}function me(xt,wt){var ue=xt[0],Ie=xt[1],Ne=xt[2],Zt=wt[0],Ct=wt[1],Tt=wt[2];return Math.abs(ue-Zt)<=kt.Ib*Math.max(1,Math.abs(ue),Math.abs(Zt))&&Math.abs(Ie-Ct)<=kt.Ib*Math.max(1,Math.abs(Ie),Math.abs(Ct))&&Math.abs(Ne-Tt)<=kt.Ib*Math.max(1,Math.abs(Ne),Math.abs(Tt))}var Yt=et,qe=_e,vr=ot,ie=Me,qt=At,bt=Et,Xt=rt,$t=function(){var xt=gt();return function(wt,ue,Ie,Ne,Zt,Ct){var Tt,Nt;for(ue||(ue=3),Ie||(Ie=0),Ne?Nt=Math.min(Ne*ue+Ie,wt.length):Nt=wt.length,Tt=Ie;Tt<Nt;Tt+=ue)xt[0]=wt[Tt],xt[1]=wt[Tt+1],xt[2]=wt[Tt+2],Zt(xt,xt,Ct),wt[Tt]=xt[0],wt[Tt+1]=xt[1],wt[Tt+2]=xt[2];return wt}}()},34686:function(pn,Ot){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});var nt=Symbol.for("INJECTION");function kt(yt,J,pt,et){function _e(){return et&&!Reflect.hasMetadata(nt,this,J)&&Reflect.defineMetadata(nt,pt(),this,J),Reflect.hasMetadata(nt,this,J)?Reflect.getMetadata(nt,this,J):pt()}function ot(ut){Reflect.defineMetadata(nt,ut,this,J)}Object.defineProperty(yt,J,{configurable:!0,enumerable:!0,get:_e,set:ot})}function gt(yt,J){return function(pt){return function(et,_e){var ot=function(){return yt.get(pt)};kt(et,_e,ot,J)}}}Ot.makePropertyInjectDecorator=gt;function k(yt,J){return function(pt,et){return function(_e,ot){var ut=function(){return yt.getNamed(pt,et)};kt(_e,ot,ut,J)}}}Ot.makePropertyInjectNamedDecorator=k;function Et(yt,J){return function(pt,et,_e){return function(ot,ut){var zt=function(){return yt.getTagged(pt,et,_e)};kt(ot,ut,zt,J)}}}Ot.makePropertyInjectTaggedDecorator=Et;function K(yt,J){return function(pt){return function(et,_e){var ot=function(){return yt.getAll(pt)};kt(et,_e,ot,J)}}}Ot.makePropertyMultiInjectDecorator=K},82615:function(pn,Ot,nt){"use strict";var kt;kt={value:!0};var gt=nt(34686);function k(Et,K){K===void 0&&(K=!0);var yt=gt.makePropertyInjectDecorator(Et,K),J=gt.makePropertyInjectNamedDecorator(Et,K),pt=gt.makePropertyInjectTaggedDecorator(Et,K),et=gt.makePropertyMultiInjectDecorator(Et,K);return{lazyInject:yt,lazyInjectNamed:J,lazyInjectTagged:pt,lazyMultiInject:et}}Ot.Z=k},90333:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.tagProperty=Ot.tagParameter=Ot.decorate=void 0;var kt=nt(52050),gt=nt(91193);function k(et,_e,ot,ut){var zt=gt.TAGGED;K(zt,et,_e,ut,ot)}Ot.tagParameter=k;function Et(et,_e,ot){var ut=gt.TAGGED_PROP;K(ut,et.constructor,_e,ot)}Ot.tagProperty=Et;function K(et,_e,ot,ut,zt){var P={},b=typeof zt=="number",W=zt!==void 0&&b?zt.toString():ot;if(b&&ot!==void 0)throw new Error(kt.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(et,_e)&&(P=Reflect.getMetadata(et,_e));var le=P[W];if(!Array.isArray(le))le=[];else for(var be=0,Me=le;be<Me.length;be++){var At=Me[be];if(At.key===ut.key)throw new Error(kt.DUPLICATED_METADATA+" "+At.key.toString())}le.push(ut),P[W]=le,Reflect.defineMetadata(et,P,_e)}function yt(et,_e){Reflect.decorate(et,_e)}function J(et,_e){return function(ot,ut){_e(ot,ut,et)}}function pt(et,_e,ot){typeof ot=="number"?yt([J(ot,et)],_e):typeof ot=="string"?Reflect.decorate([et],_e,ot):yt([et],_e)}Ot.decorate=pt},70105:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.inject=Ot.LazyServiceIdentifer=void 0;var kt=nt(52050),gt=nt(91193),k=nt(55650),Et=nt(90333),K=function(){function J(pt){this._cb=pt}return J.prototype.unwrap=function(){return this._cb()},J}();Ot.LazyServiceIdentifer=K;function yt(J){return function(pt,et,_e){if(J===void 0)throw new Error(kt.UNDEFINED_INJECT_ANNOTATION(pt.name));var ot=new k.Metadata(gt.INJECT_TAG,J);typeof _e=="number"?Et.tagParameter(pt,et,_e,ot):Et.tagProperty(pt,et,ot)}}Ot.inject=yt},9719:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.injectable=void 0;var kt=nt(52050),gt=nt(91193);function k(){return function(Et){if(Reflect.hasOwnMetadata(gt.PARAM_TYPES,Et))throw new Error(kt.DUPLICATED_INJECTABLE_DECORATOR);var K=Reflect.getMetadata(gt.DESIGN_PARAM_TYPES,Et)||[];return Reflect.defineMetadata(gt.PARAM_TYPES,K,Et),Et}}Ot.injectable=k},81623:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.multiInject=void 0;var kt=nt(91193),gt=nt(55650),k=nt(90333);function Et(K){return function(yt,J,pt){var et=new gt.Metadata(kt.MULTI_INJECT_TAG,K);typeof pt=="number"?k.tagParameter(yt,J,pt,et):k.tagProperty(yt,J,et)}}Ot.multiInject=Et},69481:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.named=void 0;var kt=nt(91193),gt=nt(55650),k=nt(90333);function Et(K){return function(yt,J,pt){var et=new gt.Metadata(kt.NAMED_TAG,K);typeof pt=="number"?k.tagParameter(yt,J,pt,et):k.tagProperty(yt,J,et)}}Ot.named=Et},35231:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.optional=void 0;var kt=nt(91193),gt=nt(55650),k=nt(90333);function Et(){return function(K,yt,J){var pt=new gt.Metadata(kt.OPTIONAL_TAG,!0);typeof J=="number"?k.tagParameter(K,yt,J,pt):k.tagProperty(K,yt,pt)}}Ot.optional=Et},17419:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.postConstruct=void 0;var kt=nt(52050),gt=nt(91193),k=nt(55650);function Et(){return function(K,yt,J){var pt=new k.Metadata(gt.POST_CONSTRUCT,yt);if(Reflect.hasOwnMetadata(gt.POST_CONSTRUCT,K.constructor))throw new Error(kt.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(gt.POST_CONSTRUCT,pt,K.constructor)}}Ot.postConstruct=Et},97404:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.tagged=void 0;var kt=nt(55650),gt=nt(90333);function k(Et,K){return function(yt,J,pt){var et=new kt.Metadata(Et,K);typeof pt=="number"?gt.tagParameter(yt,J,pt,et):gt.tagProperty(yt,J,et)}}Ot.tagged=k},11580:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.targetName=void 0;var kt=nt(91193),gt=nt(55650),k=nt(90333);function Et(K){return function(yt,J,pt){var et=new gt.Metadata(kt.NAME_TAG,K);k.tagParameter(yt,J,pt,et)}}Ot.targetName=Et},8814:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.unmanaged=void 0;var kt=nt(91193),gt=nt(55650),k=nt(90333);function Et(){return function(K,yt,J){var pt=new gt.Metadata(kt.UNMANAGED_TAG,!0);k.tagParameter(K,yt,J,pt)}}Ot.unmanaged=Et},45210:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.Binding=void 0;var kt=nt(88795),gt=nt(18576),k=function(){function Et(K,yt){this.id=gt.id(),this.activated=!1,this.serviceIdentifier=K,this.scope=yt,this.type=kt.BindingTypeEnum.Invalid,this.constraint=function(J){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}return Et.prototype.clone=function(){var K=new Et(this.serviceIdentifier,this.scope);return K.activated=K.scope===kt.BindingScopeEnum.Singleton?this.activated:!1,K.implementationType=this.implementationType,K.dynamicValue=this.dynamicValue,K.scope=this.scope,K.type=this.type,K.factory=this.factory,K.provider=this.provider,K.constraint=this.constraint,K.onActivation=this.onActivation,K.cache=this.cache,K},Et}();Ot.Binding=k},44276:function(pn,Ot){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.BindingCount=void 0;var nt={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1};Ot.BindingCount=nt},52050:function(pn,Ot){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.STACK_OVERFLOW=Ot.CIRCULAR_DEPENDENCY_IN_FACTORY=Ot.POST_CONSTRUCT_ERROR=Ot.MULTIPLE_POST_CONSTRUCT_METHODS=Ot.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=Ot.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=Ot.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=Ot.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=Ot.ARGUMENTS_LENGTH_MISMATCH=Ot.INVALID_DECORATOR_OPERATION=Ot.INVALID_TO_SELF_VALUE=Ot.INVALID_FUNCTION_BINDING=Ot.INVALID_MIDDLEWARE_RETURN=Ot.NO_MORE_SNAPSHOTS_AVAILABLE=Ot.INVALID_BINDING_TYPE=Ot.NOT_IMPLEMENTED=Ot.CIRCULAR_DEPENDENCY=Ot.UNDEFINED_INJECT_ANNOTATION=Ot.MISSING_INJECT_ANNOTATION=Ot.MISSING_INJECTABLE_ANNOTATION=Ot.NOT_REGISTERED=Ot.CANNOT_UNBIND=Ot.AMBIGUOUS_MATCH=Ot.KEY_NOT_FOUND=Ot.NULL_ARGUMENT=Ot.DUPLICATED_METADATA=Ot.DUPLICATED_INJECTABLE_DECORATOR=void 0,Ot.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",Ot.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",Ot.NULL_ARGUMENT="NULL argument",Ot.KEY_NOT_FOUND="Key Not Found",Ot.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",Ot.CANNOT_UNBIND="Could not unbind serviceIdentifier:",Ot.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",Ot.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",Ot.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";var nt=function(Et){return"@inject called with undefined this could mean that the class "+Et+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."};Ot.UNDEFINED_INJECT_ANNOTATION=nt,Ot.CIRCULAR_DEPENDENCY="Circular dependency found:",Ot.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",Ot.INVALID_BINDING_TYPE="Invalid binding type:",Ot.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",Ot.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",Ot.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",Ot.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",Ot.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";var kt=function(){for(var Et=[],K=0;K<arguments.length;K++)Et[K]=arguments[K];return"The number of constructor arguments in the derived class "+(Et[0]+" must be >= than the number of constructor arguments of its base class.")};Ot.ARGUMENTS_LENGTH_MISMATCH=kt,Ot.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",Ot.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",Ot.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",Ot.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",Ot.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";var gt=function(){for(var Et=[],K=0;K<arguments.length;K++)Et[K]=arguments[K];return"@postConstruct error in class "+Et[0]+": "+Et[1]};Ot.POST_CONSTRUCT_ERROR=gt;var k=function(){for(var Et=[],K=0;K<arguments.length;K++)Et[K]=arguments[K];return"It looks like there is a circular dependency "+("in one of the '"+Et[0]+"' bindings. Please investigate bindings with")+("service identifier '"+Et[1]+"'.")};Ot.CIRCULAR_DEPENDENCY_IN_FACTORY=k,Ot.STACK_OVERFLOW="Maximum call stack size exceeded"},88795:function(pn,Ot){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.TargetTypeEnum=Ot.BindingTypeEnum=Ot.BindingScopeEnum=void 0;var nt={Request:"Request",Singleton:"Singleton",Transient:"Transient"};Ot.BindingScopeEnum=nt;var kt={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};Ot.BindingTypeEnum=kt;var gt={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"};Ot.TargetTypeEnum=gt},91193:function(pn,Ot){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.NON_CUSTOM_TAG_KEYS=Ot.POST_CONSTRUCT=Ot.DESIGN_PARAM_TYPES=Ot.PARAM_TYPES=Ot.TAGGED_PROP=Ot.TAGGED=Ot.MULTI_INJECT_TAG=Ot.INJECT_TAG=Ot.OPTIONAL_TAG=Ot.UNMANAGED_TAG=Ot.NAME_TAG=Ot.NAMED_TAG=void 0,Ot.NAMED_TAG="named",Ot.NAME_TAG="name",Ot.UNMANAGED_TAG="unmanaged",Ot.OPTIONAL_TAG="optional",Ot.INJECT_TAG="inject",Ot.MULTI_INJECT_TAG="multi_inject",Ot.TAGGED="inversify:tagged",Ot.TAGGED_PROP="inversify:tagged_props",Ot.PARAM_TYPES="inversify:paramtypes",Ot.DESIGN_PARAM_TYPES="design:paramtypes",Ot.POST_CONSTRUCT="post_construct";function nt(){return[Ot.INJECT_TAG,Ot.MULTI_INJECT_TAG,Ot.NAME_TAG,Ot.UNMANAGED_TAG,Ot.NAMED_TAG,Ot.OPTIONAL_TAG]}Ot.NON_CUSTOM_TAG_KEYS=nt()},46769:function(pn,Ot,nt){"use strict";var kt=this&&this.__awaiter||function(le,be,Me,At){function rt(Dt){return Dt instanceof Me?Dt:new Me(function(Ee){Ee(Dt)})}return new(Me||(Me=Promise))(function(Dt,Ee){function ge(xe){try{Ue(At.next(xe))}catch(Ke){Ee(Ke)}}function Ge(xe){try{Ue(At.throw(xe))}catch(Ke){Ee(Ke)}}function Ue(xe){xe.done?Dt(xe.value):rt(xe.value).then(ge,Ge)}Ue((At=At.apply(le,be||[])).next())})},gt=this&&this.__generator||function(le,be){var Me={label:0,sent:function(){if(Dt[0]&1)throw Dt[1];return Dt[1]},trys:[],ops:[]},At,rt,Dt,Ee;return Ee={next:ge(0),throw:ge(1),return:ge(2)},typeof Symbol=="function"&&(Ee[Symbol.iterator]=function(){return this}),Ee;function ge(Ue){return function(xe){return Ge([Ue,xe])}}function Ge(Ue){if(At)throw new TypeError("Generator is already executing.");for(;Me;)try{if(At=1,rt&&(Dt=Ue[0]&2?rt.return:Ue[0]?rt.throw||((Dt=rt.return)&&Dt.call(rt),0):rt.next)&&!(Dt=Dt.call(rt,Ue[1])).done)return Dt;switch(rt=0,Dt&&(Ue=[Ue[0]&2,Dt.value]),Ue[0]){case 0:case 1:Dt=Ue;break;case 4:return Me.label++,{value:Ue[1],done:!1};case 5:Me.label++,rt=Ue[1],Ue=[0];continue;case 7:Ue=Me.ops.pop(),Me.trys.pop();continue;default:if(Dt=Me.trys,!(Dt=Dt.length>0&&Dt[Dt.length-1])&&(Ue[0]===6||Ue[0]===2)){Me=0;continue}if(Ue[0]===3&&(!Dt||Ue[1]>Dt[0]&&Ue[1]<Dt[3])){Me.label=Ue[1];break}if(Ue[0]===6&&Me.label<Dt[1]){Me.label=Dt[1],Dt=Ue;break}if(Dt&&Me.label<Dt[2]){Me.label=Dt[2],Me.ops.push(Ue);break}Dt[2]&&Me.ops.pop(),Me.trys.pop();continue}Ue=be.call(le,Me)}catch(xe){Ue=[6,xe],rt=0}finally{At=Dt=0}if(Ue[0]&5)throw Ue[1];return{value:Ue[0]?Ue[1]:void 0,done:!0}}},k=this&&this.__spreadArray||function(le,be){for(var Me=0,At=be.length,rt=le.length;Me<At;Me++,rt++)le[rt]=be[Me];return le};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.Container=void 0;var Et=nt(45210),K=nt(52050),yt=nt(88795),J=nt(91193),pt=nt(54594),et=nt(47572),_e=nt(87536),ot=nt(43085),ut=nt(18576),zt=nt(80030),P=nt(80522),b=nt(96382),W=function(){function le(be){this._appliedMiddleware=[];var Me=be||{};if(typeof Me!="object")throw new Error(""+K.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(Me.defaultScope===void 0)Me.defaultScope=yt.BindingScopeEnum.Transient;else if(Me.defaultScope!==yt.BindingScopeEnum.Singleton&&Me.defaultScope!==yt.BindingScopeEnum.Transient&&Me.defaultScope!==yt.BindingScopeEnum.Request)throw new Error(""+K.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(Me.autoBindInjectable===void 0)Me.autoBindInjectable=!1;else if(typeof Me.autoBindInjectable!="boolean")throw new Error(""+K.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(Me.skipBaseClassChecks===void 0)Me.skipBaseClassChecks=!1;else if(typeof Me.skipBaseClassChecks!="boolean")throw new Error(""+K.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:Me.autoBindInjectable,defaultScope:Me.defaultScope,skipBaseClassChecks:Me.skipBaseClassChecks},this.id=ut.id(),this._bindingDictionary=new b.Lookup,this._snapshots=[],this._middleware=null,this.parent=null,this._metadataReader=new pt.MetadataReader}return le.merge=function(be,Me){for(var At=[],rt=2;rt<arguments.length;rt++)At[rt-2]=arguments[rt];var Dt=new le,Ee=k([be,Me],At).map(function(Ue){return et.getBindingDictionary(Ue)}),ge=et.getBindingDictionary(Dt);function Ge(Ue,xe){Ue.traverse(function(Ke,Lt){Lt.forEach(function(Jt){xe.add(Jt.serviceIdentifier,Jt.clone())})})}return Ee.forEach(function(Ue){Ge(Ue,ge)}),Dt},le.prototype.load=function(){for(var be=[],Me=0;Me<arguments.length;Me++)be[Me]=arguments[Me];for(var At=this._getContainerModuleHelpersFactory(),rt=0,Dt=be;rt<Dt.length;rt++){var Ee=Dt[rt],ge=At(Ee.id);Ee.registry(ge.bindFunction,ge.unbindFunction,ge.isboundFunction,ge.rebindFunction)}},le.prototype.loadAsync=function(){for(var be=[],Me=0;Me<arguments.length;Me++)be[Me]=arguments[Me];return kt(this,void 0,void 0,function(){var At,rt,Dt,Ee,ge;return gt(this,function(Ge){switch(Ge.label){case 0:At=this._getContainerModuleHelpersFactory(),rt=0,Dt=be,Ge.label=1;case 1:return rt<Dt.length?(Ee=Dt[rt],ge=At(Ee.id),[4,Ee.registry(ge.bindFunction,ge.unbindFunction,ge.isboundFunction,ge.rebindFunction)]):[3,4];case 2:Ge.sent(),Ge.label=3;case 3:return rt++,[3,1];case 4:return[2]}})})},le.prototype.unload=function(){for(var be=this,Me=[],At=0;At<arguments.length;At++)Me[At]=arguments[At];var rt=function(Dt){return function(Ee){return Ee.moduleId===Dt}};Me.forEach(function(Dt){var Ee=rt(Dt.id);be._bindingDictionary.removeByCondition(Ee)})},le.prototype.bind=function(be){var Me=this.options.defaultScope||yt.BindingScopeEnum.Transient,At=new Et.Binding(be,Me);return this._bindingDictionary.add(be,At),new ot.BindingToSyntax(At)},le.prototype.rebind=function(be){return this.unbind(be),this.bind(be)},le.prototype.unbind=function(be){try{this._bindingDictionary.remove(be)}catch(Me){throw new Error(K.CANNOT_UNBIND+" "+zt.getServiceIdentifierAsString(be))}},le.prototype.unbindAll=function(){this._bindingDictionary=new b.Lookup},le.prototype.isBound=function(be){var Me=this._bindingDictionary.hasKey(be);return!Me&&this.parent&&(Me=this.parent.isBound(be)),Me},le.prototype.isBoundNamed=function(be,Me){return this.isBoundTagged(be,J.NAMED_TAG,Me)},le.prototype.isBoundTagged=function(be,Me,At){var rt=!1;if(this._bindingDictionary.hasKey(be)){var Dt=this._bindingDictionary.get(be),Ee=et.createMockRequest(this,be,Me,At);rt=Dt.some(function(ge){return ge.constraint(Ee)})}return!rt&&this.parent&&(rt=this.parent.isBoundTagged(be,Me,At)),rt},le.prototype.snapshot=function(){this._snapshots.push(P.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware))},le.prototype.restore=function(){var be=this._snapshots.pop();if(be===void 0)throw new Error(K.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=be.bindings,this._middleware=be.middleware},le.prototype.createChild=function(be){var Me=new le(be||this.options);return Me.parent=this,Me},le.prototype.applyMiddleware=function(){for(var be=[],Me=0;Me<arguments.length;Me++)be[Me]=arguments[Me];this._appliedMiddleware=this._appliedMiddleware.concat(be);var At=this._middleware?this._middleware:this._planAndResolve();this._middleware=be.reduce(function(rt,Dt){return Dt(rt)},At)},le.prototype.applyCustomMetadataReader=function(be){this._metadataReader=be},le.prototype.get=function(be){return this._get(!1,!1,yt.TargetTypeEnum.Variable,be)},le.prototype.getTagged=function(be,Me,At){return this._get(!1,!1,yt.TargetTypeEnum.Variable,be,Me,At)},le.prototype.getNamed=function(be,Me){return this.getTagged(be,J.NAMED_TAG,Me)},le.prototype.getAll=function(be){return this._get(!0,!0,yt.TargetTypeEnum.Variable,be)},le.prototype.getAllTagged=function(be,Me,At){return this._get(!1,!0,yt.TargetTypeEnum.Variable,be,Me,At)},le.prototype.getAllNamed=function(be,Me){return this.getAllTagged(be,J.NAMED_TAG,Me)},le.prototype.resolve=function(be){var Me=this.createChild();return Me.bind(be).toSelf(),this._appliedMiddleware.forEach(function(At){Me.applyMiddleware(At)}),Me.get(be)},le.prototype._getContainerModuleHelpersFactory=function(){var be=this,Me=function(ge,Ge){ge._binding.moduleId=Ge},At=function(ge){return function(Ge){var Ue=be.bind.bind(be),xe=Ue(Ge);return Me(xe,ge),xe}},rt=function(ge){return function(Ge){var Ue=be.unbind.bind(be);Ue(Ge)}},Dt=function(ge){return function(Ge){var Ue=be.isBound.bind(be);return Ue(Ge)}},Ee=function(ge){return function(Ge){var Ue=be.rebind.bind(be),xe=Ue(Ge);return Me(xe,ge),xe}};return function(ge){return{bindFunction:At(ge),isboundFunction:Dt(ge),rebindFunction:Ee(ge),unbindFunction:rt(ge)}}},le.prototype._get=function(be,Me,At,rt,Dt,Ee){var ge=null,Ge={avoidConstraints:be,contextInterceptor:function(Ue){return Ue},isMultiInject:Me,key:Dt,serviceIdentifier:rt,targetType:At,value:Ee};if(this._middleware){if(ge=this._middleware(Ge),ge==null)throw new Error(K.INVALID_MIDDLEWARE_RETURN)}else ge=this._planAndResolve()(Ge);return ge},le.prototype._planAndResolve=function(){var be=this;return function(Me){var At=et.plan(be._metadataReader,be,Me.isMultiInject,Me.targetType,Me.serviceIdentifier,Me.key,Me.value,Me.avoidConstraints);At=Me.contextInterceptor(At);var rt=_e.resolve(At);return rt}},le}();Ot.Container=W},69377:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.AsyncContainerModule=Ot.ContainerModule=void 0;var kt=nt(18576),gt=function(){function Et(K){this.id=kt.id(),this.registry=K}return Et}();Ot.ContainerModule=gt;var k=function(){function Et(K){this.id=kt.id(),this.registry=K}return Et}();Ot.AsyncContainerModule=k},80522:function(pn,Ot){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.ContainerSnapshot=void 0;var nt=function(){function kt(){}return kt.of=function(gt,k){var Et=new kt;return Et.bindings=gt,Et.middleware=k,Et},kt}();Ot.ContainerSnapshot=nt},96382:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.Lookup=void 0;var kt=nt(52050),gt=function(){function k(){this._map=new Map}return k.prototype.getMap=function(){return this._map},k.prototype.add=function(Et,K){if(Et==null)throw new Error(kt.NULL_ARGUMENT);if(K==null)throw new Error(kt.NULL_ARGUMENT);var yt=this._map.get(Et);yt!==void 0?(yt.push(K),this._map.set(Et,yt)):this._map.set(Et,[K])},k.prototype.get=function(Et){if(Et==null)throw new Error(kt.NULL_ARGUMENT);var K=this._map.get(Et);if(K!==void 0)return K;throw new Error(kt.KEY_NOT_FOUND)},k.prototype.remove=function(Et){if(Et==null)throw new Error(kt.NULL_ARGUMENT);if(!this._map.delete(Et))throw new Error(kt.KEY_NOT_FOUND)},k.prototype.removeByCondition=function(Et){var K=this;this._map.forEach(function(yt,J){var pt=yt.filter(function(et){return!Et(et)});pt.length>0?K._map.set(J,pt):K._map.delete(J)})},k.prototype.hasKey=function(Et){if(Et==null)throw new Error(kt.NULL_ARGUMENT);return this._map.has(Et)},k.prototype.clone=function(){var Et=new k;return this._map.forEach(function(K,yt){K.forEach(function(J){return Et.add(yt,J.clone())})}),Et},k.prototype.traverse=function(Et){this._map.forEach(function(K,yt){Et(yt,K)})},k}();Ot.Lookup=gt},31331:function(pn,Ot,nt){"use strict";var kt;kt={value:!0},kt=kt=kt=kt=kt=kt=Ot.GW=kt=kt=Ot.zY=kt=kt=kt=kt=kt=Ot.f3=kt=kt=Ot.b2=kt=kt=kt=kt=kt=Ot.W2=kt=void 0;var gt=nt(91193);kt=gt;var k=nt(46769);Object.defineProperty(Ot,"W2",{enumerable:!0,get:function(){return k.Container}});var Et=nt(88795);kt={enumerable:!0,get:function(){return Et.BindingScopeEnum}},kt={enumerable:!0,get:function(){return Et.BindingTypeEnum}},kt={enumerable:!0,get:function(){return Et.TargetTypeEnum}};var K=nt(69377);kt={enumerable:!0,get:function(){return K.AsyncContainerModule}},kt={enumerable:!0,get:function(){return K.ContainerModule}};var yt=nt(9719);Object.defineProperty(Ot,"b2",{enumerable:!0,get:function(){return yt.injectable}});var J=nt(97404);kt={enumerable:!0,get:function(){return J.tagged}};var pt=nt(69481);kt={enumerable:!0,get:function(){return pt.named}};var et=nt(70105);Object.defineProperty(Ot,"f3",{enumerable:!0,get:function(){return et.inject}}),kt={enumerable:!0,get:function(){return et.LazyServiceIdentifer}};var _e=nt(35231);kt={enumerable:!0,get:function(){return _e.optional}};var ot=nt(8814);kt={enumerable:!0,get:function(){return ot.unmanaged}};var ut=nt(81623);kt={enumerable:!0,get:function(){return ut.multiInject}};var zt=nt(11580);kt={enumerable:!0,get:function(){return zt.targetName}};var P=nt(17419);Object.defineProperty(Ot,"zY",{enumerable:!0,get:function(){return P.postConstruct}});var b=nt(54594);kt={enumerable:!0,get:function(){return b.MetadataReader}};var W=nt(18576);kt={enumerable:!0,get:function(){return W.id}};var le=nt(90333);Object.defineProperty(Ot,"GW",{enumerable:!0,get:function(){return le.decorate}});var be=nt(18307);kt={enumerable:!0,get:function(){return be.traverseAncerstors}},kt={enumerable:!0,get:function(){return be.taggedConstraint}},kt={enumerable:!0,get:function(){return be.namedConstraint}},kt={enumerable:!0,get:function(){return be.typeConstraint}};var Me=nt(80030);kt={enumerable:!0,get:function(){return Me.getServiceIdentifierAsString}};var At=nt(55605);kt={enumerable:!0,get:function(){return At.multiBindToService}}},52887:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.Context=void 0;var kt=nt(18576),gt=function(){function k(Et){this.id=kt.id(),this.container=Et}return k.prototype.addPlan=function(Et){this.plan=Et},k.prototype.setCurrentRequest=function(Et){this.currentRequest=Et},k}();Ot.Context=gt},55650:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.Metadata=void 0;var kt=nt(91193),gt=function(){function k(Et,K){this.key=Et,this.value=K}return k.prototype.toString=function(){return this.key===kt.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},k}();Ot.Metadata=gt},54594:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.MetadataReader=void 0;var kt=nt(91193),gt=function(){function k(){}return k.prototype.getConstructorMetadata=function(Et){var K=Reflect.getMetadata(kt.PARAM_TYPES,Et),yt=Reflect.getMetadata(kt.TAGGED,Et);return{compilerGeneratedMetadata:K,userGeneratedMetadata:yt||{}}},k.prototype.getPropertiesMetadata=function(Et){var K=Reflect.getMetadata(kt.TAGGED_PROP,Et)||[];return K},k}();Ot.MetadataReader=gt},21800:function(pn,Ot){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.Plan=void 0;var nt=function(){function kt(gt,k){this.parentContext=gt,this.rootRequest=k}return kt}();Ot.Plan=nt},47572:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.getBindingDictionary=Ot.createMockRequest=Ot.plan=void 0;var kt=nt(44276),gt=nt(52050),k=nt(88795),Et=nt(91193),K=nt(83817),yt=nt(80030),J=nt(52887),pt=nt(55650),et=nt(21800),_e=nt(73630),ot=nt(13571),ut=nt(79060);function zt(rt){return rt._bindingDictionary}Ot.getBindingDictionary=zt;function P(rt,Dt,Ee,ge,Ge,Ue){var xe=rt?Et.MULTI_INJECT_TAG:Et.INJECT_TAG,Ke=new pt.Metadata(xe,Ee),Lt=new ut.Target(Dt,ge,Ee,Ke);if(Ge!==void 0){var Jt=new pt.Metadata(Ge,Ue);Lt.metadata.push(Jt)}return Lt}function b(rt,Dt,Ee,ge,Ge){var Ue=be(Ee.container,Ge.serviceIdentifier),xe=[];return Ue.length===kt.BindingCount.NoBindingsAvailable&&Ee.container.options.autoBindInjectable&&typeof Ge.serviceIdentifier=="function"&&rt.getConstructorMetadata(Ge.serviceIdentifier).compilerGeneratedMetadata&&(Ee.container.bind(Ge.serviceIdentifier).toSelf(),Ue=be(Ee.container,Ge.serviceIdentifier)),Dt?xe=Ue:xe=Ue.filter(function(Ke){var Lt=new ot.Request(Ke.serviceIdentifier,Ee,ge,Ke,Ge);return Ke.constraint(Lt)}),W(Ge.serviceIdentifier,xe,Ge,Ee.container),xe}function W(rt,Dt,Ee,ge){switch(Dt.length){case kt.BindingCount.NoBindingsAvailable:if(Ee.isOptional())return Dt;var Ge=yt.getServiceIdentifierAsString(rt),Ue=gt.NOT_REGISTERED;throw Ue+=yt.listMetadataForTarget(Ge,Ee),Ue+=yt.listRegisteredBindingsForServiceIdentifier(ge,Ge,be),new Error(Ue);case kt.BindingCount.OnlyOneBindingAvailable:if(!Ee.isArray())return Dt;case kt.BindingCount.MultipleBindingsAvailable:default:if(Ee.isArray())return Dt;var Ge=yt.getServiceIdentifierAsString(rt),Ue=gt.AMBIGUOUS_MATCH+" "+Ge;throw Ue+=yt.listRegisteredBindingsForServiceIdentifier(ge,Ge,be),new Error(Ue)}}function le(rt,Dt,Ee,ge,Ge,Ue){var xe,Ke;if(Ge===null){xe=b(rt,Dt,ge,null,Ue),Ke=new ot.Request(Ee,ge,null,xe,Ue);var Lt=new et.Plan(ge,Ke);ge.addPlan(Lt)}else xe=b(rt,Dt,ge,Ge,Ue),Ke=Ge.addChildRequest(Ue.serviceIdentifier,xe,Ue);xe.forEach(function(Jt){var ft=null;if(Ue.isArray())ft=Ke.addChildRequest(Jt.serviceIdentifier,Jt,Ue);else{if(Jt.cache)return;ft=Ke}if(Jt.type===k.BindingTypeEnum.Instance&&Jt.implementationType!==null){var St=_e.getDependencies(rt,Jt.implementationType);if(!ge.container.options.skipBaseClassChecks){var Y=_e.getBaseClassDependencyCount(rt,Jt.implementationType);if(St.length<Y){var mt=gt.ARGUMENTS_LENGTH_MISMATCH(_e.getFunctionName(Jt.implementationType));throw new Error(mt)}}St.forEach(function(se){le(rt,!1,se.serviceIdentifier,ge,ft,se)})}})}function be(rt,Dt){var Ee=[],ge=zt(rt);return ge.hasKey(Dt)?Ee=ge.get(Dt):rt.parent!==null&&(Ee=be(rt.parent,Dt)),Ee}function Me(rt,Dt,Ee,ge,Ge,Ue,xe,Ke){Ke===void 0&&(Ke=!1);var Lt=new J.Context(Dt),Jt=P(Ee,ge,Ge,"",Ue,xe);try{return le(rt,Ke,Ge,Lt,null,Jt),Lt}catch(ft){throw K.isStackOverflowExeption(ft)&&Lt.plan&&yt.circularDependencyToException(Lt.plan.rootRequest),ft}}Ot.plan=Me;function At(rt,Dt,Ee,ge){var Ge=new ut.Target(k.TargetTypeEnum.Variable,"",Dt,new pt.Metadata(Ee,ge)),Ue=new J.Context(rt),xe=new ot.Request(Dt,Ue,null,[],Ge);return xe}Ot.createMockRequest=At},83925:function(pn,Ot){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.QueryableString=void 0;var nt=function(){function kt(gt){this.str=gt}return kt.prototype.startsWith=function(gt){return this.str.indexOf(gt)===0},kt.prototype.endsWith=function(gt){var k="",Et=gt.split("").reverse().join("");return k=this.str.split("").reverse().join(""),this.startsWith.call({str:k},Et)},kt.prototype.contains=function(gt){return this.str.indexOf(gt)!==-1},kt.prototype.equals=function(gt){return this.str===gt},kt.prototype.value=function(){return this.str},kt}();Ot.QueryableString=nt},73630:function(pn,Ot,nt){"use strict";var kt=this&&this.__spreadArray||function(b,W){for(var le=0,be=W.length,Me=b.length;le<be;le++,Me++)b[Me]=W[le];return b};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.getFunctionName=Ot.getBaseClassDependencyCount=Ot.getDependencies=void 0;var gt=nt(70105),k=nt(52050),Et=nt(88795),K=nt(91193),yt=nt(80030);Object.defineProperty(Ot,"getFunctionName",{enumerable:!0,get:function(){return yt.getFunctionName}});var J=nt(79060);function pt(b,W){var le=yt.getFunctionName(W),be=et(b,le,W,!1);return be}Ot.getDependencies=pt;function et(b,W,le,be){var Me=b.getConstructorMetadata(le),At=Me.compilerGeneratedMetadata;if(At===void 0){var rt=k.MISSING_INJECTABLE_ANNOTATION+" "+W+".";throw new Error(rt)}var Dt=Me.userGeneratedMetadata,Ee=Object.keys(Dt),ge=le.length===0&&Ee.length>0,Ge=Ee.length>le.length,Ue=ge||Ge?Ee.length:le.length,xe=ot(be,W,At,Dt,Ue),Ke=ut(b,le),Lt=kt(kt([],xe),Ke);return Lt}function _e(b,W,le,be,Me){var At=Me[b.toString()]||[],rt=P(At),Dt=rt.unmanaged!==!0,Ee=be[b],ge=rt.inject||rt.multiInject;if(Ee=ge||Ee,Ee instanceof gt.LazyServiceIdentifer&&(Ee=Ee.unwrap()),Dt){var Ge=Ee===Object,Ue=Ee===Function,xe=Ee===void 0,Ke=Ge||Ue||xe;if(!W&&Ke){var Lt=k.MISSING_INJECT_ANNOTATION+" argument "+b+" in class "+le+".";throw new Error(Lt)}var Jt=new J.Target(Et.TargetTypeEnum.ConstructorArgument,rt.targetName,Ee);return Jt.metadata=At,Jt}return null}function ot(b,W,le,be,Me){for(var At=[],rt=0;rt<Me;rt++){var Dt=rt,Ee=_e(Dt,b,W,le,be);Ee!==null&&At.push(Ee)}return At}function ut(b,W){for(var le=b.getPropertiesMetadata(W),be=[],Me=Object.keys(le),At=0,rt=Me;At<rt.length;At++){var Dt=rt[At],Ee=le[Dt],ge=P(le[Dt]),Ge=ge.targetName||Dt,Ue=ge.inject||ge.multiInject,xe=new J.Target(Et.TargetTypeEnum.ClassProperty,Ge,Ue);xe.metadata=Ee,be.push(xe)}var Ke=Object.getPrototypeOf(W.prototype).constructor;if(Ke!==Object){var Lt=ut(b,Ke);be=kt(kt([],be),Lt)}return be}function zt(b,W){var le=Object.getPrototypeOf(W.prototype).constructor;if(le!==Object){var be=yt.getFunctionName(le),Me=et(b,be,le,!0),At=Me.map(function(Ee){return Ee.metadata.filter(function(ge){return ge.key===K.UNMANAGED_TAG})}),rt=[].concat.apply([],At).length,Dt=Me.length-rt;return Dt>0?Dt:zt(b,le)}else return 0}Ot.getBaseClassDependencyCount=zt;function P(b){var W={};return b.forEach(function(le){W[le.key.toString()]=le.value}),{inject:W[K.INJECT_TAG],multiInject:W[K.MULTI_INJECT_TAG],targetName:W[K.NAME_TAG],unmanaged:W[K.UNMANAGED_TAG]}}},13571:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.Request=void 0;var kt=nt(18576),gt=function(){function k(Et,K,yt,J,pt){this.id=kt.id(),this.serviceIdentifier=Et,this.parentContext=K,this.parentRequest=yt,this.target=pt,this.childRequests=[],this.bindings=Array.isArray(J)?J:[J],this.requestScope=yt===null?new Map:null}return k.prototype.addChildRequest=function(Et,K,yt){var J=new k(Et,this.parentContext,this,K,yt);return this.childRequests.push(J),J},k}();Ot.Request=gt},79060:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.Target=void 0;var kt=nt(91193),gt=nt(18576),k=nt(55650),Et=nt(83925),K=function(){function yt(J,pt,et,_e){this.id=gt.id(),this.type=J,this.serviceIdentifier=et,this.name=new Et.QueryableString(pt||""),this.metadata=new Array;var ot=null;typeof _e=="string"?ot=new k.Metadata(kt.NAMED_TAG,_e):_e instanceof k.Metadata&&(ot=_e),ot!==null&&this.metadata.push(ot)}return yt.prototype.hasTag=function(J){for(var pt=0,et=this.metadata;pt<et.length;pt++){var _e=et[pt];if(_e.key===J)return!0}return!1},yt.prototype.isArray=function(){return this.hasTag(kt.MULTI_INJECT_TAG)},yt.prototype.matchesArray=function(J){return this.matchesTag(kt.MULTI_INJECT_TAG)(J)},yt.prototype.isNamed=function(){return this.hasTag(kt.NAMED_TAG)},yt.prototype.isTagged=function(){return this.metadata.some(function(J){return kt.NON_CUSTOM_TAG_KEYS.every(function(pt){return J.key!==pt})})},yt.prototype.isOptional=function(){return this.matchesTag(kt.OPTIONAL_TAG)(!0)},yt.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter(function(J){return J.key===kt.NAMED_TAG})[0]:null},yt.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter(function(J){return kt.NON_CUSTOM_TAG_KEYS.every(function(pt){return J.key!==pt})}):null},yt.prototype.matchesNamedTag=function(J){return this.matchesTag(kt.NAMED_TAG)(J)},yt.prototype.matchesTag=function(J){var pt=this;return function(et){for(var _e=0,ot=pt.metadata;_e<ot.length;_e++){var ut=ot[_e];if(ut.key===J&&ut.value===et)return!0}return!1}},yt}();Ot.Target=K},10003:function(pn,Ot,nt){"use strict";var kt=this&&this.__spreadArray||function(et,_e){for(var ot=0,ut=_e.length,zt=et.length;ot<ut;ot++,zt++)et[zt]=_e[ot];return et};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.resolveInstance=void 0;var gt=nt(52050),k=nt(88795),Et=nt(91193);function K(et,_e,ot){var ut=_e.filter(function(P){return P.target!==null&&P.target.type===k.TargetTypeEnum.ClassProperty}),zt=ut.map(ot);return ut.forEach(function(P,b){var W="";W=P.target.name.value();var le=zt[b];et[W]=le}),et}function yt(et,_e){return new(et.bind.apply(et,kt([void 0],_e)))}function J(et,_e){if(Reflect.hasMetadata(Et.POST_CONSTRUCT,et)){var ot=Reflect.getMetadata(Et.POST_CONSTRUCT,et);try{_e[ot.value]()}catch(ut){throw new Error(gt.POST_CONSTRUCT_ERROR(et.name,ut.message))}}}function pt(et,_e,ot){var ut=null;if(_e.length>0){var zt=_e.filter(function(b){return b.target!==null&&b.target.type===k.TargetTypeEnum.ConstructorArgument}),P=zt.map(ot);ut=yt(et,P),ut=K(ut,_e,ot)}else ut=new et;return J(et,ut),ut}Ot.resolveInstance=pt},87536:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.resolve=void 0;var kt=nt(52050),gt=nt(88795),k=nt(83817),Et=nt(80030),K=nt(10003),yt=function(et,_e,ot){try{return ot()}catch(ut){throw k.isStackOverflowExeption(ut)?new Error(kt.CIRCULAR_DEPENDENCY_IN_FACTORY(et,_e.toString())):ut}},J=function(et){return function(_e){_e.parentContext.setCurrentRequest(_e);var ot=_e.bindings,ut=_e.childRequests,zt=_e.target&&_e.target.isArray(),P=!_e.parentRequest||!_e.parentRequest.target||!_e.target||!_e.parentRequest.target.matchesArray(_e.target.serviceIdentifier);if(zt&&P)return ut.map(function(At){var rt=J(et);return rt(At)});var b=null;if(_e.target.isOptional()&&ot.length===0)return;var W=ot[0],le=W.scope===gt.BindingScopeEnum.Singleton,be=W.scope===gt.BindingScopeEnum.Request;if(le&&W.activated)return W.cache;if(be&&et!==null&&et.has(W.id))return et.get(W.id);if(W.type===gt.BindingTypeEnum.ConstantValue)b=W.cache,W.activated=!0;else if(W.type===gt.BindingTypeEnum.Function)b=W.cache,W.activated=!0;else if(W.type===gt.BindingTypeEnum.Constructor)b=W.implementationType;else if(W.type===gt.BindingTypeEnum.DynamicValue&&W.dynamicValue!==null)b=yt("toDynamicValue",W.serviceIdentifier,function(){return W.dynamicValue(_e.parentContext)});else if(W.type===gt.BindingTypeEnum.Factory&&W.factory!==null)b=yt("toFactory",W.serviceIdentifier,function(){return W.factory(_e.parentContext)});else if(W.type===gt.BindingTypeEnum.Provider&&W.provider!==null)b=yt("toProvider",W.serviceIdentifier,function(){return W.provider(_e.parentContext)});else if(W.type===gt.BindingTypeEnum.Instance&&W.implementationType!==null)b=K.resolveInstance(W.implementationType,ut,J(et));else{var Me=Et.getServiceIdentifierAsString(_e.serviceIdentifier);throw new Error(kt.INVALID_BINDING_TYPE+" "+Me)}return typeof W.onActivation=="function"&&(b=W.onActivation(_e.parentContext,b)),le&&(W.cache=b,W.activated=!0),be&&et!==null&&!et.has(W.id)&&et.set(W.id,b),b}};function pt(et){var _e=J(et.plan.rootRequest.requestScope);return _e(et.plan.rootRequest)}Ot.resolve=pt},55404:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.BindingInSyntax=void 0;var kt=nt(88795),gt=nt(65408),k=function(){function Et(K){this._binding=K}return Et.prototype.inRequestScope=function(){return this._binding.scope=kt.BindingScopeEnum.Request,new gt.BindingWhenOnSyntax(this._binding)},Et.prototype.inSingletonScope=function(){return this._binding.scope=kt.BindingScopeEnum.Singleton,new gt.BindingWhenOnSyntax(this._binding)},Et.prototype.inTransientScope=function(){return this._binding.scope=kt.BindingScopeEnum.Transient,new gt.BindingWhenOnSyntax(this._binding)},Et}();Ot.BindingInSyntax=k},48971:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.BindingInWhenOnSyntax=void 0;var kt=nt(55404),gt=nt(37326),k=nt(64957),Et=function(){function K(yt){this._binding=yt,this._bindingWhenSyntax=new k.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new gt.BindingOnSyntax(this._binding),this._bindingInSyntax=new kt.BindingInSyntax(yt)}return K.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},K.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},K.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},K.prototype.when=function(yt){return this._bindingWhenSyntax.when(yt)},K.prototype.whenTargetNamed=function(yt){return this._bindingWhenSyntax.whenTargetNamed(yt)},K.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},K.prototype.whenTargetTagged=function(yt,J){return this._bindingWhenSyntax.whenTargetTagged(yt,J)},K.prototype.whenInjectedInto=function(yt){return this._bindingWhenSyntax.whenInjectedInto(yt)},K.prototype.whenParentNamed=function(yt){return this._bindingWhenSyntax.whenParentNamed(yt)},K.prototype.whenParentTagged=function(yt,J){return this._bindingWhenSyntax.whenParentTagged(yt,J)},K.prototype.whenAnyAncestorIs=function(yt){return this._bindingWhenSyntax.whenAnyAncestorIs(yt)},K.prototype.whenNoAncestorIs=function(yt){return this._bindingWhenSyntax.whenNoAncestorIs(yt)},K.prototype.whenAnyAncestorNamed=function(yt){return this._bindingWhenSyntax.whenAnyAncestorNamed(yt)},K.prototype.whenAnyAncestorTagged=function(yt,J){return this._bindingWhenSyntax.whenAnyAncestorTagged(yt,J)},K.prototype.whenNoAncestorNamed=function(yt){return this._bindingWhenSyntax.whenNoAncestorNamed(yt)},K.prototype.whenNoAncestorTagged=function(yt,J){return this._bindingWhenSyntax.whenNoAncestorTagged(yt,J)},K.prototype.whenAnyAncestorMatches=function(yt){return this._bindingWhenSyntax.whenAnyAncestorMatches(yt)},K.prototype.whenNoAncestorMatches=function(yt){return this._bindingWhenSyntax.whenNoAncestorMatches(yt)},K.prototype.onActivation=function(yt){return this._bindingOnSyntax.onActivation(yt)},K}();Ot.BindingInWhenOnSyntax=Et},37326:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.BindingOnSyntax=void 0;var kt=nt(64957),gt=function(){function k(Et){this._binding=Et}return k.prototype.onActivation=function(Et){return this._binding.onActivation=Et,new kt.BindingWhenSyntax(this._binding)},k}();Ot.BindingOnSyntax=gt},43085:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.BindingToSyntax=void 0;var kt=nt(52050),gt=nt(88795),k=nt(48971),Et=nt(65408),K=function(){function yt(J){this._binding=J}return yt.prototype.to=function(J){return this._binding.type=gt.BindingTypeEnum.Instance,this._binding.implementationType=J,new k.BindingInWhenOnSyntax(this._binding)},yt.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+kt.INVALID_TO_SELF_VALUE);var J=this._binding.serviceIdentifier;return this.to(J)},yt.prototype.toConstantValue=function(J){return this._binding.type=gt.BindingTypeEnum.ConstantValue,this._binding.cache=J,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=gt.BindingScopeEnum.Singleton,new Et.BindingWhenOnSyntax(this._binding)},yt.prototype.toDynamicValue=function(J){return this._binding.type=gt.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=J,this._binding.implementationType=null,new k.BindingInWhenOnSyntax(this._binding)},yt.prototype.toConstructor=function(J){return this._binding.type=gt.BindingTypeEnum.Constructor,this._binding.implementationType=J,this._binding.scope=gt.BindingScopeEnum.Singleton,new Et.BindingWhenOnSyntax(this._binding)},yt.prototype.toFactory=function(J){return this._binding.type=gt.BindingTypeEnum.Factory,this._binding.factory=J,this._binding.scope=gt.BindingScopeEnum.Singleton,new Et.BindingWhenOnSyntax(this._binding)},yt.prototype.toFunction=function(J){if(typeof J!="function")throw new Error(kt.INVALID_FUNCTION_BINDING);var pt=this.toConstantValue(J);return this._binding.type=gt.BindingTypeEnum.Function,this._binding.scope=gt.BindingScopeEnum.Singleton,pt},yt.prototype.toAutoFactory=function(J){return this._binding.type=gt.BindingTypeEnum.Factory,this._binding.factory=function(pt){var et=function(){return pt.container.get(J)};return et},this._binding.scope=gt.BindingScopeEnum.Singleton,new Et.BindingWhenOnSyntax(this._binding)},yt.prototype.toProvider=function(J){return this._binding.type=gt.BindingTypeEnum.Provider,this._binding.provider=J,this._binding.scope=gt.BindingScopeEnum.Singleton,new Et.BindingWhenOnSyntax(this._binding)},yt.prototype.toService=function(J){this.toDynamicValue(function(pt){return pt.container.get(J)})},yt}();Ot.BindingToSyntax=K},65408:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.BindingWhenOnSyntax=void 0;var kt=nt(37326),gt=nt(64957),k=function(){function Et(K){this._binding=K,this._bindingWhenSyntax=new gt.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new kt.BindingOnSyntax(this._binding)}return Et.prototype.when=function(K){return this._bindingWhenSyntax.when(K)},Et.prototype.whenTargetNamed=function(K){return this._bindingWhenSyntax.whenTargetNamed(K)},Et.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},Et.prototype.whenTargetTagged=function(K,yt){return this._bindingWhenSyntax.whenTargetTagged(K,yt)},Et.prototype.whenInjectedInto=function(K){return this._bindingWhenSyntax.whenInjectedInto(K)},Et.prototype.whenParentNamed=function(K){return this._bindingWhenSyntax.whenParentNamed(K)},Et.prototype.whenParentTagged=function(K,yt){return this._bindingWhenSyntax.whenParentTagged(K,yt)},Et.prototype.whenAnyAncestorIs=function(K){return this._bindingWhenSyntax.whenAnyAncestorIs(K)},Et.prototype.whenNoAncestorIs=function(K){return this._bindingWhenSyntax.whenNoAncestorIs(K)},Et.prototype.whenAnyAncestorNamed=function(K){return this._bindingWhenSyntax.whenAnyAncestorNamed(K)},Et.prototype.whenAnyAncestorTagged=function(K,yt){return this._bindingWhenSyntax.whenAnyAncestorTagged(K,yt)},Et.prototype.whenNoAncestorNamed=function(K){return this._bindingWhenSyntax.whenNoAncestorNamed(K)},Et.prototype.whenNoAncestorTagged=function(K,yt){return this._bindingWhenSyntax.whenNoAncestorTagged(K,yt)},Et.prototype.whenAnyAncestorMatches=function(K){return this._bindingWhenSyntax.whenAnyAncestorMatches(K)},Et.prototype.whenNoAncestorMatches=function(K){return this._bindingWhenSyntax.whenNoAncestorMatches(K)},Et.prototype.onActivation=function(K){return this._bindingOnSyntax.onActivation(K)},Et}();Ot.BindingWhenOnSyntax=k},64957:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.BindingWhenSyntax=void 0;var kt=nt(37326),gt=nt(18307),k=function(){function Et(K){this._binding=K}return Et.prototype.when=function(K){return this._binding.constraint=K,new kt.BindingOnSyntax(this._binding)},Et.prototype.whenTargetNamed=function(K){return this._binding.constraint=gt.namedConstraint(K),new kt.BindingOnSyntax(this._binding)},Et.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(K){var yt=K.target!==null&&!K.target.isNamed()&&!K.target.isTagged();return yt},new kt.BindingOnSyntax(this._binding)},Et.prototype.whenTargetTagged=function(K,yt){return this._binding.constraint=gt.taggedConstraint(K)(yt),new kt.BindingOnSyntax(this._binding)},Et.prototype.whenInjectedInto=function(K){return this._binding.constraint=function(yt){return gt.typeConstraint(K)(yt.parentRequest)},new kt.BindingOnSyntax(this._binding)},Et.prototype.whenParentNamed=function(K){return this._binding.constraint=function(yt){return gt.namedConstraint(K)(yt.parentRequest)},new kt.BindingOnSyntax(this._binding)},Et.prototype.whenParentTagged=function(K,yt){return this._binding.constraint=function(J){return gt.taggedConstraint(K)(yt)(J.parentRequest)},new kt.BindingOnSyntax(this._binding)},Et.prototype.whenAnyAncestorIs=function(K){return this._binding.constraint=function(yt){return gt.traverseAncerstors(yt,gt.typeConstraint(K))},new kt.BindingOnSyntax(this._binding)},Et.prototype.whenNoAncestorIs=function(K){return this._binding.constraint=function(yt){return!gt.traverseAncerstors(yt,gt.typeConstraint(K))},new kt.BindingOnSyntax(this._binding)},Et.prototype.whenAnyAncestorNamed=function(K){return this._binding.constraint=function(yt){return gt.traverseAncerstors(yt,gt.namedConstraint(K))},new kt.BindingOnSyntax(this._binding)},Et.prototype.whenNoAncestorNamed=function(K){return this._binding.constraint=function(yt){return!gt.traverseAncerstors(yt,gt.namedConstraint(K))},new kt.BindingOnSyntax(this._binding)},Et.prototype.whenAnyAncestorTagged=function(K,yt){return this._binding.constraint=function(J){return gt.traverseAncerstors(J,gt.taggedConstraint(K)(yt))},new kt.BindingOnSyntax(this._binding)},Et.prototype.whenNoAncestorTagged=function(K,yt){return this._binding.constraint=function(J){return!gt.traverseAncerstors(J,gt.taggedConstraint(K)(yt))},new kt.BindingOnSyntax(this._binding)},Et.prototype.whenAnyAncestorMatches=function(K){return this._binding.constraint=function(yt){return gt.traverseAncerstors(yt,K)},new kt.BindingOnSyntax(this._binding)},Et.prototype.whenNoAncestorMatches=function(K){return this._binding.constraint=function(yt){return!gt.traverseAncerstors(yt,K)},new kt.BindingOnSyntax(this._binding)},Et}();Ot.BindingWhenSyntax=k},18307:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.typeConstraint=Ot.namedConstraint=Ot.taggedConstraint=Ot.traverseAncerstors=void 0;var kt=nt(91193),gt=nt(55650),k=function(J,pt){var et=J.parentRequest;return et!==null?pt(et)?!0:k(et,pt):!1};Ot.traverseAncerstors=k;var Et=function(J){return function(pt){var et=function(_e){return _e!==null&&_e.target!==null&&_e.target.matchesTag(J)(pt)};return et.metaData=new gt.Metadata(J,pt),et}};Ot.taggedConstraint=Et;var K=Et(kt.NAMED_TAG);Ot.namedConstraint=K;var yt=function(J){return function(pt){var et=null;if(pt!==null)if(et=pt.bindings[0],typeof J=="string"){var _e=et.serviceIdentifier;return _e===J}else{var ot=pt.bindings[0].implementationType;return J===ot}return!1}};Ot.typeConstraint=yt},55605:function(pn,Ot){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.multiBindToService=void 0;var nt=function(kt){return function(gt){return function(){for(var k=[],Et=0;Et<arguments.length;Et++)k[Et]=arguments[Et];return k.forEach(function(K){return kt.bind(K).toService(gt)})}}};Ot.multiBindToService=nt},83817:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.isStackOverflowExeption=void 0;var kt=nt(52050);function gt(k){return k instanceof RangeError||k.message===kt.STACK_OVERFLOW}Ot.isStackOverflowExeption=gt},18576:function(pn,Ot){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.id=void 0;var nt=0;function kt(){return nt++}Ot.id=kt},80030:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.circularDependencyToException=Ot.listMetadataForTarget=Ot.listRegisteredBindingsForServiceIdentifier=Ot.getServiceIdentifierAsString=Ot.getFunctionName=void 0;var kt=nt(52050);function gt(et){if(typeof et=="function"){var _e=et;return _e.name}else{if(typeof et=="symbol")return et.toString();var _e=et;return _e}}Ot.getServiceIdentifierAsString=gt;function k(et,_e,ot){var ut="",zt=ot(et,_e);return zt.length!==0&&(ut=`
|
|
Registered bindings:`,zt.forEach(function(P){var b="Object";P.implementationType!==null&&(b=pt(P.implementationType)),ut=ut+`
|
|
`+b,P.constraint.metaData&&(ut=ut+" - "+P.constraint.metaData)})),ut}Ot.listRegisteredBindingsForServiceIdentifier=k;function Et(et,_e){return et.parentRequest===null?!1:et.parentRequest.serviceIdentifier===_e?!0:Et(et.parentRequest,_e)}function K(et){function _e(ut,zt){zt===void 0&&(zt=[]);var P=gt(ut.serviceIdentifier);return zt.push(P),ut.parentRequest!==null?_e(ut.parentRequest,zt):zt}var ot=_e(et);return ot.reverse().join(" --> ")}function yt(et){et.childRequests.forEach(function(_e){if(Et(_e,_e.serviceIdentifier)){var ot=K(_e);throw new Error(kt.CIRCULAR_DEPENDENCY+" "+ot)}else yt(_e)})}Ot.circularDependencyToException=yt;function J(et,_e){if(_e.isTagged()||_e.isNamed()){var ot="",ut=_e.getNamedTag(),zt=_e.getCustomTags();return ut!==null&&(ot+=ut.toString()+`
|
|
`),zt!==null&&zt.forEach(function(P){ot+=P.toString()+`
|
|
`})," "+et+`
|
|
`+et+" - "+ot}else return" "+et}Ot.listMetadataForTarget=J;function pt(et){if(et.name)return et.name;var _e=et.toString(),ot=_e.match(/^function\s*([^\s(]+)/);return ot?ot[1]:"Anonymous function: "+_e}Ot.getFunctionName=pt},78962:function(pn){"use strict";pn.exports=nt,pn.exports.default=nt;var Ot=1e20;function nt(K,yt,J,pt,et,_e){this.fontSize=K||24,this.buffer=yt===void 0?3:yt,this.cutoff=pt||.25,this.fontFamily=et||"sans-serif",this.fontWeight=_e||"normal",this.radius=J||8;var ot=this.size=this.fontSize+this.buffer*2,ut=ot+this.buffer*2,zt=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0;zt?this.canvas=my.createOffscreenCanvas(ot,ot,"2d"):(this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=ot),this.ctx=this.canvas.getContext("2d",{willReadFrequently:!0}),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textAlign="left",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(ut*ut),this.gridInner=new Float64Array(ut*ut),this.f=new Float64Array(ut),this.z=new Float64Array(ut+1),this.v=new Uint16Array(ut),this.useMetrics=this.ctx.measureText("A").actualBoundingBoxLeft!==void 0,zt?this.middle=Math.round(ot/2*1):this.middle=Math.round(ot/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function kt(K,yt,J,pt,et,_e,ot){_e.fill(Ot,0,yt*J),ot.fill(0,0,yt*J);for(var ut=(yt-pt)/2,zt=0;zt<et;zt++)for(var P=0;P<pt;P++){var b=(zt+ut)*yt+P+ut,W=K.data[4*(zt*pt+P)+3]/255;if(W===1)_e[b]=0,ot[b]=Ot;else if(W===0)_e[b]=Ot,ot[b]=0;else{var le=Math.max(0,.5-W),be=Math.max(0,W-.5);_e[b]=le*le,ot[b]=be*be}}}function gt(K,yt,J,pt,et,_e,ot){for(var ut=0;ut<yt*J;ut++){var zt=Math.sqrt(pt[ut])-Math.sqrt(et[ut]);K[ut]=Math.round(255-255*(zt/_e+ot))}}nt.prototype._draw=function(K,yt){var J=this.ctx.measureText(K),pt=J.width,et=2*this.buffer,_e,ot,ut,zt,P,b,W,le;yt&&this.useMetrics?(P=Math.floor(J.actualBoundingBoxAscent),le=this.buffer+Math.ceil(J.actualBoundingBoxAscent),b=this.buffer,W=this.buffer,ot=Math.min(this.size,Math.ceil(J.actualBoundingBoxRight-J.actualBoundingBoxLeft)),zt=Math.min(this.size-b,Math.ceil(J.actualBoundingBoxAscent+J.actualBoundingBoxDescent)),_e=ot+et,ut=zt+et,this.ctx.textBaseline="alphabetic"):(_e=ot=this.size,ut=zt=this.size,P=19*this.fontSize/24,b=W=0,le=this.middle,this.ctx.textBaseline="middle");var be;ot&&zt&&(this.ctx.clearRect(W,b,ot,zt),this.ctx.fillText(K,this.buffer,le),be=this.ctx.getImageData(W,b,ot,zt));var Me=new Uint8ClampedArray(_e*ut);return kt(be,_e,ut,ot,zt,this.gridOuter,this.gridInner),k(this.gridOuter,_e,ut,this.f,this.v,this.z),k(this.gridInner,_e,ut,this.f,this.v,this.z),gt(Me,_e,ut,this.gridOuter,this.gridInner,this.radius,this.cutoff),{data:Me,metrics:{width:ot,height:zt,sdfWidth:_e,sdfHeight:ut,top:P,left:0,advance:pt}}},nt.prototype.draw=function(K){return this._draw(K,!1).data},nt.prototype.drawWithMetrics=function(K){return this._draw(K,!0)};function k(K,yt,J,pt,et,_e){for(var ot=0;ot<yt;ot++)Et(K,ot,yt,J,pt,et,_e);for(var ut=0;ut<J;ut++)Et(K,ut*yt,1,yt,pt,et,_e)}function Et(K,yt,J,pt,et,_e,ot){var ut,zt,P,b;for(_e[0]=0,ot[0]=-Ot,ot[1]=Ot,ut=0;ut<pt;ut++)et[ut]=K[yt+ut*J];for(ut=1,zt=0,P=0;ut<pt;ut++){do b=_e[zt],P=(et[ut]-et[b]+ut*ut-b*b)/(ut-b)/2;while(P<=ot[zt]&&--zt>-1);zt++,_e[zt]=ut,ot[zt]=P,ot[zt+1]=Ot}for(ut=0,zt=0;ut<pt;ut++){for(;ot[zt+1]<ut;)zt++;b=_e[zt],K[yt+ut*J]=et[b]+(ut-b)*(ut-b)}}},34306:function(pn,Ot,nt){"use strict";nt.r(Ot),nt.d(Ot,{Function:function(){return ja},Interpreter:function(){return js},default:function(){return Dc},evaluate:function(){return Zu},vm:function(){return kt}});var kt={};nt.r(kt),nt.d(kt,{Script:function(){return Cs},compileFunction:function(){return qc},createContext:function(){return Rc},runInContext:function(){return Tu},runInNewContext:function(){return Zl}});var gt={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},k="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Et={5:k,"5module":k+" export import",6:k+" const class extends export import super"},K=/^in(stanceof)?$/,yt="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",J="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F",pt=new RegExp("["+yt+"]"),et=new RegExp("["+yt+J+"]");yt=J=null;var _e=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],ot=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function ut(D,X){for(var Mt=65536,it=0;it<X.length;it+=2){if(Mt+=X[it],Mt>D)return!1;if(Mt+=X[it+1],Mt>=D)return!0}}function zt(D,X){return D<65?D===36:D<91?!0:D<97?D===95:D<123?!0:D<=65535?D>=170&&pt.test(String.fromCharCode(D)):X===!1?!1:ut(D,_e)}function P(D,X){return D<48?D===36:D<58?!0:D<65?!1:D<91?!0:D<97?D===95:D<123?!0:D<=65535?D>=170&&et.test(String.fromCharCode(D)):X===!1?!1:ut(D,_e)||ut(D,ot)}var b=function(X,Mt){Mt===void 0&&(Mt={}),this.label=X,this.keyword=Mt.keyword,this.beforeExpr=!!Mt.beforeExpr,this.startsExpr=!!Mt.startsExpr,this.isLoop=!!Mt.isLoop,this.isAssign=!!Mt.isAssign,this.prefix=!!Mt.prefix,this.postfix=!!Mt.postfix,this.binop=Mt.binop||null,this.updateContext=null};function W(D,X){return new b(D,{beforeExpr:!0,binop:X})}var le={beforeExpr:!0},be={startsExpr:!0},Me={};function At(D,X){return X===void 0&&(X={}),X.keyword=D,Me[D]=new b(D,X)}var rt={num:new b("num",be),regexp:new b("regexp",be),string:new b("string",be),name:new b("name",be),eof:new b("eof"),bracketL:new b("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new b("]"),braceL:new b("{",{beforeExpr:!0,startsExpr:!0}),braceR:new b("}"),parenL:new b("(",{beforeExpr:!0,startsExpr:!0}),parenR:new b(")"),comma:new b(",",le),semi:new b(";",le),colon:new b(":",le),dot:new b("."),question:new b("?",le),questionDot:new b("?."),arrow:new b("=>",le),template:new b("template"),invalidTemplate:new b("invalidTemplate"),ellipsis:new b("...",le),backQuote:new b("`",be),dollarBraceL:new b("${",{beforeExpr:!0,startsExpr:!0}),eq:new b("=",{beforeExpr:!0,isAssign:!0}),assign:new b("_=",{beforeExpr:!0,isAssign:!0}),incDec:new b("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new b("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:W("||",1),logicalAND:W("&&",2),bitwiseOR:W("|",3),bitwiseXOR:W("^",4),bitwiseAND:W("&",5),equality:W("==/!=/===/!==",6),relational:W("</>/<=/>=",7),bitShift:W("<</>>/>>>",8),plusMin:new b("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:W("%",10),star:W("*",10),slash:W("/",10),starstar:new b("**",{beforeExpr:!0}),coalesce:W("??",1),_break:At("break"),_case:At("case",le),_catch:At("catch"),_continue:At("continue"),_debugger:At("debugger"),_default:At("default",le),_do:At("do",{isLoop:!0,beforeExpr:!0}),_else:At("else",le),_finally:At("finally"),_for:At("for",{isLoop:!0}),_function:At("function",be),_if:At("if"),_return:At("return",le),_switch:At("switch"),_throw:At("throw",le),_try:At("try"),_var:At("var"),_const:At("const"),_while:At("while",{isLoop:!0}),_with:At("with"),_new:At("new",{beforeExpr:!0,startsExpr:!0}),_this:At("this",be),_super:At("super",be),_class:At("class",be),_extends:At("extends",le),_export:At("export"),_import:At("import",be),_null:At("null",be),_true:At("true",be),_false:At("false",be),_in:At("in",{beforeExpr:!0,binop:7}),_instanceof:At("instanceof",{beforeExpr:!0,binop:7}),_typeof:At("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:At("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:At("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Dt=/\r\n?|\n|\u2028|\u2029/,Ee=new RegExp(Dt.source,"g");function ge(D,X){return D===10||D===13||!X&&(D===8232||D===8233)}var Ge=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Ue=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,xe=Object.prototype,Ke=xe.hasOwnProperty,Lt=xe.toString;function Jt(D,X){return Ke.call(D,X)}var ft=Array.isArray||function(D){return Lt.call(D)==="[object Array]"};function St(D){return new RegExp("^(?:"+D.replace(/ /g,"|")+")$")}var Y=function(X,Mt){this.line=X,this.column=Mt};Y.prototype.offset=function(X){return new Y(this.line,this.column+X)};var mt=function(X,Mt,it){this.start=Mt,this.end=it,X.sourceFile!==null&&(this.source=X.sourceFile)};function se(D,X){for(var Mt=1,it=0;;){Ee.lastIndex=it;var fe=Ee.exec(D);if(fe&&fe.index<X)++Mt,it=fe.index+fe[0].length;else return new Y(Mt,X-it)}}var ke={ecmaVersion:10,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1};function Le(D){var X={};for(var Mt in ke)X[Mt]=D&&Jt(D,Mt)?D[Mt]:ke[Mt];if(X.ecmaVersion>=2015&&(X.ecmaVersion-=2009),X.allowReserved==null&&(X.allowReserved=X.ecmaVersion<5),ft(X.onToken)){var it=X.onToken;X.onToken=function(fe){return it.push(fe)}}return ft(X.onComment)&&(X.onComment=Be(X,X.onComment)),X}function Be(D,X){return function(Mt,it,fe,He,br,Ur){var Nr={type:Mt?"Block":"Line",value:it,start:fe,end:He};D.locations&&(Nr.loc=new mt(this,br,Ur)),D.ranges&&(Nr.range=[fe,He]),X.push(Nr)}}var Bt=1,ee=2,me=Bt|ee,Yt=4,qe=8,vr=16,ie=32,qt=64,bt=128;function Xt(D,X){return ee|(D?Yt:0)|(X?qe:0)}var $t=0,xt=1,wt=2,ue=3,Ie=4,Ne=5,Zt=function(X,Mt,it){this.options=X=Le(X),this.sourceFile=X.sourceFile,this.keywords=St(Et[X.ecmaVersion>=6?6:X.sourceType==="module"?"5module":5]);var fe="";if(X.allowReserved!==!0){for(var He=X.ecmaVersion;!(fe=gt[He]);He--);X.sourceType==="module"&&(fe+=" await")}this.reservedWords=St(fe);var br=(fe?fe+" ":"")+gt.strict;this.reservedWordsStrict=St(br),this.reservedWordsStrictBind=St(br+" "+gt.strictBind),this.input=String(Mt),this.containsEsc=!1,it?(this.pos=it,this.lineStart=this.input.lastIndexOf(`
|
|
`,it-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Dt).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=rt.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=X.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports={},this.pos===0&&X.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Bt),this.regexpState=null},Ct={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0}};Zt.prototype.parse=function(){var X=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(X)},Ct.inFunction.get=function(){return(this.currentVarScope().flags&ee)>0},Ct.inGenerator.get=function(){return(this.currentVarScope().flags&qe)>0},Ct.inAsync.get=function(){return(this.currentVarScope().flags&Yt)>0},Ct.allowSuper.get=function(){return(this.currentThisScope().flags&qt)>0},Ct.allowDirectSuper.get=function(){return(this.currentThisScope().flags&bt)>0},Ct.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Zt.prototype.inNonArrowFunction=function(){return(this.currentThisScope().flags&ee)>0},Zt.extend=function(){for(var X=[],Mt=arguments.length;Mt--;)X[Mt]=arguments[Mt];for(var it=this,fe=0;fe<X.length;fe++)it=X[fe](it);return it},Zt.parse=function(X,Mt){return new this(Mt,X).parse()},Zt.parseExpressionAt=function(X,Mt,it){var fe=new this(it,X,Mt);return fe.nextToken(),fe.parseExpression()},Zt.tokenizer=function(X,Mt){return new this(Mt,X)},Object.defineProperties(Zt.prototype,Ct);var Tt=Zt.prototype,Nt=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;Tt.strictDirective=function(D){for(;;){Ue.lastIndex=D,D+=Ue.exec(this.input)[0].length;var X=Nt.exec(this.input.slice(D));if(!X)return!1;if((X[1]||X[2])==="use strict"){Ue.lastIndex=D+X[0].length;var Mt=Ue.exec(this.input),it=Mt.index+Mt[0].length,fe=this.input.charAt(it);return fe===";"||fe==="}"||Dt.test(Mt[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(fe)||fe==="!"&&this.input.charAt(it+1)==="=")}D+=X[0].length,Ue.lastIndex=D,D+=Ue.exec(this.input)[0].length,this.input[D]===";"&&D++}},Tt.eat=function(D){return this.type===D?(this.next(),!0):!1},Tt.isContextual=function(D){return this.type===rt.name&&this.value===D&&!this.containsEsc},Tt.eatContextual=function(D){return this.isContextual(D)?(this.next(),!0):!1},Tt.expectContextual=function(D){this.eatContextual(D)||this.unexpected()},Tt.canInsertSemicolon=function(){return this.type===rt.eof||this.type===rt.braceR||Dt.test(this.input.slice(this.lastTokEnd,this.start))},Tt.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Tt.semicolon=function(){!this.eat(rt.semi)&&!this.insertSemicolon()&&this.unexpected()},Tt.afterTrailingComma=function(D,X){if(this.type===D)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),X||this.next(),!0},Tt.expect=function(D){this.eat(D)||this.unexpected()},Tt.unexpected=function(D){this.raise(D!=null?D:this.start,"Unexpected token")};function tt(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}Tt.checkPatternErrors=function(D,X){if(D){D.trailingComma>-1&&this.raiseRecoverable(D.trailingComma,"Comma is not permitted after the rest element");var Mt=X?D.parenthesizedAssign:D.parenthesizedBind;Mt>-1&&this.raiseRecoverable(Mt,"Parenthesized pattern")}},Tt.checkExpressionErrors=function(D,X){if(!D)return!1;var Mt=D.shorthandAssign,it=D.doubleProto;if(!X)return Mt>=0||it>=0;Mt>=0&&this.raise(Mt,"Shorthand property assignments are valid only in destructuring patterns"),it>=0&&this.raiseRecoverable(it,"Redefinition of __proto__ property")},Tt.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},Tt.isSimpleAssignTarget=function(D){return D.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(D.expression):D.type==="Identifier"||D.type==="MemberExpression"};var vt=Zt.prototype;vt.parseTopLevel=function(D){var X={};for(D.body||(D.body=[]);this.type!==rt.eof;){var Mt=this.parseStatement(null,!0,X);D.body.push(Mt)}if(this.inModule)for(var it=0,fe=Object.keys(this.undefinedExports);it<fe.length;it+=1){var He=fe[it];this.raiseRecoverable(this.undefinedExports[He].start,"Export '"+He+"' is not defined")}return this.adaptDirectivePrologue(D.body),this.next(),D.sourceType=this.options.sourceType,this.finishNode(D,"Program")};var Ht={kind:"loop"},he={kind:"switch"};vt.isLet=function(D){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;Ue.lastIndex=this.pos;var X=Ue.exec(this.input),Mt=this.pos+X[0].length,it=this.input.charCodeAt(Mt);if(it===91)return!0;if(D)return!1;if(it===123)return!0;if(zt(it,!0)){for(var fe=Mt+1;P(this.input.charCodeAt(fe),!0);)++fe;var He=this.input.slice(Mt,fe);if(!K.test(He))return!0}return!1},vt.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Ue.lastIndex=this.pos;var D=Ue.exec(this.input),X=this.pos+D[0].length;return!Dt.test(this.input.slice(this.pos,X))&&this.input.slice(X,X+8)==="function"&&(X+8===this.input.length||!P(this.input.charAt(X+8)))},vt.parseStatement=function(D,X,Mt){var it=this.type,fe=this.startNode(),He;switch(this.isLet(D)&&(it=rt._var,He="let"),it){case rt._break:case rt._continue:return this.parseBreakContinueStatement(fe,it.keyword);case rt._debugger:return this.parseDebuggerStatement(fe);case rt._do:return this.parseDoStatement(fe);case rt._for:return this.parseForStatement(fe);case rt._function:return D&&(this.strict||D!=="if"&&D!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(fe,!1,!D);case rt._class:return D&&this.unexpected(),this.parseClass(fe,!0);case rt._if:return this.parseIfStatement(fe);case rt._return:return this.parseReturnStatement(fe);case rt._switch:return this.parseSwitchStatement(fe);case rt._throw:return this.parseThrowStatement(fe);case rt._try:return this.parseTryStatement(fe);case rt._const:case rt._var:return He=He||this.value,D&&He!=="var"&&this.unexpected(),this.parseVarStatement(fe,He);case rt._while:return this.parseWhileStatement(fe);case rt._with:return this.parseWithStatement(fe);case rt.braceL:return this.parseBlock(!0,fe);case rt.semi:return this.parseEmptyStatement(fe);case rt._export:case rt._import:if(this.options.ecmaVersion>10&&it===rt._import){Ue.lastIndex=this.pos;var br=Ue.exec(this.input),Ur=this.pos+br[0].length,Nr=this.input.charCodeAt(Ur);if(Nr===40||Nr===46)return this.parseExpressionStatement(fe,this.parseExpression())}return this.options.allowImportExportEverywhere||(X||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),it===rt._import?this.parseImport(fe):this.parseExport(fe,Mt);default:if(this.isAsyncFunction())return D&&this.unexpected(),this.next(),this.parseFunctionStatement(fe,!0,!D);var An=this.value,Hn=this.parseExpression();return it===rt.name&&Hn.type==="Identifier"&&this.eat(rt.colon)?this.parseLabeledStatement(fe,An,Hn,D):this.parseExpressionStatement(fe,Hn)}},vt.parseBreakContinueStatement=function(D,X){var Mt=X==="break";this.next(),this.eat(rt.semi)||this.insertSemicolon()?D.label=null:this.type!==rt.name?this.unexpected():(D.label=this.parseIdent(),this.semicolon());for(var it=0;it<this.labels.length;++it){var fe=this.labels[it];if((D.label==null||fe.name===D.label.name)&&(fe.kind!=null&&(Mt||fe.kind==="loop")||D.label&&Mt))break}return it===this.labels.length&&this.raise(D.start,"Unsyntactic "+X),this.finishNode(D,Mt?"BreakStatement":"ContinueStatement")},vt.parseDebuggerStatement=function(D){return this.next(),this.semicolon(),this.finishNode(D,"DebuggerStatement")},vt.parseDoStatement=function(D){return this.next(),this.labels.push(Ht),D.body=this.parseStatement("do"),this.labels.pop(),this.expect(rt._while),D.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(rt.semi):this.semicolon(),this.finishNode(D,"DoWhileStatement")},vt.parseForStatement=function(D){this.next();var X=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Ht),this.enterScope(0),this.expect(rt.parenL),this.type===rt.semi)return X>-1&&this.unexpected(X),this.parseFor(D,null);var Mt=this.isLet();if(this.type===rt._var||this.type===rt._const||Mt){var it=this.startNode(),fe=Mt?"let":this.value;return this.next(),this.parseVar(it,!0,fe),this.finishNode(it,"VariableDeclaration"),(this.type===rt._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&it.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===rt._in?X>-1&&this.unexpected(X):D.await=X>-1),this.parseForIn(D,it)):(X>-1&&this.unexpected(X),this.parseFor(D,it))}var He=new tt,br=this.parseExpression(!0,He);return this.type===rt._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===rt._in?X>-1&&this.unexpected(X):D.await=X>-1),this.toAssignable(br,!1,He),this.checkLVal(br),this.parseForIn(D,br)):(this.checkExpressionErrors(He,!0),X>-1&&this.unexpected(X),this.parseFor(D,br))},vt.parseFunctionStatement=function(D,X,Mt){return this.next(),this.parseFunction(D,Te|(Mt?0:We),!1,X)},vt.parseIfStatement=function(D){return this.next(),D.test=this.parseParenExpression(),D.consequent=this.parseStatement("if"),D.alternate=this.eat(rt._else)?this.parseStatement("if"):null,this.finishNode(D,"IfStatement")},vt.parseReturnStatement=function(D){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(rt.semi)||this.insertSemicolon()?D.argument=null:(D.argument=this.parseExpression(),this.semicolon()),this.finishNode(D,"ReturnStatement")},vt.parseSwitchStatement=function(D){this.next(),D.discriminant=this.parseParenExpression(),D.cases=[],this.expect(rt.braceL),this.labels.push(he),this.enterScope(0);for(var X,Mt=!1;this.type!==rt.braceR;)if(this.type===rt._case||this.type===rt._default){var it=this.type===rt._case;X&&this.finishNode(X,"SwitchCase"),D.cases.push(X=this.startNode()),X.consequent=[],this.next(),it?X.test=this.parseExpression():(Mt&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),Mt=!0,X.test=null),this.expect(rt.colon)}else X||this.unexpected(),X.consequent.push(this.parseStatement(null));return this.exitScope(),X&&this.finishNode(X,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(D,"SwitchStatement")},vt.parseThrowStatement=function(D){return this.next(),Dt.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),D.argument=this.parseExpression(),this.semicolon(),this.finishNode(D,"ThrowStatement")};var jt=[];vt.parseTryStatement=function(D){if(this.next(),D.block=this.parseBlock(),D.handler=null,this.type===rt._catch){var X=this.startNode();if(this.next(),this.eat(rt.parenL)){X.param=this.parseBindingAtom();var Mt=X.param.type==="Identifier";this.enterScope(Mt?ie:0),this.checkLVal(X.param,Mt?Ie:wt),this.expect(rt.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),X.param=null,this.enterScope(0);X.body=this.parseBlock(!1),this.exitScope(),D.handler=this.finishNode(X,"CatchClause")}return D.finalizer=this.eat(rt._finally)?this.parseBlock():null,!D.handler&&!D.finalizer&&this.raise(D.start,"Missing catch or finally clause"),this.finishNode(D,"TryStatement")},vt.parseVarStatement=function(D,X){return this.next(),this.parseVar(D,!1,X),this.semicolon(),this.finishNode(D,"VariableDeclaration")},vt.parseWhileStatement=function(D){return this.next(),D.test=this.parseParenExpression(),this.labels.push(Ht),D.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(D,"WhileStatement")},vt.parseWithStatement=function(D){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),D.object=this.parseParenExpression(),D.body=this.parseStatement("with"),this.finishNode(D,"WithStatement")},vt.parseEmptyStatement=function(D){return this.next(),this.finishNode(D,"EmptyStatement")},vt.parseLabeledStatement=function(D,X,Mt,it){for(var fe=0,He=this.labels;fe<He.length;fe+=1){var br=He[fe];br.name===X&&this.raise(Mt.start,"Label '"+X+"' is already declared")}for(var Ur=this.type.isLoop?"loop":this.type===rt._switch?"switch":null,Nr=this.labels.length-1;Nr>=0;Nr--){var An=this.labels[Nr];if(An.statementStart===D.start)An.statementStart=this.start,An.kind=Ur;else break}return this.labels.push({name:X,kind:Ur,statementStart:this.start}),D.body=this.parseStatement(it?it.indexOf("label")===-1?it+"label":it:"label"),this.labels.pop(),D.label=Mt,this.finishNode(D,"LabeledStatement")},vt.parseExpressionStatement=function(D,X){return D.expression=X,this.semicolon(),this.finishNode(D,"ExpressionStatement")},vt.parseBlock=function(D,X,Mt){for(D===void 0&&(D=!0),X===void 0&&(X=this.startNode()),X.body=[],this.expect(rt.braceL),D&&this.enterScope(0);this.type!==rt.braceR;){var it=this.parseStatement(null);X.body.push(it)}return Mt&&(this.strict=!1),this.next(),D&&this.exitScope(),this.finishNode(X,"BlockStatement")},vt.parseFor=function(D,X){return D.init=X,this.expect(rt.semi),D.test=this.type===rt.semi?null:this.parseExpression(),this.expect(rt.semi),D.update=this.type===rt.parenR?null:this.parseExpression(),this.expect(rt.parenR),D.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(D,"ForStatement")},vt.parseForIn=function(D,X){var Mt=this.type===rt._in;return this.next(),X.type==="VariableDeclaration"&&X.declarations[0].init!=null&&(!Mt||this.options.ecmaVersion<8||this.strict||X.kind!=="var"||X.declarations[0].id.type!=="Identifier")?this.raise(X.start,(Mt?"for-in":"for-of")+" loop variable declaration may not have an initializer"):X.type==="AssignmentPattern"&&this.raise(X.start,"Invalid left-hand side in for-loop"),D.left=X,D.right=Mt?this.parseExpression():this.parseMaybeAssign(),this.expect(rt.parenR),D.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(D,Mt?"ForInStatement":"ForOfStatement")},vt.parseVar=function(D,X,Mt){for(D.declarations=[],D.kind=Mt;;){var it=this.startNode();if(this.parseVarId(it,Mt),this.eat(rt.eq)?it.init=this.parseMaybeAssign(X):Mt==="const"&&!(this.type===rt._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():it.id.type!=="Identifier"&&!(X&&(this.type===rt._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):it.init=null,D.declarations.push(this.finishNode(it,"VariableDeclarator")),!this.eat(rt.comma))break}return D},vt.parseVarId=function(D,X){D.id=this.parseBindingAtom(),this.checkLVal(D.id,X==="var"?xt:wt,!1)};var Te=1,We=2,Qe=4;vt.parseFunction=function(D,X,Mt,it){this.initFunction(D),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!it)&&(this.type===rt.star&&X&We&&this.unexpected(),D.generator=this.eat(rt.star)),this.options.ecmaVersion>=8&&(D.async=!!it),X&Te&&(D.id=X&Qe&&this.type!==rt.name?null:this.parseIdent(),D.id&&!(X&We)&&this.checkLVal(D.id,this.strict||D.generator||D.async?this.treatFunctionsAsVar?xt:wt:ue));var fe=this.yieldPos,He=this.awaitPos,br=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Xt(D.async,D.generator)),X&Te||(D.id=this.type===rt.name?this.parseIdent():null),this.parseFunctionParams(D),this.parseFunctionBody(D,Mt,!1),this.yieldPos=fe,this.awaitPos=He,this.awaitIdentPos=br,this.finishNode(D,X&Te?"FunctionDeclaration":"FunctionExpression")},vt.parseFunctionParams=function(D){this.expect(rt.parenL),D.params=this.parseBindingList(rt.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},vt.parseClass=function(D,X){this.next();var Mt=this.strict;this.strict=!0,this.parseClassId(D,X),this.parseClassSuper(D);var it=this.startNode(),fe=!1;for(it.body=[],this.expect(rt.braceL);this.type!==rt.braceR;){var He=this.parseClassElement(D.superClass!==null);He&&(it.body.push(He),He.type==="MethodDefinition"&&He.kind==="constructor"&&(fe&&this.raise(He.start,"Duplicate constructor in the same class"),fe=!0))}return this.strict=Mt,this.next(),D.body=this.finishNode(it,"ClassBody"),this.finishNode(D,X?"ClassDeclaration":"ClassExpression")},vt.parseClassElement=function(D){var X=this;if(this.eat(rt.semi))return null;var Mt=this.startNode(),it=function(Nr,An){An===void 0&&(An=!1);var Hn=X.start,Ji=X.startLoc;return X.eatContextual(Nr)?X.type!==rt.parenL&&(!An||!X.canInsertSemicolon())?!0:(Mt.key&&X.unexpected(),Mt.computed=!1,Mt.key=X.startNodeAt(Hn,Ji),Mt.key.name=Nr,X.finishNode(Mt.key,"Identifier"),!1):!1};Mt.kind="method",Mt.static=it("static");var fe=this.eat(rt.star),He=!1;fe||(this.options.ecmaVersion>=8&&it("async",!0)?(He=!0,fe=this.options.ecmaVersion>=9&&this.eat(rt.star)):it("get")?Mt.kind="get":it("set")&&(Mt.kind="set")),Mt.key||this.parsePropertyName(Mt);var br=Mt.key,Ur=!1;return!Mt.computed&&!Mt.static&&(br.type==="Identifier"&&br.name==="constructor"||br.type==="Literal"&&br.value==="constructor")?(Mt.kind!=="method"&&this.raise(br.start,"Constructor can't have get/set modifier"),fe&&this.raise(br.start,"Constructor can't be a generator"),He&&this.raise(br.start,"Constructor can't be an async method"),Mt.kind="constructor",Ur=D):Mt.static&&br.type==="Identifier"&&br.name==="prototype"&&this.raise(br.start,"Classes may not have a static property named prototype"),this.parseClassMethod(Mt,fe,He,Ur),Mt.kind==="get"&&Mt.value.params.length!==0&&this.raiseRecoverable(Mt.value.start,"getter should have no params"),Mt.kind==="set"&&Mt.value.params.length!==1&&this.raiseRecoverable(Mt.value.start,"setter should have exactly one param"),Mt.kind==="set"&&Mt.value.params[0].type==="RestElement"&&this.raiseRecoverable(Mt.value.params[0].start,"Setter cannot use rest params"),Mt},vt.parseClassMethod=function(D,X,Mt,it){return D.value=this.parseMethod(X,Mt,it),this.finishNode(D,"MethodDefinition")},vt.parseClassId=function(D,X){this.type===rt.name?(D.id=this.parseIdent(),X&&this.checkLVal(D.id,wt,!1)):(X===!0&&this.unexpected(),D.id=null)},vt.parseClassSuper=function(D){D.superClass=this.eat(rt._extends)?this.parseExprSubscripts():null},vt.parseExport=function(D,X){if(this.next(),this.eat(rt.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(D.exported=this.parseIdent(!0),this.checkExport(X,D.exported.name,this.lastTokStart)):D.exported=null),this.expectContextual("from"),this.type!==rt.string&&this.unexpected(),D.source=this.parseExprAtom(),this.semicolon(),this.finishNode(D,"ExportAllDeclaration");if(this.eat(rt._default)){this.checkExport(X,"default",this.lastTokStart);var Mt;if(this.type===rt._function||(Mt=this.isAsyncFunction())){var it=this.startNode();this.next(),Mt&&this.next(),D.declaration=this.parseFunction(it,Te|Qe,!1,Mt)}else if(this.type===rt._class){var fe=this.startNode();D.declaration=this.parseClass(fe,"nullableID")}else D.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(D,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())D.declaration=this.parseStatement(null),D.declaration.type==="VariableDeclaration"?this.checkVariableExport(X,D.declaration.declarations):this.checkExport(X,D.declaration.id.name,D.declaration.id.start),D.specifiers=[],D.source=null;else{if(D.declaration=null,D.specifiers=this.parseExportSpecifiers(X),this.eatContextual("from"))this.type!==rt.string&&this.unexpected(),D.source=this.parseExprAtom();else{for(var He=0,br=D.specifiers;He<br.length;He+=1){var Ur=br[He];this.checkUnreserved(Ur.local),this.checkLocalExport(Ur.local)}D.source=null}this.semicolon()}return this.finishNode(D,"ExportNamedDeclaration")},vt.checkExport=function(D,X,Mt){D&&(Jt(D,X)&&this.raiseRecoverable(Mt,"Duplicate export '"+X+"'"),D[X]=!0)},vt.checkPatternExport=function(D,X){var Mt=X.type;if(Mt==="Identifier")this.checkExport(D,X.name,X.start);else if(Mt==="ObjectPattern")for(var it=0,fe=X.properties;it<fe.length;it+=1){var He=fe[it];this.checkPatternExport(D,He)}else if(Mt==="ArrayPattern")for(var br=0,Ur=X.elements;br<Ur.length;br+=1){var Nr=Ur[br];Nr&&this.checkPatternExport(D,Nr)}else Mt==="Property"?this.checkPatternExport(D,X.value):Mt==="AssignmentPattern"?this.checkPatternExport(D,X.left):Mt==="RestElement"?this.checkPatternExport(D,X.argument):Mt==="ParenthesizedExpression"&&this.checkPatternExport(D,X.expression)},vt.checkVariableExport=function(D,X){if(D)for(var Mt=0,it=X;Mt<it.length;Mt+=1){var fe=it[Mt];this.checkPatternExport(D,fe.id)}},vt.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},vt.parseExportSpecifiers=function(D){var X=[],Mt=!0;for(this.expect(rt.braceL);!this.eat(rt.braceR);){if(Mt)Mt=!1;else if(this.expect(rt.comma),this.afterTrailingComma(rt.braceR))break;var it=this.startNode();it.local=this.parseIdent(!0),it.exported=this.eatContextual("as")?this.parseIdent(!0):it.local,this.checkExport(D,it.exported.name,it.exported.start),X.push(this.finishNode(it,"ExportSpecifier"))}return X},vt.parseImport=function(D){return this.next(),this.type===rt.string?(D.specifiers=jt,D.source=this.parseExprAtom()):(D.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),D.source=this.type===rt.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(D,"ImportDeclaration")},vt.parseImportSpecifiers=function(){var D=[],X=!0;if(this.type===rt.name){var Mt=this.startNode();if(Mt.local=this.parseIdent(),this.checkLVal(Mt.local,wt),D.push(this.finishNode(Mt,"ImportDefaultSpecifier")),!this.eat(rt.comma))return D}if(this.type===rt.star){var it=this.startNode();return this.next(),this.expectContextual("as"),it.local=this.parseIdent(),this.checkLVal(it.local,wt),D.push(this.finishNode(it,"ImportNamespaceSpecifier")),D}for(this.expect(rt.braceL);!this.eat(rt.braceR);){if(X)X=!1;else if(this.expect(rt.comma),this.afterTrailingComma(rt.braceR))break;var fe=this.startNode();fe.imported=this.parseIdent(!0),this.eatContextual("as")?fe.local=this.parseIdent():(this.checkUnreserved(fe.imported),fe.local=fe.imported),this.checkLVal(fe.local,wt),D.push(this.finishNode(fe,"ImportSpecifier"))}return D},vt.adaptDirectivePrologue=function(D){for(var X=0;X<D.length&&this.isDirectiveCandidate(D[X]);++X)D[X].directive=D[X].expression.raw.slice(1,-1)},vt.isDirectiveCandidate=function(D){return D.type==="ExpressionStatement"&&D.expression.type==="Literal"&&typeof D.expression.value=="string"&&(this.input[D.start]==='"'||this.input[D.start]==="'")};var pr=Zt.prototype;pr.toAssignable=function(D,X,Mt){if(this.options.ecmaVersion>=6&&D)switch(D.type){case"Identifier":this.inAsync&&D.name==="await"&&this.raise(D.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":D.type="ObjectPattern",Mt&&this.checkPatternErrors(Mt,!0);for(var it=0,fe=D.properties;it<fe.length;it+=1){var He=fe[it];this.toAssignable(He,X),He.type==="RestElement"&&(He.argument.type==="ArrayPattern"||He.argument.type==="ObjectPattern")&&this.raise(He.argument.start,"Unexpected token")}break;case"Property":D.kind!=="init"&&this.raise(D.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(D.value,X);break;case"ArrayExpression":D.type="ArrayPattern",Mt&&this.checkPatternErrors(Mt,!0),this.toAssignableList(D.elements,X);break;case"SpreadElement":D.type="RestElement",this.toAssignable(D.argument,X),D.argument.type==="AssignmentPattern"&&this.raise(D.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":D.operator!=="="&&this.raise(D.left.end,"Only '=' operator can be used for specifying default value."),D.type="AssignmentPattern",delete D.operator,this.toAssignable(D.left,X);case"AssignmentPattern":break;case"ParenthesizedExpression":this.toAssignable(D.expression,X,Mt);break;case"ChainExpression":this.raiseRecoverable(D.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!X)break;default:this.raise(D.start,"Assigning to rvalue")}else Mt&&this.checkPatternErrors(Mt,!0);return D},pr.toAssignableList=function(D,X){for(var Mt=D.length,it=0;it<Mt;it++){var fe=D[it];fe&&this.toAssignable(fe,X)}if(Mt){var He=D[Mt-1];this.options.ecmaVersion===6&&X&&He&&He.type==="RestElement"&&He.argument.type!=="Identifier"&&this.unexpected(He.argument.start)}return D},pr.parseSpread=function(D){var X=this.startNode();return this.next(),X.argument=this.parseMaybeAssign(!1,D),this.finishNode(X,"SpreadElement")},pr.parseRestBinding=function(){var D=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==rt.name&&this.unexpected(),D.argument=this.parseBindingAtom(),this.finishNode(D,"RestElement")},pr.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case rt.bracketL:var D=this.startNode();return this.next(),D.elements=this.parseBindingList(rt.bracketR,!0,!0),this.finishNode(D,"ArrayPattern");case rt.braceL:return this.parseObj(!0)}return this.parseIdent()},pr.parseBindingList=function(D,X,Mt){for(var it=[],fe=!0;!this.eat(D);)if(fe?fe=!1:this.expect(rt.comma),X&&this.type===rt.comma)it.push(null);else{if(Mt&&this.afterTrailingComma(D))break;if(this.type===rt.ellipsis){var He=this.parseRestBinding();this.parseBindingListItem(He),it.push(He),this.type===rt.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(D);break}else{var br=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(br),it.push(br)}}return it},pr.parseBindingListItem=function(D){return D},pr.parseMaybeDefault=function(D,X,Mt){if(Mt=Mt||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(rt.eq))return Mt;var it=this.startNodeAt(D,X);return it.left=Mt,it.right=this.parseMaybeAssign(),this.finishNode(it,"AssignmentPattern")},pr.checkLVal=function(D,X,Mt){switch(X===void 0&&(X=$t),D.type){case"Identifier":X===wt&&D.name==="let"&&this.raiseRecoverable(D.start,"let is disallowed as a lexically bound name"),this.strict&&this.reservedWordsStrictBind.test(D.name)&&this.raiseRecoverable(D.start,(X?"Binding ":"Assigning to ")+D.name+" in strict mode"),Mt&&(Jt(Mt,D.name)&&this.raiseRecoverable(D.start,"Argument name clash"),Mt[D.name]=!0),X!==$t&&X!==Ne&&this.declareName(D.name,X,D.start);break;case"ChainExpression":this.raiseRecoverable(D.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":X&&this.raiseRecoverable(D.start,"Binding member expression");break;case"ObjectPattern":for(var it=0,fe=D.properties;it<fe.length;it+=1){var He=fe[it];this.checkLVal(He,X,Mt)}break;case"Property":this.checkLVal(D.value,X,Mt);break;case"ArrayPattern":for(var br=0,Ur=D.elements;br<Ur.length;br+=1){var Nr=Ur[br];Nr&&this.checkLVal(Nr,X,Mt)}break;case"AssignmentPattern":this.checkLVal(D.left,X,Mt);break;case"RestElement":this.checkLVal(D.argument,X,Mt);break;case"ParenthesizedExpression":this.checkLVal(D.expression,X,Mt);break;default:this.raise(D.start,(X?"Binding":"Assigning to")+" rvalue")}};var lr=Zt.prototype;lr.checkPropClash=function(D,X,Mt){if(!(this.options.ecmaVersion>=9&&D.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(D.computed||D.method||D.shorthand))){var it=D.key,fe;switch(it.type){case"Identifier":fe=it.name;break;case"Literal":fe=String(it.value);break;default:return}var He=D.kind;if(this.options.ecmaVersion>=6){fe==="__proto__"&&He==="init"&&(X.proto&&(Mt?Mt.doubleProto<0&&(Mt.doubleProto=it.start):this.raiseRecoverable(it.start,"Redefinition of __proto__ property")),X.proto=!0);return}fe="$"+fe;var br=X[fe];if(br){var Ur;He==="init"?Ur=this.strict&&br.init||br.get||br.set:Ur=br.init||br[He],Ur&&this.raiseRecoverable(it.start,"Redefinition of property")}else br=X[fe]={init:!1,get:!1,set:!1};br[He]=!0}},lr.parseExpression=function(D,X){var Mt=this.start,it=this.startLoc,fe=this.parseMaybeAssign(D,X);if(this.type===rt.comma){var He=this.startNodeAt(Mt,it);for(He.expressions=[fe];this.eat(rt.comma);)He.expressions.push(this.parseMaybeAssign(D,X));return this.finishNode(He,"SequenceExpression")}return fe},lr.parseMaybeAssign=function(D,X,Mt){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(D);this.exprAllowed=!1}var it=!1,fe=-1,He=-1;X?(fe=X.parenthesizedAssign,He=X.trailingComma,X.parenthesizedAssign=X.trailingComma=-1):(X=new tt,it=!0);var br=this.start,Ur=this.startLoc;(this.type===rt.parenL||this.type===rt.name)&&(this.potentialArrowAt=this.start);var Nr=this.parseMaybeConditional(D,X);if(Mt&&(Nr=Mt.call(this,Nr,br,Ur)),this.type.isAssign){var An=this.startNodeAt(br,Ur);return An.operator=this.value,An.left=this.type===rt.eq?this.toAssignable(Nr,!1,X):Nr,it||(X.parenthesizedAssign=X.trailingComma=X.doubleProto=-1),X.shorthandAssign>=An.left.start&&(X.shorthandAssign=-1),this.checkLVal(Nr),this.next(),An.right=this.parseMaybeAssign(D),this.finishNode(An,"AssignmentExpression")}else it&&this.checkExpressionErrors(X,!0);return fe>-1&&(X.parenthesizedAssign=fe),He>-1&&(X.trailingComma=He),Nr},lr.parseMaybeConditional=function(D,X){var Mt=this.start,it=this.startLoc,fe=this.parseExprOps(D,X);if(this.checkExpressionErrors(X))return fe;if(this.eat(rt.question)){var He=this.startNodeAt(Mt,it);return He.test=fe,He.consequent=this.parseMaybeAssign(),this.expect(rt.colon),He.alternate=this.parseMaybeAssign(D),this.finishNode(He,"ConditionalExpression")}return fe},lr.parseExprOps=function(D,X){var Mt=this.start,it=this.startLoc,fe=this.parseMaybeUnary(X,!1);return this.checkExpressionErrors(X)||fe.start===Mt&&fe.type==="ArrowFunctionExpression"?fe:this.parseExprOp(fe,Mt,it,-1,D)},lr.parseExprOp=function(D,X,Mt,it,fe){var He=this.type.binop;if(He!=null&&(!fe||this.type!==rt._in)&&He>it){var br=this.type===rt.logicalOR||this.type===rt.logicalAND,Ur=this.type===rt.coalesce;Ur&&(He=rt.logicalAND.binop);var Nr=this.value;this.next();var An=this.start,Hn=this.startLoc,Ji=this.parseExprOp(this.parseMaybeUnary(null,!1),An,Hn,He,fe),ka=this.buildBinary(X,Mt,D,Ji,Nr,br||Ur);return(br&&this.type===rt.coalesce||Ur&&(this.type===rt.logicalOR||this.type===rt.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(ka,X,Mt,it,fe)}return D},lr.buildBinary=function(D,X,Mt,it,fe,He){var br=this.startNodeAt(D,X);return br.left=Mt,br.operator=fe,br.right=it,this.finishNode(br,He?"LogicalExpression":"BinaryExpression")},lr.parseMaybeUnary=function(D,X){var Mt=this.start,it=this.startLoc,fe;if(this.isContextual("await")&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction))fe=this.parseAwait(),X=!0;else if(this.type.prefix){var He=this.startNode(),br=this.type===rt.incDec;He.operator=this.value,He.prefix=!0,this.next(),He.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(D,!0),br?this.checkLVal(He.argument):this.strict&&He.operator==="delete"&&He.argument.type==="Identifier"?this.raiseRecoverable(He.start,"Deleting local variable in strict mode"):X=!0,fe=this.finishNode(He,br?"UpdateExpression":"UnaryExpression")}else{if(fe=this.parseExprSubscripts(D),this.checkExpressionErrors(D))return fe;for(;this.type.postfix&&!this.canInsertSemicolon();){var Ur=this.startNodeAt(Mt,it);Ur.operator=this.value,Ur.prefix=!1,Ur.argument=fe,this.checkLVal(fe),this.next(),fe=this.finishNode(Ur,"UpdateExpression")}}return!X&&this.eat(rt.starstar)?this.buildBinary(Mt,it,fe,this.parseMaybeUnary(null,!1),"**",!1):fe},lr.parseExprSubscripts=function(D){var X=this.start,Mt=this.startLoc,it=this.parseExprAtom(D);if(it.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return it;var fe=this.parseSubscripts(it,X,Mt);return D&&fe.type==="MemberExpression"&&(D.parenthesizedAssign>=fe.start&&(D.parenthesizedAssign=-1),D.parenthesizedBind>=fe.start&&(D.parenthesizedBind=-1)),fe},lr.parseSubscripts=function(D,X,Mt,it){for(var fe=this.options.ecmaVersion>=8&&D.type==="Identifier"&&D.name==="async"&&this.lastTokEnd===D.end&&!this.canInsertSemicolon()&&D.end-D.start===5&&this.potentialArrowAt===D.start,He=!1;;){var br=this.parseSubscript(D,X,Mt,it,fe,He);if(br.optional&&(He=!0),br===D||br.type==="ArrowFunctionExpression"){if(He){var Ur=this.startNodeAt(X,Mt);Ur.expression=br,br=this.finishNode(Ur,"ChainExpression")}return br}D=br}},lr.parseSubscript=function(D,X,Mt,it,fe,He){var br=this.options.ecmaVersion>=11,Ur=br&&this.eat(rt.questionDot);it&&Ur&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var Nr=this.eat(rt.bracketL);if(Nr||Ur&&this.type!==rt.parenL&&this.type!==rt.backQuote||this.eat(rt.dot)){var An=this.startNodeAt(X,Mt);An.object=D,An.property=Nr?this.parseExpression():this.parseIdent(this.options.allowReserved!=="never"),An.computed=!!Nr,Nr&&this.expect(rt.bracketR),br&&(An.optional=Ur),D=this.finishNode(An,"MemberExpression")}else if(!it&&this.eat(rt.parenL)){var Hn=new tt,Ji=this.yieldPos,ka=this.awaitPos,Sa=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var eo=this.parseExprList(rt.parenR,this.options.ecmaVersion>=8,!1,Hn);if(fe&&!Ur&&!this.canInsertSemicolon()&&this.eat(rt.arrow))return this.checkPatternErrors(Hn,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=Ji,this.awaitPos=ka,this.awaitIdentPos=Sa,this.parseArrowExpression(this.startNodeAt(X,Mt),eo,!0);this.checkExpressionErrors(Hn,!0),this.yieldPos=Ji||this.yieldPos,this.awaitPos=ka||this.awaitPos,this.awaitIdentPos=Sa||this.awaitIdentPos;var Eo=this.startNodeAt(X,Mt);Eo.callee=D,Eo.arguments=eo,br&&(Eo.optional=Ur),D=this.finishNode(Eo,"CallExpression")}else if(this.type===rt.backQuote){(Ur||He)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var So=this.startNodeAt(X,Mt);So.tag=D,So.quasi=this.parseTemplate({isTagged:!0}),D=this.finishNode(So,"TaggedTemplateExpression")}return D},lr.parseExprAtom=function(D){this.type===rt.slash&&this.readRegexp();var X,Mt=this.potentialArrowAt===this.start;switch(this.type){case rt._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),X=this.startNode(),this.next(),this.type===rt.parenL&&!this.allowDirectSuper&&this.raise(X.start,"super() call outside constructor of a subclass"),this.type!==rt.dot&&this.type!==rt.bracketL&&this.type!==rt.parenL&&this.unexpected(),this.finishNode(X,"Super");case rt._this:return X=this.startNode(),this.next(),this.finishNode(X,"ThisExpression");case rt.name:var it=this.start,fe=this.startLoc,He=this.containsEsc,br=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!He&&br.name==="async"&&!this.canInsertSemicolon()&&this.eat(rt._function))return this.parseFunction(this.startNodeAt(it,fe),0,!1,!0);if(Mt&&!this.canInsertSemicolon()){if(this.eat(rt.arrow))return this.parseArrowExpression(this.startNodeAt(it,fe),[br],!1);if(this.options.ecmaVersion>=8&&br.name==="async"&&this.type===rt.name&&!He)return br=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(rt.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(it,fe),[br],!0)}return br;case rt.regexp:var Ur=this.value;return X=this.parseLiteral(Ur.value),X.regex={pattern:Ur.pattern,flags:Ur.flags},X;case rt.num:case rt.string:return this.parseLiteral(this.value);case rt._null:case rt._true:case rt._false:return X=this.startNode(),X.value=this.type===rt._null?null:this.type===rt._true,X.raw=this.type.keyword,this.next(),this.finishNode(X,"Literal");case rt.parenL:var Nr=this.start,An=this.parseParenAndDistinguishExpression(Mt);return D&&(D.parenthesizedAssign<0&&!this.isSimpleAssignTarget(An)&&(D.parenthesizedAssign=Nr),D.parenthesizedBind<0&&(D.parenthesizedBind=Nr)),An;case rt.bracketL:return X=this.startNode(),this.next(),X.elements=this.parseExprList(rt.bracketR,!0,!0,D),this.finishNode(X,"ArrayExpression");case rt.braceL:return this.parseObj(!1,D);case rt._function:return X=this.startNode(),this.next(),this.parseFunction(X,0);case rt._class:return this.parseClass(this.startNode(),!1);case rt._new:return this.parseNew();case rt.backQuote:return this.parseTemplate();case rt._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},lr.parseExprImport=function(){var D=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var X=this.parseIdent(!0);switch(this.type){case rt.parenL:return this.parseDynamicImport(D);case rt.dot:return D.meta=X,this.parseImportMeta(D);default:this.unexpected()}},lr.parseDynamicImport=function(D){if(this.next(),D.source=this.parseMaybeAssign(),!this.eat(rt.parenR)){var X=this.start;this.eat(rt.comma)&&this.eat(rt.parenR)?this.raiseRecoverable(X,"Trailing comma is not allowed in import()"):this.unexpected(X)}return this.finishNode(D,"ImportExpression")},lr.parseImportMeta=function(D){this.next();var X=this.containsEsc;return D.property=this.parseIdent(!0),D.property.name!=="meta"&&this.raiseRecoverable(D.property.start,"The only valid meta property for import is 'import.meta'"),X&&this.raiseRecoverable(D.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&this.raiseRecoverable(D.start,"Cannot use 'import.meta' outside a module"),this.finishNode(D,"MetaProperty")},lr.parseLiteral=function(D){var X=this.startNode();return X.value=D,X.raw=this.input.slice(this.start,this.end),X.raw.charCodeAt(X.raw.length-1)===110&&(X.bigint=X.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(X,"Literal")},lr.parseParenExpression=function(){this.expect(rt.parenL);var D=this.parseExpression();return this.expect(rt.parenR),D},lr.parseParenAndDistinguishExpression=function(D){var X=this.start,Mt=this.startLoc,it,fe=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var He=this.start,br=this.startLoc,Ur=[],Nr=!0,An=!1,Hn=new tt,Ji=this.yieldPos,ka=this.awaitPos,Sa;for(this.yieldPos=0,this.awaitPos=0;this.type!==rt.parenR;)if(Nr?Nr=!1:this.expect(rt.comma),fe&&this.afterTrailingComma(rt.parenR,!0)){An=!0;break}else if(this.type===rt.ellipsis){Sa=this.start,Ur.push(this.parseParenItem(this.parseRestBinding())),this.type===rt.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}else Ur.push(this.parseMaybeAssign(!1,Hn,this.parseParenItem));var eo=this.start,Eo=this.startLoc;if(this.expect(rt.parenR),D&&!this.canInsertSemicolon()&&this.eat(rt.arrow))return this.checkPatternErrors(Hn,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Ji,this.awaitPos=ka,this.parseParenArrowList(X,Mt,Ur);(!Ur.length||An)&&this.unexpected(this.lastTokStart),Sa&&this.unexpected(Sa),this.checkExpressionErrors(Hn,!0),this.yieldPos=Ji||this.yieldPos,this.awaitPos=ka||this.awaitPos,Ur.length>1?(it=this.startNodeAt(He,br),it.expressions=Ur,this.finishNodeAt(it,"SequenceExpression",eo,Eo)):it=Ur[0]}else it=this.parseParenExpression();if(this.options.preserveParens){var So=this.startNodeAt(X,Mt);return So.expression=it,this.finishNode(So,"ParenthesizedExpression")}else return it},lr.parseParenItem=function(D){return D},lr.parseParenArrowList=function(D,X,Mt){return this.parseArrowExpression(this.startNodeAt(D,X),Mt)};var Vr=[];lr.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var D=this.startNode(),X=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(rt.dot)){D.meta=X;var Mt=this.containsEsc;return D.property=this.parseIdent(!0),D.property.name!=="target"&&this.raiseRecoverable(D.property.start,"The only valid meta property for new is 'new.target'"),Mt&&this.raiseRecoverable(D.start,"'new.target' must not contain escaped characters"),this.inNonArrowFunction()||this.raiseRecoverable(D.start,"'new.target' can only be used in functions"),this.finishNode(D,"MetaProperty")}var it=this.start,fe=this.startLoc,He=this.type===rt._import;return D.callee=this.parseSubscripts(this.parseExprAtom(),it,fe,!0),He&&D.callee.type==="ImportExpression"&&this.raise(it,"Cannot use new with import()"),this.eat(rt.parenL)?D.arguments=this.parseExprList(rt.parenR,this.options.ecmaVersion>=8,!1):D.arguments=Vr,this.finishNode(D,"NewExpression")},lr.parseTemplateElement=function(D){var X=D.isTagged,Mt=this.startNode();return this.type===rt.invalidTemplate?(X||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),Mt.value={raw:this.value,cooked:null}):Mt.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
`),cooked:this.value},this.next(),Mt.tail=this.type===rt.backQuote,this.finishNode(Mt,"TemplateElement")},lr.parseTemplate=function(D){D===void 0&&(D={});var X=D.isTagged;X===void 0&&(X=!1);var Mt=this.startNode();this.next(),Mt.expressions=[];var it=this.parseTemplateElement({isTagged:X});for(Mt.quasis=[it];!it.tail;)this.type===rt.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(rt.dollarBraceL),Mt.expressions.push(this.parseExpression()),this.expect(rt.braceR),Mt.quasis.push(it=this.parseTemplateElement({isTagged:X}));return this.next(),this.finishNode(Mt,"TemplateLiteral")},lr.isAsyncProp=function(D){return!D.computed&&D.key.type==="Identifier"&&D.key.name==="async"&&(this.type===rt.name||this.type===rt.num||this.type===rt.string||this.type===rt.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===rt.star)&&!Dt.test(this.input.slice(this.lastTokEnd,this.start))},lr.parseObj=function(D,X){var Mt=this.startNode(),it=!0,fe={};for(Mt.properties=[],this.next();!this.eat(rt.braceR);){if(it)it=!1;else if(this.expect(rt.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(rt.braceR))break;var He=this.parseProperty(D,X);D||this.checkPropClash(He,fe,X),Mt.properties.push(He)}return this.finishNode(Mt,D?"ObjectPattern":"ObjectExpression")},lr.parseProperty=function(D,X){var Mt=this.startNode(),it,fe,He,br;if(this.options.ecmaVersion>=9&&this.eat(rt.ellipsis))return D?(Mt.argument=this.parseIdent(!1),this.type===rt.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(Mt,"RestElement")):(this.type===rt.parenL&&X&&(X.parenthesizedAssign<0&&(X.parenthesizedAssign=this.start),X.parenthesizedBind<0&&(X.parenthesizedBind=this.start)),Mt.argument=this.parseMaybeAssign(!1,X),this.type===rt.comma&&X&&X.trailingComma<0&&(X.trailingComma=this.start),this.finishNode(Mt,"SpreadElement"));this.options.ecmaVersion>=6&&(Mt.method=!1,Mt.shorthand=!1,(D||X)&&(He=this.start,br=this.startLoc),D||(it=this.eat(rt.star)));var Ur=this.containsEsc;return this.parsePropertyName(Mt),!D&&!Ur&&this.options.ecmaVersion>=8&&!it&&this.isAsyncProp(Mt)?(fe=!0,it=this.options.ecmaVersion>=9&&this.eat(rt.star),this.parsePropertyName(Mt,X)):fe=!1,this.parsePropertyValue(Mt,D,it,fe,He,br,X,Ur),this.finishNode(Mt,"Property")},lr.parsePropertyValue=function(D,X,Mt,it,fe,He,br,Ur){if((Mt||it)&&this.type===rt.colon&&this.unexpected(),this.eat(rt.colon))D.value=X?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,br),D.kind="init";else if(this.options.ecmaVersion>=6&&this.type===rt.parenL)X&&this.unexpected(),D.kind="init",D.method=!0,D.value=this.parseMethod(Mt,it);else if(!X&&!Ur&&this.options.ecmaVersion>=5&&!D.computed&&D.key.type==="Identifier"&&(D.key.name==="get"||D.key.name==="set")&&this.type!==rt.comma&&this.type!==rt.braceR&&this.type!==rt.eq){(Mt||it)&&this.unexpected(),D.kind=D.key.name,this.parsePropertyName(D),D.value=this.parseMethod(!1);var Nr=D.kind==="get"?0:1;if(D.value.params.length!==Nr){var An=D.value.start;D.kind==="get"?this.raiseRecoverable(An,"getter should have no params"):this.raiseRecoverable(An,"setter should have exactly one param")}else D.kind==="set"&&D.value.params[0].type==="RestElement"&&this.raiseRecoverable(D.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!D.computed&&D.key.type==="Identifier"?((Mt||it)&&this.unexpected(),this.checkUnreserved(D.key),D.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=fe),D.kind="init",X?D.value=this.parseMaybeDefault(fe,He,D.key):this.type===rt.eq&&br?(br.shorthandAssign<0&&(br.shorthandAssign=this.start),D.value=this.parseMaybeDefault(fe,He,D.key)):D.value=D.key,D.shorthand=!0):this.unexpected()},lr.parsePropertyName=function(D){if(this.options.ecmaVersion>=6){if(this.eat(rt.bracketL))return D.computed=!0,D.key=this.parseMaybeAssign(),this.expect(rt.bracketR),D.key;D.computed=!1}return D.key=this.type===rt.num||this.type===rt.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},lr.initFunction=function(D){D.id=null,this.options.ecmaVersion>=6&&(D.generator=D.expression=!1),this.options.ecmaVersion>=8&&(D.async=!1)},lr.parseMethod=function(D,X,Mt){var it=this.startNode(),fe=this.yieldPos,He=this.awaitPos,br=this.awaitIdentPos;return this.initFunction(it),this.options.ecmaVersion>=6&&(it.generator=D),this.options.ecmaVersion>=8&&(it.async=!!X),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Xt(X,it.generator)|qt|(Mt?bt:0)),this.expect(rt.parenL),it.params=this.parseBindingList(rt.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(it,!1,!0),this.yieldPos=fe,this.awaitPos=He,this.awaitIdentPos=br,this.finishNode(it,"FunctionExpression")},lr.parseArrowExpression=function(D,X,Mt){var it=this.yieldPos,fe=this.awaitPos,He=this.awaitIdentPos;return this.enterScope(Xt(Mt,!1)|vr),this.initFunction(D),this.options.ecmaVersion>=8&&(D.async=!!Mt),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,D.params=this.toAssignableList(X,!0),this.parseFunctionBody(D,!0,!1),this.yieldPos=it,this.awaitPos=fe,this.awaitIdentPos=He,this.finishNode(D,"ArrowFunctionExpression")},lr.parseFunctionBody=function(D,X,Mt){var it=X&&this.type!==rt.braceL,fe=this.strict,He=!1;if(it)D.body=this.parseMaybeAssign(),D.expression=!0,this.checkParams(D,!1);else{var br=this.options.ecmaVersion>=7&&!this.isSimpleParamList(D.params);(!fe||br)&&(He=this.strictDirective(this.end),He&&br&&this.raiseRecoverable(D.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var Ur=this.labels;this.labels=[],He&&(this.strict=!0),this.checkParams(D,!fe&&!He&&!X&&!Mt&&this.isSimpleParamList(D.params)),this.strict&&D.id&&this.checkLVal(D.id,Ne),D.body=this.parseBlock(!1,void 0,He&&!fe),D.expression=!1,this.adaptDirectivePrologue(D.body.body),this.labels=Ur}this.exitScope()},lr.isSimpleParamList=function(D){for(var X=0,Mt=D;X<Mt.length;X+=1){var it=Mt[X];if(it.type!=="Identifier")return!1}return!0},lr.checkParams=function(D,X){for(var Mt={},it=0,fe=D.params;it<fe.length;it+=1){var He=fe[it];this.checkLVal(He,xt,X?null:Mt)}},lr.parseExprList=function(D,X,Mt,it){for(var fe=[],He=!0;!this.eat(D);){if(He)He=!1;else if(this.expect(rt.comma),X&&this.afterTrailingComma(D))break;var br=void 0;Mt&&this.type===rt.comma?br=null:this.type===rt.ellipsis?(br=this.parseSpread(it),it&&this.type===rt.comma&&it.trailingComma<0&&(it.trailingComma=this.start)):br=this.parseMaybeAssign(!1,it),fe.push(br)}return fe},lr.checkUnreserved=function(D){var X=D.start,Mt=D.end,it=D.name;if(this.inGenerator&&it==="yield"&&this.raiseRecoverable(X,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&it==="await"&&this.raiseRecoverable(X,"Cannot use 'await' as identifier inside an async function"),this.keywords.test(it)&&this.raise(X,"Unexpected keyword '"+it+"'"),!(this.options.ecmaVersion<6&&this.input.slice(X,Mt).indexOf("\\")!==-1)){var fe=this.strict?this.reservedWordsStrict:this.reservedWords;fe.test(it)&&(!this.inAsync&&it==="await"&&this.raiseRecoverable(X,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(X,"The keyword '"+it+"' is reserved"))}},lr.parseIdent=function(D,X){var Mt=this.startNode();return this.type===rt.name?Mt.name=this.value:this.type.keyword?(Mt.name=this.type.keyword,(Mt.name==="class"||Mt.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop()):this.unexpected(),this.next(!!D),this.finishNode(Mt,"Identifier"),D||(this.checkUnreserved(Mt),Mt.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=Mt.start)),Mt},lr.parseYield=function(D){this.yieldPos||(this.yieldPos=this.start);var X=this.startNode();return this.next(),this.type===rt.semi||this.canInsertSemicolon()||this.type!==rt.star&&!this.type.startsExpr?(X.delegate=!1,X.argument=null):(X.delegate=this.eat(rt.star),X.argument=this.parseMaybeAssign(D)),this.finishNode(X,"YieldExpression")},lr.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var D=this.startNode();return this.next(),D.argument=this.parseMaybeUnary(null,!1),this.finishNode(D,"AwaitExpression")};var Pr=Zt.prototype;Pr.raise=function(D,X){var Mt=se(this.input,D);X+=" ("+Mt.line+":"+Mt.column+")";var it=new SyntaxError(X);throw it.pos=D,it.loc=Mt,it.raisedAt=this.pos,it},Pr.raiseRecoverable=Pr.raise,Pr.curPosition=function(){if(this.options.locations)return new Y(this.curLine,this.pos-this.lineStart)};var Br=Zt.prototype,Sn=function(X){this.flags=X,this.var=[],this.lexical=[],this.functions=[]};Br.enterScope=function(D){this.scopeStack.push(new Sn(D))},Br.exitScope=function(){this.scopeStack.pop()},Br.treatFunctionsAsVarInScope=function(D){return D.flags&ee||!this.inModule&&D.flags&Bt},Br.declareName=function(D,X,Mt){var it=!1;if(X===wt){var fe=this.currentScope();it=fe.lexical.indexOf(D)>-1||fe.functions.indexOf(D)>-1||fe.var.indexOf(D)>-1,fe.lexical.push(D),this.inModule&&fe.flags&Bt&&delete this.undefinedExports[D]}else if(X===Ie){var He=this.currentScope();He.lexical.push(D)}else if(X===ue){var br=this.currentScope();this.treatFunctionsAsVar?it=br.lexical.indexOf(D)>-1:it=br.lexical.indexOf(D)>-1||br.var.indexOf(D)>-1,br.functions.push(D)}else for(var Ur=this.scopeStack.length-1;Ur>=0;--Ur){var Nr=this.scopeStack[Ur];if(Nr.lexical.indexOf(D)>-1&&!(Nr.flags&ie&&Nr.lexical[0]===D)||!this.treatFunctionsAsVarInScope(Nr)&&Nr.functions.indexOf(D)>-1){it=!0;break}if(Nr.var.push(D),this.inModule&&Nr.flags&Bt&&delete this.undefinedExports[D],Nr.flags&me)break}it&&this.raiseRecoverable(Mt,"Identifier '"+D+"' has already been declared")},Br.checkLocalExport=function(D){this.scopeStack[0].lexical.indexOf(D.name)===-1&&this.scopeStack[0].var.indexOf(D.name)===-1&&(this.undefinedExports[D.name]=D)},Br.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Br.currentVarScope=function(){for(var D=this.scopeStack.length-1;;D--){var X=this.scopeStack[D];if(X.flags&me)return X}},Br.currentThisScope=function(){for(var D=this.scopeStack.length-1;;D--){var X=this.scopeStack[D];if(X.flags&me&&!(X.flags&vr))return X}};var an=function(X,Mt,it){this.type="",this.start=Mt,this.end=0,X.options.locations&&(this.loc=new mt(X,it)),X.options.directSourceFile&&(this.sourceFile=X.options.directSourceFile),X.options.ranges&&(this.range=[Mt,0])},zn=Zt.prototype;zn.startNode=function(){return new an(this,this.start,this.startLoc)},zn.startNodeAt=function(D,X){return new an(this,D,X)};function Zn(D,X,Mt,it){return D.type=X,D.end=Mt,this.options.locations&&(D.loc.end=it),this.options.ranges&&(D.range[1]=Mt),D}zn.finishNode=function(D,X){return Zn.call(this,D,X,this.lastTokEnd,this.lastTokEndLoc)},zn.finishNodeAt=function(D,X,Mt,it){return Zn.call(this,D,X,Mt,it)};var Wn=function(X,Mt,it,fe,He){this.token=X,this.isExpr=!!Mt,this.preserveSpace=!!it,this.override=fe,this.generator=!!He},Dn={b_stat:new Wn("{",!1),b_expr:new Wn("{",!0),b_tmpl:new Wn("${",!1),p_stat:new Wn("(",!1),p_expr:new Wn("(",!0),q_tmpl:new Wn("`",!0,!0,function(D){return D.tryReadTemplateToken()}),f_stat:new Wn("function",!1),f_expr:new Wn("function",!0),f_expr_gen:new Wn("function",!0,!1,null,!0),f_gen:new Wn("function",!1,!1,null,!0)},Xn=Zt.prototype;Xn.initialContext=function(){return[Dn.b_stat]},Xn.braceIsBlock=function(D){var X=this.curContext();return X===Dn.f_expr||X===Dn.f_stat?!0:D===rt.colon&&(X===Dn.b_stat||X===Dn.b_expr)?!X.isExpr:D===rt._return||D===rt.name&&this.exprAllowed?Dt.test(this.input.slice(this.lastTokEnd,this.start)):D===rt._else||D===rt.semi||D===rt.eof||D===rt.parenR||D===rt.arrow?!0:D===rt.braceL?X===Dn.b_stat:D===rt._var||D===rt._const||D===rt.name?!1:!this.exprAllowed},Xn.inGeneratorContext=function(){for(var D=this.context.length-1;D>=1;D--){var X=this.context[D];if(X.token==="function")return X.generator}return!1},Xn.updateContext=function(D){var X,Mt=this.type;Mt.keyword&&D===rt.dot?this.exprAllowed=!1:(X=Mt.updateContext)?X.call(this,D):this.exprAllowed=Mt.beforeExpr},rt.parenR.updateContext=rt.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var D=this.context.pop();D===Dn.b_stat&&this.curContext().token==="function"&&(D=this.context.pop()),this.exprAllowed=!D.isExpr},rt.braceL.updateContext=function(D){this.context.push(this.braceIsBlock(D)?Dn.b_stat:Dn.b_expr),this.exprAllowed=!0},rt.dollarBraceL.updateContext=function(){this.context.push(Dn.b_tmpl),this.exprAllowed=!0},rt.parenL.updateContext=function(D){var X=D===rt._if||D===rt._for||D===rt._with||D===rt._while;this.context.push(X?Dn.p_stat:Dn.p_expr),this.exprAllowed=!0},rt.incDec.updateContext=function(){},rt._function.updateContext=rt._class.updateContext=function(D){D.beforeExpr&&D!==rt.semi&&D!==rt._else&&!(D===rt._return&&Dt.test(this.input.slice(this.lastTokEnd,this.start)))&&!((D===rt.colon||D===rt.braceL)&&this.curContext()===Dn.b_stat)?this.context.push(Dn.f_expr):this.context.push(Dn.f_stat),this.exprAllowed=!1},rt.backQuote.updateContext=function(){this.curContext()===Dn.q_tmpl?this.context.pop():this.context.push(Dn.q_tmpl),this.exprAllowed=!1},rt.star.updateContext=function(D){if(D===rt._function){var X=this.context.length-1;this.context[X]===Dn.f_expr?this.context[X]=Dn.f_expr_gen:this.context[X]=Dn.f_gen}this.exprAllowed=!0},rt.name.updateContext=function(D){var X=!1;this.options.ecmaVersion>=6&&D!==rt.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(X=!0),this.exprAllowed=X};var Ft="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Wt=Ft+" Extended_Pictographic",oe=Wt,ye={9:Ft,10:Wt,11:oe},Ze="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",fr="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",_r=fr+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",we=_r+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",ir={9:fr,10:_r,11:we},Hr={};function In(D){var X=Hr[D]={binary:St(ye[D]+" "+Ze),nonBinary:{General_Category:St(Ze),Script:St(ir[D])}};X.nonBinary.Script_Extensions=X.nonBinary.Script,X.nonBinary.gc=X.nonBinary.General_Category,X.nonBinary.sc=X.nonBinary.Script,X.nonBinary.scx=X.nonBinary.Script_Extensions}In(9),In(10),In(11);var nn=Zt.prototype,Yr=function(X){this.parser=X,this.validFlags="gim"+(X.options.ecmaVersion>=6?"uy":"")+(X.options.ecmaVersion>=9?"s":""),this.unicodeProperties=Hr[X.options.ecmaVersion>=11?11:X.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};Yr.prototype.reset=function(X,Mt,it){var fe=it.indexOf("u")!==-1;this.start=X|0,this.source=Mt+"",this.flags=it,this.switchU=fe&&this.parser.options.ecmaVersion>=6,this.switchN=fe&&this.parser.options.ecmaVersion>=9},Yr.prototype.raise=function(X){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+X)},Yr.prototype.at=function(X,Mt){Mt===void 0&&(Mt=!1);var it=this.source,fe=it.length;if(X>=fe)return-1;var He=it.charCodeAt(X);if(!(Mt||this.switchU)||He<=55295||He>=57344||X+1>=fe)return He;var br=it.charCodeAt(X+1);return br>=56320&&br<=57343?(He<<10)+br-56613888:He},Yr.prototype.nextIndex=function(X,Mt){Mt===void 0&&(Mt=!1);var it=this.source,fe=it.length;if(X>=fe)return fe;var He=it.charCodeAt(X),br;return!(Mt||this.switchU)||He<=55295||He>=57344||X+1>=fe||(br=it.charCodeAt(X+1))<56320||br>57343?X+1:X+2},Yr.prototype.current=function(X){return X===void 0&&(X=!1),this.at(this.pos,X)},Yr.prototype.lookahead=function(X){return X===void 0&&(X=!1),this.at(this.nextIndex(this.pos,X),X)},Yr.prototype.advance=function(X){X===void 0&&(X=!1),this.pos=this.nextIndex(this.pos,X)},Yr.prototype.eat=function(X,Mt){return Mt===void 0&&(Mt=!1),this.current(Mt)===X?(this.advance(Mt),!0):!1};function On(D){return D<=65535?String.fromCharCode(D):(D-=65536,String.fromCharCode((D>>10)+55296,(D&1023)+56320))}nn.validateRegExpFlags=function(D){for(var X=D.validFlags,Mt=D.flags,it=0;it<Mt.length;it++){var fe=Mt.charAt(it);X.indexOf(fe)===-1&&this.raise(D.start,"Invalid regular expression flag"),Mt.indexOf(fe,it+1)>-1&&this.raise(D.start,"Duplicate regular expression flag")}},nn.validateRegExpPattern=function(D){this.regexp_pattern(D),!D.switchN&&this.options.ecmaVersion>=9&&D.groupNames.length>0&&(D.switchN=!0,this.regexp_pattern(D))},nn.regexp_pattern=function(D){D.pos=0,D.lastIntValue=0,D.lastStringValue="",D.lastAssertionIsQuantifiable=!1,D.numCapturingParens=0,D.maxBackReference=0,D.groupNames.length=0,D.backReferenceNames.length=0,this.regexp_disjunction(D),D.pos!==D.source.length&&(D.eat(41)&&D.raise("Unmatched ')'"),(D.eat(93)||D.eat(125))&&D.raise("Lone quantifier brackets")),D.maxBackReference>D.numCapturingParens&&D.raise("Invalid escape");for(var X=0,Mt=D.backReferenceNames;X<Mt.length;X+=1){var it=Mt[X];D.groupNames.indexOf(it)===-1&&D.raise("Invalid named capture referenced")}},nn.regexp_disjunction=function(D){for(this.regexp_alternative(D);D.eat(124);)this.regexp_alternative(D);this.regexp_eatQuantifier(D,!0)&&D.raise("Nothing to repeat"),D.eat(123)&&D.raise("Lone quantifier brackets")},nn.regexp_alternative=function(D){for(;D.pos<D.source.length&&this.regexp_eatTerm(D););},nn.regexp_eatTerm=function(D){return this.regexp_eatAssertion(D)?(D.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(D)&&D.switchU&&D.raise("Invalid quantifier"),!0):(D.switchU?this.regexp_eatAtom(D):this.regexp_eatExtendedAtom(D))?(this.regexp_eatQuantifier(D),!0):!1},nn.regexp_eatAssertion=function(D){var X=D.pos;if(D.lastAssertionIsQuantifiable=!1,D.eat(94)||D.eat(36))return!0;if(D.eat(92)){if(D.eat(66)||D.eat(98))return!0;D.pos=X}if(D.eat(40)&&D.eat(63)){var Mt=!1;if(this.options.ecmaVersion>=9&&(Mt=D.eat(60)),D.eat(61)||D.eat(33))return this.regexp_disjunction(D),D.eat(41)||D.raise("Unterminated group"),D.lastAssertionIsQuantifiable=!Mt,!0}return D.pos=X,!1},nn.regexp_eatQuantifier=function(D,X){return X===void 0&&(X=!1),this.regexp_eatQuantifierPrefix(D,X)?(D.eat(63),!0):!1},nn.regexp_eatQuantifierPrefix=function(D,X){return D.eat(42)||D.eat(43)||D.eat(63)||this.regexp_eatBracedQuantifier(D,X)},nn.regexp_eatBracedQuantifier=function(D,X){var Mt=D.pos;if(D.eat(123)){var it=0,fe=-1;if(this.regexp_eatDecimalDigits(D)&&(it=D.lastIntValue,D.eat(44)&&this.regexp_eatDecimalDigits(D)&&(fe=D.lastIntValue),D.eat(125)))return fe!==-1&&fe<it&&!X&&D.raise("numbers out of order in {} quantifier"),!0;D.switchU&&!X&&D.raise("Incomplete quantifier"),D.pos=Mt}return!1},nn.regexp_eatAtom=function(D){return this.regexp_eatPatternCharacters(D)||D.eat(46)||this.regexp_eatReverseSolidusAtomEscape(D)||this.regexp_eatCharacterClass(D)||this.regexp_eatUncapturingGroup(D)||this.regexp_eatCapturingGroup(D)},nn.regexp_eatReverseSolidusAtomEscape=function(D){var X=D.pos;if(D.eat(92)){if(this.regexp_eatAtomEscape(D))return!0;D.pos=X}return!1},nn.regexp_eatUncapturingGroup=function(D){var X=D.pos;if(D.eat(40)){if(D.eat(63)&&D.eat(58)){if(this.regexp_disjunction(D),D.eat(41))return!0;D.raise("Unterminated group")}D.pos=X}return!1},nn.regexp_eatCapturingGroup=function(D){if(D.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(D):D.current()===63&&D.raise("Invalid group"),this.regexp_disjunction(D),D.eat(41))return D.numCapturingParens+=1,!0;D.raise("Unterminated group")}return!1},nn.regexp_eatExtendedAtom=function(D){return D.eat(46)||this.regexp_eatReverseSolidusAtomEscape(D)||this.regexp_eatCharacterClass(D)||this.regexp_eatUncapturingGroup(D)||this.regexp_eatCapturingGroup(D)||this.regexp_eatInvalidBracedQuantifier(D)||this.regexp_eatExtendedPatternCharacter(D)},nn.regexp_eatInvalidBracedQuantifier=function(D){return this.regexp_eatBracedQuantifier(D,!0)&&D.raise("Nothing to repeat"),!1},nn.regexp_eatSyntaxCharacter=function(D){var X=D.current();return bi(X)?(D.lastIntValue=X,D.advance(),!0):!1};function bi(D){return D===36||D>=40&&D<=43||D===46||D===63||D>=91&&D<=94||D>=123&&D<=125}nn.regexp_eatPatternCharacters=function(D){for(var X=D.pos,Mt=0;(Mt=D.current())!==-1&&!bi(Mt);)D.advance();return D.pos!==X},nn.regexp_eatExtendedPatternCharacter=function(D){var X=D.current();return X!==-1&&X!==36&&!(X>=40&&X<=43)&&X!==46&&X!==63&&X!==91&&X!==94&&X!==124?(D.advance(),!0):!1},nn.regexp_groupSpecifier=function(D){if(D.eat(63)){if(this.regexp_eatGroupName(D)){D.groupNames.indexOf(D.lastStringValue)!==-1&&D.raise("Duplicate capture group name"),D.groupNames.push(D.lastStringValue);return}D.raise("Invalid group")}},nn.regexp_eatGroupName=function(D){if(D.lastStringValue="",D.eat(60)){if(this.regexp_eatRegExpIdentifierName(D)&&D.eat(62))return!0;D.raise("Invalid capture group name")}return!1},nn.regexp_eatRegExpIdentifierName=function(D){if(D.lastStringValue="",this.regexp_eatRegExpIdentifierStart(D)){for(D.lastStringValue+=On(D.lastIntValue);this.regexp_eatRegExpIdentifierPart(D);)D.lastStringValue+=On(D.lastIntValue);return!0}return!1},nn.regexp_eatRegExpIdentifierStart=function(D){var X=D.pos,Mt=this.options.ecmaVersion>=11,it=D.current(Mt);return D.advance(Mt),it===92&&this.regexp_eatRegExpUnicodeEscapeSequence(D,Mt)&&(it=D.lastIntValue),Mi(it)?(D.lastIntValue=it,!0):(D.pos=X,!1)};function Mi(D){return zt(D,!0)||D===36||D===95}nn.regexp_eatRegExpIdentifierPart=function(D){var X=D.pos,Mt=this.options.ecmaVersion>=11,it=D.current(Mt);return D.advance(Mt),it===92&&this.regexp_eatRegExpUnicodeEscapeSequence(D,Mt)&&(it=D.lastIntValue),tn(it)?(D.lastIntValue=it,!0):(D.pos=X,!1)};function tn(D){return P(D,!0)||D===36||D===95||D===8204||D===8205}nn.regexp_eatAtomEscape=function(D){return this.regexp_eatBackReference(D)||this.regexp_eatCharacterClassEscape(D)||this.regexp_eatCharacterEscape(D)||D.switchN&&this.regexp_eatKGroupName(D)?!0:(D.switchU&&(D.current()===99&&D.raise("Invalid unicode escape"),D.raise("Invalid escape")),!1)},nn.regexp_eatBackReference=function(D){var X=D.pos;if(this.regexp_eatDecimalEscape(D)){var Mt=D.lastIntValue;if(D.switchU)return Mt>D.maxBackReference&&(D.maxBackReference=Mt),!0;if(Mt<=D.numCapturingParens)return!0;D.pos=X}return!1},nn.regexp_eatKGroupName=function(D){if(D.eat(107)){if(this.regexp_eatGroupName(D))return D.backReferenceNames.push(D.lastStringValue),!0;D.raise("Invalid named reference")}return!1},nn.regexp_eatCharacterEscape=function(D){return this.regexp_eatControlEscape(D)||this.regexp_eatCControlLetter(D)||this.regexp_eatZero(D)||this.regexp_eatHexEscapeSequence(D)||this.regexp_eatRegExpUnicodeEscapeSequence(D,!1)||!D.switchU&&this.regexp_eatLegacyOctalEscapeSequence(D)||this.regexp_eatIdentityEscape(D)},nn.regexp_eatCControlLetter=function(D){var X=D.pos;if(D.eat(99)){if(this.regexp_eatControlLetter(D))return!0;D.pos=X}return!1},nn.regexp_eatZero=function(D){return D.current()===48&&!Ia(D.lookahead())?(D.lastIntValue=0,D.advance(),!0):!1},nn.regexp_eatControlEscape=function(D){var X=D.current();return X===116?(D.lastIntValue=9,D.advance(),!0):X===110?(D.lastIntValue=10,D.advance(),!0):X===118?(D.lastIntValue=11,D.advance(),!0):X===102?(D.lastIntValue=12,D.advance(),!0):X===114?(D.lastIntValue=13,D.advance(),!0):!1},nn.regexp_eatControlLetter=function(D){var X=D.current();return mi(X)?(D.lastIntValue=X%32,D.advance(),!0):!1};function mi(D){return D>=65&&D<=90||D>=97&&D<=122}nn.regexp_eatRegExpUnicodeEscapeSequence=function(D,X){X===void 0&&(X=!1);var Mt=D.pos,it=X||D.switchU;if(D.eat(117)){if(this.regexp_eatFixedHexDigits(D,4)){var fe=D.lastIntValue;if(it&&fe>=55296&&fe<=56319){var He=D.pos;if(D.eat(92)&&D.eat(117)&&this.regexp_eatFixedHexDigits(D,4)){var br=D.lastIntValue;if(br>=56320&&br<=57343)return D.lastIntValue=(fe-55296)*1024+(br-56320)+65536,!0}D.pos=He,D.lastIntValue=fe}return!0}if(it&&D.eat(123)&&this.regexp_eatHexDigits(D)&&D.eat(125)&&Yn(D.lastIntValue))return!0;it&&D.raise("Invalid unicode escape"),D.pos=Mt}return!1};function Yn(D){return D>=0&&D<=1114111}nn.regexp_eatIdentityEscape=function(D){if(D.switchU)return this.regexp_eatSyntaxCharacter(D)?!0:D.eat(47)?(D.lastIntValue=47,!0):!1;var X=D.current();return X!==99&&(!D.switchN||X!==107)?(D.lastIntValue=X,D.advance(),!0):!1},nn.regexp_eatDecimalEscape=function(D){D.lastIntValue=0;var X=D.current();if(X>=49&&X<=57){do D.lastIntValue=10*D.lastIntValue+(X-48),D.advance();while((X=D.current())>=48&&X<=57);return!0}return!1},nn.regexp_eatCharacterClassEscape=function(D){var X=D.current();if(fi(X))return D.lastIntValue=-1,D.advance(),!0;if(D.switchU&&this.options.ecmaVersion>=9&&(X===80||X===112)){if(D.lastIntValue=-1,D.advance(),D.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(D)&&D.eat(125))return!0;D.raise("Invalid property name")}return!1};function fi(D){return D===100||D===68||D===115||D===83||D===119||D===87}nn.regexp_eatUnicodePropertyValueExpression=function(D){var X=D.pos;if(this.regexp_eatUnicodePropertyName(D)&&D.eat(61)){var Mt=D.lastStringValue;if(this.regexp_eatUnicodePropertyValue(D)){var it=D.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(D,Mt,it),!0}}if(D.pos=X,this.regexp_eatLoneUnicodePropertyNameOrValue(D)){var fe=D.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(D,fe),!0}return!1},nn.regexp_validateUnicodePropertyNameAndValue=function(D,X,Mt){Jt(D.unicodeProperties.nonBinary,X)||D.raise("Invalid property name"),D.unicodeProperties.nonBinary[X].test(Mt)||D.raise("Invalid property value")},nn.regexp_validateUnicodePropertyNameOrValue=function(D,X){D.unicodeProperties.binary.test(X)||D.raise("Invalid property name")},nn.regexp_eatUnicodePropertyName=function(D){var X=0;for(D.lastStringValue="";Ea(X=D.current());)D.lastStringValue+=On(X),D.advance();return D.lastStringValue!==""};function Ea(D){return mi(D)||D===95}nn.regexp_eatUnicodePropertyValue=function(D){var X=0;for(D.lastStringValue="";si(X=D.current());)D.lastStringValue+=On(X),D.advance();return D.lastStringValue!==""};function si(D){return Ea(D)||Ia(D)}nn.regexp_eatLoneUnicodePropertyNameOrValue=function(D){return this.regexp_eatUnicodePropertyValue(D)},nn.regexp_eatCharacterClass=function(D){if(D.eat(91)){if(D.eat(94),this.regexp_classRanges(D),D.eat(93))return!0;D.raise("Unterminated character class")}return!1},nn.regexp_classRanges=function(D){for(;this.regexp_eatClassAtom(D);){var X=D.lastIntValue;if(D.eat(45)&&this.regexp_eatClassAtom(D)){var Mt=D.lastIntValue;D.switchU&&(X===-1||Mt===-1)&&D.raise("Invalid character class"),X!==-1&&Mt!==-1&&X>Mt&&D.raise("Range out of order in character class")}}},nn.regexp_eatClassAtom=function(D){var X=D.pos;if(D.eat(92)){if(this.regexp_eatClassEscape(D))return!0;if(D.switchU){var Mt=D.current();(Mt===99||Ha(Mt))&&D.raise("Invalid class escape"),D.raise("Invalid escape")}D.pos=X}var it=D.current();return it!==93?(D.lastIntValue=it,D.advance(),!0):!1},nn.regexp_eatClassEscape=function(D){var X=D.pos;if(D.eat(98))return D.lastIntValue=8,!0;if(D.switchU&&D.eat(45))return D.lastIntValue=45,!0;if(!D.switchU&&D.eat(99)){if(this.regexp_eatClassControlLetter(D))return!0;D.pos=X}return this.regexp_eatCharacterClassEscape(D)||this.regexp_eatCharacterEscape(D)},nn.regexp_eatClassControlLetter=function(D){var X=D.current();return Ia(X)||X===95?(D.lastIntValue=X%32,D.advance(),!0):!1},nn.regexp_eatHexEscapeSequence=function(D){var X=D.pos;if(D.eat(120)){if(this.regexp_eatFixedHexDigits(D,2))return!0;D.switchU&&D.raise("Invalid escape"),D.pos=X}return!1},nn.regexp_eatDecimalDigits=function(D){var X=D.pos,Mt=0;for(D.lastIntValue=0;Ia(Mt=D.current());)D.lastIntValue=10*D.lastIntValue+(Mt-48),D.advance();return D.pos!==X};function Ia(D){return D>=48&&D<=57}nn.regexp_eatHexDigits=function(D){var X=D.pos,Mt=0;for(D.lastIntValue=0;vo(Mt=D.current());)D.lastIntValue=16*D.lastIntValue+Oa(Mt),D.advance();return D.pos!==X};function vo(D){return D>=48&&D<=57||D>=65&&D<=70||D>=97&&D<=102}function Oa(D){return D>=65&&D<=70?10+(D-65):D>=97&&D<=102?10+(D-97):D-48}nn.regexp_eatLegacyOctalEscapeSequence=function(D){if(this.regexp_eatOctalDigit(D)){var X=D.lastIntValue;if(this.regexp_eatOctalDigit(D)){var Mt=D.lastIntValue;X<=3&&this.regexp_eatOctalDigit(D)?D.lastIntValue=X*64+Mt*8+D.lastIntValue:D.lastIntValue=X*8+Mt}else D.lastIntValue=X;return!0}return!1},nn.regexp_eatOctalDigit=function(D){var X=D.current();return Ha(X)?(D.lastIntValue=X-48,D.advance(),!0):(D.lastIntValue=0,!1)};function Ha(D){return D>=48&&D<=55}nn.regexp_eatFixedHexDigits=function(D,X){var Mt=D.pos;D.lastIntValue=0;for(var it=0;it<X;++it){var fe=D.current();if(!vo(fe))return D.pos=Mt,!1;D.lastIntValue=16*D.lastIntValue+Oa(fe),D.advance()}return!0};var wa=function(X){this.type=X.type,this.value=X.value,this.start=X.start,this.end=X.end,X.options.locations&&(this.loc=new mt(X,X.startLoc,X.endLoc)),X.options.ranges&&(this.range=[X.start,X.end])},ya=Zt.prototype;ya.next=function(D){!D&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new wa(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},ya.getToken=function(){return this.next(),new wa(this)},typeof Symbol!="undefined"&&(ya[Symbol.iterator]=function(){var D=this;return{next:function(){var X=D.getToken();return{done:X.type===rt.eof,value:X}}}}),ya.curContext=function(){return this.context[this.context.length-1]},ya.nextToken=function(){var D=this.curContext();if((!D||!D.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(rt.eof);if(D.override)return D.override(this);this.readToken(this.fullCharCodeAtPos())},ya.readToken=function(D){return zt(D,this.options.ecmaVersion>=6)||D===92?this.readWord():this.getTokenFromCode(D)},ya.fullCharCodeAtPos=function(){var D=this.input.charCodeAt(this.pos);if(D<=55295||D>=57344)return D;var X=this.input.charCodeAt(this.pos+1);return(D<<10)+X-56613888},ya.skipBlockComment=function(){var D=this.options.onComment&&this.curPosition(),X=this.pos,Mt=this.input.indexOf("*/",this.pos+=2);if(Mt===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=Mt+2,this.options.locations){Ee.lastIndex=X;for(var it;(it=Ee.exec(this.input))&&it.index<this.pos;)++this.curLine,this.lineStart=it.index+it[0].length}this.options.onComment&&this.options.onComment(!0,this.input.slice(X+2,Mt),X,this.pos,D,this.curPosition())},ya.skipLineComment=function(D){for(var X=this.pos,Mt=this.options.onComment&&this.curPosition(),it=this.input.charCodeAt(this.pos+=D);this.pos<this.input.length&&!ge(it);)it=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(X+D,this.pos),X,this.pos,Mt,this.curPosition())},ya.skipSpace=function(){t:for(;this.pos<this.input.length;){var D=this.input.charCodeAt(this.pos);switch(D){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(D>8&&D<14||D>=5760&&Ge.test(String.fromCharCode(D)))++this.pos;else break t}}},ya.finishToken=function(D,X){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var Mt=this.type;this.type=D,this.value=X,this.updateContext(Mt)},ya.readToken_dot=function(){var D=this.input.charCodeAt(this.pos+1);if(D>=48&&D<=57)return this.readNumber(!0);var X=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&D===46&&X===46?(this.pos+=3,this.finishToken(rt.ellipsis)):(++this.pos,this.finishToken(rt.dot))},ya.readToken_slash=function(){var D=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):D===61?this.finishOp(rt.assign,2):this.finishOp(rt.slash,1)},ya.readToken_mult_modulo_exp=function(D){var X=this.input.charCodeAt(this.pos+1),Mt=1,it=D===42?rt.star:rt.modulo;return this.options.ecmaVersion>=7&&D===42&&X===42&&(++Mt,it=rt.starstar,X=this.input.charCodeAt(this.pos+2)),X===61?this.finishOp(rt.assign,Mt+1):this.finishOp(it,Mt)},ya.readToken_pipe_amp=function(D){var X=this.input.charCodeAt(this.pos+1);if(X===D){if(this.options.ecmaVersion>=12){var Mt=this.input.charCodeAt(this.pos+2);if(Mt===61)return this.finishOp(rt.assign,3)}return this.finishOp(D===124?rt.logicalOR:rt.logicalAND,2)}return X===61?this.finishOp(rt.assign,2):this.finishOp(D===124?rt.bitwiseOR:rt.bitwiseAND,1)},ya.readToken_caret=function(){var D=this.input.charCodeAt(this.pos+1);return D===61?this.finishOp(rt.assign,2):this.finishOp(rt.bitwiseXOR,1)},ya.readToken_plus_min=function(D){var X=this.input.charCodeAt(this.pos+1);return X===D?X===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Dt.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(rt.incDec,2):X===61?this.finishOp(rt.assign,2):this.finishOp(rt.plusMin,1)},ya.readToken_lt_gt=function(D){var X=this.input.charCodeAt(this.pos+1),Mt=1;return X===D?(Mt=D===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+Mt)===61?this.finishOp(rt.assign,Mt+1):this.finishOp(rt.bitShift,Mt)):X===33&&D===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(X===61&&(Mt=2),this.finishOp(rt.relational,Mt))},ya.readToken_eq_excl=function(D){var X=this.input.charCodeAt(this.pos+1);return X===61?this.finishOp(rt.equality,this.input.charCodeAt(this.pos+2)===61?3:2):D===61&&X===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(rt.arrow)):this.finishOp(D===61?rt.eq:rt.prefix,1)},ya.readToken_question=function(){var D=this.options.ecmaVersion;if(D>=11){var X=this.input.charCodeAt(this.pos+1);if(X===46){var Mt=this.input.charCodeAt(this.pos+2);if(Mt<48||Mt>57)return this.finishOp(rt.questionDot,2)}if(X===63){if(D>=12){var it=this.input.charCodeAt(this.pos+2);if(it===61)return this.finishOp(rt.assign,3)}return this.finishOp(rt.coalesce,2)}}return this.finishOp(rt.question,1)},ya.getTokenFromCode=function(D){switch(D){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(rt.parenL);case 41:return++this.pos,this.finishToken(rt.parenR);case 59:return++this.pos,this.finishToken(rt.semi);case 44:return++this.pos,this.finishToken(rt.comma);case 91:return++this.pos,this.finishToken(rt.bracketL);case 93:return++this.pos,this.finishToken(rt.bracketR);case 123:return++this.pos,this.finishToken(rt.braceL);case 125:return++this.pos,this.finishToken(rt.braceR);case 58:return++this.pos,this.finishToken(rt.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(rt.backQuote);case 48:var X=this.input.charCodeAt(this.pos+1);if(X===120||X===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(X===111||X===79)return this.readRadixNumber(8);if(X===98||X===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(D);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(D);case 124:case 38:return this.readToken_pipe_amp(D);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(D);case 60:case 62:return this.readToken_lt_gt(D);case 61:case 33:return this.readToken_eq_excl(D);case 63:return this.readToken_question();case 126:return this.finishOp(rt.prefix,1)}this.raise(this.pos,"Unexpected character '"+yo(D)+"'")},ya.finishOp=function(D,X){var Mt=this.input.slice(this.pos,this.pos+X);return this.pos+=X,this.finishToken(D,Mt)},ya.readRegexp=function(){for(var D,X,Mt=this.pos;;){this.pos>=this.input.length&&this.raise(Mt,"Unterminated regular expression");var it=this.input.charAt(this.pos);if(Dt.test(it)&&this.raise(Mt,"Unterminated regular expression"),D)D=!1;else{if(it==="[")X=!0;else if(it==="]"&&X)X=!1;else if(it==="/"&&!X)break;D=it==="\\"}++this.pos}var fe=this.input.slice(Mt,this.pos);++this.pos;var He=this.pos,br=this.readWord1();this.containsEsc&&this.unexpected(He);var Ur=this.regexpState||(this.regexpState=new Yr(this));Ur.reset(Mt,fe,br),this.validateRegExpFlags(Ur),this.validateRegExpPattern(Ur);var Nr=null;try{Nr=new RegExp(fe,br)}catch(An){}return this.finishToken(rt.regexp,{pattern:fe,flags:br,value:Nr})},ya.readInt=function(D,X,Mt){for(var it=this.options.ecmaVersion>=12&&X===void 0,fe=Mt&&this.input.charCodeAt(this.pos)===48,He=this.pos,br=0,Ur=0,Nr=0,An=X==null?1/0:X;Nr<An;++Nr,++this.pos){var Hn=this.input.charCodeAt(this.pos),Ji=void 0;if(it&&Hn===95){fe&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),Ur===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),Nr===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),Ur=Hn;continue}if(Hn>=97?Ji=Hn-97+10:Hn>=65?Ji=Hn-65+10:Hn>=48&&Hn<=57?Ji=Hn-48:Ji=1/0,Ji>=D)break;Ur=Hn,br=br*D+Ji}return it&&Ur===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===He||X!=null&&this.pos-He!==X?null:br};function Qa(D,X){return X?parseInt(D,8):parseFloat(D.replace(/_/g,""))}function Wo(D){return typeof BigInt!="function"?null:BigInt(D.replace(/_/g,""))}ya.readRadixNumber=function(D){var X=this.pos;this.pos+=2;var Mt=this.readInt(D);return Mt==null&&this.raise(this.start+2,"Expected number in radix "+D),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(Mt=Wo(this.input.slice(X,this.pos)),++this.pos):zt(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(rt.num,Mt)},ya.readNumber=function(D){var X=this.pos;!D&&this.readInt(10,void 0,!0)===null&&this.raise(X,"Invalid number");var Mt=this.pos-X>=2&&this.input.charCodeAt(X)===48;Mt&&this.strict&&this.raise(X,"Invalid number");var it=this.input.charCodeAt(this.pos);if(!Mt&&!D&&this.options.ecmaVersion>=11&&it===110){var fe=Wo(this.input.slice(X,this.pos));return++this.pos,zt(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(rt.num,fe)}Mt&&/[89]/.test(this.input.slice(X,this.pos))&&(Mt=!1),it===46&&!Mt&&(++this.pos,this.readInt(10),it=this.input.charCodeAt(this.pos)),(it===69||it===101)&&!Mt&&(it=this.input.charCodeAt(++this.pos),(it===43||it===45)&&++this.pos,this.readInt(10)===null&&this.raise(X,"Invalid number")),zt(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var He=Qa(this.input.slice(X,this.pos),Mt);return this.finishToken(rt.num,He)},ya.readCodePoint=function(){var D=this.input.charCodeAt(this.pos),X;if(D===123){this.options.ecmaVersion<6&&this.unexpected();var Mt=++this.pos;X=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,X>1114111&&this.invalidStringToken(Mt,"Code point out of bounds")}else X=this.readHexChar(4);return X};function yo(D){return D<=65535?String.fromCharCode(D):(D-=65536,String.fromCharCode((D>>10)+55296,(D&1023)+56320))}ya.readString=function(D){for(var X="",Mt=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var it=this.input.charCodeAt(this.pos);if(it===D)break;it===92?(X+=this.input.slice(Mt,this.pos),X+=this.readEscapedChar(!1),Mt=this.pos):(ge(it,this.options.ecmaVersion>=10)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return X+=this.input.slice(Mt,this.pos++),this.finishToken(rt.string,X)};var Va={};ya.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(D){if(D===Va)this.readInvalidTemplateToken();else throw D}this.inTemplateElement=!1},ya.invalidStringToken=function(D,X){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Va;this.raise(D,X)},ya.readTmplToken=function(){for(var D="",X=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var Mt=this.input.charCodeAt(this.pos);if(Mt===96||Mt===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===rt.template||this.type===rt.invalidTemplate)?Mt===36?(this.pos+=2,this.finishToken(rt.dollarBraceL)):(++this.pos,this.finishToken(rt.backQuote)):(D+=this.input.slice(X,this.pos),this.finishToken(rt.template,D));if(Mt===92)D+=this.input.slice(X,this.pos),D+=this.readEscapedChar(!0),X=this.pos;else if(ge(Mt)){switch(D+=this.input.slice(X,this.pos),++this.pos,Mt){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:D+=`
|
|
`;break;default:D+=String.fromCharCode(Mt);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),X=this.pos}else++this.pos}},ya.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(rt.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},ya.readEscapedChar=function(D){var X=this.input.charCodeAt(++this.pos);switch(++this.pos,X){case 110:return`
|
|
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return yo(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(D){var Mt=this.pos-1;return this.invalidStringToken(Mt,"Invalid escape sequence in template string"),null}default:if(X>=48&&X<=55){var it=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],fe=parseInt(it,8);return fe>255&&(it=it.slice(0,-1),fe=parseInt(it,8)),this.pos+=it.length-1,X=this.input.charCodeAt(this.pos),(it!=="0"||X===56||X===57)&&(this.strict||D)&&this.invalidStringToken(this.pos-1-it.length,D?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(fe)}return ge(X)?"":String.fromCharCode(X)}},ya.readHexChar=function(D){var X=this.pos,Mt=this.readInt(16,D);return Mt===null&&this.invalidStringToken(X,"Bad character escape sequence"),Mt},ya.readWord1=function(){this.containsEsc=!1;for(var D="",X=!0,Mt=this.pos,it=this.options.ecmaVersion>=6;this.pos<this.input.length;){var fe=this.fullCharCodeAtPos();if(P(fe,it))this.pos+=fe<=65535?1:2;else if(fe===92){this.containsEsc=!0,D+=this.input.slice(Mt,this.pos);var He=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var br=this.readCodePoint();(X?zt:P)(br,it)||this.invalidStringToken(He,"Invalid Unicode escape"),D+=yo(br),Mt=this.pos}else break;X=!1}return D+this.input.slice(Mt,this.pos)},ya.readWord=function(){var D=this.readWord1(),X=rt.name;return this.keywords.test(D)&&(X=Me[D]),this.finishToken(X,D)};var Ya="7.4.1";Zt.acorn={Parser:Zt,version:Ya,defaultOptions:ke,Position:Y,SourceLocation:mt,getLineInfo:se,Node:an,TokenType:b,tokTypes:rt,keywordTypes:Me,TokContext:Wn,tokContexts:Dn,isIdentifierChar:P,isIdentifierStart:zt,Token:wa,isNewLine:ge,lineBreak:Dt,lineBreakG:Ee,nonASCIIwhitespace:Ge};function No(D,X){return Zt.parse(D,X)}function Nu(D,X,Mt){return Zt.parseExpressionAt(D,X,Mt)}function ts(D,X){return Zt.tokenizer(D,X)}function bo(D,X){D.prototype=Object.create(X.prototype),D.prototype.constructor=D,D.__proto__=X}function rr(D){var X=typeof Map=="function"?new Map:void 0;return rr=function(it){if(it===null||!Mr(it))return it;if(typeof it!="function")throw new TypeError("Super expression must either be null or a function");if(typeof X!="undefined"){if(X.has(it))return X.get(it);X.set(it,fe)}function fe(){return Ve(it,arguments,kn(this).constructor)}return fe.prototype=Object.create(it.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),rn(fe,it)},rr(D)}function de(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(D){return!1}}function Ve(D,X,Mt){return de()?Ve=Reflect.construct:Ve=function(fe,He,br){var Ur=[null];Ur.push.apply(Ur,He);var Nr=Function.bind.apply(fe,Ur),An=new Nr;return br&&rn(An,br.prototype),An},Ve.apply(null,arguments)}function Mr(D){return Function.toString.call(D).indexOf("[native code]")!==-1}function rn(D,X){return rn=Object.setPrototypeOf||function(it,fe){return it.__proto__=fe,it},rn(D,X)}function kn(D){return kn=Object.setPrototypeOf?Object.getPrototypeOf:function(Mt){return Mt.__proto__||Object.getPrototypeOf(Mt)},kn(D)}var $n=function(D){bo(X,D);function X(){return D.apply(this,arguments)||this}return X}(rr(Error)),Cn=function(D){bo(X,D);function X(){return D.apply(this,arguments)||this}return X}(rr(SyntaxError)),Ki=function(D){bo(X,D);function X(){return D.apply(this,arguments)||this}return X}(rr(ReferenceError)),Fa=function(D){bo(X,D);function X(){return D.apply(this,arguments)||this}return X}(rr(TypeError)),Ss=function(D){bo(X,D);function X(){return D.apply(this,arguments)||this}return X}($n),ko=function(D){bo(X,D);function X(){return D.apply(this,arguments)||this}return X}(Cn),zo=function(D){bo(X,D);function X(){return D.apply(this,arguments)||this}return X}(Ki),oo={UnknownError:[3001,"%0",Ss],ExecutionTimeOutError:[3002,"Script execution timed out after %0ms",Ss],NodeTypeSyntaxError:[1001,"Unknown node type: %0",zo],BinaryOperatorSyntaxError:[1002,"Unknown binary operator: %0",zo],LogicalOperatorSyntaxError:[1003,"Unknown logical operator: %0",zo],UnaryOperatorSyntaxError:[1004,"Unknown unary operator: %0",zo],UpdateOperatorSyntaxError:[1005,"Unknown update operator: %0",zo],ObjectStructureSyntaxError:[1006,"Unknown object structure: %0",zo],AssignmentExpressionSyntaxError:[1007,"Unknown assignment expression: %0",zo],VariableTypeSyntaxError:[1008,"Unknown variable type: %0",zo],ParamTypeSyntaxError:[1009,"Unknown param type: %0",zo],AssignmentTypeSyntaxError:[1010,"Unknown assignment type: %0",zo],FunctionUndefinedReferenceError:[2001,"%0 is not a function",Ki],VariableUndefinedReferenceError:[2002,"%0 is not defined",Ki],IsNotConstructor:[2003,"%0 is not a constructor",Fa]};function Xo(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(D){return!1}}function iu(D,X,Mt){return Xo()?iu=Reflect.construct:iu=function(fe,He,br){var Ur=[null];Ur.push.apply(Ur,He);var Nr=Function.bind.apply(fe,Ur),An=new Nr;return br&&Ko(An,br.prototype),An},iu.apply(null,arguments)}function Ko(D,X){return Ko=Object.setPrototypeOf||function(it,fe){return it.__proto__=fe,it},Ko(D,X)}var Ul="0.0.3";function $c(D,X){Object.defineProperty(D,"name",{value:X,writable:!1,enumerable:!1,configurable:!0})}var Ku=Object.prototype.hasOwnProperty,Ce=Symbol("Break"),Xe=Symbol("Continue"),Cr=Symbol("DefaultCase"),on=Symbol("EmptyStatementReturn"),li=Symbol("WithScopeName"),Di=Symbol("SuperScopeName"),Ba=Symbol("RootScopeName"),xs=Symbol("GlobalScopeName");function es(D){return typeof D=="function"}var ls=function(){function D(Mt){this.interpreter=Mt}var X=D.prototype;return X.generator=function(){var it=this.interpreter;function fe(){return this.getCurrentScope()}function He(){return this.getGlobalScope()}function br(){return this.getCurrentContext()}return{getOptions:it.getOptions.bind(it),getCurrentScope:fe.bind(it),getGlobalScope:He.bind(it),getCurrentContext:br.bind(it),getExecStartTime:it.getExecStartTime.bind(it)}},D}();function zs(D,X,Mt){if(Mt===void 0&&(Mt=!0),!(D instanceof ls))throw new Error("Illegal call");if(typeof X!="string")return X;if(X){var it=D.generator(),fe=it.getOptions(),He={timeout:fe.timeout,_initEnv:function(){Mt||this.setCurrentContext(it.getCurrentContext()),this.execStartTime=it.getExecStartTime(),this.execEndTime=this.execStartTime}},br=Mt?it.getGlobalScope():it.getCurrentScope(),Ur=new js(br,He);return Ur.evaluate(X)}}Object.defineProperty(zs,"__IS_EVAL_FUNC",{value:!0,writable:!1,enumerable:!1,configurable:!1});function Qu(D){if(!(D instanceof ls))throw new Error("Illegal call");for(var X=D.generator(),Mt=arguments.length,it=new Array(Mt>1?Mt-1:0),fe=1;fe<Mt;fe++)it[fe-1]=arguments[fe];var He=it.pop(),br=new js(X.getGlobalScope(),X.getOptions()),Ur=`
|
|
(function anonymous(`+it.join(",")+`){
|
|
`+He+`
|
|
});
|
|
`;return br.evaluate(Ur)}Object.defineProperty(Qu,"__IS_FUNCTION_FUNC",{value:!0,writable:!1,enumerable:!1,configurable:!1});var Cu=function(X){this.value=X},Ks=function(X){this.value=X},Au=function(X){this.value=X},zu=function(X,Mt,it){Mt===void 0&&(Mt=null),this.name=it,this.parent=Mt,this.data=X,this.labelStack=[]};function xl(){}function Ju(D,X){return D===void 0&&(D=null),new zu(Object.create(null),D,X)}function Uu(D){return Object.create(D)}var Uo={NaN:NaN,Infinity:1/0,undefined:void 0,Object,Array,String,Boolean,Number,Date,RegExp,Error,URIError,TypeError,RangeError,SyntaxError,ReferenceError,Float32Array,Float64Array,Uint32Array,Math,parseInt,parseFloat,isNaN,isFinite,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,escape,unescape,eval:zs,Function:Qu};typeof JSON!="undefined"&&(Uo.JSON=JSON),typeof Promise!="undefined"&&(Uo.Promise=Promise),typeof Set!="undefined"&&(Uo.Set=Set),typeof Map!="undefined"&&(Uo.Map=Map),typeof Symbol!="undefined"&&(Uo.Symbol=Symbol),typeof Proxy!="undefined"&&(Uo.Proxy=Proxy),typeof WeakMap!="undefined"&&(Uo.WeakMap=WeakMap),typeof WeakSet!="undefined"&&(Uo.WeakSet=WeakSet),typeof Reflect!="undefined"&&(Uo.Reflect=Reflect);var js=function(){function D(Mt,it){Mt===void 0&&(Mt=D.global),it===void 0&&(it={}),this.sourceList=[],this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null),this.isVarDeclMode=!1,this.lastExecNode=null,this.isRunning=!1,this.options={ecmaVersion:it.ecmaVersion||D.ecmaVersion,timeout:it.timeout||0,rootContext:it.rootContext,globalContextInFunction:it.globalContextInFunction===void 0?D.globalContextInFunction:it.globalContextInFunction,_initEnv:it._initEnv},this.context=Mt||Object.create(null),this.callStack=[],this.initEnvironment(this.context)}var X=D.prototype;return X.initEnvironment=function(it){var fe;if(it instanceof zu)fe=it;else{var He=null,br=this.createSuperScope(it);this.options.rootContext&&(He=new zu(Uu(this.options.rootContext),br,Ba)),fe=new zu(it,He||br,xs)}this.globalScope=fe,this.currentScope=this.globalScope,this.globalContext=fe.data,this.currentContext=fe.data,this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null),this.execStartTime=Date.now(),this.execEndTime=this.execStartTime;var Ur=this.options._initEnv;Ur&&Ur.call(this)},X.getExecStartTime=function(){return this.execStartTime},X.getExecutionTime=function(){return this.execEndTime-this.execStartTime},X.setExecTimeout=function(it){it===void 0&&(it=0),this.options.timeout=it},X.getOptions=function(){return this.options},X.getGlobalScope=function(){return this.globalScope},X.getCurrentScope=function(){return this.currentScope},X.getCurrentContext=function(){return this.currentContext},X.isInterruptThrow=function(it){return it instanceof Ss||it instanceof zo||it instanceof ko},X.createSuperScope=function(it){var fe=Object.assign({},Uo),He=Object.keys(fe);return He.forEach(function(br){br in it&&delete fe[br]}),new zu(fe,null,Di)},X.setCurrentContext=function(it){this.currentContext=it},X.setCurrentScope=function(it){this.currentScope=it},X.evaluate=function(it){it===void 0&&(it="");var fe;if(it)return fe=No(it,{ranges:!0,locations:!0,ecmaVersion:this.options.ecmaVersion||D.ecmaVersion}),this.evaluateNode(fe,it)},X.appendCode=function(it){return this.evaluate(it)},X.evaluateNode=function(it,fe){var He=this;fe===void 0&&(fe=""),this.value=void 0,this.source=fe,this.sourceList.push(fe),this.isRunning=!0,this.execStartTime=Date.now(),this.execEndTime=this.execStartTime,this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null);var br=this.getCurrentScope(),Ur=this.getCurrentContext(),Nr=br.labelStack.concat([]),An=this.callStack.concat([]),Hn=function(){He.setCurrentScope(br),He.setCurrentContext(Ur),br.labelStack=Nr,He.callStack=An};try{var Ji=this.createClosure(it);this.addDeclarationsToScope(this.collectDeclVars,this.collectDeclFuncs,this.getCurrentScope()),Ji()}catch(ka){throw ka}finally{Hn(),this.execEndTime=Date.now()}return this.isRunning=!1,this.getValue()},X.createErrorMessage=function(it,fe,He){var br=it[1].replace("%0",String(fe));return He!==null&&(br+=this.getNodePosition(He||this.lastExecNode)),br},X.createError=function(it,fe){return new fe(it)},X.createThrowError=function(it,fe){return this.createError(it,fe)},X.createInternalThrowError=function(it,fe,He){return this.createError(this.createErrorMessage(it,fe,He),it[2])},X.checkTimeout=function(){if(!this.isRunning)return!1;var it=this.options.timeout||0,fe=Date.now();return fe-this.execStartTime>it},X.getNodePosition=function(it){if(it){var fe="";return it.loc?" ["+it.loc.start.line+":"+it.loc.start.column+"]"+fe:""}return""},X.createClosure=function(it){var fe=this,He;switch(it.type){case"BinaryExpression":He=this.binaryExpressionHandler(it);break;case"LogicalExpression":He=this.logicalExpressionHandler(it);break;case"UnaryExpression":He=this.unaryExpressionHandler(it);break;case"UpdateExpression":He=this.updateExpressionHandler(it);break;case"ObjectExpression":He=this.objectExpressionHandler(it);break;case"ArrayExpression":He=this.arrayExpressionHandler(it);break;case"CallExpression":He=this.callExpressionHandler(it);break;case"NewExpression":He=this.newExpressionHandler(it);break;case"MemberExpression":He=this.memberExpressionHandler(it);break;case"ThisExpression":He=this.thisExpressionHandler(it);break;case"SequenceExpression":He=this.sequenceExpressionHandler(it);break;case"Literal":He=this.literalHandler(it);break;case"Identifier":He=this.identifierHandler(it);break;case"AssignmentExpression":He=this.assignmentExpressionHandler(it);break;case"FunctionDeclaration":He=this.functionDeclarationHandler(it);break;case"VariableDeclaration":He=this.variableDeclarationHandler(it);break;case"BlockStatement":case"Program":He=this.programHandler(it);break;case"ExpressionStatement":He=this.expressionStatementHandler(it);break;case"EmptyStatement":He=this.emptyStatementHandler(it);break;case"ReturnStatement":He=this.returnStatementHandler(it);break;case"FunctionExpression":He=this.functionExpressionHandler(it);break;case"IfStatement":He=this.ifStatementHandler(it);break;case"ConditionalExpression":He=this.conditionalExpressionHandler(it);break;case"ForStatement":He=this.forStatementHandler(it);break;case"WhileStatement":He=this.whileStatementHandler(it);break;case"DoWhileStatement":He=this.doWhileStatementHandler(it);break;case"ForInStatement":He=this.forInStatementHandler(it);break;case"WithStatement":He=this.withStatementHandler(it);break;case"ThrowStatement":He=this.throwStatementHandler(it);break;case"TryStatement":He=this.tryStatementHandler(it);break;case"ContinueStatement":He=this.continueStatementHandler(it);break;case"BreakStatement":He=this.breakStatementHandler(it);break;case"SwitchStatement":He=this.switchStatementHandler(it);break;case"LabeledStatement":He=this.labeledStatementHandler(it);break;case"DebuggerStatement":He=this.debuggerStatementHandler(it);break;default:throw this.createInternalThrowError(oo.NodeTypeSyntaxError,it.type,it)}return function(){var br=fe.options.timeout;if(br&&br>0&&fe.checkTimeout())throw fe.createInternalThrowError(oo.ExecutionTimeOutError,br,null);return fe.lastExecNode=it,He.apply(void 0,arguments)}},X.binaryExpressionHandler=function(it){var fe=this,He=this.createClosure(it.left),br=this.createClosure(it.right);return function(){var Ur=He(),Nr=br();switch(it.operator){case"==":return Ur==Nr;case"!=":return Ur!=Nr;case"===":return Ur===Nr;case"!==":return Ur!==Nr;case"<":return Ur<Nr;case"<=":return Ur<=Nr;case">":return Ur>Nr;case">=":return Ur>=Nr;case"<<":return Ur<<Nr;case">>":return Ur>>Nr;case">>>":return Ur>>>Nr;case"+":return Ur+Nr;case"-":return Ur-Nr;case"*":return Ur*Nr;case"**":return Math.pow(Ur,Nr);case"/":return Ur/Nr;case"%":return Ur%Nr;case"|":return Ur|Nr;case"^":return Ur^Nr;case"&":return Ur&Nr;case"in":return Ur in Nr;case"instanceof":return Ur instanceof Nr;default:throw fe.createInternalThrowError(oo.BinaryOperatorSyntaxError,it.operator,it)}}},X.logicalExpressionHandler=function(it){var fe=this,He=this.createClosure(it.left),br=this.createClosure(it.right);return function(){switch(it.operator){case"||":return He()||br();case"&&":return He()&&br();default:throw fe.createInternalThrowError(oo.LogicalOperatorSyntaxError,it.operator,it)}}},X.unaryExpressionHandler=function(it){var fe=this;switch(it.operator){case"delete":var He=this.createObjectGetter(it.argument),br=this.createNameGetter(it.argument);return function(){var Hn=He(),Ji=br();return delete Hn[Ji]};default:var Ur;if(it.operator==="typeof"&&it.argument.type==="Identifier"){var Nr=this.createObjectGetter(it.argument),An=this.createNameGetter(it.argument);Ur=function(){return Nr()[An()]}}else Ur=this.createClosure(it.argument);return function(){var Hn=Ur();switch(it.operator){case"-":return-Hn;case"+":return+Hn;case"!":return!Hn;case"~":return~Hn;case"void":return;case"typeof":return typeof Hn;default:throw fe.createInternalThrowError(oo.UnaryOperatorSyntaxError,it.operator,it)}}}},X.updateExpressionHandler=function(it){var fe=this,He=this.createObjectGetter(it.argument),br=this.createNameGetter(it.argument);return function(){var Ur=He(),Nr=br();switch(fe.assertVariable(Ur,Nr,it),it.operator){case"++":return it.prefix?++Ur[Nr]:Ur[Nr]++;case"--":return it.prefix?--Ur[Nr]:Ur[Nr]--;default:throw fe.createInternalThrowError(oo.UpdateOperatorSyntaxError,it.operator,it)}}},X.objectExpressionHandler=function(it){var fe=this,He=[];function br(Nr){return Nr.type==="Identifier"?Nr.name:Nr.type==="Literal"?Nr.value:this.throwError(oo.ObjectStructureSyntaxError,Nr.type,Nr)}var Ur=Object.create(null);return it.properties.forEach(function(Nr){var An=Nr.kind,Hn=br(Nr.key);(!Ur[Hn]||An==="init")&&(Ur[Hn]={}),Ur[Hn][An]=fe.createClosure(Nr.value),He.push({key:Hn,property:Nr})}),function(){for(var Nr={},An=He.length,Hn=0;Hn<An;Hn++){var Ji=He[Hn],ka=Ji.key,Sa=Ur[ka],eo=Sa.init?Sa.init():void 0,Eo=Sa.get?Sa.get():function(){},So=Sa.set?Sa.set():function(bl){};if("set"in Sa||"get"in Sa){var ro={configurable:!0,enumerable:!0,get:Eo,set:So};Object.defineProperty(Nr,ka,ro)}else{var pu=Ji.property,Il=pu.kind;pu.key.type==="Identifier"&&pu.value.type==="FunctionExpression"&&Il==="init"&&!pu.value.id&&$c(eo,pu.key.name),Nr[ka]=eo}}return Nr}},X.arrayExpressionHandler=function(it){var fe=this,He=it.elements.map(function(br){return br&&fe.createClosure(br)});return function(){for(var br=He.length,Ur=Array(br),Nr=0;Nr<br;Nr++){var An=He[Nr];An&&(Ur[Nr]=An())}return Ur}},X.safeObjectGet=function(it,fe,He){return it[fe]},X.createCallFunctionGetter=function(it){var fe=this;switch(it.type){case"MemberExpression":var He=this.createClosure(it.object),br=this.createMemberKeyGetter(it),Ur=this.source;return function(){var An=He(),Hn=br(),Ji=fe.safeObjectGet(An,Hn,it);if(!Ji||!es(Ji)){var ka=Ur.slice(it.start,it.end);throw fe.createInternalThrowError(oo.FunctionUndefinedReferenceError,ka,it)}return Ji.__IS_EVAL_FUNC?function(Sa){return Ji(new ls(fe),Sa,!0)}:Ji.__IS_FUNCTION_FUNC?function(){for(var Sa=arguments.length,eo=new Array(Sa),Eo=0;Eo<Sa;Eo++)eo[Eo]=arguments[Eo];return Ji.apply(void 0,[new ls(fe)].concat(eo))}:Ji.bind(An)};default:var Nr=this.createClosure(it);return function(){var An="";it.type==="Identifier"&&(An=it.name);var Hn=Nr();if(!Hn||!es(Hn))throw fe.createInternalThrowError(oo.FunctionUndefinedReferenceError,An,it);if(it.type==="Identifier"&&Hn.__IS_EVAL_FUNC&&An==="eval")return function(Sa){var eo=fe.getScopeFromName(An,fe.getCurrentScope()),Eo=eo.name===Di||eo.name===xs||eo.name===Ba;return Hn(new ls(fe),Sa,!Eo)};if(Hn.__IS_EVAL_FUNC)return function(Sa){return Hn(new ls(fe),Sa,!0)};if(Hn.__IS_FUNCTION_FUNC)return function(){for(var Sa=arguments.length,eo=new Array(Sa),Eo=0;Eo<Sa;Eo++)eo[Eo]=arguments[Eo];return Hn.apply(void 0,[new ls(fe)].concat(eo))};var Ji=fe.options.globalContextInFunction;if(it.type==="Identifier"){var ka=fe.getIdentifierScope(it);ka.name===li&&(Ji=ka.data)}return Hn.bind(Ji)}}},X.callExpressionHandler=function(it){var fe=this,He=this.createCallFunctionGetter(it.callee),br=it.arguments.map(function(Ur){return fe.createClosure(Ur)});return function(){return He().apply(void 0,br.map(function(Ur){return Ur()}))}},X.functionExpressionHandler=function(it){var fe=this,He=this,br=this.source,Ur=this.collectDeclVars,Nr=this.collectDeclFuncs;this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null);var An=it.id?it.id.name:"",Hn=it.params.length,Ji=it.params.map(function(Eo){return fe.createParamNameGetter(Eo)}),ka=this.createClosure(it.body),Sa=this.collectDeclVars,eo=this.collectDeclFuncs;return this.collectDeclVars=Ur,this.collectDeclFuncs=Nr,function(){var Eo=He.getCurrentScope(),So=function ro(){for(var pu=arguments.length,Il=new Array(pu),bl=0;bl<pu;bl++)Il[bl]=arguments[bl];He.callStack.push(""+An);var Vl=He.getCurrentScope(),ul=Ju(Eo,"FunctionScope("+An+")");He.setCurrentScope(ul),He.addDeclarationsToScope(Sa,eo,ul),An&&(ul.data[An]=ro),ul.data.arguments=arguments,Ji.forEach(function(cs,pe){ul.data[cs()]=Il[pe]});var Gl=He.getCurrentContext();He.setCurrentContext(this);var Vu=ka();if(He.setCurrentContext(Gl),He.setCurrentScope(Vl),He.callStack.pop(),Vu instanceof Cu)return Vu.value};return $c(So,An),Object.defineProperty(So,"length",{value:Hn,writable:!1,enumerable:!1,configurable:!0}),Object.defineProperty(So,"toString",{value:function(){return br.slice(it.start,it.end)},writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(So,"valueOf",{value:function(){return br.slice(it.start,it.end)},writable:!0,configurable:!0,enumerable:!1}),So}},X.newExpressionHandler=function(it){var fe=this,He=this.source,br=this.createClosure(it.callee),Ur=it.arguments.map(function(Nr){return fe.createClosure(Nr)});return function(){var Nr=br();if(!es(Nr)||Nr.__IS_EVAL_FUNC){var An=it.callee,Hn=He.slice(An.start,An.end);throw fe.createInternalThrowError(oo.IsNotConstructor,Hn,it)}return Nr.__IS_FUNCTION_FUNC?Nr.apply(void 0,[new ls(fe)].concat(Ur.map(function(Ji){return Ji()}))):iu(Nr,Ur.map(function(Ji){return Ji()}))}},X.memberExpressionHandler=function(it){var fe=this.createClosure(it.object),He=this.createMemberKeyGetter(it);return function(){var br=fe(),Ur=He();return br[Ur]}},X.thisExpressionHandler=function(it){var fe=this;return function(){return fe.getCurrentContext()}},X.sequenceExpressionHandler=function(it){var fe=this,He=it.expressions.map(function(br){return fe.createClosure(br)});return function(){for(var br,Ur=He.length,Nr=0;Nr<Ur;Nr++){var An=He[Nr];br=An()}return br}},X.literalHandler=function(it){return function(){return it.regex?new RegExp(it.regex.pattern,it.regex.flags):it.value}},X.identifierHandler=function(it){var fe=this;return function(){var He=fe.getCurrentScope(),br=fe.getScopeDataFromName(it.name,He);return fe.assertVariable(br,it.name,it),br[it.name]}},X.getIdentifierScope=function(it){var fe=this.getCurrentScope(),He=this.getScopeFromName(it.name,fe);return He},X.assignmentExpressionHandler=function(it){var fe=this;it.left.type==="Identifier"&&it.right.type==="FunctionExpression"&&!it.right.id&&(it.right.id={type:"Identifier",name:it.left.name});var He=this.createObjectGetter(it.left),br=this.createNameGetter(it.left),Ur=this.createClosure(it.right);return function(){var Nr=He(),An=br(),Hn=Ur();switch(it.operator!=="="&&fe.assertVariable(Nr,An,it),it.operator){case"=":return Nr[An]=Hn;case"+=":return Nr[An]+=Hn;case"-=":return Nr[An]-=Hn;case"*=":return Nr[An]*=Hn;case"**=":return Nr[An]=Math.pow(Nr[An],Hn);case"/=":return Nr[An]/=Hn;case"%=":return Nr[An]%=Hn;case"<<=":return Nr[An]<<=Hn;case">>=":return Nr[An]>>=Hn;case">>>=":return Nr[An]>>>=Hn;case"&=":return Nr[An]&=Hn;case"^=":return Nr[An]^=Hn;case"|=":return Nr[An]|=Hn;default:throw fe.createInternalThrowError(oo.AssignmentExpressionSyntaxError,it.type,it)}}},X.functionDeclarationHandler=function(it){if(it.id){var fe=this.functionExpressionHandler(it);Object.defineProperty(fe,"isFunctionDeclareClosure",{value:!0,writable:!1,configurable:!1,enumerable:!1}),this.funcDeclaration(it.id.name,fe)}return function(){return on}},X.getVariableName=function(it){if(it.type==="Identifier")return it.name;throw this.createInternalThrowError(oo.VariableTypeSyntaxError,it.type,it)},X.variableDeclarationHandler=function(it){for(var fe=this,He,br=[],Ur=0;Ur<it.declarations.length;Ur++){var Nr=it.declarations[Ur];this.varDeclaration(this.getVariableName(Nr.id)),Nr.init&&br.push({type:"AssignmentExpression",operator:"=",left:Nr.id,right:Nr.init})}return br.length&&(He=this.createClosure({type:"BlockStatement",body:br})),function(){if(He){var An=fe.isVarDeclMode;fe.isVarDeclMode=!0,He(),fe.isVarDeclMode=An}return on}},X.assertVariable=function(it,fe,He){if(it===this.globalScope.data&&!(fe in it))throw this.createInternalThrowError(oo.VariableUndefinedReferenceError,fe,He)},X.programHandler=function(it){var fe=this,He=it.body.map(function(br){return fe.createClosure(br)});return function(){for(var br=on,Ur=0;Ur<He.length;Ur++){var Nr=He[Ur],An=fe.setValue(Nr());if(An!==on&&(br=An,br instanceof Cu||br instanceof Ks||br instanceof Au||br===Ce||br===Xe))break}return br}},X.expressionStatementHandler=function(it){return this.createClosure(it.expression)},X.emptyStatementHandler=function(it){return function(){return on}},X.returnStatementHandler=function(it){var fe=it.argument?this.createClosure(it.argument):xl;return function(){return new Cu(fe())}},X.ifStatementHandler=function(it){var fe=this.createClosure(it.test),He=this.createClosure(it.consequent),br=it.alternate?this.createClosure(it.alternate):function(){return on};return function(){return fe()?He():br()}},X.conditionalExpressionHandler=function(it){return this.ifStatementHandler(it)},X.forStatementHandler=function(it){var fe=this,He=xl,br=it.test?this.createClosure(it.test):function(){return!0},Ur=xl,Nr=this.createClosure(it.body);return it.type==="ForStatement"&&(He=it.init?this.createClosure(it.init):He,Ur=it.update?this.createClosure(it.update):xl),function(An){var Hn,Ji=on,ka=it.type==="DoWhileStatement";for(An&&An.type==="LabeledStatement"&&(Hn=An.label.name),He();ka||br();Ur()){ka=!1;var Sa=fe.setValue(Nr());if(!(Sa===on||Sa===Xe)){if(Sa===Ce)break;if(Ji=Sa,Ji instanceof Au&&Ji.value===Hn){Ji=on;continue}if(Ji instanceof Cu||Ji instanceof Ks||Ji instanceof Au)break}}return Ji}},X.whileStatementHandler=function(it){return this.forStatementHandler(it)},X.doWhileStatementHandler=function(it){return this.forStatementHandler(it)},X.forInStatementHandler=function(it){var fe=this,He=it.left,br=this.createClosure(it.right),Ur=this.createClosure(it.body);return it.left.type==="VariableDeclaration"&&(this.createClosure(it.left)(),He=it.left.declarations[0].id),function(Nr){var An,Hn=on,Ji;Nr&&Nr.type==="LabeledStatement"&&(An=Nr.label.name);var ka=br();for(Ji in ka){fe.assignmentExpressionHandler({type:"AssignmentExpression",operator:"=",left:He,right:{type:"Literal",value:Ji}})();var Sa=fe.setValue(Ur());if(!(Sa===on||Sa===Xe)){if(Sa===Ce)break;if(Hn=Sa,Hn instanceof Au&&Hn.value===An){Hn=on;continue}if(Hn instanceof Cu||Hn instanceof Ks||Hn instanceof Au)break}}return Hn}},X.withStatementHandler=function(it){var fe=this,He=this.createClosure(it.object),br=this.createClosure(it.body);return function(){var Ur=He(),Nr=fe.getCurrentScope(),An=new zu(Ur,Nr,li);fe.setCurrentScope(An);var Hn=fe.setValue(br());return fe.setCurrentScope(Nr),Hn}},X.throwStatementHandler=function(it){var fe=this,He=this.createClosure(it.argument);return function(){throw fe.setValue(void 0),He()}},X.tryStatementHandler=function(it){var fe=this,He=this.createClosure(it.block),br=it.handler?this.catchClauseHandler(it.handler):null,Ur=it.finalizer?this.createClosure(it.finalizer):null;return function(){var Nr=fe.getCurrentScope(),An=fe.getCurrentContext(),Hn=Nr.labelStack.concat([]),Ji=fe.callStack.concat([]),ka=on,Sa,eo,Eo=function(){fe.setCurrentScope(Nr),fe.setCurrentContext(An),Nr.labelStack=Hn,fe.callStack=Ji};try{ka=fe.setValue(He()),ka instanceof Cu&&(Sa=ka)}catch(So){if(Eo(),fe.isInterruptThrow(So))throw So;if(br)try{ka=fe.setValue(br(So)),ka instanceof Cu&&(Sa=ka)}catch(ro){if(Eo(),fe.isInterruptThrow(ro))throw ro;eo=ro}}if(Ur)try{ka=Ur(),ka instanceof Cu&&(Sa=ka)}catch(So){if(Eo(),fe.isInterruptThrow(So))throw So;eo=So}if(eo)throw eo;return Sa||ka}},X.catchClauseHandler=function(it){var fe=this,He=this.createParamNameGetter(it.param),br=this.createClosure(it.body);return function(Ur){var Nr,An=fe.getCurrentScope(),Hn=An.data,Ji=He(),ka=Ku.call(Hn,Ji),Sa=Hn[Ji];return Hn[Ji]=Ur,Nr=br(),ka?Hn[Ji]=Sa:delete Hn[Ji],Nr}},X.continueStatementHandler=function(it){return function(){return it.label?new Au(it.label.name):Xe}},X.breakStatementHandler=function(it){return function(){return it.label?new Ks(it.label.name):Ce}},X.switchStatementHandler=function(it){var fe=this,He=this.createClosure(it.discriminant),br=it.cases.map(function(Ur){return fe.switchCaseHandler(Ur)});return function(){for(var Ur=He(),Nr=!1,An,Hn,Ji,ka=0;ka<br.length;ka++){var Sa=br[ka](),eo=Sa.testClosure();if(eo===Cr){Ji=Sa;continue}if(Nr||eo===Ur){if(Nr=!0,Hn=fe.setValue(Sa.bodyClosure()),Hn===on)continue;if(Hn===Ce||(An=Hn,An instanceof Cu||An instanceof Ks||An instanceof Au||An===Xe))break}}if(!Nr&&Ji){Hn=fe.setValue(Ji.bodyClosure());var Eo=Hn===on||Hn===Ce||Hn===Xe;Eo||(An=Hn)}return An}},X.switchCaseHandler=function(it){var fe=it.test?this.createClosure(it.test):function(){return Cr},He=this.createClosure({type:"BlockStatement",body:it.consequent});return function(){return{testClosure:fe,bodyClosure:He}}},X.labeledStatementHandler=function(it){var fe=this,He=it.label.name,br=this.createClosure(it.body);return function(){var Ur,Nr=fe.getCurrentScope();return Nr.labelStack.push(He),Ur=br(it),Ur instanceof Ks&&Ur.value===He&&(Ur=on),Nr.labelStack.pop(),Ur}},X.debuggerStatementHandler=function(it){return function(){debugger;return on}},X.createParamNameGetter=function(it){if(it.type==="Identifier")return function(){return it.name};throw this.createInternalThrowError(oo.ParamTypeSyntaxError,it.type,it)},X.createObjectKeyGetter=function(it){var fe;return it.type==="Identifier"?fe=function(){return it.name}:fe=this.createClosure(it),function(){return fe()}},X.createMemberKeyGetter=function(it){return it.computed?this.createClosure(it.property):this.createObjectKeyGetter(it.property)},X.createObjectGetter=function(it){var fe=this;switch(it.type){case"Identifier":return function(){return fe.getScopeDataFromName(it.name,fe.getCurrentScope())};case"MemberExpression":return this.createClosure(it.object);default:throw this.createInternalThrowError(oo.AssignmentTypeSyntaxError,it.type,it)}},X.createNameGetter=function(it){switch(it.type){case"Identifier":return function(){return it.name};case"MemberExpression":return this.createMemberKeyGetter(it);default:throw this.createInternalThrowError(oo.AssignmentTypeSyntaxError,it.type,it)}},X.varDeclaration=function(it){var fe=this.collectDeclVars;fe[it]=void 0},X.funcDeclaration=function(it,fe){var He=this.collectDeclFuncs;He[it]=fe},X.addDeclarationsToScope=function(it,fe,He){var br=He.data;for(var Ur in fe){var Nr=fe[Ur];br[Ur]=Nr&&Nr()}for(var An in it)An in br||(br[An]=void 0)},X.getScopeValue=function(it,fe){var He=this.getScopeFromName(it,fe);return He.data[it]},X.getScopeDataFromName=function(it,fe){return this.getScopeFromName(it,fe).data},X.getScopeFromName=function(it,fe){var He=fe;do if(it in He.data)return He;while(He=He.parent);return this.globalScope},X.setValue=function(it){var fe=this.callStack.length;return this.isVarDeclMode||fe||it===on||it===Ce||it===Xe||it instanceof Ks||it instanceof Au||(this.value=it instanceof Cu?it.value:it),it},X.getValue=function(){return this.value},D}();js.version=Ul,js.eval=zs,js.Function=Qu,js.ecmaVersion=5,js.globalContextInFunction=void 0,js.global=Object.create(null);function Rc(D){return D===void 0&&(D=Object.create(null)),D}function qc(D,X,Mt){X===void 0&&(X=[]),Mt===void 0&&(Mt={});var it=Mt.parsingContext,fe=Mt.timeout===void 0?0:Mt.timeout,He=`
|
|
(function anonymous(`+X.join(",")+`){
|
|
`+D+`
|
|
});
|
|
`,br=new js(it,{ecmaVersion:Mt.ecmaVersion,timeout:fe,rootContext:Mt.rootContext,globalContextInFunction:Mt.globalContextInFunction});return br.evaluate(He)}function Tu(D,X,Mt){var it=new js(X,Mt);return it.evaluate(D)}var Zl=Tu,Cs=function(){function D(Mt){this._code=Mt}var X=D.prototype;return X.runInContext=function(it){return Tu(this._code,it)},X.runInNewContext=function(it){return Tu(this._code,it)},D}(),Zu=function(D,X,Mt){return Tu(D,X,Mt)};function ja(){for(var D=arguments.length,X=new Array(D),Mt=0;Mt<D;Mt++)X[Mt]=arguments[Mt];var it=X.pop();return qc(it||"",X)}var Dc=Zu},86105:function(pn,Ot,nt){var kt;(function(gt,k,Et,K){"use strict";var yt=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,J=typeof wx!="undefined"&&wx!==null&&(typeof wx.request!="undefined"||typeof wx.miniProgram!="undefined"),pt=yt||J,et=["","webkit","Moz","MS","ms","o"],_e=pt?"":k.createElement("div"),ot="function",ut=Math.round,zt=Math.abs,P=Date.now;function b(Ce,Xe,Cr){return setTimeout(Ee(Ce,Cr),Xe)}function W(Ce,Xe,Cr){return Array.isArray(Ce)?(le(Ce,Cr[Xe],Cr),!0):!1}function le(Ce,Xe,Cr){var on;if(Ce)if(Ce.forEach)Ce.forEach(Xe,Cr);else if(Ce.length!==K)for(on=0;on<Ce.length;)Xe.call(Cr,Ce[on],on,Ce),on++;else for(on in Ce)Ce.hasOwnProperty(on)&&Xe.call(Cr,Ce[on],on,Ce)}function be(Ce,Xe,Cr){var on="DEPRECATED METHOD: "+Xe+`
|
|
`+Cr+` AT
|
|
`;return function(){var li=new Error("get-stack-trace"),Di=li&&li.stack?li.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",Ba=gt.console&&(gt.console.warn||gt.console.log);return Ba&&Ba.call(gt.console,on,Di),Ce.apply(this,arguments)}}var Me;typeof Object.assign!="function"?Me=function(Xe){if(Xe===K||Xe===null)throw new TypeError("Cannot convert undefined or null to object");for(var Cr=Object(Xe),on=1;on<arguments.length;on++){var li=arguments[on];if(li!==K&&li!==null)for(var Di in li)li.hasOwnProperty(Di)&&(Cr[Di]=li[Di])}return Cr}:Me=Object.assign;var At=be(function(Xe,Cr,on){for(var li=Object.keys(Cr),Di=0;Di<li.length;)(!on||on&&Xe[li[Di]]===K)&&(Xe[li[Di]]=Cr[li[Di]]),Di++;return Xe},"extend","Use `assign`."),rt=be(function(Xe,Cr){return At(Xe,Cr,!0)},"merge","Use `assign`.");function Dt(Ce,Xe,Cr){var on=Xe.prototype,li;li=Ce.prototype=Object.create(on),li.constructor=Ce,li._super=on,Cr&&Me(li,Cr)}function Ee(Ce,Xe){return function(){return Ce.apply(Xe,arguments)}}function ge(Ce,Xe){return typeof Ce==ot?Ce.apply(Xe&&Xe[0]||K,Xe):Ce}function Ge(Ce,Xe){return Ce===K?Xe:Ce}function Ue(Ce,Xe,Cr){le(Jt(Xe),function(on){Ce.addEventListener(on,Cr,!1)})}function xe(Ce,Xe,Cr){le(Jt(Xe),function(on){Ce.removeEventListener(on,Cr,!1)})}function Ke(Ce,Xe){for(;Ce;){if(Ce==Xe)return!0;Ce=Ce.parentNode}return!1}function Lt(Ce,Xe){return Ce.indexOf(Xe)>-1}function Jt(Ce){return Ce.trim().split(/\s+/g)}function ft(Ce,Xe,Cr){if(Ce.indexOf&&!Cr)return Ce.indexOf(Xe);for(var on=0;on<Ce.length;){if(Cr&&Ce[on][Cr]==Xe||!Cr&&Ce[on]===Xe)return on;on++}return-1}function St(Ce){return Array.prototype.slice.call(Ce,0)}function Y(Ce,Xe,Cr){for(var on=[],li=[],Di=0;Di<Ce.length;){var Ba=Xe?Ce[Di][Xe]:Ce[Di];ft(li,Ba)<0&&on.push(Ce[Di]),li[Di]=Ba,Di++}return Cr&&(Xe?on=on.sort(function(es,ls){return es[Xe]>ls[Xe]}):on=on.sort()),on}function mt(Ce,Xe){for(var Cr,on,li=Xe[0].toUpperCase()+Xe.slice(1),Di=0;Di<et.length;){if(Cr=et[Di],on=Cr?Cr+li:Xe,on in Ce)return on;Di++}return K}var se=1;function ke(){return se++}function Le(Ce){var Xe=Ce.ownerDocument||Ce;return Xe.defaultView||Xe.parentWindow||gt}var Be=/mobile|tablet|ip(ad|hone|od)|android/i,Bt="ontouchstart"in gt,ee=mt(gt,"PointerEvent")!==K,me=Bt&&Be.test(navigator.userAgent),Yt="touch",qe="pen",vr="mouse",ie="kinect",qt=25,bt=1,Xt=2,$t=4,xt=8,wt=1,ue=2,Ie=4,Ne=8,Zt=16,Ct=ue|Ie,Tt=Ne|Zt,Nt=Ct|Tt,tt=["x","y"],vt=["clientX","clientY"];function Ht(Ce,Xe){var Cr=this;this.manager=Ce,this.callback=Xe,this.element=Ce.element,this.target=Ce.options.inputTarget,this.domHandler=function(on){ge(Ce.options.enable,[Ce])&&Cr.handler(on)},this.init()}Ht.prototype={handler:function(){},init:function(){this.evEl&&Ue(this.element,this.evEl,this.domHandler),this.evTarget&&Ue(this.target,this.evTarget,this.domHandler),this.evWin&&Ue(Le(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&xe(this.element,this.evEl,this.domHandler),this.evTarget&&xe(this.target,this.evTarget,this.domHandler),this.evWin&&xe(Le(this.element),this.evWin,this.domHandler)}};function he(Ce){var Xe,Cr=Ce.options.inputClass;return Cr?Xe=Cr:ee?Xe=Ze:me?Xe=Yr:Bt?Xe=tn:Xe=Xn,new Xe(Ce,jt)}function jt(Ce,Xe,Cr){var on=Cr.pointers.length,li=Cr.changedPointers.length,Di=Xe&bt&&on-li===0,Ba=Xe&($t|xt)&&on-li===0;Cr.isFirst=!!Di,Cr.isFinal=!!Ba,Di&&(Ce.session={}),Cr.eventType=Xe,Te(Ce,Cr),Ce.emit("hammer.input",Cr),Ce.recognize(Cr),Ce.session.prevInput=Cr}function Te(Ce,Xe){var Cr=Ce.session,on=Xe.pointers,li=on.length;Cr.firstInput||(Cr.firstInput=pr(Xe)),li>1&&!Cr.firstMultiple?Cr.firstMultiple=pr(Xe):li===1&&(Cr.firstMultiple=!1);var Di=Cr.firstInput,Ba=Cr.firstMultiple,xs=Ba?Ba.center:Di.center,es=Xe.center=lr(on);Xe.timeStamp=P(),Xe.deltaTime=Xe.timeStamp-Di.timeStamp,Xe.angle=Sn(xs,es),Xe.distance=Br(xs,es),We(Cr,Xe),Xe.offsetDirection=Pr(Xe.deltaX,Xe.deltaY);var ls=Vr(Xe.deltaTime,Xe.deltaX,Xe.deltaY);Xe.overallVelocityX=ls.x,Xe.overallVelocityY=ls.y,Xe.overallVelocity=zt(ls.x)>zt(ls.y)?ls.x:ls.y,Xe.scale=Ba?zn(Ba.pointers,on):1,Xe.rotation=Ba?an(Ba.pointers,on):0,Xe.maxPointers=Cr.prevInput?Xe.pointers.length>Cr.prevInput.maxPointers?Xe.pointers.length:Cr.prevInput.maxPointers:Xe.pointers.length,Qe(Cr,Xe);var zs=Ce.element;Ke(Xe.srcEvent.target,zs)&&(zs=Xe.srcEvent.target),Xe.target=zs}function We(Ce,Xe){var Cr=Xe.center,on=Ce.offsetDelta||{},li=Ce.prevDelta||{},Di=Ce.prevInput||{};(Xe.eventType===bt||Di.eventType===$t)&&(li=Ce.prevDelta={x:Di.deltaX||0,y:Di.deltaY||0},on=Ce.offsetDelta={x:Cr.x,y:Cr.y}),Xe.deltaX=li.x+(Cr.x-on.x),Xe.deltaY=li.y+(Cr.y-on.y)}function Qe(Ce,Xe){var Cr=Ce.lastInterval||Xe,on=Xe.timeStamp-Cr.timeStamp,li,Di,Ba,xs;if(Xe.eventType!=xt&&(on>qt||Cr.velocity===K)){var es=Xe.deltaX-Cr.deltaX,ls=Xe.deltaY-Cr.deltaY,zs=Vr(on,es,ls);Di=zs.x,Ba=zs.y,li=zt(zs.x)>zt(zs.y)?zs.x:zs.y,xs=Pr(es,ls),Ce.lastInterval=Xe}else li=Cr.velocity,Di=Cr.velocityX,Ba=Cr.velocityY,xs=Cr.direction;Xe.velocity=li,Xe.velocityX=Di,Xe.velocityY=Ba,Xe.direction=xs}function pr(Ce){for(var Xe=[],Cr=0;Cr<Ce.pointers.length;)Xe[Cr]={clientX:ut(Ce.pointers[Cr].clientX),clientY:ut(Ce.pointers[Cr].clientY)},Cr++;return{timeStamp:P(),pointers:Xe,center:lr(Xe),deltaX:Ce.deltaX,deltaY:Ce.deltaY}}function lr(Ce){var Xe=Ce.length;if(Xe===1)return{x:ut(Ce[0].clientX),y:ut(Ce[0].clientY)};for(var Cr=0,on=0,li=0;li<Xe;)Cr+=Ce[li].clientX,on+=Ce[li].clientY,li++;return{x:ut(Cr/Xe),y:ut(on/Xe)}}function Vr(Ce,Xe,Cr){return{x:Xe/Ce||0,y:Cr/Ce||0}}function Pr(Ce,Xe){return Ce===Xe?wt:zt(Ce)>=zt(Xe)?Ce<0?ue:Ie:Xe<0?Ne:Zt}function Br(Ce,Xe,Cr){Cr||(Cr=tt);var on=Xe[Cr[0]]-Ce[Cr[0]],li=Xe[Cr[1]]-Ce[Cr[1]];return Math.sqrt(on*on+li*li)}function Sn(Ce,Xe,Cr){Cr||(Cr=tt);var on=Xe[Cr[0]]-Ce[Cr[0]],li=Xe[Cr[1]]-Ce[Cr[1]];return Math.atan2(li,on)*180/Math.PI}function an(Ce,Xe){return Sn(Xe[1],Xe[0],vt)+Sn(Ce[1],Ce[0],vt)}function zn(Ce,Xe){return Br(Xe[0],Xe[1],vt)/Br(Ce[0],Ce[1],vt)}var Zn={mousedown:bt,mousemove:Xt,mouseup:$t},Wn="mousedown",Dn="mousemove mouseup";function Xn(){this.evEl=Wn,this.evWin=Dn,this.pressed=!1,Ht.apply(this,arguments)}Dt(Xn,Ht,{handler:function(Xe){var Cr=Zn[Xe.type];Cr&bt&&Xe.button===0&&(this.pressed=!0),Cr&Xt&&Xe.which!==1&&(Cr=$t),this.pressed&&(Cr&$t&&(this.pressed=!1),this.callback(this.manager,Cr,{pointers:[Xe],changedPointers:[Xe],pointerType:vr,srcEvent:Xe}))}});var Ft={pointerdown:bt,pointermove:Xt,pointerup:$t,pointercancel:xt,pointerout:xt},Wt={2:Yt,3:qe,4:vr,5:ie},oe="pointerdown",ye="pointermove pointerup pointercancel";!pt&>.MSPointerEvent&&!gt.PointerEvent&&(oe="MSPointerDown",ye="MSPointerMove MSPointerUp MSPointerCancel");function Ze(){this.evEl=oe,this.evWin=ye,Ht.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}Dt(Ze,Ht,{handler:function(Xe){var Cr=this.store,on=!1,li=Xe.type.toLowerCase().replace("ms",""),Di=Ft[li],Ba=Wt[Xe.pointerType]||Xe.pointerType,xs=Ba==Yt,es=ft(Cr,Xe.pointerId,"pointerId");Di&bt&&(Xe.button===0||xs)?es<0&&(Cr.push(Xe),es=Cr.length-1):Di&($t|xt)&&(on=!0),!(es<0)&&(Cr[es]=Xe,this.callback(this.manager,Di,{pointers:Cr,changedPointers:[Xe],pointerType:Ba,srcEvent:Xe}),on&&Cr.splice(es,1))}});var fr={touchstart:bt,touchmove:Xt,touchend:$t,touchcancel:xt},_r="touchstart",we="touchstart touchmove touchend touchcancel";function ir(){this.evTarget=_r,this.evWin=we,this.started=!1,Ht.apply(this,arguments)}Dt(ir,Ht,{handler:function(Xe){var Cr=fr[Xe.type];if(Cr===bt&&(this.started=!0),!!this.started){var on=Hr.call(this,Xe,Cr);Cr&($t|xt)&&on[0].length-on[1].length===0&&(this.started=!1),this.callback(this.manager,Cr,{pointers:on[0],changedPointers:on[1],pointerType:Yt,srcEvent:Xe})}}});function Hr(Ce,Xe){var Cr=St(Ce.touches),on=St(Ce.changedTouches);return Xe&($t|xt)&&(Cr=Y(Cr.concat(on),"identifier",!0)),[Cr,on]}var In={touchstart:bt,touchmove:Xt,touchend:$t,touchcancel:xt},nn="touchstart touchmove touchend touchcancel";function Yr(){this.evTarget=nn,this.targetIds={},Ht.apply(this,arguments)}Dt(Yr,Ht,{handler:function(Xe){var Cr=In[Xe.type],on=On.call(this,Xe,Cr);on&&this.callback(this.manager,Cr,{pointers:on[0],changedPointers:on[1],pointerType:Yt,srcEvent:Xe})}});function On(Ce,Xe){var Cr=St(Ce.touches),on=this.targetIds;if(Xe&(bt|Xt)&&Cr.length===1)return on[Cr[0].identifier]=!0,[Cr,Cr];var li,Di,Ba=St(Ce.changedTouches),xs=[],es=this.target;if(Di=Cr.filter(function(ls){return Ke(ls.target,es)}),Xe===bt)for(li=0;li<Di.length;)on[Di[li].identifier]=!0,li++;for(li=0;li<Ba.length;)on[Ba[li].identifier]&&xs.push(Ba[li]),Xe&($t|xt)&&delete on[Ba[li].identifier],li++;if(xs.length)return[Y(Di.concat(xs),"identifier",!0),xs]}var bi=2500,Mi=25;function tn(){Ht.apply(this,arguments);var Ce=Ee(this.handler,this);this.touch=new Yr(this.manager,Ce),this.mouse=new Xn(this.manager,Ce),this.primaryTouch=null,this.lastTouches=[]}Dt(tn,Ht,{handler:function(Xe,Cr,on){var li=on.pointerType==Yt,Di=on.pointerType==vr;if(!(Di&&on.sourceCapabilities&&on.sourceCapabilities.firesTouchEvents)){if(li)mi.call(this,Cr,on);else if(Di&&fi.call(this,on))return;this.callback(Xe,Cr,on)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function mi(Ce,Xe){Ce&bt?(this.primaryTouch=Xe.changedPointers[0].identifier,Yn.call(this,Xe)):Ce&($t|xt)&&Yn.call(this,Xe)}function Yn(Ce){var Xe=Ce.changedPointers[0];if(Xe.identifier===this.primaryTouch){var Cr={x:Xe.clientX,y:Xe.clientY};this.lastTouches.push(Cr);var on=this.lastTouches,li=function(){var Di=on.indexOf(Cr);Di>-1&&on.splice(Di,1)};setTimeout(li,bi)}}function fi(Ce){for(var Xe=Ce.srcEvent.clientX,Cr=Ce.srcEvent.clientY,on=0;on<this.lastTouches.length;on++){var li=this.lastTouches[on],Di=Math.abs(Xe-li.x),Ba=Math.abs(Cr-li.y);if(Di<=Mi&&Ba<=Mi)return!0}return!1}var Ea=pt?K:mt(_e.style,"touchAction"),si=Ea!==K,Ia="compute",vo="auto",Oa="manipulation",Ha="none",wa="pan-x",ya="pan-y",Qa=Va();function Wo(Ce,Xe){this.manager=Ce,this.set(Xe)}Wo.prototype={set:function(Ce){Ce==Ia&&(Ce=this.compute()),si&&this.manager.element.style&&Qa[Ce]&&(this.manager.element.style[Ea]=Ce),this.actions=Ce.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var Ce=[];return le(this.manager.recognizers,function(Xe){ge(Xe.options.enable,[Xe])&&(Ce=Ce.concat(Xe.getTouchAction()))}),yo(Ce.join(" "))},preventDefaults:function(Ce){var Xe=Ce.srcEvent,Cr=Ce.offsetDirection;if(this.manager.session.prevented){Xe.preventDefault();return}var on=this.actions,li=Lt(on,Ha)&&!Qa[Ha],Di=Lt(on,ya)&&!Qa[ya],Ba=Lt(on,wa)&&!Qa[wa];if(li){var xs=Ce.pointers.length===1,es=Ce.distance<2,ls=Ce.deltaTime<250;if(xs&&es&&ls)return}if(!(Ba&&Di)&&(li||Di&&Cr&Ct||Ba&&Cr&Tt))return this.preventSrc(Xe)},preventSrc:function(Ce){this.manager.session.prevented=!0,Ce.preventDefault()}};function yo(Ce){if(Lt(Ce,Ha))return Ha;var Xe=Lt(Ce,wa),Cr=Lt(Ce,ya);return Xe&&Cr?Ha:Xe||Cr?Xe?wa:ya:Lt(Ce,Oa)?Oa:vo}function Va(){if(!si)return!1;var Ce={};if(pt)return Ce;var Xe=gt.CSS&>.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(Cr){Ce[Cr]=Xe?gt.CSS.supports("touch-action",Cr):!0}),Ce}var Ya=1,No=2,Nu=4,ts=8,bo=ts,rr=16,de=32;function Ve(Ce){this.options=Me({},this.defaults,Ce||{}),this.id=ke(),this.manager=null,this.options.enable=Ge(this.options.enable,!0),this.state=Ya,this.simultaneous={},this.requireFail=[]}Ve.prototype={defaults:{},set:function(Ce){return Me(this.options,Ce),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(Ce){if(W(Ce,"recognizeWith",this))return this;var Xe=this.simultaneous;return Ce=kn(Ce,this),Xe[Ce.id]||(Xe[Ce.id]=Ce,Ce.recognizeWith(this)),this},dropRecognizeWith:function(Ce){return W(Ce,"dropRecognizeWith",this)?this:(Ce=kn(Ce,this),delete this.simultaneous[Ce.id],this)},requireFailure:function(Ce){if(W(Ce,"requireFailure",this))return this;var Xe=this.requireFail;return Ce=kn(Ce,this),ft(Xe,Ce)===-1&&(Xe.push(Ce),Ce.requireFailure(this)),this},dropRequireFailure:function(Ce){if(W(Ce,"dropRequireFailure",this))return this;Ce=kn(Ce,this);var Xe=ft(this.requireFail,Ce);return Xe>-1&&this.requireFail.splice(Xe,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(Ce){return!!this.simultaneous[Ce.id]},emit:function(Ce){var Xe=this,Cr=this.state;function on(li){Xe.manager.emit(li,Ce)}Cr<ts&&on(Xe.options.event+Mr(Cr)),on(Xe.options.event),Ce.additionalEvent&&on(Ce.additionalEvent),Cr>=ts&&on(Xe.options.event+Mr(Cr))},tryEmit:function(Ce){if(this.canEmit())return this.emit(Ce);this.state=de},canEmit:function(){for(var Ce=0;Ce<this.requireFail.length;){if(!(this.requireFail[Ce].state&(de|Ya)))return!1;Ce++}return!0},recognize:function(Ce){var Xe=Me({},Ce);if(!ge(this.options.enable,[this,Xe])){this.reset(),this.state=de;return}this.state&(bo|rr|de)&&(this.state=Ya),this.state=this.process(Xe),this.state&(No|Nu|ts|rr)&&this.tryEmit(Xe)},process:function(Ce){},getTouchAction:function(){},reset:function(){}};function Mr(Ce){return Ce&rr?"cancel":Ce&ts?"end":Ce&Nu?"move":Ce&No?"start":""}function rn(Ce){return Ce==Zt?"down":Ce==Ne?"up":Ce==ue?"left":Ce==Ie?"right":""}function kn(Ce,Xe){var Cr=Xe.manager;return Cr?Cr.get(Ce):Ce}function $n(){Ve.apply(this,arguments)}Dt($n,Ve,{defaults:{pointers:1},attrTest:function(Ce){var Xe=this.options.pointers;return Xe===0||Ce.pointers.length===Xe},process:function(Ce){var Xe=this.state,Cr=Ce.eventType,on=Xe&(No|Nu),li=this.attrTest(Ce);return on&&(Cr&xt||!li)?Xe|rr:on||li?Cr&$t?Xe|ts:Xe&No?Xe|Nu:No:de}});function Cn(){$n.apply(this,arguments),this.pX=null,this.pY=null}Dt(Cn,$n,{defaults:{event:"pan",threshold:10,pointers:1,direction:Nt},getTouchAction:function(){var Ce=this.options.direction,Xe=[];return Ce&Ct&&Xe.push(ya),Ce&Tt&&Xe.push(wa),Xe},directionTest:function(Ce){var Xe=this.options,Cr=!0,on=Ce.distance,li=Ce.direction,Di=Ce.deltaX,Ba=Ce.deltaY;return li&Xe.direction||(Xe.direction&Ct?(li=Di===0?wt:Di<0?ue:Ie,Cr=Di!=this.pX,on=Math.abs(Ce.deltaX)):(li=Ba===0?wt:Ba<0?Ne:Zt,Cr=Ba!=this.pY,on=Math.abs(Ce.deltaY))),Ce.direction=li,Cr&&on>Xe.threshold&&li&Xe.direction},attrTest:function(Ce){return $n.prototype.attrTest.call(this,Ce)&&(this.state&No||!(this.state&No)&&this.directionTest(Ce))},emit:function(Ce){this.pX=Ce.deltaX,this.pY=Ce.deltaY;var Xe=rn(Ce.direction);Xe&&(Ce.additionalEvent=this.options.event+Xe),this._super.emit.call(this,Ce)}});function Ki(){$n.apply(this,arguments)}Dt(Ki,$n,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ha]},attrTest:function(Ce){return this._super.attrTest.call(this,Ce)&&(Math.abs(Ce.scale-1)>this.options.threshold||this.state&No)},emit:function(Ce){if(Ce.scale!==1){var Xe=Ce.scale<1?"in":"out";Ce.additionalEvent=this.options.event+Xe}this._super.emit.call(this,Ce)}});function Fa(){Ve.apply(this,arguments),this._timer=null,this._input=null}Dt(Fa,Ve,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[vo]},process:function(Ce){var Xe=this.options,Cr=Ce.pointers.length===Xe.pointers,on=Ce.distance<Xe.threshold,li=Ce.deltaTime>Xe.time;if(this._input=Ce,!on||!Cr||Ce.eventType&($t|xt)&&!li)this.reset();else if(Ce.eventType&bt)this.reset(),this._timer=b(function(){this.state=bo,this.tryEmit()},Xe.time,this);else if(Ce.eventType&$t)return bo;return de},reset:function(){clearTimeout(this._timer)},emit:function(Ce){this.state===bo&&(Ce&&Ce.eventType&$t?this.manager.emit(this.options.event+"up",Ce):(this._input.timeStamp=P(),this.manager.emit(this.options.event,this._input)))}});function Ss(){$n.apply(this,arguments)}Dt(Ss,$n,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ha]},attrTest:function(Ce){return this._super.attrTest.call(this,Ce)&&(Math.abs(Ce.rotation)>this.options.threshold||this.state&No)}});function ko(){$n.apply(this,arguments)}Dt(ko,$n,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ct|Tt,pointers:1},getTouchAction:function(){return Cn.prototype.getTouchAction.call(this)},attrTest:function(Ce){var Xe=this.options.direction,Cr;return Xe&(Ct|Tt)?Cr=Ce.overallVelocity:Xe&Ct?Cr=Ce.overallVelocityX:Xe&Tt&&(Cr=Ce.overallVelocityY),this._super.attrTest.call(this,Ce)&&Xe&Ce.offsetDirection&&Ce.distance>this.options.threshold&&Ce.maxPointers==this.options.pointers&&zt(Cr)>this.options.velocity&&Ce.eventType&$t},emit:function(Ce){var Xe=rn(Ce.offsetDirection);Xe&&this.manager.emit(this.options.event+Xe,Ce),this.manager.emit(this.options.event,Ce)}});function zo(){Ve.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}Dt(zo,Ve,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Oa]},process:function(Ce){var Xe=this.options,Cr=Ce.pointers.length===Xe.pointers,on=Ce.distance<Xe.threshold,li=Ce.deltaTime<Xe.time;if(this.reset(),Ce.eventType&bt&&this.count===0)return this.failTimeout();if(on&&li&&Cr){if(Ce.eventType!=$t)return this.failTimeout();var Di=this.pTime?Ce.timeStamp-this.pTime<Xe.interval:!0,Ba=!this.pCenter||Br(this.pCenter,Ce.center)<Xe.posThreshold;this.pTime=Ce.timeStamp,this.pCenter=Ce.center,!Ba||!Di?this.count=1:this.count+=1,this._input=Ce;var xs=this.count%Xe.taps;if(xs===0)return this.hasRequireFailures()?(this._timer=b(function(){this.state=bo,this.tryEmit()},Xe.interval,this),No):bo}return de},failTimeout:function(){return this._timer=b(function(){this.state=de},this.options.interval,this),de},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==bo&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function oo(Ce,Xe){return Xe=Xe||{},Xe.recognizers=Ge(Xe.recognizers,oo.defaults.preset),new Ko(Ce,Xe)}oo.VERSION="2.0.7",oo.defaults={domEvents:!1,touchAction:Ia,enable:!0,inputTarget:null,inputClass:null,preset:[[Ss,{enable:!1}],[Ki,{enable:!1},["rotate"]],[ko,{direction:Ct}],[Cn,{direction:Ct},["swipe"]],[zo],[zo,{event:"doubletap",taps:2},["tap"]],[Fa]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Xo=1,iu=2;function Ko(Ce,Xe){this.options=Me({},oo.defaults,Xe||{}),this.options.inputTarget=this.options.inputTarget||Ce,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=Ce,this.input=he(this),this.touchAction=new Wo(this,this.options.touchAction),Ul(this,!0),le(this.options.recognizers,function(Cr){var on=this.add(new Cr[0](Cr[1]));Cr[2]&&on.recognizeWith(Cr[2]),Cr[3]&&on.requireFailure(Cr[3])},this)}Ko.prototype={set:function(Ce){return Me(this.options,Ce),Ce.touchAction&&this.touchAction.update(),Ce.inputTarget&&(this.input.destroy(),this.input.target=Ce.inputTarget,this.input.init()),this},stop:function(Ce){this.session.stopped=Ce?iu:Xo},recognize:function(Ce){var Xe=this.session;if(!Xe.stopped){this.touchAction.preventDefaults(Ce);var Cr,on=this.recognizers,li=Xe.curRecognizer;(!li||li&&li.state&bo)&&(li=Xe.curRecognizer=null);for(var Di=0;Di<on.length;)Cr=on[Di],Xe.stopped!==iu&&(!li||Cr==li||Cr.canRecognizeWith(li))?Cr.recognize(Ce):Cr.reset(),!li&&Cr.state&(No|Nu|ts)&&(li=Xe.curRecognizer=Cr),Di++}},get:function(Ce){if(Ce instanceof Ve)return Ce;for(var Xe=this.recognizers,Cr=0;Cr<Xe.length;Cr++)if(Xe[Cr].options.event==Ce)return Xe[Cr];return null},add:function(Ce){if(W(Ce,"add",this))return this;var Xe=this.get(Ce.options.event);return Xe&&this.remove(Xe),this.recognizers.push(Ce),Ce.manager=this,this.touchAction.update(),Ce},remove:function(Ce){if(W(Ce,"remove",this))return this;if(Ce=this.get(Ce),Ce){var Xe=this.recognizers,Cr=ft(Xe,Ce);Cr!==-1&&(Xe.splice(Cr,1),this.touchAction.update())}return this},on:function(Ce,Xe){if(Ce!==K&&Xe!==K){var Cr=this.handlers;return le(Jt(Ce),function(on){Cr[on]=Cr[on]||[],Cr[on].push(Xe)}),this}},off:function(Ce,Xe){if(Ce!==K){var Cr=this.handlers;return le(Jt(Ce),function(on){Xe?Cr[on]&&Cr[on].splice(ft(Cr[on],Xe),1):delete Cr[on]}),this}},emit:function(Ce,Xe){this.options.domEvents&&$c(Ce,Xe);var Cr=this.handlers[Ce]&&this.handlers[Ce].slice();if(!(!Cr||!Cr.length)){Xe.type=Ce,Xe.preventDefault=function(){Xe.srcEvent.preventDefault()};for(var on=0;on<Cr.length;)Cr[on](Xe),on++}},destroy:function(){this.element&&Ul(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Ul(Ce,Xe){var Cr=Ce.element;if(Cr.style){var on;le(Ce.options.cssProps,function(li,Di){on=mt(Cr.style,Di),Xe?(Ce.oldCssProps[on]=Cr.style[on],Cr.style[on]=li):Cr.style[on]=Ce.oldCssProps[on]||""}),Xe||(Ce.oldCssProps={})}}function $c(Ce,Xe){if(!pt){var Cr=k.createEvent("Event");Cr.initEvent(Ce,!0,!0),Cr.gesture=Xe,Xe.target.dispatchEvent(Cr)}}if(!pt){Me(oo,{INPUT_START:bt,INPUT_MOVE:Xt,INPUT_END:$t,INPUT_CANCEL:xt,STATE_POSSIBLE:Ya,STATE_BEGAN:No,STATE_CHANGED:Nu,STATE_ENDED:ts,STATE_RECOGNIZED:bo,STATE_CANCELLED:rr,STATE_FAILED:de,DIRECTION_NONE:wt,DIRECTION_LEFT:ue,DIRECTION_RIGHT:Ie,DIRECTION_UP:Ne,DIRECTION_DOWN:Zt,DIRECTION_HORIZONTAL:Ct,DIRECTION_VERTICAL:Tt,DIRECTION_ALL:Nt,Manager:Ko,Input:Ht,TouchAction:Wo,TouchInput:Yr,MouseInput:Xn,PointerEventInput:Ze,TouchMouseInput:tn,SingleTouchInput:ir,Recognizer:Ve,AttrRecognizer:$n,Tap:zo,Pan:Cn,Swipe:ko,Pinch:Ki,Rotate:Ss,Press:Fa,on:Ue,off:xe,each:le,merge:rt,extend:At,assign:Me,inherit:Dt,bindFn:Ee,prefixed:mt});var Ku=typeof window!="undefined"?window:typeof self!="undefined"?self:{};Ku.Hammer=oo,kt=function(){return oo}.call(Ot,nt,Ot,pn),kt!==K&&(pn.exports=kt)}})(typeof window!="undefined"?window:{console:null,MSPointerEvent:null,PointerEvent:null,CSS:null},document,"Hammer")},87781:function(pn,Ot,nt){(function(kt,gt){pn.exports=gt(nt(34306))})(this,function(kt){"use strict";var gt=function(It){return It instanceof Uint8Array||It instanceof Uint16Array||It instanceof Uint32Array||It instanceof Int8Array||It instanceof Int16Array||It instanceof Int32Array||It instanceof Float32Array||It instanceof Float64Array||It instanceof Uint8ClampedArray},k=function(It,Pe){for(var dr=Object.keys(Pe),sn=0;sn<dr.length;++sn)It[dr[sn]]=Pe[dr[sn]];return It},Et=`
|
|
`;function K(It){return typeof atob!="undefined"?atob(It):"base64:"+It}function yt(It){var Pe=new Error("(regl) "+It);throw console.error(Pe),Pe}function J(It,Pe){It||yt(Pe)}function pt(It){return It?": "+It:""}function et(It,Pe,dr){It in Pe||yt("unknown parameter ("+It+")"+pt(dr)+". possible values: "+Object.keys(Pe).join())}function _e(It,Pe){gt(It)||yt("invalid parameter type"+pt(Pe)+". must be a typed array")}function ot(It,Pe){switch(Pe){case"number":return typeof It=="number";case"object":return typeof It=="object";case"string":return typeof It=="string";case"boolean":return typeof It=="boolean";case"function":return typeof It=="function";case"undefined":return typeof It=="undefined";case"symbol":return typeof It=="symbol"}}function ut(It,Pe,dr){ot(It,Pe)||yt("invalid parameter type"+pt(dr)+". expected "+Pe+", got "+typeof It)}function zt(It,Pe){It>=0&&(It|0)===It||yt("invalid parameter type, ("+It+")"+pt(Pe)+". must be a nonnegative integer")}function P(It,Pe,dr){Pe.indexOf(It)<0&&yt("invalid value"+pt(dr)+". must be one of: "+Pe)}var b=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function W(It){Object.keys(It).forEach(function(Pe){b.indexOf(Pe)<0&&yt('invalid regl constructor argument "'+Pe+'". must be one of '+b)})}function le(It,Pe){for(It=It+"";It.length<Pe;)It=" "+It;return It}function be(){this.name="unknown",this.lines=[],this.index={},this.hasErrors=!1}function Me(It,Pe){this.number=It,this.line=Pe,this.errors=[]}function At(It,Pe,dr){this.file=It,this.line=Pe,this.message=dr}function rt(){var It=new Error,Pe=(It.stack||It).toString(),dr=/compileProcedure.*\n\s*at.*\((.*)\)/.exec(Pe);if(dr)return dr[1];var sn=/compileProcedure.*\n\s*at\s+(.*)(\n|$)/.exec(Pe);return sn?sn[1]:"unknown"}function Dt(){var It=new Error,Pe=(It.stack||It).toString(),dr=/at REGLCommand.*\n\s+at.*\((.*)\)/.exec(Pe);if(dr)return dr[1];var sn=/at REGLCommand.*\n\s+at\s+(.*)\n/.exec(Pe);return sn?sn[1]:"unknown"}function Ee(It,Pe){var dr=It.split(`
|
|
`),sn=1,Ln=0,un={unknown:new be,0:new be};un.unknown.name=un[0].name=Pe||rt(),un.unknown.lines.push(new Me(0,""));for(var bn=0;bn<dr.length;++bn){var jr=dr[bn],jn=/^\s*#\s*(\w+)\s+(.+)\s*$/.exec(jr);if(jn)switch(jn[1]){case"line":var Qn=/(\d+)(\s+\d+)?/.exec(jn[2]);Qn&&(sn=Qn[1]|0,Qn[2]&&(Ln=Qn[2]|0,Ln in un||(un[Ln]=new be)));break;case"define":var ri=/SHADER_NAME(_B64)?\s+(.*)$/.exec(jn[2]);ri&&(un[Ln].name=ri[1]?K(ri[2]):ri[2]);break}un[Ln].lines.push(new Me(sn++,jr))}return Object.keys(un).forEach(function(ni){var _i=un[ni];_i.lines.forEach(function(qn){_i.index[qn.number]=qn})}),un}function ge(It){var Pe=[];return It.split(`
|
|
`).forEach(function(dr){if(!(dr.length<5)){var sn=/^ERROR:\s+(\d+):(\d+):\s*(.*)$/.exec(dr);sn?Pe.push(new At(sn[1]|0,sn[2]|0,sn[3].trim())):dr.length>0&&Pe.push(new At("unknown",0,dr))}}),Pe}function Ge(It,Pe){Pe.forEach(function(dr){var sn=It[dr.file];if(sn){var Ln=sn.index[dr.line];if(Ln){Ln.errors.push(dr),sn.hasErrors=!0;return}}It.unknown.hasErrors=!0,It.unknown.lines[0].errors.push(dr)})}function Ue(It,Pe,dr,sn,Ln){if(!It.getShaderParameter(Pe,It.COMPILE_STATUS)){var un=It.getShaderInfoLog(Pe),bn=sn===It.FRAGMENT_SHADER?"fragment":"vertex";Y(dr,"string",bn+" shader source must be a string",Ln);var jr=Ee(dr,Ln),jn=ge(un);Ge(jr,jn),Object.keys(jr).forEach(function(Qn){var ri=jr[Qn];if(!ri.hasErrors)return;var ni=[""],_i=[""];function qn(ii,Gr){ni.push(ii),_i.push(Gr||"")}qn("file number "+Qn+": "+ri.name+`
|
|
`,"color:red;text-decoration:underline;font-weight:bold"),ri.lines.forEach(function(ii){if(ii.errors.length>0){qn(le(ii.number,4)+"| ","background-color:yellow; font-weight:bold"),qn(ii.line+Et,"color:red; background-color:yellow; font-weight:bold");var Gr=0;ii.errors.forEach(function(mn){var Vn=mn.message,di=/^\s*'(.*)'\s*:\s*(.*)$/.exec(Vn);if(di){var Bn=di[1];switch(Vn=di[2],Bn){case"assign":Bn="=";break}Gr=Math.max(ii.line.indexOf(Bn,Gr),0)}else Gr=0;qn(le("| ",6)),qn(le("^^^",Gr+3)+Et,"font-weight:bold"),qn(le("| ",6)),qn(Vn+Et,"font-weight:bold")}),qn(le("| ",6)+Et)}else qn(le(ii.number,4)+"| "),qn(ii.line+Et,"color:red")}),typeof document!="undefined"&&!window.chrome?(_i[0]=ni.join("%c"),console.log.apply(console,_i)):console.log(ni.join(""))}),J.raise("Error compiling "+bn+" shader, "+jr[0].name)}}function xe(It,Pe,dr,sn,Ln){if(!It.getProgramParameter(Pe,It.LINK_STATUS)){var un=It.getProgramInfoLog(Pe),bn=Ee(dr,Ln),jr=Ee(sn,Ln),jn='Error linking program with vertex shader, "'+jr[0].name+'", and fragment shader "'+bn[0].name+'"';typeof document!="undefined"?console.log("%c"+jn+Et+"%c"+un,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(jn+Et+un),J.raise(jn)}}function Ke(It){It._commandRef=rt()}function Lt(It,Pe,dr,sn){Ke(It);function Ln(jn){return jn?sn.id(jn):0}It._fragId=Ln(It.static.frag),It._vertId=Ln(It.static.vert);function un(jn,Qn){Object.keys(Qn).forEach(function(ri){jn[sn.id(ri)]=!0})}var bn=It._uniformSet={};un(bn,Pe.static),un(bn,Pe.dynamic);var jr=It._attributeSet={};un(jr,dr.static),un(jr,dr.dynamic),It._hasCount="count"in It.static||"count"in It.dynamic||"elements"in It.static||"elements"in It.dynamic}function Jt(It,Pe){var dr=Dt();yt(It+" in command "+(Pe||rt())+(dr==="unknown"?"":" called from "+dr))}function ft(It,Pe,dr){It||Jt(Pe,dr||rt())}function St(It,Pe,dr,sn){It in Pe||Jt("unknown parameter ("+It+")"+pt(dr)+". possible values: "+Object.keys(Pe).join(),sn||rt())}function Y(It,Pe,dr,sn){ot(It,Pe)||Jt("invalid parameter type"+pt(dr)+". expected "+Pe+", got "+typeof It,sn||rt())}function mt(It){It()}function se(It,Pe,dr){It.texture?P(It.texture._texture.internalformat,Pe,"unsupported texture format for attachment"):P(It.renderbuffer._renderbuffer.format,dr,"unsupported renderbuffer format for attachment")}var ke=33071,Le=9728,Be=9984,Bt=9985,ee=9986,me=9987,Yt=5120,qe=5121,vr=5122,ie=5123,qt=5124,bt=5125,Xt=5126,$t=32819,xt=32820,wt=33635,ue=34042,Ie=36193,Ne={};Ne[Yt]=Ne[qe]=1,Ne[vr]=Ne[ie]=Ne[Ie]=Ne[wt]=Ne[$t]=Ne[xt]=2,Ne[qt]=Ne[bt]=Ne[Xt]=Ne[ue]=4;function Zt(It,Pe){return It===xt||It===$t||It===wt?2:It===ue?4:Ne[It]*Pe}function Ct(It){return!(It&It-1)&&!!It}function Tt(It,Pe,dr){var sn,Ln=Pe.width,un=Pe.height,bn=Pe.channels;J(Ln>0&&Ln<=dr.maxTextureSize&&un>0&&un<=dr.maxTextureSize,"invalid texture shape"),(It.wrapS!==ke||It.wrapT!==ke)&&J(Ct(Ln)&&Ct(un),"incompatible wrap mode for texture, both width and height must be power of 2"),Pe.mipmask===1?Ln!==1&&un!==1&&J(It.minFilter!==Be&&It.minFilter!==ee&&It.minFilter!==Bt&&It.minFilter!==me,"min filter requires mipmap"):(J(Ct(Ln)&&Ct(un),"texture must be a square power of 2 to support mipmapping"),J(Pe.mipmask===(Ln<<1)-1,"missing or incomplete mipmap data")),Pe.type===Xt&&(dr.extensions.indexOf("oes_texture_float_linear")<0&&J(It.minFilter===Le&&It.magFilter===Le,"filter not supported, must enable oes_texture_float_linear"),J(!It.genMipmaps,"mipmap generation not supported with float textures"));var jr=Pe.images;for(sn=0;sn<16;++sn)if(jr[sn]){var jn=Ln>>sn,Qn=un>>sn;J(Pe.mipmask&1<<sn,"missing mipmap data");var ri=jr[sn];if(J(ri.width===jn&&ri.height===Qn,"invalid shape for mip images"),J(ri.format===Pe.format&&ri.internalformat===Pe.internalformat&&ri.type===Pe.type,"incompatible type for mip image"),!ri.compressed)if(ri.data){var ni=Math.ceil(Zt(ri.type,bn)*jn/ri.unpackAlignment)*ri.unpackAlignment;J(ri.data.byteLength===ni*Qn,"invalid data for image, buffer size is inconsistent with image format")}else ri.element||ri.copy}else It.genMipmaps||J((Pe.mipmask&1<<sn)===0,"extra mipmap data");Pe.compressed&&J(!It.genMipmaps,"mipmap generation for compressed images not supported")}function Nt(It,Pe,dr,sn){var Ln=It.width,un=It.height,bn=It.channels;J(Ln>0&&Ln<=sn.maxTextureSize&&un>0&&un<=sn.maxTextureSize,"invalid texture shape"),J(Ln===un,"cube map must be square"),J(Pe.wrapS===ke&&Pe.wrapT===ke,"wrap mode not supported by cube map");for(var jr=0;jr<dr.length;++jr){var jn=dr[jr];J(jn.width===Ln&&jn.height===un,"inconsistent cube map face shape"),Pe.genMipmaps&&(J(!jn.compressed,"can not generate mipmap for compressed textures"),J(jn.mipmask===1,"can not specify mipmaps and generate mipmaps"));for(var Qn=jn.images,ri=0;ri<16;++ri){var ni=Qn[ri];if(ni){var _i=Ln>>ri,qn=un>>ri;J(jn.mipmask&1<<ri,"missing mipmap data"),J(ni.width===_i&&ni.height===qn,"invalid shape for mip images"),J(ni.format===It.format&&ni.internalformat===It.internalformat&&ni.type===It.type,"incompatible type for mip image"),ni.compressed||(ni.data?J(ni.data.byteLength===_i*qn*Math.max(Zt(ni.type,bn),ni.unpackAlignment),"invalid data for image, buffer size is inconsistent with image format"):ni.element||ni.copy)}}}}var tt=k(J,{optional:mt,raise:yt,commandRaise:Jt,command:ft,parameter:et,commandParameter:St,constructor:W,type:ut,commandType:Y,isTypedArray:_e,nni:zt,oneOf:P,shaderError:Ue,linkError:xe,callSite:Dt,saveCommandRef:Ke,saveDrawInfo:Lt,framebufferFormat:se,guessCommand:rt,texture2D:Tt,textureCube:Nt}),vt=0,Ht=0,he=5,jt=6;function Te(It,Pe){this.id=vt++,this.type=It,this.data=Pe}function We(It){return It.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Qe(It){if(It.length===0)return[];var Pe=It.charAt(0),dr=It.charAt(It.length-1);if(It.length>1&&Pe===dr&&(Pe==='"'||Pe==="'"))return['"'+We(It.substr(1,It.length-2))+'"'];var sn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(It);if(sn)return Qe(It.substr(0,sn.index)).concat(Qe(sn[1])).concat(Qe(It.substr(sn.index+sn[0].length)));var Ln=It.split(".");if(Ln.length===1)return['"'+We(It)+'"'];for(var un=[],bn=0;bn<Ln.length;++bn)un=un.concat(Qe(Ln[bn]));return un}function pr(It){return"["+Qe(It).join("][")+"]"}function lr(It,Pe){return new Te(It,pr(Pe+""))}function Vr(It){return typeof It=="function"&&!It._reglType||It instanceof Te}function Pr(It,Pe){if(typeof It=="function")return new Te(Ht,It);if(typeof It=="number"||typeof It=="boolean")return new Te(he,It);if(Array.isArray(It))return new Te(jt,It.map(function(dr,sn){return Pr(dr,Pe+"["+sn+"]")}));if(It instanceof Te)return It;tt(!1,"invalid option type in uniform "+Pe)}var Br={DynamicVariable:Te,define:lr,isDynamic:Vr,unbox:Pr,accessor:pr},Sn={next:typeof requestAnimationFrame=="function"?function(It){return requestAnimationFrame(It)}:function(It){return setTimeout(It,16)},cancel:typeof cancelAnimationFrame=="function"?function(It){return cancelAnimationFrame(It)}:clearTimeout},an=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,zn=an?function(){return+new Date}:typeof performance!="undefined"&&performance.now?function(){return performance.now()}:function(){return+new Date};function Zn(){var It={"":0},Pe=[""];return{id:function(dr){var sn=It[dr];return sn||(sn=It[dr]=Pe.length,Pe.push(dr),sn)},str:function(dr){return Pe[dr]}}}function Wn(It,Pe,dr){var sn=document.createElement("canvas");k(sn.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),It.appendChild(sn),It===document.body&&(sn.style.position="absolute",k(It.style,{margin:0,padding:0}));function Ln(){var jr=window.innerWidth,jn=window.innerHeight;if(It!==document.body){var Qn=sn.getBoundingClientRect();jr=Qn.right-Qn.left,jn=Qn.bottom-Qn.top}sn.width=dr*jr,sn.height=dr*jn}var un;It!==document.body&&typeof ResizeObserver=="function"?(un=new ResizeObserver(function(){setTimeout(Ln)}),un.observe(It)):window.addEventListener("resize",Ln,!1);function bn(){un?un.disconnect():window.removeEventListener("resize",Ln),It.removeChild(sn)}return Ln(),{canvas:sn,onDestroy:bn}}function Dn(It,Pe){function dr(sn){try{return It.getContext(sn,Pe)}catch(Ln){return null}}return dr("webgl")||dr("experimental-webgl")||dr("webgl-experimental")}function Xn(It){return typeof It.nodeName=="string"&&typeof It.appendChild=="function"&&typeof It.getBoundingClientRect=="function"}function Ft(It){return typeof It.drawArrays=="function"||typeof It.drawElements=="function"}function Wt(It){return typeof It=="string"?It.split():(tt(Array.isArray(It),"invalid extension array"),It)}function oe(It){return typeof It=="string"?(tt(typeof document!="undefined","not supported outside of DOM"),document.querySelector(It)):It}function ye(It){var Pe=It||{},dr,sn,Ln,un,bn={},jr=[],jn=[],Qn=typeof window=="undefined"?1:window.devicePixelRatio,ri=!1,ni=function(ii){ii&&tt.raise(ii)},_i=function(){};if(typeof Pe=="string"?(tt(typeof document!="undefined","selector queries only supported in DOM environments"),dr=document.querySelector(Pe),tt(dr,"invalid query string for element")):typeof Pe=="object"?Xn(Pe)?dr=Pe:Ft(Pe)?(un=Pe,Ln=un.canvas):(tt.constructor(Pe),"gl"in Pe?un=Pe.gl:"canvas"in Pe?Ln=oe(Pe.canvas):"container"in Pe&&(sn=oe(Pe.container)),"attributes"in Pe&&(bn=Pe.attributes,tt.type(bn,"object","invalid context attributes")),"extensions"in Pe&&(jr=Wt(Pe.extensions)),"optionalExtensions"in Pe&&(jn=Wt(Pe.optionalExtensions)),"onDone"in Pe&&(tt.type(Pe.onDone,"function","invalid or missing onDone callback"),ni=Pe.onDone),"profile"in Pe&&(ri=!!Pe.profile),"pixelRatio"in Pe&&(Qn=+Pe.pixelRatio,tt(Qn>0,"invalid pixel ratio"))):tt.raise("invalid arguments to regl"),dr&&(dr.nodeName.toLowerCase()==="canvas"?Ln=dr:sn=dr),!un){if(!Ln){tt(typeof document!="undefined","must manually specify webgl context outside of DOM environments");var qn=Wn(sn||document.body,ni,Qn);if(!qn)return null;Ln=qn.canvas,_i=qn.onDestroy}bn.premultipliedAlpha===void 0&&(bn.premultipliedAlpha=!0),un=Dn(Ln,bn)}return un?{gl:un,canvas:Ln,container:sn,extensions:jr,optionalExtensions:jn,pixelRatio:Qn,profile:ri,onDone:ni,onDestroy:_i}:(_i(),ni("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function Ze(It,Pe){var dr={};function sn(jr){tt.type(jr,"string","extension name must be string");var jn=jr.toLowerCase(),Qn;try{Qn=dr[jn]=Ln(jr)}catch(ri){}return!!Qn}function Ln(jr){return It.getExtension(jr)?It.getExtension(jr):It.getExtension(jr.toLowerCase())?It.getExtension(jr.toLowerCase()):null}for(var un=0;un<Pe.extensions.length;++un){var bn=Pe.extensions[un];if(!sn(bn))return Pe.onDestroy(),Pe.onDone('"'+bn+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return Pe.optionalExtensions.forEach(sn),{extensions:dr,restore:function(){Object.keys(dr).forEach(function(jr){if(dr[jr]&&!sn(jr))throw new Error("(regl): error restoring extension "+jr)})}}}function fr(It,Pe){for(var dr=Array(It),sn=0;sn<It;++sn)dr[sn]=Pe(sn);return dr}var _r=5120,we=5121,ir=5122,Hr=5123,In=5124,nn=5125,Yr=5126;function On(It){for(var Pe=16;Pe<=1<<28;Pe*=16)if(It<=Pe)return Pe;return 0}function bi(It){var Pe,dr;return Pe=(It>65535)<<4,It>>>=Pe,dr=(It>255)<<3,It>>>=dr,Pe|=dr,dr=(It>15)<<2,It>>>=dr,Pe|=dr,dr=(It>3)<<1,It>>>=dr,Pe|=dr,Pe|It>>1}function Mi(){var It=fr(8,function(){return[]});function Pe(un){var bn=On(un),jr=It[bi(bn)>>2];return jr.length>0?jr.pop():new ArrayBuffer(bn)}function dr(un){It[bi(un.byteLength)>>2].push(un)}function sn(un,bn){var jr=null;switch(un){case _r:jr=new Int8Array(Pe(bn),0,bn);break;case we:jr=new Uint8Array(Pe(bn),0,bn);break;case ir:jr=new Int16Array(Pe(2*bn),0,bn);break;case Hr:jr=new Uint16Array(Pe(2*bn),0,bn);break;case In:jr=new Int32Array(Pe(4*bn),0,bn);break;case nn:jr=new Uint32Array(Pe(4*bn),0,bn);break;case Yr:jr=new Float32Array(Pe(4*bn),0,bn);break;default:return null}return jr.length!==bn?jr.subarray(0,bn):jr}function Ln(un){dr(un.buffer)}return{alloc:Pe,free:dr,allocType:sn,freeType:Ln}}var tn=Mi();tn.zero=Mi();var mi=3408,Yn=3410,fi=3411,Ea=3412,si=3413,Ia=3414,vo=3415,Oa=33901,Ha=33902,wa=3379,ya=3386,Qa=34921,Wo=36347,yo=36348,Va=35661,Ya=35660,No=34930,Nu=36349,ts=34076,bo=34024,rr=7936,de=7937,Ve=7938,Mr=35724,rn=34047,kn=36063,$n=34852,Cn=3553,Ki=34067,Fa=34069,Ss=33984,ko=6408,zo=5126,oo=5121,Xo=36160,iu=36053,Ko=36064,Ul=16384,$c=function(It,Pe){var dr=1;Pe.ext_texture_filter_anisotropic&&(dr=It.getParameter(rn));var sn=1,Ln=1;Pe.webgl_draw_buffers&&(sn=It.getParameter($n),Ln=It.getParameter(kn));var un=!!Pe.oes_texture_float;if(un){var bn=It.createTexture();It.bindTexture(Cn,bn),It.texImage2D(Cn,0,ko,1,1,0,ko,zo,null);var jr=It.createFramebuffer();if(It.bindFramebuffer(Xo,jr),It.framebufferTexture2D(Xo,Ko,Cn,bn,0),It.bindTexture(Cn,null),It.checkFramebufferStatus(Xo)!==iu)un=!1;else{It.viewport(0,0,1,1),It.clearColor(1,0,0,1),It.clear(Ul);var jn=tn.allocType(zo,4);It.readPixels(0,0,1,1,ko,zo,jn),It.getError()?un=!1:(It.deleteFramebuffer(jr),It.deleteTexture(bn),un=jn[0]===1),tn.freeType(jn)}}var Qn=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ri=!0;if(!Qn){var ni=It.createTexture(),_i=tn.allocType(oo,36);It.activeTexture(Ss),It.bindTexture(Ki,ni),It.texImage2D(Fa,0,ko,3,3,0,ko,oo,_i),tn.freeType(_i),It.bindTexture(Ki,null),It.deleteTexture(ni),ri=!It.getError()}return{colorBits:[It.getParameter(Yn),It.getParameter(fi),It.getParameter(Ea),It.getParameter(si)],depthBits:It.getParameter(Ia),stencilBits:It.getParameter(vo),subpixelBits:It.getParameter(mi),extensions:Object.keys(Pe).filter(function(qn){return!!Pe[qn]}),maxAnisotropic:dr,maxDrawbuffers:sn,maxColorAttachments:Ln,pointSizeDims:It.getParameter(Oa),lineWidthDims:It.getParameter(Ha),maxViewportDims:It.getParameter(ya),maxCombinedTextureUnits:It.getParameter(Va),maxCubeMapSize:It.getParameter(ts),maxRenderbufferSize:It.getParameter(bo),maxTextureUnits:It.getParameter(No),maxTextureSize:It.getParameter(wa),maxAttributes:It.getParameter(Qa),maxVertexUniforms:It.getParameter(Wo),maxVertexTextureUnits:It.getParameter(Ya),maxVaryingVectors:It.getParameter(yo),maxFragmentUniforms:It.getParameter(Nu),glsl:It.getParameter(Mr),renderer:It.getParameter(de),vendor:It.getParameter(rr),version:It.getParameter(Ve),readFloat:un,npotTextureCube:ri}};function Ku(It){return!!It&&typeof It=="object"&&Array.isArray(It.shape)&&Array.isArray(It.stride)&&typeof It.offset=="number"&&It.shape.length===It.stride.length&&(Array.isArray(It.data)||gt(It.data))}var Ce=function(It){return Object.keys(It).map(function(Pe){return It[Pe]})},Xe={shape:xs,flatten:Ba};function Cr(It,Pe,dr){for(var sn=0;sn<Pe;++sn)dr[sn]=It[sn]}function on(It,Pe,dr,sn){for(var Ln=0,un=0;un<Pe;++un)for(var bn=It[un],jr=0;jr<dr;++jr)sn[Ln++]=bn[jr]}function li(It,Pe,dr,sn,Ln,un){for(var bn=un,jr=0;jr<Pe;++jr)for(var jn=It[jr],Qn=0;Qn<dr;++Qn)for(var ri=jn[Qn],ni=0;ni<sn;++ni)Ln[bn++]=ri[ni]}function Di(It,Pe,dr,sn,Ln){for(var un=1,bn=dr+1;bn<Pe.length;++bn)un*=Pe[bn];var jr=Pe[dr];if(Pe.length-dr===4){var jn=Pe[dr+1],Qn=Pe[dr+2],ri=Pe[dr+3];for(bn=0;bn<jr;++bn)li(It[bn],jn,Qn,ri,sn,Ln),Ln+=un}else for(bn=0;bn<jr;++bn)Di(It[bn],Pe,dr+1,sn,Ln),Ln+=un}function Ba(It,Pe,dr,sn){var Ln=1;if(Pe.length)for(var un=0;un<Pe.length;++un)Ln*=Pe[un];else Ln=0;var bn=sn||tn.allocType(dr,Ln);switch(Pe.length){case 0:break;case 1:Cr(It,Pe[0],bn);break;case 2:on(It,Pe[0],Pe[1],bn);break;case 3:li(It,Pe[0],Pe[1],Pe[2],bn,0);break;default:Di(It,Pe,0,bn,0)}return bn}function xs(It){for(var Pe=[],dr=It;dr.length;dr=dr[0])Pe.push(dr.length);return Pe}var es={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},ls=5120,zs=5122,Qu=5124,Cu=5121,Ks=5123,Au=5125,zu=5126,xl=5126,Ju={int8:ls,int16:zs,int32:Qu,uint8:Cu,uint16:Ks,uint32:Au,float:zu,float32:xl},Uu=35048,Uo=35040,js={dynamic:Uu,stream:Uo,static:35044},Rc=Xe.flatten,qc=Xe.shape,Tu=35044,Zl=35040,Cs=5121,Zu=5126,ja=[];ja[5120]=1,ja[5122]=2,ja[5124]=4,ja[5121]=1,ja[5123]=2,ja[5125]=4,ja[5126]=4;function Dc(It){return es[Object.prototype.toString.call(It)]|0}function D(It,Pe){for(var dr=0;dr<Pe.length;++dr)It[dr]=Pe[dr]}function X(It,Pe,dr,sn,Ln,un,bn){for(var jr=0,jn=0;jn<dr;++jn)for(var Qn=0;Qn<sn;++Qn)It[jr++]=Pe[Ln*jn+un*Qn+bn]}function Mt(It,Pe,dr,sn){var Ln=0,un={};function bn(Gr){this.id=Ln++,this.buffer=It.createBuffer(),this.type=Gr,this.usage=Tu,this.byteLength=0,this.dimension=1,this.dtype=Cs,this.persistentData=null,dr.profile&&(this.stats={size:0})}bn.prototype.bind=function(){It.bindBuffer(this.type,this.buffer)},bn.prototype.destroy=function(){_i(this)};var jr=[];function jn(Gr,mn){var Vn=jr.pop();return Vn||(Vn=new bn(Gr)),Vn.bind(),ni(Vn,mn,Zl,0,1,!1),Vn}function Qn(Gr){jr.push(Gr)}function ri(Gr,mn,Vn){Gr.byteLength=mn.byteLength,It.bufferData(Gr.type,mn,Vn)}function ni(Gr,mn,Vn,di,Bn,hi){var Li;if(Gr.usage=Vn,Array.isArray(mn)){if(Gr.dtype=di||Zu,mn.length>0){var la;if(Array.isArray(mn[0])){Li=qc(mn);for(var En=1,Mn=1;Mn<Li.length;++Mn)En*=Li[Mn];Gr.dimension=En,la=Rc(mn,Li,Gr.dtype),ri(Gr,la,Vn),hi?Gr.persistentData=la:tn.freeType(la)}else if(typeof mn[0]=="number"){Gr.dimension=Bn;var Xi=tn.allocType(Gr.dtype,mn.length);D(Xi,mn),ri(Gr,Xi,Vn),hi?Gr.persistentData=Xi:tn.freeType(Xi)}else gt(mn[0])?(Gr.dimension=mn[0].length,Gr.dtype=di||Dc(mn[0])||Zu,la=Rc(mn,[mn.length,mn[0].length],Gr.dtype),ri(Gr,la,Vn),hi?Gr.persistentData=la:tn.freeType(la)):tt.raise("invalid buffer data")}}else if(gt(mn))Gr.dtype=di||Dc(mn),Gr.dimension=Bn,ri(Gr,mn,Vn),hi&&(Gr.persistentData=new Uint8Array(new Uint8Array(mn.buffer)));else if(Ku(mn)){Li=mn.shape;var Si=mn.stride,Jn=mn.offset,vi=0,pi=0,Ua=0,Ca=0;Li.length===1?(vi=Li[0],pi=1,Ua=Si[0],Ca=0):Li.length===2?(vi=Li[0],pi=Li[1],Ua=Si[0],Ca=Si[1]):tt.raise("invalid shape"),Gr.dtype=di||Dc(mn.data)||Zu,Gr.dimension=pi;var Ci=tn.allocType(Gr.dtype,vi*pi);X(Ci,mn.data,vi,pi,Ua,Ca,Jn),ri(Gr,Ci,Vn),hi?Gr.persistentData=Ci:tn.freeType(Ci)}else mn instanceof ArrayBuffer?(Gr.dtype=Cs,Gr.dimension=Bn,ri(Gr,mn,Vn),hi&&(Gr.persistentData=new Uint8Array(new Uint8Array(mn)))):tt.raise("invalid buffer data")}function _i(Gr){Pe.bufferCount--,sn(Gr);var mn=Gr.buffer;tt(mn,"buffer must not be deleted already"),It.deleteBuffer(mn),Gr.buffer=null,delete un[Gr.id]}function qn(Gr,mn,Vn,di){Pe.bufferCount++;var Bn=new bn(mn);un[Bn.id]=Bn;function hi(En){var Mn=Tu,Xi=null,Si=0,Jn=0,vi=1;return Array.isArray(En)||gt(En)||Ku(En)||En instanceof ArrayBuffer?Xi=En:typeof En=="number"?Si=En|0:En&&(tt.type(En,"object","buffer arguments must be an object, a number or an array"),"data"in En&&(tt(Xi===null||Array.isArray(Xi)||gt(Xi)||Ku(Xi),"invalid data for buffer"),Xi=En.data),"usage"in En&&(tt.parameter(En.usage,js,"invalid buffer usage"),Mn=js[En.usage]),"type"in En&&(tt.parameter(En.type,Ju,"invalid buffer type"),Jn=Ju[En.type]),"dimension"in En&&(tt.type(En.dimension,"number","invalid dimension"),vi=En.dimension|0),"length"in En&&(tt.nni(Si,"buffer length must be a nonnegative integer"),Si=En.length|0)),Bn.bind(),Xi?ni(Bn,Xi,Mn,Jn,vi,di):(Si&&It.bufferData(Bn.type,Si,Mn),Bn.dtype=Jn||Cs,Bn.usage=Mn,Bn.dimension=vi,Bn.byteLength=Si),dr.profile&&(Bn.stats.size=Bn.byteLength*ja[Bn.dtype]),hi}function Li(En,Mn){tt(Mn+En.byteLength<=Bn.byteLength,"invalid buffer subdata call, buffer is too small. Can't write data of size "+En.byteLength+" starting from offset "+Mn+" to a buffer of size "+Bn.byteLength),It.bufferSubData(Bn.type,Mn,En)}function la(En,Mn){var Xi=(Mn||0)|0,Si;if(Bn.bind(),gt(En)||En instanceof ArrayBuffer)Li(En,Xi);else if(Array.isArray(En)){if(En.length>0)if(typeof En[0]=="number"){var Jn=tn.allocType(Bn.dtype,En.length);D(Jn,En),Li(Jn,Xi),tn.freeType(Jn)}else if(Array.isArray(En[0])||gt(En[0])){Si=qc(En);var vi=Rc(En,Si,Bn.dtype);Li(vi,Xi),tn.freeType(vi)}else tt.raise("invalid buffer data")}else if(Ku(En)){Si=En.shape;var pi=En.stride,Ua=0,Ca=0,Ci=0,Pi=0;Si.length===1?(Ua=Si[0],Ca=1,Ci=pi[0],Pi=0):Si.length===2?(Ua=Si[0],Ca=Si[1],Ci=pi[0],Pi=pi[1]):tt.raise("invalid shape");var ma=Array.isArray(En.data)?Bn.dtype:Dc(En.data),Ma=tn.allocType(ma,Ua*Ca);X(Ma,En.data,Ua,Ca,Ci,Pi,En.offset),Li(Ma,Xi),tn.freeType(Ma)}else tt.raise("invalid data for buffer subdata");return hi}return Vn||hi(Gr),hi._reglType="buffer",hi._buffer=Bn,hi.subdata=la,dr.profile&&(hi.stats=Bn.stats),hi.destroy=function(){_i(Bn)},hi}function ii(){Ce(un).forEach(function(Gr){Gr.buffer=It.createBuffer(),It.bindBuffer(Gr.type,Gr.buffer),It.bufferData(Gr.type,Gr.persistentData||Gr.byteLength,Gr.usage)})}return dr.profile&&(Pe.getTotalBufferSize=function(){var Gr=0;return Object.keys(un).forEach(function(mn){Gr+=un[mn].stats.size}),Gr}),{create:qn,createStream:jn,destroyStream:Qn,clear:function(){Ce(un).forEach(_i),jr.forEach(_i)},getBuffer:function(Gr){return Gr&&Gr._buffer instanceof bn?Gr._buffer:null},restore:ii,_initBuffer:ni}}var it=0,fe=0,He=1,br=1,Ur=4,Nr=4,An={points:it,point:fe,lines:He,line:br,triangles:Ur,triangle:Nr,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Hn=0,Ji=1,ka=4,Sa=5120,eo=5121,Eo=5122,So=5123,ro=5124,pu=5125,Il=34963,bl=35040,Vl=35044;function ul(It,Pe,dr,sn){var Ln={},un=0,bn={uint8:eo,uint16:So};Pe.oes_element_index_uint&&(bn.uint32=pu);function jr(ii){this.id=un++,Ln[this.id]=this,this.buffer=ii,this.primType=ka,this.vertCount=0,this.type=0}jr.prototype.bind=function(){this.buffer.bind()};var jn=[];function Qn(ii){var Gr=jn.pop();return Gr||(Gr=new jr(dr.create(null,Il,!0,!1)._buffer)),ni(Gr,ii,bl,-1,-1,0,0),Gr}function ri(ii){jn.push(ii)}function ni(ii,Gr,mn,Vn,di,Bn,hi){ii.buffer.bind();var Li;if(Gr){var la=hi;!hi&&(!gt(Gr)||Ku(Gr)&&!gt(Gr.data))&&(la=Pe.oes_element_index_uint?pu:So),dr._initBuffer(ii.buffer,Gr,mn,la,3)}else It.bufferData(Il,Bn,mn),ii.buffer.dtype=Li||eo,ii.buffer.usage=mn,ii.buffer.dimension=3,ii.buffer.byteLength=Bn;if(Li=hi,!hi){switch(ii.buffer.dtype){case eo:case Sa:Li=eo;break;case So:case Eo:Li=So;break;case pu:case ro:Li=pu;break;default:tt.raise("unsupported type for element array")}ii.buffer.dtype=Li}ii.type=Li,tt(Li!==pu||!!Pe.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var En=di;En<0&&(En=ii.buffer.byteLength,Li===So?En>>=1:Li===pu&&(En>>=2)),ii.vertCount=En;var Mn=Vn;if(Vn<0){Mn=ka;var Xi=ii.buffer.dimension;Xi===1&&(Mn=Hn),Xi===2&&(Mn=Ji),Xi===3&&(Mn=ka)}ii.primType=Mn}function _i(ii){sn.elementsCount--,tt(ii.buffer!==null,"must not double destroy elements"),delete Ln[ii.id],ii.buffer.destroy(),ii.buffer=null}function qn(ii,Gr){var mn=dr.create(null,Il,!0),Vn=new jr(mn._buffer);sn.elementsCount++;function di(Bn){if(!Bn)mn(),Vn.primType=ka,Vn.vertCount=0,Vn.type=eo;else if(typeof Bn=="number")mn(Bn),Vn.primType=ka,Vn.vertCount=Bn|0,Vn.type=eo;else{var hi=null,Li=Vl,la=-1,En=-1,Mn=0,Xi=0;Array.isArray(Bn)||gt(Bn)||Ku(Bn)?hi=Bn:(tt.type(Bn,"object","invalid arguments for elements"),"data"in Bn&&(hi=Bn.data,tt(Array.isArray(hi)||gt(hi)||Ku(hi),"invalid data for element buffer")),"usage"in Bn&&(tt.parameter(Bn.usage,js,"invalid element buffer usage"),Li=js[Bn.usage]),"primitive"in Bn&&(tt.parameter(Bn.primitive,An,"invalid element buffer primitive"),la=An[Bn.primitive]),"count"in Bn&&(tt(typeof Bn.count=="number"&&Bn.count>=0,"invalid vertex count for elements"),En=Bn.count|0),"type"in Bn&&(tt.parameter(Bn.type,bn,"invalid buffer type"),Xi=bn[Bn.type]),"length"in Bn?Mn=Bn.length|0:(Mn=En,Xi===So||Xi===Eo?Mn*=2:(Xi===pu||Xi===ro)&&(Mn*=4))),ni(Vn,hi,Li,la,En,Mn,Xi)}return di}return di(ii),di._reglType="elements",di._elements=Vn,di.subdata=function(Bn,hi){return mn.subdata(Bn,hi),di},di.destroy=function(){_i(Vn)},di}return{create:qn,createStream:Qn,destroyStream:ri,getElements:function(ii){return typeof ii=="function"&&ii._elements instanceof jr?ii._elements:null},clear:function(){Ce(Ln).forEach(_i)}}}var Gl=new Float32Array(1),Vu=new Uint32Array(Gl.buffer),cs=5123;function pe(It){for(var Pe=tn.allocType(cs,It.length),dr=0;dr<It.length;++dr)if(isNaN(It[dr]))Pe[dr]=65535;else if(It[dr]===1/0)Pe[dr]=31744;else if(It[dr]===-1/0)Pe[dr]=64512;else{Gl[0]=It[dr];var sn=Vu[0],Ln=sn>>>31<<15,un=(sn<<1>>>24)-127,bn=sn>>13&(1<<10)-1;if(un<-24)Pe[dr]=Ln;else if(un<-14){var jr=-14-un;Pe[dr]=Ln+(bn+(1<<10)>>jr)}else un>15?Pe[dr]=Ln+31744:Pe[dr]=Ln+(un+15<<10)+bn}return Pe}function ar(It){return Array.isArray(It)||gt(It)}var Fr=function(It){return!(It&It-1)&&!!It},Xr=34467,_n=3553,ki=34067,ia=34069,$a=6408,du=6406,au=6407,Xa=6409,Gu=6410,Vh=32854,Hl=32855,fd=36194,Bc=32819,kl=32820,Ap=33635,Ef=34042,Kc=6402,wf=34041,Sf=35904,Cf=35906,ll=36193,Nc=33776,nc=33777,Lo=33778,zc=33779,vc=35986,Qc=35987,ch=34798,fh=35840,Tp=35841,Gh=35842,Mp=35843,Gf=36196,Ll=5121,hh=5123,Oi=5125,Fn=5126,ph=10242,Ip=10243,hd=10497,Hf=33071,so=33648,Mu=10240,Po=10241,jl=9728,Af=9729,El=9984,qa=9985,ds=9986,no=9987,dh=33170,gc=4352,kp=4353,uv=4354,Qi=34046,vh=3317,gh=37440,Tf=37441,ou=37443,jf=37444,Mf=33984,vs=[El,ds,qa,no],Hi=[0,Xa,Gu,au,$a],rs={};rs[Xa]=rs[du]=rs[Kc]=1,rs[wf]=rs[Gu]=2,rs[au]=rs[Sf]=3,rs[$a]=rs[Cf]=4;function wl(It){return"[object "+It+"]"}var Jc=wl("HTMLCanvasElement"),mc=wl("OffscreenCanvas"),Iu=wl("CanvasRenderingContext2D"),pd=wl("ImageBitmap"),ei=wl("HTMLImageElement"),tf=wl("HTMLVideoElement"),mh=Object.keys(es).concat([Jc,mc,Iu,pd,ei,tf]),yc=[];yc[Ll]=1,yc[Fn]=4,yc[ll]=2,yc[hh]=2,yc[Oi]=4;var Oo=[];Oo[Vh]=2,Oo[Hl]=2,Oo[fd]=2,Oo[wf]=4,Oo[Nc]=.5,Oo[nc]=.5,Oo[Lo]=1,Oo[zc]=1,Oo[vc]=.5,Oo[Qc]=1,Oo[ch]=1,Oo[fh]=.5,Oo[Tp]=.25,Oo[Gh]=.5,Oo[Mp]=.25,Oo[Gf]=.5;function Hu(It){return Array.isArray(It)&&(It.length===0||typeof It[0]=="number")}function yh(It){if(!Array.isArray(It))return!1;var Pe=It.length;return!(Pe===0||!ar(It[0]))}function Wl(It){return Object.prototype.toString.call(It)}function Os(It){return Wl(It)===Jc}function Pl(It){return Wl(It)===mc}function Lp(It){return Wl(It)===Iu}function dd(It){return Wl(It)===pd}function ef(It){return Wl(It)===ei}function vd(It){return Wl(It)===tf}function ic(It){var Pe=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0;return!!(Pe&&It&&It.getContext)}function cl(It){var Pe=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0;return!!(Pe&&It&&"src"in It&&"crossOrigin"in It)}function io(It){if(!It)return!1;if(ic(It)||cl(It))return!0;var Pe=Wl(It);return mh.indexOf(Pe)>=0?!0:Hu(It)||yh(It)||Ku(It)}function Ws(It){return es[Object.prototype.toString.call(It)]|0}function Ol(It,Pe){var dr=Pe.length;switch(It.type){case Ll:case hh:case Oi:case Fn:var sn=tn.allocType(It.type,dr);sn.set(Pe),It.data=sn;break;case ll:It.data=pe(Pe);break;default:tt.raise("unsupported texture type, must specify a typed array")}}function vu(It,Pe){return tn.allocType(It.type===ll?Fn:It.type,Pe)}function Wf(It,Pe){It.type===ll?(It.data=pe(Pe),tn.freeType(Pe)):It.data=Pe}function If(It,Pe,dr,sn,Ln,un){for(var bn=It.width,jr=It.height,jn=It.channels,Qn=bn*jr*jn,ri=vu(It,Qn),ni=0,_i=0;_i<jr;++_i)for(var qn=0;qn<bn;++qn)for(var ii=0;ii<jn;++ii)ri[ni++]=Pe[dr*qn+sn*_i+Ln*ii+un];Wf(It,ri)}function gu(It,Pe,dr,sn,Ln,un){var bn;if(typeof Oo[It]!="undefined"?bn=Oo[It]:bn=rs[It]*yc[Pe],un&&(bn*=6),Ln){for(var jr=0,jn=dr;jn>=1;)jr+=bn*jn*jn,jn/=2;return jr}else return bn*dr*sn}function ku(It,Pe,dr,sn,Ln,un,bn){var jr={"don't care":gc,"dont care":gc,nice:uv,fast:kp},jn={repeat:hd,clamp:Hf,mirror:so},Qn={nearest:jl,linear:Af},ri=k({mipmap:no,"nearest mipmap nearest":El,"linear mipmap nearest":qa,"nearest mipmap linear":ds,"linear mipmap linear":no},Qn),ni={none:0,browser:jf},_i={uint8:Ll,rgba4:Bc,rgb565:Ap,"rgb5 a1":kl},qn={alpha:du,luminance:Xa,"luminance alpha":Gu,rgb:au,rgba:$a,rgba4:Vh,"rgb5 a1":Hl,rgb565:fd},ii={};Pe.ext_srgb&&(qn.srgb=Sf,qn.srgba=Cf),Pe.oes_texture_float&&(_i.float32=_i.float=Fn),Pe.oes_texture_half_float&&(_i.float16=_i["half float"]=ll),Pe.webgl_depth_texture&&(k(qn,{depth:Kc,"depth stencil":wf}),k(_i,{uint16:hh,uint32:Oi,"depth stencil":Ef})),Pe.webgl_compressed_texture_s3tc&&k(ii,{"rgb s3tc dxt1":Nc,"rgba s3tc dxt1":nc,"rgba s3tc dxt3":Lo,"rgba s3tc dxt5":zc}),Pe.webgl_compressed_texture_atc&&k(ii,{"rgb atc":vc,"rgba atc explicit alpha":Qc,"rgba atc interpolated alpha":ch}),Pe.webgl_compressed_texture_pvrtc&&k(ii,{"rgb pvrtc 4bppv1":fh,"rgb pvrtc 2bppv1":Tp,"rgba pvrtc 4bppv1":Gh,"rgba pvrtc 2bppv1":Mp}),Pe.webgl_compressed_texture_etc1&&(ii["rgb etc1"]=Gf);var Gr=Array.prototype.slice.call(It.getParameter(Xr)||new Uint32Array(0));Object.keys(ii).forEach(function(or){var fn=ii[or];Gr.indexOf(fn)>=0&&(qn[or]=fn)});var mn=Object.keys(qn);dr.textureFormats=mn;var Vn=[];Object.keys(qn).forEach(function(or){var fn=qn[or];Vn[fn]=or});var di=[];Object.keys(_i).forEach(function(or){var fn=_i[or];di[fn]=or});var Bn=[];Object.keys(Qn).forEach(function(or){var fn=Qn[or];Bn[fn]=or});var hi=[];Object.keys(ri).forEach(function(or){var fn=ri[or];hi[fn]=or});var Li=[];Object.keys(jn).forEach(function(or){var fn=jn[or];Li[fn]=or});var la=mn.reduce(function(or,fn){var en=qn[fn];return en===Xa||en===du||en===Xa||en===Gu||en===Kc||en===wf||Pe.ext_srgb&&(en===Sf||en===Cf)?or[en]=en:en===Hl||fn.indexOf("rgba")>=0?or[en]=$a:or[en]=au,or},{});function En(){this.internalformat=$a,this.format=$a,this.type=Ll,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=jf,this.width=0,this.height=0,this.channels=0}function Mn(or,fn){or.internalformat=fn.internalformat,or.format=fn.format,or.type=fn.type,or.compressed=fn.compressed,or.premultiplyAlpha=fn.premultiplyAlpha,or.flipY=fn.flipY,or.unpackAlignment=fn.unpackAlignment,or.colorSpace=fn.colorSpace,or.width=fn.width,or.height=fn.height,or.channels=fn.channels}function Xi(or,fn){if(!(typeof fn!="object"||!fn)){if("premultiplyAlpha"in fn&&(tt.type(fn.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),or.premultiplyAlpha=fn.premultiplyAlpha),"flipY"in fn&&(tt.type(fn.flipY,"boolean","invalid texture flip"),or.flipY=fn.flipY),"alignment"in fn&&(tt.oneOf(fn.alignment,[1,2,4,8],"invalid texture unpack alignment"),or.unpackAlignment=fn.alignment),"colorSpace"in fn&&(tt.parameter(fn.colorSpace,ni,"invalid colorSpace"),or.colorSpace=ni[fn.colorSpace]),"type"in fn){var en=fn.type;tt(Pe.oes_texture_float||!(en==="float"||en==="float32"),"you must enable the OES_texture_float extension in order to use floating point textures."),tt(Pe.oes_texture_half_float||!(en==="half float"||en==="float16"),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),tt(Pe.webgl_depth_texture||!(en==="uint16"||en==="uint32"||en==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),tt.parameter(en,_i,"invalid texture type"),or.type=_i[en]}var ji=or.width,ho=or.height,Je=or.channels,Se=!1;"shape"in fn?(tt(Array.isArray(fn.shape)&&fn.shape.length>=2,"shape must be an array"),ji=fn.shape[0],ho=fn.shape[1],fn.shape.length===3&&(Je=fn.shape[2],tt(Je>0&&Je<=4,"invalid number of channels"),Se=!0),tt(ji>=0&&ji<=dr.maxTextureSize,"invalid width"),tt(ho>=0&&ho<=dr.maxTextureSize,"invalid height")):("radius"in fn&&(ji=ho=fn.radius,tt(ji>=0&&ji<=dr.maxTextureSize,"invalid radius")),"width"in fn&&(ji=fn.width,tt(ji>=0&&ji<=dr.maxTextureSize,"invalid width")),"height"in fn&&(ho=fn.height,tt(ho>=0&&ho<=dr.maxTextureSize,"invalid height")),"channels"in fn&&(Je=fn.channels,tt(Je>0&&Je<=4,"invalid number of channels"),Se=!0)),or.width=ji|0,or.height=ho|0,or.channels=Je|0;var yr=!1;if("format"in fn){var Lr=fn.format;tt(Pe.webgl_depth_texture||!(Lr==="depth"||Lr==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),tt.parameter(Lr,qn,"invalid texture format");var qr=or.internalformat=qn[Lr];or.format=la[qr],Lr in _i&&("type"in fn||(or.type=_i[Lr])),Lr in ii&&(or.compressed=!0),yr=!0}!Se&&yr?or.channels=rs[or.format]:Se&&!yr?or.channels!==Hi[or.format]&&(or.format=or.internalformat=Hi[or.channels]):yr&&Se&&tt(or.channels===rs[or.format],"number of channels inconsistent with specified format")}}function Si(or){It.pixelStorei(gh,or.flipY),It.pixelStorei(Tf,or.premultiplyAlpha),It.pixelStorei(ou,or.colorSpace),It.pixelStorei(vh,or.unpackAlignment)}function Jn(){En.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function vi(or,fn){var en=null;if(io(fn)?en=fn:fn&&(tt.type(fn,"object","invalid pixel data type"),Xi(or,fn),"x"in fn&&(or.xOffset=fn.x|0),"y"in fn&&(or.yOffset=fn.y|0),io(fn.data)&&(en=fn.data)),tt(!or.compressed||en instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),fn.copy){tt(!en,"can not specify copy and data field for the same texture");var ji=Ln.viewportWidth,ho=Ln.viewportHeight;or.width=or.width||ji-or.xOffset,or.height=or.height||ho-or.yOffset,or.needsCopy=!0,tt(or.xOffset>=0&&or.xOffset<ji&&or.yOffset>=0&&or.yOffset<ho&&or.width>0&&or.width<=ji&&or.height>0&&or.height<=ho,"copy texture read out of bounds")}else if(!en)or.width=or.width||1,or.height=or.height||1,or.channels=or.channels||4;else if(gt(en))or.channels=or.channels||4,or.data=en,!("type"in fn)&&or.type===Ll&&(or.type=Ws(en));else if(Hu(en))or.channels=or.channels||4,Ol(or,en),or.alignment=1,or.needsFree=!0;else if(Ku(en)){var Je=en.data;!Array.isArray(Je)&&or.type===Ll&&(or.type=Ws(Je));var Se=en.shape,yr=en.stride,Lr,qr,Ar,Ye,Rr,je;Se.length===3?(Ar=Se[2],je=yr[2]):(tt(Se.length===2,"invalid ndarray pixel data, must be 2 or 3D"),Ar=1,je=1),Lr=Se[0],qr=Se[1],Ye=yr[0],Rr=yr[1],or.alignment=1,or.width=Lr,or.height=qr,or.channels=Ar,or.format=or.internalformat=Hi[Ar],or.needsFree=!0,If(or,Je,Ye,Rr,je,en.offset)}else if(ic(en)||Os(en)||Pl(en)||Lp(en))ic(en)||Os(en)||Pl(en)?or.element=en:or.element=en.canvas,or.width=or.element.width,or.height=or.element.height,or.channels=4;else if(dd(en))or.element=en,or.width=en.width,or.height=en.height,or.channels=4;else if(ef(en))or.element=en,or.width=en.naturalWidth,or.height=en.naturalHeight,or.channels=4;else if(cl(en))or.element=en,or.width=en.width,or.height=en.height,or.channels=4;else if(vd(en))or.element=en,or.width=en.videoWidth,or.height=en.videoHeight,or.channels=4;else if(yh(en)){var mr=or.width||en[0].length,tr=or.height||en.length,kr=or.channels;ar(en[0][0])?kr=kr||en[0][0].length:kr=kr||1;for(var Kr=Xe.shape(en),Nn=1,ti=0;ti<Kr.length;++ti)Nn*=Kr[ti];var ci=vu(or,Nn);Xe.flatten(en,Kr,"",ci),Wf(or,ci),or.alignment=1,or.width=mr,or.height=tr,or.channels=kr,or.format=or.internalformat=Hi[kr],or.needsFree=!0}or.type===Fn?tt(dr.extensions.indexOf("oes_texture_float")>=0,"oes_texture_float extension not enabled"):or.type===ll&&tt(dr.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function pi(or,fn,en){var ji=or.element,ho=or.data,Je=or.internalformat,Se=or.format,yr=or.type,Lr=or.width,qr=or.height;Si(or),ji?It.texImage2D(fn,en,Se,Se,yr,ji):or.compressed?It.compressedTexImage2D(fn,en,Je,Lr,qr,0,ho):or.needsCopy?(sn(),It.copyTexImage2D(fn,en,Se,or.xOffset,or.yOffset,Lr,qr,0)):It.texImage2D(fn,en,Se,Lr,qr,0,Se,yr,ho||null)}function Ua(or,fn,en,ji,ho){var Je=or.element,Se=or.data,yr=or.internalformat,Lr=or.format,qr=or.type,Ar=or.width,Ye=or.height;Si(or),Je?It.texSubImage2D(fn,ho,en,ji,Lr,qr,Je):or.compressed?It.compressedTexSubImage2D(fn,ho,en,ji,yr,Ar,Ye,Se):or.needsCopy?(sn(),It.copyTexSubImage2D(fn,ho,en,ji,or.xOffset,or.yOffset,Ar,Ye)):It.texSubImage2D(fn,ho,en,ji,Ar,Ye,Lr,qr,Se)}var Ca=[];function Ci(){return Ca.pop()||new Jn}function Pi(or){or.needsFree&&tn.freeType(or.data),Jn.call(or),Ca.push(or)}function ma(){En.call(this),this.genMipmaps=!1,this.mipmapHint=gc,this.mipmask=0,this.images=Array(16)}function Ma(or,fn,en){var ji=or.images[0]=Ci();or.mipmask=1,ji.width=or.width=fn,ji.height=or.height=en,ji.channels=or.channels=4}function lo(or,fn){var en=null;if(io(fn))en=or.images[0]=Ci(),Mn(en,or),vi(en,fn),or.mipmask=1;else if(Xi(or,fn),Array.isArray(fn.mipmap))for(var ji=fn.mipmap,ho=0;ho<ji.length;++ho)en=or.images[ho]=Ci(),Mn(en,or),en.width>>=ho,en.height>>=ho,vi(en,ji[ho]),or.mipmask|=1<<ho;else en=or.images[0]=Ci(),Mn(en,or),vi(en,fn),or.mipmask=1;Mn(or,or.images[0]),or.compressed&&(or.internalformat===Nc||or.internalformat===nc||or.internalformat===Lo||or.internalformat===zc)&&tt(or.width%4===0&&or.height%4===0,"for compressed texture formats, mipmap level 0 must have width and height that are a multiple of 4")}function Is(or,fn){for(var en=or.images,ji=0;ji<en.length;++ji){if(!en[ji])return;pi(en[ji],fn,ji)}}var ks=[];function co(){var or=ks.pop()||new ma;En.call(or),or.mipmask=0;for(var fn=0;fn<16;++fn)or.images[fn]=null;return or}function Go(or){for(var fn=or.images,en=0;en<fn.length;++en)fn[en]&&Pi(fn[en]),fn[en]=null;ks.push(or)}function Ts(){this.minFilter=jl,this.magFilter=jl,this.wrapS=Hf,this.wrapT=Hf,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=gc}function bu(or,fn){if("min"in fn){var en=fn.min;tt.parameter(en,ri),or.minFilter=ri[en],vs.indexOf(or.minFilter)>=0&&!("faces"in fn)&&(or.genMipmaps=!0)}if("mag"in fn){var ji=fn.mag;tt.parameter(ji,Qn),or.magFilter=Qn[ji]}var ho=or.wrapS,Je=or.wrapT;if("wrap"in fn){var Se=fn.wrap;typeof Se=="string"?(tt.parameter(Se,jn),ho=Je=jn[Se]):Array.isArray(Se)&&(tt.parameter(Se[0],jn),tt.parameter(Se[1],jn),ho=jn[Se[0]],Je=jn[Se[1]])}else{if("wrapS"in fn){var yr=fn.wrapS;tt.parameter(yr,jn),ho=jn[yr]}if("wrapT"in fn){var Lr=fn.wrapT;tt.parameter(Lr,jn),Je=jn[Lr]}}if(or.wrapS=ho,or.wrapT=Je,"anisotropic"in fn){var qr=fn.anisotropic;tt(typeof qr=="number"&&qr>=1&&qr<=dr.maxAnisotropic,"aniso samples must be between 1 and "),or.anisotropic=fn.anisotropic}if("mipmap"in fn){var Ar=!1;switch(typeof fn.mipmap){case"string":tt.parameter(fn.mipmap,jr,"invalid mipmap hint"),or.mipmapHint=jr[fn.mipmap],or.genMipmaps=!0,Ar=!0;break;case"boolean":Ar=or.genMipmaps=fn.mipmap;break;case"object":tt(Array.isArray(fn.mipmap),"invalid mipmap type"),or.genMipmaps=!1,Ar=!0;break;default:tt.raise("invalid mipmap type")}Ar&&!("min"in fn)&&(or.minFilter=El)}}function ns(or,fn){It.texParameteri(fn,Po,or.minFilter),It.texParameteri(fn,Mu,or.magFilter),It.texParameteri(fn,ph,or.wrapS),It.texParameteri(fn,Ip,or.wrapT),Pe.ext_texture_filter_anisotropic&&It.texParameteri(fn,Qi,or.anisotropic),or.genMipmaps&&(It.hint(dh,or.mipmapHint),It.generateMipmap(fn))}var Ou=0,Ys={},ju=dr.maxTextureUnits,Rs=Array(ju).map(function(){return null});function Na(or){En.call(this),this.mipmask=0,this.internalformat=$a,this.id=Ou++,this.refCount=1,this.target=or,this.texture=It.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Ts,bn.profile&&(this.stats={size:0})}function eu(or){It.activeTexture(Mf),It.bindTexture(or.target,or.texture)}function Ao(){var or=Rs[0];or?It.bindTexture(or.target,or.texture):It.bindTexture(_n,null)}function Fu(or){var fn=or.texture;tt(fn,"must not double destroy texture");var en=or.unit,ji=or.target;en>=0&&(It.activeTexture(Mf+en),It.bindTexture(ji,null),Rs[en]=null),It.deleteTexture(fn),or.texture=null,or.params=null,or.pixels=null,or.refCount=0,delete Ys[or.id],un.textureCount--}k(Na.prototype,{bind:function(){var or=this;or.bindCount+=1;var fn=or.unit;if(fn<0){for(var en=0;en<ju;++en){var ji=Rs[en];if(ji){if(ji.bindCount>0)continue;ji.unit=-1}Rs[en]=or,fn=en;break}fn>=ju&&tt.raise("insufficient number of texture units"),bn.profile&&un.maxTextureUnits<fn+1&&(un.maxTextureUnits=fn+1),or.unit=fn,It.activeTexture(Mf+fn),It.bindTexture(or.target,or.texture)}return fn},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&Fu(this)}});function pa(or,fn){var en=new Na(_n);Ys[en.id]=en,un.textureCount++;function ji(Se,yr){var Lr=en.texInfo;Ts.call(Lr);var qr=co();return typeof Se=="number"?typeof yr=="number"?Ma(qr,Se|0,yr|0):Ma(qr,Se|0,Se|0):Se?(tt.type(Se,"object","invalid arguments to regl.texture"),bu(Lr,Se),lo(qr,Se)):Ma(qr,1,1),Lr.genMipmaps&&(qr.mipmask=(qr.width<<1)-1),en.mipmask=qr.mipmask,Mn(en,qr),tt.texture2D(Lr,qr,dr),en.internalformat=qr.internalformat,ji.width=qr.width,ji.height=qr.height,eu(en),Is(qr,_n),ns(Lr,_n),Ao(),Go(qr),bn.profile&&(en.stats.size=gu(en.internalformat,en.type,qr.width,qr.height,Lr.genMipmaps,!1)),ji.format=Vn[en.internalformat],ji.type=di[en.type],ji.mag=Bn[Lr.magFilter],ji.min=hi[Lr.minFilter],ji.wrapS=Li[Lr.wrapS],ji.wrapT=Li[Lr.wrapT],ji}function ho(Se,yr,Lr,qr){tt(!!Se,"must specify image data");var Ar=yr|0,Ye=Lr|0,Rr=qr|0,je=Ci();return Mn(je,en),je.width=0,je.height=0,vi(je,Se),je.width=je.width||(en.width>>Rr)-Ar,je.height=je.height||(en.height>>Rr)-Ye,tt(en.type===je.type&&en.format===je.format&&en.internalformat===je.internalformat,"incompatible format for texture.subimage"),tt(Ar>=0&&Ye>=0&&Ar+je.width<=en.width&&Ye+je.height<=en.height,"texture.subimage write out of bounds"),tt(en.mipmask&1<<Rr,"missing mipmap data"),tt(je.data||je.element||je.needsCopy,"missing image data"),eu(en),Ua(je,_n,Ar,Ye,Rr),Ao(),Pi(je),ji}function Je(Se,yr){var Lr=Se|0,qr=yr|0||Lr;if(Lr===en.width&&qr===en.height)return ji;ji.width=en.width=Lr,ji.height=en.height=qr,eu(en);for(var Ar=0;en.mipmask>>Ar;++Ar){var Ye=Lr>>Ar,Rr=qr>>Ar;if(!Ye||!Rr)break;It.texImage2D(_n,Ar,en.format,Ye,Rr,0,en.format,en.type,null)}return Ao(),bn.profile&&(en.stats.size=gu(en.internalformat,en.type,Lr,qr,!1,!1)),ji}return ji(or,fn),ji.subimage=ho,ji.resize=Je,ji._reglType="texture2d",ji._texture=en,bn.profile&&(ji.stats=en.stats),ji.destroy=function(){en.decRef()},ji}function fo(or,fn,en,ji,ho,Je){var Se=new Na(ki);Ys[Se.id]=Se,un.cubeCount++;var yr=new Array(6);function Lr(Ye,Rr,je,mr,tr,kr){var Kr,Nn=Se.texInfo;for(Ts.call(Nn),Kr=0;Kr<6;++Kr)yr[Kr]=co();if(typeof Ye=="number"||!Ye){var ti=Ye|0||1;for(Kr=0;Kr<6;++Kr)Ma(yr[Kr],ti,ti)}else if(typeof Ye=="object")if(Rr)lo(yr[0],Ye),lo(yr[1],Rr),lo(yr[2],je),lo(yr[3],mr),lo(yr[4],tr),lo(yr[5],kr);else if(bu(Nn,Ye),Xi(Se,Ye),"faces"in Ye){var ci=Ye.faces;for(tt(Array.isArray(ci)&&ci.length===6,"cube faces must be a length 6 array"),Kr=0;Kr<6;++Kr)tt(typeof ci[Kr]=="object"&&!!ci[Kr],"invalid input for cube map face"),Mn(yr[Kr],Se),lo(yr[Kr],ci[Kr])}else for(Kr=0;Kr<6;++Kr)lo(yr[Kr],Ye);else tt.raise("invalid arguments to cube map");for(Mn(Se,yr[0]),tt.optional(function(){dr.npotTextureCube||tt(Fr(Se.width)&&Fr(Se.height),"your browser does not support non power or two texture dimensions")}),Nn.genMipmaps?Se.mipmask=(yr[0].width<<1)-1:Se.mipmask=yr[0].mipmask,tt.textureCube(Se,Nn,yr,dr),Se.internalformat=yr[0].internalformat,Lr.width=yr[0].width,Lr.height=yr[0].height,eu(Se),Kr=0;Kr<6;++Kr)Is(yr[Kr],ia+Kr);for(ns(Nn,ki),Ao(),bn.profile&&(Se.stats.size=gu(Se.internalformat,Se.type,Lr.width,Lr.height,Nn.genMipmaps,!0)),Lr.format=Vn[Se.internalformat],Lr.type=di[Se.type],Lr.mag=Bn[Nn.magFilter],Lr.min=hi[Nn.minFilter],Lr.wrapS=Li[Nn.wrapS],Lr.wrapT=Li[Nn.wrapT],Kr=0;Kr<6;++Kr)Go(yr[Kr]);return Lr}function qr(Ye,Rr,je,mr,tr){tt(!!Rr,"must specify image data"),tt(typeof Ye=="number"&&Ye===(Ye|0)&&Ye>=0&&Ye<6,"invalid face");var kr=je|0,Kr=mr|0,Nn=tr|0,ti=Ci();return Mn(ti,Se),ti.width=0,ti.height=0,vi(ti,Rr),ti.width=ti.width||(Se.width>>Nn)-kr,ti.height=ti.height||(Se.height>>Nn)-Kr,tt(Se.type===ti.type&&Se.format===ti.format&&Se.internalformat===ti.internalformat,"incompatible format for texture.subimage"),tt(kr>=0&&Kr>=0&&kr+ti.width<=Se.width&&Kr+ti.height<=Se.height,"texture.subimage write out of bounds"),tt(Se.mipmask&1<<Nn,"missing mipmap data"),tt(ti.data||ti.element||ti.needsCopy,"missing image data"),eu(Se),Ua(ti,ia+Ye,kr,Kr,Nn),Ao(),Pi(ti),Lr}function Ar(Ye){var Rr=Ye|0;if(Rr!==Se.width){Lr.width=Se.width=Rr,Lr.height=Se.height=Rr,eu(Se);for(var je=0;je<6;++je)for(var mr=0;Se.mipmask>>mr;++mr)It.texImage2D(ia+je,mr,Se.format,Rr>>mr,Rr>>mr,0,Se.format,Se.type,null);return Ao(),bn.profile&&(Se.stats.size=gu(Se.internalformat,Se.type,Lr.width,Lr.height,!1,!0)),Lr}}return Lr(or,fn,en,ji,ho,Je),Lr.subimage=qr,Lr.resize=Ar,Lr._reglType="textureCube",Lr._texture=Se,bn.profile&&(Lr.stats=Se.stats),Lr.destroy=function(){Se.decRef()},Lr}function To(){for(var or=0;or<ju;++or)It.activeTexture(Mf+or),It.bindTexture(_n,null),Rs[or]=null;Ce(Ys).forEach(Fu),un.cubeCount=0,un.textureCount=0}bn.profile&&(un.getTotalTextureSize=function(){var or=0;return Object.keys(Ys).forEach(function(fn){or+=Ys[fn].stats.size}),or});function Us(){for(var or=0;or<ju;++or){var fn=Rs[or];fn&&(fn.bindCount=0,fn.unit=-1,Rs[or]=null)}Ce(Ys).forEach(function(en){en.texture=It.createTexture(),It.bindTexture(en.target,en.texture);for(var ji=0;ji<32;++ji)if(en.mipmask&1<<ji)if(en.target===_n)It.texImage2D(_n,ji,en.internalformat,en.width>>ji,en.height>>ji,0,en.internalformat,en.type,null);else for(var ho=0;ho<6;++ho)It.texImage2D(ia+ho,ji,en.internalformat,en.width>>ji,en.height>>ji,0,en.internalformat,en.type,null);ns(en.texInfo,en.target)})}function ql(){for(var or=0;or<ju;++or){var fn=Rs[or];fn&&(fn.bindCount=0,fn.unit=-1,Rs[or]=null),It.activeTexture(Mf+or),It.bindTexture(_n,null),It.bindTexture(ki,null)}}return{create2D:pa,createCube:fo,clear:To,getTexture:function(or){return null},restore:Us,refresh:ql}}var _c=36161,aa=32854,Ii=32855,_h=36194,fl=33189,tl=36168,su=34041,Sl=35907,gd=34836,Hh=34842,Yo=34843,os=[];os[aa]=2,os[Ii]=2,os[_h]=2,os[fl]=2,os[tl]=1,os[su]=4,os[Sl]=4,os[gd]=16,os[Hh]=8,os[Yo]=6;function lv(It,Pe,dr){return os[It]*Pe*dr}var jh=function(It,Pe,dr,sn,Ln){var un={rgba4:aa,rgb565:_h,"rgb5 a1":Ii,depth:fl,stencil:tl,"depth stencil":su};Pe.ext_srgb&&(un.srgba=Sl),Pe.ext_color_buffer_half_float&&(un.rgba16f=Hh,un.rgb16f=Yo),Pe.webgl_color_buffer_float&&(un.rgba32f=gd);var bn=[];Object.keys(un).forEach(function(qn){var ii=un[qn];bn[ii]=qn});var jr=0,jn={};function Qn(qn){this.id=jr++,this.refCount=1,this.renderbuffer=qn,this.format=aa,this.width=0,this.height=0,Ln.profile&&(this.stats={size:0})}Qn.prototype.decRef=function(){--this.refCount<=0&&ri(this)};function ri(qn){var ii=qn.renderbuffer;tt(ii,"must not double destroy renderbuffer"),It.bindRenderbuffer(_c,null),It.deleteRenderbuffer(ii),qn.renderbuffer=null,qn.refCount=0,delete jn[qn.id],sn.renderbufferCount--}function ni(qn,ii){var Gr=new Qn(It.createRenderbuffer());jn[Gr.id]=Gr,sn.renderbufferCount++;function mn(di,Bn){var hi=0,Li=0,la=aa;if(typeof di=="object"&&di){var En=di;if("shape"in En){var Mn=En.shape;tt(Array.isArray(Mn)&&Mn.length>=2,"invalid renderbuffer shape"),hi=Mn[0]|0,Li=Mn[1]|0}else"radius"in En&&(hi=Li=En.radius|0),"width"in En&&(hi=En.width|0),"height"in En&&(Li=En.height|0);"format"in En&&(tt.parameter(En.format,un,"invalid renderbuffer format"),la=un[En.format])}else typeof di=="number"?(hi=di|0,typeof Bn=="number"?Li=Bn|0:Li=hi):di?tt.raise("invalid arguments to renderbuffer constructor"):hi=Li=1;if(tt(hi>0&&Li>0&&hi<=dr.maxRenderbufferSize&&Li<=dr.maxRenderbufferSize,"invalid renderbuffer size"),!(hi===Gr.width&&Li===Gr.height&&la===Gr.format))return mn.width=Gr.width=hi,mn.height=Gr.height=Li,Gr.format=la,It.bindRenderbuffer(_c,Gr.renderbuffer),It.renderbufferStorage(_c,la,hi,Li),tt(It.getError()===0,"invalid render buffer format"),Ln.profile&&(Gr.stats.size=lv(Gr.format,Gr.width,Gr.height)),mn.format=bn[Gr.format],mn}function Vn(di,Bn){var hi=di|0,Li=Bn|0||hi;return hi===Gr.width&&Li===Gr.height||(tt(hi>0&&Li>0&&hi<=dr.maxRenderbufferSize&&Li<=dr.maxRenderbufferSize,"invalid renderbuffer size"),mn.width=Gr.width=hi,mn.height=Gr.height=Li,It.bindRenderbuffer(_c,Gr.renderbuffer),It.renderbufferStorage(_c,Gr.format,hi,Li),tt(It.getError()===0,"invalid render buffer format"),Ln.profile&&(Gr.stats.size=lv(Gr.format,Gr.width,Gr.height))),mn}return mn(qn,ii),mn.resize=Vn,mn._reglType="renderbuffer",mn._renderbuffer=Gr,Ln.profile&&(mn.stats=Gr.stats),mn.destroy=function(){Gr.decRef()},mn}Ln.profile&&(sn.getTotalRenderbufferSize=function(){var qn=0;return Object.keys(jn).forEach(function(ii){qn+=jn[ii].stats.size}),qn});function _i(){Ce(jn).forEach(function(qn){qn.renderbuffer=It.createRenderbuffer(),It.bindRenderbuffer(_c,qn.renderbuffer),It.renderbufferStorage(_c,qn.format,qn.width,qn.height)}),It.bindRenderbuffer(_c,null)}return{create:ni,clear:function(){Ce(jn).forEach(ri)},restore:_i}},hl=36160,Xl=36161,fa=3553,kf=34069,xc=36064,Pp=36096,Xf=36128,Wh=33306,md=36053,Xh=36054,rf=36055,yd=36057,bc=36061,Lf=36193,Op=5121,nf=5126,ac=6407,Yh=6408,Yf=6402,cv=[ac,Yh],xh=[];xh[Yh]=4,xh[ac]=3;var x=[];x[Op]=1,x[nf]=4,x[Lf]=2;var C=32854,E=32855,M=36194,U=33189,H=36168,$=34041,ht=35907,Ut=34836,re=34842,Fe=34843,Re=[C,E,M,ht,re,Fe,Ut],De={};De[md]="complete",De[Xh]="incomplete attachment",De[yd]="incomplete dimensions",De[rf]="incomplete, missing attachment",De[bc]="unsupported";function cr(It,Pe,dr,sn,Ln,un){var bn={cur:null,next:null,dirty:!1,setFBO:null},jr=["rgba"],jn=["rgba4","rgb565","rgb5 a1"];Pe.ext_srgb&&jn.push("srgba"),Pe.ext_color_buffer_half_float&&jn.push("rgba16f","rgb16f"),Pe.webgl_color_buffer_float&&jn.push("rgba32f");var Qn=["uint8"];Pe.oes_texture_half_float&&Qn.push("half float","float16"),Pe.oes_texture_float&&Qn.push("float","float32");function ri(Jn,vi,pi){this.target=Jn,this.texture=vi,this.renderbuffer=pi;var Ua=0,Ca=0;vi?(Ua=vi.width,Ca=vi.height):pi&&(Ua=pi.width,Ca=pi.height),this.width=Ua,this.height=Ca}function ni(Jn){Jn&&(Jn.texture&&Jn.texture._texture.decRef(),Jn.renderbuffer&&Jn.renderbuffer._renderbuffer.decRef())}function _i(Jn,vi,pi){if(Jn)if(Jn.texture){var Ua=Jn.texture._texture,Ca=Math.max(1,Ua.width),Ci=Math.max(1,Ua.height);tt(Ca===vi&&Ci===pi,"inconsistent width/height for supplied texture"),Ua.refCount+=1}else{var Pi=Jn.renderbuffer._renderbuffer;tt(Pi.width===vi&&Pi.height===pi,"inconsistent width/height for renderbuffer"),Pi.refCount+=1}}function qn(Jn,vi){vi&&(vi.texture?It.framebufferTexture2D(hl,Jn,vi.target,vi.texture._texture.texture,0):It.framebufferRenderbuffer(hl,Jn,Xl,vi.renderbuffer._renderbuffer.renderbuffer))}function ii(Jn){var vi=fa,pi=null,Ua=null,Ca=Jn;typeof Jn=="object"&&(Ca=Jn.data,"target"in Jn&&(vi=Jn.target|0)),tt.type(Ca,"function","invalid attachment data");var Ci=Ca._reglType;return Ci==="texture2d"?(pi=Ca,tt(vi===fa)):Ci==="textureCube"?(pi=Ca,tt(vi>=kf&&vi<kf+6,"invalid cube map target")):Ci==="renderbuffer"?(Ua=Ca,vi=Xl):tt.raise("invalid regl object for attachment"),new ri(vi,pi,Ua)}function Gr(Jn,vi,pi,Ua,Ca){if(pi){var Ci=sn.create2D({width:Jn,height:vi,format:Ua,type:Ca});return Ci._texture.refCount=0,new ri(fa,Ci,null)}else{var Pi=Ln.create({width:Jn,height:vi,format:Ua});return Pi._renderbuffer.refCount=0,new ri(Xl,null,Pi)}}function mn(Jn){return Jn&&(Jn.texture||Jn.renderbuffer)}function Vn(Jn,vi,pi){Jn&&(Jn.texture?Jn.texture.resize(vi,pi):Jn.renderbuffer&&Jn.renderbuffer.resize(vi,pi),Jn.width=vi,Jn.height=pi)}var di=0,Bn={};function hi(){this.id=di++,Bn[this.id]=this,this.framebuffer=It.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function Li(Jn){Jn.colorAttachments.forEach(ni),ni(Jn.depthAttachment),ni(Jn.stencilAttachment),ni(Jn.depthStencilAttachment)}function la(Jn){var vi=Jn.framebuffer;tt(vi,"must not double destroy framebuffer"),It.deleteFramebuffer(vi),Jn.framebuffer=null,un.framebufferCount--,delete Bn[Jn.id]}function En(Jn){var vi;It.bindFramebuffer(hl,Jn.framebuffer);var pi=Jn.colorAttachments;for(vi=0;vi<pi.length;++vi)qn(xc+vi,pi[vi]);for(vi=pi.length;vi<dr.maxColorAttachments;++vi)It.framebufferTexture2D(hl,xc+vi,fa,null,0);It.framebufferTexture2D(hl,Wh,fa,null,0),It.framebufferTexture2D(hl,Pp,fa,null,0),It.framebufferTexture2D(hl,Xf,fa,null,0),qn(Pp,Jn.depthAttachment),qn(Xf,Jn.stencilAttachment),qn(Wh,Jn.depthStencilAttachment);var Ua=It.checkFramebufferStatus(hl);!It.isContextLost()&&Ua!==md&&tt.raise("framebuffer configuration not supported, status = "+De[Ua]),It.bindFramebuffer(hl,bn.next?bn.next.framebuffer:null),bn.cur=bn.next,It.getError()}function Mn(Jn,vi){var pi=new hi;un.framebufferCount++;function Ua(Ci,Pi){var ma;tt(bn.next!==pi,"can not update framebuffer which is currently in use");var Ma=0,lo=0,Is=!0,ks=!0,co=null,Go=!0,Ts="rgba",bu="uint8",ns=1,Ou=null,Ys=null,ju=null,Rs=!1;if(typeof Ci=="number")Ma=Ci|0,lo=Pi|0||Ma;else if(!Ci)Ma=lo=1;else{tt.type(Ci,"object","invalid arguments for framebuffer");var Na=Ci;if("shape"in Na){var eu=Na.shape;tt(Array.isArray(eu)&&eu.length>=2,"invalid shape for framebuffer"),Ma=eu[0],lo=eu[1]}else"radius"in Na&&(Ma=lo=Na.radius),"width"in Na&&(Ma=Na.width),"height"in Na&&(lo=Na.height);("color"in Na||"colors"in Na)&&(co=Na.color||Na.colors,Array.isArray(co)&&tt(co.length===1||Pe.webgl_draw_buffers,"multiple render targets not supported")),co||("colorCount"in Na&&(ns=Na.colorCount|0,tt(ns>0,"invalid color buffer count")),"colorTexture"in Na&&(Go=!!Na.colorTexture,Ts="rgba4"),"colorType"in Na&&(bu=Na.colorType,Go?(tt(Pe.oes_texture_float||!(bu==="float"||bu==="float32"),"you must enable OES_texture_float in order to use floating point framebuffer objects"),tt(Pe.oes_texture_half_float||!(bu==="half float"||bu==="float16"),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):bu==="half float"||bu==="float16"?(tt(Pe.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),Ts="rgba16f"):(bu==="float"||bu==="float32")&&(tt(Pe.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),Ts="rgba32f"),tt.oneOf(bu,Qn,"invalid color type")),"colorFormat"in Na&&(Ts=Na.colorFormat,jr.indexOf(Ts)>=0?Go=!0:jn.indexOf(Ts)>=0?Go=!1:tt.optional(function(){Go?tt.oneOf(Na.colorFormat,jr,"invalid color format for texture"):tt.oneOf(Na.colorFormat,jn,"invalid color format for renderbuffer")}))),("depthTexture"in Na||"depthStencilTexture"in Na)&&(Rs=!!(Na.depthTexture||Na.depthStencilTexture),tt(!Rs||Pe.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in Na&&(typeof Na.depth=="boolean"?Is=Na.depth:(Ou=Na.depth,ks=!1)),"stencil"in Na&&(typeof Na.stencil=="boolean"?ks=Na.stencil:(Ys=Na.stencil,Is=!1)),"depthStencil"in Na&&(typeof Na.depthStencil=="boolean"?Is=ks=Na.depthStencil:(ju=Na.depthStencil,Is=!1,ks=!1))}var Ao=null,Fu=null,pa=null,fo=null;if(Array.isArray(co))Ao=co.map(ii);else if(co)Ao=[ii(co)];else for(Ao=new Array(ns),ma=0;ma<ns;++ma)Ao[ma]=Gr(Ma,lo,Go,Ts,bu);tt(Pe.webgl_draw_buffers||Ao.length<=1,"you must enable the WEBGL_draw_buffers extension in order to use multiple color buffers."),tt(Ao.length<=dr.maxColorAttachments,"too many color attachments, not supported"),Ma=Ma||Ao[0].width,lo=lo||Ao[0].height,Ou?Fu=ii(Ou):Is&&!ks&&(Fu=Gr(Ma,lo,Rs,"depth","uint32")),Ys?pa=ii(Ys):ks&&!Is&&(pa=Gr(Ma,lo,!1,"stencil","uint8")),ju?fo=ii(ju):!Ou&&!Ys&&ks&&Is&&(fo=Gr(Ma,lo,Rs,"depth stencil","depth stencil")),tt(!!Ou+!!Ys+!!ju<=1,"invalid framebuffer configuration, can specify exactly one depth/stencil attachment");var To=null;for(ma=0;ma<Ao.length;++ma)if(_i(Ao[ma],Ma,lo),tt(!Ao[ma]||Ao[ma].texture&&cv.indexOf(Ao[ma].texture._texture.format)>=0||Ao[ma].renderbuffer&&Re.indexOf(Ao[ma].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+ma+" is invalid"),Ao[ma]&&Ao[ma].texture){var Us=xh[Ao[ma].texture._texture.format]*x[Ao[ma].texture._texture.type];To===null?To=Us:tt(To===Us,"all color attachments much have the same number of bits per pixel.")}return _i(Fu,Ma,lo),tt(!Fu||Fu.texture&&Fu.texture._texture.format===Yf||Fu.renderbuffer&&Fu.renderbuffer._renderbuffer.format===U,"invalid depth attachment for framebuffer object"),_i(pa,Ma,lo),tt(!pa||pa.renderbuffer&&pa.renderbuffer._renderbuffer.format===H,"invalid stencil attachment for framebuffer object"),_i(fo,Ma,lo),tt(!fo||fo.texture&&fo.texture._texture.format===$||fo.renderbuffer&&fo.renderbuffer._renderbuffer.format===$,"invalid depth-stencil attachment for framebuffer object"),Li(pi),pi.width=Ma,pi.height=lo,pi.colorAttachments=Ao,pi.depthAttachment=Fu,pi.stencilAttachment=pa,pi.depthStencilAttachment=fo,Ua.color=Ao.map(mn),Ua.depth=mn(Fu),Ua.stencil=mn(pa),Ua.depthStencil=mn(fo),Ua.width=pi.width,Ua.height=pi.height,En(pi),Ua}function Ca(Ci,Pi){tt(bn.next!==pi,"can not resize a framebuffer which is currently in use");var ma=Math.max(Ci|0,1),Ma=Math.max(Pi|0||ma,1);if(ma===pi.width&&Ma===pi.height)return Ua;for(var lo=pi.colorAttachments,Is=0;Is<lo.length;++Is)Vn(lo[Is],ma,Ma);return Vn(pi.depthAttachment,ma,Ma),Vn(pi.stencilAttachment,ma,Ma),Vn(pi.depthStencilAttachment,ma,Ma),pi.width=Ua.width=ma,pi.height=Ua.height=Ma,En(pi),Ua}return Ua(Jn,vi),k(Ua,{resize:Ca,_reglType:"framebuffer",_framebuffer:pi,destroy:function(){la(pi),Li(pi)},use:function(Ci){bn.setFBO({framebuffer:Ua},Ci)}})}function Xi(Jn){var vi=Array(6);function pi(Ca){var Ci;tt(vi.indexOf(bn.next)<0,"can not update framebuffer which is currently in use");var Pi={color:null},ma=0,Ma=null,lo="rgba",Is="uint8",ks=1;if(typeof Ca=="number")ma=Ca|0;else if(!Ca)ma=1;else{tt.type(Ca,"object","invalid arguments for framebuffer");var co=Ca;if("shape"in co){var Go=co.shape;tt(Array.isArray(Go)&&Go.length>=2,"invalid shape for framebuffer"),tt(Go[0]===Go[1],"cube framebuffer must be square"),ma=Go[0]}else"radius"in co&&(ma=co.radius|0),"width"in co?(ma=co.width|0,"height"in co&&tt(co.height===ma,"must be square")):"height"in co&&(ma=co.height|0);("color"in co||"colors"in co)&&(Ma=co.color||co.colors,Array.isArray(Ma)&&tt(Ma.length===1||Pe.webgl_draw_buffers,"multiple render targets not supported")),Ma||("colorCount"in co&&(ks=co.colorCount|0,tt(ks>0,"invalid color buffer count")),"colorType"in co&&(tt.oneOf(co.colorType,Qn,"invalid color type"),Is=co.colorType),"colorFormat"in co&&(lo=co.colorFormat,tt.oneOf(co.colorFormat,jr,"invalid color format for texture"))),"depth"in co&&(Pi.depth=co.depth),"stencil"in co&&(Pi.stencil=co.stencil),"depthStencil"in co&&(Pi.depthStencil=co.depthStencil)}var Ts;if(Ma)if(Array.isArray(Ma))for(Ts=[],Ci=0;Ci<Ma.length;++Ci)Ts[Ci]=Ma[Ci];else Ts=[Ma];else{Ts=Array(ks);var bu={radius:ma,format:lo,type:Is};for(Ci=0;Ci<ks;++Ci)Ts[Ci]=sn.createCube(bu)}for(Pi.color=Array(Ts.length),Ci=0;Ci<Ts.length;++Ci){var ns=Ts[Ci];tt(typeof ns=="function"&&ns._reglType==="textureCube","invalid cube map"),ma=ma||ns.width,tt(ns.width===ma&&ns.height===ma,"invalid cube map shape"),Pi.color[Ci]={target:kf,data:Ts[Ci]}}for(Ci=0;Ci<6;++Ci){for(var Ou=0;Ou<Ts.length;++Ou)Pi.color[Ou].target=kf+Ci;Ci>0&&(Pi.depth=vi[0].depth,Pi.stencil=vi[0].stencil,Pi.depthStencil=vi[0].depthStencil),vi[Ci]?vi[Ci](Pi):vi[Ci]=Mn(Pi)}return k(pi,{width:ma,height:ma,color:Ts})}function Ua(Ca){var Ci,Pi=Ca|0;if(tt(Pi>0&&Pi<=dr.maxCubeMapSize,"invalid radius for cube fbo"),Pi===pi.width)return pi;var ma=pi.color;for(Ci=0;Ci<ma.length;++Ci)ma[Ci].resize(Pi);for(Ci=0;Ci<6;++Ci)vi[Ci].resize(Pi);return pi.width=pi.height=Pi,pi}return pi(Jn),k(pi,{faces:vi,resize:Ua,_reglType:"framebufferCube",destroy:function(){vi.forEach(function(Ca){Ca.destroy()})}})}function Si(){bn.cur=null,bn.next=null,bn.dirty=!0,Ce(Bn).forEach(function(Jn){Jn.framebuffer=It.createFramebuffer(),En(Jn)})}return k(bn,{getFramebuffer:function(Jn){if(typeof Jn=="function"&&Jn._reglType==="framebuffer"){var vi=Jn._framebuffer;if(vi instanceof hi)return vi}return null},create:Mn,createCube:Xi,clear:function(){Ce(Bn).forEach(la)},restore:Si})}var ur=5126,Er=34962,nr=34963,wr=["attributes","elements","offset","count","primitive","instances"];function Ir(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=ur,this.offset=0,this.stride=0,this.divisor=0}function $r(It,Pe,dr,sn,Ln,un,bn){for(var jr=dr.maxAttributes,jn=new Array(jr),Qn=0;Qn<jr;++Qn)jn[Qn]=new Ir;var ri=0,ni={},_i={Record:Ir,scope:{},state:jn,currentVAO:null,targetVAO:null,restore:ii()?Li:function(){},createVAO:la,getVAO:mn,destroyBuffer:qn,setVAO:ii()?Vn:di,clear:ii()?Bn:function(){}};function qn(En){for(var Mn=0;Mn<jn.length;++Mn){var Xi=jn[Mn];Xi.buffer===En&&(It.disableVertexAttribArray(Mn),Xi.buffer=null)}}function ii(){return Pe.oes_vertex_array_object}function Gr(){return Pe.angle_instanced_arrays}function mn(En){return typeof En=="function"&&En._vao?En._vao:null}function Vn(En){if(En!==_i.currentVAO){var Mn=ii();En?Mn.bindVertexArrayOES(En.vao):Mn.bindVertexArrayOES(null),_i.currentVAO=En}}function di(En){if(En!==_i.currentVAO){if(En)En.bindAttrs();else{for(var Mn=Gr(),Xi=0;Xi<jn.length;++Xi){var Si=jn[Xi];Si.buffer?(It.enableVertexAttribArray(Xi),Si.buffer.bind(),It.vertexAttribPointer(Xi,Si.size,Si.type,Si.normalized,Si.stride,Si.offfset),Mn&&Si.divisor&&Mn.vertexAttribDivisorANGLE(Xi,Si.divisor)):(It.disableVertexAttribArray(Xi),It.vertexAttrib4f(Xi,Si.x,Si.y,Si.z,Si.w))}bn.elements?It.bindBuffer(nr,bn.elements.buffer.buffer):It.bindBuffer(nr,null)}_i.currentVAO=En}}function Bn(){Ce(ni).forEach(function(En){En.destroy()})}function hi(){this.id=++ri,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var En=ii();En?this.vao=En.createVertexArrayOES():this.vao=null,ni[this.id]=this,this.buffers=[]}hi.prototype.bindAttrs=function(){for(var En=Gr(),Mn=this.attributes,Xi=0;Xi<Mn.length;++Xi){var Si=Mn[Xi];Si.buffer?(It.enableVertexAttribArray(Xi),It.bindBuffer(Er,Si.buffer.buffer),It.vertexAttribPointer(Xi,Si.size,Si.type,Si.normalized,Si.stride,Si.offset),En&&Si.divisor&&En.vertexAttribDivisorANGLE(Xi,Si.divisor)):(It.disableVertexAttribArray(Xi),It.vertexAttrib4f(Xi,Si.x,Si.y,Si.z,Si.w))}for(var Jn=Mn.length;Jn<jr;++Jn)It.disableVertexAttribArray(Jn);var vi=un.getElements(this.elements);vi?It.bindBuffer(nr,vi.buffer.buffer):It.bindBuffer(nr,null)},hi.prototype.refresh=function(){var En=ii();En&&(En.bindVertexArrayOES(this.vao),this.bindAttrs(),_i.currentVAO=null,En.bindVertexArrayOES(null))},hi.prototype.destroy=function(){if(this.vao){var En=ii();this===_i.currentVAO&&(_i.currentVAO=null,En.bindVertexArrayOES(null)),En.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),ni[this.id]&&(delete ni[this.id],sn.vaoCount-=1)};function Li(){var En=ii();En&&Ce(ni).forEach(function(Mn){Mn.refresh()})}function la(En){var Mn=new hi;sn.vaoCount+=1;function Xi(Si){var Jn;if(Array.isArray(Si))Jn=Si,Mn.elements&&Mn.ownsElements&&Mn.elements.destroy(),Mn.elements=null,Mn.ownsElements=!1,Mn.offset=0,Mn.count=0,Mn.instances=-1,Mn.primitive=4;else{if(tt(typeof Si=="object","invalid arguments for create vao"),tt("attributes"in Si,"must specify attributes for vao"),Si.elements){var vi=Si.elements;Mn.ownsElements?typeof vi=="function"&&vi._reglType==="elements"?(Mn.elements.destroy(),Mn.ownsElements=!1):(Mn.elements(vi),Mn.ownsElements=!1):un.getElements(Si.elements)?(Mn.elements=Si.elements,Mn.ownsElements=!1):(Mn.elements=un.create(Si.elements),Mn.ownsElements=!0)}else Mn.elements=null,Mn.ownsElements=!1;Jn=Si.attributes,Mn.offset=0,Mn.count=-1,Mn.instances=-1,Mn.primitive=4,Mn.elements&&(Mn.count=Mn.elements._elements.vertCount,Mn.primitive=Mn.elements._elements.primType),"offset"in Si&&(Mn.offset=Si.offset|0),"count"in Si&&(Mn.count=Si.count|0),"instances"in Si&&(Mn.instances=Si.instances|0),"primitive"in Si&&(tt(Si.primitive in An,"bad primitive type: "+Si.primitive),Mn.primitive=An[Si.primitive]),tt.optional(function(){for(var Is=Object.keys(Si),ks=0;ks<Is.length;++ks)tt(wr.indexOf(Is[ks])>=0,'invalid option for vao: "'+Is[ks]+'" valid options are '+wr)}),tt(Array.isArray(Jn),"attributes must be an array")}tt(Jn.length<jr,"too many attributes"),tt(Jn.length>0,"must specify at least one attribute");var pi={},Ua=Mn.attributes;Ua.length=Jn.length;for(var Ca=0;Ca<Jn.length;++Ca){var Ci=Jn[Ca],Pi=Ua[Ca]=new Ir,ma=Ci.data||Ci;if(Array.isArray(ma)||gt(ma)||Ku(ma)){var Ma;Mn.buffers[Ca]&&(Ma=Mn.buffers[Ca],gt(ma)&&Ma._buffer.byteLength>=ma.byteLength?Ma.subdata(ma):(Ma.destroy(),Mn.buffers[Ca]=null)),Mn.buffers[Ca]||(Ma=Mn.buffers[Ca]=Ln.create(Ci,Er,!1,!0)),Pi.buffer=Ln.getBuffer(Ma),Pi.size=Pi.buffer.dimension|0,Pi.normalized=!1,Pi.type=Pi.buffer.dtype,Pi.offset=0,Pi.stride=0,Pi.divisor=0,Pi.state=1,pi[Ca]=1}else Ln.getBuffer(Ci)?(Pi.buffer=Ln.getBuffer(Ci),Pi.size=Pi.buffer.dimension|0,Pi.normalized=!1,Pi.type=Pi.buffer.dtype,Pi.offset=0,Pi.stride=0,Pi.divisor=0,Pi.state=1):Ln.getBuffer(Ci.buffer)?(Pi.buffer=Ln.getBuffer(Ci.buffer),Pi.size=(+Ci.size||Pi.buffer.dimension)|0,Pi.normalized=!!Ci.normalized||!1,"type"in Ci?(tt.parameter(Ci.type,Ju,"invalid buffer type"),Pi.type=Ju[Ci.type]):Pi.type=Pi.buffer.dtype,Pi.offset=(Ci.offset||0)|0,Pi.stride=(Ci.stride||0)|0,Pi.divisor=(Ci.divisor||0)|0,Pi.state=1,tt(Pi.size>=1&&Pi.size<=4,"size must be between 1 and 4"),tt(Pi.offset>=0,"invalid offset"),tt(Pi.stride>=0&&Pi.stride<=255,"stride must be between 0 and 255"),tt(Pi.divisor>=0,"divisor must be positive"),tt(!Pi.divisor||!!Pe.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in Ci?(tt(Ca>0,"first attribute must not be a constant"),Pi.x=+Ci.x||0,Pi.y=+Ci.y||0,Pi.z=+Ci.z||0,Pi.w=+Ci.w||0,Pi.state=2):tt(!1,"invalid attribute spec for location "+Ca)}for(var lo=0;lo<Mn.buffers.length;++lo)!pi[lo]&&Mn.buffers[lo]&&(Mn.buffers[lo].destroy(),Mn.buffers[lo]=null);return Mn.refresh(),Xi}return Xi.destroy=function(){for(var Si=0;Si<Mn.buffers.length;++Si)Mn.buffers[Si]&&Mn.buffers[Si].destroy();Mn.buffers.length=0,Mn.ownsElements&&(Mn.elements.destroy(),Mn.elements=null,Mn.ownsElements=!1),Mn.destroy()},Xi._vao=Mn,Xi._reglType="vao",Xi(En)}return _i}var gn=35632,dn=35633,xn=35718,Un=35721;function yi(It,Pe,dr,sn){var Ln={},un={};function bn(Gr,mn,Vn,di){this.name=Gr,this.id=mn,this.location=Vn,this.info=di}function jr(Gr,mn){for(var Vn=0;Vn<Gr.length;++Vn)if(Gr[Vn].id===mn.id){Gr[Vn].location=mn.location;return}Gr.push(mn)}function jn(Gr,mn,Vn){var di=Gr===gn?Ln:un,Bn=di[mn];if(!Bn){var hi=Pe.str(mn);Bn=It.createShader(Gr),It.shaderSource(Bn,hi),It.compileShader(Bn),tt.shaderError(It,Bn,hi,Gr,Vn),di[mn]=Bn}return Bn}var Qn={},ri=[],ni=0;function _i(Gr,mn){this.id=ni++,this.fragId=Gr,this.vertId=mn,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,sn.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function qn(Gr,mn,Vn){var di,Bn,hi=jn(gn,Gr.fragId),Li=jn(dn,Gr.vertId),la=Gr.program=It.createProgram();if(It.attachShader(la,hi),It.attachShader(la,Li),Vn)for(di=0;di<Vn.length;++di){var En=Vn[di];It.bindAttribLocation(la,En[0],En[1])}It.linkProgram(la),tt.linkError(It,la,Pe.str(Gr.fragId),Pe.str(Gr.vertId),mn);var Mn=It.getProgramParameter(la,xn);sn.profile&&(Gr.stats.uniformsCount=Mn);var Xi=Gr.uniforms;for(di=0;di<Mn;++di)if(Bn=It.getActiveUniform(la,di),Bn)if(Bn.size>1)for(var Si=0;Si<Bn.size;++Si){var Jn=Bn.name.replace("[0]","["+Si+"]");jr(Xi,new bn(Jn,Pe.id(Jn),It.getUniformLocation(la,Jn),Bn))}else jr(Xi,new bn(Bn.name,Pe.id(Bn.name),It.getUniformLocation(la,Bn.name),Bn));var vi=It.getProgramParameter(la,Un);sn.profile&&(Gr.stats.attributesCount=vi);var pi=Gr.attributes;for(di=0;di<vi;++di)Bn=It.getActiveAttrib(la,di),Bn&&jr(pi,new bn(Bn.name,Pe.id(Bn.name),It.getAttribLocation(la,Bn.name),Bn))}sn.profile&&(dr.getMaxUniformsCount=function(){var Gr=0;return ri.forEach(function(mn){mn.stats.uniformsCount>Gr&&(Gr=mn.stats.uniformsCount)}),Gr},dr.getMaxAttributesCount=function(){var Gr=0;return ri.forEach(function(mn){mn.stats.attributesCount>Gr&&(Gr=mn.stats.attributesCount)}),Gr});function ii(){Ln={},un={};for(var Gr=0;Gr<ri.length;++Gr)qn(ri[Gr],null,ri[Gr].attributes.map(function(mn){return[mn.location,mn.name]}))}return{clear:function(){var Gr=It.deleteShader.bind(It);Ce(Ln).forEach(Gr),Ln={},Ce(un).forEach(Gr),un={},ri.forEach(function(mn){It.deleteProgram(mn.program)}),ri.length=0,Qn={},dr.shaderCount=0},program:function(Gr,mn,Vn,di){tt.command(Gr>=0,"missing vertex shader",Vn),tt.command(mn>=0,"missing fragment shader",Vn);var Bn=Qn[mn];Bn||(Bn=Qn[mn]={});var hi=Bn[Gr];if(hi&&(hi.refCount++,!di))return hi;var Li=new _i(mn,Gr);return dr.shaderCount++,qn(Li,Vn,di),hi||(Bn[Gr]=Li),ri.push(Li),k(Li,{destroy:function(){if(Li.refCount--,Li.refCount<=0){It.deleteProgram(Li.program);var la=ri.indexOf(Li);ri.splice(la,1),dr.shaderCount--}Bn[Li.vertId].refCount<=0&&(It.deleteShader(un[Li.vertId]),delete un[Li.vertId],delete Qn[Li.fragId][Li.vertId]),Object.keys(Qn[Li.fragId]).length||(It.deleteShader(Ln[Li.fragId]),delete Ln[Li.fragId],delete Qn[Li.fragId])}})},restore:ii,shader:jn,frag:-1,vert:-1}}var ui=6408,Bi=5121,sa=3333,ua=5126;function ha(It,Pe,dr,sn,Ln,un,bn){function jr(ri){var ni;Pe.next===null?(tt(Ln.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),ni=Bi):(tt(Pe.next.colorAttachments[0].texture!==null,"You cannot read from a renderbuffer"),ni=Pe.next.colorAttachments[0].texture._texture.type,tt.optional(function(){un.oes_texture_float?(tt(ni===Bi||ni===ua,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),ni===ua&&tt(bn.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):tt(ni===Bi,"Reading from a framebuffer is only allowed for the type 'uint8'")}));var _i=0,qn=0,ii=sn.framebufferWidth,Gr=sn.framebufferHeight,mn=null;gt(ri)?mn=ri:ri&&(tt.type(ri,"object","invalid arguments to regl.read()"),_i=ri.x|0,qn=ri.y|0,tt(_i>=0&&_i<sn.framebufferWidth,"invalid x offset for regl.read"),tt(qn>=0&&qn<sn.framebufferHeight,"invalid y offset for regl.read"),ii=(ri.width||sn.framebufferWidth-_i)|0,Gr=(ri.height||sn.framebufferHeight-qn)|0,mn=ri.data||null),mn&&(ni===Bi?tt(mn instanceof Uint8Array,"buffer must be 'Uint8Array' when reading from a framebuffer of type 'uint8'"):ni===ua&&tt(mn instanceof Float32Array,"buffer must be 'Float32Array' when reading from a framebuffer of type 'float'")),tt(ii>0&&ii+_i<=sn.framebufferWidth,"invalid width for read pixels"),tt(Gr>0&&Gr+qn<=sn.framebufferHeight,"invalid height for read pixels"),dr();var Vn=ii*Gr*4;return mn||(ni===Bi?mn=new Uint8Array(Vn):ni===ua&&(mn=mn||new Float32Array(Vn))),tt.isTypedArray(mn,"data buffer for regl.read() must be a typedarray"),tt(mn.byteLength>=Vn,"data buffer for regl.read() too small"),It.pixelStorei(sa,4),It.readPixels(_i,qn,ii,Gr,ui,ni,mn),mn}function jn(ri){var ni;return Pe.setFBO({framebuffer:ri.framebuffer},function(){ni=jr(ri)}),ni}function Qn(ri){return!ri||!("framebuffer"in ri)?jr(ri):jn(ri)}return Qn}function uo(It){return Array.prototype.slice.call(It)}function Ni(It){return uo(It).join("")}function La(){var It=0,Pe=[],dr=[];function sn(ni){for(var _i=0;_i<dr.length;++_i)if(dr[_i]===ni)return Pe[_i];var qn="g"+It++;return Pe.push(qn),dr.push(ni),qn}function Ln(){var ni=[];function _i(){ni.push.apply(ni,uo(arguments))}var qn=[];function ii(){var Gr="v"+It++;return qn.push(Gr),arguments.length>0&&(ni.push(Gr,"="),ni.push.apply(ni,uo(arguments)),ni.push(";")),Gr}return k(_i,{def:ii,toString:function(){return Ni([qn.length>0?"var "+qn.join(",")+";":"",Ni(ni)])}})}function un(){var ni=Ln(),_i=Ln(),qn=ni.toString,ii=_i.toString;function Gr(mn,Vn){_i(mn,Vn,"=",ni.def(mn,Vn),";")}return k(function(){ni.apply(ni,uo(arguments))},{def:ni.def,entry:ni,exit:_i,save:Gr,set:function(mn,Vn,di){Gr(mn,Vn),ni(mn,Vn,"=",di,";")},toString:function(){return qn()+ii()}})}function bn(){var ni=Ni(arguments),_i=un(),qn=un(),ii=_i.toString,Gr=qn.toString;return k(_i,{then:function(){return _i.apply(_i,uo(arguments)),this},else:function(){return qn.apply(qn,uo(arguments)),this},toString:function(){var mn=Gr();return mn&&(mn="else{"+mn+"}"),Ni(["if(",ni,"){",ii(),"}",mn])}})}var jr=Ln(),jn={};function Qn(ni,_i){var qn=[];function ii(){var Bn="a"+qn.length;return qn.push(Bn),Bn}_i=_i||0;for(var Gr=0;Gr<_i;++Gr)ii();var mn=un(),Vn=mn.toString,di=jn[ni]=k(mn,{arg:ii,toString:function(){return Ni(["function(",qn.join(),"){",Vn(),"}"])}});return di}function ri(){var ni=['"use strict";',jr,"return {"];Object.keys(jn).forEach(function(Gr){ni.push('"',Gr,'":',jn[Gr].toString(),",")}),ni.push("}");var _i=Ni(ni).replace(/;/g,`;
|
|
`).replace(/}/g,`}
|
|
`).replace(/{/g,`{
|
|
`),qn=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,ii=qn?kt.Function.apply(null,Pe.concat(_i)):Function.apply(null,Pe.concat(_i));return ii.apply(null,dr)}return{global:jr,link:sn,block:Ln,proc:Qn,scope:un,cond:bn,compile:ri}}var Ra="xyzw".split(""),Ta=5121,_a=1,za=2,xa=0,ga=1,Qs=2,As=3,mu=4,yu=5,ss=6,Ms="dither",el="blend.enable",Xs="blend.color",oc="blend.equation",rl="blend.func",Zo="depth.enable",Yl="depth.func",sc="depth.range",Lu="depth.mask",Ec="colorMask",Pf="cull.enable",af="cull.face",uc="frontFace",$f="lineWidth",lc="polygonOffset.enable",Fs="polygonOffset.offset",Cl="sample.alpha",Al="sample.enable",Uc="sample.coverage",Co="stencil.enable",Fl="stencil.mask",nl="stencil.func",of="stencil.opFront",bh="stencil.opBack",qf="scissor.enable",$h="scissor.box",Js="viewport",Rl="profile",pl="framebuffer",wc="vert",Of="frag",Dl="elements",uu="primitive",Kf="count",cc="offset",Sc="instances",Fp="vao",Jv="Width",t0="Height",Eh=pl+Jv,_d=pl+t0,fv=Js+Jv,Rp=Js+t0,Qf="drawingBuffer",Ff=Qf+Jv,wh=Qf+t0,xd=[rl,oc,nl,of,bh,Uc,Js,$h,Fs],bd=34962,e0=34963,fy=35632,hy=35633,j0=3553,r0=34067,Og=2884,qh=3042,W0=3024,tu=2960,hv=2929,X0=3089,Dp=32823,Sh=32926,Kh=32928,pv=5126,Bp=35664,sf=35665,Np=35666,uf=5124,dv=35667,Rf=35668,Ch=35669,zp=35670,vv=35671,Up=35672,Zp=35673,dl=35674,Ed=35675,Bl=35676,Vp=35678,wd=35680,Sd=4,bs=1028,Cc=1029,gv=2304,Jf=2305,Fg=32775,Rg=32776,Gp=519,Ac=7680,$l=0,lf=1,Pu=32774,Df=513,Y0=36160,Ah=36064,cf={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},th=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],Qh={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},fc={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Cd={frag:fy,vert:hy},Ad={cw:gv,ccw:Jf};function n0(It){return Array.isArray(It)||gt(It)||Ku(It)}function i0(It){return It.sort(function(Pe,dr){return Pe===Js?-1:dr===Js?1:Pe<dr?-1:1})}function Vo(It,Pe,dr,sn){this.thisDep=It,this.contextDep=Pe,this.propDep=dr,this.append=sn}function Th(It){return It&&!(It.thisDep||It.contextDep||It.propDep)}function _u(It){return new Vo(!1,!1,!1,It)}function vl(It,Pe){var dr=It.type;if(dr===xa){var sn=It.data.length;return new Vo(!0,sn>=1,sn>=2,Pe)}else if(dr===mu){var Ln=It.data;return new Vo(Ln.thisDep,Ln.contextDep,Ln.propDep,Pe)}else{if(dr===yu)return new Vo(!1,!1,!1,Pe);if(dr===ss){for(var un=!1,bn=!1,jr=!1,jn=0;jn<It.data.length;++jn){var Qn=It.data[jn];if(Qn.type===ga)jr=!0;else if(Qn.type===Qs)bn=!0;else if(Qn.type===As)un=!0;else if(Qn.type===xa){un=!0;var ri=Qn.data;ri>=1&&(bn=!0),ri>=2&&(jr=!0)}else Qn.type===mu&&(un=un||Qn.data.thisDep,bn=bn||Qn.data.contextDep,jr=jr||Qn.data.propDep)}return new Vo(un,bn,jr,Pe)}else return new Vo(dr===As,dr===Qs,dr===ga,Pe)}}var Td=new Vo(!1,!1,!1,function(){});function mv(It,Pe,dr,sn,Ln,un,bn,jr,jn,Qn,ri,ni,_i,qn,ii){var Gr=Qn.Record,mn={add:32774,subtract:32778,"reverse subtract":32779};dr.ext_blend_minmax&&(mn.min=Fg,mn.max=Rg);var Vn=dr.angle_instanced_arrays,di=dr.webgl_draw_buffers,Bn=dr.oes_vertex_array_object,hi={dirty:!0,profile:ii.profile},Li={},la=[],En={},Mn={};function Xi(Je){return Je.replace(".","_")}function Si(Je,Se,yr){var Lr=Xi(Je);la.push(Je),Li[Lr]=hi[Lr]=!!yr,En[Lr]=Se}function Jn(Je,Se,yr){var Lr=Xi(Je);la.push(Je),Array.isArray(yr)?(hi[Lr]=yr.slice(),Li[Lr]=yr.slice()):hi[Lr]=Li[Lr]=yr,Mn[Lr]=Se}Si(Ms,W0),Si(el,qh),Jn(Xs,"blendColor",[0,0,0,0]),Jn(oc,"blendEquationSeparate",[Pu,Pu]),Jn(rl,"blendFuncSeparate",[lf,$l,lf,$l]),Si(Zo,hv,!0),Jn(Yl,"depthFunc",Df),Jn(sc,"depthRange",[0,1]),Jn(Lu,"depthMask",!0),Jn(Ec,Ec,[!0,!0,!0,!0]),Si(Pf,Og),Jn(af,"cullFace",Cc),Jn(uc,uc,Jf),Jn($f,$f,1),Si(lc,Dp),Jn(Fs,"polygonOffset",[0,0]),Si(Cl,Sh),Si(Al,Kh),Jn(Uc,"sampleCoverage",[1,!1]),Si(Co,tu),Jn(Fl,"stencilMask",-1),Jn(nl,"stencilFunc",[Gp,0,-1]),Jn(of,"stencilOpSeparate",[bs,Ac,Ac,Ac]),Jn(bh,"stencilOpSeparate",[Cc,Ac,Ac,Ac]),Si(qf,X0),Jn($h,"scissor",[0,0,It.drawingBufferWidth,It.drawingBufferHeight]),Jn(Js,Js,[0,0,It.drawingBufferWidth,It.drawingBufferHeight]);var vi={gl:It,context:_i,strings:Pe,next:Li,current:hi,draw:ni,elements:un,buffer:Ln,shader:ri,attributes:Qn.state,vao:Qn,uniforms:jn,framebuffer:jr,extensions:dr,timer:qn,isBufferArgs:n0},pi={primTypes:An,compareFuncs:Qh,blendFuncs:cf,blendEquations:mn,stencilOps:fc,glTypes:Ju,orientationType:Ad};tt.optional(function(){vi.isArrayLike=ar}),di&&(pi.backBuffer=[Cc],pi.drawBuffer=fr(sn.maxDrawbuffers,function(Je){return Je===0?[0]:fr(Je,function(Se){return Ah+Se})}));var Ua=0;function Ca(){var Je=La(),Se=Je.link,yr=Je.global;Je.id=Ua++,Je.batchId="0";var Lr=Se(vi),qr=Je.shared={props:"a0"};Object.keys(vi).forEach(function(mr){qr[mr]=yr.def(Lr,".",mr)}),tt.optional(function(){Je.CHECK=Se(tt),Je.commandStr=tt.guessCommand(),Je.command=Se(Je.commandStr),Je.assert=function(mr,tr,kr){mr("if(!(",tr,"))",this.CHECK,".commandRaise(",Se(kr),",",this.command,");")},pi.invalidBlendCombinations=th});var Ar=Je.next={},Ye=Je.current={};Object.keys(Mn).forEach(function(mr){Array.isArray(hi[mr])&&(Ar[mr]=yr.def(qr.next,".",mr),Ye[mr]=yr.def(qr.current,".",mr))});var Rr=Je.constants={};Object.keys(pi).forEach(function(mr){Rr[mr]=yr.def(JSON.stringify(pi[mr]))}),Je.invoke=function(mr,tr){switch(tr.type){case xa:var kr=["this",qr.context,qr.props,Je.batchId];return mr.def(Se(tr.data),".call(",kr.slice(0,Math.max(tr.data.length+1,4)),")");case ga:return mr.def(qr.props,tr.data);case Qs:return mr.def(qr.context,tr.data);case As:return mr.def("this",tr.data);case mu:return tr.data.append(Je,mr),tr.data.ref;case yu:return tr.data.toString();case ss:return tr.data.map(function(Kr){return Je.invoke(mr,Kr)})}},Je.attribCache={};var je={};return Je.scopeAttrib=function(mr){var tr=Pe.id(mr);if(tr in je)return je[tr];var kr=Qn.scope[tr];kr||(kr=Qn.scope[tr]=new Gr);var Kr=je[tr]=Se(kr);return Kr},Je}function Ci(Je){var Se=Je.static,yr=Je.dynamic,Lr;if(Rl in Se){var qr=!!Se[Rl];Lr=_u(function(Ye,Rr){return qr}),Lr.enable=qr}else if(Rl in yr){var Ar=yr[Rl];Lr=vl(Ar,function(Ye,Rr){return Ye.invoke(Rr,Ar)})}return Lr}function Pi(Je,Se){var yr=Je.static,Lr=Je.dynamic;if(pl in yr){var qr=yr[pl];return qr?(qr=jr.getFramebuffer(qr),tt.command(qr,"invalid framebuffer object"),_u(function(Ye,Rr){var je=Ye.link(qr),mr=Ye.shared;Rr.set(mr.framebuffer,".next",je);var tr=mr.context;return Rr.set(tr,"."+Eh,je+".width"),Rr.set(tr,"."+_d,je+".height"),je})):_u(function(Ye,Rr){var je=Ye.shared;Rr.set(je.framebuffer,".next","null");var mr=je.context;return Rr.set(mr,"."+Eh,mr+"."+Ff),Rr.set(mr,"."+_d,mr+"."+wh),"null"})}else if(pl in Lr){var Ar=Lr[pl];return vl(Ar,function(Ye,Rr){var je=Ye.invoke(Rr,Ar),mr=Ye.shared,tr=mr.framebuffer,kr=Rr.def(tr,".getFramebuffer(",je,")");tt.optional(function(){Ye.assert(Rr,"!"+je+"||"+kr,"invalid framebuffer object")}),Rr.set(tr,".next",kr);var Kr=mr.context;return Rr.set(Kr,"."+Eh,kr+"?"+kr+".width:"+Kr+"."+Ff),Rr.set(Kr,"."+_d,kr+"?"+kr+".height:"+Kr+"."+wh),kr})}else return null}function ma(Je,Se,yr){var Lr=Je.static,qr=Je.dynamic;function Ar(je){if(je in Lr){var mr=Lr[je];tt.commandType(mr,"object","invalid "+je,yr.commandStr);var tr=!0,kr=mr.x|0,Kr=mr.y|0,Nn,ti;return"width"in mr?(Nn=mr.width|0,tt.command(Nn>=0,"invalid "+je,yr.commandStr)):tr=!1,"height"in mr?(ti=mr.height|0,tt.command(ti>=0,"invalid "+je,yr.commandStr)):tr=!1,new Vo(!tr&&Se&&Se.thisDep,!tr&&Se&&Se.contextDep,!tr&&Se&&Se.propDep,function(gi,zi){var Fi=gi.shared.context,Ui=Nn;"width"in mr||(Ui=zi.def(Fi,".",Eh,"-",kr));var Zi=ti;return"height"in mr||(Zi=zi.def(Fi,".",_d,"-",Kr)),[kr,Kr,Ui,Zi]})}else if(je in qr){var ci=qr[je],Ai=vl(ci,function(gi,zi){var Fi=gi.invoke(zi,ci);tt.optional(function(){gi.assert(zi,Fi+"&&typeof "+Fi+'==="object"',"invalid "+je)});var Ui=gi.shared.context,Zi=zi.def(Fi,".x|0"),Wi=zi.def(Fi,".y|0"),ba=zi.def('"width" in ',Fi,"?",Fi,".width|0:","(",Ui,".",Eh,"-",Zi,")"),Jo=zi.def('"height" in ',Fi,"?",Fi,".height|0:","(",Ui,".",_d,"-",Wi,")");return tt.optional(function(){gi.assert(zi,ba+">=0&&"+Jo+">=0","invalid "+je)}),[Zi,Wi,ba,Jo]});return Se&&(Ai.thisDep=Ai.thisDep||Se.thisDep,Ai.contextDep=Ai.contextDep||Se.contextDep,Ai.propDep=Ai.propDep||Se.propDep),Ai}else return Se?new Vo(Se.thisDep,Se.contextDep,Se.propDep,function(gi,zi){var Fi=gi.shared.context;return[0,0,zi.def(Fi,".",Eh),zi.def(Fi,".",_d)]}):null}var Ye=Ar(Js);if(Ye){var Rr=Ye;Ye=new Vo(Ye.thisDep,Ye.contextDep,Ye.propDep,function(je,mr){var tr=Rr.append(je,mr),kr=je.shared.context;return mr.set(kr,"."+fv,tr[2]),mr.set(kr,"."+Rp,tr[3]),tr})}return{viewport:Ye,scissor_box:Ar($h)}}function Ma(Je,Se){var yr=Je.static,Lr=typeof yr[Of]=="string"&&typeof yr[wc]=="string";if(Lr){if(Object.keys(Se.dynamic).length>0)return null;var qr=Se.static,Ar=Object.keys(qr);if(Ar.length>0&&typeof qr[Ar[0]]=="number"){for(var Ye=[],Rr=0;Rr<Ar.length;++Rr)tt(typeof qr[Ar[Rr]]=="number","must specify all vertex attribute locations when using vaos"),Ye.push([qr[Ar[Rr]]|0,Ar[Rr]]);return Ye}}return null}function lo(Je,Se,yr){var Lr=Je.static,qr=Je.dynamic;function Ar(tr){if(tr in Lr){var kr=Pe.id(Lr[tr]);tt.optional(function(){ri.shader(Cd[tr],kr,tt.guessCommand())});var Kr=_u(function(){return kr});return Kr.id=kr,Kr}else if(tr in qr){var Nn=qr[tr];return vl(Nn,function(ti,ci){var Ai=ti.invoke(ci,Nn),gi=ci.def(ti.shared.strings,".id(",Ai,")");return tt.optional(function(){ci(ti.shared.shader,".shader(",Cd[tr],",",gi,",",ti.command,");")}),gi})}return null}var Ye=Ar(Of),Rr=Ar(wc),je=null,mr;return Th(Ye)&&Th(Rr)?(je=ri.program(Rr.id,Ye.id,null,yr),mr=_u(function(tr,kr){return tr.link(je)})):mr=new Vo(Ye&&Ye.thisDep||Rr&&Rr.thisDep,Ye&&Ye.contextDep||Rr&&Rr.contextDep,Ye&&Ye.propDep||Rr&&Rr.propDep,function(tr,kr){var Kr=tr.shared.shader,Nn;Ye?Nn=Ye.append(tr,kr):Nn=kr.def(Kr,".",Of);var ti;Rr?ti=Rr.append(tr,kr):ti=kr.def(Kr,".",wc);var ci=Kr+".program("+ti+","+Nn;return tt.optional(function(){ci+=","+tr.command}),kr.def(ci+")")}),{frag:Ye,vert:Rr,progVar:mr,program:je}}function Is(Je,Se){var yr=Je.static,Lr=Je.dynamic,qr={},Ar=!1;function Ye(){if(Fp in yr){var zi=yr[Fp];return zi!==null&&Qn.getVAO(zi)===null&&(zi=Qn.createVAO(zi)),Ar=!0,qr.vao=zi,_u(function(Ui){var Zi=Qn.getVAO(zi);return Zi?Ui.link(Zi):"null"})}else if(Fp in Lr){Ar=!0;var Fi=Lr[Fp];return vl(Fi,function(Ui,Zi){var Wi=Ui.invoke(Zi,Fi);return Zi.def(Ui.shared.vao+".getVAO("+Wi+")")})}return null}var Rr=Ye(),je=!1;function mr(){if(Dl in yr){var zi=yr[Dl];if(qr.elements=zi,n0(zi)){var Fi=qr.elements=un.create(zi,!0);zi=un.getElements(Fi),je=!0}else zi&&(zi=un.getElements(zi),je=!0,tt.command(zi,"invalid elements",Se.commandStr));var Ui=_u(function(Wi,ba){if(zi){var Jo=Wi.link(zi);return Wi.ELEMENTS=Jo,Jo}return Wi.ELEMENTS=null,null});return Ui.value=zi,Ui}else if(Dl in Lr){je=!0;var Zi=Lr[Dl];return vl(Zi,function(Wi,ba){var Jo=Wi.shared,Ru=Jo.isBufferArgs,gs=Jo.elements,Do=Wi.invoke(ba,Zi),Bf=ba.def("null"),gl=ba.def(Ru,"(",Do,")"),Zc=Wi.cond(gl).then(Bf,"=",gs,".createStream(",Do,");").else(Bf,"=",gs,".getElements(",Do,");");return tt.optional(function(){Wi.assert(Zc.else,"!"+Do+"||"+Bf,"invalid elements")}),ba.entry(Zc),ba.exit(Wi.cond(gl).then(gs,".destroyStream(",Bf,");")),Wi.ELEMENTS=Bf,Bf})}else if(Ar)return new Vo(Rr.thisDep,Rr.contextDep,Rr.propDep,function(Wi,ba){return ba.def(Wi.shared.vao+".currentVAO?"+Wi.shared.elements+".getElements("+Wi.shared.vao+".currentVAO.elements):null")});return null}var tr=mr();function kr(){if(uu in yr){var zi=yr[uu];return qr.primitive=zi,tt.commandParameter(zi,An,"invalid primitve",Se.commandStr),_u(function(Ui,Zi){return An[zi]})}else if(uu in Lr){var Fi=Lr[uu];return vl(Fi,function(Ui,Zi){var Wi=Ui.constants.primTypes,ba=Ui.invoke(Zi,Fi);return tt.optional(function(){Ui.assert(Zi,ba+" in "+Wi,"invalid primitive, must be one of "+Object.keys(An))}),Zi.def(Wi,"[",ba,"]")})}else{if(je)return Th(tr)?tr.value?_u(function(Ui,Zi){return Zi.def(Ui.ELEMENTS,".primType")}):_u(function(){return Sd}):new Vo(tr.thisDep,tr.contextDep,tr.propDep,function(Ui,Zi){var Wi=Ui.ELEMENTS;return Zi.def(Wi,"?",Wi,".primType:",Sd)});if(Ar)return new Vo(Rr.thisDep,Rr.contextDep,Rr.propDep,function(Ui,Zi){return Zi.def(Ui.shared.vao+".currentVAO?"+Ui.shared.vao+".currentVAO.primitive:"+Sd)})}return null}function Kr(zi,Fi){if(zi in yr){var Ui=yr[zi]|0;return Fi?qr.offset=Ui:qr.instances=Ui,tt.command(!Fi||Ui>=0,"invalid "+zi,Se.commandStr),_u(function(Wi,ba){return Fi&&(Wi.OFFSET=Ui),Ui})}else if(zi in Lr){var Zi=Lr[zi];return vl(Zi,function(Wi,ba){var Jo=Wi.invoke(ba,Zi);return Fi&&(Wi.OFFSET=Jo,tt.optional(function(){Wi.assert(ba,Jo+">=0","invalid "+zi)})),Jo})}else if(Fi){if(je)return _u(function(Wi,ba){return Wi.OFFSET=0,0});if(Ar)return new Vo(Rr.thisDep,Rr.contextDep,Rr.propDep,function(Wi,ba){return ba.def(Wi.shared.vao+".currentVAO?"+Wi.shared.vao+".currentVAO.offset:0")})}else if(Ar)return new Vo(Rr.thisDep,Rr.contextDep,Rr.propDep,function(Wi,ba){return ba.def(Wi.shared.vao+".currentVAO?"+Wi.shared.vao+".currentVAO.instances:-1")});return null}var Nn=Kr(cc,!0);function ti(){if(Kf in yr){var zi=yr[Kf]|0;return qr.count=zi,tt.command(typeof zi=="number"&&zi>=0,"invalid vertex count",Se.commandStr),_u(function(){return zi})}else if(Kf in Lr){var Fi=Lr[Kf];return vl(Fi,function(ba,Jo){var Ru=ba.invoke(Jo,Fi);return tt.optional(function(){ba.assert(Jo,"typeof "+Ru+'==="number"&&'+Ru+">=0&&"+Ru+"===("+Ru+"|0)","invalid vertex count")}),Ru})}else if(je)if(Th(tr)){if(tr)return Nn?new Vo(Nn.thisDep,Nn.contextDep,Nn.propDep,function(ba,Jo){var Ru=Jo.def(ba.ELEMENTS,".vertCount-",ba.OFFSET);return tt.optional(function(){ba.assert(Jo,Ru+">=0","invalid vertex offset/element buffer too small")}),Ru}):_u(function(ba,Jo){return Jo.def(ba.ELEMENTS,".vertCount")});var Ui=_u(function(){return-1});return tt.optional(function(){Ui.MISSING=!0}),Ui}else{var Zi=new Vo(tr.thisDep||Nn.thisDep,tr.contextDep||Nn.contextDep,tr.propDep||Nn.propDep,function(ba,Jo){var Ru=ba.ELEMENTS;return ba.OFFSET?Jo.def(Ru,"?",Ru,".vertCount-",ba.OFFSET,":-1"):Jo.def(Ru,"?",Ru,".vertCount:-1")});return tt.optional(function(){Zi.DYNAMIC=!0}),Zi}else if(Ar){var Wi=new Vo(Rr.thisDep,Rr.contextDep,Rr.propDep,function(ba,Jo){return Jo.def(ba.shared.vao,".currentVAO?",ba.shared.vao,".currentVAO.count:-1")});return Wi}return null}var ci=kr(),Ai=ti(),gi=Kr(Sc,!1);return{elements:tr,primitive:ci,count:Ai,instances:gi,offset:Nn,vao:Rr,vaoActive:Ar,elementsActive:je,static:qr}}function ks(Je,Se){var yr=Je.static,Lr=Je.dynamic,qr={};return la.forEach(function(Ar){var Ye=Xi(Ar);function Rr(je,mr){if(Ar in yr){var tr=je(yr[Ar]);qr[Ye]=_u(function(){return tr})}else if(Ar in Lr){var kr=Lr[Ar];qr[Ye]=vl(kr,function(Kr,Nn){return mr(Kr,Nn,Kr.invoke(Nn,kr))})}}switch(Ar){case Pf:case el:case Ms:case Co:case Zo:case qf:case lc:case Cl:case Al:case Lu:return Rr(function(je){return tt.commandType(je,"boolean",Ar,Se.commandStr),je},function(je,mr,tr){return tt.optional(function(){je.assert(mr,"typeof "+tr+'==="boolean"',"invalid flag "+Ar,je.commandStr)}),tr});case Yl:return Rr(function(je){return tt.commandParameter(je,Qh,"invalid "+Ar,Se.commandStr),Qh[je]},function(je,mr,tr){var kr=je.constants.compareFuncs;return tt.optional(function(){je.assert(mr,tr+" in "+kr,"invalid "+Ar+", must be one of "+Object.keys(Qh))}),mr.def(kr,"[",tr,"]")});case sc:return Rr(function(je){return tt.command(ar(je)&&je.length===2&&typeof je[0]=="number"&&typeof je[1]=="number"&&je[0]<=je[1],"depth range is 2d array",Se.commandStr),je},function(je,mr,tr){tt.optional(function(){je.assert(mr,je.shared.isArrayLike+"("+tr+")&&"+tr+".length===2&&typeof "+tr+'[0]==="number"&&typeof '+tr+'[1]==="number"&&'+tr+"[0]<="+tr+"[1]","depth range must be a 2d array")});var kr=mr.def("+",tr,"[0]"),Kr=mr.def("+",tr,"[1]");return[kr,Kr]});case rl:return Rr(function(je){tt.commandType(je,"object","blend.func",Se.commandStr);var mr="srcRGB"in je?je.srcRGB:je.src,tr="srcAlpha"in je?je.srcAlpha:je.src,kr="dstRGB"in je?je.dstRGB:je.dst,Kr="dstAlpha"in je?je.dstAlpha:je.dst;return tt.commandParameter(mr,cf,Ye+".srcRGB",Se.commandStr),tt.commandParameter(tr,cf,Ye+".srcAlpha",Se.commandStr),tt.commandParameter(kr,cf,Ye+".dstRGB",Se.commandStr),tt.commandParameter(Kr,cf,Ye+".dstAlpha",Se.commandStr),tt.command(th.indexOf(mr+", "+kr)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+mr+", "+kr+")",Se.commandStr),[cf[mr],cf[kr],cf[tr],cf[Kr]]},function(je,mr,tr){var kr=je.constants.blendFuncs;tt.optional(function(){je.assert(mr,tr+"&&typeof "+tr+'==="object"',"invalid blend func, must be an object")});function Kr(Fi,Ui){var Zi=mr.def('"',Fi,Ui,'" in ',tr,"?",tr,".",Fi,Ui,":",tr,".",Fi);return tt.optional(function(){je.assert(mr,Zi+" in "+kr,"invalid "+Ar+"."+Fi+Ui+", must be one of "+Object.keys(cf))}),Zi}var Nn=Kr("src","RGB"),ti=Kr("dst","RGB");tt.optional(function(){var Fi=je.constants.invalidBlendCombinations;je.assert(mr,Fi+".indexOf("+Nn+'+", "+'+ti+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var ci=mr.def(kr,"[",Nn,"]"),Ai=mr.def(kr,"[",Kr("src","Alpha"),"]"),gi=mr.def(kr,"[",ti,"]"),zi=mr.def(kr,"[",Kr("dst","Alpha"),"]");return[ci,gi,Ai,zi]});case oc:return Rr(function(je){if(typeof je=="string")return tt.commandParameter(je,mn,"invalid "+Ar,Se.commandStr),[mn[je],mn[je]];if(typeof je=="object")return tt.commandParameter(je.rgb,mn,Ar+".rgb",Se.commandStr),tt.commandParameter(je.alpha,mn,Ar+".alpha",Se.commandStr),[mn[je.rgb],mn[je.alpha]];tt.commandRaise("invalid blend.equation",Se.commandStr)},function(je,mr,tr){var kr=je.constants.blendEquations,Kr=mr.def(),Nn=mr.def(),ti=je.cond("typeof ",tr,'==="string"');return tt.optional(function(){function ci(Ai,gi,zi){je.assert(Ai,zi+" in "+kr,"invalid "+gi+", must be one of "+Object.keys(mn))}ci(ti.then,Ar,tr),je.assert(ti.else,tr+"&&typeof "+tr+'==="object"',"invalid "+Ar),ci(ti.else,Ar+".rgb",tr+".rgb"),ci(ti.else,Ar+".alpha",tr+".alpha")}),ti.then(Kr,"=",Nn,"=",kr,"[",tr,"];"),ti.else(Kr,"=",kr,"[",tr,".rgb];",Nn,"=",kr,"[",tr,".alpha];"),mr(ti),[Kr,Nn]});case Xs:return Rr(function(je){return tt.command(ar(je)&&je.length===4,"blend.color must be a 4d array",Se.commandStr),fr(4,function(mr){return+je[mr]})},function(je,mr,tr){return tt.optional(function(){je.assert(mr,je.shared.isArrayLike+"("+tr+")&&"+tr+".length===4","blend.color must be a 4d array")}),fr(4,function(kr){return mr.def("+",tr,"[",kr,"]")})});case Fl:return Rr(function(je){return tt.commandType(je,"number",Ye,Se.commandStr),je|0},function(je,mr,tr){return tt.optional(function(){je.assert(mr,"typeof "+tr+'==="number"',"invalid stencil.mask")}),mr.def(tr,"|0")});case nl:return Rr(function(je){tt.commandType(je,"object",Ye,Se.commandStr);var mr=je.cmp||"keep",tr=je.ref||0,kr="mask"in je?je.mask:-1;return tt.commandParameter(mr,Qh,Ar+".cmp",Se.commandStr),tt.commandType(tr,"number",Ar+".ref",Se.commandStr),tt.commandType(kr,"number",Ar+".mask",Se.commandStr),[Qh[mr],tr,kr]},function(je,mr,tr){var kr=je.constants.compareFuncs;tt.optional(function(){function ci(){je.assert(mr,Array.prototype.join.call(arguments,""),"invalid stencil.func")}ci(tr+"&&typeof ",tr,'==="object"'),ci('!("cmp" in ',tr,")||(",tr,".cmp in ",kr,")")});var Kr=mr.def('"cmp" in ',tr,"?",kr,"[",tr,".cmp]",":",Ac),Nn=mr.def(tr,".ref|0"),ti=mr.def('"mask" in ',tr,"?",tr,".mask|0:-1");return[Kr,Nn,ti]});case of:case bh:return Rr(function(je){tt.commandType(je,"object",Ye,Se.commandStr);var mr=je.fail||"keep",tr=je.zfail||"keep",kr=je.zpass||"keep";return tt.commandParameter(mr,fc,Ar+".fail",Se.commandStr),tt.commandParameter(tr,fc,Ar+".zfail",Se.commandStr),tt.commandParameter(kr,fc,Ar+".zpass",Se.commandStr),[Ar===bh?Cc:bs,fc[mr],fc[tr],fc[kr]]},function(je,mr,tr){var kr=je.constants.stencilOps;tt.optional(function(){je.assert(mr,tr+"&&typeof "+tr+'==="object"',"invalid "+Ar)});function Kr(Nn){return tt.optional(function(){je.assert(mr,'!("'+Nn+'" in '+tr+")||("+tr+"."+Nn+" in "+kr+")","invalid "+Ar+"."+Nn+", must be one of "+Object.keys(fc))}),mr.def('"',Nn,'" in ',tr,"?",kr,"[",tr,".",Nn,"]:",Ac)}return[Ar===bh?Cc:bs,Kr("fail"),Kr("zfail"),Kr("zpass")]});case Fs:return Rr(function(je){tt.commandType(je,"object",Ye,Se.commandStr);var mr=je.factor|0,tr=je.units|0;return tt.commandType(mr,"number",Ye+".factor",Se.commandStr),tt.commandType(tr,"number",Ye+".units",Se.commandStr),[mr,tr]},function(je,mr,tr){tt.optional(function(){je.assert(mr,tr+"&&typeof "+tr+'==="object"',"invalid "+Ar)});var kr=mr.def(tr,".factor|0"),Kr=mr.def(tr,".units|0");return[kr,Kr]});case af:return Rr(function(je){var mr=0;return je==="front"?mr=bs:je==="back"&&(mr=Cc),tt.command(!!mr,Ye,Se.commandStr),mr},function(je,mr,tr){return tt.optional(function(){je.assert(mr,tr+'==="front"||'+tr+'==="back"',"invalid cull.face")}),mr.def(tr,'==="front"?',bs,":",Cc)});case $f:return Rr(function(je){return tt.command(typeof je=="number"&&je>=sn.lineWidthDims[0]&&je<=sn.lineWidthDims[1],"invalid line width, must be a positive number between "+sn.lineWidthDims[0]+" and "+sn.lineWidthDims[1],Se.commandStr),je},function(je,mr,tr){return tt.optional(function(){je.assert(mr,"typeof "+tr+'==="number"&&'+tr+">="+sn.lineWidthDims[0]+"&&"+tr+"<="+sn.lineWidthDims[1],"invalid line width")}),tr});case uc:return Rr(function(je){return tt.commandParameter(je,Ad,Ye,Se.commandStr),Ad[je]},function(je,mr,tr){return tt.optional(function(){je.assert(mr,tr+'==="cw"||'+tr+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),mr.def(tr+'==="cw"?'+gv+":"+Jf)});case Ec:return Rr(function(je){return tt.command(ar(je)&&je.length===4,"color.mask must be length 4 array",Se.commandStr),je.map(function(mr){return!!mr})},function(je,mr,tr){return tt.optional(function(){je.assert(mr,je.shared.isArrayLike+"("+tr+")&&"+tr+".length===4","invalid color.mask")}),fr(4,function(kr){return"!!"+tr+"["+kr+"]"})});case Uc:return Rr(function(je){tt.command(typeof je=="object"&&je,Ye,Se.commandStr);var mr="value"in je?je.value:1,tr=!!je.invert;return tt.command(typeof mr=="number"&&mr>=0&&mr<=1,"sample.coverage.value must be a number between 0 and 1",Se.commandStr),[mr,tr]},function(je,mr,tr){tt.optional(function(){je.assert(mr,tr+"&&typeof "+tr+'==="object"',"invalid sample.coverage")});var kr=mr.def('"value" in ',tr,"?+",tr,".value:1"),Kr=mr.def("!!",tr,".invert");return[kr,Kr]})}}),qr}function co(Je,Se){var yr=Je.static,Lr=Je.dynamic,qr={};return Object.keys(yr).forEach(function(Ar){var Ye=yr[Ar],Rr;if(typeof Ye=="number"||typeof Ye=="boolean")Rr=_u(function(){return Ye});else if(typeof Ye=="function"){var je=Ye._reglType;je==="texture2d"||je==="textureCube"?Rr=_u(function(mr){return mr.link(Ye)}):je==="framebuffer"||je==="framebufferCube"?(tt.command(Ye.color.length>0,'missing color attachment for framebuffer sent to uniform "'+Ar+'"',Se.commandStr),Rr=_u(function(mr){return mr.link(Ye.color[0])})):tt.commandRaise('invalid data for uniform "'+Ar+'"',Se.commandStr)}else ar(Ye)?Rr=_u(function(mr){var tr=mr.global.def("[",fr(Ye.length,function(kr){return tt.command(typeof Ye[kr]=="number"||typeof Ye[kr]=="boolean","invalid uniform "+Ar,mr.commandStr),Ye[kr]}),"]");return tr}):tt.commandRaise('invalid or missing data for uniform "'+Ar+'"',Se.commandStr);Rr.value=Ye,qr[Ar]=Rr}),Object.keys(Lr).forEach(function(Ar){var Ye=Lr[Ar];qr[Ar]=vl(Ye,function(Rr,je){return Rr.invoke(je,Ye)})}),qr}function Go(Je,Se){var yr=Je.static,Lr=Je.dynamic,qr={};return Object.keys(yr).forEach(function(Ar){var Ye=yr[Ar],Rr=Pe.id(Ar),je=new Gr;if(n0(Ye))je.state=_a,je.buffer=Ln.getBuffer(Ln.create(Ye,bd,!1,!0)),je.type=0;else{var mr=Ln.getBuffer(Ye);if(mr)je.state=_a,je.buffer=mr,je.type=0;else if(tt.command(typeof Ye=="object"&&Ye,"invalid data for attribute "+Ar,Se.commandStr),"constant"in Ye){var tr=Ye.constant;je.buffer="null",je.state=za,typeof tr=="number"?je.x=tr:(tt.command(ar(tr)&&tr.length>0&&tr.length<=4,"invalid constant for attribute "+Ar,Se.commandStr),Ra.forEach(function(gi,zi){zi<tr.length&&(je[gi]=tr[zi])}))}else{n0(Ye.buffer)?mr=Ln.getBuffer(Ln.create(Ye.buffer,bd,!1,!0)):mr=Ln.getBuffer(Ye.buffer),tt.command(!!mr,'missing buffer for attribute "'+Ar+'"',Se.commandStr);var kr=Ye.offset|0;tt.command(kr>=0,'invalid offset for attribute "'+Ar+'"',Se.commandStr);var Kr=Ye.stride|0;tt.command(Kr>=0&&Kr<256,'invalid stride for attribute "'+Ar+'", must be integer betweeen [0, 255]',Se.commandStr);var Nn=Ye.size|0;tt.command(!("size"in Ye)||Nn>0&&Nn<=4,'invalid size for attribute "'+Ar+'", must be 1,2,3,4',Se.commandStr);var ti=!!Ye.normalized,ci=0;"type"in Ye&&(tt.commandParameter(Ye.type,Ju,"invalid type for attribute "+Ar,Se.commandStr),ci=Ju[Ye.type]);var Ai=Ye.divisor|0;tt.optional(function(){"divisor"in Ye&&(tt.command(Ai===0||Vn,'cannot specify divisor for attribute "'+Ar+'", instancing not supported',Se.commandStr),tt.command(Ai>=0,'invalid divisor for attribute "'+Ar+'"',Se.commandStr));var gi=Se.commandStr,zi=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(Ye).forEach(function(Fi){tt.command(zi.indexOf(Fi)>=0,'unknown parameter "'+Fi+'" for attribute pointer "'+Ar+'" (valid parameters are '+zi+")",gi)})}),je.buffer=mr,je.state=_a,je.size=Nn,je.normalized=ti,je.type=ci||mr.dtype,je.offset=kr,je.stride=Kr,je.divisor=Ai}}qr[Ar]=_u(function(gi,zi){var Fi=gi.attribCache;if(Rr in Fi)return Fi[Rr];var Ui={isStream:!1};return Object.keys(je).forEach(function(Zi){Ui[Zi]=je[Zi]}),je.buffer&&(Ui.buffer=gi.link(je.buffer),Ui.type=Ui.type||Ui.buffer+".dtype"),Fi[Rr]=Ui,Ui})}),Object.keys(Lr).forEach(function(Ar){var Ye=Lr[Ar];function Rr(je,mr){var tr=je.invoke(mr,Ye),kr=je.shared,Kr=je.constants,Nn=kr.isBufferArgs,ti=kr.buffer;tt.optional(function(){je.assert(mr,tr+"&&(typeof "+tr+'==="object"||typeof '+tr+'==="function")&&('+Nn+"("+tr+")||"+ti+".getBuffer("+tr+")||"+ti+".getBuffer("+tr+".buffer)||"+Nn+"("+tr+'.buffer)||("constant" in '+tr+"&&(typeof "+tr+'.constant==="number"||'+kr.isArrayLike+"("+tr+".constant))))",'invalid dynamic attribute "'+Ar+'"')});var ci={isStream:mr.def(!1)},Ai=new Gr;Ai.state=_a,Object.keys(Ai).forEach(function(Ui){ci[Ui]=mr.def(""+Ai[Ui])});var gi=ci.buffer,zi=ci.type;mr("if(",Nn,"(",tr,")){",ci.isStream,"=true;",gi,"=",ti,".createStream(",bd,",",tr,");",zi,"=",gi,".dtype;","}else{",gi,"=",ti,".getBuffer(",tr,");","if(",gi,"){",zi,"=",gi,".dtype;",'}else if("constant" in ',tr,"){",ci.state,"=",za,";","if(typeof "+tr+'.constant === "number"){',ci[Ra[0]],"=",tr,".constant;",Ra.slice(1).map(function(Ui){return ci[Ui]}).join("="),"=0;","}else{",Ra.map(function(Ui,Zi){return ci[Ui]+"="+tr+".constant.length>"+Zi+"?"+tr+".constant["+Zi+"]:0;"}).join(""),"}}else{","if(",Nn,"(",tr,".buffer)){",gi,"=",ti,".createStream(",bd,",",tr,".buffer);","}else{",gi,"=",ti,".getBuffer(",tr,".buffer);","}",zi,'="type" in ',tr,"?",Kr.glTypes,"[",tr,".type]:",gi,".dtype;",ci.normalized,"=!!",tr,".normalized;");function Fi(Ui){mr(ci[Ui],"=",tr,".",Ui,"|0;")}return Fi("size"),Fi("offset"),Fi("stride"),Fi("divisor"),mr("}}"),mr.exit("if(",ci.isStream,"){",ti,".destroyStream(",gi,");","}"),ci}qr[Ar]=vl(Ye,Rr)}),qr}function Ts(Je){var Se=Je.static,yr=Je.dynamic,Lr={};return Object.keys(Se).forEach(function(qr){var Ar=Se[qr];Lr[qr]=_u(function(Ye,Rr){return typeof Ar=="number"||typeof Ar=="boolean"?""+Ar:Ye.link(Ar)})}),Object.keys(yr).forEach(function(qr){var Ar=yr[qr];Lr[qr]=vl(Ar,function(Ye,Rr){return Ye.invoke(Rr,Ar)})}),Lr}function bu(Je,Se,yr,Lr,qr){var Ar=Je.static,Ye=Je.dynamic;tt.optional(function(){var Fi=[pl,wc,Of,Dl,uu,cc,Kf,Sc,Rl,Fp].concat(la);function Ui(Zi){Object.keys(Zi).forEach(function(Wi){tt.command(Fi.indexOf(Wi)>=0,'unknown parameter "'+Wi+'"',qr.commandStr)})}Ui(Ar),Ui(Ye)});var Rr=Ma(Je,Se),je=Pi(Je,qr),mr=ma(Je,je,qr),tr=Is(Je,qr),kr=ks(Je,qr),Kr=lo(Je,qr,Rr);function Nn(Fi){var Ui=mr[Fi];Ui&&(kr[Fi]=Ui)}Nn(Js),Nn(Xi($h));var ti=Object.keys(kr).length>0,ci={framebuffer:je,draw:tr,shader:Kr,state:kr,dirty:ti,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(ci.profile=Ci(Je,qr),ci.uniforms=co(yr,qr),ci.drawVAO=ci.scopeVAO=tr.vao,!ci.drawVAO&&Kr.program&&!Rr&&dr.angle_instanced_arrays&&tr.static.elements){var Ai=!0,gi=Kr.program.attributes.map(function(Fi){var Ui=Se.static[Fi];return Ai=Ai&&!!Ui,Ui});if(Ai&&gi.length>0){var zi=Qn.getVAO(Qn.createVAO({attributes:gi,elements:tr.static.elements}));ci.drawVAO=new Vo(null,null,null,function(Fi,Ui){return Fi.link(zi)}),ci.useVAO=!0}}return Rr?ci.useVAO=!0:ci.attributes=Go(Se,qr),ci.context=Ts(Lr,qr),ci}function ns(Je,Se,yr){var Lr=Je.shared,qr=Lr.context,Ar=Je.scope();Object.keys(yr).forEach(function(Ye){Se.save(qr,"."+Ye);var Rr=yr[Ye],je=Rr.append(Je,Se);Array.isArray(je)?Ar(qr,".",Ye,"=[",je.join(),"];"):Ar(qr,".",Ye,"=",je,";")}),Se(Ar)}function Ou(Je,Se,yr,Lr){var qr=Je.shared,Ar=qr.gl,Ye=qr.framebuffer,Rr;di&&(Rr=Se.def(qr.extensions,".webgl_draw_buffers"));var je=Je.constants,mr=je.drawBuffer,tr=je.backBuffer,kr;yr?kr=yr.append(Je,Se):kr=Se.def(Ye,".next"),Lr||Se("if(",kr,"!==",Ye,".cur){"),Se("if(",kr,"){",Ar,".bindFramebuffer(",Y0,",",kr,".framebuffer);"),di&&Se(Rr,".drawBuffersWEBGL(",mr,"[",kr,".colorAttachments.length]);"),Se("}else{",Ar,".bindFramebuffer(",Y0,",null);"),di&&Se(Rr,".drawBuffersWEBGL(",tr,");"),Se("}",Ye,".cur=",kr,";"),Lr||Se("}")}function Ys(Je,Se,yr){var Lr=Je.shared,qr=Lr.gl,Ar=Je.current,Ye=Je.next,Rr=Lr.current,je=Lr.next,mr=Je.cond(Rr,".dirty");la.forEach(function(tr){var kr=Xi(tr);if(!(kr in yr.state)){var Kr,Nn;if(kr in Ye){Kr=Ye[kr],Nn=Ar[kr];var ti=fr(hi[kr].length,function(Ai){return mr.def(Kr,"[",Ai,"]")});mr(Je.cond(ti.map(function(Ai,gi){return Ai+"!=="+Nn+"["+gi+"]"}).join("||")).then(qr,".",Mn[kr],"(",ti,");",ti.map(function(Ai,gi){return Nn+"["+gi+"]="+Ai}).join(";"),";"))}else{Kr=mr.def(je,".",kr);var ci=Je.cond(Kr,"!==",Rr,".",kr);mr(ci),kr in En?ci(Je.cond(Kr).then(qr,".enable(",En[kr],");").else(qr,".disable(",En[kr],");"),Rr,".",kr,"=",Kr,";"):ci(qr,".",Mn[kr],"(",Kr,");",Rr,".",kr,"=",Kr,";")}}}),Object.keys(yr.state).length===0&&mr(Rr,".dirty=false;"),Se(mr)}function ju(Je,Se,yr,Lr){var qr=Je.shared,Ar=Je.current,Ye=qr.current,Rr=qr.gl;i0(Object.keys(yr)).forEach(function(je){var mr=yr[je];if(!(Lr&&!Lr(mr))){var tr=mr.append(Je,Se);if(En[je]){var kr=En[je];Th(mr)?tr?Se(Rr,".enable(",kr,");"):Se(Rr,".disable(",kr,");"):Se(Je.cond(tr).then(Rr,".enable(",kr,");").else(Rr,".disable(",kr,");")),Se(Ye,".",je,"=",tr,";")}else if(ar(tr)){var Kr=Ar[je];Se(Rr,".",Mn[je],"(",tr,");",tr.map(function(Nn,ti){return Kr+"["+ti+"]="+Nn}).join(";"),";")}else Se(Rr,".",Mn[je],"(",tr,");",Ye,".",je,"=",tr,";")}})}function Rs(Je,Se){Vn&&(Je.instancing=Se.def(Je.shared.extensions,".angle_instanced_arrays"))}function Na(Je,Se,yr,Lr,qr){var Ar=Je.shared,Ye=Je.stats,Rr=Ar.current,je=Ar.timer,mr=yr.profile;function tr(){var Fi=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0;return Fi||typeof performance=="undefined"?"Date.now()":"performance.now()"}var kr,Kr;function Nn(Fi){kr=Se.def(),Fi(kr,"=",tr(),";"),typeof qr=="string"?Fi(Ye,".count+=",qr,";"):Fi(Ye,".count++;"),qn&&(Lr?(Kr=Se.def(),Fi(Kr,"=",je,".getNumPendingQueries();")):Fi(je,".beginQuery(",Ye,");"))}function ti(Fi){Fi(Ye,".cpuTime+=",tr(),"-",kr,";"),qn&&(Lr?Fi(je,".pushScopeStats(",Kr,",",je,".getNumPendingQueries(),",Ye,");"):Fi(je,".endQuery();"))}function ci(Fi){var Ui=Se.def(Rr,".profile");Se(Rr,".profile=",Fi,";"),Se.exit(Rr,".profile=",Ui,";")}var Ai;if(mr){if(Th(mr)){mr.enable?(Nn(Se),ti(Se.exit),ci("true")):ci("false");return}Ai=mr.append(Je,Se),ci(Ai)}else Ai=Se.def(Rr,".profile");var gi=Je.block();Nn(gi),Se("if(",Ai,"){",gi,"}");var zi=Je.block();ti(zi),Se.exit("if(",Ai,"){",zi,"}")}function eu(Je,Se,yr,Lr,qr){var Ar=Je.shared;function Ye(je){switch(je){case Bp:case dv:case vv:return 2;case sf:case Rf:case Up:return 3;case Np:case Ch:case Zp:return 4;default:return 1}}function Rr(je,mr,tr){var kr=Ar.gl,Kr=Se.def(je,".location"),Nn=Se.def(Ar.attributes,"[",Kr,"]"),ti=tr.state,ci=tr.buffer,Ai=[tr.x,tr.y,tr.z,tr.w],gi=["buffer","normalized","offset","stride"];function zi(){Se("if(!",Nn,".buffer){",kr,".enableVertexAttribArray(",Kr,");}");var Ui=tr.type,Zi;if(tr.size?Zi=Se.def(tr.size,"||",mr):Zi=mr,Se("if(",Nn,".type!==",Ui,"||",Nn,".size!==",Zi,"||",gi.map(function(ba){return Nn+"."+ba+"!=="+tr[ba]}).join("||"),"){",kr,".bindBuffer(",bd,",",ci,".buffer);",kr,".vertexAttribPointer(",[Kr,Zi,Ui,tr.normalized,tr.stride,tr.offset],");",Nn,".type=",Ui,";",Nn,".size=",Zi,";",gi.map(function(ba){return Nn+"."+ba+"="+tr[ba]+";"}).join(""),"}"),Vn){var Wi=tr.divisor;Se("if(",Nn,".divisor!==",Wi,"){",Je.instancing,".vertexAttribDivisorANGLE(",[Kr,Wi],");",Nn,".divisor=",Wi,";}")}}function Fi(){Se("if(",Nn,".buffer){",kr,".disableVertexAttribArray(",Kr,");",Nn,".buffer=null;","}if(",Ra.map(function(Ui,Zi){return Nn+"."+Ui+"!=="+Ai[Zi]}).join("||"),"){",kr,".vertexAttrib4f(",Kr,",",Ai,");",Ra.map(function(Ui,Zi){return Nn+"."+Ui+"="+Ai[Zi]+";"}).join(""),"}")}ti===_a?zi():ti===za?Fi():(Se("if(",ti,"===",_a,"){"),zi(),Se("}else{"),Fi(),Se("}"))}Lr.forEach(function(je){var mr=je.name,tr=yr.attributes[mr],kr;if(tr){if(!qr(tr))return;kr=tr.append(Je,Se)}else{if(!qr(Td))return;var Kr=Je.scopeAttrib(mr);tt.optional(function(){Je.assert(Se,Kr+".state","missing attribute "+mr)}),kr={},Object.keys(new Gr).forEach(function(Nn){kr[Nn]=Se.def(Kr,".",Nn)})}Rr(Je.link(je),Ye(je.info.type),kr)})}function Ao(Je,Se,yr,Lr,qr,Ar){for(var Ye=Je.shared,Rr=Ye.gl,je,mr=0;mr<Lr.length;++mr){var tr=Lr[mr],kr=tr.name,Kr=tr.info.type,Nn=yr.uniforms[kr],ti=Je.link(tr),ci=ti+".location",Ai;if(Nn){if(!qr(Nn))continue;if(Th(Nn)){var gi=Nn.value;if(tt.command(gi!==null&&typeof gi!="undefined",'missing uniform "'+kr+'"',Je.commandStr),Kr===Vp||Kr===wd){tt.command(typeof gi=="function"&&(Kr===Vp&&(gi._reglType==="texture2d"||gi._reglType==="framebuffer")||Kr===wd&&(gi._reglType==="textureCube"||gi._reglType==="framebufferCube")),"invalid texture for uniform "+kr,Je.commandStr);var zi=Je.link(gi._texture||gi.color[0]._texture);Se(Rr,".uniform1i(",ci,",",zi+".bind());"),Se.exit(zi,".unbind();")}else if(Kr===dl||Kr===Ed||Kr===Bl){tt.optional(function(){tt.command(ar(gi),"invalid matrix for uniform "+kr,Je.commandStr),tt.command(Kr===dl&&gi.length===4||Kr===Ed&&gi.length===9||Kr===Bl&&gi.length===16,"invalid length for matrix uniform "+kr,Je.commandStr)});var Fi=Je.global.def("new Float32Array(["+Array.prototype.slice.call(gi)+"])"),Ui=2;Kr===Ed?Ui=3:Kr===Bl&&(Ui=4),Se(Rr,".uniformMatrix",Ui,"fv(",ci,",false,",Fi,");")}else{switch(Kr){case pv:tt.commandType(gi,"number","uniform "+kr,Je.commandStr),je="1f";break;case Bp:tt.command(ar(gi)&&gi.length===2,"uniform "+kr,Je.commandStr),je="2f";break;case sf:tt.command(ar(gi)&&gi.length===3,"uniform "+kr,Je.commandStr),je="3f";break;case Np:tt.command(ar(gi)&&gi.length===4,"uniform "+kr,Je.commandStr),je="4f";break;case zp:tt.commandType(gi,"boolean","uniform "+kr,Je.commandStr),je="1i";break;case uf:tt.commandType(gi,"number","uniform "+kr,Je.commandStr),je="1i";break;case vv:tt.command(ar(gi)&&gi.length===2,"uniform "+kr,Je.commandStr),je="2i";break;case dv:tt.command(ar(gi)&&gi.length===2,"uniform "+kr,Je.commandStr),je="2i";break;case Up:tt.command(ar(gi)&&gi.length===3,"uniform "+kr,Je.commandStr),je="3i";break;case Rf:tt.command(ar(gi)&&gi.length===3,"uniform "+kr,Je.commandStr),je="3i";break;case Zp:tt.command(ar(gi)&&gi.length===4,"uniform "+kr,Je.commandStr),je="4i";break;case Ch:tt.command(ar(gi)&&gi.length===4,"uniform "+kr,Je.commandStr),je="4i";break}Se(Rr,".uniform",je,"(",ci,",",ar(gi)?Array.prototype.slice.call(gi):gi,");")}continue}else Ai=Nn.append(Je,Se)}else{if(!qr(Td))continue;Ai=Se.def(Ye.uniforms,"[",Pe.id(kr),"]")}Kr===Vp?(tt(!Array.isArray(Ai),"must specify a scalar prop for textures"),Se("if(",Ai,"&&",Ai,'._reglType==="framebuffer"){',Ai,"=",Ai,".color[0];","}")):Kr===wd&&(tt(!Array.isArray(Ai),"must specify a scalar prop for cube maps"),Se("if(",Ai,"&&",Ai,'._reglType==="framebufferCube"){',Ai,"=",Ai,".color[0];","}")),tt.optional(function(){function gl(Kl,nh){Je.assert(Se,Kl,'bad data or missing for uniform "'+kr+'". '+nh)}function Zc(Kl){tt(!Array.isArray(Ai),"must not specify an array type for uniform"),gl("typeof "+Ai+'==="'+Kl+'"',"invalid type, expected "+Kl)}function Mc(Kl,nh){Array.isArray(Ai)?tt(Ai.length===Kl,"must have length "+Kl):gl(Ye.isArrayLike+"("+Ai+")&&"+Ai+".length==="+Kl,"invalid vector, should have length "+Kl,Je.commandStr)}function _v(Kl){tt(!Array.isArray(Ai),"must not specify a value type"),gl("typeof "+Ai+'==="function"&&'+Ai+'._reglType==="texture'+(Kl===j0?"2d":"Cube")+'"',"invalid texture type",Je.commandStr)}switch(Kr){case uf:Zc("number");break;case dv:Mc(2,"number");break;case Rf:Mc(3,"number");break;case Ch:Mc(4,"number");break;case pv:Zc("number");break;case Bp:Mc(2,"number");break;case sf:Mc(3,"number");break;case Np:Mc(4,"number");break;case zp:Zc("boolean");break;case vv:Mc(2,"boolean");break;case Up:Mc(3,"boolean");break;case Zp:Mc(4,"boolean");break;case dl:Mc(4,"number");break;case Ed:Mc(9,"number");break;case Bl:Mc(16,"number");break;case Vp:_v(j0);break;case wd:_v(r0);break}});var Zi=1;switch(Kr){case Vp:case wd:var Wi=Se.def(Ai,"._texture");Se(Rr,".uniform1i(",ci,",",Wi,".bind());"),Se.exit(Wi,".unbind();");continue;case uf:case zp:je="1i";break;case dv:case vv:je="2i",Zi=2;break;case Rf:case Up:je="3i",Zi=3;break;case Ch:case Zp:je="4i",Zi=4;break;case pv:je="1f";break;case Bp:je="2f",Zi=2;break;case sf:je="3f",Zi=3;break;case Np:je="4f",Zi=4;break;case dl:je="Matrix2fv";break;case Ed:je="Matrix3fv";break;case Bl:je="Matrix4fv";break}if(je.charAt(0)==="M"){Se(Rr,".uniform",je,"(",ci,",");var ba=Math.pow(Kr-dl+2,2),Jo=Je.global.def("new Float32Array(",ba,")");Array.isArray(Ai)?Se("false,(",fr(ba,function(gl){return Jo+"["+gl+"]="+Ai[gl]}),",",Jo,")"):Se("false,(Array.isArray(",Ai,")||",Ai," instanceof Float32Array)?",Ai,":(",fr(ba,function(gl){return Jo+"["+gl+"]="+Ai+"["+gl+"]"}),",",Jo,")"),Se(");")}else if(Zi>1){for(var Ru=[],gs=[],Do=0;Do<Zi;++Do)Array.isArray(Ai)?gs.push(Ai[Do]):gs.push(Se.def(Ai+"["+Do+"]")),Ar&&Ru.push(Se.def());Ar&&Se("if(!",Je.batchId,"||",Ru.map(function(gl,Zc){return gl+"!=="+gs[Zc]}).join("||"),"){",Ru.map(function(gl,Zc){return gl+"="+gs[Zc]+";"}).join("")),Se(Rr,".uniform",je,"(",ci,",",gs.join(","),");"),Ar&&Se("}")}else{if(tt(!Array.isArray(Ai),"uniform value must not be an array"),Ar){var Bf=Se.def();Se("if(!",Je.batchId,"||",Bf,"!==",Ai,"){",Bf,"=",Ai,";")}Se(Rr,".uniform",je,"(",ci,",",Ai,");"),Ar&&Se("}")}}}function Fu(Je,Se,yr,Lr){var qr=Je.shared,Ar=qr.gl,Ye=qr.draw,Rr=Lr.draw;function je(){var Zi=Rr.elements,Wi,ba=Se;return Zi?((Zi.contextDep&&Lr.contextDynamic||Zi.propDep)&&(ba=yr),Wi=Zi.append(Je,ba),Rr.elementsActive&&ba("if("+Wi+")"+Ar+".bindBuffer("+e0+","+Wi+".buffer.buffer);")):(Wi=ba.def(),ba(Wi,"=",Ye,".",Dl,";","if(",Wi,"){",Ar,".bindBuffer(",e0,",",Wi,".buffer.buffer);}","else if(",qr.vao,".currentVAO){",Wi,"=",Je.shared.elements+".getElements("+qr.vao,".currentVAO.elements);",Bn?"":"if("+Wi+")"+Ar+".bindBuffer("+e0+","+Wi+".buffer.buffer);","}")),Wi}function mr(){var Zi=Rr.count,Wi,ba=Se;return Zi?((Zi.contextDep&&Lr.contextDynamic||Zi.propDep)&&(ba=yr),Wi=Zi.append(Je,ba),tt.optional(function(){Zi.MISSING&&Je.assert(Se,"false","missing vertex count"),Zi.DYNAMIC&&Je.assert(ba,Wi+">=0","missing vertex count")})):(Wi=ba.def(Ye,".",Kf),tt.optional(function(){Je.assert(ba,Wi+">=0","missing vertex count")})),Wi}var tr=je();function kr(Zi){var Wi=Rr[Zi];return Wi?Wi.contextDep&&Lr.contextDynamic||Wi.propDep?Wi.append(Je,yr):Wi.append(Je,Se):Se.def(Ye,".",Zi)}var Kr=kr(uu),Nn=kr(cc),ti=mr();if(typeof ti=="number"){if(ti===0)return}else yr("if(",ti,"){"),yr.exit("}");var ci,Ai;Vn&&(ci=kr(Sc),Ai=Je.instancing);var gi=tr+".type",zi=Rr.elements&&Th(Rr.elements)&&!Rr.vaoActive;function Fi(){function Zi(){yr(Ai,".drawElementsInstancedANGLE(",[Kr,ti,gi,Nn+"<<(("+gi+"-"+Ta+")>>1)",ci],");")}function Wi(){yr(Ai,".drawArraysInstancedANGLE(",[Kr,Nn,ti,ci],");")}tr&&tr!=="null"?zi?Zi():(yr("if(",tr,"){"),Zi(),yr("}else{"),Wi(),yr("}")):Wi()}function Ui(){function Zi(){yr(Ar+".drawElements("+[Kr,ti,gi,Nn+"<<(("+gi+"-"+Ta+")>>1)"]+");")}function Wi(){yr(Ar+".drawArrays("+[Kr,Nn,ti]+");")}tr&&tr!=="null"?zi?Zi():(yr("if(",tr,"){"),Zi(),yr("}else{"),Wi(),yr("}")):Wi()}Vn&&(typeof ci!="number"||ci>=0)?typeof ci=="string"?(yr("if(",ci,">0){"),Fi(),yr("}else if(",ci,"<0){"),Ui(),yr("}")):Fi():Ui()}function pa(Je,Se,yr,Lr,qr){var Ar=Ca(),Ye=Ar.proc("body",qr);return tt.optional(function(){Ar.commandStr=Se.commandStr,Ar.command=Ar.link(Se.commandStr)}),Vn&&(Ar.instancing=Ye.def(Ar.shared.extensions,".angle_instanced_arrays")),Je(Ar,Ye,yr,Lr),Ar.compile().body}function fo(Je,Se,yr,Lr){Rs(Je,Se),yr.useVAO?yr.drawVAO?Se(Je.shared.vao,".setVAO(",yr.drawVAO.append(Je,Se),");"):Se(Je.shared.vao,".setVAO(",Je.shared.vao,".targetVAO);"):(Se(Je.shared.vao,".setVAO(null);"),eu(Je,Se,yr,Lr.attributes,function(){return!0})),Ao(Je,Se,yr,Lr.uniforms,function(){return!0},!1),Fu(Je,Se,Se,yr)}function To(Je,Se){var yr=Je.proc("draw",1);Rs(Je,yr),ns(Je,yr,Se.context),Ou(Je,yr,Se.framebuffer),Ys(Je,yr,Se),ju(Je,yr,Se.state),Na(Je,yr,Se,!1,!0);var Lr=Se.shader.progVar.append(Je,yr);if(yr(Je.shared.gl,".useProgram(",Lr,".program);"),Se.shader.program)fo(Je,yr,Se,Se.shader.program);else{yr(Je.shared.vao,".setVAO(null);");var qr=Je.global.def("{}"),Ar=yr.def(Lr,".id"),Ye=yr.def(qr,"[",Ar,"]");yr(Je.cond(Ye).then(Ye,".call(this,a0);").else(Ye,"=",qr,"[",Ar,"]=",Je.link(function(Rr){return pa(fo,Je,Se,Rr,1)}),"(",Lr,");",Ye,".call(this,a0);"))}Object.keys(Se.state).length>0&&yr(Je.shared.current,".dirty=true;"),Je.shared.vao&&yr(Je.shared.vao,".setVAO(null);")}function Us(Je,Se,yr,Lr){Je.batchId="a1",Rs(Je,Se);function qr(){return!0}eu(Je,Se,yr,Lr.attributes,qr),Ao(Je,Se,yr,Lr.uniforms,qr,!1),Fu(Je,Se,Se,yr)}function ql(Je,Se,yr,Lr){Rs(Je,Se);var qr=yr.contextDep,Ar=Se.def(),Ye="a0",Rr="a1",je=Se.def();Je.shared.props=je,Je.batchId=Ar;var mr=Je.scope(),tr=Je.scope();Se(mr.entry,"for(",Ar,"=0;",Ar,"<",Rr,";++",Ar,"){",je,"=",Ye,"[",Ar,"];",tr,"}",mr.exit);function kr(gi){return gi.contextDep&&qr||gi.propDep}function Kr(gi){return!kr(gi)}if(yr.needsContext&&ns(Je,tr,yr.context),yr.needsFramebuffer&&Ou(Je,tr,yr.framebuffer),ju(Je,tr,yr.state,kr),yr.profile&&kr(yr.profile)&&Na(Je,tr,yr,!1,!0),Lr)yr.useVAO?yr.drawVAO?kr(yr.drawVAO)?tr(Je.shared.vao,".setVAO(",yr.drawVAO.append(Je,tr),");"):mr(Je.shared.vao,".setVAO(",yr.drawVAO.append(Je,mr),");"):mr(Je.shared.vao,".setVAO(",Je.shared.vao,".targetVAO);"):(mr(Je.shared.vao,".setVAO(null);"),eu(Je,mr,yr,Lr.attributes,Kr),eu(Je,tr,yr,Lr.attributes,kr)),Ao(Je,mr,yr,Lr.uniforms,Kr,!1),Ao(Je,tr,yr,Lr.uniforms,kr,!0),Fu(Je,mr,tr,yr);else{var Nn=Je.global.def("{}"),ti=yr.shader.progVar.append(Je,tr),ci=tr.def(ti,".id"),Ai=tr.def(Nn,"[",ci,"]");tr(Je.shared.gl,".useProgram(",ti,".program);","if(!",Ai,"){",Ai,"=",Nn,"[",ci,"]=",Je.link(function(gi){return pa(Us,Je,yr,gi,2)}),"(",ti,");}",Ai,".call(this,a0[",Ar,"],",Ar,");")}}function or(Je,Se){var yr=Je.proc("batch",2);Je.batchId="0",Rs(Je,yr);var Lr=!1,qr=!0;Object.keys(Se.context).forEach(function(Nn){Lr=Lr||Se.context[Nn].propDep}),Lr||(ns(Je,yr,Se.context),qr=!1);var Ar=Se.framebuffer,Ye=!1;Ar?(Ar.propDep?Lr=Ye=!0:Ar.contextDep&&Lr&&(Ye=!0),Ye||Ou(Je,yr,Ar)):Ou(Je,yr,null),Se.state.viewport&&Se.state.viewport.propDep&&(Lr=!0);function Rr(Nn){return Nn.contextDep&&Lr||Nn.propDep}Ys(Je,yr,Se),ju(Je,yr,Se.state,function(Nn){return!Rr(Nn)}),(!Se.profile||!Rr(Se.profile))&&Na(Je,yr,Se,!1,"a1"),Se.contextDep=Lr,Se.needsContext=qr,Se.needsFramebuffer=Ye;var je=Se.shader.progVar;if(je.contextDep&&Lr||je.propDep)ql(Je,yr,Se,null);else{var mr=je.append(Je,yr);if(yr(Je.shared.gl,".useProgram(",mr,".program);"),Se.shader.program)ql(Je,yr,Se,Se.shader.program);else{yr(Je.shared.vao,".setVAO(null);");var tr=Je.global.def("{}"),kr=yr.def(mr,".id"),Kr=yr.def(tr,"[",kr,"]");yr(Je.cond(Kr).then(Kr,".call(this,a0,a1);").else(Kr,"=",tr,"[",kr,"]=",Je.link(function(Nn){return pa(ql,Je,Se,Nn,2)}),"(",mr,");",Kr,".call(this,a0,a1);"))}}Object.keys(Se.state).length>0&&yr(Je.shared.current,".dirty=true;"),Je.shared.vao&&yr(Je.shared.vao,".setVAO(null);")}function fn(Je,Se){var yr=Je.proc("scope",3);Je.batchId="a2";var Lr=Je.shared,qr=Lr.current;ns(Je,yr,Se.context),Se.framebuffer&&Se.framebuffer.append(Je,yr),i0(Object.keys(Se.state)).forEach(function(Ye){var Rr=Se.state[Ye],je=Rr.append(Je,yr);ar(je)?je.forEach(function(mr,tr){yr.set(Je.next[Ye],"["+tr+"]",mr)}):yr.set(Lr.next,"."+Ye,je)}),Na(Je,yr,Se,!0,!0),[Dl,cc,Kf,Sc,uu].forEach(function(Ye){var Rr=Se.draw[Ye];Rr&&yr.set(Lr.draw,"."+Ye,""+Rr.append(Je,yr))}),Object.keys(Se.uniforms).forEach(function(Ye){var Rr=Se.uniforms[Ye].append(Je,yr);Array.isArray(Rr)&&(Rr="["+Rr.join()+"]"),yr.set(Lr.uniforms,"["+Pe.id(Ye)+"]",Rr)}),Object.keys(Se.attributes).forEach(function(Ye){var Rr=Se.attributes[Ye].append(Je,yr),je=Je.scopeAttrib(Ye);Object.keys(new Gr).forEach(function(mr){yr.set(je,"."+mr,Rr[mr])})}),Se.scopeVAO&&yr.set(Lr.vao,".targetVAO",Se.scopeVAO.append(Je,yr));function Ar(Ye){var Rr=Se.shader[Ye];Rr&&yr.set(Lr.shader,"."+Ye,Rr.append(Je,yr))}Ar(wc),Ar(Of),Object.keys(Se.state).length>0&&(yr(qr,".dirty=true;"),yr.exit(qr,".dirty=true;")),yr("a1(",Je.shared.context,",a0,",Je.batchId,");")}function en(Je){if(!(typeof Je!="object"||ar(Je))){for(var Se=Object.keys(Je),yr=0;yr<Se.length;++yr)if(Br.isDynamic(Je[Se[yr]]))return!0;return!1}}function ji(Je,Se,yr){var Lr=Se.static[yr];if(!Lr||!en(Lr))return;var qr=Je.global,Ar=Object.keys(Lr),Ye=!1,Rr=!1,je=!1,mr=Je.global.def("{}");Ar.forEach(function(kr){var Kr=Lr[kr];if(Br.isDynamic(Kr)){typeof Kr=="function"&&(Kr=Lr[kr]=Br.unbox(Kr));var Nn=vl(Kr,null);Ye=Ye||Nn.thisDep,je=je||Nn.propDep,Rr=Rr||Nn.contextDep}else{switch(qr(mr,".",kr,"="),typeof Kr){case"number":qr(Kr);break;case"string":qr('"',Kr,'"');break;case"object":Array.isArray(Kr)&&qr("[",Kr.join(),"]");break;default:qr(Je.link(Kr));break}qr(";")}});function tr(kr,Kr){Ar.forEach(function(Nn){var ti=Lr[Nn];if(Br.isDynamic(ti)){var ci=kr.invoke(Kr,ti);Kr(mr,".",Nn,"=",ci,";")}})}Se.dynamic[yr]=new Br.DynamicVariable(mu,{thisDep:Ye,contextDep:Rr,propDep:je,ref:mr,append:tr}),delete Se.static[yr]}function ho(Je,Se,yr,Lr,qr){var Ar=Ca();Ar.stats=Ar.link(qr),Object.keys(Se.static).forEach(function(Rr){ji(Ar,Se,Rr)}),xd.forEach(function(Rr){ji(Ar,Je,Rr)});var Ye=bu(Je,Se,yr,Lr,Ar);return To(Ar,Ye),fn(Ar,Ye),or(Ar,Ye),k(Ar.compile(),{destroy:function(){Ye.shader.program.destroy()}})}return{next:Li,current:hi,procs:function(){var Je=Ca(),Se=Je.proc("poll"),yr=Je.proc("refresh"),Lr=Je.block();Se(Lr),yr(Lr);var qr=Je.shared,Ar=qr.gl,Ye=qr.next,Rr=qr.current;Lr(Rr,".dirty=false;"),Ou(Je,Se),Ou(Je,yr,null,!0);var je;Vn&&(je=Je.link(Vn)),dr.oes_vertex_array_object&&yr(Je.link(dr.oes_vertex_array_object),".bindVertexArrayOES(null);");for(var mr=0;mr<sn.maxAttributes;++mr){var tr=yr.def(qr.attributes,"[",mr,"]"),kr=Je.cond(tr,".buffer");kr.then(Ar,".enableVertexAttribArray(",mr,");",Ar,".bindBuffer(",bd,",",tr,".buffer.buffer);",Ar,".vertexAttribPointer(",mr,",",tr,".size,",tr,".type,",tr,".normalized,",tr,".stride,",tr,".offset);").else(Ar,".disableVertexAttribArray(",mr,");",Ar,".vertexAttrib4f(",mr,",",tr,".x,",tr,".y,",tr,".z,",tr,".w);",tr,".buffer=null;"),yr(kr),Vn&&yr(je,".vertexAttribDivisorANGLE(",mr,",",tr,".divisor);")}return yr(Je.shared.vao,".currentVAO=null;",Je.shared.vao,".setVAO(",Je.shared.vao,".targetVAO);"),Object.keys(En).forEach(function(Kr){var Nn=En[Kr],ti=Lr.def(Ye,".",Kr),ci=Je.block();ci("if(",ti,"){",Ar,".enable(",Nn,")}else{",Ar,".disable(",Nn,")}",Rr,".",Kr,"=",ti,";"),yr(ci),Se("if(",ti,"!==",Rr,".",Kr,"){",ci,"}")}),Object.keys(Mn).forEach(function(Kr){var Nn=Mn[Kr],ti=hi[Kr],ci,Ai,gi=Je.block();if(gi(Ar,".",Nn,"("),ar(ti)){var zi=ti.length;ci=Je.global.def(Ye,".",Kr),Ai=Je.global.def(Rr,".",Kr),gi(fr(zi,function(Fi){return ci+"["+Fi+"]"}),");",fr(zi,function(Fi){return Ai+"["+Fi+"]="+ci+"["+Fi+"];"}).join("")),Se("if(",fr(zi,function(Fi){return ci+"["+Fi+"]!=="+Ai+"["+Fi+"]"}).join("||"),"){",gi,"}")}else ci=Lr.def(Ye,".",Kr),Ai=Lr.def(Rr,".",Kr),gi(ci,");",Rr,".",Kr,"=",ci,";"),Se("if(",ci,"!==",Ai,"){",gi,"}");yr(gi)}),Je.compile()}(),compile:ho}}function a0(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var o0=34918,yv=34919,eh=35007,ai=function(It,Pe){if(!Pe.ext_disjoint_timer_query)return null;var dr=[];function sn(){return dr.pop()||Pe.ext_disjoint_timer_query.createQueryEXT()}function Ln(Vn){dr.push(Vn)}var un=[];function bn(Vn){var di=sn();Pe.ext_disjoint_timer_query.beginQueryEXT(eh,di),un.push(di),qn(un.length-1,un.length,Vn)}function jr(){Pe.ext_disjoint_timer_query.endQueryEXT(eh)}function jn(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var Qn=[];function ri(){return Qn.pop()||new jn}function ni(Vn){Qn.push(Vn)}var _i=[];function qn(Vn,di,Bn){var hi=ri();hi.startQueryIndex=Vn,hi.endQueryIndex=di,hi.sum=0,hi.stats=Bn,_i.push(hi)}var ii=[],Gr=[];function mn(){var Vn,di,Bn=un.length;if(Bn!==0){Gr.length=Math.max(Gr.length,Bn+1),ii.length=Math.max(ii.length,Bn+1),ii[0]=0,Gr[0]=0;var hi=0;for(Vn=0,di=0;di<un.length;++di){var Li=un[di];Pe.ext_disjoint_timer_query.getQueryObjectEXT(Li,yv)?(hi+=Pe.ext_disjoint_timer_query.getQueryObjectEXT(Li,o0),Ln(Li)):un[Vn++]=Li,ii[di+1]=hi,Gr[di+1]=Vn}for(un.length=Vn,Vn=0,di=0;di<_i.length;++di){var la=_i[di],En=la.startQueryIndex,Mn=la.endQueryIndex;la.sum+=ii[Mn]-ii[En];var Xi=Gr[En],Si=Gr[Mn];Si===Xi?(la.stats.gpuTime+=la.sum/1e6,ni(la)):(la.startQueryIndex=Xi,la.endQueryIndex=Si,_i[Vn++]=la)}_i.length=Vn}}return{beginQuery:bn,endQuery:jr,pushScopeStats:qn,update:mn,getNumPendingQueries:function(){return un.length},clear:function(){dr.push.apply(dr,un);for(var Vn=0;Vn<dr.length;Vn++)Pe.ext_disjoint_timer_query.deleteQueryEXT(dr[Vn]);un.length=0,dr.length=0},restore:function(){un.length=0,dr.length=0}}},Md=16384,Jh=256,xu=1024,ff=34962,Tc="webglcontextlost",Qo="webglcontextrestored",hf=1,il=2,rh=3;function $0(It,Pe){for(var dr=0;dr<It.length;++dr)if(It[dr]===Pe)return dr;return-1}function Hp(It){var Pe=ye(It);if(!Pe)return null;var dr=Pe.gl,sn=dr.getContextAttributes(),Ln=dr.isContextLost(),un=Ze(dr,Pe);if(!un)return null;var bn=Zn(),jr=a0(),jn=un.extensions,Qn=ai(dr,jn),ri=zn(),ni=dr.drawingBufferWidth,_i=dr.drawingBufferHeight,qn={tick:0,time:0,viewportWidth:ni,viewportHeight:_i,framebufferWidth:ni,framebufferHeight:_i,drawingBufferWidth:ni,drawingBufferHeight:_i,pixelRatio:Pe.pixelRatio},ii={},Gr={elements:null,primitive:4,count:-1,offset:0,instances:-1},mn=$c(dr,jn),Vn=Mt(dr,jr,Pe,hi),di=ul(dr,jn,Vn,jr),Bn=$r(dr,jn,mn,jr,Vn,di,Gr);function hi(pa){return Bn.destroyBuffer(pa)}var Li=yi(dr,bn,jr,Pe),la=ku(dr,jn,mn,function(){Xi.procs.poll()},qn,jr,Pe),En=jh(dr,jn,mn,jr,Pe),Mn=cr(dr,jn,mn,la,En,jr),Xi=mv(dr,bn,jn,mn,Vn,di,la,Mn,ii,Bn,Li,Gr,qn,Qn,Pe),Si=ha(dr,Mn,Xi.procs.poll,qn,sn,jn,mn),Jn=Xi.next,vi=dr.canvas,pi=[],Ua=[],Ca=[],Ci=[Pe.onDestroy],Pi=null;function ma(){if(pi.length===0){Qn&&Qn.update(),Pi=null;return}Pi=Sn.next(ma),Rs();for(var pa=pi.length-1;pa>=0;--pa){var fo=pi[pa];fo&&fo(qn,null,0)}dr.flush(),Qn&&Qn.update()}function Ma(){!Pi&&pi.length>0&&(Pi=Sn.next(ma))}function lo(){Pi&&(Sn.cancel(ma),Pi=null)}function Is(pa){pa.preventDefault(),Ln=!0,lo(),Ua.forEach(function(fo){fo()})}function ks(pa){dr.getError(),Ln=!1,un.restore(),Li.restore(),Vn.restore(),la.restore(),En.restore(),Mn.restore(),Bn.restore(),Qn&&Qn.restore(),Xi.procs.refresh(),Ma(),Ca.forEach(function(fo){fo()})}var co=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0;!co&&vi&&(vi.addEventListener(Tc,Is,!1),vi.addEventListener(Qo,ks,!1));function Go(){pi.length=0,lo(),!co&&vi&&(vi.removeEventListener(Tc,Is),vi.removeEventListener(Qo,ks)),Li.clear(),Mn.clear(),En.clear(),Bn.clear(),la.clear(),di.clear(),Vn.clear(),Qn&&Qn.clear(),Ci.forEach(function(pa){pa()})}function Ts(pa){tt(!!pa,"invalid args to regl({...})"),tt.type(pa,"object","invalid args to regl({...})");function fo(Ar){var Ye=k({},Ar);delete Ye.uniforms,delete Ye.attributes,delete Ye.context,delete Ye.vao,"stencil"in Ye&&Ye.stencil.op&&(Ye.stencil.opBack=Ye.stencil.opFront=Ye.stencil.op,delete Ye.stencil.op);function Rr(je){if(je in Ye){var mr=Ye[je];delete Ye[je],Object.keys(mr).forEach(function(tr){Ye[je+"."+tr]=mr[tr]})}}return Rr("blend"),Rr("depth"),Rr("cull"),Rr("stencil"),Rr("polygonOffset"),Rr("scissor"),Rr("sample"),"vao"in Ar&&(Ye.vao=Ar.vao),Ye}function To(Ar,Ye){var Rr={},je={};return Object.keys(Ar).forEach(function(mr){var tr=Ar[mr];if(Br.isDynamic(tr)){je[mr]=Br.unbox(tr,mr);return}else if(Ye&&Array.isArray(tr)){for(var kr=0;kr<tr.length;++kr)if(Br.isDynamic(tr[kr])){je[mr]=Br.unbox(tr,mr);return}}Rr[mr]=tr}),{dynamic:je,static:Rr}}var Us=To(pa.context||{},!0),ql=To(pa.uniforms||{},!0),or=To(pa.attributes||{},!1),fn=To(fo(pa),!1),en={gpuTime:0,cpuTime:0,count:0},ji=Xi.compile(fn,or,ql,Us,en),ho=ji.draw,Je=ji.batch,Se=ji.scope,yr=[];function Lr(Ar){for(;yr.length<Ar;)yr.push(null);return yr}function qr(Ar,Ye){var Rr;if(Ln&&tt.raise("context lost"),typeof Ar=="function")return Se.call(this,null,Ar,0);if(typeof Ye=="function")if(typeof Ar=="number")for(Rr=0;Rr<Ar;++Rr)Se.call(this,null,Ye,Rr);else if(Array.isArray(Ar))for(Rr=0;Rr<Ar.length;++Rr)Se.call(this,Ar[Rr],Ye,Rr);else return Se.call(this,Ar,Ye,0);else if(typeof Ar=="number"){if(Ar>0)return Je.call(this,Lr(Ar|0),Ar|0)}else if(Array.isArray(Ar)){if(Ar.length)return Je.call(this,Ar,Ar.length)}else return ho.call(this,Ar)}return k(qr,{stats:en,destroy:function(){ji.destroy()}})}var bu=Mn.setFBO=Ts({framebuffer:Br.define.call(null,hf,"framebuffer")});function ns(pa,fo){var To=0;Xi.procs.poll();var Us=fo.color;Us&&(dr.clearColor(+Us[0]||0,+Us[1]||0,+Us[2]||0,+Us[3]||0),To|=Md),"depth"in fo&&(dr.clearDepth(+fo.depth),To|=Jh),"stencil"in fo&&(dr.clearStencil(fo.stencil|0),To|=xu),tt(!!To,"called regl.clear with no buffer specified"),dr.clear(To)}function Ou(pa){if(tt(typeof pa=="object"&&pa,"regl.clear() takes an object as input"),"framebuffer"in pa)if(pa.framebuffer&&pa.framebuffer_reglType==="framebufferCube")for(var fo=0;fo<6;++fo)bu(k({framebuffer:pa.framebuffer.faces[fo]},pa),ns);else bu(pa,ns);else ns(null,pa)}function Ys(pa){tt.type(pa,"function","regl.frame() callback must be a function"),pi.push(pa);function fo(){var To=$0(pi,pa);tt(To>=0,"cannot cancel a frame twice");function Us(){var ql=$0(pi,Us);pi[ql]=pi[pi.length-1],pi.length-=1,pi.length<=0&&lo()}pi[To]=Us}return Ma(),{cancel:fo}}function ju(){var pa=Jn.viewport,fo=Jn.scissor_box;pa[0]=pa[1]=fo[0]=fo[1]=0,qn.viewportWidth=qn.framebufferWidth=qn.drawingBufferWidth=pa[2]=fo[2]=dr.drawingBufferWidth,qn.viewportHeight=qn.framebufferHeight=qn.drawingBufferHeight=pa[3]=fo[3]=dr.drawingBufferHeight}function Rs(){qn.tick+=1,qn.time=eu(),ju(),Xi.procs.poll()}function Na(){la.refresh(),ju(),Xi.procs.refresh(),Qn&&Qn.update()}function eu(){return(zn()-ri)/1e3}Na();function Ao(pa,fo){tt.type(fo,"function","listener callback must be a function");var To;switch(pa){case"frame":return Ys(fo);case"lost":To=Ua;break;case"restore":To=Ca;break;case"destroy":To=Ci;break;default:tt.raise("invalid event, must be one of frame,lost,restore,destroy")}return To.push(fo),{cancel:function(){for(var Us=0;Us<To.length;++Us)if(To[Us]===fo){To[Us]=To[To.length-1],To.pop();return}}}}var Fu=k(Ts,{clear:Ou,prop:Br.define.bind(null,hf),context:Br.define.bind(null,il),this:Br.define.bind(null,rh),draw:Ts({}),buffer:function(pa){return Vn.create(pa,ff,!1,!1)},elements:function(pa){return di.create(pa,!1)},texture:la.create2D,cube:la.createCube,renderbuffer:En.create,framebuffer:Mn.create,framebufferCube:Mn.createCube,vao:Bn.createVAO,attributes:sn,frame:Ys,on:Ao,limits:mn,hasExtension:function(pa){return mn.extensions.indexOf(pa.toLowerCase())>=0},read:Si,destroy:Go,_gl:dr,_refresh:Na,poll:function(){Rs(),Qn&&Qn.update()},now:eu,stats:jr});return Pe.onDone(null,Fu),Fu}return Hp})},80966:function(pn){(function(Ot,nt){pn.exports=nt()})(this,function(){"use strict";var Ot,nt,kt;function gt(k,Et){if(!Ot)Ot=Et;else if(!nt)nt=Et;else{var K="var sharedChunk = {}; ("+Ot+")(sharedChunk); ("+nt+")(sharedChunk);",yt={};Ot(yt),kt=Et(yt),typeof window!="undefined"&&(kt.workerUrl=window.URL.createObjectURL(new Blob([K],{type:"text/javascript"})))}}return gt(["exports"],function(k){"use strict";function Et(f,d){return f(d={exports:{}},d.exports),d.exports}var K=yt;function yt(f,d,y,T){this.cx=3*f,this.bx=3*(y-f)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*d,this.by=3*(T-d)-this.cy,this.ay=1-this.cy-this.by,this.p1x=f,this.p1y=T,this.p2x=y,this.p2y=T}yt.prototype.sampleCurveX=function(f){return((this.ax*f+this.bx)*f+this.cx)*f},yt.prototype.sampleCurveY=function(f){return((this.ay*f+this.by)*f+this.cy)*f},yt.prototype.sampleCurveDerivativeX=function(f){return(3*this.ax*f+2*this.bx)*f+this.cx},yt.prototype.solveCurveX=function(f,d){var y,T,O,N,Z;for(d===void 0&&(d=1e-6),O=f,Z=0;Z<8;Z++){if(N=this.sampleCurveX(O)-f,Math.abs(N)<d)return O;var q=this.sampleCurveDerivativeX(O);if(Math.abs(q)<1e-6)break;O-=N/q}if((O=f)<(y=0))return y;if(O>(T=1))return T;for(;y<T;){if(N=this.sampleCurveX(O),Math.abs(N-f)<d)return O;f>N?y=O:T=O,O=.5*(T-y)+y}return O},yt.prototype.solve=function(f,d){return this.sampleCurveY(this.solveCurveX(f,d))};var J=pt;function pt(f,d){this.x=f,this.y=d}pt.prototype={clone:function(){return new pt(this.x,this.y)},add:function(f){return this.clone()._add(f)},sub:function(f){return this.clone()._sub(f)},multByPoint:function(f){return this.clone()._multByPoint(f)},divByPoint:function(f){return this.clone()._divByPoint(f)},mult:function(f){return this.clone()._mult(f)},div:function(f){return this.clone()._div(f)},rotate:function(f){return this.clone()._rotate(f)},rotateAround:function(f,d){return this.clone()._rotateAround(f,d)},matMult:function(f){return this.clone()._matMult(f)},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(f){return this.x===f.x&&this.y===f.y},dist:function(f){return Math.sqrt(this.distSqr(f))},distSqr:function(f){var d=f.x-this.x,y=f.y-this.y;return d*d+y*y},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(f){return Math.atan2(this.y-f.y,this.x-f.x)},angleWith:function(f){return this.angleWithSep(f.x,f.y)},angleWithSep:function(f,d){return Math.atan2(this.x*d-this.y*f,this.x*f+this.y*d)},_matMult:function(f){var d=f[2]*this.x+f[3]*this.y;return this.x=f[0]*this.x+f[1]*this.y,this.y=d,this},_add:function(f){return this.x+=f.x,this.y+=f.y,this},_sub:function(f){return this.x-=f.x,this.y-=f.y,this},_mult:function(f){return this.x*=f,this.y*=f,this},_div:function(f){return this.x/=f,this.y/=f,this},_multByPoint:function(f){return this.x*=f.x,this.y*=f.y,this},_divByPoint:function(f){return this.x/=f.x,this.y/=f.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var f=this.y;return this.y=this.x,this.x=-f,this},_rotate:function(f){var d=Math.cos(f),y=Math.sin(f),T=y*this.x+d*this.y;return this.x=d*this.x-y*this.y,this.y=T,this},_rotateAround:function(f,d){var y=Math.cos(f),T=Math.sin(f),O=d.y+T*(this.x-d.x)+y*(this.y-d.y);return this.x=d.x+y*(this.x-d.x)-T*(this.y-d.y),this.y=O,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},pt.convert=function(f){return f instanceof pt?f:Array.isArray(f)?new pt(f[0],f[1]):f};var et=typeof self!="undefined"?self:{},_e=Math.pow(2,53)-1;function ot(f,d,y,T){var O=new K(f,d,y,T);return function(N){return O.solve(N)}}var ut=ot(.25,.1,.25,1);function zt(f,d,y){return Math.min(y,Math.max(d,f))}function P(f,d,y){var T=y-d,O=((f-d)%T+T)%T+d;return O===d?y:O}function b(f){for(var d=[],y=arguments.length-1;y-- >0;)d[y]=arguments[y+1];for(var T=0,O=d;T<O.length;T+=1){var N=O[T];for(var Z in N)f[Z]=N[Z]}return f}var W=1;function le(){return W++}function be(){return function f(d){return d?(d^16*Math.random()>>d/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,f)}()}function Me(f){return!!f&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(f)}function At(f,d){f.forEach(function(y){d[y]&&(d[y]=d[y].bind(d))})}function rt(f,d){return f.indexOf(d,f.length-d.length)!==-1}function Dt(f,d,y){var T={};for(var O in f)T[O]=d.call(y||this,f[O],O,f);return T}function Ee(f,d,y){var T={};for(var O in f)d.call(y||this,f[O],O,f)&&(T[O]=f[O]);return T}function ge(f){return Array.isArray(f)?f.map(ge):typeof f=="object"&&f?Dt(f,ge):f}var Ge={};function Ue(f){Ge[f]||(typeof console!="undefined"&&console.warn(f),Ge[f]=!0)}function xe(f,d,y){return(y.y-f.y)*(d.x-f.x)>(d.y-f.y)*(y.x-f.x)}function Ke(f){for(var d=0,y=0,T=f.length,O=T-1,N=void 0,Z=void 0;y<T;O=y++)d+=((Z=f[O]).x-(N=f[y]).x)*(N.y+Z.y);return d}function Lt(){return typeof WorkerGlobalScope!="undefined"&&typeof self!="undefined"&&self instanceof WorkerGlobalScope}function Jt(f){var d={};if(f.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(T,O,N,Z){var q=N||Z;return d[O]=!q||q.toLowerCase(),""}),d["max-age"]){var y=parseInt(d["max-age"],10);isNaN(y)?delete d["max-age"]:d["max-age"]=y}return d}var ft=null;function St(f){if(ft==null){var d=f.navigator?f.navigator.userAgent:null;ft=!!f.safari||!(!d||!(/\b(iPad|iPhone|iPod)\b/.test(d)||d.match("Safari")&&!d.match("Chrome")))}return ft}function Y(f){try{var d=et[f];return d.setItem("_mapbox_test_",1),d.removeItem("_mapbox_test_"),!0}catch(y){return!1}}var mt,se,ke,Le,Be=et.performance&&et.performance.now?et.performance.now.bind(et.performance):Date.now.bind(Date),Bt=et.requestAnimationFrame||et.mozRequestAnimationFrame||et.webkitRequestAnimationFrame||et.msRequestAnimationFrame,ee=et.cancelAnimationFrame||et.mozCancelAnimationFrame||et.webkitCancelAnimationFrame||et.msCancelAnimationFrame,me={now:Be,frame:function(f){var d=Bt(f);return{cancel:function(){return ee(d)}}},getImageData:function(f,d){d===void 0&&(d=0);var y=et.document.createElement("canvas"),T=y.getContext("2d");if(!T)throw new Error("failed to create canvas 2d context");return y.width=f.width,y.height=f.height,T.drawImage(f,0,0,f.width,f.height),T.getImageData(-d,-d,f.width+2*d,f.height+2*d)},resolveURL:function(f){return mt||(mt=et.document.createElement("a")),mt.href=f,mt.href},hardwareConcurrency:et.navigator&&et.navigator.hardwareConcurrency||4,get devicePixelRatio(){return et.devicePixelRatio},get prefersReducedMotion(){return!!et.matchMedia&&(se==null&&(se=et.matchMedia("(prefers-reduced-motion: reduce)")),se.matches)}},Yt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},qe={supported:!1,testSupport:function(f){!vr&&Le&&(ie?qt(f):ke=f)}},vr=!1,ie=!1;function qt(f){var d=f.createTexture();f.bindTexture(f.TEXTURE_2D,d);try{if(f.texImage2D(f.TEXTURE_2D,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,Le),f.isContextLost())return;qe.supported=!0}catch(y){}f.deleteTexture(d),vr=!0}et.document&&((Le=et.document.createElement("img")).onload=function(){ke&&qt(ke),ke=null,ie=!0},Le.onerror=function(){vr=!0,ke=null},Le.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var bt="01",Xt=function(f,d){this._transformRequestFn=f,this._customAccessToken=d,this._createSkuToken()};function $t(f){return f.indexOf("mapbox:")===0}Xt.prototype._createSkuToken=function(){var f=function(){for(var d="",y=0;y<10;y++)d+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",bt,d].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=f.token,this._skuTokenExpiresAt=f.tokenExpiresAt},Xt.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Xt.prototype.transformRequest=function(f,d){return this._transformRequestFn&&this._transformRequestFn(f,d)||{url:f}},Xt.prototype.normalizeStyleURL=function(f,d){if(!$t(f))return f;var y=Ie(f);return y.path="/styles/v1"+y.path,this._makeAPIURL(y,this._customAccessToken||d)},Xt.prototype.normalizeGlyphsURL=function(f,d){if(!$t(f))return f;var y=Ie(f);return y.path="/fonts/v1"+y.path,this._makeAPIURL(y,this._customAccessToken||d)},Xt.prototype.normalizeSourceURL=function(f,d){if(!$t(f))return f;var y=Ie(f);return y.path="/v4/"+y.authority+".json",y.params.push("secure"),this._makeAPIURL(y,this._customAccessToken||d)},Xt.prototype.normalizeSpriteURL=function(f,d,y,T){var O=Ie(f);return $t(f)?(O.path="/styles/v1"+O.path+"/sprite"+d+y,this._makeAPIURL(O,this._customAccessToken||T)):(O.path+=""+d+y,Ne(O))},Xt.prototype.normalizeTileURL=function(f,d){if(this._isSkuTokenExpired()&&this._createSkuToken(),f&&!$t(f))return f;var y=Ie(f);y.path=y.path.replace(/(\.(png|jpg)\d*)(?=$)/,(me.devicePixelRatio>=2||d===512?"@2x":"")+(qe.supported?".webp":"$1")),y.path=y.path.replace(/^.+\/v4\//,"/"),y.path="/v4"+y.path;var T=this._customAccessToken||function(O){for(var N=0,Z=O;N<Z.length;N+=1){var q=Z[N].match(/^access_token=(.*)$/);if(q)return q[1]}return null}(y.params)||Yt.ACCESS_TOKEN;return Yt.REQUIRE_ACCESS_TOKEN&&T&&this._skuToken&&y.params.push("sku="+this._skuToken),this._makeAPIURL(y,T)},Xt.prototype.canonicalizeTileURL=function(f,d){var y=Ie(f);if(!y.path.match(/(^\/v4\/)/)||!y.path.match(/\.[\w]+$/))return f;var T="mapbox://tiles/";T+=y.path.replace("/v4/","");var O=y.params;return d&&(O=O.filter(function(N){return!N.match(/^access_token=/)})),O.length&&(T+="?"+O.join("&")),T},Xt.prototype.canonicalizeTileset=function(f,d){for(var y=!!d&&$t(d),T=[],O=0,N=f.tiles||[];O<N.length;O+=1){var Z=N[O];wt(Z)?T.push(this.canonicalizeTileURL(Z,y)):T.push(Z)}return T},Xt.prototype._makeAPIURL=function(f,d){var y="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",T=Ie(Yt.API_URL);if(f.protocol=T.protocol,f.authority=T.authority,f.protocol==="http"){var O=f.params.indexOf("secure");O>=0&&f.params.splice(O,1)}if(T.path!=="/"&&(f.path=""+T.path+f.path),!Yt.REQUIRE_ACCESS_TOKEN)return Ne(f);if(!(d=d||Yt.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+y);if(d[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+y);return f.params=f.params.filter(function(N){return N.indexOf("access_token")===-1}),f.params.push("access_token="+d),Ne(f)};var xt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function wt(f){return xt.test(f)}var ue=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Ie(f){var d=f.match(ue);if(!d)throw new Error("Unable to parse URL object");return{protocol:d[1],authority:d[2],path:d[3]||"/",params:d[4]?d[4].split("&"):[]}}function Ne(f){var d=f.params.length?"?"+f.params.join("&"):"";return f.protocol+"://"+f.authority+f.path+d}function Zt(f){if(!f)return null;var d=f.split(".");if(!d||d.length!==3)return null;try{return JSON.parse(decodeURIComponent(et.atob(d[1]).split("").map(function(y){return"%"+("00"+y.charCodeAt(0).toString(16)).slice(-2)}).join("")))}catch(y){return null}}var Ct=function(f){this.type=f,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};Ct.prototype.getStorageKey=function(f){var d,y=Zt(Yt.ACCESS_TOKEN);return d=y&&y.u?et.btoa(encodeURIComponent(y.u).replace(/%([0-9A-F]{2})/g,function(T,O){return String.fromCharCode(Number("0x"+O))})):Yt.ACCESS_TOKEN||"",f?"mapbox.eventData."+f+":"+d:"mapbox.eventData:"+d},Ct.prototype.fetchEventData=function(){var f=Y("localStorage"),d=this.getStorageKey(),y=this.getStorageKey("uuid");if(f)try{var T=et.localStorage.getItem(d);T&&(this.eventData=JSON.parse(T));var O=et.localStorage.getItem(y);O&&(this.anonId=O)}catch(N){Ue("Unable to read from LocalStorage")}},Ct.prototype.saveEventData=function(){var f=Y("localStorage"),d=this.getStorageKey(),y=this.getStorageKey("uuid");if(f)try{et.localStorage.setItem(y,this.anonId),Object.keys(this.eventData).length>=1&&et.localStorage.setItem(d,JSON.stringify(this.eventData))}catch(T){Ue("Unable to write to LocalStorage")}},Ct.prototype.processRequests=function(f){},Ct.prototype.postEvent=function(f,d,y,T){var O=this;if(Yt.EVENTS_URL){var N=Ie(Yt.EVENTS_URL);N.params.push("access_token="+(T||Yt.ACCESS_TOKEN||""));var Z={event:this.type,created:new Date(f).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.13.3",skuId:bt,userId:this.anonId},q=d?b(Z,d):Z,dt={url:Ne(N),headers:{"Content-Type":"text/plain"},body:JSON.stringify([q])};this.pendingRequest=Xn(dt,function(Pt){O.pendingRequest=null,y(Pt),O.saveEventData(),O.processRequests(T)})}},Ct.prototype.queueRequest=function(f,d){this.queue.push(f),this.processRequests(d)};var Tt,Nt,tt=function(f){function d(){f.call(this,"map.load"),this.success={},this.skuToken=""}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.postMapLoadEvent=function(y,T,O,N){this.skuToken=O;var Z=!(!N&&!Yt.ACCESS_TOKEN),q=Array.isArray(y)&&y.some(function(dt){return $t(dt)||wt(dt)});Yt.EVENTS_URL&&Z&&q&&this.queueRequest({id:T,timestamp:Date.now()},N)},d.prototype.processRequests=function(y){var T=this;if(!this.pendingRequest&&this.queue.length!==0){var O=this.queue.shift(),N=O.id,Z=O.timestamp;N&&this.success[N]||(this.anonId||this.fetchEventData(),Me(this.anonId)||(this.anonId=be()),this.postEvent(Z,{skuToken:this.skuToken},function(q){q||N&&(T.success[N]=!0)},y))}},d}(Ct),vt=new(function(f){function d(y){f.call(this,"appUserTurnstile"),this._customAccessToken=y}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.postTurnstileEvent=function(y,T){Yt.EVENTS_URL&&Yt.ACCESS_TOKEN&&Array.isArray(y)&&y.some(function(O){return $t(O)||wt(O)})&&this.queueRequest(Date.now(),T)},d.prototype.processRequests=function(y){var T=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var O=Zt(Yt.ACCESS_TOKEN),N=O?O.u:Yt.ACCESS_TOKEN,Z=N!==this.eventData.tokenU;Me(this.anonId)||(this.anonId=be(),Z=!0);var q=this.queue.shift();if(this.eventData.lastSuccess){var dt=new Date(this.eventData.lastSuccess),Pt=new Date(q),Gt=(q-this.eventData.lastSuccess)/864e5;Z=Z||Gt>=1||Gt<-1||dt.getDate()!==Pt.getDate()}else Z=!0;if(!Z)return this.processRequests();this.postEvent(q,{"enabled.telemetry":!1},function(Qt){Qt||(T.eventData.lastSuccess=q,T.eventData.tokenU=N)},y)}},d}(Ct)),Ht=vt.postTurnstileEvent.bind(vt),he=new tt,jt=he.postMapLoadEvent.bind(he),Te=500,We=50;function Qe(){et.caches&&!Tt&&(Tt=et.caches.open("mapbox-tiles"))}function pr(f){var d=f.indexOf("?");return d<0?f:f.slice(0,d)}var lr,Vr=1/0;function Pr(){return lr==null&&(lr=et.OffscreenCanvas&&new et.OffscreenCanvas(1,1).getContext("2d")&&typeof et.createImageBitmap=="function"),lr}var Br={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(Br);var Sn=function(f){function d(y,T,O){T===401&&wt(O)&&(y+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),f.call(this,y),this.status=T,this.url=O,this.name=this.constructor.name,this.message=y}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},d}(Error),an=Lt()?function(){return self.worker&&self.worker.referrer}:function(){return(et.location.protocol==="blob:"?et.parent:et).location.href},zn,Zn,Wn=function(f,d){if(!(/^file:/.test(y=f.url)||/^file:/.test(an())&&!/^\w+:/.test(y))){if(et.fetch&&et.Request&&et.AbortController&&et.Request.prototype.hasOwnProperty("signal"))return function(T,O){var N,Z=new et.AbortController,q=new et.Request(T.url,{method:T.method||"GET",body:T.body,credentials:T.credentials,headers:T.headers,referrer:an(),signal:Z.signal}),dt=!1,Pt=!1,Gt=(N=q.url).indexOf("sku=")>0&&wt(N);T.type==="json"&&q.headers.set("Accept","application/json");var Qt=function(Oe,er,sr){if(!Pt){if(Oe&&Oe.message!=="SecurityError"&&Ue(Oe),er&&sr)return ve(er);var Sr=Date.now();et.fetch(q).then(function(gr){if(gr.ok){var zr=Gt?gr.clone():null;return ve(gr,zr,Sr)}return O(new Sn(gr.statusText,gr.status,T.url))}).catch(function(gr){gr.code!==20&&O(new Error(gr.message))})}},ve=function(Oe,er,sr){(T.type==="arrayBuffer"?Oe.arrayBuffer():T.type==="json"?Oe.json():Oe.text()).then(function(Sr){Pt||(er&&sr&&function(gr,zr,Jr){if(Qe(),Tt){var ln={status:zr.status,statusText:zr.statusText,headers:new et.Headers};zr.headers.forEach(function(Pn,oi){return ln.headers.set(oi,Pn)});var yn=Jt(zr.headers.get("Cache-Control")||"");yn["no-store"]||(yn["max-age"]&&ln.headers.set("Expires",new Date(Jr+1e3*yn["max-age"]).toUTCString()),new Date(ln.headers.get("Expires")).getTime()-Jr<42e4||function(Pn,oi){if(Nt===void 0)try{new Response(new ReadableStream),Nt=!0}catch(Ti){Nt=!1}Nt?oi(Pn.body):Pn.blob().then(oi)}(zr,function(Pn){var oi=new et.Response(Pn,ln);Qe(),Tt&&Tt.then(function(Ti){return Ti.put(pr(gr.url),oi)}).catch(function(Ti){return Ue(Ti.message)})}))}}(q,er,sr),dt=!0,O(null,Sr,Oe.headers.get("Cache-Control"),Oe.headers.get("Expires")))}).catch(function(Sr){Pt||O(new Error(Sr.message))})};return Gt?function(Oe,er){if(Qe(),!Tt)return er(null);var sr=pr(Oe.url);Tt.then(function(Sr){Sr.match(sr).then(function(gr){var zr=function(Jr){if(!Jr)return!1;var ln=new Date(Jr.headers.get("Expires")||0),yn=Jt(Jr.headers.get("Cache-Control")||"");return ln>Date.now()&&!yn["no-cache"]}(gr);Sr.delete(sr),zr&&Sr.put(sr,gr.clone()),er(null,gr,zr)}).catch(er)}).catch(er)}(q,Qt):Qt(null,null),{cancel:function(){Pt=!0,dt||Z.abort()}}}(f,d);if(Lt()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",f,d,void 0,!0)}var y;return function(T,O){var N=new et.XMLHttpRequest;for(var Z in N.open(T.method||"GET",T.url,!0),T.type==="arrayBuffer"&&(N.responseType="arraybuffer"),T.headers)N.setRequestHeader(Z,T.headers[Z]);return T.type==="json"&&(N.responseType="text",N.setRequestHeader("Accept","application/json")),N.withCredentials=T.credentials==="include",N.onerror=function(){O(new Error(N.statusText))},N.onload=function(){if((N.status>=200&&N.status<300||N.status===0)&&N.response!==null){var q=N.response;if(T.type==="json")try{q=JSON.parse(N.response)}catch(dt){return O(dt)}O(null,q,N.getResponseHeader("Cache-Control"),N.getResponseHeader("Expires"))}else O(new Sn(N.statusText,N.status,T.url))},N.send(T.body),{cancel:function(){return N.abort()}}}(f,d)},Dn=function(f,d){return Wn(b(f,{type:"arrayBuffer"}),d)},Xn=function(f,d){return Wn(b(f,{method:"POST"}),d)},Ft="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";zn=[],Zn=0;var Wt=function(f,d){if(qe.supported&&(f.headers||(f.headers={}),f.headers.accept="image/webp,*/*"),Zn>=Yt.MAX_PARALLEL_IMAGE_REQUESTS){var y={requestParameters:f,callback:d,cancelled:!1,cancel:function(){this.cancelled=!0}};return zn.push(y),y}Zn++;var T=!1,O=function(){if(!T)for(T=!0,Zn--;zn.length&&Zn<Yt.MAX_PARALLEL_IMAGE_REQUESTS;){var Z=zn.shift();Z.cancelled||(Z.cancel=Wt(Z.requestParameters,Z.callback).cancel)}},N=Dn(f,function(Z,q,dt,Pt){O(),Z?d(Z):q&&(Pr()?function(Gt,Qt){var ve=new et.Blob([new Uint8Array(Gt)],{type:"image/png"});et.createImageBitmap(ve).then(function(Oe){Qt(null,Oe)}).catch(function(Oe){Qt(new Error("Could not load image because of "+Oe.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}(q,d):function(Gt,Qt,ve,Oe){var er=new et.Image,sr=et.URL;er.onload=function(){Qt(null,er),sr.revokeObjectURL(er.src),er.onload=null,et.requestAnimationFrame(function(){er.src=Ft})},er.onerror=function(){return Qt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var Sr=new et.Blob([new Uint8Array(Gt)],{type:"image/png"});er.cacheControl=ve,er.expires=Oe,er.src=Gt.byteLength?sr.createObjectURL(Sr):Ft}(q,d,dt,Pt))});return{cancel:function(){N.cancel(),O()}}};function oe(f,d,y){y[f]&&y[f].indexOf(d)!==-1||(y[f]=y[f]||[],y[f].push(d))}function ye(f,d,y){if(y&&y[f]){var T=y[f].indexOf(d);T!==-1&&y[f].splice(T,1)}}var Ze=function(f,d){d===void 0&&(d={}),b(this,d),this.type=f},fr=function(f){function d(y,T){T===void 0&&(T={}),f.call(this,"error",b({error:y},T))}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d}(Ze),_r=function(){};_r.prototype.on=function(f,d){return this._listeners=this._listeners||{},oe(f,d,this._listeners),this},_r.prototype.off=function(f,d){return ye(f,d,this._listeners),ye(f,d,this._oneTimeListeners),this},_r.prototype.once=function(f,d){return this._oneTimeListeners=this._oneTimeListeners||{},oe(f,d,this._oneTimeListeners),this},_r.prototype.fire=function(f,d){typeof f=="string"&&(f=new Ze(f,d||{}));var y=f.type;if(this.listens(y)){f.target=this;for(var T=0,O=this._listeners&&this._listeners[y]?this._listeners[y].slice():[];T<O.length;T+=1)O[T].call(this,f);for(var N=0,Z=this._oneTimeListeners&&this._oneTimeListeners[y]?this._oneTimeListeners[y].slice():[];N<Z.length;N+=1){var q=Z[N];ye(y,q,this._oneTimeListeners),q.call(this,f)}var dt=this._eventedParent;dt&&(b(f,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),dt.fire(f))}else f instanceof fr&&console.error(f.error);return this},_r.prototype.listens=function(f){return this._listeners&&this._listeners[f]&&this._listeners[f].length>0||this._oneTimeListeners&&this._oneTimeListeners[f]&&this._oneTimeListeners[f].length>0||this._eventedParent&&this._eventedParent.listens(f)},_r.prototype.setEventedParent=function(f,d){return this._eventedParent=f,this._eventedParentData=d,this};var we={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},ir=function(f,d,y,T){this.message=(f?f+": ":"")+y,T&&(this.identifier=T),d!=null&&d.__line__&&(this.line=d.__line__)};function Hr(f){var d=f.value;return d?[new ir(f.key,d,"constants have been deprecated as of v8")]:[]}function In(f){for(var d=[],y=arguments.length-1;y-- >0;)d[y]=arguments[y+1];for(var T=0,O=d;T<O.length;T+=1){var N=O[T];for(var Z in N)f[Z]=N[Z]}return f}function nn(f){return f instanceof Number||f instanceof String||f instanceof Boolean?f.valueOf():f}function Yr(f){if(Array.isArray(f))return f.map(Yr);if(f instanceof Object&&!(f instanceof Number||f instanceof String||f instanceof Boolean)){var d={};for(var y in f)d[y]=Yr(f[y]);return d}return nn(f)}var On=function(f){function d(y,T){f.call(this,T),this.message=T,this.key=y}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d}(Error),bi=function(f,d){d===void 0&&(d=[]),this.parent=f,this.bindings={};for(var y=0,T=d;y<T.length;y+=1){var O=T[y];this.bindings[O[0]]=O[1]}};bi.prototype.concat=function(f){return new bi(this,f)},bi.prototype.get=function(f){if(this.bindings[f])return this.bindings[f];if(this.parent)return this.parent.get(f);throw new Error(f+" not found in scope.")},bi.prototype.has=function(f){return!!this.bindings[f]||!!this.parent&&this.parent.has(f)};var Mi={kind:"null"},tn={kind:"number"},mi={kind:"string"},Yn={kind:"boolean"},fi={kind:"color"},Ea={kind:"object"},si={kind:"value"},Ia={kind:"collator"},vo={kind:"formatted"},Oa={kind:"resolvedImage"};function Ha(f,d){return{kind:"array",itemType:f,N:d}}function wa(f){if(f.kind==="array"){var d=wa(f.itemType);return typeof f.N=="number"?"array<"+d+", "+f.N+">":f.itemType.kind==="value"?"array":"array<"+d+">"}return f.kind}var ya=[Mi,tn,mi,Yn,fi,vo,Ea,Ha(si),Oa];function Qa(f,d){if(d.kind==="error")return null;if(f.kind==="array"){if(d.kind==="array"&&(d.N===0&&d.itemType.kind==="value"||!Qa(f.itemType,d.itemType))&&(typeof f.N!="number"||f.N===d.N))return null}else{if(f.kind===d.kind)return null;if(f.kind==="value"){for(var y=0,T=ya;y<T.length;y+=1)if(!Qa(T[y],d))return null}}return"Expected "+wa(f)+" but found "+wa(d)+" instead."}function Wo(f,d){return d.some(function(y){return y.kind===f.kind})}function yo(f,d){return d.some(function(y){return y==="null"?f===null:y==="array"?Array.isArray(f):y==="object"?f&&!Array.isArray(f)&&typeof f=="object":y===typeof f})}var Va=Et(function(f,d){var y={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function T(q){return(q=Math.round(q))<0?0:q>255?255:q}function O(q){return T(q[q.length-1]==="%"?parseFloat(q)/100*255:parseInt(q))}function N(q){return(dt=q[q.length-1]==="%"?parseFloat(q)/100:parseFloat(q))<0?0:dt>1?1:dt;var dt}function Z(q,dt,Pt){return Pt<0?Pt+=1:Pt>1&&(Pt-=1),6*Pt<1?q+(dt-q)*Pt*6:2*Pt<1?dt:3*Pt<2?q+(dt-q)*(2/3-Pt)*6:q}try{d.parseCSSColor=function(q){var dt,Pt=q.replace(/ /g,"").toLowerCase();if(Pt in y)return y[Pt].slice();if(Pt[0]==="#")return Pt.length===4?(dt=parseInt(Pt.substr(1),16))>=0&&dt<=4095?[(3840&dt)>>4|(3840&dt)>>8,240&dt|(240&dt)>>4,15&dt|(15&dt)<<4,1]:null:Pt.length===7&&(dt=parseInt(Pt.substr(1),16))>=0&&dt<=16777215?[(16711680&dt)>>16,(65280&dt)>>8,255&dt,1]:null;var Gt=Pt.indexOf("("),Qt=Pt.indexOf(")");if(Gt!==-1&&Qt+1===Pt.length){var ve=Pt.substr(0,Gt),Oe=Pt.substr(Gt+1,Qt-(Gt+1)).split(","),er=1;switch(ve){case"rgba":if(Oe.length!==4)return null;er=N(Oe.pop());case"rgb":return Oe.length!==3?null:[O(Oe[0]),O(Oe[1]),O(Oe[2]),er];case"hsla":if(Oe.length!==4)return null;er=N(Oe.pop());case"hsl":if(Oe.length!==3)return null;var sr=(parseFloat(Oe[0])%360+360)%360/360,Sr=N(Oe[1]),gr=N(Oe[2]),zr=gr<=.5?gr*(Sr+1):gr+Sr-gr*Sr,Jr=2*gr-zr;return[T(255*Z(Jr,zr,sr+1/3)),T(255*Z(Jr,zr,sr)),T(255*Z(Jr,zr,sr-1/3)),er];default:return null}}return null}}catch(q){}}).parseCSSColor,Ya=function(f,d,y,T){T===void 0&&(T=1),this.r=f,this.g=d,this.b=y,this.a=T};Ya.parse=function(f){if(f){if(f instanceof Ya)return f;if(typeof f=="string"){var d=Va(f);if(d)return new Ya(d[0]/255*d[3],d[1]/255*d[3],d[2]/255*d[3],d[3])}}},Ya.prototype.toString=function(){var f=this.toArray(),d=f[1],y=f[2],T=f[3];return"rgba("+Math.round(f[0])+","+Math.round(d)+","+Math.round(y)+","+T+")"},Ya.prototype.toArray=function(){var f=this.a;return f===0?[0,0,0,0]:[255*this.r/f,255*this.g/f,255*this.b/f,f]},Ya.black=new Ya(0,0,0,1),Ya.white=new Ya(1,1,1,1),Ya.transparent=new Ya(0,0,0,0),Ya.red=new Ya(1,0,0,1);var No=function(f,d,y){this.sensitivity=f?d?"variant":"case":d?"accent":"base",this.locale=y,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};No.prototype.compare=function(f,d){return this.collator.compare(f,d)},No.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Nu=function(f,d,y,T,O){this.text=f,this.image=d,this.scale=y,this.fontStack=T,this.textColor=O},ts=function(f){this.sections=f};ts.fromString=function(f){return new ts([new Nu(f,null,null,null,null)])},ts.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some(function(f){return f.text.length!==0||f.image&&f.image.name.length!==0})},ts.factory=function(f){return f instanceof ts?f:ts.fromString(f)},ts.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(f){return f.text}).join("")},ts.prototype.serialize=function(){for(var f=["format"],d=0,y=this.sections;d<y.length;d+=1){var T=y[d];if(T.image)f.push(["image",T.image.name]);else{f.push(T.text);var O={};T.fontStack&&(O["text-font"]=["literal",T.fontStack.split(",")]),T.scale&&(O["font-scale"]=T.scale),T.textColor&&(O["text-color"]=["rgba"].concat(T.textColor.toArray())),f.push(O)}}return f};var bo=function(f){this.name=f.name,this.available=f.available};function rr(f,d,y,T){return typeof f=="number"&&f>=0&&f<=255&&typeof d=="number"&&d>=0&&d<=255&&typeof y=="number"&&y>=0&&y<=255?T===void 0||typeof T=="number"&&T>=0&&T<=1?null:"Invalid rgba value ["+[f,d,y,T].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof T=="number"?[f,d,y,T]:[f,d,y]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function de(f){if(f===null||typeof f=="string"||typeof f=="boolean"||typeof f=="number"||f instanceof Ya||f instanceof No||f instanceof ts||f instanceof bo)return!0;if(Array.isArray(f)){for(var d=0,y=f;d<y.length;d+=1)if(!de(y[d]))return!1;return!0}if(typeof f=="object"){for(var T in f)if(!de(f[T]))return!1;return!0}return!1}function Ve(f){if(f===null)return Mi;if(typeof f=="string")return mi;if(typeof f=="boolean")return Yn;if(typeof f=="number")return tn;if(f instanceof Ya)return fi;if(f instanceof No)return Ia;if(f instanceof ts)return vo;if(f instanceof bo)return Oa;if(Array.isArray(f)){for(var d,y=f.length,T=0,O=f;T<O.length;T+=1){var N=Ve(O[T]);if(d){if(d===N)continue;d=si;break}d=N}return Ha(d||si,y)}return Ea}function Mr(f){var d=typeof f;return f===null?"":d==="string"||d==="number"||d==="boolean"?String(f):f instanceof Ya||f instanceof ts||f instanceof bo?f.toString():JSON.stringify(f)}bo.prototype.toString=function(){return this.name},bo.fromString=function(f){return f?new bo({name:f,available:!1}):null},bo.prototype.serialize=function(){return["image",this.name]};var rn=function(f,d){this.type=f,this.value=d};rn.parse=function(f,d){if(f.length!==2)return d.error("'literal' expression requires exactly one argument, but found "+(f.length-1)+" instead.");if(!de(f[1]))return d.error("invalid value");var y=f[1],T=Ve(y),O=d.expectedType;return T.kind!=="array"||T.N!==0||!O||O.kind!=="array"||typeof O.N=="number"&&O.N!==0||(T=O),new rn(T,y)},rn.prototype.evaluate=function(){return this.value},rn.prototype.eachChild=function(){},rn.prototype.outputDefined=function(){return!0},rn.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Ya?["rgba"].concat(this.value.toArray()):this.value instanceof ts?this.value.serialize():this.value};var kn=function(f){this.name="ExpressionEvaluationError",this.message=f};kn.prototype.toJSON=function(){return this.message};var $n={string:mi,number:tn,boolean:Yn,object:Ea},Cn=function(f,d){this.type=f,this.args=d};Cn.parse=function(f,d){if(f.length<2)return d.error("Expected at least one argument.");var y,T=1,O=f[0];if(O==="array"){var N,Z;if(f.length>2){var q=f[1];if(typeof q!="string"||!(q in $n)||q==="object")return d.error('The item type argument of "array" must be one of string, number, boolean',1);N=$n[q],T++}else N=si;if(f.length>3){if(f[2]!==null&&(typeof f[2]!="number"||f[2]<0||f[2]!==Math.floor(f[2])))return d.error('The length argument to "array" must be a positive integer literal',2);Z=f[2],T++}y=Ha(N,Z)}else y=$n[O];for(var dt=[];T<f.length;T++){var Pt=d.parse(f[T],T,si);if(!Pt)return null;dt.push(Pt)}return new Cn(y,dt)},Cn.prototype.evaluate=function(f){for(var d=0;d<this.args.length;d++){var y=this.args[d].evaluate(f);if(!Qa(this.type,Ve(y)))return y;if(d===this.args.length-1)throw new kn("Expected value to be of type "+wa(this.type)+", but found "+wa(Ve(y))+" instead.")}return null},Cn.prototype.eachChild=function(f){this.args.forEach(f)},Cn.prototype.outputDefined=function(){return this.args.every(function(f){return f.outputDefined()})},Cn.prototype.serialize=function(){var f=this.type,d=[f.kind];if(f.kind==="array"){var y=f.itemType;if(y.kind==="string"||y.kind==="number"||y.kind==="boolean"){d.push(y.kind);var T=f.N;(typeof T=="number"||this.args.length>1)&&d.push(T)}}return d.concat(this.args.map(function(O){return O.serialize()}))};var Ki=function(f){this.type=vo,this.sections=f};Ki.parse=function(f,d){if(f.length<2)return d.error("Expected at least one argument.");var y=f[1];if(!Array.isArray(y)&&typeof y=="object")return d.error("First argument must be an image or text section.");for(var T=[],O=!1,N=1;N<=f.length-1;++N){var Z=f[N];if(O&&typeof Z=="object"&&!Array.isArray(Z)){O=!1;var q=null;if(Z["font-scale"]&&!(q=d.parse(Z["font-scale"],1,tn)))return null;var dt=null;if(Z["text-font"]&&!(dt=d.parse(Z["text-font"],1,Ha(mi))))return null;var Pt=null;if(Z["text-color"]&&!(Pt=d.parse(Z["text-color"],1,fi)))return null;var Gt=T[T.length-1];Gt.scale=q,Gt.font=dt,Gt.textColor=Pt}else{var Qt=d.parse(f[N],1,si);if(!Qt)return null;var ve=Qt.type.kind;if(ve!=="string"&&ve!=="value"&&ve!=="null"&&ve!=="resolvedImage")return d.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");O=!0,T.push({content:Qt,scale:null,font:null,textColor:null})}}return new Ki(T)},Ki.prototype.evaluate=function(f){return new ts(this.sections.map(function(d){var y=d.content.evaluate(f);return Ve(y)===Oa?new Nu("",y,null,null,null):new Nu(Mr(y),null,d.scale?d.scale.evaluate(f):null,d.font?d.font.evaluate(f).join(","):null,d.textColor?d.textColor.evaluate(f):null)}))},Ki.prototype.eachChild=function(f){for(var d=0,y=this.sections;d<y.length;d+=1){var T=y[d];f(T.content),T.scale&&f(T.scale),T.font&&f(T.font),T.textColor&&f(T.textColor)}},Ki.prototype.outputDefined=function(){return!1},Ki.prototype.serialize=function(){for(var f=["format"],d=0,y=this.sections;d<y.length;d+=1){var T=y[d];f.push(T.content.serialize());var O={};T.scale&&(O["font-scale"]=T.scale.serialize()),T.font&&(O["text-font"]=T.font.serialize()),T.textColor&&(O["text-color"]=T.textColor.serialize()),f.push(O)}return f};var Fa=function(f){this.type=Oa,this.input=f};Fa.parse=function(f,d){if(f.length!==2)return d.error("Expected two arguments.");var y=d.parse(f[1],1,mi);return y?new Fa(y):d.error("No image name provided.")},Fa.prototype.evaluate=function(f){var d=this.input.evaluate(f),y=bo.fromString(d);return y&&f.availableImages&&(y.available=f.availableImages.indexOf(d)>-1),y},Fa.prototype.eachChild=function(f){f(this.input)},Fa.prototype.outputDefined=function(){return!1},Fa.prototype.serialize=function(){return["image",this.input.serialize()]};var Ss={"to-boolean":Yn,"to-color":fi,"to-number":tn,"to-string":mi},ko=function(f,d){this.type=f,this.args=d};ko.parse=function(f,d){if(f.length<2)return d.error("Expected at least one argument.");var y=f[0];if((y==="to-boolean"||y==="to-string")&&f.length!==2)return d.error("Expected one argument.");for(var T=Ss[y],O=[],N=1;N<f.length;N++){var Z=d.parse(f[N],N,si);if(!Z)return null;O.push(Z)}return new ko(T,O)},ko.prototype.evaluate=function(f){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(f));if(this.type.kind==="color"){for(var d,y,T=0,O=this.args;T<O.length;T+=1){if(y=null,(d=O[T].evaluate(f))instanceof Ya)return d;if(typeof d=="string"){var N=f.parseColor(d);if(N)return N}else if(Array.isArray(d)&&!(y=d.length<3||d.length>4?"Invalid rbga value "+JSON.stringify(d)+": expected an array containing either three or four numeric values.":rr(d[0],d[1],d[2],d[3])))return new Ya(d[0]/255,d[1]/255,d[2]/255,d[3])}throw new kn(y||"Could not parse color from value '"+(typeof d=="string"?d:String(JSON.stringify(d)))+"'")}if(this.type.kind==="number"){for(var Z=null,q=0,dt=this.args;q<dt.length;q+=1){if((Z=dt[q].evaluate(f))===null)return 0;var Pt=Number(Z);if(!isNaN(Pt))return Pt}throw new kn("Could not convert "+JSON.stringify(Z)+" to number.")}return this.type.kind==="formatted"?ts.fromString(Mr(this.args[0].evaluate(f))):this.type.kind==="resolvedImage"?bo.fromString(Mr(this.args[0].evaluate(f))):Mr(this.args[0].evaluate(f))},ko.prototype.eachChild=function(f){this.args.forEach(f)},ko.prototype.outputDefined=function(){return this.args.every(function(f){return f.outputDefined()})},ko.prototype.serialize=function(){if(this.type.kind==="formatted")return new Ki([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Fa(this.args[0]).serialize();var f=["to-"+this.type.kind];return this.eachChild(function(d){f.push(d.serialize())}),f};var zo=["Unknown","Point","LineString","Polygon"],oo=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};oo.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},oo.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?zo[this.feature.type]:this.feature.type:null},oo.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},oo.prototype.canonicalID=function(){return this.canonical},oo.prototype.properties=function(){return this.feature&&this.feature.properties||{}},oo.prototype.parseColor=function(f){var d=this._parseColorCache[f];return d||(d=this._parseColorCache[f]=Ya.parse(f)),d};var Xo=function(f,d,y,T){this.name=f,this.type=d,this._evaluate=y,this.args=T};Xo.prototype.evaluate=function(f){return this._evaluate(f,this.args)},Xo.prototype.eachChild=function(f){this.args.forEach(f)},Xo.prototype.outputDefined=function(){return!1},Xo.prototype.serialize=function(){return[this.name].concat(this.args.map(function(f){return f.serialize()}))},Xo.parse=function(f,d){var y,T=f[0],O=Xo.definitions[T];if(!O)return d.error('Unknown expression "'+T+'". If you wanted a literal array, use ["literal", [...]].',0);for(var N=Array.isArray(O)?O[0]:O.type,Z=Array.isArray(O)?[[O[1],O[2]]]:O.overloads,q=Z.filter(function(da){var Rn=da[0];return!Array.isArray(Rn)||Rn.length===f.length-1}),dt=null,Pt=0,Gt=q;Pt<Gt.length;Pt+=1){var Qt=Gt[Pt],ve=Qt[0],Oe=Qt[1];dt=new xl(d.registry,d.path,null,d.scope);for(var er=[],sr=!1,Sr=1;Sr<f.length;Sr++){var gr=f[Sr],zr=Array.isArray(ve)?ve[Sr-1]:ve.type,Jr=dt.parse(gr,1+er.length,zr);if(!Jr){sr=!0;break}er.push(Jr)}if(!sr)if(Array.isArray(ve)&&ve.length!==er.length)dt.error("Expected "+ve.length+" arguments, but found "+er.length+" instead.");else{for(var ln=0;ln<er.length;ln++){var yn=Array.isArray(ve)?ve[ln]:ve.type,Pn=er[ln];dt.concat(ln+1).checkSubtype(yn,Pn.type)}if(dt.errors.length===0)return new Xo(T,N,Oe,er)}}if(q.length===1)(y=d.errors).push.apply(y,dt.errors);else{for(var oi=(q.length?q:Z).map(function(da){var Rn;return Rn=da[0],Array.isArray(Rn)?"("+Rn.map(wa).join(", ")+")":"("+wa(Rn.type)+"...)"}).join(" | "),Ti=[],oa=1;oa<f.length;oa++){var Vi=d.parse(f[oa],1+Ti.length);if(!Vi)return null;Ti.push(wa(Vi.type))}d.error("Expected arguments of type "+oi+", but found ("+Ti.join(", ")+") instead.")}return null},Xo.register=function(f,d){for(var y in Xo.definitions=d,d)f[y]=Xo};var iu=function(f,d,y){this.type=Ia,this.locale=y,this.caseSensitive=f,this.diacriticSensitive=d};function Ko(f,d){f[0]=Math.min(f[0],d[0]),f[1]=Math.min(f[1],d[1]),f[2]=Math.max(f[2],d[0]),f[3]=Math.max(f[3],d[1])}function Ul(f,d){return!(f[0]<=d[0]||f[2]>=d[2]||f[1]<=d[1]||f[3]>=d[3])}function $c(f,d){var y=(180+f[0])/360,T=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+f[1]*Math.PI/360)))/360,O=Math.pow(2,d.z);return[Math.round(y*O*8192),Math.round(T*O*8192)]}function Ku(f,d,y){return d[1]>f[1]!=y[1]>f[1]&&f[0]<(y[0]-d[0])*(f[1]-d[1])/(y[1]-d[1])+d[0]}function Ce(f,d){for(var y,T,O,N,Z,q,dt,Pt=!1,Gt=0,Qt=d.length;Gt<Qt;Gt++)for(var ve=d[Gt],Oe=0,er=ve.length;Oe<er-1;Oe++){if((N=(y=f)[0]-(T=ve[Oe])[0])*(dt=y[1]-(O=ve[Oe+1])[1])-(q=y[0]-O[0])*(Z=y[1]-T[1])==0&&N*q<=0&&Z*dt<=0)return!1;Ku(f,ve[Oe],ve[Oe+1])&&(Pt=!Pt)}return Pt}function Xe(f,d){for(var y=0;y<d.length;y++)if(Ce(f,d[y]))return!0;return!1}function Cr(f,d,y,T){var O=T[0]-y[0],N=T[1]-y[1],Z=(f[0]-y[0])*N-O*(f[1]-y[1]),q=(d[0]-y[0])*N-O*(d[1]-y[1]);return Z>0&&q<0||Z<0&&q>0}function on(f,d,y){for(var T=0,O=y;T<O.length;T+=1)for(var N=O[T],Z=0;Z<N.length-1;++Z)if((Qt=[(Gt=N[Z+1])[0]-(Pt=N[Z])[0],Gt[1]-Pt[1]])[0]*(ve=[(dt=d)[0]-(q=f)[0],dt[1]-q[1]])[1]-Qt[1]*ve[0]!=0&&Cr(q,dt,Pt,Gt)&&Cr(Pt,Gt,q,dt))return!0;var q,dt,Pt,Gt,Qt,ve;return!1}function li(f,d){for(var y=0;y<f.length;++y)if(!Ce(f[y],d))return!1;for(var T=0;T<f.length-1;++T)if(on(f[T],f[T+1],d))return!1;return!0}function Di(f,d){for(var y=0;y<d.length;y++)if(li(f,d[y]))return!0;return!1}function Ba(f,d,y){for(var T=[],O=0;O<f.length;O++){for(var N=[],Z=0;Z<f[O].length;Z++){var q=$c(f[O][Z],y);Ko(d,q),N.push(q)}T.push(N)}return T}function xs(f,d,y){for(var T=[],O=0;O<f.length;O++){var N=Ba(f[O],d,y);T.push(N)}return T}function es(f,d,y,T){if(f[0]<y[0]||f[0]>y[2]){var O=.5*T,N=f[0]-y[0]>O?-T:y[0]-f[0]>O?T:0;N===0&&(N=f[0]-y[2]>O?-T:y[2]-f[0]>O?T:0),f[0]+=N}Ko(d,f)}function ls(f,d,y,T){for(var O=8192*Math.pow(2,T.z),N=[8192*T.x,8192*T.y],Z=[],q=0,dt=f;q<dt.length;q+=1)for(var Pt=0,Gt=dt[q];Pt<Gt.length;Pt+=1){var Qt=Gt[Pt],ve=[Qt.x+N[0],Qt.y+N[1]];es(ve,d,y,O),Z.push(ve)}return Z}function zs(f,d,y,T){for(var O,N=8192*Math.pow(2,T.z),Z=[8192*T.x,8192*T.y],q=[],dt=0,Pt=f;dt<Pt.length;dt+=1){for(var Gt=[],Qt=0,ve=Pt[dt];Qt<ve.length;Qt+=1){var Oe=ve[Qt],er=[Oe.x+Z[0],Oe.y+Z[1]];Ko(d,er),Gt.push(er)}q.push(Gt)}if(d[2]-d[0]<=N/2){(O=d)[0]=O[1]=1/0,O[2]=O[3]=-1/0;for(var sr=0,Sr=q;sr<Sr.length;sr+=1)for(var gr=0,zr=Sr[sr];gr<zr.length;gr+=1)es(zr[gr],d,y,N)}return q}iu.parse=function(f,d){if(f.length!==2)return d.error("Expected one argument.");var y=f[1];if(typeof y!="object"||Array.isArray(y))return d.error("Collator options argument must be an object.");var T=d.parse(y["case-sensitive"]!==void 0&&y["case-sensitive"],1,Yn);if(!T)return null;var O=d.parse(y["diacritic-sensitive"]!==void 0&&y["diacritic-sensitive"],1,Yn);if(!O)return null;var N=null;return y.locale&&!(N=d.parse(y.locale,1,mi))?null:new iu(T,O,N)},iu.prototype.evaluate=function(f){return new No(this.caseSensitive.evaluate(f),this.diacriticSensitive.evaluate(f),this.locale?this.locale.evaluate(f):null)},iu.prototype.eachChild=function(f){f(this.caseSensitive),f(this.diacriticSensitive),this.locale&&f(this.locale)},iu.prototype.outputDefined=function(){return!1},iu.prototype.serialize=function(){var f={};return f["case-sensitive"]=this.caseSensitive.serialize(),f["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(f.locale=this.locale.serialize()),["collator",f]};var Qu=function(f,d){this.type=Yn,this.geojson=f,this.geometries=d};function Cu(f){if(f instanceof Xo&&(f.name==="get"&&f.args.length===1||f.name==="feature-state"||f.name==="has"&&f.args.length===1||f.name==="properties"||f.name==="geometry-type"||f.name==="id"||/^filter-/.test(f.name))||f instanceof Qu)return!1;var d=!0;return f.eachChild(function(y){d&&!Cu(y)&&(d=!1)}),d}function Ks(f){if(f instanceof Xo&&f.name==="feature-state")return!1;var d=!0;return f.eachChild(function(y){d&&!Ks(y)&&(d=!1)}),d}function Au(f,d){if(f instanceof Xo&&d.indexOf(f.name)>=0)return!1;var y=!0;return f.eachChild(function(T){y&&!Au(T,d)&&(y=!1)}),y}Qu.parse=function(f,d){if(f.length!==2)return d.error("'within' expression requires exactly one argument, but found "+(f.length-1)+" instead.");if(de(f[1])){var y=f[1];if(y.type==="FeatureCollection")for(var T=0;T<y.features.length;++T){var O=y.features[T].geometry.type;if(O==="Polygon"||O==="MultiPolygon")return new Qu(y,y.features[T].geometry)}else if(y.type==="Feature"){var N=y.geometry.type;if(N==="Polygon"||N==="MultiPolygon")return new Qu(y,y.geometry)}else if(y.type==="Polygon"||y.type==="MultiPolygon")return new Qu(y,y)}return d.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Qu.prototype.evaluate=function(f){if(f.geometry()!=null&&f.canonicalID()!=null){if(f.geometryType()==="Point")return function(d,y){var T=[1/0,1/0,-1/0,-1/0],O=[1/0,1/0,-1/0,-1/0],N=d.canonicalID();if(y.type==="Polygon"){var Z=Ba(y.coordinates,O,N),q=ls(d.geometry(),T,O,N);if(!Ul(T,O))return!1;for(var dt=0,Pt=q;dt<Pt.length;dt+=1)if(!Ce(Pt[dt],Z))return!1}if(y.type==="MultiPolygon"){var Gt=xs(y.coordinates,O,N),Qt=ls(d.geometry(),T,O,N);if(!Ul(T,O))return!1;for(var ve=0,Oe=Qt;ve<Oe.length;ve+=1)if(!Xe(Oe[ve],Gt))return!1}return!0}(f,this.geometries);if(f.geometryType()==="LineString")return function(d,y){var T=[1/0,1/0,-1/0,-1/0],O=[1/0,1/0,-1/0,-1/0],N=d.canonicalID();if(y.type==="Polygon"){var Z=Ba(y.coordinates,O,N),q=zs(d.geometry(),T,O,N);if(!Ul(T,O))return!1;for(var dt=0,Pt=q;dt<Pt.length;dt+=1)if(!li(Pt[dt],Z))return!1}if(y.type==="MultiPolygon"){var Gt=xs(y.coordinates,O,N),Qt=zs(d.geometry(),T,O,N);if(!Ul(T,O))return!1;for(var ve=0,Oe=Qt;ve<Oe.length;ve+=1)if(!Di(Oe[ve],Gt))return!1}return!0}(f,this.geometries)}return!1},Qu.prototype.eachChild=function(){},Qu.prototype.outputDefined=function(){return!0},Qu.prototype.serialize=function(){return["within",this.geojson]};var zu=function(f,d){this.type=d.type,this.name=f,this.boundExpression=d};zu.parse=function(f,d){if(f.length!==2||typeof f[1]!="string")return d.error("'var' expression requires exactly one string literal argument.");var y=f[1];return d.scope.has(y)?new zu(y,d.scope.get(y)):d.error('Unknown variable "'+y+'". Make sure "'+y+'" has been bound in an enclosing "let" expression before using it.',1)},zu.prototype.evaluate=function(f){return this.boundExpression.evaluate(f)},zu.prototype.eachChild=function(){},zu.prototype.outputDefined=function(){return!1},zu.prototype.serialize=function(){return["var",this.name]};var xl=function(f,d,y,T,O){d===void 0&&(d=[]),T===void 0&&(T=new bi),O===void 0&&(O=[]),this.registry=f,this.path=d,this.key=d.map(function(N){return"["+N+"]"}).join(""),this.scope=T,this.errors=O,this.expectedType=y};function Ju(f,d){for(var y,T=f.length-1,O=0,N=T,Z=0;O<=N;)if((y=f[Z=Math.floor((O+N)/2)])<=d){if(Z===T||d<f[Z+1])return Z;O=Z+1}else{if(!(y>d))throw new kn("Input is not a number.");N=Z-1}return 0}xl.prototype.parse=function(f,d,y,T,O){return O===void 0&&(O={}),d?this.concat(d,y,T)._parse(f,O):this._parse(f,O)},xl.prototype._parse=function(f,d){function y(Pt,Gt,Qt){return Qt==="assert"?new Cn(Gt,[Pt]):Qt==="coerce"?new ko(Gt,[Pt]):Pt}if(f!==null&&typeof f!="string"&&typeof f!="boolean"&&typeof f!="number"||(f=["literal",f]),Array.isArray(f)){if(f.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var T=f[0];if(typeof T!="string")return this.error("Expression name must be a string, but found "+typeof T+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var O=this.registry[T];if(O){var N=O.parse(f,this);if(!N)return null;if(this.expectedType){var Z=this.expectedType,q=N.type;if(Z.kind!=="string"&&Z.kind!=="number"&&Z.kind!=="boolean"&&Z.kind!=="object"&&Z.kind!=="array"||q.kind!=="value")if(Z.kind!=="color"&&Z.kind!=="formatted"&&Z.kind!=="resolvedImage"||q.kind!=="value"&&q.kind!=="string"){if(this.checkSubtype(Z,q))return null}else N=y(N,Z,d.typeAnnotation||"coerce");else N=y(N,Z,d.typeAnnotation||"assert")}if(!(N instanceof rn)&&N.type.kind!=="resolvedImage"&&function Pt(Gt){if(Gt instanceof zu)return Pt(Gt.boundExpression);if(Gt instanceof Xo&&Gt.name==="error"||Gt instanceof iu||Gt instanceof Qu)return!1;var Qt=Gt instanceof ko||Gt instanceof Cn,ve=!0;return Gt.eachChild(function(Oe){ve=Qt?ve&&Pt(Oe):ve&&Oe instanceof rn}),!!ve&&Cu(Gt)&&Au(Gt,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(N)){var dt=new oo;try{N=new rn(N.type,N.evaluate(dt))}catch(Pt){return this.error(Pt.message),null}}return N}return this.error('Unknown expression "'+T+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(f===void 0?"'undefined' value invalid. Use null instead.":typeof f=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof f+" instead.")},xl.prototype.concat=function(f,d,y){var T=typeof f=="number"?this.path.concat(f):this.path,O=y?this.scope.concat(y):this.scope;return new xl(this.registry,T,d||null,O,this.errors)},xl.prototype.error=function(f){for(var d=[],y=arguments.length-1;y-- >0;)d[y]=arguments[y+1];var T=""+this.key+d.map(function(O){return"["+O+"]"}).join("");this.errors.push(new On(T,f))},xl.prototype.checkSubtype=function(f,d){var y=Qa(f,d);return y&&this.error(y),y};var Uu=function(f,d,y){this.type=f,this.input=d,this.labels=[],this.outputs=[];for(var T=0,O=y;T<O.length;T+=1){var N=O[T],Z=N[1];this.labels.push(N[0]),this.outputs.push(Z)}};function Uo(f,d,y){return f*(1-y)+d*y}Uu.parse=function(f,d){if(f.length-1<4)return d.error("Expected at least 4 arguments, but found only "+(f.length-1)+".");if((f.length-1)%2!=0)return d.error("Expected an even number of arguments.");var y=d.parse(f[1],1,tn);if(!y)return null;var T=[],O=null;d.expectedType&&d.expectedType.kind!=="value"&&(O=d.expectedType);for(var N=1;N<f.length;N+=2){var Z=N===1?-1/0:f[N],q=f[N+1],dt=N,Pt=N+1;if(typeof Z!="number")return d.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',dt);if(T.length&&T[T.length-1][0]>=Z)return d.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',dt);var Gt=d.parse(q,Pt,O);if(!Gt)return null;O=O||Gt.type,T.push([Z,Gt])}return new Uu(O,y,T)},Uu.prototype.evaluate=function(f){var d=this.labels,y=this.outputs;if(d.length===1)return y[0].evaluate(f);var T=this.input.evaluate(f);if(T<=d[0])return y[0].evaluate(f);var O=d.length;return T>=d[O-1]?y[O-1].evaluate(f):y[Ju(d,T)].evaluate(f)},Uu.prototype.eachChild=function(f){f(this.input);for(var d=0,y=this.outputs;d<y.length;d+=1)f(y[d])},Uu.prototype.outputDefined=function(){return this.outputs.every(function(f){return f.outputDefined()})},Uu.prototype.serialize=function(){for(var f=["step",this.input.serialize()],d=0;d<this.labels.length;d++)d>0&&f.push(this.labels[d]),f.push(this.outputs[d].serialize());return f};var js=Object.freeze({__proto__:null,number:Uo,color:function(f,d,y){return new Ya(Uo(f.r,d.r,y),Uo(f.g,d.g,y),Uo(f.b,d.b,y),Uo(f.a,d.a,y))},array:function(f,d,y){return f.map(function(T,O){return Uo(T,d[O],y)})}}),Rc=6/29*3*(6/29),qc=Math.PI/180,Tu=180/Math.PI;function Zl(f){return f>.008856451679035631?Math.pow(f,1/3):f/Rc+4/29}function Cs(f){return f>6/29?f*f*f:Rc*(f-4/29)}function Zu(f){return 255*(f<=.0031308?12.92*f:1.055*Math.pow(f,1/2.4)-.055)}function ja(f){return(f/=255)<=.04045?f/12.92:Math.pow((f+.055)/1.055,2.4)}function Dc(f){var d=ja(f.r),y=ja(f.g),T=ja(f.b),O=Zl((.4124564*d+.3575761*y+.1804375*T)/.95047),N=Zl((.2126729*d+.7151522*y+.072175*T)/1);return{l:116*N-16,a:500*(O-N),b:200*(N-Zl((.0193339*d+.119192*y+.9503041*T)/1.08883)),alpha:f.a}}function D(f){var d=(f.l+16)/116,y=isNaN(f.a)?d:d+f.a/500,T=isNaN(f.b)?d:d-f.b/200;return d=1*Cs(d),y=.95047*Cs(y),T=1.08883*Cs(T),new Ya(Zu(3.2404542*y-1.5371385*d-.4985314*T),Zu(-.969266*y+1.8760108*d+.041556*T),Zu(.0556434*y-.2040259*d+1.0572252*T),f.alpha)}function X(f,d,y){var T=d-f;return f+y*(T>180||T<-180?T-360*Math.round(T/360):T)}var Mt={forward:Dc,reverse:D,interpolate:function(f,d,y){return{l:Uo(f.l,d.l,y),a:Uo(f.a,d.a,y),b:Uo(f.b,d.b,y),alpha:Uo(f.alpha,d.alpha,y)}}},it={forward:function(f){var d=Dc(f),y=d.l,T=d.a,O=d.b,N=Math.atan2(O,T)*Tu;return{h:N<0?N+360:N,c:Math.sqrt(T*T+O*O),l:y,alpha:f.a}},reverse:function(f){var d=f.h*qc,y=f.c;return D({l:f.l,a:Math.cos(d)*y,b:Math.sin(d)*y,alpha:f.alpha})},interpolate:function(f,d,y){return{h:X(f.h,d.h,y),c:Uo(f.c,d.c,y),l:Uo(f.l,d.l,y),alpha:Uo(f.alpha,d.alpha,y)}}},fe=Object.freeze({__proto__:null,lab:Mt,hcl:it}),He=function(f,d,y,T,O){this.type=f,this.operator=d,this.interpolation=y,this.input=T,this.labels=[],this.outputs=[];for(var N=0,Z=O;N<Z.length;N+=1){var q=Z[N],dt=q[1];this.labels.push(q[0]),this.outputs.push(dt)}};function br(f,d,y,T){var O=T-y,N=f-y;return O===0?0:d===1?N/O:(Math.pow(d,N)-1)/(Math.pow(d,O)-1)}He.interpolationFactor=function(f,d,y,T){var O=0;if(f.name==="exponential")O=br(d,f.base,y,T);else if(f.name==="linear")O=br(d,1,y,T);else if(f.name==="cubic-bezier"){var N=f.controlPoints;O=new K(N[0],N[1],N[2],N[3]).solve(br(d,1,y,T))}return O},He.parse=function(f,d){var y=f[0],T=f[1],O=f[2],N=f.slice(3);if(!Array.isArray(T)||T.length===0)return d.error("Expected an interpolation type expression.",1);if(T[0]==="linear")T={name:"linear"};else if(T[0]==="exponential"){var Z=T[1];if(typeof Z!="number")return d.error("Exponential interpolation requires a numeric base.",1,1);T={name:"exponential",base:Z}}else{if(T[0]!=="cubic-bezier")return d.error("Unknown interpolation type "+String(T[0]),1,0);var q=T.slice(1);if(q.length!==4||q.some(function(Sr){return typeof Sr!="number"||Sr<0||Sr>1}))return d.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);T={name:"cubic-bezier",controlPoints:q}}if(f.length-1<4)return d.error("Expected at least 4 arguments, but found only "+(f.length-1)+".");if((f.length-1)%2!=0)return d.error("Expected an even number of arguments.");if(!(O=d.parse(O,2,tn)))return null;var dt=[],Pt=null;y==="interpolate-hcl"||y==="interpolate-lab"?Pt=fi:d.expectedType&&d.expectedType.kind!=="value"&&(Pt=d.expectedType);for(var Gt=0;Gt<N.length;Gt+=2){var Qt=N[Gt],ve=N[Gt+1],Oe=Gt+3,er=Gt+4;if(typeof Qt!="number")return d.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Oe);if(dt.length&&dt[dt.length-1][0]>=Qt)return d.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Oe);var sr=d.parse(ve,er,Pt);if(!sr)return null;Pt=Pt||sr.type,dt.push([Qt,sr])}return Pt.kind==="number"||Pt.kind==="color"||Pt.kind==="array"&&Pt.itemType.kind==="number"&&typeof Pt.N=="number"?new He(Pt,y,T,O,dt):d.error("Type "+wa(Pt)+" is not interpolatable.")},He.prototype.evaluate=function(f){var d=this.labels,y=this.outputs;if(d.length===1)return y[0].evaluate(f);var T=this.input.evaluate(f);if(T<=d[0])return y[0].evaluate(f);var O=d.length;if(T>=d[O-1])return y[O-1].evaluate(f);var N=Ju(d,T),Z=He.interpolationFactor(this.interpolation,T,d[N],d[N+1]),q=y[N].evaluate(f),dt=y[N+1].evaluate(f);return this.operator==="interpolate"?js[this.type.kind.toLowerCase()](q,dt,Z):this.operator==="interpolate-hcl"?it.reverse(it.interpolate(it.forward(q),it.forward(dt),Z)):Mt.reverse(Mt.interpolate(Mt.forward(q),Mt.forward(dt),Z))},He.prototype.eachChild=function(f){f(this.input);for(var d=0,y=this.outputs;d<y.length;d+=1)f(y[d])},He.prototype.outputDefined=function(){return this.outputs.every(function(f){return f.outputDefined()})},He.prototype.serialize=function(){var f;f=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var d=[this.operator,f,this.input.serialize()],y=0;y<this.labels.length;y++)d.push(this.labels[y],this.outputs[y].serialize());return d};var Ur=function(f,d){this.type=f,this.args=d};Ur.parse=function(f,d){if(f.length<2)return d.error("Expectected at least one argument.");var y=null,T=d.expectedType;T&&T.kind!=="value"&&(y=T);for(var O=[],N=0,Z=f.slice(1);N<Z.length;N+=1){var q=d.parse(Z[N],1+O.length,y,void 0,{typeAnnotation:"omit"});if(!q)return null;y=y||q.type,O.push(q)}var dt=T&&O.some(function(Pt){return Qa(T,Pt.type)});return new Ur(dt?si:y,O)},Ur.prototype.evaluate=function(f){for(var d,y=null,T=0,O=0,N=this.args;O<N.length&&(T++,(y=N[O].evaluate(f))&&y instanceof bo&&!y.available&&(d||(d=y.name),y=null,T===this.args.length&&(y=d)),y===null);O+=1);return y},Ur.prototype.eachChild=function(f){this.args.forEach(f)},Ur.prototype.outputDefined=function(){return this.args.every(function(f){return f.outputDefined()})},Ur.prototype.serialize=function(){var f=["coalesce"];return this.eachChild(function(d){f.push(d.serialize())}),f};var Nr=function(f,d){this.type=d.type,this.bindings=[].concat(f),this.result=d};Nr.prototype.evaluate=function(f){return this.result.evaluate(f)},Nr.prototype.eachChild=function(f){for(var d=0,y=this.bindings;d<y.length;d+=1)f(y[d][1]);f(this.result)},Nr.parse=function(f,d){if(f.length<4)return d.error("Expected at least 3 arguments, but found "+(f.length-1)+" instead.");for(var y=[],T=1;T<f.length-1;T+=2){var O=f[T];if(typeof O!="string")return d.error("Expected string, but found "+typeof O+" instead.",T);if(/[^a-zA-Z0-9_]/.test(O))return d.error("Variable names must contain only alphanumeric characters or '_'.",T);var N=d.parse(f[T+1],T+1);if(!N)return null;y.push([O,N])}var Z=d.parse(f[f.length-1],f.length-1,d.expectedType,y);return Z?new Nr(y,Z):null},Nr.prototype.outputDefined=function(){return this.result.outputDefined()},Nr.prototype.serialize=function(){for(var f=["let"],d=0,y=this.bindings;d<y.length;d+=1){var T=y[d];f.push(T[0],T[1].serialize())}return f.push(this.result.serialize()),f};var An=function(f,d,y){this.type=f,this.index=d,this.input=y};An.parse=function(f,d){if(f.length!==3)return d.error("Expected 2 arguments, but found "+(f.length-1)+" instead.");var y=d.parse(f[1],1,tn),T=d.parse(f[2],2,Ha(d.expectedType||si));return y&&T?new An(T.type.itemType,y,T):null},An.prototype.evaluate=function(f){var d=this.index.evaluate(f),y=this.input.evaluate(f);if(d<0)throw new kn("Array index out of bounds: "+d+" < 0.");if(d>=y.length)throw new kn("Array index out of bounds: "+d+" > "+(y.length-1)+".");if(d!==Math.floor(d))throw new kn("Array index must be an integer, but found "+d+" instead.");return y[d]},An.prototype.eachChild=function(f){f(this.index),f(this.input)},An.prototype.outputDefined=function(){return!1},An.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Hn=function(f,d){this.type=Yn,this.needle=f,this.haystack=d};Hn.parse=function(f,d){if(f.length!==3)return d.error("Expected 2 arguments, but found "+(f.length-1)+" instead.");var y=d.parse(f[1],1,si),T=d.parse(f[2],2,si);return y&&T?Wo(y.type,[Yn,mi,tn,Mi,si])?new Hn(y,T):d.error("Expected first argument to be of type boolean, string, number or null, but found "+wa(y.type)+" instead"):null},Hn.prototype.evaluate=function(f){var d=this.needle.evaluate(f),y=this.haystack.evaluate(f);if(!y)return!1;if(!yo(d,["boolean","string","number","null"]))throw new kn("Expected first argument to be of type boolean, string, number or null, but found "+wa(Ve(d))+" instead.");if(!yo(y,["string","array"]))throw new kn("Expected second argument to be of type array or string, but found "+wa(Ve(y))+" instead.");return y.indexOf(d)>=0},Hn.prototype.eachChild=function(f){f(this.needle),f(this.haystack)},Hn.prototype.outputDefined=function(){return!0},Hn.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Ji=function(f,d,y){this.type=tn,this.needle=f,this.haystack=d,this.fromIndex=y};Ji.parse=function(f,d){if(f.length<=2||f.length>=5)return d.error("Expected 3 or 4 arguments, but found "+(f.length-1)+" instead.");var y=d.parse(f[1],1,si),T=d.parse(f[2],2,si);if(!y||!T)return null;if(!Wo(y.type,[Yn,mi,tn,Mi,si]))return d.error("Expected first argument to be of type boolean, string, number or null, but found "+wa(y.type)+" instead");if(f.length===4){var O=d.parse(f[3],3,tn);return O?new Ji(y,T,O):null}return new Ji(y,T)},Ji.prototype.evaluate=function(f){var d=this.needle.evaluate(f),y=this.haystack.evaluate(f);if(!yo(d,["boolean","string","number","null"]))throw new kn("Expected first argument to be of type boolean, string, number or null, but found "+wa(Ve(d))+" instead.");if(!yo(y,["string","array"]))throw new kn("Expected second argument to be of type array or string, but found "+wa(Ve(y))+" instead.");if(this.fromIndex){var T=this.fromIndex.evaluate(f);return y.indexOf(d,T)}return y.indexOf(d)},Ji.prototype.eachChild=function(f){f(this.needle),f(this.haystack),this.fromIndex&&f(this.fromIndex)},Ji.prototype.outputDefined=function(){return!1},Ji.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var f=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),f]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ka=function(f,d,y,T,O,N){this.inputType=f,this.type=d,this.input=y,this.cases=T,this.outputs=O,this.otherwise=N};ka.parse=function(f,d){if(f.length<5)return d.error("Expected at least 4 arguments, but found only "+(f.length-1)+".");if(f.length%2!=1)return d.error("Expected an even number of arguments.");var y,T;d.expectedType&&d.expectedType.kind!=="value"&&(T=d.expectedType);for(var O={},N=[],Z=2;Z<f.length-1;Z+=2){var q=f[Z],dt=f[Z+1];Array.isArray(q)||(q=[q]);var Pt=d.concat(Z);if(q.length===0)return Pt.error("Expected at least one branch label.");for(var Gt=0,Qt=q;Gt<Qt.length;Gt+=1){var ve=Qt[Gt];if(typeof ve!="number"&&typeof ve!="string")return Pt.error("Branch labels must be numbers or strings.");if(typeof ve=="number"&&Math.abs(ve)>Number.MAX_SAFE_INTEGER)return Pt.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof ve=="number"&&Math.floor(ve)!==ve)return Pt.error("Numeric branch labels must be integer values.");if(y){if(Pt.checkSubtype(y,Ve(ve)))return null}else y=Ve(ve);if(O[String(ve)]!==void 0)return Pt.error("Branch labels must be unique.");O[String(ve)]=N.length}var Oe=d.parse(dt,Z,T);if(!Oe)return null;T=T||Oe.type,N.push(Oe)}var er=d.parse(f[1],1,si);if(!er)return null;var sr=d.parse(f[f.length-1],f.length-1,T);return sr?er.type.kind!=="value"&&d.concat(1).checkSubtype(y,er.type)?null:new ka(y,T,er,O,N,sr):null},ka.prototype.evaluate=function(f){var d=this.input.evaluate(f);return(Ve(d)===this.inputType&&this.outputs[this.cases[d]]||this.otherwise).evaluate(f)},ka.prototype.eachChild=function(f){f(this.input),this.outputs.forEach(f),f(this.otherwise)},ka.prototype.outputDefined=function(){return this.outputs.every(function(f){return f.outputDefined()})&&this.otherwise.outputDefined()},ka.prototype.serialize=function(){for(var f=this,d=["match",this.input.serialize()],y=[],T={},O=0,N=Object.keys(this.cases).sort();O<N.length;O+=1){var Z=N[O];(Qt=T[this.cases[Z]])===void 0?(T[this.cases[Z]]=y.length,y.push([this.cases[Z],[Z]])):y[Qt][1].push(Z)}for(var q=function(Oe){return f.inputType.kind==="number"?Number(Oe):Oe},dt=0,Pt=y;dt<Pt.length;dt+=1){var Gt=Pt[dt],Qt=Gt[0],ve=Gt[1];d.push(ve.length===1?q(ve[0]):ve.map(q)),d.push(this.outputs[outputIndex$1].serialize())}return d.push(this.otherwise.serialize()),d};var Sa=function(f,d,y){this.type=f,this.branches=d,this.otherwise=y};Sa.parse=function(f,d){if(f.length<4)return d.error("Expected at least 3 arguments, but found only "+(f.length-1)+".");if(f.length%2!=0)return d.error("Expected an odd number of arguments.");var y;d.expectedType&&d.expectedType.kind!=="value"&&(y=d.expectedType);for(var T=[],O=1;O<f.length-1;O+=2){var N=d.parse(f[O],O,Yn);if(!N)return null;var Z=d.parse(f[O+1],O+1,y);if(!Z)return null;T.push([N,Z]),y=y||Z.type}var q=d.parse(f[f.length-1],f.length-1,y);return q?new Sa(y,T,q):null},Sa.prototype.evaluate=function(f){for(var d=0,y=this.branches;d<y.length;d+=1){var T=y[d],O=T[1];if(T[0].evaluate(f))return O.evaluate(f)}return this.otherwise.evaluate(f)},Sa.prototype.eachChild=function(f){for(var d=0,y=this.branches;d<y.length;d+=1){var T=y[d],O=T[1];f(T[0]),f(O)}f(this.otherwise)},Sa.prototype.outputDefined=function(){return this.branches.every(function(f){return f[1].outputDefined()})&&this.otherwise.outputDefined()},Sa.prototype.serialize=function(){var f=["case"];return this.eachChild(function(d){f.push(d.serialize())}),f};var eo=function(f,d,y,T){this.type=f,this.input=d,this.beginIndex=y,this.endIndex=T};function Eo(f,d){return f==="=="||f==="!="?d.kind==="boolean"||d.kind==="string"||d.kind==="number"||d.kind==="null"||d.kind==="value":d.kind==="string"||d.kind==="number"||d.kind==="value"}function So(f,d,y,T){return T.compare(d,y)===0}function ro(f,d,y){var T=f!=="=="&&f!=="!=";return function(){function O(N,Z,q){this.type=Yn,this.lhs=N,this.rhs=Z,this.collator=q,this.hasUntypedArgument=N.type.kind==="value"||Z.type.kind==="value"}return O.parse=function(N,Z){if(N.length!==3&&N.length!==4)return Z.error("Expected two or three arguments.");var q=N[0],dt=Z.parse(N[1],1,si);if(!dt)return null;if(!Eo(q,dt.type))return Z.concat(1).error('"'+q+`" comparisons are not supported for type '`+wa(dt.type)+"'.");var Pt=Z.parse(N[2],2,si);if(!Pt)return null;if(!Eo(q,Pt.type))return Z.concat(2).error('"'+q+`" comparisons are not supported for type '`+wa(Pt.type)+"'.");if(dt.type.kind!==Pt.type.kind&&dt.type.kind!=="value"&&Pt.type.kind!=="value")return Z.error("Cannot compare types '"+wa(dt.type)+"' and '"+wa(Pt.type)+"'.");T&&(dt.type.kind==="value"&&Pt.type.kind!=="value"?dt=new Cn(Pt.type,[dt]):dt.type.kind!=="value"&&Pt.type.kind==="value"&&(Pt=new Cn(dt.type,[Pt])));var Gt=null;if(N.length===4){if(dt.type.kind!=="string"&&Pt.type.kind!=="string"&&dt.type.kind!=="value"&&Pt.type.kind!=="value")return Z.error("Cannot use collator to compare non-string types.");if(!(Gt=Z.parse(N[3],3,Ia)))return null}return new O(dt,Pt,Gt)},O.prototype.evaluate=function(N){var Z=this.lhs.evaluate(N),q=this.rhs.evaluate(N);if(T&&this.hasUntypedArgument){var dt=Ve(Z),Pt=Ve(q);if(dt.kind!==Pt.kind||dt.kind!=="string"&&dt.kind!=="number")throw new kn('Expected arguments for "'+f+'" to be (string, string) or (number, number), but found ('+dt.kind+", "+Pt.kind+") instead.")}if(this.collator&&!T&&this.hasUntypedArgument){var Gt=Ve(Z),Qt=Ve(q);if(Gt.kind!=="string"||Qt.kind!=="string")return d(N,Z,q)}return this.collator?y(N,Z,q,this.collator.evaluate(N)):d(N,Z,q)},O.prototype.eachChild=function(N){N(this.lhs),N(this.rhs),this.collator&&N(this.collator)},O.prototype.outputDefined=function(){return!0},O.prototype.serialize=function(){var N=[f];return this.eachChild(function(Z){N.push(Z.serialize())}),N},O}()}eo.parse=function(f,d){if(f.length<=2||f.length>=5)return d.error("Expected 3 or 4 arguments, but found "+(f.length-1)+" instead.");var y=d.parse(f[1],1,si),T=d.parse(f[2],2,tn);if(!y||!T)return null;if(!Wo(y.type,[Ha(si),mi,si]))return d.error("Expected first argument to be of type array or string, but found "+wa(y.type)+" instead");if(f.length===4){var O=d.parse(f[3],3,tn);return O?new eo(y.type,y,T,O):null}return new eo(y.type,y,T)},eo.prototype.evaluate=function(f){var d=this.input.evaluate(f),y=this.beginIndex.evaluate(f);if(!yo(d,["string","array"]))throw new kn("Expected first argument to be of type array or string, but found "+wa(Ve(d))+" instead.");if(this.endIndex){var T=this.endIndex.evaluate(f);return d.slice(y,T)}return d.slice(y)},eo.prototype.eachChild=function(f){f(this.input),f(this.beginIndex),this.endIndex&&f(this.endIndex)},eo.prototype.outputDefined=function(){return!1},eo.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var f=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),f]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var pu=ro("==",function(f,d,y){return d===y},So),Il=ro("!=",function(f,d,y){return d!==y},function(f,d,y,T){return!So(0,d,y,T)}),bl=ro("<",function(f,d,y){return d<y},function(f,d,y,T){return T.compare(d,y)<0}),Vl=ro(">",function(f,d,y){return d>y},function(f,d,y,T){return T.compare(d,y)>0}),ul=ro("<=",function(f,d,y){return d<=y},function(f,d,y,T){return T.compare(d,y)<=0}),Gl=ro(">=",function(f,d,y){return d>=y},function(f,d,y,T){return T.compare(d,y)>=0}),Vu=function(f,d,y,T,O){this.type=mi,this.number=f,this.locale=d,this.currency=y,this.minFractionDigits=T,this.maxFractionDigits=O};Vu.parse=function(f,d){if(f.length!==3)return d.error("Expected two arguments.");var y=d.parse(f[1],1,tn);if(!y)return null;var T=f[2];if(typeof T!="object"||Array.isArray(T))return d.error("NumberFormat options argument must be an object.");var O=null;if(T.locale&&!(O=d.parse(T.locale,1,mi)))return null;var N=null;if(T.currency&&!(N=d.parse(T.currency,1,mi)))return null;var Z=null;if(T["min-fraction-digits"]&&!(Z=d.parse(T["min-fraction-digits"],1,tn)))return null;var q=null;return T["max-fraction-digits"]&&!(q=d.parse(T["max-fraction-digits"],1,tn))?null:new Vu(y,O,N,Z,q)},Vu.prototype.evaluate=function(f){return new Intl.NumberFormat(this.locale?this.locale.evaluate(f):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(f):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(f):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(f):void 0}).format(this.number.evaluate(f))},Vu.prototype.eachChild=function(f){f(this.number),this.locale&&f(this.locale),this.currency&&f(this.currency),this.minFractionDigits&&f(this.minFractionDigits),this.maxFractionDigits&&f(this.maxFractionDigits)},Vu.prototype.outputDefined=function(){return!1},Vu.prototype.serialize=function(){var f={};return this.locale&&(f.locale=this.locale.serialize()),this.currency&&(f.currency=this.currency.serialize()),this.minFractionDigits&&(f["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(f["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),f]};var cs=function(f){this.type=tn,this.input=f};cs.parse=function(f,d){if(f.length!==2)return d.error("Expected 1 argument, but found "+(f.length-1)+" instead.");var y=d.parse(f[1],1);return y?y.type.kind!=="array"&&y.type.kind!=="string"&&y.type.kind!=="value"?d.error("Expected argument of type string or array, but found "+wa(y.type)+" instead."):new cs(y):null},cs.prototype.evaluate=function(f){var d=this.input.evaluate(f);if(typeof d=="string"||Array.isArray(d))return d.length;throw new kn("Expected value to be of type string or array, but found "+wa(Ve(d))+" instead.")},cs.prototype.eachChild=function(f){f(this.input)},cs.prototype.outputDefined=function(){return!1},cs.prototype.serialize=function(){var f=["length"];return this.eachChild(function(d){f.push(d.serialize())}),f};var pe={"==":pu,"!=":Il,">":Vl,"<":bl,">=":Gl,"<=":ul,array:Cn,at:An,boolean:Cn,case:Sa,coalesce:Ur,collator:iu,format:Ki,image:Fa,in:Hn,"index-of":Ji,interpolate:He,"interpolate-hcl":He,"interpolate-lab":He,length:cs,let:Nr,literal:rn,match:ka,number:Cn,"number-format":Vu,object:Cn,slice:eo,step:Uu,string:Cn,"to-boolean":ko,"to-color":ko,"to-number":ko,"to-string":ko,var:zu,within:Qu};function ar(f,d){var y=d[0],T=d[1],O=d[2],N=d[3];y=y.evaluate(f),T=T.evaluate(f),O=O.evaluate(f);var Z=N?N.evaluate(f):1,q=rr(y,T,O,Z);if(q)throw new kn(q);return new Ya(y/255*Z,T/255*Z,O/255*Z,Z)}function Fr(f,d){return f in d}function Xr(f,d){var y=d[f];return y===void 0?null:y}function _n(f){return{type:f}}function ki(f){return{result:"success",value:f}}function ia(f){return{result:"error",value:f}}function $a(f){return f["property-type"]==="data-driven"||f["property-type"]==="cross-faded-data-driven"}function du(f){return!!f.expression&&f.expression.parameters.indexOf("zoom")>-1}function au(f){return!!f.expression&&f.expression.interpolated}function Xa(f){return f instanceof Number?"number":f instanceof String?"string":f instanceof Boolean?"boolean":Array.isArray(f)?"array":f===null?"null":typeof f}function Gu(f){return typeof f=="object"&&f!==null&&!Array.isArray(f)}function Vh(f){return f}function Hl(f,d,y){return f!==void 0?f:d!==void 0?d:y!==void 0?y:void 0}function fd(f,d,y,T,O){return Hl(typeof y===O?T[y]:void 0,f.default,d.default)}function Bc(f,d,y){if(Xa(y)!=="number")return Hl(f.default,d.default);var T=f.stops.length;if(T===1||y<=f.stops[0][0])return f.stops[0][1];if(y>=f.stops[T-1][0])return f.stops[T-1][1];var O=Ju(f.stops.map(function(N){return N[0]}),y);return f.stops[O][1]}function kl(f,d,y){var T=f.base!==void 0?f.base:1;if(Xa(y)!=="number")return Hl(f.default,d.default);var O=f.stops.length;if(O===1||y<=f.stops[0][0])return f.stops[0][1];if(y>=f.stops[O-1][0])return f.stops[O-1][1];var N=Ju(f.stops.map(function(Qt){return Qt[0]}),y),Z=function(Qt,ve,Oe,er){var sr=er-Oe,Sr=Qt-Oe;return sr===0?0:ve===1?Sr/sr:(Math.pow(ve,Sr)-1)/(Math.pow(ve,sr)-1)}(y,T,f.stops[N][0],f.stops[N+1][0]),q=f.stops[N][1],dt=f.stops[N+1][1],Pt=js[d.type]||Vh;if(f.colorSpace&&f.colorSpace!=="rgb"){var Gt=fe[f.colorSpace];Pt=function(Qt,ve){return Gt.reverse(Gt.interpolate(Gt.forward(Qt),Gt.forward(ve),Z))}}return typeof q.evaluate=="function"?{evaluate:function(){for(var Qt=[],ve=arguments.length;ve--;)Qt[ve]=arguments[ve];var Oe=q.evaluate.apply(void 0,Qt),er=dt.evaluate.apply(void 0,Qt);if(Oe!==void 0&&er!==void 0)return Pt(Oe,er,Z)}}:Pt(q,dt,Z)}function Ap(f,d,y){return d.type==="color"?y=Ya.parse(y):d.type==="formatted"?y=ts.fromString(y.toString()):d.type==="resolvedImage"?y=bo.fromString(y.toString()):Xa(y)===d.type||d.type==="enum"&&d.values[y]||(y=void 0),Hl(y,f.default,d.default)}Xo.register(pe,{error:[{kind:"error"},[mi],function(f,d){throw new kn(d[0].evaluate(f))}],typeof:[mi,[si],function(f,d){return wa(Ve(d[0].evaluate(f)))}],"to-rgba":[Ha(tn,4),[fi],function(f,d){return d[0].evaluate(f).toArray()}],rgb:[fi,[tn,tn,tn],ar],rgba:[fi,[tn,tn,tn,tn],ar],has:{type:Yn,overloads:[[[mi],function(f,d){return Fr(d[0].evaluate(f),f.properties())}],[[mi,Ea],function(f,d){var y=d[1];return Fr(d[0].evaluate(f),y.evaluate(f))}]]},get:{type:si,overloads:[[[mi],function(f,d){return Xr(d[0].evaluate(f),f.properties())}],[[mi,Ea],function(f,d){var y=d[1];return Xr(d[0].evaluate(f),y.evaluate(f))}]]},"feature-state":[si,[mi],function(f,d){return Xr(d[0].evaluate(f),f.featureState||{})}],properties:[Ea,[],function(f){return f.properties()}],"geometry-type":[mi,[],function(f){return f.geometryType()}],id:[si,[],function(f){return f.id()}],zoom:[tn,[],function(f){return f.globals.zoom}],"heatmap-density":[tn,[],function(f){return f.globals.heatmapDensity||0}],"line-progress":[tn,[],function(f){return f.globals.lineProgress||0}],accumulated:[si,[],function(f){return f.globals.accumulated===void 0?null:f.globals.accumulated}],"+":[tn,_n(tn),function(f,d){for(var y=0,T=0,O=d;T<O.length;T+=1)y+=O[T].evaluate(f);return y}],"*":[tn,_n(tn),function(f,d){for(var y=1,T=0,O=d;T<O.length;T+=1)y*=O[T].evaluate(f);return y}],"-":{type:tn,overloads:[[[tn,tn],function(f,d){var y=d[1];return d[0].evaluate(f)-y.evaluate(f)}],[[tn],function(f,d){return-d[0].evaluate(f)}]]},"/":[tn,[tn,tn],function(f,d){var y=d[1];return d[0].evaluate(f)/y.evaluate(f)}],"%":[tn,[tn,tn],function(f,d){var y=d[1];return d[0].evaluate(f)%y.evaluate(f)}],ln2:[tn,[],function(){return Math.LN2}],pi:[tn,[],function(){return Math.PI}],e:[tn,[],function(){return Math.E}],"^":[tn,[tn,tn],function(f,d){var y=d[1];return Math.pow(d[0].evaluate(f),y.evaluate(f))}],sqrt:[tn,[tn],function(f,d){return Math.sqrt(d[0].evaluate(f))}],log10:[tn,[tn],function(f,d){return Math.log(d[0].evaluate(f))/Math.LN10}],ln:[tn,[tn],function(f,d){return Math.log(d[0].evaluate(f))}],log2:[tn,[tn],function(f,d){return Math.log(d[0].evaluate(f))/Math.LN2}],sin:[tn,[tn],function(f,d){return Math.sin(d[0].evaluate(f))}],cos:[tn,[tn],function(f,d){return Math.cos(d[0].evaluate(f))}],tan:[tn,[tn],function(f,d){return Math.tan(d[0].evaluate(f))}],asin:[tn,[tn],function(f,d){return Math.asin(d[0].evaluate(f))}],acos:[tn,[tn],function(f,d){return Math.acos(d[0].evaluate(f))}],atan:[tn,[tn],function(f,d){return Math.atan(d[0].evaluate(f))}],min:[tn,_n(tn),function(f,d){return Math.min.apply(Math,d.map(function(y){return y.evaluate(f)}))}],max:[tn,_n(tn),function(f,d){return Math.max.apply(Math,d.map(function(y){return y.evaluate(f)}))}],abs:[tn,[tn],function(f,d){return Math.abs(d[0].evaluate(f))}],round:[tn,[tn],function(f,d){var y=d[0].evaluate(f);return y<0?-Math.round(-y):Math.round(y)}],floor:[tn,[tn],function(f,d){return Math.floor(d[0].evaluate(f))}],ceil:[tn,[tn],function(f,d){return Math.ceil(d[0].evaluate(f))}],"filter-==":[Yn,[mi,si],function(f,d){var y=d[0],T=d[1];return f.properties()[y.value]===T.value}],"filter-id-==":[Yn,[si],function(f,d){var y=d[0];return f.id()===y.value}],"filter-type-==":[Yn,[mi],function(f,d){var y=d[0];return f.geometryType()===y.value}],"filter-<":[Yn,[mi,si],function(f,d){var y=d[0],T=d[1],O=f.properties()[y.value],N=T.value;return typeof O==typeof N&&O<N}],"filter-id-<":[Yn,[si],function(f,d){var y=d[0],T=f.id(),O=y.value;return typeof T==typeof O&&T<O}],"filter->":[Yn,[mi,si],function(f,d){var y=d[0],T=d[1],O=f.properties()[y.value],N=T.value;return typeof O==typeof N&&O>N}],"filter-id->":[Yn,[si],function(f,d){var y=d[0],T=f.id(),O=y.value;return typeof T==typeof O&&T>O}],"filter-<=":[Yn,[mi,si],function(f,d){var y=d[0],T=d[1],O=f.properties()[y.value],N=T.value;return typeof O==typeof N&&O<=N}],"filter-id-<=":[Yn,[si],function(f,d){var y=d[0],T=f.id(),O=y.value;return typeof T==typeof O&&T<=O}],"filter->=":[Yn,[mi,si],function(f,d){var y=d[0],T=d[1],O=f.properties()[y.value],N=T.value;return typeof O==typeof N&&O>=N}],"filter-id->=":[Yn,[si],function(f,d){var y=d[0],T=f.id(),O=y.value;return typeof T==typeof O&&T>=O}],"filter-has":[Yn,[si],function(f,d){return d[0].value in f.properties()}],"filter-has-id":[Yn,[],function(f){return f.id()!==null&&f.id()!==void 0}],"filter-type-in":[Yn,[Ha(mi)],function(f,d){return d[0].value.indexOf(f.geometryType())>=0}],"filter-id-in":[Yn,[Ha(si)],function(f,d){return d[0].value.indexOf(f.id())>=0}],"filter-in-small":[Yn,[mi,Ha(si)],function(f,d){var y=d[0];return d[1].value.indexOf(f.properties()[y.value])>=0}],"filter-in-large":[Yn,[mi,Ha(si)],function(f,d){var y=d[0],T=d[1];return function(O,N,Z,q){for(;Z<=q;){var dt=Z+q>>1;if(N[dt]===O)return!0;N[dt]>O?q=dt-1:Z=dt+1}return!1}(f.properties()[y.value],T.value,0,T.value.length-1)}],all:{type:Yn,overloads:[[[Yn,Yn],function(f,d){var y=d[1];return d[0].evaluate(f)&&y.evaluate(f)}],[_n(Yn),function(f,d){for(var y=0,T=d;y<T.length;y+=1)if(!T[y].evaluate(f))return!1;return!0}]]},any:{type:Yn,overloads:[[[Yn,Yn],function(f,d){var y=d[1];return d[0].evaluate(f)||y.evaluate(f)}],[_n(Yn),function(f,d){for(var y=0,T=d;y<T.length;y+=1)if(T[y].evaluate(f))return!0;return!1}]]},"!":[Yn,[Yn],function(f,d){return!d[0].evaluate(f)}],"is-supported-script":[Yn,[mi],function(f,d){var y=f.globals&&f.globals.isSupportedScript;return!y||y(d[0].evaluate(f))}],upcase:[mi,[mi],function(f,d){return d[0].evaluate(f).toUpperCase()}],downcase:[mi,[mi],function(f,d){return d[0].evaluate(f).toLowerCase()}],concat:[mi,_n(si),function(f,d){return d.map(function(y){return Mr(y.evaluate(f))}).join("")}],"resolved-locale":[mi,[Ia],function(f,d){return d[0].evaluate(f).resolvedLocale()}]});var Ef=function(f,d){this.expression=f,this._warningHistory={},this._evaluator=new oo,this._defaultValue=d?function(y){return y.type==="color"&&Gu(y.default)?new Ya(0,0,0,0):y.type==="color"?Ya.parse(y.default)||null:y.default===void 0?null:y.default}(d):null,this._enumValues=d&&d.type==="enum"?d.values:null};function Kc(f){return Array.isArray(f)&&f.length>0&&typeof f[0]=="string"&&f[0]in pe}function wf(f,d){var y=new xl(pe,[],d?function(O){var N={color:fi,string:mi,number:tn,enum:mi,boolean:Yn,formatted:vo,resolvedImage:Oa};return O.type==="array"?Ha(N[O.value]||si,O.length):N[O.type]}(d):void 0),T=y.parse(f,void 0,void 0,void 0,d&&d.type==="string"?{typeAnnotation:"coerce"}:void 0);return T?ki(new Ef(T,d)):ia(y.errors)}Ef.prototype.evaluateWithoutErrorHandling=function(f,d,y,T,O,N){return this._evaluator.globals=f,this._evaluator.feature=d,this._evaluator.featureState=y,this._evaluator.canonical=T,this._evaluator.availableImages=O||null,this._evaluator.formattedSection=N,this.expression.evaluate(this._evaluator)},Ef.prototype.evaluate=function(f,d,y,T,O,N){this._evaluator.globals=f,this._evaluator.feature=d||null,this._evaluator.featureState=y||null,this._evaluator.canonical=T,this._evaluator.availableImages=O||null,this._evaluator.formattedSection=N||null;try{var Z=this.expression.evaluate(this._evaluator);if(Z==null||typeof Z=="number"&&Z!=Z)return this._defaultValue;if(this._enumValues&&!(Z in this._enumValues))throw new kn("Expected value to be one of "+Object.keys(this._enumValues).map(function(q){return JSON.stringify(q)}).join(", ")+", but found "+JSON.stringify(Z)+" instead.");return Z}catch(q){return this._warningHistory[q.message]||(this._warningHistory[q.message]=!0,typeof console!="undefined"&&console.warn(q.message)),this._defaultValue}};var Sf=function(f,d){this.kind=f,this._styleExpression=d,this.isStateDependent=f!=="constant"&&!Ks(d.expression)};Sf.prototype.evaluateWithoutErrorHandling=function(f,d,y,T,O,N){return this._styleExpression.evaluateWithoutErrorHandling(f,d,y,T,O,N)},Sf.prototype.evaluate=function(f,d,y,T,O,N){return this._styleExpression.evaluate(f,d,y,T,O,N)};var Cf=function(f,d,y,T){this.kind=f,this.zoomStops=y,this._styleExpression=d,this.isStateDependent=f!=="camera"&&!Ks(d.expression),this.interpolationType=T};function ll(f,d){if((f=wf(f,d)).result==="error")return f;var y=f.value.expression,T=Cu(y);if(!T&&!$a(d))return ia([new On("","data expressions not supported")]);var O=Au(y,["zoom"]);if(!O&&!du(d))return ia([new On("","zoom expressions not supported")]);var N=function Z(q){var dt=null;if(q instanceof Nr)dt=Z(q.result);else if(q instanceof Ur)for(var Pt=0,Gt=q.args;Pt<Gt.length&&!(dt=Z(Gt[Pt]));Pt+=1);else(q instanceof Uu||q instanceof He)&&q.input instanceof Xo&&q.input.name==="zoom"&&(dt=q);return dt instanceof On||q.eachChild(function(Qt){var ve=Z(Qt);ve instanceof On?dt=ve:!dt&&ve?dt=new On("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):dt&&ve&&dt!==ve&&(dt=new On("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),dt}(y);return N||O?N instanceof On?ia([N]):N instanceof He&&!au(d)?ia([new On("",'"interpolate" expressions cannot be used with this property')]):ki(N?new Cf(T?"camera":"composite",f.value,N.labels,N instanceof He?N.interpolation:void 0):new Sf(T?"constant":"source",f.value)):ia([new On("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}Cf.prototype.evaluateWithoutErrorHandling=function(f,d,y,T,O,N){return this._styleExpression.evaluateWithoutErrorHandling(f,d,y,T,O,N)},Cf.prototype.evaluate=function(f,d,y,T,O,N){return this._styleExpression.evaluate(f,d,y,T,O,N)},Cf.prototype.interpolationFactor=function(f,d,y){return this.interpolationType?He.interpolationFactor(this.interpolationType,f,d,y):0};var Nc=function(f,d){this._parameters=f,this._specification=d,In(this,function y(T,O){var N,Z,q,dt=O.type==="color",Pt=T.stops&&typeof T.stops[0][0]=="object",Gt=Pt||!(Pt||T.property!==void 0),Qt=T.type||(au(O)?"exponential":"interval");if(dt&&((T=In({},T)).stops&&(T.stops=T.stops.map(function(Vi){return[Vi[0],Ya.parse(Vi[1])]})),T.default=Ya.parse(T.default?T.default:O.default)),T.colorSpace&&T.colorSpace!=="rgb"&&!fe[T.colorSpace])throw new Error("Unknown color space: "+T.colorSpace);if(Qt==="exponential")N=kl;else if(Qt==="interval")N=Bc;else if(Qt==="categorical"){N=fd,Z=Object.create(null);for(var ve=0,Oe=T.stops;ve<Oe.length;ve+=1){var er=Oe[ve];Z[er[0]]=er[1]}q=typeof T.stops[0][0]}else{if(Qt!=="identity")throw new Error('Unknown function type "'+Qt+'"');N=Ap}if(Pt){for(var sr={},Sr=[],gr=0;gr<T.stops.length;gr++){var zr=T.stops[gr],Jr=zr[0].zoom;sr[Jr]===void 0&&(sr[Jr]={zoom:Jr,type:T.type,property:T.property,default:T.default,stops:[]},Sr.push(Jr)),sr[Jr].stops.push([zr[0].value,zr[1]])}for(var ln=[],yn=0,Pn=Sr;yn<Pn.length;yn+=1){var oi=Pn[yn];ln.push([sr[oi].zoom,y(sr[oi],O)])}var Ti={name:"linear"};return{kind:"composite",interpolationType:Ti,interpolationFactor:He.interpolationFactor.bind(void 0,Ti),zoomStops:ln.map(function(Vi){return Vi[0]}),evaluate:function(Vi,da){var Rn=Vi.zoom;return kl({stops:ln,base:T.base},O,Rn).evaluate(Rn,da)}}}if(Gt){var oa=Qt==="exponential"?{name:"exponential",base:T.base!==void 0?T.base:1}:null;return{kind:"camera",interpolationType:oa,interpolationFactor:He.interpolationFactor.bind(void 0,oa),zoomStops:T.stops.map(function(Vi){return Vi[0]}),evaluate:function(Vi){return N(T,O,Vi.zoom,Z,q)}}}return{kind:"source",evaluate:function(Vi,da){var Rn=da&&da.properties?da.properties[T.property]:void 0;return Rn===void 0?Hl(T.default,O.default):N(T,O,Rn,Z,q)}}}(this._parameters,this._specification))};function nc(f){var d=f.key,y=f.value,T=f.valueSpec||{},O=f.objectElementValidators||{},N=f.style,Z=f.styleSpec,q=[],dt=Xa(y);if(dt!=="object")return[new ir(d,y,"object expected, "+dt+" found")];for(var Pt in y){var Gt=Pt.split(".")[0],Qt=T[Gt]||T["*"],ve=void 0;if(O[Gt])ve=O[Gt];else if(T[Gt])ve=qa;else if(O["*"])ve=O["*"];else{if(!T["*"]){q.push(new ir(d,y[Pt],'unknown property "'+Pt+'"'));continue}ve=qa}q=q.concat(ve({key:(d&&d+".")+Pt,value:y[Pt],valueSpec:Qt,style:N,styleSpec:Z,object:y,objectKey:Pt},y))}for(var Oe in T)O[Oe]||T[Oe].required&&T[Oe].default===void 0&&y[Oe]===void 0&&q.push(new ir(d,y,'missing required property "'+Oe+'"'));return q}function Lo(f){var d=f.value,y=f.valueSpec,T=f.style,O=f.styleSpec,N=f.key,Z=f.arrayElementValidator||qa;if(Xa(d)!=="array")return[new ir(N,d,"array expected, "+Xa(d)+" found")];if(y.length&&d.length!==y.length)return[new ir(N,d,"array length "+y.length+" expected, length "+d.length+" found")];if(y["min-length"]&&d.length<y["min-length"])return[new ir(N,d,"array length at least "+y["min-length"]+" expected, length "+d.length+" found")];var q={type:y.value,values:y.values};O.$version<7&&(q.function=y.function),Xa(y.value)==="object"&&(q=y.value);for(var dt=[],Pt=0;Pt<d.length;Pt++)dt=dt.concat(Z({array:d,arrayIndex:Pt,value:d[Pt],valueSpec:q,style:T,styleSpec:O,key:N+"["+Pt+"]"}));return dt}function zc(f){var d=f.key,y=f.value,T=f.valueSpec,O=Xa(y);return O==="number"&&y!=y&&(O="NaN"),O!=="number"?[new ir(d,y,"number expected, "+O+" found")]:"minimum"in T&&y<T.minimum?[new ir(d,y,y+" is less than the minimum value "+T.minimum)]:"maximum"in T&&y>T.maximum?[new ir(d,y,y+" is greater than the maximum value "+T.maximum)]:[]}function vc(f){var d,y,T,O=f.valueSpec,N=nn(f.value.type),Z={},q=N!=="categorical"&&f.value.property===void 0,dt=!q,Pt=Xa(f.value.stops)==="array"&&Xa(f.value.stops[0])==="array"&&Xa(f.value.stops[0][0])==="object",Gt=nc({key:f.key,value:f.value,valueSpec:f.styleSpec.function,style:f.style,styleSpec:f.styleSpec,objectElementValidators:{stops:function(Oe){if(N==="identity")return[new ir(Oe.key,Oe.value,'identity function may not have a "stops" property')];var er=[],sr=Oe.value;return er=er.concat(Lo({key:Oe.key,value:sr,valueSpec:Oe.valueSpec,style:Oe.style,styleSpec:Oe.styleSpec,arrayElementValidator:Qt})),Xa(sr)==="array"&&sr.length===0&&er.push(new ir(Oe.key,sr,"array must have at least one stop")),er},default:function(Oe){return qa({key:Oe.key,value:Oe.value,valueSpec:O,style:Oe.style,styleSpec:Oe.styleSpec})}}});return N==="identity"&&q&&Gt.push(new ir(f.key,f.value,'missing required property "property"')),N==="identity"||f.value.stops||Gt.push(new ir(f.key,f.value,'missing required property "stops"')),N==="exponential"&&f.valueSpec.expression&&!au(f.valueSpec)&&Gt.push(new ir(f.key,f.value,"exponential functions not supported")),f.styleSpec.$version>=8&&(dt&&!$a(f.valueSpec)?Gt.push(new ir(f.key,f.value,"property functions not supported")):q&&!du(f.valueSpec)&&Gt.push(new ir(f.key,f.value,"zoom functions not supported"))),N!=="categorical"&&!Pt||f.value.property!==void 0||Gt.push(new ir(f.key,f.value,'"property" property is required')),Gt;function Qt(Oe){var er=[],sr=Oe.value,Sr=Oe.key;if(Xa(sr)!=="array")return[new ir(Sr,sr,"array expected, "+Xa(sr)+" found")];if(sr.length!==2)return[new ir(Sr,sr,"array length 2 expected, length "+sr.length+" found")];if(Pt){if(Xa(sr[0])!=="object")return[new ir(Sr,sr,"object expected, "+Xa(sr[0])+" found")];if(sr[0].zoom===void 0)return[new ir(Sr,sr,"object stop key must have zoom")];if(sr[0].value===void 0)return[new ir(Sr,sr,"object stop key must have value")];if(T&&T>nn(sr[0].zoom))return[new ir(Sr,sr[0].zoom,"stop zoom values must appear in ascending order")];nn(sr[0].zoom)!==T&&(T=nn(sr[0].zoom),y=void 0,Z={}),er=er.concat(nc({key:Sr+"[0]",value:sr[0],valueSpec:{zoom:{}},style:Oe.style,styleSpec:Oe.styleSpec,objectElementValidators:{zoom:zc,value:ve}}))}else er=er.concat(ve({key:Sr+"[0]",value:sr[0],valueSpec:{},style:Oe.style,styleSpec:Oe.styleSpec},sr));return Kc(Yr(sr[1]))?er.concat([new ir(Sr+"[1]",sr[1],"expressions are not allowed in function stops.")]):er.concat(qa({key:Sr+"[1]",value:sr[1],valueSpec:O,style:Oe.style,styleSpec:Oe.styleSpec}))}function ve(Oe,er){var sr=Xa(Oe.value),Sr=nn(Oe.value),gr=Oe.value!==null?Oe.value:er;if(d){if(sr!==d)return[new ir(Oe.key,gr,sr+" stop domain type must match previous stop domain type "+d)]}else d=sr;if(sr!=="number"&&sr!=="string"&&sr!=="boolean")return[new ir(Oe.key,gr,"stop domain value must be a number, string, or boolean")];if(sr!=="number"&&N!=="categorical"){var zr="number expected, "+sr+" found";return $a(O)&&N===void 0&&(zr+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ir(Oe.key,gr,zr)]}return N!=="categorical"||sr!=="number"||isFinite(Sr)&&Math.floor(Sr)===Sr?N!=="categorical"&&sr==="number"&&y!==void 0&&Sr<y?[new ir(Oe.key,gr,"stop domain values must appear in ascending order")]:(y=Sr,N==="categorical"&&Sr in Z?[new ir(Oe.key,gr,"stop domain values must be unique")]:(Z[Sr]=!0,[])):[new ir(Oe.key,gr,"integer expected, found "+Sr)]}}function Qc(f){var d=(f.expressionContext==="property"?ll:wf)(Yr(f.value),f.valueSpec);if(d.result==="error")return d.value.map(function(T){return new ir(""+f.key+T.key,f.value,T.message)});var y=d.value.expression||d.value._styleExpression.expression;if(f.expressionContext==="property"&&f.propertyKey==="text-font"&&!y.outputDefined())return[new ir(f.key,f.value,'Invalid data expression for "'+f.propertyKey+'". Output values must be contained as literals within the expression.')];if(f.expressionContext==="property"&&f.propertyType==="layout"&&!Ks(y))return[new ir(f.key,f.value,'"feature-state" data expressions are not supported with layout properties.')];if(f.expressionContext==="filter"&&!Ks(y))return[new ir(f.key,f.value,'"feature-state" data expressions are not supported with filters.')];if(f.expressionContext&&f.expressionContext.indexOf("cluster")===0){if(!Au(y,["zoom","feature-state"]))return[new ir(f.key,f.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(f.expressionContext==="cluster-initial"&&!Cu(y))return[new ir(f.key,f.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function ch(f){var d=f.key,y=f.value,T=f.valueSpec,O=[];return Array.isArray(T.values)?T.values.indexOf(nn(y))===-1&&O.push(new ir(d,y,"expected one of ["+T.values.join(", ")+"], "+JSON.stringify(y)+" found")):Object.keys(T.values).indexOf(nn(y))===-1&&O.push(new ir(d,y,"expected one of ["+Object.keys(T.values).join(", ")+"], "+JSON.stringify(y)+" found")),O}function fh(f){if(f===!0||f===!1)return!0;if(!Array.isArray(f)||f.length===0)return!1;switch(f[0]){case"has":return f.length>=2&&f[1]!=="$id"&&f[1]!=="$type";case"in":return f.length>=3&&(typeof f[1]!="string"||Array.isArray(f[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return f.length!==3||Array.isArray(f[1])||Array.isArray(f[2]);case"any":case"all":for(var d=0,y=f.slice(1);d<y.length;d+=1){var T=y[d];if(!fh(T)&&typeof T!="boolean")return!1}return!0;default:return!0}}Nc.deserialize=function(f){return new Nc(f._parameters,f._specification)},Nc.serialize=function(f){return{_parameters:f._parameters,_specification:f._specification}};var Tp={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Gh(f){if(f==null)return{filter:function(){return!0},needGeometry:!1};fh(f)||(f=Gf(f));var d=wf(f,Tp);if(d.result==="error")throw new Error(d.value.map(function(y){return y.key+": "+y.message}).join(", "));return{filter:function(y,T,O){return d.value.evaluate(y,T,{},O)},needGeometry:function y(T){if(!Array.isArray(T))return!1;if(T[0]==="within")return!0;for(var O=1;O<T.length;O++)if(y(T[O]))return!0;return!1}(f)}}function Mp(f,d){return f<d?-1:f>d?1:0}function Gf(f){if(!f)return!0;var d,y=f[0];return f.length<=1?y!=="any":y==="=="?Ll(f[1],f[2],"=="):y==="!="?Fn(Ll(f[1],f[2],"==")):y==="<"||y===">"||y==="<="||y===">="?Ll(f[1],f[2],y):y==="any"?(d=f.slice(1),["any"].concat(d.map(Gf))):y==="all"?["all"].concat(f.slice(1).map(Gf)):y==="none"?["all"].concat(f.slice(1).map(Gf).map(Fn)):y==="in"?hh(f[1],f.slice(2)):y==="!in"?Fn(hh(f[1],f.slice(2))):y==="has"?Oi(f[1]):y==="!has"?Fn(Oi(f[1])):y!=="within"||f}function Ll(f,d,y){switch(f){case"$type":return["filter-type-"+y,d];case"$id":return["filter-id-"+y,d];default:return["filter-"+y,f,d]}}function hh(f,d){if(d.length===0)return!1;switch(f){case"$type":return["filter-type-in",["literal",d]];case"$id":return["filter-id-in",["literal",d]];default:return d.length>200&&!d.some(function(y){return typeof y!=typeof d[0]})?["filter-in-large",f,["literal",d.sort(Mp)]]:["filter-in-small",f,["literal",d]]}}function Oi(f){switch(f){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",f]}}function Fn(f){return["!",f]}function ph(f){return fh(Yr(f.value))?Qc(In({},f,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function d(y){var T=y.value,O=y.key;if(Xa(T)!=="array")return[new ir(O,T,"array expected, "+Xa(T)+" found")];var N,Z=y.styleSpec,q=[];if(T.length<1)return[new ir(O,T,"filter array must have at least 1 element")];switch(q=q.concat(ch({key:O+"[0]",value:T[0],valueSpec:Z.filter_operator,style:y.style,styleSpec:y.styleSpec})),nn(T[0])){case"<":case"<=":case">":case">=":T.length>=2&&nn(T[1])==="$type"&&q.push(new ir(O,T,'"$type" cannot be use with operator "'+T[0]+'"'));case"==":case"!=":T.length!==3&&q.push(new ir(O,T,'filter array for operator "'+T[0]+'" must have 3 elements'));case"in":case"!in":T.length>=2&&(N=Xa(T[1]))!=="string"&&q.push(new ir(O+"[1]",T[1],"string expected, "+N+" found"));for(var dt=2;dt<T.length;dt++)N=Xa(T[dt]),nn(T[1])==="$type"?q=q.concat(ch({key:O+"["+dt+"]",value:T[dt],valueSpec:Z.geometry_type,style:y.style,styleSpec:y.styleSpec})):N!=="string"&&N!=="number"&&N!=="boolean"&&q.push(new ir(O+"["+dt+"]",T[dt],"string, number, or boolean expected, "+N+" found"));break;case"any":case"all":case"none":for(var Pt=1;Pt<T.length;Pt++)q=q.concat(d({key:O+"["+Pt+"]",value:T[Pt],style:y.style,styleSpec:y.styleSpec}));break;case"has":case"!has":N=Xa(T[1]),T.length!==2?q.push(new ir(O,T,'filter array for "'+T[0]+'" operator must have 2 elements')):N!=="string"&&q.push(new ir(O+"[1]",T[1],"string expected, "+N+" found"));break;case"within":N=Xa(T[1]),T.length!==2?q.push(new ir(O,T,'filter array for "'+T[0]+'" operator must have 2 elements')):N!=="object"&&q.push(new ir(O+"[1]",T[1],"object expected, "+N+" found"))}return q}(f)}function Ip(f,d){var y=f.key,T=f.style,O=f.styleSpec,N=f.value,Z=f.objectKey,q=O[d+"_"+f.layerType];if(!q)return[];var dt=Z.match(/^(.*)-transition$/);if(d==="paint"&&dt&&q[dt[1]]&&q[dt[1]].transition)return qa({key:y,value:N,valueSpec:O.transition,style:T,styleSpec:O});var Pt,Gt=f.valueSpec||q[Z];if(!Gt)return[new ir(y,N,'unknown property "'+Z+'"')];if(Xa(N)==="string"&&$a(Gt)&&!Gt.tokens&&(Pt=/^{([^}]+)}$/.exec(N)))return[new ir(y,N,'"'+Z+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(Pt[1])+" }`.")];var Qt=[];return f.layerType==="symbol"&&(Z==="text-field"&&T&&!T.glyphs&&Qt.push(new ir(y,N,'use of "text-field" requires a style "glyphs" property')),Z==="text-font"&&Gu(Yr(N))&&nn(N.type)==="identity"&&Qt.push(new ir(y,N,'"text-font" does not support identity functions'))),Qt.concat(qa({key:f.key,value:N,valueSpec:Gt,style:T,styleSpec:O,expressionContext:"property",propertyType:d,propertyKey:Z}))}function hd(f){return Ip(f,"paint")}function Hf(f){return Ip(f,"layout")}function so(f){var d=[],y=f.value,T=f.key,O=f.style,N=f.styleSpec;y.type||y.ref||d.push(new ir(T,y,'either "type" or "ref" is required'));var Z,q=nn(y.type),dt=nn(y.ref);if(y.id)for(var Pt=nn(y.id),Gt=0;Gt<f.arrayIndex;Gt++){var Qt=O.layers[Gt];nn(Qt.id)===Pt&&d.push(new ir(T,y.id,'duplicate layer id "'+y.id+'", previously used at line '+Qt.id.__line__))}if("ref"in y)["type","source","source-layer","filter","layout"].forEach(function(er){er in y&&d.push(new ir(T,y[er],'"'+er+'" is prohibited for ref layers'))}),O.layers.forEach(function(er){nn(er.id)===dt&&(Z=er)}),Z?Z.ref?d.push(new ir(T,y.ref,"ref cannot reference another ref layer")):q=nn(Z.type):d.push(new ir(T,y.ref,'ref layer "'+dt+'" not found'));else if(q!=="background")if(y.source){var ve=O.sources&&O.sources[y.source],Oe=ve&&nn(ve.type);ve?Oe==="vector"&&q==="raster"?d.push(new ir(T,y.source,'layer "'+y.id+'" requires a raster source')):Oe==="raster"&&q!=="raster"?d.push(new ir(T,y.source,'layer "'+y.id+'" requires a vector source')):Oe!=="vector"||y["source-layer"]?Oe==="raster-dem"&&q!=="hillshade"?d.push(new ir(T,y.source,"raster-dem source can only be used with layer type 'hillshade'.")):q!=="line"||!y.paint||!y.paint["line-gradient"]||Oe==="geojson"&&ve.lineMetrics||d.push(new ir(T,y,'layer "'+y.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):d.push(new ir(T,y,'layer "'+y.id+'" must specify a "source-layer"')):d.push(new ir(T,y.source,'source "'+y.source+'" not found'))}else d.push(new ir(T,y,'missing required property "source"'));return d=d.concat(nc({key:T,value:y,valueSpec:N.layer,style:f.style,styleSpec:f.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return qa({key:T+".type",value:y.type,valueSpec:N.layer.type,style:f.style,styleSpec:f.styleSpec,object:y,objectKey:"type"})},filter:ph,layout:function(er){return nc({layer:y,key:er.key,value:er.value,style:er.style,styleSpec:er.styleSpec,objectElementValidators:{"*":function(sr){return Hf(In({layerType:q},sr))}}})},paint:function(er){return nc({layer:y,key:er.key,value:er.value,style:er.style,styleSpec:er.styleSpec,objectElementValidators:{"*":function(sr){return hd(In({layerType:q},sr))}}})}}}))}function Mu(f){var d=f.value,y=f.key,T=Xa(d);return T!=="string"?[new ir(y,d,"string expected, "+T+" found")]:[]}var Po={promoteId:function(f){var d=f.key,y=f.value;if(Xa(y)==="string")return Mu({key:d,value:y});var T=[];for(var O in y)T.push.apply(T,Mu({key:d+"."+O,value:y[O]}));return T}};function jl(f){var d=f.value,y=f.key,T=f.styleSpec,O=f.style;if(!d.type)return[new ir(y,d,'"type" is required')];var N,Z=nn(d.type);switch(Z){case"vector":case"raster":case"raster-dem":return nc({key:y,value:d,valueSpec:T["source_"+Z.replace("-","_")],style:f.style,styleSpec:T,objectElementValidators:Po});case"geojson":if(N=nc({key:y,value:d,valueSpec:T.source_geojson,style:O,styleSpec:T,objectElementValidators:Po}),d.cluster)for(var q in d.clusterProperties){var dt=d.clusterProperties[q],Pt=dt[0],Gt=typeof Pt=="string"?[Pt,["accumulated"],["get",q]]:Pt;N.push.apply(N,Qc({key:y+"."+q+".map",value:dt[1],expressionContext:"cluster-map"})),N.push.apply(N,Qc({key:y+"."+q+".reduce",value:Gt,expressionContext:"cluster-reduce"}))}return N;case"video":return nc({key:y,value:d,valueSpec:T.source_video,style:O,styleSpec:T});case"image":return nc({key:y,value:d,valueSpec:T.source_image,style:O,styleSpec:T});case"canvas":return[new ir(y,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ch({key:y+".type",value:d.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:O,styleSpec:T})}}function Af(f){var d=f.value,y=f.styleSpec,T=y.light,O=f.style,N=[],Z=Xa(d);if(d===void 0)return N;if(Z!=="object")return N.concat([new ir("light",d,"object expected, "+Z+" found")]);for(var q in d){var dt=q.match(/^(.*)-transition$/);N=N.concat(dt&&T[dt[1]]&&T[dt[1]].transition?qa({key:q,value:d[q],valueSpec:y.transition,style:O,styleSpec:y}):T[q]?qa({key:q,value:d[q],valueSpec:T[q],style:O,styleSpec:y}):[new ir(q,d[q],'unknown property "'+q+'"')])}return N}var El={"*":function(){return[]},array:Lo,boolean:function(f){var d=f.value,y=f.key,T=Xa(d);return T!=="boolean"?[new ir(y,d,"boolean expected, "+T+" found")]:[]},number:zc,color:function(f){var d=f.key,y=f.value,T=Xa(y);return T!=="string"?[new ir(d,y,"color expected, "+T+" found")]:Va(y)===null?[new ir(d,y,'color expected, "'+y+'" found')]:[]},constants:Hr,enum:ch,filter:ph,function:vc,layer:so,object:nc,source:jl,light:Af,string:Mu,formatted:function(f){return Mu(f).length===0?[]:Qc(f)},resolvedImage:function(f){return Mu(f).length===0?[]:Qc(f)}};function qa(f){var d=f.value,y=f.valueSpec,T=f.styleSpec;return y.expression&&Gu(nn(d))?vc(f):y.expression&&Kc(Yr(d))?Qc(f):y.type&&El[y.type]?El[y.type](f):nc(In({},f,{valueSpec:y.type?T[y.type]:y}))}function ds(f){var d=f.value,y=f.key,T=Mu(f);return T.length||(d.indexOf("{fontstack}")===-1&&T.push(new ir(y,d,'"glyphs" url must include a "{fontstack}" token')),d.indexOf("{range}")===-1&&T.push(new ir(y,d,'"glyphs" url must include a "{range}" token'))),T}function no(f,d){d===void 0&&(d=we);var y=[];return y=y.concat(qa({key:"",value:f,valueSpec:d.$root,styleSpec:d,style:f,objectElementValidators:{glyphs:ds,"*":function(){return[]}}})),f.constants&&(y=y.concat(Hr({key:"constants",value:f.constants,style:f,styleSpec:d}))),dh(y)}function dh(f){return[].concat(f).sort(function(d,y){return d.line-y.line})}function gc(f){return function(){for(var d=[],y=arguments.length;y--;)d[y]=arguments[y];return dh(f.apply(this,d))}}no.source=gc(jl),no.light=gc(Af),no.layer=gc(so),no.filter=gc(ph),no.paintProperty=gc(hd),no.layoutProperty=gc(Hf);var kp=no,uv=kp.light,Qi=kp.paintProperty,vh=kp.layoutProperty;function gh(f,d){var y=!1;if(d&&d.length)for(var T=0,O=d;T<O.length;T+=1)f.fire(new fr(new Error(O[T].message))),y=!0;return y}var Tf=ou;function ou(f,d,y){var T=this.cells=[];if(f instanceof ArrayBuffer){this.arrayBuffer=f;var O=new Int32Array(this.arrayBuffer);f=O[0],this.d=(d=O[1])+2*(y=O[2]);for(var N=0;N<this.d*this.d;N++){var Z=O[3+N],q=O[3+N+1];T.push(Z===q?null:O.subarray(Z,q))}var dt=O[3+T.length+1];this.keys=O.subarray(O[3+T.length],dt),this.bboxes=O.subarray(dt),this.insert=this._insertReadonly}else{this.d=d+2*y;for(var Pt=0;Pt<this.d*this.d;Pt++)T.push([]);this.keys=[],this.bboxes=[]}this.n=d,this.extent=f,this.padding=y,this.scale=d/f,this.uid=0;var Gt=y/d*f;this.min=-Gt,this.max=f+Gt}ou.prototype.insert=function(f,d,y,T,O){this._forEachCell(d,y,T,O,this._insertCell,this.uid++),this.keys.push(f),this.bboxes.push(d),this.bboxes.push(y),this.bboxes.push(T),this.bboxes.push(O)},ou.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},ou.prototype._insertCell=function(f,d,y,T,O,N){this.cells[O].push(N)},ou.prototype.query=function(f,d,y,T,O){var N=this.min,Z=this.max;if(f<=N&&d<=N&&Z<=y&&Z<=T&&!O)return Array.prototype.slice.call(this.keys);var q=[];return this._forEachCell(f,d,y,T,this._queryCell,q,{},O),q},ou.prototype._queryCell=function(f,d,y,T,O,N,Z,q){var dt=this.cells[O];if(dt!==null)for(var Pt=this.keys,Gt=this.bboxes,Qt=0;Qt<dt.length;Qt++){var ve=dt[Qt];if(Z[ve]===void 0){var Oe=4*ve;(q?q(Gt[Oe+0],Gt[Oe+1],Gt[Oe+2],Gt[Oe+3]):f<=Gt[Oe+2]&&d<=Gt[Oe+3]&&y>=Gt[Oe+0]&&T>=Gt[Oe+1])?(Z[ve]=!0,N.push(Pt[ve])):Z[ve]=!1}}},ou.prototype._forEachCell=function(f,d,y,T,O,N,Z,q){for(var dt=this._convertToCellCoord(f),Pt=this._convertToCellCoord(d),Gt=this._convertToCellCoord(y),Qt=this._convertToCellCoord(T),ve=dt;ve<=Gt;ve++)for(var Oe=Pt;Oe<=Qt;Oe++){var er=this.d*Oe+ve;if((!q||q(this._convertFromCellCoord(ve),this._convertFromCellCoord(Oe),this._convertFromCellCoord(ve+1),this._convertFromCellCoord(Oe+1)))&&O.call(this,f,d,y,T,er,N,Z,q))return}},ou.prototype._convertFromCellCoord=function(f){return(f-this.padding)/this.scale},ou.prototype._convertToCellCoord=function(f){return Math.max(0,Math.min(this.d-1,Math.floor(f*this.scale)+this.padding))},ou.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var f=this.cells,d=3+this.cells.length+1+1,y=0,T=0;T<this.cells.length;T++)y+=this.cells[T].length;var O=new Int32Array(d+y+this.keys.length+this.bboxes.length);O[0]=this.extent,O[1]=this.n,O[2]=this.padding;for(var N=d,Z=0;Z<f.length;Z++){var q=f[Z];O[3+Z]=N,O.set(q,N),N+=q.length}return O[3+f.length]=N,O.set(this.keys,N),O[3+f.length+1]=N+=this.keys.length,O.set(this.bboxes,N),N+=this.bboxes.length,O.buffer};var jf=et.ImageData,Mf=et.ImageBitmap,vs={};function Hi(f,d,y){y===void 0&&(y={}),Object.defineProperty(d,"_classRegistryKey",{value:f,writeable:!1}),vs[f]={klass:d,omit:y.omit||[],shallow:y.shallow||[]}}for(var rs in Hi("Object",Object),Tf.serialize=function(f,d){var y=f.toArrayBuffer();return d&&d.push(y),{buffer:y}},Tf.deserialize=function(f){return new Tf(f.buffer)},Hi("Grid",Tf),Hi("Color",Ya),Hi("Error",Error),Hi("ResolvedImage",bo),Hi("StylePropertyFunction",Nc),Hi("StyleExpression",Ef,{omit:["_evaluator"]}),Hi("ZoomDependentExpression",Cf),Hi("ZoomConstantExpression",Sf),Hi("CompoundExpression",Xo,{omit:["_evaluate"]}),pe)pe[rs]._classRegistryKey||Hi("Expression_"+rs,pe[rs]);function wl(f){return f&&typeof ArrayBuffer!="undefined"&&(f instanceof ArrayBuffer||f.constructor&&f.constructor.name==="ArrayBuffer")}function Jc(f){return Mf&&f instanceof Mf}function mc(f,d){if(f==null||typeof f=="boolean"||typeof f=="number"||typeof f=="string"||f instanceof Boolean||f instanceof Number||f instanceof String||f instanceof Date||f instanceof RegExp)return f;if(wl(f)||Jc(f))return d&&d.push(f),f;if(ArrayBuffer.isView(f)){var y=f;return d&&d.push(y.buffer),y}if(f instanceof jf)return d&&d.push(f.data.buffer),f;if(Array.isArray(f)){for(var T=[],O=0,N=f;O<N.length;O+=1)T.push(mc(N[O],d));return T}if(typeof f=="object"){var Z=f.constructor,q=Z._classRegistryKey;if(!q)throw new Error("can't serialize object of unregistered class");var dt=Z.serialize?Z.serialize(f,d):{};if(!Z.serialize){for(var Pt in f)if(f.hasOwnProperty(Pt)&&!(vs[q].omit.indexOf(Pt)>=0)){var Gt=f[Pt];dt[Pt]=vs[q].shallow.indexOf(Pt)>=0?Gt:mc(Gt,d)}f instanceof Error&&(dt.message=f.message)}if(dt.$name)throw new Error("$name property is reserved for worker serialization logic.");return q!=="Object"&&(dt.$name=q),dt}throw new Error("can't serialize object of type "+typeof f)}function Iu(f){if(f==null||typeof f=="boolean"||typeof f=="number"||typeof f=="string"||f instanceof Boolean||f instanceof Number||f instanceof String||f instanceof Date||f instanceof RegExp||wl(f)||Jc(f)||ArrayBuffer.isView(f)||f instanceof jf)return f;if(Array.isArray(f))return f.map(Iu);if(typeof f=="object"){var d=f.$name||"Object",y=vs[d].klass;if(!y)throw new Error("can't deserialize unregistered class "+d);if(y.deserialize)return y.deserialize(f);for(var T=Object.create(y.prototype),O=0,N=Object.keys(f);O<N.length;O+=1){var Z=N[O];if(Z!=="$name"){var q=f[Z];T[Z]=vs[d].shallow.indexOf(Z)>=0?q:Iu(q)}}return T}throw new Error("can't deserialize object of type "+typeof f)}var pd=function(){this.first=!0};pd.prototype.update=function(f,d){var y=Math.floor(f);return this.first?(this.first=!1,this.lastIntegerZoom=y,this.lastIntegerZoomTime=0,this.lastZoom=f,this.lastFloorZoom=y,!0):(this.lastFloorZoom>y?(this.lastIntegerZoom=y+1,this.lastIntegerZoomTime=d):this.lastFloorZoom<y&&(this.lastIntegerZoom=y,this.lastIntegerZoomTime=d),f!==this.lastZoom&&(this.lastZoom=f,this.lastFloorZoom=y,!0))};var ei={"Latin-1 Supplement":function(f){return f>=128&&f<=255},Arabic:function(f){return f>=1536&&f<=1791},"Arabic Supplement":function(f){return f>=1872&&f<=1919},"Arabic Extended-A":function(f){return f>=2208&&f<=2303},"Hangul Jamo":function(f){return f>=4352&&f<=4607},"Unified Canadian Aboriginal Syllabics":function(f){return f>=5120&&f<=5759},Khmer:function(f){return f>=6016&&f<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(f){return f>=6320&&f<=6399},"General Punctuation":function(f){return f>=8192&&f<=8303},"Letterlike Symbols":function(f){return f>=8448&&f<=8527},"Number Forms":function(f){return f>=8528&&f<=8591},"Miscellaneous Technical":function(f){return f>=8960&&f<=9215},"Control Pictures":function(f){return f>=9216&&f<=9279},"Optical Character Recognition":function(f){return f>=9280&&f<=9311},"Enclosed Alphanumerics":function(f){return f>=9312&&f<=9471},"Geometric Shapes":function(f){return f>=9632&&f<=9727},"Miscellaneous Symbols":function(f){return f>=9728&&f<=9983},"Miscellaneous Symbols and Arrows":function(f){return f>=11008&&f<=11263},"CJK Radicals Supplement":function(f){return f>=11904&&f<=12031},"Kangxi Radicals":function(f){return f>=12032&&f<=12255},"Ideographic Description Characters":function(f){return f>=12272&&f<=12287},"CJK Symbols and Punctuation":function(f){return f>=12288&&f<=12351},Hiragana:function(f){return f>=12352&&f<=12447},Katakana:function(f){return f>=12448&&f<=12543},Bopomofo:function(f){return f>=12544&&f<=12591},"Hangul Compatibility Jamo":function(f){return f>=12592&&f<=12687},Kanbun:function(f){return f>=12688&&f<=12703},"Bopomofo Extended":function(f){return f>=12704&&f<=12735},"CJK Strokes":function(f){return f>=12736&&f<=12783},"Katakana Phonetic Extensions":function(f){return f>=12784&&f<=12799},"Enclosed CJK Letters and Months":function(f){return f>=12800&&f<=13055},"CJK Compatibility":function(f){return f>=13056&&f<=13311},"CJK Unified Ideographs Extension A":function(f){return f>=13312&&f<=19903},"Yijing Hexagram Symbols":function(f){return f>=19904&&f<=19967},"CJK Unified Ideographs":function(f){return f>=19968&&f<=40959},"Yi Syllables":function(f){return f>=40960&&f<=42127},"Yi Radicals":function(f){return f>=42128&&f<=42191},"Hangul Jamo Extended-A":function(f){return f>=43360&&f<=43391},"Hangul Syllables":function(f){return f>=44032&&f<=55215},"Hangul Jamo Extended-B":function(f){return f>=55216&&f<=55295},"Private Use Area":function(f){return f>=57344&&f<=63743},"CJK Compatibility Ideographs":function(f){return f>=63744&&f<=64255},"Arabic Presentation Forms-A":function(f){return f>=64336&&f<=65023},"Vertical Forms":function(f){return f>=65040&&f<=65055},"CJK Compatibility Forms":function(f){return f>=65072&&f<=65103},"Small Form Variants":function(f){return f>=65104&&f<=65135},"Arabic Presentation Forms-B":function(f){return f>=65136&&f<=65279},"Halfwidth and Fullwidth Forms":function(f){return f>=65280&&f<=65519}};function tf(f){for(var d=0,y=f;d<y.length;d+=1)if(mh(y[d].charCodeAt(0)))return!0;return!1}function mh(f){return!(f!==746&&f!==747&&(f<4352||!(ei["Bopomofo Extended"](f)||ei.Bopomofo(f)||ei["CJK Compatibility Forms"](f)&&!(f>=65097&&f<=65103)||ei["CJK Compatibility Ideographs"](f)||ei["CJK Compatibility"](f)||ei["CJK Radicals Supplement"](f)||ei["CJK Strokes"](f)||!(!ei["CJK Symbols and Punctuation"](f)||f>=12296&&f<=12305||f>=12308&&f<=12319||f===12336)||ei["CJK Unified Ideographs Extension A"](f)||ei["CJK Unified Ideographs"](f)||ei["Enclosed CJK Letters and Months"](f)||ei["Hangul Compatibility Jamo"](f)||ei["Hangul Jamo Extended-A"](f)||ei["Hangul Jamo Extended-B"](f)||ei["Hangul Jamo"](f)||ei["Hangul Syllables"](f)||ei.Hiragana(f)||ei["Ideographic Description Characters"](f)||ei.Kanbun(f)||ei["Kangxi Radicals"](f)||ei["Katakana Phonetic Extensions"](f)||ei.Katakana(f)&&f!==12540||!(!ei["Halfwidth and Fullwidth Forms"](f)||f===65288||f===65289||f===65293||f>=65306&&f<=65310||f===65339||f===65341||f===65343||f>=65371&&f<=65503||f===65507||f>=65512&&f<=65519)||!(!ei["Small Form Variants"](f)||f>=65112&&f<=65118||f>=65123&&f<=65126)||ei["Unified Canadian Aboriginal Syllabics"](f)||ei["Unified Canadian Aboriginal Syllabics Extended"](f)||ei["Vertical Forms"](f)||ei["Yijing Hexagram Symbols"](f)||ei["Yi Syllables"](f)||ei["Yi Radicals"](f))))}function yc(f){return!(mh(f)||function(d){return!!(ei["Latin-1 Supplement"](d)&&(d===167||d===169||d===174||d===177||d===188||d===189||d===190||d===215||d===247)||ei["General Punctuation"](d)&&(d===8214||d===8224||d===8225||d===8240||d===8241||d===8251||d===8252||d===8258||d===8263||d===8264||d===8265||d===8273)||ei["Letterlike Symbols"](d)||ei["Number Forms"](d)||ei["Miscellaneous Technical"](d)&&(d>=8960&&d<=8967||d>=8972&&d<=8991||d>=8996&&d<=9e3||d===9003||d>=9085&&d<=9114||d>=9150&&d<=9165||d===9167||d>=9169&&d<=9179||d>=9186&&d<=9215)||ei["Control Pictures"](d)&&d!==9251||ei["Optical Character Recognition"](d)||ei["Enclosed Alphanumerics"](d)||ei["Geometric Shapes"](d)||ei["Miscellaneous Symbols"](d)&&!(d>=9754&&d<=9759)||ei["Miscellaneous Symbols and Arrows"](d)&&(d>=11026&&d<=11055||d>=11088&&d<=11097||d>=11192&&d<=11243)||ei["CJK Symbols and Punctuation"](d)||ei.Katakana(d)||ei["Private Use Area"](d)||ei["CJK Compatibility Forms"](d)||ei["Small Form Variants"](d)||ei["Halfwidth and Fullwidth Forms"](d)||d===8734||d===8756||d===8757||d>=9984&&d<=10087||d>=10102&&d<=10131||d===65532||d===65533)}(f))}function Oo(f){return f>=1424&&f<=2303||ei["Arabic Presentation Forms-A"](f)||ei["Arabic Presentation Forms-B"](f)}function Hu(f,d){return!(!d&&Oo(f)||f>=2304&&f<=3583||f>=3840&&f<=4255||ei.Khmer(f))}function yh(f){for(var d=0,y=f;d<y.length;d+=1)if(Oo(y[d].charCodeAt(0)))return!0;return!1}var Wl=null,Os="unavailable",Pl=null,Lp=function(f){f&&typeof f=="string"&&f.indexOf("NetworkError")>-1&&(Os="error"),Wl&&Wl(f)};function dd(){ef.fire(new Ze("pluginStateChange",{pluginStatus:Os,pluginURL:Pl}))}var ef=new _r,vd=function(){return Os},ic=function(){if(Os!=="deferred"||!Pl)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Os="loading",dd(),Pl&&Dn({url:Pl},function(f){f?Lp(f):(Os="loaded",dd())})},cl={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Os==="loaded"||cl.applyArabicShaping!=null},isLoading:function(){return Os==="loading"},setState:function(f){Os=f.pluginStatus,Pl=f.pluginURL},isParsed:function(){return cl.applyArabicShaping!=null&&cl.processBidirectionalText!=null&&cl.processStyledBidirectionalText!=null},getPluginURL:function(){return Pl}},io=function(f,d){this.zoom=f,d?(this.now=d.now,this.fadeDuration=d.fadeDuration,this.zoomHistory=d.zoomHistory,this.transition=d.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new pd,this.transition={})};io.prototype.isSupportedScript=function(f){return function(d,y){for(var T=0,O=d;T<O.length;T+=1)if(!Hu(O[T].charCodeAt(0),y))return!1;return!0}(f,cl.isLoaded())},io.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},io.prototype.getCrossfadeParameters=function(){var f=this.zoom,d=f-Math.floor(f),y=this.crossFadingFactor();return f>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:d+(1-d)*y}:{fromScale:.5,toScale:1,t:1-(1-y)*d}};var Ws=function(f,d){this.property=f,this.value=d,this.expression=function(y,T){if(Gu(y))return new Nc(y,T);if(Kc(y)){var O=ll(y,T);if(O.result==="error")throw new Error(O.value.map(function(Z){return Z.key+": "+Z.message}).join(", "));return O.value}var N=y;return typeof y=="string"&&T.type==="color"&&(N=Ya.parse(y)),{kind:"constant",evaluate:function(){return N}}}(d===void 0?f.specification.default:d,f.specification)};Ws.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Ws.prototype.possiblyEvaluate=function(f,d,y){return this.property.possiblyEvaluate(this,f,d,y)};var Ol=function(f){this.property=f,this.value=new Ws(f,void 0)};Ol.prototype.transitioned=function(f,d){return new Wf(this.property,this.value,d,b({},f.transition,this.transition),f.now)},Ol.prototype.untransitioned=function(){return new Wf(this.property,this.value,null,{},0)};var vu=function(f){this._properties=f,this._values=Object.create(f.defaultTransitionablePropertyValues)};vu.prototype.getValue=function(f){return ge(this._values[f].value.value)},vu.prototype.setValue=function(f,d){this._values.hasOwnProperty(f)||(this._values[f]=new Ol(this._values[f].property)),this._values[f].value=new Ws(this._values[f].property,d===null?void 0:ge(d))},vu.prototype.getTransition=function(f){return ge(this._values[f].transition)},vu.prototype.setTransition=function(f,d){this._values.hasOwnProperty(f)||(this._values[f]=new Ol(this._values[f].property)),this._values[f].transition=ge(d)||void 0},vu.prototype.serialize=function(){for(var f={},d=0,y=Object.keys(this._values);d<y.length;d+=1){var T=y[d],O=this.getValue(T);O!==void 0&&(f[T]=O);var N=this.getTransition(T);N!==void 0&&(f[T+"-transition"]=N)}return f},vu.prototype.transitioned=function(f,d){for(var y=new If(this._properties),T=0,O=Object.keys(this._values);T<O.length;T+=1){var N=O[T];y._values[N]=this._values[N].transitioned(f,d._values[N])}return y},vu.prototype.untransitioned=function(){for(var f=new If(this._properties),d=0,y=Object.keys(this._values);d<y.length;d+=1){var T=y[d];f._values[T]=this._values[T].untransitioned()}return f};var Wf=function(f,d,y,T,O){this.property=f,this.value=d,this.begin=O+T.delay||0,this.end=this.begin+T.duration||0,f.specification.transition&&(T.delay||T.duration)&&(this.prior=y)};Wf.prototype.possiblyEvaluate=function(f,d,y){var T=f.now||0,O=this.value.possiblyEvaluate(f,d,y),N=this.prior;if(N){if(T>this.end)return this.prior=null,O;if(this.value.isDataDriven())return this.prior=null,O;if(T<this.begin)return N.possiblyEvaluate(f,d,y);var Z=(T-this.begin)/(this.end-this.begin);return this.property.interpolate(N.possiblyEvaluate(f,d,y),O,function(q){if(q<=0)return 0;if(q>=1)return 1;var dt=q*q,Pt=dt*q;return 4*(q<.5?Pt:3*(q-dt)+Pt-.75)}(Z))}return O};var If=function(f){this._properties=f,this._values=Object.create(f.defaultTransitioningPropertyValues)};If.prototype.possiblyEvaluate=function(f,d,y){for(var T=new _c(this._properties),O=0,N=Object.keys(this._values);O<N.length;O+=1){var Z=N[O];T._values[Z]=this._values[Z].possiblyEvaluate(f,d,y)}return T},If.prototype.hasTransition=function(){for(var f=0,d=Object.keys(this._values);f<d.length;f+=1)if(this._values[d[f]].prior)return!0;return!1};var gu=function(f){this._properties=f,this._values=Object.create(f.defaultPropertyValues)};gu.prototype.getValue=function(f){return ge(this._values[f].value)},gu.prototype.setValue=function(f,d){this._values[f]=new Ws(this._values[f].property,d===null?void 0:ge(d))},gu.prototype.serialize=function(){for(var f={},d=0,y=Object.keys(this._values);d<y.length;d+=1){var T=y[d],O=this.getValue(T);O!==void 0&&(f[T]=O)}return f},gu.prototype.possiblyEvaluate=function(f,d,y){for(var T=new _c(this._properties),O=0,N=Object.keys(this._values);O<N.length;O+=1){var Z=N[O];T._values[Z]=this._values[Z].possiblyEvaluate(f,d,y)}return T};var ku=function(f,d,y){this.property=f,this.value=d,this.parameters=y};ku.prototype.isConstant=function(){return this.value.kind==="constant"},ku.prototype.constantOr=function(f){return this.value.kind==="constant"?this.value.value:f},ku.prototype.evaluate=function(f,d,y,T){return this.property.evaluate(this.value,this.parameters,f,d,y,T)};var _c=function(f){this._properties=f,this._values=Object.create(f.defaultPossiblyEvaluatedValues)};_c.prototype.get=function(f){return this._values[f]};var aa=function(f){this.specification=f};aa.prototype.possiblyEvaluate=function(f,d){return f.expression.evaluate(d)},aa.prototype.interpolate=function(f,d,y){var T=js[this.specification.type];return T?T(f,d,y):f};var Ii=function(f,d){this.specification=f,this.overrides=d};Ii.prototype.possiblyEvaluate=function(f,d,y,T){return new ku(this,f.expression.kind==="constant"||f.expression.kind==="camera"?{kind:"constant",value:f.expression.evaluate(d,null,{},y,T)}:f.expression,d)},Ii.prototype.interpolate=function(f,d,y){if(f.value.kind!=="constant"||d.value.kind!=="constant")return f;if(f.value.value===void 0||d.value.value===void 0)return new ku(this,{kind:"constant",value:void 0},f.parameters);var T=js[this.specification.type];return T?new ku(this,{kind:"constant",value:T(f.value.value,d.value.value,y)},f.parameters):f},Ii.prototype.evaluate=function(f,d,y,T,O,N){return f.kind==="constant"?f.value:f.evaluate(d,y,T,O,N)};var _h=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.possiblyEvaluate=function(y,T,O,N){if(y.value===void 0)return new ku(this,{kind:"constant",value:void 0},T);if(y.expression.kind==="constant"){var Z=y.expression.evaluate(T,null,{},O,N),q=y.property.specification.type==="resolvedImage"&&typeof Z!="string"?Z.name:Z,dt=this._calculate(q,q,q,T);return new ku(this,{kind:"constant",value:dt},T)}if(y.expression.kind==="camera"){var Pt=this._calculate(y.expression.evaluate({zoom:T.zoom-1}),y.expression.evaluate({zoom:T.zoom}),y.expression.evaluate({zoom:T.zoom+1}),T);return new ku(this,{kind:"constant",value:Pt},T)}return new ku(this,y.expression,T)},d.prototype.evaluate=function(y,T,O,N,Z,q){if(y.kind==="source"){var dt=y.evaluate(T,O,N,Z,q);return this._calculate(dt,dt,dt,T)}return y.kind==="composite"?this._calculate(y.evaluate({zoom:Math.floor(T.zoom)-1},O,N),y.evaluate({zoom:Math.floor(T.zoom)},O,N),y.evaluate({zoom:Math.floor(T.zoom)+1},O,N),T):y.value},d.prototype._calculate=function(y,T,O,N){return N.zoom>N.zoomHistory.lastIntegerZoom?{from:y,to:T}:{from:O,to:T}},d.prototype.interpolate=function(y){return y},d}(Ii),fl=function(f){this.specification=f};fl.prototype.possiblyEvaluate=function(f,d,y,T){if(f.value!==void 0){if(f.expression.kind==="constant"){var O=f.expression.evaluate(d,null,{},y,T);return this._calculate(O,O,O,d)}return this._calculate(f.expression.evaluate(new io(Math.floor(d.zoom-1),d)),f.expression.evaluate(new io(Math.floor(d.zoom),d)),f.expression.evaluate(new io(Math.floor(d.zoom+1),d)),d)}},fl.prototype._calculate=function(f,d,y,T){return T.zoom>T.zoomHistory.lastIntegerZoom?{from:f,to:d}:{from:y,to:d}},fl.prototype.interpolate=function(f){return f};var tl=function(f){this.specification=f};tl.prototype.possiblyEvaluate=function(f,d,y,T){return!!f.expression.evaluate(d,null,{},y,T)},tl.prototype.interpolate=function(){return!1};var su=function(f){for(var d in this.properties=f,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],f){var y=f[d];y.specification.overridable&&this.overridableProperties.push(d);var T=this.defaultPropertyValues[d]=new Ws(y,void 0),O=this.defaultTransitionablePropertyValues[d]=new Ol(y);this.defaultTransitioningPropertyValues[d]=O.untransitioned(),this.defaultPossiblyEvaluatedValues[d]=T.possiblyEvaluate({})}};Hi("DataDrivenProperty",Ii),Hi("DataConstantProperty",aa),Hi("CrossFadedDataDrivenProperty",_h),Hi("CrossFadedProperty",fl),Hi("ColorRampProperty",tl);var Sl=function(f){function d(y,T){if(f.call(this),this.id=y.id,this.type=y.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},y.type!=="custom"&&(this.metadata=(y=y).metadata,this.minzoom=y.minzoom,this.maxzoom=y.maxzoom,y.type!=="background"&&(this.source=y.source,this.sourceLayer=y["source-layer"],this.filter=y.filter),T.layout&&(this._unevaluatedLayout=new gu(T.layout)),T.paint)){for(var O in this._transitionablePaint=new vu(T.paint),y.paint)this.setPaintProperty(O,y.paint[O],{validate:!1});for(var N in y.layout)this.setLayoutProperty(N,y.layout[N],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new _c(T.paint)}}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},d.prototype.getLayoutProperty=function(y){return y==="visibility"?this.visibility:this._unevaluatedLayout.getValue(y)},d.prototype.setLayoutProperty=function(y,T,O){O===void 0&&(O={}),T!=null&&this._validate(vh,"layers."+this.id+".layout."+y,y,T,O)||(y!=="visibility"?this._unevaluatedLayout.setValue(y,T):this.visibility=T)},d.prototype.getPaintProperty=function(y){return rt(y,"-transition")?this._transitionablePaint.getTransition(y.slice(0,-11)):this._transitionablePaint.getValue(y)},d.prototype.setPaintProperty=function(y,T,O){if(O===void 0&&(O={}),T!=null&&this._validate(Qi,"layers."+this.id+".paint."+y,y,T,O))return!1;if(rt(y,"-transition"))return this._transitionablePaint.setTransition(y.slice(0,-11),T||void 0),!1;var N=this._transitionablePaint._values[y],Z=N.property.specification["property-type"]==="cross-faded-data-driven",q=N.value.isDataDriven(),dt=N.value;this._transitionablePaint.setValue(y,T),this._handleSpecialPaintPropertyUpdate(y);var Pt=this._transitionablePaint._values[y].value;return Pt.isDataDriven()||q||Z||this._handleOverridablePaintPropertyUpdate(y,dt,Pt)},d.prototype._handleSpecialPaintPropertyUpdate=function(y){},d.prototype._handleOverridablePaintPropertyUpdate=function(y,T,O){return!1},d.prototype.isHidden=function(y){return!!(this.minzoom&&y<this.minzoom)||!!(this.maxzoom&&y>=this.maxzoom)||this.visibility==="none"},d.prototype.updateTransitions=function(y){this._transitioningPaint=this._transitionablePaint.transitioned(y,this._transitioningPaint)},d.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},d.prototype.recalculate=function(y,T){y.getCrossfadeParameters&&(this._crossfadeParameters=y.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(y,void 0,T)),this.paint=this._transitioningPaint.possiblyEvaluate(y,void 0,T)},d.prototype.serialize=function(){var y={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(y.layout=y.layout||{},y.layout.visibility=this.visibility),Ee(y,function(T,O){return!(T===void 0||O==="layout"&&!Object.keys(T).length||O==="paint"&&!Object.keys(T).length)})},d.prototype._validate=function(y,T,O,N,Z){return Z===void 0&&(Z={}),(!Z||Z.validate!==!1)&&gh(this,y.call(kp,{key:T,layerType:this.type,objectKey:O,value:N,styleSpec:we,style:{glyphs:!0,sprite:!0}}))},d.prototype.is3D=function(){return!1},d.prototype.isTileClipped=function(){return!1},d.prototype.hasOffscreenPass=function(){return!1},d.prototype.resize=function(){},d.prototype.isStateDependent=function(){for(var y in this.paint._values){var T=this.paint.get(y);if(T instanceof ku&&$a(T.property.specification)&&(T.value.kind==="source"||T.value.kind==="composite")&&T.value.isStateDependent)return!0}return!1},d}(_r),gd={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Hh=function(f,d){this._structArray=f,this._pos1=d*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Yo=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function os(f,d){d===void 0&&(d=1);var y=0,T=0;return{members:f.map(function(O){var N=gd[O.type].BYTES_PER_ELEMENT,Z=y=lv(y,Math.max(d,N)),q=O.components||1;return T=Math.max(T,N),y+=N*q,{name:O.name,type:O.type,components:q,offset:Z}}),size:lv(y,Math.max(T,d)),alignment:d}}function lv(f,d){return Math.ceil(f/d)*d}Yo.serialize=function(f,d){return f._trim(),d&&(f.isTransferred=!0,d.push(f.arrayBuffer)),{length:f.length,arrayBuffer:f.arrayBuffer}},Yo.deserialize=function(f){var d=Object.create(this.prototype);return d.arrayBuffer=f.arrayBuffer,d.length=f.length,d.capacity=f.arrayBuffer.byteLength/d.bytesPerElement,d._refreshViews(),d},Yo.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Yo.prototype.clear=function(){this.length=0},Yo.prototype.resize=function(f){this.reserve(f),this.length=f},Yo.prototype.reserve=function(f){if(f>this.capacity){this.capacity=Math.max(f,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var d=this.uint8;this._refreshViews(),d&&this.uint8.set(d)}},Yo.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var jh=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T){var O=this.length;return this.resize(O+1),this.emplace(O,y,T)},d.prototype.emplace=function(y,T,O){var N=2*y;return this.int16[N+0]=T,this.int16[N+1]=O,y},d}(Yo);jh.prototype.bytesPerElement=4,Hi("StructArrayLayout2i4",jh);var hl=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O,N){var Z=this.length;return this.resize(Z+1),this.emplace(Z,y,T,O,N)},d.prototype.emplace=function(y,T,O,N,Z){var q=4*y;return this.int16[q+0]=T,this.int16[q+1]=O,this.int16[q+2]=N,this.int16[q+3]=Z,y},d}(Yo);hl.prototype.bytesPerElement=8,Hi("StructArrayLayout4i8",hl);var Xl=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O,N,Z,q){var dt=this.length;return this.resize(dt+1),this.emplace(dt,y,T,O,N,Z,q)},d.prototype.emplace=function(y,T,O,N,Z,q,dt){var Pt=6*y;return this.int16[Pt+0]=T,this.int16[Pt+1]=O,this.int16[Pt+2]=N,this.int16[Pt+3]=Z,this.int16[Pt+4]=q,this.int16[Pt+5]=dt,y},d}(Yo);Xl.prototype.bytesPerElement=12,Hi("StructArrayLayout2i4i12",Xl);var fa=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O,N,Z,q){var dt=this.length;return this.resize(dt+1),this.emplace(dt,y,T,O,N,Z,q)},d.prototype.emplace=function(y,T,O,N,Z,q,dt){var Pt=4*y,Gt=8*y;return this.int16[Pt+0]=T,this.int16[Pt+1]=O,this.uint8[Gt+4]=N,this.uint8[Gt+5]=Z,this.uint8[Gt+6]=q,this.uint8[Gt+7]=dt,y},d}(Yo);fa.prototype.bytesPerElement=8,Hi("StructArrayLayout2i4ub8",fa);var kf=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T){var O=this.length;return this.resize(O+1),this.emplace(O,y,T)},d.prototype.emplace=function(y,T,O){var N=2*y;return this.float32[N+0]=T,this.float32[N+1]=O,y},d}(Yo);kf.prototype.bytesPerElement=8,Hi("StructArrayLayout2f8",kf);var xc=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O,N,Z,q,dt,Pt,Gt,Qt){var ve=this.length;return this.resize(ve+1),this.emplace(ve,y,T,O,N,Z,q,dt,Pt,Gt,Qt)},d.prototype.emplace=function(y,T,O,N,Z,q,dt,Pt,Gt,Qt,ve){var Oe=10*y;return this.uint16[Oe+0]=T,this.uint16[Oe+1]=O,this.uint16[Oe+2]=N,this.uint16[Oe+3]=Z,this.uint16[Oe+4]=q,this.uint16[Oe+5]=dt,this.uint16[Oe+6]=Pt,this.uint16[Oe+7]=Gt,this.uint16[Oe+8]=Qt,this.uint16[Oe+9]=ve,y},d}(Yo);xc.prototype.bytesPerElement=20,Hi("StructArrayLayout10ui20",xc);var Pp=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O,N,Z,q,dt,Pt,Gt,Qt,ve,Oe){var er=this.length;return this.resize(er+1),this.emplace(er,y,T,O,N,Z,q,dt,Pt,Gt,Qt,ve,Oe)},d.prototype.emplace=function(y,T,O,N,Z,q,dt,Pt,Gt,Qt,ve,Oe,er){var sr=12*y;return this.int16[sr+0]=T,this.int16[sr+1]=O,this.int16[sr+2]=N,this.int16[sr+3]=Z,this.uint16[sr+4]=q,this.uint16[sr+5]=dt,this.uint16[sr+6]=Pt,this.uint16[sr+7]=Gt,this.int16[sr+8]=Qt,this.int16[sr+9]=ve,this.int16[sr+10]=Oe,this.int16[sr+11]=er,y},d}(Yo);Pp.prototype.bytesPerElement=24,Hi("StructArrayLayout4i4ui4i24",Pp);var Xf=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O){var N=this.length;return this.resize(N+1),this.emplace(N,y,T,O)},d.prototype.emplace=function(y,T,O,N){var Z=3*y;return this.float32[Z+0]=T,this.float32[Z+1]=O,this.float32[Z+2]=N,y},d}(Yo);Xf.prototype.bytesPerElement=12,Hi("StructArrayLayout3f12",Xf);var Wh=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y){var T=this.length;return this.resize(T+1),this.emplace(T,y)},d.prototype.emplace=function(y,T){return this.uint32[1*y+0]=T,y},d}(Yo);Wh.prototype.bytesPerElement=4,Hi("StructArrayLayout1ul4",Wh);var md=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O,N,Z,q,dt,Pt,Gt){var Qt=this.length;return this.resize(Qt+1),this.emplace(Qt,y,T,O,N,Z,q,dt,Pt,Gt)},d.prototype.emplace=function(y,T,O,N,Z,q,dt,Pt,Gt,Qt){var ve=10*y,Oe=5*y;return this.int16[ve+0]=T,this.int16[ve+1]=O,this.int16[ve+2]=N,this.int16[ve+3]=Z,this.int16[ve+4]=q,this.int16[ve+5]=dt,this.uint32[Oe+3]=Pt,this.uint16[ve+8]=Gt,this.uint16[ve+9]=Qt,y},d}(Yo);md.prototype.bytesPerElement=20,Hi("StructArrayLayout6i1ul2ui20",md);var Xh=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O,N,Z,q){var dt=this.length;return this.resize(dt+1),this.emplace(dt,y,T,O,N,Z,q)},d.prototype.emplace=function(y,T,O,N,Z,q,dt){var Pt=6*y;return this.int16[Pt+0]=T,this.int16[Pt+1]=O,this.int16[Pt+2]=N,this.int16[Pt+3]=Z,this.int16[Pt+4]=q,this.int16[Pt+5]=dt,y},d}(Yo);Xh.prototype.bytesPerElement=12,Hi("StructArrayLayout2i2i2i12",Xh);var rf=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O,N,Z){var q=this.length;return this.resize(q+1),this.emplace(q,y,T,O,N,Z)},d.prototype.emplace=function(y,T,O,N,Z,q){var dt=4*y,Pt=8*y;return this.float32[dt+0]=T,this.float32[dt+1]=O,this.float32[dt+2]=N,this.int16[Pt+6]=Z,this.int16[Pt+7]=q,y},d}(Yo);rf.prototype.bytesPerElement=16,Hi("StructArrayLayout2f1f2i16",rf);var yd=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O,N){var Z=this.length;return this.resize(Z+1),this.emplace(Z,y,T,O,N)},d.prototype.emplace=function(y,T,O,N,Z){var q=12*y,dt=3*y;return this.uint8[q+0]=T,this.uint8[q+1]=O,this.float32[dt+1]=N,this.float32[dt+2]=Z,y},d}(Yo);yd.prototype.bytesPerElement=12,Hi("StructArrayLayout2ub2f12",yd);var bc=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O){var N=this.length;return this.resize(N+1),this.emplace(N,y,T,O)},d.prototype.emplace=function(y,T,O,N){var Z=3*y;return this.uint16[Z+0]=T,this.uint16[Z+1]=O,this.uint16[Z+2]=N,y},d}(Yo);bc.prototype.bytesPerElement=6,Hi("StructArrayLayout3ui6",bc);var Lf=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O,N,Z,q,dt,Pt,Gt,Qt,ve,Oe,er,sr,Sr,gr,zr){var Jr=this.length;return this.resize(Jr+1),this.emplace(Jr,y,T,O,N,Z,q,dt,Pt,Gt,Qt,ve,Oe,er,sr,Sr,gr,zr)},d.prototype.emplace=function(y,T,O,N,Z,q,dt,Pt,Gt,Qt,ve,Oe,er,sr,Sr,gr,zr,Jr){var ln=24*y,yn=12*y,Pn=48*y;return this.int16[ln+0]=T,this.int16[ln+1]=O,this.uint16[ln+2]=N,this.uint16[ln+3]=Z,this.uint32[yn+2]=q,this.uint32[yn+3]=dt,this.uint32[yn+4]=Pt,this.uint16[ln+10]=Gt,this.uint16[ln+11]=Qt,this.uint16[ln+12]=ve,this.float32[yn+7]=Oe,this.float32[yn+8]=er,this.uint8[Pn+36]=sr,this.uint8[Pn+37]=Sr,this.uint8[Pn+38]=gr,this.uint32[yn+10]=zr,this.int16[ln+22]=Jr,y},d}(Yo);Lf.prototype.bytesPerElement=48,Hi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Lf);var Op=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O,N,Z,q,dt,Pt,Gt,Qt,ve,Oe,er,sr,Sr,gr,zr,Jr,ln,yn,Pn,oi,Ti,oa,Vi,da,Rn,Ri){var na=this.length;return this.resize(na+1),this.emplace(na,y,T,O,N,Z,q,dt,Pt,Gt,Qt,ve,Oe,er,sr,Sr,gr,zr,Jr,ln,yn,Pn,oi,Ti,oa,Vi,da,Rn,Ri)},d.prototype.emplace=function(y,T,O,N,Z,q,dt,Pt,Gt,Qt,ve,Oe,er,sr,Sr,gr,zr,Jr,ln,yn,Pn,oi,Ti,oa,Vi,da,Rn,Ri,na){var ta=34*y,mo=17*y;return this.int16[ta+0]=T,this.int16[ta+1]=O,this.int16[ta+2]=N,this.int16[ta+3]=Z,this.int16[ta+4]=q,this.int16[ta+5]=dt,this.int16[ta+6]=Pt,this.int16[ta+7]=Gt,this.uint16[ta+8]=Qt,this.uint16[ta+9]=ve,this.uint16[ta+10]=Oe,this.uint16[ta+11]=er,this.uint16[ta+12]=sr,this.uint16[ta+13]=Sr,this.uint16[ta+14]=gr,this.uint16[ta+15]=zr,this.uint16[ta+16]=Jr,this.uint16[ta+17]=ln,this.uint16[ta+18]=yn,this.uint16[ta+19]=Pn,this.uint16[ta+20]=oi,this.uint16[ta+21]=Ti,this.uint16[ta+22]=oa,this.uint32[mo+12]=Vi,this.float32[mo+13]=da,this.float32[mo+14]=Rn,this.float32[mo+15]=Ri,this.float32[mo+16]=na,y},d}(Yo);Op.prototype.bytesPerElement=68,Hi("StructArrayLayout8i15ui1ul4f68",Op);var nf=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y){var T=this.length;return this.resize(T+1),this.emplace(T,y)},d.prototype.emplace=function(y,T){return this.float32[1*y+0]=T,y},d}(Yo);nf.prototype.bytesPerElement=4,Hi("StructArrayLayout1f4",nf);var ac=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O){var N=this.length;return this.resize(N+1),this.emplace(N,y,T,O)},d.prototype.emplace=function(y,T,O,N){var Z=3*y;return this.int16[Z+0]=T,this.int16[Z+1]=O,this.int16[Z+2]=N,y},d}(Yo);ac.prototype.bytesPerElement=6,Hi("StructArrayLayout3i6",ac);var Yh=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O){var N=this.length;return this.resize(N+1),this.emplace(N,y,T,O)},d.prototype.emplace=function(y,T,O,N){var Z=4*y;return this.uint32[2*y+0]=T,this.uint16[Z+2]=O,this.uint16[Z+3]=N,y},d}(Yo);Yh.prototype.bytesPerElement=8,Hi("StructArrayLayout1ul2ui8",Yh);var Yf=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T){var O=this.length;return this.resize(O+1),this.emplace(O,y,T)},d.prototype.emplace=function(y,T,O){var N=2*y;return this.uint16[N+0]=T,this.uint16[N+1]=O,y},d}(Yo);Yf.prototype.bytesPerElement=4,Hi("StructArrayLayout2ui4",Yf);var cv=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y){var T=this.length;return this.resize(T+1),this.emplace(T,y)},d.prototype.emplace=function(y,T){return this.uint16[1*y+0]=T,y},d}(Yo);cv.prototype.bytesPerElement=2,Hi("StructArrayLayout1ui2",cv);var xh=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},d.prototype.emplaceBack=function(y,T,O,N){var Z=this.length;return this.resize(Z+1),this.emplace(Z,y,T,O,N)},d.prototype.emplace=function(y,T,O,N,Z){var q=4*y;return this.float32[q+0]=T,this.float32[q+1]=O,this.float32[q+2]=N,this.float32[q+3]=Z,y},d}(Yo);xh.prototype.bytesPerElement=16,Hi("StructArrayLayout4f16",xh);var x=function(f){function d(){f.apply(this,arguments)}f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d;var y={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return y.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},y.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},y.x1.get=function(){return this._structArray.int16[this._pos2+2]},y.y1.get=function(){return this._structArray.int16[this._pos2+3]},y.x2.get=function(){return this._structArray.int16[this._pos2+4]},y.y2.get=function(){return this._structArray.int16[this._pos2+5]},y.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},y.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},y.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},y.anchorPoint.get=function(){return new J(this.anchorPointX,this.anchorPointY)},Object.defineProperties(d.prototype,y),d}(Hh);x.prototype.size=20;var C=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.get=function(y){return new x(this,y)},d}(md);Hi("CollisionBoxArray",C);var E=function(f){function d(){f.apply(this,arguments)}f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d;var y={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return y.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},y.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},y.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},y.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},y.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},y.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},y.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},y.segment.get=function(){return this._structArray.uint16[this._pos2+10]},y.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},y.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},y.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},y.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},y.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},y.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},y.placedOrientation.set=function(T){this._structArray.uint8[this._pos1+37]=T},y.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},y.hidden.set=function(T){this._structArray.uint8[this._pos1+38]=T},y.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},y.crossTileID.set=function(T){this._structArray.uint32[this._pos4+10]=T},y.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(d.prototype,y),d}(Hh);E.prototype.size=48;var M=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.get=function(y){return new E(this,y)},d}(Lf);Hi("PlacedSymbolArray",M);var U=function(f){function d(){f.apply(this,arguments)}f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d;var y={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return y.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},y.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},y.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},y.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},y.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},y.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},y.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},y.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},y.key.get=function(){return this._structArray.uint16[this._pos2+8]},y.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},y.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},y.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},y.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},y.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},y.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},y.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},y.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},y.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},y.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},y.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},y.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},y.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},y.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},y.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},y.crossTileID.set=function(T){this._structArray.uint32[this._pos4+12]=T},y.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},y.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},y.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},y.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(d.prototype,y),d}(Hh);U.prototype.size=68;var H=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.get=function(y){return new U(this,y)},d}(Op);Hi("SymbolInstanceArray",H);var $=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.getoffsetX=function(y){return this.float32[1*y+0]},d}(nf);Hi("GlyphOffsetArray",$);var ht=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.getx=function(y){return this.int16[3*y+0]},d.prototype.gety=function(y){return this.int16[3*y+1]},d.prototype.gettileUnitDistanceFromAnchor=function(y){return this.int16[3*y+2]},d}(ac);Hi("SymbolLineVertexArray",ht);var Ut=function(f){function d(){f.apply(this,arguments)}f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d;var y={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return y.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},y.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},y.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(d.prototype,y),d}(Hh);Ut.prototype.size=8;var re=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.get=function(y){return new Ut(this,y)},d}(Yh);Hi("FeatureIndexArray",re);var Fe=os([{name:"a_pos",components:2,type:"Int16"}],4).members,Re=function(f){f===void 0&&(f=[]),this.segments=f};function De(f,d){return 256*(f=zt(Math.floor(f),0,255))+zt(Math.floor(d),0,255)}Re.prototype.prepareSegment=function(f,d,y,T){var O=this.segments[this.segments.length-1];return f>Re.MAX_VERTEX_ARRAY_LENGTH&&Ue("Max vertices per segment is "+Re.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+f),(!O||O.vertexLength+f>Re.MAX_VERTEX_ARRAY_LENGTH||O.sortKey!==T)&&(O={vertexOffset:d.length,primitiveOffset:y.length,vertexLength:0,primitiveLength:0},T!==void 0&&(O.sortKey=T),this.segments.push(O)),O},Re.prototype.get=function(){return this.segments},Re.prototype.destroy=function(){for(var f=0,d=this.segments;f<d.length;f+=1){var y=d[f];for(var T in y.vaos)y.vaos[T].destroy()}},Re.simpleSegment=function(f,d,y,T){return new Re([{vertexOffset:f,primitiveOffset:d,vertexLength:y,primitiveLength:T,vaos:{},sortKey:0}])},Re.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Hi("SegmentVector",Re);var cr=os([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),ur=Et(function(f){f.exports=function(d,y){var T,O,N,Z,q,dt,Pt,Gt;for(O=d.length-(T=3&d.length),N=y,q=3432918353,dt=461845907,Gt=0;Gt<O;)Pt=255&d.charCodeAt(Gt)|(255&d.charCodeAt(++Gt))<<8|(255&d.charCodeAt(++Gt))<<16|(255&d.charCodeAt(++Gt))<<24,++Gt,N=27492+(65535&(Z=5*(65535&(N=(N^=Pt=(65535&(Pt=(Pt=(65535&Pt)*q+(((Pt>>>16)*q&65535)<<16)&4294967295)<<15|Pt>>>17))*dt+(((Pt>>>16)*dt&65535)<<16)&4294967295)<<13|N>>>19))+((5*(N>>>16)&65535)<<16)&4294967295))+((58964+(Z>>>16)&65535)<<16);switch(Pt=0,T){case 3:Pt^=(255&d.charCodeAt(Gt+2))<<16;case 2:Pt^=(255&d.charCodeAt(Gt+1))<<8;case 1:N^=Pt=(65535&(Pt=(Pt=(65535&(Pt^=255&d.charCodeAt(Gt)))*q+(((Pt>>>16)*q&65535)<<16)&4294967295)<<15|Pt>>>17))*dt+(((Pt>>>16)*dt&65535)<<16)&4294967295}return N^=d.length,N=2246822507*(65535&(N^=N>>>16))+((2246822507*(N>>>16)&65535)<<16)&4294967295,N=3266489909*(65535&(N^=N>>>13))+((3266489909*(N>>>16)&65535)<<16)&4294967295,(N^=N>>>16)>>>0}}),Er=Et(function(f){f.exports=function(d,y){for(var T,O=d.length,N=y^O,Z=0;O>=4;)T=1540483477*(65535&(T=255&d.charCodeAt(Z)|(255&d.charCodeAt(++Z))<<8|(255&d.charCodeAt(++Z))<<16|(255&d.charCodeAt(++Z))<<24))+((1540483477*(T>>>16)&65535)<<16),N=1540483477*(65535&N)+((1540483477*(N>>>16)&65535)<<16)^(T=1540483477*(65535&(T^=T>>>24))+((1540483477*(T>>>16)&65535)<<16)),O-=4,++Z;switch(O){case 3:N^=(255&d.charCodeAt(Z+2))<<16;case 2:N^=(255&d.charCodeAt(Z+1))<<8;case 1:N=1540483477*(65535&(N^=255&d.charCodeAt(Z)))+((1540483477*(N>>>16)&65535)<<16)}return N=1540483477*(65535&(N^=N>>>13))+((1540483477*(N>>>16)&65535)<<16),(N^=N>>>15)>>>0}}),nr=ur,wr=Er;nr.murmur3=ur,nr.murmur2=wr;var Ir=function(){this.ids=[],this.positions=[],this.indexed=!1};Ir.prototype.add=function(f,d,y,T){this.ids.push(gn(f)),this.positions.push(d,y,T)},Ir.prototype.getPositions=function(f){for(var d=gn(f),y=0,T=this.ids.length-1;y<T;){var O=y+T>>1;this.ids[O]>=d?T=O:y=O+1}for(var N=[];this.ids[y]===d;)N.push({index:this.positions[3*y],start:this.positions[3*y+1],end:this.positions[3*y+2]}),y++;return N},Ir.serialize=function(f,d){var y=new Float64Array(f.ids),T=new Uint32Array(f.positions);return function O(N,Z,q,dt){for(;q<dt;){for(var Pt=N[q+dt>>1],Gt=q-1,Qt=dt+1;;){do Gt++;while(N[Gt]<Pt);do Qt--;while(N[Qt]>Pt);if(Gt>=Qt)break;dn(N,Gt,Qt),dn(Z,3*Gt,3*Qt),dn(Z,3*Gt+1,3*Qt+1),dn(Z,3*Gt+2,3*Qt+2)}Qt-q<dt-Qt?(O(N,Z,q,Qt),q=Qt+1):(O(N,Z,Qt+1,dt),dt=Qt)}}(y,T,0,y.length-1),d&&d.push(y.buffer,T.buffer),{ids:y,positions:T}},Ir.deserialize=function(f){var d=new Ir;return d.ids=f.ids,d.positions=f.positions,d.indexed=!0,d};var $r=Math.pow(2,53)-1;function gn(f){var d=+f;return!isNaN(d)&&d<=$r?d:nr(String(f))}function dn(f,d,y){var T=f[d];f[d]=f[y],f[y]=T}Hi("FeaturePositionMap",Ir);var xn=function(f,d){this.gl=f.gl,this.location=d},Un=function(f){function d(y,T){f.call(this,y,T),this.current=0}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.set=function(y){this.current!==y&&(this.current=y,this.gl.uniform1i(this.location,y))},d}(xn),yi=function(f){function d(y,T){f.call(this,y,T),this.current=0}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.set=function(y){this.current!==y&&(this.current=y,this.gl.uniform1f(this.location,y))},d}(xn),ui=function(f){function d(y,T){f.call(this,y,T),this.current=[0,0]}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.set=function(y){y[0]===this.current[0]&&y[1]===this.current[1]||(this.current=y,this.gl.uniform2f(this.location,y[0],y[1]))},d}(xn),Bi=function(f){function d(y,T){f.call(this,y,T),this.current=[0,0,0]}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.set=function(y){y[0]===this.current[0]&&y[1]===this.current[1]&&y[2]===this.current[2]||(this.current=y,this.gl.uniform3f(this.location,y[0],y[1],y[2]))},d}(xn),sa=function(f){function d(y,T){f.call(this,y,T),this.current=[0,0,0,0]}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.set=function(y){y[0]===this.current[0]&&y[1]===this.current[1]&&y[2]===this.current[2]&&y[3]===this.current[3]||(this.current=y,this.gl.uniform4f(this.location,y[0],y[1],y[2],y[3]))},d}(xn),ua=function(f){function d(y,T){f.call(this,y,T),this.current=Ya.transparent}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.set=function(y){y.r===this.current.r&&y.g===this.current.g&&y.b===this.current.b&&y.a===this.current.a||(this.current=y,this.gl.uniform4f(this.location,y.r,y.g,y.b,y.a))},d}(xn),ha=new Float32Array(16),uo=function(f){function d(y,T){f.call(this,y,T),this.current=ha}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.set=function(y){if(y[12]!==this.current[12]||y[0]!==this.current[0])return this.current=y,void this.gl.uniformMatrix4fv(this.location,!1,y);for(var T=1;T<16;T++)if(y[T]!==this.current[T]){this.current=y,this.gl.uniformMatrix4fv(this.location,!1,y);break}},d}(xn);function Ni(f){return[De(255*f.r,255*f.g),De(255*f.b,255*f.a)]}var La=function(f,d,y){this.value=f,this.uniformNames=d.map(function(T){return"u_"+T}),this.type=y};La.prototype.setUniform=function(f,d,y){f.set(y.constantOr(this.value))},La.prototype.getBinding=function(f,d,y){return this.type==="color"?new ua(f,d):new yi(f,d)};var Ra=function(f,d){this.uniformNames=d.map(function(y){return"u_"+y}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};Ra.prototype.setConstantPatternPositions=function(f,d){this.pixelRatioFrom=d.pixelRatio,this.pixelRatioTo=f.pixelRatio,this.patternFrom=d.tlbr,this.patternTo=f.tlbr},Ra.prototype.setUniform=function(f,d,y,T){var O=T==="u_pattern_to"?this.patternTo:T==="u_pattern_from"?this.patternFrom:T==="u_pixel_ratio_to"?this.pixelRatioTo:T==="u_pixel_ratio_from"?this.pixelRatioFrom:null;O&&f.set(O)},Ra.prototype.getBinding=function(f,d,y){return y.substr(0,9)==="u_pattern"?new sa(f,d):new yi(f,d)};var Ta=function(f,d,y,T){this.expression=f,this.type=y,this.maxValue=0,this.paintVertexAttributes=d.map(function(O){return{name:"a_"+O,type:"Float32",components:y==="color"?2:1,offset:0}}),this.paintVertexArray=new T};Ta.prototype.populatePaintArray=function(f,d,y,T,O){var N=this.paintVertexArray.length,Z=this.expression.evaluate(new io(0),d,{},T,[],O);this.paintVertexArray.resize(f),this._setPaintValue(N,f,Z)},Ta.prototype.updatePaintArray=function(f,d,y,T){var O=this.expression.evaluate({zoom:0},y,T);this._setPaintValue(f,d,O)},Ta.prototype._setPaintValue=function(f,d,y){if(this.type==="color")for(var T=Ni(y),O=f;O<d;O++)this.paintVertexArray.emplace(O,T[0],T[1]);else{for(var N=f;N<d;N++)this.paintVertexArray.emplace(N,y);this.maxValue=Math.max(this.maxValue,Math.abs(y))}},Ta.prototype.upload=function(f){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=f.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Ta.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var _a=function(f,d,y,T,O,N){this.expression=f,this.uniformNames=d.map(function(Z){return"u_"+Z+"_t"}),this.type=y,this.useIntegerZoom=T,this.zoom=O,this.maxValue=0,this.paintVertexAttributes=d.map(function(Z){return{name:"a_"+Z,type:"Float32",components:y==="color"?4:2,offset:0}}),this.paintVertexArray=new N};_a.prototype.populatePaintArray=function(f,d,y,T,O){var N=this.expression.evaluate(new io(this.zoom),d,{},T,[],O),Z=this.expression.evaluate(new io(this.zoom+1),d,{},T,[],O),q=this.paintVertexArray.length;this.paintVertexArray.resize(f),this._setPaintValue(q,f,N,Z)},_a.prototype.updatePaintArray=function(f,d,y,T){var O=this.expression.evaluate({zoom:this.zoom},y,T),N=this.expression.evaluate({zoom:this.zoom+1},y,T);this._setPaintValue(f,d,O,N)},_a.prototype._setPaintValue=function(f,d,y,T){if(this.type==="color")for(var O=Ni(y),N=Ni(T),Z=f;Z<d;Z++)this.paintVertexArray.emplace(Z,O[0],O[1],N[0],N[1]);else{for(var q=f;q<d;q++)this.paintVertexArray.emplace(q,y,T);this.maxValue=Math.max(this.maxValue,Math.abs(y),Math.abs(T))}},_a.prototype.upload=function(f){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=f.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},_a.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},_a.prototype.setUniform=function(f,d){var y=this.useIntegerZoom?Math.floor(d.zoom):d.zoom,T=zt(this.expression.interpolationFactor(y,this.zoom,this.zoom+1),0,1);f.set(T)},_a.prototype.getBinding=function(f,d,y){return new yi(f,d)};var za=function(f,d,y,T,O,N){this.expression=f,this.type=d,this.useIntegerZoom=y,this.zoom=T,this.layerId=N,this.zoomInPaintVertexArray=new O,this.zoomOutPaintVertexArray=new O};za.prototype.populatePaintArray=function(f,d,y){var T=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(f),this.zoomOutPaintVertexArray.resize(f),this._setPaintValues(T,f,d.patterns&&d.patterns[this.layerId],y)},za.prototype.updatePaintArray=function(f,d,y,T,O){this._setPaintValues(f,d,y.patterns&&y.patterns[this.layerId],O)},za.prototype._setPaintValues=function(f,d,y,T){if(T&&y){var O=T[y.min],N=T[y.mid],Z=T[y.max];if(O&&N&&Z)for(var q=f;q<d;q++)this.zoomInPaintVertexArray.emplace(q,N.tl[0],N.tl[1],N.br[0],N.br[1],O.tl[0],O.tl[1],O.br[0],O.br[1],N.pixelRatio,O.pixelRatio),this.zoomOutPaintVertexArray.emplace(q,N.tl[0],N.tl[1],N.br[0],N.br[1],Z.tl[0],Z.tl[1],Z.br[0],Z.br[1],N.pixelRatio,Z.pixelRatio)}},za.prototype.upload=function(f){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=f.createVertexBuffer(this.zoomInPaintVertexArray,cr.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=f.createVertexBuffer(this.zoomOutPaintVertexArray,cr.members,this.expression.isStateDependent))},za.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var xa=function(f,d,y){this.binders={},this._buffers=[];var T=[];for(var O in f.paint._values)if(y(O)){var N=f.paint.get(O);if(N instanceof ku&&$a(N.property.specification)){var Z=Qs(O,f.type),q=N.value,dt=N.property.specification.type,Pt=N.property.useIntegerZoom,Gt=N.property.specification["property-type"],Qt=Gt==="cross-faded"||Gt==="cross-faded-data-driven";if(q.kind==="constant")this.binders[O]=Qt?new Ra(q.value,Z):new La(q.value,Z,dt),T.push("/u_"+O);else if(q.kind==="source"||Qt){var ve=As(O,dt,"source");this.binders[O]=Qt?new za(q,dt,Pt,d,ve,f.id):new Ta(q,Z,dt,ve),T.push("/a_"+O)}else{var Oe=As(O,dt,"composite");this.binders[O]=new _a(q,Z,dt,Pt,d,Oe),T.push("/z_"+O)}}}this.cacheKey=T.sort().join("")};xa.prototype.getMaxValue=function(f){var d=this.binders[f];return d instanceof Ta||d instanceof _a?d.maxValue:0},xa.prototype.populatePaintArrays=function(f,d,y,T,O){for(var N in this.binders){var Z=this.binders[N];(Z instanceof Ta||Z instanceof _a||Z instanceof za)&&Z.populatePaintArray(f,d,y,T,O)}},xa.prototype.setConstantPatternPositions=function(f,d){for(var y in this.binders){var T=this.binders[y];T instanceof Ra&&T.setConstantPatternPositions(f,d)}},xa.prototype.updatePaintArrays=function(f,d,y,T,O){var N=!1;for(var Z in f)for(var q=0,dt=d.getPositions(Z);q<dt.length;q+=1){var Pt=dt[q],Gt=y.feature(Pt.index);for(var Qt in this.binders){var ve=this.binders[Qt];if((ve instanceof Ta||ve instanceof _a||ve instanceof za)&&ve.expression.isStateDependent===!0){var Oe=T.paint.get(Qt);ve.expression=Oe.value,ve.updatePaintArray(Pt.start,Pt.end,Gt,f[Z],O),N=!0}}}return N},xa.prototype.defines=function(){var f=[];for(var d in this.binders){var y=this.binders[d];(y instanceof La||y instanceof Ra)&&f.push.apply(f,y.uniformNames.map(function(T){return"#define HAS_UNIFORM_"+T}))}return f},xa.prototype.getBinderAttributes=function(){var f=[];for(var d in this.binders){var y=this.binders[d];if(y instanceof Ta||y instanceof _a)for(var T=0;T<y.paintVertexAttributes.length;T++)f.push(y.paintVertexAttributes[T].name);else if(y instanceof za)for(var O=0;O<cr.members.length;O++)f.push(cr.members[O].name)}return f},xa.prototype.getBinderUniforms=function(){var f=[];for(var d in this.binders){var y=this.binders[d];if(y instanceof La||y instanceof Ra||y instanceof _a)for(var T=0,O=y.uniformNames;T<O.length;T+=1)f.push(O[T])}return f},xa.prototype.getPaintVertexBuffers=function(){return this._buffers},xa.prototype.getUniforms=function(f,d){var y=[];for(var T in this.binders){var O=this.binders[T];if(O instanceof La||O instanceof Ra||O instanceof _a)for(var N=0,Z=O.uniformNames;N<Z.length;N+=1){var q=Z[N];if(d[q]){var dt=O.getBinding(f,d[q],q);y.push({name:q,property:T,binding:dt})}}}return y},xa.prototype.setUniforms=function(f,d,y,T){for(var O=0,N=d;O<N.length;O+=1){var Z=N[O],q=Z.name,dt=Z.property;this.binders[dt].setUniform(Z.binding,T,y.get(dt),q)}},xa.prototype.updatePaintBuffers=function(f){for(var d in this._buffers=[],this.binders){var y=this.binders[d];if(f&&y instanceof za){var T=f.fromScale===2?y.zoomInPaintVertexBuffer:y.zoomOutPaintVertexBuffer;T&&this._buffers.push(T)}else(y instanceof Ta||y instanceof _a)&&y.paintVertexBuffer&&this._buffers.push(y.paintVertexBuffer)}},xa.prototype.upload=function(f){for(var d in this.binders){var y=this.binders[d];(y instanceof Ta||y instanceof _a||y instanceof za)&&y.upload(f)}this.updatePaintBuffers()},xa.prototype.destroy=function(){for(var f in this.binders){var d=this.binders[f];(d instanceof Ta||d instanceof _a||d instanceof za)&&d.destroy()}};var ga=function(f,d,y){y===void 0&&(y=function(){return!0}),this.programConfigurations={};for(var T=0,O=f;T<O.length;T+=1){var N=O[T];this.programConfigurations[N.id]=new xa(N,d,y)}this.needsUpload=!1,this._featureMap=new Ir,this._bufferOffset=0};function Qs(f,d){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[f]||[f.replace(d+"-","").replace(/-/g,"_")]}function As(f,d,y){var T={color:{source:kf,composite:xh},number:{source:nf,composite:kf}},O=function(N){return{"line-pattern":{source:xc,composite:xc},"fill-pattern":{source:xc,composite:xc},"fill-extrusion-pattern":{source:xc,composite:xc}}[N]}(f);return O&&O[y]||T[d][y]}ga.prototype.populatePaintArrays=function(f,d,y,T,O,N){for(var Z in this.programConfigurations)this.programConfigurations[Z].populatePaintArrays(f,d,T,O,N);d.id!==void 0&&this._featureMap.add(d.id,y,this._bufferOffset,f),this._bufferOffset=f,this.needsUpload=!0},ga.prototype.updatePaintArrays=function(f,d,y,T){for(var O=0,N=y;O<N.length;O+=1){var Z=N[O];this.needsUpload=this.programConfigurations[Z.id].updatePaintArrays(f,this._featureMap,d,Z,T)||this.needsUpload}},ga.prototype.get=function(f){return this.programConfigurations[f]},ga.prototype.upload=function(f){if(this.needsUpload){for(var d in this.programConfigurations)this.programConfigurations[d].upload(f);this.needsUpload=!1}},ga.prototype.destroy=function(){for(var f in this.programConfigurations)this.programConfigurations[f].destroy()},Hi("ConstantBinder",La),Hi("CrossFadedConstantBinder",Ra),Hi("SourceExpressionBinder",Ta),Hi("CrossFadedCompositeBinder",za),Hi("CompositeExpressionBinder",_a),Hi("ProgramConfiguration",xa,{omit:["_buffers"]}),Hi("ProgramConfigurationSet",ga);var mu=Math.pow(2,14)-1,yu=-mu-1;function ss(f){for(var d=8192/f.extent,y=f.loadGeometry(),T=0;T<y.length;T++)for(var O=y[T],N=0;N<O.length;N++){var Z=O[N],q=Math.round(Z.x*d),dt=Math.round(Z.y*d);Z.x=zt(q,yu,mu),Z.y=zt(dt,yu,mu),(q<Z.x||q>Z.x+1||dt<Z.y||dt>Z.y+1)&&Ue("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return y}function Ms(f,d){return{type:f.type,id:f.id,properties:f.properties,geometry:d?ss(f):[]}}function el(f,d,y,T,O){f.emplaceBack(2*d+(T+1)/2,2*y+(O+1)/2)}var Xs=function(f){this.zoom=f.zoom,this.overscaling=f.overscaling,this.layers=f.layers,this.layerIds=this.layers.map(function(d){return d.id}),this.index=f.index,this.hasPattern=!1,this.layoutVertexArray=new jh,this.indexArray=new bc,this.segments=new Re,this.programConfigurations=new ga(f.layers,f.zoom),this.stateDependentLayerIds=this.layers.filter(function(d){return d.isStateDependent()}).map(function(d){return d.id})};function oc(f,d){for(var y=0;y<f.length;y++)if(uc(d,f[y]))return!0;for(var T=0;T<d.length;T++)if(uc(f,d[T]))return!0;return!!sc(f,d)}function rl(f,d,y){return!!uc(f,d)||!!Ec(d,f,y)}function Zo(f,d){if(f.length===1)return af(d,f[0]);for(var y=0;y<d.length;y++)for(var T=d[y],O=0;O<T.length;O++)if(uc(f,T[O]))return!0;for(var N=0;N<f.length;N++)if(af(d,f[N]))return!0;for(var Z=0;Z<d.length;Z++)if(sc(f,d[Z]))return!0;return!1}function Yl(f,d,y){if(f.length>1){if(sc(f,d))return!0;for(var T=0;T<d.length;T++)if(Ec(d[T],f,y))return!0}for(var O=0;O<f.length;O++)if(Ec(f[O],d,y))return!0;return!1}function sc(f,d){if(f.length===0||d.length===0)return!1;for(var y=0;y<f.length-1;y++)for(var T=f[y],O=f[y+1],N=0;N<d.length-1;N++)if(Lu(T,O,d[N],d[N+1]))return!0;return!1}function Lu(f,d,y,T){return xe(f,y,T)!==xe(d,y,T)&&xe(f,d,y)!==xe(f,d,T)}function Ec(f,d,y){var T=y*y;if(d.length===1)return f.distSqr(d[0])<T;for(var O=1;O<d.length;O++)if(Pf(f,d[O-1],d[O])<T)return!0;return!1}function Pf(f,d,y){var T=d.distSqr(y);if(T===0)return f.distSqr(d);var O=((f.x-d.x)*(y.x-d.x)+(f.y-d.y)*(y.y-d.y))/T;return f.distSqr(O<0?d:O>1?y:y.sub(d)._mult(O)._add(d))}function af(f,d){for(var y,T,O,N=!1,Z=0;Z<f.length;Z++)for(var q=0,dt=(y=f[Z]).length-1;q<y.length;dt=q++)(T=y[q]).y>d.y!=(O=y[dt]).y>d.y&&d.x<(O.x-T.x)*(d.y-T.y)/(O.y-T.y)+T.x&&(N=!N);return N}function uc(f,d){for(var y=!1,T=0,O=f.length-1;T<f.length;O=T++){var N=f[T],Z=f[O];N.y>d.y!=Z.y>d.y&&d.x<(Z.x-N.x)*(d.y-N.y)/(Z.y-N.y)+N.x&&(y=!y)}return y}function $f(f,d,y){var T=y[0],O=y[2];if(f.x<T.x&&d.x<T.x||f.x>O.x&&d.x>O.x||f.y<T.y&&d.y<T.y||f.y>O.y&&d.y>O.y)return!1;var N=xe(f,d,y[0]);return N!==xe(f,d,y[1])||N!==xe(f,d,y[2])||N!==xe(f,d,y[3])}function lc(f,d,y){var T=d.paint.get(f).value;return T.kind==="constant"?T.value:y.programConfigurations.get(d.id).getMaxValue(f)}function Fs(f){return Math.sqrt(f[0]*f[0]+f[1]*f[1])}function Cl(f,d,y,T,O){if(!d[0]&&!d[1])return f;var N=J.convert(d)._mult(O);y==="viewport"&&N._rotate(-T);for(var Z=[],q=0;q<f.length;q++)Z.push(f[q].sub(N));return Z}Xs.prototype.populate=function(f,d,y){var T=this.layers[0],O=[],N=null;T.type==="circle"&&(N=T.layout.get("circle-sort-key"));for(var Z=0,q=f;Z<q.length;Z+=1){var dt=q[Z],Pt=dt.feature,Gt=dt.id,Qt=dt.index,ve=dt.sourceLayerIndex,Oe=this.layers[0]._featureFilter.needGeometry,er=Ms(Pt,Oe);if(this.layers[0]._featureFilter.filter(new io(this.zoom),er,y)){var sr=N?N.evaluate(er,{},y):void 0,Sr={id:Gt,properties:Pt.properties,type:Pt.type,sourceLayerIndex:ve,index:Qt,geometry:Oe?er.geometry:ss(Pt),patterns:{},sortKey:sr};O.push(Sr)}}N&&O.sort(function(Ti,oa){return Ti.sortKey-oa.sortKey});for(var gr=0,zr=O;gr<zr.length;gr+=1){var Jr=zr[gr],ln=Jr.geometry,yn=Jr.index,Pn=Jr.sourceLayerIndex,oi=f[yn].feature;this.addFeature(Jr,ln,yn,y),d.featureIndex.insert(oi,ln,yn,Pn,this.index)}},Xs.prototype.update=function(f,d,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(f,d,this.stateDependentLayers,y)},Xs.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Xs.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Xs.prototype.upload=function(f){this.uploaded||(this.layoutVertexBuffer=f.createVertexBuffer(this.layoutVertexArray,Fe),this.indexBuffer=f.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(f),this.uploaded=!0},Xs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Xs.prototype.addFeature=function(f,d,y,T){for(var O=0,N=d;O<N.length;O+=1)for(var Z=0,q=N[O];Z<q.length;Z+=1){var dt=q[Z],Pt=dt.x,Gt=dt.y;if(!(Pt<0||Pt>=8192||Gt<0||Gt>=8192)){var Qt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,f.sortKey),ve=Qt.vertexLength;el(this.layoutVertexArray,Pt,Gt,-1,-1),el(this.layoutVertexArray,Pt,Gt,1,-1),el(this.layoutVertexArray,Pt,Gt,1,1),el(this.layoutVertexArray,Pt,Gt,-1,1),this.indexArray.emplaceBack(ve,ve+1,ve+2),this.indexArray.emplaceBack(ve,ve+3,ve+2),Qt.vertexLength+=4,Qt.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,f,y,{},T)},Hi("CircleBucket",Xs,{omit:["layers"]});var Al=new su({"circle-sort-key":new Ii(we.layout_circle["circle-sort-key"])}),Uc={paint:new su({"circle-radius":new Ii(we.paint_circle["circle-radius"]),"circle-color":new Ii(we.paint_circle["circle-color"]),"circle-blur":new Ii(we.paint_circle["circle-blur"]),"circle-opacity":new Ii(we.paint_circle["circle-opacity"]),"circle-translate":new aa(we.paint_circle["circle-translate"]),"circle-translate-anchor":new aa(we.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new aa(we.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new aa(we.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Ii(we.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Ii(we.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Ii(we.paint_circle["circle-stroke-opacity"])}),layout:Al},Co=typeof Float32Array!="undefined"?Float32Array:Array;function Fl(f){return f[0]=1,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=1,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=1,f[11]=0,f[12]=0,f[13]=0,f[14]=0,f[15]=1,f}function nl(f,d,y){var T=d[0],O=d[1],N=d[2],Z=d[3],q=d[4],dt=d[5],Pt=d[6],Gt=d[7],Qt=d[8],ve=d[9],Oe=d[10],er=d[11],sr=d[12],Sr=d[13],gr=d[14],zr=d[15],Jr=y[0],ln=y[1],yn=y[2],Pn=y[3];return f[0]=Jr*T+ln*q+yn*Qt+Pn*sr,f[1]=Jr*O+ln*dt+yn*ve+Pn*Sr,f[2]=Jr*N+ln*Pt+yn*Oe+Pn*gr,f[3]=Jr*Z+ln*Gt+yn*er+Pn*zr,f[4]=(Jr=y[4])*T+(ln=y[5])*q+(yn=y[6])*Qt+(Pn=y[7])*sr,f[5]=Jr*O+ln*dt+yn*ve+Pn*Sr,f[6]=Jr*N+ln*Pt+yn*Oe+Pn*gr,f[7]=Jr*Z+ln*Gt+yn*er+Pn*zr,f[8]=(Jr=y[8])*T+(ln=y[9])*q+(yn=y[10])*Qt+(Pn=y[11])*sr,f[9]=Jr*O+ln*dt+yn*ve+Pn*Sr,f[10]=Jr*N+ln*Pt+yn*Oe+Pn*gr,f[11]=Jr*Z+ln*Gt+yn*er+Pn*zr,f[12]=(Jr=y[12])*T+(ln=y[13])*q+(yn=y[14])*Qt+(Pn=y[15])*sr,f[13]=Jr*O+ln*dt+yn*ve+Pn*Sr,f[14]=Jr*N+ln*Pt+yn*Oe+Pn*gr,f[15]=Jr*Z+ln*Gt+yn*er+Pn*zr,f}Math.hypot||(Math.hypot=function(){for(var f=arguments,d=0,y=arguments.length;y--;)d+=f[y]*f[y];return Math.sqrt(d)});var of,bh=nl;function qf(f,d,y){var T=d[0],O=d[1],N=d[2],Z=d[3];return f[0]=y[0]*T+y[4]*O+y[8]*N+y[12]*Z,f[1]=y[1]*T+y[5]*O+y[9]*N+y[13]*Z,f[2]=y[2]*T+y[6]*O+y[10]*N+y[14]*Z,f[3]=y[3]*T+y[7]*O+y[11]*N+y[15]*Z,f}of=new Co(3),Co!=Float32Array&&(of[0]=0,of[1]=0,of[2]=0),function(){var f=new Co(4);Co!=Float32Array&&(f[0]=0,f[1]=0,f[2]=0,f[3]=0)}();var $h=(function(){var f=new Co(2);Co!=Float32Array&&(f[0]=0,f[1]=0)}(),function(f){function d(y){f.call(this,y,Uc)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.createBucket=function(y){return new Xs(y)},d.prototype.queryRadius=function(y){var T=y;return lc("circle-radius",this,T)+lc("circle-stroke-width",this,T)+Fs(this.paint.get("circle-translate"))},d.prototype.queryIntersectsFeature=function(y,T,O,N,Z,q,dt,Pt){for(var Gt=Cl(y,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),q.angle,dt),Qt=this.paint.get("circle-radius").evaluate(T,O)+this.paint.get("circle-stroke-width").evaluate(T,O),ve=this.paint.get("circle-pitch-alignment")==="map",Oe=ve?Gt:function(oi,Ti){return oi.map(function(oa){return Js(oa,Ti)})}(Gt,Pt),er=ve?Qt*dt:Qt,sr=0,Sr=N;sr<Sr.length;sr+=1)for(var gr=0,zr=Sr[sr];gr<zr.length;gr+=1){var Jr=zr[gr],ln=ve?Jr:Js(Jr,Pt),yn=er,Pn=qf([],[Jr.x,Jr.y,0,1],Pt);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?yn*=Pn[3]/q.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(yn*=q.cameraToCenterDistance/Pn[3]),rl(Oe,ln,yn))return!0}return!1},d}(Sl));function Js(f,d){var y=qf([],[f.x,f.y,0,1],d);return new J(y[0]/y[3],y[1]/y[3])}var Rl=function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d}(Xs);function pl(f,d,y,T){var O=d.width,N=d.height;if(T){if(T instanceof Uint8ClampedArray)T=new Uint8Array(T.buffer);else if(T.length!==O*N*y)throw new RangeError("mismatched image size")}else T=new Uint8Array(O*N*y);return f.width=O,f.height=N,f.data=T,f}function wc(f,d,y){var T=d.width,O=d.height;if(T!==f.width||O!==f.height){var N=pl({},{width:T,height:O},y);Of(f,N,{x:0,y:0},{x:0,y:0},{width:Math.min(f.width,T),height:Math.min(f.height,O)},y),f.width=T,f.height=O,f.data=N.data}}function Of(f,d,y,T,O,N){if(O.width===0||O.height===0)return d;if(O.width>f.width||O.height>f.height||y.x>f.width-O.width||y.y>f.height-O.height)throw new RangeError("out of range source coordinates for image copy");if(O.width>d.width||O.height>d.height||T.x>d.width-O.width||T.y>d.height-O.height)throw new RangeError("out of range destination coordinates for image copy");for(var Z=f.data,q=d.data,dt=0;dt<O.height;dt++)for(var Pt=((y.y+dt)*f.width+y.x)*N,Gt=((T.y+dt)*d.width+T.x)*N,Qt=0;Qt<O.width*N;Qt++)q[Gt+Qt]=Z[Pt+Qt];return d}Hi("HeatmapBucket",Rl,{omit:["layers"]});var Dl=function(f,d){pl(this,f,1,d)};Dl.prototype.resize=function(f){wc(this,f,1)},Dl.prototype.clone=function(){return new Dl({width:this.width,height:this.height},new Uint8Array(this.data))},Dl.copy=function(f,d,y,T,O){Of(f,d,y,T,O,1)};var uu=function(f,d){pl(this,f,4,d)};uu.prototype.resize=function(f){wc(this,f,4)},uu.prototype.replace=function(f,d){d?this.data.set(f):this.data=f instanceof Uint8ClampedArray?new Uint8Array(f.buffer):f},uu.prototype.clone=function(){return new uu({width:this.width,height:this.height},new Uint8Array(this.data))},uu.copy=function(f,d,y,T,O){Of(f,d,y,T,O,4)},Hi("AlphaImage",Dl),Hi("RGBAImage",uu);var Kf={paint:new su({"heatmap-radius":new Ii(we.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Ii(we.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new aa(we.paint_heatmap["heatmap-intensity"]),"heatmap-color":new tl(we.paint_heatmap["heatmap-color"]),"heatmap-opacity":new aa(we.paint_heatmap["heatmap-opacity"])})};function cc(f){var d={},y=f.resolution||256,T=f.clips?f.clips.length:1,O=f.image||new uu({width:y,height:T}),N=function(er,sr,Sr){d[f.evaluationKey]=Sr;var gr=f.expression.evaluate(d);O.data[er+sr+0]=Math.floor(255*gr.r/gr.a),O.data[er+sr+1]=Math.floor(255*gr.g/gr.a),O.data[er+sr+2]=Math.floor(255*gr.b/gr.a),O.data[er+sr+3]=Math.floor(255*gr.a)};if(f.clips)for(var Z=0,q=0;Z<T;++Z,q+=4*y)for(var dt=0,Pt=0;dt<y;dt++,Pt+=4){var Gt=dt/(y-1),Qt=f.clips[Z];N(q,Pt,Qt.start*(1-Gt)+Qt.end*Gt)}else for(var ve=0,Oe=0;ve<y;ve++,Oe+=4)N(0,Oe,ve/(y-1));return O}var Sc=function(f){function d(y){f.call(this,y,Kf),this._updateColorRamp()}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.createBucket=function(y){return new Rl(y)},d.prototype._handleSpecialPaintPropertyUpdate=function(y){y==="heatmap-color"&&this._updateColorRamp()},d.prototype._updateColorRamp=function(){this.colorRamp=cc({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},d.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},d.prototype.queryRadius=function(){return 0},d.prototype.queryIntersectsFeature=function(){return!1},d.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},d}(Sl),Fp={paint:new su({"hillshade-illumination-direction":new aa(we.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new aa(we.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new aa(we.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new aa(we.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new aa(we.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new aa(we.paint_hillshade["hillshade-accent-color"])})},Jv=function(f){function d(y){f.call(this,y,Fp)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},d}(Sl),t0=os([{name:"a_pos",components:2,type:"Int16"}],4).members,Eh=fv,_d=fv;function fv(f,d,y){y=y||2;var T,O,N,Z,q,dt,Pt,Gt=d&&d.length,Qt=Gt?d[0]*y:f.length,ve=Rp(f,0,Qt,y,!0),Oe=[];if(!ve||ve.next===ve.prev)return Oe;if(Gt&&(ve=function(sr,Sr,gr,zr){var Jr,ln,yn,Pn=[];for(Jr=0,ln=Sr.length;Jr<ln;Jr++)(yn=Rp(sr,Sr[Jr]*zr,Jr<ln-1?Sr[Jr+1]*zr:sr.length,zr,!1))===yn.next&&(yn.steiner=!0),Pn.push(Og(yn));for(Pn.sort(fy),Jr=0;Jr<Pn.length;Jr++)hy(Pn[Jr],gr),gr=Qf(gr,gr.next);return gr}(f,d,ve,y)),f.length>80*y){T=N=f[0],O=Z=f[1];for(var er=y;er<Qt;er+=y)(q=f[er])<T&&(T=q),(dt=f[er+1])<O&&(O=dt),q>N&&(N=q),dt>Z&&(Z=dt);Pt=(Pt=Math.max(N-T,Z-O))!==0?1/Pt:0}return Ff(ve,Oe,y,T,O,Pt),Oe}function Rp(f,d,y,T,O){var N,Z;if(O===uf(f,d,y,T)>0)for(N=d;N<y;N+=T)Z=Bp(N,f[N],f[N+1],Z);else for(N=y-T;N>=d;N-=T)Z=Bp(N,f[N],f[N+1],Z);return Z&&hv(Z,Z.next)&&(sf(Z),Z=Z.next),Z}function Qf(f,d){if(!f)return f;d||(d=f);var y,T=f;do if(y=!1,T.steiner||!hv(T,T.next)&&tu(T.prev,T,T.next)!==0)T=T.next;else{if(sf(T),(T=d=T.prev)===T.next)break;y=!0}while(y||T!==d);return d}function Ff(f,d,y,T,O,N,Z){if(f){!Z&&N&&function(Gt,Qt,ve,Oe){var er=Gt;do er.z===null&&(er.z=r0(er.x,er.y,Qt,ve,Oe)),er.prevZ=er.prev,er.nextZ=er.next,er=er.next;while(er!==Gt);er.prevZ.nextZ=null,er.prevZ=null,function(sr){var Sr,gr,zr,Jr,ln,yn,Pn,oi,Ti=1;do{for(gr=sr,sr=null,ln=null,yn=0;gr;){for(yn++,zr=gr,Pn=0,Sr=0;Sr<Ti&&(Pn++,zr=zr.nextZ);Sr++);for(oi=Ti;Pn>0||oi>0&&zr;)Pn!==0&&(oi===0||!zr||gr.z<=zr.z)?(Jr=gr,gr=gr.nextZ,Pn--):(Jr=zr,zr=zr.nextZ,oi--),ln?ln.nextZ=Jr:sr=Jr,Jr.prevZ=ln,ln=Jr;gr=zr}ln.nextZ=null,Ti*=2}while(yn>1)}(er)}(f,T,O,N);for(var q,dt,Pt=f;f.prev!==f.next;)if(q=f.prev,dt=f.next,N?xd(f,T,O,N):wh(f))d.push(q.i/y),d.push(f.i/y),d.push(dt.i/y),sf(f),f=dt.next,Pt=dt.next;else if((f=dt)===Pt){Z?Z===1?Ff(f=bd(Qf(f),d,y),d,y,T,O,N,2):Z===2&&e0(f,d,y,T,O,N):Ff(Qf(f),d,y,T,O,N,1);break}}}function wh(f){var d=f.prev,y=f,T=f.next;if(tu(d,y,T)>=0)return!1;for(var O=f.next.next;O!==f.prev;){if(qh(d.x,d.y,y.x,y.y,T.x,T.y,O.x,O.y)&&tu(O.prev,O,O.next)>=0)return!1;O=O.next}return!0}function xd(f,d,y,T){var O=f.prev,N=f,Z=f.next;if(tu(O,N,Z)>=0)return!1;for(var q=O.x>N.x?O.x>Z.x?O.x:Z.x:N.x>Z.x?N.x:Z.x,dt=O.y>N.y?O.y>Z.y?O.y:Z.y:N.y>Z.y?N.y:Z.y,Pt=r0(O.x<N.x?O.x<Z.x?O.x:Z.x:N.x<Z.x?N.x:Z.x,O.y<N.y?O.y<Z.y?O.y:Z.y:N.y<Z.y?N.y:Z.y,d,y,T),Gt=r0(q,dt,d,y,T),Qt=f.prevZ,ve=f.nextZ;Qt&&Qt.z>=Pt&&ve&&ve.z<=Gt;){if(Qt!==f.prev&&Qt!==f.next&&qh(O.x,O.y,N.x,N.y,Z.x,Z.y,Qt.x,Qt.y)&&tu(Qt.prev,Qt,Qt.next)>=0||(Qt=Qt.prevZ,ve!==f.prev&&ve!==f.next&&qh(O.x,O.y,N.x,N.y,Z.x,Z.y,ve.x,ve.y)&&tu(ve.prev,ve,ve.next)>=0))return!1;ve=ve.nextZ}for(;Qt&&Qt.z>=Pt;){if(Qt!==f.prev&&Qt!==f.next&&qh(O.x,O.y,N.x,N.y,Z.x,Z.y,Qt.x,Qt.y)&&tu(Qt.prev,Qt,Qt.next)>=0)return!1;Qt=Qt.prevZ}for(;ve&&ve.z<=Gt;){if(ve!==f.prev&&ve!==f.next&&qh(O.x,O.y,N.x,N.y,Z.x,Z.y,ve.x,ve.y)&&tu(ve.prev,ve,ve.next)>=0)return!1;ve=ve.nextZ}return!0}function bd(f,d,y){var T=f;do{var O=T.prev,N=T.next.next;!hv(O,N)&&X0(O,T,T.next,N)&&Kh(O,N)&&Kh(N,O)&&(d.push(O.i/y),d.push(T.i/y),d.push(N.i/y),sf(T),sf(T.next),T=f=N),T=T.next}while(T!==f);return Qf(T)}function e0(f,d,y,T,O,N){var Z=f;do{for(var q=Z.next.next;q!==Z.prev;){if(Z.i!==q.i&&W0(Z,q)){var dt=pv(Z,q);return Z=Qf(Z,Z.next),dt=Qf(dt,dt.next),Ff(Z,d,y,T,O,N),void Ff(dt,d,y,T,O,N)}q=q.next}Z=Z.next}while(Z!==f)}function fy(f,d){return f.x-d.x}function hy(f,d){if(d=function(T,O){var N,Z=O,q=T.x,dt=T.y,Pt=-1/0;do{if(dt<=Z.y&&dt>=Z.next.y&&Z.next.y!==Z.y){var Gt=Z.x+(dt-Z.y)*(Z.next.x-Z.x)/(Z.next.y-Z.y);if(Gt<=q&&Gt>Pt){if(Pt=Gt,Gt===q){if(dt===Z.y)return Z;if(dt===Z.next.y)return Z.next}N=Z.x<Z.next.x?Z:Z.next}}Z=Z.next}while(Z!==O);if(!N)return null;if(q===Pt)return N;var Qt,ve=N,Oe=N.x,er=N.y,sr=1/0;Z=N;do q>=Z.x&&Z.x>=Oe&&q!==Z.x&&qh(dt<er?q:Pt,dt,Oe,er,dt<er?Pt:q,dt,Z.x,Z.y)&&(Qt=Math.abs(dt-Z.y)/(q-Z.x),Kh(Z,T)&&(Qt<sr||Qt===sr&&(Z.x>N.x||Z.x===N.x&&j0(N,Z)))&&(N=Z,sr=Qt)),Z=Z.next;while(Z!==ve);return N}(f,d)){var y=pv(d,f);Qf(d,d.next),Qf(y,y.next)}}function j0(f,d){return tu(f.prev,f,d.prev)<0&&tu(d.next,f,f.next)<0}function r0(f,d,y,T,O){return(f=1431655765&((f=858993459&((f=252645135&((f=16711935&((f=32767*(f-y)*O)|f<<8))|f<<4))|f<<2))|f<<1))|(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d=32767*(d-T)*O)|d<<8))|d<<4))|d<<2))|d<<1))<<1}function Og(f){var d=f,y=f;do(d.x<y.x||d.x===y.x&&d.y<y.y)&&(y=d),d=d.next;while(d!==f);return y}function qh(f,d,y,T,O,N,Z,q){return(O-Z)*(d-q)-(f-Z)*(N-q)>=0&&(f-Z)*(T-q)-(y-Z)*(d-q)>=0&&(y-Z)*(N-q)-(O-Z)*(T-q)>=0}function W0(f,d){return f.next.i!==d.i&&f.prev.i!==d.i&&!function(y,T){var O=y;do{if(O.i!==y.i&&O.next.i!==y.i&&O.i!==T.i&&O.next.i!==T.i&&X0(O,O.next,y,T))return!0;O=O.next}while(O!==y);return!1}(f,d)&&(Kh(f,d)&&Kh(d,f)&&function(y,T){var O=y,N=!1,Z=(y.x+T.x)/2,q=(y.y+T.y)/2;do O.y>q!=O.next.y>q&&O.next.y!==O.y&&Z<(O.next.x-O.x)*(q-O.y)/(O.next.y-O.y)+O.x&&(N=!N),O=O.next;while(O!==y);return N}(f,d)&&(tu(f.prev,f,d.prev)||tu(f,d.prev,d))||hv(f,d)&&tu(f.prev,f,f.next)>0&&tu(d.prev,d,d.next)>0)}function tu(f,d,y){return(d.y-f.y)*(y.x-d.x)-(d.x-f.x)*(y.y-d.y)}function hv(f,d){return f.x===d.x&&f.y===d.y}function X0(f,d,y,T){var O=Sh(tu(f,d,y)),N=Sh(tu(f,d,T)),Z=Sh(tu(y,T,f)),q=Sh(tu(y,T,d));return O!==N&&Z!==q||!(O!==0||!Dp(f,y,d))||!(N!==0||!Dp(f,T,d))||!(Z!==0||!Dp(y,f,T))||!(q!==0||!Dp(y,d,T))}function Dp(f,d,y){return d.x<=Math.max(f.x,y.x)&&d.x>=Math.min(f.x,y.x)&&d.y<=Math.max(f.y,y.y)&&d.y>=Math.min(f.y,y.y)}function Sh(f){return f>0?1:f<0?-1:0}function Kh(f,d){return tu(f.prev,f,f.next)<0?tu(f,d,f.next)>=0&&tu(f,f.prev,d)>=0:tu(f,d,f.prev)<0||tu(f,f.next,d)<0}function pv(f,d){var y=new Np(f.i,f.x,f.y),T=new Np(d.i,d.x,d.y),O=f.next,N=d.prev;return f.next=d,d.prev=f,y.next=O,O.prev=y,T.next=y,y.prev=T,N.next=T,T.prev=N,T}function Bp(f,d,y,T){var O=new Np(f,d,y);return T?(O.next=T.next,O.prev=T,T.next.prev=O,T.next=O):(O.prev=O,O.next=O),O}function sf(f){f.next.prev=f.prev,f.prev.next=f.next,f.prevZ&&(f.prevZ.nextZ=f.nextZ),f.nextZ&&(f.nextZ.prevZ=f.prevZ)}function Np(f,d,y){this.i=f,this.x=d,this.y=y,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function uf(f,d,y,T){for(var O=0,N=d,Z=y-T;N<y;N+=T)O+=(f[Z]-f[N])*(f[N+1]+f[Z+1]),Z=N;return O}function dv(f,d,y,T,O){(function N(Z,q,dt,Pt,Gt){for(;Pt>dt;){if(Pt-dt>600){var Qt=Pt-dt+1,ve=q-dt+1,Oe=Math.log(Qt),er=.5*Math.exp(2*Oe/3),sr=.5*Math.sqrt(Oe*er*(Qt-er)/Qt)*(ve-Qt/2<0?-1:1);N(Z,q,Math.max(dt,Math.floor(q-ve*er/Qt+sr)),Math.min(Pt,Math.floor(q+(Qt-ve)*er/Qt+sr)),Gt)}var Sr=Z[q],gr=dt,zr=Pt;for(Rf(Z,dt,q),Gt(Z[Pt],Sr)>0&&Rf(Z,dt,Pt);gr<zr;){for(Rf(Z,gr,zr),gr++,zr--;Gt(Z[gr],Sr)<0;)gr++;for(;Gt(Z[zr],Sr)>0;)zr--}Gt(Z[dt],Sr)===0?Rf(Z,dt,zr):Rf(Z,++zr,Pt),zr<=q&&(dt=zr+1),q<=zr&&(Pt=zr-1)}})(f,d,y||0,T||f.length-1,O||Ch)}function Rf(f,d,y){var T=f[d];f[d]=f[y],f[y]=T}function Ch(f,d){return f<d?-1:f>d?1:0}function zp(f,d){var y=f.length;if(y<=1)return[f];for(var T,O,N=[],Z=0;Z<y;Z++){var q=Ke(f[Z]);q!==0&&(f[Z].area=Math.abs(q),O===void 0&&(O=q<0),O===q<0?(T&&N.push(T),T=[f[Z]]):T.push(f[Z]))}if(T&&N.push(T),d>1)for(var dt=0;dt<N.length;dt++)N[dt].length<=d||(dv(N[dt],d,1,N[dt].length-1,vv),N[dt]=N[dt].slice(0,d));return N}function vv(f,d){return d.area-f.area}function Up(f,d,y){for(var T=y.patternDependencies,O=!1,N=0,Z=d;N<Z.length;N+=1){var q=Z[N].paint.get(f+"-pattern");q.isConstant()||(O=!0);var dt=q.constantOr(null);dt&&(O=!0,T[dt.to]=!0,T[dt.from]=!0)}return O}function Zp(f,d,y,T,O){for(var N=O.patternDependencies,Z=0,q=d;Z<q.length;Z+=1){var dt=q[Z],Pt=dt.paint.get(f+"-pattern").value;if(Pt.kind!=="constant"){var Gt=Pt.evaluate({zoom:T-1},y,{},O.availableImages),Qt=Pt.evaluate({zoom:T},y,{},O.availableImages),ve=Pt.evaluate({zoom:T+1},y,{},O.availableImages);Qt=Qt&&Qt.name?Qt.name:Qt,ve=ve&&ve.name?ve.name:ve,N[Gt=Gt&&Gt.name?Gt.name:Gt]=!0,N[Qt]=!0,N[ve]=!0,y.patterns[dt.id]={min:Gt,mid:Qt,max:ve}}}return y}fv.deviation=function(f,d,y,T){var O=d&&d.length,N=Math.abs(uf(f,0,O?d[0]*y:f.length,y));if(O)for(var Z=0,q=d.length;Z<q;Z++)N-=Math.abs(uf(f,d[Z]*y,Z<q-1?d[Z+1]*y:f.length,y));var dt=0;for(Z=0;Z<T.length;Z+=3){var Pt=T[Z]*y,Gt=T[Z+1]*y,Qt=T[Z+2]*y;dt+=Math.abs((f[Pt]-f[Qt])*(f[Gt+1]-f[Pt+1])-(f[Pt]-f[Gt])*(f[Qt+1]-f[Pt+1]))}return N===0&&dt===0?0:Math.abs((dt-N)/N)},fv.flatten=function(f){for(var d=f[0][0].length,y={vertices:[],holes:[],dimensions:d},T=0,O=0;O<f.length;O++){for(var N=0;N<f[O].length;N++)for(var Z=0;Z<d;Z++)y.vertices.push(f[O][N][Z]);O>0&&y.holes.push(T+=f[O-1].length)}return y},Eh.default=_d;var dl=function(f){this.zoom=f.zoom,this.overscaling=f.overscaling,this.layers=f.layers,this.layerIds=this.layers.map(function(d){return d.id}),this.index=f.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new jh,this.indexArray=new bc,this.indexArray2=new Yf,this.programConfigurations=new ga(f.layers,f.zoom),this.segments=new Re,this.segments2=new Re,this.stateDependentLayerIds=this.layers.filter(function(d){return d.isStateDependent()}).map(function(d){return d.id})};dl.prototype.populate=function(f,d,y){this.hasPattern=Up("fill",this.layers,d);for(var T=this.layers[0].layout.get("fill-sort-key"),O=[],N=0,Z=f;N<Z.length;N+=1){var q=Z[N],dt=q.feature,Pt=q.id,Gt=q.index,Qt=q.sourceLayerIndex,ve=this.layers[0]._featureFilter.needGeometry,Oe=Ms(dt,ve);if(this.layers[0]._featureFilter.filter(new io(this.zoom),Oe,y)){var er=T?T.evaluate(Oe,{},y,d.availableImages):void 0,sr={id:Pt,properties:dt.properties,type:dt.type,sourceLayerIndex:Qt,index:Gt,geometry:ve?Oe.geometry:ss(dt),patterns:{},sortKey:er};O.push(sr)}}T&&O.sort(function(oi,Ti){return oi.sortKey-Ti.sortKey});for(var Sr=0,gr=O;Sr<gr.length;Sr+=1){var zr=gr[Sr],Jr=zr.geometry,ln=zr.index,yn=zr.sourceLayerIndex;if(this.hasPattern){var Pn=Zp("fill",this.layers,zr,this.zoom,d);this.patternFeatures.push(Pn)}else this.addFeature(zr,Jr,ln,y,{});d.featureIndex.insert(f[ln].feature,Jr,ln,yn,this.index)}},dl.prototype.update=function(f,d,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(f,d,this.stateDependentLayers,y)},dl.prototype.addFeatures=function(f,d,y){for(var T=0,O=this.patternFeatures;T<O.length;T+=1){var N=O[T];this.addFeature(N,N.geometry,N.index,d,y)}},dl.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},dl.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},dl.prototype.upload=function(f){this.uploaded||(this.layoutVertexBuffer=f.createVertexBuffer(this.layoutVertexArray,t0),this.indexBuffer=f.createIndexBuffer(this.indexArray),this.indexBuffer2=f.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(f),this.uploaded=!0},dl.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},dl.prototype.addFeature=function(f,d,y,T,O){for(var N=0,Z=zp(d,500);N<Z.length;N+=1){for(var q=Z[N],dt=0,Pt=0,Gt=q;Pt<Gt.length;Pt+=1)dt+=Gt[Pt].length;for(var Qt=this.segments.prepareSegment(dt,this.layoutVertexArray,this.indexArray),ve=Qt.vertexLength,Oe=[],er=[],sr=0,Sr=q;sr<Sr.length;sr+=1){var gr=Sr[sr];if(gr.length!==0){gr!==q[0]&&er.push(Oe.length/2);var zr=this.segments2.prepareSegment(gr.length,this.layoutVertexArray,this.indexArray2),Jr=zr.vertexLength;this.layoutVertexArray.emplaceBack(gr[0].x,gr[0].y),this.indexArray2.emplaceBack(Jr+gr.length-1,Jr),Oe.push(gr[0].x),Oe.push(gr[0].y);for(var ln=1;ln<gr.length;ln++)this.layoutVertexArray.emplaceBack(gr[ln].x,gr[ln].y),this.indexArray2.emplaceBack(Jr+ln-1,Jr+ln),Oe.push(gr[ln].x),Oe.push(gr[ln].y);zr.vertexLength+=gr.length,zr.primitiveLength+=gr.length}}for(var yn=Eh(Oe,er),Pn=0;Pn<yn.length;Pn+=3)this.indexArray.emplaceBack(ve+yn[Pn],ve+yn[Pn+1],ve+yn[Pn+2]);Qt.vertexLength+=dt,Qt.primitiveLength+=yn.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,f,y,O,T)},Hi("FillBucket",dl,{omit:["layers","patternFeatures"]});var Ed=new su({"fill-sort-key":new Ii(we.layout_fill["fill-sort-key"])}),Bl={paint:new su({"fill-antialias":new aa(we.paint_fill["fill-antialias"]),"fill-opacity":new Ii(we.paint_fill["fill-opacity"]),"fill-color":new Ii(we.paint_fill["fill-color"]),"fill-outline-color":new Ii(we.paint_fill["fill-outline-color"]),"fill-translate":new aa(we.paint_fill["fill-translate"]),"fill-translate-anchor":new aa(we.paint_fill["fill-translate-anchor"]),"fill-pattern":new _h(we.paint_fill["fill-pattern"])}),layout:Ed},Vp=function(f){function d(y){f.call(this,y,Bl)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.recalculate=function(y,T){f.prototype.recalculate.call(this,y,T);var O=this.paint._values["fill-outline-color"];O.value.kind==="constant"&&O.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},d.prototype.createBucket=function(y){return new dl(y)},d.prototype.queryRadius=function(){return Fs(this.paint.get("fill-translate"))},d.prototype.queryIntersectsFeature=function(y,T,O,N,Z,q,dt){return Zo(Cl(y,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),q.angle,dt),N)},d.prototype.isTileClipped=function(){return!0},d}(Sl),wd=os([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,Sd=bs;function bs(f,d,y,T,O){this.properties={},this.extent=y,this.type=0,this._pbf=f,this._geometry=-1,this._keys=T,this._values=O,f.readFields(Cc,this,d)}function Cc(f,d,y){f==1?d.id=y.readVarint():f==2?function(T,O){for(var N=T.readVarint()+T.pos;T.pos<N;){var Z=O._keys[T.readVarint()],q=O._values[T.readVarint()];O.properties[Z]=q}}(y,d):f==3?d.type=y.readVarint():f==4&&(d._geometry=y.pos)}function gv(f){for(var d,y,T=0,O=0,N=f.length,Z=N-1;O<N;Z=O++)T+=((y=f[Z]).x-(d=f[O]).x)*(d.y+y.y);return T}bs.types=["Unknown","Point","LineString","Polygon"],bs.prototype.loadGeometry=function(){var f=this._pbf;f.pos=this._geometry;for(var d,y=f.readVarint()+f.pos,T=1,O=0,N=0,Z=0,q=[];f.pos<y;){if(O<=0){var dt=f.readVarint();T=7&dt,O=dt>>3}if(O--,T===1||T===2)N+=f.readSVarint(),Z+=f.readSVarint(),T===1&&(d&&q.push(d),d=[]),d.push(new J(N,Z));else{if(T!==7)throw new Error("unknown command "+T);d&&d.push(d[0].clone())}}return d&&q.push(d),q},bs.prototype.bbox=function(){var f=this._pbf;f.pos=this._geometry;for(var d=f.readVarint()+f.pos,y=1,T=0,O=0,N=0,Z=1/0,q=-1/0,dt=1/0,Pt=-1/0;f.pos<d;){if(T<=0){var Gt=f.readVarint();y=7&Gt,T=Gt>>3}if(T--,y===1||y===2)(O+=f.readSVarint())<Z&&(Z=O),O>q&&(q=O),(N+=f.readSVarint())<dt&&(dt=N),N>Pt&&(Pt=N);else if(y!==7)throw new Error("unknown command "+y)}return[Z,dt,q,Pt]},bs.prototype.toGeoJSON=function(f,d,y){var T,O,N=this.extent*Math.pow(2,y),Z=this.extent*f,q=this.extent*d,dt=this.loadGeometry(),Pt=bs.types[this.type];function Gt(Oe){for(var er=0;er<Oe.length;er++){var sr=Oe[er];Oe[er]=[360*(sr.x+Z)/N-180,360/Math.PI*Math.atan(Math.exp((180-360*(sr.y+q)/N)*Math.PI/180))-90]}}switch(this.type){case 1:var Qt=[];for(T=0;T<dt.length;T++)Qt[T]=dt[T][0];Gt(dt=Qt);break;case 2:for(T=0;T<dt.length;T++)Gt(dt[T]);break;case 3:for(dt=function(Oe){var er=Oe.length;if(er<=1)return[Oe];for(var sr,Sr,gr=[],zr=0;zr<er;zr++){var Jr=gv(Oe[zr]);Jr!==0&&(Sr===void 0&&(Sr=Jr<0),Sr===Jr<0?(sr&&gr.push(sr),sr=[Oe[zr]]):sr.push(Oe[zr]))}return sr&&gr.push(sr),gr}(dt),T=0;T<dt.length;T++)for(O=0;O<dt[T].length;O++)Gt(dt[T][O])}dt.length===1?dt=dt[0]:Pt="Multi"+Pt;var ve={type:"Feature",geometry:{type:Pt,coordinates:dt},properties:this.properties};return"id"in this&&(ve.id=this.id),ve};var Jf=Fg;function Fg(f,d){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=f,this._keys=[],this._values=[],this._features=[],f.readFields(Rg,this,d),this.length=this._features.length}function Rg(f,d,y){f===15?d.version=y.readVarint():f===1?d.name=y.readString():f===5?d.extent=y.readVarint():f===2?d._features.push(y.pos):f===3?d._keys.push(y.readString()):f===4&&d._values.push(function(T){for(var O=null,N=T.readVarint()+T.pos;T.pos<N;){var Z=T.readVarint()>>3;O=Z===1?T.readString():Z===2?T.readFloat():Z===3?T.readDouble():Z===4?T.readVarint64():Z===5?T.readVarint():Z===6?T.readSVarint():Z===7?T.readBoolean():null}return O}(y))}function Gp(f,d,y){if(f===3){var T=new Jf(y,y.readVarint()+y.pos);T.length&&(d[T.name]=T)}}Fg.prototype.feature=function(f){if(f<0||f>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[f];var d=this._pbf.readVarint()+this._pbf.pos;return new Sd(this._pbf,d,this.extent,this._keys,this._values)};var Ac={VectorTile:function(f,d){this.layers=f.readFields(Gp,{},d)},VectorTileFeature:Sd,VectorTileLayer:Jf},$l=Ac.VectorTileFeature.types,lf=Math.pow(2,13);function Pu(f,d,y,T,O,N,Z,q){f.emplaceBack(d,y,2*Math.floor(T*lf)+Z,O*lf*2,N*lf*2,Math.round(q))}var Df=function(f){this.zoom=f.zoom,this.overscaling=f.overscaling,this.layers=f.layers,this.layerIds=this.layers.map(function(d){return d.id}),this.index=f.index,this.hasPattern=!1,this.layoutVertexArray=new Xl,this.indexArray=new bc,this.programConfigurations=new ga(f.layers,f.zoom),this.segments=new Re,this.stateDependentLayerIds=this.layers.filter(function(d){return d.isStateDependent()}).map(function(d){return d.id})};function Y0(f,d){return f.x===d.x&&(f.x<0||f.x>8192)||f.y===d.y&&(f.y<0||f.y>8192)}Df.prototype.populate=function(f,d,y){this.features=[],this.hasPattern=Up("fill-extrusion",this.layers,d);for(var T=0,O=f;T<O.length;T+=1){var N=O[T],Z=N.feature,q=N.id,dt=N.index,Pt=N.sourceLayerIndex,Gt=this.layers[0]._featureFilter.needGeometry,Qt=Ms(Z,Gt);if(this.layers[0]._featureFilter.filter(new io(this.zoom),Qt,y)){var ve={id:q,sourceLayerIndex:Pt,index:dt,geometry:Gt?Qt.geometry:ss(Z),properties:Z.properties,type:Z.type,patterns:{}};this.hasPattern?this.features.push(Zp("fill-extrusion",this.layers,ve,this.zoom,d)):this.addFeature(ve,ve.geometry,dt,y,{}),d.featureIndex.insert(Z,ve.geometry,dt,Pt,this.index,!0)}}},Df.prototype.addFeatures=function(f,d,y){for(var T=0,O=this.features;T<O.length;T+=1){var N=O[T];this.addFeature(N,N.geometry,N.index,d,y)}},Df.prototype.update=function(f,d,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(f,d,this.stateDependentLayers,y)},Df.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Df.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Df.prototype.upload=function(f){this.uploaded||(this.layoutVertexBuffer=f.createVertexBuffer(this.layoutVertexArray,wd),this.indexBuffer=f.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(f),this.uploaded=!0},Df.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Df.prototype.addFeature=function(f,d,y,T,O){for(var N=0,Z=zp(d,500);N<Z.length;N+=1){for(var q=Z[N],dt=0,Pt=0,Gt=q;Pt<Gt.length;Pt+=1)dt+=Gt[Pt].length;for(var Qt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),ve=0,Oe=q;ve<Oe.length;ve+=1){var er=Oe[ve];if(er.length!==0&&!((mo=er).every(function(Wa){return Wa.x<0})||mo.every(function(Wa){return Wa.x>8192})||mo.every(function(Wa){return Wa.y<0})||mo.every(function(Wa){return Wa.y>8192})))for(var sr=0,Sr=0;Sr<er.length;Sr++){var gr=er[Sr];if(Sr>=1){var zr=er[Sr-1];if(!Y0(gr,zr)){Qt.vertexLength+4>Re.MAX_VERTEX_ARRAY_LENGTH&&(Qt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Jr=gr.sub(zr)._perp()._unit(),ln=zr.dist(gr);sr+ln>32768&&(sr=0),Pu(this.layoutVertexArray,gr.x,gr.y,Jr.x,Jr.y,0,0,sr),Pu(this.layoutVertexArray,gr.x,gr.y,Jr.x,Jr.y,0,1,sr),Pu(this.layoutVertexArray,zr.x,zr.y,Jr.x,Jr.y,0,0,sr+=ln),Pu(this.layoutVertexArray,zr.x,zr.y,Jr.x,Jr.y,0,1,sr);var yn=Qt.vertexLength;this.indexArray.emplaceBack(yn,yn+2,yn+1),this.indexArray.emplaceBack(yn+1,yn+2,yn+3),Qt.vertexLength+=4,Qt.primitiveLength+=2}}}}if(Qt.vertexLength+dt>Re.MAX_VERTEX_ARRAY_LENGTH&&(Qt=this.segments.prepareSegment(dt,this.layoutVertexArray,this.indexArray)),$l[f.type]==="Polygon"){for(var Pn=[],oi=[],Ti=Qt.vertexLength,oa=0,Vi=q;oa<Vi.length;oa+=1){var da=Vi[oa];if(da.length!==0){da!==q[0]&&oi.push(Pn.length/2);for(var Rn=0;Rn<da.length;Rn++){var Ri=da[Rn];Pu(this.layoutVertexArray,Ri.x,Ri.y,0,0,1,1,0),Pn.push(Ri.x),Pn.push(Ri.y)}}}for(var na=Eh(Pn,oi),ta=0;ta<na.length;ta+=3)this.indexArray.emplaceBack(Ti+na[ta],Ti+na[ta+2],Ti+na[ta+1]);Qt.primitiveLength+=na.length/3,Qt.vertexLength+=dt}}var mo;this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,f,y,O,T)},Hi("FillExtrusionBucket",Df,{omit:["layers","features"]});var Ah={paint:new su({"fill-extrusion-opacity":new aa(we["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ii(we["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new aa(we["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new aa(we["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new _h(we["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ii(we["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ii(we["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new aa(we["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},cf=function(f){function d(y){f.call(this,y,Ah)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.createBucket=function(y){return new Df(y)},d.prototype.queryRadius=function(){return Fs(this.paint.get("fill-extrusion-translate"))},d.prototype.is3D=function(){return!0},d.prototype.queryIntersectsFeature=function(y,T,O,N,Z,q,dt,Pt){var Gt=Cl(y,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),q.angle,dt),Qt=this.paint.get("fill-extrusion-height").evaluate(T,O),ve=this.paint.get("fill-extrusion-base").evaluate(T,O),Oe=function(sr,Sr,gr,zr){for(var Jr=[],ln=0,yn=sr;ln<yn.length;ln+=1){var Pn=yn[ln],oi=[Pn.x,Pn.y,0,1];qf(oi,oi,Sr),Jr.push(new J(oi[0]/oi[3],oi[1]/oi[3]))}return Jr}(Gt,Pt),er=function(sr,Sr,gr,zr){for(var Jr=[],ln=[],yn=zr[8]*Sr,Pn=zr[9]*Sr,oi=zr[10]*Sr,Ti=zr[11]*Sr,oa=zr[8]*gr,Vi=zr[9]*gr,da=zr[10]*gr,Rn=zr[11]*gr,Ri=0,na=sr;Ri<na.length;Ri+=1){for(var ta=[],mo=[],Wa=0,po=na[Ri];Wa<po.length;Wa+=1){var wi=po[Wa],Ho=wi.x,Zs=wi.y,ru=zr[0]*Ho+zr[4]*Zs+zr[12],Ls=zr[1]*Ho+zr[5]*Zs+zr[13],Ds=zr[2]*Ho+zr[6]*Zs+zr[14],cu=zr[3]*Ho+zr[7]*Zs+zr[15],Vs=Ds+oi,Eu=cu+Ti,Wu=ru+oa,ml=Ls+Vi,Tl=Ds+da,Du=cu+Rn,yl=new J((ru+yn)/Eu,(Ls+Pn)/Eu);yl.z=Vs/Eu,ta.push(yl);var Ja=new J(Wu/Du,ml/Du);Ja.z=Tl/Du,mo.push(Ja)}Jr.push(ta),ln.push(mo)}return[Jr,ln]}(N,ve,Qt,Pt);return function(sr,Sr,gr){var zr=1/0;Zo(gr,Sr)&&(zr=Qh(gr,Sr[0]));for(var Jr=0;Jr<Sr.length;Jr++)for(var ln=Sr[Jr],yn=sr[Jr],Pn=0;Pn<ln.length-1;Pn++){var oi=ln[Pn],Ti=[oi,ln[Pn+1],yn[Pn+1],yn[Pn],oi];oc(gr,Ti)&&(zr=Math.min(zr,Qh(gr,Ti)))}return zr!==1/0&&zr}(er[0],er[1],Oe)},d}(Sl);function th(f,d){return f.x*d.x+f.y*d.y}function Qh(f,d){if(f.length===1){for(var y,T=0,O=d[T++];!y||O.equals(y);)if(!(y=d[T++]))return 1/0;for(;T<d.length;T++){var N=d[T],Z=f[0],q=y.sub(O),dt=N.sub(O),Pt=Z.sub(O),Gt=th(q,q),Qt=th(q,dt),ve=th(dt,dt),Oe=th(Pt,q),er=th(Pt,dt),sr=Gt*ve-Qt*Qt,Sr=(ve*Oe-Qt*er)/sr,gr=(Gt*er-Qt*Oe)/sr,zr=O.z*(1-Sr-gr)+y.z*Sr+N.z*gr;if(isFinite(zr))return zr}return 1/0}for(var Jr=1/0,ln=0,yn=d;ln<yn.length;ln+=1)Jr=Math.min(Jr,yn[ln].z);return Jr}var fc=os([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,Cd=os([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]).members,Ad=Ac.VectorTileFeature.types,n0=Math.cos(Math.PI/180*37.5),i0=Math.pow(2,14)/.5,Vo=function(f){var d=this;this.zoom=f.zoom,this.overscaling=f.overscaling,this.layers=f.layers,this.layerIds=this.layers.map(function(y){return y.id}),this.index=f.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(y){d.gradients[y.id]={}}),this.layoutVertexArray=new fa,this.layoutVertexArray2=new kf,this.indexArray=new bc,this.programConfigurations=new ga(f.layers,f.zoom),this.segments=new Re,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(y){return y.isStateDependent()}).map(function(y){return y.id})};Vo.prototype.populate=function(f,d,y){this.hasPattern=Up("line",this.layers,d);for(var T=this.layers[0].layout.get("line-sort-key"),O=[],N=0,Z=f;N<Z.length;N+=1){var q=Z[N],dt=q.feature,Pt=q.id,Gt=q.index,Qt=q.sourceLayerIndex,ve=this.layers[0]._featureFilter.needGeometry,Oe=Ms(dt,ve);if(this.layers[0]._featureFilter.filter(new io(this.zoom),Oe,y)){var er=T?T.evaluate(Oe,{},y):void 0,sr={id:Pt,properties:dt.properties,type:dt.type,sourceLayerIndex:Qt,index:Gt,geometry:ve?Oe.geometry:ss(dt),patterns:{},sortKey:er};O.push(sr)}}T&&O.sort(function(oi,Ti){return oi.sortKey-Ti.sortKey});for(var Sr=0,gr=O;Sr<gr.length;Sr+=1){var zr=gr[Sr],Jr=zr.geometry,ln=zr.index,yn=zr.sourceLayerIndex;if(this.hasPattern){var Pn=Zp("line",this.layers,zr,this.zoom,d);this.patternFeatures.push(Pn)}else this.addFeature(zr,Jr,ln,y,{});d.featureIndex.insert(f[ln].feature,Jr,ln,yn,this.index)}},Vo.prototype.update=function(f,d,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(f,d,this.stateDependentLayers,y)},Vo.prototype.addFeatures=function(f,d,y){for(var T=0,O=this.patternFeatures;T<O.length;T+=1){var N=O[T];this.addFeature(N,N.geometry,N.index,d,y)}},Vo.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Vo.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Vo.prototype.upload=function(f){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=f.createVertexBuffer(this.layoutVertexArray2,Cd)),this.layoutVertexBuffer=f.createVertexBuffer(this.layoutVertexArray,fc),this.indexBuffer=f.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(f),this.uploaded=!0},Vo.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Vo.prototype.lineFeatureClips=function(f){if(f.properties&&f.properties.hasOwnProperty("mapbox_clip_start")&&f.properties.hasOwnProperty("mapbox_clip_end"))return{start:+f.properties.mapbox_clip_start,end:+f.properties.mapbox_clip_end}},Vo.prototype.addFeature=function(f,d,y,T,O){var N=this.layers[0].layout,Z=N.get("line-join").evaluate(f,{}),q=N.get("line-cap"),dt=N.get("line-miter-limit"),Pt=N.get("line-round-limit");this.lineClips=this.lineFeatureClips(f);for(var Gt=0,Qt=d;Gt<Qt.length;Gt+=1)this.addLine(Qt[Gt],f,Z,q,dt,Pt);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,f,y,O,T)},Vo.prototype.addLine=function(f,d,y,T,O,N){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var Z=0;Z<f.length-1;Z++)this.totalDistance+=f[Z].dist(f[Z+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var q=Ad[d.type]==="Polygon",dt=f.length;dt>=2&&f[dt-1].equals(f[dt-2]);)dt--;for(var Pt=0;Pt<dt-1&&f[Pt].equals(f[Pt+1]);)Pt++;if(!(dt<(q?3:2))){y==="bevel"&&(O=1.05);var Gt,Qt=this.overscaling<=16?122880/(512*this.overscaling):0,ve=this.segments.prepareSegment(10*dt,this.layoutVertexArray,this.indexArray),Oe=void 0,er=void 0,sr=void 0,Sr=void 0;this.e1=this.e2=-1,q&&(Sr=f[Pt].sub(Gt=f[dt-2])._unit()._perp());for(var gr=Pt;gr<dt;gr++)if(!(er=gr===dt-1?q?f[Pt+1]:void 0:f[gr+1])||!f[gr].equals(er)){Sr&&(sr=Sr),Gt&&(Oe=Gt),Gt=f[gr],Sr=er?er.sub(Gt)._unit()._perp():sr;var zr=(sr=sr||Sr).add(Sr);zr.x===0&&zr.y===0||zr._unit();var Jr=sr.x*Sr.x+sr.y*Sr.y,ln=zr.x*Sr.x+zr.y*Sr.y,yn=ln!==0?1/ln:1/0,Pn=2*Math.sqrt(2-2*ln),oi=ln<n0&&Oe&&er,Ti=sr.x*Sr.y-sr.y*Sr.x>0;if(oi&&gr>Pt){var oa=Gt.dist(Oe);if(oa>2*Qt){var Vi=Gt.sub(Gt.sub(Oe)._mult(Qt/oa)._round());this.updateDistance(Oe,Vi),this.addCurrentVertex(Vi,sr,0,0,ve),Oe=Vi}}var da=Oe&&er,Rn=da?y:q?"butt":T;if(da&&Rn==="round"&&(yn<N?Rn="miter":yn<=2&&(Rn="fakeround")),Rn==="miter"&&yn>O&&(Rn="bevel"),Rn==="bevel"&&(yn>2&&(Rn="flipbevel"),yn<O&&(Rn="miter")),Oe&&this.updateDistance(Oe,Gt),Rn==="miter")zr._mult(yn),this.addCurrentVertex(Gt,zr,0,0,ve);else if(Rn==="flipbevel"){if(yn>100)zr=Sr.mult(-1);else{var Ri=yn*sr.add(Sr).mag()/sr.sub(Sr).mag();zr._perp()._mult(Ri*(Ti?-1:1))}this.addCurrentVertex(Gt,zr,0,0,ve),this.addCurrentVertex(Gt,zr.mult(-1),0,0,ve)}else if(Rn==="bevel"||Rn==="fakeround"){var na=-Math.sqrt(yn*yn-1),ta=Ti?na:0,mo=Ti?0:na;if(Oe&&this.addCurrentVertex(Gt,sr,ta,mo,ve),Rn==="fakeround")for(var Wa=Math.round(180*Pn/Math.PI/20),po=1;po<Wa;po++){var wi=po/Wa;if(wi!==.5){var Ho=wi-.5;wi+=wi*Ho*(wi-1)*((1.0904+Jr*(Jr*(3.55645-1.43519*Jr)-3.2452))*Ho*Ho+(.848013+Jr*(.215638*Jr-1.06021)))}var Zs=Sr.sub(sr)._mult(wi)._add(sr)._unit()._mult(Ti?-1:1);this.addHalfVertex(Gt,Zs.x,Zs.y,!1,Ti,0,ve)}er&&this.addCurrentVertex(Gt,Sr,-ta,-mo,ve)}else if(Rn==="butt")this.addCurrentVertex(Gt,zr,0,0,ve);else if(Rn==="square"){var ru=Oe?1:-1;this.addCurrentVertex(Gt,zr,ru,ru,ve)}else Rn==="round"&&(Oe&&(this.addCurrentVertex(Gt,sr,0,0,ve),this.addCurrentVertex(Gt,sr,1,1,ve,!0)),er&&(this.addCurrentVertex(Gt,Sr,-1,-1,ve,!0),this.addCurrentVertex(Gt,Sr,0,0,ve)));if(oi&&gr<dt-1){var Ls=Gt.dist(er);if(Ls>2*Qt){var Ds=Gt.add(er.sub(Gt)._mult(Qt/Ls)._round());this.updateDistance(Gt,Ds),this.addCurrentVertex(Ds,Sr,0,0,ve),Gt=Ds}}}}},Vo.prototype.addCurrentVertex=function(f,d,y,T,O,N){N===void 0&&(N=!1);var Z=d.y*T-d.x,q=-d.y-d.x*T;this.addHalfVertex(f,d.x+d.y*y,d.y-d.x*y,N,!1,y,O),this.addHalfVertex(f,Z,q,N,!0,-T,O),this.distance>i0/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(f,d,y,T,O,N))},Vo.prototype.addHalfVertex=function(f,d,y,T,O,N,Z){var q=.5*(this.lineClips?this.scaledDistance*(i0-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((f.x<<1)+(T?1:0),(f.y<<1)+(O?1:0),Math.round(63*d)+128,Math.round(63*y)+128,1+(N===0?0:N<0?-1:1)|(63&q)<<2,q>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);var dt=Z.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,dt),Z.primitiveLength++),O?this.e2=dt:this.e1=dt},Vo.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Vo.prototype.updateDistance=function(f,d){this.distance+=f.dist(d),this.updateScaledDistance()},Hi("LineBucket",Vo,{omit:["layers","patternFeatures"]});var Th=new su({"line-cap":new aa(we.layout_line["line-cap"]),"line-join":new Ii(we.layout_line["line-join"]),"line-miter-limit":new aa(we.layout_line["line-miter-limit"]),"line-round-limit":new aa(we.layout_line["line-round-limit"]),"line-sort-key":new Ii(we.layout_line["line-sort-key"])}),_u={paint:new su({"line-opacity":new Ii(we.paint_line["line-opacity"]),"line-color":new Ii(we.paint_line["line-color"]),"line-translate":new aa(we.paint_line["line-translate"]),"line-translate-anchor":new aa(we.paint_line["line-translate-anchor"]),"line-width":new Ii(we.paint_line["line-width"]),"line-gap-width":new Ii(we.paint_line["line-gap-width"]),"line-offset":new Ii(we.paint_line["line-offset"]),"line-blur":new Ii(we.paint_line["line-blur"]),"line-dasharray":new fl(we.paint_line["line-dasharray"]),"line-pattern":new _h(we.paint_line["line-pattern"]),"line-gradient":new tl(we.paint_line["line-gradient"])}),layout:Th},vl=new(function(f){function d(){f.apply(this,arguments)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.possiblyEvaluate=function(y,T){return T=new io(Math.floor(T.zoom),{now:T.now,fadeDuration:T.fadeDuration,zoomHistory:T.zoomHistory,transition:T.transition}),f.prototype.possiblyEvaluate.call(this,y,T)},d.prototype.evaluate=function(y,T,O,N){return T=b({},T,{zoom:Math.floor(T.zoom)}),f.prototype.evaluate.call(this,y,T,O,N)},d}(Ii))(_u.paint.properties["line-width"].specification);vl.useIntegerZoom=!0;var Td=function(f){function d(y){f.call(this,y,_u),this.gradientVersion=0}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype._handleSpecialPaintPropertyUpdate=function(y){y==="line-gradient"&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof Uu,this.gradientVersion=(this.gradientVersion+1)%_e)},d.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},d.prototype.recalculate=function(y,T){f.prototype.recalculate.call(this,y,T),this.paint._values["line-floorwidth"]=vl.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,y)},d.prototype.createBucket=function(y){return new Vo(y)},d.prototype.queryRadius=function(y){var T=y,O=mv(lc("line-width",this,T),lc("line-gap-width",this,T)),N=lc("line-offset",this,T);return O/2+Math.abs(N)+Fs(this.paint.get("line-translate"))},d.prototype.queryIntersectsFeature=function(y,T,O,N,Z,q,dt){var Pt=Cl(y,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),q.angle,dt),Gt=dt/2*mv(this.paint.get("line-width").evaluate(T,O),this.paint.get("line-gap-width").evaluate(T,O)),Qt=this.paint.get("line-offset").evaluate(T,O);return Qt&&(N=function(ve,Oe){for(var er=[],sr=new J(0,0),Sr=0;Sr<ve.length;Sr++){for(var gr=ve[Sr],zr=[],Jr=0;Jr<gr.length;Jr++){var ln=gr[Jr],yn=gr[Jr+1],Pn=Jr===0?sr:ln.sub(gr[Jr-1])._unit()._perp(),oi=Jr===gr.length-1?sr:yn.sub(ln)._unit()._perp(),Ti=Pn._add(oi)._unit();Ti._mult(1/(Ti.x*oi.x+Ti.y*oi.y)),zr.push(Ti._mult(Oe)._add(ln))}er.push(zr)}return er}(N,Qt*dt)),function(ve,Oe,er){for(var sr=0;sr<Oe.length;sr++){var Sr=Oe[sr];if(ve.length>=3){for(var gr=0;gr<Sr.length;gr++)if(uc(ve,Sr[gr]))return!0}if(Yl(ve,Sr,er))return!0}return!1}(Pt,N,Gt)},d.prototype.isTileClipped=function(){return!0},d}(Sl);function mv(f,d){return d>0?d+2*f:f}var a0=os([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),o0=os([{name:"a_projected_pos",components:3,type:"Float32"}],4),yv=(os([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),os([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),eh=(os([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),os([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),ai=os([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Md(f,d,y){return f.sections.forEach(function(T){T.text=function(O,N,Z){var q=N.layout.get("text-transform").evaluate(Z,{});return q==="uppercase"?O=O.toLocaleUpperCase():q==="lowercase"&&(O=O.toLocaleLowerCase()),cl.applyArabicShaping&&(O=cl.applyArabicShaping(O)),O}(T.text,d,y)}),f}os([{name:"triangle",components:3,type:"Uint16"}]),os([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),os([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),os([{type:"Float32",name:"offsetX"}]),os([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Jh={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"},xu=function(f,d,y,T,O){var N,Z,q=8*O-T-1,dt=(1<<q)-1,Pt=dt>>1,Gt=-7,Qt=y?O-1:0,ve=y?-1:1,Oe=f[d+Qt];for(Qt+=ve,N=Oe&(1<<-Gt)-1,Oe>>=-Gt,Gt+=q;Gt>0;N=256*N+f[d+Qt],Qt+=ve,Gt-=8);for(Z=N&(1<<-Gt)-1,N>>=-Gt,Gt+=T;Gt>0;Z=256*Z+f[d+Qt],Qt+=ve,Gt-=8);if(N===0)N=1-Pt;else{if(N===dt)return Z?NaN:1/0*(Oe?-1:1);Z+=Math.pow(2,T),N-=Pt}return(Oe?-1:1)*Z*Math.pow(2,N-T)},ff=function(f,d,y,T,O,N){var Z,q,dt,Pt=8*N-O-1,Gt=(1<<Pt)-1,Qt=Gt>>1,ve=O===23?Math.pow(2,-24)-Math.pow(2,-77):0,Oe=T?0:N-1,er=T?1:-1,sr=d<0||d===0&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===1/0?(q=isNaN(d)?1:0,Z=Gt):(Z=Math.floor(Math.log(d)/Math.LN2),d*(dt=Math.pow(2,-Z))<1&&(Z--,dt*=2),(d+=Z+Qt>=1?ve/dt:ve*Math.pow(2,1-Qt))*dt>=2&&(Z++,dt/=2),Z+Qt>=Gt?(q=0,Z=Gt):Z+Qt>=1?(q=(d*dt-1)*Math.pow(2,O),Z+=Qt):(q=d*Math.pow(2,Qt-1)*Math.pow(2,O),Z=0));O>=8;f[y+Oe]=255&q,Oe+=er,q/=256,O-=8);for(Z=Z<<O|q,Pt+=O;Pt>0;f[y+Oe]=255&Z,Oe+=er,Z/=256,Pt-=8);f[y+Oe-er]|=128*sr},Tc=Qo;function Qo(f){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(f)?f:new Uint8Array(f||0),this.pos=0,this.type=0,this.length=this.buf.length}Qo.Varint=0,Qo.Fixed64=1,Qo.Bytes=2,Qo.Fixed32=5;var hf=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");function il(f){return f.type===Qo.Bytes?f.readVarint()+f.pos:f.pos+1}function rh(f,d,y){return y?4294967296*d+(f>>>0):4294967296*(d>>>0)+(f>>>0)}function $0(f,d,y){var T=d<=16383?1:d<=2097151?2:d<=268435455?3:Math.floor(Math.log(d)/(7*Math.LN2));y.realloc(T);for(var O=y.pos-1;O>=f;O--)y.buf[O+T]=y.buf[O]}function Hp(f,d){for(var y=0;y<f.length;y++)d.writeVarint(f[y])}function It(f,d){for(var y=0;y<f.length;y++)d.writeSVarint(f[y])}function Pe(f,d){for(var y=0;y<f.length;y++)d.writeFloat(f[y])}function dr(f,d){for(var y=0;y<f.length;y++)d.writeDouble(f[y])}function sn(f,d){for(var y=0;y<f.length;y++)d.writeBoolean(f[y])}function Ln(f,d){for(var y=0;y<f.length;y++)d.writeFixed32(f[y])}function un(f,d){for(var y=0;y<f.length;y++)d.writeSFixed32(f[y])}function bn(f,d){for(var y=0;y<f.length;y++)d.writeFixed64(f[y])}function jr(f,d){for(var y=0;y<f.length;y++)d.writeSFixed64(f[y])}function jn(f,d){return(f[d]|f[d+1]<<8|f[d+2]<<16)+16777216*f[d+3]}function Qn(f,d,y){f[y]=d,f[y+1]=d>>>8,f[y+2]=d>>>16,f[y+3]=d>>>24}function ri(f,d){return(f[d]|f[d+1]<<8|f[d+2]<<16)+(f[d+3]<<24)}function ni(f,d,y){f===1&&y.readMessage(_i,d)}function _i(f,d,y){if(f===3){var T=y.readMessage(qn,{}),O=T.width,N=T.height,Z=T.left,q=T.top,dt=T.advance;d.push({id:T.id,bitmap:new Dl({width:O+6,height:N+6},T.bitmap),metrics:{width:O,height:N,left:Z,top:q,advance:dt}})}}function qn(f,d,y){f===1?d.id=y.readVarint():f===2?d.bitmap=y.readBytes():f===3?d.width=y.readVarint():f===4?d.height=y.readVarint():f===5?d.left=y.readSVarint():f===6?d.top=y.readSVarint():f===7&&(d.advance=y.readVarint())}function ii(f){for(var d=0,y=0,T=0,O=f;T<O.length;T+=1){var N=O[T];d+=N.w*N.h,y=Math.max(y,N.w)}f.sort(function(sr,Sr){return Sr.h-sr.h});for(var Z=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(d/.95)),y),h:1/0}],q=0,dt=0,Pt=0,Gt=f;Pt<Gt.length;Pt+=1)for(var Qt=Gt[Pt],ve=Z.length-1;ve>=0;ve--){var Oe=Z[ve];if(!(Qt.w>Oe.w||Qt.h>Oe.h)){if(Qt.x=Oe.x,Qt.y=Oe.y,dt=Math.max(dt,Qt.y+Qt.h),q=Math.max(q,Qt.x+Qt.w),Qt.w===Oe.w&&Qt.h===Oe.h){var er=Z.pop();ve<Z.length&&(Z[ve]=er)}else Qt.h===Oe.h?(Oe.x+=Qt.w,Oe.w-=Qt.w):Qt.w===Oe.w?(Oe.y+=Qt.h,Oe.h-=Qt.h):(Z.push({x:Oe.x+Qt.w,y:Oe.y,w:Oe.w-Qt.w,h:Qt.h}),Oe.y+=Qt.h,Oe.h-=Qt.h);break}}return{w:q,h:dt,fill:d/(q*dt)||0}}Qo.prototype={destroy:function(){this.buf=null},readFields:function(f,d,y){for(y=y||this.length;this.pos<y;){var T=this.readVarint(),O=T>>3,N=this.pos;this.type=7&T,f(O,d,this),this.pos===N&&this.skip(T)}return d},readMessage:function(f,d){return this.readFields(f,d,this.readVarint()+this.pos)},readFixed32:function(){var f=jn(this.buf,this.pos);return this.pos+=4,f},readSFixed32:function(){var f=ri(this.buf,this.pos);return this.pos+=4,f},readFixed64:function(){var f=jn(this.buf,this.pos)+4294967296*jn(this.buf,this.pos+4);return this.pos+=8,f},readSFixed64:function(){var f=jn(this.buf,this.pos)+4294967296*ri(this.buf,this.pos+4);return this.pos+=8,f},readFloat:function(){var f=xu(this.buf,this.pos,!0,23,4);return this.pos+=4,f},readDouble:function(){var f=xu(this.buf,this.pos,!0,52,8);return this.pos+=8,f},readVarint:function(f){var d,y,T=this.buf;return d=127&(y=T[this.pos++]),y<128?d:(d|=(127&(y=T[this.pos++]))<<7,y<128?d:(d|=(127&(y=T[this.pos++]))<<14,y<128?d:(d|=(127&(y=T[this.pos++]))<<21,y<128?d:function(O,N,Z){var q,dt,Pt=Z.buf;if(q=(112&(dt=Pt[Z.pos++]))>>4,dt<128||(q|=(127&(dt=Pt[Z.pos++]))<<3,dt<128)||(q|=(127&(dt=Pt[Z.pos++]))<<10,dt<128)||(q|=(127&(dt=Pt[Z.pos++]))<<17,dt<128)||(q|=(127&(dt=Pt[Z.pos++]))<<24,dt<128)||(q|=(1&(dt=Pt[Z.pos++]))<<31,dt<128))return rh(O,q,N);throw new Error("Expected varint not more than 10 bytes")}(d|=(15&(y=T[this.pos]))<<28,f,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var f=this.readVarint();return f%2==1?(f+1)/-2:f/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var f=this.readVarint()+this.pos,d=this.pos;return this.pos=f,f-d>=12&&hf?function(y,T,O){return hf.decode(y.subarray(T,O))}(this.buf,d,f):function(y,T,O){for(var N="",Z=T;Z<O;){var q,dt,Pt,Gt=y[Z],Qt=null,ve=Gt>239?4:Gt>223?3:Gt>191?2:1;if(Z+ve>O)break;ve===1?Gt<128&&(Qt=Gt):ve===2?(192&(q=y[Z+1]))==128&&(Qt=(31&Gt)<<6|63&q)<=127&&(Qt=null):ve===3?(dt=y[Z+2],(192&(q=y[Z+1]))==128&&(192&dt)==128&&((Qt=(15&Gt)<<12|(63&q)<<6|63&dt)<=2047||Qt>=55296&&Qt<=57343)&&(Qt=null)):ve===4&&(dt=y[Z+2],Pt=y[Z+3],(192&(q=y[Z+1]))==128&&(192&dt)==128&&(192&Pt)==128&&((Qt=(15&Gt)<<18|(63&q)<<12|(63&dt)<<6|63&Pt)<=65535||Qt>=1114112)&&(Qt=null)),Qt===null?(Qt=65533,ve=1):Qt>65535&&(Qt-=65536,N+=String.fromCharCode(Qt>>>10&1023|55296),Qt=56320|1023&Qt),N+=String.fromCharCode(Qt),Z+=ve}return N}(this.buf,d,f)},readBytes:function(){var f=this.readVarint()+this.pos,d=this.buf.subarray(this.pos,f);return this.pos=f,d},readPackedVarint:function(f,d){if(this.type!==Qo.Bytes)return f.push(this.readVarint(d));var y=il(this);for(f=f||[];this.pos<y;)f.push(this.readVarint(d));return f},readPackedSVarint:function(f){if(this.type!==Qo.Bytes)return f.push(this.readSVarint());var d=il(this);for(f=f||[];this.pos<d;)f.push(this.readSVarint());return f},readPackedBoolean:function(f){if(this.type!==Qo.Bytes)return f.push(this.readBoolean());var d=il(this);for(f=f||[];this.pos<d;)f.push(this.readBoolean());return f},readPackedFloat:function(f){if(this.type!==Qo.Bytes)return f.push(this.readFloat());var d=il(this);for(f=f||[];this.pos<d;)f.push(this.readFloat());return f},readPackedDouble:function(f){if(this.type!==Qo.Bytes)return f.push(this.readDouble());var d=il(this);for(f=f||[];this.pos<d;)f.push(this.readDouble());return f},readPackedFixed32:function(f){if(this.type!==Qo.Bytes)return f.push(this.readFixed32());var d=il(this);for(f=f||[];this.pos<d;)f.push(this.readFixed32());return f},readPackedSFixed32:function(f){if(this.type!==Qo.Bytes)return f.push(this.readSFixed32());var d=il(this);for(f=f||[];this.pos<d;)f.push(this.readSFixed32());return f},readPackedFixed64:function(f){if(this.type!==Qo.Bytes)return f.push(this.readFixed64());var d=il(this);for(f=f||[];this.pos<d;)f.push(this.readFixed64());return f},readPackedSFixed64:function(f){if(this.type!==Qo.Bytes)return f.push(this.readSFixed64());var d=il(this);for(f=f||[];this.pos<d;)f.push(this.readSFixed64());return f},skip:function(f){var d=7&f;if(d===Qo.Varint)for(;this.buf[this.pos++]>127;);else if(d===Qo.Bytes)this.pos=this.readVarint()+this.pos;else if(d===Qo.Fixed32)this.pos+=4;else{if(d!==Qo.Fixed64)throw new Error("Unimplemented type: "+d);this.pos+=8}},writeTag:function(f,d){this.writeVarint(f<<3|d)},realloc:function(f){for(var d=this.length||16;d<this.pos+f;)d*=2;if(d!==this.length){var y=new Uint8Array(d);y.set(this.buf),this.buf=y,this.length=d}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(f){this.realloc(4),Qn(this.buf,f,this.pos),this.pos+=4},writeSFixed32:function(f){this.realloc(4),Qn(this.buf,f,this.pos),this.pos+=4},writeFixed64:function(f){this.realloc(8),Qn(this.buf,-1&f,this.pos),Qn(this.buf,Math.floor(f*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(f){this.realloc(8),Qn(this.buf,-1&f,this.pos),Qn(this.buf,Math.floor(f*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(f){(f=+f||0)>268435455||f<0?function(d,y){var T,O;if(d>=0?(T=d%4294967296|0,O=d/4294967296|0):(O=~(-d/4294967296),4294967295^(T=~(-d%4294967296))?T=T+1|0:(T=0,O=O+1|0)),d>=18446744073709552e3||d<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");y.realloc(10),function(N,Z,q){q.buf[q.pos++]=127&N|128,N>>>=7,q.buf[q.pos++]=127&N|128,N>>>=7,q.buf[q.pos++]=127&N|128,N>>>=7,q.buf[q.pos++]=127&N|128,q.buf[q.pos]=127&(N>>>=7)}(T,0,y),function(N,Z){var q=(7&N)<<4;Z.buf[Z.pos++]|=q|((N>>>=3)?128:0),N&&(Z.buf[Z.pos++]=127&N|((N>>>=7)?128:0),N&&(Z.buf[Z.pos++]=127&N|((N>>>=7)?128:0),N&&(Z.buf[Z.pos++]=127&N|((N>>>=7)?128:0),N&&(Z.buf[Z.pos++]=127&N|((N>>>=7)?128:0),N&&(Z.buf[Z.pos++]=127&N)))))}(O,y)}(f,this):(this.realloc(4),this.buf[this.pos++]=127&f|(f>127?128:0),f<=127||(this.buf[this.pos++]=127&(f>>>=7)|(f>127?128:0),f<=127||(this.buf[this.pos++]=127&(f>>>=7)|(f>127?128:0),f<=127||(this.buf[this.pos++]=f>>>7&127))))},writeSVarint:function(f){this.writeVarint(f<0?2*-f-1:2*f)},writeBoolean:function(f){this.writeVarint(Boolean(f))},writeString:function(f){f=String(f),this.realloc(4*f.length),this.pos++;var d=this.pos;this.pos=function(T,O,N){for(var Z,q,dt=0;dt<O.length;dt++){if((Z=O.charCodeAt(dt))>55295&&Z<57344){if(!q){Z>56319||dt+1===O.length?(T[N++]=239,T[N++]=191,T[N++]=189):q=Z;continue}if(Z<56320){T[N++]=239,T[N++]=191,T[N++]=189,q=Z;continue}Z=q-55296<<10|Z-56320|65536,q=null}else q&&(T[N++]=239,T[N++]=191,T[N++]=189,q=null);Z<128?T[N++]=Z:(Z<2048?T[N++]=Z>>6|192:(Z<65536?T[N++]=Z>>12|224:(T[N++]=Z>>18|240,T[N++]=Z>>12&63|128),T[N++]=Z>>6&63|128),T[N++]=63&Z|128)}return N}(this.buf,f,this.pos);var y=this.pos-d;y>=128&&$0(d,y,this),this.pos=d-1,this.writeVarint(y),this.pos+=y},writeFloat:function(f){this.realloc(4),ff(this.buf,f,this.pos,!0,23,4),this.pos+=4},writeDouble:function(f){this.realloc(8),ff(this.buf,f,this.pos,!0,52,8),this.pos+=8},writeBytes:function(f){var d=f.length;this.writeVarint(d),this.realloc(d);for(var y=0;y<d;y++)this.buf[this.pos++]=f[y]},writeRawMessage:function(f,d){this.pos++;var y=this.pos;f(d,this);var T=this.pos-y;T>=128&&$0(y,T,this),this.pos=y-1,this.writeVarint(T),this.pos+=T},writeMessage:function(f,d,y){this.writeTag(f,Qo.Bytes),this.writeRawMessage(d,y)},writePackedVarint:function(f,d){d.length&&this.writeMessage(f,Hp,d)},writePackedSVarint:function(f,d){d.length&&this.writeMessage(f,It,d)},writePackedBoolean:function(f,d){d.length&&this.writeMessage(f,sn,d)},writePackedFloat:function(f,d){d.length&&this.writeMessage(f,Pe,d)},writePackedDouble:function(f,d){d.length&&this.writeMessage(f,dr,d)},writePackedFixed32:function(f,d){d.length&&this.writeMessage(f,Ln,d)},writePackedSFixed32:function(f,d){d.length&&this.writeMessage(f,un,d)},writePackedFixed64:function(f,d){d.length&&this.writeMessage(f,bn,d)},writePackedSFixed64:function(f,d){d.length&&this.writeMessage(f,jr,d)},writeBytesField:function(f,d){this.writeTag(f,Qo.Bytes),this.writeBytes(d)},writeFixed32Field:function(f,d){this.writeTag(f,Qo.Fixed32),this.writeFixed32(d)},writeSFixed32Field:function(f,d){this.writeTag(f,Qo.Fixed32),this.writeSFixed32(d)},writeFixed64Field:function(f,d){this.writeTag(f,Qo.Fixed64),this.writeFixed64(d)},writeSFixed64Field:function(f,d){this.writeTag(f,Qo.Fixed64),this.writeSFixed64(d)},writeVarintField:function(f,d){this.writeTag(f,Qo.Varint),this.writeVarint(d)},writeSVarintField:function(f,d){this.writeTag(f,Qo.Varint),this.writeSVarint(d)},writeStringField:function(f,d){this.writeTag(f,Qo.Bytes),this.writeString(d)},writeFloatField:function(f,d){this.writeTag(f,Qo.Fixed32),this.writeFloat(d)},writeDoubleField:function(f,d){this.writeTag(f,Qo.Fixed64),this.writeDouble(d)},writeBooleanField:function(f,d){this.writeVarintField(f,Boolean(d))}};var Gr=function(f,d){var y=d.pixelRatio,T=d.version,O=d.stretchX,N=d.stretchY,Z=d.content;this.paddedRect=f,this.pixelRatio=y,this.stretchX=O,this.stretchY=N,this.content=Z,this.version=T},mn={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};mn.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},mn.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},mn.tlbr.get=function(){return this.tl.concat(this.br)},mn.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Gr.prototype,mn);var Vn=function(f,d){var y={},T={};this.haveRenderCallbacks=[];var O=[];this.addImages(f,y,O),this.addImages(d,T,O);var N=ii(O),Z=new uu({width:N.w||1,height:N.h||1});for(var q in f){var dt=f[q],Pt=y[q].paddedRect;uu.copy(dt.data,Z,{x:0,y:0},{x:Pt.x+1,y:Pt.y+1},dt.data)}for(var Gt in d){var Qt=d[Gt],ve=T[Gt].paddedRect,Oe=ve.x+1,er=ve.y+1,sr=Qt.data.width,Sr=Qt.data.height;uu.copy(Qt.data,Z,{x:0,y:0},{x:Oe,y:er},Qt.data),uu.copy(Qt.data,Z,{x:0,y:Sr-1},{x:Oe,y:er-1},{width:sr,height:1}),uu.copy(Qt.data,Z,{x:0,y:0},{x:Oe,y:er+Sr},{width:sr,height:1}),uu.copy(Qt.data,Z,{x:sr-1,y:0},{x:Oe-1,y:er},{width:1,height:Sr}),uu.copy(Qt.data,Z,{x:0,y:0},{x:Oe+sr,y:er},{width:1,height:Sr})}this.image=Z,this.iconPositions=y,this.patternPositions=T};Vn.prototype.addImages=function(f,d,y){for(var T in f){var O=f[T],N={x:0,y:0,w:O.data.width+2,h:O.data.height+2};y.push(N),d[T]=new Gr(N,O),O.hasRenderCallback&&this.haveRenderCallbacks.push(T)}},Vn.prototype.patchUpdatedImages=function(f,d){for(var y in f.dispatchRenderCallbacks(this.haveRenderCallbacks),f.updatedImages)this.patchUpdatedImage(this.iconPositions[y],f.getImage(y),d),this.patchUpdatedImage(this.patternPositions[y],f.getImage(y),d)},Vn.prototype.patchUpdatedImage=function(f,d,y){if(f&&d&&f.version!==d.version){f.version=d.version;var T=f.tl;y.update(d.data,void 0,{x:T[0],y:T[1]})}},Hi("ImagePosition",Gr),Hi("ImageAtlas",Vn);var di={horizontal:1,vertical:2,horizontalOnly:3},Bn=function(){this.scale=1,this.fontStack="",this.imageName=null};Bn.forText=function(f,d){var y=new Bn;return y.scale=f||1,y.fontStack=d,y},Bn.forImage=function(f){var d=new Bn;return d.imageName=f,d};var hi=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function Li(f,d,y,T,O,N,Z,q,dt,Pt,Gt,Qt,ve,Oe,er,sr){var Sr,gr=hi.fromFeature(f,O);Qt===di.vertical&&gr.verticalizePunctuation();var zr=cl.processBidirectionalText,Jr=cl.processStyledBidirectionalText;if(zr&&gr.sections.length===1){Sr=[];for(var ln=0,yn=zr(gr.toString(),vi(gr,Pt,N,d,T,Oe,er));ln<yn.length;ln+=1){var Pn=yn[ln],oi=new hi;oi.text=Pn,oi.sections=gr.sections;for(var Ti=0;Ti<Pn.length;Ti++)oi.sectionIndex.push(0);Sr.push(oi)}}else if(Jr){Sr=[];for(var oa=0,Vi=Jr(gr.text,gr.sectionIndex,vi(gr,Pt,N,d,T,Oe,er));oa<Vi.length;oa+=1){var da=Vi[oa],Rn=new hi;Rn.text=da[0],Rn.sectionIndex=da[1],Rn.sections=gr.sections,Sr.push(Rn)}}else Sr=function(ta,mo){for(var Wa=[],po=ta.text,wi=0,Ho=0,Zs=mo;Ho<Zs.length;Ho+=1){var ru=Zs[Ho];Wa.push(ta.substring(wi,ru)),wi=ru}return wi<po.length&&Wa.push(ta.substring(wi,po.length)),Wa}(gr,vi(gr,Pt,N,d,T,Oe,er));var Ri=[],na={positionedLines:Ri,text:gr.toString(),top:Gt[1],bottom:Gt[1],left:Gt[0],right:Gt[0],writingMode:Qt,iconsInText:!1,verticalizable:!1};return function(ta,mo,Wa,po,wi,Ho,Zs,ru,Ls,Ds,cu,Vs){for(var Eu=0,Wu=-17,ml=0,Tl=0,Du=ru==="right"?1:ru==="left"?0:.5,yl=0,Ja=0,ms=wi;Ja<ms.length;Ja+=1){var fs=ms[Ja];fs.trim();var Bo=fs.getMaxScale(),Ql=24*(Bo-1),Nl={positionedGlyphs:[],lineOffset:0};ta.positionedLines[yl]=Nl;var Bs=Nl.positionedGlyphs,wu=0;if(fs.length()){for(var al=0;al<fs.length();al++){var Fo=fs.getSection(al),ah=fs.getSectionIndex(al),Ml=fs.getCharCode(al),ep=0,Su=null,rp=null,Nf=null,kd=24,Ld=!(Ls===di.horizontal||!cu&&!mh(Ml)||cu&&(la[Ml]||(ol=Ml,ei.Arabic(ol)||ei["Arabic Supplement"](ol)||ei["Arabic Extended-A"](ol)||ei["Arabic Presentation Forms-A"](ol)||ei["Arabic Presentation Forms-B"](ol))));if(Fo.imageName){var l0=po[Fo.imageName];if(!l0)continue;Nf=Fo.imageName,ta.iconsInText=ta.iconsInText||!0,rp=l0.paddedRect;var np=l0.displaySize;Fo.scale=24*Fo.scale/Vs,ep=Ql+(24-np[1]*Fo.scale),kd=(Su={width:np[0],height:np[1],left:1,top:-3,advance:Ld?np[1]:np[0]}).advance;var Pd=Ld?np[0]*Fo.scale-24*Bo:np[1]*Fo.scale-24*Bo;Pd>0&&Pd>wu&&(wu=Pd)}else{var q0=Wa[Fo.fontStack],oh=q0&&q0[Ml];if(oh&&oh.rect)rp=oh.rect,Su=oh.metrics;else{var xv=mo[Fo.fontStack],bv=xv&&xv[Ml];if(!bv)continue;Su=bv.metrics}ep=24*(Bo-Fo.scale)}Ld?(ta.verticalizable=!0,Bs.push({glyph:Ml,imageName:Nf,x:Eu,y:Wu+ep,vertical:Ld,scale:Fo.scale,fontStack:Fo.fontStack,sectionIndex:ah,metrics:Su,rect:rp}),Eu+=kd*Fo.scale+Ds):(Bs.push({glyph:Ml,imageName:Nf,x:Eu,y:Wu+ep,vertical:Ld,scale:Fo.scale,fontStack:Fo.fontStack,sectionIndex:ah,metrics:Su,rect:rp}),Eu+=Su.advance*Fo.scale+Ds)}Bs.length!==0&&(ml=Math.max(Eu-Ds,ml),Ua(Bs,0,Bs.length-1,Du,wu)),Eu=0;var $s=Ho*Bo+wu;Nl.lineOffset=Math.max(wu,Ql),Wu+=$s,Tl=Math.max($s,Tl),++yl}else Wu+=Ho,++yl}var ol,pf=Wu- -17,Od=pi(Zs),Ih=Od.horizontalAlign,Fd=Od.verticalAlign;(function(Yp,c0,Ev,K0,Dg,$p,hs,df,is){var Jl,wv=(c0-Ev)*Dg;Jl=$p!==hs?-df*K0- -17:(-K0*is+.5)*hs;for(var Rd=0,f0=Yp;Rd<f0.length;Rd+=1)for(var Dd=0,h0=f0[Rd].positionedGlyphs;Dd<h0.length;Dd+=1){var Bd=h0[Dd];Bd.x+=wv,Bd.y+=Jl}})(ta.positionedLines,Du,Ih,Fd,ml,Tl,Ho,pf,wi.length),ta.top+=-Fd*pf,ta.bottom=ta.top+pf,ta.left+=-Ih*ml,ta.right=ta.left+ml}(na,d,y,T,Sr,Z,q,dt,Qt,Pt,ve,sr),!function(ta){for(var mo=0,Wa=ta;mo<Wa.length;mo+=1)if(Wa[mo].positionedGlyphs.length!==0)return!1;return!0}(Ri)&&na}hi.fromFeature=function(f,d){for(var y=new hi,T=0;T<f.sections.length;T++){var O=f.sections[T];O.image?y.addImageSection(O):y.addTextSection(O,d)}return y},hi.prototype.length=function(){return this.text.length},hi.prototype.getSection=function(f){return this.sections[this.sectionIndex[f]]},hi.prototype.getSectionIndex=function(f){return this.sectionIndex[f]},hi.prototype.getCharCode=function(f){return this.text.charCodeAt(f)},hi.prototype.verticalizePunctuation=function(){this.text=function(f){for(var d="",y=0;y<f.length;y++){var T=f.charCodeAt(y+1)||null,O=f.charCodeAt(y-1)||null;d+=T&&yc(T)&&!Jh[f[y+1]]||O&&yc(O)&&!Jh[f[y-1]]||!Jh[f[y]]?f[y]:Jh[f[y]]}return d}(this.text)},hi.prototype.trim=function(){for(var f=0,d=0;d<this.text.length&&la[this.text.charCodeAt(d)];d++)f++;for(var y=this.text.length,T=this.text.length-1;T>=0&&T>=f&&la[this.text.charCodeAt(T)];T--)y--;this.text=this.text.substring(f,y),this.sectionIndex=this.sectionIndex.slice(f,y)},hi.prototype.substring=function(f,d){var y=new hi;return y.text=this.text.substring(f,d),y.sectionIndex=this.sectionIndex.slice(f,d),y.sections=this.sections,y},hi.prototype.toString=function(){return this.text},hi.prototype.getMaxScale=function(){var f=this;return this.sectionIndex.reduce(function(d,y){return Math.max(d,f.sections[y].scale)},0)},hi.prototype.addTextSection=function(f,d){this.text+=f.text,this.sections.push(Bn.forText(f.scale,f.fontStack||d));for(var y=this.sections.length-1,T=0;T<f.text.length;++T)this.sectionIndex.push(y)},hi.prototype.addImageSection=function(f){var d=f.image?f.image.name:"";if(d.length!==0){var y=this.getNextImageSectionCharCode();y?(this.text+=String.fromCharCode(y),this.sections.push(Bn.forImage(d)),this.sectionIndex.push(this.sections.length-1)):Ue("Reached maximum number of images 6401")}else Ue("Can't add FormattedSection with an empty image.")},hi.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var la={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},En={};function Mn(f,d,y,T,O,N){if(d.imageName){var Z=T[d.imageName];return Z?Z.displaySize[0]*d.scale*24/N+O:0}var q=y[d.fontStack],dt=q&&q[f];return dt?dt.metrics.advance*d.scale+O:0}function Xi(f,d,y,T){var O=Math.pow(f-d,2);return T?f<d?O/2:2*O:O+Math.abs(y)*y}function Si(f,d,y){var T=0;return f===10&&(T-=1e4),y&&(T+=150),f!==40&&f!==65288||(T+=50),d!==41&&d!==65289||(T+=50),T}function Jn(f,d,y,T,O,N){for(var Z=null,q=Xi(d,y,O,N),dt=0,Pt=T;dt<Pt.length;dt+=1){var Gt=Pt[dt],Qt=Xi(d-Gt.x,y,O,N)+Gt.badness;Qt<=q&&(Z=Gt,q=Qt)}return{index:f,x:d,priorBreak:Z,badness:q}}function vi(f,d,y,T,O,N,Z){if(N!=="point")return[];if(!f)return[];for(var q,dt=[],Pt=function(Sr,gr,zr,Jr,ln,yn){for(var Pn=0,oi=0;oi<Sr.length();oi++){var Ti=Sr.getSection(oi);Pn+=Mn(Sr.getCharCode(oi),Ti,Jr,ln,gr,yn)}return Pn/Math.max(1,Math.ceil(Pn/zr))}(f,d,y,T,O,Z),Gt=f.text.indexOf("\u200B")>=0,Qt=0,ve=0;ve<f.length();ve++){var Oe=f.getSection(ve),er=f.getCharCode(ve);if(la[er]||(Qt+=Mn(er,Oe,T,O,d,Z)),ve<f.length()-1){var sr=!((q=er)<11904||!(ei["Bopomofo Extended"](q)||ei.Bopomofo(q)||ei["CJK Compatibility Forms"](q)||ei["CJK Compatibility Ideographs"](q)||ei["CJK Compatibility"](q)||ei["CJK Radicals Supplement"](q)||ei["CJK Strokes"](q)||ei["CJK Symbols and Punctuation"](q)||ei["CJK Unified Ideographs Extension A"](q)||ei["CJK Unified Ideographs"](q)||ei["Enclosed CJK Letters and Months"](q)||ei["Halfwidth and Fullwidth Forms"](q)||ei.Hiragana(q)||ei["Ideographic Description Characters"](q)||ei["Kangxi Radicals"](q)||ei["Katakana Phonetic Extensions"](q)||ei.Katakana(q)||ei["Vertical Forms"](q)||ei["Yi Radicals"](q)||ei["Yi Syllables"](q)));(En[er]||sr||Oe.imageName)&&dt.push(Jn(ve+1,Qt,Pt,dt,Si(er,f.getCharCode(ve+1),sr&&Gt),!1))}}return function Sr(gr){return gr?Sr(gr.priorBreak).concat(gr.index):[]}(Jn(f.length(),Qt,Pt,dt,0,!0))}function pi(f){var d=.5,y=.5;switch(f){case"right":case"top-right":case"bottom-right":d=1;break;case"left":case"top-left":case"bottom-left":d=0}switch(f){case"bottom":case"bottom-right":case"bottom-left":y=1;break;case"top":case"top-right":case"top-left":y=0}return{horizontalAlign:d,verticalAlign:y}}function Ua(f,d,y,T,O){if(T||O)for(var N=f[y],Z=(f[y].x+N.metrics.advance*N.scale)*T,q=d;q<=y;q++)f[q].x-=Z,f[q].y+=O}function Ca(f,d,y,T,O,N){var Z,q=f.image;if(q.content){var dt=q.content,Pt=q.pixelRatio||1;Z=[dt[0]/Pt,dt[1]/Pt,q.displaySize[0]-dt[2]/Pt,q.displaySize[1]-dt[3]/Pt]}var Gt,Qt,ve,Oe,er=d.left*N,sr=d.right*N;y==="width"||y==="both"?(Oe=O[0]+er-T[3],Qt=O[0]+sr+T[1]):Qt=(Oe=O[0]+(er+sr-q.displaySize[0])/2)+q.displaySize[0];var Sr=d.top*N,gr=d.bottom*N;return y==="height"||y==="both"?(Gt=O[1]+Sr-T[0],ve=O[1]+gr+T[2]):ve=(Gt=O[1]+(Sr+gr-q.displaySize[1])/2)+q.displaySize[1],{image:q,top:Gt,right:Qt,bottom:ve,left:Oe,collisionPadding:Z}}En[10]=!0,En[32]=!0,En[38]=!0,En[40]=!0,En[41]=!0,En[43]=!0,En[45]=!0,En[47]=!0,En[173]=!0,En[183]=!0,En[8203]=!0,En[8208]=!0,En[8211]=!0,En[8231]=!0;var Ci=function(f){function d(y,T,O,N){f.call(this,y,T),this.angle=O,N!==void 0&&(this.segment=N)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.clone=function(){return new d(this.x,this.y,this.angle,this.segment)},d}(J);function Pi(f,d){var y=d.expression;if(y.kind==="constant")return{kind:"constant",layoutSize:y.evaluate(new io(f+1))};if(y.kind==="source")return{kind:"source"};for(var T=y.zoomStops,O=y.interpolationType,N=0;N<T.length&&T[N]<=f;)N++;for(var Z=N=Math.max(0,N-1);Z<T.length&&T[Z]<f+1;)Z++;Z=Math.min(T.length-1,Z);var q=T[N],dt=T[Z];return y.kind==="composite"?{kind:"composite",minZoom:q,maxZoom:dt,interpolationType:O}:{kind:"camera",minZoom:q,maxZoom:dt,minSize:y.evaluate(new io(q)),maxSize:y.evaluate(new io(dt)),interpolationType:O}}function ma(f,d,y){var T=d.uSize,O=y.lowerSize;return f.kind==="source"?O/128:f.kind==="composite"?Uo(O/128,y.upperSize/128,d.uSizeT):T}function Ma(f,d){var y=0,T=0;if(f.kind==="constant")T=f.layoutSize;else if(f.kind!=="source"){var O=f.interpolationType,N=O?zt(He.interpolationFactor(O,d,f.minZoom,f.maxZoom),0,1):0;f.kind==="camera"?T=Uo(f.minSize,f.maxSize,N):y=N}return{uSizeT:y,uSize:T}}Hi("Anchor",Ci);var lo=Object.freeze({__proto__:null,getSizeData:Pi,evaluateSizeForFeature:ma,evaluateSizeForZoom:Ma,SIZE_PACK_FACTOR:128});function Is(f,d,y,T,O){if(d.segment===void 0)return!0;for(var N=d,Z=d.segment+1,q=0;q>-y/2;){if(--Z<0)return!1;q-=f[Z].dist(N),N=f[Z]}q+=f[Z].dist(f[Z+1]),Z++;for(var dt=[],Pt=0;q<y/2;){var Gt=f[Z],Qt=f[Z+1];if(!Qt)return!1;var ve=f[Z-1].angleTo(Gt)-Gt.angleTo(Qt);for(ve=Math.abs((ve+3*Math.PI)%(2*Math.PI)-Math.PI),dt.push({distance:q,angleDelta:ve}),Pt+=ve;q-dt[0].distance>T;)Pt-=dt.shift().angleDelta;if(Pt>O)return!1;Z++,q+=Gt.dist(Qt)}return!0}function ks(f){for(var d=0,y=0;y<f.length-1;y++)d+=f[y].dist(f[y+1]);return d}function co(f,d,y){return f?.6*d*y:0}function Go(f,d){return Math.max(f?f.right-f.left:0,d?d.right-d.left:0)}function Ts(f,d,y,T,O,N){for(var Z=co(y,O,N),q=Go(y,T)*N,dt=0,Pt=ks(f)/2,Gt=0;Gt<f.length-1;Gt++){var Qt=f[Gt],ve=f[Gt+1],Oe=Qt.dist(ve);if(dt+Oe>Pt){var er=(Pt-dt)/Oe,sr=Uo(Qt.x,ve.x,er),Sr=Uo(Qt.y,ve.y,er),gr=new Ci(sr,Sr,ve.angleTo(Qt),Gt);return gr._round(),!Z||Is(f,gr,q,Z,d)?gr:void 0}dt+=Oe}}function bu(f,d,y,T,O,N,Z,q,dt){var Pt=co(T,N,Z),Gt=Go(T,O),Qt=Gt*Z,ve=f[0].x===0||f[0].x===dt||f[0].y===0||f[0].y===dt;return d-Qt<d/4&&(d=Qt+d/4),function Oe(er,sr,Sr,gr,zr,Jr,ln,yn,Pn){for(var oi=Jr/2,Ti=ks(er),oa=0,Vi=sr-Sr,da=[],Rn=0;Rn<er.length-1;Rn++){for(var Ri=er[Rn],na=er[Rn+1],ta=Ri.dist(na),mo=na.angleTo(Ri);Vi+Sr<oa+ta;){var Wa=((Vi+=Sr)-oa)/ta,po=Uo(Ri.x,na.x,Wa),wi=Uo(Ri.y,na.y,Wa);if(po>=0&&po<Pn&&wi>=0&&wi<Pn&&Vi-oi>=0&&Vi+oi<=Ti){var Ho=new Ci(po,wi,mo,Rn);Ho._round(),gr&&!Is(er,Ho,Jr,gr,zr)||da.push(Ho)}}oa+=ta}return yn||da.length||ln||(da=Oe(er,oa/2,Sr,gr,zr,Jr,ln,!0,Pn)),da}(f,ve?d/2*q%d:(Gt/2+2*N)*Z*q%d,d,Pt,y,Qt,ve,!1,dt)}function ns(f,d,y,T,O){for(var N=[],Z=0;Z<f.length;Z++)for(var q=f[Z],dt=void 0,Pt=0;Pt<q.length-1;Pt++){var Gt=q[Pt],Qt=q[Pt+1];Gt.x<d&&Qt.x<d||(Gt.x<d?Gt=new J(d,Gt.y+(d-Gt.x)/(Qt.x-Gt.x)*(Qt.y-Gt.y))._round():Qt.x<d&&(Qt=new J(d,Gt.y+(d-Gt.x)/(Qt.x-Gt.x)*(Qt.y-Gt.y))._round()),Gt.y<y&&Qt.y<y||(Gt.y<y?Gt=new J(Gt.x+(y-Gt.y)/(Qt.y-Gt.y)*(Qt.x-Gt.x),y)._round():Qt.y<y&&(Qt=new J(Gt.x+(y-Gt.y)/(Qt.y-Gt.y)*(Qt.x-Gt.x),y)._round()),Gt.x>=T&&Qt.x>=T||(Gt.x>=T?Gt=new J(T,Gt.y+(T-Gt.x)/(Qt.x-Gt.x)*(Qt.y-Gt.y))._round():Qt.x>=T&&(Qt=new J(T,Gt.y+(T-Gt.x)/(Qt.x-Gt.x)*(Qt.y-Gt.y))._round()),Gt.y>=O&&Qt.y>=O||(Gt.y>=O?Gt=new J(Gt.x+(O-Gt.y)/(Qt.y-Gt.y)*(Qt.x-Gt.x),O)._round():Qt.y>=O&&(Qt=new J(Gt.x+(O-Gt.y)/(Qt.y-Gt.y)*(Qt.x-Gt.x),O)._round()),dt&&Gt.equals(dt[dt.length-1])||N.push(dt=[Gt]),dt.push(Qt)))))}return N}function Ou(f,d,y,T){var O=[],N=f.image,Z=N.pixelRatio,q=N.paddedRect.w-2,dt=N.paddedRect.h-2,Pt=f.right-f.left,Gt=f.bottom-f.top,Qt=N.stretchX||[[0,q]],ve=N.stretchY||[[0,dt]],Oe=function(po,wi){return po+wi[1]-wi[0]},er=Qt.reduce(Oe,0),sr=ve.reduce(Oe,0),Sr=q-er,gr=dt-sr,zr=0,Jr=er,ln=0,yn=sr,Pn=0,oi=Sr,Ti=0,oa=gr;if(N.content&&T){var Vi=N.content;zr=Ys(Qt,0,Vi[0]),ln=Ys(ve,0,Vi[1]),Jr=Ys(Qt,Vi[0],Vi[2]),yn=Ys(ve,Vi[1],Vi[3]),Pn=Vi[0]-zr,Ti=Vi[1]-ln,oi=Vi[2]-Vi[0]-Jr,oa=Vi[3]-Vi[1]-yn}var da=function(po,wi,Ho,Zs){var ru=Rs(po.stretch-zr,Jr,Pt,f.left),Ls=Na(po.fixed-Pn,oi,po.stretch,er),Ds=Rs(wi.stretch-ln,yn,Gt,f.top),cu=Na(wi.fixed-Ti,oa,wi.stretch,sr),Vs=Rs(Ho.stretch-zr,Jr,Pt,f.left),Eu=Na(Ho.fixed-Pn,oi,Ho.stretch,er),Wu=Rs(Zs.stretch-ln,yn,Gt,f.top),ml=Na(Zs.fixed-Ti,oa,Zs.stretch,sr),Tl=new J(ru,Ds),Du=new J(Vs,Ds),yl=new J(Vs,Wu),Ja=new J(ru,Wu),ms=new J(Ls/Z,cu/Z),fs=new J(Eu/Z,ml/Z),Bo=d*Math.PI/180;if(Bo){var Ql=Math.sin(Bo),Nl=Math.cos(Bo),Bs=[Nl,-Ql,Ql,Nl];Tl._matMult(Bs),Du._matMult(Bs),Ja._matMult(Bs),yl._matMult(Bs)}var wu=po.stretch+po.fixed,al=wi.stretch+wi.fixed;return{tl:Tl,tr:Du,bl:Ja,br:yl,tex:{x:N.paddedRect.x+1+wu,y:N.paddedRect.y+1+al,w:Ho.stretch+Ho.fixed-wu,h:Zs.stretch+Zs.fixed-al},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ms,pixelOffsetBR:fs,minFontScaleX:oi/Z/Pt,minFontScaleY:oa/Z/Gt,isSDF:y}};if(T&&(N.stretchX||N.stretchY))for(var Rn=ju(Qt,Sr,er),Ri=ju(ve,gr,sr),na=0;na<Rn.length-1;na++)for(var ta=Rn[na],mo=Rn[na+1],Wa=0;Wa<Ri.length-1;Wa++)O.push(da(ta,Ri[Wa],mo,Ri[Wa+1]));else O.push(da({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:q+1},{fixed:0,stretch:dt+1}));return O}function Ys(f,d,y){for(var T=0,O=0,N=f;O<N.length;O+=1){var Z=N[O];T+=Math.max(d,Math.min(y,Z[1]))-Math.max(d,Math.min(y,Z[0]))}return T}function ju(f,d,y){for(var T=[{fixed:-1,stretch:0}],O=0,N=f;O<N.length;O+=1){var Z=N[O],q=Z[0],dt=Z[1],Pt=T[T.length-1];T.push({fixed:q-Pt.stretch,stretch:Pt.stretch}),T.push({fixed:q-Pt.stretch,stretch:Pt.stretch+(dt-q)})}return T.push({fixed:d+1,stretch:y}),T}function Rs(f,d,y,T){return f/d*y+T}function Na(f,d,y,T){return f-d*y/T}var eu=function(f,d,y,T,O,N,Z,q,dt,Pt){if(this.boxStartIndex=f.length,dt){var Gt=N.top,Qt=N.bottom,ve=N.collisionPadding;ve&&(Gt-=ve[1],Qt+=ve[3]);var Oe=Qt-Gt;Oe>0&&(Oe=Math.max(10,Oe),this.circleDiameter=Oe)}else{var er=N.top*Z-q,sr=N.bottom*Z+q,Sr=N.left*Z-q,gr=N.right*Z+q,zr=N.collisionPadding;if(zr&&(Sr-=zr[0]*Z,er-=zr[1]*Z,gr+=zr[2]*Z,sr+=zr[3]*Z),Pt){var Jr=new J(Sr,er),ln=new J(gr,er),yn=new J(Sr,sr),Pn=new J(gr,sr),oi=Pt*Math.PI/180;Jr._rotate(oi),ln._rotate(oi),yn._rotate(oi),Pn._rotate(oi),Sr=Math.min(Jr.x,ln.x,yn.x,Pn.x),gr=Math.max(Jr.x,ln.x,yn.x,Pn.x),er=Math.min(Jr.y,ln.y,yn.y,Pn.y),sr=Math.max(Jr.y,ln.y,yn.y,Pn.y)}f.emplaceBack(d.x,d.y,Sr,er,gr,sr,y,T,O)}this.boxEndIndex=f.length},Ao=function(f,d){if(f===void 0&&(f=[]),d===void 0&&(d=Fu),this.data=f,this.length=this.data.length,this.compare=d,this.length>0)for(var y=(this.length>>1)-1;y>=0;y--)this._down(y)};function Fu(f,d){return f<d?-1:f>d?1:0}function pa(f,d,y){d===void 0&&(d=1),y===void 0&&(y=!1);for(var T=1/0,O=1/0,N=-1/0,Z=-1/0,q=f[0],dt=0;dt<q.length;dt++){var Pt=q[dt];(!dt||Pt.x<T)&&(T=Pt.x),(!dt||Pt.y<O)&&(O=Pt.y),(!dt||Pt.x>N)&&(N=Pt.x),(!dt||Pt.y>Z)&&(Z=Pt.y)}var Gt=Math.min(N-T,Z-O),Qt=Gt/2,ve=new Ao([],fo);if(Gt===0)return new J(T,O);for(var Oe=T;Oe<N;Oe+=Gt)for(var er=O;er<Z;er+=Gt)ve.push(new To(Oe+Qt,er+Qt,Qt,f));for(var sr=function(zr){for(var Jr=0,ln=0,yn=0,Pn=zr[0],oi=0,Ti=Pn.length,oa=Ti-1;oi<Ti;oa=oi++){var Vi=Pn[oi],da=Pn[oa],Rn=Vi.x*da.y-da.x*Vi.y;ln+=(Vi.x+da.x)*Rn,yn+=(Vi.y+da.y)*Rn,Jr+=3*Rn}return new To(ln/Jr,yn/Jr,0,zr)}(f),Sr=ve.length;ve.length;){var gr=ve.pop();(gr.d>sr.d||!sr.d)&&(sr=gr,y&&console.log("found best %d after %d probes",Math.round(1e4*gr.d)/1e4,Sr)),gr.max-sr.d<=d||(ve.push(new To(gr.p.x-(Qt=gr.h/2),gr.p.y-Qt,Qt,f)),ve.push(new To(gr.p.x+Qt,gr.p.y-Qt,Qt,f)),ve.push(new To(gr.p.x-Qt,gr.p.y+Qt,Qt,f)),ve.push(new To(gr.p.x+Qt,gr.p.y+Qt,Qt,f)),Sr+=4)}return y&&(console.log("num probes: "+Sr),console.log("best distance: "+sr.d)),sr.p}function fo(f,d){return d.max-f.max}function To(f,d,y,T){this.p=new J(f,d),this.h=y,this.d=function(O,N){for(var Z=!1,q=1/0,dt=0;dt<N.length;dt++)for(var Pt=N[dt],Gt=0,Qt=Pt.length,ve=Qt-1;Gt<Qt;ve=Gt++){var Oe=Pt[Gt],er=Pt[ve];Oe.y>O.y!=er.y>O.y&&O.x<(er.x-Oe.x)*(O.y-Oe.y)/(er.y-Oe.y)+Oe.x&&(Z=!Z),q=Math.min(q,Pf(O,Oe,er))}return(Z?1:-1)*Math.sqrt(q)}(this.p,T),this.max=this.d+this.h*Math.SQRT2}Ao.prototype.push=function(f){this.data.push(f),this.length++,this._up(this.length-1)},Ao.prototype.pop=function(){if(this.length!==0){var f=this.data[0],d=this.data.pop();return this.length--,this.length>0&&(this.data[0]=d,this._down(0)),f}},Ao.prototype.peek=function(){return this.data[0]},Ao.prototype._up=function(f){for(var d=this.data,y=this.compare,T=d[f];f>0;){var O=f-1>>1,N=d[O];if(y(T,N)>=0)break;d[f]=N,f=O}d[f]=T},Ao.prototype._down=function(f){for(var d=this.data,y=this.compare,T=this.length>>1,O=d[f];f<T;){var N=1+(f<<1),Z=d[N],q=N+1;if(q<this.length&&y(d[q],Z)<0&&(N=q,Z=d[q]),y(Z,O)>=0)break;d[f]=Z,f=N}d[f]=O};var Us=Number.POSITIVE_INFINITY;function ql(f,d){return d[1]!==Us?function(y,T,O){var N=0,Z=0;switch(T=Math.abs(T),O=Math.abs(O),y){case"top-right":case"top-left":case"top":Z=O-7;break;case"bottom-right":case"bottom-left":case"bottom":Z=7-O}switch(y){case"top-right":case"bottom-right":case"right":N=-T;break;case"top-left":case"bottom-left":case"left":N=T}return[N,Z]}(f,d[0],d[1]):function(y,T){var O=0,N=0;T<0&&(T=0);var Z=T/Math.sqrt(2);switch(y){case"top-right":case"top-left":N=Z-7;break;case"bottom-right":case"bottom-left":N=7-Z;break;case"bottom":N=7-T;break;case"top":N=T-7}switch(y){case"top-right":case"bottom-right":O=-Z;break;case"top-left":case"bottom-left":O=Z;break;case"left":O=T;break;case"right":O=-T}return[O,N]}(f,d[0])}function or(f){switch(f){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function fn(f,d,y,T,O,N,Z,q,dt,Pt,Gt,Qt,ve,Oe,er){var sr=function(ln,yn,Pn,oi,Ti,oa,Vi,da){for(var Rn=oi.layout.get("text-rotate").evaluate(oa,{})*Math.PI/180,Ri=[],na=0,ta=yn.positionedLines;na<ta.length;na+=1)for(var mo=ta[na],Wa=0,po=mo.positionedGlyphs;Wa<po.length;Wa+=1){var wi=po[Wa];if(wi.rect){var Ho=wi.rect||{},Zs=4,ru=!0,Ls=1,Ds=0,cu=(Ti||da)&&wi.vertical,Vs=wi.metrics.advance*wi.scale/2;if(da&&yn.verticalizable&&(Ds=mo.lineOffset/2-(wi.imageName?-(24-wi.metrics.width*wi.scale)/2:24*(wi.scale-1))),wi.imageName){var Eu=Vi[wi.imageName];ru=Eu.sdf,Zs=1/(Ls=Eu.pixelRatio)}var Wu=Ti?[wi.x+Vs,wi.y]:[0,0],ml=Ti?[0,0]:[wi.x+Vs+Pn[0],wi.y+Pn[1]-Ds],Tl=[0,0];cu&&(Tl=ml,ml=[0,0]);var Du=(wi.metrics.left-Zs)*wi.scale-Vs+ml[0],yl=(-wi.metrics.top-Zs)*wi.scale+ml[1],Ja=Du+Ho.w*wi.scale/Ls,ms=yl+Ho.h*wi.scale/Ls,fs=new J(Du,yl),Bo=new J(Ja,yl),Ql=new J(Du,ms),Nl=new J(Ja,ms);if(cu){var Bs=new J(-Vs,Vs- -17),wu=-Math.PI/2,al=12-Vs,Fo=new J(22-al,-(wi.imageName?al:0)),ah=new(Function.prototype.bind.apply(J,[null].concat(Tl)));fs._rotateAround(wu,Bs)._add(Fo)._add(ah),Bo._rotateAround(wu,Bs)._add(Fo)._add(ah),Ql._rotateAround(wu,Bs)._add(Fo)._add(ah),Nl._rotateAround(wu,Bs)._add(Fo)._add(ah)}if(Rn){var Ml=Math.sin(Rn),ep=Math.cos(Rn),Su=[ep,-Ml,Ml,ep];fs._matMult(Su),Bo._matMult(Su),Ql._matMult(Su),Nl._matMult(Su)}var rp=new J(0,0),Nf=new J(0,0);Ri.push({tl:fs,tr:Bo,bl:Ql,br:Nl,tex:Ho,writingMode:yn.writingMode,glyphOffset:Wu,sectionIndex:wi.sectionIndex,isSDF:ru,pixelOffsetTL:rp,pixelOffsetBR:Nf,minFontScaleX:0,minFontScaleY:0})}}return Ri}(0,y,q,O,N,Z,T,f.allowVerticalPlacement),Sr=f.textSizeData,gr=null;Sr.kind==="source"?(gr=[128*O.layout.get("text-size").evaluate(Z,{})])[0]>32640&&Ue(f.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):Sr.kind==="composite"&&((gr=[128*Oe.compositeTextSizes[0].evaluate(Z,{},er),128*Oe.compositeTextSizes[1].evaluate(Z,{},er)])[0]>32640||gr[1]>32640)&&Ue(f.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),f.addSymbols(f.text,sr,gr,q,N,Z,Pt,d,dt.lineStartIndex,dt.lineLength,ve,er);for(var zr=0,Jr=Gt;zr<Jr.length;zr+=1)Qt[Jr[zr]]=f.text.placedSymbolArray.length-1;return 4*sr.length}function en(f){for(var d in f)return f[d];return null}function ji(f,d,y,T){var O=f.compareText;if(d in O){for(var N=O[d],Z=N.length-1;Z>=0;Z--)if(T.dist(N[Z])<y)return!0}else O[d]=[];return O[d].push(T),!1}var ho=Ac.VectorTileFeature.types,Je=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Se(f,d,y,T,O,N,Z,q,dt,Pt,Gt,Qt,ve){var Oe=q?Math.min(32640,Math.round(q[0])):0,er=q?Math.min(32640,Math.round(q[1])):0;f.emplaceBack(d,y,Math.round(32*T),Math.round(32*O),N,Z,(Oe<<1)+(dt?1:0),er,16*Pt,16*Gt,256*Qt,256*ve)}function yr(f,d,y){f.emplaceBack(d.x,d.y,y),f.emplaceBack(d.x,d.y,y),f.emplaceBack(d.x,d.y,y),f.emplaceBack(d.x,d.y,y)}function Lr(f){for(var d=0,y=f.sections;d<y.length;d+=1)if(yh(y[d].text))return!0;return!1}var qr=function(f){this.layoutVertexArray=new Pp,this.indexArray=new bc,this.programConfigurations=f,this.segments=new Re,this.dynamicLayoutVertexArray=new Xf,this.opacityVertexArray=new Wh,this.placedSymbolArray=new M};qr.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},qr.prototype.upload=function(f,d,y,T){this.isEmpty()||(y&&(this.layoutVertexBuffer=f.createVertexBuffer(this.layoutVertexArray,a0.members),this.indexBuffer=f.createIndexBuffer(this.indexArray,d),this.dynamicLayoutVertexBuffer=f.createVertexBuffer(this.dynamicLayoutVertexArray,o0.members,!0),this.opacityVertexBuffer=f.createVertexBuffer(this.opacityVertexArray,Je,!0),this.opacityVertexBuffer.itemSize=1),(y||T)&&this.programConfigurations.upload(f))},qr.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},Hi("SymbolBuffers",qr);var Ar=function(f,d,y){this.layoutVertexArray=new f,this.layoutAttributes=d,this.indexArray=new y,this.segments=new Re,this.collisionVertexArray=new yd};Ar.prototype.upload=function(f){this.layoutVertexBuffer=f.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=f.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=f.createVertexBuffer(this.collisionVertexArray,yv.members,!0)},Ar.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Hi("CollisionBuffers",Ar);var Ye=function(f){this.collisionBoxArray=f.collisionBoxArray,this.zoom=f.zoom,this.overscaling=f.overscaling,this.layers=f.layers,this.layerIds=this.layers.map(function(N){return N.id}),this.index=f.index,this.pixelRatio=f.pixelRatio,this.sourceLayerIndex=f.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Fl([]),this.placementViewportMatrix=Fl([]);var d=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Pi(this.zoom,d["text-size"]),this.iconSizeData=Pi(this.zoom,d["icon-size"]);var y=this.layers[0].layout,T=y.get("symbol-sort-key"),O=y.get("symbol-z-order");this.canOverlap=y.get("text-allow-overlap")||y.get("icon-allow-overlap")||y.get("text-ignore-placement")||y.get("icon-ignore-placement"),this.sortFeaturesByKey=O!=="viewport-y"&&T.constantOr(1)!==void 0,this.sortFeaturesByY=(O==="viewport-y"||O==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,y.get("symbol-placement")==="point"&&(this.writingModes=y.get("text-writing-mode").map(function(N){return di[N]})),this.stateDependentLayerIds=this.layers.filter(function(N){return N.isStateDependent()}).map(function(N){return N.id}),this.sourceID=f.sourceID};Ye.prototype.createArrays=function(){this.text=new qr(new ga(this.layers,this.zoom,function(f){return/^text/.test(f)})),this.icon=new qr(new ga(this.layers,this.zoom,function(f){return/^icon/.test(f)})),this.glyphOffsetArray=new $,this.lineVertexArray=new ht,this.symbolInstances=new H},Ye.prototype.calculateGlyphDependencies=function(f,d,y,T,O){for(var N=0;N<f.length;N++)if(d[f.charCodeAt(N)]=!0,(y||T)&&O){var Z=Jh[f.charAt(N)];Z&&(d[Z.charCodeAt(0)]=!0)}},Ye.prototype.populate=function(f,d,y){var T=this.layers[0],O=T.layout,N=O.get("text-font"),Z=O.get("text-field"),q=O.get("icon-image"),dt=(Z.value.kind!=="constant"||Z.value.value instanceof ts&&!Z.value.value.isEmpty()||Z.value.value.toString().length>0)&&(N.value.kind!=="constant"||N.value.value.length>0),Pt=q.value.kind!=="constant"||!!q.value.value||Object.keys(q.parameters).length>0,Gt=O.get("symbol-sort-key");if(this.features=[],dt||Pt){for(var Qt=d.iconDependencies,ve=d.glyphDependencies,Oe=d.availableImages,er=new io(this.zoom),sr=0,Sr=f;sr<Sr.length;sr+=1){var gr=Sr[sr],zr=gr.feature,Jr=gr.id,ln=gr.index,yn=gr.sourceLayerIndex,Pn=T._featureFilter.needGeometry,oi=Ms(zr,Pn);if(T._featureFilter.filter(er,oi,y)){Pn||(oi.geometry=ss(zr));var Ti=void 0;if(dt){var oa=T.getValueAndResolveTokens("text-field",oi,y,Oe),Vi=ts.factory(oa);Lr(Vi)&&(this.hasRTLText=!0),(!this.hasRTLText||vd()==="unavailable"||this.hasRTLText&&cl.isParsed())&&(Ti=Md(Vi,T,oi))}var da=void 0;if(Pt){var Rn=T.getValueAndResolveTokens("icon-image",oi,y,Oe);da=Rn instanceof bo?Rn:bo.fromString(Rn)}if(Ti||da){var Ri=this.sortFeaturesByKey?Gt.evaluate(oi,{},y):void 0;if(this.features.push({id:Jr,text:Ti,icon:da,index:ln,sourceLayerIndex:yn,geometry:oi.geometry,properties:zr.properties,type:ho[zr.type],sortKey:Ri}),da&&(Qt[da.name]=!0),Ti){var na=N.evaluate(oi,{},y).join(","),ta=O.get("text-rotation-alignment")==="map"&&O.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(di.vertical)>=0;for(var mo=0,Wa=Ti.sections;mo<Wa.length;mo+=1){var po=Wa[mo];if(po.image)Qt[po.image.name]=!0;else{var wi=tf(Ti.toString()),Ho=po.fontStack||na,Zs=ve[Ho]=ve[Ho]||{};this.calculateGlyphDependencies(po.text,Zs,ta,this.allowVerticalPlacement,wi)}}}}}}O.get("symbol-placement")==="line"&&(this.features=function(ru){var Ls={},Ds={},cu=[],Vs=0;function Eu(Bs){cu.push(ru[Bs]),Vs++}function Wu(Bs,wu,al){var Fo=Ds[Bs];return delete Ds[Bs],Ds[wu]=Fo,cu[Fo].geometry[0].pop(),cu[Fo].geometry[0]=cu[Fo].geometry[0].concat(al[0]),Fo}function ml(Bs,wu,al){var Fo=Ls[wu];return delete Ls[wu],Ls[Bs]=Fo,cu[Fo].geometry[0].shift(),cu[Fo].geometry[0]=al[0].concat(cu[Fo].geometry[0]),Fo}function Tl(Bs,wu,al){var Fo=al?wu[0][wu[0].length-1]:wu[0][0];return Bs+":"+Fo.x+":"+Fo.y}for(var Du=0;Du<ru.length;Du++){var yl=ru[Du],Ja=yl.geometry,ms=yl.text?yl.text.toString():null;if(ms){var fs=Tl(ms,Ja),Bo=Tl(ms,Ja,!0);if(fs in Ds&&Bo in Ls&&Ds[fs]!==Ls[Bo]){var Ql=ml(fs,Bo,Ja),Nl=Wu(fs,Bo,cu[Ql].geometry);delete Ls[fs],delete Ds[Bo],Ds[Tl(ms,cu[Nl].geometry,!0)]=Nl,cu[Ql].geometry=null}else fs in Ds?Wu(fs,Bo,Ja):Bo in Ls?ml(fs,Bo,Ja):(Eu(Du),Ls[fs]=Vs-1,Ds[Bo]=Vs-1)}else Eu(Du)}return cu.filter(function(Bs){return Bs.geometry})}(this.features)),this.sortFeaturesByKey&&this.features.sort(function(ru,Ls){return ru.sortKey-Ls.sortKey})}},Ye.prototype.update=function(f,d,y){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(f,d,this.layers,y),this.icon.programConfigurations.updatePaintArrays(f,d,this.layers,y))},Ye.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},Ye.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Ye.prototype.upload=function(f){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(f),this.iconCollisionBox.upload(f)),this.text.upload(f,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(f,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},Ye.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},Ye.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},Ye.prototype.addToLineVertexArray=function(f,d){var y=this.lineVertexArray.length;if(f.segment!==void 0){for(var T=f.dist(d[f.segment+1]),O=f.dist(d[f.segment]),N={},Z=f.segment+1;Z<d.length;Z++)N[Z]={x:d[Z].x,y:d[Z].y,tileUnitDistanceFromAnchor:T},Z<d.length-1&&(T+=d[Z+1].dist(d[Z]));for(var q=f.segment||0;q>=0;q--)N[q]={x:d[q].x,y:d[q].y,tileUnitDistanceFromAnchor:O},q>0&&(O+=d[q-1].dist(d[q]));for(var dt=0;dt<d.length;dt++){var Pt=N[dt];this.lineVertexArray.emplaceBack(Pt.x,Pt.y,Pt.tileUnitDistanceFromAnchor)}}return{lineStartIndex:y,lineLength:this.lineVertexArray.length-y}},Ye.prototype.addSymbols=function(f,d,y,T,O,N,Z,q,dt,Pt,Gt,Qt){for(var ve=f.indexArray,Oe=f.layoutVertexArray,er=f.segments.prepareSegment(4*d.length,Oe,ve,this.canOverlap?N.sortKey:void 0),sr=this.glyphOffsetArray.length,Sr=er.vertexLength,gr=this.allowVerticalPlacement&&Z===di.vertical?Math.PI/2:0,zr=N.text&&N.text.sections,Jr=0;Jr<d.length;Jr++){var ln=d[Jr],yn=ln.tl,Pn=ln.tr,oi=ln.bl,Ti=ln.br,oa=ln.tex,Vi=ln.pixelOffsetTL,da=ln.pixelOffsetBR,Rn=ln.minFontScaleX,Ri=ln.minFontScaleY,na=ln.glyphOffset,ta=ln.isSDF,mo=ln.sectionIndex,Wa=er.vertexLength,po=na[1];Se(Oe,q.x,q.y,yn.x,po+yn.y,oa.x,oa.y,y,ta,Vi.x,Vi.y,Rn,Ri),Se(Oe,q.x,q.y,Pn.x,po+Pn.y,oa.x+oa.w,oa.y,y,ta,da.x,Vi.y,Rn,Ri),Se(Oe,q.x,q.y,oi.x,po+oi.y,oa.x,oa.y+oa.h,y,ta,Vi.x,da.y,Rn,Ri),Se(Oe,q.x,q.y,Ti.x,po+Ti.y,oa.x+oa.w,oa.y+oa.h,y,ta,da.x,da.y,Rn,Ri),yr(f.dynamicLayoutVertexArray,q,gr),ve.emplaceBack(Wa,Wa+1,Wa+2),ve.emplaceBack(Wa+1,Wa+2,Wa+3),er.vertexLength+=4,er.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(na[0]),Jr!==d.length-1&&mo===d[Jr+1].sectionIndex||f.programConfigurations.populatePaintArrays(Oe.length,N,N.index,{},Qt,zr&&zr[mo])}f.placedSymbolArray.emplaceBack(q.x,q.y,sr,this.glyphOffsetArray.length-sr,Sr,dt,Pt,q.segment,y?y[0]:0,y?y[1]:0,T[0],T[1],Z,0,!1,0,Gt)},Ye.prototype._addCollisionDebugVertex=function(f,d,y,T,O,N){return d.emplaceBack(0,0),f.emplaceBack(y.x,y.y,T,O,Math.round(N.x),Math.round(N.y))},Ye.prototype.addCollisionDebugVertices=function(f,d,y,T,O,N,Z){var q=O.segments.prepareSegment(4,O.layoutVertexArray,O.indexArray),dt=q.vertexLength,Pt=O.layoutVertexArray,Gt=O.collisionVertexArray,Qt=Z.anchorX,ve=Z.anchorY;this._addCollisionDebugVertex(Pt,Gt,N,Qt,ve,new J(f,d)),this._addCollisionDebugVertex(Pt,Gt,N,Qt,ve,new J(y,d)),this._addCollisionDebugVertex(Pt,Gt,N,Qt,ve,new J(y,T)),this._addCollisionDebugVertex(Pt,Gt,N,Qt,ve,new J(f,T)),q.vertexLength+=4;var Oe=O.indexArray;Oe.emplaceBack(dt,dt+1),Oe.emplaceBack(dt+1,dt+2),Oe.emplaceBack(dt+2,dt+3),Oe.emplaceBack(dt+3,dt),q.primitiveLength+=4},Ye.prototype.addDebugCollisionBoxes=function(f,d,y,T){for(var O=f;O<d;O++){var N=this.collisionBoxArray.get(O);this.addCollisionDebugVertices(N.x1,N.y1,N.x2,N.y2,T?this.textCollisionBox:this.iconCollisionBox,N.anchorPoint,y)}},Ye.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Ar(Xh,eh.members,Yf),this.iconCollisionBox=new Ar(Xh,eh.members,Yf);for(var f=0;f<this.symbolInstances.length;f++){var d=this.symbolInstances.get(f);this.addDebugCollisionBoxes(d.textBoxStartIndex,d.textBoxEndIndex,d,!0),this.addDebugCollisionBoxes(d.verticalTextBoxStartIndex,d.verticalTextBoxEndIndex,d,!0),this.addDebugCollisionBoxes(d.iconBoxStartIndex,d.iconBoxEndIndex,d,!1),this.addDebugCollisionBoxes(d.verticalIconBoxStartIndex,d.verticalIconBoxEndIndex,d,!1)}},Ye.prototype._deserializeCollisionBoxesForSymbol=function(f,d,y,T,O,N,Z,q,dt){for(var Pt={},Gt=d;Gt<y;Gt++){var Qt=f.get(Gt);Pt.textBox={x1:Qt.x1,y1:Qt.y1,x2:Qt.x2,y2:Qt.y2,anchorPointX:Qt.anchorPointX,anchorPointY:Qt.anchorPointY},Pt.textFeatureIndex=Qt.featureIndex;break}for(var ve=T;ve<O;ve++){var Oe=f.get(ve);Pt.verticalTextBox={x1:Oe.x1,y1:Oe.y1,x2:Oe.x2,y2:Oe.y2,anchorPointX:Oe.anchorPointX,anchorPointY:Oe.anchorPointY},Pt.verticalTextFeatureIndex=Oe.featureIndex;break}for(var er=N;er<Z;er++){var sr=f.get(er);Pt.iconBox={x1:sr.x1,y1:sr.y1,x2:sr.x2,y2:sr.y2,anchorPointX:sr.anchorPointX,anchorPointY:sr.anchorPointY},Pt.iconFeatureIndex=sr.featureIndex;break}for(var Sr=q;Sr<dt;Sr++){var gr=f.get(Sr);Pt.verticalIconBox={x1:gr.x1,y1:gr.y1,x2:gr.x2,y2:gr.y2,anchorPointX:gr.anchorPointX,anchorPointY:gr.anchorPointY},Pt.verticalIconFeatureIndex=gr.featureIndex;break}return Pt},Ye.prototype.deserializeCollisionBoxes=function(f){this.collisionArrays=[];for(var d=0;d<this.symbolInstances.length;d++){var y=this.symbolInstances.get(d);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(f,y.textBoxStartIndex,y.textBoxEndIndex,y.verticalTextBoxStartIndex,y.verticalTextBoxEndIndex,y.iconBoxStartIndex,y.iconBoxEndIndex,y.verticalIconBoxStartIndex,y.verticalIconBoxEndIndex))}},Ye.prototype.hasTextData=function(){return this.text.segments.get().length>0},Ye.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Ye.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Ye.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Ye.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Ye.prototype.addIndicesForPlacedSymbol=function(f,d){for(var y=f.placedSymbolArray.get(d),T=y.vertexStartIndex+4*y.numGlyphs,O=y.vertexStartIndex;O<T;O+=4)f.indexArray.emplaceBack(O,O+1,O+2),f.indexArray.emplaceBack(O+1,O+2,O+3)},Ye.prototype.getSortedSymbolIndexes=function(f){if(this.sortedAngle===f&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var d=Math.sin(f),y=Math.cos(f),T=[],O=[],N=[],Z=0;Z<this.symbolInstances.length;++Z){N.push(Z);var q=this.symbolInstances.get(Z);T.push(0|Math.round(d*q.anchorX+y*q.anchorY)),O.push(q.featureIndex)}return N.sort(function(dt,Pt){return T[dt]-T[Pt]||O[Pt]-O[dt]}),N},Ye.prototype.addToSortKeyRanges=function(f,d){var y=this.sortKeyRanges[this.sortKeyRanges.length-1];y&&y.sortKey===d?y.symbolInstanceEnd=f+1:this.sortKeyRanges.push({sortKey:d,symbolInstanceStart:f,symbolInstanceEnd:f+1})},Ye.prototype.sortFeatures=function(f){var d=this;if(this.sortFeaturesByY&&this.sortedAngle!==f&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(f),this.sortedAngle=f,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var y=0,T=this.symbolInstanceIndexes;y<T.length;y+=1){var O=this.symbolInstances.get(T[y]);this.featureSortOrder.push(O.featureIndex),[O.rightJustifiedTextSymbolIndex,O.centerJustifiedTextSymbolIndex,O.leftJustifiedTextSymbolIndex].forEach(function(N,Z,q){N>=0&&q.indexOf(N)===Z&&d.addIndicesForPlacedSymbol(d.text,N)}),O.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,O.verticalPlacedTextSymbolIndex),O.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,O.placedIconSymbolIndex),O.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,O.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Hi("SymbolBucket",Ye,{omit:["layers","collisionBoxArray","features","compareText"]}),Ye.MAX_GLYPHS=65535,Ye.addDynamicAttributes=yr;var Rr=new su({"symbol-placement":new aa(we.layout_symbol["symbol-placement"]),"symbol-spacing":new aa(we.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new aa(we.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ii(we.layout_symbol["symbol-sort-key"]),"symbol-z-order":new aa(we.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new aa(we.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new aa(we.layout_symbol["icon-ignore-placement"]),"icon-optional":new aa(we.layout_symbol["icon-optional"]),"icon-rotation-alignment":new aa(we.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ii(we.layout_symbol["icon-size"]),"icon-text-fit":new aa(we.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new aa(we.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ii(we.layout_symbol["icon-image"]),"icon-rotate":new Ii(we.layout_symbol["icon-rotate"]),"icon-padding":new aa(we.layout_symbol["icon-padding"]),"icon-keep-upright":new aa(we.layout_symbol["icon-keep-upright"]),"icon-offset":new Ii(we.layout_symbol["icon-offset"]),"icon-anchor":new Ii(we.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new aa(we.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new aa(we.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new aa(we.layout_symbol["text-rotation-alignment"]),"text-field":new Ii(we.layout_symbol["text-field"]),"text-font":new Ii(we.layout_symbol["text-font"]),"text-size":new Ii(we.layout_symbol["text-size"]),"text-max-width":new Ii(we.layout_symbol["text-max-width"]),"text-line-height":new aa(we.layout_symbol["text-line-height"]),"text-letter-spacing":new Ii(we.layout_symbol["text-letter-spacing"]),"text-justify":new Ii(we.layout_symbol["text-justify"]),"text-radial-offset":new Ii(we.layout_symbol["text-radial-offset"]),"text-variable-anchor":new aa(we.layout_symbol["text-variable-anchor"]),"text-anchor":new Ii(we.layout_symbol["text-anchor"]),"text-max-angle":new aa(we.layout_symbol["text-max-angle"]),"text-writing-mode":new aa(we.layout_symbol["text-writing-mode"]),"text-rotate":new Ii(we.layout_symbol["text-rotate"]),"text-padding":new aa(we.layout_symbol["text-padding"]),"text-keep-upright":new aa(we.layout_symbol["text-keep-upright"]),"text-transform":new Ii(we.layout_symbol["text-transform"]),"text-offset":new Ii(we.layout_symbol["text-offset"]),"text-allow-overlap":new aa(we.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new aa(we.layout_symbol["text-ignore-placement"]),"text-optional":new aa(we.layout_symbol["text-optional"])}),je={paint:new su({"icon-opacity":new Ii(we.paint_symbol["icon-opacity"]),"icon-color":new Ii(we.paint_symbol["icon-color"]),"icon-halo-color":new Ii(we.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ii(we.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ii(we.paint_symbol["icon-halo-blur"]),"icon-translate":new aa(we.paint_symbol["icon-translate"]),"icon-translate-anchor":new aa(we.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ii(we.paint_symbol["text-opacity"]),"text-color":new Ii(we.paint_symbol["text-color"],{runtimeType:fi,getOverride:function(f){return f.textColor},hasOverride:function(f){return!!f.textColor}}),"text-halo-color":new Ii(we.paint_symbol["text-halo-color"]),"text-halo-width":new Ii(we.paint_symbol["text-halo-width"]),"text-halo-blur":new Ii(we.paint_symbol["text-halo-blur"]),"text-translate":new aa(we.paint_symbol["text-translate"]),"text-translate-anchor":new aa(we.paint_symbol["text-translate-anchor"])}),layout:Rr},mr=function(f){this.type=f.property.overrides?f.property.overrides.runtimeType:Mi,this.defaultValue=f};mr.prototype.evaluate=function(f){if(f.formattedSection){var d=this.defaultValue.property.overrides;if(d&&d.hasOverride(f.formattedSection))return d.getOverride(f.formattedSection)}return f.feature&&f.featureState?this.defaultValue.evaluate(f.feature,f.featureState):this.defaultValue.property.specification.default},mr.prototype.eachChild=function(f){this.defaultValue.isConstant()||f(this.defaultValue.value._styleExpression.expression)},mr.prototype.outputDefined=function(){return!1},mr.prototype.serialize=function(){return null},Hi("FormatSectionOverride",mr,{omit:["defaultValue"]});var tr=function(f){function d(y){f.call(this,y,je)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.recalculate=function(y,T){if(f.prototype.recalculate.call(this,y,T),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var O=this.layout.get("text-writing-mode");if(O){for(var N=[],Z=0,q=O;Z<q.length;Z+=1){var dt=q[Z];N.indexOf(dt)<0&&N.push(dt)}this.layout._values["text-writing-mode"]=N}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},d.prototype.getValueAndResolveTokens=function(y,T,O,N){var Z=this.layout.get(y).evaluate(T,{},O,N),q=this._unevaluatedLayout._values[y];return q.isDataDriven()||Kc(q.value)||!Z?Z:function(dt,Pt){return Pt.replace(/{([^{}]+)}/g,function(Gt,Qt){return Qt in dt?String(dt[Qt]):""})}(T.properties,Z)},d.prototype.createBucket=function(y){return new Ye(y)},d.prototype.queryRadius=function(){return 0},d.prototype.queryIntersectsFeature=function(){return!1},d.prototype._setPaintOverrides=function(){for(var y=0,T=je.paint.overridableProperties;y<T.length;y+=1){var O=T[y];if(d.hasPaintOverride(this.layout,O)){var N,Z=this.paint.get(O),q=new mr(Z),dt=new Ef(q,Z.property.specification);N=Z.value.kind==="constant"||Z.value.kind==="source"?new Sf("source",dt):new Cf("composite",dt,Z.value.zoomStops,Z.value._interpolationType),this.paint._values[O]=new ku(Z.property,N,Z.parameters)}}},d.prototype._handleOverridablePaintPropertyUpdate=function(y,T,O){return!(!this.layout||T.isDataDriven()||O.isDataDriven())&&d.hasPaintOverride(this.layout,y)},d.hasPaintOverride=function(y,T){var O=y.get("text-field"),N=je.paint.properties[T],Z=!1,q=function(Gt){for(var Qt=0,ve=Gt;Qt<ve.length;Qt+=1)if(N.overrides&&N.overrides.hasOverride(ve[Qt]))return void(Z=!0)};if(O.value.kind==="constant"&&O.value.value instanceof ts)q(O.value.value.sections);else if(O.value.kind==="source"){var dt=function(Gt){Z||(Gt instanceof rn&&Ve(Gt.value)===vo?q(Gt.value.sections):Gt instanceof Ki?q(Gt.sections):Gt.eachChild(dt))},Pt=O.value;Pt._styleExpression&&dt(Pt._styleExpression.expression)}return Z},d}(Sl),kr={paint:new su({"background-color":new aa(we.paint_background["background-color"]),"background-pattern":new fl(we.paint_background["background-pattern"]),"background-opacity":new aa(we.paint_background["background-opacity"])})},Kr=function(f){function d(y){f.call(this,y,kr)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d}(Sl),Nn={paint:new su({"raster-opacity":new aa(we.paint_raster["raster-opacity"]),"raster-hue-rotate":new aa(we.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new aa(we.paint_raster["raster-brightness-min"]),"raster-brightness-max":new aa(we.paint_raster["raster-brightness-max"]),"raster-saturation":new aa(we.paint_raster["raster-saturation"]),"raster-contrast":new aa(we.paint_raster["raster-contrast"]),"raster-resampling":new aa(we.paint_raster["raster-resampling"]),"raster-fade-duration":new aa(we.paint_raster["raster-fade-duration"])})},ti=function(f){function d(y){f.call(this,y,Nn)}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d}(Sl),ci=function(f){function d(y){f.call(this,y,{}),this.implementation=y}return f&&(d.__proto__=f),(d.prototype=Object.create(f&&f.prototype)).constructor=d,d.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},d.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},d.prototype.recalculate=function(){},d.prototype.updateTransitions=function(){},d.prototype.hasTransition=function(){},d.prototype.serialize=function(){},d.prototype.onAdd=function(y){this.implementation.onAdd&&this.implementation.onAdd(y,y.painter.context.gl)},d.prototype.onRemove=function(y){this.implementation.onRemove&&this.implementation.onRemove(y,y.painter.context.gl)},d}(Sl),Ai={circle:$h,heatmap:Sc,hillshade:Jv,fill:Vp,"fill-extrusion":cf,line:Td,symbol:tr,background:Kr,raster:ti},gi=et.HTMLImageElement,zi=et.HTMLCanvasElement,Fi=et.HTMLVideoElement,Ui=et.ImageData,Zi=et.ImageBitmap,Wi=function(f,d,y,T){this.context=f,this.format=y,this.texture=f.gl.createTexture(),this.update(d,T)};Wi.prototype.update=function(f,d,y){var T=f.width,O=f.height,N=!(this.size&&this.size[0]===T&&this.size[1]===O||y),Z=this.context,q=Z.gl;if(this.useMipmap=Boolean(d&&d.useMipmap),q.bindTexture(q.TEXTURE_2D,this.texture),Z.pixelStoreUnpackFlipY.set(!1),Z.pixelStoreUnpack.set(1),Z.pixelStoreUnpackPremultiplyAlpha.set(this.format===q.RGBA&&(!d||d.premultiply!==!1)),N)this.size=[T,O],f instanceof gi||f instanceof zi||f instanceof Fi||f instanceof Ui||Zi&&f instanceof Zi?q.texImage2D(q.TEXTURE_2D,0,this.format,this.format,q.UNSIGNED_BYTE,f):q.texImage2D(q.TEXTURE_2D,0,this.format,T,O,0,this.format,q.UNSIGNED_BYTE,f.data);else{var dt=y||{x:0,y:0},Pt=dt.x,Gt=dt.y;f instanceof gi||f instanceof zi||f instanceof Fi||f instanceof Ui||Zi&&f instanceof Zi?q.texSubImage2D(q.TEXTURE_2D,0,Pt,Gt,q.RGBA,q.UNSIGNED_BYTE,f):q.texSubImage2D(q.TEXTURE_2D,0,Pt,Gt,T,O,q.RGBA,q.UNSIGNED_BYTE,f.data)}this.useMipmap&&this.isSizePowerOfTwo()&&q.generateMipmap(q.TEXTURE_2D)},Wi.prototype.bind=function(f,d,y){var T=this.context.gl;T.bindTexture(T.TEXTURE_2D,this.texture),y!==T.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(y=T.LINEAR),f!==this.filter&&(T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,f),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,y||f),this.filter=f),d!==this.wrap&&(T.texParameteri(T.TEXTURE_2D,T.TEXTURE_WRAP_S,d),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_WRAP_T,d),this.wrap=d)},Wi.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},Wi.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var ba=function(f){var d=this;this._callback=f,this._triggered=!1,typeof MessageChannel!="undefined"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){d._triggered=!1,d._callback()})};ba.prototype.trigger=function(){var f=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){f._triggered=!1,f._callback()},0))},ba.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Jo=function(f,d,y){this.target=f,this.parent=d,this.mapId=y,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},At(["receive","process"],this),this.invoker=new ba(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=Lt()?f:et};function Ru(f,d,y){var T=2*Math.PI*6378137/256/Math.pow(2,y);return[f*T-2*Math.PI*6378137/2,d*T-2*Math.PI*6378137/2]}Jo.prototype.send=function(f,d,y,T,O){var N=this;O===void 0&&(O=!1);var Z=Math.round(1e18*Math.random()).toString(36).substring(0,10);y&&(this.callbacks[Z]=y);var q=St(this.globalScope)?void 0:[];return this.target.postMessage({id:Z,type:f,hasCallback:!!y,targetMapId:T,mustQueue:O,sourceMapId:this.mapId,data:mc(d,q)},q),{cancel:function(){y&&delete N.callbacks[Z],N.target.postMessage({id:Z,type:"<cancel>",targetMapId:T,sourceMapId:N.mapId})}}},Jo.prototype.receive=function(f){var d=f.data,y=d.id;if(y&&(!d.targetMapId||this.mapId===d.targetMapId))if(d.type==="<cancel>"){delete this.tasks[y];var T=this.cancelCallbacks[y];delete this.cancelCallbacks[y],T&&T()}else Lt()||d.mustQueue?(this.tasks[y]=d,this.taskQueue.push(y),this.invoker.trigger()):this.processTask(y,d)},Jo.prototype.process=function(){if(this.taskQueue.length){var f=this.taskQueue.shift(),d=this.tasks[f];delete this.tasks[f],this.taskQueue.length&&this.invoker.trigger(),d&&this.processTask(f,d)}},Jo.prototype.processTask=function(f,d){var y=this;if(d.type==="<response>"){var T=this.callbacks[f];delete this.callbacks[f],T&&(d.error?T(Iu(d.error)):T(null,Iu(d.data)))}else{var O=!1,N=St(this.globalScope)?void 0:[],Z=d.hasCallback?function(Gt,Qt){O=!0,delete y.cancelCallbacks[f],y.target.postMessage({id:f,type:"<response>",sourceMapId:y.mapId,error:Gt?mc(Gt):null,data:mc(Qt,N)},N)}:function(Gt){O=!0},q=null,dt=Iu(d.data);if(this.parent[d.type])q=this.parent[d.type](d.sourceMapId,dt,Z);else if(this.parent.getWorkerSource){var Pt=d.type.split(".");q=this.parent.getWorkerSource(d.sourceMapId,Pt[0],dt.source)[Pt[1]](dt,Z)}else Z(new Error("Could not find function "+d.type));!O&&q&&q.cancel&&(this.cancelCallbacks[f]=q.cancel)}},Jo.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var gs=function(f,d){f&&(d?this.setSouthWest(f).setNorthEast(d):f.length===4?this.setSouthWest([f[0],f[1]]).setNorthEast([f[2],f[3]]):this.setSouthWest(f[0]).setNorthEast(f[1]))};gs.prototype.setNorthEast=function(f){return this._ne=f instanceof Do?new Do(f.lng,f.lat):Do.convert(f),this},gs.prototype.setSouthWest=function(f){return this._sw=f instanceof Do?new Do(f.lng,f.lat):Do.convert(f),this},gs.prototype.extend=function(f){var d,y,T=this._sw,O=this._ne;if(f instanceof Do)d=f,y=f;else{if(!(f instanceof gs))return Array.isArray(f)?f.length===4||f.every(Array.isArray)?this.extend(gs.convert(f)):this.extend(Do.convert(f)):this;if(y=f._ne,!(d=f._sw)||!y)return this}return T||O?(T.lng=Math.min(d.lng,T.lng),T.lat=Math.min(d.lat,T.lat),O.lng=Math.max(y.lng,O.lng),O.lat=Math.max(y.lat,O.lat)):(this._sw=new Do(d.lng,d.lat),this._ne=new Do(y.lng,y.lat)),this},gs.prototype.getCenter=function(){return new Do((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},gs.prototype.getSouthWest=function(){return this._sw},gs.prototype.getNorthEast=function(){return this._ne},gs.prototype.getNorthWest=function(){return new Do(this.getWest(),this.getNorth())},gs.prototype.getSouthEast=function(){return new Do(this.getEast(),this.getSouth())},gs.prototype.getWest=function(){return this._sw.lng},gs.prototype.getSouth=function(){return this._sw.lat},gs.prototype.getEast=function(){return this._ne.lng},gs.prototype.getNorth=function(){return this._ne.lat},gs.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},gs.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},gs.prototype.isEmpty=function(){return!(this._sw&&this._ne)},gs.prototype.contains=function(f){var d=Do.convert(f),y=d.lng,T=d.lat,O=this._sw.lng<=y&&y<=this._ne.lng;return this._sw.lng>this._ne.lng&&(O=this._sw.lng>=y&&y>=this._ne.lng),this._sw.lat<=T&&T<=this._ne.lat&&O},gs.convert=function(f){return!f||f instanceof gs?f:new gs(f)};var Do=function(f,d){if(isNaN(f)||isNaN(d))throw new Error("Invalid LngLat object: ("+f+", "+d+")");if(this.lng=+f,this.lat=+d,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Do.prototype.wrap=function(){return new Do(P(this.lng,-180,180),this.lat)},Do.prototype.toArray=function(){return[this.lng,this.lat]},Do.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Do.prototype.distanceTo=function(f){var d=Math.PI/180,y=this.lat*d,T=f.lat*d,O=Math.sin(y)*Math.sin(T)+Math.cos(y)*Math.cos(T)*Math.cos((f.lng-this.lng)*d);return 63710088e-1*Math.acos(Math.min(O,1))},Do.prototype.toBounds=function(f){f===void 0&&(f=0);var d=360*f/40075017,y=d/Math.cos(Math.PI/180*this.lat);return new gs(new Do(this.lng-y,this.lat-d),new Do(this.lng+y,this.lat+d))},Do.convert=function(f){if(f instanceof Do)return f;if(Array.isArray(f)&&(f.length===2||f.length===3))return new Do(Number(f[0]),Number(f[1]));if(!Array.isArray(f)&&typeof f=="object"&&f!==null)return new Do(Number("lng"in f?f.lng:f.lon),Number(f.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var Bf=2*Math.PI*63710088e-1;function gl(f){return Bf*Math.cos(f*Math.PI/180)}function Zc(f){return(180+f)/360}function Mc(f){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+f*Math.PI/360)))/360}function _v(f,d){return f/gl(d)}function Kl(f){return 360/Math.PI*Math.atan(Math.exp((180-360*f)*Math.PI/180))-90}var nh=function(f,d,y){y===void 0&&(y=0),this.x=+f,this.y=+d,this.z=+y};nh.fromLngLat=function(f,d){d===void 0&&(d=0);var y=Do.convert(f);return new nh(Zc(y.lng),Mc(y.lat),_v(d,y.lat))},nh.prototype.toLngLat=function(){return new Do(360*this.x-180,Kl(this.y))},nh.prototype.toAltitude=function(){return this.z*gl(Kl(this.y))},nh.prototype.meterInMercatorCoordinateUnits=function(){return 1/Bf*(f=Kl(this.y),1/Math.cos(f*Math.PI/180));var f};var jp=function(f,d,y){this.z=f,this.x=d,this.y=y,this.key=u0(0,f,f,d,y)};jp.prototype.equals=function(f){return this.z===f.z&&this.x===f.x&&this.y===f.y},jp.prototype.url=function(f,d){var y,T,O,N,Z,q=(T=this.y,O=this.z,N=Ru(256*(y=this.x),256*(T=Math.pow(2,O)-T-1),O),Z=Ru(256*(y+1),256*(T+1),O),N[0]+","+N[1]+","+Z[0]+","+Z[1]),dt=function(Pt,Gt,Qt){for(var ve,Oe="",er=Pt;er>0;er--)Oe+=(Gt&(ve=1<<er-1)?1:0)+(Qt&ve?2:0);return Oe}(this.z,this.x,this.y);return f[(this.x+this.y)%f.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(d==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",dt).replace("{bbox-epsg-3857}",q)},jp.prototype.getTilePoint=function(f){var d=Math.pow(2,this.z);return new J(8192*(f.x*d-this.x),8192*(f.y*d-this.y))},jp.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var s0=function(f,d){this.wrap=f,this.canonical=d,this.key=u0(f,d.z,d.z,d.x,d.y)},lu=function(f,d,y,T,O){this.overscaledZ=f,this.wrap=d,this.canonical=new jp(y,+T,+O),this.key=u0(d,f,y,T,O)};function u0(f,d,y,T,O){(f*=2)<0&&(f=-1*f-1);var N=1<<y;return(N*N*f+N*O+T).toString(36)+y.toString(36)+d.toString(36)}lu.prototype.equals=function(f){return this.overscaledZ===f.overscaledZ&&this.wrap===f.wrap&&this.canonical.equals(f.canonical)},lu.prototype.scaledTo=function(f){var d=this.canonical.z-f;return f>this.canonical.z?new lu(f,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new lu(f,this.wrap,f,this.canonical.x>>d,this.canonical.y>>d)},lu.prototype.calculateScaledKey=function(f,d){var y=this.canonical.z-f;return f>this.canonical.z?u0(this.wrap*+d,f,this.canonical.z,this.canonical.x,this.canonical.y):u0(this.wrap*+d,f,f,this.canonical.x>>y,this.canonical.y>>y)},lu.prototype.isChildOf=function(f){if(f.wrap!==this.wrap)return!1;var d=this.canonical.z-f.canonical.z;return f.overscaledZ===0||f.overscaledZ<this.overscaledZ&&f.canonical.x===this.canonical.x>>d&&f.canonical.y===this.canonical.y>>d},lu.prototype.children=function(f){if(this.overscaledZ>=f)return[new lu(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var d=this.canonical.z+1,y=2*this.canonical.x,T=2*this.canonical.y;return[new lu(d,this.wrap,d,y,T),new lu(d,this.wrap,d,y+1,T),new lu(d,this.wrap,d,y,T+1),new lu(d,this.wrap,d,y+1,T+1)]},lu.prototype.isLessThan=function(f){return this.wrap<f.wrap||!(this.wrap>f.wrap)&&(this.overscaledZ<f.overscaledZ||!(this.overscaledZ>f.overscaledZ)&&(this.canonical.x<f.canonical.x||!(this.canonical.x>f.canonical.x)&&this.canonical.y<f.canonical.y))},lu.prototype.wrapped=function(){return new lu(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},lu.prototype.unwrapTo=function(f){return new lu(this.overscaledZ,f,this.canonical.z,this.canonical.x,this.canonical.y)},lu.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},lu.prototype.toUnwrapped=function(){return new s0(this.wrap,this.canonical)},lu.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},lu.prototype.getTilePoint=function(f){return this.canonical.getTilePoint(new nh(f.x-this.wrap,f.y))},Hi("CanonicalTileID",jp),Hi("OverscaledTileID",lu,{omit:["posMatrix"]});var ih=function(f,d,y){if(this.uid=f,d.height!==d.width)throw new RangeError("DEM tiles must be square");if(y&&y!=="mapbox"&&y!=="terrarium")return Ue('"'+y+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=d.height;var T=this.dim=d.height-2;this.data=new Uint32Array(d.data.buffer),this.encoding=y||"mapbox";for(var O=0;O<T;O++)this.data[this._idx(-1,O)]=this.data[this._idx(0,O)],this.data[this._idx(T,O)]=this.data[this._idx(T-1,O)],this.data[this._idx(O,-1)]=this.data[this._idx(O,0)],this.data[this._idx(O,T)]=this.data[this._idx(O,T-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(T,-1)]=this.data[this._idx(T-1,0)],this.data[this._idx(-1,T)]=this.data[this._idx(0,T-1)],this.data[this._idx(T,T)]=this.data[this._idx(T-1,T-1)]};ih.prototype.get=function(f,d){var y=new Uint8Array(this.data.buffer),T=4*this._idx(f,d);return(this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox)(y[T],y[T+1],y[T+2])},ih.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},ih.prototype._idx=function(f,d){if(f<-1||f>=this.dim+1||d<-1||d>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(d+1)*this.stride+(f+1)},ih.prototype._unpackMapbox=function(f,d,y){return(256*f*256+256*d+y)/10-1e4},ih.prototype._unpackTerrarium=function(f,d,y){return 256*f+d+y/256-32768},ih.prototype.getPixels=function(){return new uu({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},ih.prototype.backfillBorder=function(f,d,y){if(this.dim!==f.dim)throw new Error("dem dimension mismatch");var T=d*this.dim,O=d*this.dim+this.dim,N=y*this.dim,Z=y*this.dim+this.dim;switch(d){case-1:T=O-1;break;case 1:O=T+1}switch(y){case-1:N=Z-1;break;case 1:Z=N+1}for(var q=-d*this.dim,dt=-y*this.dim,Pt=N;Pt<Z;Pt++)for(var Gt=T;Gt<O;Gt++)this.data[this._idx(Gt,Pt)]=f.data[this._idx(Gt+q,Pt+dt)]},Hi("DEMData",ih);var Wp=function(f){this._stringToNumber={},this._numberToString=[];for(var d=0;d<f.length;d++){var y=f[d];this._stringToNumber[y]=d,this._numberToString[d]=y}};Wp.prototype.encode=function(f){return this._stringToNumber[f]},Wp.prototype.decode=function(f){return this._numberToString[f]};var Mh=function(f,d,y,T,O){this.type="Feature",this._vectorTileFeature=f,f._z=d,f._x=y,f._y=T,this.properties=f.properties,this.id=O},py={geometry:{configurable:!0}};py.geometry.get=function(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},py.geometry.set=function(f){this._geometry=f},Mh.prototype.toJSON=function(){var f={geometry:this.geometry};for(var d in this)d!=="_geometry"&&d!=="_vectorTileFeature"&&(f[d]=this[d]);return f},Object.defineProperties(Mh.prototype,py);var Id=function(){this.state={},this.stateChanges={},this.deletedStates={}};Id.prototype.updateState=function(f,d,y){var T=String(d);if(this.stateChanges[f]=this.stateChanges[f]||{},this.stateChanges[f][T]=this.stateChanges[f][T]||{},b(this.stateChanges[f][T],y),this.deletedStates[f]===null)for(var O in this.deletedStates[f]={},this.state[f])O!==T&&(this.deletedStates[f][O]=null);else if(this.deletedStates[f]&&this.deletedStates[f][T]===null)for(var N in this.deletedStates[f][T]={},this.state[f][T])y[N]||(this.deletedStates[f][T][N]=null);else for(var Z in y)this.deletedStates[f]&&this.deletedStates[f][T]&&this.deletedStates[f][T][Z]===null&&delete this.deletedStates[f][T][Z]},Id.prototype.removeFeatureState=function(f,d,y){if(this.deletedStates[f]!==null){var T=String(d);if(this.deletedStates[f]=this.deletedStates[f]||{},y&&d!==void 0)this.deletedStates[f][T]!==null&&(this.deletedStates[f][T]=this.deletedStates[f][T]||{},this.deletedStates[f][T][y]=null);else if(d!==void 0)if(this.stateChanges[f]&&this.stateChanges[f][T])for(y in this.deletedStates[f][T]={},this.stateChanges[f][T])this.deletedStates[f][T][y]=null;else this.deletedStates[f][T]=null;else this.deletedStates[f]=null}},Id.prototype.getState=function(f,d){var y=String(d),T=b({},(this.state[f]||{})[y],(this.stateChanges[f]||{})[y]);if(this.deletedStates[f]===null)return{};if(this.deletedStates[f]){var O=this.deletedStates[f][d];if(O===null)return{};for(var N in O)delete T[N]}return T},Id.prototype.initializeTileState=function(f,d){f.setFeatureState(this.state,d)},Id.prototype.coalesceChanges=function(f,d){var y={};for(var T in this.stateChanges){this.state[T]=this.state[T]||{};var O={};for(var N in this.stateChanges[T])this.state[T][N]||(this.state[T][N]={}),b(this.state[T][N],this.stateChanges[T][N]),O[N]=this.state[T][N];y[T]=O}for(var Z in this.deletedStates){this.state[Z]=this.state[Z]||{};var q={};if(this.deletedStates[Z]===null)for(var dt in this.state[Z])q[dt]={},this.state[Z][dt]={};else for(var Pt in this.deletedStates[Z]){if(this.deletedStates[Z][Pt]===null)this.state[Z][Pt]={};else for(var Gt=0,Qt=Object.keys(this.deletedStates[Z][Pt]);Gt<Qt.length;Gt+=1)delete this.state[Z][Pt][Qt[Gt]];q[Pt]=this.state[Z][Pt]}y[Z]=y[Z]||{},b(y[Z],q)}if(this.stateChanges={},this.deletedStates={},Object.keys(y).length!==0)for(var ve in f)f[ve].setFeatureState(y,d)};var tp=function(f,d){this.tileID=f,this.x=f.canonical.x,this.y=f.canonical.y,this.z=f.canonical.z,this.grid=new Tf(8192,16,0),this.grid3D=new Tf(8192,16,0),this.featureIndexArray=new re,this.promoteId=d};function dy(f,d,y,T,O){return Dt(f,function(N,Z){var q=d instanceof _c?d.get(Z):null;return q&&q.evaluate?q.evaluate(y,T,O):q})}function vy(f){for(var d=1/0,y=1/0,T=-1/0,O=-1/0,N=0,Z=f;N<Z.length;N+=1){var q=Z[N];d=Math.min(d,q.x),y=Math.min(y,q.y),T=Math.max(T,q.x),O=Math.max(O,q.y)}return{minX:d,minY:y,maxX:T,maxY:O}}function d_(f,d){return d-f}tp.prototype.insert=function(f,d,y,T,O,N){var Z=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(y,T,O);for(var q=N?this.grid3D:this.grid,dt=0;dt<d.length;dt++){for(var Pt=d[dt],Gt=[1/0,1/0,-1/0,-1/0],Qt=0;Qt<Pt.length;Qt++){var ve=Pt[Qt];Gt[0]=Math.min(Gt[0],ve.x),Gt[1]=Math.min(Gt[1],ve.y),Gt[2]=Math.max(Gt[2],ve.x),Gt[3]=Math.max(Gt[3],ve.y)}Gt[0]<8192&&Gt[1]<8192&&Gt[2]>=0&&Gt[3]>=0&&q.insert(Z,Gt[0],Gt[1],Gt[2],Gt[3])}},tp.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ac.VectorTile(new Tc(this.rawTileData)).layers,this.sourceLayerCoder=new Wp(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},tp.prototype.query=function(f,d,y,T){var O=this;this.loadVTLayers();for(var N=f.params||{},Z=8192/f.tileSize/f.scale,q=Gh(N.filter),dt=f.queryGeometry,Pt=f.queryPadding*Z,Gt=vy(dt),Qt=this.grid.query(Gt.minX-Pt,Gt.minY-Pt,Gt.maxX+Pt,Gt.maxY+Pt),ve=vy(f.cameraQueryGeometry),Oe=this.grid3D.query(ve.minX-Pt,ve.minY-Pt,ve.maxX+Pt,ve.maxY+Pt,function(ln,yn,Pn,oi){return function(Ti,oa,Vi,da,Rn){for(var Ri=0,na=Ti;Ri<na.length;Ri+=1){var ta=na[Ri];if(oa<=ta.x&&Vi<=ta.y&&da>=ta.x&&Rn>=ta.y)return!0}var mo=[new J(oa,Vi),new J(oa,Rn),new J(da,Rn),new J(da,Vi)];if(Ti.length>2){for(var Wa=0,po=mo;Wa<po.length;Wa+=1)if(uc(Ti,po[Wa]))return!0}for(var wi=0;wi<Ti.length-1;wi++)if($f(Ti[wi],Ti[wi+1],mo))return!0;return!1}(f.cameraQueryGeometry,ln-Pt,yn-Pt,Pn+Pt,oi+Pt)}),er=0,sr=Oe;er<sr.length;er+=1)Qt.push(sr[er]);Qt.sort(d_);for(var Sr,gr={},zr=function(ln){var yn=Qt[ln];if(yn!==Sr){Sr=yn;var Pn=O.featureIndexArray.get(yn),oi=null;O.loadMatchingFeature(gr,Pn.bucketIndex,Pn.sourceLayerIndex,Pn.featureIndex,q,N.layers,N.availableImages,d,y,T,function(Ti,oa,Vi){return oi||(oi=ss(Ti)),oa.queryIntersectsFeature(dt,Ti,Vi,oi,O.z,f.transform,Z,f.pixelPosMatrix)})}},Jr=0;Jr<Qt.length;Jr++)zr(Jr);return gr},tp.prototype.loadMatchingFeature=function(f,d,y,T,O,N,Z,q,dt,Pt,Gt){var Qt=this.bucketLayerIDs[d];if(!N||function(Ti,oa){for(var Vi=0;Vi<Ti.length;Vi++)if(oa.indexOf(Ti[Vi])>=0)return!0;return!1}(N,Qt)){var ve=this.sourceLayerCoder.decode(y),Oe=this.vtLayers[ve].feature(T);if(O.needGeometry){var er=Ms(Oe,!0);if(!O.filter(new io(this.tileID.overscaledZ),er,this.tileID.canonical))return}else if(!O.filter(new io(this.tileID.overscaledZ),Oe))return;for(var sr=this.getId(Oe,ve),Sr=0;Sr<Qt.length;Sr++){var gr=Qt[Sr];if(!(N&&N.indexOf(gr)<0)){var zr=q[gr];if(zr){var Jr={};sr!==void 0&&Pt&&(Jr=Pt.getState(zr.sourceLayer||"_geojsonTileLayer",sr));var ln=b({},dt[gr]);ln.paint=dy(ln.paint,zr.paint,Oe,Jr,Z),ln.layout=dy(ln.layout,zr.layout,Oe,Jr,Z);var yn=!Gt||Gt(Oe,zr,Jr);if(yn){var Pn=new Mh(Oe,this.z,this.x,this.y,sr);Pn.layer=ln;var oi=f[gr];oi===void 0&&(oi=f[gr]=[]),oi.push({featureIndex:T,feature:Pn,intersectionZ:yn})}}}}}},tp.prototype.lookupSymbolFeatures=function(f,d,y,T,O,N,Z,q){var dt={};this.loadVTLayers();for(var Pt=Gh(O),Gt=0,Qt=f;Gt<Qt.length;Gt+=1)this.loadMatchingFeature(dt,y,T,Qt[Gt],Pt,N,Z,q,d);return dt},tp.prototype.hasLayer=function(f){for(var d=0,y=this.bucketLayerIDs;d<y.length;d+=1)for(var T=0,O=y[d];T<O.length;T+=1)if(f===O[T])return!0;return!1},tp.prototype.getId=function(f,d){var y=f.id;return this.promoteId&&typeof(y=f.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[d]])=="boolean"&&(y=Number(y)),y},Hi("FeatureIndex",tp,{omit:["rawTileData","sourceLayerCoder"]});var go=function(f,d){this.tileID=f,this.uid=le(),this.uses=0,this.tileSize=d,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};go.prototype.registerFadeDuration=function(f){var d=f+this.timeAdded;d<me.now()||this.fadeEndTime&&d<this.fadeEndTime||(this.fadeEndTime=d)},go.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},go.prototype.loadVectorData=function(f,d,y){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",f){for(var T in f.featureIndex&&(this.latestFeatureIndex=f.featureIndex,f.rawTileData?(this.latestRawTileData=f.rawTileData,this.latestFeatureIndex.rawTileData=f.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=f.collisionBoxArray,this.buckets=function(Pt,Gt){var Qt={};if(!Gt)return Qt;for(var ve=function(){var sr=er[Oe],Sr=sr.layerIds.map(function(Jr){return Gt.getLayer(Jr)}).filter(Boolean);if(Sr.length!==0){sr.layers=Sr,sr.stateDependentLayerIds&&(sr.stateDependentLayers=sr.stateDependentLayerIds.map(function(Jr){return Sr.filter(function(ln){return ln.id===Jr})[0]}));for(var gr=0,zr=Sr;gr<zr.length;gr+=1)Qt[zr[gr].id]=sr}},Oe=0,er=Pt;Oe<er.length;Oe+=1)ve();return Qt}(f.buckets,d.style),this.hasSymbolBuckets=!1,this.buckets){var O=this.buckets[T];if(O instanceof Ye){if(this.hasSymbolBuckets=!0,!y)break;O.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var N in this.buckets){var Z=this.buckets[N];if(Z instanceof Ye&&Z.hasRTLText){this.hasRTLText=!0,cl.isLoading()||cl.isLoaded()||vd()!=="deferred"||ic();break}}for(var q in this.queryPadding=0,this.buckets){var dt=this.buckets[q];this.queryPadding=Math.max(this.queryPadding,d.style.getLayer(q).queryRadius(dt))}f.imageAtlas&&(this.imageAtlas=f.imageAtlas),f.glyphAtlasImage&&(this.glyphAtlasImage=f.glyphAtlasImage)}else this.collisionBoxArray=new C},go.prototype.unloadVectorData=function(){for(var f in this.buckets)this.buckets[f].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},go.prototype.getBucket=function(f){return this.buckets[f.id]},go.prototype.upload=function(f){for(var d in this.buckets){var y=this.buckets[d];y.uploadPending()&&y.upload(f)}var T=f.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Wi(f,this.imageAtlas.image,T.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Wi(f,this.glyphAtlasImage,T.ALPHA),this.glyphAtlasImage=null)},go.prototype.prepare=function(f){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(f,this.imageAtlasTexture)},go.prototype.queryRenderedFeatures=function(f,d,y,T,O,N,Z,q,dt,Pt){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:T,cameraQueryGeometry:O,scale:N,tileSize:this.tileSize,pixelPosMatrix:Pt,transform:q,params:Z,queryPadding:this.queryPadding*dt},f,d,y):{}},go.prototype.querySourceFeatures=function(f,d){var y=this.latestFeatureIndex;if(y&&y.rawTileData){var T=y.loadVTLayers(),O=d?d.sourceLayer:"",N=T._geojsonTileLayer||T[O];if(N)for(var Z=Gh(d&&d.filter),q=this.tileID.canonical,dt=q.z,Pt=q.x,Gt=q.y,Qt={z:dt,x:Pt,y:Gt},ve=0;ve<N.length;ve++){var Oe=N.feature(ve);if(Z.needGeometry){var er=Ms(Oe,!0);if(!Z.filter(new io(this.tileID.overscaledZ),er,this.tileID.canonical))continue}else if(!Z.filter(new io(this.tileID.overscaledZ),Oe))continue;var sr=y.getId(Oe,O),Sr=new Mh(Oe,dt,Pt,Gt,sr);Sr.tile=Qt,f.push(Sr)}}},go.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},go.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},go.prototype.setExpiryData=function(f){var d=this.expirationTime;if(f.cacheControl){var y=Jt(f.cacheControl);y["max-age"]&&(this.expirationTime=Date.now()+1e3*y["max-age"])}else f.expires&&(this.expirationTime=new Date(f.expires).getTime());if(this.expirationTime){var T=Date.now(),O=!1;if(this.expirationTime>T)O=!1;else if(d)if(this.expirationTime<d)O=!0;else{var N=this.expirationTime-d;N?this.expirationTime=T+Math.max(N,3e4):O=!0}else O=!0;O?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},go.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)},go.prototype.setFeatureState=function(f,d){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&Object.keys(f).length!==0){var y=this.latestFeatureIndex.loadVTLayers();for(var T in this.buckets)if(d.style.hasLayer(T)){var O=this.buckets[T],N=O.layers[0].sourceLayer||"_geojsonTileLayer",Z=y[N],q=f[N];if(Z&&q&&Object.keys(q).length!==0){O.update(q,Z,this.imageAtlas&&this.imageAtlas.patternPositions||{});var dt=d&&d.style&&d.style.getLayer(T);dt&&(this.queryPadding=Math.max(this.queryPadding,dt.queryRadius(O)))}}}},go.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},go.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<me.now()},go.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},go.prototype.setHoldDuration=function(f){this.symbolFadeHoldUntil=me.now()+f},go.prototype.setDependencies=function(f,d){for(var y={},T=0,O=d;T<O.length;T+=1)y[O[T]]=!0;this.dependencies[f]=y},go.prototype.hasDependency=function(f,d){for(var y=0,T=f;y<T.length;y+=1){var O=this.dependencies[T[y]];if(O){for(var N=0,Z=d;N<Z.length;N+=1)if(O[Z[N]])return!0}}return!1};var Xp=et.performance,gy=function(f){this._marks={start:[f.url,"start"].join("#"),end:[f.url,"end"].join("#"),measure:f.url.toString()},Xp.mark(this._marks.start)};gy.prototype.finish=function(){Xp.mark(this._marks.end);var f=Xp.getEntriesByName(this._marks.measure);return f.length===0&&(Xp.measure(this._marks.measure,this._marks.start,this._marks.end),f=Xp.getEntriesByName(this._marks.measure),Xp.clearMarks(this._marks.start),Xp.clearMarks(this._marks.end),Xp.clearMeasures(this._marks.measure)),f},k.Actor=Jo,k.AlphaImage=Dl,k.CanonicalTileID=jp,k.CollisionBoxArray=C,k.Color=Ya,k.DEMData=ih,k.DataConstantProperty=aa,k.DictionaryCoder=Wp,k.EXTENT=8192,k.ErrorEvent=fr,k.EvaluationParameters=io,k.Event=Ze,k.Evented=_r,k.FeatureIndex=tp,k.FillBucket=dl,k.FillExtrusionBucket=Df,k.ImageAtlas=Vn,k.ImagePosition=Gr,k.LineBucket=Vo,k.LngLat=Do,k.LngLatBounds=gs,k.MercatorCoordinate=nh,k.ONE_EM=24,k.OverscaledTileID=lu,k.Point=J,k.Point$1=J,k.Properties=su,k.Protobuf=Tc,k.RGBAImage=uu,k.RequestManager=Xt,k.RequestPerformance=gy,k.ResourceType=Br,k.SegmentVector=Re,k.SourceFeatureState=Id,k.StructArrayLayout1ui2=cv,k.StructArrayLayout2f1f2i16=rf,k.StructArrayLayout2i4=jh,k.StructArrayLayout3ui6=bc,k.StructArrayLayout4i8=hl,k.SymbolBucket=Ye,k.Texture=Wi,k.Tile=go,k.Transitionable=vu,k.Uniform1f=yi,k.Uniform1i=Un,k.Uniform2f=ui,k.Uniform3f=Bi,k.Uniform4f=sa,k.UniformColor=ua,k.UniformMatrix4f=uo,k.UnwrappedTileID=s0,k.ValidationError=ir,k.WritingMode=di,k.ZoomHistory=pd,k.add=function(f,d,y){return f[0]=d[0]+y[0],f[1]=d[1]+y[1],f[2]=d[2]+y[2],f},k.addDynamicAttributes=yr,k.asyncAll=function(f,d,y){if(!f.length)return y(null,[]);var T=f.length,O=new Array(f.length),N=null;f.forEach(function(Z,q){d(Z,function(dt,Pt){dt&&(N=dt),O[q]=Pt,--T==0&&y(N,O)})})},k.bezier=ot,k.bindAll=At,k.browser=me,k.cacheEntryPossiblyAdded=function(f){++Vr>We&&(f.getActor().send("enforceCacheSizeLimit",Te),Vr=0)},k.clamp=zt,k.clearTileCache=function(f){var d=et.caches.delete("mapbox-tiles");f&&d.catch(f).then(function(){return f()})},k.clipLine=ns,k.clone=function(f){var d=new Co(16);return d[0]=f[0],d[1]=f[1],d[2]=f[2],d[3]=f[3],d[4]=f[4],d[5]=f[5],d[6]=f[6],d[7]=f[7],d[8]=f[8],d[9]=f[9],d[10]=f[10],d[11]=f[11],d[12]=f[12],d[13]=f[13],d[14]=f[14],d[15]=f[15],d},k.clone$1=ge,k.clone$2=function(f){var d=new Co(3);return d[0]=f[0],d[1]=f[1],d[2]=f[2],d},k.collisionCircleLayout=ai,k.config=Yt,k.create=function(){var f=new Co(16);return Co!=Float32Array&&(f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[11]=0,f[12]=0,f[13]=0,f[14]=0),f[0]=1,f[5]=1,f[10]=1,f[15]=1,f},k.create$1=function(){var f=new Co(9);return Co!=Float32Array&&(f[1]=0,f[2]=0,f[3]=0,f[5]=0,f[6]=0,f[7]=0),f[0]=1,f[4]=1,f[8]=1,f},k.create$2=function(){var f=new Co(4);return Co!=Float32Array&&(f[1]=0,f[2]=0),f[0]=1,f[3]=1,f},k.createCommonjsModule=Et,k.createExpression=wf,k.createLayout=os,k.createStyleLayer=function(f){return f.type==="custom"?new ci(f):new Ai[f.type](f)},k.cross=function(f,d,y){var T=d[0],O=d[1],N=d[2],Z=y[0],q=y[1],dt=y[2];return f[0]=O*dt-N*q,f[1]=N*Z-T*dt,f[2]=T*q-O*Z,f},k.deepEqual=function f(d,y){if(Array.isArray(d)){if(!Array.isArray(y)||d.length!==y.length)return!1;for(var T=0;T<d.length;T++)if(!f(d[T],y[T]))return!1;return!0}if(typeof d=="object"&&d!==null&&y!==null){if(typeof y!="object"||Object.keys(d).length!==Object.keys(y).length)return!1;for(var O in d)if(!f(d[O],y[O]))return!1;return!0}return d===y},k.dot=function(f,d){return f[0]*d[0]+f[1]*d[1]+f[2]*d[2]},k.dot$1=function(f,d){return f[0]*d[0]+f[1]*d[1]+f[2]*d[2]+f[3]*d[3]},k.ease=ut,k.emitValidationErrors=gh,k.endsWith=rt,k.enforceCacheSizeLimit=function(f){Qe(),Tt&&Tt.then(function(d){d.keys().then(function(y){for(var T=0;T<y.length-f;T++)d.delete(y[T])})})},k.evaluateSizeForFeature=ma,k.evaluateSizeForZoom=Ma,k.evaluateVariableOffset=ql,k.evented=ef,k.extend=b,k.featureFilter=Gh,k.filterObject=Ee,k.fromRotation=function(f,d){var y=Math.sin(d),T=Math.cos(d);return f[0]=T,f[1]=y,f[2]=0,f[3]=-y,f[4]=T,f[5]=0,f[6]=0,f[7]=0,f[8]=1,f},k.getAnchorAlignment=pi,k.getAnchorJustification=or,k.getArrayBuffer=Dn,k.getImage=Wt,k.getJSON=function(f,d){return Wn(b(f,{type:"json"}),d)},k.getRTLTextPluginStatus=vd,k.getReferrer=an,k.getVideo=function(f,d){var y,T,O=et.document.createElement("video");O.muted=!0,O.onloadstart=function(){d(null,O)};for(var N=0;N<f.length;N++){var Z=et.document.createElement("source");y=f[N],T=void 0,(T=et.document.createElement("a")).href=y,(T.protocol!==et.document.location.protocol||T.host!==et.document.location.host)&&(O.crossOrigin="Anonymous"),Z.src=f[N],O.appendChild(Z)}return{cancel:function(){}}},k.identity=Fl,k.invert=function(f,d){var y=d[0],T=d[1],O=d[2],N=d[3],Z=d[4],q=d[5],dt=d[6],Pt=d[7],Gt=d[8],Qt=d[9],ve=d[10],Oe=d[11],er=d[12],sr=d[13],Sr=d[14],gr=d[15],zr=y*q-T*Z,Jr=y*dt-O*Z,ln=y*Pt-N*Z,yn=T*dt-O*q,Pn=T*Pt-N*q,oi=O*Pt-N*dt,Ti=Gt*sr-Qt*er,oa=Gt*Sr-ve*er,Vi=Gt*gr-Oe*er,da=Qt*Sr-ve*sr,Rn=Qt*gr-Oe*sr,Ri=ve*gr-Oe*Sr,na=zr*Ri-Jr*Rn+ln*da+yn*Vi-Pn*oa+oi*Ti;return na?(f[0]=(q*Ri-dt*Rn+Pt*da)*(na=1/na),f[1]=(O*Rn-T*Ri-N*da)*na,f[2]=(sr*oi-Sr*Pn+gr*yn)*na,f[3]=(ve*Pn-Qt*oi-Oe*yn)*na,f[4]=(dt*Vi-Z*Ri-Pt*oa)*na,f[5]=(y*Ri-O*Vi+N*oa)*na,f[6]=(Sr*ln-er*oi-gr*Jr)*na,f[7]=(Gt*oi-ve*ln+Oe*Jr)*na,f[8]=(Z*Rn-q*Vi+Pt*Ti)*na,f[9]=(T*Vi-y*Rn-N*Ti)*na,f[10]=(er*Pn-sr*ln+gr*zr)*na,f[11]=(Qt*ln-Gt*Pn-Oe*zr)*na,f[12]=(q*oa-Z*da-dt*Ti)*na,f[13]=(y*da-T*oa+O*Ti)*na,f[14]=(sr*Jr-er*yn-Sr*zr)*na,f[15]=(Gt*yn-Qt*Jr+ve*zr)*na,f):null},k.isChar=ei,k.isMapboxURL=$t,k.keysDifference=function(f,d){var y=[];for(var T in f)T in d||y.push(T);return y},k.makeRequest=Wn,k.mapObject=Dt,k.mercatorXfromLng=Zc,k.mercatorYfromLat=Mc,k.mercatorZfromAltitude=_v,k.mul=bh,k.multiply=nl,k.mvt=Ac,k.nextPowerOfTwo=function(f){return f<=1?1:Math.pow(2,Math.ceil(Math.log(f)/Math.LN2))},k.normalize=function(f,d){var y=d[0],T=d[1],O=d[2],N=y*y+T*T+O*O;return N>0&&(N=1/Math.sqrt(N)),f[0]=d[0]*N,f[1]=d[1]*N,f[2]=d[2]*N,f},k.number=Uo,k.offscreenCanvasSupported=Pr,k.ortho=function(f,d,y,T,O,N,Z){var q=1/(d-y),dt=1/(T-O),Pt=1/(N-Z);return f[0]=-2*q,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=-2*dt,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=2*Pt,f[11]=0,f[12]=(d+y)*q,f[13]=(O+T)*dt,f[14]=(Z+N)*Pt,f[15]=1,f},k.parseGlyphPBF=function(f){return new Tc(f).readFields(ni,[])},k.pbf=Tc,k.performSymbolLayout=function(f,d,y,T,O,N,Z){f.createArrays(),f.tilePixelRatio=8192/(512*f.overscaling),f.compareText={},f.iconsNeedLinear=!1;var q=f.layers[0].layout,dt=f.layers[0]._unevaluatedLayout._values,Pt={};if(f.textSizeData.kind==="composite"){var Gt=f.textSizeData,Qt=Gt.maxZoom;Pt.compositeTextSizes=[dt["text-size"].possiblyEvaluate(new io(Gt.minZoom),Z),dt["text-size"].possiblyEvaluate(new io(Qt),Z)]}if(f.iconSizeData.kind==="composite"){var ve=f.iconSizeData,Oe=ve.maxZoom;Pt.compositeIconSizes=[dt["icon-size"].possiblyEvaluate(new io(ve.minZoom),Z),dt["icon-size"].possiblyEvaluate(new io(Oe),Z)]}Pt.layoutTextSize=dt["text-size"].possiblyEvaluate(new io(f.zoom+1),Z),Pt.layoutIconSize=dt["icon-size"].possiblyEvaluate(new io(f.zoom+1),Z),Pt.textMaxSize=dt["text-size"].possiblyEvaluate(new io(18));for(var er=24*q.get("text-line-height"),sr=q.get("text-rotation-alignment")==="map"&&q.get("symbol-placement")!=="point",Sr=q.get("text-keep-upright"),gr=q.get("text-size"),zr=function(){var yn=ln[Jr],Pn=q.get("text-font").evaluate(yn,{},Z).join(","),oi=gr.evaluate(yn,{},Z),Ti=Pt.layoutTextSize.evaluate(yn,{},Z),oa=Pt.layoutIconSize.evaluate(yn,{},Z),Vi={horizontal:{},vertical:void 0},da=yn.text,Rn=[0,0];if(da){var Ri=da.toString(),na=24*q.get("text-letter-spacing").evaluate(yn,{},Z),ta=function(Ja){for(var ms=0,fs=Ja;ms<fs.length;ms+=1)if(Bo=fs[ms].charCodeAt(0),ei.Arabic(Bo)||ei["Arabic Supplement"](Bo)||ei["Arabic Extended-A"](Bo)||ei["Arabic Presentation Forms-A"](Bo)||ei["Arabic Presentation Forms-B"](Bo))return!1;var Bo;return!0}(Ri)?na:0,mo=q.get("text-anchor").evaluate(yn,{},Z),Wa=q.get("text-variable-anchor");if(!Wa){var po=q.get("text-radial-offset").evaluate(yn,{},Z);Rn=po?ql(mo,[24*po,Us]):q.get("text-offset").evaluate(yn,{},Z).map(function(Ja){return 24*Ja})}var wi=sr?"center":q.get("text-justify").evaluate(yn,{},Z),Ho=q.get("symbol-placement"),Zs=Ho==="point"?24*q.get("text-max-width").evaluate(yn,{},Z):0,ru=function(){f.allowVerticalPlacement&&tf(Ri)&&(Vi.vertical=Li(da,d,y,O,Pn,Zs,er,mo,"left",ta,Rn,di.vertical,!0,Ho,Ti,oi))};if(!sr&&Wa){for(var Ls=wi==="auto"?Wa.map(function(Ja){return or(Ja)}):[wi],Ds=!1,cu=0;cu<Ls.length;cu++){var Vs=Ls[cu];if(!Vi.horizontal[Vs])if(Ds)Vi.horizontal[Vs]=Vi.horizontal[0];else{var Eu=Li(da,d,y,O,Pn,Zs,er,"center",Vs,ta,Rn,di.horizontal,!1,Ho,Ti,oi);Eu&&(Vi.horizontal[Vs]=Eu,Ds=Eu.positionedLines.length===1)}}ru()}else{wi==="auto"&&(wi=or(mo));var Wu=Li(da,d,y,O,Pn,Zs,er,mo,wi,ta,Rn,di.horizontal,!1,Ho,Ti,oi);Wu&&(Vi.horizontal[wi]=Wu),ru(),tf(Ri)&&sr&&Sr&&(Vi.vertical=Li(da,d,y,O,Pn,Zs,er,mo,wi,ta,Rn,di.vertical,!1,Ho,Ti,oi))}}var ml=void 0,Tl=!1;if(yn.icon&&yn.icon.name){var Du=T[yn.icon.name];Du&&(ml=function(Ja,ms,fs){var Bo=pi(fs),Ql=ms[0]-Ja.displaySize[0]*Bo.horizontalAlign,Nl=ms[1]-Ja.displaySize[1]*Bo.verticalAlign;return{image:Ja,top:Nl,bottom:Nl+Ja.displaySize[1],left:Ql,right:Ql+Ja.displaySize[0]}}(O[yn.icon.name],q.get("icon-offset").evaluate(yn,{},Z),q.get("icon-anchor").evaluate(yn,{},Z)),Tl=Du.sdf,f.sdfIcons===void 0?f.sdfIcons=Du.sdf:f.sdfIcons!==Du.sdf&&Ue("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Du.pixelRatio!==f.pixelRatio||q.get("icon-rotate").constantOr(1)!==0)&&(f.iconsNeedLinear=!0))}var yl=en(Vi.horizontal)||Vi.vertical;f.iconsInText=!!yl&&yl.iconsInText,(yl||ml)&&function(Ja,ms,fs,Bo,Ql,Nl,Bs,wu,al,Fo,ah){var Ml=Nl.textMaxSize.evaluate(ms,{});Ml===void 0&&(Ml=Bs);var ep,Su=Ja.layers[0].layout,rp=Su.get("icon-offset").evaluate(ms,{},ah),Nf=en(fs.horizontal),kd=Bs/24,Ld=Ja.tilePixelRatio*kd,l0=Ja.tilePixelRatio*Ml/24,np=Ja.tilePixelRatio*wu,Pd=Ja.tilePixelRatio*Su.get("symbol-spacing"),q0=Su.get("text-padding")*Ja.tilePixelRatio,oh=Su.get("icon-padding")*Ja.tilePixelRatio,xv=Su.get("text-max-angle")/180*Math.PI,bv=Su.get("text-rotation-alignment")==="map"&&Su.get("symbol-placement")!=="point",$s=Su.get("icon-rotation-alignment")==="map"&&Su.get("symbol-placement")!=="point",ol=Su.get("symbol-placement"),pf=Pd/2,Od=Su.get("icon-text-fit");Bo&&Od!=="none"&&(Ja.allowVerticalPlacement&&fs.vertical&&(ep=Ca(Bo,fs.vertical,Od,Su.get("icon-text-fit-padding"),rp,kd)),Nf&&(Bo=Ca(Bo,Nf,Od,Su.get("icon-text-fit-padding"),rp,kd)));var Ih=function(yy,Cv){Cv.x<0||Cv.x>=8192||Cv.y<0||Cv.y>=8192||function(qs,vf,_y,ap,op,Ng,p0,Vc,Nd,zd,Ud,Zd,Vd,d0,sp,J0,Av,up,v0,tg,Ic,kh,eg,Lh,zg){var tc,lp,Tv,Gd,Hd,Mv=qs.addToLineVertexArray(vf,_y),Iv=0,Ug=0,Zg=0,g0=0,m0=-1,Gc=-1,cp={},xy=nr(""),qp=0,y0=0;if(Vc._unevaluatedLayout.getValue("text-radial-offset")===void 0?(qp=(tc=Vc.layout.get("text-offset").evaluate(Ic,{},Lh).map(function(Lv){return 24*Lv}))[0],y0=tc[1]):(qp=24*Vc.layout.get("text-radial-offset").evaluate(Ic,{},Lh),y0=Us),qs.allowVerticalPlacement&&ap.vertical){var rg=Vc.layout.get("text-rotate").evaluate(Ic,{},Lh)+90;Gd=new eu(Nd,vf,zd,Ud,Zd,ap.vertical,Vd,d0,sp,rg),p0&&(Hd=new eu(Nd,vf,zd,Ud,Zd,p0,Av,up,sp,rg))}if(op){var jd=Vc.layout.get("icon-rotate").evaluate(Ic,{}),_0=Vc.layout.get("icon-text-fit")!=="none",ng=Ou(op,jd,eg,_0),_l=p0?Ou(p0,jd,eg,_0):void 0;Tv=new eu(Nd,vf,zd,Ud,Zd,op,Av,up,!1,jd),Iv=4*ng.length;var zf=qs.iconSizeData,fp=null;zf.kind==="source"?(fp=[128*Vc.layout.get("icon-size").evaluate(Ic,{})])[0]>32640&&Ue(qs.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):zf.kind==="composite"&&((fp=[128*kh.compositeIconSizes[0].evaluate(Ic,{},Lh),128*kh.compositeIconSizes[1].evaluate(Ic,{},Lh)])[0]>32640||fp[1]>32640)&&Ue(qs.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),qs.addSymbols(qs.icon,ng,fp,tg,v0,Ic,!1,vf,Mv.lineStartIndex,Mv.lineLength,-1,Lh),m0=qs.icon.placedSymbolArray.length-1,_l&&(Ug=4*_l.length,qs.addSymbols(qs.icon,_l,fp,tg,v0,Ic,di.vertical,vf,Mv.lineStartIndex,Mv.lineLength,-1,Lh),Gc=qs.icon.placedSymbolArray.length-1)}for(var kc in ap.horizontal){var kv=ap.horizontal[kc];if(!lp){xy=nr(kv.text);var Vg=Vc.layout.get("text-rotate").evaluate(Ic,{},Lh);lp=new eu(Nd,vf,zd,Ud,Zd,kv,Vd,d0,sp,Vg)}var hp=kv.positionedLines.length===1;if(Zg+=fn(qs,vf,kv,Ng,Vc,sp,Ic,J0,Mv,ap.vertical?di.horizontal:di.horizontalOnly,hp?Object.keys(ap.horizontal):[kc],cp,m0,kh,Lh),hp)break}ap.vertical&&(g0+=fn(qs,vf,ap.vertical,Ng,Vc,sp,Ic,J0,Mv,di.vertical,["vertical"],cp,Gc,kh,Lh));var by=lp?lp.boxStartIndex:qs.collisionBoxArray.length,v_=lp?lp.boxEndIndex:qs.collisionBoxArray.length,Gg=Gd?Gd.boxStartIndex:qs.collisionBoxArray.length,Ey=Gd?Gd.boxEndIndex:qs.collisionBoxArray.length,Hg=Tv?Tv.boxStartIndex:qs.collisionBoxArray.length,pp=Tv?Tv.boxEndIndex:qs.collisionBoxArray.length,g_=Hd?Hd.boxStartIndex:qs.collisionBoxArray.length,m_=Hd?Hd.boxEndIndex:qs.collisionBoxArray.length,Ph=-1,x0=function(Lv,wy){return Lv&&Lv.circleDiameter?Math.max(Lv.circleDiameter,wy):wy};Ph=x0(lp,Ph),Ph=x0(Gd,Ph),Ph=x0(Tv,Ph);var b0=(Ph=x0(Hd,Ph))>-1?1:0;b0&&(Ph*=zg/24),qs.glyphOffsetArray.length>=Ye.MAX_GLYPHS&&Ue("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ic.sortKey!==void 0&&qs.addToSortKeyRanges(qs.symbolInstances.length,Ic.sortKey),qs.symbolInstances.emplaceBack(vf.x,vf.y,cp.right>=0?cp.right:-1,cp.center>=0?cp.center:-1,cp.left>=0?cp.left:-1,cp.vertical||-1,m0,Gc,xy,by,v_,Gg,Ey,Hg,pp,g_,m_,zd,Zg,g0,Iv,Ug,b0,0,Vd,qp,y0,Ph)}(Ja,Cv,yy,fs,Bo,Ql,ep,Ja.layers[0],Ja.collisionBoxArray,ms.index,ms.sourceLayerIndex,Ja.index,Ld,q0,bv,al,np,oh,$s,rp,ms,Nl,Fo,ah,Bs)};if(ol==="line")for(var Fd=0,Yp=ns(ms.geometry,0,0,8192,8192);Fd<Yp.length;Fd+=1)for(var c0=Yp[Fd],Ev=0,K0=bu(c0,Pd,xv,fs.vertical||Nf,Bo,24,l0,Ja.overscaling,8192);Ev<K0.length;Ev+=1){var Dg=K0[Ev];Nf&&ji(Ja,Nf.text,pf,Dg)||Ih(c0,Dg)}else if(ol==="line-center")for(var $p=0,hs=ms.geometry;$p<hs.length;$p+=1){var df=hs[$p];if(df.length>1){var is=Ts(df,xv,fs.vertical||Nf,Bo,24,l0);is&&Ih(df,is)}}else if(ms.type==="Polygon")for(var Jl=0,wv=zp(ms.geometry,0);Jl<wv.length;Jl+=1){var Rd=wv[Jl],f0=pa(Rd,16);Ih(Rd[0],new Ci(f0.x,f0.y,0))}else if(ms.type==="LineString")for(var Dd=0,h0=ms.geometry;Dd<h0.length;Dd+=1){var Bd=h0[Dd];Ih(Bd,new Ci(Bd[0].x,Bd[0].y,0))}else if(ms.type==="Point")for(var ip=0,Sv=ms.geometry;ip<Sv.length;ip+=1)for(var Bg=0,ne=Sv[ip];Bg<ne.length;Bg+=1){var Q0=ne[Bg];Ih([Q0],new Ci(Q0.x,Q0.y,0))}}(f,yn,Vi,ml,T,Pt,Ti,oa,Rn,Tl,Z)},Jr=0,ln=f.features;Jr<ln.length;Jr+=1)zr();N&&f.generateCollisionDebugBuffers()},k.perspective=function(f,d,y,T,O){var N,Z=1/Math.tan(d/2);return f[0]=Z/y,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=Z,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[11]=-1,f[12]=0,f[13]=0,f[15]=0,O!=null&&O!==1/0?(f[10]=(O+T)*(N=1/(T-O)),f[14]=2*O*T*N):(f[10]=-1,f[14]=-2*T),f},k.pick=function(f,d){for(var y={},T=0;T<d.length;T++){var O=d[T];O in f&&(y[O]=f[O])}return y},k.plugin=cl,k.polygonIntersectsPolygon=oc,k.postMapLoadEvent=jt,k.postTurnstileEvent=Ht,k.potpack=ii,k.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],k.register=Hi,k.registerForPluginStateChange=function(f){return f({pluginStatus:Os,pluginURL:Pl}),ef.on("pluginStateChange",f),f},k.renderColorRamp=cc,k.rotate=function(f,d,y){var T=d[0],O=d[1],N=d[2],Z=d[3],q=Math.sin(y),dt=Math.cos(y);return f[0]=T*dt+N*q,f[1]=O*dt+Z*q,f[2]=T*-q+N*dt,f[3]=O*-q+Z*dt,f},k.rotateX=function(f,d,y){var T=Math.sin(y),O=Math.cos(y),N=d[4],Z=d[5],q=d[6],dt=d[7],Pt=d[8],Gt=d[9],Qt=d[10],ve=d[11];return d!==f&&(f[0]=d[0],f[1]=d[1],f[2]=d[2],f[3]=d[3],f[12]=d[12],f[13]=d[13],f[14]=d[14],f[15]=d[15]),f[4]=N*O+Pt*T,f[5]=Z*O+Gt*T,f[6]=q*O+Qt*T,f[7]=dt*O+ve*T,f[8]=Pt*O-N*T,f[9]=Gt*O-Z*T,f[10]=Qt*O-q*T,f[11]=ve*O-dt*T,f},k.rotateZ=function(f,d,y){var T=Math.sin(y),O=Math.cos(y),N=d[0],Z=d[1],q=d[2],dt=d[3],Pt=d[4],Gt=d[5],Qt=d[6],ve=d[7];return d!==f&&(f[8]=d[8],f[9]=d[9],f[10]=d[10],f[11]=d[11],f[12]=d[12],f[13]=d[13],f[14]=d[14],f[15]=d[15]),f[0]=N*O+Pt*T,f[1]=Z*O+Gt*T,f[2]=q*O+Qt*T,f[3]=dt*O+ve*T,f[4]=Pt*O-N*T,f[5]=Gt*O-Z*T,f[6]=Qt*O-q*T,f[7]=ve*O-dt*T,f},k.scale=function(f,d,y){var T=y[0],O=y[1],N=y[2];return f[0]=d[0]*T,f[1]=d[1]*T,f[2]=d[2]*T,f[3]=d[3]*T,f[4]=d[4]*O,f[5]=d[5]*O,f[6]=d[6]*O,f[7]=d[7]*O,f[8]=d[8]*N,f[9]=d[9]*N,f[10]=d[10]*N,f[11]=d[11]*N,f[12]=d[12],f[13]=d[13],f[14]=d[14],f[15]=d[15],f},k.scale$1=function(f,d,y){return f[0]=d[0]*y,f[1]=d[1]*y,f[2]=d[2]*y,f[3]=d[3]*y,f},k.scale$2=function(f,d,y){return f[0]=d[0]*y,f[1]=d[1]*y,f[2]=d[2]*y,f},k.setCacheLimits=function(f,d){Te=f,We=d},k.setRTLTextPlugin=function(f,d,y){if(y===void 0&&(y=!1),Os==="deferred"||Os==="loading"||Os==="loaded")throw new Error("setRTLTextPlugin cannot be called multiple times.");Pl=me.resolveURL(f),Os="deferred",Wl=d,dd(),y||ic()},k.sphericalToCartesian=function(f){var d=f[0],y=f[1],T=f[2];return y+=90,y*=Math.PI/180,T*=Math.PI/180,{x:d*Math.cos(y)*Math.sin(T),y:d*Math.sin(y)*Math.sin(T),z:d*Math.cos(T)}},k.sqrLen=function(f){var d=f[0],y=f[1];return d*d+y*y},k.styleSpec=we,k.sub=function(f,d,y){return f[0]=d[0]-y[0],f[1]=d[1]-y[1],f[2]=d[2]-y[2],f},k.symbolSize=lo,k.transformMat3=function(f,d,y){var T=d[0],O=d[1],N=d[2];return f[0]=T*y[0]+O*y[3]+N*y[6],f[1]=T*y[1]+O*y[4]+N*y[7],f[2]=T*y[2]+O*y[5]+N*y[8],f},k.transformMat4=qf,k.translate=function(f,d,y){var T,O,N,Z,q,dt,Pt,Gt,Qt,ve,Oe,er,sr=y[0],Sr=y[1],gr=y[2];return d===f?(f[12]=d[0]*sr+d[4]*Sr+d[8]*gr+d[12],f[13]=d[1]*sr+d[5]*Sr+d[9]*gr+d[13],f[14]=d[2]*sr+d[6]*Sr+d[10]*gr+d[14],f[15]=d[3]*sr+d[7]*Sr+d[11]*gr+d[15]):(O=d[1],N=d[2],Z=d[3],q=d[4],dt=d[5],Pt=d[6],Gt=d[7],Qt=d[8],ve=d[9],Oe=d[10],er=d[11],f[0]=T=d[0],f[1]=O,f[2]=N,f[3]=Z,f[4]=q,f[5]=dt,f[6]=Pt,f[7]=Gt,f[8]=Qt,f[9]=ve,f[10]=Oe,f[11]=er,f[12]=T*sr+q*Sr+Qt*gr+d[12],f[13]=O*sr+dt*Sr+ve*gr+d[13],f[14]=N*sr+Pt*Sr+Oe*gr+d[14],f[15]=Z*sr+Gt*Sr+er*gr+d[15]),f},k.triggerPluginCompletionEvent=Lp,k.uniqueId=le,k.validateCustomStyleLayer=function(f){var d=[],y=f.id;return y===void 0&&d.push({message:"layers."+y+': missing required property "id"'}),f.render===void 0&&d.push({message:"layers."+y+': missing required method "render"'}),f.renderingMode&&f.renderingMode!=="2d"&&f.renderingMode!=="3d"&&d.push({message:"layers."+y+': property "renderingMode" must be either "2d" or "3d"'}),d},k.validateLight=uv,k.validateStyle=kp,k.values=function(f){var d=[];for(var y in f)d.push(f[y]);return d},k.vectorTile=Ac,k.version="1.13.3",k.warnOnce=Ue,k.webpSupported=qe,k.window=et,k.wrap=P}),gt(["./shared"],function(k){"use strict";function Et(Ft){var Wt=typeof Ft;if(Wt==="number"||Wt==="boolean"||Wt==="string"||Ft==null)return JSON.stringify(Ft);if(Array.isArray(Ft)){for(var oe="[",ye=0,Ze=Ft;ye<Ze.length;ye+=1)oe+=Et(Ze[ye])+",";return oe+"]"}for(var fr=Object.keys(Ft).sort(),_r="{",we=0;we<fr.length;we++)_r+=JSON.stringify(fr[we])+":"+Et(Ft[fr[we]])+",";return _r+"}"}function K(Ft){for(var Wt="",oe=0,ye=k.refProperties;oe<ye.length;oe+=1)Wt+="/"+Et(Ft[ye[oe]]);return Wt}var yt=function(Ft){this.keyCache={},Ft&&this.replace(Ft)};yt.prototype.replace=function(Ft){this._layerConfigs={},this._layers={},this.update(Ft,[])},yt.prototype.update=function(Ft,Wt){for(var oe=this,ye=0,Ze=Ft;ye<Ze.length;ye+=1){var fr=Ze[ye];this._layerConfigs[fr.id]=fr;var _r=this._layers[fr.id]=k.createStyleLayer(fr);_r._featureFilter=k.featureFilter(_r.filter),this.keyCache[fr.id]&&delete this.keyCache[fr.id]}for(var we=0,ir=Wt;we<ir.length;we+=1){var Hr=ir[we];delete this.keyCache[Hr],delete this._layerConfigs[Hr],delete this._layers[Hr]}this.familiesBySource={};for(var In=0,nn=function(Yn,fi){for(var Ea={},si=0;si<Yn.length;si++){var Ia=fi&&fi[Yn[si].id]||K(Yn[si]);fi&&(fi[Yn[si].id]=Ia);var vo=Ea[Ia];vo||(vo=Ea[Ia]=[]),vo.push(Yn[si])}var Oa=[];for(var Ha in Ea)Oa.push(Ea[Ha]);return Oa}(k.values(this._layerConfigs),this.keyCache);In<nn.length;In+=1){var Yr=nn[In].map(function(Yn){return oe._layers[Yn.id]}),On=Yr[0];if(On.visibility!=="none"){var bi=On.source||"",Mi=this.familiesBySource[bi];Mi||(Mi=this.familiesBySource[bi]={});var tn=On.sourceLayer||"_geojsonTileLayer",mi=Mi[tn];mi||(mi=Mi[tn]=[]),mi.push(Yr)}}};var J=function(Ft){var Wt={},oe=[];for(var ye in Ft){var Ze=Ft[ye],fr=Wt[ye]={};for(var _r in Ze){var we=Ze[+_r];if(we&&we.bitmap.width!==0&&we.bitmap.height!==0){var ir={x:0,y:0,w:we.bitmap.width+2,h:we.bitmap.height+2};oe.push(ir),fr[_r]={rect:ir,metrics:we.metrics}}}}var Hr=k.potpack(oe),In=new k.AlphaImage({width:Hr.w||1,height:Hr.h||1});for(var nn in Ft){var Yr=Ft[nn];for(var On in Yr){var bi=Yr[+On];if(bi&&bi.bitmap.width!==0&&bi.bitmap.height!==0){var Mi=Wt[nn][On].rect;k.AlphaImage.copy(bi.bitmap,In,{x:0,y:0},{x:Mi.x+1,y:Mi.y+1},bi.bitmap)}}}this.image=In,this.positions=Wt};k.register("GlyphAtlas",J);var pt=function(Ft){this.tileID=new k.OverscaledTileID(Ft.tileID.overscaledZ,Ft.tileID.wrap,Ft.tileID.canonical.z,Ft.tileID.canonical.x,Ft.tileID.canonical.y),this.uid=Ft.uid,this.zoom=Ft.zoom,this.pixelRatio=Ft.pixelRatio,this.tileSize=Ft.tileSize,this.source=Ft.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ft.showCollisionBoxes,this.collectResourceTiming=!!Ft.collectResourceTiming,this.returnDependencies=!!Ft.returnDependencies,this.promoteId=Ft.promoteId};function et(Ft,Wt,oe){for(var ye=new k.EvaluationParameters(Wt),Ze=0,fr=Ft;Ze<fr.length;Ze+=1)fr[Ze].recalculate(ye,oe)}function _e(Ft,Wt){var oe=k.getArrayBuffer(Ft.request,function(ye,Ze,fr,_r){ye?Wt(ye):Ze&&Wt(null,{vectorTile:new k.vectorTile.VectorTile(new k.pbf(Ze)),rawData:Ze,cacheControl:fr,expires:_r})});return function(){oe.cancel(),Wt()}}pt.prototype.parse=function(Ft,Wt,oe,ye,Ze){var fr=this;this.status="parsing",this.data=Ft,this.collisionBoxArray=new k.CollisionBoxArray;var _r=new k.DictionaryCoder(Object.keys(Ft.layers).sort()),we=new k.FeatureIndex(this.tileID,this.promoteId);we.bucketLayerIDs=[];var ir,Hr,In,nn,Yr={},On={featureIndex:we,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:oe},bi=Wt.familiesBySource[this.source];for(var Mi in bi){var tn=Ft.layers[Mi];if(tn){tn.version===1&&k.warnOnce('Vector tile source "'+this.source+'" layer "'+Mi+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var mi=_r.encode(Mi),Yn=[],fi=0;fi<tn.length;fi++){var Ea=tn.feature(fi),si=we.getId(Ea,Mi);Yn.push({feature:Ea,id:si,index:fi,sourceLayerIndex:mi})}for(var Ia=0,vo=bi[Mi];Ia<vo.length;Ia+=1){var Oa=vo[Ia],Ha=Oa[0];Ha.minzoom&&this.zoom<Math.floor(Ha.minzoom)||Ha.maxzoom&&this.zoom>=Ha.maxzoom||Ha.visibility!=="none"&&(et(Oa,this.zoom,oe),(Yr[Ha.id]=Ha.createBucket({index:we.bucketLayerIDs.length,layers:Oa,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:mi,sourceID:this.source})).populate(Yn,On,this.tileID.canonical),we.bucketLayerIDs.push(Oa.map(function(yo){return yo.id})))}}}var wa=k.mapObject(On.glyphDependencies,function(yo){return Object.keys(yo).map(Number)});Object.keys(wa).length?ye.send("getGlyphs",{uid:this.uid,stacks:wa},function(yo,Va){ir||(ir=yo,Hr=Va,Wo.call(fr))}):Hr={};var ya=Object.keys(On.iconDependencies);ya.length?ye.send("getImages",{icons:ya,source:this.source,tileID:this.tileID,type:"icons"},function(yo,Va){ir||(ir=yo,In=Va,Wo.call(fr))}):In={};var Qa=Object.keys(On.patternDependencies);function Wo(){if(ir)return Ze(ir);if(Hr&&In&&nn){var yo=new J(Hr),Va=new k.ImageAtlas(In,nn);for(var Ya in Yr){var No=Yr[Ya];No instanceof k.SymbolBucket?(et(No.layers,this.zoom,oe),k.performSymbolLayout(No,Hr,yo.positions,In,Va.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):No.hasPattern&&(No instanceof k.LineBucket||No instanceof k.FillBucket||No instanceof k.FillExtrusionBucket)&&(et(No.layers,this.zoom,oe),No.addFeatures(On,this.tileID.canonical,Va.patternPositions))}this.status="done",Ze(null,{buckets:k.values(Yr).filter(function(Nu){return!Nu.isEmpty()}),featureIndex:we,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:yo.image,imageAtlas:Va,glyphMap:this.returnDependencies?Hr:null,iconMap:this.returnDependencies?In:null,glyphPositions:this.returnDependencies?yo.positions:null})}}Qa.length?ye.send("getImages",{icons:Qa,source:this.source,tileID:this.tileID,type:"patterns"},function(yo,Va){ir||(ir=yo,nn=Va,Wo.call(fr))}):nn={},Wo.call(this)};var ot=function(Ft,Wt,oe,ye){this.actor=Ft,this.layerIndex=Wt,this.availableImages=oe,this.loadVectorData=ye||_e,this.loading={},this.loaded={}};ot.prototype.loadTile=function(Ft,Wt){var oe=this,ye=Ft.uid;this.loading||(this.loading={});var Ze=!!(Ft&&Ft.request&&Ft.request.collectResourceTiming)&&new k.RequestPerformance(Ft.request),fr=this.loading[ye]=new pt(Ft);fr.abort=this.loadVectorData(Ft,function(_r,we){if(delete oe.loading[ye],_r||!we)return fr.status="done",oe.loaded[ye]=fr,Wt(_r);var ir=we.rawData,Hr={};we.expires&&(Hr.expires=we.expires),we.cacheControl&&(Hr.cacheControl=we.cacheControl);var In={};if(Ze){var nn=Ze.finish();nn&&(In.resourceTiming=JSON.parse(JSON.stringify(nn)))}fr.vectorTile=we.vectorTile,fr.parse(we.vectorTile,oe.layerIndex,oe.availableImages,oe.actor,function(Yr,On){if(Yr||!On)return Wt(Yr);Wt(null,k.extend({rawTileData:ir.slice(0)},On,Hr,In))}),oe.loaded=oe.loaded||{},oe.loaded[ye]=fr})},ot.prototype.reloadTile=function(Ft,Wt){var oe=this,ye=this.loaded,Ze=Ft.uid,fr=this;if(ye&&ye[Ze]){var _r=ye[Ze];_r.showCollisionBoxes=Ft.showCollisionBoxes;var we=function(ir,Hr){var In=_r.reloadCallback;In&&(delete _r.reloadCallback,_r.parse(_r.vectorTile,fr.layerIndex,oe.availableImages,fr.actor,In)),Wt(ir,Hr)};_r.status==="parsing"?_r.reloadCallback=we:_r.status==="done"&&(_r.vectorTile?_r.parse(_r.vectorTile,this.layerIndex,this.availableImages,this.actor,we):we())}},ot.prototype.abortTile=function(Ft,Wt){var oe=this.loading,ye=Ft.uid;oe&&oe[ye]&&oe[ye].abort&&(oe[ye].abort(),delete oe[ye]),Wt()},ot.prototype.removeTile=function(Ft,Wt){var oe=this.loaded,ye=Ft.uid;oe&&oe[ye]&&delete oe[ye],Wt()};var ut=k.window.ImageBitmap,zt=function(){this.loaded={}};function P(Ft,Wt){if(Ft.length!==0){b(Ft[0],Wt);for(var oe=1;oe<Ft.length;oe++)b(Ft[oe],!Wt)}}function b(Ft,Wt){for(var oe=0,ye=0,Ze=0,fr=Ft.length,_r=fr-1;Ze<fr;_r=Ze++){var we=(Ft[Ze][0]-Ft[_r][0])*(Ft[_r][1]+Ft[Ze][1]),ir=oe+we;ye+=Math.abs(oe)>=Math.abs(we)?oe-ir+we:we-ir+oe,oe=ir}oe+ye>=0!=!!Wt&&Ft.reverse()}zt.prototype.loadTile=function(Ft,Wt){var oe=Ft.uid,ye=Ft.encoding,Ze=Ft.rawImageData,fr=ut&&Ze instanceof ut?this.getImageData(Ze):Ze,_r=new k.DEMData(oe,fr,ye);this.loaded=this.loaded||{},this.loaded[oe]=_r,Wt(null,_r)},zt.prototype.getImageData=function(Ft){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(Ft.width,Ft.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Ft.width,this.offscreenCanvas.height=Ft.height,this.offscreenCanvasContext.drawImage(Ft,0,0,Ft.width,Ft.height);var Wt=this.offscreenCanvasContext.getImageData(-1,-1,Ft.width+2,Ft.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new k.RGBAImage({width:Wt.width,height:Wt.height},Wt.data)},zt.prototype.removeTile=function(Ft){var Wt=this.loaded,oe=Ft.uid;Wt&&Wt[oe]&&delete Wt[oe]};var W=k.vectorTile.VectorTileFeature.prototype.toGeoJSON,le=function(Ft){this._feature=Ft,this.extent=k.EXTENT,this.type=Ft.type,this.properties=Ft.tags,"id"in Ft&&!isNaN(Ft.id)&&(this.id=parseInt(Ft.id,10))};le.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Ft=[],Wt=0,oe=this._feature.geometry;Wt<oe.length;Wt+=1){var ye=oe[Wt];Ft.push([new k.Point$1(ye[0],ye[1])])}return Ft}for(var Ze=[],fr=0,_r=this._feature.geometry;fr<_r.length;fr+=1){for(var we=[],ir=0,Hr=_r[fr];ir<Hr.length;ir+=1){var In=Hr[ir];we.push(new k.Point$1(In[0],In[1]))}Ze.push(we)}return Ze},le.prototype.toGeoJSON=function(Ft,Wt,oe){return W.call(this,Ft,Wt,oe)};var be=function(Ft){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=k.EXTENT,this.length=Ft.length,this._features=Ft};be.prototype.feature=function(Ft){return new le(this._features[Ft])};var Me=k.vectorTile.VectorTileFeature,At=rt;function rt(Ft,Wt){this.options=Wt||{},this.features=Ft,this.length=Ft.length}function Dt(Ft,Wt){this.id=typeof Ft.id=="number"?Ft.id:void 0,this.type=Ft.type,this.rawGeometry=Ft.type===1?[Ft.geometry]:Ft.geometry,this.properties=Ft.tags,this.extent=Wt||4096}rt.prototype.feature=function(Ft){return new Dt(this.features[Ft],this.options.extent)},Dt.prototype.loadGeometry=function(){var Ft=this.rawGeometry;this.geometry=[];for(var Wt=0;Wt<Ft.length;Wt++){for(var oe=Ft[Wt],ye=[],Ze=0;Ze<oe.length;Ze++)ye.push(new k.Point$1(oe[Ze][0],oe[Ze][1]));this.geometry.push(ye)}return this.geometry},Dt.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Ft=this.geometry,Wt=1/0,oe=-1/0,ye=1/0,Ze=-1/0,fr=0;fr<Ft.length;fr++)for(var _r=Ft[fr],we=0;we<_r.length;we++){var ir=_r[we];Wt=Math.min(Wt,ir.x),oe=Math.max(oe,ir.x),ye=Math.min(ye,ir.y),Ze=Math.max(Ze,ir.y)}return[Wt,ye,oe,Ze]},Dt.prototype.toGeoJSON=Me.prototype.toGeoJSON;var Ee=Ge,ge=At;function Ge(Ft){var Wt=new k.pbf;return function(oe,ye){for(var Ze in oe.layers)ye.writeMessage(3,Ue,oe.layers[Ze])}(Ft,Wt),Wt.finish()}function Ue(Ft,Wt){var oe;Wt.writeVarintField(15,Ft.version||1),Wt.writeStringField(1,Ft.name||""),Wt.writeVarintField(5,Ft.extent||4096);var ye={keys:[],values:[],keycache:{},valuecache:{}};for(oe=0;oe<Ft.length;oe++)ye.feature=Ft.feature(oe),Wt.writeMessage(2,xe,ye);var Ze=ye.keys;for(oe=0;oe<Ze.length;oe++)Wt.writeStringField(3,Ze[oe]);var fr=ye.values;for(oe=0;oe<fr.length;oe++)Wt.writeMessage(4,St,fr[oe])}function xe(Ft,Wt){var oe=Ft.feature;oe.id!==void 0&&Wt.writeVarintField(1,oe.id),Wt.writeMessage(2,Ke,Ft),Wt.writeVarintField(3,oe.type),Wt.writeMessage(4,ft,oe)}function Ke(Ft,Wt){var oe=Ft.feature,ye=Ft.keys,Ze=Ft.values,fr=Ft.keycache,_r=Ft.valuecache;for(var we in oe.properties){var ir=fr[we];ir===void 0&&(ye.push(we),fr[we]=ir=ye.length-1),Wt.writeVarint(ir);var Hr=oe.properties[we],In=typeof Hr;In!=="string"&&In!=="boolean"&&In!=="number"&&(Hr=JSON.stringify(Hr));var nn=In+":"+Hr,Yr=_r[nn];Yr===void 0&&(Ze.push(Hr),_r[nn]=Yr=Ze.length-1),Wt.writeVarint(Yr)}}function Lt(Ft,Wt){return(Wt<<3)+(7&Ft)}function Jt(Ft){return Ft<<1^Ft>>31}function ft(Ft,Wt){for(var oe=Ft.loadGeometry(),ye=Ft.type,Ze=0,fr=0,_r=oe.length,we=0;we<_r;we++){var ir=oe[we],Hr=1;ye===1&&(Hr=ir.length),Wt.writeVarint(Lt(1,Hr));for(var In=ye===3?ir.length-1:ir.length,nn=0;nn<In;nn++){nn===1&&ye!==1&&Wt.writeVarint(Lt(2,In-1));var Yr=ir[nn].x-Ze,On=ir[nn].y-fr;Wt.writeVarint(Jt(Yr)),Wt.writeVarint(Jt(On)),Ze+=Yr,fr+=On}ye===3&&Wt.writeVarint(Lt(7,1))}}function St(Ft,Wt){var oe=typeof Ft;oe==="string"?Wt.writeStringField(1,Ft):oe==="boolean"?Wt.writeBooleanField(7,Ft):oe==="number"&&(Ft%1!=0?Wt.writeDoubleField(3,Ft):Ft<0?Wt.writeSVarintField(6,Ft):Wt.writeVarintField(5,Ft))}function Y(Ft,Wt,oe,ye){mt(Ft,oe,ye),mt(Wt,2*oe,2*ye),mt(Wt,2*oe+1,2*ye+1)}function mt(Ft,Wt,oe){var ye=Ft[Wt];Ft[Wt]=Ft[oe],Ft[oe]=ye}function se(Ft,Wt,oe,ye){var Ze=Ft-oe,fr=Wt-ye;return Ze*Ze+fr*fr}Ee.fromVectorTileJs=Ge,Ee.fromGeojsonVt=function(Ft,Wt){Wt=Wt||{};var oe={};for(var ye in Ft)oe[ye]=new At(Ft[ye].features,Wt),oe[ye].name=ye,oe[ye].version=Wt.version,oe[ye].extent=Wt.extent;return Ge({layers:oe})},Ee.GeoJSONWrapper=ge;var ke=function(Ft){return Ft[0]},Le=function(Ft){return Ft[1]},Be=function(Ft,Wt,oe,ye,Ze){Wt===void 0&&(Wt=ke),oe===void 0&&(oe=Le),ye===void 0&&(ye=64),Ze===void 0&&(Ze=Float64Array),this.nodeSize=ye,this.points=Ft;for(var fr=Ft.length<65536?Uint16Array:Uint32Array,_r=this.ids=new fr(Ft.length),we=this.coords=new Ze(2*Ft.length),ir=0;ir<Ft.length;ir++)_r[ir]=ir,we[2*ir]=Wt(Ft[ir]),we[2*ir+1]=oe(Ft[ir]);(function Hr(In,nn,Yr,On,bi,Mi){if(!(bi-On<=Yr)){var tn=On+bi>>1;(function mi(Yn,fi,Ea,si,Ia,vo){for(;Ia>si;){if(Ia-si>600){var Oa=Ia-si+1,Ha=Ea-si+1,wa=Math.log(Oa),ya=.5*Math.exp(2*wa/3),Qa=.5*Math.sqrt(wa*ya*(Oa-ya)/Oa)*(Ha-Oa/2<0?-1:1);mi(Yn,fi,Ea,Math.max(si,Math.floor(Ea-Ha*ya/Oa+Qa)),Math.min(Ia,Math.floor(Ea+(Oa-Ha)*ya/Oa+Qa)),vo)}var Wo=fi[2*Ea+vo],yo=si,Va=Ia;for(Y(Yn,fi,si,Ea),fi[2*Ia+vo]>Wo&&Y(Yn,fi,si,Ia);yo<Va;){for(Y(Yn,fi,yo,Va),yo++,Va--;fi[2*yo+vo]<Wo;)yo++;for(;fi[2*Va+vo]>Wo;)Va--}fi[2*si+vo]===Wo?Y(Yn,fi,si,Va):Y(Yn,fi,++Va,Ia),Va<=Ea&&(si=Va+1),Ea<=Va&&(Ia=Va-1)}})(In,nn,tn,On,bi,Mi%2),Hr(In,nn,Yr,On,tn-1,Mi+1),Hr(In,nn,Yr,tn+1,bi,Mi+1)}})(_r,we,ye,0,_r.length-1,0)};Be.prototype.range=function(Ft,Wt,oe,ye){return function(Ze,fr,_r,we,ir,Hr,In){for(var nn,Yr,On=[0,Ze.length-1,0],bi=[];On.length;){var Mi=On.pop(),tn=On.pop(),mi=On.pop();if(tn-mi<=In)for(var Yn=mi;Yn<=tn;Yn++)Yr=fr[2*Yn+1],(nn=fr[2*Yn])>=_r&&nn<=ir&&Yr>=we&&Yr<=Hr&&bi.push(Ze[Yn]);else{var fi=Math.floor((mi+tn)/2);Yr=fr[2*fi+1],(nn=fr[2*fi])>=_r&&nn<=ir&&Yr>=we&&Yr<=Hr&&bi.push(Ze[fi]);var Ea=(Mi+1)%2;(Mi===0?_r<=nn:we<=Yr)&&(On.push(mi),On.push(fi-1),On.push(Ea)),(Mi===0?ir>=nn:Hr>=Yr)&&(On.push(fi+1),On.push(tn),On.push(Ea))}}return bi}(this.ids,this.coords,Ft,Wt,oe,ye,this.nodeSize)},Be.prototype.within=function(Ft,Wt,oe){return function(ye,Ze,fr,_r,we,ir){for(var Hr=[0,ye.length-1,0],In=[],nn=we*we;Hr.length;){var Yr=Hr.pop(),On=Hr.pop(),bi=Hr.pop();if(On-bi<=ir)for(var Mi=bi;Mi<=On;Mi++)se(Ze[2*Mi],Ze[2*Mi+1],fr,_r)<=nn&&In.push(ye[Mi]);else{var tn=Math.floor((bi+On)/2),mi=Ze[2*tn],Yn=Ze[2*tn+1];se(mi,Yn,fr,_r)<=nn&&In.push(ye[tn]);var fi=(Yr+1)%2;(Yr===0?fr-we<=mi:_r-we<=Yn)&&(Hr.push(bi),Hr.push(tn-1),Hr.push(fi)),(Yr===0?fr+we>=mi:_r+we>=Yn)&&(Hr.push(tn+1),Hr.push(On),Hr.push(fi))}}return In}(this.ids,this.coords,Ft,Wt,oe,this.nodeSize)};var Bt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Ft){return Ft}},ee=function(Ft){this.options=bt(Object.create(Bt),Ft),this.trees=new Array(this.options.maxZoom+1)};function me(Ft,Wt,oe,ye,Ze){return{x:Ft,y:Wt,zoom:1/0,id:oe,parentId:-1,numPoints:ye,properties:Ze}}function Yt(Ft,Wt){var oe=Ft.geometry.coordinates,ye=oe[1];return{x:ie(oe[0]),y:qt(ye),zoom:1/0,index:Wt,parentId:-1}}function qe(Ft){return{type:"Feature",id:Ft.id,properties:vr(Ft),geometry:{type:"Point",coordinates:[(ye=Ft.x,360*(ye-.5)),(Wt=Ft.y,oe=(180-360*Wt)*Math.PI/180,360*Math.atan(Math.exp(oe))/Math.PI-90)]}};var Wt,oe,ye}function vr(Ft){var Wt=Ft.numPoints,oe=Wt>=1e4?Math.round(Wt/1e3)+"k":Wt>=1e3?Math.round(Wt/100)/10+"k":Wt;return bt(bt({},Ft.properties),{cluster:!0,cluster_id:Ft.id,point_count:Wt,point_count_abbreviated:oe})}function ie(Ft){return Ft/360+.5}function qt(Ft){var Wt=Math.sin(Ft*Math.PI/180),oe=.5-.25*Math.log((1+Wt)/(1-Wt))/Math.PI;return oe<0?0:oe>1?1:oe}function bt(Ft,Wt){for(var oe in Wt)Ft[oe]=Wt[oe];return Ft}function Xt(Ft){return Ft.x}function $t(Ft){return Ft.y}function xt(Ft,Wt,oe,ye,Ze,fr){var _r=Ze-oe,we=fr-ye;if(_r!==0||we!==0){var ir=((Ft-oe)*_r+(Wt-ye)*we)/(_r*_r+we*we);ir>1?(oe=Ze,ye=fr):ir>0&&(oe+=_r*ir,ye+=we*ir)}return(_r=Ft-oe)*_r+(we=Wt-ye)*we}function wt(Ft,Wt,oe,ye){var Ze={id:Ft===void 0?null:Ft,type:Wt,geometry:oe,tags:ye,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(fr){var _r=fr.geometry,we=fr.type;if(we==="Point"||we==="MultiPoint"||we==="LineString")ue(fr,_r);else if(we==="Polygon"||we==="MultiLineString")for(var ir=0;ir<_r.length;ir++)ue(fr,_r[ir]);else if(we==="MultiPolygon")for(ir=0;ir<_r.length;ir++)for(var Hr=0;Hr<_r[ir].length;Hr++)ue(fr,_r[ir][Hr])}(Ze),Ze}function ue(Ft,Wt){for(var oe=0;oe<Wt.length;oe+=3)Ft.minX=Math.min(Ft.minX,Wt[oe]),Ft.minY=Math.min(Ft.minY,Wt[oe+1]),Ft.maxX=Math.max(Ft.maxX,Wt[oe]),Ft.maxY=Math.max(Ft.maxY,Wt[oe+1])}function Ie(Ft,Wt,oe,ye){if(Wt.geometry){var Ze=Wt.geometry.coordinates,fr=Wt.geometry.type,_r=Math.pow(oe.tolerance/((1<<oe.maxZoom)*oe.extent),2),we=[],ir=Wt.id;if(oe.promoteId?ir=Wt.properties[oe.promoteId]:oe.generateId&&(ir=ye||0),fr==="Point")Ne(Ze,we);else if(fr==="MultiPoint")for(var Hr=0;Hr<Ze.length;Hr++)Ne(Ze[Hr],we);else if(fr==="LineString")Zt(Ze,we,_r,!1);else if(fr==="MultiLineString"){if(oe.lineMetrics){for(Hr=0;Hr<Ze.length;Hr++)Zt(Ze[Hr],we=[],_r,!1),Ft.push(wt(ir,"LineString",we,Wt.properties));return}Ct(Ze,we,_r,!1)}else if(fr==="Polygon")Ct(Ze,we,_r,!0);else{if(fr!=="MultiPolygon"){if(fr==="GeometryCollection"){for(Hr=0;Hr<Wt.geometry.geometries.length;Hr++)Ie(Ft,{id:ir,geometry:Wt.geometry.geometries[Hr],properties:Wt.properties},oe,ye);return}throw new Error("Input data is not a valid GeoJSON object.")}for(Hr=0;Hr<Ze.length;Hr++){var In=[];Ct(Ze[Hr],In,_r,!0),we.push(In)}}Ft.push(wt(ir,fr,we,Wt.properties))}}function Ne(Ft,Wt){Wt.push(Tt(Ft[0])),Wt.push(Nt(Ft[1])),Wt.push(0)}function Zt(Ft,Wt,oe,ye){for(var Ze,fr,_r=0,we=0;we<Ft.length;we++){var ir=Tt(Ft[we][0]),Hr=Nt(Ft[we][1]);Wt.push(ir),Wt.push(Hr),Wt.push(0),we>0&&(_r+=ye?(Ze*Hr-ir*fr)/2:Math.sqrt(Math.pow(ir-Ze,2)+Math.pow(Hr-fr,2))),Ze=ir,fr=Hr}var In=Wt.length-3;Wt[2]=1,function nn(Yr,On,bi,Mi){for(var tn,mi=Mi,Yn=bi-On>>1,fi=bi-On,Ea=Yr[On],si=Yr[On+1],Ia=Yr[bi],vo=Yr[bi+1],Oa=On+3;Oa<bi;Oa+=3){var Ha=xt(Yr[Oa],Yr[Oa+1],Ea,si,Ia,vo);if(Ha>mi)tn=Oa,mi=Ha;else if(Ha===mi){var wa=Math.abs(Oa-Yn);wa<fi&&(tn=Oa,fi=wa)}}mi>Mi&&(tn-On>3&&nn(Yr,On,tn,Mi),Yr[tn+2]=mi,bi-tn>3&&nn(Yr,tn,bi,Mi))}(Wt,0,In,oe),Wt[In+2]=1,Wt.size=Math.abs(_r),Wt.start=0,Wt.end=Wt.size}function Ct(Ft,Wt,oe,ye){for(var Ze=0;Ze<Ft.length;Ze++){var fr=[];Zt(Ft[Ze],fr,oe,ye),Wt.push(fr)}}function Tt(Ft){return Ft/360+.5}function Nt(Ft){var Wt=Math.sin(Ft*Math.PI/180),oe=.5-.25*Math.log((1+Wt)/(1-Wt))/Math.PI;return oe<0?0:oe>1?1:oe}function tt(Ft,Wt,oe,ye,Ze,fr,_r,we){if(ye/=Wt,fr>=(oe/=Wt)&&_r<ye)return Ft;if(_r<oe||fr>=ye)return null;for(var ir=[],Hr=0;Hr<Ft.length;Hr++){var In=Ft[Hr],nn=In.geometry,Yr=In.type,On=Ze===0?In.minX:In.minY,bi=Ze===0?In.maxX:In.maxY;if(On>=oe&&bi<ye)ir.push(In);else if(!(bi<oe||On>=ye)){var Mi=[];if(Yr==="Point"||Yr==="MultiPoint")vt(nn,Mi,oe,ye,Ze);else if(Yr==="LineString")Ht(nn,Mi,oe,ye,Ze,!1,we.lineMetrics);else if(Yr==="MultiLineString")jt(nn,Mi,oe,ye,Ze,!1);else if(Yr==="Polygon")jt(nn,Mi,oe,ye,Ze,!0);else if(Yr==="MultiPolygon")for(var tn=0;tn<nn.length;tn++){var mi=[];jt(nn[tn],mi,oe,ye,Ze,!0),mi.length&&Mi.push(mi)}if(Mi.length){if(we.lineMetrics&&Yr==="LineString"){for(tn=0;tn<Mi.length;tn++)ir.push(wt(In.id,Yr,Mi[tn],In.tags));continue}Yr!=="LineString"&&Yr!=="MultiLineString"||(Mi.length===1?(Yr="LineString",Mi=Mi[0]):Yr="MultiLineString"),Yr!=="Point"&&Yr!=="MultiPoint"||(Yr=Mi.length===3?"Point":"MultiPoint"),ir.push(wt(In.id,Yr,Mi,In.tags))}}}return ir.length?ir:null}function vt(Ft,Wt,oe,ye,Ze){for(var fr=0;fr<Ft.length;fr+=3){var _r=Ft[fr+Ze];_r>=oe&&_r<=ye&&(Wt.push(Ft[fr]),Wt.push(Ft[fr+1]),Wt.push(Ft[fr+2]))}}function Ht(Ft,Wt,oe,ye,Ze,fr,_r){for(var we,ir,Hr=he(Ft),In=Ze===0?We:Qe,nn=Ft.start,Yr=0;Yr<Ft.length-3;Yr+=3){var On=Ft[Yr],bi=Ft[Yr+1],Mi=Ft[Yr+2],tn=Ft[Yr+3],mi=Ft[Yr+4],Yn=Ze===0?On:bi,fi=Ze===0?tn:mi,Ea=!1;_r&&(we=Math.sqrt(Math.pow(On-tn,2)+Math.pow(bi-mi,2))),Yn<oe?fi>oe&&(ir=In(Hr,On,bi,tn,mi,oe),_r&&(Hr.start=nn+we*ir)):Yn>ye?fi<ye&&(ir=In(Hr,On,bi,tn,mi,ye),_r&&(Hr.start=nn+we*ir)):Te(Hr,On,bi,Mi),fi<oe&&Yn>=oe&&(ir=In(Hr,On,bi,tn,mi,oe),Ea=!0),fi>ye&&Yn<=ye&&(ir=In(Hr,On,bi,tn,mi,ye),Ea=!0),!fr&&Ea&&(_r&&(Hr.end=nn+we*ir),Wt.push(Hr),Hr=he(Ft)),_r&&(nn+=we)}var si=Ft.length-3;On=Ft[si],bi=Ft[si+1],Mi=Ft[si+2],(Yn=Ze===0?On:bi)>=oe&&Yn<=ye&&Te(Hr,On,bi,Mi),si=Hr.length-3,fr&&si>=3&&(Hr[si]!==Hr[0]||Hr[si+1]!==Hr[1])&&Te(Hr,Hr[0],Hr[1],Hr[2]),Hr.length&&Wt.push(Hr)}function he(Ft){var Wt=[];return Wt.size=Ft.size,Wt.start=Ft.start,Wt.end=Ft.end,Wt}function jt(Ft,Wt,oe,ye,Ze,fr){for(var _r=0;_r<Ft.length;_r++)Ht(Ft[_r],Wt,oe,ye,Ze,fr,!1)}function Te(Ft,Wt,oe,ye){Ft.push(Wt),Ft.push(oe),Ft.push(ye)}function We(Ft,Wt,oe,ye,Ze,fr){var _r=(fr-Wt)/(ye-Wt);return Ft.push(fr),Ft.push(oe+(Ze-oe)*_r),Ft.push(1),_r}function Qe(Ft,Wt,oe,ye,Ze,fr){var _r=(fr-oe)/(Ze-oe);return Ft.push(Wt+(ye-Wt)*_r),Ft.push(fr),Ft.push(1),_r}function pr(Ft,Wt){for(var oe=[],ye=0;ye<Ft.length;ye++){var Ze,fr=Ft[ye],_r=fr.type;if(_r==="Point"||_r==="MultiPoint"||_r==="LineString")Ze=lr(fr.geometry,Wt);else if(_r==="MultiLineString"||_r==="Polygon"){Ze=[];for(var we=0;we<fr.geometry.length;we++)Ze.push(lr(fr.geometry[we],Wt))}else if(_r==="MultiPolygon")for(Ze=[],we=0;we<fr.geometry.length;we++){for(var ir=[],Hr=0;Hr<fr.geometry[we].length;Hr++)ir.push(lr(fr.geometry[we][Hr],Wt));Ze.push(ir)}oe.push(wt(fr.id,_r,Ze,fr.tags))}return oe}function lr(Ft,Wt){var oe=[];oe.size=Ft.size,Ft.start!==void 0&&(oe.start=Ft.start,oe.end=Ft.end);for(var ye=0;ye<Ft.length;ye+=3)oe.push(Ft[ye]+Wt,Ft[ye+1],Ft[ye+2]);return oe}function Vr(Ft,Wt){if(Ft.transformed)return Ft;var oe,ye,Ze,fr=1<<Ft.z,_r=Ft.x,we=Ft.y;for(oe=0;oe<Ft.features.length;oe++){var ir=Ft.features[oe],Hr=ir.geometry,In=ir.type;if(ir.geometry=[],In===1)for(ye=0;ye<Hr.length;ye+=2)ir.geometry.push(Pr(Hr[ye],Hr[ye+1],Wt,fr,_r,we));else for(ye=0;ye<Hr.length;ye++){var nn=[];for(Ze=0;Ze<Hr[ye].length;Ze+=2)nn.push(Pr(Hr[ye][Ze],Hr[ye][Ze+1],Wt,fr,_r,we));ir.geometry.push(nn)}}return Ft.transformed=!0,Ft}function Pr(Ft,Wt,oe,ye,Ze,fr){return[Math.round(oe*(Ft*ye-Ze)),Math.round(oe*(Wt*ye-fr))]}function Br(Ft,Wt,oe,ye,Ze){for(var fr=Wt===Ze.maxZoom?0:Ze.tolerance/((1<<Wt)*Ze.extent),_r={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:oe,y:ye,z:Wt,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},we=0;we<Ft.length;we++){_r.numFeatures++,Sn(_r,Ft[we],fr,Ze);var ir=Ft[we].minX,Hr=Ft[we].minY,In=Ft[we].maxX,nn=Ft[we].maxY;ir<_r.minX&&(_r.minX=ir),Hr<_r.minY&&(_r.minY=Hr),In>_r.maxX&&(_r.maxX=In),nn>_r.maxY&&(_r.maxY=nn)}return _r}function Sn(Ft,Wt,oe,ye){var Ze=Wt.geometry,fr=Wt.type,_r=[];if(fr==="Point"||fr==="MultiPoint")for(var we=0;we<Ze.length;we+=3)_r.push(Ze[we]),_r.push(Ze[we+1]),Ft.numPoints++,Ft.numSimplified++;else if(fr==="LineString")an(_r,Ze,Ft,oe,!1,!1);else if(fr==="MultiLineString"||fr==="Polygon")for(we=0;we<Ze.length;we++)an(_r,Ze[we],Ft,oe,fr==="Polygon",we===0);else if(fr==="MultiPolygon")for(var ir=0;ir<Ze.length;ir++){var Hr=Ze[ir];for(we=0;we<Hr.length;we++)an(_r,Hr[we],Ft,oe,!0,we===0)}if(_r.length){var In=Wt.tags||null;if(fr==="LineString"&&ye.lineMetrics){for(var nn in In={},Wt.tags)In[nn]=Wt.tags[nn];In.mapbox_clip_start=Ze.start/Ze.size,In.mapbox_clip_end=Ze.end/Ze.size}var Yr={geometry:_r,type:fr==="Polygon"||fr==="MultiPolygon"?3:fr==="LineString"||fr==="MultiLineString"?2:1,tags:In};Wt.id!==null&&(Yr.id=Wt.id),Ft.features.push(Yr)}}function an(Ft,Wt,oe,ye,Ze,fr){var _r=ye*ye;if(ye>0&&Wt.size<(Ze?_r:ye))oe.numPoints+=Wt.length/3;else{for(var we=[],ir=0;ir<Wt.length;ir+=3)(ye===0||Wt[ir+2]>_r)&&(oe.numSimplified++,we.push(Wt[ir]),we.push(Wt[ir+1])),oe.numPoints++;Ze&&function(Hr,In){for(var nn=0,Yr=0,On=Hr.length,bi=On-2;Yr<On;bi=Yr,Yr+=2)nn+=(Hr[Yr]-Hr[bi])*(Hr[Yr+1]+Hr[bi+1]);if(nn>0===In)for(Yr=0,On=Hr.length;Yr<On/2;Yr+=2){var Mi=Hr[Yr],tn=Hr[Yr+1];Hr[Yr]=Hr[On-2-Yr],Hr[Yr+1]=Hr[On-1-Yr],Hr[On-2-Yr]=Mi,Hr[On-1-Yr]=tn}}(we,fr),Ft.push(we)}}function zn(Ft,Wt){var oe=(Wt=this.options=function(Ze,fr){for(var _r in fr)Ze[_r]=fr[_r];return Ze}(Object.create(this.options),Wt)).debug;if(oe&&console.time("preprocess data"),Wt.maxZoom<0||Wt.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Wt.promoteId&&Wt.generateId)throw new Error("promoteId and generateId cannot be used together.");var ye=function(Ze,fr){var _r=[];if(Ze.type==="FeatureCollection")for(var we=0;we<Ze.features.length;we++)Ie(_r,Ze.features[we],fr,we);else Ie(_r,Ze.type==="Feature"?Ze:{geometry:Ze},fr);return _r}(Ft,Wt);this.tiles={},this.tileCoords=[],oe&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Wt.indexMaxZoom,Wt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(ye=function(Ze,fr){var _r=fr.buffer/fr.extent,we=Ze,ir=tt(Ze,1,-1-_r,_r,0,-1,2,fr),Hr=tt(Ze,1,1-_r,2+_r,0,-1,2,fr);return(ir||Hr)&&(we=tt(Ze,1,-_r,1+_r,0,-1,2,fr)||[],ir&&(we=pr(ir,1).concat(we)),Hr&&(we=we.concat(pr(Hr,-1)))),we}(ye,Wt)).length&&this.splitTile(ye,0,0,0),oe&&(ye.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function Zn(Ft,Wt,oe){return 32*((1<<Ft)*oe+Wt)+Ft}function Wn(Ft,Wt){var oe=Ft.tileID.canonical;if(!this._geoJSONIndex)return Wt(null,null);var ye=this._geoJSONIndex.getTile(oe.z,oe.x,oe.y);if(!ye)return Wt(null,null);var Ze=new be(ye.features),fr=Ee(Ze);fr.byteOffset===0&&fr.byteLength===fr.buffer.byteLength||(fr=new Uint8Array(fr)),Wt(null,{vectorTile:Ze,rawData:fr.buffer})}ee.prototype.load=function(Ft){var Wt=this.options,oe=Wt.log,ye=Wt.minZoom,Ze=Wt.maxZoom,fr=Wt.nodeSize;oe&&console.time("total time");var _r="prepare "+Ft.length+" points";oe&&console.time(_r),this.points=Ft;for(var we=[],ir=0;ir<Ft.length;ir++)Ft[ir].geometry&&we.push(Yt(Ft[ir],ir));this.trees[Ze+1]=new Be(we,Xt,$t,fr,Float32Array),oe&&console.timeEnd(_r);for(var Hr=Ze;Hr>=ye;Hr--){var In=+Date.now();we=this._cluster(we,Hr),this.trees[Hr]=new Be(we,Xt,$t,fr,Float32Array),oe&&console.log("z%d: %d clusters in %dms",Hr,we.length,+Date.now()-In)}return oe&&console.timeEnd("total time"),this},ee.prototype.getClusters=function(Ft,Wt){var oe=((Ft[0]+180)%360+360)%360-180,ye=Math.max(-90,Math.min(90,Ft[1])),Ze=Ft[2]===180?180:((Ft[2]+180)%360+360)%360-180,fr=Math.max(-90,Math.min(90,Ft[3]));if(Ft[2]-Ft[0]>=360)oe=-180,Ze=180;else if(oe>Ze){var _r=this.getClusters([oe,ye,180,fr],Wt),we=this.getClusters([-180,ye,Ze,fr],Wt);return _r.concat(we)}for(var ir=this.trees[this._limitZoom(Wt)],Hr=[],In=0,nn=ir.range(ie(oe),qt(fr),ie(Ze),qt(ye));In<nn.length;In+=1){var Yr=ir.points[nn[In]];Hr.push(Yr.numPoints?qe(Yr):this.points[Yr.index])}return Hr},ee.prototype.getChildren=function(Ft){var Wt=this._getOriginId(Ft),oe=this._getOriginZoom(Ft),ye="No cluster with the specified id.",Ze=this.trees[oe];if(!Ze)throw new Error(ye);var fr=Ze.points[Wt];if(!fr)throw new Error(ye);for(var _r=this.options.radius/(this.options.extent*Math.pow(2,oe-1)),we=[],ir=0,Hr=Ze.within(fr.x,fr.y,_r);ir<Hr.length;ir+=1){var In=Ze.points[Hr[ir]];In.parentId===Ft&&we.push(In.numPoints?qe(In):this.points[In.index])}if(we.length===0)throw new Error(ye);return we},ee.prototype.getLeaves=function(Ft,Wt,oe){var ye=[];return this._appendLeaves(ye,Ft,Wt=Wt||10,oe=oe||0,0),ye},ee.prototype.getTile=function(Ft,Wt,oe){var ye=this.trees[this._limitZoom(Ft)],Ze=Math.pow(2,Ft),fr=this.options,_r=fr.radius/fr.extent,we=(oe-_r)/Ze,ir=(oe+1+_r)/Ze,Hr={features:[]};return this._addTileFeatures(ye.range((Wt-_r)/Ze,we,(Wt+1+_r)/Ze,ir),ye.points,Wt,oe,Ze,Hr),Wt===0&&this._addTileFeatures(ye.range(1-_r/Ze,we,1,ir),ye.points,Ze,oe,Ze,Hr),Wt===Ze-1&&this._addTileFeatures(ye.range(0,we,_r/Ze,ir),ye.points,-1,oe,Ze,Hr),Hr.features.length?Hr:null},ee.prototype.getClusterExpansionZoom=function(Ft){for(var Wt=this._getOriginZoom(Ft)-1;Wt<=this.options.maxZoom;){var oe=this.getChildren(Ft);if(Wt++,oe.length!==1)break;Ft=oe[0].properties.cluster_id}return Wt},ee.prototype._appendLeaves=function(Ft,Wt,oe,ye,Ze){for(var fr=0,_r=this.getChildren(Wt);fr<_r.length;fr+=1){var we=_r[fr],ir=we.properties;if(ir&&ir.cluster?Ze+ir.point_count<=ye?Ze+=ir.point_count:Ze=this._appendLeaves(Ft,ir.cluster_id,oe,ye,Ze):Ze<ye?Ze++:Ft.push(we),Ft.length===oe)break}return Ze},ee.prototype._addTileFeatures=function(Ft,Wt,oe,ye,Ze,fr){for(var _r=0,we=Ft;_r<we.length;_r+=1){var ir=Wt[we[_r]],Hr=ir.numPoints,In={type:1,geometry:[[Math.round(this.options.extent*(ir.x*Ze-oe)),Math.round(this.options.extent*(ir.y*Ze-ye))]],tags:Hr?vr(ir):this.points[ir.index].properties},nn=void 0;Hr?nn=ir.id:this.options.generateId?nn=ir.index:this.points[ir.index].id&&(nn=this.points[ir.index].id),nn!==void 0&&(In.id=nn),fr.features.push(In)}},ee.prototype._limitZoom=function(Ft){return Math.max(this.options.minZoom,Math.min(+Ft,this.options.maxZoom+1))},ee.prototype._cluster=function(Ft,Wt){for(var oe=[],ye=this.options,Ze=ye.reduce,fr=ye.minPoints,_r=ye.radius/(ye.extent*Math.pow(2,Wt)),we=0;we<Ft.length;we++){var ir=Ft[we];if(!(ir.zoom<=Wt)){ir.zoom=Wt;for(var Hr=this.trees[Wt+1],In=Hr.within(ir.x,ir.y,_r),nn=ir.numPoints||1,Yr=nn,On=0,bi=In;On<bi.length;On+=1){var Mi=Hr.points[bi[On]];Mi.zoom>Wt&&(Yr+=Mi.numPoints||1)}if(Yr>=fr){for(var tn=ir.x*nn,mi=ir.y*nn,Yn=Ze&&nn>1?this._map(ir,!0):null,fi=(we<<5)+(Wt+1)+this.points.length,Ea=0,si=In;Ea<si.length;Ea+=1){var Ia=Hr.points[si[Ea]];if(!(Ia.zoom<=Wt)){Ia.zoom=Wt;var vo=Ia.numPoints||1;tn+=Ia.x*vo,mi+=Ia.y*vo,Ia.parentId=fi,Ze&&(Yn||(Yn=this._map(ir,!0)),Ze(Yn,this._map(Ia)))}}ir.parentId=fi,oe.push(me(tn/Yr,mi/Yr,fi,Yr,Yn))}else if(oe.push(ir),Yr>1)for(var Oa=0,Ha=In;Oa<Ha.length;Oa+=1){var wa=Hr.points[Ha[Oa]];wa.zoom<=Wt||(wa.zoom=Wt,oe.push(wa))}}}return oe},ee.prototype._getOriginId=function(Ft){return Ft-this.points.length>>5},ee.prototype._getOriginZoom=function(Ft){return(Ft-this.points.length)%32},ee.prototype._map=function(Ft,Wt){if(Ft.numPoints)return Wt?bt({},Ft.properties):Ft.properties;var oe=this.points[Ft.index].properties,ye=this.options.map(oe);return Wt&&ye===oe?bt({},ye):ye},zn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},zn.prototype.splitTile=function(Ft,Wt,oe,ye,Ze,fr,_r){for(var we=[Ft,Wt,oe,ye],ir=this.options,Hr=ir.debug;we.length;){ye=we.pop(),oe=we.pop(),Wt=we.pop(),Ft=we.pop();var In=1<<Wt,nn=Zn(Wt,oe,ye),Yr=this.tiles[nn];if(!Yr&&(Hr>1&&console.time("creation"),Yr=this.tiles[nn]=Br(Ft,Wt,oe,ye,ir),this.tileCoords.push({z:Wt,x:oe,y:ye}),Hr)){Hr>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Wt,oe,ye,Yr.numFeatures,Yr.numPoints,Yr.numSimplified),console.timeEnd("creation"));var On="z"+Wt;this.stats[On]=(this.stats[On]||0)+1,this.total++}if(Yr.source=Ft,Ze){if(Wt===ir.maxZoom||Wt===Ze)continue;var bi=1<<Ze-Wt;if(oe!==Math.floor(fr/bi)||ye!==Math.floor(_r/bi))continue}else if(Wt===ir.indexMaxZoom||Yr.numPoints<=ir.indexMaxPoints)continue;if(Yr.source=null,Ft.length!==0){Hr>1&&console.time("clipping");var Mi,tn,mi,Yn,fi,Ea,si=.5*ir.buffer/ir.extent,Ia=.5-si,vo=.5+si,Oa=1+si;Mi=tn=mi=Yn=null,fi=tt(Ft,In,oe-si,oe+vo,0,Yr.minX,Yr.maxX,ir),Ea=tt(Ft,In,oe+Ia,oe+Oa,0,Yr.minX,Yr.maxX,ir),Ft=null,fi&&(Mi=tt(fi,In,ye-si,ye+vo,1,Yr.minY,Yr.maxY,ir),tn=tt(fi,In,ye+Ia,ye+Oa,1,Yr.minY,Yr.maxY,ir),fi=null),Ea&&(mi=tt(Ea,In,ye-si,ye+vo,1,Yr.minY,Yr.maxY,ir),Yn=tt(Ea,In,ye+Ia,ye+Oa,1,Yr.minY,Yr.maxY,ir),Ea=null),Hr>1&&console.timeEnd("clipping"),we.push(Mi||[],Wt+1,2*oe,2*ye),we.push(tn||[],Wt+1,2*oe,2*ye+1),we.push(mi||[],Wt+1,2*oe+1,2*ye),we.push(Yn||[],Wt+1,2*oe+1,2*ye+1)}}},zn.prototype.getTile=function(Ft,Wt,oe){var ye=this.options,Ze=ye.extent,fr=ye.debug;if(Ft<0||Ft>24)return null;var _r=1<<Ft,we=Zn(Ft,Wt=(Wt%_r+_r)%_r,oe);if(this.tiles[we])return Vr(this.tiles[we],Ze);fr>1&&console.log("drilling down to z%d-%d-%d",Ft,Wt,oe);for(var ir,Hr=Ft,In=Wt,nn=oe;!ir&&Hr>0;)Hr--,In=Math.floor(In/2),nn=Math.floor(nn/2),ir=this.tiles[Zn(Hr,In,nn)];return ir&&ir.source?(fr>1&&console.log("found parent tile z%d-%d-%d",Hr,In,nn),fr>1&&console.time("drilling down"),this.splitTile(ir.source,Hr,In,nn,Ft,Wt,oe),fr>1&&console.timeEnd("drilling down"),this.tiles[we]?Vr(this.tiles[we],Ze):null):null};var Dn=function(Ft){function Wt(oe,ye,Ze,fr){Ft.call(this,oe,ye,Ze,Wn),fr&&(this.loadGeoJSON=fr)}return Ft&&(Wt.__proto__=Ft),(Wt.prototype=Object.create(Ft&&Ft.prototype)).constructor=Wt,Wt.prototype.loadData=function(oe,ye){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=ye,this._pendingLoadDataParams=oe,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Wt.prototype._loadData=function(){var oe=this;if(this._pendingCallback&&this._pendingLoadDataParams){var ye=this._pendingCallback,Ze=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var fr=!!(Ze&&Ze.request&&Ze.request.collectResourceTiming)&&new k.RequestPerformance(Ze.request);this.loadGeoJSON(Ze,function(_r,we){if(_r||!we)return ye(_r);if(typeof we!="object")return ye(new Error("Input data given to '"+Ze.source+"' is not a valid GeoJSON object."));(function Yr(On,bi){var Mi,tn=On&&On.type;if(tn==="FeatureCollection")for(Mi=0;Mi<On.features.length;Mi++)Yr(On.features[Mi],bi);else if(tn==="GeometryCollection")for(Mi=0;Mi<On.geometries.length;Mi++)Yr(On.geometries[Mi],bi);else if(tn==="Feature")Yr(On.geometry,bi);else if(tn==="Polygon")P(On.coordinates,bi);else if(tn==="MultiPolygon")for(Mi=0;Mi<On.coordinates.length;Mi++)P(On.coordinates[Mi],bi);return On})(we,!0);try{if(Ze.filter){var ir=k.createExpression(Ze.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(ir.result==="error")throw new Error(ir.value.map(function(Yr){return Yr.key+": "+Yr.message}).join(", "));var Hr=we.features.filter(function(Yr){return ir.value.evaluate({zoom:0},Yr)});we={type:"FeatureCollection",features:Hr}}oe._geoJSONIndex=Ze.cluster?new ee(function(Yr){var On=Yr.superclusterOptions,bi=Yr.clusterProperties;if(!bi||!On)return On;for(var Mi={},tn={},mi={accumulated:null,zoom:0},Yn={properties:null},fi=Object.keys(bi),Ea=0,si=fi;Ea<si.length;Ea+=1){var Ia=si[Ea],vo=bi[Ia],Oa=vo[0],Ha=k.createExpression(vo[1]),wa=k.createExpression(typeof Oa=="string"?[Oa,["accumulated"],["get",Ia]]:Oa);Mi[Ia]=Ha.value,tn[Ia]=wa.value}return On.map=function(ya){Yn.properties=ya;for(var Qa={},Wo=0,yo=fi;Wo<yo.length;Wo+=1){var Va=yo[Wo];Qa[Va]=Mi[Va].evaluate(mi,Yn)}return Qa},On.reduce=function(ya,Qa){Yn.properties=Qa;for(var Wo=0,yo=fi;Wo<yo.length;Wo+=1){var Va=yo[Wo];mi.accumulated=ya[Va],ya[Va]=tn[Va].evaluate(mi,Yn)}},On}(Ze)).load(we.features):function(Yr,On){return new zn(Yr,On)}(we,Ze.geojsonVtOptions)}catch(Yr){return ye(Yr)}oe.loaded={};var In={};if(fr){var nn=fr.finish();nn&&(In.resourceTiming={},In.resourceTiming[Ze.source]=JSON.parse(JSON.stringify(nn)))}ye(null,In)})}},Wt.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},Wt.prototype.reloadTile=function(oe,ye){var Ze=this.loaded;return Ze&&Ze[oe.uid]?Ft.prototype.reloadTile.call(this,oe,ye):this.loadTile(oe,ye)},Wt.prototype.loadGeoJSON=function(oe,ye){if(oe.request)k.getJSON(oe.request,ye);else{if(typeof oe.data!="string")return ye(new Error("Input data given to '"+oe.source+"' is not a valid GeoJSON object."));try{return ye(null,JSON.parse(oe.data))}catch(Ze){return ye(new Error("Input data given to '"+oe.source+"' is not a valid GeoJSON object."))}}},Wt.prototype.removeSource=function(oe,ye){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),ye()},Wt.prototype.getClusterExpansionZoom=function(oe,ye){try{ye(null,this._geoJSONIndex.getClusterExpansionZoom(oe.clusterId))}catch(Ze){ye(Ze)}},Wt.prototype.getClusterChildren=function(oe,ye){try{ye(null,this._geoJSONIndex.getChildren(oe.clusterId))}catch(Ze){ye(Ze)}},Wt.prototype.getClusterLeaves=function(oe,ye){try{ye(null,this._geoJSONIndex.getLeaves(oe.clusterId,oe.limit,oe.offset))}catch(Ze){ye(Ze)}},Wt}(ot),Xn=function(Ft){var Wt=this;this.self=Ft,this.actor=new k.Actor(Ft,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:ot,geojson:Dn},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(oe,ye){if(Wt.workerSourceTypes[oe])throw new Error('Worker source with name "'+oe+'" already registered.');Wt.workerSourceTypes[oe]=ye},this.self.registerRTLTextPlugin=function(oe){if(k.plugin.isParsed())throw new Error("RTL text plugin already registered.");k.plugin.applyArabicShaping=oe.applyArabicShaping,k.plugin.processBidirectionalText=oe.processBidirectionalText,k.plugin.processStyledBidirectionalText=oe.processStyledBidirectionalText}};return Xn.prototype.setReferrer=function(Ft,Wt){this.referrer=Wt},Xn.prototype.setImages=function(Ft,Wt,oe){for(var ye in this.availableImages[Ft]=Wt,this.workerSources[Ft]){var Ze=this.workerSources[Ft][ye];for(var fr in Ze)Ze[fr].availableImages=Wt}oe()},Xn.prototype.setLayers=function(Ft,Wt,oe){this.getLayerIndex(Ft).replace(Wt),oe()},Xn.prototype.updateLayers=function(Ft,Wt,oe){this.getLayerIndex(Ft).update(Wt.layers,Wt.removedIds),oe()},Xn.prototype.loadTile=function(Ft,Wt,oe){this.getWorkerSource(Ft,Wt.type,Wt.source).loadTile(Wt,oe)},Xn.prototype.loadDEMTile=function(Ft,Wt,oe){this.getDEMWorkerSource(Ft,Wt.source).loadTile(Wt,oe)},Xn.prototype.reloadTile=function(Ft,Wt,oe){this.getWorkerSource(Ft,Wt.type,Wt.source).reloadTile(Wt,oe)},Xn.prototype.abortTile=function(Ft,Wt,oe){this.getWorkerSource(Ft,Wt.type,Wt.source).abortTile(Wt,oe)},Xn.prototype.removeTile=function(Ft,Wt,oe){this.getWorkerSource(Ft,Wt.type,Wt.source).removeTile(Wt,oe)},Xn.prototype.removeDEMTile=function(Ft,Wt){this.getDEMWorkerSource(Ft,Wt.source).removeTile(Wt)},Xn.prototype.removeSource=function(Ft,Wt,oe){if(this.workerSources[Ft]&&this.workerSources[Ft][Wt.type]&&this.workerSources[Ft][Wt.type][Wt.source]){var ye=this.workerSources[Ft][Wt.type][Wt.source];delete this.workerSources[Ft][Wt.type][Wt.source],ye.removeSource!==void 0?ye.removeSource(Wt,oe):oe()}},Xn.prototype.loadWorkerSource=function(Ft,Wt,oe){try{this.self.importScripts(Wt.url),oe()}catch(ye){oe(ye.toString())}},Xn.prototype.syncRTLPluginState=function(Ft,Wt,oe){try{k.plugin.setState(Wt);var ye=k.plugin.getPluginURL();if(k.plugin.isLoaded()&&!k.plugin.isParsed()&&ye!=null){this.self.importScripts(ye);var Ze=k.plugin.isParsed();oe(Ze?void 0:new Error("RTL Text Plugin failed to import scripts from "+ye),Ze)}}catch(fr){oe(fr.toString())}},Xn.prototype.getAvailableImages=function(Ft){var Wt=this.availableImages[Ft];return Wt||(Wt=[]),Wt},Xn.prototype.getLayerIndex=function(Ft){var Wt=this.layerIndexes[Ft];return Wt||(Wt=this.layerIndexes[Ft]=new yt),Wt},Xn.prototype.getWorkerSource=function(Ft,Wt,oe){var ye=this;return this.workerSources[Ft]||(this.workerSources[Ft]={}),this.workerSources[Ft][Wt]||(this.workerSources[Ft][Wt]={}),this.workerSources[Ft][Wt][oe]||(this.workerSources[Ft][Wt][oe]=new this.workerSourceTypes[Wt]({send:function(Ze,fr,_r){ye.actor.send(Ze,fr,_r,Ft)}},this.getLayerIndex(Ft),this.getAvailableImages(Ft))),this.workerSources[Ft][Wt][oe]},Xn.prototype.getDEMWorkerSource=function(Ft,Wt){return this.demWorkerSources[Ft]||(this.demWorkerSources[Ft]={}),this.demWorkerSources[Ft][Wt]||(this.demWorkerSources[Ft][Wt]=new zt),this.demWorkerSources[Ft][Wt]},Xn.prototype.enforceCacheSizeLimit=function(Ft,Wt){k.enforceCacheSizeLimit(Wt)},typeof WorkerGlobalScope!="undefined"&&typeof self!="undefined"&&self instanceof WorkerGlobalScope&&(self.worker=new Xn(self)),Xn}),gt(["./shared"],function(k){"use strict";var Et=k.createCommonjsModule(function(x){function C(U){return!E(U)}function E(U){return typeof window=="undefined"||typeof document=="undefined"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var $,ht,Ut=new Blob([""],{type:"text/javascript"}),re=URL.createObjectURL(Ut);try{ht=new Worker(re),$=!0}catch(Fe){$=!1}return ht&&ht.terminate(),URL.revokeObjectURL(re),$}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var $=document.createElement("canvas");$.width=$.height=1;var ht=$.getContext("2d");if(!ht)return!1;var Ut=ht.getImageData(0,0,1,1);return Ut&&Ut.width===$.width}()?(M[H=U&&U.failIfMajorPerformanceCaveat]===void 0&&(M[H]=function($){var ht=function(re){var Fe=document.createElement("canvas"),Re=Object.create(C.webGLContextAttributes);return Re.failIfMajorPerformanceCaveat=re,Fe.probablySupportsContext?Fe.probablySupportsContext("webgl",Re)||Fe.probablySupportsContext("experimental-webgl",Re):Fe.supportsContext?Fe.supportsContext("webgl",Re)||Fe.supportsContext("experimental-webgl",Re):Fe.getContext("webgl",Re)||Fe.getContext("experimental-webgl",Re)}($);if(!ht)return!1;var Ut=ht.createShader(ht.VERTEX_SHADER);return!(!Ut||ht.isContextLost())&&(ht.shaderSource(Ut,"void main() {}"),ht.compileShader(Ut),ht.getShaderParameter(Ut,ht.COMPILE_STATUS)===!0)}(H)),M[H]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var H}x.exports?x.exports=C:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=C,window.mapboxgl.notSupportedReason=E);var M={};C.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),K={create:function(x,C,E){var M=k.window.document.createElement(x);return C!==void 0&&(M.className=C),E&&E.appendChild(M),M},createNS:function(x,C){return k.window.document.createElementNS(x,C)}},yt=k.window.document&&k.window.document.documentElement.style;function J(x){if(!yt)return x[0];for(var C=0;C<x.length;C++)if(x[C]in yt)return x[C];return x[0]}var pt,et=J(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);K.disableDrag=function(){yt&&et&&(pt=yt[et],yt[et]="none")},K.enableDrag=function(){yt&&et&&(yt[et]=pt)};var _e=J(["transform","WebkitTransform"]);K.setTransform=function(x,C){x.style[_e]=C};var ot=!1;try{var ut=Object.defineProperty({},"passive",{get:function(){ot=!0}});k.window.addEventListener("test",ut,ut),k.window.removeEventListener("test",ut,ut)}catch(x){ot=!1}K.addEventListener=function(x,C,E,M){M===void 0&&(M={}),x.addEventListener(C,E,"passive"in M&&ot?M:M.capture)},K.removeEventListener=function(x,C,E,M){M===void 0&&(M={}),x.removeEventListener(C,E,"passive"in M&&ot?M:M.capture)};var zt=function(x){x.preventDefault(),x.stopPropagation(),k.window.removeEventListener("click",zt,!0)};function P(x){var C=x.userImage;return!!(C&&C.render&&C.render())&&(x.data.replace(new Uint8Array(C.data.buffer)),!0)}K.suppressClick=function(){k.window.addEventListener("click",zt,!0),k.window.setTimeout(function(){k.window.removeEventListener("click",zt,!0)},0)},K.mousePos=function(x,C){var E=x.getBoundingClientRect();return new k.Point(C.clientX-E.left-x.clientLeft,C.clientY-E.top-x.clientTop)},K.touchPos=function(x,C){for(var E=x.getBoundingClientRect(),M=[],U=0;U<C.length;U++)M.push(new k.Point(C[U].clientX-E.left-x.clientLeft,C[U].clientY-E.top-x.clientTop));return M},K.mouseButton=function(x){return k.window.InstallTrigger!==void 0&&x.button===2&&x.ctrlKey&&k.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:x.button},K.remove=function(x){x.parentNode&&x.parentNode.removeChild(x)};var b=function(x){function C(){x.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new k.RGBAImage({width:1,height:1}),this.dirty=!0}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.isLoaded=function(){return this.loaded},C.prototype.setLoaded=function(E){if(this.loaded!==E&&(this.loaded=E,E)){for(var M=0,U=this.requestors;M<U.length;M+=1){var H=U[M];this._notify(H.ids,H.callback)}this.requestors=[]}},C.prototype.getImage=function(E){return this.images[E]},C.prototype.addImage=function(E,M){this._validate(E,M)&&(this.images[E]=M)},C.prototype._validate=function(E,M){var U=!0;return this._validateStretch(M.stretchX,M.data&&M.data.width)||(this.fire(new k.ErrorEvent(new Error('Image "'+E+'" has invalid "stretchX" value'))),U=!1),this._validateStretch(M.stretchY,M.data&&M.data.height)||(this.fire(new k.ErrorEvent(new Error('Image "'+E+'" has invalid "stretchY" value'))),U=!1),this._validateContent(M.content,M)||(this.fire(new k.ErrorEvent(new Error('Image "'+E+'" has invalid "content" value'))),U=!1),U},C.prototype._validateStretch=function(E,M){if(!E)return!0;for(var U=0,H=0,$=E;H<$.length;H+=1){var ht=$[H];if(ht[0]<U||ht[1]<ht[0]||M<ht[1])return!1;U=ht[1]}return!0},C.prototype._validateContent=function(E,M){return!(E&&(E.length!==4||E[0]<0||M.data.width<E[0]||E[1]<0||M.data.height<E[1]||E[2]<0||M.data.width<E[2]||E[3]<0||M.data.height<E[3]||E[2]<E[0]||E[3]<E[1]))},C.prototype.updateImage=function(E,M){M.version=this.images[E].version+1,this.images[E]=M,this.updatedImages[E]=!0},C.prototype.removeImage=function(E){var M=this.images[E];delete this.images[E],delete this.patterns[E],M.userImage&&M.userImage.onRemove&&M.userImage.onRemove()},C.prototype.listImages=function(){return Object.keys(this.images)},C.prototype.getImages=function(E,M){var U=!0;if(!this.isLoaded())for(var H=0,$=E;H<$.length;H+=1)this.images[$[H]]||(U=!1);this.isLoaded()||U?this._notify(E,M):this.requestors.push({ids:E,callback:M})},C.prototype._notify=function(E,M){for(var U={},H=0,$=E;H<$.length;H+=1){var ht=$[H];this.images[ht]||this.fire(new k.Event("styleimagemissing",{id:ht}));var Ut=this.images[ht];Ut?U[ht]={data:Ut.data.clone(),pixelRatio:Ut.pixelRatio,sdf:Ut.sdf,version:Ut.version,stretchX:Ut.stretchX,stretchY:Ut.stretchY,content:Ut.content,hasRenderCallback:Boolean(Ut.userImage&&Ut.userImage.render)}:k.warnOnce('Image "'+ht+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}M(null,U)},C.prototype.getPixelSize=function(){var E=this.atlasImage;return{width:E.width,height:E.height}},C.prototype.getPattern=function(E){var M=this.patterns[E],U=this.getImage(E);if(!U)return null;if(M&&M.position.version===U.version)return M.position;if(M)M.position.version=U.version;else{var H={w:U.data.width+2,h:U.data.height+2,x:0,y:0},$=new k.ImagePosition(H,U);this.patterns[E]={bin:H,position:$}}return this._updatePatternAtlas(),this.patterns[E].position},C.prototype.bind=function(E){var M=E.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new k.Texture(E,this.atlasImage,M.RGBA),this.atlasTexture.bind(M.LINEAR,M.CLAMP_TO_EDGE)},C.prototype._updatePatternAtlas=function(){var E=[];for(var M in this.patterns)E.push(this.patterns[M].bin);var U=k.potpack(E),H=U.w,$=U.h,ht=this.atlasImage;for(var Ut in ht.resize({width:H||1,height:$||1}),this.patterns){var re=this.patterns[Ut].bin,Fe=re.x+1,Re=re.y+1,De=this.images[Ut].data,cr=De.width,ur=De.height;k.RGBAImage.copy(De,ht,{x:0,y:0},{x:Fe,y:Re},{width:cr,height:ur}),k.RGBAImage.copy(De,ht,{x:0,y:ur-1},{x:Fe,y:Re-1},{width:cr,height:1}),k.RGBAImage.copy(De,ht,{x:0,y:0},{x:Fe,y:Re+ur},{width:cr,height:1}),k.RGBAImage.copy(De,ht,{x:cr-1,y:0},{x:Fe-1,y:Re},{width:1,height:ur}),k.RGBAImage.copy(De,ht,{x:0,y:0},{x:Fe+cr,y:Re},{width:1,height:ur})}this.dirty=!0},C.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},C.prototype.dispatchRenderCallbacks=function(E){for(var M=0,U=E;M<U.length;M+=1){var H=U[M];if(!this.callbackDispatchedThisFrame[H]){this.callbackDispatchedThisFrame[H]=!0;var $=this.images[H];P($)&&this.updateImage(H,$)}}},C}(k.Evented),W=Me,le=Me,be=1e20;function Me(x,C,E,M,U,H){this.fontSize=x||24,this.buffer=C===void 0?3:C,this.cutoff=M||.25,this.fontFamily=U||"sans-serif",this.fontWeight=H||"normal",this.radius=E||8;var $=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=$,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array($*$),this.gridInner=new Float64Array($*$),this.f=new Float64Array($),this.d=new Float64Array($),this.z=new Float64Array($+1),this.v=new Int16Array($),this.middle=Math.round($/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function At(x,C,E,M,U,H,$){for(var ht=0;ht<C;ht++){for(var Ut=0;Ut<E;Ut++)M[Ut]=x[Ut*C+ht];for(rt(M,U,H,$,E),Ut=0;Ut<E;Ut++)x[Ut*C+ht]=U[Ut]}for(Ut=0;Ut<E;Ut++){for(ht=0;ht<C;ht++)M[ht]=x[Ut*C+ht];for(rt(M,U,H,$,C),ht=0;ht<C;ht++)x[Ut*C+ht]=Math.sqrt(U[ht])}}function rt(x,C,E,M,U){E[0]=0,M[0]=-be,M[1]=+be;for(var H=1,$=0;H<U;H++){for(var ht=(x[H]+H*H-(x[E[$]]+E[$]*E[$]))/(2*H-2*E[$]);ht<=M[$];)$--,ht=(x[H]+H*H-(x[E[$]]+E[$]*E[$]))/(2*H-2*E[$]);E[++$]=H,M[$]=ht,M[$+1]=+be}for(H=0,$=0;H<U;H++){for(;M[$+1]<H;)$++;C[H]=(H-E[$])*(H-E[$])+x[E[$]]}}Me.prototype.draw=function(x){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(x,this.buffer,this.middle);for(var C=this.ctx.getImageData(0,0,this.size,this.size),E=new Uint8ClampedArray(this.size*this.size),M=0;M<this.size*this.size;M++){var U=C.data[4*M+3]/255;this.gridOuter[M]=U===1?0:U===0?be:Math.pow(Math.max(0,.5-U),2),this.gridInner[M]=U===1?be:U===0?0:Math.pow(Math.max(0,U-.5),2)}for(At(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),At(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),M=0;M<this.size*this.size;M++)E[M]=Math.max(0,Math.min(255,Math.round(255-255*((this.gridOuter[M]-this.gridInner[M])/this.radius+this.cutoff))));return E},W.default=le;var Dt=function(x,C){this.requestManager=x,this.localIdeographFontFamily=C,this.entries={}};Dt.prototype.setURL=function(x){this.url=x},Dt.prototype.getGlyphs=function(x,C){var E=this,M=[];for(var U in x)for(var H=0,$=x[U];H<$.length;H+=1)M.push({stack:U,id:$[H]});k.asyncAll(M,function(ht,Ut){var re=ht.stack,Fe=ht.id,Re=E.entries[re];Re||(Re=E.entries[re]={glyphs:{},requests:{},ranges:{}});var De=Re.glyphs[Fe];if(De===void 0){if(De=E._tinySDF(Re,re,Fe))return Re.glyphs[Fe]=De,void Ut(null,{stack:re,id:Fe,glyph:De});var cr=Math.floor(Fe/256);if(256*cr>65535)Ut(new Error("glyphs > 65535 not supported"));else if(Re.ranges[cr])Ut(null,{stack:re,id:Fe,glyph:De});else{var ur=Re.requests[cr];ur||(ur=Re.requests[cr]=[],Dt.loadGlyphRange(re,cr,E.url,E.requestManager,function(Er,nr){if(nr){for(var wr in nr)E._doesCharSupportLocalGlyph(+wr)||(Re.glyphs[+wr]=nr[+wr]);Re.ranges[cr]=!0}for(var Ir=0,$r=ur;Ir<$r.length;Ir+=1)(0,$r[Ir])(Er,nr);delete Re.requests[cr]})),ur.push(function(Er,nr){Er?Ut(Er):nr&&Ut(null,{stack:re,id:Fe,glyph:nr[Fe]||null})})}}else Ut(null,{stack:re,id:Fe,glyph:De})},function(ht,Ut){if(ht)C(ht);else if(Ut){for(var re={},Fe=0,Re=Ut;Fe<Re.length;Fe+=1){var De=Re[Fe],cr=De.stack,ur=De.id,Er=De.glyph;(re[cr]||(re[cr]={}))[ur]=Er&&{id:Er.id,bitmap:Er.bitmap.clone(),metrics:Er.metrics}}C(null,re)}})},Dt.prototype._doesCharSupportLocalGlyph=function(x){return!!this.localIdeographFontFamily&&(k.isChar["CJK Unified Ideographs"](x)||k.isChar["Hangul Syllables"](x)||k.isChar.Hiragana(x)||k.isChar.Katakana(x))},Dt.prototype._tinySDF=function(x,C,E){var M=this.localIdeographFontFamily;if(M&&this._doesCharSupportLocalGlyph(E)){var U=x.tinySDF;if(!U){var H="400";/bold/i.test(C)?H="900":/medium/i.test(C)?H="500":/light/i.test(C)&&(H="200"),U=x.tinySDF=new Dt.TinySDF(24,3,8,.25,M,H)}return{id:E,bitmap:new k.AlphaImage({width:30,height:30},U.draw(String.fromCharCode(E))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},Dt.loadGlyphRange=function(x,C,E,M,U){var H=256*C,$=H+255,ht=M.transformRequest(M.normalizeGlyphsURL(E).replace("{fontstack}",x).replace("{range}",H+"-"+$),k.ResourceType.Glyphs);k.getArrayBuffer(ht,function(Ut,re){if(Ut)U(Ut);else if(re){for(var Fe={},Re=0,De=k.parseGlyphPBF(re);Re<De.length;Re+=1){var cr=De[Re];Fe[cr.id]=cr}U(null,Fe)}})},Dt.TinySDF=W;var Ee=function(){this.specification=k.styleSpec.light.position};Ee.prototype.possiblyEvaluate=function(x,C){return k.sphericalToCartesian(x.expression.evaluate(C))},Ee.prototype.interpolate=function(x,C,E){return{x:k.number(x.x,C.x,E),y:k.number(x.y,C.y,E),z:k.number(x.z,C.z,E)}};var ge=new k.Properties({anchor:new k.DataConstantProperty(k.styleSpec.light.anchor),position:new Ee,color:new k.DataConstantProperty(k.styleSpec.light.color),intensity:new k.DataConstantProperty(k.styleSpec.light.intensity)}),Ge=function(x){function C(E){x.call(this),this._transitionable=new k.Transitionable(ge),this.setLight(E),this._transitioning=this._transitionable.untransitioned()}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getLight=function(){return this._transitionable.serialize()},C.prototype.setLight=function(E,M){if(M===void 0&&(M={}),!this._validate(k.validateLight,E,M))for(var U in E){var H=E[U];k.endsWith(U,"-transition")?this._transitionable.setTransition(U.slice(0,-11),H):this._transitionable.setValue(U,H)}},C.prototype.updateTransitions=function(E){this._transitioning=this._transitionable.transitioned(E,this._transitioning)},C.prototype.hasTransition=function(){return this._transitioning.hasTransition()},C.prototype.recalculate=function(E){this.properties=this._transitioning.possiblyEvaluate(E)},C.prototype._validate=function(E,M,U){return(!U||U.validate!==!1)&&k.emitValidationErrors(this,E.call(k.validateStyle,k.extend({value:M,style:{glyphs:!0,sprite:!0},styleSpec:k.styleSpec})))},C}(k.Evented),Ue=function(x,C){this.width=x,this.height=C,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};Ue.prototype.getDash=function(x,C){var E=x.join(",")+String(C);return this.dashEntry[E]||(this.dashEntry[E]=this.addDash(x,C)),this.dashEntry[E]},Ue.prototype.getDashRanges=function(x,C,E){var M=[],U=x.length%2==1?-x[x.length-1]*E:0,H=x[0]*E,$=!0;M.push({left:U,right:H,isDash:$,zeroLength:x[0]===0});for(var ht=x[0],Ut=1;Ut<x.length;Ut++){var re=x[Ut];M.push({left:U=ht*E,right:H=(ht+=re)*E,isDash:$=!$,zeroLength:re===0})}return M},Ue.prototype.addRoundDash=function(x,C,E){for(var M=C/2,U=-E;U<=E;U++)for(var H=this.width*(this.nextRow+E+U),$=0,ht=x[$],Ut=0;Ut<this.width;Ut++){Ut/ht.right>1&&(ht=x[++$]);var re=Math.abs(Ut-ht.left),Fe=Math.abs(Ut-ht.right),Re=Math.min(re,Fe),De=void 0,cr=U/E*(M+1);if(ht.isDash){var ur=M-Math.abs(cr);De=Math.sqrt(Re*Re+ur*ur)}else De=M-Math.sqrt(Re*Re+cr*cr);this.data[H+Ut]=Math.max(0,Math.min(255,De+128))}},Ue.prototype.addRegularDash=function(x){for(var C=x.length-1;C>=0;--C){var E=x[C],M=x[C+1];E.zeroLength?x.splice(C,1):M&&M.isDash===E.isDash&&(M.left=E.left,x.splice(C,1))}var U=x[0],H=x[x.length-1];U.isDash===H.isDash&&(U.left=H.left-this.width,H.right=U.right+this.width);for(var $=this.width*this.nextRow,ht=0,Ut=x[ht],re=0;re<this.width;re++){re/Ut.right>1&&(Ut=x[++ht]);var Fe=Math.abs(re-Ut.left),Re=Math.abs(re-Ut.right),De=Math.min(Fe,Re);this.data[$+re]=Math.max(0,Math.min(255,(Ut.isDash?De:-De)+128))}},Ue.prototype.addDash=function(x,C){var E=C?7:0,M=2*E+1;if(this.nextRow+M>this.height)return k.warnOnce("LineAtlas out of space"),null;for(var U=0,H=0;H<x.length;H++)U+=x[H];if(U!==0){var $=this.width/U,ht=this.getDashRanges(x,this.width,$);C?this.addRoundDash(ht,$,E):this.addRegularDash(ht)}var Ut={y:(this.nextRow+E+.5)/this.height,height:2*E/this.height,width:U};return this.nextRow+=M,this.dirty=!0,Ut},Ue.prototype.bind=function(x){var C=x.gl;this.texture?(C.bindTexture(C.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,C.texSubImage2D(C.TEXTURE_2D,0,0,0,this.width,this.height,C.ALPHA,C.UNSIGNED_BYTE,this.data))):(this.texture=C.createTexture(),C.bindTexture(C.TEXTURE_2D,this.texture),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,C.REPEAT),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,C.REPEAT),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.LINEAR),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.LINEAR),C.texImage2D(C.TEXTURE_2D,0,C.ALPHA,this.width,this.height,0,C.ALPHA,C.UNSIGNED_BYTE,this.data))};var xe=function x(C,E){this.workerPool=C,this.actors=[],this.currentActor=0,this.id=k.uniqueId();for(var M=this.workerPool.acquire(this.id),U=0;U<M.length;U++){var H=new x.Actor(M[U],E,this.id);H.name="Worker "+U,this.actors.push(H)}};function Ke(x,C,E){var M=function(U,H){if(U)return E(U);if(H){var $=k.pick(k.extend(H,x),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);H.vector_layers&&($.vectorLayers=H.vector_layers,$.vectorLayerIds=$.vectorLayers.map(function(ht){return ht.id})),$.tiles=C.canonicalizeTileset($,x.url),E(null,$)}};return x.url?k.getJSON(C.transformRequest(C.normalizeSourceURL(x.url),k.ResourceType.Source),M):k.browser.frame(function(){return M(null,x)})}xe.prototype.broadcast=function(x,C,E){k.asyncAll(this.actors,function(M,U){M.send(x,C,U)},E=E||function(){})},xe.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},xe.prototype.remove=function(){this.actors.forEach(function(x){x.remove()}),this.actors=[],this.workerPool.release(this.id)},xe.Actor=k.Actor;var Lt=function(x,C,E){this.bounds=k.LngLatBounds.convert(this.validateBounds(x)),this.minzoom=C||0,this.maxzoom=E||24};Lt.prototype.validateBounds=function(x){return Array.isArray(x)&&x.length===4?[Math.max(-180,x[0]),Math.max(-90,x[1]),Math.min(180,x[2]),Math.min(90,x[3])]:[-180,-90,180,90]},Lt.prototype.contains=function(x){var C=Math.pow(2,x.z),E=Math.floor(k.mercatorXfromLng(this.bounds.getWest())*C),M=Math.floor(k.mercatorYfromLat(this.bounds.getNorth())*C),U=Math.ceil(k.mercatorXfromLng(this.bounds.getEast())*C),H=Math.ceil(k.mercatorYfromLat(this.bounds.getSouth())*C);return x.x>=E&&x.x<U&&x.y>=M&&x.y<H};var Jt=function(x){function C(E,M,U,H){if(x.call(this),this.id=E,this.dispatcher=U,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,k.extend(this,k.pick(M,["url","scheme","tileSize","promoteId"])),this._options=k.extend({type:"vector"},M),this._collectResourceTiming=M.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(H)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.load=function(){var E=this;this._loaded=!1,this.fire(new k.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=Ke(this._options,this.map._requestManager,function(M,U){E._tileJSONRequest=null,E._loaded=!0,M?E.fire(new k.ErrorEvent(M)):U&&(k.extend(E,U),U.bounds&&(E.tileBounds=new Lt(U.bounds,E.minzoom,E.maxzoom)),k.postTurnstileEvent(U.tiles,E.map._requestManager._customAccessToken),k.postMapLoadEvent(U.tiles,E.map._getMapId(),E.map._requestManager._skuToken,E.map._requestManager._customAccessToken),E.fire(new k.Event("data",{dataType:"source",sourceDataType:"metadata"})),E.fire(new k.Event("data",{dataType:"source",sourceDataType:"content"})))})},C.prototype.loaded=function(){return this._loaded},C.prototype.hasTile=function(E){return!this.tileBounds||this.tileBounds.contains(E.canonical)},C.prototype.onAdd=function(E){this.map=E,this.load()},C.prototype.setSourceProperty=function(E){this._tileJSONRequest&&this._tileJSONRequest.cancel(),E(),this.map.style.sourceCaches[this.id].clearTiles(),this.load()},C.prototype.setTiles=function(E){var M=this;return this.setSourceProperty(function(){M._options.tiles=E}),this},C.prototype.setUrl=function(E){var M=this;return this.setSourceProperty(function(){M.url=E,M._options.url=E}),this},C.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},C.prototype.serialize=function(){return k.extend({},this._options)},C.prototype.loadTile=function(E,M){var U=this.map._requestManager.normalizeTileURL(E.tileID.canonical.url(this.tiles,this.scheme)),H={request:this.map._requestManager.transformRequest(U,k.ResourceType.Tile),uid:E.uid,tileID:E.tileID,zoom:E.tileID.overscaledZ,tileSize:this.tileSize*E.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:k.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function $(ht,Ut){return delete E.request,E.aborted?M(null):ht&&ht.status!==404?M(ht):(Ut&&Ut.resourceTiming&&(E.resourceTiming=Ut.resourceTiming),this.map._refreshExpiredTiles&&Ut&&E.setExpiryData(Ut),E.loadVectorData(Ut,this.map.painter),k.cacheEntryPossiblyAdded(this.dispatcher),M(null),void(E.reloadCallback&&(this.loadTile(E,E.reloadCallback),E.reloadCallback=null)))}H.request.collectResourceTiming=this._collectResourceTiming,E.actor&&E.state!=="expired"?E.state==="loading"?E.reloadCallback=M:E.request=E.actor.send("reloadTile",H,$.bind(this)):(E.actor=this.dispatcher.getActor(),E.request=E.actor.send("loadTile",H,$.bind(this)))},C.prototype.abortTile=function(E){E.request&&(E.request.cancel(),delete E.request),E.actor&&E.actor.send("abortTile",{uid:E.uid,type:this.type,source:this.id},void 0)},C.prototype.unloadTile=function(E){E.unloadVectorData(),E.actor&&E.actor.send("removeTile",{uid:E.uid,type:this.type,source:this.id},void 0)},C.prototype.hasTransition=function(){return!1},C}(k.Evented),ft=function(x){function C(E,M,U,H){x.call(this),this.id=E,this.dispatcher=U,this.setEventedParent(H),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=k.extend({type:"raster"},M),k.extend(this,k.pick(M,["url","scheme","tileSize"]))}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.load=function(){var E=this;this._loaded=!1,this.fire(new k.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=Ke(this._options,this.map._requestManager,function(M,U){E._tileJSONRequest=null,E._loaded=!0,M?E.fire(new k.ErrorEvent(M)):U&&(k.extend(E,U),U.bounds&&(E.tileBounds=new Lt(U.bounds,E.minzoom,E.maxzoom)),k.postTurnstileEvent(U.tiles),k.postMapLoadEvent(U.tiles,E.map._getMapId(),E.map._requestManager._skuToken),E.fire(new k.Event("data",{dataType:"source",sourceDataType:"metadata"})),E.fire(new k.Event("data",{dataType:"source",sourceDataType:"content"})))})},C.prototype.loaded=function(){return this._loaded},C.prototype.onAdd=function(E){this.map=E,this.load()},C.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},C.prototype.serialize=function(){return k.extend({},this._options)},C.prototype.hasTile=function(E){return!this.tileBounds||this.tileBounds.contains(E.canonical)},C.prototype.loadTile=function(E,M){var U=this,H=this.map._requestManager.normalizeTileURL(E.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);E.request=k.getImage(this.map._requestManager.transformRequest(H,k.ResourceType.Tile),function($,ht){if(delete E.request,E.aborted)E.state="unloaded",M(null);else if($)E.state="errored",M($);else if(ht){U.map._refreshExpiredTiles&&E.setExpiryData(ht),delete ht.cacheControl,delete ht.expires;var Ut=U.map.painter.context,re=Ut.gl;E.texture=U.map.painter.getTileTexture(ht.width),E.texture?E.texture.update(ht,{useMipmap:!0}):(E.texture=new k.Texture(Ut,ht,re.RGBA,{useMipmap:!0}),E.texture.bind(re.LINEAR,re.CLAMP_TO_EDGE,re.LINEAR_MIPMAP_NEAREST),Ut.extTextureFilterAnisotropic&&re.texParameterf(re.TEXTURE_2D,Ut.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Ut.extTextureFilterAnisotropicMax)),E.state="loaded",k.cacheEntryPossiblyAdded(U.dispatcher),M(null)}})},C.prototype.abortTile=function(E,M){E.request&&(E.request.cancel(),delete E.request),M()},C.prototype.unloadTile=function(E,M){E.texture&&this.map.painter.saveTileTexture(E.texture),M()},C.prototype.hasTransition=function(){return!1},C}(k.Evented),St=function(x){function C(E,M,U,H){x.call(this,E,M,U,H),this.type="raster-dem",this.maxzoom=22,this._options=k.extend({type:"raster-dem"},M),this.encoding=M.encoding||"mapbox"}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},C.prototype.loadTile=function(E,M){var U=this.map._requestManager.normalizeTileURL(E.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);function H($,ht){$&&(E.state="errored",M($)),ht&&(E.dem=ht,E.needsHillshadePrepare=!0,E.state="loaded",M(null))}E.request=k.getImage(this.map._requestManager.transformRequest(U,k.ResourceType.Tile),function($,ht){if(delete E.request,E.aborted)E.state="unloaded",M(null);else if($)E.state="errored",M($);else if(ht){this.map._refreshExpiredTiles&&E.setExpiryData(ht),delete ht.cacheControl,delete ht.expires;var Ut=k.window.ImageBitmap&&ht instanceof k.window.ImageBitmap&&k.offscreenCanvasSupported()?ht:k.browser.getImageData(ht,1),re={uid:E.uid,coord:E.tileID,source:this.id,rawImageData:Ut,encoding:this.encoding};E.actor&&E.state!=="expired"||(E.actor=this.dispatcher.getActor(),E.actor.send("loadDEMTile",re,H.bind(this)))}}.bind(this)),E.neighboringTiles=this._getNeighboringTiles(E.tileID)},C.prototype._getNeighboringTiles=function(E){var M=E.canonical,U=Math.pow(2,M.z),H=(M.x-1+U)%U,$=M.x===0?E.wrap-1:E.wrap,ht=(M.x+1+U)%U,Ut=M.x+1===U?E.wrap+1:E.wrap,re={};return re[new k.OverscaledTileID(E.overscaledZ,$,M.z,H,M.y).key]={backfilled:!1},re[new k.OverscaledTileID(E.overscaledZ,Ut,M.z,ht,M.y).key]={backfilled:!1},M.y>0&&(re[new k.OverscaledTileID(E.overscaledZ,$,M.z,H,M.y-1).key]={backfilled:!1},re[new k.OverscaledTileID(E.overscaledZ,E.wrap,M.z,M.x,M.y-1).key]={backfilled:!1},re[new k.OverscaledTileID(E.overscaledZ,Ut,M.z,ht,M.y-1).key]={backfilled:!1}),M.y+1<U&&(re[new k.OverscaledTileID(E.overscaledZ,$,M.z,H,M.y+1).key]={backfilled:!1},re[new k.OverscaledTileID(E.overscaledZ,E.wrap,M.z,M.x,M.y+1).key]={backfilled:!1},re[new k.OverscaledTileID(E.overscaledZ,Ut,M.z,ht,M.y+1).key]={backfilled:!1}),re},C.prototype.unloadTile=function(E){E.demTexture&&this.map.painter.saveTileTexture(E.demTexture),E.fbo&&(E.fbo.destroy(),delete E.fbo),E.dem&&delete E.dem,delete E.neighboringTiles,E.state="unloaded",E.actor&&E.actor.send("removeDEMTile",{uid:E.uid,source:this.id})},C}(ft),Y=function(x){function C(E,M,U,H){x.call(this),this.id=E,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=U.getActor(),this.setEventedParent(H),this._data=M.data,this._options=k.extend({},M),this._collectResourceTiming=M.collectResourceTiming,this._resourceTiming=[],M.maxzoom!==void 0&&(this.maxzoom=M.maxzoom),M.type&&(this.type=M.type),M.attribution&&(this.attribution=M.attribution),this.promoteId=M.promoteId;var $=k.EXTENT/this.tileSize;this.workerOptions=k.extend({source:this.id,cluster:M.cluster||!1,geojsonVtOptions:{buffer:(M.buffer!==void 0?M.buffer:128)*$,tolerance:(M.tolerance!==void 0?M.tolerance:.375)*$,extent:k.EXTENT,maxZoom:this.maxzoom,lineMetrics:M.lineMetrics||!1,generateId:M.generateId||!1},superclusterOptions:{maxZoom:M.clusterMaxZoom!==void 0?Math.min(M.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,M.clusterMinPoints||2),extent:k.EXTENT,radius:(M.clusterRadius||50)*$,log:!1,generateId:M.generateId||!1},clusterProperties:M.clusterProperties,filter:M.filter},M.workerOptions)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.load=function(){var E=this;this.fire(new k.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(M){if(M)E.fire(new k.ErrorEvent(M));else{var U={dataType:"source",sourceDataType:"metadata"};E._collectResourceTiming&&E._resourceTiming&&E._resourceTiming.length>0&&(U.resourceTiming=E._resourceTiming,E._resourceTiming=[]),E.fire(new k.Event("data",U))}})},C.prototype.onAdd=function(E){this.map=E,this.load()},C.prototype.setData=function(E){var M=this;return this._data=E,this.fire(new k.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(U){if(U)M.fire(new k.ErrorEvent(U));else{var H={dataType:"source",sourceDataType:"content"};M._collectResourceTiming&&M._resourceTiming&&M._resourceTiming.length>0&&(H.resourceTiming=M._resourceTiming,M._resourceTiming=[]),M.fire(new k.Event("data",H))}}),this},C.prototype.getClusterExpansionZoom=function(E,M){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:E,source:this.id},M),this},C.prototype.getClusterChildren=function(E,M){return this.actor.send("geojson.getClusterChildren",{clusterId:E,source:this.id},M),this},C.prototype.getClusterLeaves=function(E,M,U,H){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:E,limit:M,offset:U},H),this},C.prototype._updateWorkerData=function(E){var M=this;this._loaded=!1;var U=k.extend({},this.workerOptions),H=this._data;typeof H=="string"?(U.request=this.map._requestManager.transformRequest(k.browser.resolveURL(H),k.ResourceType.Source),U.request.collectResourceTiming=this._collectResourceTiming):U.data=JSON.stringify(H),this.actor.send(this.type+".loadData",U,function($,ht){M._removed||ht&&ht.abandoned||(M._loaded=!0,ht&&ht.resourceTiming&&ht.resourceTiming[M.id]&&(M._resourceTiming=ht.resourceTiming[M.id].slice(0)),M.actor.send(M.type+".coalesce",{source:U.source},null),E($))})},C.prototype.loaded=function(){return this._loaded},C.prototype.loadTile=function(E,M){var U=this,H=E.actor?"reloadTile":"loadTile";E.actor=this.actor,E.request=this.actor.send(H,{type:this.type,uid:E.uid,tileID:E.tileID,zoom:E.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:k.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},function($,ht){return delete E.request,E.unloadVectorData(),E.aborted?M(null):$?M($):(E.loadVectorData(ht,U.map.painter,H==="reloadTile"),M(null))})},C.prototype.abortTile=function(E){E.request&&(E.request.cancel(),delete E.request),E.aborted=!0},C.prototype.unloadTile=function(E){E.unloadVectorData(),this.actor.send("removeTile",{uid:E.uid,type:this.type,source:this.id})},C.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},C.prototype.serialize=function(){return k.extend({},this._options,{type:this.type,data:this._data})},C.prototype.hasTransition=function(){return!1},C}(k.Evented),mt=k.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),se=function(x){function C(E,M,U,H){x.call(this),this.id=E,this.dispatcher=U,this.coordinates=M.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(H),this.options=M}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.load=function(E,M){var U=this;this._loaded=!1,this.fire(new k.Event("dataloading",{dataType:"source"})),this.url=this.options.url,k.getImage(this.map._requestManager.transformRequest(this.url,k.ResourceType.Image),function(H,$){U._loaded=!0,H?U.fire(new k.ErrorEvent(H)):$&&(U.image=$,E&&(U.coordinates=E),M&&M(),U._finishLoading())})},C.prototype.loaded=function(){return this._loaded},C.prototype.updateImage=function(E){var M=this;return this.image&&E.url?(this.options.url=E.url,this.load(E.coordinates,function(){M.texture=null}),this):this},C.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new k.Event("data",{dataType:"source",sourceDataType:"metadata"})))},C.prototype.onAdd=function(E){this.map=E,this.load()},C.prototype.setCoordinates=function(E){var M=this;this.coordinates=E;var U=E.map(k.MercatorCoordinate.fromLngLat);this.tileID=function($){for(var ht=1/0,Ut=1/0,re=-1/0,Fe=-1/0,Re=0,De=$;Re<De.length;Re+=1){var cr=De[Re];ht=Math.min(ht,cr.x),Ut=Math.min(Ut,cr.y),re=Math.max(re,cr.x),Fe=Math.max(Fe,cr.y)}var ur=Math.max(re-ht,Fe-Ut),Er=Math.max(0,Math.floor(-Math.log(ur)/Math.LN2)),nr=Math.pow(2,Er);return new k.CanonicalTileID(Er,Math.floor((ht+re)/2*nr),Math.floor((Ut+Fe)/2*nr))}(U),this.minzoom=this.maxzoom=this.tileID.z;var H=U.map(function($){return M.tileID.getTilePoint($)._round()});return this._boundsArray=new k.StructArrayLayout4i8,this._boundsArray.emplaceBack(H[0].x,H[0].y,0,0),this._boundsArray.emplaceBack(H[1].x,H[1].y,k.EXTENT,0),this._boundsArray.emplaceBack(H[3].x,H[3].y,0,k.EXTENT),this._boundsArray.emplaceBack(H[2].x,H[2].y,k.EXTENT,k.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new k.Event("data",{dataType:"source",sourceDataType:"content"})),this},C.prototype.prepare=function(){if(Object.keys(this.tiles).length!==0&&this.image){var E=this.map.painter.context,M=E.gl;for(var U in this.boundsBuffer||(this.boundsBuffer=E.createVertexBuffer(this._boundsArray,mt.members)),this.boundsSegments||(this.boundsSegments=k.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new k.Texture(E,this.image,M.RGBA),this.texture.bind(M.LINEAR,M.CLAMP_TO_EDGE)),this.tiles){var H=this.tiles[U];H.state!=="loaded"&&(H.state="loaded",H.texture=this.texture)}}},C.prototype.loadTile=function(E,M){this.tileID&&this.tileID.equals(E.tileID.canonical)?(this.tiles[String(E.tileID.wrap)]=E,E.buckets={},M(null)):(E.state="errored",M(null))},C.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},C.prototype.hasTransition=function(){return!1},C}(k.Evented),ke=function(x){function C(E,M,U,H){x.call(this,E,M,U,H),this.roundZoom=!0,this.type="video",this.options=M}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.load=function(){var E=this;this._loaded=!1;var M=this.options;this.urls=[];for(var U=0,H=M.urls;U<H.length;U+=1)this.urls.push(this.map._requestManager.transformRequest(H[U],k.ResourceType.Source).url);k.getVideo(this.urls,function($,ht){E._loaded=!0,$?E.fire(new k.ErrorEvent($)):ht&&(E.video=ht,E.video.loop=!0,E.video.setAttribute("playsinline",""),E.video.addEventListener("playing",function(){E.map.triggerRepaint()}),E.map&&E.video.play(),E._finishLoading())})},C.prototype.pause=function(){this.video&&this.video.pause()},C.prototype.play=function(){this.video&&this.video.play()},C.prototype.seek=function(E){if(this.video){var M=this.video.seekable;E<M.start(0)||E>M.end(0)?this.fire(new k.ErrorEvent(new k.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+M.start(0)+" and "+M.end(0)+"-second mark."))):this.video.currentTime=E}},C.prototype.getVideo=function(){return this.video},C.prototype.onAdd=function(E){this.map||(this.map=E,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},C.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var E=this.map.painter.context,M=E.gl;for(var U in this.boundsBuffer||(this.boundsBuffer=E.createVertexBuffer(this._boundsArray,mt.members)),this.boundsSegments||(this.boundsSegments=k.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(M.LINEAR,M.CLAMP_TO_EDGE),M.texSubImage2D(M.TEXTURE_2D,0,0,0,M.RGBA,M.UNSIGNED_BYTE,this.video)):(this.texture=new k.Texture(E,this.video,M.RGBA),this.texture.bind(M.LINEAR,M.CLAMP_TO_EDGE)),this.tiles){var H=this.tiles[U];H.state!=="loaded"&&(H.state="loaded",H.texture=this.texture)}}},C.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},C.prototype.hasTransition=function(){return this.video&&!this.video.paused},C}(se),Le=function(x){function C(E,M,U,H){x.call(this,E,M,U,H),M.coordinates?Array.isArray(M.coordinates)&&M.coordinates.length===4&&!M.coordinates.some(function($){return!Array.isArray($)||$.length!==2||$.some(function(ht){return typeof ht!="number"})})||this.fire(new k.ErrorEvent(new k.ValidationError("sources."+E,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new k.ErrorEvent(new k.ValidationError("sources."+E,null,'missing required property "coordinates"'))),M.animate&&typeof M.animate!="boolean"&&this.fire(new k.ErrorEvent(new k.ValidationError("sources."+E,null,'optional "animate" property must be a boolean value'))),M.canvas?typeof M.canvas=="string"||M.canvas instanceof k.window.HTMLCanvasElement||this.fire(new k.ErrorEvent(new k.ValidationError("sources."+E,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new k.ErrorEvent(new k.ValidationError("sources."+E,null,'missing required property "canvas"'))),this.options=M,this.animate=M.animate===void 0||M.animate}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof k.window.HTMLCanvasElement?this.options.canvas:k.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new k.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},C.prototype.getCanvas=function(){return this.canvas},C.prototype.onAdd=function(E){this.map=E,this.load(),this.canvas&&this.animate&&this.play()},C.prototype.onRemove=function(){this.pause()},C.prototype.prepare=function(){var E=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,E=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,E=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var M=this.map.painter.context,U=M.gl;for(var H in this.boundsBuffer||(this.boundsBuffer=M.createVertexBuffer(this._boundsArray,mt.members)),this.boundsSegments||(this.boundsSegments=k.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(E||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new k.Texture(M,this.canvas,U.RGBA,{premultiply:!0}),this.tiles){var $=this.tiles[H];$.state!=="loaded"&&($.state="loaded",$.texture=this.texture)}}},C.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},C.prototype.hasTransition=function(){return this._playing},C.prototype._hasInvalidDimensions=function(){for(var E=0,M=[this.canvas.width,this.canvas.height];E<M.length;E+=1){var U=M[E];if(isNaN(U)||U<=0)return!0}return!1},C}(se),Be={vector:Jt,raster:ft,"raster-dem":St,geojson:Y,video:ke,image:se,canvas:Le};function Bt(x,C){var E=k.identity([]);return k.translate(E,E,[1,1,0]),k.scale(E,E,[.5*x.width,.5*x.height,1]),k.multiply(E,E,x.calculatePosMatrix(C.toUnwrapped()))}function ee(x,C,E,M,U,H){var $=function(Er,nr,wr){if(Er)for(var Ir=0,$r=Er;Ir<$r.length;Ir+=1){var gn=nr[$r[Ir]];if(gn&&gn.source===wr&&gn.type==="fill-extrusion")return!0}else for(var dn in nr){var xn=nr[dn];if(xn.source===wr&&xn.type==="fill-extrusion")return!0}return!1}(U&&U.layers,C,x.id),ht=H.maxPitchScaleFactor(),Ut=x.tilesIn(M,ht,$);Ut.sort(me);for(var re=[],Fe=0,Re=Ut;Fe<Re.length;Fe+=1){var De=Re[Fe];re.push({wrappedTileID:De.tileID.wrapped().key,queryResults:De.tile.queryRenderedFeatures(C,E,x._state,De.queryGeometry,De.cameraQueryGeometry,De.scale,U,H,ht,Bt(x.transform,De.tileID))})}var cr=function(Er){for(var nr={},wr={},Ir=0,$r=Er;Ir<$r.length;Ir+=1){var gn=$r[Ir],dn=gn.queryResults,xn=gn.wrappedTileID,Un=wr[xn]=wr[xn]||{};for(var yi in dn)for(var ui=dn[yi],Bi=Un[yi]=Un[yi]||{},sa=nr[yi]=nr[yi]||[],ua=0,ha=ui;ua<ha.length;ua+=1){var uo=ha[ua];Bi[uo.featureIndex]||(Bi[uo.featureIndex]=!0,sa.push(uo))}}return nr}(re);for(var ur in cr)cr[ur].forEach(function(Er){var nr=Er.feature,wr=x.getFeatureState(nr.layer["source-layer"],nr.id);nr.source=nr.layer.source,nr.layer["source-layer"]&&(nr.sourceLayer=nr.layer["source-layer"]),nr.state=wr});return cr}function me(x,C){var E=x.tileID,M=C.tileID;return E.overscaledZ-M.overscaledZ||E.canonical.y-M.canonical.y||E.wrap-M.wrap||E.canonical.x-M.canonical.x}var Yt=function(x,C){this.max=x,this.onRemove=C,this.reset()};Yt.prototype.reset=function(){for(var x in this.data)for(var C=0,E=this.data[x];C<E.length;C+=1){var M=E[C];M.timeout&&clearTimeout(M.timeout),this.onRemove(M.value)}return this.data={},this.order=[],this},Yt.prototype.add=function(x,C,E){var M=this,U=x.wrapped().key;this.data[U]===void 0&&(this.data[U]=[]);var H={value:C,timeout:void 0};if(E!==void 0&&(H.timeout=setTimeout(function(){M.remove(x,H)},E)),this.data[U].push(H),this.order.push(U),this.order.length>this.max){var $=this._getAndRemoveByKey(this.order[0]);$&&this.onRemove($)}return this},Yt.prototype.has=function(x){return x.wrapped().key in this.data},Yt.prototype.getAndRemove=function(x){return this.has(x)?this._getAndRemoveByKey(x.wrapped().key):null},Yt.prototype._getAndRemoveByKey=function(x){var C=this.data[x].shift();return C.timeout&&clearTimeout(C.timeout),this.data[x].length===0&&delete this.data[x],this.order.splice(this.order.indexOf(x),1),C.value},Yt.prototype.getByKey=function(x){var C=this.data[x];return C?C[0].value:null},Yt.prototype.get=function(x){return this.has(x)?this.data[x.wrapped().key][0].value:null},Yt.prototype.remove=function(x,C){if(!this.has(x))return this;var E=x.wrapped().key,M=C===void 0?0:this.data[E].indexOf(C),U=this.data[E][M];return this.data[E].splice(M,1),U.timeout&&clearTimeout(U.timeout),this.data[E].length===0&&delete this.data[E],this.onRemove(U.value),this.order.splice(this.order.indexOf(E),1),this},Yt.prototype.setMaxSize=function(x){for(this.max=x;this.order.length>this.max;){var C=this._getAndRemoveByKey(this.order[0]);C&&this.onRemove(C)}return this},Yt.prototype.filter=function(x){var C=[];for(var E in this.data)for(var M=0,U=this.data[E];M<U.length;M+=1){var H=U[M];x(H.value)||C.push(H)}for(var $=0,ht=C;$<ht.length;$+=1){var Ut=ht[$];this.remove(Ut.value.tileID,Ut)}};var qe=function(x,C,E){this.context=x;var M=x.gl;this.buffer=M.createBuffer(),this.dynamicDraw=Boolean(E),this.context.unbindVAO(),x.bindElementBuffer.set(this.buffer),M.bufferData(M.ELEMENT_ARRAY_BUFFER,C.arrayBuffer,this.dynamicDraw?M.DYNAMIC_DRAW:M.STATIC_DRAW),this.dynamicDraw||delete C.arrayBuffer};qe.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},qe.prototype.updateData=function(x){var C=this.context.gl;this.context.unbindVAO(),this.bind(),C.bufferSubData(C.ELEMENT_ARRAY_BUFFER,0,x.arrayBuffer)},qe.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var vr={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},ie=function(x,C,E,M){this.length=C.length,this.attributes=E,this.itemSize=C.bytesPerElement,this.dynamicDraw=M,this.context=x;var U=x.gl;this.buffer=U.createBuffer(),x.bindVertexBuffer.set(this.buffer),U.bufferData(U.ARRAY_BUFFER,C.arrayBuffer,this.dynamicDraw?U.DYNAMIC_DRAW:U.STATIC_DRAW),this.dynamicDraw||delete C.arrayBuffer};ie.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},ie.prototype.updateData=function(x){var C=this.context.gl;this.bind(),C.bufferSubData(C.ARRAY_BUFFER,0,x.arrayBuffer)},ie.prototype.enableAttributes=function(x,C){for(var E=0;E<this.attributes.length;E++){var M=C.attributes[this.attributes[E].name];M!==void 0&&x.enableVertexAttribArray(M)}},ie.prototype.setVertexAttribPointers=function(x,C,E){for(var M=0;M<this.attributes.length;M++){var U=this.attributes[M],H=C.attributes[U.name];H!==void 0&&x.vertexAttribPointer(H,U.components,x[vr[U.type]],!1,this.itemSize,U.offset+this.itemSize*(E||0))}},ie.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var qt=function(x){this.gl=x.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};qt.prototype.get=function(){return this.current},qt.prototype.set=function(x){},qt.prototype.getDefault=function(){return this.default},qt.prototype.setDefault=function(){this.set(this.default)};var bt=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return k.Color.transparent},C.prototype.set=function(E){var M=this.current;(E.r!==M.r||E.g!==M.g||E.b!==M.b||E.a!==M.a||this.dirty)&&(this.gl.clearColor(E.r,E.g,E.b,E.a),this.current=E,this.dirty=!1)},C}(qt),Xt=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return 1},C.prototype.set=function(E){(E!==this.current||this.dirty)&&(this.gl.clearDepth(E),this.current=E,this.dirty=!1)},C}(qt),$t=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return 0},C.prototype.set=function(E){(E!==this.current||this.dirty)&&(this.gl.clearStencil(E),this.current=E,this.dirty=!1)},C}(qt),xt=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return[!0,!0,!0,!0]},C.prototype.set=function(E){var M=this.current;(E[0]!==M[0]||E[1]!==M[1]||E[2]!==M[2]||E[3]!==M[3]||this.dirty)&&(this.gl.colorMask(E[0],E[1],E[2],E[3]),this.current=E,this.dirty=!1)},C}(qt),wt=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return!0},C.prototype.set=function(E){(E!==this.current||this.dirty)&&(this.gl.depthMask(E),this.current=E,this.dirty=!1)},C}(qt),ue=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return 255},C.prototype.set=function(E){(E!==this.current||this.dirty)&&(this.gl.stencilMask(E),this.current=E,this.dirty=!1)},C}(qt),Ie=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},C.prototype.set=function(E){var M=this.current;(E.func!==M.func||E.ref!==M.ref||E.mask!==M.mask||this.dirty)&&(this.gl.stencilFunc(E.func,E.ref,E.mask),this.current=E,this.dirty=!1)},C}(qt),Ne=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){var E=this.gl;return[E.KEEP,E.KEEP,E.KEEP]},C.prototype.set=function(E){var M=this.current;(E[0]!==M[0]||E[1]!==M[1]||E[2]!==M[2]||this.dirty)&&(this.gl.stencilOp(E[0],E[1],E[2]),this.current=E,this.dirty=!1)},C}(qt),Zt=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return!1},C.prototype.set=function(E){if(E!==this.current||this.dirty){var M=this.gl;E?M.enable(M.STENCIL_TEST):M.disable(M.STENCIL_TEST),this.current=E,this.dirty=!1}},C}(qt),Ct=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return[0,1]},C.prototype.set=function(E){var M=this.current;(E[0]!==M[0]||E[1]!==M[1]||this.dirty)&&(this.gl.depthRange(E[0],E[1]),this.current=E,this.dirty=!1)},C}(qt),Tt=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return!1},C.prototype.set=function(E){if(E!==this.current||this.dirty){var M=this.gl;E?M.enable(M.DEPTH_TEST):M.disable(M.DEPTH_TEST),this.current=E,this.dirty=!1}},C}(qt),Nt=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return this.gl.LESS},C.prototype.set=function(E){(E!==this.current||this.dirty)&&(this.gl.depthFunc(E),this.current=E,this.dirty=!1)},C}(qt),tt=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return!1},C.prototype.set=function(E){if(E!==this.current||this.dirty){var M=this.gl;E?M.enable(M.BLEND):M.disable(M.BLEND),this.current=E,this.dirty=!1}},C}(qt),vt=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){var E=this.gl;return[E.ONE,E.ZERO]},C.prototype.set=function(E){var M=this.current;(E[0]!==M[0]||E[1]!==M[1]||this.dirty)&&(this.gl.blendFunc(E[0],E[1]),this.current=E,this.dirty=!1)},C}(qt),Ht=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return k.Color.transparent},C.prototype.set=function(E){var M=this.current;(E.r!==M.r||E.g!==M.g||E.b!==M.b||E.a!==M.a||this.dirty)&&(this.gl.blendColor(E.r,E.g,E.b,E.a),this.current=E,this.dirty=!1)},C}(qt),he=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return this.gl.FUNC_ADD},C.prototype.set=function(E){(E!==this.current||this.dirty)&&(this.gl.blendEquation(E),this.current=E,this.dirty=!1)},C}(qt),jt=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return!1},C.prototype.set=function(E){if(E!==this.current||this.dirty){var M=this.gl;E?M.enable(M.CULL_FACE):M.disable(M.CULL_FACE),this.current=E,this.dirty=!1}},C}(qt),Te=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return this.gl.BACK},C.prototype.set=function(E){(E!==this.current||this.dirty)&&(this.gl.cullFace(E),this.current=E,this.dirty=!1)},C}(qt),We=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return this.gl.CCW},C.prototype.set=function(E){(E!==this.current||this.dirty)&&(this.gl.frontFace(E),this.current=E,this.dirty=!1)},C}(qt),Qe=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return null},C.prototype.set=function(E){(E!==this.current||this.dirty)&&(this.gl.useProgram(E),this.current=E,this.dirty=!1)},C}(qt),pr=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return this.gl.TEXTURE0},C.prototype.set=function(E){(E!==this.current||this.dirty)&&(this.gl.activeTexture(E),this.current=E,this.dirty=!1)},C}(qt),lr=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){var E=this.gl;return[0,0,E.drawingBufferWidth,E.drawingBufferHeight]},C.prototype.set=function(E){var M=this.current;(E[0]!==M[0]||E[1]!==M[1]||E[2]!==M[2]||E[3]!==M[3]||this.dirty)&&(this.gl.viewport(E[0],E[1],E[2],E[3]),this.current=E,this.dirty=!1)},C}(qt),Vr=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return null},C.prototype.set=function(E){if(E!==this.current||this.dirty){var M=this.gl;M.bindFramebuffer(M.FRAMEBUFFER,E),this.current=E,this.dirty=!1}},C}(qt),Pr=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return null},C.prototype.set=function(E){if(E!==this.current||this.dirty){var M=this.gl;M.bindRenderbuffer(M.RENDERBUFFER,E),this.current=E,this.dirty=!1}},C}(qt),Br=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return null},C.prototype.set=function(E){if(E!==this.current||this.dirty){var M=this.gl;M.bindTexture(M.TEXTURE_2D,E),this.current=E,this.dirty=!1}},C}(qt),Sn=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return null},C.prototype.set=function(E){if(E!==this.current||this.dirty){var M=this.gl;M.bindBuffer(M.ARRAY_BUFFER,E),this.current=E,this.dirty=!1}},C}(qt),an=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return null},C.prototype.set=function(E){var M=this.gl;M.bindBuffer(M.ELEMENT_ARRAY_BUFFER,E),this.current=E,this.dirty=!1},C}(qt),zn=function(x){function C(E){x.call(this,E),this.vao=E.extVertexArrayObject}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return null},C.prototype.set=function(E){this.vao&&(E!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(E),this.current=E,this.dirty=!1)},C}(qt),Zn=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return 4},C.prototype.set=function(E){if(E!==this.current||this.dirty){var M=this.gl;M.pixelStorei(M.UNPACK_ALIGNMENT,E),this.current=E,this.dirty=!1}},C}(qt),Wn=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return!1},C.prototype.set=function(E){if(E!==this.current||this.dirty){var M=this.gl;M.pixelStorei(M.UNPACK_PREMULTIPLY_ALPHA_WEBGL,E),this.current=E,this.dirty=!1}},C}(qt),Dn=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return!1},C.prototype.set=function(E){if(E!==this.current||this.dirty){var M=this.gl;M.pixelStorei(M.UNPACK_FLIP_Y_WEBGL,E),this.current=E,this.dirty=!1}},C}(qt),Xn=function(x){function C(E,M){x.call(this,E),this.context=E,this.parent=M}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getDefault=function(){return null},C}(qt),Ft=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.setDirty=function(){this.dirty=!0},C.prototype.set=function(E){if(E!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var M=this.gl;M.framebufferTexture2D(M.FRAMEBUFFER,M.COLOR_ATTACHMENT0,M.TEXTURE_2D,E,0),this.current=E,this.dirty=!1}},C}(Xn),Wt=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.set=function(E){if(E!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var M=this.gl;M.framebufferRenderbuffer(M.FRAMEBUFFER,M.DEPTH_ATTACHMENT,M.RENDERBUFFER,E),this.current=E,this.dirty=!1}},C}(Xn),oe=function(x,C,E,M){this.context=x,this.width=C,this.height=E;var U=this.framebuffer=x.gl.createFramebuffer();this.colorAttachment=new Ft(x,U),M&&(this.depthAttachment=new Wt(x,U))};oe.prototype.destroy=function(){var x=this.context.gl,C=this.colorAttachment.get();if(C&&x.deleteTexture(C),this.depthAttachment){var E=this.depthAttachment.get();E&&x.deleteRenderbuffer(E)}x.deleteFramebuffer(this.framebuffer)};var ye=function(x,C,E){this.func=x,this.mask=C,this.range=E};ye.ReadOnly=!1,ye.ReadWrite=!0,ye.disabled=new ye(519,ye.ReadOnly,[0,1]);var Ze=function(x,C,E,M,U,H){this.test=x,this.ref=C,this.mask=E,this.fail=M,this.depthFail=U,this.pass=H};Ze.disabled=new Ze({func:519,mask:0},0,0,7680,7680,7680);var fr=function(x,C,E){this.blendFunction=x,this.blendColor=C,this.mask=E};fr.disabled=new fr(fr.Replace=[1,0],k.Color.transparent,[!1,!1,!1,!1]),fr.unblended=new fr(fr.Replace,k.Color.transparent,[!0,!0,!0,!0]),fr.alphaBlended=new fr([1,771],k.Color.transparent,[!0,!0,!0,!0]);var _r=function(x,C,E){this.enable=x,this.mode=C,this.frontFace=E};_r.disabled=new _r(!1,1029,2305),_r.backCCW=new _r(!0,1029,2305);var we=function(x){this.gl=x,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new bt(this),this.clearDepth=new Xt(this),this.clearStencil=new $t(this),this.colorMask=new xt(this),this.depthMask=new wt(this),this.stencilMask=new ue(this),this.stencilFunc=new Ie(this),this.stencilOp=new Ne(this),this.stencilTest=new Zt(this),this.depthRange=new Ct(this),this.depthTest=new Tt(this),this.depthFunc=new Nt(this),this.blend=new tt(this),this.blendFunc=new vt(this),this.blendColor=new Ht(this),this.blendEquation=new he(this),this.cullFace=new jt(this),this.cullFaceSide=new Te(this),this.frontFace=new We(this),this.program=new Qe(this),this.activeTexture=new pr(this),this.viewport=new lr(this),this.bindFramebuffer=new Vr(this),this.bindRenderbuffer=new Pr(this),this.bindTexture=new Br(this),this.bindVertexBuffer=new Sn(this),this.bindElementBuffer=new an(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new zn(this),this.pixelStoreUnpack=new Zn(this),this.pixelStoreUnpackPremultiplyAlpha=new Wn(this),this.pixelStoreUnpackFlipY=new Dn(this),this.extTextureFilterAnisotropic=x.getExtension("EXT_texture_filter_anisotropic")||x.getExtension("MOZ_EXT_texture_filter_anisotropic")||x.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=x.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=x.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(x.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=x.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=x.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=x.getParameter(x.MAX_TEXTURE_SIZE)};we.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},we.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},we.prototype.createIndexBuffer=function(x,C){return new qe(this,x,C)},we.prototype.createVertexBuffer=function(x,C,E){return new ie(this,x,C,E)},we.prototype.createRenderbuffer=function(x,C,E){var M=this.gl,U=M.createRenderbuffer();return this.bindRenderbuffer.set(U),M.renderbufferStorage(M.RENDERBUFFER,x,C,E),this.bindRenderbuffer.set(null),U},we.prototype.createFramebuffer=function(x,C,E){return new oe(this,x,C,E)},we.prototype.clear=function(x){var C=x.color,E=x.depth,M=this.gl,U=0;C&&(U|=M.COLOR_BUFFER_BIT,this.clearColor.set(C),this.colorMask.set([!0,!0,!0,!0])),E!==void 0&&(U|=M.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(E),this.depthMask.set(!0)),M.clear(U)},we.prototype.setCullFace=function(x){x.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(x.mode),this.frontFace.set(x.frontFace))},we.prototype.setDepthMode=function(x){x.func!==this.gl.ALWAYS||x.mask?(this.depthTest.set(!0),this.depthFunc.set(x.func),this.depthMask.set(x.mask),this.depthRange.set(x.range)):this.depthTest.set(!1)},we.prototype.setStencilMode=function(x){x.test.func!==this.gl.ALWAYS||x.mask?(this.stencilTest.set(!0),this.stencilMask.set(x.mask),this.stencilOp.set([x.fail,x.depthFail,x.pass]),this.stencilFunc.set({func:x.test.func,ref:x.ref,mask:x.test.mask})):this.stencilTest.set(!1)},we.prototype.setColorMode=function(x){k.deepEqual(x.blendFunction,fr.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(x.blendFunction),this.blendColor.set(x.blendColor)),this.colorMask.set(x.mask)},we.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var ir=function(x){function C(E,M,U){var H=this;x.call(this),this.id=E,this.dispatcher=U,this.on("data",function($){$.dataType==="source"&&$.sourceDataType==="metadata"&&(H._sourceLoaded=!0),H._sourceLoaded&&!H._paused&&$.dataType==="source"&&$.sourceDataType==="content"&&(H.reload(),H.transform&&H.update(H.transform))}),this.on("error",function(){H._sourceErrored=!0}),this._source=function($,ht,Ut,re){var Fe=new Be[ht.type]($,ht,Ut,re);if(Fe.id!==$)throw new Error("Expected Source id to be "+$+" instead of "+Fe.id);return k.bindAll(["load","abort","unload","serialize","prepare"],Fe),Fe}(E,M,U,this),this._tiles={},this._cache=new Yt(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new k.SourceFeatureState}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.onAdd=function(E){this.map=E,this._maxTileCacheSize=E?E._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(E)},C.prototype.onRemove=function(E){this._source&&this._source.onRemove&&this._source.onRemove(E)},C.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var E in this._tiles){var M=this._tiles[E];if(M.state!=="loaded"&&M.state!=="errored")return!1}return!0},C.prototype.getSource=function(){return this._source},C.prototype.pause=function(){this._paused=!0},C.prototype.resume=function(){if(this._paused){var E=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,E&&this.reload(),this.transform&&this.update(this.transform)}},C.prototype._loadTile=function(E,M){return this._source.loadTile(E,M)},C.prototype._unloadTile=function(E){if(this._source.unloadTile)return this._source.unloadTile(E,function(){})},C.prototype._abortTile=function(E){if(this._source.abortTile)return this._source.abortTile(E,function(){})},C.prototype.serialize=function(){return this._source.serialize()},C.prototype.prepare=function(E){for(var M in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var U=this._tiles[M];U.upload(E),U.prepare(this.map.style.imageManager)}},C.prototype.getIds=function(){return k.values(this._tiles).map(function(E){return E.tileID}).sort(Hr).map(function(E){return E.key})},C.prototype.getRenderableIds=function(E){var M=this,U=[];for(var H in this._tiles)this._isIdRenderable(H,E)&&U.push(this._tiles[H]);return E?U.sort(function($,ht){var Ut=$.tileID,re=ht.tileID,Fe=new k.Point(Ut.canonical.x,Ut.canonical.y)._rotate(M.transform.angle),Re=new k.Point(re.canonical.x,re.canonical.y)._rotate(M.transform.angle);return Ut.overscaledZ-re.overscaledZ||Re.y-Fe.y||Re.x-Fe.x}).map(function($){return $.tileID.key}):U.map(function($){return $.tileID}).sort(Hr).map(function($){return $.key})},C.prototype.hasRenderableParent=function(E){var M=this.findLoadedParent(E,0);return!!M&&this._isIdRenderable(M.tileID.key)},C.prototype._isIdRenderable=function(E,M){return this._tiles[E]&&this._tiles[E].hasData()&&!this._coveredTiles[E]&&(M||!this._tiles[E].holdingForFade())},C.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var E in this._cache.reset(),this._tiles)this._tiles[E].state!=="errored"&&this._reloadTile(E,"reloading")},C.prototype._reloadTile=function(E,M){var U=this._tiles[E];U&&(U.state!=="loading"&&(U.state=M),this._loadTile(U,this._tileLoaded.bind(this,U,E,M)))},C.prototype._tileLoaded=function(E,M,U,H){if(H)return E.state="errored",void(H.status!==404?this._source.fire(new k.ErrorEvent(H,{tile:E})):this.update(this.transform));E.timeAdded=k.browser.now(),U==="expired"&&(E.refreshedUponExpiration=!0),this._setTileReloadTimer(M,E),this.getSource().type==="raster-dem"&&E.dem&&this._backfillDEM(E),this._state.initializeTileState(E,this.map?this.map.painter:null),this._source.fire(new k.Event("data",{dataType:"source",tile:E,coord:E.tileID}))},C.prototype._backfillDEM=function(E){for(var M=this.getRenderableIds(),U=0;U<M.length;U++){var H=M[U];if(E.neighboringTiles&&E.neighboringTiles[H]){var $=this.getTileByID(H);ht(E,$),ht($,E)}}function ht(Ut,re){Ut.needsHillshadePrepare=!0;var Fe=re.tileID.canonical.x-Ut.tileID.canonical.x,Re=re.tileID.canonical.y-Ut.tileID.canonical.y,De=Math.pow(2,Ut.tileID.canonical.z),cr=re.tileID.key;Fe===0&&Re===0||Math.abs(Re)>1||(Math.abs(Fe)>1&&(Math.abs(Fe+De)===1?Fe+=De:Math.abs(Fe-De)===1&&(Fe-=De)),re.dem&&Ut.dem&&(Ut.dem.backfillBorder(re.dem,Fe,Re),Ut.neighboringTiles&&Ut.neighboringTiles[cr]&&(Ut.neighboringTiles[cr].backfilled=!0)))}},C.prototype.getTile=function(E){return this.getTileByID(E.key)},C.prototype.getTileByID=function(E){return this._tiles[E]},C.prototype._retainLoadedChildren=function(E,M,U,H){for(var $ in this._tiles){var ht=this._tiles[$];if(!(H[$]||!ht.hasData()||ht.tileID.overscaledZ<=M||ht.tileID.overscaledZ>U)){for(var Ut=ht.tileID;ht&&ht.tileID.overscaledZ>M+1;){var re=ht.tileID.scaledTo(ht.tileID.overscaledZ-1);(ht=this._tiles[re.key])&&ht.hasData()&&(Ut=re)}for(var Fe=Ut;Fe.overscaledZ>M;)if(E[(Fe=Fe.scaledTo(Fe.overscaledZ-1)).key]){H[Ut.key]=Ut;break}}}},C.prototype.findLoadedParent=function(E,M){if(E.key in this._loadedParentTiles){var U=this._loadedParentTiles[E.key];return U&&U.tileID.overscaledZ>=M?U:null}for(var H=E.overscaledZ-1;H>=M;H--){var $=E.scaledTo(H),ht=this._getLoadedTile($);if(ht)return ht}},C.prototype._getLoadedTile=function(E){var M=this._tiles[E.key];return M&&M.hasData()?M:this._cache.getByKey(E.wrapped().key)},C.prototype.updateCacheSize=function(E){var M=Math.ceil(E.width/this._source.tileSize)+1,U=Math.ceil(E.height/this._source.tileSize)+1,H=Math.floor(M*U*5),$=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,H):H;this._cache.setMaxSize($)},C.prototype.handleWrapJump=function(E){var M=Math.round((E-(this._prevLng===void 0?E:this._prevLng))/360);if(this._prevLng=E,M){var U={};for(var H in this._tiles){var $=this._tiles[H];$.tileID=$.tileID.unwrapTo($.tileID.wrap+M),U[$.tileID.key]=$}for(var ht in this._tiles=U,this._timers)clearTimeout(this._timers[ht]),delete this._timers[ht];for(var Ut in this._tiles)this._setTileReloadTimer(Ut,this._tiles[Ut])}},C.prototype.update=function(E){var M=this;if(this.transform=E,this._sourceLoaded&&!this._paused){var U;this.updateCacheSize(E),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?U=E.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Un){return new k.OverscaledTileID(Un.canonical.z,Un.wrap,Un.canonical.z,Un.canonical.x,Un.canonical.y)}):(U=E.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(U=U.filter(function(Un){return M._source.hasTile(Un)}))):U=[];var H=E.coveringZoomLevel(this._source),$=Math.max(H-C.maxOverzooming,this._source.minzoom),ht=Math.max(H+C.maxUnderzooming,this._source.minzoom),Ut=this._updateRetainedTiles(U,H);if(In(this._source.type)){for(var re={},Fe={},Re=0,De=Object.keys(Ut);Re<De.length;Re+=1){var cr=De[Re],ur=Ut[cr],Er=this._tiles[cr];if(Er&&!(Er.fadeEndTime&&Er.fadeEndTime<=k.browser.now())){var nr=this.findLoadedParent(ur,$);nr&&(this._addTile(nr.tileID),re[nr.tileID.key]=nr.tileID),Fe[cr]=ur}}for(var wr in this._retainLoadedChildren(Fe,H,ht,Ut),re)Ut[wr]||(this._coveredTiles[wr]=!0,Ut[wr]=re[wr])}for(var Ir in Ut)this._tiles[Ir].clearFadeHold();for(var $r=0,gn=k.keysDifference(this._tiles,Ut);$r<gn.length;$r+=1){var dn=gn[$r],xn=this._tiles[dn];xn.hasSymbolBuckets&&!xn.holdingForFade()?xn.setHoldDuration(this.map._fadeDuration):xn.hasSymbolBuckets&&!xn.symbolFadeFinished()||this._removeTile(dn)}this._updateLoadedParentTileCache()}},C.prototype.releaseSymbolFadeTiles=function(){for(var E in this._tiles)this._tiles[E].holdingForFade()&&this._removeTile(E)},C.prototype._updateRetainedTiles=function(E,M){for(var U={},H={},$=Math.max(M-C.maxOverzooming,this._source.minzoom),ht=Math.max(M+C.maxUnderzooming,this._source.minzoom),Ut={},re=0,Fe=E;re<Fe.length;re+=1){var Re=Fe[re],De=this._addTile(Re);U[Re.key]=Re,De.hasData()||M<this._source.maxzoom&&(Ut[Re.key]=Re)}this._retainLoadedChildren(Ut,M,ht,U);for(var cr=0,ur=E;cr<ur.length;cr+=1){var Er=ur[cr],nr=this._tiles[Er.key];if(!nr.hasData()){if(M+1>this._source.maxzoom){var wr=Er.children(this._source.maxzoom)[0],Ir=this.getTile(wr);if(Ir&&Ir.hasData()){U[wr.key]=wr;continue}}else{var $r=Er.children(this._source.maxzoom);if(U[$r[0].key]&&U[$r[1].key]&&U[$r[2].key]&&U[$r[3].key])continue}for(var gn=nr.wasRequested(),dn=Er.overscaledZ-1;dn>=$;--dn){var xn=Er.scaledTo(dn);if(H[xn.key]||(H[xn.key]=!0,!(nr=this.getTile(xn))&&gn&&(nr=this._addTile(xn)),nr&&(U[xn.key]=xn,gn=nr.wasRequested(),nr.hasData())))break}}}return U},C.prototype._updateLoadedParentTileCache=function(){for(var E in this._loadedParentTiles={},this._tiles){for(var M=[],U=void 0,H=this._tiles[E].tileID;H.overscaledZ>0;){if(H.key in this._loadedParentTiles){U=this._loadedParentTiles[H.key];break}M.push(H.key);var $=H.scaledTo(H.overscaledZ-1);if(U=this._getLoadedTile($))break;H=$}for(var ht=0,Ut=M;ht<Ut.length;ht+=1)this._loadedParentTiles[Ut[ht]]=U}},C.prototype._addTile=function(E){var M=this._tiles[E.key];if(M)return M;(M=this._cache.getAndRemove(E))&&(this._setTileReloadTimer(E.key,M),M.tileID=E,this._state.initializeTileState(M,this.map?this.map.painter:null),this._cacheTimers[E.key]&&(clearTimeout(this._cacheTimers[E.key]),delete this._cacheTimers[E.key],this._setTileReloadTimer(E.key,M)));var U=Boolean(M);return U||(M=new k.Tile(E,this._source.tileSize*E.overscaleFactor()),this._loadTile(M,this._tileLoaded.bind(this,M,E.key,M.state))),M?(M.uses++,this._tiles[E.key]=M,U||this._source.fire(new k.Event("dataloading",{tile:M,coord:M.tileID,dataType:"source"})),M):null},C.prototype._setTileReloadTimer=function(E,M){var U=this;E in this._timers&&(clearTimeout(this._timers[E]),delete this._timers[E]);var H=M.getExpiryTimeout();H&&(this._timers[E]=setTimeout(function(){U._reloadTile(E,"expired"),delete U._timers[E]},H))},C.prototype._removeTile=function(E){var M=this._tiles[E];M&&(M.uses--,delete this._tiles[E],this._timers[E]&&(clearTimeout(this._timers[E]),delete this._timers[E]),M.uses>0||(M.hasData()&&M.state!=="reloading"?this._cache.add(M.tileID,M,M.getExpiryTimeout()):(M.aborted=!0,this._abortTile(M),this._unloadTile(M))))},C.prototype.clearTiles=function(){for(var E in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(E);this._cache.reset()},C.prototype.tilesIn=function(E,M,U){var H=this,$=[],ht=this.transform;if(!ht)return $;for(var Ut=U?ht.getCameraQueryGeometry(E):E,re=E.map(function(dn){return ht.pointCoordinate(dn)}),Fe=Ut.map(function(dn){return ht.pointCoordinate(dn)}),Re=this.getIds(),De=1/0,cr=1/0,ur=-1/0,Er=-1/0,nr=0,wr=Fe;nr<wr.length;nr+=1){var Ir=wr[nr];De=Math.min(De,Ir.x),cr=Math.min(cr,Ir.y),ur=Math.max(ur,Ir.x),Er=Math.max(Er,Ir.y)}for(var $r=function(dn){var xn=H._tiles[Re[dn]];if(!xn.holdingForFade()){var Un=xn.tileID,yi=Math.pow(2,ht.zoom-xn.tileID.overscaledZ),ui=M*xn.queryPadding*k.EXTENT/xn.tileSize/yi,Bi=[Un.getTilePoint(new k.MercatorCoordinate(De,cr)),Un.getTilePoint(new k.MercatorCoordinate(ur,Er))];if(Bi[0].x-ui<k.EXTENT&&Bi[0].y-ui<k.EXTENT&&Bi[1].x+ui>=0&&Bi[1].y+ui>=0){var sa=re.map(function(ha){return Un.getTilePoint(ha)}),ua=Fe.map(function(ha){return Un.getTilePoint(ha)});$.push({tile:xn,tileID:Un,queryGeometry:sa,cameraQueryGeometry:ua,scale:yi})}}},gn=0;gn<Re.length;gn++)$r(gn);return $},C.prototype.getVisibleCoordinates=function(E){for(var M=this,U=this.getRenderableIds(E).map(function(Ut){return M._tiles[Ut].tileID}),H=0,$=U;H<$.length;H+=1){var ht=$[H];ht.posMatrix=this.transform.calculatePosMatrix(ht.toUnwrapped())}return U},C.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(In(this._source.type))for(var E in this._tiles){var M=this._tiles[E];if(M.fadeEndTime!==void 0&&M.fadeEndTime>=k.browser.now())return!0}return!1},C.prototype.setFeatureState=function(E,M,U){this._state.updateState(E=E||"_geojsonTileLayer",M,U)},C.prototype.removeFeatureState=function(E,M,U){this._state.removeFeatureState(E=E||"_geojsonTileLayer",M,U)},C.prototype.getFeatureState=function(E,M){return this._state.getState(E=E||"_geojsonTileLayer",M)},C.prototype.setDependencies=function(E,M,U){var H=this._tiles[E];H&&H.setDependencies(M,U)},C.prototype.reloadTilesForDependencies=function(E,M){for(var U in this._tiles)this._tiles[U].hasDependency(E,M)&&this._reloadTile(U,"reloading");this._cache.filter(function(H){return!H.hasDependency(E,M)})},C}(k.Evented);function Hr(x,C){var E=Math.abs(2*x.wrap)-+(x.wrap<0),M=Math.abs(2*C.wrap)-+(C.wrap<0);return x.overscaledZ-C.overscaledZ||M-E||C.canonical.y-x.canonical.y||C.canonical.x-x.canonical.x}function In(x){return x==="raster"||x==="image"||x==="video"}function nn(){return new k.window.Worker(xh.workerUrl)}ir.maxOverzooming=10,ir.maxUnderzooming=3;var Yr="mapboxgl_preloaded_worker_pool",On=function(){this.active={}};On.prototype.acquire=function(x){if(!this.workers)for(this.workers=[];this.workers.length<On.workerCount;)this.workers.push(new nn);return this.active[x]=!0,this.workers.slice()},On.prototype.release=function(x){delete this.active[x],this.numActive()===0&&(this.workers.forEach(function(C){C.terminate()}),this.workers=null)},On.prototype.isPreloaded=function(){return!!this.active[Yr]},On.prototype.numActive=function(){return Object.keys(this.active).length};var bi,Mi=Math.floor(k.browser.hardwareConcurrency/2);function tn(){return bi||(bi=new On),bi}function mi(x,C){var E={};for(var M in x)M!=="ref"&&(E[M]=x[M]);return k.refProperties.forEach(function(U){U in C&&(E[U]=C[U])}),E}function Yn(x){x=x.slice();for(var C=Object.create(null),E=0;E<x.length;E++)C[x[E].id]=x[E];for(var M=0;M<x.length;M++)"ref"in x[M]&&(x[M]=mi(x[M],C[x[M].ref]));return x}On.workerCount=Math.max(Math.min(Mi,6),1);var fi={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function Ea(x,C,E){E.push({command:fi.addSource,args:[x,C[x]]})}function si(x,C,E){C.push({command:fi.removeSource,args:[x]}),E[x]=!0}function Ia(x,C,E,M){si(x,E,M),Ea(x,C,E)}function vo(x,C,E){var M;for(M in x[E])if(x[E].hasOwnProperty(M)&&M!=="data"&&!k.deepEqual(x[E][M],C[E][M]))return!1;for(M in C[E])if(C[E].hasOwnProperty(M)&&M!=="data"&&!k.deepEqual(x[E][M],C[E][M]))return!1;return!0}function Oa(x,C,E,M,U,H){var $;for($ in C=C||{},x=x||{})x.hasOwnProperty($)&&(k.deepEqual(x[$],C[$])||E.push({command:H,args:[M,$,C[$],U]}));for($ in C)C.hasOwnProperty($)&&!x.hasOwnProperty($)&&(k.deepEqual(x[$],C[$])||E.push({command:H,args:[M,$,C[$],U]}))}function Ha(x){return x.id}function wa(x,C){return x[C.id]=C,x}var ya=function(x,C){this.reset(x,C)};ya.prototype.reset=function(x,C){this.points=x||[],this._distances=[0];for(var E=1;E<this.points.length;E++)this._distances[E]=this._distances[E-1]+this.points[E].dist(this.points[E-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(C||0,.5*this.length),this.paddedLength=this.length-2*this.padding},ya.prototype.lerp=function(x){if(this.points.length===1)return this.points[0];x=k.clamp(x,0,1);for(var C=1,E=this._distances[C],M=x*this.paddedLength+this.padding;E<M&&C<this._distances.length;)E=this._distances[++C];var U=C-1,H=this._distances[U],$=E-H,ht=$>0?(M-H)/$:0;return this.points[U].mult(1-ht).add(this.points[C].mult(ht))};var Qa=function(x,C,E){var M=this.boxCells=[],U=this.circleCells=[];this.xCellCount=Math.ceil(x/E),this.yCellCount=Math.ceil(C/E);for(var H=0;H<this.xCellCount*this.yCellCount;H++)M.push([]),U.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=x,this.height=C,this.xScale=this.xCellCount/x,this.yScale=this.yCellCount/C,this.boxUid=0,this.circleUid=0};function Wo(x,C,E,M,U){var H=k.create();return C?(k.scale(H,H,[1/U,1/U,1]),E||k.rotateZ(H,H,M.angle)):k.multiply(H,M.labelPlaneMatrix,x),H}function yo(x,C,E,M,U){if(C){var H=k.clone(x);return k.scale(H,H,[U,U,1]),E||k.rotateZ(H,H,-M.angle),H}return M.glCoordMatrix}function Va(x,C){var E=[x.x,x.y,0,1];kn(E,E,C);var M=E[3];return{point:new k.Point(E[0]/M,E[1]/M),signedDistanceFromCamera:M}}function Ya(x,C){return .5+x/C*.5}function No(x,C){var E=x[0]/x[3],M=x[1]/x[3];return E>=-C[0]&&E<=C[0]&&M>=-C[1]&&M<=C[1]}function Nu(x,C,E,M,U,H,$,ht){var Ut=M?x.textSizeData:x.iconSizeData,re=k.evaluateSizeForZoom(Ut,E.transform.zoom),Fe=[256/E.width*2+1,256/E.height*2+1],Re=M?x.text.dynamicLayoutVertexArray:x.icon.dynamicLayoutVertexArray;Re.clear();for(var De=x.lineVertexArray,cr=M?x.text.placedSymbolArray:x.icon.placedSymbolArray,ur=E.transform.width/E.transform.height,Er=!1,nr=0;nr<cr.length;nr++){var wr=cr.get(nr);if(wr.hidden||wr.writingMode===k.WritingMode.vertical&&!Er)rn(wr.numGlyphs,Re);else{Er=!1;var Ir=[wr.anchorX,wr.anchorY,0,1];if(k.transformMat4(Ir,Ir,C),No(Ir,Fe)){var $r=Ya(E.transform.cameraToCenterDistance,Ir[3]),gn=k.evaluateSizeForFeature(Ut,re,wr),dn=$?gn/$r:gn*$r,xn=new k.Point(wr.anchorX,wr.anchorY),Un=Va(xn,U).point,yi={},ui=rr(wr,dn,!1,ht,C,U,H,x.glyphOffsetArray,De,Re,Un,xn,yi,ur);Er=ui.useVertical,(ui.notEnoughRoom||Er||ui.needsFlipping&&rr(wr,dn,!0,ht,C,U,H,x.glyphOffsetArray,De,Re,Un,xn,yi,ur).notEnoughRoom)&&rn(wr.numGlyphs,Re)}else rn(wr.numGlyphs,Re)}}M?x.text.dynamicLayoutVertexBuffer.updateData(Re):x.icon.dynamicLayoutVertexBuffer.updateData(Re)}function ts(x,C,E,M,U,H,$,ht,Ut,re,Fe){var Re=ht.glyphStartIndex+ht.numGlyphs,De=ht.lineStartIndex,cr=ht.lineStartIndex+ht.lineLength,ur=C.getoffsetX(ht.glyphStartIndex),Er=C.getoffsetX(Re-1),nr=Ve(x*ur,E,M,U,H,$,ht.segment,De,cr,Ut,re,Fe);if(!nr)return null;var wr=Ve(x*Er,E,M,U,H,$,ht.segment,De,cr,Ut,re,Fe);return wr?{first:nr,last:wr}:null}function bo(x,C,E,M){return x===k.WritingMode.horizontal&&Math.abs(E.y-C.y)>Math.abs(E.x-C.x)*M?{useVertical:!0}:(x===k.WritingMode.vertical?C.y<E.y:C.x>E.x)?{needsFlipping:!0}:null}function rr(x,C,E,M,U,H,$,ht,Ut,re,Fe,Re,De,cr){var ur,Er=C/24,nr=x.lineOffsetX*Er,wr=x.lineOffsetY*Er;if(x.numGlyphs>1){var Ir=x.glyphStartIndex+x.numGlyphs,$r=x.lineStartIndex,gn=x.lineStartIndex+x.lineLength,dn=ts(Er,ht,nr,wr,E,Fe,Re,x,Ut,H,De);if(!dn)return{notEnoughRoom:!0};var xn=Va(dn.first.point,$).point,Un=Va(dn.last.point,$).point;if(M&&!E){var yi=bo(x.writingMode,xn,Un,cr);if(yi)return yi}ur=[dn.first];for(var ui=x.glyphStartIndex+1;ui<Ir-1;ui++)ur.push(Ve(Er*ht.getoffsetX(ui),nr,wr,E,Fe,Re,x.segment,$r,gn,Ut,H,De));ur.push(dn.last)}else{if(M&&!E){var Bi=Va(Re,U).point,sa=x.lineStartIndex+x.segment+1,ua=new k.Point(Ut.getx(sa),Ut.gety(sa)),ha=Va(ua,U),uo=ha.signedDistanceFromCamera>0?ha.point:de(Re,ua,Bi,1,U),Ni=bo(x.writingMode,Bi,uo,cr);if(Ni)return Ni}var La=Ve(Er*ht.getoffsetX(x.glyphStartIndex),nr,wr,E,Fe,Re,x.segment,x.lineStartIndex,x.lineStartIndex+x.lineLength,Ut,H,De);if(!La)return{notEnoughRoom:!0};ur=[La]}for(var Ra=0,Ta=ur;Ra<Ta.length;Ra+=1){var _a=Ta[Ra];k.addDynamicAttributes(re,_a.point,_a.angle)}return{}}function de(x,C,E,M,U){var H=Va(x.add(x.sub(C)._unit()),U).point,$=E.sub(H);return E.add($._mult(M/$.mag()))}function Ve(x,C,E,M,U,H,$,ht,Ut,re,Fe,Re){var De=M?x-C:x+C,cr=De>0?1:-1,ur=0;M&&(cr*=-1,ur=Math.PI),cr<0&&(ur+=Math.PI);for(var Er=cr>0?ht+$:ht+$+1,nr=U,wr=U,Ir=0,$r=0,gn=Math.abs(De),dn=[];Ir+$r<=gn;){if((Er+=cr)<ht||Er>=Ut)return null;if(wr=nr,dn.push(nr),(nr=Re[Er])===void 0){var xn=new k.Point(re.getx(Er),re.gety(Er)),Un=Va(xn,Fe);if(Un.signedDistanceFromCamera>0)nr=Re[Er]=Un.point;else{var yi=Er-cr;nr=de(Ir===0?H:new k.Point(re.getx(yi),re.gety(yi)),xn,wr,gn-Ir+1,Fe)}}Ir+=$r,$r=wr.dist(nr)}var ui=(gn-Ir)/$r,Bi=nr.sub(wr),sa=Bi.mult(ui)._add(wr);sa._add(Bi._unit()._perp()._mult(E*cr));var ua=ur+Math.atan2(nr.y-wr.y,nr.x-wr.x);return dn.push(sa),{point:sa,angle:ua,path:dn}}Qa.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Qa.prototype.insert=function(x,C,E,M,U){this._forEachCell(C,E,M,U,this._insertBoxCell,this.boxUid++),this.boxKeys.push(x),this.bboxes.push(C),this.bboxes.push(E),this.bboxes.push(M),this.bboxes.push(U)},Qa.prototype.insertCircle=function(x,C,E,M){this._forEachCell(C-M,E-M,C+M,E+M,this._insertCircleCell,this.circleUid++),this.circleKeys.push(x),this.circles.push(C),this.circles.push(E),this.circles.push(M)},Qa.prototype._insertBoxCell=function(x,C,E,M,U,H){this.boxCells[U].push(H)},Qa.prototype._insertCircleCell=function(x,C,E,M,U,H){this.circleCells[U].push(H)},Qa.prototype._query=function(x,C,E,M,U,H){if(E<0||x>this.width||M<0||C>this.height)return!U&&[];var $=[];if(x<=0&&C<=0&&this.width<=E&&this.height<=M){if(U)return!0;for(var ht=0;ht<this.boxKeys.length;ht++)$.push({key:this.boxKeys[ht],x1:this.bboxes[4*ht],y1:this.bboxes[4*ht+1],x2:this.bboxes[4*ht+2],y2:this.bboxes[4*ht+3]});for(var Ut=0;Ut<this.circleKeys.length;Ut++){var re=this.circles[3*Ut],Fe=this.circles[3*Ut+1],Re=this.circles[3*Ut+2];$.push({key:this.circleKeys[Ut],x1:re-Re,y1:Fe-Re,x2:re+Re,y2:Fe+Re})}return H?$.filter(H):$}return this._forEachCell(x,C,E,M,this._queryCell,$,{hitTest:U,seenUids:{box:{},circle:{}}},H),U?$.length>0:$},Qa.prototype._queryCircle=function(x,C,E,M,U){var H=x-E,$=x+E,ht=C-E,Ut=C+E;if($<0||H>this.width||Ut<0||ht>this.height)return!M&&[];var re=[];return this._forEachCell(H,ht,$,Ut,this._queryCellCircle,re,{hitTest:M,circle:{x,y:C,radius:E},seenUids:{box:{},circle:{}}},U),M?re.length>0:re},Qa.prototype.query=function(x,C,E,M,U){return this._query(x,C,E,M,!1,U)},Qa.prototype.hitTest=function(x,C,E,M,U){return this._query(x,C,E,M,!0,U)},Qa.prototype.hitTestCircle=function(x,C,E,M){return this._queryCircle(x,C,E,!0,M)},Qa.prototype._queryCell=function(x,C,E,M,U,H,$,ht){var Ut=$.seenUids,re=this.boxCells[U];if(re!==null)for(var Fe=this.bboxes,Re=0,De=re;Re<De.length;Re+=1){var cr=De[Re];if(!Ut.box[cr]){Ut.box[cr]=!0;var ur=4*cr;if(x<=Fe[ur+2]&&C<=Fe[ur+3]&&E>=Fe[ur+0]&&M>=Fe[ur+1]&&(!ht||ht(this.boxKeys[cr]))){if($.hitTest)return H.push(!0),!0;H.push({key:this.boxKeys[cr],x1:Fe[ur],y1:Fe[ur+1],x2:Fe[ur+2],y2:Fe[ur+3]})}}}var Er=this.circleCells[U];if(Er!==null)for(var nr=this.circles,wr=0,Ir=Er;wr<Ir.length;wr+=1){var $r=Ir[wr];if(!Ut.circle[$r]){Ut.circle[$r]=!0;var gn=3*$r;if(this._circleAndRectCollide(nr[gn],nr[gn+1],nr[gn+2],x,C,E,M)&&(!ht||ht(this.circleKeys[$r]))){if($.hitTest)return H.push(!0),!0;var dn=nr[gn],xn=nr[gn+1],Un=nr[gn+2];H.push({key:this.circleKeys[$r],x1:dn-Un,y1:xn-Un,x2:dn+Un,y2:xn+Un})}}}},Qa.prototype._queryCellCircle=function(x,C,E,M,U,H,$,ht){var Ut=$.circle,re=$.seenUids,Fe=this.boxCells[U];if(Fe!==null)for(var Re=this.bboxes,De=0,cr=Fe;De<cr.length;De+=1){var ur=cr[De];if(!re.box[ur]){re.box[ur]=!0;var Er=4*ur;if(this._circleAndRectCollide(Ut.x,Ut.y,Ut.radius,Re[Er+0],Re[Er+1],Re[Er+2],Re[Er+3])&&(!ht||ht(this.boxKeys[ur])))return H.push(!0),!0}}var nr=this.circleCells[U];if(nr!==null)for(var wr=this.circles,Ir=0,$r=nr;Ir<$r.length;Ir+=1){var gn=$r[Ir];if(!re.circle[gn]){re.circle[gn]=!0;var dn=3*gn;if(this._circlesCollide(wr[dn],wr[dn+1],wr[dn+2],Ut.x,Ut.y,Ut.radius)&&(!ht||ht(this.circleKeys[gn])))return H.push(!0),!0}}},Qa.prototype._forEachCell=function(x,C,E,M,U,H,$,ht){for(var Ut=this._convertToXCellCoord(x),re=this._convertToYCellCoord(C),Fe=this._convertToXCellCoord(E),Re=this._convertToYCellCoord(M),De=Ut;De<=Fe;De++)for(var cr=re;cr<=Re;cr++)if(U.call(this,x,C,E,M,this.xCellCount*cr+De,H,$,ht))return},Qa.prototype._convertToXCellCoord=function(x){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(x*this.xScale)))},Qa.prototype._convertToYCellCoord=function(x){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(x*this.yScale)))},Qa.prototype._circlesCollide=function(x,C,E,M,U,H){var $=M-x,ht=U-C,Ut=E+H;return Ut*Ut>$*$+ht*ht},Qa.prototype._circleAndRectCollide=function(x,C,E,M,U,H,$){var ht=(H-M)/2,Ut=Math.abs(x-(M+ht));if(Ut>ht+E)return!1;var re=($-U)/2,Fe=Math.abs(C-(U+re));if(Fe>re+E)return!1;if(Ut<=ht||Fe<=re)return!0;var Re=Ut-ht,De=Fe-re;return Re*Re+De*De<=E*E};var Mr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function rn(x,C){for(var E=0;E<x;E++){var M=C.length;C.resize(M+4),C.float32.set(Mr,3*M)}}function kn(x,C,E){var M=C[0],U=C[1];return x[0]=E[0]*M+E[4]*U+E[12],x[1]=E[1]*M+E[5]*U+E[13],x[3]=E[3]*M+E[7]*U+E[15],x}var $n=function(x,C,E){C===void 0&&(C=new Qa(x.width+200,x.height+200,25)),E===void 0&&(E=new Qa(x.width+200,x.height+200,25)),this.transform=x,this.grid=C,this.ignoredGrid=E,this.pitchfactor=Math.cos(x._pitch)*x.cameraToCenterDistance,this.screenRightBoundary=x.width+100,this.screenBottomBoundary=x.height+100,this.gridRightBoundary=x.width+200,this.gridBottomBoundary=x.height+200};function Cn(x,C,E){return C*(k.EXTENT/(x.tileSize*Math.pow(2,E-x.tileID.overscaledZ)))}$n.prototype.placeCollisionBox=function(x,C,E,M,U){var H=this.projectAndGetPerspectiveRatio(M,x.anchorPointX,x.anchorPointY),$=E*H.perspectiveRatio,ht=x.x1*$+H.point.x,Ut=x.y1*$+H.point.y,re=x.x2*$+H.point.x,Fe=x.y2*$+H.point.y;return!this.isInsideGrid(ht,Ut,re,Fe)||!C&&this.grid.hitTest(ht,Ut,re,Fe,U)?{box:[],offscreen:!1}:{box:[ht,Ut,re,Fe],offscreen:this.isOffscreen(ht,Ut,re,Fe)}},$n.prototype.placeCollisionCircles=function(x,C,E,M,U,H,$,ht,Ut,re,Fe,Re,De){var cr=[],ur=new k.Point(C.anchorX,C.anchorY),Er=Va(ur,H),nr=Ya(this.transform.cameraToCenterDistance,Er.signedDistanceFromCamera),wr=(re?U/nr:U*nr)/k.ONE_EM,Ir=Va(ur,$).point,$r=ts(wr,M,C.lineOffsetX*wr,C.lineOffsetY*wr,!1,Ir,ur,C,E,$,{}),gn=!1,dn=!1,xn=!0;if($r){for(var Un=.5*Re*nr+De,yi=new k.Point(-100,-100),ui=new k.Point(this.screenRightBoundary,this.screenBottomBoundary),Bi=new ya,sa=$r.first,ua=$r.last,ha=[],uo=sa.path.length-1;uo>=1;uo--)ha.push(sa.path[uo]);for(var Ni=1;Ni<ua.path.length;Ni++)ha.push(ua.path[Ni]);var La=2.5*Un;if(ht){var Ra=ha.map(function(Yl){return Va(Yl,ht)});ha=Ra.some(function(Yl){return Yl.signedDistanceFromCamera<=0})?[]:Ra.map(function(Yl){return Yl.point})}var Ta=[];if(ha.length>0){for(var _a=ha[0].clone(),za=ha[0].clone(),xa=1;xa<ha.length;xa++)_a.x=Math.min(_a.x,ha[xa].x),_a.y=Math.min(_a.y,ha[xa].y),za.x=Math.max(za.x,ha[xa].x),za.y=Math.max(za.y,ha[xa].y);Ta=_a.x>=yi.x&&za.x<=ui.x&&_a.y>=yi.y&&za.y<=ui.y?[ha]:za.x<yi.x||_a.x>ui.x||za.y<yi.y||_a.y>ui.y?[]:k.clipLine([ha],yi.x,yi.y,ui.x,ui.y)}for(var ga=0,Qs=Ta;ga<Qs.length;ga+=1){var As;Bi.reset(Qs[ga],.25*Un),As=Bi.length<=.5*Un?1:Math.ceil(Bi.paddedLength/La)+1;for(var mu=0;mu<As;mu++){var yu=mu/Math.max(As-1,1),ss=Bi.lerp(yu),Ms=ss.x+100,el=ss.y+100;cr.push(Ms,el,Un,0);var Xs=Ms-Un,oc=el-Un,rl=Ms+Un,Zo=el+Un;if(xn=xn&&this.isOffscreen(Xs,oc,rl,Zo),dn=dn||this.isInsideGrid(Xs,oc,rl,Zo),!x&&this.grid.hitTestCircle(Ms,el,Un,Fe)&&(gn=!0,!Ut))return{circles:[],offscreen:!1,collisionDetected:gn}}}}return{circles:!Ut&&gn||!dn?[]:cr,offscreen:xn,collisionDetected:gn}},$n.prototype.queryRenderedSymbols=function(x){if(x.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var C=[],E=1/0,M=1/0,U=-1/0,H=-1/0,$=0,ht=x;$<ht.length;$+=1){var Ut=ht[$],re=new k.Point(Ut.x+100,Ut.y+100);E=Math.min(E,re.x),M=Math.min(M,re.y),U=Math.max(U,re.x),H=Math.max(H,re.y),C.push(re)}for(var Fe={},Re={},De=0,cr=this.grid.query(E,M,U,H).concat(this.ignoredGrid.query(E,M,U,H));De<cr.length;De+=1){var ur=cr[De],Er=ur.key;if(Fe[Er.bucketInstanceId]===void 0&&(Fe[Er.bucketInstanceId]={}),!Fe[Er.bucketInstanceId][Er.featureIndex]){var nr=[new k.Point(ur.x1,ur.y1),new k.Point(ur.x2,ur.y1),new k.Point(ur.x2,ur.y2),new k.Point(ur.x1,ur.y2)];k.polygonIntersectsPolygon(C,nr)&&(Fe[Er.bucketInstanceId][Er.featureIndex]=!0,Re[Er.bucketInstanceId]===void 0&&(Re[Er.bucketInstanceId]=[]),Re[Er.bucketInstanceId].push(Er.featureIndex))}}return Re},$n.prototype.insertCollisionBox=function(x,C,E,M,U){(C?this.ignoredGrid:this.grid).insert({bucketInstanceId:E,featureIndex:M,collisionGroupID:U},x[0],x[1],x[2],x[3])},$n.prototype.insertCollisionCircles=function(x,C,E,M,U){for(var H=C?this.ignoredGrid:this.grid,$={bucketInstanceId:E,featureIndex:M,collisionGroupID:U},ht=0;ht<x.length;ht+=4)H.insertCircle($,x[ht],x[ht+1],x[ht+2])},$n.prototype.projectAndGetPerspectiveRatio=function(x,C,E){var M=[C,E,0,1];return kn(M,M,x),{point:new k.Point((M[0]/M[3]+1)/2*this.transform.width+100,(-M[1]/M[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/M[3]*.5}},$n.prototype.isOffscreen=function(x,C,E,M){return E<100||x>=this.screenRightBoundary||M<100||C>this.screenBottomBoundary},$n.prototype.isInsideGrid=function(x,C,E,M){return E>=0&&x<this.gridRightBoundary&&M>=0&&C<this.gridBottomBoundary},$n.prototype.getViewportMatrix=function(){var x=k.identity([]);return k.translate(x,x,[-100,-100,0]),x};var Ki=function(x,C,E,M){this.opacity=x?Math.max(0,Math.min(1,x.opacity+(x.placed?C:-C))):M&&E?1:0,this.placed=E};Ki.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var Fa=function(x,C,E,M,U){this.text=new Ki(x?x.text:null,C,E,U),this.icon=new Ki(x?x.icon:null,C,M,U)};Fa.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var Ss=function(x,C,E){this.text=x,this.icon=C,this.skipFade=E},ko=function(){this.invProjMatrix=k.create(),this.viewportMatrix=k.create(),this.circles=[]},zo=function(x,C,E,M,U){this.bucketInstanceId=x,this.featureIndex=C,this.sourceLayerIndex=E,this.bucketIndex=M,this.tileID=U},oo=function(x){this.crossSourceCollisions=x,this.maxGroupID=0,this.collisionGroups={}};function Xo(x,C,E,M,U){var H=k.getAnchorAlignment(x),$=-(H.horizontalAlign-.5)*C,ht=-(H.verticalAlign-.5)*E,Ut=k.evaluateVariableOffset(x,M);return new k.Point($+Ut[0]*U,ht+Ut[1]*U)}function iu(x,C,E,M,U,H){var $=x.x1,ht=x.x2,Ut=x.y1,re=x.y2,Fe=x.anchorPointX,Re=x.anchorPointY,De=new k.Point(C,E);return M&&De._rotate(U?H:-H),{x1:$+De.x,y1:Ut+De.y,x2:ht+De.x,y2:re+De.y,anchorPointX:Fe,anchorPointY:Re}}oo.prototype.get=function(x){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[x]){var C=++this.maxGroupID;this.collisionGroups[x]={ID:C,predicate:function(E){return E.collisionGroupID===C}}}return this.collisionGroups[x]};var Ko=function(x,C,E,M){this.transform=x.clone(),this.collisionIndex=new $n(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=C,this.retainedQueryData={},this.collisionGroups=new oo(E),this.collisionCircleArrays={},this.prevPlacement=M,M&&(M.prevPlacement=void 0),this.placedOrientations={}};function Ul(x,C,E,M,U){x.emplaceBack(C?1:0,E?1:0,M||0,U||0),x.emplaceBack(C?1:0,E?1:0,M||0,U||0),x.emplaceBack(C?1:0,E?1:0,M||0,U||0),x.emplaceBack(C?1:0,E?1:0,M||0,U||0)}Ko.prototype.getBucketParts=function(x,C,E,M){var U=E.getBucket(C),H=E.latestFeatureIndex;if(U&&H&&C.id===U.layerIds[0]){var $=E.collisionBoxArray,ht=U.layers[0].layout,Ut=Math.pow(2,this.transform.zoom-E.tileID.overscaledZ),re=E.tileSize/k.EXTENT,Fe=this.transform.calculatePosMatrix(E.tileID.toUnwrapped()),Re=ht.get("text-pitch-alignment")==="map",De=ht.get("text-rotation-alignment")==="map",cr=Cn(E,1,this.transform.zoom),ur=Wo(Fe,Re,De,this.transform,cr),Er=null;if(Re){var nr=yo(Fe,Re,De,this.transform,cr);Er=k.multiply([],this.transform.labelPlaneMatrix,nr)}this.retainedQueryData[U.bucketInstanceId]=new zo(U.bucketInstanceId,H,U.sourceLayerIndex,U.index,E.tileID);var wr={bucket:U,layout:ht,posMatrix:Fe,textLabelPlaneMatrix:ur,labelToScreenMatrix:Er,scale:Ut,textPixelRatio:re,holdingForFade:E.holdingForFade(),collisionBoxArray:$,partiallyEvaluatedTextSize:k.evaluateSizeForZoom(U.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(U.sourceID)};if(M)for(var Ir=0,$r=U.sortKeyRanges;Ir<$r.length;Ir+=1){var gn=$r[Ir];x.push({sortKey:gn.sortKey,symbolInstanceStart:gn.symbolInstanceStart,symbolInstanceEnd:gn.symbolInstanceEnd,parameters:wr})}else x.push({symbolInstanceStart:0,symbolInstanceEnd:U.symbolInstances.length,parameters:wr})}},Ko.prototype.attemptAnchorPlacement=function(x,C,E,M,U,H,$,ht,Ut,re,Fe,Re,De,cr,ur){var Er,nr=[Re.textOffset0,Re.textOffset1],wr=Xo(x,E,M,nr,U),Ir=this.collisionIndex.placeCollisionBox(iu(C,wr.x,wr.y,H,$,this.transform.angle),Fe,ht,Ut,re.predicate);if(!ur||this.collisionIndex.placeCollisionBox(iu(ur,wr.x,wr.y,H,$,this.transform.angle),Fe,ht,Ut,re.predicate).box.length!==0)return Ir.box.length>0?(this.prevPlacement&&this.prevPlacement.variableOffsets[Re.crossTileID]&&this.prevPlacement.placements[Re.crossTileID]&&this.prevPlacement.placements[Re.crossTileID].text&&(Er=this.prevPlacement.variableOffsets[Re.crossTileID].anchor),this.variableOffsets[Re.crossTileID]={textOffset:nr,width:E,height:M,anchor:x,textBoxScale:U,prevAnchor:Er},this.markUsedJustification(De,x,Re,cr),De.allowVerticalPlacement&&(this.markUsedOrientation(De,cr,Re),this.placedOrientations[Re.crossTileID]=cr),{shift:wr,placedGlyphBoxes:Ir}):void 0},Ko.prototype.placeLayerBucketPart=function(x,C,E){var M=this,U=x.parameters,H=U.bucket,$=U.layout,ht=U.posMatrix,Ut=U.textLabelPlaneMatrix,re=U.labelToScreenMatrix,Fe=U.textPixelRatio,Re=U.holdingForFade,De=U.collisionBoxArray,cr=U.partiallyEvaluatedTextSize,ur=U.collisionGroup,Er=$.get("text-optional"),nr=$.get("icon-optional"),wr=$.get("text-allow-overlap"),Ir=$.get("icon-allow-overlap"),$r=$.get("text-rotation-alignment")==="map",gn=$.get("text-pitch-alignment")==="map",dn=$.get("icon-text-fit")!=="none",xn=$.get("symbol-z-order")==="viewport-y",Un=wr&&(Ir||!H.hasIconData()||nr),yi=Ir&&(wr||!H.hasTextData()||Er);!H.collisionArrays&&De&&H.deserializeCollisionBoxes(De);var ui=function(Ni,La){if(!C[Ni.crossTileID])if(Re)M.placements[Ni.crossTileID]=new Ss(!1,!1,!1);else{var Ra,Ta=!1,_a=!1,za=!0,xa=null,ga={box:null,offscreen:null},Qs={box:null,offscreen:null},As=null,mu=null,yu=0,ss=0,Ms=0;La.textFeatureIndex?yu=La.textFeatureIndex:Ni.useRuntimeCollisionCircles&&(yu=Ni.featureIndex),La.verticalTextFeatureIndex&&(ss=La.verticalTextFeatureIndex);var el=La.textBox;if(el){var Xs=function(Co){var Fl=k.WritingMode.horizontal;if(H.allowVerticalPlacement&&!Co&&M.prevPlacement){var nl=M.prevPlacement.placedOrientations[Ni.crossTileID];nl&&(M.placedOrientations[Ni.crossTileID]=nl,M.markUsedOrientation(H,Fl=nl,Ni))}return Fl},oc=function(Co,Fl){if(H.allowVerticalPlacement&&Ni.numVerticalGlyphVertices>0&&La.verticalTextBox)for(var nl=0,of=H.writingModes;nl<of.length&&(of[nl]===k.WritingMode.vertical?(ga=Fl(),Qs=ga):ga=Co(),!(ga&&ga.box&&ga.box.length));nl+=1);else ga=Co()};if($.get("text-variable-anchor")){var rl=$.get("text-variable-anchor");if(M.prevPlacement&&M.prevPlacement.variableOffsets[Ni.crossTileID]){var Zo=M.prevPlacement.variableOffsets[Ni.crossTileID];rl.indexOf(Zo.anchor)>0&&(rl=rl.filter(function(Co){return Co!==Zo.anchor})).unshift(Zo.anchor)}var Yl=function(Co,Fl,nl){for(var of=Co.x2-Co.x1,bh=Co.y2-Co.y1,qf=Ni.textBoxScale,$h=dn&&!Ir?Fl:null,Js={box:[],offscreen:!1},Rl=wr?2*rl.length:rl.length,pl=0;pl<Rl;++pl){var wc=M.attemptAnchorPlacement(rl[pl%rl.length],Co,of,bh,qf,$r,gn,Fe,ht,ur,pl>=rl.length,Ni,H,nl,$h);if(wc&&(Js=wc.placedGlyphBoxes)&&Js.box&&Js.box.length){Ta=!0,xa=wc.shift;break}}return Js};oc(function(){return Yl(el,La.iconBox,k.WritingMode.horizontal)},function(){var Co=La.verticalTextBox;return H.allowVerticalPlacement&&!(ga&&ga.box&&ga.box.length)&&Ni.numVerticalGlyphVertices>0&&Co?Yl(Co,La.verticalIconBox,k.WritingMode.vertical):{box:null,offscreen:null}}),ga&&(Ta=ga.box,za=ga.offscreen);var sc=Xs(ga&&ga.box);if(!Ta&&M.prevPlacement){var Lu=M.prevPlacement.variableOffsets[Ni.crossTileID];Lu&&(M.variableOffsets[Ni.crossTileID]=Lu,M.markUsedJustification(H,Lu.anchor,Ni,sc))}}else{var Ec=function(Co,Fl){var nl=M.collisionIndex.placeCollisionBox(Co,wr,Fe,ht,ur.predicate);return nl&&nl.box&&nl.box.length&&(M.markUsedOrientation(H,Fl,Ni),M.placedOrientations[Ni.crossTileID]=Fl),nl};oc(function(){return Ec(el,k.WritingMode.horizontal)},function(){var Co=La.verticalTextBox;return H.allowVerticalPlacement&&Ni.numVerticalGlyphVertices>0&&Co?Ec(Co,k.WritingMode.vertical):{box:null,offscreen:null}}),Xs(ga&&ga.box&&ga.box.length)}}if(Ta=(Ra=ga)&&Ra.box&&Ra.box.length>0,za=Ra&&Ra.offscreen,Ni.useRuntimeCollisionCircles){var Pf=H.text.placedSymbolArray.get(Ni.centerJustifiedTextSymbolIndex),af=k.evaluateSizeForFeature(H.textSizeData,cr,Pf),uc=$.get("text-padding");As=M.collisionIndex.placeCollisionCircles(wr,Pf,H.lineVertexArray,H.glyphOffsetArray,af,ht,Ut,re,E,gn,ur.predicate,Ni.collisionCircleDiameter,uc),Ta=wr||As.circles.length>0&&!As.collisionDetected,za=za&&As.offscreen}if(La.iconFeatureIndex&&(Ms=La.iconFeatureIndex),La.iconBox){var $f=function(Co){var Fl=dn&&xa?iu(Co,xa.x,xa.y,$r,gn,M.transform.angle):Co;return M.collisionIndex.placeCollisionBox(Fl,Ir,Fe,ht,ur.predicate)};_a=Qs&&Qs.box&&Qs.box.length&&La.verticalIconBox?(mu=$f(La.verticalIconBox)).box.length>0:(mu=$f(La.iconBox)).box.length>0,za=za&&mu.offscreen}var lc=Er||Ni.numHorizontalGlyphVertices===0&&Ni.numVerticalGlyphVertices===0,Fs=nr||Ni.numIconVertices===0;if(lc||Fs?Fs?lc||(_a=_a&&Ta):Ta=_a&&Ta:_a=Ta=_a&&Ta,Ta&&Ra&&Ra.box&&M.collisionIndex.insertCollisionBox(Ra.box,$.get("text-ignore-placement"),H.bucketInstanceId,Qs&&Qs.box&&ss?ss:yu,ur.ID),_a&&mu&&M.collisionIndex.insertCollisionBox(mu.box,$.get("icon-ignore-placement"),H.bucketInstanceId,Ms,ur.ID),As&&(Ta&&M.collisionIndex.insertCollisionCircles(As.circles,$.get("text-ignore-placement"),H.bucketInstanceId,yu,ur.ID),E)){var Cl=H.bucketInstanceId,Al=M.collisionCircleArrays[Cl];Al===void 0&&(Al=M.collisionCircleArrays[Cl]=new ko);for(var Uc=0;Uc<As.circles.length;Uc+=4)Al.circles.push(As.circles[Uc+0]),Al.circles.push(As.circles[Uc+1]),Al.circles.push(As.circles[Uc+2]),Al.circles.push(As.collisionDetected?1:0)}M.placements[Ni.crossTileID]=new Ss(Ta||Un,_a||yi,za||H.justReloaded),C[Ni.crossTileID]=!0}};if(xn)for(var Bi=H.getSortedSymbolIndexes(this.transform.angle),sa=Bi.length-1;sa>=0;--sa){var ua=Bi[sa];ui(H.symbolInstances.get(ua),H.collisionArrays[ua])}else for(var ha=x.symbolInstanceStart;ha<x.symbolInstanceEnd;ha++)ui(H.symbolInstances.get(ha),H.collisionArrays[ha]);if(E&&H.bucketInstanceId in this.collisionCircleArrays){var uo=this.collisionCircleArrays[H.bucketInstanceId];k.invert(uo.invProjMatrix,ht),uo.viewportMatrix=this.collisionIndex.getViewportMatrix()}H.justReloaded=!1},Ko.prototype.markUsedJustification=function(x,C,E,M){var U;U=M===k.WritingMode.vertical?E.verticalPlacedTextSymbolIndex:{left:E.leftJustifiedTextSymbolIndex,center:E.centerJustifiedTextSymbolIndex,right:E.rightJustifiedTextSymbolIndex}[k.getAnchorJustification(C)];for(var H=0,$=[E.leftJustifiedTextSymbolIndex,E.centerJustifiedTextSymbolIndex,E.rightJustifiedTextSymbolIndex,E.verticalPlacedTextSymbolIndex];H<$.length;H+=1){var ht=$[H];ht>=0&&(x.text.placedSymbolArray.get(ht).crossTileID=U>=0&&ht!==U?0:E.crossTileID)}},Ko.prototype.markUsedOrientation=function(x,C,E){for(var M=C===k.WritingMode.horizontal||C===k.WritingMode.horizontalOnly?C:0,U=C===k.WritingMode.vertical?C:0,H=0,$=[E.leftJustifiedTextSymbolIndex,E.centerJustifiedTextSymbolIndex,E.rightJustifiedTextSymbolIndex];H<$.length;H+=1)x.text.placedSymbolArray.get($[H]).placedOrientation=M;E.verticalPlacedTextSymbolIndex&&(x.text.placedSymbolArray.get(E.verticalPlacedTextSymbolIndex).placedOrientation=U)},Ko.prototype.commit=function(x){this.commitTime=x,this.zoomAtLastRecencyCheck=this.transform.zoom;var C=this.prevPlacement,E=!1;this.prevZoomAdjustment=C?C.zoomAdjustment(this.transform.zoom):0;var M=C?C.symbolFadeChange(x):1,U=C?C.opacities:{},H=C?C.variableOffsets:{},$=C?C.placedOrientations:{};for(var ht in this.placements){var Ut=this.placements[ht],re=U[ht];re?(this.opacities[ht]=new Fa(re,M,Ut.text,Ut.icon),E=E||Ut.text!==re.text.placed||Ut.icon!==re.icon.placed):(this.opacities[ht]=new Fa(null,M,Ut.text,Ut.icon,Ut.skipFade),E=E||Ut.text||Ut.icon)}for(var Fe in U){var Re=U[Fe];if(!this.opacities[Fe]){var De=new Fa(Re,M,!1,!1);De.isHidden()||(this.opacities[Fe]=De,E=E||Re.text.placed||Re.icon.placed)}}for(var cr in H)this.variableOffsets[cr]||!this.opacities[cr]||this.opacities[cr].isHidden()||(this.variableOffsets[cr]=H[cr]);for(var ur in $)this.placedOrientations[ur]||!this.opacities[ur]||this.opacities[ur].isHidden()||(this.placedOrientations[ur]=$[ur]);E?this.lastPlacementChangeTime=x:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=C?C.lastPlacementChangeTime:x)},Ko.prototype.updateLayerOpacities=function(x,C){for(var E={},M=0,U=C;M<U.length;M+=1){var H=U[M],$=H.getBucket(x);$&&H.latestFeatureIndex&&x.id===$.layerIds[0]&&this.updateBucketOpacities($,E,H.collisionBoxArray)}},Ko.prototype.updateBucketOpacities=function(x,C,E){var M=this;x.hasTextData()&&x.text.opacityVertexArray.clear(),x.hasIconData()&&x.icon.opacityVertexArray.clear(),x.hasIconCollisionBoxData()&&x.iconCollisionBox.collisionVertexArray.clear(),x.hasTextCollisionBoxData()&&x.textCollisionBox.collisionVertexArray.clear();var U=x.layers[0].layout,H=new Fa(null,0,!1,!1,!0),$=U.get("text-allow-overlap"),ht=U.get("icon-allow-overlap"),Ut=U.get("text-variable-anchor"),re=U.get("text-rotation-alignment")==="map",Fe=U.get("text-pitch-alignment")==="map",Re=U.get("icon-text-fit")!=="none",De=new Fa(null,0,$&&(ht||!x.hasIconData()||U.get("icon-optional")),ht&&($||!x.hasTextData()||U.get("text-optional")),!0);!x.collisionArrays&&E&&(x.hasIconCollisionBoxData()||x.hasTextCollisionBoxData())&&x.deserializeCollisionBoxes(E);for(var cr=function(wr,Ir,$r){for(var gn=0;gn<Ir/4;gn++)wr.opacityVertexArray.emplaceBack($r)},ur=function(wr){var Ir=x.symbolInstances.get(wr),$r=Ir.numHorizontalGlyphVertices,gn=Ir.numVerticalGlyphVertices,dn=Ir.crossTileID,xn=M.opacities[dn];C[dn]?xn=H:xn||(M.opacities[dn]=xn=De),C[dn]=!0;var Un=Ir.numIconVertices>0,yi=M.placedOrientations[Ir.crossTileID],ui=yi===k.WritingMode.vertical,Bi=yi===k.WritingMode.horizontal||yi===k.WritingMode.horizontalOnly;if($r>0||gn>0){var sa=Di(xn.text);cr(x.text,$r,ui?Ba:sa),cr(x.text,gn,Bi?Ba:sa);var ua=xn.text.isHidden();[Ir.rightJustifiedTextSymbolIndex,Ir.centerJustifiedTextSymbolIndex,Ir.leftJustifiedTextSymbolIndex].forEach(function(ga){ga>=0&&(x.text.placedSymbolArray.get(ga).hidden=ua||ui?1:0)}),Ir.verticalPlacedTextSymbolIndex>=0&&(x.text.placedSymbolArray.get(Ir.verticalPlacedTextSymbolIndex).hidden=ua||Bi?1:0);var ha=M.variableOffsets[Ir.crossTileID];ha&&M.markUsedJustification(x,ha.anchor,Ir,yi);var uo=M.placedOrientations[Ir.crossTileID];uo&&(M.markUsedJustification(x,"left",Ir,uo),M.markUsedOrientation(x,uo,Ir))}if(Un){var Ni=Di(xn.icon),La=!(Re&&Ir.verticalPlacedIconSymbolIndex&&ui);Ir.placedIconSymbolIndex>=0&&(cr(x.icon,Ir.numIconVertices,La?Ni:Ba),x.icon.placedSymbolArray.get(Ir.placedIconSymbolIndex).hidden=xn.icon.isHidden()),Ir.verticalPlacedIconSymbolIndex>=0&&(cr(x.icon,Ir.numVerticalIconVertices,La?Ba:Ni),x.icon.placedSymbolArray.get(Ir.verticalPlacedIconSymbolIndex).hidden=xn.icon.isHidden())}if(x.hasIconCollisionBoxData()||x.hasTextCollisionBoxData()){var Ra=x.collisionArrays[wr];if(Ra){var Ta=new k.Point(0,0);if(Ra.textBox||Ra.verticalTextBox){var _a=!0;if(Ut){var za=M.variableOffsets[dn];za?(Ta=Xo(za.anchor,za.width,za.height,za.textOffset,za.textBoxScale),re&&Ta._rotate(Fe?M.transform.angle:-M.transform.angle)):_a=!1}Ra.textBox&&Ul(x.textCollisionBox.collisionVertexArray,xn.text.placed,!_a||ui,Ta.x,Ta.y),Ra.verticalTextBox&&Ul(x.textCollisionBox.collisionVertexArray,xn.text.placed,!_a||Bi,Ta.x,Ta.y)}var xa=Boolean(!Bi&&Ra.verticalIconBox);Ra.iconBox&&Ul(x.iconCollisionBox.collisionVertexArray,xn.icon.placed,xa,Re?Ta.x:0,Re?Ta.y:0),Ra.verticalIconBox&&Ul(x.iconCollisionBox.collisionVertexArray,xn.icon.placed,!xa,Re?Ta.x:0,Re?Ta.y:0)}}},Er=0;Er<x.symbolInstances.length;Er++)ur(Er);if(x.sortFeatures(this.transform.angle),this.retainedQueryData[x.bucketInstanceId]&&(this.retainedQueryData[x.bucketInstanceId].featureSortOrder=x.featureSortOrder),x.hasTextData()&&x.text.opacityVertexBuffer&&x.text.opacityVertexBuffer.updateData(x.text.opacityVertexArray),x.hasIconData()&&x.icon.opacityVertexBuffer&&x.icon.opacityVertexBuffer.updateData(x.icon.opacityVertexArray),x.hasIconCollisionBoxData()&&x.iconCollisionBox.collisionVertexBuffer&&x.iconCollisionBox.collisionVertexBuffer.updateData(x.iconCollisionBox.collisionVertexArray),x.hasTextCollisionBoxData()&&x.textCollisionBox.collisionVertexBuffer&&x.textCollisionBox.collisionVertexBuffer.updateData(x.textCollisionBox.collisionVertexArray),x.bucketInstanceId in this.collisionCircleArrays){var nr=this.collisionCircleArrays[x.bucketInstanceId];x.placementInvProjMatrix=nr.invProjMatrix,x.placementViewportMatrix=nr.viewportMatrix,x.collisionCircleArray=nr.circles,delete this.collisionCircleArrays[x.bucketInstanceId]}},Ko.prototype.symbolFadeChange=function(x){return this.fadeDuration===0?1:(x-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Ko.prototype.zoomAdjustment=function(x){return Math.max(0,(this.transform.zoom-x)/1.5)},Ko.prototype.hasTransitions=function(x){return this.stale||x-this.lastPlacementChangeTime<this.fadeDuration},Ko.prototype.stillRecent=function(x,C){var E=this.zoomAtLastRecencyCheck===C?1-this.zoomAdjustment(C):1;return this.zoomAtLastRecencyCheck=C,this.commitTime+this.fadeDuration*E>x},Ko.prototype.setStale=function(){this.stale=!0};var $c=Math.pow(2,25),Ku=Math.pow(2,24),Ce=Math.pow(2,17),Xe=Math.pow(2,16),Cr=Math.pow(2,9),on=Math.pow(2,8),li=Math.pow(2,1);function Di(x){if(x.opacity===0&&!x.placed)return 0;if(x.opacity===1&&x.placed)return 4294967295;var C=x.placed?1:0,E=Math.floor(127*x.opacity);return E*$c+C*Ku+E*Ce+C*Xe+E*Cr+C*on+E*li+C}var Ba=0,xs=function(x){this._sortAcrossTiles=x.layout.get("symbol-z-order")!=="viewport-y"&&x.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};xs.prototype.continuePlacement=function(x,C,E,M,U){for(var H=this._bucketParts;this._currentTileIndex<x.length;)if(C.getBucketParts(H,M,x[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,U())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,H.sort(function($,ht){return $.sortKey-ht.sortKey}));this._currentPartIndex<H.length;)if(C.placeLayerBucketPart(H[this._currentPartIndex],this._seenCrossTileIDs,E),this._currentPartIndex++,U())return!0;return!1};var es=function(x,C,E,M,U,H,$){this.placement=new Ko(x,U,H,$),this._currentPlacementIndex=C.length-1,this._forceFullPlacement=E,this._showCollisionBoxes=M,this._done=!1};es.prototype.isDone=function(){return this._done},es.prototype.continuePlacement=function(x,C,E){for(var M=this,U=k.browser.now(),H=function(){var Ut=k.browser.now()-U;return!M._forceFullPlacement&&Ut>2};this._currentPlacementIndex>=0;){var $=C[x[this._currentPlacementIndex]],ht=this.placement.collisionIndex.transform.zoom;if($.type==="symbol"&&(!$.minzoom||$.minzoom<=ht)&&(!$.maxzoom||$.maxzoom>ht)){if(this._inProgressLayer||(this._inProgressLayer=new xs($)),this._inProgressLayer.continuePlacement(E[$.source],this.placement,this._showCollisionBoxes,$,H))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},es.prototype.commit=function(x){return this.placement.commit(x),this.placement};var ls=512/k.EXTENT/2,zs=function(x,C,E){this.tileID=x,this.indexedSymbolInstances={},this.bucketInstanceId=E;for(var M=0;M<C.length;M++){var U=C.get(M),H=U.key;this.indexedSymbolInstances[H]||(this.indexedSymbolInstances[H]=[]),this.indexedSymbolInstances[H].push({crossTileID:U.crossTileID,coord:this.getScaledCoordinates(U,x)})}};zs.prototype.getScaledCoordinates=function(x,C){var E=ls/Math.pow(2,C.canonical.z-this.tileID.canonical.z);return{x:Math.floor((C.canonical.x*k.EXTENT+x.anchorX)*E),y:Math.floor((C.canonical.y*k.EXTENT+x.anchorY)*E)}},zs.prototype.findMatches=function(x,C,E){for(var M=this.tileID.canonical.z<C.canonical.z?1:Math.pow(2,this.tileID.canonical.z-C.canonical.z),U=0;U<x.length;U++){var H=x.get(U);if(!H.crossTileID){var $=this.indexedSymbolInstances[H.key];if($)for(var ht=this.getScaledCoordinates(H,C),Ut=0,re=$;Ut<re.length;Ut+=1){var Fe=re[Ut];if(Math.abs(Fe.coord.x-ht.x)<=M&&Math.abs(Fe.coord.y-ht.y)<=M&&!E[Fe.crossTileID]){E[Fe.crossTileID]=!0,H.crossTileID=Fe.crossTileID;break}}}}};var Qu=function(){this.maxCrossTileID=0};Qu.prototype.generate=function(){return++this.maxCrossTileID};var Cu=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Cu.prototype.handleWrapJump=function(x){var C=Math.round((x-this.lng)/360);if(C!==0)for(var E in this.indexes){var M=this.indexes[E],U={};for(var H in M){var $=M[H];$.tileID=$.tileID.unwrapTo($.tileID.wrap+C),U[$.tileID.key]=$}this.indexes[E]=U}this.lng=x},Cu.prototype.addBucket=function(x,C,E){if(this.indexes[x.overscaledZ]&&this.indexes[x.overscaledZ][x.key]){if(this.indexes[x.overscaledZ][x.key].bucketInstanceId===C.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(x.overscaledZ,this.indexes[x.overscaledZ][x.key])}for(var M=0;M<C.symbolInstances.length;M++)C.symbolInstances.get(M).crossTileID=0;this.usedCrossTileIDs[x.overscaledZ]||(this.usedCrossTileIDs[x.overscaledZ]={});var U=this.usedCrossTileIDs[x.overscaledZ];for(var H in this.indexes){var $=this.indexes[H];if(Number(H)>x.overscaledZ)for(var ht in $){var Ut=$[ht];Ut.tileID.isChildOf(x)&&Ut.findMatches(C.symbolInstances,x,U)}else{var re=$[x.scaledTo(Number(H)).key];re&&re.findMatches(C.symbolInstances,x,U)}}for(var Fe=0;Fe<C.symbolInstances.length;Fe++){var Re=C.symbolInstances.get(Fe);Re.crossTileID||(Re.crossTileID=E.generate(),U[Re.crossTileID]=!0)}return this.indexes[x.overscaledZ]===void 0&&(this.indexes[x.overscaledZ]={}),this.indexes[x.overscaledZ][x.key]=new zs(x,C.symbolInstances,C.bucketInstanceId),!0},Cu.prototype.removeBucketCrossTileIDs=function(x,C){for(var E in C.indexedSymbolInstances)for(var M=0,U=C.indexedSymbolInstances[E];M<U.length;M+=1)delete this.usedCrossTileIDs[x][U[M].crossTileID]},Cu.prototype.removeStaleBuckets=function(x){var C=!1;for(var E in this.indexes){var M=this.indexes[E];for(var U in M)x[M[U].bucketInstanceId]||(this.removeBucketCrossTileIDs(E,M[U]),delete M[U],C=!0)}return C};var Ks=function(){this.layerIndexes={},this.crossTileIDs=new Qu,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Ks.prototype.addLayer=function(x,C,E){var M=this.layerIndexes[x.id];M===void 0&&(M=this.layerIndexes[x.id]=new Cu);var U=!1,H={};M.handleWrapJump(E);for(var $=0,ht=C;$<ht.length;$+=1){var Ut=ht[$],re=Ut.getBucket(x);re&&x.id===re.layerIds[0]&&(re.bucketInstanceId||(re.bucketInstanceId=++this.maxBucketInstanceId),M.addBucket(Ut.tileID,re,this.crossTileIDs)&&(U=!0),H[re.bucketInstanceId]=!0)}return M.removeStaleBuckets(H)&&(U=!0),U},Ks.prototype.pruneUnusedLayers=function(x){var C={};for(var E in x.forEach(function(M){C[M]=!0}),this.layerIndexes)C[E]||delete this.layerIndexes[E]};var Au=function(x,C){return k.emitValidationErrors(x,C&&C.filter(function(E){return E.identifier!=="source.canvas"}))},zu=k.pick(fi,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),xl=k.pick(fi,["setCenter","setZoom","setBearing","setPitch"]),Ju=function(){var x={},C=k.styleSpec.$version;for(var E in k.styleSpec.$root){var M,U=k.styleSpec.$root[E];U.required&&(M=E==="version"?C:U.type==="array"?[]:{})!=null&&(x[E]=M)}return x}(),Uu=function(x){function C(E,M){var U=this;M===void 0&&(M={}),x.call(this),this.map=E,this.dispatcher=new xe(tn(),this),this.imageManager=new b,this.imageManager.setEventedParent(this),this.glyphManager=new Dt(E._requestManager,M.localIdeographFontFamily),this.lineAtlas=new Ue(256,512),this.crossTileSymbolIndex=new Ks,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new k.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",k.getReferrer());var H=this;this._rtlTextPluginCallback=C.registerForPluginStateChange(function($){H.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:$.pluginStatus,pluginURL:$.pluginURL},function(ht,Ut){if(k.triggerPluginCompletionEvent(ht),Ut&&Ut.every(function(Fe){return Fe}))for(var re in H.sourceCaches)H.sourceCaches[re].reload()})}),this.on("data",function($){if($.dataType==="source"&&$.sourceDataType==="metadata"){var ht=U.sourceCaches[$.sourceId];if(ht){var Ut=ht.getSource();if(Ut&&Ut.vectorLayerIds)for(var re in U._layers){var Fe=U._layers[re];Fe.source===Ut.id&&U._validateLayer(Fe)}}}})}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.loadURL=function(E,M){var U=this;M===void 0&&(M={}),this.fire(new k.Event("dataloading",{dataType:"style"}));var H=typeof M.validate=="boolean"?M.validate:!k.isMapboxURL(E);E=this.map._requestManager.normalizeStyleURL(E,M.accessToken);var $=this.map._requestManager.transformRequest(E,k.ResourceType.Style);this._request=k.getJSON($,function(ht,Ut){U._request=null,ht?U.fire(new k.ErrorEvent(ht)):Ut&&U._load(Ut,H)})},C.prototype.loadJSON=function(E,M){var U=this;M===void 0&&(M={}),this.fire(new k.Event("dataloading",{dataType:"style"})),this._request=k.browser.frame(function(){U._request=null,U._load(E,M.validate!==!1)})},C.prototype.loadEmpty=function(){this.fire(new k.Event("dataloading",{dataType:"style"})),this._load(Ju,!1)},C.prototype._load=function(E,M){if(!M||!Au(this,k.validateStyle(E))){for(var U in this._loaded=!0,this.stylesheet=E,E.sources)this.addSource(U,E.sources[U],{validate:!1});E.sprite?this._loadSprite(E.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(E.glyphs);var H=Yn(this.stylesheet.layers);this._order=H.map(function(re){return re.id}),this._layers={},this._serializedLayers={};for(var $=0,ht=H;$<ht.length;$+=1){var Ut=ht[$];(Ut=k.createStyleLayer(Ut)).setEventedParent(this,{layer:{id:Ut.id}}),this._layers[Ut.id]=Ut,this._serializedLayers[Ut.id]=Ut.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new Ge(this.stylesheet.light),this.fire(new k.Event("data",{dataType:"style"})),this.fire(new k.Event("style.load"))}},C.prototype._loadSprite=function(E){var M=this;this._spriteRequest=function(U,H,$){var ht,Ut,re,Fe=k.browser.devicePixelRatio>1?"@2x":"",Re=k.getJSON(H.transformRequest(H.normalizeSpriteURL(U,Fe,".json"),k.ResourceType.SpriteJSON),function(ur,Er){Re=null,re||(re=ur,ht=Er,cr())}),De=k.getImage(H.transformRequest(H.normalizeSpriteURL(U,Fe,".png"),k.ResourceType.SpriteImage),function(ur,Er){De=null,re||(re=ur,Ut=Er,cr())});function cr(){if(re)$(re);else if(ht&&Ut){var ur=k.browser.getImageData(Ut),Er={};for(var nr in ht){var wr=ht[nr],Ir=wr.width,$r=wr.height,gn=wr.x,dn=wr.y,xn=wr.sdf,Un=wr.pixelRatio,yi=wr.stretchX,ui=wr.stretchY,Bi=wr.content,sa=new k.RGBAImage({width:Ir,height:$r});k.RGBAImage.copy(ur,sa,{x:gn,y:dn},{x:0,y:0},{width:Ir,height:$r}),Er[nr]={data:sa,pixelRatio:Un,sdf:xn,stretchX:yi,stretchY:ui,content:Bi}}$(null,Er)}}return{cancel:function(){Re&&(Re.cancel(),Re=null),De&&(De.cancel(),De=null)}}}(E,this.map._requestManager,function(U,H){if(M._spriteRequest=null,U)M.fire(new k.ErrorEvent(U));else if(H)for(var $ in H)M.imageManager.addImage($,H[$]);M.imageManager.setLoaded(!0),M._availableImages=M.imageManager.listImages(),M.dispatcher.broadcast("setImages",M._availableImages),M.fire(new k.Event("data",{dataType:"style"}))})},C.prototype._validateLayer=function(E){var M=this.sourceCaches[E.source];if(M){var U=E.sourceLayer;if(U){var H=M.getSource();(H.type==="geojson"||H.vectorLayerIds&&H.vectorLayerIds.indexOf(U)===-1)&&this.fire(new k.ErrorEvent(new Error('Source layer "'+U+'" does not exist on source "'+H.id+'" as specified by style layer "'+E.id+'"')))}}},C.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var E in this.sourceCaches)if(!this.sourceCaches[E].loaded())return!1;return!!this.imageManager.isLoaded()},C.prototype._serializeLayers=function(E){for(var M=[],U=0,H=E;U<H.length;U+=1){var $=this._layers[H[U]];$.type!=="custom"&&M.push($.serialize())}return M},C.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var E in this.sourceCaches)if(this.sourceCaches[E].hasTransition())return!0;for(var M in this._layers)if(this._layers[M].hasTransition())return!0;return!1},C.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},C.prototype.update=function(E){if(this._loaded){var M=this._changed;if(this._changed){var U=Object.keys(this._updatedLayers),H=Object.keys(this._removedLayers);for(var $ in(U.length||H.length)&&this._updateWorkerLayers(U,H),this._updatedSources){var ht=this._updatedSources[$];ht==="reload"?this._reloadSource($):ht==="clear"&&this._clearSource($)}for(var Ut in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[Ut].updateTransitions(E);this.light.updateTransitions(E),this._resetUpdates()}var re={};for(var Fe in this.sourceCaches){var Re=this.sourceCaches[Fe];re[Fe]=Re.used,Re.used=!1}for(var De=0,cr=this._order;De<cr.length;De+=1){var ur=this._layers[cr[De]];ur.recalculate(E,this._availableImages),!ur.isHidden(E.zoom)&&ur.source&&(this.sourceCaches[ur.source].used=!0)}for(var Er in re){var nr=this.sourceCaches[Er];re[Er]!==nr.used&&nr.fire(new k.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:Er}))}this.light.recalculate(E),this.z=E.zoom,M&&this.fire(new k.Event("data",{dataType:"style"}))}},C.prototype._updateTilesForChangedImages=function(){var E=Object.keys(this._changedImages);if(E.length){for(var M in this.sourceCaches)this.sourceCaches[M].reloadTilesForDependencies(["icons","patterns"],E);this._changedImages={}}},C.prototype._updateWorkerLayers=function(E,M){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(E),removedIds:M})},C.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},C.prototype.setState=function(E){var M=this;if(this._checkLoaded(),Au(this,k.validateStyle(E)))return!1;(E=k.clone$1(E)).layers=Yn(E.layers);var U=function($,ht){if(!$)return[{command:fi.setStyle,args:[ht]}];var Ut=[];try{if(!k.deepEqual($.version,ht.version))return[{command:fi.setStyle,args:[ht]}];k.deepEqual($.center,ht.center)||Ut.push({command:fi.setCenter,args:[ht.center]}),k.deepEqual($.zoom,ht.zoom)||Ut.push({command:fi.setZoom,args:[ht.zoom]}),k.deepEqual($.bearing,ht.bearing)||Ut.push({command:fi.setBearing,args:[ht.bearing]}),k.deepEqual($.pitch,ht.pitch)||Ut.push({command:fi.setPitch,args:[ht.pitch]}),k.deepEqual($.sprite,ht.sprite)||Ut.push({command:fi.setSprite,args:[ht.sprite]}),k.deepEqual($.glyphs,ht.glyphs)||Ut.push({command:fi.setGlyphs,args:[ht.glyphs]}),k.deepEqual($.transition,ht.transition)||Ut.push({command:fi.setTransition,args:[ht.transition]}),k.deepEqual($.light,ht.light)||Ut.push({command:fi.setLight,args:[ht.light]});var re={},Fe=[];(function(De,cr,ur,Er){var nr;for(nr in cr=cr||{},De=De||{})De.hasOwnProperty(nr)&&(cr.hasOwnProperty(nr)||si(nr,ur,Er));for(nr in cr)cr.hasOwnProperty(nr)&&(De.hasOwnProperty(nr)?k.deepEqual(De[nr],cr[nr])||(De[nr].type==="geojson"&&cr[nr].type==="geojson"&&vo(De,cr,nr)?ur.push({command:fi.setGeoJSONSourceData,args:[nr,cr[nr].data]}):Ia(nr,cr,ur,Er)):Ea(nr,cr,ur))})($.sources,ht.sources,Fe,re);var Re=[];$.layers&&$.layers.forEach(function(De){re[De.source]?Ut.push({command:fi.removeLayer,args:[De.id]}):Re.push(De)}),Ut=Ut.concat(Fe),function(De,cr,ur){cr=cr||[];var Er,nr,wr,Ir,$r,gn,dn,xn=(De=De||[]).map(Ha),Un=cr.map(Ha),yi=De.reduce(wa,{}),ui=cr.reduce(wa,{}),Bi=xn.slice(),sa=Object.create(null);for(Er=0,nr=0;Er<xn.length;Er++)ui.hasOwnProperty(wr=xn[Er])?nr++:(ur.push({command:fi.removeLayer,args:[wr]}),Bi.splice(Bi.indexOf(wr,nr),1));for(Er=0,nr=0;Er<Un.length;Er++)Bi[Bi.length-1-Er]!==(wr=Un[Un.length-1-Er])&&(yi.hasOwnProperty(wr)?(ur.push({command:fi.removeLayer,args:[wr]}),Bi.splice(Bi.lastIndexOf(wr,Bi.length-nr),1)):nr++,ur.push({command:fi.addLayer,args:[ui[wr],gn=Bi[Bi.length-Er]]}),Bi.splice(Bi.length-Er,0,wr),sa[wr]=!0);for(Er=0;Er<Un.length;Er++)if(Ir=yi[wr=Un[Er]],$r=ui[wr],!sa[wr]&&!k.deepEqual(Ir,$r))if(k.deepEqual(Ir.source,$r.source)&&k.deepEqual(Ir["source-layer"],$r["source-layer"])&&k.deepEqual(Ir.type,$r.type)){for(dn in Oa(Ir.layout,$r.layout,ur,wr,null,fi.setLayoutProperty),Oa(Ir.paint,$r.paint,ur,wr,null,fi.setPaintProperty),k.deepEqual(Ir.filter,$r.filter)||ur.push({command:fi.setFilter,args:[wr,$r.filter]}),k.deepEqual(Ir.minzoom,$r.minzoom)&&k.deepEqual(Ir.maxzoom,$r.maxzoom)||ur.push({command:fi.setLayerZoomRange,args:[wr,$r.minzoom,$r.maxzoom]}),Ir)Ir.hasOwnProperty(dn)&&dn!=="layout"&&dn!=="paint"&&dn!=="filter"&&dn!=="metadata"&&dn!=="minzoom"&&dn!=="maxzoom"&&(dn.indexOf("paint.")===0?Oa(Ir[dn],$r[dn],ur,wr,dn.slice(6),fi.setPaintProperty):k.deepEqual(Ir[dn],$r[dn])||ur.push({command:fi.setLayerProperty,args:[wr,dn,$r[dn]]}));for(dn in $r)$r.hasOwnProperty(dn)&&!Ir.hasOwnProperty(dn)&&dn!=="layout"&&dn!=="paint"&&dn!=="filter"&&dn!=="metadata"&&dn!=="minzoom"&&dn!=="maxzoom"&&(dn.indexOf("paint.")===0?Oa(Ir[dn],$r[dn],ur,wr,dn.slice(6),fi.setPaintProperty):k.deepEqual(Ir[dn],$r[dn])||ur.push({command:fi.setLayerProperty,args:[wr,dn,$r[dn]]}))}else ur.push({command:fi.removeLayer,args:[wr]}),gn=Bi[Bi.lastIndexOf(wr)+1],ur.push({command:fi.addLayer,args:[$r,gn]})}(Re,ht.layers,Ut)}catch(De){console.warn("Unable to compute style diff:",De),Ut=[{command:fi.setStyle,args:[ht]}]}return Ut}(this.serialize(),E).filter(function($){return!($.command in xl)});if(U.length===0)return!1;var H=U.filter(function($){return!($.command in zu)});if(H.length>0)throw new Error("Unimplemented: "+H.map(function($){return $.command}).join(", ")+".");return U.forEach(function($){$.command!=="setTransition"&&M[$.command].apply(M,$.args)}),this.stylesheet=E,!0},C.prototype.addImage=function(E,M){if(this.getImage(E))return this.fire(new k.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(E,M),this._afterImageUpdated(E)},C.prototype.updateImage=function(E,M){this.imageManager.updateImage(E,M)},C.prototype.getImage=function(E){return this.imageManager.getImage(E)},C.prototype.removeImage=function(E){if(!this.getImage(E))return this.fire(new k.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(E),this._afterImageUpdated(E)},C.prototype._afterImageUpdated=function(E){this._availableImages=this.imageManager.listImages(),this._changedImages[E]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new k.Event("data",{dataType:"style"}))},C.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},C.prototype.addSource=function(E,M,U){var H=this;if(U===void 0&&(U={}),this._checkLoaded(),this.sourceCaches[E]!==void 0)throw new Error("There is already a source with this ID");if(!M.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(M).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(M.type)>=0&&this._validate(k.validateStyle.source,"sources."+E,M,null,U))){this.map&&this.map._collectResourceTiming&&(M.collectResourceTiming=!0);var $=this.sourceCaches[E]=new ir(E,M,this.dispatcher);$.style=this,$.setEventedParent(this,function(){return{isSourceLoaded:H.loaded(),source:$.serialize(),sourceId:E}}),$.onAdd(this.map),this._changed=!0}},C.prototype.removeSource=function(E){if(this._checkLoaded(),this.sourceCaches[E]===void 0)throw new Error("There is no source with this ID");for(var M in this._layers)if(this._layers[M].source===E)return this.fire(new k.ErrorEvent(new Error('Source "'+E+'" cannot be removed while layer "'+M+'" is using it.')));var U=this.sourceCaches[E];delete this.sourceCaches[E],delete this._updatedSources[E],U.fire(new k.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:E})),U.setEventedParent(null),U.clearTiles(),U.onRemove&&U.onRemove(this.map),this._changed=!0},C.prototype.setGeoJSONSourceData=function(E,M){this._checkLoaded(),this.sourceCaches[E].getSource().setData(M),this._changed=!0},C.prototype.getSource=function(E){return this.sourceCaches[E]&&this.sourceCaches[E].getSource()},C.prototype.addLayer=function(E,M,U){U===void 0&&(U={}),this._checkLoaded();var H=E.id;if(this.getLayer(H))this.fire(new k.ErrorEvent(new Error('Layer with id "'+H+'" already exists on this map')));else{var $;if(E.type==="custom"){if(Au(this,k.validateCustomStyleLayer(E)))return;$=k.createStyleLayer(E)}else{if(typeof E.source=="object"&&(this.addSource(H,E.source),E=k.clone$1(E),E=k.extend(E,{source:H})),this._validate(k.validateStyle.layer,"layers."+H,E,{arrayIndex:-1},U))return;$=k.createStyleLayer(E),this._validateLayer($),$.setEventedParent(this,{layer:{id:H}}),this._serializedLayers[$.id]=$.serialize()}var ht=M?this._order.indexOf(M):this._order.length;if(M&&ht===-1)this.fire(new k.ErrorEvent(new Error('Layer with id "'+M+'" does not exist on this map.')));else{if(this._order.splice(ht,0,H),this._layerOrderChanged=!0,this._layers[H]=$,this._removedLayers[H]&&$.source&&$.type!=="custom"){var Ut=this._removedLayers[H];delete this._removedLayers[H],Ut.type!==$.type?this._updatedSources[$.source]="clear":(this._updatedSources[$.source]="reload",this.sourceCaches[$.source].pause())}this._updateLayer($),$.onAdd&&$.onAdd(this.map)}}},C.prototype.moveLayer=function(E,M){if(this._checkLoaded(),this._changed=!0,this._layers[E]){if(E!==M){var U=this._order.indexOf(E);this._order.splice(U,1);var H=M?this._order.indexOf(M):this._order.length;M&&H===-1?this.fire(new k.ErrorEvent(new Error('Layer with id "'+M+'" does not exist on this map.'))):(this._order.splice(H,0,E),this._layerOrderChanged=!0)}}else this.fire(new k.ErrorEvent(new Error("The layer '"+E+"' does not exist in the map's style and cannot be moved.")))},C.prototype.removeLayer=function(E){this._checkLoaded();var M=this._layers[E];if(M){M.setEventedParent(null);var U=this._order.indexOf(E);this._order.splice(U,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[E]=M,delete this._layers[E],delete this._serializedLayers[E],delete this._updatedLayers[E],delete this._updatedPaintProps[E],M.onRemove&&M.onRemove(this.map)}else this.fire(new k.ErrorEvent(new Error("The layer '"+E+"' does not exist in the map's style and cannot be removed.")))},C.prototype.getLayer=function(E){return this._layers[E]},C.prototype.hasLayer=function(E){return E in this._layers},C.prototype.setLayerZoomRange=function(E,M,U){this._checkLoaded();var H=this.getLayer(E);H?H.minzoom===M&&H.maxzoom===U||(M!=null&&(H.minzoom=M),U!=null&&(H.maxzoom=U),this._updateLayer(H)):this.fire(new k.ErrorEvent(new Error("The layer '"+E+"' does not exist in the map's style and cannot have zoom extent.")))},C.prototype.setFilter=function(E,M,U){U===void 0&&(U={}),this._checkLoaded();var H=this.getLayer(E);if(H){if(!k.deepEqual(H.filter,M))return M==null?(H.filter=void 0,void this._updateLayer(H)):void(this._validate(k.validateStyle.filter,"layers."+H.id+".filter",M,null,U)||(H.filter=k.clone$1(M),this._updateLayer(H)))}else this.fire(new k.ErrorEvent(new Error("The layer '"+E+"' does not exist in the map's style and cannot be filtered.")))},C.prototype.getFilter=function(E){return k.clone$1(this.getLayer(E).filter)},C.prototype.setLayoutProperty=function(E,M,U,H){H===void 0&&(H={}),this._checkLoaded();var $=this.getLayer(E);$?k.deepEqual($.getLayoutProperty(M),U)||($.setLayoutProperty(M,U,H),this._updateLayer($)):this.fire(new k.ErrorEvent(new Error("The layer '"+E+"' does not exist in the map's style and cannot be styled.")))},C.prototype.getLayoutProperty=function(E,M){var U=this.getLayer(E);if(U)return U.getLayoutProperty(M);this.fire(new k.ErrorEvent(new Error("The layer '"+E+"' does not exist in the map's style.")))},C.prototype.setPaintProperty=function(E,M,U,H){H===void 0&&(H={}),this._checkLoaded();var $=this.getLayer(E);$?k.deepEqual($.getPaintProperty(M),U)||($.setPaintProperty(M,U,H)&&this._updateLayer($),this._changed=!0,this._updatedPaintProps[E]=!0):this.fire(new k.ErrorEvent(new Error("The layer '"+E+"' does not exist in the map's style and cannot be styled.")))},C.prototype.getPaintProperty=function(E,M){return this.getLayer(E).getPaintProperty(M)},C.prototype.setFeatureState=function(E,M){this._checkLoaded();var U=E.source,H=E.sourceLayer,$=this.sourceCaches[U];if($!==void 0){var ht=$.getSource().type;ht==="geojson"&&H?this.fire(new k.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):ht!=="vector"||H?(E.id===void 0&&this.fire(new k.ErrorEvent(new Error("The feature id parameter must be provided."))),$.setFeatureState(H,E.id,M)):this.fire(new k.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new k.ErrorEvent(new Error("The source '"+U+"' does not exist in the map's style.")))},C.prototype.removeFeatureState=function(E,M){this._checkLoaded();var U=E.source,H=this.sourceCaches[U];if(H!==void 0){var $=H.getSource().type,ht=$==="vector"?E.sourceLayer:void 0;$!=="vector"||ht?M&&typeof E.id!="string"&&typeof E.id!="number"?this.fire(new k.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):H.removeFeatureState(ht,E.id,M):this.fire(new k.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new k.ErrorEvent(new Error("The source '"+U+"' does not exist in the map's style.")))},C.prototype.getFeatureState=function(E){this._checkLoaded();var M=E.source,U=E.sourceLayer,H=this.sourceCaches[M];if(H!==void 0){if(H.getSource().type!=="vector"||U)return E.id===void 0&&this.fire(new k.ErrorEvent(new Error("The feature id parameter must be provided."))),H.getFeatureState(U,E.id);this.fire(new k.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new k.ErrorEvent(new Error("The source '"+M+"' does not exist in the map's style.")))},C.prototype.getTransition=function(){return k.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},C.prototype.serialize=function(){return k.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:k.mapObject(this.sourceCaches,function(E){return E.serialize()}),layers:this._serializeLayers(this._order)},function(E){return E!==void 0})},C.prototype._updateLayer=function(E){this._updatedLayers[E.id]=!0,E.source&&!this._updatedSources[E.source]&&this.sourceCaches[E.source].getSource().type!=="raster"&&(this._updatedSources[E.source]="reload",this.sourceCaches[E.source].pause()),this._changed=!0},C.prototype._flattenAndSortRenderedFeatures=function(E){for(var M=this,U=function(yi){return M._layers[yi].type==="fill-extrusion"},H={},$=[],ht=this._order.length-1;ht>=0;ht--){var Ut=this._order[ht];if(U(Ut)){H[Ut]=ht;for(var re=0,Fe=E;re<Fe.length;re+=1){var Re=Fe[re][Ut];if(Re)for(var De=0,cr=Re;De<cr.length;De+=1)$.push(cr[De])}}}$.sort(function(yi,ui){return ui.intersectionZ-yi.intersectionZ});for(var ur=[],Er=this._order.length-1;Er>=0;Er--){var nr=this._order[Er];if(U(nr))for(var wr=$.length-1;wr>=0;wr--){var Ir=$[wr].feature;if(H[Ir.layer.id]<Er)break;ur.push(Ir),$.pop()}else for(var $r=0,gn=E;$r<gn.length;$r+=1){var dn=gn[$r][nr];if(dn)for(var xn=0,Un=dn;xn<Un.length;xn+=1)ur.push(Un[xn].feature)}}return ur},C.prototype.queryRenderedFeatures=function(E,M,U){M&&M.filter&&this._validate(k.validateStyle.filter,"queryRenderedFeatures.filter",M.filter,null,M);var H={};if(M&&M.layers){if(!Array.isArray(M.layers))return this.fire(new k.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var $=0,ht=M.layers;$<ht.length;$+=1){var Ut=ht[$],re=this._layers[Ut];if(!re)return this.fire(new k.ErrorEvent(new Error("The layer '"+Ut+"' does not exist in the map's style and cannot be queried for features."))),[];H[re.source]=!0}}var Fe=[];for(var Re in M.availableImages=this._availableImages,this.sourceCaches)M.layers&&!H[Re]||Fe.push(ee(this.sourceCaches[Re],this._layers,this._serializedLayers,E,M,U));return this.placement&&Fe.push(function(De,cr,ur,Er,nr,wr,Ir){for(var $r={},gn=wr.queryRenderedSymbols(Er),dn=[],xn=0,Un=Object.keys(gn).map(Number);xn<Un.length;xn+=1)dn.push(Ir[Un[xn]]);dn.sort(me);for(var yi=function(){var ha=Bi[ui],uo=ha.featureIndex.lookupSymbolFeatures(gn[ha.bucketInstanceId],cr,ha.bucketIndex,ha.sourceLayerIndex,nr.filter,nr.layers,nr.availableImages,De);for(var Ni in uo){var La=$r[Ni]=$r[Ni]||[],Ra=uo[Ni];Ra.sort(function(za,xa){var ga=ha.featureSortOrder;if(ga){var Qs=ga.indexOf(za.featureIndex);return ga.indexOf(xa.featureIndex)-Qs}return xa.featureIndex-za.featureIndex});for(var Ta=0,_a=Ra;Ta<_a.length;Ta+=1)La.push(_a[Ta])}},ui=0,Bi=dn;ui<Bi.length;ui+=1)yi();var sa=function(ha){$r[ha].forEach(function(uo){var Ni=uo.feature,La=ur[De[ha].source].getFeatureState(Ni.layer["source-layer"],Ni.id);Ni.source=Ni.layer.source,Ni.layer["source-layer"]&&(Ni.sourceLayer=Ni.layer["source-layer"]),Ni.state=La})};for(var ua in $r)sa(ua);return $r}(this._layers,this._serializedLayers,this.sourceCaches,E,M,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(Fe)},C.prototype.querySourceFeatures=function(E,M){M&&M.filter&&this._validate(k.validateStyle.filter,"querySourceFeatures.filter",M.filter,null,M);var U=this.sourceCaches[E];return U?function(H,$){for(var ht=H.getRenderableIds().map(function(cr){return H.getTileByID(cr)}),Ut=[],re={},Fe=0;Fe<ht.length;Fe++){var Re=ht[Fe],De=Re.tileID.canonical.key;re[De]||(re[De]=!0,Re.querySourceFeatures(Ut,$))}return Ut}(U,M):[]},C.prototype.addSourceType=function(E,M,U){return C.getSourceType(E)?U(new Error('A source type called "'+E+'" already exists.')):(C.setSourceType(E,M),M.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:E,url:M.workerSourceURL},U):U(null,null))},C.prototype.getLight=function(){return this.light.getLight()},C.prototype.setLight=function(E,M){M===void 0&&(M={}),this._checkLoaded();var U=this.light.getLight(),H=!1;for(var $ in E)if(!k.deepEqual(E[$],U[$])){H=!0;break}if(H){var ht={now:k.browser.now(),transition:k.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(E,M),this.light.updateTransitions(ht)}},C.prototype._validate=function(E,M,U,H,$){return $===void 0&&($={}),(!$||$.validate!==!1)&&Au(this,E.call(k.validateStyle,k.extend({key:M,style:this.serialize(),value:U,styleSpec:k.styleSpec},H)))},C.prototype._remove=function(){for(var E in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),k.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[E].setEventedParent(null);for(var M in this.sourceCaches)this.sourceCaches[M].clearTiles(),this.sourceCaches[M].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},C.prototype._clearSource=function(E){this.sourceCaches[E].clearTiles()},C.prototype._reloadSource=function(E){this.sourceCaches[E].resume(),this.sourceCaches[E].reload()},C.prototype._updateSources=function(E){for(var M in this.sourceCaches)this.sourceCaches[M].update(E)},C.prototype._generateCollisionBoxes=function(){for(var E in this.sourceCaches)this._reloadSource(E)},C.prototype._updatePlacement=function(E,M,U,H,$){$===void 0&&($=!1);for(var ht=!1,Ut=!1,re={},Fe=0,Re=this._order;Fe<Re.length;Fe+=1){var De=this._layers[Re[Fe]];if(De.type==="symbol"){if(!re[De.source]){var cr=this.sourceCaches[De.source];re[De.source]=cr.getRenderableIds(!0).map(function(Ir){return cr.getTileByID(Ir)}).sort(function(Ir,$r){return $r.tileID.overscaledZ-Ir.tileID.overscaledZ||(Ir.tileID.isLessThan($r.tileID)?-1:1)})}var ur=this.crossTileSymbolIndex.addLayer(De,re[De.source],E.center.lng);ht=ht||ur}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),(($=$||this._layerOrderChanged||U===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(k.browser.now(),E.zoom))&&(this.pauseablePlacement=new es(E,this._order,$,M,U,H,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,re),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(k.browser.now()),Ut=!0),ht&&this.pauseablePlacement.placement.setStale()),Ut||ht)for(var Er=0,nr=this._order;Er<nr.length;Er+=1){var wr=this._layers[nr[Er]];wr.type==="symbol"&&this.placement.updateLayerOpacities(wr,re[wr.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(k.browser.now())},C.prototype._releaseSymbolFadeTiles=function(){for(var E in this.sourceCaches)this.sourceCaches[E].releaseSymbolFadeTiles()},C.prototype.getImages=function(E,M,U){this.imageManager.getImages(M.icons,U),this._updateTilesForChangedImages();var H=this.sourceCaches[M.source];H&&H.setDependencies(M.tileID.key,M.type,M.icons)},C.prototype.getGlyphs=function(E,M,U){this.glyphManager.getGlyphs(M.stacks,U)},C.prototype.getResource=function(E,M,U){return k.makeRequest(M,U)},C}(k.Evented);Uu.getSourceType=function(x){return Be[x]},Uu.setSourceType=function(x,C){Be[x]=C},Uu.registerForPluginStateChange=k.registerForPluginStateChange;var Uo=k.createLayout([{name:"a_pos",type:"Int16",components:2}]),js=ro(`#ifdef GL_ES
|
|
precision mediump float;
|
|
#else
|
|
#if !defined(lowp)
|
|
#define lowp
|
|
#endif
|
|
#if !defined(mediump)
|
|
#define mediump
|
|
#endif
|
|
#if !defined(highp)
|
|
#define highp
|
|
#endif
|
|
#endif`,`#ifdef GL_ES
|
|
precision highp float;
|
|
#else
|
|
#if !defined(lowp)
|
|
#define lowp
|
|
#endif
|
|
#if !defined(mediump)
|
|
#define mediump
|
|
#endif
|
|
#if !defined(highp)
|
|
#define highp
|
|
#endif
|
|
#endif
|
|
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
|
|
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}`),Rc=ro(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),qc=ro(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),Tu=ro(`varying vec3 v_data;
|
|
#pragma mapbox: define highp vec4 color
|
|
#pragma mapbox: define mediump float radius
|
|
#pragma mapbox: define lowp float blur
|
|
#pragma mapbox: define lowp float opacity
|
|
#pragma mapbox: define highp vec4 stroke_color
|
|
#pragma mapbox: define mediump float stroke_width
|
|
#pragma mapbox: define lowp float stroke_opacity
|
|
void main() {
|
|
#pragma mapbox: initialize highp vec4 color
|
|
#pragma mapbox: initialize mediump float radius
|
|
#pragma mapbox: initialize lowp float blur
|
|
#pragma mapbox: initialize lowp float opacity
|
|
#pragma mapbox: initialize highp vec4 stroke_color
|
|
#pragma mapbox: initialize mediump float stroke_width
|
|
#pragma mapbox: initialize lowp float stroke_opacity
|
|
vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;
|
|
#pragma mapbox: define highp vec4 color
|
|
#pragma mapbox: define mediump float radius
|
|
#pragma mapbox: define lowp float blur
|
|
#pragma mapbox: define lowp float opacity
|
|
#pragma mapbox: define highp vec4 stroke_color
|
|
#pragma mapbox: define mediump float stroke_width
|
|
#pragma mapbox: define lowp float stroke_opacity
|
|
void main(void) {
|
|
#pragma mapbox: initialize highp vec4 color
|
|
#pragma mapbox: initialize mediump float radius
|
|
#pragma mapbox: initialize lowp float blur
|
|
#pragma mapbox: initialize lowp float opacity
|
|
#pragma mapbox: initialize highp vec4 stroke_color
|
|
#pragma mapbox: initialize mediump float stroke_width
|
|
#pragma mapbox: initialize lowp float stroke_opacity
|
|
vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),Zl=ro("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Cs=ro(`uniform highp float u_intensity;varying vec2 v_extrude;
|
|
#pragma mapbox: define highp float weight
|
|
#define GAUSS_COEF 0.3989422804014327
|
|
void main() {
|
|
#pragma mapbox: initialize highp float weight
|
|
float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
|
|
#pragma mapbox: define highp float weight
|
|
#pragma mapbox: define mediump float radius
|
|
const highp float ZERO=1.0/255.0/16.0;
|
|
#define GAUSS_COEF 0.3989422804014327
|
|
void main(void) {
|
|
#pragma mapbox: initialize highp float weight
|
|
#pragma mapbox: initialize mediump float radius
|
|
vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`),Zu=ro(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(0.0);
|
|
#endif
|
|
}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),ja=ro("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Dc=ro("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),D=ro("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),X=ro(`#pragma mapbox: define highp vec4 color
|
|
#pragma mapbox: define lowp float opacity
|
|
void main() {
|
|
#pragma mapbox: initialize highp vec4 color
|
|
#pragma mapbox: initialize lowp float opacity
|
|
gl_FragColor=color*opacity;
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,`attribute vec2 a_pos;uniform mat4 u_matrix;
|
|
#pragma mapbox: define highp vec4 color
|
|
#pragma mapbox: define lowp float opacity
|
|
void main() {
|
|
#pragma mapbox: initialize highp vec4 color
|
|
#pragma mapbox: initialize lowp float opacity
|
|
gl_Position=u_matrix*vec4(a_pos,0,1);}`),Mt=ro(`varying vec2 v_pos;
|
|
#pragma mapbox: define highp vec4 outline_color
|
|
#pragma mapbox: define lowp float opacity
|
|
void main() {
|
|
#pragma mapbox: initialize highp vec4 outline_color
|
|
#pragma mapbox: initialize lowp float opacity
|
|
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
|
|
#pragma mapbox: define highp vec4 outline_color
|
|
#pragma mapbox: define lowp float opacity
|
|
void main() {
|
|
#pragma mapbox: initialize highp vec4 outline_color
|
|
#pragma mapbox: initialize lowp float opacity
|
|
gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),it=ro(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
|
|
#pragma mapbox: define lowp float opacity
|
|
#pragma mapbox: define lowp vec4 pattern_from
|
|
#pragma mapbox: define lowp vec4 pattern_to
|
|
void main() {
|
|
#pragma mapbox: initialize lowp float opacity
|
|
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
|
|
#pragma mapbox: define lowp float opacity
|
|
#pragma mapbox: define lowp vec4 pattern_from
|
|
#pragma mapbox: define lowp vec4 pattern_to
|
|
#pragma mapbox: define lowp float pixel_ratio_from
|
|
#pragma mapbox: define lowp float pixel_ratio_to
|
|
void main() {
|
|
#pragma mapbox: initialize lowp float opacity
|
|
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
#pragma mapbox: initialize lowp float pixel_ratio_from
|
|
#pragma mapbox: initialize lowp float pixel_ratio_to
|
|
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fe=ro(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
|
|
#pragma mapbox: define lowp float opacity
|
|
#pragma mapbox: define lowp vec4 pattern_from
|
|
#pragma mapbox: define lowp vec4 pattern_to
|
|
void main() {
|
|
#pragma mapbox: initialize lowp float opacity
|
|
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
|
|
#pragma mapbox: define lowp float opacity
|
|
#pragma mapbox: define lowp vec4 pattern_from
|
|
#pragma mapbox: define lowp vec4 pattern_to
|
|
#pragma mapbox: define lowp float pixel_ratio_from
|
|
#pragma mapbox: define lowp float pixel_ratio_to
|
|
void main() {
|
|
#pragma mapbox: initialize lowp float opacity
|
|
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
#pragma mapbox: initialize lowp float pixel_ratio_from
|
|
#pragma mapbox: initialize lowp float pixel_ratio_to
|
|
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),He=ro(`varying vec4 v_color;void main() {gl_FragColor=v_color;
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;
|
|
#pragma mapbox: define highp float base
|
|
#pragma mapbox: define highp float height
|
|
#pragma mapbox: define highp vec4 color
|
|
void main() {
|
|
#pragma mapbox: initialize highp float base
|
|
#pragma mapbox: initialize highp float height
|
|
#pragma mapbox: initialize highp vec4 color
|
|
vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),br=ro(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
|
|
#pragma mapbox: define lowp float base
|
|
#pragma mapbox: define lowp float height
|
|
#pragma mapbox: define lowp vec4 pattern_from
|
|
#pragma mapbox: define lowp vec4 pattern_to
|
|
#pragma mapbox: define lowp float pixel_ratio_from
|
|
#pragma mapbox: define lowp float pixel_ratio_to
|
|
void main() {
|
|
#pragma mapbox: initialize lowp float base
|
|
#pragma mapbox: initialize lowp float height
|
|
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
#pragma mapbox: initialize lowp float pixel_ratio_from
|
|
#pragma mapbox: initialize lowp float pixel_ratio_to
|
|
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
|
|
#pragma mapbox: define lowp float base
|
|
#pragma mapbox: define lowp float height
|
|
#pragma mapbox: define lowp vec4 pattern_from
|
|
#pragma mapbox: define lowp vec4 pattern_to
|
|
#pragma mapbox: define lowp float pixel_ratio_from
|
|
#pragma mapbox: define lowp float pixel_ratio_to
|
|
void main() {
|
|
#pragma mapbox: initialize lowp float base
|
|
#pragma mapbox: initialize lowp float height
|
|
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
#pragma mapbox: initialize lowp float pixel_ratio_from
|
|
#pragma mapbox: initialize lowp float pixel_ratio_to
|
|
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
|
|
? a_pos
|
|
: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),Ur=ro(`#ifdef GL_ES
|
|
precision highp float;
|
|
#endif
|
|
uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),Nr=ro(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
|
|
#define PI 3.141592653589793
|
|
void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),An=ro(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
|
|
#pragma mapbox: define highp vec4 color
|
|
#pragma mapbox: define lowp float blur
|
|
#pragma mapbox: define lowp float opacity
|
|
void main() {
|
|
#pragma mapbox: initialize highp vec4 color
|
|
#pragma mapbox: initialize lowp float blur
|
|
#pragma mapbox: initialize lowp float opacity
|
|
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,`
|
|
#define scale 0.015873016
|
|
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;
|
|
#pragma mapbox: define highp vec4 color
|
|
#pragma mapbox: define lowp float blur
|
|
#pragma mapbox: define lowp float opacity
|
|
#pragma mapbox: define mediump float gapwidth
|
|
#pragma mapbox: define lowp float offset
|
|
#pragma mapbox: define mediump float width
|
|
void main() {
|
|
#pragma mapbox: initialize highp vec4 color
|
|
#pragma mapbox: initialize lowp float blur
|
|
#pragma mapbox: initialize lowp float opacity
|
|
#pragma mapbox: initialize mediump float gapwidth
|
|
#pragma mapbox: initialize lowp float offset
|
|
#pragma mapbox: initialize mediump float width
|
|
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),Hn=ro(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;
|
|
#pragma mapbox: define lowp float blur
|
|
#pragma mapbox: define lowp float opacity
|
|
void main() {
|
|
#pragma mapbox: initialize lowp float blur
|
|
#pragma mapbox: initialize lowp float opacity
|
|
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,`
|
|
#define scale 0.015873016
|
|
attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;
|
|
#pragma mapbox: define lowp float blur
|
|
#pragma mapbox: define lowp float opacity
|
|
#pragma mapbox: define mediump float gapwidth
|
|
#pragma mapbox: define lowp float offset
|
|
#pragma mapbox: define mediump float width
|
|
void main() {
|
|
#pragma mapbox: initialize lowp float blur
|
|
#pragma mapbox: initialize lowp float opacity
|
|
#pragma mapbox: initialize mediump float gapwidth
|
|
#pragma mapbox: initialize lowp float offset
|
|
#pragma mapbox: initialize mediump float width
|
|
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),Ji=ro(`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
|
|
#pragma mapbox: define lowp vec4 pattern_from
|
|
#pragma mapbox: define lowp vec4 pattern_to
|
|
#pragma mapbox: define lowp float pixel_ratio_from
|
|
#pragma mapbox: define lowp float pixel_ratio_to
|
|
#pragma mapbox: define lowp float blur
|
|
#pragma mapbox: define lowp float opacity
|
|
void main() {
|
|
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
#pragma mapbox: initialize lowp float pixel_ratio_from
|
|
#pragma mapbox: initialize lowp float pixel_ratio_to
|
|
#pragma mapbox: initialize lowp float blur
|
|
#pragma mapbox: initialize lowp float opacity
|
|
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,`
|
|
#define scale 0.015873016
|
|
#define LINE_DISTANCE_SCALE 2.0
|
|
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
|
|
#pragma mapbox: define lowp float blur
|
|
#pragma mapbox: define lowp float opacity
|
|
#pragma mapbox: define lowp float offset
|
|
#pragma mapbox: define mediump float gapwidth
|
|
#pragma mapbox: define mediump float width
|
|
#pragma mapbox: define lowp float floorwidth
|
|
#pragma mapbox: define lowp vec4 pattern_from
|
|
#pragma mapbox: define lowp vec4 pattern_to
|
|
#pragma mapbox: define lowp float pixel_ratio_from
|
|
#pragma mapbox: define lowp float pixel_ratio_to
|
|
void main() {
|
|
#pragma mapbox: initialize lowp float blur
|
|
#pragma mapbox: initialize lowp float opacity
|
|
#pragma mapbox: initialize lowp float offset
|
|
#pragma mapbox: initialize mediump float gapwidth
|
|
#pragma mapbox: initialize mediump float width
|
|
#pragma mapbox: initialize lowp float floorwidth
|
|
#pragma mapbox: initialize mediump vec4 pattern_from
|
|
#pragma mapbox: initialize mediump vec4 pattern_to
|
|
#pragma mapbox: initialize lowp float pixel_ratio_from
|
|
#pragma mapbox: initialize lowp float pixel_ratio_to
|
|
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),ka=ro(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
|
|
#pragma mapbox: define highp vec4 color
|
|
#pragma mapbox: define lowp float blur
|
|
#pragma mapbox: define lowp float opacity
|
|
#pragma mapbox: define mediump float width
|
|
#pragma mapbox: define lowp float floorwidth
|
|
void main() {
|
|
#pragma mapbox: initialize highp vec4 color
|
|
#pragma mapbox: initialize lowp float blur
|
|
#pragma mapbox: initialize lowp float opacity
|
|
#pragma mapbox: initialize mediump float width
|
|
#pragma mapbox: initialize lowp float floorwidth
|
|
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,`
|
|
#define scale 0.015873016
|
|
#define LINE_DISTANCE_SCALE 2.0
|
|
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
|
|
#pragma mapbox: define highp vec4 color
|
|
#pragma mapbox: define lowp float blur
|
|
#pragma mapbox: define lowp float opacity
|
|
#pragma mapbox: define mediump float gapwidth
|
|
#pragma mapbox: define lowp float offset
|
|
#pragma mapbox: define mediump float width
|
|
#pragma mapbox: define lowp float floorwidth
|
|
void main() {
|
|
#pragma mapbox: initialize highp vec4 color
|
|
#pragma mapbox: initialize lowp float blur
|
|
#pragma mapbox: initialize lowp float opacity
|
|
#pragma mapbox: initialize mediump float gapwidth
|
|
#pragma mapbox: initialize lowp float offset
|
|
#pragma mapbox: initialize mediump float width
|
|
#pragma mapbox: initialize lowp float floorwidth
|
|
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),Sa=ro(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),eo=ro(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
|
|
#pragma mapbox: define lowp float opacity
|
|
void main() {
|
|
#pragma mapbox: initialize lowp float opacity
|
|
lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;
|
|
#pragma mapbox: define lowp float opacity
|
|
void main() {
|
|
#pragma mapbox: initialize lowp float opacity
|
|
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
|
|
camera_to_anchor_distance/u_camera_to_center_distance :
|
|
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`),Eo=ro(`#define SDF_PX 8.0
|
|
uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;
|
|
#pragma mapbox: define highp vec4 fill_color
|
|
#pragma mapbox: define highp vec4 halo_color
|
|
#pragma mapbox: define lowp float opacity
|
|
#pragma mapbox: define lowp float halo_width
|
|
#pragma mapbox: define lowp float halo_blur
|
|
void main() {
|
|
#pragma mapbox: initialize highp vec4 fill_color
|
|
#pragma mapbox: initialize highp vec4 halo_color
|
|
#pragma mapbox: initialize lowp float opacity
|
|
#pragma mapbox: initialize lowp float halo_width
|
|
#pragma mapbox: initialize lowp float halo_blur
|
|
float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;
|
|
#pragma mapbox: define highp vec4 fill_color
|
|
#pragma mapbox: define highp vec4 halo_color
|
|
#pragma mapbox: define lowp float opacity
|
|
#pragma mapbox: define lowp float halo_width
|
|
#pragma mapbox: define lowp float halo_blur
|
|
void main() {
|
|
#pragma mapbox: initialize highp vec4 fill_color
|
|
#pragma mapbox: initialize highp vec4 halo_color
|
|
#pragma mapbox: initialize lowp float opacity
|
|
#pragma mapbox: initialize lowp float halo_width
|
|
#pragma mapbox: initialize lowp float halo_blur
|
|
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
|
|
camera_to_anchor_distance/u_camera_to_center_distance :
|
|
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),So=ro(`#define SDF_PX 8.0
|
|
#define SDF 1.0
|
|
#define ICON 0.0
|
|
uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;
|
|
#pragma mapbox: define highp vec4 fill_color
|
|
#pragma mapbox: define highp vec4 halo_color
|
|
#pragma mapbox: define lowp float opacity
|
|
#pragma mapbox: define lowp float halo_width
|
|
#pragma mapbox: define lowp float halo_blur
|
|
void main() {
|
|
#pragma mapbox: initialize highp vec4 fill_color
|
|
#pragma mapbox: initialize highp vec4 halo_color
|
|
#pragma mapbox: initialize lowp float opacity
|
|
#pragma mapbox: initialize lowp float halo_width
|
|
#pragma mapbox: initialize lowp float halo_blur
|
|
float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
gl_FragColor=vec4(1.0);
|
|
#endif
|
|
}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;
|
|
#pragma mapbox: define highp vec4 fill_color
|
|
#pragma mapbox: define highp vec4 halo_color
|
|
#pragma mapbox: define lowp float opacity
|
|
#pragma mapbox: define lowp float halo_width
|
|
#pragma mapbox: define lowp float halo_blur
|
|
void main() {
|
|
#pragma mapbox: initialize highp vec4 fill_color
|
|
#pragma mapbox: initialize highp vec4 halo_color
|
|
#pragma mapbox: initialize lowp float opacity
|
|
#pragma mapbox: initialize lowp float halo_width
|
|
#pragma mapbox: initialize lowp float halo_blur
|
|
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
|
|
camera_to_anchor_distance/u_camera_to_center_distance :
|
|
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`);function ro(x,C){var E=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,M=C.match(/attribute ([\w]+) ([\w]+)/g),U=x.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),H=C.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),$=H?H.concat(U):U,ht={};return{fragmentSource:x=x.replace(E,function(Ut,re,Fe,Re,De){return ht[De]=!0,re==="define"?`
|
|
#ifndef HAS_UNIFORM_u_`+De+`
|
|
varying `+Fe+" "+Re+" "+De+`;
|
|
#else
|
|
uniform `+Fe+" "+Re+" u_"+De+`;
|
|
#endif
|
|
`:`
|
|
#ifdef HAS_UNIFORM_u_`+De+`
|
|
`+Fe+" "+Re+" "+De+" = u_"+De+`;
|
|
#endif
|
|
`}),vertexSource:C=C.replace(E,function(Ut,re,Fe,Re,De){var cr=Re==="float"?"vec2":"vec4",ur=De.match(/color/)?"color":cr;return ht[De]?re==="define"?`
|
|
#ifndef HAS_UNIFORM_u_`+De+`
|
|
uniform lowp float u_`+De+`_t;
|
|
attribute `+Fe+" "+cr+" a_"+De+`;
|
|
varying `+Fe+" "+Re+" "+De+`;
|
|
#else
|
|
uniform `+Fe+" "+Re+" u_"+De+`;
|
|
#endif
|
|
`:ur==="vec4"?`
|
|
#ifndef HAS_UNIFORM_u_`+De+`
|
|
`+De+" = a_"+De+`;
|
|
#else
|
|
`+Fe+" "+Re+" "+De+" = u_"+De+`;
|
|
#endif
|
|
`:`
|
|
#ifndef HAS_UNIFORM_u_`+De+`
|
|
`+De+" = unpack_mix_"+ur+"(a_"+De+", u_"+De+`_t);
|
|
#else
|
|
`+Fe+" "+Re+" "+De+" = u_"+De+`;
|
|
#endif
|
|
`:re==="define"?`
|
|
#ifndef HAS_UNIFORM_u_`+De+`
|
|
uniform lowp float u_`+De+`_t;
|
|
attribute `+Fe+" "+cr+" a_"+De+`;
|
|
#else
|
|
uniform `+Fe+" "+Re+" u_"+De+`;
|
|
#endif
|
|
`:ur==="vec4"?`
|
|
#ifndef HAS_UNIFORM_u_`+De+`
|
|
`+Fe+" "+Re+" "+De+" = a_"+De+`;
|
|
#else
|
|
`+Fe+" "+Re+" "+De+" = u_"+De+`;
|
|
#endif
|
|
`:`
|
|
#ifndef HAS_UNIFORM_u_`+De+`
|
|
`+Fe+" "+Re+" "+De+" = unpack_mix_"+ur+"(a_"+De+", u_"+De+`_t);
|
|
#else
|
|
`+Fe+" "+Re+" "+De+" = u_"+De+`;
|
|
#endif
|
|
`}),staticAttributes:M,staticUniforms:$}}var pu=Object.freeze({__proto__:null,prelude:js,background:Rc,backgroundPattern:qc,circle:Tu,clippingMask:Zl,heatmap:Cs,heatmapTexture:Zu,collisionBox:ja,collisionCircle:Dc,debug:D,fill:X,fillOutline:Mt,fillOutlinePattern:it,fillPattern:fe,fillExtrusion:He,fillExtrusionPattern:br,hillshadePrepare:Ur,hillshade:Nr,line:An,lineGradient:Hn,linePattern:Ji,lineSDF:ka,raster:Sa,symbolIcon:eo,symbolSDF:Eo,symbolTextAndIcon:So}),Il=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function bl(x){for(var C=[],E=0;E<x.length;E++)if(x[E]!==null){var M=x[E].split(" ");C.push(M.pop())}return C}Il.prototype.bind=function(x,C,E,M,U,H,$,ht){this.context=x;for(var Ut=this.boundPaintVertexBuffers.length!==M.length,re=0;!Ut&&re<M.length;re++)this.boundPaintVertexBuffers[re]!==M[re]&&(Ut=!0);x.extVertexArrayObject&&this.vao&&this.boundProgram===C&&this.boundLayoutVertexBuffer===E&&!Ut&&this.boundIndexBuffer===U&&this.boundVertexOffset===H&&this.boundDynamicVertexBuffer===$&&this.boundDynamicVertexBuffer2===ht?(x.bindVertexArrayOES.set(this.vao),$&&$.bind(),U&&U.dynamicDraw&&U.bind(),ht&&ht.bind()):this.freshBind(C,E,M,U,H,$,ht)},Il.prototype.freshBind=function(x,C,E,M,U,H,$){var ht,Ut=x.numAttributes,re=this.context,Fe=re.gl;if(re.extVertexArrayObject)this.vao&&this.destroy(),this.vao=re.extVertexArrayObject.createVertexArrayOES(),re.bindVertexArrayOES.set(this.vao),ht=0,this.boundProgram=x,this.boundLayoutVertexBuffer=C,this.boundPaintVertexBuffers=E,this.boundIndexBuffer=M,this.boundVertexOffset=U,this.boundDynamicVertexBuffer=H,this.boundDynamicVertexBuffer2=$;else{ht=re.currentNumAttributes||0;for(var Re=Ut;Re<ht;Re++)Fe.disableVertexAttribArray(Re)}C.enableAttributes(Fe,x);for(var De=0,cr=E;De<cr.length;De+=1)cr[De].enableAttributes(Fe,x);H&&H.enableAttributes(Fe,x),$&&$.enableAttributes(Fe,x),C.bind(),C.setVertexAttribPointers(Fe,x,U);for(var ur=0,Er=E;ur<Er.length;ur+=1){var nr=Er[ur];nr.bind(),nr.setVertexAttribPointers(Fe,x,U)}H&&(H.bind(),H.setVertexAttribPointers(Fe,x,U)),M&&M.bind(),$&&($.bind(),$.setVertexAttribPointers(Fe,x,U)),re.currentNumAttributes=Ut},Il.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var Vl=function(x,C,E,M,U,H){var $=x.gl;this.program=$.createProgram();for(var ht=bl(E.staticAttributes),Ut=M?M.getBinderAttributes():[],re=ht.concat(Ut),Fe=E.staticUniforms?bl(E.staticUniforms):[],Re=M?M.getBinderUniforms():[],De=[],cr=0,ur=Fe.concat(Re);cr<ur.length;cr+=1){var Er=ur[cr];De.indexOf(Er)<0&&De.push(Er)}var nr=M?M.defines():[];H&&nr.push("#define OVERDRAW_INSPECTOR;");var wr=nr.concat(js.fragmentSource,E.fragmentSource).join(`
|
|
`),Ir=nr.concat(js.vertexSource,E.vertexSource).join(`
|
|
`),$r=$.createShader($.FRAGMENT_SHADER);if($.isContextLost())this.failedToCreate=!0;else{$.shaderSource($r,wr),$.compileShader($r),$.attachShader(this.program,$r);var gn=$.createShader($.VERTEX_SHADER);if($.isContextLost())this.failedToCreate=!0;else{$.shaderSource(gn,Ir),$.compileShader(gn),$.attachShader(this.program,gn),this.attributes={};var dn={};this.numAttributes=re.length;for(var xn=0;xn<this.numAttributes;xn++)re[xn]&&($.bindAttribLocation(this.program,xn,re[xn]),this.attributes[re[xn]]=xn);$.linkProgram(this.program),$.deleteShader(gn),$.deleteShader($r);for(var Un=0;Un<De.length;Un++){var yi=De[Un];if(yi&&!dn[yi]){var ui=$.getUniformLocation(this.program,yi);ui&&(dn[yi]=ui)}}this.fixedUniforms=U(x,dn),this.binderUniforms=M?M.getUniforms(x,dn):[]}}};function ul(x,C,E){var M=1/Cn(E,1,C.transform.tileZoom),U=Math.pow(2,E.tileID.overscaledZ),H=E.tileSize*Math.pow(2,C.transform.tileZoom)/U,$=H*(E.tileID.canonical.x+E.tileID.wrap*U),ht=H*E.tileID.canonical.y;return{u_image:0,u_texsize:E.imageAtlasTexture.size,u_scale:[M,x.fromScale,x.toScale],u_fade:x.t,u_pixel_coord_upper:[$>>16,ht>>16],u_pixel_coord_lower:[65535&$,65535&ht]}}Vl.prototype.draw=function(x,C,E,M,U,H,$,ht,Ut,re,Fe,Re,De,cr,ur,Er){var nr,wr=x.gl;if(!this.failedToCreate){for(var Ir in x.program.set(this.program),x.setDepthMode(E),x.setStencilMode(M),x.setColorMode(U),x.setCullFace(H),this.fixedUniforms)this.fixedUniforms[Ir].set($[Ir]);cr&&cr.setUniforms(x,this.binderUniforms,Re,{zoom:De});for(var $r=(nr={},nr[wr.LINES]=2,nr[wr.TRIANGLES]=3,nr[wr.LINE_STRIP]=1,nr)[C],gn=0,dn=Fe.get();gn<dn.length;gn+=1){var xn=dn[gn],Un=xn.vaos||(xn.vaos={});(Un[ht]||(Un[ht]=new Il)).bind(x,this,Ut,cr?cr.getPaintVertexBuffers():[],re,xn.vertexOffset,ur,Er),wr.drawElements(C,xn.primitiveLength*$r,wr.UNSIGNED_SHORT,xn.primitiveOffset*$r*2)}}};var Gl=function(x,C,E,M){var U=C.style.light,H=U.properties.get("position"),$=[H.x,H.y,H.z],ht=k.create$1();U.properties.get("anchor")==="viewport"&&k.fromRotation(ht,-C.transform.angle),k.transformMat3($,$,ht);var Ut=U.properties.get("color");return{u_matrix:x,u_lightpos:$,u_lightintensity:U.properties.get("intensity"),u_lightcolor:[Ut.r,Ut.g,Ut.b],u_vertical_gradient:+E,u_opacity:M}},Vu=function(x,C,E,M,U,H,$){return k.extend(Gl(x,C,E,M),ul(H,C,$),{u_height_factor:-Math.pow(2,U.overscaledZ)/$.tileSize/8})},cs=function(x){return{u_matrix:x}},pe=function(x,C,E,M){return k.extend(cs(x),ul(E,C,M))},ar=function(x,C){return{u_matrix:x,u_world:C}},Fr=function(x,C,E,M,U){return k.extend(pe(x,C,E,M),{u_world:U})},Xr=function(x,C,E,M){var U,H,$=x.transform;if(M.paint.get("circle-pitch-alignment")==="map"){var ht=Cn(E,1,$.zoom);U=!0,H=[ht,ht]}else U=!1,H=$.pixelsToGLUnits;return{u_camera_to_center_distance:$.cameraToCenterDistance,u_scale_with_map:+(M.paint.get("circle-pitch-scale")==="map"),u_matrix:x.translatePosMatrix(C.posMatrix,E,M.paint.get("circle-translate"),M.paint.get("circle-translate-anchor")),u_pitch_with_map:+U,u_device_pixel_ratio:k.browser.devicePixelRatio,u_extrude_scale:H}},_n=function(x,C,E){var M=Cn(E,1,C.zoom),U=Math.pow(2,C.zoom-E.tileID.overscaledZ),H=E.tileID.overscaleFactor();return{u_matrix:x,u_camera_to_center_distance:C.cameraToCenterDistance,u_pixels_to_tile_units:M,u_extrude_scale:[C.pixelsToGLUnits[0]/(M*U),C.pixelsToGLUnits[1]/(M*U)],u_overscale_factor:H}},ki=function(x,C,E){return{u_matrix:x,u_inv_matrix:C,u_camera_to_center_distance:E.cameraToCenterDistance,u_viewport_size:[E.width,E.height]}},ia=function(x,C,E){return E===void 0&&(E=1),{u_matrix:x,u_color:C,u_overlay:0,u_overlay_scale:E}},$a=function(x){return{u_matrix:x}},du=function(x,C,E,M){return{u_matrix:x,u_extrude_scale:Cn(C,1,E),u_intensity:M}},au=function(x,C,E){var M=x.transform;return{u_matrix:fd(x,C,E),u_ratio:1/Cn(C,1,M.zoom),u_device_pixel_ratio:k.browser.devicePixelRatio,u_units_to_pixels:[1/M.pixelsToGLUnits[0],1/M.pixelsToGLUnits[1]]}},Xa=function(x,C,E,M){return k.extend(au(x,C,E),{u_image:0,u_image_height:M})},Gu=function(x,C,E,M){var U=x.transform,H=Hl(C,U);return{u_matrix:fd(x,C,E),u_texsize:C.imageAtlasTexture.size,u_ratio:1/Cn(C,1,U.zoom),u_device_pixel_ratio:k.browser.devicePixelRatio,u_image:0,u_scale:[H,M.fromScale,M.toScale],u_fade:M.t,u_units_to_pixels:[1/U.pixelsToGLUnits[0],1/U.pixelsToGLUnits[1]]}},Vh=function(x,C,E,M,U){var H=x.lineAtlas,$=Hl(C,x.transform),ht=E.layout.get("line-cap")==="round",Ut=H.getDash(M.from,ht),re=H.getDash(M.to,ht),Fe=Ut.width*U.fromScale,Re=re.width*U.toScale;return k.extend(au(x,C,E),{u_patternscale_a:[$/Fe,-Ut.height/2],u_patternscale_b:[$/Re,-re.height/2],u_sdfgamma:H.width/(256*Math.min(Fe,Re)*k.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:Ut.y,u_tex_y_b:re.y,u_mix:U.t})};function Hl(x,C){return 1/Cn(x,1,C.tileZoom)}function fd(x,C,E){return x.translatePosMatrix(C.tileID.posMatrix,C,E.paint.get("line-translate"),E.paint.get("line-translate-anchor"))}var Bc=function(x,C,E,M,U){return{u_matrix:x,u_tl_parent:C,u_scale_parent:E,u_buffer_scale:1,u_fade_t:M.mix,u_opacity:M.opacity*U.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:U.paint.get("raster-brightness-min"),u_brightness_high:U.paint.get("raster-brightness-max"),u_saturation_factor:($=U.paint.get("raster-saturation"),$>0?1-1/(1.001-$):-$),u_contrast_factor:(H=U.paint.get("raster-contrast"),H>0?1/(1-H):1+H),u_spin_weights:kl(U.paint.get("raster-hue-rotate"))};var H,$};function kl(x){x*=Math.PI/180;var C=Math.sin(x),E=Math.cos(x);return[(2*E+1)/3,(-Math.sqrt(3)*C-E+1)/3,(Math.sqrt(3)*C-E+1)/3]}var Ap,Ef=function(x,C,E,M,U,H,$,ht,Ut,re){var Fe=U.transform;return{u_is_size_zoom_constant:+(x==="constant"||x==="source"),u_is_size_feature_constant:+(x==="constant"||x==="camera"),u_size_t:C?C.uSizeT:0,u_size:C?C.uSize:0,u_camera_to_center_distance:Fe.cameraToCenterDistance,u_pitch:Fe.pitch/360*2*Math.PI,u_rotate_symbol:+E,u_aspect_ratio:Fe.width/Fe.height,u_fade_change:U.options.fadeDuration?U.symbolFadeChange:1,u_matrix:H,u_label_plane_matrix:$,u_coord_matrix:ht,u_is_text:+Ut,u_pitch_with_map:+M,u_texsize:re,u_texture:0}},Kc=function(x,C,E,M,U,H,$,ht,Ut,re,Fe){var Re=U.transform;return k.extend(Ef(x,C,E,M,U,H,$,ht,Ut,re),{u_gamma_scale:M?Math.cos(Re._pitch)*Re.cameraToCenterDistance:1,u_device_pixel_ratio:k.browser.devicePixelRatio,u_is_halo:+Fe})},wf=function(x,C,E,M,U,H,$,ht,Ut,re){return k.extend(Kc(x,C,E,M,U,H,$,ht,!0,Ut,!0),{u_texsize_icon:re,u_texture_icon:1})},Sf=function(x,C,E){return{u_matrix:x,u_opacity:C,u_color:E}},Cf=function(x,C,E,M,U,H){return k.extend(function($,ht,Ut,re){var Fe=Ut.imageManager.getPattern($.from.toString()),Re=Ut.imageManager.getPattern($.to.toString()),De=Ut.imageManager.getPixelSize(),cr=De.width,ur=De.height,Er=Math.pow(2,re.tileID.overscaledZ),nr=re.tileSize*Math.pow(2,Ut.transform.tileZoom)/Er,wr=nr*(re.tileID.canonical.x+re.tileID.wrap*Er),Ir=nr*re.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Fe.tl,u_pattern_br_a:Fe.br,u_pattern_tl_b:Re.tl,u_pattern_br_b:Re.br,u_texsize:[cr,ur],u_mix:ht.t,u_pattern_size_a:Fe.displaySize,u_pattern_size_b:Re.displaySize,u_scale_a:ht.fromScale,u_scale_b:ht.toScale,u_tile_units_to_pixels:1/Cn(re,1,Ut.transform.tileZoom),u_pixel_coord_upper:[wr>>16,Ir>>16],u_pixel_coord_lower:[65535&wr,65535&Ir]}}(M,H,E,U),{u_matrix:x,u_opacity:C})},ll={fillExtrusion:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_lightpos:new k.Uniform3f(x,C.u_lightpos),u_lightintensity:new k.Uniform1f(x,C.u_lightintensity),u_lightcolor:new k.Uniform3f(x,C.u_lightcolor),u_vertical_gradient:new k.Uniform1f(x,C.u_vertical_gradient),u_opacity:new k.Uniform1f(x,C.u_opacity)}},fillExtrusionPattern:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_lightpos:new k.Uniform3f(x,C.u_lightpos),u_lightintensity:new k.Uniform1f(x,C.u_lightintensity),u_lightcolor:new k.Uniform3f(x,C.u_lightcolor),u_vertical_gradient:new k.Uniform1f(x,C.u_vertical_gradient),u_height_factor:new k.Uniform1f(x,C.u_height_factor),u_image:new k.Uniform1i(x,C.u_image),u_texsize:new k.Uniform2f(x,C.u_texsize),u_pixel_coord_upper:new k.Uniform2f(x,C.u_pixel_coord_upper),u_pixel_coord_lower:new k.Uniform2f(x,C.u_pixel_coord_lower),u_scale:new k.Uniform3f(x,C.u_scale),u_fade:new k.Uniform1f(x,C.u_fade),u_opacity:new k.Uniform1f(x,C.u_opacity)}},fill:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix)}},fillPattern:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_image:new k.Uniform1i(x,C.u_image),u_texsize:new k.Uniform2f(x,C.u_texsize),u_pixel_coord_upper:new k.Uniform2f(x,C.u_pixel_coord_upper),u_pixel_coord_lower:new k.Uniform2f(x,C.u_pixel_coord_lower),u_scale:new k.Uniform3f(x,C.u_scale),u_fade:new k.Uniform1f(x,C.u_fade)}},fillOutline:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_world:new k.Uniform2f(x,C.u_world)}},fillOutlinePattern:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_world:new k.Uniform2f(x,C.u_world),u_image:new k.Uniform1i(x,C.u_image),u_texsize:new k.Uniform2f(x,C.u_texsize),u_pixel_coord_upper:new k.Uniform2f(x,C.u_pixel_coord_upper),u_pixel_coord_lower:new k.Uniform2f(x,C.u_pixel_coord_lower),u_scale:new k.Uniform3f(x,C.u_scale),u_fade:new k.Uniform1f(x,C.u_fade)}},circle:function(x,C){return{u_camera_to_center_distance:new k.Uniform1f(x,C.u_camera_to_center_distance),u_scale_with_map:new k.Uniform1i(x,C.u_scale_with_map),u_pitch_with_map:new k.Uniform1i(x,C.u_pitch_with_map),u_extrude_scale:new k.Uniform2f(x,C.u_extrude_scale),u_device_pixel_ratio:new k.Uniform1f(x,C.u_device_pixel_ratio),u_matrix:new k.UniformMatrix4f(x,C.u_matrix)}},collisionBox:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_camera_to_center_distance:new k.Uniform1f(x,C.u_camera_to_center_distance),u_pixels_to_tile_units:new k.Uniform1f(x,C.u_pixels_to_tile_units),u_extrude_scale:new k.Uniform2f(x,C.u_extrude_scale),u_overscale_factor:new k.Uniform1f(x,C.u_overscale_factor)}},collisionCircle:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_inv_matrix:new k.UniformMatrix4f(x,C.u_inv_matrix),u_camera_to_center_distance:new k.Uniform1f(x,C.u_camera_to_center_distance),u_viewport_size:new k.Uniform2f(x,C.u_viewport_size)}},debug:function(x,C){return{u_color:new k.UniformColor(x,C.u_color),u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_overlay:new k.Uniform1i(x,C.u_overlay),u_overlay_scale:new k.Uniform1f(x,C.u_overlay_scale)}},clippingMask:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix)}},heatmap:function(x,C){return{u_extrude_scale:new k.Uniform1f(x,C.u_extrude_scale),u_intensity:new k.Uniform1f(x,C.u_intensity),u_matrix:new k.UniformMatrix4f(x,C.u_matrix)}},heatmapTexture:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_world:new k.Uniform2f(x,C.u_world),u_image:new k.Uniform1i(x,C.u_image),u_color_ramp:new k.Uniform1i(x,C.u_color_ramp),u_opacity:new k.Uniform1f(x,C.u_opacity)}},hillshade:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_image:new k.Uniform1i(x,C.u_image),u_latrange:new k.Uniform2f(x,C.u_latrange),u_light:new k.Uniform2f(x,C.u_light),u_shadow:new k.UniformColor(x,C.u_shadow),u_highlight:new k.UniformColor(x,C.u_highlight),u_accent:new k.UniformColor(x,C.u_accent)}},hillshadePrepare:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_image:new k.Uniform1i(x,C.u_image),u_dimension:new k.Uniform2f(x,C.u_dimension),u_zoom:new k.Uniform1f(x,C.u_zoom),u_unpack:new k.Uniform4f(x,C.u_unpack)}},line:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_ratio:new k.Uniform1f(x,C.u_ratio),u_device_pixel_ratio:new k.Uniform1f(x,C.u_device_pixel_ratio),u_units_to_pixels:new k.Uniform2f(x,C.u_units_to_pixels)}},lineGradient:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_ratio:new k.Uniform1f(x,C.u_ratio),u_device_pixel_ratio:new k.Uniform1f(x,C.u_device_pixel_ratio),u_units_to_pixels:new k.Uniform2f(x,C.u_units_to_pixels),u_image:new k.Uniform1i(x,C.u_image),u_image_height:new k.Uniform1f(x,C.u_image_height)}},linePattern:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_texsize:new k.Uniform2f(x,C.u_texsize),u_ratio:new k.Uniform1f(x,C.u_ratio),u_device_pixel_ratio:new k.Uniform1f(x,C.u_device_pixel_ratio),u_image:new k.Uniform1i(x,C.u_image),u_units_to_pixels:new k.Uniform2f(x,C.u_units_to_pixels),u_scale:new k.Uniform3f(x,C.u_scale),u_fade:new k.Uniform1f(x,C.u_fade)}},lineSDF:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_ratio:new k.Uniform1f(x,C.u_ratio),u_device_pixel_ratio:new k.Uniform1f(x,C.u_device_pixel_ratio),u_units_to_pixels:new k.Uniform2f(x,C.u_units_to_pixels),u_patternscale_a:new k.Uniform2f(x,C.u_patternscale_a),u_patternscale_b:new k.Uniform2f(x,C.u_patternscale_b),u_sdfgamma:new k.Uniform1f(x,C.u_sdfgamma),u_image:new k.Uniform1i(x,C.u_image),u_tex_y_a:new k.Uniform1f(x,C.u_tex_y_a),u_tex_y_b:new k.Uniform1f(x,C.u_tex_y_b),u_mix:new k.Uniform1f(x,C.u_mix)}},raster:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_tl_parent:new k.Uniform2f(x,C.u_tl_parent),u_scale_parent:new k.Uniform1f(x,C.u_scale_parent),u_buffer_scale:new k.Uniform1f(x,C.u_buffer_scale),u_fade_t:new k.Uniform1f(x,C.u_fade_t),u_opacity:new k.Uniform1f(x,C.u_opacity),u_image0:new k.Uniform1i(x,C.u_image0),u_image1:new k.Uniform1i(x,C.u_image1),u_brightness_low:new k.Uniform1f(x,C.u_brightness_low),u_brightness_high:new k.Uniform1f(x,C.u_brightness_high),u_saturation_factor:new k.Uniform1f(x,C.u_saturation_factor),u_contrast_factor:new k.Uniform1f(x,C.u_contrast_factor),u_spin_weights:new k.Uniform3f(x,C.u_spin_weights)}},symbolIcon:function(x,C){return{u_is_size_zoom_constant:new k.Uniform1i(x,C.u_is_size_zoom_constant),u_is_size_feature_constant:new k.Uniform1i(x,C.u_is_size_feature_constant),u_size_t:new k.Uniform1f(x,C.u_size_t),u_size:new k.Uniform1f(x,C.u_size),u_camera_to_center_distance:new k.Uniform1f(x,C.u_camera_to_center_distance),u_pitch:new k.Uniform1f(x,C.u_pitch),u_rotate_symbol:new k.Uniform1i(x,C.u_rotate_symbol),u_aspect_ratio:new k.Uniform1f(x,C.u_aspect_ratio),u_fade_change:new k.Uniform1f(x,C.u_fade_change),u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_label_plane_matrix:new k.UniformMatrix4f(x,C.u_label_plane_matrix),u_coord_matrix:new k.UniformMatrix4f(x,C.u_coord_matrix),u_is_text:new k.Uniform1i(x,C.u_is_text),u_pitch_with_map:new k.Uniform1i(x,C.u_pitch_with_map),u_texsize:new k.Uniform2f(x,C.u_texsize),u_texture:new k.Uniform1i(x,C.u_texture)}},symbolSDF:function(x,C){return{u_is_size_zoom_constant:new k.Uniform1i(x,C.u_is_size_zoom_constant),u_is_size_feature_constant:new k.Uniform1i(x,C.u_is_size_feature_constant),u_size_t:new k.Uniform1f(x,C.u_size_t),u_size:new k.Uniform1f(x,C.u_size),u_camera_to_center_distance:new k.Uniform1f(x,C.u_camera_to_center_distance),u_pitch:new k.Uniform1f(x,C.u_pitch),u_rotate_symbol:new k.Uniform1i(x,C.u_rotate_symbol),u_aspect_ratio:new k.Uniform1f(x,C.u_aspect_ratio),u_fade_change:new k.Uniform1f(x,C.u_fade_change),u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_label_plane_matrix:new k.UniformMatrix4f(x,C.u_label_plane_matrix),u_coord_matrix:new k.UniformMatrix4f(x,C.u_coord_matrix),u_is_text:new k.Uniform1i(x,C.u_is_text),u_pitch_with_map:new k.Uniform1i(x,C.u_pitch_with_map),u_texsize:new k.Uniform2f(x,C.u_texsize),u_texture:new k.Uniform1i(x,C.u_texture),u_gamma_scale:new k.Uniform1f(x,C.u_gamma_scale),u_device_pixel_ratio:new k.Uniform1f(x,C.u_device_pixel_ratio),u_is_halo:new k.Uniform1i(x,C.u_is_halo)}},symbolTextAndIcon:function(x,C){return{u_is_size_zoom_constant:new k.Uniform1i(x,C.u_is_size_zoom_constant),u_is_size_feature_constant:new k.Uniform1i(x,C.u_is_size_feature_constant),u_size_t:new k.Uniform1f(x,C.u_size_t),u_size:new k.Uniform1f(x,C.u_size),u_camera_to_center_distance:new k.Uniform1f(x,C.u_camera_to_center_distance),u_pitch:new k.Uniform1f(x,C.u_pitch),u_rotate_symbol:new k.Uniform1i(x,C.u_rotate_symbol),u_aspect_ratio:new k.Uniform1f(x,C.u_aspect_ratio),u_fade_change:new k.Uniform1f(x,C.u_fade_change),u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_label_plane_matrix:new k.UniformMatrix4f(x,C.u_label_plane_matrix),u_coord_matrix:new k.UniformMatrix4f(x,C.u_coord_matrix),u_is_text:new k.Uniform1i(x,C.u_is_text),u_pitch_with_map:new k.Uniform1i(x,C.u_pitch_with_map),u_texsize:new k.Uniform2f(x,C.u_texsize),u_texsize_icon:new k.Uniform2f(x,C.u_texsize_icon),u_texture:new k.Uniform1i(x,C.u_texture),u_texture_icon:new k.Uniform1i(x,C.u_texture_icon),u_gamma_scale:new k.Uniform1f(x,C.u_gamma_scale),u_device_pixel_ratio:new k.Uniform1f(x,C.u_device_pixel_ratio),u_is_halo:new k.Uniform1i(x,C.u_is_halo)}},background:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_opacity:new k.Uniform1f(x,C.u_opacity),u_color:new k.UniformColor(x,C.u_color)}},backgroundPattern:function(x,C){return{u_matrix:new k.UniformMatrix4f(x,C.u_matrix),u_opacity:new k.Uniform1f(x,C.u_opacity),u_image:new k.Uniform1i(x,C.u_image),u_pattern_tl_a:new k.Uniform2f(x,C.u_pattern_tl_a),u_pattern_br_a:new k.Uniform2f(x,C.u_pattern_br_a),u_pattern_tl_b:new k.Uniform2f(x,C.u_pattern_tl_b),u_pattern_br_b:new k.Uniform2f(x,C.u_pattern_br_b),u_texsize:new k.Uniform2f(x,C.u_texsize),u_mix:new k.Uniform1f(x,C.u_mix),u_pattern_size_a:new k.Uniform2f(x,C.u_pattern_size_a),u_pattern_size_b:new k.Uniform2f(x,C.u_pattern_size_b),u_scale_a:new k.Uniform1f(x,C.u_scale_a),u_scale_b:new k.Uniform1f(x,C.u_scale_b),u_pixel_coord_upper:new k.Uniform2f(x,C.u_pixel_coord_upper),u_pixel_coord_lower:new k.Uniform2f(x,C.u_pixel_coord_lower),u_tile_units_to_pixels:new k.Uniform1f(x,C.u_tile_units_to_pixels)}}};function Nc(x,C,E,M,U,H,$){for(var ht=x.context,Ut=ht.gl,re=x.useProgram("collisionBox"),Fe=[],Re=0,De=0,cr=0;cr<M.length;cr++){var ur=M[cr],Er=C.getTile(ur),nr=Er.getBucket(E);if(nr){var wr=ur.posMatrix;U[0]===0&&U[1]===0||(wr=x.translatePosMatrix(ur.posMatrix,Er,U,H));var Ir=$?nr.textCollisionBox:nr.iconCollisionBox,$r=nr.collisionCircleArray;if($r.length>0){var gn=k.create(),dn=wr;k.mul(gn,nr.placementInvProjMatrix,x.transform.glCoordMatrix),k.mul(gn,gn,nr.placementViewportMatrix),Fe.push({circleArray:$r,circleOffset:De,transform:dn,invTransform:gn}),De=Re+=$r.length/4}Ir&&re.draw(ht,Ut.LINES,ye.disabled,Ze.disabled,x.colorModeForRenderPass(),_r.disabled,_n(wr,x.transform,Er),E.id,Ir.layoutVertexBuffer,Ir.indexBuffer,Ir.segments,null,x.transform.zoom,null,null,Ir.collisionVertexBuffer)}}if($&&Fe.length){var xn=x.useProgram("collisionCircle"),Un=new k.StructArrayLayout2f1f2i16;Un.resize(4*Re),Un._trim();for(var yi=0,ui=0,Bi=Fe;ui<Bi.length;ui+=1)for(var sa=Bi[ui],ua=0;ua<sa.circleArray.length/4;ua++){var ha=4*ua,uo=sa.circleArray[ha+0],Ni=sa.circleArray[ha+1],La=sa.circleArray[ha+2],Ra=sa.circleArray[ha+3];Un.emplace(yi++,uo,Ni,La,Ra,0),Un.emplace(yi++,uo,Ni,La,Ra,1),Un.emplace(yi++,uo,Ni,La,Ra,2),Un.emplace(yi++,uo,Ni,La,Ra,3)}(!Ap||Ap.length<2*Re)&&(Ap=function(As){var mu=2*As,yu=new k.StructArrayLayout3ui6;yu.resize(mu),yu._trim();for(var ss=0;ss<mu;ss++){var Ms=6*ss;yu.uint16[Ms+0]=4*ss+0,yu.uint16[Ms+1]=4*ss+1,yu.uint16[Ms+2]=4*ss+2,yu.uint16[Ms+3]=4*ss+2,yu.uint16[Ms+4]=4*ss+3,yu.uint16[Ms+5]=4*ss+0}return yu}(Re));for(var Ta=ht.createIndexBuffer(Ap,!0),_a=ht.createVertexBuffer(Un,k.collisionCircleLayout.members,!0),za=0,xa=Fe;za<xa.length;za+=1){var ga=xa[za],Qs=ki(ga.transform,ga.invTransform,x.transform);xn.draw(ht,Ut.TRIANGLES,ye.disabled,Ze.disabled,x.colorModeForRenderPass(),_r.disabled,Qs,E.id,_a,Ta,k.SegmentVector.simpleSegment(0,2*ga.circleOffset,ga.circleArray.length,ga.circleArray.length/2),null,x.transform.zoom,null,null,null)}_a.destroy(),Ta.destroy()}}var nc=k.identity(new Float32Array(16));function Lo(x,C,E,M,U,H){var $=k.getAnchorAlignment(x),ht=-($.horizontalAlign-.5)*C,Ut=-($.verticalAlign-.5)*E,re=k.evaluateVariableOffset(x,M);return new k.Point((ht/U+re[0])*H,(Ut/U+re[1])*H)}function zc(x,C,E,M,U,H,$,ht,Ut,re,Fe){var Re=x.text.placedSymbolArray,De=x.text.dynamicLayoutVertexArray,cr=x.icon.dynamicLayoutVertexArray,ur={};De.clear();for(var Er=0;Er<Re.length;Er++){var nr=Re.get(Er),wr=nr.hidden||!nr.crossTileID||x.allowVerticalPlacement&&!nr.placedOrientation?null:M[nr.crossTileID];if(wr){var Ir=new k.Point(nr.anchorX,nr.anchorY),$r=Va(Ir,E?ht:$),gn=Ya(H.cameraToCenterDistance,$r.signedDistanceFromCamera),dn=U.evaluateSizeForFeature(x.textSizeData,re,nr)*gn/k.ONE_EM;E&&(dn*=x.tilePixelRatio/Ut);for(var xn=Lo(wr.anchor,wr.width,wr.height,wr.textOffset,wr.textBoxScale,dn),Un=E?Va(Ir.add(xn),$).point:$r.point.add(C?xn.rotate(-H.angle):xn),yi=x.allowVerticalPlacement&&nr.placedOrientation===k.WritingMode.vertical?Math.PI/2:0,ui=0;ui<nr.numGlyphs;ui++)k.addDynamicAttributes(De,Un,yi);Fe&&nr.associatedIconIndex>=0&&(ur[nr.associatedIconIndex]={shiftedAnchor:Un,angle:yi})}else rn(nr.numGlyphs,De)}if(Fe){cr.clear();for(var Bi=x.icon.placedSymbolArray,sa=0;sa<Bi.length;sa++){var ua=Bi.get(sa);if(ua.hidden)rn(ua.numGlyphs,cr);else{var ha=ur[sa];if(ha)for(var uo=0;uo<ua.numGlyphs;uo++)k.addDynamicAttributes(cr,ha.shiftedAnchor,ha.angle);else rn(ua.numGlyphs,cr)}}x.icon.dynamicLayoutVertexBuffer.updateData(cr)}x.text.dynamicLayoutVertexBuffer.updateData(De)}function vc(x,C,E){return E.iconsInText&&C?"symbolTextAndIcon":x?"symbolSDF":"symbolIcon"}function Qc(x,C,E,M,U,H,$,ht,Ut,re,Fe,Re){for(var De=x.context,cr=De.gl,ur=x.transform,Er=ht==="map",nr=Ut==="map",wr=Er&&E.layout.get("symbol-placement")!=="point",Ir=Er&&!nr&&!wr,$r=E.layout.get("symbol-sort-key").constantOr(1)!==void 0,gn=!1,dn=x.depthModeForSublayer(0,ye.ReadOnly),xn=E.layout.get("text-variable-anchor"),Un=[],yi=0,ui=M;yi<ui.length;yi+=1){var Bi=ui[yi],sa=C.getTile(Bi),ua=sa.getBucket(E);if(ua){var ha=U?ua.text:ua.icon;if(ha&&ha.segments.get().length){var uo=ha.programConfigurations.get(E.id),Ni=U||ua.sdfIcons,La=U?ua.textSizeData:ua.iconSizeData,Ra=nr||ur.pitch!==0,Ta=x.useProgram(vc(Ni,U,ua),uo),_a=k.evaluateSizeForZoom(La,ur.zoom),za=void 0,xa=[0,0],ga=void 0,Qs=void 0,As=null,mu=void 0;if(U)ga=sa.glyphAtlasTexture,Qs=cr.LINEAR,za=sa.glyphAtlasTexture.size,ua.iconsInText&&(xa=sa.imageAtlasTexture.size,As=sa.imageAtlasTexture,mu=Ra||x.options.rotating||x.options.zooming||La.kind==="composite"||La.kind==="camera"?cr.LINEAR:cr.NEAREST);else{var yu=E.layout.get("icon-size").constantOr(0)!==1||ua.iconsNeedLinear;ga=sa.imageAtlasTexture,Qs=Ni||x.options.rotating||x.options.zooming||yu||Ra?cr.LINEAR:cr.NEAREST,za=sa.imageAtlasTexture.size}var ss=Cn(sa,1,x.transform.zoom),Ms=Wo(Bi.posMatrix,nr,Er,x.transform,ss),el=yo(Bi.posMatrix,nr,Er,x.transform,ss),Xs=xn&&ua.hasTextData(),oc=E.layout.get("icon-text-fit")!=="none"&&Xs&&ua.hasIconData();wr&&Nu(ua,Bi.posMatrix,x,U,Ms,el,nr,re);var rl=x.translatePosMatrix(Bi.posMatrix,sa,H,$),Zo=wr||U&&xn||oc?nc:Ms,Yl=x.translatePosMatrix(el,sa,H,$,!0),sc=Ni&&E.paint.get(U?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Lu={program:Ta,buffers:ha,uniformValues:Ni?ua.iconsInText?wf(La.kind,_a,Ir,nr,x,rl,Zo,Yl,za,xa):Kc(La.kind,_a,Ir,nr,x,rl,Zo,Yl,U,za,!0):Ef(La.kind,_a,Ir,nr,x,rl,Zo,Yl,U,za),atlasTexture:ga,atlasTextureIcon:As,atlasInterpolation:Qs,atlasInterpolationIcon:mu,isSDF:Ni,hasHalo:sc};if($r&&ua.canOverlap){gn=!0;for(var Ec=0,Pf=ha.segments.get();Ec<Pf.length;Ec+=1){var af=Pf[Ec];Un.push({segments:new k.SegmentVector([af]),sortKey:af.sortKey,state:Lu})}}else Un.push({segments:ha.segments,sortKey:0,state:Lu})}}}gn&&Un.sort(function(Al,Uc){return Al.sortKey-Uc.sortKey});for(var uc=0,$f=Un;uc<$f.length;uc+=1){var lc=$f[uc],Fs=lc.state;if(De.activeTexture.set(cr.TEXTURE0),Fs.atlasTexture.bind(Fs.atlasInterpolation,cr.CLAMP_TO_EDGE),Fs.atlasTextureIcon&&(De.activeTexture.set(cr.TEXTURE1),Fs.atlasTextureIcon&&Fs.atlasTextureIcon.bind(Fs.atlasInterpolationIcon,cr.CLAMP_TO_EDGE)),Fs.isSDF){var Cl=Fs.uniformValues;Fs.hasHalo&&(Cl.u_is_halo=1,ch(Fs.buffers,lc.segments,E,x,Fs.program,dn,Fe,Re,Cl)),Cl.u_is_halo=0}ch(Fs.buffers,lc.segments,E,x,Fs.program,dn,Fe,Re,Fs.uniformValues)}}function ch(x,C,E,M,U,H,$,ht,Ut){var re=M.context;U.draw(re,re.gl.TRIANGLES,H,$,ht,_r.disabled,Ut,E.id,x.layoutVertexBuffer,x.indexBuffer,C,E.paint,M.transform.zoom,x.programConfigurations.get(E.id),x.dynamicLayoutVertexBuffer,x.opacityVertexBuffer)}function fh(x,C,E,M,U,H,$){var ht,Ut,re,Fe,Re,De=x.context.gl,cr=E.paint.get("fill-pattern"),ur=cr&&cr.constantOr(1),Er=E.getCrossfadeParameters();$?(Ut=ur&&!E.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",ht=De.LINES):(Ut=ur?"fillPattern":"fill",ht=De.TRIANGLES);for(var nr=0,wr=M;nr<wr.length;nr+=1){var Ir=wr[nr],$r=C.getTile(Ir);if(!ur||$r.patternsLoaded()){var gn=$r.getBucket(E);if(gn){var dn=gn.programConfigurations.get(E.id),xn=x.useProgram(Ut,dn);ur&&(x.context.activeTexture.set(De.TEXTURE0),$r.imageAtlasTexture.bind(De.LINEAR,De.CLAMP_TO_EDGE),dn.updatePaintBuffers(Er));var Un=cr.constantOr(null);if(Un&&$r.imageAtlas){var yi=$r.imageAtlas,ui=yi.patternPositions[Un.to.toString()],Bi=yi.patternPositions[Un.from.toString()];ui&&Bi&&dn.setConstantPatternPositions(ui,Bi)}var sa=x.translatePosMatrix(Ir.posMatrix,$r,E.paint.get("fill-translate"),E.paint.get("fill-translate-anchor"));if($){Fe=gn.indexBuffer2,Re=gn.segments2;var ua=[De.drawingBufferWidth,De.drawingBufferHeight];re=Ut==="fillOutlinePattern"&&ur?Fr(sa,x,Er,$r,ua):ar(sa,ua)}else Fe=gn.indexBuffer,Re=gn.segments,re=ur?pe(sa,x,Er,$r):cs(sa);xn.draw(x.context,ht,U,x.stencilModeForClipping(Ir),H,_r.disabled,re,E.id,gn.layoutVertexBuffer,Fe,Re,E.paint,x.transform.zoom,dn)}}}}function Tp(x,C,E,M,U,H,$){for(var ht=x.context,Ut=ht.gl,re=E.paint.get("fill-extrusion-pattern"),Fe=re.constantOr(1),Re=E.getCrossfadeParameters(),De=E.paint.get("fill-extrusion-opacity"),cr=0,ur=M;cr<ur.length;cr+=1){var Er=ur[cr],nr=C.getTile(Er),wr=nr.getBucket(E);if(wr){var Ir=wr.programConfigurations.get(E.id),$r=x.useProgram(Fe?"fillExtrusionPattern":"fillExtrusion",Ir);Fe&&(x.context.activeTexture.set(Ut.TEXTURE0),nr.imageAtlasTexture.bind(Ut.LINEAR,Ut.CLAMP_TO_EDGE),Ir.updatePaintBuffers(Re));var gn=re.constantOr(null);if(gn&&nr.imageAtlas){var dn=nr.imageAtlas,xn=dn.patternPositions[gn.to.toString()],Un=dn.patternPositions[gn.from.toString()];xn&&Un&&Ir.setConstantPatternPositions(xn,Un)}var yi=x.translatePosMatrix(Er.posMatrix,nr,E.paint.get("fill-extrusion-translate"),E.paint.get("fill-extrusion-translate-anchor")),ui=E.paint.get("fill-extrusion-vertical-gradient"),Bi=Fe?Vu(yi,x,ui,De,Er,Re,nr):Gl(yi,x,ui,De);$r.draw(ht,ht.gl.TRIANGLES,U,H,$,_r.backCCW,Bi,E.id,wr.layoutVertexBuffer,wr.indexBuffer,wr.segments,E.paint,x.transform.zoom,Ir)}}}function Gh(x,C,E,M,U,H){var $=x.context,ht=$.gl,Ut=C.fbo;if(Ut){var re=x.useProgram("hillshade");$.activeTexture.set(ht.TEXTURE0),ht.bindTexture(ht.TEXTURE_2D,Ut.colorAttachment.get());var Fe=function(Re,De,cr){var ur=cr.paint.get("hillshade-shadow-color"),Er=cr.paint.get("hillshade-highlight-color"),nr=cr.paint.get("hillshade-accent-color"),wr=cr.paint.get("hillshade-illumination-direction")*(Math.PI/180);cr.paint.get("hillshade-illumination-anchor")==="viewport"&&(wr-=Re.transform.angle);var Ir,$r,gn,dn=!Re.options.moving;return{u_matrix:Re.transform.calculatePosMatrix(De.tileID.toUnwrapped(),dn),u_image:0,u_latrange:(Ir=De.tileID,$r=Math.pow(2,Ir.canonical.z),gn=Ir.canonical.y,[new k.MercatorCoordinate(0,gn/$r).toLngLat().lat,new k.MercatorCoordinate(0,(gn+1)/$r).toLngLat().lat]),u_light:[cr.paint.get("hillshade-exaggeration"),wr],u_shadow:ur,u_highlight:Er,u_accent:nr}}(x,C,E);re.draw($,ht.TRIANGLES,M,U,H,_r.disabled,Fe,E.id,x.rasterBoundsBuffer,x.quadTriangleIndexBuffer,x.rasterBoundsSegments)}}function Mp(x,C,E,M,U,H){var $=x.context,ht=$.gl,Ut=C.dem;if(Ut&&Ut.data){var re=Ut.dim,Fe=Ut.stride,Re=Ut.getPixels();if($.activeTexture.set(ht.TEXTURE1),$.pixelStoreUnpackPremultiplyAlpha.set(!1),C.demTexture=C.demTexture||x.getTileTexture(Fe),C.demTexture){var De=C.demTexture;De.update(Re,{premultiply:!1}),De.bind(ht.NEAREST,ht.CLAMP_TO_EDGE)}else C.demTexture=new k.Texture($,Re,ht.RGBA,{premultiply:!1}),C.demTexture.bind(ht.NEAREST,ht.CLAMP_TO_EDGE);$.activeTexture.set(ht.TEXTURE0);var cr=C.fbo;if(!cr){var ur=new k.Texture($,{width:re,height:re,data:null},ht.RGBA);ur.bind(ht.LINEAR,ht.CLAMP_TO_EDGE),(cr=C.fbo=$.createFramebuffer(re,re,!0)).colorAttachment.set(ur.texture)}$.bindFramebuffer.set(cr.framebuffer),$.viewport.set([0,0,re,re]),x.useProgram("hillshadePrepare").draw($,ht.TRIANGLES,M,U,H,_r.disabled,function(Er,nr){var wr=nr.stride,Ir=k.create();return k.ortho(Ir,0,k.EXTENT,-k.EXTENT,0,0,1),k.translate(Ir,Ir,[0,-k.EXTENT,0]),{u_matrix:Ir,u_image:1,u_dimension:[wr,wr],u_zoom:Er.overscaledZ,u_unpack:nr.getUnpackVector()}}(C.tileID,Ut),E.id,x.rasterBoundsBuffer,x.quadTriangleIndexBuffer,x.rasterBoundsSegments),C.needsHillshadePrepare=!1}}function Gf(x,C,E,M,U){var H=M.paint.get("raster-fade-duration");if(H>0){var $=k.browser.now(),ht=($-x.timeAdded)/H,Ut=C?($-C.timeAdded)/H:-1,re=E.getSource(),Fe=U.coveringZoomLevel({tileSize:re.tileSize,roundZoom:re.roundZoom}),Re=!C||Math.abs(C.tileID.overscaledZ-Fe)>Math.abs(x.tileID.overscaledZ-Fe),De=Re&&x.refreshedUponExpiration?1:k.clamp(Re?ht:1-Ut,0,1);return x.refreshedUponExpiration&&ht>=1&&(x.refreshedUponExpiration=!1),C?{opacity:1,mix:1-De}:{opacity:De,mix:0}}return{opacity:1,mix:0}}var Ll=new k.Color(1,0,0,1),hh=new k.Color(0,1,0,1),Oi=new k.Color(0,0,1,1),Fn=new k.Color(1,0,1,1),ph=new k.Color(0,1,1,1);function Ip(x,C,E,M){Hf(x,0,C+E/2,x.transform.width,E,M)}function hd(x,C,E,M){Hf(x,C-E/2,0,E,x.transform.height,M)}function Hf(x,C,E,M,U,H){var $=x.context,ht=$.gl;ht.enable(ht.SCISSOR_TEST),ht.scissor(C*k.browser.devicePixelRatio,E*k.browser.devicePixelRatio,M*k.browser.devicePixelRatio,U*k.browser.devicePixelRatio),$.clear({color:H}),ht.disable(ht.SCISSOR_TEST)}function so(x,C,E){var M=x.context,U=M.gl,H=E.posMatrix,$=x.useProgram("debug"),ht=ye.disabled,Ut=Ze.disabled,re=x.colorModeForRenderPass();M.activeTexture.set(U.TEXTURE0),x.emptyTexture.bind(U.LINEAR,U.CLAMP_TO_EDGE),$.draw(M,U.LINE_STRIP,ht,Ut,re,_r.disabled,ia(H,k.Color.red),"$debug",x.debugBuffer,x.tileBorderIndexBuffer,x.debugSegments);var Fe=C.getTileByID(E.key).latestRawTileData,Re=Math.floor((Fe&&Fe.byteLength||0)/1024),De=C.getTile(E).tileSize,cr=512/Math.min(De,512)*(E.overscaledZ/x.transform.zoom)*.5,ur=E.canonical.toString();E.overscaledZ!==E.canonical.z&&(ur+=" => "+E.overscaledZ),function(Er,nr){Er.initDebugOverlayCanvas();var wr=Er.debugOverlayCanvas,Ir=Er.context.gl,$r=Er.debugOverlayCanvas.getContext("2d");$r.clearRect(0,0,wr.width,wr.height),$r.shadowColor="white",$r.shadowBlur=2,$r.lineWidth=1.5,$r.strokeStyle="white",$r.textBaseline="top",$r.font="bold 36px Open Sans, sans-serif",$r.fillText(nr,5,5),$r.strokeText(nr,5,5),Er.debugOverlayTexture.update(wr),Er.debugOverlayTexture.bind(Ir.LINEAR,Ir.CLAMP_TO_EDGE)}(x,ur+" "+Re+"kb"),$.draw(M,U.TRIANGLES,ht,Ut,fr.alphaBlended,_r.disabled,ia(H,k.Color.transparent,cr),"$debug",x.debugBuffer,x.quadTriangleIndexBuffer,x.debugSegments)}var Mu={symbol:function(x,C,E,M,U){if(x.renderPass==="translucent"){var H=Ze.disabled,$=x.colorModeForRenderPass();E.layout.get("text-variable-anchor")&&function(ht,Ut,re,Fe,Re,De,cr){for(var ur=Ut.transform,Er=Re==="map",nr=De==="map",wr=0,Ir=ht;wr<Ir.length;wr+=1){var $r=Ir[wr],gn=Fe.getTile($r),dn=gn.getBucket(re);if(dn&&dn.text&&dn.text.segments.get().length){var xn=k.evaluateSizeForZoom(dn.textSizeData,ur.zoom),Un=Cn(gn,1,Ut.transform.zoom),yi=Wo($r.posMatrix,nr,Er,Ut.transform,Un),ui=re.layout.get("icon-text-fit")!=="none"&&dn.hasIconData();if(xn){var Bi=Math.pow(2,ur.zoom-gn.tileID.overscaledZ);zc(dn,Er,nr,cr,k.symbolSize,ur,yi,$r.posMatrix,Bi,xn,ui)}}}}(M,x,E,C,E.layout.get("text-rotation-alignment"),E.layout.get("text-pitch-alignment"),U),E.paint.get("icon-opacity").constantOr(1)!==0&&Qc(x,C,E,M,!1,E.paint.get("icon-translate"),E.paint.get("icon-translate-anchor"),E.layout.get("icon-rotation-alignment"),E.layout.get("icon-pitch-alignment"),E.layout.get("icon-keep-upright"),H,$),E.paint.get("text-opacity").constantOr(1)!==0&&Qc(x,C,E,M,!0,E.paint.get("text-translate"),E.paint.get("text-translate-anchor"),E.layout.get("text-rotation-alignment"),E.layout.get("text-pitch-alignment"),E.layout.get("text-keep-upright"),H,$),C.map.showCollisionBoxes&&(Nc(x,C,E,M,E.paint.get("text-translate"),E.paint.get("text-translate-anchor"),!0),Nc(x,C,E,M,E.paint.get("icon-translate"),E.paint.get("icon-translate-anchor"),!1))}},circle:function(x,C,E,M){if(x.renderPass==="translucent"){var U=E.paint.get("circle-opacity"),H=E.paint.get("circle-stroke-width"),$=E.paint.get("circle-stroke-opacity"),ht=E.layout.get("circle-sort-key").constantOr(1)!==void 0;if(U.constantOr(1)!==0||H.constantOr(1)!==0&&$.constantOr(1)!==0){for(var Ut=x.context,re=Ut.gl,Fe=x.depthModeForSublayer(0,ye.ReadOnly),Re=Ze.disabled,De=x.colorModeForRenderPass(),cr=[],ur=0;ur<M.length;ur++){var Er=M[ur],nr=C.getTile(Er),wr=nr.getBucket(E);if(wr){var Ir=wr.programConfigurations.get(E.id),$r={programConfiguration:Ir,program:x.useProgram("circle",Ir),layoutVertexBuffer:wr.layoutVertexBuffer,indexBuffer:wr.indexBuffer,uniformValues:Xr(x,Er,nr,E)};if(ht)for(var gn=0,dn=wr.segments.get();gn<dn.length;gn+=1){var xn=dn[gn];cr.push({segments:new k.SegmentVector([xn]),sortKey:xn.sortKey,state:$r})}else cr.push({segments:wr.segments,sortKey:0,state:$r})}}ht&&cr.sort(function(sa,ua){return sa.sortKey-ua.sortKey});for(var Un=0,yi=cr;Un<yi.length;Un+=1){var ui=yi[Un],Bi=ui.state;Bi.program.draw(Ut,re.TRIANGLES,Fe,Re,De,_r.disabled,Bi.uniformValues,E.id,Bi.layoutVertexBuffer,Bi.indexBuffer,ui.segments,E.paint,x.transform.zoom,Bi.programConfiguration)}}}},heatmap:function(x,C,E,M){if(E.paint.get("heatmap-opacity")!==0)if(x.renderPass==="offscreen"){var U=x.context,H=U.gl,$=Ze.disabled,ht=new fr([H.ONE,H.ONE],k.Color.transparent,[!0,!0,!0,!0]);(function(cr,ur,Er){var nr=cr.gl;cr.activeTexture.set(nr.TEXTURE1),cr.viewport.set([0,0,ur.width/4,ur.height/4]);var wr=Er.heatmapFbo;if(wr)nr.bindTexture(nr.TEXTURE_2D,wr.colorAttachment.get()),cr.bindFramebuffer.set(wr.framebuffer);else{var Ir=nr.createTexture();nr.bindTexture(nr.TEXTURE_2D,Ir),nr.texParameteri(nr.TEXTURE_2D,nr.TEXTURE_WRAP_S,nr.CLAMP_TO_EDGE),nr.texParameteri(nr.TEXTURE_2D,nr.TEXTURE_WRAP_T,nr.CLAMP_TO_EDGE),nr.texParameteri(nr.TEXTURE_2D,nr.TEXTURE_MIN_FILTER,nr.LINEAR),nr.texParameteri(nr.TEXTURE_2D,nr.TEXTURE_MAG_FILTER,nr.LINEAR),wr=Er.heatmapFbo=cr.createFramebuffer(ur.width/4,ur.height/4,!1),function($r,gn,dn,xn){var Un=$r.gl;Un.texImage2D(Un.TEXTURE_2D,0,Un.RGBA,gn.width/4,gn.height/4,0,Un.RGBA,$r.extRenderToTextureHalfFloat?$r.extTextureHalfFloat.HALF_FLOAT_OES:Un.UNSIGNED_BYTE,null),xn.colorAttachment.set(dn)}(cr,ur,Ir,wr)}})(U,x,E),U.clear({color:k.Color.transparent});for(var Ut=0;Ut<M.length;Ut++){var re=M[Ut];if(!C.hasRenderableParent(re)){var Fe=C.getTile(re),Re=Fe.getBucket(E);if(Re){var De=Re.programConfigurations.get(E.id);x.useProgram("heatmap",De).draw(U,H.TRIANGLES,ye.disabled,$,ht,_r.disabled,du(re.posMatrix,Fe,x.transform.zoom,E.paint.get("heatmap-intensity")),E.id,Re.layoutVertexBuffer,Re.indexBuffer,Re.segments,E.paint,x.transform.zoom,De)}}}U.viewport.set([0,0,x.width,x.height])}else x.renderPass==="translucent"&&(x.context.setColorMode(x.colorModeForRenderPass()),function(cr,ur){var Er=cr.context,nr=Er.gl,wr=ur.heatmapFbo;if(wr){Er.activeTexture.set(nr.TEXTURE0),nr.bindTexture(nr.TEXTURE_2D,wr.colorAttachment.get()),Er.activeTexture.set(nr.TEXTURE1);var Ir=ur.colorRampTexture;Ir||(Ir=ur.colorRampTexture=new k.Texture(Er,ur.colorRamp,nr.RGBA)),Ir.bind(nr.LINEAR,nr.CLAMP_TO_EDGE),cr.useProgram("heatmapTexture").draw(Er,nr.TRIANGLES,ye.disabled,Ze.disabled,cr.colorModeForRenderPass(),_r.disabled,function($r,gn,dn,xn){var Un=k.create();k.ortho(Un,0,$r.width,$r.height,0,0,1);var yi=$r.context.gl;return{u_matrix:Un,u_world:[yi.drawingBufferWidth,yi.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:gn.paint.get("heatmap-opacity")}}(cr,ur),ur.id,cr.viewportBuffer,cr.quadTriangleIndexBuffer,cr.viewportSegments,ur.paint,cr.transform.zoom)}}(x,E))},line:function(x,C,E,M){if(x.renderPass==="translucent"){var U=E.paint.get("line-opacity"),H=E.paint.get("line-width");if(U.constantOr(1)!==0&&H.constantOr(1)!==0)for(var $=x.depthModeForSublayer(0,ye.ReadOnly),ht=x.colorModeForRenderPass(),Ut=E.paint.get("line-dasharray"),re=E.paint.get("line-pattern"),Fe=re.constantOr(1),Re=E.paint.get("line-gradient"),De=E.getCrossfadeParameters(),cr=Fe?"linePattern":Ut?"lineSDF":Re?"lineGradient":"line",ur=x.context,Er=ur.gl,nr=!0,wr=0,Ir=M;wr<Ir.length;wr+=1){var $r=Ir[wr],gn=C.getTile($r);if(!Fe||gn.patternsLoaded()){var dn=gn.getBucket(E);if(dn){var xn=dn.programConfigurations.get(E.id),Un=x.context.program.get(),yi=x.useProgram(cr,xn),ui=nr||yi.program!==Un,Bi=re.constantOr(null);if(Bi&&gn.imageAtlas){var sa=gn.imageAtlas,ua=sa.patternPositions[Bi.to.toString()],ha=sa.patternPositions[Bi.from.toString()];ua&&ha&&xn.setConstantPatternPositions(ua,ha)}var uo=Fe?Gu(x,gn,E,De):Ut?Vh(x,gn,E,Ut,De):Re?Xa(x,gn,E,dn.lineClipsArray.length):au(x,gn,E);if(Fe)ur.activeTexture.set(Er.TEXTURE0),gn.imageAtlasTexture.bind(Er.LINEAR,Er.CLAMP_TO_EDGE),xn.updatePaintBuffers(De);else if(Ut&&(ui||x.lineAtlas.dirty))ur.activeTexture.set(Er.TEXTURE0),x.lineAtlas.bind(ur);else if(Re){var Ni=dn.gradients[E.id],La=Ni.texture;if(E.gradientVersion!==Ni.version){var Ra=256;if(E.stepInterpolant){var Ta=C.getSource().maxzoom,_a=$r.canonical.z===Ta?Math.ceil(1<<x.transform.maxZoom-$r.canonical.z):1;Ra=k.clamp(k.nextPowerOfTwo(dn.maxLineLength/k.EXTENT*1024*_a),256,ur.maxTextureSize)}Ni.gradient=k.renderColorRamp({expression:E.gradientExpression(),evaluationKey:"lineProgress",resolution:Ra,image:Ni.gradient||void 0,clips:dn.lineClipsArray}),Ni.texture?Ni.texture.update(Ni.gradient):Ni.texture=new k.Texture(ur,Ni.gradient,Er.RGBA),Ni.version=E.gradientVersion,La=Ni.texture}ur.activeTexture.set(Er.TEXTURE0),La.bind(E.stepInterpolant?Er.NEAREST:Er.LINEAR,Er.CLAMP_TO_EDGE)}yi.draw(ur,Er.TRIANGLES,$,x.stencilModeForClipping($r),ht,_r.disabled,uo,E.id,dn.layoutVertexBuffer,dn.indexBuffer,dn.segments,E.paint,x.transform.zoom,xn,dn.layoutVertexBuffer2),nr=!1}}}}},fill:function(x,C,E,M){var U=E.paint.get("fill-color"),H=E.paint.get("fill-opacity");if(H.constantOr(1)!==0){var $=x.colorModeForRenderPass(),ht=E.paint.get("fill-pattern"),Ut=x.opaquePassEnabledForLayer()&&!ht.constantOr(1)&&U.constantOr(k.Color.transparent).a===1&&H.constantOr(0)===1?"opaque":"translucent";if(x.renderPass===Ut){var re=x.depthModeForSublayer(1,x.renderPass==="opaque"?ye.ReadWrite:ye.ReadOnly);fh(x,C,E,M,re,$,!1)}if(x.renderPass==="translucent"&&E.paint.get("fill-antialias")){var Fe=x.depthModeForSublayer(E.getPaintProperty("fill-outline-color")?2:0,ye.ReadOnly);fh(x,C,E,M,Fe,$,!0)}}},"fill-extrusion":function(x,C,E,M){var U=E.paint.get("fill-extrusion-opacity");if(U!==0&&x.renderPass==="translucent"){var H=new ye(x.context.gl.LEQUAL,ye.ReadWrite,x.depthRangeFor3D);if(U!==1||E.paint.get("fill-extrusion-pattern").constantOr(1))Tp(x,C,E,M,H,Ze.disabled,fr.disabled),Tp(x,C,E,M,H,x.stencilModeFor3D(),x.colorModeForRenderPass());else{var $=x.colorModeForRenderPass();Tp(x,C,E,M,H,Ze.disabled,$)}}},hillshade:function(x,C,E,M){if(x.renderPass==="offscreen"||x.renderPass==="translucent"){for(var U=x.context,H=x.depthModeForSublayer(0,ye.ReadOnly),$=x.colorModeForRenderPass(),ht=x.renderPass==="translucent"?x.stencilConfigForOverlap(M):[{},M],Ut=ht[0],re=0,Fe=ht[1];re<Fe.length;re+=1){var Re=Fe[re],De=C.getTile(Re);De.needsHillshadePrepare&&x.renderPass==="offscreen"?Mp(x,De,E,H,Ze.disabled,$):x.renderPass==="translucent"&&Gh(x,De,E,H,Ut[Re.overscaledZ],$)}U.viewport.set([0,0,x.width,x.height])}},raster:function(x,C,E,M){if(x.renderPass==="translucent"&&E.paint.get("raster-opacity")!==0&&M.length)for(var U=x.context,H=U.gl,$=C.getSource(),ht=x.useProgram("raster"),Ut=x.colorModeForRenderPass(),re=$ instanceof se?[{},M]:x.stencilConfigForOverlap(M),Fe=re[0],Re=re[1],De=Re[Re.length-1].overscaledZ,cr=!x.options.moving,ur=0,Er=Re;ur<Er.length;ur+=1){var nr=Er[ur],wr=x.depthModeForSublayer(nr.overscaledZ-De,E.paint.get("raster-opacity")===1?ye.ReadWrite:ye.ReadOnly,H.LESS),Ir=C.getTile(nr),$r=x.transform.calculatePosMatrix(nr.toUnwrapped(),cr);Ir.registerFadeDuration(E.paint.get("raster-fade-duration"));var gn=C.findLoadedParent(nr,0),dn=Gf(Ir,gn,C,E,x.transform),xn=void 0,Un=void 0,yi=E.paint.get("raster-resampling")==="nearest"?H.NEAREST:H.LINEAR;U.activeTexture.set(H.TEXTURE0),Ir.texture.bind(yi,H.CLAMP_TO_EDGE,H.LINEAR_MIPMAP_NEAREST),U.activeTexture.set(H.TEXTURE1),gn?(gn.texture.bind(yi,H.CLAMP_TO_EDGE,H.LINEAR_MIPMAP_NEAREST),xn=Math.pow(2,gn.tileID.overscaledZ-Ir.tileID.overscaledZ),Un=[Ir.tileID.canonical.x*xn%1,Ir.tileID.canonical.y*xn%1]):Ir.texture.bind(yi,H.CLAMP_TO_EDGE,H.LINEAR_MIPMAP_NEAREST);var ui=Bc($r,Un||[0,0],xn||1,dn,E);$ instanceof se?ht.draw(U,H.TRIANGLES,wr,Ze.disabled,Ut,_r.disabled,ui,E.id,$.boundsBuffer,x.quadTriangleIndexBuffer,$.boundsSegments):ht.draw(U,H.TRIANGLES,wr,Fe[nr.overscaledZ],Ut,_r.disabled,ui,E.id,x.rasterBoundsBuffer,x.quadTriangleIndexBuffer,x.rasterBoundsSegments)}},background:function(x,C,E){var M=E.paint.get("background-color"),U=E.paint.get("background-opacity");if(U!==0){var H=x.context,$=H.gl,ht=x.transform,Ut=ht.tileSize,re=E.paint.get("background-pattern");if(!x.isPatternMissing(re)){var Fe=!re&&M.a===1&&U===1&&x.opaquePassEnabledForLayer()?"opaque":"translucent";if(x.renderPass===Fe){var Re=Ze.disabled,De=x.depthModeForSublayer(0,Fe==="opaque"?ye.ReadWrite:ye.ReadOnly),cr=x.colorModeForRenderPass(),ur=x.useProgram(re?"backgroundPattern":"background"),Er=ht.coveringTiles({tileSize:Ut});re&&(H.activeTexture.set($.TEXTURE0),x.imageManager.bind(x.context));for(var nr=E.getCrossfadeParameters(),wr=0,Ir=Er;wr<Ir.length;wr+=1){var $r=Ir[wr],gn=x.transform.calculatePosMatrix($r.toUnwrapped()),dn=re?Cf(gn,U,x,re,{tileID:$r,tileSize:Ut},nr):Sf(gn,U,M);ur.draw(H,$.TRIANGLES,De,Re,cr,_r.disabled,dn,E.id,x.tileExtentBuffer,x.quadTriangleIndexBuffer,x.tileExtentSegments)}}}}},debug:function(x,C,E){for(var M=0;M<E.length;M++)so(x,C,E[M])},custom:function(x,C,E){var M=x.context,U=E.implementation;if(x.renderPass==="offscreen"){var H=U.prerender;H&&(x.setCustomLayerDefaults(),M.setColorMode(x.colorModeForRenderPass()),H.call(U,M.gl,x.transform.customLayerMatrix()),M.setDirty(),x.setBaseState())}else if(x.renderPass==="translucent"){x.setCustomLayerDefaults(),M.setColorMode(x.colorModeForRenderPass()),M.setStencilMode(Ze.disabled);var $=U.renderingMode==="3d"?new ye(x.context.gl.LEQUAL,ye.ReadWrite,x.depthRangeFor3D):x.depthModeForSublayer(0,ye.ReadOnly);M.setDepthMode($),U.render(M.gl,x.transform.customLayerMatrix()),M.setDirty(),x.setBaseState(),M.bindFramebuffer.set(null)}}},Po=function(x,C){this.context=new we(x),this.transform=C,this._tileTextures={},this.setup(),this.numSublayers=ir.maxUnderzooming+ir.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Ks,this.gpuTimers={}};Po.prototype.resize=function(x,C){if(this.width=x*k.browser.devicePixelRatio,this.height=C*k.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var E=0,M=this.style._order;E<M.length;E+=1)this.style._layers[M[E]].resize()},Po.prototype.setup=function(){var x=this.context,C=new k.StructArrayLayout2i4;C.emplaceBack(0,0),C.emplaceBack(k.EXTENT,0),C.emplaceBack(0,k.EXTENT),C.emplaceBack(k.EXTENT,k.EXTENT),this.tileExtentBuffer=x.createVertexBuffer(C,Uo.members),this.tileExtentSegments=k.SegmentVector.simpleSegment(0,0,4,2);var E=new k.StructArrayLayout2i4;E.emplaceBack(0,0),E.emplaceBack(k.EXTENT,0),E.emplaceBack(0,k.EXTENT),E.emplaceBack(k.EXTENT,k.EXTENT),this.debugBuffer=x.createVertexBuffer(E,Uo.members),this.debugSegments=k.SegmentVector.simpleSegment(0,0,4,5);var M=new k.StructArrayLayout4i8;M.emplaceBack(0,0,0,0),M.emplaceBack(k.EXTENT,0,k.EXTENT,0),M.emplaceBack(0,k.EXTENT,0,k.EXTENT),M.emplaceBack(k.EXTENT,k.EXTENT,k.EXTENT,k.EXTENT),this.rasterBoundsBuffer=x.createVertexBuffer(M,mt.members),this.rasterBoundsSegments=k.SegmentVector.simpleSegment(0,0,4,2);var U=new k.StructArrayLayout2i4;U.emplaceBack(0,0),U.emplaceBack(1,0),U.emplaceBack(0,1),U.emplaceBack(1,1),this.viewportBuffer=x.createVertexBuffer(U,Uo.members),this.viewportSegments=k.SegmentVector.simpleSegment(0,0,4,2);var H=new k.StructArrayLayout1ui2;H.emplaceBack(0),H.emplaceBack(1),H.emplaceBack(3),H.emplaceBack(2),H.emplaceBack(0),this.tileBorderIndexBuffer=x.createIndexBuffer(H);var $=new k.StructArrayLayout3ui6;$.emplaceBack(0,1,2),$.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=x.createIndexBuffer($),this.emptyTexture=new k.Texture(x,{width:1,height:1,data:new Uint8Array([0,0,0,0])},x.gl.RGBA);var ht=this.context.gl;this.stencilClearMode=new Ze({func:ht.ALWAYS,mask:0},0,255,ht.ZERO,ht.ZERO,ht.ZERO)},Po.prototype.clearStencil=function(){var x=this.context,C=x.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var E=k.create();k.ortho(E,0,this.width,this.height,0,0,1),k.scale(E,E,[C.drawingBufferWidth,C.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(x,C.TRIANGLES,ye.disabled,this.stencilClearMode,fr.disabled,_r.disabled,$a(E),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Po.prototype._renderTileClippingMasks=function(x,C){if(this.currentStencilSource!==x.source&&x.isTileClipped()&&C&&C.length){this.currentStencilSource=x.source;var E=this.context,M=E.gl;this.nextStencilID+C.length>256&&this.clearStencil(),E.setColorMode(fr.disabled),E.setDepthMode(ye.disabled);var U=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var H=0,$=C;H<$.length;H+=1){var ht=$[H],Ut=this._tileClippingMaskIDs[ht.key]=this.nextStencilID++;U.draw(E,M.TRIANGLES,ye.disabled,new Ze({func:M.ALWAYS,mask:0},Ut,255,M.KEEP,M.KEEP,M.REPLACE),fr.disabled,_r.disabled,$a(ht.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},Po.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var x=this.nextStencilID++,C=this.context.gl;return new Ze({func:C.NOTEQUAL,mask:255},x,255,C.KEEP,C.KEEP,C.REPLACE)},Po.prototype.stencilModeForClipping=function(x){var C=this.context.gl;return new Ze({func:C.EQUAL,mask:255},this._tileClippingMaskIDs[x.key],0,C.KEEP,C.KEEP,C.REPLACE)},Po.prototype.stencilConfigForOverlap=function(x){var C,E=this.context.gl,M=x.sort(function(Ut,re){return re.overscaledZ-Ut.overscaledZ}),U=M[M.length-1].overscaledZ,H=M[0].overscaledZ-U+1;if(H>1){this.currentStencilSource=void 0,this.nextStencilID+H>256&&this.clearStencil();for(var $={},ht=0;ht<H;ht++)$[ht+U]=new Ze({func:E.GEQUAL,mask:255},ht+this.nextStencilID,255,E.KEEP,E.KEEP,E.REPLACE);return this.nextStencilID+=H,[$,M]}return[(C={},C[U]=Ze.disabled,C),M]},Po.prototype.colorModeForRenderPass=function(){var x=this.context.gl;return this._showOverdrawInspector?new fr([x.CONSTANT_COLOR,x.ONE],new k.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?fr.unblended:fr.alphaBlended},Po.prototype.depthModeForSublayer=function(x,C,E){if(!this.opaquePassEnabledForLayer())return ye.disabled;var M=1-((1+this.currentLayer)*this.numSublayers+x)*this.depthEpsilon;return new ye(E||this.context.gl.LEQUAL,C,[M,M])},Po.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},Po.prototype.render=function(x,C){var E=this;this.style=x,this.options=C,this.lineAtlas=x.lineAtlas,this.imageManager=x.imageManager,this.glyphManager=x.glyphManager,this.symbolFadeChange=x.placement.symbolFadeChange(k.browser.now()),this.imageManager.beginFrame();var M=this.style._order,U=this.style.sourceCaches;for(var H in U){var $=U[H];$.used&&$.prepare(this.context)}var ht,Ut,re={},Fe={},Re={};for(var De in U){var cr=U[De];re[De]=cr.getVisibleCoordinates(),Fe[De]=re[De].slice().reverse(),Re[De]=cr.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var ur=0;ur<M.length;ur++)if(this.style._layers[M[ur]].is3D()){this.opaquePassCutoff=ur;break}this.renderPass="offscreen";for(var Er=0,nr=M;Er<nr.length;Er+=1){var wr=this.style._layers[nr[Er]];if(wr.hasOffscreenPass()&&!wr.isHidden(this.transform.zoom)){var Ir=Fe[wr.source];(wr.type==="custom"||Ir.length)&&this.renderLayer(this,U[wr.source],wr,Ir)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:C.showOverdrawInspector?k.Color.black:k.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=C.showOverdrawInspector,this.depthRangeFor3D=[0,1-(x._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=M.length-1;this.currentLayer>=0;this.currentLayer--){var $r=this.style._layers[M[this.currentLayer]],gn=U[$r.source],dn=re[$r.source];this._renderTileClippingMasks($r,dn),this.renderLayer(this,gn,$r,dn)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<M.length;this.currentLayer++){var xn=this.style._layers[M[this.currentLayer]],Un=U[xn.source],yi=(xn.type==="symbol"?Re:Fe)[xn.source];this._renderTileClippingMasks(xn,re[xn.source]),this.renderLayer(this,Un,xn,yi)}this.options.showTileBoundaries&&(k.values(this.style._layers).forEach(function(ui){ui.source&&!ui.isHidden(E.transform.zoom)&&(ui.source!==(Ut&&Ut.id)&&(Ut=E.style.sourceCaches[ui.source]),(!ht||ht.getSource().maxzoom<Ut.getSource().maxzoom)&&(ht=Ut))}),ht&&Mu.debug(this,ht,ht.getVisibleCoordinates())),this.options.showPadding&&function(ui){var Bi=ui.transform.padding;Ip(ui,ui.transform.height-(Bi.top||0),3,Ll),Ip(ui,Bi.bottom||0,3,hh),hd(ui,Bi.left||0,3,Oi),hd(ui,ui.transform.width-(Bi.right||0),3,Fn);var sa=ui.transform.centerPoint;(function(ua,ha,uo,Ni){Hf(ua,ha-1,uo-10,2,20,Ni),Hf(ua,ha-10,uo-1,20,2,Ni)})(ui,sa.x,ui.transform.height-sa.y,ph)}(this),this.context.setDefault()},Po.prototype.renderLayer=function(x,C,E,M){E.isHidden(this.transform.zoom)||(E.type==="background"||E.type==="custom"||M.length)&&(this.id=E.id,this.gpuTimingStart(E),Mu[E.type](x,C,E,M,this.style.placement.variableOffsets),this.gpuTimingEnd())},Po.prototype.gpuTimingStart=function(x){if(this.options.gpuTiming){var C=this.context.extTimerQuery,E=this.gpuTimers[x.id];E||(E=this.gpuTimers[x.id]={calls:0,cpuTime:0,query:C.createQueryEXT()}),E.calls++,C.beginQueryEXT(C.TIME_ELAPSED_EXT,E.query)}},Po.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var x=this.context.extTimerQuery;x.endQueryEXT(x.TIME_ELAPSED_EXT)}},Po.prototype.collectGpuTimers=function(){var x=this.gpuTimers;return this.gpuTimers={},x},Po.prototype.queryGpuTimers=function(x){var C={};for(var E in x){var M=x[E],U=this.context.extTimerQuery,H=U.getQueryObjectEXT(M.query,U.QUERY_RESULT_EXT)/1e6;U.deleteQueryEXT(M.query),C[E]=H}return C},Po.prototype.translatePosMatrix=function(x,C,E,M,U){if(!E[0]&&!E[1])return x;var H=U?M==="map"?this.transform.angle:0:M==="viewport"?-this.transform.angle:0;if(H){var $=Math.sin(H),ht=Math.cos(H);E=[E[0]*ht-E[1]*$,E[0]*$+E[1]*ht]}var Ut=[U?E[0]:Cn(C,E[0],this.transform.zoom),U?E[1]:Cn(C,E[1],this.transform.zoom),0],re=new Float32Array(16);return k.translate(re,x,Ut),re},Po.prototype.saveTileTexture=function(x){var C=this._tileTextures[x.size[0]];C?C.push(x):this._tileTextures[x.size[0]]=[x]},Po.prototype.getTileTexture=function(x){var C=this._tileTextures[x];return C&&C.length>0?C.pop():null},Po.prototype.isPatternMissing=function(x){if(!x)return!1;if(!x.from||!x.to)return!0;var C=this.imageManager.getPattern(x.from.toString()),E=this.imageManager.getPattern(x.to.toString());return!C||!E},Po.prototype.useProgram=function(x,C){this.cache=this.cache||{};var E=""+x+(C?C.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[E]||(this.cache[E]=new Vl(this.context,x,pu[x],C,ll[x],this._showOverdrawInspector)),this.cache[E]},Po.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Po.prototype.setBaseState=function(){var x=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(x.FUNC_ADD)},Po.prototype.initDebugOverlayCanvas=function(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=k.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new k.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},Po.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var jl=function(x,C){this.points=x,this.planes=C};jl.fromInvProjectionMatrix=function(x,C,E){var M=Math.pow(2,E),U=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(function($){return k.transformMat4([],$,x)}).map(function($){return k.scale$1([],$,1/$[3]/C*M)}),H=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function($){var ht=k.sub([],U[$[0]],U[$[1]]),Ut=k.sub([],U[$[2]],U[$[1]]),re=k.normalize([],k.cross([],ht,Ut)),Fe=-k.dot(re,U[$[1]]);return re.concat(Fe)});return new jl(U,H)};var Af=function(x,C){this.min=x,this.max=C,this.center=k.scale$2([],k.add([],this.min,this.max),.5)};Af.prototype.quadrant=function(x){for(var C=[x%2==0,x<2],E=k.clone$2(this.min),M=k.clone$2(this.max),U=0;U<C.length;U++)E[U]=C[U]?this.min[U]:this.center[U],M[U]=C[U]?this.center[U]:this.max[U];return M[2]=this.max[2],new Af(E,M)},Af.prototype.distanceX=function(x){return Math.max(Math.min(this.max[0],x[0]),this.min[0])-x[0]},Af.prototype.distanceY=function(x){return Math.max(Math.min(this.max[1],x[1]),this.min[1])-x[1]},Af.prototype.intersects=function(x){for(var C=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],E=!0,M=0;M<x.planes.length;M++){for(var U=x.planes[M],H=0,$=0;$<C.length;$++)H+=k.dot$1(U,C[$])>=0;if(H===0)return 0;H!==C.length&&(E=!1)}if(E)return 2;for(var ht=0;ht<3;ht++){for(var Ut=Number.MAX_VALUE,re=-Number.MAX_VALUE,Fe=0;Fe<x.points.length;Fe++){var Re=x.points[Fe][ht]-this.min[ht];Ut=Math.min(Ut,Re),re=Math.max(re,Re)}if(re<0||Ut>this.max[ht]-this.min[ht])return 0}return 1};var El=function(x,C,E,M){if(x===void 0&&(x=0),C===void 0&&(C=0),E===void 0&&(E=0),M===void 0&&(M=0),isNaN(x)||x<0||isNaN(C)||C<0||isNaN(E)||E<0||isNaN(M)||M<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=x,this.bottom=C,this.left=E,this.right=M};El.prototype.interpolate=function(x,C,E){return C.top!=null&&x.top!=null&&(this.top=k.number(x.top,C.top,E)),C.bottom!=null&&x.bottom!=null&&(this.bottom=k.number(x.bottom,C.bottom,E)),C.left!=null&&x.left!=null&&(this.left=k.number(x.left,C.left,E)),C.right!=null&&x.right!=null&&(this.right=k.number(x.right,C.right,E)),this},El.prototype.getCenter=function(x,C){var E=k.clamp((this.left+x-this.right)/2,0,x),M=k.clamp((this.top+C-this.bottom)/2,0,C);return new k.Point(E,M)},El.prototype.equals=function(x){return this.top===x.top&&this.bottom===x.bottom&&this.left===x.left&&this.right===x.right},El.prototype.clone=function(){return new El(this.top,this.bottom,this.left,this.right)},El.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var qa=function(x,C,E,M,U){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=U===void 0||U,this._minZoom=x||0,this._maxZoom=C||22,this._minPitch=E==null?0:E,this._maxPitch=M==null?60:M,this.setMaxBounds(),this.width=0,this.height=0,this._center=new k.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new El,this._posMatrixCache={},this._alignedPosMatrixCache={}},ds={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};qa.prototype.clone=function(){var x=new qa(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return x.tileSize=this.tileSize,x.latRange=this.latRange,x.width=this.width,x.height=this.height,x._center=this._center,x.zoom=this.zoom,x.angle=this.angle,x._fov=this._fov,x._pitch=this._pitch,x._unmodified=this._unmodified,x._edgeInsets=this._edgeInsets.clone(),x._calcMatrices(),x},ds.minZoom.get=function(){return this._minZoom},ds.minZoom.set=function(x){this._minZoom!==x&&(this._minZoom=x,this.zoom=Math.max(this.zoom,x))},ds.maxZoom.get=function(){return this._maxZoom},ds.maxZoom.set=function(x){this._maxZoom!==x&&(this._maxZoom=x,this.zoom=Math.min(this.zoom,x))},ds.minPitch.get=function(){return this._minPitch},ds.minPitch.set=function(x){this._minPitch!==x&&(this._minPitch=x,this.pitch=Math.max(this.pitch,x))},ds.maxPitch.get=function(){return this._maxPitch},ds.maxPitch.set=function(x){this._maxPitch!==x&&(this._maxPitch=x,this.pitch=Math.min(this.pitch,x))},ds.renderWorldCopies.get=function(){return this._renderWorldCopies},ds.renderWorldCopies.set=function(x){x===void 0?x=!0:x===null&&(x=!1),this._renderWorldCopies=x},ds.worldSize.get=function(){return this.tileSize*this.scale},ds.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},ds.size.get=function(){return new k.Point(this.width,this.height)},ds.bearing.get=function(){return-this.angle/Math.PI*180},ds.bearing.set=function(x){var C=-k.wrap(x,-180,180)*Math.PI/180;this.angle!==C&&(this._unmodified=!1,this.angle=C,this._calcMatrices(),this.rotationMatrix=k.create$2(),k.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},ds.pitch.get=function(){return this._pitch/Math.PI*180},ds.pitch.set=function(x){var C=k.clamp(x,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==C&&(this._unmodified=!1,this._pitch=C,this._calcMatrices())},ds.fov.get=function(){return this._fov/Math.PI*180},ds.fov.set=function(x){x=Math.max(.01,Math.min(60,x)),this._fov!==x&&(this._unmodified=!1,this._fov=x/180*Math.PI,this._calcMatrices())},ds.zoom.get=function(){return this._zoom},ds.zoom.set=function(x){var C=Math.min(Math.max(x,this.minZoom),this.maxZoom);this._zoom!==C&&(this._unmodified=!1,this._zoom=C,this.scale=this.zoomScale(C),this.tileZoom=Math.floor(C),this.zoomFraction=C-this.tileZoom,this._constrain(),this._calcMatrices())},ds.center.get=function(){return this._center},ds.center.set=function(x){x.lat===this._center.lat&&x.lng===this._center.lng||(this._unmodified=!1,this._center=x,this._constrain(),this._calcMatrices())},ds.padding.get=function(){return this._edgeInsets.toJSON()},ds.padding.set=function(x){this._edgeInsets.equals(x)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,x,1),this._calcMatrices())},ds.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},qa.prototype.isPaddingEqual=function(x){return this._edgeInsets.equals(x)},qa.prototype.interpolatePadding=function(x,C,E){this._unmodified=!1,this._edgeInsets.interpolate(x,C,E),this._constrain(),this._calcMatrices()},qa.prototype.coveringZoomLevel=function(x){var C=(x.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/x.tileSize));return Math.max(0,C)},qa.prototype.getVisibleUnwrappedCoordinates=function(x){var C=[new k.UnwrappedTileID(0,x)];if(this._renderWorldCopies)for(var E=this.pointCoordinate(new k.Point(0,0)),M=this.pointCoordinate(new k.Point(this.width,0)),U=this.pointCoordinate(new k.Point(this.width,this.height)),H=this.pointCoordinate(new k.Point(0,this.height)),$=Math.floor(Math.min(E.x,M.x,U.x,H.x)),ht=Math.floor(Math.max(E.x,M.x,U.x,H.x)),Ut=$-1;Ut<=ht+1;Ut++)Ut!==0&&C.push(new k.UnwrappedTileID(Ut,x));return C},qa.prototype.coveringTiles=function(x){var C=this.coveringZoomLevel(x),E=C;if(x.minzoom!==void 0&&C<x.minzoom)return[];x.maxzoom!==void 0&&C>x.maxzoom&&(C=x.maxzoom);var M=k.MercatorCoordinate.fromLngLat(this.center),U=Math.pow(2,C),H=[U*M.x,U*M.y,0],$=jl.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,C),ht=x.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(ht=C);var Ut=function(ui){return{aabb:new Af([ui*U,0,0],[(ui+1)*U,U,0]),zoom:0,x:0,y:0,wrap:ui,fullyVisible:!1}},re=[],Fe=[],Re=C,De=x.reparseOverscaled?E:C;if(this._renderWorldCopies)for(var cr=1;cr<=3;cr++)re.push(Ut(-cr)),re.push(Ut(cr));for(re.push(Ut(0));re.length>0;){var ur=re.pop(),Er=ur.x,nr=ur.y,wr=ur.fullyVisible;if(!wr){var Ir=ur.aabb.intersects($);if(Ir===0)continue;wr=Ir===2}var $r=ur.aabb.distanceX(H),gn=ur.aabb.distanceY(H),dn=Math.max(Math.abs($r),Math.abs(gn));if(ur.zoom===Re||dn>3+(1<<Re-ur.zoom)-2&&ur.zoom>=ht)Fe.push({tileID:new k.OverscaledTileID(ur.zoom===Re?De:ur.zoom,ur.wrap,ur.zoom,Er,nr),distanceSq:k.sqrLen([H[0]-.5-Er,H[1]-.5-nr])});else for(var xn=0;xn<4;xn++){var Un=(Er<<1)+xn%2,yi=(nr<<1)+(xn>>1);re.push({aabb:ur.aabb.quadrant(xn),zoom:ur.zoom+1,x:Un,y:yi,wrap:ur.wrap,fullyVisible:wr})}}return Fe.sort(function(ui,Bi){return ui.distanceSq-Bi.distanceSq}).map(function(ui){return ui.tileID})},qa.prototype.resize=function(x,C){this.width=x,this.height=C,this.pixelsToGLUnits=[2/x,-2/C],this._constrain(),this._calcMatrices()},ds.unmodified.get=function(){return this._unmodified},qa.prototype.zoomScale=function(x){return Math.pow(2,x)},qa.prototype.scaleZoom=function(x){return Math.log(x)/Math.LN2},qa.prototype.project=function(x){var C=k.clamp(x.lat,-this.maxValidLatitude,this.maxValidLatitude);return new k.Point(k.mercatorXfromLng(x.lng)*this.worldSize,k.mercatorYfromLat(C)*this.worldSize)},qa.prototype.unproject=function(x){return new k.MercatorCoordinate(x.x/this.worldSize,x.y/this.worldSize).toLngLat()},ds.point.get=function(){return this.project(this.center)},qa.prototype.setLocationAtPoint=function(x,C){var E=this.pointCoordinate(C),M=this.pointCoordinate(this.centerPoint),U=this.locationCoordinate(x),H=new k.MercatorCoordinate(U.x-(E.x-M.x),U.y-(E.y-M.y));this.center=this.coordinateLocation(H),this._renderWorldCopies&&(this.center=this.center.wrap())},qa.prototype.locationPoint=function(x){return this.coordinatePoint(this.locationCoordinate(x))},qa.prototype.pointLocation=function(x){return this.coordinateLocation(this.pointCoordinate(x))},qa.prototype.locationCoordinate=function(x){return k.MercatorCoordinate.fromLngLat(x)},qa.prototype.coordinateLocation=function(x){return x.toLngLat()},qa.prototype.pointCoordinate=function(x){var C=[x.x,x.y,0,1],E=[x.x,x.y,1,1];k.transformMat4(C,C,this.pixelMatrixInverse),k.transformMat4(E,E,this.pixelMatrixInverse);var M=C[3],U=E[3],H=C[1]/M,$=E[1]/U,ht=C[2]/M,Ut=E[2]/U,re=ht===Ut?0:(0-ht)/(Ut-ht);return new k.MercatorCoordinate(k.number(C[0]/M,E[0]/U,re)/this.worldSize,k.number(H,$,re)/this.worldSize)},qa.prototype.coordinatePoint=function(x){var C=[x.x*this.worldSize,x.y*this.worldSize,0,1];return k.transformMat4(C,C,this.pixelMatrix),new k.Point(C[0]/C[3],C[1]/C[3])},qa.prototype.getBounds=function(){return new k.LngLatBounds().extend(this.pointLocation(new k.Point(0,0))).extend(this.pointLocation(new k.Point(this.width,0))).extend(this.pointLocation(new k.Point(this.width,this.height))).extend(this.pointLocation(new k.Point(0,this.height)))},qa.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new k.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},qa.prototype.setMaxBounds=function(x){x?(this.lngRange=[x.getWest(),x.getEast()],this.latRange=[x.getSouth(),x.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},qa.prototype.calculatePosMatrix=function(x,C){C===void 0&&(C=!1);var E=x.key,M=C?this._alignedPosMatrixCache:this._posMatrixCache;if(M[E])return M[E];var U=x.canonical,H=this.worldSize/this.zoomScale(U.z),$=U.x+Math.pow(2,U.z)*x.wrap,ht=k.identity(new Float64Array(16));return k.translate(ht,ht,[$*H,U.y*H,0]),k.scale(ht,ht,[H/k.EXTENT,H/k.EXTENT,1]),k.multiply(ht,C?this.alignedProjMatrix:this.projMatrix,ht),M[E]=new Float32Array(ht),M[E]},qa.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},qa.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var x,C,E,M,U=-90,H=90,$=-180,ht=180,Ut=this.size,re=this._unmodified;if(this.latRange){var Fe=this.latRange;U=k.mercatorYfromLat(Fe[1])*this.worldSize,x=(H=k.mercatorYfromLat(Fe[0])*this.worldSize)-U<Ut.y?Ut.y/(H-U):0}if(this.lngRange){var Re=this.lngRange;$=k.mercatorXfromLng(Re[0])*this.worldSize,C=(ht=k.mercatorXfromLng(Re[1])*this.worldSize)-$<Ut.x?Ut.x/(ht-$):0}var De=this.point,cr=Math.max(C||0,x||0);if(cr)return this.center=this.unproject(new k.Point(C?(ht+$)/2:De.x,x?(H+U)/2:De.y)),this.zoom+=this.scaleZoom(cr),this._unmodified=re,void(this._constraining=!1);if(this.latRange){var ur=De.y,Er=Ut.y/2;ur-Er<U&&(M=U+Er),ur+Er>H&&(M=H-Er)}if(this.lngRange){var nr=De.x,wr=Ut.x/2;nr-wr<$&&(E=$+wr),nr+wr>ht&&(E=ht-wr)}E===void 0&&M===void 0||(this.center=this.unproject(new k.Point(E!==void 0?E:De.x,M!==void 0?M:De.y))),this._unmodified=re,this._constraining=!1}},qa.prototype._calcMatrices=function(){if(this.height){var x=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var C=Math.PI/2+this._pitch,E=this._fov*(.5+x.y/this.height),M=Math.sin(E)*this.cameraToCenterDistance/Math.sin(k.clamp(Math.PI-C-E,.01,Math.PI-.01)),U=this.point,H=U.x,$=U.y,ht=1.01*(Math.cos(Math.PI/2-this._pitch)*M+this.cameraToCenterDistance),Ut=this.height/50,re=new Float64Array(16);k.perspective(re,this._fov,this.width/this.height,Ut,ht),re[8]=2*-x.x/this.width,re[9]=2*x.y/this.height,k.scale(re,re,[1,-1,1]),k.translate(re,re,[0,0,-this.cameraToCenterDistance]),k.rotateX(re,re,this._pitch),k.rotateZ(re,re,this.angle),k.translate(re,re,[-H,-$,0]),this.mercatorMatrix=k.scale([],re,[this.worldSize,this.worldSize,this.worldSize]),k.scale(re,re,[1,1,k.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=re,this.invProjMatrix=k.invert([],this.projMatrix);var Fe=this.width%2/2,Re=this.height%2/2,De=Math.cos(this.angle),cr=Math.sin(this.angle),ur=H-Math.round(H)+De*Fe+cr*Re,Er=$-Math.round($)+De*Re+cr*Fe,nr=new Float64Array(re);if(k.translate(nr,nr,[ur>.5?ur-1:ur,Er>.5?Er-1:Er,0]),this.alignedProjMatrix=nr,re=k.create(),k.scale(re,re,[this.width/2,-this.height/2,1]),k.translate(re,re,[1,-1,0]),this.labelPlaneMatrix=re,re=k.create(),k.scale(re,re,[1,-1,1]),k.translate(re,re,[-1,-1,0]),k.scale(re,re,[2/this.width,2/this.height,1]),this.glCoordMatrix=re,this.pixelMatrix=k.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(re=k.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=re,this._posMatrixCache={},this._alignedPosMatrixCache={}}},qa.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var x=this.pointCoordinate(new k.Point(0,0)),C=[x.x*this.worldSize,x.y*this.worldSize,0,1];return k.transformMat4(C,C,this.pixelMatrix)[3]/this.cameraToCenterDistance},qa.prototype.getCameraPoint=function(){var x=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new k.Point(0,x))},qa.prototype.getCameraQueryGeometry=function(x){var C=this.getCameraPoint();if(x.length===1)return[x[0],C];for(var E=C.x,M=C.y,U=C.x,H=C.y,$=0,ht=x;$<ht.length;$+=1){var Ut=ht[$];E=Math.min(E,Ut.x),M=Math.min(M,Ut.y),U=Math.max(U,Ut.x),H=Math.max(H,Ut.y)}return[new k.Point(E,M),new k.Point(U,M),new k.Point(U,H),new k.Point(E,H),new k.Point(E,M)]},Object.defineProperties(qa.prototype,ds);var no=function(x){var C,E,M,U;this._hashName=x&&encodeURIComponent(x),k.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(C=this._updateHashUnthrottled.bind(this),E=!1,M=null,U=function(){M=null,E&&(C(),M=setTimeout(U,300),E=!1)},function(){return E=!0,M||U(),M})};no.prototype.addTo=function(x){return this._map=x,k.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},no.prototype.remove=function(){return k.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},no.prototype.getHashString=function(x){var C=this._map.getCenter(),E=Math.round(100*this._map.getZoom())/100,M=Math.ceil((E*Math.LN2+Math.log(512/360/.5))/Math.LN10),U=Math.pow(10,M),H=Math.round(C.lng*U)/U,$=Math.round(C.lat*U)/U,ht=this._map.getBearing(),Ut=this._map.getPitch(),re="";if(re+=x?"/"+H+"/"+$+"/"+E:E+"/"+$+"/"+H,(ht||Ut)&&(re+="/"+Math.round(10*ht)/10),Ut&&(re+="/"+Math.round(Ut)),this._hashName){var Fe=this._hashName,Re=!1,De=k.window.location.hash.slice(1).split("&").map(function(cr){var ur=cr.split("=")[0];return ur===Fe?(Re=!0,ur+"="+re):cr}).filter(function(cr){return cr});return Re||De.push(Fe+"="+re),"#"+De.join("&")}return"#"+re},no.prototype._getCurrentHash=function(){var x,C=this,E=k.window.location.hash.replace("#","");return this._hashName?(E.split("&").map(function(M){return M.split("=")}).forEach(function(M){M[0]===C._hashName&&(x=M)}),(x&&x[1]||"").split("/")):E.split("/")},no.prototype._onHashChange=function(){var x=this._getCurrentHash();if(x.length>=3&&!x.some(function(E){return isNaN(E)})){var C=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(x[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+x[2],+x[1]],zoom:+x[0],bearing:C,pitch:+(x[4]||0)}),!0}return!1},no.prototype._updateHashUnthrottled=function(){var x=k.window.location.href.replace(/(#.+)?$/,this.getHashString());try{k.window.history.replaceState(k.window.history.state,null,x)}catch(C){}};var dh={linearity:.3,easing:k.bezier(0,0,.3,1)},gc=k.extend({deceleration:2500,maxSpeed:1400},dh),kp=k.extend({deceleration:20,maxSpeed:1400},dh),uv=k.extend({deceleration:1e3,maxSpeed:360},dh),Qi=k.extend({deceleration:1e3,maxSpeed:90},dh),vh=function(x){this._map=x,this.clear()};function gh(x,C){(!x.duration||x.duration<C.duration)&&(x.duration=C.duration,x.easing=C.easing)}function Tf(x,C,E){var M=E.maxSpeed,U=E.linearity,H=E.deceleration,$=k.clamp(x*U/(C/1e3),-M,M),ht=Math.abs($)/(H*U);return{easing:E.easing,duration:1e3*ht,amount:$*(ht/2)}}vh.prototype.clear=function(){this._inertiaBuffer=[]},vh.prototype.record=function(x){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:k.browser.now(),settings:x})},vh.prototype._drainInertiaBuffer=function(){for(var x=this._inertiaBuffer,C=k.browser.now();x.length>0&&C-x[0].time>160;)x.shift()},vh.prototype._onMoveEnd=function(x){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var C={zoom:0,bearing:0,pitch:0,pan:new k.Point(0,0),pinchAround:void 0,around:void 0},E=0,M=this._inertiaBuffer;E<M.length;E+=1){var U=M[E].settings;C.zoom+=U.zoomDelta||0,C.bearing+=U.bearingDelta||0,C.pitch+=U.pitchDelta||0,U.panDelta&&C.pan._add(U.panDelta),U.around&&(C.around=U.around),U.pinchAround&&(C.pinchAround=U.pinchAround)}var H=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,$={};if(C.pan.mag()){var ht=Tf(C.pan.mag(),H,k.extend({},gc,x||{}));$.offset=C.pan.mult(ht.amount/C.pan.mag()),$.center=this._map.transform.center,gh($,ht)}if(C.zoom){var Ut=Tf(C.zoom,H,kp);$.zoom=this._map.transform.zoom+Ut.amount,gh($,Ut)}if(C.bearing){var re=Tf(C.bearing,H,uv);$.bearing=this._map.transform.bearing+k.clamp(re.amount,-179,179),gh($,re)}if(C.pitch){var Fe=Tf(C.pitch,H,Qi);$.pitch=this._map.transform.pitch+Fe.amount,gh($,Fe)}if($.zoom||$.bearing){var Re=C.pinchAround===void 0?C.around:C.pinchAround;$.around=Re?this._map.unproject(Re):this._map.getCenter()}return this.clear(),k.extend($,{noMoveStart:!0})}};var ou=function(x){function C(M,U,H,$){$===void 0&&($={});var ht=K.mousePos(U.getCanvasContainer(),H),Ut=U.unproject(ht);x.call(this,M,k.extend({point:ht,lngLat:Ut,originalEvent:H},$)),this._defaultPrevented=!1,this.target=U}x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C;var E={defaultPrevented:{configurable:!0}};return C.prototype.preventDefault=function(){this._defaultPrevented=!0},E.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(C.prototype,E),C}(k.Event),jf=function(x){function C(M,U,H){var $=M==="touchend"?H.changedTouches:H.touches,ht=K.touchPos(U.getCanvasContainer(),$),Ut=ht.map(function(Re){return U.unproject(Re)}),re=ht.reduce(function(Re,De,cr,ur){return Re.add(De.div(ur.length))},new k.Point(0,0)),Fe=U.unproject(re);x.call(this,M,{points:ht,point:re,lngLats:Ut,lngLat:Fe,originalEvent:H}),this._defaultPrevented=!1}x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C;var E={defaultPrevented:{configurable:!0}};return C.prototype.preventDefault=function(){this._defaultPrevented=!0},E.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(C.prototype,E),C}(k.Event),Mf=function(x){function C(M,U,H){x.call(this,M,{originalEvent:H}),this._defaultPrevented=!1}x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C;var E={defaultPrevented:{configurable:!0}};return C.prototype.preventDefault=function(){this._defaultPrevented=!0},E.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(C.prototype,E),C}(k.Event),vs=function(x,C){this._map=x,this._clickTolerance=C.clickTolerance};vs.prototype.reset=function(){delete this._mousedownPos},vs.prototype.wheel=function(x){return this._firePreventable(new Mf(x.type,this._map,x))},vs.prototype.mousedown=function(x,C){return this._mousedownPos=C,this._firePreventable(new ou(x.type,this._map,x))},vs.prototype.mouseup=function(x){this._map.fire(new ou(x.type,this._map,x))},vs.prototype.click=function(x,C){this._mousedownPos&&this._mousedownPos.dist(C)>=this._clickTolerance||this._map.fire(new ou(x.type,this._map,x))},vs.prototype.dblclick=function(x){return this._firePreventable(new ou(x.type,this._map,x))},vs.prototype.mouseover=function(x){this._map.fire(new ou(x.type,this._map,x))},vs.prototype.mouseout=function(x){this._map.fire(new ou(x.type,this._map,x))},vs.prototype.touchstart=function(x){return this._firePreventable(new jf(x.type,this._map,x))},vs.prototype.touchmove=function(x){this._map.fire(new jf(x.type,this._map,x))},vs.prototype.touchend=function(x){this._map.fire(new jf(x.type,this._map,x))},vs.prototype.touchcancel=function(x){this._map.fire(new jf(x.type,this._map,x))},vs.prototype._firePreventable=function(x){if(this._map.fire(x),x.defaultPrevented)return{}},vs.prototype.isEnabled=function(){return!0},vs.prototype.isActive=function(){return!1},vs.prototype.enable=function(){},vs.prototype.disable=function(){};var Hi=function(x){this._map=x};Hi.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Hi.prototype.mousemove=function(x){this._map.fire(new ou(x.type,this._map,x))},Hi.prototype.mousedown=function(){this._delayContextMenu=!0},Hi.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ou("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Hi.prototype.contextmenu=function(x){this._delayContextMenu?this._contextMenuEvent=x:this._map.fire(new ou(x.type,this._map,x)),this._map.listens("contextmenu")&&x.preventDefault()},Hi.prototype.isEnabled=function(){return!0},Hi.prototype.isActive=function(){return!1},Hi.prototype.enable=function(){},Hi.prototype.disable=function(){};var rs=function(x,C){this._map=x,this._el=x.getCanvasContainer(),this._container=x.getContainer(),this._clickTolerance=C.clickTolerance||1};function wl(x,C){for(var E={},M=0;M<x.length;M++)E[x[M].identifier]=C[M];return E}rs.prototype.isEnabled=function(){return!!this._enabled},rs.prototype.isActive=function(){return!!this._active},rs.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},rs.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},rs.prototype.mousedown=function(x,C){this.isEnabled()&&x.shiftKey&&x.button===0&&(K.disableDrag(),this._startPos=this._lastPos=C,this._active=!0)},rs.prototype.mousemoveWindow=function(x,C){if(this._active){var E=C;if(!(this._lastPos.equals(E)||!this._box&&E.dist(this._startPos)<this._clickTolerance)){var M=this._startPos;this._lastPos=E,this._box||(this._box=K.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",x));var U=Math.min(M.x,E.x),H=Math.max(M.x,E.x),$=Math.min(M.y,E.y),ht=Math.max(M.y,E.y);K.setTransform(this._box,"translate("+U+"px,"+$+"px)"),this._box.style.width=H-U+"px",this._box.style.height=ht-$+"px"}}},rs.prototype.mouseupWindow=function(x,C){var E=this;if(this._active&&x.button===0){var M=this._startPos,U=C;if(this.reset(),K.suppressClick(),M.x!==U.x||M.y!==U.y)return this._map.fire(new k.Event("boxzoomend",{originalEvent:x})),{cameraAnimation:function(H){return H.fitScreenCoordinates(M,U,E._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",x)}},rs.prototype.keydown=function(x){this._active&&x.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",x))},rs.prototype.blur=function(){this.reset()},rs.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(K.remove(this._box),this._box=null),K.enableDrag(),delete this._startPos,delete this._lastPos},rs.prototype._fireEvent=function(x,C){return this._map.fire(new k.Event(x,{originalEvent:C}))};var Jc=function(x){this.reset(),this.numTouches=x.numTouches};Jc.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},Jc.prototype.touchstart=function(x,C,E){(this.centroid||E.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=x.timeStamp),E.length===this.numTouches&&(this.centroid=function(M){for(var U=new k.Point(0,0),H=0,$=M;H<$.length;H+=1)U._add($[H]);return U.div(M.length)}(C),this.touches=wl(E,C)))},Jc.prototype.touchmove=function(x,C,E){if(!this.aborted&&this.centroid){var M=wl(E,C);for(var U in this.touches){var H=M[U];(!H||H.dist(this.touches[U])>30)&&(this.aborted=!0)}}},Jc.prototype.touchend=function(x,C,E){if((!this.centroid||x.timeStamp-this.startTime>500)&&(this.aborted=!0),E.length===0){var M=!this.aborted&&this.centroid;if(this.reset(),M)return M}};var mc=function(x){this.singleTap=new Jc(x),this.numTaps=x.numTaps,this.reset()};mc.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},mc.prototype.touchstart=function(x,C,E){this.singleTap.touchstart(x,C,E)},mc.prototype.touchmove=function(x,C,E){this.singleTap.touchmove(x,C,E)},mc.prototype.touchend=function(x,C,E){var M=this.singleTap.touchend(x,C,E);if(M){var U=x.timeStamp-this.lastTime<500,H=!this.lastTap||this.lastTap.dist(M)<30;if(U&&H||this.reset(),this.count++,this.lastTime=x.timeStamp,this.lastTap=M,this.count===this.numTaps)return this.reset(),M}};var Iu=function(){this._zoomIn=new mc({numTouches:1,numTaps:2}),this._zoomOut=new mc({numTouches:2,numTaps:1}),this.reset()};Iu.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Iu.prototype.touchstart=function(x,C,E){this._zoomIn.touchstart(x,C,E),this._zoomOut.touchstart(x,C,E)},Iu.prototype.touchmove=function(x,C,E){this._zoomIn.touchmove(x,C,E),this._zoomOut.touchmove(x,C,E)},Iu.prototype.touchend=function(x,C,E){var M=this,U=this._zoomIn.touchend(x,C,E),H=this._zoomOut.touchend(x,C,E);return U?(this._active=!0,x.preventDefault(),setTimeout(function(){return M.reset()},0),{cameraAnimation:function($){return $.easeTo({duration:300,zoom:$.getZoom()+1,around:$.unproject(U)},{originalEvent:x})}}):H?(this._active=!0,x.preventDefault(),setTimeout(function(){return M.reset()},0),{cameraAnimation:function($){return $.easeTo({duration:300,zoom:$.getZoom()-1,around:$.unproject(H)},{originalEvent:x})}}):void 0},Iu.prototype.touchcancel=function(){this.reset()},Iu.prototype.enable=function(){this._enabled=!0},Iu.prototype.disable=function(){this._enabled=!1,this.reset()},Iu.prototype.isEnabled=function(){return this._enabled},Iu.prototype.isActive=function(){return this._active};var pd={0:1,2:2},ei=function(x){this.reset(),this._clickTolerance=x.clickTolerance||1};ei.prototype.blur=function(){this.reset()},ei.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},ei.prototype._correctButton=function(x,C){return!1},ei.prototype._move=function(x,C){return{}},ei.prototype.mousedown=function(x,C){if(!this._lastPoint){var E=K.mouseButton(x);this._correctButton(x,E)&&(this._lastPoint=C,this._eventButton=E)}},ei.prototype.mousemoveWindow=function(x,C){var E=this._lastPoint;if(E){if(x.preventDefault(),function(M,U){var H=pd[U];return M.buttons===void 0||(M.buttons&H)!==H}(x,this._eventButton))this.reset();else if(this._moved||!(C.dist(E)<this._clickTolerance))return this._moved=!0,this._lastPoint=C,this._move(E,C)}},ei.prototype.mouseupWindow=function(x){this._lastPoint&&K.mouseButton(x)===this._eventButton&&(this._moved&&K.suppressClick(),this.reset())},ei.prototype.enable=function(){this._enabled=!0},ei.prototype.disable=function(){this._enabled=!1,this.reset()},ei.prototype.isEnabled=function(){return this._enabled},ei.prototype.isActive=function(){return this._active};var tf=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.mousedown=function(E,M){x.prototype.mousedown.call(this,E,M),this._lastPoint&&(this._active=!0)},C.prototype._correctButton=function(E,M){return M===0&&!E.ctrlKey},C.prototype._move=function(E,M){return{around:M,panDelta:M.sub(E)}},C}(ei),mh=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype._correctButton=function(E,M){return M===0&&E.ctrlKey||M===2},C.prototype._move=function(E,M){var U=.8*(M.x-E.x);if(U)return this._active=!0,{bearingDelta:U}},C.prototype.contextmenu=function(E){E.preventDefault()},C}(ei),yc=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype._correctButton=function(E,M){return M===0&&E.ctrlKey||M===2},C.prototype._move=function(E,M){var U=-.5*(M.y-E.y);if(U)return this._active=!0,{pitchDelta:U}},C.prototype.contextmenu=function(E){E.preventDefault()},C}(ei),Oo=function(x){this._minTouches=1,this._clickTolerance=x.clickTolerance||1,this.reset()};Oo.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new k.Point(0,0)},Oo.prototype.touchstart=function(x,C,E){return this._calculateTransform(x,C,E)},Oo.prototype.touchmove=function(x,C,E){if(this._active&&!(E.length<this._minTouches))return x.preventDefault(),this._calculateTransform(x,C,E)},Oo.prototype.touchend=function(x,C,E){this._calculateTransform(x,C,E),this._active&&E.length<this._minTouches&&this.reset()},Oo.prototype.touchcancel=function(){this.reset()},Oo.prototype._calculateTransform=function(x,C,E){E.length>0&&(this._active=!0);var M=wl(E,C),U=new k.Point(0,0),H=new k.Point(0,0),$=0;for(var ht in M){var Ut=M[ht],re=this._touches[ht];re&&(U._add(Ut),H._add(Ut.sub(re)),$++,M[ht]=Ut)}if(this._touches=M,!($<this._minTouches)&&H.mag()){var Fe=H.div($);if(this._sum._add(Fe),!(this._sum.mag()<this._clickTolerance))return{around:U.div($),panDelta:Fe}}},Oo.prototype.enable=function(){this._enabled=!0},Oo.prototype.disable=function(){this._enabled=!1,this.reset()},Oo.prototype.isEnabled=function(){return this._enabled},Oo.prototype.isActive=function(){return this._active};var Hu=function(){this.reset()};function yh(x,C,E){for(var M=0;M<x.length;M++)if(x[M].identifier===E)return C[M]}function Wl(x,C){return Math.log(x/C)/Math.LN2}Hu.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Hu.prototype._start=function(x){},Hu.prototype._move=function(x,C,E){return{}},Hu.prototype.touchstart=function(x,C,E){this._firstTwoTouches||E.length<2||(this._firstTwoTouches=[E[0].identifier,E[1].identifier],this._start([C[0],C[1]]))},Hu.prototype.touchmove=function(x,C,E){if(this._firstTwoTouches){x.preventDefault();var M=this._firstTwoTouches,U=M[1],H=yh(E,C,M[0]),$=yh(E,C,U);if(H&&$){var ht=this._aroundCenter?null:H.add($).div(2);return this._move([H,$],ht,x)}}},Hu.prototype.touchend=function(x,C,E){if(this._firstTwoTouches){var M=this._firstTwoTouches,U=M[1],H=yh(E,C,M[0]),$=yh(E,C,U);H&&$||(this._active&&K.suppressClick(),this.reset())}},Hu.prototype.touchcancel=function(){this.reset()},Hu.prototype.enable=function(x){this._enabled=!0,this._aroundCenter=!!x&&x.around==="center"},Hu.prototype.disable=function(){this._enabled=!1,this.reset()},Hu.prototype.isEnabled=function(){return this._enabled},Hu.prototype.isActive=function(){return this._active};var Os=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.reset=function(){x.prototype.reset.call(this),delete this._distance,delete this._startDistance},C.prototype._start=function(E){this._startDistance=this._distance=E[0].dist(E[1])},C.prototype._move=function(E,M){var U=this._distance;if(this._distance=E[0].dist(E[1]),this._active||!(Math.abs(Wl(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Wl(this._distance,U),pinchAround:M}},C}(Hu);function Pl(x,C){return 180*x.angleWith(C)/Math.PI}var Lp=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.reset=function(){x.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},C.prototype._start=function(E){this._startVector=this._vector=E[0].sub(E[1]),this._minDiameter=E[0].dist(E[1])},C.prototype._move=function(E,M){var U=this._vector;if(this._vector=E[0].sub(E[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Pl(this._vector,U),pinchAround:M}},C.prototype._isBelowThreshold=function(E){this._minDiameter=Math.min(this._minDiameter,E.mag());var M=25/(Math.PI*this._minDiameter)*360,U=Pl(E,this._startVector);return Math.abs(U)<M},C}(Hu);function dd(x){return Math.abs(x.y)>Math.abs(x.x)}var ef=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.reset=function(){x.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},C.prototype._start=function(E){this._lastPoints=E,dd(E[0].sub(E[1]))&&(this._valid=!1)},C.prototype._move=function(E,M,U){var H=E[0].sub(this._lastPoints[0]),$=E[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(H,$,U.timeStamp),this._valid)return this._lastPoints=E,this._active=!0,{pitchDelta:(H.y+$.y)/2*-.5}},C.prototype.gestureBeginsVertically=function(E,M,U){if(this._valid!==void 0)return this._valid;var H=E.mag()>=2,$=M.mag()>=2;if(H||$){if(!H||!$)return this._firstMove===void 0&&(this._firstMove=U),U-this._firstMove<100&&void 0;var ht=E.y>0==M.y>0;return dd(E)&&dd(M)&&ht}},C}(Hu),vd={panStep:100,bearingStep:15,pitchStep:10},ic=function(){var x=vd;this._panStep=x.panStep,this._bearingStep=x.bearingStep,this._pitchStep=x.pitchStep,this._rotationDisabled=!1};function cl(x){return x*(2-x)}ic.prototype.blur=function(){this.reset()},ic.prototype.reset=function(){this._active=!1},ic.prototype.keydown=function(x){var C=this;if(!(x.altKey||x.ctrlKey||x.metaKey)){var E=0,M=0,U=0,H=0,$=0;switch(x.keyCode){case 61:case 107:case 171:case 187:E=1;break;case 189:case 109:case 173:E=-1;break;case 37:x.shiftKey?M=-1:(x.preventDefault(),H=-1);break;case 39:x.shiftKey?M=1:(x.preventDefault(),H=1);break;case 38:x.shiftKey?U=1:(x.preventDefault(),$=-1);break;case 40:x.shiftKey?U=-1:(x.preventDefault(),$=1);break;default:return}return this._rotationDisabled&&(M=0,U=0),{cameraAnimation:function(ht){var Ut=ht.getZoom();ht.easeTo({duration:300,easeId:"keyboardHandler",easing:cl,zoom:E?Math.round(Ut)+E*(x.shiftKey?2:1):Ut,bearing:ht.getBearing()+M*C._bearingStep,pitch:ht.getPitch()+U*C._pitchStep,offset:[-H*C._panStep,-$*C._panStep],center:ht.getCenter()},{originalEvent:x})}}}},ic.prototype.enable=function(){this._enabled=!0},ic.prototype.disable=function(){this._enabled=!1,this.reset()},ic.prototype.isEnabled=function(){return this._enabled},ic.prototype.isActive=function(){return this._active},ic.prototype.disableRotation=function(){this._rotationDisabled=!0},ic.prototype.enableRotation=function(){this._rotationDisabled=!1};var io=function(x,C){this._map=x,this._el=x.getCanvasContainer(),this._handler=C,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,k.bindAll(["_onTimeout"],this)};io.prototype.setZoomRate=function(x){this._defaultZoomRate=x},io.prototype.setWheelZoomRate=function(x){this._wheelZoomRate=x},io.prototype.isEnabled=function(){return!!this._enabled},io.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},io.prototype.isZooming=function(){return!!this._zooming},io.prototype.enable=function(x){this.isEnabled()||(this._enabled=!0,this._aroundCenter=x&&x.around==="center")},io.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},io.prototype.wheel=function(x){if(this.isEnabled()){var C=x.deltaMode===k.window.WheelEvent.DOM_DELTA_LINE?40*x.deltaY:x.deltaY,E=k.browser.now(),M=E-(this._lastWheelEventTime||0);this._lastWheelEventTime=E,C!==0&&C%4.000244140625==0?this._type="wheel":C!==0&&Math.abs(C)<4?this._type="trackpad":M>400?(this._type=null,this._lastValue=C,this._timeout=setTimeout(this._onTimeout,40,x)):this._type||(this._type=Math.abs(M*C)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,C+=this._lastValue)),x.shiftKey&&C&&(C/=4),this._type&&(this._lastWheelEvent=x,this._delta-=C,this._active||this._start(x)),x.preventDefault()}},io.prototype._onTimeout=function(x){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(x)},io.prototype._start=function(x){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var C=K.mousePos(this._el,x);this._around=k.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(C)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},io.prototype.renderFrame=function(){var x=this;if(this._frameId&&(this._frameId=null,this.isActive())){var C=this._map.transform;if(this._delta!==0){var E=this._type==="wheel"&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,M=2/(1+Math.exp(-Math.abs(this._delta*E)));this._delta<0&&M!==0&&(M=1/M);var U=typeof this._targetZoom=="number"?C.zoomScale(this._targetZoom):C.scale;this._targetZoom=Math.min(C.maxZoom,Math.max(C.minZoom,C.scaleZoom(U*M))),this._type==="wheel"&&(this._startZoom=C.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var H,$=typeof this._targetZoom=="number"?this._targetZoom:C.zoom,ht=this._startZoom,Ut=this._easing,re=!1;if(this._type==="wheel"&&ht&&Ut){var Fe=Math.min((k.browser.now()-this._lastWheelEventTime)/200,1),Re=Ut(Fe);H=k.number(ht,$,Re),Fe<1?this._frameId||(this._frameId=!0):re=!0}else H=$,re=!0;return this._active=!0,re&&(this._active=!1,this._finishTimeout=setTimeout(function(){x._zooming=!1,x._handler._triggerRenderFrame(),delete x._targetZoom,delete x._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!re,zoomDelta:H-C.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},io.prototype._smoothOutEasing=function(x){var C=k.ease;if(this._prevEase){var E=this._prevEase,M=(k.browser.now()-E.start)/E.duration,U=E.easing(M+.01)-E.easing(M),H=.27/Math.sqrt(U*U+1e-4)*.01,$=Math.sqrt(.0729-H*H);C=k.bezier(H,$,.25,1)}return this._prevEase={start:k.browser.now(),duration:x,easing:C},C},io.prototype.blur=function(){this.reset()},io.prototype.reset=function(){this._active=!1};var Ws=function(x,C){this._clickZoom=x,this._tapZoom=C};Ws.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Ws.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Ws.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Ws.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Ol=function(){this.reset()};Ol.prototype.reset=function(){this._active=!1},Ol.prototype.blur=function(){this.reset()},Ol.prototype.dblclick=function(x,C){return x.preventDefault(),{cameraAnimation:function(E){E.easeTo({duration:300,zoom:E.getZoom()+(x.shiftKey?-1:1),around:E.unproject(C)},{originalEvent:x})}}},Ol.prototype.enable=function(){this._enabled=!0},Ol.prototype.disable=function(){this._enabled=!1,this.reset()},Ol.prototype.isEnabled=function(){return this._enabled},Ol.prototype.isActive=function(){return this._active};var vu=function(){this._tap=new mc({numTouches:1,numTaps:1}),this.reset()};vu.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},vu.prototype.touchstart=function(x,C,E){this._swipePoint||(this._tapTime&&x.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?E.length>0&&(this._swipePoint=C[0],this._swipeTouch=E[0].identifier):this._tap.touchstart(x,C,E))},vu.prototype.touchmove=function(x,C,E){if(this._tapTime){if(this._swipePoint){if(E[0].identifier!==this._swipeTouch)return;var M=C[0],U=M.y-this._swipePoint.y;return this._swipePoint=M,x.preventDefault(),this._active=!0,{zoomDelta:U/128}}}else this._tap.touchmove(x,C,E)},vu.prototype.touchend=function(x,C,E){this._tapTime?this._swipePoint&&E.length===0&&this.reset():this._tap.touchend(x,C,E)&&(this._tapTime=x.timeStamp)},vu.prototype.touchcancel=function(){this.reset()},vu.prototype.enable=function(){this._enabled=!0},vu.prototype.disable=function(){this._enabled=!1,this.reset()},vu.prototype.isEnabled=function(){return this._enabled},vu.prototype.isActive=function(){return this._active};var Wf=function(x,C,E){this._el=x,this._mousePan=C,this._touchPan=E};Wf.prototype.enable=function(x){this._inertiaOptions=x||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Wf.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Wf.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Wf.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var If=function(x,C,E){this._pitchWithRotate=x.pitchWithRotate,this._mouseRotate=C,this._mousePitch=E};If.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},If.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},If.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},If.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var gu=function(x,C,E,M){this._el=x,this._touchZoom=C,this._touchRotate=E,this._tapDragZoom=M,this._rotationDisabled=!1,this._enabled=!0};gu.prototype.enable=function(x){this._touchZoom.enable(x),this._rotationDisabled||this._touchRotate.enable(x),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},gu.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},gu.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},gu.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},gu.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},gu.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var ku=function(x){return x.zoom||x.drag||x.pitch||x.rotate},_c=function(x){function C(){x.apply(this,arguments)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C}(k.Event);function aa(x){return x.panDelta&&x.panDelta.mag()||x.zoomDelta||x.bearingDelta||x.pitchDelta}var Ii=function(x,C){this._map=x,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new vh(x),this._bearingSnap=C.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(C),k.bindAll(["handleEvent","handleWindowEvent"],this);var E=this._el;this._listeners=[[E,"touchstart",{passive:!0}],[E,"touchmove",{passive:!1}],[E,"touchend",void 0],[E,"touchcancel",void 0],[E,"mousedown",void 0],[E,"mousemove",void 0],[E,"mouseup",void 0],[k.window.document,"mousemove",{capture:!0}],[k.window.document,"mouseup",void 0],[E,"mouseover",void 0],[E,"mouseout",void 0],[E,"dblclick",void 0],[E,"click",void 0],[E,"keydown",{capture:!1}],[E,"keyup",void 0],[E,"wheel",{passive:!1}],[E,"contextmenu",void 0],[k.window,"blur",void 0]];for(var M=0,U=this._listeners;M<U.length;M+=1){var H=U[M],$=H[0];K.addEventListener($,H[1],$===k.window.document?this.handleWindowEvent:this.handleEvent,H[2])}};Ii.prototype.destroy=function(){for(var x=0,C=this._listeners;x<C.length;x+=1){var E=C[x],M=E[0];K.removeEventListener(M,E[1],M===k.window.document?this.handleWindowEvent:this.handleEvent,E[2])}},Ii.prototype._addDefaultHandlers=function(x){var C=this._map,E=C.getCanvasContainer();this._add("mapEvent",new vs(C,x));var M=C.boxZoom=new rs(C,x);this._add("boxZoom",M);var U=new Iu,H=new Ol;C.doubleClickZoom=new Ws(H,U),this._add("tapZoom",U),this._add("clickZoom",H);var $=new vu;this._add("tapDragZoom",$);var ht=C.touchPitch=new ef;this._add("touchPitch",ht);var Ut=new mh(x),re=new yc(x);C.dragRotate=new If(x,Ut,re),this._add("mouseRotate",Ut,["mousePitch"]),this._add("mousePitch",re,["mouseRotate"]);var Fe=new tf(x),Re=new Oo(x);C.dragPan=new Wf(E,Fe,Re),this._add("mousePan",Fe),this._add("touchPan",Re,["touchZoom","touchRotate"]);var De=new Lp,cr=new Os;C.touchZoomRotate=new gu(E,cr,De,$),this._add("touchRotate",De,["touchPan","touchZoom"]),this._add("touchZoom",cr,["touchPan","touchRotate"]);var ur=C.scrollZoom=new io(C,this);this._add("scrollZoom",ur,["mousePan"]);var Er=C.keyboard=new ic;this._add("keyboard",Er),this._add("blockableMapEvent",new Hi(C));for(var nr=0,wr=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];nr<wr.length;nr+=1){var Ir=wr[nr];x.interactive&&x[Ir]&&C[Ir].enable(x[Ir])}},Ii.prototype._add=function(x,C,E){this._handlers.push({handlerName:x,handler:C,allowed:E}),this._handlersById[x]=C},Ii.prototype.stop=function(x){if(!this._updatingCamera){for(var C=0,E=this._handlers;C<E.length;C+=1)E[C].handler.reset();this._inertia.clear(),this._fireEvents({},{},x),this._changes=[]}},Ii.prototype.isActive=function(){for(var x=0,C=this._handlers;x<C.length;x+=1)if(C[x].handler.isActive())return!0;return!1},Ii.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},Ii.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},Ii.prototype.isMoving=function(){return Boolean(ku(this._eventsInProgress))||this.isZooming()},Ii.prototype._blockedByActive=function(x,C,E){for(var M in x)if(M!==E&&(!C||C.indexOf(M)<0))return!0;return!1},Ii.prototype.handleWindowEvent=function(x){this.handleEvent(x,x.type+"Window")},Ii.prototype._getMapTouches=function(x){for(var C=[],E=0,M=x;E<M.length;E+=1){var U=M[E];this._el.contains(U.target)&&C.push(U)}return C},Ii.prototype.handleEvent=function(x,C){this._updatingCamera=!0;for(var E=x.type==="renderFrame"?void 0:x,M={needsRenderFrame:!1},U={},H={},$=x.touches?this._getMapTouches(x.touches):void 0,ht=$?K.touchPos(this._el,$):K.mousePos(this._el,x),Ut=0,re=this._handlers;Ut<re.length;Ut+=1){var Fe=re[Ut],Re=Fe.handlerName,De=Fe.handler,cr=Fe.allowed;if(De.isEnabled()){var ur=void 0;this._blockedByActive(H,cr,Re)?De.reset():De[C||x.type]&&(ur=De[C||x.type](x,ht,$),this.mergeHandlerResult(M,U,ur,Re,E),ur&&ur.needsRenderFrame&&this._triggerRenderFrame()),(ur||De.isActive())&&(H[Re]=De)}}var Er={};for(var nr in this._previousActiveHandlers)H[nr]||(Er[nr]=E);this._previousActiveHandlers=H,(Object.keys(Er).length||aa(M))&&(this._changes.push([M,U,Er]),this._triggerRenderFrame()),(Object.keys(H).length||aa(M))&&this._map._stop(!0),this._updatingCamera=!1;var wr=M.cameraAnimation;wr&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],wr(this._map))},Ii.prototype.mergeHandlerResult=function(x,C,E,M,U){if(E){k.extend(x,E);var H={handlerName:M,originalEvent:E.originalEvent||U};E.zoomDelta!==void 0&&(C.zoom=H),E.panDelta!==void 0&&(C.drag=H),E.pitchDelta!==void 0&&(C.pitch=H),E.bearingDelta!==void 0&&(C.rotate=H)}},Ii.prototype._applyChanges=function(){for(var x={},C={},E={},M=0,U=this._changes;M<U.length;M+=1){var H=U[M],$=H[0],ht=H[1],Ut=H[2];$.panDelta&&(x.panDelta=(x.panDelta||new k.Point(0,0))._add($.panDelta)),$.zoomDelta&&(x.zoomDelta=(x.zoomDelta||0)+$.zoomDelta),$.bearingDelta&&(x.bearingDelta=(x.bearingDelta||0)+$.bearingDelta),$.pitchDelta&&(x.pitchDelta=(x.pitchDelta||0)+$.pitchDelta),$.around!==void 0&&(x.around=$.around),$.pinchAround!==void 0&&(x.pinchAround=$.pinchAround),$.noInertia&&(x.noInertia=$.noInertia),k.extend(C,ht),k.extend(E,Ut)}this._updateMapTransform(x,C,E),this._changes=[]},Ii.prototype._updateMapTransform=function(x,C,E){var M=this._map,U=M.transform;if(!aa(x))return this._fireEvents(C,E,!0);var H=x.panDelta,$=x.zoomDelta,ht=x.bearingDelta,Ut=x.pitchDelta,re=x.around,Fe=x.pinchAround;Fe!==void 0&&(re=Fe),M._stop(!0),re=re||M.transform.centerPoint;var Re=U.pointLocation(H?re.sub(H):re);ht&&(U.bearing+=ht),Ut&&(U.pitch+=Ut),$&&(U.zoom+=$),U.setLocationAtPoint(Re,re),this._map._update(),x.noInertia||this._inertia.record(x),this._fireEvents(C,E,!0)},Ii.prototype._fireEvents=function(x,C,E){var M=this,U=ku(this._eventsInProgress),H=ku(x),$={};for(var ht in x)this._eventsInProgress[ht]||($[ht+"start"]=x[ht].originalEvent),this._eventsInProgress[ht]=x[ht];for(var Ut in!U&&H&&this._fireEvent("movestart",H.originalEvent),$)this._fireEvent(Ut,$[Ut]);for(var re in H&&this._fireEvent("move",H.originalEvent),x)this._fireEvent(re,x[re].originalEvent);var Fe,Re={};for(var De in this._eventsInProgress){var cr=this._eventsInProgress[De],ur=cr.handlerName,Er=cr.originalEvent;this._handlersById[ur].isActive()||(delete this._eventsInProgress[De],Re[De+"end"]=Fe=C[ur]||Er)}for(var nr in Re)this._fireEvent(nr,Re[nr]);var wr=ku(this._eventsInProgress);if(E&&(U||H)&&!wr){this._updatingCamera=!0;var Ir=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),$r=function(gn){return gn!==0&&-M._bearingSnap<gn&&gn<M._bearingSnap};Ir?($r(Ir.bearing||this._map.getBearing())&&(Ir.bearing=0),this._map.easeTo(Ir,{originalEvent:Fe})):(this._map.fire(new k.Event("moveend",{originalEvent:Fe})),$r(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},Ii.prototype._fireEvent=function(x,C){this._map.fire(new k.Event(x,C?{originalEvent:C}:{}))},Ii.prototype._requestFrame=function(){var x=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(C){delete x._frameId,x.handleEvent(new _c("renderFrame",{timeStamp:C})),x._applyChanges()})},Ii.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var _h=function(x){function C(E,M){x.call(this),this._moving=!1,this._zooming=!1,this.transform=E,this._bearingSnap=M.bearingSnap,k.bindAll(["_renderFrameCallback"],this)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.getCenter=function(){return new k.LngLat(this.transform.center.lng,this.transform.center.lat)},C.prototype.setCenter=function(E,M){return this.jumpTo({center:E},M)},C.prototype.panBy=function(E,M,U){return E=k.Point.convert(E).mult(-1),this.panTo(this.transform.center,k.extend({offset:E},M),U)},C.prototype.panTo=function(E,M,U){return this.easeTo(k.extend({center:E},M),U)},C.prototype.getZoom=function(){return this.transform.zoom},C.prototype.setZoom=function(E,M){return this.jumpTo({zoom:E},M),this},C.prototype.zoomTo=function(E,M,U){return this.easeTo(k.extend({zoom:E},M),U)},C.prototype.zoomIn=function(E,M){return this.zoomTo(this.getZoom()+1,E,M),this},C.prototype.zoomOut=function(E,M){return this.zoomTo(this.getZoom()-1,E,M),this},C.prototype.getBearing=function(){return this.transform.bearing},C.prototype.setBearing=function(E,M){return this.jumpTo({bearing:E},M),this},C.prototype.getPadding=function(){return this.transform.padding},C.prototype.setPadding=function(E,M){return this.jumpTo({padding:E},M),this},C.prototype.rotateTo=function(E,M,U){return this.easeTo(k.extend({bearing:E},M),U)},C.prototype.resetNorth=function(E,M){return this.rotateTo(0,k.extend({duration:1e3},E),M),this},C.prototype.resetNorthPitch=function(E,M){return this.easeTo(k.extend({bearing:0,pitch:0,duration:1e3},E),M),this},C.prototype.snapToNorth=function(E,M){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(E,M):this},C.prototype.getPitch=function(){return this.transform.pitch},C.prototype.setPitch=function(E,M){return this.jumpTo({pitch:E},M),this},C.prototype.cameraForBounds=function(E,M){E=k.LngLatBounds.convert(E);var U=M&&M.bearing||0;return this._cameraForBoxAndBearing(E.getNorthWest(),E.getSouthEast(),U,M)},C.prototype._cameraForBoxAndBearing=function(E,M,U,H){var $={top:0,bottom:0,right:0,left:0};if(typeof(H=k.extend({padding:$,offset:[0,0],maxZoom:this.transform.maxZoom},H)).padding=="number"){var ht=H.padding;H.padding={top:ht,bottom:ht,right:ht,left:ht}}H.padding=k.extend($,H.padding);var Ut=this.transform,re=Ut.padding,Fe=Ut.project(k.LngLat.convert(E)),Re=Ut.project(k.LngLat.convert(M)),De=Fe.rotate(-U*Math.PI/180),cr=Re.rotate(-U*Math.PI/180),ur=new k.Point(Math.max(De.x,cr.x),Math.max(De.y,cr.y)),Er=new k.Point(Math.min(De.x,cr.x),Math.min(De.y,cr.y)),nr=ur.sub(Er),wr=(Ut.width-(re.left+re.right+H.padding.left+H.padding.right))/nr.x,Ir=(Ut.height-(re.top+re.bottom+H.padding.top+H.padding.bottom))/nr.y;if(!(Ir<0||wr<0)){var $r=Math.min(Ut.scaleZoom(Ut.scale*Math.min(wr,Ir)),H.maxZoom),gn=typeof H.offset.x=="number"?new k.Point(H.offset.x,H.offset.y):k.Point.convert(H.offset),dn=new k.Point((H.padding.left-H.padding.right)/2,(H.padding.top-H.padding.bottom)/2).rotate(U*Math.PI/180),xn=gn.add(dn).mult(Ut.scale/Ut.zoomScale($r));return{center:Ut.unproject(Fe.add(Re).div(2).sub(xn)),zoom:$r,bearing:U}}k.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},C.prototype.fitBounds=function(E,M,U){return this._fitInternal(this.cameraForBounds(E,M),M,U)},C.prototype.fitScreenCoordinates=function(E,M,U,H,$){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(k.Point.convert(E)),this.transform.pointLocation(k.Point.convert(M)),U,H),H,$)},C.prototype._fitInternal=function(E,M,U){return E?(delete(M=k.extend(E,M)).padding,M.linear?this.easeTo(M,U):this.flyTo(M,U)):this},C.prototype.jumpTo=function(E,M){this.stop();var U=this.transform,H=!1,$=!1,ht=!1;return"zoom"in E&&U.zoom!==+E.zoom&&(H=!0,U.zoom=+E.zoom),E.center!==void 0&&(U.center=k.LngLat.convert(E.center)),"bearing"in E&&U.bearing!==+E.bearing&&($=!0,U.bearing=+E.bearing),"pitch"in E&&U.pitch!==+E.pitch&&(ht=!0,U.pitch=+E.pitch),E.padding==null||U.isPaddingEqual(E.padding)||(U.padding=E.padding),this.fire(new k.Event("movestart",M)).fire(new k.Event("move",M)),H&&this.fire(new k.Event("zoomstart",M)).fire(new k.Event("zoom",M)).fire(new k.Event("zoomend",M)),$&&this.fire(new k.Event("rotatestart",M)).fire(new k.Event("rotate",M)).fire(new k.Event("rotateend",M)),ht&&this.fire(new k.Event("pitchstart",M)).fire(new k.Event("pitch",M)).fire(new k.Event("pitchend",M)),this.fire(new k.Event("moveend",M))},C.prototype.easeTo=function(E,M){var U=this;this._stop(!1,E.easeId),((E=k.extend({offset:[0,0],duration:500,easing:k.ease},E)).animate===!1||!E.essential&&k.browser.prefersReducedMotion)&&(E.duration=0);var H=this.transform,$=this.getZoom(),ht=this.getBearing(),Ut=this.getPitch(),re=this.getPadding(),Fe="zoom"in E?+E.zoom:$,Re="bearing"in E?this._normalizeBearing(E.bearing,ht):ht,De="pitch"in E?+E.pitch:Ut,cr="padding"in E?E.padding:H.padding,ur=k.Point.convert(E.offset),Er=H.centerPoint.add(ur),nr=H.pointLocation(Er),wr=k.LngLat.convert(E.center||nr);this._normalizeCenter(wr);var Ir,$r,gn=H.project(nr),dn=H.project(wr).sub(gn),xn=H.zoomScale(Fe-$);E.around&&(Ir=k.LngLat.convert(E.around),$r=H.locationPoint(Ir));var Un={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Fe!==$,this._rotating=this._rotating||ht!==Re,this._pitching=this._pitching||De!==Ut,this._padding=!H.isPaddingEqual(cr),this._easeId=E.easeId,this._prepareEase(M,E.noMoveStart,Un),this._ease(function(yi){if(U._zooming&&(H.zoom=k.number($,Fe,yi)),U._rotating&&(H.bearing=k.number(ht,Re,yi)),U._pitching&&(H.pitch=k.number(Ut,De,yi)),U._padding&&(H.interpolatePadding(re,cr,yi),Er=H.centerPoint.add(ur)),Ir)H.setLocationAtPoint(Ir,$r);else{var ui=H.zoomScale(H.zoom-$),Bi=Fe>$?Math.min(2,xn):Math.max(.5,xn),sa=Math.pow(Bi,1-yi),ua=H.unproject(gn.add(dn.mult(yi*sa)).mult(ui));H.setLocationAtPoint(H.renderWorldCopies?ua.wrap():ua,Er)}U._fireMoveEvents(M)},function(yi){U._afterEase(M,yi)},E),this},C.prototype._prepareEase=function(E,M,U){U===void 0&&(U={}),this._moving=!0,M||U.moving||this.fire(new k.Event("movestart",E)),this._zooming&&!U.zooming&&this.fire(new k.Event("zoomstart",E)),this._rotating&&!U.rotating&&this.fire(new k.Event("rotatestart",E)),this._pitching&&!U.pitching&&this.fire(new k.Event("pitchstart",E))},C.prototype._fireMoveEvents=function(E){this.fire(new k.Event("move",E)),this._zooming&&this.fire(new k.Event("zoom",E)),this._rotating&&this.fire(new k.Event("rotate",E)),this._pitching&&this.fire(new k.Event("pitch",E))},C.prototype._afterEase=function(E,M){if(!this._easeId||!M||this._easeId!==M){delete this._easeId;var U=this._zooming,H=this._rotating,$=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,U&&this.fire(new k.Event("zoomend",E)),H&&this.fire(new k.Event("rotateend",E)),$&&this.fire(new k.Event("pitchend",E)),this.fire(new k.Event("moveend",E))}},C.prototype.flyTo=function(E,M){var U=this;if(!E.essential&&k.browser.prefersReducedMotion){var H=k.pick(E,["center","zoom","bearing","pitch","around"]);return this.jumpTo(H,M)}this.stop(),E=k.extend({offset:[0,0],speed:1.2,curve:1.42,easing:k.ease},E);var $=this.transform,ht=this.getZoom(),Ut=this.getBearing(),re=this.getPitch(),Fe=this.getPadding(),Re="zoom"in E?k.clamp(+E.zoom,$.minZoom,$.maxZoom):ht,De="bearing"in E?this._normalizeBearing(E.bearing,Ut):Ut,cr="pitch"in E?+E.pitch:re,ur="padding"in E?E.padding:$.padding,Er=$.zoomScale(Re-ht),nr=k.Point.convert(E.offset),wr=$.centerPoint.add(nr),Ir=$.pointLocation(wr),$r=k.LngLat.convert(E.center||Ir);this._normalizeCenter($r);var gn=$.project(Ir),dn=$.project($r).sub(gn),xn=E.curve,Un=Math.max($.width,$.height),yi=Un/Er,ui=dn.mag();if("minZoom"in E){var Bi=k.clamp(Math.min(E.minZoom,ht,Re),$.minZoom,$.maxZoom),sa=Un/$.zoomScale(Bi-ht);xn=Math.sqrt(sa/ui*2)}var ua=xn*xn;function ha(xa){var ga=(yi*yi-Un*Un+(xa?-1:1)*ua*ua*ui*ui)/(2*(xa?yi:Un)*ua*ui);return Math.log(Math.sqrt(ga*ga+1)-ga)}function uo(xa){return(Math.exp(xa)-Math.exp(-xa))/2}function Ni(xa){return(Math.exp(xa)+Math.exp(-xa))/2}var La=ha(0),Ra=function(xa){return Ni(La)/Ni(La+xn*xa)},Ta=function(xa){return Un*((Ni(La)*(uo(ga=La+xn*xa)/Ni(ga))-uo(La))/ua)/ui;var ga},_a=(ha(1)-La)/xn;if(Math.abs(ui)<1e-6||!isFinite(_a)){if(Math.abs(Un-yi)<1e-6)return this.easeTo(E,M);var za=yi<Un?-1:1;_a=Math.abs(Math.log(yi/Un))/xn,Ta=function(){return 0},Ra=function(xa){return Math.exp(za*xn*xa)}}return E.duration="duration"in E?+E.duration:1e3*_a/("screenSpeed"in E?+E.screenSpeed/xn:+E.speed),E.maxDuration&&E.duration>E.maxDuration&&(E.duration=0),this._zooming=!0,this._rotating=Ut!==De,this._pitching=cr!==re,this._padding=!$.isPaddingEqual(ur),this._prepareEase(M,!1),this._ease(function(xa){var ga=xa*_a,Qs=1/Ra(ga);$.zoom=xa===1?Re:ht+$.scaleZoom(Qs),U._rotating&&($.bearing=k.number(Ut,De,xa)),U._pitching&&($.pitch=k.number(re,cr,xa)),U._padding&&($.interpolatePadding(Fe,ur,xa),wr=$.centerPoint.add(nr));var As=xa===1?$r:$.unproject(gn.add(dn.mult(Ta(ga))).mult(Qs));$.setLocationAtPoint($.renderWorldCopies?As.wrap():As,wr),U._fireMoveEvents(M)},function(){return U._afterEase(M)},E),this},C.prototype.isEasing=function(){return!!this._easeFrameId},C.prototype.stop=function(){return this._stop()},C.prototype._stop=function(E,M){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var U=this._onEaseEnd;delete this._onEaseEnd,U.call(this,M)}if(!E){var H=this.handlers;H&&H.stop(!1)}return this},C.prototype._ease=function(E,M,U){U.animate===!1||U.duration===0?(E(1),M()):(this._easeStart=k.browser.now(),this._easeOptions=U,this._onEaseFrame=E,this._onEaseEnd=M,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},C.prototype._renderFrameCallback=function(){var E=Math.min((k.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(E)),E<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},C.prototype._normalizeBearing=function(E,M){E=k.wrap(E,-180,180);var U=Math.abs(E-M);return Math.abs(E-360-M)<U&&(E-=360),Math.abs(E+360-M)<U&&(E+=360),E},C.prototype._normalizeCenter=function(E){var M=this.transform;if(M.renderWorldCopies&&!M.lngRange){var U=E.lng-M.center.lng;E.lng+=U>180?-360:U<-180?360:0}},C}(k.Evented),fl=function(x){x===void 0&&(x={}),this.options=x,k.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};fl.prototype.getDefaultPosition=function(){return"bottom-right"},fl.prototype.onAdd=function(x){var C=this.options&&this.options.compact;return this._map=x,this._container=K.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=K.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=K.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),C&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),C===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},fl.prototype.onRemove=function(){K.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},fl.prototype._setElementTitle=function(x,C){var E=this._map._getUIString("AttributionControl."+C);x.title=E,x.setAttribute("aria-label",E)},fl.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},fl.prototype._updateEditLink=function(){var x=this._editLink;x||(x=this._editLink=this._container.querySelector(".mapbox-improve-map"));var C=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||k.config.ACCESS_TOKEN}];if(x){var E=C.reduce(function(M,U,H){return U.value&&(M+=U.key+"="+U.value+(H<C.length-1?"&":"")),M},"?");x.href=k.config.FEEDBACK_URL+"/"+E+(this._map._hash?this._map._hash.getHashString(!0):""),x.rel="noopener nofollow",this._setElementTitle(x,"MapFeedback")}},fl.prototype._updateData=function(x){!x||x.sourceDataType!=="metadata"&&x.sourceDataType!=="visibility"&&x.dataType!=="style"||(this._updateAttributions(),this._updateEditLink())},fl.prototype._updateAttributions=function(){if(this._map.style){var x=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?x=x.concat(this.options.customAttribution.map(function(ht){return typeof ht!="string"?"":ht})):typeof this.options.customAttribution=="string"&&x.push(this.options.customAttribution)),this._map.style.stylesheet){var C=this._map.style.stylesheet;this.styleOwner=C.owner,this.styleId=C.id}var E=this._map.style.sourceCaches;for(var M in E){var U=E[M];if(U.used){var H=U.getSource();H.attribution&&x.indexOf(H.attribution)<0&&x.push(H.attribution)}}x.sort(function(ht,Ut){return ht.length-Ut.length});var $=(x=x.filter(function(ht,Ut){for(var re=Ut+1;re<x.length;re++)if(x[re].indexOf(ht)>=0)return!1;return!0})).join(" | ");$!==this._attribHTML&&(this._attribHTML=$,x.length?(this._innerContainer.innerHTML=$,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},fl.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var tl=function(){k.bindAll(["_updateLogo"],this),k.bindAll(["_updateCompact"],this)};tl.prototype.onAdd=function(x){this._map=x,this._container=K.create("div","mapboxgl-ctrl");var C=K.create("a","mapboxgl-ctrl-logo");return C.target="_blank",C.rel="noopener nofollow",C.href="https://www.mapbox.com/",C.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),C.setAttribute("rel","noopener nofollow"),this._container.appendChild(C),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},tl.prototype.onRemove=function(){K.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},tl.prototype.getDefaultPosition=function(){return"bottom-left"},tl.prototype._updateLogo=function(x){x&&x.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},tl.prototype._logoRequired=function(){if(this._map.style){var x=this._map.style.sourceCaches;for(var C in x)if(x[C].getSource().mapbox_logo)return!0;return!1}},tl.prototype._updateCompact=function(){var x=this._container.children;if(x.length){var C=x[0];this._map.getCanvasContainer().offsetWidth<250?C.classList.add("mapboxgl-compact"):C.classList.remove("mapboxgl-compact")}};var su=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};su.prototype.add=function(x){var C=++this._id;return this._queue.push({callback:x,id:C,cancelled:!1}),C},su.prototype.remove=function(x){for(var C=this._currentlyRunning,E=0,M=C?this._queue.concat(C):this._queue;E<M.length;E+=1){var U=M[E];if(U.id===x)return void(U.cancelled=!0)}},su.prototype.run=function(x){x===void 0&&(x=0);var C=this._currentlyRunning=this._queue;this._queue=[];for(var E=0,M=C;E<M.length;E+=1){var U=M[E];if(!U.cancelled&&(U.callback(x),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},su.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var Sl={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},gd=k.window.HTMLImageElement,Hh=k.window.HTMLElement,Yo=k.window.ImageBitmap,os={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},lv=function(x){function C(M){var U=this;if((M=k.extend({},os,M)).minZoom!=null&&M.maxZoom!=null&&M.minZoom>M.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(M.minPitch!=null&&M.maxPitch!=null&&M.minPitch>M.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(M.minPitch!=null&&M.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(M.maxPitch!=null&&M.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var H=new qa(M.minZoom,M.maxZoom,M.minPitch,M.maxPitch,M.renderWorldCopies);if(x.call(this,H,M),this._interactive=M.interactive,this._maxTileCacheSize=M.maxTileCacheSize,this._failIfMajorPerformanceCaveat=M.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=M.preserveDrawingBuffer,this._antialias=M.antialias,this._trackResize=M.trackResize,this._bearingSnap=M.bearingSnap,this._refreshExpiredTiles=M.refreshExpiredTiles,this._fadeDuration=M.fadeDuration,this._crossSourceCollisions=M.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=M.collectResourceTiming,this._renderTaskQueue=new su,this._controls=[],this._mapId=k.uniqueId(),this._locale=k.extend({},Sl,M.locale),this._clickTolerance=M.clickTolerance,this._requestManager=new k.RequestManager(M.transformRequest,M.accessToken),typeof M.container=="string"){if(this._container=k.window.document.getElementById(M.container),!this._container)throw new Error("Container '"+M.container+"' not found.")}else{if(!(M.container instanceof Hh))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=M.container}if(M.maxBounds&&this.setMaxBounds(M.maxBounds),k.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return U._update(!1)}),this.on("moveend",function(){return U._update(!1)}),this.on("zoom",function(){return U._update(!0)}),k.window!==void 0&&(k.window.addEventListener("online",this._onWindowOnline,!1),k.window.addEventListener("resize",this._onWindowResize,!1),k.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Ii(this,M),this._hash=M.hash&&new no(typeof M.hash=="string"&&M.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:M.center,zoom:M.zoom,bearing:M.bearing,pitch:M.pitch}),M.bounds&&(this.resize(),this.fitBounds(M.bounds,k.extend({},M.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=M.localIdeographFontFamily,M.style&&this.setStyle(M.style,{localIdeographFontFamily:M.localIdeographFontFamily}),M.attributionControl&&this.addControl(new fl({customAttribution:M.customAttribution})),this.addControl(new tl,M.logoPosition),this.on("style.load",function(){U.transform.unmodified&&U.jumpTo(U.style.stylesheet)}),this.on("data",function($){U._update($.dataType==="style"),U.fire(new k.Event($.dataType+"data",$))}),this.on("dataloading",function($){U.fire(new k.Event($.dataType+"dataloading",$))})}x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C;var E={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return C.prototype._getMapId=function(){return this._mapId},C.prototype.addControl=function(M,U){if(U===void 0&&(U=M.getDefaultPosition?M.getDefaultPosition():"top-right"),!M||!M.onAdd)return this.fire(new k.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var H=M.onAdd(this);this._controls.push(M);var $=this._controlPositions[U];return U.indexOf("bottom")!==-1?$.insertBefore(H,$.firstChild):$.appendChild(H),this},C.prototype.removeControl=function(M){if(!M||!M.onRemove)return this.fire(new k.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var U=this._controls.indexOf(M);return U>-1&&this._controls.splice(U,1),M.onRemove(this),this},C.prototype.hasControl=function(M){return this._controls.indexOf(M)>-1},C.prototype.resize=function(M){var U=this._containerDimensions(),H=U[0],$=U[1];if(H===this.transform.width&&$===this.transform.height)return this;this._resizeCanvas(H,$),this.transform.resize(H,$),this.painter.resize(H,$);var ht=!this._moving;return ht&&this.fire(new k.Event("movestart",M)).fire(new k.Event("move",M)),this.fire(new k.Event("resize",M)),ht&&this.fire(new k.Event("moveend",M)),this},C.prototype.getBounds=function(){return this.transform.getBounds()},C.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},C.prototype.setMaxBounds=function(M){return this.transform.setMaxBounds(k.LngLatBounds.convert(M)),this._update()},C.prototype.setMinZoom=function(M){if((M=M==null?-2:M)>=-2&&M<=this.transform.maxZoom)return this.transform.minZoom=M,this._update(),this.getZoom()<M&&this.setZoom(M),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")},C.prototype.getMinZoom=function(){return this.transform.minZoom},C.prototype.setMaxZoom=function(M){if((M=M==null?22:M)>=this.transform.minZoom)return this.transform.maxZoom=M,this._update(),this.getZoom()>M&&this.setZoom(M),this;throw new Error("maxZoom must be greater than the current minZoom")},C.prototype.getMaxZoom=function(){return this.transform.maxZoom},C.prototype.setMinPitch=function(M){if((M=M==null?0:M)<0)throw new Error("minPitch must be greater than or equal to 0");if(M>=0&&M<=this.transform.maxPitch)return this.transform.minPitch=M,this._update(),this.getPitch()<M&&this.setPitch(M),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")},C.prototype.getMinPitch=function(){return this.transform.minPitch},C.prototype.setMaxPitch=function(M){if((M=M==null?60:M)>60)throw new Error("maxPitch must be less than or equal to 60");if(M>=this.transform.minPitch)return this.transform.maxPitch=M,this._update(),this.getPitch()>M&&this.setPitch(M),this;throw new Error("maxPitch must be greater than the current minPitch")},C.prototype.getMaxPitch=function(){return this.transform.maxPitch},C.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},C.prototype.setRenderWorldCopies=function(M){return this.transform.renderWorldCopies=M,this._update()},C.prototype.project=function(M){return this.transform.locationPoint(k.LngLat.convert(M))},C.prototype.unproject=function(M){return this.transform.pointLocation(k.Point.convert(M))},C.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},C.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},C.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},C.prototype._createDelegatedListener=function(M,U,H){var $,ht=this;if(M==="mouseenter"||M==="mouseover"){var Ut=!1;return{layer:U,listener:H,delegates:{mousemove:function(Fe){var Re=ht.getLayer(U)?ht.queryRenderedFeatures(Fe.point,{layers:[U]}):[];Re.length?Ut||(Ut=!0,H.call(ht,new ou(M,ht,Fe.originalEvent,{features:Re}))):Ut=!1},mouseout:function(){Ut=!1}}}}if(M==="mouseleave"||M==="mouseout"){var re=!1;return{layer:U,listener:H,delegates:{mousemove:function(Fe){(ht.getLayer(U)?ht.queryRenderedFeatures(Fe.point,{layers:[U]}):[]).length?re=!0:re&&(re=!1,H.call(ht,new ou(M,ht,Fe.originalEvent)))},mouseout:function(Fe){re&&(re=!1,H.call(ht,new ou(M,ht,Fe.originalEvent)))}}}}return{layer:U,listener:H,delegates:($={},$[M]=function(Fe){var Re=ht.getLayer(U)?ht.queryRenderedFeatures(Fe.point,{layers:[U]}):[];Re.length&&(Fe.features=Re,H.call(ht,Fe),delete Fe.features)},$)}},C.prototype.on=function(M,U,H){if(H===void 0)return x.prototype.on.call(this,M,U);var $=this._createDelegatedListener(M,U,H);for(var ht in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[M]=this._delegatedListeners[M]||[],this._delegatedListeners[M].push($),$.delegates)this.on(ht,$.delegates[ht]);return this},C.prototype.once=function(M,U,H){if(H===void 0)return x.prototype.once.call(this,M,U);var $=this._createDelegatedListener(M,U,H);for(var ht in $.delegates)this.once(ht,$.delegates[ht]);return this},C.prototype.off=function(M,U,H){var $=this;return H===void 0?x.prototype.off.call(this,M,U):(this._delegatedListeners&&this._delegatedListeners[M]&&function(ht){for(var Ut=ht[M],re=0;re<Ut.length;re++){var Fe=Ut[re];if(Fe.layer===U&&Fe.listener===H){for(var Re in Fe.delegates)$.off(Re,Fe.delegates[Re]);return Ut.splice(re,1),$}}}(this._delegatedListeners),this)},C.prototype.queryRenderedFeatures=function(M,U){if(!this.style)return[];var H;if(U!==void 0||M===void 0||M instanceof k.Point||Array.isArray(M)||(U=M,M=void 0),U=U||{},(M=M||[[0,0],[this.transform.width,this.transform.height]])instanceof k.Point||typeof M[0]=="number")H=[k.Point.convert(M)];else{var $=k.Point.convert(M[0]),ht=k.Point.convert(M[1]);H=[$,new k.Point(ht.x,$.y),ht,new k.Point($.x,ht.y),$]}return this.style.queryRenderedFeatures(H,U,this.transform)},C.prototype.querySourceFeatures=function(M,U){return this.style.querySourceFeatures(M,U)},C.prototype.setStyle=function(M,U){return(U=k.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},U)).diff!==!1&&U.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&M?(this._diffStyle(M,U),this):(this._localIdeographFontFamily=U.localIdeographFontFamily,this._updateStyle(M,U))},C.prototype._getUIString=function(M){var U=this._locale[M];if(U==null)throw new Error("Missing UI string '"+M+"'");return U},C.prototype._updateStyle=function(M,U){return this.style&&(this.style.setEventedParent(null),this.style._remove()),M?(this.style=new Uu(this,U||{}),this.style.setEventedParent(this,{style:this.style}),typeof M=="string"?this.style.loadURL(M):this.style.loadJSON(M),this):(delete this.style,this)},C.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new Uu(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},C.prototype._diffStyle=function(M,U){var H=this;if(typeof M=="string"){var $=this._requestManager.normalizeStyleURL(M),ht=this._requestManager.transformRequest($,k.ResourceType.Style);k.getJSON(ht,function(Ut,re){Ut?H.fire(new k.ErrorEvent(Ut)):re&&H._updateDiff(re,U)})}else typeof M=="object"&&this._updateDiff(M,U)},C.prototype._updateDiff=function(M,U){try{this.style.setState(M)&&this._update(!0)}catch(H){k.warnOnce("Unable to perform style diff: "+(H.message||H.error||H)+". Rebuilding the style from scratch."),this._updateStyle(M,U)}},C.prototype.getStyle=function(){if(this.style)return this.style.serialize()},C.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():k.warnOnce("There is no style added to the map.")},C.prototype.addSource=function(M,U){return this._lazyInitEmptyStyle(),this.style.addSource(M,U),this._update(!0)},C.prototype.isSourceLoaded=function(M){var U=this.style&&this.style.sourceCaches[M];if(U!==void 0)return U.loaded();this.fire(new k.ErrorEvent(new Error("There is no source with ID '"+M+"'")))},C.prototype.areTilesLoaded=function(){var M=this.style&&this.style.sourceCaches;for(var U in M){var H=M[U]._tiles;for(var $ in H){var ht=H[$];if(ht.state!=="loaded"&&ht.state!=="errored")return!1}}return!0},C.prototype.addSourceType=function(M,U,H){return this._lazyInitEmptyStyle(),this.style.addSourceType(M,U,H)},C.prototype.removeSource=function(M){return this.style.removeSource(M),this._update(!0)},C.prototype.getSource=function(M){return this.style.getSource(M)},C.prototype.addImage=function(M,U,H){H===void 0&&(H={});var $=H.pixelRatio;$===void 0&&($=1);var ht=H.sdf;ht===void 0&&(ht=!1);var Ut=H.stretchX,re=H.stretchY,Fe=H.content;if(this._lazyInitEmptyStyle(),U instanceof gd||Yo&&U instanceof Yo){var Re=k.browser.getImageData(U);this.style.addImage(M,{data:new k.RGBAImage({width:Re.width,height:Re.height},Re.data),pixelRatio:$,stretchX:Ut,stretchY:re,content:Fe,sdf:ht,version:0})}else{if(U.width===void 0||U.height===void 0)return this.fire(new k.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var De=U;this.style.addImage(M,{data:new k.RGBAImage({width:U.width,height:U.height},new Uint8Array(U.data)),pixelRatio:$,stretchX:Ut,stretchY:re,content:Fe,sdf:ht,version:0,userImage:De}),De.onAdd&&De.onAdd(this,M)}},C.prototype.updateImage=function(M,U){var H=this.style.getImage(M);if(!H)return this.fire(new k.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var $=U instanceof gd||Yo&&U instanceof Yo?k.browser.getImageData(U):U,ht=$.width,Ut=$.height,re=$.data;return ht===void 0||Ut===void 0?this.fire(new k.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`"))):ht!==H.data.width||Ut!==H.data.height?this.fire(new k.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image"))):(H.data.replace(re,!(U instanceof gd||Yo&&U instanceof Yo)),void this.style.updateImage(M,H))},C.prototype.hasImage=function(M){return M?!!this.style.getImage(M):(this.fire(new k.ErrorEvent(new Error("Missing required image id"))),!1)},C.prototype.removeImage=function(M){this.style.removeImage(M)},C.prototype.loadImage=function(M,U){k.getImage(this._requestManager.transformRequest(M,k.ResourceType.Image),U)},C.prototype.listImages=function(){return this.style.listImages()},C.prototype.addLayer=function(M,U){return this._lazyInitEmptyStyle(),this.style.addLayer(M,U),this._update(!0)},C.prototype.moveLayer=function(M,U){return this.style.moveLayer(M,U),this._update(!0)},C.prototype.removeLayer=function(M){return this.style.removeLayer(M),this._update(!0)},C.prototype.getLayer=function(M){return this.style.getLayer(M)},C.prototype.setLayerZoomRange=function(M,U,H){return this.style.setLayerZoomRange(M,U,H),this._update(!0)},C.prototype.setFilter=function(M,U,H){return H===void 0&&(H={}),this.style.setFilter(M,U,H),this._update(!0)},C.prototype.getFilter=function(M){return this.style.getFilter(M)},C.prototype.setPaintProperty=function(M,U,H,$){return $===void 0&&($={}),this.style.setPaintProperty(M,U,H,$),this._update(!0)},C.prototype.getPaintProperty=function(M,U){return this.style.getPaintProperty(M,U)},C.prototype.setLayoutProperty=function(M,U,H,$){return $===void 0&&($={}),this.style.setLayoutProperty(M,U,H,$),this._update(!0)},C.prototype.getLayoutProperty=function(M,U){return this.style.getLayoutProperty(M,U)},C.prototype.setLight=function(M,U){return U===void 0&&(U={}),this._lazyInitEmptyStyle(),this.style.setLight(M,U),this._update(!0)},C.prototype.getLight=function(){return this.style.getLight()},C.prototype.setFeatureState=function(M,U){return this.style.setFeatureState(M,U),this._update()},C.prototype.removeFeatureState=function(M,U){return this.style.removeFeatureState(M,U),this._update()},C.prototype.getFeatureState=function(M){return this.style.getFeatureState(M)},C.prototype.getContainer=function(){return this._container},C.prototype.getCanvasContainer=function(){return this._canvasContainer},C.prototype.getCanvas=function(){return this._canvas},C.prototype._containerDimensions=function(){var M=0,U=0;return this._container&&(M=this._container.clientWidth||400,U=this._container.clientHeight||300),[M,U]},C.prototype._detectMissingCSS=function(){k.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&k.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},C.prototype._setupContainer=function(){var M=this._container;M.classList.add("mapboxgl-map"),(this._missingCSSCanary=K.create("div","mapboxgl-canary",M)).style.visibility="hidden",this._detectMissingCSS();var U=this._canvasContainer=K.create("div","mapboxgl-canvas-container",M);this._interactive&&U.classList.add("mapboxgl-interactive"),this._canvas=K.create("canvas","mapboxgl-canvas",U),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");var H=this._containerDimensions();this._resizeCanvas(H[0],H[1]);var $=this._controlContainer=K.create("div","mapboxgl-control-container",M),ht=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(Ut){ht[Ut]=K.create("div","mapboxgl-ctrl-"+Ut,$)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},C.prototype._resizeCanvas=function(M,U){var H=k.browser.devicePixelRatio||1;this._canvas.width=H*M,this._canvas.height=H*U,this._canvas.style.width=M+"px",this._canvas.style.height=U+"px"},C.prototype._setupPainter=function(){var M=k.extend({},Et.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),U=this._canvas.getContext("webgl",M)||this._canvas.getContext("experimental-webgl",M);U?(this.painter=new Po(U,this.transform),k.webpSupported.testSupport(U)):this.fire(new k.ErrorEvent(new Error("Failed to initialize WebGL")))},C.prototype._contextLost=function(M){M.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new k.Event("webglcontextlost",{originalEvent:M}))},C.prototype._contextRestored=function(M){this._setupPainter(),this.resize(),this._update(),this.fire(new k.Event("webglcontextrestored",{originalEvent:M}))},C.prototype._onMapScroll=function(M){if(M.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},C.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},C.prototype._update=function(M){return this.style?(this._styleDirty=this._styleDirty||M,this._sourcesDirty=!0,this.triggerRepaint(),this):this},C.prototype._requestRenderFrame=function(M){return this._update(),this._renderTaskQueue.add(M)},C.prototype._cancelRenderFrame=function(M){this._renderTaskQueue.remove(M)},C.prototype._render=function(M){var U,H=this,$=0,ht=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(U=ht.createQueryEXT(),ht.beginQueryEXT(ht.TIME_ELAPSED_EXT,U),$=k.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(M),!this._removed){var Ut=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var re=this.transform.zoom,Fe=k.browser.now();this.style.zoomHistory.update(re,Fe);var Re=new k.EvaluationParameters(re,{now:Fe,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),De=Re.crossFadingFactor();De===1&&De===this._crossFadingFactor||(Ut=!0,this._crossFadingFactor=De),this.style.update(Re)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new k.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new k.Event("load"))),this.style&&(this.style.hasTransitions()||Ut)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var cr=k.browser.now()-$;ht.endQueryEXT(ht.TIME_ELAPSED_EXT,U),setTimeout(function(){var nr=ht.getQueryObjectEXT(U,ht.QUERY_RESULT_EXT)/1e6;ht.deleteQueryEXT(U),H.fire(new k.Event("gpu-timing-frame",{cpuTime:cr,gpuTime:nr}))},50)}if(this.listens("gpu-timing-layer")){var ur=this.painter.collectGpuTimers();setTimeout(function(){var nr=H.painter.queryGpuTimers(ur);H.fire(new k.Event("gpu-timing-layer",{layerTimes:nr}))},50)}var Er=this._sourcesDirty||this._styleDirty||this._placementDirty;return Er||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new k.Event("idle")),!this._loaded||this._fullyLoaded||Er||(this._fullyLoaded=!0),this}},C.prototype.remove=function(){this._hash&&this._hash.remove();for(var M=0,U=this._controls;M<U.length;M+=1)U[M].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),k.window!==void 0&&(k.window.removeEventListener("resize",this._onWindowResize,!1),k.window.removeEventListener("orientationchange",this._onWindowResize,!1),k.window.removeEventListener("online",this._onWindowOnline,!1));var H=this.painter.context.gl.getExtension("WEBGL_lose_context");H&&H.loseContext(),jh(this._canvasContainer),jh(this._controlContainer),jh(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new k.Event("remove"))},C.prototype.triggerRepaint=function(){var M=this;this.style&&!this._frame&&(this._frame=k.browser.frame(function(U){M._frame=null,M._render(U)}))},C.prototype._onWindowOnline=function(){this._update()},C.prototype._onWindowResize=function(M){this._trackResize&&this.resize({originalEvent:M})._update()},E.showTileBoundaries.get=function(){return!!this._showTileBoundaries},E.showTileBoundaries.set=function(M){this._showTileBoundaries!==M&&(this._showTileBoundaries=M,this._update())},E.showPadding.get=function(){return!!this._showPadding},E.showPadding.set=function(M){this._showPadding!==M&&(this._showPadding=M,this._update())},E.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},E.showCollisionBoxes.set=function(M){this._showCollisionBoxes!==M&&(this._showCollisionBoxes=M,M?this.style._generateCollisionBoxes():this._update())},E.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},E.showOverdrawInspector.set=function(M){this._showOverdrawInspector!==M&&(this._showOverdrawInspector=M,this._update())},E.repaint.get=function(){return!!this._repaint},E.repaint.set=function(M){this._repaint!==M&&(this._repaint=M,this.triggerRepaint())},E.vertices.get=function(){return!!this._vertices},E.vertices.set=function(M){this._vertices=M,this._update()},C.prototype._setCacheLimits=function(M,U){k.setCacheLimits(M,U)},E.version.get=function(){return k.version},Object.defineProperties(C.prototype,E),C}(_h);function jh(x){x.parentNode&&x.parentNode.removeChild(x)}var hl={showCompass:!0,showZoom:!0,visualizePitch:!1},Xl=function(x){var C=this;this.options=k.extend({},hl,x),this._container=K.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(E){return E.preventDefault()}),this.options.showZoom&&(k.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(E){return C._map.zoomIn({},{originalEvent:E})}),K.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(E){return C._map.zoomOut({},{originalEvent:E})}),K.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(k.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(E){C.options.visualizePitch?C._map.resetNorthPitch({},{originalEvent:E}):C._map.resetNorth({},{originalEvent:E})}),this._compassIcon=K.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};Xl.prototype._updateZoomButtons=function(){var x=this._map.getZoom(),C=x===this._map.getMaxZoom(),E=x===this._map.getMinZoom();this._zoomInButton.disabled=C,this._zoomOutButton.disabled=E,this._zoomInButton.setAttribute("aria-disabled",C.toString()),this._zoomOutButton.setAttribute("aria-disabled",E.toString())},Xl.prototype._rotateCompassArrow=function(){var x=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=x},Xl.prototype.onAdd=function(x){return this._map=x,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new fa(this._map,this._compass,this.options.visualizePitch)),this._container},Xl.prototype.onRemove=function(){K.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},Xl.prototype._createButton=function(x,C){var E=K.create("button",x,this._container);return E.type="button",E.addEventListener("click",C),E},Xl.prototype._setButtonTitle=function(x,C){var E=this._map._getUIString("NavigationControl."+C);x.title=E,x.setAttribute("aria-label",E)};var fa=function(x,C,E){E===void 0&&(E=!1),this._clickTolerance=10,this.element=C,this.mouseRotate=new mh({clickTolerance:x.dragRotate._mouseRotate._clickTolerance}),this.map=x,E&&(this.mousePitch=new yc({clickTolerance:x.dragRotate._mousePitch._clickTolerance})),k.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),K.addEventListener(C,"mousedown",this.mousedown),K.addEventListener(C,"touchstart",this.touchstart,{passive:!1}),K.addEventListener(C,"touchmove",this.touchmove),K.addEventListener(C,"touchend",this.touchend),K.addEventListener(C,"touchcancel",this.reset)};function kf(x,C,E){if(x=new k.LngLat(x.lng,x.lat),C){var M=new k.LngLat(x.lng-360,x.lat),U=new k.LngLat(x.lng+360,x.lat),H=E.locationPoint(x).distSqr(C);E.locationPoint(M).distSqr(C)<H?x=M:E.locationPoint(U).distSqr(C)<H&&(x=U)}for(;Math.abs(x.lng-E.center.lng)>180;){var $=E.locationPoint(x);if($.x>=0&&$.y>=0&&$.x<=E.width&&$.y<=E.height)break;x.lng>E.center.lng?x.lng-=360:x.lng+=360}return x}fa.prototype.down=function(x,C){this.mouseRotate.mousedown(x,C),this.mousePitch&&this.mousePitch.mousedown(x,C),K.disableDrag()},fa.prototype.move=function(x,C){var E=this.map,M=this.mouseRotate.mousemoveWindow(x,C);if(M&&M.bearingDelta&&E.setBearing(E.getBearing()+M.bearingDelta),this.mousePitch){var U=this.mousePitch.mousemoveWindow(x,C);U&&U.pitchDelta&&E.setPitch(E.getPitch()+U.pitchDelta)}},fa.prototype.off=function(){var x=this.element;K.removeEventListener(x,"mousedown",this.mousedown),K.removeEventListener(x,"touchstart",this.touchstart,{passive:!1}),K.removeEventListener(x,"touchmove",this.touchmove),K.removeEventListener(x,"touchend",this.touchend),K.removeEventListener(x,"touchcancel",this.reset),this.offTemp()},fa.prototype.offTemp=function(){K.enableDrag(),K.removeEventListener(k.window,"mousemove",this.mousemove),K.removeEventListener(k.window,"mouseup",this.mouseup)},fa.prototype.mousedown=function(x){this.down(k.extend({},x,{ctrlKey:!0,preventDefault:function(){return x.preventDefault()}}),K.mousePos(this.element,x)),K.addEventListener(k.window,"mousemove",this.mousemove),K.addEventListener(k.window,"mouseup",this.mouseup)},fa.prototype.mousemove=function(x){this.move(x,K.mousePos(this.element,x))},fa.prototype.mouseup=function(x){this.mouseRotate.mouseupWindow(x),this.mousePitch&&this.mousePitch.mouseupWindow(x),this.offTemp()},fa.prototype.touchstart=function(x){x.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=K.touchPos(this.element,x.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return x.preventDefault()}},this._startPos))},fa.prototype.touchmove=function(x){x.targetTouches.length!==1?this.reset():(this._lastPos=K.touchPos(this.element,x.targetTouches)[0],this.move({preventDefault:function(){return x.preventDefault()}},this._lastPos))},fa.prototype.touchend=function(x){x.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},fa.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var xc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Pp(x,C,E){var M=x.classList;for(var U in xc)M.remove("mapboxgl-"+E+"-anchor-"+U);M.add("mapboxgl-"+E+"-anchor-"+C)}var Xf,Wh=function(x){function C(E,M){if(x.call(this),(E instanceof k.window.HTMLElement||M)&&(E=k.extend({element:E},M)),k.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=E&&E.anchor||"center",this._color=E&&E.color||"#3FB1CE",this._scale=E&&E.scale||1,this._draggable=E&&E.draggable||!1,this._clickTolerance=E&&E.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=E&&E.rotation||0,this._rotationAlignment=E&&E.rotationAlignment||"auto",this._pitchAlignment=E&&E.pitchAlignment&&E.pitchAlignment!=="auto"?E.pitchAlignment:this._rotationAlignment,E&&E.element)this._element=E.element,this._offset=k.Point.convert(E&&E.offset||[0,0]);else{this._defaultMarker=!0,this._element=K.create("div"),this._element.setAttribute("aria-label","Map marker");var U=K.createNS("http://www.w3.org/2000/svg","svg");U.setAttributeNS(null,"display","block"),U.setAttributeNS(null,"height","41px"),U.setAttributeNS(null,"width","27px"),U.setAttributeNS(null,"viewBox","0 0 27 41");var H=K.createNS("http://www.w3.org/2000/svg","g");H.setAttributeNS(null,"stroke","none"),H.setAttributeNS(null,"stroke-width","1"),H.setAttributeNS(null,"fill","none"),H.setAttributeNS(null,"fill-rule","evenodd");var $=K.createNS("http://www.w3.org/2000/svg","g");$.setAttributeNS(null,"fill-rule","nonzero");var ht=K.createNS("http://www.w3.org/2000/svg","g");ht.setAttributeNS(null,"transform","translate(3.0, 29.0)"),ht.setAttributeNS(null,"fill","#000000");for(var Ut=0,re=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];Ut<re.length;Ut+=1){var Fe=re[Ut],Re=K.createNS("http://www.w3.org/2000/svg","ellipse");Re.setAttributeNS(null,"opacity","0.04"),Re.setAttributeNS(null,"cx","10.5"),Re.setAttributeNS(null,"cy","5.80029008"),Re.setAttributeNS(null,"rx",Fe.rx),Re.setAttributeNS(null,"ry",Fe.ry),ht.appendChild(Re)}var De=K.createNS("http://www.w3.org/2000/svg","g");De.setAttributeNS(null,"fill",this._color);var cr=K.createNS("http://www.w3.org/2000/svg","path");cr.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),De.appendChild(cr);var ur=K.createNS("http://www.w3.org/2000/svg","g");ur.setAttributeNS(null,"opacity","0.25"),ur.setAttributeNS(null,"fill","#000000");var Er=K.createNS("http://www.w3.org/2000/svg","path");Er.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),ur.appendChild(Er);var nr=K.createNS("http://www.w3.org/2000/svg","g");nr.setAttributeNS(null,"transform","translate(6.0, 7.0)"),nr.setAttributeNS(null,"fill","#FFFFFF");var wr=K.createNS("http://www.w3.org/2000/svg","g");wr.setAttributeNS(null,"transform","translate(8.0, 8.0)");var Ir=K.createNS("http://www.w3.org/2000/svg","circle");Ir.setAttributeNS(null,"fill","#000000"),Ir.setAttributeNS(null,"opacity","0.25"),Ir.setAttributeNS(null,"cx","5.5"),Ir.setAttributeNS(null,"cy","5.5"),Ir.setAttributeNS(null,"r","5.4999962");var $r=K.createNS("http://www.w3.org/2000/svg","circle");$r.setAttributeNS(null,"fill","#FFFFFF"),$r.setAttributeNS(null,"cx","5.5"),$r.setAttributeNS(null,"cy","5.5"),$r.setAttributeNS(null,"r","5.4999962"),wr.appendChild(Ir),wr.appendChild($r),$.appendChild(ht),$.appendChild(De),$.appendChild(ur),$.appendChild(nr),$.appendChild(wr),U.appendChild($),U.setAttributeNS(null,"height",41*this._scale+"px"),U.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(U),this._offset=k.Point.convert(E&&E.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(gn){gn.preventDefault()}),this._element.addEventListener("mousedown",function(gn){gn.preventDefault()}),Pp(this._element,this._anchor,"marker"),this._popup=null}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.addTo=function(E){return this.remove(),this._map=E,E.getCanvasContainer().appendChild(this._element),E.on("move",this._update),E.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},C.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),K.remove(this._element),this._popup&&this._popup.remove(),this},C.prototype.getLngLat=function(){return this._lngLat},C.prototype.setLngLat=function(E){return this._lngLat=k.LngLat.convert(E),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},C.prototype.getElement=function(){return this._element},C.prototype.setPopup=function(E){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),E){if(!("offset"in E.options)){var M=Math.sqrt(Math.pow(13.5,2)/2);E.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[M,-1*(24.6+M)],"bottom-right":[-M,-1*(24.6+M)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=E,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},C.prototype._onKeyPress=function(E){var M=E.code,U=E.charCode||E.keyCode;M!=="Space"&&M!=="Enter"&&U!==32&&U!==13||this.togglePopup()},C.prototype._onMapClick=function(E){var M=E.originalEvent.target,U=this._element;this._popup&&(M===U||U.contains(M))&&this.togglePopup()},C.prototype.getPopup=function(){return this._popup},C.prototype.togglePopup=function(){var E=this._popup;return E?(E.isOpen()?E.remove():E.addTo(this._map),this):this},C.prototype._update=function(E){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=kf(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var M="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?M="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(M="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var U="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?U="rotateX(0deg)":this._pitchAlignment==="map"&&(U="rotateX("+this._map.getPitch()+"deg)"),E&&E.type!=="moveend"||(this._pos=this._pos.round()),K.setTransform(this._element,xc[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+U+" "+M)}},C.prototype.getOffset=function(){return this._offset},C.prototype.setOffset=function(E){return this._offset=k.Point.convert(E),this._update(),this},C.prototype._onMove=function(E){if(!this._isDragging){var M=this._clickTolerance||this._map._clickTolerance;this._isDragging=E.point.dist(this._pointerdownPos)>=M}this._isDragging&&(this._pos=E.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new k.Event("dragstart"))),this.fire(new k.Event("drag")))},C.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new k.Event("dragend")),this._state="inactive"},C.prototype._addDragHandler=function(E){this._element.contains(E.originalEvent.target)&&(E.preventDefault(),this._positionDelta=E.point.sub(this._pos).add(this._offset),this._pointerdownPos=E.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},C.prototype.setDraggable=function(E){return this._draggable=!!E,this._map&&(E?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},C.prototype.isDraggable=function(){return this._draggable},C.prototype.setRotation=function(E){return this._rotation=E||0,this._update(),this},C.prototype.getRotation=function(){return this._rotation},C.prototype.setRotationAlignment=function(E){return this._rotationAlignment=E||"auto",this._update(),this},C.prototype.getRotationAlignment=function(){return this._rotationAlignment},C.prototype.setPitchAlignment=function(E){return this._pitchAlignment=E&&E!=="auto"?E:this._rotationAlignment,this._update(),this},C.prototype.getPitchAlignment=function(){return this._pitchAlignment},C}(k.Evented),md={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Xh=0,rf=!1,yd=function(x){function C(E){x.call(this),this.options=k.extend({},md,E),k.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.onAdd=function(E){var M;return this._map=E,this._container=K.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),M=this._setupUI,Xf!==void 0?M(Xf):k.window.navigator.permissions!==void 0?k.window.navigator.permissions.query({name:"geolocation"}).then(function(U){M(Xf=U.state!=="denied")}):M(Xf=!!k.window.navigator.geolocation),this._container},C.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(k.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),K.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Xh=0,rf=!1},C.prototype._isOutOfMapMaxBounds=function(E){var M=this._map.getMaxBounds(),U=E.coords;return M&&(U.longitude<M.getWest()||U.longitude>M.getEast()||U.latitude<M.getSouth()||U.latitude>M.getNorth())},C.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},C.prototype._onSuccess=function(E){if(this._map){if(this._isOutOfMapMaxBounds(E))return this._setErrorState(),this.fire(new k.Event("outofmaxbounds",E)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=E,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(E),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(E),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new k.Event("geolocate",E)),this._finish()}},C.prototype._updateCamera=function(E){var M=new k.LngLat(E.coords.longitude,E.coords.latitude),U=E.coords.accuracy,H=this._map.getBearing(),$=k.extend({bearing:H},this.options.fitBoundsOptions);this._map.fitBounds(M.toBounds(U),$,{geolocateSource:!0})},C.prototype._updateMarker=function(E){if(E){var M=new k.LngLat(E.coords.longitude,E.coords.latitude);this._accuracyCircleMarker.setLngLat(M).addTo(this._map),this._userLocationDotMarker.setLngLat(M).addTo(this._map),this._accuracy=E.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},C.prototype._updateCircleRadius=function(){var E=this._map._container.clientHeight/2,M=this._map.unproject([0,E]),U=this._map.unproject([1,E]),H=M.distanceTo(U),$=Math.ceil(2*this._accuracy/H);this._circleElement.style.width=$+"px",this._circleElement.style.height=$+"px"},C.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},C.prototype._onError=function(E){if(this._map){if(this.options.trackUserLocation)if(E.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var M=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=M,this._geolocateButton.setAttribute("aria-label",M),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(E.code===3&&rf)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new k.Event("error",E)),this._finish()}},C.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},C.prototype._setupUI=function(E){var M=this;if(this._container.addEventListener("contextmenu",function($){return $.preventDefault()}),this._geolocateButton=K.create("button","mapboxgl-ctrl-geolocate",this._container),K.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",E===!1){k.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var U=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=U,this._geolocateButton.setAttribute("aria-label",U)}else{var H=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=H,this._geolocateButton.setAttribute("aria-label",H)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=K.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Wh(this._dotElement),this._circleElement=K.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Wh({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function($){$.geolocateSource||M._watchState!=="ACTIVE_LOCK"||$.originalEvent&&$.originalEvent.type==="resize"||(M._watchState="BACKGROUND",M._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),M._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),M.fire(new k.Event("trackuserlocationend")))})},C.prototype.trigger=function(){if(!this._setup)return k.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new k.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Xh--,rf=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new k.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new k.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var E;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Xh>1?(E={maximumAge:6e5,timeout:0},rf=!0):(E=this.options.positionOptions,rf=!1),this._geolocationWatchID=k.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,E)}}else k.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},C.prototype._clearWatch=function(){k.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},C}(k.Evented),bc={maxWidth:100,unit:"metric"},Lf=function(x){this.options=k.extend({},bc,x),k.bindAll(["_onMove","setUnit"],this)};function Op(x,C,E){var M=E&&E.maxWidth||100,U=x._container.clientHeight/2,H=x.unproject([0,U]),$=x.unproject([M,U]),ht=H.distanceTo($);if(E&&E.unit==="imperial"){var Ut=3.2808*ht;Ut>5280?nf(C,M,Ut/5280,x._getUIString("ScaleControl.Miles")):nf(C,M,Ut,x._getUIString("ScaleControl.Feet"))}else E&&E.unit==="nautical"?nf(C,M,ht/1852,x._getUIString("ScaleControl.NauticalMiles")):ht>=1e3?nf(C,M,ht/1e3,x._getUIString("ScaleControl.Kilometers")):nf(C,M,ht,x._getUIString("ScaleControl.Meters"))}function nf(x,C,E,M){var U,H,$,ht=(U=E,(H=Math.pow(10,(""+Math.floor(U)).length-1))*($=($=U/H)>=10?10:$>=5?5:$>=3?3:$>=2?2:$>=1?1:function(Ut){var re=Math.pow(10,Math.ceil(-Math.log(Ut)/Math.LN10));return Math.round(Ut*re)/re}($)));x.style.width=C*(ht/E)+"px",x.innerHTML=ht+" "+M}Lf.prototype.getDefaultPosition=function(){return"bottom-left"},Lf.prototype._onMove=function(){Op(this._map,this._container,this.options)},Lf.prototype.onAdd=function(x){return this._map=x,this._container=K.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",x.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Lf.prototype.onRemove=function(){K.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Lf.prototype.setUnit=function(x){this.options.unit=x,Op(this._map,this._container,this.options)};var ac=function(x){this._fullscreen=!1,x&&x.container&&(x.container instanceof k.window.HTMLElement?this._container=x.container:k.warnOnce("Full screen control 'container' must be a DOM element.")),k.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in k.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in k.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in k.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in k.window.document&&(this._fullscreenchange="MSFullscreenChange")};ac.prototype.onAdd=function(x){return this._map=x,this._container||(this._container=this._map.getContainer()),this._controlContainer=K.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",k.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},ac.prototype.onRemove=function(){K.remove(this._controlContainer),this._map=null,k.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},ac.prototype._checkFullscreenSupport=function(){return!!(k.window.document.fullscreenEnabled||k.window.document.mozFullScreenEnabled||k.window.document.msFullscreenEnabled||k.window.document.webkitFullscreenEnabled)},ac.prototype._setupUI=function(){var x=this._fullscreenButton=K.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);K.create("span","mapboxgl-ctrl-icon",x).setAttribute("aria-hidden",!0),x.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),k.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},ac.prototype._updateTitle=function(){var x=this._getTitle();this._fullscreenButton.setAttribute("aria-label",x),this._fullscreenButton.title=x},ac.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},ac.prototype._isFullscreen=function(){return this._fullscreen},ac.prototype._changeIcon=function(){(k.window.document.fullscreenElement||k.window.document.mozFullScreenElement||k.window.document.webkitFullscreenElement||k.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},ac.prototype._onClickFullscreen=function(){this._isFullscreen()?k.window.document.exitFullscreen?k.window.document.exitFullscreen():k.window.document.mozCancelFullScreen?k.window.document.mozCancelFullScreen():k.window.document.msExitFullscreen?k.window.document.msExitFullscreen():k.window.document.webkitCancelFullScreen&&k.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Yh={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Yf=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),cv=function(x){function C(E){x.call(this),this.options=k.extend(Object.create(Yh),E),k.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return x&&(C.__proto__=x),(C.prototype=Object.create(x&&x.prototype)).constructor=C,C.prototype.addTo=function(E){return this._map&&this.remove(),this._map=E,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new k.Event("open")),this},C.prototype.isOpen=function(){return!!this._map},C.prototype.remove=function(){return this._content&&K.remove(this._content),this._container&&(K.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new k.Event("close")),this},C.prototype.getLngLat=function(){return this._lngLat},C.prototype.setLngLat=function(E){return this._lngLat=k.LngLat.convert(E),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},C.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},C.prototype.getElement=function(){return this._container},C.prototype.setText=function(E){return this.setDOMContent(k.window.document.createTextNode(E))},C.prototype.setHTML=function(E){var M,U=k.window.document.createDocumentFragment(),H=k.window.document.createElement("body");for(H.innerHTML=E;M=H.firstChild;)U.appendChild(M);return this.setDOMContent(U)},C.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},C.prototype.setMaxWidth=function(E){return this.options.maxWidth=E,this._update(),this},C.prototype.setDOMContent=function(E){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=K.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(E),this._createCloseButton(),this._update(),this._focusFirstElement(),this},C.prototype.addClassName=function(E){this._container&&this._container.classList.add(E)},C.prototype.removeClassName=function(E){this._container&&this._container.classList.remove(E)},C.prototype.setOffset=function(E){return this.options.offset=E,this._update(),this},C.prototype.toggleClassName=function(E){if(this._container)return this._container.classList.toggle(E)},C.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=K.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},C.prototype._onMouseUp=function(E){this._update(E.point)},C.prototype._onMouseMove=function(E){this._update(E.point)},C.prototype._onDrag=function(E){this._update(E.point)},C.prototype._update=function(E){var M=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=K.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=K.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Re){return M._container.classList.add(Re)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=kf(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||E)){var U=this._pos=this._trackPointer&&E?E:this._map.project(this._lngLat),H=this.options.anchor,$=function Re(De){if(De){if(typeof De=="number"){var cr=Math.round(Math.sqrt(.5*Math.pow(De,2)));return{center:new k.Point(0,0),top:new k.Point(0,De),"top-left":new k.Point(cr,cr),"top-right":new k.Point(-cr,cr),bottom:new k.Point(0,-De),"bottom-left":new k.Point(cr,-cr),"bottom-right":new k.Point(-cr,-cr),left:new k.Point(De,0),right:new k.Point(-De,0)}}if(De instanceof k.Point||Array.isArray(De)){var ur=k.Point.convert(De);return{center:ur,top:ur,"top-left":ur,"top-right":ur,bottom:ur,"bottom-left":ur,"bottom-right":ur,left:ur,right:ur}}return{center:k.Point.convert(De.center||[0,0]),top:k.Point.convert(De.top||[0,0]),"top-left":k.Point.convert(De["top-left"]||[0,0]),"top-right":k.Point.convert(De["top-right"]||[0,0]),bottom:k.Point.convert(De.bottom||[0,0]),"bottom-left":k.Point.convert(De["bottom-left"]||[0,0]),"bottom-right":k.Point.convert(De["bottom-right"]||[0,0]),left:k.Point.convert(De.left||[0,0]),right:k.Point.convert(De.right||[0,0])}}return Re(new k.Point(0,0))}(this.options.offset);if(!H){var ht,Ut=this._container.offsetWidth,re=this._container.offsetHeight;ht=U.y+$.bottom.y<re?["top"]:U.y>this._map.transform.height-re?["bottom"]:[],U.x<Ut/2?ht.push("left"):U.x>this._map.transform.width-Ut/2&&ht.push("right"),H=ht.length===0?"bottom":ht.join("-")}var Fe=U.add($[H]).round();K.setTransform(this._container,xc[H]+" translate("+Fe.x+"px,"+Fe.y+"px)"),Pp(this._container,H,"popup")}},C.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var E=this._container.querySelector(Yf);E&&E.focus()}},C.prototype._onClose=function(){this.remove()},C}(k.Evented),xh={version:k.version,supported:Et,setRTLTextPlugin:k.setRTLTextPlugin,getRTLTextPluginStatus:k.getRTLTextPluginStatus,Map:lv,NavigationControl:Xl,GeolocateControl:yd,AttributionControl:fl,ScaleControl:Lf,FullscreenControl:ac,Popup:cv,Marker:Wh,Style:Uu,LngLat:k.LngLat,LngLatBounds:k.LngLatBounds,Point:k.Point,MercatorCoordinate:k.MercatorCoordinate,Evented:k.Evented,config:k.config,prewarm:function(){tn().acquire(Yr)},clearPrewarmedResources:function(){var x=bi;x&&(x.isPreloaded()&&x.numActive()===1?(x.release(Yr),bi=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return k.config.ACCESS_TOKEN},set accessToken(x){k.config.ACCESS_TOKEN=x},get baseApiUrl(){return k.config.API_URL},set baseApiUrl(x){k.config.API_URL=x},get workerCount(){return On.workerCount},set workerCount(x){On.workerCount=x},get maxParallelImageRequests(){return k.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(x){k.config.MAX_PARALLEL_IMAGE_REQUESTS=x},clearStorage:function(x){k.clearTileCache(x)},workerUrl:""};return xh}),kt})},43548:function(pn,Ot,nt){"use strict";pn.exports=gt;var kt=nt(11542);function gt(Lt){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(Lt)?Lt:new Uint8Array(Lt||0),this.pos=0,this.type=0,this.length=this.buf.length}gt.Varint=0,gt.Fixed64=1,gt.Bytes=2,gt.Fixed32=5;var k=(1<<16)*(1<<16),Et=1/k,K=12,yt=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");gt.prototype={destroy:function(){this.buf=null},readFields:function(Lt,Jt,ft){for(ft=ft||this.length;this.pos<ft;){var St=this.readVarint(),Y=St>>3,mt=this.pos;this.type=St&7,Lt(Y,Jt,this),this.pos===mt&&this.skip(St)}return Jt},readMessage:function(Lt,Jt){return this.readFields(Lt,Jt,this.readVarint()+this.pos)},readFixed32:function(){var Lt=Ee(this.buf,this.pos);return this.pos+=4,Lt},readSFixed32:function(){var Lt=Ge(this.buf,this.pos);return this.pos+=4,Lt},readFixed64:function(){var Lt=Ee(this.buf,this.pos)+Ee(this.buf,this.pos+4)*k;return this.pos+=8,Lt},readSFixed64:function(){var Lt=Ee(this.buf,this.pos)+Ge(this.buf,this.pos+4)*k;return this.pos+=8,Lt},readFloat:function(){var Lt=kt.read(this.buf,this.pos,!0,23,4);return this.pos+=4,Lt},readDouble:function(){var Lt=kt.read(this.buf,this.pos,!0,52,8);return this.pos+=8,Lt},readVarint:function(Lt){var Jt=this.buf,ft,St;return St=Jt[this.pos++],ft=St&127,St<128||(St=Jt[this.pos++],ft|=(St&127)<<7,St<128)||(St=Jt[this.pos++],ft|=(St&127)<<14,St<128)||(St=Jt[this.pos++],ft|=(St&127)<<21,St<128)?ft:(St=Jt[this.pos],ft|=(St&15)<<28,J(ft,Lt,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var Lt=this.readVarint();return Lt%2===1?(Lt+1)/-2:Lt/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var Lt=this.readVarint()+this.pos,Jt=this.pos;return this.pos=Lt,Lt-Jt>=K&&yt?xe(this.buf,Jt,Lt):Ue(this.buf,Jt,Lt)},readBytes:function(){var Lt=this.readVarint()+this.pos,Jt=this.buf.subarray(this.pos,Lt);return this.pos=Lt,Jt},readPackedVarint:function(Lt,Jt){if(this.type!==gt.Bytes)return Lt.push(this.readVarint(Jt));var ft=pt(this);for(Lt=Lt||[];this.pos<ft;)Lt.push(this.readVarint(Jt));return Lt},readPackedSVarint:function(Lt){if(this.type!==gt.Bytes)return Lt.push(this.readSVarint());var Jt=pt(this);for(Lt=Lt||[];this.pos<Jt;)Lt.push(this.readSVarint());return Lt},readPackedBoolean:function(Lt){if(this.type!==gt.Bytes)return Lt.push(this.readBoolean());var Jt=pt(this);for(Lt=Lt||[];this.pos<Jt;)Lt.push(this.readBoolean());return Lt},readPackedFloat:function(Lt){if(this.type!==gt.Bytes)return Lt.push(this.readFloat());var Jt=pt(this);for(Lt=Lt||[];this.pos<Jt;)Lt.push(this.readFloat());return Lt},readPackedDouble:function(Lt){if(this.type!==gt.Bytes)return Lt.push(this.readDouble());var Jt=pt(this);for(Lt=Lt||[];this.pos<Jt;)Lt.push(this.readDouble());return Lt},readPackedFixed32:function(Lt){if(this.type!==gt.Bytes)return Lt.push(this.readFixed32());var Jt=pt(this);for(Lt=Lt||[];this.pos<Jt;)Lt.push(this.readFixed32());return Lt},readPackedSFixed32:function(Lt){if(this.type!==gt.Bytes)return Lt.push(this.readSFixed32());var Jt=pt(this);for(Lt=Lt||[];this.pos<Jt;)Lt.push(this.readSFixed32());return Lt},readPackedFixed64:function(Lt){if(this.type!==gt.Bytes)return Lt.push(this.readFixed64());var Jt=pt(this);for(Lt=Lt||[];this.pos<Jt;)Lt.push(this.readFixed64());return Lt},readPackedSFixed64:function(Lt){if(this.type!==gt.Bytes)return Lt.push(this.readSFixed64());var Jt=pt(this);for(Lt=Lt||[];this.pos<Jt;)Lt.push(this.readSFixed64());return Lt},skip:function(Lt){var Jt=Lt&7;if(Jt===gt.Varint)for(;this.buf[this.pos++]>127;);else if(Jt===gt.Bytes)this.pos=this.readVarint()+this.pos;else if(Jt===gt.Fixed32)this.pos+=4;else if(Jt===gt.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+Jt)},writeTag:function(Lt,Jt){this.writeVarint(Lt<<3|Jt)},realloc:function(Lt){for(var Jt=this.length||16;Jt<this.pos+Lt;)Jt*=2;if(Jt!==this.length){var ft=new Uint8Array(Jt);ft.set(this.buf),this.buf=ft,this.length=Jt}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(Lt){this.realloc(4),ge(this.buf,Lt,this.pos),this.pos+=4},writeSFixed32:function(Lt){this.realloc(4),ge(this.buf,Lt,this.pos),this.pos+=4},writeFixed64:function(Lt){this.realloc(8),ge(this.buf,Lt&-1,this.pos),ge(this.buf,Math.floor(Lt*Et),this.pos+4),this.pos+=8},writeSFixed64:function(Lt){this.realloc(8),ge(this.buf,Lt&-1,this.pos),ge(this.buf,Math.floor(Lt*Et),this.pos+4),this.pos+=8},writeVarint:function(Lt){if(Lt=+Lt||0,Lt>268435455||Lt<0){_e(Lt,this);return}this.realloc(4),this.buf[this.pos++]=Lt&127|(Lt>127?128:0),!(Lt<=127)&&(this.buf[this.pos++]=(Lt>>>=7)&127|(Lt>127?128:0),!(Lt<=127)&&(this.buf[this.pos++]=(Lt>>>=7)&127|(Lt>127?128:0),!(Lt<=127)&&(this.buf[this.pos++]=Lt>>>7&127)))},writeSVarint:function(Lt){this.writeVarint(Lt<0?-Lt*2-1:Lt*2)},writeBoolean:function(Lt){this.writeVarint(Boolean(Lt))},writeString:function(Lt){Lt=String(Lt),this.realloc(Lt.length*4),this.pos++;var Jt=this.pos;this.pos=Ke(this.buf,Lt,this.pos);var ft=this.pos-Jt;ft>=128&&zt(Jt,ft,this),this.pos=Jt-1,this.writeVarint(ft),this.pos+=ft},writeFloat:function(Lt){this.realloc(4),kt.write(this.buf,Lt,this.pos,!0,23,4),this.pos+=4},writeDouble:function(Lt){this.realloc(8),kt.write(this.buf,Lt,this.pos,!0,52,8),this.pos+=8},writeBytes:function(Lt){var Jt=Lt.length;this.writeVarint(Jt),this.realloc(Jt);for(var ft=0;ft<Jt;ft++)this.buf[this.pos++]=Lt[ft]},writeRawMessage:function(Lt,Jt){this.pos++;var ft=this.pos;Lt(Jt,this);var St=this.pos-ft;St>=128&&zt(ft,St,this),this.pos=ft-1,this.writeVarint(St),this.pos+=St},writeMessage:function(Lt,Jt,ft){this.writeTag(Lt,gt.Bytes),this.writeRawMessage(Jt,ft)},writePackedVarint:function(Lt,Jt){Jt.length&&this.writeMessage(Lt,P,Jt)},writePackedSVarint:function(Lt,Jt){Jt.length&&this.writeMessage(Lt,b,Jt)},writePackedBoolean:function(Lt,Jt){Jt.length&&this.writeMessage(Lt,be,Jt)},writePackedFloat:function(Lt,Jt){Jt.length&&this.writeMessage(Lt,W,Jt)},writePackedDouble:function(Lt,Jt){Jt.length&&this.writeMessage(Lt,le,Jt)},writePackedFixed32:function(Lt,Jt){Jt.length&&this.writeMessage(Lt,Me,Jt)},writePackedSFixed32:function(Lt,Jt){Jt.length&&this.writeMessage(Lt,At,Jt)},writePackedFixed64:function(Lt,Jt){Jt.length&&this.writeMessage(Lt,rt,Jt)},writePackedSFixed64:function(Lt,Jt){Jt.length&&this.writeMessage(Lt,Dt,Jt)},writeBytesField:function(Lt,Jt){this.writeTag(Lt,gt.Bytes),this.writeBytes(Jt)},writeFixed32Field:function(Lt,Jt){this.writeTag(Lt,gt.Fixed32),this.writeFixed32(Jt)},writeSFixed32Field:function(Lt,Jt){this.writeTag(Lt,gt.Fixed32),this.writeSFixed32(Jt)},writeFixed64Field:function(Lt,Jt){this.writeTag(Lt,gt.Fixed64),this.writeFixed64(Jt)},writeSFixed64Field:function(Lt,Jt){this.writeTag(Lt,gt.Fixed64),this.writeSFixed64(Jt)},writeVarintField:function(Lt,Jt){this.writeTag(Lt,gt.Varint),this.writeVarint(Jt)},writeSVarintField:function(Lt,Jt){this.writeTag(Lt,gt.Varint),this.writeSVarint(Jt)},writeStringField:function(Lt,Jt){this.writeTag(Lt,gt.Bytes),this.writeString(Jt)},writeFloatField:function(Lt,Jt){this.writeTag(Lt,gt.Fixed32),this.writeFloat(Jt)},writeDoubleField:function(Lt,Jt){this.writeTag(Lt,gt.Fixed64),this.writeDouble(Jt)},writeBooleanField:function(Lt,Jt){this.writeVarintField(Lt,Boolean(Jt))}};function J(Lt,Jt,ft){var St=ft.buf,Y,mt;if(mt=St[ft.pos++],Y=(mt&112)>>4,mt<128||(mt=St[ft.pos++],Y|=(mt&127)<<3,mt<128)||(mt=St[ft.pos++],Y|=(mt&127)<<10,mt<128)||(mt=St[ft.pos++],Y|=(mt&127)<<17,mt<128)||(mt=St[ft.pos++],Y|=(mt&127)<<24,mt<128)||(mt=St[ft.pos++],Y|=(mt&1)<<31,mt<128))return et(Lt,Y,Jt);throw new Error("Expected varint not more than 10 bytes")}function pt(Lt){return Lt.type===gt.Bytes?Lt.readVarint()+Lt.pos:Lt.pos+1}function et(Lt,Jt,ft){return ft?Jt*4294967296+(Lt>>>0):(Jt>>>0)*4294967296+(Lt>>>0)}function _e(Lt,Jt){var ft,St;if(Lt>=0?(ft=Lt%4294967296|0,St=Lt/4294967296|0):(ft=~(-Lt%4294967296),St=~(-Lt/4294967296),ft^4294967295?ft=ft+1|0:(ft=0,St=St+1|0)),Lt>=18446744073709552e3||Lt<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");Jt.realloc(10),ot(ft,St,Jt),ut(St,Jt)}function ot(Lt,Jt,ft){ft.buf[ft.pos++]=Lt&127|128,Lt>>>=7,ft.buf[ft.pos++]=Lt&127|128,Lt>>>=7,ft.buf[ft.pos++]=Lt&127|128,Lt>>>=7,ft.buf[ft.pos++]=Lt&127|128,Lt>>>=7,ft.buf[ft.pos]=Lt&127}function ut(Lt,Jt){var ft=(Lt&7)<<4;Jt.buf[Jt.pos++]|=ft|((Lt>>>=3)?128:0),Lt&&(Jt.buf[Jt.pos++]=Lt&127|((Lt>>>=7)?128:0),Lt&&(Jt.buf[Jt.pos++]=Lt&127|((Lt>>>=7)?128:0),Lt&&(Jt.buf[Jt.pos++]=Lt&127|((Lt>>>=7)?128:0),Lt&&(Jt.buf[Jt.pos++]=Lt&127|((Lt>>>=7)?128:0),Lt&&(Jt.buf[Jt.pos++]=Lt&127)))))}function zt(Lt,Jt,ft){var St=Jt<=16383?1:Jt<=2097151?2:Jt<=268435455?3:Math.floor(Math.log(Jt)/(Math.LN2*7));ft.realloc(St);for(var Y=ft.pos-1;Y>=Lt;Y--)ft.buf[Y+St]=ft.buf[Y]}function P(Lt,Jt){for(var ft=0;ft<Lt.length;ft++)Jt.writeVarint(Lt[ft])}function b(Lt,Jt){for(var ft=0;ft<Lt.length;ft++)Jt.writeSVarint(Lt[ft])}function W(Lt,Jt){for(var ft=0;ft<Lt.length;ft++)Jt.writeFloat(Lt[ft])}function le(Lt,Jt){for(var ft=0;ft<Lt.length;ft++)Jt.writeDouble(Lt[ft])}function be(Lt,Jt){for(var ft=0;ft<Lt.length;ft++)Jt.writeBoolean(Lt[ft])}function Me(Lt,Jt){for(var ft=0;ft<Lt.length;ft++)Jt.writeFixed32(Lt[ft])}function At(Lt,Jt){for(var ft=0;ft<Lt.length;ft++)Jt.writeSFixed32(Lt[ft])}function rt(Lt,Jt){for(var ft=0;ft<Lt.length;ft++)Jt.writeFixed64(Lt[ft])}function Dt(Lt,Jt){for(var ft=0;ft<Lt.length;ft++)Jt.writeSFixed64(Lt[ft])}function Ee(Lt,Jt){return(Lt[Jt]|Lt[Jt+1]<<8|Lt[Jt+2]<<16)+Lt[Jt+3]*16777216}function ge(Lt,Jt,ft){Lt[ft]=Jt,Lt[ft+1]=Jt>>>8,Lt[ft+2]=Jt>>>16,Lt[ft+3]=Jt>>>24}function Ge(Lt,Jt){return(Lt[Jt]|Lt[Jt+1]<<8|Lt[Jt+2]<<16)+(Lt[Jt+3]<<24)}function Ue(Lt,Jt,ft){for(var St="",Y=Jt;Y<ft;){var mt=Lt[Y],se=null,ke=mt>239?4:mt>223?3:mt>191?2:1;if(Y+ke>ft)break;var Le,Be,Bt;ke===1?mt<128&&(se=mt):ke===2?(Le=Lt[Y+1],(Le&192)===128&&(se=(mt&31)<<6|Le&63,se<=127&&(se=null))):ke===3?(Le=Lt[Y+1],Be=Lt[Y+2],(Le&192)===128&&(Be&192)===128&&(se=(mt&15)<<12|(Le&63)<<6|Be&63,(se<=2047||se>=55296&&se<=57343)&&(se=null))):ke===4&&(Le=Lt[Y+1],Be=Lt[Y+2],Bt=Lt[Y+3],(Le&192)===128&&(Be&192)===128&&(Bt&192)===128&&(se=(mt&15)<<18|(Le&63)<<12|(Be&63)<<6|Bt&63,(se<=65535||se>=1114112)&&(se=null))),se===null?(se=65533,ke=1):se>65535&&(se-=65536,St+=String.fromCharCode(se>>>10&1023|55296),se=56320|se&1023),St+=String.fromCharCode(se),Y+=ke}return St}function xe(Lt,Jt,ft){return yt.decode(Lt.subarray(Jt,ft))}function Ke(Lt,Jt,ft){for(var St=0,Y,mt;St<Jt.length;St++){if(Y=Jt.charCodeAt(St),Y>55295&&Y<57344)if(mt)if(Y<56320){Lt[ft++]=239,Lt[ft++]=191,Lt[ft++]=189,mt=Y;continue}else Y=mt-55296<<10|Y-56320|65536,mt=null;else{Y>56319||St+1===Jt.length?(Lt[ft++]=239,Lt[ft++]=191,Lt[ft++]=189):mt=Y;continue}else mt&&(Lt[ft++]=239,Lt[ft++]=191,Lt[ft++]=189,mt=null);Y<128?Lt[ft++]=Y:(Y<2048?Lt[ft++]=Y>>6|192:(Y<65536?Lt[ft++]=Y>>12|224:(Lt[ft++]=Y>>18|240,Lt[ft++]=Y>>12&63|128),Lt[ft++]=Y>>6&63|128),Lt[ft++]=Y&63|128)}return ft}},86319:function(pn){"use strict";var Ot=pn.exports;pn.exports.isNumber=function(nt){return typeof nt=="number"},pn.exports.findMin=function(nt){if(nt.length===0)return 1/0;for(var kt=nt[0],gt=1;gt<nt.length;gt++)kt=Math.min(kt,nt[gt]);return kt},pn.exports.findMax=function(nt){if(nt.length===0)return-1/0;for(var kt=nt[0],gt=1;gt<nt.length;gt++)kt=Math.max(kt,nt[gt]);return kt},pn.exports.findMinMulti=function(nt){for(var kt=Ot.findMin(nt[0]),gt=1;gt<nt.length;gt++)kt=Math.min(kt,Ot.findMin(nt[gt]));return kt},pn.exports.findMaxMulti=function(nt){for(var kt=Ot.findMax(nt[0]),gt=1;gt<nt.length;gt++)kt=Math.max(kt,Ot.findMax(nt[gt]));return kt},pn.exports.inside=function(nt,kt,gt){return nt<=gt&><=kt}},50517:function(pn,Ot,nt){"use strict";var kt=50,gt=2,k=Math.log(2),Et=pn.exports,K=nt(86319);function yt(pt){return 1-Math.abs(pt)}pn.exports.getUnifiedMinMax=function(pt,et){return Et.getUnifiedMinMaxMulti([pt],et)},pn.exports.getUnifiedMinMaxMulti=function(pt,et){et=et||{};var _e=!1,ot=!1,ut=K.isNumber(et.width)?et.width:gt,zt=K.isNumber(et.size)?et.size:kt,P=K.isNumber(et.min)?et.min:(_e=!0,K.findMinMulti(pt)),b=K.isNumber(et.max)?et.max:(ot=!0,K.findMaxMulti(pt)),W=b-P,le=W/(zt-1);return _e&&(P=P-2*ut*le),ot&&(b=b+2*ut*le),{min:P,max:b}},pn.exports.create=function(pt,et){if(et=et||{},!pt||pt.length===0)return[];var _e=K.isNumber(et.size)?et.size:kt,ot=K.isNumber(et.width)?et.width:gt,ut=Et.getUnifiedMinMax(pt,{size:_e,width:ot,min:et.min,max:et.max}),zt=ut.min,P=ut.max,b=P-zt,W=b/(_e-1);if(b===0)return[{x:zt,y:1}];for(var le=[],be=0;be<_e;be++)le.push({x:zt+be*W,y:0});var Me=function(xe){return Math.floor((xe-zt)/W)},At=J(yt,ot),rt=At[ot],Dt=At[ot-1]-At[ot-2],Ee=0;pt.forEach(function(xe){var Ke=Me(xe);if(!(Ke+ot<0||Ke-ot>=le.length)){var Lt=Math.max(Ke-ot,0),Jt=Ke,ft=Math.min(Ke+ot,le.length-1),St=Lt-(Ke-ot),Y=Ke+ot-ft,mt=At[-ot-1+St]||0,se=At[-ot-1+Y]||0,ke=rt/(rt-mt-se);St>0&&(Ee+=ke*(St-1)*Dt);var Le=Math.max(0,Ke-ot+1);K.inside(0,le.length-1,Le)&&(le[Le].y+=ke*1*Dt),K.inside(0,le.length-1,Jt+1)&&(le[Jt+1].y-=ke*2*Dt),K.inside(0,le.length-1,ft+1)&&(le[ft+1].y+=ke*1*Dt)}});var ge=Ee,Ge=0,Ue=0;return le.forEach(function(xe){Ge+=xe.y,ge+=Ge,xe.y=ge,Ue+=ge}),Ue>0&&le.forEach(function(xe){xe.y/=Ue}),le};function J(pt,et){for(var _e={},ot=0,ut=-et;ut<=et;ut++)ot+=pt(ut/et),_e[ut]=ot;return _e}pn.exports.getExpectedValueFromPdf=function(pt){if(!(!pt||pt.length===0)){var et=0;return pt.forEach(function(_e){et+=_e.x*_e.y}),et}},pn.exports.getXWithLeftTailArea=function(pt,et){if(!(!pt||pt.length===0)){for(var _e=0,ot=0,ut=0;ut<pt.length&&(ot=ut,_e+=pt[ut].y,!(_e>=et));ut++);return pt[ot].x}},pn.exports.getPerplexity=function(pt){if(!(!pt||pt.length===0)){var et=0;return pt.forEach(function(_e){var ot=Math.log(_e.y);isFinite(ot)&&(et+=_e.y*ot)}),et=-et/k,Math.pow(2,et)}}},37824:function(pn,Ot,nt){var kt=nt(93738);(function(gt,k){pn.exports=k()})(this,function(){"use strict";function gt(Zt,Ct){if(!(Zt instanceof Ct))throw new TypeError("Cannot call a class as a function")}function k(Zt,Ct){for(var Tt=0;Tt<Ct.length;Tt++){var Nt=Ct[Tt];Nt.enumerable=Nt.enumerable||!1,Nt.configurable=!0,"value"in Nt&&(Nt.writable=!0),Object.defineProperty(Zt,Nt.key,Nt)}}function Et(Zt,Ct,Tt){return Ct&&k(Zt.prototype,Ct),Tt&&k(Zt,Tt),Zt}var K=function(){function Zt(Ct,Tt){this.next=null,this.key=Ct,this.data=Tt,this.left=null,this.right=null}return Zt}();function yt(Zt,Ct){return Zt>Ct?1:Zt<Ct?-1:0}function J(Zt,Ct,Tt){for(var Nt=new K(null,null),tt=Nt,vt=Nt;;){var Ht=Tt(Zt,Ct.key);if(Ht<0){if(Ct.left===null)break;if(Tt(Zt,Ct.left.key)<0){var he=Ct.left;if(Ct.left=he.right,he.right=Ct,Ct=he,Ct.left===null)break}vt.left=Ct,vt=Ct,Ct=Ct.left}else if(Ht>0){if(Ct.right===null)break;if(Tt(Zt,Ct.right.key)>0){var he=Ct.right;if(Ct.right=he.left,he.left=Ct,Ct=he,Ct.right===null)break}tt.right=Ct,tt=Ct,Ct=Ct.right}else break}return tt.right=Ct.left,vt.left=Ct.right,Ct.left=Nt.right,Ct.right=Nt.left,Ct}function pt(Zt,Ct,Tt,Nt){var tt=new K(Zt,Ct);if(Tt===null)return tt.left=tt.right=null,tt;Tt=J(Zt,Tt,Nt);var vt=Nt(Zt,Tt.key);return vt<0?(tt.left=Tt.left,tt.right=Tt,Tt.left=null):vt>=0&&(tt.right=Tt.right,tt.left=Tt,Tt.right=null),tt}function et(Zt,Ct,Tt){var Nt=null,tt=null;if(Ct){Ct=J(Zt,Ct,Tt);var vt=Tt(Ct.key,Zt);vt===0?(Nt=Ct.left,tt=Ct.right):vt<0?(tt=Ct.right,Ct.right=null,Nt=Ct):(Nt=Ct.left,Ct.left=null,tt=Ct)}return{left:Nt,right:tt}}function _e(Zt,Ct,Tt){return Ct===null?Zt:(Zt===null||(Ct=J(Zt.key,Ct,Tt),Ct.left=Zt),Ct)}function ot(Zt,Ct,Tt,Nt,tt){if(Zt){Nt(""+Ct+(Tt?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+tt(Zt)+`
|
|
`);var vt=Ct+(Tt?" ":"\u2502 ");Zt.left&&ot(Zt.left,vt,!1,Nt,tt),Zt.right&&ot(Zt.right,vt,!0,Nt,tt)}}var ut=function(){function Zt(Ct){Ct===void 0&&(Ct=yt),this._root=null,this._size=0,this._comparator=Ct}return Zt.prototype.insert=function(Ct,Tt){return this._size++,this._root=pt(Ct,Tt,this._root,this._comparator)},Zt.prototype.add=function(Ct,Tt){var Nt=new K(Ct,Tt);this._root===null&&(Nt.left=Nt.right=null,this._size++,this._root=Nt);var tt=this._comparator,vt=J(Ct,this._root,tt),Ht=tt(Ct,vt.key);return Ht===0?this._root=vt:(Ht<0?(Nt.left=vt.left,Nt.right=vt,vt.left=null):Ht>0&&(Nt.right=vt.right,Nt.left=vt,vt.right=null),this._size++,this._root=Nt),this._root},Zt.prototype.remove=function(Ct){this._root=this._remove(Ct,this._root,this._comparator)},Zt.prototype._remove=function(Ct,Tt,Nt){var tt;if(Tt===null)return null;Tt=J(Ct,Tt,Nt);var vt=Nt(Ct,Tt.key);return vt===0?(Tt.left===null?tt=Tt.right:(tt=J(Ct,Tt.left,Nt),tt.right=Tt.right),this._size--,tt):Tt},Zt.prototype.pop=function(){var Ct=this._root;if(Ct){for(;Ct.left;)Ct=Ct.left;return this._root=J(Ct.key,this._root,this._comparator),this._root=this._remove(Ct.key,this._root,this._comparator),{key:Ct.key,data:Ct.data}}return null},Zt.prototype.findStatic=function(Ct){for(var Tt=this._root,Nt=this._comparator;Tt;){var tt=Nt(Ct,Tt.key);if(tt===0)return Tt;tt<0?Tt=Tt.left:Tt=Tt.right}return null},Zt.prototype.find=function(Ct){return this._root&&(this._root=J(Ct,this._root,this._comparator),this._comparator(Ct,this._root.key)!==0)?null:this._root},Zt.prototype.contains=function(Ct){for(var Tt=this._root,Nt=this._comparator;Tt;){var tt=Nt(Ct,Tt.key);if(tt===0)return!0;tt<0?Tt=Tt.left:Tt=Tt.right}return!1},Zt.prototype.forEach=function(Ct,Tt){for(var Nt=this._root,tt=[],vt=!1;!vt;)Nt!==null?(tt.push(Nt),Nt=Nt.left):tt.length!==0?(Nt=tt.pop(),Ct.call(Tt,Nt),Nt=Nt.right):vt=!0;return this},Zt.prototype.range=function(Ct,Tt,Nt,tt){for(var vt=[],Ht=this._comparator,he=this._root,jt;vt.length!==0||he;)if(he)vt.push(he),he=he.left;else{if(he=vt.pop(),jt=Ht(he.key,Tt),jt>0)break;if(Ht(he.key,Ct)>=0&&Nt.call(tt,he))return this;he=he.right}return this},Zt.prototype.keys=function(){var Ct=[];return this.forEach(function(Tt){var Nt=Tt.key;return Ct.push(Nt)}),Ct},Zt.prototype.values=function(){var Ct=[];return this.forEach(function(Tt){var Nt=Tt.data;return Ct.push(Nt)}),Ct},Zt.prototype.min=function(){return this._root?this.minNode(this._root).key:null},Zt.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},Zt.prototype.minNode=function(Ct){if(Ct===void 0&&(Ct=this._root),Ct)for(;Ct.left;)Ct=Ct.left;return Ct},Zt.prototype.maxNode=function(Ct){if(Ct===void 0&&(Ct=this._root),Ct)for(;Ct.right;)Ct=Ct.right;return Ct},Zt.prototype.at=function(Ct){for(var Tt=this._root,Nt=!1,tt=0,vt=[];!Nt;)if(Tt)vt.push(Tt),Tt=Tt.left;else if(vt.length>0){if(Tt=vt.pop(),tt===Ct)return Tt;tt++,Tt=Tt.right}else Nt=!0;return null},Zt.prototype.next=function(Ct){var Tt=this._root,Nt=null;if(Ct.right){for(Nt=Ct.right;Nt.left;)Nt=Nt.left;return Nt}for(var tt=this._comparator;Tt;){var vt=tt(Ct.key,Tt.key);if(vt===0)break;vt<0?(Nt=Tt,Tt=Tt.left):Tt=Tt.right}return Nt},Zt.prototype.prev=function(Ct){var Tt=this._root,Nt=null;if(Ct.left!==null){for(Nt=Ct.left;Nt.right;)Nt=Nt.right;return Nt}for(var tt=this._comparator;Tt;){var vt=tt(Ct.key,Tt.key);if(vt===0)break;vt<0?Tt=Tt.left:(Nt=Tt,Tt=Tt.right)}return Nt},Zt.prototype.clear=function(){return this._root=null,this._size=0,this},Zt.prototype.toList=function(){return b(this._root)},Zt.prototype.load=function(Ct,Tt,Nt){Tt===void 0&&(Tt=[]),Nt===void 0&&(Nt=!1);var tt=Ct.length,vt=this._comparator;if(Nt&&be(Ct,Tt,0,tt-1,vt),this._root===null)this._root=zt(Ct,Tt,0,tt),this._size=tt;else{var Ht=le(this.toList(),P(Ct,Tt),vt);tt=this._size+tt,this._root=W({head:Ht},0,tt)}return this},Zt.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(Zt.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(Zt.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),Zt.prototype.toString=function(Ct){Ct===void 0&&(Ct=function(tt){return String(tt.key)});var Tt=[];return ot(this._root,"",!0,function(Nt){return Tt.push(Nt)},Ct),Tt.join("")},Zt.prototype.update=function(Ct,Tt,Nt){var tt=this._comparator,vt=et(Ct,this._root,tt),Ht=vt.left,he=vt.right;tt(Ct,Tt)<0?he=pt(Tt,Nt,he,tt):Ht=pt(Tt,Nt,Ht,tt),this._root=_e(Ht,he,tt)},Zt.prototype.split=function(Ct){return et(Ct,this._root,this._comparator)},Zt}();function zt(Zt,Ct,Tt,Nt){var tt=Nt-Tt;if(tt>0){var vt=Tt+Math.floor(tt/2),Ht=Zt[vt],he=Ct[vt],jt=new K(Ht,he);return jt.left=zt(Zt,Ct,Tt,vt),jt.right=zt(Zt,Ct,vt+1,Nt),jt}return null}function P(Zt,Ct){for(var Tt=new K(null,null),Nt=Tt,tt=0;tt<Zt.length;tt++)Nt=Nt.next=new K(Zt[tt],Ct[tt]);return Nt.next=null,Tt.next}function b(Zt){for(var Ct=Zt,Tt=[],Nt=!1,tt=new K(null,null),vt=tt;!Nt;)Ct?(Tt.push(Ct),Ct=Ct.left):Tt.length>0?(Ct=vt=vt.next=Tt.pop(),Ct=Ct.right):Nt=!0;return vt.next=null,tt.next}function W(Zt,Ct,Tt){var Nt=Tt-Ct;if(Nt>0){var tt=Ct+Math.floor(Nt/2),vt=W(Zt,Ct,tt),Ht=Zt.head;return Ht.left=vt,Zt.head=Zt.head.next,Ht.right=W(Zt,tt+1,Tt),Ht}return null}function le(Zt,Ct,Tt){for(var Nt=new K(null,null),tt=Nt,vt=Zt,Ht=Ct;vt!==null&&Ht!==null;)Tt(vt.key,Ht.key)<0?(tt.next=vt,vt=vt.next):(tt.next=Ht,Ht=Ht.next),tt=tt.next;return vt!==null?tt.next=vt:Ht!==null&&(tt.next=Ht),Nt.next}function be(Zt,Ct,Tt,Nt,tt){if(!(Tt>=Nt)){for(var vt=Zt[Tt+Nt>>1],Ht=Tt-1,he=Nt+1;;){do Ht++;while(tt(Zt[Ht],vt)<0);do he--;while(tt(Zt[he],vt)>0);if(Ht>=he)break;var jt=Zt[Ht];Zt[Ht]=Zt[he],Zt[he]=jt,jt=Ct[Ht],Ct[Ht]=Ct[he],Ct[he]=jt}be(Zt,Ct,Tt,he,tt),be(Zt,Ct,he+1,Nt,tt)}}var Me=function(Ct,Tt){return Ct.ll.x<=Tt.x&&Tt.x<=Ct.ur.x&&Ct.ll.y<=Tt.y&&Tt.y<=Ct.ur.y},At=function(Ct,Tt){if(Tt.ur.x<Ct.ll.x||Ct.ur.x<Tt.ll.x||Tt.ur.y<Ct.ll.y||Ct.ur.y<Tt.ll.y)return null;var Nt=Ct.ll.x<Tt.ll.x?Tt.ll.x:Ct.ll.x,tt=Ct.ur.x<Tt.ur.x?Ct.ur.x:Tt.ur.x,vt=Ct.ll.y<Tt.ll.y?Tt.ll.y:Ct.ll.y,Ht=Ct.ur.y<Tt.ur.y?Ct.ur.y:Tt.ur.y;return{ll:{x:Nt,y:vt},ur:{x:tt,y:Ht}}},rt=Number.EPSILON;rt===void 0&&(rt=Math.pow(2,-52));var Dt=rt*rt,Ee=function(Ct,Tt){if(-rt<Ct&&Ct<rt&&-rt<Tt&&Tt<rt)return 0;var Nt=Ct-Tt;return Nt*Nt<Dt*Ct*Tt?0:Ct<Tt?-1:1},ge=function(){function Zt(){gt(this,Zt),this.reset()}return Et(Zt,[{key:"reset",value:function(){this.xRounder=new Ge,this.yRounder=new Ge}},{key:"round",value:function(Tt,Nt){return{x:this.xRounder.round(Tt),y:this.yRounder.round(Nt)}}}]),Zt}(),Ge=function(){function Zt(){gt(this,Zt),this.tree=new ut,this.round(0)}return Et(Zt,[{key:"round",value:function(Tt){var Nt=this.tree.add(Tt),tt=this.tree.prev(Nt);if(tt!==null&&Ee(Nt.key,tt.key)===0)return this.tree.remove(Tt),tt.key;var vt=this.tree.next(Nt);return vt!==null&&Ee(Nt.key,vt.key)===0?(this.tree.remove(Tt),vt.key):Tt}}]),Zt}(),Ue=new ge,xe=function(Ct,Tt){return Ct.x*Tt.y-Ct.y*Tt.x},Ke=function(Ct,Tt){return Ct.x*Tt.x+Ct.y*Tt.y},Lt=function(Ct,Tt,Nt){var tt={x:Tt.x-Ct.x,y:Tt.y-Ct.y},vt={x:Nt.x-Ct.x,y:Nt.y-Ct.y},Ht=xe(tt,vt);return Ee(Ht,0)},Jt=function(Ct){return Math.sqrt(Ke(Ct,Ct))},ft=function(Ct,Tt,Nt){var tt={x:Tt.x-Ct.x,y:Tt.y-Ct.y},vt={x:Nt.x-Ct.x,y:Nt.y-Ct.y};return xe(vt,tt)/Jt(vt)/Jt(tt)},St=function(Ct,Tt,Nt){var tt={x:Tt.x-Ct.x,y:Tt.y-Ct.y},vt={x:Nt.x-Ct.x,y:Nt.y-Ct.y};return Ke(vt,tt)/Jt(vt)/Jt(tt)},Y=function(Ct,Tt,Nt){return Tt.y===0?null:{x:Ct.x+Tt.x/Tt.y*(Nt-Ct.y),y:Nt}},mt=function(Ct,Tt,Nt){return Tt.x===0?null:{x:Nt,y:Ct.y+Tt.y/Tt.x*(Nt-Ct.x)}},se=function(Ct,Tt,Nt,tt){if(Tt.x===0)return mt(Nt,tt,Ct.x);if(tt.x===0)return mt(Ct,Tt,Nt.x);if(Tt.y===0)return Y(Nt,tt,Ct.y);if(tt.y===0)return Y(Ct,Tt,Nt.y);var vt=xe(Tt,tt);if(vt==0)return null;var Ht={x:Nt.x-Ct.x,y:Nt.y-Ct.y},he=xe(Ht,Tt)/vt,jt=xe(Ht,tt)/vt,Te=Ct.x+jt*Tt.x,We=Nt.x+he*tt.x,Qe=Ct.y+jt*Tt.y,pr=Nt.y+he*tt.y,lr=(Te+We)/2,Vr=(Qe+pr)/2;return{x:lr,y:Vr}},ke=function(){Et(Zt,null,[{key:"compare",value:function(Tt,Nt){var tt=Zt.comparePoints(Tt.point,Nt.point);return tt!==0?tt:(Tt.point!==Nt.point&&Tt.link(Nt),Tt.isLeft!==Nt.isLeft?Tt.isLeft?1:-1:Be.compare(Tt.segment,Nt.segment))}},{key:"comparePoints",value:function(Tt,Nt){return Tt.x<Nt.x?-1:Tt.x>Nt.x?1:Tt.y<Nt.y?-1:Tt.y>Nt.y?1:0}}]);function Zt(Ct,Tt){gt(this,Zt),Ct.events===void 0?Ct.events=[this]:Ct.events.push(this),this.point=Ct,this.isLeft=Tt}return Et(Zt,[{key:"link",value:function(Tt){if(Tt.point===this.point)throw new Error("Tried to link already linked events");for(var Nt=Tt.point.events,tt=0,vt=Nt.length;tt<vt;tt++){var Ht=Nt[tt];this.point.events.push(Ht),Ht.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var Tt=this.point.events.length,Nt=0;Nt<Tt;Nt++){var tt=this.point.events[Nt];if(tt.segment.consumedBy===void 0)for(var vt=Nt+1;vt<Tt;vt++){var Ht=this.point.events[vt];Ht.consumedBy===void 0&&tt.otherSE.point.events===Ht.otherSE.point.events&&tt.segment.consume(Ht.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var Tt=[],Nt=0,tt=this.point.events.length;Nt<tt;Nt++){var vt=this.point.events[Nt];vt!==this&&!vt.segment.ringOut&&vt.segment.isInResult()&&Tt.push(vt)}return Tt}},{key:"getLeftmostComparator",value:function(Tt){var Nt=this,tt=new Map,vt=function(he){var jt=he.otherSE;tt.set(he,{sine:ft(Nt.point,Tt.point,jt.point),cosine:St(Nt.point,Tt.point,jt.point)})};return function(Ht,he){tt.has(Ht)||vt(Ht),tt.has(he)||vt(he);var jt=tt.get(Ht),Te=jt.sine,We=jt.cosine,Qe=tt.get(he),pr=Qe.sine,lr=Qe.cosine;return Te>=0&&pr>=0?We<lr?1:We>lr?-1:0:Te<0&&pr<0?We<lr?-1:We>lr?1:0:pr<Te?-1:pr>Te?1:0}}}]),Zt}(),Le=0,Be=function(){Et(Zt,null,[{key:"compare",value:function(Tt,Nt){var tt=Tt.leftSE.point.x,vt=Nt.leftSE.point.x,Ht=Tt.rightSE.point.x,he=Nt.rightSE.point.x;if(he<tt)return 1;if(Ht<vt)return-1;var jt=Tt.leftSE.point.y,Te=Nt.leftSE.point.y,We=Tt.rightSE.point.y,Qe=Nt.rightSE.point.y;if(tt<vt){if(Te<jt&&Te<We)return 1;if(Te>jt&&Te>We)return-1;var pr=Tt.comparePoint(Nt.leftSE.point);if(pr<0)return 1;if(pr>0)return-1;var lr=Nt.comparePoint(Tt.rightSE.point);return lr!==0?lr:-1}if(tt>vt){if(jt<Te&&jt<Qe)return-1;if(jt>Te&&jt>Qe)return 1;var Vr=Nt.comparePoint(Tt.leftSE.point);if(Vr!==0)return Vr;var Pr=Tt.comparePoint(Nt.rightSE.point);return Pr<0?1:Pr>0?-1:1}if(jt<Te)return-1;if(jt>Te)return 1;if(Ht<he){var Br=Nt.comparePoint(Tt.rightSE.point);if(Br!==0)return Br}if(Ht>he){var Sn=Tt.comparePoint(Nt.rightSE.point);if(Sn<0)return 1;if(Sn>0)return-1}if(Ht!==he){var an=We-jt,zn=Ht-tt,Zn=Qe-Te,Wn=he-vt;if(an>zn&&Zn<Wn)return 1;if(an<zn&&Zn>Wn)return-1}return Ht>he?1:Ht<he||We<Qe?-1:We>Qe?1:Tt.id<Nt.id?-1:Tt.id>Nt.id?1:0}}]);function Zt(Ct,Tt,Nt,tt){gt(this,Zt),this.id=++Le,this.leftSE=Ct,Ct.segment=this,Ct.otherSE=Tt,this.rightSE=Tt,Tt.segment=this,Tt.otherSE=Ct,this.rings=Nt,this.windings=tt}return Et(Zt,[{key:"replaceRightSE",value:function(Tt){this.rightSE=Tt,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var Tt=this.leftSE.point.y,Nt=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:Tt<Nt?Tt:Nt},ur:{x:this.rightSE.point.x,y:Tt>Nt?Tt:Nt}}}},{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(Tt){return Tt.x===this.leftSE.point.x&&Tt.y===this.leftSE.point.y||Tt.x===this.rightSE.point.x&&Tt.y===this.rightSE.point.y}},{key:"comparePoint",value:function(Tt){if(this.isAnEndpoint(Tt))return 0;var Nt=this.leftSE.point,tt=this.rightSE.point,vt=this.vector();if(Nt.x===tt.x)return Tt.x===Nt.x?0:Tt.x<Nt.x?1:-1;var Ht=(Tt.y-Nt.y)/vt.y,he=Nt.x+Ht*vt.x;if(Tt.x===he)return 0;var jt=(Tt.x-Nt.x)/vt.x,Te=Nt.y+jt*vt.y;return Tt.y===Te?0:Tt.y<Te?-1:1}},{key:"getIntersection",value:function(Tt){var Nt=this.bbox(),tt=Tt.bbox(),vt=At(Nt,tt);if(vt===null)return null;var Ht=this.leftSE.point,he=this.rightSE.point,jt=Tt.leftSE.point,Te=Tt.rightSE.point,We=Me(Nt,jt)&&this.comparePoint(jt)===0,Qe=Me(tt,Ht)&&Tt.comparePoint(Ht)===0,pr=Me(Nt,Te)&&this.comparePoint(Te)===0,lr=Me(tt,he)&&Tt.comparePoint(he)===0;if(Qe&&We)return lr&&!pr?he:!lr&&pr?Te:null;if(Qe)return pr&&Ht.x===Te.x&&Ht.y===Te.y?null:Ht;if(We)return lr&&he.x===jt.x&&he.y===jt.y?null:jt;if(lr&&pr)return null;if(lr)return he;if(pr)return Te;var Vr=se(Ht,this.vector(),jt,Tt.vector());return Vr===null||!Me(vt,Vr)?null:Ue.round(Vr.x,Vr.y)}},{key:"split",value:function(Tt){var Nt=[],tt=Tt.events!==void 0,vt=new ke(Tt,!0),Ht=new ke(Tt,!1),he=this.rightSE;this.replaceRightSE(Ht),Nt.push(Ht),Nt.push(vt);var jt=new Zt(vt,he,this.rings.slice(),this.windings.slice());return ke.comparePoints(jt.leftSE.point,jt.rightSE.point)>0&&jt.swapEvents(),ke.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),tt&&(vt.checkForConsuming(),Ht.checkForConsuming()),Nt}},{key:"swapEvents",value:function(){var Tt=this.rightSE;this.rightSE=this.leftSE,this.leftSE=Tt,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var Nt=0,tt=this.windings.length;Nt<tt;Nt++)this.windings[Nt]*=-1}},{key:"consume",value:function(Tt){for(var Nt=this,tt=Tt;Nt.consumedBy;)Nt=Nt.consumedBy;for(;tt.consumedBy;)tt=tt.consumedBy;var vt=Zt.compare(Nt,tt);if(vt!==0){if(vt>0){var Ht=Nt;Nt=tt,tt=Ht}if(Nt.prev===tt){var he=Nt;Nt=tt,tt=he}for(var jt=0,Te=tt.rings.length;jt<Te;jt++){var We=tt.rings[jt],Qe=tt.windings[jt],pr=Nt.rings.indexOf(We);pr===-1?(Nt.rings.push(We),Nt.windings.push(Qe)):Nt.windings[pr]+=Qe}tt.rings=null,tt.windings=null,tt.consumedBy=Nt,tt.leftSE.consumedBy=Nt.leftSE,tt.rightSE.consumedBy=Nt.rightSE}}},{key:"prevInResult",value:function(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}},{key:"beforeState",value:function(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{var Tt=this.prev.consumedBy||this.prev;this._beforeState=Tt.afterState()}return this._beforeState}},{key:"afterState",value:function(){if(this._afterState!==void 0)return this._afterState;var Tt=this.beforeState();this._afterState={rings:Tt.rings.slice(0),windings:Tt.windings.slice(0),multiPolys:[]};for(var Nt=this._afterState.rings,tt=this._afterState.windings,vt=this._afterState.multiPolys,Ht=0,he=this.rings.length;Ht<he;Ht++){var jt=this.rings[Ht],Te=this.windings[Ht],We=Nt.indexOf(jt);We===-1?(Nt.push(jt),tt.push(Te)):tt[We]+=Te}for(var Qe=[],pr=[],lr=0,Vr=Nt.length;lr<Vr;lr++)if(tt[lr]!==0){var Pr=Nt[lr],Br=Pr.poly;if(pr.indexOf(Br)===-1)if(Pr.isExterior)Qe.push(Br);else{pr.indexOf(Br)===-1&&pr.push(Br);var Sn=Qe.indexOf(Pr.poly);Sn!==-1&&Qe.splice(Sn,1)}}for(var an=0,zn=Qe.length;an<zn;an++){var Zn=Qe[an].multiPoly;vt.indexOf(Zn)===-1&&vt.push(Zn)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;var Tt=this.beforeState().multiPolys,Nt=this.afterState().multiPolys;switch($t.type){case"union":{var tt=Tt.length===0,vt=Nt.length===0;this._isInResult=tt!==vt;break}case"intersection":{var Ht,he;Tt.length<Nt.length?(Ht=Tt.length,he=Nt.length):(Ht=Nt.length,he=Tt.length),this._isInResult=he===$t.numMultiPolys&&Ht<he;break}case"xor":{var jt=Math.abs(Tt.length-Nt.length);this._isInResult=jt%2===1;break}case"difference":{var Te=function(Qe){return Qe.length===1&&Qe[0].isSubject};this._isInResult=Te(Tt)!==Te(Nt);break}default:throw new Error("Unrecognized operation type found ".concat($t.type))}return this._isInResult}}],[{key:"fromRing",value:function(Tt,Nt,tt){var vt,Ht,he,jt=ke.comparePoints(Tt,Nt);if(jt<0)vt=Tt,Ht=Nt,he=1;else if(jt>0)vt=Nt,Ht=Tt,he=-1;else throw new Error("Tried to create degenerate segment at [".concat(Tt.x,", ").concat(Tt.y,"]"));var Te=new ke(vt,!0),We=new ke(Ht,!1);return new Zt(Te,We,[tt],[he])}}]),Zt}(),Bt=function(){function Zt(Ct,Tt,Nt){if(gt(this,Zt),!Array.isArray(Ct)||Ct.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=Tt,this.isExterior=Nt,this.segments=[],typeof Ct[0][0]!="number"||typeof Ct[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var tt=Ue.round(Ct[0][0],Ct[0][1]);this.bbox={ll:{x:tt.x,y:tt.y},ur:{x:tt.x,y:tt.y}};for(var vt=tt,Ht=1,he=Ct.length;Ht<he;Ht++){if(typeof Ct[Ht][0]!="number"||typeof Ct[Ht][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var jt=Ue.round(Ct[Ht][0],Ct[Ht][1]);jt.x===vt.x&&jt.y===vt.y||(this.segments.push(Be.fromRing(vt,jt,this)),jt.x<this.bbox.ll.x&&(this.bbox.ll.x=jt.x),jt.y<this.bbox.ll.y&&(this.bbox.ll.y=jt.y),jt.x>this.bbox.ur.x&&(this.bbox.ur.x=jt.x),jt.y>this.bbox.ur.y&&(this.bbox.ur.y=jt.y),vt=jt)}(tt.x!==vt.x||tt.y!==vt.y)&&this.segments.push(Be.fromRing(vt,tt,this))}return Et(Zt,[{key:"getSweepEvents",value:function(){for(var Tt=[],Nt=0,tt=this.segments.length;Nt<tt;Nt++){var vt=this.segments[Nt];Tt.push(vt.leftSE),Tt.push(vt.rightSE)}return Tt}}]),Zt}(),ee=function(){function Zt(Ct,Tt){if(gt(this,Zt),!Array.isArray(Ct))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Bt(Ct[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var Nt=1,tt=Ct.length;Nt<tt;Nt++){var vt=new Bt(Ct[Nt],this,!1);vt.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=vt.bbox.ll.x),vt.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=vt.bbox.ll.y),vt.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=vt.bbox.ur.x),vt.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=vt.bbox.ur.y),this.interiorRings.push(vt)}this.multiPoly=Tt}return Et(Zt,[{key:"getSweepEvents",value:function(){for(var Tt=this.exteriorRing.getSweepEvents(),Nt=0,tt=this.interiorRings.length;Nt<tt;Nt++)for(var vt=this.interiorRings[Nt].getSweepEvents(),Ht=0,he=vt.length;Ht<he;Ht++)Tt.push(vt[Ht]);return Tt}}]),Zt}(),me=function(){function Zt(Ct,Tt){if(gt(this,Zt),!Array.isArray(Ct))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof Ct[0][0][0]=="number"&&(Ct=[Ct])}catch(Ht){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var Nt=0,tt=Ct.length;Nt<tt;Nt++){var vt=new ee(Ct[Nt],this);vt.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=vt.bbox.ll.x),vt.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=vt.bbox.ll.y),vt.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=vt.bbox.ur.x),vt.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=vt.bbox.ur.y),this.polys.push(vt)}this.isSubject=Tt}return Et(Zt,[{key:"getSweepEvents",value:function(){for(var Tt=[],Nt=0,tt=this.polys.length;Nt<tt;Nt++)for(var vt=this.polys[Nt].getSweepEvents(),Ht=0,he=vt.length;Ht<he;Ht++)Tt.push(vt[Ht]);return Tt}}]),Zt}(),Yt=function(){Et(Zt,null,[{key:"factory",value:function(Tt){for(var Nt=[],tt=0,vt=Tt.length;tt<vt;tt++){var Ht=Tt[tt];if(!(!Ht.isInResult()||Ht.ringOut)){for(var he=null,jt=Ht.leftSE,Te=Ht.rightSE,We=[jt],Qe=jt.point,pr=[];he=jt,jt=Te,We.push(jt),jt.point!==Qe;)for(;;){var lr=jt.getAvailableLinkedEvents();if(lr.length===0){var Vr=We[0].point,Pr=We[We.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(Vr.x,",")+" ".concat(Vr.y,"]. Last matching segment found ends at")+" [".concat(Pr.x,", ").concat(Pr.y,"]."))}if(lr.length===1){Te=lr[0].otherSE;break}for(var Br=null,Sn=0,an=pr.length;Sn<an;Sn++)if(pr[Sn].point===jt.point){Br=Sn;break}if(Br!==null){var zn=pr.splice(Br)[0],Zn=We.splice(zn.index);Zn.unshift(Zn[0].otherSE),Nt.push(new Zt(Zn.reverse()));continue}pr.push({index:We.length,point:jt.point});var Wn=jt.getLeftmostComparator(he);Te=lr.sort(Wn)[0].otherSE;break}Nt.push(new Zt(We))}}return Nt}}]);function Zt(Ct){gt(this,Zt),this.events=Ct;for(var Tt=0,Nt=Ct.length;Tt<Nt;Tt++)Ct[Tt].segment.ringOut=this;this.poly=null}return Et(Zt,[{key:"getGeom",value:function(){for(var Tt=this.events[0].point,Nt=[Tt],tt=1,vt=this.events.length-1;tt<vt;tt++){var Ht=this.events[tt].point,he=this.events[tt+1].point;Lt(Ht,Tt,he)!==0&&(Nt.push(Ht),Tt=Ht)}if(Nt.length===1)return null;var jt=Nt[0],Te=Nt[1];Lt(jt,Tt,Te)===0&&Nt.shift(),Nt.push(Nt[0]);for(var We=this.isExteriorRing()?1:-1,Qe=this.isExteriorRing()?0:Nt.length-1,pr=this.isExteriorRing()?Nt.length:-1,lr=[],Vr=Qe;Vr!=pr;Vr+=We)lr.push([Nt[Vr].x,Nt[Vr].y]);return lr}},{key:"isExteriorRing",value:function(){if(this._isExteriorRing===void 0){var Tt=this.enclosingRing();this._isExteriorRing=Tt?!Tt.isExteriorRing():!0}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var Tt=this.events[0],Nt=1,tt=this.events.length;Nt<tt;Nt++){var vt=this.events[Nt];ke.compare(Tt,vt)>0&&(Tt=vt)}for(var Ht=Tt.segment.prevInResult(),he=Ht?Ht.prevInResult():null;;){if(!Ht)return null;if(!he)return Ht.ringOut;if(he.ringOut!==Ht.ringOut)return he.ringOut.enclosingRing()!==Ht.ringOut?Ht.ringOut:Ht.ringOut.enclosingRing();Ht=he.prevInResult(),he=Ht?Ht.prevInResult():null}}}]),Zt}(),qe=function(){function Zt(Ct){gt(this,Zt),this.exteriorRing=Ct,Ct.poly=this,this.interiorRings=[]}return Et(Zt,[{key:"addInterior",value:function(Tt){this.interiorRings.push(Tt),Tt.poly=this}},{key:"getGeom",value:function(){var Tt=[this.exteriorRing.getGeom()];if(Tt[0]===null)return null;for(var Nt=0,tt=this.interiorRings.length;Nt<tt;Nt++){var vt=this.interiorRings[Nt].getGeom();vt!==null&&Tt.push(vt)}return Tt}}]),Zt}(),vr=function(){function Zt(Ct){gt(this,Zt),this.rings=Ct,this.polys=this._composePolys(Ct)}return Et(Zt,[{key:"getGeom",value:function(){for(var Tt=[],Nt=0,tt=this.polys.length;Nt<tt;Nt++){var vt=this.polys[Nt].getGeom();vt!==null&&Tt.push(vt)}return Tt}},{key:"_composePolys",value:function(Tt){for(var Nt=[],tt=0,vt=Tt.length;tt<vt;tt++){var Ht=Tt[tt];if(!Ht.poly)if(Ht.isExteriorRing())Nt.push(new qe(Ht));else{var he=Ht.enclosingRing();he.poly||Nt.push(new qe(he)),he.poly.addInterior(Ht)}}return Nt}}]),Zt}(),ie=function(){function Zt(Ct){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Be.compare;gt(this,Zt),this.queue=Ct,this.tree=new ut(Tt),this.segments=[]}return Et(Zt,[{key:"process",value:function(Tt){var Nt=Tt.segment,tt=[];if(Tt.consumedBy)return Tt.isLeft?this.queue.remove(Tt.otherSE):this.tree.remove(Nt),tt;var vt=Tt.isLeft?this.tree.insert(Nt):this.tree.find(Nt);if(!vt)throw new Error("Unable to find segment #".concat(Nt.id," ")+"[".concat(Nt.leftSE.point.x,", ").concat(Nt.leftSE.point.y,"] -> ")+"[".concat(Nt.rightSE.point.x,", ").concat(Nt.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var Ht=vt,he=vt,jt=void 0,Te=void 0;jt===void 0;)Ht=this.tree.prev(Ht),Ht===null?jt=null:Ht.key.consumedBy===void 0&&(jt=Ht.key);for(;Te===void 0;)he=this.tree.next(he),he===null?Te=null:he.key.consumedBy===void 0&&(Te=he.key);if(Tt.isLeft){var We=null;if(jt){var Qe=jt.getIntersection(Nt);if(Qe!==null&&(Nt.isAnEndpoint(Qe)||(We=Qe),!jt.isAnEndpoint(Qe)))for(var pr=this._splitSafely(jt,Qe),lr=0,Vr=pr.length;lr<Vr;lr++)tt.push(pr[lr])}var Pr=null;if(Te){var Br=Te.getIntersection(Nt);if(Br!==null&&(Nt.isAnEndpoint(Br)||(Pr=Br),!Te.isAnEndpoint(Br)))for(var Sn=this._splitSafely(Te,Br),an=0,zn=Sn.length;an<zn;an++)tt.push(Sn[an])}if(We!==null||Pr!==null){var Zn=null;if(We===null)Zn=Pr;else if(Pr===null)Zn=We;else{var Wn=ke.comparePoints(We,Pr);Zn=Wn<=0?We:Pr}this.queue.remove(Nt.rightSE),tt.push(Nt.rightSE);for(var Dn=Nt.split(Zn),Xn=0,Ft=Dn.length;Xn<Ft;Xn++)tt.push(Dn[Xn])}tt.length>0?(this.tree.remove(Nt),tt.push(Tt)):(this.segments.push(Nt),Nt.prev=jt)}else{if(jt&&Te){var Wt=jt.getIntersection(Te);if(Wt!==null){if(!jt.isAnEndpoint(Wt))for(var oe=this._splitSafely(jt,Wt),ye=0,Ze=oe.length;ye<Ze;ye++)tt.push(oe[ye]);if(!Te.isAnEndpoint(Wt))for(var fr=this._splitSafely(Te,Wt),_r=0,we=fr.length;_r<we;_r++)tt.push(fr[_r])}}this.tree.remove(Nt)}return tt}},{key:"_splitSafely",value:function(Tt,Nt){this.tree.remove(Tt);var tt=Tt.rightSE;this.queue.remove(tt);var vt=Tt.split(Nt);return vt.push(tt),Tt.consumedBy===void 0&&this.tree.insert(Tt),vt}}]),Zt}(),qt=typeof kt!="undefined"&&{NODE_ENV:"production",PUBLIC_PATH:"/"}.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,bt=typeof kt!="undefined"&&{NODE_ENV:"production",PUBLIC_PATH:"/"}.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,Xt=function(){function Zt(){gt(this,Zt)}return Et(Zt,[{key:"run",value:function(Tt,Nt,tt){$t.type=Tt,Ue.reset();for(var vt=[new me(Nt,!0)],Ht=0,he=tt.length;Ht<he;Ht++)vt.push(new me(tt[Ht],!1));if($t.numMultiPolys=vt.length,$t.type==="difference")for(var jt=vt[0],Te=1;Te<vt.length;)At(vt[Te].bbox,jt.bbox)!==null?Te++:vt.splice(Te,1);if($t.type==="intersection"){for(var We=0,Qe=vt.length;We<Qe;We++)for(var pr=vt[We],lr=We+1,Vr=vt.length;lr<Vr;lr++)if(At(pr.bbox,vt[lr].bbox)===null)return[]}for(var Pr=new ut(ke.compare),Br=0,Sn=vt.length;Br<Sn;Br++)for(var an=vt[Br].getSweepEvents(),zn=0,Zn=an.length;zn<Zn;zn++)if(Pr.insert(an[zn]),Pr.size>qt)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var Wn=new ie(Pr),Dn=Pr.size,Xn=Pr.pop();Xn;){var Ft=Xn.key;if(Pr.size===Dn){var Wt=Ft.segment;throw new Error("Unable to pop() ".concat(Ft.isLeft?"left":"right"," SweepEvent ")+"[".concat(Ft.point.x,", ").concat(Ft.point.y,"] from segment #").concat(Wt.id," ")+"[".concat(Wt.leftSE.point.x,", ").concat(Wt.leftSE.point.y,"] -> ")+"[".concat(Wt.rightSE.point.x,", ").concat(Wt.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(Pr.size>qt)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(Wn.segments.length>bt)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var oe=Wn.process(Ft),ye=0,Ze=oe.length;ye<Ze;ye++){var fr=oe[ye];fr.consumedBy===void 0&&Pr.insert(fr)}Dn=Pr.size,Xn=Pr.pop()}Ue.reset();var _r=Yt.factory(Wn.segments),we=new vr(_r);return we.getGeom()}}]),Zt}(),$t=new Xt,xt=function(Ct){for(var Tt=arguments.length,Nt=new Array(Tt>1?Tt-1:0),tt=1;tt<Tt;tt++)Nt[tt-1]=arguments[tt];return $t.run("union",Ct,Nt)},wt=function(Ct){for(var Tt=arguments.length,Nt=new Array(Tt>1?Tt-1:0),tt=1;tt<Tt;tt++)Nt[tt-1]=arguments[tt];return $t.run("intersection",Ct,Nt)},ue=function(Ct){for(var Tt=arguments.length,Nt=new Array(Tt>1?Tt-1:0),tt=1;tt<Tt;tt++)Nt[tt-1]=arguments[tt];return $t.run("xor",Ct,Nt)},Ie=function(Ct){for(var Tt=arguments.length,Nt=new Array(Tt>1?Tt-1:0),tt=1;tt<Tt;tt++)Nt[tt-1]=arguments[tt];return $t.run("difference",Ct,Nt)},Ne={union:xt,intersection:wt,xor:ue,difference:Ie};return Ne})},87488:function(pn,Ot,nt){"use strict";var kt=nt(79685);var gt=function(){return gt=Object.assign||function(zt){for(var P,b=1,W=arguments.length;b<W;b++){P=arguments[b];for(var le in P)Object.prototype.hasOwnProperty.call(P,le)&&(zt[le]=P[le])}return zt},gt.apply(this,arguments)};function k(ut,zt){var P={};for(var b in ut)Object.prototype.hasOwnProperty.call(ut,b)&&zt.indexOf(b)<0&&(P[b]=ut[b]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var W=0,b=Object.getOwnPropertySymbols(ut);W<b.length;W++)zt.indexOf(b[W])<0&&Object.prototype.propertyIsEnumerable.call(ut,b[W])&&(P[b[W]]=ut[b[W]]);return P}var Et=function(){return Math.random().toString(36).substring(6)},K=function(ut){var zt=ut.animate,P=ut.backgroundColor,b=ut.backgroundOpacity,W=ut.baseUrl,le=ut.children,be=ut.foregroundColor,Me=ut.foregroundOpacity,At=ut.gradientRatio,rt=ut.uniqueKey,Dt=ut.interval,Ee=ut.rtl,ge=ut.speed,Ge=ut.style,Ue=ut.title,xe=k(ut,["animate","backgroundColor","backgroundOpacity","baseUrl","children","foregroundColor","foregroundOpacity","gradientRatio","uniqueKey","interval","rtl","speed","style","title"]),Ke=rt||Et(),Lt=Ke+"-diff",Jt=Ke+"-animated-diff",ft=Ke+"-aria",St=Ee?{transform:"scaleX(-1)"}:null,Y="0; "+Dt+"; 1",mt=ge+"s";return(0,kt.createElement)("svg",gt({"aria-labelledby":ft,role:"img",style:gt(gt({},Ge),St)},xe),Ue?(0,kt.createElement)("title",{id:ft},Ue):null,(0,kt.createElement)("rect",{role:"presentation",x:"0",y:"0",width:"100%",height:"100%",clipPath:"url("+W+"#"+Lt+")",style:{fill:"url("+W+"#"+Jt+")"}}),(0,kt.createElement)("defs",{role:"presentation"},(0,kt.createElement)("clipPath",{id:Lt},le),(0,kt.createElement)("linearGradient",{id:Jt},(0,kt.createElement)("stop",{offset:"0%",stopColor:P,stopOpacity:b},zt&&(0,kt.createElement)("animate",{attributeName:"offset",values:-At+"; "+-At+"; 1",keyTimes:Y,dur:mt,repeatCount:"indefinite"})),(0,kt.createElement)("stop",{offset:"50%",stopColor:be,stopOpacity:Me},zt&&(0,kt.createElement)("animate",{attributeName:"offset",values:-At/2+"; "+-At/2+"; "+(1+At/2),keyTimes:Y,dur:mt,repeatCount:"indefinite"})),(0,kt.createElement)("stop",{offset:"100%",stopColor:P,stopOpacity:b},zt&&(0,kt.createElement)("animate",{attributeName:"offset",values:"0; 0; "+(1+At),keyTimes:Y,dur:mt,repeatCount:"indefinite"})))))};K.defaultProps={animate:!0,backgroundColor:"#f5f6f7",backgroundOpacity:1,baseUrl:"",foregroundColor:"#eee",foregroundOpacity:1,gradientRatio:2,id:null,interval:.25,rtl:!1,speed:1.2,style:{},title:"Loading..."};var yt=function(ut){return ut.children?(0,kt.createElement)(K,gt({},ut)):(0,kt.createElement)(J,gt({},ut))},J=function(ut){return(0,kt.createElement)(yt,gt({viewBox:"0 0 476 124"},ut),(0,kt.createElement)("rect",{x:"48",y:"8",width:"88",height:"6",rx:"3"}),(0,kt.createElement)("rect",{x:"48",y:"26",width:"52",height:"6",rx:"3"}),(0,kt.createElement)("rect",{x:"0",y:"56",width:"410",height:"6",rx:"3"}),(0,kt.createElement)("rect",{x:"0",y:"72",width:"380",height:"6",rx:"3"}),(0,kt.createElement)("rect",{x:"0",y:"88",width:"178",height:"6",rx:"3"}),(0,kt.createElement)("circle",{cx:"20",cy:"20",r:"20"}))},pt=function(ut){return createElement(yt,gt({viewBox:"0 0 400 460"},ut),createElement("circle",{cx:"31",cy:"31",r:"15"}),createElement("rect",{x:"58",y:"18",rx:"2",ry:"2",width:"140",height:"10"}),createElement("rect",{x:"58",y:"34",rx:"2",ry:"2",width:"140",height:"10"}),createElement("rect",{x:"0",y:"60",rx:"2",ry:"2",width:"400",height:"400"}))},et=function(ut){return createElement(yt,gt({viewBox:"0 0 340 84"},ut),createElement("rect",{x:"0",y:"0",width:"67",height:"11",rx:"3"}),createElement("rect",{x:"76",y:"0",width:"140",height:"11",rx:"3"}),createElement("rect",{x:"127",y:"48",width:"53",height:"11",rx:"3"}),createElement("rect",{x:"187",y:"48",width:"72",height:"11",rx:"3"}),createElement("rect",{x:"18",y:"48",width:"100",height:"11",rx:"3"}),createElement("rect",{x:"0",y:"71",width:"37",height:"11",rx:"3"}),createElement("rect",{x:"18",y:"23",width:"140",height:"11",rx:"3"}),createElement("rect",{x:"166",y:"23",width:"173",height:"11",rx:"3"}))},_e=function(ut){return createElement(yt,gt({viewBox:"0 0 400 110"},ut),createElement("rect",{x:"0",y:"0",rx:"3",ry:"3",width:"250",height:"10"}),createElement("rect",{x:"20",y:"20",rx:"3",ry:"3",width:"220",height:"10"}),createElement("rect",{x:"20",y:"40",rx:"3",ry:"3",width:"170",height:"10"}),createElement("rect",{x:"0",y:"60",rx:"3",ry:"3",width:"250",height:"10"}),createElement("rect",{x:"20",y:"80",rx:"3",ry:"3",width:"200",height:"10"}),createElement("rect",{x:"20",y:"100",rx:"3",ry:"3",width:"80",height:"10"}))},ot=function(ut){return createElement(yt,gt({viewBox:"0 0 245 125"},ut),createElement("circle",{cx:"10",cy:"20",r:"8"}),createElement("rect",{x:"25",y:"15",rx:"5",ry:"5",width:"220",height:"10"}),createElement("circle",{cx:"10",cy:"50",r:"8"}),createElement("rect",{x:"25",y:"45",rx:"5",ry:"5",width:"220",height:"10"}),createElement("circle",{cx:"10",cy:"80",r:"8"}),createElement("rect",{x:"25",y:"75",rx:"5",ry:"5",width:"220",height:"10"}),createElement("circle",{cx:"10",cy:"110",r:"8"}),createElement("rect",{x:"25",y:"105",rx:"5",ry:"5",width:"220",height:"10"}))};Ot.ZP=yt},14299:function(pn,Ot,nt){var kt=nt(93738);var gt;(function(k){(function(Et){var K=typeof nt.g=="object"?nt.g:typeof self=="object"?self:typeof this=="object"?this:Function("return this;")(),yt=J(k);typeof K.Reflect=="undefined"?K.Reflect=k:yt=J(K.Reflect,yt),Et(yt);function J(pt,et){return function(_e,ot){typeof pt[_e]!="function"&&Object.defineProperty(pt,_e,{configurable:!0,writable:!0,value:ot}),et&&et(_e,ot)}}})(function(Et){var K=Object.prototype.hasOwnProperty,yt=typeof Symbol=="function",J=yt&&typeof Symbol.toPrimitive!="undefined"?Symbol.toPrimitive:"@@toPrimitive",pt=yt&&typeof Symbol.iterator!="undefined"?Symbol.iterator:"@@iterator",et=typeof Object.create=="function",_e={__proto__:[]}instanceof Array,ot=!et&&!_e,ut={create:et?function(){return he(Object.create(null))}:_e?function(){return he({__proto__:null})}:function(){return he({})},has:ot?function(jt,Te){return K.call(jt,Te)}:function(jt,Te){return Te in jt},get:ot?function(jt,Te){return K.call(jt,Te)?jt[Te]:void 0}:function(jt,Te){return jt[Te]}},zt=Object.getPrototypeOf(Function),P=typeof kt=="object"&&{NODE_ENV:"production",PUBLIC_PATH:"/"}&&{NODE_ENV:"production",PUBLIC_PATH:"/"}.REFLECT_METADATA_USE_MAP_POLYFILL==="true",b=!P&&typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:tt(),W=!P&&typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:vt(),le=!P&&typeof WeakMap=="function"?WeakMap:Ht(),be=new le;function Me(jt,Te,We,Qe){if(ee(We)){if(!$t(jt))throw new TypeError;if(!wt(Te))throw new TypeError;return Lt(jt,Te)}else{if(!$t(jt))throw new TypeError;if(!qe(Te))throw new TypeError;if(!qe(Qe)&&!ee(Qe)&&!me(Qe))throw new TypeError;return me(Qe)&&(Qe=void 0),We=Xt(We),Jt(jt,Te,We,Qe)}}Et("decorate",Me);function At(jt,Te){function We(Qe,pr){if(!qe(Qe))throw new TypeError;if(!ee(pr)&&!ue(pr))throw new TypeError;ke(jt,Te,Qe,pr)}return We}Et("metadata",At);function rt(jt,Te,We,Qe){if(!qe(We))throw new TypeError;return ee(Qe)||(Qe=Xt(Qe)),ke(jt,Te,We,Qe)}Et("defineMetadata",rt);function Dt(jt,Te,We){if(!qe(Te))throw new TypeError;return ee(We)||(We=Xt(We)),St(jt,Te,We)}Et("hasMetadata",Dt);function Ee(jt,Te,We){if(!qe(Te))throw new TypeError;return ee(We)||(We=Xt(We)),Y(jt,Te,We)}Et("hasOwnMetadata",Ee);function ge(jt,Te,We){if(!qe(Te))throw new TypeError;return ee(We)||(We=Xt(We)),mt(jt,Te,We)}Et("getMetadata",ge);function Ge(jt,Te,We){if(!qe(Te))throw new TypeError;return ee(We)||(We=Xt(We)),se(jt,Te,We)}Et("getOwnMetadata",Ge);function Ue(jt,Te){if(!qe(jt))throw new TypeError;return ee(Te)||(Te=Xt(Te)),Le(jt,Te)}Et("getMetadataKeys",Ue);function xe(jt,Te){if(!qe(jt))throw new TypeError;return ee(Te)||(Te=Xt(Te)),Be(jt,Te)}Et("getOwnMetadataKeys",xe);function Ke(jt,Te,We){if(!qe(Te))throw new TypeError;ee(We)||(We=Xt(We));var Qe=ft(Te,We,!1);if(ee(Qe)||!Qe.delete(jt))return!1;if(Qe.size>0)return!0;var pr=be.get(Te);return pr.delete(We),pr.size>0||be.delete(Te),!0}Et("deleteMetadata",Ke);function Lt(jt,Te){for(var We=jt.length-1;We>=0;--We){var Qe=jt[We],pr=Qe(Te);if(!ee(pr)&&!me(pr)){if(!wt(pr))throw new TypeError;Te=pr}}return Te}function Jt(jt,Te,We,Qe){for(var pr=jt.length-1;pr>=0;--pr){var lr=jt[pr],Vr=lr(Te,We,Qe);if(!ee(Vr)&&!me(Vr)){if(!qe(Vr))throw new TypeError;Qe=Vr}}return Qe}function ft(jt,Te,We){var Qe=be.get(jt);if(ee(Qe)){if(!We)return;Qe=new b,be.set(jt,Qe)}var pr=Qe.get(Te);if(ee(pr)){if(!We)return;pr=new b,Qe.set(Te,pr)}return pr}function St(jt,Te,We){var Qe=Y(jt,Te,We);if(Qe)return!0;var pr=Nt(Te);return me(pr)?!1:St(jt,pr,We)}function Y(jt,Te,We){var Qe=ft(Te,We,!1);return ee(Qe)?!1:qt(Qe.has(jt))}function mt(jt,Te,We){var Qe=Y(jt,Te,We);if(Qe)return se(jt,Te,We);var pr=Nt(Te);if(!me(pr))return mt(jt,pr,We)}function se(jt,Te,We){var Qe=ft(Te,We,!1);if(!ee(Qe))return Qe.get(jt)}function ke(jt,Te,We,Qe){var pr=ft(We,Qe,!0);pr.set(jt,Te)}function Le(jt,Te){var We=Be(jt,Te),Qe=Nt(jt);if(Qe===null)return We;var pr=Le(Qe,Te);if(pr.length<=0)return We;if(We.length<=0)return pr;for(var lr=new W,Vr=[],Pr=0,Br=We;Pr<Br.length;Pr++){var Sn=Br[Pr],an=lr.has(Sn);an||(lr.add(Sn),Vr.push(Sn))}for(var zn=0,Zn=pr;zn<Zn.length;zn++){var Sn=Zn[zn],an=lr.has(Sn);an||(lr.add(Sn),Vr.push(Sn))}return Vr}function Be(jt,Te){var We=[],Qe=ft(jt,Te,!1);if(ee(Qe))return We;for(var pr=Qe.keys(),lr=Ne(pr),Vr=0;;){var Pr=Ct(lr);if(!Pr)return We.length=Vr,We;var Br=Zt(Pr);try{We[Vr]=Br}catch(Sn){try{Tt(lr)}finally{throw Sn}}Vr++}}function Bt(jt){if(jt===null)return 1;switch(typeof jt){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return jt===null?1:6;default:return 6}}function ee(jt){return jt===void 0}function me(jt){return jt===null}function Yt(jt){return typeof jt=="symbol"}function qe(jt){return typeof jt=="object"?jt!==null:typeof jt=="function"}function vr(jt,Te){switch(Bt(jt)){case 0:return jt;case 1:return jt;case 2:return jt;case 3:return jt;case 4:return jt;case 5:return jt}var We=Te===3?"string":Te===5?"number":"default",Qe=Ie(jt,J);if(Qe!==void 0){var pr=Qe.call(jt,We);if(qe(pr))throw new TypeError;return pr}return ie(jt,We==="default"?"number":We)}function ie(jt,Te){if(Te==="string"){var We=jt.toString;if(xt(We)){var Qe=We.call(jt);if(!qe(Qe))return Qe}var pr=jt.valueOf;if(xt(pr)){var Qe=pr.call(jt);if(!qe(Qe))return Qe}}else{var pr=jt.valueOf;if(xt(pr)){var Qe=pr.call(jt);if(!qe(Qe))return Qe}var lr=jt.toString;if(xt(lr)){var Qe=lr.call(jt);if(!qe(Qe))return Qe}}throw new TypeError}function qt(jt){return!!jt}function bt(jt){return""+jt}function Xt(jt){var Te=vr(jt,3);return Yt(Te)?Te:bt(Te)}function $t(jt){return Array.isArray?Array.isArray(jt):jt instanceof Object?jt instanceof Array:Object.prototype.toString.call(jt)==="[object Array]"}function xt(jt){return typeof jt=="function"}function wt(jt){return typeof jt=="function"}function ue(jt){switch(Bt(jt)){case 3:return!0;case 4:return!0;default:return!1}}function Ie(jt,Te){var We=jt[Te];if(We!=null){if(!xt(We))throw new TypeError;return We}}function Ne(jt){var Te=Ie(jt,pt);if(!xt(Te))throw new TypeError;var We=Te.call(jt);if(!qe(We))throw new TypeError;return We}function Zt(jt){return jt.value}function Ct(jt){var Te=jt.next();return Te.done?!1:Te}function Tt(jt){var Te=jt.return;Te&&Te.call(jt)}function Nt(jt){var Te=Object.getPrototypeOf(jt);if(typeof jt!="function"||jt===zt||Te!==zt)return Te;var We=jt.prototype,Qe=We&&Object.getPrototypeOf(We);if(Qe==null||Qe===Object.prototype)return Te;var pr=Qe.constructor;return typeof pr!="function"||pr===jt?Te:pr}function tt(){var jt={},Te=[],We=function(){function Vr(Pr,Br,Sn){this._index=0,this._keys=Pr,this._values=Br,this._selector=Sn}return Vr.prototype["@@iterator"]=function(){return this},Vr.prototype[pt]=function(){return this},Vr.prototype.next=function(){var Pr=this._index;if(Pr>=0&&Pr<this._keys.length){var Br=this._selector(this._keys[Pr],this._values[Pr]);return Pr+1>=this._keys.length?(this._index=-1,this._keys=Te,this._values=Te):this._index++,{value:Br,done:!1}}return{value:void 0,done:!0}},Vr.prototype.throw=function(Pr){throw this._index>=0&&(this._index=-1,this._keys=Te,this._values=Te),Pr},Vr.prototype.return=function(Pr){return this._index>=0&&(this._index=-1,this._keys=Te,this._values=Te),{value:Pr,done:!0}},Vr}();return function(){function Vr(){this._keys=[],this._values=[],this._cacheKey=jt,this._cacheIndex=-2}return Object.defineProperty(Vr.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),Vr.prototype.has=function(Pr){return this._find(Pr,!1)>=0},Vr.prototype.get=function(Pr){var Br=this._find(Pr,!1);return Br>=0?this._values[Br]:void 0},Vr.prototype.set=function(Pr,Br){var Sn=this._find(Pr,!0);return this._values[Sn]=Br,this},Vr.prototype.delete=function(Pr){var Br=this._find(Pr,!1);if(Br>=0){for(var Sn=this._keys.length,an=Br+1;an<Sn;an++)this._keys[an-1]=this._keys[an],this._values[an-1]=this._values[an];return this._keys.length--,this._values.length--,Pr===this._cacheKey&&(this._cacheKey=jt,this._cacheIndex=-2),!0}return!1},Vr.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=jt,this._cacheIndex=-2},Vr.prototype.keys=function(){return new We(this._keys,this._values,Qe)},Vr.prototype.values=function(){return new We(this._keys,this._values,pr)},Vr.prototype.entries=function(){return new We(this._keys,this._values,lr)},Vr.prototype["@@iterator"]=function(){return this.entries()},Vr.prototype[pt]=function(){return this.entries()},Vr.prototype._find=function(Pr,Br){return this._cacheKey!==Pr&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=Pr)),this._cacheIndex<0&&Br&&(this._cacheIndex=this._keys.length,this._keys.push(Pr),this._values.push(void 0)),this._cacheIndex},Vr}();function Qe(Vr,Pr){return Vr}function pr(Vr,Pr){return Pr}function lr(Vr,Pr){return[Vr,Pr]}}function vt(){return function(){function jt(){this._map=new b}return Object.defineProperty(jt.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),jt.prototype.has=function(Te){return this._map.has(Te)},jt.prototype.add=function(Te){return this._map.set(Te,Te),this},jt.prototype.delete=function(Te){return this._map.delete(Te)},jt.prototype.clear=function(){this._map.clear()},jt.prototype.keys=function(){return this._map.keys()},jt.prototype.values=function(){return this._map.values()},jt.prototype.entries=function(){return this._map.entries()},jt.prototype["@@iterator"]=function(){return this.keys()},jt.prototype[pt]=function(){return this.keys()},jt}()}function Ht(){var jt=16,Te=ut.create(),We=Qe();return function(){function Br(){this._key=Qe()}return Br.prototype.has=function(Sn){var an=pr(Sn,!1);return an!==void 0?ut.has(an,this._key):!1},Br.prototype.get=function(Sn){var an=pr(Sn,!1);return an!==void 0?ut.get(an,this._key):void 0},Br.prototype.set=function(Sn,an){var zn=pr(Sn,!0);return zn[this._key]=an,this},Br.prototype.delete=function(Sn){var an=pr(Sn,!1);return an!==void 0?delete an[this._key]:!1},Br.prototype.clear=function(){this._key=Qe()},Br}();function Qe(){var Br;do Br="@@WeakMap@@"+Pr();while(ut.has(Te,Br));return Te[Br]=!0,Br}function pr(Br,Sn){if(!K.call(Br,We)){if(!Sn)return;Object.defineProperty(Br,We,{value:ut.create()})}return Br[We]}function lr(Br,Sn){for(var an=0;an<Sn;++an)Br[an]=Math.random()*255|0;return Br}function Vr(Br){return typeof Uint8Array=="function"?typeof crypto!="undefined"?crypto.getRandomValues(new Uint8Array(Br)):typeof msCrypto!="undefined"?msCrypto.getRandomValues(new Uint8Array(Br)):lr(new Uint8Array(Br),Br):lr(new Array(Br),Br)}function Pr(){var Br=Vr(jt);Br[6]=Br[6]&79|64,Br[8]=Br[8]&191|128;for(var Sn="",an=0;an<jt;++an){var zn=Br[an];(an===4||an===6||an===8)&&(Sn+="-"),zn<16&&(Sn+="0"),Sn+=zn.toString(16).toLowerCase()}return Sn}}function he(jt){return jt.__=void 0,delete jt.__,jt}})})(gt||(gt={}))},46612:function(pn,Ot){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.SensorTabIndex=Ot.SensorClassName=Ot.SizeSensorId=void 0;var nt="size-sensor-id";Ot.SizeSensorId=nt;var kt="size-sensor-object";Ot.SensorClassName=kt;var gt="-1";Ot.SensorTabIndex=gt},51793:function(pn,Ot){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.default=void 0;var nt=function(gt){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,Et=null;return function(){for(var K=this,yt=arguments.length,J=new Array(yt),pt=0;pt<yt;pt++)J[pt]=arguments[pt];clearTimeout(Et),Et=setTimeout(function(){gt.apply(K,J)},k)}};Ot.default=nt},8664:function(pn,Ot){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.default=void 0;var nt=1,kt=function(){return"".concat(nt++)};Ot.default=kt},1375:function(pn,Ot,nt){"use strict";var kt;kt={value:!0},kt=kt=Ot.ak=void 0;var gt=nt(43337),k=function(J,pt){var et=(0,gt.getSensor)(J);return et.bind(pt),function(){et.unbind(pt)}};Ot.ak=k;var Et=function(J){var pt=(0,gt.getSensor)(J);(0,gt.removeSensor)(pt)};kt=Et;var K="1.0.1";kt=K},43337:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.removeSensor=Ot.getSensor=void 0;var kt=Et(nt(8664)),gt=nt(69075),k=nt(46612);function Et(pt){return pt&&pt.__esModule?pt:{default:pt}}var K={},yt=function(et){var _e=et.getAttribute(k.SizeSensorId);if(_e&&K[_e])return K[_e];var ot=(0,kt.default)();et.setAttribute(k.SizeSensorId,ot);var ut=(0,gt.createSensor)(et);return K[ot]=ut,ut};Ot.getSensor=yt;var J=function(et){var _e=et.element.getAttribute(k.SizeSensorId);et.element.removeAttribute(k.SizeSensorId),et.destroy(),_e&&K[_e]&&delete K[_e]};Ot.removeSensor=J},69075:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.createSensor=void 0;var kt=nt(94482),gt=nt(40763),k=typeof ResizeObserver!="undefined"?gt.createSensor:kt.createSensor;Ot.createSensor=k},94482:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.createSensor=void 0;var kt=k(nt(51793)),gt=nt(46612);function k(K){return K&&K.__esModule?K:{default:K}}var Et=function(yt){var J=void 0,pt=[],et=function(){getComputedStyle(yt).position==="static"&&(yt.style.position="relative");var b=document.createElement("object");return b.onload=function(){b.contentDocument.defaultView.addEventListener("resize",_e),_e()},b.style.display="block",b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.height="100%",b.style.width="100%",b.style.overflow="hidden",b.style.pointerEvents="none",b.style.zIndex="-1",b.style.opacity="0",b.setAttribute("class",gt.SensorClassName),b.setAttribute("tabindex",gt.SensorTabIndex),b.type="text/html",yt.appendChild(b),b.data="about:blank",b},_e=(0,kt.default)(function(){pt.forEach(function(P){P(yt)})}),ot=function(b){J||(J=et()),pt.indexOf(b)===-1&&pt.push(b)},ut=function(){J&&J.parentNode&&(J.contentDocument&&J.contentDocument.defaultView.removeEventListener("resize",_e),J.parentNode.removeChild(J),J=void 0,pt=[])},zt=function(b){var W=pt.indexOf(b);W!==-1&&pt.splice(W,1),pt.length===0&&J&&ut()};return{element:yt,bind:ot,destroy:ut,unbind:zt}};Ot.createSensor=Et},40763:function(pn,Ot,nt){"use strict";Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.createSensor=void 0;var kt=gt(nt(51793));function gt(Et){return Et&&Et.__esModule?Et:{default:Et}}var k=function(K){var yt=void 0,J=[],pt=(0,kt.default)(function(){J.forEach(function(zt){zt(K)})}),et=function(){var P=new ResizeObserver(pt);return P.observe(K),pt(),P},_e=function(P){yt||(yt=et()),J.indexOf(P)===-1&&J.push(P)},ot=function(){yt.disconnect(),J=[],yt=void 0},ut=function(P){var b=J.indexOf(P);b!==-1&&J.splice(b,1),J.length===0&&yt&&ot()};return{element:K,bind:_e,destroy:ot,unbind:ut}};Ot.createSensor=k},39720:function(pn){(function(Ot,nt){pn.exports=nt()})(this,function(){"use strict";function Ot(Ee,ge,Ge,Ue,xe,Ke){if(!(xe-Ue<=Ge)){var Lt=Ue+xe>>1;nt(Ee,ge,Lt,Ue,xe,Ke%2),Ot(Ee,ge,Ge,Ue,Lt-1,Ke+1),Ot(Ee,ge,Ge,Lt+1,xe,Ke+1)}}function nt(Ee,ge,Ge,Ue,xe,Ke){for(;xe>Ue;){if(xe-Ue>600){var Lt=xe-Ue+1,Jt=Ge-Ue+1,ft=Math.log(Lt),St=.5*Math.exp(2*ft/3),Y=.5*Math.sqrt(ft*St*(Lt-St)/Lt)*(Jt-Lt/2<0?-1:1),mt=Math.max(Ue,Math.floor(Ge-Jt*St/Lt+Y)),se=Math.min(xe,Math.floor(Ge+(Lt-Jt)*St/Lt+Y));nt(Ee,ge,Ge,mt,se,Ke)}var ke=ge[2*Ge+Ke],Le=Ue,Be=xe;for(kt(Ee,ge,Ue,Ge),ge[2*xe+Ke]>ke&&kt(Ee,ge,Ue,xe);Le<Be;){for(kt(Ee,ge,Le,Be),Le++,Be--;ge[2*Le+Ke]<ke;)Le++;for(;ge[2*Be+Ke]>ke;)Be--}ge[2*Ue+Ke]===ke?kt(Ee,ge,Ue,Be):(Be++,kt(Ee,ge,Be,xe)),Be<=Ge&&(Ue=Be+1),Ge<=Be&&(xe=Be-1)}}function kt(Ee,ge,Ge,Ue){gt(Ee,Ge,Ue),gt(ge,2*Ge,2*Ue),gt(ge,2*Ge+1,2*Ue+1)}function gt(Ee,ge,Ge){var Ue=Ee[ge];Ee[ge]=Ee[Ge],Ee[Ge]=Ue}function k(Ee,ge,Ge,Ue,xe,Ke,Lt){for(var Jt=[0,Ee.length-1,0],ft=[],St,Y;Jt.length;){var mt=Jt.pop(),se=Jt.pop(),ke=Jt.pop();if(se-ke<=Lt){for(var Le=ke;Le<=se;Le++)St=ge[2*Le],Y=ge[2*Le+1],St>=Ge&&St<=xe&&Y>=Ue&&Y<=Ke&&ft.push(Ee[Le]);continue}var Be=Math.floor((ke+se)/2);St=ge[2*Be],Y=ge[2*Be+1],St>=Ge&&St<=xe&&Y>=Ue&&Y<=Ke&&ft.push(Ee[Be]);var Bt=(mt+1)%2;(mt===0?Ge<=St:Ue<=Y)&&(Jt.push(ke),Jt.push(Be-1),Jt.push(Bt)),(mt===0?xe>=St:Ke>=Y)&&(Jt.push(Be+1),Jt.push(se),Jt.push(Bt))}return ft}function Et(Ee,ge,Ge,Ue,xe,Ke){for(var Lt=[0,Ee.length-1,0],Jt=[],ft=xe*xe;Lt.length;){var St=Lt.pop(),Y=Lt.pop(),mt=Lt.pop();if(Y-mt<=Ke){for(var se=mt;se<=Y;se++)K(ge[2*se],ge[2*se+1],Ge,Ue)<=ft&&Jt.push(Ee[se]);continue}var ke=Math.floor((mt+Y)/2),Le=ge[2*ke],Be=ge[2*ke+1];K(Le,Be,Ge,Ue)<=ft&&Jt.push(Ee[ke]);var Bt=(St+1)%2;(St===0?Ge-xe<=Le:Ue-xe<=Be)&&(Lt.push(mt),Lt.push(ke-1),Lt.push(Bt)),(St===0?Ge+xe>=Le:Ue+xe>=Be)&&(Lt.push(ke+1),Lt.push(Y),Lt.push(Bt))}return Jt}function K(Ee,ge,Ge,Ue){var xe=Ee-Ge,Ke=ge-Ue;return xe*xe+Ke*Ke}var yt=function(Ee){return Ee[0]},J=function(Ee){return Ee[1]},pt=function(ge,Ge,Ue,xe,Ke){Ge===void 0&&(Ge=yt),Ue===void 0&&(Ue=J),xe===void 0&&(xe=64),Ke===void 0&&(Ke=Float64Array),this.nodeSize=xe,this.points=ge;for(var Lt=ge.length<65536?Uint16Array:Uint32Array,Jt=this.ids=new Lt(ge.length),ft=this.coords=new Ke(ge.length*2),St=0;St<ge.length;St++)Jt[St]=St,ft[2*St]=Ge(ge[St]),ft[2*St+1]=Ue(ge[St]);Ot(Jt,ft,xe,0,Jt.length-1,0)};pt.prototype.range=function(ge,Ge,Ue,xe){return k(this.ids,this.coords,ge,Ge,Ue,xe,this.nodeSize)},pt.prototype.within=function(ge,Ge,Ue){return Et(this.ids,this.coords,ge,Ge,Ue,this.nodeSize)};var et={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Ee){return Ee}},_e=Math.fround||function(Ee){return function(ge){return Ee[0]=+ge,Ee[0]}}(new Float32Array(1)),ot=function(ge){this.options=At(Object.create(et),ge),this.trees=new Array(this.options.maxZoom+1)};ot.prototype.load=function(ge){var Ge=this.options,Ue=Ge.log,xe=Ge.minZoom,Ke=Ge.maxZoom,Lt=Ge.nodeSize;Ue&&console.time("total time");var Jt="prepare "+ge.length+" points";Ue&&console.time(Jt),this.points=ge;for(var ft=[],St=0;St<ge.length;St++)ge[St].geometry&&ft.push(zt(ge[St],St));this.trees[Ke+1]=new pt(ft,rt,Dt,Lt,Float32Array),Ue&&console.timeEnd(Jt);for(var Y=Ke;Y>=xe;Y--){var mt=+Date.now();ft=this._cluster(ft,Y),this.trees[Y]=new pt(ft,rt,Dt,Lt,Float32Array),Ue&&console.log("z%d: %d clusters in %dms",Y,ft.length,+Date.now()-mt)}return Ue&&console.timeEnd("total time"),this},ot.prototype.getClusters=function(ge,Ge){var Ue=((ge[0]+180)%360+360)%360-180,xe=Math.max(-90,Math.min(90,ge[1])),Ke=ge[2]===180?180:((ge[2]+180)%360+360)%360-180,Lt=Math.max(-90,Math.min(90,ge[3]));if(ge[2]-ge[0]>=360)Ue=-180,Ke=180;else if(Ue>Ke){var Jt=this.getClusters([Ue,xe,180,Lt],Ge),ft=this.getClusters([-180,xe,Ke,Lt],Ge);return Jt.concat(ft)}for(var St=this.trees[this._limitZoom(Ge)],Y=St.range(W(Ue),le(Lt),W(Ke),le(xe)),mt=[],se=0,ke=Y;se<ke.length;se+=1){var Le=ke[se],Be=St.points[Le];mt.push(Be.numPoints?P(Be):this.points[Be.index])}return mt},ot.prototype.getChildren=function(ge){var Ge=this._getOriginId(ge),Ue=this._getOriginZoom(ge),xe="No cluster with the specified id.",Ke=this.trees[Ue];if(!Ke)throw new Error(xe);var Lt=Ke.points[Ge];if(!Lt)throw new Error(xe);for(var Jt=this.options.radius/(this.options.extent*Math.pow(2,Ue-1)),ft=Ke.within(Lt.x,Lt.y,Jt),St=[],Y=0,mt=ft;Y<mt.length;Y+=1){var se=mt[Y],ke=Ke.points[se];ke.parentId===ge&&St.push(ke.numPoints?P(ke):this.points[ke.index])}if(St.length===0)throw new Error(xe);return St},ot.prototype.getLeaves=function(ge,Ge,Ue){Ge=Ge||10,Ue=Ue||0;var xe=[];return this._appendLeaves(xe,ge,Ge,Ue,0),xe},ot.prototype.getTile=function(ge,Ge,Ue){var xe=this.trees[this._limitZoom(ge)],Ke=Math.pow(2,ge),Lt=this.options,Jt=Lt.extent,ft=Lt.radius,St=ft/Jt,Y=(Ue-St)/Ke,mt=(Ue+1+St)/Ke,se={features:[]};return this._addTileFeatures(xe.range((Ge-St)/Ke,Y,(Ge+1+St)/Ke,mt),xe.points,Ge,Ue,Ke,se),Ge===0&&this._addTileFeatures(xe.range(1-St/Ke,Y,1,mt),xe.points,Ke,Ue,Ke,se),Ge===Ke-1&&this._addTileFeatures(xe.range(0,Y,St/Ke,mt),xe.points,-1,Ue,Ke,se),se.features.length?se:null},ot.prototype.getClusterExpansionZoom=function(ge){for(var Ge=this._getOriginZoom(ge)-1;Ge<=this.options.maxZoom;){var Ue=this.getChildren(ge);if(Ge++,Ue.length!==1)break;ge=Ue[0].properties.cluster_id}return Ge},ot.prototype._appendLeaves=function(ge,Ge,Ue,xe,Ke){for(var Lt=this.getChildren(Ge),Jt=0,ft=Lt;Jt<ft.length;Jt+=1){var St=ft[Jt],Y=St.properties;if(Y&&Y.cluster?Ke+Y.point_count<=xe?Ke+=Y.point_count:Ke=this._appendLeaves(ge,Y.cluster_id,Ue,xe,Ke):Ke<xe?Ke++:ge.push(St),ge.length===Ue)break}return Ke},ot.prototype._addTileFeatures=function(ge,Ge,Ue,xe,Ke,Lt){for(var Jt=0,ft=ge;Jt<ft.length;Jt+=1){var St=ft[Jt],Y=Ge[St],mt=Y.numPoints,se=void 0,ke=void 0,Le=void 0;if(mt)se=b(Y),ke=Y.x,Le=Y.y;else{var Be=this.points[Y.index];se=Be.properties,ke=W(Be.geometry.coordinates[0]),Le=le(Be.geometry.coordinates[1])}var Bt={type:1,geometry:[[Math.round(this.options.extent*(ke*Ke-Ue)),Math.round(this.options.extent*(Le*Ke-xe))]],tags:se},ee=void 0;mt?ee=Y.id:this.options.generateId?ee=Y.index:this.points[Y.index].id&&(ee=this.points[Y.index].id),ee!==void 0&&(Bt.id=ee),Lt.features.push(Bt)}},ot.prototype._limitZoom=function(ge){return Math.max(this.options.minZoom,Math.min(Math.floor(+ge),this.options.maxZoom+1))},ot.prototype._cluster=function(ge,Ge){for(var Ue=[],xe=this.options,Ke=xe.radius,Lt=xe.extent,Jt=xe.reduce,ft=xe.minPoints,St=Ke/(Lt*Math.pow(2,Ge)),Y=0;Y<ge.length;Y++){var mt=ge[Y];if(!(mt.zoom<=Ge)){mt.zoom=Ge;for(var se=this.trees[Ge+1],ke=se.within(mt.x,mt.y,St),Le=mt.numPoints||1,Be=Le,Bt=0,ee=ke;Bt<ee.length;Bt+=1){var me=ee[Bt],Yt=se.points[me];Yt.zoom>Ge&&(Be+=Yt.numPoints||1)}if(Be>Le&&Be>=ft){for(var qe=mt.x*Le,vr=mt.y*Le,ie=Jt&&Le>1?this._map(mt,!0):null,qt=(Y<<5)+(Ge+1)+this.points.length,bt=0,Xt=ke;bt<Xt.length;bt+=1){var $t=Xt[bt],xt=se.points[$t];if(!(xt.zoom<=Ge)){xt.zoom=Ge;var wt=xt.numPoints||1;qe+=xt.x*wt,vr+=xt.y*wt,xt.parentId=qt,Jt&&(ie||(ie=this._map(mt,!0)),Jt(ie,this._map(xt)))}}mt.parentId=qt,Ue.push(ut(qe/Be,vr/Be,qt,Be,ie))}else if(Ue.push(mt),Be>1)for(var ue=0,Ie=ke;ue<Ie.length;ue+=1){var Ne=Ie[ue],Zt=se.points[Ne];Zt.zoom<=Ge||(Zt.zoom=Ge,Ue.push(Zt))}}}return Ue},ot.prototype._getOriginId=function(ge){return ge-this.points.length>>5},ot.prototype._getOriginZoom=function(ge){return(ge-this.points.length)%32},ot.prototype._map=function(ge,Ge){if(ge.numPoints)return Ge?At({},ge.properties):ge.properties;var Ue=this.points[ge.index].properties,xe=this.options.map(Ue);return Ge&&xe===Ue?At({},xe):xe};function ut(Ee,ge,Ge,Ue,xe){return{x:_e(Ee),y:_e(ge),zoom:1/0,id:Ge,parentId:-1,numPoints:Ue,properties:xe}}function zt(Ee,ge){var Ge=Ee.geometry.coordinates,Ue=Ge[0],xe=Ge[1];return{x:_e(W(Ue)),y:_e(le(xe)),zoom:1/0,index:ge,parentId:-1}}function P(Ee){return{type:"Feature",id:Ee.id,properties:b(Ee),geometry:{type:"Point",coordinates:[be(Ee.x),Me(Ee.y)]}}}function b(Ee){var ge=Ee.numPoints,Ge=ge>=1e4?Math.round(ge/1e3)+"k":ge>=1e3?Math.round(ge/100)/10+"k":ge;return At(At({},Ee.properties),{cluster:!0,cluster_id:Ee.id,point_count:ge,point_count_abbreviated:Ge})}function W(Ee){return Ee/360+.5}function le(Ee){var ge=Math.sin(Ee*Math.PI/180),Ge=.5-.25*Math.log((1+ge)/(1-ge))/Math.PI;return Ge<0?0:Ge>1?1:Ge}function be(Ee){return(Ee-.5)*360}function Me(Ee){var ge=(180-Ee*360)*Math.PI/180;return 360*Math.atan(Math.exp(ge))/Math.PI-90}function At(Ee,ge){for(var Ge in ge)Ee[Ge]=ge[Ge];return Ee}function rt(Ee){return Ee.x}function Dt(Ee){return Ee.y}return ot})},47087:function(pn,Ot,nt){var kt=nt(3824).default;function gt(){"use strict";pn.exports=gt=function(){return k},pn.exports.__esModule=!0,pn.exports.default=pn.exports;var k={},Et=Object.prototype,K=Et.hasOwnProperty,yt=Object.defineProperty||function(ft,St,Y){ft[St]=Y.value},J=typeof Symbol=="function"?Symbol:{},pt=J.iterator||"@@iterator",et=J.asyncIterator||"@@asyncIterator",_e=J.toStringTag||"@@toStringTag";function ot(ft,St,Y){return Object.defineProperty(ft,St,{value:Y,enumerable:!0,configurable:!0,writable:!0}),ft[St]}try{ot({},"")}catch(ft){ot=function(Y,mt,se){return Y[mt]=se}}function ut(ft,St,Y,mt){var se=St&&St.prototype instanceof b?St:b,ke=Object.create(se.prototype),Le=new Ke(mt||[]);return yt(ke,"_invoke",{value:ge(ft,Y,Le)}),ke}function zt(ft,St,Y){try{return{type:"normal",arg:ft.call(St,Y)}}catch(mt){return{type:"throw",arg:mt}}}k.wrap=ut;var P={};function b(){}function W(){}function le(){}var be={};ot(be,pt,function(){return this});var Me=Object.getPrototypeOf,At=Me&&Me(Me(Lt([])));At&&At!==Et&&K.call(At,pt)&&(be=At);var rt=le.prototype=b.prototype=Object.create(be);function Dt(ft){["next","throw","return"].forEach(function(St){ot(ft,St,function(Y){return this._invoke(St,Y)})})}function Ee(ft,St){function Y(se,ke,Le,Be){var Bt=zt(ft[se],ft,ke);if(Bt.type!=="throw"){var ee=Bt.arg,me=ee.value;return me&&kt(me)=="object"&&K.call(me,"__await")?St.resolve(me.__await).then(function(Yt){Y("next",Yt,Le,Be)},function(Yt){Y("throw",Yt,Le,Be)}):St.resolve(me).then(function(Yt){ee.value=Yt,Le(ee)},function(Yt){return Y("throw",Yt,Le,Be)})}Be(Bt.arg)}var mt;yt(this,"_invoke",{value:function(ke,Le){function Be(){return new St(function(Bt,ee){Y(ke,Le,Bt,ee)})}return mt=mt?mt.then(Be,Be):Be()}})}function ge(ft,St,Y){var mt="suspendedStart";return function(se,ke){if(mt==="executing")throw new Error("Generator is already running");if(mt==="completed"){if(se==="throw")throw ke;return Jt()}for(Y.method=se,Y.arg=ke;;){var Le=Y.delegate;if(Le){var Be=Ge(Le,Y);if(Be){if(Be===P)continue;return Be}}if(Y.method==="next")Y.sent=Y._sent=Y.arg;else if(Y.method==="throw"){if(mt==="suspendedStart")throw mt="completed",Y.arg;Y.dispatchException(Y.arg)}else Y.method==="return"&&Y.abrupt("return",Y.arg);mt="executing";var Bt=zt(ft,St,Y);if(Bt.type==="normal"){if(mt=Y.done?"completed":"suspendedYield",Bt.arg===P)continue;return{value:Bt.arg,done:Y.done}}Bt.type==="throw"&&(mt="completed",Y.method="throw",Y.arg=Bt.arg)}}}function Ge(ft,St){var Y=St.method,mt=ft.iterator[Y];if(mt===void 0)return St.delegate=null,Y==="throw"&&ft.iterator.return&&(St.method="return",St.arg=void 0,Ge(ft,St),St.method==="throw")||Y!=="return"&&(St.method="throw",St.arg=new TypeError("The iterator does not provide a '"+Y+"' method")),P;var se=zt(mt,ft.iterator,St.arg);if(se.type==="throw")return St.method="throw",St.arg=se.arg,St.delegate=null,P;var ke=se.arg;return ke?ke.done?(St[ft.resultName]=ke.value,St.next=ft.nextLoc,St.method!=="return"&&(St.method="next",St.arg=void 0),St.delegate=null,P):ke:(St.method="throw",St.arg=new TypeError("iterator result is not an object"),St.delegate=null,P)}function Ue(ft){var St={tryLoc:ft[0]};1 in ft&&(St.catchLoc=ft[1]),2 in ft&&(St.finallyLoc=ft[2],St.afterLoc=ft[3]),this.tryEntries.push(St)}function xe(ft){var St=ft.completion||{};St.type="normal",delete St.arg,ft.completion=St}function Ke(ft){this.tryEntries=[{tryLoc:"root"}],ft.forEach(Ue,this),this.reset(!0)}function Lt(ft){if(ft){var St=ft[pt];if(St)return St.call(ft);if(typeof ft.next=="function")return ft;if(!isNaN(ft.length)){var Y=-1,mt=function se(){for(;++Y<ft.length;)if(K.call(ft,Y))return se.value=ft[Y],se.done=!1,se;return se.value=void 0,se.done=!0,se};return mt.next=mt}}return{next:Jt}}function Jt(){return{value:void 0,done:!0}}return W.prototype=le,yt(rt,"constructor",{value:le,configurable:!0}),yt(le,"constructor",{value:W,configurable:!0}),W.displayName=ot(le,_e,"GeneratorFunction"),k.isGeneratorFunction=function(ft){var St=typeof ft=="function"&&ft.constructor;return!!St&&(St===W||(St.displayName||St.name)==="GeneratorFunction")},k.mark=function(ft){return Object.setPrototypeOf?Object.setPrototypeOf(ft,le):(ft.__proto__=le,ot(ft,_e,"GeneratorFunction")),ft.prototype=Object.create(rt),ft},k.awrap=function(ft){return{__await:ft}},Dt(Ee.prototype),ot(Ee.prototype,et,function(){return this}),k.AsyncIterator=Ee,k.async=function(ft,St,Y,mt,se){se===void 0&&(se=Promise);var ke=new Ee(ut(ft,St,Y,mt),se);return k.isGeneratorFunction(St)?ke:ke.next().then(function(Le){return Le.done?Le.value:ke.next()})},Dt(rt),ot(rt,_e,"Generator"),ot(rt,pt,function(){return this}),ot(rt,"toString",function(){return"[object Generator]"}),k.keys=function(ft){var St=Object(ft),Y=[];for(var mt in St)Y.push(mt);return Y.reverse(),function se(){for(;Y.length;){var ke=Y.pop();if(ke in St)return se.value=ke,se.done=!1,se}return se.done=!0,se}},k.values=Lt,Ke.prototype={constructor:Ke,reset:function(St){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(xe),!St)for(var Y in this)Y.charAt(0)==="t"&&K.call(this,Y)&&!isNaN(+Y.slice(1))&&(this[Y]=void 0)},stop:function(){this.done=!0;var St=this.tryEntries[0].completion;if(St.type==="throw")throw St.arg;return this.rval},dispatchException:function(St){if(this.done)throw St;var Y=this;function mt(ee,me){return Le.type="throw",Le.arg=St,Y.next=ee,me&&(Y.method="next",Y.arg=void 0),!!me}for(var se=this.tryEntries.length-1;se>=0;--se){var ke=this.tryEntries[se],Le=ke.completion;if(ke.tryLoc==="root")return mt("end");if(ke.tryLoc<=this.prev){var Be=K.call(ke,"catchLoc"),Bt=K.call(ke,"finallyLoc");if(Be&&Bt){if(this.prev<ke.catchLoc)return mt(ke.catchLoc,!0);if(this.prev<ke.finallyLoc)return mt(ke.finallyLoc)}else if(Be){if(this.prev<ke.catchLoc)return mt(ke.catchLoc,!0)}else{if(!Bt)throw new Error("try statement without catch or finally");if(this.prev<ke.finallyLoc)return mt(ke.finallyLoc)}}}},abrupt:function(St,Y){for(var mt=this.tryEntries.length-1;mt>=0;--mt){var se=this.tryEntries[mt];if(se.tryLoc<=this.prev&&K.call(se,"finallyLoc")&&this.prev<se.finallyLoc){var ke=se;break}}ke&&(St==="break"||St==="continue")&&ke.tryLoc<=Y&&Y<=ke.finallyLoc&&(ke=null);var Le=ke?ke.completion:{};return Le.type=St,Le.arg=Y,ke?(this.method="next",this.next=ke.finallyLoc,P):this.complete(Le)},complete:function(St,Y){if(St.type==="throw")throw St.arg;return St.type==="break"||St.type==="continue"?this.next=St.arg:St.type==="return"?(this.rval=this.arg=St.arg,this.method="return",this.next="end"):St.type==="normal"&&Y&&(this.next=Y),P},finish:function(St){for(var Y=this.tryEntries.length-1;Y>=0;--Y){var mt=this.tryEntries[Y];if(mt.finallyLoc===St)return this.complete(mt.completion,mt.afterLoc),xe(mt),P}},catch:function(St){for(var Y=this.tryEntries.length-1;Y>=0;--Y){var mt=this.tryEntries[Y];if(mt.tryLoc===St){var se=mt.completion;if(se.type==="throw"){var ke=se.arg;xe(mt)}return ke}}throw new Error("illegal catch attempt")},delegateYield:function(St,Y,mt){return this.delegate={iterator:Lt(St),resultName:Y,nextLoc:mt},this.method==="next"&&(this.arg=void 0),P}},k}pn.exports=gt,pn.exports.__esModule=!0,pn.exports.default=pn.exports},34001:function(pn,Ot,nt){var kt=nt(47087)();pn.exports=kt;try{regeneratorRuntime=kt}catch(gt){typeof globalThis=="object"?globalThis.regeneratorRuntime=kt:Function("r","regeneratorRuntime = r")(kt)}},39588:function(pn,Ot){"use strict";var nt=Array.isArray;Ot.Z=nt}}]);
|