├── logo.png ├── dist ├── 7760bc80fcd10857455b.module.wasm ├── d24f51176d46edba7e76.worker.js ├── muze.css └── 1.muze.js ├── index.d.ts ├── package.json ├── .gitignore ├── LICENSE └── README.md /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chartshq/muze/HEAD/logo.png -------------------------------------------------------------------------------- /dist/7760bc80fcd10857455b.module.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chartshq/muze/HEAD/dist/7760bc80fcd10857455b.module.wasm -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | interface Muze { 2 | (): Promise; 3 | [property: string]: any; 4 | } 5 | 6 | declare const muze: Muze; 7 | 8 | export default muze; 9 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@chartshq/muze", 3 | "version": "2.0.0", 4 | "description": "Composable visualisation library for web with a data-first approach", 5 | "homepage": "https://muzejs.org", 6 | "author": "Charts.com (https://charts.com/)", 7 | "main": "dist/muze.js", 8 | "types": "./index.d.ts", 9 | "files": [ 10 | "dist", 11 | "README.md", 12 | "package.json", 13 | "index.d.ts", 14 | "LICENSE" 15 | ], 16 | "contributors": [ 17 | { 18 | "name": "Akash Ghoswami", 19 | "email": "akashgoswami90s@gmail.com" 20 | }, 21 | { 22 | "name": "Ranajit Banerjee", 23 | "email": "ranajit.113124@gmail.com", 24 | "url": "https://github.com/ranajitbanerjee" 25 | }, 26 | { 27 | "name": "Mridul Meharia", 28 | "email": "mehariamridul@gmail.com", 29 | "url": "https://github.com/mridulmeh" 30 | }, 31 | { 32 | "name": "Subhash Haldar" 33 | }, 34 | { 35 | "name": "Sandeep Acharya" 36 | }, 37 | { 38 | "name": "Rousan Ali", 39 | "email": "hello@rousan.io", 40 | "url": "https://rousan.io" 41 | }, 42 | { 43 | "name": "Ujjal Kumar Dutta", 44 | "email": "duttaujjal143@gmail.com", 45 | "url": "https://github.com/UD-UD" 46 | }, 47 | { 48 | "name": "Nakshatra Mukhopadhyay" 49 | }, 50 | { 51 | "name": "Adarsh Lilha", 52 | "email": "adarsh@charts.com" 53 | }, 54 | { 55 | "name": "Swati Mukherjee" 56 | } 57 | ], 58 | "keywords": [ 59 | "muze", 60 | "svg", 61 | "vector", 62 | "graphics", 63 | "data-visualization", 64 | "visualization", 65 | "renderer", 66 | "relational", 67 | "algebra", 68 | "relation", 69 | "webassembly" 70 | ], 71 | "repository": { 72 | "type": "git", 73 | "url": "https://github.com/chartshq/muze" 74 | }, 75 | "bugs": { 76 | "url": "https://github.com/chartshq/muze/issues" 77 | }, 78 | "dependencies": {} 79 | } 80 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io/api/node,macos 2 | 3 | ### macOS ### 4 | # General 5 | .DS_Store 6 | .AppleDouble 7 | .LSOverride 8 | 9 | # Icon must end with two \r 10 | Icon 11 | 12 | # Thumbnails 13 | ._* 14 | 15 | # Files that might appear in the root of a volume 16 | .DocumentRevisions-V100 17 | .fseventsd 18 | .Spotlight-V100 19 | .TemporaryItems 20 | .Trashes 21 | .VolumeIcon.icns 22 | .com.apple.timemachine.donotpresent 23 | 24 | # Directories potentially created on remote AFP share 25 | .AppleDB 26 | .AppleDesktop 27 | Network Trash Folder 28 | Temporary Items 29 | .apdisk 30 | 31 | ### Node ### 32 | # Logs 33 | logs 34 | *.log 35 | npm-debug.log* 36 | yarn-debug.log* 37 | yarn-error.log* 38 | 39 | # Runtime data 40 | pids 41 | *.pid 42 | *.seed 43 | *.pid.lock 44 | 45 | # Directory for instrumented libs generated by jscoverage/JSCover 46 | lib-cov 47 | 48 | # Coverage directory used by tools like istanbul 49 | coverage 50 | 51 | # nyc test coverage 52 | .nyc_output 53 | 54 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 55 | .grunt 56 | 57 | # Bower dependency directory (https://bower.io/) 58 | bower_components 59 | 60 | # node-waf configuration 61 | .lock-wscript 62 | 63 | # Compiled binary addons (https://nodejs.org/api/addons.html) 64 | build/Release 65 | 66 | # Dependency directories 67 | node_modules/ 68 | jspm_packages/ 69 | 70 | # TypeScript v1 declaration files 71 | typings/ 72 | 73 | # Optional npm cache directory 74 | .npm 75 | 76 | # Optional eslint cache 77 | .eslintcache 78 | 79 | # Optional REPL history 80 | .node_repl_history 81 | 82 | # Output of 'npm pack' 83 | *.tgz 84 | 85 | # Yarn Integrity file 86 | .yarn-integrity 87 | 88 | # dotenv environment variables file 89 | .env 90 | 91 | # parcel-bundler cache (https://parceljs.org/) 92 | .cache 93 | 94 | # next.js build output 95 | .next 96 | 97 | # nuxt.js build output 98 | .nuxt 99 | 100 | # vuepress build output 101 | .vuepress/dist 102 | 103 | # Serverless directories 104 | .serverless 105 | 106 | packages/*/.nsi.json 107 | package-lock.json 108 | packages/*/node_modules/ 109 | */**/package-lock.json 110 | dist.zip 111 | sherlock.json 112 | examples/* 113 | 114 | TODO 115 | # End of https://www.gitignore.io/api/node,macos -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | End User License Agreement for Muze and DataModel (WebAssembly version) 2 | 3 | Licensor: Muze (Charts.com), InfoSoft Global (P) Ltd. 4 | Web : https://www.muzejs.org 5 | Email : muze [at] muzejs.org 6 | 7 | END-USER LICENSE AGREEMENT FOR THIS SOFTWARE 8 | 9 | This End-User License Agreement ("EULA") is a legal agreement between you ("Licensee"), either an individual or an 10 | entity, and the mentioned Licensor of this Software for the software product identified above, which includes computer 11 | software and may include associated media, printed materials, and "online" or electronic documentation ("Software"). 12 | By installing, copying, or otherwise using the Software, you agree to be bound by the terms of this EULA. If you do not 13 | agree to the terms of this EULA, do not install or use the Software. 14 | 15 | SOFTWARE LICENSE 16 | 17 | The Software is protected by copyright laws and international copyright treaties, as well as other intellectual property 18 | laws and treaties. The Software is licensed, not sold. The Software under this License is provided free of charge. 19 | Even though a license fee is not paid for the use of such software, it does not mean that there are no conditions for 20 | using such software. 21 | 22 | 1. GRANT OF LICENSE 23 | 24 | You are granted a non-exclusive License to Use the downloaded Software for any purposes 25 | for an unlimited period of time. 26 | 27 | Installation and Use: You may install and use an unlimited number of copies of the Software. 28 | 29 | Reproduction and Distribution: You may reproduce and distribute an unlimited number of copies of the Software either 30 | in whole or in part; each copy should include all copyright and trademark notices, and shall be accompanied by a 31 | copy of this EULA. Copies of the Software may be distributed as a standalone product or included with your own product. 32 | 33 | Commercial Use: You may use the Software for commercial purposes. 34 | 35 | Reverse engineering: You may not reverse engineer or disassemble the Software. 36 | 37 | 2. INTELLECTUAL PROPERTY RIGHTS 38 | 39 | This License does not transmit any intellectual rights on the Software. The Software and any copies that the Licensee is 40 | authorized by the Licensor to make are the intellectual property of and are owned by the Licensor. 41 | The Software is protected by copyright, including without limitation by Copyright Law and international treaty provisions. 42 | 43 | Any copies that the Licensee is permitted to make pursuant to this Agreement must contain the same copyright 44 | and other proprietary notices that appear on or in the Software. 45 | 46 | The structure, organization and code of the Software are the valuable trade secrets and confidential information 47 | of the Licensor. The Licensee agrees not to decompile, disassemble or otherwise attempt to discover the source code 48 | of the Software. 49 | 50 | Any attempts to reverse-engineer, copy, clone, modify or alter in any way the installer program without the 51 | Licensor’s specific approval are strictly prohibited. The Licensee is not authorized to use any plug-in or 52 | enhancement that permits to save modifications to a file with software licensed and distributed by the Licensor. 53 | 54 | Trademarks shall be used in accordance with accepted trademark practice, including identification 55 | of trademarks owners’ names. Trademarks can only be used to identify printed output produced by the Software 56 | and such use of any trademark does not give the Licensee any rights of ownership in that trademark. 57 | 58 | All title and copyrights in and to the Software (including but not limited to any images, 59 | photographs, animations, video, audio, music and text incorporated into the Software), the accompanying 60 | documentation, and any copies of the Software are owned by the Licensor of this Software. The Software is 61 | protected by copyright laws and international treaty provisions. Therefore, you must treat the Software like 62 | any other copyrighted material. 63 | 64 | LIMITED WARRANTY 65 | 66 | 1. NO WARRANTIES 67 | 68 | The Licensor of this Software expressly disclaims any warranty for the Software. 69 | The Software and any related documentation is provided "as is" without warranty of any kind, 70 | either express or implied, including, without limitation, the implied warranties or merchantability, 71 | fitness for a particular purpose, or non-infringement. The entire risk arising out of use or performance 72 | of the Software remains with you. 73 | 74 | 2. NO LIABILITY FOR DAMAGES 75 | 76 | In no event shall the Licensor of this Software be liable for any damages whatsoever 77 | (including, without limitation, damages for loss of business profits, business interruption, 78 | loss of business information, or any other pecuniary loss) arising out of the use of or inability to use 79 | this product, even if the Licensor of this Software has been advised of the possibility of such damages. 80 | Because some states/jurisdictions do not allow the exclusion or limitation of liability for consequential 81 | or incidental damages, the above limitation may not apply to you. 82 | 83 | [END OF LICENSE] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 |
3 |
4 | 5 | muzejs 6 | 7 |

8 |
9 |
10 |
11 | 12 | [![Free](https://img.shields.io/badge/cost-Free-brightgreen)](http://muzejs.org/muze-wa/eula) 13 | [![License](https://img.shields.io/badge/license-Custom-brightgreen)](http://muzejs.org/muze-wa/eula) 14 | [![NPM version](https://img.shields.io/npm/v/@chartshq/muze.svg)](https://www.npmjs.com/package/@chartshq/muze) 15 | [![Contributors](https://img.shields.io/github/contributors/chartshq/muze.svg)](https://github.com/chartshq/muze/graphs/contributors) 16 | 17 | ## What is Muze? 18 | 19 | Muze is a free **data visualization library for creating exploratory data visualizations (like Tableau)** in browser, using WebAssembly. It uses a layered Grammar of Graphics (GoG) to create composable and interactive data visualization for web. It is ideal for use in visual analytics dashboards & applications to create highly performant, interactive, multi-dimensional, and composable visualizations. 20 | 21 | It uses a data-first approach to define the constructs and layers of the chart, automatically generates cross-chart interactivity, and allows you to over-ride any behavior or interaction on the chart. 22 | 23 | Muze uses an in-browser **[DataModel](https://github.com/chartshq/datamodel)** to store and transform data, and control the behaviour of every component in the visualization, thereby enabling creating of complex and cross-connected charts. 24 | 25 | ## Features 26 | 27 | * 🍗 Build complex and interactive visualizations by using **composable** layer constructs. 28 | 29 | * 🔨 Use rich **data operators** to transform, visualize and interact with data. 30 | 31 | * 👯 Define custom interactions by configuring **physical behavioural model** and **side effect**. 32 | 33 | * ✂️ Use **css** to change look and feel of the charts. 34 | 35 | * ☀️ Have a **single source of truth** for all your visualization and interaction controlled from data. 36 | 37 | * 🔩 Integrate easily with your existing application by **dispatching actions** on demand. 38 | 39 | * 🚀 Uses **WebAssembly** for handling huge datasets and for **better performance**. 40 | 41 | ## Installation 42 | 43 | ### CDN 44 | 45 | Insert the muze build and the required CSS into the ``: 46 | 47 | ```html 48 | 49 | 50 | ``` 51 | 52 | ### NPM 53 | 54 | Install muze from NPM: 55 | 56 | ```bash 57 | $ npm install @chartshq/muze 58 | ``` 59 | 60 | Then you need to add a webpack plugin [copy-webpack-plugin](https://webpack.js.org/plugins/copy-webpack-plugin/) to copy some required muze files to your output `dist` or `build` folder. 61 | 62 | ```bash 63 | npm install copy-webpack-plugin@5.1.1 --save-dev 64 | ``` 65 | 66 | And then within your webpack configuration object, you'll need to add the `copy-webpack-plugin` to the list of plugins, like so: 67 | 68 | ```js 69 | const path = require("path"); 70 | const CopyWebpackPlugin = require('copy-webpack-plugin'); 71 | 72 | module.exports = { 73 | plugins: [ 74 | new CopyWebpackPlugin([ 75 | { 76 | // Provide your node_modules path where @chartshq/muze 77 | // package is installed. 78 | from: path.resolve("", "@chartshq/muze/dist"), 79 | to: '.' 80 | }, 81 | ]), 82 | ] 83 | } 84 | ``` 85 | 86 | You also can checkout our [muze-app-template](https://github.com/chartshq/muze-app-template) to try out the `Muze` quickly through a boilerplate app. 87 | 88 | ## Getting Started 89 | 90 | Once the installation is done, please follow the steps below: 91 | 92 | 1. Prepare the data and the corresponding schema: 93 | 94 | ```js 95 | // Prepare the schema for data. 96 | const schema = [ 97 | { 98 | name: 'Name', 99 | type: 'dimension' 100 | }, 101 | { 102 | name: 'Maker', 103 | type: 'dimension' 104 | }, 105 | { 106 | name: 'Horsepower', 107 | type: 'measure', 108 | defAggFn: 'avg' 109 | }, 110 | { 111 | name: 'Origin', 112 | type: 'dimension' 113 | } 114 | ] 115 | 116 | // Prepare the data. 117 | const data = [ 118 | { 119 | "Name": "chevrolet chevelle malibu", 120 | "Maker": "chevrolet", 121 | "Horsepower": 130, 122 | "Origin": "USA" 123 | }, 124 | { 125 | "Name": "buick skylark 320", 126 | "Maker": "buick", 127 | "Horsepower": 165, 128 | "Origin": "USA" 129 | }, 130 | { 131 | "Name": "datsun pl510", 132 | "Maker": "datsun", 133 | "Horsepower": 88, 134 | "Origin": "Japan" 135 | } 136 | ] 137 | ``` 138 | 139 | 2. Import muze as follows: 140 | 141 | If you are using the npm package, import the package and its CSS file. 142 | ```js 143 | import muze from '@chartshq/muze'; 144 | import "@chartshq/muze/dist/muze.css"; 145 | ``` 146 | 147 | If you are using CDN, use it as follows: 148 | ```js 149 | const muze = window.muze; 150 | ``` 151 | 152 | 3. Create a DataModel and a basic chart: 153 | 154 | ```js 155 | // As the muze and DataModel are asynchronous, so we need to 156 | // use async-await syntax. 157 | async function myAsyncFn() { 158 | // Load the DataModel module. 159 | const DataModel = await muze.DataModel.onReady(); 160 | 161 | // Converts the raw data into a format 162 | // which DataModel can consume. 163 | const formattedData = await DataModel.loadData(data, schema); 164 | 165 | // Create a new DataModel instance with 166 | // the formatted data. 167 | let dm = new DataModel(formattedData); 168 | 169 | // Create a global environment to share common configs across charts. 170 | const env = await muze(); 171 | 172 | // Create a new canvas instance from the global 173 | // environment to render chart on. 174 | const canvas = env.canvas(); 175 | 176 | canvas 177 | .data(dm) // Set data to the chart. 178 | .rows(["Horsepower"]) // Fields drawn on Y axis. 179 | .columns(["Origin"]) // Fields drawn on X axis. 180 | .mount("#chart"); // Specify an element to mount on using a CSS selector. 181 | } 182 | 183 | myAsyncFn() 184 | .catch(console.error.bind(console)); 185 | ``` 186 | 187 | ## Documentation 188 | 189 | You can find detailed tutorials, concepts and API references at our [Documentation](https://muzejs.org/docs/wa/latest/installation/getting-started). 190 | 191 | ## What has changed? 192 | 193 | Muze 2.0.0 is now powered by WebAssembly bringing in huge performance improvement over the previous versions. The JavaScript version has been deprecated and no active development will take place in that version - but we'll fix critical bugs as and when raised in GitHub. 194 | 195 | This version of Muze brings in power of WebAssembly for handling large datasets with ease, along with frictionless interaction and rendering. In addition, the data loading part in WebAssembly version is asynchronous, as opposed to being synchronous in the JavaScript version. Further, the WebAssembly version is free but only available as a compiled binary, whereas the JavaScript version is free and open-source (MIT). 196 | 197 | You can visit the deprecated JavaScript version here [https://github.com/chartshq/muze-deprecated](https://github.com/chartshq/muze-deprecated) 198 | 199 | ## Migrating from previous versions of Muze 200 | 201 | Now the Muze became asynchronous as opposed to being synchronous in the previous JavaScript version. 202 | 203 | ### Changed APIs 204 | 205 | - **Creating Env** 206 | 207 | Muze deprecated version: 208 | 209 | ```js 210 | const env = muze(); 211 | const canvas = env.canvas(); 212 | ``` 213 | 214 | Latest version: 215 | 216 | ```js 217 | (async function () { 218 | const env = await muze(); 219 | const canvas = env.canvas(); 220 | })(); 221 | ``` 222 | 223 | - **dispatchBehaviour** 224 | 225 | Muze deprecated version: 226 | 227 | ```js 228 | canvas.firebolt().dispatchBehaviour('highlight', { 229 | criteria: { 230 | Maker: ['ford'] 231 | } 232 | }); 233 | ``` 234 | 235 | Latest version : 236 | 237 | In the current version, the identifiers needs to be passed in dimensions object or range object if it is measure or temporal field. 238 | 239 | ```js 240 | // Dispatch highlight behaviour on data plots having maker as ford 241 | canvas.firebolt().dispatchBehaviour('highlight', { 242 | criteria: { 243 | dimensions: { 244 | Maker: ['ford'] 245 | } 246 | } 247 | }); 248 | 249 | // Dispatch highlight behaviour on data plots having Acceleration 250 | // between 20 and 50. 251 | canvas.firebolt().dispatchBehaviour('highlight', { 252 | criteria: { 253 | range: { 254 | Acceleration: [20, 50] 255 | } 256 | } 257 | }); 258 | ``` 259 | 260 | ## Support 261 | 262 | Please raise a Github issue [here](https://github.com/chartshq/muze/issues/new). 263 | 264 | ## Roadmap 265 | 266 | Please contribute to our public wishlist or upvote an existing feature at [Muze Public Wishlist & Roadmap](https://github.com/orgs/chartshq/projects/1). 267 | 268 | ## License 269 | 270 | [Custom License](http://muzejs.org/muze-wa/eula) (Free to use) -------------------------------------------------------------------------------- /dist/d24f51176d46edba7e76.worker.js: -------------------------------------------------------------------------------- 1 | !function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=1)}([,function(t,r,e){"use strict";e.r(r);"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),new Uint8Array(16);for(var n=[],o=0;o<256;++o)n.push((o+256).toString(16).substr(1));var a,u;new Map;(u=a||(a={})).FLAT_JSON="FlatJSON",u.DSV_STR="DSVStr",u.DSV_ARR="DSVArr",u.AUTO="Auto";var i={},f={};function c(t){return new Function("d","return {"+t.map((function(t,r){return JSON.stringify(t)+": d["+r+'] || ""'})).join(",")+"}")}function s(t){var r=Object.create(null),e=[];return t.forEach((function(t){for(var n in t)n in r||e.push(r[n]=n)})),e}function l(t,r){var e=t+"",n=e.length;return n9999?"+"+l(r,6):l(r,4))+"-"+l(t.getUTCMonth()+1,2)+"-"+l(t.getUTCDate(),2)+(a?"T"+l(e,2)+":"+l(n,2)+":"+l(o,2)+"."+l(a,3)+"Z":o?"T"+l(e,2)+":"+l(n,2)+":"+l(o,2)+"Z":n||e?"T"+l(e,2)+":"+l(n,2)+"Z":"")}var d=function(t){var r=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function n(t,r){var n,o=[],a=t.length,u=0,c=0,s=a<=0,l=!1;function p(){if(s)return f;if(l)return l=!1,i;var r,n,o=u;if(34===t.charCodeAt(o)){for(;u++=a?s=!0:10===(n=t.charCodeAt(u++))?l=!0:13===n&&(l=!0,10===t.charCodeAt(u)&&++u),t.slice(o+1,r-1).replace(/""/g,'"')}for(;u0)&&!(n=a.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=a.return)&&e.call(a)}finally{if(o)throw o.error}}return u},h=function(){for(var t=[],r=0;ro.getFullYear()&&(r=""+(a-1)+n),y(r).getFullYear()},formatter:function(t){var r,e=y(t).getFullYear().toString();return e&&(r=e.length,e=e.substring(r-2,r)),e}},Y:{name:"Y",index:0,extract:function(){return"(\\d{4})"},parser:v.defaultNumberParser(),formatter:function(t){return y(t).getFullYear().toString()}}}},v.getTokenFormalNames=function(){var t=v.getTokenDefinitions();return{HOUR:t.H,HOUR_12:t.l,AMPM_UPPERCASE:t.p,AMPM_LOWERCASE:t.P,MINUTE:t.M,SECOND:t.S,SHORT_DAY:t.a,LONG_DAY:t.A,DAY_OF_MONTH:t.e,DAY_OF_MONTH_CONSTANT_WIDTH:t.d,SHORT_MONTH:t.b,LONG_MONTH:t.B,MONTH_OF_YEAR:t.m,SHORT_YEAR:t.y,LONG_YEAR:t.Y}},v.tokenResolver=function(){var t=v.getTokenDefinitions(),r=function(){for(var t=[],r=0;r=0;)e=t[r+1],-1!==a.indexOf(e)&&u.push({index:r,token:e});return u},v.formatAs=function(t,r){var e,n,o,a,u=y(t),i=v.findTokens(r),f=v.getTokenDefinitions(),c=String(r),s=v.TOKEN_PREFIX;for(o=0,a=i.length;o=0;i--)(n=l[i].index)+1!==a.length-1?(void 0===r&&(r=a.length),o=a.substring(n+2,r),a=a.substring(0,n+2)+RegExp.escape(o)+a.substring(r,a.length),r=n):r=n;for(i=0;i0)&&!(n=a.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=a.return)&&e.call(a)}finally{if(o)throw o.error}}return u},w=function(){for(var t=[],r=0;r0)&&!(n=a.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=a.return)&&e.call(a)}finally{if(o)throw o.error}}return u},H=function(){for(var t=[],r=0;r>>0},set:function(t){n.l(this.ptr,t)},enumerable:!1,configurable:!0}),t}(),T=function(){function t(){}return t.__wrap=function(e){var r=Object.create(t.prototype);return r.ptr=e,r},t.prototype.free=function(){var t=this.ptr;this.ptr=0,n.b(t)},t.prototype.get_name=function(){try{n.z(8,this.ptr);var t=l()[2],e=l()[3];return y(t,e)}finally{n.s(t,e)}},t.prototype.get_data_indices=function(){return n.w(this.ptr)},t.prototype.get_data_info=function(){return n.x(this.ptr)},t.prototype.get_rows_count=function(){return n.A(this.ptr)>>>0},t.prototype.get_value_at_index=function(t){return n.B(this.ptr,t)},t.prototype.get_domain=function(){var t=n.y(this.ptr);return E.__wrap(t)},t}(),D=function(){function t(){}return t.__wrap=function(e){var r=Object.create(t.prototype);return r.ptr=e,r},t.prototype.free=function(){var t=this.ptr;this.ptr=0,n.c(t)},t.prototype.get_name=function(){try{n.z(8,this.ptr);var t=l()[2],e=l()[3];return y(t,e)}finally{n.s(t,e)}},t.prototype.get_data_ptr=function(){return n.E(this.ptr)},t.prototype.get_data_indices=function(){return n.C(this.ptr)},t.prototype.get_data_info=function(){return n.D(this.ptr)},t.prototype.get_rows_count=function(){return n.G(this.ptr)>>>0},t.prototype.get_value_at_index=function(t){return n.H(this.ptr,t)},t.prototype.get_domain=function(){n.F(8,this.ptr);var t=l()[2],e=l()[3],r=S(t,e).slice();return n.s(t,8*e),r},t}(),N=function(){function t(e){g(e,M);var r=e.ptr;e.ptr=0;var o=n.V(r);return t.__wrap(o)}return t.__wrap=function(e){var r=Object.create(t.prototype);return r.ptr=e,r},t.prototype.free=function(){var t=this.ptr;this.ptr=0,n.d(t)},t.prototype.clone=function(){var e=n.J(this.ptr);return t.__wrap(e)},t.prototype.add_field=function(t,e){return n.I(this.ptr,_(t),_(e))>>>0},t.prototype.get_categorical_field=function(t){var e=n.M(this.ptr,t);return T.__wrap(e)},t.prototype.get_continuous_field=function(t){var e=n.N(this.ptr,t);return D.__wrap(e)},t.prototype.get_temporal_field=function(t){var e=n.T(this.ptr,t);return I.__wrap(e)},t.prototype.get_id_field=function(t){var e=n.P(this.ptr,t);return R.__wrap(e)},t.prototype.select=function(t,e){var r=n.Y(this.ptr,_(t),e);return C.__wrap(r)},t.prototype.sort=function(e){try{var r=n.Z(this.ptr,b(e));return t.__wrap(r)}finally{o[m++]=void 0}},t.prototype.project=function(t){try{var e=n.W(this.ptr,b(t));return C.__wrap(e)}finally{o[m++]=void 0}},t.prototype.group_by=function(e,r){var o=n.U(this.ptr,_(e),_(r));return t.__wrap(o)},t.prototype.split_by_row=function(t){var e=n.ab(this.ptr,_(t));return F.__wrap(e)},t.prototype.dispose=function(t){n.L(this.ptr,_(t))},t.prototype.row_count=function(){return n.X(this.ptr)>>>0},t.prototype.column_count=function(){return n.K(this.ptr)>>>0},t.prototype.get_eligible_rows=function(){n.O(8,this.ptr);var t=l()[2],e=l()[3],r=function(t,e){return l().subarray(t/4,t/4+e)}(t,e).slice();return n.s(t,4*e),r},t.prototype.get_partial_column_count=function(){return n.R(this.ptr)>>>0},t.prototype.get_partial_row_count=function(){return n.S(this.ptr)>>>0},t.prototype.get_matching_ids=function(e){g(e,t),n.Q(8,this.ptr,e.ptr);var r=l()[2],o=l()[3],i=O(r,o).slice();return n.s(r,4*o),i},t}(),M=function(){function t(e,r){var o=n.bb(e,r);return t.__wrap(o)}return t.__wrap=function(e){var r=Object.create(t.prototype);return r.ptr=e,r},t.prototype.free=function(){var t=this.ptr;this.ptr=0,n.e(t)},Object.defineProperty(t.prototype,"rows",{get:function(){return n.i(this.ptr)>>>0},set:function(t){n.o(this.ptr,t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columns",{get:function(){return n.h(this.ptr)>>>0},set:function(t){n.n(this.ptr,t)},enumerable:!1,configurable:!0}),t}(),R=function(){function t(){}return t.__wrap=function(e){var r=Object.create(t.prototype);return r.ptr=e,r},t.prototype.free=function(){var t=this.ptr;this.ptr=0,n.j(t)},t.prototype.get_name=function(){try{n.z(8,this.ptr);var t=l()[2],e=l()[3];return y(t,e)}finally{n.s(t,e)}},t.prototype.get_data_ptr=function(){return n.eb(this.ptr)},t.prototype.get_data_indices=function(){return n.cb(this.ptr)},t.prototype.get_data_info=function(){return n.db(this.ptr)},t.prototype.get_rows_count=function(){return n.fb(this.ptr)>>>0},t.prototype.get_value_at_index=function(t){return n.gb(this.ptr,t)},t}(),C=function(){function t(){}return t.__wrap=function(e){var r=Object.create(t.prototype);return r.ptr=e,r},t.prototype.free=function(){var t=this.ptr;this.ptr=0,n.k(t)},t.prototype.get_filtered_dm=function(){var t=n.jb(this.ptr);return 0===t?void 0:N.__wrap(t)},t.prototype.get_unfiltered_dm=function(){var t=n.kb(this.ptr);return 0===t?void 0:N.__wrap(t)},t}(),F=function(){function t(){}return t.__wrap=function(e){var r=Object.create(t.prototype);return r.ptr=e,r},t.prototype.free=function(){var t=this.ptr;this.ptr=0,n.p(t)},t.prototype.get_dm=function(){var t=n.lb(this.ptr);return N.__wrap(t)},t.prototype.get_count=function(){return n.K(this.ptr)>>>0},t}(),P=function(){function t(){}return t.__wrap=function(e){var r=Object.create(t.prototype);return r.ptr=e,r},t.prototype.free=function(){var t=this.ptr;this.ptr=0,n.q(t)},t.prototype.get_y_0=function(){return n.pb(this.ptr)},t.prototype.get_y_1=function(){return n.qb(this.ptr)},t.prototype.get_id=function(){return n.ob(this.ptr)},t.prototype.free_data=function(){n.nb(this.ptr)},t}(),I=function(){function t(){}return t.__wrap=function(e){var r=Object.create(t.prototype);return r.ptr=e,r},t.prototype.free=function(){var t=this.ptr;this.ptr=0,n.r(t)},t.prototype.get_name=function(){try{n.z(8,this.ptr);var t=l()[2],e=l()[3];return y(t,e)}finally{n.s(t,e)}},t.prototype.get_data_ptr=function(){return n.sb(this.ptr)},t.prototype.get_data_indices=function(){return n.rb(this.ptr)},t.prototype.get_data_info=function(){return n.x(this.ptr)},t.prototype.get_rows_count=function(){return n.A(this.ptr)>>>0},t.prototype.get_value_at_index=function(t){return n.ub(this.ptr,t)},t.prototype.min_consecutive_diff=function(){return n.vb(this.ptr)},t.prototype.get_domain=function(){n.tb(8,this.ptr);var t=l()[2],e=l()[3],r=S(t,e).slice();return n.s(t,8*e),r},t}(),j=function(t,e){var r=i(e),o=function(t,e,r){if(void 0===r){var n=s.encode(t),o=e(n.length);return c().subarray(o,o+n.length).set(n),a=n.length,o}for(var i=t.length,u=e(i),p=c(),l=0;l127)break;p[u+l]=d}if(l!==i){0!==l&&(t=t.slice(l)),u=r(u,i,i=l+3*t.length);var h=c().subarray(u+l,u+i);l+=f(t,h).written}return a=l,u}(JSON.stringify(void 0===r?null:r),n.t,n.u),u=a;l()[t/4+1]=u,l()[t/4+0]=o},L=function(t){h(t)},U=function(t,e){throw new Error(y(t,e))};n.v()},115:function(t,e,r){"use strict";var n=r.w[t.i];t.exports=n;r(114);n.wb()},116:function(t,e,r){(function(t){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),c=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),h(r)?n.showHidden=r:r&&e._extend(n,r),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),f(n,t,n.depth)}function c(t,e){var r=u.styles[e];return r?"["+u.colors[r][0]+"m"+t+"["+u.colors[r][1]+"m":t}function s(t,e){return t}function f(t,r,n){if(t.customInspect&&r&&A(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,t);return g(o)||(o=f(t,o,n)),o}var i=function(t,e){if(_(e))return t.stylize("undefined","undefined");if(g(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(y(e))return t.stylize(""+e,"number");if(h(e))return t.stylize(""+e,"boolean");if(v(e))return t.stylize("null","null")}(t,r);if(i)return i;var a=Object.keys(r),u=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),O(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(r);if(0===a.length){if(A(r)){var c=r.name?": "+r.name:"";return t.stylize("[Function"+c+"]","special")}if(m(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return t.stylize(Date.prototype.toString.call(r),"date");if(O(r))return p(r)}var s,b="",S=!1,x=["{","}"];(d(r)&&(S=!0,x=["[","]"]),A(r))&&(b=" [Function"+(r.name?": "+r.name:"")+"]");return m(r)&&(b=" "+RegExp.prototype.toString.call(r)),w(r)&&(b=" "+Date.prototype.toUTCString.call(r)),O(r)&&(b=" "+p(r)),0!==a.length||S&&0!=r.length?n<0?m(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),s=S?function(t,e,r,n,o){for(var i=[],a=0,u=e.length;a=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(s,b,x)):x[0]+b+x[1]}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,r,n,o,i){var a,u,c;if((c=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?u=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(u=t.stylize("[Setter]","special")),D(n,o)||(a="["+o+"]"),u||(t.seen.indexOf(c.value)<0?(u=v(r)?f(t,c.value,null):f(t,c.value,r-1)).indexOf("\n")>-1&&(u=i?u.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+u.split("\n").map((function(t){return" "+t})).join("\n")):u=t.stylize("[Circular]","special")),_(a)){if(i&&o.match(/^\d+$/))return u;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+u}function d(t){return Array.isArray(t)}function h(t){return"boolean"==typeof t}function v(t){return null===t}function y(t){return"number"==typeof t}function g(t){return"string"==typeof t}function _(t){return void 0===t}function m(t){return b(t)&&"[object RegExp]"===S(t)}function b(t){return"object"==typeof t&&null!==t}function w(t){return b(t)&&"[object Date]"===S(t)}function O(t){return b(t)&&("[object Error]"===S(t)||t instanceof Error)}function A(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function x(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(r){if(_(i)&&(i=t.env.NODE_DEBUG||""),r=r.toUpperCase(),!a[r])if(new RegExp("\\b"+r+"\\b","i").test(i)){var n=t.pid;a[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,n,t)}}else a[r]=function(){};return a[r]},e.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=h,e.isNull=v,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=g,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=_,e.isRegExp=m,e.isObject=b,e.isDate=w,e.isError=O,e.isFunction=A,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(121);var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var t=new Date,e=[x(t.getHours()),x(t.getMinutes()),x(t.getSeconds())].join(":");return[t.getDate(),E[t.getMonth()],e].join(" ")}function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",T(),e.format.apply(e,arguments))},e.inherits=r(122),e._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var N="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function M(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(N&&t[N]){var e;if("function"!=typeof(e=t[N]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,N,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),o=[],i=0;i9999?"+"+l(r,6):l(r,4))+"-"+l(t.getUTCMonth()+1,2)+"-"+l(t.getUTCDate(),2)+(a?"T"+l(e,2)+":"+l(n,2)+":"+l(o,2)+"."+l(a,3)+"Z":o?"T"+l(e,2)+":"+l(n,2)+":"+l(o,2)+"Z":n||e?"T"+l(e,2)+":"+l(n,2)+"Z":"")}var d=function(t){var r=new RegExp(\'["\'+t+"\\n\\r]"),e=t.charCodeAt(0);function n(t,r){var n,o=[],a=t.length,u=0,c=0,s=a<=0,l=!1;function p(){if(s)return f;if(l)return l=!1,i;var r,n,o=u;if(34===t.charCodeAt(o)){for(;u++=a?s=!0:10===(n=t.charCodeAt(u++))?l=!0:13===n&&(l=!0,10===t.charCodeAt(u)&&++u),t.slice(o+1,r-1).replace(/""/g,\'"\')}for(;u0)&&!(n=a.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=a.return)&&e.call(a)}finally{if(o)throw o.error}}return u},h=function(){for(var t=[],r=0;ro.getFullYear()&&(r=""+(a-1)+n),y(r).getFullYear()},formatter:function(t){var r,e=y(t).getFullYear().toString();return e&&(r=e.length,e=e.substring(r-2,r)),e}},Y:{name:"Y",index:0,extract:function(){return"(\\\\d{4})"},parser:v.defaultNumberParser(),formatter:function(t){return y(t).getFullYear().toString()}}}},v.getTokenFormalNames=function(){var t=v.getTokenDefinitions();return{HOUR:t.H,HOUR_12:t.l,AMPM_UPPERCASE:t.p,AMPM_LOWERCASE:t.P,MINUTE:t.M,SECOND:t.S,SHORT_DAY:t.a,LONG_DAY:t.A,DAY_OF_MONTH:t.e,DAY_OF_MONTH_CONSTANT_WIDTH:t.d,SHORT_MONTH:t.b,LONG_MONTH:t.B,MONTH_OF_YEAR:t.m,SHORT_YEAR:t.y,LONG_YEAR:t.Y}},v.tokenResolver=function(){var t=v.getTokenDefinitions(),r=function(){for(var t=[],r=0;r=0;)e=t[r+1],-1!==a.indexOf(e)&&u.push({index:r,token:e});return u},v.formatAs=function(t,r){var e,n,o,a,u=y(t),i=v.findTokens(r),f=v.getTokenDefinitions(),c=String(r),s=v.TOKEN_PREFIX;for(o=0,a=i.length;o=0;i--)(n=l[i].index)+1!==a.length-1?(void 0===r&&(r=a.length),o=a.substring(n+2,r),a=a.substring(0,n+2)+RegExp.escape(o)+a.substring(r,a.length),r=n):r=n;for(i=0;i0)&&!(n=a.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=a.return)&&e.call(a)}finally{if(o)throw o.error}}return u},w=function(){for(var t=[],r=0;r0)&&!(n=a.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=a.return)&&e.call(a)}finally{if(o)throw o.error}}return u},H=function(){for(var t=[],r=0;r1)for(var r=1;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},y=function(){for(var t=[],e=0;eo.getFullYear()&&(e=""+(i-1)+n),g(e).getFullYear()},formatter:function(t){var e,r=g(t).getFullYear().toString();return r&&(e=r.length,r=r.substring(e-2,e)),r}},Y:{name:"Y",index:0,extract:function(){return"(\\d{4})"},parser:m.defaultNumberParser(),formatter:function(t){return g(t).getFullYear().toString()}}}},m.getTokenFormalNames=function(){var t=m.getTokenDefinitions();return{HOUR:t.H,HOUR_12:t.l,AMPM_UPPERCASE:t.p,AMPM_LOWERCASE:t.P,MINUTE:t.M,SECOND:t.S,SHORT_DAY:t.a,LONG_DAY:t.A,DAY_OF_MONTH:t.e,DAY_OF_MONTH_CONSTANT_WIDTH:t.d,SHORT_MONTH:t.b,LONG_MONTH:t.B,MONTH_OF_YEAR:t.m,SHORT_YEAR:t.y,LONG_YEAR:t.Y}},m.tokenResolver=function(){var t=m.getTokenDefinitions(),e=function(){for(var t=[],e=0;e=0;)r=t[e+1],-1!==i.indexOf(r)&&a.push({index:e,token:r});return a},m.formatAs=function(t,e){var r,n,o,i,a=g(t),u=m.findTokens(e),c=m.getTokenDefinitions(),s=String(e),f=m.TOKEN_PREFIX;for(o=0,i=u.length;o=0;u--)(n=p[u].index)+1!==i.length-1?(void 0===e&&(e=i.length),o=i.substring(n+2,e),i=i.substring(0,n+2)+RegExp.escape(o)+i.substring(e,i.length),e=n):e=n;for(u=0;u1&&void 0!==arguments[1]?arguments[1]:0,r=(M[t[e+0]]+M[t[e+1]]+M[t[e+2]]+M[t[e+3]]+"-"+M[t[e+4]]+M[t[e+5]]+"-"+M[t[e+6]]+M[t[e+7]]+"-"+M[t[e+8]]+M[t[e+9]]+"-"+M[t[e+10]]+M[t[e+11]]+M[t[e+12]]+M[t[e+13]]+M[t[e+14]]+M[t[e+15]]).toLowerCase();if(!N(r))throw TypeError("Stringified UUID is invalid");return r};var F=function(t,e,r){var n=(t=t||{}).random||(t.rng||T)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var o=0;o<16;++o)e[r+o]=n[o];return e}return C(n)},P=new Map,I=function(t){return t.isFree},j=function(t){var e=function(){return t.find(I)};return function(t){var r,n=F(),o=function(t){if(null==t||""===t)throw new Error("Please give a promise id");if(P.has(t))throw new Error("A promise with "+t+" id already exists, please destroy or resolve or reject it first");return new Promise((function(e,r){P.set(t,{doResolve:e,doReject:r})}))}(n);return(r=e(),new Promise((function(t){if(null==r)var n=setInterval((function(){var r=e();null!=r&&(r.isFree=!1,clearInterval(n),t(r))}),64);else r.isFree=!1,t(r)}))).then((function(e){var r=e.worker;r.addEventListener("message",(function(t){var r=t.data,n=r.reqId,o=r.data;e.isFree=!0,o.error?function(t,e){if(P.has(t)){var r=P.get(t).doReject;P.delete(t),r(e)}}(n,new Error(o.error)):function(t,e){if(P.has(t)){var r=P.get(t),n=r.doResolve,o=r.doReject;P.delete(t),Promise.resolve(e).then((function(t){n(t)})).catch((function(t){o(t)}))}}(n,o.data)})),r.postMessage({data:t,reqId:n,type:"transform-data"})})),o}},L={},U={};function k(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function H(t){var e=Object.create(null),r=[];return t.forEach((function(t){for(var n in t)n in e||r.push(e[n]=n)})),r}function V(t,e){var r=t+"",n=r.length;return n9999?"+"+V(e,6):V(e,4))+"-"+V(t.getUTCMonth()+1,2)+"-"+V(t.getUTCDate(),2)+(i?"T"+V(r,2)+":"+V(n,2)+":"+V(o,2)+"."+V(i,3)+"Z":o?"T"+V(r,2)+":"+V(n,2)+":"+V(o,2)+"Z":n||r?"T"+V(r,2)+":"+V(n,2)+"Z":"")}var B,J,G=function(t){var e=new RegExp('["'+t+"\n\r]"),r=t.charCodeAt(0);function n(t,e){var n,o=[],i=t.length,a=0,u=0,c=i<=0,s=!1;function f(){if(c)return U;if(s)return s=!1,L;var e,n,o=a;if(34===t.charCodeAt(o)){for(;a++=i?c=!0:10===(n=t.charCodeAt(a++))?s=!0:13===n&&(s=!0,10===t.charCodeAt(a)&&++a),t.slice(o+1,e-1).replace(/""/g,'"')}for(;a0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},nt=function(){for(var t=[],e=0;e0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},ct=function(){for(var t=[],e=0;e0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]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]0){r.conditions=[];for(var i=0;i0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},qt=function(){for(var t=[],e=0;e0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},se=function(){for(var t=[],e=0;e0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},me=function(){for(var t=[],e=0;e-1&&this._children.splice(e,1)},e.prototype.detachParent=function(){return this._parent=void 0,this},e.prototype.getData=function(){return this._context.getData()},e.prototype.getDataMeta=function(){return this._context.getDataMeta()},e.prototype.getSchema=function(){return this._context.getSchema()},e.prototype.clone=function(t){void 0===t&&(t=!0);var r=new e(this);return t&&(le(this,!0),this._children.push(r),r._parent=this),r},e.prototype.sort=function(t){var e=this._context.sort(t),r=this.cloneFromContext(e);return r._derivations.push({operation:W.SORT,params:t}),r},e.prototype.select=function(t,e){var r=(e||{}).mode,n=void 0===r?s.NORMAL:r,o=this._context.select(t,{mode:n}),i=this.cloneFromContext(o);return i instanceof Array?(i[0]._derivations.push({operation:W.SELECT,params:{query:t,options:{mode:s.NORMAL}}}),i[1]._derivations.push({operation:W.SELECT,params:{query:t,options:{mode:s.INVERSE}}})):i._derivations.push({operation:W.SELECT,params:{query:t,options:{mode:n}}}),i},e.prototype.splitByRow=function(t){var e=this._context.splitByRow(t),r=this.cloneFromContext(e);return r.map((function(e){var r=function(t,e){var r={},n=e.length;if(1===n){var o=t.getField(e[0]);r=o?ve(o.domain()[0],e[0]):{}}else n>1&&(r.conditions=[],e.forEach((function(e,n){var o=t.getField(e);o&&(r.operator=u.AND,r.conditions[n]=ve(o.domain()[0],e))})));return r}(e,t);return e._commonDerivation={operation:W.SPLIT,params:{fields:t}},e._derivations.push({operation:W.SELECT,params:{query:r,options:{mode:s.NORMAL}}})})),r},e.prototype.project=function(t,e){var r=(e||{}).mode,n=void 0===r?s.NORMAL:r,o=this._context.project(t,{mode:n}),i=this.cloneFromContext(o);return i instanceof Array?(i[0]._derivations.push({operation:W.PROJECT,params:{fields:t,options:{mode:s.NORMAL}}}),i[1]._derivations.push({operation:W.PROJECT,params:{fields:t,options:{mode:s.INVERSE}}})):i._derivations.push({operation:W.PROJECT,params:{fields:t,options:e}}),i},e.prototype.groupBy=function(t,e,r){void 0===e&&(e=[]),void 0===r&&(r={});var n=this._context.groupBy(t,e,r),o=this.cloneFromContext(n);return o._derivations.push({operation:W.GROUPBY,params:{fields:t,reducers:e}}),o},e.prototype.disposeRecursive=function(t){void 0===t&&(t=!0),this._refCount=Math.max(this._refCount-1,0),(0===this._refCount||t)&&(this.disposeResources(),this.getChildren().forEach((function(e){e.disposeRecursive(t)})))},e.prototype.getPropagationCriterias=function(){return this._propagationInfo.propagationCriterias},e.prototype.dispose=function(t){if(void 0===t&&(t=!0),!this._disposed){var e=this.getParent();this.disposeRecursive(t),le(e,!1),function(t){for(;t;){var e=null==t?void 0:t.getParent();!t._refCount&&t.disposeResources(),t=e}}(e)}return this},e.prototype.disposeResources=function(){var t;if(this._disposed)return this;var e=this._derivations[this._derivations.length-1];if(e){var r=e.operation;this._context.dispose(pe[r](e.params))}else this._context.dispose({disposeFields:!0,disposePartialFields:{dispose:!1,values:[]}});return null===(t=this._parent)||void 0===t||t.removeChild(this),this.detachParent(),this._disposed=!0,this},e.prototype.propagate=function(t,e){var r=function(t){for(;t;){var e=null==t?void 0:t.getParent();if(!e)break;t=e}return t}(this),n=t.map((function(t){return t.criteria})).filter((function(t){return null!==t})),o=n.length?{operator:e.queryOperator||"and",conditions:n}:null,i=function(t,e){var r=new Map;return t.forEach((function(t){for(var n=t.dm,o=void 0===n?e:n,i=t.criteria,a=t.fields,u=o,c=a.slice(),s=a.some((function(t){var e;return(null===(e=o.getField(t))||void 0===e?void 0:e.type())===B.MEASURE})),f=function(){var t=null==u?void 0:u.getParent(),e=u.getDerivations();if(e.length){var n=e[0].operation===W.GROUPBY&&s,o=c.filter((function(e){return t.getField(e)}));if(n)return r.set(null==u?void 0:u.id(),i),"break";o.length