@carto/meridian-ds 1.4.1-alpha-menu-tests.1 → 1.4.2-alpha-forwarding-props.1

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 (33) hide show
  1. package/CHANGELOG.md +6 -2
  2. package/dist/{Alert-Cn0nq6aq.js → Alert-1b84B18a.js} +1 -1
  3. package/dist/{Alert-B2JgFj6Y.cjs → Alert-BbMbtaix.cjs} +1 -1
  4. package/dist/{TablePaginationActions-EC4ynZRa.js → TablePaginationActions-EDxBCxpG.js} +1 -0
  5. package/dist/TablePaginationActions-V8ultBUz.cjs +9 -0
  6. package/dist/components/index.cjs +1 -1
  7. package/dist/components/index.js +879 -836
  8. package/dist/theme/index.cjs +1 -1
  9. package/dist/theme/index.js +2 -2
  10. package/dist/types/components/atoms/Button.d.ts.map +1 -1
  11. package/dist/types/components/atoms/IconButton.d.ts.map +1 -1
  12. package/dist/types/components/atoms/Typography.d.ts.map +1 -1
  13. package/dist/types/components/organisms/DatePickers/DatePicker.d.ts +1 -1
  14. package/dist/types/components/organisms/DatePickers/DatePicker.d.ts.map +1 -1
  15. package/dist/types/components/organisms/DatePickers/DateRangePicker.d.ts +1 -1
  16. package/dist/types/components/organisms/DatePickers/DateRangePicker.d.ts.map +1 -1
  17. package/dist/types/components/organisms/DatePickers/DateTimePicker.d.ts +1 -1
  18. package/dist/types/components/organisms/DatePickers/DateTimePicker.d.ts.map +1 -1
  19. package/dist/types/components/organisms/DatePickers/PickersDay.d.ts.map +1 -1
  20. package/dist/types/components/organisms/DatePickers/TimePicker.d.ts +1 -1
  21. package/dist/types/components/organisms/DatePickers/TimePicker.d.ts.map +1 -1
  22. package/dist/types/components/organisms/DatePickers/types.d.ts +2 -0
  23. package/dist/types/components/organisms/DatePickers/types.d.ts.map +1 -1
  24. package/dist/types/components/organisms/Dialog/Dialog.d.ts +1 -1
  25. package/dist/types/components/organisms/Dialog/Dialog.d.ts.map +1 -1
  26. package/dist/types/components/organisms/Dialog/DialogConfirmation.d.ts.map +1 -1
  27. package/dist/types/components/organisms/Dialog/DialogContent.d.ts.map +1 -1
  28. package/dist/types/components/organisms/Dialog/DialogFooter.d.ts.map +1 -1
  29. package/dist/types/components/organisms/Dialog/DialogHeader.d.ts.map +1 -1
  30. package/dist/widgets/index.cjs +1 -1
  31. package/dist/widgets/index.js +2 -2
  32. package/package.json +1 -1
  33. package/dist/TablePaginationActions-7wkkiCXh.cjs +0 -9
package/CHANGELOG.md CHANGED
@@ -2,13 +2,17 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - Refactor forwading prop tests in all files to use reusable helper [#165](https://github.com/CartoDB/meridian-ds/pull/165)
5
6
  - Add unit tests for Menu components [#158](https://github.com/CartoDB/meridian-ds/pull/158)
7
+
8
+ ## 1.0
9
+
10
+ ### 1.4.2
11
+
6
12
  - Pass `reason` parameter to the **CreatableAutocomplete** `onChange` callback [#160](https://github.com/CartoDB/meridian-ds/pull/160)
7
13
  - Use values passed through `startProps` or `endProps` to `DateRangePicker` for being used afterward with `PickersDay` [#159](https://github.com/CartoDB/meridian-ds/pull/159/)
8
14
  - Add unit tests for Autocomplete components [#136](https://github.com/CartoDB/meridian-ds/pull/136)
9
15
 
10
- ## 1.0
11
-
12
16
  ### 1.4.1
13
17
 
14
18
  - Fix issue with `peerDependencies` not including `@mui/x-date-pickers` [#147](https://github.com/CartoDB/meridian-ds/pull/147)
@@ -1,5 +1,5 @@
1
1
  import { jsx as l, jsxs as x } from "react/jsx-runtime";
2
- import { b as c, T } from "./TablePaginationActions-EC4ynZRa.js";
2
+ import { b as c, T } from "./TablePaginationActions-EDxBCxpG.js";
3
3
  import { styled as M, Alert as v, Fade as b, AlertTitle as I } from "@mui/material";
4
4
  import { forwardRef as $, useState as k } from "react";
5
5
  const S = M(v, {
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("react/jsx-runtime"),c=require("./TablePaginationActions-7wkkiCXh.cjs"),l=require("@mui/material"),g=require("react"),T=l.styled(l.Alert,{shouldForwardProp:r=>!["isNeutral","content","hasCloseButton","hasAction","hasTitle","isSticky"].includes(r)})(({isNeutral:r,content:n,hasCloseButton:a,hasAction:e,hasTitle:t,isSticky:s,theme:i})=>({columnGap:i.spacing(1),minHeight:i.spacing(6),...e&&{display:"grid",gridTemplateAreas:n==="inline"||a?'"icon message actions"':`
1
+ "use strict";const o=require("react/jsx-runtime"),c=require("./TablePaginationActions-V8ultBUz.cjs"),l=require("@mui/material"),g=require("react"),T=l.styled(l.Alert,{shouldForwardProp:r=>!["isNeutral","content","hasCloseButton","hasAction","hasTitle","isSticky"].includes(r)})(({isNeutral:r,content:n,hasCloseButton:a,hasAction:e,hasTitle:t,isSticky:s,theme:i})=>({columnGap:i.spacing(1),minHeight:i.spacing(6),...e&&{display:"grid",gridTemplateAreas:n==="inline"||a?'"icon message actions"':`
2
2
  "icon message"
3
3
  "icon actions"
4
4
  `,gridTemplateColumns:a?`${c.ICON_SIZE_MEDIUM} 1fr ${i.spacing(3)}`:`${c.ICON_SIZE_MEDIUM}`},...r&&{backgroundColor:i.palette.default.background,color:i.palette.text.primary},...s&&{borderRadius:0},".MuiAlert-message":{flex:1,paddingTop:t?i.spacing(.25):i.spacing(.5),"& a":{color:i.palette.primary.main,textDecoration:"none","&:hover":{textDecoration:"underline"}},...e&&{gridArea:"message"},...r&&{"& :not(.MuiAlertTitle-root)":{color:i.palette.text.secondary},a:{color:`${i.palette.primary.main} !important`}}},".MuiAlert-icon":{height:t?i.spacing(2.5):i.spacing(3),marginRight:0,...e&&{gridArea:"icon"},...r&&{color:i.palette.text.primary}},".MuiAlert-action":{alignItems:n==="inline"&&!a?"center":"flex-start",margin:n==="block"&&!a?i.spacing(1.5,0,.5):0,marginLeft:n==="inline"||a?"auto":0,padding:0,...e&&{gridArea:"actions"},".MuiIconButton-root svg path":{fill:a?i.palette.text.secondary:void 0}}}));function v({title:r,action:n,severity:a="neutral",content:e="inline",variant:t="standard",children:s,onClose:i,open:p,isSticky:u,...A},x){const[f,y]=g.useState(p??!0),m=i?I=>{i(I),y(!1)}:void 0,d=a==="neutral",M=p??f;return o.jsx(l.Fade,{in:M,appear:!1,children:o.jsxs(T,{ref:x,severity:d?"info":a,isNeutral:d,content:e,action:n,onClose:m,hasCloseButton:!!i,hasAction:!!n,hasTitle:!!r,isSticky:u,variant:t,...A,children:[r&&o.jsx(l.AlertTitle,{children:r}),o.jsx(c.Typography,{variant:"caption",color:"inherit",component:"div",children:s})]})})}const b=g.forwardRef(v);exports.Alert=b;
@@ -555,6 +555,7 @@ function tn({ italic: e, weight: i, style: a, children: n, ...d }, r) {
555
555
  ...s,
556
556
  ...a
557
557
  },
558
+ "data-name": "typography",
558
559
  children: n
559
560
  }
560
561
  );
@@ -0,0 +1,9 @@
1
+ "use strict";const he=require("react-is"),O=require("react/jsx-runtime"),k=require("@mui/material"),De=require("react"),oe=require("@mui/icons-material"),te=require("react-intl");function ve(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var re={exports:{}};/*
2
+ object-assign
3
+ (c) Sindre Sorhus
4
+ @license MIT
5
+ */var W,ce;function qe(){if(ce)return W;ce=1;var e=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function n(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function d(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var u=Object.getOwnPropertyNames(s).map(function(l){return s[l]});if(u.join("")!=="0123456789")return!1;var y={};return"abcdefghijklmnopqrst".split("").forEach(function(l){y[l]=l}),Object.keys(Object.assign({},y)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return W=d()?Object.assign:function(r,s){for(var o,u=n(r),y,l=1;l<arguments.length;l++){o=Object(arguments[l]);for(var S in o)i.call(o,S)&&(u[S]=o[S]);if(e){y=e(o);for(var M=0;M<y.length;M++)a.call(o,y[M])&&(u[y[M]]=o[y[M]])}}return u},W}var Z,ue;function ie(){if(ue)return Z;ue=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Z=e,Z}var Y,_e;function Se(){return _e||(_e=1,Y=Function.call.bind(Object.prototype.hasOwnProperty)),Y}var J,le;function xe(){if(le)return J;le=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var i=ie(),a={},n=Se();e=function(r){var s="Warning: "+r;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function d(r,s,o,u,y){if(process.env.NODE_ENV!=="production"){for(var l in r)if(n(r,l)){var S;try{if(typeof r[l]!="function"){var M=Error((u||"React class")+": "+o+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw M.name="Invariant Violation",M}S=r[l](s,l,u,o,null,i)}catch(P){S=P}if(S&&!(S instanceof Error)&&e((u||"React class")+": type specification of "+o+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof S+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),S instanceof Error&&!(S.message in a)){a[S.message]=!0;var C=y?y():"";e("Failed "+o+" type: "+S.message+(C??""))}}}}return d.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(a={})},J=d,J}var $,ye;function Ue(){if(ye)return $;ye=1;var e=he,i=qe(),a=ie(),n=Se(),d=xe(),r=function(){};process.env.NODE_ENV!=="production"&&(r=function(o){var u="Warning: "+o;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function s(){return null}return $=function(o,u){var y=typeof Symbol=="function"&&Symbol.iterator,l="@@iterator";function S(t){var c=t&&(y&&t[y]||t[l]);if(typeof c=="function")return c}var M="<<anonymous>>",C={array:A("array"),bigint:A("bigint"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:G(),arrayOf:R,element:q(),elementType:z(),instanceOf:F,node:Oe(),objectOf:Ie,oneOf:Ae,oneOfType:Pe,shape:Re,exact:Be};function P(t,c){return t===c?t!==0||1/t===1/c:t!==t&&c!==c}function E(t,c){this.message=t,this.data=c&&typeof c=="object"?c:{},this.stack=""}E.prototype=Error.prototype;function L(t){if(process.env.NODE_ENV!=="production")var c={},g=0;function f(m,p,w,h,T,v,I){if(h=h||M,v=v||w,I!==a){if(u){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var N=h+":"+w;!c[N]&&g<3&&(r("You are manually calling a React.PropTypes validation function for the `"+v+"` prop on `"+h+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),c[N]=!0,g++)}}return p[w]==null?m?p[w]===null?new E("The "+T+" `"+v+"` is marked as required "+("in `"+h+"`, but its value is `null`.")):new E("The "+T+" `"+v+"` is marked as required in "+("`"+h+"`, but its value is `undefined`.")):null:t(p,w,h,T,v)}var _=f.bind(null,!1);return _.isRequired=f.bind(null,!0),_}function A(t){function c(g,f,_,m,p,w){var h=g[f],T=B(h);if(T!==t){var v=x(h);return new E("Invalid "+m+" `"+p+"` of type "+("`"+v+"` supplied to `"+_+"`, expected ")+("`"+t+"`."),{expectedType:t})}return null}return L(c)}function G(){return L(s)}function R(t){function c(g,f,_,m,p){if(typeof t!="function")return new E("Property `"+p+"` of component `"+_+"` has invalid PropType notation inside arrayOf.");var w=g[f];if(!Array.isArray(w)){var h=B(w);return new E("Invalid "+m+" `"+p+"` of type "+("`"+h+"` supplied to `"+_+"`, expected an array."))}for(var T=0;T<w.length;T++){var v=t(w,T,_,m,p+"["+T+"]",a);if(v instanceof Error)return v}return null}return L(c)}function q(){function t(c,g,f,_,m){var p=c[g];if(!o(p)){var w=B(p);return new E("Invalid "+_+" `"+m+"` of type "+("`"+w+"` supplied to `"+f+"`, expected a single ReactElement."))}return null}return L(t)}function z(){function t(c,g,f,_,m){var p=c[g];if(!e.isValidElementType(p)){var w=B(p);return new E("Invalid "+_+" `"+m+"` of type "+("`"+w+"` supplied to `"+f+"`, expected a single ReactElement type."))}return null}return L(t)}function F(t){function c(g,f,_,m,p){if(!(g[f]instanceof t)){var w=t.name||M,h=Ne(g[f]);return new E("Invalid "+m+" `"+p+"` of type "+("`"+h+"` supplied to `"+_+"`, expected ")+("instance of `"+w+"`."))}return null}return L(c)}function Ae(t){if(!Array.isArray(t))return process.env.NODE_ENV!=="production"&&(arguments.length>1?r("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):r("Invalid argument supplied to oneOf, expected an array.")),s;function c(g,f,_,m,p){for(var w=g[f],h=0;h<t.length;h++)if(P(w,t[h]))return null;var T=JSON.stringify(t,function(I,b){var N=x(b);return N==="symbol"?String(b):b});return new E("Invalid "+m+" `"+p+"` of value `"+String(w)+"` "+("supplied to `"+_+"`, expected one of "+T+"."))}return L(c)}function Ie(t){function c(g,f,_,m,p){if(typeof t!="function")return new E("Property `"+p+"` of component `"+_+"` has invalid PropType notation inside objectOf.");var w=g[f],h=B(w);if(h!=="object")return new E("Invalid "+m+" `"+p+"` of type "+("`"+h+"` supplied to `"+_+"`, expected an object."));for(var T in w)if(n(w,T)){var v=t(w,T,_,m,p+"."+T,a);if(v instanceof Error)return v}return null}return L(c)}function Pe(t){if(!Array.isArray(t))return process.env.NODE_ENV!=="production"&&r("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var c=0;c<t.length;c++){var g=t[c];if(typeof g!="function")return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ge(g)+" at index "+c+"."),s}function f(_,m,p,w,h){for(var T=[],v=0;v<t.length;v++){var I=t[v],b=I(_,m,p,w,h,a);if(b==null)return null;b.data&&n(b.data,"expectedType")&&T.push(b.data.expectedType)}var N=T.length>0?", expected one of type ["+T.join(", ")+"]":"";return new E("Invalid "+w+" `"+h+"` supplied to "+("`"+p+"`"+N+"."))}return L(f)}function Oe(){function t(c,g,f,_,m){return K(c[g])?null:new E("Invalid "+_+" `"+m+"` supplied to "+("`"+f+"`, expected a ReactNode."))}return L(t)}function de(t,c,g,f,_){return new E((t||"React class")+": "+c+" type `"+g+"."+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+_+"`.")}function Re(t){function c(g,f,_,m,p){var w=g[f],h=B(w);if(h!=="object")return new E("Invalid "+m+" `"+p+"` of type `"+h+"` "+("supplied to `"+_+"`, expected `object`."));for(var T in t){var v=t[T];if(typeof v!="function")return de(_,m,p,T,x(v));var I=v(w,T,_,m,p+"."+T,a);if(I)return I}return null}return L(c)}function Be(t){function c(g,f,_,m,p){var w=g[f],h=B(w);if(h!=="object")return new E("Invalid "+m+" `"+p+"` of type `"+h+"` "+("supplied to `"+_+"`, expected `object`."));var T=i({},g[f],t);for(var v in T){var I=t[v];if(n(t,v)&&typeof I!="function")return de(_,m,p,v,x(I));if(!I)return new E("Invalid "+m+" `"+p+"` key `"+v+"` supplied to `"+_+"`.\nBad object: "+JSON.stringify(g[f],null," ")+`
6
+ Valid keys: `+JSON.stringify(Object.keys(t),null," "));var b=I(w,v,_,m,p+"."+v,a);if(b)return b}return null}return L(c)}function K(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(K);if(t===null||o(t))return!0;var c=S(t);if(c){var g=c.call(t),f;if(c!==t.entries){for(;!(f=g.next()).done;)if(!K(f.value))return!1}else for(;!(f=g.next()).done;){var _=f.value;if(_&&!K(_[1]))return!1}}else return!1;return!0;default:return!1}}function ke(t,c){return t==="symbol"?!0:c?c["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&c instanceof Symbol:!1}function B(t){var c=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":ke(c,t)?"symbol":c}function x(t){if(typeof t>"u"||t===null)return""+t;var c=B(t);if(c==="object"){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return c}function Ge(t){var c=x(t);switch(c){case"array":case"object":return"an "+c;case"boolean":case"date":case"regexp":return"a "+c;default:return c}}function Ne(t){return!t.constructor||!t.constructor.name?M:t.constructor.name}return C.checkPropTypes=d,C.resetWarningCache=d.resetWarningCache,C.PropTypes=C,C},$}var Q,pe;function He(){if(pe)return Q;pe=1;var e=ie();function i(){}function a(){}return a.resetWarningCache=i,Q=function(){function n(s,o,u,y,l,S){if(S!==e){var M=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw M.name="Invariant Violation",M}}n.isRequired=n;function d(){return n}var r={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:d,element:n,elementType:n,instanceOf:d,node:n,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d,checkPropTypes:a,resetWarningCache:i};return r.PropTypes=r,r},Q}if(process.env.NODE_ENV!=="production"){var Ke=he,je=!0;re.exports=Ue()(Ke.isElement,je)}else re.exports=He()();var Ve=re.exports;const U=ve(Ve),se=process.env.NODE_ENV!=="production"?U.oneOfType([U.number,U.string,U.object,U.array]):{};function ze(e,i,a=!0){if(e&&e.vars&&a){const n=`vars.${i}`.split(".").reduce((d,r)=>d&&d[r]?d[r]:null,e);if(n!=null)return n}return i.split(".").reduce((n,d)=>n&&n[d]!=null?n[d]:null,e)}const Te=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Me=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Fe=[...Te,...Me];function We(e,i,a,n){var d;const r=(d=ze(e,i,!1))!=null?d:a;return typeof r=="number"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${s}.`),r*s):Array.isArray(r)?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>r.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(r)}.`,`${s} > ${r.length-1}, you need to add the missing values.`].join(`
7
+ `)):console.error([`MUI: The \`theme.${i}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${i}\` as a number.`].join(`
8
+ `))),r[s]):typeof r=="function"?r:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${i}\` value (${r}) is invalid.`,"It should be a number, an array or a function."].join(`
9
+ `)),()=>{})}function Ze(e){return We(e,"spacing",8,"spacing")}process.env.NODE_ENV!=="production"&&Te.reduce((e,i)=>(e[i]=se,e),{});process.env.NODE_ENV!=="production"&&Me.reduce((e,i)=>(e[i]=se,e),{});process.env.NODE_ENV!=="production"&&Fe.reduce((e,i)=>(e[i]=se,e),{});function Ye(e=8){if(e.mui)return e;const i=Ze({spacing:e}),a=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(r=>{const s=i(r);return typeof s=="number"?`${s}px`:s}).join(" "));return a.mui=!0,a}const Ee=8,Je={XS:320,SM:600,MD:960,LG:1280,XL:1600},H=Ye(Ee),$e=H(1.5),Qe=H(2.25),Xe=H(3),en=H(6),nn=6e3,rn={regular:400,medium:500,strong:600};function an({italic:e,weight:i,style:a,children:n,...d},r){const s={fontWeight:rn[i],fontStyle:e?"italic":void 0};return O.jsx(k.Typography,{...d,ref:r,style:{...s,...a},"data-name":"typography",children:n})}const tn=De.forwardRef(an),sn={c4r:{button:{cancel:"Cancel",leave:"Leave",close:"Close"},form:{selectAll:"Select all",selectNone:"None",allSelected:"All selected",noneSelected:"None selected",selected:"selected",add:"Add",filesSelected:"{count, plural, one{# file} other{# files}} selected",dragPlaceholder:"Drag and drop your {count, plural, one{file} other{files}} or click to browse",dragActivePlaceholder:"Drop your {count, plural, one{file} other{files}} here...",pagination:{noMorePages:"No more pages",prevPage:"Previous page",nextPage:"Next page"},startDate:"Start date",endDate:"End date",showPassword:"Show password",hidePassword:"Hide password",clearSelection:"Clear selection",chooseDate:"Choose date",startDateCalendar:"Start date calendar",endDateCalendar:"End date calendar",time:"Time"},dialog:{confirmation:{title:"Are you sure you want to leave?",content:"The changes you made will not be saved."}},widgets:{category:{apply:"Apply",unlock:"Unlock",lock:"Lock",clear:"Clear",noResults:"No results",noResultsMessage:`Your search "{searchValue}" didn't match with any value.`,cancel:"Cancel",searchInfo:"Search in {elements} elements",selectedItems:"{items, plural, one{# selected} other{# selected}}",all:"All",search:"Search"},bar:{all:"All",selectedItems:"{items, plural, one{# selected} other{# selected}}",clear:"Clear"},histogram:{all:"All",selectedItems:"{items} selected",clear:"Clear"},legend:{layerOptions:"Layer options",hide:"Hide",show:"Show",layer:"layer",opacity:"Opacity",hideLayer:"Hide layer",showLayer:"Show layer",open:"Open legend",close:"Close",collapse:"Collapse layer",expand:"Expand layer",zoomLevel:"Zoom level",zoomLevelTooltip:"This layer is only visible at certain zoom levels",lowerThan:"lower than",greaterThan:"greater than",and:"and",zoomNote:"Note: this layer will display at zoom levels",notSupported:"is not a known legend type",subtitles:{proportion:"Radius range by",icon:"Icon based on",strokeColor:"Stroke color based on",color:"Color based on"},max:"Max",min:"Min",maxCategories:"Legend limited to {n} categories"},range:{clear:"Clear",minLimit:"min limit",maxLimit:"max limit",minValue:"min value",maxValue:"max value"},table:{rowsPerPage:"Rows per page",of:"{from}–{to} of {count}",moreThan:"more than"},timeSeries:{speed:"Speed",clear:"Clear"},featureSelection:{drawPolygonMode:"Polygon",drawRectangleMode:"Rectangle",drawPolygonByDraggingMode:"Lasso tool",drawCircleFromCenterMode:"Circle",edit:"Edit mask",clickToEdit:"Click on the mask to edit it",clickToCreate:"Click on the map to create a mask",selectTool:"Select a {label}",selectMode:"Select a mode",chooseSelectionMode:"Choose a selection mode",applyMask:"Apply mask",clearMask:"Clear mask",remove:"Remove",polygon:"Polygon",point:"Point",lineString:"Line",invalid:"Invalid geometry"},pie:{clear:"Clear",selectedItems:"{items, plural, one{# selected} other{# selected}}",allSelected:"All"},chartLegend:{next:"Next page",prev:"Previous page"}}}},dn={c4r:{button:{cancel:"Cancelar",leave:"Salir",close:"Cerrar"},form:{selectAll:"Seleccionar todos",selectNone:"Ninguno",allSelected:"Todos seleccionados",noneSelected:"Ninguno seleccionado",selected:"seleccionado",add:"Añadir",filesSelected:"{count, plural, one{# archivo} other{# archivos}} seleccionados",dragPlaceholder:"Arrastra y suelta {count, plural, one{tu archivo} other{tus archivos}} o pulsa para seleccionar",dragActivePlaceholder:"Suelta {count, plural, one{tu archivo} other{tus archivos}} aqui...",pagination:{noMorePages:"No más páginas",prevPage:"Página anterior",nextPage:"Página siguiente"},startDate:"Fecha de inicio",endDate:"Fecha de fin",showPassword:"Mostrar contraseña",hidePassword:"Ocultar contraseña",clearSelection:"Limpiar selección",chooseDate:"Elegir fecha",startDateCalendar:"Calendario de fecha de inicio",endDateCalendar:"Calendario de fecha de fin",time:"Hora"},dialog:{confirmation:{title:"¿Estás seguro de que quieres salir?",content:"Los cambios que has hecho no se guardarán."}},widgets:{category:{apply:"Aplicar",unlock:"Desbloquear",lock:"Bloquear",clear:"Limpiar",noResults:"Sin resultados",noResultsMessage:'Su búsqueda "{searchValue}" no coincide con ningún valor.',cancel:"Cancelar",searchInfo:"Buscar en {elements} elementos",selectedItems:"{items, plural, one {# seleccionado} other {# seleccionados}}",all:"Todos",search:"Buscar"},bar:{all:"Todos",selectedItems:"{items, plural, one {# seleccionado} other {# seleccionados}}",clear:"Limpiar"},histogram:{all:"Todos",selectedItems:"{items} seleccionados",clear:"Limpiar"},legend:{layerOptions:"Opciones de capa",hide:"Ocultar",show:"Mostrar",layer:"capa",opacity:"Opacidad",hideLayer:"Ocultar capa",showLayer:"Mostrar capa",open:"Abrir leyenda",close:"Cerrar",collapse:"Colapsar capa",expand:"Expandir capa",zoomLevel:"Nivel de zoom",zoomLevelTooltip:"Esta capa solo es visible a ciertos niveles de zoom",lowerThan:"menor que",greaterThan:"mayor que",and:"y",zoomNote:"Nota: esta capa se mostrará a un nivel de zoom",notSupported:"no es un tipo de leyenda conocido",subtitles:{proportion:"Tamaño basado en",icon:"Icono basado en",strokeColor:"Color del borde basado en",color:"Color basado en"},max:"Max",min:"Min"},range:{clear:"Limpiar",minLimit:"Límite mínimo",maxLimit:"Límite máximo",minValue:"Valor mínimo",maxValue:"Valor máximo"},table:{rowsPerPage:"Filas por página",of:"{from}–{to} de {count}",moreThan:"más de"},timeSeries:{speed:"Velocidad",clear:"Limpiar"},featureSelection:{drawPolygonMode:"Polígono",drawRectangleMode:"Rectángulo",drawPolygonByDraggingMode:"Herramienta Lazo",drawCircleFromCenterMode:"Círculo",edit:"Editar máscara",clickToEdit:"Haga clic en la máscara para editarla",clickToCreate:"Haga clic en el mapa para crear una máscara",selectTool:"Seleccionar un {label}",selectMode:"Seleccionar un modo",chooseSelectionMode:"Elegir un modo de selección",applyMask:"Aplicar máscara",clearMask:"Limpiar máscara",remove:"Eliminar",polygon:"Polígono",point:"Punto",lineString:"Línea"},pie:{clear:"Limpiar",selectedItems:"{items, plural, one {# seleccionado} other {# seleccionados}}",allSelected:"Todos seleccionados"},chartLegend:{next:"Página siguiente",prev:"Página anterior"}}}},on={c4r:{button:{cancel:"Batal",leave:"Keluar",close:"Tutup"},form:{selectAll:"Select all",selectNone:"None",allSelected:"All selected",noneSelected:"None selected",selected:"selected",add:"Add",filesSelected:"{count, plural, one{# file} other{# files}} selected",dragPlaceholder:"Drag and drop your {count, plural, one{file} other{files}} or click to browse",dragActivePlaceholder:"Drop your {count, plural, one{file} other{files}} here...",pagination:{noMorePages:"No more pages",prevPage:"Previous page",nextPage:"Next page"},startDate:"Start date",endDate:"End date",showPassword:"Show password",hidePassword:"Hide password",clearSelection:"Clear selection",chooseDate:"Choose date",startDateCalendar:"Start date calendar",endDateCalendar:"End date calendar",time:"Time"},dialog:{confirmation:{title:"Are you sure you want to leave?",content:"The changes you made will not be saved."}},widgets:{category:{apply:"Terapkan",unlock:"Buka kunci",lock:"Kunci",clear:"Bersihkan",noResults:"Tidak ada hasil",noResultsMessage:"Pencarian Anda {searchValue} tidak cocok dengan nilai apa pun.",cancel:"Batal",searchInfo:"Cari dalam {elements} elemen",selectedItems:"{items, plural, one{# terpilih} other{# terpilih}}",all:"Semua",search:"Cari"},bar:{all:"Semua",selectedItems:"{items, plural, one{# terpilih} other{# terpilih}}",clear:"Bersihkan"},histogram:{all:"Semua",selectedItems:"{items} terpilih",clear:"Bersihkan"},legend:{layerOptions:"Opsi Layer",hide:"Sembunyikan",show:"Tampilkan",layer:"layer",opacity:"Opasitas",hideLayer:"Sembunyikan layer",showLayer:"Tampilkan layer",open:"Buka legenda",close:"Tutup",collapse:"Ciutkan layer",expand:"Perluas layer",zoomLevel:"Tingkat Zoom",zoomLevelTooltip:"Layer ini hanya terlihat pada tingkat zoom tertentu",lowerThan:"lebih rendah dari",greaterThan:"lebih tinggi dari",and:"dan",zoomNote:"Catatan: layer ini akan ditampilkan pada tingkat zoom",notSupported:"bukan jenis legenda yang dikenal",subtitles:{proportion:"Rentang radius berdasarkan",icon:"Ikon berdasarkan",strokeColor:"Warna garis berdasarkan",color:"Warna berdasarkan"},max:"Maks",min:"Min",maxCategories:"Legenda terbatas pada {n} kategori"},range:{clear:"Bersihkan",minLimit:"batas minimum",maxLimit:"batas maksimum",minValue:"nilai minimum",maxValue:"nilai maksimum"},table:{rowsPerPage:"Baris per halaman",of:"{from}–{to} dari {count}",moreThan:"lebih dari"},timeSeries:{speed:"Kecepatan",clear:"Bersihkan"},featureSelection:{drawPolygonMode:"Poligon",drawRectangleMode:"Persegi panjang",drawPolygonByDraggingMode:"Alat lasso",drawCircleFromCenterMode:"Lingkaran",edit:"Edit masker",clickToEdit:"Klik pada masker untuk mengeditnya",clickToCreate:"Klik pada peta untuk membuat masker",selectTool:"Pilih {label}",selectMode:"Pilih mode",chooseSelectionMode:"Pilih mode seleksi",applyMask:"Terapkan masker",clearMask:"Bersihkan masker",remove:"Hapus",polygon:"Poligon",point:"Titik",lineString:"Garis",invalid:"Geometri tidak valid"},pie:{clear:"Bersihkan",selectedItems:"{items, plural, one{# terpilih} other{# terpilih}}",allSelected:"Semua terpilih"},chartLegend:{next:"Next page",prev:"Previous page"}}}},fe={en:sn,es:dn,id:on};function cn(e){return Intl.getCanonicalLocales(e)}function V(e,i,a){if(a||arguments.length===2)for(var n=0,d=i.length,r;n<d;n++)(r||!(n in i))&&(r||(r=Array.prototype.slice.call(i,0,n)),r[n]=i[n]);return e.concat(r||Array.prototype.slice.call(i))}var X={supplemental:{languageMatching:{"written-new":[{paradigmLocales:{_locales:"en en_GB es es_419 pt_BR pt_PT"}},{$enUS:{_value:"AS+CA+GU+MH+MP+PH+PR+UM+US+VI"}},{$cnsar:{_value:"HK+MO"}},{$americas:{_value:"019"}},{$maghreb:{_value:"MA+DZ+TN+LY+MR+EH"}},{no:{_desired:"nb",_distance:"1"}},{bs:{_desired:"hr",_distance:"4"}},{bs:{_desired:"sh",_distance:"4"}},{hr:{_desired:"sh",_distance:"4"}},{sr:{_desired:"sh",_distance:"4"}},{aa:{_desired:"ssy",_distance:"4"}},{de:{_desired:"gsw",_distance:"4",_oneway:"true"}},{de:{_desired:"lb",_distance:"4",_oneway:"true"}},{no:{_desired:"da",_distance:"8"}},{nb:{_desired:"da",_distance:"8"}},{ru:{_desired:"ab",_distance:"30",_oneway:"true"}},{en:{_desired:"ach",_distance:"30",_oneway:"true"}},{nl:{_desired:"af",_distance:"20",_oneway:"true"}},{en:{_desired:"ak",_distance:"30",_oneway:"true"}},{en:{_desired:"am",_distance:"30",_oneway:"true"}},{es:{_desired:"ay",_distance:"20",_oneway:"true"}},{ru:{_desired:"az",_distance:"30",_oneway:"true"}},{ur:{_desired:"bal",_distance:"20",_oneway:"true"}},{ru:{_desired:"be",_distance:"20",_oneway:"true"}},{en:{_desired:"bem",_distance:"30",_oneway:"true"}},{hi:{_desired:"bh",_distance:"30",_oneway:"true"}},{en:{_desired:"bn",_distance:"30",_oneway:"true"}},{zh:{_desired:"bo",_distance:"20",_oneway:"true"}},{fr:{_desired:"br",_distance:"20",_oneway:"true"}},{es:{_desired:"ca",_distance:"20",_oneway:"true"}},{fil:{_desired:"ceb",_distance:"30",_oneway:"true"}},{en:{_desired:"chr",_distance:"20",_oneway:"true"}},{ar:{_desired:"ckb",_distance:"30",_oneway:"true"}},{fr:{_desired:"co",_distance:"20",_oneway:"true"}},{fr:{_desired:"crs",_distance:"20",_oneway:"true"}},{sk:{_desired:"cs",_distance:"20"}},{en:{_desired:"cy",_distance:"20",_oneway:"true"}},{en:{_desired:"ee",_distance:"30",_oneway:"true"}},{en:{_desired:"eo",_distance:"30",_oneway:"true"}},{es:{_desired:"eu",_distance:"20",_oneway:"true"}},{da:{_desired:"fo",_distance:"20",_oneway:"true"}},{nl:{_desired:"fy",_distance:"20",_oneway:"true"}},{en:{_desired:"ga",_distance:"20",_oneway:"true"}},{en:{_desired:"gaa",_distance:"30",_oneway:"true"}},{en:{_desired:"gd",_distance:"20",_oneway:"true"}},{es:{_desired:"gl",_distance:"20",_oneway:"true"}},{es:{_desired:"gn",_distance:"20",_oneway:"true"}},{hi:{_desired:"gu",_distance:"30",_oneway:"true"}},{en:{_desired:"ha",_distance:"30",_oneway:"true"}},{en:{_desired:"haw",_distance:"20",_oneway:"true"}},{fr:{_desired:"ht",_distance:"20",_oneway:"true"}},{ru:{_desired:"hy",_distance:"30",_oneway:"true"}},{en:{_desired:"ia",_distance:"30",_oneway:"true"}},{en:{_desired:"ig",_distance:"30",_oneway:"true"}},{en:{_desired:"is",_distance:"20",_oneway:"true"}},{id:{_desired:"jv",_distance:"20",_oneway:"true"}},{en:{_desired:"ka",_distance:"30",_oneway:"true"}},{fr:{_desired:"kg",_distance:"30",_oneway:"true"}},{ru:{_desired:"kk",_distance:"30",_oneway:"true"}},{en:{_desired:"km",_distance:"30",_oneway:"true"}},{en:{_desired:"kn",_distance:"30",_oneway:"true"}},{en:{_desired:"kri",_distance:"30",_oneway:"true"}},{tr:{_desired:"ku",_distance:"30",_oneway:"true"}},{ru:{_desired:"ky",_distance:"30",_oneway:"true"}},{it:{_desired:"la",_distance:"20",_oneway:"true"}},{en:{_desired:"lg",_distance:"30",_oneway:"true"}},{fr:{_desired:"ln",_distance:"30",_oneway:"true"}},{en:{_desired:"lo",_distance:"30",_oneway:"true"}},{en:{_desired:"loz",_distance:"30",_oneway:"true"}},{fr:{_desired:"lua",_distance:"30",_oneway:"true"}},{hi:{_desired:"mai",_distance:"20",_oneway:"true"}},{en:{_desired:"mfe",_distance:"30",_oneway:"true"}},{fr:{_desired:"mg",_distance:"30",_oneway:"true"}},{en:{_desired:"mi",_distance:"20",_oneway:"true"}},{en:{_desired:"ml",_distance:"30",_oneway:"true"}},{ru:{_desired:"mn",_distance:"30",_oneway:"true"}},{hi:{_desired:"mr",_distance:"30",_oneway:"true"}},{id:{_desired:"ms",_distance:"30",_oneway:"true"}},{en:{_desired:"mt",_distance:"30",_oneway:"true"}},{en:{_desired:"my",_distance:"30",_oneway:"true"}},{en:{_desired:"ne",_distance:"30",_oneway:"true"}},{nb:{_desired:"nn",_distance:"20"}},{no:{_desired:"nn",_distance:"20"}},{en:{_desired:"nso",_distance:"30",_oneway:"true"}},{en:{_desired:"ny",_distance:"30",_oneway:"true"}},{en:{_desired:"nyn",_distance:"30",_oneway:"true"}},{fr:{_desired:"oc",_distance:"20",_oneway:"true"}},{en:{_desired:"om",_distance:"30",_oneway:"true"}},{en:{_desired:"or",_distance:"30",_oneway:"true"}},{en:{_desired:"pa",_distance:"30",_oneway:"true"}},{en:{_desired:"pcm",_distance:"20",_oneway:"true"}},{en:{_desired:"ps",_distance:"30",_oneway:"true"}},{es:{_desired:"qu",_distance:"30",_oneway:"true"}},{de:{_desired:"rm",_distance:"20",_oneway:"true"}},{en:{_desired:"rn",_distance:"30",_oneway:"true"}},{fr:{_desired:"rw",_distance:"30",_oneway:"true"}},{hi:{_desired:"sa",_distance:"30",_oneway:"true"}},{en:{_desired:"sd",_distance:"30",_oneway:"true"}},{en:{_desired:"si",_distance:"30",_oneway:"true"}},{en:{_desired:"sn",_distance:"30",_oneway:"true"}},{en:{_desired:"so",_distance:"30",_oneway:"true"}},{en:{_desired:"sq",_distance:"30",_oneway:"true"}},{en:{_desired:"st",_distance:"30",_oneway:"true"}},{id:{_desired:"su",_distance:"20",_oneway:"true"}},{en:{_desired:"sw",_distance:"30",_oneway:"true"}},{en:{_desired:"ta",_distance:"30",_oneway:"true"}},{en:{_desired:"te",_distance:"30",_oneway:"true"}},{ru:{_desired:"tg",_distance:"30",_oneway:"true"}},{en:{_desired:"ti",_distance:"30",_oneway:"true"}},{ru:{_desired:"tk",_distance:"30",_oneway:"true"}},{en:{_desired:"tlh",_distance:"30",_oneway:"true"}},{en:{_desired:"tn",_distance:"30",_oneway:"true"}},{en:{_desired:"to",_distance:"30",_oneway:"true"}},{ru:{_desired:"tt",_distance:"30",_oneway:"true"}},{en:{_desired:"tum",_distance:"30",_oneway:"true"}},{zh:{_desired:"ug",_distance:"20",_oneway:"true"}},{ru:{_desired:"uk",_distance:"20",_oneway:"true"}},{en:{_desired:"ur",_distance:"30",_oneway:"true"}},{ru:{_desired:"uz",_distance:"30",_oneway:"true"}},{fr:{_desired:"wo",_distance:"30",_oneway:"true"}},{en:{_desired:"xh",_distance:"30",_oneway:"true"}},{en:{_desired:"yi",_distance:"30",_oneway:"true"}},{en:{_desired:"yo",_distance:"30",_oneway:"true"}},{zh:{_desired:"za",_distance:"20",_oneway:"true"}},{en:{_desired:"zu",_distance:"30",_oneway:"true"}},{ar:{_desired:"aao",_distance:"10",_oneway:"true"}},{ar:{_desired:"abh",_distance:"10",_oneway:"true"}},{ar:{_desired:"abv",_distance:"10",_oneway:"true"}},{ar:{_desired:"acm",_distance:"10",_oneway:"true"}},{ar:{_desired:"acq",_distance:"10",_oneway:"true"}},{ar:{_desired:"acw",_distance:"10",_oneway:"true"}},{ar:{_desired:"acx",_distance:"10",_oneway:"true"}},{ar:{_desired:"acy",_distance:"10",_oneway:"true"}},{ar:{_desired:"adf",_distance:"10",_oneway:"true"}},{ar:{_desired:"aeb",_distance:"10",_oneway:"true"}},{ar:{_desired:"aec",_distance:"10",_oneway:"true"}},{ar:{_desired:"afb",_distance:"10",_oneway:"true"}},{ar:{_desired:"ajp",_distance:"10",_oneway:"true"}},{ar:{_desired:"apc",_distance:"10",_oneway:"true"}},{ar:{_desired:"apd",_distance:"10",_oneway:"true"}},{ar:{_desired:"arq",_distance:"10",_oneway:"true"}},{ar:{_desired:"ars",_distance:"10",_oneway:"true"}},{ar:{_desired:"ary",_distance:"10",_oneway:"true"}},{ar:{_desired:"arz",_distance:"10",_oneway:"true"}},{ar:{_desired:"auz",_distance:"10",_oneway:"true"}},{ar:{_desired:"avl",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayh",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayl",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayn",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayp",_distance:"10",_oneway:"true"}},{ar:{_desired:"bbz",_distance:"10",_oneway:"true"}},{ar:{_desired:"pga",_distance:"10",_oneway:"true"}},{ar:{_desired:"shu",_distance:"10",_oneway:"true"}},{ar:{_desired:"ssh",_distance:"10",_oneway:"true"}},{az:{_desired:"azb",_distance:"10",_oneway:"true"}},{et:{_desired:"vro",_distance:"10",_oneway:"true"}},{ff:{_desired:"ffm",_distance:"10",_oneway:"true"}},{ff:{_desired:"fub",_distance:"10",_oneway:"true"}},{ff:{_desired:"fue",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuf",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuh",_distance:"10",_oneway:"true"}},{ff:{_desired:"fui",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuq",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuv",_distance:"10",_oneway:"true"}},{gn:{_desired:"gnw",_distance:"10",_oneway:"true"}},{gn:{_desired:"gui",_distance:"10",_oneway:"true"}},{gn:{_desired:"gun",_distance:"10",_oneway:"true"}},{gn:{_desired:"nhd",_distance:"10",_oneway:"true"}},{iu:{_desired:"ikt",_distance:"10",_oneway:"true"}},{kln:{_desired:"enb",_distance:"10",_oneway:"true"}},{kln:{_desired:"eyo",_distance:"10",_oneway:"true"}},{kln:{_desired:"niq",_distance:"10",_oneway:"true"}},{kln:{_desired:"oki",_distance:"10",_oneway:"true"}},{kln:{_desired:"pko",_distance:"10",_oneway:"true"}},{kln:{_desired:"sgc",_distance:"10",_oneway:"true"}},{kln:{_desired:"tec",_distance:"10",_oneway:"true"}},{kln:{_desired:"tuy",_distance:"10",_oneway:"true"}},{kok:{_desired:"gom",_distance:"10",_oneway:"true"}},{kpe:{_desired:"gkp",_distance:"10",_oneway:"true"}},{luy:{_desired:"ida",_distance:"10",_oneway:"true"}},{luy:{_desired:"lkb",_distance:"10",_oneway:"true"}},{luy:{_desired:"lko",_distance:"10",_oneway:"true"}},{luy:{_desired:"lks",_distance:"10",_oneway:"true"}},{luy:{_desired:"lri",_distance:"10",_oneway:"true"}},{luy:{_desired:"lrm",_distance:"10",_oneway:"true"}},{luy:{_desired:"lsm",_distance:"10",_oneway:"true"}},{luy:{_desired:"lto",_distance:"10",_oneway:"true"}},{luy:{_desired:"lts",_distance:"10",_oneway:"true"}},{luy:{_desired:"lwg",_distance:"10",_oneway:"true"}},{luy:{_desired:"nle",_distance:"10",_oneway:"true"}},{luy:{_desired:"nyd",_distance:"10",_oneway:"true"}},{luy:{_desired:"rag",_distance:"10",_oneway:"true"}},{lv:{_desired:"ltg",_distance:"10",_oneway:"true"}},{mg:{_desired:"bhr",_distance:"10",_oneway:"true"}},{mg:{_desired:"bjq",_distance:"10",_oneway:"true"}},{mg:{_desired:"bmm",_distance:"10",_oneway:"true"}},{mg:{_desired:"bzc",_distance:"10",_oneway:"true"}},{mg:{_desired:"msh",_distance:"10",_oneway:"true"}},{mg:{_desired:"skg",_distance:"10",_oneway:"true"}},{mg:{_desired:"tdx",_distance:"10",_oneway:"true"}},{mg:{_desired:"tkg",_distance:"10",_oneway:"true"}},{mg:{_desired:"txy",_distance:"10",_oneway:"true"}},{mg:{_desired:"xmv",_distance:"10",_oneway:"true"}},{mg:{_desired:"xmw",_distance:"10",_oneway:"true"}},{mn:{_desired:"mvf",_distance:"10",_oneway:"true"}},{ms:{_desired:"bjn",_distance:"10",_oneway:"true"}},{ms:{_desired:"btj",_distance:"10",_oneway:"true"}},{ms:{_desired:"bve",_distance:"10",_oneway:"true"}},{ms:{_desired:"bvu",_distance:"10",_oneway:"true"}},{ms:{_desired:"coa",_distance:"10",_oneway:"true"}},{ms:{_desired:"dup",_distance:"10",_oneway:"true"}},{ms:{_desired:"hji",_distance:"10",_oneway:"true"}},{ms:{_desired:"id",_distance:"10",_oneway:"true"}},{ms:{_desired:"jak",_distance:"10",_oneway:"true"}},{ms:{_desired:"jax",_distance:"10",_oneway:"true"}},{ms:{_desired:"kvb",_distance:"10",_oneway:"true"}},{ms:{_desired:"kvr",_distance:"10",_oneway:"true"}},{ms:{_desired:"kxd",_distance:"10",_oneway:"true"}},{ms:{_desired:"lce",_distance:"10",_oneway:"true"}},{ms:{_desired:"lcf",_distance:"10",_oneway:"true"}},{ms:{_desired:"liw",_distance:"10",_oneway:"true"}},{ms:{_desired:"max",_distance:"10",_oneway:"true"}},{ms:{_desired:"meo",_distance:"10",_oneway:"true"}},{ms:{_desired:"mfa",_distance:"10",_oneway:"true"}},{ms:{_desired:"mfb",_distance:"10",_oneway:"true"}},{ms:{_desired:"min",_distance:"10",_oneway:"true"}},{ms:{_desired:"mqg",_distance:"10",_oneway:"true"}},{ms:{_desired:"msi",_distance:"10",_oneway:"true"}},{ms:{_desired:"mui",_distance:"10",_oneway:"true"}},{ms:{_desired:"orn",_distance:"10",_oneway:"true"}},{ms:{_desired:"ors",_distance:"10",_oneway:"true"}},{ms:{_desired:"pel",_distance:"10",_oneway:"true"}},{ms:{_desired:"pse",_distance:"10",_oneway:"true"}},{ms:{_desired:"tmw",_distance:"10",_oneway:"true"}},{ms:{_desired:"urk",_distance:"10",_oneway:"true"}},{ms:{_desired:"vkk",_distance:"10",_oneway:"true"}},{ms:{_desired:"vkt",_distance:"10",_oneway:"true"}},{ms:{_desired:"xmm",_distance:"10",_oneway:"true"}},{ms:{_desired:"zlm",_distance:"10",_oneway:"true"}},{ms:{_desired:"zmi",_distance:"10",_oneway:"true"}},{ne:{_desired:"dty",_distance:"10",_oneway:"true"}},{om:{_desired:"gax",_distance:"10",_oneway:"true"}},{om:{_desired:"hae",_distance:"10",_oneway:"true"}},{om:{_desired:"orc",_distance:"10",_oneway:"true"}},{or:{_desired:"spv",_distance:"10",_oneway:"true"}},{ps:{_desired:"pbt",_distance:"10",_oneway:"true"}},{ps:{_desired:"pst",_distance:"10",_oneway:"true"}},{qu:{_desired:"qub",_distance:"10",_oneway:"true"}},{qu:{_desired:"qud",_distance:"10",_oneway:"true"}},{qu:{_desired:"quf",_distance:"10",_oneway:"true"}},{qu:{_desired:"qug",_distance:"10",_oneway:"true"}},{qu:{_desired:"quh",_distance:"10",_oneway:"true"}},{qu:{_desired:"quk",_distance:"10",_oneway:"true"}},{qu:{_desired:"qul",_distance:"10",_oneway:"true"}},{qu:{_desired:"qup",_distance:"10",_oneway:"true"}},{qu:{_desired:"qur",_distance:"10",_oneway:"true"}},{qu:{_desired:"qus",_distance:"10",_oneway:"true"}},{qu:{_desired:"quw",_distance:"10",_oneway:"true"}},{qu:{_desired:"qux",_distance:"10",_oneway:"true"}},{qu:{_desired:"quy",_distance:"10",_oneway:"true"}},{qu:{_desired:"qva",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qve",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvi",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvj",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvl",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvm",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvn",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvo",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvp",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvs",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvw",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvz",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwa",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qws",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxa",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxl",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxn",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxo",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxp",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxr",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxt",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxu",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxw",_distance:"10",_oneway:"true"}},{sc:{_desired:"sdc",_distance:"10",_oneway:"true"}},{sc:{_desired:"sdn",_distance:"10",_oneway:"true"}},{sc:{_desired:"sro",_distance:"10",_oneway:"true"}},{sq:{_desired:"aae",_distance:"10",_oneway:"true"}},{sq:{_desired:"aat",_distance:"10",_oneway:"true"}},{sq:{_desired:"aln",_distance:"10",_oneway:"true"}},{syr:{_desired:"aii",_distance:"10",_oneway:"true"}},{uz:{_desired:"uzs",_distance:"10",_oneway:"true"}},{yi:{_desired:"yih",_distance:"10",_oneway:"true"}},{zh:{_desired:"cdo",_distance:"10",_oneway:"true"}},{zh:{_desired:"cjy",_distance:"10",_oneway:"true"}},{zh:{_desired:"cpx",_distance:"10",_oneway:"true"}},{zh:{_desired:"czh",_distance:"10",_oneway:"true"}},{zh:{_desired:"czo",_distance:"10",_oneway:"true"}},{zh:{_desired:"gan",_distance:"10",_oneway:"true"}},{zh:{_desired:"hak",_distance:"10",_oneway:"true"}},{zh:{_desired:"hsn",_distance:"10",_oneway:"true"}},{zh:{_desired:"lzh",_distance:"10",_oneway:"true"}},{zh:{_desired:"mnp",_distance:"10",_oneway:"true"}},{zh:{_desired:"nan",_distance:"10",_oneway:"true"}},{zh:{_desired:"wuu",_distance:"10",_oneway:"true"}},{zh:{_desired:"yue",_distance:"10",_oneway:"true"}},{"*":{_desired:"*",_distance:"80"}},{"en-Latn":{_desired:"am-Ethi",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"az-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"bn-Beng",_distance:"10",_oneway:"true"}},{"zh-Hans":{_desired:"bo-Tibt",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"hy-Armn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ka-Geor",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"km-Khmr",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"kn-Knda",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"lo-Laoo",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ml-Mlym",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"my-Mymr",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ne-Deva",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"or-Orya",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"pa-Guru",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ps-Arab",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"sd-Arab",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"si-Sinh",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ta-Taml",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"te-Telu",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ti-Ethi",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"tk-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ur-Arab",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"uz-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"yi-Hebr",_distance:"10",_oneway:"true"}},{"sr-Cyrl":{_desired:"sr-Latn",_distance:"5"}},{"zh-Hans":{_desired:"za-Latn",_distance:"10",_oneway:"true"}},{"zh-Hans":{_desired:"zh-Hani",_distance:"20",_oneway:"true"}},{"zh-Hant":{_desired:"zh-Hani",_distance:"20",_oneway:"true"}},{"ar-Arab":{_desired:"ar-Latn",_distance:"20",_oneway:"true"}},{"bn-Beng":{_desired:"bn-Latn",_distance:"20",_oneway:"true"}},{"gu-Gujr":{_desired:"gu-Latn",_distance:"20",_oneway:"true"}},{"hi-Deva":{_desired:"hi-Latn",_distance:"20",_oneway:"true"}},{"kn-Knda":{_desired:"kn-Latn",_distance:"20",_oneway:"true"}},{"ml-Mlym":{_desired:"ml-Latn",_distance:"20",_oneway:"true"}},{"mr-Deva":{_desired:"mr-Latn",_distance:"20",_oneway:"true"}},{"ta-Taml":{_desired:"ta-Latn",_distance:"20",_oneway:"true"}},{"te-Telu":{_desired:"te-Latn",_distance:"20",_oneway:"true"}},{"zh-Hans":{_desired:"zh-Latn",_distance:"20",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Latn",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hani",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hira",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Kana",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hrkt",_distance:"5",_oneway:"true"}},{"ja-Hrkt":{_desired:"ja-Hira",_distance:"5",_oneway:"true"}},{"ja-Hrkt":{_desired:"ja-Kana",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Hani",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Hang",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Jamo",_distance:"5",_oneway:"true"}},{"ko-Hang":{_desired:"ko-Jamo",_distance:"5",_oneway:"true"}},{"*-*":{_desired:"*-*",_distance:"50"}},{"ar-*-$maghreb":{_desired:"ar-*-$maghreb",_distance:"4"}},{"ar-*-$!maghreb":{_desired:"ar-*-$!maghreb",_distance:"4"}},{"ar-*-*":{_desired:"ar-*-*",_distance:"5"}},{"en-*-$enUS":{_desired:"en-*-$enUS",_distance:"4"}},{"en-*-GB":{_desired:"en-*-$!enUS",_distance:"3"}},{"en-*-$!enUS":{_desired:"en-*-$!enUS",_distance:"4"}},{"en-*-*":{_desired:"en-*-*",_distance:"5"}},{"es-*-$americas":{_desired:"es-*-$americas",_distance:"4"}},{"es-*-$!americas":{_desired:"es-*-$!americas",_distance:"4"}},{"es-*-*":{_desired:"es-*-*",_distance:"5"}},{"pt-*-$americas":{_desired:"pt-*-$americas",_distance:"4"}},{"pt-*-$!americas":{_desired:"pt-*-$!americas",_distance:"4"}},{"pt-*-*":{_desired:"pt-*-*",_distance:"5"}},{"zh-Hant-$cnsar":{_desired:"zh-Hant-$cnsar",_distance:"4"}},{"zh-Hant-$!cnsar":{_desired:"zh-Hant-$!cnsar",_distance:"4"}},{"zh-Hant-*":{_desired:"zh-Hant-*",_distance:"5"}},{"*-*-*":{_desired:"*-*-*",_distance:"4"}}]}}},un={"001":["001","001-status-grouping","002","005","009","011","013","014","015","017","018","019","021","029","030","034","035","039","053","054","057","061","142","143","145","150","151","154","155","AC","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CQ","CR","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","QO","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UN","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"002":["002","002-status-grouping","011","014","015","017","018","202","AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","DZ","EA","EG","EH","ER","ET","GA","GH","GM","GN","GQ","GW","IC","IO","KE","KM","LR","LS","LY","MA","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RE","RW","SC","SD","SH","SL","SN","SO","SS","ST","SZ","TD","TF","TG","TN","TZ","UG","YT","ZA","ZM","ZW"],"003":["003","013","021","029","AG","AI","AW","BB","BL","BM","BQ","BS","BZ","CA","CR","CU","CW","DM","DO","GD","GL","GP","GT","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PM","PR","SV","SX","TC","TT","US","VC","VG","VI"],"005":["005","AR","BO","BR","BV","CL","CO","EC","FK","GF","GS","GY","PE","PY","SR","UY","VE"],"009":["009","053","054","057","061","AC","AQ","AS","AU","CC","CK","CP","CX","DG","FJ","FM","GU","HM","KI","MH","MP","NC","NF","NR","NU","NZ","PF","PG","PN","PW","QO","SB","TA","TK","TO","TV","UM","VU","WF","WS"],"011":["011","BF","BJ","CI","CV","GH","GM","GN","GW","LR","ML","MR","NE","NG","SH","SL","SN","TG"],"013":["013","BZ","CR","GT","HN","MX","NI","PA","SV"],"014":["014","BI","DJ","ER","ET","IO","KE","KM","MG","MU","MW","MZ","RE","RW","SC","SO","SS","TF","TZ","UG","YT","ZM","ZW"],"015":["015","DZ","EA","EG","EH","IC","LY","MA","SD","TN"],"017":["017","AO","CD","CF","CG","CM","GA","GQ","ST","TD"],"018":["018","BW","LS","NA","SZ","ZA"],"019":["003","005","013","019","019-status-grouping","021","029","419","AG","AI","AR","AW","BB","BL","BM","BO","BQ","BR","BS","BV","BZ","CA","CL","CO","CR","CU","CW","DM","DO","EC","FK","GD","GF","GL","GP","GS","GT","GY","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PM","PR","PY","SR","SV","SX","TC","TT","US","UY","VC","VE","VG","VI"],"021":["021","BM","CA","GL","PM","US"],"029":["029","AG","AI","AW","BB","BL","BQ","BS","CU","CW","DM","DO","GD","GP","HT","JM","KN","KY","LC","MF","MQ","MS","PR","SX","TC","TT","VC","VG","VI"],"030":["030","CN","HK","JP","KP","KR","MN","MO","TW"],"034":["034","AF","BD","BT","IN","IR","LK","MV","NP","PK"],"035":["035","BN","ID","KH","LA","MM","MY","PH","SG","TH","TL","VN"],"039":["039","AD","AL","BA","ES","GI","GR","HR","IT","ME","MK","MT","PT","RS","SI","SM","VA","XK"],"053":["053","AU","CC","CX","HM","NF","NZ"],"054":["054","FJ","NC","PG","SB","VU"],"057":["057","FM","GU","KI","MH","MP","NR","PW","UM"],"061":["061","AS","CK","NU","PF","PN","TK","TO","TV","WF","WS"],142:["030","034","035","142","143","145","AE","AF","AM","AZ","BD","BH","BN","BT","CN","CY","GE","HK","ID","IL","IN","IQ","IR","JO","JP","KG","KH","KP","KR","KW","KZ","LA","LB","LK","MM","MN","MO","MV","MY","NP","OM","PH","PK","PS","QA","SA","SG","SY","TH","TJ","TL","TM","TR","TW","UZ","VN","YE"],143:["143","KG","KZ","TJ","TM","UZ"],145:["145","AE","AM","AZ","BH","CY","GE","IL","IQ","JO","KW","LB","OM","PS","QA","SA","SY","TR","YE"],150:["039","150","151","154","155","AD","AL","AT","AX","BA","BE","BG","BY","CH","CQ","CZ","DE","DK","EE","ES","FI","FO","FR","GB","GG","GI","GR","HR","HU","IE","IM","IS","IT","JE","LI","LT","LU","LV","MC","MD","ME","MK","MT","NL","NO","PL","PT","RO","RS","RU","SE","SI","SJ","SK","SM","UA","VA","XK"],151:["151","BG","BY","CZ","HU","MD","PL","RO","RU","SK","UA"],154:["154","AX","CQ","DK","EE","FI","FO","GB","GG","IE","IM","IS","JE","LT","LV","NO","SE","SJ"],155:["155","AT","BE","CH","DE","FR","LI","LU","MC","NL"],202:["011","014","017","018","202","AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","ER","ET","GA","GH","GM","GN","GQ","GW","IO","KE","KM","LR","LS","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RE","RW","SC","SH","SL","SN","SO","SS","ST","SZ","TD","TF","TG","TZ","UG","YT","ZA","ZM","ZW"],419:["005","013","029","419","AG","AI","AR","AW","BB","BL","BO","BQ","BR","BS","BV","BZ","CL","CO","CR","CU","CW","DM","DO","EC","FK","GD","GF","GP","GS","GT","GY","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PR","PY","SR","SV","SX","TC","TT","UY","VC","VE","VG","VI"],EU:["AT","BE","BG","CY","CZ","DE","DK","EE","ES","EU","FI","FR","GR","HR","HU","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SE","SI","SK"],EZ:["AT","BE","CY","DE","EE","ES","EZ","FI","FR","GR","IE","IT","LT","LU","LV","MT","NL","PT","SI","SK"],QO:["AC","AQ","CP","DG","QO","TA"],UN:["AD","AE","AF","AG","AL","AM","AO","AR","AT","AU","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BN","BO","BR","BS","BT","BW","BY","BZ","CA","CD","CF","CG","CH","CI","CL","CM","CN","CO","CR","CU","CV","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","ER","ES","ET","FI","FJ","FM","FR","GA","GB","GD","GE","GH","GM","GN","GQ","GR","GT","GW","GY","HN","HR","HT","HU","ID","IE","IL","IN","IQ","IR","IS","IT","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MG","MH","MK","ML","MM","MN","MR","MT","MU","MV","MW","MX","MY","MZ","NA","NE","NG","NI","NL","NO","NP","NR","NZ","OM","PA","PE","PG","PH","PK","PL","PT","PW","PY","QA","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SI","SK","SL","SM","SN","SO","SR","SS","ST","SV","SY","SZ","TD","TG","TH","TJ","TL","TM","TN","TO","TR","TT","TV","TZ","UA","UG","UN","US","UY","UZ","VC","VE","VN","VU","WS","YE","ZA","ZM","ZW"]},Ce=/-u(?:-[0-9a-z]{2,8})+/gi;function D(e,i,a){if(a===void 0&&(a=Error),!e)throw new a(i)}var _n=838,ee;function ln(){var e,i;if(!ee){var a=(i=(e=X.supplemental.languageMatching["written-new"][0])===null||e===void 0?void 0:e.paradigmLocales)===null||i===void 0?void 0:i._locales.split(" "),n=X.supplemental.languageMatching["written-new"].slice(1,5),d=X.supplemental.languageMatching["written-new"].slice(5),r=d.map(function(s){var o=Object.keys(s)[0],u=s[o];return{supported:o,desired:u._desired,distance:+u._distance,oneway:u.oneway==="true"}},{});ee={matches:r,matchVariables:n.reduce(function(s,o){var u=Object.keys(o)[0],y=o[u];return s[u.slice(1)]=y._value.split("+"),s},{}),paradigmLocales:V(V([],a,!0),a.map(function(s){return new Intl.Locale(s.replace(/_/g,"-")).maximize().toString()}),!0)}}return ee}function j(e,i,a){var n=i.split("-"),d=n[0],r=n[1],s=n[2],o=!0;if(s&&s[0]==="$"){var u=s[1]!=="!",y=u?a[s.slice(1)]:a[s.slice(2)],l=y.map(function(S){return un[S]||[S]}).reduce(function(S,M){return V(V([],S,!0),M,!0)},[]);o&&(o=l.indexOf(e.region||"")>1==u)}else o&&(o=e.region?s==="*"||s===e.region:!0);return o&&(o=e.script?r==="*"||r===e.script:!0),o&&(o=e.language?d==="*"||d===e.language:!0),o}function we(e){return[e.language,e.script,e.region].filter(Boolean).join("-")}function ne(e,i,a){for(var n=0,d=a.matches;n<d.length;n++){var r=d[n],s=j(e,r.desired,a.matchVariables)&&j(i,r.supported,a.matchVariables);if(!r.oneway&&!s&&(s=j(e,r.supported,a.matchVariables)&&j(i,r.desired,a.matchVariables)),s){var o=r.distance*10;return a.paradigmLocales.indexOf(we(e))>-1!=a.paradigmLocales.indexOf(we(i))>-1?o-1:o}}throw new Error("No matching distance found")}function yn(e,i){var a=new Intl.Locale(e).maximize(),n=new Intl.Locale(i).maximize(),d={language:a.language,script:a.script||"",region:a.region||""},r={language:n.language,script:n.script||"",region:n.region||""},s=0,o=ln();return d.language!==r.language&&(s+=ne({language:a.language,script:"",region:""},{language:n.language,script:"",region:""},o)),d.script!==r.script&&(s+=ne({language:a.language,script:d.script,region:""},{language:n.language,script:d.script,region:""},o)),d.region!==r.region&&(s+=ne(d,r,o)),s}function pn(e,i,a){a===void 0&&(a=_n);var n=1/0,d={matchedDesiredLocale:"",distances:{}};return e.forEach(function(r,s){d.distances[r]||(d.distances[r]={}),i.forEach(function(o){var u=yn(r,o)+0+s*40;d.distances[r][o]=u,u<n&&(n=u,d.matchedDesiredLocale=r,d.matchedSupportedLocale=o)})}),n>=a&&(d.matchedDesiredLocale=void 0,d.matchedSupportedLocale=void 0),d}function fn(e,i,a){var n,d,r=[],s=i.reduce(function(u,y){var l=y.replace(Ce,"");return r.push(l),u[l]=y,u},{}),o=pn(r,e);return o.matchedSupportedLocale&&o.matchedDesiredLocale&&(n=o.matchedSupportedLocale,d=s[o.matchedDesiredLocale].slice(o.matchedDesiredLocale.length)||void 0),n?{locale:n,extension:d}:{locale:a()}}function wn(e,i){for(var a=i;;){if(e.indexOf(a)>-1)return a;var n=a.lastIndexOf("-");if(!~n)return;n>=2&&a[n-2]==="-"&&(n-=2),a=a.slice(0,n)}}function gn(e,i,a){for(var n={locale:""},d=0,r=i;d<r.length;d++){var s=r[d],o=s.replace(Ce,""),u=wn(e,o);if(u)return n.locale=u,s!==o&&(n.extension=s.slice(o.length,s.length)),n}return n.locale=a(),n}function mn(e,i){D(i.length===2,"key must have 2 elements");var a=e.length,n="-".concat(i,"-"),d=e.indexOf(n);if(d!==-1){for(var r=d+4,s=r,o=r,u=!1;!u;){var y=e.indexOf("-",o),l=void 0;y===-1?l=a-o:l=y-o,l===2?u=!0:y===-1?(s=a,u=!0):(s=y,o=y+1)}return e.slice(r,s)}if(n="-".concat(i),d=e.indexOf(n),d!==-1&&d+3===a)return""}function hn(e,i,a,n,d,r){var s=a.localeMatcher,o;s==="lookup"?o=gn(Array.from(e),i,r):o=fn(Array.from(e),i,r);for(var u=o.locale,y={locale:"",dataLocale:u},l="-u",S=0,M=n;S<M.length;S++){var C=M[S];D(u in d,"Missing locale data for ".concat(u));var P=d[u];D(typeof P=="object"&&P!==null,"locale data ".concat(C," must be an object"));var E=P[C];D(Array.isArray(E),"keyLocaleData for ".concat(C," must be an array"));var L=E[0];D(typeof L=="string"||L===null,"value must be string or null but got ".concat(typeof L," in key ").concat(C));var A="";if(o.extension){var G=mn(o.extension,C);G!==void 0&&(G!==""?~E.indexOf(G)&&(L=G,A="-".concat(C,"-").concat(L)):~G.indexOf("true")&&(L="true",A="-".concat(C)))}if(C in a){var R=a[C];D(typeof R=="string"||typeof R>"u"||R===null,"optionsValue must be String, Undefined or Null"),~E.indexOf(R)&&R!==L&&(L=R,A="")}y[C]=L,l+=A}if(l.length>2){var q=u.indexOf("-x-");if(q===-1)u=u+l;else{var z=u.slice(0,q),F=u.slice(q,u.length);u=z+l+F}u=Intl.getCanonicalLocales(u)[0]}return y.locale=u,y}function vn(e,i,a,n){return hn(i,cn(e),{localeMatcher:"best fit"},[],{},function(){return a}).locale}const ae="en";function Le(e,i=""){return Object.keys(e).reduce((a,n)=>{const d=e[n],r=i?`${i}.${n}`:n;return typeof d=="string"?a[r]=d:Object.assign(a,Le(d,r)),a},{})}function Sn(e,i){const a=Object.keys(i),n=vn([e],a,ae);return n||ae}const Tn=te.createIntlCache(),ge=new WeakMap,Mn=e=>{const i=(e==null?void 0:e.locale)||ae,a=Sn(i,fe),n={...fe[a]||{},...(e==null?void 0:e.messages)??{}},d=Le(n);return te.createIntl({locale:i,messages:d},Tn)},En=e=>{const i=ge.get(e);if(i)return i;const a=Mn(e);return ge.set(e,a),a};function be(e){return En(e)}const Cn=k.styled(k.Box)(({theme:e})=>({display:"flex",gap:e.spacing(.5),marginLeft:e.spacing(1)})),me=k.styled("div")(({theme:e})=>({"& .MuiIconButton-root:not(.Mui-disabled)":{color:e.palette.text.secondary}}));function Ln({count:e,page:i,rowsPerPage:a=10,onPageChange:n,lastPageTooltip:d}){const r=te.useIntl(),s=be(r),o=P=>{n(P,i-1)},u=P=>{n(P,i+1)},y=i===Math.ceil(e/a)-1,l=i===0,S=s.formatMessage({id:"c4r.form.pagination.prevPage"}),M=s.formatMessage({id:"c4r.form.pagination.nextPage"}),C=s.formatMessage({id:"c4r.form.pagination.noMorePages"});return O.jsxs(Cn,{children:[O.jsx(k.Tooltip,{title:l?C:S,children:O.jsx(me,{children:O.jsx(k.IconButton,{onClick:o,disabled:i===0,"aria-label":S,children:O.jsx(oe.KeyboardArrowLeftOutlined,{})})})}),O.jsx(k.Tooltip,{title:y?d??C:M,children:O.jsx(me,{children:O.jsx(k.IconButton,{onClick:u,disabled:i>=Math.ceil(e/a)-1,"aria-label":M.toLocaleLowerCase(),children:O.jsx(oe.KeyboardArrowRightOutlined,{})})})})]})}exports.APPBAR_SIZE=en;exports.BREAKPOINTS=Je;exports.ICON_SIZE_LARGE=Xe;exports.ICON_SIZE_MEDIUM=Qe;exports.ICON_SIZE_SMALL=$e;exports.NOTIFICATION_DURATION_IN_MS=nn;exports.SPACING=Ee;exports.TablePaginationActions=Ln;exports.Typography=tn;exports.getDefaultExportFromCjs=ve;exports.getSpacing=H;exports.useImperativeIntl=be;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),h=require("react"),r=require("@mui/material"),y=require("../TablePaginationActions-7wkkiCXh.cjs"),w=require("react-intl"),S=require("@mui/icons-material"),W=require("../Alert-B2JgFj6Y.cjs");require("cartocolor");const H=require("../MenuItem-Dbss-WG1.cjs"),P=require("../ArrowDown-CGnG0E-4.cjs"),ut=require("@mui/x-date-pickers/DatePicker"),pt=require("@mui/x-date-pickers"),gt=require("@mui/x-date-pickers/TimePicker"),xt=require("@mui/x-date-pickers/DateTimePicker"),ft=require("@mui/material/ClickAwayListener"),mt=r.styled(r.Box)({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}),ht=r.styled(r.Box)({visibility:"hidden",pointerEvents:"none"});function bt({children:t,loading:e,disabled:o,startIcon:i,endIcon:a,loadingPosition:l,...s},c){const d=n.jsx(r.CircularProgress,{size:18,color:"inherit"}),u=e&&l===void 0,m=()=>u?n.jsxs(r.Box,{sx:{position:"relative"},children:[n.jsx(mt,{children:d}),n.jsx(ht,{children:t})]}):t,p=g=>{if(!u)return e&&l!==void 0?l===g?d:void 0:g==="start"?i:a};return n.jsx(r.Button,{disabled:e||o,startIcon:p("start"),endIcon:p("end"),...s,ref:c,children:n.jsx(y.Typography,{variant:"inherit",color:"inherit",noWrap:!0,component:"span",children:m()})})}const yt=h.forwardRef(bt),jt=r.styled(r.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(.5)})),Mt=r.styled(y.Typography)(({theme:t})=>({".Mui-disabled &":{color:t.palette.text.disabled}})),It=r.styled(r.Box)(({theme:t})=>({display:"flex",svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL,fontSize:y.ICON_SIZE_SMALL,path:{fill:t.palette.text.secondary,".Mui-disabled &":{fill:t.palette.text.disabled}}}}));function F({label:t,type:e,icon:o,inheritSize:i}){return n.jsxs(jt,{children:[t,e&&n.jsx(Mt,{component:"span",variant:i?"inherit":"caption",color:"textSecondary",weight:"regular",children:e==="required"?"(required)":"(optional)"}),o&&n.jsx(It,{children:o})]})}function Ct({InputProps:t,size:e="small",...o},i){const a=w.useIntl(),l=y.useImperativeIntl(a),[s,c]=h.useState(!1),d=()=>c(!s);return n.jsx(r.TextField,{...o,ref:i,type:s?"text":"password",size:e,InputProps:{...t,endAdornment:n.jsx(r.InputAdornment,{position:"end",children:n.jsx(r.IconButton,{size:e,onClick:d,children:n.jsx(r.Tooltip,{title:l.formatMessage({id:`c4r.form.${s?"hidePassword":"showPassword"}`}),children:s?n.jsx(S.VisibilityOffOutlined,{}):n.jsx(S.VisibilityOutlined,{})})})})}})}const vt=h.forwardRef(Ct),O={};function Bt(t="$lodash$"){O[t]||(O[t]=0);const e=++O[t];return t==="$lodash$"?`${e}`:`${t}${e}`}const Dt=r.styled(r.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)}})),At=r.styled(r.MenuItem)(()=>({display:"none"}));function Tt({children:t,placeholder:e,size:o="small",displayEmpty:i,menuProps:a,inputProps:l,labelId:s,label:c,labelSecondary:d,helperText:u,name:m,error:p,focused:g,disabled:x,fullWidth:f,required:j,"aria-label":b,...C},A){const v=o==="small",[M]=h.useState(()=>Bt("select-label-")),B=c?s??M:void 0;return n.jsxs(r.FormControl,{size:o,error:p,focused:g,disabled:x,fullWidth:f,required:j,children:[n.jsxs(r.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[c&&n.jsx(r.InputLabel,{shrink:!0,id:B,children:c}),d&&n.jsx(r.Box,{display:"flex",alignItems:"center",ml:2,mb:.5,children:d})]}),n.jsxs(Dt,{...C,labelId:B,name:m,ref:A,size:o,fullWidth:f,displayEmpty:i??!!e,inputProps:{...l,"aria-label":b},MenuProps:{...a,PopoverClasses:{paper:v?"MuiMenu-paper-sizeSmall":void 0},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:0,horizontal:"left"}},children:[e&&n.jsx(At,{disabled:!0,value:"",children:n.jsx(y.Typography,{variant:v?"body2":"body1",color:"text.hint",component:"span",children:e})}),t]}),u&&n.jsx(r.FormHelperText,{"aria-label":`${m}-helper`,children:u})]})}const Q=h.forwardRef(Tt),St=r.styled(r.ToggleButtonGroup,{shouldForwardProp:t=>t!=="variant"&&t!=="backgroundColor"})(({variant:t,backgroundColor:e,theme:o})=>({...t==="contained"&&{boxShadow:"none"},...t==="unbounded"&&{boxShadow:"none",borderRadius:o.spacing(.5),"& .MuiDivider-root":{height:o.spacing(4),"&.MuiToggleButtonGroup-groupedHorizontal":{height:o.spacing(4)},"&.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:o.spacing(4),margin:`${o.spacing(.5,0,1)} !important`,borderRadius:"0 !important"}},"& .MuiToggleButton-sizeSmall":{margin:0,"&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal":{height:o.spacing(3)},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:o.spacing(3)}},".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0,"&:first-of-type":{marginLeft:0},"&:not(:last-of-type)":{marginRight:o.spacing(.5)}},"&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:o.spacing(0,.5)}},"&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:o.spacing(0,0,.5),"&:not(:last-of-type)":{marginRight:0},"&:last-of-type":{marginBottom:0}}}},...e==="primary"&&{backgroundColor:o.palette.background.paper},...e==="secondary"&&{backgroundColor:o.palette.background.default},...e==="transparent"&&{backgroundColor:"transparent"}}));function wt({children:t,variant:e="floating",backgroundColor:o,...i}){const l=e==="unbounded"?"transparent":"primary";return n.jsx(St,{...i,variant:e,backgroundColor:o??l,children:t})}const kt=r.styled("div")(({theme:t})=>({position:"relative",display:"inline-flex","& + &, & + .optionIconButton":{marginLeft:t.spacing(.5)}})),Rt=r.styled(r.IconButton,{shouldForwardProp:t=>!["active"].includes(t)})(({active:t,theme:e})=>({...t&&{color:e.palette.primary.main,backgroundColor:e.palette.primary.background,"& svg:not(.doNotFillIcon) path":{fill:e.palette.primary.main}}}));function Ft({tooltip:t,tooltipPlacement:e="top",icon:o,size:i="medium",variant:a="icon",color:l="default",sx:s,className:c,loading:d,disabled:u,active:m,...p},g){return n.jsx(r.Tooltip,{placement:e,title:t??"",children:n.jsx(kt,{className:`optionIconButton ${c??""}`,sx:s,"data-testid":"icon-button",children:n.jsx(Rt,{...p,ref:g,size:i,variant:a,color:l,active:m,disabled:u||d,children:d?n.jsx(r.CircularProgress,{size:18,color:"inherit"}):o})})})}const tt=h.forwardRef(Ft),Ot=r.styled(r.Menu,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:o,height:i})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},...o&&{".MuiList-root":{width:o,minWidth:o}},...i&&{".MuiMenu-paper":{overflow:"hidden"},".MuiList-root":{maxHeight:i}}}));function $t({extended:t,width:e,height:o,MenuListProps:i,...a},l){return n.jsx(Ot,{...a,ref:l,"data-name":"menu",width:e,height:o,extended:t,MenuListProps:{...i,"data-width":e,"data-height":o,"data-extended":t}})}const Lt=h.forwardRef($t),Et=r.styled(r.MenuList,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:o,height:i})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},"&.MuiList-root":{...o&&{width:o,minWidth:o},...i&&{maxHeight:i}}}));function Wt({extended:t,width:e,height:o,...i},a){return n.jsx(Et,{...i,ref:a,width:e,height:o,extended:t,"data-name":"menu-list","data-width":e,"data-height":o,"data-extended":t})}const Ht=h.forwardRef(Wt),Pt=r.styled(H.MenuItem)(()=>({marginTop:"0 !important"})),_t=r.styled(r.Link)(({disabled:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",textAlign:"initial",...t&&{pointerEvents:"none",color:e.palette.text.disabled}}));function Nt({areAllSelected:t,areAnySelected:e,selectAll:o,selectAllDisabled:i,...a},l){const s=w.useIntl(),c=y.useImperativeIntl(s);return n.jsx(Pt,{...a,ref:l,fixed:!0,"data-name":"menu-filter",children:n.jsxs(_t,{variant:"body2",color:"textPrimary",component:"button",underline:"none",disabled:!!i,onClick:o,tabIndex:0,children:[n.jsx(r.Checkbox,{checked:t,indeterminate:e&&!t,disabled:i}),c.formatMessage({id:"c4r.form.selectAll"})]})})}const _=h.forwardRef(Nt);function qt({selectedOptions:t,options:e,onChange:o}){const[i,a]=h.useState(t??[]),l=e.length===i.length,s=i.length>0;return h.useEffect(()=>{i!==t&&a(i)},[t]),{areAllSelected:l,areAnySelected:s,currentOptions:i,handleChange:m=>{const{target:{value:p}}=m,g=typeof p=="string"?p.split(","):p.filter(x=>x!==void 0);a(g),o(g)},selectAll:()=>{const m=e==null?void 0:e.filter(({disabled:p})=>!p).map(({value:p})=>p);m&&(m.every(g=>i.includes(g))?(a([]),o([])):(a(m),o(m)))},unselectAll:()=>{a([]),o([])}}}const Gt=r.styled(r.MenuItem)(({theme:t})=>({"&.Mui-disabled":{pointerEvents:"auto","&:hover":{backgroundColor:`${t.palette.background.default} !important`}}})),Vt=r.styled(r.InputAdornment,{shouldForwardProp:t=>t!=="size"})(({theme:t,size:e})=>({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},...e==="medium"&&{top:t.spacing(3),right:t.spacing(5)}})),Ut=[],zt=()=>{};function Yt({options:t=Ut,selectedOptions:e,size:o="small",placeholder:i,showCounter:a,showFilters:l=!0,onChange:s=zt,selectAllDisabled:c,tooltipPlacement:d,variant:u,...m},p){const{areAllSelected:g,areAnySelected:x,currentOptions:f,handleChange:j,selectAll:b,unselectAll:C}=qt({options:t,selectedOptions:e,onChange:s}),A=o==="small",v=A||u==="standard"?0:2,M=w.useIntl(),B=y.useImperativeIntl(M),D=`${f.length} ${B.formatMessage({id:"c4r.form.selected"})}`,k=h.useMemo(()=>g?n.jsx(y.Typography,{component:"span",variant:A?"body2":"body1",color:"textPrimary",ml:v,children:B.formatMessage({id:"c4r.form.allSelected"})}):x?n.jsx(y.Typography,{component:"span",variant:A?"body2":"body1",color:"textPrimary",ml:v,children:a&&f.length>1?D:f.join(", ")}):n.jsx(y.Typography,{component:"span",variant:A?"body2":"body1",color:"text.hint",ml:v,children:i??B.formatMessage({id:"c4r.form.noneSelected"})}),[g,x,D,f,B,A,v,i,a]);return n.jsxs(Q,{...m,ref:p,multiple:!0,displayEmpty:!0,placeholder:i,value:f,renderValue:()=>k,onChange:j,size:o,variant:u,endAdornment:l&&x&&n.jsx(Vt,{position:"end",size:o,children:n.jsx(r.IconButton,{onClick:C,size:o,children:n.jsx(S.Cancel,{})})}),menuProps:{PaperProps:{sx:{".MuiList-root":{paddingTop:0}}}},children:[l&&n.jsx(_,{areAllSelected:g,areAnySelected:x,selectAll:b,selectAllDisabled:c}),t==null?void 0:t.map(I=>{const T=n.jsxs(Gt,{value:I.value,disabled:I.disabled,tabIndex:0,children:[n.jsx(r.Checkbox,{disabled:I.disabled,checked:f.includes(I.value)}),n.jsx(r.ListItemText,{primary:I.label})]},I.value);return I.tooltip?n.jsx(r.Tooltip,{title:I.tooltip,placement:d,children:T},I.value):T})]})}const Zt=h.forwardRef(Yt),Jt=r.styled(r.TextField,{shouldForwardProp:t=>t!=="cursor"})(({cursor:t,theme:e})=>({"&.MuiTextField-root .MuiInputBase-root":{cursor:t,paddingRight:e.spacing(1),"& input":{cursor:t},"&.Mui-disabled":{pointerEvents:"none","& .MuiButtonBase-root":{color:e.palette.text.disabled}},"&.MuiInputBase-sizeSmall":{paddingRight:e.spacing(.5)}},"& .MuiFormLabel-root":{cursor:t,"&.Mui-disabled":{pointerEvents:"none"}}}));function Xt({buttonText:t,hasFiles:e,size:o,error:i,disabled:a,handleReset:l,handleOpen:s,inProgress:c}){return n.jsx(r.InputAdornment,{position:"end",children:c?n.jsx(r.IconButton,{"aria-label":"loading",disabled:!0,size:o,children:n.jsx(r.CircularProgress,{size:18})}):e?n.jsx(r.IconButton,{onClick:l,size:o,"aria-label":"delete",disabled:a,children:n.jsx(S.Cancel,{})}):n.jsx(r.Button,{onClick:s,size:o,variant:"text",color:i?"default":"primary",disabled:a,children:t})})}function et({name:t,multiple:e,handleReset:o,handleOpen:i,dragOver:a,error:l,placeholder:s,focused:c,buttonText:d="Browse",inProgress:u,InputProps:m,size:p="small",hasFiles:g,cursor:x="pointer",...f}){return n.jsx(Jt,{...f,size:p,error:l,placeholder:s,focused:c??a,cursor:x,InputProps:{...m,name:t,readOnly:!0,endAdornment:n.jsx(Xt,{buttonText:d,hasFiles:g,size:p,error:l,disabled:!!a,handleReset:o,handleOpen:i,inProgress:u})}})}function Kt({onChange:t,files:e,multiple:o,placeholder:i,uploadInputRef:a}){const l=w.useIntl(),s=y.useImperativeIntl(l),[c,d]=h.useState(""),[u,m]=h.useState(!1);h.useEffect(()=>{!e||e.length===0?d(""):e.length===1?d(e[0].name):d(s.formatMessage({id:"c4r.form.filesSelected"},{count:e.length}))},[e,s]);const p=()=>{var M;(M=a.current)==null||M.click()},g=M=>{M.preventDefault(),m(!0)},x=M=>{M.preventDefault(),m(!1)},f=M=>{M.preventDefault(),m(!1);const B=M.dataTransfer.items,D=j(B);t==null||t(D)},j=M=>{const B=[];for(const D of Array.from(M))if(D.kind==="file"){const k=D.getAsFile();B.push(k)}return B},b=M=>{const B=Array.from(M.target.files);t==null||t(B)},C=M=>{M.stopPropagation(),d("")},A=h.useMemo(()=>{const M=s.formatMessage({id:"c4r.form.dragPlaceholder"},{count:o?0:1}),B=s.formatMessage({id:"c4r.form.dragActivePlaceholder"},{count:o?0:1});let D="";return u?D=B:D=i??M,D},[u,o,i,s]);return{filesText:c,getPlaceholder:A,dragOver:u,inputEvents:{onDragOver:g,onDragLeave:x,onDrop:f,onClick:p},handleFiles:b,handleReset:C}}const Qt=["application/JSON"];function te({name:t,buttonText:e,accept:o,files:i,inProgress:a,onChange:l,multiple:s,placeholder:c,error:d,focused:u,nativeInputProps:m,...p}){const g=o??Qt,x=h.useRef(null),{filesText:f,getPlaceholder:j,dragOver:b,inputEvents:C,handleFiles:A,handleReset:v}=Kt({uploadInputRef:x,files:i,onChange:l,multiple:s,placeholder:c});return n.jsxs(n.Fragment,{children:[n.jsx(et,{...p,placeholder:j,value:f,error:d,focused:u??b,handleReset:v,dragOver:b,inProgress:a,hasFiles:!!f,InputProps:C,buttonText:e}),n.jsx("input",{...m,ref:x,style:{display:"none"},type:"file","aria-label":t,name:t,accept:String(g),multiple:s,onChange:A})]})}function ee({disabled:t,loading:e,...o},i){return n.jsx(r.Autocomplete,{...o,ref:i,disabled:t||e,popupIcon:e?n.jsx(r.CircularProgress,{size:18,color:"inherit"}):n.jsx(P.ArrowDown,{}),"data-name":"autocomplete",ListboxProps:{"aria-multiselectable":!1,...o.ListboxProps}})}const ne=h.forwardRef(ee),nt=t=>t&&typeof t=="object"?t.title??String(t):String(t),ot=(t,e)=>typeof t!="object"||t===null?{value:t,multiple:e}:{...t,multiple:e},it=t=>n.jsx("span",{"data-testid":"more-options-tag",children:`+${t}`});function rt(){return{renderOption:(e,o,i,a,l)=>{const{title:s,inputValue:c,divider:d,fixed:u,extended:m,dense:p,destructive:g,disabled:x,subtitle:f,iconColor:j,startAdornment:b,endAdornment:C,alternativeTitle:A,secondaryText:v,multiple:M}=o,{key:B,...D}=e,k=typeof o=="string"||typeof o=="number",I=(T,R,U,z)=>U||z||(R&&typeof R=="object"&&"value"in R?String(R.value):T(R));return n.jsx(h.Fragment,{children:d?n.jsx(r.Divider,{}):n.jsxs(n.Fragment,{children:[c&&n.jsx(r.Divider,{}),n.jsxs(H.MenuItem,{...D,...!k&&{fixed:u,extended:m,dense:p,destructive:g,disabled:x,subtitle:f,iconColor:j},"aria-disabled":f||x,"aria-selected":i.selected,children:[!f&&(b||M||l)&&n.jsxs(r.ListItemIcon,{children:[l||M&&n.jsx(r.Checkbox,{checked:i.selected}),b]}),n.jsxs(r.ListItemText,{children:[I(a??nt,o,A,s),v&&n.jsx(y.Typography,{component:"p",variant:"caption",color:"text.secondary",children:v})]}),!f&&C]})]})},B)}}}function oe({getOptionLabel:t,newItemLabel:e,newItemIcon:o,multiple:i}){const a=w.useIntl(),l=y.useImperativeIntl(a),s=r.createFilterOptions(),{renderOption:c}=rt();return{creatableFilterOptions:(p,g)=>{const x=s(p,g),{inputValue:f}=g,j=p.some(b=>f===t(b));if(f.length>1&&f!==""&&!j){let b;typeof e=="function"?b=e(f):e?b=`${e} "${f}"`:b=`${l.formatMessage({id:"c4r.form.add"})} "${f}"`,x.push({inputValue:f,title:b})}return x},creatableOptionLabel:p=>typeof p=="string"?p:p.inputValue?p.inputValue:t(p),creatableRenderOption:(p,g,x)=>{const f=g.inputValue?o??n.jsx(S.AddCircleOutlineOutlined,{}):void 0,j=ot(g,!!i);return c(p,j,x,t,f)}}}function at({options:t,value:e,onChange:o,getOptionLabel:i}){const[a,l]=h.useState(Array.isArray(e)?e:e?[e]:[]),{renderOption:s}=rt();h.useEffect(()=>{const g=Array.isArray(e)?e:e?[e]:[];l(g)},[e]);const c=a.length===t.length,d=a.length>0&&a.length<t.length;return{multipleValue:a,allSelected:c,someSelected:d,handleSelectAll:g=>{const x=c?[]:[...t];l(x),o==null||o(g,x,"selectOption")},handleChange:(g,x,f)=>{l(x===null?[]:x),o==null||o(g,x,f)},multipleRenderOption:(g,x,f)=>{const j=ot(x,!0);return s(g,j,f,i)}}}function ie({children:t,showFilters:e,allSelected:o,someSelected:i,handleSelectAll:a=()=>{},multiple:l,...s},c){return n.jsxs("ul",{ref:c,...s,role:"listbox","aria-multiselectable":l,children:[e&&l&&n.jsx(_,{areAllSelected:!!o,areAnySelected:!!i,selectAll:a}),t]})}const lt=h.forwardRef(ie);function re({newItemLabel:t,newItemIcon:e,getOptionLabel:o=nt,multiple:i,disableCloseOnSelect:a,disabled:l,loading:s,showFilters:c,options:d=[],value:u,onChange:m,getLimitTagsText:p,...g},x){const{freeSolo:f=!0,...j}=g,{multipleValue:b,allSelected:C,someSelected:A,handleSelectAll:v,handleChange:M}=at({options:d,value:u,onChange:m}),{creatableFilterOptions:B,creatableOptionLabel:D,creatableRenderOption:k}=oe({getOptionLabel:o,newItemLabel:t,newItemIcon:e,multiple:i});return n.jsx(r.Autocomplete,{...j,ref:x,options:d,value:i?b:u,onChange:M,filterOptions:B,getOptionLabel:D,renderOption:k,freeSolo:f,forcePopupIcon:!0,multiple:i,disableCloseOnSelect:a??i,ListboxComponent:lt,ListboxProps:{showFilters:c,allSelected:C,someSelected:A,handleSelectAll:v,multiple:i},getLimitTagsText:p??it,disabled:l||s,popupIcon:s?n.jsx(r.CircularProgress,{size:18,color:"inherit"}):n.jsx(P.ArrowDown,{}),"data-name":"creatable-autocomplete"})}const ae=h.forwardRef(re);function le({renderOption:t,disableCloseOnSelect:e=!0,disabled:o,loading:i,showFilters:a,options:l,value:s,onChange:c,getOptionLabel:d,getLimitTagsText:u,...m},p){const{multipleValue:g,allSelected:x,someSelected:f,handleSelectAll:j,handleChange:b,multipleRenderOption:C}=at({options:l,value:s,onChange:c,getOptionLabel:d});return n.jsx(r.Autocomplete,{...m,ref:p,options:l,value:g,onChange:b,getOptionLabel:d,renderOption:t??C,ListboxComponent:lt,ListboxProps:{showFilters:a,allSelected:x,someSelected:f,handleSelectAll:j,multiple:!0},multiple:!0,getLimitTagsText:u??it,disableCloseOnSelect:e,disabled:o||i,popupIcon:i?n.jsx(r.CircularProgress,{size:18,color:"inherit"}):n.jsx(P.ArrowDown,{}),"data-name":"multiple-autocomplete"})}const se=h.forwardRef(le),ce=r.styled("div",{shouldForwardProp:t=>t!=="variant"})(({variant:t,theme:e})=>({width:"100%",borderRadius:e.spacing(.5),...t==="outlined"&&{backgroundColor:e.palette.background.paper,boxShadow:`inset 0 0 0 1px ${e.palette.divider}`}}));function de({variant:t="standard",items:e,...o}){return n.jsx(ce,{...o,variant:t,children:e.map((i,a)=>n.jsxs(r.Accordion,{disabled:i.disabled,defaultExpanded:i.defaultExpanded,onChange:i.onChange,children:[n.jsx(r.AccordionSummary,{"aria-controls":`${a}-content`,id:`${a}-header`,children:i.summary}),n.jsx(r.AccordionDetails,{children:i.content})]},a))})}const Y={large:5,medium:4,small:3,xsmall:2.25},ue=r.styled(r.Avatar,{shouldForwardProp:t=>t!=="size"&&t!=="disabled"})(({theme:t,size:e="medium",disabled:o=!1})=>({width:t.spacing(Y[e]),height:t.spacing(Y[e]),...t.typography.subtitle1,...e==="large"&&{...t.typography.h6},...e==="small"&&{...t.typography.caption,fontWeight:500},...e==="xsmall"&&{...t.typography.caption,fontWeight:500,svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL}},...o&&{opacity:.6}}));function pe(t){return n.jsx(ue,{...t})}const st=480,ge=r.styled(r.Snackbar)(({theme:t})=>({bottom:t.spacing(2),right:t.spacing(2),left:t.spacing(2),[t.breakpoints.up("sm")]:{bottom:t.spacing(4),right:"auto",left:"50%",width:"100%",maxWidth:`${st}px`}})),xe=r.styled(r.Box,{shouldForwardProp:t=>t!=="autoWidth"})(({autoWidth:t,theme:e})=>({minWidth:"100%",maxWidth:`${st}px`,margin:e.spacing(0,1),...t&&{minWidth:"auto"},[e.breakpoints.up("sm")]:{minWidth:e.spacing(40),...t&&{minWidth:"auto"}}})),fe=r.styled(W.Alert,{shouldForwardProp:t=>!["hasActions","closeable"].includes(t)})(({hasActions:t,closeable:e,icon:o,theme:i})=>({position:"relative",display:"flex",flexWrap:"wrap",columnGap:i.spacing(1),rowGap:i.spacing(.25),padding:i.spacing(1),paddingLeft:i.spacing(2),color:i.palette.common.white,backgroundColor:i.palette.common.black,".MuiAlert-message":{padding:i.spacing(.75,0)},".MuiAlert-message .MuiTypography-root, .MuiAlert-icon":{color:i.palette.common.white},".MuiAlert-message .MuiTypography-root:not(.MuiAlertTitle-root)":{...i.typography.body2},".MuiAlert-message .MuiCircularProgress-circle":{color:i.palette.common.white},".MuiAlert-icon":{position:"absolute",top:i.spacing(1),left:i.spacing(1.5),display:"flex",alignItems:"center",justifyContent:"center",width:i.spacing(3),marginTop:i.spacing(.5)},"&.MuiAlert-standardError":{backgroundColor:i.palette.error.main},...o!==!1&&{paddingLeft:i.spacing(5.5)},...e&&{paddingRight:i.spacing(6)},...!e&&!t&&{paddingRight:i.spacing(1.5)},...t&&{".MuiAlert-message":{minWidth:"fit-content",padding:i.spacing(.75,0)}}})),me=r.styled(r.Box)(({theme:t})=>({position:"absolute",top:t.spacing(1),right:t.spacing(1),"& button:hover, & button:focus-visible":{backgroundColor:t.palette.white[8]},svg:{color:t.palette.white[60]}}));function he({severity:t="neutral",autoHideDuration:e=y.NOTIFICATION_DURATION_IN_MS,closeable:o=!0,children:i,title:a,action:l,open:s,onClose:c=()=>{},autoWidth:d,icon:u,...m}){const p=w.useIntl(),g=y.useImperativeIntl(p),f=u===!1||t==="neutral"&&!u,b=e===null?null:e||y.NOTIFICATION_DURATION_IN_MS;return n.jsx(r.Portal,{children:n.jsx(ge,{...m,open:s,autoHideDuration:b,onClose:c,TransitionComponent:d?r.Fade:r.Slide,"data-auto-width":d,children:n.jsxs(xe,{sx:{position:"relative"},autoWidth:d,children:[n.jsx(fe,{severity:t,action:l,icon:f?!1:u,elevation:6,hasActions:!!l,closeable:o,title:a,children:i}),o&&n.jsx(me,{children:n.jsx(tt,{color:"default",onClick:C=>c(C,"timeout"),icon:n.jsx(S.CloseOutlined,{}),tooltip:g.formatMessage({id:"c4r.button.close"})})})]})})})}const be=r.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",height:y.APPBAR_SIZE,marginRight:t.spacing(1.5)})),ye=r.styled(r.IconButton)(({theme:t})=>({marginRight:t.spacing(1),"&.MuiButtonBase-root svg path":{fill:t.palette.brand.appBarContrastText}})),je=r.styled(r.Divider)(({theme:t})=>({borderColor:r.alpha(t.palette.brand.appBarContrastText,.12)}));function Me({onClickMenu:t}){return n.jsx(r.Box,{sx:{display:{md:"none",xs:"block"}},children:n.jsxs(be,{children:[n.jsx(ye,{onClick:t,children:n.jsx(S.MenuOutlined,{})}),n.jsx(je,{orientation:"vertical",flexItem:!0})]})})}const Ie=r.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 Ce({logo:t}){return n.jsx(Ie,{children:t})}const ve=r.styled(y.Typography)({display:"flex",alignItems:"center",whiteSpace:"nowrap"});function Be({text:t}){const e=r.useTheme();return n.jsx(ve,{component:"span",variant:"subtitle1",color:e.palette.brand.appBarContrastText,children:t})}const De=r.styled(y.Typography)(({theme:t})=>({display:"flex",alignItems:"center","&::before":{content:'"/"',margin:t.spacing(0,1),opacity:.6,color:t.palette.brand.appBarContrastText}}));function Ae({text:t}){const e=r.useTheme();return n.jsx(De,{component:"span",variant:"body2",weight:"strong",color:e.palette.brand.appBarContrastText,children:t})}const Te=r.styled(r.AppBar)(({theme:t})=>({backgroundColor:t.palette.brand.appBarMain,"& .MuiTypography-root":{color:t.palette.brand.appBarContrastText},"& .MuiIconButton-root path":{fill:t.palette.brand.appBarContrastText}})),Se=r.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",maxWidth:"calc(100% - 300px)",overflow:"hidden",[t.breakpoints.down("sm")]:{minWidth:"192px"}})),we=r.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",flex:1,marginLeft:t.spacing(1)}));function ke({children:t,brandLogo:e,brandText:o,secondaryText:i,showBurgerMenu:a=!1,onClickMenu:l,...s}){return n.jsx(Te,{...s,children:n.jsxs(r.Toolbar,{children:[n.jsxs(Se,{children:[a&&n.jsx(Me,{onClickMenu:l}),e&&n.jsx(Ce,{logo:e}),o&&n.jsx(Be,{text:o}),i&&n.jsx(Ae,{text:i})]}),n.jsx(we,{children:t})]})})}const Re=r.styled(r.Box,{shouldForwardProp:t=>!["size","variant"].includes(t)})(({size:t,variant:e,theme:o})=>({position:"absolute",right:o.spacing(5.75),...t==="small"&&{right:o.spacing(4),top:"3px"},...e==="standard"&&{right:o.spacing(4.75),...t==="small"&&{right:o.spacing(3.5)}}}));function N({size:t,variant:e,...o}){const i=w.useIntl(),a=y.useImperativeIntl(i);return n.jsx(Re,{size:t,variant:e,children:n.jsx(r.IconButton,{...o,size:t,"aria-label":a.formatMessage({id:"c4r.form.clearSelection"})})})}const Fe=r.styled(r.Box,{shouldForwardProp:t=>!["size","variant","readOnly"].includes(t)})(({size:t,variant:e,readOnly:o,theme:i})=>({".MuiInputBase-root":{"& .clearButton svg":{color:i.palette.text.hint},...t==="small"&&{paddingRight:`${i.spacing(1)} !important`},...t==="medium"&&{"& .MuiInputAdornment-root":{"& .MuiIconButton-edgeEnd":{marginRight:i.spacing(-1)}}},...e==="standard"&&{paddingRight:`${i.spacing(1)} !important`,...t==="small"&&{paddingRight:`${i.spacing(.5)} !important`}},...o&&{"& .MuiInputAdornment-root":{"& svg":{color:i.palette.text.disabled}}}}}));function q({children:t,size:e,variant:o,readOnly:i,...a}){return n.jsx(Fe,{...a,size:e,variant:o,readOnly:i,children:t})}function $({handleClear:t,variant:e="outlined",size:o="small",label:i,labelHelpTooltip:a,type:l,helperText:s,placeholder:c,slotProps:d,slots:u,error:m,showCalendar:p=!0,readOnly:g,...x}){const f=w.useIntl(),j=y.useImperativeIntl(f);return n.jsx(r.Box,{className:"CartoDatePicker-root","data-testid":"date-picker",children:n.jsx(q,{size:o,variant:e,readOnly:g,children:n.jsx(ut.DatePicker,{...x,label:i&&n.jsx(F,{label:i,type:l,icon:a&&n.jsx(r.Tooltip,{title:a,children:n.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),slotProps:{textField:{variant:e,helperText:s,placeholder:c,size:o,error:m??void 0,inputProps:{"data-testid":"date-picker-input"}},field:{clearable:!!t,onClear:t},...d},slots:{clearButton:b=>n.jsx(N,{...b,size:o,variant:e}),openPickerButton:b=>n.jsx(r.IconButton,{...b,size:o,"aria-label":j.formatMessage({id:"c4r.form.chooseDate"})}),...u},disableOpenPicker:!p,readOnly:g})})})}const Oe=r.styled(r.Box,{shouldForwardProp:t=>!["isSelected","isStartDate","isEndDate","isSelectedMonth","isLastDay","isFirstDay"].includes(t)})(({theme:t,isSelected:e,isStartDate:o,isEndDate:i,isSelectedMonth:a,isLastDay:l,isFirstDay:s})=>({position:"relative",margin:t.spacing(.25),"& .MuiPickersDay-root":{margin:0},...e&&a&&{"&::before":{content:'""',position:"absolute",top:0,right:"-2px",bottom:0,left:"-2px",backgroundColor:t.palette.primary.background,...(o||s)&&{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},...(i||l)&&{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`}},"&:first-of-type::before":{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},"&:last-of-type::before":{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`},...s&&{"&:last-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},...l&&{"&:first-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},"& .MuiPickersDay-today":{borderColor:`${t.palette.default.outlinedBorder} !important`,...(o||i)&&{boxShadow:`0 0 0 1px inset ${t.palette.background.paper}`}},"&::after":{content:'""',position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:t.palette.background.paper,borderRadius:t.shape.borderRadius,transition:"background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms"},"&:hover::after":{backgroundColor:t.palette.primary.relatedLight}}})),$e=r.styled(pt.PickersDay,{shouldForwardProp:t=>t!=="isDateRangeLimit"})(({theme:t,isDateRangeLimit:e})=>({"&.MuiPickersDay-root":{position:"relative",zIndex:1,"&.Mui-selected":{color:t.palette.text.primary},...e&&{"&.Mui-selected":{backgroundColor:`${t.palette.primary.main} !important`,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:`${t.palette.primary.dark} !important`}}}}})),Z=(t,e)=>!t||!e?!1:t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate();function J({day:t,startDate:e,endDate:o,selectedMonth:i,...a}){const l=!!(e&&Z(e,t)),s=!!(o&&Z(o,t)),c=!!(e&&o&&t.getTime()>=e.getTime()&&t.getTime()<=o.getTime()),d=t.getDate()===1,u=t.getDate()===new Date(t.getFullYear(),t.getMonth()+1,0).getDate(),m=!!(i&&t.getMonth()===i.getMonth());return n.jsx(Oe,{isSelected:c,isStartDate:l,isEndDate:s,isSelectedMonth:m,isLastDay:u,isFirstDay:d,children:n.jsx($e,{...a,day:t,selected:c||l||s,isDateRangeLimit:l||s})})}const Le=r.styled(r.Box,{shouldForwardProp:t=>!["variant"].includes(t)})(({variant:t,theme:e})=>({display:"flex",gap:t==="standard"?e.spacing(1):"1px","& .CartoDatePicker-root":{"&:first-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(.5,0,0,.5),boxShadow:`1px 0 0 0 ${e.palette.default.outlinedBorder}`,...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderRightColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(.5,0,0,.5)}},...t==="standard"&&{boxShadow:"none",borderRadius:0}}},"&:last-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(0,.5,.5,0),...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderLeftColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(0,.5,.5,0)}},...t==="standard"&&{borderRadius:0}}}}}));function Ee({globalHelperText:t,error:e,variant:o="outlined",startProps:i,endProps:a,...l}){const s=w.useIntl(),c=y.useImperativeIntl(s),[d,u]=h.useState(!1),[m,p]=h.useState(!1),[g,x]=h.useState((i==null?void 0:i.value)||null),[f,j]=h.useState((a==null?void 0:a.value)||null),[b,C]=h.useState((a==null?void 0:a.value)??(i==null?void 0:i.value)??new Date),A=e??(i==null?void 0:i.error)??(a==null?void 0:a.error),v=(I,T)=>{x(I),i!=null&&i.onChange&&i.onChange(I,T),I&&T.validationError===null&&!m&&T.trigger===null&&(p(!1),u(!0))},M=(I,T)=>{j(I),a!=null&&a.onChange&&a.onChange(I,T)},B=()=>{p(!0),u(!1),setTimeout(()=>{C(g??new Date)},120)},D=()=>{p(!1),u(!0),setTimeout(()=>{C(f??g??new Date)},120)},k=()=>{p(!1),u(!0),setTimeout(()=>{C(f??g??new Date)},120)};return n.jsxs(r.Box,{children:[n.jsxs(Le,{variant:o,children:[n.jsx($,{...l,...i,value:(i==null?void 0:i.value)??g,maxDate:f??void 0,label:(i==null?void 0:i.label)??c.formatMessage({id:"c4r.form.startDate"}),slotProps:{popper:{placement:"bottom-start","aria-label":c.formatMessage({id:"c4r.form.startDateCalendar"})},...i==null?void 0:i.slotProps},slots:{openPickerIcon:S.TodayOutlined,day:I=>n.jsx(J,{...I,startDate:g,endDate:f,selectedMonth:b}),...i==null?void 0:i.slots},error:(i==null?void 0:i.error)??e,open:m,onChange:v,onOpen:B,onClose:D,onMonthChange:I=>C(I),variant:o}),n.jsx($,{...l,...a,value:(a==null?void 0:a.value)??f,minDate:g??void 0,slotProps:{popper:{"aria-label":c.formatMessage({id:"c4r.form.endDateCalendar"})},...a==null?void 0:a.slotProps},slots:{day:I=>n.jsx(J,{...I,startDate:g,endDate:f,selectedMonth:b}),...a==null?void 0:a.slots},label:(a==null?void 0:a.label)??c.formatMessage({id:"c4r.form.endDate"}),error:(a==null?void 0:a.error)??e,open:d,onOpen:k,onClose:()=>u(!1),onChange:M,onMonthChange:I=>C(I),variant:o})]}),t&&n.jsx(r.FormHelperText,{error:A,children:t})]})}const ct=(t,e,o,i)=>{const a=t==null?void 0:t.includes("hours"),l=t==null?void 0:t.includes("seconds"),s=t==null?void 0:t.includes("minutes"),c=(t==null?void 0:t.length)===1&&t[0]==="hours";if(i)return i;const d=[];return e&&d.push("MM/dd/yyyy "),a&&d.push(o?"hh":"HH"),c||d.push(":"),s&&d.push("mm"),l&&d.push(":ss"),o&&d.push(" a"),d.join("")};function We({handleClear:t,variant:e="outlined",size:o="small",label:i,labelHelpTooltip:a,type:l,helperText:s,placeholder:c,error:d,showClock:u=!0,readOnly:m,slotProps:p,slots:g,ampm:x=!0,views:f=["hours","minutes"],format:j,...b}){const C=w.useIntl(),A=y.useImperativeIntl(C),v=h.useRef(null),[M,B]=h.useState(0);return h.useEffect(()=>{if(!v.current)return;const D=new ResizeObserver(k=>{var T;const I=(T=k[0])==null?void 0:T.contentRect.width;I&&B(I)});return D.observe(v.current),()=>{D.disconnect()}},[]),n.jsx(q,{size:o,variant:e,readOnly:m,"data-testid":"time-picker",children:n.jsx(gt.TimePicker,{...b,ref:v,label:n.jsx(F,{label:i??A.formatMessage({id:"c4r.form.time"}),type:l,icon:a&&n.jsx(r.Tooltip,{title:a,children:n.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),views:["hours"],format:ct(f,!1,x,j),slotProps:{textField:{variant:e,helperText:s,placeholder:c,size:o,error:d??void 0,inputProps:{"data-testid":"time-picker-input"}},field:{clearable:!!t,onClear:t},popper:{placement:"bottom-end"},layout:{sx:{width:M}},...p},slots:{clearButton:D=>n.jsx(N,{...D,size:o,variant:e}),openPickerButton:D=>n.jsx(r.IconButton,{...D,size:o,"aria-label":A.formatMessage({id:"c4r.form.chooseDate"})}),...g},disableOpenPicker:!u,readOnly:m,ampm:x})})}function He({handleClear:t,variant:e="outlined",size:o="small",label:i,labelHelpTooltip:a,type:l,helperText:s,placeholder:c,error:d,showCalendar:u=!0,readOnly:m,slotProps:p,slots:g,ampm:x=!0,views:f=["hours","minutes"],format:j,...b}){const C=w.useIntl(),A=y.useImperativeIntl(C);return n.jsx(q,{size:o,variant:e,readOnly:m,"data-testid":"date-time-picker",children:n.jsx(xt.DateTimePicker,{...b,label:n.jsx(F,{label:i??A.formatMessage({id:"c4r.form.time"}),type:l,icon:a&&n.jsx(r.Tooltip,{title:a,children:n.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),views:["year","month","day","hours"],format:ct(f,!0,x,j),slotProps:{textField:{variant:e,helperText:s,placeholder:c,size:o,error:d??void 0,inputProps:{"data-testid":"date-time-picker-input"}},field:{clearable:!!t,onClear:t},...p},slots:{clearButton:v=>n.jsx(N,{...v,size:o,variant:e}),openPickerButton:v=>n.jsx(r.IconButton,{...v,size:o,"aria-label":A.formatMessage({id:"c4r.form.chooseDate"})}),...g},disableOpenPicker:!u,readOnly:m,ampm:x})})}const Pe=[{outlinedBullet:!1,value:""}],_e=r.styled("ul")(({theme:t})=>({listStyle:"none",paddingLeft:0,margin:t.spacing(.5,0,0,0)})),Ne=r.styled("li")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between","&:not(:last-child)":{marginBottom:t.spacing(.5)}})),qe=r.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]})),Ge=r.styled(y.Typography)(({theme:t})=>({minWidth:t.spacing(10),marginRight:t.spacing(1.5)}));function Ve({items:t=Pe,title:e}){return n.jsxs(n.Fragment,{children:[e&&n.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:e}),n.jsx(_e,{children:t.map((o,i)=>n.jsxs(Ne,{children:[n.jsx(qe,{style:{backgroundColor:`${o.outlinedBullet?"transparent":o.color}`,borderColor:o.color}}),o.category&&n.jsx(Ge,{color:"inherit",variant:"caption",children:o.category}),n.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:o.value})]},i))})]})}const X={small:"480px",medium:"640px",large:"640px",xlarge:"720px"},L={small:{width:"432px",maxWidth:"432px"},medium:{width:"592px",maxWidth:"592px"},large:{width:"768px",maxWidth:"768px",minHeight:"576px"},xlarge:{width:"calc(100vw - 80px)",height:"calc(100vh - 80px)",maxWidth:"960px"}},E=r.styled(r.Paper,{shouldForwardProp:t=>!["fullScreen","height","width","hasForm"].includes(t)})(({fullScreen:t,height:e,width:o,hasForm:i,size:a="small",theme:l})=>({"&.MuiPaper-root":{position:"relative",display:"flex",flexDirection:"column",margin:l.spacing(5),borderRadius:l.spacing(1),...L[a],maxHeight:X[a],[`@media (max-height:${X[a]})`]:{maxHeight:"calc(100vh - 80px)",...a==="large"&&{minHeight:e!=="auto"?"calc(100vh - 80px)":"auto"}},...t&&{width:"100vw",maxWidth:`calc(100vw - ${l.spacing(10)})`,height:"100vh",maxHeight:`calc(100vh - ${l.spacing(10)})`,margin:l.spacing(5),borderRadius:l.spacing(1)},...e&&{height:e,minHeight:e},...o&&{width:o},[l.breakpoints.down("sm")]:{position:"absolute",width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",top:0,bottom:0,left:0,right:0,margin:0,borderRadius:0,...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}},...i&&{maxHeight:`calc(100vh - ${l.spacing(10)})`,form:{flex:1,display:"flex",flexDirection:"column",justifyContent:"space-between",overflow:"hidden",...L[a],maxWidth:"100%",...t&&{width:"100%",maxWidth:"100%",height:"100%",maxHeight:"100%"},...e&&{height:e,minHeight:e},...o&&{width:o},[l.breakpoints.down("sm")]:{width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}}}}}}));function Ue({nonModal:t,children:e,size:o="small",PaperProps:i,fullScreen:a,height:l,width:s,hasForm:c,"aria-label":d,"data-testid":u,...m}){return t?n.jsx(E,{size:o,fullScreen:a,height:l,width:s,hasForm:c,"aria-label":d,"data-testid":u,...m,children:e}):n.jsx(r.Dialog,{PaperComponent:E,PaperProps:{...i,size:o,fullScreen:a,height:l,width:s,hasForm:c},fullScreen:a,role:"section","aria-label":d,"data-testid":u,"data-size":o,"data-width":s,"data-height":l,...m,children:e})}const ze=r.styled(r.DialogTitle)(()=>({padding:0,zIndex:10})),Ye=r.styled(r.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",padding:t.spacing(2),minHeight:t.spacing(8)})),K=r.styled(r.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(1),overflow:"hidden"})),Ze=r.styled(S.CloseOutlined)(({theme:t})=>({color:t.palette.text.secondary})),Je=r.styled(r.Divider)(()=>({"+ .MuiDialogContent-root":{borderTop:"none !important"}}));function Xe({title:t,chipLabel:e,chipProps:o,children:i,onClose:a,secondaryActions:l,"aria-label":s,closeIcon:c,...d}){const u=w.useIntl(),m=y.useImperativeIntl(u);return n.jsxs(n.Fragment,{children:[n.jsxs(ze,{component:"div",...d,children:[n.jsxs(Ye,{children:[n.jsxs(K,{flex:1,maxWidth:.8,children:[n.jsx(y.Typography,{component:"h2",variant:"inherit",noWrap:!0,"aria-label":s,children:t}),e&&n.jsx(r.Chip,{color:"default",label:e,...o})]}),n.jsxs(K,{children:[l,a&&n.jsx(r.Tooltip,{title:m.formatMessage({id:"c4r.button.close"}),placement:"left",children:n.jsx(r.IconButton,{onClick:a,children:c||n.jsx(Ze,{"data-testid":"CloseIcon"})})})]})]}),i]}),i&&n.jsx(Je,{})]})}const Ke=r.styled(r.DialogContent,{shouldForwardProp:t=>!["scrollableContent","withGutter","withBottomGutter"].includes(t)})(({theme:t,scrollableContent:e,withGutter:o,withBottomGutter:i})=>({display:"flex",flexDirection:"column",gap:t.spacing(3),padding:0,...t.typography.body2,color:t.palette.text.secondary,".MuiAlert-root":{minHeight:"auto"},...e&&{borderBottom:`1px solid ${t.palette.divider}`,"+ .MuiDivider-root":{display:"none"}},...o&&{padding:` ${t.spacing(1,2,0)} !important`,".MuiDialog-paperFullScreen &":{padding:`${t.spacing(2,2,0)} !important`}},...i&&{paddingBottom:`${t.spacing(3)} !important`,".MuiDialog-paperFullScreen &":{paddingBottom:`${t.spacing(3)} !important`}}}));function Qe({children:t,scrollableContent:e,hasFooterAlert:o,withGutter:i=!0,withBottomGutter:a=!0,onScroll:l,...s},c){const d=r.useTheme(),[u,m]=h.useState(null);h.useImperativeHandle(c,()=>u,[u]);const p=h.useCallback(x=>{const f=Math.abs(x.scrollHeight-x.clientHeight-x.scrollTop)<1,j=x.scrollTop===0,b=`1px solid ${d.palette.divider}`;x.style.borderTop=j?"none":b,x.style.borderBottom=f&&!o?"none":b},[d.palette.divider,o]),g=h.useCallback(x=>{p(x.target),l==null||l(x)},[p,l]);return h.useEffect(()=>{u&&p(u)},[u,p]),h.useEffect(()=>{if(!u||typeof ResizeObserver>"u")return;const x=new ResizeObserver(()=>{p(u)});return x.observe(u),()=>x.disconnect()},[u,p]),n.jsx(Ke,{ref:m,onScroll:g,scrollableContent:e,withGutter:i,withBottomGutter:a&&i,...s,children:t})}const dt=h.forwardRef(Qe),tn=r.styled(dt,{shouldForwardProp:t=>t!=="withAlert"})(({withAlert:t,theme:e})=>({padding:`${e.spacing(0,2)} !important`,...t&&{paddingBottom:`${e.spacing(3)} !important`}})),en=r.styled(W.Alert)(({theme:t})=>({minHeight:"auto",padding:0,backgroundColor:"transparent","& .MuiTypography-root":{color:t.palette.text.secondary,a:{color:t.palette.primary.main}},"& .MuiAlertTitle-root":{color:t.palette.text.primary}}));function G({children:t,severity:e="neutral",...o}){return n.jsx(en,{severity:e,...o,children:t})}const nn=r.styled(r.Box,{shouldForwardProp:t=>!["dark","hasChildren"].includes(t)})(({dark:t,hasChildren:e,theme:o})=>({flex:"0 0 auto",display:"block",minHeight:e?o.spacing(8):"auto",zIndex:10,...t&&{backgroundColor:o.palette.common.black,color:o.palette.white[60],".MuiAlert-root":{".MuiTypography-root, .MuiAlert-message :not(.MuiAlertTitle-root)":{color:o.palette.white[60],a:{color:`${o.palette.secondary.main} !important`}},".MuiAlert-icon":{color:o.palette.white[60]}}}})),on=r.styled(r.Box)(()=>({display:"flex",alignItems:"center",justifyContent:"space-between","& > div:empty":{padding:0}})),rn=r.styled(r.Box,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2)})),V=r.styled(r.DialogActions,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2),margin:0,".MuiButton-root + .MuiButton-root":{marginLeft:0}})),an=r.styled(r.Divider)(()=>({marginTop:"-1px"}));function ln({children:t,secondaryActions:e,alertContent:o,alertProps:i,dark:a,topContent:l,...s}){return n.jsxs(n.Fragment,{children:[l,!!o&&n.jsx(an,{}),n.jsxs(nn,{...s,dark:a,"data-theme":a?"dark":"light",hasChildren:!!t,children:[!!o&&n.jsx(r.Box,{sx:{p:2,pt:1.5,pb:1},children:n.jsx(G,{...i,children:o})}),n.jsxs(on,{children:[n.jsx(rn,{hasAlert:!!o,children:e}),n.jsx(V,{hasAlert:!!o,children:t})]})]})]})}const sn=r.styled(r.Box)(({theme:t})=>({position:"absolute",width:"100%",zIndex:100,top:0,bottom:0,left:0,right:0,overflow:"hidden",display:"flex",boxSizing:"border-box",alignItems:"flex-end",background:t.palette.white[60]})),cn=r.styled("div")(()=>({width:"100%"})),dn=r.styled(r.Box)(({theme:t})=>({width:"100%",padding:t.spacing(1.5,2,2),backgroundColor:t.palette.background.paper,borderTop:`1px solid ${t.palette.divider}`,".MuiDialogActions-root":{padding:0,marginTop:t.spacing(1)}}));function un({children:t,onClickAway:e,actions:o,severity:i="warning",opened:a,"data-testid":l,"aria-label":s,...c}){const d=h.useRef(null),u=r.useTheme(),m=()=>{e&&e()};return n.jsx(sn,{ref:d,"data-testid":l,"aria-label":s,role:"presentation",children:n.jsx(ft,{onClickAway:m,children:n.jsx(r.Slide,{direction:"up",in:a,container:d.current,mountOnEnter:!0,unmountOnExit:!0,easing:u.transitions.easing.easeOut,timeout:350,children:n.jsx(cn,{children:n.jsxs(dn,{children:[n.jsx(G,{severity:i,...c,children:t}),n.jsx(V,{children:o})]})})})})})}const pn=r.styled(r.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",height:t.spacing(8),marginBottom:t.spacing(2),"& > div":{flex:1}})),gn=r.styled(r.Box)(({theme:t})=>({display:"flex",flex:1,flexDirection:"column",justifyContent:"center",alignItems:"center",position:"relative","&:before, &:after":{content:'""',background:t.palette.divider,position:"absolute",top:t.spacing(1.25),height:t.spacing(.25),width:`calc(50% - ${t.spacing(2.5)})`},"&:before":{left:0},"&:after":{right:0},"&:first-of-type:before":{content:"none"},"&:last-of-type:after":{content:"none"}}));function xn({theme:t,completed:e,current:o}){return e?{background:t.palette.success.main,borderColor:t.palette.success.main,color:t.palette.common.white}:o?{background:t.palette.text.primary,borderColor:t.palette.text.primary,color:t.palette.common.white}:{borderColor:t.palette.text.secondary,color:t.palette.text.secondary}}const fn=r.styled("span",{shouldForwardProp:t=>t!=="completed"&&t!=="current"})(({theme:t,completed:e,current:o})=>({display:"flex",justifyContent:"center",alignItems:"center",height:t.spacing(3),width:t.spacing(3),marginBottom:t.spacing(1),borderRadius:"50%",border:`${t.spacing(.25)} solid currentColor`,...t.typography.caption,...xn({theme:t,completed:e,current:o})}));function mn({currentStep:t,stepsLabels:e,...o}){return n.jsx(pn,{...o,children:n.jsx(r.Box,{sx:{display:"flex"},children:e.map((i,a)=>{const l=a+1,s=l===t,c=l<t,d=c?"success.main":s?"textPrimary":"textSecondary";return n.jsxs(gn,{"data-state":c?"completed":s?"current":"uncompleted",children:[n.jsx(fn,{completed:c,current:s,children:c?n.jsx(S.Check,{fontSize:"small","aria-label":"Completed step"}):l}),n.jsx(y.Typography,{variant:"caption",component:"div",color:d,children:i})]},a)})})})}exports.TablePaginationActions=y.TablePaginationActions;exports.Typography=y.Typography;exports.Alert=W.Alert;exports.MenuItem=H.MenuItem;exports.AccordionGroup=de;exports.AppBar=ke;exports.Autocomplete=ne;exports.Avatar=pe;exports.Button=yt;exports.CreatableAutocomplete=ae;exports.DatePicker=$;exports.DateRangePicker=Ee;exports.DateTimePicker=He;exports.Dialog=Ue;exports.DialogActions=V;exports.DialogAlert=G;exports.DialogConfirmation=un;exports.DialogContent=dt;exports.DialogContentPadded=tn;exports.DialogFooter=ln;exports.DialogHeader=Xe;exports.DialogPaper=E;exports.DialogStepper=mn;exports.IconButton=tt;exports.LabelWithIndicator=F;exports.Menu=Lt;exports.MenuItemFilter=_;exports.MenuList=Ht;exports.MultipleAutocomplete=se;exports.MultipleSelectField=Zt;exports.PasswordField=vt;exports.SelectField=Q;exports.Snackbar=he;exports.TimePicker=We;exports.ToggleButtonGroup=wt;exports.TooltipData=Ve;exports.UploadField=te;exports.UploadFieldBase=et;exports.dialogDimensionsBySize=L;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),h=require("react"),a=require("@mui/material"),y=require("../TablePaginationActions-V8ultBUz.cjs"),k=require("react-intl"),S=require("@mui/icons-material"),H=require("../Alert-BbMbtaix.cjs");require("cartocolor");const _=require("../MenuItem-Dbss-WG1.cjs"),P=require("../ArrowDown-CGnG0E-4.cjs"),ut=require("@mui/x-date-pickers/DatePicker"),pt=require("@mui/x-date-pickers"),gt=require("@mui/x-date-pickers/TimePicker"),xt=require("@mui/x-date-pickers/DateTimePicker"),ft=require("@mui/material/ClickAwayListener"),mt=a.styled(a.Box)({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}),ht=a.styled(a.Box)({visibility:"hidden",pointerEvents:"none"});function bt({children:t,loading:e,disabled:o,startIcon:i,endIcon:r,loadingPosition:l,...s},d){const c=n.jsx(a.CircularProgress,{size:18,color:"inherit"}),g=e&&l===void 0,m=()=>g?n.jsxs(a.Box,{sx:{position:"relative"},children:[n.jsx(mt,{children:c}),n.jsx(ht,{children:t})]}):t,u=f=>{if(!g)return e&&l!==void 0?l===f?c:void 0:f==="start"?i:r};return n.jsx(a.Button,{disabled:e||o,startIcon:u("start"),endIcon:u("end"),...s,role:"button",ref:d,children:n.jsx(y.Typography,{variant:"inherit",color:"inherit",noWrap:!0,component:"span",children:m()})})}const yt=h.forwardRef(bt),jt=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(.5)})),Mt=a.styled(y.Typography)(({theme:t})=>({".Mui-disabled &":{color:t.palette.text.disabled}})),It=a.styled(a.Box)(({theme:t})=>({display:"flex",svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL,fontSize:y.ICON_SIZE_SMALL,path:{fill:t.palette.text.secondary,".Mui-disabled &":{fill:t.palette.text.disabled}}}}));function O({label:t,type:e,icon:o,inheritSize:i}){return n.jsxs(jt,{children:[t,e&&n.jsx(Mt,{component:"span",variant:i?"inherit":"caption",color:"textSecondary",weight:"regular",children:e==="required"?"(required)":"(optional)"}),o&&n.jsx(It,{children:o})]})}function Ct({InputProps:t,size:e="small",...o},i){const r=k.useIntl(),l=y.useImperativeIntl(r),[s,d]=h.useState(!1),c=()=>d(!s);return n.jsx(a.TextField,{...o,ref:i,type:s?"text":"password",size:e,InputProps:{...t,endAdornment:n.jsx(a.InputAdornment,{position:"end",children:n.jsx(a.IconButton,{size:e,onClick:c,children:n.jsx(a.Tooltip,{title:l.formatMessage({id:`c4r.form.${s?"hidePassword":"showPassword"}`}),children:s?n.jsx(S.VisibilityOffOutlined,{}):n.jsx(S.VisibilityOutlined,{})})})})}})}const vt=h.forwardRef(Ct),$={};function Bt(t="$lodash$"){$[t]||($[t]=0);const e=++$[t];return t==="$lodash$"?`${e}`:`${t}${e}`}const Dt=a.styled(a.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)}})),At=a.styled(a.MenuItem)(()=>({display:"none"}));function Tt({children:t,placeholder:e,size:o="small",displayEmpty:i,menuProps:r,inputProps:l,labelId:s,label:d,labelSecondary:c,helperText:g,name:m,error:u,focused:f,disabled:p,fullWidth:x,required:M,"aria-label":b,...D},C){const v=o==="small",[j]=h.useState(()=>Bt("select-label-")),I=d?s??j:void 0;return n.jsxs(a.FormControl,{size:o,error:u,focused:f,disabled:p,fullWidth:x,required:M,children:[n.jsxs(a.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[d&&n.jsx(a.InputLabel,{shrink:!0,id:I,children:d}),c&&n.jsx(a.Box,{display:"flex",alignItems:"center",ml:2,mb:.5,children:c})]}),n.jsxs(Dt,{...D,labelId:I,name:m,ref:C,size:o,fullWidth:x,displayEmpty:i??!!e,inputProps:{...l,"aria-label":b},MenuProps:{...r,PopoverClasses:{paper:v?"MuiMenu-paper-sizeSmall":void 0},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:0,horizontal:"left"}},children:[e&&n.jsx(At,{disabled:!0,value:"",children:n.jsx(y.Typography,{variant:v?"body2":"body1",color:"text.hint",component:"span",children:e})}),t]}),g&&n.jsx(a.FormHelperText,{"aria-label":`${m}-helper`,children:g})]})}const Q=h.forwardRef(Tt),St=a.styled(a.ToggleButtonGroup,{shouldForwardProp:t=>t!=="variant"&&t!=="backgroundColor"})(({variant:t,backgroundColor:e,theme:o})=>({...t==="contained"&&{boxShadow:"none"},...t==="unbounded"&&{boxShadow:"none",borderRadius:o.spacing(.5),"& .MuiDivider-root":{height:o.spacing(4),"&.MuiToggleButtonGroup-groupedHorizontal":{height:o.spacing(4)},"&.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:o.spacing(4),margin:`${o.spacing(.5,0,1)} !important`,borderRadius:"0 !important"}},"& .MuiToggleButton-sizeSmall":{margin:0,"&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal":{height:o.spacing(3)},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:o.spacing(3)}},".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0,"&:first-of-type":{marginLeft:0},"&:not(:last-of-type)":{marginRight:o.spacing(.5)}},"&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:o.spacing(0,.5)}},"&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:o.spacing(0,0,.5),"&:not(:last-of-type)":{marginRight:0},"&:last-of-type":{marginBottom:0}}}},...e==="primary"&&{backgroundColor:o.palette.background.paper},...e==="secondary"&&{backgroundColor:o.palette.background.default},...e==="transparent"&&{backgroundColor:"transparent"}}));function kt({children:t,variant:e="floating",backgroundColor:o,...i}){const l=e==="unbounded"?"transparent":"primary";return n.jsx(St,{...i,variant:e,backgroundColor:o??l,children:t})}const wt=a.styled("div")(({theme:t})=>({position:"relative",display:"inline-flex","& + &, & + .optionIconButton":{marginLeft:t.spacing(.5)}})),Rt=a.styled(a.IconButton,{shouldForwardProp:t=>!["active"].includes(t)})(({active:t,theme:e})=>({...t&&{color:e.palette.primary.main,backgroundColor:e.palette.primary.background,"& svg:not(.doNotFillIcon) path":{fill:e.palette.primary.main}}}));function Ft({tooltip:t,tooltipPlacement:e="top",icon:o,size:i="medium",variant:r="icon",color:l="default",sx:s,className:d,loading:c,disabled:g,active:m,...u},f){return n.jsx(a.Tooltip,{placement:e,title:t??"",children:n.jsx(wt,{className:`optionIconButton ${d??""}`,sx:s,"data-testid":"icon-button",children:n.jsx(Rt,{...u,ref:f,size:i,variant:r,color:l,active:m,disabled:g||c,role:"button",children:c?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):o})})})}const tt=h.forwardRef(Ft),Ot=a.styled(a.Menu,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:o,height:i})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},...o&&{".MuiList-root":{width:o,minWidth:o}},...i&&{".MuiMenu-paper":{overflow:"hidden"},".MuiList-root":{maxHeight:i}}}));function $t({extended:t,width:e,height:o,MenuListProps:i,...r},l){return n.jsx(Ot,{...r,ref:l,"data-name":"menu",width:e,height:o,extended:t,MenuListProps:{...i,"data-width":e,"data-height":o,"data-extended":t}})}const Lt=h.forwardRef($t),Et=a.styled(a.MenuList,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:o,height:i})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},"&.MuiList-root":{...o&&{width:o,minWidth:o},...i&&{maxHeight:i}}}));function Wt({extended:t,width:e,height:o,...i},r){return n.jsx(Et,{...i,ref:r,width:e,height:o,extended:t,"data-name":"menu-list","data-width":e,"data-height":o,"data-extended":t})}const Ht=h.forwardRef(Wt),_t=a.styled(_.MenuItem)(()=>({marginTop:"0 !important"})),Pt=a.styled(a.Link)(({disabled:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",textAlign:"initial",...t&&{pointerEvents:"none",color:e.palette.text.disabled}}));function Nt({areAllSelected:t,areAnySelected:e,selectAll:o,selectAllDisabled:i,...r},l){const s=k.useIntl(),d=y.useImperativeIntl(s);return n.jsx(_t,{...r,ref:l,fixed:!0,"data-name":"menu-filter",children:n.jsxs(Pt,{variant:"body2",color:"textPrimary",component:"button",underline:"none",disabled:!!i,onClick:o,tabIndex:0,children:[n.jsx(a.Checkbox,{checked:t,indeterminate:e&&!t,disabled:i}),d.formatMessage({id:"c4r.form.selectAll"})]})})}const N=h.forwardRef(Nt);function qt({selectedOptions:t,options:e,onChange:o}){const[i,r]=h.useState(t??[]),l=e.length===i.length,s=i.length>0;return h.useEffect(()=>{i!==t&&r(i)},[t]),{areAllSelected:l,areAnySelected:s,currentOptions:i,handleChange:m=>{const{target:{value:u}}=m,f=typeof u=="string"?u.split(","):u.filter(p=>p!==void 0);r(f),o(f)},selectAll:()=>{const m=e==null?void 0:e.filter(({disabled:u})=>!u).map(({value:u})=>u);m&&(m.every(f=>i.includes(f))?(r([]),o([])):(r(m),o(m)))},unselectAll:()=>{r([]),o([])}}}const Gt=a.styled(a.MenuItem)(({theme:t})=>({"&.Mui-disabled":{pointerEvents:"auto","&:hover":{backgroundColor:`${t.palette.background.default} !important`}}})),Vt=a.styled(a.InputAdornment,{shouldForwardProp:t=>t!=="size"})(({theme:t,size:e})=>({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},...e==="medium"&&{top:t.spacing(3),right:t.spacing(5)}})),Ut=[],zt=()=>{};function Yt({options:t=Ut,selectedOptions:e,size:o="small",placeholder:i,showCounter:r,showFilters:l=!0,onChange:s=zt,selectAllDisabled:d,tooltipPlacement:c,variant:g,...m},u){const{areAllSelected:f,areAnySelected:p,currentOptions:x,handleChange:M,selectAll:b,unselectAll:D}=qt({options:t,selectedOptions:e,onChange:s}),C=o==="small",v=C||g==="standard"?0:2,j=k.useIntl(),I=y.useImperativeIntl(j),T=`${x.length} ${I.formatMessage({id:"c4r.form.selected"})}`,w=h.useMemo(()=>f?n.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"textPrimary",ml:v,children:I.formatMessage({id:"c4r.form.allSelected"})}):p?n.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"textPrimary",ml:v,children:r&&x.length>1?T:x.join(", ")}):n.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"text.hint",ml:v,children:i??I.formatMessage({id:"c4r.form.noneSelected"})}),[f,p,T,x,I,C,v,i,r]);return n.jsxs(Q,{...m,ref:u,multiple:!0,displayEmpty:!0,placeholder:i,value:x,renderValue:()=>w,onChange:M,size:o,variant:g,endAdornment:l&&p&&n.jsx(Vt,{position:"end",size:o,children:n.jsx(a.IconButton,{onClick:D,size:o,children:n.jsx(S.Cancel,{})})}),menuProps:{PaperProps:{sx:{".MuiList-root":{paddingTop:0}}}},children:[l&&n.jsx(N,{areAllSelected:f,areAnySelected:p,selectAll:b,selectAllDisabled:d}),t==null?void 0:t.map(A=>{const F=n.jsxs(Gt,{value:A.value,disabled:A.disabled,tabIndex:0,children:[n.jsx(a.Checkbox,{disabled:A.disabled,checked:x.includes(A.value)}),n.jsx(a.ListItemText,{primary:A.label})]},A.value);return A.tooltip?n.jsx(a.Tooltip,{title:A.tooltip,placement:c,children:F},A.value):F})]})}const Zt=h.forwardRef(Yt),Jt=a.styled(a.TextField,{shouldForwardProp:t=>t!=="cursor"})(({cursor:t,theme:e})=>({"&.MuiTextField-root .MuiInputBase-root":{cursor:t,paddingRight:e.spacing(1),"& input":{cursor:t},"&.Mui-disabled":{pointerEvents:"none","& .MuiButtonBase-root":{color:e.palette.text.disabled}},"&.MuiInputBase-sizeSmall":{paddingRight:e.spacing(.5)}},"& .MuiFormLabel-root":{cursor:t,"&.Mui-disabled":{pointerEvents:"none"}}}));function Xt({buttonText:t,hasFiles:e,size:o,error:i,disabled:r,handleReset:l,handleOpen:s,inProgress:d}){return n.jsx(a.InputAdornment,{position:"end",children:d?n.jsx(a.IconButton,{"aria-label":"loading",disabled:!0,size:o,children:n.jsx(a.CircularProgress,{size:18})}):e?n.jsx(a.IconButton,{onClick:l,size:o,"aria-label":"delete",disabled:r,children:n.jsx(S.Cancel,{})}):n.jsx(a.Button,{onClick:s,size:o,variant:"text",color:i?"default":"primary",disabled:r,children:t})})}function et({name:t,multiple:e,handleReset:o,handleOpen:i,dragOver:r,error:l,placeholder:s,focused:d,buttonText:c="Browse",inProgress:g,InputProps:m,size:u="small",hasFiles:f,cursor:p="pointer",...x}){return n.jsx(Jt,{...x,size:u,error:l,placeholder:s,focused:d??r,cursor:p,InputProps:{...m,name:t,readOnly:!0,endAdornment:n.jsx(Xt,{buttonText:c,hasFiles:f,size:u,error:l,disabled:!!r,handleReset:o,handleOpen:i,inProgress:g})}})}function Kt({onChange:t,files:e,multiple:o,placeholder:i,uploadInputRef:r}){const l=k.useIntl(),s=y.useImperativeIntl(l),[d,c]=h.useState(""),[g,m]=h.useState(!1);h.useEffect(()=>{!e||e.length===0?c(""):e.length===1?c(e[0].name):c(s.formatMessage({id:"c4r.form.filesSelected"},{count:e.length}))},[e,s]);const u=()=>{var j;(j=r.current)==null||j.click()},f=j=>{j.preventDefault(),m(!0)},p=j=>{j.preventDefault(),m(!1)},x=j=>{j.preventDefault(),m(!1);const I=j.dataTransfer.items,T=M(I);t==null||t(T)},M=j=>{const I=[];for(const T of Array.from(j))if(T.kind==="file"){const w=T.getAsFile();I.push(w)}return I},b=j=>{const I=Array.from(j.target.files);t==null||t(I)},D=j=>{j.stopPropagation(),c("")},C=h.useMemo(()=>{const j=s.formatMessage({id:"c4r.form.dragPlaceholder"},{count:o?0:1}),I=s.formatMessage({id:"c4r.form.dragActivePlaceholder"},{count:o?0:1});let T="";return g?T=I:T=i??j,T},[g,o,i,s]);return{filesText:d,getPlaceholder:C,dragOver:g,inputEvents:{onDragOver:f,onDragLeave:p,onDrop:x,onClick:u},handleFiles:b,handleReset:D}}const Qt=["application/JSON"];function te({name:t,buttonText:e,accept:o,files:i,inProgress:r,onChange:l,multiple:s,placeholder:d,error:c,focused:g,nativeInputProps:m,...u}){const f=o??Qt,p=h.useRef(null),{filesText:x,getPlaceholder:M,dragOver:b,inputEvents:D,handleFiles:C,handleReset:v}=Kt({uploadInputRef:p,files:i,onChange:l,multiple:s,placeholder:d});return n.jsxs(n.Fragment,{children:[n.jsx(et,{...u,placeholder:M,value:x,error:c,focused:g??b,handleReset:v,dragOver:b,inProgress:r,hasFiles:!!x,InputProps:D,buttonText:e}),n.jsx("input",{...m,ref:p,style:{display:"none"},type:"file","aria-label":t,name:t,accept:String(f),multiple:s,onChange:C})]})}function ee({disabled:t,loading:e,...o},i){return n.jsx(a.Autocomplete,{...o,ref:i,disabled:t||e,popupIcon:e?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):n.jsx(P.ArrowDown,{}),"data-name":"autocomplete",ListboxProps:{"aria-multiselectable":!1,...o.ListboxProps}})}const ne=h.forwardRef(ee),nt=t=>t&&typeof t=="object"?t.title??String(t):String(t),ot=(t,e)=>typeof t!="object"||t===null?{value:t,multiple:e}:{...t,multiple:e},it=t=>n.jsx("span",{"data-testid":"more-options-tag",children:`+${t}`});function at(){return{renderOption:(e,o,i,r,l)=>{const{title:s,inputValue:d,divider:c,fixed:g,extended:m,dense:u,destructive:f,disabled:p,subtitle:x,iconColor:M,startAdornment:b,endAdornment:D,alternativeTitle:C,secondaryText:v,multiple:j}=o,{key:I,...T}=e,w=typeof o=="string"||typeof o=="number",A=(F,B,R,z)=>R||z||(B&&typeof B=="object"&&"value"in B?String(B.value):F(B));return n.jsx(h.Fragment,{children:c?n.jsx(a.Divider,{}):n.jsxs(n.Fragment,{children:[d&&n.jsx(a.Divider,{}),n.jsxs(_.MenuItem,{...T,...!w&&{fixed:g,extended:m,dense:u,destructive:f,disabled:p,subtitle:x,iconColor:M},"aria-disabled":x||p,"aria-selected":i.selected,children:[!x&&(b||j||l)&&n.jsxs(a.ListItemIcon,{children:[l||j&&n.jsx(a.Checkbox,{checked:i.selected}),b]}),n.jsxs(a.ListItemText,{children:[A(r??nt,o,C,s),v&&n.jsx(y.Typography,{component:"p",variant:"caption",color:"text.secondary",children:v})]}),!x&&D]})]})},I)}}}function oe({getOptionLabel:t,newItemLabel:e,newItemIcon:o,multiple:i}){const r=k.useIntl(),l=y.useImperativeIntl(r),s=a.createFilterOptions(),{renderOption:d}=at();return{creatableFilterOptions:(u,f)=>{const p=s(u,f),{inputValue:x}=f,M=u.some(b=>x===t(b));if(x.length>1&&x!==""&&!M){let b;typeof e=="function"?b=e(x):e?b=`${e} "${x}"`:b=`${l.formatMessage({id:"c4r.form.add"})} "${x}"`,p.push({inputValue:x,title:b})}return p},creatableOptionLabel:u=>typeof u=="string"?u:u.inputValue?u.inputValue:t(u),creatableRenderOption:(u,f,p)=>{const x=f.inputValue?o??n.jsx(S.AddCircleOutlineOutlined,{}):void 0,M=ot(f,!!i);return d(u,M,p,t,x)}}}function rt({options:t,value:e,onChange:o,getOptionLabel:i}){const[r,l]=h.useState(Array.isArray(e)?e:e?[e]:[]),{renderOption:s}=at();h.useEffect(()=>{const f=Array.isArray(e)?e:e?[e]:[];l(f)},[e]);const d=r.length===t.length,c=r.length>0&&r.length<t.length;return{multipleValue:r,allSelected:d,someSelected:c,handleSelectAll:f=>{const p=d?[]:[...t];l(p),o==null||o(f,p,"selectOption")},handleChange:(f,p,x)=>{l(p===null?[]:p),o==null||o(f,p,x)},multipleRenderOption:(f,p,x)=>{const M=ot(p,!0);return s(f,M,x,i)}}}function ie({children:t,showFilters:e,allSelected:o,someSelected:i,handleSelectAll:r=()=>{},multiple:l,...s},d){return n.jsxs("ul",{ref:d,...s,role:"listbox","aria-multiselectable":l,children:[e&&l&&n.jsx(N,{areAllSelected:!!o,areAnySelected:!!i,selectAll:r}),t]})}const lt=h.forwardRef(ie);function ae({newItemLabel:t,newItemIcon:e,getOptionLabel:o=nt,multiple:i,disableCloseOnSelect:r,disabled:l,loading:s,showFilters:d,options:c=[],value:g,onChange:m,getLimitTagsText:u,...f},p){const{freeSolo:x=!0,...M}=f,{multipleValue:b,allSelected:D,someSelected:C,handleSelectAll:v,handleChange:j}=rt({options:c,value:g,onChange:m}),{creatableFilterOptions:I,creatableOptionLabel:T,creatableRenderOption:w}=oe({getOptionLabel:o,newItemLabel:t,newItemIcon:e,multiple:i});return n.jsx(a.Autocomplete,{...M,ref:p,options:c,value:i?b:g,onChange:j,filterOptions:I,getOptionLabel:T,renderOption:w,freeSolo:x,forcePopupIcon:!0,multiple:i,disableCloseOnSelect:r??i,ListboxComponent:lt,ListboxProps:{showFilters:d,allSelected:D,someSelected:C,handleSelectAll:v,multiple:i},getLimitTagsText:u??it,disabled:l||s,popupIcon:s?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):n.jsx(P.ArrowDown,{}),"data-name":"creatable-autocomplete"})}const re=h.forwardRef(ae);function le({renderOption:t,disableCloseOnSelect:e=!0,disabled:o,loading:i,showFilters:r,options:l,value:s,onChange:d,getOptionLabel:c,getLimitTagsText:g,...m},u){const{multipleValue:f,allSelected:p,someSelected:x,handleSelectAll:M,handleChange:b,multipleRenderOption:D}=rt({options:l,value:s,onChange:d,getOptionLabel:c});return n.jsx(a.Autocomplete,{...m,ref:u,options:l,value:f,onChange:b,getOptionLabel:c,renderOption:t??D,ListboxComponent:lt,ListboxProps:{showFilters:r,allSelected:p,someSelected:x,handleSelectAll:M,multiple:!0},multiple:!0,getLimitTagsText:g??it,disableCloseOnSelect:e,disabled:o||i,popupIcon:i?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):n.jsx(P.ArrowDown,{}),"data-name":"multiple-autocomplete"})}const se=h.forwardRef(le),ce=a.styled("div",{shouldForwardProp:t=>t!=="variant"})(({variant:t,theme:e})=>({width:"100%",borderRadius:e.spacing(.5),...t==="outlined"&&{backgroundColor:e.palette.background.paper,boxShadow:`inset 0 0 0 1px ${e.palette.divider}`}}));function de({variant:t="standard",items:e,...o}){return n.jsx(ce,{...o,variant:t,children:e.map((i,r)=>n.jsxs(a.Accordion,{disabled:i.disabled,defaultExpanded:i.defaultExpanded,onChange:i.onChange,children:[n.jsx(a.AccordionSummary,{"aria-controls":`${r}-content`,id:`${r}-header`,children:i.summary}),n.jsx(a.AccordionDetails,{children:i.content})]},r))})}const Y={large:5,medium:4,small:3,xsmall:2.25},ue=a.styled(a.Avatar,{shouldForwardProp:t=>t!=="size"&&t!=="disabled"})(({theme:t,size:e="medium",disabled:o=!1})=>({width:t.spacing(Y[e]),height:t.spacing(Y[e]),...t.typography.subtitle1,...e==="large"&&{...t.typography.h6},...e==="small"&&{...t.typography.caption,fontWeight:500},...e==="xsmall"&&{...t.typography.caption,fontWeight:500,svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL}},...o&&{opacity:.6}}));function pe(t){return n.jsx(ue,{...t})}const st=480,ge=a.styled(a.Snackbar)(({theme:t})=>({bottom:t.spacing(2),right:t.spacing(2),left:t.spacing(2),[t.breakpoints.up("sm")]:{bottom:t.spacing(4),right:"auto",left:"50%",width:"100%",maxWidth:`${st}px`}})),xe=a.styled(a.Box,{shouldForwardProp:t=>t!=="autoWidth"})(({autoWidth:t,theme:e})=>({minWidth:"100%",maxWidth:`${st}px`,margin:e.spacing(0,1),...t&&{minWidth:"auto"},[e.breakpoints.up("sm")]:{minWidth:e.spacing(40),...t&&{minWidth:"auto"}}})),fe=a.styled(H.Alert,{shouldForwardProp:t=>!["hasActions","closeable"].includes(t)})(({hasActions:t,closeable:e,icon:o,theme:i})=>({position:"relative",display:"flex",flexWrap:"wrap",columnGap:i.spacing(1),rowGap:i.spacing(.25),padding:i.spacing(1),paddingLeft:i.spacing(2),color:i.palette.common.white,backgroundColor:i.palette.common.black,".MuiAlert-message":{padding:i.spacing(.75,0)},".MuiAlert-message .MuiTypography-root, .MuiAlert-icon":{color:i.palette.common.white},".MuiAlert-message .MuiTypography-root:not(.MuiAlertTitle-root)":{...i.typography.body2},".MuiAlert-message .MuiCircularProgress-circle":{color:i.palette.common.white},".MuiAlert-icon":{position:"absolute",top:i.spacing(1),left:i.spacing(1.5),display:"flex",alignItems:"center",justifyContent:"center",width:i.spacing(3),marginTop:i.spacing(.5)},"&.MuiAlert-standardError":{backgroundColor:i.palette.error.main},...o!==!1&&{paddingLeft:i.spacing(5.5)},...e&&{paddingRight:i.spacing(6)},...!e&&!t&&{paddingRight:i.spacing(1.5)},...t&&{".MuiAlert-message":{minWidth:"fit-content",padding:i.spacing(.75,0)}}})),me=a.styled(a.Box)(({theme:t})=>({position:"absolute",top:t.spacing(1),right:t.spacing(1),"& button:hover, & button:focus-visible":{backgroundColor:t.palette.white[8]},svg:{color:t.palette.white[60]}}));function he({severity:t="neutral",autoHideDuration:e=y.NOTIFICATION_DURATION_IN_MS,closeable:o=!0,children:i,title:r,action:l,open:s,onClose:d=()=>{},autoWidth:c,icon:g,...m}){const u=k.useIntl(),f=y.useImperativeIntl(u),x=g===!1||t==="neutral"&&!g,b=e===null?null:e||y.NOTIFICATION_DURATION_IN_MS;return n.jsx(a.Portal,{children:n.jsx(ge,{...m,open:s,autoHideDuration:b,onClose:d,TransitionComponent:c?a.Fade:a.Slide,"data-auto-width":c,children:n.jsxs(xe,{sx:{position:"relative"},autoWidth:c,children:[n.jsx(fe,{severity:t,action:l,icon:x?!1:g,elevation:6,hasActions:!!l,closeable:o,title:r,children:i}),o&&n.jsx(me,{children:n.jsx(tt,{color:"default",onClick:D=>d(D,"timeout"),icon:n.jsx(S.CloseOutlined,{}),tooltip:f.formatMessage({id:"c4r.button.close"})})})]})})})}const be=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",height:y.APPBAR_SIZE,marginRight:t.spacing(1.5)})),ye=a.styled(a.IconButton)(({theme:t})=>({marginRight:t.spacing(1),"&.MuiButtonBase-root svg path":{fill:t.palette.brand.appBarContrastText}})),je=a.styled(a.Divider)(({theme:t})=>({borderColor:a.alpha(t.palette.brand.appBarContrastText,.12)}));function Me({onClickMenu:t}){return n.jsx(a.Box,{sx:{display:{md:"none",xs:"block"}},children:n.jsxs(be,{children:[n.jsx(ye,{onClick:t,children:n.jsx(S.MenuOutlined,{})}),n.jsx(je,{orientation:"vertical",flexItem:!0})]})})}const Ie=a.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 Ce({logo:t}){return n.jsx(Ie,{children:t})}const ve=a.styled(y.Typography)({display:"flex",alignItems:"center",whiteSpace:"nowrap"});function Be({text:t}){const e=a.useTheme();return n.jsx(ve,{component:"span",variant:"subtitle1",color:e.palette.brand.appBarContrastText,children:t})}const De=a.styled(y.Typography)(({theme:t})=>({display:"flex",alignItems:"center","&::before":{content:'"/"',margin:t.spacing(0,1),opacity:.6,color:t.palette.brand.appBarContrastText}}));function Ae({text:t}){const e=a.useTheme();return n.jsx(De,{component:"span",variant:"body2",weight:"strong",color:e.palette.brand.appBarContrastText,children:t})}const Te=a.styled(a.AppBar)(({theme:t})=>({backgroundColor:t.palette.brand.appBarMain,"& .MuiTypography-root":{color:t.palette.brand.appBarContrastText},"& .MuiIconButton-root path":{fill:t.palette.brand.appBarContrastText}})),Se=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",maxWidth:"calc(100% - 300px)",overflow:"hidden",[t.breakpoints.down("sm")]:{minWidth:"192px"}})),ke=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",flex:1,marginLeft:t.spacing(1)}));function we({children:t,brandLogo:e,brandText:o,secondaryText:i,showBurgerMenu:r=!1,onClickMenu:l,...s}){return n.jsx(Te,{...s,children:n.jsxs(a.Toolbar,{children:[n.jsxs(Se,{children:[r&&n.jsx(Me,{onClickMenu:l}),e&&n.jsx(Ce,{logo:e}),o&&n.jsx(Be,{text:o}),i&&n.jsx(Ae,{text:i})]}),n.jsx(ke,{children:t})]})})}const Re=a.styled(a.Box,{shouldForwardProp:t=>!["size","variant"].includes(t)})(({size:t,variant:e,theme:o})=>({position:"absolute",right:o.spacing(5.75),...t==="small"&&{right:o.spacing(4),top:"3px"},...e==="standard"&&{right:o.spacing(4.75),...t==="small"&&{right:o.spacing(3.5)}}}));function q({size:t,variant:e,...o}){const i=k.useIntl(),r=y.useImperativeIntl(i);return n.jsx(Re,{size:t,variant:e,children:n.jsx(a.IconButton,{...o,size:t,"aria-label":r.formatMessage({id:"c4r.form.clearSelection"})})})}const Fe=a.styled(a.Box,{shouldForwardProp:t=>!["size","variant","readOnly"].includes(t)})(({size:t,variant:e,readOnly:o,theme:i})=>({".MuiInputBase-root":{"& .clearButton svg":{color:i.palette.text.hint},...t==="small"&&{paddingRight:`${i.spacing(1)} !important`},...t==="medium"&&{"& .MuiInputAdornment-root":{"& .MuiIconButton-edgeEnd":{marginRight:i.spacing(-1)}}},...e==="standard"&&{paddingRight:`${i.spacing(1)} !important`,...t==="small"&&{paddingRight:`${i.spacing(.5)} !important`}},...o&&{"& .MuiInputAdornment-root":{"& svg":{color:i.palette.text.disabled}}}}}));function G({children:t,size:e,variant:o,readOnly:i,...r}){return n.jsx(Fe,{...r,size:e,variant:o,readOnly:i,children:t})}function L({handleClear:t,variant:e="outlined",size:o="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,slotProps:c,slots:g,error:m,showCalendar:u=!0,readOnly:f,"aria-label":p,"data-testid":x,...M}){const b=k.useIntl(),D=y.useImperativeIntl(b);return n.jsx(a.Box,{className:"CartoDatePicker-root","data-testid":"date-picker",children:n.jsx(G,{size:o,variant:e,readOnly:f,"data-name":"date-picker","aria-label":p,"data-testid":x,children:n.jsx(ut.DatePicker,{...M,label:i&&n.jsx(O,{label:i,type:l,icon:r&&n.jsx(a.Tooltip,{title:r,children:n.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:o,error:m??void 0,inputProps:{"data-testid":"date-picker-input"}},field:{clearable:!!t,onClear:t},...c},slots:{clearButton:C=>n.jsx(q,{...C,size:o,variant:e}),openPickerButton:C=>n.jsx(a.IconButton,{...C,size:o,"aria-label":D.formatMessage({id:"c4r.form.chooseDate"})}),...g},disableOpenPicker:!u,readOnly:f})})})}const Oe=a.styled(a.Box,{shouldForwardProp:t=>!["isSelected","isStartDate","isEndDate","isSelectedMonth","isLastDay","isFirstDay"].includes(t)})(({theme:t,isSelected:e,isStartDate:o,isEndDate:i,isSelectedMonth:r,isLastDay:l,isFirstDay:s})=>({position:"relative",margin:t.spacing(.25),"& .MuiPickersDay-root":{margin:0},...e&&r&&{"&::before":{content:'""',position:"absolute",top:0,right:"-2px",bottom:0,left:"-2px",backgroundColor:t.palette.primary.background,...(o||s)&&{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},...(i||l)&&{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`}},"&:first-of-type::before":{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},"&:last-of-type::before":{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`},...s&&{"&:last-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},...l&&{"&:first-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},"& .MuiPickersDay-today":{borderColor:`${t.palette.default.outlinedBorder} !important`,...(o||i)&&{boxShadow:`0 0 0 1px inset ${t.palette.background.paper}`}},"&::after":{content:'""',position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:t.palette.background.paper,borderRadius:t.shape.borderRadius,transition:"background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms"},"&:hover::after":{backgroundColor:t.palette.primary.relatedLight}}})),$e=a.styled(pt.PickersDay,{shouldForwardProp:t=>t!=="isDateRangeLimit"})(({theme:t,isDateRangeLimit:e})=>({"&.MuiPickersDay-root":{position:"relative",zIndex:1,"&.Mui-selected":{color:t.palette.text.primary},...e&&{"&.Mui-selected":{backgroundColor:`${t.palette.primary.main} !important`,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:`${t.palette.primary.dark} !important`}}}}})),Z=(t,e)=>!t||!e?!1:t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate();function J({day:t,startDate:e,endDate:o,selectedMonth:i,...r}){const l=!!(e&&Z(e,t)),s=!!(o&&Z(o,t)),d=!!(e&&o&&t.getTime()>=e.getTime()&&t.getTime()<=o.getTime()),c=t.getDate()===1,g=t.getDate()===new Date(t.getFullYear(),t.getMonth()+1,0).getDate(),m=!!(i&&t.getMonth()===i.getMonth());return n.jsx(Oe,{isSelected:d,isStartDate:l,isEndDate:s,isSelectedMonth:m,isLastDay:g,isFirstDay:c,children:n.jsx($e,{...r,day:t,selected:d||l||s,isDateRangeLimit:l||s,"data-name":"pickers-day"})})}const Le=a.styled(a.Box,{shouldForwardProp:t=>!["variant"].includes(t)})(({variant:t,theme:e})=>({display:"flex",gap:t==="standard"?e.spacing(1):"1px","& .CartoDatePicker-root":{"&:first-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(.5,0,0,.5),boxShadow:`1px 0 0 0 ${e.palette.default.outlinedBorder}`,...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderRightColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(.5,0,0,.5)}},...t==="standard"&&{boxShadow:"none",borderRadius:0}}},"&:last-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(0,.5,.5,0),...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderLeftColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(0,.5,.5,0)}},...t==="standard"&&{borderRadius:0}}}}}));function Ee({globalHelperText:t,error:e,variant:o="outlined",startProps:i,endProps:r,"aria-label":l,"data-testid":s,...d}){const c=k.useIntl(),g=y.useImperativeIntl(c),[m,u]=h.useState(!1),[f,p]=h.useState(!1),[x,M]=h.useState((i==null?void 0:i.value)||null),[b,D]=h.useState((r==null?void 0:r.value)||null),[C,v]=h.useState((r==null?void 0:r.value)??(i==null?void 0:i.value)??new Date),j=e??(i==null?void 0:i.error)??(r==null?void 0:r.error),I=(B,R)=>{M(B),i!=null&&i.onChange&&i.onChange(B,R),B&&R.validationError===null&&!f&&R.trigger===null&&(p(!1),u(!0))},T=(B,R)=>{D(B),r!=null&&r.onChange&&r.onChange(B,R)},w=()=>{p(!0),u(!1),setTimeout(()=>{v(x??new Date)},120)},A=()=>{p(!1),u(!0),setTimeout(()=>{v(b??x??new Date)},120)},F=()=>{p(!1),u(!0),setTimeout(()=>{v(b??x??new Date)},120)};return n.jsxs(a.Box,{children:[n.jsxs(Le,{variant:o,"data-name":"date-range-picker","aria-label":l,"data-testid":s,children:[n.jsx(L,{...d,...i,value:(i==null?void 0:i.value)??x,maxDate:b??void 0,label:(i==null?void 0:i.label)??g.formatMessage({id:"c4r.form.startDate"}),slotProps:{popper:{placement:"bottom-start","aria-label":g.formatMessage({id:"c4r.form.startDateCalendar"})},...i==null?void 0:i.slotProps},slots:{openPickerIcon:S.TodayOutlined,day:B=>n.jsx(J,{...B,startDate:x,endDate:b,selectedMonth:C}),...i==null?void 0:i.slots},error:(i==null?void 0:i.error)??e,open:f,onChange:I,onOpen:w,onClose:A,onMonthChange:B=>v(B),variant:o}),n.jsx(L,{...d,...r,value:(r==null?void 0:r.value)??b,minDate:x??void 0,slotProps:{popper:{"aria-label":g.formatMessage({id:"c4r.form.endDateCalendar"})},...r==null?void 0:r.slotProps},slots:{day:B=>n.jsx(J,{...B,startDate:x,endDate:b,selectedMonth:C}),...r==null?void 0:r.slots},label:(r==null?void 0:r.label)??g.formatMessage({id:"c4r.form.endDate"}),error:(r==null?void 0:r.error)??e,open:m,onOpen:F,onClose:()=>u(!1),onChange:T,onMonthChange:B=>v(B),variant:o})]}),t&&n.jsx(a.FormHelperText,{error:j,children:t})]})}const ct=(t,e,o,i)=>{const r=t==null?void 0:t.includes("hours"),l=t==null?void 0:t.includes("seconds"),s=t==null?void 0:t.includes("minutes"),d=(t==null?void 0:t.length)===1&&t[0]==="hours";if(i)return i;const c=[];return e&&c.push("MM/dd/yyyy "),r&&c.push(o?"hh":"HH"),d||c.push(":"),s&&c.push("mm"),l&&c.push(":ss"),o&&c.push(" a"),c.join("")};function We({handleClear:t,variant:e="outlined",size:o="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,error:c,showClock:g=!0,readOnly:m,slotProps:u,slots:f,ampm:p=!0,views:x=["hours","minutes"],format:M,"data-testid":b,"aria-label":D,...C}){const v=k.useIntl(),j=y.useImperativeIntl(v),I=h.useRef(null),[T,w]=h.useState(0);return h.useEffect(()=>{if(!I.current)return;const A=new ResizeObserver(F=>{var R;const B=(R=F[0])==null?void 0:R.contentRect.width;B&&w(B)});return A.observe(I.current),()=>{A.disconnect()}},[]),n.jsx(G,{size:o,variant:e,readOnly:m,"data-name":"time-picker","data-testid":b??"time-picker","aria-label":D,children:n.jsx(gt.TimePicker,{...C,ref:I,label:n.jsx(O,{label:i??j.formatMessage({id:"c4r.form.time"}),type:l,icon:r&&n.jsx(a.Tooltip,{title:r,children:n.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),views:["hours"],format:ct(x,!1,p,M),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:o,error:c??void 0,inputProps:{"data-testid":"time-picker-input"}},field:{clearable:!!t,onClear:t},popper:{placement:"bottom-end"},layout:{sx:{width:T}},...u},slots:{clearButton:A=>n.jsx(q,{...A,size:o,variant:e}),openPickerButton:A=>n.jsx(a.IconButton,{...A,size:o,"aria-label":j.formatMessage({id:"c4r.form.chooseDate"})}),...f},disableOpenPicker:!g,readOnly:m,ampm:p})})}function He({handleClear:t,variant:e="outlined",size:o="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,error:c,showCalendar:g=!0,readOnly:m,slotProps:u,slots:f,ampm:p=!0,views:x=["hours","minutes"],format:M,"data-testid":b,"aria-label":D,...C}){const v=k.useIntl(),j=y.useImperativeIntl(v);return n.jsx(G,{size:o,variant:e,readOnly:m,"data-name":"date-time-picker","data-testid":b??"date-time-picker","aria-label":D,children:n.jsx(xt.DateTimePicker,{...C,label:n.jsx(O,{label:i??j.formatMessage({id:"c4r.form.time"}),type:l,icon:r&&n.jsx(a.Tooltip,{title:r,children:n.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),views:["year","month","day","hours"],format:ct(x,!0,p,M),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:o,error:c??void 0,inputProps:{"data-testid":"date-time-picker-input"}},field:{clearable:!!t,onClear:t},...u},slots:{clearButton:I=>n.jsx(q,{...I,size:o,variant:e}),openPickerButton:I=>n.jsx(a.IconButton,{...I,size:o,"aria-label":j.formatMessage({id:"c4r.form.chooseDate"})}),...f},disableOpenPicker:!g,readOnly:m,ampm:p})})}const _e=[{outlinedBullet:!1,value:""}],Pe=a.styled("ul")(({theme:t})=>({listStyle:"none",paddingLeft:0,margin:t.spacing(.5,0,0,0)})),Ne=a.styled("li")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between","&:not(:last-child)":{marginBottom:t.spacing(.5)}})),qe=a.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]})),Ge=a.styled(y.Typography)(({theme:t})=>({minWidth:t.spacing(10),marginRight:t.spacing(1.5)}));function Ve({items:t=_e,title:e}){return n.jsxs(n.Fragment,{children:[e&&n.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:e}),n.jsx(Pe,{children:t.map((o,i)=>n.jsxs(Ne,{children:[n.jsx(qe,{style:{backgroundColor:`${o.outlinedBullet?"transparent":o.color}`,borderColor:o.color}}),o.category&&n.jsx(Ge,{color:"inherit",variant:"caption",children:o.category}),n.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:o.value})]},i))})]})}const X={small:"480px",medium:"640px",large:"640px",xlarge:"720px"},E={small:{width:"432px",maxWidth:"432px"},medium:{width:"592px",maxWidth:"592px"},large:{width:"768px",maxWidth:"768px",minHeight:"576px"},xlarge:{width:"calc(100vw - 80px)",height:"calc(100vh - 80px)",maxWidth:"960px"}},W=a.styled(a.Paper,{shouldForwardProp:t=>!["fullScreen","height","width","hasForm"].includes(t)})(({fullScreen:t,height:e,width:o,hasForm:i,size:r="small",theme:l})=>({"&.MuiPaper-root":{position:"relative",display:"flex",flexDirection:"column",margin:l.spacing(5),borderRadius:l.spacing(1),...E[r],maxHeight:X[r],[`@media (max-height:${X[r]})`]:{maxHeight:"calc(100vh - 80px)",...r==="large"&&{minHeight:e!=="auto"?"calc(100vh - 80px)":"auto"}},...t&&{width:"100vw",maxWidth:`calc(100vw - ${l.spacing(10)})`,height:"100vh",maxHeight:`calc(100vh - ${l.spacing(10)})`,margin:l.spacing(5),borderRadius:l.spacing(1)},...e&&{height:e,minHeight:e},...o&&{width:o},[l.breakpoints.down("sm")]:{position:"absolute",width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",top:0,bottom:0,left:0,right:0,margin:0,borderRadius:0,...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}},...i&&{maxHeight:`calc(100vh - ${l.spacing(10)})`,form:{flex:1,display:"flex",flexDirection:"column",justifyContent:"space-between",overflow:"hidden",...E[r],maxWidth:"100%",...t&&{width:"100%",maxWidth:"100%",height:"100%",maxHeight:"100%"},...e&&{height:e,minHeight:e},...o&&{width:o},[l.breakpoints.down("sm")]:{width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}}}}}}));function Ue({nonModal:t,children:e,size:o="small",PaperProps:i,fullScreen:r,height:l,width:s,hasForm:d,"aria-label":c,"data-testid":g,...m},u){return t?n.jsx(W,{size:o,fullScreen:r,height:l,width:s,hasForm:d,"aria-label":c,"data-testid":g,"data-name":"dialog",...m,ref:u,children:e}):n.jsx(a.Dialog,{PaperComponent:W,PaperProps:{...i,size:o,fullScreen:r,height:l,width:s,hasForm:d},fullScreen:r,role:"section","aria-label":c,"data-testid":g,"data-size":o,"data-width":s,"data-height":l,"data-name":"dialog",...m,ref:u,children:e})}const ze=h.forwardRef(Ue),Ye=a.styled(a.DialogTitle)(()=>({padding:0,zIndex:10})),Ze=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",padding:t.spacing(2),minHeight:t.spacing(8)})),K=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(1),overflow:"hidden"})),Je=a.styled(S.CloseOutlined)(({theme:t})=>({color:t.palette.text.secondary})),Xe=a.styled(a.Divider)(()=>({"+ .MuiDialogContent-root":{borderTop:"none !important"}}));function Ke({title:t,chipLabel:e,chipProps:o,children:i,onClose:r,secondaryActions:l,"aria-label":s,closeIcon:d,...c}){const g=k.useIntl(),m=y.useImperativeIntl(g);return n.jsxs(n.Fragment,{children:[n.jsxs(Ye,{component:"div","data-name":"dialog-header",...c,children:[n.jsxs(Ze,{children:[n.jsxs(K,{flex:1,maxWidth:.8,children:[n.jsx(y.Typography,{component:"h2",variant:"inherit",noWrap:!0,"aria-label":s,role:"heading",children:t}),e&&n.jsx(a.Chip,{color:"default",label:e,...o})]}),n.jsxs(K,{children:[l,r&&n.jsx(a.Tooltip,{title:m.formatMessage({id:"c4r.button.close"}),placement:"left",children:n.jsx(a.IconButton,{onClick:r,children:d||n.jsx(Je,{"data-testid":"CloseIcon"})})})]})]}),i]}),i&&n.jsx(Xe,{})]})}const Qe=a.styled(a.DialogContent,{shouldForwardProp:t=>!["scrollableContent","withGutter","withBottomGutter"].includes(t)})(({theme:t,scrollableContent:e,withGutter:o,withBottomGutter:i})=>({display:"flex",flexDirection:"column",gap:t.spacing(3),padding:0,...t.typography.body2,color:t.palette.text.secondary,".MuiAlert-root":{minHeight:"auto"},...e&&{borderBottom:`1px solid ${t.palette.divider}`,"+ .MuiDivider-root":{display:"none"}},...o&&{padding:` ${t.spacing(1,2,0)} !important`,".MuiDialog-paperFullScreen &":{padding:`${t.spacing(2,2,0)} !important`}},...i&&{paddingBottom:`${t.spacing(3)} !important`,".MuiDialog-paperFullScreen &":{paddingBottom:`${t.spacing(3)} !important`}}}));function tn({children:t,scrollableContent:e,hasFooterAlert:o,withGutter:i=!0,withBottomGutter:r=!0,onScroll:l,...s},d){const c=a.useTheme(),[g,m]=h.useState(null);h.useImperativeHandle(d,()=>g,[g]);const u=h.useCallback(p=>{const x=Math.abs(p.scrollHeight-p.clientHeight-p.scrollTop)<1,M=p.scrollTop===0,b=`1px solid ${c.palette.divider}`;p.style.borderTop=M?"none":b,p.style.borderBottom=x&&!o?"none":b},[c.palette.divider,o]),f=h.useCallback(p=>{u(p.target),l==null||l(p)},[u,l]);return h.useEffect(()=>{g&&u(g)},[g,u]),h.useEffect(()=>{if(!g||typeof ResizeObserver>"u")return;const p=new ResizeObserver(()=>{u(g)});return p.observe(g),()=>p.disconnect()},[g,u]),n.jsx(Qe,{ref:m,onScroll:f,scrollableContent:e,withGutter:i,withBottomGutter:r&&i,"data-name":"dialog-content",...s,children:t})}const dt=h.forwardRef(tn),en=a.styled(dt,{shouldForwardProp:t=>t!=="withAlert"})(({withAlert:t,theme:e})=>({padding:`${e.spacing(0,2)} !important`,...t&&{paddingBottom:`${e.spacing(3)} !important`}})),nn=a.styled(H.Alert)(({theme:t})=>({minHeight:"auto",padding:0,backgroundColor:"transparent","& .MuiTypography-root":{color:t.palette.text.secondary,a:{color:t.palette.primary.main}},"& .MuiAlertTitle-root":{color:t.palette.text.primary}}));function V({children:t,severity:e="neutral",...o}){return n.jsx(nn,{severity:e,...o,"data-name":"dialog-alert",children:t})}const on=a.styled(a.Box,{shouldForwardProp:t=>!["dark","hasChildren"].includes(t)})(({dark:t,hasChildren:e,theme:o})=>({flex:"0 0 auto",display:"block",minHeight:e?o.spacing(8):"auto",zIndex:10,...t&&{backgroundColor:o.palette.common.black,color:o.palette.white[60],".MuiAlert-root":{".MuiTypography-root, .MuiAlert-message :not(.MuiAlertTitle-root)":{color:o.palette.white[60],a:{color:`${o.palette.secondary.main} !important`}},".MuiAlert-icon":{color:o.palette.white[60]}}}})),an=a.styled(a.Box)(()=>({display:"flex",alignItems:"center",justifyContent:"space-between","& > div:empty":{padding:0}})),rn=a.styled(a.Box,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2)})),U=a.styled(a.DialogActions,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2),margin:0,".MuiButton-root + .MuiButton-root":{marginLeft:0}})),ln=a.styled(a.Divider)(()=>({marginTop:"-1px"}));function sn({children:t,secondaryActions:e,alertContent:o,alertProps:i,dark:r,topContent:l,...s}){return n.jsxs(n.Fragment,{children:[l,!!o&&n.jsx(ln,{}),n.jsxs(on,{...s,dark:r,"data-theme":r?"dark":"light","data-name":"dialog-footer",hasChildren:!!t,children:[!!o&&n.jsx(a.Box,{sx:{p:2,pt:1.5,pb:1},children:n.jsx(V,{...i,children:o})}),n.jsxs(an,{children:[n.jsx(rn,{hasAlert:!!o,children:e}),n.jsx(U,{hasAlert:!!o,children:t})]})]})]})}const cn=a.styled(a.Box)(({theme:t})=>({position:"absolute",width:"100%",zIndex:100,top:0,bottom:0,left:0,right:0,overflow:"hidden",display:"flex",boxSizing:"border-box",alignItems:"flex-end",background:t.palette.white[60]})),dn=a.styled("div")(()=>({width:"100%"})),un=a.styled(a.Box)(({theme:t})=>({width:"100%",padding:t.spacing(1.5,2,2),backgroundColor:t.palette.background.paper,borderTop:`1px solid ${t.palette.divider}`,".MuiDialogActions-root":{padding:0,marginTop:t.spacing(1)}}));function pn({children:t,onClickAway:e,actions:o,severity:i="warning",opened:r,"data-testid":l,"aria-label":s,...d}){const c=h.useRef(null),g=a.useTheme(),m=()=>{e&&e()};return n.jsx(cn,{ref:c,"data-testid":l,"aria-label":s,role:"presentation","data-name":"dialog-confirmation",children:n.jsx(ft,{onClickAway:m,children:n.jsx(a.Slide,{direction:"up",in:r,container:c.current,mountOnEnter:!0,unmountOnExit:!0,easing:g.transitions.easing.easeOut,timeout:350,children:n.jsx(dn,{children:n.jsxs(un,{children:[n.jsx(V,{severity:i,...d,children:t}),n.jsx(U,{children:o})]})})})})})}const gn=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",height:t.spacing(8),marginBottom:t.spacing(2),"& > div":{flex:1}})),xn=a.styled(a.Box)(({theme:t})=>({display:"flex",flex:1,flexDirection:"column",justifyContent:"center",alignItems:"center",position:"relative","&:before, &:after":{content:'""',background:t.palette.divider,position:"absolute",top:t.spacing(1.25),height:t.spacing(.25),width:`calc(50% - ${t.spacing(2.5)})`},"&:before":{left:0},"&:after":{right:0},"&:first-of-type:before":{content:"none"},"&:last-of-type:after":{content:"none"}}));function fn({theme:t,completed:e,current:o}){return e?{background:t.palette.success.main,borderColor:t.palette.success.main,color:t.palette.common.white}:o?{background:t.palette.text.primary,borderColor:t.palette.text.primary,color:t.palette.common.white}:{borderColor:t.palette.text.secondary,color:t.palette.text.secondary}}const mn=a.styled("span",{shouldForwardProp:t=>t!=="completed"&&t!=="current"})(({theme:t,completed:e,current:o})=>({display:"flex",justifyContent:"center",alignItems:"center",height:t.spacing(3),width:t.spacing(3),marginBottom:t.spacing(1),borderRadius:"50%",border:`${t.spacing(.25)} solid currentColor`,...t.typography.caption,...fn({theme:t,completed:e,current:o})}));function hn({currentStep:t,stepsLabels:e,...o}){return n.jsx(gn,{...o,"data-name":"dialog-stepper",children:n.jsx(a.Box,{sx:{display:"flex"},children:e.map((i,r)=>{const l=r+1,s=l===t,d=l<t,c=d?"success.main":s?"textPrimary":"textSecondary";return n.jsxs(xn,{"data-state":d?"completed":s?"current":"uncompleted",children:[n.jsx(mn,{completed:d,current:s,children:d?n.jsx(S.Check,{fontSize:"small","aria-label":"Completed step"}):l}),n.jsx(y.Typography,{variant:"caption",component:"div",color:c,children:i})]},r)})})})}exports.TablePaginationActions=y.TablePaginationActions;exports.Typography=y.Typography;exports.Alert=H.Alert;exports.MenuItem=_.MenuItem;exports.AccordionGroup=de;exports.AppBar=we;exports.Autocomplete=ne;exports.Avatar=pe;exports.Button=yt;exports.CreatableAutocomplete=re;exports.DatePicker=L;exports.DateRangePicker=Ee;exports.DateTimePicker=He;exports.Dialog=ze;exports.DialogActions=U;exports.DialogAlert=V;exports.DialogConfirmation=pn;exports.DialogContent=dt;exports.DialogContentPadded=en;exports.DialogFooter=sn;exports.DialogHeader=Ke;exports.DialogPaper=W;exports.DialogStepper=hn;exports.IconButton=tt;exports.LabelWithIndicator=O;exports.Menu=Lt;exports.MenuItemFilter=N;exports.MenuList=Ht;exports.MultipleAutocomplete=se;exports.MultipleSelectField=Zt;exports.PasswordField=vt;exports.SelectField=Q;exports.Snackbar=he;exports.TimePicker=We;exports.ToggleButtonGroup=kt;exports.TooltipData=Ve;exports.UploadField=te;exports.UploadFieldBase=et;exports.dialogDimensionsBySize=E;