unleash-server 5.9.0 → 5.9.2

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.
Files changed (48) hide show
  1. package/dist/lib/db/feature-tag-store.js +1 -1
  2. package/dist/lib/db/feature-tag-store.js.map +1 -1
  3. package/dist/lib/features/client-feature-toggles/client-feature-toggle-store.js +2 -2
  4. package/dist/lib/features/client-feature-toggles/client-feature-toggle-store.js.map +1 -1
  5. package/dist/lib/features/instance-stats/instance-stats-service.js +1 -1
  6. package/dist/lib/features/instance-stats/instance-stats-service.js.map +1 -1
  7. package/dist/lib/features/maintenance/maintenance-service.d.ts +1 -0
  8. package/dist/lib/features/maintenance/maintenance-service.d.ts.map +1 -1
  9. package/dist/lib/features/maintenance/maintenance-service.js +21 -3
  10. package/dist/lib/features/maintenance/maintenance-service.js.map +1 -1
  11. package/dist/lib/features/scheduler/scheduler-service.d.ts.map +1 -1
  12. package/dist/lib/features/scheduler/scheduler-service.js +2 -3
  13. package/dist/lib/features/scheduler/scheduler-service.js.map +1 -1
  14. package/dist/lib/routes/admin-api/config.js +1 -1
  15. package/dist/lib/routes/admin-api/config.js.map +1 -1
  16. package/dist/lib/services/version-service.d.ts +2 -3
  17. package/dist/lib/services/version-service.d.ts.map +1 -1
  18. package/dist/lib/services/version-service.js +13 -14
  19. package/dist/lib/services/version-service.js.map +1 -1
  20. package/dist/lib/services/version-service.test.js +3 -3
  21. package/dist/lib/services/version-service.test.js.map +1 -1
  22. package/dist/server-dev.js +1 -0
  23. package/dist/server-dev.js.map +1 -1
  24. package/frontend/build/index.html +1 -1
  25. package/frontend/build/static/{AdvancedPlayground-DoQ1u8B6.js → AdvancedPlayground-FbP1gTKc.js} +1 -1
  26. package/frontend/build/static/{CreateProject-iLBz5afO.js → CreateProject-vjn1sh4D.js} +1 -1
  27. package/frontend/build/static/{FeatureArchiveDialog-NSAcrt7Z.js → FeatureArchiveDialog-ctoNJoqg.js} +1 -1
  28. package/frontend/build/static/{FeatureMetricsChart-UhDepK_o.js → FeatureMetricsChart-ig6HN-Ms.js} +1 -1
  29. package/frontend/build/static/FeatureViewLazyExport-G75iq0Uc.js +25 -0
  30. package/frontend/build/static/{LazyAdminExport-w5iLam_A.js → LazyAdminExport-oCRFK_R5.js} +2 -2
  31. package/frontend/build/static/{LazyProjectExport-iqGbEmyw.js → LazyProjectExport-Ul0xAhZq.js} +1 -1
  32. package/frontend/build/static/{LineChartComponent-rG1KLVNr.js → LineChartComponent-3-eT314R.js} +1 -1
  33. package/frontend/build/static/{NetworkOverview-7SCGp57r.js → NetworkOverview-d20eBsIq.js} +2 -2
  34. package/frontend/build/static/{NetworkTraffic-awTd8Zg5.js → NetworkTraffic-_52gjNiG.js} +1 -1
  35. package/frontend/build/static/{ReactJSONEditor-N-DWXE0h.js → ReactJSONEditor-0HyqnatD.js} +1 -1
  36. package/frontend/build/static/{RoleCell-mJ7DV61l.js → RoleCell--QIy8Oj_.js} +1 -1
  37. package/frontend/build/static/{StrategyItemContainer-wxQbaPXr.js → StrategyItemContainer-X6EIzBwJ.js} +1 -1
  38. package/frontend/build/static/{flowchart-elk-definition-170a3958-fa48ti80.js → flowchart-elk-definition-170a3958-XjUu-j5x.js} +1 -1
  39. package/frontend/build/static/{index-pAMHRYpv.js → index-UE-HeGu0.js} +1 -1
  40. package/frontend/build/static/{index-p2PlVFLf.js → index-uUGk-gee.js} +104 -104
  41. package/frontend/build/static/{is_dark-aAyqOy_I.js → is_dark-8v9B-WN0.js} +1 -1
  42. package/frontend/build/static/{mindmap-definition-44684416-AfCKDD9v.js → mindmap-definition-44684416-5sTvrm1Q.js} +1 -1
  43. package/frontend/build/static/{timeline-definition-8e5a9bc6-NKNlIEgm.js → timeline-definition-8e5a9bc6-MtFefIHV.js} +1 -1
  44. package/frontend/build/static/{unknownify-g-QgUElr.js → unknownify-joALjS6W.js} +1 -1
  45. package/frontend/build/static/{useApiTokens-hvnEZWgJ.js → useApiTokens-gCm2i_7X.js} +1 -1
  46. package/frontend/build/static/{useProjectForm-zqz6LJw4.js → useProjectForm-oXjjbjX3.js} +1 -1
  47. package/package.json +1 -1
  48. package/frontend/build/static/FeatureViewLazyExport-SpKYIb_J.js +0 -25
@@ -1 +1 @@
1
- import{s as y,j as r,y as S,T as u,N as m,a as f,b_ as C,r as p,gT as j,gU as h,gV as L,gW as v,gX as k,gY as w,gZ as A,g_ as T}from"./index-p2PlVFLf.js";import{L as X}from"./index-pAMHRYpv.js";const E=y("ul")(({theme:e})=>({listStyle:"none",margin:0,padding:0})),I=y("li")(({theme:e})=>({marginBottom:e.spacing(.5),display:"flex",alignItems:"center"})),R=y("span")(({theme:e})=>({display:"inline-block",width:8,height:8,borderRadius:"50%",marginRight:e.spacing(1)})),_=({tooltip:e})=>r.jsxs(S,{elevation:3,sx:s=>({top:e==null?void 0:e.caretY,left:(e==null?void 0:e.align)==="left"?(e==null?void 0:e.caretX)+40:((e==null?void 0:e.caretX)||0)-220,position:"absolute",display:e?"block":"none",width:220,padding:s.spacing(1.5,2),pointerEvents:"none"}),children:[r.jsx(u,{variant:"body2",sx:s=>({marginBottom:s.spacing(1),color:s.palette.text.secondary}),children:e==null?void 0:e.title}),r.jsx(E,{children:e==null?void 0:e.body.map(s=>r.jsxs(I,{children:[r.jsx(R,{sx:{backgroundColor:s.color},children:" "}),r.jsx(u,{variant:"body2",sx:{display:"inline-block"},children:s.title})]},m(s)))})]}),M=(e,s,l)=>({responsive:!0,plugins:{legend:{position:"bottom",labels:{boxWidth:12,padding:30,generateLabels:t=>{var x;const a=t.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:g,color:c}}=((x=t==null?void 0:t.legend)==null?void 0:x.options)||{labels:{}};return t._getSortedDatasetMetas().map(o=>{const d=o.controller.getStyle(n?0:void 0);return{text:a[o.index].label,fillStyle:d.backgroundColor,fontColor:c,hidden:!o.visible,lineWidth:0,borderRadius:6,strokeStyle:d.borderColor,pointStyle:i||d.pointStyle,textAlign:g||d.textAlign,datasetIndex:o.index}})}}},tooltip:{enabled:!1,external:t=>{var i,g;if(t.tooltip.opacity===0){l(null);return}const n=t.tooltip;l({caretX:n==null?void 0:n.caretX,caretY:n==null?void 0:n.caretY,title:((i=n==null?void 0:n.title)==null?void 0:i.join(" "))||"",align:(n==null?void 0:n.xAlign)||"left",body:((g=n==null?void 0:n.body)==null?void 0:g.map((c,x)=>{var o,d,b;return{title:(o=c==null?void 0:c.lines)==null?void 0:o.join(" "),color:(b=(d=n==null?void 0:n.labelColors)==null?void 0:d[x])==null?void 0:b.borderColor}}))||[]})}}},locale:s.locale,interaction:{intersect:!1,axis:"x"},elements:{point:{radius:0}},color:e.palette.text.secondary,scales:{y:{beginAtZero:!0,type:"linear",grid:{color:e.palette.divider,borderColor:e.palette.divider},ticks:{color:e.palette.text.secondary}},x:{type:"time",time:{unit:"month"},grid:{color:"transparent",borderColor:"transparent"},ticks:{color:e.palette.text.secondary}}}}),P={id:"customLine",afterDraw:e=>{var l;if((l=e.tooltip)!=null&&l.opacity&&e.tooltip.x){const t=e.tooltip.caretX,a=e.scales.y,n=e.ctx;n.save();const i=n.createLinearGradient(t,a.top,t,a.bottom);i.addColorStop(0,"rgba(129, 122, 254, 0)"),i.addColorStop(1,"rgba(129, 122, 254, 0.12)"),n.fillStyle=i,n.fillRect(t-26/2,a.top,26,a.bottom-a.top),n.restore()}}},B=({data:e})=>{const s=f(),{locationSettings:l}=C(),[t,a]=p.useState(null),n=p.useMemo(()=>M(s,l,a),[s,l]);return r.jsxs(r.Fragment,{children:[r.jsx(X,{options:n,data:e,plugins:[P]}),r.jsx(_,{tooltip:t})]})};j.register(h,L,v,k,w,A,T);export{B as default};
1
+ import{s as y,j as r,y as S,T as u,N as m,a as f,b_ as C,r as p,gT as j,gU as h,gV as L,gW as v,gX as k,gY as w,gZ as A,g_ as T}from"./index-uUGk-gee.js";import{L as X}from"./index-UE-HeGu0.js";const E=y("ul")(({theme:e})=>({listStyle:"none",margin:0,padding:0})),I=y("li")(({theme:e})=>({marginBottom:e.spacing(.5),display:"flex",alignItems:"center"})),R=y("span")(({theme:e})=>({display:"inline-block",width:8,height:8,borderRadius:"50%",marginRight:e.spacing(1)})),_=({tooltip:e})=>r.jsxs(S,{elevation:3,sx:s=>({top:e==null?void 0:e.caretY,left:(e==null?void 0:e.align)==="left"?(e==null?void 0:e.caretX)+40:((e==null?void 0:e.caretX)||0)-220,position:"absolute",display:e?"block":"none",width:220,padding:s.spacing(1.5,2),pointerEvents:"none"}),children:[r.jsx(u,{variant:"body2",sx:s=>({marginBottom:s.spacing(1),color:s.palette.text.secondary}),children:e==null?void 0:e.title}),r.jsx(E,{children:e==null?void 0:e.body.map(s=>r.jsxs(I,{children:[r.jsx(R,{sx:{backgroundColor:s.color},children:" "}),r.jsx(u,{variant:"body2",sx:{display:"inline-block"},children:s.title})]},m(s)))})]}),M=(e,s,l)=>({responsive:!0,plugins:{legend:{position:"bottom",labels:{boxWidth:12,padding:30,generateLabels:t=>{var x;const a=t.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:g,color:c}}=((x=t==null?void 0:t.legend)==null?void 0:x.options)||{labels:{}};return t._getSortedDatasetMetas().map(o=>{const d=o.controller.getStyle(n?0:void 0);return{text:a[o.index].label,fillStyle:d.backgroundColor,fontColor:c,hidden:!o.visible,lineWidth:0,borderRadius:6,strokeStyle:d.borderColor,pointStyle:i||d.pointStyle,textAlign:g||d.textAlign,datasetIndex:o.index}})}}},tooltip:{enabled:!1,external:t=>{var i,g;if(t.tooltip.opacity===0){l(null);return}const n=t.tooltip;l({caretX:n==null?void 0:n.caretX,caretY:n==null?void 0:n.caretY,title:((i=n==null?void 0:n.title)==null?void 0:i.join(" "))||"",align:(n==null?void 0:n.xAlign)||"left",body:((g=n==null?void 0:n.body)==null?void 0:g.map((c,x)=>{var o,d,b;return{title:(o=c==null?void 0:c.lines)==null?void 0:o.join(" "),color:(b=(d=n==null?void 0:n.labelColors)==null?void 0:d[x])==null?void 0:b.borderColor}}))||[]})}}},locale:s.locale,interaction:{intersect:!1,axis:"x"},elements:{point:{radius:0}},color:e.palette.text.secondary,scales:{y:{beginAtZero:!0,type:"linear",grid:{color:e.palette.divider,borderColor:e.palette.divider},ticks:{color:e.palette.text.secondary}},x:{type:"time",time:{unit:"month"},grid:{color:"transparent",borderColor:"transparent"},ticks:{color:e.palette.text.secondary}}}}),P={id:"customLine",afterDraw:e=>{var l;if((l=e.tooltip)!=null&&l.opacity&&e.tooltip.x){const t=e.tooltip.caretX,a=e.scales.y,n=e.ctx;n.save();const i=n.createLinearGradient(t,a.top,t,a.bottom);i.addColorStop(0,"rgba(129, 122, 254, 0)"),i.addColorStop(1,"rgba(129, 122, 254, 0.12)"),n.fillStyle=i,n.fillRect(t-26/2,a.top,26,a.bottom-a.top),n.restore()}}},B=({data:e})=>{const s=f(),{locationSettings:l}=C(),[t,a]=p.useState(null),n=p.useMemo(()=>M(s,l,a),[s,l]);return r.jsxs(r.Fragment,{children:[r.jsx(X,{options:n,data:e,plugins:[P]}),r.jsx(_,{tooltip:t})]})};j.register(h,L,v,k,w,A,T);export{B as default};
@@ -1,4 +1,4 @@
1
- import{h3 as gm,g$ as kl,g as wl,h4 as ym,h5 as mm,h6 as bm,cD as tu,s as Dd,r as Hc,j as to,ch as _m,h7 as xm,gp as vm,C as km,J as wm,h8 as Tm,h9 as Em}from"./index-p2PlVFLf.js";import{z as eu,A as Nd,B as Id,C as Cm,D as Sm,E as Md,F as Am,G as Lm,b as Rd,H as Tl,I as Fd,h as Bm,J as Od,K as Dm,L as Nm,M as Im,i as ts,N as Mm,O as Rm,P as Fm,Q as T1,d as vo,R as ko,S as Om,T as Pd,U as Pm,g as Vd,V as Vm,a as iu,c as El,W as Ym,k as qr,l as zm,X as Um,Y as Wm,Z as Yd,_ as zd,$ as Hm,a0 as Ud,a1 as qm,a2 as Gm,a3 as Wd,a4 as Xm,a5 as jm,a6 as nc,a7 as Hd,w as $m,a8 as Km,a9 as Qm,aa as Ms,p as jn,s as Me,r as _n,u as Cl,n as E1,v as ru,y as Ea,o as wo,x as Sl,q as nu}from"./uniqueId-ebLYlRiD.js";import{u as Zm,a as qd}from"./unknownify-g-QgUElr.js";const Jm=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function t3(t){return typeof t=="string"&&Jm.test(t)}function e3(t){if(!t3(t))throw TypeError("Invalid UUID");let e;const i=new Uint8Array(16);return i[0]=(e=parseInt(t.slice(0,8),16))>>>24,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=e&255,i[4]=(e=parseInt(t.slice(9,13),16))>>>8,i[5]=e&255,i[6]=(e=parseInt(t.slice(14,18),16))>>>8,i[7]=e&255,i[8]=(e=parseInt(t.slice(19,23),16))>>>8,i[9]=e&255,i[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,i[11]=e/4294967296&255,i[12]=e>>>24&255,i[13]=e>>>16&255,i[14]=e>>>8&255,i[15]=e&255,i}function i3(t){t=unescape(encodeURIComponent(t));const e=[];for(let i=0;i<t.length;++i)e.push(t.charCodeAt(i));return e}const r3="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n3="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function s3(t,e,i){function r(n,s,a,o){var l;if(typeof n=="string"&&(n=i3(n)),typeof s=="string"&&(s=e3(s)),((l=s)===null||l===void 0?void 0:l.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let h=new Uint8Array(16+n.length);if(h.set(s),h.set(n,s.length),h=i(h),h[6]=h[6]&15|e,h[8]=h[8]&63|128,a){o=o||0;for(let u=0;u<16;++u)a[o+u]=h[u];return a}return gm(h)}try{r.name=t}catch{}return r.DNS=r3,r.URL=n3,r}function a3(t,e,i,r){switch(t){case 0:return e&i^~e&r;case 1:return e^i^r;case 2:return e&i^e&r^i&r;case 3:return e^i^r}}function sc(t,e){return t<<e|t>>>32-e}function o3(t){const e=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const a=unescape(encodeURIComponent(t));t=[];for(let o=0;o<a.length;++o)t.push(a.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const r=t.length/4+2,n=Math.ceil(r/16),s=new Array(n);for(let a=0;a<n;++a){const o=new Uint32Array(16);for(let l=0;l<16;++l)o[l]=t[a*64+l*4]<<24|t[a*64+l*4+1]<<16|t[a*64+l*4+2]<<8|t[a*64+l*4+3];s[a]=o}s[n-1][14]=(t.length-1)*8/Math.pow(2,32),s[n-1][14]=Math.floor(s[n-1][14]),s[n-1][15]=(t.length-1)*8&4294967295;for(let a=0;a<n;++a){const o=new Uint32Array(80);for(let p=0;p<16;++p)o[p]=s[a][p];for(let p=16;p<80;++p)o[p]=sc(o[p-3]^o[p-8]^o[p-14]^o[p-16],1);let l=i[0],h=i[1],u=i[2],d=i[3],f=i[4];for(let p=0;p<80;++p){const m=Math.floor(p/20),_=sc(l,5)+a3(m,h,u,d)+f+e[m]+o[p]>>>0;f=d,d=u,u=sc(h,30)>>>0,h=l,l=_}i[0]=i[0]+l>>>0,i[1]=i[1]+h>>>0,i[2]=i[2]+u>>>0,i[3]=i[3]+d>>>0,i[4]=i[4]+f>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,i[0]&255,i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,i[1]&255,i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,i[2]&255,i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,i[3]&255,i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,i[4]&255]}const l3=s3("v5",80,o3);function Gd(t,e,i,r){for(var n=t.length,s=i+(r?1:-1);r?s--:++s<n;)if(e(t[s],s,t))return s;return-1}function c3(t){return t!==t}function h3(t,e,i){for(var r=i-1,n=t.length;++r<n;)if(t[r]===e)return r;return-1}function u3(t,e,i){return e===e?h3(t,e,i):Gd(t,c3,i)}function d3(t,e){var i=t==null?0:t.length;return!!i&&u3(t,e,0)>-1}function f3(t){return eu(function(e,i){var r=-1,n=i.length,s=n>1?i[n-1]:void 0,a=n>2?i[2]:void 0;for(s=t.length>3&&typeof s=="function"?(n--,s):void 0,a&&Nd(i[0],i[1],a)&&(s=n<3?void 0:s,n=1),e=Object(e);++r<n;){var o=i[r];o&&t(e,o,r,s)}return e})}function ms(t){var e=t==null?0:t.length;return e?Id(t,1):[]}function p3(t){return Cm(Sm(t,void 0,ms),t+"")}var g3="[object Object]",y3=Function.prototype,m3=Object.prototype,Xd=y3.toString,b3=m3.hasOwnProperty,_3=Xd.call(Object);function jd(t){if(!Md(t)||Am(t)!=g3)return!1;var e=Lm(t);if(e===null)return!0;var i=b3.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&Xd.call(i)==_3}function x3(t,e,i,r){var n=-1,s=t==null?0:t.length;for(r&&s&&(i=t[++n]);++n<s;)i=e(i,t[n],n,t);return i}var v3=4;function k3(t){return Rd(t,v3)}var w3=1,T3=4;function E3(t){return Rd(t,w3|T3)}var $d=Object.prototype,C3=$d.hasOwnProperty,Vn=eu(function(t,e){t=Object(t);var i=-1,r=e.length,n=r>2?e[2]:void 0;for(n&&Nd(e[0],e[1],n)&&(r=1);++i<r;)for(var s=e[i],a=Tl(s),o=-1,l=a.length;++o<l;){var h=a[o],u=t[h];(u===void 0||Fd(u,$d[h])&&!C3.call(t,h))&&(t[h]=s[h])}return t});function qc(t,e,i){(i!==void 0&&!Fd(t[e],i)||i===void 0&&!(e in t))&&Bm(t,e,i)}function Kd(t){return Md(t)&&Od(t)}function Gc(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function S3(t){return Dm(t,Tl(t))}function A3(t,e,i,r,n,s,a){var o=Gc(t,i),l=Gc(e,i),h=a.get(l);if(h){qc(t,i,h);return}var u=s?s(o,l,i+"",t,e,a):void 0,d=u===void 0;if(d){var f=ts(l),p=!f&&Nm(l),m=!f&&!p&&Im(l);u=l,f||p||m?ts(o)?u=o:Kd(o)?u=Mm(o):p?(d=!1,u=Rm(l,!0)):m?(d=!1,u=Fm(l,!0)):u=[]:jd(l)||T1(l)?(u=o,T1(o)?u=S3(o):(!vo(o)||ko(o))&&(u=Om(l))):d=!1}d&&(a.set(l,u),n(u,l,r,s,a),a.delete(l)),qc(t,i,u)}function Qd(t,e,i,r,n){t!==e&&Pd(e,function(s,a){if(n||(n=new Pm),vo(s))A3(t,e,a,i,Qd,r,n);else{var o=r?r(Gc(t,a),s,a+"",t,e,n):void 0;o===void 0&&(o=s),qc(t,a,o)}},Tl)}function L3(t,e,i){for(var r=-1,n=t==null?0:t.length;++r<n;)if(i(e,t[r]))return!0;return!1}function ft(t,e){var i=ts(t)?Vm:iu;return i(t,Vd(e))}function B3(t,e){var i=[];return iu(t,function(r,n,s){e(r,n,s)&&i.push(r)}),i}function Sr(t,e){var i=ts(t)?Ym:B3;return i(t,El(e))}function D3(t){return function(e,i,r){var n=Object(e);if(!Od(e)){var s=El(i);e=qr(e),i=function(o){return s(n[o],o,n)}}var a=t(e,i,r);return a>-1?n[s?e[a]:a]:void 0}}var N3=Math.max;function I3(t,e,i){var r=t==null?0:t.length;if(!r)return-1;var n=i==null?0:zm(i);return n<0&&(n=N3(r+n,0)),Gd(t,El(e),n)}var su=D3(I3);function M3(t,e){return t==null?t:Pd(t,Vd(e),Tl)}function R3(t,e){return t>e}var F3=Object.prototype,O3=F3.hasOwnProperty;function P3(t,e){return t!=null&&O3.call(t,e)}function Zt(t,e){return t!=null&&Um(t,e,P3)}function V3(t,e){return Wm(e,function(i){return t[i]})}function Mr(t){return t==null?[]:V3(t,qr(t))}function Ae(t){return t===void 0}function xn(t){return t&&t.length?Yd(t,zd,R3):void 0}var Xc=f3(function(t,e,i){Qd(t,e,i)});function Js(t){return t&&t.length?Yd(t,zd,Hm):void 0}function Y3(t,e,i,r){if(!vo(t))return t;e=Ud(e,t);for(var n=-1,s=e.length,a=s-1,o=t;o!=null&&++n<s;){var l=qm(e[n]),h=i;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(n!=a){var u=o[l];h=r?r(u,l,o):void 0,h===void 0&&(h=vo(u)?u:Gm(e[n+1])?[]:{})}Wd(o,l,h),o=o[l]}return t}function z3(t,e,i){for(var r=-1,n=e.length,s={};++r<n;){var a=e[r],o=Xm(t,a);i(o,a)&&Y3(s,Ud(a,t),o)}return s}function U3(t,e){return z3(t,e,function(i,r){return jm(t,r)})}var ta=p3(function(t,e){return t==null?{}:U3(t,e)});function W3(t,e,i,r,n){return n(t,function(s,a,o){i=r?(r=!1,s):e(i,s,a,o)}),i}function Ca(t,e,i){var r=ts(t)?x3:W3,n=arguments.length<3;return r(t,El(e),i,n,iu)}var H3=1/0,q3=nc&&1/Hd(new nc([,-0]))[1]==H3?function(t){return new nc(t)}:$m,G3=200;function X3(t,e,i){var r=-1,n=d3,s=t.length,a=!0,o=[],l=o;if(i)a=!1,n=L3;else if(s>=G3){var h=e?null:q3(t);if(h)return Hd(h);a=!1,n=Qm,l=new Km}else l=e?[]:o;t:for(;++r<s;){var u=t[r],d=e?e(u):u;if(u=i||u!==0?u:0,a&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue t;e&&l.push(d),o.push(u)}else n(l,d,i)||(l!==o&&l.push(d),o.push(u))}return o}var j3=eu(function(t){return X3(Id(t,1,Kd,!0))});function $3(t,e,i){for(var r=-1,n=t.length,s=e.length,a={};++r<n;){var o=r<s?e[r]:void 0;i(a,t[r],o)}return a}function K3(t,e){return $3(t||[],e||[],Wd)}function Zd(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var r=Array.from(typeof t=="string"?[t]:t);r[r.length-1]=r[r.length-1].replace(/\r?\n([\t ]*)$/,"");var n=r.reduce(function(o,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?o.concat(h.map(function(u){var d,f;return(f=(d=u.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&f!==void 0?f:0})):o},[]);if(n.length){var s=new RegExp(`
1
+ import{h3 as gm,g$ as kl,g as wl,h4 as ym,h5 as mm,h6 as bm,cD as tu,s as Dd,r as Hc,j as to,ch as _m,h7 as xm,gp as vm,C as km,J as wm,h8 as Tm,h9 as Em}from"./index-uUGk-gee.js";import{z as eu,A as Nd,B as Id,C as Cm,D as Sm,E as Md,F as Am,G as Lm,b as Rd,H as Tl,I as Fd,h as Bm,J as Od,K as Dm,L as Nm,M as Im,i as ts,N as Mm,O as Rm,P as Fm,Q as T1,d as vo,R as ko,S as Om,T as Pd,U as Pm,g as Vd,V as Vm,a as iu,c as El,W as Ym,k as qr,l as zm,X as Um,Y as Wm,Z as Yd,_ as zd,$ as Hm,a0 as Ud,a1 as qm,a2 as Gm,a3 as Wd,a4 as Xm,a5 as jm,a6 as nc,a7 as Hd,w as $m,a8 as Km,a9 as Qm,aa as Ms,p as jn,s as Me,r as _n,u as Cl,n as E1,v as ru,y as Ea,o as wo,x as Sl,q as nu}from"./uniqueId-ebLYlRiD.js";import{u as Zm,a as qd}from"./unknownify-joALjS6W.js";const Jm=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function t3(t){return typeof t=="string"&&Jm.test(t)}function e3(t){if(!t3(t))throw TypeError("Invalid UUID");let e;const i=new Uint8Array(16);return i[0]=(e=parseInt(t.slice(0,8),16))>>>24,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=e&255,i[4]=(e=parseInt(t.slice(9,13),16))>>>8,i[5]=e&255,i[6]=(e=parseInt(t.slice(14,18),16))>>>8,i[7]=e&255,i[8]=(e=parseInt(t.slice(19,23),16))>>>8,i[9]=e&255,i[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,i[11]=e/4294967296&255,i[12]=e>>>24&255,i[13]=e>>>16&255,i[14]=e>>>8&255,i[15]=e&255,i}function i3(t){t=unescape(encodeURIComponent(t));const e=[];for(let i=0;i<t.length;++i)e.push(t.charCodeAt(i));return e}const r3="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n3="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function s3(t,e,i){function r(n,s,a,o){var l;if(typeof n=="string"&&(n=i3(n)),typeof s=="string"&&(s=e3(s)),((l=s)===null||l===void 0?void 0:l.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let h=new Uint8Array(16+n.length);if(h.set(s),h.set(n,s.length),h=i(h),h[6]=h[6]&15|e,h[8]=h[8]&63|128,a){o=o||0;for(let u=0;u<16;++u)a[o+u]=h[u];return a}return gm(h)}try{r.name=t}catch{}return r.DNS=r3,r.URL=n3,r}function a3(t,e,i,r){switch(t){case 0:return e&i^~e&r;case 1:return e^i^r;case 2:return e&i^e&r^i&r;case 3:return e^i^r}}function sc(t,e){return t<<e|t>>>32-e}function o3(t){const e=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const a=unescape(encodeURIComponent(t));t=[];for(let o=0;o<a.length;++o)t.push(a.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const r=t.length/4+2,n=Math.ceil(r/16),s=new Array(n);for(let a=0;a<n;++a){const o=new Uint32Array(16);for(let l=0;l<16;++l)o[l]=t[a*64+l*4]<<24|t[a*64+l*4+1]<<16|t[a*64+l*4+2]<<8|t[a*64+l*4+3];s[a]=o}s[n-1][14]=(t.length-1)*8/Math.pow(2,32),s[n-1][14]=Math.floor(s[n-1][14]),s[n-1][15]=(t.length-1)*8&4294967295;for(let a=0;a<n;++a){const o=new Uint32Array(80);for(let p=0;p<16;++p)o[p]=s[a][p];for(let p=16;p<80;++p)o[p]=sc(o[p-3]^o[p-8]^o[p-14]^o[p-16],1);let l=i[0],h=i[1],u=i[2],d=i[3],f=i[4];for(let p=0;p<80;++p){const m=Math.floor(p/20),_=sc(l,5)+a3(m,h,u,d)+f+e[m]+o[p]>>>0;f=d,d=u,u=sc(h,30)>>>0,h=l,l=_}i[0]=i[0]+l>>>0,i[1]=i[1]+h>>>0,i[2]=i[2]+u>>>0,i[3]=i[3]+d>>>0,i[4]=i[4]+f>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,i[0]&255,i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,i[1]&255,i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,i[2]&255,i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,i[3]&255,i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,i[4]&255]}const l3=s3("v5",80,o3);function Gd(t,e,i,r){for(var n=t.length,s=i+(r?1:-1);r?s--:++s<n;)if(e(t[s],s,t))return s;return-1}function c3(t){return t!==t}function h3(t,e,i){for(var r=i-1,n=t.length;++r<n;)if(t[r]===e)return r;return-1}function u3(t,e,i){return e===e?h3(t,e,i):Gd(t,c3,i)}function d3(t,e){var i=t==null?0:t.length;return!!i&&u3(t,e,0)>-1}function f3(t){return eu(function(e,i){var r=-1,n=i.length,s=n>1?i[n-1]:void 0,a=n>2?i[2]:void 0;for(s=t.length>3&&typeof s=="function"?(n--,s):void 0,a&&Nd(i[0],i[1],a)&&(s=n<3?void 0:s,n=1),e=Object(e);++r<n;){var o=i[r];o&&t(e,o,r,s)}return e})}function ms(t){var e=t==null?0:t.length;return e?Id(t,1):[]}function p3(t){return Cm(Sm(t,void 0,ms),t+"")}var g3="[object Object]",y3=Function.prototype,m3=Object.prototype,Xd=y3.toString,b3=m3.hasOwnProperty,_3=Xd.call(Object);function jd(t){if(!Md(t)||Am(t)!=g3)return!1;var e=Lm(t);if(e===null)return!0;var i=b3.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&Xd.call(i)==_3}function x3(t,e,i,r){var n=-1,s=t==null?0:t.length;for(r&&s&&(i=t[++n]);++n<s;)i=e(i,t[n],n,t);return i}var v3=4;function k3(t){return Rd(t,v3)}var w3=1,T3=4;function E3(t){return Rd(t,w3|T3)}var $d=Object.prototype,C3=$d.hasOwnProperty,Vn=eu(function(t,e){t=Object(t);var i=-1,r=e.length,n=r>2?e[2]:void 0;for(n&&Nd(e[0],e[1],n)&&(r=1);++i<r;)for(var s=e[i],a=Tl(s),o=-1,l=a.length;++o<l;){var h=a[o],u=t[h];(u===void 0||Fd(u,$d[h])&&!C3.call(t,h))&&(t[h]=s[h])}return t});function qc(t,e,i){(i!==void 0&&!Fd(t[e],i)||i===void 0&&!(e in t))&&Bm(t,e,i)}function Kd(t){return Md(t)&&Od(t)}function Gc(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function S3(t){return Dm(t,Tl(t))}function A3(t,e,i,r,n,s,a){var o=Gc(t,i),l=Gc(e,i),h=a.get(l);if(h){qc(t,i,h);return}var u=s?s(o,l,i+"",t,e,a):void 0,d=u===void 0;if(d){var f=ts(l),p=!f&&Nm(l),m=!f&&!p&&Im(l);u=l,f||p||m?ts(o)?u=o:Kd(o)?u=Mm(o):p?(d=!1,u=Rm(l,!0)):m?(d=!1,u=Fm(l,!0)):u=[]:jd(l)||T1(l)?(u=o,T1(o)?u=S3(o):(!vo(o)||ko(o))&&(u=Om(l))):d=!1}d&&(a.set(l,u),n(u,l,r,s,a),a.delete(l)),qc(t,i,u)}function Qd(t,e,i,r,n){t!==e&&Pd(e,function(s,a){if(n||(n=new Pm),vo(s))A3(t,e,a,i,Qd,r,n);else{var o=r?r(Gc(t,a),s,a+"",t,e,n):void 0;o===void 0&&(o=s),qc(t,a,o)}},Tl)}function L3(t,e,i){for(var r=-1,n=t==null?0:t.length;++r<n;)if(i(e,t[r]))return!0;return!1}function ft(t,e){var i=ts(t)?Vm:iu;return i(t,Vd(e))}function B3(t,e){var i=[];return iu(t,function(r,n,s){e(r,n,s)&&i.push(r)}),i}function Sr(t,e){var i=ts(t)?Ym:B3;return i(t,El(e))}function D3(t){return function(e,i,r){var n=Object(e);if(!Od(e)){var s=El(i);e=qr(e),i=function(o){return s(n[o],o,n)}}var a=t(e,i,r);return a>-1?n[s?e[a]:a]:void 0}}var N3=Math.max;function I3(t,e,i){var r=t==null?0:t.length;if(!r)return-1;var n=i==null?0:zm(i);return n<0&&(n=N3(r+n,0)),Gd(t,El(e),n)}var su=D3(I3);function M3(t,e){return t==null?t:Pd(t,Vd(e),Tl)}function R3(t,e){return t>e}var F3=Object.prototype,O3=F3.hasOwnProperty;function P3(t,e){return t!=null&&O3.call(t,e)}function Zt(t,e){return t!=null&&Um(t,e,P3)}function V3(t,e){return Wm(e,function(i){return t[i]})}function Mr(t){return t==null?[]:V3(t,qr(t))}function Ae(t){return t===void 0}function xn(t){return t&&t.length?Yd(t,zd,R3):void 0}var Xc=f3(function(t,e,i){Qd(t,e,i)});function Js(t){return t&&t.length?Yd(t,zd,Hm):void 0}function Y3(t,e,i,r){if(!vo(t))return t;e=Ud(e,t);for(var n=-1,s=e.length,a=s-1,o=t;o!=null&&++n<s;){var l=qm(e[n]),h=i;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(n!=a){var u=o[l];h=r?r(u,l,o):void 0,h===void 0&&(h=vo(u)?u:Gm(e[n+1])?[]:{})}Wd(o,l,h),o=o[l]}return t}function z3(t,e,i){for(var r=-1,n=e.length,s={};++r<n;){var a=e[r],o=Xm(t,a);i(o,a)&&Y3(s,Ud(a,t),o)}return s}function U3(t,e){return z3(t,e,function(i,r){return jm(t,r)})}var ta=p3(function(t,e){return t==null?{}:U3(t,e)});function W3(t,e,i,r,n){return n(t,function(s,a,o){i=r?(r=!1,s):e(i,s,a,o)}),i}function Ca(t,e,i){var r=ts(t)?x3:W3,n=arguments.length<3;return r(t,El(e),i,n,iu)}var H3=1/0,q3=nc&&1/Hd(new nc([,-0]))[1]==H3?function(t){return new nc(t)}:$m,G3=200;function X3(t,e,i){var r=-1,n=d3,s=t.length,a=!0,o=[],l=o;if(i)a=!1,n=L3;else if(s>=G3){var h=e?null:q3(t);if(h)return Hd(h);a=!1,n=Qm,l=new Km}else l=e?[]:o;t:for(;++r<s;){var u=t[r],d=e?e(u):u;if(u=i||u!==0?u:0,a&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue t;e&&l.push(d),o.push(u)}else n(l,d,i)||(l!==o&&l.push(d),o.push(u))}return o}var j3=eu(function(t){return X3(Id(t,1,Kd,!0))});function $3(t,e,i){for(var r=-1,n=t.length,s=e.length,a={};++r<n;){var o=r<s?e[r]:void 0;i(a,t[r],o)}return a}function K3(t,e){return $3(t||[],e||[],Wd)}function Zd(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var r=Array.from(typeof t=="string"?[t]:t);r[r.length-1]=r[r.length-1].replace(/\r?\n([\t ]*)$/,"");var n=r.reduce(function(o,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?o.concat(h.map(function(u){var d,f;return(f=(d=u.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&f!==void 0?f:0})):o},[]);if(n.length){var s=new RegExp(`
2
2
  [ ]{`+Math.min.apply(Math,n)+"}","g");r=r.map(function(o){return o.replace(s,`
3
3
  `)})}r[0]=r[0].replace(/^\r?\n/,"");var a=r[0];return e.forEach(function(o,l){var h=a.match(/(?:^|\n)( *)$/),u=h?h[1]:"",d=o;typeof o=="string"&&o.includes(`
4
4
  `)&&(d=String(o).split(`
@@ -1270,7 +1270,7 @@ Expecting `+Tt.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":X="Parse error o
1270
1270
  `+w+"^"},test_match:function(v,w){var x,N,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),N=v[0].match(/(?:\r\n?|\n).*/g),N&&(this.yylineno+=N.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:N?N[N.length-1].length-N[N.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+v[0].length},this.yytext+=v[0],this.match+=v[0],this.matches=v,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(v[0].length),this.matched+=v[0],x=this.performAction.call(this,this.yy,this,w,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var P in R)this[P]=R[P];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var v,w,x,N;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),P=0;P<R.length;P++)if(x=this._input.match(this.rules[R[P]]),x&&(!w||x[0].length>w[0].length)){if(w=x,N=P,this.options.backtrack_lexer){if(v=this.test_match(x,R[P]),v!==!1)return v;if(this._backtrack){w=!1;continue}else return!1}else if(!this.options.flex)break}return w?(v=this.test_match(w,R[N]),v!==!1?v:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1271
1271
  `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var w=this.next();return w||this.lex()},begin:function(w){this.conditionStack.push(w)},popState:function(){var w=this.conditionStack.length-1;return w>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(w){return w=this.conditionStack.length-1-Math.abs(w||0),w>=0?this.conditionStack[w]:"INITIAL"},pushState:function(w){this.begin(w)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(w,x,N,R){switch(N){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return _}();f.lexer=p;function m(){this.yy={}}return m.prototype=f,f.Parser=m,new m}();Zh.parser=Zh;const FN=Zh,ON=t=>t.match(/^\s*journey/)!==null;let ys="";const g1=[],ka=[],wa=[],PN=function(t,e,i){be.parseDirective(this,t,e,i)},VN=function(){g1.length=0,ka.length=0,ys="",wa.length=0,Ti()},YN=function(t){ys=t,g1.push(t)},zN=function(){return g1},UN=function(){let t=kd();const e=100;let i=0;for(;!t&&i<e;)t=kd(),i++;return ka.push(...wa),ka},WN=function(){const t=[];return ka.forEach(i=>{i.people&&t.push(...i.people)}),[...new Set(t)].sort()},HN=function(t,e){const i=e.substr(1).split(":");let r=0,n=[];i.length===1?(r=Number(i[0]),n=[]):(r=Number(i[0]),n=i[1].split(","));const s=n.map(o=>o.trim()),a={section:ys,type:ys,people:s,task:t,score:r};wa.push(a)},qN=function(t){const e={section:ys,type:ys,description:t,task:t,classes:[]};ka.push(e)},kd=function(){const t=function(i){return wa[i].processed};let e=!0;for(const[i,r]of wa.entries())t(i),e=e&&r.processed;return e},GN=function(){return WN()},wd={parseDirective:PN,getConfig:()=>G().journey,clear:VN,setDiagramTitle:Qi,getDiagramTitle:Zi,setAccTitle:_i,getAccTitle:Ei,setAccDescription:Ci,getAccDescription:Si,addSection:YN,getSections:zN,getTasks:UN,addTask:HN,addTaskOrg:qN,getActors:GN},Zl=function(t,e){const i=t.append("rect");return i.attr("x",e.x),i.attr("y",e.y),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("width",e.width),i.attr("height",e.height),i.attr("rx",e.rx),i.attr("ry",e.ry),e.class!==void 0&&i.attr("class",e.class),i},XN=function(t,e){const r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=t.append("g");n.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function s(l){const h=lh().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(l){const h=lh().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return e.score>3?s(n):e.score<3?a(n):o(n),r},Uy=function(t,e){const i=t.append("circle");return i.attr("cx",e.cx),i.attr("cy",e.cy),i.attr("class","actor-"+e.pos),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("r",e.r),i.class!==void 0&&i.attr("class",i.class),e.title!==void 0&&i.append("title").text(e.title),i},Wy=function(t,e){const i=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),e.class!==void 0&&r.attr("class",e.class);const n=r.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.text(i),r},jN=function(t,e){function i(n,s,a,o,l){return n+","+s+" "+(n+a)+","+s+" "+(n+a)+","+(s+o-l)+" "+(n+a-l*1.2)+","+(s+o)+" "+n+","+(s+o)}const r=t.append("polygon");r.attr("points",i(e.x,e.y,50,20,7)),r.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,Wy(t,e)},$N=function(t,e,i){const r=t.append("g"),n=y1();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=i.width,n.height=i.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,Zl(r,n),Hy(i)(e.text,r,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},i,e.colour)};let Td=-1;const KN=function(t,e,i){const r=e.x+i.width/2,n=t.append("g");Td++;const s=300+5*30;n.append("line").attr("id","task"+Td).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",s).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),XN(n,{cx:r,cy:300+(5-e.score)*30,score:e.score});const a=y1();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=i.width,a.height=i.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,Zl(n,a);let o=e.x+14;e.people.forEach(l=>{const h=e.actors[l].color,u={cx:o,cy:e.y,r:7,fill:h,stroke:"#000",title:l,pos:e.actors[l].position};Uy(n,u),o+=10}),Hy(i)(e.task,n,a.x,a.y,a.width,a.height,{class:"task"},i,e.colour)},QN=function(t,e){Zl(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},ZN=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},y1=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},Hy=function(){function t(n,s,a,o,l,h,u,d){const f=s.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("font-color",d).style("text-anchor","middle").text(n);r(f,u)}function e(n,s,a,o,l,h,u,d,f){const{taskFontSize:p,taskFontFamily:m}=d,_=n.split(/<br\s*\/?>/gi);for(let v=0;v<_.length;v++){const w=v*p-p*(_.length-1)/2,x=s.append("text").attr("x",a+l/2).attr("y",o).attr("fill",f).style("text-anchor","middle").style("font-size",p).style("font-family",m);x.append("tspan").attr("x",a+l/2).attr("dy",w).text(_[v]),x.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(x,u)}}function i(n,s,a,o,l,h,u,d){const f=s.append("switch"),m=f.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,f,a,o,l,h,u,d),r(m,u)}function r(n,s){for(const a in s)a in s&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?i:n.textPlacement==="old"?t:e}}(),JN=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},Ta={drawRect:Zl,drawCircle:Uy,drawSection:$N,drawText:Wy,drawLabel:jN,drawTask:KN,drawBackgroundRect:QN,getTextObj:ZN,getNoteRect:y1,initGraphics:JN},tI=function(t){Object.keys(t).forEach(function(i){Jl[i]=t[i]})},Ir={};function eI(t){const e=G().journey;let i=60;Object.keys(Ir).forEach(r=>{const n=Ir[r].color,s={cx:20,cy:i,r:7,fill:n,stroke:"#000",pos:Ir[r].position};Ta.drawCircle(t,s);const a={x:40,y:i+7,fill:"#666",text:r,textMargin:e.boxTextMargin|5};Ta.drawText(t,a),i+=20})}const Jl=G().journey,pn=Jl.leftMargin,iI=function(t,e,i,r){const n=G().journey;r.db.clear(),r.parser.parse(t+`
1272
1272
  `);const s=G().securityLevel;let a;s==="sandbox"&&(a=_t("#i"+e));const o=_t(s==="sandbox"?a.nodes()[0].contentDocument.body:"body");Ii.init();const l=o.select("#"+e);Ta.initGraphics(l);const h=r.db.getTasks(),u=r.db.getDiagramTitle(),d=r.db.getActors();for(const w in Ir)delete Ir[w];let f=0;d.forEach(w=>{Ir[w]={color:n.actorColours[f%n.actorColours.length],position:f},f++}),eI(l),Ii.insert(0,0,pn,Object.keys(Ir).length*50),rI(l,h,0);const p=Ii.getBounds();u&&l.append("text").text(u).attr("x",pn).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const m=p.stopy-p.starty+2*n.diagramMarginY,_=pn+p.stopx+2*n.diagramMarginX;Ki(l,m,_,n.useMaxWidth),l.append("line").attr("x1",pn).attr("y1",n.height*4).attr("x2",_-pn-4).attr("y2",n.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const v=u?70:0;l.attr("viewBox",`${p.startx} -25 ${_} ${m+v}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",m+v+25)},Ii={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,i,r){t[e]===void 0?t[e]=i:t[e]=r(i,t[e])},updateBounds:function(t,e,i,r){const n=G().journey,s=this;let a=0;function o(l){return function(u){a++;const d=s.sequenceItems.length-a+1;s.updateVal(u,"starty",e-d*n.boxMargin,Math.min),s.updateVal(u,"stopy",r+d*n.boxMargin,Math.max),s.updateVal(Ii.data,"startx",t-d*n.boxMargin,Math.min),s.updateVal(Ii.data,"stopx",i+d*n.boxMargin,Math.max),l!=="activation"&&(s.updateVal(u,"startx",t-d*n.boxMargin,Math.min),s.updateVal(u,"stopx",i+d*n.boxMargin,Math.max),s.updateVal(Ii.data,"starty",e-d*n.boxMargin,Math.min),s.updateVal(Ii.data,"stopy",r+d*n.boxMargin,Math.max))}}this.sequenceItems.forEach(o())},insert:function(t,e,i,r){const n=Math.min(t,i),s=Math.max(t,i),a=Math.min(e,r),o=Math.max(e,r);this.updateVal(Ii.data,"startx",n,Math.min),this.updateVal(Ii.data,"starty",a,Math.min),this.updateVal(Ii.data,"stopx",s,Math.max),this.updateVal(Ii.data,"stopy",o,Math.max),this.updateBounds(n,a,s,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},Uc=Jl.sectionFills,Ed=Jl.sectionColours,rI=function(t,e,i){const r=G().journey;let n="";const s=r.height*2+r.diagramMarginY,a=i+s;let o=0,l="#CCC",h="black",u=0;for(const[d,f]of e.entries()){if(n!==f.section){l=Uc[o%Uc.length],u=o%Uc.length,h=Ed[o%Ed.length];const m={x:d*r.taskMargin+d*r.width+pn,y:50,text:f.section,fill:l,num:u,colour:h};Ta.drawSection(t,m,r),n=f.section,o++}const p=f.people.reduce((m,_)=>(Ir[_]&&(m[_]=Ir[_]),m),{});f.x=d*r.taskMargin+d*r.width+pn,f.y=a,f.width=r.diagramMarginX,f.height=r.diagramMarginY,f.colour=h,f.fill=l,f.num=u,f.actors=p,Ta.drawTask(t,f,r),Ii.insert(f.x,f.y,f.x+f.width+r.taskMargin,300+5*30)}},Cd={setConf:tI,draw:iI};let Sd={};const nI=function(t){Sd={...Sd,...t}},sI=(t,e,i)=>{try{D.debug(`Renering svg for syntax error
1273
- `);const r=_t("#"+e),n=r.append("g");n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+i),r.attr("height",100),r.attr("width",500),r.attr("viewBox","768 0 912 512")}catch(r){D.error("Error while rendering info diagram"),D.error(lE(r))}},bl={setConf:nI,draw:sI},qy="flowchart-elk",aI=(t,e)=>{var i;return!!(t.match(/^\s*flowchart-elk/)||t.match(/^\s*flowchart|graph/)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk")},oI=async()=>{const{diagram:t}=await tu(()=>import("./flowchart-elk-definition-170a3958-fa48ti80.js"),__vite__mapDeps([]));return{id:qy,diagram:t}},lI={id:qy,detector:aI,loader:oI},cI=lI,Gy="timeline",hI=t=>t.match(/^\s*timeline/)!==null,uI=async()=>{const{diagram:t}=await tu(()=>import("./timeline-definition-8e5a9bc6-NKNlIEgm.js"),__vite__mapDeps([]));return{id:Gy,diagram:t}},dI={id:Gy,detector:hI,loader:uI},fI=dI,Xy="mindmap",pI=t=>t.match(/^\s*mindmap/)!==null,gI=async()=>{const{diagram:t}=await tu(()=>import("./mindmap-definition-44684416-AfCKDD9v.js"),__vite__mapDeps([]));return{id:Xy,diagram:t}},yI={id:Xy,detector:pI,loader:gI},mI=yI;let Ad=!1;const Pa=()=>{Ad||(Ad=!0,Z2(cI,fI,mI),Oe("error",{db:{clear:()=>{}},styles:kh,renderer:bl,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},t=>t.toLowerCase().trim()==="error"),Oe("---",{db:{clear:()=>{}},styles:kh,renderer:bl,parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with unindented `---` blocks")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),Oe("c4",{parser:yC,db:Ap,renderer:j0,styles:mp,init:t=>{j0.setConf(t.c4)}},mC),Oe("class",{parser:$0,db:Gn,renderer:Y9,styles:Xs,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Gn.clear()}},c9),Oe("classDiagram",{parser:$0,db:Gn,renderer:JS,styles:Xs,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Gn.clear()}},h9),Oe("er",{parser:tA,db:hA,renderer:kA,styles:hp},eA),Oe("gantt",{parser:UA,db:a1,renderer:wL,styles:up},WA),Oe("info",{parser:TL,db:LL,renderer:DL,styles:dp},NL),Oe("pie",{parser:IL,db:UL,renderer:HL,styles:fp},ML),Oe("requirement",{parser:qL,db:uB,renderer:xB,styles:pp},GL),Oe("sequence",{parser:vB,db:dd,renderer:pd,styles:gp,init:t=>{if(t.sequence||(t.sequence={}),t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,"sequenceDiagram"in t)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");dd.setWrap(t.wrap),pd.setConf(t.sequence)}},kB),Oe("state",{parser:gd,db:Cr,renderer:uN,styles:Qo,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Cr.clear()}},kD),Oe("stateDiagram",{parser:gd,db:Cr,renderer:RN,styles:Qo,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Cr.clear()}},wD),Oe("journey",{parser:FN,db:wd,renderer:Cd,styles:yp,init:t=>{Cd.setConf(t.journey),wd.clear()}},ON),Oe("flowchart",{parser:ld,db:ir,renderer:Pc,styles:Ko,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,PA.setConf(t.flowchart),ir.clear(),ir.setGen("gen-1")}},wA),Oe("flowchart-v2",{parser:ld,db:ir,renderer:Pc,styles:Ko,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ap({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),Pc.setConf(t.flowchart),ir.clear(),ir.setGen("gen-2")}},TA),Oe("gitGraph",{parser:VE,db:sC,renderer:fC,styles:gC},YE))};class Jh{constructor(e,i){var r,n;this.txt=e,this.type="graph",this.detectTypeFailed=!1;const s=G();this.txt=e;try{this.type=Mu(e,s)}catch(l){this.handleError(l,i),this.type="error",this.detectTypeFailed=!0}const a=xp(this.type);D.debug("Type "+this.type),this.db=a.db,(n=(r=this.db).clear)==null||n.call(r),this.renderer=a.renderer,this.parser=a.parser;const o=this.parser.parse.bind(this.parser);this.parser.parse=l=>o(UT(l,this.db)),this.parser.parser.yy=this.db,a.init&&(a.init(s),D.info("Initialized diagram "+this.type,s)),this.txt+=`
1273
+ `);const r=_t("#"+e),n=r.append("g");n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+i),r.attr("height",100),r.attr("width",500),r.attr("viewBox","768 0 912 512")}catch(r){D.error("Error while rendering info diagram"),D.error(lE(r))}},bl={setConf:nI,draw:sI},qy="flowchart-elk",aI=(t,e)=>{var i;return!!(t.match(/^\s*flowchart-elk/)||t.match(/^\s*flowchart|graph/)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk")},oI=async()=>{const{diagram:t}=await tu(()=>import("./flowchart-elk-definition-170a3958-XjUu-j5x.js"),__vite__mapDeps([]));return{id:qy,diagram:t}},lI={id:qy,detector:aI,loader:oI},cI=lI,Gy="timeline",hI=t=>t.match(/^\s*timeline/)!==null,uI=async()=>{const{diagram:t}=await tu(()=>import("./timeline-definition-8e5a9bc6-MtFefIHV.js"),__vite__mapDeps([]));return{id:Gy,diagram:t}},dI={id:Gy,detector:hI,loader:uI},fI=dI,Xy="mindmap",pI=t=>t.match(/^\s*mindmap/)!==null,gI=async()=>{const{diagram:t}=await tu(()=>import("./mindmap-definition-44684416-5sTvrm1Q.js"),__vite__mapDeps([]));return{id:Xy,diagram:t}},yI={id:Xy,detector:pI,loader:gI},mI=yI;let Ad=!1;const Pa=()=>{Ad||(Ad=!0,Z2(cI,fI,mI),Oe("error",{db:{clear:()=>{}},styles:kh,renderer:bl,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},t=>t.toLowerCase().trim()==="error"),Oe("---",{db:{clear:()=>{}},styles:kh,renderer:bl,parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with unindented `---` blocks")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),Oe("c4",{parser:yC,db:Ap,renderer:j0,styles:mp,init:t=>{j0.setConf(t.c4)}},mC),Oe("class",{parser:$0,db:Gn,renderer:Y9,styles:Xs,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Gn.clear()}},c9),Oe("classDiagram",{parser:$0,db:Gn,renderer:JS,styles:Xs,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Gn.clear()}},h9),Oe("er",{parser:tA,db:hA,renderer:kA,styles:hp},eA),Oe("gantt",{parser:UA,db:a1,renderer:wL,styles:up},WA),Oe("info",{parser:TL,db:LL,renderer:DL,styles:dp},NL),Oe("pie",{parser:IL,db:UL,renderer:HL,styles:fp},ML),Oe("requirement",{parser:qL,db:uB,renderer:xB,styles:pp},GL),Oe("sequence",{parser:vB,db:dd,renderer:pd,styles:gp,init:t=>{if(t.sequence||(t.sequence={}),t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,"sequenceDiagram"in t)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");dd.setWrap(t.wrap),pd.setConf(t.sequence)}},kB),Oe("state",{parser:gd,db:Cr,renderer:uN,styles:Qo,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Cr.clear()}},kD),Oe("stateDiagram",{parser:gd,db:Cr,renderer:RN,styles:Qo,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Cr.clear()}},wD),Oe("journey",{parser:FN,db:wd,renderer:Cd,styles:yp,init:t=>{Cd.setConf(t.journey),wd.clear()}},ON),Oe("flowchart",{parser:ld,db:ir,renderer:Pc,styles:Ko,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,PA.setConf(t.flowchart),ir.clear(),ir.setGen("gen-1")}},wA),Oe("flowchart-v2",{parser:ld,db:ir,renderer:Pc,styles:Ko,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ap({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),Pc.setConf(t.flowchart),ir.clear(),ir.setGen("gen-2")}},TA),Oe("gitGraph",{parser:VE,db:sC,renderer:fC,styles:gC},YE))};class Jh{constructor(e,i){var r,n;this.txt=e,this.type="graph",this.detectTypeFailed=!1;const s=G();this.txt=e;try{this.type=Mu(e,s)}catch(l){this.handleError(l,i),this.type="error",this.detectTypeFailed=!0}const a=xp(this.type);D.debug("Type "+this.type),this.db=a.db,(n=(r=this.db).clear)==null||n.call(r),this.renderer=a.renderer,this.parser=a.parser;const o=this.parser.parse.bind(this.parser);this.parser.parse=l=>o(UT(l,this.db)),this.parser.parser.yy=this.db,a.init&&(a.init(s),D.info("Initialized diagram "+this.type,s)),this.txt+=`
1274
1274
  `,this.parse(this.txt,i)}parse(e,i){var r,n;if(this.detectTypeFailed)return!1;try{return e=e+`
1275
1275
  `,(n=(r=this.db).clear)==null||n.call(r),this.parser.parse(e),!0}catch(s){this.handleError(s,i)}return!1}handleError(e,i){if(i===void 0)throw e;if(Fu(e)){i(e.str,e.hash);return}i(e)}getParser(){return this.parser}getType(){return this.type}}const m1=(t,e)=>{const i=Mu(t,G());try{xp(i)}catch{const n=qT(i);if(!n)throw new Error(`Diagram ${i} not found.`);return n().then(({diagram:s})=>(Oe(i,s,void 0),new Jh(t,e)))}return new Jh(t,e)},b1=Jh,bI="graphics-document document";function _I(t,e){t.attr("role",bI),jn(e)||t.attr("aria-roledescription",e)}function xI(t,e,i,r){if(t.insert!==void 0)if(e||i){if(i){const n="chart-desc-"+r;t.attr("aria-describedby",n),t.insert("desc",":first-child").attr("id",n).text(i)}if(e){const n="chart-title-"+r;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}else return}const _1=["graph","flowchart","flowchart-v2","stateDiagram","stateDiagram-v2"],jy="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",$y="sandbox",Ky="loose",vI="http://www.w3.org/2000/svg",Qy="http://www.w3.org/1999/xlink",Zy="http://www.w3.org/1999/xhtml",kI="100%",wI="100%",TI="border:0;margin:0;",EI="margin:0",CI="allow-top-navigation-by-user-activation allow-popups",SI='The "iframe" tag is not supported by your browser.',Jy=["foreignobject"],tm=["dominant-baseline"];function AI(t,e){return Pa(),new b1(t,e).parse(t,e)}async function LI(t,e){return Pa(),(await m1(t,e)).parse(t,e)}const em=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){const r=i.substring(1,i.length-1);return/^\+?\d+$/.test(r)?"fl°°"+r+"¶ß":"fl°"+r+"¶ß"}),e},x1=function(t){let e=t;return e=e.replace(/fl°°/g,"&#"),e=e.replace(/fl°/g,"&"),e=e.replace(/¶ß/g,";"),e},Ld=(t,e,i=[])=>`
1276
1276
  .${t} ${e} { ${i.join(" !important; ")} !important; }`,BI=(t,e,i={})=>{var r;let n="";if(t.themeCSS!==void 0&&(n+=`
@@ -1 +1 @@
1
- var f=Object.defineProperty;var k=(t,e,a)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var s=(t,e,a)=>(k(t,typeof e!="symbol"?e+"":e,a),a);import{b_ as C,a as v,r as p,ch as w,j as o,C as P,J as S,cv as j,gT as T,gU as I,gV as M,gW as R,gX as _,gY as A,g_ as L,gZ as N,h2 as q,h1 as u}from"./index-p2PlVFLf.js";import{u as E,a as g}from"./unknownify-g-QgUElr.js";import{L as D}from"./index-pAMHRYpv.js";class W{constructor(e){s(this,"current",0);s(this,"all");this.all=e}next(){const e=this.all[this.current];return this.current=(this.current+1)%this.all.length,e}}const m=["circle","rect","rectRounded","rectRot","triangle"],H=(t,e)=>t.map(a=>({x:a[0],y:e(a[1])})),$=(t,e)=>({locale:e.locale,responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},color:t.palette.text.secondary,plugins:{tooltip:{backgroundColor:t.palette.background.paper,bodyColor:t.palette.text.primary,titleColor:t.palette.action.active,borderColor:t.palette.primary.main,borderWidth:1,padding:10,boxPadding:5,usePointStyle:!0,callbacks:{title:a=>u(1e3*a[0].parsed.x,e.locale)},itemSort:(a,i)=>i.parsed.y-a.parsed.y},legend:{position:"bottom",align:"start",labels:{boxWidth:10,boxHeight:10,usePointStyle:!0,padding:24}},title:{text:"Top 10 requests per second in the last 6 hours",position:"top",align:"start",display:!0,font:{size:16,weight:"400"},color:t.palette.text.primary,padding:{bottom:32}}},scales:{y:{type:"linear",title:{display:!0,text:"Requests per second",color:t.palette.text.secondary},suggestedMin:0,ticks:{precision:0,color:t.palette.text.secondary},grid:{color:t.palette.divider,borderColor:t.palette.divider}},x:{type:"time",time:{unit:"minute"},grid:{display:!0,color:t.palette.divider,borderColor:t.palette.divider},ticks:{callback:(a,i,r)=>u(r[i].value*1e3,e.locale)}}}});class z{constructor(e){s(this,"items");s(this,"picked",new Map);this.items=new W(e)}pick(e){return this.picked.has(e)||this.picked.set(e,this.items.next()),this.picked.get(e)}}const B=(t,e)=>{var a;if((a=e==null?void 0:e.data)!=null&&a.result){const i=new z([t.palette.success,t.palette.error,t.palette.primary,t.palette.warning]);return e.data.result.map((r,x)=>{var c,d;const n=g((c=r.metric)==null?void 0:c.endpoint),h=g((d=r.metric)==null?void 0:d.appName),l=i.pick(n),y=r.values||[];return{label:`${n}: ${h}`,borderColor:l.main,backgroundColor:l.main,data:H(y,b=>parseFloat(b)),elements:{point:{radius:4,pointStyle:m[x%m.length]},line:{borderDash:[8,4]}}}})}return[]},V=()=>{const{locationSettings:t}=C(),{metrics:e}=E(),a=v(),i=p.useMemo(()=>$(a,t),[a,t]);w("Network - Traffic");const r=p.useMemo(()=>({datasets:B(a,e)}),[a,e,t]);return o.jsx(P,{condition:r.datasets.length===0,show:o.jsx(S,{severity:"warning",children:"No data available."}),elseShow:o.jsx(j,{sx:{display:"grid",gap:4},children:o.jsx("div",{style:{height:400},children:o.jsx(D,{data:r,options:i,"aria-label":"An instance metrics line chart with two lines: requests per second for admin API and requests per second for client API"})})})})};T.register(I,M,R,_,A,L,N,q);export{V as NetworkTraffic,V as default};
1
+ var f=Object.defineProperty;var k=(t,e,a)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var s=(t,e,a)=>(k(t,typeof e!="symbol"?e+"":e,a),a);import{b_ as C,a as v,r as p,ch as w,j as o,C as P,J as S,cv as j,gT as T,gU as I,gV as M,gW as R,gX as _,gY as A,g_ as L,gZ as N,h2 as q,h1 as u}from"./index-uUGk-gee.js";import{u as E,a as g}from"./unknownify-joALjS6W.js";import{L as D}from"./index-UE-HeGu0.js";class W{constructor(e){s(this,"current",0);s(this,"all");this.all=e}next(){const e=this.all[this.current];return this.current=(this.current+1)%this.all.length,e}}const m=["circle","rect","rectRounded","rectRot","triangle"],H=(t,e)=>t.map(a=>({x:a[0],y:e(a[1])})),$=(t,e)=>({locale:e.locale,responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},color:t.palette.text.secondary,plugins:{tooltip:{backgroundColor:t.palette.background.paper,bodyColor:t.palette.text.primary,titleColor:t.palette.action.active,borderColor:t.palette.primary.main,borderWidth:1,padding:10,boxPadding:5,usePointStyle:!0,callbacks:{title:a=>u(1e3*a[0].parsed.x,e.locale)},itemSort:(a,i)=>i.parsed.y-a.parsed.y},legend:{position:"bottom",align:"start",labels:{boxWidth:10,boxHeight:10,usePointStyle:!0,padding:24}},title:{text:"Top 10 requests per second in the last 6 hours",position:"top",align:"start",display:!0,font:{size:16,weight:"400"},color:t.palette.text.primary,padding:{bottom:32}}},scales:{y:{type:"linear",title:{display:!0,text:"Requests per second",color:t.palette.text.secondary},suggestedMin:0,ticks:{precision:0,color:t.palette.text.secondary},grid:{color:t.palette.divider,borderColor:t.palette.divider}},x:{type:"time",time:{unit:"minute"},grid:{display:!0,color:t.palette.divider,borderColor:t.palette.divider},ticks:{callback:(a,i,r)=>u(r[i].value*1e3,e.locale)}}}});class z{constructor(e){s(this,"items");s(this,"picked",new Map);this.items=new W(e)}pick(e){return this.picked.has(e)||this.picked.set(e,this.items.next()),this.picked.get(e)}}const B=(t,e)=>{var a;if((a=e==null?void 0:e.data)!=null&&a.result){const i=new z([t.palette.success,t.palette.error,t.palette.primary,t.palette.warning]);return e.data.result.map((r,x)=>{var c,d;const n=g((c=r.metric)==null?void 0:c.endpoint),h=g((d=r.metric)==null?void 0:d.appName),l=i.pick(n),y=r.values||[];return{label:`${n}: ${h}`,borderColor:l.main,backgroundColor:l.main,data:H(y,b=>parseFloat(b)),elements:{point:{radius:4,pointStyle:m[x%m.length]},line:{borderDash:[8,4]}}}})}return[]},V=()=>{const{locationSettings:t}=C(),{metrics:e}=E(),a=v(),i=p.useMemo(()=>$(a,t),[a,t]);w("Network - Traffic");const r=p.useMemo(()=>({datasets:B(a,e)}),[a,e,t]);return o.jsx(P,{condition:r.datasets.length===0,show:o.jsx(S,{severity:"warning",children:"No data available."}),elseShow:o.jsx(j,{sx:{display:"grid",gap:4},children:o.jsx("div",{style:{height:400},children:o.jsx(D,{data:r,options:i,"aria-label":"An instance metrics line chart with two lines: requests per second for admin API and requests per second for client API"})})})})};T.register(I,M,R,_,A,L,N,q);export{V as NetworkTraffic,V as default};
@@ -1,4 +1,4 @@
1
- import{g as PR,g$ as NR,cD as BR,s as _R,r as Gu,U as LR,j as Ov}from"./index-p2PlVFLf.js";import{M as Ti,F as De,a as me,G as sa,H as It,v as wn,T as ml,P as Ds,j as On,C as aa,k as Un,a8 as qc,A as pg,d as tn,q as Hi,n as $r,f as Fl,a9 as VM,o as Oo,aa as HM,ab as qM,c as xo,S as Vr,R as Su,ac as Ii,b as IR,u as Zn,r as Wb,N as zR,a7 as VR,ad as Nu}from"./index-TzAeUmk4.js";import{b as HR,a as qR,c as FR,i as FM,t as w2,d as WM,n as a0,e as WR,k as UR,f as KR,g as UM,h as GR,j as JR,l as YR,m as XR,o as en,p as vn,q as QR,r as ZR,u as Fc,s as eP,v as If,w as pi,x as tP,y as nP}from"./uniqueId-ebLYlRiD.js";function _n(n){return Array.isArray(n)}function li(n){return n!==null&&typeof n=="object"&&n.constructor===Object}function KM(n){return n&&typeof n=="object"?n.op==="add":!1}function GM(n){return n&&typeof n=="object"?n.op==="remove":!1}function Ub(n){return n&&typeof n=="object"?n.op==="replace":!1}function Tv(n){return n&&typeof n=="object"?n.op==="copy":!1}function xc(n){return n&&typeof n=="object"?n.op==="move":!1}function iP(n,e){return JSON.stringify(n)===JSON.stringify(e)}function rP(n,e){return n===e}function JM(n){return n.slice(0,n.length-1)}function oP(n){return n[n.length-1]}function sP(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rP;if(n.length<e.length)return!1;for(let i=0;i<e.length;i++)if(!t(n[i],e[i]))return!1;return!0}function YM(n){return typeof n=="object"&&n!==null}function Kb(n){if(_n(n)){const e=n.slice();return Object.getOwnPropertySymbols(n).forEach(t=>{e[t]=n[t]}),e}else if(li(n)){const e={...n};return Object.getOwnPropertySymbols(n).forEach(t=>{e[t]=n[t]}),e}else return n}function Gb(n,e,t){if(n[e]===t)return n;{const i=Kb(n);return i[e]=t,i}}function Ze(n,e){let t=n,i=0;for(;i<e.length;)li(t)?t=t[e[i]]:_n(t)?t=t[parseInt(e[i])]:t=void 0,i++;return t}function Ao(n,e,t){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e.length===0)return t;const r=e[0],o=Ao(n?n[r]:void 0,e.slice(1),t,i);if(li(n)||_n(n))return Gb(n,r,o);if(i){const s=aP.test(r)?[]:{};return s[r]=o,s}else throw new Error("Path does not exist")}const aP=/^\d+$/;function XM(n,e,t){if(e.length===0)return t(n);if(!YM(n))throw new Error("Path doesn't exist");const i=e[0],r=XM(n[i],e.slice(1),t);return Gb(n,i,r)}function Jb(n,e){if(e.length===0)return n;if(!YM(n))throw new Error("Path does not exist");if(e.length===1){const r=e[0];if(r in n){const o=Kb(n);return _n(o)&&o.splice(parseInt(r),1),li(o)&&delete o[r],o}else return n}const t=e[0],i=Jb(n[t],e.slice(1));return Gb(n,t,i)}function Yb(n,e,t){const i=e.slice(0,e.length-1),r=e[e.length-1];return XM(n,i,o=>{if(!Array.isArray(o))throw new TypeError("Array expected at path "+JSON.stringify(i));const s=Kb(o);return s.splice(parseInt(r),0,t),s})}function mo(n,e){return n===void 0?!1:e.length===0?!0:n===null?!1:mo(n[e[0]],e.slice(1))}function qo(n){const e=n.split("/");return e.shift(),e.map(t=>t.replace(/~1/g,"/").replace(/~0/g,"~"))}function qe(n){return n.map(QM).join("")}function QM(n){return"/"+String(n).replace(/~/g,"~0").replace(/\//g,"~1")}function x2(n,e){return n+QM(e)}function mg(n,e){return n.startsWith(e)&&(n.length===e.length||n[e.length]==="/")}function Bo(n,e,t){let i=n;for(let r=0;r<e.length;r++){mP(e[r]);let o=e[r];if(t&&t.before){const l=t.before(i,o);if(l!==void 0){if(l.document!==void 0&&(i=l.document),l.json!==void 0)throw new Error('Deprecation warning: returned object property ".json" has been renamed to ".document"');l.operation!==void 0&&(o=l.operation)}}const s=i,a=ws(i,o.path);if(o.op==="add")i=uP(i,a,o.value);else if(o.op==="remove")i=cP(i,a);else if(o.op==="replace")i=lP(i,a,o.value);else if(o.op==="copy")i=hP(i,a,Ev(o.from));else if(o.op==="move")i=fP(i,a,Ev(o.from));else if(o.op==="test")dP(i,a,o.value);else throw new Error("Unknown JSONPatch operation "+JSON.stringify(o));if(t&&t.after){const l=t.after(i,o,s);l!==void 0&&(i=l)}}return i}function lP(n,e,t){return Ao(n,e,t)}function cP(n,e){return Jb(n,e)}function uP(n,e,t){return vf(n,e)?Yb(n,e,t):Ao(n,e,t)}function hP(n,e,t){const i=Ze(n,t);if(vf(n,e))return Yb(n,e,i);{const r=Ze(n,t);return Ao(n,e,r)}}function fP(n,e,t){const i=Ze(n,t),r=Jb(n,t);return vf(r,e)?Yb(r,e,i):Ao(r,e,i)}function dP(n,e,t){if(t===void 0)throw new Error(`Test failed: no value provided (path: "${qe(e)}")`);if(!mo(n,e))throw new Error(`Test failed: path not found (path: "${qe(e)}")`);const i=Ze(n,e);if(!iP(i,t))throw new Error(`Test failed, value differs (path: "${qe(e)}")`)}function vf(n,e){if(e.length===0)return!1;const t=Ze(n,JM(e));return Array.isArray(t)}function pP(n,e){if(oP(e)!=="-")return e;const t=JM(e),i=Ze(n,t);return t.concat(i.length)}function mP(n){if(!["add","remove","replace","copy","move","test"].includes(n.op))throw new Error("Unknown JSONPatch op "+JSON.stringify(n.op));if(typeof n.path!="string")throw new Error('Required property "path" missing or not a string in operation '+JSON.stringify(n));if((n.op==="copy"||n.op==="move")&&typeof n.from!="string")throw new Error('Required property "from" missing or not a string in operation '+JSON.stringify(n))}function ws(n,e){return pP(n,qo(e))}function Ev(n){return qo(n)}function ZM(n,e,t){let i=[];return Bo(n,e,{before:(o,s)=>{let a;const l=ws(o,s.path);if(s.op==="add")a=n8(o,l);else if(s.op==="remove")a=t8(o,l);else if(s.op==="replace")a=e8(o,l);else if(s.op==="copy")a=gP(o,l);else if(s.op==="move")a=vP(o,l,Ev(s.from));else if(s.op==="test")a=[];else throw new Error("Unknown JSONPatch operation "+JSON.stringify(s));let c;if(t&&t.before){const u=t.before(o,s,a);if(u&&u.revertOperations&&(a=u.revertOperations),u&&u.document&&(c=u.document),u&&u.json)throw new Error('Deprecation warning: returned object property ".json" has been renamed to ".document"')}if(i=a.concat(i),c!==void 0)return{document:c}}}),i}function e8(n,e){return[{op:"replace",path:qe(e),value:Ze(n,e)}]}function t8(n,e){return[{op:"add",path:qe(e),value:Ze(n,e)}]}function n8(n,e){return vf(n,e)||!mo(n,e)?[{op:"remove",path:qe(e)}]:e8(n,e)}function gP(n,e){return n8(n,e)}function vP(n,e,t){if(e.length<t.length&&sP(t,e))return[{op:"replace",path:qe(e),value:n}];const i={op:"move",from:qe(e),path:qe(t)};return!vf(n,e)&&mo(n,e)?[i,...t8(n,e)]:[i]}var Xp={},k2={b:"\b",f:"\f",n:`
1
+ import{g as PR,g$ as NR,cD as BR,s as _R,r as Gu,U as LR,j as Ov}from"./index-uUGk-gee.js";import{M as Ti,F as De,a as me,G as sa,H as It,v as wn,T as ml,P as Ds,j as On,C as aa,k as Un,a8 as qc,A as pg,d as tn,q as Hi,n as $r,f as Fl,a9 as VM,o as Oo,aa as HM,ab as qM,c as xo,S as Vr,R as Su,ac as Ii,b as IR,u as Zn,r as Wb,N as zR,a7 as VR,ad as Nu}from"./index-TzAeUmk4.js";import{b as HR,a as qR,c as FR,i as FM,t as w2,d as WM,n as a0,e as WR,k as UR,f as KR,g as UM,h as GR,j as JR,l as YR,m as XR,o as en,p as vn,q as QR,r as ZR,u as Fc,s as eP,v as If,w as pi,x as tP,y as nP}from"./uniqueId-ebLYlRiD.js";function _n(n){return Array.isArray(n)}function li(n){return n!==null&&typeof n=="object"&&n.constructor===Object}function KM(n){return n&&typeof n=="object"?n.op==="add":!1}function GM(n){return n&&typeof n=="object"?n.op==="remove":!1}function Ub(n){return n&&typeof n=="object"?n.op==="replace":!1}function Tv(n){return n&&typeof n=="object"?n.op==="copy":!1}function xc(n){return n&&typeof n=="object"?n.op==="move":!1}function iP(n,e){return JSON.stringify(n)===JSON.stringify(e)}function rP(n,e){return n===e}function JM(n){return n.slice(0,n.length-1)}function oP(n){return n[n.length-1]}function sP(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rP;if(n.length<e.length)return!1;for(let i=0;i<e.length;i++)if(!t(n[i],e[i]))return!1;return!0}function YM(n){return typeof n=="object"&&n!==null}function Kb(n){if(_n(n)){const e=n.slice();return Object.getOwnPropertySymbols(n).forEach(t=>{e[t]=n[t]}),e}else if(li(n)){const e={...n};return Object.getOwnPropertySymbols(n).forEach(t=>{e[t]=n[t]}),e}else return n}function Gb(n,e,t){if(n[e]===t)return n;{const i=Kb(n);return i[e]=t,i}}function Ze(n,e){let t=n,i=0;for(;i<e.length;)li(t)?t=t[e[i]]:_n(t)?t=t[parseInt(e[i])]:t=void 0,i++;return t}function Ao(n,e,t){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e.length===0)return t;const r=e[0],o=Ao(n?n[r]:void 0,e.slice(1),t,i);if(li(n)||_n(n))return Gb(n,r,o);if(i){const s=aP.test(r)?[]:{};return s[r]=o,s}else throw new Error("Path does not exist")}const aP=/^\d+$/;function XM(n,e,t){if(e.length===0)return t(n);if(!YM(n))throw new Error("Path doesn't exist");const i=e[0],r=XM(n[i],e.slice(1),t);return Gb(n,i,r)}function Jb(n,e){if(e.length===0)return n;if(!YM(n))throw new Error("Path does not exist");if(e.length===1){const r=e[0];if(r in n){const o=Kb(n);return _n(o)&&o.splice(parseInt(r),1),li(o)&&delete o[r],o}else return n}const t=e[0],i=Jb(n[t],e.slice(1));return Gb(n,t,i)}function Yb(n,e,t){const i=e.slice(0,e.length-1),r=e[e.length-1];return XM(n,i,o=>{if(!Array.isArray(o))throw new TypeError("Array expected at path "+JSON.stringify(i));const s=Kb(o);return s.splice(parseInt(r),0,t),s})}function mo(n,e){return n===void 0?!1:e.length===0?!0:n===null?!1:mo(n[e[0]],e.slice(1))}function qo(n){const e=n.split("/");return e.shift(),e.map(t=>t.replace(/~1/g,"/").replace(/~0/g,"~"))}function qe(n){return n.map(QM).join("")}function QM(n){return"/"+String(n).replace(/~/g,"~0").replace(/\//g,"~1")}function x2(n,e){return n+QM(e)}function mg(n,e){return n.startsWith(e)&&(n.length===e.length||n[e.length]==="/")}function Bo(n,e,t){let i=n;for(let r=0;r<e.length;r++){mP(e[r]);let o=e[r];if(t&&t.before){const l=t.before(i,o);if(l!==void 0){if(l.document!==void 0&&(i=l.document),l.json!==void 0)throw new Error('Deprecation warning: returned object property ".json" has been renamed to ".document"');l.operation!==void 0&&(o=l.operation)}}const s=i,a=ws(i,o.path);if(o.op==="add")i=uP(i,a,o.value);else if(o.op==="remove")i=cP(i,a);else if(o.op==="replace")i=lP(i,a,o.value);else if(o.op==="copy")i=hP(i,a,Ev(o.from));else if(o.op==="move")i=fP(i,a,Ev(o.from));else if(o.op==="test")dP(i,a,o.value);else throw new Error("Unknown JSONPatch operation "+JSON.stringify(o));if(t&&t.after){const l=t.after(i,o,s);l!==void 0&&(i=l)}}return i}function lP(n,e,t){return Ao(n,e,t)}function cP(n,e){return Jb(n,e)}function uP(n,e,t){return vf(n,e)?Yb(n,e,t):Ao(n,e,t)}function hP(n,e,t){const i=Ze(n,t);if(vf(n,e))return Yb(n,e,i);{const r=Ze(n,t);return Ao(n,e,r)}}function fP(n,e,t){const i=Ze(n,t),r=Jb(n,t);return vf(r,e)?Yb(r,e,i):Ao(r,e,i)}function dP(n,e,t){if(t===void 0)throw new Error(`Test failed: no value provided (path: "${qe(e)}")`);if(!mo(n,e))throw new Error(`Test failed: path not found (path: "${qe(e)}")`);const i=Ze(n,e);if(!iP(i,t))throw new Error(`Test failed, value differs (path: "${qe(e)}")`)}function vf(n,e){if(e.length===0)return!1;const t=Ze(n,JM(e));return Array.isArray(t)}function pP(n,e){if(oP(e)!=="-")return e;const t=JM(e),i=Ze(n,t);return t.concat(i.length)}function mP(n){if(!["add","remove","replace","copy","move","test"].includes(n.op))throw new Error("Unknown JSONPatch op "+JSON.stringify(n.op));if(typeof n.path!="string")throw new Error('Required property "path" missing or not a string in operation '+JSON.stringify(n));if((n.op==="copy"||n.op==="move")&&typeof n.from!="string")throw new Error('Required property "from" missing or not a string in operation '+JSON.stringify(n))}function ws(n,e){return pP(n,qo(e))}function Ev(n){return qo(n)}function ZM(n,e,t){let i=[];return Bo(n,e,{before:(o,s)=>{let a;const l=ws(o,s.path);if(s.op==="add")a=n8(o,l);else if(s.op==="remove")a=t8(o,l);else if(s.op==="replace")a=e8(o,l);else if(s.op==="copy")a=gP(o,l);else if(s.op==="move")a=vP(o,l,Ev(s.from));else if(s.op==="test")a=[];else throw new Error("Unknown JSONPatch operation "+JSON.stringify(s));let c;if(t&&t.before){const u=t.before(o,s,a);if(u&&u.revertOperations&&(a=u.revertOperations),u&&u.document&&(c=u.document),u&&u.json)throw new Error('Deprecation warning: returned object property ".json" has been renamed to ".document"')}if(i=a.concat(i),c!==void 0)return{document:c}}}),i}function e8(n,e){return[{op:"replace",path:qe(e),value:Ze(n,e)}]}function t8(n,e){return[{op:"add",path:qe(e),value:Ze(n,e)}]}function n8(n,e){return vf(n,e)||!mo(n,e)?[{op:"remove",path:qe(e)}]:e8(n,e)}function gP(n,e){return n8(n,e)}function vP(n,e,t){if(e.length<t.length&&sP(t,e))return[{op:"replace",path:qe(e),value:n}];const i={op:"move",from:qe(e),path:qe(t)};return!vf(n,e)&&mo(n,e)?[i,...t8(n,e)]:[i]}var Xp={},k2={b:"\b",f:"\f",n:`
2
2
  `,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},yP=97;Xp.parse=function(n,e,t){var i={},r=0,o=0,s=0,a=t&&t.bigint&&typeof BigInt<"u";return{data:l("",!0),pointers:i};function l(O,C){c();var E;b(O,"value");var T=m();switch(T){case"t":p("rue"),E=!0;break;case"f":p("alse"),E=!1;break;case"n":p("ull"),E=null;break;case'"':E=u();break;case"[":E=f(O);break;case"{":E=d(O);break;default:g(),"-0123456789".indexOf(T)>=0?E=h():k()}return b(O,"valueEnd"),c(),C&&s<n.length&&k(),E}function c(){e:for(;s<n.length;){switch(n[s]){case" ":o++;break;case" ":o+=4;break;case"\r":o=0;break;case`
3
3
  `:o=0,r++;break;default:break e}s++}}function u(){for(var O="",C;C=m(),C!='"';)C=="\\"?(C=m(),C in k2?O+=k2[C]:C=="u"?O+=v():S()):O+=C;return O}function h(){var O="",C=!0;n[s]=="-"&&(O+=m()),O+=n[s]=="0"?m():y(),n[s]=="."&&(O+=m()+y(),C=!1),(n[s]=="e"||n[s]=="E")&&(O+=m(),(n[s]=="+"||n[s]=="-")&&(O+=m()),O+=y(),C=!1);var E=+O;return a&&C&&(E>Number.MAX_SAFE_INTEGER||E<Number.MIN_SAFE_INTEGER)?BigInt(O):E}function f(O){c();var C=[],E=0;if(m()=="]")return C;for(g();;){var T=O+"/"+E;C.push(l(T)),c();var F=m();if(F=="]")break;F!=","&&S(),c(),E++}return C}function d(O){c();var C={};if(m()=="}")return C;for(g();;){var E=x();m()!='"'&&S();var T=u(),F=O+"/"+Dv(T);w(F,"key",E),b(F,"keyEnd"),c(),m()!=":"&&S(),c(),C[T]=l(F),c();var P=m();if(P=="}")break;P!=","&&S(),c()}return C}function p(O){for(var C=0;C<O.length;C++)m()!==O[C]&&S()}function m(){D();var O=n[s];return s++,o++,O}function g(){s--,o--}function v(){for(var O=4,C=0;O--;){C<<=4;var E=m().toLowerCase();E>="a"&&E<="f"?C+=E.charCodeAt()-yP+10:E>="0"&&E<="9"?C+=+E:S()}return String.fromCharCode(C)}function y(){for(var O="";n[s]>="0"&&n[s]<="9";)O+=m();if(O.length)return O;D(),k()}function b(O,C){w(O,C,x())}function w(O,C,E){i[O]=i[O]||{},i[O][C]=E}function x(){return{line:r,column:o,pos:s}}function k(){throw new SyntaxError("Unexpected token "+n[s]+" in JSON at position "+s)}function S(){g(),k()}function D(){if(s>=n.length)throw new SyntaxError("Unexpected end of JSON input")}};Xp.stringify=function(n,e,t){if(!zf(n))return;var i=0,r,o,s=typeof t=="object"?t.space:t;switch(typeof s){case"number":var a=s>10?10:s<0?0:Math.floor(s);s=a&&w(a," "),r=a,o=a;break;case"string":s=s.slice(0,10),r=0,o=0;for(var l=0;l<s.length;l++){var c=s[l];switch(c){case" ":o++;break;case" ":o+=4;break;case"\r":o=0;break;case`
4
4
  `:o=0,i++;break;default:throw new Error("whitespace characters not allowed in JSON")}r++}break;default:s=void 0}var u="",h={},f=0,d=0,p=0,m=t&&t.es6&&typeof Map=="function";return g(n,0,""),{json:u,pointers:h};function g(x,k,S){switch(b(S,"value"),typeof x){case"number":case"bigint":case"boolean":v(""+x);break;case"string":v(Vf(x));break;case"object":x===null?v("null"):typeof x.toJSON=="function"?v(Vf(x.toJSON())):Array.isArray(x)?D():m?x.constructor.BYTES_PER_ELEMENT?D():x instanceof Map?C():x instanceof Set?C(!0):O():O()}b(S,"valueEnd");function D(){if(x.length){v("[");for(var E=k+1,T=0;T<x.length;T++){T&&v(","),y(E);var F=zf(x[T])?x[T]:null,P=S+"/"+T;g(F,E,P)}y(k),v("]")}else v("[]")}function O(){var E=Object.keys(x);if(E.length){v("{");for(var T=k+1,F=0;F<E.length;F++){var P=E[F],J=x[P];if(zf(J)){F&&v(",");var X=S+"/"+Dv(P);y(T),b(X,"key"),v(Vf(P)),b(X,"keyEnd"),v(":"),s&&v(" "),g(J,T,X)}}y(k),v("}")}else v("{}")}function C(E){if(x.size){v("{");for(var T=k+1,F=!0,P=x.entries(),J=P.next();!J.done;){var X=J.value,H=X[0],R=E?!0:X[1];if(zf(R)){F||v(","),F=!1;var I=S+"/"+Dv(H);y(T),b(I,"key"),v(Vf(H)),b(I,"keyEnd"),v(":"),s&&v(" "),g(R,T,I)}J=P.next()}y(k),v("}")}else v("{}")}}function v(x){d+=x.length,p+=x.length,u+=x}function y(x){if(s){for(u+=`
@@ -1 +1 @@
1
- import{c as se,j as e,ax as T,J as R,ac as te,cB as ne,af as oe,C as b,B as C,aq as re,du as ae,a6 as ie,a7 as le,a8 as ce,a9 as de,ap as M,c4 as W,ay as ue,dF as he,c9 as pe,gR as me,s as p,aK as G,dV as xe,ab as v,dW as I,r as d,aa as je,ae as N,dq as ge,dN as ye,a3 as D,a4 as fe,b as $,aI as q,cV as be,c_ as Ce,bX as Te,b7 as z,f as Ae,v as ke,bU as ve,h as Se,ar as V,ci as Ee,gS as f,d5 as Ie,gd as H,d3 as Ne,d4 as De,T as w,ef as we,F as Re,eh as Pe,dg as Be,ei as Fe,g8 as _e,aN as Le,aO as J,aP as Q,bZ as Oe,ba as Ue,bb as Me,br as He,dc as Ke}from"./index-p2PlVFLf.js";const We=se(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04L21 10zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"}),"Key"),Ge=()=>{const{uiConfig:s}=T();return e.jsxs(R,{severity:"info",children:[e.jsxs("p",{children:["Read the"," ",e.jsx("a",{href:"https://docs.getunleash.io/reference/sdks",target:"_blank",rel:"noreferrer",children:"SDK overview"})," ","to connect Unleash to your application. Please note it can take up to ",e.jsx("strong",{children:"1 minute"})," before a new API key is activated."]}),e.jsx("br",{}),e.jsx("strong",{children:"API URL: "})," ",e.jsxs("pre",{style:{display:"inline"},children:[s.unleashUrl,"/api/"]})]})},$e=["Icon","createdAt"],qe=["Icon","project","seenAt"],gs=({compact:s=!1,setHiddenColumns:t,columns:n,loading:o,rows:r,getTableProps:a,getTableBodyProps:i,headerGroups:m,globalFilter:h,prepareRow:x})=>{const g=te(ne.breakpoints.down("md"));return oe([{condition:g,columns:$e},{condition:s,columns:qe}],t,n),e.jsxs(e.Fragment,{children:[e.jsx(b,{condition:r.length>0,show:e.jsx(C,{sx:{mb:4},children:e.jsx(Ge,{})})}),e.jsx(C,{sx:{overflowX:"auto"},children:e.jsx(re,{value:h,children:e.jsxs(ae,{...a(),children:[e.jsx(ie,{headerGroups:m}),e.jsx(le,{...i(),children:r.map(j=>(x(j),e.jsx(ce,{hover:!0,...j.getRowProps(),children:j.cells.map(u=>e.jsx(de,{...u.getCellProps(),children:u.render("Cell")}))})))})]})})}),e.jsx(b,{condition:r.length===0&&!o,show:e.jsx(b,{condition:(h==null?void 0:h.length)>0,show:e.jsxs(M,{children:["No tokens found matching “",h,"”"]}),elseShow:e.jsx(M,{children:e.jsxs("span",{children:["No tokens available. Read ",e.jsx(W,{href:"https://docs.getunleash.io/how-to/api",target:"_blank",rel:"noreferrer",children:"API How-to guides"})," "," to learn more."]})})})})]})},ys=({path:s,permission:t,project:n})=>{const o=ue();return e.jsx(he,{Icon:pe,onClick:()=>o(s),"data-testid":me,permission:t,projectId:n,maxWidth:"700px",children:"New API token"})},ze=p(G)(({theme:s})=>({textDecoration:"none",color:s.palette.links,"&:hover, &:focus":{textDecoration:"underline"}})),Ve=({projects:s,project:t})=>{const{searchQuery:n}=xe(),o=s&&Array.isArray(s)?s:t?[t]:[];return o.length===0?e.jsx(v,{children:e.jsx(I,{search:n,children:"*"})}):e.jsx(v,{children:o.map((r,a)=>e.jsxs(d.Fragment,{children:[a>0&&", ",!r||r==="*"?e.jsx(I,{search:n,children:"*"}):e.jsx(ze,{to:`/projects/${r}`,children:e.jsx(I,{search:n,children:r})})]},r))})},fs=(s,t)=>{const n=d.useMemo(()=>({sortBy:[{id:"createdAt",desc:!0}]}),[]),o=d.useMemo(()=>[{id:"Icon",width:"1%",Cell:()=>e.jsx(je,{icon:e.jsx(We,{color:"disabled"})}),disableSortBy:!0,disableGlobalFilter:!0},{Header:"Username",accessor:"username",Cell:N},{Header:"Type",accessor:"type",Cell:({value:u})=>e.jsx(N,{value:K[u.toLowerCase()].label,subtitle:K[u.toLowerCase()].title}),minWidth:280},{Header:"Project",accessor:"project",Cell:u=>e.jsx(Ve,{project:u.row.original.project,projects:u.row.original.projects}),minWidth:120},{Header:"Environment",accessor:"environment",Cell:N,minWidth:120},{Header:"Created",accessor:"createdAt",Cell:ge,minWidth:150,disableGlobalFilter:!0},{Header:"Last seen",accessor:"seenAt",Cell:ye,minWidth:150,disableGlobalFilter:!0},{Header:"Actions",id:"Actions",align:"center",width:"1%",disableSortBy:!0,disableGlobalFilter:!0,Cell:t}],[]),{getTableProps:r,getTableBodyProps:a,headerGroups:i,rows:m,prepareRow:h,state:x,setGlobalFilter:g,setHiddenColumns:j}=D.useTable({columns:o,data:s,initialState:n,sortTypes:fe,autoResetHiddenColumns:!1,disableSortRemove:!0},D.useGlobalFilter,D.useSortBy);return{getTableProps:r,getTableBodyProps:a,headerGroups:i,rows:m,prepareRow:h,state:x,setGlobalFilter:g,setHiddenColumns:j,columns:o}},K={client:{label:"CLIENT",title:"Connect server-side SDK or Unleash Proxy"},frontend:{label:"FRONTEND",title:"Connect web and mobile SDK"},admin:{label:"ADMIN",title:"Full access for managing Unleash"}},bs=({token:s,project:t,permission:n,track:o})=>{const{setToastData:r}=$(),a=i=>{Ce(i)&&(r({type:"success",title:"Token copied to clipboard"}),o&&typeof o=="function"&&o())};return e.jsx(q,{permission:n,projectId:t,tooltipProps:{title:"Copy token",arrow:!0},onClick:()=>a(s.secret),size:"large",children:e.jsx(be,{})})},Je=p("ul")({marginBottom:0}),Cs=({token:s,permission:t,onRemove:n,project:o})=>{const[r,a]=d.useState(!1),{setToastData:i,setToastApiError:m}=$(),h=async()=>{try{await n(),a(!1),i({type:"success",title:"API token removed"})}catch(x){m(Ae(x))}};return e.jsxs(e.Fragment,{children:[e.jsx(q,{permission:t,projectId:o,tooltipProps:{title:"Delete token",arrow:!0},onClick:()=>a(!0),size:"large",children:e.jsx(Te,{})}),e.jsx(z,{open:r,onClick:h,onClose:()=>a(!1),title:"Confirm deletion",children:e.jsxs("div",{children:["Are you sure you want to delete the following API token?",e.jsx("br",{}),e.jsxs(Je,{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"username"}),":"," ",e.jsx("code",{children:s.username})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"type"}),": ",e.jsx("code",{children:s.type})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"environment"}),":"," ",e.jsx("code",{children:s.environment})]})]})]})})]})},Qe=p("div")(()=>({maxWidth:"400px"})),Xe=p("form")(()=>({display:"flex",flexDirection:"column",height:"100%"})),Ye=p(ke)(({theme:s})=>({width:"100%",marginBottom:s.spacing(2)})),Ze=p(ve)(({theme:s})=>({marginBottom:s.spacing(2),minWidth:"400px",[s.breakpoints.down("sm")]:{minWidth:"379px"}})),X=p("p")(({theme:s})=>({marginBottom:s.spacing(1)})),es=p("label")(({theme:s})=>({marginBottom:s.spacing(1)})),ss=p(Se)(({theme:s})=>({marginLeft:s.spacing(3)})),ts=p(C)({marginTop:"auto",display:"flex",justifyContent:"flex-end"}),Ts=({children:s,actions:t,handleSubmit:n,handleCancel:o})=>{var i;const{uiConfig:r}=T(),a=!!((i=r==null?void 0:r.flags)!=null&&i.UNLEASH_CLOUD);return e.jsxs(Xe,{onSubmit:n,children:[e.jsx(b,{condition:a,show:e.jsxs(R,{severity:"info",sx:{mb:4},children:["Please be aware of our"," ",e.jsx(W,{href:"https://www.getunleash.io/fair-use-policy",children:"fair use policy"}),"."]})}),s,e.jsxs(ts,{children:[t,e.jsx(ss,{onClick:o,children:"Cancel"})]})]})};var c=(s=>(s.ADMIN="ADMIN",s.CLIENT="CLIENT",s.FRONTEND="FRONTEND",s))(c||{});const As=s=>{var L,O;const{environments:t}=V(),{uiConfig:n}=T(),o=Ee("adminTokenKillSwitch"),r=(L=t==null?void 0:t.find(l=>l.enabled))==null?void 0:L.name,a=f(Ie),i=f(H,s),m=[{key:c.CLIENT,label:`Server-side SDK (${c.CLIENT})`,title:"Connect server-side SDK or Unleash Proxy",enabled:a||i}],h=f(Ne),x=f(De),g=f(H,s);!s&&!o&&m.push({key:c.ADMIN,label:c.ADMIN,title:"Full access for managing Unleash",enabled:h}),n.flags.embedProxyFrontend&&m.splice(1,0,{key:c.FRONTEND,label:`Client-side SDK (${c.FRONTEND})`,title:"Connect web and mobile SDK directly to Unleash",enabled:x||g});const j=(O=m.find(l=>l.enabled))==null?void 0:O.key,[u,Y]=d.useState(""),[A,B]=d.useState(j||c.CLIENT),[y,S]=d.useState([s||"*"]),[Z,ee]=d.useState(y),[F,k]=d.useState(),[_,E]=d.useState({});return d.useEffect(()=>{k(A==="ADMIN"?"*":r)},[A,r]),{username:u,type:A,apiTokenTypes:m,projects:y,environment:F,setUsername:Y,setTokenType:l=>{l==="ADMIN"?(B(c.ADMIN),ee(y),S(["*"]),k("*")):(B(l),S(Z),k(r))},setProjects:S,setEnvironment:k,getApiTokenPayload:()=>({username:u,type:A,environment:F,projects:y}),isValid:()=>{const l={};return u||(l.username="Username is required"),y.length===0&&(l.projects="At least one project is required"),E(l),Object.keys(l).length===0},clearErrors:l=>{if(l){const U={..._};delete U[l],E(U)}else E({})},errors:_}},ks=({open:s,setOpen:t,closeConfirm:n,token:o,type:r})=>e.jsxs(z,{open:s,setOpen:t,onClick:n,primaryButtonText:"Close",title:"New token created",children:[e.jsx(w,{variant:"body1",children:"Your new token has been created successfully."}),e.jsx(we,{token:o}),e.jsx(b,{condition:r===c.FRONTEND,show:e.jsxs(R,{sx:{mt:2},severity:"info",children:["By default, all ",c.FRONTEND," tokens may be used from any CORS origin. If you'd like to configure a strict set of origins, please use the"," ",e.jsx(G,{to:"/admin/cors",target:"_blank",rel:"noreferrer",children:"CORS origins configuration page"}),"."]})})]}),vs=({username:s,setUsername:t,errors:n,clearErrors:o})=>e.jsxs(e.Fragment,{children:[e.jsx(X,{children:"What would you like to call this token?"}),e.jsx(Ye,{value:s,name:"username",onChange:r=>t(r.target.value),label:"Token name",error:n.username!==void 0,errorText:n.username,onFocus:()=>o("username"),autoFocus:!0})]}),Ss=({type:s,setType:t,apiTokenTypes:n})=>e.jsx(Qe,{children:e.jsxs(Re,{sx:{mb:2,width:"100%"},children:[e.jsx(es,{id:"token-type",children:"What do you want to connect?"}),e.jsx(Pe,{"aria-labelledby":"token-type",defaultValue:"CLIENT",name:"radio-buttons-group",value:s,onChange:(o,r)=>t(r),children:n.map(({key:o,label:r,title:a,enabled:i})=>e.jsx(Be,{value:o,sx:{mb:1},disabled:!i,control:e.jsx(Fe,{sx:{ml:.75,alignSelf:"flex-start"}}),label:e.jsx(C,{children:e.jsxs(C,{children:[e.jsx(w,{children:r}),e.jsx(w,{variant:"body2",color:"text.secondary",children:a})]})})},o))})]})}),Es=({type:s,environment:t,setEnvironment:n})=>{const{environments:o}=V(),r=s===c.ADMIN?[{key:"*",label:"ALL"}]:o.map(a=>({key:a.name,label:`${a.name.concat(a.enabled?"":" - deprecated")}`,title:a.name,disabled:!1}));return e.jsxs(e.Fragment,{children:[e.jsx(X,{children:"Which environment should the token have access to?"}),e.jsx(Ze,{disabled:s===c.ADMIN,options:r,value:t,onChange:n,label:"Environment",id:"api_key_environment",name:"environment",IconComponent:_e,fullWidth:!0})]})},ns=s=>s.map(t=>({...t.user,joinedAt:new Date(t.joinedAt),createdBy:t.createdBy})),Is=s=>{const{data:t,error:n,mutate:o}=Le(J(`api/admin/groups/${s}`),os);return d.useMemo(()=>({group:t&&{...t,users:ns((t==null?void 0:t.users)??[])},loading:!n&&!t,refetchGroup:()=>o(),error:n}),[t,n,o])},os=s=>fetch(s).then(Q("Group")).then(t=>t.json()),Ns=()=>{const{isEnterprise:s}=T(),{data:t,error:n,mutate:o}=Oe(s(),{serviceAccounts:[],rootRoles:[]},J("api/admin/service-account"),rs);return d.useMemo(()=>({serviceAccounts:(t==null?void 0:t.serviceAccounts)??[],roles:(t==null?void 0:t.rootRoles)??[],loading:!n&&!t,refetch:()=>o(),error:n}),[t,n,o])},rs=s=>fetch(s).then(Q("Service Accounts")).then(t=>t.json());var P={},as=Me;Object.defineProperty(P,"__esModule",{value:!0});var is=P.default=void 0,ls=as(Ue()),cs=e,ds=(0,ls.default)((0,cs.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");is=P.default=ds;const us=p("div")(({theme:s})=>({display:"flex",flexDirection:"column",gap:s.spacing(.5),"& > *:not(:last-child)":{borderBottom:`1px solid ${s.palette.divider}`,paddingBottom:s.spacing(1)}})),Ds=({role:s,roles:t,value:n})=>{const{isEnterprise:o}=T();if(o()){const r=t||[s];return e.jsx(v,{children:e.jsx(He,{tooltip:e.jsx(us,{children:r.map(a=>e.jsx(Ke,{roleId:a,tooltip:!0},a))}),children:n})})}return e.jsx(v,{children:n})};export{gs as A,ys as C,Es as E,Cs as R,X as S,c as T,bs as a,As as b,Ts as c,vs as d,Ss as e,ks as f,Ns as g,Is as h,is as i,Ds as j,ns as m,fs as u};
1
+ import{c as se,j as e,ax as T,J as R,ac as te,cB as ne,af as oe,C as b,B as C,aq as re,du as ae,a6 as ie,a7 as le,a8 as ce,a9 as de,ap as M,c4 as W,ay as ue,dF as he,c9 as pe,gR as me,s as p,aK as G,dV as xe,ab as v,dW as I,r as d,aa as je,ae as N,dq as ge,dN as ye,a3 as D,a4 as fe,b as $,aI as q,cV as be,c_ as Ce,bX as Te,b7 as z,f as Ae,v as ke,bU as ve,h as Se,ar as V,ci as Ee,gS as f,d5 as Ie,gd as H,d3 as Ne,d4 as De,T as w,ef as we,F as Re,eh as Pe,dg as Be,ei as Fe,g8 as _e,aN as Le,aO as J,aP as Q,bZ as Oe,ba as Ue,bb as Me,br as He,dc as Ke}from"./index-uUGk-gee.js";const We=se(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04L21 10zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"}),"Key"),Ge=()=>{const{uiConfig:s}=T();return e.jsxs(R,{severity:"info",children:[e.jsxs("p",{children:["Read the"," ",e.jsx("a",{href:"https://docs.getunleash.io/reference/sdks",target:"_blank",rel:"noreferrer",children:"SDK overview"})," ","to connect Unleash to your application. Please note it can take up to ",e.jsx("strong",{children:"1 minute"})," before a new API key is activated."]}),e.jsx("br",{}),e.jsx("strong",{children:"API URL: "})," ",e.jsxs("pre",{style:{display:"inline"},children:[s.unleashUrl,"/api/"]})]})},$e=["Icon","createdAt"],qe=["Icon","project","seenAt"],gs=({compact:s=!1,setHiddenColumns:t,columns:n,loading:o,rows:r,getTableProps:a,getTableBodyProps:i,headerGroups:m,globalFilter:h,prepareRow:x})=>{const g=te(ne.breakpoints.down("md"));return oe([{condition:g,columns:$e},{condition:s,columns:qe}],t,n),e.jsxs(e.Fragment,{children:[e.jsx(b,{condition:r.length>0,show:e.jsx(C,{sx:{mb:4},children:e.jsx(Ge,{})})}),e.jsx(C,{sx:{overflowX:"auto"},children:e.jsx(re,{value:h,children:e.jsxs(ae,{...a(),children:[e.jsx(ie,{headerGroups:m}),e.jsx(le,{...i(),children:r.map(j=>(x(j),e.jsx(ce,{hover:!0,...j.getRowProps(),children:j.cells.map(u=>e.jsx(de,{...u.getCellProps(),children:u.render("Cell")}))})))})]})})}),e.jsx(b,{condition:r.length===0&&!o,show:e.jsx(b,{condition:(h==null?void 0:h.length)>0,show:e.jsxs(M,{children:["No tokens found matching “",h,"”"]}),elseShow:e.jsx(M,{children:e.jsxs("span",{children:["No tokens available. Read ",e.jsx(W,{href:"https://docs.getunleash.io/how-to/api",target:"_blank",rel:"noreferrer",children:"API How-to guides"})," "," to learn more."]})})})})]})},ys=({path:s,permission:t,project:n})=>{const o=ue();return e.jsx(he,{Icon:pe,onClick:()=>o(s),"data-testid":me,permission:t,projectId:n,maxWidth:"700px",children:"New API token"})},ze=p(G)(({theme:s})=>({textDecoration:"none",color:s.palette.links,"&:hover, &:focus":{textDecoration:"underline"}})),Ve=({projects:s,project:t})=>{const{searchQuery:n}=xe(),o=s&&Array.isArray(s)?s:t?[t]:[];return o.length===0?e.jsx(v,{children:e.jsx(I,{search:n,children:"*"})}):e.jsx(v,{children:o.map((r,a)=>e.jsxs(d.Fragment,{children:[a>0&&", ",!r||r==="*"?e.jsx(I,{search:n,children:"*"}):e.jsx(ze,{to:`/projects/${r}`,children:e.jsx(I,{search:n,children:r})})]},r))})},fs=(s,t)=>{const n=d.useMemo(()=>({sortBy:[{id:"createdAt",desc:!0}]}),[]),o=d.useMemo(()=>[{id:"Icon",width:"1%",Cell:()=>e.jsx(je,{icon:e.jsx(We,{color:"disabled"})}),disableSortBy:!0,disableGlobalFilter:!0},{Header:"Username",accessor:"username",Cell:N},{Header:"Type",accessor:"type",Cell:({value:u})=>e.jsx(N,{value:K[u.toLowerCase()].label,subtitle:K[u.toLowerCase()].title}),minWidth:280},{Header:"Project",accessor:"project",Cell:u=>e.jsx(Ve,{project:u.row.original.project,projects:u.row.original.projects}),minWidth:120},{Header:"Environment",accessor:"environment",Cell:N,minWidth:120},{Header:"Created",accessor:"createdAt",Cell:ge,minWidth:150,disableGlobalFilter:!0},{Header:"Last seen",accessor:"seenAt",Cell:ye,minWidth:150,disableGlobalFilter:!0},{Header:"Actions",id:"Actions",align:"center",width:"1%",disableSortBy:!0,disableGlobalFilter:!0,Cell:t}],[]),{getTableProps:r,getTableBodyProps:a,headerGroups:i,rows:m,prepareRow:h,state:x,setGlobalFilter:g,setHiddenColumns:j}=D.useTable({columns:o,data:s,initialState:n,sortTypes:fe,autoResetHiddenColumns:!1,disableSortRemove:!0},D.useGlobalFilter,D.useSortBy);return{getTableProps:r,getTableBodyProps:a,headerGroups:i,rows:m,prepareRow:h,state:x,setGlobalFilter:g,setHiddenColumns:j,columns:o}},K={client:{label:"CLIENT",title:"Connect server-side SDK or Unleash Proxy"},frontend:{label:"FRONTEND",title:"Connect web and mobile SDK"},admin:{label:"ADMIN",title:"Full access for managing Unleash"}},bs=({token:s,project:t,permission:n,track:o})=>{const{setToastData:r}=$(),a=i=>{Ce(i)&&(r({type:"success",title:"Token copied to clipboard"}),o&&typeof o=="function"&&o())};return e.jsx(q,{permission:n,projectId:t,tooltipProps:{title:"Copy token",arrow:!0},onClick:()=>a(s.secret),size:"large",children:e.jsx(be,{})})},Je=p("ul")({marginBottom:0}),Cs=({token:s,permission:t,onRemove:n,project:o})=>{const[r,a]=d.useState(!1),{setToastData:i,setToastApiError:m}=$(),h=async()=>{try{await n(),a(!1),i({type:"success",title:"API token removed"})}catch(x){m(Ae(x))}};return e.jsxs(e.Fragment,{children:[e.jsx(q,{permission:t,projectId:o,tooltipProps:{title:"Delete token",arrow:!0},onClick:()=>a(!0),size:"large",children:e.jsx(Te,{})}),e.jsx(z,{open:r,onClick:h,onClose:()=>a(!1),title:"Confirm deletion",children:e.jsxs("div",{children:["Are you sure you want to delete the following API token?",e.jsx("br",{}),e.jsxs(Je,{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"username"}),":"," ",e.jsx("code",{children:s.username})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"type"}),": ",e.jsx("code",{children:s.type})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"environment"}),":"," ",e.jsx("code",{children:s.environment})]})]})]})})]})},Qe=p("div")(()=>({maxWidth:"400px"})),Xe=p("form")(()=>({display:"flex",flexDirection:"column",height:"100%"})),Ye=p(ke)(({theme:s})=>({width:"100%",marginBottom:s.spacing(2)})),Ze=p(ve)(({theme:s})=>({marginBottom:s.spacing(2),minWidth:"400px",[s.breakpoints.down("sm")]:{minWidth:"379px"}})),X=p("p")(({theme:s})=>({marginBottom:s.spacing(1)})),es=p("label")(({theme:s})=>({marginBottom:s.spacing(1)})),ss=p(Se)(({theme:s})=>({marginLeft:s.spacing(3)})),ts=p(C)({marginTop:"auto",display:"flex",justifyContent:"flex-end"}),Ts=({children:s,actions:t,handleSubmit:n,handleCancel:o})=>{var i;const{uiConfig:r}=T(),a=!!((i=r==null?void 0:r.flags)!=null&&i.UNLEASH_CLOUD);return e.jsxs(Xe,{onSubmit:n,children:[e.jsx(b,{condition:a,show:e.jsxs(R,{severity:"info",sx:{mb:4},children:["Please be aware of our"," ",e.jsx(W,{href:"https://www.getunleash.io/fair-use-policy",children:"fair use policy"}),"."]})}),s,e.jsxs(ts,{children:[t,e.jsx(ss,{onClick:o,children:"Cancel"})]})]})};var c=(s=>(s.ADMIN="ADMIN",s.CLIENT="CLIENT",s.FRONTEND="FRONTEND",s))(c||{});const As=s=>{var L,O;const{environments:t}=V(),{uiConfig:n}=T(),o=Ee("adminTokenKillSwitch"),r=(L=t==null?void 0:t.find(l=>l.enabled))==null?void 0:L.name,a=f(Ie),i=f(H,s),m=[{key:c.CLIENT,label:`Server-side SDK (${c.CLIENT})`,title:"Connect server-side SDK or Unleash Proxy",enabled:a||i}],h=f(Ne),x=f(De),g=f(H,s);!s&&!o&&m.push({key:c.ADMIN,label:c.ADMIN,title:"Full access for managing Unleash",enabled:h}),n.flags.embedProxyFrontend&&m.splice(1,0,{key:c.FRONTEND,label:`Client-side SDK (${c.FRONTEND})`,title:"Connect web and mobile SDK directly to Unleash",enabled:x||g});const j=(O=m.find(l=>l.enabled))==null?void 0:O.key,[u,Y]=d.useState(""),[A,B]=d.useState(j||c.CLIENT),[y,S]=d.useState([s||"*"]),[Z,ee]=d.useState(y),[F,k]=d.useState(),[_,E]=d.useState({});return d.useEffect(()=>{k(A==="ADMIN"?"*":r)},[A,r]),{username:u,type:A,apiTokenTypes:m,projects:y,environment:F,setUsername:Y,setTokenType:l=>{l==="ADMIN"?(B(c.ADMIN),ee(y),S(["*"]),k("*")):(B(l),S(Z),k(r))},setProjects:S,setEnvironment:k,getApiTokenPayload:()=>({username:u,type:A,environment:F,projects:y}),isValid:()=>{const l={};return u||(l.username="Username is required"),y.length===0&&(l.projects="At least one project is required"),E(l),Object.keys(l).length===0},clearErrors:l=>{if(l){const U={..._};delete U[l],E(U)}else E({})},errors:_}},ks=({open:s,setOpen:t,closeConfirm:n,token:o,type:r})=>e.jsxs(z,{open:s,setOpen:t,onClick:n,primaryButtonText:"Close",title:"New token created",children:[e.jsx(w,{variant:"body1",children:"Your new token has been created successfully."}),e.jsx(we,{token:o}),e.jsx(b,{condition:r===c.FRONTEND,show:e.jsxs(R,{sx:{mt:2},severity:"info",children:["By default, all ",c.FRONTEND," tokens may be used from any CORS origin. If you'd like to configure a strict set of origins, please use the"," ",e.jsx(G,{to:"/admin/cors",target:"_blank",rel:"noreferrer",children:"CORS origins configuration page"}),"."]})})]}),vs=({username:s,setUsername:t,errors:n,clearErrors:o})=>e.jsxs(e.Fragment,{children:[e.jsx(X,{children:"What would you like to call this token?"}),e.jsx(Ye,{value:s,name:"username",onChange:r=>t(r.target.value),label:"Token name",error:n.username!==void 0,errorText:n.username,onFocus:()=>o("username"),autoFocus:!0})]}),Ss=({type:s,setType:t,apiTokenTypes:n})=>e.jsx(Qe,{children:e.jsxs(Re,{sx:{mb:2,width:"100%"},children:[e.jsx(es,{id:"token-type",children:"What do you want to connect?"}),e.jsx(Pe,{"aria-labelledby":"token-type",defaultValue:"CLIENT",name:"radio-buttons-group",value:s,onChange:(o,r)=>t(r),children:n.map(({key:o,label:r,title:a,enabled:i})=>e.jsx(Be,{value:o,sx:{mb:1},disabled:!i,control:e.jsx(Fe,{sx:{ml:.75,alignSelf:"flex-start"}}),label:e.jsx(C,{children:e.jsxs(C,{children:[e.jsx(w,{children:r}),e.jsx(w,{variant:"body2",color:"text.secondary",children:a})]})})},o))})]})}),Es=({type:s,environment:t,setEnvironment:n})=>{const{environments:o}=V(),r=s===c.ADMIN?[{key:"*",label:"ALL"}]:o.map(a=>({key:a.name,label:`${a.name.concat(a.enabled?"":" - deprecated")}`,title:a.name,disabled:!1}));return e.jsxs(e.Fragment,{children:[e.jsx(X,{children:"Which environment should the token have access to?"}),e.jsx(Ze,{disabled:s===c.ADMIN,options:r,value:t,onChange:n,label:"Environment",id:"api_key_environment",name:"environment",IconComponent:_e,fullWidth:!0})]})},ns=s=>s.map(t=>({...t.user,joinedAt:new Date(t.joinedAt),createdBy:t.createdBy})),Is=s=>{const{data:t,error:n,mutate:o}=Le(J(`api/admin/groups/${s}`),os);return d.useMemo(()=>({group:t&&{...t,users:ns((t==null?void 0:t.users)??[])},loading:!n&&!t,refetchGroup:()=>o(),error:n}),[t,n,o])},os=s=>fetch(s).then(Q("Group")).then(t=>t.json()),Ns=()=>{const{isEnterprise:s}=T(),{data:t,error:n,mutate:o}=Oe(s(),{serviceAccounts:[],rootRoles:[]},J("api/admin/service-account"),rs);return d.useMemo(()=>({serviceAccounts:(t==null?void 0:t.serviceAccounts)??[],roles:(t==null?void 0:t.rootRoles)??[],loading:!n&&!t,refetch:()=>o(),error:n}),[t,n,o])},rs=s=>fetch(s).then(Q("Service Accounts")).then(t=>t.json());var P={},as=Me;Object.defineProperty(P,"__esModule",{value:!0});var is=P.default=void 0,ls=as(Ue()),cs=e,ds=(0,ls.default)((0,cs.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");is=P.default=ds;const us=p("div")(({theme:s})=>({display:"flex",flexDirection:"column",gap:s.spacing(.5),"& > *:not(:last-child)":{borderBottom:`1px solid ${s.palette.divider}`,paddingBottom:s.spacing(1)}})),Ds=({role:s,roles:t,value:n})=>{const{isEnterprise:o}=T();if(o()){const r=t||[s];return e.jsx(v,{children:e.jsx(He,{tooltip:e.jsx(us,{children:r.map(a=>e.jsx(Ke,{roleId:a,tooltip:!0},a))}),children:n})})}return e.jsx(v,{children:n})};export{gs as A,ys as C,Es as E,Cs as R,X as S,c as T,bs as a,As as b,Ts as c,vs as d,Ss as e,ks as f,Ns as g,Is as h,is as i,Ds as j,ns as m,fs as u};
@@ -1 +1 @@
1
- import{s as d,x as u,B as a,bF as f,j as n,C as s,gQ as h,R as S,aX as c,G as m,aK as v}from"./index-p2PlVFLf.js";const k=d(u)({padding:0,cursor:"inherit",transition:"color 0.2s ease-in-out"}),y=d("div")(({theme:i})=>({fontSize:i.typography.fontSize,color:i.palette.text.secondary,position:"absolute",display:"none",right:"calc(100% + 6px)",top:i.spacing(2.5),[i.breakpoints.up("md")]:{display:"block"}})),B=d("div")(({theme:i})=>({fontSize:i.typography.fontSize,fontWeight:"normal",color:i.palette.text.secondary,display:"none",top:i.spacing(2.5),[i.breakpoints.up("md")]:{display:"block"}})),I=d("div")(({theme:i})=>({fontWeight:"normal",display:"none",[i.breakpoints.up("md")]:{display:"block"}})),w=d("div")({flexDirection:"column",justifyContent:"center",verticalAlign:"middle"}),C=d(a,{shouldForwardProp:i=>i!=="disabled"})(({theme:i,disabled:o})=>({borderRadius:i.shape.borderRadiusMedium,border:`1px solid ${i.palette.divider}`,"& + &":{marginTop:i.spacing(2)},background:o?i.palette.envAccordion.disabled:i.palette.background.paper})),F=d("div",{shouldForwardProp:i=>i!=="draggable"&&i!=="disabled"})(({theme:i,draggable:o,disabled:l})=>({padding:i.spacing(.5,2),display:"flex",gap:i.spacing(1),alignItems:"center",borderBottom:`1px solid ${i.palette.divider}`,fontWeight:i.typography.fontWeightMedium,paddingLeft:o?i.spacing(1):i.spacing(2),color:l?i.palette.text.secondary:i.palette.text.primary})),R=({strategy:i,onDragStart:o,onDragEnd:l,actions:p,children:x,orderNumber:t,style:b={},description:r})=>{const g=f(i.name),j="links"in i?({children:e})=>n.jsx(v,{to:i.links.edit,children:e}):({children:e})=>n.jsxs(n.Fragment,{children:[" ",e," "]});return n.jsxs(a,{sx:{position:"relative"},children:[n.jsx(s,{condition:t!==void 0,show:n.jsx(y,{children:t})}),n.jsxs(C,{disabled:(i==null?void 0:i.disabled)||!1,style:b,children:[n.jsxs(F,{draggable:!!o,disabled:!!(i!=null&&i.disabled),children:[n.jsx(s,{condition:!!o,show:()=>n.jsx(k,{draggable:!0,disableRipple:!0,size:"small",onDragStart:o,onDragEnd:l,sx:{cursor:"move"},children:n.jsx(h,{titleAccess:"Drag to reorder",cursor:"grab",sx:{color:"action.active"}})})}),n.jsx(g,{sx:{fill:e=>e.palette.action.disabled}}),n.jsxs(w,{children:[n.jsxs(j,{children:[n.jsx(S,{maxWidth:"400",maxLength:15,text:c(String(i.name))}),n.jsx(s,{condition:!!i.title,show:n.jsx(I,{children:c(String(i.title))})})]}),n.jsx(s,{condition:!!r,show:n.jsx(B,{children:r})})]}),n.jsx(s,{condition:!!(i!=null&&i.disabled),show:()=>n.jsx(n.Fragment,{children:n.jsx(m,{color:"disabled",children:"Disabled"})})}),n.jsx(a,{sx:{marginLeft:"auto",display:"flex",minHeight:e=>e.spacing(6),alignItems:"center"},children:p})]}),n.jsx(a,{sx:{p:2,justifyItems:"center"},children:x})]})]})};export{R as S};
1
+ import{s as d,x as u,B as a,bF as f,j as n,C as s,gQ as h,R as S,aX as c,G as m,aK as v}from"./index-uUGk-gee.js";const k=d(u)({padding:0,cursor:"inherit",transition:"color 0.2s ease-in-out"}),y=d("div")(({theme:i})=>({fontSize:i.typography.fontSize,color:i.palette.text.secondary,position:"absolute",display:"none",right:"calc(100% + 6px)",top:i.spacing(2.5),[i.breakpoints.up("md")]:{display:"block"}})),B=d("div")(({theme:i})=>({fontSize:i.typography.fontSize,fontWeight:"normal",color:i.palette.text.secondary,display:"none",top:i.spacing(2.5),[i.breakpoints.up("md")]:{display:"block"}})),I=d("div")(({theme:i})=>({fontWeight:"normal",display:"none",[i.breakpoints.up("md")]:{display:"block"}})),w=d("div")({flexDirection:"column",justifyContent:"center",verticalAlign:"middle"}),C=d(a,{shouldForwardProp:i=>i!=="disabled"})(({theme:i,disabled:o})=>({borderRadius:i.shape.borderRadiusMedium,border:`1px solid ${i.palette.divider}`,"& + &":{marginTop:i.spacing(2)},background:o?i.palette.envAccordion.disabled:i.palette.background.paper})),F=d("div",{shouldForwardProp:i=>i!=="draggable"&&i!=="disabled"})(({theme:i,draggable:o,disabled:l})=>({padding:i.spacing(.5,2),display:"flex",gap:i.spacing(1),alignItems:"center",borderBottom:`1px solid ${i.palette.divider}`,fontWeight:i.typography.fontWeightMedium,paddingLeft:o?i.spacing(1):i.spacing(2),color:l?i.palette.text.secondary:i.palette.text.primary})),R=({strategy:i,onDragStart:o,onDragEnd:l,actions:p,children:x,orderNumber:t,style:b={},description:r})=>{const g=f(i.name),j="links"in i?({children:e})=>n.jsx(v,{to:i.links.edit,children:e}):({children:e})=>n.jsxs(n.Fragment,{children:[" ",e," "]});return n.jsxs(a,{sx:{position:"relative"},children:[n.jsx(s,{condition:t!==void 0,show:n.jsx(y,{children:t})}),n.jsxs(C,{disabled:(i==null?void 0:i.disabled)||!1,style:b,children:[n.jsxs(F,{draggable:!!o,disabled:!!(i!=null&&i.disabled),children:[n.jsx(s,{condition:!!o,show:()=>n.jsx(k,{draggable:!0,disableRipple:!0,size:"small",onDragStart:o,onDragEnd:l,sx:{cursor:"move"},children:n.jsx(h,{titleAccess:"Drag to reorder",cursor:"grab",sx:{color:"action.active"}})})}),n.jsx(g,{sx:{fill:e=>e.palette.action.disabled}}),n.jsxs(w,{children:[n.jsxs(j,{children:[n.jsx(S,{maxWidth:"400",maxLength:15,text:c(String(i.name))}),n.jsx(s,{condition:!!i.title,show:n.jsx(I,{children:c(String(i.title))})})]}),n.jsx(s,{condition:!!r,show:n.jsx(B,{children:r})})]}),n.jsx(s,{condition:!!(i!=null&&i.disabled),show:()=>n.jsx(n.Fragment,{children:n.jsx(m,{color:"disabled",children:"Disabled"})})}),n.jsx(a,{sx:{marginLeft:"auto",display:"flex",minHeight:e=>e.spacing(6),alignItems:"center"},children:p})]}),n.jsx(a,{sx:{p:2,justifyItems:"center"},children:x})]})]})};export{R as S};