@decafhub/decaf-react-webapp 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.module.js +1 -1
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -1
- package/dist/index.modern.mjs +0 -4
- package/dist/index.modern.mjs.map +0 -1
package/dist/index.modern.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Global as e,css as t}from"@emotion/react";export{Global as GlobalStyle,css}from"@emotion/react";export{default as styled}from"@emotion/styled";import n from"query-string";export{default as qs}from"query-string";import{LockFilled as r,RightOutlined as o,DownOutlined as l,HomeOutlined as a,QuestionCircleOutlined as c,EllipsisOutlined as i,MenuOutlined as s,UpOutlined as u,CameraOutlined as d,BulbFilled as m,BulbOutlined as p,UserOutlined as g,LogoutOutlined as f,InfoCircleOutlined as h,CaretUpOutlined as b,MessageOutlined as E}from"@ant-design/icons";import{Result as y,Typography as w,Button as v,theme as k,ConfigProvider as x,Grid as C,Dropdown as B,Layout as S,Menu as z,Drawer as I,Avatar as $,Row as A,Col as L,Card as N,Statistic as P}from"antd";import T,{useState as F,useLayoutEffect as D,useRef as j,useEffect as W}from"react";import{Link as R,useRouteError as q,isRouteErrorResponse as V,useMatches as H,useLocation as O,NavLink as M,useNavigate as _,useNavigation as U,Outlet as Y,createBrowserRouter as G,RouterProvider as K}from"react-router-dom";import X from"decimal.js";import Z from"js-cookie";import J from"md5";import{useDecaf as Q,DecafApp as ee,DecafWebappController as te}from"@decafhub/decaf-react";import"antd/dist/reset.css";import{QueryParamProvider as ne}from"use-query-params";import{ReactRouter6Adapter as re}from"use-query-params/adapters/react-router-6";import{useNProgress as oe}from"@tanem/react-nprogress";import le from"html2canvas";function ae({message:e}){return T.createElement(T.Fragment,null,T.createElement(w,null,e),T.createElement(R,{to:"/"},T.createElement(v,{style:{marginTop:20}},"Home Page")))}function ce(){return T.createElement(y,{icon:T.createElement(r,{style:{color:"#ff603b"}}),title:"Authentication Error",subTitle:T.createElement(ae,{message:"Your credentials are invalid. Please try to log in again."})})}function ie(){return T.createElement(y,{status:"403",title:"Access Denied",subTitle:T.createElement(ae,{message:"You are not authorized to access this content."})})}function se(){return T.createElement(y,{status:"404",title:"Page Not Found",subTitle:T.createElement(ae,{message:"Sorry, the page you visited does not exist."})})}function ue(){return T.createElement(y,{status:"500",title:"Error",subTitle:T.createElement(ae,{message:"Something went wrong. Please try again later. If the problem persists, please contact the administrator."})})}function de(){const e=q();if(!V(e))return T.createElement(ue,null);switch(e.status){case 401:return T.createElement(ce,null);case 403:return T.createElement(ie,null);case 404:return T.createElement(se,null);default:return T.createElement(ue,null)}}function me(){return me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},me.apply(this,arguments)}const pe=32,ge=16;function fe(e){const[t,n]=F(0);return D(()=>{const t=document.getElementById(e),r=()=>{if(!t)return;const e=t.getBoundingClientRect().top,r=window.innerHeight-e-pe-ge;n(r)};return r(),null==t||t.addEventListener("resize",r),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r),null==t||t.removeEventListener("resize",r)}},[e]),t}function he(e,t=0){const[n,r]=F(400),o=fe(e),l=j(null);return D(()=>{const n=document.getElementById(e);return l.current=new ResizeObserver(e=>{let n=0;e.forEach(e=>{var r;const l=be(e.target.querySelector(".ant-table-header")),a=be(e.target.querySelector(".ant-table-footer")),c=Ee(e.target.querySelector(".ant-table-container")),i=null!=(r=e.target.querySelectorAll(".ant-pagination"))?r:[],s=Array.from(i).reduce((e,t)=>e+be(t),0);n=o-l-a-c-s-t}),r(n>350?n:"100%")}),l.current.observe(null==n?void 0:n.closest(".ant-table-wrapper")),()=>{var e;null==(e=l.current)||e.disconnect()}},[t,e,o]),n}function be(e){if(!e)return 0;const t=e.getBoundingClientRect().height,n=Ee(e);return Math.ceil(t+n)}function Ee(e){if(!e)return 0;const t=e.getBoundingClientRect().height,n=window.getComputedStyle(e),r=parseFloat(n.marginTop||"0"),o=parseFloat(n.marginBottom||"0");return Math.ceil(t-e.clientHeight+r+o)}function ye(e,t){let n=!1;"#"===e[0]&&(e=e.slice(1),n=!0);const r=parseInt(e,16);let o=(r>>16)+t;o>255?o=255:o<0&&(o=0);let l=(r>>8&255)+t;l>255?l=255:l<0&&(l=0);let a=(255&r)+t;return a>255?a=255:a<0&&(a=0),(n?"#":"")+String("000000"+(a|l<<8|o<<16).toString(16)).slice(-6)}function we(e,t){e.barista.get("/auth/"+(t?"logoutall":"logout"),{timeout:3e3}).catch(e=>{t&&(console.error(e),alert("Failed to logout from all devices. Please try to logout from each device individually."))}).finally(()=>{Z.remove("ember_simple_auth-session"),window.location.reload()})}function ve(e){return t=>t?e.True:e.False}function ke(e){return t=>null==t?e.Null:ve(e)(t)}var xe;function Ce(e){switch(new X(0).comparedTo(e)){case 1:return xe.Short;case 0:return xe.Square;case-1:return xe.Long}return xe.Square}function Be(e){return t=>{switch(Ce(t)){case xe.Short:return e.Short;case xe.Square:return e.Square;case xe.Long:return e.Long}}}function Se(e,t,n){const r=[...e];return t.forEach(e=>{const t=r.findIndex(t=>t[n]===e[n]);t>=0?r[t]=e:r.push(e)}),r}function ze(e){return new URL(e.url).searchParams}function Ie(e,t){return new URL(e.url).searchParams.get(t)}function $e(e,t,n){var r;return null!=(r=new URL(e.url).searchParams.get(t))?r:n}function Ae(e,t){return new URL(e.url).searchParams.getAll(t)}!function(e){e[e.Short=-1]="Short",e[e.Square=0]="Square",e[e.Long=1]="Long"}(xe||(xe={}));const Le="#10161d",Ne="rgb(31, 41, 55)",Pe="#f3f4f6",Te="#2c3d50",Fe={colorBorder:"transparent",colorBorderSecondary:"transparent",colorBorderBg:"transparent"},De={hashed:!0,algorithm:[k.defaultAlgorithm],components:{Layout:{colorBgHeader:"#ededed"}},token:{borderRadius:0,colorBgContainer:"white",colorBgBase:Pe,colorBgLayout:Pe,colorBgElevated:"#fafbfc"}},je={hashed:!0,components:{Layout:{colorBgHeader:Le},Button:{boxShadow:"none",boxShadowSecondary:"none",colorBgContainer:Te},Input:me({},Fe,{colorBgContainer:Te}),Select:me({},Fe,{colorBgContainer:Te}),Checkbox:me({},Fe,{colorBgContainer:Te}),Dropdown:me({},Fe),DatePicker:me({},Fe,{colorBgContainer:Te,colorBgElevated:Te}),InputNumber:me({},Fe,{colorBgContainer:Te}),Menu:{itemColor:"rgba(255, 255, 255, 0.5)"}},token:{fontFamily:"Inter, sans-serif",colorPrimary:"#344961",colorBgBase:Ne,colorBgContainer:Le,colorBgElevated:"rgb(20, 29, 41)",colorBorderSecondary:Ne,colorBorder:Ne,colorBgLayout:Ne,borderRadius:0,green:"#48734d",red:"#b03a38",blue:"#0d6efd",yellow:"#ffc107",orange:"#fd7e14",colorWhite:"#fff",colorLink:"#a4bfff",colorLinkHover:"#7199fb",colorLinkActive:"#7199fb"},algorithm:[k.darkAlgorithm]};function We(e){var t,n,r,o;const l={color:"white !important",":after":{borderBottomColor:"white"}};return{body:{background:null==(t=e.token)?void 0:t.colorBgBase,fontFamily:"Inter, sans-serif",margin:0},"#root":{minHeight:"100%"},button:{boxShadow:"none !important"},".ant-table-body":{overflow:"auto !important"},"#decaf-header":{position:"fixed",zIndex:999,right:0,left:0,paddingInline:16,display:"flex",alignItems:"center"},"#decaf-content":{paddingTop:64,paddingBottom:32,"#decaf-layout-breadcrumb":me({backgroundColor:null==(n=e.token)?void 0:n.colorBgElevated,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",height:50,paddingInline:16,boxShadow:"0px 1px 2px rgba(0, 0, 0, 0.10)"},Re()),"#decaf-layout-content-outlet":{minHeight:"100%",padding:16,"&.full-screen":{padding:"0 !important"}}},"#decaf-footer":{position:"fixed",bottom:0,right:0,left:0,paddingBlock:0,paddingInline:0,zIndex:999,boxShadow:"0px -2px 4px rgba(0, 0, 0, 0.15)",backgroundColor:null==(r=je.components)||null==(o=r.Layout)?void 0:o.colorBgHeader},".dot":{borderRadius:"50%",width:10,height:10,display:"inline-block",backgroundColor:"rgba(255,255,255,.25)","&.green":{backgroundColor:"#80ff00 !important"},"&.yellow":{backgroundColor:"#ff0 !important"},"&.orange":{backgroundColor:"#ff7000 !important"},"&.red":{backgroundColor:"#ff0000 !important"}},".ant-menu-item-selected":l,".ant-menu-light.ant-menu-horizontal >.ant-menu-item-selected":l,".ant-menu-light.ant-menu-horizontal >.ant-menu-submenu-selected, .ant-menu-light .ant-menu-submenu-selected >.ant-menu-submenu-title":l}}function Re(){const e=e=>{const t="dark"===e?"255, 255, 255":"0, 0, 0";return{color:`rgba(${t}, 0.5) !important`,"&:hover":{color:`rgba(${t}, 0.75) !important`}}},t=me({},e("dark"),{"&:last-child":{color:"rgba(255, 255, 255, 0.85) !important"}}),n=me({},e("light"),{"&:last-child":{color:"rgba(0, 0, 0, 0.85) !important"}});return{".decaf-breadcrumb":{display:"flex",alignItems:"center",listStyle:"none",margin:0,padding:0,">li":me({"&.separator":{paddingInline:3,marginInline:3},"a, span":me({},e("light")),display:"flex",alignItems:"center",transition:"color 0.2s"},n),"&.dark":{">li":me({"a, span":me({},e("dark"))},t)}}}}const qe=T.createContext({theme:"dark",toggleTheme:()=>{}}),Ve=()=>T.useContext(qe);let He,Oe=e=>e;function Me(n){const[r,o]=T.useState(()=>{const e=n.theme||localStorage.getItem("decafAppTheme");return"dark"===e||"light"===e?e:"dark"});let l="light"===r?De:je;l=me({},l,n.themeConfig||{}),l=me({},l,{token:me({},l.token,{fontFamily:"Inter, sans-serif"})});const a="light"===r?function(e){return me({},We(e))}(l):function(e){var t,n,r,o,l,a,c,i,s,u,d,m,p,g,f;return me({},We(e),{"*":{"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{background:null==(t=e.token)?void 0:t.colorBgContainer},"&::-webkit-scrollbar-thumb":{background:null==(n=e.token)?void 0:n.colorPrimary}},".ant-page-header-back-button, .ant-page-header-heading-title":{color:`${null==(r=e.token)?void 0:r.colorWhite} !important`},".ant-badge-count":{color:`${null==(o=e.token)?void 0:o.colorWhite} !important`},".ant-table-thead > tr > th":{background:`${ye((null==(l=e.token)?void 0:l.colorBgContainer)||"",-5)} !important`,"&:hover":{background:`${null==(a=e.token)?void 0:a.colorBgContainer} !important`}},".ant-table-filter-dropdown":{"input, .ant-table-filter-dropdown-search-input":{background:`${null==(c=e.token)?void 0:c.colorBgBase} !important`},".ant-dropdown-menu-item, .ant-dropdown-menu":{background:`${null==(i=e.token)?void 0:i.colorBgContainer} !important`}},".ant-tabs-tab-active":{".ant-tabs-tab-btn":{color:`${null==(s=e.token)?void 0:s.colorWhite} !important`}},".ant-radio-button-wrapper-checked":{backgroundColor:`${null==(u=e.components)||null==(d=u.Button)?void 0:d.colorBgContainer} !important`,color:`${null==(m=e.token)?void 0:m.colorWhite} !important`},".ant-picker-date-panel":{".ant-picker-cell-in-range, .ant-picker-cell-range-start, .ant-picker-cell-range-end":{"&::before":{background:`${null==(p=e.token)?void 0:p.colorBgBase} !important`},".ant-picker-cell-inner":{background:`${null==(g=e.token)?void 0:g.colorBgBase} !important`}},".ant-picker-cell-range-start, .ant-picker-cell-range-end":{".ant-picker-cell-inner":{background:`${null==(f=e.token)?void 0:f.colorPrimary} !important`}}}})}(l);return T.createElement(qe.Provider,{value:{theme:r,toggleTheme:function(){const e="dark"===r?"light":"dark";o(e),localStorage.setItem("decafAppTheme",e)}}},T.createElement(x,{theme:l},T.createElement(e,{styles:t(He||(He=Oe`
|
|
2
|
-
@import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap);
|
|
3
|
-
`))}),T.createElement(e,{styles:a}),n.children))}function _e(e){const{items:t,itemRender:n,separator:r}=e,{theme:a}=Ve(),c=C.useBreakpoint(),i=t.slice(0,1).concat(t.slice(-1));return T.createElement("ul",{className:`decaf-breadcrumb ${a}`},function(e,t,n){const r=[];return e.forEach((o,a)=>{if(o.href&&a!==e.length-1)r.push(T.createElement("li",{key:a},n?n(o):T.createElement(R,{className:"decaf-breadcrumb-link",to:o.href},o.title)));else if(o.children){const e=o.children.map((e,t)=>({key:t,label:T.createElement(R,{className:"decaf-breadcrumb-link",to:e.href},e.title)}));r.push(T.createElement("li",{key:a},T.createElement(B,{menu:{items:e}},T.createElement("div",{style:{display:"flex",cursor:"pointer",gap:3}},T.createElement("span",null,o.title),T.createElement(l,{style:{fontSize:12}})))))}else r.push(T.createElement("li",{key:a},o.title));a<e.length-1&&r.push(T.createElement("li",{key:`sep-${a}`,className:"separator"},t))}),r}(c.lg?t:i,r||T.createElement(o,null),n))}function Ue(e){const t=H(),n=null==t?void 0:t[(null==t?void 0:t.length)-1],r=void 0!==e.isFullScreen?e.isFullScreen:!(null==n||!n.handle.fullScreen),o=void 0!==e.extras?e.extras:null==n?void 0:n.handle.extras;return T.createElement(S.Content,{id:"decaf-content",style:{flex:1,minHeight:"100%"}},T.createElement(Ye,null),T.createElement(Ge,{breadcrumb:e.breadcrumb},o),T.createElement("div",{id:"decaf-layout-content-outlet",className:r?"full-screen":""},e.children))}function Ye(){var e;const t=H().filter(e=>{var t;return Boolean(null==(t=e.handle)?void 0:t.crumb)}).map(e=>e.handle.crumb(e.data)),n=function(){const e=document.title;return e.split(" | ").length>1?e.split(" | ")[e.split(" | ").length-1]:e}(),r=null==t||null==(e=t[t.length-1])?void 0:e.title;return document.title=r?`${r} | ${n}`:n,null}function Ge(e){const t=H();if(!1===e.breadcrumb)return T.createElement("div",{id:"decaf-layout-breadcrumb",style:{justifyContent:"flex-end"}},T.createElement("div",null,e.children));if(e.breadcrumb)return T.createElement("div",{id:"decaf-layout-breadcrumb"},e.breadcrumb,T.createElement("div",null,e.children));{const n=t.filter(e=>{var t;return Boolean(null==(t=e.handle)?void 0:t.crumb)}).map(e=>e.handle.crumb(e.data)),r=[{href:"/",title:T.createElement(a,null)},...n].map((e,t)=>me({},e,{_key:t}));return r.length<2?T.createElement(T.Fragment,null):T.createElement("div",{id:"decaf-layout-breadcrumb"},T.createElement(_e,{items:r}),T.createElement("div",null,e.children))}}function Ke(){const{token:e}=k.useToken(),t=C.useBreakpoint();return T.createElement(v,{type:"link",href:"https://docs.decafhub.com",target:"_blank",rel:"noreferrer",icon:T.createElement(c,null),style:{backgroundColor:e.colorBgElevated}},!t.xs&&"Documentation")}function Xe(){return T.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 649.6 767.9",enableBackground:"new 0 0 649.6 767.9",xmlSpace:"preserve",width:32,height:32},T.createElement("g",null,T.createElement("path",{fill:"#52CEF4",d:"M324,767.9c-6.6-5.1-14.2-8.6-21.3-12.9c-22-13-44.3-25.6-66.4-38.5c-21.3-12.4-42.5-25-63.8-37.4\n c-33.5-19.5-67.1-39-100.7-58.5c-22.7-13.2-45.3-26.5-68-39.6c-2.8-1.6-3.8-3.3-3.8-6.5c0.2-58.6-0.2-117.3,0.4-175.9\n C1,333,0.7,267.3,1,201.6c0-1.8-0.6-3.7,0.6-5.4c6.4,3.8,12.7,7.6,19.1,11.3c23.8,13.9,47.7,27.9,71.5,41.8\n c4.9,2.9,9.6,6.2,14.9,8.4c-1.2,5.2-0.2,10.3-0.1,15.5c0.5,56.1-0.2,112.2,0.9,168.3c0.3,18.4,0.2,36.8,0.2,55.2\n c0,3,0.7,4.9,3.5,6.4c6.3,3.4,12.3,7.3,18.5,11c26.1,15.7,52.3,31.5,78.4,47.2c33,19.8,66,39.6,99,59.3c5.7,3.4,10.9,7.5,17.2,9.7\n c0,1.5,0.1,2.9,0.1,4.4c0,42.4,0,84.8,0,127.3c0,1.8-0.7,3.7,0.8,5.3c0,0.2,0,0.4,0,0.7C325.1,767.9,324.5,767.9,324,767.9z"}),T.createElement("path",{fill:"#227EC3",d:"M107.1,257.6c-5.3-2.2-10-5.5-14.9-8.4c-23.8-13.9-47.7-27.8-71.5-41.8c-6.4-3.7-12.7-7.6-19.1-11.3\n c8.2-6,17.1-10.7,25.7-16c28.7-17.5,57.5-34.9,86.3-52.4c39.2-23.8,78.5-47.6,117.7-71.4c27-16.3,53.9-32.7,80.9-49\n c4-2.4,8.1-4.6,11.7-7.4c1.3,0,2.7,0,4,0c0.3,1.6,1.9,1.8,2.9,2.4c31,18.9,62,37.8,93.1,56.4c4.2,2.5,5.9,5.2,5.9,10.3\n c-0.3,38.3-0.1,76.7-0.1,115c0,2.7-0.1,5.3-0.2,8c-10.5-6.3-21-12.5-31.4-18.9c-23.1-14-46.2-28-69.3-42c-1.6-1-2.8-1.6-5-0.4\n c-26.8,15.8-53.7,31.5-80.6,47.2c-26.1,15.2-52.2,30.4-78.3,45.7C145.7,235,126.4,246.3,107.1,257.6z"}),T.createElement("path",{fill:"#409DD5",d:"M324.7,630.2c5.2-4.2,11-7.4,16.7-10.9c32.6-20.3,65.3-40.6,98-60.8c30.8-19,61.6-38,92.4-57\n c7.5-4.6,7.5-4.6,7.5-13.6c0-58.6,0.1-117.3,0.1-175.9c0-1.6-0.1-3.2-0.1-4.8c0.8-1.5,0.4-3.1,0.4-4.7c0.1-14.7,0.2-29.5,0.3-44.2\n c1.3,0.1,2.4-0.4,3.4-1c8.7-5.1,17.4-10.2,26.1-15.3c15.8-9.2,31.7-18.3,47.6-27.5c10.5-6.1,21.1-12.3,31.6-18.4\n c1.5,0.9,0.8,2.4,0.8,3.6c0,124.2,0,248.4,0.1,372.6c0,2.7-0.9,4-3.1,5.3c-35.3,20.8-70.5,41.7-105.8,62.6\n c-27.2,16.1-54.5,32.2-81.7,48.4c-27,16-54,32.1-81,48c-17.4,10.3-34.8,20.4-52.3,30.7c-1.5-1.6-0.8-3.5-0.8-5.3\n c0-42.4,0-84.8,0-127.3C324.8,633.2,324.7,631.7,324.7,630.2z"}),T.createElement("path",{fill:"#227EC3",d:"M648.7,196.1c-10.5,6.1-21,12.3-31.6,18.4c-15.8,9.2-31.7,18.3-47.6,27.5c-8.7,5.1-17.4,10.2-26.1,15.3\n c-1,0.6-2.1,1.1-3.4,1c0-12.4-0.1-24.8-0.1-37.2c0-30.2,0-60.5,0-91c2.8,0.3,4.5,2,6.5,3.1c28.4,17.3,56.8,34.7,85.2,52\n C637.3,188.8,643.4,191.8,648.7,196.1z"}),T.createElement("path",{fill:"#227EC3",d:"M216.2,322.3c-0.3-1.6-0.4-2.9,1.4-4c29.2-18,58.4-36.1,87.5-54.1c4.7-2.9,9.5-5.8,14.2-8.9\n c1.5-1,2.7-1.1,4.3-0.2c26.9,15.9,53.8,31.8,80.7,47.7c7.1,4.2,14.1,8.5,21.4,12.4c3.5,1.9,4.8,4.3,3.9,8c-1.7,1.1-3.3,2.2-5,3.2\n c-20.5,11.9-41.1,23.8-61.6,35.7c-13,7.6-26.1,15.2-39.1,22.8c-7-4-14-8.1-21-12.1c-21.7-12.7-43.2-25.5-65-38\n C230.7,330.5,223.8,325.8,216.2,322.3z"}),T.createElement("path",{fill:"#52CEF4",d:"M216.2,322.3c7.6,3.5,14.5,8.2,21.8,12.4c21.7,12.5,43.3,25.3,65,38c7,4.1,14,8.1,21,12.1\n c0,39.3,0.1,78.6,0.1,117.9c-1.5,0.9-2.5-0.4-3.6-1c-21.3-12.8-42.5-25.5-63.7-38.3c-13.3-8-26.5-16.1-39.8-24\n c-1.8-1.1-2.5-2.3-2.5-4.4c0.4-26.9,0.4-53.8,1.1-80.7C215.8,343.6,215.4,332.9,216.2,322.3z"}),T.createElement("path",{fill:"#409DD5",d:"M324,502.6c0-39.3-0.1-78.6-0.1-117.9c13-7.6,26.1-15.2,39.1-22.8c20.5-11.9,41.1-23.8,61.6-35.7\n c1.7-1,3.3-2.1,5-3.2c0.1,7.6,0.1,15.2,0.1,22.8c0,30.5,0,61,0,91.5c0,2.6-0.4,4.4-2.9,5.8c-31.6,18.2-63,36.5-94.5,54.8\n C329.6,499.6,327.2,501.8,324,502.6z"})))}function Ze(e){const t=[];return e.forEach(e=>{const n={key:"to"in e?e.to:e.label,label:e.label,icon:e.icon};"to"in e&&e.to?n.label=T.createElement(M,{to:e.to,end:"/"===e.to},e.label):"href"in e&&e.href?n.label=T.createElement("a",{href:e.href},e.label):e.children&&(n.label=e.label,n.children=Ze(e.children||[])),t.push(n)}),t}function Je(){return T.createElement(w.Text,{type:"secondary"},"Powered by"," ",T.createElement("a",{href:"https://teloscube.com",target:"_blank",rel:"noreferrer"},"Teloscube"))}function Qe(e){const[t,n]=T.useState(!1),r=H(),o=O(),{md:l}=C.useBreakpoint(),a=Ze(e.menu),c=r.map(e=>e.pathname).filter(e=>"/"===o.pathname||"/"!==e);W(()=>{l||n(!1)},[o.pathname,l]);const u=T.createElement(z,{items:[...a],selectedKeys:c,mode:l?"horizontal":"inline",overflowedIndicator:T.createElement(i,{style:{fontSize:20,color:"white"}}),style:{flex:"auto",justifyContent:"flex-end",backgroundColor:"transparent",border:"none",minWidth:0}});return l?u:T.createElement("div",{style:{display:"flex",flex:"auto",justifyContent:"flex-end"}},T.createElement(s,{style:{fontSize:20,marginRight:20},onClick:()=>n(!t)}),T.createElement(I,{open:t,footer:T.createElement(Je,null),onClose:()=>n(!1),bodyStyle:{padding:10},width:document.body.clientWidth-50>350?350:.85*document.body.clientWidth},u))}function et(){return T.createElement("div",{style:{display:"flex"}},T.createElement(v,{type:"text",icon:T.createElement(u,null),title:"Scroll to top",onClick:()=>window.scrollTo({top:0,behavior:"smooth"})}),T.createElement(v,{type:"text",icon:T.createElement(l,null),title:"Scroll to bottom",onClick:()=>window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})}))}function tt(e){async function t(){const e=document.getElementById("decaf-footer");null==e||e.style.setProperty("display","none");const t=(await le(document.body)).toDataURL("image/png");null==e||e.style.setProperty("display","block");const n=document.createElement("a");n.download="screenshot.png",n.href=t,n.click(),n.remove()}return e.triggerNode?T.cloneElement(e.triggerNode,{onClick:t}):T.createElement(v,{type:"text",icon:T.createElement(d,null),title:"Take a screenshot of the current page",onClick:t})}function nt(e){return T.createElement(v,{type:"text",icon:T.createElement("dark"===e.theme?m:p,null),title:"dark"===e.theme?"Switch to light theme":"Switch to dark theme",onClick:()=>e.onChange()})}function rt(){const[e,t]=F(void 0),n=Q(),r=_();W(()=>{n.me.email&&function(e){const t=`https://www.gravatar.com/avatar/${J(e)}`;return fetch(`${t}?d=404`,{method:"HEAD"}).then(e=>200!==e.status?void 0:t).catch(()=>{})}(n.me.email).then(t)},[n.me.email]);const o=[{key:"me",label:n.me.fullname||n.me.username,title:n.me.email,disabled:!0,icon:T.createElement(g,null),style:{cursor:"default"}},{key:"divider-1",dashed:!0,type:"divider"},{key:"logout",label:"Logout",icon:T.createElement(f,null),onClick:()=>we(n.client,!1)},{key:"logout-all",label:"Logout All Sessions",icon:T.createElement(f,null),onClick:()=>window.confirm("Logout from all sessions?")&&we(n.client,!0)},{key:"divider-2",dashed:!0,type:"divider"},{key:"about",label:"About",icon:T.createElement(h,null),onClick:()=>r("/about")}],l=e?{src:e}:{icon:T.createElement(g,{style:{color:"rgba(255,255,255, 0.5)"}}),style:{backgroundColor:"transparent",border:"1px solid rgba(255,255,255, 0.5)"}};return T.createElement(B,{trigger:["click"],menu:{items:o}},T.createElement($,me({},l,{style:me({},l.style,{cursor:"pointer"})})))}function ot(e){const t=e.split("/"),n=t.indexOf("webapps");return-1===n?"":t.slice(n+3).join("/")}function lt(){const e=function(e){const t=window.location.href.split("/"),n=t.indexOf("webapps");return-1===n?"":t[n+1]}(),t=function(e){return e.startsWith("preview-")&&e.length>8}(n=function(e){const t=window.location.href.split("/"),n=t.indexOf("webapps");return-1===n?"":t[n+2]}())?"preview":function(e){return e.startsWith("v")&&e.length>1}(n)?"release":n;var n;const{md:r}=C.useBreakpoint(),o=[{code:"development",name:"Development Version",color:"red",url:`/webapps/${e}/development/${ot(window.location.href)}`,show:"development"===process.env.NODE_ENV},{code:"testing",name:"Testing Version",color:"orange",url:`/webapps/${e}/testing/${ot(window.location.href)}`,show:!0},{code:"staging",name:"Staging Version",color:"yellow",url:`/webapps/${e}/staging/${ot(window.location.href)}`,show:!0},{code:"production",name:"Production Version",color:"green",url:`/webapps/${e}/production/${ot(window.location.href)}`,show:!0},{code:"preview",name:"Preview Version",color:"grey",url:"/",show:!1},{code:"release",name:"Release Version",color:"grey",url:"/",show:!1}],l=o.find(e=>e.code===t),a="production"===(null==l?void 0:l.code);return l?T.createElement(B,{placement:"top",arrow:!0,menu:{items:o.filter(e=>e.show).map(e=>({key:e.name,label:T.createElement("span",null,T.createElement("i",{className:`dot ${e.color}`})," ",e.name),onClick:()=>{window.location.href=e.url}}))}},T.createElement(v,{type:"text",style:{width:a?32:"initial",padding:a?0:"revert",display:"flex",alignItems:"center",justifyContent:"center"},icon:T.createElement("i",{className:`dot ${null==l?void 0:l.color}`})},T.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},!a&&r&&T.createElement(T.Fragment,null,T.createElement("span",{style:{marginInline:5}},"You are on ",T.createElement("b",null,l.name)),T.createElement(b,null))))):null}const at="https://static.zdassets.com/ekr/snippet.js";function ct(){const{me:e,publicConfig:t}=Q(),[n,r]=F(!1),{token:o}=k.useToken(),l=C.useBreakpoint();return W(()=>{if(!t.zendesk||"undefined"==typeof document)return;const n=document.createElement("script");return n.src=at+"?key="+t.zendesk,n.async=!0,n.id="ze-snippet",n.onload=()=>{window.zE("webWidget","hide"),window.zE("webWidget:on","open",()=>{window.zE("webWidget","show"),r(!0)}),window.zE("webWidget:on","close",()=>{window.zE("webWidget","hide"),r(!1)})},document.body.appendChild(n),window.zESettings={webWidget:{offset:{horizontal:-7,vertical:20}},contactForm:{subject:!0,fields:[{id:"name",prefill:{"*":e.fullname}},{id:"email",prefill:{"*":e.email}}]}},()=>{document.body.removeChild(n)}},[t,e]),t.zendesk?T.createElement(v,{type:"link",icon:T.createElement(E,null),style:{backgroundColor:o.colorBgElevated},onClick:function(){n?null==window.zE||window.zE("webWidget","close"):null==window.zE||window.zE("webWidget","open"),r(!n)}},!l.xs&&"Support"):null}function it(e){var t;const n=O(),r=U(),o=C.useBreakpoint(),{theme:l,toggleTheme:a}=Ve();return T.createElement(S,{style:{height:"100%"}},T.createElement(ut,{isAnimating:"loading"===r.state,key:n.key}),T.createElement(x,{theme:je},T.createElement(S.Header,{id:"decaf-header"},T.createElement(st,{title:e.appName}),T.createElement(Qe,{title:e.appName,menu:e.menu}),T.createElement(rt,null))),T.createElement(Y,null),null!=(t=e.children)?t:null,T.createElement(x,{theme:je},T.createElement(S.Footer,{id:"decaf-footer"},T.createElement(A,{justify:"space-between",align:"middle"},T.createElement(L,{span:o.lg?10:12},T.createElement(ct,null),T.createElement("span",{style:{display:"inline-block",width:1}}),T.createElement(Ke,null)),T.createElement(L,{span:o.lg?4:0,style:{textAlign:"center"}},T.createElement(Je,null)),T.createElement(L,{span:o.lg?10:12,style:{justifyContent:"flex-end",display:"flex",gap:10}},T.createElement(lt,null),T.createElement(nt,{theme:l,onChange:a}),T.createElement(tt,null),T.createElement(et,null))))))}function st({title:e}){const t=C.useBreakpoint();return T.createElement(R,{to:"/",style:{display:"flex",alignItems:"center",gap:10}},T.createElement(Xe,null),t.lg&&T.createElement(w.Title,{level:1,style:{margin:0,fontWeight:"normal",fontSize:20,color:"rgba(255, 255, 255, 0.75)",whiteSpace:"nowrap"}},e))}function ut({isAnimating:e}){const{animationDuration:t,isFinished:n,progress:r}=oe({isAnimating:e});return T.createElement("div",{style:{opacity:n?0:1,pointerEvents:"none",transition:`opacity ${t}ms linear`}},T.createElement("div",{style:{background:"#29d",height:2,left:0,marginLeft:100*(-1+r)+"%",position:"fixed",top:0,transition:`margin-left ${t}ms linear`,width:"100%",zIndex:1031}},T.createElement("div",{style:{boxShadow:"0 0 10px #29d, 0 0 5px #29d",display:"block",height:"100%",opacity:1,position:"absolute",right:0,transform:"rotate(3deg) translate(0px, -4px)",width:100}})))}function dt(e){const{client:t}=Q(),[n,r]=F(void 0),[o,l]=F(void 0),[a,c]=F(void 0);return W(()=>{t.bare.get("/_cultproxy").then(({data:e})=>r(e.version)),t.barista.get("/version/").then(({data:e})=>l(e.version)),t.bare.get("/apis/estate/version").then(({data:e})=>c(e))},[t]),T.createElement(Ue,null,T.createElement(A,{gutter:[16,16]},T.createElement(L,{xs:{span:24},sm:{span:24},md:{span:24},lg:{span:12},xl:{span:8},xxl:{span:6}},T.createElement(N,{bordered:!1},T.createElement(P,{title:"Application Name",value:e.appName}))),T.createElement(L,{xs:{span:24},lg:{span:12},xl:{span:16},xxl:{span:18}},T.createElement(N,{bordered:!1},T.createElement(P,{title:"Application Description",value:e.appDescription}))),T.createElement(L,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},T.createElement(N,{bordered:!1},T.createElement(P,{title:"Application Version",value:e.appVersion,prefix:"v"}))),T.createElement(L,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},T.createElement(N,{bordered:!1},T.createElement(P,{title:"DECAF Cultproxy Version",value:n,prefix:"v"}))),T.createElement(L,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},T.createElement(N,{bordered:!1},T.createElement(P,{title:"DECAF Barista Version",value:o,prefix:"v"}))),T.createElement(L,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},T.createElement(N,{bordered:!1},T.createElement(P,{title:"DECAF Estate Version",value:a,prefix:"v"}))),T.createElement(L,{span:24},e.content)))}const mt=["crumb","fullScreen","extras","children"];function pt(e){W(()=>{const e=function(){const e=document.createElement("script");return e.defer=!0,e.setAttribute("data-domain",location.hostname),e.src="https://webax.svc.sys.decafhub.com/js/plausible.js",e}();return document.body.appendChild(e),()=>{document.body.removeChild(e)}},[]);const t=e.controller||te;return t.disableZendeskWidget=!0,T.createElement(Me,{themeConfig:e.themeConfig,theme:e.theme},T.createElement(ee,{config:e.config,controller:t},T.createElement(gt,me({},e))))}function gt(e){var t,r;const o=Q(),l=[{path:"/about",element:T.createElement(dt,{appName:e.appName,appVersion:null==(t=e.config)?void 0:t.currentVersion,appDescription:e.appDescription,content:null==e.buildAboutPageContent?void 0:e.buildAboutPageContent(o)}),crumb:()=>({title:"About"})},{path:"*",element:T.createElement(Ue,null,T.createElement(se,null)),crumb:()=>({title:"Page Not Found"})}],a=Se(e.buildRouteItems(o),l,"path"),c=G(function(e,t,r){const o=e.buildMenuItems(t);return[{element:T.createElement(ne,{adapter:re,options:{removeDefaultsFromUrl:!0,searchStringToObject:n.parse,objectToSearchString:n.stringify,enableBatching:!0,includeAllParams:!0}},T.createElement(it,{menu:o,appName:e.appName})),path:"/",children:r.map(ft),errorElement:T.createElement(it,{menu:o,appName:e.appName},T.createElement(Ue,{breadcrumb:!1},T.createElement(de,null)))}]}(e,o,a),{basename:null==(r=e.config)?void 0:r.basePath});return T.createElement(K,{router:c})}function ft(e){const{crumb:t,fullScreen:n,extras:r,children:o}=e;return me({},function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)t.indexOf(n=l[r])>=0||(o[n]=e[n]);return o}(e,mt),o?{handle:{crumb:t,fullScreen:n,extras:r},children:o.map(ft)}:{handle:{crumb:t,fullScreen:n,extras:r}})}export{pt as DecafWebapp,xe as Direction,Ue as Page,ce as Page401,ie as Page403,se as Page404,ue as PageError,ve as booleanMap,je as decafThemeDark,De as decafThemeLight,Be as directionMap,Ie as getSearchParam,Ae as getSearchParamAll,$e as getSearchParamDefault,ze as getSearchParams,ke as nullableBooleanMap,Se as setAtKey,Ce as toDirection,Ve as useDecafTheme,fe as useRemaningHeight,he as useTableMaxHeight};
|
|
4
|
-
//# sourceMappingURL=index.modern.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.modern.mjs","sources":["../src/components/Error.tsx","../src/utils.tsx","../src/theme/-styles.tsx","../src/theme/-theme-context.tsx","../src/theme/-theme-hooks.tsx","../src/theme/-theme-provider.tsx","../src/components/Breadcrumb.tsx","../src/components/Page.tsx","../src/components/DocumentationButton.tsx","../src/components/Logo.tsx","../src/components/Menu.tsx","../src/components/PageScroller.tsx","../src/components/Screenshotter.tsx","../src/components/ThemeSwitcher.tsx","../src/components/UserProfileDropdown.tsx","../src/components/VersionSelector.tsx","../src/components/ZendeskWidget.tsx","../src/components/Layout.tsx","../src/components/PageAbout.tsx","../src/machinery/index.tsx","../src/machinery/-plausible.tsx"],"sourcesContent":["import { LockFilled } from '@ant-design/icons';\nimport { Button, Result, Typography } from 'antd';\nimport React from 'react';\nimport { Link, isRouteErrorResponse, useRouteError } from 'react-router-dom';\n\nfunction ErrorPageSubtitle({ message }: { message: string }) {\n return (\n <>\n <Typography>{message}</Typography>\n <Link to=\"/\">\n <Button style={{ marginTop: 20 }}>Home Page</Button>\n </Link>\n </>\n );\n}\n\nexport function Page401() {\n return (\n <Result\n icon={<LockFilled style={{ color: '#ff603b' }} />}\n title={'Authentication Error'}\n subTitle={<ErrorPageSubtitle message={'Your credentials are invalid. Please try to log in again.'} />}\n />\n );\n}\n\nexport function Page403() {\n return (\n <Result\n status=\"403\"\n title={'Access Denied'}\n subTitle={<ErrorPageSubtitle message={'You are not authorized to access this content.'} />}\n />\n );\n}\n\nexport function Page404() {\n return (\n <Result\n status=\"404\"\n title={'Page Not Found'}\n subTitle={<ErrorPageSubtitle message={'Sorry, the page you visited does not exist.'} />}\n />\n );\n}\n\nexport function PageError() {\n return (\n <Result\n status=\"500\"\n title={'Error'}\n subTitle={\n <ErrorPageSubtitle\n message={\n 'Something went wrong. Please try again later. If the problem persists, please contact the administrator.'\n }\n />\n }\n />\n );\n}\n\nexport function PageRouteError() {\n const error = useRouteError();\n\n if (isRouteErrorResponse(error)) {\n switch (error.status) {\n case 401:\n return <Page401 />;\n case 403:\n return <Page403 />;\n case 404:\n return <Page404 />;\n default:\n return <PageError />;\n }\n } else {\n return <PageError />;\n }\n}\n","import { DecafClient } from '@decafhub/decaf-client';\nimport { DecafContextType } from '@decafhub/decaf-react';\nimport Decimal from 'decimal.js';\nimport Cookies from 'js-cookie';\nimport md5 from 'md5';\nimport { useLayoutEffect, useRef, useState } from 'react';\nimport { Params } from 'react-router-dom';\n\nconst FOOTER_HEIGHT = 32;\nconst FOOTER_PADDING = 16;\n\n/**\n * This hook is used to calculate the remaining height of an element.\n * It takes into account the footer height and padding.\n *\n * @param elementId the id of the element to calculate the available height.\n * @returns the remaining height of the element.\n */\nexport function useRemaningHeight(elementId: string): number {\n const [remainingHeight, setRemainingHeight] = useState<number>(0);\n\n useLayoutEffect(() => {\n const e = document.getElementById(elementId);\n\n const calculate = () => {\n if (!e) {\n return;\n }\n\n const elementTop = e.getBoundingClientRect().top;\n const elementHeight = window.innerHeight - elementTop - FOOTER_HEIGHT - FOOTER_PADDING;\n setRemainingHeight(elementHeight);\n };\n\n calculate();\n e?.addEventListener('resize', calculate);\n window.addEventListener('resize', calculate);\n\n return () => {\n window.removeEventListener('resize', calculate);\n e?.removeEventListener('resize', calculate);\n };\n }, [elementId]);\n\n return remainingHeight;\n}\n\n/**\n * This hook is used to calculate the max possible height of a table.\n * It is used to set the height of the table to make it scrollable\n * when the content is too large.\n * @param elementId the id of the element that contains the table.\n * @param bottomSpace extra space to be added to the bottom of the table container.\n * @returns the max height of the table.\n * @example\n * ```tsx\n * const maxHeight = useTableMaxHeight('table-container', 50);\n * return (\n * <Table\n {...tableProps}\n id={'table-container'}\n scroll={{\n x: 'max-content',\n y: maxHeight,\n }}\n />\n* );\n* ```\n**/\nexport function useTableMaxHeight(elementId: string, bottomSpace: number = 0): string | number {\n const [maxHeight, setMaxHeight] = useState<string | number>(400);\n const remaining = useRemaningHeight(elementId);\n const observer = useRef<ResizeObserver | null>(null);\n\n useLayoutEffect(() => {\n const w = document.getElementById(elementId);\n\n observer.current = new ResizeObserver((e) => {\n let max = 0;\n\n e.forEach((tableWrapper) => {\n const tHeaderHeight = getElementComputedHeight(tableWrapper.target.querySelector('.ant-table-header'));\n const tFooterHeight = getElementComputedHeight(tableWrapper.target.querySelector('.ant-table-footer'));\n const tContainerOffset = getElementTotalOffset(tableWrapper.target.querySelector('.ant-table-container'));\n const paginations = tableWrapper.target.querySelectorAll('.ant-pagination') ?? [];\n const paginationHeights = Array.from(paginations).reduce((acc, cur) => acc + getElementComputedHeight(cur), 0);\n\n max = remaining - tHeaderHeight - tFooterHeight - tContainerOffset - paginationHeights - bottomSpace;\n });\n\n setMaxHeight(max > 350 ? max : '100%');\n });\n\n observer.current.observe(w?.closest('.ant-table-wrapper')!);\n\n return () => {\n observer.current?.disconnect();\n };\n }, [bottomSpace, elementId, remaining]);\n\n return maxHeight;\n}\n\nexport function getElementComputedHeight(element?: Element | null): number {\n if (!element) {\n return 0;\n }\n\n const height = element.getBoundingClientRect().height;\n const offset = getElementTotalOffset(element);\n return Math.ceil(height + offset);\n}\n\nexport function getElementTotalOffset(element?: Element | null): number {\n if (!element) {\n return 0;\n }\n\n const height = element.getBoundingClientRect().height;\n const style = window.getComputedStyle(element);\n const marginTop = parseFloat(style.marginTop || '0');\n const marginBottom = parseFloat(style.marginBottom || '0');\n\n return Math.ceil(height - element.clientHeight + marginTop + marginBottom);\n}\n\nexport function lightenDarkenColor(col: string, amt: number) {\n let usePound = false;\n\n if (col[0] === '#') {\n col = col.slice(1);\n usePound = true;\n }\n\n const num = parseInt(col, 16);\n\n let r = (num >> 16) + amt;\n\n if (r > 255) r = 255;\n else if (r < 0) r = 0;\n\n let b = ((num >> 8) & 0x00ff) + amt;\n\n if (b > 255) b = 255;\n else if (b < 0) b = 0;\n\n let g = (num & 0x0000ff) + amt;\n\n if (g > 255) g = 255;\n else if (g < 0) g = 0;\n\n return (usePound ? '#' : '') + String('000000' + (g | (b << 8) | (r << 16)).toString(16)).slice(-6);\n}\n\nexport function logout(client: DecafClient, fromAll?: boolean) {\n client.barista\n .get(`/auth/${fromAll ? 'logoutall' : 'logout'}`, { timeout: 3000 })\n .catch((e) => {\n if (fromAll) {\n console.error(e);\n alert('Failed to logout from all devices. Please try to logout from each device individually.');\n }\n })\n .finally(() => {\n const DECAF_AUTH_COOKIE_NAME = 'ember_simple_auth-session';\n Cookies.remove(DECAF_AUTH_COOKIE_NAME);\n window.location.reload();\n });\n}\n\nexport function getGravatarUrl(email: string): Promise<string | undefined> {\n const url = `https://www.gravatar.com/avatar/${md5(email)}`;\n\n return fetch(`${url}?d=404`, { method: 'HEAD' })\n .then((response) => (response.status !== 200 ? undefined : url))\n .catch(() => undefined);\n}\n\nexport type BooleanMap<T> = { True: T; False: T };\n\nexport function booleanMap<T>(map: BooleanMap<T>): (x: boolean) => T {\n return (x) => (x ? map.True : map.False);\n}\n\nexport type NullableBooleanMap<T> = { Null: T } & BooleanMap<T>;\n\nexport function nullableBooleanMap<T>(map: NullableBooleanMap<T>): (x?: boolean | undefined | null) => T {\n return (x) => (x == null ? map.Null : booleanMap(map)(x));\n}\n\nexport enum Direction {\n Short = -1,\n Square = 0,\n Long = 1,\n}\n\nexport function toDirection(x: number | Decimal | Direction): Direction {\n switch (new Decimal(0).comparedTo(x)) {\n case 1:\n return Direction.Short;\n case 0:\n return Direction.Square;\n case -1:\n return Direction.Long;\n }\n return Direction.Square;\n}\n\nexport type DirectionMap<T> = { Short: T; Square: T; Long: T };\n\nexport function directionMap<T>(map: DirectionMap<T>): (x: number | Decimal | Direction) => T {\n return (x) => {\n switch (toDirection(x)) {\n case Direction.Short:\n return map.Short;\n case Direction.Square:\n return map.Square;\n case Direction.Long:\n return map.Long;\n }\n };\n}\n\nexport function setAtKey<T>(array: T[], items: T[], key: keyof T): T[] {\n const result: T[] = [...array];\n\n items.forEach((item) => {\n const index = result.findIndex((r) => r[key] === item[key]);\n\n if (index >= 0) {\n result[index] = item;\n } else {\n result.push(item);\n }\n });\n\n return result;\n}\n\nexport type DecafLoaderFactory<T> = (context: DecafContextType) => DecafLoader<T>;\n\nexport type DecafLoader<T> = (args: { request: Request; params: Params; context?: any }) => Promise<T>;\n\nexport function getSearchParams(request: Request): URLSearchParams {\n return new URL(request.url).searchParams;\n}\n\nexport function getSearchParam(request: Request, name: string): string | null {\n return new URL(request.url).searchParams.get(name);\n}\n\nexport function getSearchParamDefault(request: Request, name: string, defaultValue: string): string {\n return new URL(request.url).searchParams.get(name) ?? defaultValue;\n}\n\nexport function getSearchParamAll(request: Request, name: string): string[] {\n return new URL(request.url).searchParams.getAll(name);\n}\n","import { Interpolation, Theme } from '@emotion/react';\nimport { theme } from 'antd';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport { lightenDarkenColor } from '../utils';\n\nconst DARK_BLACK_PRIMARY = '#10161d';\nconst DARK_BLACK_SECONDARY = 'rgb(31, 41, 55)';\nconst DARK_BLACK_ELEVATED = 'rgb(20, 29, 41)';\nconst LIGHT_WHITE_PRIMARY = '#f3f4f6';\nconst LIGHT_WHITE_SECONDARY = 'white';\nconst LIGHT_BLACK_ELEVATED = '#fafbfc';\nconst INPUT_BG_COLOR = '#2c3d50';\nconst BORDER_COLORS_TRANSPARENT = {\n colorBorder: 'transparent',\n colorBorderSecondary: 'transparent',\n colorBorderBg: 'transparent',\n};\n\nexport const decafThemeLight: ThemeConfig = {\n hashed: true,\n algorithm: [theme.defaultAlgorithm],\n components: {\n Layout: {\n colorBgHeader: '#ededed',\n },\n },\n token: {\n borderRadius: 0,\n colorBgContainer: LIGHT_WHITE_SECONDARY,\n colorBgBase: LIGHT_WHITE_PRIMARY,\n colorBgLayout: LIGHT_WHITE_PRIMARY,\n colorBgElevated: LIGHT_BLACK_ELEVATED,\n },\n};\n\nexport const decafThemeDark: ThemeConfig = {\n hashed: true,\n components: {\n Layout: {\n colorBgHeader: DARK_BLACK_PRIMARY,\n },\n Button: {\n boxShadow: 'none',\n boxShadowSecondary: 'none',\n colorBgContainer: INPUT_BG_COLOR,\n },\n Input: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Select: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Checkbox: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Dropdown: {\n ...BORDER_COLORS_TRANSPARENT,\n },\n DatePicker: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n colorBgElevated: INPUT_BG_COLOR,\n },\n InputNumber: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Menu: {\n itemColor: 'rgba(255, 255, 255, 0.5)',\n },\n },\n token: {\n fontFamily: 'Inter, sans-serif',\n colorPrimary: '#344961',\n colorBgBase: DARK_BLACK_SECONDARY,\n colorBgContainer: DARK_BLACK_PRIMARY,\n colorBgElevated: DARK_BLACK_ELEVATED,\n colorBorderSecondary: DARK_BLACK_SECONDARY,\n colorBorder: DARK_BLACK_SECONDARY,\n colorBgLayout: DARK_BLACK_SECONDARY,\n borderRadius: 0,\n green: '#48734d',\n red: '#b03a38',\n blue: '#0d6efd',\n yellow: '#ffc107',\n orange: '#fd7e14',\n colorWhite: '#fff',\n colorLink: '#a4bfff',\n colorLinkHover: '#7199fb',\n colorLinkActive: '#7199fb',\n },\n\n algorithm: [theme.darkAlgorithm],\n};\n\nfunction getBaseStyles(theme: ThemeConfig): Interpolation<Theme> {\n const menuOverride = {\n color: `white !important`,\n ':after': {\n borderBottomColor: 'white',\n },\n };\n\n return {\n body: {\n background: theme.token?.colorBgBase,\n fontFamily: 'Inter, sans-serif',\n margin: 0,\n },\n '#root': {\n minHeight: '100%',\n },\n button: {\n boxShadow: 'none !important',\n },\n '.ant-table-body': {\n overflow: 'auto !important',\n },\n '#decaf-header': {\n position: 'fixed',\n zIndex: 999,\n right: 0,\n left: 0,\n paddingInline: 16,\n display: 'flex',\n alignItems: 'center',\n },\n '#decaf-content': {\n paddingTop: 64,\n paddingBottom: 32,\n '#decaf-layout-breadcrumb': {\n backgroundColor: theme.token?.colorBgElevated,\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n width: '100%',\n height: 50,\n paddingInline: 16,\n boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.10)',\n ...breadcrumbStyles(),\n },\n '#decaf-layout-content-outlet': {\n minHeight: '100%',\n padding: 16,\n '&.full-screen': {\n padding: '0 !important',\n },\n },\n },\n '#decaf-footer': {\n position: 'fixed',\n bottom: 0,\n right: 0,\n left: 0,\n paddingBlock: 0,\n paddingInline: 0,\n zIndex: 999,\n boxShadow: '0px -2px 4px rgba(0, 0, 0, 0.15)',\n backgroundColor: decafThemeDark.components?.Layout?.colorBgHeader,\n },\n '.dot': {\n borderRadius: '50%',\n width: 10,\n height: 10,\n display: 'inline-block',\n backgroundColor: 'rgba(255,255,255,.25)',\n '&.green': {\n backgroundColor: `#80ff00 !important`,\n },\n '&.yellow': {\n backgroundColor: `#ff0 !important`,\n },\n '&.orange': {\n backgroundColor: `#ff7000 !important`,\n },\n '&.red': {\n backgroundColor: `#ff0000 !important`,\n },\n },\n '.ant-menu-item-selected': menuOverride,\n '.ant-menu-light.ant-menu-horizontal >.ant-menu-item-selected': menuOverride,\n '.ant-menu-light.ant-menu-horizontal >.ant-menu-submenu-selected, .ant-menu-light .ant-menu-submenu-selected >.ant-menu-submenu-title':\n menuOverride,\n };\n}\n\nexport function getLightStyles(theme: ThemeConfig): Interpolation<Theme> {\n const baseStyles = getBaseStyles(theme) as any;\n\n return {\n ...(baseStyles as any),\n };\n}\n\nexport function getDarkStyles(theme: ThemeConfig): Interpolation<Theme> {\n const baseStyles = getBaseStyles(theme) as any;\n\n return {\n ...baseStyles,\n '*': {\n '&::-webkit-scrollbar': {\n width: 10,\n height: 10,\n },\n '&::-webkit-scrollbar-track': {\n background: theme.token?.colorBgContainer,\n },\n '&::-webkit-scrollbar-thumb': {\n background: theme.token?.colorPrimary,\n },\n },\n '.ant-page-header-back-button, .ant-page-header-heading-title': {\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-badge-count': {\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-table-thead > tr > th': {\n background: `${lightenDarkenColor(theme.token?.colorBgContainer || '', -5)} !important`,\n '&:hover': {\n background: `${theme.token?.colorBgContainer} !important`,\n },\n },\n '.ant-table-filter-dropdown': {\n 'input, .ant-table-filter-dropdown-search-input': {\n background: `${theme.token?.colorBgBase} !important`,\n },\n '.ant-dropdown-menu-item, .ant-dropdown-menu': {\n background: `${theme.token?.colorBgContainer} !important`,\n },\n },\n '.ant-tabs-tab-active': {\n '.ant-tabs-tab-btn': {\n color: `${theme.token?.colorWhite} !important`,\n },\n },\n '.ant-radio-button-wrapper-checked': {\n backgroundColor: `${theme.components?.Button?.colorBgContainer} !important`,\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-picker-date-panel': {\n '.ant-picker-cell-in-range, .ant-picker-cell-range-start, .ant-picker-cell-range-end': {\n '&::before': {\n background: `${theme.token?.colorBgBase} !important`,\n },\n '.ant-picker-cell-inner': {\n background: `${theme.token?.colorBgBase} !important`,\n },\n },\n '.ant-picker-cell-range-start, .ant-picker-cell-range-end': {\n '.ant-picker-cell-inner': {\n background: `${theme.token?.colorPrimary} !important`,\n },\n },\n },\n };\n}\n\nfunction breadcrumbStyles() {\n const getCrumbColor = (theme: 'dark' | 'light') => {\n const colorBase = theme === 'dark' ? '255, 255, 255' : '0, 0, 0';\n return {\n color: `rgba(${colorBase}, 0.5) !important`,\n '&:hover': {\n color: `rgba(${colorBase}, 0.75) !important`,\n },\n };\n };\n\n const darkColors = {\n ...getCrumbColor('dark'),\n '&:last-child': {\n color: 'rgba(255, 255, 255, 0.85) !important',\n },\n };\n\n const lightColors = {\n ...getCrumbColor('light'),\n '&:last-child': {\n color: 'rgba(0, 0, 0, 0.85) !important',\n },\n };\n\n return {\n '.decaf-breadcrumb': {\n display: 'flex',\n alignItems: 'center',\n listStyle: 'none',\n margin: 0,\n padding: 0,\n '>li': {\n '&.separator': {\n paddingInline: 3,\n marginInline: 3,\n },\n 'a, span': {\n ...getCrumbColor('light'),\n },\n display: 'flex',\n alignItems: 'center',\n transition: 'color 0.2s',\n ...lightColors,\n },\n '&.dark': {\n '>li': {\n 'a, span': {\n ...getCrumbColor('dark'),\n },\n ...darkColors,\n },\n },\n },\n };\n}\n","import React from 'react';\n\nexport interface ThemeContextProps {\n theme: 'dark' | 'light';\n toggleTheme: () => void;\n}\n\nexport const ThemeContext = React.createContext<ThemeContextProps>({\n theme: 'dark',\n toggleTheme: () => {},\n});\n","import React from 'react';\nimport { ThemeContext } from './-theme-context';\n\nexport const useDecafTheme = () => React.useContext(ThemeContext);\n","import { css, Global } from '@emotion/react';\nimport { ConfigProvider } from 'antd';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport React from 'react';\nimport { decafThemeDark, decafThemeLight, getDarkStyles, getLightStyles } from './-styles';\nimport { ThemeContext } from './-theme-context';\n\nexport interface ThemeProviderProps {\n children: React.ReactNode;\n themeConfig?: ThemeConfig;\n theme?: 'dark' | 'light';\n}\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n const [value, setValue] = React.useState<'dark' | 'light'>(() => {\n const theme = props.theme || localStorage.getItem('decafAppTheme');\n if (theme === 'dark' || theme === 'light') {\n return theme;\n }\n return 'dark';\n });\n\n function setTheme() {\n const t = value === 'dark' ? 'light' : 'dark';\n setValue(t);\n localStorage.setItem('decafAppTheme', t);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n let theme = value === 'light' ? decafThemeLight : decafThemeDark;\n theme = { ...theme, ...(props.themeConfig || {}) };\n theme = { ...theme, token: { ...theme.token, fontFamily: 'Inter, sans-serif' } };\n\n const globalStyles = value === 'light' ? getLightStyles(theme) : getDarkStyles(theme);\n\n return (\n <ThemeContext.Provider\n value={{\n theme: value,\n toggleTheme: setTheme,\n }}\n >\n <ConfigProvider theme={theme}>\n <Global\n styles={css`\n @import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap);\n `}\n />\n <Global styles={globalStyles} />\n\n {props.children}\n </ConfigProvider>\n </ThemeContext.Provider>\n );\n}\n","import { DownOutlined, RightOutlined } from '@ant-design/icons';\nimport { Dropdown, Grid } from 'antd';\nimport React, { ReactNode } from 'react';\nimport { Link } from 'react-router-dom';\nimport { useDecafTheme } from '../theme';\n\nexport interface BreadcrumbItem {\n title: ReactNode;\n href?: string;\n children?: { title: ReactNode; href?: string }[];\n}\n\nexport interface BreadcrumbProps {\n items: BreadcrumbItem[];\n itemRender?: (item: BreadcrumbItem) => ReactNode;\n separator?: ReactNode;\n}\n\nexport function Breadcrumb(props: BreadcrumbProps) {\n const { items, itemRender, separator } = props;\n const { theme } = useDecafTheme();\n const breakpoints = Grid.useBreakpoint();\n\n const firstAndLAst = items.slice(0, 1).concat(items.slice(-1));\n const _items = breakpoints.lg ? items : firstAndLAst;\n\n return (\n <ul className={`decaf-breadcrumb ${theme}`}>\n {renderBreadcrumbs(_items, separator || <RightOutlined />, itemRender)}\n </ul>\n );\n}\n\nfunction renderBreadcrumbs(\n items: BreadcrumbItem[],\n separator: ReactNode,\n itemRender?: (item: BreadcrumbItem) => ReactNode\n) {\n const result: ReactNode[] = [];\n\n items.forEach((item, i) => {\n const isLast = i === items.length - 1;\n\n if (item.href && !isLast) {\n result.push(\n <li key={i}>\n {itemRender ? (\n itemRender(item)\n ) : (\n <Link className=\"decaf-breadcrumb-link\" to={item.href}>\n {item.title}\n </Link>\n )}\n </li>\n );\n } else if (item.children) {\n const dmenu = item.children.map((child, j) => ({\n key: j,\n label: (\n <Link className=\"decaf-breadcrumb-link\" to={child.href!}>\n {child.title}\n </Link>\n ),\n }));\n\n result.push(\n <li key={i}>\n <Dropdown menu={{ items: dmenu }}>\n <div style={{ display: 'flex', cursor: 'pointer', gap: 3 }}>\n <span>{item.title}</span>\n <DownOutlined style={{ fontSize: 12 }} />\n </div>\n </Dropdown>\n </li>\n );\n } else {\n result.push(<li key={i}>{item.title}</li>);\n }\n if (i < items.length - 1) {\n result.push(\n <li key={`sep-${i}`} className=\"separator\">\n {separator}\n </li>\n );\n }\n });\n\n return result;\n}\n","import { HomeOutlined } from '@ant-design/icons';\nimport { Layout } from 'antd';\nimport React from 'react';\nimport { useMatches } from 'react-router-dom';\nimport { Breadcrumb, BreadcrumbItem } from './Breadcrumb';\n\ntype PageBreadcrumb = React.ReactNode | false;\n\nexport interface PageProps {\n /** When true, removes paddings from the content area. */\n isFullScreen?: boolean;\n /** The extra content to be rendered in the top right corner of the page. */\n extras?: React.ReactNode;\n children?: React.ReactNode;\n /**\n * This is for overriding the breadcrumb section. Do not use this to define your own breadcrumbs.\n * Instead, use the `crumb` property of the route item.\n *\n * - When leave untouched or passed `undefined`, the breadcrumb section will be rendered based on the route item config.\n * - When `false`, the breadcrumb section will be disabled. There will be nothing rendered on the top left corner.\n * - When a ReactNode passed, the node will be rendered instead of the breadcrumbs.\n */\n breadcrumb?: PageBreadcrumb;\n}\n\n/**\n * Page component.\n * Wrapping your pages with this component will give you the following features:\n * - Breadcrumbs\n * - Full screen mode\n * - Extra content area on the top right corner\n * - Automatically setting the document title based on the breadcrumbs\n * - Override the breadcrumb section with your own content\n *\n * You can implement your pages without wrapping them with this. However, you will have to implement the above features yourself if needed.\n *\n * Example usage:\n *\n * ```jsx\n * <Page {...props}>\n * <div>My page content</div>\n * </Page>\n * ```\n */\nexport default function Page(props: PageProps) {\n const matches: any = useMatches();\n const match = matches?.[matches?.length - 1];\n const isFullScreen = props.isFullScreen !== undefined ? props.isFullScreen : !!match?.handle.fullScreen;\n const extras = props.extras !== undefined ? props.extras : match?.handle.extras;\n\n return (\n <Layout.Content id=\"decaf-content\" style={{ flex: 1, minHeight: '100%' }}>\n <DecafLayoutPageTitle />\n <DecafLayoutBreadcrumb breadcrumb={props.breadcrumb}>{extras}</DecafLayoutBreadcrumb>\n\n <div id=\"decaf-layout-content-outlet\" className={isFullScreen ? 'full-screen' : ''}>\n {props.children}\n </div>\n </Layout.Content>\n );\n}\n\nfunction getAppNameFromDocumentTitle() {\n const title = document.title;\n if (title.split(' | ').length > 1) {\n return title.split(' | ')[title.split(' | ').length - 1];\n } else {\n return title;\n }\n}\n\nfunction DecafLayoutPageTitle() {\n const matches: any = useMatches();\n const crumbs = matches\n .filter((match: any) => Boolean(match.handle?.crumb))\n .map((match: any) => match.handle.crumb(match.data));\n const appName = getAppNameFromDocumentTitle();\n const title = crumbs?.[crumbs.length - 1]?.title;\n\n if (title) {\n document.title = `${title} | ${appName}`;\n } else {\n document.title = appName;\n }\n\n return null;\n}\n\nfunction DecafLayoutBreadcrumb(props: { children?: React.ReactNode; breadcrumb?: PageBreadcrumb }) {\n const matches = useMatches();\n\n if (props.breadcrumb === false) {\n return (\n <div id=\"decaf-layout-breadcrumb\" style={{ justifyContent: 'flex-end' }}>\n <div>{props.children}</div>\n </div>\n );\n } else if (props.breadcrumb) {\n return (\n <div id=\"decaf-layout-breadcrumb\">\n {props.breadcrumb}\n <div>{props.children}</div>\n </div>\n );\n } else {\n const crumbs = matches\n .filter((match: any) => Boolean(match.handle?.crumb))\n .map((match: any) => match.handle.crumb(match.data));\n\n const breadcrumb: BreadcrumbItem[] = [{ href: '/', title: <HomeOutlined /> }, ...crumbs].map((x, i) => ({\n ...x,\n _key: i,\n }));\n\n if (breadcrumb.length < 2) {\n return <></>;\n }\n\n return (\n <div id=\"decaf-layout-breadcrumb\">\n <Breadcrumb items={breadcrumb} />\n <div>{props.children}</div>\n </div>\n );\n }\n}\n","import { QuestionCircleOutlined } from '@ant-design/icons';\nimport { Button, Grid, theme } from 'antd';\nimport React from 'react';\n\nexport default function DocumentationButton() {\n const { token } = theme.useToken();\n const breakpoints = Grid.useBreakpoint();\n\n return (\n <Button\n type=\"link\"\n href=\"https://docs.decafhub.com\"\n target=\"_blank\"\n rel=\"noreferrer\"\n icon={<QuestionCircleOutlined />}\n style={{ backgroundColor: token.colorBgElevated }}\n >\n {!breakpoints.xs && 'Documentation'}\n </Button>\n );\n}\n","import React from 'react';\n\nexport default function Logo() {\n return (\n <svg\n version=\"1.1\"\n id=\"Layer_1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 649.6 767.9\"\n enableBackground={'new 0 0 649.6 767.9'}\n xmlSpace=\"preserve\"\n width={32}\n height={32}\n >\n <g>\n <path\n fill=\"#52CEF4\"\n d=\"M324,767.9c-6.6-5.1-14.2-8.6-21.3-12.9c-22-13-44.3-25.6-66.4-38.5c-21.3-12.4-42.5-25-63.8-37.4\n c-33.5-19.5-67.1-39-100.7-58.5c-22.7-13.2-45.3-26.5-68-39.6c-2.8-1.6-3.8-3.3-3.8-6.5c0.2-58.6-0.2-117.3,0.4-175.9\n C1,333,0.7,267.3,1,201.6c0-1.8-0.6-3.7,0.6-5.4c6.4,3.8,12.7,7.6,19.1,11.3c23.8,13.9,47.7,27.9,71.5,41.8\n c4.9,2.9,9.6,6.2,14.9,8.4c-1.2,5.2-0.2,10.3-0.1,15.5c0.5,56.1-0.2,112.2,0.9,168.3c0.3,18.4,0.2,36.8,0.2,55.2\n c0,3,0.7,4.9,3.5,6.4c6.3,3.4,12.3,7.3,18.5,11c26.1,15.7,52.3,31.5,78.4,47.2c33,19.8,66,39.6,99,59.3c5.7,3.4,10.9,7.5,17.2,9.7\n c0,1.5,0.1,2.9,0.1,4.4c0,42.4,0,84.8,0,127.3c0,1.8-0.7,3.7,0.8,5.3c0,0.2,0,0.4,0,0.7C325.1,767.9,324.5,767.9,324,767.9z\"\n />\n <path\n fill=\"#227EC3\"\n d=\"M107.1,257.6c-5.3-2.2-10-5.5-14.9-8.4c-23.8-13.9-47.7-27.8-71.5-41.8c-6.4-3.7-12.7-7.6-19.1-11.3\n c8.2-6,17.1-10.7,25.7-16c28.7-17.5,57.5-34.9,86.3-52.4c39.2-23.8,78.5-47.6,117.7-71.4c27-16.3,53.9-32.7,80.9-49\n c4-2.4,8.1-4.6,11.7-7.4c1.3,0,2.7,0,4,0c0.3,1.6,1.9,1.8,2.9,2.4c31,18.9,62,37.8,93.1,56.4c4.2,2.5,5.9,5.2,5.9,10.3\n c-0.3,38.3-0.1,76.7-0.1,115c0,2.7-0.1,5.3-0.2,8c-10.5-6.3-21-12.5-31.4-18.9c-23.1-14-46.2-28-69.3-42c-1.6-1-2.8-1.6-5-0.4\n c-26.8,15.8-53.7,31.5-80.6,47.2c-26.1,15.2-52.2,30.4-78.3,45.7C145.7,235,126.4,246.3,107.1,257.6z\"\n />\n <path\n fill=\"#409DD5\"\n d=\"M324.7,630.2c5.2-4.2,11-7.4,16.7-10.9c32.6-20.3,65.3-40.6,98-60.8c30.8-19,61.6-38,92.4-57\n c7.5-4.6,7.5-4.6,7.5-13.6c0-58.6,0.1-117.3,0.1-175.9c0-1.6-0.1-3.2-0.1-4.8c0.8-1.5,0.4-3.1,0.4-4.7c0.1-14.7,0.2-29.5,0.3-44.2\n c1.3,0.1,2.4-0.4,3.4-1c8.7-5.1,17.4-10.2,26.1-15.3c15.8-9.2,31.7-18.3,47.6-27.5c10.5-6.1,21.1-12.3,31.6-18.4\n c1.5,0.9,0.8,2.4,0.8,3.6c0,124.2,0,248.4,0.1,372.6c0,2.7-0.9,4-3.1,5.3c-35.3,20.8-70.5,41.7-105.8,62.6\n c-27.2,16.1-54.5,32.2-81.7,48.4c-27,16-54,32.1-81,48c-17.4,10.3-34.8,20.4-52.3,30.7c-1.5-1.6-0.8-3.5-0.8-5.3\n c0-42.4,0-84.8,0-127.3C324.8,633.2,324.7,631.7,324.7,630.2z\"\n />\n <path\n fill=\"#227EC3\"\n d=\"M648.7,196.1c-10.5,6.1-21,12.3-31.6,18.4c-15.8,9.2-31.7,18.3-47.6,27.5c-8.7,5.1-17.4,10.2-26.1,15.3\n c-1,0.6-2.1,1.1-3.4,1c0-12.4-0.1-24.8-0.1-37.2c0-30.2,0-60.5,0-91c2.8,0.3,4.5,2,6.5,3.1c28.4,17.3,56.8,34.7,85.2,52\n C637.3,188.8,643.4,191.8,648.7,196.1z\"\n />\n <path\n fill=\"#227EC3\"\n d=\"M216.2,322.3c-0.3-1.6-0.4-2.9,1.4-4c29.2-18,58.4-36.1,87.5-54.1c4.7-2.9,9.5-5.8,14.2-8.9\n c1.5-1,2.7-1.1,4.3-0.2c26.9,15.9,53.8,31.8,80.7,47.7c7.1,4.2,14.1,8.5,21.4,12.4c3.5,1.9,4.8,4.3,3.9,8c-1.7,1.1-3.3,2.2-5,3.2\n c-20.5,11.9-41.1,23.8-61.6,35.7c-13,7.6-26.1,15.2-39.1,22.8c-7-4-14-8.1-21-12.1c-21.7-12.7-43.2-25.5-65-38\n C230.7,330.5,223.8,325.8,216.2,322.3z\"\n />\n <path\n fill=\"#52CEF4\"\n d=\"M216.2,322.3c7.6,3.5,14.5,8.2,21.8,12.4c21.7,12.5,43.3,25.3,65,38c7,4.1,14,8.1,21,12.1\n c0,39.3,0.1,78.6,0.1,117.9c-1.5,0.9-2.5-0.4-3.6-1c-21.3-12.8-42.5-25.5-63.7-38.3c-13.3-8-26.5-16.1-39.8-24\n c-1.8-1.1-2.5-2.3-2.5-4.4c0.4-26.9,0.4-53.8,1.1-80.7C215.8,343.6,215.4,332.9,216.2,322.3z\"\n />\n <path\n fill=\"#409DD5\"\n d=\"M324,502.6c0-39.3-0.1-78.6-0.1-117.9c13-7.6,26.1-15.2,39.1-22.8c20.5-11.9,41.1-23.8,61.6-35.7\n c1.7-1,3.3-2.1,5-3.2c0.1,7.6,0.1,15.2,0.1,22.8c0,30.5,0,61,0,91.5c0,2.6-0.4,4.4-2.9,5.8c-31.6,18.2-63,36.5-94.5,54.8\n C329.6,499.6,327.2,501.8,324,502.6z\"\n />\n </g>\n </svg>\n );\n}\n","import { EllipsisOutlined, MenuOutlined } from '@ant-design/icons';\nimport { Drawer, Grid, Menu, Typography } from 'antd';\nimport { ItemType, SubMenuType } from 'antd/es/menu/hooks/useItems';\nimport React, { useEffect } from 'react';\nimport { NavLink, useLocation, useMatches } from 'react-router-dom';\nimport { DecafMenuItem } from '../types';\n\nfunction buildAntMenuFromDecafMenu(routes: DecafMenuItem[]): ItemType[] {\n const result: ItemType[] = [];\n\n routes.forEach((route) => {\n const item: ItemType = {\n key: 'to' in route ? route.to : route.label,\n label: route.label,\n icon: route.icon,\n };\n\n if ('to' in route && route.to) {\n item.label = (\n <NavLink to={route.to} end={route.to === '/'}>\n {route.label}\n </NavLink>\n );\n } else if ('href' in route && route.href) {\n item.label = <a href={route.href}>{route.label}</a>;\n } else if (route.children) {\n item.label = route.label;\n (item as SubMenuType).children = buildAntMenuFromDecafMenu(route.children || []);\n }\n\n result.push(item);\n });\n\n return result;\n}\n\nexport function DecafPoweredBy() {\n return (\n <Typography.Text type=\"secondary\">\n Powered by{' '}\n <a href=\"https://teloscube.com\" target=\"_blank\" rel=\"noreferrer\">\n Teloscube\n </a>\n </Typography.Text>\n );\n}\n\nexport interface MenuProps {\n title: string;\n menu: DecafMenuItem[];\n}\n\nexport default function DecafMenu(props: MenuProps) {\n const [drawerOpen, setDrawerOpen] = React.useState(false);\n const matches = useMatches();\n const location = useLocation();\n const { md } = Grid.useBreakpoint();\n\n const menuItems = buildAntMenuFromDecafMenu(props.menu);\n const matchedMenuItems = matches\n .map((match) => match.pathname)\n .filter((pathname) => (location.pathname !== '/' ? pathname !== '/' : true)); // WORKAROUND: the root path always matches. We don't want that.\n\n useEffect(() => {\n if (!md) {\n setDrawerOpen(false);\n }\n }, [location.pathname, md]);\n\n const menu = (\n <Menu\n items={[...menuItems]}\n selectedKeys={matchedMenuItems}\n mode={md ? 'horizontal' : 'inline'}\n overflowedIndicator={<EllipsisOutlined style={{ fontSize: 20, color: 'white' }} />}\n style={{ flex: 'auto', justifyContent: 'flex-end', backgroundColor: 'transparent', border: 'none', minWidth: 0 }}\n />\n );\n\n if (md) {\n return menu;\n }\n\n return (\n <div style={{ display: 'flex', flex: 'auto', justifyContent: 'flex-end' }}>\n <MenuOutlined style={{ fontSize: 20, marginRight: 20 }} onClick={() => setDrawerOpen(!drawerOpen)} />\n\n <Drawer\n open={drawerOpen}\n footer={<DecafPoweredBy />}\n onClose={() => setDrawerOpen(false)}\n bodyStyle={{ padding: 10 }}\n width={document.body.clientWidth - 50 > 350 ? 350 : document.body.clientWidth * 0.85}\n >\n {menu}\n </Drawer>\n </div>\n );\n}\n","import { DownOutlined, UpOutlined } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport React from 'react';\n\nexport default function PageScroller() {\n return (\n <div style={{ display: 'flex' }}>\n <Button\n type=\"text\"\n icon={<UpOutlined />}\n title=\"Scroll to top\"\n onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })}\n />\n <Button\n type=\"text\"\n icon={<DownOutlined />}\n title=\"Scroll to bottom\"\n onClick={() => window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' })}\n />\n </div>\n );\n}\n","import { CameraOutlined } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport html2canvas from 'html2canvas';\nimport React from 'react';\n\nexport interface ScreenShotterProps {\n triggerNode?: React.ReactNode;\n}\n\nexport default function ScreenShotter(props: ScreenShotterProps) {\n async function handleScreenshot() {\n // hide footer before taking screenshot\n const footer = document.getElementById('decaf-footer');\n footer?.style.setProperty('display', 'none');\n\n const canvas = await html2canvas(document.body);\n const dataUrl = canvas.toDataURL('image/png');\n\n // show footer after taking screenshot\n footer?.style.setProperty('display', 'block');\n\n const link = document.createElement('a');\n link.download = 'screenshot.png';\n link.href = dataUrl;\n link.click();\n link.remove();\n }\n\n if (props.triggerNode) {\n return React.cloneElement(props.triggerNode as React.ReactElement, {\n onClick: handleScreenshot,\n });\n }\n\n return (\n <Button\n type=\"text\"\n icon={<CameraOutlined />}\n title=\"Take a screenshot of the current page\"\n onClick={handleScreenshot}\n />\n );\n}\n","import { BulbFilled, BulbOutlined } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport React from 'react';\n\ninterface ThemeSwitcherProps {\n theme: 'dark' | 'light';\n onChange: () => void;\n}\nexport default function ThemeSwitcher(props: ThemeSwitcherProps) {\n return (\n <Button\n type=\"text\"\n icon={props.theme === 'dark' ? <BulbFilled /> : <BulbOutlined />}\n title={props.theme === 'dark' ? 'Switch to light theme' : 'Switch to dark theme'}\n onClick={() => props.onChange()}\n />\n );\n}\n","import { InfoCircleOutlined, LogoutOutlined, UserOutlined } from '@ant-design/icons';\nimport { useDecaf } from '@decafhub/decaf-react';\nimport { Avatar, Dropdown } from 'antd';\nimport React, { useEffect, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { getGravatarUrl, logout } from '../utils';\n\nexport function UserProfileDropdown() {\n const [gravatar, setGravatar] = useState<string | undefined>(undefined);\n const decaf = useDecaf();\n const navigate = useNavigate();\n\n useEffect(() => {\n if (!decaf.me.email) {\n return;\n }\n\n getGravatarUrl(decaf.me.email).then(setGravatar);\n }, [decaf.me.email]);\n\n const doLogout = () => logout(decaf.client, false);\n const doLogoutAll = () => window.confirm('Logout from all sessions?') && logout(decaf.client, true);\n const doGoToAbout = () => navigate('/about');\n\n const items = [\n {\n key: 'me',\n label: decaf.me.fullname || decaf.me.username,\n title: decaf.me.email,\n disabled: true,\n icon: <UserOutlined />,\n style: { cursor: 'default' },\n },\n { key: 'divider-1', dashed: true, type: 'divider' },\n { key: 'logout', label: 'Logout', icon: <LogoutOutlined />, onClick: doLogout },\n { key: 'logout-all', label: 'Logout All Sessions', icon: <LogoutOutlined />, onClick: doLogoutAll },\n { key: 'divider-2', dashed: true, type: 'divider' },\n { key: 'about', label: 'About', icon: <InfoCircleOutlined />, onClick: doGoToAbout },\n ];\n\n const propsAvatar: any = gravatar\n ? { src: gravatar }\n : {\n icon: <UserOutlined style={{ color: 'rgba(255,255,255, 0.5)' }} />,\n style: { backgroundColor: 'transparent', border: '1px solid rgba(255,255,255, 0.5)' },\n };\n\n return (\n <Dropdown trigger={['click']} menu={{ items }}>\n <Avatar {...propsAvatar} style={{ ...propsAvatar.style, cursor: 'pointer' }} />\n </Dropdown>\n );\n}\n","import { CaretUpOutlined } from '@ant-design/icons';\nimport { Button, Dropdown, Grid } from 'antd';\nimport React from 'react';\n\ntype VersionCode = 'production' | 'staging' | 'testing' | 'development' | 'preview' | 'release';\n\nexport type Version = {\n code: VersionCode;\n name: string;\n color: string;\n url: string;\n show: boolean;\n};\n\nfunction getAppNameFromUrl(url: string) {\n const parts = url.split('/');\n const indexOfWebapps = parts.indexOf('webapps');\n if (indexOfWebapps === -1) {\n return '';\n } else {\n return parts[indexOfWebapps + 1];\n }\n}\n\nfunction getAppVersionFromUrl(url: string) {\n const parts = url.split('/');\n const indexOfWebapps = parts.indexOf('webapps');\n if (indexOfWebapps === -1) {\n return '';\n } else {\n return parts[indexOfWebapps + 2];\n }\n}\n\nfunction isPreviewVersion(version: string) {\n return version.startsWith('preview-') && version.length > 8;\n}\n\nfunction isReleaseVersion(version: string) {\n return version.startsWith('v') && version.length > 1;\n}\n\nfunction getAppVersionCode(version: string) {\n if (isPreviewVersion(version)) {\n return 'preview';\n } else if (isReleaseVersion(version)) {\n return 'release';\n } else {\n return version;\n }\n}\n\nfunction getCurrentAppPath(url: string) {\n const parts = url.split('/');\n const indexOfWebapps = parts.indexOf('webapps');\n if (indexOfWebapps === -1) {\n return '';\n } else {\n return parts.slice(indexOfWebapps + 3).join('/');\n }\n}\n\nexport default function VersionSelector() {\n const appName = getAppNameFromUrl(window.location.href);\n const appVersion = getAppVersionFromUrl(window.location.href); // development, staging, preview-123, v1.0.0\n const appVersionCode = getAppVersionCode(appVersion); // development, staging, preview, release\n const { md } = Grid.useBreakpoint();\n\n const versions: Version[] = [\n {\n code: 'development',\n name: 'Development Version',\n color: 'red',\n url: `/webapps/${appName}/development/${getCurrentAppPath(window.location.href)}`,\n show: process.env.NODE_ENV === 'development',\n },\n {\n code: 'testing',\n name: 'Testing Version',\n color: 'orange',\n url: `/webapps/${appName}/testing/${getCurrentAppPath(window.location.href)}`,\n show: true,\n },\n {\n code: 'staging',\n name: 'Staging Version',\n color: 'yellow',\n url: `/webapps/${appName}/staging/${getCurrentAppPath(window.location.href)}`,\n show: true,\n },\n {\n code: 'production',\n name: 'Production Version',\n color: 'green',\n url: `/webapps/${appName}/production/${getCurrentAppPath(window.location.href)}`,\n show: true,\n },\n {\n code: 'preview',\n name: 'Preview Version',\n color: 'grey',\n url: `/`,\n show: false,\n },\n {\n code: 'release',\n name: 'Release Version',\n color: 'grey',\n url: `/`,\n show: false,\n },\n ];\n\n const currentVersion = versions.find((v) => v.code === appVersionCode);\n const isProd = currentVersion?.code === 'production';\n\n if (!currentVersion) {\n return null;\n }\n\n return (\n <Dropdown\n placement=\"top\"\n arrow\n menu={{\n items: versions\n .filter((v) => v.show)\n .map((version) => ({\n key: version.name,\n label: (\n <span>\n <i className={`dot ${version.color}`} /> {version.name}\n </span>\n ),\n onClick: () => {\n window.location.href = version.url;\n },\n })),\n }}\n >\n <Button\n type=\"text\"\n style={{\n width: isProd ? 32 : 'initial',\n padding: isProd ? 0 : 'revert',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n icon={<i className={`dot ${currentVersion?.color}`} />}\n >\n <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>\n {!isProd && md && (\n <>\n <span style={{ marginInline: 5 }}>\n You are on <b>{currentVersion.name}</b>\n </span>\n <CaretUpOutlined />\n </>\n )}\n </div>\n </Button>\n </Dropdown>\n );\n}\n","import { MessageOutlined } from '@ant-design/icons';\nimport { useDecaf } from '@decafhub/decaf-react';\nimport { Button, Grid, theme } from 'antd';\nimport React, { useEffect, useState } from 'react';\n\nconst ZENDESK_WIDGET_SCRIPT = 'https://static.zdassets.com/ekr/snippet.js';\n\ndeclare global {\n // eslint-disable-next-line no-unused-vars\n interface Window {\n zE: any;\n zESettings: any;\n }\n}\n\nexport default function ZendeskWidget() {\n const { me, publicConfig } = useDecaf();\n const [open, setOpen] = useState(false);\n const { token } = theme.useToken();\n const breakpoints = Grid.useBreakpoint();\n\n useEffect(() => {\n if (!publicConfig.zendesk || typeof document === 'undefined') return;\n const script = document.createElement('script');\n script.src = ZENDESK_WIDGET_SCRIPT + '?key=' + publicConfig.zendesk;\n script.async = true;\n script.id = 'ze-snippet'; // do not change this. zendesk expects this to be ze-snippet\n script.onload = () => {\n window.zE('webWidget', 'hide');\n window.zE('webWidget:on', 'open', () => {\n window.zE('webWidget', 'show');\n setOpen(true);\n });\n window.zE('webWidget:on', 'close', () => {\n window.zE('webWidget', 'hide');\n setOpen(false);\n });\n };\n\n document.body.appendChild(script);\n window.zESettings = {\n webWidget: {\n offset: {\n horizontal: -7,\n vertical: 20,\n },\n },\n contactForm: {\n subject: true,\n fields: [\n {\n id: 'name',\n prefill: { '*': me.fullname },\n },\n {\n id: 'email',\n prefill: { '*': me.email },\n },\n ],\n },\n };\n\n return () => {\n document.body.removeChild(script);\n };\n }, [publicConfig, me]);\n\n function toggle() {\n if (open) {\n window.zE?.('webWidget', 'close');\n } else {\n window.zE?.('webWidget', 'open');\n }\n setOpen(!open);\n }\n\n if (!publicConfig.zendesk) return null;\n\n return (\n <Button type=\"link\" icon={<MessageOutlined />} style={{ backgroundColor: token.colorBgElevated }} onClick={toggle}>\n {!breakpoints.xs && 'Support'}\n </Button>\n );\n}\n","import { useNProgress } from '@tanem/react-nprogress';\nimport { Col, ConfigProvider, Grid, Layout, Row, Typography } from 'antd';\nimport React from 'react';\nimport { Link, Outlet, useLocation, useNavigation } from 'react-router-dom';\nimport { decafThemeDark, useDecafTheme } from '../theme';\nimport { DecafMenuItem } from '../types';\nimport DocumentationButton from './DocumentationButton';\nimport Logo from './Logo';\nimport DecafMenu, { DecafPoweredBy } from './Menu';\nimport PageScroller from './PageScroller';\nimport ScreenShotter from './Screenshotter';\nimport ThemeSwitcher from './ThemeSwitcher';\nimport { UserProfileDropdown } from './UserProfileDropdown';\nimport VersionSelector from './VersionSelector';\nimport ZendeskWidget from './ZendeskWidget';\n\nexport interface DecafLayoutProps {\n menu: DecafMenuItem[];\n appName: string;\n children?: React.ReactNode;\n}\n\nexport default function DecafLayout(props: DecafLayoutProps) {\n const location = useLocation();\n const navigation = useNavigation();\n const breakpoints = Grid.useBreakpoint();\n const { theme: currentTheme, toggleTheme: setCurrentTheme } = useDecafTheme();\n\n return (\n <Layout style={{ height: '100%' }}>\n <DecafLayoutProgress isAnimating={navigation.state === 'loading'} key={location.key} />\n\n <ConfigProvider theme={decafThemeDark}>\n <Layout.Header id=\"decaf-header\">\n <DecafLayoutBrand title={props.appName} />\n <DecafMenu title={props.appName} menu={props.menu} />\n <UserProfileDropdown />\n </Layout.Header>\n </ConfigProvider>\n\n <Outlet />\n {props.children ?? null}\n\n <ConfigProvider theme={decafThemeDark}>\n <Layout.Footer id=\"decaf-footer\">\n <Row justify=\"space-between\" align={'middle'}>\n <Col span={breakpoints.lg ? 10 : 12}>\n <ZendeskWidget />\n <span style={{ display: 'inline-block', width: 1 }} />\n <DocumentationButton />\n </Col>\n\n <Col span={breakpoints.lg ? 4 : 0} style={{ textAlign: 'center' }}>\n <DecafPoweredBy />\n </Col>\n\n <Col span={breakpoints.lg ? 10 : 12} style={{ justifyContent: 'flex-end', display: 'flex', gap: 10 }}>\n <VersionSelector />\n <ThemeSwitcher theme={currentTheme} onChange={setCurrentTheme} />\n <ScreenShotter />\n <PageScroller />\n </Col>\n </Row>\n </Layout.Footer>\n </ConfigProvider>\n </Layout>\n );\n}\n\nexport function DecafLayoutBrand({ title }: { title: string }) {\n const breakpoints = Grid.useBreakpoint();\n\n return (\n <Link to=\"/\" style={{ display: 'flex', alignItems: 'center', gap: 10 }}>\n <Logo />\n\n {breakpoints.lg && (\n <Typography.Title\n level={1}\n style={{\n margin: 0,\n fontWeight: 'normal',\n fontSize: 20,\n color: 'rgba(255, 255, 255, 0.75)',\n whiteSpace: 'nowrap',\n }}\n >\n {title}\n </Typography.Title>\n )}\n </Link>\n );\n}\n\nexport function DecafLayoutProgress({ isAnimating }: { isAnimating: boolean }) {\n const { animationDuration, isFinished, progress } = useNProgress({ isAnimating });\n\n return (\n <div\n style={{\n opacity: isFinished ? 0 : 1,\n pointerEvents: 'none',\n transition: `opacity ${animationDuration}ms linear`,\n }}\n >\n <div\n style={{\n background: '#29d',\n height: 2,\n left: 0,\n marginLeft: `${(-1 + progress) * 100}%`,\n position: 'fixed',\n top: 0,\n transition: `margin-left ${animationDuration}ms linear`,\n width: '100%',\n zIndex: 1031,\n }}\n >\n <div\n style={{\n boxShadow: '0 0 10px #29d, 0 0 5px #29d',\n display: 'block',\n height: '100%',\n opacity: 1,\n position: 'absolute',\n right: 0,\n transform: 'rotate(3deg) translate(0px, -4px)',\n width: 100,\n }}\n />\n </div>\n </div>\n );\n}\n","import { useDecaf } from '@decafhub/decaf-react';\nimport { Card, Col, Row, Statistic } from 'antd';\nimport React, { useEffect, useState } from 'react';\nimport Page from './Page';\n\nexport interface AboutPageProps {\n appName?: string;\n appVersion?: string;\n appDescription?: string;\n content?: React.ReactNode;\n}\n\nexport default function PageAbout(props: AboutPageProps) {\n const { client } = useDecaf();\n const [versionCultproxy, setVersionCultproxy] = useState<string | undefined>(undefined);\n const [versionBarista, setVersionBarista] = useState<string | undefined>(undefined);\n const [versionEstate, setVersionEstate] = useState<string | undefined>(undefined);\n\n useEffect(() => {\n client.bare.get<{ version: string }>('/_cultproxy').then(({ data }) => setVersionCultproxy(data.version));\n client.barista.get<{ version: string }>('/version/').then(({ data }) => setVersionBarista(data.version));\n client.bare.get<string>('/apis/estate/version').then(({ data }) => setVersionEstate(data));\n }, [client]);\n\n return (\n <Page>\n <Row gutter={[16, 16]}>\n <Col xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 24 }} lg={{ span: 12 }} xl={{ span: 8 }} xxl={{ span: 6 }}>\n <Card bordered={false}>\n <Statistic title=\"Application Name\" value={props.appName} />\n </Card>\n </Col>\n\n <Col xs={{ span: 24 }} lg={{ span: 12 }} xl={{ span: 16 }} xxl={{ span: 18 }}>\n <Card bordered={false}>\n <Statistic title=\"Application Description\" value={props.appDescription} />\n </Card>\n </Col>\n\n <Col xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 12 }} xl={{ span: 6 }} xxl={{ span: 6 }}>\n <Card bordered={false}>\n <Statistic title=\"Application Version\" value={props.appVersion} prefix=\"v\" />\n </Card>\n </Col>\n\n <Col xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 12 }} xl={{ span: 6 }} xxl={{ span: 6 }}>\n <Card bordered={false}>\n <Statistic title=\"DECAF Cultproxy Version\" value={versionCultproxy} prefix=\"v\" />\n </Card>\n </Col>\n\n <Col xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 12 }} xl={{ span: 6 }} xxl={{ span: 6 }}>\n <Card bordered={false}>\n <Statistic title=\"DECAF Barista Version\" value={versionBarista} prefix=\"v\" />\n </Card>\n </Col>\n\n <Col xs={{ span: 24 }} sm={{ span: 24 }} md={{ span: 12 }} lg={{ span: 12 }} xl={{ span: 6 }} xxl={{ span: 6 }}>\n <Card bordered={false}>\n <Statistic title=\"DECAF Estate Version\" value={versionEstate} prefix=\"v\" />\n </Card>\n </Col>\n\n <Col span={24}>{props.content}</Col>\n </Row>\n </Page>\n );\n}\n","import {\n DecafApp,\n DecafAppConfig,\n DecafAppController,\n DecafContextType,\n DecafWebappController,\n useDecaf,\n} from '@decafhub/decaf-react';\nimport 'antd/dist/reset.css';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport qs from 'query-string';\nimport React, { useEffect } from 'react';\nimport { RouteObject, RouterProvider, createBrowserRouter } from 'react-router-dom';\nimport { QueryParamProvider } from 'use-query-params';\nimport { ReactRouter6Adapter } from 'use-query-params/adapters/react-router-6';\nimport { BreadcrumbItem } from '../components/Breadcrumb';\nimport { Page404, PageRouteError } from '../components/Error';\nimport DecafLayout from '../components/Layout';\nimport Page from '../components/Page';\nimport PageAbout from '../components/PageAbout';\nimport { ThemeProvider } from '../theme';\nimport { DecafMenuItem } from '../types';\nimport { setAtKey } from '../utils';\nimport { getPlausibleScript } from './-plausible';\n\n/**\n * DECAF Web appliaction route type.\n */\nexport type DecafRoute = Omit<RouteObject, 'children'> & {\n /** Define breadcrumbs for this route.\n *\n * @param data It is the return value of the `loader` function.\n * @returns A breadcrumb item.\n *\n * Example:\n * ```ts\n * { crumb: (data?: MyRecord) => ({ title: data?.title, href: `/details/${data?.id}` }) }\n * // or\n * { crumb: () => ({ title: \"My Page\", href: `/my-page` }) }\n * ```\n */\n crumb?: (data?: any) => BreadcrumbItem;\n /** When true, removes paddings from the content area. */\n fullScreen?: boolean;\n /** The extra content to be rendered in the top right corner of the page. */\n extras?: React.ReactNode;\n /** Child routes. */\n children?: DecafRoute[];\n};\n\n/**\n * DECAF Web application route items builder.\n */\nexport type DecafRouteItemsBuilder = (context: DecafContextType) => DecafRoute[];\n\n/**\n * DECAF Web application menu items builder.\n */\nexport type DecafMenuItemsBuilder = (context: DecafContextType) => DecafMenuItem[];\n\n/**\n * DECAF Web application properties.\n */\nexport interface DecafWebappProps {\n /**\n * DECAF application name.\n */\n appName: string;\n\n /**\n * DECAF application description.\n */\n appDescription?: string;\n\n /**\n * DECAF application configuration.\n */\n config?: DecafAppConfig;\n\n /**\n * DECAF application controller.\n */\n controller?: DecafAppController;\n\n /**\n * The theme of the app.\n *\n * Defaults to `dark`.\n */\n theme?: 'dark' | 'light';\n\n /**\n * The theme config of the app.\n *\n * This will be merged with the default theme config (dark or light).\n *\n * See https://ant.design/docs/react/customize-theme\n */\n themeConfig?: ThemeConfig;\n\n /**\n * Builds a collection of DECAF route items.\n *\n * About page and 404 page will be added automatically.\n *\n * See https://reactrouter.com/en/main/routers/create-browser-router#routes\n */\n buildRouteItems: DecafRouteItemsBuilder;\n\n /**\n * Builds a collection of DECAF menu items.\n *\n * About page will be added automatically.\n */\n buildMenuItems: DecafMenuItemsBuilder;\n\n /**\n * The extra content to show on the about page.\n */\n buildAboutPageContent?: (context: DecafContextType) => React.ReactNode;\n}\n\nexport function DecafWebapp(props: DecafWebappProps) {\n // Manage Plausible script:\n useEffect(() => {\n const script = getPlausibleScript();\n document.body.appendChild(script);\n return () => {\n document.body.removeChild(script);\n };\n }, []);\n\n // Get or create the DECAF Webapp controller:\n const controller = props.controller || DecafWebappController;\n controller.disableZendeskWidget = true;\n\n // Prepare the DECAF Web application and return:\n return (\n <ThemeProvider themeConfig={props.themeConfig} theme={props.theme}>\n <DecafApp config={props.config} controller={controller}>\n <DecafWebappInternal {...props} />\n </DecafApp>\n </ThemeProvider>\n );\n}\n\n/**\n * Auxiliary DECAF Webapp component.\n */\nexport function DecafWebappInternal(props: DecafWebappProps) {\n const decaf = useDecaf();\n\n const defaultRoutes = [\n {\n path: '/about',\n element: (\n <PageAbout\n appName={props.appName}\n appVersion={props.config?.currentVersion}\n appDescription={props.appDescription}\n content={props.buildAboutPageContent?.(decaf)}\n />\n ),\n crumb: () => ({ title: 'About' }),\n },\n {\n path: '*',\n element: (\n <Page>\n <Page404 />\n </Page>\n ),\n crumb: () => ({ title: 'Page Not Found' }),\n },\n ];\n\n const routes = setAtKey<DecafRoute>(props.buildRouteItems(decaf), defaultRoutes, 'path');\n\n const router = createBrowserRouter(compileRoutes(props, decaf, routes), { basename: props.config?.basePath });\n\n return <RouterProvider router={router} />;\n}\n\nexport function compileRoutes(props: DecafWebappProps, context: DecafContextType, routes: DecafRoute[]) {\n const menu = props.buildMenuItems(context);\n return [\n {\n element: (\n <QueryParamProvider\n adapter={ReactRouter6Adapter}\n options={{\n removeDefaultsFromUrl: true,\n searchStringToObject: qs.parse,\n objectToSearchString: qs.stringify,\n enableBatching: true,\n includeAllParams: true,\n }}\n >\n <DecafLayout menu={menu} appName={props.appName} />\n </QueryParamProvider>\n ),\n path: '/',\n children: routes.map(decafRouteToReactRoute),\n errorElement: (\n <DecafLayout menu={menu} appName={props.appName}>\n <Page breadcrumb={false}>\n <PageRouteError />\n </Page>\n </DecafLayout>\n ),\n },\n ];\n}\n\nexport function decafRouteToReactRoute(route: DecafRoute): RouteObject {\n const { crumb, fullScreen, extras, children, ...rest } = route;\n\n if (children) {\n // @ts-expect-error\n return { ...rest, handle: { crumb, fullScreen, extras }, children: children.map(decafRouteToReactRoute) };\n } else {\n return { ...rest, handle: { crumb, fullScreen, extras } };\n }\n}\n","export function getPlausibleScript(): HTMLScriptElement {\n const script = document.createElement('script');\n\n script.defer = true;\n script.setAttribute('data-domain', location.hostname);\n script.src = 'https://webax.svc.sys.decafhub.com/js/plausible.js';\n\n return script;\n}\n"],"names":["ErrorPageSubtitle","message","React","createElement","Fragment","Typography","Link","to","Button","style","marginTop","Page401","Result","icon","LockFilled","color","title","subTitle","Page403","status","Page404","PageError","PageRouteError","error","useRouteError","isRouteErrorResponse","FOOTER_HEIGHT","FOOTER_PADDING","useRemaningHeight","elementId","remainingHeight","setRemainingHeight","useState","useLayoutEffect","e","document","getElementById","calculate","elementTop","getBoundingClientRect","top","elementHeight","window","innerHeight","addEventListener","removeEventListener","useTableMaxHeight","bottomSpace","maxHeight","setMaxHeight","remaining","observer","useRef","w","current","ResizeObserver","max","forEach","tableWrapper","_tableWrapper$target$","tHeaderHeight","getElementComputedHeight","target","querySelector","tFooterHeight","tContainerOffset","getElementTotalOffset","paginations","querySelectorAll","paginationHeights","Array","from","reduce","acc","cur","observe","closest","_observer$current","disconnect","element","height","offset","Math","ceil","getComputedStyle","parseFloat","marginBottom","clientHeight","lightenDarkenColor","col","amt","usePound","slice","num","parseInt","r","b","g","String","toString","logout","client","fromAll","barista","get","timeout","catch","console","alert","finally","Cookies","remove","location","reload","booleanMap","map","x","True","False","nullableBooleanMap","Null","Direction","toDirection","Decimal","comparedTo","Short","Square","Long","directionMap","setAtKey","array","items","key","result","item","index","findIndex","push","getSearchParams","request","URL","url","searchParams","getSearchParam","name","getSearchParamDefault","defaultValue","_URL$searchParams$get","getSearchParamAll","getAll","DARK_BLACK_PRIMARY","DARK_BLACK_SECONDARY","LIGHT_WHITE_PRIMARY","INPUT_BG_COLOR","BORDER_COLORS_TRANSPARENT","colorBorder","colorBorderSecondary","colorBorderBg","decafThemeLight","hashed","algorithm","theme","defaultAlgorithm","components","Layout","colorBgHeader","token","borderRadius","colorBgContainer","colorBgBase","colorBgLayout","colorBgElevated","decafThemeDark","boxShadow","boxShadowSecondary","Input","_extends","Select","Checkbox","Dropdown","DatePicker","InputNumber","Menu","itemColor","fontFamily","colorPrimary","green","red","blue","yellow","orange","colorWhite","colorLink","colorLinkHover","colorLinkActive","darkAlgorithm","getBaseStyles","_theme$token","_theme$token2","_decafThemeDark$compo","_decafThemeDark$compo2","menuOverride","borderBottomColor","body","background","margin","minHeight","button","overflow","position","zIndex","right","left","paddingInline","display","alignItems","paddingTop","paddingBottom","backgroundColor","flexDirection","justifyContent","width","breadcrumbStyles","padding","bottom","paddingBlock","getCrumbColor","colorBase","darkColors","lightColors","listStyle","marginInline","transition","ThemeContext","createContext","toggleTheme","useDecafTheme","useContext","ThemeProvider","props","value","setValue","localStorage","getItem","themeConfig","globalStyles","baseStyles","getLightStyles","_theme$token3","_theme$token4","_theme$token5","_theme$token6","_theme$token7","_theme$token8","_theme$token9","_theme$token10","_theme$token11","_theme$components","_theme$components$But","_theme$token12","_theme$token13","_theme$token14","_theme$token15","getDarkStyles","Provider","t","setItem","ConfigProvider","Global","styles","css","_t","_","children","Breadcrumb","itemRender","separator","breakpoints","Grid","useBreakpoint","firstAndLAst","concat","className","i","href","length","dmenu","child","j","label","menu","cursor","gap","DownOutlined","fontSize","renderBreadcrumbs","lg","RightOutlined","Page","matches","useMatches","match","isFullScreen","undefined","handle","fullScreen","extras","Content","id","flex","DecafLayoutPageTitle","DecafLayoutBreadcrumb","breadcrumb","_crumbs","crumbs","filter","_match$handle","Boolean","crumb","data","appName","split","getAppNameFromDocumentTitle","_match$handle2","HomeOutlined","_key","DocumentationButton","useToken","type","rel","QuestionCircleOutlined","xs","Logo","version","xmlns","xmlnsXlink","y","viewBox","enableBackground","xmlSpace","fill","d","buildAntMenuFromDecafMenu","routes","route","NavLink","end","DecafPoweredBy","Text","DecafMenu","drawerOpen","setDrawerOpen","useLocation","md","menuItems","matchedMenuItems","pathname","useEffect","selectedKeys","mode","overflowedIndicator","EllipsisOutlined","border","minWidth","MenuOutlined","marginRight","onClick","Drawer","open","footer","onClose","bodyStyle","clientWidth","PageScroller","UpOutlined","scrollTo","behavior","scrollHeight","ScreenShotter","async","handleScreenshot","setProperty","dataUrl","html2canvas","toDataURL","link","download","click","triggerNode","cloneElement","CameraOutlined","ThemeSwitcher","BulbFilled","BulbOutlined","onChange","UserProfileDropdown","gravatar","setGravatar","decaf","useDecaf","navigate","useNavigate","me","email","md5","fetch","method","then","response","getGravatarUrl","fullname","username","disabled","UserOutlined","dashed","LogoutOutlined","doLogout","doLogoutAll","confirm","InfoCircleOutlined","doGoToAbout","propsAvatar","src","trigger","Avatar","getCurrentAppPath","parts","indexOfWebapps","indexOf","join","VersionSelector","getAppNameFromUrl","appVersionCode","startsWith","isPreviewVersion","getAppVersionFromUrl","isReleaseVersion","versions","code","show","process","env","NODE_ENV","currentVersion","find","v","isProd","placement","arrow","CaretUpOutlined","ZENDESK_WIDGET_SCRIPT","ZendeskWidget","publicConfig","setOpen","zendesk","script","onload","zE","appendChild","zESettings","webWidget","horizontal","vertical","contactForm","subject","fields","prefill","removeChild","MessageOutlined","DecafLayout","_props$children","navigation","useNavigation","currentTheme","setCurrentTheme","DecafLayoutProgress","isAnimating","state","Header","DecafLayoutBrand","Outlet","Footer","Row","justify","align","Col","span","textAlign","Title","level","fontWeight","whiteSpace","animationDuration","isFinished","progress","useNProgress","opacity","pointerEvents","marginLeft","transform","PageAbout","versionCultproxy","setVersionCultproxy","versionBarista","setVersionBarista","versionEstate","setVersionEstate","bare","gutter","sm","xl","xxl","Card","bordered","Statistic","appDescription","appVersion","prefix","content","_excluded","DecafWebapp","defer","setAttribute","hostname","getPlausibleScript","controller","DecafWebappController","disableZendeskWidget","DecafApp","config","DecafWebappInternal","_props$config","_props$config2","defaultRoutes","path","buildAboutPageContent","buildRouteItems","router","createBrowserRouter","context","buildMenuItems","QueryParamProvider","adapter","ReactRouter6Adapter","options","removeDefaultsFromUrl","searchStringToObject","qs","parse","objectToSearchString","stringify","enableBatching","includeAllParams","decafRouteToReactRoute","errorElement","compileRoutes","basename","basePath","RouterProvider","_objectWithoutPropertiesLoose"],"mappings":"w8CAKA,SAASA,IAAkBC,QAAEA,IAC3B,OACEC,EAAAC,cAAAD,EAAAE,SAAA,KACEF,EAACC,cAAAE,EAAY,KAAAJ,GACbC,EAAAC,cAACG,EAAI,CAACC,GAAG,KACPL,EAAAC,cAACK,EAAM,CAACC,MAAO,CAAEC,UAAW,KAAI,cAIxC,UAEgBC,KACd,OACET,EAAAC,cAACS,EAAM,CACLC,KAAMX,EAAAC,cAACW,EAAU,CAACL,MAAO,CAAEM,MAAO,aAClCC,MAAO,uBACPC,SAAUf,EAAAC,cAACH,GAAiB,CAACC,QAAS,+DAG5C,UAEgBiB,KACd,OACEhB,gBAACU,EAAM,CACLO,OAAO,MACPH,MAAO,gBACPC,SAAUf,EAACC,cAAAH,GAAkB,CAAAC,QAAS,oDAG5C,UAEgBmB,KACd,OACElB,gBAACU,EAAM,CACLO,OAAO,MACPH,MAAO,iBACPC,SAAUf,EAACC,cAAAH,GAAkB,CAAAC,QAAS,iDAG5C,CAEgB,SAAAoB,KACd,OACEnB,gBAACU,EAAM,CACLO,OAAO,MACPH,MAAO,QACPC,SACEf,EAACC,cAAAH,GACC,CAAAC,QACE,8GAMZ,CAEgB,SAAAqB,KACd,MAAMC,EAAQC,IAEd,IAAIC,EAAqBF,GAYvB,OAAOrB,EAAAC,cAACkB,GAAS,MAXjB,OAAQE,EAAMJ,QACZ,KAAK,IACH,OAAOjB,EAAAC,cAACQ,GAAO,MACjB,KAAQ,IACN,OAAOT,EAAAC,cAACe,GAAO,MACjB,KAAQ,IACN,OAAOhB,EAAAC,cAACiB,GAAO,MACjB,QACE,OAAOlB,EAAAC,cAACkB,GAAS,MAKzB,wOCvEA,MAAMK,GAA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