const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CodeField-1.0.63-BzCoj5Vr.js","./cm-1.0.63-CSIRHMXC.js","./redux-1.0.63-Df-eBzJn.js","./vendor-1.0.63-CN03Eozo.js","./index-1.0.63-oIDff4nA.js","./Typography-1.0.63-mecuj_Wl.js","./lib-1.0.63-DJZPtMem.js","./loglevel-1.0.63-BZ7XahX3.js","./lodash-1.0.63-hMxolcpJ.js","./moment-1.0.63-C5S46NFB.js","./ButtonBase-1.0.63-CF10PFMS.js","./useEnhancedEffect-1.0.63-DnR0ZFqV.js","./ThemeProvider-1.0.63-Cq0KMgkh.js","./Modal-1.0.63-fMXTbfks.js","./notistack-1.0.63-B49ULGrj.js","./iconBase-1.0.63-CFvHhC4t.js","./cmJs-1.0.63-CzmnAR2E.js","./cmJson-1.0.63-CyZ2MfFg.js","./rehyperaw-1.0.63-AkovKNCK.js","./markdown-1.0.63-BJvkzZkj.js","./cmHtml-1.0.63-BoYNtd6o.js","./cmSql-1.0.63-OKh4Zrzn.js","./Spinner-1.0.63-zcgIyS7Z.js","./FormControlLabel-1.0.63-DpYUdUm6.js","./Select-1.0.63-BMejr8a7.js","./Menu-1.0.63-DLh4HkF0.js","./createSvgIcon-1.0.63-DWL3J-DK.js","./Switch-1.0.63-m0NqOO9s.js","./SwitchBase-1.0.63-Br-lbcZ1.js","./DialogContent-1.0.63-B3W-DlSe.js","./ConfirmDialog-1.0.63-eXgm3P8b.js","./cjs-1.0.63-4A2xol4v.js","./AdminTheme-1.0.63-DhJ0rrw5.js"])))=>i.map(i=>d[i]);
import{j as r}from"./cm-1.0.63-CSIRHMXC.js";import{u as j,S as g,a as b,b as S,c as M}from"./SettingsMapMarkers-1.0.63-wl2oRDlm.js";import{l as A}from"./lib-1.0.63-DJZPtMem.js";import{_ as C}from"./cmJson-1.0.63-CyZ2MfFg.js";import{r as p}from"./redux-1.0.63-Df-eBzJn.js";import{y as w,e as y,k as _}from"./index-1.0.63-oIDff4nA.js";import{P as W}from"./PremiumFeature-1.0.63-CSC9M_X_.js";import{a as k}from"./hooks-1.0.63-CWs3kTdT.js";import{u as F}from"./useMapUpdater-1.0.63-CCncuS-r.js";import{D as v}from"./DefaultWhere-1.0.63-DrVcsqzX.js";import{u as E}from"./useMetadata-1.0.63-SO3BYgAj.js";import{S as L}from"./SanitizeComponent-1.0.63-CtRxRbku.js";import{H as N}from"./settings-1.0.63-Dh5mJf1z.js";import{A as O,a as H}from"./AccordionSummary-1.0.63-CweQ2Hjy.js";import{A as P}from"./AccordionDetails-1.0.63-nbUPBP1V.js";import{F as R}from"./TextField-1.0.63-C35Mfi1Q.js";import{B as s}from"./Spinner-1.0.63-zcgIyS7Z.js";import{L as z}from"./Link-1.0.63-wURABoab.js";import"./vendor-1.0.63-CN03Eozo.js";import"./CssUnitTextField-1.0.63-DZ_naJil.js";import"./cjs-1.0.63-4A2xol4v.js";import"./Typography-1.0.63-mecuj_Wl.js";import"./ButtonBase-1.0.63-CF10PFMS.js";import"./useEnhancedEffect-1.0.63-DnR0ZFqV.js";import"./RadioGroup-1.0.63-DNdHdAIV.js";import"./Radio-1.0.63-CTxGi4al.js";import"./SwitchBase-1.0.63-Br-lbcZ1.js";import"./Select-1.0.63-BMejr8a7.js";import"./Menu-1.0.63-DLh4HkF0.js";import"./ThemeProvider-1.0.63-Cq0KMgkh.js";import"./Modal-1.0.63-fMXTbfks.js";import"./notistack-1.0.63-B49ULGrj.js";import"./createSvgIcon-1.0.63-DWL3J-DK.js";import"./Slider-1.0.63-DnTQIpNT.js";import"./visuallyHidden-1.0.63-Dan1xhjv.js";import"./FormControlLabel-1.0.63-DpYUdUm6.js";import"./Switch-1.0.63-m0NqOO9s.js";import"./react-number-format.es-1.0.63-B-GknBUR.js";import"./loglevel-1.0.63-BZ7XahX3.js";import"./lodash-1.0.63-hMxolcpJ.js";import"./moment-1.0.63-C5S46NFB.js";import"./rehyperaw-1.0.63-AkovKNCK.js";import"./markdown-1.0.63-BJvkzZkj.js";import"./iconBase-1.0.63-CFvHhC4t.js";import"./index-1.0.63-Cr9ps5ft.js";import"./AdminTheme-1.0.63-DhJ0rrw5.js";import"./DynamicModeEnum-1.0.63-BXuL5kgA.js";import"./dompurify-1.0.63-DhD2mIk-.js";import"./TabPanel-1.0.63-CSMGfwNU.js";import"./InputAdornment-1.0.63-q8tTbJxw.js";import"./getThemeProps-1.0.63-5ZzcWe3G.js";import"./ConfirmDialog-1.0.63-eXgm3P8b.js";import"./DialogContent-1.0.63-B3W-DlSe.js";import"./CardHeader-1.0.63-nt62E5SM.js";import"./MenuItem-1.0.63-Bvb3IjMP.js";import"./Collapse-1.0.63-B-Rwe0o9.js";const T=p.lazy(()=>C(()=>import("./CodeField-1.0.63-BzCoj5Vr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]),import.meta.url)),B=({appId:t,mapSettings:e})=>{k(),F(t);const o=E(t),f=p.useMemo(()=>{var c,u,d,x;let n=[];try{n=JSON.parse((u=(c=o==null?void 0:o.app)==null?void 0:c.container[0])==null?void 0:u.cnt_cls)}catch(i){console.error("Invalid JSON - app columns"),console.error(i)}const l=n.filter(i=>i.computedField===void 0).map(i=>i.columnName).join("<br/>, ");let a="";return(d=o==null?void 0:o.app)!=null&&d.container[0]&&(a=(x=o==null?void 0:o.app)==null?void 0:x.container[0].cnt_tbl),l===""||a===""?"":`select ${l}<br/>from ${a}<br/>`},[]),[m,h]=p.useState(!1);return r.jsxs(O,{defaultExpanded:!1,disableGutters:!0,children:[r.jsxs(H,{expandIcon:r.jsx(w,{}),className:"pp-context-help-summary",children:[r.jsx("span",{children:"Default Where"}),r.jsx(N,{path:"map-builder/menu/map/default-where.html",size:22})]}),r.jsxs(P,{children:[r.jsxs(R,{fullWidth:!0,children:[r.jsx(p.Suspense,{children:r.jsx(T,{code:e.setup.defaultWhere??"",setCode:n=>{},dialogTitle:"Custom Glyph",extension:"sql",isReadOnly:!0})}),r.jsxs(s,{sx:{position:"relative"},children:[r.jsxs(s,{sx:{position:"absolute",top:0,right:"15px",textAlign:"right",...m&&{width:"100%"}},children:[r.jsx(y,{title:"SQL Query",placement:"bottom-end",children:r.jsx(z,{href:"#",onClick:()=>{h(!m)},children:r.jsx(s,{sx:{lineHeight:"24px","& svg":{width:"15px",height:"15px",verticalAlign:"text-bottom"}},children:r.jsx(_,{})})})}),m&&r.jsx(s,{sx:{textAlign:"left",backgroundColor:"#fff",border:"1px solid rgba(0, 0, 0, 0.23)",borderRadius:"4px",padding:"20px",margin:"2px -15px 0 15px",maxHeight:"220px",overflow:"auto"},component:"pre",children:r.jsx(L,{html:f+(e.setup.defaultWhere.toLowerCase().trim().substring(0,5)==="where"||e.setup.defaultWhere.trim()===""?"":"where ")+e.setup.defaultWhere.replace(`
`,"<br/>")})})]}),r.jsx(v,{})]})]}),r.jsx(W,{})]})]})},Jr=({appId:t})=>{A.debug(t);const e=j(t);return r.jsxs(r.Fragment,{children:[r.jsx(g,{appId:t,mapSettings:e}),r.jsx(b,{appId:t,mapSettings:e}),r.jsx(S,{appId:t,mapSettings:e}),r.jsx(M,{appId:t,mapSettings:e}),r.jsx(B,{appId:t,mapSettings:e})]})};export{Jr as default};
