Socket
Socket
Sign inDemoInstall

@carto/airship-bridge

Package Overview
Dependencies
Maintainers
17
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@carto/airship-bridge - npm Package Compare versions

Comparing version 2.1.0-rc.2 to 2.1.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

<a name="2.1.0"></a>
# [2.1.0](https://github.com/CartoDB/airship/compare/v2.0.5...v2.1.0) (2019-06-18)
### Features
* **components:** Legends components ([#622](https://github.com/CartoDB/airship/issues/622)) ([4c31563](https://github.com/CartoDB/airship/commit/4c31563)), closes [#583](https://github.com/CartoDB/airship/issues/583) [#584](https://github.com/CartoDB/airship/issues/584) [#585](https://github.com/CartoDB/airship/issues/585) [#586](https://github.com/CartoDB/airship/issues/586) [#587](https://github.com/CartoDB/airship/issues/587) [#588](https://github.com/CartoDB/airship/issues/588) [#589](https://github.com/CartoDB/airship/issues/589)
<a name="2.0.7"></a>

@@ -8,0 +19,0 @@ ## [2.0.7](https://github.com/CartoDB/airship/compare/v2.0.6...v2.0.7) (2019-06-13)

2

dist/asbridge.min.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AsBridge=e():t.AsBridge=e()}(window,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e,r){(function(r){var n;e=t.exports=Z,n="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var i=256,o=Number.MAX_SAFE_INTEGER||9007199254740991,a=e.re=[],s=e.src=[],u=0,l=u++;s[l]="0|[1-9]\\d*";var c=u++;s[c]="[0-9]+";var p=u++;s[p]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var h=u++;s[h]="("+s[l]+")\\.("+s[l]+")\\.("+s[l]+")";var f=u++;s[f]="("+s[c]+")\\.("+s[c]+")\\.("+s[c]+")";var m=u++;s[m]="(?:"+s[l]+"|"+s[p]+")";var d=u++;s[d]="(?:"+s[c]+"|"+s[p]+")";var v=u++;s[v]="(?:-("+s[m]+"(?:\\."+s[m]+")*))";var _=u++;s[_]="(?:-?("+s[d]+"(?:\\."+s[d]+")*))";var g=u++;s[g]="[0-9A-Za-z-]+";var y=u++;s[y]="(?:\\+("+s[g]+"(?:\\."+s[g]+")*))";var b=u++,w="v?"+s[h]+s[v]+"?"+s[y]+"?";s[b]="^"+w+"$";var x="[v=\\s]*"+s[f]+s[_]+"?"+s[y]+"?",L=u++;s[L]="^"+x+"$";var j=u++;s[j]="((?:<|>)?=?)";var O=u++;s[O]=s[c]+"|x|X|\\*";var E=u++;s[E]=s[l]+"|x|X|\\*";var k=u++;s[k]="[v=\\s]*("+s[E]+")(?:\\.("+s[E]+")(?:\\.("+s[E]+")(?:"+s[v]+")?"+s[y]+"?)?)?";var P=u++;s[P]="[v=\\s]*("+s[O]+")(?:\\.("+s[O]+")(?:\\.("+s[O]+")(?:"+s[_]+")?"+s[y]+"?)?)?";var T=u++;s[T]="^"+s[j]+"\\s*"+s[k]+"$";var C=u++;s[C]="^"+s[j]+"\\s*"+s[P]+"$";var z=u++;s[z]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var S=u++;s[S]="(?:~>?)";var H=u++;s[H]="(\\s*)"+s[S]+"\\s+",a[H]=new RegExp(s[H],"g");var N=u++;s[N]="^"+s[S]+s[k]+"$";var D=u++;s[D]="^"+s[S]+s[P]+"$";var R=u++;s[R]="(?:\\^)";var A=u++;s[A]="(\\s*)"+s[R]+"\\s+",a[A]=new RegExp(s[A],"g");var F=u++;s[F]="^"+s[R]+s[k]+"$";var V=u++;s[V]="^"+s[R]+s[P]+"$";var $=u++;s[$]="^"+s[j]+"\\s*("+x+")$|^$";var M=u++;s[M]="^"+s[j]+"\\s*("+w+")$|^$";var I=u++;s[I]="(\\s*)"+s[j]+"\\s*("+x+"|"+s[k]+")",a[I]=new RegExp(s[I],"g");var B=u++;s[B]="^\\s*("+s[k]+")\\s+-\\s+("+s[k]+")\\s*$";var q=u++;s[q]="^\\s*("+s[P]+")\\s+-\\s+("+s[P]+")\\s*$";var U=u++;s[U]="(<|>)?=?\\s*\\*";for(var X=0;X<35;X++)n(X,s[X]),a[X]||(a[X]=new RegExp(s[X]));function G(t,e){if(t instanceof Z)return t;if("string"!=typeof t)return null;if(t.length>i)return null;if(!(e?a[L]:a[b]).test(t))return null;try{return new Z(t,e)}catch(t){return null}}function Z(t,e){if(t instanceof Z){if(t.loose===e)return t;t=t.version}else if("string"!=typeof t)throw new TypeError("Invalid Version: "+t);if(t.length>i)throw new TypeError("version is longer than "+i+" characters");if(!(this instanceof Z))return new Z(t,e);n("SemVer",t,e),this.loose=e;var r=t.trim().match(e?a[L]:a[b]);if(!r)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(t){if(/^[0-9]+$/.test(t)){var e=+t;if(e>=0&&e<o)return e}return t}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}e.parse=G,e.valid=function(t,e){var r=G(t,e);return r?r.version:null},e.clean=function(t,e){var r=G(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},e.SemVer=Z,Z.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},Z.prototype.toString=function(){return this.version},Z.prototype.compare=function(t){return n("SemVer.compare",this.version,this.loose,t),t instanceof Z||(t=new Z(t,this.loose)),this.compareMain(t)||this.comparePre(t)},Z.prototype.compareMain=function(t){return t instanceof Z||(t=new Z(t,this.loose)),J(this.major,t.major)||J(this.minor,t.minor)||J(this.patch,t.patch)},Z.prototype.comparePre=function(t){if(t instanceof Z||(t=new Z(t,this.loose)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var e=0;do{var r=this.prerelease[e],i=t.prerelease[e];if(n("prerelease compare",e,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return J(r,i)}while(++e)},Z.prototype.inc=function(t,e){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e),this.inc("pre",e);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: "+t)}return this.format(),this.raw=this.version,this},e.inc=function(t,e,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new Z(t,r).inc(e,n).version}catch(t){return null}},e.diff=function(t,e){if(tt(t,e))return null;var r=G(t),n=G(e);if(r.prerelease.length||n.prerelease.length){for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return"pre"+i;return"prerelease"}for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return i},e.compareIdentifiers=J;var W=/^[0-9]+$/;function J(t,e){var r=W.test(t),n=W.test(e);return r&&n&&(t=+t,e=+e),r&&!n?-1:n&&!r?1:t<e?-1:t>e?1:0}function K(t,e,r){return new Z(t,r).compare(new Z(e,r))}function Q(t,e,r){return K(t,e,r)>0}function Y(t,e,r){return K(t,e,r)<0}function tt(t,e,r){return 0===K(t,e,r)}function et(t,e,r){return 0!==K(t,e,r)}function rt(t,e,r){return K(t,e,r)>=0}function nt(t,e,r){return K(t,e,r)<=0}function it(t,e,r,n){var i;switch(e){case"===":"object"==typeof t&&(t=t.version),"object"==typeof r&&(r=r.version),i=t===r;break;case"!==":"object"==typeof t&&(t=t.version),"object"==typeof r&&(r=r.version),i=t!==r;break;case"":case"=":case"==":i=tt(t,r,n);break;case"!=":i=et(t,r,n);break;case">":i=Q(t,r,n);break;case">=":i=rt(t,r,n);break;case"<":i=Y(t,r,n);break;case"<=":i=nt(t,r,n);break;default:throw new TypeError("Invalid operator: "+e)}return i}function ot(t,e){if(t instanceof ot){if(t.loose===e)return t;t=t.value}if(!(this instanceof ot))return new ot(t,e);n("comparator",t,e),this.loose=e,this.parse(t),this.semver===at?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(t,e){return J(e,t)},e.major=function(t,e){return new Z(t,e).major},e.minor=function(t,e){return new Z(t,e).minor},e.patch=function(t,e){return new Z(t,e).patch},e.compare=K,e.compareLoose=function(t,e){return K(t,e,!0)},e.rcompare=function(t,e,r){return K(e,t,r)},e.sort=function(t,r){return t.sort(function(t,n){return e.compare(t,n,r)})},e.rsort=function(t,r){return t.sort(function(t,n){return e.rcompare(t,n,r)})},e.gt=Q,e.lt=Y,e.eq=tt,e.neq=et,e.gte=rt,e.lte=nt,e.cmp=it,e.Comparator=ot;var at={};function st(t,e){if(t instanceof st)return t.loose===e?t:new st(t.raw,e);if(t instanceof ot)return new st(t.value,e);if(!(this instanceof st))return new st(t,e);if(this.loose=e,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map(function(t){return this.parseRange(t.trim())},this).filter(function(t){return t.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+t);this.format()}function ut(t){return!t||"x"===t.toLowerCase()||"*"===t}function lt(t,e,r,n,i,o,a,s,u,l,c,p,h){return((e=ut(r)?"":ut(n)?">="+r+".0.0":ut(i)?">="+r+"."+n+".0":">="+e)+" "+(s=ut(u)?"":ut(l)?"<"+(+u+1)+".0.0":ut(c)?"<"+u+"."+(+l+1)+".0":p?"<="+u+"."+l+"."+c+"-"+p:"<="+s)).trim()}function ct(t,e){for(var r=0;r<t.length;r++)if(!t[r].test(e))return!1;if(e.prerelease.length){for(r=0;r<t.length;r++)if(n(t[r].semver),t[r].semver!==at&&t[r].semver.prerelease.length>0){var i=t[r].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}function pt(t,e,r){try{e=new st(e,r)}catch(t){return!1}return e.test(t)}function ht(t,e,r,n){var i,o,a,s,u;switch(t=new Z(t,n),e=new st(e,n),r){case">":i=Q,o=nt,a=Y,s=">",u=">=";break;case"<":i=Y,o=rt,a=Q,s="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(pt(t,e,n))return!1;for(var l=0;l<e.set.length;++l){var c=e.set[l],p=null,h=null;if(c.forEach(function(t){t.semver===at&&(t=new ot(">=0.0.0")),p=p||t,h=h||t,i(t.semver,p.semver,n)?p=t:a(t.semver,h.semver,n)&&(h=t)}),p.operator===s||p.operator===u)return!1;if((!h.operator||h.operator===s)&&o(t,h.semver))return!1;if(h.operator===u&&a(t,h.semver))return!1}return!0}ot.prototype.parse=function(t){var e=this.loose?a[$]:a[M],r=t.match(e);if(!r)throw new TypeError("Invalid comparator: "+t);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new Z(r[2],this.loose):this.semver=at},ot.prototype.toString=function(){return this.value},ot.prototype.test=function(t){return n("Comparator.test",t,this.loose),this.semver===at||("string"==typeof t&&(t=new Z(t,this.loose)),it(t,this.operator,this.semver,this.loose))},ot.prototype.intersects=function(t,e){if(!(t instanceof ot))throw new TypeError("a Comparator is required");var r;if(""===this.operator)return r=new st(t.value,e),pt(this.value,r,e);if(""===t.operator)return r=new st(this.value,e),pt(t.semver,r,e);var n=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),o=this.semver.version===t.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),s=it(this.semver,"<",t.semver,e)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),u=it(this.semver,">",t.semver,e)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return n||i||o&&a||s||u},e.Range=st,st.prototype.format=function(){return this.range=this.set.map(function(t){return t.join(" ").trim()}).join("||").trim(),this.range},st.prototype.toString=function(){return this.range},st.prototype.parseRange=function(t){var e=this.loose;t=t.trim(),n("range",t,e);var r=e?a[q]:a[B];t=t.replace(r,lt),n("hyphen replace",t),t=t.replace(a[I],"$1$2$3"),n("comparator trim",t,a[I]),t=(t=(t=t.replace(a[H],"$1~")).replace(a[A],"$1^")).split(/\s+/).join(" ");var i=e?a[$]:a[M],o=t.split(" ").map(function(t){return function(t,e){return n("comp",t),t=function(t,e){return t.trim().split(/\s+/).map(function(t){return function(t,e){n("caret",t,e);var r=e?a[V]:a[F];return t.replace(r,function(e,r,i,o,a){var s;return n("caret",t,e,r,i,o,a),ut(r)?s="":ut(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":ut(o)?s="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":a?(n("replaceCaret pr",a),"-"!==a.charAt(0)&&(a="-"+a),s="0"===r?"0"===i?">="+r+"."+i+"."+o+a+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+a+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+a+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",s),s})}(t,e)}).join(" ")}(t,e),n("caret",t),t=function(t,e){return t.trim().split(/\s+/).map(function(t){return function(t,e){var r=e?a[D]:a[N];return t.replace(r,function(e,r,i,o,a){var s;return n("tilde",t,e,r,i,o,a),ut(r)?s="":ut(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":ut(o)?s=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":a?(n("replaceTilde pr",a),"-"!==a.charAt(0)&&(a="-"+a),s=">="+r+"."+i+"."+o+a+" <"+r+"."+(+i+1)+".0"):s=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",s),s})}(t,e)}).join(" ")}(t,e),n("tildes",t),t=function(t,e){return n("replaceXRanges",t,e),t.split(/\s+/).map(function(t){return function(t,e){t=t.trim();var r=e?a[C]:a[T];return t.replace(r,function(e,r,i,o,a,s){n("xRange",t,e,r,i,o,a,s);var u=ut(i),l=u||ut(o),c=l||ut(a),p=c;return"="===r&&p&&(r=""),u?e=">"===r||"<"===r?"<0.0.0":"*":r&&p?(l&&(o=0),c&&(a=0),">"===r?(r=">=",l?(i=+i+1,o=0,a=0):c&&(o=+o+1,a=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),e=r+i+"."+o+"."+a):l?e=">="+i+".0.0 <"+(+i+1)+".0.0":c&&(e=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",e),e})}(t,e)}).join(" ")}(t,e),n("xrange",t),t=function(t,e){return n("replaceStars",t,e),t.trim().replace(a[U],"")}(t,e),n("stars",t),t}(t,e)}).join(" ").split(/\s+/);return this.loose&&(o=o.filter(function(t){return!!t.match(i)})),o=o.map(function(t){return new ot(t,e)})},st.prototype.intersects=function(t,e){if(!(t instanceof st))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(r){return t.set.some(function(t){return t.every(function(t){return r.intersects(t,e)})})})})},e.toComparators=function(t,e){return new st(t,e).set.map(function(t){return t.map(function(t){return t.value}).join(" ").trim().split(" ")})},st.prototype.test=function(t){if(!t)return!1;"string"==typeof t&&(t=new Z(t,this.loose));for(var e=0;e<this.set.length;e++)if(ct(this.set[e],t))return!0;return!1},e.satisfies=pt,e.maxSatisfying=function(t,e,r){var n=null,i=null;try{var o=new st(e,r)}catch(t){return null}return t.forEach(function(t){o.test(t)&&(n&&-1!==i.compare(t)||(i=new Z(n=t,r)))}),n},e.minSatisfying=function(t,e,r){var n=null,i=null;try{var o=new st(e,r)}catch(t){return null}return t.forEach(function(t){o.test(t)&&(n&&1!==i.compare(t)||(i=new Z(n=t,r)))}),n},e.validRange=function(t,e){try{return new st(t,e).range||"*"}catch(t){return null}},e.ltr=function(t,e,r){return ht(t,e,"<",r)},e.gtr=function(t,e,r){return ht(t,e,">",r)},e.outside=ht,e.prerelease=function(t,e){var r=G(t,e);return r&&r.prerelease.length?r.prerelease:null},e.intersects=function(t,e,r){return t=new st(t,r),e=new st(e,r),t.intersects(e)},e.coerce=function(t){if(t instanceof Z)return t;if("string"!=typeof t)return null;var e=t.match(a[z]);return null==e?null:G((e[1]||"0")+"."+(e[2]||"0")+"."+(e[3]||"0"))}}).call(this,r(1))},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,l=[],c=!1,p=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):p=-1,l.length&&f())}function f(){if(!c){var t=s(h);c=!0;for(var e=l.length;e;){for(u=l,l=[];++p<e;)u&&u[p].run();p=-1,e=l.length}u=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function m(t,e){this.fun=t,this.array=e}function d(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new m(t,e)),1!==l.length||c||s(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.prependListener=d,i.prependOnceListener=d,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){"use strict";function n(t){return"string"==typeof t?document.querySelector(t):t}function i(t){return"string"==typeof t?t:t.propertyName}function o(t){return"string"==typeof t?null:t}function a(t){return"#"+u(t.r)+u(t.g)+u(t.b)+u(Math.floor(255*t.a))}function s(t){return"rgba("+t.r+","+t.g+","+t.b+","+t.a+")"}function u(t){return isNaN(t)||void 0===t?"":t.toString(16).padStart(2,"0").toUpperCase()}function l(t,e,r){void 0===r&&(r=!1),r&&t.on("updated",function(){e(!1)}),t.viz?e(!0):t.on("loaded",function(){e(!0)})}r.r(e);var c=function(){return(c=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},p=16,h="#000";function f(t){var e=t.getLegendData(),r=Math.floor(e.data.length/2);return e.data[r].value}function m(t,e){var r=t[e];return"ramp"===r.expressionName||"opacity"===r.expressionName?s(f(r)):"color"===e||"strokeColor"===e?s(r.value):h}function d(t,e,r){var n=t[e];return"ramp"===n.expressionName?r||f(n):"number"===n.type?n.value:r}function v(t){var e=t.symbol;return"ramp"===e.expressionName?f(e):e.value}function _(t){var e=t.layer,r=t.props,n=e.viz;return n?c({color:m(n,"color"),label:r.label,marker:n.symbol.default?void 0:v(n),strokeColor:m(n,"strokeColor"),strokeStyle:0===d(n,"strokeWidth")?"hidden":void 0,type:e.metadata.geomType,width:d(n,"width",p)},r):{}}function g(t){return t.props?t:{layer:t,props:{label:t.id}}}var y=function(){function t(){}return t.layersLegend=function(t,e,r){void 0===r&&(r={}),t=n(t);var i=e.map(g);i.forEach(function(e,n,o){l(e.layer,function(){var e=i.map(_);r.format&&(e.label=r.format(e.label,n,o)),t.data=e,r.onLoad&&setTimeout(r.onLoad,0)},r.dynamic)})},t.rampLegend=function(t,e,r,i){void 0===i&&(i={}),t=n(t);var o=g(e);l(o.layer,function(){var e=_(o),n=o.layer.viz[r],s=i.config,u=o.layer.viz[r].getLegendData(s).data,l=u.map(function(t,o,s){var u,l,p,h,f;return c({},e,((u={})[r]=function(t,e){return"color"===t.type?a(e):e}(n,t.value),u.label=i.format?i.format(t.key,o,s):(l=t.key,Array.isArray(l)?(h=(p=l)[0],f=p[1],h===-1/0?"< "+f.toFixed(2):f===1/0?"> "+h.toFixed(2):h.toFixed(2)+" - "+f.toFixed(2)):l.toFixed?l.toFixed(2):l),u))});Array.isArray(o.props)&&o.props.length===u.length?t.data=l.map(function(t,e){return c({},t,o.props[e])}):t.data=l,i.onLoad&&setTimeout(i.onLoad,0)},i.dynamic)},t}(),b=r(0),w=r.n(b);var x=function(t){return t=t||Object.create(null),{on:function(e,r){(t[e]||(t[e]=[])).push(r)},off:function(e,r){t[e]&&t[e].splice(t[e].indexOf(r)>>>0,1)},emit:function(e,r){(t[e]||[]).slice().map(function(t){t(r)}),(t["*"]||[]).slice().map(function(t){t(e,r)})}}},L=function(){function t(e,r,n,i,o){void 0===o&&(o=!0),this._emitter=new x,this._name="asbind_"+e+"_"+r+"_"+t._counter,this._column=r,this._layer=n,this._source=i,this._readOnly=o,t._counter++,this._loadLegendData=this._loadLegendData.bind(this)}return Object.defineProperty(t.prototype,"globalExpression",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"column",{get:function(){return this._column},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnPropName",{get:function(){return this._name+"_col"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"readOnly",{get:function(){return this._readOnly},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layer",{get:function(){return this._layer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this._source},enumerable:!0,configurable:!0}),t.prototype.on=function(t,e){this._emitter.on(t,e)},t.prototype.setLegendData=function(t){this._legendData=t.data},t.prototype.enableColorMapping=function(){this._mapColors=!0,this._layer.viz?this._loadLegendData():this._layer.on("loaded",this._loadLegendData)},t.prototype._filterChanged=function(){this._emitter.emit("filterChanged",this._name)},t.prototype._loadLegendData=function(){var t=this._layer.viz.color;t.getLegendData&&this.setLegendData(t.getLegendData(this._getLegendConfig()))},t.prototype._getLegendConfig=function(){},t._counter=0,t}();function j(t,e){return E(t.value,e.value,k)}function O(t,e){return E(t.value,e.value,P)}function E(t,e,r){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(r(t[n],e[n]))return!1;return!0}function k(t,e){return t.x[0]!==e.x[0]||t.x[1]!==e.x[1]||t.y!==e.y}function P(t,e){return t.x!==e.x||t.y!==e.y}function T(t){return t.value.map(function(t){return{end:t.x[1],start:t.x[0],value:t.y}})}function C(t,e){return t.value.map(function(t){return{category:t.x,color:z(t.x,e),end:void 0,start:void 0,value:t.y}})}function z(t,e){if(e){var r=e.find(function(e){return e.key===t});return r?function(t){return"string"==typeof t?t:a(t)}(r.value):void 0}}var S,H=function(t,e){return t.value.map(function(t){return{color:z(t.x,e),name:t.x,value:t.y}})},N=(S=function(t,e){return(S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),D=function(t){function e(e,r,i,o,a,s,u,l){void 0===s&&(s=!0);var c=t.call(this,"category",o,r,a,s)||this;return c._selection=[],c._lastHistogram=null,c._button=null,c._widget=n(i),c._carto=e,c._button=n(u),c._expression=l,c._widget.disableInteractivity=s,c._widget.showClearButton=!s,c.selectionChanged=c.selectionChanged.bind(c),s||(c._widget.addEventListener("categoriesSelected",c.selectionChanged),c._button&&c._button.addEventListener&&c._button.addEventListener("click",function(){c._filterChanged()})),c}return N(e,t),e.prototype.setDataLayer=function(t){var e=this;this._dataLayer=t,this._dataLayer.on("updated",function(){var t=e._dataLayer.viz.variables[e.name];t&&(null!==e._lastHistogram&&O(e._lastHistogram,t)||(e._lastHistogram={value:t.value},e._widget.categories=H(t,e._legendData)))})},Object.defineProperty(e.prototype,"filter",{get:function(){return 0===this._selection.length?null:"@"+this.columnPropName+" in ["+this._selection.map(function(t){return"'"+t+"'"}).join(",")+"]"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){var t=this._carto.expressions;return t.viewportHistogram(this._expression?this._expression:t.prop(this._column))},enumerable:!0,configurable:!0}),e.prototype.selectionChanged=function(t){this._selection=t.detail,0!==this._selection.length&&this._button||this._filterChanged()},e}(L),R=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),A=function(t){function e(e,r,i,o,a,s,u,l,c){void 0===u&&(u=!0),void 0===l&&(l=!1),void 0===c&&(c=null);var p=t.call(this,"histogram_"+e,a,i,s,u)||this;return p._selection=null,p._inputExpression=null,p._totals=!1,p._widget=n(o),p._carto=r,p._totals=l,p._widget.disableInteractivity=u,p._widget.showClear=!u,p._inputExpression=c,p.selectionChanged=p.selectionChanged.bind(p),u||p._widget.addEventListener("selectionChanged",p.selectionChanged),p}return R(e,t),e.prototype.removeHistogramLayer=function(){this._layer.remove()},e.prototype.setDataLayer=function(t){this._dataLayer=t,this.bindDataLayer()},e.prototype._getLegendConfig=function(){return{samples:this._buckets}},e}(L),F=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),V=function(t){function e(e,r,n,i,o,a,s,u){void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===u&&(u=null);var l=t.call(this,"categorical",e,r,n,i,o,a,s,u)||this;return l._lastHistogram=null,l}return F(e,t),Object.defineProperty(e.prototype,"filter",{get:function(){return null===this._selection?null:"@"+this.columnPropName+" in ["+this._selection.map(function(t){return"'"+t+"'"}).join(",")+"]"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){var t=this._carto.expressions;return t.viewportHistogram(this._inputExpression?this._inputExpression:t.prop(this._column))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalExpression",{get:function(){if(!this._totals)return null;var t=this._carto.expressions;return t.globalHistogram(this._inputExpression?this._inputExpression:t.prop(this._column))},enumerable:!0,configurable:!0}),e.prototype.bindDataLayer=function(){var t=this;this._dataLayer.on("updated",function(){t._totals&&!t._globalHistogram&&(t._globalHistogram=t._dataLayer.viz.variables[t.name+"_global"],t._widget.backgroundData=C(t._globalHistogram));var e=t._dataLayer.viz.variables[t.name];if(e&&(null===t._lastHistogram||!O(t._lastHistogram,e)))if(t._lastHistogram={value:e.value},t._globalHistogram){var r=t._globalHistogram.value.map(function(t){var r=e.value.find(function(e){return e.x===t.x});return{x:t.x,y:r?r.y:0}});t._widget.data=C({value:r},t._legendData)}else t._widget.data=C(e,t._legendData)})},e.prototype.selectionChanged=function(t){if(null===t.detail)this._selection=null;else{var e=t.detail.selection;this._selection=e.map(function(t){return t})}this._filterChanged()},e}(A),$=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),M=function(t){function e(e,r,n,i,o,a,s,u,l,c){void 0===o&&(o=20),void 0===u&&(u=!0),void 0===l&&(l=!1),void 0===c&&(c=null);var p=t.call(this,"numerical",e,r,n,i,a,u,l,c)||this;return p._lastHistogram=null,p._buckets=void 0!==s?s.length:o,p._bucketRanges=s,p}return $(e,t),Object.defineProperty(e.prototype,"filter",{get:function(){return null===this._selection||this._isTimeSeries?null:"(@"+this.columnPropName+" >= "+this._selection[0]+" and @"+this.columnPropName+" < "+this._selection[1]+")"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){if(this._totals&&!this._globalHistogram)return null;var t=this._carto.expressions;return t.viewportHistogram(this._inputExpression?this._inputExpression:t.prop(this._column),this._bucketArg())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalExpression",{get:function(){if(!this._totals)return null;var t=this._carto.expressions;return t.globalHistogram(this._inputExpression?this._inputExpression:t.prop(this._column),this._bucketArg())},enumerable:!0,configurable:!0}),e.prototype.setTimeSeries=function(t){this._isTimeSeries=t},e.prototype.enableColorMapping=function(){throw new Error("Unsupported for numerical histograms")},e.prototype.setLegendData=function(){throw new Error("Unsupported for numerical histograms")},e.prototype.bindDataLayer=function(){var t=this;this._dataLayer.on("updated",function(){t._totals&&!t._globalHistogram&&(t._globalHistogram=t._dataLayer.viz.variables[t.name+"_global"],t._globalHistogram&&(t._bucketRanges=t._globalHistogram.value.map(function(t){return[t.x[0],t.x[1]]}),t._emitter.emit("expressionReady",{name:t.name,expression:t.expression})),t._widget.backgroundData=T(t._globalHistogram));var e=t._dataLayer.viz.variables[t.name];e&&(null===e.value||null!==t._lastHistogram&&j(t._lastHistogram,e)||(t._emitter.emit("rangeChanged",[e.value[0].x[0],e.value[e.value.length-1].x[1]]),t._lastHistogram={value:e.value},t._widget.data=T(e)))})},e.prototype.selectionChanged=function(t){if(null===t.detail)this._selection=null;else{var e=this._isTimeSeries?t.detail:t.detail.selection;this._selection=[Number(e[0]),Number(e[1])]}this._emitter.emit("rangeChanged",this._selection),this._filterChanged()},e.prototype._bucketArg=function(){return void 0!==this._bucketRanges?this._bucketRanges:this._buckets},e}(A),I=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),B=function(t){function e(e,r,i,o,a){var s=t.call(this,"global_range",o,r,a,!1)||this;return s._value=null,s._widget=n(i),s._carto=e,s._widget.addEventListener("change",function(t){s._value=t.detail,s._filterChanged()}),s}return I(e,t),e.prototype.setDataLayer=function(t){var e=this;this._dataLayer=t,this._dataLayer.on("updated",function(){var t=e._dataLayer.viz.variables[e.name];t&&!e._populated&&(e._widget.minValue=t.value[0],e._widget.maxValue=t.value[1],e._widget.range=t.value,e._populated=!0)})},Object.defineProperty(e.prototype,"filter",{get:function(){return null===this._value?null:"@"+this.columnPropName+" > "+this._value[0]+" and @"+this.columnPropName+" < "+this._value[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expression",{get:function(){var t=this._carto.expressions;return t.list([t.globalMin(t.prop(this._column)),t.globalMax(t.prop(this._column))])},enumerable:!0,configurable:!0}),e}(L),q=function(){function t(t,e,r,i,o,a,s,u){var l=this;void 0===a&&(a=10),void 0===s&&(s=[.15,.15]),void 0===u&&(u="animation"),this._timeSeries=n(i),this._layer=e,this._carto=t,this._columnName=r,this._duration=a,this._fade=s,this._variableName=u,e.viz?(this._onLayerLoaded(),o()):e.on("loaded",function(){l._onLayerLoaded(),o()})}return t.prototype.removeHistogramLayer=function(){this._dataLayer.remove()},t.prototype.setRange=function(t){if(this._animation&&this._animation.input&&this._animation.input.min&&this._animation.input.max)if(null===t)this._animation.input.min.blendTo(this._min,0),this._animation.input.max.blendTo(this._max,0),this._animation.duration.blendTo(this._duration,0);else if(t[0]!==t[1]){var e=Math.min(1,(t[1]-t[0])/(this._max.value-this._min.value));this._animation.input.min.blendTo(t[0],0),this._animation.input.max.blendTo(t[1],0),this._animation.duration.blendTo(this._duration*e,0)}},Object.defineProperty(t.prototype,"variableName",{get:function(){return this._variableName},enumerable:!0,configurable:!0}),t.prototype.setDuration=function(t){this._duration=t,this._animation.duration.blendTo(t,0)},Object.defineProperty(t.prototype,"animation",{get:function(){return this._animation},enumerable:!0,configurable:!0}),t.prototype._onLayerLoaded=function(){var t=this;this._viz=this._layer.viz,this._viz.variables[this._variableName]?this._animation=this._viz.variables[this._variableName]:(this._animation=this._createAnimation(),this._animation.parent=this._viz,this._animation.notify=this._viz._changed.bind(this._viz),this._viz.variables[this._variableName]=this._animation),this._max=this._animation.input.max,this._min=this._animation.input.min,this._duration=this._animation.duration.value,this._layer.on("updated",function(){t._timeSeries.progress=100*t._animation.getProgressPct(),t._timeSeries.playing=t._animation.isPlaying()}),this._timeSeries.animated=!0,this._timeSeries.addEventListener("seek",function(e){t._animation.setProgressPct(e.detail/100),t._timeSeries.progress=e.detail}),this._timeSeries.addEventListener("play",function(){t._animation.play()}),this._timeSeries.addEventListener("pause",function(){t._animation.pause()})},t.prototype._createAnimation=function(){var t=this._carto.expressions;return t.animation(t.linear(t.prop(this._columnName),t.globalMin(t.prop(this._columnName)),t.globalMax(t.prop(this._columnName))),this._duration,t.fade(this._fade[0],this._fade[1]))},t}(),U="^1.2.3",X=function(){function t(t){var e=t.carto,r=t.map,n=t.layer,i=t.source;if(this._vizFilters=[],this._carto=e,this._map=r,this._layer=n,this._source=i,this._id=this._layer.id,this._rebuildFilters=this._rebuildFilters.bind(this),this._updateDataLayerVariables=this._updateDataLayerVariables.bind(this),!this._carto.expressions.globalHistogram)throw new Error("Provided VL version "+this._carto.version+" lacks globalHistogram support.");if(!w.a.satisfies(this._carto.version,U))throw new Error("Provided VL version "+this._carto.version+" not supported. Must satisfy "+U)}return t.prototype.numericalHistogram=function(t,e,r){void 0===r&&(r={});var n=r.buckets,a=r.bucketRanges,s=r.readOnly,u=r.totals,l=i(e),c=o(e),p=new M(this._carto,this._layer,t,l,n,this._source,a,s,u,c);return this._addFilter(p),p},t.prototype.categoricalHistogram=function(t,e,r){void 0===r&&(r={});var n=r.readOnly,a=r.totals,s=i(e),u=o(e),l=new V(this._carto,this._layer,t,s,this._source,n,a,u);return this._addFilter(l),l},t.prototype.histogram=function(t,e,r){void 0===r&&(r={});var n=r.buckets,i=r.bucketRanges,o=r.readOnly,a=r.totals;if(void 0===n&&void 0===i){var s=t;return this.categoricalHistogram(s,e,{readOnly:o,totals:a})}return this.numericalHistogram(t,e,{readOnly:o,buckets:n,bucketRanges:i,totals:a})},t.prototype.category=function(t,e,r){void 0===r&&(r={});var n=r.readOnly,a=r.button,s=i(e),u=o(e),l=new D(this._carto,this._layer,t,s,this._source,n,a,u);return this._addFilter(l),l},t.prototype.timeSeries=function(t,e,r){var n=this;if(void 0===r&&(r={}),this._animation)throw new Error("There can only be one animation");var i=r.buckets,o=r.bucketRanges,a=r.readOnly,s=r.totals,u=r.duration,l=r.fade,c=r.variableName;this._animation=new q(this._carto,this._layer,e,t,function(){n._rebuildFilters()},u,l,c);var p=this.numericalHistogram(t,e,{bucketRanges:o,buckets:i,readOnly:a,totals:s});return p.setTimeSeries(!0),p.on("rangeChanged",function(t){n._animation.setRange(t)}),this._animation},t.prototype.globalRange=function(t,e){var r=new B(this._carto,this._layer,t,e,this._source);return this._addFilter(r),r},t.prototype.build=function(){var t=this;if(0!==this._vizFilters.length){var e=function(){t._appendVariables(),t._buildDataLayer()};this._layer.viz?e():this._layer.on("loaded",e)}},t.prototype._addFilter=function(t){t.on("filterChanged",this._rebuildFilters),t.on("expressionReady",this._updateDataLayerVariables),this._vizFilters.push(t)},t.prototype._appendVariables=function(){var t=this,e=this._carto.expressions;this._vizFilters.forEach(function(r){return t._layer.viz.variables[r.columnPropName]=e.prop(r.column)})},t.prototype._buildDataLayer=function(){var t=this,e=this._getVariables(),r=this._carto.expressions,n=new this._carto.Viz({color:r.rgba(0,0,0,0),strokeWidth:0,variables:e});this._readOnlyLayer=new this._carto.Layer("asbind_ro_"+this._id,this._source,n),this._readOnlyLayer.addTo(this._map),this._vizFilters.forEach(function(e){return e.setDataLayer(t._readOnlyLayer)})},t.prototype._getVariables=function(){for(var t=void 0!==this._readOnlyLayer?this._readOnlyLayer.viz.variables:{},e=0,r=this._vizFilters;e<r.length;e++){var n=r[e],i=n.name;n.globalExpression&&(t[i+"_global"]=n.globalExpression),n.expression&&(t[i]=n.expression),t[n.columnPropName]=this._carto.expressions.prop(n.column)}return t},t.prototype._updateDataLayerVariables=function(t){this._readOnlyLayer.viz&&(this._readOnlyLayer.viz.variables[t.name]=t.expression)},t.prototype._rebuildFilters=function(){var t=this._combineFilters(this._vizFilters.filter(function(t){return null!==t.filter}).map(function(t){return t.filter}));this._readOnlyLayer&&this._readOnlyLayer.viz.filter.blendTo(t,0),this._animation&&(t="@"+this._animation.variableName+" and "+t),this._layer.viz.filter.blendTo(t,0)},t.prototype._combineFilters=function(t){return 0===t.length?"1":t.join(" and ")},t}();r.d(e,"VL",function(){return G}),r.d(e,"VLBridge",function(){return X});var G={Bridge:X,Legends:y}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AsBridge=t():e.AsBridge=t()}(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t,r){(function(r){var n;t=e.exports=Z,n="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var i=256,o=Number.MAX_SAFE_INTEGER||9007199254740991,a=t.re=[],s=t.src=[],u=0,l=u++;s[l]="0|[1-9]\\d*";var c=u++;s[c]="[0-9]+";var p=u++;s[p]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var h=u++;s[h]="("+s[l]+")\\.("+s[l]+")\\.("+s[l]+")";var f=u++;s[f]="("+s[c]+")\\.("+s[c]+")\\.("+s[c]+")";var d=u++;s[d]="(?:"+s[l]+"|"+s[p]+")";var m=u++;s[m]="(?:"+s[c]+"|"+s[p]+")";var v=u++;s[v]="(?:-("+s[d]+"(?:\\."+s[d]+")*))";var _=u++;s[_]="(?:-?("+s[m]+"(?:\\."+s[m]+")*))";var g=u++;s[g]="[0-9A-Za-z-]+";var y=u++;s[y]="(?:\\+("+s[g]+"(?:\\."+s[g]+")*))";var b=u++,w="v?"+s[h]+s[v]+"?"+s[y]+"?";s[b]="^"+w+"$";var x="[v=\\s]*"+s[f]+s[_]+"?"+s[y]+"?",L=u++;s[L]="^"+x+"$";var j=u++;s[j]="((?:<|>)?=?)";var O=u++;s[O]=s[c]+"|x|X|\\*";var E=u++;s[E]=s[l]+"|x|X|\\*";var P=u++;s[P]="[v=\\s]*("+s[E]+")(?:\\.("+s[E]+")(?:\\.("+s[E]+")(?:"+s[v]+")?"+s[y]+"?)?)?";var k=u++;s[k]="[v=\\s]*("+s[O]+")(?:\\.("+s[O]+")(?:\\.("+s[O]+")(?:"+s[_]+")?"+s[y]+"?)?)?";var T=u++;s[T]="^"+s[j]+"\\s*"+s[P]+"$";var C=u++;s[C]="^"+s[j]+"\\s*"+s[k]+"$";var z=u++;s[z]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var S=u++;s[S]="(?:~>?)";var H=u++;s[H]="(\\s*)"+s[S]+"\\s+",a[H]=new RegExp(s[H],"g");var N=u++;s[N]="^"+s[S]+s[P]+"$";var D=u++;s[D]="^"+s[S]+s[k]+"$";var R=u++;s[R]="(?:\\^)";var A=u++;s[A]="(\\s*)"+s[R]+"\\s+",a[A]=new RegExp(s[A],"g");var F=u++;s[F]="^"+s[R]+s[P]+"$";var V=u++;s[V]="^"+s[R]+s[k]+"$";var $=u++;s[$]="^"+s[j]+"\\s*("+x+")$|^$";var M=u++;s[M]="^"+s[j]+"\\s*("+w+")$|^$";var I=u++;s[I]="(\\s*)"+s[j]+"\\s*("+x+"|"+s[P]+")",a[I]=new RegExp(s[I],"g");var B=u++;s[B]="^\\s*("+s[P]+")\\s+-\\s+("+s[P]+")\\s*$";var q=u++;s[q]="^\\s*("+s[k]+")\\s+-\\s+("+s[k]+")\\s*$";var U=u++;s[U]="(<|>)?=?\\s*\\*";for(var X=0;X<35;X++)n(X,s[X]),a[X]||(a[X]=new RegExp(s[X]));function G(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof Z)return e;if("string"!=typeof e)return null;if(e.length>i)return null;if(!(t.loose?a[L]:a[b]).test(e))return null;try{return new Z(e,t)}catch(e){return null}}function Z(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof Z){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>i)throw new TypeError("version is longer than "+i+" characters");if(!(this instanceof Z))return new Z(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var r=e.trim().match(t.loose?a[L]:a[b]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<o)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}t.parse=G,t.valid=function(e,t){var r=G(e,t);return r?r.version:null},t.clean=function(e,t){var r=G(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},t.SemVer=Z,Z.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},Z.prototype.toString=function(){return this.version},Z.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof Z||(e=new Z(e,this.options)),this.compareMain(e)||this.comparePre(e)},Z.prototype.compareMain=function(e){return e instanceof Z||(e=new Z(e,this.options)),J(this.major,e.major)||J(this.minor,e.minor)||J(this.patch,e.patch)},Z.prototype.comparePre=function(e){if(e instanceof Z||(e=new Z(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return J(r,i)}while(++t)},Z.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new Z(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(ee(e,t))return null;var r=G(e),n=G(t);if(r.prerelease.length||n.prerelease.length){for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return"pre"+i;return"prerelease"}for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return i},t.compareIdentifiers=J;var W=/^[0-9]+$/;function J(e,t){var r=W.test(e),n=W.test(t);return r&&n&&(e=+e,t=+t),r&&!n?-1:n&&!r?1:e<t?-1:e>t?1:0}function K(e,t,r){return new Z(e,r).compare(new Z(t,r))}function Q(e,t,r){return K(e,t,r)>0}function Y(e,t,r){return K(e,t,r)<0}function ee(e,t,r){return 0===K(e,t,r)}function te(e,t,r){return 0!==K(e,t,r)}function re(e,t,r){return K(e,t,r)>=0}function ne(e,t,r){return K(e,t,r)<=0}function ie(e,t,r,n){var i;switch(t){case"===":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e===r;break;case"!==":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e!==r;break;case"":case"=":case"==":i=ee(e,r,n);break;case"!=":i=te(e,r,n);break;case">":i=Q(e,r,n);break;case">=":i=re(e,r,n);break;case"<":i=Y(e,r,n);break;case"<=":i=ne(e,r,n);break;default:throw new TypeError("Invalid operator: "+t)}return i}function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof oe))return new oe(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ae?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return J(t,e)},t.major=function(e,t){return new Z(e,t).major},t.minor=function(e,t){return new Z(e,t).minor},t.patch=function(e,t){return new Z(e,t).patch},t.compare=K,t.compareLoose=function(e,t){return K(e,t,!0)},t.rcompare=function(e,t,r){return K(t,e,r)},t.sort=function(e,r){return e.sort(function(e,n){return t.compare(e,n,r)})},t.rsort=function(e,r){return e.sort(function(e,n){return t.rcompare(e,n,r)})},t.gt=Q,t.lt=Y,t.eq=ee,t.neq=te,t.gte=re,t.lte=ne,t.cmp=ie,t.Comparator=oe;var ae={};function se(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new se(e.raw,t);if(e instanceof oe)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function ue(e){return!e||"x"===e.toLowerCase()||"*"===e}function le(e,t,r,n,i,o,a,s,u,l,c,p,h){return((t=ue(r)?"":ue(n)?">="+r+".0.0":ue(i)?">="+r+"."+n+".0":">="+t)+" "+(s=ue(u)?"":ue(l)?"<"+(+u+1)+".0.0":ue(c)?"<"+u+"."+(+l+1)+".0":p?"<="+u+"."+l+"."+c+"-"+p:"<="+s)).trim()}function ce(e,t,r){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(r||(r={}),t.prerelease.length&&!r.includePrerelease){for(i=0;i<e.length;i++)if(n(e[i].semver),e[i].semver!==ae&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function pe(e,t,r){try{t=new se(t,r)}catch(e){return!1}return t.test(e)}function he(e,t,r,n){var i,o,a,s,u;switch(e=new Z(e,n),t=new se(t,n),r){case">":i=Q,o=ne,a=Y,s=">",u=">=";break;case"<":i=Y,o=re,a=Q,s="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(pe(e,t,n))return!1;for(var l=0;l<t.set.length;++l){var c=t.set[l],p=null,h=null;if(c.forEach(function(e){e.semver===ae&&(e=new oe(">=0.0.0")),p=p||e,h=h||e,i(e.semver,p.semver,n)?p=e:a(e.semver,h.semver,n)&&(h=e)}),p.operator===s||p.operator===u)return!1;if((!h.operator||h.operator===s)&&o(e,h.semver))return!1;if(h.operator===u&&a(e,h.semver))return!1}return!0}oe.prototype.parse=function(e){var t=this.options.loose?a[$]:a[M],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new Z(r[2],this.options.loose):this.semver=ae},oe.prototype.toString=function(){return this.value},oe.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ae||("string"==typeof e&&(e=new Z(e,this.options)),ie(e,this.operator,this.semver,this.options))},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new se(e.value,t),pe(this.value,r,t);if(""===e.operator)return r=new se(this.value,t),pe(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=ie(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=ie(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||o&&a||s||u},t.Range=se,se.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?a[q]:a[B];e=e.replace(r,le),n("hyphen replace",e),e=e.replace(a[I],"$1$2$3"),n("comparator trim",e,a[I]),e=(e=(e=e.replace(a[H],"$1~")).replace(a[A],"$1^")).split(/\s+/).join(" ");var i=t?a[$]:a[M],o=e.split(" ").map(function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){n("caret",e,t),t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1});var r=t.loose?a[V]:a[F];return e.replace(r,function(t,r,i,o,a){var s;return n("caret",e,t,r,i,o,a),ue(r)?s="":ue(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":ue(o)?s="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":a?(n("replaceCaret pr",a),"-"!==a.charAt(0)&&(a="-"+a),s="0"===r?"0"===i?">="+r+"."+i+"."+o+a+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+a+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+a+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",s),s})}(e,t)}).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1});var r=t.loose?a[D]:a[N];return e.replace(r,function(t,r,i,o,a){var s;return n("tilde",e,t,r,i,o,a),ue(r)?s="":ue(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":ue(o)?s=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":a?(n("replaceTilde pr",a),"-"!==a.charAt(0)&&(a="-"+a),s=">="+r+"."+i+"."+o+a+" <"+r+"."+(+i+1)+".0"):s=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",s),s})}(e,t)}).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim(),t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1});var r=t.loose?a[C]:a[T];return e.replace(r,function(t,r,i,o,a,s){n("xRange",e,t,r,i,o,a,s);var u=ue(i),l=u||ue(o),c=l||ue(a),p=c;return"="===r&&p&&(r=""),u?t=">"===r||"<"===r?"<0.0.0":"*":r&&p?(l&&(o=0),c&&(a=0),">"===r?(r=">=",l?(i=+i+1,o=0,a=0):c&&(o=+o+1,a=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),t=r+i+"."+o+"."+a):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":c&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t})}(e,t)}).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(a[U],"")}(e,t),n("stars",e),e}(e,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter(function(e){return!!e.match(i)})),o=o.map(function(e){return new oe(e,this.options)},this)},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})},t.toComparators=function(e,t){return new se(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new Z(e,this.options));for(var t=0;t<this.set.length;t++)if(ce(this.set[t],e,this.options))return!0;return!1},t.satisfies=pe,t.maxSatisfying=function(e,t,r){var n=null,i=null;try{var o=new se(t,r)}catch(e){return null}return e.forEach(function(e){o.test(e)&&(n&&-1!==i.compare(e)||(i=new Z(n=e,r)))}),n},t.minSatisfying=function(e,t,r){var n=null,i=null;try{var o=new se(t,r)}catch(e){return null}return e.forEach(function(e){o.test(e)&&(n&&1!==i.compare(e)||(i=new Z(n=e,r)))}),n},t.validRange=function(e,t){try{return new se(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return he(e,t,"<",r)},t.gtr=function(e,t,r){return he(e,t,">",r)},t.outside=he,t.prerelease=function(e,t){var r=G(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new se(e,r),t=new se(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof Z)return e;if("string"!=typeof e)return null;var t=e.match(a[z]);return null==t?null:G((t[1]||"0")+"."+(t[2]||"0")+"."+(t[3]||"0"))}}).call(this,r(1))},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,l=[],c=!1,p=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):p=-1,l.length&&f())}function f(){if(!c){var e=s(h);c=!0;for(var t=l.length;t;){for(u=l,l=[];++p<t;)u&&u[p].run();p=-1,t=l.length}u=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new d(e,t)),1!==l.length||c||s(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){"use strict";function n(e){return"string"==typeof e?document.querySelector(e):e}function i(e){return"string"==typeof e?e:e.propertyName}function o(e){return"string"==typeof e?null:e}function a(e){return"#"+u(e.r)+u(e.g)+u(e.b)+u(Math.floor(255*e.a))}function s(e){return"rgba("+e.r+","+e.g+","+e.b+","+e.a+")"}function u(e){return isNaN(e)||void 0===e?"":e.toString(16).padStart(2,"0").toUpperCase()}function l(e,t,r){void 0===r&&(r=!1),r&&e.on("updated",function(){t(!1)}),e.viz?t(!0):e.on("loaded",function(){t(!0)})}r.r(t);var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},p=16,h="#000";function f(e){var t=e.getLegendData(),r=Math.floor(t.data.length/2);return t.data[r].value}function d(e,t){var r=e[t];return"ramp"===r.expressionName||"opacity"===r.expressionName?s(f(r)):"color"===t||"strokeColor"===t?s(r.value):h}function m(e,t,r){var n=e[t];return"ramp"===n.expressionName?r||f(n):"number"===n.type?n.value:r}function v(e){var t=e.symbol;return"ramp"===t.expressionName?f(t):t.value}function _(e){var t=e.layer,r=e.props,n=t.viz;return n?c({color:d(n,"color"),label:r.label,marker:n.symbol.default?void 0:v(n),strokeColor:d(n,"strokeColor"),strokeStyle:0===m(n,"strokeWidth")?"hidden":void 0,type:t.metadata.geomType,width:m(n,"width",p)},r):{}}function g(e){return e.props?e:{layer:e,props:{label:e.id}}}var y=function(){function e(){}return e.layersLegend=function(e,t,r){void 0===r&&(r={}),e=n(e);var i=t.map(g);i.forEach(function(t,n,o){l(t.layer,function(){var t=i.map(_);r.format&&(t.label=r.format(t.label,n,o)),e.data=t,r.onLoad&&setTimeout(r.onLoad,0)},r.dynamic)})},e.rampLegend=function(e,t,r,i){void 0===i&&(i={}),e=n(e);var o=g(t);l(o.layer,function(){var t=_(o),n=o.layer.viz[r],s=i.config,u=o.layer.viz[r].getLegendData(s).data,l=u.map(function(e,o,s){var u,l,p,h,f;return c({},t,((u={})[r]=function(e,t){return"color"===e.type?a(t):t}(n,e.value),u.label=i.format?i.format(e.key,o,s):(l=e.key,Array.isArray(l)?(h=(p=l)[0],f=p[1],h===-1/0?"< "+f.toFixed(2):f===1/0?"> "+h.toFixed(2):h.toFixed(2)+" - "+f.toFixed(2)):l.toFixed?l.toFixed(2):l),u))});Array.isArray(o.props)&&o.props.length===u.length?e.data=l.map(function(e,t){return c({},e,o.props[t])}):e.data=l,i.onLoad&&setTimeout(i.onLoad,0)},i.dynamic)},e}(),b=r(0),w=r.n(b);var x=function(e){return e=e||Object.create(null),{on:function(t,r){(e[t]||(e[t]=[])).push(r)},off:function(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit:function(t,r){(e[t]||[]).slice().map(function(e){e(r)}),(e["*"]||[]).slice().map(function(e){e(t,r)})}}},L=function(){function e(t,r,n,i,o){void 0===o&&(o=!0),this._emitter=new x,this._name="asbind_"+t+"_"+r+"_"+e._counter,this._column=r,this._layer=n,this._source=i,this._readOnly=o,e._counter++,this._loadLegendData=this._loadLegendData.bind(this)}return Object.defineProperty(e.prototype,"globalExpression",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"column",{get:function(){return this._column},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columnPropName",{get:function(){return this._name+"_col"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readOnly",{get:function(){return this._readOnly},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"layer",{get:function(){return this._layer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"source",{get:function(){return this._source},enumerable:!0,configurable:!0}),e.prototype.on=function(e,t){this._emitter.on(e,t)},e.prototype.setLegendData=function(e){this._legendData=e.data},e.prototype.enableColorMapping=function(){this._mapColors=!0,this._layer.viz?this._loadLegendData():this._layer.on("loaded",this._loadLegendData)},e.prototype._filterChanged=function(){this._emitter.emit("filterChanged",this._name)},e.prototype._loadLegendData=function(){var e=this._layer.viz.color;e.getLegendData&&this.setLegendData(e.getLegendData(this._getLegendConfig()))},e.prototype._getLegendConfig=function(){},e._counter=0,e}();function j(e,t){return E(e.value,t.value,P)}function O(e,t){return E(e.value,t.value,k)}function E(e,t,r){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r(e[n],t[n]))return!1;return!0}function P(e,t){return e.x[0]!==t.x[0]||e.x[1]!==t.x[1]||e.y!==t.y}function k(e,t){return e.x!==t.x||e.y!==t.y}function T(e){return e.value.map(function(e){return{end:e.x[1],start:e.x[0],value:e.y}})}function C(e,t){return e.value.map(function(e){return{category:e.x,color:z(e.x,t),end:void 0,start:void 0,value:e.y}})}function z(e,t){if(t){var r=t.find(function(t){return t.key===e});return r?function(e){return"string"==typeof e?e:a(e)}(r.value):void 0}}var S,H=function(e,t){return e.value.map(function(e){return{color:z(e.x,t),name:e.x,value:e.y}})},N=(S=function(e,t){return(S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}S(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),D=function(e){function t(t,r,i,o,a,s,u,l){void 0===s&&(s=!0);var c=e.call(this,"category",o,r,a,s)||this;return c._selection=[],c._lastHistogram=null,c._button=null,c._widget=n(i),c._carto=t,c._button=n(u),c._expression=l,c._widget.disableInteractivity=s,c._widget.showClearButton=!s,c.selectionChanged=c.selectionChanged.bind(c),s||(c._widget.addEventListener("categoriesSelected",c.selectionChanged),c._button&&c._button.addEventListener&&c._button.addEventListener("click",function(){c._filterChanged()})),c}return N(t,e),t.prototype.setDataLayer=function(e){var t=this;this._dataLayer=e,this._dataLayer.on("updated",function(){var e=t._dataLayer.viz.variables[t.name];e&&(null!==t._lastHistogram&&O(t._lastHistogram,e)||(t._lastHistogram={value:e.value},t._widget.categories=H(e,t._legendData)))})},Object.defineProperty(t.prototype,"filter",{get:function(){return 0===this._selection.length?null:"@"+this.columnPropName+" in ["+this._selection.map(function(e){return"'"+e+"'"}).join(",")+"]"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expression",{get:function(){var e=this._carto.expressions;return e.viewportHistogram(this._expression?this._expression:e.prop(this._column))},enumerable:!0,configurable:!0}),t.prototype.selectionChanged=function(e){this._selection=e.detail,0!==this._selection.length&&this._button||this._filterChanged()},t}(L),R=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),A=function(e){function t(t,r,i,o,a,s,u,l,c){void 0===u&&(u=!0),void 0===l&&(l=!1),void 0===c&&(c=null);var p=e.call(this,"histogram_"+t,a,i,s,u)||this;return p._selection=null,p._inputExpression=null,p._totals=!1,p._widget=n(o),p._carto=r,p._totals=l,p._widget.disableInteractivity=u,p._widget.showClear=!u,p._inputExpression=c,p.selectionChanged=p.selectionChanged.bind(p),u||p._widget.addEventListener("selectionChanged",p.selectionChanged),p}return R(t,e),t.prototype.removeHistogramLayer=function(){this._layer.remove()},t.prototype.setDataLayer=function(e){this._dataLayer=e,this.bindDataLayer()},t.prototype._getLegendConfig=function(){return{samples:this._buckets}},t}(L),F=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),V=function(e){function t(t,r,n,i,o,a,s,u){void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===u&&(u=null);var l=e.call(this,"categorical",t,r,n,i,o,a,s,u)||this;return l._lastHistogram=null,l}return F(t,e),Object.defineProperty(t.prototype,"filter",{get:function(){return null===this._selection?null:"@"+this.columnPropName+" in ["+this._selection.map(function(e){return"'"+e+"'"}).join(",")+"]"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expression",{get:function(){var e=this._carto.expressions;return e.viewportHistogram(this._inputExpression?this._inputExpression:e.prop(this._column))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"globalExpression",{get:function(){if(!this._totals)return null;var e=this._carto.expressions;return e.globalHistogram(this._inputExpression?this._inputExpression:e.prop(this._column))},enumerable:!0,configurable:!0}),t.prototype.bindDataLayer=function(){var e=this;this._dataLayer.on("updated",function(){e._totals&&!e._globalHistogram&&(e._globalHistogram=e._dataLayer.viz.variables[e.name+"_global"],e._widget.backgroundData=C(e._globalHistogram));var t=e._dataLayer.viz.variables[e.name];if(t&&(null===e._lastHistogram||!O(e._lastHistogram,t)))if(e._lastHistogram={value:t.value},e._globalHistogram){var r=e._globalHistogram.value.map(function(e){var r=t.value.find(function(t){return t.x===e.x});return{x:e.x,y:r?r.y:0}});e._widget.data=C({value:r},e._legendData)}else e._widget.data=C(t,e._legendData)})},t.prototype.selectionChanged=function(e){if(null===e.detail)this._selection=null;else{var t=e.detail.selection;this._selection=t.map(function(e){return e})}this._filterChanged()},t}(A),$=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),M=function(e){function t(t,r,n,i,o,a,s,u,l,c){void 0===o&&(o=20),void 0===u&&(u=!0),void 0===l&&(l=!1),void 0===c&&(c=null);var p=e.call(this,"numerical",t,r,n,i,a,u,l,c)||this;return p._lastHistogram=null,p._buckets=void 0!==s?s.length:o,p._bucketRanges=s,p}return $(t,e),Object.defineProperty(t.prototype,"filter",{get:function(){return null===this._selection||this._isTimeSeries?null:"(@"+this.columnPropName+" >= "+this._selection[0]+" and @"+this.columnPropName+" < "+this._selection[1]+")"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expression",{get:function(){if(this._totals&&!this._globalHistogram)return null;var e=this._carto.expressions;return e.viewportHistogram(this._inputExpression?this._inputExpression:e.prop(this._column),this._bucketArg())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"globalExpression",{get:function(){if(!this._totals)return null;var e=this._carto.expressions;return e.globalHistogram(this._inputExpression?this._inputExpression:e.prop(this._column),this._bucketArg())},enumerable:!0,configurable:!0}),t.prototype.setTimeSeries=function(e){this._isTimeSeries=e},t.prototype.enableColorMapping=function(){throw new Error("Unsupported for numerical histograms")},t.prototype.setLegendData=function(){throw new Error("Unsupported for numerical histograms")},t.prototype.bindDataLayer=function(){var e=this;this._dataLayer.on("updated",function(){e._totals&&!e._globalHistogram&&(e._globalHistogram=e._dataLayer.viz.variables[e.name+"_global"],e._globalHistogram&&(e._bucketRanges=e._globalHistogram.value.map(function(e){return[e.x[0],e.x[1]]}),e._emitter.emit("expressionReady",{name:e.name,expression:e.expression})),e._widget.backgroundData=T(e._globalHistogram));var t=e._dataLayer.viz.variables[e.name];t&&(null===t.value||null!==e._lastHistogram&&j(e._lastHistogram,t)||(e._emitter.emit("rangeChanged",[t.value[0].x[0],t.value[t.value.length-1].x[1]]),e._lastHistogram={value:t.value},e._widget.data=T(t)))})},t.prototype.selectionChanged=function(e){if(null===e.detail)this._selection=null;else{var t=this._isTimeSeries?e.detail:e.detail.selection;this._selection=[Number(t[0]),Number(t[1])]}this._emitter.emit("rangeChanged",this._selection),this._filterChanged()},t.prototype._bucketArg=function(){return void 0!==this._bucketRanges?this._bucketRanges:this._buckets},t}(A),I=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),B=function(e){function t(t,r,i,o,a){var s=e.call(this,"global_range",o,r,a,!1)||this;return s._value=null,s._widget=n(i),s._carto=t,s._widget.addEventListener("change",function(e){s._value=e.detail,s._filterChanged()}),s}return I(t,e),t.prototype.setDataLayer=function(e){var t=this;this._dataLayer=e,this._dataLayer.on("updated",function(){var e=t._dataLayer.viz.variables[t.name];e&&!t._populated&&(t._widget.minValue=e.value[0],t._widget.maxValue=e.value[1],t._widget.range=e.value,t._populated=!0)})},Object.defineProperty(t.prototype,"filter",{get:function(){return null===this._value?null:"@"+this.columnPropName+" > "+this._value[0]+" and @"+this.columnPropName+" < "+this._value[1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expression",{get:function(){var e=this._carto.expressions;return e.list([e.globalMin(e.prop(this._column)),e.globalMax(e.prop(this._column))])},enumerable:!0,configurable:!0}),t}(L),q=function(){function e(e,t,r,i,o,a,s,u){var l=this;void 0===a&&(a=10),void 0===s&&(s=[.15,.15]),void 0===u&&(u="animation"),this._timeSeries=n(i),this._layer=t,this._carto=e,this._columnName=r,this._duration=a,this._fade=s,this._variableName=u,t.viz?(this._onLayerLoaded(),o()):t.on("loaded",function(){l._onLayerLoaded(),o()})}return e.prototype.removeHistogramLayer=function(){this._dataLayer.remove()},e.prototype.setRange=function(e){if(this._animation&&this._animation.input&&this._animation.input.min&&this._animation.input.max)if(null===e)this._animation.input.min.blendTo(this._min,0),this._animation.input.max.blendTo(this._max,0),this._animation.duration.blendTo(this._duration,0);else if(e[0]!==e[1]){var t=Math.min(1,(e[1]-e[0])/(this._max.value-this._min.value));this._animation.input.min.blendTo(e[0],0),this._animation.input.max.blendTo(e[1],0),this._animation.duration.blendTo(this._duration*t,0)}},Object.defineProperty(e.prototype,"variableName",{get:function(){return this._variableName},enumerable:!0,configurable:!0}),e.prototype.setDuration=function(e){this._duration=e,this._animation.duration.blendTo(e,0)},Object.defineProperty(e.prototype,"animation",{get:function(){return this._animation},enumerable:!0,configurable:!0}),e.prototype._onLayerLoaded=function(){var e=this;this._viz=this._layer.viz,this._viz.variables[this._variableName]?this._animation=this._viz.variables[this._variableName]:(this._animation=this._createAnimation(),this._animation.parent=this._viz,this._animation.notify=this._viz._changed.bind(this._viz),this._viz.variables[this._variableName]=this._animation),this._max=this._animation.input.max,this._min=this._animation.input.min,this._duration=this._animation.duration.value,this._layer.on("updated",function(){e._timeSeries.progress=100*e._animation.getProgressPct(),e._timeSeries.playing=e._animation.isPlaying()}),this._timeSeries.animated=!0,this._timeSeries.addEventListener("seek",function(t){e._animation.setProgressPct(t.detail/100),e._timeSeries.progress=t.detail}),this._timeSeries.addEventListener("play",function(){e._animation.play()}),this._timeSeries.addEventListener("pause",function(){e._animation.pause()})},e.prototype._createAnimation=function(){var e=this._carto.expressions;return e.animation(e.linear(e.prop(this._columnName),e.globalMin(e.prop(this._columnName)),e.globalMax(e.prop(this._columnName))),this._duration,e.fade(this._fade[0],this._fade[1]))},e}(),U="^1.2.3",X=function(){function e(e){var t=e.carto,r=e.map,n=e.layer,i=e.source;if(this._vizFilters=[],this._carto=t,this._map=r,this._layer=n,this._source=i,this._id=this._layer.id,this._rebuildFilters=this._rebuildFilters.bind(this),this._updateDataLayerVariables=this._updateDataLayerVariables.bind(this),!this._carto.expressions.globalHistogram)throw new Error("Provided VL version "+this._carto.version+" lacks globalHistogram support.");if(!w.a.satisfies(this._carto.version,U))throw new Error("Provided VL version "+this._carto.version+" not supported. Must satisfy "+U)}return e.prototype.numericalHistogram=function(e,t,r){void 0===r&&(r={});var n=r.buckets,a=r.bucketRanges,s=r.readOnly,u=r.totals,l=i(t),c=o(t),p=new M(this._carto,this._layer,e,l,n,this._source,a,s,u,c);return this._addFilter(p),p},e.prototype.categoricalHistogram=function(e,t,r){void 0===r&&(r={});var n=r.readOnly,a=r.totals,s=i(t),u=o(t),l=new V(this._carto,this._layer,e,s,this._source,n,a,u);return this._addFilter(l),l},e.prototype.histogram=function(e,t,r){void 0===r&&(r={});var n=r.buckets,i=r.bucketRanges,o=r.readOnly,a=r.totals;if(void 0===n&&void 0===i){var s=e;return this.categoricalHistogram(s,t,{readOnly:o,totals:a})}return this.numericalHistogram(e,t,{readOnly:o,buckets:n,bucketRanges:i,totals:a})},e.prototype.category=function(e,t,r){void 0===r&&(r={});var n=r.readOnly,a=r.button,s=i(t),u=o(t),l=new D(this._carto,this._layer,e,s,this._source,n,a,u);return this._addFilter(l),l},e.prototype.timeSeries=function(e,t,r){var n=this;if(void 0===r&&(r={}),this._animation)throw new Error("There can only be one animation");var i=r.buckets,o=r.bucketRanges,a=r.readOnly,s=r.totals,u=r.duration,l=r.fade,c=r.variableName;this._animation=new q(this._carto,this._layer,t,e,function(){n._rebuildFilters()},u,l,c);var p=this.numericalHistogram(e,t,{bucketRanges:o,buckets:i,readOnly:a,totals:s});return p.setTimeSeries(!0),p.on("rangeChanged",function(e){n._animation.setRange(e)}),this._animation},e.prototype.globalRange=function(e,t){var r=new B(this._carto,this._layer,e,t,this._source);return this._addFilter(r),r},e.prototype.build=function(){var e=this;if(0!==this._vizFilters.length){var t=function(){e._appendVariables(),e._buildDataLayer()};this._layer.viz?t():this._layer.on("loaded",t)}},e.prototype._addFilter=function(e){e.on("filterChanged",this._rebuildFilters),e.on("expressionReady",this._updateDataLayerVariables),this._vizFilters.push(e)},e.prototype._appendVariables=function(){var e=this,t=this._carto.expressions;this._vizFilters.forEach(function(r){return e._layer.viz.variables[r.columnPropName]=t.prop(r.column)})},e.prototype._buildDataLayer=function(){var e=this,t=this._getVariables(),r=this._carto.expressions,n=new this._carto.Viz({color:r.rgba(0,0,0,0),strokeWidth:0,variables:t});this._readOnlyLayer=new this._carto.Layer("asbind_ro_"+this._id,this._source,n),this._readOnlyLayer.addTo(this._map),this._vizFilters.forEach(function(t){return t.setDataLayer(e._readOnlyLayer)})},e.prototype._getVariables=function(){for(var e=void 0!==this._readOnlyLayer?this._readOnlyLayer.viz.variables:{},t=0,r=this._vizFilters;t<r.length;t++){var n=r[t],i=n.name;n.globalExpression&&(e[i+"_global"]=n.globalExpression),n.expression&&(e[i]=n.expression),e[n.columnPropName]=this._carto.expressions.prop(n.column)}return e},e.prototype._updateDataLayerVariables=function(e){this._readOnlyLayer.viz&&(this._readOnlyLayer.viz.variables[e.name]=e.expression)},e.prototype._rebuildFilters=function(){var e=this._combineFilters(this._vizFilters.filter(function(e){return null!==e.filter}).map(function(e){return e.filter}));this._readOnlyLayer&&this._readOnlyLayer.viz.filter.blendTo(e,0),this._animation&&(e="@"+this._animation.variableName+" and "+e),this._layer.viz.filter.blendTo(e,0)},e.prototype._combineFilters=function(e){return 0===e.length?"1":e.join(" and ")},e}();r.d(t,"VL",function(){return G}),r.d(t,"VLBridge",function(){return X});var G={Bridge:X,Legends:y}}])});
{
"name": "@carto/airship-bridge",
"version": "2.1.0-rc.2",
"version": "2.1.0",
"description": "Airship bridge to other libs (CARTO VL, CARTO.js)",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc