@devtable/dashboard 13.27.6 → 13.27.7

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.
@@ -47,7 +47,7 @@ import { BarChart as Qb, BoxplotChart as Ub, CustomChart as Kb, FunnelChart as Y
47
47
  import { CalendarComponent as ry, DataZoomComponent as iy, GridComponent as sy, LegendComponent as ay, TooltipComponent as oy, MarkLineComponent as ly, MarkAreaComponent as cy, VisualMapComponent as dy } from "echarts/components";
48
48
  import { CanvasRenderer as uy } from "echarts/renderers";
49
49
  import Jr, { random as da } from "chroma-js";
50
- import { constrainedEditor as hy } from "constrained-editor-plugin";
50
+ import { constrainedEditor as hy } from "constrained-editor-plugin/dist/esm/constrainedEditor";
51
51
  import { encode as py, decode as my } from "js-base64";
52
52
  import ld from "eventemitter2";
53
53
  import ht from "echarts-for-react/lib/core";
@@ -5658,7 +5658,7 @@ class yl {
5658
5658
  }), this.instanceRegistry.clear(), this.factoryRegistry.clear();
5659
5659
  }
5660
5660
  }
5661
- const mp = "13.27.6", _w = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5661
+ const mp = "13.27.7-alpha.1", _w = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5662
5662
  __proto__: null,
5663
5663
  version: mp
5664
5664
  }, Symbol.toStringTag, { value: "Module" }));
@@ -1,4 +1,4 @@
1
- (function(w,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("@mantine/core"),require("@mantine/modals"),require("ahooks"),require("mobx"),require("mobx-react-lite"),require("@faker-js/faker"),require("crypto-js"),require("d3-array"),require("dayjs"),require("lodash"),require("mathjs"),require("numbro"),require("popmotion"),require("axios"),require("@mantine/hooks"),require("@tabler/icons-react"),require("react-i18next"),require("@mantine/tiptap"),require("@tiptap/extension-color"),require("@tiptap/extension-highlight"),require("@tiptap/extension-placeholder"),require("@tiptap/extension-subscript"),require("@tiptap/extension-superscript"),require("@tiptap/extension-table"),require("@tiptap/extension-table-cell"),require("@tiptap/extension-table-header"),require("@tiptap/extension-table-row"),require("@tiptap/extension-text-align"),require("@tiptap/extension-text-style"),require("@tiptap/extension-underline"),require("@tiptap/react"),require("@tiptap/starter-kit"),require("prosemirror-keymap"),require("prosemirror-commands"),require("prosemirror-schema-list"),require("@monaco-editor/react"),require("echarts/core"),require("echarts/charts"),require("echarts/components"),require("echarts/renderers"),require("chroma-js"),require("constrained-editor-plugin"),require("js-base64"),require("eventemitter2"),require("echarts-for-react/lib/core"),require("echarts-gl"),require("react-hook-form"),require("@mantine/dates"),require("tabler-icons-react"),require("@mantine/notifications"),require("@dnd-kit/react"),require("react-dom"),require("d3-regression"),require("@dnd-kit/helpers"),require("uuid"),require("@mantine/prism"),require("@tanstack/react-table"),require("react-virtual"),require("rc-select"),require("rc-tree-select"),require("react-grid-layout"),require("mobx-state-tree"),require("performant-array-to-tree"),require("file-saver"),require("dom-to-image-more"),require("jszip"),require("@json2csv/whatwg"),require("dayjs/plugin/advancedFormat"),require("dayjs/plugin/arraySupport"),require("dayjs/plugin/buddhistEra"),require("dayjs/plugin/calendar"),require("dayjs/plugin/customParseFormat"),require("dayjs/plugin/dayOfYear"),require("dayjs/plugin/duration"),require("dayjs/plugin/isBetween"),require("dayjs/plugin/isLeapYear"),require("dayjs/plugin/isMoment"),require("dayjs/plugin/isoWeek"),require("dayjs/plugin/isoWeeksInYear"),require("dayjs/plugin/isSameOrAfter"),require("dayjs/plugin/isSameOrBefore"),require("dayjs/plugin/isToday"),require("dayjs/plugin/isTomorrow"),require("dayjs/plugin/isYesterday"),require("dayjs/plugin/localeData"),require("dayjs/plugin/localizedFormat"),require("dayjs/plugin/minMax"),require("dayjs/plugin/objectSupport"),require("dayjs/plugin/pluralGetSet"),require("dayjs/plugin/preParsePostFormat"),require("dayjs/plugin/quarterOfYear"),require("dayjs/plugin/relativeTime"),require("dayjs/plugin/timezone"),require("dayjs/plugin/toArray"),require("dayjs/plugin/toObject"),require("dayjs/plugin/updateLocale"),require("dayjs/plugin/utc"),require("dayjs/plugin/weekday"),require("dayjs/plugin/weekOfYear"),require("dayjs/plugin/weekYear"),require("i18next"),require("i18next-browser-languagedetector"),require("intl-pluralrules"),require("reactflow")):typeof define=="function"&&define.amd?define(["exports","react","@mantine/core","@mantine/modals","ahooks","mobx","mobx-react-lite","@faker-js/faker","crypto-js","d3-array","dayjs","lodash","mathjs","numbro","popmotion","axios","@mantine/hooks","@tabler/icons-react","react-i18next","@mantine/tiptap","@tiptap/extension-color","@tiptap/extension-highlight","@tiptap/extension-placeholder","@tiptap/extension-subscript","@tiptap/extension-superscript","@tiptap/extension-table","@tiptap/extension-table-cell","@tiptap/extension-table-header","@tiptap/extension-table-row","@tiptap/extension-text-align","@tiptap/extension-text-style","@tiptap/extension-underline","@tiptap/react","@tiptap/starter-kit","prosemirror-keymap","prosemirror-commands","prosemirror-schema-list","@monaco-editor/react","echarts/core","echarts/charts","echarts/components","echarts/renderers","chroma-js","constrained-editor-plugin","js-base64","eventemitter2","echarts-for-react/lib/core","echarts-gl","react-hook-form","@mantine/dates","tabler-icons-react","@mantine/notifications","@dnd-kit/react","react-dom","d3-regression","@dnd-kit/helpers","uuid","@mantine/prism","@tanstack/react-table","react-virtual","rc-select","rc-tree-select","react-grid-layout","mobx-state-tree","performant-array-to-tree","file-saver","dom-to-image-more","jszip","@json2csv/whatwg","dayjs/plugin/advancedFormat","dayjs/plugin/arraySupport","dayjs/plugin/buddhistEra","dayjs/plugin/calendar","dayjs/plugin/customParseFormat","dayjs/plugin/dayOfYear","dayjs/plugin/duration","dayjs/plugin/isBetween","dayjs/plugin/isLeapYear","dayjs/plugin/isMoment","dayjs/plugin/isoWeek","dayjs/plugin/isoWeeksInYear","dayjs/plugin/isSameOrAfter","dayjs/plugin/isSameOrBefore","dayjs/plugin/isToday","dayjs/plugin/isTomorrow","dayjs/plugin/isYesterday","dayjs/plugin/localeData","dayjs/plugin/localizedFormat","dayjs/plugin/minMax","dayjs/plugin/objectSupport","dayjs/plugin/pluralGetSet","dayjs/plugin/preParsePostFormat","dayjs/plugin/quarterOfYear","dayjs/plugin/relativeTime","dayjs/plugin/timezone","dayjs/plugin/toArray","dayjs/plugin/toObject","dayjs/plugin/updateLocale","dayjs/plugin/utc","dayjs/plugin/weekday","dayjs/plugin/weekOfYear","dayjs/plugin/weekYear","i18next","i18next-browser-languagedetector","intl-pluralrules","reactflow"],m):(w=typeof globalThis<"u"?globalThis:w||self,m(w.dashboard={},w.react,w["@mantine/core"],w["@mantine/modals"],w.ahooks,w.mobx,w["mobx-react-lite"],w["@faker-js/faker"],w.CryptoJS,w["d3-array"],w.dayjs,w._,w.mathjs,w.numbro,w.popmotion,w.axios,w["@mantine/hooks"],w["@tabler/icons-react"],w["react-i18next"],w["@mantine/tiptap"],w["@tiptap/extension-color"],w["@tiptap/extension-highlight"],w["@tiptap/extension-placeholder"],w["@tiptap/extension-subscript"],w["@tiptap/extension-superscript"],w["@tiptap/extension-table"],w["@tiptap/extension-table-cell"],w["@tiptap/extension-table-header"],w["@tiptap/extension-table-row"],w["@tiptap/extension-text-align"],w["@tiptap/extension-text-style"],w["@tiptap/extension-underline"],w["@tiptap/react"],w["@tiptap/starter-kit"],w["prosemirror-keymap"],w["prosemirror-commands"],w["prosemirror-schema-list"],w["@monaco-editor/react"],w["echarts/core"],w["echarts/charts"],w["echarts/components"],w["echarts/renderers"],w["chroma-js"],w["constrained-editor-plugin"],w["js-base64"],w.eventemitter2,w["echarts-for-react/lib/core"],w["echarts-gl"],w["react-hook-form"],w["@mantine/dates"],w["tabler-icons-react"],w["@mantine/notifications"],w["@dnd-kit/react"],w["react-dom"],w["d3-regression"],w["@dnd-kit/helpers"],w.uuid,w["@mantine/prism"],w["@tanstack/react-table"],w["react-virtual"],w["rc-select"],w["rc-tree-select"],w["react-grid-layout"],w["mobx-state-tree"],w["performant-array-to-tree"],w["file-saver"],w["dom-to-image-more"],w.jszip,w["@json2csv/whatwg"],w["dayjs/plugin/advancedFormat"],w["dayjs/plugin/arraySupport"],w["dayjs/plugin/buddhistEra"],w["dayjs/plugin/calendar"],w["dayjs/plugin/customParseFormat"],w["dayjs/plugin/dayOfYear"],w["dayjs/plugin/duration"],w["dayjs/plugin/isBetween"],w["dayjs/plugin/isLeapYear"],w["dayjs/plugin/isMoment"],w["dayjs/plugin/isoWeek"],w["dayjs/plugin/isoWeeksInYear"],w["dayjs/plugin/isSameOrAfter"],w["dayjs/plugin/isSameOrBefore"],w["dayjs/plugin/isToday"],w["dayjs/plugin/isTomorrow"],w["dayjs/plugin/isYesterday"],w["dayjs/plugin/localeData"],w["dayjs/plugin/localizedFormat"],w["dayjs/plugin/minMax"],w["dayjs/plugin/objectSupport"],w["dayjs/plugin/pluralGetSet"],w["dayjs/plugin/preParsePostFormat"],w["dayjs/plugin/quarterOfYear"],w["dayjs/plugin/relativeTime"],w["dayjs/plugin/timezone"],w["dayjs/plugin/toArray"],w["dayjs/plugin/toObject"],w["dayjs/plugin/updateLocale"],w["dayjs/plugin/utc"],w["dayjs/plugin/weekday"],w["dayjs/plugin/weekOfYear"],w["dayjs/plugin/weekYear"],w.i18next,w["i18next-browser-languagedetector"],w["intl-pluralrules"],w.reactflow))})(this,function(w,m,o,lt,W,X,D,Mm,Ul,ur,P,v,Im,Zr,nn,At,fe,M,_,Q,Yl,Kl,Xl,Jl,Zl,Hl,ec,tc,nc,rc,sc,ic,ac,oc,V2,De,ji,et,lc,Pt,rn,zm,Ot,Em,cc,uc,Pe,N2,b,dc,V,sn,Hr,Am,Pm,Om,Ut,an,bt,Lm,pc,hc,es,x,Bm,ts,fc,mc,qm,Vm,Nm,$m,Fm,Gm,Wm,Rm,Qm,Um,Ym,Km,Xm,Jm,Zm,Hm,eg,tg,ng,rg,sg,ig,ag,og,lg,cg,ug,dg,pg,hg,fg,mg,gg,xg,yg,bg,$2,Ee){"use strict";var B2=Object.defineProperty;var q2=(w,m,o)=>m in w?B2(w,m,{enumerable:!0,configurable:!0,writable:!0,value:o}):w[m]=o;var B=(w,m,o)=>(q2(w,typeof m!="symbol"?m+"":m,o),o);function On(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const vg=On(Ul),_g=On(ur),Ln=On(Im),jg=On(nn),Ae=On(lc),on=On(Pm);var wi={exports:{}},dr={};/**
1
+ (function(w,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("@mantine/core"),require("@mantine/modals"),require("ahooks"),require("mobx"),require("mobx-react-lite"),require("@faker-js/faker"),require("crypto-js"),require("d3-array"),require("dayjs"),require("lodash"),require("mathjs"),require("numbro"),require("popmotion"),require("axios"),require("@mantine/hooks"),require("@tabler/icons-react"),require("react-i18next"),require("@mantine/tiptap"),require("@tiptap/extension-color"),require("@tiptap/extension-highlight"),require("@tiptap/extension-placeholder"),require("@tiptap/extension-subscript"),require("@tiptap/extension-superscript"),require("@tiptap/extension-table"),require("@tiptap/extension-table-cell"),require("@tiptap/extension-table-header"),require("@tiptap/extension-table-row"),require("@tiptap/extension-text-align"),require("@tiptap/extension-text-style"),require("@tiptap/extension-underline"),require("@tiptap/react"),require("@tiptap/starter-kit"),require("prosemirror-keymap"),require("prosemirror-commands"),require("prosemirror-schema-list"),require("@monaco-editor/react"),require("echarts/core"),require("echarts/charts"),require("echarts/components"),require("echarts/renderers"),require("chroma-js"),require("constrained-editor-plugin/dist/esm/constrainedEditor"),require("js-base64"),require("eventemitter2"),require("echarts-for-react/lib/core"),require("echarts-gl"),require("react-hook-form"),require("@mantine/dates"),require("tabler-icons-react"),require("@mantine/notifications"),require("@dnd-kit/react"),require("react-dom"),require("d3-regression"),require("@dnd-kit/helpers"),require("uuid"),require("@mantine/prism"),require("@tanstack/react-table"),require("react-virtual"),require("rc-select"),require("rc-tree-select"),require("react-grid-layout"),require("mobx-state-tree"),require("performant-array-to-tree"),require("file-saver"),require("dom-to-image-more"),require("jszip"),require("@json2csv/whatwg"),require("dayjs/plugin/advancedFormat"),require("dayjs/plugin/arraySupport"),require("dayjs/plugin/buddhistEra"),require("dayjs/plugin/calendar"),require("dayjs/plugin/customParseFormat"),require("dayjs/plugin/dayOfYear"),require("dayjs/plugin/duration"),require("dayjs/plugin/isBetween"),require("dayjs/plugin/isLeapYear"),require("dayjs/plugin/isMoment"),require("dayjs/plugin/isoWeek"),require("dayjs/plugin/isoWeeksInYear"),require("dayjs/plugin/isSameOrAfter"),require("dayjs/plugin/isSameOrBefore"),require("dayjs/plugin/isToday"),require("dayjs/plugin/isTomorrow"),require("dayjs/plugin/isYesterday"),require("dayjs/plugin/localeData"),require("dayjs/plugin/localizedFormat"),require("dayjs/plugin/minMax"),require("dayjs/plugin/objectSupport"),require("dayjs/plugin/pluralGetSet"),require("dayjs/plugin/preParsePostFormat"),require("dayjs/plugin/quarterOfYear"),require("dayjs/plugin/relativeTime"),require("dayjs/plugin/timezone"),require("dayjs/plugin/toArray"),require("dayjs/plugin/toObject"),require("dayjs/plugin/updateLocale"),require("dayjs/plugin/utc"),require("dayjs/plugin/weekday"),require("dayjs/plugin/weekOfYear"),require("dayjs/plugin/weekYear"),require("i18next"),require("i18next-browser-languagedetector"),require("intl-pluralrules"),require("reactflow")):typeof define=="function"&&define.amd?define(["exports","react","@mantine/core","@mantine/modals","ahooks","mobx","mobx-react-lite","@faker-js/faker","crypto-js","d3-array","dayjs","lodash","mathjs","numbro","popmotion","axios","@mantine/hooks","@tabler/icons-react","react-i18next","@mantine/tiptap","@tiptap/extension-color","@tiptap/extension-highlight","@tiptap/extension-placeholder","@tiptap/extension-subscript","@tiptap/extension-superscript","@tiptap/extension-table","@tiptap/extension-table-cell","@tiptap/extension-table-header","@tiptap/extension-table-row","@tiptap/extension-text-align","@tiptap/extension-text-style","@tiptap/extension-underline","@tiptap/react","@tiptap/starter-kit","prosemirror-keymap","prosemirror-commands","prosemirror-schema-list","@monaco-editor/react","echarts/core","echarts/charts","echarts/components","echarts/renderers","chroma-js","constrained-editor-plugin/dist/esm/constrainedEditor","js-base64","eventemitter2","echarts-for-react/lib/core","echarts-gl","react-hook-form","@mantine/dates","tabler-icons-react","@mantine/notifications","@dnd-kit/react","react-dom","d3-regression","@dnd-kit/helpers","uuid","@mantine/prism","@tanstack/react-table","react-virtual","rc-select","rc-tree-select","react-grid-layout","mobx-state-tree","performant-array-to-tree","file-saver","dom-to-image-more","jszip","@json2csv/whatwg","dayjs/plugin/advancedFormat","dayjs/plugin/arraySupport","dayjs/plugin/buddhistEra","dayjs/plugin/calendar","dayjs/plugin/customParseFormat","dayjs/plugin/dayOfYear","dayjs/plugin/duration","dayjs/plugin/isBetween","dayjs/plugin/isLeapYear","dayjs/plugin/isMoment","dayjs/plugin/isoWeek","dayjs/plugin/isoWeeksInYear","dayjs/plugin/isSameOrAfter","dayjs/plugin/isSameOrBefore","dayjs/plugin/isToday","dayjs/plugin/isTomorrow","dayjs/plugin/isYesterday","dayjs/plugin/localeData","dayjs/plugin/localizedFormat","dayjs/plugin/minMax","dayjs/plugin/objectSupport","dayjs/plugin/pluralGetSet","dayjs/plugin/preParsePostFormat","dayjs/plugin/quarterOfYear","dayjs/plugin/relativeTime","dayjs/plugin/timezone","dayjs/plugin/toArray","dayjs/plugin/toObject","dayjs/plugin/updateLocale","dayjs/plugin/utc","dayjs/plugin/weekday","dayjs/plugin/weekOfYear","dayjs/plugin/weekYear","i18next","i18next-browser-languagedetector","intl-pluralrules","reactflow"],m):(w=typeof globalThis<"u"?globalThis:w||self,m(w.dashboard={},w.react,w["@mantine/core"],w["@mantine/modals"],w.ahooks,w.mobx,w["mobx-react-lite"],w["@faker-js/faker"],w.CryptoJS,w["d3-array"],w.dayjs,w._,w.mathjs,w.numbro,w.popmotion,w.axios,w["@mantine/hooks"],w["@tabler/icons-react"],w["react-i18next"],w["@mantine/tiptap"],w["@tiptap/extension-color"],w["@tiptap/extension-highlight"],w["@tiptap/extension-placeholder"],w["@tiptap/extension-subscript"],w["@tiptap/extension-superscript"],w["@tiptap/extension-table"],w["@tiptap/extension-table-cell"],w["@tiptap/extension-table-header"],w["@tiptap/extension-table-row"],w["@tiptap/extension-text-align"],w["@tiptap/extension-text-style"],w["@tiptap/extension-underline"],w["@tiptap/react"],w["@tiptap/starter-kit"],w["prosemirror-keymap"],w["prosemirror-commands"],w["prosemirror-schema-list"],w["@monaco-editor/react"],w["echarts/core"],w["echarts/charts"],w["echarts/components"],w["echarts/renderers"],w["chroma-js"],w["constrained-editor-plugin/dist/esm/constrainedEditor"],w["js-base64"],w.eventemitter2,w["echarts-for-react/lib/core"],w["echarts-gl"],w["react-hook-form"],w["@mantine/dates"],w["tabler-icons-react"],w["@mantine/notifications"],w["@dnd-kit/react"],w["react-dom"],w["d3-regression"],w["@dnd-kit/helpers"],w.uuid,w["@mantine/prism"],w["@tanstack/react-table"],w["react-virtual"],w["rc-select"],w["rc-tree-select"],w["react-grid-layout"],w["mobx-state-tree"],w["performant-array-to-tree"],w["file-saver"],w["dom-to-image-more"],w.jszip,w["@json2csv/whatwg"],w["dayjs/plugin/advancedFormat"],w["dayjs/plugin/arraySupport"],w["dayjs/plugin/buddhistEra"],w["dayjs/plugin/calendar"],w["dayjs/plugin/customParseFormat"],w["dayjs/plugin/dayOfYear"],w["dayjs/plugin/duration"],w["dayjs/plugin/isBetween"],w["dayjs/plugin/isLeapYear"],w["dayjs/plugin/isMoment"],w["dayjs/plugin/isoWeek"],w["dayjs/plugin/isoWeeksInYear"],w["dayjs/plugin/isSameOrAfter"],w["dayjs/plugin/isSameOrBefore"],w["dayjs/plugin/isToday"],w["dayjs/plugin/isTomorrow"],w["dayjs/plugin/isYesterday"],w["dayjs/plugin/localeData"],w["dayjs/plugin/localizedFormat"],w["dayjs/plugin/minMax"],w["dayjs/plugin/objectSupport"],w["dayjs/plugin/pluralGetSet"],w["dayjs/plugin/preParsePostFormat"],w["dayjs/plugin/quarterOfYear"],w["dayjs/plugin/relativeTime"],w["dayjs/plugin/timezone"],w["dayjs/plugin/toArray"],w["dayjs/plugin/toObject"],w["dayjs/plugin/updateLocale"],w["dayjs/plugin/utc"],w["dayjs/plugin/weekday"],w["dayjs/plugin/weekOfYear"],w["dayjs/plugin/weekYear"],w.i18next,w["i18next-browser-languagedetector"],w["intl-pluralrules"],w.reactflow))})(this,function(w,m,o,lt,W,X,D,Mm,Ul,ur,P,v,Im,Zr,nn,At,fe,M,_,Q,Yl,Kl,Xl,Jl,Zl,Hl,ec,tc,nc,rc,sc,ic,ac,oc,V2,De,ji,et,lc,Pt,rn,zm,Ot,Em,cc,uc,Pe,N2,b,dc,V,sn,Hr,Am,Pm,Om,Ut,an,bt,Lm,pc,hc,es,x,Bm,ts,fc,mc,qm,Vm,Nm,$m,Fm,Gm,Wm,Rm,Qm,Um,Ym,Km,Xm,Jm,Zm,Hm,eg,tg,ng,rg,sg,ig,ag,og,lg,cg,ug,dg,pg,hg,fg,mg,gg,xg,yg,bg,$2,Ee){"use strict";var B2=Object.defineProperty;var q2=(w,m,o)=>m in w?B2(w,m,{enumerable:!0,configurable:!0,writable:!0,value:o}):w[m]=o;var B=(w,m,o)=>(q2(w,typeof m!="symbol"?m+"":m,o),o);function On(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const vg=On(Ul),_g=On(ur),Ln=On(Im),jg=On(nn),Ae=On(lc),on=On(Pm);var wi={exports:{}},dr={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -71,7 +71,7 @@ Check the top-level render call using <`+L+">.")}return A}}function Sm(C,A){{if(
71
71
  ${Object.entries(t).map(([s,i])=>`const ${s} = '${i}';`).join(`
72
72
  `)}
73
73
  return ${e};
74
- `)(n)}catch(s){return console.error(s),console.log(e),e}}function mu(e,t,n,s){const i=$y(t,s);return e.replaceAll(/(\{\{([^{\}]+(?=}))\}\})/g,(...l)=>{const c=l[2];if(!c)return c;const u=i[c];if(u)return u;const d=Fy(c);return Gy(d,i,n)})}function Wy(e,t){const n=cc.decode(t);n!==e&&(console.error("Inconsistent sql"),console.groupCollapsed("Inconsistent sql"),console.table({before:e,after:t,v:n}),console.groupEnd())}async function Ry({query:e,name:t,payload:n,additionals:s},i){if(!e.sql)return[];const{type:a,key:l,sql:c,pre_process:u,post_process:d}=e,p=Ci(c,n),h=Dg({sql:p,pre_process:u}),f=cc.encode(h);Wy(h,f);let g=await Lt.query(i)({type:a,key:l,query:f,...s},{params:{name:t}});return g=Mg(d,g,Xi(n)),g}async function Qy({type:e,key:t,configString:n,name:s,additionals:i},a){try{return await Lt.httpDataSourceQuery(a)({type:e,key:t,query:n,...i},{params:{name:s}})}catch(l){if(At.isCancel(l))throw l;return console.error(l),l}}async function Ji(){try{return(await Lt.post()("/datasource/list",{filter:{},sort:[{field:"create_time",order:"ASC"}],pagination:{page:1,pagesize:100}},{})).data}catch(e){return console.error(e),[]}}async function gu(){try{return(await Lt.post()("/sql_snippet/list",{filter:{},sort:[{field:"id",order:"ASC"}],pagination:{page:1,pagesize:1e3}},{})).data}catch(e){return console.error(e),[]}}class xu{constructor(t){B(this,"rootRef");this.rootRef=X.observable({current:t})}async deleteItem(t){X.runInAction(()=>{v.unset(this.rootRef.current,[t])})}getItem(t){const n=this.getValueFromRoot(t);return Promise.resolve(n)}getValueFromRoot(t){return t===null?X.toJS(this.rootRef.current):v.get(this.rootRef.current,[t])}setItem(t,n){if(t===null)if(v.isObject(n))X.runInAction(()=>{this.rootRef.current=n});else throw new Error("Cannot set root value to non-object");else X.runInAction(()=>{v.set(this.rootRef.current,[t],n)});return Promise.resolve(this.getItem(t))}watchItem(t,n,s){return X.reaction(()=>this.getValueFromRoot(t),(i,a)=>{n(i,a)},{requiresObservable:!0,fireImmediately:v.get(s,"fireImmediately",!1)})}}class Uy{constructor(){B(this,"channels",new Map);B(this,"globalChannel",new uc)}getChannel(t){const n=this.channels.get(t);if(n)return n;const s=new uc;return this.channels.set(t,s),s}}class Yy{constructor(t){B(this,"instances",new Map);this.pluginManager=t}get availableVizList(){return this.pluginManager.installedPlugins.flatMap(t=>t.manifest.viz)}resolveComponent(t){return this.pluginManager.factory.viz(t)}getOrCreateInstance(t){const n=this.instances.get(t.id);if(n)return n;const s={id:t.id,name:t.viz.type,type:t.viz.type,messageChannels:new Uy,instanceData:new xu(t.viz.conf)};return this.instances.set(t.id,s),s}}function yu(e,t,n,s){return{vizManager:n,locale:"zh",msgChannels:e.messageChannels,instanceData:e.instanceData,pluginData:new xu({}),colorPalette:{getColor(){return()=>""}},data:t,variables:s}}const Ky=e=>{const{panel:t,measure:n,vizManager:s,data:i,variables:a}=e,l=s.resolveComponent(t.viz.type),c=s.getOrCreateInstance(t),u={...yu(c,i,s,a),viewport:{width:n.w,height:n.h}},d=l.viewRender;return r.jsx(d,{context:u,instance:c,...v.omit(e,["panel","vizManager","data"])})},Xy=e=>{const{vizManager:t,panel:n,data:s,variables:i}=e,a=t.resolveComponent(n.viz.type),l=t.getOrCreateInstance(n),c={...yu(l,s,t,i)},u=a.configRender;return r.jsx(u,{context:c,instance:l,...v.omit(e,["panel","vizManager","data"])})},bu=(e,t)=>{const n=Ot.bezier(e),s=Ot.bezier(t);return function(i){return i<50?n(i*2/100).hex():s((i-50)*2/100).hex()}},js=e=>{const t=Ot.bezier(e);return function(n){return t(n/100).hex()}},Jy={type:"interpolation",displayName:"style.color.interpolation.palette.red_green",getColor:bu(["darkred","deeppink","lightyellow"],["lightyellow","lightgreen","teal"]),name:"red-green",category:"diverging"},Zy={type:"interpolation",displayName:"style.color.interpolation.palette.yellow_blue",getColor:bu(["#8f531d","#ffd347","#e3efe3"],["#eefaee","#4ecbbf","#003f94"]),name:"yellow-blue",category:"diverging"},Hy={type:"interpolation",displayName:"style.color.interpolation.palette.red",getColor:js(["#fff7f1","darkred"]),name:"red",category:"sequential"},eb={type:"interpolation",displayName:"style.color.interpolation.palette.green",getColor:js(["#f0ffed","darkgreen"]),name:"green",category:"sequential"},tb={type:"interpolation",displayName:"style.color.interpolation.palette.blue",getColor:js(["#f9fcff","#48b3e9","darkblue"]),name:"blue",category:"sequential"},nb={type:"interpolation",displayName:"style.color.interpolation.palette.orange",getColor:js(["#fff7f1","darkorange","#b60000"]),name:"orange",category:"sequential"};class rb{constructor(t){B(this,"symbol");this.symbol=Symbol(t)}}function Kt(e){return new rb(e)}class Zi{constructor(){B(this,"parent");B(this,"factoryRegistry",new Map);B(this,"instanceRegistry",new Map)}createScoped(){const t=new Zi;return t.parent=this,t}getRequired(t){return this.get(t)}get(t){if(this.instanceRegistry.has(t.symbol))return this.instanceRegistry.get(t.symbol);const n=this.factoryRegistry.get(t.symbol);if(n){const s=n(this);return this.instanceRegistry.set(t.symbol,s),s}if(this.parent)return this.parent.get(t)}provideFactory(t,n){return this.factoryRegistry.has(t.symbol)?console.warn(`Token ${t.symbol.toString()} is already registered`):this.factoryRegistry.set(t.symbol,n),this}provideValue(t,n){return this.factoryRegistry.has(t.symbol)?console.warn(`Token ${t.symbol.toString()} is already registered`):this.factoryRegistry.set(t.symbol,()=>n),this}dispose(){this.instanceRegistry.forEach(t=>{const n=v.get(t,"dispose");v.isFunction(n)&&n.bind(t)()}),this.instanceRegistry.clear(),this.factoryRegistry.clear()}}const vu="13.27.6",sb=Object.freeze(Object.defineProperty({__proto__:null,version:vu},Symbol.toStringTag,{value:"Module"}));class ib{constructor(t){B(this,"staticColors",new Map);B(this,"interpolations",new Map);t.installedPlugins.forEach(n=>{n.manifest.color.forEach(s=>{this.register(s)})})}getStaticColors(){return Array.from(this.staticColors.values())}register(t){const n=this.encodeColor(t);t.type==="single"?(this.staticColors.has(n)&&console.warn(`the color '${t.name}' has been registered under '${t.category}', previous registered value will be overridden`),this.staticColors.set(n,t)):t.type==="interpolation"&&(this.interpolations.has(n)&&console.warn(`the interpolation '${t.name}' has been registered under '${t.category}', previous registered value will be overridden`,`the interpolation '${t.name}' has been registered under '${t.category}', previous registered value will be overridden`),this.interpolations.set(n,t))}decodeStaticColor(t){return this.staticColors.get(t)}encodeColor(t){return`\${${t.category}}.{${t.name}}`}decodeInterpolation(t){return this.interpolations.get(t)}getColorInterpolations(){return Array.from(this.interpolations.values())}}class ab{constructor(){B(this,"plugins",new Map);B(this,"vizComponents",new Map);B(this,"factory",{viz:t=>{const n=this.vizComponents.get(t);if(n)return n;throw new Error(`Viz Component (${t}) not found`)}})}install(t){if(this.plugins.has(t.id))throw new Error(`Plugin (${t.id}) has been installed before`);this.plugins.set(t.id,t);for(const n of t.manifest.viz){if(this.vizComponents.has(n.name))throw new Error(`Viz Component (${n.name}) has been installed before`);this.vizComponents.set(n.name,n)}}get installedPlugins(){return Array.from(this.plugins.values())}}class ob{constructor(){B(this,"migrations",[])}version(t,n){return this.migrations.push({version:t,handler:n}),this}run(t,n,s){var l;if(t.from===t.to)return n;if(t.from>t.to)throw new Error(`Can not downgrade from version '${t.from}' to (${t.to})`);const i=this.migrations.filter(c=>c.version>t.from&&c.version<=t.to),a=v.orderBy(i,"version","asc");if(((l=v.last(a))==null?void 0:l.version)!==t.to)throw new Error(`Migration to version ${t.to} not found`);return a.reduce((c,u)=>u.handler(c,s),n)}}class ge extends ob{constructor(){super(),this.configVersions()}version(t,n){return super.version(t,(s,i)=>({version:t,...n(s,i)}))}async migrate({configData:t,panelModel:n}){const s=await t.getItem(null),i=v.get(s,"version",0),a=this.run({from:i,to:this.VERSION},s,{panelModel:n});await t.setItem(null,a)}async needMigration({configData:t}){const n=await t.getItem(null);return v.get(n,"version",0)<this.VERSION}}const $=(e,t)=>{const[n,{setFalse:s}]=W.useBoolean(!0),[i,a]=m.useState();m.useEffect(()=>(e.getItem(t).then(c=>{a(c),s()}),e.watchItem(t,c=>{a(c)})));const l=m.useCallback(async c=>{await e.setItem(t,c),a(c)},[e,t]);return{loading:n,value:i,set:l}},Qe={top:16,right:16,bottom:16,left:16},wt=e=>Math.max(0,e-Qe.left-Qe.right),Ct=e=>Math.max(0,e-Qe.top-Qe.bottom),jr=(e,t)=>({width:wt(e),height:Ct(t)}),Ue=({width:e,height:t,children:n})=>r.jsx(o.Box,{pt:Qe.top,pr:Qe.right,pb:Qe.bottom,pl:Qe.left,sx:{width:e,height:t,overflow:"hidden",position:"relative"},children:n}),Hi={x_axis_data_key:"",y_axis_data_key:"",z_axis_data_key:"",xAxis3D:{type:"value",name:"X Axis Name"},yAxis3D:{type:"value",name:"Y Axis Name"},zAxis3D:{type:"value",name:"Z Axis Name"}};function lb({context:e}){const{value:t}=$(e.instanceData,"config"),n=e.data,{width:s,height:i}=e.viewport,{x_axis_data_key:a,y_axis_data_key:l,z_axis_data_key:c,xAxis3D:u,yAxis3D:d,zAxis3D:p}=v.defaults({},t,Hi),h=m.useMemo(()=>rs(n,a),[n,a]),{x:f,y:g,z:y}=m.useMemo(()=>({x:O(a),y:O(l),z:O(c)}),[a,l,c]),{min:j,max:k}=m.useMemo(()=>{const T=v.minBy(h,z=>z[y.columnKey]),I=v.maxBy(h,z=>z[y.columnKey]);return{min:v.get(T,y.columnKey),max:v.get(I,y.columnKey)}},[h,y]),S={tooltip:{},backgroundColor:"#fff",visualMap:{show:!0,dimension:2,min:j,max:k,inRange:{color:["#313695","#4575b4","#74add1","#abd9e9","#e0f3f8","#ffffbf","#fee090","#fdae61","#f46d43","#d73027","#a50026"]}},xAxis3D:u,yAxis3D:d,zAxis3D:p,grid3D:{viewControl:{projection:"orthographic",autoRotate:!1},light:{main:{shadow:!0,quality:"ultra",intensity:1.5}}},series:[{type:"bar3D",wireframe:{},data:h.map(T=>[T[f.columnKey],T[g.columnKey],T[y.columnKey]])}]};return t?r.jsx(Ue,{width:s,height:i,children:r.jsx(Pe,{echarts:Ae,option:S,style:jr(s,i),notMerge:!0,theme:"merico-light"})}):null}const _u=m.createContext(null),ea=_u.Provider;function ta(){const e=m.useContext(_u);if(!e)throw new Error("Please use DashboardModelContextProvider");return e}const Z=()=>ta(),ju=()=>ta(),wu=m.createContext({searchButtonProps:{}}),na=wu.Provider;function Cu(){return m.useContext(wu)}const Su=m.createContext(null),ra=Su.Provider;function ku(){const e=m.useContext(Su);if(!e)throw new Error("Please use ContentModelContextProvider");return e}const Y=()=>ku(),_e=()=>ku(),cb={inEditMode:!1},ws=m.createContext(cb),Tu=m.createContext({panel:null,data:{},loading:!1,errors:[],downloadPanelScreenshot:()=>{}}),sa=Tu.Provider;function Du(){const e=m.useContext(Tu);if(!e.panel)throw new Error("Please use PanelContextProvider");return e}const St=()=>Du(),Ge=()=>Du(),ub={fullScreenPanelID:"",setFullScreenPanelID:v.noop},ia=m.createContext(ub);function Mu(){const e=m.useContext(ia);if(!e)throw new Error("Please use FullScreenPanelContext.Provider");return e}const db={en:"en",zh:"zh-cn"};function aa({children:e}){const{i18n:t}=_.useTranslation(),n=m.useMemo(()=>{const s=t.language;return db[s]??"en"},[t.language]);return r.jsx(dc.DatesProvider,{settings:{locale:n,firstDayOfWeek:1},children:e})}const F=D.observer(m.forwardRef(({label:e,required:t,description:n,value:s,onChange:i,queryID:a,clearable:l=!1,sx:c,...u},d)=>{const{panel:p}=Ge(),h=m.useMemo(()=>p.dataFieldOptions(s,l,a),[s,l,a]);if(h.length===0){const f=p.explainDataKey(s);return r.jsxs(o.HoverCard,{shadow:"md",position:"bottom-start",withinPortal:!0,zIndex:320,children:[r.jsx(o.HoverCard.Target,{children:r.jsx(o.Box,{children:r.jsx(o.TextInput,{label:e,required:t,defaultValue:f.columnKey,readOnly:!0,disabled:!0})})}),r.jsx(o.HoverCard.Dropdown,{children:r.jsxs(o.Group,{position:"left",spacing:0,children:[r.jsx(o.Text,{size:"xs",color:f.queryName?"black":"red",sx:{fontFamily:"monospace"},children:f.queryName??f.queryID}),r.jsx(o.Text,{size:"xs",color:"black",sx:{fontFamily:"monospace"},children:"."}),r.jsx(o.Text,{size:"xs",color:"red",sx:{fontFamily:"monospace"},children:f.columnKey})]})})]})}return r.jsx(o.Select,{ref:d,label:e,description:n,data:h,value:s,onChange:i,required:t,sx:c,maxDropdownHeight:500,...u})}));function pb({context:e}){const{value:t,set:n}=$(e.instanceData,"config"),s=v.defaults({},t,Hi),{control:i,handleSubmit:a,reset:l}=b.useForm({defaultValues:s});return m.useEffect(()=>{l(s)},[t]),t?r.jsx(o.Stack,{spacing:"xs",children:r.jsxs("form",{onSubmit:a(n),children:[r.jsx(o.Text,{children:"X Axis"}),r.jsxs(o.Group,{position:"apart",grow:!0,p:"md",sx:{position:"relative",border:"1px solid #eee"},children:[r.jsx(b.Controller,{name:"x_axis_data_key",control:i,render:({field:c})=>r.jsx(F,{label:"Data Field",required:!0,...c})}),r.jsx(b.Controller,{name:"xAxis3D.name",control:i,render:({field:c})=>r.jsx(o.TextInput,{sx:{flexGrow:1},size:"md",label:"Name",...c})})]}),r.jsx(o.Text,{mt:"lg",children:"Y Axis"}),r.jsxs(o.Group,{position:"apart",grow:!0,p:"md",sx:{position:"relative",border:"1px solid #eee"},children:[r.jsx(b.Controller,{name:"y_axis_data_key",control:i,render:({field:c})=>r.jsx(F,{label:"Data Field",required:!0,...c})}),r.jsx(b.Controller,{name:"yAxis3D.name",control:i,render:({field:c})=>r.jsx(o.TextInput,{sx:{flexGrow:1},size:"md",label:"Name",...c})})]}),r.jsx(o.Text,{mt:"lg",children:"Z Axis"}),r.jsxs(o.Group,{position:"apart",grow:!0,p:"md",sx:{position:"relative",border:"1px solid #eee"},children:[r.jsx(b.Controller,{name:"z_axis_data_key",control:i,render:({field:c})=>r.jsx(F,{label:"Data Field",required:!0,...c})}),r.jsx(b.Controller,{name:"zAxis3D.name",control:i,render:({field:c})=>r.jsx(o.TextInput,{sx:{flexGrow:1},size:"md",label:"Name",...c})})]}),r.jsx(o.Group,{position:"center",mt:"xl",grow:!0,sx:{width:"60%"},mx:"auto",children:r.jsxs(o.Button,{color:"blue",type:"submit",children:[r.jsx(V.DeviceFloppy,{size:20}),r.jsx(o.Text,{ml:"md",children:"Save"})]})})]})}):null}const hb=[{lang:"en",resources:{bar_chart_3d:{viz_name:"Bar Chart(3D)"}}},{lang:"zh",resources:{bar_chart_3d:{viz_name:"柱图(3D)"}}}];function fb(e,{panelModel:t}){try{const n=t.queryIDs[0];if(!n)throw new Error("cannot migrate when queryID is empty");const s=u=>u&&`${n}.${u}`,{x_axis_data_key:i,y_axis_data_key:a,z_axis_data_key:l,...c}=e;return{...c,x_axis_data_key:s(i),y_axis_data_key:s(a),z_axis_data_key:s(l)}}catch(n){throw console.error("[Migration failed]",n),n}}class mb extends ge{constructor(){super(...arguments);B(this,"VERSION",2)}configVersions(){this.version(1,n=>({version:1,config:n})),this.version(2,(n,s)=>{const{config:i}=n;return{...n,version:2,config:fb(i,s)}})}}const gb={displayName:"viz.bar_chart_3d.viz_name",displayGroup:"chart.groups.echarts_based_charts",migrator:new mb,name:"bar-3d",viewRender:lb,configRender:pb,createConfig(){return{version:2,config:v.cloneDeep(Hi)}},translation:hb},xb=({disabled:e,value:t,onChange:n})=>{const s=i=>{i&&n(i)};return r.jsxs(o.Box,{sx:{position:"relative"},children:[e&&r.jsx(o.Overlay,{opacity:.6,color:"#fff",zIndex:5,blur:2}),r.jsx(et,{height:"500px",defaultLanguage:"javascript",value:t,onChange:s,theme:"vs-dark",options:{minimap:{enabled:!1},readOnly:e}})]})};function Ye({enabled:e,func_content:t}){return(n,s)=>{if(!e)return n;try{return new Function(`return ${t}`)()(n,s)}catch(i){return console.error(`[getEchartsXAxisLabel] failed parsing custom function, error: ${i.message}`),n}}}function Le(){return{enabled:!1,func_content:["function label(value, index) {"," // your code goes here"," // return value","}"].join(`
74
+ `)(n)}catch(s){return console.error(s),console.log(e),e}}function mu(e,t,n,s){const i=$y(t,s);return e.replaceAll(/(\{\{([^{\}]+(?=}))\}\})/g,(...l)=>{const c=l[2];if(!c)return c;const u=i[c];if(u)return u;const d=Fy(c);return Gy(d,i,n)})}function Wy(e,t){const n=cc.decode(t);n!==e&&(console.error("Inconsistent sql"),console.groupCollapsed("Inconsistent sql"),console.table({before:e,after:t,v:n}),console.groupEnd())}async function Ry({query:e,name:t,payload:n,additionals:s},i){if(!e.sql)return[];const{type:a,key:l,sql:c,pre_process:u,post_process:d}=e,p=Ci(c,n),h=Dg({sql:p,pre_process:u}),f=cc.encode(h);Wy(h,f);let g=await Lt.query(i)({type:a,key:l,query:f,...s},{params:{name:t}});return g=Mg(d,g,Xi(n)),g}async function Qy({type:e,key:t,configString:n,name:s,additionals:i},a){try{return await Lt.httpDataSourceQuery(a)({type:e,key:t,query:n,...i},{params:{name:s}})}catch(l){if(At.isCancel(l))throw l;return console.error(l),l}}async function Ji(){try{return(await Lt.post()("/datasource/list",{filter:{},sort:[{field:"create_time",order:"ASC"}],pagination:{page:1,pagesize:100}},{})).data}catch(e){return console.error(e),[]}}async function gu(){try{return(await Lt.post()("/sql_snippet/list",{filter:{},sort:[{field:"id",order:"ASC"}],pagination:{page:1,pagesize:1e3}},{})).data}catch(e){return console.error(e),[]}}class xu{constructor(t){B(this,"rootRef");this.rootRef=X.observable({current:t})}async deleteItem(t){X.runInAction(()=>{v.unset(this.rootRef.current,[t])})}getItem(t){const n=this.getValueFromRoot(t);return Promise.resolve(n)}getValueFromRoot(t){return t===null?X.toJS(this.rootRef.current):v.get(this.rootRef.current,[t])}setItem(t,n){if(t===null)if(v.isObject(n))X.runInAction(()=>{this.rootRef.current=n});else throw new Error("Cannot set root value to non-object");else X.runInAction(()=>{v.set(this.rootRef.current,[t],n)});return Promise.resolve(this.getItem(t))}watchItem(t,n,s){return X.reaction(()=>this.getValueFromRoot(t),(i,a)=>{n(i,a)},{requiresObservable:!0,fireImmediately:v.get(s,"fireImmediately",!1)})}}class Uy{constructor(){B(this,"channels",new Map);B(this,"globalChannel",new uc)}getChannel(t){const n=this.channels.get(t);if(n)return n;const s=new uc;return this.channels.set(t,s),s}}class Yy{constructor(t){B(this,"instances",new Map);this.pluginManager=t}get availableVizList(){return this.pluginManager.installedPlugins.flatMap(t=>t.manifest.viz)}resolveComponent(t){return this.pluginManager.factory.viz(t)}getOrCreateInstance(t){const n=this.instances.get(t.id);if(n)return n;const s={id:t.id,name:t.viz.type,type:t.viz.type,messageChannels:new Uy,instanceData:new xu(t.viz.conf)};return this.instances.set(t.id,s),s}}function yu(e,t,n,s){return{vizManager:n,locale:"zh",msgChannels:e.messageChannels,instanceData:e.instanceData,pluginData:new xu({}),colorPalette:{getColor(){return()=>""}},data:t,variables:s}}const Ky=e=>{const{panel:t,measure:n,vizManager:s,data:i,variables:a}=e,l=s.resolveComponent(t.viz.type),c=s.getOrCreateInstance(t),u={...yu(c,i,s,a),viewport:{width:n.w,height:n.h}},d=l.viewRender;return r.jsx(d,{context:u,instance:c,...v.omit(e,["panel","vizManager","data"])})},Xy=e=>{const{vizManager:t,panel:n,data:s,variables:i}=e,a=t.resolveComponent(n.viz.type),l=t.getOrCreateInstance(n),c={...yu(l,s,t,i)},u=a.configRender;return r.jsx(u,{context:c,instance:l,...v.omit(e,["panel","vizManager","data"])})},bu=(e,t)=>{const n=Ot.bezier(e),s=Ot.bezier(t);return function(i){return i<50?n(i*2/100).hex():s((i-50)*2/100).hex()}},js=e=>{const t=Ot.bezier(e);return function(n){return t(n/100).hex()}},Jy={type:"interpolation",displayName:"style.color.interpolation.palette.red_green",getColor:bu(["darkred","deeppink","lightyellow"],["lightyellow","lightgreen","teal"]),name:"red-green",category:"diverging"},Zy={type:"interpolation",displayName:"style.color.interpolation.palette.yellow_blue",getColor:bu(["#8f531d","#ffd347","#e3efe3"],["#eefaee","#4ecbbf","#003f94"]),name:"yellow-blue",category:"diverging"},Hy={type:"interpolation",displayName:"style.color.interpolation.palette.red",getColor:js(["#fff7f1","darkred"]),name:"red",category:"sequential"},eb={type:"interpolation",displayName:"style.color.interpolation.palette.green",getColor:js(["#f0ffed","darkgreen"]),name:"green",category:"sequential"},tb={type:"interpolation",displayName:"style.color.interpolation.palette.blue",getColor:js(["#f9fcff","#48b3e9","darkblue"]),name:"blue",category:"sequential"},nb={type:"interpolation",displayName:"style.color.interpolation.palette.orange",getColor:js(["#fff7f1","darkorange","#b60000"]),name:"orange",category:"sequential"};class rb{constructor(t){B(this,"symbol");this.symbol=Symbol(t)}}function Kt(e){return new rb(e)}class Zi{constructor(){B(this,"parent");B(this,"factoryRegistry",new Map);B(this,"instanceRegistry",new Map)}createScoped(){const t=new Zi;return t.parent=this,t}getRequired(t){return this.get(t)}get(t){if(this.instanceRegistry.has(t.symbol))return this.instanceRegistry.get(t.symbol);const n=this.factoryRegistry.get(t.symbol);if(n){const s=n(this);return this.instanceRegistry.set(t.symbol,s),s}if(this.parent)return this.parent.get(t)}provideFactory(t,n){return this.factoryRegistry.has(t.symbol)?console.warn(`Token ${t.symbol.toString()} is already registered`):this.factoryRegistry.set(t.symbol,n),this}provideValue(t,n){return this.factoryRegistry.has(t.symbol)?console.warn(`Token ${t.symbol.toString()} is already registered`):this.factoryRegistry.set(t.symbol,()=>n),this}dispose(){this.instanceRegistry.forEach(t=>{const n=v.get(t,"dispose");v.isFunction(n)&&n.bind(t)()}),this.instanceRegistry.clear(),this.factoryRegistry.clear()}}const vu="13.27.7-alpha.1",sb=Object.freeze(Object.defineProperty({__proto__:null,version:vu},Symbol.toStringTag,{value:"Module"}));class ib{constructor(t){B(this,"staticColors",new Map);B(this,"interpolations",new Map);t.installedPlugins.forEach(n=>{n.manifest.color.forEach(s=>{this.register(s)})})}getStaticColors(){return Array.from(this.staticColors.values())}register(t){const n=this.encodeColor(t);t.type==="single"?(this.staticColors.has(n)&&console.warn(`the color '${t.name}' has been registered under '${t.category}', previous registered value will be overridden`),this.staticColors.set(n,t)):t.type==="interpolation"&&(this.interpolations.has(n)&&console.warn(`the interpolation '${t.name}' has been registered under '${t.category}', previous registered value will be overridden`,`the interpolation '${t.name}' has been registered under '${t.category}', previous registered value will be overridden`),this.interpolations.set(n,t))}decodeStaticColor(t){return this.staticColors.get(t)}encodeColor(t){return`\${${t.category}}.{${t.name}}`}decodeInterpolation(t){return this.interpolations.get(t)}getColorInterpolations(){return Array.from(this.interpolations.values())}}class ab{constructor(){B(this,"plugins",new Map);B(this,"vizComponents",new Map);B(this,"factory",{viz:t=>{const n=this.vizComponents.get(t);if(n)return n;throw new Error(`Viz Component (${t}) not found`)}})}install(t){if(this.plugins.has(t.id))throw new Error(`Plugin (${t.id}) has been installed before`);this.plugins.set(t.id,t);for(const n of t.manifest.viz){if(this.vizComponents.has(n.name))throw new Error(`Viz Component (${n.name}) has been installed before`);this.vizComponents.set(n.name,n)}}get installedPlugins(){return Array.from(this.plugins.values())}}class ob{constructor(){B(this,"migrations",[])}version(t,n){return this.migrations.push({version:t,handler:n}),this}run(t,n,s){var l;if(t.from===t.to)return n;if(t.from>t.to)throw new Error(`Can not downgrade from version '${t.from}' to (${t.to})`);const i=this.migrations.filter(c=>c.version>t.from&&c.version<=t.to),a=v.orderBy(i,"version","asc");if(((l=v.last(a))==null?void 0:l.version)!==t.to)throw new Error(`Migration to version ${t.to} not found`);return a.reduce((c,u)=>u.handler(c,s),n)}}class ge extends ob{constructor(){super(),this.configVersions()}version(t,n){return super.version(t,(s,i)=>({version:t,...n(s,i)}))}async migrate({configData:t,panelModel:n}){const s=await t.getItem(null),i=v.get(s,"version",0),a=this.run({from:i,to:this.VERSION},s,{panelModel:n});await t.setItem(null,a)}async needMigration({configData:t}){const n=await t.getItem(null);return v.get(n,"version",0)<this.VERSION}}const $=(e,t)=>{const[n,{setFalse:s}]=W.useBoolean(!0),[i,a]=m.useState();m.useEffect(()=>(e.getItem(t).then(c=>{a(c),s()}),e.watchItem(t,c=>{a(c)})));const l=m.useCallback(async c=>{await e.setItem(t,c),a(c)},[e,t]);return{loading:n,value:i,set:l}},Qe={top:16,right:16,bottom:16,left:16},wt=e=>Math.max(0,e-Qe.left-Qe.right),Ct=e=>Math.max(0,e-Qe.top-Qe.bottom),jr=(e,t)=>({width:wt(e),height:Ct(t)}),Ue=({width:e,height:t,children:n})=>r.jsx(o.Box,{pt:Qe.top,pr:Qe.right,pb:Qe.bottom,pl:Qe.left,sx:{width:e,height:t,overflow:"hidden",position:"relative"},children:n}),Hi={x_axis_data_key:"",y_axis_data_key:"",z_axis_data_key:"",xAxis3D:{type:"value",name:"X Axis Name"},yAxis3D:{type:"value",name:"Y Axis Name"},zAxis3D:{type:"value",name:"Z Axis Name"}};function lb({context:e}){const{value:t}=$(e.instanceData,"config"),n=e.data,{width:s,height:i}=e.viewport,{x_axis_data_key:a,y_axis_data_key:l,z_axis_data_key:c,xAxis3D:u,yAxis3D:d,zAxis3D:p}=v.defaults({},t,Hi),h=m.useMemo(()=>rs(n,a),[n,a]),{x:f,y:g,z:y}=m.useMemo(()=>({x:O(a),y:O(l),z:O(c)}),[a,l,c]),{min:j,max:k}=m.useMemo(()=>{const T=v.minBy(h,z=>z[y.columnKey]),I=v.maxBy(h,z=>z[y.columnKey]);return{min:v.get(T,y.columnKey),max:v.get(I,y.columnKey)}},[h,y]),S={tooltip:{},backgroundColor:"#fff",visualMap:{show:!0,dimension:2,min:j,max:k,inRange:{color:["#313695","#4575b4","#74add1","#abd9e9","#e0f3f8","#ffffbf","#fee090","#fdae61","#f46d43","#d73027","#a50026"]}},xAxis3D:u,yAxis3D:d,zAxis3D:p,grid3D:{viewControl:{projection:"orthographic",autoRotate:!1},light:{main:{shadow:!0,quality:"ultra",intensity:1.5}}},series:[{type:"bar3D",wireframe:{},data:h.map(T=>[T[f.columnKey],T[g.columnKey],T[y.columnKey]])}]};return t?r.jsx(Ue,{width:s,height:i,children:r.jsx(Pe,{echarts:Ae,option:S,style:jr(s,i),notMerge:!0,theme:"merico-light"})}):null}const _u=m.createContext(null),ea=_u.Provider;function ta(){const e=m.useContext(_u);if(!e)throw new Error("Please use DashboardModelContextProvider");return e}const Z=()=>ta(),ju=()=>ta(),wu=m.createContext({searchButtonProps:{}}),na=wu.Provider;function Cu(){return m.useContext(wu)}const Su=m.createContext(null),ra=Su.Provider;function ku(){const e=m.useContext(Su);if(!e)throw new Error("Please use ContentModelContextProvider");return e}const Y=()=>ku(),_e=()=>ku(),cb={inEditMode:!1},ws=m.createContext(cb),Tu=m.createContext({panel:null,data:{},loading:!1,errors:[],downloadPanelScreenshot:()=>{}}),sa=Tu.Provider;function Du(){const e=m.useContext(Tu);if(!e.panel)throw new Error("Please use PanelContextProvider");return e}const St=()=>Du(),Ge=()=>Du(),ub={fullScreenPanelID:"",setFullScreenPanelID:v.noop},ia=m.createContext(ub);function Mu(){const e=m.useContext(ia);if(!e)throw new Error("Please use FullScreenPanelContext.Provider");return e}const db={en:"en",zh:"zh-cn"};function aa({children:e}){const{i18n:t}=_.useTranslation(),n=m.useMemo(()=>{const s=t.language;return db[s]??"en"},[t.language]);return r.jsx(dc.DatesProvider,{settings:{locale:n,firstDayOfWeek:1},children:e})}const F=D.observer(m.forwardRef(({label:e,required:t,description:n,value:s,onChange:i,queryID:a,clearable:l=!1,sx:c,...u},d)=>{const{panel:p}=Ge(),h=m.useMemo(()=>p.dataFieldOptions(s,l,a),[s,l,a]);if(h.length===0){const f=p.explainDataKey(s);return r.jsxs(o.HoverCard,{shadow:"md",position:"bottom-start",withinPortal:!0,zIndex:320,children:[r.jsx(o.HoverCard.Target,{children:r.jsx(o.Box,{children:r.jsx(o.TextInput,{label:e,required:t,defaultValue:f.columnKey,readOnly:!0,disabled:!0})})}),r.jsx(o.HoverCard.Dropdown,{children:r.jsxs(o.Group,{position:"left",spacing:0,children:[r.jsx(o.Text,{size:"xs",color:f.queryName?"black":"red",sx:{fontFamily:"monospace"},children:f.queryName??f.queryID}),r.jsx(o.Text,{size:"xs",color:"black",sx:{fontFamily:"monospace"},children:"."}),r.jsx(o.Text,{size:"xs",color:"red",sx:{fontFamily:"monospace"},children:f.columnKey})]})})]})}return r.jsx(o.Select,{ref:d,label:e,description:n,data:h,value:s,onChange:i,required:t,sx:c,maxDropdownHeight:500,...u})}));function pb({context:e}){const{value:t,set:n}=$(e.instanceData,"config"),s=v.defaults({},t,Hi),{control:i,handleSubmit:a,reset:l}=b.useForm({defaultValues:s});return m.useEffect(()=>{l(s)},[t]),t?r.jsx(o.Stack,{spacing:"xs",children:r.jsxs("form",{onSubmit:a(n),children:[r.jsx(o.Text,{children:"X Axis"}),r.jsxs(o.Group,{position:"apart",grow:!0,p:"md",sx:{position:"relative",border:"1px solid #eee"},children:[r.jsx(b.Controller,{name:"x_axis_data_key",control:i,render:({field:c})=>r.jsx(F,{label:"Data Field",required:!0,...c})}),r.jsx(b.Controller,{name:"xAxis3D.name",control:i,render:({field:c})=>r.jsx(o.TextInput,{sx:{flexGrow:1},size:"md",label:"Name",...c})})]}),r.jsx(o.Text,{mt:"lg",children:"Y Axis"}),r.jsxs(o.Group,{position:"apart",grow:!0,p:"md",sx:{position:"relative",border:"1px solid #eee"},children:[r.jsx(b.Controller,{name:"y_axis_data_key",control:i,render:({field:c})=>r.jsx(F,{label:"Data Field",required:!0,...c})}),r.jsx(b.Controller,{name:"yAxis3D.name",control:i,render:({field:c})=>r.jsx(o.TextInput,{sx:{flexGrow:1},size:"md",label:"Name",...c})})]}),r.jsx(o.Text,{mt:"lg",children:"Z Axis"}),r.jsxs(o.Group,{position:"apart",grow:!0,p:"md",sx:{position:"relative",border:"1px solid #eee"},children:[r.jsx(b.Controller,{name:"z_axis_data_key",control:i,render:({field:c})=>r.jsx(F,{label:"Data Field",required:!0,...c})}),r.jsx(b.Controller,{name:"zAxis3D.name",control:i,render:({field:c})=>r.jsx(o.TextInput,{sx:{flexGrow:1},size:"md",label:"Name",...c})})]}),r.jsx(o.Group,{position:"center",mt:"xl",grow:!0,sx:{width:"60%"},mx:"auto",children:r.jsxs(o.Button,{color:"blue",type:"submit",children:[r.jsx(V.DeviceFloppy,{size:20}),r.jsx(o.Text,{ml:"md",children:"Save"})]})})]})}):null}const hb=[{lang:"en",resources:{bar_chart_3d:{viz_name:"Bar Chart(3D)"}}},{lang:"zh",resources:{bar_chart_3d:{viz_name:"柱图(3D)"}}}];function fb(e,{panelModel:t}){try{const n=t.queryIDs[0];if(!n)throw new Error("cannot migrate when queryID is empty");const s=u=>u&&`${n}.${u}`,{x_axis_data_key:i,y_axis_data_key:a,z_axis_data_key:l,...c}=e;return{...c,x_axis_data_key:s(i),y_axis_data_key:s(a),z_axis_data_key:s(l)}}catch(n){throw console.error("[Migration failed]",n),n}}class mb extends ge{constructor(){super(...arguments);B(this,"VERSION",2)}configVersions(){this.version(1,n=>({version:1,config:n})),this.version(2,(n,s)=>{const{config:i}=n;return{...n,version:2,config:fb(i,s)}})}}const gb={displayName:"viz.bar_chart_3d.viz_name",displayGroup:"chart.groups.echarts_based_charts",migrator:new mb,name:"bar-3d",viewRender:lb,configRender:pb,createConfig(){return{version:2,config:v.cloneDeep(Hi)}},translation:hb},xb=({disabled:e,value:t,onChange:n})=>{const s=i=>{i&&n(i)};return r.jsxs(o.Box,{sx:{position:"relative"},children:[e&&r.jsx(o.Overlay,{opacity:.6,color:"#fff",zIndex:5,blur:2}),r.jsx(et,{height:"500px",defaultLanguage:"javascript",value:t,onChange:s,theme:"vs-dark",options:{minimap:{enabled:!1},readOnly:e}})]})};function Ye({enabled:e,func_content:t}){return(n,s)=>{if(!e)return n;try{return new Function(`return ${t}`)()(n,s)}catch(i){return console.error(`[getEchartsXAxisLabel] failed parsing custom function, error: ${i.message}`),n}}}function Le(){return{enabled:!1,func_content:["function label(value, index) {"," // your code goes here"," // return value","}"].join(`
75
75
  `)}}const kt=m.forwardRef(({value:e,onChange:t,triggerButtonText:n},s)=>{const{t:i}=_.useTranslation(),[a,{setTrue:l,setFalse:c}]=W.useBoolean(),[u,d]=m.useState(e);m.useEffect(()=>{d(e)},[e]);const p=k=>{d({...u,enabled:k})},h=()=>{c();const{enabled:k,func_content:S}=u,T={enabled:k,func_content:S};d(T),t(T)},f=()=>{c(),d(e)},g=k=>{d(S=>({...S,func_content:k}))},y=()=>{g(Le().func_content)},j=n??i("chart.axis.customize_label");return r.jsxs(r.Fragment,{children:[r.jsx(o.Button,{variant:"filled",color:"grape",leftIcon:r.jsx(M.IconMathFunction,{size:16}),mt:24,onClick:l,sx:{flexGrow:0},children:j}),r.jsx(o.Modal,{size:800,title:j,opened:a,onClose:c,closeOnClickOutside:!1,withCloseButton:!1,zIndex:320,children:a&&r.jsxs(o.Stack,{children:[r.jsx(o.Checkbox,{mt:10,label:i("common.enabled"),checked:u.enabled,onChange:k=>p(k.currentTarget.checked)}),r.jsx(xb,{value:u.func_content,onChange:g,disabled:!u.enabled}),r.jsxs(o.Group,{position:"apart",children:[r.jsx(o.Button,{onClick:y,color:"red",leftIcon:r.jsx(V.Recycle,{size:20}),children:i("common.actions.reset_to_default")}),r.jsxs(o.Group,{position:"right",children:[r.jsx(o.Button,{onClick:f,variant:"subtle",children:i("common.actions.cancel")}),r.jsx(o.Button,{color:"green",leftIcon:r.jsx(M.IconDeviceFloppy,{size:16}),onClick:h,children:i("common.actions.save")})]})]})]})})]})}),Tn={x_axis_scroll:!1,y_axis_scroll:!1,x_axis_slider:!1,y_axis_slider:!1};function Iu(){return v.cloneDeep(Tn)}const yb=[{lang:"en",resources:{boxplot:{viz_name:"Boxplot Chart",box:"Box",outlier:"Outlier",scatter:"Scatter",click_series:{label:"Click box, scatter or outlier"}}}},{lang:"zh",resources:{boxplot:{viz_name:"箱线图",box:"箱体",outlier:"异常点",scatter:"散点",click_series:{label:"点击箱体、散点或异常点"}}}}],zu={id:"builtin:echarts:click-echart:series",displayName:"viz.boxplot.click_series.label",nameRender:vb,configRender:bb,payload:[{name:"type",description:"Always 'click'",valueType:"string"},{name:"seriesType",description:"'boxplot'",valueType:"string"},{name:"name",description:"Name of the series clicked",valueType:"string"},{name:"color",description:"Color",valueType:"string"},{name:"value",description:"Record of 'name', 'min', 'q1', 'median', 'q3', 'max'",valueType:"object"},{name:"rowData",description:"Data of the row",valueType:"object"}]};function bb(e){return r.jsx(r.Fragment,{})}function vb(e){const{t}=_.useTranslation();return r.jsx(o.Text,{children:t("viz.boxplot.click_series.label")})}const Cs=m.forwardRef(({sectionTitle:e,value:t,onChange:n},s)=>{const{t:i,i18n:a}=_.useTranslation(),l=u=>d=>{const p=v.cloneDeep(t);v.set(p,u,d),n(p)},c=m.useMemo(()=>[{label:i("chart.axis.overflow.truncate"),value:"truncate"},{label:i("chart.axis.overflow.break_line"),value:"break"},{label:i("chart.axis.overflow.break_word"),value:"breakAll"}],[a.language]);return r.jsxs(o.Stack,{spacing:0,children:[e&&r.jsx(o.Divider,{mb:-5,mt:5,variant:"dotted",label:e,labelPosition:"right",labelProps:{color:"dimmed"}}),r.jsxs(o.Group,{grow:!0,noWrap:!0,children:[r.jsx(o.NumberInput,{label:i("chart.axis.overflow.max_width"),hideControls:!0,value:t.width,onChange:l("width")}),r.jsx(o.Select,{label:i("chart.axis.overflow.label"),data:c,value:t.overflow,onChange:l("overflow")}),r.jsx(o.TextInput,{label:i("chart.axis.overflow.ellipsis"),value:t.ellipsis,disabled:!0})]})]})}),Tt=m.forwardRef(({value:e,onChange:t},n)=>{const{t:s}=_.useTranslation(),i=l=>{t({...e,on_axis:l})},a=l=>{t({...e,in_tooltip:l})};return r.jsxs(o.Stack,{ref:n,spacing:0,children:[r.jsx(Cs,{sectionTitle:s("chart.axis.overflow.section_title.on_axis"),value:e.on_axis,onChange:i}),r.jsx(Cs,{sectionTitle:s("chart.axis.overflow.section_title.in_tooltip"),value:e.in_tooltip,onChange:a})]})});function Ke(){return{on_axis:{width:80,overflow:"truncate",ellipsis:"..."},in_tooltip:{width:200,overflow:"break",ellipsis:"..."}}}function ut({overflow:e,width:t}){const n={truncate:"initial",break:"break-all",breakAll:"break-word"}[e],s=e==="truncate"?"nowrap":"initial",i={truncate:"ellipsis",break:"clip",breakAll:"clip"}[e];return`
76
76
  max-width: ${t}px;
77
77
  word-break: ${n};