OCA reporting engine fork for dev and update.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
246 KiB

  1. !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).vegaLite={})}(this,(function(e){"use strict";var t="4.0.2";function n(e,t,n){return e.fields=t||[],e.fname=n,e}function i(e){throw Error(e)}function r(e){var t,n,r,o=[],s=null,a=0,u=e.length,c="";function l(){o.push(c+e.substring(t,n)),c="",t=n+1}for(e+="",t=n=0;n<u;++n)if("\\"===(r=e[n]))c+=e.substring(t,n),t=++n;else if(r===s)l(),s=null,a=-1;else{if(s)continue;t===a&&'"'===r?(t=n+1,s=r):t===a&&"'"===r?(t=n+1,s=r):"."!==r||a?"["===r?(n>t&&l(),a=t=n+1):"]"===r&&(a||i("Access path missing open bracket: "+e),a>0&&l(),a=0,t=n+1):n>t?l():t=n+1}return a&&i("Access path missing closing bracket: "+e),s&&i("Access path missing closing quote: "+e),n>t&&(n++,l()),o}var o=Array.isArray;function s(e){return e===Object(e)}function a(e){return"string"==typeof e}function u(e){return o(e)?"["+e.map(u)+"]":s(e)||a(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}var c=[],l=(function(e,t){var i=r(e),o="return _["+i.map(u).join("][")+"];";n(Function("_",o),[e=1===i.length?i[0]:e],t||e)}("id"),n((function(e){return e}),c,"identity"));n((function(){return 0}),c,"zero"),n((function(){return 1}),c,"one"),n((function(){return!0}),c,"true"),n((function(){return!1}),c,"false");function d(e,t,n){var i=[t].concat([].slice.call(n));console[e].apply(console,i)}var f=0,p=1,g=2,h=3,m=4;function b(...e){return e.reduce((e,t)=>{for(var n in t)if("signals"===n)e.signals=y(e.signals,t.signals);else{var i="legend"===n?{layout:1}:"style"===n||null;v(e,n,t[n],i)}return e},{})}function v(e,t,n,i){var r,a;if(s(n)&&!o(n))for(r in a=s(e[t])?e[t]:e[t]={},n)i&&(!0===i||i[r])?v(a,r,n[r]):a[r]=n[r];else e[t]=n}function y(e,t){if(null==e)return t;const n={},i=[];function r(e){n[e.name]||(n[e.name]=1,i.push(e))}return t.forEach(r),e.forEach(r),i}function x(e){return null!=e?o(e)?e:[e]:[]}const A=Object.prototype.hasOwnProperty;function O(e,t){return A.call(e,t)}function w(e){return"boolean"==typeof e}function F(e){return"number"==typeof e}function C(e){for(var t={},n=0,i=e.length;n<i;++n)t[e[n]]=!0;return t}Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function e(){var t=isNaN(arguments[0])?1:Number(arguments[0]);return t?Array.prototype.reduce.call(this,(function(n,i){return Array.isArray(i)?n.push.apply(n,e.call(i,t-1)):n.push(i),n}),[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,value:function(e){return Array.prototype.map.apply(this,arguments).flat()},writable:!0});var j=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var t=function(){function e(e,t){return null!=t&&e instanceof t}var t,n,i;try{t=Map}catch(e){t=function(){}}try{n=Set}catch(e){n=function(){}}try{i=Promise}catch(e){i=function(){}}function r(o,a,u,c,l){"object"==typeof a&&(u=a.depth,c=a.prototype,l=a.includeNonEnumerable,a=a.circular);var d=[],f=[],p="undefined"!=typeof Buffer;return void 0===a&&(a=!0),void 0===u&&(u=1/0),function o(u,g){if(null===u)return null;if(0===g)return u;var h,m;if("object"!=typeof u)return u;if(e(u,t))h=new t;else if(e(u,n))h=new n;else if(e(u,i))h=new i((function(e,t){u.then((function(t){e(o(t,g-1))}),(function(e){t(o(e,g-1))}))}));else if(r.__isArray(u))h=[];else if(r.__isRegExp(u))h=new RegExp(u.source,s(u)),u.lastIndex&&(h.lastIndex=u.lastIndex);else if(r.__isDate(u))h=new Date(u.getTime());else{if(p&&Buffer.isBuffer(u))return h=Buffer.allocUnsafe?Buffer.allocUnsafe(u.length):new Buffer(u.length),u.copy(h),h;e(u,Error)?h=Object.create(u):void 0===c?(m=Object.getPrototypeOf(u),h=Object.create(m)):(h=Object.create(c),m=c)}if(a){var b=d.indexOf(u);if(-1!=b)return f[b];d.push(u),f.push(h)}for(var v in e(u,t)&&u.forEach((function(e,t){var n=o(t,g-1),i=o(e,g-1);h.set(n,i)})),e(u,n)&&u.forEach((function(e){var t=o(e,g-1);h.add(t)})),u){var y;m&&(y=Object.getOwnPropertyDescriptor(m,v)),y&&null==y.set||(h[v]=o(u[v],g-1))}if(Object.getOwnPr
  2. /*! *****************************************************************************
  3. Copyright (c) Microsoft Corporation. All rights reserved.
  4. Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  5. this file except in compliance with the License. You may obtain a copy of the
  6. License at http://www.apache.org/licenses/LICENSE-2.0
  7. THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  8. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  9. WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  10. MERCHANTABLITY OR NON-INFRINGEMENT.
  11. See the Apache Version 2.0 License for specific language governing permissions
  12. and limitations under the License.
  13. ***************************************************************************** */function $e(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}const Be={argmax:1,argmin:1,average:1,count:1,distinct:1,max:1,mean:1,median:1,min:1,missing:1,q1:1,q3:1,ci0:1,ci1:1,stderr:1,stdev:1,stdevp:1,sum:1,valid:1,values:1,variance:1,variancep:1},Ne={count:1,min:1,max:1};function _e(e){return!!e&&!!e.argmin}function ze(e){return!!e&&!!e.argmax}function Te(e){return a(e)&&!!Be[e]}const Pe=["count","valid","missing","distinct"];function Me(e){return a(e)&&U(Pe,e)}const Ue=["count","sum","distinct","valid","missing"],Re=C(["mean","average","median","q1","q3","min","max"]),Le="row",We="column",qe="facet",Ie="x",He="y",Ge="x2",Ye="y2",Ve="latitude",Je="longitude",Qe="latitude2",Xe="longitude2",Ze="color",Ke="fill",et="stroke",tt="shape",nt="size",it="opacity",rt="fillOpacity",ot="strokeOpacity",st="strokeWidth",at="text",ut="order",ct="detail",lt="key",dt="tooltip",ft="href",pt="url";const gt={longitude:1,longitude2:1,latitude:1,latitude2:1};const ht=Y(gt),mt=Object.assign(Object.assign(Object.assign({},{x:1,y:1,x2:1,y2:1}),gt),{color:1,fill:1,stroke:1,opacity:1,fillOpacity:1,strokeOpacity:1,strokeWidth:1,size:1,shape:1,order:1,text:1,detail:1,key:1,tooltip:1,href:1,url:1});function bt(e){return"color"===e||"fill"===e||"stroke"===e}const vt={row:1,column:1,facet:1},yt=Y(vt),xt=Object.assign(Object.assign({},mt),vt),At=Y(xt),Ot=$e(xt,["order","detail","tooltip"]),wt=$e(Ot,["row","column","facet"]);function Ft(e){return!!wt[e]}function Ct(e){return!!xt[e]}const jt=["x2","y2","latitude2","longitude2"];function Dt(e){return Et(e)!==e}function Et(e){switch(e){case"x2":return"x";case"y2":return"y";case"latitude2":return"latitude";case"longitude2":return"longitude"}return e}function St(e){switch(e){case"x":return"x2";case"y":return"y2";case"latitude":return"latitude2";case"longitude":return"longitude2"}}const kt=$e(mt,["x","y","x2","y2","latitude","longitude","latitude2","longitude2"]),$t=Y(kt),Bt={x:1,y:1},Nt=Y(Bt);function _t(e){return"x"===e?"width":"height"}function zt(e){return"width"===e?"x":"y"}const Tt=$e(kt,["text","tooltip","href","url","detail","key","order"]),Pt=Y(Tt);const Mt=Object.assign(Object.assign({},Bt),Tt),Ut=Y(Mt);function Rt(e){return!!Mt[e]}function Lt(e,t){return function(e){switch(e){case Ze:case Ke:case et:case ct:case lt:case dt:case ft:case ut:case it:case rt:case ot:case st:case qe:case Le:case We:return Wt;case Ie:case He:case Ve:case Je:return qt;case Ge:case Ye:case Qe:case Xe:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case nt:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case tt:return{point:"always",geoshape:"always"};case at:return{text:"always"};case pt:return{image:"always"}}}(e)[t]}const Wt={area:"always",bar:"always",circle:"always",geoshape:"always",image:"always",line:"always",rule:"always",point:"always",rect:"always",square:"always",trail:"always",text:"always",tick:"always"},qt=$e(Wt,["geoshape"]);function It(e){switch(e){case Ie:case He:case nt:case st:case it:case rt:case ot:case Ge:case Ye:return;case qe:case Le:case We:case tt:case at:case dt:case ft:case pt:return"discrete";case Ze:case Ke:case et:return"flexible";case Ve:case Je:case Qe:case Xe:case ct:case lt:case ut:return}}const Ht=Object.freeze({__proto__:null,invalidSpec:function(e){return`Invalid specification ${JSON.stringify(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`},FIT_NON_SINGLE:'Autosize "fit" only works for single views and layered views.',c