@asaleh37/ui-base 25.9.17 → 25.9.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +112 -112
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +112 -112
- package/dist/index.mjs.map +1 -1
- package/index.html +7 -0
- package/package.json +1 -1
- package/public/manifest.json +21 -0
- package/src/components/common/MobileLogin.tsx +229 -0
- package/src/components/templates/DataEntryTemplates/DataEntryTypes.ts +1 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementGroup.tsx +2 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +1 -0
- package/src/layout/Layout.tsx +4 -1
- package/src/main.tsx +2 -2
- package/src/navigationItems/index.tsx +0 -7
- package/src/routes/index.ts +1 -4
- package/vite.config.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("@mui/x-data-grid-premium"),t=require("react/jsx-runtime"),i=require("react-redux"),o=require("@fortawesome/fontawesome-svg-core"),r=require("@fortawesome/free-brands-svg-icons"),n=require("@fortawesome/free-regular-svg-icons"),a=require("@fortawesome/free-solid-svg-icons");require("react-toastify/dist/ReactToastify.css");var s=require("@mui/material"),l=require("@emotion/react"),d=require("react"),c=require("@mui/material/styles"),u=require("@mui/material/CssBaseline"),p=require("@mui/material/AppBar"),h=require("@mui/material/Toolbar"),m=require("@fortawesome/react-fontawesome"),f=require("@reduxjs/toolkit"),g=require("react-toastify"),T=require("axios"),A=require("i18next"),y=require("react-i18next"),I=require("react-hook-form"),_=require("react-router-dom"),E=require("@hookform/resolvers/zod"),O=require("zod"),C=require("@mui/material/List"),N=require("@mui/material/Card"),R=require("@mui/material/CardHeader"),b=require("@mui/material/ListItemText"),w=require("@mui/material/ListItemIcon"),P=require("@mui/material/Checkbox"),S=require("@mui/material/Button"),v=require("@mui/material/Divider"),L=require("@mui/x-date-pickers"),M=require("@mui/x-date-pickers/AdapterMoment"),x=require("moment"),D=require("@mui/material/CardActions"),k=require("@mui/material/CardContent"),U=require("@mui/material/CardMedia"),F=require("@mui/material/Typography"),B=require("@mui/lab"),q=require("@mui/x-tree-view/models"),j=require("@mui/x-charts"),G=require("@mui/material/LinearProgress"),W=require("@mui/material/Box"),H=require("@mui/x-charts/PieChart"),Y=require("@mui/material/IconButton"),K=require("@mui/material/Drawer"),V=require("@react-spring/web"),z=require("@mui/material/Collapse"),Q=require("@mui/x-tree-view/RichTreeView"),$=require("@mui/x-tree-view/TreeItem"),Z=require("@mui/x-tree-view/useTreeItem2"),J=require("@mui/x-tree-view/TreeItem2"),X=require("@mui/x-tree-view/TreeItem2Icon"),ee=require("@mui/x-tree-view/TreeItem2Provider"),te=require("@mui/x-tree-view/TreeItem2DragAndDropOverlay"),ie=require("stylis-plugin-rtl"),oe=require("stylis"),re=require("@emotion/cache"),ne=require("@emotion/styled"),ae=require("@mui/material/colors"),se=require("@mui/material/SwipeableDrawer"),le=require("@mui/x-license");function de(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var ce=de(d),ue=de(O);!function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("html,\nbody {\n height: 100vh;\n margin: 0;\n padding: 0;\n}\n\n#root {\n height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n\n.red-row {\n background-color: #f0d8d8;\n}\n");const pe=(e=768)=>{const[t,i]=d.useState(window.innerWidth<e);return d.useEffect(()=>{const t=()=>i(window.innerWidth<e);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),t},he=350,me={themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},fe=f.createSlice({name:"AppLayout",initialState:me,reducers:{setThemeMode:(e,t)=>{e.themeMode=t.payload},setAppDirection:(e,t)=>{e.appDirection=t.payload}}}),ge=fe.actions;var Te=fe.reducer;const Ae=f.createSlice({name:"loadingMask",initialState:{value:{isOpened:!1,message:null}},reducers:{showLoadingMask:(e,t)=>{e.value.isOpened=!0,e.value.message=t.payload},hideLoadingMask:e=>{e.value.isOpened=!1,e.value.message=null}}}),{showLoadingMask:ye,hideLoadingMask:Ie}=Ae.actions;var _e=Ae.reducer;const Ee=()=>{const e=i.useDispatch();return{show:t=>{e(ye(t))},hide:()=>{e(Ie())}}},Oe=f.createSlice({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,t)=>{e.value=t.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),Ce=Oe.actions;var Ne=Oe.reducer;const Re=()=>{const e=Ee(),t=i.useDispatch(),o=i.useSelector(e=>e.AppInfo.value.apiBaseUrl),r=T.create({baseURL:o,timeout:6e5,withCredentials:!0});r.defaults.withCredentials=!0,r.interceptors.request.use(e=>{const t=localStorage.getItem("TOKEN");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e)),r.interceptors.response.use(e=>e,e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))t(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN"),g.toast.error("your session is now expired, you need to login again",{autoClose:!1});else if(e&&(e.response&&(e.response.status&&402===e.response.status)))t(Ce.setUnAuthenticated()),g.toast.error("Your license is missing or has expired,Please reach out to your vendor for assistance.");else if(e&&(e.response&&(e.response.status&&403===e.response.status)))g.toast.error("you aren't authorized to process this request");else if(e&&(e.response&&(e.response.status&&500===e.response.status)))if(e.response.data instanceof Blob){e.response.data.text().then(e=>{g.toast.error(e)})}else g.toast.error(e.response.data);else g.toast.error("failed to communicate with the server ... try again later");return"ERROR"});return{handleGetRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await r.get(t.endPointURI,{params:{...t.parameters},withCredentials:!0,headers:t.headers,responseType:t?.responseType});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handlePostRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await r.post(t.endPointURI,t.data,{params:t.parameters,responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleDeleteRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await r.delete(t.endPointURI,{params:{...t.parameters},responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},HandleDownloadHTTPPostPDF:async(t={endPointURI:"",parameters:{},data:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await r.post(t.endPointURI,t.data,{responseType:"blob"});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleUploadRequest:async t=>{if(null===t.files||0===t.files.length)return g.toast.error("You must add files to upload"),"ERROR";const i=new FormData;for(const e of t.files)i.append("files",e);void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let o=await r.post(t.endPointURI,i,{params:t?.parameters,headers:{"Content-Type":"multipart/form-data"}});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==o?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(o),o):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(o),"ERROR")}}},be=e=>{const[i,o]=d.useState(!1),{t:r}=y.useTranslation();return{ConfirmationWindow:()=>t.jsxs(s.Dialog,{open:i,children:[t.jsx(s.DialogTitle,{children:e.title}),t.jsx(s.DialogContent,{children:t.jsx(s.DialogContentText,{children:e.body})}),t.jsxs(s.DialogActions,{children:[t.jsx(s.Button,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"primary",onClick:()=>{o(!1)},children:r("NO_LABEL")}),t.jsx(s.Button,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"error",onClick:()=>{e.onConfirmationCallBk(),o(!1)},autoFocus:!0,children:r("YES_LABEL")})]})]}),open:i,setOpen:o}},we=()=>{const e=i.useSelector(e=>e.UserSession),t=e.value;return{UserSession:e,isUserAuthorized:t=>{if(e?.value?.authorities)for(let i of e.value.authorities){if("DEVELOPMENT_ADMIN"===t&&("DEVELOPMENT_ADMIN"===i?.authority||"ORGANIZATION_ADMIN"===i?.authority))return!0;if("ORGANIZATION_ADMIN"===t&&"ORGANIZATION_ADMIN"===i?.authority)return!0;if("DEVELOPMENT_ADMIN"!==t&&"ORGANIZATION_ADMIN"!==t&&("ORGANIZATION_ADMIN"===i?.authority||"DEVELOPMENT_ADMIN"===i?.authority||"SYSTEM_ADMIN"===i?.authority||i?.authority===t))return!0}return!1},isCurrentOrganizationAuthorizedToModule:e=>{if(t?.currentOrganization?.systemApplicationModules)for(const i of t.currentOrganization.systemApplicationModules)if(i.toLowerCase()==e.toLowerCase())return!0;return!1},UserInfo:t}},Pe=e=>{const[o,r]=d.useState(!1),n=i.useSelector(e=>e.AppLayout.appDirection);return{windowState:o,setWindowState:r,Window:i=>t.jsx(s.Modal,{open:o,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!o&&e?.onCloseCallBack&&e.onCloseCallBack()},children:t.jsxs(s.Box,{dir:n,sx:{position:"absolute",top:"50%",left:"50%",maxHeight:"90%",transform:"translate(-50%, -50%)",height:e?.height||"80%",width:e?.width||"90%",minWidth:e.minWidth||400,minHeight:e.minHeight||200,overflow:"hidden",bgcolor:"modalBackground.main",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:[t.jsx(s.AppBar,{position:"static",children:t.jsxs(s.Toolbar,{variant:"dense",children:[t.jsx(m.FontAwesomeIcon,{icon:e?.windowIcon||"window-maximize",style:{marginRight:5}}),t.jsx(s.Typography,{variant:"h6",color:"inherit",component:"div",children:e?.windowTitle||"window"}),t.jsx("div",{style:{flexGrow:1}}),t.jsx(s.IconButton,{onClick:()=>{r(!1),null!=e.onCloseCallBack&&null!=e.onCloseCallBack&&e.onCloseCallBack()},color:"secondary",children:t.jsx(m.FontAwesomeIcon,{icon:"xmark-square"})})]})}),t.jsx(s.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:i?.children})]})})}},Se=f.createSlice({name:"commonStores",initialState:{stores:{},storeKeys:[]},reducers:{setStoresMetaData:(e,t)=>{e.stores=t.payload,e.storeKeys=Object.keys(t.payload)},setStoreData:(e,t)=>{e.stores[t.payload.storeKey].data=t.payload.data}}}),{setStoreData:ve,setStoresMetaData:Le}=Se.actions;var Me=Se.reducer;const xe=e=>{const t=i.useSelector(e=>e.commonStores.stores),o=i.useDispatch(),r=we(),{handleGetRequest:n,handlePostRequest:a,handleDeleteRequest:s}=Re();return{reloadData:async i=>{if(e?.commonStoreKey){const i=Object.keys(t);for(const a of i)if(a===e.commonStoreKey&&(void 0===t[a]?.authority||null===t[a]?.authority||r.isUserAuthorized(t[a]?.authority))&&""!=t[a]?.url){await n({endPointURI:t[a].url,showMask:!1,successCallBkFn:t=>{o(ve({storeKey:a,data:t.data})),e.setData(t.data)},failureCallBkFn:()=>{o(ve({storeKey:a,data:[]})),e.setData([])}});break}}else e?.findAll&&await n({endPointURI:e.findAll,showMask:!0,parameters:i||{},successCallBkFn:t=>{e.setData(t.data)}})},loadRecordById:async t=>{let i=null;if(e?.findById){const o={};o[e?.findByIdParamName||"id"]=t,await n({endPointURI:e.findById,showMask:!0,parameters:o,successCallBkFn:e=>{i=e.data}})}return i},saveRecord:async t=>{let i=null;return e?.save&&await a({endPointURI:e.save,data:t,showMask:!0,successCallBkFn:e=>{i=e.data}}),i},deleteRecordById:async t=>{let i=!0;if(e?.deleteById){const o={};o[e?.deleteByIdParamName||"id"]=t,await s({endPointURI:e.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{i=!0},failureCallBkFn:()=>{i=!1}})}return i}}},De=e=>{const{t:i}=y.useTranslation();return t.jsx(s.TextField,{...e,hidden:!0,slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:t.jsx(t.Fragment,{children:e?.label?i(e.label):""}),error:e?.error,helperText:e?.helperText?i(e.helperText):void 0})};function ke(e,t){return e.filter(e=>-1===t.indexOf(e))}function Ue(e,t){return e.filter(e=>-1!==t.indexOf(e))}const Fe=({valueField:e="id",displayField:i="name",options:o=[],selectedOptions:r=[],setSelection:n})=>{const[a,l]=ce.useState([]),[d,c]=ce.useState([]),[u,p]=ce.useState([]),[h,m]=ce.useState(""),[f,g]=ce.useState(""),T=Ue(a,d),A=Ue(a,u);ce.useEffect(()=>{o&&c([...o])},[o]),ce.useEffect(()=>{r&&p([...r])},[r]);const y=e=>()=>{const t=a.indexOf(e),i=[...a];-1===t?i.push(e):i.splice(t,1),l(i)},I=e=>Ue(a,e).length,_=e=>()=>{var t,i;I(e)===e.length?l(ke(a,e)):l((t=a,i=e,[...t,...ke(i,t)]))},E=(o,r,n)=>{const l=r.filter(e=>{if(e[i]){const t=e[i];if("left"===n&&t.toLocaleLowerCase().includes(h.toLocaleLowerCase()))return!0;if("right"===n&&t.toLocaleLowerCase().includes(f.toLocaleLowerCase()))return!0}return!1});return t.jsxs(N,{sx:{height:"100%"},children:[t.jsx(R,{sx:{px:2,py:1},avatar:t.jsx(P,{onClick:_(l),checked:I(l)===l.length&&0!==l.length,indeterminate:I(l)!==l.length&&0!==I(l),disabled:0===l.length,inputProps:{"aria-label":"all items selected"}}),title:o,subheader:`${I(r)} / ${r.length} Selected`}),t.jsx(s.Box,{sx:{width:"100%",padding:1},children:t.jsx(De,{fullWidth:!0,label:"search",value:"left"===n?h:f,onChange:e=>{"left"===n?m(e.target.value):g(e.target.value)}})}),t.jsx(v,{}),t.jsx(C,{sx:{width:"100%",height:"80%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:l.map(o=>(o[e],t.jsxs(s.ListItemButton,{role:"listitem",onClick:y(o),sx:{cursor:"pointer"},children:[t.jsx(w,{children:t.jsx(P,{checked:-1!==a.indexOf(o),tabIndex:-1,disableRipple:!0})}),t.jsx(b,{id:o[e],primary:o[i]})]},o[e])))})]})};return t.jsxs(s.Grid2,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[t.jsx(s.Grid2,{sx:{height:"100%",flex:1},children:E("Available Items",d,"left")}),t.jsx(s.Grid2,{children:t.jsxs(s.Grid2,{container:!0,direction:"column",alignItems:"center",children:[t.jsx(S,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{p(e=>{let t=u.concat(T);return n(t),t}),c(ke(d,T)),l(ke(a,T))},disabled:0===T.length,"aria-label":"move selected right",children:">"}),t.jsx(S,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{c(d.concat(A)),p(e=>{let t=ke(u,A);return n(t),t}),l(ke(a,A))},disabled:0===A.length,"aria-label":"move selected left",children:"<"})]})}),t.jsx(s.Grid2,{sx:{height:"100%",flex:1},children:E("Currently Selected",u,"right")})]})},Be=e=>{const{t:i}=y.useTranslation();return t.jsx(s.FormControlLabel,{sx:e.sx,hidden:e?.hidden||!1,disabled:e.disabled||!1,required:e.required||!1,control:t.jsx(s.Checkbox,{checked:e?.checkedValue==e.value||"true"===e.value||"1"==e.value,onChange:t=>{void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&(t.target.checked?void 0!==e.checkedValue&&null!=e.checkedValue?e.onChangeCallBack(e.checkedValue):e.onChangeCallBack(!0):void 0!==e.unCheckedValue&&null!=e.unCheckedValue?e.onChangeCallBack(e.unCheckedValue):e.onChangeCallBack(!1))}}),label:i(e.label)})},qe=e=>{const o=i.useSelector(e=>e.AppLayout),[r,n]=d.useState(e?.options||[]),a=i.useSelector(t=>t?.commonStores?.stores[e?.commonStoreKey]?.data),{handleGetRequest:l}=Re();d.useEffect(()=>{e?.commonStoreKey?n(a):(async()=>{e?.storeUrl?await l({endPointURI:e.storeUrl,showMask:!1,parameters:e?.storeLoadParam,successCallBkFn:e=>{n(e.data)},failureCallBkFn:()=>{n([])}}):e?.dataQueryId?await l({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e?.storeLoadParam},successCallBkFn:e=>{n(e.data)},failureCallBkFn:()=>{n([])}}):e?.options&&n(e.options)})()},[e?.storeUrl,e?.storeLoadParam,e?.dataQueryId,e?.commonStoreKey,e?.options,a]);const{t:c}=y.useTranslation();return t.jsx(s.Autocomplete,{sx:e.sx,value:(t=>{for(let i of r)if(i[e.valueField]==t)return i;return null})(e.value),options:r,disabled:e.disabled,hidden:e?.hidden||!1,onChange:(t,i)=>{if(void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack)if(null!=i){let t=i[e.valueField];e.onChangeCallBack(t,i)}else e.onChangeCallBack(null,null)},clearOnBlur:!0,handleHomeEndKeys:!0,getOptionLabel:t=>null!=t?c(t[e.displayField]):"",renderOption:(i,o)=>t.jsx("li",{...i,children:null!=o?c(o[e.displayField]):""}),slots:{popper:e=>t.jsx(s.Popper,{...e,style:{...e.style,direction:o.appDirection}})},renderInput:i=>t.jsx(s.TextField,{...i,required:e.required||!1,variant:"outlined",slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:c(e.label),error:null!=e.errorMessage&&void 0!==e.errorMessage,helperText:null!=e.errorMessage&&void 0!==e.errorMessage?c(e.errorMessage):""})})},je="YYYY-MM-DD",Ge="YYYY-MM-DD HH:mm:ss",We="#37505C",He="#ff6d00",Ye="#ea690e",Ke="#74776B",Ve=e=>{const{t:i}=y.useTranslation();return e?.hidden?t.jsx(t.Fragment,{}):t.jsx(L.LocalizationProvider,{dateAdapter:M.AdapterMoment,children:t.jsx(L.DatePicker,{value:null!=e.value&&void 0!==e.value&&""!==e.value?x(e.value,e?.format||je):null,sx:{...e.sx,display:e?.hidden?"none":void 0},label:i(e.label),format:e?.format||je,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||je)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?t.jsx(t.Fragment,{children:i(e.errorMessage)}):t.jsx(t.Fragment,{})}}})})},ze=e=>{const{t:i}=y.useTranslation();return e?.hidden?t.jsx(t.Fragment,{}):t.jsx(L.LocalizationProvider,{dateAdapter:M.AdapterMoment,children:t.jsx(L.DateTimePicker,{value:null!=e.value&&void 0!==e.value&&""!==e.value?x(e.value,e?.format||Ge):null,label:i(e.label),sx:{...e.sx,display:e?.hidden?"none":void 0},format:e?.format||Ge,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||Ge)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?t.jsx(t.Fragment,{children:i(e.errorMessage)}):t.jsx(t.Fragment,{})}}})})},Qe=e=>{const o=i.useSelector(e=>e.AppLayout),r=we(),[n,a]=d.useState([]),{handleGetRequest:s}=Re();return d.useEffect(()=>{e.lookupType&&(async()=>{await s({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:e.lookupType},successCallBkFn:e=>{a(e.data)},failureCallBkFn:()=>{a([])}})})()},[e.lookupType,r.UserSession]),t.jsx(qe,{...e,options:n,displayField:"ltr"===o.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},$e=e=>({...e,type:"string",renderEditCell:e=>t.jsx(Ve,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=x(e).format(je)),o},valueFormatter:(e,t,i)=>t[i.field]}),Ze=e=>({...e,type:"string",renderEditCell:e=>t.jsx(ze,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=x(e).format(Ge)),o},valueFormatter:(e,t,i)=>t[i.field]}),Je=e=>({...e,type:"custom",valueGetter:e=>e||e,renderCell:e=>{let i=null;try{i=e.colDef.options.find(t=>t[e.colDef.valueField]==e.value)}catch(e){}return t.jsx("div",{children:null!=i?i[e.colDef.displayField]:e.value})},renderEditCell:e=>t.jsx(qe,{...e,sx:{width:"100%"},options:e?.colDef?.options,commonStoreKey:e?.colDef?.commonStoreKey,dataQueryId:e?.colDef?.dataQueryId,storeUrl:e?.colDef?.storeUrl,storeLoadParam:e?.colDef?.storeLoadParam,valueField:e?.colDef?.valueField,displayField:e?.colDef?.displayField,onChangeCallBack:(t,i)=>{null===t&&e.api.setEditCellValue({id:e.id,field:e.field,value:null}),e.api.setEditCellValue({id:e.id,field:e.field,value:t})}})}),Xe=e=>({...e,type:"custom",valueGetter:e=>null==e||null==e?null:e,renderCell:i=>{const o=i?.value;return o===e.checkedValue||"true"===o||1===o||!0===o?t.jsx(m.FontAwesomeIcon,{icon:"check",color:"green"}):t.jsx(m.FontAwesomeIcon,{icon:"xmark",color:"red"})},renderEditCell:i=>t.jsx(Be,{...i,checkedValue:e?.checkedValue||!0,unCheckedValue:e?.unCheckedValue||!1,onChangeCallBack:e=>{i.api.setEditCellValue({id:i.id,field:i.field,value:e})}})}),et=e=>{const t=[];if("field"===e.type&&"props"===e.mode&&e?.props)t.push(e.props);else if("group"===e.type&&e?.props&&e?.props?.elements)for(const i of e.props.elements)t.push(...et(i));return t},tt=e=>{const t=[];for(const i of e)t.push(...et(i));return t},it=(e,t,i)=>{const o=[];for(const r of e)if("text"===r?.fieldType||"number"===r?.fieldType){const e={...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,type:"number"==r?.fieldType?"number":"string",field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200};o.push(e)}else if("date"===r?.fieldType){const e=$e({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else if("datetime"===r?.fieldType){const e=Ze({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else if("checkbox"===r?.fieldType){const e=Xe({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,checkedValue:r?.checkedValue,unCheckedValue:r?.unCheckedValue,width:150});o.push(e)}else if("combobox"===r?.fieldType){const e=Je({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,valueField:r?.optionValueField||"value",displayField:r?.optionDisplayField||"display",options:r?.options||[],flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else if("lookup"===r?.fieldType){const e=Je({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,lookupType:r?.lookupType,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,valueField:r?.optionValueField||"value",displayField:r?.optionDisplayField||"display",options:r?.options||[],flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else{const e={field:r.fieldName,...r?.gridProps?.muiProps};o.push(e)}return o},ot=e=>{const t={};for(const i of e)if(i?.fieldName){const e=i.fieldName;"number"===i.fieldType?t[e]=!0===i?.required?ue.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ue.number().optional().nullable():"checkbox"===i.fieldType?t[e]=!0===i?.required?ue.boolean({required_error:"This field is required"}):ue.boolean().optional().nullable():"combobox"===i.fieldType?i?.comboboxValueDataType?"number"===i?.comboboxValueDataType?t[e]=!0===i?.required?ue.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ue.number().optional().nullable():"string"===i?.comboboxValueDataType&&(t[e]=!0===i?.required?ue.string({message:"This field is required"}).min(1,"This field is required"):ue.string().optional().nullable()):t[e]=!0===i?.required?ue.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ue.number().optional().nullable():t[e]=!0===i?.required?ue.string({message:"This field is required"}).min(1,"This field is required"):ue.string().optional().nullable()}return t},rt=(e,t,i)=>{const o=[],r=[];if("exclude"===e.type&&0===e.ids.size)for(const e of t)o.push(e),r.push(e[i]);else if(e?.ids)for(const n of e.ids){const e=t.find(e=>e[i]===n);o.push(e),r.push(n)}return{selectedRecords:o,selectedRecordIds:r}};function nt(e,...t){const i=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>i.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${i} for the full message.`}function at(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var st,lt={exports:{}},dt={exports:{}},ct={};var ut,pt,ht,mt,ft,gt,Tt,At,yt,It,_t,Et,Ot,Ct,Nt,Rt={};
|
|
1
|
+
"use strict";var e=require("@mui/x-data-grid-premium"),t=require("react/jsx-runtime"),i=require("react-redux"),o=require("@fortawesome/fontawesome-svg-core"),r=require("@fortawesome/free-brands-svg-icons"),n=require("@fortawesome/free-regular-svg-icons"),a=require("@fortawesome/free-solid-svg-icons");require("react-toastify/dist/ReactToastify.css");var s=require("@mui/material"),l=require("@emotion/react"),d=require("react"),c=require("@mui/material/styles"),u=require("@mui/material/CssBaseline"),p=require("@mui/material/AppBar"),h=require("@mui/material/Toolbar"),m=require("@fortawesome/react-fontawesome"),f=require("@reduxjs/toolkit"),g=require("react-toastify"),T=require("axios"),A=require("i18next"),y=require("react-i18next"),I=require("react-hook-form"),_=require("react-router-dom"),E=require("@hookform/resolvers/zod"),O=require("zod"),C=require("@mui/material/List"),N=require("@mui/material/Card"),R=require("@mui/material/CardHeader"),b=require("@mui/material/ListItemText"),w=require("@mui/material/ListItemIcon"),S=require("@mui/material/Checkbox"),P=require("@mui/material/Button"),v=require("@mui/material/Divider"),L=require("@mui/x-date-pickers"),M=require("@mui/x-date-pickers/AdapterMoment"),x=require("moment"),D=require("@mui/material/CardActions"),k=require("@mui/material/CardContent"),U=require("@mui/material/CardMedia"),F=require("@mui/material/Typography"),B=require("@mui/lab"),q=require("@mui/x-tree-view/models"),j=require("@mui/x-charts"),G=require("@mui/material/LinearProgress"),W=require("@mui/material/Box"),H=require("@mui/x-charts/PieChart"),Y=require("@mui/material/IconButton"),K=require("@mui/material/Drawer"),V=require("@react-spring/web"),z=require("@mui/material/Collapse"),Q=require("@mui/x-tree-view/RichTreeView"),$=require("@mui/x-tree-view/TreeItem"),Z=require("@mui/x-tree-view/useTreeItem2"),J=require("@mui/x-tree-view/TreeItem2"),X=require("@mui/x-tree-view/TreeItem2Icon"),ee=require("@mui/x-tree-view/TreeItem2Provider"),te=require("@mui/x-tree-view/TreeItem2DragAndDropOverlay"),ie=require("stylis-plugin-rtl"),oe=require("stylis"),re=require("@emotion/cache"),ne=require("@emotion/styled"),ae=require("@mui/material/colors"),se=require("@mui/material/SwipeableDrawer"),le=require("@mui/x-license");function de(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var ce=de(d),ue=de(O);!function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("html,\nbody {\n height: 100vh;\n margin: 0;\n padding: 0;\n}\n\n#root {\n height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n\n.red-row {\n background-color: #f0d8d8;\n}\n");const pe=(e=768)=>{const[t,i]=d.useState(window.innerWidth<e);return d.useEffect(()=>{const t=()=>i(window.innerWidth<e);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),t},he=350,me={themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},fe=f.createSlice({name:"AppLayout",initialState:me,reducers:{setThemeMode:(e,t)=>{e.themeMode=t.payload},setAppDirection:(e,t)=>{e.appDirection=t.payload}}}),ge=fe.actions;var Te=fe.reducer;const Ae=f.createSlice({name:"loadingMask",initialState:{value:{isOpened:!1,message:null}},reducers:{showLoadingMask:(e,t)=>{e.value.isOpened=!0,e.value.message=t.payload},hideLoadingMask:e=>{e.value.isOpened=!1,e.value.message=null}}}),{showLoadingMask:ye,hideLoadingMask:Ie}=Ae.actions;var _e=Ae.reducer;const Ee=()=>{const e=i.useDispatch();return{show:t=>{e(ye(t))},hide:()=>{e(Ie())}}},Oe=f.createSlice({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,t)=>{e.value=t.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),Ce=Oe.actions;var Ne=Oe.reducer;const Re=()=>{const e=Ee(),t=i.useDispatch(),o=i.useSelector(e=>e.AppInfo.value.apiBaseUrl),r=T.create({baseURL:o,timeout:6e5,withCredentials:!0});r.defaults.withCredentials=!0,r.interceptors.request.use(e=>{const t=localStorage.getItem("TOKEN");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e)),r.interceptors.response.use(e=>e,e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))t(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN"),g.toast.error("your session is now expired, you need to login again",{autoClose:!1});else if(e&&(e.response&&(e.response.status&&402===e.response.status)))t(Ce.setUnAuthenticated()),g.toast.error("Your license is missing or has expired,Please reach out to your vendor for assistance.");else if(e&&(e.response&&(e.response.status&&403===e.response.status)))g.toast.error("you aren't authorized to process this request");else if(e&&(e.response&&(e.response.status&&500===e.response.status)))if(e.response.data instanceof Blob){e.response.data.text().then(e=>{g.toast.error(e)})}else g.toast.error(e.response.data);else g.toast.error("failed to communicate with the server ... try again later");return"ERROR"});return{handleGetRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await r.get(t.endPointURI,{params:{...t.parameters},withCredentials:!0,headers:t.headers,responseType:t?.responseType});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handlePostRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await r.post(t.endPointURI,t.data,{params:t.parameters,responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleDeleteRequest:async t=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await r.delete(t.endPointURI,{params:{...t.parameters},responseType:t?.responseType,headers:t?.headers});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},HandleDownloadHTTPPostPDF:async(t={endPointURI:"",parameters:{},data:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await r.post(t.endPointURI,t.data,{responseType:"blob"});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleUploadRequest:async t=>{if(null===t.files||0===t.files.length)return g.toast.error("You must add files to upload"),"ERROR";const i=new FormData;for(const e of t.files)i.append("files",e);void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let o=await r.post(t.endPointURI,i,{params:t?.parameters,headers:{"Content-Type":"multipart/form-data"}});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==o?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(o),o):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(o),"ERROR")}}},be=e=>{const[i,o]=d.useState(!1),{t:r}=y.useTranslation();return{ConfirmationWindow:()=>t.jsxs(s.Dialog,{open:i,children:[t.jsx(s.DialogTitle,{children:e.title}),t.jsx(s.DialogContent,{children:t.jsx(s.DialogContentText,{children:e.body})}),t.jsxs(s.DialogActions,{children:[t.jsx(s.Button,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"primary",onClick:()=>{o(!1)},children:r("NO_LABEL")}),t.jsx(s.Button,{variant:"contained",sx:{marginRight:2,marginLeft:2},color:"error",onClick:()=>{e.onConfirmationCallBk(),o(!1)},autoFocus:!0,children:r("YES_LABEL")})]})]}),open:i,setOpen:o}},we=()=>{const e=i.useSelector(e=>e.UserSession),t=e.value;return{UserSession:e,isUserAuthorized:t=>{if(e?.value?.authorities)for(let i of e.value.authorities){if("DEVELOPMENT_ADMIN"===t&&("DEVELOPMENT_ADMIN"===i?.authority||"ORGANIZATION_ADMIN"===i?.authority))return!0;if("ORGANIZATION_ADMIN"===t&&"ORGANIZATION_ADMIN"===i?.authority)return!0;if("DEVELOPMENT_ADMIN"!==t&&"ORGANIZATION_ADMIN"!==t&&("ORGANIZATION_ADMIN"===i?.authority||"DEVELOPMENT_ADMIN"===i?.authority||"SYSTEM_ADMIN"===i?.authority||i?.authority===t))return!0}return!1},isCurrentOrganizationAuthorizedToModule:e=>{if(t?.currentOrganization?.systemApplicationModules)for(const i of t.currentOrganization.systemApplicationModules)if(i.toLowerCase()==e.toLowerCase())return!0;return!1},UserInfo:t}},Se=e=>{const[o,r]=d.useState(!1),n=i.useSelector(e=>e.AppLayout.appDirection);return{windowState:o,setWindowState:r,Window:i=>t.jsx(s.Modal,{open:o,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!o&&e?.onCloseCallBack&&e.onCloseCallBack()},children:t.jsxs(s.Box,{dir:n,sx:{position:"absolute",top:"50%",left:"50%",maxHeight:"90%",transform:"translate(-50%, -50%)",height:e?.height||"80%",width:e?.width||"90%",minWidth:e.minWidth||400,minHeight:e.minHeight||200,overflow:"hidden",bgcolor:"modalBackground.main",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:[t.jsx(s.AppBar,{position:"static",children:t.jsxs(s.Toolbar,{variant:"dense",children:[t.jsx(m.FontAwesomeIcon,{icon:e?.windowIcon||"window-maximize",style:{marginRight:5}}),t.jsx(s.Typography,{variant:"h6",color:"inherit",component:"div",children:e?.windowTitle||"window"}),t.jsx("div",{style:{flexGrow:1}}),t.jsx(s.IconButton,{onClick:()=>{r(!1),null!=e.onCloseCallBack&&null!=e.onCloseCallBack&&e.onCloseCallBack()},color:"secondary",children:t.jsx(m.FontAwesomeIcon,{icon:"xmark-square"})})]})}),t.jsx(s.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:i?.children})]})})}},Pe=f.createSlice({name:"commonStores",initialState:{stores:{},storeKeys:[]},reducers:{setStoresMetaData:(e,t)=>{e.stores=t.payload,e.storeKeys=Object.keys(t.payload)},setStoreData:(e,t)=>{e.stores[t.payload.storeKey].data=t.payload.data}}}),{setStoreData:ve,setStoresMetaData:Le}=Pe.actions;var Me=Pe.reducer;const xe=e=>{const t=i.useSelector(e=>e.commonStores.stores),o=i.useDispatch(),r=we(),{handleGetRequest:n,handlePostRequest:a,handleDeleteRequest:s}=Re();return{reloadData:async i=>{if(e?.commonStoreKey){const i=Object.keys(t);for(const a of i)if(a===e.commonStoreKey&&(void 0===t[a]?.authority||null===t[a]?.authority||r.isUserAuthorized(t[a]?.authority))&&""!=t[a]?.url){await n({endPointURI:t[a].url,showMask:!1,successCallBkFn:t=>{o(ve({storeKey:a,data:t.data})),e.setData(t.data)},failureCallBkFn:()=>{o(ve({storeKey:a,data:[]})),e.setData([])}});break}}else e?.findAll&&await n({endPointURI:e.findAll,showMask:!0,parameters:i||{},successCallBkFn:t=>{e.setData(t.data)}})},loadRecordById:async t=>{let i=null;if(e?.findById){const o={};o[e?.findByIdParamName||"id"]=t,await n({endPointURI:e.findById,showMask:!0,parameters:o,successCallBkFn:e=>{i=e.data}})}return i},saveRecord:async t=>{let i=null;return e?.save&&await a({endPointURI:e.save,data:t,showMask:!0,successCallBkFn:e=>{i=e.data}}),i},deleteRecordById:async t=>{let i=!0;if(e?.deleteById){const o={};o[e?.deleteByIdParamName||"id"]=t,await s({endPointURI:e.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{i=!0},failureCallBkFn:()=>{i=!1}})}return i}}},De=e=>{const{t:i}=y.useTranslation();return t.jsx(s.TextField,{...e,hidden:!0,slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:t.jsx(t.Fragment,{children:e?.label?i(e.label):""}),error:e?.error,helperText:e?.helperText?i(e.helperText):void 0})};function ke(e,t){return e.filter(e=>-1===t.indexOf(e))}function Ue(e,t){return e.filter(e=>-1!==t.indexOf(e))}const Fe=({valueField:e="id",displayField:i="name",options:o=[],selectedOptions:r=[],setSelection:n})=>{const[a,l]=ce.useState([]),[d,c]=ce.useState([]),[u,p]=ce.useState([]),[h,m]=ce.useState(""),[f,g]=ce.useState(""),T=Ue(a,d),A=Ue(a,u);ce.useEffect(()=>{o&&c([...o])},[o]),ce.useEffect(()=>{r&&p([...r])},[r]);const y=e=>()=>{const t=a.indexOf(e),i=[...a];-1===t?i.push(e):i.splice(t,1),l(i)},I=e=>Ue(a,e).length,_=e=>()=>{var t,i;I(e)===e.length?l(ke(a,e)):l((t=a,i=e,[...t,...ke(i,t)]))},E=(o,r,n)=>{const l=r.filter(e=>{if(e[i]){const t=e[i];if("left"===n&&t.toLocaleLowerCase().includes(h.toLocaleLowerCase()))return!0;if("right"===n&&t.toLocaleLowerCase().includes(f.toLocaleLowerCase()))return!0}return!1});return t.jsxs(N,{sx:{height:"100%"},children:[t.jsx(R,{sx:{px:2,py:1},avatar:t.jsx(S,{onClick:_(l),checked:I(l)===l.length&&0!==l.length,indeterminate:I(l)!==l.length&&0!==I(l),disabled:0===l.length,inputProps:{"aria-label":"all items selected"}}),title:o,subheader:`${I(r)} / ${r.length} Selected`}),t.jsx(s.Box,{sx:{width:"100%",padding:1},children:t.jsx(De,{fullWidth:!0,label:"search",value:"left"===n?h:f,onChange:e=>{"left"===n?m(e.target.value):g(e.target.value)}})}),t.jsx(v,{}),t.jsx(C,{sx:{width:"100%",height:"80%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:l.map(o=>(o[e],t.jsxs(s.ListItemButton,{role:"listitem",onClick:y(o),sx:{cursor:"pointer"},children:[t.jsx(w,{children:t.jsx(S,{checked:-1!==a.indexOf(o),tabIndex:-1,disableRipple:!0})}),t.jsx(b,{id:o[e],primary:o[i]})]},o[e])))})]})};return t.jsxs(s.Grid2,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[t.jsx(s.Grid2,{sx:{height:"100%",flex:1},children:E("Available Items",d,"left")}),t.jsx(s.Grid2,{children:t.jsxs(s.Grid2,{container:!0,direction:"column",alignItems:"center",children:[t.jsx(P,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{p(e=>{let t=u.concat(T);return n(t),t}),c(ke(d,T)),l(ke(a,T))},disabled:0===T.length,"aria-label":"move selected right",children:">"}),t.jsx(P,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{c(d.concat(A)),p(e=>{let t=ke(u,A);return n(t),t}),l(ke(a,A))},disabled:0===A.length,"aria-label":"move selected left",children:"<"})]})}),t.jsx(s.Grid2,{sx:{height:"100%",flex:1},children:E("Currently Selected",u,"right")})]})},Be=e=>{const{t:i}=y.useTranslation();return t.jsx(s.FormControlLabel,{sx:e.sx,hidden:e?.hidden||!1,disabled:e.disabled||!1,required:e.required||!1,control:t.jsx(s.Checkbox,{checked:e?.checkedValue==e.value||"true"===e.value||"1"==e.value,onChange:t=>{void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&(t.target.checked?void 0!==e.checkedValue&&null!=e.checkedValue?e.onChangeCallBack(e.checkedValue):e.onChangeCallBack(!0):void 0!==e.unCheckedValue&&null!=e.unCheckedValue?e.onChangeCallBack(e.unCheckedValue):e.onChangeCallBack(!1))}}),label:i(e.label)})},qe=e=>{const o=i.useSelector(e=>e.AppLayout),[r,n]=d.useState(e?.options||[]),a=i.useSelector(t=>t?.commonStores?.stores[e?.commonStoreKey]?.data),{handleGetRequest:l}=Re();d.useEffect(()=>{e?.commonStoreKey?n(a):(async()=>{e?.storeUrl?await l({endPointURI:e.storeUrl,showMask:!1,parameters:e?.storeLoadParam,successCallBkFn:e=>{n(e.data)},failureCallBkFn:()=>{n([])}}):e?.dataQueryId?await l({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e?.storeLoadParam},successCallBkFn:e=>{n(e.data)},failureCallBkFn:()=>{n([])}}):e?.options&&n(e.options)})()},[e?.storeUrl,e?.storeLoadParam,e?.dataQueryId,e?.commonStoreKey,e?.options,a]);const{t:c}=y.useTranslation();return t.jsx(s.Autocomplete,{sx:e.sx,value:(t=>{for(let i of r)if(i[e.valueField]==t)return i;return null})(e.value),options:r,disabled:e.disabled,hidden:e?.hidden||!1,onChange:(t,i)=>{if(void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack)if(null!=i){let t=i[e.valueField];e.onChangeCallBack(t,i)}else e.onChangeCallBack(null,null)},clearOnBlur:!0,handleHomeEndKeys:!0,getOptionLabel:t=>null!=t?c(t[e.displayField]):"",renderOption:(i,o)=>t.jsx("li",{...i,children:null!=o?c(o[e.displayField]):""}),slots:{popper:e=>t.jsx(s.Popper,{...e,style:{...e.style,direction:o.appDirection}})},renderInput:i=>t.jsx(s.TextField,{...i,required:e.required||!1,variant:"outlined",slotProps:{inputLabel:{shrink:!0,sx:{fontWeight:"bold"}}},label:c(e.label),error:null!=e.errorMessage&&void 0!==e.errorMessage,helperText:null!=e.errorMessage&&void 0!==e.errorMessage?c(e.errorMessage):""})})},je="YYYY-MM-DD",Ge="YYYY-MM-DD HH:mm:ss",We="#37505C",He="#ff6d00",Ye="#ea690e",Ke="#74776B",Ve=e=>{const{t:i}=y.useTranslation();return e?.hidden?t.jsx(t.Fragment,{}):t.jsx(L.LocalizationProvider,{dateAdapter:M.AdapterMoment,children:t.jsx(L.DatePicker,{value:null!=e.value&&void 0!==e.value&&""!==e.value?x(e.value,e?.format||je):null,sx:{...e.sx,display:e?.hidden?"none":void 0},label:i(e.label),format:e?.format||je,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||je)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?t.jsx(t.Fragment,{children:i(e.errorMessage)}):t.jsx(t.Fragment,{})}}})})},ze=e=>{const{t:i}=y.useTranslation();return e?.hidden?t.jsx(t.Fragment,{}):t.jsx(L.LocalizationProvider,{dateAdapter:M.AdapterMoment,children:t.jsx(L.DateTimePicker,{value:null!=e.value&&void 0!==e.value&&""!==e.value?x(e.value,e?.format||Ge):null,label:i(e.label),sx:{...e.sx,display:e?.hidden?"none":void 0},format:e?.format||Ge,disabled:e.disabled,onChange:t=>{let i=null;null!=t&&t.isValid()&&(i=t.format(e?.format||Ge)),void 0!==e.onChangeCallBack&&null!=e.onChangeCallBack&&e.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0,sx:{fontWeight:"bold"}},variant:"outlined",required:e.required,error:void 0!==e.errorMessage&&null!=e.errorMessage,helperText:void 0!==e.errorMessage&&null!=e.errorMessage?t.jsx(t.Fragment,{children:i(e.errorMessage)}):t.jsx(t.Fragment,{})}}})})},Qe=e=>{const o=i.useSelector(e=>e.AppLayout),r=we(),[n,a]=d.useState([]),{handleGetRequest:s}=Re();return d.useEffect(()=>{e.lookupType&&(async()=>{await s({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:e.lookupType},successCallBkFn:e=>{a(e.data)},failureCallBkFn:()=>{a([])}})})()},[e.lookupType,r.UserSession]),t.jsx(qe,{...e,options:n,displayField:"ltr"===o.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},$e=e=>({...e,type:"string",renderEditCell:e=>t.jsx(Ve,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=x(e).format(je)),o},valueFormatter:(e,t,i)=>t[i.field]}),Ze=e=>({...e,type:"string",renderEditCell:e=>t.jsx(ze,{sx:{width:"100%"},label:"",value:e.value,onChangeCallBack:t=>{e.api.setEditCellValue({id:e.id,field:e.field,value:t})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=x(e).format(Ge)),o},valueFormatter:(e,t,i)=>t[i.field]}),Je=e=>({...e,type:"custom",valueGetter:e=>e||e,renderCell:e=>{let i=null;try{i=e.colDef.options.find(t=>t[e.colDef.valueField]==e.value)}catch(e){}return t.jsx("div",{children:null!=i?i[e.colDef.displayField]:e.value})},renderEditCell:e=>t.jsx(qe,{...e,sx:{width:"100%"},options:e?.colDef?.options,commonStoreKey:e?.colDef?.commonStoreKey,dataQueryId:e?.colDef?.dataQueryId,storeUrl:e?.colDef?.storeUrl,storeLoadParam:e?.colDef?.storeLoadParam,valueField:e?.colDef?.valueField,displayField:e?.colDef?.displayField,onChangeCallBack:(t,i)=>{null===t&&e.api.setEditCellValue({id:e.id,field:e.field,value:null}),e.api.setEditCellValue({id:e.id,field:e.field,value:t})}})}),Xe=e=>({...e,type:"custom",valueGetter:e=>null==e||null==e?null:e,renderCell:i=>{const o=i?.value;return o===e.checkedValue||"true"===o||1===o||!0===o?t.jsx(m.FontAwesomeIcon,{icon:"check",color:"green"}):t.jsx(m.FontAwesomeIcon,{icon:"xmark",color:"red"})},renderEditCell:i=>t.jsx(Be,{...i,checkedValue:e?.checkedValue||!0,unCheckedValue:e?.unCheckedValue||!1,onChangeCallBack:e=>{i.api.setEditCellValue({id:i.id,field:i.field,value:e})}})}),et=e=>{const t=[];if("field"===e.type&&"props"===e.mode&&e?.props)t.push(e.props);else if("group"===e.type&&e?.props&&e?.props?.elements)for(const i of e.props.elements)t.push(...et(i));return t},tt=e=>{const t=[];for(const i of e)t.push(...et(i));return t},it=(e,t,i)=>{const o=[];for(const r of e)if("text"===r?.fieldType||"number"===r?.fieldType){const e={...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,type:"number"==r?.fieldType?"number":"string",field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200};o.push(e)}else if("date"===r?.fieldType){const e=$e({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else if("datetime"===r?.fieldType){const e=Ze({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else if("checkbox"===r?.fieldType){const e=Xe({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,checkedValue:r?.checkedValue,unCheckedValue:r?.unCheckedValue,width:150});o.push(e)}else if("combobox"===r?.fieldType){const e=Je({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,valueField:r?.optionValueField||"value",displayField:r?.optionDisplayField||"display",options:r?.options||[],flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else if("lookup"===r?.fieldType){const e=Je({...r?.gridProps?.muiProps,editable:null!=r?.gridProps?.muiProps?.editable?r?.gridProps?.muiProps?.editable:t,lookupType:r?.lookupType,field:r?.fieldName,headerName:i(r?.fieldLabel||r?.fieldName),headerAlign:"center",align:"center",hidden:r?.hidden,searchable:r?.gridProps?.searchable,valueField:r?.optionValueField||"value",displayField:r?.optionDisplayField||"display",options:r?.options||[],flex:r?.gridProps?.muiProps?.flex||1,minWidth:r?.gridProps?.muiProps?.width?r?.gridProps?.muiProps?.width:200});o.push(e)}else{const e={field:r.fieldName,...r?.gridProps?.muiProps};o.push(e)}return o},ot=e=>{const t={};for(const i of e)if(i?.fieldName){const e=i.fieldName;"number"===i.fieldType?t[e]=!0===i?.required?ue.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ue.number().optional().nullable():"checkbox"===i.fieldType?t[e]=!0===i?.required?ue.boolean({required_error:"This field is required"}):ue.boolean().optional().nullable():"combobox"===i.fieldType?i?.comboboxValueDataType?"number"===i?.comboboxValueDataType?t[e]=!0===i?.required?ue.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ue.number().optional().nullable():"string"===i?.comboboxValueDataType&&(t[e]=!0===i?.required?ue.string({message:"This field is required"}).min(1,"This field is required"):ue.string().optional().nullable()):t[e]=!0===i?.required?ue.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ue.number().optional().nullable():t[e]=!0===i?.required?ue.string({message:"This field is required"}).min(1,"This field is required"):ue.string().optional().nullable()}return t},rt=(e,t,i)=>{const o=[],r=[];if("exclude"===e.type&&0===e.ids.size)for(const e of t)o.push(e),r.push(e[i]);else if(e?.ids)for(const n of e.ids){const e=t.find(e=>e[i]===n);o.push(e),r.push(n)}return{selectedRecords:o,selectedRecordIds:r}};function nt(e,...t){const i=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>i.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${i} for the full message.`}function at(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var st,lt={exports:{}},dt={exports:{}},ct={};var ut,pt,ht,mt,ft,gt,Tt,At,yt,It,_t,Et,Ot,Ct,Nt,Rt={};
|
|
2
2
|
/** @license React v16.13.1
|
|
3
3
|
* react-is.development.js
|
|
4
4
|
*
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/function bt(){return pt||(pt=1,"production"===process.env.NODE_ENV?dt.exports=function(){if(st)return ct;st=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,n=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case d:case o:case n:case r:case u:return e;default:switch(e=e&&e.$$typeof){case s:case c:case m:case h:case a:return e;default:return p}}case i:return p}}}function I(e){return y(e)===d}return ct.AsyncMode=l,ct.ConcurrentMode=d,ct.ContextConsumer=s,ct.ContextProvider=a,ct.Element=t,ct.ForwardRef=c,ct.Fragment=o,ct.Lazy=m,ct.Memo=h,ct.Portal=i,ct.Profiler=n,ct.StrictMode=r,ct.Suspense=u,ct.isAsyncMode=function(e){return I(e)||y(e)===l},ct.isConcurrentMode=I,ct.isContextConsumer=function(e){return y(e)===s},ct.isContextProvider=function(e){return y(e)===a},ct.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ct.isForwardRef=function(e){return y(e)===c},ct.isFragment=function(e){return y(e)===o},ct.isLazy=function(e){return y(e)===m},ct.isMemo=function(e){return y(e)===h},ct.isPortal=function(e){return y(e)===i},ct.isProfiler=function(e){return y(e)===n},ct.isStrictMode=function(e){return y(e)===r},ct.isSuspense=function(e){return y(e)===u},ct.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===n||e===r||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===T||e.$$typeof===A||e.$$typeof===f)},ct.typeOf=y,ct}():dt.exports=(ut||(ut=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,n=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var f=e.type;switch(f){case l:case d:case o:case n:case r:case u:return f;default:var g=f&&f.$$typeof;switch(g){case s:case c:case m:case h:case a:return g;default:return p}}case i:return p}}}var I=l,_=d,E=s,O=a,C=t,N=c,R=o,b=m,w=h,
|
|
9
|
+
*/function bt(){return pt||(pt=1,"production"===process.env.NODE_ENV?dt.exports=function(){if(st)return ct;st=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,n=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case d:case o:case n:case r:case u:return e;default:switch(e=e&&e.$$typeof){case s:case c:case m:case h:case a:return e;default:return p}}case i:return p}}}function I(e){return y(e)===d}return ct.AsyncMode=l,ct.ConcurrentMode=d,ct.ContextConsumer=s,ct.ContextProvider=a,ct.Element=t,ct.ForwardRef=c,ct.Fragment=o,ct.Lazy=m,ct.Memo=h,ct.Portal=i,ct.Profiler=n,ct.StrictMode=r,ct.Suspense=u,ct.isAsyncMode=function(e){return I(e)||y(e)===l},ct.isConcurrentMode=I,ct.isContextConsumer=function(e){return y(e)===s},ct.isContextProvider=function(e){return y(e)===a},ct.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ct.isForwardRef=function(e){return y(e)===c},ct.isFragment=function(e){return y(e)===o},ct.isLazy=function(e){return y(e)===m},ct.isMemo=function(e){return y(e)===h},ct.isPortal=function(e){return y(e)===i},ct.isProfiler=function(e){return y(e)===n},ct.isStrictMode=function(e){return y(e)===r},ct.isSuspense=function(e){return y(e)===u},ct.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===n||e===r||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===T||e.$$typeof===A||e.$$typeof===f)},ct.typeOf=y,ct}():dt.exports=(ut||(ut=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,n=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var f=e.type;switch(f){case l:case d:case o:case n:case r:case u:return f;default:var g=f&&f.$$typeof;switch(g){case s:case c:case m:case h:case a:return g;default:return p}}case i:return p}}}var I=l,_=d,E=s,O=a,C=t,N=c,R=o,b=m,w=h,S=i,P=n,v=r,L=u,M=!1;function x(e){return y(e)===d}Rt.AsyncMode=I,Rt.ConcurrentMode=_,Rt.ContextConsumer=E,Rt.ContextProvider=O,Rt.Element=C,Rt.ForwardRef=N,Rt.Fragment=R,Rt.Lazy=b,Rt.Memo=w,Rt.Portal=S,Rt.Profiler=P,Rt.StrictMode=v,Rt.Suspense=L,Rt.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),x(e)||y(e)===l},Rt.isConcurrentMode=x,Rt.isContextConsumer=function(e){return y(e)===s},Rt.isContextProvider=function(e){return y(e)===a},Rt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Rt.isForwardRef=function(e){return y(e)===c},Rt.isFragment=function(e){return y(e)===o},Rt.isLazy=function(e){return y(e)===m},Rt.isMemo=function(e){return y(e)===h},Rt.isPortal=function(e){return y(e)===i},Rt.isProfiler=function(e){return y(e)===n},Rt.isStrictMode=function(e){return y(e)===r},Rt.isSuspense=function(e){return y(e)===u},Rt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===n||e===r||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===T||e.$$typeof===A||e.$$typeof===f)},Rt.typeOf=y}()),Rt)),dt.exports}
|
|
10
10
|
/*
|
|
11
11
|
object-assign
|
|
12
12
|
(c) Sindre Sorhus
|
|
13
13
|
@license MIT
|
|
14
|
-
*/function wt(){if(mt)return ht;mt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;return ht=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(o,r){for(var n,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(o),l=1;l<arguments.length;l++){for(var d in n=Object(arguments[l]))t.call(n,d)&&(s[d]=n[d]);if(e){a=e(n);for(var c=0;c<a.length;c++)i.call(n,a[c])&&(s[a[c]]=n[a[c]])}}return s},ht}function Pt(){if(gt)return ft;gt=1;return ft="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function St(){return At?Tt:(At=1,Tt=Function.call.bind(Object.prototype.hasOwnProperty))}function vt(){if(It)return yt;It=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Pt(),i={},o=St();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function r(r,n,a,s,l){if("production"!==process.env.NODE_ENV)for(var d in r)if(o(r,d)){var c;try{if("function"!=typeof r[d]){var u=Error((s||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}c=r[d](n,d,s,a,null,t)}catch(e){c=e}if(!c||c instanceof Error||e((s||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in i)){i[c.message]=!0;var p=l?l():"";e("Failed "+a+" type: "+c.message+(null!=p?p:""))}}}return r.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(i={})},yt=r}function Lt(){if(Et)return _t;Et=1;var e=bt(),t=wt(),i=Pt(),o=St(),r=vt(),n=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(n=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),_t=function(s,l){var d="function"==typeof Symbol&&Symbol.iterator;var c="<<anonymous>>",u={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:m(a),arrayOf:function(e){return m(function(t,o,r,n,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[o];if(!Array.isArray(s))return new h("Invalid "+n+" `"+a+"` of type `"+A(s)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<s.length;l++){var d=e(s,l,r,n,a+"["+l+"]",i);if(d instanceof Error)return d}return null})},element:m(function(e,t,i,o,r){var n=e[t];return s(n)?null:new h("Invalid "+o+" `"+r+"` of type `"+A(n)+"` supplied to `"+i+"`, expected a single ReactElement.")}),elementType:m(function(t,i,o,r,n){var a=t[i];return e.isValidElementType(a)?null:new h("Invalid "+r+" `"+n+"` of type `"+A(a)+"` supplied to `"+o+"`, expected a single ReactElement type.")}),instanceOf:function(e){return m(function(t,i,o,r,n){if(!(t[i]instanceof e)){var a=e.name||c;return new h("Invalid "+r+" `"+n+"` of type `"+(((s=t[i]).constructor&&s.constructor.name?s.constructor.name:c)+"` supplied to `")+o+"`, expected instance of `"+a+"`.")}var s;return null})},node:m(function(e,t,i,o,r){return T(e[t])?null:new h("Invalid "+o+" `"+r+"` supplied to `"+i+"`, expected a ReactNode.")}),objectOf:function(e){return m(function(t,r,n,a,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var l=t[r],d=A(l);if("object"!==d)return new h("Invalid "+a+" `"+s+"` of type `"+d+"` supplied to `"+n+"`, expected an object.");for(var c in l)if(o(l,c)){var u=e(l,c,n,a,s+"."+c,i);if(u instanceof Error)return u}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&n(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return m(function(t,i,o,r,n){for(var a=t[i],s=0;s<e.length;s++)if(p(a,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===y(t)?String(t):t});return new h("Invalid "+r+" `"+n+"` of value `"+String(a)+"` supplied to `"+o+"`, expected one of "+l+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&n("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return n("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+I(r)+" at index "+t+"."),a}return m(function(t,r,n,a,s){for(var l=[],d=0;d<e.length;d++){var c=(0,e[d])(t,r,n,a,s,i);if(null==c)return null;c.data&&o(c.data,"expectedType")&&l.push(c.data.expectedType)}return new h("Invalid "+a+" `"+s+"` supplied to `"+n+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return m(function(t,o,r,n,a){var s=t[o],l=A(s);if("object"!==l)return new h("Invalid "+n+" `"+a+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var d in e){var c=e[d];if("function"!=typeof c)return g(r,n,a,d,y(c));var u=c(s,d,r,n,a+"."+d,i);if(u)return u}return null})},exact:function(e){return m(function(r,n,a,s,l){var d=r[n],c=A(d);if("object"!==c)return new h("Invalid "+s+" `"+l+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");var u=t({},r[n],e);for(var p in u){var m=e[p];if(o(e,p)&&"function"!=typeof m)return g(a,s,l,p,y(m));if(!m)return new h("Invalid "+s+" `"+l+"` key `"+p+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(r[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var f=m(d,p,a,s,l+"."+p,i);if(f)return f}return null})}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var t={},o=0;function r(r,a,s,d,u,p,m){if(d=d||c,p=p||s,m!==i){if(l){var f=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 f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=d+":"+s;!t[g]&&o<3&&(n("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+d+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,o++)}}return null==a[s]?r?null===a[s]?new h("The "+u+" `"+p+"` is marked as required in `"+d+"`, but its value is `null`."):new h("The "+u+" `"+p+"` is marked as required in `"+d+"`, but its value is `undefined`."):null:e(a,s,d,u,p)}var a=r.bind(null,!1);return a.isRequired=r.bind(null,!0),a}function f(e){return m(function(t,i,o,r,n,a){var s=t[i];return A(s)!==e?new h("Invalid "+r+" `"+n+"` of type `"+y(s)+"` supplied to `"+o+"`, expected `"+e+"`.",{expectedType:e}):null})}function g(e,t,i,o,r){return new h((e||"React class")+": "+t+" type `"+i+"."+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+r+"`.")}function T(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(T);if(null===e||s(e))return!0;var t=function(e){var t=e&&(d&&e[d]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var i,o=t.call(e);if(t!==e.entries){for(;!(i=o.next()).done;)if(!T(i.value))return!1}else for(;!(i=o.next()).done;){var r=i.value;if(r&&!T(r[1]))return!1}return!0;default:return!1}}function A(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function y(e){if(null==e)return""+e;var t=A(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function I(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,u.checkPropTypes=r,u.resetWarningCache=r.resetWarningCache,u.PropTypes=u,u},_t}function Mt(){if(Ct)return Ot;Ct=1;var e=Pt();function t(){}function i(){}return i.resetWarningCache=t,Ot=function(){function o(t,i,o,r,n,a){if(a!==e){var s=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 s.name="Invariant Violation",s}}function r(){return o}o.isRequired=o;var n={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:i,resetWarningCache:t};return n.PropTypes=n,n}}function xt(){if(Nt)return lt.exports;if(Nt=1,"production"!==process.env.NODE_ENV){var e=bt();lt.exports=Lt()(e.isElement,true)}else lt.exports=Mt()();return lt.exports}var Dt=at(xt());var kt,Ut={exports:{}},Ft={};function Bt(){if(kt)return Ft;kt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function m(h){if("object"==typeof h&&null!==h){var m=h.$$typeof;switch(m){case e:switch(h=h.type){case i:case r:case o:case l:case d:case p:return h;default:switch(h=h&&h.$$typeof){case a:case s:case u:case c:case n:return h;default:return m}}case t:return m}}}return Ft.ContextConsumer=n,Ft.ContextProvider=a,Ft.Element=e,Ft.ForwardRef=s,Ft.Fragment=i,Ft.Lazy=u,Ft.Memo=c,Ft.Portal=t,Ft.Profiler=r,Ft.StrictMode=o,Ft.Suspense=l,Ft.SuspenseList=d,Ft.isContextConsumer=function(e){return m(e)===n},Ft.isContextProvider=function(e){return m(e)===a},Ft.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},Ft.isForwardRef=function(e){return m(e)===s},Ft.isFragment=function(e){return m(e)===i},Ft.isLazy=function(e){return m(e)===u},Ft.isMemo=function(e){return m(e)===c},Ft.isPortal=function(e){return m(e)===t},Ft.isProfiler=function(e){return m(e)===r},Ft.isStrictMode=function(e){return m(e)===o},Ft.isSuspense=function(e){return m(e)===l},Ft.isSuspenseList=function(e){return m(e)===d},Ft.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===r||e===o||e===l||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===u||e.$$typeof===c||e.$$typeof===a||e.$$typeof===n||e.$$typeof===s||e.$$typeof===h||void 0!==e.getModuleId)},Ft.typeOf=m,Ft}var qt,jt,Gt={};
|
|
14
|
+
*/function wt(){if(mt)return ht;mt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;return ht=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(o,r){for(var n,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(o),l=1;l<arguments.length;l++){for(var d in n=Object(arguments[l]))t.call(n,d)&&(s[d]=n[d]);if(e){a=e(n);for(var c=0;c<a.length;c++)i.call(n,a[c])&&(s[a[c]]=n[a[c]])}}return s},ht}function St(){if(gt)return ft;gt=1;return ft="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Pt(){return At?Tt:(At=1,Tt=Function.call.bind(Object.prototype.hasOwnProperty))}function vt(){if(It)return yt;It=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=St(),i={},o=Pt();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function r(r,n,a,s,l){if("production"!==process.env.NODE_ENV)for(var d in r)if(o(r,d)){var c;try{if("function"!=typeof r[d]){var u=Error((s||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}c=r[d](n,d,s,a,null,t)}catch(e){c=e}if(!c||c instanceof Error||e((s||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in i)){i[c.message]=!0;var p=l?l():"";e("Failed "+a+" type: "+c.message+(null!=p?p:""))}}}return r.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(i={})},yt=r}function Lt(){if(Et)return _t;Et=1;var e=bt(),t=wt(),i=St(),o=Pt(),r=vt(),n=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(n=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),_t=function(s,l){var d="function"==typeof Symbol&&Symbol.iterator;var c="<<anonymous>>",u={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:m(a),arrayOf:function(e){return m(function(t,o,r,n,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[o];if(!Array.isArray(s))return new h("Invalid "+n+" `"+a+"` of type `"+A(s)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<s.length;l++){var d=e(s,l,r,n,a+"["+l+"]",i);if(d instanceof Error)return d}return null})},element:m(function(e,t,i,o,r){var n=e[t];return s(n)?null:new h("Invalid "+o+" `"+r+"` of type `"+A(n)+"` supplied to `"+i+"`, expected a single ReactElement.")}),elementType:m(function(t,i,o,r,n){var a=t[i];return e.isValidElementType(a)?null:new h("Invalid "+r+" `"+n+"` of type `"+A(a)+"` supplied to `"+o+"`, expected a single ReactElement type.")}),instanceOf:function(e){return m(function(t,i,o,r,n){if(!(t[i]instanceof e)){var a=e.name||c;return new h("Invalid "+r+" `"+n+"` of type `"+(((s=t[i]).constructor&&s.constructor.name?s.constructor.name:c)+"` supplied to `")+o+"`, expected instance of `"+a+"`.")}var s;return null})},node:m(function(e,t,i,o,r){return T(e[t])?null:new h("Invalid "+o+" `"+r+"` supplied to `"+i+"`, expected a ReactNode.")}),objectOf:function(e){return m(function(t,r,n,a,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var l=t[r],d=A(l);if("object"!==d)return new h("Invalid "+a+" `"+s+"` of type `"+d+"` supplied to `"+n+"`, expected an object.");for(var c in l)if(o(l,c)){var u=e(l,c,n,a,s+"."+c,i);if(u instanceof Error)return u}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&n(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return m(function(t,i,o,r,n){for(var a=t[i],s=0;s<e.length;s++)if(p(a,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===y(t)?String(t):t});return new h("Invalid "+r+" `"+n+"` of value `"+String(a)+"` supplied to `"+o+"`, expected one of "+l+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&n("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return n("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+I(r)+" at index "+t+"."),a}return m(function(t,r,n,a,s){for(var l=[],d=0;d<e.length;d++){var c=(0,e[d])(t,r,n,a,s,i);if(null==c)return null;c.data&&o(c.data,"expectedType")&&l.push(c.data.expectedType)}return new h("Invalid "+a+" `"+s+"` supplied to `"+n+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return m(function(t,o,r,n,a){var s=t[o],l=A(s);if("object"!==l)return new h("Invalid "+n+" `"+a+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var d in e){var c=e[d];if("function"!=typeof c)return g(r,n,a,d,y(c));var u=c(s,d,r,n,a+"."+d,i);if(u)return u}return null})},exact:function(e){return m(function(r,n,a,s,l){var d=r[n],c=A(d);if("object"!==c)return new h("Invalid "+s+" `"+l+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");var u=t({},r[n],e);for(var p in u){var m=e[p];if(o(e,p)&&"function"!=typeof m)return g(a,s,l,p,y(m));if(!m)return new h("Invalid "+s+" `"+l+"` key `"+p+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(r[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var f=m(d,p,a,s,l+"."+p,i);if(f)return f}return null})}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var t={},o=0;function r(r,a,s,d,u,p,m){if(d=d||c,p=p||s,m!==i){if(l){var f=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 f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=d+":"+s;!t[g]&&o<3&&(n("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+d+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,o++)}}return null==a[s]?r?null===a[s]?new h("The "+u+" `"+p+"` is marked as required in `"+d+"`, but its value is `null`."):new h("The "+u+" `"+p+"` is marked as required in `"+d+"`, but its value is `undefined`."):null:e(a,s,d,u,p)}var a=r.bind(null,!1);return a.isRequired=r.bind(null,!0),a}function f(e){return m(function(t,i,o,r,n,a){var s=t[i];return A(s)!==e?new h("Invalid "+r+" `"+n+"` of type `"+y(s)+"` supplied to `"+o+"`, expected `"+e+"`.",{expectedType:e}):null})}function g(e,t,i,o,r){return new h((e||"React class")+": "+t+" type `"+i+"."+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+r+"`.")}function T(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(T);if(null===e||s(e))return!0;var t=function(e){var t=e&&(d&&e[d]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var i,o=t.call(e);if(t!==e.entries){for(;!(i=o.next()).done;)if(!T(i.value))return!1}else for(;!(i=o.next()).done;){var r=i.value;if(r&&!T(r[1]))return!1}return!0;default:return!1}}function A(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function y(e){if(null==e)return""+e;var t=A(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function I(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,u.checkPropTypes=r,u.resetWarningCache=r.resetWarningCache,u.PropTypes=u,u},_t}function Mt(){if(Ct)return Ot;Ct=1;var e=St();function t(){}function i(){}return i.resetWarningCache=t,Ot=function(){function o(t,i,o,r,n,a){if(a!==e){var s=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 s.name="Invariant Violation",s}}function r(){return o}o.isRequired=o;var n={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:i,resetWarningCache:t};return n.PropTypes=n,n}}function xt(){if(Nt)return lt.exports;if(Nt=1,"production"!==process.env.NODE_ENV){var e=bt();lt.exports=Lt()(e.isElement,true)}else lt.exports=Mt()();return lt.exports}var Dt=at(xt());var kt,Ut={exports:{}},Ft={};function Bt(){if(kt)return Ft;kt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function m(h){if("object"==typeof h&&null!==h){var m=h.$$typeof;switch(m){case e:switch(h=h.type){case i:case r:case o:case l:case d:case p:return h;default:switch(h=h&&h.$$typeof){case a:case s:case u:case c:case n:return h;default:return m}}case t:return m}}}return Ft.ContextConsumer=n,Ft.ContextProvider=a,Ft.Element=e,Ft.ForwardRef=s,Ft.Fragment=i,Ft.Lazy=u,Ft.Memo=c,Ft.Portal=t,Ft.Profiler=r,Ft.StrictMode=o,Ft.Suspense=l,Ft.SuspenseList=d,Ft.isContextConsumer=function(e){return m(e)===n},Ft.isContextProvider=function(e){return m(e)===a},Ft.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},Ft.isForwardRef=function(e){return m(e)===s},Ft.isFragment=function(e){return m(e)===i},Ft.isLazy=function(e){return m(e)===u},Ft.isMemo=function(e){return m(e)===c},Ft.isPortal=function(e){return m(e)===t},Ft.isProfiler=function(e){return m(e)===r},Ft.isStrictMode=function(e){return m(e)===o},Ft.isSuspense=function(e){return m(e)===l},Ft.isSuspenseList=function(e){return m(e)===d},Ft.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===r||e===o||e===l||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===u||e.$$typeof===c||e.$$typeof===a||e.$$typeof===n||e.$$typeof===s||e.$$typeof===h||void 0!==e.getModuleId)},Ft.typeOf=m,Ft}var qt,jt,Gt={};
|
|
15
15
|
/**
|
|
16
16
|
* @license React
|
|
17
17
|
* react-is.development.js
|
|
@@ -20,7 +20,7 @@ object-assign
|
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the MIT license found in the
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
|
23
|
-
*/function Wt(){return qt||(qt=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case o:case n:case r:case d:case c:case h:return e;default:switch(e=e&&e.$$typeof){case s:case l:case p:case u:case a:return e;default:return m}}case i:return m}}}var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");Gt.ContextConsumer=a,Gt.ContextProvider=s,Gt.Element=t,Gt.ForwardRef=l,Gt.Fragment=o,Gt.Lazy=p,Gt.Memo=u,Gt.Portal=i,Gt.Profiler=n,Gt.StrictMode=r,Gt.Suspense=d,Gt.SuspenseList=c,Gt.isContextConsumer=function(t){return e(t)===a},Gt.isContextProvider=function(t){return e(t)===s},Gt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Gt.isForwardRef=function(t){return e(t)===l},Gt.isFragment=function(t){return e(t)===o},Gt.isLazy=function(t){return e(t)===p},Gt.isMemo=function(t){return e(t)===u},Gt.isPortal=function(t){return e(t)===i},Gt.isProfiler=function(t){return e(t)===n},Gt.isStrictMode=function(t){return e(t)===r},Gt.isSuspense=function(t){return e(t)===d},Gt.isSuspenseList=function(t){return e(t)===c},Gt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===n||e===r||e===d||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===u||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===m||void 0!==e.getModuleId)},Gt.typeOf=e}()),Gt}function Ht(){return jt||(jt=1,"production"===process.env.NODE_ENV?Ut.exports=Bt():Ut.exports=Wt()),Ut.exports}var Yt=Ht();function Kt(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Vt(e){if(ce.isValidElement(e)||Yt.isValidElementType(e)||!Kt(e))return e;const t={};return Object.keys(e).forEach(i=>{t[i]=Vt(e[i])}),t}function zt(e,t,i={clone:!0}){const o=i.clone?{...e}:e;return Kt(e)&&Kt(t)&&Object.keys(t).forEach(r=>{ce.isValidElement(t[r])||Yt.isValidElementType(t[r])?o[r]=t[r]:Kt(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&Kt(e[r])?o[r]=zt(e[r],t[r],i):i.clone?o[r]=Kt(t[r])?Vt(t[r]):t[r]:o[r]=t[r]}),o}function Qt(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:o=5,...r}=e,n=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),a=Object.keys(n);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${i})`}function d(e,r){const n=a.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i}) and (max-width:${(-1!==n&&"number"==typeof t[a[n]]?t[a[n]]:r)-o/100}${i})`}return{keys:a,values:n,up:s,down:l,between:d,only:function(e){return a.indexOf(e)+1<a.length?d(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):d(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:i,...r}}function $t(e,t){if(!e.containerQueries)return t;const i=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const i=/min-width:\s*([0-9.]+)/;return+(e.match(i)?.[1]||0)-+(t.match(i)?.[1]||0)});return i.length?i.reduce((e,i)=>{const o=t[i];return delete e[i],e[i]=o,e},{...t}):t}const Zt={borderRadius:4},Jt="production"!==process.env.NODE_ENV?Dt.oneOfType([Dt.number,Dt.string,Dt.object,Dt.array]):{};function Xt(e,t){return t?zt(e,t,{clone:!1}):e}const ei={xs:0,sm:600,md:900,lg:1200,xl:1536},ti={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ei[e]}px)`},ii={containerQueries:e=>({up:t=>{let i="number"==typeof t?t:ei[t]||t;return"number"==typeof i&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function oi(e,t,i){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||ti;return t.reduce((o,r,n)=>(o[e.up(e.keys[n])]=i(t[n]),o),{})}if("object"==typeof t){const e=o.breakpoints||ti;return Object.keys(t).reduce((r,n)=>{if(a=e.keys,"@"===(s=n)||s.startsWith("@")&&(a.some(e=>s.startsWith(`@${e}`))||s.match(/^@\d/))){const e=function(e,t){const i=t.match(/^@([^/]+)?\/?(.+)?$/);if(!i){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:nt(18,`(${t})`));return null}const[,o,r]=i,n=Number.isNaN(+o)?o||0:+o;return e.containerQueries(r).up(n)}(o.containerQueries?o:ii,n);e&&(r[e]=i(t[n],n))}else if(Object.keys(e.values||ei).includes(n)){r[e.up(n)]=i(t[n],n)}else{const e=n;r[e]=t[e]}var a,s;return r},{})}return i(t)}function ri(e,t){return e.reduce((e,t)=>{const i=e[t];return(!i||0===Object.keys(i).length)&&delete e[t],e},t)}function ni(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":nt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function ai(e,t,i=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&i){const i=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=i)return i}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function si(e,t,i,o=i){let r;return r="function"==typeof e?e(i):Array.isArray(e)?e[i]||o:ai(e,i)||o,t&&(r=t(r,o,e)),r}function li(e){const{prop:t,cssProperty:i=e.prop,themeKey:o,transform:r}=e,n=e=>{if(null==e[t])return null;const n=e[t],a=ai(e.theme,o)||{};return oi(e,n,e=>{let o=si(a,r,e);return e===o&&"string"==typeof e&&(o=si(a,r,`${t}${"default"===e?"":ni(e)}`,e)),!1===i?o:{[i]:o}})};return n.propTypes="production"!==process.env.NODE_ENV?{[t]:Jt}:{},n.filterProps=[t],n}const di={m:"margin",p:"padding"},ci={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ui={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},pi=function(e){const t={};return i=>(void 0===t[i]&&(t[i]=e(i)),t[i])}(e=>{if(e.length>2){if(!ui[e])return[e];e=ui[e]}const[t,i]=e.split(""),o=di[t],r=ci[i]||"";return Array.isArray(r)?r.map(e=>o+e):[o+r]}),hi=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],mi=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],fi=[...hi,...mi];function gi(e,t,i,o){const r=ai(e,t,!0)??i;return"number"==typeof r||"string"==typeof r?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),"string"==typeof r?r.startsWith("var(")&&0===e?0:r.startsWith("var(")&&1===e?r:`calc(${e} * ${r})`:r*e):Array.isArray(r)?e=>{if("string"==typeof e)return e;const i=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(i)?i>r.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(r)}.`,`${i} > ${r.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const o=r[i];return e>=0?o:"number"==typeof o?-o:"string"==typeof o&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:"function"==typeof r?r:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${r}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function Ti(e){return gi(e,"spacing",8,"spacing")}function Ai(e,t){return"string"==typeof t||null==t?t:e(t)}function yi(e,t,i,o){if(!t.includes(i))return null;const r=function(e,t){return i=>e.reduce((e,o)=>(e[o]=Ai(t,i),e),{})}(pi(i),o);return oi(e,e[i],r)}function Ii(e,t){const i=Ti(e.theme);return Object.keys(e).map(o=>yi(e,t,o,i)).reduce(Xt,{})}function _i(e){return Ii(e,hi)}function Ei(e){return Ii(e,mi)}function Oi(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(i=>{e[i]=t}),e),{}),i=e=>Object.keys(e).reduce((i,o)=>t[o]?Xt(i,t[o](e)):i,{});return i.propTypes="production"!==process.env.NODE_ENV?e.reduce((e,t)=>Object.assign(e,t.propTypes),{}):{},i.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),i}function Ci(e){return"number"!=typeof e?e:`${e}px solid`}function Ni(e,t){return li({prop:e,themeKey:"borders",transform:t})}_i.propTypes="production"!==process.env.NODE_ENV?hi.reduce((e,t)=>(e[t]=Jt,e),{}):{},_i.filterProps=hi,Ei.propTypes="production"!==process.env.NODE_ENV?mi.reduce((e,t)=>(e[t]=Jt,e),{}):{},Ei.filterProps=mi,"production"===process.env.NODE_ENV||fi.reduce((e,t)=>(e[t]=Jt,e),{});const Ri=Ni("border",Ci),bi=Ni("borderTop",Ci),wi=Ni("borderRight",Ci),Pi=Ni("borderBottom",Ci),Si=Ni("borderLeft",Ci),vi=Ni("borderColor"),Li=Ni("borderTopColor"),Mi=Ni("borderRightColor"),xi=Ni("borderBottomColor"),Di=Ni("borderLeftColor"),ki=Ni("outline",Ci),Ui=Ni("outlineColor"),Fi=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=gi(e.theme,"shape.borderRadius",4,"borderRadius"),i=e=>({borderRadius:Ai(t,e)});return oi(e,e.borderRadius,i)}return null};Fi.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Jt}:{},Fi.filterProps=["borderRadius"],Oi(Ri,bi,wi,Pi,Si,vi,Li,Mi,xi,Di,Fi,ki,Ui);const Bi=e=>{if(void 0!==e.gap&&null!==e.gap){const t=gi(e.theme,"spacing",8,"gap"),i=e=>({gap:Ai(t,e)});return oi(e,e.gap,i)}return null};Bi.propTypes="production"!==process.env.NODE_ENV?{gap:Jt}:{},Bi.filterProps=["gap"];const qi=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=gi(e.theme,"spacing",8,"columnGap"),i=e=>({columnGap:Ai(t,e)});return oi(e,e.columnGap,i)}return null};qi.propTypes="production"!==process.env.NODE_ENV?{columnGap:Jt}:{},qi.filterProps=["columnGap"];const ji=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=gi(e.theme,"spacing",8,"rowGap"),i=e=>({rowGap:Ai(t,e)});return oi(e,e.rowGap,i)}return null};ji.propTypes="production"!==process.env.NODE_ENV?{rowGap:Jt}:{},ji.filterProps=["rowGap"];function Gi(e,t){return"grey"===t?t:e}Oi(Bi,qi,ji,li({prop:"gridColumn"}),li({prop:"gridRow"}),li({prop:"gridAutoFlow"}),li({prop:"gridAutoColumns"}),li({prop:"gridAutoRows"}),li({prop:"gridTemplateColumns"}),li({prop:"gridTemplateRows"}),li({prop:"gridTemplateAreas"}),li({prop:"gridArea"}));function Wi(e){return e<=1&&0!==e?100*e+"%":e}Oi(li({prop:"color",themeKey:"palette",transform:Gi}),li({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Gi}),li({prop:"backgroundColor",themeKey:"palette",transform:Gi}));const Hi=li({prop:"width",transform:Wi}),Yi=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const i=e.theme?.breakpoints?.values?.[t]||ei[t];return i?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Wi(t)}};return oi(e,e.maxWidth,t)}return null};Yi.filterProps=["maxWidth"];const Ki=li({prop:"minWidth",transform:Wi}),Vi=li({prop:"height",transform:Wi}),zi=li({prop:"maxHeight",transform:Wi}),Qi=li({prop:"minHeight",transform:Wi});li({prop:"size",cssProperty:"width",transform:Wi}),li({prop:"size",cssProperty:"height",transform:Wi});Oi(Hi,Yi,Ki,Vi,zi,Qi,li({prop:"boxSizing"}));const $i={border:{themeKey:"borders",transform:Ci},borderTop:{themeKey:"borders",transform:Ci},borderRight:{themeKey:"borders",transform:Ci},borderBottom:{themeKey:"borders",transform:Ci},borderLeft:{themeKey:"borders",transform:Ci},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ci},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Fi},color:{themeKey:"palette",transform:Gi},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Gi},backgroundColor:{themeKey:"palette",transform:Gi},p:{style:Ei},pt:{style:Ei},pr:{style:Ei},pb:{style:Ei},pl:{style:Ei},px:{style:Ei},py:{style:Ei},padding:{style:Ei},paddingTop:{style:Ei},paddingRight:{style:Ei},paddingBottom:{style:Ei},paddingLeft:{style:Ei},paddingX:{style:Ei},paddingY:{style:Ei},paddingInline:{style:Ei},paddingInlineStart:{style:Ei},paddingInlineEnd:{style:Ei},paddingBlock:{style:Ei},paddingBlockStart:{style:Ei},paddingBlockEnd:{style:Ei},m:{style:_i},mt:{style:_i},mr:{style:_i},mb:{style:_i},ml:{style:_i},mx:{style:_i},my:{style:_i},margin:{style:_i},marginTop:{style:_i},marginRight:{style:_i},marginBottom:{style:_i},marginLeft:{style:_i},marginX:{style:_i},marginY:{style:_i},marginInline:{style:_i},marginInlineStart:{style:_i},marginInlineEnd:{style:_i},marginBlock:{style:_i},marginBlockStart:{style:_i},marginBlockEnd:{style:_i},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Bi},rowGap:{style:ji},columnGap:{style:qi},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Wi},maxWidth:{style:Yi},minWidth:{transform:Wi},height:{transform:Wi},maxHeight:{transform:Wi},minHeight:{transform:Wi},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const Zi=function(){function e(e,t,i,o){const r={[e]:t,theme:i},n=o[e];if(!n)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:d}=n;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const c=ai(i,s)||{};if(d)return d(r);return oi(r,t,t=>{let i=si(c,l,t);return t===i&&"string"==typeof t&&(i=si(c,l,`${e}${"default"===t?"":ni(t)}`,t)),!1===a?i:{[a]:i}})}return function t(i){const{sx:o,theme:r={},nested:n}=i||{};if(!o)return null;const a=r.unstable_sxConfig??$i;function s(i){let o=i;if("function"==typeof i)o=i(r);else if("object"!=typeof i)return i;if(!o)return null;const s=function(e={}){const t=e.keys?.reduce((t,i)=>(t[e.up(i)]={},t),{});return t||{}}(r.breakpoints),l=Object.keys(s);let d=s;return Object.keys(o).forEach(i=>{const n=(s=o[i],l=r,"function"==typeof s?s(l):s);var s,l;if(null!=n)if("object"==typeof n)if(a[i])d=Xt(d,e(i,n,r,a));else{const e=oi({theme:r},n,e=>({[i]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),i=new Set(t);return e.every(e=>i.size===Object.keys(e).length)}(e,n)?d=Xt(d,e):d[i]=t({sx:n,theme:r,nested:!0})}else d=Xt(d,e(i,n,r,a))}),!n&&r.modularCssLayers?{"@layer sx":$t(r,ri(l,d))}:$t(r,ri(l,d))}return Array.isArray(o)?o.map(s):s(o)}}();function Ji(e,t){const i=this;if(i.vars){if(!i.colorSchemes?.[e]||"function"!=typeof i.getColorSchemeSelector)return{};let o=i.getColorSchemeSelector(e);return"&"===o?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return i.palette.mode===e?t:{}}function Xi(e=null){const t=ce.useContext(l.ThemeContext);return t&&(i=t,0!==Object.keys(i).length)?t:e;var i}Zi.filterProps=["sx"];const eo=function(e={},...t){const{breakpoints:i={},palette:o={},spacing:r,shape:n={},...a}=e,s=Qt(i),l=function(e=8,t=Ti({spacing:e})){if(e.mui)return e;const i=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map(e=>{const i=t(e);return"number"==typeof i?`${i}px`:i}).join(" "));return i.mui=!0,i}(r);let d=zt({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{...Zt,...n}},a);return d=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function i(i,o){i.up=(...i)=>t(e.breakpoints.up(...i),o),i.down=(...i)=>t(e.breakpoints.down(...i),o),i.between=(...i)=>t(e.breakpoints.between(...i),o),i.only=(...i)=>t(e.breakpoints.only(...i),o),i.not=(...i)=>{const r=t(e.breakpoints.not(...i),o);return r.includes("not all and")?r.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):r}}const o={},r=e=>(i(o,e),o);return i(r),{...e,containerQueries:r}}(d),d.applyStyles=Ji,d=t.reduce((e,t)=>zt(e,t),d),d.unstable_sxConfig={...$i,...a?.unstable_sxConfig},d.unstable_sx=function(e){return Zi({sx:e,theme:this})},d}();function to(e){const{sx:t,...i}=e,{systemProps:o,otherProps:r}=(e=>{const t={systemProps:{},otherProps:{}},i=e?.theme?.unstable_sxConfig??$i;return Object.keys(e).forEach(o=>{i[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t})(i);let n;return n=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{const i=t(...e);return Kt(i)?{...o,...i}:o}:{...o,...t},{...r,sx:n}}const io=e=>e,oo=(()=>{let e=io;return{configure(t){e=t},generate:t=>e(t),reset(){e=io}}})();function ro(e){var t,i,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(i=ro(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function no(){for(var e,t,i=0,o="",r=arguments.length;i<r;i++)(e=arguments[i])&&(t=ro(e))&&(o&&(o+=" "),o+=t);return o}const ao={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};const so=function(e={}){const{themeId:i,defaultTheme:o,defaultClassName:r="MuiBox-root",generateClassName:n}=e,a=
|
|
23
|
+
*/function Wt(){return qt||(qt=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case o:case n:case r:case d:case c:case h:return e;default:switch(e=e&&e.$$typeof){case s:case l:case p:case u:case a:return e;default:return m}}case i:return m}}}var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");Gt.ContextConsumer=a,Gt.ContextProvider=s,Gt.Element=t,Gt.ForwardRef=l,Gt.Fragment=o,Gt.Lazy=p,Gt.Memo=u,Gt.Portal=i,Gt.Profiler=n,Gt.StrictMode=r,Gt.Suspense=d,Gt.SuspenseList=c,Gt.isContextConsumer=function(t){return e(t)===a},Gt.isContextProvider=function(t){return e(t)===s},Gt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Gt.isForwardRef=function(t){return e(t)===l},Gt.isFragment=function(t){return e(t)===o},Gt.isLazy=function(t){return e(t)===p},Gt.isMemo=function(t){return e(t)===u},Gt.isPortal=function(t){return e(t)===i},Gt.isProfiler=function(t){return e(t)===n},Gt.isStrictMode=function(t){return e(t)===r},Gt.isSuspense=function(t){return e(t)===d},Gt.isSuspenseList=function(t){return e(t)===c},Gt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===n||e===r||e===d||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===u||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===m||void 0!==e.getModuleId)},Gt.typeOf=e}()),Gt}function Ht(){return jt||(jt=1,"production"===process.env.NODE_ENV?Ut.exports=Bt():Ut.exports=Wt()),Ut.exports}var Yt=Ht();function Kt(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Vt(e){if(ce.isValidElement(e)||Yt.isValidElementType(e)||!Kt(e))return e;const t={};return Object.keys(e).forEach(i=>{t[i]=Vt(e[i])}),t}function zt(e,t,i={clone:!0}){const o=i.clone?{...e}:e;return Kt(e)&&Kt(t)&&Object.keys(t).forEach(r=>{ce.isValidElement(t[r])||Yt.isValidElementType(t[r])?o[r]=t[r]:Kt(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&Kt(e[r])?o[r]=zt(e[r],t[r],i):i.clone?o[r]=Kt(t[r])?Vt(t[r]):t[r]:o[r]=t[r]}),o}function Qt(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:o=5,...r}=e,n=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),a=Object.keys(n);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${i})`}function d(e,r){const n=a.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i}) and (max-width:${(-1!==n&&"number"==typeof t[a[n]]?t[a[n]]:r)-o/100}${i})`}return{keys:a,values:n,up:s,down:l,between:d,only:function(e){return a.indexOf(e)+1<a.length?d(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):d(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:i,...r}}function $t(e,t){if(!e.containerQueries)return t;const i=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const i=/min-width:\s*([0-9.]+)/;return+(e.match(i)?.[1]||0)-+(t.match(i)?.[1]||0)});return i.length?i.reduce((e,i)=>{const o=t[i];return delete e[i],e[i]=o,e},{...t}):t}const Zt={borderRadius:4},Jt="production"!==process.env.NODE_ENV?Dt.oneOfType([Dt.number,Dt.string,Dt.object,Dt.array]):{};function Xt(e,t){return t?zt(e,t,{clone:!1}):e}const ei={xs:0,sm:600,md:900,lg:1200,xl:1536},ti={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ei[e]}px)`},ii={containerQueries:e=>({up:t=>{let i="number"==typeof t?t:ei[t]||t;return"number"==typeof i&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function oi(e,t,i){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||ti;return t.reduce((o,r,n)=>(o[e.up(e.keys[n])]=i(t[n]),o),{})}if("object"==typeof t){const e=o.breakpoints||ti;return Object.keys(t).reduce((r,n)=>{if(a=e.keys,"@"===(s=n)||s.startsWith("@")&&(a.some(e=>s.startsWith(`@${e}`))||s.match(/^@\d/))){const e=function(e,t){const i=t.match(/^@([^/]+)?\/?(.+)?$/);if(!i){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:nt(18,`(${t})`));return null}const[,o,r]=i,n=Number.isNaN(+o)?o||0:+o;return e.containerQueries(r).up(n)}(o.containerQueries?o:ii,n);e&&(r[e]=i(t[n],n))}else if(Object.keys(e.values||ei).includes(n)){r[e.up(n)]=i(t[n],n)}else{const e=n;r[e]=t[e]}var a,s;return r},{})}return i(t)}function ri(e,t){return e.reduce((e,t)=>{const i=e[t];return(!i||0===Object.keys(i).length)&&delete e[t],e},t)}function ni(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":nt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function ai(e,t,i=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&i){const i=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=i)return i}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function si(e,t,i,o=i){let r;return r="function"==typeof e?e(i):Array.isArray(e)?e[i]||o:ai(e,i)||o,t&&(r=t(r,o,e)),r}function li(e){const{prop:t,cssProperty:i=e.prop,themeKey:o,transform:r}=e,n=e=>{if(null==e[t])return null;const n=e[t],a=ai(e.theme,o)||{};return oi(e,n,e=>{let o=si(a,r,e);return e===o&&"string"==typeof e&&(o=si(a,r,`${t}${"default"===e?"":ni(e)}`,e)),!1===i?o:{[i]:o}})};return n.propTypes="production"!==process.env.NODE_ENV?{[t]:Jt}:{},n.filterProps=[t],n}const di={m:"margin",p:"padding"},ci={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ui={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},pi=function(e){const t={};return i=>(void 0===t[i]&&(t[i]=e(i)),t[i])}(e=>{if(e.length>2){if(!ui[e])return[e];e=ui[e]}const[t,i]=e.split(""),o=di[t],r=ci[i]||"";return Array.isArray(r)?r.map(e=>o+e):[o+r]}),hi=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],mi=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],fi=[...hi,...mi];function gi(e,t,i,o){const r=ai(e,t,!0)??i;return"number"==typeof r||"string"==typeof r?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),"string"==typeof r?r.startsWith("var(")&&0===e?0:r.startsWith("var(")&&1===e?r:`calc(${e} * ${r})`:r*e):Array.isArray(r)?e=>{if("string"==typeof e)return e;const i=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(i)?i>r.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(r)}.`,`${i} > ${r.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const o=r[i];return e>=0?o:"number"==typeof o?-o:"string"==typeof o&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:"function"==typeof r?r:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${r}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function Ti(e){return gi(e,"spacing",8,"spacing")}function Ai(e,t){return"string"==typeof t||null==t?t:e(t)}function yi(e,t,i,o){if(!t.includes(i))return null;const r=function(e,t){return i=>e.reduce((e,o)=>(e[o]=Ai(t,i),e),{})}(pi(i),o);return oi(e,e[i],r)}function Ii(e,t){const i=Ti(e.theme);return Object.keys(e).map(o=>yi(e,t,o,i)).reduce(Xt,{})}function _i(e){return Ii(e,hi)}function Ei(e){return Ii(e,mi)}function Oi(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(i=>{e[i]=t}),e),{}),i=e=>Object.keys(e).reduce((i,o)=>t[o]?Xt(i,t[o](e)):i,{});return i.propTypes="production"!==process.env.NODE_ENV?e.reduce((e,t)=>Object.assign(e,t.propTypes),{}):{},i.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),i}function Ci(e){return"number"!=typeof e?e:`${e}px solid`}function Ni(e,t){return li({prop:e,themeKey:"borders",transform:t})}_i.propTypes="production"!==process.env.NODE_ENV?hi.reduce((e,t)=>(e[t]=Jt,e),{}):{},_i.filterProps=hi,Ei.propTypes="production"!==process.env.NODE_ENV?mi.reduce((e,t)=>(e[t]=Jt,e),{}):{},Ei.filterProps=mi,"production"===process.env.NODE_ENV||fi.reduce((e,t)=>(e[t]=Jt,e),{});const Ri=Ni("border",Ci),bi=Ni("borderTop",Ci),wi=Ni("borderRight",Ci),Si=Ni("borderBottom",Ci),Pi=Ni("borderLeft",Ci),vi=Ni("borderColor"),Li=Ni("borderTopColor"),Mi=Ni("borderRightColor"),xi=Ni("borderBottomColor"),Di=Ni("borderLeftColor"),ki=Ni("outline",Ci),Ui=Ni("outlineColor"),Fi=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=gi(e.theme,"shape.borderRadius",4,"borderRadius"),i=e=>({borderRadius:Ai(t,e)});return oi(e,e.borderRadius,i)}return null};Fi.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Jt}:{},Fi.filterProps=["borderRadius"],Oi(Ri,bi,wi,Si,Pi,vi,Li,Mi,xi,Di,Fi,ki,Ui);const Bi=e=>{if(void 0!==e.gap&&null!==e.gap){const t=gi(e.theme,"spacing",8,"gap"),i=e=>({gap:Ai(t,e)});return oi(e,e.gap,i)}return null};Bi.propTypes="production"!==process.env.NODE_ENV?{gap:Jt}:{},Bi.filterProps=["gap"];const qi=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=gi(e.theme,"spacing",8,"columnGap"),i=e=>({columnGap:Ai(t,e)});return oi(e,e.columnGap,i)}return null};qi.propTypes="production"!==process.env.NODE_ENV?{columnGap:Jt}:{},qi.filterProps=["columnGap"];const ji=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=gi(e.theme,"spacing",8,"rowGap"),i=e=>({rowGap:Ai(t,e)});return oi(e,e.rowGap,i)}return null};ji.propTypes="production"!==process.env.NODE_ENV?{rowGap:Jt}:{},ji.filterProps=["rowGap"];function Gi(e,t){return"grey"===t?t:e}Oi(Bi,qi,ji,li({prop:"gridColumn"}),li({prop:"gridRow"}),li({prop:"gridAutoFlow"}),li({prop:"gridAutoColumns"}),li({prop:"gridAutoRows"}),li({prop:"gridTemplateColumns"}),li({prop:"gridTemplateRows"}),li({prop:"gridTemplateAreas"}),li({prop:"gridArea"}));function Wi(e){return e<=1&&0!==e?100*e+"%":e}Oi(li({prop:"color",themeKey:"palette",transform:Gi}),li({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Gi}),li({prop:"backgroundColor",themeKey:"palette",transform:Gi}));const Hi=li({prop:"width",transform:Wi}),Yi=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const i=e.theme?.breakpoints?.values?.[t]||ei[t];return i?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Wi(t)}};return oi(e,e.maxWidth,t)}return null};Yi.filterProps=["maxWidth"];const Ki=li({prop:"minWidth",transform:Wi}),Vi=li({prop:"height",transform:Wi}),zi=li({prop:"maxHeight",transform:Wi}),Qi=li({prop:"minHeight",transform:Wi});li({prop:"size",cssProperty:"width",transform:Wi}),li({prop:"size",cssProperty:"height",transform:Wi});Oi(Hi,Yi,Ki,Vi,zi,Qi,li({prop:"boxSizing"}));const $i={border:{themeKey:"borders",transform:Ci},borderTop:{themeKey:"borders",transform:Ci},borderRight:{themeKey:"borders",transform:Ci},borderBottom:{themeKey:"borders",transform:Ci},borderLeft:{themeKey:"borders",transform:Ci},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ci},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Fi},color:{themeKey:"palette",transform:Gi},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Gi},backgroundColor:{themeKey:"palette",transform:Gi},p:{style:Ei},pt:{style:Ei},pr:{style:Ei},pb:{style:Ei},pl:{style:Ei},px:{style:Ei},py:{style:Ei},padding:{style:Ei},paddingTop:{style:Ei},paddingRight:{style:Ei},paddingBottom:{style:Ei},paddingLeft:{style:Ei},paddingX:{style:Ei},paddingY:{style:Ei},paddingInline:{style:Ei},paddingInlineStart:{style:Ei},paddingInlineEnd:{style:Ei},paddingBlock:{style:Ei},paddingBlockStart:{style:Ei},paddingBlockEnd:{style:Ei},m:{style:_i},mt:{style:_i},mr:{style:_i},mb:{style:_i},ml:{style:_i},mx:{style:_i},my:{style:_i},margin:{style:_i},marginTop:{style:_i},marginRight:{style:_i},marginBottom:{style:_i},marginLeft:{style:_i},marginX:{style:_i},marginY:{style:_i},marginInline:{style:_i},marginInlineStart:{style:_i},marginInlineEnd:{style:_i},marginBlock:{style:_i},marginBlockStart:{style:_i},marginBlockEnd:{style:_i},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Bi},rowGap:{style:ji},columnGap:{style:qi},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Wi},maxWidth:{style:Yi},minWidth:{transform:Wi},height:{transform:Wi},maxHeight:{transform:Wi},minHeight:{transform:Wi},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const Zi=function(){function e(e,t,i,o){const r={[e]:t,theme:i},n=o[e];if(!n)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:d}=n;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const c=ai(i,s)||{};if(d)return d(r);return oi(r,t,t=>{let i=si(c,l,t);return t===i&&"string"==typeof t&&(i=si(c,l,`${e}${"default"===t?"":ni(t)}`,t)),!1===a?i:{[a]:i}})}return function t(i){const{sx:o,theme:r={},nested:n}=i||{};if(!o)return null;const a=r.unstable_sxConfig??$i;function s(i){let o=i;if("function"==typeof i)o=i(r);else if("object"!=typeof i)return i;if(!o)return null;const s=function(e={}){const t=e.keys?.reduce((t,i)=>(t[e.up(i)]={},t),{});return t||{}}(r.breakpoints),l=Object.keys(s);let d=s;return Object.keys(o).forEach(i=>{const n=(s=o[i],l=r,"function"==typeof s?s(l):s);var s,l;if(null!=n)if("object"==typeof n)if(a[i])d=Xt(d,e(i,n,r,a));else{const e=oi({theme:r},n,e=>({[i]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),i=new Set(t);return e.every(e=>i.size===Object.keys(e).length)}(e,n)?d=Xt(d,e):d[i]=t({sx:n,theme:r,nested:!0})}else d=Xt(d,e(i,n,r,a))}),!n&&r.modularCssLayers?{"@layer sx":$t(r,ri(l,d))}:$t(r,ri(l,d))}return Array.isArray(o)?o.map(s):s(o)}}();function Ji(e,t){const i=this;if(i.vars){if(!i.colorSchemes?.[e]||"function"!=typeof i.getColorSchemeSelector)return{};let o=i.getColorSchemeSelector(e);return"&"===o?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return i.palette.mode===e?t:{}}function Xi(e=null){const t=ce.useContext(l.ThemeContext);return t&&(i=t,0!==Object.keys(i).length)?t:e;var i}Zi.filterProps=["sx"];const eo=function(e={},...t){const{breakpoints:i={},palette:o={},spacing:r,shape:n={},...a}=e,s=Qt(i),l=function(e=8,t=Ti({spacing:e})){if(e.mui)return e;const i=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map(e=>{const i=t(e);return"number"==typeof i?`${i}px`:i}).join(" "));return i.mui=!0,i}(r);let d=zt({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{...Zt,...n}},a);return d=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function i(i,o){i.up=(...i)=>t(e.breakpoints.up(...i),o),i.down=(...i)=>t(e.breakpoints.down(...i),o),i.between=(...i)=>t(e.breakpoints.between(...i),o),i.only=(...i)=>t(e.breakpoints.only(...i),o),i.not=(...i)=>{const r=t(e.breakpoints.not(...i),o);return r.includes("not all and")?r.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):r}}const o={},r=e=>(i(o,e),o);return i(r),{...e,containerQueries:r}}(d),d.applyStyles=Ji,d=t.reduce((e,t)=>zt(e,t),d),d.unstable_sxConfig={...$i,...a?.unstable_sxConfig},d.unstable_sx=function(e){return Zi({sx:e,theme:this})},d}();function to(e){const{sx:t,...i}=e,{systemProps:o,otherProps:r}=(e=>{const t={systemProps:{},otherProps:{}},i=e?.theme?.unstable_sxConfig??$i;return Object.keys(e).forEach(o=>{i[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t})(i);let n;return n=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{const i=t(...e);return Kt(i)?{...o,...i}:o}:{...o,...t},{...r,sx:n}}const io=e=>e,oo=(()=>{let e=io;return{configure(t){e=t},generate:t=>e(t),reset(){e=io}}})();function ro(e){var t,i,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(i=ro(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function no(){for(var e,t,i=0,o="",r=arguments.length;i<r;i++)(e=arguments[i])&&(t=ro(e))&&(o&&(o+=" "),o+=t);return o}const ao={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};const so=function(e={}){const{themeId:i,defaultTheme:o,defaultClassName:r="MuiBox-root",generateClassName:n}=e,a=
|
|
24
24
|
/**
|
|
25
25
|
* @mui/styled-engine v7.3.1
|
|
26
26
|
*
|
|
@@ -28,139 +28,139 @@ object-assign
|
|
|
28
28
|
* This source code is licensed under the MIT license found in the
|
|
29
29
|
* LICENSE file in the root directory of this source tree.
|
|
30
30
|
*/
|
|
31
|
-
function(e,t){const i=ne(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const o=`"${e}"`;return 0===t.length?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some(e=>void 0===e)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),i(...t)}:i}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Zi),s=ce.forwardRef(function(e,s){const l=function(e=eo){return Xi(e)}(o),{className:d,component:c="div",...u}=to(e);return t.jsx(a,{as:c,ref:s,className:no(d,n?n(r):r),theme:i&&l[i]||l,...u})});return s}({defaultClassName:function(e,t,i="Mui"){const o={};return t.forEach(t=>{o[t]=function(e,t,i="Mui"){const o=ao[t];return o?`${i}-${o}`:`${oo.generate(e)}-${t}`}(e,t,i)}),o}("MuiBox",["root"]).root,generateClassName:oo.generate});function lo(e){return"number"==typeof e&&!isNaN(e)}function co(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function uo(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function po(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function ho(e,t){const i=new Date(e),o=new Date,r=Math.floor((i-o)/1e3),n="rtl"===t?"ar":"en",a=new Intl.RelativeTimeFormat(n,{numeric:"auto"}),s=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(const{unit:e,seconds:t}of s){const i=Math.floor(r/t);if(Math.abs(i)>1)return a.format(i,e)}return"ar"===n?"الآن":"just now"}"production"!==process.env.NODE_ENV&&(so.propTypes={children:Dt.node,component:Dt.elementType,sx:Dt.oneOfType([Dt.arrayOf(Dt.oneOfType([Dt.func,Dt.object,Dt.bool])),Dt.func,Dt.object])});const mo=e=>{if(e?.fieldInfo){const i=e.fieldInfo,o=e?.formManager||null,r=e?.formActions||null,n=e?.formValues||null,a=e?.fieldInfo?.fieldName||null,l=e?.fieldInfo?.fieldType||null;if(!(i&&o&&n&&a&&l))return t.jsx(t.Fragment,{});const d=()=>e?.fieldInfo?.formProps?.fieldLabelFn?e.fieldInfo.formProps.fieldLabelFn(n):e?.fieldInfo?.fieldLabel?e?.fieldInfo?.fieldLabel:void 0;return e.hiddenFields.includes(a)?t.jsx(t.Fragment,{}):t.jsx(s.Grid2,{size:i?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===l||"number"===l?t.jsx(De,{...i.muiTextFieldProps,fullWidth:!0,type:l,disabled:e.disabledFields.includes(a),label:d(),value:n[a],onChange:t=>{let i=null;""!=t.target.value&&(i="number"===l&&co(t.target.value)?Number(t.target.value):t.target.value),o.setValue(a,i),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,i)},sx:{"& .MuiInputBase-root":{height:`${i?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...i?.formProps?.style,display:e.hiddenFields.includes(a)?"none":void 0},error:null!=o.formState.errors[a],helperText:o?.formState?.errors[a]?.message?.toString()}):"date"===i?.fieldType?t.jsx(Ve,{format:i?.dateFormat||je,sx:i?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),label:d(),onChangeCallBack:t=>{o.setValue(a,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,t)},value:n[a],error:null!=o.formState.errors[a],errorMessage:o?.formState?.errors[a]?.message?.toString()}):"datetime"===i?.fieldType?t.jsx(ze,{format:i?.dateFormat||Ge,sx:i?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),label:d(),onChangeCallBack:t=>{o.setValue(a,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,t)},value:n[a],error:null!=o.formState.errors[a],errorMessage:o?.formState?.errors[a]?.message?.toString()}):"checkbox"===i?.fieldType?t.jsx(Be,{label:d(),onChangeCallBack:t=>{o.setValue(a,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,t)},value:n[a],checkedValue:i?.checkedValue||!0,unCheckedValue:i?.unCheckedValue||!1,disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),sx:i?.formProps?.style}):"combobox"===i?.fieldType?t.jsx(qe,{sx:i?.formProps?.style||{width:"100%"},label:d(),commonStoreKey:i?.commonStoreKey,dataQueryId:i?.dataQueryId,storeUrl:i?.storeUrl,storeLoadParam:i?.storeLoadParam,disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),onChangeCallBack:(t,i)=>{let s=null;t&&(s=t),o.setValue(a,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,t,i)},options:i?.options||[],displayField:i?.optionDisplayField||"",valueField:i?.optionValueField||"",value:n[a],errorMessage:o?.formState?.errors[a]?.message?.toString()}):"lookup"===i?.fieldType?t.jsx(Qe,{sx:i?.formProps?.style||{width:"100%"},label:d(),disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),onChangeCallBack:(t,i)=>{let s=null;t&&(s=t),o.setValue(a,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,t,i)},lookupType:i.lookupType,value:n[a],errorMessage:o?.formState?.errors[a]?.message?.toString()}):null})}return t.jsx(t.Fragment,{})},fo=e=>{const i=we(),{ConfirmationWindow:o,setOpen:r}=be({body:e?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{e?.actionFn(e?.record)}});return null==e?.authority||i.isUserAuthorized(e.authority)?t.jsxs(t.Fragment,{children:[t.jsx(o,{}),t.jsxs(s.Button,{variant:e?.formActionProps?.actionButtonVariant,color:e?.formActionProps?.actionButtonColor,onClick:()=>{if(e?.actionFn){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?r(!0):e?.actionFn(e.record)}},children:[e?.icon?t.jsx(m.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx("div",{children:e?.label})]})]}):t.jsx(t.Fragment,{})},go=e=>{const{t:i}=y.useTranslation();return t.jsx(t.Fragment,{children:t.jsxs(s.Grid2,{container:!0,sx:e?.style,alignItems:"flex-start",children:[e?.label?t.jsx(s.Grid2,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:e?.icon?t.jsxs(t.Fragment,{children:[t.jsx(m.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}),t.jsx("div",{children:i(e.label)})]}):t.jsx(t.Fragment,{children:i(e.label)})}):t.jsx(t.Fragment,{}),e?.elements?e.elements.map(i=>"group"===i.type?t.jsx(go,{...i.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===i.type&&"props"===i.mode?t.jsx(mo,{fieldInfo:i.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields}):"field"===i.type&&"node"===i.mode?t.jsx(s.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:t.jsx(i.node,{formManager:e.formManager,formValues:e.formValues,formActions:e.formActions})}):void 0):null,e?.actions?t.jsx(s.Grid2,{size:{sm:12},sx:{padding:1},children:e.actions.map(i=>t.jsx(fo,{...i,record:e.formValues}))}):t.jsx(t.Fragment,{})]})})},To=e=>{const o=i.useSelector(e=>e.AppInfo.value.apiBaseUrl),[r,n]=d.useState(null);return d.useEffect(()=>{e?.refKey&&(()=>{let t=o+"/api/v1/attachment/";e?.attachmentId?t+="download?attachmentId="+e.attachmentId:(t+=`downloadImage?attachmentCode=${e.attachmentCode}&refKey=${e.refKey}`,e?.category&&(t+=`&category=${e.category}`)),n(t)})()},[e.refKey]),e?.showAsAvatar?t.jsx(s.Avatar,{sx:e.style,onError:()=>{n(e?.onErrorImage?e.onErrorImage:"/no_image.png")},src:r}):t.jsx("img",{src:r,loading:"lazy",alt:"image",onError:()=>{n(e?.onErrorImage?e.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Ao=e=>{const{handleGetRequest:i,handleDeleteRequest:o}=Re(),{isUserAuthorized:r}=we();let n=!0;e?.downloadAuthorityKey&&(n=r(e.downloadAuthorityKey));const{ConfirmationWindow:a,setOpen:l}=be({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await o({endPointURI:"api/v1/attachment/archive",parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey,attachmentId:e.id},successCallBkFn:t=>{e.setAttachmentConfig(t.data)},showMask:!0})})()}});return t.jsxs(t.Fragment,{children:[t.jsx(a,{}),t.jsxs(N,{sx:{width:300,border:"0.5px solid gray"},children:[t.jsx(U,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:e?.docType.toLocaleLowerCase().includes("image")?t.jsx(To,{attachmentId:e.id}):t.jsx(m.FontAwesomeIcon,{icon:"file",size:"3x"})}),t.jsxs(k,{children:[t.jsx(F,{gutterBottom:!0,variant:"h6",component:"div",children:e.fileName}),t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${e?.attachmentSize||"unknown"} kb`}),t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${e?.category||"NA"}`}),t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:e.remark})]}),t.jsxs(D,{children:[e?.allowDelete?t.jsx(s.IconButton,{size:"small",onClick:()=>{l(!0)},children:t.jsx(s.Tooltip,{title:"Delete Attachment",children:t.jsx(m.FontAwesomeIcon,{icon:"trash"})})}):t.jsx(t.Fragment,{}),t.jsx("div",{style:{flex:1}}),n?t.jsx(s.IconButton,{size:"small",onClick:async()=>{await i({endPointURI:"api/v1/attachment/download",parameters:{attachmentId:e.id},showMask:!0,responseType:"blob",successCallBkFn:t=>{const i=window.URL.createObjectURL(new Blob([t.data])),o=document.createElement("a");o.href=i,o.setAttribute("download",e.fileName),document.body.appendChild(o),o.click(),o.remove()}})},children:t.jsx(s.Tooltip,{title:"Download Attachment",children:t.jsx(m.FontAwesomeIcon,{icon:"download"})})}):t.jsx(t.Fragment,{})]})]})]})},yo=e=>{const{handleUploadRequest:i,handleGetRequest:o}=Re(),[r,n]=d.useState(null),[a,l]=d.useState([]),[c,u]=d.useState(null),[p,h]=d.useState(null),[f,T]=d.useState([]),[A,y]=d.useState(null),{isUserAuthorized:I}=we(),_=e=>e.split(".").pop()?.toLowerCase()||"";d.useEffect(()=>{(async()=>{await o({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey},successCallBkFn:e=>{y(e.data)}})})()},[e.refKey,e.attachmentCode]),d.useEffect(()=>{if(T(A?.allowedFileTypes?A.allowedFileTypes.split(","):[]),A?.attachmentCategories){const e=[];for(const t of A.attachmentCategories.split(","))e.push({value:t});l(e)}else l([])},[A]);let E=!0;A?.downloadAuthorityKey&&!I(A?.downloadAuthorityKey)&&(E=!1);let O=!0;return!1===e?.enableAttachment&&(O=!1),A?.uploadAuthorityKey&&!I(A.uploadAuthorityKey)&&(O=!1),t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",width:"100%",minHeight:400,alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[O?t.jsx(t.Fragment,{children:null==A?.maxAllowedNumberOfFiles||A?.maxAllowedNumberOfFiles>A.refKeyAttachments.length?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(m.FontAwesomeIcon,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),t.jsx("input",{type:"file",style:{margin:20},accept:A?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const t of e.target.files){const e=_(t.name);if(f.length>0&&!f.includes(e))return void g.toast.error(e+" is not allowed")}n(e.target.files)}}),a.length>0?t.jsx(qe,{label:"Attachment Type",sx:{width:300,m:1},options:a,displayField:"value",valueField:"value",value:p,onChangeCallBack:e=>{h(e)}}):t.jsx(t.Fragment,{}),t.jsx(De,{label:"Remark",value:c,onChange:e=>u(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),t.jsx(s.Button,{sx:{m:1},variant:"contained",onClick:async()=>{let t=A?.refKeyAttachments.length||0;if(A?.maxAllowedNumberOfFiles&&r.length+t>A.maxAllowedNumberOfFiles)g.toast.error("Maximum number of attachments is "+A.maxAllowedNumberOfFiles);else if(!0===A?.isCategoryRequired&&a.length>0&&(null==p||void 0===p||""===p))g.toast.error("You must selected document type to process your request");else if(r){for(const e of r)if(e.type.startsWith("image/")){const t=600,i=1024*t;if(e.size>i)return void g.toast.error(`File ${e.name} is too large. Max allowed is ${t}KB.`)}await i({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:e.refKey,attachmentCode:e.attachmentCode,remark:c,category:p},files:r,successCallBkFn:e=>{y(e.data),n(null),h(null),u(null),g.toast.success("Your request has been process successfully")}})}else g.toast.error("You must add files to upload")},children:"Upload"})]}):t.jsx(t.Fragment,{})}):t.jsx(t.Fragment,{}),E&&A?.refKeyAttachments?.length>0?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),t.jsx(s.Grid2,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:A?.refKeyAttachments.map(i=>t.jsx(s.Grid2,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:t.jsx(Ao,{...i,attachmentCode:e.attachmentCode,setAttachmentConfig:y,downloadAuthorityKey:A.downloadAuthorityKey,allowDelete:O})}))})]}):t.jsx(t.Fragment,{})]})},Io=e=>{const o=i.useSelector(e=>e.AppLayout),{t:r}=y.useTranslation();return t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",width:600,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(s.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(m.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),r("WF_ACTION_HISTORY_LABEL")]}),t.jsx(s.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:e.actionHistory.map((i,r)=>t.jsx(t.Fragment,{children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[t.jsxs(s.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[t.jsx(s.Box,{sx:{marginBottom:.2},children:i.actionTime}),t.jsxs(F,{children:["via ",i.actionMethod]})]}),t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[t.jsx(To,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:i?.personId?i?.personId+"":void 0,style:{m:1,width:70,height:70}}),r!==e.actionHistory.length-1?t.jsx(s.Box,{sx:{marginTop:11,position:"absolute"},children:"|"}):t.jsx(t.Fragment,{})]}),t.jsxs(s.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsxs(s.Box,{sx:{width:"100%"},children:["ltr"===o.appDirection?`${i?.documentActionEnName}`:`${i?.documentActionArName}`,i?.actionComment?" - "+i.actionComment:""]}),t.jsx(s.Box,{sx:{width:"100%"},children:"ltr"===o.appDirection?`${i?.employeeEnName}`:`${i?.employeeArName}`})]})]})}))})]})},_o=e=>{const{t:i}=y.useTranslation(),o=we(),{ConfirmationWindow:r,setOpen:n}=be({body:i(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn)),e?.reloadData&&e.reloadData()}});let a=!0;if(e.authority&&(a=o.isUserAuthorized(e.authority)),a)return t.jsxs(t.Fragment,{children:[t.jsx(r,{}),t.jsxs(s.Button,{onClick:async()=>{if(e?.recordsToProcessActionOn&&e?.recordsToProcessActionOn.length>0){if(e?.preActionValidation)for(const t of e.recordsToProcessActionOn)if(!e.preActionValidation(t))return;!0===e?.isConfirmationRequired?n(!0):(await e.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn),e?.reloadData&&e.reloadData())}else g.toast.error(i("AT_LEAST_ONE_RECORD_SELECTED_MESSAGE"))},variant:e?.label?"outlined":e?.formActionProps?.actionButtonVariant?e.formActionProps.actionButtonVariant:"text",size:"small",color:e?.formActionProps?.actionButtonColor||"primary",children:[e?.icon?t.jsx(m.FontAwesomeIcon,{style:{marginRight:5,marginLeft:5},icon:e.icon}):t.jsx(t.Fragment,{}),e?.label?i(e.label):t.jsx(t.Fragment,{})]})]})},Eo=s.styled(e.QuickFilter)({display:"grid",alignItems:"center"}),Oo=s.styled(e.ToolbarButton)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:t.expanded?0:1,pointerEvents:t.expanded?"none":"auto",transition:e.transitions.create(["opacity"])})),Co=s.styled(s.TextField)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",overflowX:"clip",width:t.expanded?260:"var(--trigger-width)",opacity:t.expanded?1:0,transition:e.transitions.create(["width","opacity"])})),No=i=>{const{t:o}=y.useTranslation(),r=we(),n=!i?.templateProps?.editAction?.authority||r.isUserAuthorized(i.templateProps.editAction.authority),a=rt(i?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},i?.templateProps?.data||[],i?.templateProps?.keyColumnName||"id");return t.jsxs(e.Toolbar,{children:[n&&"none"!=i?.templateProps?.editMode?.editMode&&(void 0===i?.templateProps?.hideCreateBtn||!1===i?.templateProps?.hideCreateBtn)?t.jsxs(s.Button,{onClick:i?.handleCreateNewRecord,children:[t.jsx(m.FontAwesomeIcon,{icon:"add",style:{marginRight:5,marginLeft:5}}),o("ADD_BTN_LABEL")]}):t.jsx(t.Fragment,{}),i?.templateProps?.rowActions?i.templateProps.rowActions.map((e,t)=>!0===e?.gridActionProps?.multiRecord?d.createElement(_o,{...e,key:t,reloadData:async()=>{i.templateProps.apiActions.reloadData(i?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:a.selectedRecordIds,recordsToProcessActionOn:a.selectedRecords}):null):t.jsx(t.Fragment,{}),t.jsx(s.Box,{sx:{flex:1,mx:.5,my:.5,padding:1},children:i?.templateProps?.tBar}),t.jsx(s.Tooltip,{title:"Columns",children:t.jsx(e.ColumnsPanelTrigger,{render:t.jsx(e.ToolbarButton,{}),children:t.jsx(e.GridViewColumnIcon,{fontSize:"small"})})}),t.jsx(s.Tooltip,{title:"Filters",children:t.jsx(e.FilterPanelTrigger,{render:(i,o)=>t.jsx(e.ToolbarButton,{...i,color:"default",children:t.jsx(s.Badge,{badgeContent:o.filterCount,color:"primary",variant:"dot",children:t.jsx(e.GridFilterListIcon,{fontSize:"small"})})})})}),i?.templateProps?.gridStateKey?t.jsx(s.Tooltip,{title:o("RESET_GRID_STATE"),children:t.jsx(s.IconButton,{onClick:i?.clearGridState,children:t.jsx(m.FontAwesomeIcon,{icon:"eraser"})})}):t.jsx(t.Fragment,{}),t.jsx(s.Divider,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),t.jsx(s.Tooltip,{title:o("EXPORT_EXECL_LABEL"),children:t.jsx(e.ExportExcel,{render:t.jsx(s.MenuItem,{}),children:t.jsx(m.FontAwesomeIcon,{icon:"file-excel",color:"green"})})}),t.jsxs(Eo,{children:[t.jsx(e.QuickFilterTrigger,{render:(e,i)=>t.jsx(s.Tooltip,{title:o("SEARCH_BTN_LABEL"),enterDelay:0,children:t.jsx(Oo,{...e,ownerState:{expanded:i.expanded},color:"default","aria-disabled":i.expanded,children:t.jsx(m.FontAwesomeIcon,{icon:"search"})})})}),t.jsx(e.QuickFilterControl,{render:({ref:i,...r},n)=>t.jsx(Co,{...r,ownerState:{expanded:n.expanded},inputRef:i,"aria-label":"Search",placeholder:`${o("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:t.jsx(s.InputAdornment,{position:"start",children:t.jsx(m.FontAwesomeIcon,{icon:"search"})}),endAdornment:n.value?t.jsx(s.InputAdornment,{position:"end",children:t.jsx(e.QuickFilterClear,{edge:"end",size:"small","aria-label":"Clear search",children:t.jsx(m.FontAwesomeIcon,{icon:"xmark"})})}):null,...r.slotProps?.input},...r.slotProps}})})]}),t.jsx(s.IconButton,{onClick:()=>{i.templateProps.apiActions.reloadData(i?.templateProps?.gridLoadParametersValues)},children:t.jsx(m.FontAwesomeIcon,{icon:"refresh"})})]})},Ro=i=>{const{t:o}=y.useTranslation(),r=we(),{ConfirmationWindow:n,setOpen:a}=be({body:o(i?.confirmationMessage||"ACTION_CONFIRMATION"),title:o("CONFIRMATION"),onConfirmationCallBk:async()=>{await(i?.actionFn(i.record)),i?.reloadData&&i.reloadData()}});let l=!0;i.authority&&(l=r.isUserAuthorized(i.authority));let d={};i?.getActionIconStyleForRecord&&(d=i.getActionIconStyleForRecord(i.record));let c=!0;i?.isActionVisibleForRecord&&(c=i?.isActionVisibleForRecord(i.record));let u=!1;if(i?.isActionDisabledForRecord&&(u=i.isActionDisabledForRecord(i.record)),l&&c)return t.jsxs(t.Fragment,{children:[t.jsx(n,{}),t.jsx(e.GridActionsCellItem,{disabled:u,icon:t.jsx(s.Tooltip,{title:i?.label?o(i.label):"",children:t.jsx(m.FontAwesomeIcon,{icon:i.icon,style:{...d,color:u?"gray":null!=d?.color?d.color:void 0}})}),showInMenu:i?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!u){if(i?.preActionValidation&&!i.preActionValidation(i.record))return;!0===i?.isConfirmationRequired?a(!0):(await i.actionFn(i.record),!0===i?.gridActionProps?.reloadGridAfterAction&&i?.reloadData&&i.reloadData())}}})]})};let bo=-1;const wo=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},Po=(e,t)=>{const i=wo(e);localStorage.setItem(e,JSON.stringify({...i,...t}))},So=["__check__","actions"],vo=o=>{const{t:r}=y.useTranslation(),n=i.useSelector(e=>e.AppLayout),[a,l]=d.useState({}),[c,u]=d.useState(!0),{getLookupOptions:p}=(()=>{const{handleGetRequest:e}=Re(),t=i.useSelector(e=>e.AppLayout),o=async t=>{let i=[];return await e({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:t},successCallBkFn:e=>{i=e.data}}),i};return{generateLookupGridColumn:async e=>{let i=await o(e.lookupType);return{...e,options:i,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:o}})(),{Window:h,setWindowState:f}=Pe({windowTitle:r(o.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{o?.apiActions?.reloadData(o.gridLoadParametersValues)}}),{Window:T,setWindowState:A}=Pe({windowTitle:r(o.gridTitle)+" Approvals",windowIcon:"stamp",height:"fit-content",minHeight:500,width:"fit-content",onCloseCallBack:()=>{o?.apiActions?.reloadData(o.gridLoadParametersValues)}}),[I,E]=d.useState([]),C=tt(o.formElements),N=[],R=d.useMemo(()=>o?.gridStateKey?wo(o.gridStateKey):{},[]);for(const e of C)!0===e?.gridProps?.hidden&&N.push(e.fieldName);let b={};if(R?.columnVisibilityModel){b=R.columnVisibilityModel;const e=Object.keys(b);for(const t of N)e.includes(t)||(b[t]=!1)}else for(const e of N)b[e]=!1;const w=i.useSelector(e=>e.AppLayout.appDirection),[P,S]=d.useState(b),[v,L]=d.useState(R.columnOrder||[]),[M,x]=d.useState(R.columnWidths||{}),[D,k]=d.useState(R.columnGroupingModel||[]);let U=R?.pinnedColumns?.left||[];U=U.filter(e=>!So.includes(e));let F=R?.pinnedColumns?.right||[]||[];F=F.filter(e=>!So.includes(e));const[B,q]=d.useState({left:[..."ltr"===w?So:[],...U],right:[..."rtl"===w?So:[],...F]}),j=we(),G=_.useNavigate(),[W,H]=d.useState(null),[Y,K]=d.useState(null),[V,z]=d.useState({}),Q=async()=>{let e=it(C,"row"===o?.editMode?.editMode||!1,r);for(let t of e)t?.lookupType&&(t.displayField="ltr"===n.appDirection?"lookupEnDisplay":"lookupArDisplay",t.options=await p(t.lookupType),t.valueField="lookupValue");E(e)},[$,Z]=d.useState({ids:new Set,type:"include"});let J="id";o?.keyColumnName&&(J=o?.keyColumnName);const X=o.setData;let ee=null;ee=o?.validationSchema?o.validationSchema:O.z.object(ot(C));let te=!0;o?.editAction?.authority&&(te=j.isUserAuthorized(o.editAction.authority));let ie=!0;o?.deleteAction?.authority&&(ie=j.isUserAuthorized(o.deleteAction.authority));const{ConfirmationWindow:oe,setOpen:re}=be({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let e=!0;W&&!0===W?.isNew||(e=await o.apiActions.deleteRecordById(W[J])),e&&(o?.deleteAction?.postActionCallBack&&await o.deleteAction.postActionCallBack(W),X(e=>e.filter(e=>e[J]!=W[J])))}});let ne,ae,se,le,de,ce;"modal"===o?.editMode?.editMode&&(ne=o?.editMode?.specs?.modalHeight||"fit-content",ae=o?.editMode?.specs?.modalWidth||"300",se=o?.editMode?.specs?.modalMinHeight,le=o?.editMode?.specs?.modalMinWidth,de=o?.editMode?.specs?.modalIcon||"window",ce=o?.editMode?.specs?.modalTitle||"Record Form");const{Window:ue,setWindowState:pe}=Pe({height:ne,minHeight:se,minWidth:le,onCloseCallBack:()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)},width:ae,windowIcon:de,windowTitle:ce}),he={type:"actions",field:"actions",headerName:"",headerAlign:"center",width:(o?.rowActions?30*o.rowActions.length:0)+(o?.editAction&&o?.editAction?.isEnabled?30:0)+(o?.deleteAction&&o?.deleteAction?.isEnabled?30:0)+(o?.attachment?30:0)+(o?.workFlowDocumentCode?30:0),getActions:i=>{const n=i.row,a=[];if("none"!=o?.editMode?.editMode&&(void 0===o?.disableDefaultAction||!o.disableDefaultAction)){const i=V[n[J]]?.mode===e.GridRowModes.Edit;if("row"===o.editMode.editMode&&i)te&&(a.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(m.FontAwesomeIcon,{icon:"save"}),label:r("SAVE_BTN_LABEL"),onClick:()=>{(t=>{const i=t[J];z({...V,[i]:{mode:e.GridRowModes.View}})})(n)}})),a.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(m.FontAwesomeIcon,{icon:"cancel"}),label:r("CANCEL_BTN_LABEL"),onClick:()=>{(t=>{const i=t[J];i&&lo(i)&&i<0?(z({...V,[i]:{mode:e.GridRowModes.View,ignoreModifications:!0}}),X(e=>{const t=e.filter(e=>e[J]!=i);return t})):z({...V,[i]:{mode:e.GridRowModes.View,ignoreModifications:!0}})})(n)},color:"inherit"})));else{if(o?.editAction&&!0===o?.editAction?.isEnabled){let i=!0;o?.editAction?.isActionVisibleForRecord&&(i=o?.editAction?.isActionVisibleForRecord(n));let l=!1;o?.editAction?.isActionDisabledForRecord&&(l=o?.editAction?.isActionDisabledForRecord(n)),te&&i&&a.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(s.Tooltip,{title:r("EDIT_BTN_LABEL"),children:t.jsx(m.FontAwesomeIcon,{icon:"edit",style:{color:l?"gray":void 0}})}),showInMenu:o?.editAction?.gridActionProps?.showInMenu||!1,label:r("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{te&&!l&&(async t=>{if(t)if(K(t),"form"===o.editMode.editMode)G(o.editMode.specs.formRoute+"/"+t[J]);else if("modal"===o.editMode.editMode)pe(!0);else if("row"===o?.editMode?.editMode){const i=t[J];z({...V,[i]:{mode:e.GridRowModes.Edit}})}})(n)}}))}if(o?.deleteAction&&!0===o?.deleteAction?.isEnabled){let i=!0;o?.deleteAction?.isActionVisibleForRecord&&(i=o?.deleteAction?.isActionVisibleForRecord(n));let l=!1;o?.deleteAction?.isActionDisabledForRecord&&(l=o?.deleteAction?.isActionDisabledForRecord(n)),ie&&i&&a.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(s.Tooltip,{title:r("DELETE_BTN_LABEL"),children:t.jsx(m.FontAwesomeIcon,{icon:"trash",style:{color:l?"gray":void 0}})}),showInMenu:o?.deleteAction?.gridActionProps?.showInMenu||!1,label:r("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(ie&&!l){if(o?.deleteAction?.preActionValidation&&!o.deleteAction.preActionValidation(n))return;H(n),re(!0)}}}))}}}if(n[o?.keyColumnName||"id"]&&n[o?.keyColumnName||"id"]>0&&o?.attachment&&a?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(s.Tooltip,{title:"Attachments",children:t.jsx(m.FontAwesomeIcon,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{l(n),u(!o?.attachment?.enableAttachFn||o.attachment.enableAttachFn(n)),f(!0)}})),n[o?.keyColumnName||"id"]&&n[o?.keyColumnName||"id"]>0&&o?.workFlowDocumentCode&&a?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(s.Tooltip,{title:"Approvals",children:t.jsx(m.FontAwesomeIcon,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{l(n),A(!0)}})),n[o?.keyColumnName||"id"]&&n[o?.keyColumnName||"id"]>0&&o?.rowActions)for(const e of o.rowActions)e?.gridActionProps?.multiRecord&&!0===e?.gridActionProps?.multiRecord||a.push(t.jsx(Ro,{...e,record:n,reloadData:async()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)}}));return a}};let me=[];(void 0===o?.disableDefaultAction||!o.disableDefaultAction||o?.rowActions&&o?.rowActions.length>0)&&me.push(he),me=[...me,...I];d.useEffect(()=>{void 0!==o?.autoLoad&&!0!==o.autoLoad||o.apiActions.reloadData(o?.gridLoadParametersValues),Q()},[]),d.useEffect(()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)},[j.UserInfo?.currentOrganization]),d.useEffect(()=>{Q()},[w,o.formElements]);const fe=d.useMemo(()=>{const e=me.map(e=>({...e}));if(v.length){const t=new Map(e.map(e=>[e.field,e]));return v.map(e=>t.get(e)).filter(Boolean)}return e},[v,M,me]);return t.jsxs(t.Fragment,{children:[t.jsx(oe,{}),"modal"===o?.editMode?.editMode?t.jsx(ue,{children:o?.editMode?.specs?.formComponent?t.jsx(o.editMode.specs.formComponent,{recordIdToEdit:Y?Y[J]:void 0,formCloseCallBk:()=>{pe(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)}}):t.jsx(Uo,{keyColumnName:o.keyColumnName,attachment:o.attachment,formValuesChangeCallBk:o?.formProps?.formValuesChangeCallBk,recordIdToEdit:Y?Y[J]:void 0,formCloseCallBk:()=>{pe(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)},elements:o.formElements,apiActions:o.apiActions,editAuthorityKey:o?.editAction?.authority,formSavedSuccessfullyCallBk:o?.editAction?.postActionCallBack,preSaveValidation:o?.editAction?.preActionValidation,actions:o?.rowActions})}):t.jsx(t.Fragment,{}),void 0!==o?.hideInfoBar||o?.hideInfoBar?t.jsx(t.Fragment,{}):t.jsxs(s.Box,{sx:{display:"flex"},children:[void 0!==o?.hideBackButton||o?.hideBackButton?t.jsx(t.Fragment,{}):t.jsx(s.IconButton,{onClick:()=>{G(-1,{replace:!0})},children:t.jsx(m.FontAwesomeIcon,{icon:"ltr"===w?"arrow-left":"arrow-right"})}),t.jsxs(s.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[o?.girdIcon?t.jsx(m.FontAwesomeIcon,{icon:o.girdIcon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx(s.Typography,{variant:"h5",children:o?.gridTitle?uo(r(o?.gridTitle)):""})]})]}),o?.gridLoadParameters&&o?.gridLoadParameters.length>0&&o?.gridLoadParametersValues&&o?.setGridLoadParametersValues?t.jsxs(s.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(s.AccordionSummary,{expandIcon:t.jsx(e.GridExpandMoreIcon,{}),children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(s.Typography,{component:"span",children:"Filters"})]})}),t.jsx(s.AccordionDetails,{children:t.jsx(s.Box,{children:t.jsx(Uo,{saveButtonSpecs:{label:r("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:r("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{null!=e?o.setGridLoadParametersValues(e):o.setGridLoadParametersValues({}),o.apiActions.reloadData(e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:o.gridLoadParameters})})})]}):t.jsx(t.Fragment,{}),o?.attachment?t.jsx(h,{children:t.jsx(yo,{attachmentCode:o.attachment.attachmentCode,refKey:a[o?.keyColumnName||"id"],enableAttachment:c})}):t.jsx(t.Fragment,{}),o?.workFlowDocumentCode?t.jsx(T,{children:t.jsx(ko,{workFlowDocumentCode:o.workFlowDocumentCode,refDocumentId:a[o?.keyColumnName||"id"],postActionCallBk:()=>{A(!1),o.apiActions.reloadData(o.gridLoadParametersValues)},cancelActionCallBk:()=>{A(!1),o.apiActions.reloadData(o.gridLoadParametersValues)}})}):t.jsx(t.Fragment,{}),t.jsx(e.DataGridPremium,{...o?.muiProps,slots:{toolbar:No},slotProps:{toolbar:{templateProps:{...o,rowSelectionModel:$,data:o?.data},handleCreateNewRecord:()=>{if("form"===o?.editMode?.editMode)G(o.editMode.specs.formRoute);else if("modal"===o?.editMode?.editMode)K(null),pe(!0);else if("row"===o?.editMode?.editMode){bo-=1;const t={};t[J]=bo,t.isNew=!0;for(const e of I)"actions"!=e?.type&&e?.field!=J&&e?.field&&(t[e.field]=null);X(e=>[t,...e]),z(t=>({...t,[bo]:{mode:e.GridRowModes.Edit}}))}},clearGridState:()=>{o?.gridStateKey&&localStorage.removeItem(o.gridStateKey),S({}),L([]),x({}),k([]),q({left:[..."ltr"===w?So:[]],right:[..."rtl"===w?So:[]]})}}},getRowId:e=>e[J],showToolbar:!0,rows:o?.data,columns:fe,checkboxSelection:!0,editMode:"row",onRowEditStop:(e,t)=>{"rowFocusOut"===e.reason&&(t.defaultMuiPrevented=!0)},rowModesModel:"row"==o.editMode.editMode?V:void 0,onRowModesModelChange:"row"==o.editMode.editMode?e=>{z(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async e=>{if("row"===o.editMode.editMode){let i=null;const r=(e=>{try{ee.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof O.z.ZodError?e.errors.map(e=>"Error in field ("+e.path+") : "+e.message).join(","):"invalid record data",t}})(e);if(r){const e=r.split(",");throw g.toast.error(t.jsx("div",{style:{},children:e.map(e=>t.jsxs(t.Fragment,{children:[t.jsx("div",{children:e}),t.jsx(s.Divider,{})]}))})),new Error(r)}if(o?.editAction?.preActionValidation&&!o.editAction.preActionValidation(e))throw new Error("error on the configured presave validation");const n={...e};if(e[J]&&lo(e[J])&&Number(e[J])<0&&(n[J]=null),i=await o.apiActions.saveRecord(n),null==i)throw new Error("Failed to process your request, contact your administrator");return o?.editAction?.postActionCallBack&&await o.editAction.postActionCallBack(e),!0===e?.isNew&&X(t=>{const o=t.filter(t=>t[J]!==e[J]);return[i,...o]}),!0===o?.editMode?.reloadAfterSave&&o?.apiActions?.reloadData&&o?.apiActions?.reloadData(o?.gridLoadParametersValues),i}},rowSelectionModel:$,onRowSelectionModelChange:e=>{Z(e)},columnVisibilityModel:P,onColumnVisibilityModelChange:e=>{S(e),o?.gridStateKey&&Po(o.gridStateKey,{columnVisibilityModel:e})},onColumnOrderChange:e=>{const{column:t,targetIndex:i}=e;L(e=>{const r=e.length?[...e]:me.map(e=>e.field),n=r.indexOf(t.field);return-1===n||(r.splice(n,1),r.splice(i,0,t.field),o?.gridStateKey&&Po(o.gridStateKey,{columnOrder:r})),r})},rowGroupingModel:D,onRowGroupingModelChange:e=>{(e=>{k(e),o?.gridStateKey&&Po(o.gridStateKey,{columnGroupingModel:e})})(e)},sx:{width:"100%"}})]})},Lo=e=>{if(0===e.length)return[];const t=[];for(const i of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:i,fieldName:i,fieldType:"text"}};t.push(e)}return t},Mo=e=>{const[i,o]=d.useState([]);return d.useEffect(()=>{const t=e.reportData.map((e,t)=>({...e,report_record_data_key:t}));o(t)},[e.reportData]),t.jsx(vo,{data:i,disableDefaultAction:!0,setData:e.setReportData,formElements:Lo(e.reportData),gridLoadParameters:e.gridLoadParameters,gridLoadParametersValues:e.gridLoadParametersValues,setGridLoadParametersValues:e.setGridLoadParametersValues,editMode:{editMode:"none"},girdIcon:"file-excel",gridTitle:"Report",autoLoad:!0,keyColumnName:"report_record_data_key",hideInfoBar:!0,apiActions:{deleteRecordById:async()=>!0,loadRecordById:async()=>{},reloadData:async()=>{e.reloadReport()},saveRecord:async()=>{}}})},xo=e=>{console.log("useParameterPanel","useParameterPanel called");const[i,o]=d.useState({...e?.initialParameterValues}),r=((e,t)=>{const i=[];for(const o of e){const e={type:"field",mode:"props",props:{fieldLabel:o?.parameterLabel,fieldName:o?.parameterCode,fieldType:o?.parameterType,hidden:o?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:o?.mandatory,defaultValue:t[o?.parameterCode]||o?.defaultValue}};i.push(e)}return i})(e.parameters,i);return{ParameterPanel:({searchBtnClickCallBk:e})=>{const{t:n}=y.useTranslation();return t.jsxs(s.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(s.AccordionSummary,{expandIcon:t.jsx(m.FontAwesomeIcon,{icon:{prefix:"far",iconName:"square-caret-down"}}),children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(s.Typography,{component:"span",children:"Filters"})]})}),t.jsx(s.AccordionDetails,{children:t.jsx(s.Box,{children:t.jsx(Uo,{saveButtonSpecs:{label:n("Filter"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:n("RESET_BTN_LABEL"),icon:"eraser",hidden:!0,actionButtonVariant:"outlined",actionButtonColor:"error"},actions:[{label:n("RESET_BTN_LABEL"),icon:"eraser",isIdRequired:!1,formActionProps:{enabled:!0},actionFn:async(e,t)=>{o({})}}],apiActions:{deleteRecordById:async()=>!0,saveRecord:async t=>{o(null!=t?t:{}),e&&await e(i)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:r})})})]})},parametersValues:i,setParametersValues:o,panelElements:r}},Do=e=>{const[i,o]=d.useState(null),[r,n]=d.useState(null),[a,l]=d.useState([]),[c,u]=d.useState("WAITING_REPORT_CODE"),{handleGetRequest:p,handlePostRequest:h,HandleDownloadHTTPPostPDF:f}=Re(),[g,T]=d.useState(null),{ParameterPanel:A,parametersValues:y,panelElements:I,setParametersValues:_}=xo({parameters:g?.reportParameters||[],initialParameterValues:{...e?.reportParametersValues}}),E=async t=>{u("WAITING_RESULT"),"Excel"===g?.reportType?await h({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{u("SHOWING_RESULT"),l(e.data)}}):g?.reportType&&await f({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{u("SHOWING_RESULT");const t=e.headers["content-disposition"];let i="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(i=e[1])}if(i.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),i=URL.createObjectURL(t);o(i)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),o=window.URL.createObjectURL(t),r=document.createElement("a");r.href=o,r.download=i,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(o)}},failureCallBkFn:e=>{n("Failed To run report ... contact your administrator"),u("ERROR")}})};return d.useEffect(()=>{e?.reportCode&&(async()=>{u("LOADING_METADATA"),await p({endPointURI:"api/v1/public/report/metadata",showMask:!0,parameters:{reportCode:e.reportCode},successCallBkFn:t=>{T(t.data),!0===e?.byPassParameterEntry||0==t.data.reportParameters.length?(E(y),u("WAITING_RESULT")):u("WAITING_PARAMETER_INPUT")},failureCallBkFn:e=>{n("Failed loading report metadata ... contact your administrator"),u("ERROR")}})})()},[e.reportCode,e.byPassParameterEntry,e.reportParametersValues,e.jasperOutPutFileType,e.resultMode]),t.jsxs(t.Fragment,{children:[t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[t.jsxs(s.Box,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[t.jsx(m.FontAwesomeIcon,{icon:"Excel"===g?.reportType?"file-excel":"file-pdf",color:"Excel"===g?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),g?.reportName]}),"Excel"!=g?.reportType&&"SHOWING_RESULT"===c?t.jsxs(t.Fragment,{children:[!0===e?.byPassParameterEntry?t.jsx(t.Fragment,{}):g?.reportParameters.length>0?t.jsx(s.IconButton,{onClick:()=>{u("WAITING_PARAMETER_INPUT")},children:t.jsx(m.FontAwesomeIcon,{icon:"filter"})}):t.jsx(t.Fragment,{}),t.jsx(s.IconButton,{children:t.jsx(m.FontAwesomeIcon,{icon:"refresh",onClick:()=>{E(y)}})})]}):t.jsx(t.Fragment,{})]}),t.jsx(s.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===c&&"Excel"!=g?.reportType?t.jsx(A,{searchBtnClickCallBk:E}):"SHOWING_RESULT"===c||("WAITING_PARAMETER_INPUT"===c||"WAITING_RESULT"===c)&&"Excel"===g?.reportType?"Excel"===g?.reportType?t.jsx(Mo,{reportData:a,setReportData:l,reloadReport:async()=>{E(y)},gridLoadParameters:I,gridLoadParametersValues:y,setGridLoadParametersValues:_}):t.jsx("iframe",{src:i,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===c?t.jsxs(s.Box,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[t.jsx(m.FontAwesomeIcon,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),r]}):t.jsx(t.Fragment,{})})]})},ko=e=>{const o=_.useNavigate(),r=i.useSelector(e=>e.AppLayout),{isUserAuthorized:n,UserInfo:a}=we(),{handleGetRequest:l,handlePostRequest:c}=Re(),[u,p]=d.useState(null),[h,f]=d.useState([]),{t:T}=y.useTranslation(),[A,I]=d.useState(null),[E,O]=d.useState({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:C,setWindowState:N}=Pe({windowTitle:"ltr"===r.appDirection?E?.workflowDocument&&E?.referencedDocument?`${E?.workflowDocument?.documentEnName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:"Document":E?.workflowDocument&&E?.referencedDocument?`${E?.workflowDocument?.documentArName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),R=async()=>{await l({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:e.workFlowDocumentCode,refDocumentId:e.refDocumentId},successCallBkFn:e=>{O(structuredClone(e.data))},failureCallBkFn:()=>{O({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},b=async()=>{await c({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:E?.workflowDocument?.id,refDocumentId:e.refDocumentId,actionId:u.id,refDocumentStatus:E?.workflowDocumentStatus?.documentStatusCode,actionComment:A},successCallBkFn:async t=>{u?.post_action_endpoint?await c({endPointURI:u.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:u.id},successCallBkFn:()=>{R(),e?.postActionCallBk&&e.postActionCallBk()}}):R()}})};return d.useEffect(()=>{e.refDocumentId&&e.workFlowDocumentCode&&R()},[e.refDocumentId,e.workFlowDocumentCode]),d.useEffect(()=>{f(E?.nextActions&&E?.nextActions?.length>0?E.nextActions.filter(e=>{if(!E?.workflowDocumentStatus?.nextActionTakersAuthority&&!E?.nextActionTakers)return!0;if(E?.workflowDocumentStatus?.nextActionTakersAuthority&&n(E.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(E?.nextActionTakers)for(const e of E.nextActionTakers)if(a?.username===e?.username||a?.username===e?.USERNAME)return!0;return!1}):[])},[E.nextActions,E.nextActionTakers]),t.jsxs(t.Fragment,{children:[E?.workflowDocumentReport?.id?t.jsx(C,{children:t.jsx(Do,{reportCode:E?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:e.refDocumentId+""}})}):t.jsx(t.Fragment,{}),E?.workflowDocument?t.jsxs(s.Box,{sx:{width:"100%",textAlign:"center",fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.IconButton,{onClick:()=>{o(-1,{replace:!0})},children:t.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(m.FontAwesomeIcon,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===r.appDirection?`${E?.workflowDocument?.documentEnName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:`${E?.workflowDocument?.documentArName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`,E?.workflowDocumentStatus?"ltr"===r.appDirection?` ( ${E?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${E?.workflowDocumentStatus?.documentStatusArName} )`:"",t.jsx(s.Box,{sx:{flex:1}}),E?.workflowDocumentReport?.id?t.jsx(s.Button,{onClick:()=>{N(!0)},variant:"outlined",startIcon:t.jsx(m.FontAwesomeIcon,{icon:"eye"}),children:T("VIEW_LABEL")}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),t.jsxs(s.Box,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[h?.length>0?t.jsxs(s.Paper,{sx:{padding:2,display:"flex",margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[t.jsx(qe,{sx:{marginBottom:2,width:400},label:T("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===r.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:u?.id,options:h,onChangeCallBack:(e,t)=>{p(t)}}),t.jsx(De,{sx:{width:400},rows:3,value:A,onChange:e=>{I(e.target.value)},multiline:!0,label:T("WF_COMMENT_LABEL")}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.Button,{color:"success",variant:"contained",sx:{width:200,m:1},onClick:async()=>{null!=u&&null!=u?.id?!0!==u.require_comment&&1!==u.require_comment&&"true"!==u.require_comment||null!==A&&""!==A?u?.pre_action_endpoint?await c({endPointURI:u.pre_action_endpoint,showMask:!0,loadingMessage:"Processing pre action validation ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:u.id},successCallBkFn:()=>{b()}}):b():g.toast.error("You must enter comment for the action to be processed"):g.toast.error("You must select action to process")},children:T("WF_TAKE_ACTION_BTN_LABEL")}),e?.cancelActionCallBk?t.jsx(s.Button,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{e?.cancelActionCallBk&&e.cancelActionCallBk()},children:T("WF_CANCEL_BTN_LABEL")}):t.jsx(t.Fragment,{})]}),E?.nextActionTakers&&E.nextActionTakers.length>0?t.jsxs(t.Fragment,{children:[t.jsx(s.Divider,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:t.jsxs(s.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(m.FontAwesomeIcon,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",T("WF_WAITING_FOR_LABEL")]})}),t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:E.nextActionTakers.map(e=>t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[t.jsx(To,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),t.jsxs(s.Box,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsx("div",{children:"ltr"===r.appDirection?e?.employee_en_name:e?.employee_ar_name}),t.jsx("div",{children:e?.email?t.jsxs(t.Fragment,{children:[t.jsx(m.FontAwesomeIcon,{icon:"envelope",style:{marginRight:10,marginLeft:10}}),e?.email]}):t.jsx(t.Fragment,{})}),t.jsx("div",{children:e?.mobile_number?t.jsxs(t.Fragment,{children:[t.jsx(m.FontAwesomeIcon,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),e?.mobile_number]}):t.jsx(t.Fragment,{})})]})]}))})]}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),E?.actionsHistory.length>0?t.jsx(Io,{actionHistory:E.actionsHistory}):t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",width:600,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(s.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(m.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),T("WF_ACTION_HISTORY_LABEL")]}),t.jsx(s.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},Uo=e=>{const{Window:i,setWindowState:o}=Pe({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[r,n]=d.useState(!0),{t:a}=y.useTranslation(),l=tt(e.elements),[c,u]=d.useState([]),[p,h]=d.useState([]),f={};for(const t of e.elements)"field"===t?.type&&"props"===t?.mode&&t?.props?.defaultValue&&(f[t.props.fieldName]=t.props.defaultValue);let T=null;T=e?.validationSchema?e.validationSchema:ue.object(ot(l));const A=I.useForm({resolver:E.zodResolver(T),defaultValues:f}),O=A.watch(),C=_.useParams(),N=e?.formRouteRecordIdParamName,R=async()=>{let t=null;if(e?.recordIdToEdit?t=e.recordIdToEdit:N&&C[N]&&(t=C[N]),t){const i=await e.apiActions.loadRecordById(t);if(i){A.reset({...i}),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk({...i},P,A);for(const e of l)"combobox"===e?.fieldType&&i[e.fieldName]&&(e?.comboboxValueDataType&&"string"===e?.comboboxValueDataType?A.setValue(e.fieldName,i[e.fieldName]+""):A.setValue(e.fieldName,i[e.fieldName]))}}else A.reset({})},{Window:b,setWindowState:w}=Pe({windowTitle:"Approvals",windowIcon:"stamp",height:"fit-content",minHeight:500,width:"fit-content",onCloseCallBack:async()=>{await R()}}),P={setFieldValue:(e,t)=>{A.setValue(e,t)},hideField:e=>{h(t=>[...t,e])},showField:e=>{h(t=>t.filter(t=>t!==e))},disableField:e=>{u(t=>[...t,e])},enableField:e=>{u(t=>t.filter(t=>t!==e))}};return d.useEffect(()=>{const e=[],t=[];for(const i of l)i?.hidden&&e.push(i.fieldName),i?.disabled&&t.push(i.fieldName);h(e),u(t)},[e.elements]),d.useEffect(()=>{R()},[e?.recordIdToEdit]),d.useEffect(()=>{n(!e?.attachment||!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(O))},[O]),t.jsxs(t.Fragment,{children:[e?.attachment?t.jsx(i,{children:t.jsx(yo,{attachmentCode:e.attachment.attachmentCode,refKey:O[e?.keyColumnName||"id"],enableAttachment:r})}):t.jsx(t.Fragment,{}),e?.workFlowDocumentCode?t.jsx(b,{children:t.jsx(ko,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:O[e?.keyColumnName||"id"],postActionCallBk:()=>{w(!1),R()},cancelActionCallBk:()=>{w(!1),R()}})}):t.jsx(t.Fragment,{}),t.jsx(so,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:t.jsx(s.Grid2,{sx:{width:"100%"},container:!0,children:e.elements.map((i,o)=>"group"===i.type?t.jsx(go,{...i.props,formManager:A,formValues:O,formActions:P,hiddenFields:p,disabledFields:c},o):"field"===i.type&&"props"===i.mode?t.jsx(mo,{fieldInfo:i.props,formManager:A,formValues:O,formActions:P,hiddenFields:p,disabledFields:c,formValuesChangeCallBk:e.formValuesChangeCallBk},o):"field"===i.type&&"node"===i.mode?t.jsx(s.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:t.jsx(i.node,{formManager:A,formValues:O})},o):void 0)})}),t.jsxs(so,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[O[e?.keyColumnName||"id"]&&e?.attachment?t.jsx(s.Tooltip,{title:"Attachments",children:t.jsx(s.IconButton,{onClick:()=>{o(!0)},children:t.jsx(m.FontAwesomeIcon,{icon:"paperclip"})})}):null,O[e?.keyColumnName||"id"]&&e?.workFlowDocumentCode?t.jsx(s.Tooltip,{title:"Approvals",children:t.jsx(s.IconButton,{onClick:()=>{w(!0)},children:t.jsx(m.FontAwesomeIcon,{icon:"stamp"})})}):null,e?.actions?e.actions.map(i=>!1===i?.isIdRequired?t.jsx(fo,{...i,record:O}):O[e?.keyColumnName||"id"]?!0===i?.formActionProps?.enabled?t.jsx(fo,{...i,record:O}):t.jsx(t.Fragment,{}):void 0):t.jsx(t.Fragment,{}),t.jsx("div",{style:{flex:1}}),e?.saveButtonSpecs?.hidden?t.jsx(t.Fragment,{}):t.jsx(s.Button,{variant:e?.saveButtonSpecs?.actionButtonVariant?e.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:e?.saveButtonSpecs?.icon?t.jsx(m.FontAwesomeIcon,{icon:e.saveButtonSpecs.icon}):null,color:e?.saveButtonSpecs?.actionButtonColor?e.saveButtonSpecs.actionButtonColor:"primary",onClick:A.handleSubmit(t=>{(async t=>{if((!e?.preSaveValidation||e.preSaveValidation(t))&&t){const i=await e.apiActions.saveRecord(t);i&&(A.reset({...i}),e?.formSavedSuccessfullyCallBk&&e.formSavedSuccessfullyCallBk(i),e?.formCloseCallBk&&e.formCloseCallBk())}})(t)},e=>{g.toast.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)}),children:a(e?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e?.cancelButtonSpecs?.hidden?t.jsx(t.Fragment,{}):t.jsx(s.Button,{variant:e?.cancelButtonSpecs?.actionButtonVariant?e.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:e?.cancelButtonSpecs?.icon?t.jsx(m.FontAwesomeIcon,{icon:e.cancelButtonSpecs.icon}):null,color:e?.cancelButtonSpecs?.actionButtonColor?e.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{e?.formCloseCallBk&&e.formCloseCallBk(),A.reset(f)},children:a(e?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},Fo=()=>{const{workflowDocumentCode:e,refDocumentId:i}=_.useParams();return t.jsx(ko,{workFlowDocumentCode:e,refDocumentId:i})},Bo=e=>t.jsx(j.BarChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))}),qo=e=>t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[t.jsx(s.Box,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:t.jsx("div",{children:e.record[e.valueField]})}),t.jsx(s.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]})]}),jo=e=>t.jsxs(t.Fragment,{children:[t.jsx(s.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(j.Gauge,{width:200,height:200,value:e.record[e.valueField],valueMax:e.total})]}),Go=e=>t.jsx(j.LineChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))});function Wo(e){return t.jsxs(W,{sx:{display:"flex",alignItems:"center"},children:[t.jsx(W,{sx:{width:"100%",mr:1},children:t.jsx(G,{variant:"determinate",...e})}),t.jsx(W,{sx:{minWidth:35},children:t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(e.value)}%`})})]})}const Ho=e=>t.jsxs(W,{sx:{width:"100%"},children:[t.jsx(F,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(Wo,{value:e.record[e.valueField]/e.total*100})]}),Yo=e=>{const i=e.data.map((t,i)=>({id:i,value:t[e.valueField],label:t[e.labelField]+""}));return t.jsx(H.PieChart,{series:[{data:i}]})},Ko=e=>{const[i,o]=d.useState(!0),[r,n]=d.useState([]),{handleGetRequest:a}=Re();d.useEffect(()=>{e.loadWidget?(async()=>{o(!0),await a({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e.parameterValues},successCallBkFn:e=>{o(!1),n(e.data)},failureCallBkFn:()=>{o(!1),n([])}})})():o(!1)},[e.loadWidget,e.loadCounter]);let l=0;if(1==r.length)l=100;else if("CircularProgress"===e.widgetType||"LinearProgress"===e.widgetType)for(const t of r)l+=t[e.verticalAxisField];return t.jsxs(t.Fragment,{children:["LineChart"===e.widgetType||"PieChart"===e.widgetType||"ColumnChart"===e.widgetType?t.jsxs(s.Box,{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:e?.icon||"chart-pie"}),e?.title]}):t.jsx(t.Fragment,{}),t.jsx(s.Box,{sx:{flex:1,padding:1,height:"90%",display:"flex",alignItems:"center",justifyContent:"center",width:"90%"},children:i?t.jsxs(t.Fragment,{children:[t.jsx(m.FontAwesomeIcon,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),t.jsx("div",{children:"Loading"})]}):"ColumnChart"===e.widgetType?t.jsx(Bo,{data:r,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===e.widgetType?t.jsx(Go,{data:r,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===e.widgetType?t.jsx(Yo,{data:r,widgetTitle:e.title,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,widgetType:"Pie"}):t.jsxs(s.Grid2,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[t.jsx(s.Grid2,{size:{xs:12},sx:{textAlign:"center"},children:e.title}),r.map((i,o)=>"Card"===e.widgetType?t.jsx(s.Grid2,{size:{md:3,xs:12},children:t.jsx(qo,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField},o)}):"CircularProgress"===e.widgetType?t.jsx(s.Grid2,{size:{md:3,xs:12},children:t.jsx(jo,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},o)}):"LinearProgress"===e.widgetType?t.jsx(s.Grid2,{size:{md:3,xs:12},children:t.jsx(Ho,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},o)}):void 0)]})})]})},Vo=e=>{const[i,o]=d.useState({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),{ParameterPanel:r,parametersValues:n}=xo({parameters:i?.dashboardParameters||[],initialParameterValues:{}}),[a,l]=d.useState(0),[c,u]=d.useState(!1);d.useEffect(()=>{if(null!=i.dashboardCode&&null!=i.dashboardCode&&""!=i.dashboardCode){u(!1);let e=!0;if(i?.dashboardParameters.length>0)for(const t of i?.dashboardParameters)if(!0===t?.mandatory&&(void 0===n[t.parameterCode]||null===n[t.parameterCode]||""===n[t.parameterCode])){e=!1;break}e&&u(e),l(a+1)}},[i?.dashboardParameters,n]);const p=_.useNavigate(),{handleGetRequest:h,handlePostRequest:f}=Re();return d.useEffect(()=>{e.dashboardCode&&(async()=>{await h({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:e.dashboardCode},successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o(null)}})})()},[e.dashboardCode,e.parameters]),t.jsx(t.Fragment,{children:i?t.jsxs(t.Fragment,{children:[t.jsxs(s.Box,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.IconButton,{onClick:()=>{p(-1,{replace:!0})},children:t.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(m.FontAwesomeIcon,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),t.jsx(s.Box,{children:i?.dashboardTitle}),t.jsx(s.Box,{sx:{flex:1}})]}),i?.dashboardParameters.length>0?t.jsx(r,{searchBtnClickCallBk:async e=>{l(a+1)}}):t.jsx(t.Fragment,{}),t.jsx(s.Grid2,{container:!0,spacing:1,sx:{height:"fit-content",overflowY:"auto",padding:1},children:i?.widgets.map((e,i)=>t.jsx(s.Grid2,{sx:{alignItems:"center",justifyContent:"center",padding:1,display:"flex",overflow:"auto",flexDirection:"Card"!=e.widgetType?"column":void 0,height:e?.height||300},size:{md:e?.width,sm:12},children:t.jsx(Ko,{...e,parameterValues:n,loadWidget:c})},i))})]}):t.jsx(s.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},zo=()=>{const{dashboardCode:e}=_.useParams();return t.jsx(Vo,{dashboardCode:e})},Qo=e=>{const{UserSession:o}=we(),r=i.useSelector(e=>e.AppLayout),n=i.useDispatch(),{handlePostRequest:a}=Re(),[l,c]=d.useState(o.value.currentOrganization.id);return t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[t.jsx(qe,{sx:{width:"100%"},displayField:"ltr"===r.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:o.value.userOrganizations,value:l,onChangeCallBack:e=>{c(e)}}),t.jsx(s.Button,{sx:{m:1},variant:"contained",disabled:null==l||l===o.value.currentOrganization.id,onClick:async()=>{await a({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:o.value.username,orgId:l},data:{},successCallBkFn:t=>{const i={...t.data,isAuthenticated:!0};n(Ce.setAuthenticated(i)),e.successChangeCallBackFn&&e.successChangeCallBackFn()}})},children:"Change Organization"})]})},$o=f.createSlice({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:Zo,setSideBarState:Jo}=$o.actions;var Xo=$o.reducer;function er(e,t){const i=d.useRef(e);d.useEffect(()=>{i.current=e},[e]),d.useEffect(()=>{const e=setInterval(()=>i.current?.(),t);return()=>clearInterval(e)},[t])}const tr=s.keyframes`
|
|
31
|
+
function(e,t){const i=ne(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const o=`"${e}"`;return 0===t.length?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some(e=>void 0===e)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),i(...t)}:i}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Zi),s=ce.forwardRef(function(e,s){const l=function(e=eo){return Xi(e)}(o),{className:d,component:c="div",...u}=to(e);return t.jsx(a,{as:c,ref:s,className:no(d,n?n(r):r),theme:i&&l[i]||l,...u})});return s}({defaultClassName:function(e,t,i="Mui"){const o={};return t.forEach(t=>{o[t]=function(e,t,i="Mui"){const o=ao[t];return o?`${i}-${o}`:`${oo.generate(e)}-${t}`}(e,t,i)}),o}("MuiBox",["root"]).root,generateClassName:oo.generate});function lo(e){return"number"==typeof e&&!isNaN(e)}function co(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function uo(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function po(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function ho(e,t){const i=new Date(e),o=new Date,r=Math.floor((i-o)/1e3),n="rtl"===t?"ar":"en",a=new Intl.RelativeTimeFormat(n,{numeric:"auto"}),s=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(const{unit:e,seconds:t}of s){const i=Math.floor(r/t);if(Math.abs(i)>1)return a.format(i,e)}return"ar"===n?"الآن":"just now"}"production"!==process.env.NODE_ENV&&(so.propTypes={children:Dt.node,component:Dt.elementType,sx:Dt.oneOfType([Dt.arrayOf(Dt.oneOfType([Dt.func,Dt.object,Dt.bool])),Dt.func,Dt.object])});const mo=e=>{if(e?.fieldInfo){const i=e.fieldInfo,o=e?.formManager||null,r=e?.formActions||null,n=e?.formValues||null,a=e?.fieldInfo?.fieldName||null,l=e?.fieldInfo?.fieldType||null;if(!(i&&o&&n&&a&&l))return t.jsx(t.Fragment,{});const d=()=>e?.fieldInfo?.formProps?.fieldLabelFn?e.fieldInfo.formProps.fieldLabelFn(n):e?.fieldInfo?.fieldLabel?e?.fieldInfo?.fieldLabel:void 0;return e.hiddenFields.includes(a)?t.jsx(t.Fragment,{}):t.jsx(s.Grid2,{size:i?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===l||"number"===l?t.jsx(De,{...i.muiTextFieldProps,fullWidth:!0,type:l,disabled:e.disabledFields.includes(a),label:d(),value:n[a],onChange:t=>{let i=null;""!=t.target.value&&(i="number"===l&&co(t.target.value)?Number(t.target.value):t.target.value),o.setValue(a,i),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,i)},sx:{"& .MuiInputBase-root":{height:`${i?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...i?.formProps?.style,display:e.hiddenFields.includes(a)?"none":void 0},error:null!=o.formState.errors[a],helperText:o?.formState?.errors[a]?.message?.toString()}):"date"===i?.fieldType?t.jsx(Ve,{format:i?.dateFormat||je,sx:i?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),label:d(),onChangeCallBack:t=>{o.setValue(a,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,t)},value:n[a],error:null!=o.formState.errors[a],errorMessage:o?.formState?.errors[a]?.message?.toString()}):"datetime"===i?.fieldType?t.jsx(ze,{format:i?.dateFormat||Ge,sx:i?.formProps?.style||{width:"100%"},disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),label:d(),onChangeCallBack:t=>{o.setValue(a,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,t)},value:n[a],error:null!=o.formState.errors[a],errorMessage:o?.formState?.errors[a]?.message?.toString()}):"checkbox"===i?.fieldType?t.jsx(Be,{label:d(),onChangeCallBack:t=>{o.setValue(a,t),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,t)},value:n[a],checkedValue:i?.checkedValue||!0,unCheckedValue:i?.unCheckedValue||!1,disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),sx:i?.formProps?.style}):"combobox"===i?.fieldType?t.jsx(qe,{sx:i?.formProps?.style||{width:"100%"},label:d(),commonStoreKey:i?.commonStoreKey,dataQueryId:i?.dataQueryId,storeUrl:i?.storeUrl,storeLoadParam:i?.storeLoadParam,disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),onChangeCallBack:(t,i)=>{let s=null;t&&(s=t),o.setValue(a,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,t,i)},options:i?.options||[],displayField:i?.optionDisplayField||"",valueField:i?.optionValueField||"",value:n[a],errorMessage:o?.formState?.errors[a]?.message?.toString()}):"lookup"===i?.fieldType?t.jsx(Qe,{sx:i?.formProps?.style||{width:"100%"},label:d(),disabled:e.disabledFields.includes(a),hidden:e.hiddenFields.includes(a),onChangeCallBack:(t,i)=>{let s=null;t&&(s=t),o.setValue(a,s),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk(n,r,o,a,t,i)},lookupType:i.lookupType,value:n[a],errorMessage:o?.formState?.errors[a]?.message?.toString()}):null})}return t.jsx(t.Fragment,{})},fo=e=>{const i=we(),{ConfirmationWindow:o,setOpen:r}=be({body:e?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{e?.actionFn(e?.record)}});return null==e?.authority||i.isUserAuthorized(e.authority)?t.jsxs(t.Fragment,{children:[t.jsx(o,{}),t.jsxs(s.Button,{variant:e?.formActionProps?.actionButtonVariant,color:e?.formActionProps?.actionButtonColor,onClick:()=>{if(e?.actionFn){if(e?.preActionValidation&&!e.preActionValidation(e.record))return;!0===e?.isConfirmationRequired?r(!0):e?.actionFn(e.record)}},children:[e?.icon?t.jsx(m.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx("div",{children:e?.label})]})]}):t.jsx(t.Fragment,{})},go=e=>{const{t:i}=y.useTranslation();return t.jsx(t.Fragment,{children:t.jsxs(s.Grid2,{container:!0,sx:e?.style,alignItems:"flex-start",children:[e?.label?t.jsx(s.Grid2,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:e?.icon?t.jsxs(t.Fragment,{children:[t.jsx(m.FontAwesomeIcon,{icon:e.icon,style:{marginRight:5,marginLeft:5}}),t.jsx("div",{children:i(e.label)})]}):t.jsx(t.Fragment,{children:i(e.label)})}):t.jsx(t.Fragment,{}),e?.elements?e.elements.map(i=>"group"===i.type?t.jsx(go,{...i.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields,formValuesChangeCallBk:e?.formValuesChangeCallBk}):"field"===i.type&&"props"===i.mode?t.jsx(mo,{fieldInfo:i.props,formManager:e.formManager,formValues:e.formValues,formActions:e.formActions,hiddenFields:e.hiddenFields,disabledFields:e.disabledFields,formValuesChangeCallBk:e?.formValuesChangeCallBk}):"field"===i.type&&"node"===i.mode?t.jsx(s.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:t.jsx(i.node,{formManager:e.formManager,formValues:e.formValues,formActions:e.formActions})}):void 0):null,e?.actions?t.jsx(s.Grid2,{size:{sm:12},sx:{padding:1},children:e.actions.map(i=>t.jsx(fo,{...i,record:e.formValues}))}):t.jsx(t.Fragment,{})]})})},To=e=>{const o=i.useSelector(e=>e.AppInfo.value.apiBaseUrl),[r,n]=d.useState(null);return d.useEffect(()=>{e?.refKey&&(()=>{let t=o+"/api/v1/attachment/";e?.attachmentId?t+="download?attachmentId="+e.attachmentId:(t+=`downloadImage?attachmentCode=${e.attachmentCode}&refKey=${e.refKey}`,e?.category&&(t+=`&category=${e.category}`)),n(t)})()},[e.refKey]),e?.showAsAvatar?t.jsx(s.Avatar,{sx:e.style,onError:()=>{n(e?.onErrorImage?e.onErrorImage:"/no_image.png")},src:r}):t.jsx("img",{src:r,loading:"lazy",alt:"image",onError:()=>{n(e?.onErrorImage?e.onErrorImage:"/no_image.png")},style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})},Ao=e=>{const{handleGetRequest:i,handleDeleteRequest:o}=Re(),{isUserAuthorized:r}=we();let n=!0;e?.downloadAuthorityKey&&(n=r(e.downloadAuthorityKey));const{ConfirmationWindow:a,setOpen:l}=be({title:"Confirmation",body:"Are you sure you want to delete this attachment?",onConfirmationCallBk:()=>{(async()=>{await o({endPointURI:"api/v1/attachment/archive",parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey,attachmentId:e.id},successCallBkFn:t=>{e.setAttachmentConfig(t.data)},showMask:!0})})()}});return t.jsxs(t.Fragment,{children:[t.jsx(a,{}),t.jsxs(N,{sx:{width:300,border:"0.5px solid gray"},children:[t.jsx(U,{sx:{height:140,width:300,display:"flex",alignItems:"center",justifyContent:"center"},children:e?.docType.toLocaleLowerCase().includes("image")?t.jsx(To,{attachmentId:e.id}):t.jsx(m.FontAwesomeIcon,{icon:"file",size:"3x"})}),t.jsxs(k,{children:[t.jsx(F,{gutterBottom:!0,variant:"h6",component:"div",children:e.fileName}),t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`File Size: ${e?.attachmentSize||"unknown"} kb`}),t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`File Type: ${e?.category||"NA"}`}),t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:e.remark})]}),t.jsxs(D,{children:[e?.allowDelete?t.jsx(s.IconButton,{size:"small",onClick:()=>{l(!0)},children:t.jsx(s.Tooltip,{title:"Delete Attachment",children:t.jsx(m.FontAwesomeIcon,{icon:"trash"})})}):t.jsx(t.Fragment,{}),t.jsx("div",{style:{flex:1}}),n?t.jsx(s.IconButton,{size:"small",onClick:async()=>{await i({endPointURI:"api/v1/attachment/download",parameters:{attachmentId:e.id},showMask:!0,responseType:"blob",successCallBkFn:t=>{const i=window.URL.createObjectURL(new Blob([t.data])),o=document.createElement("a");o.href=i,o.setAttribute("download",e.fileName),document.body.appendChild(o),o.click(),o.remove()}})},children:t.jsx(s.Tooltip,{title:"Download Attachment",children:t.jsx(m.FontAwesomeIcon,{icon:"download"})})}):t.jsx(t.Fragment,{})]})]})]})},yo=e=>{const{handleUploadRequest:i,handleGetRequest:o}=Re(),[r,n]=d.useState(null),[a,l]=d.useState([]),[c,u]=d.useState(null),[p,h]=d.useState(null),[f,T]=d.useState([]),[A,y]=d.useState(null),{isUserAuthorized:I}=we(),_=e=>e.split(".").pop()?.toLowerCase()||"";d.useEffect(()=>{(async()=>{await o({endPointURI:"api/v1/attachment/info",showMask:!0,parameters:{attachmentCode:e.attachmentCode,refKey:e.refKey},successCallBkFn:e=>{y(e.data)}})})()},[e.refKey,e.attachmentCode]),d.useEffect(()=>{if(T(A?.allowedFileTypes?A.allowedFileTypes.split(","):[]),A?.attachmentCategories){const e=[];for(const t of A.attachmentCategories.split(","))e.push({value:t});l(e)}else l([])},[A]);let E=!0;A?.downloadAuthorityKey&&!I(A?.downloadAuthorityKey)&&(E=!1);let O=!0;return!1===e?.enableAttachment&&(O=!1),A?.uploadAuthorityKey&&!I(A.uploadAuthorityKey)&&(O=!1),t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",width:"100%",minHeight:400,alignItems:"center",justifyContent:"flex-start",overflow:"hidden",flexGrow:1},children:[O?t.jsx(t.Fragment,{children:null==A?.maxAllowedNumberOfFiles||A?.maxAllowedNumberOfFiles>A.refKeyAttachments.length?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(m.FontAwesomeIcon,{icon:"paperclip",style:{marginRight:10,marginLeft:10}}),"Attachment Uploader"]}),t.jsx("input",{type:"file",style:{margin:20},accept:A?.allowedFileTypes,multiple:!0,onChange:e=>{if(e.target.files)for(const t of e.target.files){const e=_(t.name);if(f.length>0&&!f.includes(e))return void g.toast.error(e+" is not allowed")}n(e.target.files)}}),a.length>0?t.jsx(qe,{label:"Attachment Type",sx:{width:300,m:1},options:a,displayField:"value",valueField:"value",value:p,onChangeCallBack:e=>{h(e)}}):t.jsx(t.Fragment,{}),t.jsx(De,{label:"Remark",value:c,onChange:e=>u(e.target.value),multiline:!0,sx:{width:300,m:1},rows:3}),t.jsx(s.Button,{sx:{m:1},variant:"contained",onClick:async()=>{let t=A?.refKeyAttachments.length||0;if(A?.maxAllowedNumberOfFiles&&r.length+t>A.maxAllowedNumberOfFiles)g.toast.error("Maximum number of attachments is "+A.maxAllowedNumberOfFiles);else if(!0===A?.isCategoryRequired&&a.length>0&&(null==p||void 0===p||""===p))g.toast.error("You must selected document type to process your request");else if(r){for(const e of r)if(e.type.startsWith("image/")){const t=600,i=1024*t;if(e.size>i)return void g.toast.error(`File ${e.name} is too large. Max allowed is ${t}KB.`)}await i({endPointURI:"api/v1/attachment/upload",showMask:!0,loadingMessage:"Uploading files ... please wait",parameters:{refKey:e.refKey,attachmentCode:e.attachmentCode,remark:c,category:p},files:r,successCallBkFn:e=>{y(e.data),n(null),h(null),u(null),g.toast.success("Your request has been process successfully")}})}else g.toast.error("You must add files to upload")},children:"Upload"})]}):t.jsx(t.Fragment,{})}):t.jsx(t.Fragment,{}),E&&A?.refKeyAttachments?.length>0?t.jsxs(t.Fragment,{children:[t.jsxs("h3",{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"paperclip"}),"Attachments"]}),t.jsx(s.Grid2,{container:!0,spacing:2,sx:{overflow:"auto",padding:1,justifyContent:"center"},children:A?.refKeyAttachments.map(i=>t.jsx(s.Grid2,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:t.jsx(Ao,{...i,attachmentCode:e.attachmentCode,setAttachmentConfig:y,downloadAuthorityKey:A.downloadAuthorityKey,allowDelete:O})}))})]}):t.jsx(t.Fragment,{})]})},Io=e=>{const o=i.useSelector(e=>e.AppLayout),{t:r}=y.useTranslation();return t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",width:600,padding:1,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(s.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(m.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),r("WF_ACTION_HISTORY_LABEL")]}),t.jsx(s.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:e.actionHistory.map((i,r)=>t.jsx(t.Fragment,{children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginBottom:2},children:[t.jsxs(s.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},children:[t.jsx(s.Box,{sx:{marginBottom:.2},children:i.actionTime}),t.jsxs(F,{children:["via ",i.actionMethod]})]}),t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:2,marginLeft:2},children:[t.jsx(To,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:i?.personId?i?.personId+"":void 0,style:{m:1,width:70,height:70}}),r!==e.actionHistory.length-1?t.jsx(s.Box,{sx:{marginTop:11,position:"absolute"},children:"|"}):t.jsx(t.Fragment,{})]}),t.jsxs(s.Box,{sx:{display:"flex",flex:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsxs(s.Box,{sx:{width:"100%"},children:["ltr"===o.appDirection?`${i?.documentActionEnName}`:`${i?.documentActionArName}`,i?.actionComment?" - "+i.actionComment:""]}),t.jsx(s.Box,{sx:{width:"100%"},children:"ltr"===o.appDirection?`${i?.employeeEnName}`:`${i?.employeeArName}`})]})]})}))})]})},_o=e=>{const{t:i}=y.useTranslation(),o=we(),{ConfirmationWindow:r,setOpen:n}=be({body:i(e?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(e?.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn)),e?.reloadData&&e.reloadData()}});let a=!0;if(e.authority&&(a=o.isUserAuthorized(e.authority)),a)return t.jsxs(t.Fragment,{children:[t.jsx(r,{}),t.jsxs(s.Button,{onClick:async()=>{if(e?.recordsToProcessActionOn&&e?.recordsToProcessActionOn.length>0){if(e?.preActionValidation)for(const t of e.recordsToProcessActionOn)if(!e.preActionValidation(t))return;!0===e?.isConfirmationRequired?n(!0):(await e.actionFn(e.recordsToProcessActionOn,e.recordIdsToProcessActionOn),e?.reloadData&&e.reloadData())}else g.toast.error(i("AT_LEAST_ONE_RECORD_SELECTED_MESSAGE"))},variant:e?.label?"outlined":e?.formActionProps?.actionButtonVariant?e.formActionProps.actionButtonVariant:"text",size:"small",color:e?.formActionProps?.actionButtonColor||"primary",children:[e?.icon?t.jsx(m.FontAwesomeIcon,{style:{marginRight:5,marginLeft:5},icon:e.icon}):t.jsx(t.Fragment,{}),e?.label?i(e.label):t.jsx(t.Fragment,{})]})]})},Eo=s.styled(e.QuickFilter)({display:"grid",alignItems:"center"}),Oo=s.styled(e.ToolbarButton)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:t.expanded?0:1,pointerEvents:t.expanded?"none":"auto",transition:e.transitions.create(["opacity"])})),Co=s.styled(s.TextField)(({theme:e,ownerState:t})=>({gridArea:"1 / 1",overflowX:"clip",width:t.expanded?260:"var(--trigger-width)",opacity:t.expanded?1:0,transition:e.transitions.create(["width","opacity"])})),No=i=>{const{t:o}=y.useTranslation(),r=we(),n=!i?.templateProps?.editAction?.authority||r.isUserAuthorized(i.templateProps.editAction.authority),a=rt(i?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},i?.templateProps?.data||[],i?.templateProps?.keyColumnName||"id");return t.jsxs(e.Toolbar,{children:[n&&"none"!=i?.templateProps?.editMode?.editMode&&(void 0===i?.templateProps?.hideCreateBtn||!1===i?.templateProps?.hideCreateBtn)?t.jsxs(s.Button,{onClick:i?.handleCreateNewRecord,children:[t.jsx(m.FontAwesomeIcon,{icon:"add",style:{marginRight:5,marginLeft:5}}),o("ADD_BTN_LABEL")]}):t.jsx(t.Fragment,{}),i?.templateProps?.rowActions?i.templateProps.rowActions.map((e,t)=>!0===e?.gridActionProps?.multiRecord?d.createElement(_o,{...e,key:t,reloadData:async()=>{i.templateProps.apiActions.reloadData(i?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:a.selectedRecordIds,recordsToProcessActionOn:a.selectedRecords}):null):t.jsx(t.Fragment,{}),t.jsx(s.Box,{sx:{flex:1,mx:.5,my:.5,padding:1},children:i?.templateProps?.tBar}),t.jsx(s.Tooltip,{title:"Columns",children:t.jsx(e.ColumnsPanelTrigger,{render:t.jsx(e.ToolbarButton,{}),children:t.jsx(e.GridViewColumnIcon,{fontSize:"small"})})}),t.jsx(s.Tooltip,{title:"Filters",children:t.jsx(e.FilterPanelTrigger,{render:(i,o)=>t.jsx(e.ToolbarButton,{...i,color:"default",children:t.jsx(s.Badge,{badgeContent:o.filterCount,color:"primary",variant:"dot",children:t.jsx(e.GridFilterListIcon,{fontSize:"small"})})})})}),i?.templateProps?.gridStateKey?t.jsx(s.Tooltip,{title:o("RESET_GRID_STATE"),children:t.jsx(s.IconButton,{onClick:i?.clearGridState,children:t.jsx(m.FontAwesomeIcon,{icon:"eraser"})})}):t.jsx(t.Fragment,{}),t.jsx(s.Divider,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),t.jsx(s.Tooltip,{title:o("EXPORT_EXECL_LABEL"),children:t.jsx(e.ExportExcel,{render:t.jsx(s.MenuItem,{}),children:t.jsx(m.FontAwesomeIcon,{icon:"file-excel",color:"green"})})}),t.jsxs(Eo,{children:[t.jsx(e.QuickFilterTrigger,{render:(e,i)=>t.jsx(s.Tooltip,{title:o("SEARCH_BTN_LABEL"),enterDelay:0,children:t.jsx(Oo,{...e,ownerState:{expanded:i.expanded},color:"default","aria-disabled":i.expanded,children:t.jsx(m.FontAwesomeIcon,{icon:"search"})})})}),t.jsx(e.QuickFilterControl,{render:({ref:i,...r},n)=>t.jsx(Co,{...r,ownerState:{expanded:n.expanded},inputRef:i,"aria-label":"Search",placeholder:`${o("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:t.jsx(s.InputAdornment,{position:"start",children:t.jsx(m.FontAwesomeIcon,{icon:"search"})}),endAdornment:n.value?t.jsx(s.InputAdornment,{position:"end",children:t.jsx(e.QuickFilterClear,{edge:"end",size:"small","aria-label":"Clear search",children:t.jsx(m.FontAwesomeIcon,{icon:"xmark"})})}):null,...r.slotProps?.input},...r.slotProps}})})]}),t.jsx(s.IconButton,{onClick:()=>{i.templateProps.apiActions.reloadData(i?.templateProps?.gridLoadParametersValues)},children:t.jsx(m.FontAwesomeIcon,{icon:"refresh"})})]})},Ro=i=>{const{t:o}=y.useTranslation(),r=we(),{ConfirmationWindow:n,setOpen:a}=be({body:o(i?.confirmationMessage||"ACTION_CONFIRMATION"),title:o("CONFIRMATION"),onConfirmationCallBk:async()=>{await(i?.actionFn(i.record)),i?.reloadData&&i.reloadData()}});let l=!0;i.authority&&(l=r.isUserAuthorized(i.authority));let d={};i?.getActionIconStyleForRecord&&(d=i.getActionIconStyleForRecord(i.record));let c=!0;i?.isActionVisibleForRecord&&(c=i?.isActionVisibleForRecord(i.record));let u=!1;if(i?.isActionDisabledForRecord&&(u=i.isActionDisabledForRecord(i.record)),l&&c)return t.jsxs(t.Fragment,{children:[t.jsx(n,{}),t.jsx(e.GridActionsCellItem,{disabled:u,icon:t.jsx(s.Tooltip,{title:i?.label?o(i.label):"",children:t.jsx(m.FontAwesomeIcon,{icon:i.icon,style:{...d,color:u?"gray":null!=d?.color?d.color:void 0}})}),showInMenu:i?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!u){if(i?.preActionValidation&&!i.preActionValidation(i.record))return;!0===i?.isConfirmationRequired?a(!0):(await i.actionFn(i.record),!0===i?.gridActionProps?.reloadGridAfterAction&&i?.reloadData&&i.reloadData())}}})]})};let bo=-1;const wo=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},So=(e,t)=>{const i=wo(e);localStorage.setItem(e,JSON.stringify({...i,...t}))},Po=["__check__","actions"],vo=o=>{const{t:r}=y.useTranslation(),n=i.useSelector(e=>e.AppLayout),[a,l]=d.useState({}),[c,u]=d.useState(!0),{getLookupOptions:p}=(()=>{const{handleGetRequest:e}=Re(),t=i.useSelector(e=>e.AppLayout),o=async t=>{let i=[];return await e({endPointURI:"api/v1/public/system/lookup",showMask:!0,parameters:{lookupType:t},successCallBkFn:e=>{i=e.data}}),i};return{generateLookupGridColumn:async e=>{let i=await o(e.lookupType);return{...e,options:i,displayField:"ltr"===t.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:o}})(),{Window:h,setWindowState:f}=Se({windowTitle:r(o.gridTitle)+" Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:"50%",onCloseCallBack:()=>{o?.apiActions?.reloadData(o.gridLoadParametersValues)}}),{Window:T,setWindowState:A}=Se({windowTitle:r(o.gridTitle)+" Approvals",windowIcon:"stamp",height:"fit-content",minHeight:500,width:"fit-content",onCloseCallBack:()=>{o?.apiActions?.reloadData(o.gridLoadParametersValues)}}),[I,E]=d.useState([]),C=tt(o.formElements),N=[],R=d.useMemo(()=>o?.gridStateKey?wo(o.gridStateKey):{},[]);for(const e of C)!0===e?.gridProps?.hidden&&N.push(e.fieldName);let b={};if(R?.columnVisibilityModel){b=R.columnVisibilityModel;const e=Object.keys(b);for(const t of N)e.includes(t)||(b[t]=!1)}else for(const e of N)b[e]=!1;const w=i.useSelector(e=>e.AppLayout.appDirection),[S,P]=d.useState(b),[v,L]=d.useState(R.columnOrder||[]),[M,x]=d.useState(R.columnWidths||{}),[D,k]=d.useState(R.columnGroupingModel||[]);let U=R?.pinnedColumns?.left||[];U=U.filter(e=>!Po.includes(e));let F=R?.pinnedColumns?.right||[]||[];F=F.filter(e=>!Po.includes(e));const[B,q]=d.useState({left:[..."ltr"===w?Po:[],...U],right:[..."rtl"===w?Po:[],...F]}),j=we(),G=_.useNavigate(),[W,H]=d.useState(null),[Y,K]=d.useState(null),[V,z]=d.useState({}),Q=async()=>{let e=it(C,"row"===o?.editMode?.editMode||!1,r);for(let t of e)t?.lookupType&&(t.displayField="ltr"===n.appDirection?"lookupEnDisplay":"lookupArDisplay",t.options=await p(t.lookupType),t.valueField="lookupValue");E(e)},[$,Z]=d.useState({ids:new Set,type:"include"});let J="id";o?.keyColumnName&&(J=o?.keyColumnName);const X=o.setData;let ee=null;ee=o?.validationSchema?o.validationSchema:O.z.object(ot(C));let te=!0;o?.editAction?.authority&&(te=j.isUserAuthorized(o.editAction.authority));let ie=!0;o?.deleteAction?.authority&&(ie=j.isUserAuthorized(o.deleteAction.authority));const{ConfirmationWindow:oe,setOpen:re}=be({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let e=!0;W&&!0===W?.isNew||(e=await o.apiActions.deleteRecordById(W[J])),e&&(o?.deleteAction?.postActionCallBack&&await o.deleteAction.postActionCallBack(W),X(e=>e.filter(e=>e[J]!=W[J])))}});let ne,ae,se,le,de,ce;"modal"===o?.editMode?.editMode&&(ne=o?.editMode?.specs?.modalHeight||"fit-content",ae=o?.editMode?.specs?.modalWidth||"300",se=o?.editMode?.specs?.modalMinHeight,le=o?.editMode?.specs?.modalMinWidth,de=o?.editMode?.specs?.modalIcon||"window",ce=o?.editMode?.specs?.modalTitle||"Record Form");const{Window:ue,setWindowState:pe}=Se({height:ne,minHeight:se,minWidth:le,onCloseCallBack:()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)},width:ae,windowIcon:de,windowTitle:ce}),he={type:"actions",field:"actions",headerName:"",headerAlign:"center",width:(o?.rowActions?30*o.rowActions.length:0)+(o?.editAction&&o?.editAction?.isEnabled?30:0)+(o?.deleteAction&&o?.deleteAction?.isEnabled?30:0)+(o?.attachment?30:0)+(o?.workFlowDocumentCode?30:0),getActions:i=>{const n=i.row,a=[];if("none"!=o?.editMode?.editMode&&(void 0===o?.disableDefaultAction||!o.disableDefaultAction)){const i=V[n[J]]?.mode===e.GridRowModes.Edit;if("row"===o.editMode.editMode&&i)te&&(a.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(m.FontAwesomeIcon,{icon:"save"}),label:r("SAVE_BTN_LABEL"),onClick:()=>{(t=>{const i=t[J];z({...V,[i]:{mode:e.GridRowModes.View}})})(n)}})),a.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(m.FontAwesomeIcon,{icon:"cancel"}),label:r("CANCEL_BTN_LABEL"),onClick:()=>{(t=>{const i=t[J];i&&lo(i)&&i<0?(z({...V,[i]:{mode:e.GridRowModes.View,ignoreModifications:!0}}),X(e=>{const t=e.filter(e=>e[J]!=i);return t})):z({...V,[i]:{mode:e.GridRowModes.View,ignoreModifications:!0}})})(n)},color:"inherit"})));else{if(o?.editAction&&!0===o?.editAction?.isEnabled){let i=!0;o?.editAction?.isActionVisibleForRecord&&(i=o?.editAction?.isActionVisibleForRecord(n));let l=!1;o?.editAction?.isActionDisabledForRecord&&(l=o?.editAction?.isActionDisabledForRecord(n)),te&&i&&a.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(s.Tooltip,{title:r("EDIT_BTN_LABEL"),children:t.jsx(m.FontAwesomeIcon,{icon:"edit",style:{color:l?"gray":void 0}})}),showInMenu:o?.editAction?.gridActionProps?.showInMenu||!1,label:r("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{te&&!l&&(async t=>{if(t)if(K(t),"form"===o.editMode.editMode)G(o.editMode.specs.formRoute+"/"+t[J]);else if("modal"===o.editMode.editMode)pe(!0);else if("row"===o?.editMode?.editMode){const i=t[J];z({...V,[i]:{mode:e.GridRowModes.Edit}})}})(n)}}))}if(o?.deleteAction&&!0===o?.deleteAction?.isEnabled){let i=!0;o?.deleteAction?.isActionVisibleForRecord&&(i=o?.deleteAction?.isActionVisibleForRecord(n));let l=!1;o?.deleteAction?.isActionDisabledForRecord&&(l=o?.deleteAction?.isActionDisabledForRecord(n)),ie&&i&&a.push(t.jsx(e.GridActionsCellItem,{disabled:l,icon:t.jsx(s.Tooltip,{title:r("DELETE_BTN_LABEL"),children:t.jsx(m.FontAwesomeIcon,{icon:"trash",style:{color:l?"gray":void 0}})}),showInMenu:o?.deleteAction?.gridActionProps?.showInMenu||!1,label:r("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(ie&&!l){if(o?.deleteAction?.preActionValidation&&!o.deleteAction.preActionValidation(n))return;H(n),re(!0)}}}))}}}if(n[o?.keyColumnName||"id"]&&n[o?.keyColumnName||"id"]>0&&o?.attachment&&a?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(s.Tooltip,{title:"Attachments",children:t.jsx(m.FontAwesomeIcon,{icon:"paperclip"})}),label:"Attachments",className:"textPrimary",color:"inherit",onClick:()=>{l(n),u(!o?.attachment?.enableAttachFn||o.attachment.enableAttachFn(n)),f(!0)}})),n[o?.keyColumnName||"id"]&&n[o?.keyColumnName||"id"]>0&&o?.workFlowDocumentCode&&a?.push(t.jsx(e.GridActionsCellItem,{icon:t.jsx(s.Tooltip,{title:"Approvals",children:t.jsx(m.FontAwesomeIcon,{icon:"stamp"})}),label:"Approvals",className:"textPrimary",color:"inherit",onClick:()=>{l(n),A(!0)}})),n[o?.keyColumnName||"id"]&&n[o?.keyColumnName||"id"]>0&&o?.rowActions)for(const e of o.rowActions)e?.gridActionProps?.multiRecord&&!0===e?.gridActionProps?.multiRecord||a.push(t.jsx(Ro,{...e,record:n,reloadData:async()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)}}));return a}};let me=[];(void 0===o?.disableDefaultAction||!o.disableDefaultAction||o?.rowActions&&o?.rowActions.length>0)&&me.push(he),me=[...me,...I];d.useEffect(()=>{void 0!==o?.autoLoad&&!0!==o.autoLoad||o.apiActions.reloadData(o?.gridLoadParametersValues),Q()},[]),d.useEffect(()=>{o.apiActions.reloadData(o?.gridLoadParametersValues)},[j.UserInfo?.currentOrganization]),d.useEffect(()=>{Q()},[w,o.formElements]);const fe=d.useMemo(()=>{const e=me.map(e=>({...e}));if(v.length){const t=new Map(e.map(e=>[e.field,e]));return v.map(e=>t.get(e)).filter(Boolean)}return e},[v,M,me]);return t.jsxs(t.Fragment,{children:[t.jsx(oe,{}),"modal"===o?.editMode?.editMode?t.jsx(ue,{children:o?.editMode?.specs?.formComponent?t.jsx(o.editMode.specs.formComponent,{recordIdToEdit:Y?Y[J]:void 0,formCloseCallBk:()=>{pe(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)}}):t.jsx(Uo,{keyColumnName:o.keyColumnName,attachment:o.attachment,formValuesChangeCallBk:o?.formProps?.formValuesChangeCallBk,recordIdToEdit:Y?Y[J]:void 0,formCloseCallBk:()=>{pe(!1),o.apiActions.reloadData(o?.gridLoadParametersValues)},elements:o.formElements,apiActions:o.apiActions,editAuthorityKey:o?.editAction?.authority,formSavedSuccessfullyCallBk:o?.editAction?.postActionCallBack,preSaveValidation:o?.editAction?.preActionValidation,actions:o?.rowActions})}):t.jsx(t.Fragment,{}),void 0!==o?.hideInfoBar||o?.hideInfoBar?t.jsx(t.Fragment,{}):t.jsxs(s.Box,{sx:{display:"flex"},children:[void 0!==o?.hideBackButton||o?.hideBackButton?t.jsx(t.Fragment,{}):t.jsx(s.IconButton,{onClick:()=>{G(-1,{replace:!0})},children:t.jsx(m.FontAwesomeIcon,{icon:"ltr"===w?"arrow-left":"arrow-right"})}),t.jsxs(s.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[o?.girdIcon?t.jsx(m.FontAwesomeIcon,{icon:o.girdIcon,style:{marginRight:5,marginLeft:5}}):t.jsx(t.Fragment,{}),t.jsx(s.Typography,{variant:"h5",children:o?.gridTitle?uo(r(o?.gridTitle)):""})]})]}),o?.gridLoadParameters&&o?.gridLoadParameters.length>0&&o?.gridLoadParametersValues&&o?.setGridLoadParametersValues?t.jsxs(s.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(s.AccordionSummary,{expandIcon:t.jsx(e.GridExpandMoreIcon,{}),children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(s.Typography,{component:"span",children:"Filters"})]})}),t.jsx(s.AccordionDetails,{children:t.jsx(s.Box,{children:t.jsx(Uo,{saveButtonSpecs:{label:r("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:r("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{null!=e?o.setGridLoadParametersValues(e):o.setGridLoadParametersValues({}),o.apiActions.reloadData(e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:o.gridLoadParameters})})})]}):t.jsx(t.Fragment,{}),o?.attachment?t.jsx(h,{children:t.jsx(yo,{attachmentCode:o.attachment.attachmentCode,refKey:a[o?.keyColumnName||"id"],enableAttachment:c})}):t.jsx(t.Fragment,{}),o?.workFlowDocumentCode?t.jsx(T,{children:t.jsx(ko,{workFlowDocumentCode:o.workFlowDocumentCode,refDocumentId:a[o?.keyColumnName||"id"],postActionCallBk:()=>{A(!1),o.apiActions.reloadData(o.gridLoadParametersValues)},cancelActionCallBk:()=>{A(!1),o.apiActions.reloadData(o.gridLoadParametersValues)}})}):t.jsx(t.Fragment,{}),t.jsx(e.DataGridPremium,{...o?.muiProps,slots:{toolbar:No},slotProps:{toolbar:{templateProps:{...o,rowSelectionModel:$,data:o?.data},handleCreateNewRecord:()=>{if("form"===o?.editMode?.editMode)G(o.editMode.specs.formRoute);else if("modal"===o?.editMode?.editMode)K(null),pe(!0);else if("row"===o?.editMode?.editMode){bo-=1;const t={};t[J]=bo,t.isNew=!0;for(const e of I)"actions"!=e?.type&&e?.field!=J&&e?.field&&(t[e.field]=null);X(e=>[t,...e]),z(t=>({...t,[bo]:{mode:e.GridRowModes.Edit}}))}},clearGridState:()=>{o?.gridStateKey&&localStorage.removeItem(o.gridStateKey),P({}),L([]),x({}),k([]),q({left:[..."ltr"===w?Po:[]],right:[..."rtl"===w?Po:[]]})}}},getRowId:e=>e[J],showToolbar:!0,rows:o?.data,columns:fe,checkboxSelection:!0,editMode:"row",onRowEditStop:(e,t)=>{"rowFocusOut"===e.reason&&(t.defaultMuiPrevented=!0)},rowModesModel:"row"==o.editMode.editMode?V:void 0,onRowModesModelChange:"row"==o.editMode.editMode?e=>{z(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async e=>{if("row"===o.editMode.editMode){let i=null;const r=(e=>{try{ee.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof O.z.ZodError?e.errors.map(e=>"Error in field ("+e.path+") : "+e.message).join(","):"invalid record data",t}})(e);if(r){const e=r.split(",");throw g.toast.error(t.jsx("div",{style:{},children:e.map(e=>t.jsxs(t.Fragment,{children:[t.jsx("div",{children:e}),t.jsx(s.Divider,{})]}))})),new Error(r)}if(o?.editAction?.preActionValidation&&!o.editAction.preActionValidation(e))throw new Error("error on the configured presave validation");const n={...e};if(e[J]&&lo(e[J])&&Number(e[J])<0&&(n[J]=null),i=await o.apiActions.saveRecord(n),null==i)throw new Error("Failed to process your request, contact your administrator");return o?.editAction?.postActionCallBack&&await o.editAction.postActionCallBack(e),!0===e?.isNew&&X(t=>{const o=t.filter(t=>t[J]!==e[J]);return[i,...o]}),!0===o?.editMode?.reloadAfterSave&&o?.apiActions?.reloadData&&o?.apiActions?.reloadData(o?.gridLoadParametersValues),i}},rowSelectionModel:$,onRowSelectionModelChange:e=>{Z(e)},columnVisibilityModel:S,onColumnVisibilityModelChange:e=>{P(e),o?.gridStateKey&&So(o.gridStateKey,{columnVisibilityModel:e})},onColumnOrderChange:e=>{const{column:t,targetIndex:i}=e;L(e=>{const r=e.length?[...e]:me.map(e=>e.field),n=r.indexOf(t.field);return-1===n||(r.splice(n,1),r.splice(i,0,t.field),o?.gridStateKey&&So(o.gridStateKey,{columnOrder:r})),r})},rowGroupingModel:D,onRowGroupingModelChange:e=>{(e=>{k(e),o?.gridStateKey&&So(o.gridStateKey,{columnGroupingModel:e})})(e)},sx:{width:"100%"}})]})},Lo=e=>{if(0===e.length)return[];const t=[];for(const i of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:i,fieldName:i,fieldType:"text"}};t.push(e)}return t},Mo=e=>{const[i,o]=d.useState([]);return d.useEffect(()=>{const t=e.reportData.map((e,t)=>({...e,report_record_data_key:t}));o(t)},[e.reportData]),t.jsx(vo,{data:i,disableDefaultAction:!0,setData:e.setReportData,formElements:Lo(e.reportData),gridLoadParameters:e.gridLoadParameters,gridLoadParametersValues:e.gridLoadParametersValues,setGridLoadParametersValues:e.setGridLoadParametersValues,editMode:{editMode:"none"},girdIcon:"file-excel",gridTitle:"Report",autoLoad:!0,keyColumnName:"report_record_data_key",hideInfoBar:!0,apiActions:{deleteRecordById:async()=>!0,loadRecordById:async()=>{},reloadData:async()=>{e.reloadReport()},saveRecord:async()=>{}}})},xo=e=>{console.log("useParameterPanel","useParameterPanel called");const[i,o]=d.useState({...e?.initialParameterValues}),r=((e,t)=>{const i=[];for(const o of e){const e={type:"field",mode:"props",props:{fieldLabel:o?.parameterLabel,fieldName:o?.parameterCode,fieldType:o?.parameterType,hidden:o?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:o?.mandatory,defaultValue:t[o?.parameterCode]||o?.defaultValue}};i.push(e)}return i})(e.parameters,i);return{ParameterPanel:({searchBtnClickCallBk:e})=>{const{t:n}=y.useTranslation();return t.jsxs(s.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[t.jsx(s.AccordionSummary,{expandIcon:t.jsx(m.FontAwesomeIcon,{icon:{prefix:"far",iconName:"square-caret-down"}}),children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),t.jsx(s.Typography,{component:"span",children:"Filters"})]})}),t.jsx(s.AccordionDetails,{children:t.jsx(s.Box,{children:t.jsx(Uo,{saveButtonSpecs:{label:n("Filter"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:n("RESET_BTN_LABEL"),icon:"eraser",hidden:!0,actionButtonVariant:"outlined",actionButtonColor:"error"},actions:[{label:n("RESET_BTN_LABEL"),icon:"eraser",isIdRequired:!1,formActionProps:{enabled:!0},actionFn:async(e,t)=>{o({})}}],apiActions:{deleteRecordById:async()=>!0,saveRecord:async t=>{o(null!=t?t:{}),e&&await e(i)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:r})})})]})},parametersValues:i,setParametersValues:o,panelElements:r}},Do=e=>{const[i,o]=d.useState(null),[r,n]=d.useState(null),[a,l]=d.useState([]),[c,u]=d.useState("WAITING_REPORT_CODE"),{handleGetRequest:p,handlePostRequest:h,HandleDownloadHTTPPostPDF:f}=Re(),[g,T]=d.useState(null),{ParameterPanel:A,parametersValues:y,panelElements:I,setParametersValues:_}=xo({parameters:g?.reportParameters||[],initialParameterValues:{...e?.reportParametersValues}}),E=async t=>{u("WAITING_RESULT"),"Excel"===g?.reportType?await h({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{u("SHOWING_RESULT"),l(e.data)}}):g?.reportType&&await f({endPointURI:"api/v1/public/report/run",showMask:!0,data:{reportCode:e.reportCode,parameters:t,resultMode:e.resultMode,jasperOutPutFileType:e.jasperOutPutFileType},successCallBkFn:e=>{u("SHOWING_RESULT");const t=e.headers["content-disposition"];let i="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(i=e[1])}if(i.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),i=URL.createObjectURL(t);o(i)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),o=window.URL.createObjectURL(t),r=document.createElement("a");r.href=o,r.download=i,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(o)}},failureCallBkFn:e=>{n("Failed To run report ... contact your administrator"),u("ERROR")}})};return d.useEffect(()=>{e?.reportCode&&(async()=>{u("LOADING_METADATA"),await p({endPointURI:"api/v1/public/report/metadata",showMask:!0,parameters:{reportCode:e.reportCode},successCallBkFn:t=>{T(t.data),!0===e?.byPassParameterEntry||0==t.data.reportParameters.length?(E(y),u("WAITING_RESULT")):u("WAITING_PARAMETER_INPUT")},failureCallBkFn:e=>{n("Failed loading report metadata ... contact your administrator"),u("ERROR")}})})()},[e.reportCode,e.byPassParameterEntry,e.reportParametersValues,e.jasperOutPutFileType,e.resultMode]),t.jsxs(t.Fragment,{children:[t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[t.jsxs(s.Box,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[t.jsx(m.FontAwesomeIcon,{icon:"Excel"===g?.reportType?"file-excel":"file-pdf",color:"Excel"===g?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),g?.reportName]}),"Excel"!=g?.reportType&&"SHOWING_RESULT"===c?t.jsxs(t.Fragment,{children:[!0===e?.byPassParameterEntry?t.jsx(t.Fragment,{}):g?.reportParameters.length>0?t.jsx(s.IconButton,{onClick:()=>{u("WAITING_PARAMETER_INPUT")},children:t.jsx(m.FontAwesomeIcon,{icon:"filter"})}):t.jsx(t.Fragment,{}),t.jsx(s.IconButton,{children:t.jsx(m.FontAwesomeIcon,{icon:"refresh",onClick:()=>{E(y)}})})]}):t.jsx(t.Fragment,{})]}),t.jsx(s.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===c&&"Excel"!=g?.reportType?t.jsx(A,{searchBtnClickCallBk:E}):"SHOWING_RESULT"===c||("WAITING_PARAMETER_INPUT"===c||"WAITING_RESULT"===c)&&"Excel"===g?.reportType?"Excel"===g?.reportType?t.jsx(Mo,{reportData:a,setReportData:l,reloadReport:async()=>{E(y)},gridLoadParameters:I,gridLoadParametersValues:y,setGridLoadParametersValues:_}):t.jsx("iframe",{src:i,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===c?t.jsxs(s.Box,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[t.jsx(m.FontAwesomeIcon,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),r]}):t.jsx(t.Fragment,{})})]})},ko=e=>{const o=_.useNavigate(),r=i.useSelector(e=>e.AppLayout),{isUserAuthorized:n,UserInfo:a}=we(),{handleGetRequest:l,handlePostRequest:c}=Re(),[u,p]=d.useState(null),[h,f]=d.useState([]),{t:T}=y.useTranslation(),[A,I]=d.useState(null),[E,O]=d.useState({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActionTakers:null,nextActions:[]}),{Window:C,setWindowState:N}=Se({windowTitle:"ltr"===r.appDirection?E?.workflowDocument&&E?.referencedDocument?`${E?.workflowDocument?.documentEnName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:"Document":E?.workflowDocument&&E?.referencedDocument?`${E?.workflowDocument?.documentArName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:"وثيقة",windowIcon:"eye",width:"80%"}),R=async()=>{await l({endPointURI:"api/v1/public/workflow/doc/info",showMask:!0,parameters:{workflowDocumentCode:e.workFlowDocumentCode,refDocumentId:e.refDocumentId},successCallBkFn:e=>{O(structuredClone(e.data))},failureCallBkFn:()=>{O({referencedDocument:null,workflowDocumentReport:null,workflowDocument:null,workflowDocumentStatus:null,actionsHistory:[],nextActions:[],nextActionTakers:null})}})},b=async()=>{await c({endPointURI:"api/v1/public/workflow/doc/action",showMask:!0,data:{workflowDocumentId:E?.workflowDocument?.id,refDocumentId:e.refDocumentId,actionId:u.id,refDocumentStatus:E?.workflowDocumentStatus?.documentStatusCode,actionComment:A},successCallBkFn:async t=>{u?.post_action_endpoint?await c({endPointURI:u.post_action_endpoint,showMask:!0,loadingMessage:"Processing post action process ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:u.id},successCallBkFn:()=>{R(),e?.postActionCallBk&&e.postActionCallBk()}}):R()}})};return d.useEffect(()=>{e.refDocumentId&&e.workFlowDocumentCode&&R()},[e.refDocumentId,e.workFlowDocumentCode]),d.useEffect(()=>{f(E?.nextActions&&E?.nextActions?.length>0?E.nextActions.filter(e=>{if(!E?.workflowDocumentStatus?.nextActionTakersAuthority&&!E?.nextActionTakers)return!0;if(E?.workflowDocumentStatus?.nextActionTakersAuthority&&n(E.workflowDocumentStatus.nextActionTakersAuthority))return!0;if(E?.nextActionTakers)for(const e of E.nextActionTakers)if(a?.username===e?.username||a?.username===e?.USERNAME)return!0;return!1}):[])},[E.nextActions,E.nextActionTakers]),t.jsxs(t.Fragment,{children:[E?.workflowDocumentReport?.id?t.jsx(C,{children:t.jsx(Do,{reportCode:E?.workflowDocumentReport?.reportCode,resultMode:"App",byPassParameterEntry:!0,reportParametersValues:{doc_id:e.refDocumentId+""}})}):t.jsx(t.Fragment,{}),E?.workflowDocument?t.jsxs(s.Box,{sx:{width:"100%",textAlign:"center",fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.IconButton,{onClick:()=>{o(-1,{replace:!0})},children:t.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(m.FontAwesomeIcon,{icon:"file",style:{marginRight:10,marginLeft:10}}),"ltr"===r.appDirection?`${E?.workflowDocument?.documentEnName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`:`${E?.workflowDocument?.documentArName} # ${E?.referencedDocument[E?.workflowDocument?.documentNumberField]}`,E?.workflowDocumentStatus?"ltr"===r.appDirection?` ( ${E?.workflowDocumentStatus?.documentStatusEnName} )`:` ( ${E?.workflowDocumentStatus?.documentStatusArName} )`:"",t.jsx(s.Box,{sx:{flex:1}}),E?.workflowDocumentReport?.id?t.jsx(s.Button,{onClick:()=>{N(!0)},variant:"outlined",startIcon:t.jsx(m.FontAwesomeIcon,{icon:"eye"}),children:T("VIEW_LABEL")}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),t.jsxs(s.Box,{sx:{flex:1,width:"100%",overflow:"hidden",display:"flex"},children:[h?.length>0?t.jsxs(s.Paper,{sx:{padding:2,display:"flex",margin:1,flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflow:"hidden"},children:[t.jsx(qe,{sx:{marginBottom:2,width:400},label:T("WE_AVAILABLE_ACTIONS_LABEL"),displayField:"ltr"===r.appDirection?"document_action_en_name":"document_action_ar_name",valueField:"id",value:u?.id,options:h,onChangeCallBack:(e,t)=>{p(t)}}),t.jsx(De,{sx:{width:400},rows:3,value:A,onChange:e=>{I(e.target.value)},multiline:!0,label:T("WF_COMMENT_LABEL")}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.Button,{color:"success",variant:"contained",sx:{width:200,m:1},onClick:async()=>{null!=u&&null!=u?.id?!0!==u.require_comment&&1!==u.require_comment&&"true"!==u.require_comment||null!==A&&""!==A?u?.pre_action_endpoint?await c({endPointURI:u.pre_action_endpoint,showMask:!0,loadingMessage:"Processing pre action validation ... please wait",parameters:{refDocumentId:e.refDocumentId,actionId:u.id},successCallBkFn:()=>{b()}}):b():g.toast.error("You must enter comment for the action to be processed"):g.toast.error("You must select action to process")},children:T("WF_TAKE_ACTION_BTN_LABEL")}),e?.cancelActionCallBk?t.jsx(s.Button,{variant:"contained",sx:{width:200,m:1},color:"error",onClick:()=>{e?.cancelActionCallBk&&e.cancelActionCallBk()},children:T("WF_CANCEL_BTN_LABEL")}):t.jsx(t.Fragment,{})]}),E?.nextActionTakers&&E.nextActionTakers.length>0?t.jsxs(t.Fragment,{children:[t.jsx(s.Divider,{variant:"fullWidth",flexItem:!0,sx:{marginTop:1,marginBottom:1},children:t.jsxs(s.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(m.FontAwesomeIcon,{icon:"users",style:{marginRight:10,marginLeft:10}})," ",T("WF_WAITING_FOR_LABEL")]})}),t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflow:"auto",padding:1,width:"100%"},children:E.nextActionTakers.map(e=>t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",border:"1px dotted black",width:400,marginBottom:2,padding:2},children:[t.jsx(To,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e?.id||"0",style:{marginRight:2,marginLeft:2,width:60,height:60}}),t.jsxs(s.Box,{sx:{flex:2,display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[t.jsx("div",{children:"ltr"===r.appDirection?e?.employee_en_name:e?.employee_ar_name}),t.jsx("div",{children:e?.email?t.jsxs(t.Fragment,{children:[t.jsx(m.FontAwesomeIcon,{icon:"envelope",style:{marginRight:10,marginLeft:10}}),e?.email]}):t.jsx(t.Fragment,{})}),t.jsx("div",{children:e?.mobile_number?t.jsxs(t.Fragment,{children:[t.jsx(m.FontAwesomeIcon,{icon:"mobile",style:{marginRight:10,marginLeft:10}}),e?.mobile_number]}):t.jsx(t.Fragment,{})})]})]}))})]}):t.jsx(t.Fragment,{})]}):t.jsx(t.Fragment,{}),E?.actionsHistory.length>0?t.jsx(Io,{actionHistory:E.actionsHistory}):t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",width:600,padding:2,margin:1,alignItems:"center",justifyContent:"center"},children:[t.jsxs(s.Box,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,fontWeight:"bold"},children:[t.jsx(m.FontAwesomeIcon,{icon:"history",style:{marginRight:10,marginLeft:10}}),T("WF_ACTION_HISTORY_LABEL")]}),t.jsx(s.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"No Action Log available"})]})]})]})},Uo=e=>{const{Window:i,setWindowState:o}=Se({windowTitle:"Attachments",windowIcon:"paperclip",width:"fit-content",height:"fit-content",minHeight:500,minWidth:400}),[r,n]=d.useState(!0),{t:a}=y.useTranslation(),l=tt(e.elements),[c,u]=d.useState([]),[p,h]=d.useState([]),f={};for(const t of e.elements)"field"===t?.type&&"props"===t?.mode&&t?.props?.defaultValue&&(f[t.props.fieldName]=t.props.defaultValue);let T=null;T=e?.validationSchema?e.validationSchema:ue.object(ot(l));const A=I.useForm({resolver:E.zodResolver(T),defaultValues:f}),O=A.watch(),C=_.useParams(),N=e?.formRouteRecordIdParamName,R=async()=>{let t=null;if(e?.recordIdToEdit?t=e.recordIdToEdit:N&&C[N]&&(t=C[N]),t){const i=await e.apiActions.loadRecordById(t);if(i){A.reset({...i}),e?.formValuesChangeCallBk&&e?.formValuesChangeCallBk({...i},S,A);for(const e of l)"combobox"===e?.fieldType&&i[e.fieldName]&&(e?.comboboxValueDataType&&"string"===e?.comboboxValueDataType?A.setValue(e.fieldName,i[e.fieldName]+""):A.setValue(e.fieldName,i[e.fieldName]))}}else A.reset({})},{Window:b,setWindowState:w}=Se({windowTitle:"Approvals",windowIcon:"stamp",height:"fit-content",minHeight:500,width:"fit-content",onCloseCallBack:async()=>{await R()}}),S={setFieldValue:(e,t)=>{A.setValue(e,t)},hideField:e=>{h(t=>[...t,e])},showField:e=>{h(t=>t.filter(t=>t!==e))},disableField:e=>{u(t=>[...t,e])},enableField:e=>{u(t=>t.filter(t=>t!==e))}};return d.useEffect(()=>{const e=[],t=[];for(const i of l)i?.hidden&&e.push(i.fieldName),i?.disabled&&t.push(i.fieldName);h(e),u(t)},[e.elements]),d.useEffect(()=>{R()},[e?.recordIdToEdit]),d.useEffect(()=>{n(!e?.attachment||!e?.attachment?.enableAttachFn||e.attachment.enableAttachFn(O))},[O]),t.jsxs(t.Fragment,{children:[e?.attachment?t.jsx(i,{children:t.jsx(yo,{attachmentCode:e.attachment.attachmentCode,refKey:O[e?.keyColumnName||"id"],enableAttachment:r})}):t.jsx(t.Fragment,{}),e?.workFlowDocumentCode?t.jsx(b,{children:t.jsx(ko,{workFlowDocumentCode:e.workFlowDocumentCode,refDocumentId:O[e?.keyColumnName||"id"],postActionCallBk:()=>{w(!1),R()},cancelActionCallBk:()=>{w(!1),R()}})}):t.jsx(t.Fragment,{}),t.jsx(so,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:t.jsx(s.Grid2,{sx:{width:"100%"},container:!0,children:e.elements.map((i,o)=>"group"===i.type?t.jsx(go,{...i.props,formManager:A,formValues:O,formActions:S,hiddenFields:p,disabledFields:c,formValuesChangeCallBk:e.formValuesChangeCallBk},o):"field"===i.type&&"props"===i.mode?t.jsx(mo,{fieldInfo:i.props,formManager:A,formValues:O,formActions:S,hiddenFields:p,disabledFields:c,formValuesChangeCallBk:e.formValuesChangeCallBk},o):"field"===i.type&&"node"===i.mode?t.jsx(s.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:t.jsx(i.node,{formManager:A,formValues:O})},o):void 0)})}),t.jsxs(so,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[O[e?.keyColumnName||"id"]&&e?.attachment?t.jsx(s.Tooltip,{title:"Attachments",children:t.jsx(s.IconButton,{onClick:()=>{o(!0)},children:t.jsx(m.FontAwesomeIcon,{icon:"paperclip"})})}):null,O[e?.keyColumnName||"id"]&&e?.workFlowDocumentCode?t.jsx(s.Tooltip,{title:"Approvals",children:t.jsx(s.IconButton,{onClick:()=>{w(!0)},children:t.jsx(m.FontAwesomeIcon,{icon:"stamp"})})}):null,e?.actions?e.actions.map(i=>!1===i?.isIdRequired?t.jsx(fo,{...i,record:O}):O[e?.keyColumnName||"id"]?!0===i?.formActionProps?.enabled?t.jsx(fo,{...i,record:O}):t.jsx(t.Fragment,{}):void 0):t.jsx(t.Fragment,{}),t.jsx("div",{style:{flex:1}}),e?.saveButtonSpecs?.hidden?t.jsx(t.Fragment,{}):t.jsx(s.Button,{variant:e?.saveButtonSpecs?.actionButtonVariant?e.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:e?.saveButtonSpecs?.icon?t.jsx(m.FontAwesomeIcon,{icon:e.saveButtonSpecs.icon}):null,color:e?.saveButtonSpecs?.actionButtonColor?e.saveButtonSpecs.actionButtonColor:"primary",onClick:A.handleSubmit(t=>{(async t=>{if((!e?.preSaveValidation||e.preSaveValidation(t))&&t){const i=await e.apiActions.saveRecord(t);i&&(A.reset({...i}),e?.formSavedSuccessfullyCallBk&&e.formSavedSuccessfullyCallBk(i),e?.formCloseCallBk&&e.formCloseCallBk())}})(t)},e=>{g.toast.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)}),children:a(e?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e?.cancelButtonSpecs?.hidden?t.jsx(t.Fragment,{}):t.jsx(s.Button,{variant:e?.cancelButtonSpecs?.actionButtonVariant?e.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:e?.cancelButtonSpecs?.icon?t.jsx(m.FontAwesomeIcon,{icon:e.cancelButtonSpecs.icon}):null,color:e?.cancelButtonSpecs?.actionButtonColor?e.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{e?.formCloseCallBk&&e.formCloseCallBk(),A.reset(f)},children:a(e?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},Fo=()=>{const{workflowDocumentCode:e,refDocumentId:i}=_.useParams();return t.jsx(ko,{workFlowDocumentCode:e,refDocumentId:i})},Bo=e=>t.jsx(j.BarChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))}),qo=e=>t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[t.jsx(s.Box,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:t.jsx("div",{children:e.record[e.valueField]})}),t.jsx(s.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]})]}),jo=e=>t.jsxs(t.Fragment,{children:[t.jsx(s.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(j.Gauge,{width:200,height:200,value:e.record[e.valueField],valueMax:e.total})]}),Go=e=>t.jsx(j.LineChart,{dataset:e.data,xAxis:[{dataKey:e.valueField,scaleType:"band",label:e.valueLabel}],series:e.labelField?.split(",").map(e=>({dataKey:e,label:e}))});function Wo(e){return t.jsxs(W,{sx:{display:"flex",alignItems:"center"},children:[t.jsx(W,{sx:{width:"100%",mr:1},children:t.jsx(G,{variant:"determinate",...e})}),t.jsx(W,{sx:{minWidth:35},children:t.jsx(F,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(e.value)}%`})})]})}const Ho=e=>t.jsxs(W,{sx:{width:"100%"},children:[t.jsx(F,{sx:{fontSize:16,fontWeight:"bold"},children:e.record[e.labelField]}),t.jsx(Wo,{value:e.record[e.valueField]/e.total*100})]}),Yo=e=>{const i=e.data.map((t,i)=>({id:i,value:t[e.valueField],label:t[e.labelField]+""}));return t.jsx(H.PieChart,{series:[{data:i}]})},Ko=e=>{const[i,o]=d.useState(!0),[r,n]=d.useState([]),{handleGetRequest:a}=Re();d.useEffect(()=>{e.loadWidget?(async()=>{o(!0),await a({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:e.dataQueryId,...e.parameterValues},successCallBkFn:e=>{o(!1),n(e.data)},failureCallBkFn:()=>{o(!1),n([])}})})():o(!1)},[e.loadWidget,e.loadCounter]);let l=0;if(1==r.length)l=100;else if("CircularProgress"===e.widgetType||"LinearProgress"===e.widgetType)for(const t of r)l+=t[e.verticalAxisField];return t.jsxs(t.Fragment,{children:["LineChart"===e.widgetType||"PieChart"===e.widgetType||"ColumnChart"===e.widgetType?t.jsxs(s.Box,{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:e?.icon||"chart-pie"}),e?.title]}):t.jsx(t.Fragment,{}),t.jsx(s.Box,{sx:{flex:1,padding:1,height:"90%",display:"flex",alignItems:"center",justifyContent:"center",width:"90%"},children:i?t.jsxs(t.Fragment,{children:[t.jsx(m.FontAwesomeIcon,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),t.jsx("div",{children:"Loading"})]}):"ColumnChart"===e.widgetType?t.jsx(Bo,{data:r,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===e.widgetType?t.jsx(Go,{data:r,widgetTitle:e.title,labelField:e.verticalAxisField,valueField:e.horizontalAxisField,valueLabel:e.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===e.widgetType?t.jsx(Yo,{data:r,widgetTitle:e.title,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,widgetType:"Pie"}):t.jsxs(s.Grid2,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[t.jsx(s.Grid2,{size:{xs:12},sx:{textAlign:"center"},children:e.title}),r.map((i,o)=>"Card"===e.widgetType?t.jsx(s.Grid2,{size:{md:3,xs:12},children:t.jsx(qo,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField},o)}):"CircularProgress"===e.widgetType?t.jsx(s.Grid2,{size:{md:3,xs:12},children:t.jsx(jo,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},o)}):"LinearProgress"===e.widgetType?t.jsx(s.Grid2,{size:{md:3,xs:12},children:t.jsx(Ho,{widgetTitle:"",record:i,labelField:e.horizontalAxisField,valueField:e.verticalAxisField,total:l},o)}):void 0)]})})]})},Vo=e=>{const[i,o]=d.useState({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),{ParameterPanel:r,parametersValues:n}=xo({parameters:i?.dashboardParameters||[],initialParameterValues:{}}),[a,l]=d.useState(0),[c,u]=d.useState(!1);d.useEffect(()=>{if(null!=i.dashboardCode&&null!=i.dashboardCode&&""!=i.dashboardCode){u(!1);let e=!0;if(i?.dashboardParameters.length>0)for(const t of i?.dashboardParameters)if(!0===t?.mandatory&&(void 0===n[t.parameterCode]||null===n[t.parameterCode]||""===n[t.parameterCode])){e=!1;break}e&&u(e),l(a+1)}},[i?.dashboardParameters,n]);const p=_.useNavigate(),{handleGetRequest:h,handlePostRequest:f}=Re();return d.useEffect(()=>{e.dashboardCode&&(async()=>{await h({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:e.dashboardCode},successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o(null)}})})()},[e.dashboardCode,e.parameters]),t.jsx(t.Fragment,{children:i?t.jsxs(t.Fragment,{children:[t.jsxs(s.Box,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.IconButton,{onClick:()=>{p(-1,{replace:!0})},children:t.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(m.FontAwesomeIcon,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),t.jsx(s.Box,{children:i?.dashboardTitle}),t.jsx(s.Box,{sx:{flex:1}})]}),i?.dashboardParameters.length>0?t.jsx(r,{searchBtnClickCallBk:async e=>{l(a+1)}}):t.jsx(t.Fragment,{}),t.jsx(s.Grid2,{container:!0,spacing:1,sx:{height:"fit-content",overflowY:"auto",padding:1},children:i?.widgets.map((e,i)=>t.jsx(s.Grid2,{sx:{alignItems:"center",justifyContent:"center",padding:1,display:"flex",overflow:"auto",flexDirection:"Card"!=e.widgetType?"column":void 0,height:e?.height||300},size:{md:e?.width,sm:12},children:t.jsx(Ko,{...e,parameterValues:n,loadWidget:c})},i))})]}):t.jsx(s.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},zo=()=>{const{dashboardCode:e}=_.useParams();return t.jsx(Vo,{dashboardCode:e})},Qo=e=>{const{UserSession:o}=we(),r=i.useSelector(e=>e.AppLayout),n=i.useDispatch(),{handlePostRequest:a}=Re(),[l,c]=d.useState(o.value.currentOrganization.id);return t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[t.jsx(qe,{sx:{width:"100%"},displayField:"ltr"===r.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:o.value.userOrganizations,value:l,onChangeCallBack:e=>{c(e)}}),t.jsx(s.Button,{sx:{m:1},variant:"contained",disabled:null==l||l===o.value.currentOrganization.id,onClick:async()=>{await a({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:o.value.username,orgId:l},data:{},successCallBkFn:t=>{const i={...t.data,isAuthenticated:!0};n(Ce.setAuthenticated(i)),e.successChangeCallBackFn&&e.successChangeCallBackFn()}})},children:"Change Organization"})]})},$o=f.createSlice({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:Zo,setSideBarState:Jo}=$o.actions;var Xo=$o.reducer;function er(e,t){const i=d.useRef(e);d.useEffect(()=>{i.current=e},[e]),d.useEffect(()=>{const e=setInterval(()=>i.current?.(),t);return()=>clearInterval(e)},[t])}const tr=s.keyframes`
|
|
32
32
|
0% { transform: scale(1); opacity: 1; }
|
|
33
33
|
25% { transform: scale(1); opacity: 0.6; }
|
|
34
34
|
50% { transform: scale(1); opacity: 1; }
|
|
35
35
|
75% { transform: scale(1); opacity: 0.6; }
|
|
36
36
|
100% { transform: scale(1); opacity: 1; }
|
|
37
|
-
`,ir=e=>{const o=_.useNavigate(),r=i.useSelector(e=>e.AppLayout),{handlePostRequest:n}=Re();return t.jsxs(t.Fragment,{children:[t.jsxs(s.Button,{fullWidth:!0,onClick:()=>{var t;"NAVIGATION"===e?.notificationAction&&e?.notificationActionPayload&&o(e.notificationActionPayload),e?.isNotified||(t=e.id,n({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:t}})),e?.setOpen&&e.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:e?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[t.jsxs(s.Box,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[e?.notificationIcon?t.jsx(m.FontAwesomeIcon,{icon:e.notificationIcon,style:{marginRight:10,marginLeft:10,color:e?.notificationIconColor}}):t.jsx(t.Fragment,{}),"ltr"===r.appDirection?e.notificationEnText:e.notificationArText,t.jsx(s.Box,{sx:{flex:1}}),e?.isNotified?t.jsx(t.Fragment,{}):t.jsxs(s.Typography,{color:"warning",sx:{animation:`${tr} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[t.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===r.appDirection?"New":"جديد"]})]}),t.jsxs(s.Box,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[t.jsx(s.Box,{sx:{marginRight:1,marginLeft:1},children:ho(e.createTime,r.appDirection)}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(s.Box,{sx:{marginRight:1,marginLeft:1},children:e.createTime})]})]}),e?.showDivider?t.jsx(s.Divider,{flexItem:!0}):t.jsx(t.Fragment,{})]})},or=()=>{const{UserInfo:e}=we(),[o,r]=d.useState(null),{handleGetRequest:n,handlePostRequest:a}=Re(),l=_.useNavigate(),c=i.useSelector(e=>e.AppLayout),[u,p]=d.useState(!1),[h,f]=d.useState([]);er(()=>{!0===e.isAuthenticated&&n({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>h.length&&g.toast.info("ltr"===c.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===c.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),f(e.data)}})},1e3);return t.jsx(s.ClickAwayListener,{onClickAway:()=>{p(!1)},children:t.jsxs("div",{style:{cursor:"pointer"},children:[t.jsx(s.IconButton,{color:"inherit",onClick:e=>{r(e.currentTarget),p(!u)},sx:{marginRight:1,marginLeft:1},children:t.jsx(s.Badge,{anchorOrigin:{vertical:"top",horizontal:"ltr"===c.appDirection?"right":"left"},badgeContent:h.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:t.jsx(m.FontAwesomeIcon,{icon:"bell"})})}),t.jsx(s.Popper,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:u,anchorEl:o,dir:c.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:e})=>t.jsx(s.Fade,{...e,timeout:350,children:t.jsxs(s.Paper,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[t.jsx(s.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[t.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===c.appDirection?"Notifications":"الاشعارات"]})}),0==h.length?t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:t.jsx(s.Box,{children:"ltr"===c.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):t.jsx(t.Fragment,{}),t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:h.map((e,i)=>t.jsx(ir,{...e,setOpen:p,showDivider:i<h.length-1}))}),t.jsx(s.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsx(s.Button,{sx:{textTransform:"none"},onClick:()=>{l("myNotifications")},children:"ltr"===c.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},rr=e=>{const[i,o]=d.useState(""),[r,n]=d.useState(""),[a,l]=d.useState(""),{handlePostRequest:c}=Re();return t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[t.jsxs(s.Box,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",e?.selectedPerson?.employeeEnName]}),t.jsx(s.Divider,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),e.isSelfService?t.jsx(De,{label:"Current Password",value:i,onChange:e=>{o(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):t.jsx(t.Fragment,{}),t.jsx(De,{label:"New Password",value:r,onChange:e=>{n(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(De,{label:"Confirm New Password",value:a,onChange:e=>{l(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(s.Button,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!e.isSelfService||null!==i&&""!==i.trim()?null!==r&&""!==r&&null!==a&&""!==a&&r==a?await c({endPointURI:e.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:e?.selectedPerson?.id,currentPassword:i,newPassword:r},successCallBkFn:()=>{e.onSuccessCallBk(),g.toast.success("Your request has been processed successfully")},showMask:!0}):g.toast.error("You must enter new password in required fields and must be identical"):g.toast.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},nr=s.styled(p,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{const t=i.useSelector(e=>e.AppLayout),o=pe();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:o?void 0:"calc(100% - 350px)",marginLeft:o||"ltr"!==t.appDirection?void 0:"350px",marginRight:o||"rtl"!==t.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}}),ar=()=>{const{Window:e,setWindowState:o}=Pe({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),r=i.useSelector(e=>e.AppInfo.value),[n,a]=d.useState(null),l=()=>{a(null)},c=e=>{a(e.currentTarget)},u=i.useSelector(e=>e.AppLayout),p=i.useSelector(e=>e.SideBar),{UserSession:f}=we(),g=f.value.currentOrganization,{Window:T,setWindowState:y}=Pe({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:I}=Re(),_=pe(),E=i.useDispatch();return t.jsxs(t.Fragment,{children:[t.jsx(T,{children:t.jsx(rr,{selectedPerson:f.value,isSelfService:!0,onSuccessCallBk:()=>{y(!1)}})}),t.jsx(s.Menu,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:n,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(n),onClose:l,children:t.jsx(s.MenuItem,{onClick:()=>{y(!0),l()},children:t.jsx(s.Typography,{sx:{textAlign:"center"},children:"Change Password"})})}),t.jsx(e,{children:t.jsx(Qo,{successChangeCallBackFn:()=>{o(!1)}})}),t.jsx(nr,{position:"fixed",open:p.isOpened,children:t.jsxs(h,{children:[t.jsx(s.IconButton,{color:"inherit","aria-label":"open drawer",onClick:()=>{E(Zo())},edge:"start",sx:[{mr:"ltr"===u.appDirection?2:void 0,ml:"rtl"===u.appDirection?2:void 0},p.isOpened&&{display:"none"}],children:t.jsx(m.FontAwesomeIcon,{icon:"bars"})}),t.jsx(To,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:f?.value?.currentOrganization?.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),t.jsx(s.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:_?"":`${r.appName} - ${"ltr"===u.appDirection?g?.organizationEnName:g?.organizationArName}`}),t.jsx(s.Tooltip,{title:"light"===u.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:t.jsx(s.IconButton,{color:"inherit",onClick:()=>{E(ge.setThemeMode("light"===u.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===u.themeMode?"dark":"light")},children:"light"===u.themeMode?t.jsx(m.FontAwesomeIcon,{icon:"moon"}):t.jsx(m.FontAwesomeIcon,{icon:{prefix:"far",iconName:"sun"}})})}),t.jsx(s.Tooltip,{title:"ar"===A.language?"Change Language To English":"Change Language To Arabic",children:t.jsx(s.IconButton,{color:"inherit",onClick:()=>{let e="ar"===A.language?"en":"ar";var t;t=e,A.changeLanguage(t),localStorage.setItem("language",t),E(ge.setAppDirection("ar"===e?"rtl":"ltr"))},children:t.jsx(m.FontAwesomeIcon,{icon:"language"})})}),f.value?.userOrganizations&&f.value?.userOrganizations.length>1?t.jsx(s.Tooltip,{title:"Change Current Organization",children:t.jsx(s.IconButton,{color:"inherit",onClick:()=>{o(!0)},children:t.jsx(m.FontAwesomeIcon,{icon:"globe"})})}):t.jsx(t.Fragment,{}),!0===r?.enableUINotifications?t.jsx(or,{}):t.jsx(t.Fragment,{}),t.jsx("div",{onClick:c,style:{cursor:"pointer"},children:t.jsx(To,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:f.value?.id+""})}),t.jsx("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:c,children:_?"":f.value?.username}),t.jsx(s.IconButton,{color:"inherit",onClick:async()=>{try{await I({endPointURI:"api/auth/logout"})}catch(e){}E(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")},children:t.jsx(m.FontAwesomeIcon,{rotation:"rtl"===u.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},sr=s.styled("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),lr=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=lr(e,i.children);if(t)return t}}},dr=[...[{id:"home",icon:"home",label:"Home",action:"NAVIGATION",actionPayload:{path:"/"}},{id:"system_admin",label:"System Administration",authority:"SYSTEM_ADMIN",icon:"cog",children:[{id:"system_admin.Person",label:"PERSON_PLURAL",authority:"SYSTEM_ADMIN",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"system_admin.devtools.rolesx",label:"ROLES",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"development_admin.SystemApplication",label:"SYSTEM_APPLICATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"window-restore",action:"NAVIGATION",actionPayload:{path:"admin/systemapplications"}},{id:"development_admin.organizations",label:"ORGANIZATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"globe",action:"NAVIGATION",actionPayload:{path:"admin/organizations"}},{id:"development_admin.organization",label:"Organization Info",authority:"DEVELOPMENT_ADMIN",icon:"globe",children:[{id:"development_admin.organization.modules",label:"Subscriped Modules",icon:"layer-group",authority:"ORGANIZATION_ADMIN",action:"NAVIGATION",actionPayload:{path:"admin/org/apps"}},{id:"development_admin.organization.unitTypes",label:"Organization Unit Types",icon:"tags",action:"NAVIGATION",actionPayload:{path:"admin/org/unit/types"}},{id:"development_admin.organization.units",label:"Organization Units",icon:"folder-tree",action:"NAVIGATION",actionPayload:{path:"admin/org/units"}},{id:"development_admin.organization.ranks",label:"Organization Ranks",icon:"street-view",action:"NAVIGATION",actionPayload:{path:"admin/org/ranks"}}]},{id:"system_admin.devtools",label:"DEVELOPMENT_TOOLS",authority:"DEVELOPMENT_ADMIN",icon:"code",children:[{id:"system_admin.devtools.modules",label:"System Modules",icon:"layer-group",action:"NAVIGATION",actionPayload:{path:"dev/system/modules"}},{id:"system_admin.devtools.authorities",label:"System Authorities",icon:"key",action:"NAVIGATION",actionPayload:{path:"dev/system/authorities"}},{id:"system_admin.devtools.roles",label:"System Roles",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"system_admin.devtools.lookups",label:"System Lookups",icon:"list-check",action:"NAVIGATION",actionPayload:{path:"dev/system/lookups"}},{id:"system_admin.devtools.DatasourceConnection",label:"DATASOURCE_CONNECTION_PLURAL",icon:"plug",action:"NAVIGATION",actionPayload:{path:"dev/datasourceconnections"}},{id:"system_admin.devtools.EntityParameter",label:"ENTITY_PARAMETER_PLURAL",icon:"p",action:"NAVIGATION",actionPayload:{path:"dev/entityparameters"}},{id:"system_admin.devtools.DataQuery",label:"DATA_QUERY_PLURAL",icon:"file-code",action:"NAVIGATION",actionPayload:{path:"dev/dataqueries"}},{id:"system_admin.devtools.Report",label:"REPORT_PLURAL",icon:"file",action:"NAVIGATION",actionPayload:{path:"dev/reports"}},{id:"system_admin.devtools.MailConfig",label:"Mail Sender Config",icon:{iconName:"paper-plane",prefix:"fas"},action:"NAVIGATION",actionPayload:{path:"dev/mailsender/config"}},{id:"system_admin.devtools.MailTemplate",label:"MAIL_TEMPLATE_PLURAL",icon:"envelope",action:"NAVIGATION",actionPayload:{path:"dev/mailtemplates"}},{id:"system_admin.devtools.WorkflowDocument",label:"WORKFLOW_DOCUMENT_PLURAL",icon:"chart-diagram",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocuments"}},{id:"system_admin.devtools.Widget",label:"WIDGET_PLURAL",icon:"chart-pie",action:"NAVIGATION",actionPayload:{path:"dev/widgets"}},{id:"system_admin.devtools.Dashboard",label:"DASHBOARD_PLURAL",icon:"square-poll-vertical",action:"NAVIGATION",actionPayload:{path:"dev/dashboards"}},{id:"system_admin.devtools.AttachmentConfig",label:"ATTACHMENT_CONFIG_PLURAL",icon:"paperclip",action:"NAVIGATION",actionPayload:{path:"dev/attachmentconfigs"}},{id:"system_admin.devtools.BluePrint",label:"BLUE_PRINT_PLURAL",icon:"fingerprint",action:"NAVIGATION",actionPayload:{path:"dev/blueprints"}},{id:"system_admin.devtools.Notification",label:"NOTIFICATION_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notifications"}}]},{id:"system_admin.followup",label:"SYSTEM_MONITORING",authority:"DEVELOPMENT_ADMIN",icon:"tv",children:[{id:"system_admin.WorkflowDocumentMailLog",label:"Action Mail Logs",icon:"envelopes-bulk",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocumentmaillogs"}},{id:"system_admin.MailNotificationQueue",label:"Mail Notification Queue",icon:"envelope-open-text",action:"NAVIGATION",actionPayload:{path:"dev/mailnotificationqueues"}},{id:"system_admin.NotificationQueue",label:"NOTIFICATION_QUEUE_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notificationqueues"}}]}]}],{id:"example",icon:"wind",action:"NAVIGATION",actionPayload:{path:"example"},label:"Example"}];function cr(){return t.jsx(W,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const ur=c.styled(J.TreeItem2Root)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${$.treeItemClasses.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),pr=c.styled(J.TreeItem2Content)(({theme:e})=>({flexDirection:"row-reverse",borderRadius:e.spacing(.7),marginBottom:e.spacing(.5),marginTop:e.spacing(.5),padding:e.spacing(.5),paddingRight:e.spacing(1),"&.Mui-expanded ":{"&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon":{color:e.palette.primary.dark,...e.applyStyles("light",{color:e.palette.primary.main})},"&::before":{content:'""',display:"block",position:"absolute",left:"16px",top:"44px",height:"calc(100% - 48px)",width:"1.5px",backgroundColor:e.palette.grey[700],...e.applyStyles("light",{backgroundColor:e.palette.grey[300]})}},"&:hover":{backgroundColor:c.alpha(e.palette.primary.main,.1),color:"white",...e.applyStyles("light",{color:e.palette.primary.main})},"&.Mui-focused, &.Mui-selected, &.Mui-selected.Mui-focused":{backgroundColor:e.palette.primary.dark,color:e.palette.primary.contrastText,...e.applyStyles("light",{backgroundColor:e.palette.primary.main})}})),hr=V.animated(z);function mr(e){const i=V.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return t.jsx(hr,{style:i,...e})}const fr=c.styled(F)({color:"inherit",fontWeight:500});function gr({icon:e,expandable:o,children:r,...n}){const{t:a}=y.useTranslation(),s=i.useSelector(e=>e.AppLayout);return t.jsxs(J.TreeItem2Label,{...n,sx:{display:"flex",alignItems:"center",padding:1},children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:"ltr"===s.appDirection?7:void 0,marginLeft:"rtl"===s.appDirection?7:void 0,fontSize:"1.2rem"},icon:e}),t.jsx(fr,{variant:"body2",sx:{fontSize:16},children:a(r)}),o&&t.jsx(cr,{})]})}const Tr=e=>Array.isArray(e)?e.length>0&&e.some(Tr):Boolean(e),Ar=ce.forwardRef(function(e,i){const{id:o,itemId:r,label:n,disabled:a,children:s,...l}=e,{getRootProps:d,getContentProps:c,getIconContainerProps:u,getCheckboxProps:p,getLabelProps:h,getGroupTransitionProps:m,getDragAndDropOverlayProps:f,status:g,publicAPI:T}=Z.useTreeItem2({id:o,itemId:r,children:s,label:n,disabled:a,rootRef:i}),A=T.getItem(r),y=Tr(s);return t.jsx(ee.TreeItem2Provider,{itemId:r,children:t.jsxs(ur,{...d(l),children:[t.jsxs(pr,{...c({className:no("content",{"Mui-expanded":g.expanded,"Mui-selected":g.selected,"Mui-focused":g.focused,"Mui-disabled":g.disabled})}),children:[t.jsx(J.TreeItem2IconContainer,{...u(),children:t.jsx(X.TreeItem2Icon,{status:g})}),t.jsx(J.TreeItem2Checkbox,{...p()}),t.jsx(gr,{...h({icon:A?.icon||"book",expandable:y&&g.expanded})}),t.jsx(te.TreeItem2DragAndDropOverlay,{...f()})]}),s&&t.jsx(mr,{...m()})]})})});function yr(){const e=_.useNavigate(),o=i.useSelector(e=>e.AppLayout),r=i.useSelector(e=>e.AppInfo.value);i.useDispatch();const n=pe(),{isUserAuthorized:a,isCurrentOrganizationAuthorizedToModule:s}=we(),l=e=>{const t=[];for(let i of e)if((void 0===i.authority||null==i.authority||a(i.authority))&&(void 0===i.applicationModule||null===i.applicationModule||s(i.applicationModule))){let e=structuredClone(i);i?.children&&(e.children=l(i.children)),t.push(e)}return t},d=[];r.enableAdministrationModule&&d.push(...structuredClone(dr)),d.push(...structuredClone(r.businessNavigationItems));const c=l(d);return t.jsx(Q.RichTreeView,{items:c,onItemClick:(t,i)=>{const o=lr(i,d);"NAVIGATION"!==o?.action||null==o?.actionPayload||void 0!==o.children&&null!==o.children&&0!=o.children.length||e(o?.actionPayload?.path||"")},sx:{height:"fit-content",flexGrow:1,maxWidth:he,direction:o.appDirection,maxHeight:n?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:Ar}})}const Ir=()=>{const e=i.useSelector(e=>e.AppInfo.value),{UserSession:o}=we(),r=o.value.currentOrganization,n=s.useTheme(),a=i.useSelector(e=>e.AppLayout),l=i.useSelector(e=>e.SideBar),d=i.useDispatch();return t.jsxs(K,{sx:{width:he,flexShrink:0,"& .MuiDrawer-paper":{width:he,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===a.appDirection?"left":"right",open:l.isOpened,children:[t.jsxs(sr,{children:[t.jsxs(s.Box,{sx:{width:"100%"},children:[t.jsx(s.Typography,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[t.jsx(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:`${e.appName} - ${"ltr"===a.appDirection?r?.organizationEnName:r?.organizationArName}`}),t.jsxs(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",e.appVersion]})]})]}),t.jsx(Y,{onClick:()=>{d(Zo())},children:"ltr"===n.direction?t.jsx(m.FontAwesomeIcon,{icon:"angle-left"}):t.jsx(m.FontAwesomeIcon,{icon:"angle-right"})})]}),t.jsx(v,{}),t.jsx(yr,{})]})},_r=re({key:"muirtl",stylisPlugins:[oe.prefixer,ie]}),Er=re({key:"mui"}),Or=e=>{const[i,o]=d.useState([]),[r,n]=d.useState([]),{handlePostRequest:a,handleGetRequest:l}=Re();d.useEffect(()=>{e.selectedRecord&&(async()=>{await l({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id,organizationId:e.selectedRecord.organizationId},successCallBkFn:e=>{o(e.data.currentRoles),n(e.data.availableRoles)}})})()},[e.selectedRecord]);return t.jsxs(t.Fragment,{children:[t.jsx(Fe,{displayField:"roleName",options:r,valueField:"id",selectedOptions:i,setSelection:o}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(s.Button,{variant:"contained",onClick:async()=>{await a({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id},data:i,successCallBkFn:()=>{g.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(s.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Cr=e=>{const[o,r]=d.useState(null),{Window:n,setWindowState:a}=Pe({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),s=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),l=i.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks.data),c=i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:u}=y.useTranslation(),[p,h]=d.useState([]),m=xe({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:h}),f=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_ID",fieldName:"organizationId",required:!0,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:l,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:c,optionValueField:"id",optionDisplayField:"fullPath"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_MEMBER_PERSON_ID",fieldName:"personId",required:!1,fieldType:"number"}}];return t.jsxs(t.Fragment,{children:[t.jsx(n,{children:t.jsx(Or,{selectedRecord:o,closeModalFn:()=>{a(!1)}})}),t.jsx(vo,{apiActions:m,hideInfoBar:!0,data:p,setData:h,editMode:{editMode:"row"},formElements:f,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{r(e),a(!0)}}],gridLoadParametersValues:{personId:e.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async t=>(t.personId=e.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},Nr=()=>{const{t:e}=y.useTranslation(),[o,r]=d.useState([]),n=xe({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:r}),{handleGetRequest:a}=Re(),s=i.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks),l=i.useDispatch();return t.jsx(vo,{apiActions:n,data:o,hideInfoBar:!0,setData:r,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_RANK_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_ORDER",fieldName:"rankOrder",required:!0,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_CODE",fieldName:"rankCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_AR_NAME",fieldName:"rankArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_EN_NAME",fieldName:"rankEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_RANK_PLURAL",girdIcon:"street-view",editAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_EDIT",postActionCallBack:()=>{(async()=>{await a({endPointURI:s.url,showMask:!1,successCallBkFn:e=>{l(ve({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{l(ve({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},Rr=()=>{const{t:e}=y.useTranslation(),[o,r]=d.useState([]),{handleGetRequest:n}=Re(),a=i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits),s=i.useDispatch(),l=xe({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:r}),c=[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID",fieldName:"organizationUnitTypeId",required:!0,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnitType.data),optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:l,data:o,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:c,keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await n({endPointURI:a.url,showMask:!1,successCallBkFn:e=>{s(ve({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{s(ve({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},br=()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:o});return t.jsx(vo,{apiActions:r,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID",hidden:!0,gridProps:{hidden:!0},fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER",fieldName:"organizationUnitTypeOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE",fieldName:"unitTypeCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME",fieldName:"unitTypeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME",fieldName:"unitTypeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_TYPE_PLURAL",girdIcon:"tags",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_DELETE"}})},wr=()=>{const{t:e}=y.useTranslation(),[o,r]=d.useState([]),n=xe({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:r}),a=i.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:s}=Re(),l=[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID",fieldName:"systemModuleId",required:!1,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:n,data:o,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_AUTHORITY_PLURAL",girdIcon:"key",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_DELETE"}})},Pr=()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:o});return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_CODE",fieldName:"moduleCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_NAME",fieldName:"moduleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION",fieldName:"moduleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],keyColumnName:"id",hideInfoBar:!0,gridTitle:"SYSTEM_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_DELETE"}})},Sr=e=>{const[i,o]=d.useState([]),[r,n]=d.useState([]),{handlePostRequest:a,handleGetRequest:l}=Re();d.useEffect(()=>{e.roleId&&(async()=>{await l({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},successCallBkFn:e=>{o(e.data.selectedAuthorities),n(e.data.availableAuthorities)}})})()},[e.roleId]);return t.jsxs(t.Fragment,{children:[t.jsx(Fe,{displayField:"authorityName",options:r,valueField:"id",selectedOptions:i,setSelection:o}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(s.Button,{variant:"contained",onClick:async()=>{await a({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},data:i,successCallBkFn:()=>{g.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(s.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},vr=()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),[r,n]=d.useState(null),{Window:a,setWindowState:s}=Pe({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),l=xe({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:o});return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Sr,{roleId:r?.id,closeModalFn:()=>{s(!1)}})}),t.jsx(vo,{apiActions:l,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_NAME",fieldName:"roleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION",fieldName:"roleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_PLURAL",girdIcon:"tag",rowActions:[{icon:"key",actionFn:async e=>{n(e),s(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},Lr=e=>{const o=i.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),{t:r}=y.useTranslation(),[n,a]=d.useState([]),s=xe({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:a}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DATA_QUERY_ID",fieldName:"dataQueryId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:s,data:n,setData:a,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:r("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async t=>(t.dataQueryId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},Mr=()=>{const e=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),{t:o}=y.useTranslation(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"Organization",fieldName:"organizationId",options:e,optionDisplayField:"organizationEnName",optionValueField:"id",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_TYPE",fieldName:"lookupType",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_AR_DISPLAY",fieldName:"lookupArDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_EN_DISPLAY",fieldName:"lookupEnDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_VALUE",fieldName:"lookupValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"System Application",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return t.jsx(vo,{apiActions:a,data:r,setData:n,hideInfoBar:!0,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:o("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},xr=e=>{const{t:o}=y.useTranslation(),r=i.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),[n,a]=d.useState([]),s=xe({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:a}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_REPORT_ID",fieldName:"reportId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return t.jsx(vo,{apiActions:s,data:n,hideInfoBar:!0,setData:a,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:o("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async t=>(t.reportId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},Dr=[{value:"FILE_SYSTEM"},{value:"SFTP"}],kr=(e,t,i,o,r)=>{o?("useSysDatasource"===o&&1==r?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"),"reportType"===o&&("Blueprint"===r?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===r?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===r?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))):(e?.useSysCon&&t.hideField("datasourceConId"),e?.reportType?"Blueprint"===e?.reportType?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===e?.reportType?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===e?.reportType&&(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))},Ur=e=>{const{t:i}=y.useTranslation(),[o,r]=d.useState([]),n=xe({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:r});return t.jsx(vo,{apiActions:n,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_TYPE",fieldName:"recipientType",required:!0,fieldType:"combobox",options:[{value:"To"},{value:"CC"}],optionDisplayField:"value",optionValueField:"value",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_MAIL",fieldName:"recipientMail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:i("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:t=>t?.recipientMail&&!po(t.recipientMail)?(g.toast.error("You must enter a valid email address"),!1):(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},Fr=e=>{const{t:o}=y.useTranslation(),[r,n]=d.useState([]),a=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),s=xe({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:n}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_NAME",fieldName:"bodyName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_ORDER",fieldName:"bodyOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT",fieldName:"bodyContent",required:!0,fieldType:"text",muiTextFieldProps:{multiline:!0,rows:6}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID",fieldName:"bodyContentDataQueryId",required:!1,fieldType:"combobox",options:a,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return t.jsx(vo,{apiActions:s,data:r,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:n,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:l,keyColumnName:"id",gridTitle:o("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},Br=e=>{const o=i.useSelector(e=>e.commonStores.stores.SystemReports.data),{t:r}=y.useTranslation(),[n,a]=d.useState([]),s=xe({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:a}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{options:o,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return t.jsx(vo,{apiActions:s,data:n,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:a,editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:r("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},qr={Gmail:{mailHost:{isMandatory:!0,isVisible:!0},mailPort:{isMandatory:!0,isVisible:!0},mailUsername:{isMandatory:!0,isVisible:!0},mailPassword:{isMandatory:!0,isVisible:!0},mailProtocol:{isMandatory:!0,isVisible:!0},isMailSmtpAuthEnabled:{isMandatory:!0,isVisible:!0},isMailStarttlsEnabled:{isMandatory:!0,isVisible:!0},isSmtpSSlEnabled:{isMandatory:!0,isVisible:!0},azureGraphApiClientId:{isMandatory:!1,isVisible:!1},azureGraphApiClientSecret:{isMandatory:!1,isVisible:!1},azureGraphApiTenantId:{isMandatory:!1,isVisible:!1},azureGraphApiScope:{isMandatory:!1,isVisible:!1},azureGraphApiEmailId:{isMandatory:!1,isVisible:!1}},Azure:{mailHost:{isMandatory:!1,isVisible:!1},mailPort:{isMandatory:!1,isVisible:!1},mailUsername:{isMandatory:!1,isVisible:!1},mailPassword:{isMandatory:!1,isVisible:!1},mailProtocol:{isMandatory:!1,isVisible:!1},isMailSmtpAuthEnabled:{isMandatory:!1,isVisible:!1},isMailStarttlsEnabled:{isMandatory:!1,isVisible:!1},isSmtpSSlEnabled:{isMandatory:!1,isVisible:!1},azureGraphApiClientId:{isMandatory:!0,isVisible:!0},azureGraphApiClientSecret:{isMandatory:!0,isVisible:!0},azureGraphApiTenantId:{isMandatory:!0,isVisible:!0},azureGraphApiScope:{isMandatory:!0,isVisible:!0},azureGraphApiEmailId:{isMandatory:!0,isVisible:!0}}},jr=(e,t,i)=>{if(e&&qr[e]){const o=qr[e],r=Object.keys(o);for(const e of r){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("mailHost"),i.setValue("mailHost",null),t.hideField("mailPort"),i.setValue("mailPort",null),t.hideField("mailUsername"),i.setValue("mailUsername",null),t.hideField("mailPassword"),i.setValue("mailPassword",null),t.hideField("mailProtocol"),i.setValue("mailProtocol",null),t.hideField("isMailSmtpAuthEnabled"),i.setValue("isMailSmtpAuthEnabled",null),t.hideField("isMailStarttlsEnabled"),i.setValue("isMailStarttlsEnabled",null),t.hideField("isSmtpSSlEnabled"),i.setValue("isSmtpSSlEnabled",null),t.hideField("azureGraphApiClientId"),i.setValue("azureGraphApiClientId",null),t.hideField("azureGraphApiClientSecret"),i.setValue("azureGraphApiClientSecret",null),t.hideField("azureGraphApiTenantId"),i.setValue("azureGraphApiTenantId",null),t.hideField("azureGraphApiScope"),i.setValue("azureGraphApiScope",null),t.hideField("azureGraphApiEmailId"),i.setValue("azureGraphApiEmailId",null)},Gr=e=>{const{t:o}=y.useTranslation(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:n}),s=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE",fieldName:"documentStatusCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status Arabic Name",fieldName:"documentStatusArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status English Name",fieldName:"documentStatusEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER",fieldName:"documentStatusOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE",fieldName:"isZeroState",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Next Actions Query (must return array of actions in table named workflow_document_action)",fieldName:"nextActionsQueryId",required:!1,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Query (must return array of persons in table named person)",fieldName:"nextActionTakersQueryId",required:!1,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Authority",fieldName:"nextActionTakersAuthority",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:a,data:r,setData:n,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:l,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},Wr=e=>{const{t:o}=y.useTranslation(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID",fieldName:"documentActionId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!0,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:a,data:r,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:n,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:t=>(t.documentActionId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},Hr=e=>{const[i,o]=d.useState(null),{Window:r,setWindowState:n}=Pe({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:a}=y.useTranslation(),{handleGetRequest:s}=Re(),[l,c]=d.useState([]);d.useEffect(()=>{(async()=>{await s({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:e.selectedRecord.id},successCallBkFn:e=>{c(e.data)}})})()},[e.selectedRecord]);const[u,p]=d.useState([]),h=xe({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:p}),m=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE",fieldName:"documentActionCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action Arabic Name",fieldName:"documentActionArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action English Name",fieldName:"documentActionEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID",fieldName:"nextDocumentStatusId",required:!0,fieldType:"combobox",options:l,optionDisplayField:"documentStatusCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Post Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"postActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Pre Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"preActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT",fieldName:"requireComment",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}}];return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Wr,{selectedRecord:i})}),t.jsx(vo,{apiActions:h,data:u,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},setData:p,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{o(e),n(!0)}}],formElements:m,keyColumnName:"id",gridTitle:a("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},Yr=e=>{const{t:o}=y.useTranslation(),[r,n]=d.useState([]),a=i.useSelector(e=>e.commonStores.stores.SystemWidgets.data),s=xe({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:n}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_DASHBOARD_ID",fieldName:"dashboardId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ID",fieldName:"widgetId",required:!0,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"widgetName"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ORDER",fieldName:"widgetOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:s,data:r,setData:n,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:o("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async t=>(t.dashboardId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},Kr=[...[...[{path:"admin/organizations",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:o}),n=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(To,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_CODE",fieldName:"organizationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_AR_NAME",fieldName:"organizationArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_EN_NAME",fieldName:"organizationEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(t.Fragment,{children:t.jsx(vo,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:r,data:i,setData:o,editMode:{editMode:"row"},formElements:n,keyColumnName:"id",gridTitle:"ORGANIZATION_PLURAL",girdIcon:"globe",editAction:{isEnabled:!0,authority:"ORGANIZATION_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_DELETE"}})})},authority:"ORGANIZATION_VIEW"},{path:"admin/organizationmembers",component:Cr,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:o});return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_END_DATE",fieldName:"endDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID",fieldName:"organizationMemberId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_START_DATE",fieldName:"startDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_ROLE_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_DELETE"}})},authority:"ORGANIZATION_MEMBER_ROLE_VIEW"},{path:"admin/organizationranks",component:Nr,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:Rr,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:br,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:e}=y.useTranslation(),[o,r]=d.useState(null),{UserInfo:n}=we(),a=i.useSelector(e=>e.commonStores.stores.CurrentOrganizationRanks.data),l=i.useSelector(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[c,u]=d.useState([]),p=xe({commonStoreKey:"persons",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:u}),[h,m]=d.useState(null),{Window:f,setWindowState:T}=Pe({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:A,setWindowState:I}=Pe({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:_,setWindowState:E}=Pe({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),O=[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"id",fieldName:"id",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"organizationMemberId",fieldName:"organizationMemberId",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Image",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(To,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_AR_NAME",fieldName:"employeeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_EN_NAME",fieldName:"employeeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMAIL",fieldName:"email",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_MOBILE_NUMBER",fieldName:"mobileNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:l,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"PERSON_PASSWORD",fieldName:"password",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_USERNAME",fieldName:"username",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"Ref Source",fieldName:"refSource",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"PERSON_EMPLOYEE_NUMBER",fieldName:"refSyncNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsxs(t.Fragment,{children:[t.jsx(A,{children:t.jsx(Or,{selectedRecord:h,closeModalFn:()=>{I(!1)}})}),t.jsx(f,{children:t.jsx(Cr,{selectedPerson:o})}),t.jsx(_,{children:t.jsx(rr,{selectedPerson:o,isSelfService:!1,onSuccessCallBk:()=>{E(!1)}})}),t.jsx(vo,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:p,data:c,setData:u,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:O,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{r(e),E(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{m({organizationId:n?.currentOrganization?.id,id:e?.organizationMemberId}),I(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{r(e),T(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(g.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)},deleteAction:{isEnabled:!0,authority:"PERSON_DELETE",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(g.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)}})]})},authority:"PERSON_VIEW"},{path:"admin/systemapplications",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/org/admin/systemapplication/all",deleteById:"api/v1/org/admin/systemapplication",save:"api/v1/org/admin/systemapplication",findById:"api/v1/org/admin/systemapplication",setData:o});return t.jsx(t.Fragment,{children:t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_CODE",fieldName:"applicationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_NAME",fieldName:"applicationName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_DESCRIPTION",fieldName:"applicationDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_PLURAL",girdIcon:"window-restore",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_DELETE"}})})},authority:"SYSTEM_APPLICATION_VIEW"},{path:"admin/systemapplicationauthorities",component:wr,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:Pr,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:vr,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:o});return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"},{path:"admin/org/apps",component:()=>{const{t:e}=y.useTranslation(),{handleGetRequest:o}=Re(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/org/admin/organizationapplicationmodule/all",deleteById:"api/org/v1/admin/organizationapplicationmodule",save:"api/v1/org/admin/organizationapplicationmodule",findById:"api/org/v1/admin/organizationapplicationmodule",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:a,data:r,hideInfoBar:!0,setData:n,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:"ORGANIZATION_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_DELETE"}})},authority:"ORGANIZATION_ADMIN"},{path:"admin/org/unit/types",component:br,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:Rr,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:Nr,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=y.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),[r,n]=d.useState([]),a=xe({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_BLUE_PRINT_CODE",fieldName:"bluePrintCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_QUERY_ID",fieldName:"queryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}}];return t.jsx(vo,{apiActions:a,data:r,setData:n,editMode:{editMode:"row",reloadAfterSave:!0},formElements:s,keyColumnName:"id",gridTitle:e("BLUE_PRINT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"BLUE_PRINT_EDIT"},deleteAction:{isEnabled:!0,authority:"BLUE_PRINT_DELETE"}})},authority:"BLUE_PRINT_VIEW"},{path:"dev/dataqueries",component:()=>{const[e,o]=d.useState(null),{Window:r,setWindowState:n}=Pe({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),a=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:s}=y.useTranslation(),[l,c]=d.useState([]),u=xe({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:c}),p=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_NAME",fieldName:"queryName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_USE_SYS_CON",fieldName:"useSysCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:a,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Lr,{selectedRecord:e})}),t.jsx(vo,{apiActions:u,rowActions:[{label:"Query Parameters",actionFn:async e=>{o(e),n(!0)},icon:"p"}],data:l,setData:c,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:p,keyColumnName:"id",gridTitle:s("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"},formProps:{formValuesChangeCallBk:(e,t,i,o,r)=>{o?"useSysCon"===o&&1==r?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"):e?.useSysCon&&t.hideField("datasourceConId")}}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:e}=Re(),o=i.useSelector(e=>e.commonStores.stores.SystemDataSourceType.data),{t:r}=y.useTranslation(),[n,a]=d.useState([]),s=xe({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:a,commonStoreKey:"SystemDataSources"}),l=[{type:"field",mode:"props",props:{fieldLabel:"ID",fieldName:"id",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_CONNECTION_NAME",fieldName:"connectionName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_TYPE",fieldName:"datasourceType",required:!0,fieldType:"combobox",options:o,comboboxValueDataType:"string",optionValueField:"value",optionDisplayField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_URL",fieldName:"datasourceUrl",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_USERNAME",fieldName:"datasourceUsername",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_PASSWORD",fieldName:"datasourcePassword",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:s,data:n,setData:a,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:l,keyColumnName:"id",gridTitle:r("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async t=>{await e({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:t.id},successCallBkFn:e=>{g.toast.success(e.data)}})}}],editAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_EDIT"},deleteAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_DELETE"}})},authority:"DATASOURCE_CONNECTION_VIEW"},{path:"dev/entityparameters",component:()=>{const{t:e}=y.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemParameterTypes.data),[r,n]=d.useState([]),a=xe({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_CODE",fieldName:"parameterCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_LABEL",fieldName:"parameterLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_TYPE",fieldName:"parameterType",required:!0,fieldType:"combobox",options:o,comboboxValueDataType:"string",optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD",fieldName:"parameterDisplayField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FIELD",fieldName:"parameterValueField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT",fieldName:"parameterValueFormat",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:a,data:r,setData:n,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:s,keyColumnName:"id",gridTitle:e("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",formProps:{formValuesChangeCallBk:(e,t,i,o,r,n)=>{o?"parameterType"===o?("combobox"===r?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField")),"date"===r||"datetime"===r?(t.showField("parameterValueFormat"),"date"===r?i.setValue("parameterValueFormat",je):i.setValue("parameterValueFormat",Ge)):(t.hideField("parameterValueFormat"),i.setValue("parameterValueFormat",null))):"parameterDataQueryId"==o?null!=r&&""!=r?(i.setValue("parameterDataset",null),t.hideField("parameterDataset")):t.showField("parameterDataset"):"parameterDataset"==o&&(null!=r&&""!=r?(i.setValue("parameterDataQueryId",null),t.hideField("parameterDataQueryId")):t.showField("parameterDataQueryId")):"combobox"===e?.parameterType?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):"date"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",je)):"datetime"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",Ge)):(i.setValue("parameterValueFormat",null),t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.hideField("parameterValueFormat"))}},editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:Mr,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:e}=y.useTranslation(),[o,r]=d.useState(null),{Window:n,setWindowState:a}=Pe({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:s,setWindowState:l}=Pe({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[c,u]=d.useState([]),p=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),h=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),m=i.useSelector(e=>e.commonStores.stores.SystemBluePrints.data),f=xe({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:u}),T=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_TYPE",fieldName:"reportType",options:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}],optionDisplayField:"value",optionValueField:"value",required:!0,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CODE",fieldName:"reportCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!1,hidden:!0,gridProps:{hidden:!0},comboboxValueDataType:"string",fieldType:"combobox",options:Dr,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CATEGORY",fieldName:"reportCategory",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Authority Code",fieldName:"reportAuthorityCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXPORT_NAME",fieldName:"reportExportName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_USE_SYS_DATASOURCE",fieldName:"useSysDatasource",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:p,optionValueField:"id",optionDisplayField:"connectionName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_BLUE_PRINT_ID",fieldName:"reportBluePrintId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:m,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:h,optionValueField:"id",optionDisplayField:"queryName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_NAME",fieldName:"reportJasperName",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",fieldType:"checkbox"}}];return t.jsxs(t.Fragment,{children:[t.jsx(n,{children:t.jsx(Do,{reportCode:o?.reportCode,resultMode:"App"})}),t.jsx(s,{children:t.jsx(xr,{selectedRecord:o})}),t.jsx(vo,{attachment:{attachmentCode:"JASPER_REPORTS",enableAttachFn:e=>"Jasper"===e?.reportType},apiActions:f,data:c,setData:u,editMode:{editMode:"modal",specs:{modalTitle:"Report",modalIcon:"file",modalWidth:300}},rowActions:[{icon:"p",label:"Report Parameters",isActionVisibleForRecord:e=>"Jasper"===e.reportType,actionFn:async(e,t)=>{r(e),l(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{r(e),a(!0)}}],formProps:{formValuesChangeCallBk:kr},formElements:T,keyColumnName:"id",gridTitle:e("REPORT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"REPORT_EDIT",preActionValidation:e=>"Jasper"!==e?.reportType||!1!==e?.useSysDatasource||e?.datasourceConId?"Jasper"!==e?.reportType||e?.reportJasperName?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(g.toast.error("You must choose the report query"),!1):(g.toast.error("You must choose the report blueprint"),!1):(g.toast.error("You must enter the jasper report name"),!1):(g.toast.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const e=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),o=i.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),[r,n]=d.useState(null),{Window:a,setWindowState:s}=Pe({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:l,setWindowState:c}=Pe({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:u,setWindowState:p}=Pe({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:h}=y.useTranslation(),[m,f]=d.useState([]),T=xe({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:f}),A=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_CODE",fieldName:"mailTemplateCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_NAME",fieldName:"mailTemplateName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{label:"subject",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_SUBJECT",fieldName:"mailSubject",required:!0,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID",fieldName:"subjectDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Recipients",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"To Recipient Query (must return list of objects with property email)",fieldName:"mailToDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"CC Recipient Query (must return list of objects with property email)",fieldName:"mailCcDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Periodical Configuration",icon:"history",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIODICAL",fieldName:"periodical",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_TYPE",fieldName:"periodType",options:o,optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_VALUE",fieldName:"periodValue",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_START_SENDING_AT",fieldName:"startSendingAt",required:!1,fieldType:"datetime"}}]}}];return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Ur,{selectedRecord:r,callBkFn:()=>{s(!1)}})}),t.jsx(l,{children:t.jsx(Fr,{selectedRecord:r,callBkFn:()=>{s(!1)}})}),t.jsx(u,{children:t.jsx(Br,{selectedRecord:r,callBkFn:()=>{p(!1)}})}),t.jsx(vo,{apiActions:T,data:m,setData:f,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:A,keyColumnName:"id",gridTitle:h("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{n(e),s(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{n(e),c(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{n(e),p(!0)}}],editAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_EDIT",preActionValidation:e=>!0!==e?.periodical||e?.periodType?!0!==e?.periodical||e?.periodValue?!(!0===e?.periodical&&!e?.startSendingAt)||(g.toast.error("You must specifiy the start sending time since this email is periodical"),!1):(g.toast.error("You must specifiy the period value since this email is periodical"),!1):(g.toast.error("You must specifiy the period type since this email is periodical"),!1)},deleteAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_DELETE"}})]})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/mailsender/config",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:o}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Name",fieldName:"configName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Engine",fieldName:"mailEngine",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o,r){jr(t,o,i)}}}},{type:"field",mode:"props",props:{fieldLabel:"Hostname",fieldName:"mailHost",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"port",fieldName:"mailPort",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"username",fieldName:"mailUsername",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"password",fieldName:"mailPassword",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Approval Receive Email",fieldName:"workFlowApprovalReceiveEmail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Protocol",fieldName:"mailProtocol",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Smtp Auth",fieldName:"isMailSmtpAuthEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Start TLS",fieldName:"isMailStarttlsEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable SSL",fieldName:"isSmtpSSlEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Client Id",fieldName:"azureGraphApiClientId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Secret",fieldName:"azureGraphApiClientSecret",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Tenant Id",fieldName:"azureGraphApiTenantId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Scope",fieldName:"azureGraphApiScope",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Email Id",fieldName:"azureGraphApiEmailId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Default",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:n,keyColumnName:"id",gridTitle:e("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,t,i)=>{jr(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[e,o]=d.useState(null),{Window:r,setWindowState:n}=Pe({windowTitle:"Document Status",windowIcon:"tag"}),{Window:a,setWindowState:s}=Pe({windowTitle:"Document Action",windowIcon:"stamp"}),l=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),c=i.useSelector(e=>e.commonStores.stores.SystemReports.data),u=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:p}=y.useTranslation(),[h,m]=d.useState([]),f=xe({commonStoreKey:"SystemWorkflows",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:m}),g=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ORG_CODE",fieldName:"orgCode",required:!1,fieldType:"combobox",options:l,optionDisplayField:"organizationCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CODE",fieldName:"documentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document En Display Name",fieldName:"documentEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document Ar Display Name",fieldName:"documentArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Report To be Attached For The Document ( will be passed a parameter called doc_id)",fieldName:"documentReportId",required:!1,fieldType:"combobox",options:c,optionDisplayField:"reportName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED",fieldName:"mailApprovalAllowed",required:!1,fieldType:"checkbox"}},{type:"group",props:{icon:"bell",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"App Visual Notifications",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON",fieldName:"appNotificationIcon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE",fieldName:"appNotificationStyle",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_VIEW_ROUTE",fieldName:"appViewRoute",required:!1,fieldType:"text"}}]}},{type:"group",props:{icon:"database",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"Related Document Database",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_USE_SYSTEM_CON",fieldName:"useSystemCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:u,optionDisplayField:"connectionName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME",fieldName:"documentDatabaseName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE",fieldName:"documentDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD",fieldName:"documentIdField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD",fieldName:"documentStatusField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD",fieldName:"documentNumberField",required:!0,fieldType:"text"}}]}}];return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Gr,{selectedRecord:e})}),t.jsx(a,{children:t.jsx(Hr,{selectedRecord:e})}),t.jsx(vo,{apiActions:f,data:h,setData:m,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{o(e),n(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{o(e),s(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:p("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:g,keyColumnName:"id",gridTitle:p("WORKFLOW_DOCUMENT_PLURAL"),girdIcon:"chart-diagram",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_DELETE"}})]})},authority:"WORKFLOW_DOCUMENT_VIEW"},{path:"dev/widgets",component:()=>{const{t:e}=y.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),r=i.useSelector(e=>e.commonStores.stores.SystemWidgetTypes.data),[n,a]=d.useState([]),s=xe({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:a}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:r,optionDisplayField:"name",optionValueField:"name"}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_NAME",fieldName:"widgetName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ICON",fieldName:"icon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_TITLE",fieldName:"title",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_DESCRIPTION",fieldName:"widgetDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HEIGHT",fieldName:"height",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDTH",fieldName:"width",required:!1,fieldType:"combobox",options:[{value:1},{value:2},{value:3},{value:4},{value:5},{value:6},{value:7},{value:8},{value:9},{value:10},{value:11},{value:12}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{style:{padding:1,border:"1px solid black",width:"100%"},label:"Data Specs",elements:[{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_FIELD",fieldName:"horizontalAxisField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!0,fieldType:"text"}}]}}];return t.jsx(vo,{apiActions:s,data:n,setData:a,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:l,keyColumnName:"id",gridTitle:e("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState(null),{Window:r,setWindowState:n}=Pe({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[a,s]=d.useState([]),l=_.useNavigate(),c=xe({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:s});return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Yr,{selectedRecord:i})}),t.jsx(vo,{apiActions:c,data:a,setData:s,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_CODE",fieldName:"dashboardCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_NAME",fieldName:"dashboardName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_TITLE",fieldName:"dashboardTitle",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",rowActions:[{label:"Widgets",icon:"chart-pie",actionFn:async e=>{o(e),n(!0)}},{label:"View",icon:"eye",actionFn:async e=>{l("/dashboard/"+e.dashboardCode)}}],gridTitle:e("DASHBOARD_PLURAL"),girdIcon:"square-poll-vertical",editAction:{isEnabled:!0,authority:"DASHBOARD_EDIT"},deleteAction:{isEnabled:!0,authority:"DASHBOARD_DELETE"}})]})},authority:"DASHBOARD_VIEW"},{path:"dashboard/:dashboardCode",component:zo},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:o});return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:e("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:e}=y.useTranslation(),[o,r]=d.useState([]),{handlePostRequest:n}=Re(),a=xe({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:r}),s=i.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:s,optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID",fieldName:"customMailAttachedReportId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY",fieldName:"customMailBody",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT",fieldName:"customMailSubject",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS",fieldName:"customRecipients",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED",fieldName:"isNotified",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME",fieldName:"notificationTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE",fieldName:"notificationMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS",fieldName:"mailParameters",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}];return t.jsx(vo,{apiActions:a,disableDefaultAction:!0,data:o,setData:r,editMode:{editMode:"none"},formElements:l,rowActions:[{actionFn:async e=>{(async e=>{await n({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{a.reloadData()}})})(e.id)},label:"Resend",icon:"repeat",confirmationMessage:"Are you sure you want to resend this email ?",isConfirmationRequired:!0}],keyColumnName:"id",gridTitle:e("MAIL_NOTIFICATION_QUEUE_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_DELETE"}})}},{path:"dev/system/authorities",component:wr},{path:"dev/system/roles",component:vr},{path:"dev/system/lookups",component:Mr},{path:"dev/system/modules",component:Pr},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:o}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CODE",fieldName:"attachmentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE",fieldName:"relatedDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:Dr,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!0,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_DIRECTORY",fieldName:"uploadDirectory",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES",fieldName:"allowedFileTypes",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES",fieldName:"attachmentCategories",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Is Category Mandatory",fieldName:"isCategoryRequired",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES",fieldName:"maxAllowedNumberOfFiles",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY",fieldName:"downloadAuthorityKey",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY",fieldName:"uploadAuthorityKey",required:!1,fieldType:"text"}}];return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},formElements:n,keyColumnName:"id",gridTitle:e("ATTACHMENT_CONFIG_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_DELETE"}})}},{path:"dev/notifications",component:()=>{const{t:e}=y.useTranslation(),[o,r]=d.useState([]),n=i.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),a=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),l=xe({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:r}),c=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_CODE",fieldName:"notificationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Notification Data Query ( will be passed a parameter call last_run_time represents last check time)",fieldName:"notificationQueryId",required:!0,fieldType:"combobox",options:a,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Users to notify Query (must have username property in the result set)",fieldName:"usersToNotifyQueryId",required:!1,fieldType:"combobox",options:a,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_AUTHORITY_TO_NOTIFY",fieldName:"authorityToNotify",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Type",fieldName:"intervalType",fieldType:"combobox",comboboxValueDataType:"string",options:n,gridProps:{hidden:!0},optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Value (minmum value 20 seconds)",fieldName:"intervalValue",gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Start Notifing Date",fieldName:"startNotificationFrom",gridProps:{hidden:!0},fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON",fieldName:"notificationIcon",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?t.jsx(m.FontAwesomeIcon,{icon:e.row.notificationIcon}):t.jsx(t.Fragment,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationArText})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_EN_TEXT",fieldName:"notificationEnText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationEnText})}}}},{type:"field",mode:"props",props:{fieldLabel:"Last Runtime",disabled:!0,fieldName:"lastIntervalRun",fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Successful Runtime",fieldName:"lastSuccessfulRun",disabled:!0,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Run Message",fieldName:"lastRunMessage",disabled:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_TEXT_COLOR",fieldName:"notificationTextColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON_COLOR",fieldName:"notificationIconColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ACTION",fieldName:"notificationAction",required:!1,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"NAVIGATION"}],optionDisplayField:"value",optionValueField:"value",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Action Payload (must be a rout in case of NAVIGATION with parameter values betweem @@)",fieldName:"notificationActionPayload",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Organization Id Field on the Notification Query result set if it supports it",fieldName:"organizationIdField",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:l,data:o,setData:r,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:c,keyColumnName:"id",gridTitle:e("NOTIFICATION_PLURAL"),girdIcon:"bell",editAction:{isEnabled:!0,authority:"NOTIFICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"NOTIFICATION_DELETE"}})}},{path:"myNotifications",component:()=>{const{UserInfo:e}=we(),o=i.useSelector(e=>e.AppLayout),{handleGetRequest:r,handlePostRequest:n}=Re(),[a,l]=d.useState([]),c=i.useSelector(e=>e.AppInfo.value),u=()=>{!0===e.isAuthenticated&&r({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{l(e.data)}})};return!0===c?.enableUINotifications&&er(u,1e3),t.jsxs(t.Fragment,{children:[t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.Box,{sx:{flex:1}}),t.jsxs("h3",{children:[t.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===o.appDirection?"Notifications":"الاشعارات"]}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(s.Button,{sx:{textTransform:"none"},onClick:async()=>{await n({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),t.jsx(s.Button,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await n({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),t.jsx(s.Box,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:t.jsx(s.Box,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:a.map((e,i)=>t.jsx(ir,{...e,showDivider:i<a.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:Fo}]],{path:"example",component:()=>{const e=xe({});return t.jsx(Uo,{apiActions:e,elements:[{mode:"props",type:"field",props:{fieldLabel:"test",fieldName:"test",fieldType:"combobox",commonStoreKey:"SystemParameterTypes",optionValueField:"value",optionDisplayField:"value"}}]})}}],Vr=e=>{const{isUserAuthorized:i,isCurrentOrganizationAuthorizedToModule:o}=we();return e?.applicationModule&&!o(e?.applicationModule)?t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):e?.authority&&!i(e.authority)?t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):t.jsx(t.Fragment,{children:e.children})},zr=()=>{const e=i.useSelector(e=>e.AppLayout),o=i.useSelector(e=>e.AppInfo.value),r=i.useSelector(e=>e.AppInfo.value.businessRoutes),{UserInfo:n}=we(),a=i.useDispatch(),{show:c,hide:u}=Ee(),p=i.useSelector(e=>e.commonStores),[h,m]=d.useState(!1),{isUserAuthorized:f}=we(),{handleGetRequest:g}=Re();return d.useEffect(()=>{p?.storeKeys&&(async()=>{c("Loading ... please wait"),m(!1);const e=p.stores,t=p.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!f(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||g({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{a(ve({storeKey:i,data:e.data}))},failureCallBkFn:()=>{a(ve({storeKey:i,data:[]}))}});m(!0),u()})()},[p.storeKeys,n?.currentOrganization]),t.jsx(l.CacheProvider,{value:"ltr"===e.appDirection?Er:_r,children:t.jsx(s.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:t.jsxs(_.Routes,{children:[o.enableAdministrationModule?Kr.map((e,i)=>t.jsx(_.Route,{path:e.path,element:t.jsx(Vr,{authority:e.authority,applicationModule:e.applicationModule,children:t.jsx(e.component,{})})},"adm"+i)):null,r.map((e,i)=>t.jsx(_.Route,{path:e.path,element:t.jsx(Vr,{authority:e.authority,children:t.jsx(e.component,{})})},"bs"+i))]})})})},Qr=c.styled("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:ae.grey[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:ae.grey[900]})}));function $r(e){const{window:o}=e,r=i.useSelector(e=>e.SideBar),n=i.useSelector(e=>e.AppInfo.value),a=i.useDispatch(),l=e=>{a(Jo(e))},d=void 0!==o?()=>o().document.body:void 0;return t.jsx(se,{container:d,anchor:"bottom",open:r.isOpened,onClose:()=>{l(!1)},onOpen:()=>{l(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[t.jsx(Qr,{}),t.jsx(s.Box,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:t.jsx(yr,{})}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[t.jsx(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:n.appName}),t.jsxs(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",n.appVersion]})]})]})})}const Zr=()=>{const{t:e}=y.useTranslation(),o=i.useSelector(e=>e.loadingMask.value),r=i.useSelector(e=>e.AppLayout);return t.jsxs(s.Backdrop,{dir:r.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:o.isOpened,children:[t.jsx(s.CircularProgress,{color:"inherit"}),t.jsx("div",{style:{marginRight:10,marginLeft:10},children:o?.message||e("DEFAULT_LOADING_MESSAGE")})]})},Jr=()=>{const e=i.useSelector(e=>e.AppInfo.value),[o,r]=d.useState(""),[n,a]=d.useState(""),[c,u]=d.useState(!1),p=i.useSelector(e=>e.UserSession.value),h=i.useDispatch(),m=async()=>{if(null==o||""==o)return void g.toast.error("username is required to proceed");if(null==n||""==n)return void g.toast.error("password is required to proceed");u(!0);let t=null;try{if(t=await T.post(`${e.apiBaseUrl}/api/auth/login`,{username:o,password:n},{withCredentials:!0}),null!=t.data&&""!==t.data){u(!1);const e={...t.data,isAuthenticated:!0};t?.data?.token&&localStorage.setItem("TOKEN",t.data.token),h(Ce.setAuthenticated(e))}}catch(e){u(!1),g.toast.error(e?.response?.data||"failed to authenticate, contact your administrator")}},f=i.useSelector(e=>e.UserSession.value),A=s.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ye} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:e?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.primaryColor||We:e.appTheme?.dark?.primaryColor||Ye},secondary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.secondaryColor||He:e.appTheme?.dark?.secondaryColor||Ke}}});return d.useEffect(()=>{(async()=>{if(e?.apiBaseUrl&&null==f.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let i=await T.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=i&&null!=i.data){const e={...i.data,isAuthenticated:!0};h(Ce.setAuthenticated(e))}else h(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){h(Ce.setUnAuthenticated())}}})()},[e,f.isAuthenticated]),t.jsx(l.ThemeProvider,{theme:A,children:0==p.isAuthenticated?t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",width:"100%",backgroundImage:"url('/bg.jpg')",backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:0}},children:t.jsx(s.Paper,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[t.jsx("img",{src:e?.appLogo,width:150,height:150}),t.jsx(s.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:e?.appName}),t.jsxs(s.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),t.jsx(s.TextField,{label:"username",sx:{width:300,m:1},value:o,onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.TextField,{label:"password",sx:{width:300,m:1},value:n,type:"password",onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.Button,{loading:c,onClick:m,variant:"contained",color:"primary",sx:{m:1},children:"login"})]})})}):t.jsxs(s.Paper,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.CircularProgress,{sx:{marginRight:1}}),t.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})},Xr=()=>{const[e,o]=d.useState({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:r}=Re(),n=i.useSelector(e=>e.AppInfo.value);return d.useEffect(()=>{if(n?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{n?.checkLicense?.endpoint&&await r({endPointURI:n.checkLicense?.endpoint,successCallBkFn:e=>{o(e.data)}})})()},n?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[n]),e.isLicensed?t.jsx(t.Fragment,{}):t.jsxs(s.Box,{sx:{flex:1,width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"fixed",top:0,background:"rgba(235, 235, 235, 0.8)",left:0,zIndex:9999},children:[t.jsx("img",{src:n.appLogo,style:{height:200,width:200}}),t.jsxs(s.Typography,{variant:"h5",children:[n.appName," - ",n.appVersion]}),t.jsx(s.Typography,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),t.jsx(s.Typography,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),t.jsxs(s.Typography,{children:["License Check @",e?.lastLicenseCheckTime||"--------"]}),t.jsxs(s.Typography,{children:["License Check Result :"," ",e?.lastLicenseCheckMessage||"--------"]})]})},en=({msalInstance:e})=>{const o=i.useSelector(e=>e.AppInfo.value);i.useSelector(e=>e.UserSession.value);const[r,n]=d.useState(!1),{handleGetRequest:a}=Re(),c=i.useDispatch(),u=async()=>{localStorage.getItem("TOKEN")?o?.apiBaseUrl&&a({endPointURI:"api/auth/userInfo",showMask:!0,successCallBkFn:e=>{if(n(!1),null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};c(Ce.setAuthenticated(t))}else c(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")},failureCallBkFn:()=>{n(!1)}}):(c(Ce.setUnAuthenticated()),n(!1))},p=i.useSelector(e=>e.UserSession.value);d.useEffect(()=>{u()},[o]);const h=s.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${o.appTheme?.dark?.primaryColor||Ye} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:o?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===o?.loginScreenStyle?.themeMode?o.appTheme?.light?.primaryColor||We:o.appTheme?.dark?.primaryColor||Ye},secondary:{main:"light"===o?.loginScreenStyle?.themeMode?o.appTheme?.light?.secondaryColor||He:o.appTheme?.dark?.secondaryColor||Ke}}});return t.jsx(l.ThemeProvider,{theme:h,children:0==p.isAuthenticated?t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",width:"100%",backgroundImage:"url('/bg.jpg')",backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:0}},children:t.jsx(s.Paper,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[t.jsx("img",{src:o?.appLogo,width:150,height:150}),t.jsx(s.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:o?.appName}),t.jsxs(s.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",o.appVersion]}),t.jsx(s.Button,{loading:r,onClick:async()=>{n(!0);const t=await e.acquireTokenPopup({scopes:o?.azureConfiguration?.scopes});t?.accessToken?(localStorage.setItem("TOKEN",t.accessToken),u()):n(!1)},variant:"contained",color:"primary",sx:{m:1},startIcon:t.jsx(m.FontAwesomeIcon,{icon:{iconName:"microsoft",prefix:"fab"}}),children:"login"})]})})}):t.jsxs(s.Paper,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.CircularProgress,{sx:{marginRight:1}}),t.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})},tn=c.styled("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>{const o=i.useSelector(e=>e.AppLayout),r=c.useTheme(),n=pe();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!n&&t?"calc(100% - 350px)":"100%",direction:o.appDirection,justifyContent:"flex-start",transition:!0===t?r.transitions.create(["margin","width"],{easing:r.transitions.easing.easeOut,duration:r.transitions.duration.enteringScreen}):r.transitions.create(["margin","width"],{easing:r.transitions.easing.sharp,duration:r.transitions.duration.leavingScreen}),marginLeft:n||"ltr"!==o.appDirection||!0!==t?0:he+"px",marginRight:n||"rtl"!==o.appDirection||!0!==t?0:he+"px"}}),on=({msalInstance:e})=>{const o=i.useSelector(e=>e.SideBar),r=i.useSelector(e=>e.AppInfo.value),n=pe(),a=i.useSelector(e=>e.UserSession),s=i.useSelector(e=>e.AppLayout);return t.jsxs(_.BrowserRouter,{children:[t.jsx(g.ToastContainer,{rtl:"rtl"===s.appDirection,draggable:!0,position:"bottom-center"}),t.jsx(Zr,{}),!0===a.value.isAuthenticated?t.jsxs(tn,{open:o.isOpened,children:[t.jsx(u,{}),t.jsx(ar,{}),n?null:t.jsx(Ir,{}),n?t.jsx($r,{}):null,t.jsx(sr,{}),t.jsx(zr,{}),t.jsx(Xr,{})]}):"AZURE"===r.authenticationMethod?t.jsx(en,{msalInstance:e}):t.jsx(Jr,{})]})},rn=f.createSlice({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,authenticationMethod:"APP",appName:null,appVersion:null,appLogo:null,muiPremiumKey:null,enableAdministrationModule:!1,enableUINotifications:!1,businessRoutes:[],businessNavigationItems:[],businessReduxReducers:{},businessCommonStoresMetaData:{},appTheme:{light:{primaryColor:"#37505C",secondaryColor:"#ff6d00"},dark:{primaryColor:"#ea690e",secondaryColor:"#74776B"}}}},reducers:{setAppInfo:(e,t)=>{e.value=t.payload}}}),nn=rn.actions;var an=rn.reducer;const sn={SystemDataSourceType:{autoLoad:!1,data:[{value:"Mysql"},{value:"Oracle"},{value:"DB2"}],url:""},SystemParameterTypes:{autoLoad:!1,url:"",data:[{value:"text"},{value:"number"},{value:"date"},{value:"datetime"},{value:"combobox"},{value:"checkbox"},{value:"html"},{value:"lookup"}]},SystemReportTypes:{autoLoad:!1,url:"",data:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}]},SystemWorkflows:{autoLoad:!0,url:"api/v1/dev/workflowdocument/all",data:[]},SystemWidgetTypes:{autoLoad:!1,url:"",data:[{name:"LineChart"},{name:"ColumnChart"},{name:"PieChart"},{name:"Card"},{name:"CircularProgress"},{name:"LinearProgress"}]},SystemTimeIntervals:{autoLoad:!1,url:"",data:[{value:"second"},{value:"minute"},{value:"hour"},{value:"day"},{value:"week"},{value:"month"},{value:"year"}]},SystemMailRecipientTypes:{autoLoad:!1,url:"",data:[{name:"To"},{name:"CC"}]},SystemOrganizations:{autoLoad:!0,url:"api/v1/public/organization/all",data:[]},SystemOrganizationRanks:{autoLoad:!0,url:"api/v1/public/organization/ranks/all",data:[]},CurrentOrganizationRanks:{autoLoad:!0,url:"api/v1/public/organizationrank/all",data:[]},SystemOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organization/units/all",data:[]},CurrentOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organizationunit/all",data:[]},SystemOrganizationUnitType:{autoLoad:!0,url:"api/v1/public/organizationunittype/all",data:[]},SystemDataSources:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/datasourceconnection/all"},SystemDataQueries:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/dataquery/all"},SystemBluePrints:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/blueprint/all"},SystemReports:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/report/all"},SystemEntityParameters:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/entityparameter/all"},SystemMailTemplates:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/mailtemplate/all"},SystemWidgets:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/widget/all"},SystemApplicationModules:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationmodule/application/all"},SystemApplicationAuthorities:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationauthority/all"},SystemApplicationRoles:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationrole/all"},persons:{autoLoad:!0,data:[],url:"api/v1/public/person/all"}},ln={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},dn=200,cn=400,un=400,pn=499,hn=500,mn=599,fn="GET",gn="POST",Tn=[ln.OPENID_SCOPE,ln.PROFILE_SCOPE,ln.OFFLINE_ACCESS_SCOPE],An=[...Tn,ln.EMAIL_SCOPE],yn="Content-Type",In="Content-Length",_n="Retry-After",En="X-AnchorMailbox",On="x-ms-request-id",Cn="x-ms-httpver",Nn="active-account-filters",Rn="common",bn="organizations",wn="consumers",Pn="access_token",Sn="xms_cc",vn="login",Ln="select_account",Mn="consent",xn="none",Dn="no_session",kn="code",Un="id_token token refresh_token",Fn="query",Bn="fragment",qn="query",jn="authorization_code",Gn="refresh_token",Wn="MSSTS",Hn="ADFS",Yn="Generic",Kn="-",Vn=".",zn={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},Qn="appmetadata",$n="1",Zn="authority-metadata",Jn=86400,Xn="config",ea="cache",ta="network",ia="hardcoded_values",oa={SCHEMA_VERSION:5,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},ra={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},na=60,aa=3600,sa="throttling",la="retry-after, h429",da="invalid_grant",ca="client_mismatch",ua="1",pa="3",ha="4",ma="2",fa="4",ga="5",Ta="0",Aa="1",ya="2",Ia="3",_a="4",Ea="pop",Oa="unexpected_error",Ca="post_request_failed",Na={[Oa]:"Unexpected error in authentication.",[Ca]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};
|
|
38
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class
|
|
39
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */const
|
|
40
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */const
|
|
41
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */var
|
|
42
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */const
|
|
43
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class
|
|
44
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class
|
|
45
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */function
|
|
46
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */function
|
|
47
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */function
|
|
48
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class
|
|
49
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */const
|
|
50
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
51
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class El{constructor(e,t,i,o,r){this.clientId=e,this.cryptoImpl=t,this.commonLogger=i.clone(Cs,Ns),this.staticAuthorityOptions=r,this.performanceClient=o}getAllAccounts(e,t){return this.buildTenantProfiles(this.getAccountsFilteredBy(e,t),t,e)}getAccountInfoFilteredBy(e,t){if(0===Object.keys(e).length||Object.values(e).every(e=>!e))return this.commonLogger.warning("getAccountInfoFilteredBy: Account filter is empty or invalid, returning null"),null;const i=this.getAllAccounts(e,t);if(i.length>1){return i.sort(e=>e.idTokenClaims?-1:1)[0]}return 1===i.length?i[0]:null}getBaseAccountInfo(e,t){const i=this.getAccountsFilteredBy(e,t);return i.length>0?i[0].getAccountInfo():null}buildTenantProfiles(e,t,i){return e.flatMap(e=>this.getTenantProfilesFromAccountEntity(e,t,i?.tenantId,i))}getTenantedAccountInfoByFilter(e,t,i,o,r){let n,a=null;if(r&&!this.tenantProfileMatchesFilter(i,r))return null;const s=this.getIdToken(e,o,t,i.tenantId);return s&&(n=rl(s.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(n,r))?null:(a=ol(e,i,n,s?.secret),a)}getTenantProfilesFromAccountEntity(e,t,i,o){const r=e.getAccountInfo();let n=r.tenantProfiles||new Map;const a=this.getTokenKeys();if(i){const e=n.get(i);if(!e)return[];n=new Map([[i,e]])}const s=[];return n.forEach(e=>{const i=this.getTenantedAccountInfoByFilter(r,a,e,t,o);i&&s.push(i)}),s}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId))&&((!t.name||e.name===t.name)&&(void 0===t.isHomeTenant||e.isHomeTenant===t.isHomeTenant))}idTokenClaimsMatchTenantProfileFilter(e,t){if(t){if(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId))return!1;if(t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint))return!1;if(t.username&&!this.matchUsername(e.preferred_username,t.username))return!1;if(t.name&&!this.matchName(e,t.name))return!1;if(t.sid&&!this.matchSid(e,t.sid))return!1}return!0}async saveCacheRecord(e,t,i){if(!e)throw Is(Xa);try{e.account&&await this.setAccount(e.account,t),e.idToken&&!1!==i?.idToken&&await this.setIdTokenCredential(e.idToken,t),e.accessToken&&!1!==i?.accessToken&&await this.saveAccessToken(e.accessToken,t),e.refreshToken&&!1!==i?.refreshToken&&await this.setRefreshTokenCredential(e.refreshToken,t),e.appMetadata&&this.setAppMetadata(e.appMetadata,t)}catch(e){throw this.commonLogger?.error("CacheManager.saveCacheRecord: failed"),e instanceof Ra?e:_l(e)}}async saveAccessToken(e,t){const i={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},o=this.getTokenKeys(),r=el.fromString(e.target);o.accessToken.forEach(e=>{if(!this.accessTokenKeyMatchesFilter(e,i,!1))return;const o=this.getAccessTokenCredential(e,t);if(o&&this.credentialMatchesFilter(o,i)){el.fromString(o.target).intersectingScopeSets(r)&&this.removeAccessToken(e,t)}}),await this.setAccessTokenCredential(e,t)}getAccountsFilteredBy(e,t){const i=this.getAccountKeys(),o=[];return i.forEach(i=>{const r=this.getAccount(i,t);if(!r)return;if(e.homeAccountId&&!this.matchHomeAccountId(r,e.homeAccountId))return;if(e.username&&!this.matchUsername(r.username,e.username))return;if(e.environment&&!this.matchEnvironment(r,e.environment))return;if(e.realm&&!this.matchRealm(r,e.realm))return;if(e.nativeAccountId&&!this.matchNativeAccountId(r,e.nativeAccountId))return;if(e.authorityType&&!this.matchAuthorityType(r,e.authorityType))return;const n={localAccountId:e?.localAccountId,name:e?.name},a=r.tenantProfiles?.filter(e=>this.tenantProfileMatchesFilter(e,n));a&&0===a.length||o.push(r)}),o}credentialMatchesFilter(e,t){if(t.clientId&&!this.matchClientId(e,t.clientId))return!1;if(t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash))return!1;if("string"==typeof t.homeAccountId&&!this.matchHomeAccountId(e,t.homeAccountId))return!1;if(t.environment&&!this.matchEnvironment(e,t.environment))return!1;if(t.realm&&!this.matchRealm(e,t.realm))return!1;if(t.credentialType&&!this.matchCredentialType(e,t.credentialType))return!1;if(t.familyId&&!this.matchFamilyId(e,t.familyId))return!1;if(t.target&&!this.matchTarget(e,t.target))return!1;if((t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash)return!1;if(e.credentialType===zn.ACCESS_TOKEN_WITH_AUTH_SCHEME){if(t.tokenType&&!this.matchTokenType(e,t.tokenType))return!1;if(t.tokenType===ra.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId))return!1}return!0}getAppMetadataFilteredBy(e){const t=this.getKeys(),i={};return t.forEach(t=>{if(!this.isAppMetadata(t))return;const o=this.getAppMetadata(t);o&&(e.environment&&!this.matchEnvironment(o,e.environment)||e.clientId&&!this.matchClientId(o,e.clientId)||(i[t]=o))}),i}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let i=null;return t.forEach(t=>{if(!this.isAuthorityMetadata(t)||-1===t.indexOf(this.clientId))return;const o=this.getAuthorityMetadata(t);o&&-1!==o.aliases.indexOf(e)&&(i=o)}),i}removeAllAccounts(e){this.getAllAccounts({},e).forEach(t=>{this.removeAccount(t,e)})}removeAccount(e,t){this.removeAccountContext(e,t);this.getAccountKeys().filter(t=>t.includes(e.homeAccountId)&&t.includes(e.environment)).forEach(e=>{this.removeItem(e,t),this.performanceClient.incrementFields({accountsRemoved:1},t)})}removeAccountContext(e,t){const i=this.getTokenKeys(),o=t=>t.includes(e.homeAccountId)&&t.includes(e.environment);i.idToken.filter(o).forEach(e=>{this.removeIdToken(e,t)}),i.accessToken.filter(o).forEach(e=>{this.removeAccessToken(e,t)}),i.refreshToken.filter(o).forEach(e=>{this.removeRefreshToken(e,t)})}removeAccessToken(e,t){const i=this.getAccessTokenCredential(e,t);if(this.removeItem(e,t),this.performanceClient.incrementFields({accessTokensRemoved:1},t),!i||i.credentialType.toLowerCase()!==zn.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||i.tokenType!==ra.POP)return;const o=i.keyId;o&&this.cryptoImpl.removeTokenBindingKey(o).catch(()=>{this.commonLogger.error(`Failed to remove token binding key ${o}`,t),this.performanceClient?.incrementFields({removeTokenBindingKeyFailure:1},t)})}removeAppMetadata(e){return this.getKeys().forEach(t=>{this.isAppMetadata(t)&&this.removeItem(t,e)}),!0}getIdToken(e,t,i,o,r){this.commonLogger.trace("CacheManager - getIdToken called");const n={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:zn.ID_TOKEN,clientId:this.clientId,realm:o},a=this.getIdTokensByFilter(n,t,i),s=a.size;if(s<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(s>1){let i=a;if(!o){const t=new Map;a.forEach((i,o)=>{i.realm===e.tenantId&&t.set(o,i)});const o=t.size;if(o<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),a.values().next().value;if(1===o)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),t.values().next().value;i=t}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),i.forEach((e,i)=>{this.removeIdToken(i,t)}),r&&t&&r.addFields({multiMatchedID:a.size},t),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),a.values().next().value}getIdTokensByFilter(e,t,i){const o=i&&i.idToken||this.getTokenKeys().idToken,r=new Map;return o.forEach(i=>{if(!this.idTokenKeyMatchesFilter(i,{clientId:this.clientId,...e}))return;const o=this.getIdTokenCredential(i,t);o&&this.credentialMatchesFilter(o,e)&&r.set(i,o)}),r}idTokenKeyMatchesFilter(e,t){const i=e.toLowerCase();return(!t.clientId||-1!==i.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==i.indexOf(t.homeAccountId.toLowerCase()))}removeIdToken(e,t){this.removeItem(e,t)}removeRefreshToken(e,t){this.removeItem(e,t)}getAccessToken(e,t,i,o){const r=t.correlationId;this.commonLogger.trace("CacheManager - getAccessToken called",r);const n=el.createSearchScopes(t.scopes),a=t.authenticationScheme||ra.BEARER,s=a.toLowerCase()!==ra.BEARER.toLowerCase()?zn.ACCESS_TOKEN_WITH_AUTH_SCHEME:zn.ACCESS_TOKEN,l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:s,clientId:this.clientId,realm:o||e.tenantId,target:n,tokenType:a,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},d=i&&i.accessToken||this.getTokenKeys().accessToken,c=[];d.forEach(e=>{if(this.accessTokenKeyMatchesFilter(e,l,!0)){const t=this.getAccessTokenCredential(e,r);t&&this.credentialMatchesFilter(t,l)&&c.push(t)}});const u=c.length;return u<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found",r),null):u>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them",r),c.forEach(e=>{this.removeAccessToken(this.generateCredentialKey(e),r)}),this.performanceClient.addFields({multiMatchedAT:c.length},r),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token",r),c[0])}accessTokenKeyMatchesFilter(e,t,i){const o=e.toLowerCase();if(t.clientId&&-1===o.indexOf(t.clientId.toLowerCase()))return!1;if(t.homeAccountId&&-1===o.indexOf(t.homeAccountId.toLowerCase()))return!1;if(t.realm&&-1===o.indexOf(t.realm.toLowerCase()))return!1;if(t.requestedClaimsHash&&-1===o.indexOf(t.requestedClaimsHash.toLowerCase()))return!1;if(t.target){const e=t.target.asArray();for(let t=0;t<e.length;t++){if(i&&!o.includes(e[t].toLowerCase()))return!1;if(!i&&o.includes(e[t].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e,t){const i=this.getTokenKeys(),o=[];return i.accessToken.forEach(i=>{if(!this.accessTokenKeyMatchesFilter(i,e,!0))return;const r=this.getAccessTokenCredential(i,t);r&&this.credentialMatchesFilter(r,e)&&o.push(r)}),o}getRefreshToken(e,t,i,o,r){this.commonLogger.trace("CacheManager - getRefreshToken called");const n=t?$n:void 0,a={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:zn.REFRESH_TOKEN,clientId:this.clientId,familyId:n},s=o&&o.refreshToken||this.getTokenKeys().refreshToken,l=[];s.forEach(e=>{if(this.refreshTokenKeyMatchesFilter(e,a)){const t=this.getRefreshTokenCredential(e,i);t&&this.credentialMatchesFilter(t,a)&&l.push(t)}});const d=l.length;return d<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(d>1&&r&&i&&r.addFields({multiMatchedRT:d},i),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),l[0])}refreshTokenKeyMatchesFilter(e,t){const i=e.toLowerCase();return(!t.familyId||-1!==i.indexOf(t.familyId.toLowerCase()))&&(!(!t.familyId&&t.clientId&&-1===i.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==i.indexOf(t.homeAccountId.toLowerCase())))}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},i=this.getAppMetadataFilteredBy(t),o=Object.keys(i).map(e=>i[e]),r=o.length;if(r<1)return null;if(r>1)throw Is(Ha);return o[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!(!t||t.familyId!==$n)}matchHomeAccountId(e,t){return!("string"!=typeof e.homeAccountId||t!==e.homeAccountId)}matchLocalAccountIdFromTokenClaims(e,t){return t===(e.oid||e.sub)}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){return!(t.toLowerCase()!==e.name?.toLowerCase())}matchUsername(e,t){return!(!e||"string"!=typeof e||t?.toLowerCase()!==e.toLowerCase())}matchUserAssertionHash(e,t){return!(!e.userAssertionHash||t!==e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const i=function(e,t){let i;const o=e.canonicalAuthority;if(o){const r=new ul(o).getUrlComponents().HostNameAndPort;i=fl(r,e.cloudDiscoveryMetadata?.metadata,Xn,t)||fl(r,hl.metadata,ia,t)||e.knownAuthorities}return i||[]}(this.staticAuthorityOptions,this.commonLogger);if(i.includes(t)&&i.includes(e.environment))return!0}const i=this.getAuthorityMetadataByAlias(t);return!!(i&&i.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!(!e.clientId||t!==e.clientId)}matchFamilyId(e,t){return!(!e.familyId||t!==e.familyId)}matchRealm(e,t){return!(e.realm?.toLowerCase()!==t.toLowerCase())}matchNativeAccountId(e,t){return!(!e.nativeAccountId||t!==e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||(e.preferred_username===t||e.upn===t)}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!(!e.authorityType||t.toLowerCase()!==e.authorityType.toLowerCase())}matchTarget(e,t){if(e.credentialType!==zn.ACCESS_TOKEN&&e.credentialType!==zn.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target)return!1;return el.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!(!e.tokenType||e.tokenType!==t)}matchKeyId(e,t){return!(!e.keyId||e.keyId!==t)}isAppMetadata(e){return-1!==e.indexOf(Qn)}isAuthorityMetadata(e){return-1!==e.indexOf(Zn)}generateAuthorityMetadataCacheKey(e){return`${Zn}-${this.clientId}-${e}`}static toObject(e,t){for(const i in t)e[i]=t[i];return e}}class Ol extends El{async setAccount(){throw Is(gs)}getAccount(){throw Is(gs)}async setIdTokenCredential(){throw Is(gs)}getIdTokenCredential(){throw Is(gs)}async setAccessTokenCredential(){throw Is(gs)}getAccessTokenCredential(){throw Is(gs)}async setRefreshTokenCredential(){throw Is(gs)}getRefreshTokenCredential(){throw Is(gs)}setAppMetadata(){throw Is(gs)}getAppMetadata(){throw Is(gs)}setServerTelemetry(){throw Is(gs)}getServerTelemetry(){throw Is(gs)}setAuthorityMetadata(){throw Is(gs)}getAuthorityMetadata(){throw Is(gs)}getAuthorityMetadataKeys(){throw Is(gs)}setThrottlingCache(){throw Is(gs)}getThrottlingCache(){throw Is(gs)}removeItem(){throw Is(gs)}getKeys(){throw Is(gs)}getAccountKeys(){throw Is(gs)}getTokenKeys(){throw Is(gs)}generateCredentialKey(){throw Is(gs)}generateAccountKey(){throw Is(gs)}}
|
|
52
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */const
|
|
37
|
+
`,ir=e=>{const o=_.useNavigate(),r=i.useSelector(e=>e.AppLayout),{handlePostRequest:n}=Re();return t.jsxs(t.Fragment,{children:[t.jsxs(s.Button,{fullWidth:!0,onClick:()=>{var t;"NAVIGATION"===e?.notificationAction&&e?.notificationActionPayload&&o(e.notificationActionPayload),e?.isNotified||(t=e.id,n({endPointURI:"api/v1/public/notification/notified",showMask:!1,parameters:{notificationQueueId:t}})),e?.setOpen&&e.setOpen(!1)},sx:{marginBottom:1,justifyContent:"flex-start",alignItems:"flex-start",color:e?.notificationTextColor,display:"flex",flexDirection:"column",cursor:"pointer"},children:[t.jsxs(s.Box,{sx:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[e?.notificationIcon?t.jsx(m.FontAwesomeIcon,{icon:e.notificationIcon,style:{marginRight:10,marginLeft:10,color:e?.notificationIconColor}}):t.jsx(t.Fragment,{}),"ltr"===r.appDirection?e.notificationEnText:e.notificationArText,t.jsx(s.Box,{sx:{flex:1}}),e?.isNotified?t.jsx(t.Fragment,{}):t.jsxs(s.Typography,{color:"warning",sx:{animation:`${tr} 2s infinite ease-in-out`,textTransform:"none",display:"inline-block"},children:[t.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:5,marginLeft:5}}),"ltr"===r.appDirection?"New":"جديد"]})]}),t.jsxs(s.Box,{sx:{width:"100%",fontSize:12,display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:[t.jsx(s.Box,{sx:{marginRight:1,marginLeft:1},children:ho(e.createTime,r.appDirection)}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(s.Box,{sx:{marginRight:1,marginLeft:1},children:e.createTime})]})]}),e?.showDivider?t.jsx(s.Divider,{flexItem:!0}):t.jsx(t.Fragment,{})]})},or=()=>{const{UserInfo:e}=we(),[o,r]=d.useState(null),{handleGetRequest:n,handlePostRequest:a}=Re(),l=_.useNavigate(),c=i.useSelector(e=>e.AppLayout),[u,p]=d.useState(!1),[h,f]=d.useState([]);er(()=>{!0===e.isAuthenticated&&n({endPointURI:"api/v1/public/notifications/new",showMask:!1,successCallBkFn:e=>{e.data.length>h.length&&g.toast.info("ltr"===c.appDirection?"You have new notifications":"لديك اشعارات جديدة",{autoClose:3e3,position:"ltr"===c.appDirection?"bottom-right":"bottom-left",closeOnClick:!0}),f(e.data)}})},1e3);return t.jsx(s.ClickAwayListener,{onClickAway:()=>{p(!1)},children:t.jsxs("div",{style:{cursor:"pointer"},children:[t.jsx(s.IconButton,{color:"inherit",onClick:e=>{r(e.currentTarget),p(!u)},sx:{marginRight:1,marginLeft:1},children:t.jsx(s.Badge,{anchorOrigin:{vertical:"top",horizontal:"ltr"===c.appDirection?"right":"left"},badgeContent:h.filter(e=>void 0===e.isNotified||null===e.isNotified).length,color:"error",children:t.jsx(m.FontAwesomeIcon,{icon:"bell"})})}),t.jsx(s.Popper,{sx:{zIndex:1200,width:"fit-content",minWidth:350,display:"flex",flexDirection:"column"},open:u,anchorEl:o,dir:c.appDirection,placement:"bottom",transition:!0,children:({TransitionProps:e})=>t.jsx(s.Fade,{...e,timeout:350,children:t.jsxs(s.Paper,{sx:{padding:1,m:1,maxHeight:500,overflow:"hidden",display:"flex",flexDirection:"column"},children:[t.jsx(s.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2,marginBottom:1},children:[t.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===c.appDirection?"Notifications":"الاشعارات"]})}),0==h.length?t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"center"},children:t.jsx(s.Box,{children:"ltr"===c.appDirection?"You don't have any notifications":"لا يوجد اشعارات"})}):t.jsx(t.Fragment,{}),t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",overflowY:"auto"},children:h.map((e,i)=>t.jsx(ir,{...e,setOpen:p,showDivider:i<h.length-1}))}),t.jsx(s.Divider,{variant:"fullWidth",flexItem:!0,children:t.jsx(s.Button,{sx:{textTransform:"none"},onClick:()=>{l("myNotifications")},children:"ltr"===c.appDirection?"Show Old Notifications":"عرض الاشعارات القديمة"})})]})})})]})})},rr=e=>{const[i,o]=d.useState(""),[r,n]=d.useState(""),[a,l]=d.useState(""),{handlePostRequest:c}=Re();return t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:400,padding:1},children:[t.jsxs(s.Box,{sx:{m:1,display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",fontWeight:"bold",fontSize:16},children:["Changing Password For : ",e?.selectedPerson?.employeeEnName]}),t.jsx(s.Divider,{variant:"fullWidth",sx:{width:"100%",marginBottom:2}}),e.isSelfService?t.jsx(De,{label:"Current Password",value:i,onChange:e=>{o(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}):t.jsx(t.Fragment,{}),t.jsx(De,{label:"New Password",value:r,onChange:e=>{n(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(De,{label:"Confirm New Password",value:a,onChange:e=>{l(e.target.value)},sx:{m:1},fullWidth:!0,type:"password"}),t.jsx(s.Button,{sx:{m:1},variant:"contained",onClick:()=>{(async()=>{!e.isSelfService||null!==i&&""!==i.trim()?null!==r&&""!==r&&null!==a&&""!==a&&r==a?await c({endPointURI:e.isSelfService?"api/v1/ss/changeMyPassword":"api/v1/admin/changeUserPassword",data:{personId:e?.selectedPerson?.id,currentPassword:i,newPassword:r},successCallBkFn:()=>{e.onSuccessCallBk(),g.toast.success("Your request has been processed successfully")},showMask:!0}):g.toast.error("You must enter new password in required fields and must be identical"):g.toast.error("You must enter your current password to process your request")})()},children:"Change Password"})]})},nr=s.styled(p,{shouldForwardProp:e=>"open"!==e})(({theme:e})=>{const t=i.useSelector(e=>e.AppLayout),o=pe();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:o?void 0:"calc(100% - 350px)",marginLeft:o||"ltr"!==t.appDirection?void 0:"350px",marginRight:o||"rtl"!==t.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}}),ar=()=>{const{Window:e,setWindowState:o}=Se({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),r=i.useSelector(e=>e.AppInfo.value),[n,a]=d.useState(null),l=()=>{a(null)},c=e=>{a(e.currentTarget)},u=i.useSelector(e=>e.AppLayout),p=i.useSelector(e=>e.SideBar),{UserSession:f}=we(),g=f.value.currentOrganization,{Window:T,setWindowState:y}=Se({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),{handleGetRequest:I}=Re(),_=pe(),E=i.useDispatch();return t.jsxs(t.Fragment,{children:[t.jsx(T,{children:t.jsx(rr,{selectedPerson:f.value,isSelfService:!0,onSuccessCallBk:()=>{y(!1)}})}),t.jsx(s.Menu,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:n,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(n),onClose:l,children:t.jsx(s.MenuItem,{onClick:()=>{y(!0),l()},children:t.jsx(s.Typography,{sx:{textAlign:"center"},children:"Change Password"})})}),t.jsx(e,{children:t.jsx(Qo,{successChangeCallBackFn:()=>{o(!1)}})}),t.jsx(nr,{position:"fixed",open:p.isOpened,children:t.jsxs(h,{children:[t.jsx(s.IconButton,{color:"inherit","aria-label":"open drawer",onClick:()=>{E(Zo())},edge:"start",sx:[{mr:"ltr"===u.appDirection?2:void 0,ml:"rtl"===u.appDirection?2:void 0},p.isOpened&&{display:"none"}],children:t.jsx(m.FontAwesomeIcon,{icon:"bars"})}),t.jsx(To,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:f?.value?.currentOrganization?.id+"",onErrorImage:"/logo.png",style:{marginRight:1,marginLeft:1}}),t.jsx(s.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:_?"":`${r.appName} - ${"ltr"===u.appDirection?g?.organizationEnName:g?.organizationArName}`}),t.jsx(s.Tooltip,{title:"light"===u.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:t.jsx(s.IconButton,{color:"inherit",onClick:()=>{E(ge.setThemeMode("light"===u.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===u.themeMode?"dark":"light")},children:"light"===u.themeMode?t.jsx(m.FontAwesomeIcon,{icon:"moon"}):t.jsx(m.FontAwesomeIcon,{icon:{prefix:"far",iconName:"sun"}})})}),t.jsx(s.Tooltip,{title:"ar"===A.language?"Change Language To English":"Change Language To Arabic",children:t.jsx(s.IconButton,{color:"inherit",onClick:()=>{let e="ar"===A.language?"en":"ar";var t;t=e,A.changeLanguage(t),localStorage.setItem("language",t),E(ge.setAppDirection("ar"===e?"rtl":"ltr"))},children:t.jsx(m.FontAwesomeIcon,{icon:"language"})})}),f.value?.userOrganizations&&f.value?.userOrganizations.length>1?t.jsx(s.Tooltip,{title:"Change Current Organization",children:t.jsx(s.IconButton,{color:"inherit",onClick:()=>{o(!0)},children:t.jsx(m.FontAwesomeIcon,{icon:"globe"})})}):t.jsx(t.Fragment,{}),!0===r?.enableUINotifications?t.jsx(or,{}):t.jsx(t.Fragment,{}),t.jsx("div",{onClick:c,style:{cursor:"pointer"},children:t.jsx(To,{showAsAvatar:!0,onErrorImage:"/no_user.png",attachmentCode:"EMPLOYEE_PHOTOS",refKey:f.value?.id+""})}),t.jsx("div",{style:{marginLeft:5,marginRight:5,cursor:"pointer"},onClick:c,children:_?"":f.value?.username}),t.jsx(s.IconButton,{color:"inherit",onClick:async()=>{try{await I({endPointURI:"api/auth/logout"})}catch(e){}E(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")},children:t.jsx(m.FontAwesomeIcon,{rotation:"rtl"===u.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},sr=s.styled("div")(({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"})),lr=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=lr(e,i.children);if(t)return t}}},dr=[...[{id:"home",icon:"home",label:"Home",action:"NAVIGATION",actionPayload:{path:"/"}},{id:"system_admin",label:"System Administration",authority:"SYSTEM_ADMIN",icon:"cog",children:[{id:"system_admin.Person",label:"PERSON_PLURAL",authority:"SYSTEM_ADMIN",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"system_admin.devtools.rolesx",label:"ROLES",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"development_admin.SystemApplication",label:"SYSTEM_APPLICATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"window-restore",action:"NAVIGATION",actionPayload:{path:"admin/systemapplications"}},{id:"development_admin.organizations",label:"ORGANIZATION_PLURAL",authority:"ORGANIZATION_ADMIN",icon:"globe",action:"NAVIGATION",actionPayload:{path:"admin/organizations"}},{id:"development_admin.organization",label:"Organization Info",authority:"DEVELOPMENT_ADMIN",icon:"globe",children:[{id:"development_admin.organization.modules",label:"Subscriped Modules",icon:"layer-group",authority:"ORGANIZATION_ADMIN",action:"NAVIGATION",actionPayload:{path:"admin/org/apps"}},{id:"development_admin.organization.unitTypes",label:"Organization Unit Types",icon:"tags",action:"NAVIGATION",actionPayload:{path:"admin/org/unit/types"}},{id:"development_admin.organization.units",label:"Organization Units",icon:"folder-tree",action:"NAVIGATION",actionPayload:{path:"admin/org/units"}},{id:"development_admin.organization.ranks",label:"Organization Ranks",icon:"street-view",action:"NAVIGATION",actionPayload:{path:"admin/org/ranks"}}]},{id:"system_admin.devtools",label:"DEVELOPMENT_TOOLS",authority:"DEVELOPMENT_ADMIN",icon:"code",children:[{id:"system_admin.devtools.modules",label:"System Modules",icon:"layer-group",action:"NAVIGATION",actionPayload:{path:"dev/system/modules"}},{id:"system_admin.devtools.authorities",label:"System Authorities",icon:"key",action:"NAVIGATION",actionPayload:{path:"dev/system/authorities"}},{id:"system_admin.devtools.roles",label:"System Roles",icon:"tag",action:"NAVIGATION",actionPayload:{path:"dev/system/roles"}},{id:"system_admin.devtools.lookups",label:"System Lookups",icon:"list-check",action:"NAVIGATION",actionPayload:{path:"dev/system/lookups"}},{id:"system_admin.devtools.DatasourceConnection",label:"DATASOURCE_CONNECTION_PLURAL",icon:"plug",action:"NAVIGATION",actionPayload:{path:"dev/datasourceconnections"}},{id:"system_admin.devtools.EntityParameter",label:"ENTITY_PARAMETER_PLURAL",icon:"p",action:"NAVIGATION",actionPayload:{path:"dev/entityparameters"}},{id:"system_admin.devtools.DataQuery",label:"DATA_QUERY_PLURAL",icon:"file-code",action:"NAVIGATION",actionPayload:{path:"dev/dataqueries"}},{id:"system_admin.devtools.Report",label:"REPORT_PLURAL",icon:"file",action:"NAVIGATION",actionPayload:{path:"dev/reports"}},{id:"system_admin.devtools.MailConfig",label:"Mail Sender Config",icon:{iconName:"paper-plane",prefix:"fas"},action:"NAVIGATION",actionPayload:{path:"dev/mailsender/config"}},{id:"system_admin.devtools.MailTemplate",label:"MAIL_TEMPLATE_PLURAL",icon:"envelope",action:"NAVIGATION",actionPayload:{path:"dev/mailtemplates"}},{id:"system_admin.devtools.WorkflowDocument",label:"WORKFLOW_DOCUMENT_PLURAL",icon:"chart-diagram",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocuments"}},{id:"system_admin.devtools.Widget",label:"WIDGET_PLURAL",icon:"chart-pie",action:"NAVIGATION",actionPayload:{path:"dev/widgets"}},{id:"system_admin.devtools.Dashboard",label:"DASHBOARD_PLURAL",icon:"square-poll-vertical",action:"NAVIGATION",actionPayload:{path:"dev/dashboards"}},{id:"system_admin.devtools.AttachmentConfig",label:"ATTACHMENT_CONFIG_PLURAL",icon:"paperclip",action:"NAVIGATION",actionPayload:{path:"dev/attachmentconfigs"}},{id:"system_admin.devtools.BluePrint",label:"BLUE_PRINT_PLURAL",icon:"fingerprint",action:"NAVIGATION",actionPayload:{path:"dev/blueprints"}},{id:"system_admin.devtools.Notification",label:"NOTIFICATION_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notifications"}}]},{id:"system_admin.followup",label:"SYSTEM_MONITORING",authority:"DEVELOPMENT_ADMIN",icon:"tv",children:[{id:"system_admin.WorkflowDocumentMailLog",label:"Action Mail Logs",icon:"envelopes-bulk",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocumentmaillogs"}},{id:"system_admin.MailNotificationQueue",label:"Mail Notification Queue",icon:"envelope-open-text",action:"NAVIGATION",actionPayload:{path:"dev/mailnotificationqueues"}},{id:"system_admin.NotificationQueue",label:"NOTIFICATION_QUEUE_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notificationqueues"}}]}]}]];function cr(){return t.jsx(W,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const ur=c.styled(J.TreeItem2Root)(({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${$.treeItemClasses.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})})),pr=c.styled(J.TreeItem2Content)(({theme:e})=>({flexDirection:"row-reverse",borderRadius:e.spacing(.7),marginBottom:e.spacing(.5),marginTop:e.spacing(.5),padding:e.spacing(.5),paddingRight:e.spacing(1),"&.Mui-expanded ":{"&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon":{color:e.palette.primary.dark,...e.applyStyles("light",{color:e.palette.primary.main})},"&::before":{content:'""',display:"block",position:"absolute",left:"16px",top:"44px",height:"calc(100% - 48px)",width:"1.5px",backgroundColor:e.palette.grey[700],...e.applyStyles("light",{backgroundColor:e.palette.grey[300]})}},"&:hover":{backgroundColor:c.alpha(e.palette.primary.main,.1),color:"white",...e.applyStyles("light",{color:e.palette.primary.main})},"&.Mui-focused, &.Mui-selected, &.Mui-selected.Mui-focused":{backgroundColor:e.palette.primary.dark,color:e.palette.primary.contrastText,...e.applyStyles("light",{backgroundColor:e.palette.primary.main})}})),hr=V.animated(z);function mr(e){const i=V.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return t.jsx(hr,{style:i,...e})}const fr=c.styled(F)({color:"inherit",fontWeight:500});function gr({icon:e,expandable:o,children:r,...n}){const{t:a}=y.useTranslation(),s=i.useSelector(e=>e.AppLayout);return t.jsxs(J.TreeItem2Label,{...n,sx:{display:"flex",alignItems:"center",padding:1},children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:"ltr"===s.appDirection?7:void 0,marginLeft:"rtl"===s.appDirection?7:void 0,fontSize:"1.2rem"},icon:e}),t.jsx(fr,{variant:"body2",sx:{fontSize:16},children:a(r)}),o&&t.jsx(cr,{})]})}const Tr=e=>Array.isArray(e)?e.length>0&&e.some(Tr):Boolean(e),Ar=ce.forwardRef(function(e,i){const{id:o,itemId:r,label:n,disabled:a,children:s,...l}=e,{getRootProps:d,getContentProps:c,getIconContainerProps:u,getCheckboxProps:p,getLabelProps:h,getGroupTransitionProps:m,getDragAndDropOverlayProps:f,status:g,publicAPI:T}=Z.useTreeItem2({id:o,itemId:r,children:s,label:n,disabled:a,rootRef:i}),A=T.getItem(r),y=Tr(s);return t.jsx(ee.TreeItem2Provider,{itemId:r,children:t.jsxs(ur,{...d(l),children:[t.jsxs(pr,{...c({className:no("content",{"Mui-expanded":g.expanded,"Mui-selected":g.selected,"Mui-focused":g.focused,"Mui-disabled":g.disabled})}),children:[t.jsx(J.TreeItem2IconContainer,{...u(),children:t.jsx(X.TreeItem2Icon,{status:g})}),t.jsx(J.TreeItem2Checkbox,{...p()}),t.jsx(gr,{...h({icon:A?.icon||"book",expandable:y&&g.expanded})}),t.jsx(te.TreeItem2DragAndDropOverlay,{...f()})]}),s&&t.jsx(mr,{...m()})]})})});function yr(){const e=_.useNavigate(),o=i.useSelector(e=>e.AppLayout),r=i.useSelector(e=>e.AppInfo.value);i.useDispatch();const n=pe(),{isUserAuthorized:a,isCurrentOrganizationAuthorizedToModule:s}=we(),l=e=>{const t=[];for(let i of e)if((void 0===i.authority||null==i.authority||a(i.authority))&&(void 0===i.applicationModule||null===i.applicationModule||s(i.applicationModule))){let e=structuredClone(i);i?.children&&(e.children=l(i.children)),t.push(e)}return t},d=[];r.enableAdministrationModule&&d.push(...structuredClone(dr)),d.push(...structuredClone(r.businessNavigationItems));const c=l(d);return t.jsx(Q.RichTreeView,{items:c,onItemClick:(t,i)=>{const o=lr(i,d);"NAVIGATION"!==o?.action||null==o?.actionPayload||void 0!==o.children&&null!==o.children&&0!=o.children.length||e(o?.actionPayload?.path||"")},sx:{height:"fit-content",flexGrow:1,maxWidth:he,direction:o.appDirection,maxHeight:n?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:Ar}})}const Ir=()=>{const e=i.useSelector(e=>e.AppInfo.value),{UserSession:o}=we(),r=o.value.currentOrganization,n=s.useTheme(),a=i.useSelector(e=>e.AppLayout),l=i.useSelector(e=>e.SideBar),d=i.useDispatch();return t.jsxs(K,{sx:{width:he,flexShrink:0,"& .MuiDrawer-paper":{width:he,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===a.appDirection?"left":"right",open:l.isOpened,children:[t.jsxs(sr,{children:[t.jsxs(s.Box,{sx:{width:"100%"},children:[t.jsx(s.Typography,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[t.jsx(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:`${e.appName} - ${"ltr"===a.appDirection?r?.organizationEnName:r?.organizationArName}`}),t.jsxs(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",e.appVersion]})]})]}),t.jsx(Y,{onClick:()=>{d(Zo())},children:"ltr"===n.direction?t.jsx(m.FontAwesomeIcon,{icon:"angle-left"}):t.jsx(m.FontAwesomeIcon,{icon:"angle-right"})})]}),t.jsx(v,{}),t.jsx(yr,{})]})},_r=re({key:"muirtl",stylisPlugins:[oe.prefixer,ie]}),Er=re({key:"mui"}),Or=e=>{const[i,o]=d.useState([]),[r,n]=d.useState([]),{handlePostRequest:a,handleGetRequest:l}=Re();d.useEffect(()=>{e.selectedRecord&&(async()=>{await l({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id,organizationId:e.selectedRecord.organizationId},successCallBkFn:e=>{o(e.data.currentRoles),n(e.data.availableRoles)}})})()},[e.selectedRecord]);return t.jsxs(t.Fragment,{children:[t.jsx(Fe,{displayField:"roleName",options:r,valueField:"id",selectedOptions:i,setSelection:o}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(s.Button,{variant:"contained",onClick:async()=>{await a({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:e.selectedRecord.id},data:i,successCallBkFn:()=>{g.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(s.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},Cr=e=>{const[o,r]=d.useState(null),{Window:n,setWindowState:a}=Se({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),s=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),l=i.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks.data),c=i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits.data),{t:u}=y.useTranslation(),[p,h]=d.useState([]),m=xe({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:h}),f=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_ID",fieldName:"organizationId",required:!0,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:l,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:c,optionValueField:"id",optionDisplayField:"fullPath"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_MEMBER_PERSON_ID",fieldName:"personId",required:!1,fieldType:"number"}}];return t.jsxs(t.Fragment,{children:[t.jsx(n,{children:t.jsx(Or,{selectedRecord:o,closeModalFn:()=>{a(!1)}})}),t.jsx(vo,{apiActions:m,hideInfoBar:!0,data:p,setData:h,editMode:{editMode:"row"},formElements:f,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{r(e),a(!0)}}],gridLoadParametersValues:{personId:e.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async t=>(t.personId=e.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},Nr=()=>{const{t:e}=y.useTranslation(),[o,r]=d.useState([]),n=xe({commonStoreKey:"CurrentOrganizationRanks",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:r}),{handleGetRequest:a}=Re(),s=i.useSelector(e=>e.commonStores.stores.SystemOrganizationRanks),l=i.useDispatch();return t.jsx(vo,{apiActions:n,data:o,hideInfoBar:!0,setData:r,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_RANK_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_ORDER",fieldName:"rankOrder",required:!0,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_CODE",fieldName:"rankCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_AR_NAME",fieldName:"rankArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_EN_NAME",fieldName:"rankEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_RANK_PLURAL",girdIcon:"street-view",editAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_EDIT",postActionCallBack:()=>{(async()=>{await a({endPointURI:s.url,showMask:!1,successCallBkFn:e=>{l(ve({storeKey:"SystemOrganizationRanks",data:e.data}))},failureCallBkFn:()=>{l(ve({storeKey:"SystemOrganizationRanks",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},Rr=()=>{const{t:e}=y.useTranslation(),[o,r]=d.useState([]),{handleGetRequest:n}=Re(),a=i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnits),s=i.useDispatch(),l=xe({findAll:"api/v1/public/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:r}),c=[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID",fieldName:"organizationUnitTypeId",required:!0,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemOrganizationUnitType.data),optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:l,data:o,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:c,keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",postActionCallBack:()=>{(async()=>{await n({endPointURI:a.url,showMask:!1,successCallBkFn:e=>{s(ve({storeKey:"SystemOrganizationUnits",data:e.data}))},failureCallBkFn:()=>{s(ve({storeKey:"SystemOrganizationUnits",data:[]}))}})})()}},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},br=()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({commonStoreKey:"SystemOrganizationUnitType",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:o});return t.jsx(vo,{apiActions:r,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID",hidden:!0,gridProps:{hidden:!0},fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER",fieldName:"organizationUnitTypeOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE",fieldName:"unitTypeCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME",fieldName:"unitTypeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME",fieldName:"unitTypeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_TYPE_PLURAL",girdIcon:"tags",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_DELETE"}})},wr=()=>{const{t:e}=y.useTranslation(),[o,r]=d.useState([]),n=xe({commonStoreKey:"SystemApplicationAuthorities",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:r}),a=i.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),{handleGetRequest:s}=Re(),l=[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID",fieldName:"systemModuleId",required:!1,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:n,data:o,hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_AUTHORITY_PLURAL",girdIcon:"key",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_DELETE"}})},Sr=()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({commonStoreKey:"SystemApplicationModules",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:o});return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_CODE",fieldName:"moduleCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_NAME",fieldName:"moduleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION",fieldName:"moduleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],keyColumnName:"id",hideInfoBar:!0,gridTitle:"SYSTEM_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_DELETE"}})},Pr=e=>{const[i,o]=d.useState([]),[r,n]=d.useState([]),{handlePostRequest:a,handleGetRequest:l}=Re();d.useEffect(()=>{e.roleId&&(async()=>{await l({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},successCallBkFn:e=>{o(e.data.selectedAuthorities),n(e.data.availableAuthorities)}})})()},[e.roleId]);return t.jsxs(t.Fragment,{children:[t.jsx(Fe,{displayField:"authorityName",options:r,valueField:"id",selectedOptions:i,setSelection:o}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[t.jsx(s.Button,{variant:"contained",onClick:async()=>{await a({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:e.roleId},data:i,successCallBkFn:()=>{g.toast.success("Your request has been proccesed successfully"),e.closeModalFn&&e.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),t.jsx(s.Button,{variant:"contained",color:"error",onClick:e.closeModalFn,children:"Cancel"})]})]})},vr=()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),[r,n]=d.useState(null),{Window:a,setWindowState:s}=Se({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),l=xe({commonStoreKey:"SystemApplicationRoles",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:o});return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Pr,{roleId:r?.id,closeModalFn:()=>{s(!1)}})}),t.jsx(vo,{apiActions:l,data:i,hideInfoBar:!0,setData:o,editMode:{editMode:"row",reloadAfterSave:!0},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_NAME",fieldName:"roleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION",fieldName:"roleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_PLURAL",girdIcon:"tag",rowActions:[{icon:"key",actionFn:async e=>{n(e),s(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},Lr=e=>{const o=i.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),{t:r}=y.useTranslation(),[n,a]=d.useState([]),s=xe({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:a}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DATA_QUERY_ID",fieldName:"dataQueryId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:s,data:n,setData:a,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,keyColumnName:"id",gridLoadParametersValues:{dataQueryId:e.selectedRecord.id},gridTitle:r("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async t=>(t.dataQueryId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},Mr=()=>{const e=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),{t:o}=y.useTranslation(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"Organization",fieldName:"organizationId",options:e,optionDisplayField:"organizationEnName",optionValueField:"id",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_TYPE",fieldName:"lookupType",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_AR_DISPLAY",fieldName:"lookupArDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_EN_DISPLAY",fieldName:"lookupEnDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_VALUE",fieldName:"lookupValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"System Application",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return t.jsx(vo,{apiActions:a,data:r,setData:n,hideInfoBar:!0,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:o("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT"},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},xr=e=>{const{t:o}=y.useTranslation(),r=i.useSelector(e=>e.commonStores.stores.SystemEntityParameters.data),[n,a]=d.useState([]),s=xe({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:a}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:r,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_REPORT_ID",fieldName:"reportId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return t.jsx(vo,{apiActions:s,data:n,hideInfoBar:!0,setData:a,gridLoadParametersValues:{reportId:e.selectedRecord.id},editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:o("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async t=>(t.reportId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},Dr=[{value:"FILE_SYSTEM"},{value:"SFTP"}],kr=(e,t,i,o,r)=>{o?("useSysDatasource"===o&&1==r?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"),"reportType"===o&&("Blueprint"===r?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===r?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===r?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))):(e?.useSysCon&&t.hideField("datasourceConId"),e?.reportType?"Blueprint"===e?.reportType?(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.showField("reportBluePrintId")):"Jasper"===e?.reportType?(t.showField("storageType"),t.showField("includeAppCodeInPath"),t.showField("useSysDatasource"),t.showField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.showField("reportJasperName"),t.hideField("reportBluePrintId")):"Excel"===e?.reportType&&(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.showField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")):(t.hideField("storageType"),t.hideField("includeAppCodeInPath"),t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportBluePrintId")))},Ur=e=>{const{t:i}=y.useTranslation(),[o,r]=d.useState([]),n=xe({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:r});return t.jsx(vo,{apiActions:n,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_TYPE",fieldName:"recipientType",required:!0,fieldType:"combobox",options:[{value:"To"},{value:"CC"}],optionDisplayField:"value",optionValueField:"value",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_MAIL",fieldName:"recipientMail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:i("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:t=>t?.recipientMail&&!po(t.recipientMail)?(g.toast.error("You must enter a valid email address"),!1):(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},Fr=e=>{const{t:o}=y.useTranslation(),[r,n]=d.useState([]),a=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),s=xe({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:n}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_NAME",fieldName:"bodyName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_ORDER",fieldName:"bodyOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT",fieldName:"bodyContent",required:!0,fieldType:"text",muiTextFieldProps:{multiline:!0,rows:6}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID",fieldName:"bodyContentDataQueryId",required:!1,fieldType:"combobox",options:a,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return t.jsx(vo,{apiActions:s,data:r,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:n,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:l,keyColumnName:"id",gridTitle:o("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},Br=e=>{const o=i.useSelector(e=>e.commonStores.stores.SystemReports.data),{t:r}=y.useTranslation(),[n,a]=d.useState([]),s=xe({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:a}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{options:o,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return t.jsx(vo,{apiActions:s,data:n,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:e.selectedRecord.id},setData:a,editMode:{editMode:"row"},formElements:l,keyColumnName:"id",gridTitle:r("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:t=>(t.mailTemplateId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},qr={Gmail:{mailHost:{isMandatory:!0,isVisible:!0},mailPort:{isMandatory:!0,isVisible:!0},mailUsername:{isMandatory:!0,isVisible:!0},mailPassword:{isMandatory:!0,isVisible:!0},mailProtocol:{isMandatory:!0,isVisible:!0},isMailSmtpAuthEnabled:{isMandatory:!0,isVisible:!0},isMailStarttlsEnabled:{isMandatory:!0,isVisible:!0},isSmtpSSlEnabled:{isMandatory:!0,isVisible:!0},azureGraphApiClientId:{isMandatory:!1,isVisible:!1},azureGraphApiClientSecret:{isMandatory:!1,isVisible:!1},azureGraphApiTenantId:{isMandatory:!1,isVisible:!1},azureGraphApiScope:{isMandatory:!1,isVisible:!1},azureGraphApiEmailId:{isMandatory:!1,isVisible:!1}},Azure:{mailHost:{isMandatory:!1,isVisible:!1},mailPort:{isMandatory:!1,isVisible:!1},mailUsername:{isMandatory:!1,isVisible:!1},mailPassword:{isMandatory:!1,isVisible:!1},mailProtocol:{isMandatory:!1,isVisible:!1},isMailSmtpAuthEnabled:{isMandatory:!1,isVisible:!1},isMailStarttlsEnabled:{isMandatory:!1,isVisible:!1},isSmtpSSlEnabled:{isMandatory:!1,isVisible:!1},azureGraphApiClientId:{isMandatory:!0,isVisible:!0},azureGraphApiClientSecret:{isMandatory:!0,isVisible:!0},azureGraphApiTenantId:{isMandatory:!0,isVisible:!0},azureGraphApiScope:{isMandatory:!0,isVisible:!0},azureGraphApiEmailId:{isMandatory:!0,isVisible:!0}}},jr=(e,t,i)=>{if(e&&qr[e]){const o=qr[e],r=Object.keys(o);for(const e of r){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("mailHost"),i.setValue("mailHost",null),t.hideField("mailPort"),i.setValue("mailPort",null),t.hideField("mailUsername"),i.setValue("mailUsername",null),t.hideField("mailPassword"),i.setValue("mailPassword",null),t.hideField("mailProtocol"),i.setValue("mailProtocol",null),t.hideField("isMailSmtpAuthEnabled"),i.setValue("isMailSmtpAuthEnabled",null),t.hideField("isMailStarttlsEnabled"),i.setValue("isMailStarttlsEnabled",null),t.hideField("isSmtpSSlEnabled"),i.setValue("isSmtpSSlEnabled",null),t.hideField("azureGraphApiClientId"),i.setValue("azureGraphApiClientId",null),t.hideField("azureGraphApiClientSecret"),i.setValue("azureGraphApiClientSecret",null),t.hideField("azureGraphApiTenantId"),i.setValue("azureGraphApiTenantId",null),t.hideField("azureGraphApiScope"),i.setValue("azureGraphApiScope",null),t.hideField("azureGraphApiEmailId"),i.setValue("azureGraphApiEmailId",null)},Gr=e=>{const{t:o}=y.useTranslation(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:n}),s=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE",fieldName:"documentStatusCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status Arabic Name",fieldName:"documentStatusArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status English Name",fieldName:"documentStatusEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER",fieldName:"documentStatusOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE",fieldName:"isZeroState",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Next Actions Query (must return array of actions in table named workflow_document_action)",fieldName:"nextActionsQueryId",required:!1,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Query (must return array of persons in table named person)",fieldName:"nextActionTakersQueryId",required:!1,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Authority",fieldName:"nextActionTakersAuthority",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:a,data:r,setData:n,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:l,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},Wr=e=>{const{t:o}=y.useTranslation(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID",fieldName:"documentActionId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!0,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:a,data:r,hideInfoBar:!0,gridLoadParametersValues:{actionId:e.selectedRecord.id},setData:n,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:t=>(t.documentActionId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},Hr=e=>{const[i,o]=d.useState(null),{Window:r,setWindowState:n}=Se({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:a}=y.useTranslation(),{handleGetRequest:s}=Re(),[l,c]=d.useState([]);d.useEffect(()=>{(async()=>{await s({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:e.selectedRecord.id},successCallBkFn:e=>{c(e.data)}})})()},[e.selectedRecord]);const[u,p]=d.useState([]),h=xe({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:p}),m=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE",fieldName:"documentActionCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action Arabic Name",fieldName:"documentActionArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action English Name",fieldName:"documentActionEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID",fieldName:"nextDocumentStatusId",required:!0,fieldType:"combobox",options:l,optionDisplayField:"documentStatusCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Post Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"postActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Pre Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"preActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT",fieldName:"requireComment",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}}];return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Wr,{selectedRecord:i})}),t.jsx(vo,{apiActions:h,data:u,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:e.selectedRecord.id},setData:p,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{o(e),n(!0)}}],formElements:m,keyColumnName:"id",gridTitle:a("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:t=>(t.workflowDocumentId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},Yr=e=>{const{t:o}=y.useTranslation(),[r,n]=d.useState([]),a=i.useSelector(e=>e.commonStores.stores.SystemWidgets.data),s=xe({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:n}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_DASHBOARD_ID",fieldName:"dashboardId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ID",fieldName:"widgetId",required:!0,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"widgetName"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ORDER",fieldName:"widgetOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:s,data:r,setData:n,editMode:{editMode:"row"},hideInfoBar:!0,formElements:l,gridLoadParametersValues:{dashboardId:e.selectedRecord.id},keyColumnName:"id",gridTitle:o("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async t=>(t.dashboardId=e.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},Kr=[...[...[{path:"admin/organizations",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({commonStoreKey:"SystemOrganizations",deleteById:"api/v1/org/admin/organization",save:"api/v1/org/admin/organization",findById:"api/v1/org/admin/organization",setData:o}),n=[{type:"field",mode:"props",props:{fieldLabel:"Logo",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(To,{showAsAvatar:!0,attachmentCode:"ORGANIZATION_LOGOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_CODE",fieldName:"organizationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_AR_NAME",fieldName:"organizationArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_EN_NAME",fieldName:"organizationEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(t.Fragment,{children:t.jsx(vo,{attachment:{attachmentCode:"ORGANIZATION_LOGOS"},apiActions:r,data:i,setData:o,editMode:{editMode:"row"},formElements:n,keyColumnName:"id",gridTitle:"ORGANIZATION_PLURAL",girdIcon:"globe",editAction:{isEnabled:!0,authority:"ORGANIZATION_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_DELETE"}})})},authority:"ORGANIZATION_VIEW"},{path:"admin/organizationmembers",component:Cr,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:o});return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_END_DATE",fieldName:"endDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID",fieldName:"organizationMemberId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_START_DATE",fieldName:"startDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_ROLE_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_DELETE"}})},authority:"ORGANIZATION_MEMBER_ROLE_VIEW"},{path:"admin/organizationranks",component:Nr,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:Rr,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:br,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:e}=y.useTranslation(),[o,r]=d.useState(null),{UserInfo:n}=we(),a=i.useSelector(e=>e.commonStores.stores.CurrentOrganizationRanks.data),l=i.useSelector(e=>e.commonStores.stores.CurrentOrganizationUnits.data),[c,u]=d.useState([]),p=xe({commonStoreKey:"persons",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:u}),[h,m]=d.useState(null),{Window:f,setWindowState:T}=Se({windowTitle:"Organizations Membership",windowIcon:"globe"}),{Window:A,setWindowState:I}=Se({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),{Window:_,setWindowState:E}=Se({windowIcon:"key",windowTitle:"Change Password",width:"fit-content",height:"fit-content"}),O=[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"id",fieldName:"id",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"organizationMemberId",fieldName:"organizationMemberId",gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Image",fieldName:"custom",fieldType:"custom",gridProps:{muiProps:{align:"center",headerAlign:"center",renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:t.jsx(To,{showAsAvatar:!0,attachmentCode:"EMPLOYEE_PHOTOS",refKey:e.id+""})})}}}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_AR_NAME",fieldName:"employeeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_EN_NAME",fieldName:"employeeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMAIL",fieldName:"email",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_MOBILE_NUMBER",fieldName:"mobileNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"rankEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:l,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"PERSON_PASSWORD",fieldName:"password",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_USERNAME",fieldName:"username",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"Ref Source",fieldName:"refSource",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"PERSON_EMPLOYEE_NUMBER",fieldName:"refSyncNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsxs(t.Fragment,{children:[t.jsx(A,{children:t.jsx(Or,{selectedRecord:h,closeModalFn:()=>{I(!1)}})}),t.jsx(f,{children:t.jsx(Cr,{selectedPerson:o})}),t.jsx(_,{children:t.jsx(rr,{selectedPerson:o,isSelfService:!1,onSuccessCallBk:()=>{E(!1)}})}),t.jsx(vo,{attachment:{attachmentCode:"EMPLOYEE_PHOTOS"},apiActions:p,data:c,setData:u,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:O,keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"key",label:"Change User Password",actionFn:async e=>{r(e),E(!0)}},{icon:"tags",label:"Current Organization User Roles",isActionDisabledForRecord:e=>!e?.organizationMemberId,actionFn:async e=>{m({organizationId:n?.currentOrganization?.id,id:e?.organizationMemberId}),I(!0)}},{icon:"globe",label:"User Organizations",actionFn:async e=>{r(e),T(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(g.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)},deleteAction:{isEnabled:!0,authority:"PERSON_DELETE",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(g.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)}})]})},authority:"PERSON_VIEW"},{path:"admin/systemapplications",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/org/admin/systemapplication/all",deleteById:"api/v1/org/admin/systemapplication",save:"api/v1/org/admin/systemapplication",findById:"api/v1/org/admin/systemapplication",setData:o});return t.jsx(t.Fragment,{children:t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_CODE",fieldName:"applicationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_NAME",fieldName:"applicationName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_DESCRIPTION",fieldName:"applicationDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_PLURAL",girdIcon:"window-restore",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_DELETE"}})})},authority:"SYSTEM_APPLICATION_VIEW"},{path:"admin/systemapplicationauthorities",component:wr,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:Sr,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:vr,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:o});return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"},{path:"admin/org/apps",component:()=>{const{t:e}=y.useTranslation(),{handleGetRequest:o}=Re(),[r,n]=d.useState([]),a=xe({findAll:"api/v1/org/admin/organizationapplicationmodule/all",deleteById:"api/org/v1/admin/organizationapplicationmodule",save:"api/v1/org/admin/organizationapplicationmodule",findById:"api/org/v1/admin/organizationapplicationmodule",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemApplicationModules.data),optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:a,data:r,hideInfoBar:!0,setData:n,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:"ORGANIZATION_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_DELETE"}})},authority:"ORGANIZATION_ADMIN"},{path:"admin/org/unit/types",component:br,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/units",component:Rr,authority:"DEVELOPMENT_ADMIN"},{path:"admin/org/ranks",component:Nr,authority:"DEVELOPMENT_ADMIN"}],...[{path:"dev/blueprints",component:()=>{const{t:e}=y.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),[r,n]=d.useState([]),a=xe({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_BLUE_PRINT_CODE",fieldName:"bluePrintCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_QUERY_ID",fieldName:"queryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}}];return t.jsx(vo,{apiActions:a,data:r,setData:n,editMode:{editMode:"row",reloadAfterSave:!0},formElements:s,keyColumnName:"id",gridTitle:e("BLUE_PRINT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"BLUE_PRINT_EDIT"},deleteAction:{isEnabled:!0,authority:"BLUE_PRINT_DELETE"}})},authority:"BLUE_PRINT_VIEW"},{path:"dev/dataqueries",component:()=>{const[e,o]=d.useState(null),{Window:r,setWindowState:n}=Se({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),a=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:s}=y.useTranslation(),[l,c]=d.useState([]),u=xe({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:c}),p=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_NAME",fieldName:"queryName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_USE_SYS_CON",fieldName:"useSysCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:a,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Lr,{selectedRecord:e})}),t.jsx(vo,{apiActions:u,rowActions:[{label:"Query Parameters",actionFn:async e=>{o(e),n(!0)},icon:"p"}],data:l,setData:c,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:p,keyColumnName:"id",gridTitle:s("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"},formProps:{formValuesChangeCallBk:(e,t,i,o,r)=>{o?"useSysCon"===o&&1==r?(t.hideField("datasourceConId"),i.setValue("datasourceConId",null)):t.showField("datasourceConId"):e?.useSysCon&&t.hideField("datasourceConId")}}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:e}=Re(),o=i.useSelector(e=>e.commonStores.stores.SystemDataSourceType.data),{t:r}=y.useTranslation(),[n,a]=d.useState([]),s=xe({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:a,commonStoreKey:"SystemDataSources"}),l=[{type:"field",mode:"props",props:{fieldLabel:"ID",fieldName:"id",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_CONNECTION_NAME",fieldName:"connectionName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_TYPE",fieldName:"datasourceType",required:!0,fieldType:"combobox",options:o,comboboxValueDataType:"string",optionValueField:"value",optionDisplayField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_URL",fieldName:"datasourceUrl",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_USERNAME",fieldName:"datasourceUsername",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_PASSWORD",fieldName:"datasourcePassword",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:s,data:n,setData:a,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:l,keyColumnName:"id",gridTitle:r("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async t=>{await e({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:t.id},successCallBkFn:e=>{g.toast.success(e.data)}})}}],editAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_EDIT"},deleteAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_DELETE"}})},authority:"DATASOURCE_CONNECTION_VIEW"},{path:"dev/entityparameters",component:()=>{const{t:e}=y.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemParameterTypes.data),[r,n]=d.useState([]),a=xe({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:n}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_CODE",fieldName:"parameterCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_LABEL",fieldName:"parameterLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_TYPE",fieldName:"parameterType",required:!0,fieldType:"combobox",options:o,comboboxValueDataType:"string",optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD",fieldName:"parameterDisplayField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FIELD",fieldName:"parameterValueField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT",fieldName:"parameterValueFormat",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:a,data:r,setData:n,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:s,keyColumnName:"id",gridTitle:e("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",formProps:{formValuesChangeCallBk:(e,t,i,o,r,n)=>{o?"parameterType"===o?("combobox"===r?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField")),"date"===r||"datetime"===r?(t.showField("parameterValueFormat"),"date"===r?i.setValue("parameterValueFormat",je):i.setValue("parameterValueFormat",Ge)):(t.hideField("parameterValueFormat"),i.setValue("parameterValueFormat",null))):"parameterDataQueryId"==o?null!=r&&""!=r?(i.setValue("parameterDataset",null),t.hideField("parameterDataset")):t.showField("parameterDataset"):"parameterDataset"==o&&(null!=r&&""!=r?(i.setValue("parameterDataQueryId",null),t.hideField("parameterDataQueryId")):t.showField("parameterDataQueryId")):"combobox"===e?.parameterType?(i.setValue("parameterValueFormat",null),t.showField("parameterDataQueryId"),t.showField("parameterDataset"),t.showField("parameterDisplayField"),t.showField("parameterValueField"),t.hideField("parameterValueFormat")):"date"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",je)):"datetime"===e?.parameterType?(t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.showField("parameterValueFormat"),i.setValue("parameterValueFormat",Ge)):(i.setValue("parameterValueFormat",null),t.hideField("parameterDataQueryId"),t.hideField("parameterDataset"),t.hideField("parameterDisplayField"),t.hideField("parameterValueField"),t.hideField("parameterValueFormat"))}},editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:Mr,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:e}=y.useTranslation(),[o,r]=d.useState(null),{Window:n,setWindowState:a}=Se({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:s,setWindowState:l}=Se({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[c,u]=d.useState([]),p=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),h=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),m=i.useSelector(e=>e.commonStores.stores.SystemBluePrints.data),f=xe({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:u}),T=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_TYPE",fieldName:"reportType",options:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}],optionDisplayField:"value",optionValueField:"value",required:!0,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CODE",fieldName:"reportCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!1,hidden:!0,gridProps:{hidden:!0},comboboxValueDataType:"string",fieldType:"combobox",options:Dr,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CATEGORY",fieldName:"reportCategory",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Authority Code",fieldName:"reportAuthorityCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXPORT_NAME",fieldName:"reportExportName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_USE_SYS_DATASOURCE",fieldName:"useSysDatasource",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:p,optionValueField:"id",optionDisplayField:"connectionName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_BLUE_PRINT_ID",fieldName:"reportBluePrintId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:m,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,required:!1,fieldType:"combobox",options:h,optionValueField:"id",optionDisplayField:"queryName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_NAME",fieldName:"reportJasperName",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",fieldType:"checkbox"}}];return t.jsxs(t.Fragment,{children:[t.jsx(n,{children:t.jsx(Do,{reportCode:o?.reportCode,resultMode:"App"})}),t.jsx(s,{children:t.jsx(xr,{selectedRecord:o})}),t.jsx(vo,{attachment:{attachmentCode:"JASPER_REPORTS",enableAttachFn:e=>"Jasper"===e?.reportType},apiActions:f,data:c,setData:u,editMode:{editMode:"modal",specs:{modalTitle:"Report",modalIcon:"file",modalWidth:300}},rowActions:[{icon:"p",label:"Report Parameters",isActionVisibleForRecord:e=>"Jasper"===e.reportType,actionFn:async(e,t)=>{r(e),l(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{r(e),a(!0)}}],formProps:{formValuesChangeCallBk:kr},formElements:T,keyColumnName:"id",gridTitle:e("REPORT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"REPORT_EDIT",preActionValidation:e=>"Jasper"!==e?.reportType||!1!==e?.useSysDatasource||e?.datasourceConId?"Jasper"!==e?.reportType||e?.reportJasperName?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(g.toast.error("You must choose the report query"),!1):(g.toast.error("You must choose the report blueprint"),!1):(g.toast.error("You must enter the jasper report name"),!1):(g.toast.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const e=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),o=i.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),[r,n]=d.useState(null),{Window:a,setWindowState:s}=Se({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:l,setWindowState:c}=Se({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:u,setWindowState:p}=Se({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:h}=y.useTranslation(),[m,f]=d.useState([]),T=xe({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:f}),A=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_CODE",fieldName:"mailTemplateCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_NAME",fieldName:"mailTemplateName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{label:"subject",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_SUBJECT",fieldName:"mailSubject",required:!0,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID",fieldName:"subjectDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Recipients",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"To Recipient Query (must return list of objects with property email)",fieldName:"mailToDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"CC Recipient Query (must return list of objects with property email)",fieldName:"mailCcDataQueryId",required:!1,fieldType:"combobox",options:e,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Periodical Configuration",icon:"history",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIODICAL",fieldName:"periodical",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_TYPE",fieldName:"periodType",options:o,optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox",comboboxValueDataType:"string"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_VALUE",fieldName:"periodValue",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_START_SENDING_AT",fieldName:"startSendingAt",required:!1,fieldType:"datetime"}}]}}];return t.jsxs(t.Fragment,{children:[t.jsx(a,{children:t.jsx(Ur,{selectedRecord:r,callBkFn:()=>{s(!1)}})}),t.jsx(l,{children:t.jsx(Fr,{selectedRecord:r,callBkFn:()=>{s(!1)}})}),t.jsx(u,{children:t.jsx(Br,{selectedRecord:r,callBkFn:()=>{p(!1)}})}),t.jsx(vo,{apiActions:T,data:m,setData:f,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:A,keyColumnName:"id",gridTitle:h("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{n(e),s(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{n(e),c(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{n(e),p(!0)}}],editAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_EDIT",preActionValidation:e=>!0!==e?.periodical||e?.periodType?!0!==e?.periodical||e?.periodValue?!(!0===e?.periodical&&!e?.startSendingAt)||(g.toast.error("You must specifiy the start sending time since this email is periodical"),!1):(g.toast.error("You must specifiy the period value since this email is periodical"),!1):(g.toast.error("You must specifiy the period type since this email is periodical"),!1)},deleteAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_DELETE"}})]})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/mailsender/config",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:o}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Name",fieldName:"configName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Engine",fieldName:"mailEngine",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o,r){jr(t,o,i)}}}},{type:"field",mode:"props",props:{fieldLabel:"Hostname",fieldName:"mailHost",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"port",fieldName:"mailPort",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"username",fieldName:"mailUsername",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"password",fieldName:"mailPassword",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Approval Receive Email",fieldName:"workFlowApprovalReceiveEmail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Protocol",fieldName:"mailProtocol",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Smtp Auth",fieldName:"isMailSmtpAuthEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Start TLS",fieldName:"isMailStarttlsEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable SSL",fieldName:"isSmtpSSlEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Client Id",fieldName:"azureGraphApiClientId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Secret",fieldName:"azureGraphApiClientSecret",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Tenant Id",fieldName:"azureGraphApiTenantId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Scope",fieldName:"azureGraphApiScope",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Email Id",fieldName:"azureGraphApiEmailId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Default",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:n,keyColumnName:"id",gridTitle:e("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,t,i)=>{jr(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[e,o]=d.useState(null),{Window:r,setWindowState:n}=Se({windowTitle:"Document Status",windowIcon:"tag"}),{Window:a,setWindowState:s}=Se({windowTitle:"Document Action",windowIcon:"stamp"}),l=i.useSelector(e=>e.commonStores.stores.SystemOrganizations.data),c=i.useSelector(e=>e.commonStores.stores.SystemReports.data),u=i.useSelector(e=>e.commonStores.stores.SystemDataSources.data),{t:p}=y.useTranslation(),[h,m]=d.useState([]),f=xe({commonStoreKey:"SystemWorkflows",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:m}),g=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ORG_CODE",fieldName:"orgCode",required:!1,fieldType:"combobox",options:l,optionDisplayField:"organizationCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CODE",fieldName:"documentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document En Display Name",fieldName:"documentEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document Ar Display Name",fieldName:"documentArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Report To be Attached For The Document ( will be passed a parameter called doc_id)",fieldName:"documentReportId",required:!1,fieldType:"combobox",options:c,optionDisplayField:"reportName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED",fieldName:"mailApprovalAllowed",required:!1,fieldType:"checkbox"}},{type:"group",props:{icon:"bell",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"App Visual Notifications",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON",fieldName:"appNotificationIcon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE",fieldName:"appNotificationStyle",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_VIEW_ROUTE",fieldName:"appViewRoute",required:!1,fieldType:"text"}}]}},{type:"group",props:{icon:"database",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"Related Document Database",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_USE_SYSTEM_CON",fieldName:"useSystemCon",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:u,optionDisplayField:"connectionName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME",fieldName:"documentDatabaseName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE",fieldName:"documentDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD",fieldName:"documentIdField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD",fieldName:"documentStatusField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD",fieldName:"documentNumberField",required:!0,fieldType:"text"}}]}}];return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Gr,{selectedRecord:e})}),t.jsx(a,{children:t.jsx(Hr,{selectedRecord:e})}),t.jsx(vo,{apiActions:f,data:h,setData:m,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{o(e),n(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{o(e),s(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:p("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:g,keyColumnName:"id",gridTitle:p("WORKFLOW_DOCUMENT_PLURAL"),girdIcon:"chart-diagram",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_DELETE"}})]})},authority:"WORKFLOW_DOCUMENT_VIEW"},{path:"dev/widgets",component:()=>{const{t:e}=y.useTranslation(),o=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),r=i.useSelector(e=>e.commonStores.stores.SystemWidgetTypes.data),[n,a]=d.useState([]),s=xe({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:a}),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:r,optionDisplayField:"name",optionValueField:"name"}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_NAME",fieldName:"widgetName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ICON",fieldName:"icon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_TITLE",fieldName:"title",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_DESCRIPTION",fieldName:"widgetDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HEIGHT",fieldName:"height",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDTH",fieldName:"width",required:!1,fieldType:"combobox",options:[{value:1},{value:2},{value:3},{value:4},{value:5},{value:6},{value:7},{value:8},{value:9},{value:10},{value:11},{value:12}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{style:{padding:1,border:"1px solid black",width:"100%"},label:"Data Specs",elements:[{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_FIELD",fieldName:"horizontalAxisField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!0,fieldType:"text"}}]}}];return t.jsx(vo,{apiActions:s,data:n,setData:a,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:l,keyColumnName:"id",gridTitle:e("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState(null),{Window:r,setWindowState:n}=Se({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[a,s]=d.useState([]),l=_.useNavigate(),c=xe({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:s});return t.jsxs(t.Fragment,{children:[t.jsx(r,{children:t.jsx(Yr,{selectedRecord:i})}),t.jsx(vo,{apiActions:c,data:a,setData:s,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_CODE",fieldName:"dashboardCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_NAME",fieldName:"dashboardName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_TITLE",fieldName:"dashboardTitle",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",rowActions:[{label:"Widgets",icon:"chart-pie",actionFn:async e=>{o(e),n(!0)}},{label:"View",icon:"eye",actionFn:async e=>{l("/dashboard/"+e.dashboardCode)}}],gridTitle:e("DASHBOARD_PLURAL"),girdIcon:"square-poll-vertical",editAction:{isEnabled:!0,authority:"DASHBOARD_EDIT"},deleteAction:{isEnabled:!0,authority:"DASHBOARD_DELETE"}})]})},authority:"DASHBOARD_VIEW"},{path:"dashboard/:dashboardCode",component:zo},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:o});return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:e("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:e}=y.useTranslation(),[o,r]=d.useState([]),{handlePostRequest:n}=Re(),a=xe({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:r}),s=i.useSelector(e=>e.commonStores.stores.SystemMailTemplates.data),l=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:s,optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID",fieldName:"customMailAttachedReportId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY",fieldName:"customMailBody",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT",fieldName:"customMailSubject",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS",fieldName:"customRecipients",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED",fieldName:"isNotified",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME",fieldName:"notificationTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE",fieldName:"notificationMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS",fieldName:"mailParameters",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}];return t.jsx(vo,{apiActions:a,disableDefaultAction:!0,data:o,setData:r,editMode:{editMode:"none"},formElements:l,rowActions:[{actionFn:async e=>{(async e=>{await n({endPointURI:"api/v1/public/mailNotification/resend",showMask:!0,parameters:{mailNotificationQueueId:e},successCallBkFn:e=>{a.reloadData()}})})(e.id)},label:"Resend",icon:"repeat",confirmationMessage:"Are you sure you want to resend this email ?",isConfirmationRequired:!0}],keyColumnName:"id",gridTitle:e("MAIL_NOTIFICATION_QUEUE_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_DELETE"}})}},{path:"dev/system/authorities",component:wr},{path:"dev/system/roles",component:vr},{path:"dev/system/lookups",component:Mr},{path:"dev/system/modules",component:Sr},{path:"dev/attachmentconfigs",component:()=>{const{t:e}=y.useTranslation(),[i,o]=d.useState([]),r=xe({findAll:"api/v1/dev/attachmentconfig/all",deleteById:"api/v1/dev/attachmentconfig",save:"api/v1/dev/attachmentconfig",findById:"api/v1/dev/attachmentconfig",setData:o}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CODE",fieldName:"attachmentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE",fieldName:"relatedDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_STORAGE_TYPE",fieldName:"storageType",required:!0,fieldType:"combobox",comboboxValueDataType:"string",options:Dr,optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Include App Code in attachment path",fieldName:"includeAppCodeInPath",required:!0,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_DIRECTORY",fieldName:"uploadDirectory",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES",fieldName:"allowedFileTypes",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES",fieldName:"attachmentCategories",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Is Category Mandatory",fieldName:"isCategoryRequired",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES",fieldName:"maxAllowedNumberOfFiles",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY",fieldName:"downloadAuthorityKey",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY",fieldName:"uploadAuthorityKey",required:!1,fieldType:"text"}}];return t.jsx(vo,{apiActions:r,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:"paperclip",modalTitle:"Attachment Configuration"}},formElements:n,keyColumnName:"id",gridTitle:e("ATTACHMENT_CONFIG_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"ATTACHMENT_CONFIG_DELETE"}})}},{path:"dev/notifications",component:()=>{const{t:e}=y.useTranslation(),[o,r]=d.useState([]),n=i.useSelector(e=>e.commonStores.stores.SystemTimeIntervals.data),a=i.useSelector(e=>e.commonStores.stores.SystemDataQueries.data),l=xe({findAll:"api/v1/dev/notification/all",deleteById:"api/v1/dev/notification",save:"api/v1/dev/notification",findById:"api/v1/dev/notification",setData:r}),c=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_CODE",fieldName:"notificationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Notification Data Query ( will be passed a parameter call last_run_time represents last check time)",fieldName:"notificationQueryId",required:!0,fieldType:"combobox",options:a,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Users to notify Query (must have username property in the result set)",fieldName:"usersToNotifyQueryId",required:!1,fieldType:"combobox",options:a,optionDisplayField:"queryName",gridProps:{hidden:!0},optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_AUTHORITY_TO_NOTIFY",fieldName:"authorityToNotify",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Type",fieldName:"intervalType",fieldType:"combobox",comboboxValueDataType:"string",options:n,gridProps:{hidden:!0},optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"Interval Value (minmum value 20 seconds)",fieldName:"intervalValue",gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"Start Notifing Date",fieldName:"startNotificationFrom",gridProps:{hidden:!0},fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON",fieldName:"notificationIcon",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationIconColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationIcon?t.jsx(m.FontAwesomeIcon,{icon:e.row.notificationIcon}):t.jsx(t.Fragment,{})})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_AR_TEXT",fieldName:"notificationArText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationArText})}}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_EN_TEXT",fieldName:"notificationEnText",required:!0,fieldType:"text",gridProps:{muiProps:{renderCell:e=>t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",color:e?.row?.notificationTextColor,justifyContent:"center",height:"100%"},children:e?.row?.notificationEnText})}}}},{type:"field",mode:"props",props:{fieldLabel:"Last Runtime",disabled:!0,fieldName:"lastIntervalRun",fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Successful Runtime",fieldName:"lastSuccessfulRun",disabled:!0,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"Last Run Message",fieldName:"lastRunMessage",disabled:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_TEXT_COLOR",fieldName:"notificationTextColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ICON_COLOR",fieldName:"notificationIconColor",required:!1,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_NOTIFICATION_ACTION",fieldName:"notificationAction",required:!1,fieldType:"combobox",comboboxValueDataType:"string",options:[{value:"NAVIGATION"}],optionDisplayField:"value",optionValueField:"value",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Action Payload (must be a rout in case of NAVIGATION with parameter values betweem @@)",fieldName:"notificationActionPayload",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Organization Id Field on the Notification Query result set if it supports it",fieldName:"organizationIdField",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"NOTIFICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return t.jsx(vo,{apiActions:l,data:o,setData:r,editMode:{editMode:"modal",specs:{modalIcon:"bell",modalTitle:"System Notification",modalWidth:"300"}},formElements:c,keyColumnName:"id",gridTitle:e("NOTIFICATION_PLURAL"),girdIcon:"bell",editAction:{isEnabled:!0,authority:"NOTIFICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"NOTIFICATION_DELETE"}})}},{path:"myNotifications",component:()=>{const{UserInfo:e}=we(),o=i.useSelector(e=>e.AppLayout),{handleGetRequest:r,handlePostRequest:n}=Re(),[a,l]=d.useState([]),c=i.useSelector(e=>e.AppInfo.value),u=()=>{!0===e.isAuthenticated&&r({endPointURI:"api/v1/public/notifications",showMask:!1,successCallBkFn:e=>{l(e.data)}})};return!0===c?.enableUINotifications&&er(u,1e3),t.jsxs(t.Fragment,{children:[t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.Box,{sx:{flex:1}}),t.jsxs("h3",{children:[t.jsx(m.FontAwesomeIcon,{icon:"bell",style:{marginRight:10,marginLeft:10}}),"ltr"===o.appDirection?"Notifications":"الاشعارات"]}),t.jsx(s.Box,{sx:{flex:1}}),t.jsx(s.Button,{sx:{textTransform:"none"},onClick:async()=>{await n({endPointURI:"api/v1/public/notification/all/notified",showMask:!0})},children:"Mark All Read"}),t.jsx(s.Button,{color:"error",sx:{textTransform:"none"},onClick:async()=>{await n({endPointURI:"api/v1/public/notification/all/archive",showMask:!0})},children:"Delete All"})]}),t.jsx(s.Box,{sx:{flex:1,width:"100%",display:"flex",overflowY:"auto"},children:t.jsx(s.Box,{sx:{flexGrow:1,width:"fit-content",display:"flex",flexDirection:"column",overflowY:"auto",alignItems:"center",justifyContent:"flex-start"},children:a.map((e,i)=>t.jsx(ir,{...e,showDivider:i<a.length-1}))})})]})}},{path:"workflow/:workflowDocumentCode/:refDocumentId",component:Fo}]]],Vr=e=>{const{isUserAuthorized:i,isCurrentOrganizationAuthorizedToModule:o}=we();return e?.applicationModule&&!o(e?.applicationModule)?t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"Your organization didn't subscribe for this system module"]})}):e?.authority&&!i(e.authority)?t.jsx(s.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:t.jsxs("h2",{children:[t.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):t.jsx(t.Fragment,{children:e.children})},zr=()=>{const e=i.useSelector(e=>e.AppLayout),o=i.useSelector(e=>e.AppInfo.value),r=i.useSelector(e=>e.AppInfo.value.businessRoutes),{UserInfo:n}=we(),a=i.useDispatch(),{show:c,hide:u}=Ee(),p=i.useSelector(e=>e.commonStores),[h,m]=d.useState(!1),{isUserAuthorized:f}=we(),{handleGetRequest:g}=Re();return d.useEffect(()=>{p?.storeKeys&&(async()=>{c("Loading ... please wait"),m(!1);const e=p.stores,t=p.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!f(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||g({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{a(ve({storeKey:i,data:e.data}))},failureCallBkFn:()=>{a(ve({storeKey:i,data:[]}))}});m(!0),u()})()},[p.storeKeys,n?.currentOrganization]),t.jsx(l.CacheProvider,{value:"ltr"===e.appDirection?Er:_r,children:t.jsx(s.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:t.jsxs(_.Routes,{children:[o.enableAdministrationModule?Kr.map((e,i)=>t.jsx(_.Route,{path:e.path,element:t.jsx(Vr,{authority:e.authority,applicationModule:e.applicationModule,children:t.jsx(e.component,{})})},"adm"+i)):null,r.map((e,i)=>t.jsx(_.Route,{path:e.path,element:t.jsx(Vr,{authority:e.authority,children:t.jsx(e.component,{})})},"bs"+i))]})})})},Qr=c.styled("div")(({theme:e})=>({width:30,height:6,margin:10,backgroundColor:ae.grey[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:ae.grey[900]})}));function $r(e){const{window:o}=e,r=i.useSelector(e=>e.SideBar),n=i.useSelector(e=>e.AppInfo.value),a=i.useDispatch(),l=e=>{a(Jo(e))},d=void 0!==o?()=>o().document.body:void 0;return t.jsx(se,{container:d,anchor:"bottom",open:r.isOpened,onClose:()=>{l(!1)},onOpen:()=>{l(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[t.jsx(Qr,{}),t.jsx(s.Box,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:t.jsx(yr,{})}),t.jsxs(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[t.jsx(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:n.appName}),t.jsxs(s.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",n.appVersion]})]})]})})}const Zr=()=>{const{t:e}=y.useTranslation(),o=i.useSelector(e=>e.loadingMask.value),r=i.useSelector(e=>e.AppLayout);return t.jsxs(s.Backdrop,{dir:r.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:o.isOpened,children:[t.jsx(s.CircularProgress,{color:"inherit"}),t.jsx("div",{style:{marginRight:10,marginLeft:10},children:o?.message||e("DEFAULT_LOADING_MESSAGE")})]})},Jr=()=>{const e=i.useSelector(e=>e.AppInfo.value),[o,r]=d.useState(""),[n,a]=d.useState(""),[c,u]=d.useState(!1),p=i.useSelector(e=>e.UserSession.value),h=i.useDispatch(),m=async()=>{if(null==o||""==o)return void g.toast.error("username is required to proceed");if(null==n||""==n)return void g.toast.error("password is required to proceed");u(!0);let t=null;try{if(t=await T.post(`${e.apiBaseUrl}/api/auth/login`,{username:o,password:n},{withCredentials:!0}),null!=t.data&&""!==t.data){u(!1);const e={...t.data,isAuthenticated:!0};t?.data?.token&&localStorage.setItem("TOKEN",t.data.token),h(Ce.setAuthenticated(e))}}catch(e){u(!1),g.toast.error(e?.response?.data||"failed to authenticate, contact your administrator")}},f=i.useSelector(e=>e.UserSession.value),A=s.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ye} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:e?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.primaryColor||We:e.appTheme?.dark?.primaryColor||Ye},secondary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.secondaryColor||He:e.appTheme?.dark?.secondaryColor||Ke}}});return d.useEffect(()=>{(async()=>{if(e?.apiBaseUrl&&null==f.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let i=await T.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=i&&null!=i.data){const e={...i.data,isAuthenticated:!0};h(Ce.setAuthenticated(e))}else h(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){h(Ce.setUnAuthenticated())}}})()},[e,f.isAuthenticated]),t.jsx(l.ThemeProvider,{theme:A,children:0==p.isAuthenticated?t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",width:"100%",backgroundImage:"url('/bg.jpg')",backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:0}},children:t.jsx(s.Paper,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[t.jsx("img",{src:e?.appLogo,width:150,height:150}),t.jsx(s.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:e?.appName}),t.jsxs(s.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),t.jsx(s.TextField,{label:"username",sx:{width:300,m:1},value:o,onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.TextField,{label:"password",sx:{width:300,m:1},value:n,type:"password",onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.Button,{loading:c,onClick:m,variant:"contained",color:"primary",sx:{m:1},children:"login"})]})})}):t.jsxs(s.Paper,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.CircularProgress,{sx:{marginRight:1}}),t.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})},Xr=()=>{const[e,o]=d.useState({isLicensed:!0,lastLicenseCheckMessage:"",lastLicenseCheckTime:""}),{handleGetRequest:r}=Re(),n=i.useSelector(e=>e.AppInfo.value);return d.useEffect(()=>{if(n?.checkLicense?.endpoint){const e=setInterval(()=>{(async()=>{n?.checkLicense?.endpoint&&await r({endPointURI:n.checkLicense?.endpoint,successCallBkFn:e=>{o(e.data)}})})()},n?.checkLicense?.interval||6e4);return()=>{clearInterval(e),console.log("Interval cleared")}}},[n]),e.isLicensed?t.jsx(t.Fragment,{}):t.jsxs(s.Box,{sx:{flex:1,width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"fixed",top:0,background:"rgba(235, 235, 235, 0.8)",left:0,zIndex:9999},children:[t.jsx("img",{src:n.appLogo,style:{height:200,width:200}}),t.jsxs(s.Typography,{variant:"h5",children:[n.appName," - ",n.appVersion]}),t.jsx(s.Typography,{variant:"h6",color:"error",children:"Your license is missing or has expired."}),t.jsx(s.Typography,{variant:"h6",color:"error",children:"Please reach out to your vendor for assistance."}),t.jsxs(s.Typography,{children:["License Check @",e?.lastLicenseCheckTime||"--------"]}),t.jsxs(s.Typography,{children:["License Check Result :"," ",e?.lastLicenseCheckMessage||"--------"]})]})},en=({msalInstance:e})=>{const o=i.useSelector(e=>e.AppInfo.value);i.useSelector(e=>e.UserSession.value);const[r,n]=d.useState(!1),{handleGetRequest:a}=Re(),c=i.useDispatch(),u=async()=>{localStorage.getItem("TOKEN")?o?.apiBaseUrl&&a({endPointURI:"api/auth/userInfo",showMask:!0,successCallBkFn:e=>{if(n(!1),null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};c(Ce.setAuthenticated(t))}else c(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")},failureCallBkFn:()=>{n(!1)}}):(c(Ce.setUnAuthenticated()),n(!1))},p=i.useSelector(e=>e.UserSession.value);d.useEffect(()=>{u()},[o]);const h=s.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${o.appTheme?.dark?.primaryColor||Ye} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:o?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===o?.loginScreenStyle?.themeMode?o.appTheme?.light?.primaryColor||We:o.appTheme?.dark?.primaryColor||Ye},secondary:{main:"light"===o?.loginScreenStyle?.themeMode?o.appTheme?.light?.secondaryColor||He:o.appTheme?.dark?.secondaryColor||Ke}}});return t.jsx(l.ThemeProvider,{theme:h,children:0==p.isAuthenticated?t.jsx(s.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",width:"100%",backgroundImage:"url('/bg.jpg')",backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:0}},children:t.jsx(s.Paper,{sx:{display:"flex",width:"fit-content",padding:2,height:"fit-content",borderRadius:5,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:1,p:4},children:t.jsxs(s.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[t.jsx("img",{src:o?.appLogo,width:150,height:150}),t.jsx(s.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:o?.appName}),t.jsxs(s.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",o.appVersion]}),t.jsx(s.Button,{loading:r,onClick:async()=>{n(!0);const t=await e.acquireTokenPopup({scopes:o?.azureConfiguration?.scopes});t?.accessToken?(localStorage.setItem("TOKEN",t.accessToken),u()):n(!1)},variant:"contained",color:"primary",sx:{m:1},startIcon:t.jsx(m.FontAwesomeIcon,{icon:{iconName:"microsoft",prefix:"fab"}}),children:"login"})]})})}):t.jsxs(s.Paper,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.CircularProgress,{sx:{marginRight:1}}),t.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})},tn=()=>{const e=i.useSelector(e=>e.AppInfo.value),[o,r]=d.useState(""),[n,a]=d.useState(""),[c,u]=d.useState(!1),p=i.useSelector(e=>e.UserSession.value),h=i.useDispatch(),m=async()=>{if(null==o||""==o)return void g.toast.error("username is required to proceed");if(null==n||""==n)return void g.toast.error("password is required to proceed");u(!0);let t=null;try{if(t=await T.post(`${e.apiBaseUrl}/api/auth/login`,{username:o,password:n},{withCredentials:!0}),null!=t.data&&""!==t.data){u(!1);const e={...t.data,isAuthenticated:!0};t?.data?.token&&localStorage.setItem("TOKEN",t.data.token),h(Ce.setAuthenticated(e))}}catch(e){u(!1),g.toast.error(e?.response?.data||"failed to authenticate, contact your administrator")}},f=i.useSelector(e=>e.UserSession.value),A=s.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ye} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:e?.loginScreenStyle?.themeMode||"dark",primary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.primaryColor||We:e.appTheme?.dark?.primaryColor||Ye},secondary:{main:"light"===e?.loginScreenStyle?.themeMode?e.appTheme?.light?.secondaryColor||He:e.appTheme?.dark?.secondaryColor||Ke}}});return d.useEffect(()=>{(async()=>{if(e?.apiBaseUrl&&null==f.isAuthenticated){const t=localStorage.getItem("TOKEN");try{let i=await T.get(`${e.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0,headers:{Authorization:`Bearer ${t}`}});if(null!=i&&null!=i.data){const e={...i.data,isAuthenticated:!0};h(Ce.setAuthenticated(e))}else h(Ce.setUnAuthenticated()),localStorage.removeItem("TOKEN")}catch(e){h(Ce.setUnAuthenticated())}}})()},[e,f.isAuthenticated]),t.jsx(l.ThemeProvider,{theme:A,children:0==p.isAuthenticated?t.jsxs(s.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",width:"100%"},children:[t.jsx("img",{src:e?.appLogo,width:70,height:70}),t.jsx(s.Typography,{sx:{m:1},variant:"caption",color:"textSecondary",children:e?.appName}),t.jsxs(s.Typography,{sx:{paddingRight:1,width:200,textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",e.appVersion]}),t.jsx(s.TextField,{label:"username",sx:{width:200,m:1},value:o,onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.TextField,{label:"password",sx:{width:200,m:1},value:n,type:"password",onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&m()}}),t.jsx(s.Button,{loading:c,onClick:m,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):t.jsxs(s.Paper,{sx:{width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:[t.jsx(s.CircularProgress,{sx:{marginRight:1}}),t.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})},on=c.styled("main",{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>{const o=i.useSelector(e=>e.AppLayout),r=c.useTheme(),n=pe();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!n&&t?"calc(100% - 350px)":"100%",direction:o.appDirection,justifyContent:"flex-start",transition:!0===t?r.transitions.create(["margin","width"],{easing:r.transitions.easing.easeOut,duration:r.transitions.duration.enteringScreen}):r.transitions.create(["margin","width"],{easing:r.transitions.easing.sharp,duration:r.transitions.duration.leavingScreen}),marginLeft:n||"ltr"!==o.appDirection||!0!==t?0:he+"px",marginRight:n||"rtl"!==o.appDirection||!0!==t?0:he+"px"}}),rn=({msalInstance:e})=>{const o=i.useSelector(e=>e.SideBar),r=i.useSelector(e=>e.AppInfo.value),n=pe(),a=i.useSelector(e=>e.UserSession),s=i.useSelector(e=>e.AppLayout);return t.jsxs(_.BrowserRouter,{children:[t.jsx(g.ToastContainer,{rtl:"rtl"===s.appDirection,draggable:!0,position:"bottom-center"}),t.jsx(Zr,{}),!0===a.value.isAuthenticated?t.jsxs(on,{open:o.isOpened,children:[t.jsx(u,{}),t.jsx(ar,{}),n?null:t.jsx(Ir,{}),n?t.jsx($r,{}):null,t.jsx(sr,{}),t.jsx(zr,{}),t.jsx(Xr,{})]}):"AZURE"===r.authenticationMethod?t.jsx(en,{msalInstance:e}):n?t.jsx(tn,{}):t.jsx(Jr,{})]})},nn=f.createSlice({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,authenticationMethod:"APP",appName:null,appVersion:null,appLogo:null,muiPremiumKey:null,enableAdministrationModule:!1,enableUINotifications:!1,businessRoutes:[],businessNavigationItems:[],businessReduxReducers:{},businessCommonStoresMetaData:{},appTheme:{light:{primaryColor:"#37505C",secondaryColor:"#ff6d00"},dark:{primaryColor:"#ea690e",secondaryColor:"#74776B"}}}},reducers:{setAppInfo:(e,t)=>{e.value=t.payload}}}),an=nn.actions;var sn=nn.reducer;const ln={SystemDataSourceType:{autoLoad:!1,data:[{value:"Mysql"},{value:"Oracle"},{value:"DB2"}],url:""},SystemParameterTypes:{autoLoad:!1,url:"",data:[{value:"text"},{value:"number"},{value:"date"},{value:"datetime"},{value:"combobox"},{value:"checkbox"},{value:"html"},{value:"lookup"}]},SystemReportTypes:{autoLoad:!1,url:"",data:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}]},SystemWorkflows:{autoLoad:!0,url:"api/v1/dev/workflowdocument/all",data:[]},SystemWidgetTypes:{autoLoad:!1,url:"",data:[{name:"LineChart"},{name:"ColumnChart"},{name:"PieChart"},{name:"Card"},{name:"CircularProgress"},{name:"LinearProgress"}]},SystemTimeIntervals:{autoLoad:!1,url:"",data:[{value:"second"},{value:"minute"},{value:"hour"},{value:"day"},{value:"week"},{value:"month"},{value:"year"}]},SystemMailRecipientTypes:{autoLoad:!1,url:"",data:[{name:"To"},{name:"CC"}]},SystemOrganizations:{autoLoad:!0,url:"api/v1/public/organization/all",data:[]},SystemOrganizationRanks:{autoLoad:!0,url:"api/v1/public/organization/ranks/all",data:[]},CurrentOrganizationRanks:{autoLoad:!0,url:"api/v1/public/organizationrank/all",data:[]},SystemOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organization/units/all",data:[]},CurrentOrganizationUnits:{autoLoad:!0,url:"api/v1/public/organizationunit/all",data:[]},SystemOrganizationUnitType:{autoLoad:!0,url:"api/v1/public/organizationunittype/all",data:[]},SystemDataSources:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/datasourceconnection/all"},SystemDataQueries:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/dataquery/all"},SystemBluePrints:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/blueprint/all"},SystemReports:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/report/all"},SystemEntityParameters:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/entityparameter/all"},SystemMailTemplates:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/mailtemplate/all"},SystemWidgets:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/widget/all"},SystemApplicationModules:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationmodule/application/all"},SystemApplicationAuthorities:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationauthority/all"},SystemApplicationRoles:{autoLoad:!0,data:[],authority:"SYSTEM_ADMIN",url:"api/v1/admin/systemapplicationrole/all"},persons:{autoLoad:!0,data:[],url:"api/v1/public/person/all"}},dn={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},cn=200,un=400,pn=400,hn=499,mn=500,fn=599,gn="GET",Tn="POST",An=[dn.OPENID_SCOPE,dn.PROFILE_SCOPE,dn.OFFLINE_ACCESS_SCOPE],yn=[...An,dn.EMAIL_SCOPE],In="Content-Type",_n="Content-Length",En="Retry-After",On="X-AnchorMailbox",Cn="x-ms-request-id",Nn="x-ms-httpver",Rn="active-account-filters",bn="common",wn="organizations",Sn="consumers",Pn="access_token",vn="xms_cc",Ln="login",Mn="select_account",xn="consent",Dn="none",kn="no_session",Un="code",Fn="id_token token refresh_token",Bn="query",qn="fragment",jn="query",Gn="authorization_code",Wn="refresh_token",Hn="MSSTS",Yn="ADFS",Kn="Generic",Vn="-",zn=".",Qn={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},$n="appmetadata",Zn="1",Jn="authority-metadata",Xn=86400,ea="config",ta="cache",ia="network",oa="hardcoded_values",ra={SCHEMA_VERSION:5,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},na={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},aa=60,sa=3600,la="throttling",da="retry-after, h429",ca="invalid_grant",ua="client_mismatch",pa="1",ha="3",ma="4",fa="2",ga="4",Ta="5",Aa="0",ya="1",Ia="2",_a="3",Ea="4",Oa="pop",Ca="unexpected_error",Na="post_request_failed",Ra={[Ca]:"Unexpected error in authentication.",[Na]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};
|
|
38
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class ba extends Error{constructor(e,t,i){super(t?`${e}: ${t}`:e),Object.setPrototypeOf(this,ba.prototype),this.errorCode=e||dn.EMPTY_STRING,this.errorMessage=t||dn.EMPTY_STRING,this.subError=i||dn.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function wa(e,t){return new ba(e,t?`${Ra[e]} ${t}`:Ra[e])}
|
|
39
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const Sa="client_info_decoding_error",Pa="client_info_empty_error",va="token_parsing_error",La="null_or_empty_token",Ma="endpoints_resolution_error",xa="network_error",Da="openid_config_error",ka="hash_not_deserialized",Ua="invalid_state",Fa="state_mismatch",Ba="state_not_found",qa="nonce_mismatch",ja="auth_time_not_found",Ga="max_age_transpired",Wa="multiple_matching_tokens",Ha="multiple_matching_accounts",Ya="multiple_matching_appMetadata",Ka="request_cannot_be_made",Va="cannot_remove_empty_scope",za="cannot_append_scopeset",Qa="empty_input_scopeset",$a="device_code_polling_cancelled",Za="device_code_expired",Ja="device_code_unknown_error",Xa="no_account_in_silent_request",es="invalid_cache_record",ts="invalid_cache_environment",is="no_account_found",os="no_crypto_object",rs="unexpected_credential_type",ns="invalid_assertion",as="invalid_client_credential",ss="token_refresh_required",ls="user_timeout_reached",ds="token_claims_cnf_required_for_signedjwt",cs="authorization_code_missing_from_server_response",us="binding_key_not_removed",ps="end_session_endpoint_not_supported",hs="key_id_missing",ms="no_network_connectivity",fs="user_canceled",gs="missing_tenant_id_error",Ts="method_not_implemented",As="nested_app_auth_bridge_disabled",ys={[Sa]:"The client info could not be parsed/decoded correctly",[Pa]:"The client info was empty",[va]:"Token cannot be parsed",[La]:"The token is null or empty",[Ma]:"Endpoints cannot be resolved",[xa]:"Network request failed",[Da]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[ka]:"The hash parameters could not be deserialized",[Ua]:"State was not the expected format",[Fa]:"State mismatch error",[Ba]:"State not found",[qa]:"Nonce mismatch error",[ja]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[Ga]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[Wa]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[Ha]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[Ya]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[Ka]:"Token request cannot be made without authorization code or refresh token.",[Va]:"Cannot remove null or empty scope from ScopeSet",[za]:"Cannot append ScopeSet",[Qa]:"Empty input ScopeSet cannot be processed",[$a]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[Za]:"Device code is expired.",[Ja]:"Device code stopped polling for unknown reasons.",[Xa]:"Please pass an account object, silent flow is not supported without account information",[es]:"Cache record object was null or undefined.",[ts]:"Invalid environment when attempting to create cache entry",[is]:"No account found in cache for given key.",[os]:"No crypto object detected.",[rs]:"Unexpected credential type.",[ns]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[as]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[ss]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[ls]:"User defined timeout for device code polling reached",[ds]:"Cannot generate a POP jwt if the token_claims are not populated",[cs]:"Server response does not contain an authorization code to proceed",[us]:"Could not remove the credential's binding key from storage.",[ps]:"The provided authority does not support logout",[hs]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[ms]:"No network connectivity. Check your internet connection.",[fs]:"User cancelled the flow.",[gs]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[Ts]:"This method has not been implemented",[As]:"The nested app auth bridge is disabled"};class Is extends ba{constructor(e,t){super(e,t?`${ys[e]}: ${t}`:ys[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,Is.prototype)}}function _s(e,t){return new Is(e,t)}
|
|
40
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const Es={createNewGuid:()=>{throw _s(Ts)},base64Decode:()=>{throw _s(Ts)},base64Encode:()=>{throw _s(Ts)},base64UrlEncode:()=>{throw _s(Ts)},encodeKid:()=>{throw _s(Ts)},async getPublicKeyThumbprint(){throw _s(Ts)},async removeTokenBindingKey(){throw _s(Ts)},async clearKeystore(){throw _s(Ts)},async signJwt(){throw _s(Ts)},async hashString(){throw _s(Ts)}};
|
|
41
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */var Os;!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Info=2]="Info",e[e.Verbose=3]="Verbose",e[e.Trace=4]="Trace"}(Os||(Os={}));class Cs{constructor(e,t,i){this.level=Os.Info;const o=e||Cs.createDefaultLoggerOptions();this.localCallback=o.loggerCallback||(()=>{}),this.piiLoggingEnabled=o.piiLoggingEnabled||!1,this.level="number"==typeof o.logLevel?o.logLevel:Os.Info,this.correlationId=o.correlationId||dn.EMPTY_STRING,this.packageName=t||dn.EMPTY_STRING,this.packageVersion=i||dn.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Os.Info}}clone(e,t,i){return new Cs({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:i||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const i=`${`[${(new Date).toUTCString()}] : [${t.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${Os[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,i,t.containsPii||!1)}executeCallback(e,t,i){this.localCallback&&this.localCallback(e,t,i)}error(e,t){this.logMessage(e,{logLevel:Os.Error,containsPii:!1,correlationId:t||dn.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:Os.Error,containsPii:!0,correlationId:t||dn.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:Os.Warning,containsPii:!1,correlationId:t||dn.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:Os.Warning,containsPii:!0,correlationId:t||dn.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:Os.Info,containsPii:!1,correlationId:t||dn.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:Os.Info,containsPii:!0,correlationId:t||dn.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:Os.Verbose,containsPii:!1,correlationId:t||dn.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:Os.Verbose,containsPii:!0,correlationId:t||dn.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:Os.Trace,containsPii:!1,correlationId:t||dn.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:Os.Trace,containsPii:!0,correlationId:t||dn.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}
|
|
42
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const Ns="@azure/msal-common",Rs="15.12.0",bs="none",ws="redirect_uri_empty",Ss="claims_request_parsing_error",Ps="authority_uri_insecure",vs="url_parse_error",Ls="empty_url_error",Ms="empty_input_scopes_error",xs="invalid_claims",Ds="token_request_empty",ks="logout_request_empty",Us="invalid_code_challenge_method",Fs="pkce_params_missing",Bs="invalid_cloud_discovery_metadata",qs="invalid_authority_metadata",js="untrusted_authority",Gs="missing_ssh_jwk",Ws="missing_ssh_kid",Hs="missing_nonce_authentication_header",Ys="invalid_authentication_header",Ks="cannot_set_OIDCOptions",Vs="cannot_allow_platform_broker",zs="authority_mismatch",Qs="invalid_request_method_for_EAR",$s="invalid_authorize_post_body_parameters",Zs={[ws]:"A redirect URI is required for all calls, and none has been set.",[Ss]:"Could not parse the given claims request object.",[Ps]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[vs]:"URL could not be parsed into appropriate segments.",[Ls]:"URL was empty or null.",[Ms]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[xs]:"Given claims parameter must be a stringified JSON object.",[Ds]:"Token request was empty and not found in cache.",[ks]:"The logout request was null or undefined.",[Us]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[Fs]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[Bs]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[qs]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[js]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[Gs]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[Ws]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[Hs]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[Ys]:"Invalid authentication header provided",[Ks]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Vs]:"Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",[zs]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.",[$s]:"Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.",[Qs]:"Invalid request method for EAR protocol mode. The request method cannot be GET when using EAR protocol mode. Please change the request method to POST."};class Js extends ba{constructor(e){super(e,Zs[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,Js.prototype)}}function Xs(e){return new Js(e)}
|
|
43
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class el{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return 0===Object.keys(t).length}catch(e){}return!0}static startsWith(e,t){return 0===e.indexOf(t)}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},i=e.split("&"),o=e=>decodeURIComponent(e.replace(/\+/g," "));return i.forEach(e=>{if(e.trim()){const[i,r]=e.split(/=(.+)/g,2);i&&r&&(t[o(i)]=o(r))}}),t}static trimArrayEntries(e){return e.map(e=>e.trim())}static removeEmptyStringsFromArray(e){return e.filter(e=>!!e)}static jsonParseHelper(e){try{return JSON.parse(e)}catch(e){return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}
|
|
44
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class tl{constructor(e){const t=e?el.trimArrayEntries([...e]):[],i=t?el.removeEmptyStringsFromArray(t):[];if(!i||!i.length)throw Xs(Ms);this.scopes=new Set,i.forEach(e=>this.scopes.add(e))}static fromString(e){const t=(e||dn.EMPTY_STRING).split(" ");return new tl(t)}static createSearchScopes(e){const t=e&&e.length>0?e:[...An],i=new tl(t);return i.containsOnlyOIDCScopes()?i.removeScope(dn.OFFLINE_ACCESS_SCOPE):i.removeOIDCScopes(),i}containsScope(e){const t=this.printScopesLowerCase().split(" "),i=new tl(t);return!!e&&i.scopes.has(e.toLowerCase())}containsScopeSet(e){return!(!e||e.scopes.size<=0)&&(this.scopes.size>=e.scopes.size&&e.asArray().every(e=>this.containsScope(e)))}containsOnlyOIDCScopes(){let e=0;return yn.forEach(t=>{this.containsScope(t)&&(e+=1)}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach(e=>this.appendScope(e))}catch(e){throw _s(za)}}removeScope(e){if(!e)throw _s(Va);this.scopes.delete(e.trim())}removeOIDCScopes(){yn.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw _s(Qa);const t=new Set;return e.scopes.forEach(e=>t.add(e.toLowerCase())),this.scopes.forEach(e=>t.add(e.toLowerCase())),t}intersectingScopeSets(e){if(!e)throw _s(Qa);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),i=e.getScopeCount(),o=this.getScopeCount();return t.size<o+i}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach(t=>e.push(t)),e}printScopes(){if(this.scopes){return this.asArray().join(" ")}return dn.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}
|
|
45
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function il(e,t){return!!e&&!!t&&e===t.split(".")[1]}function ol(e,t,i,o){if(o){const{oid:t,sub:i,tid:r,name:n,tfp:a,acr:s,preferred_username:l,upn:d,login_hint:c}=o,u=r||a||s||"";return{tenantId:u,localAccountId:t||i||"",name:n,username:l||d||"",loginHint:c,isHomeTenant:il(u,e)}}return{tenantId:i,localAccountId:t,username:"",isHomeTenant:il(i,e)}}function rl(e,t,i,o){let r=e;if(t){const{isHomeTenant:i,...o}=t;r={...e,...o}}if(i){const{isHomeTenant:t,...n}=ol(e.homeAccountId,e.localAccountId,e.tenantId,i);return r={...r,...n,idTokenClaims:i,idToken:o},r}return r}
|
|
46
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function nl(e,t){const i=function(e){if(!e)throw _s(La);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);if(!t||t.length<4)throw _s(va);return t[2]}(e);try{const e=t(i);return JSON.parse(e)}catch(e){throw _s(va)}}function al(e,t){if(0===t||Date.now()-3e5>e+t)throw _s(Ga)}
|
|
47
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function sl(e){if(!e)return e;let t=e.toLowerCase();return el.endsWith(t,"?")?t=t.slice(0,-1):el.endsWith(t,"?/")&&(t=t.slice(0,-2)),el.endsWith(t,"/")||(t+="/"),t}function ll(e){return e.startsWith("#/")?e.substring(2):e.startsWith("#")||e.startsWith("?")?e.substring(1):e}function dl(e){if(!e||e.indexOf("=")<0)return null;try{const t=ll(e),i=Object.fromEntries(new URLSearchParams(t));if(i.code||i.ear_jwe||i.error||i.error_description||i.state)return i}catch(e){throw _s(ka)}return null}function cl(e,t=!0,i){const o=new Array;return e.forEach((e,r)=>{!t&&i&&r in i?o.push(`${r}=${e}`):o.push(`${r}=${encodeURIComponent(e)}`)}),o.join("&")}function ul(e){if(!e)return e;const t=e.split("#")[0];try{const e=new URL(t);return sl(e.origin+e.pathname+e.search)}catch(e){return sl(t)}}
|
|
48
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class pl{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Xs(Ls);e.includes("#")||(this._urlString=pl.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return el.endsWith(t,"?")?t=t.slice(0,-1):el.endsWith(t,"?/")&&(t=t.slice(0,-2)),el.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch(e){throw Xs(vs)}if(!e.HostNameAndPort||!e.PathSegments)throw Xs(vs);if(!e.Protocol||"https:"!==e.Protocol.toLowerCase())throw Xs(Ps)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return pl.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),i=t.PathSegments;return!e||0===i.length||i[0]!==bn&&i[0]!==wn||(i[0]=e),pl.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Xs(vs);const i={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let o=i.AbsolutePath.split("/");return o=o.filter(e=>e&&e.length>0),i.PathSegments=o,i.QueryString&&i.QueryString.endsWith("/")&&(i.QueryString=i.QueryString.substring(0,i.QueryString.length-1)),i}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),i=e.match(t);if(!i)throw Xs(vs);return i[2]}static getAbsoluteUrl(e,t){if(e[0]===dn.FORWARD_SLASH){const i=new pl(t).getUrlComponents();return i.Protocol+"//"+i.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new pl(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!dl(e)}}
|
|
49
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const hl={"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},ml={metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},fl=new Set;function gl(e,t,i,o){if(o?.trace(`getAliasesFromMetadata called with source: ${i}`),e&&t){const r=Tl(t,e);if(r)return o?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${i}, returning aliases`),r.aliases;o?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${i}`)}return null}function Tl(e,t){for(let i=0;i<e.length;i++){const o=e[i];if(o.aliases.includes(t))return o}return null}
|
|
50
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */ml.metadata.forEach(e=>{e.aliases.forEach(e=>{fl.add(e)})});const Al="cache_quota_exceeded",yl="cache_error_unknown",Il={[Al]:"Exceeded cache storage capacity.",[yl]:"Unexpected error occurred when using cache storage."};class _l extends ba{constructor(e,t){const i=t||(Il[e]?Il[e]:Il[yl]);super(`${e}: ${i}`),Object.setPrototypeOf(this,_l.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=i}}function El(e){return e instanceof Error?"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||e.message.includes("exceeded the quota")?new _l(Al):new _l(e.name,e.message):new _l(yl)}
|
|
51
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Ol{constructor(e,t,i,o,r){this.clientId=e,this.cryptoImpl=t,this.commonLogger=i.clone(Ns,Rs),this.staticAuthorityOptions=r,this.performanceClient=o}getAllAccounts(e,t){return this.buildTenantProfiles(this.getAccountsFilteredBy(e,t),t,e)}getAccountInfoFilteredBy(e,t){if(0===Object.keys(e).length||Object.values(e).every(e=>!e))return this.commonLogger.warning("getAccountInfoFilteredBy: Account filter is empty or invalid, returning null"),null;const i=this.getAllAccounts(e,t);if(i.length>1){return i.sort(e=>e.idTokenClaims?-1:1)[0]}return 1===i.length?i[0]:null}getBaseAccountInfo(e,t){const i=this.getAccountsFilteredBy(e,t);return i.length>0?i[0].getAccountInfo():null}buildTenantProfiles(e,t,i){return e.flatMap(e=>this.getTenantProfilesFromAccountEntity(e,t,i?.tenantId,i))}getTenantedAccountInfoByFilter(e,t,i,o,r){let n,a=null;if(r&&!this.tenantProfileMatchesFilter(i,r))return null;const s=this.getIdToken(e,o,t,i.tenantId);return s&&(n=nl(s.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(n,r))?null:(a=rl(e,i,n,s?.secret),a)}getTenantProfilesFromAccountEntity(e,t,i,o){const r=e.getAccountInfo();let n=r.tenantProfiles||new Map;const a=this.getTokenKeys();if(i){const e=n.get(i);if(!e)return[];n=new Map([[i,e]])}const s=[];return n.forEach(e=>{const i=this.getTenantedAccountInfoByFilter(r,a,e,t,o);i&&s.push(i)}),s}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId))&&((!t.name||e.name===t.name)&&(void 0===t.isHomeTenant||e.isHomeTenant===t.isHomeTenant))}idTokenClaimsMatchTenantProfileFilter(e,t){if(t){if(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId))return!1;if(t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint))return!1;if(t.username&&!this.matchUsername(e.preferred_username,t.username))return!1;if(t.name&&!this.matchName(e,t.name))return!1;if(t.sid&&!this.matchSid(e,t.sid))return!1}return!0}async saveCacheRecord(e,t,i){if(!e)throw _s(es);try{e.account&&await this.setAccount(e.account,t),e.idToken&&!1!==i?.idToken&&await this.setIdTokenCredential(e.idToken,t),e.accessToken&&!1!==i?.accessToken&&await this.saveAccessToken(e.accessToken,t),e.refreshToken&&!1!==i?.refreshToken&&await this.setRefreshTokenCredential(e.refreshToken,t),e.appMetadata&&this.setAppMetadata(e.appMetadata,t)}catch(e){throw this.commonLogger?.error("CacheManager.saveCacheRecord: failed"),e instanceof ba?e:El(e)}}async saveAccessToken(e,t){const i={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},o=this.getTokenKeys(),r=tl.fromString(e.target);o.accessToken.forEach(e=>{if(!this.accessTokenKeyMatchesFilter(e,i,!1))return;const o=this.getAccessTokenCredential(e,t);if(o&&this.credentialMatchesFilter(o,i)){tl.fromString(o.target).intersectingScopeSets(r)&&this.removeAccessToken(e,t)}}),await this.setAccessTokenCredential(e,t)}getAccountsFilteredBy(e,t){const i=this.getAccountKeys(),o=[];return i.forEach(i=>{const r=this.getAccount(i,t);if(!r)return;if(e.homeAccountId&&!this.matchHomeAccountId(r,e.homeAccountId))return;if(e.username&&!this.matchUsername(r.username,e.username))return;if(e.environment&&!this.matchEnvironment(r,e.environment))return;if(e.realm&&!this.matchRealm(r,e.realm))return;if(e.nativeAccountId&&!this.matchNativeAccountId(r,e.nativeAccountId))return;if(e.authorityType&&!this.matchAuthorityType(r,e.authorityType))return;const n={localAccountId:e?.localAccountId,name:e?.name},a=r.tenantProfiles?.filter(e=>this.tenantProfileMatchesFilter(e,n));a&&0===a.length||o.push(r)}),o}credentialMatchesFilter(e,t){if(t.clientId&&!this.matchClientId(e,t.clientId))return!1;if(t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash))return!1;if("string"==typeof t.homeAccountId&&!this.matchHomeAccountId(e,t.homeAccountId))return!1;if(t.environment&&!this.matchEnvironment(e,t.environment))return!1;if(t.realm&&!this.matchRealm(e,t.realm))return!1;if(t.credentialType&&!this.matchCredentialType(e,t.credentialType))return!1;if(t.familyId&&!this.matchFamilyId(e,t.familyId))return!1;if(t.target&&!this.matchTarget(e,t.target))return!1;if((t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash)return!1;if(e.credentialType===Qn.ACCESS_TOKEN_WITH_AUTH_SCHEME){if(t.tokenType&&!this.matchTokenType(e,t.tokenType))return!1;if(t.tokenType===na.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId))return!1}return!0}getAppMetadataFilteredBy(e){const t=this.getKeys(),i={};return t.forEach(t=>{if(!this.isAppMetadata(t))return;const o=this.getAppMetadata(t);o&&(e.environment&&!this.matchEnvironment(o,e.environment)||e.clientId&&!this.matchClientId(o,e.clientId)||(i[t]=o))}),i}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let i=null;return t.forEach(t=>{if(!this.isAuthorityMetadata(t)||-1===t.indexOf(this.clientId))return;const o=this.getAuthorityMetadata(t);o&&-1!==o.aliases.indexOf(e)&&(i=o)}),i}removeAllAccounts(e){this.getAllAccounts({},e).forEach(t=>{this.removeAccount(t,e)})}removeAccount(e,t){this.removeAccountContext(e,t);this.getAccountKeys().filter(t=>t.includes(e.homeAccountId)&&t.includes(e.environment)).forEach(e=>{this.removeItem(e,t),this.performanceClient.incrementFields({accountsRemoved:1},t)})}removeAccountContext(e,t){const i=this.getTokenKeys(),o=t=>t.includes(e.homeAccountId)&&t.includes(e.environment);i.idToken.filter(o).forEach(e=>{this.removeIdToken(e,t)}),i.accessToken.filter(o).forEach(e=>{this.removeAccessToken(e,t)}),i.refreshToken.filter(o).forEach(e=>{this.removeRefreshToken(e,t)})}removeAccessToken(e,t){const i=this.getAccessTokenCredential(e,t);if(this.removeItem(e,t),this.performanceClient.incrementFields({accessTokensRemoved:1},t),!i||i.credentialType.toLowerCase()!==Qn.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||i.tokenType!==na.POP)return;const o=i.keyId;o&&this.cryptoImpl.removeTokenBindingKey(o).catch(()=>{this.commonLogger.error(`Failed to remove token binding key ${o}`,t),this.performanceClient?.incrementFields({removeTokenBindingKeyFailure:1},t)})}removeAppMetadata(e){return this.getKeys().forEach(t=>{this.isAppMetadata(t)&&this.removeItem(t,e)}),!0}getIdToken(e,t,i,o,r){this.commonLogger.trace("CacheManager - getIdToken called");const n={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Qn.ID_TOKEN,clientId:this.clientId,realm:o},a=this.getIdTokensByFilter(n,t,i),s=a.size;if(s<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(s>1){let i=a;if(!o){const t=new Map;a.forEach((i,o)=>{i.realm===e.tenantId&&t.set(o,i)});const o=t.size;if(o<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),a.values().next().value;if(1===o)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),t.values().next().value;i=t}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),i.forEach((e,i)=>{this.removeIdToken(i,t)}),r&&t&&r.addFields({multiMatchedID:a.size},t),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),a.values().next().value}getIdTokensByFilter(e,t,i){const o=i&&i.idToken||this.getTokenKeys().idToken,r=new Map;return o.forEach(i=>{if(!this.idTokenKeyMatchesFilter(i,{clientId:this.clientId,...e}))return;const o=this.getIdTokenCredential(i,t);o&&this.credentialMatchesFilter(o,e)&&r.set(i,o)}),r}idTokenKeyMatchesFilter(e,t){const i=e.toLowerCase();return(!t.clientId||-1!==i.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==i.indexOf(t.homeAccountId.toLowerCase()))}removeIdToken(e,t){this.removeItem(e,t)}removeRefreshToken(e,t){this.removeItem(e,t)}getAccessToken(e,t,i,o){const r=t.correlationId;this.commonLogger.trace("CacheManager - getAccessToken called",r);const n=tl.createSearchScopes(t.scopes),a=t.authenticationScheme||na.BEARER,s=a.toLowerCase()!==na.BEARER.toLowerCase()?Qn.ACCESS_TOKEN_WITH_AUTH_SCHEME:Qn.ACCESS_TOKEN,l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:s,clientId:this.clientId,realm:o||e.tenantId,target:n,tokenType:a,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},d=i&&i.accessToken||this.getTokenKeys().accessToken,c=[];d.forEach(e=>{if(this.accessTokenKeyMatchesFilter(e,l,!0)){const t=this.getAccessTokenCredential(e,r);t&&this.credentialMatchesFilter(t,l)&&c.push(t)}});const u=c.length;return u<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found",r),null):u>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them",r),c.forEach(e=>{this.removeAccessToken(this.generateCredentialKey(e),r)}),this.performanceClient.addFields({multiMatchedAT:c.length},r),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token",r),c[0])}accessTokenKeyMatchesFilter(e,t,i){const o=e.toLowerCase();if(t.clientId&&-1===o.indexOf(t.clientId.toLowerCase()))return!1;if(t.homeAccountId&&-1===o.indexOf(t.homeAccountId.toLowerCase()))return!1;if(t.realm&&-1===o.indexOf(t.realm.toLowerCase()))return!1;if(t.requestedClaimsHash&&-1===o.indexOf(t.requestedClaimsHash.toLowerCase()))return!1;if(t.target){const e=t.target.asArray();for(let t=0;t<e.length;t++){if(i&&!o.includes(e[t].toLowerCase()))return!1;if(!i&&o.includes(e[t].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e,t){const i=this.getTokenKeys(),o=[];return i.accessToken.forEach(i=>{if(!this.accessTokenKeyMatchesFilter(i,e,!0))return;const r=this.getAccessTokenCredential(i,t);r&&this.credentialMatchesFilter(r,e)&&o.push(r)}),o}getRefreshToken(e,t,i,o,r){this.commonLogger.trace("CacheManager - getRefreshToken called");const n=t?Zn:void 0,a={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Qn.REFRESH_TOKEN,clientId:this.clientId,familyId:n},s=o&&o.refreshToken||this.getTokenKeys().refreshToken,l=[];s.forEach(e=>{if(this.refreshTokenKeyMatchesFilter(e,a)){const t=this.getRefreshTokenCredential(e,i);t&&this.credentialMatchesFilter(t,a)&&l.push(t)}});const d=l.length;return d<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(d>1&&r&&i&&r.addFields({multiMatchedRT:d},i),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),l[0])}refreshTokenKeyMatchesFilter(e,t){const i=e.toLowerCase();return(!t.familyId||-1!==i.indexOf(t.familyId.toLowerCase()))&&(!(!t.familyId&&t.clientId&&-1===i.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==i.indexOf(t.homeAccountId.toLowerCase())))}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},i=this.getAppMetadataFilteredBy(t),o=Object.keys(i).map(e=>i[e]),r=o.length;if(r<1)return null;if(r>1)throw _s(Ya);return o[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!(!t||t.familyId!==Zn)}matchHomeAccountId(e,t){return!("string"!=typeof e.homeAccountId||t!==e.homeAccountId)}matchLocalAccountIdFromTokenClaims(e,t){return t===(e.oid||e.sub)}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){return!(t.toLowerCase()!==e.name?.toLowerCase())}matchUsername(e,t){return!(!e||"string"!=typeof e||t?.toLowerCase()!==e.toLowerCase())}matchUserAssertionHash(e,t){return!(!e.userAssertionHash||t!==e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const i=function(e,t){let i;const o=e.canonicalAuthority;if(o){const r=new pl(o).getUrlComponents().HostNameAndPort;i=gl(r,e.cloudDiscoveryMetadata?.metadata,ea,t)||gl(r,ml.metadata,oa,t)||e.knownAuthorities}return i||[]}(this.staticAuthorityOptions,this.commonLogger);if(i.includes(t)&&i.includes(e.environment))return!0}const i=this.getAuthorityMetadataByAlias(t);return!!(i&&i.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!(!e.clientId||t!==e.clientId)}matchFamilyId(e,t){return!(!e.familyId||t!==e.familyId)}matchRealm(e,t){return!(e.realm?.toLowerCase()!==t.toLowerCase())}matchNativeAccountId(e,t){return!(!e.nativeAccountId||t!==e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||(e.preferred_username===t||e.upn===t)}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!(!e.authorityType||t.toLowerCase()!==e.authorityType.toLowerCase())}matchTarget(e,t){if(e.credentialType!==Qn.ACCESS_TOKEN&&e.credentialType!==Qn.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target)return!1;return tl.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!(!e.tokenType||e.tokenType!==t)}matchKeyId(e,t){return!(!e.keyId||e.keyId!==t)}isAppMetadata(e){return-1!==e.indexOf($n)}isAuthorityMetadata(e){return-1!==e.indexOf(Jn)}generateAuthorityMetadataCacheKey(e){return`${Jn}-${this.clientId}-${e}`}static toObject(e,t){for(const i in t)e[i]=t[i];return e}}class Cl extends Ol{async setAccount(){throw _s(Ts)}getAccount(){throw _s(Ts)}async setIdTokenCredential(){throw _s(Ts)}getIdTokenCredential(){throw _s(Ts)}async setAccessTokenCredential(){throw _s(Ts)}getAccessTokenCredential(){throw _s(Ts)}async setRefreshTokenCredential(){throw _s(Ts)}getRefreshTokenCredential(){throw _s(Ts)}setAppMetadata(){throw _s(Ts)}getAppMetadata(){throw _s(Ts)}setServerTelemetry(){throw _s(Ts)}getServerTelemetry(){throw _s(Ts)}setAuthorityMetadata(){throw _s(Ts)}getAuthorityMetadata(){throw _s(Ts)}getAuthorityMetadataKeys(){throw _s(Ts)}setThrottlingCache(){throw _s(Ts)}getThrottlingCache(){throw _s(Ts)}removeItem(){throw _s(Ts)}getKeys(){throw _s(Ts)}getAccountKeys(){throw _s(Ts)}getTokenKeys(){throw _s(Ts)}generateCredentialKey(){throw _s(Ts)}generateAccountKey(){throw _s(Ts)}}
|
|
52
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const Nl="AAD",Rl="OIDC",bl="EAR",wl="acquireTokenByCode",Sl="acquireTokenByRefreshToken",Pl="acquireTokenSilent",vl="acquireTokenSilentAsync",Ll="acquireTokenPopup",Ml="acquireTokenPreRedirect",xl="acquireTokenRedirect",Dl="cryptoOptsGetPublicKeyThumbprint",kl="cryptoOptsSignJwt",Ul="silentCacheClientAcquireToken",Fl="silentIframeClientAcquireToken",Bl="awaitConcurrentIframe",ql="silentRefreshClientAcquireToken",jl="ssoSilent",Gl="standardInteractionClientGetDiscoveredAuthority",Wl="nativeInteractionClientAcquireToken",Hl="networkClientSendPostRequestAsync",Yl="refreshTokenClientExecutePostToTokenEndpoint",Kl="authorizationCodeClientExecutePostToTokenEndpoint",Vl="refreshTokenClientExecuteTokenRequest",zl="refreshTokenClientAcquireToken",Ql="refreshTokenClientAcquireTokenWithCachedRefreshToken",$l="refreshTokenClientAcquireTokenByRefreshToken",Zl="refreshTokenClientCreateTokenRequestBody",Jl="acquireTokenFromCache",Xl="silentFlowClientAcquireCachedToken",ed="silentFlowClientGenerateResultFromCacheRecord",td="acquireTokenBySilentIframe",id="initializeBaseRequest",od="initializeSilentRequest",rd="initializeClientApplication",nd="initializeCache",ad="silentIframeClientTokenHelper",sd="silentHandlerInitiateAuthRequest",ld="silentHandlerMonitorIframeForHash",dd="silentHandlerLoadFrame",cd="silentHandlerLoadFrameSync",ud="standardInteractionClientCreateAuthCodeClient",pd="standardInteractionClientGetClientConfiguration",hd="standardInteractionClientInitializeAuthorizationRequest",md="getAuthCodeUrl",fd="getStandardParams",gd="handleCodeResponseFromServer",Td="handleCodeResponse",Ad="handleResponseEar",yd="handleResponsePlatformBroker",Id="handleResponseCode",_d="updateTokenEndpointAuthority",Ed="authClientAcquireToken",Od="authClientExecuteTokenRequest",Cd="authClientCreateTokenRequestBody",Nd="popTokenGenerateCnf",Rd="popTokenGenerateKid",bd="handleServerTokenResponse",wd="deserializeResponse",Sd="authorityFactoryCreateDiscoveredInstance",Pd="authorityResolveEndpointsAsync",vd="authorityGetCloudDiscoveryMetadataFromNetwork",Ld="authorityUpdateCloudDiscoveryMetadata",Md="authorityGetEndpointMetadataFromNetwork",xd="authorityUpdateEndpointMetadata",Dd="authorityUpdateMetadataWithRegionalInformation",kd="regionDiscoveryDetectRegion",Ud="regionDiscoveryGetRegionFromIMDS",Fd="regionDiscoveryGetCurrentVersion",Bd="acquireTokenByCodeAsync",qd="handleRedirectPromise",jd="handleNativeRedirectPromise",Gd="nativeMessageHandlerHandshake",Wd="removeHiddenIframe",Hd="clearTokensAndKeysWithClaims",Yd="cacheManagerGetRefreshToken",Kd="importExistingCache",Vd="setUserData",zd="localStorageUpdated",Qd="generatePkceCodes",$d="generateCodeVerifier",Zd="generateCodeChallengeFromVerifier",Jd="sha256Digest",Xd="getRandomValues",ec="generateHKDF",tc="generateBaseKey",ic="base64Decode",oc="urlEncodeArr",rc="encrypt",nc="decrypt",ac="generateEarKey",sc="decryptEarResponse",lc=1;
|
|
53
53
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
54
54
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
55
|
-
class
|
|
56
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */const
|
|
57
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */const
|
|
58
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */function
|
|
59
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */const
|
|
55
|
+
class dc{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class cc{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:lc,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new dc}}startPerformanceMeasurement(){return new dc}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}
|
|
56
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const uc={tokenRenewalOffsetSeconds:300,preventCorsPreflight:!1},pc={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Os.Info,correlationId:dn.EMPTY_STRING},hc={claimsBasedCachingEnabled:!1},mc={async sendGetRequestAsync(){throw _s(Ts)},async sendPostRequestAsync(){throw _s(Ts)}},fc={sku:dn.SKU,version:Rs,cpu:dn.EMPTY_STRING,os:dn.EMPTY_STRING},gc={clientSecret:dn.EMPTY_STRING,clientAssertion:void 0},Tc={azureCloudInstance:bs,tenant:`${dn.DEFAULT_COMMON_TENANT}`},Ac={application:{appName:"",appVersion:""}};function yc(e){return e.authOptions.authority.options.protocolMode===Rl}
|
|
57
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const Ic="home_account_id",_c="UPN";
|
|
58
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function Ec(e,t){if(!e)throw _s(Pa);try{const i=t(e);return JSON.parse(i)}catch(e){throw _s(Sa)}}function Oc(e){if(!e)throw _s(Sa);const t=e.split(zn,2);return{uid:t[0],utid:t.length<2?dn.EMPTY_STRING:t[1]}}
|
|
59
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const Cc="client_id",Nc="redirect_uri",Rc="token_type",bc="req_cnf",wc="return_spa_code",Sc="x-client-xtra-sku",Pc="brk_client_id",vc="brk_redirect_uri",Lc="instance_aware";
|
|
60
60
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
61
|
-
function
|
|
61
|
+
function Mc(e,t,i){if(!t)return;const o=e.get(Cc);o&&e.has(Pc)&&i?.addFields({embeddedClientId:o,embeddedRedirectUri:e.get(Nc)},t)}function xc(e,t){e.set("response_type",t)}function Dc(e,t,i=!0,o=An){!i||o.includes("openid")||t.includes("openid")||o.push("openid");const r=i?[...t||[],...o]:t||[],n=new tl(r);e.set("scope",n.printScopes())}function kc(e,t){e.set(Cc,t)}function Uc(e,t){e.set(Nc,t)}function Fc(e,t){e.set("login_hint",t)}function Bc(e,t){e.set(On,`UPN:${t}`)}function qc(e,t){e.set(On,`Oid:${t.uid}@${t.utid}`)}function jc(e,t){e.set("sid",t)}function Gc(e,t,i){const o=function(e,t){let i;if(e)try{i=JSON.parse(e)}catch(e){throw Xs(xs)}else i={};t&&t.length>0&&(i.hasOwnProperty(Pn)||(i[Pn]={}),i[Pn][vn]={values:t});return JSON.stringify(i)}(t,i);try{JSON.parse(o)}catch(e){throw Xs(xs)}e.set("claims",o)}function Wc(e,t){e.set("client-request-id",t)}function Hc(e,t){e.set("x-client-SKU",t.sku),e.set("x-client-VER",t.version),t.os&&e.set("x-client-OS",t.os),t.cpu&&e.set("x-client-CPU",t.cpu)}function Yc(e,t){t?.appName&&e.set("x-app-name",t.appName),t?.appVersion&&e.set("x-app-ver",t.appVersion)}function Kc(e,t){t&&e.set("state",t)}function Vc(e,t,i){if(!t||!i)throw Xs(Fs);e.set("code_challenge",t),e.set("code_challenge_method",i)}function zc(e,t){e.set("client_secret",t)}function Qc(e,t){t&&e.set("client_assertion",t)}function $c(e,t){t&&e.set("client_assertion_type",t)}function Zc(e,t){e.set("grant_type",t)}function Jc(e){e.set("client_info","1")}function Xc(e){e.has(Lc)||e.set(Lc,"true")}function eu(e,t){Object.entries(t).forEach(([t,i])=>{!e.has(t)&&i&&e.set(t,i)})}function tu(e,t){t&&(e.set(Rc,na.POP),e.set(bc,t))}function iu(e,t){t&&(e.set(Rc,na.SSH),e.set(bc,t))}function ou(e,t){e.set("x-client-current-telemetry",t.generateCurrentRequestHeaderValue()),e.set("x-client-last-telemetry",t.generateLastRequestHeaderValue())}function ru(e){e.set("x-ms-lib-capability",da)}function nu(e,t,i){e.has(Pc)||e.set(Pc,t),e.has(vc)||e.set(vc,i)}
|
|
62
62
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
63
|
-
const
|
|
63
|
+
const au=0,su=1,lu=2,du=3;
|
|
64
64
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
65
65
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
66
|
-
const
|
|
66
|
+
const cu=(e,t,i,o,r)=>(...n)=>{i.trace(`Executing function ${t}`);const a=o?.startMeasurement(t,r);if(r){const e=t+"CallCount";o?.incrementFields({[e]:1},r)}try{const o=e(...n);return a?.end({success:!0}),i.trace(`Returning result from ${t}`),o}catch(e){i.trace(`Error occurred in ${t}`);try{i.trace(JSON.stringify(e))}catch(e){i.trace("Unable to print error message.")}throw a?.end({success:!1},e),e}},uu=(e,t,i,o,r)=>(...n)=>{i.trace(`Executing function ${t}`);const a=o?.startMeasurement(t,r);if(r){const e=t+"CallCount";o?.incrementFields({[e]:1},r)}return o?.setPreQueueTime(t,r),e(...n).then(e=>(i.trace(`Returning result from ${t}`),a?.end({success:!0}),e)).catch(e=>{i.trace(`Error occurred in ${t}`);try{i.trace(JSON.stringify(e))}catch(e){i.trace("Unable to print error message.")}throw a?.end({success:!1},e),e})};
|
|
67
67
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
68
|
-
class
|
|
68
|
+
class pu{constructor(e,t,i,o){this.networkInterface=e,this.logger=t,this.performanceClient=i,this.correlationId=o}async detectRegion(e,t){this.performanceClient?.addQueueMeasurement(kd,this.correlationId);let i=e;if(i)t.region_source=ha;else{const e=pu.IMDS_OPTIONS;try{const o=await uu(this.getRegionFromIMDS.bind(this),Ud,this.logger,this.performanceClient,this.correlationId)(dn.IMDS_VERSION,e);if(o.status===cn&&(i=o.body,t.region_source=ma),o.status===pn){const o=await uu(this.getCurrentVersion.bind(this),Fd,this.logger,this.performanceClient,this.correlationId)(e);if(!o)return t.region_source=pa,null;const r=await uu(this.getRegionFromIMDS.bind(this),Ud,this.logger,this.performanceClient,this.correlationId)(o,e);r.status===cn&&(i=r.body,t.region_source=ma)}}catch(e){return t.region_source=pa,null}}return i||(t.region_source=pa),i||null}async getRegionFromIMDS(e,t){return this.performanceClient?.addQueueMeasurement(Ud,this.correlationId),this.networkInterface.sendGetRequestAsync(`${dn.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,dn.IMDS_TIMEOUT)}async getCurrentVersion(e){this.performanceClient?.addQueueMeasurement(Fd,this.correlationId);try{const t=await this.networkInterface.sendGetRequestAsync(`${dn.IMDS_ENDPOINT}?format=json`,e);return t.status===pn&&t.body&&t.body["newest-versions"]&&t.body["newest-versions"].length>0?t.body["newest-versions"][0]:null}catch(e){return null}}}
|
|
69
69
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
70
|
-
function
|
|
70
|
+
function hu(){return Math.round((new Date).getTime()/1e3)}function mu(e){return e.getTime()/1e3}function fu(e){return e?new Date(1e3*Number(e)):new Date}function gu(e,t){const i=Number(e)||0;return hu()+t>i}function Tu(e,t){const i=Number(e)+24*t*60*60*1e3;return Date.now()>i}
|
|
71
71
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
72
|
-
function
|
|
73
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
74
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */(i.body);return o?i.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(e){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${e}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in
|
|
75
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */(o.body))r=o.body,n=r.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${r.tenant_discovery_endpoint}`);else{if(!function(e){return e.hasOwnProperty("error")&&e.hasOwnProperty("error_description")}(o.body))return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${o.status}`),r=o.body,r.error===
|
|
72
|
+
function Au(e,t,i,o,r){return{credentialType:Qn.ID_TOKEN,homeAccountId:e,environment:t,clientId:o,secret:i,realm:r,lastUpdatedAt:Date.now().toString()}}function yu(e,t,i,o,r,n,a,s,l,d,c,u,p,h,m){const f={homeAccountId:e,credentialType:Qn.ACCESS_TOKEN,secret:i,cachedAt:hu().toString(),expiresOn:a.toString(),extendedExpiresOn:s.toString(),environment:t,clientId:o,realm:r,target:n,tokenType:c||na.BEARER,lastUpdatedAt:Date.now().toString()};if(u&&(f.userAssertionHash=u),d&&(f.refreshOn=d.toString()),h&&(f.requestedClaims=h,f.requestedClaimsHash=m),f.tokenType?.toLowerCase()!==na.BEARER.toLowerCase())switch(f.credentialType=Qn.ACCESS_TOKEN_WITH_AUTH_SCHEME,f.tokenType){case na.POP:const e=nl(i,l);if(!e?.cnf?.kid)throw _s(ds);f.keyId=e.cnf.kid;break;case na.SSH:f.keyId=p}return f}function Iu(e,t,i,o,r,n,a){const s={credentialType:Qn.REFRESH_TOKEN,homeAccountId:e,environment:t,clientId:o,secret:i,lastUpdatedAt:Date.now().toString()};return n&&(s.userAssertionHash=n),r&&(s.familyId=r),a&&(s.expiresOn=a.toString()),s}function _u(e){return e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")}function Eu(e){return!!e&&(_u(e)&&e.hasOwnProperty("realm")&&e.hasOwnProperty("target")&&(e.credentialType===Qn.ACCESS_TOKEN||e.credentialType===Qn.ACCESS_TOKEN_WITH_AUTH_SCHEME))}function Ou(e){return!!e&&(_u(e)&&e.credentialType===Qn.REFRESH_TOKEN)}function Cu(){return hu()+Xn}function Nu(e,t,i){e.authorization_endpoint=t.authorization_endpoint,e.token_endpoint=t.token_endpoint,e.end_session_endpoint=t.end_session_endpoint,e.issuer=t.issuer,e.endpointsFromNetwork=i,e.jwks_uri=t.jwks_uri}function Ru(e,t,i){e.aliases=t.aliases,e.preferred_cache=t.preferred_cache,e.preferred_network=t.preferred_network,e.aliasesFromNetwork=i}function bu(e){return e.expiresAt<=hu()}
|
|
73
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */pu.IMDS_OPTIONS={headers:{Metadata:"true"}};class wu{constructor(e,t,i,o,r,n,a,s){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=i,this.authorityOptions=o,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=r,this.performanceClient=a,this.correlationId=n,this.managedIdentity=s||!1,this.regionDiscovery=new pu(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(dn.CIAM_AUTH_URL))return du;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case dn.ADFS:return su;case dn.DSTS:return lu}return au}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new pl(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw _s(Ma)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw _s(Ma)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw _s(Ma)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw _s(ps);return this.replacePath(this.metadata.end_session_endpoint)}throw _s(Ma)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw _s(Ma)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw _s(Ma)}canReplaceTenant(e){return 1===e.PathSegments.length&&!wu.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===au&&this.protocolMode!==Rl}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const i=new pl(this.metadata.canonical_authority).getUrlComponents(),o=i.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((e,r)=>{let n=o[r];if(0===r&&this.canReplaceTenant(i)){const e=new pl(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];n!==e&&(this.logger.verbose(`Replacing tenant domain name ${n} with id ${e}`),n=e)}e!==n&&(t=t.replace(`/${n}/`,`/${e}/`))}),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===su||this.protocolMode===Rl&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){this.performanceClient?.addQueueMeasurement(Pd,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await uu(this.updateCloudDiscoveryMetadata.bind(this),Ld,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const i=await uu(this.updateEndpointMetadata.bind(this),xd,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:i}),this.performanceClient?.addFields({cloudDiscoverySource:t,authorityEndpointSource:i},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:Cu(),jwks_uri:""}),e}updateCachedMetadata(e,t,i){t!==ta&&i?.source!==ta&&(e.expiresAt=Cu(),e.canonical_authority=this.canonicalAuthority);const o=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(o,e),this.metadata=e}async updateEndpointMetadata(e){this.performanceClient?.addQueueMeasurement(xd,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===oa&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&t.metadata){Nu(e,await uu(this.updateMetadataWithRegionalInformation.bind(this),Dd,this.logger,this.performanceClient,this.correlationId)(t.metadata),!1),e.canonical_authority=this.canonicalAuthority}return t.source}let i=await uu(this.getEndpointMetadataFromNetwork.bind(this),Md,this.logger,this.performanceClient,this.correlationId)();if(i)return this.authorityOptions.azureRegionConfiguration?.azureRegion&&(i=await uu(this.updateMetadataWithRegionalInformation.bind(this),Dd,this.logger,this.performanceClient,this.correlationId)(i)),Nu(e,i,!0),ia;throw _s(Da,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose("Found endpoint metadata in authority configuration"),Nu(e,t,!1),{source:ea};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{const t=this.getEndpointMetadataFromHardcodedValues();if(t)return Nu(e,t,!1),{source:oa,metadata:t};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const i=bu(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!i?(this.logger.verbose("Found endpoint metadata in the cache."),{source:ta}):(i&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new pl(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch(e){throw Xs(qs)}return null}async getEndpointMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(Md,this.correlationId);const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${t}`);try{const i=await this.networkInterface.sendGetRequestAsync(t,e),o=function(e){return e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("jwks_uri")}
|
|
74
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */(i.body);return o?i.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(e){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${e}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in hl?hl[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){this.performanceClient?.addQueueMeasurement(Dd,this.correlationId);const t=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(t){if(t!==dn.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=fa,this.regionDiscoveryMetadata.region_used=t,wu.replaceWithRegionalInformation(e,t);const i=await uu(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),kd,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(i)return this.regionDiscoveryMetadata.region_outcome=ga,this.regionDiscoveryMetadata.region_used=i,wu.replaceWithRegionalInformation(e,i);this.regionDiscoveryMetadata.region_outcome=Ta}return e}async updateCloudDiscoveryMetadata(e){this.performanceClient?.addQueueMeasurement(Ld,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const i=await uu(this.getCloudDiscoveryMetadataFromNetwork.bind(this),vd,this.logger,this.performanceClient,this.correlationId)();if(i)return Ru(e,i,!0),ia;throw Xs(js)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||dn.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||dn.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||dn.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),Ru(e,t,!1),ea;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const t=(i=this.hostnameAndPort,Tl(ml.metadata,i));if(t)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),Ru(e,t,!1),oa;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}var i;const o=bu(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!o?(this.logger.verbose("Found cloud discovery metadata in the cache."),ta):(o&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===du)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),wu.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const e=Tl(JSON.parse(this.authorityOptions.cloudDiscoveryMetadata).metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),e)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),e;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch(e){throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),Xs(Bs)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),wu.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(vd,this.correlationId);const e=`${dn.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let i=null;try{const o=await this.networkInterface.sendGetRequestAsync(e,t);let r,n;if(function(e){return e.hasOwnProperty("tenant_discovery_endpoint")&&e.hasOwnProperty("metadata")}
|
|
75
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */(o.body))r=o.body,n=r.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${r.tenant_discovery_endpoint}`);else{if(!function(e){return e.hasOwnProperty("error")&&e.hasOwnProperty("error_description")}(o.body))return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${o.status}`),r=o.body,r.error===dn.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${r.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${r.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),n=[]}this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),i=Tl(n,this.hostnameAndPort)}catch(e){if(e instanceof ba)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.\nError: ${e.errorCode}\nError Description: ${e.errorMessage}`);else{const t=e;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: ${t.name}\nError Description: ${t.message}`)}return null}return i||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),i=wu.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),i}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(e=>e&&pl.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let i;if(t&&t.azureCloudInstance!==bs){const e=t.tenant?t.tenant:dn.DEFAULT_COMMON_TENANT;i=`${t.azureCloudInstance}/${e}/`}return i||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return dn.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw _s(Ma)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return fl.has(e)}static isPublicCloudAuthority(e){return dn.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,i){const o=new pl(e);o.validateAsUri();const r=o.getUrlComponents();let n=`${t}.${r.HostNameAndPort}`;this.isPublicCloudAuthority(r.HostNameAndPort)&&(n=`${t}.${dn.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const a=pl.constructAuthorityUriFromObject({...o.getUrlComponents(),HostNameAndPort:n}).urlString;return i?`${a}?${i}`:a}static replaceWithRegionalInformation(e,t){const i={...e};return i.authorization_endpoint=wu.buildRegionalAuthorityString(i.authorization_endpoint,t),i.token_endpoint=wu.buildRegionalAuthorityString(i.token_endpoint,t),i.end_session_endpoint&&(i.end_session_endpoint=wu.buildRegionalAuthorityString(i.end_session_endpoint,t)),i}static transformCIAMAuthority(e){let t=e;const i=new pl(e).getUrlComponents();if(0===i.PathSegments.length&&i.HostNameAndPort.endsWith(dn.CIAM_AUTH_URL)){t=`${t}${i.HostNameAndPort.split(".")[0]}${dn.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}function Su(e){return e.endsWith(dn.FORWARD_SLASH)?e:`${e}${dn.FORWARD_SLASH}`}
|
|
76
76
|
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
77
|
-
async function Pu(e,t,i,o,r,n,a){a?.addQueueMeasurement(
|
|
78
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
79
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */function
|
|
80
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class
|
|
81
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class
|
|
82
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class
|
|
83
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */function
|
|
84
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class
|
|
85
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */const
|
|
86
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class
|
|
87
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */const
|
|
88
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class
|
|
89
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class
|
|
90
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */async function
|
|
91
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class
|
|
92
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class
|
|
93
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class
|
|
94
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */const
|
|
95
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */function
|
|
96
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */(t.account);if(s&&t.domainHint&&(i.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),s=null),s){i.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),
|
|
97
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */const
|
|
98
|
-
/*! @azure/msal-common v15.12.0 2025-08-19 */class
|
|
99
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */const
|
|
100
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */const
|
|
77
|
+
async function Pu(e,t,i,o,r,n,a){a?.addQueueMeasurement(Sd,n);const s=wu.transformCIAMAuthority(Su(e)),l=new wu(s,t,i,o,r,n,a);try{return await uu(l.resolveEndpointsAsync.bind(l),Pd,r,a,n)(),l}catch(e){throw _s(Ma)}}
|
|
78
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */wu.reservedTenantDomains=new Set(["{tenant}","{tenantid}",bn,Sn,wn]);class vu extends ba{constructor(e,t,i,o,r){super(e,t,i),this.name="ServerError",this.errorNo=o,this.status=r,Object.setPrototypeOf(this,vu.prototype)}}
|
|
79
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function Lu(e,t,i){return{clientId:e,authority:t.authority,scopes:t.scopes,homeAccountIdentifier:i,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid,embeddedClientId:t.embeddedClientId||t.tokenBodyParameters?.clientId}}
|
|
80
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Mu{static generateThrottlingStorageKey(e){return`${la}.${JSON.stringify(e)}`}static preProcess(e,t,i){const o=Mu.generateThrottlingStorageKey(t),r=e.getThrottlingCache(o);if(r){if(r.throttleTime<Date.now())return void e.removeItem(o,i);throw new vu(r.errorCodes?.join(" ")||dn.EMPTY_STRING,r.errorMessage,r.subError)}}static postProcess(e,t,i,o){if(Mu.checkResponseStatus(i)||Mu.checkResponseForRetryAfter(i)){const r={throttleTime:Mu.calculateThrottleTime(parseInt(i.headers[En])),error:i.body.error,errorCodes:i.body.error_codes,errorMessage:i.body.error_description,subError:i.body.suberror};e.setThrottlingCache(Mu.generateThrottlingStorageKey(t),r,o)}}static checkResponseStatus(e){return 429===e.status||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return!!e.headers&&(e.headers.hasOwnProperty(En)&&(e.status<200||e.status>=300))}static calculateThrottleTime(e){const t=e<=0?0:e,i=Date.now()/1e3;return Math.floor(1e3*Math.min(i+(t||aa),i+sa))}static removeThrottle(e,t,i,o){const r=Lu(t,i,o),n=this.generateThrottlingStorageKey(r);e.removeItem(n,i.correlationId)}}
|
|
81
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class xu extends ba{constructor(e,t,i){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,xu.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=i}}function Du(e,t,i,o){return e.errorMessage=`${e.errorMessage}, additionalErrorInfo: error.name:${o?.name}, error.message:${o?.message}`,new xu(e,t,i)}
|
|
82
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class ku{constructor(e,t){this.config=function({authOptions:e,systemOptions:t,loggerOptions:i,cacheOptions:o,storageInterface:r,networkInterface:n,cryptoInterface:a,clientCredentials:s,libraryInfo:l,telemetry:d,serverTelemetryManager:c,persistencePlugin:u,serializableCache:p}){const h={...pc,...i};return{authOptions:(m=e,{clientCapabilities:[],azureCloudOptions:Tc,skipAuthorityMetadataCache:!1,instanceAware:!1,encodeExtraQueryParams:!1,...m}),systemOptions:{...uc,...t},loggerOptions:h,cacheOptions:{...hc,...o},storageInterface:r||new Cl(e.clientId,Es,new Cs(h),new cc),networkInterface:n||mc,cryptoInterface:a||Es,clientCredentials:s||gc,libraryInfo:{...fc,...l},telemetry:{...Ac,...d},serverTelemetryManager:c||null,persistencePlugin:u||null,serializableCache:p||null};var m}(e),this.logger=new Cs(this.config.loggerOptions,Ns,Rs),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[In]=dn.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case Ic:try{const i=Oc(e.credential);t[On]=`Oid:${i.uid}@${i.utid}`}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case _c:t[On]=`UPN: ${e.credential}`}return t}async executePostToTokenEndpoint(e,t,i,o,r,n){n&&this.performanceClient?.addQueueMeasurement(n,r);const a=await this.sendPostRequest(o,e,{body:t,headers:i},r);return this.config.serverTelemetryManager&&a.status<500&&429!==a.status&&this.config.serverTelemetryManager.clearTelemetryCache(),a}async sendPostRequest(e,t,i,o){let r;Mu.preProcess(this.cacheManager,e,o);try{r=await uu(this.networkClient.sendPostRequestAsync.bind(this.networkClient),Hl,this.logger,this.performanceClient,o)(t,i);const e=r.headers||{};this.performanceClient?.addFields({refreshTokenSize:r.body.refresh_token?.length||0,httpVerToken:e[Nn]||"",requestId:e[Cn]||""},o)}catch(e){if(e instanceof xu){const t=e.responseHeaders;throw t&&this.performanceClient?.addFields({httpVerToken:t[Nn]||"",requestId:t[Cn]||"",contentTypeHeader:t[In]||void 0,contentLengthHeader:t[_n]||void 0,httpStatus:e.httpStatus},o),e.error}throw e instanceof ba?e:_s(xa)}return Mu.postProcess(this.cacheManager,e,r,o),r}async updateAuthority(e,t){this.performanceClient?.addQueueMeasurement(_d,t);const i=`https://${e}/${this.authority.tenant}/`,o=await Pu(i,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=o}createTokenQueryParameters(e){const t=new Map;return e.embeddedClientId&&nu(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenQueryParameters&&eu(t,e.tokenQueryParameters),Wc(t,e.correlationId),Mc(t,e.correlationId,this.performanceClient),cl(t)}}
|
|
83
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function Uu(e){if(e){return e.tid||e.tfp||e.acr||null}return null}
|
|
84
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Fu{getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,loginHint:this.loginHint,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(e=>[e.tenantId,e]))}}isSingleTenant(){return!this.tenantProfiles}static createAccount(e,t,i){const o=new Fu;let r;t.authorityType===su?o.authorityType=Yn:t.protocolMode===Rl?o.authorityType=Kn:o.authorityType=Hn,e.clientInfo&&i&&(r=Ec(e.clientInfo,i)),o.clientInfo=e.clientInfo,o.homeAccountId=e.homeAccountId,o.nativeAccountId=e.nativeAccountId;const n=e.environment||t&&t.getPreferredCache();if(!n)throw _s(ts);o.environment=n,o.realm=r?.utid||Uu(e.idTokenClaims)||"",o.localAccountId=r?.uid||e.idTokenClaims?.oid||e.idTokenClaims?.sub||"";const a=e.idTokenClaims?.preferred_username||e.idTokenClaims?.upn,s=e.idTokenClaims?.emails?e.idTokenClaims.emails[0]:null;if(o.username=a||s||"",o.loginHint=e.idTokenClaims?.login_hint,o.name=e.idTokenClaims?.name||"",o.cloudGraphHostName=e.cloudGraphHostName,o.msGraphHost=e.msGraphHost,e.tenantProfiles)o.tenantProfiles=e.tenantProfiles;else{const t=ol(e.homeAccountId,o.localAccountId,o.realm,e.idTokenClaims);o.tenantProfiles=[t]}return o}static createFromAccountInfo(e,t,i){const o=new Fu;return o.authorityType=e.authorityType||Kn,o.homeAccountId=e.homeAccountId,o.localAccountId=e.localAccountId,o.nativeAccountId=e.nativeAccountId,o.realm=e.tenantId,o.environment=e.environment,o.username=e.username,o.name=e.name,o.loginHint=e.loginHint,o.cloudGraphHostName=t,o.msGraphHost=i,o.tenantProfiles=Array.from(e.tenantProfiles?.values()||[]),o}static generateHomeAccountId(e,t,i,o,r){if(t!==su&&t!==lu){if(e)try{const t=Ec(e,o.base64Decode);if(t.uid&&t.utid)return`${t.uid}.${t.utid}`}catch(e){}i.warning("No client info in response")}return r?.sub||""}static isAccountEntity(e){return!!e&&(e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"))}static accountInfoIsEqual(e,t,i){if(!e||!t)return!1;let o=!0;if(i){const i=e.idTokenClaims||{},r=t.idTokenClaims||{};o=i.iat===r.iat&&i.nonce===r.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.loginHint===t.loginHint&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&o}}
|
|
85
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const Bu="no_tokens_found",qu="native_account_unavailable",ju="refresh_token_expired",Gu="ux_not_allowed",Wu="bad_token",Hu=["interaction_required","consent_required","login_required",Wu,Gu],Yu=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],Ku={[Bu]:"No refresh token found in the cache. Please sign-in.",[qu]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[ju]:"Refresh token has expired.",[Wu]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",[Gu]:"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve."};class Vu extends ba{constructor(e,t,i,o,r,n,a,s){super(e,t,i),Object.setPrototypeOf(this,Vu.prototype),this.timestamp=o||dn.EMPTY_STRING,this.traceId=r||dn.EMPTY_STRING,this.correlationId=n||dn.EMPTY_STRING,this.claims=a||dn.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=s}}function zu(e,t,i){const o=!!e&&Hu.indexOf(e)>-1,r=!!i&&Yu.indexOf(i)>-1,n=!!t&&Hu.some(e=>t.indexOf(e)>-1);return o||n||r}function Qu(e){return new Vu(e,Ku[e])}
|
|
86
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class $u{static setRequestState(e,t,i){const o=$u.generateLibraryState(e,i);return t?`${o}${dn.RESOURCE_DELIM}${t}`:o}static generateLibraryState(e,t){if(!e)throw _s(os);const i={id:e.createNewGuid()};t&&(i.meta=t);const o=JSON.stringify(i);return e.base64Encode(o)}static parseRequestState(e,t){if(!e)throw _s(os);if(!t)throw _s(Ua);try{const i=t.split(dn.RESOURCE_DELIM),o=i[0],r=i.length>1?i.slice(1).join(dn.RESOURCE_DELIM):dn.EMPTY_STRING,n=e.base64Decode(o),a=JSON.parse(n);return{userRequestState:r||dn.EMPTY_STRING,libraryState:a}}catch(e){throw _s(Ua)}}}
|
|
87
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const Zu="sw";class Ju{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){this.performanceClient?.addQueueMeasurement(Nd,e.correlationId);const i=await uu(this.generateKid.bind(this),Nd,t,this.performanceClient,e.correlationId)(e),o=this.cryptoUtils.base64UrlEncode(JSON.stringify(i));return{kid:i.kid,reqCnfString:o}}async generateKid(e){this.performanceClient?.addQueueMeasurement(Rd,e.correlationId);return{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:Zu}}async signPopToken(e,t,i){return this.signPayload(e,t,i)}async signPayload(e,t,i,o){const{resourceRequestMethod:r,resourceRequestUri:n,shrClaims:a,shrNonce:s,shrOptions:l}=i,d=n?new pl(n):void 0,c=d?.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:hu(),m:r?.toUpperCase(),u:c?.HostNameAndPort,nonce:s||this.cryptoUtils.createNewGuid(),p:c?.AbsolutePath,q:c?.QueryString?[[],c.QueryString]:void 0,client_claims:a||void 0,...o},t,l,i.correlationId)}}
|
|
88
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Xu{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}
|
|
89
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class ep{constructor(e,t,i,o,r,n,a){this.clientId=e,this.cacheStorage=t,this.cryptoObj=i,this.logger=o,this.serializableCache=r,this.persistencePlugin=n,this.performanceClient=a}validateTokenResponse(e,t){if(e.error||e.error_description||e.suberror){const i=`Error(s): ${e.error_codes||dn.NOT_AVAILABLE} - Timestamp: ${e.timestamp||dn.NOT_AVAILABLE} - Description: ${e.error_description||dn.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||dn.NOT_AVAILABLE} - Trace ID: ${e.trace_id||dn.NOT_AVAILABLE}`,o=e.error_codes?.length?e.error_codes[0]:void 0,r=new vu(e.error,i,e.suberror,o,e.status);if(t&&e.status&&e.status>=mn&&e.status<=fn)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\n${r}`);if(t&&e.status&&e.status>=un&&e.status<=hn)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${r}`);if(zu(e.error,e.error_description,e.suberror))throw new Vu(e.error,e.error_description,e.suberror,e.timestamp||dn.EMPTY_STRING,e.trace_id||dn.EMPTY_STRING,e.correlation_id||dn.EMPTY_STRING,e.claims||dn.EMPTY_STRING,o);throw r}}async handleServerTokenResponse(e,t,i,o,r,n,a,s,l){let d,c;if(this.performanceClient?.addQueueMeasurement(bd,e.correlation_id),e.id_token){if(d=nl(e.id_token||dn.EMPTY_STRING,this.cryptoObj.base64Decode),r&&r.nonce&&d.nonce!==r.nonce)throw _s(qa);if(o.maxAge||0===o.maxAge){const e=d.auth_time;if(!e)throw _s(ja);al(e,o.maxAge)}}this.homeAccountIdentifier=Fu.generateHomeAccountId(e.client_info||dn.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,d),r&&r.state&&(c=$u.parseRequestState(this.cryptoObj,r.state)),e.key_id=e.key_id||o.sshKid||void 0;const u=this.generateCacheRecord(e,t,i,o,d,n,r);let p;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),p=new Xu(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(p)),a&&!s&&u.account){const e=this.cacheStorage.generateAccountKey(u.account.getAccountInfo());if(!this.cacheStorage.getAccount(e,o.correlationId))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await ep.generateAuthenticationResult(this.cryptoObj,t,u,!1,o,d,c,void 0,l)}await this.cacheStorage.saveCacheRecord(u,o.correlationId,o.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&p&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(p))}return ep.generateAuthenticationResult(this.cryptoObj,t,u,!1,o,d,c,e,l)}generateCacheRecord(e,t,i,o,r,n,a){const s=t.getPreferredCache();if(!s)throw _s(ts);const l=Uu(r);let d,c;e.id_token&&r&&(d=Au(this.homeAccountIdentifier,s,e.id_token,this.clientId,l||""),c=tp(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,o.correlationId,r,e.client_info,s,l,a,void 0,this.logger));let u=null;if(e.access_token){const r=e.scope?tl.fromString(e.scope):new tl(o.scopes||[]),a=("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0,d=("string"==typeof e.ext_expires_in?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,c=("string"==typeof e.refresh_in?parseInt(e.refresh_in,10):e.refresh_in)||void 0,p=i+a,h=p+d,m=c&&c>0?i+c:void 0;u=yu(this.homeAccountIdentifier,s,e.access_token,this.clientId,l||t.tenant||"",r.printScopes(),p,h,this.cryptoObj.base64Decode,m,e.token_type,n,e.key_id,o.claims,o.requestedClaimsHash)}let p=null;if(e.refresh_token){let t;if(e.refresh_token_expires_in){t=i+("string"==typeof e.refresh_token_expires_in?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in)}p=Iu(this.homeAccountIdentifier,s,e.refresh_token,this.clientId,e.foci,n,t)}let h=null;return e.foci&&(h={clientId:this.clientId,environment:s,familyId:e.foci}),{account:c,idToken:d,accessToken:u,refreshToken:p,appMetadata:h}}static async generateAuthenticationResult(e,t,i,o,r,n,a,s,l){let d,c,u=dn.EMPTY_STRING,p=[],h=null,m=dn.EMPTY_STRING;if(i.accessToken){if(i.accessToken.tokenType!==na.POP||r.popKid)u=i.accessToken.secret;else{const t=new Ju(e),{secret:o,keyId:n}=i.accessToken;if(!n)throw _s(hs);u=await t.signPopToken(o,n,r)}p=tl.fromString(i.accessToken.target).asArray(),h=fu(i.accessToken.expiresOn),d=fu(i.accessToken.extendedExpiresOn),i.accessToken.refreshOn&&(c=fu(i.accessToken.refreshOn))}i.appMetadata&&(m=i.appMetadata.familyId===Zn?Zn:"");const f=n?.oid||n?.sub||"",g=n?.tid||"";s?.spa_accountid&&i.account&&(i.account.nativeAccountId=s?.spa_accountid);const T=i.account?rl(i.account.getAccountInfo(),void 0,n,i.idToken?.secret):null;return{authority:t.canonicalAuthority,uniqueId:f,tenantId:g,scopes:p,account:T,idToken:i?.idToken?.secret||"",idTokenClaims:n||{},accessToken:u,fromCache:o,expiresOn:h,extExpiresOn:d,refreshOn:c,correlationId:r.correlationId,requestId:l||dn.EMPTY_STRING,familyId:m,tokenType:i.accessToken?.tokenType||dn.EMPTY_STRING,state:a?a.userRequestState:dn.EMPTY_STRING,cloudGraphHostName:i.account?.cloudGraphHostName||dn.EMPTY_STRING,msGraphHost:i.account?.msGraphHost||dn.EMPTY_STRING,code:s?.spa_code,fromNativeBroker:!1}}}function tp(e,t,i,o,r,n,a,s,l,d,c,u){u?.verbose("setCachedAccount called");const p=e.getAccountKeys().find(e=>e.startsWith(i));let h=null;p&&(h=e.getAccount(p,r));const m=h||Fu.createAccount({homeAccountId:i,idTokenClaims:n,clientInfo:a,environment:s,cloudGraphHostName:d?.cloud_graph_host_name,msGraphHost:d?.msgraph_host,nativeAccountId:c},t,o),f=m.tenantProfiles||[],g=l||m.realm;if(g&&!f.find(e=>e.tenantId===g)){const e=ol(i,m.localAccountId,g,n);f.push(e)}return m.tenantProfiles=f,m}
|
|
90
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */async function ip(e,t,i){if("string"==typeof e)return e;return e({clientId:t,tokenEndpoint:i})}
|
|
91
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class op extends ku{constructor(e,t){super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}async acquireToken(e,t){if(this.performanceClient?.addQueueMeasurement(Ed,e.correlationId),!e.code)throw _s(Ka);const i=hu(),o=await uu(this.executeTokenRequest.bind(this),Od,this.logger,this.performanceClient,e.correlationId)(this.authority,e),r=o.headers?.[Cn],n=new ep(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return n.validateTokenResponse(o.body),uu(n.handleServerTokenResponse.bind(n),bd,this.logger,this.performanceClient,e.correlationId)(o.body,this.authority,i,e,t,void 0,void 0,void 0,r)}getLogoutUri(e){if(!e)throw Xs(ks);const t=this.createLogoutUrlQueryString(e);return pl.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Od,t.correlationId);const i=this.createTokenQueryParameters(t),o=pl.appendQueryString(e.tokenEndpoint,i),r=await uu(this.createTokenRequestBody.bind(this),Cd,this.logger,this.performanceClient,t.correlationId)(t);let n;if(t.clientInfo)try{const e=Ec(t.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${e.uid}${zn}${e.utid}`,type:Ic}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}const a=this.createTokenRequestHeaders(n||t.ccsCredential),s=Lu(this.config.authOptions.clientId,t);return uu(this.executePostToTokenEndpoint.bind(this),Kl,this.logger,this.performanceClient,t.correlationId)(o,r,a,s,t.correlationId,Kl)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Cd,e.correlationId);const t=new Map;if(kc(t,e.embeddedClientId||e.tokenBodyParameters?.[Cc]||this.config.authOptions.clientId),this.includeRedirectUri)Uc(t,e.redirectUri);else if(!e.redirectUri)throw Xs(ws);if(Dc(t,e.scopes,!0,this.oidcDefaultScopes),function(e,t){e.set("code",t)}(t,e.code),Hc(t,this.config.libraryInfo),Yc(t,this.config.telemetry.application),ru(t),this.serverTelemetryManager&&!yc(this.config)&&ou(t,this.serverTelemetryManager),e.codeVerifier&&function(e,t){e.set("code_verifier",t)}(t,e.codeVerifier),this.config.clientCredentials.clientSecret&&zc(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const i=this.config.clientCredentials.clientAssertion;Qc(t,await ip(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),$c(t,i.assertionType)}if(Zc(t,Gn),Jc(t),e.authenticationScheme===na.POP){const i=new Ju(this.cryptoUtils,this.performanceClient);let o;if(e.popKid)o=this.cryptoUtils.encodeKid(e.popKid);else{o=(await uu(i.generateCnf.bind(i),Nd,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}tu(t,o)}else if(e.authenticationScheme===na.SSH){if(!e.sshJwk)throw Xs(Gs);iu(t,e.sshJwk)}let i;if((!el.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Gc(t,e.claims,this.config.authOptions.clientCapabilities),e.clientInfo)try{const t=Ec(e.clientInfo,this.cryptoUtils.base64Decode);i={credential:`${t.uid}${zn}${t.utid}`,type:Ic}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}else i=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&i)switch(i.type){case Ic:try{qc(t,Oc(i.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case _c:Bc(t,i.credential)}return e.embeddedClientId&&nu(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&eu(t,e.tokenBodyParameters),!e.enableSpaAuthorizationCode||e.tokenBodyParameters&&e.tokenBodyParameters[wc]||eu(t,{[wc]:"1"}),Mc(t,e.correlationId,this.performanceClient),cl(t)}createLogoutUrlQueryString(e){const t=new Map;return e.postLogoutRedirectUri&&function(e,t){e.set("post_logout_redirect_uri",t)}(t,e.postLogoutRedirectUri),e.correlationId&&Wc(t,e.correlationId),e.idTokenHint&&function(e,t){e.set("id_token_hint",t)}(t,e.idTokenHint),e.state&&Kc(t,e.state),e.logoutHint&&function(e,t){e.set("logout_hint",t)}(t,e.logoutHint),e.extraQueryParameters&&eu(t,e.extraQueryParameters),this.config.authOptions.instanceAware&&Xc(t),cl(t,this.config.authOptions.encodeExtraQueryParams,e.extraQueryParameters)}}
|
|
92
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class rp extends ku{constructor(e,t){super(e,t)}async acquireToken(e){this.performanceClient?.addQueueMeasurement(zl,e.correlationId);const t=hu(),i=await uu(this.executeTokenRequest.bind(this),Vl,this.logger,this.performanceClient,e.correlationId)(e,this.authority),o=i.headers?.[Cn],r=new ep(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return r.validateTokenResponse(i.body),uu(r.handleServerTokenResponse.bind(r),bd,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,o)}async acquireTokenByRefreshToken(e){if(!e)throw Xs(Ds);if(this.performanceClient?.addQueueMeasurement($l,e.correlationId),!e.account)throw _s(Xa);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await uu(this.acquireTokenWithCachedRefreshToken.bind(this),Ql,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(t){const i=t instanceof Vu&&t.errorCode===Bu,o=t instanceof vu&&t.errorCode===ca&&t.subError===ua;if(i||o)return uu(this.acquireTokenWithCachedRefreshToken.bind(this),Ql,this.logger,this.performanceClient,e.correlationId)(e,!1);throw t}return uu(this.acquireTokenWithCachedRefreshToken.bind(this),Ql,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){this.performanceClient?.addQueueMeasurement(Ql,e.correlationId);const i=cu(this.cacheManager.getRefreshToken.bind(this.cacheManager),Yd,this.logger,this.performanceClient,e.correlationId)(e.account,t,e.correlationId,void 0,this.performanceClient);if(!i)throw Qu(Bu);if(i.expiresOn&&gu(i.expiresOn,e.refreshTokenExpirationOffsetSeconds||300))throw this.performanceClient?.addFields({rtExpiresOnMs:Number(i.expiresOn)},e.correlationId),Qu(ju);const o={...e,refreshToken:i.secret,authenticationScheme:e.authenticationScheme||na.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:Ic}};try{return await uu(this.acquireToken.bind(this),zl,this.logger,this.performanceClient,e.correlationId)(o)}catch(t){if(t instanceof Vu&&(this.performanceClient?.addFields({rtExpiresOnMs:Number(i.expiresOn)},e.correlationId),t.subError===Wu)){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const t=this.cacheManager.generateCredentialKey(i);this.cacheManager.removeRefreshToken(t,e.correlationId)}throw t}}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Vl,e.correlationId);const i=this.createTokenQueryParameters(e),o=pl.appendQueryString(t.tokenEndpoint,i),r=await uu(this.createTokenRequestBody.bind(this),Zl,this.logger,this.performanceClient,e.correlationId)(e),n=this.createTokenRequestHeaders(e.ccsCredential),a=Lu(this.config.authOptions.clientId,e);return uu(this.executePostToTokenEndpoint.bind(this),Yl,this.logger,this.performanceClient,e.correlationId)(o,r,n,a,e.correlationId,Yl)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Zl,e.correlationId);const t=new Map;if(kc(t,e.embeddedClientId||e.tokenBodyParameters?.[Cc]||this.config.authOptions.clientId),e.redirectUri&&Uc(t,e.redirectUri),Dc(t,e.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),Zc(t,Wn),Jc(t),Hc(t,this.config.libraryInfo),Yc(t,this.config.telemetry.application),ru(t),this.serverTelemetryManager&&!yc(this.config)&&ou(t,this.serverTelemetryManager),function(e,t){e.set("refresh_token",t)}(t,e.refreshToken),this.config.clientCredentials.clientSecret&&zc(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const i=this.config.clientCredentials.clientAssertion;Qc(t,await ip(i.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),$c(t,i.assertionType)}if(e.authenticationScheme===na.POP){const i=new Ju(this.cryptoUtils,this.performanceClient);let o;if(e.popKid)o=this.cryptoUtils.encodeKid(e.popKid);else{o=(await uu(i.generateCnf.bind(i),Nd,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}tu(t,o)}else if(e.authenticationScheme===na.SSH){if(!e.sshJwk)throw Xs(Gs);iu(t,e.sshJwk)}if((!el.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Gc(t,e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case Ic:try{qc(t,Oc(e.ccsCredential.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case _c:Bc(t,e.ccsCredential.credential)}return e.embeddedClientId&&nu(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&eu(t,e.tokenBodyParameters),Mc(t,e.correlationId,this.performanceClient),cl(t)}}
|
|
93
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class np extends ku{constructor(e,t){super(e,t)}async acquireCachedToken(e){this.performanceClient?.addQueueMeasurement(Xl,e.correlationId);let t=Aa;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!el.isEmptyObj(e.claims))throw this.setCacheOutcome(ya,e.correlationId),_s(ss);if(!e.account)throw _s(Xa);const i=e.account.tenantId||function(e){const t=new pl(e).getUrlComponents(),i=t.PathSegments.slice(-1)[0]?.toLowerCase();switch(i){case bn:case wn:case Sn:return;default:return i}}(e.authority),o=this.cacheManager.getTokenKeys(),r=this.cacheManager.getAccessToken(e.account,e,o,i);if(!r)throw this.setCacheOutcome(Ia,e.correlationId),_s(ss);if(n=r.cachedAt,Number(n)>hu()||gu(r.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(_a,e.correlationId),_s(ss);var n;r.refreshOn&&gu(r.refreshOn,0)&&(t=Ea);const a=e.authority||this.authority.getPreferredCache(),s={account:this.cacheManager.getAccount(this.cacheManager.generateAccountKey(e.account),e.correlationId),accessToken:r,idToken:this.cacheManager.getIdToken(e.account,e.correlationId,o,i,this.performanceClient),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(a)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await uu(this.generateResultFromCacheRecord.bind(this),ed,this.logger,this.performanceClient,e.correlationId)(s,e),t]}setCacheOutcome(e,t){this.serverTelemetryManager?.setCacheOutcome(e),this.performanceClient?.addFields({cacheOutcome:e},t),e!==Aa&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){let i;if(this.performanceClient?.addQueueMeasurement(ed,t.correlationId),e.idToken&&(i=nl(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||0===t.maxAge){const e=i?.auth_time;if(!e)throw _s(ja);al(e,t.maxAge)}return ep.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,i)}}
|
|
94
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const ap={sendGetRequestAsync:()=>Promise.reject(_s(Ts)),sendPostRequestAsync:()=>Promise.reject(_s(Ts))};
|
|
95
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */function sp(e,t,i,o){const r=t.correlationId,n=new Map;kc(n,t.embeddedClientId||t.extraQueryParameters?.[Cc]||e.clientId);if(Dc(n,[...t.scopes||[],...t.extraScopesToConsent||[]],!0,e.authority.options.OIDCOptions?.defaultScopes),Uc(n,t.redirectUri),Wc(n,r),function(e,t){e.set("response_mode",t||jn)}(n,t.responseMode),Jc(n),t.prompt&&(!function(e,t){e.set("prompt",t)}(n,t.prompt),o?.addFields({prompt:t.prompt},r)),t.domainHint&&(!function(e,t){e.set("domain_hint",t)}(n,t.domainHint),o?.addFields({domainHintFromRequest:!0},r)),t.prompt!==Mn)if(t.sid&&t.prompt===Dn)i.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),jc(n,t.sid),o?.addFields({sidFromRequest:!0},r);else if(t.account){const e=(a=t.account,a.idTokenClaims?.sid||null);let s=function(e){return e.loginHint||e.idTokenClaims?.login_hint||null}
|
|
96
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */(t.account);if(s&&t.domainHint&&(i.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),s=null),s){i.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),Fc(n,s),o?.addFields({loginHintFromClaim:!0},r);try{qc(n,Oc(t.account.homeAccountId))}catch(e){i.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e&&t.prompt===Dn){i.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),jc(n,e),o?.addFields({sidFromClaim:!0},r);try{qc(n,Oc(t.account.homeAccountId))}catch(e){i.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(t.loginHint)i.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),Fc(n,t.loginHint),Bc(n,t.loginHint),o?.addFields({loginHintFromRequest:!0},r);else if(t.account.username){i.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),Fc(n,t.account.username),o?.addFields({loginHintFromUpn:!0},r);try{qc(n,Oc(t.account.homeAccountId))}catch(e){i.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else t.loginHint&&(i.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),Fc(n,t.loginHint),Bc(n,t.loginHint),o?.addFields({loginHintFromRequest:!0},r));else i.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");var a;return t.nonce&&function(e,t){e.set("nonce",t)}(n,t.nonce),t.state&&Kc(n,t.state),(t.claims||e.clientCapabilities&&e.clientCapabilities.length>0)&&Gc(n,t.claims,e.clientCapabilities),t.embeddedClientId&&nu(n,e.clientId,e.redirectUri),!e.instanceAware||t.extraQueryParameters&&Object.keys(t.extraQueryParameters).includes(Lc)||Xc(n),n}function lp(e,t,i,o){const r=cl(t,i,o);return pl.appendQueryString(e.authorizationEndpoint,r)}function dp(e,t){if(!e.state||!t)throw e.state?_s(Ba,"Cached State"):_s(Ba,"Server State");let i,o;try{i=decodeURIComponent(e.state)}catch(t){throw _s(Ua,e.state)}try{o=decodeURIComponent(t)}catch(t){throw _s(Ua,e.state)}if(i!==o)throw _s(Fa);if(e.error||e.error_description||e.suberror){const t=function(e){const t="code=",i=e.error_uri?.lastIndexOf(t);return i&&i>=0?e.error_uri?.substring(i+t.length):void 0}(e);if(zu(e.error,e.error_description,e.suberror))throw new Vu(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",t);throw new vu(e.error||"",e.error_description,e.suberror,t)}}function cp(e){const{skus:t,libraryName:i,libraryVersion:o,extensionName:r,extensionVersion:n}=e,a=new Map([[0,[i,o]],[2,[r,n]]]);let s=[];if(t?.length){if(s=t.split(","),s.length<4)return t}else s=Array.from({length:4},()=>"|");return a.forEach((e,t)=>{2===e.length&&e[0]?.length&&e[1]?.length&&function(e){const{skuArr:t,index:i,skuName:o,skuVersion:r}=e;if(i>=t.length)return;t[i]=[o,r].join("|")}({skuArr:s,index:t,skuName:e[0],skuVersion:e[1]})}),s.join(",")}class up{constructor(e,t){this.cacheOutcome=Aa,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||dn.EMPTY_STRING,this.wrapperVer=e.wrapperVer||dn.EMPTY_STRING,this.telemetryCacheKey=ra.CACHE_KEY+Vn+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${ra.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],i=this.getNativeBrokerErrorCode();i?.length&&t.push(`broker_error=${i}`);const o=t.join(ra.VALUE_SEPARATOR),r=[e,this.getRegionDiscoveryFields()].join(ra.VALUE_SEPARATOR);return[ra.SCHEMA_VERSION,r,o].join(ra.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=up.maxErrorsToSend(e),i=e.failedRequests.slice(0,2*t).join(ra.VALUE_SEPARATOR),o=e.errors.slice(0,t).join(ra.VALUE_SEPARATOR),r=e.errors.length,n=[r,t<r?ra.OVERFLOW_TRUE:ra.OVERFLOW_FALSE].join(ra.VALUE_SEPARATOR);return[ra.SCHEMA_VERSION,e.cacheHits,i,o,n].join(ra.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=ra.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof ba?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(ra.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t,this.correlationId)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId),e.cacheHits}getLastRequests(){return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||{failedRequests:[],errors:[],cacheHits:0}}clearTelemetryCache(){const e=this.getLastRequests(),t=up.maxErrorsToSend(e);if(t===e.errors.length)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{const i={failedRequests:e.failedRequests.slice(2*t),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i,this.correlationId)}}static maxErrorsToSend(e){let t,i=0,o=0;const r=e.errors.length;for(t=0;t<r;t++){const r=e.failedRequests[2*t]||dn.EMPTY_STRING,n=e.failedRequests[2*t+1]||dn.EMPTY_STRING,a=e.errors[t]||dn.EMPTY_STRING;if(o+=r.toString().length+n.toString().length+a.length+3,!(o<ra.MAX_LAST_HEADER_BYTES))break;i+=1}return i}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||dn.EMPTY_STRING),e.push(this.regionSource||dn.EMPTY_STRING),e.push(this.regionOutcome||dn.EMPTY_STRING),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t,this.correlationId)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId)}static makeExtraSkuString(e){return cp(e)}}
|
|
97
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */const pp="missing_kid_error",hp="missing_alg_error",mp={[pp]:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.",[hp]:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."};class fp extends ba{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,fp.prototype)}}function gp(e){return new fp(e,mp[e])}
|
|
98
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */class Tp{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw gp(pp);if(!e.alg)throw gp(hp);const t=new Tp({typ:e.typ||Oa,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}
|
|
99
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const Ap="pkce_not_created",yp="ear_jwk_empty",Ip="ear_jwe_empty",_p="crypto_nonexistent",Ep="empty_navigate_uri",Op="hash_empty_error",Cp="no_state_in_hash",Np="hash_does_not_contain_known_properties",Rp="unable_to_parse_state",bp="state_interaction_type_mismatch",wp="interaction_in_progress",Sp="popup_window_error",Pp="empty_window_error",vp="user_cancelled",Lp="monitor_popup_timeout",Mp="monitor_window_timeout",xp="redirect_in_iframe",Dp="block_iframe_reload",kp="block_nested_popups",Up="iframe_closed_prematurely",Fp="silent_logout_unsupported",Bp="no_account_error",qp="silent_prompt_value_error",jp="no_token_request_cache_error",Gp="unable_to_parse_token_request_cache_error",Wp="auth_request_not_set_error",Hp="invalid_cache_type",Yp="non_browser_environment",Kp="database_not_open",Vp="no_network_connectivity",zp="post_request_failed",Qp="get_request_failed",$p="failed_to_parse_response",Zp="unable_to_load_token",Jp="crypto_key_not_found",Xp="auth_code_required",eh="auth_code_or_nativeAccountId_required",th="spa_code_and_nativeAccountId_present",ih="database_unavailable",oh="unable_to_acquire_token_from_native_platform",rh="native_handshake_timeout",nh="native_extension_not_installed",ah="native_connection_not_established",sh="uninitialized_public_client_application",lh="native_prompt_not_supported",dh="invalid_base64_string",ch="invalid_pop_token_request",uh="failed_to_build_headers",ph="failed_to_parse_headers",hh="failed_to_decrypt_ear_response",mh="timed_out",fh="For more visit: aka.ms/msaljs/browser-errors",gh={[Ap]:"The PKCE code challenge and verifier could not be generated.",[yp]:"No EAR encryption key provided. This is unexpected.",[Ip]:"Server response does not contain ear_jwe property. This is unexpected.",[_p]:"The crypto object or function is not available.",[Ep]:"Navigation URI is empty. Please check stack trace for more info.",[Op]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${fh}`,[Cp]:"Hash does not contain state. Please verify that the request originated from msal.",[Np]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${fh}`,[Rp]:"Unable to parse state. Please verify that the request originated from msal.",[bp]:"Hash contains state but the interaction type does not match the caller.",[wp]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${fh}`,[Sp]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[Pp]:"window.open returned null or undefined window object.",[vp]:"User cancelled the flow.",[Lp]:`Token acquisition in popup failed due to timeout. ${fh}`,[Mp]:`Token acquisition in iframe failed due to timeout. ${fh}`,[xp]:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",[Dp]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${fh}`,[kp]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[Up]:"The iframe being monitored was closed prematurely.",[Fp]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[Bp]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[qp]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[jp]:"No token request found in cache.",[Gp]:"The cached token request could not be parsed.",[Wp]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[Hp]:"Invalid cache type",[Yp]:"Login and token requests are not supported in non-browser environments.",[Kp]:"Database is not open!",[Vp]:"No network connectivity. Check your internet connection.",[zp]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[Qp]:"Network request failed. Please check the network trace to determine root cause.",[$p]:"Failed to parse network response. Check network trace.",[Zp]:"Error loading token to cache.",[Jp]:"Cryptographic Key or Keypair not found in browser storage.",[Xp]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[eh]:"An authorization code or nativeAccountId must be provided to this flow.",[th]:"Request cannot contain both spa code and native account id.",[ih]:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",[oh]:`Unable to acquire token from native platform. ${fh}`,[rh]:"Timed out while attempting to establish connection to browser extension",[nh]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[ah]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${fh}`,[sh]:`You must call and await the initialize function before attempting to call any other MSAL API. ${fh}`,[lh]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[dh]:"Invalid base64 encoded string.",[ch]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[uh]:"Failed to build request headers object.",[ph]:"Failed to parse response headers",[hh]:"Failed to decrypt ear response",[mh]:"The request timed out."};class Th extends ba{constructor(e,t){super(e,gh[e],t),Object.setPrototypeOf(this,Th.prototype),this.name="BrowserAuthError"}}function Ah(e,t){return new Th(e,t)}
|
|
100
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const yh="invalid_grant",Ih=483,_h=600,Eh="msal",Oh=30,Ch="msal.js.browser",Nh="53ee284d-920a-4b59-9d30-a60315b26836",Rh="ppnbnpeolgkicgegkbkbjmhlideopiji",bh="MATS",wh="MicrosoftEntra",Sh="DOM API",Ph="get-token-and-sign-out",vh="PlatformAuthDOMHandler",Lh="PlatformAuthExtensionHandler",Mh="Handshake",xh="HandshakeResponse",Dh="GetToken",kh="Response",Uh="localStorage",Fh="sessionStorage",Bh="memoryStorage",qh="GET",jh="POST",Gh="signin",Wh="signout",Hh="request.origin",Yh="urlHash",Kh="request.params",Vh="code.verifier",zh="interaction.status",Qh="request.native",$h="wrapper.sku",Zh="wrapper.version",Jh=861,Xh=862,em=863,tm=865,im=866,om=61,rm=961,nm=962;var am;!function(e){e.Redirect="redirect",e.Popup="popup",e.Silent="silent",e.None="none"}(am||(am={}));const sm="startup",lm="login",dm="logout",cm="acquireToken",um="ssoSilent",pm="handleRedirect",hm="none",mm={scopes:An},fm="@azure/msal-react",gm="msal.db",Tm=`${gm}.keys`,Am=0,ym=1,Im=2,_m=3,Em=4,Om=5,Cm=[Am,Om,Em];
|
|
101
101
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
102
|
-
function
|
|
103
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */function
|
|
104
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */const
|
|
105
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */const
|
|
106
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */function
|
|
102
|
+
function Nm(e){return encodeURIComponent(bm(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function Rm(e){return wm(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function bm(e){return wm((new TextEncoder).encode(e))}function wm(e){const t=Array.from(e,e=>String.fromCodePoint(e)).join("");return btoa(t)}
|
|
103
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */function Sm(e){return(new TextDecoder).decode(Pm(e))}function Pm(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Ah(dh)}const i=atob(t);return Uint8Array.from(i,e=>e.codePointAt(0)||0)}
|
|
104
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const vm="AES-GCM",Lm="HKDF",Mm="SHA-256",xm=new Uint8Array([1,0,1]),Dm="0123456789abcdef",km=new Uint32Array(1),Um="raw",Fm="encrypt",Bm="decrypt",qm={name:"RSASSA-PKCS1-v1_5",hash:Mm,modulusLength:2048,publicExponent:xm};async function jm(e,t,i){t?.addQueueMeasurement(Jd,i);const o=(new TextEncoder).encode(e);return window.crypto.subtle.digest(Mm,o)}function Gm(e){return window.crypto.getRandomValues(e)}function Wm(){return window.crypto.getRandomValues(km),km[0]}function Hm(){const e=Date.now(),t=1024*Wm()+(1023&Wm()),i=new Uint8Array(16),o=Math.trunc(t/2**30),r=t&2**30-1,n=Wm();i[0]=e/2**40,i[1]=e/2**32,i[2]=e/2**24,i[3]=e/65536,i[4]=e/256,i[5]=e,i[6]=112|o>>>8,i[7]=o,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=n>>>24,i[13]=n>>>16,i[14]=n>>>8,i[15]=n;let a="";for(let e=0;e<i.length;e++)a+=Dm.charAt(i[e]>>>4),a+=Dm.charAt(15&i[e]),3!==e&&5!==e&&7!==e&&9!==e||(a+="-");return a}async function Ym(e){return window.crypto.subtle.exportKey("jwk",e)}async function Km(){const e=await zm(),t={alg:"dir",kty:"oct",k:Rm(new Uint8Array(e))};return bm(JSON.stringify(t))}async function Vm(e,t){const i=t.split(".");if(5!==i.length)throw Ah(hh,"jwe_length");const o=await async function(e){const t=Sm(e),i=Pm(JSON.parse(t).k);return window.crypto.subtle.importKey(Um,i,vm,!1,[Bm])}(e).catch(()=>{throw Ah(hh,"import_key")});try{const e=(new TextEncoder).encode(i[0]),t=Pm(i[2]),r=Pm(i[3]),n=Pm(i[4]),a=8*n.byteLength,s=new Uint8Array(r.length+n.length);s.set(r),s.set(n,r.length);const l=await window.crypto.subtle.decrypt({name:vm,iv:t,tagLength:a,additionalData:e},o,s);return(new TextDecoder).decode(l)}catch(e){throw Ah(hh,"decrypt")}}async function zm(){const e=await window.crypto.subtle.generateKey({name:vm,length:256},!0,[Fm,Bm]);return window.crypto.subtle.exportKey(Um,e)}async function Qm(e){return window.crypto.subtle.importKey(Um,e,Lm,!1,["deriveKey"])}async function $m(e,t,i){return window.crypto.subtle.deriveKey({name:Lm,salt:t,hash:Mm,info:(new TextEncoder).encode(i)},e,{name:vm,length:256},!1,[Fm,Bm])}async function Zm(e,t,i){const o=(new TextEncoder).encode(t),r=window.crypto.getRandomValues(new Uint8Array(16)),n=await $m(e,r,i),a=await window.crypto.subtle.encrypt({name:vm,iv:new Uint8Array(12)},n,o);return{data:Rm(new Uint8Array(a)),nonce:Rm(r)}}async function Jm(e,t,i,o){const r=Pm(o),n=await $m(e,Pm(t),i),a=await window.crypto.subtle.decrypt({name:vm,iv:new Uint8Array(12)},n,r);return(new TextDecoder).decode(a)}async function Xm(e){const t=await jm(e);return Rm(new Uint8Array(t))}
|
|
105
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const ef="storage_not_supported",tf="stubbed_public_client_application_called",of="in_mem_redirect_unavailable",rf={[ef]:"Given storage configuration option was not supported.",[tf]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[of]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."};class nf extends ba{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,nf.prototype)}}function af(e){return new nf(e,rf[e])}
|
|
106
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */function sf(e){e.location.hash="","function"==typeof e.history.replaceState&&e.history.replaceState(null,"",`${e.location.origin}${e.location.pathname}${e.location.search}`)}function lf(){return window.parent!==window}function df(){return"undefined"!=typeof window&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function cf(){if("undefined"!=typeof window&&window.opener&&window.opener!==window&&"string"==typeof window.name&&0===window.name.indexOf(`${Eh}.`))throw Ah(kp)}function uf(){if("undefined"==typeof window)throw Ah(Yp)}function pf(e){if(!e)throw Ah(sh)}function hf(e){uf(),function(){if(pl.hashContainsKnownProperties(window.location.hash)&&lf())throw Ah(Dp)}(),cf(),pf(e)}function mf(e,t){if(hf(e),function(e){if(lf()&&!e)throw Ah(xp)}(t.system.allowRedirectInIframe),t.cache.cacheLocation===Bh&&!t.cache.storeAuthStateInCookie)throw af(of)}function ff(e){const t=document.createElement("link");t.rel="preconnect",t.href=new URL(e).origin,t.crossOrigin="anonymous",document.head.appendChild(t),window.setTimeout(()=>{try{document.head.removeChild(t)}catch{}},1e4)}
|
|
107
107
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
108
|
-
class
|
|
109
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
110
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */const
|
|
108
|
+
class gf{navigateInternal(e,t){return gf.defaultNavigateWindow(e,t)}navigateExternal(e,t){return gf.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise((e,i)=>{setTimeout(()=>{i(Ah(mh,"failed_to_redirect"))},t.timeout)})}}
|
|
109
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Tf{async sendGetRequestAsync(e,t){let i,o={},r=0;const n=Af(t);try{i=await fetch(e,{method:qh,headers:n})}catch(e){throw Du(Ah(window.navigator.onLine?Qp:Vp),void 0,void 0,e)}o=yf(i.headers);try{return r=i.status,{headers:o,body:await i.json(),status:r}}catch(e){throw Du(Ah($p),r,o,e)}}async sendPostRequestAsync(e,t){const i=t&&t.body||"",o=Af(t);let r,n=0,a={};try{r=await fetch(e,{method:jh,headers:o,body:i})}catch(e){throw Du(Ah(window.navigator.onLine?zp:Vp),void 0,void 0,e)}a=yf(r.headers);try{return n=r.status,{headers:a,body:await r.json(),status:n}}catch(e){throw Du(Ah($p),n,a,e)}}}function Af(e){try{const t=new Headers;if(!e||!e.headers)return t;const i=e.headers;return Object.entries(i).forEach(([e,i])=>{t.append(e,i)}),t}catch(e){throw Du(Ah(uh),void 0,void 0,e)}}function yf(e){try{const t={};return e.forEach((e,i)=>{t[i]=e}),t}catch(e){throw Ah(ph)}}
|
|
110
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const If=1e4;
|
|
111
111
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
112
|
-
const
|
|
113
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
114
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
112
|
+
const _f="4.21.1",Ef="msal",Of="browser",Cf=`${Ef}.${Of}.log.level`,Nf=`${Ef}.${Of}.log.pii`,Rf=`${Ef}.${Of}.platform.auth.dom`,bf=`${Ef}.version`,wf="account.keys",Sf="token.keys";function Pf(e=1){return e<1?`${Ef}.${wf}`:`${Ef}.${e}.${wf}`}function vf(e,t=1){return t<1?`${Ef}.${Sf}.${e}`:`${Ef}.${t}.${Sf}.${e}`}
|
|
113
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Lf{static loggerCallback(e,t){switch(e){case Os.Error:return void console.error(t);case Os.Info:return void console.info(t);case Os.Verbose:return void console.debug(t);case Os.Warning:return void console.warn(t);default:return void console.log(t)}}constructor(e){let t;this.browserEnvironment="undefined"!=typeof window,this.config=function({auth:e,cache:t,system:i,telemetry:o},r){const n={clientId:dn.EMPTY_STRING,authority:`${dn.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:dn.EMPTY_STRING,authorityMetadata:dn.EMPTY_STRING,redirectUri:"undefined"!=typeof window?df():"",postLogoutRedirectUri:dn.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Nl,OIDCOptions:{serverResponseType:qn,defaultScopes:[dn.OPENID_SCOPE,dn.PROFILE_SCOPE,dn.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:bs,tenant:dn.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1,encodeExtraQueryParams:!1},a={cacheLocation:Fh,cacheRetentionDays:5,temporaryCacheLocation:Fh,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!(!t||t.cacheLocation!==Uh),claimsBasedCachingEnabled:!1},s={loggerCallback:()=>{},logLevel:Os.Info,piiLoggingEnabled:!1},l={...{...uc,loggerOptions:s,networkClient:r?new Tf:ap,navigationClient:new gf,loadFrameTimeout:0,windowHashTimeout:i?.loadFrameTimeout||6e4,iframeHashTimeout:i?.loadFrameTimeout||If,navigateFrameWait:0,redirectNavigationTimeout:3e4,asyncPopups:!1,allowRedirectInIframe:!1,allowPlatformBroker:!1,nativeBrokerHandshakeTimeout:i?.nativeBrokerHandshakeTimeout||2e3,pollIntervalMilliseconds:Oh},...i,loggerOptions:i?.loggerOptions||s},d={application:{appName:dn.EMPTY_STRING,appVersion:dn.EMPTY_STRING},client:new cc};e?.protocolMode!==Rl&&e?.OIDCOptions&&new Cs(l.loggerOptions).warning(JSON.stringify(Xs(Ks)));if(e?.protocolMode&&e.protocolMode===Rl&&l?.allowPlatformBroker)throw Xs(Vs);return{auth:{...n,...e,OIDCOptions:{...n.OIDCOptions,...e?.OIDCOptions}},cache:{...a,...t},system:l,telemetry:{...d,...o}}}(e,this.browserEnvironment);try{t=window[Fh]}catch(e){}const i=t?.getItem(Cf),o=t?.getItem(Nf)?.toLowerCase(),r="true"===o||"false"!==o&&void 0,n={...this.config.system.loggerOptions},a=i&&Object.keys(Os).includes(i)?Os[i]:void 0;a&&(n.loggerCallback=Lf.loggerCallback,n.logLevel=a),void 0!==r&&(n.piiLoggingEnabled=r),this.logger=new Cs(n,"@azure/msal-browser",_f),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}
|
|
114
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Mf extends Lf{getModuleName(){return Mf.MODULE_NAME}getId(){return Mf.ID}async initialize(){return this.available="undefined"!=typeof window,this.available}}Mf.MODULE_NAME="",Mf.ID="StandardOperatingContext";
|
|
115
115
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
116
|
-
class
|
|
117
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
118
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
119
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
120
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
121
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */(i);n+=`expires=${e};`}(o||r===
|
|
122
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */function
|
|
123
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */const
|
|
124
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
125
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */const
|
|
126
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */function
|
|
127
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class _g extends El{constructor(e,t,i,o,r,n,a){super(e,i,o,r,a),this.cacheConfig=t,this.logger=o,this.internalStorage=new xf,this.browserStorage=Eg(e,t.cacheLocation,o,r),this.temporaryCacheStorage=Eg(e,t.temporaryCacheLocation,o,r),this.cookieStorage=new jf,this.eventHandler=n}async initialize(e){this.performanceClient.addFields({cacheLocation:this.cacheConfig.cacheLocation,cacheRetentionDays:this.cacheConfig.cacheRetentionDays},e),await this.browserStorage.initialize(e),await this.migrateExistingCache(e),this.trackVersionChanges(e)}async migrateExistingCache(e){const t=Gf(this.browserStorage,0),i=Wf(this.clientId,this.browserStorage,0);this.performanceClient.addFields({oldAccountCount:t.length,oldAccessCount:i.accessToken.length,oldIdCount:i.idToken.length,oldRefreshCount:i.refreshToken.length},e);const o=Gf(this.browserStorage,1),r=Wf(this.clientId,this.browserStorage,1);this.performanceClient.addFields({currAccountCount:o.length,currAccessCount:r.accessToken.length,currIdCount:r.idToken.length,currRefreshCount:r.refreshToken.length},e),await Promise.all([this.updateV0ToCurrent(1,t,o,e),this.updateV0ToCurrent(1,i.idToken,r.idToken,e),this.updateV0ToCurrent(1,i.accessToken,r.accessToken,e),this.updateV0ToCurrent(1,i.refreshToken,r.refreshToken,e)]),t.length>0?this.browserStorage.setItem(Pf(0),JSON.stringify(t)):this.browserStorage.removeItem(Pf(0)),o.length>0?this.browserStorage.setItem(Pf(1),JSON.stringify(o)):this.browserStorage.removeItem(Pf(1)),this.setTokenKeys(i,e,0),this.setTokenKeys(r,e,1)}async updateV0ToCurrent(e,t,i,o){const r=[];for(const n of[...t]){const a=this.browserStorage.getItem(n),s=this.validateAndParseJson(a||"");if(!s){Ig(t,n);continue}s.lastUpdatedAt||(s.lastUpdatedAt=Date.now().toString(),this.setItem(n,JSON.stringify(s),o));const l=Hf(s)?await this.browserStorage.decryptData(n,s,o):s;let d;if(l&&(_u(l)||Eu(l))&&(d=l.expiresOn),!l||gu(s.lastUpdatedAt,this.cacheConfig.cacheRetentionDays)||d&&fu(d,300))this.browserStorage.removeItem(n),Ig(t,n),this.performanceClient.incrementFields({expiredCacheRemovedCount:1},o);else if(this.cacheConfig.cacheLocation!==kh||Hf(s)){const t=`${_f}.${e}-${n}`,a=this.browserStorage.getItem(t);if(!a){r.push(this.setUserData(t,JSON.stringify(l),o,s.lastUpdatedAt).then(()=>{i.push(t),this.performanceClient.incrementFields({upgradedCacheCount:1},o)}));continue}{const e=this.validateAndParseJson(a);if(Number(s.lastUpdatedAt)>Number(e.lastUpdatedAt)){r.push(this.setUserData(t,JSON.stringify(l),o,s.lastUpdatedAt).then(()=>{this.performanceClient.incrementFields({updatedCacheFromV0Count:1},o)}));continue}}}}return Promise.all(r)}trackVersionChanges(e){const t=this.browserStorage.getItem(Rf);t&&(this.logger.info(`MSAL.js was last initialized by version: ${t}`),this.performanceClient.addFields({previousLibraryVersion:t},e)),t!==If&&this.setItem(Rf,If,e)}validateAndParseJson(e){if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch(e){return null}}setItem(e,t,i){let o=0,r=[];for(let n=0;n<=20;n++)try{this.browserStorage.setItem(e,t),n>0&&(n<=o?this.removeAccessTokenKeys(r.slice(0,n),i,0):(this.removeAccessTokenKeys(r.slice(0,o),i,0),this.removeAccessTokenKeys(r.slice(o,n),i)));break}catch(a){const s=_l(a);if(!(s.errorCode===Tl&&n<20))throw s;if(!r.length){const i=e===Sf(this.clientId,0)?JSON.parse(t).accessToken:this.getTokenKeys(0).accessToken,n=e===Sf(this.clientId)?JSON.parse(t).accessToken:this.getTokenKeys().accessToken;r=[...i,...n],o=i.length}if(r.length<=n)throw s;this.removeAccessToken(r[n],i,!1)}}async setUserData(e,t,i,o){let r=0,n=[];for(let a=0;a<=20;a++)try{await cu(this.browserStorage.setUserData.bind(this.browserStorage),Kd,this.logger,this.performanceClient)(e,t,i,o),a>0&&(a<=r?this.removeAccessTokenKeys(n.slice(0,a),i,0):(this.removeAccessTokenKeys(n.slice(0,r),i,0),this.removeAccessTokenKeys(n.slice(r,a),i)));break}catch(e){const t=_l(e);if(!(t.errorCode===Tl&&a<20))throw t;if(!n.length){const e=this.getTokenKeys(0).accessToken,t=this.getTokenKeys().accessToken;n=[...e,...t],r=e.length}if(n.length<=a)throw t;this.removeAccessToken(n[a],i,!1)}}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const i=this.browserStorage.getUserData(e);if(!i)return this.removeAccountKeyFromMap(e,t),null;const o=this.validateAndParseJson(i);return o&&Uu.isAccountEntity(o)?El.toObject(new Uu,o):null}async setAccount(e,t){this.logger.trace("BrowserCacheManager.setAccount called");const i=this.generateAccountKey(e.getAccountInfo()),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.addAccountKeyToMap(i,t);this.cacheConfig.cacheLocation===kh&&r&&this.eventHandler.emitEvent($f,void 0,e.getAccountInfo())}getAccountKeys(){return Gf(this.browserStorage)}addAccountKeyToMap(e,t){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const i=this.getAccountKeys();return-1===i.indexOf(e)?(i.push(e),this.setItem(Pf(),JSON.stringify(i),t),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added"),!0):(this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map"),!1)}removeAccountKeyFromMap(e,t){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const i=this.getAccountKeys(),o=i.indexOf(e);if(o>-1){if(i.splice(o,1),0===i.length)return void this.removeItem(Pf());this.setItem(Pf(),JSON.stringify(i),t),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")}else this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}removeAccount(e,t){const i=this.getActiveAccount(t);i?.homeAccountId===e.homeAccountId&&i?.environment===e.environment&&this.setActiveAccount(null,t),super.removeAccount(e,t),this.removeAccountKeyFromMap(this.generateAccountKey(e),t),this.browserStorage.getKeys().forEach(t=>{t.includes(e.homeAccountId)&&t.includes(e.environment)&&this.browserStorage.removeItem(t)}),this.cacheConfig.cacheLocation===kh&&this.eventHandler.emitEvent(Zf,void 0,e)}removeIdToken(e,t){super.removeIdToken(e,t);const i=this.getTokenKeys(),o=i.idToken.indexOf(e);o>-1&&(this.logger.info("idToken removed from tokenKeys map"),i.idToken.splice(o,1),this.setTokenKeys(i,t))}removeAccessToken(e,t,i=!0){super.removeAccessToken(e,t),i&&this.removeAccessTokenKeys([e],t)}removeAccessTokenKeys(e,t,i=1){this.logger.trace("removeAccessTokenKey called");const o=this.getTokenKeys(i);let r=0;if(e.forEach(e=>{const t=o.accessToken.indexOf(e);t>-1&&(o.accessToken.splice(t,1),r++)}),r>0)return this.logger.info(`removed ${r} accessToken keys from tokenKeys map`),void this.setTokenKeys(o,t,i)}removeRefreshToken(e,t){super.removeRefreshToken(e,t);const i=this.getTokenKeys(),o=i.refreshToken.indexOf(e);o>-1&&(this.logger.info("refreshToken removed from tokenKeys map"),i.refreshToken.splice(o,1),this.setTokenKeys(i,t))}getTokenKeys(e=1){return Wf(this.clientId,this.browserStorage,e)}setTokenKeys(e,t,i=1){0!==e.idToken.length||0!==e.accessToken.length||0!==e.refreshToken.length?this.setItem(Sf(this.clientId,i),JSON.stringify(e),t):this.removeItem(Sf(this.clientId,i))}getIdTokenCredential(e,t){const i=this.browserStorage.getUserData(e);if(!i)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeIdToken(e,t),null;const o=this.validateAndParseJson(i);return o&&((r=o)&&Iu(r)&&r.hasOwnProperty("realm")&&r.credentialType===zn.ID_TOKEN)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null);var r}async setIdTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const i=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.getTokenKeys();-1===r.idToken.indexOf(i)&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(i),this.setTokenKeys(r,t))}getAccessTokenCredential(e,t){const i=this.browserStorage.getUserData(e);if(!i)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeAccessTokenKeys([e],t),null;const o=this.validateAndParseJson(i);return o&&_u(o)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null)}async setAccessTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const i=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.getTokenKeys(),n=r.accessToken.indexOf(i);-1!==n&&r.accessToken.splice(n,1),this.logger.trace(`access token ${-1===n?"added to":"updated in"} map`),r.accessToken.push(i),this.setTokenKeys(r,t)}getRefreshTokenCredential(e,t){const i=this.browserStorage.getUserData(e);if(!i)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeRefreshToken(e,t),null;const o=this.validateAndParseJson(i);return o&&Eu(o)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null)}async setRefreshTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const i=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.getTokenKeys();-1===r.refreshToken.indexOf(i)&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(i),this.setTokenKeys(r,t))}getAppMetadata(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&(o=e,(r=i)&&0===o.indexOf(Qn)&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("environment"))?(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),i):(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null);var o,r}setAppMetadata(e,t){this.logger.trace("BrowserCacheManager.setAppMetadata called");const i=function({environment:e,clientId:t}){return[Qn,e,t].join(Kn).toLowerCase()}(e);this.setItem(i,JSON.stringify(e),t)}getServerTelemetry(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){const i=0===e.indexOf(oa.CACHE_KEY);let o=!0;return t&&(o=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),i&&o}(e,i)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),i):(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null)}setServerTelemetry(e,t,i){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t),i)}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){return!!t&&0===e.indexOf(Zn)&&t.hasOwnProperty("aliases")&&t.hasOwnProperty("preferred_cache")&&t.hasOwnProperty("preferred_network")&&t.hasOwnProperty("canonical_authority")&&t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("aliasesFromNetwork")&&t.hasOwnProperty("endpointsFromNetwork")&&t.hasOwnProperty("expiresAt")&&t.hasOwnProperty("jwks_uri")}(e,i)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),i):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(e=>this.isAuthorityMetadata(e))}setWrapperMetadata(e,t){this.internalStorage.setItem(Qh,e),this.internalStorage.setItem($h,t)}getWrapperMetadata(){return[this.internalStorage.getItem(Qh)||ln.EMPTY_STRING,this.internalStorage.getItem($h)||ln.EMPTY_STRING]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(e){const t=this.generateCacheKey(Nn),i=this.browserStorage.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters found"),null;const o=this.validateAndParseJson(i);return o?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:o.homeAccountId,localAccountId:o.localAccountId,tenantId:o.tenantId},e)):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e,t){const i=this.generateCacheKey(Nn);if(e){this.logger.verbose("setActiveAccount: Active account set");const o={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId,lastUpdatedAt:pu().toString()};this.setItem(i,JSON.stringify(o),t)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(i);this.eventHandler.emitEvent(Jf)}getThrottlingCache(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){let i=!1;e&&(i=0===e.indexOf(sa));let o=!0;return t&&(o=t.hasOwnProperty("throttleTime")),i&&o}(e,i)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),i):(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null)}setThrottlingCache(e,t,i){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t),i)}getTemporaryCache(e,t){const i=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const e=this.cookieStorage.getItem(i);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),e}const o=this.temporaryCacheStorage.getItem(i);if(!o){if(this.cacheConfig.cacheLocation===kh){const e=this.browserStorage.getItem(i);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),e}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),o}setTemporaryCache(e,t,i){const o=i?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(o,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(o,t,void 0,this.cacheConfig.secureCookies))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(e))}getKeys(){return this.browserStorage.getKeys()}clear(e){this.removeAllAccounts(e),this.removeAppMetadata(e),this.temporaryCacheStorage.getKeys().forEach(e=>{-1===e.indexOf(_f)&&-1===e.indexOf(this.clientId)||this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{-1===e.indexOf(_f)&&-1===e.indexOf(this.clientId)||this.browserStorage.removeItem(e)}),this.internalStorage.clear()}clearTokensAndKeysWithClaims(e){this.performanceClient.addQueueMeasurement(Wd,e);const t=this.getTokenKeys();let i=0;t.accessToken.forEach(t=>{const o=this.getAccessTokenCredential(t,e);o?.requestedClaimsHash&&t.includes(o.requestedClaimsHash.toLowerCase())&&(this.removeAccessToken(t,e),i++)}),i>0&&this.logger.warning(`${i} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return Xs.startsWith(e,_f)?e:`${_f}.${this.clientId}.${e}`}generateCredentialKey(e){const t=e.credentialType===zn.REFRESH_TOKEN&&e.familyId||e.clientId,i=e.tokenType&&e.tokenType.toLowerCase()!==ra.BEARER.toLowerCase()?e.tokenType.toLowerCase():"";return[`${_f}.1`,e.homeAccountId,e.environment,e.credentialType,t,e.realm||"",e.target||"",e.requestedClaimsHash||"",i].join("-").toLowerCase()}generateAccountKey(e){const t=e.homeAccountId.split(".")[1];return[`${_f}.1`,e.homeAccountId,e.environment,t||e.tenantId||""].join("-").toLowerCase()}resetRequestCache(){this.logger.trace("BrowserCacheManager.resetRequestCache called"),this.removeTemporaryItem(this.generateCacheKey(Yh)),this.removeTemporaryItem(this.generateCacheKey(Kh)),this.removeTemporaryItem(this.generateCacheKey(Wh)),this.removeTemporaryItem(this.generateCacheKey(Hh)),this.removeTemporaryItem(this.generateCacheKey(zh)),this.setInteractionInProgress(!1)}cacheAuthorizeRequest(e,t){this.logger.trace("BrowserCacheManager.cacheAuthorizeRequest called");const i=Rm(JSON.stringify(e));if(this.setTemporaryCache(Yh,i,!0),t){const e=Rm(t);this.setTemporaryCache(Kh,e,!0)}}getCachedRequest(){this.logger.trace("BrowserCacheManager.getCachedRequest called");const e=this.getTemporaryCache(Yh,!0);if(!e)throw Th(qp);const t=this.getTemporaryCache(Kh,!0);let i,o="";try{i=JSON.parse(wm(e)),t&&(o=wm(t))}catch(t){throw this.logger.errorPii(`Attempted to parse: ${e}`),this.logger.error(`Parsing cached token request threw with error: ${t}`),Th(jp)}return[i,o]}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(zh,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;const t=this.validateAndParseJson(e);return t||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress()?.clientId;return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${_f}.${Vh}`,t=this.getTemporaryCache(e,!1);try{return t?JSON.parse(t):null}catch(t){return this.logger.error("Cannot parse interaction status. Removing temporary cache items and clearing url hash. Retrying interaction should fix the error"),this.removeTemporaryItem(e),this.resetRequestCache(),af(window),null}}setInteractionInProgress(e,t=jh){const i=`${_f}.${Vh}`;if(e){if(this.getInteractionInProgress())throw Th(bp);this.setTemporaryCache(i,JSON.stringify({clientId:this.clientId,type:t}),!1)}else e||this.getInteractionInProgress()?.clientId!==this.clientId||this.removeTemporaryItem(i)}async hydrateCache(e,t){const i=Tu(e.account?.homeAccountId,e.account?.environment,e.idToken,this.clientId,e.tenantId);let o;t.claims&&(o=await this.cryptoImpl.hashString(t.claims));const r={idToken:i,accessToken:Au(e.account?.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?hu(e.expiresOn):0,e.extExpiresOn?hu(e.extExpiresOn):0,wm,void 0,e.tokenType,void 0,t.sshKid,t.claims,o)};return this.saveCacheRecord(r,e.correlationId)}async saveCacheRecord(e,t,i){try{await super.saveCacheRecord(e,t,i)}catch(e){if(e instanceof Il&&this.performanceClient&&t)try{const e=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:e.refreshToken.length,cacheIdCount:e.idToken.length,cacheAtCount:e.accessToken.length},t)}catch(e){}throw e}}}function Eg(e,t,i,o){try{switch(t){case kh:return new Kf(e,i,o);case Uh:return new Vf}}catch(e){i.error(e)}return new xf}class Og{constructor(e){this.eventCallbacks=new Map,this.logger=e||new Os({}),"undefined"!=typeof BroadcastChannel&&(this.broadcastChannel=new BroadcastChannel("msal.broadcast.event")),this.invokeCrossTabCallbacks=this.invokeCrossTabCallbacks.bind(this)}addEventCallback(e,t,i){if("undefined"!=typeof window){const o=i||Wm();return this.eventCallbacks.has(o)?(this.logger.error(`Event callback with id: ${o} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(o,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${o}`),o)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,i,o){const r={eventType:e,interactionType:t||null,payload:i||null,error:o||null,timestamp:Date.now()};switch(e){case $f:case Zf:case Jf:this.broadcastChannel?.postMessage(r);break;default:this.invokeCallbacks(r)}}invokeCallbacks(e){this.eventCallbacks.forEach(([t,i],o)=>{(0===i.length||i.includes(e.eventType))&&(this.logger.verbose(`Emitting event to callback ${o}: ${e.eventType}`),t.apply(null,[e]))})}invokeCrossTabCallbacks(e){const t=e.data;this.invokeCallbacks(t)}subscribeCrossTab(){this.broadcastChannel?.addEventListener("message",this.invokeCrossTabCallbacks)}unsubscribeCrossTab(){this.broadcastChannel?.removeEventListener("message",this.invokeCrossTabCallbacks)}}
|
|
128
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
129
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function
|
|
130
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
116
|
+
class xf{constructor(){this.dbName=gm,this.version=1,this.tableName=Tm,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const i=window.indexedDB.open(this.dbName,this.version);i.addEventListener("upgradeneeded",e=>{e.target.result.createObjectStore(this.tableName)}),i.addEventListener("success",t=>{const i=t;this.db=i.target.result,this.dbOpen=!0,e()}),i.addEventListener("error",()=>t(Ah(ih)))})}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise((t,i)=>{if(!this.db)return i(Ah(Kp));const o=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);o.addEventListener("success",e=>{const i=e;this.closeConnection(),t(i.target.result)}),o.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((i,o)=>{if(!this.db)return o(Ah(Kp));const r=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);r.addEventListener("success",()=>{this.closeConnection(),i()}),r.addEventListener("error",e=>{this.closeConnection(),o(e)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,i)=>{if(!this.db)return i(Ah(Kp));const o=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);o.addEventListener("success",()=>{this.closeConnection(),t()}),o.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t(Ah(Kp));const i=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();i.addEventListener("success",t=>{const i=t;this.closeConnection(),e(i.target.result)}),i.addEventListener("error",e=>{this.closeConnection(),t(e)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,i)=>{if(!this.db)return i(Ah(Kp));const o=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);o.addEventListener("success",e=>{const i=e;this.closeConnection(),t(1===i.target.result)}),o.addEventListener("error",e=>{this.closeConnection(),i(e)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const i=window.indexedDB.deleteDatabase(gm),o=setTimeout(()=>t(!1),200);i.addEventListener("success",()=>(clearTimeout(o),e(!0))),i.addEventListener("blocked",()=>(clearTimeout(o),e(!0))),i.addEventListener("error",()=>(clearTimeout(o),t(!1)))})}}
|
|
117
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Df{constructor(){this.cache=new Map}async initialize(){}getItem(e){return this.cache.get(e)||null}getUserData(e){return this.getItem(e)}setItem(e,t){this.cache.set(e,t)}async setUserData(e,t){this.setItem(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach((t,i)=>{e.push(i)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}decryptData(){return Promise.resolve(null)}}
|
|
118
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class kf{constructor(e){this.inMemoryCache=new Df,this.indexedDBCache=new xf,this.logger=e}handleDatabaseAccessError(e){if(!(e instanceof Th&&e.errorCode===ih))throw e;this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.")}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(e)}catch(e){this.handleDatabaseAccessError(e)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(e){this.handleDatabaseAccessError(e)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(e){this.handleDatabaseAccessError(e)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(0===e.length)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(e){this.handleDatabaseAccessError(e)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(e)}catch(e){this.handleDatabaseAccessError(e)}return t}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose("Persistent keystore deleted"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}}
|
|
119
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Uf{constructor(e,t,i){this.logger=e,function(e){if(!window)throw Ah(Yp);if(!window.crypto)throw Ah(_p);if(!e&&!window.crypto.subtle)throw Ah(_p,"crypto_subtle_undefined")}(i??!1),this.cache=new kf(this.logger),this.performanceClient=t}createNewGuid(){return Hm()}base64Encode(e){return bm(e)}base64Decode(e){return Sm(e)}base64UrlEncode(e){return Nm(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){const t=this.performanceClient?.startMeasurement(Dl,e.correlationId),i=await async function(e,t){return window.crypto.subtle.generateKey(qm,e,t)}(Uf.EXTRACTABLE,Uf.POP_KEY_USAGES),o=await Ym(i.publicKey),r=Ff({e:o.e,kty:o.kty,n:o.n}),n=await this.hashString(r),a=await Ym(i.privateKey),s=await async function(e,t,i){return window.crypto.subtle.importKey("jwk",e,qm,t,i)}(a,!1,["sign"]);return await this.cache.setItem(n,{privateKey:s,publicKey:i.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),t&&t.end({success:!0}),n}async removeTokenBindingKey(e){await this.cache.removeItem(e);if(await this.cache.containsKey(e))throw _s(us)}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}}async signJwt(e,t,i,o){const r=this.performanceClient?.startMeasurement(kl,o),n=await this.cache.getItem(t);if(!n)throw Ah(Jp);const a=await Ym(n.publicKey),s=Ff(a),l=Nm(JSON.stringify({kid:t})),d=Nm(Tp.getShrHeaderString({...i?.header,alg:a.alg,kid:l}));e.cnf={jwk:JSON.parse(s)};const c=`${d}.${Nm(JSON.stringify(e))}`,u=(new TextEncoder).encode(c),p=await async function(e,t){return window.crypto.subtle.sign(qm,e,t)}(n.privateKey,u),h=`${c}.${Rm(new Uint8Array(p))}`;return r&&r.end({success:!0}),h}async hashString(e){return Xm(e)}}function Ff(e){return JSON.stringify(e,Object.keys(e).sort())}
|
|
120
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */Uf.POP_KEY_USAGES=["sign","verify"],Uf.EXTRACTABLE=!0;const Bf=864e5,qf="Lax",jf="None";class Gf{initialize(){return Promise.resolve()}getItem(e){const t=`${encodeURIComponent(e)}`,i=document.cookie.split(";");for(let e=0;e<i.length;e++){const o=i[e],[r,...n]=decodeURIComponent(o).trim().split("="),a=n.join("=");if(r===t)return a}return""}getUserData(){throw _s(Ts)}setItem(e,t,i,o=!0,r=qf){let n=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=${r};`;if(i){const e=function(e){const t=new Date,i=new Date(t.getTime()+e*Bf);return i.toUTCString()}
|
|
121
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */(i);n+=`expires=${e};`}(o||r===jf)&&(n+="Secure;"),document.cookie=n}async setUserData(){return Promise.reject(_s(Ts))}removeItem(e){this.setItem(e,"",-1)}getKeys(){const e=document.cookie.split(";"),t=[];return e.forEach(e=>{const i=decodeURIComponent(e).trim().split("=");t.push(i[0])}),t}containsKey(e){return this.getKeys().includes(e)}decryptData(){return Promise.resolve(null)}}function Wf(e,t){const i=e.getItem(Pf(t));return i?JSON.parse(i):[]}function Hf(e,t,i){const o=t.getItem(vf(e,i));if(o){const e=JSON.parse(o);if(e&&e.hasOwnProperty("idToken")&&e.hasOwnProperty("accessToken")&&e.hasOwnProperty("refreshToken"))return e}return{idToken:[],accessToken:[],refreshToken:[]}}
|
|
122
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */function Yf(e){return e.hasOwnProperty("id")&&e.hasOwnProperty("nonce")&&e.hasOwnProperty("data")}
|
|
123
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const Kf="msal.cache.encryption";class Vf{constructor(e,t,i){if(!window.localStorage)throw af(ef);this.memoryStorage=new Df,this.initialized=!1,this.clientId=e,this.logger=t,this.performanceClient=i,this.broadcast=new BroadcastChannel("msal.broadcast.cache")}async initialize(e){const t=new Gf,i=t.getItem(Kf);let o={key:"",id:""};if(i)try{o=JSON.parse(i)}catch(e){}if(o.key&&o.id){const t=cu(Pm,ic,this.logger,this.performanceClient,e)(o.key);this.encryptionCookie={id:o.id,key:await uu(Qm,ec,this.logger,this.performanceClient,e)(t)}}else{const i=Hm(),o=await uu(zm,tc,this.logger,this.performanceClient,e)(),r=cu(Rm,oc,this.logger,this.performanceClient,e)(new Uint8Array(o));this.encryptionCookie={id:i,key:await uu(Qm,ec,this.logger,this.performanceClient,e)(o)};const n={id:i,key:r};t.setItem(Kf,JSON.stringify(n),0,!0,jf)}await uu(this.importExistingCache.bind(this),Kd,this.logger,this.performanceClient,e)(e),this.broadcast.addEventListener("message",this.updateCache.bind(this)),this.initialized=!0}getItem(e){return window.localStorage.getItem(e)}getUserData(e){if(!this.initialized)throw Ah(sh);return this.memoryStorage.getItem(e)}async decryptData(e,t,i){if(!this.initialized||!this.encryptionCookie)throw Ah(sh);if(t.id!==this.encryptionCookie.id)return this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},i),null;const o=await uu(Jm,nc,this.logger,this.performanceClient,i)(this.encryptionCookie.key,t.nonce,this.getContext(e),t.data);if(!o)return null;try{return JSON.parse(o)}catch(e){return this.performanceClient.incrementFields({encryptedCacheCorruptionCount:1},i),null}}setItem(e,t){window.localStorage.setItem(e,t)}async setUserData(e,t,i,o){if(!this.initialized||!this.encryptionCookie)throw Ah(sh);const{data:r,nonce:n}=await uu(Zm,rc,this.logger,this.performanceClient,i)(this.encryptionCookie.key,t,this.getContext(e)),a={id:this.encryptionCookie.id,nonce:n,data:r,lastUpdatedAt:o};this.memoryStorage.setItem(e,t),this.setItem(e,JSON.stringify(a)),this.broadcast.postMessage({key:e,value:t,context:this.getContext(e)})}removeItem(e){this.memoryStorage.containsKey(e)&&(this.memoryStorage.removeItem(e),this.broadcast.postMessage({key:e,value:null,context:this.getContext(e)})),window.localStorage.removeItem(e)}getKeys(){return Object.keys(window.localStorage)}containsKey(e){return window.localStorage.hasOwnProperty(e)}clear(){this.memoryStorage.clear();Wf(this).forEach(e=>this.removeItem(e));const e=Hf(this.clientId,this);e.idToken.forEach(e=>this.removeItem(e)),e.accessToken.forEach(e=>this.removeItem(e)),e.refreshToken.forEach(e=>this.removeItem(e)),this.getKeys().forEach(e=>{(e.startsWith(Ef)||-1!==e.indexOf(this.clientId))&&this.removeItem(e)})}async importExistingCache(e){if(!this.encryptionCookie)return;let t=Wf(this);t=await this.importArray(t,e),t.length?this.setItem(Pf(),JSON.stringify(t)):this.removeItem(Pf());const i=Hf(this.clientId,this);i.idToken=await this.importArray(i.idToken,e),i.accessToken=await this.importArray(i.accessToken,e),i.refreshToken=await this.importArray(i.refreshToken,e),i.idToken.length||i.accessToken.length||i.refreshToken.length?this.setItem(vf(this.clientId),JSON.stringify(i)):this.removeItem(vf(this.clientId))}async getItemFromEncryptedCache(e,t){if(!this.encryptionCookie)return null;const i=this.getItem(e);if(!i)return null;let o;try{o=JSON.parse(i)}catch(e){return null}return Yf(o)?o.id!==this.encryptionCookie.id?(this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},t),null):uu(Jm,nc,this.logger,this.performanceClient,t)(this.encryptionCookie.key,o.nonce,this.getContext(e),o.data):(this.performanceClient.incrementFields({unencryptedCacheCount:1},t),o)}async importArray(e,t){const i=[],o=[];return e.forEach(e=>{const r=this.getItemFromEncryptedCache(e,t).then(t=>{t?(this.memoryStorage.setItem(e,t),i.push(e)):this.removeItem(e)});o.push(r)}),await Promise.all(o),i}getContext(e){let t="";return e.includes(this.clientId)&&(t=this.clientId),t}updateCache(e){this.logger.trace("Updating internal cache from broadcast event");const t=this.performanceClient.startMeasurement(zd);t.add({isBackground:!0});const{key:i,value:o,context:r}=e.data;return i?r&&r!==this.clientId?(this.logger.trace(`Ignoring broadcast event from clientId: ${r}`),void t.end({success:!1,errorCode:"contextMismatch"})):(o?(this.memoryStorage.setItem(i,o),this.logger.verbose("Updated item in internal cache")):(this.memoryStorage.removeItem(i),this.logger.verbose("Removed item from internal cache")),void t.end({success:!0})):(this.logger.error("Broadcast event missing key"),void t.end({success:!1,errorCode:"noKey"}))}}
|
|
124
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class zf{constructor(){if(!window.sessionStorage)throw af(ef)}async initialize(){}getItem(e){return window.sessionStorage.getItem(e)}getUserData(e){return this.getItem(e)}setItem(e,t){window.sessionStorage.setItem(e,t)}async setUserData(e,t){this.setItem(e,t)}removeItem(e){window.sessionStorage.removeItem(e)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(e){return window.sessionStorage.hasOwnProperty(e)}decryptData(){return Promise.resolve(null)}}
|
|
125
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const Qf="msal:initializeStart",$f="msal:initializeEnd",Zf="msal:accountAdded",Jf="msal:accountRemoved",Xf="msal:activeAccountChanged",eg="msal:loginStart",tg="msal:loginSuccess",ig="msal:loginFailure",og="msal:acquireTokenStart",rg="msal:acquireTokenSuccess",ng="msal:acquireTokenFailure",ag="msal:acquireTokenFromNetworkStart",sg="msal:ssoSilentStart",lg="msal:ssoSilentSuccess",dg="msal:ssoSilentFailure",cg="msal:acquireTokenByCodeStart",ug="msal:acquireTokenByCodeSuccess",pg="msal:acquireTokenByCodeFailure",hg="msal:handleRedirectStart",mg="msal:handleRedirectEnd",fg="msal:popupOpened",gg="msal:logoutStart",Tg="msal:logoutSuccess",Ag="msal:logoutFailure",yg="msal:logoutEnd",Ig="msal:restoreFromBFCache";
|
|
126
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */function _g(e,t){const i=e.indexOf(t);i>-1&&e.splice(i,1)}
|
|
127
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Eg extends Ol{constructor(e,t,i,o,r,n,a){super(e,i,o,r,a),this.cacheConfig=t,this.logger=o,this.internalStorage=new Df,this.browserStorage=Og(e,t.cacheLocation,o,r),this.temporaryCacheStorage=Og(e,t.temporaryCacheLocation,o,r),this.cookieStorage=new Gf,this.eventHandler=n}async initialize(e){this.performanceClient.addFields({cacheLocation:this.cacheConfig.cacheLocation,cacheRetentionDays:this.cacheConfig.cacheRetentionDays},e),await this.browserStorage.initialize(e),await this.migrateExistingCache(e),this.trackVersionChanges(e)}async migrateExistingCache(e){const t=Wf(this.browserStorage,0),i=Hf(this.clientId,this.browserStorage,0);this.performanceClient.addFields({oldAccountCount:t.length,oldAccessCount:i.accessToken.length,oldIdCount:i.idToken.length,oldRefreshCount:i.refreshToken.length},e);const o=Wf(this.browserStorage,1),r=Hf(this.clientId,this.browserStorage,1);this.performanceClient.addFields({currAccountCount:o.length,currAccessCount:r.accessToken.length,currIdCount:r.idToken.length,currRefreshCount:r.refreshToken.length},e),await Promise.all([this.updateV0ToCurrent(1,t,o,e),this.updateV0ToCurrent(1,i.idToken,r.idToken,e),this.updateV0ToCurrent(1,i.accessToken,r.accessToken,e),this.updateV0ToCurrent(1,i.refreshToken,r.refreshToken,e)]),t.length>0?this.browserStorage.setItem(Pf(0),JSON.stringify(t)):this.browserStorage.removeItem(Pf(0)),o.length>0?this.browserStorage.setItem(Pf(1),JSON.stringify(o)):this.browserStorage.removeItem(Pf(1)),this.setTokenKeys(i,e,0),this.setTokenKeys(r,e,1)}async updateV0ToCurrent(e,t,i,o){const r=[];for(const n of[...t]){const a=this.browserStorage.getItem(n),s=this.validateAndParseJson(a||"");if(!s){_g(t,n);continue}s.lastUpdatedAt||(s.lastUpdatedAt=Date.now().toString(),this.setItem(n,JSON.stringify(s),o));const l=Yf(s)?await this.browserStorage.decryptData(n,s,o):s;let d;if(l&&(Eu(l)||Ou(l))&&(d=l.expiresOn),!l||Tu(s.lastUpdatedAt,this.cacheConfig.cacheRetentionDays)||d&&gu(d,300))this.browserStorage.removeItem(n),_g(t,n),this.performanceClient.incrementFields({expiredCacheRemovedCount:1},o);else if(this.cacheConfig.cacheLocation!==Uh||Yf(s)){const t=`${Ef}.${e}-${n}`,a=this.browserStorage.getItem(t);if(!a){r.push(this.setUserData(t,JSON.stringify(l),o,s.lastUpdatedAt).then(()=>{i.push(t),this.performanceClient.incrementFields({upgradedCacheCount:1},o)}));continue}{const e=this.validateAndParseJson(a);if(Number(s.lastUpdatedAt)>Number(e.lastUpdatedAt)){r.push(this.setUserData(t,JSON.stringify(l),o,s.lastUpdatedAt).then(()=>{this.performanceClient.incrementFields({updatedCacheFromV0Count:1},o)}));continue}}}}return Promise.all(r)}trackVersionChanges(e){const t=this.browserStorage.getItem(bf);t&&(this.logger.info(`MSAL.js was last initialized by version: ${t}`),this.performanceClient.addFields({previousLibraryVersion:t},e)),t!==_f&&this.setItem(bf,_f,e)}validateAndParseJson(e){if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch(e){return null}}setItem(e,t,i){let o=0,r=[];for(let n=0;n<=20;n++)try{this.browserStorage.setItem(e,t),n>0&&(n<=o?this.removeAccessTokenKeys(r.slice(0,n),i,0):(this.removeAccessTokenKeys(r.slice(0,o),i,0),this.removeAccessTokenKeys(r.slice(o,n),i)));break}catch(a){const s=El(a);if(!(s.errorCode===Al&&n<20))throw s;if(!r.length){const i=e===vf(this.clientId,0)?JSON.parse(t).accessToken:this.getTokenKeys(0).accessToken,n=e===vf(this.clientId)?JSON.parse(t).accessToken:this.getTokenKeys().accessToken;r=[...i,...n],o=i.length}if(r.length<=n)throw s;this.removeAccessToken(r[n],i,!1)}}async setUserData(e,t,i,o){let r=0,n=[];for(let a=0;a<=20;a++)try{await uu(this.browserStorage.setUserData.bind(this.browserStorage),Vd,this.logger,this.performanceClient)(e,t,i,o),a>0&&(a<=r?this.removeAccessTokenKeys(n.slice(0,a),i,0):(this.removeAccessTokenKeys(n.slice(0,r),i,0),this.removeAccessTokenKeys(n.slice(r,a),i)));break}catch(e){const t=El(e);if(!(t.errorCode===Al&&a<20))throw t;if(!n.length){const e=this.getTokenKeys(0).accessToken,t=this.getTokenKeys().accessToken;n=[...e,...t],r=e.length}if(n.length<=a)throw t;this.removeAccessToken(n[a],i,!1)}}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const i=this.browserStorage.getUserData(e);if(!i)return this.removeAccountKeyFromMap(e,t),null;const o=this.validateAndParseJson(i);return o&&Fu.isAccountEntity(o)?Ol.toObject(new Fu,o):null}async setAccount(e,t){this.logger.trace("BrowserCacheManager.setAccount called");const i=this.generateAccountKey(e.getAccountInfo()),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.addAccountKeyToMap(i,t);this.cacheConfig.cacheLocation===Uh&&r&&this.eventHandler.emitEvent(Zf,void 0,e.getAccountInfo())}getAccountKeys(){return Wf(this.browserStorage)}addAccountKeyToMap(e,t){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const i=this.getAccountKeys();return-1===i.indexOf(e)?(i.push(e),this.setItem(Pf(),JSON.stringify(i),t),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added"),!0):(this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map"),!1)}removeAccountKeyFromMap(e,t){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const i=this.getAccountKeys(),o=i.indexOf(e);if(o>-1){if(i.splice(o,1),0===i.length)return void this.removeItem(Pf());this.setItem(Pf(),JSON.stringify(i),t),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")}else this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}removeAccount(e,t){const i=this.getActiveAccount(t);i?.homeAccountId===e.homeAccountId&&i?.environment===e.environment&&this.setActiveAccount(null,t),super.removeAccount(e,t),this.removeAccountKeyFromMap(this.generateAccountKey(e),t),this.browserStorage.getKeys().forEach(t=>{t.includes(e.homeAccountId)&&t.includes(e.environment)&&this.browserStorage.removeItem(t)}),this.cacheConfig.cacheLocation===Uh&&this.eventHandler.emitEvent(Jf,void 0,e)}removeIdToken(e,t){super.removeIdToken(e,t);const i=this.getTokenKeys(),o=i.idToken.indexOf(e);o>-1&&(this.logger.info("idToken removed from tokenKeys map"),i.idToken.splice(o,1),this.setTokenKeys(i,t))}removeAccessToken(e,t,i=!0){super.removeAccessToken(e,t),i&&this.removeAccessTokenKeys([e],t)}removeAccessTokenKeys(e,t,i=1){this.logger.trace("removeAccessTokenKey called");const o=this.getTokenKeys(i);let r=0;if(e.forEach(e=>{const t=o.accessToken.indexOf(e);t>-1&&(o.accessToken.splice(t,1),r++)}),r>0)return this.logger.info(`removed ${r} accessToken keys from tokenKeys map`),void this.setTokenKeys(o,t,i)}removeRefreshToken(e,t){super.removeRefreshToken(e,t);const i=this.getTokenKeys(),o=i.refreshToken.indexOf(e);o>-1&&(this.logger.info("refreshToken removed from tokenKeys map"),i.refreshToken.splice(o,1),this.setTokenKeys(i,t))}getTokenKeys(e=1){return Hf(this.clientId,this.browserStorage,e)}setTokenKeys(e,t,i=1){0!==e.idToken.length||0!==e.accessToken.length||0!==e.refreshToken.length?this.setItem(vf(this.clientId,i),JSON.stringify(e),t):this.removeItem(vf(this.clientId,i))}getIdTokenCredential(e,t){const i=this.browserStorage.getUserData(e);if(!i)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeIdToken(e,t),null;const o=this.validateAndParseJson(i);return o&&((r=o)&&_u(r)&&r.hasOwnProperty("realm")&&r.credentialType===Qn.ID_TOKEN)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null);var r}async setIdTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const i=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.getTokenKeys();-1===r.idToken.indexOf(i)&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(i),this.setTokenKeys(r,t))}getAccessTokenCredential(e,t){const i=this.browserStorage.getUserData(e);if(!i)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeAccessTokenKeys([e],t),null;const o=this.validateAndParseJson(i);return o&&Eu(o)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null)}async setAccessTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const i=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.getTokenKeys(),n=r.accessToken.indexOf(i);-1!==n&&r.accessToken.splice(n,1),this.logger.trace(`access token ${-1===n?"added to":"updated in"} map`),r.accessToken.push(i),this.setTokenKeys(r,t)}getRefreshTokenCredential(e,t){const i=this.browserStorage.getUserData(e);if(!i)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeRefreshToken(e,t),null;const o=this.validateAndParseJson(i);return o&&Ou(o)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null)}async setRefreshTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const i=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(i,JSON.stringify(e),t,o);const r=this.getTokenKeys();-1===r.refreshToken.indexOf(i)&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(i),this.setTokenKeys(r,t))}getAppMetadata(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&(o=e,(r=i)&&0===o.indexOf($n)&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("environment"))?(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),i):(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null);var o,r}setAppMetadata(e,t){this.logger.trace("BrowserCacheManager.setAppMetadata called");const i=function({environment:e,clientId:t}){return[$n,e,t].join(Vn).toLowerCase()}(e);this.setItem(i,JSON.stringify(e),t)}getServerTelemetry(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){const i=0===e.indexOf(ra.CACHE_KEY);let o=!0;return t&&(o=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),i&&o}(e,i)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),i):(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null)}setServerTelemetry(e,t,i){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t),i)}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){return!!t&&0===e.indexOf(Jn)&&t.hasOwnProperty("aliases")&&t.hasOwnProperty("preferred_cache")&&t.hasOwnProperty("preferred_network")&&t.hasOwnProperty("canonical_authority")&&t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("aliasesFromNetwork")&&t.hasOwnProperty("endpointsFromNetwork")&&t.hasOwnProperty("expiresAt")&&t.hasOwnProperty("jwks_uri")}(e,i)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),i):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(e=>this.isAuthorityMetadata(e))}setWrapperMetadata(e,t){this.internalStorage.setItem($h,e),this.internalStorage.setItem(Zh,t)}getWrapperMetadata(){return[this.internalStorage.getItem($h)||dn.EMPTY_STRING,this.internalStorage.getItem(Zh)||dn.EMPTY_STRING]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(e){const t=this.generateCacheKey(Rn),i=this.browserStorage.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters found"),null;const o=this.validateAndParseJson(i);return o?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:o.homeAccountId,localAccountId:o.localAccountId,tenantId:o.tenantId},e)):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e,t){const i=this.generateCacheKey(Rn);if(e){this.logger.verbose("setActiveAccount: Active account set");const o={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId,lastUpdatedAt:hu().toString()};this.setItem(i,JSON.stringify(o),t)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(i);this.eventHandler.emitEvent(Xf)}getThrottlingCache(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const i=this.validateAndParseJson(t);return i&&function(e,t){let i=!1;e&&(i=0===e.indexOf(la));let o=!0;return t&&(o=t.hasOwnProperty("throttleTime")),i&&o}(e,i)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),i):(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null)}setThrottlingCache(e,t,i){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t),i)}getTemporaryCache(e,t){const i=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const e=this.cookieStorage.getItem(i);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),e}const o=this.temporaryCacheStorage.getItem(i);if(!o){if(this.cacheConfig.cacheLocation===Uh){const e=this.browserStorage.getItem(i);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),e}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),o}setTemporaryCache(e,t,i){const o=i?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(o,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(o,t,void 0,this.cacheConfig.secureCookies))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(e))}getKeys(){return this.browserStorage.getKeys()}clear(e){this.removeAllAccounts(e),this.removeAppMetadata(e),this.temporaryCacheStorage.getKeys().forEach(e=>{-1===e.indexOf(Ef)&&-1===e.indexOf(this.clientId)||this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{-1===e.indexOf(Ef)&&-1===e.indexOf(this.clientId)||this.browserStorage.removeItem(e)}),this.internalStorage.clear()}clearTokensAndKeysWithClaims(e){this.performanceClient.addQueueMeasurement(Hd,e);const t=this.getTokenKeys();let i=0;t.accessToken.forEach(t=>{const o=this.getAccessTokenCredential(t,e);o?.requestedClaimsHash&&t.includes(o.requestedClaimsHash.toLowerCase())&&(this.removeAccessToken(t,e),i++)}),i>0&&this.logger.warning(`${i} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return el.startsWith(e,Ef)?e:`${Ef}.${this.clientId}.${e}`}generateCredentialKey(e){const t=e.credentialType===Qn.REFRESH_TOKEN&&e.familyId||e.clientId,i=e.tokenType&&e.tokenType.toLowerCase()!==na.BEARER.toLowerCase()?e.tokenType.toLowerCase():"";return[`${Ef}.1`,e.homeAccountId,e.environment,e.credentialType,t,e.realm||"",e.target||"",e.requestedClaimsHash||"",i].join("-").toLowerCase()}generateAccountKey(e){const t=e.homeAccountId.split(".")[1];return[`${Ef}.1`,e.homeAccountId,e.environment,t||e.tenantId||""].join("-").toLowerCase()}resetRequestCache(){this.logger.trace("BrowserCacheManager.resetRequestCache called"),this.removeTemporaryItem(this.generateCacheKey(Kh)),this.removeTemporaryItem(this.generateCacheKey(Vh)),this.removeTemporaryItem(this.generateCacheKey(Hh)),this.removeTemporaryItem(this.generateCacheKey(Yh)),this.removeTemporaryItem(this.generateCacheKey(Qh)),this.setInteractionInProgress(!1)}cacheAuthorizeRequest(e,t){this.logger.trace("BrowserCacheManager.cacheAuthorizeRequest called");const i=bm(JSON.stringify(e));if(this.setTemporaryCache(Kh,i,!0),t){const e=bm(t);this.setTemporaryCache(Vh,e,!0)}}getCachedRequest(){this.logger.trace("BrowserCacheManager.getCachedRequest called");const e=this.getTemporaryCache(Kh,!0);if(!e)throw Ah(jp);const t=this.getTemporaryCache(Vh,!0);let i,o="";try{i=JSON.parse(Sm(e)),t&&(o=Sm(t))}catch(t){throw this.logger.errorPii(`Attempted to parse: ${e}`),this.logger.error(`Parsing cached token request threw with error: ${t}`),Ah(Gp)}return[i,o]}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(Qh,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;const t=this.validateAndParseJson(e);return t||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress()?.clientId;return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${Ef}.${zh}`,t=this.getTemporaryCache(e,!1);try{return t?JSON.parse(t):null}catch(t){return this.logger.error("Cannot parse interaction status. Removing temporary cache items and clearing url hash. Retrying interaction should fix the error"),this.removeTemporaryItem(e),this.resetRequestCache(),sf(window),null}}setInteractionInProgress(e,t=Gh){const i=`${Ef}.${zh}`;if(e){if(this.getInteractionInProgress())throw Ah(wp);this.setTemporaryCache(i,JSON.stringify({clientId:this.clientId,type:t}),!1)}else e||this.getInteractionInProgress()?.clientId!==this.clientId||this.removeTemporaryItem(i)}async hydrateCache(e,t){const i=Au(e.account?.homeAccountId,e.account?.environment,e.idToken,this.clientId,e.tenantId);let o;t.claims&&(o=await this.cryptoImpl.hashString(t.claims));const r={idToken:i,accessToken:yu(e.account?.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?mu(e.expiresOn):0,e.extExpiresOn?mu(e.extExpiresOn):0,Sm,void 0,e.tokenType,void 0,t.sshKid,t.claims,o)};return this.saveCacheRecord(r,e.correlationId)}async saveCacheRecord(e,t,i){try{await super.saveCacheRecord(e,t,i)}catch(e){if(e instanceof _l&&this.performanceClient&&t)try{const e=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:e.refreshToken.length,cacheIdCount:e.idToken.length,cacheAtCount:e.accessToken.length},t)}catch(e){}throw e}}}function Og(e,t,i,o){try{switch(t){case Uh:return new Vf(e,i,o);case Fh:return new zf}}catch(e){i.error(e)}return new Df}class Cg{constructor(e){this.eventCallbacks=new Map,this.logger=e||new Cs({}),"undefined"!=typeof BroadcastChannel&&(this.broadcastChannel=new BroadcastChannel("msal.broadcast.event")),this.invokeCrossTabCallbacks=this.invokeCrossTabCallbacks.bind(this)}addEventCallback(e,t,i){if("undefined"!=typeof window){const o=i||Hm();return this.eventCallbacks.has(o)?(this.logger.error(`Event callback with id: ${o} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(o,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${o}`),o)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,i,o){const r={eventType:e,interactionType:t||null,payload:i||null,error:o||null,timestamp:Date.now()};switch(e){case Zf:case Jf:case Xf:this.broadcastChannel?.postMessage(r);break;default:this.invokeCallbacks(r)}}invokeCallbacks(e){this.eventCallbacks.forEach(([t,i],o)=>{(0===i.length||i.includes(e.eventType))&&(this.logger.verbose(`Emitting event to callback ${o}: ${e.eventType}`),t.apply(null,[e]))})}invokeCrossTabCallbacks(e){const t=e.data;this.invokeCallbacks(t)}subscribeCrossTab(){this.broadcastChannel?.addEventListener("message",this.invokeCrossTabCallbacks)}unsubscribeCrossTab(){this.broadcastChannel?.removeEventListener("message",this.invokeCrossTabCallbacks)}}
|
|
128
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Ng{constructor(e,t,i,o,r,n,a,s,l){this.config=e,this.browserStorage=t,this.browserCrypto=i,this.networkClient=this.config.system.networkClient,this.eventHandler=r,this.navigationClient=n,this.platformAuthProvider=s,this.correlationId=l||Hm(),this.logger=o.clone(Ch,_f,this.correlationId),this.performanceClient=a}async clearCacheOnLogout(e,t){if(t)try{this.browserStorage.removeAccount(t,e),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch(e){this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),this.browserStorage.clear(e),await this.browserCrypto.clearKeystore()}catch(e){this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}getRedirectUri(e){this.logger.verbose("getRedirectUri called");const t=e||this.config.auth.redirectUri;return pl.getAbsoluteUrl(t,df())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const i={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new up(i,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,i=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(Gl,this.correlationId);const o={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},r=e.requestAuthority||this.config.auth.authority,n=i?.length?"true"===i:this.config.auth.instanceAware,a=t&&n?this.config.auth.authority.replace(pl.getDomainFromUrl(r),t.environment):r,s=wu.generateAuthority(a,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),l=await uu(Pu,Sd,this.logger,this.performanceClient,this.correlationId)(s,this.config.system.networkClient,this.browserStorage,o,this.logger,this.correlationId,this.performanceClient);if(t&&!l.isAlias(t.environment))throw Xs(zs);return l}}
|
|
129
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function Rg(e,t,i,o){i.addQueueMeasurement(id,e.correlationId);const r=e.authority||t.auth.authority,n=[...e&&e.scopes||[]],a={...e,correlationId:e.correlationId,authority:r,scopes:n};if(a.authenticationScheme){if(a.authenticationScheme===na.SSH){if(!e.sshJwk)throw Xs(Gs);if(!e.sshKid)throw Xs(Ws)}o.verbose(`Authentication Scheme set to "${a.authenticationScheme}" as configured in Auth request`)}else a.authenticationScheme=na.BEARER,o.verbose('Authentication Scheme wasn\'t explicitly set in request, defaulting to "Bearer" request');return t.cache.claimsBasedCachingEnabled&&e.claims&&!el.isEmptyObj(e.claims)&&(a.requestedClaimsHash=await Xm(e.claims)),a}async function bg(e,t,i,o,r){o.addQueueMeasurement(od,e.correlationId);const n=await uu(Rg,id,r,o,e.correlationId)(e,i,o,r);return{...e,...n,account:t,forceRefresh:e.forceRefresh||!1}}function wg(e,t){let i;const o=e.httpMethod;if(t===bl){if(i=o||Tn,i!==Tn)throw Xs(Qs)}else i=o||gn;if(e.authorizePostBodyParameters&&i!==Tn)throw Xs($s);return i}
|
|
130
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Sg extends Ng{initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e?.correlationId);const t={correlationId:this.correlationId||Hm(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const i=this.getLogoutHintFromIdTokenClaims(e.account);i&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=i)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return e&&null===e.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId):e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=pl.getAbsoluteUrl(e.postLogoutRedirectUri,df())):null===this.config.auth.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=pl.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,df())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=pl.getAbsoluteUrl(df(),df())),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}async createAuthCodeClient(e){this.performanceClient.addQueueMeasurement(ud,this.correlationId);const t=await uu(this.getClientConfiguration.bind(this),pd,this.logger,this.performanceClient,this.correlationId)(e);return new op(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:i,requestAzureCloudOptions:o,requestExtraQueryParameters:r,account:n}=e;this.performanceClient.addQueueMeasurement(pd,this.correlationId);const a=await uu(this.getDiscoveredAuthority.bind(this),Gl,this.logger,this.performanceClient,this.correlationId)({requestAuthority:i,requestAzureCloudOptions:o,requestExtraQueryParameters:r,account:n}),s=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:a,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:s.loggerCallback,piiLoggingEnabled:s.piiLoggingEnabled,logLevel:s.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:Ch,version:_f,cpu:dn.EMPTY_STRING,os:dn.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(hd,this.correlationId);const i=this.getRedirectUri(e.redirectUri),o={interactionType:t},r=$u.setRequestState(this.browserCrypto,e&&e.state||dn.EMPTY_STRING,o),n={...await uu(Rg,id,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:i,state:r,nonce:e.nonce||Hm(),responseMode:this.config.auth.OIDCOptions.serverResponseType},a={...n,httpMethod:wg(n,this.config.auth.protocolMode)};if(e.loginHint||e.sid)return a;const s=e.account||this.browserStorage.getActiveAccount(this.correlationId);return s&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${s.homeAccountId}`,this.correlationId),a.account=s),a}}
|
|
131
131
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
132
132
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
133
|
-
function Pg(e,t,i){const o=
|
|
134
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
135
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */const
|
|
136
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
137
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Fg extends Cg{constructor(e,t,i,o,r,n,a,s,l,d,c,u){super(e,t,i,o,r,n,s,l,u),this.apiId=a,this.accountId=d,this.platformAuthProvider=l,this.nativeStorageManager=c,this.silentCacheClient=new Ug(e,this.nativeStorageManager,i,o,r,n,s,l,u);const p=this.platformAuthProvider.getExtensionName();this.skus=cp.makeExtraSkuString({libraryName:Oh,libraryVersion:If,extensionName:p,extensionVersion:this.platformAuthProvider.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[wc]:this.skus}}async acquireToken(e,t){this.performanceClient.addQueueMeasurement(Gl,this.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const i=this.performanceClient.startMeasurement(Gl,this.correlationId),o=pu(),r=this.initializeServerTelemetryManager(this.apiId);try{const n=await this.initializeNativeRequest(e);try{const e=await this.acquireTokensFromCache(this.accountId,n);return i.end({success:!0,isNativeBroker:!1,fromCache:!0}),e}catch(e){if(t===Am)throw this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy"),i.end({success:!1,brokerErrorCode:"cache_request_failed"}),e;this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const a=await this.platformAuthProvider.sendMessage(n);return await this.handleNativeResponse(a,n,o).then(e=>(i.end({success:!0,isNativeBroker:!0,requestId:e.requestId}),r.clearNativeBrokerErrorCode(),e)).catch(e=>{throw i.end({success:!1,errorCode:e.errorCode,subErrorCode:e.subError}),e})}catch(e){throw e instanceof xg&&r.setNativeBrokerErrorCode(e.errorCode),i.end({success:!1}),e}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:el.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),Is(ts);const i=this.browserStorage.getBaseAccountInfo({nativeAccountId:e},this.correlationId);if(!i)throw Is(ts);try{const e=this.createSilentCacheRequest(t,i),o=await this.silentCacheClient.acquireToken(e),r={...i,idTokenClaims:o?.idTokenClaims,idToken:o?.idToken};return{...o,account:r}}catch(e){throw e}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...i}=e;delete i.onRedirectNavigate;const o=await this.initializeNativeRequest(i);try{await this.platformAuthProvider.sendMessage(o)}catch(e){if(e instanceof xg){if(this.initializeServerTelemetryManager(this.apiId).setNativeBrokerErrorCode(e.errorCode),Dg(e))throw e}}this.browserStorage.setTemporaryCache(zh,JSON.stringify(o),!0);const r={apiId:Zh,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},n=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(n,r)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const i=this.browserStorage.getCachedNativeRequest();if(!i)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&e?.addFields({errorCode:"no_cached_request"},t),null;const{prompt:o,...r}=i;o&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(zh));const n=pu();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const t=await this.platformAuthProvider.sendMessage(r),i=await this.handleNativeResponse(t,r,n);return this.initializeServerTelemetryManager(this.apiId).clearNativeBrokerErrorCode(),e&&this.correlationId&&this.performanceClient.addFields({isNativeBroker:!0},this.correlationId),i}catch(e){throw e}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,i){this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const o=rl(e.id_token,wm),r=this.createHomeAccountIdentifier(e,o),n=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId},this.correlationId)?.homeAccountId;if(t.extraParameters?.child_client_id&&e.account.id!==t.accountId)this.logger.info("handleNativeServerResponse: Double broker flow detected, ignoring accountId mismatch");else if(r!==n&&e.account.id!==t.accountId)throw kg(Lg);const a=await this.getDiscoveredAuthority({requestAuthority:t.authority}),s=ep(this.browserStorage,a,r,wm,this.correlationId,o,e.client_info,void 0,o.tid,void 0,e.account.id,this.logger);e.expires_in=Number(e.expires_in);const l=await this.generateAuthenticationResult(e,t,o,s,a.canonicalAuthority,i);return await this.cacheAccount(s,this.correlationId),await this.cacheNativeTokens(e,t,r,o,e.access_token,l.tenantId,i),l}createHomeAccountIdentifier(e,t){return Uu.generateHomeAccountId(e.client_info||ln.EMPTY_STRING,nu,this.logger,this.browserCrypto,t)}generateScopes(e,t){return t?el.fromString(t):el.fromString(e)}async generatePopAccessToken(e,t){if(t.tokenType===ra.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const i=new Zu(this.browserCrypto),o={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw Is(ps);return i.signPopToken(e.access_token,t.keyId,o)}return e.access_token}async generateAuthenticationResult(e,t,i,o,r,n){const a=this.addTelemetryFromNativeResponse(e.properties.MATS),s=this.generateScopes(t.scope,e.scope),l=e.account.properties||{},d=l.UID||i.oid||i.sub||ln.EMPTY_STRING,c=l.TenantId||i.tid||ln.EMPTY_STRING,u=ol(o.getAccountInfo(),void 0,i,e.id_token);u.nativeAccountId!==e.account.id&&(u.nativeAccountId=e.account.id);const p=await this.generatePopAccessToken(e,t),h=t.tokenType===ra.POP?ra.POP:ra.BEARER;return{authority:r,uniqueId:d,tenantId:c,scopes:s.asArray(),account:u,idToken:e.id_token,idTokenClaims:i,accessToken:p,fromCache:!!a&&this.isResponseFromCache(a),expiresOn:mu(n+e.expires_in),tokenType:h,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}async cacheAccount(e,t){await this.browserStorage.setAccount(e,this.correlationId),this.browserStorage.removeAccountContext(e.getAccountInfo(),t)}cacheNativeTokens(e,t,i,o,r,n,a){const s=Tu(i,t.authority,e.id_token||"",t.clientId,o.tid||""),l=a+(t.tokenType===ra.POP?ln.SHR_NONCE_VALIDITY:("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0),d=this.generateScopes(e.scope,t.scope),c={idToken:s,accessToken:Au(i,t.authority,r,t.clientId,o.tid||n,d.printScopes(),l,0,wm,void 0,t.tokenType,void 0,t.keyId)};return this.nativeStorageManager.saveCacheRecord(c,this.correlationId,t.storeInCache)}getExpiresInValue(e,t){return e===ra.POP?ln.SHR_NONCE_VALIDITY:("string"==typeof t?parseInt(t,10):t)||0}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.platformAuthProvider.getExtensionId(),extensionVersion:this.platformAuthProvider.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}getMATSFromResponse(e){if(e)try{return JSON.parse(e)}catch(e){this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return void 0===e.is_cached?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=await this.getCanonicalAuthority(e),{scopes:i,...o}=e,r=new el(i||[]);r.appendScopes(Tn);const n={...o,accountId:this.accountId,clientId:this.config.auth.clientId,authority:t.urlString,scope:r.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:this.getPrompt(e.prompt),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(n.signPopToken&&e.popKid)throw Th(dh);if(this.handleExtraBrokerParams(n),n.extraParameters=n.extraParameters||{},n.extraParameters.telemetry=Rh,e.authenticationScheme===ra.POP){const t={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},i=new Zu(this.browserCrypto);let o;if(n.keyId)o=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:n.keyId})),n.signPopToken=!1;else{const e=await cu(i.generateCnf.bind(i),Cd,this.logger,this.performanceClient,this.correlationId)(t,this.logger);o=e.reqCnfString,n.keyId=e.kid,n.signPopToken=!0}n.reqCnf=o}return this.addRequestSKUs(n),n}async getCanonicalAuthority(e){const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const i=new ul(t);return i.validateAsUri(),i}getPrompt(e){switch(this.apiId){case Xh:case im:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),xn}if(e)switch(e){case xn:case Mn:case vn:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e} is not compatible with native flow`),Th(sh)}else this.logger.trace("initializeNativeRequest: prompt was not provided")}handleExtraBrokerParams(e){const t=e.extraParameters&&e.extraParameters.hasOwnProperty(Pc)&&e.extraParameters.hasOwnProperty(Sc)&&e.extraParameters.hasOwnProperty(Oc);if(!e.embeddedClientId&&!t)return;let i="";const o=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,i=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[Sc],i=e.extraParameters[Oc]),e.extraParameters={child_client_id:i,child_redirect_uri:o},this.performanceClient?.addFields({embeddedClientId:i,embeddedRedirectUri:o},this.correlationId)}}
|
|
138
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function
|
|
139
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function
|
|
140
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
141
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
142
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function
|
|
143
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
144
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
145
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function
|
|
146
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
147
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
148
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
149
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
150
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
133
|
+
function Pg(e,t,i){const o=dl(e);if(!o)throw ll(e)?(i.error(`A ${t} is present in the iframe but it does not contain known properties. It's likely that the ${t} has been replaced by code running on the redirectUri page.`),i.errorPii(`The ${t} detected is: ${e}`),Ah(Np)):(i.error(`The request has returned to the redirectUri but a ${t} is not present. It's likely that the ${t} has been removed or the page has been redirected by code running on the redirectUri page.`),Ah(Op));return o}function vg(e,t,i){if(!e.state)throw Ah(Cp);const o=function(e,t){if(!t)return null;try{return $u.parseRequestState(e,t).libraryState.meta}catch(e){throw _s(Ua)}}(t,e.state);if(!o)throw Ah(Rp);if(o.interactionType!==i)throw Ah(bp)}
|
|
134
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Lg{constructor(e,t,i,o,r){this.authModule=e,this.browserStorage=t,this.authCodeRequest=i,this.logger=o,this.performanceClient=r}async handleCodeResponse(e,t){let i;this.performanceClient.addQueueMeasurement(Td,t.correlationId);try{i=function(e,t){if(dp(e,t),!e.code)throw _s(cs);return e}(e,t.state)}catch(e){throw e instanceof vu&&e.subError===vp?Ah(vp):e}return uu(this.handleCodeResponseFromServer.bind(this),gd,this.logger,this.performanceClient,t.correlationId)(i,t)}async handleCodeResponseFromServer(e,t,i=!0){if(this.performanceClient.addQueueMeasurement(gd,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await uu(this.authModule.updateAuthority.bind(this.authModule),_d,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),i&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const e=this.createCcsCredentials(t);e&&(this.authCodeRequest.ccsCredential=e)}return await uu(this.authModule.acquireToken.bind(this.authModule),Ed,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:Ic}:e.loginHint?{credential:e.loginHint,type:_c}:null}}
|
|
135
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const Mg="user_switch",xg={[Mg]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."};class Dg extends ba{constructor(e,t,i){super(e,t),Object.setPrototypeOf(this,Dg.prototype),this.name="NativeAuthError",this.ext=i}}function kg(e){return!(!e.ext||!e.ext.status||"DISABLED"!==e.ext.status)||(!(!e.ext||!e.ext.error||-2147186943!==e.ext.error)||"ContentError"===e.errorCode)}function Ug(e,t,i){if(i&&i.status)switch(i.status){case"ACCOUNT_UNAVAILABLE":return Qu(qu);case"USER_INTERACTION_REQUIRED":return new Vu(e,t);case"USER_CANCEL":return Ah(vp);case"NO_NETWORK":return Ah(Vp);case"UX_NOT_ALLOWED":return Qu(Gu)}return new Dg(e,xg[e]||t,i)}
|
|
136
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Fg extends Sg{async acquireToken(e){this.performanceClient.addQueueMeasurement(Ul,e.correlationId);const t=this.initializeServerTelemetryManager(om),i=await uu(this.getClientConfiguration.bind(this),pd,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),o=new np(i,this.performanceClient);this.logger.verbose("Silent auth client created");try{const t=(await uu(o.acquireCachedToken.bind(o),Xl,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),t}catch(e){throw e instanceof Th&&e.errorCode===Jp&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),e}}logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(t.correlationId,t?.account)}}
|
|
137
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Bg extends Ng{constructor(e,t,i,o,r,n,a,s,l,d,c,u){super(e,t,i,o,r,n,s,l,u),this.apiId=a,this.accountId=d,this.platformAuthProvider=l,this.nativeStorageManager=c,this.silentCacheClient=new Fg(e,this.nativeStorageManager,i,o,r,n,s,l,u);const p=this.platformAuthProvider.getExtensionName();this.skus=up.makeExtraSkuString({libraryName:Ch,libraryVersion:_f,extensionName:p,extensionVersion:this.platformAuthProvider.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[Sc]:this.skus}}async acquireToken(e,t){this.performanceClient.addQueueMeasurement(Wl,this.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const i=this.performanceClient.startMeasurement(Wl,this.correlationId),o=hu(),r=this.initializeServerTelemetryManager(this.apiId);try{const n=await this.initializeNativeRequest(e);try{const e=await this.acquireTokensFromCache(this.accountId,n);return i.end({success:!0,isNativeBroker:!1,fromCache:!0}),e}catch(e){if(t===ym)throw this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy"),i.end({success:!1,brokerErrorCode:"cache_request_failed"}),e;this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const a=await this.platformAuthProvider.sendMessage(n);return await this.handleNativeResponse(a,n,o).then(e=>(i.end({success:!0,isNativeBroker:!0,requestId:e.requestId}),r.clearNativeBrokerErrorCode(),e)).catch(e=>{throw i.end({success:!1,errorCode:e.errorCode,subErrorCode:e.subError}),e})}catch(e){throw e instanceof Dg&&r.setNativeBrokerErrorCode(e.errorCode),i.end({success:!1}),e}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:tl.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),_s(is);const i=this.browserStorage.getBaseAccountInfo({nativeAccountId:e},this.correlationId);if(!i)throw _s(is);try{const e=this.createSilentCacheRequest(t,i),o=await this.silentCacheClient.acquireToken(e),r={...i,idTokenClaims:o?.idTokenClaims,idToken:o?.idToken};return{...o,account:r}}catch(e){throw e}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...i}=e;delete i.onRedirectNavigate;const o=await this.initializeNativeRequest(i);try{await this.platformAuthProvider.sendMessage(o)}catch(e){if(e instanceof Dg){if(this.initializeServerTelemetryManager(this.apiId).setNativeBrokerErrorCode(e.errorCode),kg(e))throw e}}this.browserStorage.setTemporaryCache(Qh,JSON.stringify(o),!0);const r={apiId:Jh,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},n=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(n,r)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const i=this.browserStorage.getCachedNativeRequest();if(!i)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&e?.addFields({errorCode:"no_cached_request"},t),null;const{prompt:o,...r}=i;o&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Qh));const n=hu();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const t=await this.platformAuthProvider.sendMessage(r),i=await this.handleNativeResponse(t,r,n);return this.initializeServerTelemetryManager(this.apiId).clearNativeBrokerErrorCode(),e&&this.correlationId&&this.performanceClient.addFields({isNativeBroker:!0},this.correlationId),i}catch(e){throw e}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,i){this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const o=nl(e.id_token,Sm),r=this.createHomeAccountIdentifier(e,o),n=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId},this.correlationId)?.homeAccountId;if(t.extraParameters?.child_client_id&&e.account.id!==t.accountId)this.logger.info("handleNativeServerResponse: Double broker flow detected, ignoring accountId mismatch");else if(r!==n&&e.account.id!==t.accountId)throw Ug(Mg);const a=await this.getDiscoveredAuthority({requestAuthority:t.authority}),s=tp(this.browserStorage,a,r,Sm,this.correlationId,o,e.client_info,void 0,o.tid,void 0,e.account.id,this.logger);e.expires_in=Number(e.expires_in);const l=await this.generateAuthenticationResult(e,t,o,s,a.canonicalAuthority,i);return await this.cacheAccount(s,this.correlationId),await this.cacheNativeTokens(e,t,r,o,e.access_token,l.tenantId,i),l}createHomeAccountIdentifier(e,t){return Fu.generateHomeAccountId(e.client_info||dn.EMPTY_STRING,au,this.logger,this.browserCrypto,t)}generateScopes(e,t){return t?tl.fromString(t):tl.fromString(e)}async generatePopAccessToken(e,t){if(t.tokenType===na.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const i=new Ju(this.browserCrypto),o={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw _s(hs);return i.signPopToken(e.access_token,t.keyId,o)}return e.access_token}async generateAuthenticationResult(e,t,i,o,r,n){const a=this.addTelemetryFromNativeResponse(e.properties.MATS),s=this.generateScopes(t.scope,e.scope),l=e.account.properties||{},d=l.UID||i.oid||i.sub||dn.EMPTY_STRING,c=l.TenantId||i.tid||dn.EMPTY_STRING,u=rl(o.getAccountInfo(),void 0,i,e.id_token);u.nativeAccountId!==e.account.id&&(u.nativeAccountId=e.account.id);const p=await this.generatePopAccessToken(e,t),h=t.tokenType===na.POP?na.POP:na.BEARER;return{authority:r,uniqueId:d,tenantId:c,scopes:s.asArray(),account:u,idToken:e.id_token,idTokenClaims:i,accessToken:p,fromCache:!!a&&this.isResponseFromCache(a),expiresOn:fu(n+e.expires_in),tokenType:h,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}async cacheAccount(e,t){await this.browserStorage.setAccount(e,this.correlationId),this.browserStorage.removeAccountContext(e.getAccountInfo(),t)}cacheNativeTokens(e,t,i,o,r,n,a){const s=Au(i,t.authority,e.id_token||"",t.clientId,o.tid||""),l=a+(t.tokenType===na.POP?dn.SHR_NONCE_VALIDITY:("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0),d=this.generateScopes(e.scope,t.scope),c={idToken:s,accessToken:yu(i,t.authority,r,t.clientId,o.tid||n,d.printScopes(),l,0,Sm,void 0,t.tokenType,void 0,t.keyId)};return this.nativeStorageManager.saveCacheRecord(c,this.correlationId,t.storeInCache)}getExpiresInValue(e,t){return e===na.POP?dn.SHR_NONCE_VALIDITY:("string"==typeof t?parseInt(t,10):t)||0}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.platformAuthProvider.getExtensionId(),extensionVersion:this.platformAuthProvider.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}getMATSFromResponse(e){if(e)try{return JSON.parse(e)}catch(e){this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return void 0===e.is_cached?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=await this.getCanonicalAuthority(e),{scopes:i,...o}=e,r=new tl(i||[]);r.appendScopes(An);const n={...o,accountId:this.accountId,clientId:this.config.auth.clientId,authority:t.urlString,scope:r.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:this.getPrompt(e.prompt),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(n.signPopToken&&e.popKid)throw Ah(ch);if(this.handleExtraBrokerParams(n),n.extraParameters=n.extraParameters||{},n.extraParameters.telemetry=bh,e.authenticationScheme===na.POP){const t={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},i=new Ju(this.browserCrypto);let o;if(n.keyId)o=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:n.keyId})),n.signPopToken=!1;else{const e=await uu(i.generateCnf.bind(i),Nd,this.logger,this.performanceClient,this.correlationId)(t,this.logger);o=e.reqCnfString,n.keyId=e.kid,n.signPopToken=!0}n.reqCnf=o}return this.addRequestSKUs(n),n}async getCanonicalAuthority(e){const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const i=new pl(t);return i.validateAsUri(),i}getPrompt(e){switch(this.apiId){case em:case om:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),Dn}if(e)switch(e){case Dn:case xn:case Ln:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e} is not compatible with native flow`),Ah(lh)}else this.logger.trace("initializeNativeRequest: prompt was not provided")}handleExtraBrokerParams(e){const t=e.extraParameters&&e.extraParameters.hasOwnProperty(Pc)&&e.extraParameters.hasOwnProperty(vc)&&e.extraParameters.hasOwnProperty(Cc);if(!e.embeddedClientId&&!t)return;let i="";const o=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,i=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[vc],i=e.extraParameters[Cc]),e.extraParameters={child_client_id:i,child_redirect_uri:o},this.performanceClient?.addFields({embeddedClientId:i,embeddedRedirectUri:o},this.correlationId)}}
|
|
138
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function qg(e,t,i,o,r){const n=sp({...e.auth,authority:t},i,o,r);if(Hc(n,{sku:Ch,version:_f,os:"",cpu:""}),e.auth.protocolMode!==Rl&&Yc(n,e.telemetry.application),i.platformBroker&&(function(e){e.set("nativebroker","1")}(n),r.addFields({isPlatformAuthorizeRequest:!0},i.correlationId),i.authenticationScheme===na.POP)){const e=new Uf(o,r),t=new Ju(e);let a;if(i.popKid)a=e.encodeKid(i.popKid);else{a=(await uu(t.generateCnf.bind(t),Nd,o,r,i.correlationId)(i,o)).reqCnfString}tu(n,a)}return Mc(n,i.correlationId,r),n}async function jg(e,t,i,o,r){if(!i.codeChallenge)throw Xs(Fs);const n=await uu(qg,fd,o,r,i.correlationId)(e,t,i,o,r);return xc(n,Un),Vc(n,i.codeChallenge,dn.S256_CODE_CHALLENGE_METHOD),eu(n,i.extraQueryParameters||{}),lp(t,n,e.auth.encodeExtraQueryParams,i.extraQueryParameters)}async function Gg(e,t,i,o,r,n){if(!o.earJwk)throw Ah(yp);const a=await qg(t,i,o,r,n);xc(a,Fn),function(e,t){e.set("ear_jwk",encodeURIComponent(t)),e.set("ear_jwe_crypto","eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0")}(a,o.earJwk);const s=new Map;eu(s,o.extraQueryParameters||{});return Hg(e,lp(i,s,t.auth.encodeExtraQueryParams,o.extraQueryParameters),a)}async function Wg(e,t,i,o,r,n){const a=await qg(t,i,o,r,n);xc(a,Un),Vc(a,o.codeChallenge,o.codeChallengeMethod||dn.S256_CODE_CHALLENGE_METHOD),function(e,t){Object.entries(t).forEach(([t,i])=>{i&&e.set(t,i)})}(a,o.authorizePostBodyParameters||{});const s=new Map;eu(s,o.extraQueryParameters||{});return Hg(e,lp(i,s,t.auth.encodeExtraQueryParams,o.extraQueryParameters),a)}function Hg(e,t,i){const o=e.createElement("form");return o.method="post",o.action=t,i.forEach((t,i)=>{const r=e.createElement("input");r.hidden=!0,r.name=i,r.value=t,o.appendChild(r)}),e.body.appendChild(o),o}async function Yg(e,t,i,o,r,n,a,s,l,d){if(s.verbose("Account id found, calling WAM for token"),!d)throw Ah(ah);const c=new Uf(s,l),u=new Bg(o,r,c,s,a,o.system.navigationClient,i,l,d,t,n,e.correlationId),{userRequestState:p}=$u.parseRequestState(c,e.state);return uu(u.acquireToken.bind(u),Wl,s,l,e.correlationId)({...e,state:p,prompt:void 0})}async function Kg(e,t,i,o,r,n,a,s,l,d,c,u){if(Mu.removeThrottle(a,r.auth.clientId,e),t.accountId)return uu(Yg,yd,d,c,e.correlationId)(e,t.accountId,o,r,a,s,l,d,c,u);const p={...e,code:t.code||"",codeVerifier:i},h=new Lg(n,a,p,d,c);return await uu(h.handleCodeResponse.bind(h),Td,d,c,e.correlationId)(t,e)}async function Vg(e,t,i,o,r,n,a,s,l,d,c){if(Mu.removeThrottle(n,o.auth.clientId,e),dp(t,e.state),!t.ear_jwe)throw Ah(Ip);if(!e.earJwk)throw Ah(yp);const u=JSON.parse(await uu(Vm,sc,l,d,e.correlationId)(e.earJwk,t.ear_jwe));if(u.accountId)return uu(Yg,yd,l,d,e.correlationId)(e,u.accountId,i,o,n,a,s,l,d,c);const p=new ep(o.auth.clientId,n,new Uf(l,d),l,null,null,d);p.validateTokenResponse(u);const h={code:"",state:e.state,nonce:e.nonce,client_info:u.client_info,cloud_graph_host_name:u.cloud_graph_host_name,cloud_instance_host_name:u.cloud_instance_host_name,cloud_instance_name:u.cloud_instance_name,msgraph_host:u.msgraph_host};return await uu(p.handleServerTokenResponse.bind(p),bd,l,d,e.correlationId)(u,r,hu(),e,h,void 0,void 0,void 0,void 0)}
|
|
139
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function zg(e,t,i){e.addQueueMeasurement(Qd,i);const o=cu(Qg,$d,t,e,i)(e,t,i);return{verifier:o,challenge:await uu($g,Zd,t,e,i)(o,e,t,i)}}function Qg(e,t,i){try{const o=new Uint8Array(32);cu(Gm,Xd,t,e,i)(o);return Rm(o)}catch(e){throw Ah(Ap)}}async function $g(e,t,i,o){t.addQueueMeasurement(Zd,o);try{const r=await uu(jm,Jd,i,t,o)(e,t,o);return Rm(new Uint8Array(r))}catch(e){throw Ah(Ap)}}
|
|
140
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Zg{constructor(e,t,i,o){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=o,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=i,this.handshakeEvent=i.startMeasurement(Gd),this.platformAuthType=Lh}async sendMessage(e){this.logger.trace(this.platformAuthType+" - sendMessage called.");const t={method:Dh,request:e},i={channel:Nh,extensionId:this.extensionId,responseId:Hm(),body:t};this.logger.trace(this.platformAuthType+" - Sending request to browser extension"),this.logger.tracePii(this.platformAuthType+` - Sending request to browser extension: ${JSON.stringify(i)}`),this.messageChannel.port1.postMessage(i);const o=await new Promise((e,t)=>{this.resolvers.set(i.responseId,{resolve:e,reject:t})});return this.validatePlatformBrokerResponse(o)}static async createProvider(e,t,i){e.trace("PlatformAuthExtensionHandler - createProvider called.");try{const o=new Zg(e,t,i,Rh);return await o.sendHandshakeRequest(),o}catch(o){const r=new Zg(e,t,i);return await r.sendHandshakeRequest(),r}}async sendHandshakeRequest(){this.logger.trace(this.platformAuthType+" - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:Nh,extensionId:this.extensionId,responseId:Hm(),body:{method:Mh}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=e=>{this.onChannelMessage(e)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new Promise((t,i)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:i}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),i(Ah(rh)),this.handshakeResolvers.delete(e.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(e){if(this.logger.trace(this.platformAuthType+" - onWindowMessage called"),e.source!==window)return;const t=e.data;if(t.channel&&t.channel===Nh&&(!t.extensionId||t.extensionId===this.extensionId)&&t.body.method===Mh){const e=this.handshakeResolvers.get(t.responseId);if(!e)return void this.logger.trace(this.platformAuthType+`.onWindowMessage - resolver can't be found for request ${t.responseId}`);this.logger.verbose(t.extensionId?`Extension with id: ${t.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),e.reject(Ah(nh))}}onChannelMessage(e){this.logger.trace(this.platformAuthType+" - onChannelMessage called.");const t=e.data,i=this.resolvers.get(t.responseId),o=this.handshakeResolvers.get(t.responseId);try{const e=t.body.method;if(e===kh){if(!i)return;const e=t.body.response;if(this.logger.trace(this.platformAuthType+" - Received response from browser extension"),this.logger.tracePii(this.platformAuthType+` - Received response from browser extension: ${JSON.stringify(e)}`),"Success"!==e.status)i.reject(Ug(e.code,e.description,e.ext));else{if(!e.result)throw wa(Ca,"Event does not contain result.");e.result.code&&e.result.description?i.reject(Ug(e.result.code,e.result.description,e.result.ext)):i.resolve(e.result)}this.resolvers.delete(t.responseId)}else if(e===xh){if(!o)return void this.logger.trace(this.platformAuthType+`.onChannelMessage - resolver can't be found for request ${t.responseId}`);clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose(this.platformAuthType+` - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),o.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(t){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${t}`),this.logger.errorPii(`Unable to parse ${e}`),i?i.reject(t):o&&o.reject(t)}}validatePlatformBrokerResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw wa(Ca,"Response missing expected properties.")}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}getExtensionName(){return this.getExtensionId()===Rh?"chrome":this.getExtensionId()?.length?"unknown":void 0}}
|
|
141
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class Jg{constructor(e,t,i){this.logger=e,this.performanceClient=t,this.correlationId=i,this.platformAuthType=vh}static async createProvider(e,t,i){if(e.trace("PlatformAuthDOMHandler: createProvider called"),window.navigator?.platformAuthentication){const o=await window.navigator.platformAuthentication.getSupportedContracts(wh);if(o?.includes(Ph))return e.trace("Platform auth api available in DOM"),new Jg(e,t,i)}}getExtensionId(){return wh}getExtensionVersion(){return""}getExtensionName(){return Sh}async sendMessage(e){this.logger.trace(this.platformAuthType+" - Sending request to browser DOM API");try{const t=this.initializePlatformDOMRequest(e),i=await window.navigator.platformAuthentication.executeGetToken(t);return this.validatePlatformBrokerResponse(i)}catch(e){throw this.logger.error(this.platformAuthType+" - executeGetToken DOM API error"),e}}initializePlatformDOMRequest(e){this.logger.trace(this.platformAuthType+" - initializeNativeDOMRequest called");const{accountId:t,clientId:i,authority:o,scope:r,redirectUri:n,correlationId:a,state:s,storeInCache:l,embeddedClientId:d,extraParameters:c,...u}=e,p=this.getDOMExtraParams(u);return{accountId:t,brokerId:this.getExtensionId(),authority:o,clientId:i,correlationId:a||this.correlationId,extraParameters:{...c,...p},isSecurityTokenService:!1,redirectUri:n,scope:r,state:s,storeInCache:l,embeddedClientId:d}}validatePlatformBrokerResponse(e){if(e.hasOwnProperty("isSuccess")){if(e.hasOwnProperty("accessToken")&&e.hasOwnProperty("idToken")&&e.hasOwnProperty("clientInfo")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scopes")&&e.hasOwnProperty("expiresIn"))return this.logger.trace(this.platformAuthType+" - platform broker returned successful and valid response"),this.convertToPlatformBrokerResponse(e);if(e.hasOwnProperty("error")){const t=e;if(!1===t.isSuccess&&t.error&&t.error.code)throw this.logger.trace(this.platformAuthType+" - platform broker returned error response"),Ug(t.error.code,t.error.description,{error:parseInt(t.error.errorCode),protocol_error:t.error.protocolError,status:t.error.status,properties:t.error.properties})}}throw wa(Ca,"Response missing expected properties.")}convertToPlatformBrokerResponse(e){this.logger.trace(this.platformAuthType+" - convertToNativeResponse called");return{access_token:e.accessToken,id_token:e.idToken,client_info:e.clientInfo,account:e.account,expires_in:e.expiresIn,scope:e.scopes,state:e.state||"",properties:e.properties||{},extendedLifetimeToken:e.extendedLifetimeToken??!1,shr:e.proofOfPossessionPayload}}getDOMExtraParams(e){return{...Object.entries(e).reduce((e,[t,i])=>(e[t]=String(i),e),{})}}}
|
|
142
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function Xg(e,t,i,o){e.trace("getPlatformAuthProvider called",i);const r=function(){let e;try{return e=window[Fh],"true"===e?.getItem(Rf)}catch(e){return!1}}();let n;e.trace("Has client allowed platform auth via DOM API: "+r);try{r&&(n=await Jg.createProvider(e,t,i)),n||(e.trace("Platform auth via DOM API not available, checking for extension"),n=await Zg.createProvider(e,o||2e3,t))}catch(t){e.trace("Platform auth not available",t)}return n}function eT(e,t,i,o){if(t.trace("isPlatformAuthAllowed called"),!e.system.allowPlatformBroker)return t.trace("isPlatformAuthAllowed: allowPlatformBroker is not enabled, returning false"),!1;if(!i)return t.trace("isPlatformAuthAllowed: Platform auth provider is not initialized, returning false"),!1;if(o)switch(o){case na.BEARER:case na.POP:return t.trace("isPlatformAuthAllowed: authenticationScheme is supported, returning true"),!0;default:return t.trace("isPlatformAuthAllowed: authenticationScheme is not supported, returning false"),!1}return!0}
|
|
143
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class tT extends Sg{constructor(e,t,i,o,r,n,a,s,l,d){super(e,t,i,o,r,n,a,l,d),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=s,this.eventHandler=r}acquireToken(e,t){let i;try{if(i={popupName:this.generatePopupName(e.scopes||An,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:e.popupWindowParent??window},this.performanceClient.addFields({isAsyncPopup:this.config.system.asyncPopups},this.correlationId),this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,i,t);{const o={...e,httpMethod:wg(e,this.config.auth.protocolMode)};return this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),i.popup=this.openSizedPopup("about:blank",i),this.acquireTokenPopupAsync(o,i,t)}}catch(e){return Promise.reject(e)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),i={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:e?.popupWindowAttributes||{},popupWindowParent:e?.popupWindowParent??window},o=e&&e.authority,r=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,i,o,r)):(this.logger.verbose("asyncPopup set to false, opening popup"),i.popup=this.openSizedPopup("about:blank",i),this.logoutPopupAsync(t,i,o,r))}catch(e){return Promise.reject(e)}}async acquireTokenPopupAsync(e,t,i){this.logger.verbose("acquireTokenPopupAsync called");const o=await uu(this.initializeAuthorizationRequest.bind(this),hd,this.logger,this.performanceClient,this.correlationId)(e,am.Popup);t.popup&&ff(o.authority);const r=eT(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme);return o.platformBroker=r,this.config.auth.protocolMode===bl?this.executeEarFlow(o,t):this.executeCodeFlow(o,t,i)}async executeCodeFlow(e,t,i){const o=e.correlationId,r=this.initializeServerTelemetryManager(Xh),n=i||await uu(zg,Qd,this.logger,this.performanceClient,o)(this.performanceClient,this.logger,o),a={...e,codeChallenge:n.challenge};try{const i=await uu(this.createAuthCodeClient.bind(this),ud,this.logger,this.performanceClient,o)({serverTelemetryManager:r,requestAuthority:a.authority,requestAzureCloudOptions:a.azureCloudOptions,requestExtraQueryParameters:a.extraQueryParameters,account:a.account});if(a.httpMethod===Tn)return await this.executeCodeFlowWithPost(a,t,i,n.verifier);{const r=await uu(jg,md,this.logger,this.performanceClient,o)(this.config,i.authority,a,this.logger,this.performanceClient),s=this.initiateAuthRequest(r,t);this.eventHandler.emitEvent(fg,am.Popup,{popupWindow:s},null);const l=await this.monitorPopupForHash(s,t.popupWindowParent),d=cu(Pg,wd,this.logger,this.performanceClient,this.correlationId)(l,this.config.auth.OIDCOptions.serverResponseType,this.logger);return await uu(Kg,Id,this.logger,this.performanceClient,o)(e,d,n.verifier,Xh,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}catch(e){throw t.popup?.close(),e instanceof ba&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),e}}async executeEarFlow(e,t){const i=e.correlationId,o=await uu(this.getDiscoveredAuthority.bind(this),Gl,this.logger,this.performanceClient,i)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),r=await uu(Km,ac,this.logger,this.performanceClient,i)(),n={...e,earJwk:r},a=t.popup||this.openPopup("about:blank",t);(await Gg(a.document,this.config,o,n,this.logger,this.performanceClient)).submit();const s=await uu(this.monitorPopupForHash.bind(this),ld,this.logger,this.performanceClient,i)(a,t.popupWindowParent),l=cu(Pg,wd,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return uu(Vg,Ad,this.logger,this.performanceClient,i)(n,l,Xh,this.config,o,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async executeCodeFlowWithPost(e,t,i,o){const r=e.correlationId,n=await uu(this.getDiscoveredAuthority.bind(this),Gl,this.logger,this.performanceClient,r)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),a=t.popup||this.openPopup("about:blank",t);(await Wg(a.document,this.config,n,e,this.logger,this.performanceClient)).submit();const s=await uu(this.monitorPopupForHash.bind(this),ld,this.logger,this.performanceClient,r)(a,t.popupWindowParent),l=cu(Pg,wd,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return uu(Kg,Id,this.logger,this.performanceClient,r)(e,l,o,Xh,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async logoutPopupAsync(e,t,i,o){this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(gg,am.Popup,e);const r=this.initializeServerTelemetryManager(nm);try{await this.clearCacheOnLogout(this.correlationId,e.account);const n=await uu(this.createAuthCodeClient.bind(this),ud,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:i,account:e.account||void 0});try{n.authority.endSessionEndpoint}catch{if(e.account?.homeAccountId&&e.postLogoutRedirectUri&&n.authority.protocolMode===Rl){if(this.eventHandler.emitEvent(Tg,am.Popup,e),o){const e={apiId:nm,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=pl.getAbsoluteUrl(o,df());await this.navigationClient.navigateInternal(t,e)}return void t.popup?.close()}}const a=n.getLogoutUri(e);this.eventHandler.emitEvent(Tg,am.Popup,e);const s=this.openPopup(a,t);if(this.eventHandler.emitEvent(fg,am.Popup,{popupWindow:s},null),await this.monitorPopupForHash(s,t.popupWindowParent).catch(()=>{}),o){const e={apiId:nm,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=pl.getAbsoluteUrl(o,df());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${t}`),await this.navigationClient.navigateInternal(t,e)}else this.logger.verbose("No main window navigation requested")}catch(e){throw t.popup?.close(),e instanceof ba&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),this.eventHandler.emitEvent(Ag,am.Popup,null,e),this.eventHandler.emitEvent(yg,am.Popup),e}this.eventHandler.emitEvent(yg,am.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii(`Navigate to: ${e}`),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),Ah(Ep)}monitorPopupForHash(e,t){return new Promise((t,i)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const o=setInterval(()=>{if(e.closed)return this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(o),void i(Ah(vp));let r="";try{r=e.location.href}catch(e){}if(!r||"about:blank"===r)return;clearInterval(o);let n="";const a=this.config.auth.OIDCOptions.serverResponseType;e&&(n=a===Bn?e.location.search:e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),t(n)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(e,t)})}openPopup(e,t){try{let i;if(t.popup?(i=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),i.location.assign(e)):void 0===t.popup&&(this.logger.verbosePii(`Opening popup window to: ${e}`),i=this.openSizedPopup(e,t)),!i)throw Ah(Pp);return i.focus&&i.focus(),this.currentWindow=i,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),i}catch(e){throw this.logger.error("error opening popup "+e.message),Ah(Sp)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:i,popupWindowParent:o}){const r=o.screenLeft?o.screenLeft:o.screenX,n=o.screenTop?o.screenTop:o.screenY,a=o.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=o.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let l=i.popupSize?.width,d=i.popupSize?.height,c=i.popupPosition?.top,u=i.popupPosition?.left;return(!l||l<0||l>a)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),l=Ih),(!d||d<0||d>s)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),d=_h),(!c||c<0||c>s)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),c=Math.max(0,s/2-_h/2+n)),(!u||u<0||u>a)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),u=Math.max(0,a/2-Ih/2+r)),o.open(e,t,`width=${l}, height=${d}, top=${c}, left=${u}, scrollbars=yes`)}unloadWindow(e){this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e,t){e.close(),t.removeEventListener("beforeunload",this.unloadWindow)}generatePopupName(e,t){return`${Eh}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${Eh}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}
|
|
144
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class iT extends Sg{constructor(e,t,i,o,r,n,a,s,l,d){super(e,t,i,o,r,n,a,l,d),this.nativeStorage=s}async acquireToken(e){const t=await uu(this.initializeAuthorizationRequest.bind(this),hd,this.logger,this.performanceClient,this.correlationId)(e,am.Redirect);t.platformBroker=eT(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme);const i=e=>{e.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.resetRequestCache(),this.eventHandler.emitEvent(Ig,am.Redirect))},o=this.getRedirectStartPage(e.redirectStartPage);this.logger.verbosePii(`Redirect start page: ${o}`),this.browserStorage.setTemporaryCache(Hh,o,!0),window.addEventListener("pageshow",i);try{this.config.auth.protocolMode===bl?await this.executeEarFlow(t):await this.executeCodeFlow(t,e.onRedirectNavigate)}catch(e){throw e instanceof ba&&e.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",i),e}}async executeCodeFlow(e,t){const i=e.correlationId,o=this.initializeServerTelemetryManager(Jh),r=await uu(zg,Qd,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),n={...e,codeChallenge:r.challenge};this.browserStorage.cacheAuthorizeRequest(n,r.verifier);try{if(n.httpMethod===Tn)return await this.executeCodeFlowWithPost(n);{const i=await uu(this.createAuthCodeClient.bind(this),ud,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),r=await uu(jg,md,this.logger,this.performanceClient,e.correlationId)(this.config,i.authority,n,this.logger,this.performanceClient);return await this.initiateAuthRequest(r,t)}}catch(e){throw e instanceof ba&&(e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e)),e}}async executeEarFlow(e){const t=e.correlationId,i=await uu(this.getDiscoveredAuthority.bind(this),Gl,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),o=await uu(Km,ac,this.logger,this.performanceClient,t)(),r={...e,earJwk:o};this.browserStorage.cacheAuthorizeRequest(r);return(await Gg(document,this.config,i,r,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(Ah(mh,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async executeCodeFlowWithPost(e){const t=e.correlationId,i=await uu(this.getDiscoveredAuthority.bind(this),Gl,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});this.browserStorage.cacheAuthorizeRequest(e);return(await Wg(document,this.config,i,e,this.logger,this.performanceClient)).submit(),new Promise((e,t)=>{setTimeout(()=>{t(Ah(mh,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async handleRedirectPromise(e="",t,i,o){const r=this.initializeServerTelemetryManager(tm);try{const[n,a]=this.getRedirectResponse(e||"");if(!n)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.resetRequestCache(),"back_forward"!==function(){if("undefined"==typeof window||void 0===window.performance||"function"!=typeof window.performance.getEntriesByType)return;const e=window.performance.getEntriesByType("navigation"),t=e.length?e[0]:void 0;return t?.type}()?o.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const s=this.browserStorage.getTemporaryCache(Hh,!0)||dn.EMPTY_STRING,l=ul(s);if(l===ul(window.location.href)&&this.config.auth.navigateToLoginRequestUrl){this.logger.verbose("Current page is loginRequestUrl, handling response"),s.indexOf("#")>-1&&function(e){const t=e.split("#");t.shift(),window.location.hash=t.length>0?t.join("#"):""}(s);return await this.handleResponse(n,t,i,r)}if(!this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(n,t,i,r);if(!lf()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(Yh,a,!0);const e={apiId:tm,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let o=!0;if(s&&"null"!==s)this.logger.verbose(`Navigating to loginRequestUrl: ${s}`),o=await this.navigationClient.navigateInternal(s,e);else{const t=function(){const e=new pl(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}();this.browserStorage.setTemporaryCache(Hh,t,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),o=await this.navigationClient.navigateInternal(t,e)}if(!o)return await this.handleResponse(n,t,i,r)}return null}catch(e){throw e instanceof ba&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),e}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(t=this.config.auth.OIDCOptions.serverResponseType===Bn?window.location.search:window.location.hash);let i=dl(t);if(i){try{vg(i,this.browserCrypto,am.Redirect)}catch(e){return e instanceof ba&&this.logger.error(`Interaction type validation failed due to ${e.errorCode}: ${e.errorMessage}`),[null,""]}return sf(window),this.logger.verbose("Hash contains known properties, returning response hash"),[i,t]}const o=this.browserStorage.getTemporaryCache(Yh,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Yh)),o&&(i=dl(o),i)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[i,o]):[null,""]}async handleResponse(e,t,i,o){if(!e.state)throw Ah(Cp);if(e.ear_jwe){const i=await uu(this.getDiscoveredAuthority.bind(this),Gl,this.logger,this.performanceClient,t.correlationId)({requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account});return uu(Vg,Ad,this.logger,this.performanceClient,t.correlationId)(t,e,Jh,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}const r=await uu(this.createAuthCodeClient.bind(this),ud,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:t.authority});return uu(Kg,Id,this.logger,this.performanceClient,t.correlationId)(t,e,i,Jh,this.config,r,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async initiateAuthRequest(e,t){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),e){this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const i={apiId:Jh,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},o=t||this.config.auth.onRedirectNavigate;if("function"==typeof o){this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback");return!1!==o(e)?(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),void await this.navigationClient.navigateExternal(e,i)):void this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation")}return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),void await this.navigationClient.navigateExternal(e,i)}throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),Ah(Ep)}async logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),i=this.initializeServerTelemetryManager(rm);try{this.eventHandler.emitEvent(gg,am.Redirect,e),await this.clearCacheOnLogout(this.correlationId,t.account);const o={apiId:rm,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},r=await uu(this.createAuthCodeClient.bind(this),ud,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:e&&e.authority,requestExtraQueryParameters:e?.extraQueryParameters,account:e&&e.account||void 0});if(r.authority.protocolMode===Rl)try{r.authority.endSessionEndpoint}catch{if(t.account?.homeAccountId)return void this.eventHandler.emitEvent(Tg,am.Redirect,t)}const n=r.getLogoutUri(t);if(this.eventHandler.emitEvent(Tg,am.Redirect,t),!e||"function"!=typeof e.onRedirectNavigate)return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Wh),void await this.navigationClient.navigateExternal(n,o);if(!1!==e.onRedirectNavigate(n))return this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Wh),void await this.navigationClient.navigateExternal(n,o);this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation")}catch(e){throw e instanceof ba&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),this.eventHandler.emitEvent(Ag,am.Redirect,null,e),this.eventHandler.emitEvent(yg,am.Redirect),e}this.eventHandler.emitEvent(yg,am.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return pl.getAbsoluteUrl(t,df())}}
|
|
145
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */async function oT(e,t,i,o,r){if(t.addQueueMeasurement(sd,o),!e)throw i.info("Navigate url is empty"),Ah(Ep);return r?uu(sT,dd,i,t,o)(e,r,t,o):cu(lT,cd,i,t,o)(e)}async function rT(e,t,i,o,r){const n=dT();if(!n.contentDocument)throw"No document associated with iframe!";return(await Wg(n.contentDocument,e,t,i,o,r)).submit(),n}async function nT(e,t,i,o,r){const n=dT();if(!n.contentDocument)throw"No document associated with iframe!";return(await Gg(n.contentDocument,e,t,i,o,r)).submit(),n}async function aT(e,t,i,o,r,n,a){return o.addQueueMeasurement(ld,n),new Promise((o,n)=>{t<If&&r.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${t}ms) than the default (10000ms). This may result in timeouts.`);const s=window.setTimeout(()=>{window.clearInterval(l),n(Ah(Mp))},t),l=window.setInterval(()=>{let t="";const i=e.contentWindow;try{t=i?i.location.href:""}catch(e){}if(!t||"about:blank"===t)return;let r="";i&&(r=a===Bn?i.location.search:i.location.hash),window.clearTimeout(s),window.clearInterval(l),o(r)},i)}).finally(()=>{cu(cT,Wd,r,o,n)(e)})}function sT(e,t,i,o){return i.addQueueMeasurement(dd,o),new Promise((i,o)=>{const r=dT();window.setTimeout(()=>{r?(r.src=e,i(r)):o("Unable to load iframe")},t)})}function lT(e){const t=dT();return t.src=e,t}function dT(){const e=document.createElement("iframe");return e.className="msalSilentIframe",e.style.visibility="hidden",e.style.position="absolute",e.style.width=e.style.height="0",e.style.border="0",e.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(e),e}function cT(e){document.body===e.parentNode&&document.body.removeChild(e)}
|
|
146
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class uT extends Sg{constructor(e,t,i,o,r,n,a,s,l,d,c){super(e,t,i,o,r,n,s,d,c),this.apiId=a,this.nativeStorage=l}async acquireToken(e){this.performanceClient.addQueueMeasurement(Fl,e.correlationId),e.loginHint||e.sid||e.account&&e.account.username||this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");const t={...e};t.prompt?t.prompt!==Dn&&t.prompt!==kn&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${Dn}`),t.prompt=Dn):t.prompt=Dn;const i=await uu(this.initializeAuthorizationRequest.bind(this),hd,this.logger,this.performanceClient,e.correlationId)(t,am.Silent);return i.platformBroker=eT(this.config,this.logger,this.platformAuthProvider,i.authenticationScheme),ff(i.authority),this.config.auth.protocolMode===bl?this.executeEarFlow(i):this.executeCodeFlow(i)}async executeCodeFlow(e){let t;const i=this.initializeServerTelemetryManager(this.apiId);try{return t=await uu(this.createAuthCodeClient.bind(this),ud,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),await uu(this.silentTokenHelper.bind(this),ad,this.logger,this.performanceClient,e.correlationId)(t,e)}catch(o){if(o instanceof ba&&(o.setCorrelationId(this.correlationId),i.cacheFailedRequest(o)),!(t&&o instanceof ba&&o.errorCode===yh))throw o;return this.performanceClient.addFields({retryError:o.errorCode},this.correlationId),await uu(this.silentTokenHelper.bind(this),ad,this.logger,this.performanceClient,this.correlationId)(t,e)}}async executeEarFlow(e){const t=e.correlationId,i=await uu(this.getDiscoveredAuthority.bind(this),Gl,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),o=await uu(Km,ac,this.logger,this.performanceClient,t)(),r={...e,earJwk:o},n=await uu(nT,sd,this.logger,this.performanceClient,t)(this.config,i,r,this.logger,this.performanceClient),a=this.config.auth.OIDCOptions.serverResponseType,s=await uu(aT,ld,this.logger,this.performanceClient,t)(n,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,t,a),l=cu(Pg,wd,this.logger,this.performanceClient,t)(s,a,this.logger);return uu(Vg,Ad,this.logger,this.performanceClient,t)(r,l,this.apiId,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}logout(){return Promise.reject(Ah(Fp))}async silentTokenHelper(e,t){const i=t.correlationId;this.performanceClient.addQueueMeasurement(ad,i);const o=await uu(zg,Qd,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),r={...t,codeChallenge:o.challenge};let n;if(t.httpMethod===Tn)n=await uu(rT,sd,this.logger,this.performanceClient,i)(this.config,e.authority,r,this.logger,this.performanceClient);else{const t=await uu(jg,md,this.logger,this.performanceClient,i)(this.config,e.authority,r,this.logger,this.performanceClient);n=await uu(oT,sd,this.logger,this.performanceClient,i)(t,this.performanceClient,this.logger,i,this.config.system.navigateFrameWait)}const a=this.config.auth.OIDCOptions.serverResponseType,s=await uu(aT,ld,this.logger,this.performanceClient,i)(n,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,i,a),l=cu(Pg,wd,this.logger,this.performanceClient,i)(s,a,this.logger);return uu(Kg,Id,this.logger,this.performanceClient,i)(t,l,o.verifier,this.apiId,this.config,e,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}
|
|
147
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class pT extends Sg{async acquireToken(e){this.performanceClient.addQueueMeasurement(ql,e.correlationId);const t=await uu(Rg,id,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),i={...e,...t};e.redirectUri&&(i.redirectUri=this.getRedirectUri(e.redirectUri));const o=this.initializeServerTelemetryManager(om),r=await this.createRefreshTokenClient({serverTelemetryManager:o,authorityUrl:i.authority,azureCloudOptions:i.azureCloudOptions,account:i.account});return uu(r.acquireTokenByRefreshToken.bind(r),$l,this.logger,this.performanceClient,e.correlationId)(i).catch(e=>{throw e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e),e})}logout(){return Promise.reject(Ah(Fp))}async createRefreshTokenClient(e){const t=await uu(this.getClientConfiguration.bind(this),pd,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new rp(t,this.performanceClient)}}
|
|
148
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class hT{constructor(e,t,i,o){this.isBrowserEnvironment="undefined"!=typeof window,this.config=e,this.storage=t,this.logger=i,this.cryptoObj=o}async loadExternalTokens(e,t,i){if(!this.isBrowserEnvironment)throw Ah(Yp);const o=e.correlationId||Hm(),r=t.id_token?nl(t.id_token,Sm):void 0,n={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},a=e.authority?new wu(wu.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,n,this.logger,e.correlationId||Hm()):void 0,s=await this.loadAccount(e,i.clientInfo||t.client_info||"",o,r,a),l=await this.loadIdToken(t,s.homeAccountId,s.environment,s.realm,o),d=await this.loadAccessToken(e,t,s.homeAccountId,s.environment,s.realm,i,o),c=await this.loadRefreshToken(t,s.homeAccountId,s.environment,o);return this.generateAuthenticationResult(e,{account:s,idToken:l,accessToken:d,refreshToken:c},r,a)}async loadAccount(e,t,i,o,r){if(this.logger.verbose("TokenCache - loading account"),e.account){const t=Fu.createFromAccountInfo(e.account);return await this.storage.setAccount(t,i),t}if(!r||!t&&!o)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),Ah(Zp);const n=Fu.generateHomeAccountId(t,r.authorityType,this.logger,this.cryptoObj,o),a=o?.tid,s=tp(this.storage,r,n,Sm,i,o,t,r.hostnameAndPort,a,void 0,void 0,this.logger);return await this.storage.setAccount(s,i),s}async loadIdToken(e,t,i,o,r){if(!e.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");const n=Au(t,i,e.id_token,this.config.auth.clientId,o);return await this.storage.setIdTokenCredential(n,r),n}async loadAccessToken(e,t,i,o,r,n,a){if(!t.access_token)return this.logger.verbose("TokenCache - no access token found in response"),null;if(!t.expires_in)return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;if(!(t.scope||e.scopes&&e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null;this.logger.verbose("TokenCache - loading access token");const s=t.scope?tl.fromString(t.scope):new tl(e.scopes),l=n.expiresOn||t.expires_in+hu(),d=n.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+hu(),c=yu(i,o,t.access_token,this.config.auth.clientId,r,s.printScopes(),l,d,Sm);return await this.storage.setAccessTokenCredential(c,a),c}async loadRefreshToken(e,t,i,o){if(!e.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");const r=Iu(t,i,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return await this.storage.setRefreshTokenCredential(r,o),r}generateAuthenticationResult(e,t,i,o){let r,n="",a=[],s=null;t?.accessToken&&(n=t.accessToken.secret,a=tl.fromString(t.accessToken.target).asArray(),s=fu(t.accessToken.expiresOn),r=fu(t.accessToken.extendedExpiresOn));const l=t.account;return{authority:o?o.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:a,account:l.getAccountInfo(),idToken:t.idToken?.secret||"",idTokenClaims:i||{},accessToken:n,fromCache:!0,expiresOn:s,correlationId:e.correlationId||"",requestId:"",extExpiresOn:r,familyId:t.refreshToken?.familyId||"",tokenType:t?.accessToken?.tokenType||"",state:e.state||"",cloudGraphHostName:l.cloudGraphHostName||"",msGraphHost:l.msGraphHost||"",fromNativeBroker:!1}}}
|
|
149
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class mT extends op{constructor(e){super(e),this.includeRedirectUri=!1}}
|
|
150
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class fT extends Sg{constructor(e,t,i,o,r,n,a,s,l,d){super(e,t,i,o,r,n,s,l,d),this.apiId=a}async acquireToken(e){if(!e.code)throw Ah(Xp);const t=await uu(this.initializeAuthorizationRequest.bind(this),hd,this.logger,this.performanceClient,e.correlationId)(e,am.Silent),i=this.initializeServerTelemetryManager(this.apiId);try{const o={...t,code:e.code},r=await uu(this.getClientConfiguration.bind(this),pd,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),n=new mT(r);this.logger.verbose("Auth code client created");const a=new Lg(n,this.browserStorage,o,this.logger,this.performanceClient);return await uu(a.handleCodeResponseFromServer.bind(a),gd,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(e){throw e instanceof ba&&(e.setCorrelationId(this.correlationId),i.cacheFailedRequest(e)),e}}logout(){return Promise.reject(Ah(Fp))}}
|
|
151
151
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
152
152
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
153
|
-
function fT(e){const t=e?.idTokenClaims;return t?.tfp||t?.acr?"B2C":t?.tid?"9188040d-6c67-4c5b-b112-36a304b66dad"===t?.tid?"MSA":"AAD":void 0}function gT(e,t){try{pf(e)}catch(e){throw t.end({success:!1},e),e}}class TT{constructor(e){var t,i,o,r;this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new kf(this.logger,this.performanceClient):_s,this.eventHandler=new Og(this.logger),this.browserStorage=this.isBrowserEnvironment?new _g(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler,function(e){const t=e.cloudDiscoveryMetadata;let i;if(t)try{i=JSON.parse(t)}catch(e){throw Js(Fs)}return{canonicalAuthority:e.authority?wu(e.authority):void 0,knownAuthorities:e.knownAuthorities,cloudDiscoveryMetadata:i}}(this.config.auth)):(t=this.config.auth.clientId,i=this.logger,o=this.performanceClient,r=this.eventHandler,new _g(t,{cacheLocation:Fh,cacheRetentionDays:5,temporaryCacheLocation:Fh,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1},_s,i,o,r));const n={cacheLocation:Fh,cacheRetentionDays:5,temporaryCacheLocation:Fh,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new _g(this.config.auth.clientId,n,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler),this.tokenCache=new pT(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}static async createController(e,t){const i=new TT(e);return await i.initialize(t),i}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e,t){if(this.logger.trace("initialize called"),this.initialized)return void this.logger.info("initialize has already been called, exiting early.");if(!this.isBrowserEnvironment)return this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,void this.eventHandler.emitEvent(Qf);const i=e?.correlationId||this.getRequestCorrelationId(),o=this.config.system.allowPlatformBroker,r=this.performanceClient.startMeasurement(od,i);if(this.eventHandler.emitEvent(zf),!t)try{this.logMultipleInstances(r)}catch{}if(await cu(this.browserStorage.initialize.bind(this.browserStorage),rd,this.logger,this.performanceClient,i)(i),o)try{this.platformAuthProvider=await Jg(this.logger,this.performanceClient,i,this.config.system.nativeBrokerHandshakeTimeout)}catch(e){this.logger.verbose(e)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),du(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),Wd,this.logger,this.performanceClient,i)(i)),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(i),this.initialized=!0,this.eventHandler.emitEvent(Qf),r.end({allowPlatformBroker:o,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),uf(this.initialized),this.isBrowserEnvironment){const t=e||"";let i=this.redirectResponse.get(t);return void 0===i?(i=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,i),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),i}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const t=this.browserStorage.getInteractionInProgress()?.type;if(t===Gh)return this.logger.verbose("handleRedirectPromise removing interaction_in_progress flag and returning null after sign-out"),this.browserStorage.setInteractionInProgress(!1),Promise.resolve(null);const i=this.getAllAccounts(),o=this.browserStorage.getCachedNativeRequest(),r=o&&this.platformAuthProvider&&!e;let n,a;this.eventHandler.emitEvent(pg,nm.Redirect);try{if(r&&this.platformAuthProvider){n=this.performanceClient.startMeasurement(Ml,o?.correlationId||""),this.logger.trace("handleRedirectPromise - acquiring token from native platform"),n.add({isPlatformBrokerRequest:!0});const e=new Fg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,em,this.performanceClient,this.platformAuthProvider,o.accountId,this.nativeInternalStorage,o.correlationId);a=cu(e.handleRedirectPromise.bind(e),qd,this.logger,this.performanceClient,n.event.correlationId)(this.performanceClient,n.event.correlationId)}else{const[t,i]=this.browserStorage.getCachedRequest(),o=t.correlationId;n=this.performanceClient.startMeasurement(Ml,o),this.logger.trace("handleRedirectPromise - acquiring token from web flow");const r=this.createRedirectClient(o);a=cu(r.handleRedirectPromise.bind(r),Bd,this.logger,this.performanceClient,n.event.correlationId)(e,t,i,n)}}catch(e){throw this.browserStorage.resetRequestCache(),e}return a.then(e=>{if(e){this.browserStorage.resetRequestCache();i.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(eg,nm.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(og,nm.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),n.end({success:!0,accountType:fT(e.account)})}else n.event.errorCode?n.end({success:!1}):n.discard();return this.eventHandler.emitEvent(hg,nm.Redirect),e}).catch(e=>{this.browserStorage.resetRequestCache();const t=e;throw i.length>0?this.eventHandler.emitEvent(rg,nm.Redirect,null,t):this.eventHandler.emitEvent(tg,nm.Redirect,null,t),this.eventHandler.emitEvent(hg,nm.Redirect),n.end({success:!1},t),e})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const i=this.performanceClient.startMeasurement(Ll,t);i.add({accountType:fT(e.account),scenarioId:e.scenarioId});const o=e.onRedirectNavigate;if(o)e.onRedirectNavigate=e=>{const t="function"==typeof o?o(e):void 0;return i.add({navigateCallbackResult:!1!==t}),i.event=i.end({success:!0})||i.event,t};else{const e=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=t=>{const o="function"==typeof e?e(t):void 0;return i.add({navigateCallbackResult:!1!==o}),i.event=i.end({success:!0})||i.event,o}}const r=this.getAllAccounts().length>0;try{let o;if(hf(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,jh),r?this.eventHandler.emitEvent(ig,nm.Redirect,e):this.eventHandler.emitEvent(Xf,nm.Redirect,e),this.platformAuthProvider&&this.canUsePlatformBroker(e)){o=new Fg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Zh,this.performanceClient,this.platformAuthProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,i).catch(o=>{if(i.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o instanceof xg&&Dg(o)){this.platformAuthProvider=void 0;return this.createRedirectClient(t).acquireToken(e)}if(o instanceof Ku){this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");return this.createRedirectClient(t).acquireToken(e)}throw o})}else{o=this.createRedirectClient(t).acquireToken(e)}return await o}catch(e){throw this.browserStorage.resetRequestCache(),2===i.event.status?this.performanceClient.startMeasurement(Ml,t).end({success:!1},e):i.end({success:!1},e),r?this.eventHandler.emitEvent(rg,nm.Redirect,null,e):this.eventHandler.emitEvent(tg,nm.Redirect,null,e),e}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(vl,t);i.add({scenarioId:e.scenarioId,accountType:fT(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),gT(this.initialized,i),this.browserStorage.setInteractionInProgress(!0,jh)}catch(e){return Promise.reject(e)}const o=this.getAllAccounts();let r;o.length>0?this.eventHandler.emitEvent(ig,nm.Popup,e):this.eventHandler.emitEvent(Xf,nm.Popup,e);const n=this.getPreGeneratedPkceCodes(t);if(this.canUsePlatformBroker(e))i.add({isPlatformBrokerRequest:!0}),r=this.acquireTokenNative({...e,correlationId:t},Jh).then(e=>(i.end({success:!0,accountType:fT(e.account)}),e)).catch(o=>{if(i.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o instanceof xg&&Dg(o)){this.platformAuthProvider=void 0;return this.createPopupClient(t).acquireToken(e,n)}if(o instanceof Ku){this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");return this.createPopupClient(t).acquireToken(e,n)}throw o});else{r=this.createPopupClient(t).acquireToken(e,n)}return r.then(e=>(o.length<this.getAllAccounts().length?this.eventHandler.emitEvent(eg,nm.Popup,e):this.eventHandler.emitEvent(og,nm.Popup,e),i.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:fT(e.account)}),e)).catch(e=>(o.length>0?this.eventHandler.emitEvent(rg,nm.Popup,null,e):this.eventHandler.emitEvent(tg,nm.Popup,null,e),i.end({success:!1},e),Promise.reject(e))).finally(async()=>{this.browserStorage.setInteractionInProgress(!1),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(t)})}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){const t=this.getRequestCorrelationId(e),i={...e,prompt:e.prompt,correlationId:t};let o;if(this.ssoSilentMeasurement=this.performanceClient.startMeasurement(ql,t),this.ssoSilentMeasurement?.add({scenarioId:e.scenarioId,accountType:fT(e.account)}),gT(this.initialized,this.ssoSilentMeasurement),this.ssoSilentMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(ag,nm.Silent,i),this.canUsePlatformBroker(i))this.ssoSilentMeasurement?.add({isPlatformBrokerRequest:!0}),o=this.acquireTokenNative(i,Xh).catch(e=>{if(this.ssoSilentMeasurement?.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e instanceof xg&&Dg(e)){this.platformAuthProvider=void 0;return this.createSilentIframeClient(i.correlationId).acquireToken(i)}throw e});else{o=this.createSilentIframeClient(i.correlationId).acquireToken(i)}return o.then(e=>(this.eventHandler.emitEvent(sg,nm.Silent,e),this.ssoSilentMeasurement?.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:fT(e.account)}),e)).catch(e=>{throw this.eventHandler.emitEvent(lg,nm.Silent,null,e),this.ssoSilentMeasurement?.end({success:!1},e),e}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const i=this.performanceClient.startMeasurement(bl,t);gT(this.initialized,i),this.eventHandler.emitEvent(dg,nm.Silent,e),i.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw Th(eh);if(e.code){const o=e.code;let r=this.hybridAuthCodeResponses.get(o);return r?(this.logger.verbose("Existing acquireTokenByCode request found",t),i.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),r=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(e=>(this.eventHandler.emitEvent(cg,nm.Silent,e),this.hybridAuthCodeResponses.delete(o),i.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:fT(e.account)}),e)).catch(e=>{throw this.hybridAuthCodeResponses.delete(o),this.eventHandler.emitEvent(ug,nm.Silent,null,e),i.end({success:!1},e),e}),this.hybridAuthCodeResponses.set(o,r)),await r}if(e.nativeAccountId){if(this.canUsePlatformBroker(e,e.nativeAccountId)){i.add({isPlatformBrokerRequest:!0});const o=await this.acquireTokenNative({...e,correlationId:t},tm,e.nativeAccountId).catch(e=>{throw e instanceof xg&&Dg(e)&&(this.platformAuthProvider=void 0),i.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e});return i.end({accountType:fT(o.account),success:!0}),o}throw Th(ih)}throw Th(Xp)}catch(e){throw this.eventHandler.emitEvent(ug,nm.Silent,null,e),i.end({success:!1},e),e}}async acquireTokenByCodeAsync(e){this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(Fd,e.correlationId),this.acquireTokenByCodeAsyncMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement);const t=this.createSilentAuthCodeClient(e.correlationId);return await t.acquireToken(e).then(e=>(this.acquireTokenByCodeAsyncMeasurement?.end({success:!0,fromCache:e.fromCache}),e)).catch(e=>{throw this.acquireTokenByCodeAsyncMeasurement?.end({success:!1},e),e}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(Zl,e.correlationId),t){case Tm:case Am:case ym:const t=this.createSilentCacheClient(e.correlationId);return cu(t.acquireToken.bind(t),kl,this.logger,this.performanceClient,e.correlationId)(e);default:throw Is(as)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(wl,e.correlationId),t){case Tm:case ym:case Im:case _m:const t=this.createSilentRefreshClient(e.correlationId);return cu(t.acquireToken.bind(t),Bl,this.logger,this.performanceClient,e.correlationId)(e);default:throw Is(as)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(ed,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return cu(t.acquireToken.bind(t),Ul,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);hf(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,Gh);return this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);pf(this.initialized),this.browserStorage.setInteractionInProgress(!0,Gh);return this.createPopupClient(t).logout(e).finally(()=>{this.browserStorage.setInteractionInProgress(!1)})}catch(e){return Promise.reject(e)}}async clearCache(e){if(!this.isBrowserEnvironment)return void this.logger.info("in non-browser environment, returning early.");const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){const t=this.getRequestCorrelationId();
|
|
153
|
+
function gT(e){const t=e?.idTokenClaims;return t?.tfp||t?.acr?"B2C":t?.tid?"9188040d-6c67-4c5b-b112-36a304b66dad"===t?.tid?"MSA":"AAD":void 0}function TT(e,t){try{hf(e)}catch(e){throw t.end({success:!1},e),e}}class AT{constructor(e){var t,i,o,r;this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new Uf(this.logger,this.performanceClient):Es,this.eventHandler=new Cg(this.logger),this.browserStorage=this.isBrowserEnvironment?new Eg(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler,function(e){const t=e.cloudDiscoveryMetadata;let i;if(t)try{i=JSON.parse(t)}catch(e){throw Xs(Bs)}return{canonicalAuthority:e.authority?Su(e.authority):void 0,knownAuthorities:e.knownAuthorities,cloudDiscoveryMetadata:i}}(this.config.auth)):(t=this.config.auth.clientId,i=this.logger,o=this.performanceClient,r=this.eventHandler,new Eg(t,{cacheLocation:Bh,cacheRetentionDays:5,temporaryCacheLocation:Bh,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1},Es,i,o,r));const n={cacheLocation:Bh,cacheRetentionDays:5,temporaryCacheLocation:Bh,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new Eg(this.config.auth.clientId,n,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler),this.tokenCache=new hT(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}static async createController(e,t){const i=new AT(e);return await i.initialize(t),i}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e,t){if(this.logger.trace("initialize called"),this.initialized)return void this.logger.info("initialize has already been called, exiting early.");if(!this.isBrowserEnvironment)return this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,void this.eventHandler.emitEvent($f);const i=e?.correlationId||this.getRequestCorrelationId(),o=this.config.system.allowPlatformBroker,r=this.performanceClient.startMeasurement(rd,i);if(this.eventHandler.emitEvent(Qf),!t)try{this.logMultipleInstances(r)}catch{}if(await uu(this.browserStorage.initialize.bind(this.browserStorage),nd,this.logger,this.performanceClient,i)(i),o)try{this.platformAuthProvider=await Xg(this.logger,this.performanceClient,i,this.config.system.nativeBrokerHandshakeTimeout)}catch(e){this.logger.verbose(e)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),cu(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),Hd,this.logger,this.performanceClient,i)(i)),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(i),this.initialized=!0,this.eventHandler.emitEvent($f),r.end({allowPlatformBroker:o,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),pf(this.initialized),this.isBrowserEnvironment){const t=e||"";let i=this.redirectResponse.get(t);return void 0===i?(i=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,i),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),i}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const t=this.browserStorage.getInteractionInProgress()?.type;if(t===Wh)return this.logger.verbose("handleRedirectPromise removing interaction_in_progress flag and returning null after sign-out"),this.browserStorage.setInteractionInProgress(!1),Promise.resolve(null);const i=this.getAllAccounts(),o=this.browserStorage.getCachedNativeRequest(),r=o&&this.platformAuthProvider&&!e;let n,a;this.eventHandler.emitEvent(hg,am.Redirect);try{if(r&&this.platformAuthProvider){n=this.performanceClient.startMeasurement(xl,o?.correlationId||""),this.logger.trace("handleRedirectPromise - acquiring token from native platform"),n.add({isPlatformBrokerRequest:!0});const e=new Bg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,tm,this.performanceClient,this.platformAuthProvider,o.accountId,this.nativeInternalStorage,o.correlationId);a=uu(e.handleRedirectPromise.bind(e),jd,this.logger,this.performanceClient,n.event.correlationId)(this.performanceClient,n.event.correlationId)}else{const[t,i]=this.browserStorage.getCachedRequest(),o=t.correlationId;n=this.performanceClient.startMeasurement(xl,o),this.logger.trace("handleRedirectPromise - acquiring token from web flow");const r=this.createRedirectClient(o);a=uu(r.handleRedirectPromise.bind(r),qd,this.logger,this.performanceClient,n.event.correlationId)(e,t,i,n)}}catch(e){throw this.browserStorage.resetRequestCache(),e}return a.then(e=>{if(e){this.browserStorage.resetRequestCache();i.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(tg,am.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(rg,am.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),n.end({success:!0,accountType:gT(e.account)})}else n.event.errorCode?n.end({success:!1}):n.discard();return this.eventHandler.emitEvent(mg,am.Redirect),e}).catch(e=>{this.browserStorage.resetRequestCache();const t=e;throw i.length>0?this.eventHandler.emitEvent(ng,am.Redirect,null,t):this.eventHandler.emitEvent(ig,am.Redirect,null,t),this.eventHandler.emitEvent(mg,am.Redirect),n.end({success:!1},t),e})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const i=this.performanceClient.startMeasurement(Ml,t);i.add({accountType:gT(e.account),scenarioId:e.scenarioId});const o=e.onRedirectNavigate;if(o)e.onRedirectNavigate=e=>{const t="function"==typeof o?o(e):void 0;return i.add({navigateCallbackResult:!1!==t}),i.event=i.end({success:!0})||i.event,t};else{const e=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=t=>{const o="function"==typeof e?e(t):void 0;return i.add({navigateCallbackResult:!1!==o}),i.event=i.end({success:!0})||i.event,o}}const r=this.getAllAccounts().length>0;try{let o;if(mf(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,Gh),r?this.eventHandler.emitEvent(og,am.Redirect,e):this.eventHandler.emitEvent(eg,am.Redirect,e),this.platformAuthProvider&&this.canUsePlatformBroker(e)){o=new Bg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Jh,this.performanceClient,this.platformAuthProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,i).catch(o=>{if(i.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o instanceof Dg&&kg(o)){this.platformAuthProvider=void 0;return this.createRedirectClient(t).acquireToken(e)}if(o instanceof Vu){this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");return this.createRedirectClient(t).acquireToken(e)}throw o})}else{o=this.createRedirectClient(t).acquireToken(e)}return await o}catch(e){throw this.browserStorage.resetRequestCache(),2===i.event.status?this.performanceClient.startMeasurement(xl,t).end({success:!1},e):i.end({success:!1},e),r?this.eventHandler.emitEvent(ng,am.Redirect,null,e):this.eventHandler.emitEvent(ig,am.Redirect,null,e),e}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(Ll,t);i.add({scenarioId:e.scenarioId,accountType:gT(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),TT(this.initialized,i),this.browserStorage.setInteractionInProgress(!0,Gh)}catch(e){return Promise.reject(e)}const o=this.getAllAccounts();let r;o.length>0?this.eventHandler.emitEvent(og,am.Popup,e):this.eventHandler.emitEvent(eg,am.Popup,e);const n=this.getPreGeneratedPkceCodes(t);if(this.canUsePlatformBroker(e))i.add({isPlatformBrokerRequest:!0}),r=this.acquireTokenNative({...e,correlationId:t},Xh).then(e=>(i.end({success:!0,accountType:gT(e.account)}),e)).catch(o=>{if(i.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o instanceof Dg&&kg(o)){this.platformAuthProvider=void 0;return this.createPopupClient(t).acquireToken(e,n)}if(o instanceof Vu){this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");return this.createPopupClient(t).acquireToken(e,n)}throw o});else{r=this.createPopupClient(t).acquireToken(e,n)}return r.then(e=>(o.length<this.getAllAccounts().length?this.eventHandler.emitEvent(tg,am.Popup,e):this.eventHandler.emitEvent(rg,am.Popup,e),i.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:gT(e.account)}),e)).catch(e=>(o.length>0?this.eventHandler.emitEvent(ng,am.Popup,null,e):this.eventHandler.emitEvent(ig,am.Popup,null,e),i.end({success:!1},e),Promise.reject(e))).finally(async()=>{this.browserStorage.setInteractionInProgress(!1),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(t)})}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){const t=this.getRequestCorrelationId(e),i={...e,prompt:e.prompt,correlationId:t};let o;if(this.ssoSilentMeasurement=this.performanceClient.startMeasurement(jl,t),this.ssoSilentMeasurement?.add({scenarioId:e.scenarioId,accountType:gT(e.account)}),TT(this.initialized,this.ssoSilentMeasurement),this.ssoSilentMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(sg,am.Silent,i),this.canUsePlatformBroker(i))this.ssoSilentMeasurement?.add({isPlatformBrokerRequest:!0}),o=this.acquireTokenNative(i,em).catch(e=>{if(this.ssoSilentMeasurement?.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e instanceof Dg&&kg(e)){this.platformAuthProvider=void 0;return this.createSilentIframeClient(i.correlationId).acquireToken(i)}throw e});else{o=this.createSilentIframeClient(i.correlationId).acquireToken(i)}return o.then(e=>(this.eventHandler.emitEvent(lg,am.Silent,e),this.ssoSilentMeasurement?.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:gT(e.account)}),e)).catch(e=>{throw this.eventHandler.emitEvent(dg,am.Silent,null,e),this.ssoSilentMeasurement?.end({success:!1},e),e}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const i=this.performanceClient.startMeasurement(wl,t);TT(this.initialized,i),this.eventHandler.emitEvent(cg,am.Silent,e),i.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw Ah(th);if(e.code){const o=e.code;let r=this.hybridAuthCodeResponses.get(o);return r?(this.logger.verbose("Existing acquireTokenByCode request found",t),i.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),r=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(e=>(this.eventHandler.emitEvent(ug,am.Silent,e),this.hybridAuthCodeResponses.delete(o),i.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:gT(e.account)}),e)).catch(e=>{throw this.hybridAuthCodeResponses.delete(o),this.eventHandler.emitEvent(pg,am.Silent,null,e),i.end({success:!1},e),e}),this.hybridAuthCodeResponses.set(o,r)),await r}if(e.nativeAccountId){if(this.canUsePlatformBroker(e,e.nativeAccountId)){i.add({isPlatformBrokerRequest:!0});const o=await this.acquireTokenNative({...e,correlationId:t},im,e.nativeAccountId).catch(e=>{throw e instanceof Dg&&kg(e)&&(this.platformAuthProvider=void 0),i.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e});return i.end({accountType:gT(o.account),success:!0}),o}throw Ah(oh)}throw Ah(eh)}catch(e){throw this.eventHandler.emitEvent(pg,am.Silent,null,e),i.end({success:!1},e),e}}async acquireTokenByCodeAsync(e){this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(Bd,e.correlationId),this.acquireTokenByCodeAsyncMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement);const t=this.createSilentAuthCodeClient(e.correlationId);return await t.acquireToken(e).then(e=>(this.acquireTokenByCodeAsyncMeasurement?.end({success:!0,fromCache:e.fromCache}),e)).catch(e=>{throw this.acquireTokenByCodeAsyncMeasurement?.end({success:!1},e),e}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(Jl,e.correlationId),t){case Am:case ym:case Im:const t=this.createSilentCacheClient(e.correlationId);return uu(t.acquireToken.bind(t),Ul,this.logger,this.performanceClient,e.correlationId)(e);default:throw _s(ss)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(Sl,e.correlationId),t){case Am:case Im:case _m:case Em:const t=this.createSilentRefreshClient(e.correlationId);return uu(t.acquireToken.bind(t),ql,this.logger,this.performanceClient,e.correlationId)(e);default:throw _s(ss)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(td,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return uu(t.acquireToken.bind(t),Fl,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);mf(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,Wh);return this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);hf(this.initialized),this.browserStorage.setInteractionInProgress(!0,Wh);return this.createPopupClient(t).logout(e).finally(()=>{this.browserStorage.setInteractionInProgress(!1)})}catch(e){return Promise.reject(e)}}async clearCache(e){if(!this.isBrowserEnvironment)return void this.logger.info("in non-browser environment, returning early.");const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){const t=this.getRequestCorrelationId();
|
|
154
154
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
155
155
|
return function(e,t,i,o,r){return e.verbose("getAllAccounts called"),i?t.getAllAccounts(r||{},o):[]}(this.logger,this.browserStorage,this.isBrowserEnvironment,t,e)}getAccount(e){const t=this.getRequestCorrelationId();return function(e,t,i,o){const r=i.getAccountInfoFilteredBy(e,o);return r?(t.verbose("getAccount: Account matching provided filter found, returning"),r):(t.verbose("getAccount: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}getAccountByUsername(e){const t=this.getRequestCorrelationId();return function(e,t,i,o){if(t.trace("getAccountByUsername called"),!e)return t.warning("getAccountByUsername: No username provided"),null;const r=i.getAccountInfoFilteredBy({username:e},o);return r?(t.verbose("getAccountByUsername: Account matching username found, returning"),t.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${e}`),r):(t.verbose("getAccountByUsername: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}getAccountByHomeId(e){const t=this.getRequestCorrelationId();return function(e,t,i,o){if(t.trace("getAccountByHomeId called"),!e)return t.warning("getAccountByHomeId: No homeAccountId provided"),null;const r=i.getAccountInfoFilteredBy({homeAccountId:e},o);return r?(t.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),t.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${e}`),r):(t.verbose("getAccountByHomeId: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}getAccountByLocalId(e){const t=this.getRequestCorrelationId();return function(e,t,i,o){if(t.trace("getAccountByLocalId called"),!e)return t.warning("getAccountByLocalId: No localAccountId provided"),null;const r=i.getAccountInfoFilteredBy({localAccountId:e},o);return r?(t.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),t.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${e}`),r):(t.verbose("getAccountByLocalId: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}setActiveAccount(e){const t=this.getRequestCorrelationId();!function(e,t,i){t.setActiveAccount(e,i)}(e,this.browserStorage,t)}getActiveAccount(){const e=this.getRequestCorrelationId();return function(e,t){return e.getActiveAccount(t)}
|
|
156
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */(this.browserStorage,e)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const i=
|
|
157
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */(e,r);if(t){if(this.activeIframeRequest){if(r!==
|
|
156
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */(this.browserStorage,e)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const i=Fu.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return await this.browserStorage.setAccount(i,e.correlationId),e.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,i,o){if(this.logger.trace("acquireTokenNative called"),!this.platformAuthProvider)throw Ah(ah);return new Bg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.platformAuthProvider,i||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e,o)}canUsePlatformBroker(e,t){if(this.logger.trace("canUsePlatformBroker called"),!this.platformAuthProvider)return this.logger.trace("canUsePlatformBroker: platform broker unavilable, returning false"),!1;if(!eT(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme))return this.logger.trace("canUsePlatformBroker: isBrokerAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case Dn:case xn:case Ln:this.logger.trace("canUsePlatformBroker: prompt is compatible with platform broker flow");break;default:return this.logger.trace(`canUsePlatformBroker: prompt = ${e.prompt} is not compatible with platform broker flow, returning false`),!1}return!(!t&&!this.getNativeAccountId(e))||(this.logger.trace("canUsePlatformBroker: nativeAccountId is not available, returning false"),!1)}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||""}createPopupClient(e){return new tT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createRedirectClient(e){return new iT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentIframeClient(e){return new uT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,em,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentCacheClient(e){return new Fg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentRefreshClient(e){return new pT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentAuthCodeClient(e){return new fT(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,im,this.performanceClient,this.platformAuthProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return uf(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){this.config.cache.cacheLocation===Uh?this.eventHandler.subscribeCrossTab():this.logger.info("Account storage events are only available when cacheLocation is set to localStorage")}disableAccountStorageEvents(){this.config.cache.cacheLocation===Uh?this.eventHandler.unsubscribeCrossTab():this.logger.info("Account storage events are only available when cacheLocation is set to localStorage")}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e?.correlationId?e.correlationId:this.isBrowserEnvironment?Hm():dn.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||mm})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||mm})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(Pl,t);i.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),TT(this.initialized,i),this.logger.verbose("acquireTokenSilent called",t);const o=e.account||this.getActiveAccount();if(!o)throw Ah(Bp);return i.add({accountType:gT(o)}),this.acquireTokenSilentDeduped(e,o,t).then(o=>(i.end({success:!0,fromCache:o.fromCache,accessTokenSize:o.accessToken.length,idTokenSize:o.idToken.length}),{...o,state:e.state,correlationId:t})).catch(e=>{throw e instanceof ba&&e.setCorrelationId(t),i.end({success:!1},e),e})}async acquireTokenSilentDeduped(e,t,i){const o=Lu(this.config.auth.clientId,{...e,authority:e.authority||this.config.auth.authority},t.homeAccountId),r=JSON.stringify(o),n=this.activeSilentTokenRequests.get(r);if(void 0===n){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",i),this.performanceClient.addFields({deduped:!1},i);const o=uu(this.acquireTokenSilentAsync.bind(this),vl,this.logger,this.performanceClient,i)({...e,correlationId:i},t);return this.activeSilentTokenRequests.set(r,o),o.finally(()=>{this.activeSilentTokenRequests.delete(r)})}return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",i),this.performanceClient.addFields({deduped:!0},i),n}async acquireTokenSilentAsync(e,t){const i=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(vl,e.correlationId),this.eventHandler.emitEvent(og,am.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",i);const o=await uu(bg,od,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),r=e.cacheLookupPolicy||Am;return this.acquireTokenSilentNoIframe(o,r).catch(async e=>{const t=function(e,t){const i=!(e instanceof Vu&&e.subError!==Wu),o=e.errorCode===yh||e.errorCode===ss,r=i&&o||e.errorCode===Bu||e.errorCode===ju,n=Cm.includes(t);return r&&n}
|
|
157
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */(e,r);if(t){if(this.activeIframeRequest){if(r!==Om){const[t,i]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${i}`,o.correlationId);const n=this.performanceClient.startMeasurement(Bl,o.correlationId);n.add({awaitIframeCorrelationId:i});const a=await t;if(n.end({success:a}),a)return this.logger.verbose(`Parallel iframe request with correlationId: ${i} succeeded. Retrying cache and/or RT redemption`,o.correlationId),this.acquireTokenSilentNoIframe(o,r);throw this.logger.info(`Iframe request with correlationId: ${i} failed. Interaction is required.`),e}return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",o.correlationId),uu(this.acquireTokenBySilentIframe.bind(this),td,this.logger,this.performanceClient,o.correlationId)(o)}{let e;return this.activeIframeRequest=[new Promise(t=>{e=t}),o.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",o.correlationId),uu(this.acquireTokenBySilentIframe.bind(this),td,this.logger,this.performanceClient,o.correlationId)(o).then(t=>(e(!0),t)).catch(t=>{throw e(!1),t}).finally(()=>{this.activeIframeRequest=void 0})}}throw e}).then(t=>(this.eventHandler.emitEvent(rg,am.Silent,t),e.correlationId&&this.performanceClient.addFields({fromCache:t.fromCache},e.correlationId),t)).catch(e=>{throw this.eventHandler.emitEvent(ng,am.Silent,null,e),e}).finally(()=>{document.removeEventListener("visibilitychange",i)})}async acquireTokenSilentNoIframe(e,t){return eT(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.performanceClient.addFields({isPlatformBrokerRequest:!0},e.correlationId),this.acquireTokenNative(e,om,e.account.nativeAccountId,t).catch(async t=>{if(this.performanceClient.addFields({brokerErrorName:t.name,brokerErrorCode:t.errorCode},e.correlationId),t instanceof Dg&&kg(t))throw this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.platformAuthProvider=void 0,_s(ss);throw t})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),t===ym&&this.logger.verbose("acquireTokenSilent - cache lookup policy set to AccessToken, attempting to acquire token from local cache"),uu(this.acquireTokenFromCache.bind(this),Jl,this.logger,this.performanceClient,e.correlationId)(e,t).catch(i=>{if(t===ym)throw i;return this.eventHandler.emitEvent(ag,am.Silent,e),uu(this.acquireTokenByRefreshToken.bind(this),Sl,this.logger,this.performanceClient,e.correlationId)(e,t)}))}async preGeneratePkceCodes(e){return this.logger.verbose("Generating new PKCE codes"),this.pkceCode=await uu(zg,Qd,this.logger,this.performanceClient,e)(this.performanceClient,this.logger,e),Promise.resolve()}getPreGeneratedPkceCodes(e){this.logger.verbose("Attempting to pick up pre-generated PKCE codes");const t=this.pkceCode?{...this.pkceCode}:void 0;return this.pkceCode=void 0,this.logger.verbose((t?"Found":"Did not find")+" pre-generated PKCE codes"),this.performanceClient.addFields({usePreGeneratedPkce:!!t},e),t}logMultipleInstances(e){const t=this.config.auth.clientId;if(!window)return;window.msal=window.msal||{},window.msal.clientIds=window.msal.clientIds||[];window.msal.clientIds.length>0&&this.logger.verbose("There is already an instance of MSAL.js in the window."),window.msal.clientIds.push(t),function(e,t,i){const o=window.msal?.clientIds||[],r=o.length,n=o.filter(t=>t===e).length;n>1&&i.warning("There is already an instance of MSAL.js in the window with the same client id."),t.add({msalInstanceCount:r,sameClientIdInstanceCount:n})}(t,e,this.logger)}}
|
|
158
158
|
/*! @azure/msal-browser v4.21.1 2025-08-27 */
|
|
159
|
-
class
|
|
160
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */const
|
|
161
|
-
/*! @azure/msal-browser v4.21.1 2025-08-27 */class
|
|
162
|
-
/*! @azure/msal-react v3.0.19 2025-08-19 */const
|
|
159
|
+
class yT{static async createPublicClientApplication(e){const t=await async function(e,t){const i=new Mf(e);return await i.initialize(),AT.createController(i,t)}(e);return new yT(e,t)}constructor(e,t){this.isBroker=!1,this.controller=t||new AT(new Mf(e))}async initialize(e){return this.controller.initialize(e,this.isBroker)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}
|
|
160
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */const IT={initialize:()=>Promise.reject(af(tf)),acquireTokenPopup:()=>Promise.reject(af(tf)),acquireTokenRedirect:()=>Promise.reject(af(tf)),acquireTokenSilent:()=>Promise.reject(af(tf)),acquireTokenByCode:()=>Promise.reject(af(tf)),getAllAccounts:()=>[],getAccount:()=>null,getAccountByHomeId:()=>null,getAccountByUsername:()=>null,getAccountByLocalId:()=>null,handleRedirectPromise:()=>Promise.reject(af(tf)),loginPopup:()=>Promise.reject(af(tf)),loginRedirect:()=>Promise.reject(af(tf)),logout:()=>Promise.reject(af(tf)),logoutRedirect:()=>Promise.reject(af(tf)),logoutPopup:()=>Promise.reject(af(tf)),ssoSilent:()=>Promise.reject(af(tf)),addEventCallback:()=>null,removeEventCallback:()=>{},addPerformanceCallback:()=>"",removePerformanceCallback:()=>!1,enableAccountStorageEvents:()=>{},disableAccountStorageEvents:()=>{},getTokenCache:()=>{throw af(tf)},getLogger:()=>{throw af(tf)},setLogger:()=>{},setActiveAccount:()=>{},getActiveAccount:()=>null,initializeWrapperLibrary:()=>{},setNavigationClient:()=>{},getConfiguration:()=>{throw af(tf)},hydrateCache:()=>Promise.reject(af(tf)),clearCache:()=>Promise.reject(af(tf))};
|
|
161
|
+
/*! @azure/msal-browser v4.21.1 2025-08-27 */class _T{static getInteractionStatusFromEvent(e,t){switch(e.eventType){case eg:return lm;case sg:return um;case og:if(e.interactionType===am.Redirect||e.interactionType===am.Popup)return cm;break;case hg:return pm;case gg:return dm;case lg:case dg:if(t&&t!==um)break;return hm;case yg:if(t&&t!==dm)break;return hm;case mg:if(t&&t!==pm)break;return hm;case tg:case ig:case rg:case ng:case Ig:if(e.interactionType===am.Redirect||e.interactionType===am.Popup){if(t&&t!==lm&&t!==cm)break;return hm}}return null}}
|
|
162
|
+
/*! @azure/msal-react v3.0.19 2025-08-19 */const ET={instance:IT,inProgress:hm,accounts:[],logger:new Cs({})},OT=ce.createContext(ET);
|
|
163
163
|
/*! @azure/msal-react v3.0.19 2025-08-19 */
|
|
164
|
-
function
|
|
165
|
-
/*! @azure/msal-react v3.0.19 2025-08-19 */ET.Consumer;const CT="3.0.19",NT="UNBLOCK_INPROGRESS",RT="EVENT",bT=(e,t)=>{const{type:i,payload:o}=t;let r=e.inProgress;switch(i){case NT:e.inProgress===am&&(r=pm,o.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));break;case RT:const t=o.message,n=IT.getInteractionStatusFromEvent(t,e.inProgress);n&&(o.logger.info(`MsalProvider - ${t.eventType} results in setting inProgress from ${e.inProgress} to ${n}`),r=n);break;default:throw new Error(`Unknown action type: ${i}`)}if(r===am)return e;const n=o.instance.getAllAccounts();return r===e.inProgress||OT(n,e.accounts)?r!==e.inProgress?{...e,inProgress:r}:OT(n,e.accounts)?e:{...e,accounts:n}:{...e,inProgress:r,accounts:n}};function wT({instance:e,children:t}){d.useEffect(()=>{e.initializeWrapperLibrary(mm,CT)},[e]);const i=d.useMemo(()=>e.getLogger().clone("@azure/msal-react",CT),[e]),[o,r]=d.useReducer(bT,void 0,()=>({inProgress:am,accounts:[]}));d.useEffect(()=>{const t=e.addEventCallback(t=>{r({payload:{instance:e,logger:i,message:t},type:RT})});return i.verbose(`MsalProvider - Registered event callback with id: ${t}`),e.initialize().then(()=>{e.handleRedirectPromise().catch(()=>{}).finally(()=>{r({payload:{instance:e,logger:i},type:NT})})}).catch(()=>{}),()=>{t&&(i.verbose(`MsalProvider - Removing event callback ${t}`),e.removeEventCallback(t))}},[e,i]);const n={instance:e,inProgress:o.inProgress,accounts:o.accounts,logger:i};return d.createElement(ET.Provider,{value:n},t)}const PT=e=>{const o=i.useDispatch();let r;"AZURE"===e?.authenticationMethod&&(r=new AT({auth:{clientId:e?.azureConfiguration?.frontEndClientId,authority:`https://login.microsoftonline.com/${e?.azureConfiguration?.tenantId}`,redirectUri:e?.azureConfiguration?.redirectURL}})),le.LicenseInfo.setLicenseKey(e.muiPremiumKey);const n={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||We} #ffffff;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"light",primary:{main:e.appTheme?.light?.primaryColor||We},secondary:{main:e.appTheme?.light?.secondaryColor||He},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},a={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ye} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:e.appTheme?.dark?.primaryColor||Ye},secondary:{main:e.appTheme?.dark?.secondaryColor||Ke}}},c=i.useSelector(e=>e.AppLayout);let u={...n};"dark"===c.themeMode&&(u={...a});const p=s.createTheme({direction:c.appDirection,...u});return d.useEffect(()=>{document.title=e.documentTitle,o(nn.setAppInfo(e));let t={};e.enableAdministrationModule&&(t={...sn}),e.businessCommonStoresMetaData&&(t={...t,...e.businessCommonStoresMetaData}),o(Le(t))},[e]),t.jsx(l.ThemeProvider,{theme:p,children:"AZURE"===e?.authenticationMethod?t.jsx(wT,{instance:r,children:t.jsx(on,{msalInstance:r})}):t.jsx(on,{msalInstance:r})})};var ST={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>©</sup> 2023-2026. All rights reserved.",TREE_HOME_NODE:"Home",TREE_ADMINISTRATION_NODE:"Administration",COMMING_SOON_LABEL:"soon",GRID_ACTION_LABEL:"Actions",TRIAL_LABEL:"trial",SAVE_BTN_LABEL:"Save",SEARCH_BTN_LABEL:"search",RESET_BTN_LABEL:"Reset",CANCEL_BTN_LABEL:"Cancel",DELETE_BTN_LABEL:"Delete",EDIT_BTN_LABEL:"Edit",ADD_BTN_LABEL:"Add",RESET_GRID_STATE:"Clear Grid State",EXPORT_EXECL_LABEL:"Export to excel",CHANGE_ORG_LABEL:"Change Organization",ORG_LABEL:"Organization",VERSION:"V.",COPY_RIGHTS:"Copyright © 2024-2030. All rights reserved.",SUCCESS_MESSAGE:"Your request has been processed successfully",REQUIRED_FIELD:"This field is required",ACTIONS:"Actions",CONFIRMATION:"Confirmation",DELETION_CONFIRMATION_MESSAGE:"Are you sure you want to delete this record ?",ACTION_CONFIRMATION:"Are you sure you want to process this action ?",YES_LABEL:"Yes",NO_LABEL:"No",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"You must at least select on record to process this action on",DEFAULT_LOADING_MESSAGE:"Processing you request ... please wait",SHOW_REPORT_BTN_LABEL:"Show Report",WF_COMMENT_LABEL:"Comment",WF_TAKE_ACTION_BTN_LABEL:"Submit",WF_CANCEL_BTN_LABEL:"Cancel",WE_AVAILABLE_ACTIONS_LABEL:"Available Actions",WE_NEXT_APPROVER_LABEL:"Send To",WF_ACTION_HISTORY_LABEL:"Action History",WF_WAITING_FOR_LABEL:"Waiting For",VIEW_LABEL:"VIEW"},vT={admin:"admin",ORGANIZATION_SINGULAR:"Organization",ORGANIZATION_PLURAL:"Organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"Member",ORGANIZATION_MEMBER_PLURAL:"Members",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"Member Role",ORGANIZATION_MEMBER_ROLE_PLURAL:"Member Roles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"Rank",ORGANIZATION_RANK_PLURAL:"Ranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ROLES:"System Roles",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"Organization Unit",ORGANIZATION_UNIT_PLURAL:"Organization Units",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"Organization uUnit Type",ORGANIZATION_UNIT_TYPE_PLURAL:"Organization Unit Types",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"persons",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"Application",SYSTEM_APPLICATION_PLURAL:"Applications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"Authority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"Authorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME:"Authority Name",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"Application Module",SYSTEM_APPLICATION_MODULE_PLURAL:"Application Modules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_CODE:"Module Code",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"Role",SYSTEM_APPLICATION_ROLE_PLURAL:"Roles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"Application Authority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"Application Authorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"Application Module",ORGANIZATION_APPLICATION_MODULE_PLURAL:"Application Modules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id",PERSON_IS_ACTIVE:"Active"};const LT={...ST,...vT,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"Blueprint",BLUE_PRINT_PLURAL:"Blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"Dashboard",DASHBOARD_PLURAL:"Dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"Dashboard Widget",DASHBOARD_WIDGET_PLURAL:"Dashboard Widgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"Data Query",DATA_QUERY_PLURAL:"Data Queries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"Query Parameter",DATA_QUERY_PARAMETER_PLURAL:"Query Parameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"Excel Uploader Detail",EXCEL_UPLOADER_DETAIL_PLURAL:"Excel Uploader Details",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"Excel Uploader Header",EXCEL_UPLOADER_HEADER_PLURAL:"Excel Uploader Headers",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"Lookup",LOOKUP_PLURAL:"Lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"Mail Attachment",MAIL_ATTACHMENT_PLURAL:"Mail Attachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"Mail Body",MAIL_BODY_PLURAL:"Mail Bodies",MAIL_BODY_BODY_NAME:"Body Name",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"Mail Notification Queue",MAIL_NOTIFICATION_QUEUE_PLURAL:"Mail Notification Queue",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"Mail Recipient",MAIL_RECIPIENT_PLURAL:"Mail Recipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"Mail Template",MAIL_TEMPLATE_PLURAL:"Mail Templates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"Notification",NOTIFICATION_PLURAL:"Notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"Notification Queue",NOTIFICATION_QUEUE_PLURAL:"Notification Queue",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"Report",REPORT_PLURAL:"Reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"Report Parameter",REPORT_PARAMETER_PLURAL:"Report Parameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"User Request",USER_REQUEST_PLURAL:"User Requests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"Workflow Document Action",WORKFLOW_DOCUMENT_ACTION_PLURAL:"Workflow Document Actions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"Workflow Document Action History",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"Workflow Document Action History",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"Workflow Document Action Mail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"Workflow Document Action Mails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"Workflow Document Mail Log",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"Workflow Document Mail Logs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"Workflow Document Status",WORKFLOW_DOCUMENT_STATUS_PLURAL:"Workflow Document Statuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id",ATTACHMENT_ATTACHMENT_CONFIG_ID:"Attachment config id",ATTACHMENT_CONFIG_SINGULAR:"Attachment Configuration",ATTACHMENT_CONFIG_PLURAL:"Attachment Configuration",ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES:"Allowed file types",ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES:"Attachment categories",ATTACHMENT_CONFIG_ATTACHMENT_CODE:"Attachment code",ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY:"Download authority key",ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES:"Max allowed number of files",ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE:"Related database table",ATTACHMENT_CONFIG_STORAGE_TYPE:"Storage type",ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY:"Upload authority key",ATTACHMENT_CONFIG_UPLOAD_DIRECTORY:"Upload directory",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};var MT={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>©</sup> 2023-2026. جميع الحقوق محفوظة.",TREE_HOME_NODE:"الصفحة الرئيسية",TREE_ADMINISTRATION_NODE:"ادارة النظام",COMMING_SOON_LABEL:"قريبا",TRIAL_LABEL:"تجريبي",GRID_ACTION_LABEL:"الاوامر",SAVE_BTN_LABEL:"حفظ",SEARCH_BTN_LABEL:"بحث",RESET_BTN_LABEL:"ازالة البحث",CANCEL_BTN_LABEL:"الغاء",DELETE_BTN_LABEL:"حذف",EDIT_BTN_LABEL:"تعديل",ADD_BTN_LABEL:"اضافة",RESET_GRID_STATE:"مسح حالة الجدول",EXPORT_EXECL_LABEL:"تحميل Execl",CHANGE_ORG_LABEL:"تغير المنظومة",ORG_LABEL:"المنظومة",VERSION:"رقم الاصدار",COPY_RIGHTS:"جميع الحقوق محفوظة © 2024-2030",SUCCESS_MESSAGE:"تم تنفيذ طلبك بنجاح",REQUIRED_FIELD:"هذه الخانة مطلوبة",ACTIONS:"الاوامر",CONFIRMATION:"تأكيد",DELETION_CONFIRMATION_MESSAGE:"هل انت متأكد من حذف هذا البيان؟",ACTION_CONFIRMATION:"هل انت متأكد من تنفيذ هذه العملية؟",YES_LABEL:"نعم",NO_LABEL:"لا",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"يجب ان تختار علي الاقل بند واحد لتنقيذ هذه العملية",DEFAULT_LOADING_MESSAGE:"جاري تنفيذ طلبك ...برجاء الانتظار",SHOW_REPORT_BTN_LABEL:"عرض التقرير",WF_COMMENT_LABEL:"التعليق",WF_TAKE_ACTION_BTN_LABEL:"ارسل",WF_CANCEL_BTN_LABEL:"الغاء",WE_AVAILABLE_ACTIONS_LABEL:"القرارات المتاحة",WE_NEXT_APPROVER_LABEL:"ارسل الي",WF_ACTION_HISTORY_LABEL:"تاريخ القرارات",WF_WAITING_FOR_LABEL:"في انتظار",VIEW_LABEL:"عرض"},xT={admin:"admin",ORGANIZATION_SINGULAR:"organization",ORGANIZATION_PLURAL:"organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"organizationmember",ORGANIZATION_MEMBER_PLURAL:"organizationmembers",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"organizationmemberrole",ORGANIZATION_MEMBER_ROLE_PLURAL:"organizationmemberroles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"organizationrank",ORGANIZATION_RANK_PLURAL:"organizationranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"organizationunit",ORGANIZATION_UNIT_PLURAL:"organizationunits",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"organizationunittype",ORGANIZATION_UNIT_TYPE_PLURAL:"organizationunittypes",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"المستخدمين",ROLES:"الصلاحيات",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"systemapplication",SYSTEM_APPLICATION_PLURAL:"systemapplications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"systemapplicationauthority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"systemapplicationauthorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"systemapplicationmodule",SYSTEM_APPLICATION_MODULE_PLURAL:"systemapplicationmodules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"systemapplicationrole",SYSTEM_APPLICATION_ROLE_PLURAL:"systemapplicationroles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"systemapplicationroleauthority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"systemapplicationroleauthorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"organizationapplicationmodule",ORGANIZATION_APPLICATION_MODULE_PLURAL:"organizationapplicationmodules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id"};const DT={...MT,...xT,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"blueprint",BLUE_PRINT_PLURAL:"blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"Dashboard",DASHBOARD_PLURAL:"Dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"dashboardwidget",DASHBOARD_WIDGET_PLURAL:"dashboardwidgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"dataquery",DATA_QUERY_PLURAL:"dataqueries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"dataqueryparameter",DATA_QUERY_PARAMETER_PLURAL:"dataqueryparameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"exceluploaderdetail",EXCEL_UPLOADER_DETAIL_PLURAL:"exceluploaderdetails",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"exceluploaderheader",EXCEL_UPLOADER_HEADER_PLURAL:"exceluploaderheaders",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"lookup",LOOKUP_PLURAL:"lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"mailattachment",MAIL_ATTACHMENT_PLURAL:"mailattachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"mailbody",MAIL_BODY_PLURAL:"mailbodies",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"mailnotificationqueue",MAIL_NOTIFICATION_QUEUE_PLURAL:"mailnotificationqueues",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"mailrecipient",MAIL_RECIPIENT_PLURAL:"mailrecipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"mailtemplate",MAIL_TEMPLATE_PLURAL:"mailtemplates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"notification",NOTIFICATION_PLURAL:"notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"notificationqueue",NOTIFICATION_QUEUE_PLURAL:"notificationqueues",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"report",REPORT_PLURAL:"reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"reportparameter",REPORT_PARAMETER_PLURAL:"reportparameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"userrequest",USER_REQUEST_PLURAL:"userrequests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"workflowdocumentaction",WORKFLOW_DOCUMENT_ACTION_PLURAL:"workflowdocumentactions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"workflowdocumentactionhistory",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"workflowdocumentactionhistories",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"workflowdocumentactionmail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"workflowdocumentactionmails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"workflowdocumentmaillog",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"workflowdocumentmaillogs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"workflowdocumentstatus",WORKFLOW_DOCUMENT_STATUS_PLURAL:"workflowdocumentstatuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id",ATTACHMENT_ATTACHMENT_CONFIG_ID:"Attachment config id",ATTACHMENT_CONFIG_SINGULAR:"Attachment Configuration",ATTACHMENT_CONFIG_PLURAL:"Attachment Configuration",ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES:"Allowed file types",ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES:"Attachment categories",ATTACHMENT_CONFIG_ATTACHMENT_CODE:"Attachment code",ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY:"Download authority key",ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES:"Max allowed number of files",ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE:"Related database table",ATTACHMENT_CONFIG_STORAGE_TYPE:"Storage type",ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY:"Upload authority key",ATTACHMENT_CONFIG_UPLOAD_DIRECTORY:"Upload directory",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};o.library.add(r.fab),o.library.add(n.far),o.library.add(a.fas);Object.defineProperty(exports,"DataGridPremium",{enumerable:!0,get:function(){return e.DataGridPremium}}),Object.defineProperty(exports,"useDispatch",{enumerable:!0,get:function(){return i.useDispatch}}),Object.defineProperty(exports,"useSelector",{enumerable:!0,get:function(){return i.useSelector}}),Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return m.FontAwesomeIcon}}),Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return g.toast}}),exports.axios=T,Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:function(){return y.useTranslation}}),Object.defineProperty(exports,"useForm",{enumerable:!0,get:function(){return I.useForm}}),Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:function(){return _.useNavigate}}),Object.defineProperty(exports,"useParams",{enumerable:!0,get:function(){return _.useParams}}),Object.defineProperty(exports,"zodResolver",{enumerable:!0,get:function(){return E.zodResolver}}),exports.z=ue,exports.AttachmentCard=Ao,exports.AttachmentImageViewer=To,exports.AttachmentPanel=yo,exports.BaseApp=e=>{const[o,r]=d.useState({AppLayout:Te,UserSession:Ne,loadingMask:_e,commonStores:Me,SideBar:Xo,AppInfo:an}),n=f.configureStore({reducer:o}),[a,s]=d.useState(!1);return d.useEffect(()=>{(()=>{const t={AppLayout:Te,UserSession:Ne,loadingMask:_e,commonStores:Me,SideBar:Xo,AppInfo:an,...e?.businessReduxReducers};r(e=>({...t}));const i={en:{translation:{...LT,...e?.businessLocals?.en}},ar:{translation:{...DT,...e?.businessLocals?.ar}}};A.use(y.initReactI18next).init({resources:i,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),s(!0)})()},[e]),a?t.jsx(i.Provider,{store:n,children:t.jsx(PT,{...e})}):t.jsx(t.Fragment,{})},exports.CheckBox=Be,exports.ComboBox=qe,exports.DARK_THEME_INITIAL_MAIN_COLOR=Ye,exports.DARK_THEME_INITIAL_SECANDARY_COLOR=Ke,exports.DATE_FORMAT=je,exports.DATE_TIME_FORMAT=Ge,exports.DashboardRouteView=zo,exports.DashboardViewer=Vo,exports.Datefield=Ve,exports.DatetimeField=ze,exports.ExcelReportViewer=Mo,exports.FormElement=mo,exports.LIGHT_THEME_INITIAL_MAIN_COLOR=We,exports.LIGHT_THEME_INITIAL_SECANDARY_COLOR=He,exports.ReportViewer=Do,exports.SystemLookupCombobox=Qe,exports.TemplateBarChart=Bo,exports.TemplateDataCard=qo,exports.TemplateForm=Uo,exports.TemplateGauge=jo,exports.TemplateGrid=vo,exports.TemplateLineChart=Go,exports.TemplateLineProgress=Ho,exports.TemplatePieChart=Yo,exports.TemplateTextField=De,exports.TransferList=Fe,exports.WorkflowDocumentPanel=ko,exports.WorkflowDocumentTimeLine=Io,exports.WorkflowRouteComponent=Fo,exports.capitalizeFirstLetter=uo,exports.constructGridColumnsFromFields=it,exports.constructValidationSchema=ot,exports.formatDate=(e,t)=>t?x(e).format(t):x(e).format(je),exports.getAllFields=tt,exports.getElementFields=et,exports.getGridSelection=rt,exports.hasDigitsOnly=function(e){return/^\d+$/.test(e)},exports.isNumber=lo,exports.isNumeric=co,exports.isValidEmail=po,exports.parseStringToDate=(e,t)=>t?x(e,t).toDate():x(e,je).toDate(),exports.timeAgo=ho,exports.useApiActions=xe,exports.useAxios=Re,exports.useConfirmationWindow=be,exports.useIsMobile=pe,exports.useLoadingMask=Ee,exports.useSession=we,exports.useWindow=Pe,Object.keys(s).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return s[e]}})}),Object.keys(B).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return B[e]}})}),Object.keys(q).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return q[e]}})});
|
|
164
|
+
function CT(e,t){if(e.length!==t.length)return!1;const i=[...t];return e.every(e=>{const t=i.shift();return!(!e||!t)&&(e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username)})}
|
|
165
|
+
/*! @azure/msal-react v3.0.19 2025-08-19 */OT.Consumer;const NT="3.0.19",RT="UNBLOCK_INPROGRESS",bT="EVENT",wT=(e,t)=>{const{type:i,payload:o}=t;let r=e.inProgress;switch(i){case RT:e.inProgress===sm&&(r=hm,o.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));break;case bT:const t=o.message,n=_T.getInteractionStatusFromEvent(t,e.inProgress);n&&(o.logger.info(`MsalProvider - ${t.eventType} results in setting inProgress from ${e.inProgress} to ${n}`),r=n);break;default:throw new Error(`Unknown action type: ${i}`)}if(r===sm)return e;const n=o.instance.getAllAccounts();return r===e.inProgress||CT(n,e.accounts)?r!==e.inProgress?{...e,inProgress:r}:CT(n,e.accounts)?e:{...e,accounts:n}:{...e,inProgress:r,accounts:n}};function ST({instance:e,children:t}){d.useEffect(()=>{e.initializeWrapperLibrary(fm,NT)},[e]);const i=d.useMemo(()=>e.getLogger().clone("@azure/msal-react",NT),[e]),[o,r]=d.useReducer(wT,void 0,()=>({inProgress:sm,accounts:[]}));d.useEffect(()=>{const t=e.addEventCallback(t=>{r({payload:{instance:e,logger:i,message:t},type:bT})});return i.verbose(`MsalProvider - Registered event callback with id: ${t}`),e.initialize().then(()=>{e.handleRedirectPromise().catch(()=>{}).finally(()=>{r({payload:{instance:e,logger:i},type:RT})})}).catch(()=>{}),()=>{t&&(i.verbose(`MsalProvider - Removing event callback ${t}`),e.removeEventCallback(t))}},[e,i]);const n={instance:e,inProgress:o.inProgress,accounts:o.accounts,logger:i};return d.createElement(OT.Provider,{value:n},t)}const PT=e=>{const o=i.useDispatch();let r;"AZURE"===e?.authenticationMethod&&(r=new yT({auth:{clientId:e?.azureConfiguration?.frontEndClientId,authority:`https://login.microsoftonline.com/${e?.azureConfiguration?.tenantId}`,redirectUri:e?.azureConfiguration?.redirectURL}})),le.LicenseInfo.setLicenseKey(e.muiPremiumKey);const n={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.light?.primaryColor||We} #ffffff;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"light",primary:{main:e.appTheme?.light?.primaryColor||We},secondary:{main:e.appTheme?.light?.secondaryColor||He},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},a={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${e.appTheme?.dark?.primaryColor||Ye} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:e.appTheme?.dark?.primaryColor||Ye},secondary:{main:e.appTheme?.dark?.secondaryColor||Ke}}},c=i.useSelector(e=>e.AppLayout);let u={...n};"dark"===c.themeMode&&(u={...a});const p=s.createTheme({direction:c.appDirection,...u});return d.useEffect(()=>{document.title=e.documentTitle,o(an.setAppInfo(e));let t={};e.enableAdministrationModule&&(t={...ln}),e.businessCommonStoresMetaData&&(t={...t,...e.businessCommonStoresMetaData}),o(Le(t))},[e]),t.jsx(l.ThemeProvider,{theme:p,children:"AZURE"===e?.authenticationMethod?t.jsx(ST,{instance:r,children:t.jsx(rn,{msalInstance:r})}):t.jsx(rn,{msalInstance:r})})};var vT={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>©</sup> 2023-2026. All rights reserved.",TREE_HOME_NODE:"Home",TREE_ADMINISTRATION_NODE:"Administration",COMMING_SOON_LABEL:"soon",GRID_ACTION_LABEL:"Actions",TRIAL_LABEL:"trial",SAVE_BTN_LABEL:"Save",SEARCH_BTN_LABEL:"search",RESET_BTN_LABEL:"Reset",CANCEL_BTN_LABEL:"Cancel",DELETE_BTN_LABEL:"Delete",EDIT_BTN_LABEL:"Edit",ADD_BTN_LABEL:"Add",RESET_GRID_STATE:"Clear Grid State",EXPORT_EXECL_LABEL:"Export to excel",CHANGE_ORG_LABEL:"Change Organization",ORG_LABEL:"Organization",VERSION:"V.",COPY_RIGHTS:"Copyright © 2024-2030. All rights reserved.",SUCCESS_MESSAGE:"Your request has been processed successfully",REQUIRED_FIELD:"This field is required",ACTIONS:"Actions",CONFIRMATION:"Confirmation",DELETION_CONFIRMATION_MESSAGE:"Are you sure you want to delete this record ?",ACTION_CONFIRMATION:"Are you sure you want to process this action ?",YES_LABEL:"Yes",NO_LABEL:"No",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"You must at least select on record to process this action on",DEFAULT_LOADING_MESSAGE:"Processing you request ... please wait",SHOW_REPORT_BTN_LABEL:"Show Report",WF_COMMENT_LABEL:"Comment",WF_TAKE_ACTION_BTN_LABEL:"Submit",WF_CANCEL_BTN_LABEL:"Cancel",WE_AVAILABLE_ACTIONS_LABEL:"Available Actions",WE_NEXT_APPROVER_LABEL:"Send To",WF_ACTION_HISTORY_LABEL:"Action History",WF_WAITING_FOR_LABEL:"Waiting For",VIEW_LABEL:"VIEW"},LT={admin:"admin",ORGANIZATION_SINGULAR:"Organization",ORGANIZATION_PLURAL:"Organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"Member",ORGANIZATION_MEMBER_PLURAL:"Members",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"Member Role",ORGANIZATION_MEMBER_ROLE_PLURAL:"Member Roles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"Rank",ORGANIZATION_RANK_PLURAL:"Ranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ROLES:"System Roles",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"Organization Unit",ORGANIZATION_UNIT_PLURAL:"Organization Units",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"Organization uUnit Type",ORGANIZATION_UNIT_TYPE_PLURAL:"Organization Unit Types",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"persons",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"Application",SYSTEM_APPLICATION_PLURAL:"Applications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"Authority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"Authorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME:"Authority Name",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"Application Module",SYSTEM_APPLICATION_MODULE_PLURAL:"Application Modules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_CODE:"Module Code",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"Role",SYSTEM_APPLICATION_ROLE_PLURAL:"Roles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"Application Authority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"Application Authorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"Application Module",ORGANIZATION_APPLICATION_MODULE_PLURAL:"Application Modules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id",PERSON_IS_ACTIVE:"Active"};const MT={...vT,...LT,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"Blueprint",BLUE_PRINT_PLURAL:"Blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"Dashboard",DASHBOARD_PLURAL:"Dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"Dashboard Widget",DASHBOARD_WIDGET_PLURAL:"Dashboard Widgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"Data Query",DATA_QUERY_PLURAL:"Data Queries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"Query Parameter",DATA_QUERY_PARAMETER_PLURAL:"Query Parameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"Excel Uploader Detail",EXCEL_UPLOADER_DETAIL_PLURAL:"Excel Uploader Details",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"Excel Uploader Header",EXCEL_UPLOADER_HEADER_PLURAL:"Excel Uploader Headers",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"Lookup",LOOKUP_PLURAL:"Lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"Mail Attachment",MAIL_ATTACHMENT_PLURAL:"Mail Attachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"Mail Body",MAIL_BODY_PLURAL:"Mail Bodies",MAIL_BODY_BODY_NAME:"Body Name",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"Mail Notification Queue",MAIL_NOTIFICATION_QUEUE_PLURAL:"Mail Notification Queue",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"Mail Recipient",MAIL_RECIPIENT_PLURAL:"Mail Recipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"Mail Template",MAIL_TEMPLATE_PLURAL:"Mail Templates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"Notification",NOTIFICATION_PLURAL:"Notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"Notification Queue",NOTIFICATION_QUEUE_PLURAL:"Notification Queue",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"Report",REPORT_PLURAL:"Reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"Report Parameter",REPORT_PARAMETER_PLURAL:"Report Parameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"User Request",USER_REQUEST_PLURAL:"User Requests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"Workflow Document Action",WORKFLOW_DOCUMENT_ACTION_PLURAL:"Workflow Document Actions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"Workflow Document Action History",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"Workflow Document Action History",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"Workflow Document Action Mail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"Workflow Document Action Mails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"Workflow Document Mail Log",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"Workflow Document Mail Logs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"Workflow Document Status",WORKFLOW_DOCUMENT_STATUS_PLURAL:"Workflow Document Statuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id",ATTACHMENT_ATTACHMENT_CONFIG_ID:"Attachment config id",ATTACHMENT_CONFIG_SINGULAR:"Attachment Configuration",ATTACHMENT_CONFIG_PLURAL:"Attachment Configuration",ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES:"Allowed file types",ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES:"Attachment categories",ATTACHMENT_CONFIG_ATTACHMENT_CODE:"Attachment code",ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY:"Download authority key",ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES:"Max allowed number of files",ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE:"Related database table",ATTACHMENT_CONFIG_STORAGE_TYPE:"Storage type",ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY:"Upload authority key",ATTACHMENT_CONFIG_UPLOAD_DIRECTORY:"Upload directory",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};var xT={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>©</sup> 2023-2026. جميع الحقوق محفوظة.",TREE_HOME_NODE:"الصفحة الرئيسية",TREE_ADMINISTRATION_NODE:"ادارة النظام",COMMING_SOON_LABEL:"قريبا",TRIAL_LABEL:"تجريبي",GRID_ACTION_LABEL:"الاوامر",SAVE_BTN_LABEL:"حفظ",SEARCH_BTN_LABEL:"بحث",RESET_BTN_LABEL:"ازالة البحث",CANCEL_BTN_LABEL:"الغاء",DELETE_BTN_LABEL:"حذف",EDIT_BTN_LABEL:"تعديل",ADD_BTN_LABEL:"اضافة",RESET_GRID_STATE:"مسح حالة الجدول",EXPORT_EXECL_LABEL:"تحميل Execl",CHANGE_ORG_LABEL:"تغير المنظومة",ORG_LABEL:"المنظومة",VERSION:"رقم الاصدار",COPY_RIGHTS:"جميع الحقوق محفوظة © 2024-2030",SUCCESS_MESSAGE:"تم تنفيذ طلبك بنجاح",REQUIRED_FIELD:"هذه الخانة مطلوبة",ACTIONS:"الاوامر",CONFIRMATION:"تأكيد",DELETION_CONFIRMATION_MESSAGE:"هل انت متأكد من حذف هذا البيان؟",ACTION_CONFIRMATION:"هل انت متأكد من تنفيذ هذه العملية؟",YES_LABEL:"نعم",NO_LABEL:"لا",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"يجب ان تختار علي الاقل بند واحد لتنقيذ هذه العملية",DEFAULT_LOADING_MESSAGE:"جاري تنفيذ طلبك ...برجاء الانتظار",SHOW_REPORT_BTN_LABEL:"عرض التقرير",WF_COMMENT_LABEL:"التعليق",WF_TAKE_ACTION_BTN_LABEL:"ارسل",WF_CANCEL_BTN_LABEL:"الغاء",WE_AVAILABLE_ACTIONS_LABEL:"القرارات المتاحة",WE_NEXT_APPROVER_LABEL:"ارسل الي",WF_ACTION_HISTORY_LABEL:"تاريخ القرارات",WF_WAITING_FOR_LABEL:"في انتظار",VIEW_LABEL:"عرض"},DT={admin:"admin",ORGANIZATION_SINGULAR:"organization",ORGANIZATION_PLURAL:"organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"organizationmember",ORGANIZATION_MEMBER_PLURAL:"organizationmembers",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"organizationmemberrole",ORGANIZATION_MEMBER_ROLE_PLURAL:"organizationmemberroles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"organizationrank",ORGANIZATION_RANK_PLURAL:"organizationranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"organizationunit",ORGANIZATION_UNIT_PLURAL:"organizationunits",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"organizationunittype",ORGANIZATION_UNIT_TYPE_PLURAL:"organizationunittypes",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"المستخدمين",ROLES:"الصلاحيات",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"systemapplication",SYSTEM_APPLICATION_PLURAL:"systemapplications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"systemapplicationauthority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"systemapplicationauthorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"systemapplicationmodule",SYSTEM_APPLICATION_MODULE_PLURAL:"systemapplicationmodules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"systemapplicationrole",SYSTEM_APPLICATION_ROLE_PLURAL:"systemapplicationroles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"systemapplicationroleauthority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"systemapplicationroleauthorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"organizationapplicationmodule",ORGANIZATION_APPLICATION_MODULE_PLURAL:"organizationapplicationmodules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id"};const kT={...xT,...DT,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"blueprint",BLUE_PRINT_PLURAL:"blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"Dashboard",DASHBOARD_PLURAL:"Dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"dashboardwidget",DASHBOARD_WIDGET_PLURAL:"dashboardwidgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"dataquery",DATA_QUERY_PLURAL:"dataqueries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"dataqueryparameter",DATA_QUERY_PARAMETER_PLURAL:"dataqueryparameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"exceluploaderdetail",EXCEL_UPLOADER_DETAIL_PLURAL:"exceluploaderdetails",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"exceluploaderheader",EXCEL_UPLOADER_HEADER_PLURAL:"exceluploaderheaders",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"lookup",LOOKUP_PLURAL:"lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"mailattachment",MAIL_ATTACHMENT_PLURAL:"mailattachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"mailbody",MAIL_BODY_PLURAL:"mailbodies",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"mailnotificationqueue",MAIL_NOTIFICATION_QUEUE_PLURAL:"mailnotificationqueues",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"mailrecipient",MAIL_RECIPIENT_PLURAL:"mailrecipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"mailtemplate",MAIL_TEMPLATE_PLURAL:"mailtemplates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"notification",NOTIFICATION_PLURAL:"notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"notificationqueue",NOTIFICATION_QUEUE_PLURAL:"notificationqueues",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"report",REPORT_PLURAL:"reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"reportparameter",REPORT_PARAMETER_PLURAL:"reportparameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"userrequest",USER_REQUEST_PLURAL:"userrequests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"workflowdocumentaction",WORKFLOW_DOCUMENT_ACTION_PLURAL:"workflowdocumentactions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"workflowdocumentactionhistory",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"workflowdocumentactionhistories",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"workflowdocumentactionmail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"workflowdocumentactionmails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"workflowdocumentmaillog",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"workflowdocumentmaillogs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"workflowdocumentstatus",WORKFLOW_DOCUMENT_STATUS_PLURAL:"workflowdocumentstatuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id",ATTACHMENT_ATTACHMENT_CONFIG_ID:"Attachment config id",ATTACHMENT_CONFIG_SINGULAR:"Attachment Configuration",ATTACHMENT_CONFIG_PLURAL:"Attachment Configuration",ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES:"Allowed file types",ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES:"Attachment categories",ATTACHMENT_CONFIG_ATTACHMENT_CODE:"Attachment code",ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY:"Download authority key",ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES:"Max allowed number of files",ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE:"Related database table",ATTACHMENT_CONFIG_STORAGE_TYPE:"Storage type",ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY:"Upload authority key",ATTACHMENT_CONFIG_UPLOAD_DIRECTORY:"Upload directory",NOTIFICATION_IS_ACTIVE:"Is active",NOTIFICATION_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_AUTHORITY_TO_NOTIFY:"Authority to notify",NOTIFICATION_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_NOTIFICATION_TEXT_COLOR:"Notification text color",NOTIFICATION_ORGANIZATION_ID_FIELD:"Organization id field",NOTIFICATION_QUEUE_SYSTEM_APPLICATION_ID:"System application id",NOTIFICATION_QUEUE_NOTIFICATION_ACTION:"Notification action",NOTIFICATION_QUEUE_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_QUEUE_NOTIFICATION_AR_TEXT:"Notification ar text",NOTIFICATION_QUEUE_NOTIFICATION_EN_TEXT:"Notification en text",NOTIFICATION_QUEUE_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_QUEUE_NOTIFICATION_ICON_COLOR:"Notification icon color",NOTIFICATION_QUEUE_NOTIFICATION_ID:"Notification id",NOTIFICATION_QUEUE_NOTIFICATION_TEXT_COLOR:"Notification text color"}};o.library.add(r.fab),o.library.add(n.far),o.library.add(a.fas);Object.defineProperty(exports,"DataGridPremium",{enumerable:!0,get:function(){return e.DataGridPremium}}),Object.defineProperty(exports,"useDispatch",{enumerable:!0,get:function(){return i.useDispatch}}),Object.defineProperty(exports,"useSelector",{enumerable:!0,get:function(){return i.useSelector}}),Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return m.FontAwesomeIcon}}),Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return g.toast}}),exports.axios=T,Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:function(){return y.useTranslation}}),Object.defineProperty(exports,"useForm",{enumerable:!0,get:function(){return I.useForm}}),Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:function(){return _.useNavigate}}),Object.defineProperty(exports,"useParams",{enumerable:!0,get:function(){return _.useParams}}),Object.defineProperty(exports,"zodResolver",{enumerable:!0,get:function(){return E.zodResolver}}),exports.z=ue,exports.AttachmentCard=Ao,exports.AttachmentImageViewer=To,exports.AttachmentPanel=yo,exports.BaseApp=e=>{const[o,r]=d.useState({AppLayout:Te,UserSession:Ne,loadingMask:_e,commonStores:Me,SideBar:Xo,AppInfo:sn}),n=f.configureStore({reducer:o}),[a,s]=d.useState(!1);return d.useEffect(()=>{(()=>{const t={AppLayout:Te,UserSession:Ne,loadingMask:_e,commonStores:Me,SideBar:Xo,AppInfo:sn,...e?.businessReduxReducers};r(e=>({...t}));const i={en:{translation:{...MT,...e?.businessLocals?.en}},ar:{translation:{...kT,...e?.businessLocals?.ar}}};A.use(y.initReactI18next).init({resources:i,lng:localStorage.getItem("language")||"en",fallbackLng:"en"}),s(!0)})()},[e]),a?t.jsx(i.Provider,{store:n,children:t.jsx(PT,{...e})}):t.jsx(t.Fragment,{})},exports.CheckBox=Be,exports.ComboBox=qe,exports.DARK_THEME_INITIAL_MAIN_COLOR=Ye,exports.DARK_THEME_INITIAL_SECANDARY_COLOR=Ke,exports.DATE_FORMAT=je,exports.DATE_TIME_FORMAT=Ge,exports.DashboardRouteView=zo,exports.DashboardViewer=Vo,exports.Datefield=Ve,exports.DatetimeField=ze,exports.ExcelReportViewer=Mo,exports.FormElement=mo,exports.LIGHT_THEME_INITIAL_MAIN_COLOR=We,exports.LIGHT_THEME_INITIAL_SECANDARY_COLOR=He,exports.ReportViewer=Do,exports.SystemLookupCombobox=Qe,exports.TemplateBarChart=Bo,exports.TemplateDataCard=qo,exports.TemplateForm=Uo,exports.TemplateGauge=jo,exports.TemplateGrid=vo,exports.TemplateLineChart=Go,exports.TemplateLineProgress=Ho,exports.TemplatePieChart=Yo,exports.TemplateTextField=De,exports.TransferList=Fe,exports.WorkflowDocumentPanel=ko,exports.WorkflowDocumentTimeLine=Io,exports.WorkflowRouteComponent=Fo,exports.capitalizeFirstLetter=uo,exports.constructGridColumnsFromFields=it,exports.constructValidationSchema=ot,exports.formatDate=(e,t)=>t?x(e).format(t):x(e).format(je),exports.getAllFields=tt,exports.getElementFields=et,exports.getGridSelection=rt,exports.hasDigitsOnly=function(e){return/^\d+$/.test(e)},exports.isNumber=lo,exports.isNumeric=co,exports.isValidEmail=po,exports.parseStringToDate=(e,t)=>t?x(e,t).toDate():x(e,je).toDate(),exports.timeAgo=ho,exports.useApiActions=xe,exports.useAxios=Re,exports.useConfirmationWindow=be,exports.useIsMobile=pe,exports.useLoadingMask=Ee,exports.useSession=we,exports.useWindow=Se,Object.keys(s).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return s[e]}})}),Object.keys(B).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return B[e]}})}),Object.keys(q).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return q[e]}})});
|
|
166
166
|
//# sourceMappingURL=index.js.map
|