@cubejs-backend/server-core 0.31.21 → 0.31.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/playground/asset-manifest.json +38 -38
- package/playground/chart-renderers/react/index.html +1 -1
- package/playground/chart-renderers/react/static/css/main.1607577d.css +9 -0
- package/playground/chart-renderers/react/static/js/main.71cb3173.js +2 -0
- package/playground/index.html +1 -1
- package/playground/static/js/{0.d65da032.chunk.js → 0.7620deb7.chunk.js} +1 -1
- package/playground/static/js/{1.6629ffdd.chunk.js → 1.eb173039.chunk.js} +1 -1
- package/playground/static/js/{12.a7bda4bb.chunk.js → 12.91514692.chunk.js} +2 -2
- package/playground/static/js/{12.a7bda4bb.chunk.js.LICENSE.txt → 12.91514692.chunk.js.LICENSE.txt} +2 -0
- package/playground/static/js/{13.e76b40a6.chunk.js → 13.92083fba.chunk.js} +2 -2
- package/playground/static/js/{13.e76b40a6.chunk.js.LICENSE.txt → 13.92083fba.chunk.js.LICENSE.txt} +0 -0
- package/playground/static/js/{14.eee9f79b.chunk.js → 14.0cfe7b6f.chunk.js} +1 -1
- package/playground/static/js/{15.617d082b.chunk.js → 15.f38b6b5f.chunk.js} +1 -1
- package/playground/static/js/{16.e47c8da2.chunk.js → 16.1b335189.chunk.js} +1 -1
- package/playground/static/js/{17.cefa5296.chunk.js → 17.c086e6af.chunk.js} +1 -1
- package/playground/static/js/{18.7f4bd4a6.chunk.js → 18.a21f3b39.chunk.js} +1 -1
- package/playground/static/js/{19.dd308f86.chunk.js → 19.9bfcb348.chunk.js} +1 -1
- package/playground/static/js/{2.0a478859.chunk.js → 2.1a98b5cb.chunk.js} +1 -1
- package/playground/static/js/{20.1d51a3e9.chunk.js → 20.8b146a77.chunk.js} +1 -1
- package/playground/static/js/{21.2689acfd.chunk.js → 21.b69be632.chunk.js} +1 -1
- package/playground/static/js/{22.7df200fc.chunk.js → 22.fa40fe26.chunk.js} +1 -1
- package/playground/static/js/{23.01e44ec5.chunk.js → 23.5524e341.chunk.js} +1 -1
- package/playground/static/js/{24.361021bb.chunk.js → 24.f7da0ecd.chunk.js} +1 -1
- package/playground/static/js/{25.85933267.chunk.js → 25.8fed1751.chunk.js} +1 -1
- package/playground/static/js/{26.54c9a981.chunk.js → 26.2e4020c6.chunk.js} +1 -1
- package/playground/static/js/{27.6eb02dfd.chunk.js → 27.70b6131c.chunk.js} +1 -1
- package/playground/static/js/{28.4bc96666.chunk.js → 28.719988e2.chunk.js} +1 -1
- package/playground/static/js/{29.391f9d31.chunk.js → 29.3eceb22f.chunk.js} +1 -1
- package/playground/static/js/{3.ccb9fa75.chunk.js → 3.04731c2f.chunk.js} +1 -1
- package/playground/static/js/{30.283aafda.chunk.js → 30.b846564c.chunk.js} +1 -1
- package/playground/static/js/{31.2c32dfc6.chunk.js → 31.46d333af.chunk.js} +1 -1
- package/playground/static/js/{32.29801f2a.chunk.js → 32.8fd735a1.chunk.js} +1 -1
- package/playground/static/js/{4.d005a41e.chunk.js → 4.d45911cc.chunk.js} +1 -1
- package/playground/static/js/{5.913737fa.chunk.js → 5.7c8bf80e.chunk.js} +1 -1
- package/playground/static/js/{6.53253bba.chunk.js → 6.1ef0d8e8.chunk.js} +1 -1
- package/playground/static/js/{7.4bdcd23e.chunk.js → 7.71053dcd.chunk.js} +1 -1
- package/playground/static/js/{8.01fd14de.chunk.js → 8.d3853cd0.chunk.js} +1 -1
- package/playground/static/js/{9.346b1594.chunk.js → 9.dbc40770.chunk.js} +1 -1
- package/playground/static/js/main.883fa54d.chunk.js +1 -0
- package/playground/static/js/runtime-main.93b346ec.js +1 -0
- package/playground/chart-renderers/react/static/css/main.a8c5b8e2.css +0 -9
- package/playground/chart-renderers/react/static/js/main.5c621015.js +0 -2
- package/playground/static/js/main.7af709d5.chunk.js +0 -1
- package/playground/static/js/runtime-main.60515b6f.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[20],{
|
|
1
|
+
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[20],{941:function(e,r,n){"use strict";n.r(r);var t=n(7),a=n(192),l=n(78),i=n(321),s=n(689),o=n(105),c=n(800),u=n(150),d=n(98),j=n(1);r.default=function(e){var r=e.query;return Object(j.jsx)(o.d,{loadSql:!0,query:Object(t.a)(Object(t.a)({},r),{},{renewQuery:!0}),render:function(e){var r,n=e.sqlQuery,t=e.resultSet,o=e.error;if(o)return Object(j.jsx)(d.a,{error:o});var b=(null===t||void 0===t?void 0:t.serialize())||{},f=null===n||void 0===n?void 0:n.rawQuery(),y=null===(r=b.loadResponse)||void 0===r?void 0:r.results[0];return Object(j.jsxs)(i.a,{defaultActiveKey:"refreshKeys",tabBarExtraContent:Object(j.jsxs)("span",{children:["Last Refresh Time:\xa0",Object(j.jsx)("b",{children:null===y||void 0===y?void 0:y.lastRefreshTime})]}),children:[Object(j.jsx)(i.a.TabPane,{tab:"Refresh Keys",children:Object(j.jsx)(s.a,{loading:!n,pagination:!1,scroll:{x:!0},columns:[{title:"Refresh Key SQL",key:"refreshKey",render:function(e,r){return Object(j.jsx)(u.a,{code:Object(c.format)(r[0])})}},{title:"Value",key:"value",render:function(e,r){return Object(j.jsx)(u.a,{code:(null===y||void 0===y?void 0:y.refreshKeyValues)&&f&&JSON.stringify(y.refreshKeyValues[f.cacheKeyQueries.indexOf(r)],null,2)})}}],dataSource:null===f||void 0===f?void 0:f.cacheKeyQueries})},"refreshKeys"),Object(j.jsx)(i.a.TabPane,{tab:"Pre-aggregations",children:Object(j.jsx)(s.a,{loading:!n,pagination:!1,scroll:{x:!0},columns:[{title:"Table Name",key:"tableName",dataIndex:"tableName",render:function(e){return Object(j.jsx)("b",{children:e})}},{title:"Refresh Key SQL",key:"refreshKey",dataIndex:"invalidateKeyQueries",render:function(e){return e.map((function(e){return Object(j.jsx)(u.a,{code:Object(c.format)(e[0])},e[0])}))}},{title:"Refresh Key Value",key:"value",render:function(e,r){var n,t,a,l=null===y||void 0===y||null===(n=y.usedPreAggregations)||void 0===n||null===(t=n[r.tableName])||void 0===t?void 0:t.refreshKeyValues;return Array.isArray(l)&&(l=l.reduce((function(e,r){return e.concat(r)}),[])),null===(a=l)||void 0===a?void 0:a.map((function(e){return Object(j.jsx)(u.a,{code:JSON.stringify(e,null,2)},JSON.stringify(e))}))}}],dataSource:null===f||void 0===f?void 0:f.preAggregations})},"preAggregations"),Object(j.jsx)(i.a.TabPane,{tab:"Rollup Match Results",children:Object(j.jsx)(s.a,{loading:!n,pagination:!1,scroll:{x:!0},columns:[{title:"Rollup Name",key:"name",dataIndex:"name",render:function(e){return Object(j.jsx)("b",{children:e})}},{title:"Rollup Definition",key:"rollup",dataIndex:"references",render:function(e){return Object(j.jsx)(u.a,{code:JSON.stringify(e,null,2)})}},{title:"Can Be Used",key:"canUsePreAggregation",dataIndex:"canUsePreAggregation",render:function(e){return e?Object(j.jsx)(a.a,{style:{color:"#52c41a",fontSize:"2em"}}):Object(j.jsx)(l.a,{style:{color:"#c2371b",fontSize:"2em"}})}}],dataSource:null===f||void 0===f?void 0:f.rollupMatchResults})},"rollupMatchResults")]})}})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[21],{
|
|
1
|
+
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[21],{960:function(e,n,t){"use strict";t.r(n),t.d(n,"default",(function(){return A}));var r,i=t(15),a=t(932),u=t(931),o=t(14),l=t(0),c=(t(915),t(101)),s=t(52),d=t(26),b=t(7),f=t(9),v=t(50),h=t(51),k=t(732),E=t(738),m=["gt","gte","lt","lte"],O={equals:"in",notEquals:"notIn",notSet:"set"};!function(e){e.AND="AND",e.OR="OR",e.PLAIN="PLAIN"}(r||(r={}));var p,y=function(){function e(n,t){Object(v.a)(this,e),this.cubeQuery=n,this.types=t,this.cubes={},this.prepareCubes()}return Object(h.a)(e,[{key:"convert",value:function(){return E.a(function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CubeQuery";return{kind:k.a.DOCUMENT,definitions:[{kind:k.a.OPERATION_DEFINITION,name:{kind:k.a.NAME,value:t},operation:"query",selectionSet:{kind:k.a.SELECTION_SET,selections:[{kind:k.a.FIELD,name:{kind:k.a.NAME,value:"cube"},arguments:e,selectionSet:{kind:k.a.SELECTION_SET,selections:n}}]}}]}}(this.getCubeArgs(),this.getFieldsSelections()))}},{key:"resolveFilter",value:function(e,n){var t=this,i=Object.values(e.reduce((function(e,n){if(n.or||n.and)return e;var t=(n.member||n.dimension).split("."),i=Object(f.a)(t,2),a=i[0],u=i[1];return e[a]||(e[a]={kind:r.PLAIN,cubeName:a,fields:[],filters:[]}),e[a].fields.push(u),e[a].filters.push(n),e}),{})),a=e.map((function(e){return!(!e.and&&!e.or)&&{kind:e.and?r.AND:r.OR,filters:e.and||e.or}})).filter(Boolean);return i.concat(a).map((function(e){return e.kind!==r.PLAIN?n?t.objectValue([t.booleanFilter(e.kind,t.resolveFilter(e.filters,e))]):t.booleanFilter(e.kind,t.resolveFilter(e.filters,e)):e.fields.length===Object(s.i)(e.fields).length?n?t.objectValue(t.objectFieldFilter(e.filters),Object(s.h)(e.cubeName)):t.objectFieldFilter(e.filters,Object(s.h)(e.cubeName)):t.objectField(t.booleanFilter((null===n||void 0===n?void 0:n.kind)||"AND",e.filters.map((function(n){return(n.and||n.or)&&t.resolveFilter(e.filters,e.kind),t.objectValue(t.objectFieldFilter(n))}))),Object(s.h)(e.cubeName))}))}},{key:"objectValue",value:function(e,n){return n?{kind:k.a.OBJECT,fields:[{kind:k.a.OBJECT_FIELD,name:{kind:k.a.NAME,value:n},value:{kind:k.a.OBJECT,fields:Array.isArray(e)?e:[e]}}]}:{kind:k.a.OBJECT,fields:Array.isArray(e)?e:[e]}}},{key:"objectFieldFilter",value:function(e,n){var t=this,r=Array.isArray(e)?e:[e],i=function(e){var n="number"===t.types[e.member||e.dimension]?k.a.FLOAT:k.a.STRING;return["set","notSet"].includes(e.operator)?{kind:k.a.BOOLEAN,value:"set"===e.operator}:"string"===typeof e.values?{kind:n,value:e.values}:1===e.values.length?{kind:n,value:e.values[0].toString()}:{kind:k.a.LIST,values:e.values.map((function(e){return{kind:n,value:e}}))}},a=r.map((function(e){var n=e.member||e.dimension;if(!t.types[n])throw new Error('Unknown member type for "'.concat(n,'". Make sure "').concat(n,'" exists in the schema.'));if(m.includes(e.operator)&&(e.values||[]).length>1)throw new Error('Filter operator "'.concat(e.operator,'" must have a single value'));return{kind:k.a.OBJECT_FIELD,name:{kind:k.a.NAME,value:n.split(".")[1]},value:{kind:k.a.OBJECT,fields:void 0!==e.values||["set","notSet"].includes(e.operator)?[{kind:k.a.OBJECT_FIELD,name:{kind:k.a.NAME,value:"equals"===e.operator&&(e.values||[]).length<=1?e.operator:O[e.operator]||e.operator},value:i(e)}]:[]}}}));return n?[{kind:k.a.OBJECT_FIELD,name:{kind:k.a.NAME,value:n},value:{kind:k.a.OBJECT,fields:a}}]:a}},{key:"objectField",value:function(e,n){return{kind:k.a.OBJECT_FIELD,name:{kind:k.a.NAME,value:n},value:{kind:k.a.OBJECT,fields:Array.isArray(e)?e:[e]}}}},{key:"booleanFilter",value:function(e,n){return{kind:k.a.OBJECT_FIELD,name:{kind:k.a.NAME,value:e},value:{kind:k.a.LIST,values:n}}}},{key:"orderByArg",value:function(e){return{kind:k.a.ARGUMENT,name:{kind:k.a.NAME,value:"orderBy"},value:{kind:k.a.OBJECT,fields:e.map((function(e){var n=Object(f.a)(e,2),t=n[0],r=n[1];return{kind:k.a.OBJECT_FIELD,name:{kind:k.a.NAME,value:t},value:{kind:k.a.ENUM,value:r}}}))}}}},{key:"getFieldsSelections",value:function(){var e=this,n=[];return Object.entries(this.cubes).forEach((function(t){var r=Object(f.a)(t,2),i=r[0],a=r[1],u=a.fields,o=a.orderBy;n.push({kind:k.a.FIELD,name:{kind:k.a.NAME,value:i},arguments:o.length?[e.orderByArg(o)]:[],selectionSet:{kind:k.a.SELECTION_SET,selections:u.map((function(e){var n=null;return e.granularities&&(n={selectionSet:{kind:k.a.SELECTION_SET,selections:e.granularities.map((function(e){return{kind:k.a.FIELD,name:{kind:k.a.NAME,value:e}}}))}}),Object(b.a)({kind:k.a.FIELD,name:{kind:k.a.NAME,value:e.name}},n)}))}})})),n}},{key:"getCubeArgs",value:function(){var e=this,n=[["timezone",k.a.STRING],["limit",k.a.INT],["offset",k.a.INT]],t=[];n.forEach((function(n){var r=Object(f.a)(n,2),i=r[0],a=r[1];e.cubeQuery[i]&&t.push({kind:k.a.ARGUMENT,name:{kind:k.a.NAME,value:i},value:{kind:a,value:e.cubeQuery[i]}})}));var r=Object(d.a)(this.cubeQuery.filters||[]);return(this.cubeQuery.timeDimensions||[]).forEach((function(e){e.dateRange&&r.push({member:e.dimension,operator:"inDateRange",values:e.dateRange})})),r.length&&t.push({kind:k.a.ARGUMENT,name:{kind:k.a.NAME,value:"where"},value:{kind:k.a.OBJECT,fields:this.resolveFilter(r)}}),t}},{key:"prepareCubes",value:function(){var e,n=this,t=function(e){n.cubes[e]||(n.cubes[e]={fields:[],filters:[],orderBy:[]})};["measures","dimensions","segments"].forEach((function(e){n.cubeQuery[e]&&n.cubeQuery[e].forEach((function(e){var r=e.split("."),i=Object(f.a)(r,3),a=i[0],u=i[1],o=i[2],l=Object(s.h)(a),c=o;"time"===n.types["".concat(a,".").concat(u)]&&(c="value"),t(l);var v=n.cubes[l].fields.find((function(e){return e.name===u}));n.cubes[l].fields.push(Object(b.a)({name:u},c?{granularities:[].concat(Object(d.a)((null===v||void 0===v?void 0:v.granularities)||[]),[c])}:null))}))}));var r={};(null===(e=this.cubeQuery.timeDimensions)||void 0===e||e.forEach((function(e){var n=e.dimension.split("."),t=Object(f.a)(n,2),i=t[0],a=t[1],u="".concat(i,".").concat(a);e.granularity&&(r[u]=(r[u]||[]).concat([e.granularity]))})),Object.entries(r).forEach((function(e){var r=Object(f.a)(e,2),i=r[0],a=r[1],u=i.split("."),o=Object(f.a)(u,2),l=o[0],c=o[1],b=Object(s.h)(l);t(b);var v=n.cubes[b].fields.find((function(e){return e.name===c}));v?v.granularities=Object(s.i)([].concat(Object(d.a)(v.granularities||[]),Object(d.a)(a))):n.cubes[b].fields.push({name:c,granularities:a})})),this.cubeQuery.order)&&(Array.isArray(this.cubeQuery.order)?this.cubeQuery.order:Object.entries(this.cubeQuery.order)).forEach((function(e){var t=Object(f.a)(e,2),r=t[0],i=t[1],a=r.split("."),u=Object(f.a)(a,2),o=u[0],l=u[1],c=Object(s.h)(o);if(!n.cubes[c])throw new Error('Order without selecting the cube is not allowed. Did you forget to include the "'.concat(o,'" cube?'));if(!n.cubes[c].fields.find((function(e){return e.name===l})))throw new Error('Order without selecting the member is not allowed. Did you forget to include the "'.concat(l,'" member?'));n.cubes[c].orderBy.push([l,i])}))}}]),e}(),j=t(30),g=t(1),N=o.d.div(p||(p=Object(i.a)(["\n margin-top: -15px;\n height: 400px;\n border-radius: 8px;\n overflow: hidden;\n\n .graphiql-container {\n box-sizing: initial;\n\n * {\n box-sizing: initial;\n }\n\n .topBar {\n background: none;\n }\n\n .docExplorerShow {\n border-left: none;\n background: none;\n }\n\n .CodeMirror-scroll,\n .CodeMirror-lines {\n background: white;\n }\n\n .doc-explorer-title-bar {\n height: 50px;\n }\n }\n"])));function A(e){var n=e.apiUrl,t=e.query,r=e.meta,i=Object(j.i)().token,o=Object(j.l)(),d=i||o,b=Object(l.useMemo)((function(){return Object(a.a)({url:n.replace("/v1","/graphql"),headers:d?{authorization:d}:{}})}),[n,d]),f=Object(l.useMemo)((function(){return Object(s.f)(r)}),[r]),v=Object(c.a)((function(){if(!f)return"";try{return new y(t,f).convert().replace("{"," { ").replace("}"," } ")}catch(e){return"# ".concat(e,"\n")}}),[t,f]);return Object(g.jsx)(N,{children:Object(g.jsx)(u.a,{query:v,fetcher:b})})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[22],{
|
|
1
|
+
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[22],{940:function(n,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return d}));var t=r(9),a=r(0),o=r(105),c=r(800),u=r(150),l=r(98),s=r(1);function i(n){var e=n.sql,r=n.loading,t=n.onChange;return Object(a.useEffect)((function(){t({sql:e,loading:r})}),[e,r]),null}function d(n){var e=n.query,r=n.onChange;return Object(s.jsx)(o.d,{loadSql:"only",query:e,render:function(n){var e=n.sqlQuery,a=n.loadingState,o=n.error;if(o)return Object(s.jsx)(l.a,{error:o});var d=Array.isArray(e)?e:[e],j=Object(t.a)(d,1)[0],g=j&&Object(c.format)(j.sql());return Object(s.jsxs)(s.Fragment,{children:[Object(s.jsx)(u.a,{code:g}),Object(s.jsx)(i,{loading:a.isLoading,sql:g,onChange:function(n){var e=n.sql,t=n.loading;r({loading:t,value:e})}})]})}})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[23],{
|
|
1
|
+
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[23],{945:function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=a(r(728)),i=r(749),s=["error","warning","information","hint"],o={"GraphQL: Validation":"validation","GraphQL: Deprecation":"deprecation","GraphQL: Syntax":"syntax"};n.default.registerHelper("lint","graphql",(function(e,t){var r=t.schema;return i.getDiagnostics(e,r,t.validationRules,void 0,t.externalFragments).map((function(e){return{message:e.message,severity:e.severity?s[e.severity-1]:s[0],type:e.source?o[e.source]:void 0,from:n.default.Pos(e.range.start.line,e.range.start.character),to:n.default.Pos(e.range.end.line,e.range.end.character)}}))}))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[24],{
|
|
1
|
+
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[24],{959:function(e,t,n){"use strict";var u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(728)),l=n(749);function a(e,t){var n,u,r=e.levels;return((r&&0!==r.length?r[r.length-1]-((null===(n=this.electricInput)||void 0===n?void 0:n.test(t))?1:0):e.indentLevel)||0)*((null===(u=this.config)||void 0===u?void 0:u.indentUnit)||0)}r.default.defineMode("graphql-results",(function(e){var t=l.onlineParser({eatWhitespace:function(e){return e.eatSpace()},lexRules:i,parseRules:s,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:a,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}}));var i={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},s={Document:[l.p("{"),l.list("Entry",l.p(",")),l.p("}")],Entry:[l.t("String","def"),l.p(":"),"Value"],Value:function(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[l.t("Number","number")],StringValue:[l.t("String","string")],BooleanValue:[l.t("Keyword","builtin")],NullValue:[l.t("Keyword","keyword")],ListValue:[l.p("["),l.list("Value",l.p(",")),l.p("]")],ObjectValue:[l.p("{"),l.list("ObjectField",l.p(",")),l.p("}")],ObjectField:[l.t("String","property"),l.p(":"),"Value"]}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[25],{
|
|
1
|
+
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[25],{802:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(o(728));function u(e,t){var o=e.state.info,n=t.target||t.srcElement;if(n instanceof HTMLElement&&"SPAN"===n.nodeName&&void 0===o.hoverTimeout){var u=n.getBoundingClientRect(),r=function(){clearTimeout(o.hoverTimeout),o.hoverTimeout=setTimeout(f,m)},a=function t(){i.default.off(document,"mousemove",r),i.default.off(e.getWrapperElement(),"mouseout",t),clearTimeout(o.hoverTimeout),o.hoverTimeout=void 0},f=function(){i.default.off(document,"mousemove",r),i.default.off(e.getWrapperElement(),"mouseout",a),o.hoverTimeout=void 0,function(e,t){var o=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}),n=e.state.info.options,u=n.render||e.getHelper(o,"info");if(u){var r=e.getTokenAt(o,!0);if(r){var a=u(r,n,e,o);a&&function(e,t,o){var n=document.createElement("div");n.className="CodeMirror-info",n.appendChild(o),document.body.appendChild(n);var u=n.getBoundingClientRect(),r=window.getComputedStyle(n),a=u.right-u.left+parseFloat(r.marginLeft)+parseFloat(r.marginRight),f=u.bottom-u.top+parseFloat(r.marginTop)+parseFloat(r.marginBottom),m=t.bottom;f>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(m=t.top-f);m<0&&(m=t.bottom);var l,s=Math.max(0,window.innerWidth-a-15);s>t.left&&(s=t.left);n.style.opacity="1",n.style.top=m+"px",n.style.left=s+"px";var d=function(){clearTimeout(l)},p=function(){clearTimeout(l),l=setTimeout(c,200)},c=function(){i.default.off(n,"mouseover",d),i.default.off(n,"mouseout",p),i.default.off(e.getWrapperElement(),"mouseout",p),n.style.opacity?(n.style.opacity="0",setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n)}),600)):n.parentNode&&n.parentNode.removeChild(n)};i.default.on(n,"mouseover",d),i.default.on(n,"mouseout",p),i.default.on(e.getWrapperElement(),"mouseout",p)}(e,t,a)}}}(e,u)},m=function(e){var t=e.state.info.options;return t&&t.hoverTime||500}(e);o.hoverTimeout=setTimeout(f,m),i.default.on(document,"mousemove",r),i.default.on(e.getWrapperElement(),"mouseout",a)}}i.default.defineOption("info",!1,(function(e,t,o){if(o&&o!==i.default.Init){var n=e.state.info.onMouseOver;i.default.off(e.getWrapperElement(),"mouseover",n),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){var r=e.state.info=function(e){return{options:e instanceof Function?{render:e}:!0===e?{}:e}}(t);r.onMouseOver=u.bind(null,e),i.default.on(e.getWrapperElement(),"mouseover",r.onMouseOver)}}))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[26],{
|
|
1
|
+
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[26],{957:function(e,t,n){"use strict";var u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(728)),a=n(749);function l(e,t){var n,u,r=e.levels;return((r&&0!==r.length?r[r.length-1]-((null===(n=this.electricInput)||void 0===n?void 0:n.test(t))?1:0):e.indentLevel)||0)*((null===(u=this.config)||void 0===u?void 0:u.indentUnit)||0)}r.default.defineMode("graphql-variables",(function(e){var t=a.onlineParser({eatWhitespace:function(e){return e.eatSpace()},lexRules:i,parseRules:s,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:l,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}}));var i={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},s={Document:[a.p("{"),a.list("Variable",a.opt(a.p(","))),a.p("}")],Variable:[c("variable"),a.p(":"),"Value"],Value:function(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[a.t("Number","number")],StringValue:[a.t("String","string")],BooleanValue:[a.t("Keyword","builtin")],NullValue:[a.t("Keyword","keyword")],ListValue:[a.p("["),a.list("Value",a.opt(a.p(","))),a.p("]")],ObjectValue:[a.p("{"),a.list("ObjectField",a.opt(a.p(","))),a.p("}")],ObjectField:[c("attribute"),a.p(":"),"Value"]};function c(e){return{style:e,match:function(e){return"String"===e.kind},update:function(e,t){e.name=t.value.slice(1,-1)}}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[27],{
|
|
1
|
+
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[27],{942:function(e,n,t){!function(e){"use strict";var n={},t=/[^\s\u00a0]/,i=e.Pos,l=e.cmpPos;function o(e){var n=e.search(t);return-1==n?0:n}function a(e,n,t){return/\bstring\b/.test(e.getTokenTypeAt(i(n.line,0)))&&!/^[\'\"\`]/.test(t)}function r(e,n){var t=e.getMode();return!1!==t.useInnerComments&&t.innerMode?e.getModeAt(n):t}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",(function(e){e||(e=n);for(var t=this,l=1/0,o=this.listSelections(),a=null,r=o.length-1;r>=0;r--){var m=o[r].from(),c=o[r].to();m.line>=l||(c.line>=l&&(c=i(l,0)),l=m.line,null==a?t.uncomment(m,c,e)?a="un":(t.lineComment(m,c,e),a="line"):"un"==a?t.uncomment(m,c,e):t.lineComment(m,c,e))}})),e.defineExtension("lineComment",(function(e,l,m){m||(m=n);var c=this,s=r(c,e),g=c.getLine(e.line);if(null!=g&&!a(c,e,g)){var f=m.lineComment||s.lineComment;if(f){var u=Math.min(0!=l.ch||l.line==e.line?l.line+1:l.line,c.lastLine()+1),h=null==m.padding?" ":m.padding,d=m.commentBlankLines||e.line==l.line;c.operation((function(){if(m.indent){for(var n=null,l=e.line;l<u;++l){var a=(r=c.getLine(l)).slice(0,o(r));(null==n||n.length>a.length)&&(n=a)}for(l=e.line;l<u;++l){var r=c.getLine(l),s=n.length;(d||t.test(r))&&(r.slice(0,s)!=n&&(s=o(r)),c.replaceRange(n+f+h,i(l,0),i(l,s)))}}else for(l=e.line;l<u;++l)(d||t.test(c.getLine(l)))&&c.replaceRange(f+h,i(l,0))}))}else(m.blockCommentStart||s.blockCommentStart)&&(m.fullLines=!0,c.blockComment(e,l,m))}})),e.defineExtension("blockComment",(function(e,o,a){a||(a=n);var m=this,c=r(m,e),s=a.blockCommentStart||c.blockCommentStart,g=a.blockCommentEnd||c.blockCommentEnd;if(s&&g){if(!/\bcomment\b/.test(m.getTokenTypeAt(i(e.line,0)))){var f=Math.min(o.line,m.lastLine());f!=e.line&&0==o.ch&&t.test(m.getLine(f))&&--f;var u=null==a.padding?" ":a.padding;e.line>f||m.operation((function(){if(0!=a.fullLines){var n=t.test(m.getLine(f));m.replaceRange(u+g,i(f)),m.replaceRange(s+u,i(e.line,0));var r=a.blockCommentLead||c.blockCommentLead;if(null!=r)for(var h=e.line+1;h<=f;++h)(h!=f||n)&&m.replaceRange(r+u,i(h,0))}else{var d=0==l(m.getCursor("to"),o),p=!m.somethingSelected();m.replaceRange(g,o),d&&m.setSelection(p?o:m.getCursor("from"),o),m.replaceRange(s,e)}}))}}else(a.lineComment||c.lineComment)&&0!=a.fullLines&&m.lineComment(e,o,a)})),e.defineExtension("uncomment",(function(e,l,o){o||(o=n);var a,m=this,c=r(m,e),s=Math.min(0!=l.ch||l.line==e.line?l.line:l.line-1,m.lastLine()),g=Math.min(e.line,s),f=o.lineComment||c.lineComment,u=[],h=null==o.padding?" ":o.padding;e:if(f){for(var d=g;d<=s;++d){var p=m.getLine(d),v=p.indexOf(f);if(v>-1&&!/comment/.test(m.getTokenTypeAt(i(d,v+1)))&&(v=-1),-1==v&&t.test(p))break e;if(v>-1&&t.test(p.slice(0,v)))break e;u.push(p)}if(m.operation((function(){for(var e=g;e<=s;++e){var n=u[e-g],t=n.indexOf(f),l=t+f.length;t<0||(n.slice(l,l+h.length)==h&&(l+=h.length),a=!0,m.replaceRange("",i(e,t),i(e,l)))}})),a)return!0}var C=o.blockCommentStart||c.blockCommentStart,b=o.blockCommentEnd||c.blockCommentEnd;if(!C||!b)return!1;var k=o.blockCommentLead||c.blockCommentLead,L=m.getLine(g),x=L.indexOf(C);if(-1==x)return!1;var R=s==g?L:m.getLine(s),O=R.indexOf(b,s==g?x+C.length:0),T=i(g,x+1),S=i(s,O+1);if(-1==O||!/comment/.test(m.getTokenTypeAt(T))||!/comment/.test(m.getTokenTypeAt(S))||m.getRange(T,S,"\n").indexOf(b)>-1)return!1;var E=L.lastIndexOf(C,e.ch),y=-1==E?-1:L.slice(0,e.ch).indexOf(b,E+C.length);if(-1!=E&&-1!=y&&y+b.length!=e.ch)return!1;y=R.indexOf(b,l.ch);var M=R.slice(l.ch).lastIndexOf(C,y-l.ch);return E=-1==y||-1==M?-1:l.ch+M,(-1==y||-1==E||E==l.ch)&&(m.operation((function(){m.replaceRange("",i(s,O-(h&&R.slice(O-h.length,O)==h?h.length:0)),i(s,O+b.length));var e=x+C.length;if(h&&L.slice(e,e+h.length)==h&&(e+=h.length),m.replaceRange("",i(g,x),i(g,e)),k)for(var n=g+1;n<=s;++n){var l=m.getLine(n),o=l.indexOf(k);if(-1!=o&&!t.test(l.slice(0,o))){var a=o+k.length;h&&l.slice(a,a+h.length)==h&&(a+=h.length),m.replaceRange("",i(n,o),i(n,a))}}})),!0)}))}(t(728))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[28],{
|
|
1
|
+
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[28],{949:function(e,n,t){!function(e){var n={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},t=e.Pos;function r(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:n[t]}e.defineOption("autoCloseBrackets",!1,(function(n,t,s){s&&s!=e.Init&&(n.removeKeyMap(i),n.state.closeBrackets=null),t&&(a(r(t,"pairs")),n.state.closeBrackets=t,n.addKeyMap(i))}));var i={Backspace:o,Enter:c};function a(e){for(var n=0;n<e.length;n++){var t=e.charAt(n),r="'"+t+"'";i[r]||(i[r]=s(t))}}function s(e){return function(n){return f(n,e)}}function l(e){var n=e.state.closeBrackets;return!n||n.override?n:e.getModeAt(e.getCursor()).closeBrackets||n}function o(n){var i=l(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var a=r(i,"pairs"),s=n.listSelections(),o=0;o<s.length;o++){if(!s[o].empty())return e.Pass;var c=p(n,s[o].head);if(!c||a.indexOf(c)%2!=0)return e.Pass}for(o=s.length-1;o>=0;o--){var h=s[o].head;n.replaceRange("",t(h.line,h.ch-1),t(h.line,h.ch+1),"+delete")}}function c(n){var t=l(n),i=t&&r(t,"explode");if(!i||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),s=0;s<a.length;s++){if(!a[s].empty())return e.Pass;var o=p(n,a[s].head);if(!o||i.indexOf(o)%2!=0)return e.Pass}n.operation((function(){var e=n.lineSeparator()||"\n";n.replaceSelection(e+e,null),h(n,-1),a=n.listSelections();for(var t=0;t<a.length;t++){var r=a[t].head.line;n.indentLine(r,null,!0),n.indentLine(r+1,null,!0)}}))}function h(e,n){for(var t=[],r=e.listSelections(),i=0,a=0;a<r.length;a++){var s=r[a];s.head==e.getCursor()&&(i=a);var l=s.head.ch||n>0?{line:s.head.line,ch:s.head.ch+n}:{line:s.head.line-1};t.push({anchor:l,head:l})}e.setSelections(t,i)}function u(n){var r=e.cmpPos(n.anchor,n.head)>0;return{anchor:new t(n.anchor.line,n.anchor.ch+(r?-1:1)),head:new t(n.head.line,n.head.ch+(r?1:-1))}}function f(n,i){var a=l(n);if(!a||n.getOption("disableInput"))return e.Pass;var s=r(a,"pairs"),o=s.indexOf(i);if(-1==o)return e.Pass;for(var c,f=r(a,"closeBefore"),p=r(a,"triples"),g=s.charAt(o+1)==i,v=n.listSelections(),b=o%2==0,k=0;k<v.length;k++){var P,S=v[k],y=S.head,O=n.getRange(y,t(y.line,y.ch+1));if(b&&!S.empty())P="surround";else if(!g&&b||O!=i)if(g&&y.ch>1&&p.indexOf(i)>=0&&n.getRange(t(y.line,y.ch-2),y)==i+i){if(y.ch>2&&/\bstring/.test(n.getTokenTypeAt(t(y.line,y.ch-2))))return e.Pass;P="addFour"}else if(g){var x=0==y.ch?" ":n.getRange(t(y.line,y.ch-1),y);if(e.isWordChar(O)||x==i||e.isWordChar(x))return e.Pass;P="both"}else{if(!b||!(0===O.length||/\s/.test(O)||f.indexOf(O)>-1))return e.Pass;P="both"}else P=g&&d(n,y)?"both":p.indexOf(i)>=0&&n.getRange(y,t(y.line,y.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=P)return e.Pass}else c=P}var A=o%2?s.charAt(o-1):i,B=o%2?i:s.charAt(o+1);n.operation((function(){if("skip"==c)h(n,1);else if("skipThree"==c)h(n,3);else if("surround"==c){for(var e=n.getSelections(),t=0;t<e.length;t++)e[t]=A+e[t]+B;for(n.replaceSelections(e,"around"),e=n.listSelections().slice(),t=0;t<e.length;t++)e[t]=u(e[t]);n.setSelections(e)}else"both"==c?(n.replaceSelection(A+B,null),n.triggerElectric(A+B),h(n,-1)):"addFour"==c&&(n.replaceSelection(A+A+A+A,"before"),h(n,1))}))}function p(e,n){var r=e.getRange(t(n.line,n.ch-1),t(n.line,n.ch+1));return 2==r.length?r:null}function d(e,n){var r=e.getTokenAt(t(n.line,n.ch+1));return/\bstring/.test(r.type)&&r.start==n.ch&&(0==n.ch||!/\bstring/.test(e.getTokenTypeAt(n)))}a(n.pairs+"`")}(t(728))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[29],{
|
|
1
|
+
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[29],{803:function(t,e,n){!function(t){var e=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=t.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function a(t){return t&&t.bracketRegex||/[(){}[\]]/}function c(t,e,c){var o=t.getLineHandle(e.line),h=e.ch-1,s=c&&c.afterCursor;null==s&&(s=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var l=a(c),u=!s&&h>=0&&l.test(o.text.charAt(h))&&r[o.text.charAt(h)]||l.test(o.text.charAt(h+1))&&r[o.text.charAt(++h)];if(!u)return null;var f=">"==u.charAt(1)?1:-1;if(c&&c.strict&&f>0!=(h==e.ch))return null;var g=t.getTokenTypeAt(n(e.line,h+1)),m=i(t,n(e.line,h+(f>0?1:0)),f,g,c);return null==m?null:{from:n(e.line,h),to:m&&m.pos,match:m&&m.ch==u.charAt(0),forward:f>0}}function i(t,e,c,i,o){for(var h=o&&o.maxScanLineLength||1e4,s=o&&o.maxScanLines||1e3,l=[],u=a(o),f=c>0?Math.min(e.line+s,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-s),g=e.line;g!=f;g+=c){var m=t.getLine(g);if(m){var d=c>0?0:m.length-1,k=c>0?m.length:-1;if(!(m.length>h))for(g==e.line&&(d=e.ch-(c<0?1:0));d!=k;d+=c){var p=m.charAt(d);if(u.test(p)&&(void 0===i||(t.getTokenTypeAt(n(g,d+1))||"")==(i||""))){var v=r[p];if(v&&">"==v.charAt(1)==c>0)l.push(p);else{if(!l.length)return{pos:n(g,d),ch:p};l.pop()}}}}}return g-c!=(c>0?t.lastLine():t.firstLine())&&null}function o(t,r,a){for(var i=t.state.matchBrackets.maxHighlightLineLength||1e3,o=a&&a.highlightNonMatching,h=[],s=t.listSelections(),l=0;l<s.length;l++){var u=s[l].empty()&&c(t,s[l].head,a);if(u&&(u.match||!1!==o)&&t.getLine(u.from.line).length<=i){var f=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";h.push(t.markText(u.from,n(u.from.line,u.from.ch+1),{className:f})),u.to&&t.getLine(u.to.line).length<=i&&h.push(t.markText(u.to,n(u.to.line,u.to.ch+1),{className:f}))}}if(h.length){e&&t.state.focused&&t.focus();var g=function(){t.operation((function(){for(var t=0;t<h.length;t++)h[t].clear()}))};if(!r)return g;setTimeout(g,800)}}function h(t){t.operation((function(){t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null),t.state.matchBrackets.currentlyHighlighted=o(t,!1,t.state.matchBrackets)}))}function s(t){t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)}t.defineOption("matchBrackets",!1,(function(e,n,r){r&&r!=t.Init&&(e.off("cursorActivity",h),e.off("focus",h),e.off("blur",s),s(e)),n&&(e.state.matchBrackets="object"==typeof n?n:{},e.on("cursorActivity",h),e.on("focus",h),e.on("blur",s))})),t.defineExtension("matchBrackets",(function(){o(this,!0)})),t.defineExtension("findMatchingBracket",(function(t,e,n){return(n||"boolean"==typeof e)&&(n?(n.strict=e,e=n):e=e?{strict:!0}:null),c(this,t,e)})),t.defineExtension("scanForBracket",(function(t,e,n,r){return i(this,t,e,n,r)}))}(n(728))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[3,7,9],{764:function(e,n,t){!function(e){"use strict";var n,t,o=e.Pos;function r(e){var n=e.flags;return null!=n?n:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function i(e,n){for(var t=r(e),o=t,i=0;i<n.length;i++)-1==o.indexOf(n.charAt(i))&&(o+=n.charAt(i));return t==o?e:new RegExp(e.source,o)}function a(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function s(e,n,t){n=i(n,"g");for(var r=t.line,a=t.ch,s=e.lastLine();r<=s;r++,a=0){n.lastIndex=a;var l=e.getLine(r),c=n.exec(l);if(c)return{from:o(r,c.index),to:o(r,c.index+c[0].length),match:c}}}function l(e,n,t){if(!a(n))return s(e,n,t);n=i(n,"gm");for(var r,l=1,c=t.line,u=e.lastLine();c<=u;){for(var f=0;f<l&&!(c>u);f++){var h=e.getLine(c++);r=null==r?h:r+"\n"+h}l*=2,n.lastIndex=t.ch;var p=n.exec(r);if(p){var g=r.slice(0,p.index).split("\n"),d=p[0].split("\n"),m=t.line+g.length-1,v=g[g.length-1].length;return{from:o(m,v),to:o(m+d.length-1,1==d.length?v+d[0].length:d[d.length-1].length),match:p}}}}function c(e,n,t){for(var o,r=0;r<=e.length;){n.lastIndex=r;var i=n.exec(e);if(!i)break;var a=i.index+i[0].length;if(a>e.length-t)break;(!o||a>o.index+o[0].length)&&(o=i),r=i.index+1}return o}function u(e,n,t){n=i(n,"g");for(var r=t.line,a=t.ch,s=e.firstLine();r>=s;r--,a=-1){var l=e.getLine(r),u=c(l,n,a<0?0:l.length-a);if(u)return{from:o(r,u.index),to:o(r,u.index+u[0].length),match:u}}}function f(e,n,t){if(!a(n))return u(e,n,t);n=i(n,"gm");for(var r,s=1,l=e.getLine(t.line).length-t.ch,f=t.line,h=e.firstLine();f>=h;){for(var p=0;p<s&&f>=h;p++){var g=e.getLine(f--);r=null==r?g:g+"\n"+r}s*=2;var d=c(r,n,l);if(d){var m=r.slice(0,d.index).split("\n"),v=d[0].split("\n"),y=f+m.length,x=m[m.length-1].length;return{from:o(y,x),to:o(y+v.length-1,1==v.length?x+v[0].length:v[v.length-1].length),match:d}}}}function h(e,n,t,o){if(e.length==n.length)return t;for(var r=0,i=t+Math.max(0,e.length-n.length);;){if(r==i)return r;var a=r+i>>1,s=o(e.slice(0,a)).length;if(s==t)return a;s>t?i=a:r=a+1}}function p(e,r,i,a){if(!r.length)return null;var s=a?n:t,l=s(r).split(/\r|\n\r?/);e:for(var c=i.line,u=i.ch,f=e.lastLine()+1-l.length;c<=f;c++,u=0){var p=e.getLine(c).slice(u),g=s(p);if(1==l.length){var d=g.indexOf(l[0]);if(-1==d)continue e;return i=h(p,g,d,s)+u,{from:o(c,h(p,g,d,s)+u),to:o(c,h(p,g,d+l[0].length,s)+u)}}var m=g.length-l[0].length;if(g.slice(m)==l[0]){for(var v=1;v<l.length-1;v++)if(s(e.getLine(c+v))!=l[v])continue e;var y=e.getLine(c+l.length-1),x=s(y),C=l[l.length-1];if(x.slice(0,C.length)==C)return{from:o(c,h(p,g,m,s)+u),to:o(c+l.length-1,h(y,x,C.length,s))}}}}function g(e,r,i,a){if(!r.length)return null;var s=a?n:t,l=s(r).split(/\r|\n\r?/);e:for(var c=i.line,u=i.ch,f=e.firstLine()-1+l.length;c>=f;c--,u=-1){var p=e.getLine(c);u>-1&&(p=p.slice(0,u));var g=s(p);if(1==l.length){var d=g.lastIndexOf(l[0]);if(-1==d)continue e;return{from:o(c,h(p,g,d,s)),to:o(c,h(p,g,d+l[0].length,s))}}var m=l[l.length-1];if(g.slice(0,m.length)==m){var v=1;for(i=c-l.length+1;v<l.length-1;v++)if(s(e.getLine(i+v))!=l[v])continue e;var y=e.getLine(c+1-l.length),x=s(y);if(x.slice(x.length-l[0].length)==l[0])return{from:o(c+1-l.length,h(y,x,y.length-l[0].length,s)),to:o(c,h(p,g,m.length,s))}}}}function d(e,n,t,r){var a;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,t=t?e.clipPos(t):o(0,0),this.pos={from:t,to:t},"object"==typeof r?a=r.caseFold:(a=r,r=null),"string"==typeof n?(null==a&&(a=!1),this.matches=function(t,o){return(t?g:p)(e,n,o,a)}):(n=i(n,"gm"),r&&!1===r.multiline?this.matches=function(t,o){return(t?u:s)(e,n,o)}:this.matches=function(t,o){return(t?f:l)(e,n,o)})}String.prototype.normalize?(n=function(e){return e.normalize("NFD").toLowerCase()},t=function(e){return e.normalize("NFD")}):(n=function(e){return e.toLowerCase()},t=function(e){return e}),d.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(n){var t=this.doc.clipPos(n?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(t=o(t.line,t.ch),n?(t.ch--,t.ch<0&&(t.line--,t.ch=(this.doc.getLine(t.line)||"").length)):(t.ch++,t.ch>(this.doc.getLine(t.line)||"").length&&(t.ch=0,t.line++)),0!=e.cmpPos(t,this.doc.clipPos(t))))return this.atOccurrence=!1;var r=this.matches(n,t);if(this.afterEmptyMatch=r&&0==e.cmpPos(r.from,r.to),r)return this.pos=r,this.atOccurrence=!0,this.pos.match||!0;var i=o(n?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:i,to:i},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(n,t){if(this.atOccurrence){var r=e.splitLines(n);this.doc.replaceRange(r,this.pos.from,this.pos.to,t),this.pos.to=o(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,n,t){return new d(this.doc,e,n,t)})),e.defineDocExtension("getSearchCursor",(function(e,n,t){return new d(this,e,n,t)})),e.defineExtension("selectMatches",(function(n,t){for(var o=[],r=this.getSearchCursor(n,this.getCursor("from"),t);r.findNext()&&!(e.cmpPos(r.to(),this.getCursor("to"))>0);)o.push({anchor:r.from(),head:r.to()});o.length&&this.setSelections(o,0)}))}(t(727))},765:function(e,n,t){!function(e){function n(n,t,o){var r,i=n.getWrapperElement();return(r=i.appendChild(document.createElement("div"))).className=o?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof t?r.innerHTML=t:r.appendChild(t),e.addClass(i,"dialog-opened"),r}function t(e,n){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=n}e.defineExtension("openDialog",(function(o,r,i){i||(i={}),t(this,null);var a=n(this,o,i.bottom),s=!1,l=this;function c(n){if("string"==typeof n)f.value=n;else{if(s)return;s=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),l.focus(),i.onClose&&i.onClose(a)}}var u,f=a.getElementsByTagName("input")[0];return f?(f.focus(),i.value&&(f.value=i.value,!1!==i.selectValueOnOpen&&f.select()),i.onInput&&e.on(f,"input",(function(e){i.onInput(e,f.value,c)})),i.onKeyUp&&e.on(f,"keyup",(function(e){i.onKeyUp(e,f.value,c)})),e.on(f,"keydown",(function(n){i&&i.onKeyDown&&i.onKeyDown(n,f.value,c)||((27==n.keyCode||!1!==i.closeOnEnter&&13==n.keyCode)&&(f.blur(),e.e_stop(n),c()),13==n.keyCode&&r(f.value,n))})),!1!==i.closeOnBlur&&e.on(a,"focusout",(function(e){null!==e.relatedTarget&&c()}))):(u=a.getElementsByTagName("button")[0])&&(e.on(u,"click",(function(){c(),l.focus()})),!1!==i.closeOnBlur&&e.on(u,"blur",c),u.focus()),c})),e.defineExtension("openConfirm",(function(o,r,i){t(this,null);var a=n(this,o,i&&i.bottom),s=a.getElementsByTagName("button"),l=!1,c=this,u=1;function f(){l||(l=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),c.focus())}s[0].focus();for(var h=0;h<s.length;++h){var p=s[h];!function(n){e.on(p,"click",(function(t){e.e_preventDefault(t),f(),n&&n(c)}))}(r[h]),e.on(p,"blur",(function(){--u,setTimeout((function(){u<=0&&f()}),200)})),e.on(p,"focus",(function(){++u}))}})),e.defineExtension("openNotification",(function(o,r){t(this,c);var i,a=n(this,o,r&&r.bottom),s=!1,l=r&&"undefined"!==typeof r.duration?r.duration:5e3;function c(){s||(s=!0,clearTimeout(i),e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a))}return e.on(a,"click",(function(n){e.e_preventDefault(n),c()})),l&&(i=setTimeout(c,l)),c}))}(t(727))},942:function(e,n,t){!function(e){"use strict";function n(e,n){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(n){e.lastIndex=n.pos;var t=e.exec(n.string);if(t&&t.index==n.pos)return n.pos+=t[0].length||1,"searching";t?n.pos=t.index:n.skipToEnd()}}}function t(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function o(e){return e.state.search||(e.state.search=new t)}function r(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,n,t){return e.getSearchCursor(n,t,{caseFold:r(n),multiline:!0})}function a(e,n,t,o,r){e.openDialog(n,o,{value:t,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){g(e)},onKeyDown:r,bottom:e.options.search.bottom})}function s(e,n,t,o,r){e.openDialog?e.openDialog(n,r,{value:o,selectValueOnOpen:!0,bottom:e.options.search.bottom}):r(prompt(t,o))}function l(e,n,t,o){e.openConfirm?e.openConfirm(n,o):confirm(t)&&o[0]()}function c(e){return e.replace(/\\([nrt\\])/g,(function(e,n){return"n"==n?"\n":"r"==n?"\r":"t"==n?"\t":"\\"==n?"\\":e}))}function u(e){var n=e.match(/^\/(.*)\/([a-z]*)$/);if(n)try{e=new RegExp(n[1],-1==n[2].indexOf("i")?"":"i")}catch(t){}else e=c(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function f(e,t,o){t.queryText=o,t.query=u(o),e.removeOverlay(t.overlay,r(t.query)),t.overlay=n(t.query,r(t.query)),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=e.showMatchesOnScrollbar(t.query,r(t.query)))}function h(n,t,r,i){var l=o(n);if(l.query)return p(n,t);var c=n.getSelection()||l.lastQuery;if(c instanceof RegExp&&"x^"==c.source&&(c=null),r&&n.openDialog){var u=null,h=function(t,o){e.e_stop(o),t&&(t!=l.queryText&&(f(n,l,t),l.posFrom=l.posTo=n.getCursor()),u&&(u.style.opacity=1),p(n,o.shiftKey,(function(e,t){var o;t.line<3&&document.querySelector&&(o=n.display.wrapper.querySelector(".CodeMirror-dialog"))&&o.getBoundingClientRect().bottom-4>n.cursorCoords(t,"window").top&&((u=o).style.opacity=.4)})))};a(n,m(n),c,h,(function(t,r){var i=e.keyName(t),a=n.getOption("extraKeys"),s=a&&a[i]||e.keyMap[n.getOption("keyMap")][i];"findNext"==s||"findPrev"==s||"findPersistentNext"==s||"findPersistentPrev"==s?(e.e_stop(t),f(n,o(n),r),n.execCommand(s)):"find"!=s&&"findPersistent"!=s||(e.e_stop(t),h(r,t))})),i&&c&&(f(n,l,c),p(n,t))}else s(n,m(n),"Search for:",c,(function(e){e&&!l.query&&n.operation((function(){f(n,l,e),l.posFrom=l.posTo=n.getCursor(),p(n,t)}))}))}function p(n,t,r){n.operation((function(){var a=o(n),s=i(n,a.query,t?a.posFrom:a.posTo);(s.find(t)||(s=i(n,a.query,t?e.Pos(n.lastLine()):e.Pos(n.firstLine(),0))).find(t))&&(n.setSelection(s.from(),s.to()),n.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),r&&r(s.from(),s.to()))}))}function g(e){e.operation((function(){var n=o(e);n.lastQuery=n.query,n.query&&(n.query=n.queryText=null,e.removeOverlay(n.overlay),n.annotate&&(n.annotate.clear(),n.annotate=null))}))}function d(e,n){var t=e?document.createElement(e):document.createDocumentFragment();for(var o in n)t[o]=n[o];for(var r=2;r<arguments.length;r++){var i=arguments[r];t.appendChild("string"==typeof i?document.createTextNode(i):i)}return t}function m(e){return d("",null,d("span",{className:"CodeMirror-search-label"},e.phrase("Search:"))," ",d("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",d("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function v(e){return d("",null," ",d("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",d("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function y(e){return d("",null,d("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",d("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}function x(e){return d("",null,d("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",d("button",{},e.phrase("Yes"))," ",d("button",{},e.phrase("No"))," ",d("button",{},e.phrase("All"))," ",d("button",{},e.phrase("Stop")))}function C(e,n,t){e.operation((function(){for(var o=i(e,n);o.findNext();)if("string"!=typeof n){var r=e.getRange(o.from(),o.to()).match(n);o.replace(t.replace(/\$(\d)/g,(function(e,n){return r[n]})))}else o.replace(t)}))}function N(e,n){if(!e.getOption("readOnly")){var t=e.getSelection()||o(e).lastQuery,r=n?e.phrase("Replace all:"):e.phrase("Replace:"),a=d("",null,d("span",{className:"CodeMirror-search-label"},r),v(e));s(e,a,r,t,(function(t){t&&(t=u(t),s(e,y(e),e.phrase("Replace with:"),"",(function(o){if(o=c(o),n)C(e,t,o);else{g(e);var r=i(e,t,e.getCursor("from")),a=function n(){var a,c=r.from();!(a=r.findNext())&&(r=i(e,t),!(a=r.findNext())||c&&r.from().line==c.line&&r.from().ch==c.ch)||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()}),l(e,x(e),e.phrase("Replace?"),[function(){s(a)},n,function(){C(e,t,o)}]))},s=function(e){r.replace("string"==typeof t?o:o.replace(/\$(\d)/g,(function(n,t){return e[t]}))),a()};a()}})))}))}}e.defineOption("search",{bottom:!1}),e.commands.find=function(e){g(e),h(e)},e.commands.findPersistent=function(e){g(e),h(e,!1,!0)},e.commands.findPersistentNext=function(e){h(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){h(e,!0,!0,!0)},e.commands.findNext=h,e.commands.findPrev=function(e){h(e,!0)},e.commands.clearSearch=g,e.commands.replace=N,e.commands.replaceAll=function(e){N(e,!0)}}(t(727),t(764),t(765))}}]);
|
|
1
|
+
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[3,7,9],{765:function(e,n,t){!function(e){"use strict";var n,t,o=e.Pos;function r(e){var n=e.flags;return null!=n?n:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function i(e,n){for(var t=r(e),o=t,i=0;i<n.length;i++)-1==o.indexOf(n.charAt(i))&&(o+=n.charAt(i));return t==o?e:new RegExp(e.source,o)}function a(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function s(e,n,t){n=i(n,"g");for(var r=t.line,a=t.ch,s=e.lastLine();r<=s;r++,a=0){n.lastIndex=a;var l=e.getLine(r),c=n.exec(l);if(c)return{from:o(r,c.index),to:o(r,c.index+c[0].length),match:c}}}function l(e,n,t){if(!a(n))return s(e,n,t);n=i(n,"gm");for(var r,l=1,c=t.line,u=e.lastLine();c<=u;){for(var f=0;f<l&&!(c>u);f++){var h=e.getLine(c++);r=null==r?h:r+"\n"+h}l*=2,n.lastIndex=t.ch;var p=n.exec(r);if(p){var g=r.slice(0,p.index).split("\n"),d=p[0].split("\n"),m=t.line+g.length-1,v=g[g.length-1].length;return{from:o(m,v),to:o(m+d.length-1,1==d.length?v+d[0].length:d[d.length-1].length),match:p}}}}function c(e,n,t){for(var o,r=0;r<=e.length;){n.lastIndex=r;var i=n.exec(e);if(!i)break;var a=i.index+i[0].length;if(a>e.length-t)break;(!o||a>o.index+o[0].length)&&(o=i),r=i.index+1}return o}function u(e,n,t){n=i(n,"g");for(var r=t.line,a=t.ch,s=e.firstLine();r>=s;r--,a=-1){var l=e.getLine(r),u=c(l,n,a<0?0:l.length-a);if(u)return{from:o(r,u.index),to:o(r,u.index+u[0].length),match:u}}}function f(e,n,t){if(!a(n))return u(e,n,t);n=i(n,"gm");for(var r,s=1,l=e.getLine(t.line).length-t.ch,f=t.line,h=e.firstLine();f>=h;){for(var p=0;p<s&&f>=h;p++){var g=e.getLine(f--);r=null==r?g:g+"\n"+r}s*=2;var d=c(r,n,l);if(d){var m=r.slice(0,d.index).split("\n"),v=d[0].split("\n"),y=f+m.length,x=m[m.length-1].length;return{from:o(y,x),to:o(y+v.length-1,1==v.length?x+v[0].length:v[v.length-1].length),match:d}}}}function h(e,n,t,o){if(e.length==n.length)return t;for(var r=0,i=t+Math.max(0,e.length-n.length);;){if(r==i)return r;var a=r+i>>1,s=o(e.slice(0,a)).length;if(s==t)return a;s>t?i=a:r=a+1}}function p(e,r,i,a){if(!r.length)return null;var s=a?n:t,l=s(r).split(/\r|\n\r?/);e:for(var c=i.line,u=i.ch,f=e.lastLine()+1-l.length;c<=f;c++,u=0){var p=e.getLine(c).slice(u),g=s(p);if(1==l.length){var d=g.indexOf(l[0]);if(-1==d)continue e;return i=h(p,g,d,s)+u,{from:o(c,h(p,g,d,s)+u),to:o(c,h(p,g,d+l[0].length,s)+u)}}var m=g.length-l[0].length;if(g.slice(m)==l[0]){for(var v=1;v<l.length-1;v++)if(s(e.getLine(c+v))!=l[v])continue e;var y=e.getLine(c+l.length-1),x=s(y),C=l[l.length-1];if(x.slice(0,C.length)==C)return{from:o(c,h(p,g,m,s)+u),to:o(c+l.length-1,h(y,x,C.length,s))}}}}function g(e,r,i,a){if(!r.length)return null;var s=a?n:t,l=s(r).split(/\r|\n\r?/);e:for(var c=i.line,u=i.ch,f=e.firstLine()-1+l.length;c>=f;c--,u=-1){var p=e.getLine(c);u>-1&&(p=p.slice(0,u));var g=s(p);if(1==l.length){var d=g.lastIndexOf(l[0]);if(-1==d)continue e;return{from:o(c,h(p,g,d,s)),to:o(c,h(p,g,d+l[0].length,s))}}var m=l[l.length-1];if(g.slice(0,m.length)==m){var v=1;for(i=c-l.length+1;v<l.length-1;v++)if(s(e.getLine(i+v))!=l[v])continue e;var y=e.getLine(c+1-l.length),x=s(y);if(x.slice(x.length-l[0].length)==l[0])return{from:o(c+1-l.length,h(y,x,y.length-l[0].length,s)),to:o(c,h(p,g,m.length,s))}}}}function d(e,n,t,r){var a;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,t=t?e.clipPos(t):o(0,0),this.pos={from:t,to:t},"object"==typeof r?a=r.caseFold:(a=r,r=null),"string"==typeof n?(null==a&&(a=!1),this.matches=function(t,o){return(t?g:p)(e,n,o,a)}):(n=i(n,"gm"),r&&!1===r.multiline?this.matches=function(t,o){return(t?u:s)(e,n,o)}:this.matches=function(t,o){return(t?f:l)(e,n,o)})}String.prototype.normalize?(n=function(e){return e.normalize("NFD").toLowerCase()},t=function(e){return e.normalize("NFD")}):(n=function(e){return e.toLowerCase()},t=function(e){return e}),d.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(n){var t=this.doc.clipPos(n?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(t=o(t.line,t.ch),n?(t.ch--,t.ch<0&&(t.line--,t.ch=(this.doc.getLine(t.line)||"").length)):(t.ch++,t.ch>(this.doc.getLine(t.line)||"").length&&(t.ch=0,t.line++)),0!=e.cmpPos(t,this.doc.clipPos(t))))return this.atOccurrence=!1;var r=this.matches(n,t);if(this.afterEmptyMatch=r&&0==e.cmpPos(r.from,r.to),r)return this.pos=r,this.atOccurrence=!0,this.pos.match||!0;var i=o(n?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:i,to:i},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(n,t){if(this.atOccurrence){var r=e.splitLines(n);this.doc.replaceRange(r,this.pos.from,this.pos.to,t),this.pos.to=o(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,n,t){return new d(this.doc,e,n,t)})),e.defineDocExtension("getSearchCursor",(function(e,n,t){return new d(this,e,n,t)})),e.defineExtension("selectMatches",(function(n,t){for(var o=[],r=this.getSearchCursor(n,this.getCursor("from"),t);r.findNext()&&!(e.cmpPos(r.to(),this.getCursor("to"))>0);)o.push({anchor:r.from(),head:r.to()});o.length&&this.setSelections(o,0)}))}(t(728))},766:function(e,n,t){!function(e){function n(n,t,o){var r,i=n.getWrapperElement();return(r=i.appendChild(document.createElement("div"))).className=o?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof t?r.innerHTML=t:r.appendChild(t),e.addClass(i,"dialog-opened"),r}function t(e,n){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=n}e.defineExtension("openDialog",(function(o,r,i){i||(i={}),t(this,null);var a=n(this,o,i.bottom),s=!1,l=this;function c(n){if("string"==typeof n)f.value=n;else{if(s)return;s=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),l.focus(),i.onClose&&i.onClose(a)}}var u,f=a.getElementsByTagName("input")[0];return f?(f.focus(),i.value&&(f.value=i.value,!1!==i.selectValueOnOpen&&f.select()),i.onInput&&e.on(f,"input",(function(e){i.onInput(e,f.value,c)})),i.onKeyUp&&e.on(f,"keyup",(function(e){i.onKeyUp(e,f.value,c)})),e.on(f,"keydown",(function(n){i&&i.onKeyDown&&i.onKeyDown(n,f.value,c)||((27==n.keyCode||!1!==i.closeOnEnter&&13==n.keyCode)&&(f.blur(),e.e_stop(n),c()),13==n.keyCode&&r(f.value,n))})),!1!==i.closeOnBlur&&e.on(a,"focusout",(function(e){null!==e.relatedTarget&&c()}))):(u=a.getElementsByTagName("button")[0])&&(e.on(u,"click",(function(){c(),l.focus()})),!1!==i.closeOnBlur&&e.on(u,"blur",c),u.focus()),c})),e.defineExtension("openConfirm",(function(o,r,i){t(this,null);var a=n(this,o,i&&i.bottom),s=a.getElementsByTagName("button"),l=!1,c=this,u=1;function f(){l||(l=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),c.focus())}s[0].focus();for(var h=0;h<s.length;++h){var p=s[h];!function(n){e.on(p,"click",(function(t){e.e_preventDefault(t),f(),n&&n(c)}))}(r[h]),e.on(p,"blur",(function(){--u,setTimeout((function(){u<=0&&f()}),200)})),e.on(p,"focus",(function(){++u}))}})),e.defineExtension("openNotification",(function(o,r){t(this,c);var i,a=n(this,o,r&&r.bottom),s=!1,l=r&&"undefined"!==typeof r.duration?r.duration:5e3;function c(){s||(s=!0,clearTimeout(i),e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a))}return e.on(a,"click",(function(n){e.e_preventDefault(n),c()})),l&&(i=setTimeout(c,l)),c}))}(t(728))},943:function(e,n,t){!function(e){"use strict";function n(e,n){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(n){e.lastIndex=n.pos;var t=e.exec(n.string);if(t&&t.index==n.pos)return n.pos+=t[0].length||1,"searching";t?n.pos=t.index:n.skipToEnd()}}}function t(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function o(e){return e.state.search||(e.state.search=new t)}function r(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,n,t){return e.getSearchCursor(n,t,{caseFold:r(n),multiline:!0})}function a(e,n,t,o,r){e.openDialog(n,o,{value:t,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){g(e)},onKeyDown:r,bottom:e.options.search.bottom})}function s(e,n,t,o,r){e.openDialog?e.openDialog(n,r,{value:o,selectValueOnOpen:!0,bottom:e.options.search.bottom}):r(prompt(t,o))}function l(e,n,t,o){e.openConfirm?e.openConfirm(n,o):confirm(t)&&o[0]()}function c(e){return e.replace(/\\([nrt\\])/g,(function(e,n){return"n"==n?"\n":"r"==n?"\r":"t"==n?"\t":"\\"==n?"\\":e}))}function u(e){var n=e.match(/^\/(.*)\/([a-z]*)$/);if(n)try{e=new RegExp(n[1],-1==n[2].indexOf("i")?"":"i")}catch(t){}else e=c(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function f(e,t,o){t.queryText=o,t.query=u(o),e.removeOverlay(t.overlay,r(t.query)),t.overlay=n(t.query,r(t.query)),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=e.showMatchesOnScrollbar(t.query,r(t.query)))}function h(n,t,r,i){var l=o(n);if(l.query)return p(n,t);var c=n.getSelection()||l.lastQuery;if(c instanceof RegExp&&"x^"==c.source&&(c=null),r&&n.openDialog){var u=null,h=function(t,o){e.e_stop(o),t&&(t!=l.queryText&&(f(n,l,t),l.posFrom=l.posTo=n.getCursor()),u&&(u.style.opacity=1),p(n,o.shiftKey,(function(e,t){var o;t.line<3&&document.querySelector&&(o=n.display.wrapper.querySelector(".CodeMirror-dialog"))&&o.getBoundingClientRect().bottom-4>n.cursorCoords(t,"window").top&&((u=o).style.opacity=.4)})))};a(n,m(n),c,h,(function(t,r){var i=e.keyName(t),a=n.getOption("extraKeys"),s=a&&a[i]||e.keyMap[n.getOption("keyMap")][i];"findNext"==s||"findPrev"==s||"findPersistentNext"==s||"findPersistentPrev"==s?(e.e_stop(t),f(n,o(n),r),n.execCommand(s)):"find"!=s&&"findPersistent"!=s||(e.e_stop(t),h(r,t))})),i&&c&&(f(n,l,c),p(n,t))}else s(n,m(n),"Search for:",c,(function(e){e&&!l.query&&n.operation((function(){f(n,l,e),l.posFrom=l.posTo=n.getCursor(),p(n,t)}))}))}function p(n,t,r){n.operation((function(){var a=o(n),s=i(n,a.query,t?a.posFrom:a.posTo);(s.find(t)||(s=i(n,a.query,t?e.Pos(n.lastLine()):e.Pos(n.firstLine(),0))).find(t))&&(n.setSelection(s.from(),s.to()),n.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),r&&r(s.from(),s.to()))}))}function g(e){e.operation((function(){var n=o(e);n.lastQuery=n.query,n.query&&(n.query=n.queryText=null,e.removeOverlay(n.overlay),n.annotate&&(n.annotate.clear(),n.annotate=null))}))}function d(e,n){var t=e?document.createElement(e):document.createDocumentFragment();for(var o in n)t[o]=n[o];for(var r=2;r<arguments.length;r++){var i=arguments[r];t.appendChild("string"==typeof i?document.createTextNode(i):i)}return t}function m(e){return d("",null,d("span",{className:"CodeMirror-search-label"},e.phrase("Search:"))," ",d("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",d("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function v(e){return d("",null," ",d("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",d("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function y(e){return d("",null,d("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",d("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}function x(e){return d("",null,d("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",d("button",{},e.phrase("Yes"))," ",d("button",{},e.phrase("No"))," ",d("button",{},e.phrase("All"))," ",d("button",{},e.phrase("Stop")))}function C(e,n,t){e.operation((function(){for(var o=i(e,n);o.findNext();)if("string"!=typeof n){var r=e.getRange(o.from(),o.to()).match(n);o.replace(t.replace(/\$(\d)/g,(function(e,n){return r[n]})))}else o.replace(t)}))}function N(e,n){if(!e.getOption("readOnly")){var t=e.getSelection()||o(e).lastQuery,r=n?e.phrase("Replace all:"):e.phrase("Replace:"),a=d("",null,d("span",{className:"CodeMirror-search-label"},r),v(e));s(e,a,r,t,(function(t){t&&(t=u(t),s(e,y(e),e.phrase("Replace with:"),"",(function(o){if(o=c(o),n)C(e,t,o);else{g(e);var r=i(e,t,e.getCursor("from")),a=function n(){var a,c=r.from();!(a=r.findNext())&&(r=i(e,t),!(a=r.findNext())||c&&r.from().line==c.line&&r.from().ch==c.ch)||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()}),l(e,x(e),e.phrase("Replace?"),[function(){s(a)},n,function(){C(e,t,o)}]))},s=function(e){r.replace("string"==typeof t?o:o.replace(/\$(\d)/g,(function(n,t){return e[t]}))),a()};a()}})))}))}}e.defineOption("search",{bottom:!1}),e.commands.find=function(e){g(e),h(e)},e.commands.findPersistent=function(e){g(e),h(e,!1,!0)},e.commands.findPersistentNext=function(e){h(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){h(e,!0,!0,!0)},e.commands.findNext=h,e.commands.findPrev=function(e){h(e,!0)},e.commands.clearSearch=g,e.commands.replace=N,e.commands.replaceAll=function(e){N(e,!0)}}(t(728),t(765),t(766))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[30],{800:function(t,e,i){!function(t){"use strict";var e="CodeMirror-hint",i="CodeMirror-hint-active";function n(t,e){if(this.cm=t,this.options=e,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var i=this;t.on("cursorActivity",this.activityFunc=function(){i.cursorActivity()})}}t.showHint=function(t,e,i){if(!e)return t.showHint(i);i&&i.async&&(e.async=!0);var n={hint:e};if(i)for(var o in i)n[o]=i[o];return t.showHint(n)},t.defineExtension("showHint",(function(e){e=c(this,this.getCursor("start"),e);var i=this.listSelections();if(!(i.length>1)){if(this.somethingSelected()){if(!e.hint.supportsSelection)return;for(var o=0;o<i.length;o++)if(i[o].head.line!=i[o].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var s=this.state.completionActive=new n(this,e);s.options.hint&&(t.signal(this,"startCompletion",this),s.update(!0))}})),t.defineExtension("closeHint",(function(){this.state.completionActive&&this.state.completionActive.close()}));var o=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},s=window.cancelAnimationFrame||clearTimeout;function c(t,e,i){var n=t.options.hintOptions,o={};for(var s in p)o[s]=p[s];if(n)for(var s in n)void 0!==n[s]&&(o[s]=n[s]);if(i)for(var s in i)void 0!==i[s]&&(o[s]=i[s]);return o.hint.resolve&&(o.hint=o.hint.resolve(t,e)),o}function r(t){return"string"==typeof t?t:t.text}function l(t,e){var i={Up:function(){e.moveFocus(-1)},Down:function(){e.moveFocus(1)},PageUp:function(){e.moveFocus(1-e.menuSize(),!0)},PageDown:function(){e.moveFocus(e.menuSize()-1,!0)},Home:function(){e.setFocus(0)},End:function(){e.setFocus(e.length-1)},Enter:e.pick,Tab:e.pick,Esc:e.close};/Mac/.test(navigator.platform)&&(i["Ctrl-P"]=function(){e.moveFocus(-1)},i["Ctrl-N"]=function(){e.moveFocus(1)});var n=t.options.customKeys,o=n?{}:i;function s(t,n){var s;s="string"!=typeof n?function(t){return n(t,e)}:i.hasOwnProperty(n)?i[n]:n,o[t]=s}if(n)for(var c in n)n.hasOwnProperty(c)&&s(c,n[c]);var r=t.options.extraKeys;if(r)for(var c in r)r.hasOwnProperty(c)&&s(c,r[c]);return o}function h(t,e){for(;e&&e!=t;){if("LI"===e.nodeName.toUpperCase()&&e.parentNode==t)return e;e=e.parentNode}}function a(n,o){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=n,this.data=o,this.picked=!1;var s=this,c=n.cm,a=c.getInputField().ownerDocument,u=a.defaultView||a.parentWindow,d=this.hints=a.createElement("ul");d.setAttribute("role","listbox"),d.setAttribute("aria-expanded","true"),d.id=this.id;var f=n.cm.options.theme;d.className="CodeMirror-hints "+f,this.selectedHint=o.selectedHint||0;for(var p=o.list,m=0;m<p.length;++m){var g=d.appendChild(a.createElement("li")),v=p[m],y=e+(m!=this.selectedHint?"":" "+i);null!=v.className&&(y=v.className+" "+y),g.className=y,m==this.selectedHint&&g.setAttribute("aria-selected","true"),g.id=this.id+"-"+m,g.setAttribute("role","option"),v.render?v.render(g,o,v):g.appendChild(a.createTextNode(v.displayText||r(v))),g.hintId=m}var w=n.options.container||a.body,b=c.cursorCoords(n.options.alignWithWord?o.from:null),A=b.left,H=b.bottom,C=!0,k=0,S=0;if(w!==a.body){var x=-1!==["absolute","relative","fixed"].indexOf(u.getComputedStyle(w).position)?w:w.offsetParent,T=x.getBoundingClientRect(),F=a.body.getBoundingClientRect();k=T.left-F.left-x.scrollLeft,S=T.top-F.top-x.scrollTop}d.style.left=A-k+"px",d.style.top=H-S+"px";var O=u.innerWidth||Math.max(a.body.offsetWidth,a.documentElement.offsetWidth),M=u.innerHeight||Math.max(a.body.offsetHeight,a.documentElement.offsetHeight);w.appendChild(d),c.getInputField().setAttribute("aria-autocomplete","list"),c.getInputField().setAttribute("aria-owns",this.id),c.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var N,I=n.options.moveOnOverlap?d.getBoundingClientRect():new DOMRect,P=!!n.options.paddingForScrollbar&&d.scrollHeight>d.clientHeight+1;if(setTimeout((function(){N=c.getScrollInfo()})),I.bottom-M>0){var E=I.bottom-I.top;if(b.top-(b.bottom-I.top)-E>0)d.style.top=(H=b.top-E-S)+"px",C=!1;else if(E>M){d.style.height=M-5+"px",d.style.top=(H=b.bottom-I.top-S)+"px";var W=c.getCursor();o.from.ch!=W.ch&&(b=c.cursorCoords(W),d.style.left=(A=b.left-k)+"px",I=d.getBoundingClientRect())}}var R,B=I.right-O;if(P&&(B+=c.display.nativeBarWidth),B>0&&(I.right-I.left>O&&(d.style.width=O-5+"px",B-=I.right-I.left-O),d.style.left=(A=b.left-B-k)+"px"),P)for(var K=d.firstChild;K;K=K.nextSibling)K.style.paddingRight=c.display.nativeBarWidth+"px";c.addKeyMap(this.keyMap=l(n,{moveFocus:function(t,e){s.changeActive(s.selectedHint+t,e)},setFocus:function(t){s.changeActive(t)},menuSize:function(){return s.screenAmount()},length:p.length,close:function(){n.close()},pick:function(){s.pick()},data:o})),n.options.closeOnUnfocus&&(c.on("blur",this.onBlur=function(){R=setTimeout((function(){n.close()}),100)}),c.on("focus",this.onFocus=function(){clearTimeout(R)})),c.on("scroll",this.onScroll=function(){var t=c.getScrollInfo(),e=c.getWrapperElement().getBoundingClientRect();N||(N=c.getScrollInfo());var i=H+N.top-t.top,o=i-(u.pageYOffset||(a.documentElement||a.body).scrollTop);if(C||(o+=d.offsetHeight),o<=e.top||o>=e.bottom)return n.close();d.style.top=i+"px",d.style.left=A+N.left-t.left+"px"}),t.on(d,"dblclick",(function(t){var e=h(d,t.target||t.srcElement);e&&null!=e.hintId&&(s.changeActive(e.hintId),s.pick())})),t.on(d,"click",(function(t){var e=h(d,t.target||t.srcElement);e&&null!=e.hintId&&(s.changeActive(e.hintId),n.options.completeOnSingleClick&&s.pick())})),t.on(d,"mousedown",(function(){setTimeout((function(){c.focus()}),20)}));var L=this.getSelectedHintRange();return 0===L.from&&0===L.to||this.scrollToActive(),t.signal(o,"select",p[this.selectedHint],d.childNodes[this.selectedHint]),!0}function u(t,e){if(!t.somethingSelected())return e;for(var i=[],n=0;n<e.length;n++)e[n].supportsSelection&&i.push(e[n]);return i}function d(t,e,i,n){if(t.async)t(e,n,i);else{var o=t(e,i);o&&o.then?o.then(n):n(o)}}function f(e,i){var n,o=e.getHelpers(i,"hint");if(o.length){var s=function(t,e,i){var n=u(t,o);function s(o){if(o==n.length)return e(null);d(n[o],t,i,(function(t){t&&t.list.length>0?e(t):s(o+1)}))}s(0)};return s.async=!0,s.supportsSelection=!0,s}return(n=e.getHelper(e.getCursor(),"hintWords"))?function(e){return t.hint.fromList(e,{words:n})}:t.hint.anyword?function(e,i){return t.hint.anyword(e,i)}:function(){}}n.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&t.signal(this.data,"close"),this.widget&&this.widget.close(),t.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(e,i){var n=e.list[i],o=this;this.cm.operation((function(){n.hint?n.hint(o.cm,e,n):o.cm.replaceRange(r(n),n.from||e.from,n.to||e.to,"complete"),t.signal(e,"pick",n),o.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(s(this.debounce),this.debounce=0);var t=this.startPos;this.data&&(t=this.data.from);var e=this.cm.getCursor(),i=this.cm.getLine(e.line);if(e.line!=this.startPos.line||i.length-e.ch!=this.startLen-this.startPos.ch||e.ch<t.ch||this.cm.somethingSelected()||!e.ch||this.options.closeCharacters.test(i.charAt(e.ch-1)))this.close();else{var n=this;this.debounce=o((function(){n.update()})),this.widget&&this.widget.disable()}},update:function(t){if(null!=this.tick){var e=this,i=++this.tick;d(this.options.hint,this.cm,this.options,(function(n){e.tick==i&&e.finishUpdate(n,t)}))}},finishUpdate:function(e,i){this.data&&t.signal(this.data,"update");var n=this.widget&&this.widget.picked||i&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=e,e&&e.list.length&&(n&&1==e.list.length?this.pick(e,0):(this.widget=new a(this,e),t.signal(e,"shown")))}},a.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var t=this.completion.cm.getInputField();t.removeAttribute("aria-activedescendant"),t.removeAttribute("aria-owns");var e=this.completion.cm;this.completion.options.closeOnUnfocus&&(e.off("blur",this.onBlur),e.off("focus",this.onFocus)),e.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var t=this;this.keyMap={Enter:function(){t.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(e,n){if(e>=this.data.list.length?e=n?this.data.list.length-1:0:e<0&&(e=n?0:this.data.list.length-1),this.selectedHint!=e){var o=this.hints.childNodes[this.selectedHint];o&&(o.className=o.className.replace(" "+i,""),o.removeAttribute("aria-selected")),(o=this.hints.childNodes[this.selectedHint=e]).className+=" "+i,o.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",o.id),this.scrollToActive(),t.signal(this.data,"select",this.data.list[this.selectedHint],o)}},scrollToActive:function(){var t=this.getSelectedHintRange(),e=this.hints.childNodes[t.from],i=this.hints.childNodes[t.to],n=this.hints.firstChild;e.offsetTop<this.hints.scrollTop?this.hints.scrollTop=e.offsetTop-n.offsetTop:i.offsetTop+i.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=i.offsetTop+i.offsetHeight-this.hints.clientHeight+n.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var t=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-t),to:Math.min(this.data.list.length-1,this.selectedHint+t)}}},t.registerHelper("hint","auto",{resolve:f}),t.registerHelper("hint","fromList",(function(e,i){var n,o=e.getCursor(),s=e.getTokenAt(o),c=t.Pos(o.line,s.start),r=o;s.start<o.ch&&/\w/.test(s.string.charAt(o.ch-s.start-1))?n=s.string.substr(0,o.ch-s.start):(n="",c=o);for(var l=[],h=0;h<i.words.length;h++){var a=i.words[h];a.slice(0,n.length)==n&&l.push(a)}if(l.length)return{list:l,from:c,to:r}})),t.commands.autocomplete=t.showHint;var p={hint:t.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};t.defineOption("hintOptions",null)}(i(727))}}]);
|
|
1
|
+
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[30],{801:function(t,e,i){!function(t){"use strict";var e="CodeMirror-hint",i="CodeMirror-hint-active";function n(t,e){if(this.cm=t,this.options=e,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var i=this;t.on("cursorActivity",this.activityFunc=function(){i.cursorActivity()})}}t.showHint=function(t,e,i){if(!e)return t.showHint(i);i&&i.async&&(e.async=!0);var n={hint:e};if(i)for(var o in i)n[o]=i[o];return t.showHint(n)},t.defineExtension("showHint",(function(e){e=c(this,this.getCursor("start"),e);var i=this.listSelections();if(!(i.length>1)){if(this.somethingSelected()){if(!e.hint.supportsSelection)return;for(var o=0;o<i.length;o++)if(i[o].head.line!=i[o].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var s=this.state.completionActive=new n(this,e);s.options.hint&&(t.signal(this,"startCompletion",this),s.update(!0))}})),t.defineExtension("closeHint",(function(){this.state.completionActive&&this.state.completionActive.close()}));var o=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},s=window.cancelAnimationFrame||clearTimeout;function c(t,e,i){var n=t.options.hintOptions,o={};for(var s in p)o[s]=p[s];if(n)for(var s in n)void 0!==n[s]&&(o[s]=n[s]);if(i)for(var s in i)void 0!==i[s]&&(o[s]=i[s]);return o.hint.resolve&&(o.hint=o.hint.resolve(t,e)),o}function r(t){return"string"==typeof t?t:t.text}function l(t,e){var i={Up:function(){e.moveFocus(-1)},Down:function(){e.moveFocus(1)},PageUp:function(){e.moveFocus(1-e.menuSize(),!0)},PageDown:function(){e.moveFocus(e.menuSize()-1,!0)},Home:function(){e.setFocus(0)},End:function(){e.setFocus(e.length-1)},Enter:e.pick,Tab:e.pick,Esc:e.close};/Mac/.test(navigator.platform)&&(i["Ctrl-P"]=function(){e.moveFocus(-1)},i["Ctrl-N"]=function(){e.moveFocus(1)});var n=t.options.customKeys,o=n?{}:i;function s(t,n){var s;s="string"!=typeof n?function(t){return n(t,e)}:i.hasOwnProperty(n)?i[n]:n,o[t]=s}if(n)for(var c in n)n.hasOwnProperty(c)&&s(c,n[c]);var r=t.options.extraKeys;if(r)for(var c in r)r.hasOwnProperty(c)&&s(c,r[c]);return o}function h(t,e){for(;e&&e!=t;){if("LI"===e.nodeName.toUpperCase()&&e.parentNode==t)return e;e=e.parentNode}}function a(n,o){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=n,this.data=o,this.picked=!1;var s=this,c=n.cm,a=c.getInputField().ownerDocument,u=a.defaultView||a.parentWindow,d=this.hints=a.createElement("ul");d.setAttribute("role","listbox"),d.setAttribute("aria-expanded","true"),d.id=this.id;var f=n.cm.options.theme;d.className="CodeMirror-hints "+f,this.selectedHint=o.selectedHint||0;for(var p=o.list,m=0;m<p.length;++m){var g=d.appendChild(a.createElement("li")),v=p[m],y=e+(m!=this.selectedHint?"":" "+i);null!=v.className&&(y=v.className+" "+y),g.className=y,m==this.selectedHint&&g.setAttribute("aria-selected","true"),g.id=this.id+"-"+m,g.setAttribute("role","option"),v.render?v.render(g,o,v):g.appendChild(a.createTextNode(v.displayText||r(v))),g.hintId=m}var w=n.options.container||a.body,b=c.cursorCoords(n.options.alignWithWord?o.from:null),A=b.left,H=b.bottom,C=!0,k=0,S=0;if(w!==a.body){var x=-1!==["absolute","relative","fixed"].indexOf(u.getComputedStyle(w).position)?w:w.offsetParent,T=x.getBoundingClientRect(),F=a.body.getBoundingClientRect();k=T.left-F.left-x.scrollLeft,S=T.top-F.top-x.scrollTop}d.style.left=A-k+"px",d.style.top=H-S+"px";var O=u.innerWidth||Math.max(a.body.offsetWidth,a.documentElement.offsetWidth),M=u.innerHeight||Math.max(a.body.offsetHeight,a.documentElement.offsetHeight);w.appendChild(d),c.getInputField().setAttribute("aria-autocomplete","list"),c.getInputField().setAttribute("aria-owns",this.id),c.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var N,I=n.options.moveOnOverlap?d.getBoundingClientRect():new DOMRect,P=!!n.options.paddingForScrollbar&&d.scrollHeight>d.clientHeight+1;if(setTimeout((function(){N=c.getScrollInfo()})),I.bottom-M>0){var E=I.bottom-I.top;if(b.top-(b.bottom-I.top)-E>0)d.style.top=(H=b.top-E-S)+"px",C=!1;else if(E>M){d.style.height=M-5+"px",d.style.top=(H=b.bottom-I.top-S)+"px";var W=c.getCursor();o.from.ch!=W.ch&&(b=c.cursorCoords(W),d.style.left=(A=b.left-k)+"px",I=d.getBoundingClientRect())}}var R,B=I.right-O;if(P&&(B+=c.display.nativeBarWidth),B>0&&(I.right-I.left>O&&(d.style.width=O-5+"px",B-=I.right-I.left-O),d.style.left=(A=b.left-B-k)+"px"),P)for(var K=d.firstChild;K;K=K.nextSibling)K.style.paddingRight=c.display.nativeBarWidth+"px";c.addKeyMap(this.keyMap=l(n,{moveFocus:function(t,e){s.changeActive(s.selectedHint+t,e)},setFocus:function(t){s.changeActive(t)},menuSize:function(){return s.screenAmount()},length:p.length,close:function(){n.close()},pick:function(){s.pick()},data:o})),n.options.closeOnUnfocus&&(c.on("blur",this.onBlur=function(){R=setTimeout((function(){n.close()}),100)}),c.on("focus",this.onFocus=function(){clearTimeout(R)})),c.on("scroll",this.onScroll=function(){var t=c.getScrollInfo(),e=c.getWrapperElement().getBoundingClientRect();N||(N=c.getScrollInfo());var i=H+N.top-t.top,o=i-(u.pageYOffset||(a.documentElement||a.body).scrollTop);if(C||(o+=d.offsetHeight),o<=e.top||o>=e.bottom)return n.close();d.style.top=i+"px",d.style.left=A+N.left-t.left+"px"}),t.on(d,"dblclick",(function(t){var e=h(d,t.target||t.srcElement);e&&null!=e.hintId&&(s.changeActive(e.hintId),s.pick())})),t.on(d,"click",(function(t){var e=h(d,t.target||t.srcElement);e&&null!=e.hintId&&(s.changeActive(e.hintId),n.options.completeOnSingleClick&&s.pick())})),t.on(d,"mousedown",(function(){setTimeout((function(){c.focus()}),20)}));var L=this.getSelectedHintRange();return 0===L.from&&0===L.to||this.scrollToActive(),t.signal(o,"select",p[this.selectedHint],d.childNodes[this.selectedHint]),!0}function u(t,e){if(!t.somethingSelected())return e;for(var i=[],n=0;n<e.length;n++)e[n].supportsSelection&&i.push(e[n]);return i}function d(t,e,i,n){if(t.async)t(e,n,i);else{var o=t(e,i);o&&o.then?o.then(n):n(o)}}function f(e,i){var n,o=e.getHelpers(i,"hint");if(o.length){var s=function(t,e,i){var n=u(t,o);function s(o){if(o==n.length)return e(null);d(n[o],t,i,(function(t){t&&t.list.length>0?e(t):s(o+1)}))}s(0)};return s.async=!0,s.supportsSelection=!0,s}return(n=e.getHelper(e.getCursor(),"hintWords"))?function(e){return t.hint.fromList(e,{words:n})}:t.hint.anyword?function(e,i){return t.hint.anyword(e,i)}:function(){}}n.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&t.signal(this.data,"close"),this.widget&&this.widget.close(),t.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(e,i){var n=e.list[i],o=this;this.cm.operation((function(){n.hint?n.hint(o.cm,e,n):o.cm.replaceRange(r(n),n.from||e.from,n.to||e.to,"complete"),t.signal(e,"pick",n),o.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(s(this.debounce),this.debounce=0);var t=this.startPos;this.data&&(t=this.data.from);var e=this.cm.getCursor(),i=this.cm.getLine(e.line);if(e.line!=this.startPos.line||i.length-e.ch!=this.startLen-this.startPos.ch||e.ch<t.ch||this.cm.somethingSelected()||!e.ch||this.options.closeCharacters.test(i.charAt(e.ch-1)))this.close();else{var n=this;this.debounce=o((function(){n.update()})),this.widget&&this.widget.disable()}},update:function(t){if(null!=this.tick){var e=this,i=++this.tick;d(this.options.hint,this.cm,this.options,(function(n){e.tick==i&&e.finishUpdate(n,t)}))}},finishUpdate:function(e,i){this.data&&t.signal(this.data,"update");var n=this.widget&&this.widget.picked||i&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=e,e&&e.list.length&&(n&&1==e.list.length?this.pick(e,0):(this.widget=new a(this,e),t.signal(e,"shown")))}},a.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var t=this.completion.cm.getInputField();t.removeAttribute("aria-activedescendant"),t.removeAttribute("aria-owns");var e=this.completion.cm;this.completion.options.closeOnUnfocus&&(e.off("blur",this.onBlur),e.off("focus",this.onFocus)),e.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var t=this;this.keyMap={Enter:function(){t.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(e,n){if(e>=this.data.list.length?e=n?this.data.list.length-1:0:e<0&&(e=n?0:this.data.list.length-1),this.selectedHint!=e){var o=this.hints.childNodes[this.selectedHint];o&&(o.className=o.className.replace(" "+i,""),o.removeAttribute("aria-selected")),(o=this.hints.childNodes[this.selectedHint=e]).className+=" "+i,o.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",o.id),this.scrollToActive(),t.signal(this.data,"select",this.data.list[this.selectedHint],o)}},scrollToActive:function(){var t=this.getSelectedHintRange(),e=this.hints.childNodes[t.from],i=this.hints.childNodes[t.to],n=this.hints.firstChild;e.offsetTop<this.hints.scrollTop?this.hints.scrollTop=e.offsetTop-n.offsetTop:i.offsetTop+i.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=i.offsetTop+i.offsetHeight-this.hints.clientHeight+n.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var t=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-t),to:Math.min(this.data.list.length-1,this.selectedHint+t)}}},t.registerHelper("hint","auto",{resolve:f}),t.registerHelper("hint","fromList",(function(e,i){var n,o=e.getCursor(),s=e.getTokenAt(o),c=t.Pos(o.line,s.start),r=o;s.start<o.ch&&/\w/.test(s.string.charAt(o.ch-s.start-1))?n=s.string.substr(0,o.ch-s.start):(n="",c=o);for(var l=[],h=0;h<i.words.length;h++){var a=i.words[h];a.slice(0,n.length)==n&&l.push(a)}if(l.length)return{list:l,from:c,to:r}})),t.commands.autocomplete=t.showHint;var p={hint:t.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};t.defineOption("hintOptions",null)}(i(728))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[31],{
|
|
1
|
+
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[31],{952:function(t,e,n){!function(t){"use strict";var e="CodeMirror-lint-markers",n="CodeMirror-lint-line-";function o(e,n,o){var i=document.createElement("div");function r(e){if(!i.parentNode)return t.off(document,"mousemove",r);i.style.top=Math.max(0,e.clientY-i.offsetHeight-5)+"px",i.style.left=e.clientX+5+"px"}return i.className="CodeMirror-lint-tooltip cm-s-"+e.options.theme,i.appendChild(o.cloneNode(!0)),e.state.lint.options.selfContain?e.getWrapperElement().appendChild(i):document.body.appendChild(i),t.on(document,"mousemove",r),r(n),null!=i.style.opacity&&(i.style.opacity=1),i}function i(t){t.parentNode&&t.parentNode.removeChild(t)}function r(t){t.parentNode&&(null==t.style.opacity&&i(t),t.style.opacity=0,setTimeout((function(){i(t)}),600))}function a(e,n,i,a){var s=o(e,n,i);function l(){t.off(a,"mouseout",l),s&&(r(s),s=null)}var u=setInterval((function(){if(s)for(var t=a;;t=t.parentNode){if(t&&11==t.nodeType&&(t=t.host),t==document.body)return;if(!t){l();break}}if(!s)return clearInterval(u)}),400);t.on(a,"mouseout",l)}function s(t,e,n){for(var o in this.marked=[],e instanceof Function&&(e={getAnnotations:e}),e&&!0!==e||(e={}),this.options={},this.linterOptions=e.options||{},l)this.options[o]=l[o];for(var o in e)l.hasOwnProperty(o)?null!=e[o]&&(this.options[o]=e[o]):e.options||(this.linterOptions[o]=e[o]);this.timeout=null,this.hasGutter=n,this.onMouseOver=function(e){M(t,e)},this.waitingFor=0}var l={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function u(t){var n=t.state.lint;n.hasGutter&&t.clearGutter(e),n.options.highlightLines&&c(t);for(var o=0;o<n.marked.length;++o)n.marked[o].clear();n.marked.length=0}function c(t){t.eachLine((function(e){var n=e.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(e.wrapClass);n&&t.removeLineClass(e,"wrap",n[0])}))}function f(e,n,o,i,r){var s=document.createElement("div"),l=s;return s.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+o,i&&((l=s.appendChild(document.createElement("div"))).className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),0!=r&&t.on(l,"mouseover",(function(t){a(e,t,n,l)})),s}function p(t,e){return"error"==t?t:e}function m(t){for(var e=[],n=0;n<t.length;++n){var o=t[n],i=o.from.line;(e[i]||(e[i]=[])).push(o)}return e}function d(t){var e=t.severity;e||(e="error");var n=document.createElement("div");return n.className="CodeMirror-lint-message CodeMirror-lint-message-"+e,"undefined"!=typeof t.messageHTML?n.innerHTML=t.messageHTML:n.appendChild(document.createTextNode(t.message)),n}function h(e,n){var o=e.state.lint,i=++o.waitingFor;function r(){i=-1,e.off("change",r)}e.on("change",r),n(e.getValue(),(function(n,a){e.off("change",r),o.waitingFor==i&&(a&&n instanceof t&&(n=a),e.operation((function(){v(e,n)})))}),o.linterOptions,e)}function g(e){var n=e.state.lint;if(n){var o=n.options,i=o.getAnnotations||e.getHelper(t.Pos(0,0),"lint");if(i)if(o.async||i.async)h(e,i);else{var r=i(e.getValue(),n.linterOptions,e);if(!r)return;r.then?r.then((function(t){e.operation((function(){v(e,t)}))})):e.operation((function(){v(e,r)}))}}}function v(t,o){var i=t.state.lint;if(i){var r=i.options;u(t);for(var a=m(o),s=0;s<a.length;++s){var l=a[s];if(l){var c=[];l=l.filter((function(t){return!(c.indexOf(t.message)>-1)&&c.push(t.message)}));for(var h=null,g=i.hasGutter&&document.createDocumentFragment(),v=0;v<l.length;++v){var C=l[v],y=C.severity;y||(y="error"),h=p(h,y),r.formatAnnotation&&(C=r.formatAnnotation(C)),i.hasGutter&&g.appendChild(d(C)),C.to&&i.marked.push(t.markText(C.from,C.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+y,__annotation:C}))}i.hasGutter&&t.setGutterMarker(s,e,f(t,g,h,a[s].length>1,r.tooltips)),r.highlightLines&&t.addLineClass(s,"wrap",n+h)}}r.onUpdateLinting&&r.onUpdateLinting(o,a,t)}}function C(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout((function(){g(t)}),e.options.delay))}function y(t,e,n){for(var o=n.target||n.srcElement,i=document.createDocumentFragment(),r=0;r<e.length;r++){var s=e[r];i.appendChild(d(s))}a(t,n,i,o)}function M(t,e){var n=e.target||e.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className)){for(var o=n.getBoundingClientRect(),i=(o.left+o.right)/2,r=(o.top+o.bottom)/2,a=t.findMarksAt(t.coordsChar({left:i,top:r},"client")),s=[],l=0;l<a.length;++l){var u=a[l].__annotation;u&&s.push(u)}s.length&&y(t,s,e)}}t.defineOption("lint",!1,(function(n,o,i){if(i&&i!=t.Init&&(u(n),!1!==n.state.lint.options.lintOnChange&&n.off("change",C),t.off(n.getWrapperElement(),"mouseover",n.state.lint.onMouseOver),clearTimeout(n.state.lint.timeout),delete n.state.lint),o){for(var r=n.getOption("gutters"),a=!1,l=0;l<r.length;++l)r[l]==e&&(a=!0);var c=n.state.lint=new s(n,o,a);c.options.lintOnChange&&n.on("change",C),0!=c.options.tooltips&&"gutter"!=c.options.tooltips&&t.on(n.getWrapperElement(),"mouseover",c.onMouseOver),g(n)}})),t.defineExtension("performLint",(function(){g(this)}))}(n(728))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[32],{957:function(e,t,r){!function(e){"use strict";e.defineMode("javascript",(function(t,r){var n,a,i=t.indentUnit,o=r.statementIndent,c=r.jsonld,s=r.json||c,u=!1!==r.trackScope,l=r.typescript,f=r.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),p=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function v(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function k(e,t,r){return n=e,a=r,t}function y(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=w(r),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return k("number","number");if("."==r&&e.match(".."))return k("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return k(r);if("="==r&&e.eat(">"))return k("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return k("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),k("number","number");if("/"==r)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),k("comment","comment")):at(e,t,1)?(v(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),k("regexp","string-2")):(e.eat("="),k("operator","operator",e.current()));if("`"==r)return t.tokenize=h,h(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),k("meta","meta");if("#"==r&&e.eatWhile(f))return k("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),k("comment","comment");if(p.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?k("."):k("operator","operator",e.current());if(f.test(r)){e.eatWhile(f);var n=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(n)){var a=d[n];return k(a.type,a.style,n)}if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return k("async","keyword",n)}return k("variable","variable",n)}}function w(e){return function(t,r){var n,a=!1;if(c&&"@"==t.peek()&&t.match(m))return r.tokenize=y,k("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||a);)a=!a&&"\\"==n;return a||(r.tokenize=y),k("string","string")}}function b(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=y;break}n="*"==r}return k("comment","comment")}function h(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=y;break}n=!n&&"\\"==r}return k("quasi","string-2",e.current())}var x="([{}])";function g(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(l){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var c=e.string.charAt(o),s=x.indexOf(c);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(f.test(c))i=!0;else if(/["'\/`]/.test(c))for(;;--o){if(0==o)return;if(e.string.charAt(o-1)==c&&"\\"!=e.string.charAt(o-2)){o--;break}}else if(i&&!a){++o;break}}i&&!a&&(t.fatArrowAt=o)}}var j={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function M(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function A(e,t){if(!u)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function V(e,t,r,n,a){var i=e.cc;for(E.state=e,E.stream=a,E.marked=null,E.cc=i,E.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():s?D:F)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return E.marked?E.marked:"variable"==r&&A(e,n)?"variable-2":t}}var E={state:null,column:null,marked:null,cc:null};function z(){for(var e=arguments.length-1;e>=0;e--)E.cc.push(arguments[e])}function I(){return z.apply(null,arguments),!0}function T(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function $(e){var t=E.state;if(E.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=S(e,t.context);if(null!=n)return void(t.context=n)}else if(!T(e,t.localVars))return void(t.localVars=new C(e,t.localVars));r.globalVars&&!T(e,t.globalVars)&&(t.globalVars=new C(e,t.globalVars))}}function S(e,t){if(t){if(t.block){var r=S(e,t.prev);return r?r==t.prev?t:new q(r,t.vars,!0):null}return T(e,t.vars)?t:new q(t.prev,new C(e,t.vars),!1)}return null}function _(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function q(e,t,r){this.prev=e,this.vars=t,this.block=r}function C(e,t){this.name=e,this.next=t}var O=new C("this",new C("arguments",null));function P(){E.state.context=new q(E.state.context,E.state.localVars,!1),E.state.localVars=O}function J(){E.state.context=new q(E.state.context,E.state.localVars,!0),E.state.localVars=null}function N(){E.state.localVars=E.state.context.vars,E.state.context=E.state.context.prev}function U(e,t){var r=function(){var r=E.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new M(n,E.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function W(){var e=E.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function B(e){function t(r){return r==e?I():";"==e||"}"==r||")"==r||"]"==r?z():I(t)}return t}function F(e,t){return"var"==e?I(U("vardef",t),ze,B(";"),W):"keyword a"==e?I(U("form"),K,F,W):"keyword b"==e?I(U("form"),F,W):"keyword d"==e?E.stream.match(/^\s*$/,!1)?I():I(U("stat"),Q,B(";"),W):"debugger"==e?I(B(";")):"{"==e?I(U("}"),J,de,W,N):";"==e?I():"if"==e?("else"==E.state.lexical.info&&E.state.cc[E.state.cc.length-1]==W&&E.state.cc.pop()(),I(U("form"),K,F,W,qe)):"function"==e?I(Je):"for"==e?I(U("form"),J,Ce,F,N,W):"class"==e||l&&"interface"==t?(E.marked="keyword",I(U("form","class"==e?e:t),Fe,W)):"variable"==e?l&&"declare"==t?(E.marked="keyword",I(F)):l&&("module"==t||"enum"==t||"type"==t)&&E.stream.match(/^\s*\w/,!1)?(E.marked="keyword","enum"==t?I(tt):"type"==t?I(Ue,B("operator"),ye,B(";")):I(U("form"),Ie,B("{"),U("}"),de,W,W)):l&&"namespace"==t?(E.marked="keyword",I(U("form"),D,F,W)):l&&"abstract"==t?(E.marked="keyword",I(F)):I(U("stat"),ie):"switch"==e?I(U("form"),K,B("{"),U("}","switch"),J,de,W,W,N):"case"==e?I(D,B(":")):"default"==e?I(B(":")):"catch"==e?I(U("form"),P,H,F,W,N):"export"==e?I(U("stat"),Ke,W):"import"==e?I(U("stat"),Qe,W):"async"==e?I(F):"@"==t?I(D,F):z(U("stat"),D,B(";"),W)}function H(e){if("("==e)return I(We,B(")"))}function D(e,t){return L(e,t,!1)}function G(e,t){return L(e,t,!0)}function K(e){return"("!=e?z():I(U(")"),Q,B(")"),W)}function L(e,t,r){if(E.state.fatArrowAt==E.stream.start){var n=r?te:ee;if("("==e)return I(P,U(")"),le(We,")"),W,B("=>"),n,N);if("variable"==e)return z(P,Ie,B("=>"),n,N)}var a=r?X:R;return j.hasOwnProperty(e)?I(a):"function"==e?I(Je,a):"class"==e||l&&"interface"==t?(E.marked="keyword",I(U("form"),Be,W)):"keyword c"==e||"async"==e?I(r?G:D):"("==e?I(U(")"),Q,B(")"),W,a):"operator"==e||"spread"==e?I(r?G:D):"["==e?I(U("]"),et,W,a):"{"==e?fe(ce,"}",null,a):"quasi"==e?z(Y,a):"new"==e?I(re(r)):I()}function Q(e){return e.match(/[;\}\)\],]/)?z():z(D)}function R(e,t){return","==e?I(Q):X(e,t,!1)}function X(e,t,r){var n=0==r?R:X,a=0==r?D:G;return"=>"==e?I(P,r?te:ee,N):"operator"==e?/\+\+|--/.test(t)||l&&"!"==t?I(n):l&&"<"==t&&E.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?I(U(">"),le(ye,">"),W,n):"?"==t?I(D,B(":"),a):I(a):"quasi"==e?z(Y,n):";"!=e?"("==e?fe(G,")","call",n):"."==e?I(oe,n):"["==e?I(U("]"),Q,B("]"),W,n):l&&"as"==t?(E.marked="keyword",I(ye,n)):"regexp"==e?(E.state.lastType=E.marked="operator",E.stream.backUp(E.stream.pos-E.stream.start-1),I(a)):void 0:void 0}function Y(e,t){return"quasi"!=e?z():"${"!=t.slice(t.length-2)?I(Y):I(Q,Z)}function Z(e){if("}"==e)return E.marked="string-2",E.state.tokenize=h,I(Y)}function ee(e){return g(E.stream,E.state),z("{"==e?F:D)}function te(e){return g(E.stream,E.state),z("{"==e?F:G)}function re(e){return function(t){return"."==t?I(e?ae:ne):"variable"==t&&l?I(Ae,e?X:R):z(e?G:D)}}function ne(e,t){if("target"==t)return E.marked="keyword",I(R)}function ae(e,t){if("target"==t)return E.marked="keyword",I(X)}function ie(e){return":"==e?I(W,F):z(R,B(";"),W)}function oe(e){if("variable"==e)return E.marked="property",I()}function ce(e,t){return"async"==e?(E.marked="property",I(ce)):"variable"==e||"keyword"==E.style?(E.marked="property","get"==t||"set"==t?I(se):(l&&E.state.fatArrowAt==E.stream.start&&(r=E.stream.match(/^\s*:\s*/,!1))&&(E.state.fatArrowAt=E.stream.pos+r[0].length),I(ue))):"number"==e||"string"==e?(E.marked=c?"property":E.style+" property",I(ue)):"jsonld-keyword"==e?I(ue):l&&_(t)?(E.marked="keyword",I(ce)):"["==e?I(D,pe,B("]"),ue):"spread"==e?I(G,ue):"*"==t?(E.marked="keyword",I(ce)):":"==e?z(ue):void 0;var r}function se(e){return"variable"!=e?z(ue):(E.marked="property",I(Je))}function ue(e){return":"==e?I(G):"("==e?z(Je):void 0}function le(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=E.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),I((function(r,n){return r==t||n==t?z():z(e)}),n)}return a==t||i==t?I():r&&r.indexOf(";")>-1?z(e):I(B(t))}return function(r,a){return r==t||a==t?I():z(e,n)}}function fe(e,t,r){for(var n=3;n<arguments.length;n++)E.cc.push(arguments[n]);return I(U(t,r),le(e,t),W)}function de(e){return"}"==e?I():z(F,de)}function pe(e,t){if(l){if(":"==e)return I(ye);if("?"==t)return I(pe)}}function me(e,t){if(l&&(":"==e||"in"==t))return I(ye)}function ve(e){if(l&&":"==e)return E.stream.match(/^\s*\w+\s+is\b/,!1)?I(D,ke,ye):I(ye)}function ke(e,t){if("is"==t)return E.marked="keyword",I()}function ye(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(E.marked="keyword",I("typeof"==t?G:ye)):"variable"==e||"void"==t?(E.marked="type",I(Me)):"|"==t||"&"==t?I(ye):"string"==e||"number"==e||"atom"==e?I(Me):"["==e?I(U("]"),le(ye,"]",","),W,Me):"{"==e?I(U("}"),be,W,Me):"("==e?I(le(je,")"),we,Me):"<"==e?I(le(ye,">"),ye):"quasi"==e?z(xe,Me):void 0}function we(e){if("=>"==e)return I(ye)}function be(e){return e.match(/[\}\)\]]/)?I():","==e||";"==e?I(be):z(he,be)}function he(e,t){return"variable"==e||"keyword"==E.style?(E.marked="property",I(he)):"?"==t||"number"==e||"string"==e?I(he):":"==e?I(ye):"["==e?I(B("variable"),me,B("]"),he):"("==e?z(Ne,he):e.match(/[;\}\)\],]/)?void 0:I()}function xe(e,t){return"quasi"!=e?z():"${"!=t.slice(t.length-2)?I(xe):I(ye,ge)}function ge(e){if("}"==e)return E.marked="string-2",E.state.tokenize=h,I(xe)}function je(e,t){return"variable"==e&&E.stream.match(/^\s*[?:]/,!1)||"?"==t?I(je):":"==e?I(ye):"spread"==e?I(je):z(ye)}function Me(e,t){return"<"==t?I(U(">"),le(ye,">"),W,Me):"|"==t||"."==e||"&"==t?I(ye):"["==e?I(ye,B("]"),Me):"extends"==t||"implements"==t?(E.marked="keyword",I(ye)):"?"==t?I(ye,B(":"),ye):void 0}function Ae(e,t){if("<"==t)return I(U(">"),le(ye,">"),W,Me)}function Ve(){return z(ye,Ee)}function Ee(e,t){if("="==t)return I(ye)}function ze(e,t){return"enum"==t?(E.marked="keyword",I(tt)):z(Ie,pe,Se,_e)}function Ie(e,t){return l&&_(t)?(E.marked="keyword",I(Ie)):"variable"==e?($(t),I()):"spread"==e?I(Ie):"["==e?fe($e,"]"):"{"==e?fe(Te,"}"):void 0}function Te(e,t){return"variable"!=e||E.stream.match(/^\s*:/,!1)?("variable"==e&&(E.marked="property"),"spread"==e?I(Ie):"}"==e?z():"["==e?I(D,B("]"),B(":"),Te):I(B(":"),Ie,Se)):($(t),I(Se))}function $e(){return z(Ie,Se)}function Se(e,t){if("="==t)return I(G)}function _e(e){if(","==e)return I(ze)}function qe(e,t){if("keyword b"==e&&"else"==t)return I(U("form","else"),F,W)}function Ce(e,t){return"await"==t?I(Ce):"("==e?I(U(")"),Oe,W):void 0}function Oe(e){return"var"==e?I(ze,Pe):"variable"==e?I(Pe):z(Pe)}function Pe(e,t){return")"==e?I():";"==e?I(Pe):"in"==t||"of"==t?(E.marked="keyword",I(D,Pe)):z(D,Pe)}function Je(e,t){return"*"==t?(E.marked="keyword",I(Je)):"variable"==e?($(t),I(Je)):"("==e?I(P,U(")"),le(We,")"),W,ve,F,N):l&&"<"==t?I(U(">"),le(Ve,">"),W,Je):void 0}function Ne(e,t){return"*"==t?(E.marked="keyword",I(Ne)):"variable"==e?($(t),I(Ne)):"("==e?I(P,U(")"),le(We,")"),W,ve,N):l&&"<"==t?I(U(">"),le(Ve,">"),W,Ne):void 0}function Ue(e,t){return"keyword"==e||"variable"==e?(E.marked="type",I(Ue)):"<"==t?I(U(">"),le(Ve,">"),W):void 0}function We(e,t){return"@"==t&&I(D,We),"spread"==e?I(We):l&&_(t)?(E.marked="keyword",I(We)):l&&"this"==e?I(pe,Se):z(Ie,pe,Se)}function Be(e,t){return"variable"==e?Fe(e,t):He(e,t)}function Fe(e,t){if("variable"==e)return $(t),I(He)}function He(e,t){return"<"==t?I(U(">"),le(Ve,">"),W,He):"extends"==t||"implements"==t||l&&","==e?("implements"==t&&(E.marked="keyword"),I(l?ye:D,He)):"{"==e?I(U("}"),De,W):void 0}function De(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||l&&_(t))&&E.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(E.marked="keyword",I(De)):"variable"==e||"keyword"==E.style?(E.marked="property",I(Ge,De)):"number"==e||"string"==e?I(Ge,De):"["==e?I(D,pe,B("]"),Ge,De):"*"==t?(E.marked="keyword",I(De)):l&&"("==e?z(Ne,De):";"==e||","==e?I(De):"}"==e?I():"@"==t?I(D,De):void 0}function Ge(e,t){if("!"==t)return I(Ge);if("?"==t)return I(Ge);if(":"==e)return I(ye,Se);if("="==t)return I(G);var r=E.state.lexical.prev;return z(r&&"interface"==r.info?Ne:Je)}function Ke(e,t){return"*"==t?(E.marked="keyword",I(Ze,B(";"))):"default"==t?(E.marked="keyword",I(D,B(";"))):"{"==e?I(le(Le,"}"),Ze,B(";")):z(F)}function Le(e,t){return"as"==t?(E.marked="keyword",I(B("variable"))):"variable"==e?z(G,Le):void 0}function Qe(e){return"string"==e?I():"("==e?z(D):"."==e?z(R):z(Re,Xe,Ze)}function Re(e,t){return"{"==e?fe(Re,"}"):("variable"==e&&$(t),"*"==t&&(E.marked="keyword"),I(Ye))}function Xe(e){if(","==e)return I(Re,Xe)}function Ye(e,t){if("as"==t)return E.marked="keyword",I(Re)}function Ze(e,t){if("from"==t)return E.marked="keyword",I(D)}function et(e){return"]"==e?I():z(le(G,"]"))}function tt(){return z(U("form"),Ie,B("{"),U("}"),le(rt,"}"),W,W)}function rt(){return z(Ie,Se)}function nt(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function at(e,t,r){return t.tokenize==y&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return N.lex=!0,W.lex=!0,{startState:function(e){var t={tokenize:y,lastType:"sof",cc:[],lexical:new M((e||0)-i,0,"block",!1),localVars:r.localVars,context:r.localVars&&new q(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),g(e,t)),t.tokenize!=b&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=a&&"--"!=a?n:"incdec",V(t,r,n,a,e))},indent:function(t,n){if(t.tokenize==b||t.tokenize==h)return e.Pass;if(t.tokenize!=y)return 0;var a,c=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var l=t.cc[u];if(l==W)s=s.prev;else if(l!=qe&&l!=N)break}for(;("stat"==s.type||"form"==s.type)&&("}"==c||(a=t.cc[t.cc.length-1])&&(a==R||a==X)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;o&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var f=s.type,d=c==f;return"vardef"==f?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==f&&"{"==c?s.indented:"form"==f?s.indented+i:"stat"==f?s.indented+(nt(t,n)?o||i:0):"switch"!=s.info||d||0==r.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:i):s.indented+(/^(?:case|default)\b/.test(n)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:c,jsonMode:s,expressionAllowed:at,skipExpression:function(t){V(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(r(727))}}]);
|
|
1
|
+
(this["webpackJsonp@cubejs-client/playground"]=this["webpackJsonp@cubejs-client/playground"]||[]).push([[32],{958:function(e,t,r){!function(e){"use strict";e.defineMode("javascript",(function(t,r){var n,a,i=t.indentUnit,o=r.statementIndent,c=r.jsonld,s=r.json||c,u=!1!==r.trackScope,l=r.typescript,f=r.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),p=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function v(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function k(e,t,r){return n=e,a=r,t}function y(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=w(r),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return k("number","number");if("."==r&&e.match(".."))return k("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return k(r);if("="==r&&e.eat(">"))return k("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return k("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),k("number","number");if("/"==r)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),k("comment","comment")):at(e,t,1)?(v(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),k("regexp","string-2")):(e.eat("="),k("operator","operator",e.current()));if("`"==r)return t.tokenize=h,h(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),k("meta","meta");if("#"==r&&e.eatWhile(f))return k("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),k("comment","comment");if(p.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?k("."):k("operator","operator",e.current());if(f.test(r)){e.eatWhile(f);var n=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(n)){var a=d[n];return k(a.type,a.style,n)}if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return k("async","keyword",n)}return k("variable","variable",n)}}function w(e){return function(t,r){var n,a=!1;if(c&&"@"==t.peek()&&t.match(m))return r.tokenize=y,k("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||a);)a=!a&&"\\"==n;return a||(r.tokenize=y),k("string","string")}}function b(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=y;break}n="*"==r}return k("comment","comment")}function h(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=y;break}n=!n&&"\\"==r}return k("quasi","string-2",e.current())}var x="([{}])";function g(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(l){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var c=e.string.charAt(o),s=x.indexOf(c);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(f.test(c))i=!0;else if(/["'\/`]/.test(c))for(;;--o){if(0==o)return;if(e.string.charAt(o-1)==c&&"\\"!=e.string.charAt(o-2)){o--;break}}else if(i&&!a){++o;break}}i&&!a&&(t.fatArrowAt=o)}}var j={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function M(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function A(e,t){if(!u)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function V(e,t,r,n,a){var i=e.cc;for(E.state=e,E.stream=a,E.marked=null,E.cc=i,E.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():s?D:F)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return E.marked?E.marked:"variable"==r&&A(e,n)?"variable-2":t}}var E={state:null,column:null,marked:null,cc:null};function z(){for(var e=arguments.length-1;e>=0;e--)E.cc.push(arguments[e])}function I(){return z.apply(null,arguments),!0}function T(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function $(e){var t=E.state;if(E.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=S(e,t.context);if(null!=n)return void(t.context=n)}else if(!T(e,t.localVars))return void(t.localVars=new C(e,t.localVars));r.globalVars&&!T(e,t.globalVars)&&(t.globalVars=new C(e,t.globalVars))}}function S(e,t){if(t){if(t.block){var r=S(e,t.prev);return r?r==t.prev?t:new q(r,t.vars,!0):null}return T(e,t.vars)?t:new q(t.prev,new C(e,t.vars),!1)}return null}function _(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function q(e,t,r){this.prev=e,this.vars=t,this.block=r}function C(e,t){this.name=e,this.next=t}var O=new C("this",new C("arguments",null));function P(){E.state.context=new q(E.state.context,E.state.localVars,!1),E.state.localVars=O}function J(){E.state.context=new q(E.state.context,E.state.localVars,!0),E.state.localVars=null}function N(){E.state.localVars=E.state.context.vars,E.state.context=E.state.context.prev}function U(e,t){var r=function(){var r=E.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new M(n,E.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function W(){var e=E.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function B(e){function t(r){return r==e?I():";"==e||"}"==r||")"==r||"]"==r?z():I(t)}return t}function F(e,t){return"var"==e?I(U("vardef",t),ze,B(";"),W):"keyword a"==e?I(U("form"),K,F,W):"keyword b"==e?I(U("form"),F,W):"keyword d"==e?E.stream.match(/^\s*$/,!1)?I():I(U("stat"),Q,B(";"),W):"debugger"==e?I(B(";")):"{"==e?I(U("}"),J,de,W,N):";"==e?I():"if"==e?("else"==E.state.lexical.info&&E.state.cc[E.state.cc.length-1]==W&&E.state.cc.pop()(),I(U("form"),K,F,W,qe)):"function"==e?I(Je):"for"==e?I(U("form"),J,Ce,F,N,W):"class"==e||l&&"interface"==t?(E.marked="keyword",I(U("form","class"==e?e:t),Fe,W)):"variable"==e?l&&"declare"==t?(E.marked="keyword",I(F)):l&&("module"==t||"enum"==t||"type"==t)&&E.stream.match(/^\s*\w/,!1)?(E.marked="keyword","enum"==t?I(tt):"type"==t?I(Ue,B("operator"),ye,B(";")):I(U("form"),Ie,B("{"),U("}"),de,W,W)):l&&"namespace"==t?(E.marked="keyword",I(U("form"),D,F,W)):l&&"abstract"==t?(E.marked="keyword",I(F)):I(U("stat"),ie):"switch"==e?I(U("form"),K,B("{"),U("}","switch"),J,de,W,W,N):"case"==e?I(D,B(":")):"default"==e?I(B(":")):"catch"==e?I(U("form"),P,H,F,W,N):"export"==e?I(U("stat"),Ke,W):"import"==e?I(U("stat"),Qe,W):"async"==e?I(F):"@"==t?I(D,F):z(U("stat"),D,B(";"),W)}function H(e){if("("==e)return I(We,B(")"))}function D(e,t){return L(e,t,!1)}function G(e,t){return L(e,t,!0)}function K(e){return"("!=e?z():I(U(")"),Q,B(")"),W)}function L(e,t,r){if(E.state.fatArrowAt==E.stream.start){var n=r?te:ee;if("("==e)return I(P,U(")"),le(We,")"),W,B("=>"),n,N);if("variable"==e)return z(P,Ie,B("=>"),n,N)}var a=r?X:R;return j.hasOwnProperty(e)?I(a):"function"==e?I(Je,a):"class"==e||l&&"interface"==t?(E.marked="keyword",I(U("form"),Be,W)):"keyword c"==e||"async"==e?I(r?G:D):"("==e?I(U(")"),Q,B(")"),W,a):"operator"==e||"spread"==e?I(r?G:D):"["==e?I(U("]"),et,W,a):"{"==e?fe(ce,"}",null,a):"quasi"==e?z(Y,a):"new"==e?I(re(r)):I()}function Q(e){return e.match(/[;\}\)\],]/)?z():z(D)}function R(e,t){return","==e?I(Q):X(e,t,!1)}function X(e,t,r){var n=0==r?R:X,a=0==r?D:G;return"=>"==e?I(P,r?te:ee,N):"operator"==e?/\+\+|--/.test(t)||l&&"!"==t?I(n):l&&"<"==t&&E.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?I(U(">"),le(ye,">"),W,n):"?"==t?I(D,B(":"),a):I(a):"quasi"==e?z(Y,n):";"!=e?"("==e?fe(G,")","call",n):"."==e?I(oe,n):"["==e?I(U("]"),Q,B("]"),W,n):l&&"as"==t?(E.marked="keyword",I(ye,n)):"regexp"==e?(E.state.lastType=E.marked="operator",E.stream.backUp(E.stream.pos-E.stream.start-1),I(a)):void 0:void 0}function Y(e,t){return"quasi"!=e?z():"${"!=t.slice(t.length-2)?I(Y):I(Q,Z)}function Z(e){if("}"==e)return E.marked="string-2",E.state.tokenize=h,I(Y)}function ee(e){return g(E.stream,E.state),z("{"==e?F:D)}function te(e){return g(E.stream,E.state),z("{"==e?F:G)}function re(e){return function(t){return"."==t?I(e?ae:ne):"variable"==t&&l?I(Ae,e?X:R):z(e?G:D)}}function ne(e,t){if("target"==t)return E.marked="keyword",I(R)}function ae(e,t){if("target"==t)return E.marked="keyword",I(X)}function ie(e){return":"==e?I(W,F):z(R,B(";"),W)}function oe(e){if("variable"==e)return E.marked="property",I()}function ce(e,t){return"async"==e?(E.marked="property",I(ce)):"variable"==e||"keyword"==E.style?(E.marked="property","get"==t||"set"==t?I(se):(l&&E.state.fatArrowAt==E.stream.start&&(r=E.stream.match(/^\s*:\s*/,!1))&&(E.state.fatArrowAt=E.stream.pos+r[0].length),I(ue))):"number"==e||"string"==e?(E.marked=c?"property":E.style+" property",I(ue)):"jsonld-keyword"==e?I(ue):l&&_(t)?(E.marked="keyword",I(ce)):"["==e?I(D,pe,B("]"),ue):"spread"==e?I(G,ue):"*"==t?(E.marked="keyword",I(ce)):":"==e?z(ue):void 0;var r}function se(e){return"variable"!=e?z(ue):(E.marked="property",I(Je))}function ue(e){return":"==e?I(G):"("==e?z(Je):void 0}function le(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=E.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),I((function(r,n){return r==t||n==t?z():z(e)}),n)}return a==t||i==t?I():r&&r.indexOf(";")>-1?z(e):I(B(t))}return function(r,a){return r==t||a==t?I():z(e,n)}}function fe(e,t,r){for(var n=3;n<arguments.length;n++)E.cc.push(arguments[n]);return I(U(t,r),le(e,t),W)}function de(e){return"}"==e?I():z(F,de)}function pe(e,t){if(l){if(":"==e)return I(ye);if("?"==t)return I(pe)}}function me(e,t){if(l&&(":"==e||"in"==t))return I(ye)}function ve(e){if(l&&":"==e)return E.stream.match(/^\s*\w+\s+is\b/,!1)?I(D,ke,ye):I(ye)}function ke(e,t){if("is"==t)return E.marked="keyword",I()}function ye(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(E.marked="keyword",I("typeof"==t?G:ye)):"variable"==e||"void"==t?(E.marked="type",I(Me)):"|"==t||"&"==t?I(ye):"string"==e||"number"==e||"atom"==e?I(Me):"["==e?I(U("]"),le(ye,"]",","),W,Me):"{"==e?I(U("}"),be,W,Me):"("==e?I(le(je,")"),we,Me):"<"==e?I(le(ye,">"),ye):"quasi"==e?z(xe,Me):void 0}function we(e){if("=>"==e)return I(ye)}function be(e){return e.match(/[\}\)\]]/)?I():","==e||";"==e?I(be):z(he,be)}function he(e,t){return"variable"==e||"keyword"==E.style?(E.marked="property",I(he)):"?"==t||"number"==e||"string"==e?I(he):":"==e?I(ye):"["==e?I(B("variable"),me,B("]"),he):"("==e?z(Ne,he):e.match(/[;\}\)\],]/)?void 0:I()}function xe(e,t){return"quasi"!=e?z():"${"!=t.slice(t.length-2)?I(xe):I(ye,ge)}function ge(e){if("}"==e)return E.marked="string-2",E.state.tokenize=h,I(xe)}function je(e,t){return"variable"==e&&E.stream.match(/^\s*[?:]/,!1)||"?"==t?I(je):":"==e?I(ye):"spread"==e?I(je):z(ye)}function Me(e,t){return"<"==t?I(U(">"),le(ye,">"),W,Me):"|"==t||"."==e||"&"==t?I(ye):"["==e?I(ye,B("]"),Me):"extends"==t||"implements"==t?(E.marked="keyword",I(ye)):"?"==t?I(ye,B(":"),ye):void 0}function Ae(e,t){if("<"==t)return I(U(">"),le(ye,">"),W,Me)}function Ve(){return z(ye,Ee)}function Ee(e,t){if("="==t)return I(ye)}function ze(e,t){return"enum"==t?(E.marked="keyword",I(tt)):z(Ie,pe,Se,_e)}function Ie(e,t){return l&&_(t)?(E.marked="keyword",I(Ie)):"variable"==e?($(t),I()):"spread"==e?I(Ie):"["==e?fe($e,"]"):"{"==e?fe(Te,"}"):void 0}function Te(e,t){return"variable"!=e||E.stream.match(/^\s*:/,!1)?("variable"==e&&(E.marked="property"),"spread"==e?I(Ie):"}"==e?z():"["==e?I(D,B("]"),B(":"),Te):I(B(":"),Ie,Se)):($(t),I(Se))}function $e(){return z(Ie,Se)}function Se(e,t){if("="==t)return I(G)}function _e(e){if(","==e)return I(ze)}function qe(e,t){if("keyword b"==e&&"else"==t)return I(U("form","else"),F,W)}function Ce(e,t){return"await"==t?I(Ce):"("==e?I(U(")"),Oe,W):void 0}function Oe(e){return"var"==e?I(ze,Pe):"variable"==e?I(Pe):z(Pe)}function Pe(e,t){return")"==e?I():";"==e?I(Pe):"in"==t||"of"==t?(E.marked="keyword",I(D,Pe)):z(D,Pe)}function Je(e,t){return"*"==t?(E.marked="keyword",I(Je)):"variable"==e?($(t),I(Je)):"("==e?I(P,U(")"),le(We,")"),W,ve,F,N):l&&"<"==t?I(U(">"),le(Ve,">"),W,Je):void 0}function Ne(e,t){return"*"==t?(E.marked="keyword",I(Ne)):"variable"==e?($(t),I(Ne)):"("==e?I(P,U(")"),le(We,")"),W,ve,N):l&&"<"==t?I(U(">"),le(Ve,">"),W,Ne):void 0}function Ue(e,t){return"keyword"==e||"variable"==e?(E.marked="type",I(Ue)):"<"==t?I(U(">"),le(Ve,">"),W):void 0}function We(e,t){return"@"==t&&I(D,We),"spread"==e?I(We):l&&_(t)?(E.marked="keyword",I(We)):l&&"this"==e?I(pe,Se):z(Ie,pe,Se)}function Be(e,t){return"variable"==e?Fe(e,t):He(e,t)}function Fe(e,t){if("variable"==e)return $(t),I(He)}function He(e,t){return"<"==t?I(U(">"),le(Ve,">"),W,He):"extends"==t||"implements"==t||l&&","==e?("implements"==t&&(E.marked="keyword"),I(l?ye:D,He)):"{"==e?I(U("}"),De,W):void 0}function De(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||l&&_(t))&&E.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(E.marked="keyword",I(De)):"variable"==e||"keyword"==E.style?(E.marked="property",I(Ge,De)):"number"==e||"string"==e?I(Ge,De):"["==e?I(D,pe,B("]"),Ge,De):"*"==t?(E.marked="keyword",I(De)):l&&"("==e?z(Ne,De):";"==e||","==e?I(De):"}"==e?I():"@"==t?I(D,De):void 0}function Ge(e,t){if("!"==t)return I(Ge);if("?"==t)return I(Ge);if(":"==e)return I(ye,Se);if("="==t)return I(G);var r=E.state.lexical.prev;return z(r&&"interface"==r.info?Ne:Je)}function Ke(e,t){return"*"==t?(E.marked="keyword",I(Ze,B(";"))):"default"==t?(E.marked="keyword",I(D,B(";"))):"{"==e?I(le(Le,"}"),Ze,B(";")):z(F)}function Le(e,t){return"as"==t?(E.marked="keyword",I(B("variable"))):"variable"==e?z(G,Le):void 0}function Qe(e){return"string"==e?I():"("==e?z(D):"."==e?z(R):z(Re,Xe,Ze)}function Re(e,t){return"{"==e?fe(Re,"}"):("variable"==e&&$(t),"*"==t&&(E.marked="keyword"),I(Ye))}function Xe(e){if(","==e)return I(Re,Xe)}function Ye(e,t){if("as"==t)return E.marked="keyword",I(Re)}function Ze(e,t){if("from"==t)return E.marked="keyword",I(D)}function et(e){return"]"==e?I():z(le(G,"]"))}function tt(){return z(U("form"),Ie,B("{"),U("}"),le(rt,"}"),W,W)}function rt(){return z(Ie,Se)}function nt(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function at(e,t,r){return t.tokenize==y&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return N.lex=!0,W.lex=!0,{startState:function(e){var t={tokenize:y,lastType:"sof",cc:[],lexical:new M((e||0)-i,0,"block",!1),localVars:r.localVars,context:r.localVars&&new q(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),g(e,t)),t.tokenize!=b&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=a&&"--"!=a?n:"incdec",V(t,r,n,a,e))},indent:function(t,n){if(t.tokenize==b||t.tokenize==h)return e.Pass;if(t.tokenize!=y)return 0;var a,c=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var l=t.cc[u];if(l==W)s=s.prev;else if(l!=qe&&l!=N)break}for(;("stat"==s.type||"form"==s.type)&&("}"==c||(a=t.cc[t.cc.length-1])&&(a==R||a==X)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;o&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var f=s.type,d=c==f;return"vardef"==f?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==f&&"{"==c?s.indented:"form"==f?s.indented+i:"stat"==f?s.indented+(nt(t,n)?o||i:0):"switch"!=s.info||d||0==r.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:i):s.indented+(/^(?:case|default)\b/.test(n)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:c,jsonMode:s,expressionAllowed:at,skipExpression:function(t){V(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(r(728))}}]);
|