cat/resources/public/js/vendor/vega-4.4.0.js

1 line
429 KiB
JavaScript
Raw Normal View History

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.vega={})}(this,function(t){"use strict";function e(t,e,n){return t.fields=e||[],t.fname=n,t}function n(t){return null==t?null:t.fname}function r(t){return null==t?null:t.fields}function i(t){throw Error(t)}function a(t){var e,n,r,a=[],o=null,u=0,s=t.length,f="";function c(){a.push(f+t.substring(e,n)),f="",e=n+1}for(t+="",e=n=0;n<s;++n)if("\\"===(r=t[n]))f+=t.substring(e,n),e=++n;else if(r===o)c(),o=null,u=-1;else{if(o)continue;e===u&&'"'===r?(e=n+1,o=r):e===u&&"'"===r?(e=n+1,o=r):"."!==r||u?"["===r?(n>e&&c(),u=e=n+1):"]"===r&&(u||i("Access path missing open bracket: "+t),u>0&&c(),u=0,e=n+1):n>e?c():e=n+1}return u&&i("Access path missing closing bracket: "+t),o&&i("Access path missing closing quote: "+t),n>e&&(n++,c()),a}var o=Array.isArray;function u(t){return t===Object(t)}function s(t){return"string"==typeof t}function f(t){return o(t)?"["+t.map(f)+"]":u(t)||s(t)?JSON.stringify(t).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):t}function c(t,n){var r=a(t),i="return _["+r.map(f).join("][")+"];";return e(Function("_",i),[t=1===r.length?r[0]:t],n||t)}var l=[],h=c("id"),d=e(function(t){return t},l,"identity"),p=e(function(){return 0},l,"zero"),v=e(function(){return 1},l,"one"),g=e(function(){return!0},l,"true"),m=e(function(){return!1},l,"false");function y(t,e,n){var r=[e].concat([].slice.call(n));console[t].apply(console,r)}var b=0,_=1,x=2,w=3,M=4;function k(t){var e=t||b;return{level:function(t){return arguments.length?(e=+t,this):e},error:function(){return e>=_&&y("error","ERROR",arguments),this},warn:function(){return e>=x&&y("warn","WARN",arguments),this},info:function(){return e>=w&&y("log","INFO",arguments),this},debug:function(){return e>=M&&y("log","DEBUG",arguments),this}}}function E(t){return t[t.length-1]}function S(t){return null==t||""===t?null:+t}function A(t){return function(e){return t*Math.exp(e)}}function C(t){return function(e){return Math.log(t*e)}}function O(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function z(t,e,n,r){var i=n(t[0]),a=n(E(t)),o=(a-i)*e;return[r(i-o),r(a-o)]}function D(t,e){return z(t,e,S,d)}function N(t,e){var n=Math.sign(t[0]);return z(t,e,C(n),A(n))}function R(t,e,n){return z(t,e,O(n),O(1/n))}function T(t,e,n,r,i){var a=r(t[0]),o=r(E(t)),u=null!=e?r(e):(a+o)/2;return[i(u+(a-u)*n),i(u+(o-u)*n)]}function P(t,e,n){return T(t,e,n,S,d)}function L(t,e,n){var r=Math.sign(t[0]);return T(t,e,n,C(r),A(r))}function q(t,e,n,r){return T(t,e,n,O(r),O(1/r))}function U(t){return null!=t?o(t)?t:[t]:[]}function F(t){return"function"==typeof t}function j(t,n){var i,o,u,s,c,l,h,d,p,v=[],g=(t=U(t)).map(function(t,e){return null==t?null:(v.push(e),F(t)?t:a(t).map(f).join("]["))}),m=v.length-1,y=U(n),b="var u,v;return ";if(m<0)return null;for(o=0;o<=m;++o)F(u=g[i=v[o]])?(s="(u=this."+(l="f"+i)+"(a))",c="(v=this."+l+"(b))",(h=h||{})[l]=u):(s="(u=a["+u+"])",c="(v=b["+u+"])"),l="((v=v instanceof Date?+v:v),(u=u instanceof Date?+u:u))","descending"!==y[i]?(p=1,d=-1):(p=-1,d=1),b+="("+s+"<"+c+"||u==null)&&v!=null?"+d+":(u>v||v==null)&&u!=null?"+p+":"+l+"!==u&&v===v?"+d+":v!==v&&u===u?"+p+(i<m?":":":0");return u=Function("a","b",b+";"),h&&(u=u.bind(h)),t=t.reduce(function(t,e){return F(e)?(r(e)||[]).forEach(function(e){t[e]=1}):null!=e&&(t[e+""]=1),t},{}),e(u,Object.keys(t))}function I(t){return F(t)?t:function(){return t}}function $(t,e){var n,r;function i(){e(r),n=r=null}return function(e){r=e,n&&clearTimeout(n),n=setTimeout(i,t)}}function B(t){for(var e,n,r=1,i=arguments.length;r<i;++r)for(n in e=arguments[r])t[n]=e[n];return t}function W(t,e){var n,r,i,a,o,u=-1,s=t.length;if(null==e){for(;++u<s;)if(null!=(r=t[u])&&r>=r){n=i=r;break}for(a=o=u;++u<s;)null!=(r=t[u])&&(n>r&&(n=r,a=u),i<r&&(i=r,o=u))}else{for(;++u<s;)if(null!=(r=e(t[u],u,t))&&r>=r){n=i=r;break}for(a=o=u;++u<s;)null!=(r=e(t[u],u,t))&&(n>r&&(n=r,a=u),i<r&&(i=r,o=u))}return[a,o]}var Y={};function G(t){var e,n,r={};function i(t){return r.hasOwnProperty(t)&&r[t]!==Y}return e={s