@malloy-publisher/sdk 0.5.1 → 0.7.0

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.
@@ -2,7 +2,7 @@ import { jsxs as ae, Fragment as $n, jsx as v } from "react/jsx-runtime";
2
2
  import { Typography as It, Button as rr, Tooltip as fi, Dialog as mi, DialogTitle as hi, IconButton as on, DialogContent as gi, Stack as bt, DialogActions as oc, Menu as dd, ListSubheader as pd, MenuItem as wo, Autocomplete as fd, TextField as Rr, CircularProgress as sc, FormControl as la, Box as et, Slider as md, FormHelperText as ca, FormControlLabel as hd, Checkbox as gd, InputAdornment as yd, Paper as Gs, Alert as po } from "@mui/material";
3
3
  import * as b from "react";
4
4
  import Ke, { useId as bd, useMemo as ot, useCallback as pt, useRef as Ar, useState as At, useEffect as or, isValidElement as Po, cloneElement as ko, Children as vd, Suspense as xd, lazy as Sd, useContext as ic, createContext as Cd } from "react";
5
- import { aE as Vn, u as pr, g as ac, aP as wd, aQ as lc, aR as Pd, aS as cc, aT as kd, aU as Md } from "./ServerProvider-IzXlqSVe.es.js";
5
+ import { aE as Vn, u as pr, g as ac, aP as wd, aQ as lc, aR as Pd, aS as cc, aT as kd, aU as Md } from "./ServerProvider-AsUiy22k.es.js";
6
6
  import { StringFilterExpression as yi, NumberFilterExpression as Qo, isStringCondition as Dd, TemporalFilterExpression as Xo } from "@malloydata/malloy-filter";
7
7
  import { useQueries as Id, useQuery as Td, useMutation as Rd } from "@tanstack/react-query";
8
8
  import $d from "markdown-to-jsx";
@@ -21717,7 +21717,7 @@ function SP(e) {
21717
21717
  `)
21718
21718
  };
21719
21719
  }
21720
- const CP = Sd(() => import("./RenderedResult-CTD2Ej2S.es.js").then((e) => e.c));
21720
+ const CP = Sd(() => import("./RenderedResult-CYyhQekT.es.js").then((e) => e.c));
21721
21721
  function wP({
21722
21722
  result: e,
21723
21723
  maxHeight: t,
@@ -1,4 +1,4 @@
1
- "use strict";var xd=Object.create;var na=Object.defineProperty;var Sd=Object.getOwnPropertyDescriptor;var Cd=Object.getOwnPropertyNames;var wd=Object.getPrototypeOf,Pd=Object.prototype.hasOwnProperty;var kd=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Cd(t))!Pd.call(e,o)&&o!==n&&na(e,o,{get:()=>t[o],enumerable:!(r=Sd(t,o))||r.enumerable});return e};var ra=(e,t,n)=>(n=e!=null?xd(wd(e)):{},kd(t||!e||!e.__esModule?na(n,"default",{value:e,enumerable:!0}):n,e));const f=require("react/jsx-runtime"),se=require("@mui/material"),ie=require("react"),Ge=require("./ServerProvider-CC9ein5-.cjs.js"),Lt=require("@malloydata/malloy-filter"),ti=require("@tanstack/react-query"),Md=require("markdown-to-jsx"),Dd=require("@mui/icons-material"),Qe=require("@mui/system"),kr=require("react-dom"),Id=require("@emotion/react"),Td=require("@emotion/styled");function ql(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=ql(ie),Rd=ql(kr);function jo({error:e,context:t}){const n=e.data?.message||"Unknown Error";return f.jsxs(f.Fragment,{children:[t&&f.jsx(se.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:t}),f.jsx("pre",{style:{whiteSpace:"pre-wrap",color:"red",padding:"10px",margin:"auto"},children:n})]})}const oa=e=>e,Od=()=>{let e=oa;return{configure(t){e=t},generate(t){return e(t)},reset(){e=oa}}},Kl=Od();function tn(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function ue(e){if(typeof e!="string")throw new Error(tn(7));return e.charAt(0).toUpperCase()+e.slice(1)}function sa(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $d(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 bs={exports:{}},vs,ia;function Ed(){if(ia)return vs;ia=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return vs=e,vs}var xs,aa;function Ad(){if(aa)return xs;aa=1;var e=Ed();function t(){}function n(){}return n.resetWarningCache=t,xs=function(){function r(i,a,l,c,u,d){if(d!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},xs}var la;function Fd(){return la||(la=1,bs.exports=Ad()()),bs.exports}var Ld=Fd();const U=sn(Ld);function Ql(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ql(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function me(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ql(e))&&(r&&(r+=" "),r+=t);return r}function ve(e,t,n=void 0){const r={};for(const o in e){const s=e[o];let i="",a=!0;for(let l=0;l<s.length;l+=1){const c=s[l];c&&(i+=(a===!0?"":" ")+t(c),a=!1,n&&n[c]&&(i+=" "+n[c]))}r[o]=i}return r}var Ss={exports:{}},ze={};/**
1
+ "use strict";var xd=Object.create;var na=Object.defineProperty;var Sd=Object.getOwnPropertyDescriptor;var Cd=Object.getOwnPropertyNames;var wd=Object.getPrototypeOf,Pd=Object.prototype.hasOwnProperty;var kd=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Cd(t))!Pd.call(e,o)&&o!==n&&na(e,o,{get:()=>t[o],enumerable:!(r=Sd(t,o))||r.enumerable});return e};var ra=(e,t,n)=>(n=e!=null?xd(wd(e)):{},kd(t||!e||!e.__esModule?na(n,"default",{value:e,enumerable:!0}):n,e));const f=require("react/jsx-runtime"),se=require("@mui/material"),ie=require("react"),Ge=require("./ServerProvider-CuYLH_Yi.cjs.js"),Lt=require("@malloydata/malloy-filter"),ti=require("@tanstack/react-query"),Md=require("markdown-to-jsx"),Dd=require("@mui/icons-material"),Qe=require("@mui/system"),kr=require("react-dom"),Id=require("@emotion/react"),Td=require("@emotion/styled");function ql(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=ql(ie),Rd=ql(kr);function jo({error:e,context:t}){const n=e.data?.message||"Unknown Error";return f.jsxs(f.Fragment,{children:[t&&f.jsx(se.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:t}),f.jsx("pre",{style:{whiteSpace:"pre-wrap",color:"red",padding:"10px",margin:"auto"},children:n})]})}const oa=e=>e,Od=()=>{let e=oa;return{configure(t){e=t},generate(t){return e(t)},reset(){e=oa}}},Kl=Od();function tn(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function ue(e){if(typeof e!="string")throw new Error(tn(7));return e.charAt(0).toUpperCase()+e.slice(1)}function sa(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $d(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 bs={exports:{}},vs,ia;function Ed(){if(ia)return vs;ia=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return vs=e,vs}var xs,aa;function Ad(){if(aa)return xs;aa=1;var e=Ed();function t(){}function n(){}return n.resetWarningCache=t,xs=function(){function r(i,a,l,c,u,d){if(d!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},xs}var la;function Fd(){return la||(la=1,bs.exports=Ad()()),bs.exports}var Ld=Fd();const U=sn(Ld);function Ql(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ql(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function me(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ql(e))&&(r&&(r+=" "),r+=t);return r}function ve(e,t,n=void 0){const r={};for(const o in e){const s=e[o];let i="",a=!0;for(let l=0;l<s.length;l+=1){const c=s[l];c&&(i+=(a===!0?"":" ")+t(c),a=!1,n&&n[c]&&(i+=" "+n[c]))}r[o]=i}return r}var Ss={exports:{}},ze={};/**
2
2
  * @license React
3
3
  * react-is.production.js
4
4
  *
@@ -130,5 +130,5 @@ export default theme;`}function Da(e){return typeof e=="number"?`${(e*100).toFix
130
130
  `));u&&R.current&&R.current.getSectionContent(I.startIndex).focus()},[]),{interactions:k,returnedValue:{autoFocus:u,readOnly:n,focused:c??O,sectionListRef:E,onBlur:W,onClick:A,onFocus:Y,onInput:L,onPaste:N,enableAccessibleFieldDOMStructure:!0,elements:G,tabIndex:g===0?-1:0,contentEditable:z,value:re,onChange:oe,areAllSectionsEmpty:M}}},Qn=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),$0=(e,t,n)=>{let r=0,o=n?1:0;const s=[];for(let i=0;i<e.length;i+=1){const a=e[i],l=vi(a,n?"input-rtl":"input-ltr",t),c=`${a.startSeparator}${l}${a.endSeparator}`,u=Qn(c).length,d=c.length,h=Qn(l),b=o+(h===""?0:l.indexOf(h[0]))+a.startSeparator.length,p=b+h.length;s.push(j({},a,{start:r,end:r+u,startInInput:b,endInInput:p})),r+=u,o+=d}return s},E0=e=>{const t=Wt(),n=v.useRef(void 0),r=v.useRef(void 0),{forwardedProps:{onFocus:o,onClick:s,onPaste:i,onBlur:a,inputRef:l,placeholder:c},internalProps:{readOnly:u=!1,disabled:d=!1},parsedSelectedSections:h,activeSectionIndex:b,state:p,fieldValueManager:g,valueManager:y,applyCharacterEditing:S,resetCharacterQuery:P,updateSectionValue:C,updateValueFromValueStr:x,clearActiveSection:I,clearValue:M,setTempAndroidValueStr:$,setSelectedSections:R,getSectionsFromValue:E,areAllSectionsEmpty:F,localizedDigits:T}=e,m=v.useRef(null),O=Fe(l,m),D=v.useMemo(()=>$0(p.sections,T,t),[p.sections,T,t]),k=v.useMemo(()=>({syncSelectionToDOM:()=>{if(!m.current)return;if(h==null){m.current.scrollLeft&&(m.current.scrollLeft=0);return}if(m.current!==gt(document))return;const ne=m.current.scrollTop;if(h==="all")m.current.select();else{const K=D[h],z=K.type==="empty"?K.startInInput-K.startSeparator.length:K.startInInput,G=K.type==="empty"?K.endInInput+K.endSeparator.length:K.endInInput;(z!==m.current.selectionStart||G!==m.current.selectionEnd)&&m.current===gt(document)&&m.current.setSelectionRange(z,G),clearTimeout(r.current),r.current=setTimeout(()=>{m.current&&m.current===gt(document)&&m.current.selectionStart===m.current.selectionEnd&&(m.current.selectionStart!==z||m.current.selectionEnd!==G)&&k.syncSelectionToDOM()})}m.current.scrollTop=ne},getActiveSectionIndexFromDOM:()=>{const ne=m.current.selectionStart??0,K=m.current.selectionEnd??0;if(ne===0&&K===0)return null;const z=ne<=D[0].startInInput?1:D.findIndex(G=>G.startInInput-G.startSeparator.length>ne);return z===-1?D.length-1:z-1},focusField:(ne=0)=>{gt(document)!==m.current&&(m.current?.focus(),R(ne))},setSelectedSections:ne=>R(ne),isFieldFocused:()=>m.current===gt(document)}),[m,h,D,R]),w=()=>{const ne=m.current.selectionStart??0;let K;ne<=D[0].startInInput||ne>=D[D.length-1].endInInput?K=1:K=D.findIndex(G=>G.startInInput-G.startSeparator.length>ne);const z=K===-1?D.length-1:K-1;R(z)},A=fe((...ne)=>{o?.(...ne);const K=m.current;clearTimeout(n.current),n.current=setTimeout(()=>{!K||K!==m.current||b==null&&(K.value.length&&Number(K.selectionEnd)-Number(K.selectionStart)===K.value.length?R("all"):w())})}),L=fe((ne,...K)=>{ne.isDefaultPrevented()||(s?.(ne,...K),w())}),N=fe(ne=>{if(i?.(ne),ne.preventDefault(),u||d)return;const K=ne.clipboardData.getData("text");if(typeof h=="number"){const z=p.sections[h],G=/^[a-zA-Z]+$/.test(K),oe=/^[0-9]+$/.test(K),re=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(K);if(z.contentType==="letter"&&G||z.contentType==="digit"&&oe||z.contentType==="digit-with-letter"&&re){P(),C({activeSection:z,newSectionValue:K,shouldGoToNextSection:!0});return}if(G||oe)return}P(),x(K)}),Y=fe((...ne)=>{a?.(...ne),R(null)}),W=fe(ne=>{if(u)return;const K=ne.target.value;if(K===""){P(),M();return}const z=ne.nativeEvent.data,G=z&&z.length>1,oe=G?z:K,re=Qn(oe);if(h==="all"&&R(b),b==null||G){x(G?z:re);return}let B;if(h==="all"&&re.length===1)B=re;else{const ee=Qn(g.getV6InputValueFromSections(D,T,t));let le=-1,te=-1;for(let de=0;de<ee.length;de+=1)le===-1&&ee[de]!==re[de]&&(le=de),te===-1&&ee[ee.length-de-1]!==re[re.length-de-1]&&(te=de);const pe=D[b];if(le<pe.start||ee.length-te-1>pe.end)return;const ye=re.length-ee.length+pe.end-Qn(pe.endSeparator||"").length;B=re.slice(pe.start+Qn(pe.startSeparator||"").length,ye)}if(B.length===0){Lh()&&$(oe),P(),I();return}S({keyPressed:B,sectionIndex:b})}),J=v.useMemo(()=>c!==void 0?c:g.getV6InputValueFromSections(E(y.emptyValue),T,t),[c,g,E,y.emptyValue,T,t]),ce=v.useMemo(()=>p.tempValueStrAndroid??g.getV6InputValueFromSections(p.sections,T,t),[p.sections,g,p.tempValueStrAndroid,T,t]);v.useEffect(()=>(m.current&&m.current===gt(document)&&R("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const ae=v.useMemo(()=>b==null||p.sections[b].contentType==="letter"?"text":"numeric",[b,p.sections]),q=!(m.current&&m.current===gt(document))&&F;return{interactions:k,returnedValue:{readOnly:u,onBlur:Y,onClick:L,onFocus:A,onPaste:N,inputRef:O,enableAccessibleFieldDOMStructure:!1,placeholder:J,inputMode:ae,autoComplete:"off",value:q?"":ce,onChange:W}}},A0=e=>{const t=Ue(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:s=!1,disabled:i=!1,readOnly:a=!1},forwardedProps:{onKeyDown:l,error:c,clearable:u,onClear:d},fieldValueManager:h,valueManager:b,validator:p}=e,g=Wt(),y=I0(e),{state:S,activeSectionIndex:P,parsedSelectedSections:C,setSelectedSections:x,clearValue:I,clearActiveSection:M,updateSectionValue:$,setTempAndroidValueStr:R,sectionsValueBoundaries:E,localizedDigits:F,timezone:T}=y,m=R0({sections:S.sections,updateSectionValue:$,sectionsValueBoundaries:E,localizedDigits:F,setTempAndroidValueStr:R,timezone:T}),{resetCharacterQuery:O}=m,D=b.areValuesEqual(t,S.value,b.emptyValue),k=s?O0:E0,w=v.useMemo(()=>Nh(S.sections,g&&!s),[S.sections,g,s]),{returnedValue:A,interactions:L}=k(j({},e,y,m,{areAllSectionsEmpty:D,sectionOrder:w})),N=fe(V=>{if(l?.(V),!i)switch(!0){case((V.ctrlKey||V.metaKey)&&String.fromCharCode(V.keyCode)==="A"&&!V.shiftKey&&!V.altKey):{V.preventDefault(),x("all");break}case V.key==="ArrowRight":{if(V.preventDefault(),C==null)x(w.startIndex);else if(C==="all")x(w.endIndex);else{const q=w.neighbors[C].rightIndex;q!==null&&x(q)}break}case V.key==="ArrowLeft":{if(V.preventDefault(),C==null)x(w.endIndex);else if(C==="all")x(w.startIndex);else{const q=w.neighbors[C].leftIndex;q!==null&&x(q)}break}case V.key==="Delete":{if(V.preventDefault(),a)break;C==null||C==="all"?I():M(),O();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(V.key):{if(V.preventDefault(),a||P==null)break;C==="all"&&x(P);const q=S.sections[P],ne=h.getActiveDateManager(t,S,q),K=Th(t,T,q,V.key,E,F,ne.date,{minutesStep:o});$({activeSection:q,newSectionValue:K,shouldGoToNextSection:!1});break}}});st(()=>{L.syncSelectionToDOM()});const{hasValidationError:Y}=Zc({props:n,validator:p,timezone:T,value:S.value,onError:n.onError}),W=v.useMemo(()=>c!==void 0?c:Y,[Y,c]);v.useEffect(()=>{!W&&P==null&&O()},[S.referenceValue,P,W]),v.useEffect(()=>{S.tempValueStrAndroid!=null&&P!=null&&(O(),M())},[S.sections]),v.useImperativeHandle(r,()=>({getSections:()=>S.sections,getActiveSectionIndex:L.getActiveSectionIndexFromDOM,setSelectedSections:L.setSelectedSections,focusField:L.focusField,isFieldFocused:L.isFieldFocused}));const J=fe((V,...q)=>{V.preventDefault(),d?.(V,...q),I(),L.isFieldFocused()?x(w.startIndex):L.focusField(0)}),ce={onKeyDown:N,onClear:J,error:W,clearable:!!(u&&!D&&!a&&!i)},ae={disabled:i,readOnly:a};return j({},e.forwardedProps,ce,ae,A)},F0=["clearable","onClear","InputProps","sx","slots","slotProps"],L0=["ownerState"],N0=e=>{const t=an(),{clearable:n,onClear:r,InputProps:o,sx:s,slots:i,slotProps:a}=e,l=ke(e,F0),c=i?.clearButton??Nn,u=Ae({elementType:c,externalSlotProps:a?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),d=ke(u,L0),h=i?.clearIcon??Yv,b=Ae({elementType:h,externalSlotProps:a?.clearIcon,ownerState:{}});return j({},l,{InputProps:j({},o,{endAdornment:f.jsxs(v.Fragment,{children:[n&&f.jsx(Jc,{position:"end",sx:{marginRight:o?.endAdornment?-1:-1.5},children:f.jsx(c,j({},d,{onClick:r,children:f.jsx(h,j({fontSize:"small"},b))}))}),o?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(s)?s:[s]]})},j0=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],B0=(e,t)=>v.useMemo(()=>{const n=j({},e),r={},o=s=>{n.hasOwnProperty(s)&&(r[s]=n[s],delete n[s])};return j0.forEach(o),Qc.forEach(o),{forwardedProps:n,internalProps:r}},[e,t]),V0=e=>{const t=Ue(),n=Xr();return j({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??t.formats.keyboardDate,minDate:Et(t,e.minDate,n.minDate),maxDate:Et(t,e.maxDate,n.maxDate)})},z0=e=>{const t=V0(e),{forwardedProps:n,internalProps:r}=B0(t,"date");return A0({forwardedProps:n,internalProps:r,valueManager:Kt,fieldValueManager:zh,validator:Zr,valueType:"date"})};function W0(e){return Se("MuiPickersTextField",e)}be("MuiPickersTextField",["root","focused","disabled","error","required"]);function _0(e){return Se("MuiPickersInputBase",e)}const er=be("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function H0(e){return Se("MuiPickersSectionList",e)}const Cr=be("MuiPickersSectionList",["root","section","sectionContent"]),U0=["slots","slotProps","elements","sectionListRef"],$u=_("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),Eu=_("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),Au=_("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),Fu=_("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),Y0=e=>{const{classes:t}=e;return ve({root:["root"],section:["section"],sectionContent:["sectionContent"]},H0,t)};function G0(e){const{slots:t,slotProps:n,element:r,classes:o}=e,s=t?.section??Eu,i=Ae({elementType:s,externalSlotProps:n?.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),a=t?.sectionContent??Fu,l=Ae({elementType:a,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),c=t?.sectionSeparator??Au,u=Ae({elementType:c,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),d=Ae({elementType:c,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return f.jsxs(s,j({},i,{children:[f.jsx(c,j({},u)),f.jsx(a,j({},l)),f.jsx(c,j({},d))]}))}const q0=v.forwardRef(function(t,n){const r=He({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:s,elements:i,sectionListRef:a}=r,l=ke(r,U0),c=Y0(r),u=v.useRef(null),d=Fe(n,u),h=g=>{if(!u.current)throw new Error(`MUI X: Cannot call sectionListRef.${g} before the mount of the component.`);return u.current};v.useImperativeHandle(a,()=>({getRoot(){return h("getRoot")},getSectionContainer(g){return h("getSectionContainer").querySelector(`.${Cr.section}[data-sectionindex="${g}"]`)},getSectionContent(g){return h("getSectionContent").querySelector(`.${Cr.section}[data-sectionindex="${g}"] .${Cr.sectionContent}`)},getSectionIndexFromDOMElement(g){const y=h("getSectionIndexFromDOMElement");if(g==null||!y.contains(g))return null;let S=null;return g.classList.contains(Cr.section)?S=g:g.classList.contains(Cr.sectionContent)&&(S=g.parentElement),S==null?null:Number(S.dataset.sectionindex)}}));const b=o?.root??$u,p=Ae({elementType:b,externalSlotProps:s?.root,externalForwardedProps:l,additionalProps:{ref:d,suppressContentEditableWarning:!0},className:c.root,ownerState:{}});return f.jsx(b,j({},p,{children:p.contentEditable?i.map(({content:g,before:y,after:S})=>`${y.children}${g.children}${S.children}`).join(""):f.jsx(v.Fragment,{children:i.map((g,y)=>f.jsx(G0,{slots:o,slotProps:s,element:g,classes:c},y))})}))}),K0=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],Q0=e=>Math.round(e*1e5)/1e5,us=_("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>j({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${Q0(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),Ui=_($u,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:t,focused:n,filled:r,label:o})=>!t&&!n&&!r&&o==null,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),X0=_(Eu,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),Z0=_(Fu,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),J0=_(Au,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),eS=_("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(j({},hh)),tS=e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:s,readOnly:i,color:a,size:l,endAdornment:c,startAdornment:u}=e,d={root:["root",t&&!n&&"focused",n&&"disabled",i&&"readOnly",r&&"error",s&&"fullWidth",`color${ue(a)}`,l==="small"&&"inputSizeSmall",!!u&&"adornedStart",!!c&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return ve(d,_0,o)},Yi=v.forwardRef(function(t,n){const r=He({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:s,value:i,onChange:a,id:l,endAdornment:c,startAdornment:u,renderSuffix:d,slots:h,slotProps:b,contentEditable:p,tabIndex:g,onInput:y,onPaste:S,onKeyDown:P,name:C,readOnly:x,inputProps:I,inputRef:M,sectionListRef:$}=r,R=ke(r,K0),E=v.useRef(null),F=Fe(n,E),T=Fe(I?.ref,M),m=Wt(),O=Bt();if(!O)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const D=Y=>{if(O.disabled){Y.stopPropagation();return}O.onFocus?.(Y)};v.useEffect(()=>{O&&O.setAdornedStart(!!u)},[O,u]),v.useEffect(()=>{O&&(s?O.onEmpty():O.onFilled())},[O,s]);const k=j({},r,O,{isRtl:m}),w=tS(k),A=h?.root||us,L=Ae({elementType:A,externalSlotProps:b?.root,externalForwardedProps:R,additionalProps:{"aria-invalid":O.error,ref:F},className:w.root,ownerState:k}),N=h?.input||Ui;return f.jsxs(A,j({},L,{children:[u,f.jsx(q0,{sectionListRef:$,elements:o,contentEditable:p,tabIndex:g,className:w.sectionsContainer,onFocus:D,onBlur:O.onBlur,onInput:y,onPaste:S,onKeyDown:P,slots:{root:N,section:X0,sectionContent:Z0,sectionSeparator:J0},slotProps:{root:{ownerState:k},sectionContent:{className:er.sectionContent},sectionSeparator:({position:Y})=>({className:Y==="before"?er.sectionBefore:er.sectionAfter})}}),c,d?d(j({},O)):null,f.jsx(eS,j({name:C,className:w.input,value:i,onChange:a,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:x,required:O.required,disabled:O.disabled},I,{ref:T}))]}))});function nS(e){return Se("MuiPickersOutlinedInput",e)}const zt=j({},er,be("MuiPickersOutlinedInput",["root","notchedOutline","input"])),rS=["children","className","label","notched","shrink"],oS=_("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Ll=_("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),sS=_("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function iS(e){const{className:t,label:n}=e,r=ke(e,rS),o=n!=null&&n!=="",s=j({},e,{withLabel:o});return f.jsx(oS,j({"aria-hidden":!0,className:t},r,{ownerState:s,children:f.jsx(sS,{ownerState:s,children:o?f.jsx(Ll,{children:n}):f.jsx(Ll,{className:"notranslate",children:"​"})})}))}const aS=["label","autoFocus","ownerState","notched"],lS=_(us,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${zt.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${zt.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${zt.focused} .${zt.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${zt.disabled}`]:{[`& .${zt.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${zt.error} .${zt.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>(e.vars??e).palette[n]?.main??!1).map(n=>({props:{color:n},style:{[`&.${zt.focused}:not(.${zt.error}) .${zt.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),cS=_(Ui,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),uS=e=>{const{classes:t}=e,r=ve({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},nS,t);return j({},t,r)},Lu=v.forwardRef(function(t,n){const r=He({props:t,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:s,notched:i}=r,a=ke(r,aS),l=Bt(),c=j({},r,s,l,{color:l?.color||"primary"}),u=uS(c);return f.jsx(Yi,j({slots:{root:lS,input:cS},renderSuffix:d=>f.jsx(iS,{shrink:!!(i||d.adornedStart||d.focused||d.filled),notched:!!(i||d.adornedStart||d.focused||d.filled),className:u.notchedOutline,label:o!=null&&o!==""&&l?.required?f.jsxs(v.Fragment,{children:[o," ","*"]}):o,ownerState:c})},a,{label:o,classes:u,ref:n}))});Lu.muiName="Input";function dS(e){return Se("MuiPickersFilledInput",e)}const wn=j({},er,be("MuiPickersFilledInput",["root","underline","input"])),pS=["label","autoFocus","disableUnderline","ownerState"],fS=_(us,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Qe.shouldForwardProp(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${wn.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${wn.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s},variants:[...Object.keys((e.vars??e).palette).filter(i=>(e.vars??e).palette[i].main).map(i=>({props:{color:i,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[i]?.main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${wn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${wn.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${wn.disabled}, .${wn.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${wn.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:i})=>!!i,style:{paddingLeft:12}},{props:({endAdornment:i})=>!!i,style:{paddingRight:12}}]}}),mS=_(Ui,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),hS=e=>{const{classes:t,disableUnderline:n}=e,o=ve({root:["root",!n&&"underline"],input:["input"]},dS,t);return j({},t,o)},Nu=v.forwardRef(function(t,n){const r=He({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:s=!1,ownerState:i}=r,a=ke(r,pS),l=Bt(),c=j({},r,i,l,{color:l?.color||"primary"}),u=hS(c);return f.jsx(Yi,j({slots:{root:fS,input:mS},slotProps:{root:{disableUnderline:s}}},a,{label:o,classes:u,ref:n}))});Nu.muiName="Input";function gS(e){return Se("MuiPickersFilledInput",e)}const wr=j({},er,be("MuiPickersInput",["root","input"])),yS=["label","autoFocus","disableUnderline","ownerState"],bS=_(us,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(r=>(e.vars??e).palette[r].main).map(r=>({props:{color:r},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${wr.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${wr.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${wr.disabled}, .${wr.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${wr.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),vS=e=>{const{classes:t,disableUnderline:n}=e,o=ve({root:["root",!n&&"underline"],input:["input"]},gS,t);return j({},t,o)},ju=v.forwardRef(function(t,n){const r=He({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:s=!1,ownerState:i}=r,a=ke(r,yS),l=Bt(),c=j({},r,i,l,{disableUnderline:s,color:l?.color||"primary"}),u=vS(c);return f.jsx(Yi,j({slots:{root:bS}},a,{label:o,classes:u,ref:n}))});ju.muiName="Input";const xS=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],SS={standard:ju,filled:Nu,outlined:Lu},CS=_(Vi,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({maxWidth:"100%"}),wS=e=>{const{focused:t,disabled:n,classes:r,required:o}=e;return ve({root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]},W0,r)},PS=v.forwardRef(function(t,n){const r=He({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:s,className:i,color:a="primary",disabled:l=!1,error:c=!1,variant:u="outlined",required:d=!1,InputProps:h,inputProps:b,inputRef:p,sectionListRef:g,elements:y,areAllSectionsEmpty:S,onClick:P,onKeyDown:C,onKeyUp:x,onPaste:I,onInput:M,endAdornment:$,startAdornment:R,tabIndex:E,contentEditable:F,focused:T,value:m,onChange:O,fullWidth:D,id:k,name:w,helperText:A,FormHelperTextProps:L,label:N,InputLabelProps:Y}=r,W=ke(r,xS),J=v.useRef(null),ce=Fe(n,J),ae=_t(k),V=A&&ae?`${ae}-helper-text`:void 0,q=N&&ae?`${ae}-label`:void 0,ne=j({},r,{color:a,disabled:l,error:c,focused:T,required:d,variant:u}),K=wS(ne),z=SS[u];return f.jsxs(CS,j({className:me(K.root,i),ref:ce,focused:T,onFocus:o,onBlur:s,disabled:l,variant:u,error:c,color:a,fullWidth:D,required:d,ownerState:ne},W,{children:[f.jsx(Bi,j({htmlFor:ae,id:q},Y,{children:N})),f.jsx(z,j({elements:y,areAllSectionsEmpty:S,onClick:P,onKeyDown:C,onKeyUp:x,onInput:M,onPaste:I,endAdornment:$,startAdornment:R,tabIndex:E,contentEditable:F,value:m,onChange:O,id:ae,fullWidth:D,inputProps:b,inputRef:p,sectionListRef:g,label:N,name:w,role:"group","aria-labelledby":q,"aria-describedby":V,"aria-live":V?"polite":void 0},h)),A&&f.jsx(wu,j({id:V},L,{children:A}))]}))}),kS=["enableAccessibleFieldDOMStructure"],MS=["InputProps","readOnly"],DS=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],IS=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=ke(e,kS);if(t){const{InputProps:d,readOnly:h}=n,b=ke(n,MS);return j({},b,{InputProps:j({},d??{},{readOnly:h})})}const{onPaste:r,onKeyDown:o,inputMode:s,readOnly:i,InputProps:a,inputProps:l,inputRef:c}=n,u=ke(n,DS);return j({},u,{InputProps:j({},a??{},{readOnly:i}),inputProps:j({},l??{},{inputMode:s,onPaste:r,onKeyDown:o,ref:c})})},TS=["slots","slotProps","InputProps","inputProps"],Bu=v.forwardRef(function(t,n){const r=He({props:t,name:"MuiDateField"}),{slots:o,slotProps:s,InputProps:i,inputProps:a}=r,l=ke(r,TS),c=r,u=o?.textField??(t.enableAccessibleFieldDOMStructure?PS:Hi),d=Ae({elementType:u,externalSlotProps:s?.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:c});d.inputProps=j({},a,d.inputProps),d.InputProps=j({},i,d.InputProps);const h=z0(d),b=IS(h),p=N0(j({},b,{slots:o,slotProps:s}));return f.jsx(u,j({},p))}),Vu=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:s,disablePast:i,timezone:a})=>{const l=Ln();return v.useCallback(c=>Zr({adapter:l,value:c,timezone:a,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:s,disablePast:i}})!==null,[l,e,t,n,r,o,s,i,a])},RS=(e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return j({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const s=o.newTimezone;if(n.getTimezone(r.currentMonth)===s)return r;let i=n.setTimezone(r.currentMonth,s);return n.getMonth(i)!==n.getMonth(r.currentMonth)&&(i=n.setMonth(i,n.getMonth(r.currentMonth))),j({},r,{currentMonth:i})}case"finishMonthSwitchingAnimation":return j({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const s=o.focusedDay!=null&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return j({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:s&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:s?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},OS=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:s=!1,maxDate:i,minDate:a,onMonthChange:l,reduceAnimations:c,shouldDisableDate:u,timezone:d}=e,h=Ue(),b=v.useRef(RS(!!c,s,h)).current,p=v.useMemo(()=>Kt.getInitialReferenceValue({value:t,utils:h,timezone:d,props:e,referenceDate:n,granularity:Yt.day}),[n,d]),[g,y]=v.useReducer(b,{isMonthSwitchingAnimating:!1,focusedDay:p,currentMonth:h.startOfMonth(p),slideDirection:"left"});v.useEffect(()=>{y({type:"changeMonthTimezone",newTimezone:h.getTimezone(p)})},[p,h]);const S=v.useCallback(M=>{y(j({type:"changeMonth"},M)),l&&l(M.newMonth)},[l]),P=v.useCallback(M=>{const $=M;h.isSameMonth($,g.currentMonth)||S({newMonth:h.startOfMonth($),direction:h.isAfterDay($,g.currentMonth)?"left":"right"})},[g.currentMonth,S,h]),C=Vu({shouldDisableDate:u,minDate:a,maxDate:i,disableFuture:r,disablePast:o,timezone:d}),x=v.useCallback(()=>{y({type:"finishMonthSwitchingAnimation"})},[]),I=fe((M,$)=>{C(M)||y({type:"changeFocusedDay",focusedDay:M,withoutMonthSwitchingAnimation:$})});return{referenceDate:p,calendarState:g,changeMonth:P,changeFocusedDay:I,isDateDisabled:C,onMonthSwitchingAnimationEnd:x,handleChangeMonth:S}},$S=e=>Se("MuiPickersFadeTransitionGroup",e);be("MuiPickersFadeTransitionGroup",["root"]);const ES=e=>{const{classes:t}=e;return ve({root:["root"]},$S,t)},AS=_(Jr,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function zu(e){const t=He({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:s}=t,i=ES(t),a=Fn();return o?n:f.jsx(AS,{className:me(i.root,r),children:f.jsx(En,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:a.transitions.duration.enteringScreen,enter:a.transitions.duration.enteringScreen,exit:0},children:n},s)})}function FS(e){return Se("MuiPickersDay",e)}const Pn=be("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),LS=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],NS=e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:s,outsideCurrentMonth:i,showDaysOutsideCurrentMonth:a,classes:l}=e,c=i&&!a;return ve({root:["root",t&&!c&&"selected",s&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",i&&a&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},FS,l)},Wu=({theme:e})=>j({},e.typography.caption,{width:Hr,height:Hr,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Qe.alpha(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:Qe.alpha(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${Pn.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Pn.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Pn.disabled}:not(.${Pn.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${Pn.disabled}&.${Pn.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${os}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${Pn.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),_u=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},jS=_(or,{name:"MuiPickersDay",slot:"Root",overridesResolver:_u})(Wu),BS=_("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:_u})(({theme:e})=>j({},Wu({theme:e}),{opacity:0,pointerEvents:"none"})),Pr=()=>{},VS=v.forwardRef(function(t,n){const r=He({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:s,day:i,disabled:a=!1,disableHighlightToday:l=!1,disableMargin:c=!1,isAnimating:u,onClick:d,onDaySelect:h,onFocus:b=Pr,onBlur:p=Pr,onKeyDown:g=Pr,onMouseDown:y=Pr,onMouseEnter:S=Pr,outsideCurrentMonth:P,selected:C=!1,showDaysOutsideCurrentMonth:x=!1,children:I,today:M=!1}=r,$=ke(r,LS),R=j({},r,{autoFocus:o,disabled:a,disableHighlightToday:l,disableMargin:c,selected:C,showDaysOutsideCurrentMonth:x,today:M}),E=NS(R),F=Ue(),T=v.useRef(null),m=Fe(T,n);st(()=>{o&&!a&&!u&&!P&&T.current.focus()},[o,a,u,P]);const O=k=>{y(k),P&&k.preventDefault()},D=k=>{a||h(i),P&&k.currentTarget.focus(),d&&d(k)};return P&&!x?f.jsx(BS,{className:me(E.root,E.hiddenDaySpacingFiller,s),ownerState:R,role:$.role}):f.jsx(jS,j({className:me(E.root,s),ref:m,centerRipple:!0,disabled:a,tabIndex:C?0:-1,onKeyDown:k=>g(k,i),onFocus:k=>b(k,i),onBlur:k=>p(k,i),onMouseEnter:k=>S(k,i),onClick:D,onMouseDown:O},$,{ownerState:R,children:I||F.format(i,"dayOfMonth")}))}),zS=v.memo(VS),WS=e=>Se("MuiPickersSlideTransition",e),It=be("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),_S=["children","className","reduceAnimations","slideDirection","transKey","classes"],HS=e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return ve(r,WS,t)},US=_(Jr,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${It["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${It["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${It.slideEnterActive}`]:t.slideEnterActive},{[`.${It.slideExit}`]:t.slideExit},{[`.${It["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${It["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${It["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${It["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${It.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${It.slideExit}`]:{transform:"translate(0%)"},[`& .${It["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${It["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function YS(e){const t=He({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:s}=t,i=ke(t,_S),a=HS(t),l=Fn();if(o)return f.jsx("div",{className:me(a.root,r),children:n});const c={exit:a.exit,enterActive:a.enterActive,enter:a.enter,exitActive:a.exitActive};return f.jsx(US,{className:me(a.root,r),childFactory:u=>v.cloneElement(u,{classNames:c}),role:"presentation",children:f.jsx(Si,j({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:c},i,{children:n}),s)})}const GS=e=>Se("MuiDayCalendar",e);be("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const qS=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],KS=["ownerState"],QS=e=>{const{classes:t}=e;return ve({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},GS,t)},Hu=(Hr+os*2)*6,XS=_("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ZS=_("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),JS=_(gn,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),eC=_(gn,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),tC=_(gn,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>j({},e.typography.caption,{width:Hr,height:Hr,padding:0,margin:`0 ${os}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),nC=_("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:Hu}),rC=_(YS,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:Hu}),oC=_("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),sC=_("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${os}px 0`,display:"flex",justifyContent:"center"});function iC(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:o,isDateDisabled:s,currentMonthNumber:i,isViewFocused:a}=e,l=ke(e,qS);const{disabled:c,disableHighlightToday:u,isMonthSwitchingAnimating:d,showDaysOutsideCurrentMonth:h,slots:b,slotProps:p,timezone:g}=t,y=Ue(),S=ts(g),P=r!==null&&y.isSameDay(n,r),C=o.some(m=>y.isSameDay(m,n)),x=y.isSameDay(n,S),I=b?.day??zS,M=Ae({elementType:I,externalSlotProps:p?.day,additionalProps:j({disableHighlightToday:u,showDaysOutsideCurrentMonth:h,role:"gridcell",isAnimating:d,"data-timestamp":y.toJsDate(n).valueOf()},l),ownerState:j({},t,{day:n,selected:C})}),$=ke(M,KS),R=v.useMemo(()=>c||s(n),[c,s,n]),E=v.useMemo(()=>y.getMonth(n)!==i,[y,n,i]),F=v.useMemo(()=>{const m=y.startOfMonth(y.setMonth(n,i));return h?y.isSameDay(n,y.startOfWeek(m)):y.isSameDay(n,m)},[i,n,h,y]),T=v.useMemo(()=>{const m=y.endOfMonth(y.setMonth(n,i));return h?y.isSameDay(n,y.endOfWeek(m)):y.isSameDay(n,m)},[i,n,h,y]);return f.jsx(I,j({},$,{day:n,disabled:R,autoFocus:a&&P,today:x,outsideCurrentMonth:E,isFirstVisibleCell:F,isLastVisibleCell:T,selected:C,tabIndex:P?0:-1,"aria-selected":C,"aria-current":x?"date":void 0}))}function aC(e){const t=He({props:e,name:"MuiDayCalendar"}),n=Ue(),{onFocusedDayChange:r,className:o,currentMonth:s,selectedDays:i,focusedDay:a,loading:l,onSelectedDaysChange:c,onMonthSwitchingAnimationEnd:u,readOnly:d,reduceAnimations:h,renderLoading:b=()=>f.jsx("span",{children:"..."}),slideDirection:p,TransitionProps:g,disablePast:y,disableFuture:S,minDate:P,maxDate:C,shouldDisableDate:x,shouldDisableMonth:I,shouldDisableYear:M,dayOfWeekFormatter:$=te=>n.format(te,"weekdayShort").charAt(0).toUpperCase(),hasFocus:R,onFocusedViewChange:E,gridLabelId:F,displayWeekNumber:T,fixedWeekNumber:m,autoFocus:O,timezone:D}=t,k=ts(D),w=QS(t),A=Wt(),L=Vu({shouldDisableDate:x,shouldDisableMonth:I,shouldDisableYear:M,minDate:P,maxDate:C,disablePast:y,disableFuture:S,timezone:D}),N=an(),[Y,W]=Mt({name:"DayCalendar",state:"hasFocus",controlled:R,default:O??!1}),[J,ce]=v.useState(()=>a||k),ae=fe(te=>{d||c(te)}),V=te=>{L(te)||(r(te),ce(te),E?.(!0),W(!0))},q=fe((te,pe)=>{switch(te.key){case"ArrowUp":V(n.addDays(pe,-7)),te.preventDefault();break;case"ArrowDown":V(n.addDays(pe,7)),te.preventDefault();break;case"ArrowLeft":{const H=n.addDays(pe,A?1:-1),ye=n.addMonths(pe,A?1:-1),de=$r({utils:n,date:H,minDate:A?H:n.startOfMonth(ye),maxDate:A?n.endOfMonth(ye):H,isDateDisabled:L,timezone:D});V(de||H),te.preventDefault();break}case"ArrowRight":{const H=n.addDays(pe,A?-1:1),ye=n.addMonths(pe,A?-1:1),de=$r({utils:n,date:H,minDate:A?n.startOfMonth(ye):H,maxDate:A?H:n.endOfMonth(ye),isDateDisabled:L,timezone:D});V(de||H),te.preventDefault();break}case"Home":V(n.startOfWeek(pe)),te.preventDefault();break;case"End":V(n.endOfWeek(pe)),te.preventDefault();break;case"PageUp":V(n.addMonths(pe,1)),te.preventDefault();break;case"PageDown":V(n.addMonths(pe,-1)),te.preventDefault();break}}),ne=fe((te,pe)=>V(pe)),K=fe((te,pe)=>{Y&&n.isSameDay(J,pe)&&E?.(!1)}),z=n.getMonth(s),G=n.getYear(s),oe=v.useMemo(()=>i.filter(te=>!!te).map(te=>n.startOfDay(te)),[n,i]),re=`${G}-${z}`,B=v.useMemo(()=>v.createRef(),[re]),ee=v.useMemo(()=>{const te=n.startOfMonth(s),pe=n.endOfMonth(s);return L(J)||n.isAfterDay(J,pe)||n.isBeforeDay(J,te)?$r({utils:n,date:J,minDate:te,maxDate:pe,disablePast:y,disableFuture:S,isDateDisabled:L,timezone:D}):J},[s,S,y,J,L,n,D]),le=v.useMemo(()=>{const te=n.getWeekArray(s);let pe=n.addMonths(s,1);for(;m&&te.length<m;){const H=n.getWeekArray(pe),ye=n.isSameDay(te[te.length-1][0],H[0][0]);H.slice(ye?1:0).forEach(de=>{te.length<m&&te.push(de)}),pe=n.addMonths(pe,1)}return te},[s,m,n]);return f.jsxs(XS,{role:"grid","aria-labelledby":F,className:w.root,children:[f.jsxs(ZS,{role:"row",className:w.header,children:[T&&f.jsx(eC,{variant:"caption",role:"columnheader","aria-label":N.calendarWeekNumberHeaderLabel,className:w.weekNumberLabel,children:N.calendarWeekNumberHeaderText}),xh(n,k).map((te,pe)=>f.jsx(JS,{variant:"caption",role:"columnheader","aria-label":n.format(te,"weekday"),className:w.weekDayLabel,children:$(te)},pe.toString()))]}),l?f.jsx(nC,{className:w.loadingContainer,children:b()}):f.jsx(rC,j({transKey:re,onExited:u,reduceAnimations:h,slideDirection:p,className:me(o,w.slideTransition)},g,{nodeRef:B,children:f.jsx(oC,{ref:B,role:"rowgroup",className:w.monthContainer,children:le.map((te,pe)=>f.jsxs(sC,{role:"row",className:w.weekContainer,"aria-rowindex":pe+1,children:[T&&f.jsx(tC,{className:w.weekNumber,role:"rowheader","aria-label":N.calendarWeekNumberAriaLabelText(n.getWeekNumber(te[0])),children:N.calendarWeekNumberText(n.getWeekNumber(te[0]))}),te.map((H,ye)=>f.jsx(iC,{parentProps:t,day:H,selectedDays:oe,focusableDay:ee,onKeyDown:q,onFocus:ne,onBlur:K,onDaySelect:ae,isDateDisabled:L,currentMonthNumber:z,isViewFocused:Y,"aria-colindex":ye+1},H.toString()))]},`week-${te[0]}`))})}))]})}function lC(e){return Se("MuiPickersMonth",e)}const uo=be("MuiPickersMonth",["root","monthButton","disabled","selected"]),cC=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],uC=e=>{const{disabled:t,selected:n,classes:r}=e;return ve({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},lC,r)},dC=_("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),pC=_("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${uo.disabled}`]:t.disabled},{[`&.${uo.selected}`]:t.selected}]})(({theme:e})=>j({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Qe.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Qe.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${uo.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${uo.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),fC=v.memo(function(t){const n=He({props:t,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:s,disabled:i,selected:a,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:h,onBlur:b,"aria-current":p,"aria-label":g,slots:y,slotProps:S}=n,P=ke(n,cC),C=v.useRef(null),x=uC(n);st(()=>{r&&C.current?.focus()},[r]);const I=y?.monthButton??pC,M=Ae({elementType:I,externalSlotProps:S?.monthButton,additionalProps:{children:s,disabled:i,tabIndex:c,ref:C,type:"button",role:"radio","aria-current":p,"aria-checked":a,"aria-label":g,onClick:$=>u($,l),onKeyDown:$=>d($,l),onFocus:$=>h($,l),onBlur:$=>b($,l)},ownerState:n,className:x.monthButton});return f.jsx(dC,j({className:me(x.root,o),ownerState:n},P,{children:f.jsx(I,j({},M))}))});function mC(e){return Se("MuiMonthCalendar",e)}be("MuiMonthCalendar",["root"]);const hC=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],gC=e=>{const{classes:t}=e;return ve({root:["root"]},mC,t)};function yC(e,t){const n=Ue(),r=Xr(),o=He({props:e,name:t});return j({disableFuture:!1,disablePast:!1},o,{minDate:Et(n,o.minDate,r.minDate),maxDate:Et(n,o.maxDate,r.maxDate)})}const bC=_("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:ss,boxSizing:"border-box"}),vC=v.forwardRef(function(t,n){const r=yC(t,"MuiMonthCalendar"),{className:o,value:s,defaultValue:i,referenceDate:a,disabled:l,disableFuture:c,disablePast:u,maxDate:d,minDate:h,onChange:b,shouldDisableMonth:p,readOnly:g,autoFocus:y=!1,onMonthFocus:S,hasFocus:P,onFocusedViewChange:C,monthsPerRow:x=3,timezone:I,gridLabelId:M,slots:$,slotProps:R}=r,E=ke(r,hC),{value:F,handleValueChange:T,timezone:m}=Ei({name:"MonthCalendar",timezone:I,value:s,defaultValue:i,referenceDate:a,onChange:b,valueManager:Kt}),O=ts(m),D=Wt(),k=Ue(),w=v.useMemo(()=>Kt.getInitialReferenceValue({value:F,utils:k,props:r,timezone:m,referenceDate:a,granularity:Yt.month}),[]),A=r,L=gC(A),N=v.useMemo(()=>k.getMonth(O),[k,O]),Y=v.useMemo(()=>F!=null?k.getMonth(F):null,[F,k]),[W,J]=v.useState(()=>Y||k.getMonth(w)),[ce,ae]=Mt({name:"MonthCalendar",state:"hasFocus",controlled:P,default:y??!1}),V=fe(re=>{ae(re),C&&C(re)}),q=v.useCallback(re=>{const B=k.startOfMonth(u&&k.isAfter(O,h)?O:h),ee=k.startOfMonth(c&&k.isBefore(O,d)?O:d),le=k.startOfMonth(re);return k.isBefore(le,B)||k.isAfter(le,ee)?!0:p?p(le):!1},[c,u,d,h,O,p,k]),ne=fe((re,B)=>{if(g)return;const ee=k.setMonth(F??w,B);T(ee)}),K=fe(re=>{q(k.setMonth(F??w,re))||(J(re),V(!0),S&&S(re))});v.useEffect(()=>{J(re=>Y!==null&&re!==Y?Y:re)},[Y]);const z=fe((re,B)=>{switch(re.key){case"ArrowUp":K((12+B-3)%12),re.preventDefault();break;case"ArrowDown":K((12+B+3)%12),re.preventDefault();break;case"ArrowLeft":K((12+B+(D?1:-1))%12),re.preventDefault();break;case"ArrowRight":K((12+B+(D?-1:1))%12),re.preventDefault();break}}),G=fe((re,B)=>{K(B)}),oe=fe((re,B)=>{W===B&&V(!1)});return f.jsx(bC,j({ref:n,className:me(L.root,o),ownerState:A,role:"radiogroup","aria-labelledby":M},E,{children:gi(k,F??w).map(re=>{const B=k.getMonth(re),ee=k.format(re,"monthShort"),le=k.format(re,"month"),te=B===Y,pe=l||q(re);return f.jsx(fC,{selected:te,value:B,onClick:ne,onKeyDown:z,autoFocus:ce&&B===W,disabled:pe,tabIndex:B===W&&!pe?0:-1,onFocus:G,onBlur:oe,"aria-current":N===B?"date":void 0,"aria-label":le,monthsPerRow:x,slots:$,slotProps:R,children:ee},ee)})}))});function xC(e){return Se("MuiPickersYear",e)}const po=be("MuiPickersYear",["root","yearButton","selected","disabled"]),SC=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],CC=e=>{const{disabled:t,selected:n,classes:r}=e;return ve({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},xC,r)},wC=_("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),PC=_("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${po.disabled}`]:t.disabled},{[`&.${po.selected}`]:t.selected}]})(({theme:e})=>j({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:Qe.alpha(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Qe.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${po.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${po.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),kC=v.memo(function(t){const n=He({props:t,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:s,disabled:i,selected:a,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:h,onBlur:b,"aria-current":p,slots:g,slotProps:y}=n,S=ke(n,SC),P=v.useRef(null),C=CC(n);st(()=>{r&&P.current?.focus()},[r]);const x=g?.yearButton??PC,I=Ae({elementType:x,externalSlotProps:y?.yearButton,additionalProps:{children:s,disabled:i,tabIndex:c,ref:P,type:"button",role:"radio","aria-current":p,"aria-checked":a,onClick:M=>u(M,l),onKeyDown:M=>d(M,l),onFocus:M=>h(M,l),onBlur:M=>b(M,l)},ownerState:n,className:C.yearButton});return f.jsx(wC,j({className:me(C.root,o),ownerState:n},S,{children:f.jsx(x,j({},I))}))});function MC(e){return Se("MuiYearCalendar",e)}be("MuiYearCalendar",["root"]);const DC=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],IC=e=>{const{classes:t}=e;return ve({root:["root"]},MC,t)};function TC(e,t){const n=Ue(),r=Xr(),o=He({props:e,name:t});return j({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:Et(n,o.minDate,r.minDate),maxDate:Et(n,o.maxDate,r.maxDate)})}const RC=_("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:ss,maxHeight:Dv,boxSizing:"border-box",position:"relative"}),OC=v.forwardRef(function(t,n){const r=TC(t,"MuiYearCalendar"),{autoFocus:o,className:s,value:i,defaultValue:a,referenceDate:l,disabled:c,disableFuture:u,disablePast:d,maxDate:h,minDate:b,onChange:p,readOnly:g,shouldDisableYear:y,onYearFocus:S,hasFocus:P,onFocusedViewChange:C,yearsOrder:x="asc",yearsPerRow:I,timezone:M,gridLabelId:$,slots:R,slotProps:E}=r,F=ke(r,DC),{value:T,handleValueChange:m,timezone:O}=Ei({name:"YearCalendar",timezone:M,value:i,defaultValue:a,referenceDate:l,onChange:p,valueManager:Kt}),D=ts(O),k=Wt(),w=Ue(),A=v.useMemo(()=>Kt.getInitialReferenceValue({value:T,utils:w,props:r,timezone:O,referenceDate:l,granularity:Yt.year}),[]),L=r,N=IC(L),Y=v.useMemo(()=>w.getYear(D),[w,D]),W=v.useMemo(()=>T!=null?w.getYear(T):null,[T,w]),[J,ce]=v.useState(()=>W||w.getYear(A)),[ae,V]=Mt({name:"YearCalendar",state:"hasFocus",controlled:P,default:o??!1}),q=fe(H=>{V(H),C&&C(H)}),ne=v.useCallback(H=>{if(d&&w.isBeforeYear(H,D)||u&&w.isAfterYear(H,D)||b&&w.isBeforeYear(H,b)||h&&w.isAfterYear(H,h))return!0;if(!y)return!1;const ye=w.startOfYear(H);return y(ye)},[u,d,h,b,D,y,w]),K=fe((H,ye)=>{if(g)return;const de=w.setYear(T??A,ye);m(de)}),z=fe(H=>{ne(w.setYear(T??A,H))||(ce(H),q(!0),S?.(H))});v.useEffect(()=>{ce(H=>W!==null&&H!==W?W:H)},[W]);const G=x!=="desc"?I*1:I*-1,oe=k&&x==="asc"||!k&&x==="desc"?-1:1,re=fe((H,ye)=>{switch(H.key){case"ArrowUp":z(ye-G),H.preventDefault();break;case"ArrowDown":z(ye+G),H.preventDefault();break;case"ArrowLeft":z(ye-oe),H.preventDefault();break;case"ArrowRight":z(ye+oe),H.preventDefault();break}}),B=fe((H,ye)=>{z(ye)}),ee=fe((H,ye)=>{J===ye&&q(!1)}),le=v.useRef(null),te=Fe(n,le);v.useEffect(()=>{if(o||le.current===null)return;const H=le.current.querySelector('[tabindex="0"]');if(!H)return;const ye=H.offsetHeight,de=H.offsetTop,Me=le.current.clientHeight,he=le.current.scrollTop,et=de+ye;ye>Me||de<he||(le.current.scrollTop=et-Me/2-ye/2)},[o]);const pe=w.getYearRange([b,h]);return x==="desc"&&pe.reverse(),f.jsx(RC,j({ref:te,className:me(N.root,s),ownerState:L,role:"radiogroup","aria-labelledby":$},F,{children:pe.map(H=>{const ye=w.getYear(H),de=ye===W,Me=c||ne(H);return f.jsx(kC,{selected:de,value:ye,onClick:K,onKeyDown:re,autoFocus:ae&&ye===J,disabled:Me,tabIndex:ye===J&&!Me?0:-1,onFocus:B,onBlur:ee,"aria-current":Y===ye?"date":void 0,yearsPerRow:I,slots:R,slotProps:E,children:w.format(H,"year")},w.format(H,"year"))})}))}),$C=e=>Se("MuiPickersCalendarHeader",e),EC=be("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function AC(e){return Se("MuiPickersArrowSwitcher",e)}be("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const FC=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],LC=["ownerState"],NC=["ownerState"],jC=_("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),BC=_("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),Nl=_(Nn,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),VC=e=>{const{classes:t}=e;return ve({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},AC,t)},zC=v.forwardRef(function(t,n){const r=Wt(),o=He({props:t,name:"MuiPickersArrowSwitcher"}),{children:s,className:i,slots:a,slotProps:l,isNextDisabled:c,isNextHidden:u,onGoToNext:d,nextLabel:h,isPreviousDisabled:b,isPreviousHidden:p,onGoToPrevious:g,previousLabel:y,labelId:S}=o,P=ke(o,FC),C=o,x=VC(C),I={isDisabled:c,isHidden:u,goTo:d,label:h},M={isDisabled:b,isHidden:p,goTo:g,label:y},$=a?.previousIconButton??Nl,R=Ae({elementType:$,externalSlotProps:l?.previousIconButton,additionalProps:{size:"medium",title:M.label,"aria-label":M.label,disabled:M.isDisabled,edge:"end",onClick:M.goTo},ownerState:j({},C,{hidden:M.isHidden}),className:me(x.button,x.previousIconButton)}),E=a?.nextIconButton??Nl,F=Ae({elementType:E,externalSlotProps:l?.nextIconButton,additionalProps:{size:"medium",title:I.label,"aria-label":I.label,disabled:I.isDisabled,edge:"start",onClick:I.goTo},ownerState:j({},C,{hidden:I.isHidden}),className:me(x.button,x.nextIconButton)}),T=a?.leftArrowIcon??_v,m=Ae({elementType:T,externalSlotProps:l?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:C,className:x.leftArrowIcon}),O=ke(m,LC),D=a?.rightArrowIcon??Hv,k=Ae({elementType:D,externalSlotProps:l?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:C,className:x.rightArrowIcon}),w=ke(k,NC);return f.jsxs(jC,j({ref:n,className:me(x.root,i),ownerState:C},P,{children:[f.jsx($,j({},R,{children:r?f.jsx(D,j({},w)):f.jsx(T,j({},O))})),s?f.jsx(gn,{variant:"subtitle1",component:"span",id:S,children:s}):f.jsx(BC,{className:x.spacer,ownerState:C}),f.jsx(E,j({},F,{children:r?f.jsx(T,j({},O)):f.jsx(D,j({},w))}))]}))});function WC(e,{disableFuture:t,maxDate:n,timezone:r}){const o=Ue();return v.useMemo(()=>{const s=o.date(void 0,r),i=o.startOfMonth(t&&o.isBefore(s,n)?s:n);return!o.isAfter(i,e)},[t,n,e,o,r])}function _C(e,{disablePast:t,minDate:n,timezone:r}){const o=Ue();return v.useMemo(()=>{const s=o.date(void 0,r),i=o.startOfMonth(t&&o.isAfter(s,n)?s:n);return!o.isBefore(i,e)},[t,n,e,o,r])}const HC=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],UC=["ownerState"],YC=e=>{const{classes:t}=e;return ve({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},$C,t)},GC=_("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),qC=_("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>j({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),KC=_("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),QC=_(Nn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${EC.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),XC=_(Wv,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),ZC=v.forwardRef(function(t,n){const r=an(),o=Ue(),s=He({props:t,name:"MuiPickersCalendarHeader"}),{slots:i,slotProps:a,currentMonth:l,disabled:c,disableFuture:u,disablePast:d,maxDate:h,minDate:b,onMonthChange:p,onViewChange:g,view:y,reduceAnimations:S,views:P,labelId:C,className:x,timezone:I,format:M=`${o.formats.month} ${o.formats.year}`}=s,$=ke(s,HC),R=s,E=YC(s),F=i?.switchViewButton??QC,T=Ae({elementType:F,externalSlotProps:a?.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(y)},ownerState:R,className:E.switchViewButton}),m=i?.switchViewIcon??XC,O=Ae({elementType:m,externalSlotProps:a?.switchViewIcon,ownerState:R,className:E.switchViewIcon}),D=ke(O,UC),k=()=>p(o.addMonths(l,1),"left"),w=()=>p(o.addMonths(l,-1),"right"),A=WC(l,{disableFuture:u,maxDate:h,timezone:I}),L=_C(l,{disablePast:d,minDate:b,timezone:I}),N=()=>{if(!(P.length===1||!g||c))if(P.length===2)g(P.find(W=>W!==y)||P[0]);else{const W=P.indexOf(y)!==0?0:1;g(P[W])}};if(P.length===1&&P[0]==="year")return null;const Y=o.formatByString(l,M);return f.jsxs(GC,j({},$,{ownerState:R,className:me(E.root,x),ref:n,children:[f.jsxs(qC,{role:"presentation",onClick:N,ownerState:R,"aria-live":"polite",className:E.labelContainer,children:[f.jsx(zu,{reduceAnimations:S,transKey:Y,children:f.jsx(KC,{id:C,ownerState:R,className:E.label,children:Y})}),P.length>1&&!c&&f.jsx(F,j({},T,{children:f.jsx(m,j({},D))}))]}),f.jsx(En,{in:y==="day",appear:!S,enter:!S,children:f.jsx(zC,{slots:i,slotProps:a,onGoToPrevious:w,isPreviousDisabled:L,previousLabel:r.previousMonth,onGoToNext:k,isNextDisabled:A,nextLabel:r.nextMonth})})]}))}),JC=_("div")({overflow:"hidden",width:ss,maxHeight:Ai,display:"flex",flexDirection:"column",margin:"0 auto"}),ew=e=>Se("MuiDateCalendar",e);be("MuiDateCalendar",["root","viewTransitionContainer"]);const tw=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],nw=e=>{const{classes:t}=e;return ve({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},ew,t)};function rw(e,t){const n=Ue(),r=Xr(),o=fu(),s=He({props:e,name:t});return j({},s,{loading:s.loading??!1,disablePast:s.disablePast??!1,disableFuture:s.disableFuture??!1,openTo:s.openTo??"day",views:s.views??["year","day"],reduceAnimations:s.reduceAnimations??o,renderLoading:s.renderLoading??(()=>f.jsx("span",{children:"..."})),minDate:Et(n,s.minDate,r.minDate),maxDate:Et(n,s.maxDate,r.maxDate)})}const ow=_(JC,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:Ai}),sw=_(zu,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),iw=v.forwardRef(function(t,n){const r=Ue(),o=_t(),s=rw(t,"MuiDateCalendar"),{autoFocus:i,onViewChange:a,value:l,defaultValue:c,referenceDate:u,disableFuture:d,disablePast:h,onChange:b,onYearChange:p,onMonthChange:g,reduceAnimations:y,shouldDisableDate:S,shouldDisableMonth:P,shouldDisableYear:C,view:x,views:I,openTo:M,className:$,disabled:R,readOnly:E,minDate:F,maxDate:T,disableHighlightToday:m,focusedView:O,onFocusedViewChange:D,showDaysOutsideCurrentMonth:k,fixedWeekNumber:w,dayOfWeekFormatter:A,slots:L,slotProps:N,loading:Y,renderLoading:W,displayWeekNumber:J,yearsOrder:ce,yearsPerRow:ae,monthsPerRow:V,timezone:q}=s,ne=ke(s,tw),{value:K,handleValueChange:z,timezone:G}=Ei({name:"DateCalendar",timezone:q,value:l,defaultValue:c,referenceDate:u,onChange:b,valueManager:Kt}),{view:oe,setView:re,focusedView:B,setFocusedView:ee,goToNextView:le,setValueAndGoToNextView:te}=mu({view:x,views:I,openTo:M,onChange:z,onViewChange:a,autoFocus:i,focusedView:O,onFocusedViewChange:D}),{referenceDate:pe,calendarState:H,changeFocusedDay:ye,changeMonth:de,handleChangeMonth:Me,isDateDisabled:he,onMonthSwitchingAnimationEnd:et}=OS({value:K,referenceDate:u,reduceAnimations:y,onMonthChange:g,minDate:F,maxDate:T,shouldDisableDate:S,disablePast:h,disableFuture:d,timezone:G}),Le=R&&K||F,Xe=R&&K||T,nt=`${o}-grid-label`,mt=B!==null,rt=L?.calendarHeader??ZC,xt=Ae({elementType:rt,externalSlotProps:N?.calendarHeader,additionalProps:{views:I,view:oe,currentMonth:H.currentMonth,onViewChange:re,onMonthChange:(Ne,pt)=>Me({newMonth:Ne,direction:pt}),minDate:Le,maxDate:Xe,disabled:R,disablePast:h,disableFuture:d,reduceAnimations:y,timezone:G,labelId:nt},ownerState:s}),_e=fe(Ne=>{const pt=r.startOfMonth(Ne),ht=r.endOfMonth(Ne),it=he(Ne)?$r({utils:r,date:Ne,minDate:r.isBefore(F,pt)?pt:F,maxDate:r.isAfter(T,ht)?ht:T,disablePast:h,disableFuture:d,isDateDisabled:he,timezone:G}):Ne;it?(te(it,"finish"),g?.(pt)):(le(),de(pt)),ye(it,!0)}),Ce=fe(Ne=>{const pt=r.startOfYear(Ne),ht=r.endOfYear(Ne),it=he(Ne)?$r({utils:r,date:Ne,minDate:r.isBefore(F,pt)?pt:F,maxDate:r.isAfter(T,ht)?ht:T,disablePast:h,disableFuture:d,isDateDisabled:he,timezone:G}):Ne;it?(te(it,"finish"),p?.(it)):(le(),de(pt)),ye(it,!0)}),tt=fe(Ne=>z(Ne&&$o(r,Ne,K??pe),"finish",oe));v.useEffect(()=>{K!=null&&r.isValid(K)&&de(K)},[K]);const St=s,ut=nw(St),xe={disablePast:h,disableFuture:d,maxDate:T,minDate:F},Ie={disableHighlightToday:m,readOnly:E,disabled:R,timezone:G,gridLabelId:nt,slots:L,slotProps:N},$e=v.useRef(oe);v.useEffect(()=>{$e.current!==oe&&(B===$e.current&&ee(oe,!0),$e.current=oe)},[B,ee,oe]);const Ct=v.useMemo(()=>[K],[K]);return f.jsxs(ow,j({ref:n,className:me(ut.root,$),ownerState:St},ne,{children:[f.jsx(rt,j({},xt,{slots:L,slotProps:N})),f.jsx(sw,{reduceAnimations:y,className:ut.viewTransitionContainer,transKey:oe,ownerState:St,children:f.jsxs("div",{children:[oe==="year"&&f.jsx(OC,j({},xe,Ie,{value:K,onChange:Ce,shouldDisableYear:C,hasFocus:mt,onFocusedViewChange:Ne=>ee("year",Ne),yearsOrder:ce,yearsPerRow:ae,referenceDate:pe})),oe==="month"&&f.jsx(vC,j({},xe,Ie,{hasFocus:mt,className:$,value:K,onChange:_e,shouldDisableMonth:P,onFocusedViewChange:Ne=>ee("month",Ne),monthsPerRow:V,referenceDate:pe})),oe==="day"&&f.jsx(aC,j({},H,xe,Ie,{onMonthSwitchingAnimationEnd:et,onFocusedDayChange:ye,reduceAnimations:y,selectedDays:Ct,onSelectedDaysChange:tt,shouldDisableDate:S,shouldDisableMonth:P,shouldDisableYear:C,hasFocus:mt,onFocusedViewChange:Ne=>ee("day",Ne),showDaysOutsideCurrentMonth:k,fixedWeekNumber:w,dayOfWeekFormatter:A,displayWeekNumber:J,loading:Y,renderLoading:W}))]})})]}))}),tr=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:s,defaultValue:i,referenceDate:a,onChange:l,className:c,classes:u,disableFuture:d,disablePast:h,minDate:b,maxDate:p,shouldDisableDate:g,shouldDisableMonth:y,shouldDisableYear:S,reduceAnimations:P,onMonthChange:C,monthsPerRow:x,onYearChange:I,yearsOrder:M,yearsPerRow:$,slots:R,slotProps:E,loading:F,renderLoading:T,disableHighlightToday:m,readOnly:O,disabled:D,showDaysOutsideCurrentMonth:k,dayOfWeekFormatter:w,sx:A,autoFocus:L,fixedWeekNumber:N,displayWeekNumber:Y,timezone:W})=>f.jsx(iw,{view:e,onViewChange:t,views:n.filter(Ya),focusedView:r&&Ya(r)?r:null,onFocusedViewChange:o,value:s,defaultValue:i,referenceDate:a,onChange:l,className:c,classes:u,disableFuture:d,disablePast:h,minDate:b,maxDate:p,shouldDisableDate:g,shouldDisableMonth:y,shouldDisableYear:S,reduceAnimations:P,onMonthChange:C,monthsPerRow:x,onYearChange:I,yearsOrder:M,yearsPerRow:$,slots:R,slotProps:E,loading:F,renderLoading:T,disableHighlightToday:m,readOnly:O,disabled:D,showDaysOutsideCurrentMonth:k,dayOfWeekFormatter:w,sx:A,autoFocus:L,fixedWeekNumber:N,displayWeekNumber:Y,timezone:W}),Uu=v.forwardRef(function(t,n){const r=an(),o=Ue(),s=Kc(t,"MuiDesktopDatePicker"),i=j({day:tr,month:tr,year:tr},s.viewRenderers),a=j({},s,{viewRenderers:i,format:yi(o,s,!1),yearsPerRow:s.yearsPerRow??4,slots:j({openPickerIcon:Uv,field:Bu},s.slots),slotProps:j({},s.slotProps,{field:c=>j({},Jo(s.slotProps?.field,c),Xc(s),{ref:n}),toolbar:j({hidden:!0},s.slotProps?.toolbar)})}),{renderPicker:l}=zv({props:a,valueManager:Kt,valueType:"date",getOpenDialogAriaText:Gc({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:a.localeText?.openDatePickerDialogue}),validator:Zr});return l()});Uu.propTypes={autoFocus:U.bool,className:U.string,closeOnSelect:U.bool,dayOfWeekFormatter:U.func,defaultValue:U.object,disabled:U.bool,disableFuture:U.bool,disableHighlightToday:U.bool,disableOpenPicker:U.bool,disablePast:U.bool,displayWeekNumber:U.bool,enableAccessibleFieldDOMStructure:U.any,fixedWeekNumber:U.number,format:U.string,formatDensity:U.oneOf(["dense","spacious"]),inputRef:Lc,label:U.node,loading:U.bool,localeText:U.object,maxDate:U.object,minDate:U.object,monthsPerRow:U.oneOf([3,4]),name:U.string,onAccept:U.func,onChange:U.func,onClose:U.func,onError:U.func,onMonthChange:U.func,onOpen:U.func,onSelectedSectionsChange:U.func,onViewChange:U.func,onYearChange:U.func,open:U.bool,openTo:U.oneOf(["day","month","year"]),orientation:U.oneOf(["landscape","portrait"]),readOnly:U.bool,reduceAnimations:U.bool,referenceDate:U.object,renderLoading:U.func,selectedSections:U.oneOfType([U.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),U.number]),shouldDisableDate:U.func,shouldDisableMonth:U.func,shouldDisableYear:U.func,showDaysOutsideCurrentMonth:U.bool,slotProps:U.object,slots:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),timezone:U.string,value:U.object,view:U.oneOf(["day","month","year"]),viewRenderers:U.shape({day:U.func,month:U.func,year:U.func}),views:U.arrayOf(U.oneOf(["day","month","year"]).isRequired),yearsOrder:U.oneOf(["asc","desc"]),yearsPerRow:U.oneOf([3,4])};function aw(e){return Se("MuiDialogContent",e)}be("MuiDialogContent",["root","dividers"]);const lw=be("MuiDialogTitle",["root"]),cw=e=>{const{classes:t,dividers:n}=e;return ve({root:["root",n&&"dividers"]},aw,t)},uw=_("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Re(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${lw.root} + &`]:{paddingTop:0}}}]}))),dw=v.forwardRef(function(t,n){const r=Oe({props:t,name:"MuiDialogContent"}),{className:o,dividers:s=!1,...i}=r,a={...r,dividers:s},l=cw(a);return f.jsx(uw,{className:me(l.root,o),ownerState:a,ref:n,...i})});function pw(e){return Se("MuiDialog",e)}const Nr=be("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),fw=v.createContext({}),mw=_(ku,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),hw=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:s}=e,i={root:["root"],container:["container",`scroll${ue(n)}`],paper:["paper",`paperScroll${ue(n)}`,`paperWidth${ue(String(r))}`,o&&"paperFullWidth",s&&"paperFullScreen"]};return ve(i,pw,t)},gw=_(Mu,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),yw=_("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${ue(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),bw=_(jn,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${ue(n.scroll)}`],t[`paperWidth${ue(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Re(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Nr.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${Nr.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Nr.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),vw=v.forwardRef(function(t,n){const r=Oe({props:t,name:"MuiDialog"}),o=Fn(),s={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":i,"aria-labelledby":a,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:u,children:d,className:h,disableEscapeKeyDown:b=!1,fullScreen:p=!1,fullWidth:g=!1,maxWidth:y="sm",onClick:S,onClose:P,open:C,PaperComponent:x=jn,PaperProps:I={},scroll:M="paper",slots:$={},slotProps:R={},TransitionComponent:E=En,transitionDuration:F=s,TransitionProps:T,...m}=r,O={...r,disableEscapeKeyDown:b,fullScreen:p,fullWidth:g,maxWidth:y,scroll:M},D=hw(O),k=v.useRef(),w=B=>{k.current=B.target===B.currentTarget},A=B=>{S&&S(B),k.current&&(k.current=null,P&&P(B,"backdropClick"))},L=_t(a),N=v.useMemo(()=>({titleId:L}),[L]),Y={transition:E,...$},W={transition:T,paper:I,backdrop:u,...R},J={slots:Y,slotProps:W},[ce,ae]=We("root",{elementType:gw,shouldForwardComponentProp:!0,externalForwardedProps:J,ownerState:O,className:me(D.root,h),ref:n}),[V,q]=We("backdrop",{elementType:mw,shouldForwardComponentProp:!0,externalForwardedProps:J,ownerState:O}),[ne,K]=We("paper",{elementType:bw,shouldForwardComponentProp:!0,externalForwardedProps:J,ownerState:O,className:me(D.paper,I.className)}),[z,G]=We("container",{elementType:yw,externalForwardedProps:J,ownerState:O,className:D.container}),[oe,re]=We("transition",{elementType:En,externalForwardedProps:J,ownerState:O,additionalProps:{appear:!0,in:C,timeout:F,role:"presentation"}});return f.jsx(ce,{closeAfterTransition:!0,slots:{backdrop:V},slotProps:{backdrop:{transitionDuration:F,as:c,...q}},disableEscapeKeyDown:b,onClose:P,open:C,onClick:A,...ae,...m,children:f.jsx(oe,{...re,children:f.jsx(z,{onMouseDown:w,...G,children:f.jsx(ne,{as:x,elevation:24,role:"dialog","aria-describedby":i,"aria-labelledby":L,"aria-modal":l,...K,children:f.jsx(fw.Provider,{value:N,children:d})})})})})}),xw=_(vw)({[`& .${Nr.container}`]:{outline:0},[`& .${Nr.paper}`]:{outline:0,minWidth:ss}}),Sw=_(dw)({"&:first-of-type":{padding:0}});function Cw(e){const{children:t,onDismiss:n,open:r,slots:o,slotProps:s}=e,i=o?.dialog??xw,a=o?.mobileTransition??En;return f.jsx(i,j({open:r,onClose:n},s?.dialog,{TransitionComponent:a,TransitionProps:s?.mobileTransition,PaperComponent:o?.mobilePaper,PaperProps:s?.mobilePaper,children:f.jsx(Sw,{children:t})}))}const ww=["props","getOpenDialogAriaText"],Pw=e=>{let{props:t,getOpenDialogAriaText:n}=e,r=ke(e,ww);const{slots:o,slotProps:s,className:i,sx:a,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:h,timezone:b,name:p,label:g,inputRef:y,readOnly:S,disabled:P,localeText:C}=t,x=v.useRef(null),I=_t(),M=s?.toolbar?.hidden??!1,{open:$,actions:R,layoutProps:E,renderCurrentView:F,fieldProps:T,contextValue:m}=hu(j({},r,{props:t,fieldRef:x,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),O=o.field,D=Ae({elementType:O,externalSlotProps:s?.field,additionalProps:j({},T,M&&{id:I},!(P||S)&&{onClick:R.onOpen,onKeyDown:Db(R.onOpen)},{readOnly:S??!0,disabled:P,className:i,sx:a,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:h,timezone:b,label:g,name:p},y?{inputRef:y}:{}),ownerState:t});D.inputProps=j({},D.inputProps,{"aria-label":n(T.value)});const k=j({textField:o.textField},D.slots),w=o.layout??Su;let A=I;M&&(g?A=`${I}-label`:A=void 0);const L=j({},s,{toolbar:j({},s?.toolbar,{titleId:I}),mobilePaper:j({"aria-labelledby":A},s?.mobilePaper)}),N=Fe(x,D.unstableFieldRef);return{renderPicker:()=>f.jsxs(Cu,{contextValue:m,localeText:C,children:[f.jsx(O,j({},D,{slots:k,slotProps:L,unstableFieldRef:N})),f.jsx(Cw,j({},R,{open:$,slots:o,slotProps:L,children:f.jsx(w,j({},E,L?.layout,{slots:o,slotProps:L,children:F()}))}))]})}},Yu=v.forwardRef(function(t,n){const r=an(),o=Ue(),s=Kc(t,"MuiMobileDatePicker"),i=j({day:tr,month:tr,year:tr},s.viewRenderers),a=j({},s,{viewRenderers:i,format:yi(o,s,!1),slots:j({field:Bu},s.slots),slotProps:j({},s.slotProps,{field:c=>j({},Jo(s.slotProps?.field,c),Xc(s),{ref:n}),toolbar:j({hidden:!1},s.slotProps?.toolbar)})}),{renderPicker:l}=Pw({props:a,valueManager:Kt,valueType:"date",getOpenDialogAriaText:Gc({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:a.localeText?.openDatePickerDialogue}),validator:Zr});return l()});Yu.propTypes={autoFocus:U.bool,className:U.string,closeOnSelect:U.bool,dayOfWeekFormatter:U.func,defaultValue:U.object,disabled:U.bool,disableFuture:U.bool,disableHighlightToday:U.bool,disableOpenPicker:U.bool,disablePast:U.bool,displayWeekNumber:U.bool,enableAccessibleFieldDOMStructure:U.any,fixedWeekNumber:U.number,format:U.string,formatDensity:U.oneOf(["dense","spacious"]),inputRef:Lc,label:U.node,loading:U.bool,localeText:U.object,maxDate:U.object,minDate:U.object,monthsPerRow:U.oneOf([3,4]),name:U.string,onAccept:U.func,onChange:U.func,onClose:U.func,onError:U.func,onMonthChange:U.func,onOpen:U.func,onSelectedSectionsChange:U.func,onViewChange:U.func,onYearChange:U.func,open:U.bool,openTo:U.oneOf(["day","month","year"]),orientation:U.oneOf(["landscape","portrait"]),readOnly:U.bool,reduceAnimations:U.bool,referenceDate:U.object,renderLoading:U.func,selectedSections:U.oneOfType([U.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),U.number]),shouldDisableDate:U.func,shouldDisableMonth:U.func,shouldDisableYear:U.func,showDaysOutsideCurrentMonth:U.bool,slotProps:U.object,slots:U.object,sx:U.oneOfType([U.arrayOf(U.oneOfType([U.func,U.object,U.bool])),U.func,U.object]),timezone:U.string,value:U.object,view:U.oneOf(["day","month","year"]),viewRenderers:U.shape({day:U.func,month:U.func,year:U.func}),views:U.arrayOf(U.oneOf(["day","month","year"]).isRequired),yearsOrder:U.oneOf(["asc","desc"]),yearsPerRow:U.oneOf([3,4])};const kw=["desktopModeMediaQuery"],Ur=v.forwardRef(function(t,n){const r=He({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=Ib}=r,s=ke(r,kw);return Fc(o,{defaultMatches:!0})?f.jsx(Uu,j({ref:n},s)):f.jsx(Yu,j({ref:n},s))});function Mw(e,t){if(!t)return;const n=t.trim();if(!n)return;const r=e??"string";if(r==="date"||r==="timestamp"||r==="timestamptz")return n.replace(/^@/,"");if(r.startsWith("filter<")){const o=n.replace(/^f/,""),s=o.match(/^'([^'\\]*)'$/)??o.match(/^"([^"\\]*)"$/);return s?s[1]:o}return r==="string"?Dw(n):n}function Dw(e){const t=e[0];return e.length>=2&&(t==="'"||t==='"')&&e[e.length-1]===t?e.slice(1,-1).replace(/\\(["'\\ntr])/g,(n,r)=>r==="n"?`
131
131
  `:r==="t"?" ":r==="r"?"\r":r):e}Ve.extend(ci);const jl=14,Iw=42;function Tw(e){const t=(e.annotations??[]).filter(r=>r.trim().startsWith("#("));if(t.length===0)return;const n=[];for(const r of t){const o=r.trim(),s=o.match(/description="([^"]*)"/);if(s){n.push(s[1]);continue}const i=o.replace(/^#\(/,"").replace(/\)\s*$/,"").trim();i&&n.push(i)}return n.length>0?n.join(`
132
132
  `):void 0}function Gu({given:e,value:t,onChange:n,options:r,optionsLoading:o,optionsFailed:s}){const i=e.label??e.name??"",a=e.type??"string",l=Tw(e),c=Mw(a,e.default),u=c!==void 0?`Default: ${c===""?"(empty)":c}`:void 0,d=l||u?f.jsxs(f.Fragment,{children:[l,l&&u?f.jsx("br",{}):null,u]}):void 0,h=a==="string"||Or(a)==="string",b=!Dn(a)||typeof t!="string"||gm(t),p=w=>f.jsx(se.TextField,{label:i,value:String(t),error:!0,inputProps:{readOnly:!0},helperText:f.jsxs(f.Fragment,{children:[`Not a ${w}. Clear it to pick one.`,d?f.jsx("br",{}):null,d]}),slotProps:{input:{endAdornment:f.jsx(Os,{onClear:()=>n(null)})}},fullWidth:!0,size:"small"}),g=Dn(a),y=e.control==="multiselect"&&g,S=Dn(a),P=e.control==="select"||e.control==="multiselect",C=P?S?typeof t=="string"?hm(t):[]:typeof t=="string"&&t!==""?[t]:[]:[];if(P&&h&&b&&!(!y&&C.length>1)){const w=A=>{const L=S?ui(A):void 0;if(A.length===0||L===""){n(null);return}n(S?L:A[0])};return f.jsx(se.Autocomplete,{multiple:y,disableCloseOnSelect:y,freeSolo:!0,forcePopupIcon:!0,autoSelect:!0,options:r??[],loading:o,noOptionsText:s?"Options unavailable":"No matching values",value:y?C:C[0]??null,onChange:(A,L)=>w(L===null?[]:Array.isArray(L)?L:[L]),renderInput:A=>f.jsx(se.TextField,{...A,label:i,size:"small",placeholder:C.length!==0?void 0:t===""?"All":c??"All",error:s,helperText:s?f.jsxs(f.Fragment,{children:["Could not load the options for this control. Type a value to filter anyway.",d?f.jsx("br",{}):null,d]}):d,slotProps:{input:{...A.InputProps,endAdornment:f.jsxs(f.Fragment,{children:[o&&f.jsx(se.CircularProgress,{size:16}),A.InputProps.endAdornment]})}}}),fullWidth:!0})}const x=Dn(a)&&Or(a)==="number",{rangeMin:I,rangeMax:M}=e,$=x&&typeof t=="string"?bm(t):void 0,R=x&&typeof t=="string"?xm(t):void 0;if((x||a==="number")&&I!==void 0&&M!==void 0&&(!x||t===void 0||t===null||t===""||$!==void 0||R!==void 0)){const w=R??($!==void 0?[$,M]:void 0),A=x?w?.[0]:typeof t=="number"?t:void 0;if(A===void 0&&t!==void 0&&t!==null&&t!=="")return p("number");const L=A??I,N=w??[I,M],Y=N[1]>=M?`≥ ${N[0]}`:`${N[0]} to ${N[1]}`,W=x&&t==="",J=A!==void 0||W;return f.jsxs(se.FormControl,{fullWidth:!0,children:[f.jsxs(se.Box,{sx:{height:Iw,px:`${jl}px`,display:"flex",flexDirection:"column",justifyContent:"center"},children:[f.jsxs(se.Stack,{direction:"row",alignItems:"center",spacing:1,children:[f.jsx(se.Typography,{variant:"body2",color:"text.secondary",noWrap:!0,children:i}),f.jsx(se.Typography,{variant:"body2",sx:{fontWeight:600},children:J?W?"Any":x?Y:String(L):x?"Any":c??"Unset"}),J&&f.jsx(se.IconButton,{size:"small","aria-label":"clear value",onClick:()=>n(null),sx:{p:0},children:f.jsx(Ro,{fontSize:"small"})})]}),f.jsx(se.Slider,{size:"small",min:I,max:M,value:x?N:L,disableSwap:x,valueLabelDisplay:"auto","aria-label":x?void 0:i,getAriaLabel:x?ce=>ce===0?`${i} from`:`${i} to`:void 0,sx:{py:0,mt:.5},onChange:(ce,ae)=>{if(x){const[V,q]=Array.isArray(ae)?[ae[0],ae[1]]:[ae,ae];if(V<=I&&q>=M){n(null);return}n(q>=M?ym(V):vm(V,q));return}n(Array.isArray(ae)?ae[0]:ae)}})]}),d&&f.jsx(se.FormHelperText,{sx:{mx:`${jl}px`},children:d})]})}const F=Dn(a)?Or(a):void 0,T=F==="date"||F==="timestamp"||F==="timestamptz",m=typeof t=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(t),O=t==null||m;if(T&&!m){const w=Rw(t);if(w!==void 0)return f.jsx(Ow,{label:i,state:w,onChange:n,helperNode:d,defaultDisplay:c})}if(T&&O){const w=m?Ve.utc(t):null;return f.jsx(Vr,{dateAdapter:Oo,children:f.jsx(Ur,{label:i,value:w?.isValid()?w:null,onChange:A=>n(A?A.format("YYYY-MM-DD"):null),slotProps:{textField:{fullWidth:!0,size:"small",helperText:d},field:{clearable:!0,onClear:()=>n(null)}}})})}if(a==="boolean"){const w=typeof t=="boolean";if(!w&&t!==void 0&&t!==null)return p("true or false");const A=e.default?.trim()==="true",L=w?t:A;return f.jsxs(se.FormControl,{children:[f.jsxs(se.Stack,{direction:"row",alignItems:"center",children:[f.jsx(se.FormControlLabel,{control:f.jsx(se.Checkbox,{checked:L,onChange:N=>n(N.target.checked)}),label:i}),w&&f.jsx(se.IconButton,{size:"small","aria-label":"clear value",onClick:()=>n(null),edge:"end",children:f.jsx(Ro,{fontSize:"small"})})]}),d&&f.jsx(se.FormHelperText,{children:d})]})}if(a==="number"){const w=typeof t=="number"?t:"",A=t!=null;return A&&t!==""&&typeof t!="number"?p("number"):f.jsx(se.TextField,{label:i,type:"number",value:w,onChange:L=>{const N=L.target.value;n(N===""?null:Number(N))},placeholder:c,helperText:d,slotProps:{input:{endAdornment:A&&f.jsx(Os,{onClear:()=>n(null)})}},fullWidth:!0,size:"small"})}if(a==="date"||a==="timestamp"||a==="timestamptz"){const w=t instanceof Date?t:typeof t=="string"?(N=>N instanceof Date?N:null)(wc(a,t)):null,A=w?Ve.utc(w):null;return t!=null&&t!==""&&w===null?p("date"):f.jsx(Vr,{dateAdapter:Oo,children:f.jsx(Ur,{label:i,value:A,onChange:N=>n(N?Dm(N,w??void 0):null),slotProps:{textField:{fullWidth:!0,size:"small",helperText:d},field:{clearable:!0,onClear:()=>n(null)}}})})}const D=typeof t=="string"?t:"",k=t!=null;return f.jsx(se.TextField,{label:i,value:D,onChange:w=>n(w.target.value),placeholder:k?void 0:c??(a.startsWith("filter<")?a:void 0),helperText:d,slotProps:{input:{endAdornment:k&&f.jsx(Os,{onClear:()=>n(null)})}},fullWidth:!0,size:"small"})}function Os({onClear:e}){return f.jsx(se.InputAdornment,{position:"end",children:f.jsx(se.IconButton,{size:"small","aria-label":"clear value",onClick:e,edge:"end",children:f.jsx(Ro,{fontSize:"small"})})})}function Rw(e){if(e==null)return{kind:"unset"};if(typeof e!="string")return;if(e==="")return{kind:"any"};const t=Cm(e);if(t!==void 0)return{kind:"preset",key:t};const n=km(e);if(n!==void 0)return{kind:"days",...n}}const fo="__custom__",$s="__any__";function Ow({label:e,state:t,onChange:n,helperNode:r,defaultDisplay:o}){const s=t.kind==="days"?`days:${t.firstDay}/${t.lastDay}`:t.kind==="preset"?`preset:${t.key}`:t.kind,[i,a]=ie.useState(t.kind==="days"),[l,c]=ie.useState(t.kind==="days"?{from:t.firstDay,to:t.lastDay}:{});ie.useEffect(()=>{t.kind==="days"?(a(!0),c({from:t.firstDay,to:t.lastDay})):t.kind!=="unset"&&a(!1)},[s]);const u=t.kind!=="unset",d=i?fo:t.kind==="preset"?t.key:t.kind==="any"?$s:"",h=p=>{c(p),p.from&&p.to&&!Ve.utc(p.to).isBefore(Ve.utc(p.from))&&n(Pm(p.from,p.to))},b=p=>{const g=p?Ve.utc(p):null;return g?.isValid()?g:null};return f.jsxs(se.Stack,{direction:"row",spacing:1,"data-testid":"time-range",children:[f.jsxs(se.TextField,{select:!0,label:e,value:d,size:"small",fullWidth:!0,helperText:r,slotProps:{select:{displayEmpty:!0,renderValue:p=>{if(p===fo)return"Custom range";if(p===$s)return"Any time";const g=To.find(y=>y.key===p);return g?g.label:o??"Any time"}},input:{endAdornment:u?f.jsx(se.IconButton,{size:"small","aria-label":"clear value",onClick:()=>{a(!1),c({}),n(null)},sx:{mr:2},children:f.jsx(Ro,{fontSize:"small"})}):void 0}},onChange:p=>{const g=p.target.value;if(g===fo){a(!0);return}a(!1);const y=Sm(g);y!==void 0&&n(y)},children:[t.kind==="any"&&f.jsx(se.MenuItem,{value:$s,children:"Any time"}),To.map(p=>f.jsx(se.MenuItem,{value:p.key,children:p.label},p.key)),f.jsx(se.MenuItem,{value:fo,children:"Custom range"})]}),i&&f.jsxs(Vr,{dateAdapter:Oo,children:[f.jsx(Ur,{label:"From",value:b(l.from),onChange:p=>h({...l,from:p?p.format("YYYY-MM-DD"):void 0}),slotProps:{textField:{size:"small"}}}),f.jsx(Ur,{label:"To",value:b(l.to),minDate:b(l.from)??void 0,onChange:p=>h({...l,to:p?p.format("YYYY-MM-DD"):void 0}),slotProps:{textField:{size:"small"}}})]})]})}function qu({givens:e,values:t,onChange:n,onReset:r,layout:o="panel",options:s,optionsLoading:i,optionsFailed:a,apply:l,title:c}){const{theme:u}=Ge.usePublisherTheme();if(e.length===0)return null;const d=Array.from(t.values()).some(p=>p!==null),h=e.map(p=>f.jsx(se.Box,{sx:o==="bar"?{minWidth:200,flex:"1 1 200px",maxWidth:320}:void 0,children:f.jsx(Gu,{given:p,value:p.name?t.get(p.name):void 0,onChange:g=>p.name&&n(p.name,g),options:p.name?s?.get(p.name):void 0,optionsLoading:i,optionsFailed:p.name?a?.has(p.name):void 0})},p.name)),b=f.jsxs(se.Stack,{direction:"row",alignItems:"center",spacing:1,children:[l&&f.jsx(se.Button,{variant:"contained",size:"small",disableElevation:!0,onClick:l.onApply,disabled:!l.pending,sx:{textTransform:"none"},children:"Apply"}),d&&f.jsx(se.Button,{variant:"text",size:"small",onClick:r,sx:{textTransform:"none"},children:"Reset"})]});return o==="bar"?f.jsx(se.Paper,{elevation:0,sx:{p:2,border:u.cardBorder,borderRadius:1,backgroundColor:"transparent"},children:f.jsxs(se.Stack,{direction:"row",alignItems:"flex-start",spacing:2,useFlexGap:!0,sx:{flexWrap:"wrap"},children:[h,f.jsx(se.Box,{sx:{flex:"0 0 auto",ml:"auto",pt:.5},children:b})]})}):f.jsxs(se.Paper,{elevation:0,sx:{p:3,backgroundColor:"transparent",border:"none",boxShadow:"none"},children:[f.jsxs(se.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{mb:2},children:[f.jsx(se.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary"},children:c??"Parameters"}),b]}),f.jsx(se.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",alignItems:"start",columnGap:3,rowGap:2.5},children:h})]})}const $w=/^(https?|mailto|tel):/i,Ew=/^[a-z][a-z0-9+.-]*:/i;function Aw({href:e,title:t,children:n,context:r}){const o=!!e&&Ew.test(e),s=!!e&&!o&&!e.startsWith("/")&&!e.startsWith("#");if(!e||!s||!r){const d=o&&!$w.test(e??"");return f.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 f.jsx("a",{href:c,title:t,onClick:u?d=>{d.preventDefault(),u(c,d)}:void 0,children:n})}const Fw={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 Ku({children:e,variant:t="caption",links:n,sx:r}){return f.jsx(se.Box,{sx:[Fw[t],...Array.isArray(r)?r:[r]],children:f.jsx(Md,{options:{overrides:{a:{component:Aw,props:{context:n}}}},children:e})})}function cr({text:e,size:t=20,color:n="primary",thickness:r=3.6,centered:o=!0,spacing:s=2,textVariant:i="body2"}){const a=f.jsxs(se.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:s},children:[f.jsx(se.CircularProgress,{size:t,color:n,thickness:r}),e&&f.jsx(se.Typography,{variant:i,color:"text.secondary",children:e})]});return o?f.jsx(se.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",width:"100%"},children:a}):a}const Lw=new Set(["bar","line","chart","scatter_chart"]),Nw=new Set(["table","dashboard","shape_map","segment_map","list","list_detail","big_value","cell","link","image"]);function jw(e,t){return t==="fill"?"container":t==="fixed"||!e?"content":Lw.has(e)?"container":"content"}function Bw(e,t){return t==="fixed"?!0:t==="fill"?!1:e!==void 0&&Nw.has(e)}function Vw(e){return e==="dashboard"?3:2}function Qu(e,t){let n=e.firstElementChild;for(let r=1;r<t&&n;r++)n=n.firstElementChild;return n}function zw(e,t){const n=Qu(e,t);return n&&(n.scrollHeight||n.offsetHeight)||0}const Xu=400,Ww=700,_w=600,Hw=800,Zu=400,Qs=2e3;function Ju(e){return e===void 0?Qs:Math.min(e,Qs)}function ed({sizing:e,contentHeight:t,maxHeight:n}){return e==="container"?n??Zu:t===void 0||t<=0?Ju(n):n===void 0?t:Math.min(n,t)}const td=2,nd=16;function Uw(e,t){const n=Math.min(e.colspan??1,t);return e.break?`1 / span ${n}`:`span ${n}`}function rd({tiles:e,columns:t,keyOf:n,renderTile:r}){return f.jsx(se.Box,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:`repeat(${t}, minmax(0, 1fr))`},gap:`${nd}px`},children:e.map((o,s)=>f.jsx(se.Box,{sx:{display:"grid",minWidth:0,gridColumn:{md:Uw(o,t)}},children:r(o,s)},n(o,s)))})}const Yw=ct(f.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 od(e){return["queryResult",e.environmentName,e.packageName,e.versionId,e.modelPath,e.queryName,e.query,e.sourceName,JSON.stringify(e.givens??{})]}function Gi(e,{enabled:t=!0}={}){const{apiClients:n}=Ge.useServer();return Zo({queryKey:od(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})}const sd=ct(f.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 id({sx:e,...t}){const{theme:n}=Ge.usePublisherTheme();return f.jsx(se.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 Gw=new Set(["warn","error"]);function qw(e){if(!e?.length)return;const t=[];let n=!1;for(const r of e)!r.message||!Gw.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(`
133
- `)}}const Kw=ie.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-GukOadCi.cjs.js")).then(e=>e.RenderedResult$1));function ad({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=qw(r);if(!e)return null;if(n>0&&e.length>n&&!u)return f.jsxs(se.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,p:4,backgroundColor:"#fafafa",border:"1px solid",borderColor:"#e0e0e0",borderRadius:1},children:[f.jsx(Dd.Warning,{sx:{fontSize:48,color:"#757575"}}),f.jsx(se.Typography,{variant:"h6",color:"text.secondary",align:"center",children:"Processing large results may cause browser performance issues. Proceed?"}),f.jsx(se.Button,{variant:"contained",color:"primary",onClick:()=>d(!0),children:"Proceed"})]});const p=f.jsx(cr,{text:"Loading...",centered:!0,size:32}),g=ed({sizing:i,contentHeight:l,maxHeight:t});return f.jsxs(se.Box,{ref:s,sx:{position:"relative",height:"auto",border:"0px",borderRadius:0,overflow:"hidden"},children:[e&&f.jsx(ie.Suspense,{fallback:p,children:f.jsx(Kw,{result:e,height:g,onSizeChange:c,onSizing:a,drill:o})}),h&&f.jsx(se.Box,{sx:{position:"absolute",top:4,right:4,zIndex:1},children:f.jsx(se.Tooltip,{title:h.title,slotProps:{tooltip:{sx:{whiteSpace:"pre-line"}}},children:f.jsx(id,{"aria-label":"Render tag warnings",children:f.jsx(sd,{fontSize:"small",color:h.severity==="error"?"error":"warning"})})})})]})}function qi({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?f.jsx(se.Box,{sx:{p:2},children:f.jsx(jo,{context:t,error:u})}):l?f.jsx(ad,{result:h,maxHeight:r,maxResultSize:o,renderLogs:a.data.renderLogs,drill:s}):f.jsx(cr,{text:n})}const Qw=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"]),Xw={value:`# big_value
133
+ `)}}const Kw=ie.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-ChkvK7b2.cjs.js")).then(e=>e.RenderedResult$1));function ad({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=qw(r);if(!e)return null;if(n>0&&e.length>n&&!u)return f.jsxs(se.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,p:4,backgroundColor:"#fafafa",border:"1px solid",borderColor:"#e0e0e0",borderRadius:1},children:[f.jsx(Dd.Warning,{sx:{fontSize:48,color:"#757575"}}),f.jsx(se.Typography,{variant:"h6",color:"text.secondary",align:"center",children:"Processing large results may cause browser performance issues. Proceed?"}),f.jsx(se.Button,{variant:"contained",color:"primary",onClick:()=>d(!0),children:"Proceed"})]});const p=f.jsx(cr,{text:"Loading...",centered:!0,size:32}),g=ed({sizing:i,contentHeight:l,maxHeight:t});return f.jsxs(se.Box,{ref:s,sx:{position:"relative",height:"auto",border:"0px",borderRadius:0,overflow:"hidden"},children:[e&&f.jsx(ie.Suspense,{fallback:p,children:f.jsx(Kw,{result:e,height:g,onSizeChange:c,onSizing:a,drill:o})}),h&&f.jsx(se.Box,{sx:{position:"absolute",top:4,right:4,zIndex:1},children:f.jsx(se.Tooltip,{title:h.title,slotProps:{tooltip:{sx:{whiteSpace:"pre-line"}}},children:f.jsx(id,{"aria-label":"Render tag warnings",children:f.jsx(sd,{fontSize:"small",color:h.severity==="error"?"error":"warning"})})})})]})}function qi({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?f.jsx(se.Box,{sx:{p:2},children:f.jsx(jo,{context:t,error:u})}):l?f.jsx(ad,{result:h,maxHeight:r,maxResultSize:o,renderLogs:a.data.renderLogs,drill:s}):f.jsx(cr,{text:n})}const Qw=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"]),Xw={value:`# big_value
134
134
  `},Zw=/^#\(malloy\)[\s\S]*\bcalculation\b/;function Jw(e){return e?e.kind==="measure"?!0:(e.annotations??[]).some(t=>typeof t?.value=="string"&&Zw.test(t.value.trim())):!1}function eP(e){const t=e.schema?.fields;if(!Array.isArray(t)||t.length===0||!t.every(Jw))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 tP(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(Qw.has(o))return!0}return!1}function nP(e){let t;try{t=JSON.parse(e)}catch{return e}if(!t||typeof t!="object"||!eP(t))return e;const n=Array.isArray(t.annotations)?t.annotations:[],r=n.map(o=>o?.value).filter(o=>typeof o=="string");return tP(r)?e:JSON.stringify({...t,annotations:[Xw,...n]})}const Ki=20,rP={radius:"8px",padding:`${Ki}px`};function oP(e,t=rP){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 ld({borderless:e=!1,sx:t,children:n}){const{theme:r}=Ge.usePublisherTheme();return f.jsx(se.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":`${Ki}px`},...Array.isArray(t)?t:[t]],children:n})}function cd({title:e,subtitle:t,tooltip:n,action:r}){const{theme:o}=Ge.usePublisherTheme();return f.jsxs(se.Box,{sx:{pb:1.5,display:"flex",alignItems:"flex-start",gap:1},children:[f.jsxs(se.Box,{sx:{minWidth:0,flex:1},children:[f.jsx(se.Typography,{variant:"subtitle2",sx:{fontWeight:500,color:o.tileTitle,fontFamily:o.font.family},title:n,children:e}),t!==void 0&&f.jsx(se.Typography,{variant:"caption",sx:{display:"block",color:o.tileTitle,fontFamily:o.font.family,opacity:.8},children:t})]}),r]})}function Xs(e){const t=e.split("->").at(-1)?.trim()??e;return/^[A-Za-z_][\w-]*$/.test(t)?pi(t):e}function Zs({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(),S=Gi({environmentName:e,packageName:t,modelPath:r,versionId:n,queryName:o,query:s!==void 0?`run: ${s}`:void 0,givens:Xo(c,u,d)});return f.jsxs(ld,{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&&f.jsx(cd,{title:i??Xs(s),subtitle:a,tooltip:s,action:g&&f.jsx(se.Tooltip,{title:"Explore from here",children:f.jsx(se.IconButton,{className:"publisher-tile-explore",size:"small","aria-label":`Explore ${i??Xs(s)}`,onClick:g,sx:{mt:-.5,mr:-.5,color:y.tileTitle},children:f.jsx(Yw,{fontSize:"small"})})})}),f.jsx(qi,{state:S,context:s??o??r,maxHeight:h,maxResultSize:b,drill:p,transform:s!==void 0?nP:void 0})]})}function Bl({array1:e,array2:t,parser:n=r=>r}){return e&&t&&e.length===t.length&&e.every((r,o)=>n(r)===n(t[o]))}function Vl(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function sP(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:s,trim:i=!1}=e;return(a,{inputValue:l,getOptionLabel:c})=>{let u=i?l.trim():l;n&&(u=u.toLowerCase()),t&&(u=Vl(u));const d=u?a.filter(h=>{let b=(s||c)(h);return n&&(b=b.toLowerCase()),t&&(b=Vl(b)),o==="start"?b.startsWith(u):b.includes(u)}):a;return typeof r=="number"?d.slice(0,r):d}}const iP=sP(),zl=5,aP=e=>e.current!==null&&e.current.parentElement?.contains(document.activeElement),lP=[];function Wl(e,t,n,r){if(t||e==null||r)return"";const o=n(e);return typeof o=="string"?o:""}function cP(e){const{unstable_isActiveElementInListbox:t=aP,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:s=!1,blurOnSelect:i=!1,clearOnBlur:a=!e.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:u=e.multiple?lP:null,disableClearable:d=!1,disableCloseOnSelect:h=!1,disabled:b,disabledItemsFocusable:p=!1,disableListWrap:g=!1,filterOptions:y=iP,filterSelectedOptions:S=!1,freeSolo:P=!1,getOptionDisabled:C,getOptionKey:x,getOptionLabel:I=Z=>Z.label??Z,groupBy:M,handleHomeEndKeys:$=!e.freeSolo,id:R,includeInputInList:E=!1,inputValue:F,isOptionEqualToValue:T=(Z,X)=>Z===X,multiple:m=!1,onChange:O,onClose:D,onHighlightChange:k,onInputChange:w,onOpen:A,open:L,openOnFocus:N=!1,options:Y,readOnly:W=!1,renderValue:J,selectOnFocus:ce=!e.freeSolo,value:ae}=e,V=_t(R);let q=I;q=Z=>{const X=I(Z);return typeof X!="string"?String(X):X};const ne=v.useRef(!1),K=v.useRef(!0),z=v.useRef(null),G=v.useRef(null),[oe,re]=v.useState(null),[B,ee]=v.useState(-1),le=o?0:-1,te=v.useRef(le),pe=v.useRef(Wl(u??ae,m,q)).current,[H,ye]=Mt({controlled:ae,default:u,name:c}),[de,Me]=Mt({controlled:F,default:pe,name:c,state:"inputValue"}),[he,et]=v.useState(!1),Le=v.useCallback((Z,X,ge)=>{if(!(m?H.length<X.length:X!==null)&&!a)return;const Pe=Wl(X,m,q,J);de!==Pe&&(Me(Pe),w&&w(Z,Pe,ge))},[q,de,m,w,Me,a,H,J]),[Xe,nt]=Mt({controlled:L,default:!1,name:c,state:"open"}),[mt,rt]=v.useState(!0),xt=!m&&H!=null&&de===q(H),_e=Xe&&!W,Ce=_e?y(Y.filter(Z=>!(S&&(m?H:[H]).some(X=>X!==null&&T(Z,X)))),{inputValue:xt&&mt?"":de,getOptionLabel:q}):[],tt=mh({filteredOptions:Ce,value:H,inputValue:de});v.useEffect(()=>{const Z=H!==tt.value;he&&!Z||P&&!Z||Le(null,H,"reset")},[H,Le,he,tt.value,P]);const St=Xe&&Ce.length>0&&!W,ut=fe(Z=>{if(Z===-1)z.current.focus();else{const X=J?"data-item-index":"data-tag-index";oe.querySelector(`[${X}="${Z}"]`).focus()}});v.useEffect(()=>{m&&B>H.length-1&&(ee(-1),ut(-1))},[H,m,B,ut]);function xe(Z,X){if(!G.current||Z<0||Z>=Ce.length)return-1;let ge=Z;for(;;){const we=G.current.querySelector(`[data-option-index="${ge}"]`),Pe=p?!1:!we||we.disabled||we.getAttribute("aria-disabled")==="true";if(we&&we.hasAttribute("tabindex")&&!Pe)return ge;if(X==="next"?ge=(ge+1)%Ce.length:ge=(ge-1+Ce.length)%Ce.length,ge===Z)return-1}}const Ie=fe(({event:Z,index:X,reason:ge})=>{if(te.current=X,X===-1?z.current.removeAttribute("aria-activedescendant"):z.current.setAttribute("aria-activedescendant",`${V}-option-${X}`),k&&["mouse","keyboard","touch"].includes(ge)&&k(Z,X===-1?null:Ce[X],ge),!G.current)return;const we=G.current.querySelector(`[role="option"].${n}-focused`);we&&(we.classList.remove(`${n}-focused`),we.classList.remove(`${n}-focusVisible`));let Pe=G.current;if(G.current.getAttribute("role")!=="listbox"&&(Pe=G.current.parentElement.querySelector('[role="listbox"]')),!Pe)return;if(X===-1){Pe.scrollTop=0;return}const lt=G.current.querySelector(`[data-option-index="${X}"]`);if(lt&&(lt.classList.add(`${n}-focused`),ge==="keyboard"&&lt.classList.add(`${n}-focusVisible`),Pe.scrollHeight>Pe.clientHeight&&ge!=="mouse"&&ge!=="touch")){const Ze=lt,Vt=Pe.clientHeight+Pe.scrollTop,oo=Ze.offsetTop+Ze.offsetHeight;oo>Vt?Pe.scrollTop=oo-Pe.clientHeight:Ze.offsetTop-Ze.offsetHeight*(M?1.3:0)<Pe.scrollTop&&(Pe.scrollTop=Ze.offsetTop-Ze.offsetHeight*(M?1.3:0))}}),$e=fe(({event:Z,diff:X,direction:ge="next",reason:we})=>{if(!_e)return;const lt=xe((()=>{const Ze=Ce.length-1;if(X==="reset")return le;if(X==="start")return 0;if(X==="end")return Ze;const Vt=te.current+X;return Vt<0?Vt===-1&&E?-1:g&&te.current!==-1||Math.abs(X)>1?0:Ze:Vt>Ze?Vt===Ze+1&&E?-1:g||Math.abs(X)>1?Ze:0:Vt})(),ge);if(Ie({index:lt,reason:we,event:Z}),r&&X!=="reset")if(lt===-1)z.current.value=de;else{const Ze=q(Ce[lt]);z.current.value=Ze,Ze.toLowerCase().indexOf(de.toLowerCase())===0&&de.length>0&&z.current.setSelectionRange(de.length,Ze.length)}}),Ct=!Bl({array1:tt.filteredOptions,array2:Ce,parser:q}),Ne=()=>{const Z=(X,ge)=>{const we=X?q(X):"",Pe=ge?q(ge):"";return we===Pe};if(te.current!==-1&&!Bl({array1:tt.filteredOptions,array2:Ce,parser:q})&&tt.inputValue===de&&(m?H.length===tt.value.length&&tt.value.every((X,ge)=>q(H[ge])===q(X)):Z(tt.value,H))){const X=tt.filteredOptions[te.current];if(X)return Ce.findIndex(ge=>q(ge)===q(X))}return-1},pt=v.useCallback(()=>{if(!_e)return;const Z=Ne();if(Z!==-1){te.current=Z;return}const X=m?H[0]:H;if(Ce.length===0||X==null){$e({diff:"reset"});return}if(G.current){if(X!=null){const ge=Ce[te.current];if(m&&ge&&H.findIndex(Pe=>T(ge,Pe))!==-1)return;const we=Ce.findIndex(Pe=>T(Pe,X));we===-1?$e({diff:"reset"}):Ie({index:we});return}if(te.current>=Ce.length-1){Ie({index:Ce.length-1});return}Ie({index:te.current})}},[Ce.length,m?!1:H,S,$e,Ie,_e,de,m]),ht=fe(Z=>{js(G,Z),Z&&pt()});v.useEffect(()=>{Ct&&pt()},[pt,Ct]);const it=Z=>{Xe||(nt(!0),rt(!0),A&&A(Z))},bn=(Z,X)=>{Xe&&(nt(!1),D&&D(Z,X))},Xt=(Z,X,ge,we)=>{if(m){if(H.length===X.length&&H.every((Pe,lt)=>Pe===X[lt]))return}else if(H===X)return;O&&O(Z,X,ge,we),ye(X)},Zt=v.useRef(!1),ln=(Z,X,ge="selectOption",we="options")=>{let Pe=ge,lt=X;if(m){lt=Array.isArray(H)?H.slice():[];const Ze=lt.findIndex(Vt=>T(X,Vt));Ze===-1?lt.push(X):we!=="freeSolo"&&(lt.splice(Ze,1),Pe="removeOption")}Le(Z,lt,Pe),Xt(Z,lt,Pe,{option:X}),!h&&(!Z||!Z.ctrlKey&&!Z.metaKey)&&bn(Z,Pe),(i===!0||i==="touch"&&Zt.current||i==="mouse"&&!Zt.current)&&z.current.blur()};function ds(Z,X){if(Z===-1)return-1;let ge=Z;for(;;){if(X==="next"&&ge===H.length||X==="previous"&&ge===-1)return-1;const we=J?"data-item-index":"data-tag-index",Pe=oe.querySelector(`[${we}="${ge}"]`);if(!Pe||!Pe.hasAttribute("tabindex")||Pe.disabled||Pe.getAttribute("aria-disabled")==="true")ge+=X==="next"?1:-1;else return ge}}const vn=(Z,X)=>{if(!m)return;de===""&&bn(Z,"toggleInput");let ge=B;B===-1?de===""&&X==="previous"&&(ge=H.length-1):(ge+=X==="next"?1:-1,ge<0&&(ge=0),ge===H.length&&(ge=-1)),ge=ds(ge,X),ee(ge),ut(ge)},no=Z=>{ne.current=!0,Me(""),w&&w(Z,"","clear"),Xt(Z,m?[]:null,"clear")},ps=Z=>X=>{if(Z.onKeyDown&&Z.onKeyDown(X),!X.defaultMuiPrevented&&(B!==-1&&!["ArrowLeft","ArrowRight"].includes(X.key)&&(ee(-1),ut(-1)),X.which!==229))switch(X.key){case"Home":_e&&$&&(X.preventDefault(),$e({diff:"start",direction:"next",reason:"keyboard",event:X}));break;case"End":_e&&$&&(X.preventDefault(),$e({diff:"end",direction:"previous",reason:"keyboard",event:X}));break;case"PageUp":X.preventDefault(),$e({diff:-zl,direction:"previous",reason:"keyboard",event:X}),it(X);break;case"PageDown":X.preventDefault(),$e({diff:zl,direction:"next",reason:"keyboard",event:X}),it(X);break;case"ArrowDown":X.preventDefault(),$e({diff:1,direction:"next",reason:"keyboard",event:X}),it(X);break;case"ArrowUp":X.preventDefault(),$e({diff:-1,direction:"previous",reason:"keyboard",event:X}),it(X);break;case"ArrowLeft":!m&&J?ut(0):vn(X,"previous");break;case"ArrowRight":!m&&J?ut(-1):vn(X,"next");break;case"Enter":if(te.current!==-1&&_e){const ge=Ce[te.current],we=C?C(ge):!1;if(X.preventDefault(),we)return;ln(X,ge,"selectOption"),r&&z.current.setSelectionRange(z.current.value.length,z.current.value.length)}else P&&de!==""&&xt===!1&&(m&&X.preventDefault(),ln(X,de,"createOption","freeSolo"));break;case"Escape":_e?(X.preventDefault(),X.stopPropagation(),bn(X,"escape")):l&&(de!==""||m&&H.length>0||J)&&(X.preventDefault(),X.stopPropagation(),no(X));break;case"Backspace":if(m&&!W&&de===""&&H.length>0){const ge=B===-1?H.length-1:B,we=H.slice();we.splice(ge,1),Xt(X,we,"removeOption",{option:H[ge]})}!m&&J&&!W&&(ye(null),ut(-1));break;case"Delete":if(m&&!W&&de===""&&H.length>0&&B!==-1){const ge=B,we=H.slice();we.splice(ge,1),Xt(X,we,"removeOption",{option:H[ge]})}!m&&J&&!W&&(ye(null),ut(-1));break}},Vn=Z=>{et(!0),N&&!ne.current&&it(Z)},zn=Z=>{if(t(G)){z.current.focus();return}et(!1),K.current=!0,ne.current=!1,s&&te.current!==-1&&_e?ln(Z,Ce[te.current],"blur"):s&&P&&de!==""?ln(Z,de,"blur","freeSolo"):a&&Le(Z,H,"blur"),bn(Z,"blur")},pr=Z=>{const X=Z.target.value;de!==X&&(Me(X),rt(!1),w&&w(Z,X,"input")),X===""?!d&&!m&&Xt(Z,null,"clear"):it(Z)},fs=Z=>{const X=Number(Z.currentTarget.getAttribute("data-option-index"));te.current!==X&&Ie({event:Z,index:X,reason:"mouse"})},ms=Z=>{Ie({event:Z,index:Number(Z.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Zt.current=!0},hs=Z=>{const X=Number(Z.currentTarget.getAttribute("data-option-index"));ln(Z,Ce[X],"selectOption"),Zt.current=!1},gs=Z=>X=>{const ge=H.slice();ge.splice(Z,1),Xt(X,ge,"removeOption",{option:H[Z]})},fr=Z=>{Xt(Z,null,"removeOption",{option:H})},ot=Z=>{Xe?bn(Z,"toggleInput"):it(Z)},at=Z=>{Z.currentTarget.contains(Z.target)&&Z.target.getAttribute("id")!==V&&Z.preventDefault()},cn=Z=>{Z.currentTarget.contains(Z.target)&&(z.current.focus(),ce&&K.current&&z.current.selectionEnd-z.current.selectionStart===0&&z.current.select(),K.current=!1)},ys=Z=>{!b&&(de===""||!Xe)&&ot(Z)};let mr=P&&de.length>0;mr=mr||(m?H.length>0:H!==null);let ro=Ce;return M&&(ro=Ce.reduce((Z,X,ge)=>{const we=M(X);return Z.length>0&&Z[Z.length-1].group===we?Z[Z.length-1].options.push(X):Z.push({key:ge,index:ge,group:we,options:[X]}),Z},[])),b&&he&&zn(),{getRootProps:(Z={})=>({...Z,onKeyDown:ps(Z),onMouseDown:at,onClick:cn}),getInputLabelProps:()=>({id:`${V}-label`,htmlFor:V}),getInputProps:()=>({id:V,value:de,onBlur:zn,onFocus:Vn,onChange:pr,onMouseDown:ys,"aria-activedescendant":_e?"":null,"aria-autocomplete":r?"both":"list","aria-controls":St?`${V}-listbox`:void 0,"aria-expanded":St,autoComplete:"off",ref:z,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:b}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:no}),getItemProps:({index:Z=0}={})=>({...m&&{key:Z},...J?{"data-item-index":Z}:{"data-tag-index":Z},tabIndex:-1,...!W&&{onDelete:m?gs(Z):fr}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:ot}),getTagProps:({index:Z})=>({key:Z,"data-tag-index":Z,tabIndex:-1,...!W&&{onDelete:gs(Z)}}),getListboxProps:()=>({role:"listbox",id:`${V}-listbox`,"aria-labelledby":`${V}-label`,ref:ht,onMouseDown:Z=>{Z.preventDefault()}}),getOptionProps:({index:Z,option:X})=>{const ge=(m?H:[H]).some(Pe=>Pe!=null&&T(X,Pe)),we=C?C(X):!1;return{key:x?.(X)??q(X),tabIndex:-1,role:"option",id:`${V}-option-${Z}`,onMouseMove:fs,onClick:hs,onTouchStart:ms,"data-option-index":Z,"aria-disabled":we,"aria-selected":ge}},id:V,inputValue:de,value:H,dirty:mr,expanded:_e&&oe,popupOpen:_e,focused:he||B!==-1,anchorEl:oe,setAnchorEl:re,focusedItem:B,focusedTag:B,groupedOptions:ro}}function uP(e){return Se("MuiListSubheader",e)}be("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const dP=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:s}=e,i={root:["root",n!=="default"&&`color${ue(n)}`,!r&&"gutters",o&&"inset",!s&&"sticky"]};return ve(i,uP,t)},pP=_("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${ue(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(Re(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),Js=v.forwardRef(function(t,n){const r=Oe({props:t,name:"MuiListSubheader"}),{className:o,color:s="default",component:i="li",disableGutters:a=!1,disableSticky:l=!1,inset:c=!1,...u}=r,d={...r,color:s,component:i,disableGutters:a,disableSticky:l,inset:c},h=dP(d);return f.jsx(pP,{as:i,className:me(h.root,o),ref:n,ownerState:d,...u})});Js&&(Js.muiSkipListHighlight=!0);const fP=ct(f.jsx("path",{d:"M19 6.41L17.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 mP(e){return Se("MuiAutocomplete",e)}const De=be("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var _l,Hl;const hP=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:s,hasClearIcon:i,hasPopupIcon:a,inputFocused:l,popupOpen:c,size:u}=e,d={root:["root",r&&"expanded",o&&"focused",s&&"fullWidth",i&&"hasClearIcon",a&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${ue(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return ve(d,mP,t)},gP=_("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:s,inputFocused:i,size:a}=n;return[{[`& .${De.tag}`]:t.tag},{[`& .${De.tag}`]:t[`tagSize${ue(a)}`]},{[`& .${De.inputRoot}`]:t.inputRoot},{[`& .${De.input}`]:t.input},{[`& .${De.input}`]:i&&t.inputFocused},t.root,r&&t.fullWidth,s&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${De.focused} .${De.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${De.clearIndicator}`]:{visibility:"visible"}},[`& .${De.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${De.inputRoot}`]:{[`.${De.hasPopupIcon}&, .${De.hasClearIcon}&`]:{paddingRight:30},[`.${De.hasPopupIcon}.${De.hasClearIcon}&`]:{paddingRight:56},[`& .${De.input}`]:{width:0,minWidth:30}},[`& .${fn.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${fn.root}.${wt.sizeSmall}`]:{[`& .${fn.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Tt.root}`]:{padding:9,[`.${De.hasPopupIcon}&, .${De.hasClearIcon}&`]:{paddingRight:39},[`.${De.hasPopupIcon}.${De.hasClearIcon}&`]:{paddingRight:65},[`& .${De.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${De.endAdornment}`]:{right:9}},[`& .${Tt.root}.${wt.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${De.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Pt.root}`]:{paddingTop:19,paddingLeft:8,[`.${De.hasPopupIcon}&, .${De.hasClearIcon}&`]:{paddingRight:39},[`.${De.hasPopupIcon}.${De.hasClearIcon}&`]:{paddingRight:65},[`& .${Pt.input}`]:{padding:"7px 4px"},[`& .${De.endAdornment}`]:{right:9}},[`& .${Pt.root}.${wt.sizeSmall}`]:{paddingBottom:1,[`& .${Pt.input}`]:{padding:"2.5px 4px"}},[`& .${wt.hiddenLabel}`]:{paddingTop:8},[`& .${Pt.root}.${wt.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${De.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Pt.root}.${wt.hiddenLabel}.${wt.sizeSmall}`]:{[`& .${De.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${De.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${De.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${De.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${De.inputRoot}`]:{flexWrap:"wrap"}}}]}),yP=_("div",{name:"MuiAutocomplete",slot:"EndAdornment"})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),bP=_(Nn,{name:"MuiAutocomplete",slot:"ClearIndicator"})({marginRight:-2,padding:4,visibility:"hidden"}),vP=_(Nn,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),xP=_(Oi,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${De.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(Re(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),SP=_(jn,{name:"MuiAutocomplete",slot:"Paper"})(Re(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),CP=_("div",{name:"MuiAutocomplete",slot:"Loading"})(Re(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),wP=_("div",{name:"MuiAutocomplete",slot:"NoOptions"})(Re(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),PP=_("ul",{name:"MuiAutocomplete",slot:"Listbox"})(Re(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${De.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${De.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${De.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${De.focused}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${De.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),kP=_(Js,{name:"MuiAutocomplete",slot:"GroupLabel"})(Re(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),MP=_("ul",{name:"MuiAutocomplete",slot:"GroupUl"})({padding:0,[`& .${De.option}`]:{paddingLeft:24}}),ud=v.forwardRef(function(t,n){const r=Oe({props:t,name:"MuiAutocomplete"}),{autoComplete:o=!1,autoHighlight:s=!1,autoSelect:i=!1,blurOnSelect:a=!1,ChipProps:l,className:c,clearIcon:u=_l||(_l=f.jsx(fP,{fontSize:"small"})),clearOnBlur:d=!r.freeSolo,clearOnEscape:h=!1,clearText:b="Clear",closeText:p="Close",componentsProps:g,defaultValue:y=r.multiple?[]:null,disableClearable:S=!1,disableCloseOnSelect:P=!1,disabled:C=!1,disabledItemsFocusable:x=!1,disableListWrap:I=!1,disablePortal:M=!1,filterOptions:$,filterSelectedOptions:R=!1,forcePopupIcon:E="auto",freeSolo:F=!1,fullWidth:T=!1,getLimitTagsText:m=Ee=>`+${Ee}`,getOptionDisabled:O,getOptionKey:D,getOptionLabel:k,isOptionEqualToValue:w,groupBy:A,handleHomeEndKeys:L=!r.freeSolo,id:N,includeInputInList:Y=!1,inputValue:W,limitTags:J=-1,ListboxComponent:ce,ListboxProps:ae,loading:V=!1,loadingText:q="Loading…",multiple:ne=!1,noOptionsText:K="No options",onChange:z,onClose:G,onHighlightChange:oe,onInputChange:re,onOpen:B,open:ee,openOnFocus:le=!1,openText:te="Open",options:pe,PaperComponent:H,PopperComponent:ye,popupIcon:de=Hl||(Hl=f.jsx(Ou,{})),readOnly:Me=!1,renderGroup:he,renderInput:et,renderOption:Le,renderTags:Xe,renderValue:nt,selectOnFocus:mt=!r.freeSolo,size:rt="medium",slots:xt={},slotProps:_e={},value:Ce,...tt}=r,{getRootProps:St,getInputProps:ut,getInputLabelProps:xe,getPopupIndicatorProps:Ie,getClearProps:$e,getItemProps:Ct,getListboxProps:Ne,getOptionProps:pt,value:ht,dirty:it,expanded:bn,id:Xt,popupOpen:Zt,focused:ln,focusedItem:ds,anchorEl:vn,setAnchorEl:no,inputValue:ps,groupedOptions:Vn}=cP({...r,componentName:"Autocomplete"}),zn=!S&&!C&&it&&!Me,pr=(!F||E===!0)&&E!==!1,{onMouseDown:fs}=ut(),{ref:ms,...hs}=Ne(),fr=k||(Ee=>Ee.label??Ee),ot={...r,disablePortal:M,expanded:bn,focused:ln,fullWidth:T,getOptionLabel:fr,hasClearIcon:zn,hasPopupIcon:pr,inputFocused:ds===-1,popupOpen:Zt,size:rt},at=hP(ot),cn={slots:{paper:H,popper:ye,...xt},slotProps:{chip:l,listbox:ae,...g,..._e}},[ys,mr]=We("listbox",{elementType:PP,externalForwardedProps:cn,ownerState:ot,className:at.listbox,additionalProps:hs,ref:ms}),[ro,Z]=We("paper",{elementType:jn,externalForwardedProps:cn,ownerState:ot,className:at.paper}),[X,ge]=We("popper",{elementType:Oi,externalForwardedProps:cn,ownerState:ot,className:at.popper,additionalProps:{disablePortal:M,style:{width:vn?vn.clientWidth:null},role:"presentation",anchorEl:vn,open:Zt}});let we;const Pe=Ee=>({className:at.tag,disabled:C,...Ct(Ee)});if(ne?ht.length>0&&(Xe?we=Xe(ht,Pe,ot):nt?we=nt(ht,Pe,ot):we=ht.map((Ee,un)=>{const{key:dn,...hr}=Pe({index:un});return f.jsx(xu,{label:fr(Ee),size:rt,...hr,...cn.slotProps.chip},dn)})):nt&&ht!=null&&(we=nt(ht,Pe,ot)),J>-1&&Array.isArray(we)){const Ee=we.length-J;!ln&&Ee>0&&(we=we.splice(0,J),we.push(f.jsx("span",{className:at.tag,children:m(Ee)},we.length)))}const Ze=he||(Ee=>f.jsxs("li",{children:[f.jsx(kP,{className:at.groupLabel,ownerState:ot,component:"div",children:Ee.group}),f.jsx(MP,{className:at.groupUl,ownerState:ot,children:Ee.children})]},Ee.key)),oo=Le||((Ee,un)=>{const{key:dn,...hr}=Ee;return f.jsx("li",{...hr,children:fr(un)},dn)}),Ji=(Ee,un)=>{const dn=pt({option:Ee,index:un});return oo({...dn,className:at.option},Ee,{selected:dn["aria-selected"],index:un,inputValue:ps},ot)},ea=cn.slotProps.clearIndicator,ta=cn.slotProps.popupIndicator;return f.jsxs(v.Fragment,{children:[f.jsx(gP,{ref:n,className:me(at.root,c),ownerState:ot,...St(tt),children:et({id:Xt,disabled:C,fullWidth:!0,size:rt==="small"?"small":void 0,InputLabelProps:xe(),InputProps:{ref:no,className:at.inputRoot,startAdornment:we,onMouseDown:Ee=>{Ee.target===Ee.currentTarget&&fs(Ee)},...(zn||pr)&&{endAdornment:f.jsxs(yP,{className:at.endAdornment,ownerState:ot,children:[zn?f.jsx(bP,{...$e(),"aria-label":b,title:b,ownerState:ot,...ea,className:me(at.clearIndicator,ea?.className),children:u}):null,pr?f.jsx(vP,{...Ie(),disabled:C,"aria-label":Zt?p:te,title:Zt?p:te,ownerState:ot,...ta,className:me(at.popupIndicator,ta?.className),children:de}):null]})}},inputProps:{className:at.input,disabled:C,readOnly:Me,...ut()}})}),vn?f.jsx(xP,{as:X,...ge,children:f.jsxs(SP,{as:ro,...Z,children:[V&&Vn.length===0?f.jsx(CP,{className:at.loading,ownerState:ot,children:q}):null,Vn.length===0&&!F&&!V?f.jsx(wP,{className:at.noOptions,ownerState:ot,role:"presentation",onMouseDown:Ee=>{Ee.preventDefault()},children:K}):null,Vn.length>0?f.jsx(ys,{as:ce,...mr,children:Vn.map((Ee,un)=>A?Ze({key:Ee.key,group:Ee.group,children:Ee.options.map((dn,hr)=>Ji(dn,Ee.index+hr))}):Ji(Ee,un))}):null]})}):null]})});function dd({sourceAndPaths:e,selectedSourceIndex:t,existingQuery:n,onQueryChange:r,onSourceChange:o,resourceUri:s}){return ie.useEffect(()=>{o&&o(t)},[t,o]),f.jsx(Ge.StyledCardMedia,{children:f.jsxs(Qe.Stack,{spacing:2,component:"section",children:[f.jsx(IP,{sourceAndPath:e[t],existingQuery:n,onChange:i=>{r&&r(i)},resourceUri:s}),f.jsx(Qe.Box,{height:"5px"})]})})}function Es(){return{query:void 0,malloyQuery:void 0,malloyResult:void 0}}function DP({sourceAndPath:e,onChange:t,existingQuery:n,explorerComponents:r,QueryBuilder:o,resourceUri:s}){const[i,a]=ie.useState(n||Es()),[l,c]=ie.useState(void 0);ie.useEffect(()=>{n&&a(n)},[n]);const[u,d]=ie.useState([]),{MalloyExplorerProvider:h,QueryPanel:b,ResizableCollapsiblePanel:p,ResultPanel:g,SourcePanel:y}=r;ie.useEffect(()=>{t&&t(i)},[t,i]);const{environmentName:S,packageName:P,versionId:C}=Qr(s),{apiClients:x}=Ge.useServer(),I=Tc({mutationFn:()=>{const E=typeof i?.malloyQuery=="string"?i.malloyQuery:new o.ASTQuery({source:e.sourceInfo,query:i?.malloyQuery}).toMalloy();return c({executionState:"running",query:i?.malloyQuery,queryResolutionStartMillis:Date.now(),onCancel:()=>{I.reset(),c(void 0)},response:{result:{}}}),a({...i,query:E}),x.models.executeQueryModel(S,P,e.modelPath,{query:E,sourceName:void 0,queryName:void 0,versionId:C})},onSuccess:E=>{if(E){const F=JSON.parse(E.data.result);a({...i,malloyResult:F}),c(T=>T?{...T,executionState:"finished",response:{result:F}}:void 0)}},onError:E=>{c(void 0),console.error("Query execution error:",E)}}),[M,$]=ie.useState(e.sourceInfo.name);ie.useEffect(()=>{M!==e.sourceInfo.name&&($(e.sourceInfo.name),a(Es()),c(void 0))},[e,M]);const R=ie.useCallback(E=>{a({...i,malloyQuery:E,malloyResult:void 0})},[i]);return M!==e.sourceInfo.name?f.jsx("div",{children:"Loading..."}):f.jsx(Ge.StyledExplorerContent,{sx:{border:"1px solid #e0e0e0",borderRadius:"8px",overflow:"hidden"},children:f.jsx(h,{source:e.sourceInfo,query:i?.malloyQuery,topValues:[],onFocusedNestViewPathChange:d,focusedNestViewPath:u,onQueryChange:R,children:f.jsxs("div",{style:{display:"flex",height:"100%",overflowY:"auto"},children:[f.jsx(p,{isInitiallyExpanded:!0,initialWidth:180,minWidth:180,icon:"database",title:e.sourceInfo.name,children:f.jsx(y,{onRefresh:()=>a(Es())})}),f.jsx(p,{isInitiallyExpanded:!0,initialWidth:280,minWidth:280,icon:"filterSliders",title:"Query",children:f.jsx(b,{runQuery:()=>{console.log(`running query with: ${i?.malloyQuery}`);try{I.mutate()}catch(E){console.error("Error running query:",E)}}})}),f.jsx(g,{source:e.sourceInfo,draftQuery:i?.malloyQuery,setDraftQuery:E=>a({...i,malloyQuery:E}),submittedQuery:l,options:{showRawQuery:!0}})]})})},e.sourceInfo.name)}function IP(e){const[t,n]=ie.useState(null),[r,o]=ie.useState(null),[s,i]=ie.useState(!0);return ie.useEffect(()=>{let a=!0;return Promise.all([import("@malloydata/malloy-explorer"),import("@malloydata/malloy-query-builder")]).then(([l,c])=>{a&&(n(l),o(c),i(!1))}).catch(l=>{console.error("Failed to load Malloy components:",l),a&&i(!1)}),()=>{a=!1}},[]),s||!t||!r?f.jsx(Ge.StyledExplorerPage,{children:f.jsx(Ge.StyledExplorerContent,{children:f.jsx(Qe.Box,{sx:{alignItems:"center",justifyContent:"center",height:"200px",color:"text.secondary"},children:"Loading explorer..."})})}):f.jsx(DP,{...e,explorerComponents:t,QueryBuilder:r,resourceUri:e.resourceUri})}function Qi(e,t=!0){const{modelPath:n,environmentName:r,packageName:o,versionId:s}=Qr(e),{apiClients:i}=Ge.useServer();return Zo({queryKey:["package",r,o,n,s],queryFn:async()=>(await i.models.getModel(r,o,n,s)).data,enabled:t})}function pd({data:e,onChange:t,existingQuery:n,initialSelectedSourceIndex:r=0,onSourceChange:o,resourceUri:s}){const[i,a]=ie.useState(r);ie.useEffect(()=>{a(r)},[r]);const{data:l,isError:c,isLoading:u,error:d}=Qi(s,!e),{modelPath:h}=Qr(s),b=e||l;if(u&&!e)return f.jsx(cr,{text:"Fetching Model..."});if(c&&!e)return console.log("error",d),f.jsx(jo,{error:d,context:`ModelExplorer > ${h}`});if(!b)return f.jsx(cr,{text:"Loading..."});const p=(b?.sourceInfos||[]).map((y,S)=>{try{return JSON.parse(y)?.name||`Source ${S+1}`}catch{return`Source ${S+1}`}}),g=p[i]||"";return f.jsxs(Ge.StyledCard,{variant:"outlined",children:[f.jsx(Ge.StyledCardContent,{children:f.jsx(se.Stack,{sx:{flexDirection:"row"},children:f.jsx(ud,{size:"small",id:"size-small-standard",disablePortal:!0,options:p,value:g,onChange:(y,S)=>{if(!S)return;const P=p.indexOf(S);P>=0&&(a(P),o?.(P))},renderInput:y=>f.jsx(Hi,{...y}),style:{width:350,marginTop:"3px",marginLeft:"6px",marginBottom:"8px"}})})}),f.jsx(Ge.StyledCardMedia,{children:f.jsxs(se.Stack,{spacing:2,component:"section",children:[Array.isArray(b.sourceInfos)&&b.sourceInfos.length>0&&f.jsx(dd,{sourceAndPaths:b.sourceInfos.map(y=>({sourceInfo:JSON.parse(y),modelPath:h})),selectedSourceIndex:i,existingQuery:n,onQueryChange:t,resourceUri:s}),f.jsx(se.Box,{height:"5px"})]})})]})}function fd({open:e,onClose:t,resourceUri:n,data:r,title:o="Data Sources",hasValidImport:s=!0,existingQuery:i,initialSelectedSourceIndex:a,onChange:l,onSourceChange:c}){return f.jsxs(se.Dialog,{open:e,onClose:t,fullScreen:!0,children:[f.jsxs(se.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[o,f.jsx(se.IconButton,{onClick:t,sx:{color:"text.secondary"},children:f.jsx(Qo,{})})]}),f.jsx(se.DialogContent,{children:s?f.jsx(pd,{resourceUri:n,data:r,existingQuery:i,initialSelectedSourceIndex:a,onChange:l,onSourceChange:c}):f.jsx("div",{children:"No valid import statement found in cell"})})]})}function md(e){return e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function hd(e,t){if(e==null||e==="")return;const n=o=>`'${md(o)}'`;switch(t===void 0?TP(e):t.startsWith("filter<")?"filter":t){case"filter":return`f${n(String(e))}`;case"string":return n(String(e));case"number":{const o=typeof e=="number"?e:Number(e);return Number.isFinite(o)?String(o):void 0}case"boolean":return e===!0||e==="true"?"true":"false";case"date":{const o=Ul(e);return o&&`@${o}`}case"timestamp":{const o=Ul(e);if(!o)return;const s=e instanceof Date?e.toISOString().slice(11,19):/[T ](\d{2}:\d{2}(?::\d{2})?)/.exec(String(e))?.[1]??"00:00:00";return`@${o} ${s}`}default:return}}function TP(e){if(typeof e=="string")return"string";if(typeof e=="number")return"number";if(typeof e=="boolean")return"boolean";if(e instanceof Date&&!Number.isNaN(e.getTime()))return e.toISOString().slice(11,19)==="00:00:00"?"date":"timestamp"}function Ul(e){return e instanceof Date?Number.isNaN(e.getTime())?void 0:e.toISOString().slice(0,10):/^(\d{4}-\d{2}-\d{2})/.exec(String(e))?.[1]}const RP="[A-Za-z_][A-Za-z0-9_]*",Yl=e=>new RegExp(`^${RP}$`).test(e),OP=e=>e.findIndex(t=>t.trimStart().startsWith("##")&&t.includes("artifact"));function gd(e){const t=(e??"").split("->").map(s=>s.trim());if(t.length!==2)return;const n=t[1].indexOf("+"),r=n<0?t[1]:t[1].slice(0,n).trim(),o=n<0?void 0:t[1].slice(n).trim();return{source:t[0],view:r,...o===void 0?{}:{refinement:o}}}const ei=()=>typeof performance<"u"?performance.now():Date.now(),yd=200;function $P(e){const t=hd(e.rawValue);if(t!==void 0)return`run: ${e.source} -> { drill: ${e.view}.${e.field} = ${t}; select: *; limit: ${yd} }`}function Xi(e){const t=gd(e);if(!(!t||t.refinement!==void 0||!Yl(t.source)||!Yl(t.view)))return{source:t.source,view:t.view}}const EP=e=>Xi(e)?.source;function AP({request:e,environmentName:t,packageName:n,versionId:r,modelPath:o,givens:s,onClose:i,onDone:a}){const{theme:l}=Ge.usePublisherTheme(),c=e?$P(e):void 0;return f.jsxs(se.Dialog,{open:e!==void 0,onClose:i,maxWidth:"lg",fullWidth:!0,children:[f.jsxs(se.DialogTitle,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",pb:.5},children:[f.jsxs(se.Box,{children:[e?f.jsxs(f.Fragment,{children:["Rows where"," ",f.jsx(se.Box,{component:"code",sx:{fontSize:"0.9em"},children:e.field})," ","is ",e.label]}):"Rows",f.jsx(se.Typography,{component:"div",variant:"caption",sx:{color:l.tileTitle,mt:.25},children:e?`The first ${yd} rows of ${e.source} behind this value, with the tile's own filters and the controls applied.`:""})]}),f.jsx(se.IconButton,{onClick:i,"aria-label":"Close",size:"small",sx:{color:"text.secondary",ml:1},children:f.jsx(Qo,{fontSize:"small"})})]}),f.jsxs(se.DialogContent,{dividers:!0,sx:{p:0,minHeight:240},children:[c===void 0&&e&&f.jsx(se.Typography,{variant:"body2",sx:{p:2},children:"This value cannot be written as a filter, so its rows cannot be fetched."}),c!==void 0&&f.jsx(FP,{query:c,environmentName:t,packageName:n,...r===void 0?{}:{versionId:r},modelPath:o,givens:s,...a?{onDone:a}:{}})]}),f.jsxs(se.DialogActions,{sx:{px:3,py:1.5},children:[c!==void 0&&f.jsx(se.Typography,{variant:"caption",sx:{mr:"auto",color:l.tileTitle,fontFamily:"ui-monospace, monospace",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:c,children:c}),f.jsx(se.Button,{onClick:i,children:"Close"})]})]})}function FP({query:e,environmentName:t,packageName:n,versionId:r,modelPath:o,givens:s,onDone:i}){const a=Gi({environmentName:t,packageName:n,modelPath:o,...r===void 0?{}:{versionId:r},query:e,givens:s}),{isSuccess:l,isError:c}=a,u=ie.useRef(void 0);return ie.useEffect(()=>{u.current=ei()},[e]),ie.useEffect(()=>{u.current===void 0||!l&&!c||(i?.(l,ei()-u.current),u.current=void 0)},[l,c,i]),f.jsx(se.Box,{sx:{p:1},children:f.jsx(qi,{state:a,context:e})})}function LP({tile:e,environmentName:t,packageName:n,versionId:r,modelPath:o,onClose:s}){const i=Rc({environmentName:t,packageName:n,modelPath:o,...r===void 0?{}:{versionId:r}}),{data:a}=Qi(i,e!==void 0),l=ie.useMemo(()=>{const u=EP(e);if(!a||u===void 0)return 0;const d=(a.sourceInfos??[]).findIndex(h=>{try{return JSON.parse(h)?.name===u}catch{return!1}});return d<0?0:d},[a,e]),c=ie.useMemo(()=>{if(e===void 0)return;const u=Xi(e),d=u?{definition:{kind:"arrow",source:{kind:"source_reference",name:u.source},view:{kind:"view_reference",name:u.view}}}:`run: ${e}`;return{query:`run: ${e}`,malloyQuery:d,malloyResult:void 0}},[e]);return e===void 0||!a?null:f.jsx(fd,{open:!0,onClose:s,resourceUri:i,data:a,title:`Explore: ${e}`,existingQuery:c,initialSelectedSourceIndex:l})}function NP({resourceUri:e,dashboard:t,givens:n,onGivensChange:r,onNavigate:o,height:s,maxResultSize:i,onEvent:a}){const l=Qr(e),{apiClients:c}=Ge.useServer(),u=l.environmentName??"",d=l.packageName??"",h=l.versionId,b=!!l.environmentName&&!!l.packageName,{data:p,isSuccess:g,isError:y,error:S}=Zo({queryKey:["dashboard",u,d,h,t],queryFn:()=>c.dashboards.getDashboard(u,d,t,h),enabled:b}),P=p?.data,C=ie.useMemo(()=>P?.givens??[],[P]),x=Ic({specs:C,loaded:g,startingValues:P?.startingGivens,params:n,onGivensChange:r,documentKey:`${u}/${d}/${h??""}/${t}`,autorun:P?.autorun!==!1,environmentName:u,packageName:d,modelPath:P?.path,versionId:h,documentName:t}),{applied:I,declaredTypes:M,canSelf:$,onSelf:R}=x,[E,F]=ie.useState(void 0),[T,m]=ie.useState(void 0),O=ie.useCallback(W=>{const J=Xi(W.context);J!==void 0&&F({...J,field:W.field,rawValue:W.rawValue,label:W.label})},[]),D=ie.useMemo(()=>Xo(I,M),[I,M]),{drill:k,drillMenu:w}=Oc({onNavigate:o,onSelf:R,canSelf:$,selfLabel:"Filter this dashboard",onRows:O}),A=ie.useCallback(W=>({canDrill:k.canDrill,onClick:J=>k.onClick({...J,context:W})}),[k]);if(!b)return f.jsxs(se.Alert,{severity:"error",children:["A dashboard resource URI must name an environment and a package. Received: ",e]});if(y)return f.jsx(jo,{context:`${u} > ${d} > ${t}`,error:S});if(!g||!P)return f.jsx(cr,{text:"Loading dashboard…"});if(P.error)return f.jsxs(se.Stack,{spacing:2,children:[f.jsx(Gl,{manifest:P}),f.jsx(se.Alert,{severity:"error",children:P.error})]});const L=P.path,N=P.tiles??[],Y=P.dashboardColumns??td;return f.jsxs(se.Stack,{spacing:2,children:[f.jsx(Gl,{manifest:P}),f.jsx(qu,{...x.panel,layout:"bar"}),L===void 0?f.jsx(se.Alert,{severity:"error",children:"This dashboard has no model path, so there is nothing to run."}):P.query!==void 0?f.jsx(Zs,{environmentName:u,packageName:d,versionId:h,modelPath:L,queryName:P.query,givens:I,declaredTypes:M,height:s,maxResultSize:i,drill:k}):N.length>0?f.jsx(rd,{tiles:N,columns:Y,keyOf:(W,J)=>`${J}:${W.query}`,renderTile:W=>f.jsx(Zs,{environmentName:u,packageName:d,versionId:h,modelPath:L,tile:W.query,label:W.label,subtitle:W.subtitle,borderless:W.borderless,givens:I,declaredTypes:M,givenNames:W.givenNames,height:s??Xu,maxResultSize:i,drill:A(W.query),onExplore:()=>{m(W.query),a?.({type:"dashboard.explored",tile:W.query})}})}):f.jsx(se.Alert,{severity:"warning",children:"This dashboard names neither a query nor any tiles."}),w,L!==void 0&&f.jsxs(f.Fragment,{children:[f.jsx(AP,{request:E,environmentName:u,packageName:d,...h===void 0?{}:{versionId:h},modelPath:L,givens:D,onClose:()=>F(void 0),onDone:(W,J)=>{E&&a?.({type:"dashboard.rows_shown",source:E.source,view:E.view,field:E.field,ok:W,durationMs:J})}}),f.jsx(LP,{tile:T,environmentName:u,packageName:d,...h===void 0?{}:{versionId:h},modelPath:L,onClose:()=>m(void 0)})]})]})}function Gl({manifest:e}){return f.jsx(bd,{title:e.title??e.name,...e.description?{description:e.description}:{}})}function bd({title:e,description:t}){return f.jsxs(se.Box,{children:[f.jsx(se.Typography,{variant:"h5",sx:{fontWeight:600},children:e}),t&&f.jsx(Ku,{variant:"caption",children:t})]})}const jP=ct(f.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),Zi=ie.createContext(void 0);function BP({children:e,documentStorage:t}){const n=ie.useMemo(()=>({documentStorage:t}),[t]);return f.jsx(Zi.Provider,{value:n,children:e})}function VP(){const e=ie.useContext(Zi);if(!e)throw new Error("useDocumentStorage must be used within a DocumentStorageProvider");return e}function zP(){return ie.useContext(Zi)}class vd extends Error{constructor(t){super(t),this.name="DocumentNotFoundError"}}const WP=e=>e instanceof vd||e instanceof Error&&e.name==="DocumentNotFoundError";exports.AdapterDayjs=Oo;exports.AddButton=sm;exports.AddIcon=hc;exports.ApiErrorDisplay=jo;exports.AppDialog=am;exports.Autocomplete=ud;exports.Button=Tr;exports.ButtonBase=or;exports.CheckIcon=jP;exports.CircularProgress=wi;exports.ClassNameGenerator=Kl;exports.CloseIcon=Qo;exports.DASHBOARD_CARD_PADDING_PX=Ki;exports.DEFAULT_COLUMNS=td;exports.DRILL_SELF=bo;exports.Dashboard=NP;exports.DashboardBar=lm;exports.DashboardGrid=rd;exports.DashboardProse=bd;exports.DashboardTile=Zs;exports.DatePicker=Ur;exports.DocumentNotFoundError=vd;exports.DocumentStorageProvider=BP;exports.FloatingIconButton=id;exports.FormControl=Vi;exports.GRID_GAP_PX=nd;exports.GivenInput=Gu;exports.GivensPanel=qu;exports.Grow=zr;exports.INITIAL_RENDER_HEIGHT=Qs;exports.IconButton=Nn;exports.InfoOutlinedIcon=sd;exports.InputLabel=Bi;exports.ListContext=Jn;exports.Loading=cr;exports.LocalizationProvider=Vr;exports.MODEL_CELL_MAX_HEIGHT=_w;exports.ModelExplorer=pd;exports.ModelExplorerDialog=fd;exports.NOTEBOOK_CELL_MAX_HEIGHT=Ww;exports.Paper=jn;exports.Prose=Ku;exports.RESULTS_DIALOG_MAX_HEIGHT=Hw;exports.ResultContainer=ad;exports.ResultPanel=qi;exports.SecondaryButton=im;exports.Select=_i;exports.SourcesExplorer=dd;exports.SvgIcon=Io;exports.THEME_ID=ur;exports.TILE_MAX_HEIGHT=Xu;exports.TextField=Hi;exports.TileCard=ld;exports.TileHeading=cd;exports.Typography=gn;exports.UNCAPPED_CONTAINER_HEIGHT=Zu;exports.artifactLine=OP;exports.buildTableCssVars=oP;exports.capitalize=ue;exports.clsx=me;exports.composeClasses=ve;exports.contentNode=Qu;exports.contentNodeDepth=Vw;exports.createSimplePaletteValueFilter=yt;exports.createSvgIcon=ct;exports.createTheme=uc;exports.dayjs=Ve;exports.drillDestinations=di;exports.drillValueToFilter=Kr;exports.emphasize=tc;exports.encodeDrillValue=xc;exports.encodeResourceUri=Rc;exports.escapeMalloyString=md;exports.extractEventHandlers=hi;exports.formControlState=Bn;exports.generateUtilityClass=Se;exports.generateUtilityClasses=be;exports.getAugmentedNamespace=$d;exports.getDefaultExportFromCjs=sn;exports.getReactElementRef=dr;exports.givensToRequest=Xo;exports.humanizeSlug=pi;exports.initialResultHeight=Ju;exports.isDocumentNotFound=WP;exports.malloyLiteral=hd;exports.measureContentHeight=zw;exports.memoTheme=Re;exports.mergeSlotProps=mc;exports.now=ei;exports.ownerDocument=dt;exports.parseResourceUri=Qr;exports.queryResultKey=od;exports.remeasuresAfterReady=Bw;exports.resolveDrill=vc;exports.resolveResultHeight=ed;exports.resultSizing=jw;exports.rootShouldForwardProp=jt;exports.styled=_;exports.tileSteps=gd;exports.tileTitle=Xs;exports.typographyClasses=qh;exports.useControlled=Mt;exports.useDefaultProps=Oe;exports.useDocumentControls=Ic;exports.useDocumentStorage=VP;exports.useDrill=Oc;exports.useDrillSelf=Sc;exports.useEnhancedEffect=st;exports.useEventCallback=fe;exports.useForkRef=Fe;exports.useFormControl=Bt;exports.useGivensState=kc;exports.useModelData=Qi;exports.useMutationWithApiError=Tc;exports.useOptionalDocumentStorage=zP;exports.useQueryResult=Gi;exports.useQueryWithApiError=Zo;exports.useSlot=We;exports.useSuggestOptions=Dc;exports.useTheme=Fn;exports.useTimeout=mi;exports.utc=ci;
@@ -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 "./DocumentStorage-DkwqA8SA.es.js";
5
- import { aD as ke, aE as Ce, aF as xe } from "./ServerProvider-IzXlqSVe.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 "./DocumentStorage-BypSIWDg.es.js";
5
+ import { aD as ke, aE as Ce, aF as xe } from "./ServerProvider-AsUiy22k.es.js";
6
6
  const g = "publisher-drill";
7
7
  function Re(e, r) {
8
8
  const t = /* @__PURE__ */ new Set();
@@ -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("./DocumentStorage-mMn5SZ1c.cjs.js"),X=require("./ServerProvider-CC9ein5-.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("./DocumentStorage-D7yF4_T3.cjs.js"),X=require("./ServerProvider-CuYLH_Yi.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
@@ -421,7 +421,6 @@ const V = function(c, ...n) {
421
421
  MergeKeyScopeUnresolved: "merge_key_scope_unresolved",
422
422
  PreaggregateOverDynamicSource: "preaggregate_over_dynamic_source",
423
423
  Authorize: "authorize",
424
- Partition: "partition",
425
424
  NotDuckdbPortable: "not_duckdb_portable",
426
425
  PublicSurfaceUnknown: "public_surface_unknown"
427
426
  }, Wa = {
@@ -1582,7 +1581,7 @@ const ke = function(c) {
1582
1581
  };
1583
1582
  },
1584
1583
  /**
1585
- * Lists the dashboards in the specified package — every `.malloy` file in the package\'s `dashboards/` directory that carries an `# artifact` (or model-level `## artifact`) annotation. A file in that directory with no artifact tag is a shared include and is not listed, whether or not it compiles. A tagged dashboard that failed to compile is listed carrying its `error` where that state can arise at all, so a broken dashboard is visibly broken rather than silently absent. In practice it rarely does: a package whose model fails to compile is not loaded, and a reload that would break one is refused and leaves the previously loaded package serving, so `error` is only reachable on the paths that keep per-model placeholders. Treat it as present-but-uncommon rather than the normal way a broken dashboard surfaces. When the package curates its query surface (`queryableSources: \"declared\"`), a dashboard whose entry file is not in `explores` is omitted, because its query and given names would not be runnable; the omission is reported in the package\'s `warnings` as of the last load. A metadata `PATCH` that TIGHTENS curation takes effect on this listing immediately; one that relaxes it takes effect on the next package reload, because the withheld dashboards were never built into the cached set. Either way the matching warning is computed at load, so after a `PATCH` it appears only once the package reloads. Where the boundary is active at all, which needs `explores` declared AND `queryableSources` left at `\"declared\"`, being listed does not by itself guarantee the dashboard runs: the queryable sources are the union of every listed file\'s `export {}` closure, so a dashboard whose tiles read a source that only an UNLISTED file exports is still served while those queries are refused. The fix is to list that file too, or to re-export the source from one already listed. It is served rather than withheld because withholding on a guess would hide dashboards that do work. Under `\"all\"` nothing is refused, so the situation does not arise.
1584
+ * Lists the dashboards in the specified package — every `.malloy` file in the package\'s `dashboards/` directory that carries an `# artifact` (or model-level `## artifact`) annotation. A file in that directory with no artifact tag is a shared include and is not listed, whether or not it compiles. A tagged dashboard that failed to compile is listed carrying its `error` where that state can arise at all, so a broken dashboard is visibly broken rather than silently absent. In practice it rarely does: a package whose model fails to compile is not loaded, and a reload that would break one is refused and leaves the previously loaded package serving, so `error` is only reachable on the paths that keep per-model placeholders. Treat it as present-but-uncommon rather than the normal way a broken dashboard surfaces. When the package curates its query surface (a surface from `explores` or from a root `index.malloy`, with `queryableSources` left at `\"declared\"`), a dashboard whose entry file is not on that surface is omitted, because its query and given names would not be runnable. A root `index.malloy` cannot export a dashboard file, so a package curated only by that file omits every dashboard; the omission is reported in the package\'s `warnings` as of the last load. A metadata `PATCH` that TIGHTENS curation takes effect on this listing immediately; one that relaxes it takes effect on the next package reload, because the withheld dashboards were never built into the cached set. Either way the matching warning is computed at load, so after a `PATCH` it appears only once the package reloads. Where the boundary is active at all, which needs a surface (`explores` declared, or a root `index.malloy`) AND `queryableSources` left at `\"declared\"`, being listed does not by itself guarantee the dashboard runs: the queryable sources are the union of every listed file\'s `export {}` closure, so a dashboard whose tiles read a source that only an UNLISTED file exports is still served while those queries are refused. The fix is to list that file too, or to re-export the source from one already listed. It is served rather than withheld because withholding on a guess would hide dashboards that do work. Each such tile is reported in the package\'s `warnings` with severity `error`, as of the last load, naming the tile. The check reads the tile\'s source from its text, so a tile written in a form it cannot read is not reported. Under `\"all\"` nothing is refused, so the situation does not arise.
1586
1585
  * @summary List package dashboards
1587
1586
  * @param {string} environmentName Name of the environment
1588
1587
  * @param {string} packageName Name of the package
@@ -1622,7 +1621,7 @@ const ke = function(c) {
1622
1621
  return (d, p) => O(s, h, g, c)(d, i || p);
1623
1622
  },
1624
1623
  /**
1625
- * Lists the dashboards in the specified package — every `.malloy` file in the package\'s `dashboards/` directory that carries an `# artifact` (or model-level `## artifact`) annotation. A file in that directory with no artifact tag is a shared include and is not listed, whether or not it compiles. A tagged dashboard that failed to compile is listed carrying its `error` where that state can arise at all, so a broken dashboard is visibly broken rather than silently absent. In practice it rarely does: a package whose model fails to compile is not loaded, and a reload that would break one is refused and leaves the previously loaded package serving, so `error` is only reachable on the paths that keep per-model placeholders. Treat it as present-but-uncommon rather than the normal way a broken dashboard surfaces. When the package curates its query surface (`queryableSources: \"declared\"`), a dashboard whose entry file is not in `explores` is omitted, because its query and given names would not be runnable; the omission is reported in the package\'s `warnings` as of the last load. A metadata `PATCH` that TIGHTENS curation takes effect on this listing immediately; one that relaxes it takes effect on the next package reload, because the withheld dashboards were never built into the cached set. Either way the matching warning is computed at load, so after a `PATCH` it appears only once the package reloads. Where the boundary is active at all, which needs `explores` declared AND `queryableSources` left at `\"declared\"`, being listed does not by itself guarantee the dashboard runs: the queryable sources are the union of every listed file\'s `export {}` closure, so a dashboard whose tiles read a source that only an UNLISTED file exports is still served while those queries are refused. The fix is to list that file too, or to re-export the source from one already listed. It is served rather than withheld because withholding on a guess would hide dashboards that do work. Under `\"all\"` nothing is refused, so the situation does not arise.
1624
+ * Lists the dashboards in the specified package — every `.malloy` file in the package\'s `dashboards/` directory that carries an `# artifact` (or model-level `## artifact`) annotation. A file in that directory with no artifact tag is a shared include and is not listed, whether or not it compiles. A tagged dashboard that failed to compile is listed carrying its `error` where that state can arise at all, so a broken dashboard is visibly broken rather than silently absent. In practice it rarely does: a package whose model fails to compile is not loaded, and a reload that would break one is refused and leaves the previously loaded package serving, so `error` is only reachable on the paths that keep per-model placeholders. Treat it as present-but-uncommon rather than the normal way a broken dashboard surfaces. When the package curates its query surface (a surface from `explores` or from a root `index.malloy`, with `queryableSources` left at `\"declared\"`), a dashboard whose entry file is not on that surface is omitted, because its query and given names would not be runnable. A root `index.malloy` cannot export a dashboard file, so a package curated only by that file omits every dashboard; the omission is reported in the package\'s `warnings` as of the last load. A metadata `PATCH` that TIGHTENS curation takes effect on this listing immediately; one that relaxes it takes effect on the next package reload, because the withheld dashboards were never built into the cached set. Either way the matching warning is computed at load, so after a `PATCH` it appears only once the package reloads. Where the boundary is active at all, which needs a surface (`explores` declared, or a root `index.malloy`) AND `queryableSources` left at `\"declared\"`, being listed does not by itself guarantee the dashboard runs: the queryable sources are the union of every listed file\'s `export {}` closure, so a dashboard whose tiles read a source that only an UNLISTED file exports is still served while those queries are refused. The fix is to list that file too, or to re-export the source from one already listed. It is served rather than withheld because withholding on a guess would hide dashboards that do work. Each such tile is reported in the package\'s `warnings` with severity `error`, as of the last load, naming the tile. The check reads the tile\'s source from its text, so a tile written in a form it cannot read is not reported. Under `\"all\"` nothing is refused, so the situation does not arise.
1626
1625
  * @summary List package dashboards
1627
1626
  * @param {string} environmentName Name of the environment
1628
1627
  * @param {string} packageName Name of the package
@@ -1652,7 +1651,7 @@ const ke = function(c) {
1652
1651
  return r.getDashboard(a, t, o, s, l).then((i) => i(e, n));
1653
1652
  },
1654
1653
  /**
1655
- * Lists the dashboards in the specified package — every `.malloy` file in the package\'s `dashboards/` directory that carries an `# artifact` (or model-level `## artifact`) annotation. A file in that directory with no artifact tag is a shared include and is not listed, whether or not it compiles. A tagged dashboard that failed to compile is listed carrying its `error` where that state can arise at all, so a broken dashboard is visibly broken rather than silently absent. In practice it rarely does: a package whose model fails to compile is not loaded, and a reload that would break one is refused and leaves the previously loaded package serving, so `error` is only reachable on the paths that keep per-model placeholders. Treat it as present-but-uncommon rather than the normal way a broken dashboard surfaces. When the package curates its query surface (`queryableSources: \"declared\"`), a dashboard whose entry file is not in `explores` is omitted, because its query and given names would not be runnable; the omission is reported in the package\'s `warnings` as of the last load. A metadata `PATCH` that TIGHTENS curation takes effect on this listing immediately; one that relaxes it takes effect on the next package reload, because the withheld dashboards were never built into the cached set. Either way the matching warning is computed at load, so after a `PATCH` it appears only once the package reloads. Where the boundary is active at all, which needs `explores` declared AND `queryableSources` left at `\"declared\"`, being listed does not by itself guarantee the dashboard runs: the queryable sources are the union of every listed file\'s `export {}` closure, so a dashboard whose tiles read a source that only an UNLISTED file exports is still served while those queries are refused. The fix is to list that file too, or to re-export the source from one already listed. It is served rather than withheld because withholding on a guess would hide dashboards that do work. Under `\"all\"` nothing is refused, so the situation does not arise.
1654
+ * Lists the dashboards in the specified package — every `.malloy` file in the package\'s `dashboards/` directory that carries an `# artifact` (or model-level `## artifact`) annotation. A file in that directory with no artifact tag is a shared include and is not listed, whether or not it compiles. A tagged dashboard that failed to compile is listed carrying its `error` where that state can arise at all, so a broken dashboard is visibly broken rather than silently absent. In practice it rarely does: a package whose model fails to compile is not loaded, and a reload that would break one is refused and leaves the previously loaded package serving, so `error` is only reachable on the paths that keep per-model placeholders. Treat it as present-but-uncommon rather than the normal way a broken dashboard surfaces. When the package curates its query surface (a surface from `explores` or from a root `index.malloy`, with `queryableSources` left at `\"declared\"`), a dashboard whose entry file is not on that surface is omitted, because its query and given names would not be runnable. A root `index.malloy` cannot export a dashboard file, so a package curated only by that file omits every dashboard; the omission is reported in the package\'s `warnings` as of the last load. A metadata `PATCH` that TIGHTENS curation takes effect on this listing immediately; one that relaxes it takes effect on the next package reload, because the withheld dashboards were never built into the cached set. Either way the matching warning is computed at load, so after a `PATCH` it appears only once the package reloads. Where the boundary is active at all, which needs a surface (`explores` declared, or a root `index.malloy`) AND `queryableSources` left at `\"declared\"`, being listed does not by itself guarantee the dashboard runs: the queryable sources are the union of every listed file\'s `export {}` closure, so a dashboard whose tiles read a source that only an UNLISTED file exports is still served while those queries are refused. The fix is to list that file too, or to re-export the source from one already listed. It is served rather than withheld because withholding on a guess would hide dashboards that do work. Each such tile is reported in the package\'s `warnings` with severity `error`, as of the last load, naming the tile. The check reads the tile\'s source from its text, so a tile written in a form it cannot read is not reported. Under `\"all\"` nothing is refused, so the situation does not arise.
1656
1655
  * @summary List package dashboards
1657
1656
  * @param {string} environmentName Name of the environment
1658
1657
  * @param {string} packageName Name of the package
@@ -1681,7 +1680,7 @@ class Ce extends I {
1681
1680
  return z(this.configuration).getDashboard(n, e, r, a, t).then((o) => o(this.axios, this.basePath));
1682
1681
  }
1683
1682
  /**
1684
- * Lists the dashboards in the specified package — every `.malloy` file in the package\'s `dashboards/` directory that carries an `# artifact` (or model-level `## artifact`) annotation. A file in that directory with no artifact tag is a shared include and is not listed, whether or not it compiles. A tagged dashboard that failed to compile is listed carrying its `error` where that state can arise at all, so a broken dashboard is visibly broken rather than silently absent. In practice it rarely does: a package whose model fails to compile is not loaded, and a reload that would break one is refused and leaves the previously loaded package serving, so `error` is only reachable on the paths that keep per-model placeholders. Treat it as present-but-uncommon rather than the normal way a broken dashboard surfaces. When the package curates its query surface (`queryableSources: \"declared\"`), a dashboard whose entry file is not in `explores` is omitted, because its query and given names would not be runnable; the omission is reported in the package\'s `warnings` as of the last load. A metadata `PATCH` that TIGHTENS curation takes effect on this listing immediately; one that relaxes it takes effect on the next package reload, because the withheld dashboards were never built into the cached set. Either way the matching warning is computed at load, so after a `PATCH` it appears only once the package reloads. Where the boundary is active at all, which needs `explores` declared AND `queryableSources` left at `\"declared\"`, being listed does not by itself guarantee the dashboard runs: the queryable sources are the union of every listed file\'s `export {}` closure, so a dashboard whose tiles read a source that only an UNLISTED file exports is still served while those queries are refused. The fix is to list that file too, or to re-export the source from one already listed. It is served rather than withheld because withholding on a guess would hide dashboards that do work. Under `\"all\"` nothing is refused, so the situation does not arise.
1683
+ * Lists the dashboards in the specified package — every `.malloy` file in the package\'s `dashboards/` directory that carries an `# artifact` (or model-level `## artifact`) annotation. A file in that directory with no artifact tag is a shared include and is not listed, whether or not it compiles. A tagged dashboard that failed to compile is listed carrying its `error` where that state can arise at all, so a broken dashboard is visibly broken rather than silently absent. In practice it rarely does: a package whose model fails to compile is not loaded, and a reload that would break one is refused and leaves the previously loaded package serving, so `error` is only reachable on the paths that keep per-model placeholders. Treat it as present-but-uncommon rather than the normal way a broken dashboard surfaces. When the package curates its query surface (a surface from `explores` or from a root `index.malloy`, with `queryableSources` left at `\"declared\"`), a dashboard whose entry file is not on that surface is omitted, because its query and given names would not be runnable. A root `index.malloy` cannot export a dashboard file, so a package curated only by that file omits every dashboard; the omission is reported in the package\'s `warnings` as of the last load. A metadata `PATCH` that TIGHTENS curation takes effect on this listing immediately; one that relaxes it takes effect on the next package reload, because the withheld dashboards were never built into the cached set. Either way the matching warning is computed at load, so after a `PATCH` it appears only once the package reloads. Where the boundary is active at all, which needs a surface (`explores` declared, or a root `index.malloy`) AND `queryableSources` left at `\"declared\"`, being listed does not by itself guarantee the dashboard runs: the queryable sources are the union of every listed file\'s `export {}` closure, so a dashboard whose tiles read a source that only an UNLISTED file exports is still served while those queries are refused. The fix is to list that file too, or to re-export the source from one already listed. It is served rather than withheld because withholding on a guess would hide dashboards that do work. Each such tile is reported in the package\'s `warnings` with severity `error`, as of the last load, naming the tile. The check reads the tile\'s source from its text, so a tile written in a form it cannot read is not reported. Under `\"all\"` nothing is refused, so the situation does not arise.
1685
1684
  * @summary List package dashboards
1686
1685
  * @param {string} environmentName Name of the environment
1687
1686
  * @param {string} packageName Name of the package