@carto/meridian-ds 0.1.1-alpha.4 → 0.1.1-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,7 @@ import me from "react-is";
2
2
  import { jsx as I, jsxs as Ge } from "react/jsx-runtime";
3
3
  import { Typography as Re, styled as he, Box as Ne, Tooltip as se, IconButton as de } from "@mui/material";
4
4
  import { forwardRef as De } from "react";
5
- import qe from "@mui/icons-material/KeyboardArrowLeftOutlined";
6
- import xe from "@mui/icons-material/KeyboardArrowRightOutlined";
5
+ import { KeyboardArrowLeftOutlined as qe, KeyboardArrowRightOutlined as xe } from "@mui/icons-material";
7
6
  import { createIntlCache as Ke, createIntl as Ue, useIntl as He } from "react-intl";
8
7
  function je(e) {
9
8
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -159,9 +158,9 @@ function We() {
159
158
  elementType: V(),
160
159
  instanceOf: z,
161
160
  node: Ae(),
162
- objectOf: be,
161
+ objectOf: Ce,
163
162
  oneOf: Ee,
164
- oneOfType: Ce,
163
+ oneOfType: be,
165
164
  shape: Pe,
166
165
  exact: Oe
167
166
  };
@@ -172,16 +171,16 @@ function We() {
172
171
  this.message = t, this.data = c && typeof c == "object" ? c : {}, this.stack = "";
173
172
  }
174
173
  L.prototype = Error.prototype;
175
- function b(t) {
174
+ function C(t) {
176
175
  if (process.env.NODE_ENV !== "production")
177
176
  var c = {}, g = 0;
178
177
  function f(m, p, w, h, S, v, P) {
179
178
  if (h = h || M, v = v || w, P !== a) {
180
179
  if (_) {
181
- var C = new Error(
180
+ var b = new Error(
182
181
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
183
182
  );
184
- throw C.name = "Invariant Violation", C;
183
+ throw b.name = "Invariant Violation", b;
185
184
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
186
185
  var R = h + ":" + w;
187
186
  !c[R] && // Avoid spamming the console because they are often not actionable except for lib authors
@@ -207,10 +206,10 @@ function We() {
207
206
  }
208
207
  return null;
209
208
  }
210
- return b(c);
209
+ return C(c);
211
210
  }
212
211
  function G() {
213
- return b(s);
212
+ return C(s);
214
213
  }
215
214
  function k(t) {
216
215
  function c(g, f, u, m, p) {
@@ -228,7 +227,7 @@ function We() {
228
227
  }
229
228
  return null;
230
229
  }
231
- return b(c);
230
+ return C(c);
232
231
  }
233
232
  function D() {
234
233
  function t(c, g, f, u, m) {
@@ -239,7 +238,7 @@ function We() {
239
238
  }
240
239
  return null;
241
240
  }
242
- return b(t);
241
+ return C(t);
243
242
  }
244
243
  function V() {
245
244
  function t(c, g, f, u, m) {
@@ -250,7 +249,7 @@ function We() {
250
249
  }
251
250
  return null;
252
251
  }
253
- return b(t);
252
+ return C(t);
254
253
  }
255
254
  function z(t) {
256
255
  function c(g, f, u, m, p) {
@@ -260,7 +259,7 @@ function We() {
260
259
  }
261
260
  return null;
262
261
  }
263
- return b(c);
262
+ return C(c);
264
263
  }
265
264
  function Ee(t) {
266
265
  if (!Array.isArray(t))
@@ -271,15 +270,15 @@ function We() {
271
270
  for (var w = g[f], h = 0; h < t.length; h++)
272
271
  if (O(w, t[h]))
273
272
  return null;
274
- var S = JSON.stringify(t, function(P, C) {
275
- var R = q(C);
276
- return R === "symbol" ? String(C) : C;
273
+ var S = JSON.stringify(t, function(P, b) {
274
+ var R = q(b);
275
+ return R === "symbol" ? String(b) : b;
277
276
  });
278
277
  return new L("Invalid " + m + " `" + p + "` of value `" + String(w) + "` " + ("supplied to `" + u + "`, expected one of " + S + "."));
279
278
  }
280
- return b(c);
279
+ return C(c);
281
280
  }
282
- function be(t) {
281
+ function Ce(t) {
283
282
  function c(g, f, u, m, p) {
284
283
  if (typeof t != "function")
285
284
  return new L("Property `" + p + "` of component `" + u + "` has invalid PropType notation inside objectOf.");
@@ -294,9 +293,9 @@ function We() {
294
293
  }
295
294
  return null;
296
295
  }
297
- return b(c);
296
+ return C(c);
298
297
  }
299
- function Ce(t) {
298
+ function be(t) {
300
299
  if (!Array.isArray(t))
301
300
  return process.env.NODE_ENV !== "production" && r("Invalid argument supplied to oneOfType, expected an instance of array."), s;
302
301
  for (var c = 0; c < t.length; c++) {
@@ -308,21 +307,21 @@ function We() {
308
307
  }
309
308
  function f(u, m, p, w, h) {
310
309
  for (var S = [], v = 0; v < t.length; v++) {
311
- var P = t[v], C = P(u, m, p, w, h, a);
312
- if (C == null)
310
+ var P = t[v], b = P(u, m, p, w, h, a);
311
+ if (b == null)
313
312
  return null;
314
- C.data && n(C.data, "expectedType") && S.push(C.data.expectedType);
313
+ b.data && n(b.data, "expectedType") && S.push(b.data.expectedType);
315
314
  }
316
315
  var R = S.length > 0 ? ", expected one of type [" + S.join(", ") + "]" : "";
317
316
  return new L("Invalid " + w + " `" + h + "` supplied to " + ("`" + p + "`" + R + "."));
318
317
  }
319
- return b(f);
318
+ return C(f);
320
319
  }
321
320
  function Ae() {
322
321
  function t(c, g, f, u, m) {
323
322
  return K(c[g]) ? null : new L("Invalid " + u + " `" + m + "` supplied to " + ("`" + f + "`, expected a ReactNode."));
324
323
  }
325
- return b(t);
324
+ return C(t);
326
325
  }
327
326
  function ie(t, c, g, f, u) {
328
327
  return new L(
@@ -344,7 +343,7 @@ function We() {
344
343
  }
345
344
  return null;
346
345
  }
347
- return b(c);
346
+ return C(c);
348
347
  }
349
348
  function Oe(t) {
350
349
  function c(g, f, u, m, p) {
@@ -361,13 +360,13 @@ function We() {
361
360
  "Invalid " + m + " `" + p + "` key `" + v + "` supplied to `" + u + "`.\nBad object: " + JSON.stringify(g[f], null, " ") + `
362
361
  Valid keys: ` + JSON.stringify(Object.keys(t), null, " ")
363
362
  );
364
- var C = P(w, v, u, m, p + "." + v, a);
365
- if (C)
366
- return C;
363
+ var b = P(w, v, u, m, p + "." + v, a);
364
+ if (b)
365
+ return b;
367
366
  }
368
367
  return null;
369
368
  }
370
- return b(c);
369
+ return C(c);
371
370
  }
372
371
  function K(t) {
373
372
  switch (typeof t) {
@@ -531,13 +530,13 @@ function nn(e = 8) {
531
530
  }).join(" "));
532
531
  return a.mui = !0, a;
533
532
  }
534
- const rn = 8, Gn = {
533
+ const rn = 8, Bn = {
535
534
  XS: 320,
536
535
  SM: 600,
537
536
  MD: 960,
538
537
  LG: 1280,
539
538
  XL: 1600
540
- }, j = nn(rn), Rn = j(1.5), Nn = j(2.25), Dn = j(3), qn = j(6), an = {
539
+ }, j = nn(rn), Gn = j(1.5), Rn = j(2.25), Nn = j(3), Dn = j(6), an = {
541
540
  regular: 400,
542
541
  medium: 500,
543
542
  strong: 600
@@ -560,7 +559,7 @@ function tn({ italic: e, weight: i, style: a, children: n, ...d }, r) {
560
559
  }
561
560
  );
562
561
  }
563
- const xn = De(tn), sn = {
562
+ const qn = De(tn), sn = {
564
563
  c4r: {
565
564
  form: {
566
565
  selectAll: "Select all",
@@ -5018,18 +5017,18 @@ function hn(e, i, a, n, d, r) {
5018
5017
  N(typeof O == "object" && O !== null, "locale data ".concat(E, " must be an object"));
5019
5018
  var L = O[E];
5020
5019
  N(Array.isArray(L), "keyLocaleData for ".concat(E, " must be an array"));
5021
- var b = L[0];
5022
- N(typeof b == "string" || b === null, "value must be string or null but got ".concat(typeof b, " in key ").concat(E));
5020
+ var C = L[0];
5021
+ N(typeof C == "string" || C === null, "value must be string or null but got ".concat(typeof C, " in key ").concat(E));
5023
5022
  var A = "";
5024
5023
  if (o.extension) {
5025
5024
  var G = mn(o.extension, E);
5026
- G !== void 0 && (G !== "" ? ~L.indexOf(G) && (b = G, A = "-".concat(E, "-").concat(b)) : ~G.indexOf("true") && (b = "true", A = "-".concat(E)));
5025
+ G !== void 0 && (G !== "" ? ~L.indexOf(G) && (C = G, A = "-".concat(E, "-").concat(C)) : ~G.indexOf("true") && (C = "true", A = "-".concat(E)));
5027
5026
  }
5028
5027
  if (E in a) {
5029
5028
  var k = a[E];
5030
- N(typeof k == "string" || typeof k > "u" || k === null, "optionsValue must be String, Undefined or Null"), ~L.indexOf(k) && k !== b && (b = k, A = "");
5029
+ N(typeof k == "string" || typeof k > "u" || k === null, "optionsValue must be String, Undefined or Null"), ~L.indexOf(k) && k !== C && (C = k, A = "");
5031
5030
  }
5032
- y[E] = b, l += A;
5031
+ y[E] = C, l += A;
5033
5032
  }
5034
5033
  if (l.length > 2) {
5035
5034
  var D = _.indexOf("-x-");
@@ -5090,7 +5089,7 @@ const Sn = Ke(), we = /* @__PURE__ */ new WeakMap(), Mn = (e) => {
5090
5089
  function En(e) {
5091
5090
  return Ln(e);
5092
5091
  }
5093
- const bn = he(Ne)(({ theme: e }) => ({
5092
+ const Cn = he(Ne)(({ theme: e }) => ({
5094
5093
  display: "flex",
5095
5094
  gap: e.spacing(0.5),
5096
5095
  marginLeft: e.spacing(1)
@@ -5099,7 +5098,7 @@ const bn = he(Ne)(({ theme: e }) => ({
5099
5098
  color: e.palette.text.secondary
5100
5099
  }
5101
5100
  }));
5102
- function Kn({
5101
+ function xn({
5103
5102
  count: e,
5104
5103
  page: i,
5105
5104
  rowsPerPage: a = 10,
@@ -5117,7 +5116,7 @@ function Kn({
5117
5116
  }), E = s.formatMessage({
5118
5117
  id: "c4r.form.pagination.noMorePages"
5119
5118
  });
5120
- return /* @__PURE__ */ Ge(bn, { children: [
5119
+ return /* @__PURE__ */ Ge(Cn, { children: [
5121
5120
  /* @__PURE__ */ I(se, { title: l ? E : T, children: /* @__PURE__ */ I(ge, { children: /* @__PURE__ */ I(
5122
5121
  de,
5123
5122
  {
@@ -5136,7 +5135,7 @@ function Kn({
5136
5135
  {
5137
5136
  onClick: _,
5138
5137
  disabled: i >= Math.ceil(e / a) - 1,
5139
- "aria-label": M,
5138
+ "aria-label": M.toLocaleLowerCase(),
5140
5139
  children: /* @__PURE__ */ I(xe, {})
5141
5140
  }
5142
5141
  ) })
@@ -5145,14 +5144,14 @@ function Kn({
5145
5144
  ] });
5146
5145
  }
5147
5146
  export {
5148
- qn as A,
5149
- Gn as B,
5150
- Dn as I,
5147
+ Dn as A,
5148
+ Bn as B,
5149
+ Nn as I,
5151
5150
  rn as S,
5152
- xn as T,
5153
- Kn as a,
5154
- Nn as b,
5155
- Rn as c,
5151
+ qn as T,
5152
+ xn as a,
5153
+ Rn as b,
5154
+ Gn as c,
5156
5155
  je as d,
5157
5156
  j as g,
5158
5157
  En as u
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("@mui/material"),I=require("react"),c=require("../TablePaginationActions-B7ycFqaM.cjs"),C=require("@mui/icons-material"),P=require("react-intl"),L=require("@mui/material/styles"),U=require("../Alert-DyuvFDkP.cjs");function W({children:t,...n},r){return e.jsx(o.Button,{...n,ref:r,children:e.jsx(c.Typography,{variant:"inherit",color:"inherit",noWrap:!0,component:"span",children:t})})}const V=I.forwardRef(W),N=o.styled(o.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(.5)})),Z=o.styled(c.Typography)(({theme:t})=>({".Mui-disabled &":{color:t.palette.text.disabled}})),z=o.styled(o.Box)(({theme:t})=>({display:"flex",svg:{width:c.ICON_SIZE_SMALL,height:c.ICON_SIZE_SMALL,fontSize:c.ICON_SIZE_SMALL,path:{fill:t.palette.text.secondary,".Mui-disabled &":{fill:t.palette.text.disabled}}}}));function Y({label:t,type:n,icon:r,inheritSize:i}){return e.jsxs(N,{children:[t,n&&e.jsx(Z,{component:"span",variant:i?"inherit":"caption",color:"textSecondary",weight:"regular",children:n==="required"?"(required)":"(optional)"}),r&&e.jsx(z,{children:r})]})}function J({InputProps:t,size:n="small",...r},i){const[a,l]=I.useState(!1),s=()=>l(!a);return e.jsx(o.TextField,{...r,ref:i,type:a?"text":"password",size:n,InputProps:{...t,endAdornment:e.jsx(o.InputAdornment,{position:"end",children:e.jsx(o.IconButton,{size:n,onClick:s,children:a?e.jsx(C.VisibilityOutlined,{}):e.jsx(C.VisibilityOffOutlined,{})})})}})}const K=I.forwardRef(J),k={};function Q(t="$lodash$"){k[t]||(k[t]=0);const n=++k[t];return t==="$lodash$"?`${n}`:`${t}${n}`}const X=o.styled(o.Select)(({theme:t})=>({"& .MuiInputAdornment-positionStart":{paddingLeft:t.spacing(2),"&.MuiInputAdornment-sizeSmall":{paddingLeft:t.spacing(1.5)}},"& .MuiInputBase-inputAdornedStart":{paddingLeft:"0px !important"},"& .MuiSelect-select .MuiMenuItem-root:hover":{backgroundColor:"transparent"},"&.MuiInputBase-root .MuiSelect-select.MuiSelect-multiple":{paddingRight:t.spacing(7)}})),tt=o.styled(o.MenuItem)(()=>({display:"none"}));function et({children:t,placeholder:n,size:r="small",displayEmpty:i,menuProps:a,inputProps:l,labelId:s,label:x,labelSecondary:b,helperText:v,name:u,error:p,focused:f,disabled:M,fullWidth:y,required:h,"aria-label":B,...j},g){const T=r==="small",[d]=I.useState(()=>Q("select-label-")),m=x?s??d:void 0;return e.jsxs(o.FormControl,{size:r,error:p,focused:f,disabled:M,fullWidth:y,required:h,children:[e.jsxs(o.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[x&&e.jsx(o.InputLabel,{shrink:!0,id:m,children:x}),b&&e.jsx(o.Box,{display:"flex",alignItems:"center",ml:2,mb:.5,children:b})]}),e.jsxs(X,{...j,labelId:m,name:u,ref:g,size:r,fullWidth:y,displayEmpty:i??!!n,inputProps:{...l,"aria-label":B},MenuProps:{...a,PopoverClasses:{paper:T?"MuiMenu-paper-sizeSmall":void 0},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:0,horizontal:"left"}},children:[n&&e.jsx(tt,{disabled:!0,value:"",children:e.jsx(c.Typography,{variant:T?"body2":"body1",color:"text.hint",component:"span",children:n})}),t]}),v&&e.jsx(o.FormHelperText,{"aria-label":`${u}-helper`,children:v})]})}const $=I.forwardRef(et),nt=o.styled(o.ToggleButtonGroup,{shouldForwardProp:t=>t!=="variant"&&t!=="backgroundColor"})(({variant:t,backgroundColor:n,theme:r})=>({...t==="contained"&&{boxShadow:"none"},...t==="unbounded"&&{boxShadow:"none",borderRadius:r.spacing(.5),"& .MuiDivider-root":{height:r.spacing(4),"&.MuiToggleButtonGroup-groupedHorizontal":{height:r.spacing(4)},"&.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:r.spacing(4),margin:`${r.spacing(.5,0,1)} !important`,borderRadius:"0 !important"}},"& .MuiToggleButton-sizeSmall":{margin:0,"&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal":{height:r.spacing(3)},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:r.spacing(3)}},".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0,"&:first-of-type":{marginLeft:0},"&:not(:last-of-type)":{marginRight:r.spacing(.5)}},"&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:r.spacing(0,.5)}},"&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:r.spacing(0,0,.5),"&:not(:last-of-type)":{marginRight:0},"&:last-of-type":{marginBottom:0}}}},...n==="primary"&&{backgroundColor:r.palette.background.paper},...n==="secondary"&&{backgroundColor:r.palette.background.default},...n==="transparent"&&{backgroundColor:"transparent"}}));function ot({children:t,variant:n="floating",backgroundColor:r,...i}){const l=n==="unbounded"?"transparent":"primary";return e.jsx(nt,{...i,variant:n,backgroundColor:r??l,children:t})}const rt=o.styled(o.Menu,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:n,width:r,height:i})=>({...n&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},...r&&{".MuiList-root":{width:r,minWidth:r}},...i&&{".MuiMenu-paper":{overflow:"hidden"},".MuiList-root":{maxHeight:i}}}));function it(t){return e.jsx(rt,{...t})}const at=o.styled(o.MenuItem,{shouldForwardProp:t=>!["subtitle","destructive","extended","fixed","iconColor"].includes(t)})(({theme:t,dense:n,subtitle:r,destructive:i,extended:a,fixed:l,iconColor:s="primary"})=>({...r&&{pointerEvents:"none",columnGap:0,...t.typography.caption,fontWeight:500,color:t.palette.text.secondary,".MuiListItemText-root .MuiTypography-root":{...t.typography.caption,fontWeight:500,color:t.palette.text.secondary},"&.MuiMenuItem-root":{minHeight:t.spacing(3),paddingTop:0,paddingBottom:0,marginTop:t.spacing(1),"&:not(:first-of-type)":{minHeight:t.spacing(5),paddingTop:t.spacing(1),borderTop:`1px solid ${t.palette.divider}`}}},...s==="primary"&&{".MuiListItemIcon-root svg path":{fill:t.palette.text.primary},"&.Mui-selected .MuiListItemIcon-root svg path":{fill:t.palette.primary.main},'.MuiAutocomplete-listbox &[aria-selected="true"] svg path':{fill:t.palette.primary.main}},...i&&{color:t.palette.error.main,".MuiTypography-root":{color:t.palette.error.main},"svg, & .MuiSvgIcon-root":{color:t.palette.error.main},".MuiListItemIcon-root svg path":{fill:t.palette.error.main},"&.Mui-selected .MuiListItemIcon-root svg path":{fill:t.palette.error.main},"&:hover":{backgroundColor:t.palette.error.relatedLight},"&.Mui-selected":{color:t.palette.error.main,".MuiTypography-root":{color:t.palette.error.main},"svg, & .MuiSvgIcon-root":{color:t.palette.error.main}},"&.Mui-disabled":{color:t.palette.text.disabled,".MuiTypography-root":{color:t.palette.text.disabled},svg:{color:t.palette.text.disabled}}},...a&&{"&.MuiButtonBase-root.MuiMenuItem-root":{minHeight:t.spacing(6)}},...l&&{"&.MuiMenuItem-root":{position:"sticky",top:0,left:0,bottom:0,right:0,zIndex:2,minHeight:t.spacing(6),marginBottom:t.spacing(1),padding:t.spacing(.5,1.5),backgroundColor:t.palette.background.paper,borderBottom:`1px solid ${t.palette.divider}`},".MuiAutocomplete-listbox &.MuiAutocomplete-option:first-of-type":{minHeight:t.spacing(6),marginTop:0,"&:hover":{backgroundColor:t.palette.background.paper}}},...!l&&{".MuiList-root &:first-of-type":{marginTop:t.spacing(1)}},...n&&{"&.MuiButtonBase-root.MuiMenuItem-root":{minHeight:t.spacing(3),padding:t.spacing(.25,1.5)}}}));function E(t){return e.jsx(at,{...t})}const lt=o.styled(o.MenuList,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:n,width:r,height:i})=>({...n&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},"&.MuiList-root":{...r&&{width:r,minWidth:r},...i&&{maxHeight:i}}}));function st(t){return e.jsx(lt,{...t})}function dt({selectedOptions:t,options:n,onChange:r}){const[i,a]=I.useState(t??[]),l=n.length===i.length,s=i.length>0;return I.useEffect(()=>{i!==t&&a(i)},[t]),{areAllSelected:l,areAnySelected:s,currentOptions:i,handleChange:u=>{const{target:{value:p}}=u,f=typeof p=="string"?p.split(","):p.filter(M=>M!==void 0);a(f),r(f)},selectAll:()=>{const u=n==null?void 0:n.filter(({disabled:p})=>!p).map(({value:p})=>p);u&&(u.every(f=>i.includes(f))?(a([]),r([])):(a(u),r(u)))},unselectAll:()=>{a([]),r([])}}}const ct=o.styled(o.Link)(({disabled:t,theme:n})=>({display:"flex",alignItems:"center",gap:n.spacing(1),width:"100%",textAlign:"initial",...t&&{pointerEvents:"none",color:n.palette.text.disabled}}));function ut({areAllSelected:t,areAnySelected:n,selectAll:r,selectAllDisabled:i}){const a=P.useIntl(),l=c.useImperativeIntl(a);return e.jsx(E,{fixed:!0,children:e.jsxs(ct,{variant:"body2",color:"textPrimary",component:"button",underline:"none",disabled:!!i,onClick:r,tabIndex:0,children:[e.jsx(o.Checkbox,{checked:t,indeterminate:n&&!t,disabled:i}),l.formatMessage({id:"c4r.form.selectAll"})]})})}const pt=o.styled(o.MenuItem)(({theme:t})=>({"&.Mui-disabled":{pointerEvents:"auto","&:hover":{backgroundColor:`${t.palette.background.default} !important`}}})),gt=o.styled(o.InputAdornment)(({theme:t})=>({display:"none",position:"absolute",top:t.spacing(2),right:t.spacing(3.5),".MuiInputBase-root:hover &, .MuiInputBase-root.Mui-focused &":{display:"flex"},".MuiSvgIcon-root":{color:t.palette.text.hint}})),xt=[],ft=()=>{};function yt({options:t=xt,selectedOptions:n,size:r="small",placeholder:i,showCounter:a,showFilters:l=!0,onChange:s=ft,selectAllDisabled:x,tooltipPlacement:b,variant:v,...u},p){const{areAllSelected:f,areAnySelected:M,currentOptions:y,handleChange:h,selectAll:B,unselectAll:j}=dt({options:t,selectedOptions:n,onChange:s}),g=r==="small",T=g||v==="standard"?0:2,d=P.useIntl(),m=c.useImperativeIntl(d),S=`${y.length} ${m.formatMessage({id:"c4r.form.selected"})}`,F=I.useMemo(()=>f?e.jsx(c.Typography,{component:"span",variant:g?"body2":"body1",color:"textPrimary",ml:T,children:m.formatMessage({id:"c4r.form.allSelected"})}):M?e.jsx(c.Typography,{component:"span",variant:g?"body2":"body1",color:"textPrimary",ml:T,children:a&&y.length>1?S:y.join(", ")}):e.jsx(c.Typography,{component:"span",variant:g?"body2":"body1",color:"text.hint",ml:T,children:i??m.formatMessage({id:"c4r.form.noneSelected"})}),[f,M,S,y,m,g,T,i,a]);return e.jsxs($,{...u,ref:p,multiple:!0,displayEmpty:!0,placeholder:i,value:y,renderValue:()=>F,onChange:h,size:r,variant:v,endAdornment:l&&M&&e.jsx(gt,{position:"end",children:e.jsx(o.IconButton,{onClick:j,size:"small",children:e.jsx(C.Cancel,{})})}),menuProps:{PaperProps:{sx:{".MuiList-root":{paddingTop:0}}}},children:[l&&e.jsx(ut,{areAllSelected:f,areAnySelected:M,selectAll:B,selectAllDisabled:x}),t==null?void 0:t.map(A=>{const w=e.jsxs(pt,{value:A.value,disabled:A.disabled,tabIndex:0,children:[e.jsx(o.Checkbox,{disabled:A.disabled,checked:y.includes(A.value)}),e.jsx(o.ListItemText,{primary:A.label})]},A.value);return A.tooltip?e.jsx(o.Tooltip,{title:A.tooltip,placement:b,children:w},A.value):w})]})}const ht=I.forwardRef(yt),mt=L.styled(o.TextField,{shouldForwardProp:t=>t!=="cursor"})(({cursor:t,theme:n})=>({"&.MuiTextField-root .MuiInputBase-root":{cursor:t,paddingRight:n.spacing(1),"& input":{cursor:t},"&.Mui-disabled":{pointerEvents:"none","& .MuiButtonBase-root":{color:n.palette.text.disabled}},"&.MuiInputBase-sizeSmall":{paddingRight:n.spacing(.5)}},"& .MuiFormLabel-root":{cursor:t,"&.Mui-disabled":{pointerEvents:"none"}}}));function Mt({buttonText:t,hasFiles:n,size:r,error:i,disabled:a,handleReset:l,handleOpen:s,inProgress:x}){return e.jsx(o.InputAdornment,{position:"end",children:x?e.jsx(o.IconButton,{"aria-label":"loading",disabled:!0,size:r,children:e.jsx(o.CircularProgress,{size:18})}):n?e.jsx(o.IconButton,{onClick:l,size:r,"aria-label":"delete",disabled:a,children:e.jsx(C.Cancel,{})}):e.jsx(o.Button,{onClick:s,size:r,variant:"text",color:i?"default":"primary",disabled:a,children:t})})}function _({name:t,multiple:n,handleReset:r,handleOpen:i,dragOver:a,error:l,placeholder:s,focused:x,buttonText:b="Browse",inProgress:v,InputProps:u,size:p="small",hasFiles:f,cursor:M="pointer",...y}){return e.jsx(mt,{...y,size:p,error:l,placeholder:s,focused:x??a,cursor:M,InputProps:{...u,name:t,readOnly:!0,endAdornment:e.jsx(Mt,{buttonText:b,hasFiles:f,size:p,error:l,disabled:!!a,handleReset:r,handleOpen:i,inProgress:v})}})}function bt({onChange:t,files:n,multiple:r,placeholder:i,uploadInputRef:a}){const l=P.useIntl(),s=c.useImperativeIntl(l),[x,b]=I.useState(""),[v,u]=I.useState(!1);I.useEffect(()=>{!n||n.length===0?b(""):n.length===1?b(n[0].name):b(s.formatMessage({id:"c4r.form.filesSelected"},{count:n.length}))},[n,s]);const p=()=>{var d;(d=a.current)==null||d.click()},f=d=>{d.preventDefault(),u(!0)},M=d=>{d.preventDefault(),u(!1)},y=d=>{d.preventDefault(),u(!1);const m=d.dataTransfer.items,S=h(m);t==null||t(S)},h=d=>{const m=[];for(const S of Array.from(d))if(S.kind==="file"){const F=S.getAsFile();m.push(F)}return m},B=d=>{const m=Array.from(d.target.files);t==null||t(m)},j=d=>{d.stopPropagation(),b("")},g=I.useMemo(()=>{const d=s.formatMessage({id:"c4r.form.dragPlaceholder"},{count:r?0:1}),m=s.formatMessage({id:"c4r.form.dragActivePlaceholder"},{count:r?0:1});let S="";return v?S=m:S=i??d,S},[v,r,i,s]);return{filesText:x,getPlaceholder:g,dragOver:v,inputEvents:{onDragOver:f,onDragLeave:M,onDrop:y,onClick:p},handleFiles:B,handleReset:j}}const vt=["application/JSON"];function It({name:t,buttonText:n,accept:r,files:i,inProgress:a,onChange:l,multiple:s,placeholder:x,error:b,focused:v,nativeInputProps:u,...p}){const f=r??vt,M=I.useRef(null),{filesText:y,getPlaceholder:h,dragOver:B,inputEvents:j,handleFiles:g,handleReset:T}=bt({uploadInputRef:M,files:i,onChange:l,multiple:s,placeholder:x});return e.jsxs(e.Fragment,{children:[e.jsx(_,{...p,placeholder:h,value:y,error:b,focused:v??B,handleReset:T,dragOver:B,inProgress:a,hasFiles:!!y,InputProps:j,buttonText:n}),e.jsx("input",{...u,ref:M,style:{display:"none"},type:"file","aria-label":t,name:t,accept:String(f),multiple:s,onChange:g})]})}const jt=o.styled("div",{shouldForwardProp:t=>t!=="variant"})(({variant:t,theme:n})=>({width:"100%",borderRadius:n.spacing(.5),...t==="outlined"&&{backgroundColor:n.palette.background.paper,boxShadow:`inset 0 0 0 1px ${n.palette.divider}`}}));function Tt({variant:t="standard",items:n,...r}){return e.jsx(jt,{...r,variant:t,children:n.map((i,a)=>e.jsxs(o.Accordion,{disabled:i.disabled,defaultExpanded:i.defaultExpanded,onChange:i.onChange,children:[e.jsx(o.AccordionSummary,{"aria-controls":`${a}-content`,id:`${a}-header`,children:i.summary}),e.jsx(o.AccordionDetails,{children:i.content})]},a))})}const Bt=o.createFilterOptions(),St="c4r.form.add";function At(t){return t&&typeof t=="object"?t.title??String(t):String(t)}function Ct({creatable:t,newItemLabel:n=St,newItemIcon:r,freeSolo:i,renderOption:a,forcePopupIcon:l,filterOptions:s,getOptionLabel:x=At,...b},v){const u=P.useIntl(),p=c.useImperativeIntl(u),f=(h,B)=>{const j=Bt(h,B),{inputValue:g}=B,T=h.some(d=>g===x(d));return g.length>1&&g!==""&&!T&&j.push({inputValue:g,title:typeof n=="function"?n(g):`${p.formatMessage({id:n})} "${g}"`}),j},M=h=>typeof h=="string"?h:h.inputValue?h.inputValue:x(h),y=(h,B)=>{const{inputValue:j,title:g,alternativeTitle:T,secondaryText:d,divider:m,fixed:S,extended:F,dense:A,destructive:w,disabled:R,subtitle:G,iconColor:q,startAdornment:O,endAdornment:H}=B;return e.jsx(I.Fragment,{children:m?e.jsx(o.Divider,{}):e.jsxs(e.Fragment,{children:[j&&e.jsx(o.Divider,{}),e.jsxs(E,{...h,fixed:S,extended:F,dense:A,destructive:w,disabled:R,subtitle:G,iconColor:q,children:[j&&e.jsx(o.ListItemIcon,{children:r??e.jsx(C.AddCircleOutlineOutlined,{})}),O&&!j&&e.jsx(o.ListItemIcon,{children:O}),e.jsxs(o.ListItemText,{children:[T??g,d&&e.jsx(c.Typography,{component:"p",variant:"caption",color:"text.secondary",children:d})]}),H]})]})},j??g)};return e.jsx(o.Autocomplete,{...b,ref:v,filterOptions:t?f:s,getOptionLabel:t?M:x,renderOption:t?y:a,freeSolo:t||i,forcePopupIcon:t||l})}const Ft=I.forwardRef(Ct),D={large:5,medium:4,small:3,xsmall:2.25},Lt=o.styled(o.Avatar,{shouldForwardProp:t=>t!=="size"})(({theme:t,size:n="medium"})=>({width:t.spacing(D[n]),height:t.spacing(D[n]),...t.typography.subtitle1,...n==="large"&&{...t.typography.h6},...n==="small"&&{...t.typography.caption,fontWeight:500},...n==="xsmall"&&{...t.typography.caption,fontWeight:500,svg:{width:c.ICON_SIZE_SMALL,height:c.ICON_SIZE_SMALL}}}));function wt(t){return e.jsx(Lt,{...t})}const Pt=o.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",height:c.APPBAR_SIZE,marginRight:t.spacing(1.5)})),kt=o.styled(o.IconButton)(({theme:t})=>({marginRight:t.spacing(1),"&.MuiButtonBase-root svg path":{fill:t.palette.brand.appBarContrastText}})),Et=o.styled(o.Divider)(({theme:t})=>({borderColor:o.alpha(t.palette.brand.appBarContrastText,.12)}));function Rt({onClickMenu:t}){return e.jsx(o.Box,{sx:{display:{md:"none",xs:"block"}},children:e.jsxs(Pt,{children:[e.jsx(kt,{onClick:t,children:e.jsx(C.MenuOutlined,{})}),e.jsx(Et,{orientation:"vertical",flexItem:!0})]})})}const Ot=o.styled("div")(({theme:t})=>({display:"flex",marginRight:t.spacing(1.5),"& a":{display:"flex"},"& svg, & img":{width:t.spacing(4),height:t.spacing(4)}}));function Dt({logo:t}){return e.jsx(Ot,{children:t})}const $t=L.styled(c.Typography)({display:"flex",alignItems:"center",whiteSpace:"nowrap"});function _t({text:t}){const n=L.useTheme();return e.jsx($t,{component:"span",variant:"subtitle1",color:n.palette.brand.appBarContrastText,children:t})}const Gt=L.styled(c.Typography)(({theme:t})=>({display:"flex",alignItems:"center","&::before":{content:'"/"',margin:t.spacing(0,1),opacity:.6,color:t.palette.brand.appBarContrastText}}));function qt({text:t}){const n=L.useTheme();return e.jsx(Gt,{component:"span",variant:"body2",weight:"strong",color:n.palette.brand.appBarContrastText,children:t})}const Ht=o.styled(o.AppBar)(({theme:t})=>({backgroundColor:t.palette.brand.appBarMain,"& .MuiTypography-root":{color:t.palette.brand.appBarContrastText},"& .MuiIconButton-root path":{fill:t.palette.brand.appBarContrastText}})),Ut=o.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",maxWidth:"calc(100% - 300px)",overflow:"hidden",[t.breakpoints.down("sm")]:{minWidth:"192px"}})),Wt=o.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",flex:1,marginLeft:t.spacing(1)}));function Vt({children:t,brandLogo:n,brandText:r,secondaryText:i,showBurgerMenu:a=!1,onClickMenu:l,...s}){return e.jsx(Ht,{...s,children:e.jsxs(o.Toolbar,{children:[e.jsxs(Ut,{children:[a&&e.jsx(Rt,{onClickMenu:l}),n&&e.jsx(Dt,{logo:n}),r&&e.jsx(_t,{text:r}),i&&e.jsx(qt,{text:i})]}),e.jsx(Wt,{children:t})]})})}const Nt=[{outlinedBullet:!1,value:""}],Zt=o.styled("ul")(({theme:t})=>({listStyle:"none",paddingLeft:0,margin:t.spacing(.5,0,0,0)})),zt=o.styled("li")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between","&:not(:last-child)":{marginBottom:t.spacing(.5)}})),Yt=o.styled("span")(({theme:t})=>({width:t.spacing(1),height:t.spacing(1),marginRight:t.spacing(.5),border:`2px solid ${t.palette.qualitative.bold[1]}`,borderRadius:"50%",backgroundColor:t.palette.qualitative.bold[1]})),Jt=o.styled(c.Typography)(({theme:t})=>({minWidth:t.spacing(10),marginRight:t.spacing(1.5)}));function Kt({items:t=Nt,title:n}){return e.jsxs(e.Fragment,{children:[n&&e.jsx(c.Typography,{color:"inherit",variant:"caption",weight:"medium",children:n}),e.jsx(Zt,{children:t.map((r,i)=>e.jsxs(zt,{children:[e.jsx(Yt,{style:{backgroundColor:`${r.outlinedBullet?"transparent":r.color}`,borderColor:r.color}}),r.category&&e.jsx(Jt,{color:"inherit",variant:"caption",children:r.category}),e.jsx(c.Typography,{color:"inherit",variant:"caption",weight:"medium",children:r.value})]},i))})]})}exports.TablePaginationActions=c.TablePaginationActions;exports.Typography=c.Typography;exports.Alert=U.Alert;exports.AccordionGroup=Tt;exports.AppBar=Vt;exports.Autocomplete=Ft;exports.Avatar=wt;exports.Button=V;exports.LabelWithIndicator=Y;exports.Menu=it;exports.MenuItem=E;exports.MenuList=st;exports.MultipleSelectField=ht;exports.PasswordField=K;exports.SelectField=$;exports.ToggleButtonGroup=ot;exports.TooltipData=Kt;exports.UploadField=It;exports.UploadFieldBase=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("@mui/material"),I=require("react"),c=require("../TablePaginationActions-5u10SobX.cjs"),C=require("@mui/icons-material"),P=require("react-intl"),L=require("@mui/material/styles"),U=require("../Alert-CT76xuh3.cjs");function W({children:t,...n},r){return e.jsx(o.Button,{...n,ref:r,children:e.jsx(c.Typography,{variant:"inherit",color:"inherit",noWrap:!0,component:"span",children:t})})}const V=I.forwardRef(W),N=o.styled(o.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(.5)})),Z=o.styled(c.Typography)(({theme:t})=>({".Mui-disabled &":{color:t.palette.text.disabled}})),z=o.styled(o.Box)(({theme:t})=>({display:"flex",svg:{width:c.ICON_SIZE_SMALL,height:c.ICON_SIZE_SMALL,fontSize:c.ICON_SIZE_SMALL,path:{fill:t.palette.text.secondary,".Mui-disabled &":{fill:t.palette.text.disabled}}}}));function Y({label:t,type:n,icon:r,inheritSize:i}){return e.jsxs(N,{children:[t,n&&e.jsx(Z,{component:"span",variant:i?"inherit":"caption",color:"textSecondary",weight:"regular",children:n==="required"?"(required)":"(optional)"}),r&&e.jsx(z,{children:r})]})}function J({InputProps:t,size:n="small",...r},i){const[a,l]=I.useState(!1),s=()=>l(!a);return e.jsx(o.TextField,{...r,ref:i,type:a?"text":"password",size:n,InputProps:{...t,endAdornment:e.jsx(o.InputAdornment,{position:"end",children:e.jsx(o.IconButton,{size:n,onClick:s,children:a?e.jsx(C.VisibilityOutlined,{}):e.jsx(C.VisibilityOffOutlined,{})})})}})}const K=I.forwardRef(J),k={};function Q(t="$lodash$"){k[t]||(k[t]=0);const n=++k[t];return t==="$lodash$"?`${n}`:`${t}${n}`}const X=o.styled(o.Select)(({theme:t})=>({"& .MuiInputAdornment-positionStart":{paddingLeft:t.spacing(2),"&.MuiInputAdornment-sizeSmall":{paddingLeft:t.spacing(1.5)}},"& .MuiInputBase-inputAdornedStart":{paddingLeft:"0px !important"},"& .MuiSelect-select .MuiMenuItem-root:hover":{backgroundColor:"transparent"},"&.MuiInputBase-root .MuiSelect-select.MuiSelect-multiple":{paddingRight:t.spacing(7)}})),tt=o.styled(o.MenuItem)(()=>({display:"none"}));function et({children:t,placeholder:n,size:r="small",displayEmpty:i,menuProps:a,inputProps:l,labelId:s,label:x,labelSecondary:b,helperText:v,name:u,error:p,focused:f,disabled:M,fullWidth:y,required:h,"aria-label":B,...j},g){const T=r==="small",[d]=I.useState(()=>Q("select-label-")),m=x?s??d:void 0;return e.jsxs(o.FormControl,{size:r,error:p,focused:f,disabled:M,fullWidth:y,required:h,children:[e.jsxs(o.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[x&&e.jsx(o.InputLabel,{shrink:!0,id:m,children:x}),b&&e.jsx(o.Box,{display:"flex",alignItems:"center",ml:2,mb:.5,children:b})]}),e.jsxs(X,{...j,labelId:m,name:u,ref:g,size:r,fullWidth:y,displayEmpty:i??!!n,inputProps:{...l,"aria-label":B},MenuProps:{...a,PopoverClasses:{paper:T?"MuiMenu-paper-sizeSmall":void 0},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:0,horizontal:"left"}},children:[n&&e.jsx(tt,{disabled:!0,value:"",children:e.jsx(c.Typography,{variant:T?"body2":"body1",color:"text.hint",component:"span",children:n})}),t]}),v&&e.jsx(o.FormHelperText,{"aria-label":`${u}-helper`,children:v})]})}const $=I.forwardRef(et),nt=o.styled(o.ToggleButtonGroup,{shouldForwardProp:t=>t!=="variant"&&t!=="backgroundColor"})(({variant:t,backgroundColor:n,theme:r})=>({...t==="contained"&&{boxShadow:"none"},...t==="unbounded"&&{boxShadow:"none",borderRadius:r.spacing(.5),"& .MuiDivider-root":{height:r.spacing(4),"&.MuiToggleButtonGroup-groupedHorizontal":{height:r.spacing(4)},"&.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:r.spacing(4),margin:`${r.spacing(.5,0,1)} !important`,borderRadius:"0 !important"}},"& .MuiToggleButton-sizeSmall":{margin:0,"&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal":{height:r.spacing(3)},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:r.spacing(3)}},".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0,"&:first-of-type":{marginLeft:0},"&:not(:last-of-type)":{marginRight:r.spacing(.5)}},"&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:r.spacing(0,.5)}},"&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:r.spacing(0,0,.5),"&:not(:last-of-type)":{marginRight:0},"&:last-of-type":{marginBottom:0}}}},...n==="primary"&&{backgroundColor:r.palette.background.paper},...n==="secondary"&&{backgroundColor:r.palette.background.default},...n==="transparent"&&{backgroundColor:"transparent"}}));function ot({children:t,variant:n="floating",backgroundColor:r,...i}){const l=n==="unbounded"?"transparent":"primary";return e.jsx(nt,{...i,variant:n,backgroundColor:r??l,children:t})}const rt=o.styled(o.Menu,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:n,width:r,height:i})=>({...n&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},...r&&{".MuiList-root":{width:r,minWidth:r}},...i&&{".MuiMenu-paper":{overflow:"hidden"},".MuiList-root":{maxHeight:i}}}));function it(t){return e.jsx(rt,{...t})}const at=o.styled(o.MenuItem,{shouldForwardProp:t=>!["subtitle","destructive","extended","fixed","iconColor"].includes(t)})(({theme:t,dense:n,subtitle:r,destructive:i,extended:a,fixed:l,iconColor:s="primary"})=>({...r&&{pointerEvents:"none",columnGap:0,...t.typography.caption,fontWeight:500,color:t.palette.text.secondary,".MuiListItemText-root .MuiTypography-root":{...t.typography.caption,fontWeight:500,color:t.palette.text.secondary},"&.MuiMenuItem-root":{minHeight:t.spacing(3),paddingTop:0,paddingBottom:0,marginTop:t.spacing(1),"&:not(:first-of-type)":{minHeight:t.spacing(5),paddingTop:t.spacing(1),borderTop:`1px solid ${t.palette.divider}`}}},...s==="primary"&&{".MuiListItemIcon-root svg path":{fill:t.palette.text.primary},"&.Mui-selected .MuiListItemIcon-root svg path":{fill:t.palette.primary.main},'.MuiAutocomplete-listbox &[aria-selected="true"] svg path':{fill:t.palette.primary.main}},...i&&{color:t.palette.error.main,".MuiTypography-root":{color:t.palette.error.main},"svg, & .MuiSvgIcon-root":{color:t.palette.error.main},".MuiListItemIcon-root svg path":{fill:t.palette.error.main},"&.Mui-selected .MuiListItemIcon-root svg path":{fill:t.palette.error.main},"&:hover":{backgroundColor:t.palette.error.relatedLight},"&.Mui-selected":{color:t.palette.error.main,".MuiTypography-root":{color:t.palette.error.main},"svg, & .MuiSvgIcon-root":{color:t.palette.error.main}},"&.Mui-disabled":{color:t.palette.text.disabled,".MuiTypography-root":{color:t.palette.text.disabled},svg:{color:t.palette.text.disabled}}},...a&&{"&.MuiButtonBase-root.MuiMenuItem-root":{minHeight:t.spacing(6)}},...l&&{"&.MuiMenuItem-root":{position:"sticky",top:0,left:0,bottom:0,right:0,zIndex:2,minHeight:t.spacing(6),marginBottom:t.spacing(1),padding:t.spacing(.5,1.5),backgroundColor:t.palette.background.paper,borderBottom:`1px solid ${t.palette.divider}`},".MuiAutocomplete-listbox &.MuiAutocomplete-option:first-of-type":{minHeight:t.spacing(6),marginTop:0,"&:hover":{backgroundColor:t.palette.background.paper}}},...!l&&{".MuiList-root &:first-of-type":{marginTop:t.spacing(1)}},...n&&{"&.MuiButtonBase-root.MuiMenuItem-root":{minHeight:t.spacing(3),padding:t.spacing(.25,1.5)}}}));function E(t){return e.jsx(at,{...t})}const lt=o.styled(o.MenuList,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:n,width:r,height:i})=>({...n&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},"&.MuiList-root":{...r&&{width:r,minWidth:r},...i&&{maxHeight:i}}}));function st(t){return e.jsx(lt,{...t})}function dt({selectedOptions:t,options:n,onChange:r}){const[i,a]=I.useState(t??[]),l=n.length===i.length,s=i.length>0;return I.useEffect(()=>{i!==t&&a(i)},[t]),{areAllSelected:l,areAnySelected:s,currentOptions:i,handleChange:u=>{const{target:{value:p}}=u,f=typeof p=="string"?p.split(","):p.filter(M=>M!==void 0);a(f),r(f)},selectAll:()=>{const u=n==null?void 0:n.filter(({disabled:p})=>!p).map(({value:p})=>p);u&&(u.every(f=>i.includes(f))?(a([]),r([])):(a(u),r(u)))},unselectAll:()=>{a([]),r([])}}}const ct=o.styled(o.Link)(({disabled:t,theme:n})=>({display:"flex",alignItems:"center",gap:n.spacing(1),width:"100%",textAlign:"initial",...t&&{pointerEvents:"none",color:n.palette.text.disabled}}));function ut({areAllSelected:t,areAnySelected:n,selectAll:r,selectAllDisabled:i}){const a=P.useIntl(),l=c.useImperativeIntl(a);return e.jsx(E,{fixed:!0,children:e.jsxs(ct,{variant:"body2",color:"textPrimary",component:"button",underline:"none",disabled:!!i,onClick:r,tabIndex:0,children:[e.jsx(o.Checkbox,{checked:t,indeterminate:n&&!t,disabled:i}),l.formatMessage({id:"c4r.form.selectAll"})]})})}const pt=o.styled(o.MenuItem)(({theme:t})=>({"&.Mui-disabled":{pointerEvents:"auto","&:hover":{backgroundColor:`${t.palette.background.default} !important`}}})),gt=o.styled(o.InputAdornment)(({theme:t})=>({display:"none",position:"absolute",top:t.spacing(2),right:t.spacing(3.5),".MuiInputBase-root:hover &, .MuiInputBase-root.Mui-focused &":{display:"flex"},".MuiSvgIcon-root":{color:t.palette.text.hint}})),xt=[],ft=()=>{};function yt({options:t=xt,selectedOptions:n,size:r="small",placeholder:i,showCounter:a,showFilters:l=!0,onChange:s=ft,selectAllDisabled:x,tooltipPlacement:b,variant:v,...u},p){const{areAllSelected:f,areAnySelected:M,currentOptions:y,handleChange:h,selectAll:B,unselectAll:j}=dt({options:t,selectedOptions:n,onChange:s}),g=r==="small",T=g||v==="standard"?0:2,d=P.useIntl(),m=c.useImperativeIntl(d),S=`${y.length} ${m.formatMessage({id:"c4r.form.selected"})}`,F=I.useMemo(()=>f?e.jsx(c.Typography,{component:"span",variant:g?"body2":"body1",color:"textPrimary",ml:T,children:m.formatMessage({id:"c4r.form.allSelected"})}):M?e.jsx(c.Typography,{component:"span",variant:g?"body2":"body1",color:"textPrimary",ml:T,children:a&&y.length>1?S:y.join(", ")}):e.jsx(c.Typography,{component:"span",variant:g?"body2":"body1",color:"text.hint",ml:T,children:i??m.formatMessage({id:"c4r.form.noneSelected"})}),[f,M,S,y,m,g,T,i,a]);return e.jsxs($,{...u,ref:p,multiple:!0,displayEmpty:!0,placeholder:i,value:y,renderValue:()=>F,onChange:h,size:r,variant:v,endAdornment:l&&M&&e.jsx(gt,{position:"end",children:e.jsx(o.IconButton,{onClick:j,size:"small",children:e.jsx(C.Cancel,{})})}),menuProps:{PaperProps:{sx:{".MuiList-root":{paddingTop:0}}}},children:[l&&e.jsx(ut,{areAllSelected:f,areAnySelected:M,selectAll:B,selectAllDisabled:x}),t==null?void 0:t.map(A=>{const w=e.jsxs(pt,{value:A.value,disabled:A.disabled,tabIndex:0,children:[e.jsx(o.Checkbox,{disabled:A.disabled,checked:y.includes(A.value)}),e.jsx(o.ListItemText,{primary:A.label})]},A.value);return A.tooltip?e.jsx(o.Tooltip,{title:A.tooltip,placement:b,children:w},A.value):w})]})}const ht=I.forwardRef(yt),mt=L.styled(o.TextField,{shouldForwardProp:t=>t!=="cursor"})(({cursor:t,theme:n})=>({"&.MuiTextField-root .MuiInputBase-root":{cursor:t,paddingRight:n.spacing(1),"& input":{cursor:t},"&.Mui-disabled":{pointerEvents:"none","& .MuiButtonBase-root":{color:n.palette.text.disabled}},"&.MuiInputBase-sizeSmall":{paddingRight:n.spacing(.5)}},"& .MuiFormLabel-root":{cursor:t,"&.Mui-disabled":{pointerEvents:"none"}}}));function Mt({buttonText:t,hasFiles:n,size:r,error:i,disabled:a,handleReset:l,handleOpen:s,inProgress:x}){return e.jsx(o.InputAdornment,{position:"end",children:x?e.jsx(o.IconButton,{"aria-label":"loading",disabled:!0,size:r,children:e.jsx(o.CircularProgress,{size:18})}):n?e.jsx(o.IconButton,{onClick:l,size:r,"aria-label":"delete",disabled:a,children:e.jsx(C.Cancel,{})}):e.jsx(o.Button,{onClick:s,size:r,variant:"text",color:i?"default":"primary",disabled:a,children:t})})}function _({name:t,multiple:n,handleReset:r,handleOpen:i,dragOver:a,error:l,placeholder:s,focused:x,buttonText:b="Browse",inProgress:v,InputProps:u,size:p="small",hasFiles:f,cursor:M="pointer",...y}){return e.jsx(mt,{...y,size:p,error:l,placeholder:s,focused:x??a,cursor:M,InputProps:{...u,name:t,readOnly:!0,endAdornment:e.jsx(Mt,{buttonText:b,hasFiles:f,size:p,error:l,disabled:!!a,handleReset:r,handleOpen:i,inProgress:v})}})}function bt({onChange:t,files:n,multiple:r,placeholder:i,uploadInputRef:a}){const l=P.useIntl(),s=c.useImperativeIntl(l),[x,b]=I.useState(""),[v,u]=I.useState(!1);I.useEffect(()=>{!n||n.length===0?b(""):n.length===1?b(n[0].name):b(s.formatMessage({id:"c4r.form.filesSelected"},{count:n.length}))},[n,s]);const p=()=>{var d;(d=a.current)==null||d.click()},f=d=>{d.preventDefault(),u(!0)},M=d=>{d.preventDefault(),u(!1)},y=d=>{d.preventDefault(),u(!1);const m=d.dataTransfer.items,S=h(m);t==null||t(S)},h=d=>{const m=[];for(const S of Array.from(d))if(S.kind==="file"){const F=S.getAsFile();m.push(F)}return m},B=d=>{const m=Array.from(d.target.files);t==null||t(m)},j=d=>{d.stopPropagation(),b("")},g=I.useMemo(()=>{const d=s.formatMessage({id:"c4r.form.dragPlaceholder"},{count:r?0:1}),m=s.formatMessage({id:"c4r.form.dragActivePlaceholder"},{count:r?0:1});let S="";return v?S=m:S=i??d,S},[v,r,i,s]);return{filesText:x,getPlaceholder:g,dragOver:v,inputEvents:{onDragOver:f,onDragLeave:M,onDrop:y,onClick:p},handleFiles:B,handleReset:j}}const vt=["application/JSON"];function It({name:t,buttonText:n,accept:r,files:i,inProgress:a,onChange:l,multiple:s,placeholder:x,error:b,focused:v,nativeInputProps:u,...p}){const f=r??vt,M=I.useRef(null),{filesText:y,getPlaceholder:h,dragOver:B,inputEvents:j,handleFiles:g,handleReset:T}=bt({uploadInputRef:M,files:i,onChange:l,multiple:s,placeholder:x});return e.jsxs(e.Fragment,{children:[e.jsx(_,{...p,placeholder:h,value:y,error:b,focused:v??B,handleReset:T,dragOver:B,inProgress:a,hasFiles:!!y,InputProps:j,buttonText:n}),e.jsx("input",{...u,ref:M,style:{display:"none"},type:"file","aria-label":t,name:t,accept:String(f),multiple:s,onChange:g})]})}const jt=o.styled("div",{shouldForwardProp:t=>t!=="variant"})(({variant:t,theme:n})=>({width:"100%",borderRadius:n.spacing(.5),...t==="outlined"&&{backgroundColor:n.palette.background.paper,boxShadow:`inset 0 0 0 1px ${n.palette.divider}`}}));function Tt({variant:t="standard",items:n,...r}){return e.jsx(jt,{...r,variant:t,children:n.map((i,a)=>e.jsxs(o.Accordion,{disabled:i.disabled,defaultExpanded:i.defaultExpanded,onChange:i.onChange,children:[e.jsx(o.AccordionSummary,{"aria-controls":`${a}-content`,id:`${a}-header`,children:i.summary}),e.jsx(o.AccordionDetails,{children:i.content})]},a))})}const Bt=o.createFilterOptions(),St="c4r.form.add";function At(t){return t&&typeof t=="object"?t.title??String(t):String(t)}function Ct({creatable:t,newItemLabel:n=St,newItemIcon:r,freeSolo:i,renderOption:a,forcePopupIcon:l,filterOptions:s,getOptionLabel:x=At,...b},v){const u=P.useIntl(),p=c.useImperativeIntl(u),f=(h,B)=>{const j=Bt(h,B),{inputValue:g}=B,T=h.some(d=>g===x(d));return g.length>1&&g!==""&&!T&&j.push({inputValue:g,title:typeof n=="function"?n(g):`${p.formatMessage({id:n})} "${g}"`}),j},M=h=>typeof h=="string"?h:h.inputValue?h.inputValue:x(h),y=(h,B)=>{const{inputValue:j,title:g,alternativeTitle:T,secondaryText:d,divider:m,fixed:S,extended:F,dense:A,destructive:w,disabled:R,subtitle:G,iconColor:q,startAdornment:O,endAdornment:H}=B;return e.jsx(I.Fragment,{children:m?e.jsx(o.Divider,{}):e.jsxs(e.Fragment,{children:[j&&e.jsx(o.Divider,{}),e.jsxs(E,{...h,fixed:S,extended:F,dense:A,destructive:w,disabled:R,subtitle:G,iconColor:q,children:[j&&e.jsx(o.ListItemIcon,{children:r??e.jsx(C.AddCircleOutlineOutlined,{})}),O&&!j&&e.jsx(o.ListItemIcon,{children:O}),e.jsxs(o.ListItemText,{children:[T??g,d&&e.jsx(c.Typography,{component:"p",variant:"caption",color:"text.secondary",children:d})]}),H]})]})},j??g)};return e.jsx(o.Autocomplete,{...b,ref:v,filterOptions:t?f:s,getOptionLabel:t?M:x,renderOption:t?y:a,freeSolo:t||i,forcePopupIcon:t||l})}const Ft=I.forwardRef(Ct),D={large:5,medium:4,small:3,xsmall:2.25},Lt=o.styled(o.Avatar,{shouldForwardProp:t=>t!=="size"})(({theme:t,size:n="medium"})=>({width:t.spacing(D[n]),height:t.spacing(D[n]),...t.typography.subtitle1,...n==="large"&&{...t.typography.h6},...n==="small"&&{...t.typography.caption,fontWeight:500},...n==="xsmall"&&{...t.typography.caption,fontWeight:500,svg:{width:c.ICON_SIZE_SMALL,height:c.ICON_SIZE_SMALL}}}));function wt(t){return e.jsx(Lt,{...t})}const Pt=o.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",height:c.APPBAR_SIZE,marginRight:t.spacing(1.5)})),kt=o.styled(o.IconButton)(({theme:t})=>({marginRight:t.spacing(1),"&.MuiButtonBase-root svg path":{fill:t.palette.brand.appBarContrastText}})),Et=o.styled(o.Divider)(({theme:t})=>({borderColor:o.alpha(t.palette.brand.appBarContrastText,.12)}));function Rt({onClickMenu:t}){return e.jsx(o.Box,{sx:{display:{md:"none",xs:"block"}},children:e.jsxs(Pt,{children:[e.jsx(kt,{onClick:t,children:e.jsx(C.MenuOutlined,{})}),e.jsx(Et,{orientation:"vertical",flexItem:!0})]})})}const Ot=o.styled("div")(({theme:t})=>({display:"flex",marginRight:t.spacing(1.5),"& a":{display:"flex"},"& svg, & img":{width:t.spacing(4),height:t.spacing(4)}}));function Dt({logo:t}){return e.jsx(Ot,{children:t})}const $t=L.styled(c.Typography)({display:"flex",alignItems:"center",whiteSpace:"nowrap"});function _t({text:t}){const n=L.useTheme();return e.jsx($t,{component:"span",variant:"subtitle1",color:n.palette.brand.appBarContrastText,children:t})}const Gt=L.styled(c.Typography)(({theme:t})=>({display:"flex",alignItems:"center","&::before":{content:'"/"',margin:t.spacing(0,1),opacity:.6,color:t.palette.brand.appBarContrastText}}));function qt({text:t}){const n=L.useTheme();return e.jsx(Gt,{component:"span",variant:"body2",weight:"strong",color:n.palette.brand.appBarContrastText,children:t})}const Ht=o.styled(o.AppBar)(({theme:t})=>({backgroundColor:t.palette.brand.appBarMain,"& .MuiTypography-root":{color:t.palette.brand.appBarContrastText},"& .MuiIconButton-root path":{fill:t.palette.brand.appBarContrastText}})),Ut=o.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",maxWidth:"calc(100% - 300px)",overflow:"hidden",[t.breakpoints.down("sm")]:{minWidth:"192px"}})),Wt=o.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",flex:1,marginLeft:t.spacing(1)}));function Vt({children:t,brandLogo:n,brandText:r,secondaryText:i,showBurgerMenu:a=!1,onClickMenu:l,...s}){return e.jsx(Ht,{...s,children:e.jsxs(o.Toolbar,{children:[e.jsxs(Ut,{children:[a&&e.jsx(Rt,{onClickMenu:l}),n&&e.jsx(Dt,{logo:n}),r&&e.jsx(_t,{text:r}),i&&e.jsx(qt,{text:i})]}),e.jsx(Wt,{children:t})]})})}const Nt=[{outlinedBullet:!1,value:""}],Zt=o.styled("ul")(({theme:t})=>({listStyle:"none",paddingLeft:0,margin:t.spacing(.5,0,0,0)})),zt=o.styled("li")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between","&:not(:last-child)":{marginBottom:t.spacing(.5)}})),Yt=o.styled("span")(({theme:t})=>({width:t.spacing(1),height:t.spacing(1),marginRight:t.spacing(.5),border:`2px solid ${t.palette.qualitative.bold[1]}`,borderRadius:"50%",backgroundColor:t.palette.qualitative.bold[1]})),Jt=o.styled(c.Typography)(({theme:t})=>({minWidth:t.spacing(10),marginRight:t.spacing(1.5)}));function Kt({items:t=Nt,title:n}){return e.jsxs(e.Fragment,{children:[n&&e.jsx(c.Typography,{color:"inherit",variant:"caption",weight:"medium",children:n}),e.jsx(Zt,{children:t.map((r,i)=>e.jsxs(zt,{children:[e.jsx(Yt,{style:{backgroundColor:`${r.outlinedBullet?"transparent":r.color}`,borderColor:r.color}}),r.category&&e.jsx(Jt,{color:"inherit",variant:"caption",children:r.category}),e.jsx(c.Typography,{color:"inherit",variant:"caption",weight:"medium",children:r.value})]},i))})]})}exports.TablePaginationActions=c.TablePaginationActions;exports.Typography=c.Typography;exports.Alert=U.Alert;exports.AccordionGroup=Tt;exports.AppBar=Vt;exports.Autocomplete=Ft;exports.Avatar=wt;exports.Button=V;exports.LabelWithIndicator=Y;exports.Menu=it;exports.MenuItem=E;exports.MenuList=st;exports.MultipleSelectField=ht;exports.PasswordField=K;exports.SelectField=$;exports.ToggleButtonGroup=ot;exports.TooltipData=Kt;exports.UploadField=It;exports.UploadFieldBase=_;
@@ -1,12 +1,12 @@
1
1
  import { jsx as o, jsxs as y, Fragment as _ } from "react/jsx-runtime";
2
2
  import { Button as N, styled as c, Box as P, TextField as Y, InputAdornment as H, IconButton as L, Select as it, MenuItem as V, FormControl as at, InputLabel as lt, FormHelperText as st, ToggleButtonGroup as ct, Menu as dt, MenuList as ut, Link as pt, Checkbox as Z, ListItemText as J, Tooltip as gt, CircularProgress as ft, Accordion as mt, AccordionSummary as ht, AccordionDetails as Mt, createFilterOptions as yt, Autocomplete as bt, Divider as G, ListItemIcon as q, Avatar as vt, alpha as xt, AppBar as It, Toolbar as Bt } from "@mui/material";
3
3
  import { forwardRef as $, useState as k, useEffect as K, useMemo as Q, useRef as Tt, Fragment as At } from "react";
4
- import { T as S, c as w, u as R, A as St } from "../TablePaginationActions-OJyfVTms.js";
5
- import { a as Je } from "../TablePaginationActions-OJyfVTms.js";
4
+ import { T as S, c as w, u as R, A as St } from "../TablePaginationActions-C9YCSB32.js";
5
+ import { a as Je } from "../TablePaginationActions-C9YCSB32.js";
6
6
  import { VisibilityOutlined as Ct, VisibilityOffOutlined as Ft, Cancel as X, AddCircleOutlineOutlined as wt, MenuOutlined as Pt } from "@mui/icons-material";
7
7
  import { useIntl as O } from "react-intl";
8
8
  import { styled as W, useTheme as tt } from "@mui/material/styles";
9
- import { A as Qe } from "../Alert-_PI5QbXW.js";
9
+ import { A as Qe } from "../Alert-CU0-7Oca.js";
10
10
  function Lt({ children: t, ...e }, n) {
11
11
  return /* @__PURE__ */ o(N, { ...e, ref: n, children: /* @__PURE__ */ o(S, { variant: "inherit", color: "inherit", noWrap: !0, component: "span", children: t }) });
12
12
  }