@malloy-publisher/sdk 0.8.4 → 0.8.5

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.
@@ -1,4 +1,4 @@
1
- "use strict";var Td=Object.create;var ca=Object.defineProperty;var Id=Object.getOwnPropertyDescriptor;var Rd=Object.getOwnPropertyNames;var Od=Object.getPrototypeOf,$d=Object.prototype.hasOwnProperty;var Ed=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Rd(t))!$d.call(e,o)&&o!==n&&ca(e,o,{get:()=>t[o],enumerable:!(r=Id(t,o))||r.enumerable});return e};var ua=(e,t,n)=>(n=e!=null?Td(Od(e)):{},Ed(t||!e||!e.__esModule?ca(n,"default",{value:e,enumerable:!0}):n,e));const m=require("react/jsx-runtime"),re=require("@mui/material"),ie=require("react"),Ge=require("./ServerProvider-BsjJvkML.cjs.js"),Tt=require("@malloydata/malloy-filter"),oi=require("@tanstack/react-query"),Ad=require("markdown-to-jsx"),Qe=require("@mui/system"),Fd=require("@emotion/styled"),Ld=require("@emotion/react"),Nd=require("@mui/icons-material"),Mr=require("react-dom");function tc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const v=tc(ie),jd=tc(Mr);function sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Bd(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var yo={exports:{}},Vd=yo.exports,da;function zd(){return da||(da=1,(function(e,t){(function(n,r){e.exports=r()})(Vd,(function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",l="hour",c="day",u="week",d="month",h="quarter",b="year",p="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,P={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var k=["th","st","nd","rd"],w=D%100;return"["+D+(k[(w-20)%10]||k[w]||k[0])+"]"}},S=function(D,k,w){var A=String(D);return!A||A.length>=k?D:""+Array(k+1-A.length).join(w)+D},x={s:S,z:function(D){var k=-D.utcOffset(),w=Math.abs(k),A=Math.floor(w/60),N=w%60;return(k<=0?"+":"-")+S(A,2,"0")+":"+S(N,2,"0")},m:function D(k,w){if(k.date()<w.date())return-D(w,k);var A=12*(w.year()-k.year())+(w.month()-k.month()),N=k.clone().add(A,d),L=w-N<0,_=k.clone().add(A+(L?-1:1),d);return+(-(A+(w-N)/(L?N-_:_-N))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:d,y:b,w:u,d:c,D:p,h:l,m:a,s:i,ms:s,Q:h}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},T="en",M={};M[T]=P;var $="$isDayjsObject",R=function(D){return D instanceof f||!(!D||!D[$])},F=function D(k,w,A){var N;if(!k)return T;if(typeof k=="string"){var L=k.toLowerCase();M[L]&&(N=L),w&&(M[L]=w,N=L);var _=k.split("-");if(!N&&_.length>1)return D(_[0])}else{var K=k.name;M[K]=k,N=K}return!A&&N&&(T=N),N||!A&&T},E=function(D,k){if(R(D))return D.clone();var w=typeof k=="object"?k:{};return w.date=D,w.args=arguments,new f(w)},I=x;I.l=F,I.i=R,I.w=function(D,k){return E(D,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var f=(function(){function D(w){this.$L=F(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[$]=!0}var k=D.prototype;return k.parse=function(w){this.$d=(function(A){var N=A.date,L=A.utc;if(N===null)return new Date(NaN);if(I.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var _=N.match(y);if(_){var K=_[2]-1||0,Y=(_[7]||"0").substring(0,3);return L?new Date(Date.UTC(_[1],K,_[3]||1,_[4]||0,_[5]||0,_[6]||0,Y)):new Date(_[1],K,_[3]||1,_[4]||0,_[5]||0,_[6]||0,Y)}}return new Date(N)})(w),this.init()},k.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},k.$utils=function(){return I},k.isValid=function(){return this.$d.toString()!==g},k.isSame=function(w,A){var N=E(w);return this.startOf(A)<=N&&N<=this.endOf(A)},k.isAfter=function(w,A){return E(w)<this.startOf(A)},k.isBefore=function(w,A){return this.endOf(A)<E(w)},k.$g=function(w,A,N){return I.u(w)?this[A]:this.set(N,w)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(w,A){var N=this,L=!!I.u(A)||A,_=I.p(w),K=function(z,G){var se=I.w(N.$u?Date.UTC(N.$y,G,z):new Date(N.$y,G,z),N);return L?se:se.endOf(c)},Y=function(z,G){return I.w(N.toDate()[z].apply(N.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(G)),N)},ae=this.$W,le=this.$M,V=this.$D,q="set"+(this.$u?"UTC":"");switch(_){case b:return L?K(1,0):K(31,11);case d:return L?K(1,le):K(0,le+1);case u:var ne=this.$locale().weekStart||0,Q=(ae<ne?ae+7:ae)-ne;return K(L?V-Q:V+(6-Q),le);case c:case p:return Y(q+"Hours",0);case l:return Y(q+"Minutes",1);case a:return Y(q+"Seconds",2);case i:return Y(q+"Milliseconds",3);default:return this.clone()}},k.endOf=function(w){return this.startOf(w,!1)},k.$set=function(w,A){var N,L=I.p(w),_="set"+(this.$u?"UTC":""),K=(N={},N[c]=_+"Date",N[p]=_+"Date",N[d]=_+"Month",N[b]=_+"FullYear",N[l]=_+"Hours",N[a]=_+"Minutes",N[i]=_+"Seconds",N[s]=_+"Milliseconds",N)[L],Y=L===c?this.$D+(A-this.$W):A;if(L===d||L===b){var ae=this.clone().set(p,1);ae.$d[K](Y),ae.init(),this.$d=ae.set(p,Math.min(this.$D,ae.daysInMonth())).$d}else K&&this.$d[K](Y);return this.init(),this},k.set=function(w,A){return this.clone().$set(w,A)},k.get=function(w){return this[I.p(w)]()},k.add=function(w,A){var N,L=this;w=Number(w);var _=I.p(A),K=function(le){var V=E(L);return I.w(V.date(V.date()+Math.round(le*w)),L)};if(_===d)return this.set(d,this.$M+w);if(_===b)return this.set(b,this.$y+w);if(_===c)return K(1);if(_===u)return K(7);var Y=(N={},N[a]=r,N[l]=o,N[i]=n,N)[_]||1,ae=this.$d.getTime()+w*Y;return I.w(ae,this)},k.subtract=function(w,A){return this.add(-1*w,A)},k.format=function(w){var A=this,N=this.$locale();if(!this.isValid())return N.invalidDate||g;var L=w||"YYYY-MM-DDTHH:mm:ssZ",_=I.z(this),K=this.$H,Y=this.$m,ae=this.$M,le=N.weekdays,V=N.months,q=N.meridiem,ne=function(G,se,oe,B){return G&&(G[se]||G(A,L))||oe[se].slice(0,B)},Q=function(G){return I.s(K%12||12,G,"0")},z=q||function(G,se,oe){var B=G<12?"AM":"PM";return oe?B.toLowerCase():B};return L.replace(C,(function(G,se){return se||(function(oe){switch(oe){case"YY":return String(A.$y).slice(-2);case"YYYY":return I.s(A.$y,4,"0");case"M":return ae+1;case"MM":return I.s(ae+1,2,"0");case"MMM":return ne(N.monthsShort,ae,V,3);case"MMMM":return ne(V,ae);case"D":return A.$D;case"DD":return I.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return ne(N.weekdaysMin,A.$W,le,2);case"ddd":return ne(N.weekdaysShort,A.$W,le,3);case"dddd":return le[A.$W];case"H":return String(K);case"HH":return I.s(K,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return z(K,Y,!0);case"A":return z(K,Y,!1);case"m":return String(Y);case"mm":return I.s(Y,2,"0");case"s":return String(A.$s);case"ss":return I.s(A.$s,2,"0");case"SSS":return I.s(A.$ms,3,"0");case"Z":return _}return null})(G)||_.replace(":","")}))},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(w,A,N){var L,_=this,K=I.p(A),Y=E(w),ae=(Y.utcOffset()-this.utcOffset())*r,le=this-Y,V=function(){return I.m(_,Y)};switch(K){case b:L=V()/12;break;case d:L=V();break;case h:L=V()/3;break;case u:L=(le-ae)/6048e5;break;case c:L=(le-ae)/864e5;break;case l:L=le/o;break;case a:L=le/r;break;case i:L=le/n;break;default:L=le}return N?L:I.a(L)},k.daysInMonth=function(){return this.endOf(d).$D},k.$locale=function(){return M[this.$L]},k.locale=function(w,A){if(!w)return this.$L;var N=this.clone(),L=F(w,A,!0);return L&&(N.$L=L),N},k.clone=function(){return I.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},D})(),O=f.prototype;return E.prototype=O,[["$ms",s],["$s",i],["$m",a],["$H",l],["$W",c],["$M",d],["$y",b],["$D",p]].forEach((function(D){O[D[1]]=function(k){return this.$g(k,D[0],D[1])}})),E.extend=function(D,k){return D.$i||(D(k,f,E),D.$i=!0),E},E.locale=F,E.isDayjs=R,E.unix=function(D){return E(1e3*D)},E.en=M[T],E.Ls=M,E.p={},E}))})(yo)),yo.exports}var Wd=zd();const Ve=sn(Wd);var bo={exports:{}},_d=bo.exports,pa;function Hd(){return pa||(pa=1,(function(e,t){(function(n,r){e.exports=r()})(_d,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(s,i,a){var l=i.prototype;a.utc=function(g){var y={date:g,utc:!0,args:arguments};return new i(y)},l.utc=function(g){var y=a(this.toDate(),{locale:this.$L,utc:!0});return g?y.add(this.utcOffset(),n):y},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var c=l.parse;l.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),c.call(this,g)};var u=l.init;l.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else u.call(this)};var d=l.utcOffset;l.utcOffset=function(g,y){var C=this.$utils().u;if(C(g))return this.$u?0:C(this.$offset)?d.call(this):this.$offset;if(typeof g=="string"&&(g=(function(T){T===void 0&&(T="");var M=T.match(r);if(!M)return null;var $=(""+M[0]).match(o)||["-",0,0],R=$[0],F=60*+$[1]+ +$[2];return F===0?0:R==="+"?F:-F})(g),g===null))return this;var P=Math.abs(g)<=16?60*g:g;if(P===0)return this.utc(y);var S=this.clone();if(y)return S.$offset=P,S.$u=!1,S;var x=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(S=this.local().add(P+x,n)).$offset=P,S.$x.$localOffset=x,S};var h=l.format;l.format=function(g){var y=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,y)},l.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var b=l.toDate;l.toDate=function(g){return g==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():b.call(this)};var p=l.diff;l.diff=function(g,y,C){if(g&&this.$u===g.$u)return p.call(this,g,y,C);var P=this.local(),S=a(g).local();return p.call(P,S,y,C)}}}))})(bo)),bo.exports}var Ud=Hd();const si=sn(Ud);Ve.extend(si);function Dn(e){return(e??"").startsWith("filter<")}function Yd(e){const{parsed:t}=Tt.BooleanFilterExpression.parse(e);if(!(!t||t.not))return t.operator==="true"||t.operator==="false"?t.operator:void 0}function Qn(e){const t=/^filter<(.+)>$/.exec(e??"");return t?t[1]:void 0}function ii(e){const t=e.filter(n=>n.trim()!=="");return t.length===0?"":Tt.StringFilterExpression.unparse({operator:"=",values:[...t]})}function Gd(e){if(e.trim()==="")return[];const{parsed:t}=Tt.StringFilterExpression.parse(e);return nc(t)?t.values:[e]}function qd(e){return e===void 0||e.trim()===""?!0:nc(Tt.StringFilterExpression.parse(e).parsed)}function nc(e){return e!==null&&Tt.isStringCondition(e)&&e.operator==="="&&e.not!==!0}function Kd(e){return Tt.NumberFilterExpression.unparse({operator:">=",values:[String(e)]})}function Qd(e){const t=e.trim();if(t==="")return;const{parsed:n}=Tt.NumberFilterExpression.parse(t);if(n===null||n.operator!==">="||n.not===!0||n.values?.length!==1)return;const r=Number(n.values[0]);return Number.isFinite(r)?r:void 0}function Xd(e,t){return Tt.NumberFilterExpression.unparse({operator:"range",startOperator:">=",startValue:String(e),endOperator:"<=",endValue:String(t)})}function Zd(e){const t=e.trim();if(t==="")return;const{parsed:n}=Tt.NumberFilterExpression.parse(t);if(n===null||n.operator!=="range"||n.not===!0||n.startOperator!==">="||n.endOperator!=="<=")return;const r=Number(n.startValue),o=Number(n.endValue);return Number.isFinite(r)&&Number.isFinite(o)&&r<=o?[r,o]:void 0}const To=[{key:"today",label:"Today",clause:{operator:"in",in:{moment:"today"}}},{key:"7d",label:"Last 7 days",clause:{operator:"in_last",units:"day",n:"7"}},{key:"30d",label:"Last 30 days",clause:{operator:"in_last",units:"day",n:"30"}},{key:"90d",label:"Last 90 days",clause:{operator:"in_last",units:"day",n:"90"}},{key:"12m",label:"Last 12 months",clause:{operator:"in_last",units:"month",n:"12"}}];function Jd(e){const t=To.find(n=>n.key===e);return t?Tt.TemporalFilterExpression.unparse(t.clause):void 0}function ep(e){const t=e.trim();if(t==="")return;const{parsed:n}=Tt.TemporalFilterExpression.parse(t);if(n!==null)for(const r of To){const o=r.clause;if(o.operator===n.operator&&(o.operator==="in"&&n.operator==="in"&&n.not!==!0&&n.in.moment===o.in.moment||o.operator==="in_last"&&n.operator==="in_last"&&n.not!==!0&&n.units===o.units&&Number(n.n)===Number(o.n)))return r.key}}const tp=/^\d{4}-\d{2}-\d{2}$/;function np(e,t){const n=Ve.utc(t,"YYYY-MM-DD").add(1,"day");return Tt.TemporalFilterExpression.unparse({operator:"to",fromMoment:{moment:"literal",literal:e,units:"day"},toMoment:{moment:"literal",literal:n.format("YYYY-MM-DD"),units:"day"}})}function rp(e){const t=e.trim();if(t==="")return;const{parsed:n}=Tt.TemporalFilterExpression.parse(t);if(n===null||n.operator!=="to"||n.not===!0)return;const r=fa(n.fromMoment),o=fa(n.toMoment);if(r===void 0||o===void 0)return;const s=Ve.utc(o,"YYYY-MM-DD").subtract(1,"day");if(!(!s.isValid()||s.isBefore(Ve.utc(r,"YYYY-MM-DD"))))return{firstDay:r,lastDay:s.format("YYYY-MM-DD")}}function fa(e){return e.moment==="literal"&&tp.test(e.literal)?e.literal:void 0}const vo="self";function ai(e){if(!e)return[];if(e.wasDimension&&!e.wasDimension())return[];const t=e.tag?.tag("drill");return t?(t.textArray("to")??[t.text("to")].filter(ma)).filter(ma):[]}function li(e){const t=e.replace(/[-_]+/g," ").trim();return t.charAt(0).toUpperCase()+t.slice(1)}function rc(e){return e.tag?.tag("drill")?.text("given")??e.name}function Gr(e){if(typeof e=="string"){const t=ii([e]);return t===""?void 0:t}if(typeof e=="boolean")return String(e);if(typeof e=="number")return Number.isFinite(e)?String(e):void 0;if(e instanceof Date){const t=e.toISOString();return t.slice(0,t.indexOf("T"))}}function oc(e){return e instanceof Date?Gr(e)??"":String(e)}function sc(e){if(!e||e.isHeader)return;const t=e.field;if(!t)return;const n=ai(t);if(n.length===0)return;const r=Gr(e.value);if(r!==void 0)return{to:n,given:rc(t),value:r,rawValue:e.value,label:oc(e.value)}}function ma(e){return typeof e=="string"&&e!==""}function ic(e,t){if(t!==void 0&&!Dn(t)){if(t==="number"){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(typeof e!="string"||e.trim()==="")return;const n=Number(e);return Number.isFinite(n)?n:void 0}if(t==="date"||t==="timestamp"||t==="timestamptz")return e instanceof Date?e:void 0;if(t==="boolean")return typeof e=="boolean"?e:e==="true"?!0:e==="false"?!1:void 0;if(typeof e=="string")return e.trim()===""?void 0:e;if(typeof e=="number")return Number.isFinite(e)?String(e):void 0;if(typeof e=="boolean")return String(e)}return Qn(t)==="string"&&typeof e=="number"?Number.isFinite(e)?ii([String(e)]):void 0:Qn(t)==="number"?typeof e=="number"?Number.isFinite(e)?String(e):void 0:typeof e!="string"||e.trim()===""?void 0:Number.isFinite(Number(e))?e.trim():void 0:Gr(e)}function ac({declaredTypes:e,setGiven:t,documentName:n}){const r=ie.useMemo(()=>{const a=new Map;for(const l of e.keys())a.has(l.toLowerCase())||a.set(l.toLowerCase(),l);return a},[e]),o=ie.useCallback(a=>e.has(a)?a:r.get(a.toLowerCase()),[e,r]),s=ie.useCallback(a=>o(a)!==void 0,[o]),i=ie.useCallback((a,l)=>{const c=o(a);if(c===void 0){console.warn(`# drill { to=self } tried to set '${a}', which '${n}' does not declare as a given. Name the given with 'given=' on the drill tag.`);return}const u=e.get(c),d=ic(l,u);if(d===void 0){console.warn(`Drill declined: ${JSON.stringify(l)} cannot be a value for given "${c}"`+(u?` of type ${u}`:""));return}t(c,d)},[e,n,o,t]);return{resolveGiven:o,canSelf:s,onSelf:i}}function op(e,t){if(e!=null){if(e instanceof Date)return uc(e,t);if(!Array.isArray(e))return String(e)}}function sp(e,t){return new Date(Date.UTC(e.year(),e.month(),e.date(),t?.getUTCHours()??0,t?.getUTCMinutes()??0,t?.getUTCSeconds()??0,t?.getUTCMilliseconds()??0))}const ip=/^(\d{4})-(\d{1,2})-(\d{1,2})(?:[T\s]+(\d{1,2}):(\d{2})(?::(\d{2}))?(?:\.(\d{1,9}))?)?\s*(Z|[+-]\d{2}:?\d{2}|[+-]\d{2}|UTC|GMT)?$/i;function lc(e){const t=e.trim();return t===""?e:t.replace(/^(\d{4}-\d{1,2}-\d{1,2}[T\s]+\d{1,2}:\d{2}(?::\d{2})?(?:\.\d{1,9})?)\s+(\d{2}:?\d{2}|\d{2})$/,"$1+$2")}function ap(e,t=!1){const n=lc(e);if(n==="")return;const r=ip.exec(n);if(!r)return;const[,o,s,i,a,l,c,u,d]=r,h={year:Number(o),month:Number(s),day:Number(i),hour:Number(a??0),minute:Number(l??0),second:Number(c??0),milli:Number((u??"").slice(0,3).padEnd(3,"0")||0)},b=Date.UTC(h.year,h.month-1,h.day,h.hour,h.minute,h.second,h.milli),p=new Date(b);if(!(p.getUTCFullYear()===h.year&&p.getUTCMonth()===h.month-1&&p.getUTCDate()===h.day&&p.getUTCHours()===h.hour&&p.getUTCMinutes()===h.minute&&p.getUTCSeconds()===h.second)||d!==void 0&&a===void 0)return;const y=lp(d);if(y===void 0)return;const C=new Date(b-y*6e4);if(!(t&&d!==void 0&&C.getUTCDate()!==h.day))return C}function lp(e){if(e===void 0)return 0;const t=e.toUpperCase();if(t==="Z"||t==="UTC"||t==="GMT")return 0;const n=/^([+-])(\d{2}):?(\d{2})?$/.exec(t);if(!n)return;const r=Number(n[3]??0);if(r>59)return;const o=Number(n[2])*60+r,s=n[1]!=="-";if(!(o>(s?840:720)))return s?o:-o}function cp(e){return!up.has(e??"")}const up=new Set(["boolean","number","date","timestamp","timestamptz"]);function cc(e,t){if(t===""&&!cp(e))return null;if(Dn(e))return t;switch(e){case"number":{const n=t.trim()===""?NaN:Number(t);return Number.isFinite(n)?n:t}case"boolean":return t==="true"?!0:t==="false"?!1:t;case"date":case"timestamp":case"timestamptz":{const n=lc(t);return ap(n,e==="date")??n}default:return t}}function ci(e,t){const n={};for(const[r,o]of e){const s=op(o,t.get(r));s!==void 0&&(n[r]=s)}return n}function uc(e,t){const n=e.toISOString();switch(t){case"timestamptz":return n;case"timestamp":return n.slice(0,-1);default:return n.slice(0,10)}}function qr(e,t,n){const r=n?new Set(n):void 0,o={};for(const[s,i]of e)r&&!r.has(s)||i!=null&&(Array.isArray(i)||(o[s]=i instanceof Date?uc(i,t.get(s)):i));return o}function ha(e,t){const n=new Map;for(const[r,o]of Object.entries(e))t.has(r)&&n.set(r,cc(t.get(r),o));return n}function ga(e,t){const n=Array.from(e.keys()).filter(o=>!t.has(o));if(n.length===0)return e;const r=new Map(e);for(const o of n)r.delete(o);return r}function ya(e){return Object.entries(e??{}).sort(([t],[n])=>t<n?-1:1)}function dp(e,t,n){for(const r of n.keys())if(e[r]!==t[r])return!1;return!0}function ba(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>e[r]===t[r])}function dc({declaredTypes:e,startingValues:t,params:n,onParamsChange:r,documentKey:o,autorun:s}){const i=ie.useMemo(()=>ha(t??{},e),[e,JSON.stringify(t)]),a=ie.useRef(null),l=ie.useRef(null),c=ie.useRef({documentKey:o,params:n}),u=I=>I!==null&&dp(n??{},I,e);u(a.current)&&(l.current=null),(c.current.documentKey!==o||!ba(n??{},c.current.params??{})&&!u(a.current)&&!u(l.current))&&(c.current={documentKey:o,params:n});const d=c.current.params,h=JSON.stringify(t),b=JSON.stringify(d),p=ie.useMemo(()=>ha({...t??{},...d??{}},e),[e,h,b]),g=ie.useMemo(()=>JSON.stringify([o??null,ya(t),ya(d)]),[o,h,b]),[y,C]=ie.useState(null),P=y?.key===g?y:null;ie.useEffect(()=>{y!==null&&y.key!==g&&C(null)},[y,g]);const S=ie.useMemo(()=>ga(P?.draft??p,e),[P,p,e]),x=ie.useMemo(()=>ga(P?.applied??p,e),[P,p,e]),T=ie.useCallback(I=>I?.key===g?I:{key:g,draft:p,applied:p},[g,p]),M=ie.useMemo(()=>ci(x,e),[x,e]);a.current===null&&(a.current=M),ie.useEffect(()=>{r&&(ba(a.current??{},M)||(l.current=a.current,a.current=M,r(M)))},[M,r]);const $=ie.useCallback((I,f)=>{C(O=>{const D=T(O),k=new Map(D.draft);return f===null?k.delete(I):k.set(I,f),{key:D.key,draft:k,applied:s?k:D.applied}})},[s,T]),R=ie.useCallback(()=>{C(I=>({key:T(I).key,draft:i,applied:i}))},[T,i]),F=ie.useCallback(()=>{C(I=>{const f=T(I);return{key:f.key,draft:f.draft,applied:f.draft}})},[T]),E=ie.useMemo(()=>{if(s)return!1;if(S.size!==x.size)return!0;for(const[I,f]of S){const O=x.get(I);if(f instanceof Date&&O instanceof Date){if(f.getTime()!==O.getTime())return!0}else if(Array.isArray(f)&&Array.isArray(O)){if(String(f)!==String(O))return!0}else if(f!==O)return!0}return!1},[s,S,x]);return{draft:S,applied:x,setGiven:$,reset:R,apply:F,pending:E}}const pp=1e3;function pc(e){const t=e.split(".");return t[t.length-1]}function fp(e,t){return`run: ${e} -> {
1
+ "use strict";var Td=Object.create;var ca=Object.defineProperty;var Id=Object.getOwnPropertyDescriptor;var Rd=Object.getOwnPropertyNames;var Od=Object.getPrototypeOf,$d=Object.prototype.hasOwnProperty;var Ed=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Rd(t))!$d.call(e,o)&&o!==n&&ca(e,o,{get:()=>t[o],enumerable:!(r=Id(t,o))||r.enumerable});return e};var ua=(e,t,n)=>(n=e!=null?Td(Od(e)):{},Ed(t||!e||!e.__esModule?ca(n,"default",{value:e,enumerable:!0}):n,e));const m=require("react/jsx-runtime"),re=require("@mui/material"),ie=require("react"),Ge=require("./ServerProvider-CXrOKD6g.cjs.js"),Tt=require("@malloydata/malloy-filter"),oi=require("@tanstack/react-query"),Ad=require("markdown-to-jsx"),Qe=require("@mui/system"),Fd=require("@emotion/styled"),Ld=require("@emotion/react"),Nd=require("@mui/icons-material"),Mr=require("react-dom");function tc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const v=tc(ie),jd=tc(Mr);function sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Bd(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var yo={exports:{}},Vd=yo.exports,da;function zd(){return da||(da=1,(function(e,t){(function(n,r){e.exports=r()})(Vd,(function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",l="hour",c="day",u="week",d="month",h="quarter",b="year",p="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,P={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var k=["th","st","nd","rd"],w=D%100;return"["+D+(k[(w-20)%10]||k[w]||k[0])+"]"}},S=function(D,k,w){var A=String(D);return!A||A.length>=k?D:""+Array(k+1-A.length).join(w)+D},x={s:S,z:function(D){var k=-D.utcOffset(),w=Math.abs(k),A=Math.floor(w/60),N=w%60;return(k<=0?"+":"-")+S(A,2,"0")+":"+S(N,2,"0")},m:function D(k,w){if(k.date()<w.date())return-D(w,k);var A=12*(w.year()-k.year())+(w.month()-k.month()),N=k.clone().add(A,d),L=w-N<0,_=k.clone().add(A+(L?-1:1),d);return+(-(A+(w-N)/(L?N-_:_-N))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:d,y:b,w:u,d:c,D:p,h:l,m:a,s:i,ms:s,Q:h}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},T="en",M={};M[T]=P;var $="$isDayjsObject",R=function(D){return D instanceof f||!(!D||!D[$])},F=function D(k,w,A){var N;if(!k)return T;if(typeof k=="string"){var L=k.toLowerCase();M[L]&&(N=L),w&&(M[L]=w,N=L);var _=k.split("-");if(!N&&_.length>1)return D(_[0])}else{var K=k.name;M[K]=k,N=K}return!A&&N&&(T=N),N||!A&&T},E=function(D,k){if(R(D))return D.clone();var w=typeof k=="object"?k:{};return w.date=D,w.args=arguments,new f(w)},I=x;I.l=F,I.i=R,I.w=function(D,k){return E(D,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var f=(function(){function D(w){this.$L=F(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[$]=!0}var k=D.prototype;return k.parse=function(w){this.$d=(function(A){var N=A.date,L=A.utc;if(N===null)return new Date(NaN);if(I.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var _=N.match(y);if(_){var K=_[2]-1||0,Y=(_[7]||"0").substring(0,3);return L?new Date(Date.UTC(_[1],K,_[3]||1,_[4]||0,_[5]||0,_[6]||0,Y)):new Date(_[1],K,_[3]||1,_[4]||0,_[5]||0,_[6]||0,Y)}}return new Date(N)})(w),this.init()},k.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},k.$utils=function(){return I},k.isValid=function(){return this.$d.toString()!==g},k.isSame=function(w,A){var N=E(w);return this.startOf(A)<=N&&N<=this.endOf(A)},k.isAfter=function(w,A){return E(w)<this.startOf(A)},k.isBefore=function(w,A){return this.endOf(A)<E(w)},k.$g=function(w,A,N){return I.u(w)?this[A]:this.set(N,w)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(w,A){var N=this,L=!!I.u(A)||A,_=I.p(w),K=function(z,G){var se=I.w(N.$u?Date.UTC(N.$y,G,z):new Date(N.$y,G,z),N);return L?se:se.endOf(c)},Y=function(z,G){return I.w(N.toDate()[z].apply(N.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(G)),N)},ae=this.$W,le=this.$M,V=this.$D,q="set"+(this.$u?"UTC":"");switch(_){case b:return L?K(1,0):K(31,11);case d:return L?K(1,le):K(0,le+1);case u:var ne=this.$locale().weekStart||0,Q=(ae<ne?ae+7:ae)-ne;return K(L?V-Q:V+(6-Q),le);case c:case p:return Y(q+"Hours",0);case l:return Y(q+"Minutes",1);case a:return Y(q+"Seconds",2);case i:return Y(q+"Milliseconds",3);default:return this.clone()}},k.endOf=function(w){return this.startOf(w,!1)},k.$set=function(w,A){var N,L=I.p(w),_="set"+(this.$u?"UTC":""),K=(N={},N[c]=_+"Date",N[p]=_+"Date",N[d]=_+"Month",N[b]=_+"FullYear",N[l]=_+"Hours",N[a]=_+"Minutes",N[i]=_+"Seconds",N[s]=_+"Milliseconds",N)[L],Y=L===c?this.$D+(A-this.$W):A;if(L===d||L===b){var ae=this.clone().set(p,1);ae.$d[K](Y),ae.init(),this.$d=ae.set(p,Math.min(this.$D,ae.daysInMonth())).$d}else K&&this.$d[K](Y);return this.init(),this},k.set=function(w,A){return this.clone().$set(w,A)},k.get=function(w){return this[I.p(w)]()},k.add=function(w,A){var N,L=this;w=Number(w);var _=I.p(A),K=function(le){var V=E(L);return I.w(V.date(V.date()+Math.round(le*w)),L)};if(_===d)return this.set(d,this.$M+w);if(_===b)return this.set(b,this.$y+w);if(_===c)return K(1);if(_===u)return K(7);var Y=(N={},N[a]=r,N[l]=o,N[i]=n,N)[_]||1,ae=this.$d.getTime()+w*Y;return I.w(ae,this)},k.subtract=function(w,A){return this.add(-1*w,A)},k.format=function(w){var A=this,N=this.$locale();if(!this.isValid())return N.invalidDate||g;var L=w||"YYYY-MM-DDTHH:mm:ssZ",_=I.z(this),K=this.$H,Y=this.$m,ae=this.$M,le=N.weekdays,V=N.months,q=N.meridiem,ne=function(G,se,oe,B){return G&&(G[se]||G(A,L))||oe[se].slice(0,B)},Q=function(G){return I.s(K%12||12,G,"0")},z=q||function(G,se,oe){var B=G<12?"AM":"PM";return oe?B.toLowerCase():B};return L.replace(C,(function(G,se){return se||(function(oe){switch(oe){case"YY":return String(A.$y).slice(-2);case"YYYY":return I.s(A.$y,4,"0");case"M":return ae+1;case"MM":return I.s(ae+1,2,"0");case"MMM":return ne(N.monthsShort,ae,V,3);case"MMMM":return ne(V,ae);case"D":return A.$D;case"DD":return I.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return ne(N.weekdaysMin,A.$W,le,2);case"ddd":return ne(N.weekdaysShort,A.$W,le,3);case"dddd":return le[A.$W];case"H":return String(K);case"HH":return I.s(K,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return z(K,Y,!0);case"A":return z(K,Y,!1);case"m":return String(Y);case"mm":return I.s(Y,2,"0");case"s":return String(A.$s);case"ss":return I.s(A.$s,2,"0");case"SSS":return I.s(A.$ms,3,"0");case"Z":return _}return null})(G)||_.replace(":","")}))},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(w,A,N){var L,_=this,K=I.p(A),Y=E(w),ae=(Y.utcOffset()-this.utcOffset())*r,le=this-Y,V=function(){return I.m(_,Y)};switch(K){case b:L=V()/12;break;case d:L=V();break;case h:L=V()/3;break;case u:L=(le-ae)/6048e5;break;case c:L=(le-ae)/864e5;break;case l:L=le/o;break;case a:L=le/r;break;case i:L=le/n;break;default:L=le}return N?L:I.a(L)},k.daysInMonth=function(){return this.endOf(d).$D},k.$locale=function(){return M[this.$L]},k.locale=function(w,A){if(!w)return this.$L;var N=this.clone(),L=F(w,A,!0);return L&&(N.$L=L),N},k.clone=function(){return I.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},D})(),O=f.prototype;return E.prototype=O,[["$ms",s],["$s",i],["$m",a],["$H",l],["$W",c],["$M",d],["$y",b],["$D",p]].forEach((function(D){O[D[1]]=function(k){return this.$g(k,D[0],D[1])}})),E.extend=function(D,k){return D.$i||(D(k,f,E),D.$i=!0),E},E.locale=F,E.isDayjs=R,E.unix=function(D){return E(1e3*D)},E.en=M[T],E.Ls=M,E.p={},E}))})(yo)),yo.exports}var Wd=zd();const Ve=sn(Wd);var bo={exports:{}},_d=bo.exports,pa;function Hd(){return pa||(pa=1,(function(e,t){(function(n,r){e.exports=r()})(_d,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(s,i,a){var l=i.prototype;a.utc=function(g){var y={date:g,utc:!0,args:arguments};return new i(y)},l.utc=function(g){var y=a(this.toDate(),{locale:this.$L,utc:!0});return g?y.add(this.utcOffset(),n):y},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var c=l.parse;l.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),c.call(this,g)};var u=l.init;l.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else u.call(this)};var d=l.utcOffset;l.utcOffset=function(g,y){var C=this.$utils().u;if(C(g))return this.$u?0:C(this.$offset)?d.call(this):this.$offset;if(typeof g=="string"&&(g=(function(T){T===void 0&&(T="");var M=T.match(r);if(!M)return null;var $=(""+M[0]).match(o)||["-",0,0],R=$[0],F=60*+$[1]+ +$[2];return F===0?0:R==="+"?F:-F})(g),g===null))return this;var P=Math.abs(g)<=16?60*g:g;if(P===0)return this.utc(y);var S=this.clone();if(y)return S.$offset=P,S.$u=!1,S;var x=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(S=this.local().add(P+x,n)).$offset=P,S.$x.$localOffset=x,S};var h=l.format;l.format=function(g){var y=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,y)},l.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var b=l.toDate;l.toDate=function(g){return g==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():b.call(this)};var p=l.diff;l.diff=function(g,y,C){if(g&&this.$u===g.$u)return p.call(this,g,y,C);var P=this.local(),S=a(g).local();return p.call(P,S,y,C)}}}))})(bo)),bo.exports}var Ud=Hd();const si=sn(Ud);Ve.extend(si);function Dn(e){return(e??"").startsWith("filter<")}function Yd(e){const{parsed:t}=Tt.BooleanFilterExpression.parse(e);if(!(!t||t.not))return t.operator==="true"||t.operator==="false"?t.operator:void 0}function Qn(e){const t=/^filter<(.+)>$/.exec(e??"");return t?t[1]:void 0}function ii(e){const t=e.filter(n=>n.trim()!=="");return t.length===0?"":Tt.StringFilterExpression.unparse({operator:"=",values:[...t]})}function Gd(e){if(e.trim()==="")return[];const{parsed:t}=Tt.StringFilterExpression.parse(e);return nc(t)?t.values:[e]}function qd(e){return e===void 0||e.trim()===""?!0:nc(Tt.StringFilterExpression.parse(e).parsed)}function nc(e){return e!==null&&Tt.isStringCondition(e)&&e.operator==="="&&e.not!==!0}function Kd(e){return Tt.NumberFilterExpression.unparse({operator:">=",values:[String(e)]})}function Qd(e){const t=e.trim();if(t==="")return;const{parsed:n}=Tt.NumberFilterExpression.parse(t);if(n===null||n.operator!==">="||n.not===!0||n.values?.length!==1)return;const r=Number(n.values[0]);return Number.isFinite(r)?r:void 0}function Xd(e,t){return Tt.NumberFilterExpression.unparse({operator:"range",startOperator:">=",startValue:String(e),endOperator:"<=",endValue:String(t)})}function Zd(e){const t=e.trim();if(t==="")return;const{parsed:n}=Tt.NumberFilterExpression.parse(t);if(n===null||n.operator!=="range"||n.not===!0||n.startOperator!==">="||n.endOperator!=="<=")return;const r=Number(n.startValue),o=Number(n.endValue);return Number.isFinite(r)&&Number.isFinite(o)&&r<=o?[r,o]:void 0}const To=[{key:"today",label:"Today",clause:{operator:"in",in:{moment:"today"}}},{key:"7d",label:"Last 7 days",clause:{operator:"in_last",units:"day",n:"7"}},{key:"30d",label:"Last 30 days",clause:{operator:"in_last",units:"day",n:"30"}},{key:"90d",label:"Last 90 days",clause:{operator:"in_last",units:"day",n:"90"}},{key:"12m",label:"Last 12 months",clause:{operator:"in_last",units:"month",n:"12"}}];function Jd(e){const t=To.find(n=>n.key===e);return t?Tt.TemporalFilterExpression.unparse(t.clause):void 0}function ep(e){const t=e.trim();if(t==="")return;const{parsed:n}=Tt.TemporalFilterExpression.parse(t);if(n!==null)for(const r of To){const o=r.clause;if(o.operator===n.operator&&(o.operator==="in"&&n.operator==="in"&&n.not!==!0&&n.in.moment===o.in.moment||o.operator==="in_last"&&n.operator==="in_last"&&n.not!==!0&&n.units===o.units&&Number(n.n)===Number(o.n)))return r.key}}const tp=/^\d{4}-\d{2}-\d{2}$/;function np(e,t){const n=Ve.utc(t,"YYYY-MM-DD").add(1,"day");return Tt.TemporalFilterExpression.unparse({operator:"to",fromMoment:{moment:"literal",literal:e,units:"day"},toMoment:{moment:"literal",literal:n.format("YYYY-MM-DD"),units:"day"}})}function rp(e){const t=e.trim();if(t==="")return;const{parsed:n}=Tt.TemporalFilterExpression.parse(t);if(n===null||n.operator!=="to"||n.not===!0)return;const r=fa(n.fromMoment),o=fa(n.toMoment);if(r===void 0||o===void 0)return;const s=Ve.utc(o,"YYYY-MM-DD").subtract(1,"day");if(!(!s.isValid()||s.isBefore(Ve.utc(r,"YYYY-MM-DD"))))return{firstDay:r,lastDay:s.format("YYYY-MM-DD")}}function fa(e){return e.moment==="literal"&&tp.test(e.literal)?e.literal:void 0}const vo="self";function ai(e){if(!e)return[];if(e.wasDimension&&!e.wasDimension())return[];const t=e.tag?.tag("drill");return t?(t.textArray("to")??[t.text("to")].filter(ma)).filter(ma):[]}function li(e){const t=e.replace(/[-_]+/g," ").trim();return t.charAt(0).toUpperCase()+t.slice(1)}function rc(e){return e.tag?.tag("drill")?.text("given")??e.name}function Gr(e){if(typeof e=="string"){const t=ii([e]);return t===""?void 0:t}if(typeof e=="boolean")return String(e);if(typeof e=="number")return Number.isFinite(e)?String(e):void 0;if(e instanceof Date){const t=e.toISOString();return t.slice(0,t.indexOf("T"))}}function oc(e){return e instanceof Date?Gr(e)??"":String(e)}function sc(e){if(!e||e.isHeader)return;const t=e.field;if(!t)return;const n=ai(t);if(n.length===0)return;const r=Gr(e.value);if(r!==void 0)return{to:n,given:rc(t),value:r,rawValue:e.value,label:oc(e.value)}}function ma(e){return typeof e=="string"&&e!==""}function ic(e,t){if(t!==void 0&&!Dn(t)){if(t==="number"){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(typeof e!="string"||e.trim()==="")return;const n=Number(e);return Number.isFinite(n)?n:void 0}if(t==="date"||t==="timestamp"||t==="timestamptz")return e instanceof Date?e:void 0;if(t==="boolean")return typeof e=="boolean"?e:e==="true"?!0:e==="false"?!1:void 0;if(typeof e=="string")return e.trim()===""?void 0:e;if(typeof e=="number")return Number.isFinite(e)?String(e):void 0;if(typeof e=="boolean")return String(e)}return Qn(t)==="string"&&typeof e=="number"?Number.isFinite(e)?ii([String(e)]):void 0:Qn(t)==="number"?typeof e=="number"?Number.isFinite(e)?String(e):void 0:typeof e!="string"||e.trim()===""?void 0:Number.isFinite(Number(e))?e.trim():void 0:Gr(e)}function ac({declaredTypes:e,setGiven:t,documentName:n}){const r=ie.useMemo(()=>{const a=new Map;for(const l of e.keys())a.has(l.toLowerCase())||a.set(l.toLowerCase(),l);return a},[e]),o=ie.useCallback(a=>e.has(a)?a:r.get(a.toLowerCase()),[e,r]),s=ie.useCallback(a=>o(a)!==void 0,[o]),i=ie.useCallback((a,l)=>{const c=o(a);if(c===void 0){console.warn(`# drill { to=self } tried to set '${a}', which '${n}' does not declare as a given. Name the given with 'given=' on the drill tag.`);return}const u=e.get(c),d=ic(l,u);if(d===void 0){console.warn(`Drill declined: ${JSON.stringify(l)} cannot be a value for given "${c}"`+(u?` of type ${u}`:""));return}t(c,d)},[e,n,o,t]);return{resolveGiven:o,canSelf:s,onSelf:i}}function op(e,t){if(e!=null){if(e instanceof Date)return uc(e,t);if(!Array.isArray(e))return String(e)}}function sp(e,t){return new Date(Date.UTC(e.year(),e.month(),e.date(),t?.getUTCHours()??0,t?.getUTCMinutes()??0,t?.getUTCSeconds()??0,t?.getUTCMilliseconds()??0))}const ip=/^(\d{4})-(\d{1,2})-(\d{1,2})(?:[T\s]+(\d{1,2}):(\d{2})(?::(\d{2}))?(?:\.(\d{1,9}))?)?\s*(Z|[+-]\d{2}:?\d{2}|[+-]\d{2}|UTC|GMT)?$/i;function lc(e){const t=e.trim();return t===""?e:t.replace(/^(\d{4}-\d{1,2}-\d{1,2}[T\s]+\d{1,2}:\d{2}(?::\d{2})?(?:\.\d{1,9})?)\s+(\d{2}:?\d{2}|\d{2})$/,"$1+$2")}function ap(e,t=!1){const n=lc(e);if(n==="")return;const r=ip.exec(n);if(!r)return;const[,o,s,i,a,l,c,u,d]=r,h={year:Number(o),month:Number(s),day:Number(i),hour:Number(a??0),minute:Number(l??0),second:Number(c??0),milli:Number((u??"").slice(0,3).padEnd(3,"0")||0)},b=Date.UTC(h.year,h.month-1,h.day,h.hour,h.minute,h.second,h.milli),p=new Date(b);if(!(p.getUTCFullYear()===h.year&&p.getUTCMonth()===h.month-1&&p.getUTCDate()===h.day&&p.getUTCHours()===h.hour&&p.getUTCMinutes()===h.minute&&p.getUTCSeconds()===h.second)||d!==void 0&&a===void 0)return;const y=lp(d);if(y===void 0)return;const C=new Date(b-y*6e4);if(!(t&&d!==void 0&&C.getUTCDate()!==h.day))return C}function lp(e){if(e===void 0)return 0;const t=e.toUpperCase();if(t==="Z"||t==="UTC"||t==="GMT")return 0;const n=/^([+-])(\d{2}):?(\d{2})?$/.exec(t);if(!n)return;const r=Number(n[3]??0);if(r>59)return;const o=Number(n[2])*60+r,s=n[1]!=="-";if(!(o>(s?840:720)))return s?o:-o}function cp(e){return!up.has(e??"")}const up=new Set(["boolean","number","date","timestamp","timestamptz"]);function cc(e,t){if(t===""&&!cp(e))return null;if(Dn(e))return t;switch(e){case"number":{const n=t.trim()===""?NaN:Number(t);return Number.isFinite(n)?n:t}case"boolean":return t==="true"?!0:t==="false"?!1:t;case"date":case"timestamp":case"timestamptz":{const n=lc(t);return ap(n,e==="date")??n}default:return t}}function ci(e,t){const n={};for(const[r,o]of e){const s=op(o,t.get(r));s!==void 0&&(n[r]=s)}return n}function uc(e,t){const n=e.toISOString();switch(t){case"timestamptz":return n;case"timestamp":return n.slice(0,-1);default:return n.slice(0,10)}}function qr(e,t,n){const r=n?new Set(n):void 0,o={};for(const[s,i]of e)r&&!r.has(s)||i!=null&&(Array.isArray(i)||(o[s]=i instanceof Date?uc(i,t.get(s)):i));return o}function ha(e,t){const n=new Map;for(const[r,o]of Object.entries(e))t.has(r)&&n.set(r,cc(t.get(r),o));return n}function ga(e,t){const n=Array.from(e.keys()).filter(o=>!t.has(o));if(n.length===0)return e;const r=new Map(e);for(const o of n)r.delete(o);return r}function ya(e){return Object.entries(e??{}).sort(([t],[n])=>t<n?-1:1)}function dp(e,t,n){for(const r of n.keys())if(e[r]!==t[r])return!1;return!0}function ba(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>e[r]===t[r])}function dc({declaredTypes:e,startingValues:t,params:n,onParamsChange:r,documentKey:o,autorun:s}){const i=ie.useMemo(()=>ha(t??{},e),[e,JSON.stringify(t)]),a=ie.useRef(null),l=ie.useRef(null),c=ie.useRef({documentKey:o,params:n}),u=I=>I!==null&&dp(n??{},I,e);u(a.current)&&(l.current=null),(c.current.documentKey!==o||!ba(n??{},c.current.params??{})&&!u(a.current)&&!u(l.current))&&(c.current={documentKey:o,params:n});const d=c.current.params,h=JSON.stringify(t),b=JSON.stringify(d),p=ie.useMemo(()=>ha({...t??{},...d??{}},e),[e,h,b]),g=ie.useMemo(()=>JSON.stringify([o??null,ya(t),ya(d)]),[o,h,b]),[y,C]=ie.useState(null),P=y?.key===g?y:null;ie.useEffect(()=>{y!==null&&y.key!==g&&C(null)},[y,g]);const S=ie.useMemo(()=>ga(P?.draft??p,e),[P,p,e]),x=ie.useMemo(()=>ga(P?.applied??p,e),[P,p,e]),T=ie.useCallback(I=>I?.key===g?I:{key:g,draft:p,applied:p},[g,p]),M=ie.useMemo(()=>ci(x,e),[x,e]);a.current===null&&(a.current=M),ie.useEffect(()=>{r&&(ba(a.current??{},M)||(l.current=a.current,a.current=M,r(M)))},[M,r]);const $=ie.useCallback((I,f)=>{C(O=>{const D=T(O),k=new Map(D.draft);return f===null?k.delete(I):k.set(I,f),{key:D.key,draft:k,applied:s?k:D.applied}})},[s,T]),R=ie.useCallback(()=>{C(I=>({key:T(I).key,draft:i,applied:i}))},[T,i]),F=ie.useCallback(()=>{C(I=>{const f=T(I);return{key:f.key,draft:f.draft,applied:f.draft}})},[T]),E=ie.useMemo(()=>{if(s)return!1;if(S.size!==x.size)return!0;for(const[I,f]of S){const O=x.get(I);if(f instanceof Date&&O instanceof Date){if(f.getTime()!==O.getTime())return!0}else if(Array.isArray(f)&&Array.isArray(O)){if(String(f)!==String(O))return!0}else if(f!==O)return!0}return!1},[s,S,x]);return{draft:S,applied:x,setGiven:$,reset:R,apply:F,pending:E}}const pp=1e3;function pc(e){const t=e.split(".");return t[t.length-1]}function fp(e,t){return`run: ${e} -> {
2
2
  group_by: ${t}
3
3
  order_by: ${pc(t)} asc
4
4
  limit: ${pp}
@@ -18,7 +18,7 @@ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
18
18
  theme.transitions = createTransitions(theme.transitions || {});
19
19
 
20
20
  export default theme;`}function Wa(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const gm=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;r<t.length;r+=1)n+=+t[r];return n};function ym(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:Ro(t,gm(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Wa(n)})`:Qo(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Wa(n)})`:Ko(t,n)}})}function js(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:s={},transitions:i={},typography:a={},shape:l,colorSpace:c,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(tn(20));const d=gi({...s,colorSpace:c}),h=yi(e);let b=ft(h,{mixins:rm(h.breakpoints,r),palette:d,shadows:cm.slice(),typography:sm(d,a),transitions:fm(i),zIndex:{...mm}});return b=ft(b,u),b=t.reduce((p,g)=>ft(p,g),b),b.unstable_sxConfig={...Xr,...u?.unstable_sxConfig},b.unstable_sx=function(g){return rr({sx:g,theme:this})},b.toRuntimeSource=Mc,ym(b),b}function Bs(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const bm=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Bs(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Dc(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Tc(e){return e==="dark"?bm:[]}function vm(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:o,...s}=e,i=gi({...t,colorSpace:o});return{palette:i,opacity:{...Dc(i.mode),...n},overlays:r||Tc(i.mode),...s}}function xm(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const Sm=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Cm=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let s=o;if(o==="class"&&(s=".%s"),o==="data"&&(s="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(s=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return Sm(e.cssVarPrefix).forEach(a=>{i[a]=n[a],delete n[a]}),s==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:s?{[s.replace("%s",t)]:i,[`${r}, ${s.replace("%s",t)}`]:n}:{[r]:{...n,...i}}}if(s&&s!=="media")return`${r}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(s)return s.replace("%s",String(t))}return r};function wm(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function X(e,t,n){!e[t]&&n&&(e[t]=n)}function Tr(e){return typeof e!="string"||!e.startsWith("hsl")?e:vc(e)}function Jt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Dr(Tr(e[t])))}function Pm(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Ut=e=>{try{return e()}catch{}},km=(e="mui")=>Qe.unstable_createGetCssVar(e);function Ms(e,t,n,r,o){if(!n)return;n=n===!0?{}:n;const s=o==="dark"?"dark":"light";if(!r){t[o]=vm({...n,palette:{mode:s,...n?.palette},colorSpace:e});return}const{palette:i,...a}=js({...r,palette:{mode:s,...n?.palette},colorSpace:e});return t[o]={...n,palette:i,opacity:{...Dc(s),...n?.opacity},overlays:n?.overlays||Tc(s)},a}function Mm(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",nativeColor:i=!1,shouldSkipGeneratingVar:a=xm,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...u}=e,d=Object.keys(n)[0],h=r||(n.light&&d!=="light"?"light":d),b=km(s),{[h]:p,light:g,dark:y,...C}=n,P={...C};let S=p;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(S=!0),!S)throw new Error(tn(21,h));let x;i&&(x="oklch");const T=Ms(x,P,S,u,h);g&&!P.light&&Ms(x,P,g,void 0,"light"),y&&!P.dark&&Ms(x,P,y,void 0,"dark");let M={defaultColorScheme:h,...T,cssVarPrefix:s,colorSchemeSelector:l,rootSelector:c,getCssVar:b,colorSchemes:P,font:{...em(T.typography),...T.font},spacing:Pm(u.spacing)};Object.keys(M.colorSchemes).forEach(I=>{const f=M.colorSchemes[I].palette,O=k=>{const w=k.split("-"),A=w[1],N=w[2];return b(k,f[A][N])};f.mode==="light"&&(X(f.common,"background","#fff"),X(f.common,"onBackground","#000")),f.mode==="dark"&&(X(f.common,"background","#000"),X(f.common,"onBackground","#fff"));function D(k,w,A){if(x){let N;return k===xn&&(N=`transparent ${((1-A)*100).toFixed(0)}%`),k===je&&(N=`#000 ${(A*100).toFixed(0)}%`),k===Be&&(N=`#fff ${(A*100).toFixed(0)}%`),`color-mix(in ${x}, ${w}, ${N})`}return k(w,A)}if(wm(f,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),f.mode==="light"){X(f.Alert,"errorColor",D(je,f.error.light,.6)),X(f.Alert,"infoColor",D(je,f.info.light,.6)),X(f.Alert,"successColor",D(je,f.success.light,.6)),X(f.Alert,"warningColor",D(je,f.warning.light,.6)),X(f.Alert,"errorFilledBg",O("palette-error-main")),X(f.Alert,"infoFilledBg",O("palette-info-main")),X(f.Alert,"successFilledBg",O("palette-success-main")),X(f.Alert,"warningFilledBg",O("palette-warning-main")),X(f.Alert,"errorFilledColor",Ut(()=>f.getContrastText(f.error.main))),X(f.Alert,"infoFilledColor",Ut(()=>f.getContrastText(f.info.main))),X(f.Alert,"successFilledColor",Ut(()=>f.getContrastText(f.success.main))),X(f.Alert,"warningFilledColor",Ut(()=>f.getContrastText(f.warning.main))),X(f.Alert,"errorStandardBg",D(Be,f.error.light,.9)),X(f.Alert,"infoStandardBg",D(Be,f.info.light,.9)),X(f.Alert,"successStandardBg",D(Be,f.success.light,.9)),X(f.Alert,"warningStandardBg",D(Be,f.warning.light,.9)),X(f.Alert,"errorIconColor",O("palette-error-main")),X(f.Alert,"infoIconColor",O("palette-info-main")),X(f.Alert,"successIconColor",O("palette-success-main")),X(f.Alert,"warningIconColor",O("palette-warning-main")),X(f.AppBar,"defaultBg",O("palette-grey-100")),X(f.Avatar,"defaultBg",O("palette-grey-400")),X(f.Button,"inheritContainedBg",O("palette-grey-300")),X(f.Button,"inheritContainedHoverBg",O("palette-grey-A100")),X(f.Chip,"defaultBorder",O("palette-grey-400")),X(f.Chip,"defaultAvatarColor",O("palette-grey-700")),X(f.Chip,"defaultIconColor",O("palette-grey-700")),X(f.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),X(f.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),X(f.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),X(f.LinearProgress,"primaryBg",D(Be,f.primary.main,.62)),X(f.LinearProgress,"secondaryBg",D(Be,f.secondary.main,.62)),X(f.LinearProgress,"errorBg",D(Be,f.error.main,.62)),X(f.LinearProgress,"infoBg",D(Be,f.info.main,.62)),X(f.LinearProgress,"successBg",D(Be,f.success.main,.62)),X(f.LinearProgress,"warningBg",D(Be,f.warning.main,.62)),X(f.Skeleton,"bg",x?D(xn,f.text.primary,.11):`rgba(${O("palette-text-primaryChannel")} / 0.11)`),X(f.Slider,"primaryTrack",D(Be,f.primary.main,.62)),X(f.Slider,"secondaryTrack",D(Be,f.secondary.main,.62)),X(f.Slider,"errorTrack",D(Be,f.error.main,.62)),X(f.Slider,"infoTrack",D(Be,f.info.main,.62)),X(f.Slider,"successTrack",D(Be,f.success.main,.62)),X(f.Slider,"warningTrack",D(Be,f.warning.main,.62));const k=x?D(je,f.background.default,.6825):ao(f.background.default,.8);X(f.SnackbarContent,"bg",k),X(f.SnackbarContent,"color",Ut(()=>x?Ns.text.primary:f.getContrastText(k))),X(f.SpeedDialAction,"fabHoverBg",ao(f.background.paper,.15)),X(f.StepConnector,"border",O("palette-grey-400")),X(f.StepContent,"border",O("palette-grey-400")),X(f.Switch,"defaultColor",O("palette-common-white")),X(f.Switch,"defaultDisabledColor",O("palette-grey-100")),X(f.Switch,"primaryDisabledColor",D(Be,f.primary.main,.62)),X(f.Switch,"secondaryDisabledColor",D(Be,f.secondary.main,.62)),X(f.Switch,"errorDisabledColor",D(Be,f.error.main,.62)),X(f.Switch,"infoDisabledColor",D(Be,f.info.main,.62)),X(f.Switch,"successDisabledColor",D(Be,f.success.main,.62)),X(f.Switch,"warningDisabledColor",D(Be,f.warning.main,.62)),X(f.TableCell,"border",D(Be,D(xn,f.divider,1),.88)),X(f.Tooltip,"bg",D(xn,f.grey[700],.92))}if(f.mode==="dark"){X(f.Alert,"errorColor",D(Be,f.error.light,.6)),X(f.Alert,"infoColor",D(Be,f.info.light,.6)),X(f.Alert,"successColor",D(Be,f.success.light,.6)),X(f.Alert,"warningColor",D(Be,f.warning.light,.6)),X(f.Alert,"errorFilledBg",O("palette-error-dark")),X(f.Alert,"infoFilledBg",O("palette-info-dark")),X(f.Alert,"successFilledBg",O("palette-success-dark")),X(f.Alert,"warningFilledBg",O("palette-warning-dark")),X(f.Alert,"errorFilledColor",Ut(()=>f.getContrastText(f.error.dark))),X(f.Alert,"infoFilledColor",Ut(()=>f.getContrastText(f.info.dark))),X(f.Alert,"successFilledColor",Ut(()=>f.getContrastText(f.success.dark))),X(f.Alert,"warningFilledColor",Ut(()=>f.getContrastText(f.warning.dark))),X(f.Alert,"errorStandardBg",D(je,f.error.light,.9)),X(f.Alert,"infoStandardBg",D(je,f.info.light,.9)),X(f.Alert,"successStandardBg",D(je,f.success.light,.9)),X(f.Alert,"warningStandardBg",D(je,f.warning.light,.9)),X(f.Alert,"errorIconColor",O("palette-error-main")),X(f.Alert,"infoIconColor",O("palette-info-main")),X(f.Alert,"successIconColor",O("palette-success-main")),X(f.Alert,"warningIconColor",O("palette-warning-main")),X(f.AppBar,"defaultBg",O("palette-grey-900")),X(f.AppBar,"darkBg",O("palette-background-paper")),X(f.AppBar,"darkColor",O("palette-text-primary")),X(f.Avatar,"defaultBg",O("palette-grey-600")),X(f.Button,"inheritContainedBg",O("palette-grey-800")),X(f.Button,"inheritContainedHoverBg",O("palette-grey-700")),X(f.Chip,"defaultBorder",O("palette-grey-700")),X(f.Chip,"defaultAvatarColor",O("palette-grey-300")),X(f.Chip,"defaultIconColor",O("palette-grey-300")),X(f.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),X(f.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),X(f.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),X(f.LinearProgress,"primaryBg",D(je,f.primary.main,.5)),X(f.LinearProgress,"secondaryBg",D(je,f.secondary.main,.5)),X(f.LinearProgress,"errorBg",D(je,f.error.main,.5)),X(f.LinearProgress,"infoBg",D(je,f.info.main,.5)),X(f.LinearProgress,"successBg",D(je,f.success.main,.5)),X(f.LinearProgress,"warningBg",D(je,f.warning.main,.5)),X(f.Skeleton,"bg",x?D(xn,f.text.primary,.13):`rgba(${O("palette-text-primaryChannel")} / 0.13)`),X(f.Slider,"primaryTrack",D(je,f.primary.main,.5)),X(f.Slider,"secondaryTrack",D(je,f.secondary.main,.5)),X(f.Slider,"errorTrack",D(je,f.error.main,.5)),X(f.Slider,"infoTrack",D(je,f.info.main,.5)),X(f.Slider,"successTrack",D(je,f.success.main,.5)),X(f.Slider,"warningTrack",D(je,f.warning.main,.5));const k=x?D(Be,f.background.default,.985):ao(f.background.default,.98);X(f.SnackbarContent,"bg",k),X(f.SnackbarContent,"color",Ut(()=>x?Cc.text.primary:f.getContrastText(k))),X(f.SpeedDialAction,"fabHoverBg",ao(f.background.paper,.15)),X(f.StepConnector,"border",O("palette-grey-600")),X(f.StepContent,"border",O("palette-grey-600")),X(f.Switch,"defaultColor",O("palette-grey-300")),X(f.Switch,"defaultDisabledColor",O("palette-grey-600")),X(f.Switch,"primaryDisabledColor",D(je,f.primary.main,.55)),X(f.Switch,"secondaryDisabledColor",D(je,f.secondary.main,.55)),X(f.Switch,"errorDisabledColor",D(je,f.error.main,.55)),X(f.Switch,"infoDisabledColor",D(je,f.info.main,.55)),X(f.Switch,"successDisabledColor",D(je,f.success.main,.55)),X(f.Switch,"warningDisabledColor",D(je,f.warning.main,.55)),X(f.TableCell,"border",D(je,D(xn,f.divider,1),.68)),X(f.Tooltip,"bg",D(xn,f.grey[700],.92))}Jt(f.background,"default"),Jt(f.background,"paper"),Jt(f.common,"background"),Jt(f.common,"onBackground"),Jt(f,"divider"),Object.keys(f).forEach(k=>{const w=f[k];k!=="tonalOffset"&&w&&typeof w=="object"&&(w.main&&X(f[k],"mainChannel",Dr(Tr(w.main))),w.light&&X(f[k],"lightChannel",Dr(Tr(w.light))),w.dark&&X(f[k],"darkChannel",Dr(Tr(w.dark))),w.contrastText&&X(f[k],"contrastTextChannel",Dr(Tr(w.contrastText))),k==="text"&&(Jt(f[k],"primary"),Jt(f[k],"secondary")),k==="action"&&(w.active&&Jt(f[k],"active"),w.selected&&Jt(f[k],"selected")))})}),M=t.reduce((I,f)=>ft(I,f),M);const $={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:Cm(M),enableContrastVars:i},{vars:R,generateThemeVars:F,generateStyleSheets:E}=Jf(M,$);return M.vars=R,Object.entries(M.colorSchemes[M.defaultColorScheme]).forEach(([I,f])=>{M[I]=f}),M.generateThemeVars=F,M.generateStyleSheets=E,M.generateSpacing=function(){return Qe.createSpacing(u.spacing,fi(this))},M.getColorSchemeSelector=tm(l),M.spacing=M.generateSpacing(),M.shouldSkipGeneratingVar=a,M.unstable_sxConfig={...Xr,...u?.unstable_sxConfig},M.unstable_sx=function(f){return rr({sx:f,theme:this})},M.toRuntimeSource=Mc,M}function _a(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:gi({...n===!0?{}:n.palette,mode:t})})}function Ic(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:s=n?.mode,...i}=e,a=s||"light",l=o?.[a],c={...o,...n?{[a]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return js(e,...t);let u=n;"palette"in e||c[a]&&(c[a]!==!0?u=c[a].palette:a==="dark"&&(u={mode:"dark"}));const d=js({...e,palette:u},...t);return d.defaultColorScheme=a,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},_a(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},_a(d,"light",c.light)),d}return!n&&!("light"in c)&&a==="light"&&(c.light=!0),Mm({...i,colorSchemes:c,defaultColorScheme:a,...typeof r!="boolean"&&r},...t)}const Xo=Ic(),dr="$$material";function Fn(){const e=Qe.useTheme(Xo);return e[dr]||e}function Dm(e){return m.jsx(Qe.GlobalStyles,{...e,defaultTheme:Xo,themeId:dr})}function Tm(e){const{variants:t,...n}=e,r={variants:t,style:Rn(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=Rn(o.style))}),r}const Im=yi();function Ds(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Tn(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Rm(e){return e?(t,n)=>n[e]:null}function Om(e,t,n){e.theme=Am(e.theme)?n:e.theme[t]||e.theme}function xo(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(o=>xo(e,o,n));if(Array.isArray(r?.variants)){let o;if(r.isProcessed)o=n?Tn(r.style,n):r.style;else{const{variants:s,...i}=r;o=n?Tn(Rn(i),n):i}return Rc(e,r.variants,[o],n)}return r?.isProcessed?n?Tn(Rn(r.style),n):r.style:n?Tn(Rn(r),n):r}function Rc(e,t,n=[],r=void 0){let o;e:for(let s=0;s<t.length;s+=1){const i=t[s];if(typeof i.props=="function"){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!i.props(o))continue}else for(const a in i.props)if(e[a]!==i.props[a]&&e.ownerState?.[a]!==i.props[a])continue e;typeof i.style=="function"?(o??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Tn(Rn(i.style(o)),r):i.style(o))):n.push(r?Tn(Rn(i.style),r):i.style)}return n}function $m(e={}){const{themeId:t,defaultTheme:n=Im,rootShouldForwardProp:r=Ds,slotShouldForwardProp:o=Ds}=e;function s(a){Om(a,t,n)}return(a,l={})=>{Lf(a,M=>M.filter($=>$!==rr));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:b=Rm(Lm(u)),...p}=l,g=c&&c.startsWith("Mui")||u?"components":"custom",y=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,C=h||!1;let P=Ds;u==="Root"||u==="root"?P=r:u?P=o:Fm(a)&&(P=void 0);const S=Ff(a,{shouldForwardProp:P,label:Em(),...p}),x=M=>{if(M.__emotion_real===M)return M;if(typeof M=="function")return function(R){return xo(R,M,R.theme.modularCssLayers?g:void 0)};if(Gt(M)){const $=Tm(M);return function(F){return $.variants?xo(F,$,F.theme.modularCssLayers?g:void 0):F.theme.modularCssLayers?Tn($.style,g):$.style}}return M},T=(...M)=>{const $=[],R=M.map(x),F=[];if($.push(s),c&&b&&F.push(function(O){const k=O.theme.components?.[c]?.styleOverrides;if(!k)return null;const w={};for(const A in k)w[A]=xo(O,k[A],O.theme.modularCssLayers?"theme":void 0);return b(O,w)}),c&&!y&&F.push(function(O){const k=O.theme?.components?.[c]?.variants;return k?Rc(O,k,[],O.theme.modularCssLayers?"theme":void 0):null}),C||F.push(rr),Array.isArray(R[0])){const f=R.shift(),O=new Array($.length).fill(""),D=new Array(F.length).fill("");let k;k=[...O,...f,...D],k.raw=[...O,...f.raw,...D],$.unshift(k)}const E=[...$,...R,...F],I=S(...E);return a.muiName&&(I.muiName=a.muiName),I};return S.withConfig&&(T.withConfig=S.withConfig),T}}function Em(e,t){return void 0}function Am(e){for(const t in e)return!1;return!0}function Fm(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Lm(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Oc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const jt=e=>Oc(e)&&e!=="classes",W=$m({themeId:dr,defaultTheme:Xo,rootShouldForwardProp:jt});function Nm(e){return function(n){return m.jsx(Dm,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function jm(){return hf}const Re=Qe.unstable_memoTheme;function Oe(e){return zf(e)}function be(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Se(e,o,n)}),r}function Bm(e){return Se("MuiSvgIcon",e)}be("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Vm=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${ue(t)}`,`fontSize${ue(n)}`]};return ve(o,Bm,r)},zm=W("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ue(n.color)}`],t[`fontSize${ue(n.fontSize)}`]]}})(Re(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),$o=v.forwardRef(function(t,n){const r=Oe({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...b}=r,p=v.isValidElement(o)&&o.type==="svg",g={...r,color:i,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:p},y={};u||(y.viewBox=h);const C=Vm(g);return m.jsxs(zm,{as:a,className:me(C.root,s),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...y,...b,...p&&o.props,ownerState:g,children:[p?o.props.children:o,d?m.jsx("title",{children:d}):null]})});$o.muiName="SvgIcon";function ct(e,t){function n(r,o){return m.jsx($o,{"data-testid":void 0,ref:o,...r,children:e})}return n.muiName=$o.muiName,v.memo(v.forwardRef(n))}function $c(e,t=166){let n;function r(...o){const s=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(s,t)}return r.clear=()=>{clearTimeout(n)},r}function So(e,t){return v.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}function dt(e){return e&&e.ownerDocument||document}function rn(e){return dt(e).defaultView||window}function Vs(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Mt(e){const{controlled:t,default:n,name:r,state:o="value"}=e,{current:s}=v.useRef(t!==void 0),[i,a]=v.useState(n),l=s?t:i,c=v.useCallback(u=>{s||a(u)},[]);return[l,c]}function fe(e){const t=v.useRef(e);return st(()=>{t.current=e}),v.useRef((...n)=>(0,t.current)(...n)).current}function Fe(...e){const t=v.useRef(void 0),n=v.useCallback(r=>{const o=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const i=s,a=i(r);return typeof a=="function"?a:()=>{i(null)}}return s.current=r,()=>{s.current=null}});return()=>{o.forEach(s=>s?.())}},e);return v.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function Wm(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function Ec(e,t){if(!e)return t;function n(i,a){const l={};return Object.keys(a).forEach(c=>{Wm(c,a[c])&&typeof i[c]=="function"&&(l[c]=(...u)=>{i[c](...u),a[c](...u)})}),l}if(typeof e=="function"||typeof t=="function")return i=>{const a=typeof t=="function"?t(i):t,l=typeof e=="function"?e({...i,...a}):e,c=me(i?.className,a?.className,l?.className),u=n(l,a);return{...a,...l,...u,...!!c&&{className:c},...a?.style&&l?.style&&{style:{...a.style,...l.style}},...a?.sx&&l?.sx&&{sx:[...Array.isArray(a.sx)?a.sx:[a.sx],...Array.isArray(l.sx)?l.sx:[l.sx]]}}};const r=t,o=n(e,r),s=me(r?.className,e?.className);return{...t,...e,...o,...!!s&&{className:s},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const Ac=ct(m.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}));function _m({label:e,onClick:t,disabled:n}){return m.jsx(re.Button,{variant:"contained",color:"primary",startIcon:m.jsx(Ac,{}),onClick:t,disabled:n,"aria-label":`Add ${e.toLowerCase()}`,sx:{whiteSpace:"nowrap"},children:e})}function Hm({label:e,icon:t,onClick:n,disabled:r,disabledReason:o,ariaLabel:s,ariaHasPopup:i}){const a=m.jsx("span",{children:m.jsx(re.Button,{variant:"outlined",startIcon:t,onClick:n,disabled:r,"aria-label":s,"aria-haspopup":i,sx:{whiteSpace:"nowrap"},children:e})});return r&&o?m.jsx(re.Tooltip,{title:o,children:a}):a}const Zo=ct(m.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function Um({open:e,onClose:t,title:n,description:r,maxWidth:o="sm",showClose:s=!1,actions:i,children:a}){const l=ie.useId();return m.jsxs(re.Dialog,{open:e,onClose:t,maxWidth:o,fullWidth:!0,"aria-labelledby":l,children:[m.jsxs(re.DialogTitle,{id:l,sx:{px:3,pt:3,pb:r?.5:1,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,fontSize:"1.25rem",fontWeight:600,letterSpacing:"-0.025em",lineHeight:1.2},children:[n,s&&m.jsx(re.IconButton,{"aria-label":"Close",onClick:t,size:"small",sx:{color:"text.secondary",mr:-1},children:m.jsx(Zo,{fontSize:"small"})})]}),m.jsxs(re.DialogContent,{sx:{px:3,pb:1,pt:1},children:[r&&m.jsx(re.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:r}),m.jsx(re.Stack,{sx:{gap:2,pt:r?0:1},children:a})]}),i&&m.jsx(re.DialogActions,{sx:{px:3,pb:3,pt:2,gap:1},children:i})]})}function Ym({left:e,children:t}){const{theme:n}=Ge.usePublisherTheme();return m.jsxs(re.Stack,{direction:"row",sx:{position:"sticky",top:0,zIndex:5,alignItems:"center",justifyContent:"space-between",gap:1,minHeight:48,py:.5,mb:3,bgcolor:n.background,borderBottom:n.border},children:[m.jsx(re.Stack,{direction:"row",sx:{alignItems:"center",gap:1,minWidth:0,overflow:"hidden"},children:e}),m.jsx(re.Stack,{direction:"row",sx:{alignItems:"center",gap:.5,flexShrink:0,"& .MuiButton-root":{whiteSpace:"nowrap"}},children:t})]})}const Gm=ct(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m-5.5-2.5 7.51-3.49L17.5 6.5 9.99 9.99zm5.5-6.6c.61 0 1.1.49 1.1 1.1s-.49 1.1-1.1 1.1-1.1-.49-1.1-1.1.49-1.1 1.1-1.1"}));function Fc(e){return["queryResult",e.environmentName,e.packageName,e.versionId,e.modelPath,e.queryName,e.query,e.sourceName,JSON.stringify(e.givens??{})]}function bi(e,{enabled:t=!0}={}){const{apiClients:n}=Ge.useServer();return ds({queryKey:Fc(e),queryFn:()=>n.models.executeQueryModel(e.environmentName,e.packageName,e.modelPath,{queryName:e.queryName,query:e.query,sourceName:e.sourceName,givens:e.givens,versionId:e.versionId}),enabled:t,...Ge.CHART_RESULT_QUERY_OPTIONS})}function Lc({onNavigate:e,onSelf:t,selfLabel:n="Filter this view",canSelf:r,onRows:o}){const[s,i]=ie.useState(null),a=ie.useCallback((p,g)=>p.filter(y=>y===vo?t!==void 0&&(r?.(g)??!0):e!==void 0),[e,t,r]),l=ie.useCallback((p,g,y)=>{if(g===vo){t?.(p.given,p.rawValue);return}e?.({dashboard:g,givens:{[p.given]:p.value}},y)},[e,t]),c=ie.useCallback(p=>{if(!(!o||p.isHeader||!p.field)&&(p.field.wasDimension?.()??!1)&&Gr(p.value)!==void 0)return{field:p.field.name,rawValue:p.value,label:oc(p.value),...p.context===void 0?{}:{context:p.context}}},[o]),u=ie.useCallback(p=>{const g=sc(p),y=c(p),C=g?a(g.to,g.given):[];if(C.length===0){y&&o?.(y);return}if(C.length===1&&g){l(g,C[0],p.event);return}i({...g?{intent:g}:{},destinations:C,event:p.event,top:p.event?.clientY??0,left:p.event?.clientX??0,label:g?.label??y?.label??""})},[l,a,o,c]),d=ie.useCallback(p=>a(ai(p),rc(p)).length>0||o!==void 0&&(p.wasDimension?.()??!1),[a,o]),h=ie.useMemo(()=>({onClick:u,canDrill:d}),[u,d]),b=ie.useCallback(()=>i(null),[]);return{drill:h,drillMenu:m.jsxs(re.Menu,{open:s!==null,onClose:b,anchorReference:"anchorPosition",anchorPosition:{top:s?.top??0,left:s?.left??0},children:[m.jsx(re.ListSubheader,{sx:{lineHeight:"32px"},children:s?`${s.label} →`:""}),Array.from(new Set(s?.destinations??[])).map(p=>m.jsx(re.MenuItem,{onClick:()=>{b(),s?.intent&&l(s.intent,p,s.event)},children:p===vo?n:li(p)},p))]})}}function or({text:e,size:t=20,color:n="primary",thickness:r=3.6,centered:o=!0,spacing:s=2,textVariant:i="body2"}){const a=m.jsxs(re.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:s},children:[m.jsx(re.CircularProgress,{size:t,color:n,thickness:r}),e&&m.jsx(re.Typography,{variant:i,color:"text.secondary",children:e})]});return o?m.jsx(re.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",width:"100%"},children:a}):a}const Nc=ct(m.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}));function jc({sx:e,...t}){const{theme:n}=Ge.usePublisherTheme();return m.jsx(re.IconButton,{size:"small",...t,sx:[{width:32,height:32,bgcolor:n.tile,border:n.border,color:n.tileTitle,"&:hover":{bgcolor:n.tile,color:n.drillLink},"& .MuiSvgIcon-root":{fontSize:18}},...Array.isArray(e)?e:[e]]})}const qm=new Set(["warn","error"]);function Km(e){if(!e?.length)return;const t=[];let n=!1;for(const r of e)!r.message||!qm.has(r.severity??"")||(r.severity==="error"&&(n=!0),t.includes(r.message)||t.push(r.message));if(t.length)return{severity:n?"error":"warn",title:t.join(`
21
- `)}}const Qm=new Set(["bar","line","chart","scatter_chart"]),Xm=new Set(["table","dashboard","shape_map","segment_map","list","list_detail","big_value","cell","link","image"]);function Zm(e,t){return t==="fill"?"container":t==="fixed"||!e?"content":Qm.has(e)?"container":"content"}function Jm(e,t){return t==="fixed"?!0:t==="fill"?!1:e!==void 0&&Xm.has(e)}function eh(e){return e==="dashboard"?3:2}function Bc(e,t){let n=e.firstElementChild;for(let r=1;r<t&&n;r++)n=n.firstElementChild;return n}function th(e,t){const n=Bc(e,t);return n&&(n.scrollHeight||n.offsetHeight)||0}const Vc=400,nh=700,rh=600,oh=800,zc=400,zs=2e3;function Wc(e){return e===void 0?zs:Math.min(e,zs)}function _c({sizing:e,contentHeight:t,maxHeight:n}){return e==="container"?n??zc:t===void 0||t<=0?Wc(n):n===void 0?t:Math.min(n,t)}const sh=ie.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-CetSzFgW.cjs.js")).then(e=>e.RenderedResult$1));function Hc({result:e,maxHeight:t,maxResultSize:n=0,renderLogs:r,drill:o}){const s=ie.useRef(null),[i,a]=ie.useState(void 0),[l,c]=ie.useState(void 0),[u,d]=ie.useState(!1),h=Km(r);if(!e)return null;if(n>0&&e.length>n&&!u)return m.jsxs(re.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,p:4,backgroundColor:"#fafafa",border:"1px solid",borderColor:"#e0e0e0",borderRadius:1},children:[m.jsx(Nd.Warning,{sx:{fontSize:48,color:"#757575"}}),m.jsx(re.Typography,{variant:"h6",color:"text.secondary",align:"center",children:"Processing large results may cause browser performance issues. Proceed?"}),m.jsx(re.Button,{variant:"contained",color:"primary",onClick:()=>d(!0),children:"Proceed"})]});const p=m.jsx(or,{text:"Loading...",centered:!0,size:32}),g=_c({sizing:i,contentHeight:l,maxHeight:t});return m.jsxs(re.Box,{ref:s,sx:{position:"relative",height:"auto",border:"0px",borderRadius:0,overflow:"hidden"},children:[e&&m.jsx(ie.Suspense,{fallback:p,children:m.jsx(sh,{result:e,height:g,onSizeChange:c,onSizing:a,drill:o})}),h&&m.jsx(re.Box,{sx:{position:"absolute",top:4,right:4,zIndex:1},children:m.jsx(re.Tooltip,{title:h.title,slotProps:{tooltip:{sx:{whiteSpace:"pre-line"}}},children:m.jsx(jc,{"aria-label":"Render tag warnings",children:m.jsx(Nc,{fontSize:"small",color:h.severity==="error"?"error":"warning"})})})})]})}function vi({state:e,context:t,loadingText:n="Running…",maxHeight:r,maxResultSize:o,drill:s,transform:i}){const{data:a,isSuccess:l,isError:c,error:u}=e,d=a?.data.result,h=ie.useMemo(()=>d!==void 0&&i?i(d):d,[d,i]);return c?m.jsx(re.Box,{sx:{p:2},children:m.jsx(Vo,{context:t,error:u})}):l?m.jsx(Hc,{result:h,maxHeight:r,maxResultSize:o,renderLogs:a.data.renderLogs,drill:s}):m.jsx(or,{text:n})}const ih=new Set(["bar_chart","line_chart","scatter_chart","shape_map","segment_map","point_map","big_value","sparkline","list","list_detail","dashboard","transpose","table","json","image","link","text"]),ah={value:`# big_value
21
+ `)}}const Qm=new Set(["bar","line","chart","scatter_chart"]),Xm=new Set(["table","dashboard","shape_map","segment_map","list","list_detail","big_value","cell","link","image"]);function Zm(e,t){return t==="fill"?"container":t==="fixed"||!e?"content":Qm.has(e)?"container":"content"}function Jm(e,t){return t==="fixed"?!0:t==="fill"?!1:e!==void 0&&Xm.has(e)}function eh(e){return e==="dashboard"?3:2}function Bc(e,t){let n=e.firstElementChild;for(let r=1;r<t&&n;r++)n=n.firstElementChild;return n}function th(e,t){const n=Bc(e,t);return n&&(n.scrollHeight||n.offsetHeight)||0}const Vc=400,nh=700,rh=600,oh=800,zc=400,zs=2e3;function Wc(e){return e===void 0?zs:Math.min(e,zs)}function _c({sizing:e,contentHeight:t,maxHeight:n}){return e==="container"?n??zc:t===void 0||t<=0?Wc(n):n===void 0?t:Math.min(n,t)}const sh=ie.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-AJPMUkAD.cjs.js")).then(e=>e.RenderedResult$1));function Hc({result:e,maxHeight:t,maxResultSize:n=0,renderLogs:r,drill:o}){const s=ie.useRef(null),[i,a]=ie.useState(void 0),[l,c]=ie.useState(void 0),[u,d]=ie.useState(!1),h=Km(r);if(!e)return null;if(n>0&&e.length>n&&!u)return m.jsxs(re.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,p:4,backgroundColor:"#fafafa",border:"1px solid",borderColor:"#e0e0e0",borderRadius:1},children:[m.jsx(Nd.Warning,{sx:{fontSize:48,color:"#757575"}}),m.jsx(re.Typography,{variant:"h6",color:"text.secondary",align:"center",children:"Processing large results may cause browser performance issues. Proceed?"}),m.jsx(re.Button,{variant:"contained",color:"primary",onClick:()=>d(!0),children:"Proceed"})]});const p=m.jsx(or,{text:"Loading...",centered:!0,size:32}),g=_c({sizing:i,contentHeight:l,maxHeight:t});return m.jsxs(re.Box,{ref:s,sx:{position:"relative",height:"auto",border:"0px",borderRadius:0,overflow:"hidden"},children:[e&&m.jsx(ie.Suspense,{fallback:p,children:m.jsx(sh,{result:e,height:g,onSizeChange:c,onSizing:a,drill:o})}),h&&m.jsx(re.Box,{sx:{position:"absolute",top:4,right:4,zIndex:1},children:m.jsx(re.Tooltip,{title:h.title,slotProps:{tooltip:{sx:{whiteSpace:"pre-line"}}},children:m.jsx(jc,{"aria-label":"Render tag warnings",children:m.jsx(Nc,{fontSize:"small",color:h.severity==="error"?"error":"warning"})})})})]})}function vi({state:e,context:t,loadingText:n="Running…",maxHeight:r,maxResultSize:o,drill:s,transform:i}){const{data:a,isSuccess:l,isError:c,error:u}=e,d=a?.data.result,h=ie.useMemo(()=>d!==void 0&&i?i(d):d,[d,i]);return c?m.jsx(re.Box,{sx:{p:2},children:m.jsx(Vo,{context:t,error:u})}):l?m.jsx(Hc,{result:h,maxHeight:r,maxResultSize:o,renderLogs:a.data.renderLogs,drill:s}):m.jsx(or,{text:n})}const ih=new Set(["bar_chart","line_chart","scatter_chart","shape_map","segment_map","point_map","big_value","sparkline","list","list_detail","dashboard","transpose","table","json","image","link","text"]),ah={value:`# big_value
22
22
  `},lh=/^#\(malloy\)[\s\S]*\bcalculation\b/;function ch(e){return e?e.kind==="measure"?!0:(e.annotations??[]).some(t=>typeof t?.value=="string"&&lh.test(t.value.trim())):!1}function uh(e){const t=e.schema?.fields;if(!Array.isArray(t)||t.length===0||!t.every(ch))return!1;const n=e.data;return n?n.kind==="record_cell"?!0:n.kind==="array_cell"&&Array.isArray(n.array_value)&&n.array_value.length===1:!1}function dh(e){for(const t of e){const n=t.trim();if(!n.startsWith("#")||n.startsWith("#(")||n.startsWith('#"'))continue;const r=n.slice(1).replace(/"(?:[^"\\]|\\.)*"/g,'""');for(const o of r.split(/[\s{}=.,[\]]+/))if(ih.has(o))return!0}return!1}function ph(e){let t;try{t=JSON.parse(e)}catch{return e}if(!t||typeof t!="object"||!uh(t))return e;const n=Array.isArray(t.annotations)?t.annotations:[],r=n.map(o=>o?.value).filter(o=>typeof o=="string");return dh(r)?e:JSON.stringify({...t,annotations:[ah,...n]})}const xi=20,fh={radius:"8px",padding:`${xi}px`};function mh(e,t=fh){return{"--malloy-render--font-family":e.font.family,"--malloy-render--table-font-size":`${e.font.size}px`,"--malloy-render--table-header-color":e.tableHeader,"--malloy-render--table-body-color":e.tableBody,"--malloy-render--table-border":e.border,"--malloy-render--table-pinned-border":e.pinnedBorder,"--malloy-render--tile-background":e.tile,"--publisher-dashboard-root":e.dashboardRoot,"--malloy-render--label-color":e.tileTitle,"--malloy-render--value-color":e.valueColor,"--publisher-drill-link":e.drillLink,"--publisher-dashboard-card-radius":t.radius,"--publisher-dashboard-card-padding":t.padding,"--publisher-dashboard-card-border":e.cardBorder}}function Uc({borderless:e=!1,sx:t,children:n}){const{theme:r}=Ge.usePublisherTheme();return m.jsx(re.Paper,{elevation:0,sx:[{border:e?"none":r.cardBorder,borderRadius:e?0:1,background:e?"none":r.tile,overflow:"hidden",minWidth:0,minHeight:120,p:e?"12px 0":`${xi}px`},...Array.isArray(t)?t:[t]],children:n})}function Yc({title:e,subtitle:t,tooltip:n,action:r}){const{theme:o}=Ge.usePublisherTheme();return m.jsxs(re.Box,{sx:{pb:1.5,display:"flex",alignItems:"flex-start",gap:1},children:[m.jsxs(re.Box,{sx:{minWidth:0,flex:1},children:[m.jsx(re.Typography,{variant:"subtitle2",sx:{fontWeight:500,color:o.tileTitle,fontFamily:o.font.family},title:n,children:e}),t!==void 0&&m.jsx(re.Typography,{variant:"caption",sx:{display:"block",color:o.tileTitle,fontFamily:o.font.family,opacity:.8},children:t})]}),r]})}function Ws(e){const t=e.split("->").at(-1)?.trim()??e;return/^[A-Za-z_][\w-]*$/.test(t)?li(t):e}function _s({environmentName:e,packageName:t,versionId:n,modelPath:r,queryName:o,tile:s,label:i,subtitle:a,borderless:l,givens:c,declaredTypes:u,givenNames:d,height:h,maxResultSize:b,drill:p,onExplore:g}){const{theme:y}=Ge.usePublisherTheme(),C=bi({environmentName:e,packageName:t,modelPath:r,versionId:n,queryName:o,query:s!==void 0?`run: ${s}`:void 0,givens:qr(c,u,d)});return m.jsxs(Uc,{borderless:l,sx:{"& .publisher-tile-explore":{opacity:0,transition:"opacity 120ms"},"&:hover .publisher-tile-explore, & .publisher-tile-explore:focus-visible":{opacity:1}},children:[s!==void 0&&m.jsx(Yc,{title:i??Ws(s),subtitle:a,tooltip:s,action:g&&m.jsx(re.Tooltip,{title:"Explore from here",children:m.jsx(re.IconButton,{className:"publisher-tile-explore",size:"small","aria-label":`Explore ${i??Ws(s)}`,onClick:g,sx:{mt:-.5,mr:-.5,color:y.tileTitle},children:m.jsx(Gm,{fontSize:"small"})})})}),m.jsx(vi,{state:C,context:s??o??r,maxHeight:h,maxResultSize:b,drill:p,transform:s!==void 0?ph:void 0})]})}const Zr=e=>{const t=new URL(e),n={};if(t.protocol!=="publisher:")throw new Error(`Failed to parse resource URI: ${e}`);const r=(t.hostname+t.pathname).split("/");for(let o=0;o<r.length;o+=2){const s=r[o];s==="environments"?n.environmentName=decodeURI(r[o+1])||void 0:s==="packages"?n.packageName=decodeURI(r[o+1])||void 0:s==="connections"?n.connectionName=decodeURI(r[o+1])||void 0:s==="models"&&(n.modelPath=decodeURI(r.slice(o+1).join("/"))||void 0)}if(n.versionId=t.searchParams.get("versionId")||void 0,!n.environmentName)throw new Error(`Failed to parse resource URI: ${e}`);return n},Gc=e=>{if(!e.environmentName)throw new Error(`Failed to encode resource URI, missing environment name: ${e}`);let t=`publisher://environments/${e.environmentName}`;return e.packageName&&(t+=`/packages/${e.packageName}`),e.connectionName&&(t+=`/connections/${e.connectionName}`),e.modelPath&&(t+=`/models/${e.modelPath}`),e.packageName&&e.versionId&&(t+=`?versionId=${e.versionId}`),t},hh=/^(https?|mailto|tel):/i,gh=/^[a-z][a-z0-9+.-]*:/i;function yh({href:e,title:t,children:n,context:r}){const o=!!e&&gh.test(e),s=!!e&&!o&&!e.startsWith("/")&&!e.startsWith("#");if(!e||!s||!r){const d=o&&!hh.test(e??"");return m.jsx("a",{href:d?void 0:e,title:t,...o?{target:"_blank",rel:"noopener noreferrer"}:{},children:n})}const i=r.sourcePath&&r.sourcePath.includes("/")?r.sourcePath.slice(0,r.sourcePath.lastIndexOf("/")+1):"",a=new URL(e,`https://malloy.invalid/${i}`),l=a.pathname.slice(1)+a.search+a.hash,c=`/${r.environmentName}/${r.packageName}/${l}`,{onNavigate:u}=r;return m.jsx("a",{href:c,title:t,onClick:u?d=>{d.preventDefault(),u(c,d)}:void 0,children:n})}const bh={document:{"& h1, & h2, & h3, & h4, & h5, & h6":{fontWeight:600,color:"text.primary",mb:1,mt:2},"& h1":{fontSize:"28px"},"& h2":{fontSize:"24px"},"& h3":{fontSize:"20px"},"& p, & ul, & ol":{color:"text.primary",lineHeight:1.7,mb:1,fontSize:"16px"},"& li":{mb:.5}},caption:{color:"text.secondary",typography:"body2","& > :first-of-type":{mt:0},"& > :last-child":{mb:0},"& h1, & h2, & h3, & h4, & h5, & h6":{fontSize:"inherit",fontWeight:600,m:"0.5em 0 0.25em"},"& p":{m:"0.5em 0"},"& ul, & ol":{m:"0.5em 0",pl:3},"& code":{fontFamily:"monospace",fontSize:"0.9em"}}};function qc({children:e,variant:t="caption",links:n,sx:r}){return m.jsx(re.Box,{sx:[bh[t],...Array.isArray(r)?r:[r]],children:m.jsx(Ad,{options:{overrides:{a:{component:yh,props:{context:n}}}},children:e})})}const Ha={};function Kc(e,t){const n=v.useRef(Ha);return n.current===Ha&&(n.current=e(t)),n}const vh=[];function xh(e){v.useEffect(e,vh)}class Si{static create(){return new Si}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Ci(){const e=Kc(Si.create).current;return xh(e.disposeEffect),e}function wi(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function pr(e){return parseInt(v.version,10)>=19?e?.props?.ref||null:e?.ref||null}function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(null,arguments)}function ke(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Hs(e,t){return Hs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Hs(e,t)}function Pi(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Hs(e,t)}function Sh(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Ch(e,t){e.classList?e.classList.add(t):Sh(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Ua(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function wh(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Ua(e.className,t):e.setAttribute("class",Ua(e.className&&e.className.baseVal||"",t))}const Ya={disabled:!1},Eo=ie.createContext(null);var Qc=function(t){return t.scrollTop},Ir="unmounted",kn="exited",Mn="entering",Kn="entered",Us="exiting",Ht=(function(e){Pi(t,e);function t(r,o){var s;s=e.call(this,r,o)||this;var i=o,a=i&&!i.isMounting?r.enter:r.appear,l;return s.appearStatus=null,r.in?a?(l=kn,s.appearStatus=Mn):l=Kn:r.unmountOnExit||r.mountOnEnter?l=Ir:l=kn,s.state={status:l},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var i=o.in;return i&&s.status===Ir?{status:kn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var s=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==Mn&&i!==Kn&&(s=Mn):(i===Mn||i===Kn)&&(s=Us)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,s,i,a;return s=i=a=o,o!=null&&typeof o!="number"&&(s=o.exit,i=o.enter,a=o.appear!==void 0?o.appear:i),{exit:s,enter:i,appear:a}},n.updateStatus=function(o,s){if(o===void 0&&(o=!1),s!==null)if(this.cancelNextCallback(),s===Mn){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Mr.findDOMNode(this);i&&Qc(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===kn&&this.setState({status:Ir})},n.performEnter=function(o){var s=this,i=this.props.enter,a=this.context?this.context.isMounting:o,l=this.props.nodeRef?[a]:[Mr.findDOMNode(this),a],c=l[0],u=l[1],d=this.getTimeouts(),h=a?d.appear:d.enter;if(!o&&!i||Ya.disabled){this.safeSetState({status:Kn},function(){s.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Mn},function(){s.props.onEntering(c,u),s.onTransitionEnd(h,function(){s.safeSetState({status:Kn},function(){s.props.onEntered(c,u)})})})},n.performExit=function(){var o=this,s=this.props.exit,i=this.getTimeouts(),a=this.props.nodeRef?void 0:Mr.findDOMNode(this);if(!s||Ya.disabled){this.safeSetState({status:kn},function(){o.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Us},function(){o.props.onExiting(a),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:kn},function(){o.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,s){s=this.setNextCallback(s),this.setState(o,s)},n.setNextCallback=function(o){var s=this,i=!0;return this.nextCallback=function(a){i&&(i=!1,s.nextCallback=null,o(a))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,s){this.setNextCallback(s);var i=this.props.nodeRef?this.props.nodeRef.current:Mr.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(!i||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===Ir)return null;var s=this.props,i=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var a=ke(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ie.createElement(Eo.Provider,{value:null},typeof i=="function"?i(o,a):ie.cloneElement(ie.Children.only(i),a))},t})(ie.Component);Ht.contextType=Eo;Ht.propTypes={};function Gn(){}Ht.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Gn,onEntering:Gn,onEntered:Gn,onExit:Gn,onExiting:Gn,onExited:Gn};Ht.UNMOUNTED=Ir;Ht.EXITED=kn;Ht.ENTERING=Mn;Ht.ENTERED=Kn;Ht.EXITING=Us;var Ph=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Ch(t,r)})},Ts=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return wh(t,r)})},ki=(function(e){Pi(t,e);function t(){for(var r,o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return r=e.call.apply(e,[this].concat(s))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var c=r.resolveArguments(a,l),u=c[0],d=c[1];r.removeClasses(u,"exit"),r.addClass(u,d?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var c=r.resolveArguments(a,l),u=c[0],d=c[1],h=d?"appear":"enter";r.addClass(u,h,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var c=r.resolveArguments(a,l),u=c[0],d=c[1],h=d?"appear":"enter";r.removeClasses(u,h),r.addClass(u,h,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a),c=l[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a),c=l[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a),c=l[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,c=typeof l=="string",u=c&&l?l+"-":"",d=c?""+u+a:l[a],h=c?d+"-active":l[a+"Active"],b=c?d+"-done":l[a+"Done"];return{baseClassName:d,activeClassName:h,doneClassName:b}},r}var n=t.prototype;return n.addClass=function(o,s,i){var a=this.getClassNames(s)[i+"ClassName"],l=this.getClassNames("enter"),c=l.doneClassName;s==="appear"&&i==="done"&&c&&(a+=" "+c),i==="active"&&o&&Qc(o),a&&(this.appliedClasses[s][i]=a,Ph(o,a))},n.removeClasses=function(o,s){var i=this.appliedClasses[s],a=i.base,l=i.active,c=i.done;this.appliedClasses[s]={},a&&Ts(o,a),l&&Ts(o,l),c&&Ts(o,c)},n.render=function(){var o=this.props;o.classNames;var s=ke(o,["classNames"]);return ie.createElement(Ht,j({},s,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(ie.Component);ki.defaultProps={classNames:""};ki.propTypes={};function kh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mi(e,t){var n=function(s){return t&&ie.isValidElement(s)?t(s):s},r=Object.create(null);return e&&ie.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function Mh(e,t){e=e||{},t=t||{};function n(u){return u in t?t[u]:e[u]}var r=Object.create(null),o=[];for(var s in e)s in t?o.length&&(r[s]=o,o=[]):o.push(s);var i,a={};for(var l in t){if(r[l])for(i=0;i<r[l].length;i++){var c=r[l][i];a[r[l][i]]=n(c)}a[l]=n(l)}for(i=0;i<o.length;i++)a[o[i]]=n(o[i]);return a}function In(e,t,n){return n[t]!=null?n[t]:e.props[t]}function Dh(e,t){return Mi(e.children,function(n){return ie.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:In(n,"appear",e),enter:In(n,"enter",e),exit:In(n,"exit",e)})})}function Th(e,t,n){var r=Mi(e.children),o=Mh(t,r);return Object.keys(o).forEach(function(s){var i=o[s];if(ie.isValidElement(i)){var a=s in t,l=s in r,c=t[s],u=ie.isValidElement(c)&&!c.props.in;l&&(!a||u)?o[s]=ie.cloneElement(i,{onExited:n.bind(null,i),in:!0,exit:In(i,"exit",e),enter:In(i,"enter",e)}):!l&&a&&!u?o[s]=ie.cloneElement(i,{in:!1}):l&&a&&ie.isValidElement(c)&&(o[s]=ie.cloneElement(i,{onExited:n.bind(null,i),in:c.props.in,exit:In(i,"exit",e),enter:In(i,"enter",e)}))}}),o}var Ih=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Rh={component:"div",childFactory:function(t){return t}},Jr=(function(e){Pi(t,e);function t(r,o){var s;s=e.call(this,r,o)||this;var i=s.handleExited.bind(kh(s));return s.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},s}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,s){var i=s.children,a=s.handleExited,l=s.firstRender;return{children:l?Dh(o,a):Th(o,i,a),firstRender:!1}},n.handleExited=function(o,s){var i=Mi(this.props.children);o.key in i||(o.props.onExited&&o.props.onExited(s),this.mounted&&this.setState(function(a){var l=j({},a.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,s=o.component,i=o.childFactory,a=ke(o,["component","childFactory"]),l=this.state.contextValue,c=Ih(this.state.children).map(i);return delete a.appear,delete a.enter,delete a.exit,s===null?ie.createElement(Eo.Provider,{value:l},c):ie.createElement(Eo.Provider,{value:l},ie.createElement(s,a,c))},t})(ie.Component);Jr.propTypes={};Jr.defaultProps=Rh;const Xc=e=>e.scrollTop;function Ao(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}function Ys(e){return`scale(${e}, ${e**2})`}const Oh={entering:{opacity:1,transform:Ys(1)},entered:{opacity:1,transform:"none"}},Is=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Vr=v.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:s,easing:i,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:h,onExiting:b,style:p,timeout:g="auto",TransitionComponent:y=Ht,...C}=t,P=Ci(),S=v.useRef(),x=Fn(),T=v.useRef(null),M=Fe(T,pr(s),n),$=k=>w=>{if(k){const A=T.current;w===void 0?k(A):k(A,w)}},R=$(u),F=$((k,w)=>{Xc(k);const{duration:A,delay:N,easing:L}=Ao({style:p,timeout:g,easing:i},{mode:"enter"});let _;g==="auto"?(_=x.transitions.getAutoHeightDuration(k.clientHeight),S.current=_):_=A,k.style.transition=[x.transitions.create("opacity",{duration:_,delay:N}),x.transitions.create("transform",{duration:Is?_:_*.666,delay:N,easing:L})].join(","),l&&l(k,w)}),E=$(c),I=$(b),f=$(k=>{const{duration:w,delay:A,easing:N}=Ao({style:p,timeout:g,easing:i},{mode:"exit"});let L;g==="auto"?(L=x.transitions.getAutoHeightDuration(k.clientHeight),S.current=L):L=w,k.style.transition=[x.transitions.create("opacity",{duration:L,delay:A}),x.transitions.create("transform",{duration:Is?L:L*.666,delay:Is?A:A||L*.333,easing:N})].join(","),k.style.opacity=0,k.style.transform=Ys(.75),d&&d(k)}),O=$(h),D=k=>{g==="auto"&&P.start(S.current||0,k),r&&r(T.current,k)};return m.jsx(y,{appear:o,in:a,nodeRef:T,onEnter:F,onEntered:E,onEntering:R,onExit:f,onExited:O,onExiting:I,addEndListener:D,timeout:g==="auto"?null:g,...C,children:(k,{ownerState:w,...A})=>v.cloneElement(s,{style:{opacity:0,transform:Ys(.75),visibility:k==="exited"&&!a?"hidden":void 0,...Oh[k],...p,...s.props.style},ref:M,...A})})});Vr&&(Vr.muiSupportAuto=!0);function $h(e){return Se("MuiPaper",e)}be("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Eh=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,s={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return ve(s,$h,o)},Ah=W("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Re(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Ln=v.forwardRef(function(t,n){const r=Oe({props:t,name:"MuiPaper"}),o=Fn(),{className:s,component:i="div",elevation:a=1,square:l=!1,variant:c="elevation",...u}=r,d={...r,component:i,elevation:a,square:l,variant:c},h=Eh(d);return m.jsx(Ah,{as:i,ownerState:d,className:me(h.root,s),ref:n,...u,style:{...c==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[a],...o.vars&&{"--Paper-overlay":o.vars.overlays?.[a]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Ro("#fff",Bs(a))}, ${Ro("#fff",Bs(a))})`}},...u.style}})});function sr(e){return typeof e=="string"}function Zc(e,t,n){return e===void 0||sr(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Jo(e,t,n){return typeof e=="function"?e(t,n):e}function Ga(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Jc(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:s}=e;if(!t){const b=me(n?.className,s,o?.className,r?.className),p={...n?.style,...o?.style,...r?.style},g={...n,...o,...r};return b.length>0&&(g.className=b),Object.keys(p).length>0&&(g.style=p),{props:g,internalRef:void 0}}const i=wi({...o,...r}),a=Ga(r),l=Ga(o),c=t(i),u=me(c?.className,n?.className,s,o?.className,r?.className),d={...c?.style,...n?.style,...o?.style,...r?.style},h={...c,...n,...l,...a};return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}}function We(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:s,internalForwardedProps:i,shouldForwardComponentProp:a=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...h}=s,b=u[e]||r,p=Jo(d[e],o),{props:{component:g,...y},internalRef:C}=Jc({className:n,...l,externalForwardedProps:e==="root"?h:void 0,externalSlotProps:p}),P=Fe(C,p?.ref,t.ref),S=e==="root"?g||c:g,x=Zc(b,{...e==="root"&&!c&&!u[e]&&i,...e!=="root"&&!u[e]&&i,...y,...S&&!a&&{as:S},...S&&a&&{component:S},ref:P},o);return[b,x]}function eu(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Br(t.components[n].defaultProps,r)}function Fh({props:e,name:t,defaultTheme:n,themeId:r}){let o=Qf(n);return o=o[r]||o,eu({theme:o,name:t,props:e})}function He({props:e,name:t}){return Fh({props:e,name:t,defaultTheme:Xo,themeId:dr})}const tu=U.oneOfType([U.func,U.object]);function qa(e){try{return e.matches(":focus-visible")}catch{}return!1}class Fo{static create(){return new Fo}static use(){const t=Kc(Fo.create).current,[n,r]=v.useState(!1);return t.shouldMount=n,t.setShouldMount=r,v.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=Nh(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function Lh(){return Fo.use()}function Nh(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function jh(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:s,rippleSize:i,in:a,onExited:l,timeout:c}=e,[u,d]=v.useState(!1),h=me(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),b={width:i,height:i,top:-(i/2)+s,left:-(i/2)+o},p=me(n.child,u&&n.childLeaving,r&&n.childPulsate);return!a&&!u&&d(!0),v.useEffect(()=>{if(!a&&l!=null){const g=setTimeout(l,c);return()=>{clearTimeout(g)}}},[l,a,c]),m.jsx("span",{className:h,style:b,children:m.jsx("span",{className:p})})}const Ot=be("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Gs=550,Bh=80,Vh=Qe.keyframes`
23
23
  0% {
24
24
  transform: scale(0);
@@ -2,7 +2,7 @@ import { jsxs as le, Fragment as $n, jsx as v } from "react/jsx-runtime";
2
2
  import { Typography as It, Button as ir, Tooltip as hi, Dialog as gi, DialogTitle as yi, IconButton as Zt, DialogContent as bi, Stack as bt, DialogActions as ac, Menu as vd, ListSubheader as xd, MenuItem as An, Box as Ze, CircularProgress as lc, Paper as qs, Autocomplete as Sd, TextField as Jn, FormControl as ua, Slider as Cd, FormHelperText as da, FormControlLabel as wd, Checkbox as Pd, InputAdornment as kd, Alert as mo } from "@mui/material";
3
3
  import * as b from "react";
4
4
  import je, { useMemo as qe, useCallback as pt, useRef as Lr, useState as At, useEffect as ar, useId as Md, Suspense as Dd, lazy as Id, isValidElement as Mo, cloneElement as Do, Children as Td, useContext as cc, createContext as Rd } from "react";
5
- import { aF as hr, aH as zn, aS as $d, aT as uc, aU as Od, aV as dc, aW as Ed, aX as Ad, aE as pc } from "./ServerProvider-DgRFJ43L.es.js";
5
+ import { aF as hr, aH as zn, aS as $d, aT as uc, aU as Od, aV as dc, aW as Ed, aX as Ad, aE as pc } from "./ServerProvider-Boxrv6Ym.es.js";
6
6
  import { StringFilterExpression as vi, NumberFilterExpression as Xo, BooleanFilterExpression as Fd, isStringCondition as Ld, TemporalFilterExpression as Zo } from "@malloydata/malloy-filter";
7
7
  import { useQueries as Nd, useQuery as Bd, useMutation as Vd } from "@tanstack/react-query";
8
8
  import zd from "markdown-to-jsx";
@@ -4574,7 +4574,7 @@ function Ph({
4574
4574
  }) {
4575
4575
  return e === "container" ? n ?? Ch : t === void 0 || t <= 0 ? wh(n) : n === void 0 ? t : Math.min(n, t);
4576
4576
  }
4577
- const kh = Id(() => import("./RenderedResult-6UKAHaAj.es.js").then((e) => e.c));
4577
+ const kh = Id(() => import("./RenderedResult-BRgIgxWh.es.js").then((e) => e.c));
4578
4578
  function Mh({
4579
4579
  result: e,
4580
4580
  maxHeight: t,
@@ -1,4 +1,4 @@
1
- "use strict";var ge=Object.create;var le=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var ke=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var xe=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of we(r))!Re.call(e,o)&&o!==t&&le(e,o,{get:()=>r[o],enumerable:!(a=ve(r,o))||a.enumerable});return e};var G=(e,r,t)=>(t=e!=null?ge(ke(e)):{},xe(r||!e||!e.__esModule?le(t,"default",{value:e,enumerable:!0}):t,e));const I=require("react/jsx-runtime"),U=require("@mui/material"),p=require("react"),g=require("./Dashboard-FD3-Af-_.cjs.js"),X=require("./ServerProvider-BsjJvkML.cjs.js"),v="publisher-drill";function de(e,r){const t=new Set;let a;try{a=e.getMetadata()?.getAllFields()??[]}catch{return t}const o=new Set;for(const n of a)!n||r(n)||n.tag?.tag("hidden")===void 0&&o.add(n.tag?.text("label")??n.name);for(const n of a){if(!n||!r(n))continue;const l=n.tag?.text("label")??n.name;o.has(l)||t.add(l)}return t}function B(e){const r=/^\s*(\d+)/.exec(e.style?.gridColumn??"");return r?r[1]:void 0}function ce(e,r){if(r.size!==0)for(const t of e.querySelectorAll(".malloy-table")){const a=l=>l.closest(".malloy-table")===t,o=new Set;for(const l of t.querySelectorAll(".column-cell.th")){if(!a(l))continue;const s=(l.textContent??"").replace(/\u200b/g,"").trim(),y=B(l);y&&r.has(s)&&o.add(y)}if(o.size===0)continue;const n=new Set;for(const l of t.querySelectorAll(`.${v}[tabindex="0"]`)){if(!a(l))continue;const s=B(l);s&&(n.has(s)?l.tabIndex=-1:n.add(s))}for(const l of t.querySelectorAll(".column-cell.td")){if(!a(l))continue;const s=B(l),y=!l.querySelector(".value-null")&&(l.textContent??"").trim()!=="";if(s&&y&&o.has(s)&&!l.querySelector(".malloy-table")){if(l.classList.add(v),l.tabIndex===0)n.add(s);else{const h=n.has(s);h||n.add(s),l.tabIndex=h?-1:0}l.setAttribute("role","button")}}}}function Ce(e){const r=e.closest(".malloy-table"),t=B(e);return!r||!t?[]:Array.from(r.querySelectorAll(`.${v}`)).filter(a=>a.closest(".malloy-table")===r&&B(a)===t)}function ie(e,r){const t=Ce(e),a=t.indexOf(e);if(a===-1)return;const o=r==="first"?t[0]:r==="last"?t[t.length-1]:t[Math.min(Math.max(a+r,0),t.length-1)];if(o){for(const n of t)n.tabIndex=n===o?0:-1;return o}}function ue(e){return{background:e.dashboardRoot,tableBackground:e.tableBackground,tableHeaderColor:e.tableHeader,tableBodyColor:e.tableBody,tableBorder:e.border,tablePinnedBackground:e.tableHeaderBackground,tablePinnedBorder:e.pinnedBorder,tableFontSize:`${e.font.size}px`,fontFamily:e.font.family,mapColor:e.mapColor}}function he(e){const{foreground:r,axisFaint:t,font:a}=e,o={background:e.background,font:a.family,title:{color:r,font:a.family},axis:{labelColor:r,titleColor:r,domainColor:t,tickColor:t,gridColor:t,labelFont:a.family,titleFont:a.family},legend:{labelColor:r,titleColor:r,labelFont:a.family,titleFont:a.family},header:{labelColor:r,titleColor:r},range:{category:e.series}};return n=>o}function me(e){if(!e)return;const r=e.tag("theme");if(!r)return;const t={},a=r.tag("palette");if(a){const n={},l=a.textArray("series");l&&l.length>0&&(n.series=l);for(const s of X.PER_MODE_COLOR_KEYS){const y=a.tag(s);if(!y)continue;const h={},k=y.text("light"),E=y.text("dark");k&&(h.light=k),E&&(h.dark=E),Object.keys(h).length>0&&(n[s]=h)}Object.keys(n).length>0&&(t.palette=n)}const o=r.tag("font");if(o){const n={},l=o.text("family");l&&(n.family=l);const s=o.numeric("size");typeof s=="number"&&Number.isFinite(s)&&(n.size=s),Object.keys(n).length>0&&(t.font=n)}return Object.keys(t).length>0?t:void 0}const Ee=async(e,r)=>{if(typeof window>"u")throw new Error("MalloyRenderer can only be used in browser environment");const{MalloyRenderer:t}=await import("@malloydata/render");return new t({onClick:r,vegaConfigOverride:he(e),theme:ue(e),onError:o=>{console.error("Error rendering visualization:",typeof o,o)}}).createViz()};typeof window<"u"&&import("@malloydata/render");async function Se(e){if(!e||typeof e!="object")return;const r=e,t=[...Array.isArray(r.model_annotations)?r.model_annotations:[],...Array.isArray(r.source_annotations)?r.source_annotations:[],...Array.isArray(r.annotations)?r.annotations:[]].map(o=>typeof o?.value=="string"?o.value:void 0).filter(o=>!!o);if(t.length===0)return;let a;try{({parseAnnotation:a}=await import("@malloydata/malloy-tag"))}catch{return}try{const{tag:o}=a(t);return me(o)}catch(o){console.warn("Failed to parse # theme.* annotations; chart will render with the shell theme.",{error:o,lines:t});return}}function Ae(e,r,t){const a=g.buildTableCssVars(r,t);for(const[o,n]of Object.entries(a))e.style.setProperty(o,n)}const De=`
1
+ "use strict";var ge=Object.create;var le=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var ke=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var xe=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of we(r))!Re.call(e,o)&&o!==t&&le(e,o,{get:()=>r[o],enumerable:!(a=ve(r,o))||a.enumerable});return e};var G=(e,r,t)=>(t=e!=null?ge(ke(e)):{},xe(r||!e||!e.__esModule?le(t,"default",{value:e,enumerable:!0}):t,e));const I=require("react/jsx-runtime"),U=require("@mui/material"),p=require("react"),g=require("./Dashboard-ChyylkTD.cjs.js"),X=require("./ServerProvider-CXrOKD6g.cjs.js"),v="publisher-drill";function de(e,r){const t=new Set;let a;try{a=e.getMetadata()?.getAllFields()??[]}catch{return t}const o=new Set;for(const n of a)!n||r(n)||n.tag?.tag("hidden")===void 0&&o.add(n.tag?.text("label")??n.name);for(const n of a){if(!n||!r(n))continue;const l=n.tag?.text("label")??n.name;o.has(l)||t.add(l)}return t}function B(e){const r=/^\s*(\d+)/.exec(e.style?.gridColumn??"");return r?r[1]:void 0}function ce(e,r){if(r.size!==0)for(const t of e.querySelectorAll(".malloy-table")){const a=l=>l.closest(".malloy-table")===t,o=new Set;for(const l of t.querySelectorAll(".column-cell.th")){if(!a(l))continue;const s=(l.textContent??"").replace(/\u200b/g,"").trim(),y=B(l);y&&r.has(s)&&o.add(y)}if(o.size===0)continue;const n=new Set;for(const l of t.querySelectorAll(`.${v}[tabindex="0"]`)){if(!a(l))continue;const s=B(l);s&&(n.has(s)?l.tabIndex=-1:n.add(s))}for(const l of t.querySelectorAll(".column-cell.td")){if(!a(l))continue;const s=B(l),y=!l.querySelector(".value-null")&&(l.textContent??"").trim()!=="";if(s&&y&&o.has(s)&&!l.querySelector(".malloy-table")){if(l.classList.add(v),l.tabIndex===0)n.add(s);else{const h=n.has(s);h||n.add(s),l.tabIndex=h?-1:0}l.setAttribute("role","button")}}}}function Ce(e){const r=e.closest(".malloy-table"),t=B(e);return!r||!t?[]:Array.from(r.querySelectorAll(`.${v}`)).filter(a=>a.closest(".malloy-table")===r&&B(a)===t)}function ie(e,r){const t=Ce(e),a=t.indexOf(e);if(a===-1)return;const o=r==="first"?t[0]:r==="last"?t[t.length-1]:t[Math.min(Math.max(a+r,0),t.length-1)];if(o){for(const n of t)n.tabIndex=n===o?0:-1;return o}}function ue(e){return{background:e.dashboardRoot,tableBackground:e.tableBackground,tableHeaderColor:e.tableHeader,tableBodyColor:e.tableBody,tableBorder:e.border,tablePinnedBackground:e.tableHeaderBackground,tablePinnedBorder:e.pinnedBorder,tableFontSize:`${e.font.size}px`,fontFamily:e.font.family,mapColor:e.mapColor}}function he(e){const{foreground:r,axisFaint:t,font:a}=e,o={background:e.background,font:a.family,title:{color:r,font:a.family},axis:{labelColor:r,titleColor:r,domainColor:t,tickColor:t,gridColor:t,labelFont:a.family,titleFont:a.family},legend:{labelColor:r,titleColor:r,labelFont:a.family,titleFont:a.family},header:{labelColor:r,titleColor:r},range:{category:e.series}};return n=>o}function me(e){if(!e)return;const r=e.tag("theme");if(!r)return;const t={},a=r.tag("palette");if(a){const n={},l=a.textArray("series");l&&l.length>0&&(n.series=l);for(const s of X.PER_MODE_COLOR_KEYS){const y=a.tag(s);if(!y)continue;const h={},k=y.text("light"),E=y.text("dark");k&&(h.light=k),E&&(h.dark=E),Object.keys(h).length>0&&(n[s]=h)}Object.keys(n).length>0&&(t.palette=n)}const o=r.tag("font");if(o){const n={},l=o.text("family");l&&(n.family=l);const s=o.numeric("size");typeof s=="number"&&Number.isFinite(s)&&(n.size=s),Object.keys(n).length>0&&(t.font=n)}return Object.keys(t).length>0?t:void 0}const Ee=async(e,r)=>{if(typeof window>"u")throw new Error("MalloyRenderer can only be used in browser environment");const{MalloyRenderer:t}=await import("@malloydata/render");return new t({onClick:r,vegaConfigOverride:he(e),theme:ue(e),onError:o=>{console.error("Error rendering visualization:",typeof o,o)}}).createViz()};typeof window<"u"&&import("@malloydata/render");async function Se(e){if(!e||typeof e!="object")return;const r=e,t=[...Array.isArray(r.model_annotations)?r.model_annotations:[],...Array.isArray(r.source_annotations)?r.source_annotations:[],...Array.isArray(r.annotations)?r.annotations:[]].map(o=>typeof o?.value=="string"?o.value:void 0).filter(o=>!!o);if(t.length===0)return;let a;try{({parseAnnotation:a}=await import("@malloydata/malloy-tag"))}catch{return}try{const{tag:o}=a(t);return me(o)}catch(o){console.warn("Failed to parse # theme.* annotations; chart will render with the shell theme.",{error:o,lines:t});return}}function Ae(e,r,t){const a=g.buildTableCssVars(r,t);for(const[o,n]of Object.entries(a))e.style.setProperty(o,n)}const De=`
2
2
  /* Card geometry, through the renderer's OWN theme vars rather than over the top
3
3
  of them. It declares --malloy-theme--dashboard-* on .malloy-render itself and
4
4
  passes each through to the --malloy-render--* the card CSS reads, so a value
@@ -1,8 +1,8 @@
1
1
  import { jsx as I } from "react/jsx-runtime";
2
2
  import { Box as oe, useTheme as ce } from "@mui/material";
3
3
  import { Suspense as ue, useRef as z, useCallback as he, useMemo as me, useEffect as be, useLayoutEffect as fe } from "react";
4
- import { D as ye, r as K, b as pe, a as ge, m as ve, c as we, d as ae } from "./Dashboard-DnqWRijB.es.js";
5
- import { aG as ke, aH as Ce, aI as xe } from "./ServerProvider-DgRFJ43L.es.js";
4
+ import { D as ye, r as K, b as pe, a as ge, m as ve, c as we, d as ae } from "./Dashboard-H1kJlDFo.es.js";
5
+ import { aG as ke, aH as Ce, aI as xe } from "./ServerProvider-Boxrv6Ym.es.js";
6
6
  const g = "publisher-drill";
7
7
  function Re(e, r) {
8
8
  const t = /* @__PURE__ */ new Set();