@sme.up/ketchup2 1.1.1 → 1.2.0

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 (95) hide show
  1. package/dist/assets/buttonListAssets.d.ts +3 -0
  2. package/dist/assets/buttonListAssets.d.ts.map +1 -0
  3. package/dist/assets/layoutAssets.d.ts.map +1 -1
  4. package/dist/assets/provinces.d.ts +3 -1
  5. package/dist/assets/provinces.d.ts.map +1 -1
  6. package/dist/assets/svg/arrow_drop_right.svg +1 -0
  7. package/dist/assets/svg/dashboard.svg +1 -0
  8. package/dist/assets/svg/star.svg +1 -0
  9. package/dist/assets/testAsset.d.ts +10 -10
  10. package/dist/assets/testAsset.d.ts.map +1 -1
  11. package/dist/basic-components/autocomplete/autocomplete.d.ts.map +1 -1
  12. package/dist/basic-components/button/button-types.d.ts +4 -8
  13. package/dist/basic-components/button/button-types.d.ts.map +1 -1
  14. package/dist/basic-components/button/button.d.ts.map +1 -1
  15. package/dist/basic-components/button-list/button-list-types.d.ts +8 -0
  16. package/dist/basic-components/button-list/button-list-types.d.ts.map +1 -0
  17. package/dist/basic-components/button-list/button-list.d.ts +3 -0
  18. package/dist/basic-components/button-list/button-list.d.ts.map +1 -0
  19. package/dist/basic-components/cell/cell-types.d.ts +32 -1
  20. package/dist/basic-components/cell/cell-types.d.ts.map +1 -1
  21. package/dist/basic-components/cell/cell-utils.d.ts.map +1 -1
  22. package/dist/basic-components/cell/cell.d.ts.map +1 -1
  23. package/dist/basic-components/cell/tests/utils.d.ts +13 -1
  24. package/dist/basic-components/cell/tests/utils.d.ts.map +1 -1
  25. package/dist/basic-components/checkbox/checkbox-types.d.ts +5 -1
  26. package/dist/basic-components/checkbox/checkbox-types.d.ts.map +1 -1
  27. package/dist/basic-components/checkbox/checkbox.d.ts.map +1 -1
  28. package/dist/basic-components/combobox/combobox.d.ts.map +1 -1
  29. package/dist/basic-components/date-picker/date-picker-calendar/date-picker-calendar.d.ts.map +1 -1
  30. package/dist/basic-components/date-picker/date-picker.d.ts.map +1 -1
  31. package/dist/basic-components/icon/icon-types.d.ts +4 -0
  32. package/dist/basic-components/icon/icon-types.d.ts.map +1 -1
  33. package/dist/basic-components/icon/icon.d.ts.map +1 -1
  34. package/dist/basic-components/list/list.d.ts.map +1 -1
  35. package/dist/basic-components/mulitple-autocomplete/multiple-autocomplete.d.ts.map +1 -1
  36. package/dist/basic-components/text/text.d.ts +3 -0
  37. package/dist/basic-components/text/text.d.ts.map +1 -0
  38. package/dist/basic-components/textarea/textarea-types.d.ts +22 -0
  39. package/dist/basic-components/textarea/textarea-types.d.ts.map +1 -0
  40. package/dist/basic-components/textarea/textarea.d.ts +4 -0
  41. package/dist/basic-components/textarea/textarea.d.ts.map +1 -0
  42. package/dist/basic-components/textfield/textfield-types.d.ts +6 -6
  43. package/dist/basic-components/textfield/textfield-types.d.ts.map +1 -1
  44. package/dist/basic-components/textfield/textfield.d.ts.map +1 -1
  45. package/dist/components/app-bar/app-bar.d.ts.map +1 -1
  46. package/dist/components/app-bar/app-bar.data.d.ts +15 -6
  47. package/dist/components/app-bar/app-bar.data.d.ts.map +1 -1
  48. package/dist/components/dash-list/dash-list-types.d.ts +1 -1
  49. package/dist/components/dash-list/dash-list-types.d.ts.map +1 -1
  50. package/dist/components/data-table/assets/data-table-shapes.d.ts +11 -11
  51. package/dist/components/data-table/data-table-types.d.ts +4 -0
  52. package/dist/components/data-table/data-table-types.d.ts.map +1 -1
  53. package/dist/components/data-table/data-table.d.ts.map +1 -1
  54. package/dist/components/drawer/drawer-types.d.ts +8 -2
  55. package/dist/components/drawer/drawer-types.d.ts.map +1 -1
  56. package/dist/components/drawer/drawer.d.ts.map +1 -1
  57. package/dist/components/drawer/drawer.data.d.ts +4 -0
  58. package/dist/components/drawer/drawer.data.d.ts.map +1 -1
  59. package/dist/components/field/field.d.ts.map +1 -1
  60. package/dist/components/input-panel/assets/data.d.ts +5 -0
  61. package/dist/components/input-panel/assets/data.d.ts.map +1 -0
  62. package/dist/components/input-panel/input-panel-types.d.ts +12 -3
  63. package/dist/components/input-panel/input-panel-types.d.ts.map +1 -1
  64. package/dist/components/input-panel/input-panel.d.ts.map +1 -1
  65. package/dist/components/spotlight/spotlight.d.ts.map +1 -1
  66. package/dist/functional-components/group-row/group-row.d.ts.map +1 -1
  67. package/dist/functional-components/helper-text/helper-text-types.d.ts +4 -0
  68. package/dist/functional-components/helper-text/helper-text-types.d.ts.map +1 -1
  69. package/dist/functional-components/helper-text/helper-text.d.ts.map +1 -1
  70. package/dist/functional-components/label/label-types.d.ts +4 -0
  71. package/dist/functional-components/label/label-types.d.ts.map +1 -1
  72. package/dist/functional-components/label/label.d.ts.map +1 -1
  73. package/dist/functional-components/layout/layout-types.d.ts +1 -1
  74. package/dist/functional-components/layout/layout-types.d.ts.map +1 -1
  75. package/dist/functional-components/layout/layout.d.ts.map +1 -1
  76. package/dist/functional-components/portal-wrapper.d.ts +5 -0
  77. package/dist/functional-components/portal-wrapper.d.ts.map +1 -0
  78. package/dist/functional-components/row/row-assets.d.ts.map +1 -1
  79. package/dist/functional-components/row/row.d.ts.map +1 -1
  80. package/dist/hooks/useFloating.d.ts.map +1 -1
  81. package/dist/index.d.ts +13 -4
  82. package/dist/index.d.ts.map +1 -1
  83. package/dist/ketchup2.cjs.js +13 -22
  84. package/dist/ketchup2.css +1 -1
  85. package/dist/ketchup2.es.js +2989 -2368
  86. package/dist/types/data-structures.d.ts +73 -11
  87. package/dist/types/data-structures.d.ts.map +1 -1
  88. package/dist/types/generic.d.ts +1 -1
  89. package/dist/types/generic.d.ts.map +1 -1
  90. package/dist/utils/adapters.d.ts +3 -0
  91. package/dist/utils/adapters.d.ts.map +1 -0
  92. package/dist/utils/data-structures.d.ts +10 -0
  93. package/dist/utils/data-structures.d.ts.map +1 -0
  94. package/dist/utils/display-value.d.ts.map +1 -1
  95. package/package.json +40 -40
@@ -1,4 +1,4 @@
1
- "use strict";var _r=Object.defineProperty;var Ir=(r,e,t)=>e in r?_r(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Ae=(r,e,t)=>Ir(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react");function Mr(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const Be=Mr(k);var ze={exports:{}},Me={};/**
1
+ "use strict";var Ar=Object.defineProperty;var Lr=(r,e,t)=>e in r?Ar(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var be=(r,e,t)=>Lr(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),kr=require("react-dom");function Ir(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const Ie=Ir($);var Ne={exports:{}},_e={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var jt;function Fr(){if(jt)return Me;jt=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,s,a){var i=null;if(a!==void 0&&(i=""+a),s.key!==void 0&&(i=""+s.key),"key"in s){a={};for(var o in s)o!=="key"&&(a[o]=s[o])}else a=s;return s=a.ref,{$$typeof:r,type:n,key:i,ref:s!==void 0?s:null,props:a}}return Me.Fragment=e,Me.jsx=t,Me.jsxs=t,Me}var Fe={};/**
9
+ */var jt;function Nr(){if(jt)return _e;jt=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,s,a){var i=null;if(a!==void 0&&(i=""+a),s.key!==void 0&&(i=""+s.key),"key"in s){a={};for(var o in s)o!=="key"&&(a[o]=s[o])}else a=s;return s=a.ref,{$$typeof:r,type:n,key:i,ref:s!==void 0?s:null,props:a}}return _e.Fragment=e,_e.jsx=t,_e.jsxs=t,_e}var Ce={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,46 +14,37 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Pt;function Vr(){return Pt||(Pt=1,process.env.NODE_ENV!=="production"&&function(){function r(p){if(p==null)return null;if(typeof p=="function")return p.$$typeof===Q?null:p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case A:return"Fragment";case b:return"Portal";case W:return"Profiler";case N:return"StrictMode";case H:return"Suspense";case X:return"SuspenseList"}if(typeof p=="object")switch(typeof p.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),p.$$typeof){case j:return(p.displayName||"Context")+".Provider";case M:return(p._context.displayName||"Context")+".Consumer";case F:var Y=p.render;return p=p.displayName,p||(p=Y.displayName||Y.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case B:return Y=p.displayName||null,Y!==null?Y:r(p.type)||"Memo";case oe:Y=p._payload,p=p._init;try{return r(p(Y))}catch{}}return null}function e(p){return""+p}function t(p){try{e(p);var Y=!1}catch{Y=!0}if(Y){Y=console;var U=Y.error,re=typeof Symbol=="function"&&Symbol.toStringTag&&p[Symbol.toStringTag]||p.constructor.name||"Object";return U.call(Y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",re),e(p)}}function n(){}function s(){if(O===0){P=console.log,I=console.info,V=console.warn,K=console.error,te=console.group,G=console.groupCollapsed,le=console.groupEnd;var p={configurable:!0,enumerable:!0,value:n,writable:!0};Object.defineProperties(console,{info:p,log:p,warn:p,error:p,group:p,groupCollapsed:p,groupEnd:p})}O++}function a(){if(O--,O===0){var p={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:y({},p,{value:P}),info:y({},p,{value:I}),warn:y({},p,{value:V}),error:y({},p,{value:K}),group:y({},p,{value:te}),groupCollapsed:y({},p,{value:G}),groupEnd:y({},p,{value:le})})}0>O&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function i(p){if(D===void 0)try{throw Error()}catch(U){var Y=U.stack.trim().match(/\n( *(at )?)/);D=Y&&Y[1]||"",_=-1<U.stack.indexOf(`
18
- at`)?" (<anonymous>)":-1<U.stack.indexOf("@")?"@unknown:0:0":""}return`
19
- `+D+p+_}function o(p,Y){if(!p||J)return"";var U=ne.get(p);if(U!==void 0)return U;J=!0,U=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var re=null;re=L.H,L.H=null,s();try{var de={DetermineComponentFrameRoot:function(){try{if(Y){var Ce=function(){throw Error()};if(Object.defineProperty(Ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ce,[])}catch(Re){var Ke=Re}Reflect.construct(p,[],Ce)}else{try{Ce.call()}catch(Re){Ke=Re}p.call(Ce.prototype)}}else{try{throw Error()}catch(Re){Ke=Re}(Ce=p())&&typeof Ce.catch=="function"&&Ce.catch(function(){})}}catch(Re){if(Re&&Ke&&typeof Re.stack=="string")return[Re.stack,Ke.stack]}return[null,null]}};de.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var ce=Object.getOwnPropertyDescriptor(de.DetermineComponentFrameRoot,"name");ce&&ce.configurable&&Object.defineProperty(de.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var Z=de.DetermineComponentFrameRoot(),Oe=Z[0],Le=Z[1];if(Oe&&Le){var he=Oe.split(`
20
- `),$e=Le.split(`
21
- `);for(Z=ce=0;ce<he.length&&!he[ce].includes("DetermineComponentFrameRoot");)ce++;for(;Z<$e.length&&!$e[Z].includes("DetermineComponentFrameRoot");)Z++;if(ce===he.length||Z===$e.length)for(ce=he.length-1,Z=$e.length-1;1<=ce&&0<=Z&&he[ce]!==$e[Z];)Z--;for(;1<=ce&&0<=Z;ce--,Z--)if(he[ce]!==$e[Z]){if(ce!==1||Z!==1)do if(ce--,Z--,0>Z||he[ce]!==$e[Z]){var Ie=`
22
- `+he[ce].replace(" at new "," at ");return p.displayName&&Ie.includes("<anonymous>")&&(Ie=Ie.replace("<anonymous>",p.displayName)),typeof p=="function"&&ne.set(p,Ie),Ie}while(1<=ce&&0<=Z);break}}}finally{J=!1,L.H=re,a(),Error.prepareStackTrace=U}return he=(he=p?p.displayName||p.name:"")?i(he):"",typeof p=="function"&&ne.set(p,he),he}function l(p){if(p==null)return"";if(typeof p=="function"){var Y=p.prototype;return o(p,!(!Y||!Y.isReactComponent))}if(typeof p=="string")return i(p);switch(p){case H:return i("Suspense");case X:return i("SuspenseList")}if(typeof p=="object")switch(p.$$typeof){case F:return p=o(p.render,!1),p;case B:return l(p.type);case oe:Y=p._payload,p=p._init;try{return l(p(Y))}catch{}}return""}function c(){var p=L.A;return p===null?null:p.getOwner()}function f(p){if(v.call(p,"key")){var Y=Object.getOwnPropertyDescriptor(p,"key").get;if(Y&&Y.isReactWarning)return!1}return p.key!==void 0}function u(p,Y){function U(){pe||(pe=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Y))}U.isReactWarning=!0,Object.defineProperty(p,"key",{get:U,configurable:!0})}function d(){var p=r(this.type);return Se[p]||(Se[p]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),p=this.props.ref,p!==void 0?p:null}function g(p,Y,U,re,de,ce){return U=ce.ref,p={$$typeof:E,type:p,key:Y,props:ce,_owner:de},(U!==void 0?U:null)!==null?Object.defineProperty(p,"ref",{enumerable:!1,get:d}):Object.defineProperty(p,"ref",{enumerable:!1,value:null}),p._store={},Object.defineProperty(p._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(p,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(p.props),Object.freeze(p)),p}function h(p,Y,U,re,de,ce){if(typeof p=="string"||typeof p=="function"||p===A||p===W||p===N||p===H||p===X||p===ee||typeof p=="object"&&p!==null&&(p.$$typeof===oe||p.$$typeof===B||p.$$typeof===j||p.$$typeof===M||p.$$typeof===F||p.$$typeof===C||p.getModuleId!==void 0)){var Z=Y.children;if(Z!==void 0)if(re)if($(Z)){for(re=0;re<Z.length;re++)m(Z[re],p);Object.freeze&&Object.freeze(Z)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else m(Z,p)}else Z="",(p===void 0||typeof p=="object"&&p!==null&&Object.keys(p).length===0)&&(Z+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),p===null?re="null":$(p)?re="array":p!==void 0&&p.$$typeof===E?(re="<"+(r(p.type)||"Unknown")+" />",Z=" Did you accidentally export a JSX literal instead of a component?"):re=typeof p,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",re,Z);if(v.call(Y,"key")){Z=r(p);var Oe=Object.keys(Y).filter(function(he){return he!=="key"});re=0<Oe.length?"{key: someKey, "+Oe.join(": ..., ")+": ...}":"{key: someKey}",me[Z+re]||(Oe=0<Oe.length?"{"+Oe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var Dt;function Mr(){return Dt||(Dt=1,process.env.NODE_ENV!=="production"&&function(){function r(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===P?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case g:return"Fragment";case w:return"Profiler";case x:return"StrictMode";case b:return"Suspense";case L:return"SuspenseList";case j:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case m:return"Portal";case O:return(h.displayName||"Context")+".Provider";case E:return(h._context.displayName||"Context")+".Consumer";case S:var y=h.render;return h=h.displayName,h||(h=y.displayName||y.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case C:return y=h.displayName||null,y!==null?y:r(h.type)||"Memo";case U:y=h._payload,h=h._init;try{return r(h(y))}catch{}}return null}function e(h){return""+h}function t(h){try{e(h);var y=!1}catch{y=!0}if(y){y=console;var T=y.error,_=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return T.call(y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",_),e(h)}}function n(h){if(h===g)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===U)return"<...>";try{var y=r(h);return y?"<"+y+">":"<...>"}catch{return"<...>"}}function s(){var h=D.A;return h===null?null:h.getOwner()}function a(){return Error("react-stack-top-frame")}function i(h){if(I.call(h,"key")){var y=Object.getOwnPropertyDescriptor(h,"key").get;if(y&&y.isReactWarning)return!1}return h.key!==void 0}function o(h,y){function T(){J||(J=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",y))}T.isReactWarning=!0,Object.defineProperty(h,"key",{get:T,configurable:!0})}function u(){var h=r(this.type);return K[h]||(K[h]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),h=this.props.ref,h!==void 0?h:null}function c(h,y,T,_,R,A,F,V){return T=A.ref,h={$$typeof:d,type:h,key:y,props:A,_owner:R},(T!==void 0?T:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:u}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:F}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:V}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function f(h,y,T,_,R,A,F,V){var M=y.children;if(M!==void 0)if(_)if(W(M)){for(_=0;_<M.length;_++)l(M[_]);Object.freeze&&Object.freeze(M)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else l(M);if(I.call(y,"key")){M=r(h);var X=Object.keys(y).filter(function(se){return se!=="key"});_=0<X.length?"{key: someKey, "+X.join(": ..., ")+": ...}":"{key: someKey}",k[M+_]||(X=0<X.length?"{"+X.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
23
18
  let props = %s;
24
19
  <%s {...props} />
25
20
  React keys must be passed directly to JSX without using spread:
26
21
  let props = %s;
27
- <%s key={someKey} {...props} />`,re,Z,Oe,Z),me[Z+re]=!0)}if(Z=null,U!==void 0&&(t(U),Z=""+U),f(Y)&&(t(Y.key),Z=""+Y.key),"key"in Y){U={};for(var Le in Y)Le!=="key"&&(U[Le]=Y[Le])}else U=Y;return Z&&u(U,typeof p=="function"?p.displayName||p.name||"Unknown":p),g(p,Z,ce,de,c(),U)}function m(p,Y){if(typeof p=="object"&&p&&p.$$typeof!==ie){if($(p))for(var U=0;U<p.length;U++){var re=p[U];x(re)&&T(re,Y)}else if(x(p))p._store&&(p._store.validated=1);else if(p===null||typeof p!="object"?U=null:(U=q&&p[q]||p["@@iterator"],U=typeof U=="function"?U:null),typeof U=="function"&&U!==p.entries&&(U=U.call(p),U!==p))for(;!(p=U.next()).done;)x(p.value)&&T(p.value,Y)}}function x(p){return typeof p=="object"&&p!==null&&p.$$typeof===E}function T(p,Y){if(p._store&&!p._store.validated&&p.key==null&&(p._store.validated=1,Y=R(Y),!Te[Y])){Te[Y]=!0;var U="";p&&p._owner!=null&&p._owner!==c()&&(U=null,typeof p._owner.tag=="number"?U=r(p._owner.type):typeof p._owner.name=="string"&&(U=p._owner.name),U=" It was passed a child from "+U+".");var re=L.getCurrentStack;L.getCurrentStack=function(){var de=l(p.type);return re&&(de+=re()||""),de},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',Y,U),L.getCurrentStack=re}}function R(p){var Y="",U=c();return U&&(U=r(U.type))&&(Y=`
28
-
29
- Check the render method of \``+U+"`."),Y||(p=r(p))&&(Y=`
30
-
31
- Check the top-level render call using <`+p+">."),Y}var w=k,E=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),j=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),oe=Symbol.for("react.lazy"),ee=Symbol.for("react.offscreen"),q=Symbol.iterator,Q=Symbol.for("react.client.reference"),L=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,v=Object.prototype.hasOwnProperty,y=Object.assign,C=Symbol.for("react.client.reference"),$=Array.isArray,O=0,P,I,V,K,te,G,le;n.__reactDisabledLog=!0;var D,_,J=!1,ne=new(typeof WeakMap=="function"?WeakMap:Map),ie=Symbol.for("react.client.reference"),pe,Se={},me={},Te={};Fe.Fragment=A,Fe.jsx=function(p,Y,U,re,de){return h(p,Y,U,!1,re,de)},Fe.jsxs=function(p,Y,U,re,de){return h(p,Y,U,!0,re,de)}}()),Fe}var Lt;function Yr(){return Lt||(Lt=1,process.env.NODE_ENV==="production"?ze.exports=Fr():ze.exports=Vr()),ze.exports}var S=Yr();const ye={AUTOCOMPLETE:"ACP",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",ICON:"ICO",IMAGE:"IMG",MULTI_AUTOCOMPLETE:"AML",SPOTLIGHT:"SPL",TEXT_FIELD:"ITX",PASSWORD:"PWD"},Ur=r=>r.t=="D8",Wr=r=>{if(r){const e=r.split(";");if(e.length==3)return{t:e[0],p:e[1],k:e[2]}}return{t:"",p:"",k:""}};class rt{constructor(e,t){Ae(this,"class");Ae(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new rt(e,e.k=="1"||e.k=="true")}getValue(){return this.value}getLegacyValue(){if(this.class.t=="V2"){if(this.class.p=="SI/NO")return this.value?"1":" ";if(this.class.p=="ON/OFF")return this.value?"1":"0"}return this.value?"true":"false"}}function Hr(r,e){if(Rt(r)){const f=new Date(r);if(!isNaN(f.getTime()))return f}const t=new Date,n=r.replaceAll("/","").replaceAll("-","");let s="DDMMYYYY";e==="en"&&(s="MMDDYYYY");const a=s.indexOf("DD"),i=s.indexOf("MM");let o=0,l=0,c="";switch(n.length){case 1:case 2:return o=parseInt(n),t.setDate(o),Ge(t)?t:r;case 3:case 4:return o=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),i===0?(t.setMonth(o-1),t.setDate(l)):a===0&&(t.setMonth(l-1),t.setDate(o)),Ge(t)?t:r;case 5:case 6:{o=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),Number(n.substring(4))>50?c="19"+n.substring(4):c="20"+n.substring(4);let f=0,u=0;return i===0?(f=l,u=o-1,t.setFullYear(parseInt(c),u,f)):a===0&&(f=o,u=l-1,t.setFullYear(parseInt(c),u,f)),St(o,u,parseInt(c))&&Ge(t)?t:r}case 7:case 8:{o=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),c=n.substring(4);let f=0,u=0;return i===0?(f=l,u=o-1,t.setFullYear(parseInt(c),u,f)):a===0&&(f=o,u=l-1,t.setFullYear(parseInt(c),u,f)),St(f,u,parseInt(c))&&Ge(t)?t:r}}return r}function Rt(r){return/^\d{4}-\d{2}-\d{2}$/.test(r)&&r.length===10}function Ge(r){return r instanceof Date&&!isNaN(r.getTime())}function qr(r){if(!/^\d{8}$/.test(r))return!1;const e=parseInt(r.slice(0,4),10),t=parseInt(r.slice(4,6),10),n=parseInt(r.slice(6,8),10);return St(n,t-1,e)}function St(r,e,t){const n=[31,Kr(t)?29:28,31,30,31,30,31,31,30,31,30,31];return!(e<0||e>11||r<1||r>n[e])}function Kr(r){return r%4===0&&(r%100!==0||r%400===0)}function Br(r){const e=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),n=String(r.getDate()).padStart(2,"0");return isNaN(e)||isNaN(Number(t))||isNaN(Number(n))?r.toString():`${e}-${t}-${n}`}class nt{constructor(e,t){Ae(this,"class");Ae(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=kt.get(`${e.t}${e.p}`);if(t)return new nt(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=kt.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.date}}const kt=new Map([["D8*YYMD",{legacyToIso(r){return qr(r)&&`${r.substring(0,4)}-${r.substring(4,6)}-${r.substring(6,8)}`||r},isoToLegacy(r){return Rt(r)&&r.replaceAll("-","")||r}}]]),st=(r,e)=>{k.useEffect(()=>{const t=n=>{typeof r=="object"&&r!==null&&"current"in r&&r.current&&!r.current.contains(n.target)&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[r,e])};function Ct({position:r="bottom",enabled:e=!0}){const t=k.useRef(null),n=k.useRef(null),[s,a]=k.useState(0),i=k.useCallback(()=>{const o=t.current,l=n.current;if(!o||!l)return;const{top:c,left:f,width:u,height:d}=o.getBoundingClientRect();a(u);const g=l.offsetHeight,h=l.offsetWidth;if(h===0||g===0){requestAnimationFrame(i);return}let m=c+window.scrollY,x=f+window.scrollX;switch(r){case"top":m-=g;break;case"bottom":m+=d;break;case"left":x-=h;break;case"right":x+=u;break}requestAnimationFrame(()=>{l.style.transform=`translate(${x}px, ${m}px)`})},[r]);return k.useLayoutEffect(()=>{e&&t.current&&n.current&&i();const o=new MutationObserver(()=>{n.current&&i()});return n.current&&o.observe(n.current,{childList:!0,subtree:!0}),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),o.disconnect()}},[i,e]),{anchorRef:t,targetRef:n,anchorWidth:s}}const at=(r,e,t)=>{if(t)switch(t){case"CodeOnly":return r;case"DescOnly":return e||"";case"Both":return`${r} - ${e}`}return r},zr=({helperText:r,disabled:e,state:t})=>{const n={container:`smp-helper-text ${e?"smp-helper-text-disabled":""} ${t?`smp-helper-text-${t}`:""}`};return S.jsx("span",{className:n.container,children:r})},vr=({label:r,disabled:e})=>{const t={container:`smp-label ${e?"smp-label-disabled":""}`};return S.jsx("span",{className:t.container,children:r})};function Gr(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}function it(){return it=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},it.apply(null,arguments)}function Et(r,e){return Et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},Et(r,e)}function Jr(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Et(r,e)}function dt(r,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,a;n<s;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||Array.prototype.slice.call(e))}var Je={};/*!
22
+ <%s key={someKey} {...props} />`,_,M,X,M),k[M+_]=!0)}if(M=null,T!==void 0&&(t(T),M=""+T),i(y)&&(t(y.key),M=""+y.key),"key"in y){T={};for(var G in y)G!=="key"&&(T[G]=y[G])}else T=y;return M&&o(T,typeof h=="function"?h.displayName||h.name||"Unknown":h),c(h,M,A,R,s(),T,F,V)}function l(h){typeof h=="object"&&h!==null&&h.$$typeof===d&&h._store&&(h._store.validated=1)}var p=$,d=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),O=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),P=Symbol.for("react.client.reference"),D=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,W=Array.isArray,B=console.createTask?console.createTask:function(){return null};p={"react-stack-bottom-frame":function(h){return h()}};var J,K={},z=p["react-stack-bottom-frame"].bind(p,a)(),H=B(n(a)),k={};Ce.Fragment=g,Ce.jsx=function(h,y,T,_,R){var A=1e4>D.recentlyCreatedOwnerStacks++;return f(h,y,T,!1,_,R,A?Error("react-stack-top-frame"):z,A?B(n(h)):H)},Ce.jsxs=function(h,y,T,_,R){var A=1e4>D.recentlyCreatedOwnerStacks++;return f(h,y,T,!0,_,R,A?Error("react-stack-top-frame"):z,A?B(n(h)):H)}}()),Ce}var _t;function Fr(){return _t||(_t=1,process.env.NODE_ENV==="production"?Ne.exports=Nr():Ne.exports=Mr()),Ne.exports}var v=Fr();const ne={AUTOCOMPLETE:"ACP",BUTTON_LIST:"BTL",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",ICON:"ICO",IMAGE:"IMG",MEMO:"MEM",MULTI_AUTOCOMPLETE:"AML",SPOTLIGHT:"SPL",SWITCH:"SWT",TEXT_FIELD:"ITX",PASSWORD:"PWD"},Vr=r=>r.t=="D8",Yr=r=>{if(r){const e=r.split(";");if(e.length==3)return{t:e[0],p:e[1],k:e[2]}}return{t:"",p:"",k:""}};class qe{constructor(e,t){be(this,"class");be(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new qe(e,e.k=="1"||e.k=="true")}getValue(){return this.value}getLegacyValue(){if(this.class.t=="V2"){if(this.class.p=="SI/NO")return this.value?"1":" ";if(this.class.p=="ON/OFF")return this.value?"1":"0"}return this.value?"true":"false"}}function Ur(r,e){if(vt(r)){const f=new Date(r);if(!isNaN(f.getTime()))return f}const t=new Date,n=r.replaceAll("/","").replaceAll("-","");let s="DDMMYYYY";e==="en"&&(s="MMDDYYYY");const a=s.indexOf("DD"),i=s.indexOf("MM");let o=0,u=0,c="";switch(n.length){case 1:case 2:return o=parseInt(n),t.setDate(o),Me(t)?t:r;case 3:case 4:return o=parseInt(n.substring(0,2)),u=parseInt(n.substring(2,4)),i===0?(t.setMonth(o-1),t.setDate(u)):a===0&&(t.setMonth(u-1),t.setDate(o)),Me(t)?t:r;case 5:case 6:{o=parseInt(n.substring(0,2)),u=parseInt(n.substring(2,4)),Number(n.substring(4))>50?c="19"+n.substring(4):c="20"+n.substring(4);let f=0,l=0;return i===0?(f=u,l=o-1,t.setFullYear(parseInt(c),l,f)):a===0&&(f=o,l=u-1,t.setFullYear(parseInt(c),l,f)),pt(o,l,parseInt(c))&&Me(t)?t:r}case 7:case 8:{o=parseInt(n.substring(0,2)),u=parseInt(n.substring(2,4)),c=n.substring(4);let f=0,l=0;return i===0?(f=u,l=o-1,t.setFullYear(parseInt(c),l,f)):a===0&&(f=o,l=u-1,t.setFullYear(parseInt(c),l,f)),pt(f,l,parseInt(c))&&Me(t)?t:r}}return r}function vt(r){return/^\d{4}-\d{2}-\d{2}$/.test(r)&&r.length===10}function Me(r){return r instanceof Date&&!isNaN(r.getTime())}function Wr(r){if(!/^\d{8}$/.test(r))return!1;const e=parseInt(r.slice(0,4),10),t=parseInt(r.slice(4,6),10),n=parseInt(r.slice(6,8),10);return pt(n,t-1,e)}function pt(r,e,t){const n=[31,Hr(t)?29:28,31,30,31,30,31,31,30,31,30,31];return!(e<0||e>11||r<1||r>n[e])}function Hr(r){return r%4===0&&(r%100!==0||r%400===0)}function Br(r){const e=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),n=String(r.getDate()).padStart(2,"0");return isNaN(e)||isNaN(Number(t))||isNaN(Number(n))?r.toString():`${e}-${t}-${n}`}class Ke{constructor(e,t){be(this,"class");be(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=Ct.get(`${e.t}${e.p}`);if(t)return new Ke(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=Ct.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.date}}const Ct=new Map([["D8*YYMD",{legacyToIso(r){return Wr(r)&&`${r.substring(0,4)}-${r.substring(4,6)}-${r.substring(6,8)}`||r},isoToLegacy(r){return vt(r)&&r.replaceAll("-","")||r}}]]),ze=(r,e)=>{$.useEffect(()=>{const t=n=>{typeof r=="object"&&r!==null&&"current"in r&&r.current&&!r.current.contains(n.target)&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[r,e])};function bt({position:r="bottom",enabled:e=!0}){const t=$.useRef(null),n=$.useRef(null),[s,a]=$.useState(0),i=$.useCallback(()=>{const o=t.current,u=n.current;if(!o||!u)return;const{top:c,left:f,width:l,height:p}=o.getBoundingClientRect();a(l);const d=u.offsetHeight,m=u.offsetWidth;if(m===0||d===0){requestAnimationFrame(i);return}let g=c+window.scrollY,x=f+window.scrollX;switch(r){case"top":g-=d;break;case"bottom":g+=p;break;case"left":x-=m;break;case"right":x+=l;break}requestAnimationFrame(()=>{u.style.transform=`translate(${x}px, ${g}px)`,u.style.opacity="1"})},[r]);return $.useLayoutEffect(()=>{if(!e)return;const o=requestAnimationFrame(()=>{i()}),u=new MutationObserver(()=>{n.current&&i()});return n.current&&u.observe(n.current,{childList:!0,subtree:!0}),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0),()=>{cancelAnimationFrame(o),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),u.disconnect()}},[i,e]),{anchorRef:t,targetRef:n,anchorWidth:s}}const Je=(r,e,t)=>{if(r=="")return"";if(t)switch(t){case"CodeOnly":return r;case"DescOnly":return e||"";case"Both":return`${r} - ${e}`}return r},hr=({helperText:r,disabled:e,state:t,id:n})=>{const s={container:`smp-helper-text ${e?"smp-helper-text-disabled":""} ${t?`smp-helper-text-${t}`:""}`};return v.jsx("label",{className:s.container,id:n,children:r})},De=({label:r,disabled:e,htmlFor:t})=>{const n={container:`smp-label ${e?"smp-label-disabled":""}`};return v.jsx("label",{className:n.container,htmlFor:t,children:r})};function Gr(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}function Xe(){return Xe=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Xe.apply(null,arguments)}function ht(r,e){return ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},ht(r,e)}function qr(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,ht(r,e)}function nt(r,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,a;n<s;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||Array.prototype.slice.call(e))}var Fe={};/*!
32
23
  * content-type
33
24
  * Copyright(c) 2015 Douglas Christopher Wilson
34
25
  * MIT Licensed
35
- */var Nt;function Xr(){if(Nt)return Je;Nt=1;var r=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,e=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,t=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,n=/\\([\u000b\u0020-\u00ff])/g,s=/([\\"])/g,a=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;Je.format=i,Je.parse=o;function i(u){if(!u||typeof u!="object")throw new TypeError("argument obj is required");var d=u.parameters,g=u.type;if(!g||!a.test(g))throw new TypeError("invalid type");var h=g;if(d&&typeof d=="object")for(var m,x=Object.keys(d).sort(),T=0;T<x.length;T++){if(m=x[T],!t.test(m))throw new TypeError("invalid parameter name");h+="; "+m+"="+c(d[m])}return h}function o(u){if(!u)throw new TypeError("argument string is required");var d=typeof u=="object"?l(u):u;if(typeof d!="string")throw new TypeError("argument string is required to be a string");var g=d.indexOf(";"),h=g!==-1?d.slice(0,g).trim():d.trim();if(!a.test(h))throw new TypeError("invalid media type");var m=new f(h.toLowerCase());if(g!==-1){var x,T,R;for(r.lastIndex=g;T=r.exec(d);){if(T.index!==g)throw new TypeError("invalid parameter format");g+=T[0].length,x=T[1].toLowerCase(),R=T[2],R.charCodeAt(0)===34&&(R=R.slice(1,-1),R.indexOf("\\")!==-1&&(R=R.replace(n,"$1"))),m.parameters[x]=R}if(g!==d.length)throw new TypeError("invalid parameter format")}return m}function l(u){var d;if(typeof u.getHeader=="function"?d=u.getHeader("content-type"):typeof u.headers=="object"&&(d=u.headers&&u.headers["content-type"]),typeof d!="string")throw new TypeError("content-type header is missing from object");return d}function c(u){var d=String(u);if(t.test(d))return d;if(d.length>0&&!e.test(d))throw new TypeError("invalid parameter value");return'"'+d.replace(s,"\\$1")+'"'}function f(u){this.parameters=Object.create(null),this.type=u}return Je}var Zr=Xr(),Ne=new Map,br=function(e){return e.cloneNode(!0)},_t=function(){return window.location.protocol==="file:"},xr=function(e,t,n){var s=new XMLHttpRequest;s.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&s.readyState===2){var a=s.getResponseHeader("Content-Type");if(!a)throw new Error("Content type not found");var i=Zr.parse(a).type;if(!(i==="image/svg+xml"||i==="text/plain"))throw new Error("Invalid content type: ".concat(i))}if(s.readyState===4){if(s.status===404||s.responseXML===null)throw new Error(_t()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(s.status===200||_t()&&s.status===0)n(null,s);else throw new Error("There was a problem injecting the SVG: "+s.status+" "+s.statusText)}}catch(o){if(s.abort(),o instanceof Error)n(o,s);else throw o}},s.open("GET",e),s.withCredentials=t,s.overrideMimeType&&s.overrideMimeType("text/xml"),s.send()},De={},It=function(e,t){De[e]=De[e]||[],De[e].push(t)},Qr=function(e){for(var t=function(i,o){setTimeout(function(){if(Array.isArray(De[e])){var l=Ne.get(e),c=De[e][i];l instanceof SVGSVGElement&&c(null,br(l)),l instanceof Error&&c(l),i===De[e].length-1&&delete De[e]}},0)},n=0,s=De[e].length;n<s;n++)t(n)},en=function(e,t,n){if(Ne.has(e)){var s=Ne.get(e);if(s===void 0){It(e,n);return}if(s instanceof SVGSVGElement){n(null,br(s));return}}Ne.set(e,void 0),It(e,n),xr(e,t,function(a,i){var o;a?Ne.set(e,a):((o=i.responseXML)===null||o===void 0?void 0:o.documentElement)instanceof SVGSVGElement&&Ne.set(e,i.responseXML.documentElement),Qr(e)})},tn=function(e,t,n){xr(e,t,function(s,a){var i;s?n(s):((i=a.responseXML)===null||i===void 0?void 0:i.documentElement)instanceof SVGSVGElement&&n(null,a.responseXML.documentElement)})},rn=0,nn=function(){return++rn},Ee=[],Mt={},sn="http://www.w3.org/2000/svg",pt="http://www.w3.org/1999/xlink",Ft=function(e,t,n,s,a,i,o){var l=e.getAttribute("data-src")||e.getAttribute("src");if(!l){o(new Error("Invalid data-src or src attribute"));return}if(Ee.indexOf(e)!==-1){Ee.splice(Ee.indexOf(e),1),e=null;return}Ee.push(e),e.setAttribute("src","");var c=s?en:tn;c(l,a,function(f,u){if(!u){Ee.splice(Ee.indexOf(e),1),e=null,o(f);return}var d=e.getAttribute("id");d&&u.setAttribute("id",d);var g=e.getAttribute("title");g&&u.setAttribute("title",g);var h=e.getAttribute("width");h&&u.setAttribute("width",h);var m=e.getAttribute("height");m&&u.setAttribute("height",m);var x=Array.from(new Set(dt(dt(dt([],(u.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();u.setAttribute("class",x);var T=e.getAttribute("style");T&&u.setAttribute("style",T),u.setAttribute("data-src",l);var R=[].filter.call(e.attributes,function(Q){return/^data-\w[\w-]*$/.test(Q.name)});if(Array.prototype.forEach.call(R,function(Q){Q.name&&Q.value&&u.setAttribute(Q.name,Q.value)}),n){var w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},E,b,A,N,W;Object.keys(w).forEach(function(Q){E=Q,A=w[Q],b=u.querySelectorAll(E+"[id]");for(var L=function($,O){N=b[$].id,W=N+"-"+nn();var P;Array.prototype.forEach.call(A,function(_){P=u.querySelectorAll("["+_+'*="'+N+'"]');for(var J=0,ne=P.length;J<ne;J++){var ie=P[J].getAttribute(_);ie&&!ie.match(new RegExp('url\\("?#'+N+'"?\\)'))||P[J].setAttribute(_,"url(#"+W+")")}});for(var I=u.querySelectorAll("[*|href]"),V=[],K=0,te=I.length;K<te;K++){var G=I[K].getAttributeNS(pt,"href");G&&G.toString()==="#"+b[$].id&&V.push(I[K])}for(var le=0,D=V.length;le<D;le++)V[le].setAttributeNS(pt,"href","#"+W);b[$].id=W},v=0,y=b.length;v<y;v++)L(v)})}u.removeAttribute("xmlns:a");for(var M=u.querySelectorAll("script"),j=[],F,H,X=0,B=M.length;X<B;X++)H=M[X].getAttribute("type"),(!H||H==="application/ecmascript"||H==="application/javascript"||H==="text/javascript")&&(F=M[X].innerText||M[X].textContent,F&&j.push(F),u.removeChild(M[X]));if(j.length>0&&(t==="always"||t==="once"&&!Mt[l])){for(var oe=0,ee=j.length;oe<ee;oe++)new Function(j[oe])(window);Mt[l]=!0}var q=u.querySelectorAll("style");if(Array.prototype.forEach.call(q,function(Q){Q.textContent+=""}),u.setAttribute("xmlns",sn),u.setAttribute("xmlns:xlink",pt),i(u),!e.parentNode){Ee.splice(Ee.indexOf(e),1),e=null,o(new Error("Parent node is null"));return}e.parentNode.replaceChild(u,e),Ee.splice(Ee.indexOf(e),1),e=null,o(null,u)})},an=function(e,t){var n=t===void 0?{}:t,s=n.afterAll,a=s===void 0?function(){}:s,i=n.afterEach,o=i===void 0?function(){}:i,l=n.beforeEach,c=l===void 0?function(){}:l,f=n.cacheRequests,u=f===void 0?!0:f,d=n.evalScripts,g=d===void 0?"never":d,h=n.httpRequestWithCredentials,m=h===void 0?!1:h,x=n.renumerateIRIElements,T=x===void 0?!0:x;if(e&&"length"in e)for(var R=0,w=0,E=e.length;w<E;w++)Ft(e[w],g,T,u,m,c,function(b,A){o(b,A),e&&"length"in e&&e.length===++R&&a(R)});else e?Ft(e,g,T,u,m,c,function(b,A){o(b,A),a(1),e=null}):a(0)},Xe={exports:{}},Ze={exports:{}},se={};/** @license React v16.13.1
26
+ */var $t;function Kr(){if($t)return Fe;$t=1;var r=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,e=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,t=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,n=/\\([\u000b\u0020-\u00ff])/g,s=/([\\"])/g,a=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;Fe.format=i,Fe.parse=o;function i(l){if(!l||typeof l!="object")throw new TypeError("argument obj is required");var p=l.parameters,d=l.type;if(!d||!a.test(d))throw new TypeError("invalid type");var m=d;if(p&&typeof p=="object")for(var g,x=Object.keys(p).sort(),w=0;w<x.length;w++){if(g=x[w],!t.test(g))throw new TypeError("invalid parameter name");m+="; "+g+"="+c(p[g])}return m}function o(l){if(!l)throw new TypeError("argument string is required");var p=typeof l=="object"?u(l):l;if(typeof p!="string")throw new TypeError("argument string is required to be a string");var d=p.indexOf(";"),m=d!==-1?p.slice(0,d).trim():p.trim();if(!a.test(m))throw new TypeError("invalid media type");var g=new f(m.toLowerCase());if(d!==-1){var x,w,E;for(r.lastIndex=d;w=r.exec(p);){if(w.index!==d)throw new TypeError("invalid parameter format");d+=w[0].length,x=w[1].toLowerCase(),E=w[2],E.charCodeAt(0)===34&&(E=E.slice(1,-1),E.indexOf("\\")!==-1&&(E=E.replace(n,"$1"))),g.parameters[x]=E}if(d!==p.length)throw new TypeError("invalid parameter format")}return g}function u(l){var p;if(typeof l.getHeader=="function"?p=l.getHeader("content-type"):typeof l.headers=="object"&&(p=l.headers&&l.headers["content-type"]),typeof p!="string")throw new TypeError("content-type header is missing from object");return p}function c(l){var p=String(l);if(t.test(p))return p;if(p.length>0&&!e.test(p))throw new TypeError("invalid parameter value");return'"'+p.replace(s,"\\$1")+'"'}function f(l){this.parameters=Object.create(null),this.type=l}return Fe}var zr=Kr(),Re=new Map,mr=function(e){return e.cloneNode(!0)},Pt=function(){return window.location.protocol==="file:"},gr=function(e,t,n){var s=new XMLHttpRequest;s.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&s.readyState===2){var a=s.getResponseHeader("Content-Type");if(!a)throw new Error("Content type not found");var i=zr.parse(a).type;if(!(i==="image/svg+xml"||i==="text/plain"))throw new Error("Invalid content type: ".concat(i))}if(s.readyState===4){if(s.status===404||s.responseXML===null)throw new Error(Pt()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(s.status===200||Pt()&&s.status===0)n(null,s);else throw new Error("There was a problem injecting the SVG: "+s.status+" "+s.statusText)}}catch(o){if(s.abort(),o instanceof Error)n(o,s);else throw o}},s.open("GET",e),s.withCredentials=t,s.overrideMimeType&&s.overrideMimeType("text/xml"),s.send()},ve={},At=function(e,t){ve[e]=ve[e]||[],ve[e].push(t)},Jr=function(e){for(var t=function(i,o){setTimeout(function(){if(Array.isArray(ve[e])){var u=Re.get(e),c=ve[e][i];u instanceof SVGSVGElement&&c(null,mr(u)),u instanceof Error&&c(u),i===ve[e].length-1&&delete ve[e]}},0)},n=0,s=ve[e].length;n<s;n++)t(n)},Xr=function(e,t,n){if(Re.has(e)){var s=Re.get(e);if(s===void 0){At(e,n);return}if(s instanceof SVGSVGElement){n(null,mr(s));return}}Re.set(e,void 0),At(e,n),gr(e,t,function(a,i){var o;a?Re.set(e,a):((o=i.responseXML)===null||o===void 0?void 0:o.documentElement)instanceof SVGSVGElement&&Re.set(e,i.responseXML.documentElement),Jr(e)})},Zr=function(e,t,n){gr(e,t,function(s,a){var i;s?n(s):((i=a.responseXML)===null||i===void 0?void 0:i.documentElement)instanceof SVGSVGElement&&n(null,a.responseXML.documentElement)})},Qr=0,en=function(){return++Qr},me=[],Lt={},tn="http://www.w3.org/2000/svg",st="http://www.w3.org/1999/xlink",kt=function(e,t,n,s,a,i,o){var u=e.getAttribute("data-src")||e.getAttribute("src");if(!u){o(new Error("Invalid data-src or src attribute"));return}if(me.indexOf(e)!==-1){me.splice(me.indexOf(e),1),e=null;return}me.push(e),e.setAttribute("src","");var c=s?Xr:Zr;c(u,a,function(f,l){if(!l){me.splice(me.indexOf(e),1),e=null,o(f);return}var p=e.getAttribute("id");p&&l.setAttribute("id",p);var d=e.getAttribute("title");d&&l.setAttribute("title",d);var m=e.getAttribute("width");m&&l.setAttribute("width",m);var g=e.getAttribute("height");g&&l.setAttribute("height",g);var x=Array.from(new Set(nt(nt(nt([],(l.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();l.setAttribute("class",x);var w=e.getAttribute("style");w&&l.setAttribute("style",w),l.setAttribute("data-src",u);var E=[].filter.call(e.attributes,function(H){return/^data-\w[\w-]*$/.test(H.name)});if(Array.prototype.forEach.call(E,function(H){H.name&&H.value&&l.setAttribute(H.name,H.value)}),n){var O={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},S,b,L,C,U;Object.keys(O).forEach(function(H){S=H,L=O[H],b=l.querySelectorAll(S+"[id]");for(var k=function(_,R){C=b[_].id,U=C+"-"+en();var A;Array.prototype.forEach.call(L,function(Y){A=l.querySelectorAll("["+Y+'*="'+C+'"]');for(var Z=0,te=A.length;Z<te;Z++){var re=A[Z].getAttribute(Y);re&&!re.match(new RegExp('url\\("?#'+C+'"?\\)'))||A[Z].setAttribute(Y,"url(#"+U+")")}});for(var F=l.querySelectorAll("[*|href]"),V=[],M=0,X=F.length;M<X;M++){var G=F[M].getAttributeNS(st,"href");G&&G.toString()==="#"+b[_].id&&V.push(F[M])}for(var se=0,N=V.length;se<N;se++)V[se].setAttributeNS(st,"href","#"+U);b[_].id=U},h=0,y=b.length;h<y;h++)k(h)})}l.removeAttribute("xmlns:a");for(var j=l.querySelectorAll("script"),P=[],D,I,W=0,B=j.length;W<B;W++)I=j[W].getAttribute("type"),(!I||I==="application/ecmascript"||I==="application/javascript"||I==="text/javascript")&&(D=j[W].innerText||j[W].textContent,D&&P.push(D),l.removeChild(j[W]));if(P.length>0&&(t==="always"||t==="once"&&!Lt[u])){for(var J=0,K=P.length;J<K;J++)new Function(P[J])(window);Lt[u]=!0}var z=l.querySelectorAll("style");if(Array.prototype.forEach.call(z,function(H){H.textContent+=""}),l.setAttribute("xmlns",tn),l.setAttribute("xmlns:xlink",st),i(l),!e.parentNode){me.splice(me.indexOf(e),1),e=null,o(new Error("Parent node is null"));return}e.parentNode.replaceChild(l,e),me.splice(me.indexOf(e),1),e=null,o(null,l)})},rn=function(e,t){var n=t===void 0?{}:t,s=n.afterAll,a=s===void 0?function(){}:s,i=n.afterEach,o=i===void 0?function(){}:i,u=n.beforeEach,c=u===void 0?function(){}:u,f=n.cacheRequests,l=f===void 0?!0:f,p=n.evalScripts,d=p===void 0?"never":p,m=n.httpRequestWithCredentials,g=m===void 0?!1:m,x=n.renumerateIRIElements,w=x===void 0?!0:x;if(e&&"length"in e)for(var E=0,O=0,S=e.length;O<S;O++)kt(e[O],d,w,l,g,c,function(b,L){o(b,L),e&&"length"in e&&e.length===++E&&a(E)});else e?kt(e,d,w,l,g,c,function(b,L){o(b,L),a(1),e=null}):a(0)},Ve={exports:{}},Ye={exports:{}},Q={};/** @license React v16.13.1
36
27
  * react-is.production.min.js
37
28
  *
38
29
  * Copyright (c) Facebook, Inc. and its affiliates.
39
30
  *
40
31
  * This source code is licensed under the MIT license found in the
41
32
  * LICENSE file in the root directory of this source tree.
42
- */var Vt;function on(){if(Vt)return se;Vt=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,o=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,c=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,u=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,m=r?Symbol.for("react.block"):60121,x=r?Symbol.for("react.fundamental"):60117,T=r?Symbol.for("react.responder"):60118,R=r?Symbol.for("react.scope"):60119;function w(b){if(typeof b=="object"&&b!==null){var A=b.$$typeof;switch(A){case e:switch(b=b.type,b){case l:case c:case n:case a:case s:case u:return b;default:switch(b=b&&b.$$typeof,b){case o:case f:case h:case g:case i:return b;default:return A}}case t:return A}}}function E(b){return w(b)===c}return se.AsyncMode=l,se.ConcurrentMode=c,se.ContextConsumer=o,se.ContextProvider=i,se.Element=e,se.ForwardRef=f,se.Fragment=n,se.Lazy=h,se.Memo=g,se.Portal=t,se.Profiler=a,se.StrictMode=s,se.Suspense=u,se.isAsyncMode=function(b){return E(b)||w(b)===l},se.isConcurrentMode=E,se.isContextConsumer=function(b){return w(b)===o},se.isContextProvider=function(b){return w(b)===i},se.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},se.isForwardRef=function(b){return w(b)===f},se.isFragment=function(b){return w(b)===n},se.isLazy=function(b){return w(b)===h},se.isMemo=function(b){return w(b)===g},se.isPortal=function(b){return w(b)===t},se.isProfiler=function(b){return w(b)===a},se.isStrictMode=function(b){return w(b)===s},se.isSuspense=function(b){return w(b)===u},se.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===c||b===a||b===s||b===u||b===d||typeof b=="object"&&b!==null&&(b.$$typeof===h||b.$$typeof===g||b.$$typeof===i||b.$$typeof===o||b.$$typeof===f||b.$$typeof===x||b.$$typeof===T||b.$$typeof===R||b.$$typeof===m)},se.typeOf=w,se}var ae={};/** @license React v16.13.1
33
+ */var It;function nn(){if(It)return Q;It=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,o=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,c=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,l=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.suspense_list"):60120,d=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,x=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,E=r?Symbol.for("react.scope"):60119;function O(b){if(typeof b=="object"&&b!==null){var L=b.$$typeof;switch(L){case e:switch(b=b.type,b){case u:case c:case n:case a:case s:case l:return b;default:switch(b=b&&b.$$typeof,b){case o:case f:case m:case d:case i:return b;default:return L}}case t:return L}}}function S(b){return O(b)===c}return Q.AsyncMode=u,Q.ConcurrentMode=c,Q.ContextConsumer=o,Q.ContextProvider=i,Q.Element=e,Q.ForwardRef=f,Q.Fragment=n,Q.Lazy=m,Q.Memo=d,Q.Portal=t,Q.Profiler=a,Q.StrictMode=s,Q.Suspense=l,Q.isAsyncMode=function(b){return S(b)||O(b)===u},Q.isConcurrentMode=S,Q.isContextConsumer=function(b){return O(b)===o},Q.isContextProvider=function(b){return O(b)===i},Q.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Q.isForwardRef=function(b){return O(b)===f},Q.isFragment=function(b){return O(b)===n},Q.isLazy=function(b){return O(b)===m},Q.isMemo=function(b){return O(b)===d},Q.isPortal=function(b){return O(b)===t},Q.isProfiler=function(b){return O(b)===a},Q.isStrictMode=function(b){return O(b)===s},Q.isSuspense=function(b){return O(b)===l},Q.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===c||b===a||b===s||b===l||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===d||b.$$typeof===i||b.$$typeof===o||b.$$typeof===f||b.$$typeof===x||b.$$typeof===w||b.$$typeof===E||b.$$typeof===g)},Q.typeOf=O,Q}var ee={};/** @license React v16.13.1
43
34
  * react-is.development.js
44
35
  *
45
36
  * Copyright (c) Facebook, Inc. and its affiliates.
46
37
  *
47
38
  * This source code is licensed under the MIT license found in the
48
39
  * LICENSE file in the root directory of this source tree.
49
- */var Yt;function ln(){return Yt||(Yt=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,o=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,c=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,u=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,m=r?Symbol.for("react.block"):60121,x=r?Symbol.for("react.fundamental"):60117,T=r?Symbol.for("react.responder"):60118,R=r?Symbol.for("react.scope"):60119;function w(D){return typeof D=="string"||typeof D=="function"||D===n||D===c||D===a||D===s||D===u||D===d||typeof D=="object"&&D!==null&&(D.$$typeof===h||D.$$typeof===g||D.$$typeof===i||D.$$typeof===o||D.$$typeof===f||D.$$typeof===x||D.$$typeof===T||D.$$typeof===R||D.$$typeof===m)}function E(D){if(typeof D=="object"&&D!==null){var _=D.$$typeof;switch(_){case e:var J=D.type;switch(J){case l:case c:case n:case a:case s:case u:return J;default:var ne=J&&J.$$typeof;switch(ne){case o:case f:case h:case g:case i:return ne;default:return _}}case t:return _}}}var b=l,A=c,N=o,W=i,M=e,j=f,F=n,H=h,X=g,B=t,oe=a,ee=s,q=u,Q=!1;function L(D){return Q||(Q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),v(D)||E(D)===l}function v(D){return E(D)===c}function y(D){return E(D)===o}function C(D){return E(D)===i}function $(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function O(D){return E(D)===f}function P(D){return E(D)===n}function I(D){return E(D)===h}function V(D){return E(D)===g}function K(D){return E(D)===t}function te(D){return E(D)===a}function G(D){return E(D)===s}function le(D){return E(D)===u}ae.AsyncMode=b,ae.ConcurrentMode=A,ae.ContextConsumer=N,ae.ContextProvider=W,ae.Element=M,ae.ForwardRef=j,ae.Fragment=F,ae.Lazy=H,ae.Memo=X,ae.Portal=B,ae.Profiler=oe,ae.StrictMode=ee,ae.Suspense=q,ae.isAsyncMode=L,ae.isConcurrentMode=v,ae.isContextConsumer=y,ae.isContextProvider=C,ae.isElement=$,ae.isForwardRef=O,ae.isFragment=P,ae.isLazy=I,ae.isMemo=V,ae.isPortal=K,ae.isProfiler=te,ae.isStrictMode=G,ae.isSuspense=le,ae.isValidElementType=w,ae.typeOf=E}()),ae}var Ut;function Sr(){return Ut||(Ut=1,process.env.NODE_ENV==="production"?Ze.exports=on():Ze.exports=ln()),Ze.exports}/*
40
+ */var Nt;function sn(){return Nt||(Nt=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,o=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,c=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,l=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.suspense_list"):60120,d=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,x=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,E=r?Symbol.for("react.scope"):60119;function O(N){return typeof N=="string"||typeof N=="function"||N===n||N===c||N===a||N===s||N===l||N===p||typeof N=="object"&&N!==null&&(N.$$typeof===m||N.$$typeof===d||N.$$typeof===i||N.$$typeof===o||N.$$typeof===f||N.$$typeof===x||N.$$typeof===w||N.$$typeof===E||N.$$typeof===g)}function S(N){if(typeof N=="object"&&N!==null){var Y=N.$$typeof;switch(Y){case e:var Z=N.type;switch(Z){case u:case c:case n:case a:case s:case l:return Z;default:var te=Z&&Z.$$typeof;switch(te){case o:case f:case m:case d:case i:return te;default:return Y}}case t:return Y}}}var b=u,L=c,C=o,U=i,j=e,P=f,D=n,I=m,W=d,B=t,J=a,K=s,z=l,H=!1;function k(N){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),h(N)||S(N)===u}function h(N){return S(N)===c}function y(N){return S(N)===o}function T(N){return S(N)===i}function _(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function R(N){return S(N)===f}function A(N){return S(N)===n}function F(N){return S(N)===m}function V(N){return S(N)===d}function M(N){return S(N)===t}function X(N){return S(N)===a}function G(N){return S(N)===s}function se(N){return S(N)===l}ee.AsyncMode=b,ee.ConcurrentMode=L,ee.ContextConsumer=C,ee.ContextProvider=U,ee.Element=j,ee.ForwardRef=P,ee.Fragment=D,ee.Lazy=I,ee.Memo=W,ee.Portal=B,ee.Profiler=J,ee.StrictMode=K,ee.Suspense=z,ee.isAsyncMode=k,ee.isConcurrentMode=h,ee.isContextConsumer=y,ee.isContextProvider=T,ee.isElement=_,ee.isForwardRef=R,ee.isFragment=A,ee.isLazy=F,ee.isMemo=V,ee.isPortal=M,ee.isProfiler=X,ee.isStrictMode=G,ee.isSuspense=se,ee.isValidElementType=O,ee.typeOf=S}()),ee}var Mt;function yr(){return Mt||(Mt=1,process.env.NODE_ENV==="production"?Ye.exports=nn():Ye.exports=sn()),Ye.exports}/*
50
41
  object-assign
51
42
  (c) Sindre Sorhus
52
43
  @license MIT
53
- */var ht,Wt;function cn(){if(Wt)return ht;Wt=1;var r=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function s(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},o=0;o<10;o++)i["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ht=s()?Object.assign:function(a,i){for(var o,l=n(a),c,f=1;f<arguments.length;f++){o=Object(arguments[f]);for(var u in o)e.call(o,u)&&(l[u]=o[u]);if(r){c=r(o);for(var d=0;d<c.length;d++)t.call(o,c[d])&&(l[c[d]]=o[c[d]])}}return l},ht}var gt,Ht;function Dt(){if(Ht)return gt;Ht=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return gt=r,gt}var mt,qt;function Er(){return qt||(qt=1,mt=Function.call.bind(Object.prototype.hasOwnProperty)),mt}var yt,Kt;function un(){if(Kt)return yt;Kt=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var e=Dt(),t={},n=Er();r=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(a,i,o,l,c){if(process.env.NODE_ENV!=="production"){for(var f in a)if(n(a,f)){var u;try{if(typeof a[f]!="function"){var d=Error((l||"React class")+": "+o+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=a[f](i,f,l,o,null,e)}catch(h){u=h}if(u&&!(u instanceof Error)&&r((l||"React class")+": type specification of "+o+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in t)){t[u.message]=!0;var g=c?c():"";r("Failed "+o+" type: "+u.message+(g??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},yt=s,yt}var vt,Bt;function fn(){if(Bt)return vt;Bt=1;var r=Sr(),e=cn(),t=Dt(),n=Er(),s=un(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var l="Warning: "+o;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return vt=function(o,l){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function u(v){var y=v&&(c&&v[c]||v[f]);if(typeof y=="function")return y}var d="<<anonymous>>",g={array:T("array"),bigint:T("bigint"),bool:T("boolean"),func:T("function"),number:T("number"),object:T("object"),string:T("string"),symbol:T("symbol"),any:R(),arrayOf:w,element:E(),elementType:b(),instanceOf:A,node:j(),objectOf:W,oneOf:N,oneOfType:M,shape:H,exact:X};function h(v,y){return v===y?v!==0||1/v===1/y:v!==v&&y!==y}function m(v,y){this.message=v,this.data=y&&typeof y=="object"?y:{},this.stack=""}m.prototype=Error.prototype;function x(v){if(process.env.NODE_ENV!=="production")var y={},C=0;function $(P,I,V,K,te,G,le){if(K=K||d,G=G||V,le!==t){if(l){var D=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 D.name="Invariant Violation",D}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var _=K+":"+V;!y[_]&&C<3&&(a("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+K+"`. 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."),y[_]=!0,C++)}}return I[V]==null?P?I[V]===null?new m("The "+te+" `"+G+"` is marked as required "+("in `"+K+"`, but its value is `null`.")):new m("The "+te+" `"+G+"` is marked as required in "+("`"+K+"`, but its value is `undefined`.")):null:v(I,V,K,te,G)}var O=$.bind(null,!1);return O.isRequired=$.bind(null,!0),O}function T(v){function y(C,$,O,P,I,V){var K=C[$],te=ee(K);if(te!==v){var G=q(K);return new m("Invalid "+P+" `"+I+"` of type "+("`"+G+"` supplied to `"+O+"`, expected ")+("`"+v+"`."),{expectedType:v})}return null}return x(y)}function R(){return x(i)}function w(v){function y(C,$,O,P,I){if(typeof v!="function")return new m("Property `"+I+"` of component `"+O+"` has invalid PropType notation inside arrayOf.");var V=C[$];if(!Array.isArray(V)){var K=ee(V);return new m("Invalid "+P+" `"+I+"` of type "+("`"+K+"` supplied to `"+O+"`, expected an array."))}for(var te=0;te<V.length;te++){var G=v(V,te,O,P,I+"["+te+"]",t);if(G instanceof Error)return G}return null}return x(y)}function E(){function v(y,C,$,O,P){var I=y[C];if(!o(I)){var V=ee(I);return new m("Invalid "+O+" `"+P+"` of type "+("`"+V+"` supplied to `"+$+"`, expected a single ReactElement."))}return null}return x(v)}function b(){function v(y,C,$,O,P){var I=y[C];if(!r.isValidElementType(I)){var V=ee(I);return new m("Invalid "+O+" `"+P+"` of type "+("`"+V+"` supplied to `"+$+"`, expected a single ReactElement type."))}return null}return x(v)}function A(v){function y(C,$,O,P,I){if(!(C[$]instanceof v)){var V=v.name||d,K=L(C[$]);return new m("Invalid "+P+" `"+I+"` of type "+("`"+K+"` supplied to `"+O+"`, expected ")+("instance of `"+V+"`."))}return null}return x(y)}function N(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("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])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function y(C,$,O,P,I){for(var V=C[$],K=0;K<v.length;K++)if(h(V,v[K]))return null;var te=JSON.stringify(v,function(le,D){var _=q(D);return _==="symbol"?String(D):D});return new m("Invalid "+P+" `"+I+"` of value `"+String(V)+"` "+("supplied to `"+O+"`, expected one of "+te+"."))}return x(y)}function W(v){function y(C,$,O,P,I){if(typeof v!="function")return new m("Property `"+I+"` of component `"+O+"` has invalid PropType notation inside objectOf.");var V=C[$],K=ee(V);if(K!=="object")return new m("Invalid "+P+" `"+I+"` of type "+("`"+K+"` supplied to `"+O+"`, expected an object."));for(var te in V)if(n(V,te)){var G=v(V,te,O,P,I+"."+te,t);if(G instanceof Error)return G}return null}return x(y)}function M(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var y=0;y<v.length;y++){var C=v[y];if(typeof C!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Q(C)+" at index "+y+"."),i}function $(O,P,I,V,K){for(var te=[],G=0;G<v.length;G++){var le=v[G],D=le(O,P,I,V,K,t);if(D==null)return null;D.data&&n(D.data,"expectedType")&&te.push(D.data.expectedType)}var _=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new m("Invalid "+V+" `"+K+"` supplied to "+("`"+I+"`"+_+"."))}return x($)}function j(){function v(y,C,$,O,P){return B(y[C])?null:new m("Invalid "+O+" `"+P+"` supplied to "+("`"+$+"`, expected a ReactNode."))}return x(v)}function F(v,y,C,$,O){return new m((v||"React class")+": "+y+" type `"+C+"."+$+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+O+"`.")}function H(v){function y(C,$,O,P,I){var V=C[$],K=ee(V);if(K!=="object")return new m("Invalid "+P+" `"+I+"` of type `"+K+"` "+("supplied to `"+O+"`, expected `object`."));for(var te in v){var G=v[te];if(typeof G!="function")return F(O,P,I,te,q(G));var le=G(V,te,O,P,I+"."+te,t);if(le)return le}return null}return x(y)}function X(v){function y(C,$,O,P,I){var V=C[$],K=ee(V);if(K!=="object")return new m("Invalid "+P+" `"+I+"` of type `"+K+"` "+("supplied to `"+O+"`, expected `object`."));var te=e({},C[$],v);for(var G in te){var le=v[G];if(n(v,G)&&typeof le!="function")return F(O,P,I,G,q(le));if(!le)return new m("Invalid "+P+" `"+I+"` key `"+G+"` supplied to `"+O+"`.\nBad object: "+JSON.stringify(C[$],null," ")+`
54
- Valid keys: `+JSON.stringify(Object.keys(v),null," "));var D=le(V,G,O,P,I+"."+G,t);if(D)return D}return null}return x(y)}function B(v){switch(typeof v){case"number":case"string":case"undefined":return!0;case"boolean":return!v;case"object":if(Array.isArray(v))return v.every(B);if(v===null||o(v))return!0;var y=u(v);if(y){var C=y.call(v),$;if(y!==v.entries){for(;!($=C.next()).done;)if(!B($.value))return!1}else for(;!($=C.next()).done;){var O=$.value;if(O&&!B(O[1]))return!1}}else return!1;return!0;default:return!1}}function oe(v,y){return v==="symbol"?!0:y?y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&y instanceof Symbol:!1}function ee(v){var y=typeof v;return Array.isArray(v)?"array":v instanceof RegExp?"object":oe(y,v)?"symbol":y}function q(v){if(typeof v>"u"||v===null)return""+v;var y=ee(v);if(y==="object"){if(v instanceof Date)return"date";if(v instanceof RegExp)return"regexp"}return y}function Q(v){var y=q(v);switch(y){case"array":case"object":return"an "+y;case"boolean":case"date":case"regexp":return"a "+y;default:return y}}function L(v){return!v.constructor||!v.constructor.name?d:v.constructor.name}return g.checkPropTypes=s,g.resetWarningCache=s.resetWarningCache,g.PropTypes=g,g},vt}var bt,zt;function dn(){if(zt)return bt;zt=1;var r=Dt();function e(){}function t(){}return t.resetWarningCache=e,bt=function(){function n(i,o,l,c,f,u){if(u!==r){var d=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 d.name="Invariant Violation",d}}n.isRequired=n;function s(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:e};return a.PropTypes=a,a},bt}var Gt;function pn(){if(Gt)return Xe.exports;if(Gt=1,process.env.NODE_ENV!=="production"){var r=Sr(),e=!0;Xe.exports=fn()(r.isElement,e)}else Xe.exports=dn()();return Xe.exports}var fe=pn(),hn=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},gn=function(e,t){for(var n in e)if(!(n in t))return!0;for(var s in t)if(e[s]!==t[s])return!0;return!1},mn=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Qe="http://www.w3.org/2000/svg",Jt="http://www.w3.org/1999/xlink",_e=function(r){function e(){for(var n,s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];return n=r.call.apply(r,[this].concat(a))||this,n.initialState={hasError:!1,isLoading:!0},n.state=n.initialState,n._isMounted=!1,n.reactWrapper=void 0,n.nonReactWrapper=void 0,n.refCallback=function(o){n.reactWrapper=o},n}Jr(e,r);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof hn(this.reactWrapper).Node){var a=this.props,i=a.desc,o=a.evalScripts,l=a.httpRequestWithCredentials,c=a.renumerateIRIElements,f=a.src,u=a.title,d=a.useRequestCache,g=this.props.onError,h=this.props.beforeInjection,m=this.props.afterInjection,x=this.props.wrapper,T,R;x==="svg"?(T=document.createElementNS(Qe,x),T.setAttribute("xmlns",Qe),T.setAttribute("xmlns:xlink",Jt),R=document.createElementNS(Qe,x)):(T=document.createElement(x),R=document.createElement(x)),T.appendChild(R),R.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(T);var w=function(N){if(s.removeSVG(),!s._isMounted){g(N);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){g(N)})},E=function(N,W){if(N){w(N);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{m(W)}catch(M){w(M)}})},b=function(N){if(N.setAttribute("role","img"),i){var W=N.querySelector(":scope > desc");W&&N.removeChild(W);var M=document.createElement("desc");M.innerHTML=i,N.prepend(M)}if(u){var j=N.querySelector(":scope > title");j&&N.removeChild(j);var F=document.createElement("title");F.innerHTML=u,N.prepend(F)}try{h(N)}catch(H){w(H)}};an(R,{afterEach:E,beforeEach:b,cacheRequests:d,evalScripts:o,httpRequestWithCredentials:l,renumerateIRIElements:c})}},t.removeSVG=function(){var s;(s=this.nonReactWrapper)!=null&&s.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},t.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},t.componentDidUpdate=function(s){var a=this;gn(it({},s),this.props)&&this.setState(function(){return a.initialState},function(){a.removeSVG(),a.renderSVG()})},t.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},t.render=function(){var s=this.props;s.afterInjection,s.beforeInjection,s.desc,s.evalScripts;var a=s.fallback;s.httpRequestWithCredentials;var i=s.loading;s.renumerateIRIElements,s.src,s.title,s.useRequestCache;var o=s.wrapper,l=Gr(s,mn),c=o;return Be.createElement(c,it({},l,{ref:this.refCallback},o==="svg"?{xmlns:Qe,xmlnsXlink:Jt}:{}),this.state.isLoading&&i&&Be.createElement(i,null),this.state.hasError&&a&&Be.createElement(a,null))},e}(Be.Component);_e.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};_e.propTypes={afterInjection:fe.func,beforeInjection:fe.func,desc:fe.string,evalScripts:fe.oneOf(["always","once","never"]),fallback:fe.oneOfType([fe.func,fe.object,fe.string]),httpRequestWithCredentials:fe.bool,loading:fe.oneOfType([fe.func,fe.object,fe.string]),onError:fe.func,renumerateIRIElements:fe.bool,src:fe.string.isRequired,title:fe.string,useRequestCache:fe.bool,wrapper:fe.oneOf(["div","span","svg"])};let wt={assets:"/"};const yn=r=>{wt={...wt,...r}},Xt=r=>`${wt.assets}/${r}`.replace(/\/+/g,"/"),be=k.memo(({icon:r,width:e,height:t,placeholderIcon:n,color:s,disabled:a,state:i="base",rotated:o=!1,onClick:l,isInteractable:c=!1,spin:f=!1,title:u})=>{const[d,g]=k.useState(r),h=(r==null?void 0:r.startsWith("http"))||(r==null?void 0:r.startsWith("/")),m=h&&(r==null?void 0:r.toLowerCase().endsWith(".svg")),x=Xt(`assets/svg/${r}.svg`),T=Xt(`assets/svg/${n}.svg`),R={img:`${c?"smp-image-interactable":""}`,svg:`smp-icon ${i?`smp-icon-${i}`:""} ${o?"smp-icon-rotated":""} ${c?"smp-icon-interactable":""} ${f?"smp-icon-spin":""}`},w=()=>{!a&&l&&l()};return S.jsx(S.Fragment,{children:m?S.jsx(_e,{src:r,fallback:()=>S.jsx(_e,{src:T,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:u,role:"application",fill:s,"aria-disabled":a,className:R.svg,onClick:w}):h?S.jsx("img",{src:d,width:e||"16px",height:t||"auto",alt:u,onError:()=>g(T),onClick:w,className:R.img,title:u,onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&w()}}):S.jsx(_e,{src:x,fallback:()=>S.jsx(_e,{src:T,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:u,role:"application",fill:s,"aria-disabled":a,className:R.svg,onClick:w})})}),Pe=({disabled:r,readOnly:e,bindValue:t,icon:n,onBlur:s,onChange:a,placeholder:i,shapeIcon:o,sizing:l,state:c,variant:f,rotatedShapeIcon:u=!1,onShapeIconClick:d,ref:g,inputRef:h,onKeyDown:m,inputType:x="text",ariaLabel:T="input field",label:R,helperText:w=!1,error:E,appearance:b="base",fullWidth:A=!1,_dataComponent:N="textfield",width:W})=>{const M=E?"danger":c,j=E||c=="danger"?"error":o,F=w||!!E,H=oe=>{a==null||a(oe.target.value)},X={wrapper:`smp-textfield-wrapper ${A?"smp-textfield-fullWidth":""}`,container:`smp-textfield ${r?"smp-textfield-disabled":""} ${e?"smp-textfield-readOnly":""} ${i?"smp-textfield-placeholder":""} ${l?`smp-textfield-${l}`:""} ${M?`smp-textfield-${M}`:""} ${f?`smp-textfield-variant-${f}`:""} ${b?`smp-textfield-${b}`:""}`,input:"smp-textfield-input "},B=W?{"--smp-textField-width-base":W}:void 0;return S.jsxs("div",{className:X.wrapper,"data-component":N,children:[R&&S.jsx(vr,{label:R,disabled:r}),S.jsxs("div",{className:X.container,ref:g,style:B,children:[n&&S.jsx(be,{icon:n,disabled:r}),S.jsx("input",{type:x,value:t,placeholder:i,onChange:H,onBlur:s,className:X.input,disabled:r,readOnly:e,onKeyDown:m,"aria-label":T,ref:h}),j&&S.jsx(be,{icon:j,disabled:r,state:M,onClick:d,rotated:u})]}),F&&S.jsx(zr,{helperText:E,disabled:r,state:M})]})};function vn({items:r,itemHeight:e,containerHeight:t,overscan:n=5}){const[s,a]=k.useState(0),i=k.useRef(null),o=r.length*e,l=Math.max(0,Math.floor(s/e)-n),c=Math.min(r.length-1,Math.floor((s+t)/e)+n),f=[];for(let g=l;g<=c;g++)f.push({item:r[g],index:g,offsetTop:g*e});const u=k.useCallback(g=>{const h=g.target.scrollTop;a(h)},[]),d=g=>{if(!i.current)return;const h=g*e,m=h+e,x=i.current,T=x.scrollTop,R=T+t;h<T?x.scrollTop=h:m>R&&(x.scrollTop=m-t)};return{virtualItems:f,containerProps:{ref:i,style:{maxHeight:`${t}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:u},innerProps:{style:{height:`${o}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:s,viewportHeight:t,totalHeight:o,startIndex:l,endIndex:c},scrollToIndex:d}}const bn=10,wr=({id:r,options:e,displayMode:t,ref:n,showFilter:s,selectedIndex:a=null,activeIndex:i=[],width:o,onClick:l,onKeyDown:c})=>{var j;const[f,u]=k.useState(""),d=24,[g,h]=k.useState(a!==null?a:-1),m=s!==void 0?s:e.length>bn,x=f?e.filter(F=>F.label.toLowerCase().includes(f.toLowerCase())):e,T=F=>{u(F)},{virtualItems:R,containerProps:w,innerProps:E,scrollToIndex:b}=vn({items:x,itemHeight:d,containerHeight:200,overscan:5});k.useEffect(()=>{a!==null&&a!==g&&h(a)},[a]),k.useEffect(()=>{g>=0&&g<x.length&&b(g)},[g,x]);const A=F=>{if(F.key==="ArrowDown"||F.key==="ArrowUp"){F.preventDefault();let H=g;F.key==="ArrowDown"?H=g<x.length-1?g+1:0:F.key==="ArrowUp"&&(H=g>0?g-1:x.length-1),h(H)}else F.key==="Enter"?g>=0&&g<x.length&&(l==null||l(x[g])):F.key==="Escape"&&(F.preventDefault(),F.stopPropagation());c&&c(F)},N=F=>{A(F)},W=F=>{A(F)},M={wrapper:"smp-list",container:"smp-list-container",virtualScroll:"smp-list-virtualScroll",listItem:"smp-list-listItem"};return S.jsxs("div",{id:r,ref:n,className:M.wrapper,"data-component":"list",style:{width:o},children:[m&&S.jsx(Pe,{bindValue:f,placeholder:"Search...",onChange:T,onKeyDown:N}),S.jsx("div",{...w,className:M.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:W,"aria-activedescendant":g>=0&&g<x.length?(j=x[g])==null?void 0:j.id:void 0,children:S.jsx("div",{...E,className:M.virtualScroll,children:R.map(({item:F,index:H,offsetTop:X})=>{const B=i.includes(F.id);return S.jsxs("li",{role:"option",id:F.id,"aria-selected":g===H?"true":"false",tabIndex:-1,className:`${M.listItem} ${g===H?"selected-item":""}`,"aria-label":F.id+"-"+F.label,style:{height:`${d}px`,lineHeight:`calc(${d}px - 2*2px)`,transform:`translateY(${X}px)`},onClick:()=>{l==null||l(F),h(H)},children:[at(F.id,F.label,t),B&&S.jsx(be,{icon:"check",width:16})]},F.id)})})})]})},Tr=({displayMode:r,bindValue:e,optionalDisplayValue:t,...n})=>{const[s,a]=k.useState(at(e,t,r));return k.useEffect(()=>{a(e)},[e]),k.useEffect(()=>{a(at(e,t,r))},[t,r]),S.jsx(Pe,{...n,bindValue:s})},xn=r=>{const e=k.useRef(null);return k.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),n=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{n()},r)}},$t=({bindValue:r,optionalDisplayValue:e,options:t,displayMode:n,listDisplayMode:s="Both",minimumChars:a=3,placeholder:i,fun:o,_changeOnEnter:l=!1,onChange:c,onOptionsRequest:f,_multiActiveIndex:u,...d})=>{const[g,h]=k.useState(r),[m,x]=k.useState(e),[T,R]=k.useState(!1),[w,E]=k.useState(t||[]),[b,A]=k.useState(0),[N,W]=k.useState([r]),{anchorRef:M,targetRef:j,anchorWidth:F}=Ct({position:"bottom",enabled:T});st(j,()=>R(!1));const H=xn(400),X=q=>{q.length>=a?o&&f&&H(async()=>{const Q=await f(o,q);E(Q),A(Q.length>0?0:-1),R(!0)}):R(!1),h(q),x(e),l||c==null||c(q,e)},B=q=>{l?(h(""),x("")):(h(q.id),x(q.label)),c==null||c(q.id,q.label);const Q=w.findIndex(L=>L.id===q.id);A(Q),W([q.id]),R(!1)},oe=q=>{q.key==="Escape"&&(R(!1),A(-1))},ee=q=>{if((q.key==="ArrowDown"||q.key==="ArrowUp")&&(q.preventDefault(),T)){const Q=q.key==="ArrowDown"?(b+1)%w.length:(b-1+w.length)%w.length;A(Q)}switch(q.key){case"Enter":b>=0&&b<w.length?B(w[b]):l&&(c==null||c(g,""),R(!1),h(""),x(""));break;case"Escape":R(!1),A(-1);break}};return S.jsxs("div",{"data-component":"autocomplete",children:[S.jsx(Tr,{...d,bindValue:g,optionalDisplayValue:m,displayMode:n,shapeIcon:"magnify",placeholder:i,ref:M,onChange:X,onKeyDown:ee,"aria-autocomplete":"list"}),T&&S.jsx(wr,{options:w,displayMode:s,onClick:B,ref:j,selectedIndex:b,activeIndex:u||N,width:F,showFilter:!1,onKeyDown:oe})]})},Zt=r=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[r],Qt=r=>({primary:"onPrimary",danger:"onDanger",base:"base"})[r],We=({bindValue:r,onClick:e,ariaLabel:t,icon:n,disabled:s,sizing:a="base",variant:i="primary",appearance:o="raised",showIcon:l=!0,showText:c=!0,fullWidth:f=!1,loading:u=!1,title:d,optionalDisplayValue:g})=>{const h={container:`smp-button smp-button-container ${a?`smp-button-${a}`:""} ${i?`smp-buttonVariant-${i}`:""} ${o?`smp-buttonType-${o}`:""} ${f?"smp-button-fullWidth":""}`};return S.jsx("button",{"data-component":"button",className:h.container,onClick:e,"aria-label":t,disabled:s,"aria-busy":u,title:d||g,children:u?S.jsx(be,{icon:"spinner",state:Qt(i),spin:!0}):S.jsxs(S.Fragment,{children:[n&&l&&S.jsx(be,{icon:n,disabled:s,state:Qt(i),width:Zt(a),height:Zt(a)}),c&&r&&S.jsx("span",{children:r})]})})},Or=({bindValue:r,onChange:e,onBlur:t})=>{const n=s=>{e&&e(s.target.checked)};return S.jsx("input",{"data-component":"checkbox",type:"checkbox",checked:r,onChange:n,onBlur:t})},Sn={titleLarge:"h2",title:"h3",body:"h6",label:"label"},En=({variant:r="body",bindValue:e,color:t,...n})=>{const s=Sn[r],a={container:`smp-typography ${r?`smp-typography-${r}`:""} ${n.disabled?"smp-typography-disabled":""}`};return S.jsx(s,{className:a.container,disabled:n.disabled,style:{"--smp-typography-color-base":t},children:e})},Rr=({elements:r,isEditable:e=!1,displayMode:t="Both",onChange:n,color:s,backgroundColor:a,isDraggable:i=!1})=>{const[o,l]=k.useState(null),c={container:`${["smp-chips-container"]}`,element:"smp-chips-element"},f=g=>{n==null||n(r.filter((h,m)=>m!==g))},u=g=>{l(g)},d=g=>{if(o===null||o===g)return;const h=[...r],[m]=h.splice(o,1);h.splice(g,0,m),n==null||n(h),l(null)};return S.jsx("div",{className:c.container,role:"list","data-component":"chip",children:r.flatMap((g,h)=>{const m=at(g.bindValue,g.optionalDisplayValue,t),x=S.jsxs("div",{className:c.element,role:"listitem",draggable:i,onDragStart:()=>u(h),onDragOver:R=>i&&R.preventDefault(),onDrop:()=>i&&d(h),style:{"--smp-chips-backgroundColor-base":a},children:[i&&S.jsx(be,{icon:"drag_indicator_horizontal",isInteractable:!0}),S.jsx(En,{variant:"label",bindValue:m,color:s}),e&&S.jsx(be,{icon:"close",isInteractable:!0,onClick:()=>f(h),color:s})]},`chip-${h}`),T=i&&h<r.length-1?S.jsx(be,{icon:"chevron-right",color:s},`separator-${h}`):null;return[x,T].filter(Boolean)})})};function Cr(r,e){const t=k.useRef(null);k.useEffect(()=>{if(!r)return;const n=typeof e=="object"&&e!==null&&"current"in e?e.current:null;if(!n)return;t.current=document.activeElement;const s=()=>n?Array.from(n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null):[];(()=>{const c=s();c.length>0&&requestAnimationFrame(()=>c[0].focus())})();const i=c=>{if(c.key==="Escape"||c.key!=="Tab")return;const f=s();if(f.length===0)return;const u=f[0],d=f[f.length-1];c.shiftKey&&document.activeElement===u?(c.preventDefault(),d.focus()):!c.shiftKey&&document.activeElement===d&&(c.preventDefault(),u.focus())},o=c=>{if(n&&!n.contains(c.target)){c.preventDefault();const f=s();f.length>0&&f[0].focus()}};document.addEventListener("keydown",i),document.addEventListener("mousedown",o);const l=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.removeEventListener("mousedown",o),document.body.style.overflow=l,t.current&&requestAnimationFrame(()=>{var c;(c=t.current)==null||c.focus()})}},[r,e])}const Dr=({bindValue:r,onChange:e,options:t=[],optionalDisplayValue:n,displayMode:s,listDisplayMode:a="Both",fun:i,onOptionsRequest:o,multiActiveIndex:l,...c})=>{const[f,u]=k.useState(!1),[d,g]=k.useState(t),[h,m]=k.useState(-1),[x,T]=k.useState([r]),R=k.useId(),{anchorRef:w,targetRef:E,anchorWidth:b}=Ct({position:"bottom",enabled:f});st(E,()=>u(!1)),Cr(f,E);const A=j=>{e==null||e(j.id,j.label);const F=d.findIndex(H=>H.id===j.id);m(F),T([j.id]),u(!1)},N=j=>{j.key==="Escape"&&(u(!1),m(-1))},W=j=>{(j.key==="ArrowDown"||j.key==="ArrowUp")&&(j.preventDefault(),M())},M=()=>{i&&o&&o(i,void 0).then(j=>{g(j),m(j.length>0?0:-1),u(!0)})};return S.jsxs("div",{role:"combobox","aria-expanded":f,"aria-controls":R,"aria-owns":R,"data-component":"combobox",children:[S.jsx(Tr,{...c,bindValue:r,optionalDisplayValue:n,displayMode:s,onShapeIconClick:M,onKeyDown:W,shapeIcon:"arrow_drop_down",rotatedShapeIcon:f,readOnly:!0,ref:w,"aria-autocomplete":"list",variant:"notSelectable"}),f&&S.jsx(wr,{id:R,options:d,displayMode:a,ref:E,selectedIndex:h,activeIndex:l||x,width:b,onClick:A,onKeyDown:N})]})},z=r=>typeof r=="string",Ve=()=>{let r,e;const t=new Promise((n,s)=>{r=n,e=s});return t.resolve=r,t.reject=e,t},er=r=>r==null?"":""+r,wn=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},Tn=/###/g,tr=r=>r&&r.indexOf("###")>-1?r.replace(Tn,"."):r,rr=r=>!r||z(r),Ye=(r,e,t)=>{const n=z(e)?e.split("."):e;let s=0;for(;s<n.length-1;){if(rr(r))return{};const a=tr(n[s]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++s}return rr(r)?{}:{obj:r,k:tr(n[s])}},nr=(r,e,t)=>{const{obj:n,k:s}=Ye(r,e,Object);if(n!==void 0||e.length===1){n[s]=t;return}let a=e[e.length-1],i=e.slice(0,e.length-1),o=Ye(r,i,Object);for(;o.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),o=Ye(r,i,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${a}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=t},On=(r,e,t,n)=>{const{obj:s,k:a}=Ye(r,e,Object);s[a]=s[a]||[],s[a].push(t)},ot=(r,e)=>{const{obj:t,k:n}=Ye(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},Rn=(r,e,t)=>{const n=ot(r,t);return n!==void 0?n:ot(e,t)},$r=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?z(r[n])||r[n]instanceof String||z(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):$r(r[n],e[n],t):r[n]=e[n]);return r},ke=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Cn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Dn=r=>z(r)?r.replace(/[&<>"'\/]/g,e=>Cn[e]):r;class $n{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const An=[" ",",","?","!",";"],jn=new $n(20),Pn=(r,e,t)=>{e=e||"",t=t||"";const n=An.filter(i=>e.indexOf(i)<0&&t.indexOf(i)<0);if(n.length===0)return!0;const s=jn.getRegExp(`(${n.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!s.test(r);if(!a){const i=r.indexOf(t);i>0&&!s.test(r.substring(0,i))&&(a=!0)}return a},Tt=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const n=e.split(t);let s=r;for(let a=0;a<n.length;){if(!s||typeof s!="object")return;let i,o="";for(let l=a;l<n.length;++l)if(l!==a&&(o+=t),o+=n[l],i=s[o],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<n.length-1)continue;a+=l-a+1;break}s=i}return s},He=r=>r==null?void 0:r.replace("_","-"),Ln={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,n;(n=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||n.call(t,console,e)}};class lt{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Ln,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,s){return s&&!this.debug?null:(z(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new lt(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new lt(this.logger,e)}}var we=new lt;class ut{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const s=this.observers[n].get(t)||0;this.observers[n].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,a])=>{for(let i=0;i<a;i++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,a])=>{for(let i=0;i<a;i++)s.apply(s,[e,...t])})}}class sr extends ut{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,s={}){var c,f;const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):z(n)&&a?o.push(...n.split(a)):o.push(n)));const l=ot(this.data,o);return!l&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),l||!i||!z(n)?l:Tt((f=(c=this.data)==null?void 0:c[e])==null?void 0:f[t],n,a)}addResource(e,t,n,s,a={silent:!1}){const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let o=[e,t];n&&(o=o.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(o=e.split("."),s=t,t=o[1]),this.addNamespaces(t),nr(this.data,o,s),a.silent||this.emit("added",e,t,n,s)}addResources(e,t,n,s={silent:!1}){for(const a in n)(z(n[a])||Array.isArray(n[a]))&&this.addResource(e,t,a,n[a],{silent:!0});s.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,s,a,i={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),s=n,n=t,t=o[1]),this.addNamespaces(t);let l=ot(this.data,o)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?$r(l,n,a):l={...l,...n},nr(this.data,o,l),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var Ar={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,s){return r.forEach(a=>{var i;e=((i=this.processors[a])==null?void 0:i.process(e,t,n,s))??e}),e}};const ar={},ir=r=>!z(r)&&typeof r!="boolean"&&typeof r!="number";class ct extends ut{constructor(e,t={}){super(),wn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=we.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(e==null)return!1;const s=this.resolve(e,n);return(s==null?void 0:s.res)!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Pn(e,n,s);if(i&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:z(a)?[a]:a};const c=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),e=c.join(s)}return{key:e,namespaces:z(a)?[a]:a}}translate(e,t,n){let s=typeof t=="object"?{...t}:t;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(s={...s}),s||(s={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const a=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],s),c=l[l.length-1];let f=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const u=s.lng||this.language,d=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode")return d?a?{res:`${c}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:`${c}${f}${o}`:a?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:o;const g=this.resolve(e,s);let h=g==null?void 0:g.res;const m=(g==null?void 0:g.usedKey)||o,x=(g==null?void 0:g.exactUsedKey)||o,T=["[object Number]","[object Function]","[object RegExp]"],R=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,E=s.count!==void 0&&!z(s.count),b=ct.hasDefaultValue(s),A=E?this.pluralResolver.getSuffix(u,s.count,s):"",N=s.ordinal&&E?this.pluralResolver.getSuffix(u,s.count,{ordinal:!1}):"",W=E&&!s.ordinal&&s.count===0,M=W&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${A}`]||s[`defaultValue${N}`]||s.defaultValue;let j=h;w&&!h&&b&&(j=M);const F=ir(j),H=Object.prototype.toString.apply(j);if(w&&j&&F&&T.indexOf(H)<0&&!(z(R)&&Array.isArray(j))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const X=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,j,{...s,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return a?(g.res=X,g.usedParams=this.getUsedParamsDetails(s),g):X}if(i){const X=Array.isArray(j),B=X?[]:{},oe=X?x:m;for(const ee in j)if(Object.prototype.hasOwnProperty.call(j,ee)){const q=`${oe}${i}${ee}`;b&&!h?B[ee]=this.translate(q,{...s,defaultValue:ir(M)?M[ee]:void 0,joinArrays:!1,ns:l}):B[ee]=this.translate(q,{...s,joinArrays:!1,ns:l}),B[ee]===q&&(B[ee]=j[ee])}h=B}}else if(w&&z(R)&&Array.isArray(h))h=h.join(R),h&&(h=this.extendTranslation(h,e,s,n));else{let X=!1,B=!1;!this.isValidLookup(h)&&b&&(X=!0,h=M),this.isValidLookup(h)||(B=!0,h=o);const ee=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:h,q=b&&M!==h&&this.options.updateMissing;if(B||X||q){if(this.logger.log(q?"updateKey":"missingKey",u,c,o,q?M:h),i){const y=this.resolve(o,{...s,keySeparator:!1});y&&y.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Q=[];const L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let y=0;y<L.length;y++)Q.push(L[y]);else this.options.saveMissingTo==="all"?Q=this.languageUtils.toResolveHierarchy(s.lng||this.language):Q.push(s.lng||this.language);const v=(y,C,$)=>{var P;const O=b&&$!==h?$:ee;this.options.missingKeyHandler?this.options.missingKeyHandler(y,c,C,O,q,s):(P=this.backendConnector)!=null&&P.saveMissing&&this.backendConnector.saveMissing(y,c,C,O,q,s),this.emit("missingKey",y,c,C,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?Q.forEach(y=>{const C=this.pluralResolver.getSuffixes(y,s);W&&s[`defaultValue${this.options.pluralSeparator}zero`]&&C.indexOf(`${this.options.pluralSeparator}zero`)<0&&C.push(`${this.options.pluralSeparator}zero`),C.forEach($=>{v([y],o+$,s[`defaultValue${$}`]||M)})}):v(Q,o,M))}h=this.extendTranslation(h,e,s,g,n),B&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${c}${f}${o}`),(B||X)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${f}${o}`:o,X?h:void 0,s))}return a?(g.res=h,g.usedParams=this.getUsedParamsDetails(s),g):h}extendTranslation(e,t,n,s,a){var l,c;if((l=this.i18nFormat)!=null&&l.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const f=z(e)&&(((c=n==null?void 0:n.interpolation)==null?void 0:c.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(f){const g=e.match(this.interpolator.nestingRegexp);u=g&&g.length}let d=n.replace&&!z(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language||s.usedLng,n),f){const g=e.match(this.interpolator.nestingRegexp),h=g&&g.length;u<h&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...g)=>(a==null?void 0:a[0])===g[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${t[0]}`),null):this.translate(...g,t),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,o=z(i)?[i]:i;return e!=null&&(o!=null&&o.length)&&n.applyPostProcessor!==!1&&(e=Ar.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,s,a,i,o;return z(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(l,t),f=c.key;s=f;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const d=t.count!==void 0&&!z(t.count),g=d&&!t.ordinal&&t.count===0,h=t.context!==void 0&&(z(t.context)||typeof t.context=="number")&&t.context!=="",m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(x=>{var T,R;this.isValidLookup(n)||(o=x,!ar[`${m[0]}-${x}`]&&((T=this.utils)!=null&&T.hasLoadedNamespace)&&!((R=this.utils)!=null&&R.hasLoadedNamespace(o))&&(ar[`${m[0]}-${x}`]=!0,this.logger.warn(`key "${s}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(w=>{var A;if(this.isValidLookup(n))return;i=w;const E=[f];if((A=this.i18nFormat)!=null&&A.addLookupKeys)this.i18nFormat.addLookupKeys(E,f,w,x,t);else{let N;d&&(N=this.pluralResolver.getSuffix(w,t.count,t));const W=`${this.options.pluralSeparator}zero`,M=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(E.push(f+N),t.ordinal&&N.indexOf(M)===0&&E.push(f+N.replace(M,this.options.pluralSeparator)),g&&E.push(f+W)),h){const j=`${f}${this.options.contextSeparator}${t.context}`;E.push(j),d&&(E.push(j+N),t.ordinal&&N.indexOf(M)===0&&E.push(j+N.replace(M,this.options.pluralSeparator)),g&&E.push(j+W))}}let b;for(;b=E.pop();)this.isValidLookup(n)||(a=b,n=this.getResource(w,x,b,t))}))})}),{res:n,usedKey:s,exactUsedKey:a,usedLng:i,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n,s={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,n,s):this.resourceStore.getResource(e,t,n,s)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!z(e.replace);let s=n?e.replace:e;if(n&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const a of t)delete s[a]}return s}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}class or{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=we.create("languageUtils")}getScriptPartFromCode(e){if(e=He(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=He(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(z(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const s=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const s=this.getScriptPartFromCode(n);if(this.isSupportedCode(s))return t=s;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),z(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),s=[],a=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return z(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):z(e)&&a(this.formatLanguageCode(e)),n.forEach(i=>{s.indexOf(i)<0&&a(this.formatLanguageCode(i))}),s}}const lr={zero:0,one:1,two:2,few:3,many:4,other:5},cr={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class kn{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=we.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=He(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:s});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(n,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),cr;if(!e.match(/-|_/))return cr;const l=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(l,t)}return this.pluralRulesCache[a]=i,i}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((s,a)=>lr[s]-lr[a]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,n={}){const s=this.getRule(e,n);return s?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const ur=(r,e,t,n=".",s=!0)=>{let a=Rn(r,e,t);return!a&&s&&z(t)&&(a=Tt(r,t,n),a===void 0&&(a=Tt(e,t,n))),a},xt=r=>r.replace(/\$/g,"$$$$");class Nn{constructor(e={}){var t;this.logger=we.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:s,prefix:a,prefixEscaped:i,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:f,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:g,nestingSuffix:h,nestingSuffixEscaped:m,nestingOptionsSeparator:x,maxReplaces:T,alwaysFormat:R}=e.interpolation;this.escape=t!==void 0?t:Dn,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?ke(a):i||"{{",this.suffix=o?ke(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?ke(d):g||ke("$t("),this.nestingSuffix=h?ke(h):m||ke(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=T||1e3,this.alwaysFormat=R!==void 0?R:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>(t==null?void 0:t.source)===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,s){var g;let a,i,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=h=>{if(h.indexOf(this.formatSeparator)<0){const R=ur(t,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(R,void 0,n,{...s,...t,interpolationkey:h}):R}const m=h.split(this.formatSeparator),x=m.shift().trim(),T=m.join(this.formatSeparator).trim();return this.format(ur(t,l,x,this.options.keySeparator,this.options.ignoreJSONStructure),T,n,{...s,...t,interpolationkey:x})};this.resetRegExp();const f=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,u=((g=s==null?void 0:s.interpolation)==null?void 0:g.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>xt(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?xt(this.escape(h)):xt(h)}].forEach(h=>{for(o=0;a=h.regex.exec(e);){const m=a[1].trim();if(i=c(m),i===void 0)if(typeof f=="function"){const T=f(e,a,s);i=z(T)?T:""}else if(s&&Object.prototype.hasOwnProperty.call(s,m))i="";else if(u){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),i="";else!z(i)&&!this.useRawValueToEscape&&(i=er(i));const x=h.safeValue(i);if(e=e.replace(a[0],x),u?(h.regex.lastIndex+=i.length,h.regex.lastIndex-=a[0].length):h.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let s,a,i;const o=(l,c)=>{const f=this.nestingOptionsSeparator;if(l.indexOf(f)<0)return l;const u=l.split(new RegExp(`${f}[ ]*{`));let d=`{${u[1]}`;l=u[0],d=this.interpolate(d,i);const g=d.match(/'/g),h=d.match(/"/g);(((g==null?void 0:g.length)??0)%2===0&&!h||h.length%2!==0)&&(d=d.replace(/'/g,'"'));try{i=JSON.parse(d),c&&(i={...c,...i})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${f}${d}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];i={...n},i=i.replace&&!z(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let c=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(u=>u.trim());s[1]=f.shift(),l=f,c=!0}if(a=t(o.call(this,s[1].trim(),i),i),a&&s[0]===e&&!z(a))return a;z(a)||(a=er(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),a=""),c&&(a=l.reduce((f,u)=>this.format(f,u,n.lng,{...n,interpolationkey:s[1].trim()}),a.trim())),e=e.replace(s[0],a),this.regexp.lastIndex=0}return e}}const _n=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const n=r.split("(");e=n[0].toLowerCase().trim();const s=n[1].substring(0,n[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(i=>{if(i){const[o,...l]=i.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();t[f]||(t[f]=c),c==="false"&&(t[f]=!1),c==="true"&&(t[f]=!0),isNaN(c)||(t[f]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},fr=r=>{const e={};return(t,n,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});const i=n+JSON.stringify(a);let o=e[i];return o||(o=r(He(n),s),e[i]=o),o(t)}},In=r=>(e,t,n)=>r(He(t),n)(e);class Mn{constructor(e={}){this.logger=we.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?fr:In;this.formats={number:n((s,a)=>{const i=new Intl.NumberFormat(s,{...a});return o=>i.format(o)}),currency:n((s,a)=>{const i=new Intl.NumberFormat(s,{...a,style:"currency"});return o=>i.format(o)}),datetime:n((s,a)=>{const i=new Intl.DateTimeFormat(s,{...a});return o=>i.format(o)}),relativetime:n((s,a)=>{const i=new Intl.RelativeTimeFormat(s,{...a});return o=>i.format(o,a.range||"day")}),list:n((s,a)=>{const i=new Intl.ListFormat(s,{...a});return o=>i.format(o)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=fr(t)}format(e,t,n,s={}){const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(o=>o.indexOf(")")>-1)){const o=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,o)].join(this.formatSeparator)}return a.reduce((o,l)=>{var u;const{formatName:c,formatOptions:f}=_n(l);if(this.formats[c]){let d=o;try{const g=((u=s==null?void 0:s.formatParams)==null?void 0:u[s.interpolationkey])||{},h=g.locale||g.lng||s.locale||s.lng||n;d=this.formats[c](o,h,{...f,...s,...g})}catch(g){this.logger.warn(g)}return d}else this.logger.warn(`there was no format function for ${c}`);return o},e)}}const Fn=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Vn extends ut{constructor(e,t,n,s={}){var a,i;super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=we.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(i=(a=this.backend)==null?void 0:a.init)==null||i.call(a,n,s.backend,s)}queueLoad(e,t,n,s){const a={},i={},o={},l={};return e.forEach(c=>{let f=!0;t.forEach(u=>{const d=`${c}|${u}`;!n.reload&&this.store.hasResourceBundle(c,u)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?i[d]===void 0&&(i[d]=!0):(this.state[d]=1,f=!1,i[d]===void 0&&(i[d]=!0),a[d]===void 0&&(a[d]=!0),l[u]===void 0&&(l[u]=!0)))}),f||(o[c]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){const s=e.split("|"),a=s[0],i=s[1];t&&this.emit("failedLoading",a,i,t),!t&&n&&this.store.addResourceBundle(a,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const o={};this.queue.forEach(l=>{On(l.loaded,[a],i),Fn(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});const f=l.loaded[c];f.length&&f.forEach(u=>{o[c][u]===void 0&&(o[c][u]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,t,n,s=0,a=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:a,callback:i});return}this.readingCalls++;const o=(c,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const u=this.waitingReads.shift();this.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}if(c&&f&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,s+1,a*2,i)},a);return}i(c,f)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const c=l(e,t);c&&typeof c.then=="function"?c.then(f=>o(null,f)).catch(o):o(null,c)}catch(c){o(c)}return}return l(e,t,o)}prepareLoading(e,t,n={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();z(e)&&(e=this.languageUtils.toResolveHierarchy(e)),z(t)&&(t=[t]);const a=this.queueLoad(e,t,n,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),s=n[0],a=n[1];this.read(s,a,"read",void 0,void 0,(i,o)=>{i&&this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`,i),!i&&o&&this.logger.log(`${t}loaded namespace ${a} for language ${s}`,o),this.loaded(e,i,o)})}saveMissing(e,t,n,s,a,i={},o=()=>{}){var l,c,f,u,d;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((u=(f=this.services)==null?void 0:f.utils)!=null&&u.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((d=this.backend)!=null&&d.create){const g={...i,isUpdate:a},h=this.backend.create.bind(this.backend);if(h.length<6)try{let m;h.length===5?m=h(e,t,n,s,g):m=h(e,t,n,s),m&&typeof m.then=="function"?m.then(x=>o(null,x)).catch(o):o(null,m)}catch(m){o(m)}else h(e,t,n,s,o,g)}!e||!e[0]||this.store.addResource(e[0],t,n,s)}}}const dr=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),z(r[1])&&(e.defaultValue=r[1]),z(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),pr=r=>{var e,t;return z(r.ns)&&(r.ns=[r.ns]),z(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),z(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((t=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},et=()=>{},Yn=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class qe extends ut{constructor(e={},t){if(super(),this.options=pr(e),this.services={},this.logger=we,this.modules={external:[]},Yn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(z(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=dr();this.options={...n,...this.options,...pr(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?we.init(s(this.modules.logger),this.options):we.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Mn;const f=new or(this.options);this.store=new sr(this.options.resources,this.options);const u=this.services;u.logger=we,u.resourceStore=this.store,u.languageUtils=f,u.pluralResolver=new kn(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(u.formatter=s(c),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new Nn(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new Vn(s(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",(d,...g)=>{this.emit(d,...g)}),this.modules.languageDetector&&(u.languageDetector=s(this.modules.languageDetector),u.languageDetector.init&&u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=s(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new ct(this.services,this.options),this.translator.on("*",(d,...g)=>{this.emit(d,...g)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=et),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...f)=>this.store[c](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...f)=>(this.store[c](...f),this)});const o=Ve(),l=()=>{const c=(f,u)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(u),t(f,u)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(e,t=et){var a,i;let n=t;const s=z(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const o=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};s?l(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>l(f)),(i=(a=this.options.preload)==null?void 0:a.forEach)==null||i.call(a,c=>l(c)),this.services.backendConnector.load(o,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(c)})}else n(null)}reloadResources(e,t,n){const s=Ve();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=et),this.services.backendConnector.reload(e,t,a=>{s.resolve(),n(a)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Ar.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=Ve();this.emit("languageChanging",e);const s=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},a=(o,l)=>{l?this.isLanguageChangingTo===e&&(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,n.resolve((...c)=>this.t(...c)),t&&t(o,(...c)=>this.t(...c))},i=o=>{var f,u;!e&&!o&&this.services.languageDetector&&(o=[]);const l=z(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(z(o)?[o]:o);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),(u=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||u.call(f,c)),this.loadResources(c,d=>{a(d,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e),n}getFixedT(e,t,n){const s=(a,i,...o)=>{let l;typeof i!="object"?l=this.options.overloadTranslationOptionHandler([a,i].concat(o)):l={...i},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||s.keyPrefix);const c=this.options.keySeparator||".";let f;return l.keyPrefix&&Array.isArray(a)?f=a.map(u=>`${l.keyPrefix}${c}${u}`):f=l.keyPrefix?`${l.keyPrefix}${c}${a}`:a,this.t(f,l)};return z(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=n,s}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const i=(o,l)=>{const c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(t.precheck){const o=t.precheck(this,i);if(o!==void 0)return o}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(n,e)&&(!s||i(a,e)))}loadNamespaces(e,t){const n=Ve();return this.options.ns?(z(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{n.resolve(),t&&t(s)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Ve();z(e)&&(e=[e]);const s=this.options.preload||[],a=e.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=s.concat(a),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}dir(e){var s,a;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((a=this.services)==null?void 0:a.languageUtils)||new or(dr());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new qe(e,t)}cloneInstance(e={},t=et){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new qe(s);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(o=>{a[o]=this[o]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const o=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((f,u)=>(f[u]={...l[c][u]},f),l[c]),l),{});a.store=new sr(o,s),a.services.resourceStore=a.store}return a.translator=new ct(a.services,s),a.translator.on("*",(o,...l)=>{a.emit(o,...l)}),a.init(s,t),a.translator.options=s,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ue=qe.createInstance();ue.createInstance=qe.createInstance;ue.createInstance;ue.dir;ue.init;ue.loadResources;ue.reloadResources;ue.use;ue.changeLanguage;ue.getFixedT;ue.t;ue.exists;ue.setDefaultNamespace;ue.hasLoadedNamespace;ue.loadNamespaces;ue.loadLanguages;const Un={Friday:"Venerdì",FridayShort:"Ven",Monday:"Lunedì",MondayShort:"Lun",Saturday:"Sabato",SaturdayShort:"Sab",Sunday:"Domenica",SundayShort:"Dom",Tuesday:"Martedì",TuesdayShort:"Mar",Thursday:"Giovedì",ThursdayShort:"Gio",Wednesday:"Mercoledì",WednesdayShort:"Mer"},Wn={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},Hn={CalendarFor:"Calendario per",Close:"Chiudi",SpotlightDefaultPlaceholder:"Esegui Comando"},qn={Date:{NextDay:"Giorno Successivo",NextMonth:"Mese Successivo",NextWeek:"Settimana Successiva",NextYear:"Anno Successivo",PreviousDay:"Giorno Precedente",PreviousMonth:"Mese Precedente",PreviousWeek:"Settimana Precedente",PreviousYear:"Anno Precedente",Today:"Oggi",Tomorrow:"Domani",Yesterday:"Ieri"},Day:Un,Month:Wn,Generic:Hn},Kn={Friday:"Friday",FridayShort:"Fri",Monday:"Monday",MondayShort:"Mon",Saturday:"Saturday",SaturdayShort:"Sat",Sunday:"Sunday",SundayShort:"Sun",Tuesday:"Tuesday",TuesdayShort:"Tue",Thursday:"Thursday",ThursdayShort:"Thu",Wednesday:"Wednesday",WednesdayShort:"Wed"},Bn={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},zn={CalendarFor:"Calendar for",Close:"Close",SpotlightDefaultPlaceholder:"Execute Command"},Gn={Date:{NextDay:"Next Day",NextMonth:"Next Month",NextWeek:"Next Week",NextYear:"Next Year",PreviousDay:"Previous Day",PreviousMonth:"Previous Month",PreviousWeek:"Previous Week",PreviousYear:"Previous Year",Today:"Today",Tomorrow:"Tomorrow",Yesterday:"Yesterday"},Day:Kn,Month:Bn,Generic:zn};function hr(r,e){return new RegExp(Jn(r),e)}function Jn(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xn(r,e,t,n){let s=e;const a=Zn(r,t);if(!s){const o=Math.abs(a);o-Math.floor(o)?s="0,0.00":s="0,0"}const i=Qn(s);return new Intl.NumberFormat(n,i).format(a)}function Zn(r,e,t,n,s){let a=r;if(typeof a!="number"){let o;e&&n===void 0?o=",":o=".";const l=o=="."?",":".";a=a.replace(hr(l,"g"),""),a=a.replace(hr(o,"g"),"."),a=Number(a)}const i=Number(a);return isNaN(i)?NaN:i}function Qn(r){const e={};r.includes(",")?e.useGrouping=!0:e.useGrouping=!1;const t=r.indexOf(".");if(t>-1){const s=(r.substring(t+1).match(/0/g)||[]).length;e.minimumFractionDigits=s,e.maximumFractionDigits=s}else e.minimumFractionDigits=0,e.maximumFractionDigits=0;return e}ue.init({lng:typeof navigator<"u"&&navigator.language.split("-")[0]||"en",fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(r,e,t,n)=>{const s=(n==null?void 0:n.type)??"number";try{switch(s){case"date":{const a=r instanceof Date?r:new Date(r);return new Intl.DateTimeFormat(t,{dateStyle:e||"short"}).format(a)}default:case"number":{const a=(n==null?void 0:n.inputIsLocalized)??!1;return Xn(r,e,a,t)}}}catch{return r}}},resources:{en:{translation:Gn},it:{translation:qn}}});const es=(r,e,t,n)=>ue.format(r,e,t||ue.language,n),ts=(r,e)=>ue.t(r,e);function ft(){const r=k.useCallback((n,s,a,i)=>es(n,s,a||void 0,i),[]),e=k.useCallback(()=>ue.languages[0],[]),t=k.useCallback((n,s)=>ts(n,s),[]);return{format:r,getCurrentLanguage:e,translate:t}}var At=(r=>(r.CALENDAR_FOR="Date.CalendarFor",r.CLOSE="Generic.Close",r.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",r))(At||{}),ge=(r=>(r.MONDAY="Day.Monday",r.MONDAY_SHORT="Day.MondayShort",r.TUESDAY="Day.Tuesday",r.TUESDAY_SHORT="Day.TuesdayShort",r.WEDNESDAY="Day.Wednesday",r.WEDNESDAY_SHORT="Day.WednesdayShort",r.THURSDAY="Day.Thursday",r.THURSDAY_SHORT="Day.ThursdayShort",r.FRIDAY="Day.Friday",r.FRIDAY_SHORT="Day.FridayShort",r.SATURDAY="Day.Saturday",r.SATURDAY_SHORT="Day.SaturdayShort",r.SUNDAY="Day.Sunday",r.SUNDAY_SHORT="Day.SundayShort",r))(ge||{}),ve=(r=>(r.JANUARY="Month.January",r.FEBRUARY="Month.February",r.MARCH="Month.March",r.APRIL="Month.April",r.MAY="Month.May",r.JUNE="Month.June",r.JULY="Month.July",r.AUGUST="Month.August",r.SEPTEMBER="Month.September",r.OCTOBER="Month.October",r.NOVEMBER="Month.November",r.DECEMBER="Month.December",r))(ve||{}),Ot=(r=>(r.PREVIOUS_DAY="Date.PreviousDay",r.PREVIOUS_WEEK="Date.PreviousWeek",r.PREVIOUS_MONTH="Date.PreviousMonth",r.PREVIOUS_YEAR="Date.PreviousYear",r.NEXT_DAY="Date.NextDay",r.NEXT_WEEK="Date.NextWeek",r.NEXT_MONTH="Date.NextMonth",r.NEXT_YEAR="Date.NextYear",r.YESTERDAY="Date.Yesterday",r.TODAY="Date.Today",r.TOMORROW="Date.Tomorrow",r))(Ot||{});function rs({selectedDate:r,onDateChange:e,disabledDateRanges:t=[],initialValue:n,targetRef:s}){const{translate:a}=ft(),i=()=>{if(!n)return;const L=new Date(n);return isNaN(L.getTime())?void 0:L},[o]=k.useState(new Date),[l,c]=k.useState(r||i()||new Date),[f,u]=k.useState(l?l.getMonth():new Date().getMonth()),[d,g]=k.useState(l?l.getFullYear():new Date().getFullYear()),[h,m]=k.useState(l?l.getDate():null),x=k.useRef(null),T=k.useRef([]),R=[a(ve.JANUARY),a(ve.FEBRUARY),a(ve.MARCH),a(ve.APRIL),a(ve.MAY),a(ve.JUNE),a(ve.JULY),a(ve.AUGUST),a(ve.SEPTEMBER),a(ve.OCTOBER),a(ve.NOVEMBER),a(ve.DECEMBER)],w=[{value:a(ge.SUNDAY_SHORT),full:a(ge.SUNDAY)},{value:a(ge.MONDAY_SHORT),full:a(ge.MONDAY)},{value:a(ge.TUESDAY_SHORT),full:a(ge.TUESDAY)},{value:a(ge.WEDNESDAY_SHORT),full:a(ge.WEDNESDAY)},{value:a(ge.THURSDAY_SHORT),full:a(ge.THURSDAY)},{value:a(ge.FRIDAY_SHORT),full:a(ge.FRIDAY)},{value:a(ge.SATURDAY_SHORT),full:a(ge.SATURDAY)}],E=L=>t.some(v=>{const y=v.start.getTime(),C=v.end.getTime(),$=L.getTime();return $>=y&&$<=C}),b=L=>{E(L)||(c(L),m(L.getDate()),e&&e(Br(L)))},A=()=>{f===0?(u(11),g(d-1)):u(f-1),m(1)},N=()=>{f===11?(u(0),g(d+1)):u(f+1),m(1)},W=(L,v)=>new Date(L,v+1,0).getDate(),M=(L,v)=>new Date(L,v,1).getDay(),j=L=>{var y;const v=B.findIndex(C=>C!==null&&C.getDate()===L);v!==-1&&T.current[v]&&((y=T.current[v])==null||y.focus(),m(L))},F=(L,v)=>{const y=B[v];if(!y)return;const C=W(d,f),$=y.getDate();switch(L.key){case"ArrowRight":L.preventDefault();{let O=$+1,P=new Date(d,f,O);if(O>C){const I=f===11?d+1:d,V=f===11?0:f+1;O=1,P=new Date(I,V,O),N(),setTimeout(()=>{H(1,"forward")},0);return}E(P)?H(O,"forward"):j(O)}break;case"Tab":break;case"ArrowLeft":L.preventDefault();{let O=$-1,P=new Date(d,f,O);if(O<1){const I=f===0?d-1:d,V=f===0?11:f-1,K=W(I,V);O=K,P=new Date(I,V,O),A(),setTimeout(()=>{H(K,"backward")},0);return}E(P)?H(O,"backward"):j(O)}break;case"ArrowUp":L.preventDefault();{let O=$-7,P=new Date(d,f,O);if(O<1){const I=f===0?d-1:d,V=f===0?11:f-1;O=W(I,V)+O,P=new Date(I,V,O),A(),setTimeout(()=>{H(O,"backward")},0);return}E(P)?H(O,"backward"):j(O)}break;case"ArrowDown":L.preventDefault();{let O=$+7,P=new Date(d,f,O);if(O>C){const I=f===11?d+1:d,V=f===11?0:f+1;O=O-C,P=new Date(I,V,O),N(),setTimeout(()=>{H(O,"forward")},0);return}E(P)?H(O,"forward"):j(O)}break;case"Home":L.preventDefault(),H(1,"forward");break;case"End":L.preventDefault(),H(C,"backward");break;case"PageUp":L.preventDefault(),A(),setTimeout(()=>{const O=W(f===0?d-1:d,f===0?11:f-1),P=Math.min($,O);H(P,"forward")},0);break;case"PageDown":L.preventDefault(),N(),setTimeout(()=>{const O=W(f===11?d+1:d,f===11?0:f+1),P=Math.min($,O);H(P,"forward")},0);break;case" ":case"Space":if(E(y))return;m(y.getDate()),c(y);break;case"Enter":L.preventDefault(),b(y);break}},H=(L,v)=>{const y=W(d,f);if(v==="forward"){for(let C=L;C<=y;C++){const $=new Date(d,f,C);if(!E($)){j(C);return}}N(),setTimeout(()=>{H(1,"forward")},0)}else{for(let P=L;P>=1;P--){const I=new Date(d,f,P);if(!E(I)){j(P);return}}const C=f===0?d-1:d,$=f===0?11:f-1,O=W(C,$);A(),setTimeout(()=>{H(O,"backward")},0)}},B=(()=>{const L=W(d,f),v=M(d,f),y=[];for(let C=0;C<v;C++)y.push(null);for(let C=1;C<=L;C++){const $=new Date(d,f,C);y.push($)}return y})(),oe=[];let ee=[];B.forEach((L,v)=>{if(ee.push(L),ee.length===7||v===B.length-1){for(;ee.length<7;)ee.push(null);oe.push(ee),ee=[]}}),k.useEffect(()=>{var L;if(h!==null){const v=B.findIndex(y=>y!==null&&y.getDate()===h);v!==-1&&T.current[v]&&((L=T.current[v])==null||L.focus())}},[f,d,h,B]);const q={label:"smp-datepickercalendar-label",wrapper:"smp-datepickercalendar",calendar:"smp-datepickercalendar",table:"smp-datepickercalendar-table",th:"smp-datepickercalendar-th",td:(L,v,y,C)=>`smp-datepickercalendar-td
55
- ${L?"smp-datepickercalendar-td-today":""}
56
- ${v?"smp-datepickercalendar-td-selected":""}
44
+ */var at,Ft;function an(){if(Ft)return at;Ft=1;var r=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function s(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},o=0;o<10;o++)i["_"+String.fromCharCode(o)]=o;var u=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return at=s()?Object.assign:function(a,i){for(var o,u=n(a),c,f=1;f<arguments.length;f++){o=Object(arguments[f]);for(var l in o)e.call(o,l)&&(u[l]=o[l]);if(r){c=r(o);for(var p=0;p<c.length;p++)t.call(o,c[p])&&(u[c[p]]=o[c[p]])}}return u},at}var it,Vt;function xt(){if(Vt)return it;Vt=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return it=r,it}var ot,Yt;function vr(){return Yt||(Yt=1,ot=Function.call.bind(Object.prototype.hasOwnProperty)),ot}var lt,Ut;function on(){if(Ut)return lt;Ut=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var e=xt(),t={},n=vr();r=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(a,i,o,u,c){if(process.env.NODE_ENV!=="production"){for(var f in a)if(n(a,f)){var l;try{if(typeof a[f]!="function"){var p=Error((u||"React class")+": "+o+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}l=a[f](i,f,u,o,null,e)}catch(m){l=m}if(l&&!(l instanceof Error)&&r((u||"React class")+": type specification of "+o+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),l instanceof Error&&!(l.message in t)){t[l.message]=!0;var d=c?c():"";r("Failed "+o+" type: "+l.message+(d??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},lt=s,lt}var ct,Wt;function ln(){if(Wt)return ct;Wt=1;var r=yr(),e=an(),t=xt(),n=vr(),s=on(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var u="Warning: "+o;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function i(){return null}return ct=function(o,u){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function l(h){var y=h&&(c&&h[c]||h[f]);if(typeof y=="function")return y}var p="<<anonymous>>",d={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:E(),arrayOf:O,element:S(),elementType:b(),instanceOf:L,node:P(),objectOf:U,oneOf:C,oneOfType:j,shape:I,exact:W};function m(h,y){return h===y?h!==0||1/h===1/y:h!==h&&y!==y}function g(h,y){this.message=h,this.data=y&&typeof y=="object"?y:{},this.stack=""}g.prototype=Error.prototype;function x(h){if(process.env.NODE_ENV!=="production")var y={},T=0;function _(A,F,V,M,X,G,se){if(M=M||p,G=G||V,se!==t){if(u){var N=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 N.name="Invariant Violation",N}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Y=M+":"+V;!y[Y]&&T<3&&(a("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+M+"`. 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."),y[Y]=!0,T++)}}return F[V]==null?A?F[V]===null?new g("The "+X+" `"+G+"` is marked as required "+("in `"+M+"`, but its value is `null`.")):new g("The "+X+" `"+G+"` is marked as required in "+("`"+M+"`, but its value is `undefined`.")):null:h(F,V,M,X,G)}var R=_.bind(null,!1);return R.isRequired=_.bind(null,!0),R}function w(h){function y(T,_,R,A,F,V){var M=T[_],X=K(M);if(X!==h){var G=z(M);return new g("Invalid "+A+" `"+F+"` of type "+("`"+G+"` supplied to `"+R+"`, expected ")+("`"+h+"`."),{expectedType:h})}return null}return x(y)}function E(){return x(i)}function O(h){function y(T,_,R,A,F){if(typeof h!="function")return new g("Property `"+F+"` of component `"+R+"` has invalid PropType notation inside arrayOf.");var V=T[_];if(!Array.isArray(V)){var M=K(V);return new g("Invalid "+A+" `"+F+"` of type "+("`"+M+"` supplied to `"+R+"`, expected an array."))}for(var X=0;X<V.length;X++){var G=h(V,X,R,A,F+"["+X+"]",t);if(G instanceof Error)return G}return null}return x(y)}function S(){function h(y,T,_,R,A){var F=y[T];if(!o(F)){var V=K(F);return new g("Invalid "+R+" `"+A+"` of type "+("`"+V+"` supplied to `"+_+"`, expected a single ReactElement."))}return null}return x(h)}function b(){function h(y,T,_,R,A){var F=y[T];if(!r.isValidElementType(F)){var V=K(F);return new g("Invalid "+R+" `"+A+"` of type "+("`"+V+"` supplied to `"+_+"`, expected a single ReactElement type."))}return null}return x(h)}function L(h){function y(T,_,R,A,F){if(!(T[_]instanceof h)){var V=h.name||p,M=k(T[_]);return new g("Invalid "+A+" `"+F+"` of type "+("`"+M+"` supplied to `"+R+"`, expected ")+("instance of `"+V+"`."))}return null}return x(y)}function C(h){if(!Array.isArray(h))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("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])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function y(T,_,R,A,F){for(var V=T[_],M=0;M<h.length;M++)if(m(V,h[M]))return null;var X=JSON.stringify(h,function(se,N){var Y=z(N);return Y==="symbol"?String(N):N});return new g("Invalid "+A+" `"+F+"` of value `"+String(V)+"` "+("supplied to `"+R+"`, expected one of "+X+"."))}return x(y)}function U(h){function y(T,_,R,A,F){if(typeof h!="function")return new g("Property `"+F+"` of component `"+R+"` has invalid PropType notation inside objectOf.");var V=T[_],M=K(V);if(M!=="object")return new g("Invalid "+A+" `"+F+"` of type "+("`"+M+"` supplied to `"+R+"`, expected an object."));for(var X in V)if(n(V,X)){var G=h(V,X,R,A,F+"."+X,t);if(G instanceof Error)return G}return null}return x(y)}function j(h){if(!Array.isArray(h))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var y=0;y<h.length;y++){var T=h[y];if(typeof T!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(T)+" at index "+y+"."),i}function _(R,A,F,V,M){for(var X=[],G=0;G<h.length;G++){var se=h[G],N=se(R,A,F,V,M,t);if(N==null)return null;N.data&&n(N.data,"expectedType")&&X.push(N.data.expectedType)}var Y=X.length>0?", expected one of type ["+X.join(", ")+"]":"";return new g("Invalid "+V+" `"+M+"` supplied to "+("`"+F+"`"+Y+"."))}return x(_)}function P(){function h(y,T,_,R,A){return B(y[T])?null:new g("Invalid "+R+" `"+A+"` supplied to "+("`"+_+"`, expected a ReactNode."))}return x(h)}function D(h,y,T,_,R){return new g((h||"React class")+": "+y+" type `"+T+"."+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+R+"`.")}function I(h){function y(T,_,R,A,F){var V=T[_],M=K(V);if(M!=="object")return new g("Invalid "+A+" `"+F+"` of type `"+M+"` "+("supplied to `"+R+"`, expected `object`."));for(var X in h){var G=h[X];if(typeof G!="function")return D(R,A,F,X,z(G));var se=G(V,X,R,A,F+"."+X,t);if(se)return se}return null}return x(y)}function W(h){function y(T,_,R,A,F){var V=T[_],M=K(V);if(M!=="object")return new g("Invalid "+A+" `"+F+"` of type `"+M+"` "+("supplied to `"+R+"`, expected `object`."));var X=e({},T[_],h);for(var G in X){var se=h[G];if(n(h,G)&&typeof se!="function")return D(R,A,F,G,z(se));if(!se)return new g("Invalid "+A+" `"+F+"` key `"+G+"` supplied to `"+R+"`.\nBad object: "+JSON.stringify(T[_],null," ")+`
45
+ Valid keys: `+JSON.stringify(Object.keys(h),null," "));var N=se(V,G,R,A,F+"."+G,t);if(N)return N}return null}return x(y)}function B(h){switch(typeof h){case"number":case"string":case"undefined":return!0;case"boolean":return!h;case"object":if(Array.isArray(h))return h.every(B);if(h===null||o(h))return!0;var y=l(h);if(y){var T=y.call(h),_;if(y!==h.entries){for(;!(_=T.next()).done;)if(!B(_.value))return!1}else for(;!(_=T.next()).done;){var R=_.value;if(R&&!B(R[1]))return!1}}else return!1;return!0;default:return!1}}function J(h,y){return h==="symbol"?!0:y?y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&y instanceof Symbol:!1}function K(h){var y=typeof h;return Array.isArray(h)?"array":h instanceof RegExp?"object":J(y,h)?"symbol":y}function z(h){if(typeof h>"u"||h===null)return""+h;var y=K(h);if(y==="object"){if(h instanceof Date)return"date";if(h instanceof RegExp)return"regexp"}return y}function H(h){var y=z(h);switch(y){case"array":case"object":return"an "+y;case"boolean":case"date":case"regexp":return"a "+y;default:return y}}function k(h){return!h.constructor||!h.constructor.name?p:h.constructor.name}return d.checkPropTypes=s,d.resetWarningCache=s.resetWarningCache,d.PropTypes=d,d},ct}var ut,Ht;function cn(){if(Ht)return ut;Ht=1;var r=xt();function e(){}function t(){}return t.resetWarningCache=e,ut=function(){function n(i,o,u,c,f,l){if(l!==r){var p=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 p.name="Invariant Violation",p}}n.isRequired=n;function s(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:e};return a.PropTypes=a,a},ut}var Bt;function un(){if(Bt)return Ve.exports;if(Bt=1,process.env.NODE_ENV!=="production"){var r=yr(),e=!0;Ve.exports=ln()(r.isElement,e)}else Ve.exports=cn()();return Ve.exports}var ie=un(),fn=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},dn=function(e,t){for(var n in e)if(!(n in t))return!0;for(var s in t)if(e[s]!==t[s])return!0;return!1},pn=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Ue="http://www.w3.org/2000/svg",Gt="http://www.w3.org/1999/xlink",je=function(r){function e(){for(var n,s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];return n=r.call.apply(r,[this].concat(a))||this,n.initialState={hasError:!1,isLoading:!0},n.state=n.initialState,n._isMounted=!1,n.reactWrapper=void 0,n.nonReactWrapper=void 0,n.refCallback=function(o){n.reactWrapper=o},n}qr(e,r);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof fn(this.reactWrapper).Node){var a=this.props,i=a.desc,o=a.evalScripts,u=a.httpRequestWithCredentials,c=a.renumerateIRIElements,f=a.src,l=a.title,p=a.useRequestCache,d=this.props.onError,m=this.props.beforeInjection,g=this.props.afterInjection,x=this.props.wrapper,w,E;x==="svg"?(w=document.createElementNS(Ue,x),w.setAttribute("xmlns",Ue),w.setAttribute("xmlns:xlink",Gt),E=document.createElementNS(Ue,x)):(w=document.createElement(x),E=document.createElement(x)),w.appendChild(E),E.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(w);var O=function(C){if(s.removeSVG(),!s._isMounted){d(C);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){d(C)})},S=function(C,U){if(C){O(C);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{g(U)}catch(j){O(j)}})},b=function(C){if(C.setAttribute("role","img"),i){var U=C.querySelector(":scope > desc");U&&C.removeChild(U);var j=document.createElement("desc");j.innerHTML=i,C.prepend(j)}if(l){var P=C.querySelector(":scope > title");P&&C.removeChild(P);var D=document.createElement("title");D.innerHTML=l,C.prepend(D)}try{m(C)}catch(I){O(I)}};rn(E,{afterEach:S,beforeEach:b,cacheRequests:p,evalScripts:o,httpRequestWithCredentials:u,renumerateIRIElements:c})}},t.removeSVG=function(){var s;(s=this.nonReactWrapper)!=null&&s.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},t.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},t.componentDidUpdate=function(s){var a=this;dn(Xe({},s),this.props)&&this.setState(function(){return a.initialState},function(){a.removeSVG(),a.renderSVG()})},t.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},t.render=function(){var s=this.props;s.afterInjection,s.beforeInjection,s.desc,s.evalScripts;var a=s.fallback;s.httpRequestWithCredentials;var i=s.loading;s.renumerateIRIElements,s.src,s.title,s.useRequestCache;var o=s.wrapper,u=Gr(s,pn),c=o;return Ie.createElement(c,Xe({},u,{ref:this.refCallback},o==="svg"?{xmlns:Ue,xmlnsXlink:Gt}:{}),this.state.isLoading&&i&&Ie.createElement(i,null),this.state.hasError&&a&&Ie.createElement(a,null))},e}(Ie.Component);je.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};je.propTypes={afterInjection:ie.func,beforeInjection:ie.func,desc:ie.string,evalScripts:ie.oneOf(["always","once","never"]),fallback:ie.oneOfType([ie.func,ie.object,ie.string]),httpRequestWithCredentials:ie.bool,loading:ie.oneOfType([ie.func,ie.object,ie.string]),onError:ie.func,renumerateIRIElements:ie.bool,src:ie.string.isRequired,title:ie.string,useRequestCache:ie.bool,wrapper:ie.oneOf(["div","span","svg"])};let mt={assets:"/"};const hn=r=>{mt={...mt,...r}},qt=r=>`${mt.assets}/${r}`.replace(/\/+/g,"/"),le=$.memo(({icon:r,width:e,height:t,placeholderIcon:n,color:s,disabled:a,state:i="base",rotated:o=!1,onClick:u,isInteractable:c=!1,spin:f=!1,title:l,tabIndex:p})=>{const[d,m]=$.useState(r),g=(r==null?void 0:r.startsWith("http"))||(r==null?void 0:r.startsWith("/")),x=g&&(r==null?void 0:r.toLowerCase().endsWith(".svg")),w=qt(`assets/svg/${r}.svg`),E=qt(`assets/svg/${n}.svg`),O={img:`${c?"smp-image-interactable":""}`,svg:`smp-icon ${i?`smp-icon-${i}`:""} ${o?"smp-icon-rotated":""} ${c?"smp-icon-interactable":""} ${f?"smp-icon-spin":""}`},S=()=>{!a&&c&&u&&u()},b=L=>{!a&&c&&(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),S())};return v.jsx(v.Fragment,{children:x?v.jsx(je,{src:r,fallback:()=>v.jsx(je,{src:E,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:l,role:"application",fill:s,"aria-disabled":a,className:O.svg,onClick:S,onKeyDown:b,tabIndex:p}):g?v.jsx("img",{src:d,width:e||"16px",height:t||"auto",alt:l,onError:()=>m(E),onClick:S,className:O.img,title:l,onKeyDown:L=>{(L.key==="Enter"||L.key===" ")&&S()}}):v.jsx(je,{src:w,fallback:()=>v.jsx(je,{src:E,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:l,role:"application",fill:s,"aria-disabled":a,className:O.svg,onClick:S,onKeyDown:b,tabIndex:p})})}),he={"smp-textfield-wrapper":"_smp-textfield-wrapper_mmttf_4","smp-textfield":"_smp-textfield_mmttf_4","smp-textfield-extraSmall":"_smp-textfield-extraSmall_mmttf_30","smp-textfield-small":"_smp-textfield-small_mmttf_35","smp-textfield-medium":"_smp-textfield-medium_mmttf_40","smp-textfield-large":"_smp-textfield-large_mmttf_45","smp-textfield-extraLarge":"_smp-textfield-extraLarge_mmttf_50","smp-textfield-input":"_smp-textfield-input_mmttf_56","smp-textfield-outlined":"_smp-textfield-outlined_mmttf_79","smp-textfield-danger":"_smp-textfield-danger_mmttf_90","smp-textfield-readOnly":"_smp-textfield-readOnly_mmttf_94","smp-textfield-variant-notSelectable":"_smp-textfield-variant-notSelectable_mmttf_99","smp-textfield-disabled":"_smp-textfield-disabled_mmttf_109","smp-textfield-fullWidth":"_smp-textfield-fullWidth_mmttf_118"},Ee=({disabled:r,bindValue:e,icon:t,onBlur:n,onChange:s,placeholder:a,isEditable:i=!0,shapeIcon:o,sizing:u,state:c,variant:f,rotatedShapeIcon:l=!1,onShapeIconClick:p,ref:d,inputRef:m,onKeyDown:g,inputType:x="text",ariaLabel:w="input field",label:E,helperText:O=!1,error:S,appearance:b="base",fullWidth:L=!1,_dataComponent:C="textfield",width:U})=>{const j=$.useId(),P=`${j}-helper`,D=S?"danger":c,I=S||c=="danger"?"error":o,W=O||!!S,B=z=>{s==null||s(z.target.value)},J={wrapper:`${he["smp-textfield-wrapper"]} ${L?he["smp-textfield-fullWidth"]:""}`,container:`${he["smp-textfield"]} ${r?he["smp-textfield-disabled"]:""} ${a?he["smp-textfield-placeholder"]:""} ${u?he[`smp-textfield-${u}`]:""} ${D?he[`smp-textfield-${D}`]:""} ${b?he[`smp-textfield-${b}`]:""} ${i?"":he["smp-textfield-readOnly"]}`,input:`${he["smp-textfield-input"]}`};if(f&&(f!=="notSelectable"||i)){const z=he[`smp-textfield-variant-${f}`];z&&(J.container+=` ${z}`)}const K=U?{"--smp-textField-width-base":U}:void 0;return v.jsxs("div",{className:J.wrapper,"data-component":C,children:[E&&v.jsx(De,{label:E,disabled:r,htmlFor:j}),v.jsxs("div",{className:J.container,ref:d,style:K,children:[t&&v.jsx(le,{icon:t,disabled:r}),v.jsx("input",{id:j,type:x,value:e,placeholder:a,onChange:B,onBlur:n,className:J.input,disabled:r,readOnly:!i,onKeyDown:g,"aria-label":w,ref:m,"aria-describedby":W?P:void 0}),I&&v.jsx(le,{icon:I,disabled:r,state:D,onClick:p,rotated:l,isInteractable:i,tabIndex:0})]}),W&&v.jsx(hr,{helperText:S,disabled:r,state:D,id:P})]})};function br({items:r,itemHeight:e,containerHeight:t,overscan:n=5}){const[s,a]=$.useState(0),i=$.useRef(null),o=r.length*e,u=Math.max(0,Math.floor(s/e)-n),c=Math.min(r.length-1,Math.floor((s+t)/e)+n),f=[];for(let d=u;d<=c;d++)f.push({item:r[d],index:d,offsetTop:d*e});const l=$.useCallback(d=>{const m=d.target.scrollTop;a(m)},[]),p=d=>{if(!i.current)return;const m=d*e,g=m+e,x=i.current,w=x.scrollTop,E=w+t;m<w?x.scrollTop=m:g>E&&(x.scrollTop=g-t)};return{virtualItems:f,containerProps:{ref:i,style:{maxHeight:`${t}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:l},innerProps:{style:{height:`${o}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:s,viewportHeight:t,totalHeight:o,startIndex:u,endIndex:c},scrollToIndex:p}}const We={"smp-list":"_smp-list_t8eqj_1","smp-list-container":"_smp-list-container_t8eqj_10","smp-list-listItem":"_smp-list-listItem_t8eqj_15"},mn=10,xr=({id:r,options:e,displayMode:t,ref:n,showFilter:s,selectedIndex:a=null,activeIndex:i=[],width:o,onClick:u,onKeyDown:c})=>{var P;const[f,l]=$.useState(""),p=24,[d,m]=$.useState(a!==null?a:-1),g=s!==void 0?s:e.length>mn,x=f?e.filter(D=>D.label.toLowerCase().includes(f.toLowerCase())):e,w=D=>{l(D)},{virtualItems:E,containerProps:O,innerProps:S,scrollToIndex:b}=br({items:x,itemHeight:p,containerHeight:200,overscan:5});$.useEffect(()=>{a!==null&&a!==d&&m(a)},[a]),$.useEffect(()=>{d>=0&&d<x.length&&b(d)},[d,x]);const L=D=>{if(D.key==="ArrowDown"||D.key==="ArrowUp"){D.preventDefault();let I=d;D.key==="ArrowDown"?I=d<x.length-1?d+1:0:D.key==="ArrowUp"&&(I=d>0?d-1:x.length-1),m(I)}else D.key==="Enter"?d>=0&&d<x.length&&(u==null||u(x[d])):D.key==="Escape"&&(D.preventDefault(),D.stopPropagation());c&&c(D)},C=D=>{L(D)},U=D=>{L(D)},j={wrapper:`${We["smp-list"]}`,container:`${We["smp-list-container"]}`,virtualScroll:`${We["smp-list-virtualScroll"]}`,listItem:`${We["smp-list-listItem"]}`};return v.jsxs("div",{id:r,ref:n,className:j.wrapper,"data-component":"list",style:{width:o},children:[g&&v.jsx(Ee,{bindValue:f,placeholder:"Search...",onChange:w,onKeyDown:C}),v.jsx("div",{...O,className:j.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:U,"aria-activedescendant":d>=0&&d<x.length?(P=x[d])==null?void 0:P.id:void 0,children:v.jsx("div",{...S,className:j.virtualScroll,children:E.map(({item:D,index:I,offsetTop:W})=>{const B=i.includes(D.id);return v.jsxs("li",{role:"option",id:D.id,"aria-selected":d===I?"true":"false",tabIndex:-1,className:`${j.listItem} ${d===I?"selected-item":""}`,"aria-label":D.id+"-"+D.label,style:{height:`${p}px`,lineHeight:`calc(${p}px - 2*2px)`,transform:`translateY(${W}px)`},onClick:()=>{u==null||u(D),m(I)},children:[Je(D.id,D.label,t),B&&v.jsx(le,{icon:"check",width:16})]},D.id)})})})]})},Sr=({displayMode:r,bindValue:e,optionalDisplayValue:t,...n})=>{const[s,a]=$.useState(Je(e,t,r));return $.useEffect(()=>{a(e)},[e]),$.useEffect(()=>{a(Je(e,t,r))},[t,r]),v.jsx(Ee,{...n,bindValue:s})},gn=r=>{const e=$.useRef(null);return $.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),n=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{n()},r)}};function St({children:r}){const[e,t]=$.useState(!1);return $.useEffect(()=>{t(!0)},[]),e?kr.createPortal(r,document.body):null}const wt=({bindValue:r,optionalDisplayValue:e,options:t,displayMode:n,listDisplayMode:s="Both",minimumChars:a=3,isEditable:i=!0,placeholder:o,fun:u,_changeOnEnter:c=!1,onChange:f,onOptionsRequest:l,_multiActiveIndex:p,...d})=>{const[m,g]=$.useState(r),[x,w]=$.useState(e),[E,O]=$.useState(!1),[S,b]=$.useState(t||[]),[L,C]=$.useState(0),[U,j]=$.useState([r]),{anchorRef:P,targetRef:D,anchorWidth:I}=bt({position:"bottom",enabled:E});ze(D,()=>O(!1));const W=gn(400),B=H=>{H.length>=a?u&&l&&W(async()=>{const k=await l(u,H);b(k),C(k.length>0?0:-1),O(!0)}):O(!1),g(H),w(e),c||f==null||f(H,e)},J=H=>{c?(g(""),w("")):(g(H.id),w(H.label)),f==null||f(H.id,H.label);const k=S.findIndex(h=>h.id===H.id);C(k),j([H.id]),O(!1)},K=H=>{H.key==="Escape"&&(O(!1),C(-1))},z=H=>{if((H.key==="ArrowDown"||H.key==="ArrowUp")&&(H.preventDefault(),E)){const k=H.key==="ArrowDown"?(L+1)%S.length:(L-1+S.length)%S.length;C(k)}switch(H.key){case"Enter":L>=0&&L<S.length?J(S[L]):c&&(f==null||f(m,""),O(!1),g(""),w(""));break;case"Escape":O(!1),C(-1);break}};return v.jsxs("div",{"data-component":"autocomplete",children:[v.jsx(Sr,{...d,bindValue:m,optionalDisplayValue:x,displayMode:n,isEditable:i,shapeIcon:"magnify",placeholder:o,ref:P,onChange:B,onKeyDown:z,"aria-autocomplete":"list"}),E&&v.jsx(St,{children:v.jsx(xr,{options:S,displayMode:s,onClick:J,ref:D,selectedIndex:L,activeIndex:p||U,width:I,showFilter:!1,onKeyDown:K})})]})},Kt=r=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[r],zt=r=>({primary:"onPrimary",danger:"onDanger",base:"base"})[r],Se=({label:r,onClick:e,ariaLabel:t,icon:n,disabled:s,sizing:a="base",variant:i="primary",appearance:o="raised",showIcon:u=!0,showText:c=!0,fullWidth:f=!1,loading:l=!1,justify:p="center",title:d,optionalDisplayValue:m})=>{const g={container:`smp-button smp-button-container ${a?`smp-button-${a}`:""} ${i?`smp-buttonVariant-${i}`:""} ${o?`smp-buttonType-${o}`:""} ${f?"smp-button-fullWidth":""} smp-justifyContent-${p}`};return v.jsx("button",{"data-component":"button",className:g.container,onClick:e,"aria-label":t,disabled:s,"aria-busy":l,title:d||r||m,children:l?v.jsx(le,{icon:"spinner",state:zt(i),spin:!0}):v.jsxs(v.Fragment,{children:[n&&u&&v.jsx(le,{icon:n,disabled:s,state:zt(i),width:Kt(a),height:Kt(a)}),c&&m&&v.jsx("span",{children:m})]})})},wr=({options:r,fun:e,direction:t="row",disposition:n="start",sizing:s,variant:a,appearance:i,showText:o,showIcon:u,fullWidth:c,disabled:f,justify:l,onClick:p,onOptionsRequest:d})=>{const[m,g]=$.useState(r);$.useEffect(()=>{!m&&d&&e&&d(e,void 0).then(E=>g(E)).catch(E=>{console.error("Errore nel caricamento delle opzioni per ButtonList",E)})},[m,e,d]);const x={container:`smp-button-list smp-button-list-${t} smp-justifyContent-${n}`},w=m==null?void 0:m.map((E,O)=>{const S={bindValue:E.id,optionalDisplayValue:E.label,fun:E.fun,icon:E.icon,variant:a,appearance:i,showText:o,showIcon:u,fullWidth:c,disabled:f,sizing:s,justify:l,onClick:()=>{p==null||p(E.id,E.fun)}};return v.jsx(Se,{...S},`button-${O}`)});return v.jsx("div",{role:"list","data-component":"button-list",className:x.container,children:w})},Er=({bindValue:r,_dataComponent:e="checkbox",disabled:t,label:n,isEditable:s=!0,onChange:a,onBlur:i})=>{const o=c=>{s&&a&&a(c.target.checked)},u={wrapper:"smp-checkbox-wrapper"};return v.jsxs("div",{className:u.wrapper,"data-component":e,children:[n&&v.jsx(De,{label:n,disabled:t}),v.jsx("input",{"data-component":"checkbox",type:"checkbox",checked:r,onChange:o,onBlur:i})]})},yn={titleLarge:"h2",title:"h3",body:"h6",label:"label"},Ae=({variant:r="body",bindValue:e,color:t,...n})=>{const s=yn[r],a={container:`smp-typography ${r?`smp-typography-${r}`:""} ${n.disabled?"smp-typography-disabled":""}`};return v.jsx(s,{className:a.container,disabled:n.disabled,style:{"--smp-typography-color-base":t},children:e})},Et=({elements:r,isEditable:e=!1,displayMode:t="Both",onChange:n,color:s,backgroundColor:a,isDraggable:i=!1})=>{const[o,u]=$.useState(null),c={container:`${["smp-chips-container"]}`,element:"smp-chips-element"},f=d=>{n==null||n(r.filter((m,g)=>g!==d))},l=d=>{u(d)},p=d=>{if(o===null||o===d)return;const m=[...r],[g]=m.splice(o,1);m.splice(d,0,g),n==null||n(m),u(null)};return v.jsx("div",{className:c.container,role:"list","data-component":"chip",children:r.flatMap((d,m)=>{const g=Je(d.bindValue,d.optionalDisplayValue,t),x=v.jsxs("div",{className:c.element,role:"listitem",draggable:i,onDragStart:()=>l(m),onDragOver:E=>i&&E.preventDefault(),onDrop:()=>i&&p(m),style:{"--smp-chips-backgroundColor-base":a},children:[i&&v.jsx(le,{icon:"drag_indicator_horizontal",isInteractable:!0}),v.jsx(Ae,{variant:"label",bindValue:g,color:s}),e&&v.jsx(le,{icon:"close",isInteractable:!0,onClick:()=>f(m),color:s})]},`chip-${m}`),w=i&&m<r.length-1?v.jsx(le,{icon:"chevron-right",color:s},`separator-${m}`):null;return[x,w].filter(Boolean)})})};function Tr(r,e){const t=$.useRef(null);$.useEffect(()=>{if(!r)return;const n=typeof e=="object"&&e!==null&&"current"in e?e.current:null;if(!n)return;t.current=document.activeElement;const s=()=>n?Array.from(n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null):[];(()=>{const c=s();c.length>0&&requestAnimationFrame(()=>c[0].focus())})();const i=c=>{if(c.key==="Escape"||c.key!=="Tab")return;const f=s();if(f.length===0)return;const l=f[0],p=f[f.length-1];c.shiftKey&&document.activeElement===l?(c.preventDefault(),p.focus()):!c.shiftKey&&document.activeElement===p&&(c.preventDefault(),l.focus())},o=c=>{if(n&&!n.contains(c.target)){c.preventDefault();const f=s();f.length>0&&f[0].focus()}};document.addEventListener("keydown",i),document.addEventListener("mousedown",o);const u=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.removeEventListener("mousedown",o),document.body.style.overflow=u,t.current&&requestAnimationFrame(()=>{var c;(c=t.current)==null||c.focus()})}},[r,e])}const Or=({bindValue:r,onChange:e,options:t=[],optionalDisplayValue:n,isEditable:s,displayMode:a,listDisplayMode:i="Both",fun:o,onOptionsRequest:u,multiActiveIndex:c,...f})=>{const[l,p]=$.useState(!1),[d,m]=$.useState(t),[g,x]=$.useState(-1),[w,E]=$.useState([r]),O=$.useId(),{anchorRef:S,targetRef:b,anchorWidth:L}=bt({position:"bottom",enabled:l});ze(b,()=>p(!1)),Tr(l,b);const C=D=>{e==null||e(D.id,D.label);const I=d.findIndex(W=>W.id===D.id);x(I),E([D.id]),p(!1)},U=D=>{D.key==="Escape"&&(p(!1),x(-1))},j=D=>{(D.key==="ArrowDown"||D.key==="ArrowUp")&&(D.preventDefault(),P())},P=()=>{o&&u&&u(o,void 0).then(D=>{m(D),x(D.length>0?0:-1),p(!0)})};return v.jsxs("div",{role:"combobox","aria-expanded":l,"aria-controls":O,"aria-owns":O,"data-component":"combobox",children:[v.jsx(Sr,{...f,bindValue:r,optionalDisplayValue:n,displayMode:a,onShapeIconClick:P,onKeyDown:j,shapeIcon:"arrow_drop_down",rotatedShapeIcon:l,isEditable:s,ref:S,"aria-autocomplete":"list",variant:"notSelectable"}),l&&v.jsx(St,{children:v.jsx(xr,{id:O,options:d,displayMode:i,ref:b,selectedIndex:g,activeIndex:c||w,width:L,onClick:C,onKeyDown:U})})]})},q=r=>typeof r=="string",$e=()=>{let r,e;const t=new Promise((n,s)=>{r=n,e=s});return t.resolve=r,t.reject=e,t},Jt=r=>r==null?"":""+r,vn=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},bn=/###/g,Xt=r=>r&&r.indexOf("###")>-1?r.replace(bn,"."):r,Zt=r=>!r||q(r),Pe=(r,e,t)=>{const n=q(e)?e.split("."):e;let s=0;for(;s<n.length-1;){if(Zt(r))return{};const a=Xt(n[s]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++s}return Zt(r)?{}:{obj:r,k:Xt(n[s])}},Qt=(r,e,t)=>{const{obj:n,k:s}=Pe(r,e,Object);if(n!==void 0||e.length===1){n[s]=t;return}let a=e[e.length-1],i=e.slice(0,e.length-1),o=Pe(r,i,Object);for(;o.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),o=Pe(r,i,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${a}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=t},xn=(r,e,t,n)=>{const{obj:s,k:a}=Pe(r,e,Object);s[a]=s[a]||[],s[a].push(t)},Ze=(r,e)=>{const{obj:t,k:n}=Pe(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},Sn=(r,e,t)=>{const n=Ze(r,t);return n!==void 0?n:Ze(e,t)},Rr=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?q(r[n])||r[n]instanceof String||q(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):Rr(r[n],e[n],t):r[n]=e[n]);return r},Oe=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var wn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const En=r=>q(r)?r.replace(/[&<>"'\/]/g,e=>wn[e]):r;class Tn{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const On=[" ",",","?","!",";"],Rn=new Tn(20),jn=(r,e,t)=>{e=e||"",t=t||"";const n=On.filter(i=>e.indexOf(i)<0&&t.indexOf(i)<0);if(n.length===0)return!0;const s=Rn.getRegExp(`(${n.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!s.test(r);if(!a){const i=r.indexOf(t);i>0&&!s.test(r.substring(0,i))&&(a=!0)}return a},gt=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const n=e.split(t);let s=r;for(let a=0;a<n.length;){if(!s||typeof s!="object")return;let i,o="";for(let u=a;u<n.length;++u)if(u!==a&&(o+=t),o+=n[u],i=s[o],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&u<n.length-1)continue;a+=u-a+1;break}s=i}return s},Le=r=>r==null?void 0:r.replace("_","-"),Dn={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,n;(n=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||n.call(t,console,e)}};class Qe{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Dn,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,s){return s&&!this.debug?null:(q(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Qe(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Qe(this.logger,e)}}var ge=new Qe;class tt{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const s=this.observers[n].get(t)||0;this.observers[n].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,a])=>{for(let i=0;i<a;i++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,a])=>{for(let i=0;i<a;i++)s.apply(s,[e,...t])})}}class er extends tt{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,s={}){var c,f;const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):q(n)&&a?o.push(...n.split(a)):o.push(n)));const u=Ze(this.data,o);return!u&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),u||!i||!q(n)?u:gt((f=(c=this.data)==null?void 0:c[e])==null?void 0:f[t],n,a)}addResource(e,t,n,s,a={silent:!1}){const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let o=[e,t];n&&(o=o.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(o=e.split("."),s=t,t=o[1]),this.addNamespaces(t),Qt(this.data,o,s),a.silent||this.emit("added",e,t,n,s)}addResources(e,t,n,s={silent:!1}){for(const a in n)(q(n[a])||Array.isArray(n[a]))&&this.addResource(e,t,a,n[a],{silent:!0});s.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,s,a,i={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),s=n,n=t,t=o[1]),this.addNamespaces(t);let u=Ze(this.data,o)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?Rr(u,n,a):u={...u,...n},Qt(this.data,o,u),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var jr={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,s){return r.forEach(a=>{var i;e=((i=this.processors[a])==null?void 0:i.process(e,t,n,s))??e}),e}};const tr={},rr=r=>!q(r)&&typeof r!="boolean"&&typeof r!="number";class et extends tt{constructor(e,t={}){super(),vn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ge.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(e==null)return!1;const s=this.resolve(e,n);return(s==null?void 0:s.res)!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!jn(e,n,s);if(i&&!o){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:q(a)?[a]:a};const c=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),e=c.join(s)}return{key:e,namespaces:q(a)?[a]:a}}translate(e,t,n){let s=typeof t=="object"?{...t}:t;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(s={...s}),s||(s={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const a=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:o,namespaces:u}=this.extractFromKey(e[e.length-1],s),c=u[u.length-1];let f=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const l=s.lng||this.language,p=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((l==null?void 0:l.toLowerCase())==="cimode")return p?a?{res:`${c}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:`${c}${f}${o}`:a?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:o;const d=this.resolve(e,s);let m=d==null?void 0:d.res;const g=(d==null?void 0:d.usedKey)||o,x=(d==null?void 0:d.exactUsedKey)||o,w=["[object Number]","[object Function]","[object RegExp]"],E=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject,S=s.count!==void 0&&!q(s.count),b=et.hasDefaultValue(s),L=S?this.pluralResolver.getSuffix(l,s.count,s):"",C=s.ordinal&&S?this.pluralResolver.getSuffix(l,s.count,{ordinal:!1}):"",U=S&&!s.ordinal&&s.count===0,j=U&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${L}`]||s[`defaultValue${C}`]||s.defaultValue;let P=m;O&&!m&&b&&(P=j);const D=rr(P),I=Object.prototype.toString.apply(P);if(O&&P&&D&&w.indexOf(I)<0&&!(q(E)&&Array.isArray(P))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const W=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,P,{...s,ns:u}):`key '${o} (${this.language})' returned an object instead of string.`;return a?(d.res=W,d.usedParams=this.getUsedParamsDetails(s),d):W}if(i){const W=Array.isArray(P),B=W?[]:{},J=W?x:g;for(const K in P)if(Object.prototype.hasOwnProperty.call(P,K)){const z=`${J}${i}${K}`;b&&!m?B[K]=this.translate(z,{...s,defaultValue:rr(j)?j[K]:void 0,joinArrays:!1,ns:u}):B[K]=this.translate(z,{...s,joinArrays:!1,ns:u}),B[K]===z&&(B[K]=P[K])}m=B}}else if(O&&q(E)&&Array.isArray(m))m=m.join(E),m&&(m=this.extendTranslation(m,e,s,n));else{let W=!1,B=!1;!this.isValidLookup(m)&&b&&(W=!0,m=j),this.isValidLookup(m)||(B=!0,m=o);const K=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:m,z=b&&j!==m&&this.options.updateMissing;if(B||W||z){if(this.logger.log(z?"updateKey":"missingKey",l,c,o,z?j:m),i){const y=this.resolve(o,{...s,keySeparator:!1});y&&y.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let H=[];const k=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&k&&k[0])for(let y=0;y<k.length;y++)H.push(k[y]);else this.options.saveMissingTo==="all"?H=this.languageUtils.toResolveHierarchy(s.lng||this.language):H.push(s.lng||this.language);const h=(y,T,_)=>{var A;const R=b&&_!==m?_:K;this.options.missingKeyHandler?this.options.missingKeyHandler(y,c,T,R,z,s):(A=this.backendConnector)!=null&&A.saveMissing&&this.backendConnector.saveMissing(y,c,T,R,z,s),this.emit("missingKey",y,c,T,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?H.forEach(y=>{const T=this.pluralResolver.getSuffixes(y,s);U&&s[`defaultValue${this.options.pluralSeparator}zero`]&&T.indexOf(`${this.options.pluralSeparator}zero`)<0&&T.push(`${this.options.pluralSeparator}zero`),T.forEach(_=>{h([y],o+_,s[`defaultValue${_}`]||j)})}):h(H,o,j))}m=this.extendTranslation(m,e,s,d,n),B&&m===o&&this.options.appendNamespaceToMissingKey&&(m=`${c}${f}${o}`),(B||W)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${f}${o}`:o,W?m:void 0,s))}return a?(d.res=m,d.usedParams=this.getUsedParamsDetails(s),d):m}extendTranslation(e,t,n,s,a){var u,c;if((u=this.i18nFormat)!=null&&u.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const f=q(e)&&(((c=n==null?void 0:n.interpolation)==null?void 0:c.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let l;if(f){const d=e.match(this.interpolator.nestingRegexp);l=d&&d.length}let p=n.replace&&!q(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,n.lng||this.language||s.usedLng,n),f){const d=e.match(this.interpolator.nestingRegexp),m=d&&d.length;l<m&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...d)=>(a==null?void 0:a[0])===d[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${t[0]}`),null):this.translate(...d,t),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,o=q(i)?[i]:i;return e!=null&&(o!=null&&o.length)&&n.applyPostProcessor!==!1&&(e=jr.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,s,a,i,o;return q(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(u,t),f=c.key;s=f;let l=c.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const p=t.count!==void 0&&!q(t.count),d=p&&!t.ordinal&&t.count===0,m=t.context!==void 0&&(q(t.context)||typeof t.context=="number")&&t.context!=="",g=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(x=>{var w,E;this.isValidLookup(n)||(o=x,!tr[`${g[0]}-${x}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((E=this.utils)!=null&&E.hasLoadedNamespace(o))&&(tr[`${g[0]}-${x}`]=!0,this.logger.warn(`key "${s}" for languages "${g.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(O=>{var L;if(this.isValidLookup(n))return;i=O;const S=[f];if((L=this.i18nFormat)!=null&&L.addLookupKeys)this.i18nFormat.addLookupKeys(S,f,O,x,t);else{let C;p&&(C=this.pluralResolver.getSuffix(O,t.count,t));const U=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(S.push(f+C),t.ordinal&&C.indexOf(j)===0&&S.push(f+C.replace(j,this.options.pluralSeparator)),d&&S.push(f+U)),m){const P=`${f}${this.options.contextSeparator}${t.context}`;S.push(P),p&&(S.push(P+C),t.ordinal&&C.indexOf(j)===0&&S.push(P+C.replace(j,this.options.pluralSeparator)),d&&S.push(P+U))}}let b;for(;b=S.pop();)this.isValidLookup(n)||(a=b,n=this.getResource(O,x,b,t))}))})}),{res:n,usedKey:s,exactUsedKey:a,usedLng:i,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n,s={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,n,s):this.resourceStore.getResource(e,t,n,s)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!q(e.replace);let s=n?e.replace:e;if(n&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const a of t)delete s[a]}return s}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}class nr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ge.create("languageUtils")}getScriptPartFromCode(e){if(e=Le(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=Le(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(q(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const s=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const s=this.getScriptPartFromCode(n);if(this.isSupportedCode(s))return t=s;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),q(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),s=[],a=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return q(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):q(e)&&a(this.formatLanguageCode(e)),n.forEach(i=>{s.indexOf(i)<0&&a(this.formatLanguageCode(i))}),s}}const sr={zero:0,one:1,two:2,few:3,many:4,other:5},ar={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class _n{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ge.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Le(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:s});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(n,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),ar;if(!e.match(/-|_/))return ar;const u=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(u,t)}return this.pluralRulesCache[a]=i,i}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((s,a)=>sr[s]-sr[a]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,n={}){const s=this.getRule(e,n);return s?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const ir=(r,e,t,n=".",s=!0)=>{let a=Sn(r,e,t);return!a&&s&&q(t)&&(a=gt(r,t,n),a===void 0&&(a=gt(e,t,n))),a},ft=r=>r.replace(/\$/g,"$$$$");class Cn{constructor(e={}){var t;this.logger=ge.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:s,prefix:a,prefixEscaped:i,suffix:o,suffixEscaped:u,formatSeparator:c,unescapeSuffix:f,unescapePrefix:l,nestingPrefix:p,nestingPrefixEscaped:d,nestingSuffix:m,nestingSuffixEscaped:g,nestingOptionsSeparator:x,maxReplaces:w,alwaysFormat:E}=e.interpolation;this.escape=t!==void 0?t:En,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?Oe(a):i||"{{",this.suffix=o?Oe(o):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":l||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=p?Oe(p):d||Oe("$t("),this.nestingSuffix=m?Oe(m):g||Oe(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=w||1e3,this.alwaysFormat=E!==void 0?E:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>(t==null?void 0:t.source)===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,s){var d;let a,i,o;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=m=>{if(m.indexOf(this.formatSeparator)<0){const E=ir(t,u,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(E,void 0,n,{...s,...t,interpolationkey:m}):E}const g=m.split(this.formatSeparator),x=g.shift().trim(),w=g.join(this.formatSeparator).trim();return this.format(ir(t,u,x,this.options.keySeparator,this.options.ignoreJSONStructure),w,n,{...s,...t,interpolationkey:x})};this.resetRegExp();const f=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,l=((d=s==null?void 0:s.interpolation)==null?void 0:d.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>ft(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?ft(this.escape(m)):ft(m)}].forEach(m=>{for(o=0;a=m.regex.exec(e);){const g=a[1].trim();if(i=c(g),i===void 0)if(typeof f=="function"){const w=f(e,a,s);i=q(w)?w:""}else if(s&&Object.prototype.hasOwnProperty.call(s,g))i="";else if(l){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),i="";else!q(i)&&!this.useRawValueToEscape&&(i=Jt(i));const x=m.safeValue(i);if(e=e.replace(a[0],x),l?(m.regex.lastIndex+=i.length,m.regex.lastIndex-=a[0].length):m.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let s,a,i;const o=(u,c)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const l=u.split(new RegExp(`${f}[ ]*{`));let p=`{${l[1]}`;u=l[0],p=this.interpolate(p,i);const d=p.match(/'/g),m=p.match(/"/g);(((d==null?void 0:d.length)??0)%2===0&&!m||m.length%2!==0)&&(p=p.replace(/'/g,'"'));try{i=JSON.parse(p),c&&(i={...c,...i})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,g),`${u}${f}${p}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,u};for(;s=this.nestingRegexp.exec(e);){let u=[];i={...n},i=i.replace&&!q(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let c=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(l=>l.trim());s[1]=f.shift(),u=f,c=!0}if(a=t(o.call(this,s[1].trim(),i),i),a&&s[0]===e&&!q(a))return a;q(a)||(a=Jt(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),a=""),c&&(a=u.reduce((f,l)=>this.format(f,l,n.lng,{...n,interpolationkey:s[1].trim()}),a.trim())),e=e.replace(s[0],a),this.regexp.lastIndex=0}return e}}const $n=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const n=r.split("(");e=n[0].toLowerCase().trim();const s=n[1].substring(0,n[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(i=>{if(i){const[o,...u]=i.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();t[f]||(t[f]=c),c==="false"&&(t[f]=!1),c==="true"&&(t[f]=!0),isNaN(c)||(t[f]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},or=r=>{const e={};return(t,n,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});const i=n+JSON.stringify(a);let o=e[i];return o||(o=r(Le(n),s),e[i]=o),o(t)}},Pn=r=>(e,t,n)=>r(Le(t),n)(e);class An{constructor(e={}){this.logger=ge.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?or:Pn;this.formats={number:n((s,a)=>{const i=new Intl.NumberFormat(s,{...a});return o=>i.format(o)}),currency:n((s,a)=>{const i=new Intl.NumberFormat(s,{...a,style:"currency"});return o=>i.format(o)}),datetime:n((s,a)=>{const i=new Intl.DateTimeFormat(s,{...a});return o=>i.format(o)}),relativetime:n((s,a)=>{const i=new Intl.RelativeTimeFormat(s,{...a});return o=>i.format(o,a.range||"day")}),list:n((s,a)=>{const i=new Intl.ListFormat(s,{...a});return o=>i.format(o)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=or(t)}format(e,t,n,s={}){const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(o=>o.indexOf(")")>-1)){const o=a.findIndex(u=>u.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,o)].join(this.formatSeparator)}return a.reduce((o,u)=>{var l;const{formatName:c,formatOptions:f}=$n(u);if(this.formats[c]){let p=o;try{const d=((l=s==null?void 0:s.formatParams)==null?void 0:l[s.interpolationkey])||{},m=d.locale||d.lng||s.locale||s.lng||n;p=this.formats[c](o,m,{...f,...s,...d})}catch(d){this.logger.warn(d)}return p}else this.logger.warn(`there was no format function for ${c}`);return o},e)}}const Ln=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class kn extends tt{constructor(e,t,n,s={}){var a,i;super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=ge.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(i=(a=this.backend)==null?void 0:a.init)==null||i.call(a,n,s.backend,s)}queueLoad(e,t,n,s){const a={},i={},o={},u={};return e.forEach(c=>{let f=!0;t.forEach(l=>{const p=`${c}|${l}`;!n.reload&&this.store.hasResourceBundle(c,l)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?i[p]===void 0&&(i[p]=!0):(this.state[p]=1,f=!1,i[p]===void 0&&(i[p]=!0),a[p]===void 0&&(a[p]=!0),u[l]===void 0&&(u[l]=!0)))}),f||(o[c]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(u)}}loaded(e,t,n){const s=e.split("|"),a=s[0],i=s[1];t&&this.emit("failedLoading",a,i,t),!t&&n&&this.store.addResourceBundle(a,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const o={};this.queue.forEach(u=>{xn(u.loaded,[a],i),Ln(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{o[c]||(o[c]={});const f=u.loaded[c];f.length&&f.forEach(l=>{o[c][l]===void 0&&(o[c][l]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(u=>!u.done)}read(e,t,n,s=0,a=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:a,callback:i});return}this.readingCalls++;const o=(c,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const l=this.waitingReads.shift();this.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}if(c&&f&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,s+1,a*2,i)},a);return}i(c,f)},u=this.backend[n].bind(this.backend);if(u.length===2){try{const c=u(e,t);c&&typeof c.then=="function"?c.then(f=>o(null,f)).catch(o):o(null,c)}catch(c){o(c)}return}return u(e,t,o)}prepareLoading(e,t,n={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();q(e)&&(e=this.languageUtils.toResolveHierarchy(e)),q(t)&&(t=[t]);const a=this.queueLoad(e,t,n,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),s=n[0],a=n[1];this.read(s,a,"read",void 0,void 0,(i,o)=>{i&&this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`,i),!i&&o&&this.logger.log(`${t}loaded namespace ${a} for language ${s}`,o),this.loaded(e,i,o)})}saveMissing(e,t,n,s,a,i={},o=()=>{}){var u,c,f,l,p;if((c=(u=this.services)==null?void 0:u.utils)!=null&&c.hasLoadedNamespace&&!((l=(f=this.services)==null?void 0:f.utils)!=null&&l.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((p=this.backend)!=null&&p.create){const d={...i,isUpdate:a},m=this.backend.create.bind(this.backend);if(m.length<6)try{let g;m.length===5?g=m(e,t,n,s,d):g=m(e,t,n,s),g&&typeof g.then=="function"?g.then(x=>o(null,x)).catch(o):o(null,g)}catch(g){o(g)}else m(e,t,n,s,o,d)}!e||!e[0]||this.store.addResource(e[0],t,n,s)}}}const lr=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),q(r[1])&&(e.defaultValue=r[1]),q(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),cr=r=>{var e,t;return q(r.ns)&&(r.ns=[r.ns]),q(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),q(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((t=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},He=()=>{},In=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class ke extends tt{constructor(e={},t){if(super(),this.options=cr(e),this.services={},this.logger=ge,this.modules={external:[]},In(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(q(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=lr();this.options={...n,...this.options,...cr(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?ge.init(s(this.modules.logger),this.options):ge.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=An;const f=new nr(this.options);this.store=new er(this.options.resources,this.options);const l=this.services;l.logger=ge,l.resourceStore=this.store,l.languageUtils=f,l.pluralResolver=new _n(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(l.formatter=s(c),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new Cn(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new kn(s(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",(p,...d)=>{this.emit(p,...d)}),this.modules.languageDetector&&(l.languageDetector=s(this.modules.languageDetector),l.languageDetector.init&&l.languageDetector.init(l,this.options.detection,this.options)),this.modules.i18nFormat&&(l.i18nFormat=s(this.modules.i18nFormat),l.i18nFormat.init&&l.i18nFormat.init(this)),this.translator=new et(this.services,this.options),this.translator.on("*",(p,...d)=>{this.emit(p,...d)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,t||(t=He),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...f)=>this.store[c](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...f)=>(this.store[c](...f),this)});const o=$e(),u=()=>{const c=(f,l)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(l),t(f,l)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),o}loadResources(e,t=He){var a,i;let n=t;const s=q(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const o=[],u=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(l=>{l!=="cimode"&&o.indexOf(l)<0&&o.push(l)})};s?u(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>u(f)),(i=(a=this.options.preload)==null?void 0:a.forEach)==null||i.call(a,c=>u(c)),this.services.backendConnector.load(o,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(c)})}else n(null)}reloadResources(e,t,n){const s=$e();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=He),this.services.backendConnector.reload(e,t,a=>{s.resolve(),n(a)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&jr.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=$e();this.emit("languageChanging",e);const s=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},a=(o,u)=>{u?this.isLanguageChangingTo===e&&(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,n.resolve((...c)=>this.t(...c)),t&&t(o,(...c)=>this.t(...c))},i=o=>{var f,l;!e&&!o&&this.services.languageDetector&&(o=[]);const u=q(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(q(o)?[o]:o);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),(l=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||l.call(f,c)),this.loadResources(c,p=>{a(p,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e),n}getFixedT(e,t,n){const s=(a,i,...o)=>{let u;typeof i!="object"?u=this.options.overloadTranslationOptionHandler([a,i].concat(o)):u={...i},u.lng=u.lng||s.lng,u.lngs=u.lngs||s.lngs,u.ns=u.ns||s.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||s.keyPrefix);const c=this.options.keySeparator||".";let f;return u.keyPrefix&&Array.isArray(a)?f=a.map(l=>`${u.keyPrefix}${c}${l}`):f=u.keyPrefix?`${u.keyPrefix}${c}${a}`:a,this.t(f,u)};return q(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=n,s}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const i=(o,u)=>{const c=this.services.backendConnector.state[`${o}|${u}`];return c===-1||c===0||c===2};if(t.precheck){const o=t.precheck(this,i);if(o!==void 0)return o}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(n,e)&&(!s||i(a,e)))}loadNamespaces(e,t){const n=$e();return this.options.ns?(q(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{n.resolve(),t&&t(s)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=$e();q(e)&&(e=[e]);const s=this.options.preload||[],a=e.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=s.concat(a),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}dir(e){var s,a;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((a=this.services)==null?void 0:a.languageUtils)||new nr(lr());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new ke(e,t)}cloneInstance(e={},t=He){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new ke(s);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(o=>{a[o]=this[o]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const o=Object.keys(this.store.data).reduce((u,c)=>(u[c]={...this.store.data[c]},u[c]=Object.keys(u[c]).reduce((f,l)=>(f[l]={...u[c][l]},f),u[c]),u),{});a.store=new er(o,s),a.services.resourceStore=a.store}return a.translator=new et(a.services,s),a.translator.on("*",(o,...u)=>{a.emit(o,...u)}),a.init(s,t),a.translator.options=s,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ae=ke.createInstance();ae.createInstance=ke.createInstance;ae.createInstance;ae.dir;ae.init;ae.loadResources;ae.reloadResources;ae.use;ae.changeLanguage;ae.getFixedT;ae.t;ae.exists;ae.setDefaultNamespace;ae.hasLoadedNamespace;ae.loadNamespaces;ae.loadLanguages;const Nn={Friday:"Venerdì",FridayShort:"Ven",Monday:"Lunedì",MondayShort:"Lun",Saturday:"Sabato",SaturdayShort:"Sab",Sunday:"Domenica",SundayShort:"Dom",Tuesday:"Martedì",TuesdayShort:"Mar",Thursday:"Giovedì",ThursdayShort:"Gio",Wednesday:"Mercoledì",WednesdayShort:"Mer"},Mn={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},Fn={CalendarFor:"Calendario per",Close:"Chiudi",SpotlightDefaultPlaceholder:"Esegui Comando"},Vn={Date:{NextDay:"Giorno Successivo",NextMonth:"Mese Successivo",NextWeek:"Settimana Successiva",NextYear:"Anno Successivo",PreviousDay:"Giorno Precedente",PreviousMonth:"Mese Precedente",PreviousWeek:"Settimana Precedente",PreviousYear:"Anno Precedente",Today:"Oggi",Tomorrow:"Domani",Yesterday:"Ieri"},Day:Nn,Month:Mn,Generic:Fn},Yn={Friday:"Friday",FridayShort:"Fri",Monday:"Monday",MondayShort:"Mon",Saturday:"Saturday",SaturdayShort:"Sat",Sunday:"Sunday",SundayShort:"Sun",Tuesday:"Tuesday",TuesdayShort:"Tue",Thursday:"Thursday",ThursdayShort:"Thu",Wednesday:"Wednesday",WednesdayShort:"Wed"},Un={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},Wn={CalendarFor:"Calendar for",Close:"Close",SpotlightDefaultPlaceholder:"Execute Command"},Hn={Date:{NextDay:"Next Day",NextMonth:"Next Month",NextWeek:"Next Week",NextYear:"Next Year",PreviousDay:"Previous Day",PreviousMonth:"Previous Month",PreviousWeek:"Previous Week",PreviousYear:"Previous Year",Today:"Today",Tomorrow:"Tomorrow",Yesterday:"Yesterday"},Day:Yn,Month:Un,Generic:Wn};function ur(r,e){return new RegExp(Bn(r),e)}function Bn(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Gn(r,e,t,n){let s=e;const a=qn(r,t);if(!s){const o=Math.abs(a);o-Math.floor(o)?s="0,0.00":s="0,0"}const i=Kn(s);return new Intl.NumberFormat(n,i).format(a)}function qn(r,e,t,n,s){let a=r;if(typeof a!="number"){let o;e&&n===void 0?o=",":o=".";const u=o=="."?",":".";a=a.replace(ur(u,"g"),""),a=a.replace(ur(o,"g"),"."),a=Number(a)}const i=Number(a);return isNaN(i)?NaN:i}function Kn(r){const e={};r.includes(",")?e.useGrouping=!0:e.useGrouping=!1;const t=r.indexOf(".");if(t>-1){const s=(r.substring(t+1).match(/0/g)||[]).length;e.minimumFractionDigits=s,e.maximumFractionDigits=s}else e.minimumFractionDigits=0,e.maximumFractionDigits=0;return e}ae.init({lng:typeof navigator<"u"&&navigator.language.split("-")[0]||"en",fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(r,e,t,n)=>{const s=(n==null?void 0:n.type)??"number";try{switch(s){case"date":{const a=r instanceof Date?r:new Date(r);return new Intl.DateTimeFormat(t,{dateStyle:e||"short"}).format(a)}default:case"number":{const a=(n==null?void 0:n.inputIsLocalized)??!1;return Gn(r,e,a,t)}}}catch{return r}}},resources:{en:{translation:Hn},it:{translation:Vn}}});const zn=(r,e,t,n)=>ae.format(r,e,t||ae.language,n),Jn=(r,e)=>ae.t(r,e);function rt(){const r=$.useCallback((n,s,a,i)=>zn(n,s,a||void 0,i),[]),e=$.useCallback(()=>ae.languages[0],[]),t=$.useCallback((n,s)=>Jn(n,s),[]);return{format:r,getCurrentLanguage:e,translate:t}}var Tt=(r=>(r.CALENDAR_FOR="Date.CalendarFor",r.CLOSE="Generic.Close",r.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",r))(Tt||{}),oe=(r=>(r.MONDAY="Day.Monday",r.MONDAY_SHORT="Day.MondayShort",r.TUESDAY="Day.Tuesday",r.TUESDAY_SHORT="Day.TuesdayShort",r.WEDNESDAY="Day.Wednesday",r.WEDNESDAY_SHORT="Day.WednesdayShort",r.THURSDAY="Day.Thursday",r.THURSDAY_SHORT="Day.ThursdayShort",r.FRIDAY="Day.Friday",r.FRIDAY_SHORT="Day.FridayShort",r.SATURDAY="Day.Saturday",r.SATURDAY_SHORT="Day.SaturdayShort",r.SUNDAY="Day.Sunday",r.SUNDAY_SHORT="Day.SundayShort",r))(oe||{}),ue=(r=>(r.JANUARY="Month.January",r.FEBRUARY="Month.February",r.MARCH="Month.March",r.APRIL="Month.April",r.MAY="Month.May",r.JUNE="Month.June",r.JULY="Month.July",r.AUGUST="Month.August",r.SEPTEMBER="Month.September",r.OCTOBER="Month.October",r.NOVEMBER="Month.November",r.DECEMBER="Month.December",r))(ue||{}),yt=(r=>(r.PREVIOUS_DAY="Date.PreviousDay",r.PREVIOUS_WEEK="Date.PreviousWeek",r.PREVIOUS_MONTH="Date.PreviousMonth",r.PREVIOUS_YEAR="Date.PreviousYear",r.NEXT_DAY="Date.NextDay",r.NEXT_WEEK="Date.NextWeek",r.NEXT_MONTH="Date.NextMonth",r.NEXT_YEAR="Date.NextYear",r.YESTERDAY="Date.Yesterday",r.TODAY="Date.Today",r.TOMORROW="Date.Tomorrow",r))(yt||{});const Xn={"smp-datepickercalendar-position":"_smp-datepickercalendar-position_19hwj_1"};function Zn({selectedDate:r,onDateChange:e,disabledDateRanges:t=[],initialValue:n,targetRef:s}){const{translate:a}=rt(),i=()=>{if(!n)return;const k=new Date(n);return isNaN(k.getTime())?void 0:k},[o]=$.useState(new Date),[u,c]=$.useState(r||i()||new Date),[f,l]=$.useState(u?u.getMonth():new Date().getMonth()),[p,d]=$.useState(u?u.getFullYear():new Date().getFullYear()),[m,g]=$.useState(u?u.getDate():null),x=$.useRef(null),w=$.useRef([]),E=[a(ue.JANUARY),a(ue.FEBRUARY),a(ue.MARCH),a(ue.APRIL),a(ue.MAY),a(ue.JUNE),a(ue.JULY),a(ue.AUGUST),a(ue.SEPTEMBER),a(ue.OCTOBER),a(ue.NOVEMBER),a(ue.DECEMBER)],O=[{value:a(oe.SUNDAY_SHORT),full:a(oe.SUNDAY)},{value:a(oe.MONDAY_SHORT),full:a(oe.MONDAY)},{value:a(oe.TUESDAY_SHORT),full:a(oe.TUESDAY)},{value:a(oe.WEDNESDAY_SHORT),full:a(oe.WEDNESDAY)},{value:a(oe.THURSDAY_SHORT),full:a(oe.THURSDAY)},{value:a(oe.FRIDAY_SHORT),full:a(oe.FRIDAY)},{value:a(oe.SATURDAY_SHORT),full:a(oe.SATURDAY)}],S=k=>t.some(h=>{const y=h.start.getTime(),T=h.end.getTime(),_=k.getTime();return _>=y&&_<=T}),b=k=>{S(k)||(c(k),g(k.getDate()),e&&e(Br(k)))},L=()=>{f===0?(l(11),d(p-1)):l(f-1),g(1)},C=()=>{f===11?(l(0),d(p+1)):l(f+1),g(1)},U=(k,h)=>new Date(k,h+1,0).getDate(),j=(k,h)=>new Date(k,h,1).getDay(),P=k=>{var y;const h=B.findIndex(T=>T!==null&&T.getDate()===k);h!==-1&&w.current[h]&&((y=w.current[h])==null||y.focus(),g(k))},D=(k,h)=>{const y=B[h];if(!y)return;const T=U(p,f),_=y.getDate();switch(k.key){case"ArrowRight":k.preventDefault();{let R=_+1,A=new Date(p,f,R);if(R>T){const F=f===11?p+1:p,V=f===11?0:f+1;R=1,A=new Date(F,V,R),C(),setTimeout(()=>{I(1,"forward")},0);return}S(A)?I(R,"forward"):P(R)}break;case"Tab":break;case"ArrowLeft":k.preventDefault();{let R=_-1,A=new Date(p,f,R);if(R<1){const F=f===0?p-1:p,V=f===0?11:f-1,M=U(F,V);R=M,A=new Date(F,V,R),L(),setTimeout(()=>{I(M,"backward")},0);return}S(A)?I(R,"backward"):P(R)}break;case"ArrowUp":k.preventDefault();{let R=_-7,A=new Date(p,f,R);if(R<1){const F=f===0?p-1:p,V=f===0?11:f-1;R=U(F,V)+R,A=new Date(F,V,R),L(),setTimeout(()=>{I(R,"backward")},0);return}S(A)?I(R,"backward"):P(R)}break;case"ArrowDown":k.preventDefault();{let R=_+7,A=new Date(p,f,R);if(R>T){const F=f===11?p+1:p,V=f===11?0:f+1;R=R-T,A=new Date(F,V,R),C(),setTimeout(()=>{I(R,"forward")},0);return}S(A)?I(R,"forward"):P(R)}break;case"Home":k.preventDefault(),I(1,"forward");break;case"End":k.preventDefault(),I(T,"backward");break;case"PageUp":k.preventDefault(),L(),setTimeout(()=>{const R=U(f===0?p-1:p,f===0?11:f-1),A=Math.min(_,R);I(A,"forward")},0);break;case"PageDown":k.preventDefault(),C(),setTimeout(()=>{const R=U(f===11?p+1:p,f===11?0:f+1),A=Math.min(_,R);I(A,"forward")},0);break;case" ":case"Space":if(S(y))return;g(y.getDate()),c(y);break;case"Enter":k.preventDefault(),b(y);break}},I=(k,h)=>{const y=U(p,f);if(h==="forward"){for(let T=k;T<=y;T++){const _=new Date(p,f,T);if(!S(_)){P(T);return}}C(),setTimeout(()=>{I(1,"forward")},0)}else{for(let A=k;A>=1;A--){const F=new Date(p,f,A);if(!S(F)){P(A);return}}const T=f===0?p-1:p,_=f===0?11:f-1,R=U(T,_);L(),setTimeout(()=>{I(R,"backward")},0)}},B=(()=>{const k=U(p,f),h=j(p,f),y=[];for(let T=0;T<h;T++)y.push(null);for(let T=1;T<=k;T++){const _=new Date(p,f,T);y.push(_)}return y})(),J=[];let K=[];B.forEach((k,h)=>{if(K.push(k),K.length===7||h===B.length-1){for(;K.length<7;)K.push(null);J.push(K),K=[]}}),$.useEffect(()=>{var k;if(m!==null){const h=B.findIndex(y=>y!==null&&y.getDate()===m);h!==-1&&w.current[h]&&((k=w.current[h])==null||k.focus())}},[f,p,m,B]);const z={label:"smp-datepickercalendar-label",wrapper:`smp-datepickercalendar ${Xn["smp-datepickercalendar-position"]}`,calendar:"smp-datepickercalendar",table:"smp-datepickercalendar-table",th:"smp-datepickercalendar-th",td:(k,h,y,T)=>`smp-datepickercalendar-td
46
+ ${k?"smp-datepickercalendar-td-today":""}
47
+ ${h?"smp-datepickercalendar-td-selected":""}
57
48
  ${y?"smp-datepickercalendar-td-focused":""}
58
- ${C?"smp-datepickercalendar-td-disabled":""}`},Q=()=>`${R[f]} ${d.toString()}`;return S.jsxs("div",{className:q.wrapper,ref:s,role:"dialog",tabIndex:-1,"aria-modal":"true","data-component":"datepicker-calendar",children:[S.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[S.jsx(We,{onClick:A,ariaLabel:a(Ot.PREVIOUS_MONTH),bindValue:"<",appearance:"ghost",variant:"base"}),S.jsx("div",{"aria-label":Q(),className:q.label,children:Q()}),S.jsx(We,{onClick:N,ariaLabel:a(Ot.NEXT_MONTH),bindValue:">",appearance:"ghost",variant:"base"})]}),S.jsxs("table",{ref:x,role:"grid","aria-label":`${a(At.CALENDAR_FOR)} ${R[f]} ${d}`,className:q.table,children:[S.jsx("thead",{children:S.jsx("tr",{children:w.map(L=>S.jsx("th",{scope:"col",abbr:L.full,className:q.th,children:L.value},L.value))})}),S.jsx("tbody",{children:oe.map((L,v)=>S.jsx("tr",{children:L.map((y,C)=>{const $=v*7+C;if(y===null)return S.jsx("td",{className:q.td(!1,!1,!1,!0)},`empty-${C}`);const O=y.getDate()===o.getDate()&&y.getMonth()===o.getMonth()&&y.getFullYear()===o.getFullYear(),P=l&&y.getDate()===l.getDate()&&y.getMonth()===l.getMonth()&&y.getFullYear()===l.getFullYear(),I=h===y.getDate(),V=E(y);return S.jsx("td",{role:"gridcell","aria-selected":P,tabIndex:I?0:-1,onClick:()=>b(y),onKeyDown:K=>F(K,$),"aria-label":`${y.getDate()} ${R[y.getMonth()]} ${y.getFullYear()}`,"data-selected":P,"aria-disabled":V,ref:K=>{T.current[$]=K},className:q.td(O,P,I,V),children:y.getDate()},`day-${C}`)})},`week-${v}`))})]})]})}const jr=({bindValue:r,placeholder:e,onChange:t,disabledDateRanges:n,...s})=>{const[a,i]=k.useState(!1),[o,l]=k.useState(r||""),[c,f]=k.useState(""),{anchorRef:u,targetRef:d}=Ct({position:"bottom",enabled:a});st(d,()=>{i(!1)}),st(u,()=>{if(typeof u=="object"&&u!==null&&"current"in u){const A=u.current.querySelector("input");A&&A===document.activeElement&&T()}}),Cr(a,d);const{format:g,getCurrentLanguage:h}=ft(),m=k.useCallback(A=>{const N=A.length>5&&Hr(A,h())||A,W=g(N,void 0,void 0,{type:"date"}),M=typeof N!="string",j=M&&N.toISOString().substring(0,10)||"";return{isValid:M,formattedDate:W,isoDate:j,normalizedDate:N}},[h,g]);k.useEffect(()=>{const{formattedDate:A,isoDate:N,isValid:W}=m(r);l(W&&N||r),f(W&&A||r)},[r,g,m]);const x=()=>i(A=>!A),T=()=>{w(c)},R=A=>{w(A),i(!1)},w=A=>{const{isoDate:N,isValid:W}=m(A);t&&t(W&&N||A)},E=A=>{f(A)},b=A=>{A.key==="Enter"&&(A.preventDefault(),w(c))};return S.jsxs("div",{"data-component":"date-picker",children:[S.jsx(Pe,{bindValue:c,placeholder:e,onBlur:T,onChange:E,onKeyDown:b,shapeIcon:"calendar",onShapeIconClick:x,ref:u,...s}),a&&S.jsx(rs,{disabledDateRanges:n,onDateChange:R,initialValue:Rt(o)&&o||"",targetRef:d})]})},ns=({elements:r,displayMode:e,minimumChars:t,listDisplayMode:n,placeholder:s,fun:a,onOptionsRequest:i,onChange:o})=>{const l=r.map(u=>u.bindValue),c=(u,d)=>{const g=[...r];if(u=="")g.pop();else{const h=g.findIndex(m=>m.bindValue===u&&m.optionalDisplayValue===d);h>=0?g.splice(h,1):g.push({bindValue:u,optionalDisplayValue:d})}o==null||o(g)},f={container:"smp-multipleAutocomplete-container"};return S.jsxs("div",{className:f.container,"data-component":"multiple-autocomplete",children:[S.jsx(Rr,{elements:r,displayMode:e,isEditable:!0,onChange:u=>{o==null||o(u)}}),S.jsx($t,{bindValue:"",fun:a,onChange:c,_changeOnEnter:!0,listDisplayMode:n,minimumChars:t,placeholder:s,onOptionsRequest:i,_multiActiveIndex:l})]})},Pr=({...r})=>{const[e,t]=k.useState(!1),n=e?"visibility-off":"visibility";return S.jsx(Pe,{...r,inputType:e?"text":"password",shapeIcon:n,onShapeIconClick:()=>t(!e),ariaLabel:"password","data-component":"password"})},ss=({...r})=>{const[e,t]=k.useState(r.bindValue),{translate:n}=ft(),s=a=>{var i;a.key==="Enter"&&(a.preventDefault(),(i=r.onEnter)==null||i.call(r,e))};return S.jsx(Pe,{...r,placeholder:r.placeholder?r.placeholder:n(At.SPOTLIGHT_DEFAULT_PLACEHOLDER),icon:"magnify",inputType:"search",bindValue:e,onChange:t,onKeyDown:s,ariaLabel:"search bar",_dataComponent:"search-bar"})};class je{constructor(e,t){Ae(this,"class");Ae(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new je(e,e.k.split(";"))}static fromString(e){return new je({t:"",p:""},e.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const tt=(r,e,t)=>({obj:{t:r.obj.t,p:r.obj.p,k:e},decode:t||r.decode,shape:r.shape}),gr=r=>{const e=je.fromDataObj(r.obj),t=r.decode?je.fromString(r.decode).getValue():[];return e.getValue().map((n,s)=>({bindValue:n,optionalDisplayValue:t.length>=s?t[s]:""}))},as=(r,e)=>{const t=new je(r.obj,e.map(s=>s.bindValue)).getLegacyValue(),n=new je(r.obj,e.map(s=>s.optionalDisplayValue?s.optionalDisplayValue:"")).getLegacyValue();return tt(r,t,n)},Lr=({decode:r,shape:e,obj:t,data:n,icon:s,fun:a,placeholderIcon:i,label:o,onChange:l,onClick:c,onEnter:f,onBlur:u,onOptionsRequest:d,isEditable:g})=>{const h={obj:t,shape:e,decode:r},m={onBlur:u,onOptionsRequest:d,fun:a,icon:s,label:o,isEditable:g,...n},x=(w,E)=>Ur(t)?tt(h,new nt(t,w).getLegacyValue()):tt(h,w,E),T=w=>tt(h,new rt(t,w).getLegacyValue()),R=w=>as(h,w);switch(e){case ye.AUTOCOMPLETE:{const w={...m,bindValue:t.k,optionalDisplayValue:r,onChange:(E,b)=>{l==null||l(x(E,b))}};return S.jsx($t,{...w})}case ye.BUTTON:{const w={...m,bindValue:t.k,optionalDisplayValue:r,onClick:()=>{c==null||c(x(t.k))}};return S.jsx(We,{...w})}case ye.COMBOBOX:{const w={...m,bindValue:t.k,optionalDisplayValue:r,onChange:(E,b)=>{l==null||l(x(E,b))}};return S.jsx(Dr,{...w})}case ye.CHECKBOX:{const w={...m,bindValue:rt.fromDataObj(t).getValue(),optionalDisplayValue:r,onChange:E=>{l==null||l(T(E))}};return S.jsx(Or,{...w})}case ye.CHIP:{const w={...m,elements:gr(h)};return S.jsx(Rr,{...w})}case ye.DATE:{const w={...m,bindValue:nt.fromDataObj(t).getValue(),onChange:E=>{l==null||l(x(E))}};return S.jsx(jr,{...w})}case ye.ICON:case ye.IMAGE:{const w={...m,icon:s,placeholderIcon:i,isInteractable:!!m.fun,onClick:()=>{c==null||c(x(t.k))}};return S.jsx(be,{...w})}case ye.MULTI_AUTOCOMPLETE:{const w={...m,elements:gr(h),onChange:E=>{l==null||l(R(E))}};return S.jsx(ns,{...w})}case ye.PASSWORD:{const w={...m,bindValue:t.k,onChange:E=>{l==null||l(x(E))}};return S.jsx(Pr,{...w})}case ye.SPOTLIGHT:{const w={...m,bindValue:t.k,onEnter:E=>{f==null||f(x(E))}};return S.jsx(ss,{...w})}case ye.TEXT_FIELD:case void 0:{const w={...m,bindValue:t.k,onChange:E=>{l==null||l(x(E))}};return S.jsx(Pe,{...w})}}},is=(r,e)=>{const t=[];for(let n=0;n<r.length;n+=e)t.push(r.slice(n,n+e));return t},kr=(r,e)=>r.map(t=>{var a,i;if((a=t.sections)!=null&&a.length)return{...t,sections:kr(t.sections,e),content:t.content};let n=t.sections,s=t.content;return(i=t.content)!=null&&i.length&&t.columns&&+t.columns>1&&(n=is(t.content.filter(l=>!!e[l.id]),+t.columns).map((l,c)=>({...t,id:`${t.id}-${c}`,content:l,gridCols:t.columns,horizontal:!0})),s=[]),{...t,sections:n,content:s}}),mr=(r,e)=>{if(!e)return{};const t=r.some(n=>n.dim)?r.map(n=>n.dim||"auto").join(" "):`repeat(${r.length}, 1fr)`;return{[e]:t}},yr=r=>r.some(e=>e.dim&&!e.dim.endsWith("%")),xe={"smp-layout":"_smp-layout_xrjwg_1","smp-layout-horizontal":"_smp-layout-horizontal_xrjwg_9","smp-layout-vertical":"_smp-layout-vertical_xrjwg_13","smp-layout-section-grid":"_smp-layout-section-grid_xrjwg_18","smp-layout-section-vertical":"_smp-layout-section-vertical_xrjwg_20","smp-layout-section-horizontal":"_smp-layout-section-horizontal_xrjwg_24","smp-layout-section-flex":"_smp-layout-section-flex_xrjwg_29","smp-layout-cell-container":"_smp-layout-cell-container_xrjwg_34","smp-grid-template-cols":"_smp-grid-template-cols_xrjwg_44","smp-grid-template-rows":"_smp-grid-template-rows_xrjwg_48","smp-layout-section-with-title":"_smp-layout-section-with-title_xrjwg_52","smp-layout-section-title":"_smp-layout-section-title_xrjwg_58"},Nr=({layout:r,cells:e})=>{var u;if(!((u=r.sections)!=null&&u.length))return S.jsx(S.Fragment,{});const t="--smp-grid-template-cols",n="--smp-grid-template-rows",s=kr(r.sections,e),a=d=>d==null?void 0:d.reduce((g,h)=>{var w,E;let m="",x={},T={},R="";return(w=h.sections)!=null&&w.length?(m=xe["smp-layout-section-grid"],x=a(h.sections),h.gridCols==null&&(R=`${xe[h.horizontal?"smp-grid-template-cols":"smp-grid-template-rows"]}`,(h.horizontal||yr(h.sections))&&(T=mr(h.sections,h.horizontal?t:n)))):(E=h.content)!=null&&E.length&&(h.gridCols!==void 0&&h.gridCols>0?(m=xe["smp-layout-section-grid"],R=`${xe["smp-grid-template-cols"]}`,T={[t]:`repeat(${h.gridCols}, 1fr)`}):m=xe["smp-layout-section-flex"]),{...g,...x,[h.id]:{classes:`${m} ${xe[h.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${R} ${h.hdsp?`smp-justifyContent-${h.hdsp}`:""} ${h.vdsp?`smp-alignItems-${h.vdsp}`:""}`,styles:T}}},{}),i=a(s),o={container:`${xe["smp-layout"]} ${r.horizontal?xe["smp-layout-horizontal"]:xe["smp-layout-vertical"]}`,sections:i},l=r.horizontal||yr(r.sections)?mr(s,r.horizontal?t:n):{},c=d=>{var h;const g=S.jsx("div",{"smp-id":"section-"+d.id,className:o.sections[d.id].classes,style:o.sections[d.id].styles,children:(h=d.sections)!=null&&h.length?d.sections.map(m=>c(m)):d.content.map(m=>f(m,e[m.id],d.hdsp,d.vdsp))},"section-"+d.id);return d.title?S.jsxs("div",{className:`${xe["smp-layout-section-with-title"]}`,children:[S.jsx("span",{className:`${xe["smp-layout-section-title"]} ${d.hdsp?`smp-justifyContent-${d.hdsp}`:""} ${d.vdsp?`smp-alignItems-${d.vdsp}`:""}`,children:S.jsx(vr,{label:d.title})}),g]}):g},f=(d,g,h,m)=>{const x=d.colSpan!==void 0?d.colSpan>0?d.colSpan:d.colStart!==void 0&&d.colStart<1?1:null:null,T=x!==null?`span ${x}`:d.colStart,R=d.colEnd!==void 0&&d.colEnd>0?d.colEnd:"",w={gridColumnStart:T,gridColumnEnd:R},E=`${xe["smp-layout-cell-container"]} ${h?`smp-justifyContent-${h}`:""} ${m?`smp-alignItems-${m}`:""}`;return g?S.jsx("div",{className:E,style:{...w},"smp-id":d.id,children:S.jsx(Lr,{...g})},d.id):S.jsx(S.Fragment,{})};return S.jsx("div",{className:o.container,style:l,"smp-id":"layout",children:s==null?void 0:s.map(d=>c(d))})},os=({data:r,onClick:e,onEnter:t})=>{var i,o;const[n,s]=k.useState(),a=k.useCallback(l=>{var f,u;if(!((f=l.rows)!=null&&f.length)||!((u=l.columns)!=null&&u.length))return{};const c=l.rows[0];return l.columns.filter(d=>d.visible).reduce((d,g)=>{const h=c.cells[g.name],m={...h,onChange:x=>{s(T=>T&&{...T,[g.name]:{...T[g.name],obj:{...T[g.name].obj,k:x.obj.k}}})},onClick:()=>{h.fun&&e&&e({...h})},onEnter:x=>{t&&t(x)}};return{...d,[g.name]:m}},{})},[e,t]);return k.useEffect(()=>{s(a(r))},[r,a]),!((i=r==null?void 0:r.rows)!=null&&i.length)||!((o=r.columns)!=null&&o.length)?null:n&&S.jsx("header",{className:"smp-appbar","aria-label":"App Bar",children:S.jsx(Nr,{layout:r.rows[0].layout,cells:n})})},Ue=r=>r==null?!1:typeof r=="string"?r.toLocaleLowerCase()=="yes":r,ls=({ColumnsNumber:r=1,data:e={},ForceText:t,TextColName:n,TextColor:s="var(--smp-dashList-color-base)",Fillspace:a,FontSize:i,Horizontal:o,ForceIcon:l,IconColName:c,IconColor:f="var(--smp-dashList-color-base)",NumberFormat:u,ForceUM:d,UmColName:g,UmColor:h="var(--smp-dashList-color-base)",ForceValue:m,ValueColName:x,ValueColor:T="var(--smp-dashList-color-base)",SelectLayout:R="1",onClick:w})=>{const E="N/A",b=(e==null?void 0:e.columns)||[],A=(e==null?void 0:e.rows)||[],N=A.length>0,W="--smp-dashList-color",M="smp-layout",j="descr",F="icon",H="um",X="value",B=i||"1em",oe="18px",ee="--smp-dashList-columns",q="--smp-dashList-fontSize",Q={dash:(_="1")=>{const J=v(_),ne=J,ie=y(J,j),pe=y(J,F),Se=y(J,H),me=y(J,X);return{container:ne,descr:ie,icon:pe,um:Se,value:me}},dashList:`smp-dash-list ${Ue(a)?"smp-dash-list-fill-space":""}
59
- ${Ue(o)?"smp-dash-list-horizontal":""}`},{format:L}=ft(),v=_=>`${M}-${_}`,y=(_,J)=>`${_}__${J}`,C=_=>`${W}-${_}`,$=_=>{const J=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(J.test(_)){const ie=_.match(J)||[];if((ie==null?void 0:ie.length)>3)return"rgb("+ie[1]+","+ie[2]+","+ie[3]+")"}return _},O=_=>{if(!u)return _;const[J,ne]=P(u).map(Te=>parseInt(Te||"0")),ie="0,0"+(ne?"."+"0".repeat(ne):""),pe=L(_,ie,"it");if(!J)return pe;const[Se,me]=pe.split(",");return Se+(me?`,${me}`:"")},P=_=>_.includes(";")?_.split(";"):[_],I=_=>{const J=ie=>{var pe;if(ie)return(pe=_==null?void 0:_.cells[ie])==null?void 0:pe.obj.k},ne=ie=>{var pe,Se;if(!(b.length<=ie))return(Se=(pe=_==null?void 0:_.cells[b[ie].name])==null?void 0:pe.obj)==null?void 0:Se.k};return{descr:t||J(n)||ne(2)||"",icon:l||J(c)||ne(3)||"",um:d||J(g)||ne(1)||"",value:m||J(x)||ne(0)||""}},V=_=>{w==null||w(_)},K=(_,J)=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),_.stopPropagation(),V(J))},G=(_=>{const J=Q.dash(_);return{className:J,descr:ne=>S.jsx("div",{className:J.descr,children:ne},`${_}-${j}`),icon:ne=>S.jsx("div",{className:J.icon,children:S.jsx(be,{color:f,height:oe,icon:ne,width:oe})},`${_}-${F}`),um:ne=>S.jsx("div",{className:J.um,children:ne},`${_}-${H}`),value:ne=>S.jsx("div",{className:J.value,children:ne},`${_}-${X}`)}})(R),le=_=>{const{descr:J,icon:ne,um:ie,value:pe}=I(_),Se={[C(j)]:$(s),[C(H)]:$(h),[C(X)]:$(T)},me=[],Te=O(pe);switch(R){case"2":ne&&me.push(G.icon(ne)),me.push(G.descr(J)),me.push(G.value(ie?Te+" "+ie:Te));break;default:case"1":me.push(G.descr(J)),me.push(G.value(ie?Te+" "+ie:Te))}return S.jsx("div",{className:G.className.container,role:"button",style:Se,tabIndex:0,onClick:()=>V(_),onKeyDown:p=>K(p,_),children:me},_.rowId)},D={[ee]:String(r),[q]:B};return S.jsx("div",{className:Q.dashList,style:D,children:N?A.map(_=>le(_)):E})},cs=({data:r,logo:e,open:t,minifiedOnClose:n=!0,customHeight:s="100vh",onClick:a,onEnter:i,onClose:o})=>{var R,w;const[l,c]=k.useState(),[f,u]=k.useState(t??!0),d=k.useRef(null),g=s.trim()?s:"100vh",h=k.useCallback(E=>{var A,N;if(!((A=E.rows)!=null&&A.length)||!((N=E.columns)!=null&&N.length))return{};const b=E.rows[0];return E.columns.filter(W=>W.visible).reduce((W,M)=>{const j=b.cells[M.name];if(!f&&n&&j.shape!==ye.BUTTON)return W;const F={...j,onChange:H=>{c(X=>{const B={...X};return B!=null&&B[M.name]&&(B[M.name].obj.k=H.obj.k),B})},onClick:()=>{j.fun&&a&&a({...j})},onEnter:H=>{i&&i(H)}};return!f&&n&&(F.data={...F.data,showText:!1}),{...W,[M.name]:F}},{})},[a,i,f,n]),m=k.useCallback(()=>{o==null||o()},[o]),x=()=>{n?u(E=>!E):(u(!1),o==null||o())};if(k.useEffect(()=>{c(h(r))},[r]),k.useEffect(()=>{if(!d.current)return;if(!n){c(h(r));return}const E=getComputedStyle(d.current).getPropertyValue("--smp-drawer-slide-transition");let b=Number(E);E.endsWith("ms")?b=parseFloat(E):E.endsWith("s")&&(b=parseFloat(E)*1e3),setTimeout(()=>{c(h(r))},b/2)},[f,n]),k.useEffect(()=>{t!==void 0&&!n&&u(t)},[n,t]),!((R=r==null?void 0:r.rows)!=null&&R.length)||!((w=r.columns)!=null&&w.length))return null;const T={drawer:`smp-drawer ${n?"smp-drawer-minified":"smp-drawer-fixed"} ${f?"smp-drawer-open":""}`,container:"smp-drawer-container",containerHeader:"smp-drawer-container-header",containerIcon:`${f?"":"smp-drawer-container-icon-close"} smp-drawer-container-icon`,containerLayout:"smp-drawer-container-layout",containerLogo:"smp-drawer-container-logo",backdrop:`smp-drawer-backdrop ${f?"smp-drawer-backdrop-open":""}`};return l&&S.jsxs(S.Fragment,{children:[!n&&S.jsx("div",{"aria-hidden":"true","aria-label":"drawer-backdrop",className:T.backdrop,onClick:m}),S.jsx("aside",{ref:d,className:T.drawer,style:{height:g},"aria-label":"Drawer","smp-id":"drawer",children:S.jsxs("div",{className:T.container,children:[S.jsxs("div",{className:T.containerHeader,children:[e&&S.jsx("div",{className:T.containerLogo,children:S.jsx(be,{icon:e,title:"drawer_logo",width:"100%",height:24})}),S.jsx("div",{className:T.containerIcon,children:S.jsx(be,{icon:n?"menu_close":"close",title:"drawer_icon",rotated:!f,isInteractable:!0,onClick:x,width:20,height:20})})]}),S.jsx("div",{className:T.containerLayout,children:S.jsx(Nr,{layout:r.rows[0].layout,cells:l})})]})})]})},us=({data:r,Type:e,ShowSubmit:t=!1,SubmitPosition:n="Right",DefaultValue:s,Label:a,LabelPosition:i="Left",onBlur:o,onClick:l,onOptionsRequest:c})=>{const[f,u]=k.useState();k.useEffect(()=>{u(()=>{const m={...r};return e&&(m.shape=e),s&&(m.obj=Wr(s)),m})},[r,s,e]);const g={container:`smp-field-container ${Ue(t)?`smp-field-position-${n}`:""}`},h=()=>{Ue(t)||o==null||o(f)};if(f)return S.jsxs("div",{className:g.container,children:[S.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",font:"var(--smp-fontLabel-base)"},children:S.jsx(Lr,{...f,onChange:u,onOptionsRequest:c,fun:r.fun,onBlur:h,label:a,labelPosition:i})}),Ue(t)&&S.jsx(We,{bindValue:"Confirm",onClick:()=>l==null?void 0:l(f)})]})};exports.AppBar=os;exports.Autocomplete=$t;exports.Button=We;exports.Checkbox=Or;exports.Combobox=Dr;exports.DashList=ls;exports.DatePicker=jr;exports.Drawer=cs;exports.Field=us;exports.Icon=be;exports.Password=Pr;exports.Textfield=Pe;exports.configurePaths=yn;
49
+ ${T?"smp-datepickercalendar-td-disabled":""}`},H=()=>`${E[f]} ${p.toString()}`;return v.jsxs("div",{className:z.wrapper,ref:s,role:"dialog",tabIndex:-1,"aria-modal":"true","data-component":"datepicker-calendar",children:[v.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[v.jsx(Se,{onClick:L,ariaLabel:a(yt.PREVIOUS_MONTH),optionalDisplayValue:"<",appearance:"ghost",variant:"base",bindValue:"<"}),v.jsx("div",{"aria-label":H(),className:z.label,children:H()}),v.jsx(Se,{onClick:C,ariaLabel:a(yt.NEXT_MONTH),bindValue:">",optionalDisplayValue:">",appearance:"ghost",variant:"base"})]}),v.jsxs("table",{ref:x,role:"grid","aria-label":`${a(Tt.CALENDAR_FOR)} ${E[f]} ${p}`,className:z.table,children:[v.jsx("thead",{children:v.jsx("tr",{children:O.map(k=>v.jsx("th",{scope:"col",abbr:k.full,className:z.th,children:k.value},k.value))})}),v.jsx("tbody",{children:J.map((k,h)=>v.jsx("tr",{children:k.map((y,T)=>{const _=h*7+T;if(y===null)return v.jsx("td",{className:z.td(!1,!1,!1,!0)},`empty-${T}`);const R=y.getDate()===o.getDate()&&y.getMonth()===o.getMonth()&&y.getFullYear()===o.getFullYear(),A=u&&y.getDate()===u.getDate()&&y.getMonth()===u.getMonth()&&y.getFullYear()===u.getFullYear(),F=m===y.getDate(),V=S(y);return v.jsx("td",{role:"gridcell","aria-selected":A,tabIndex:F?0:-1,onClick:()=>b(y),onKeyDown:M=>D(M,_),"aria-label":`${y.getDate()} ${E[y.getMonth()]} ${y.getFullYear()}`,"data-selected":A,"aria-disabled":V,ref:M=>{w.current[_]=M},className:z.td(R,A,F,V),children:y.getDate()},`day-${T}`)})},`week-${h}`))})]})]})}const Dr=({bindValue:r,placeholder:e,onChange:t,disabledDateRanges:n,isEditable:s=!0,...a})=>{const[i,o]=$.useState(!1),[u,c]=$.useState(r||""),[f,l]=$.useState(""),{anchorRef:p,targetRef:d}=bt({position:"bottom",enabled:i});ze(d,()=>{o(!1)}),ze(p,()=>{if(typeof p=="object"&&p!==null&&"current"in p){const C=p.current.querySelector("input");C&&C===document.activeElement&&E()}}),Tr(i,d);const{format:m,getCurrentLanguage:g}=rt(),x=$.useCallback(C=>{const U=C.length>5&&Ur(C,g())||C,j=m(U,void 0,void 0,{type:"date"}),P=typeof U!="string",D=P&&U.toISOString().substring(0,10)||"";return{isValid:P,formattedDate:j,isoDate:D,normalizedDate:U}},[g,m]);$.useEffect(()=>{const{formattedDate:C,isoDate:U,isValid:j}=x(r);c(j&&U||r),l(j&&C||r)},[r,m,x]);const w=()=>o(C=>!C),E=()=>{S(f)},O=C=>{S(C),o(!1)},S=C=>{const{isoDate:U,isValid:j}=x(C);t&&t(j&&U||C)},b=C=>{l(C)},L=C=>{C.key==="Enter"&&(C.preventDefault(),S(f))};return v.jsxs("div",{"data-component":"date-picker",children:[v.jsx(Ee,{bindValue:f,placeholder:e,onBlur:E,onChange:b,onKeyDown:L,shapeIcon:"calendar",onShapeIconClick:w,ref:p,isEditable:s,...a}),i&&v.jsx(St,{children:v.jsx(Zn,{disabledDateRanges:n,onDateChange:O,initialValue:vt(u)&&u||"",targetRef:d})})]})},Qn=({elements:r,displayMode:e,minimumChars:t,listDisplayMode:n,isEditable:s=!0,placeholder:a,label:i,disabled:o,fun:u,onOptionsRequest:c,onChange:f})=>{const l=r.map(m=>m.bindValue),p=(m,g)=>{const x=[...r];if(m=="")x.pop();else{const w=x.findIndex(E=>E.bindValue===m&&E.optionalDisplayValue===g);w>=0?x.splice(w,1):x.push({bindValue:m,optionalDisplayValue:g})}f==null||f(x)},d={container:"smp-multipleAutocomplete-container"};return v.jsxs("div",{className:d.container,"data-component":"multiple-autocomplete",children:[i&&v.jsx(De,{label:i,disabled:o}),v.jsx(Et,{elements:r,displayMode:e,isEditable:s,onChange:m=>{f==null||f(m)}}),v.jsx(wt,{bindValue:"",fun:u,isEditable:s,onChange:p,_changeOnEnter:!0,listDisplayMode:n,minimumChars:t,placeholder:a,onOptionsRequest:c,_multiActiveIndex:l})]})},_r=({...r})=>{const[e,t]=$.useState(!1),n=e?"visibility-off":"visibility";return v.jsx(Ee,{...r,inputType:e?"text":"password",shapeIcon:n,onShapeIconClick:()=>t(!e),ariaLabel:"password","data-component":"password"})},es=({...r})=>{const[e,t]=$.useState(r.bindValue),{translate:n}=rt(),s=a=>{var i;a.key==="Enter"&&(a.preventDefault(),(i=r.onEnter)==null||i.call(r,e))};return v.jsx(Ee,{...r,placeholder:r.placeholder?r.placeholder:n(Tt.SPOTLIGHT_DEFAULT_PLACEHOLDER),icon:"magnify",inputType:"search",bindValue:e,onChange:t,onKeyDown:s,ariaLabel:"search bar",_dataComponent:"search-bar"})},ts=({bindValue:r,optionalDisplayValue:e,label:t})=>{const n={wrapper:"smp-text-wrapper"};return t?v.jsxs("div",{className:n.wrapper,children:[v.jsx(De,{label:t}),v.jsx(Ae,{variant:"body",bindValue:e||r})]}):v.jsx(Ae,{variant:"body",bindValue:e||r})};class we{constructor(e,t){be(this,"class");be(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new we(e,e.k==""?[]:e.k.split(";"))}static fromString(e){return new we({t:"",p:""},e.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const Be=(r,e,t)=>({obj:{t:r.obj.t,p:r.obj.p,k:e},decode:t??r.decode,shape:r.shape,fun:r.fun}),fr=r=>{const e=we.fromDataObj(r.obj),t=r.decode?we.fromString(r.decode).getValue():[];return e.getValue().map((n,s)=>({bindValue:n,optionalDisplayValue:t.length>=s?t[s]:""}))},rs=(r,e)=>{const t=new we(r.obj,e.map(s=>s.bindValue)).getLegacyValue(),n=new we(r.obj,e.map(s=>s.optionalDisplayValue?s.optionalDisplayValue:"")).getLegacyValue();return Be(r,t,n)},ns=({disabled:r,bindValue:e,onChange:t,placeholder:n,state:s,appearance:a,isEditable:i,label:o,ariaLabel:u,helperText:c,error:f,onBlur:l,onKeyDown:p})=>{const d=$.useId(),m=`${d}-helper`,g=f?"danger":s,x=c||!!f,w=O=>{t==null||t(O.target.value)},E={wrapper:"smp-textarea-wrapper",container:`smp-textarea ${r?"smp-textarea-disabled":""} ${n?"smp-textarea-placeholder":""} ${g?`smp-textarea-${g}`:""} ${a?`smp-textarea-${a}`:""} ${i?"":"smp-textarea-readOnly"}`};return v.jsxs("div",{className:E.wrapper,"data-component":"textarea",children:[o&&v.jsx(De,{htmlFor:d,label:o,disabled:r}),v.jsx("textarea",{id:d,value:e,placeholder:n,onChange:w,onBlur:l,className:E.container,disabled:r,readOnly:!i,onKeyDown:p,"aria-label":o?void 0:u,"aria-labelledby":o?d:void 0,"aria-describedby":x?m:void 0}),x&&v.jsx(hr,{id:m,helperText:f,disabled:r,state:g})]})},Ot=({decode:r,shape:e,obj:t,data:n,icon:s,fun:a,placeholderIcon:i,label:o,options:u,onChange:c,onClick:f,onEnter:l,onBlur:p,onOptionsRequest:d,isEditable:m})=>{const g={obj:t,shape:e,decode:r,icon:s,fun:a},x={onBlur:p,onOptionsRequest:d,fun:a,icon:s,label:o,isEditable:m,...n},w=(S,b,L)=>Vr(t)?Be(S,new Ke(t,b).getLegacyValue()):Be(S,b,L),E=S=>Be(g,new qe(t,S).getLegacyValue()),O=S=>rs(g,S);switch(e){case ne.AUTOCOMPLETE:{const S={...x,bindValue:t.k,optionalDisplayValue:r,onChange:(b,L)=>{c==null||c(w(g,b,L))}};return v.jsx(wt,{...S})}case ne.BUTTON:{const S={...x,bindValue:t.k,optionalDisplayValue:r,onClick:()=>{f==null||f(w(g,t.k))}};return v.jsx(Se,{...S})}case ne.BUTTON_LIST:{const S={...x,options:u,onClick:(b,L)=>{const C={...g,fun:L};f==null||f(w(C,b))}};return v.jsx(wr,{...S})}case ne.COMBOBOX:{const S={...x,bindValue:t.k,optionalDisplayValue:r,onChange:(b,L)=>{c==null||c(w(g,b,L))}};return v.jsx(Or,{...S})}case ne.SWITCH:case ne.CHECKBOX:{const S={...x,bindValue:qe.fromDataObj(t).getValue(),optionalDisplayValue:r,onChange:b=>{c==null||c(E(b))}};return v.jsx(Er,{...S})}case ne.CHIP:{const S={...x,elements:fr(g)};return v.jsx(Et,{...S})}case ne.DATE:{const S={...x,bindValue:Ke.fromDataObj(t).getValue(),onChange:b=>{c==null||c(w(g,b))}};return v.jsx(Dr,{...S})}case ne.ICON:case ne.IMAGE:{const S={...x,icon:s,placeholderIcon:i,isInteractable:!!x.fun,onClick:()=>{f==null||f(w(g,t.k))}};return v.jsx(le,{...S})}case ne.MULTI_AUTOCOMPLETE:{const S={...x,elements:fr(g),onChange:b=>{c==null||c(O(b))}};return v.jsx(Qn,{...S})}case ne.MEMO:{const S={...x,bindValue:t.k,optionalDisplayValue:r,onChange:b=>{c==null||c(w(g,b))}};return v.jsx(ns,{...S})}case ne.PASSWORD:{const S={...x,bindValue:t.k,onChange:b=>{c==null||c(w(g,b))}};return v.jsx(_r,{...S})}case ne.SPOTLIGHT:{const S={...x,bindValue:t.k,onEnter:b=>{l==null||l(w(g,b))}};return v.jsx(es,{...S})}case ne.TEXT_FIELD:{const S={...x,bindValue:t.k,optionalDisplayValue:r,onChange:b=>{c==null||c(w(g,b))}};return v.jsx(Ee,{...S})}default:{const S={...x,bindValue:t.k,optionalDisplayValue:r};return v.jsx(ts,{...S})}}},ss=(r,e)=>{const t=[];for(let n=0;n<r.length;n+=e)t.push(r.slice(n,n+e));return t},Cr=(r,e)=>r.map(t=>{var a,i;if((a=t.sections)!=null&&a.length)return{...t,sections:Cr(t.sections,e),content:t.content};let n=t.sections,s=t.content;return(i=t.content)!=null&&i.length&&t.columns&&+t.columns>1&&(n=ss(t.content.filter(u=>!!e[u.id]),+t.columns).map((u,c)=>({...t,id:`${t.id}-${c}`,content:u,gridCols:t.columns,horizontal:!0})),s=[]),{...t,sections:n,content:s}}),dr=(r,e)=>{if(!e)return{};const t=r.some(n=>n.dim)?r.map(n=>n.dim||"auto").join(" "):`repeat(${r.length}, 1fr)`;return{[e]:t}},pr=r=>r.some(e=>e.dim&&!e.dim.endsWith("%")),de={"smp-layout":"_smp-layout_xrjwg_1","smp-layout-horizontal":"_smp-layout-horizontal_xrjwg_9","smp-layout-vertical":"_smp-layout-vertical_xrjwg_13","smp-layout-section-grid":"_smp-layout-section-grid_xrjwg_18","smp-layout-section-vertical":"_smp-layout-section-vertical_xrjwg_20","smp-layout-section-horizontal":"_smp-layout-section-horizontal_xrjwg_24","smp-layout-section-flex":"_smp-layout-section-flex_xrjwg_29","smp-layout-cell-container":"_smp-layout-cell-container_xrjwg_34","smp-grid-template-cols":"_smp-grid-template-cols_xrjwg_44","smp-grid-template-rows":"_smp-grid-template-rows_xrjwg_48","smp-layout-section-with-title":"_smp-layout-section-with-title_xrjwg_52","smp-layout-section-title":"_smp-layout-section-title_xrjwg_58"},Rt=({cells:r,layout:e={horizontal:!1,sections:[{id:"1",content:Object.keys(r).map(t=>({id:t}))}]}})=>{const t="--smp-grid-template-cols",n="--smp-grid-template-rows",s=Cr(e.sections||[],r),a=l=>l==null?void 0:l.reduce((p,d)=>{var E,O;let m="",g={},x={},w="";return(E=d.sections)!=null&&E.length?(m=de["smp-layout-section-grid"],g=a(d.sections),d.gridCols==null&&(w=`${de[d.horizontal?"smp-grid-template-cols":"smp-grid-template-rows"]}`,(d.horizontal||pr(d.sections))&&(x=dr(d.sections,d.horizontal?t:n)))):(O=d.content)!=null&&O.length&&(d.gridCols!==void 0&&d.gridCols>0?(m=de["smp-layout-section-grid"],w=`${de["smp-grid-template-cols"]}`,x={[t]:`repeat(${d.gridCols}, 1fr)`}):m=de["smp-layout-section-flex"]),{...p,...g,[d.id]:{classes:`${m} ${de[d.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${w} ${d.justify?`smp-justifyContent-${d.justify}`:""} ${d.align?`smp-alignItems-${d.align}`:""}`,styles:x}}},{}),i=a(s),o={container:`${de["smp-layout"]} ${e.horizontal?de["smp-layout-horizontal"]:de["smp-layout-vertical"]}`,sections:i},u=e.horizontal||pr(e.sections||[])?dr(s,e.horizontal?t:n):{},c=l=>{var d;const p=v.jsx("div",{"smp-id":"section-"+l.id,className:o.sections[l.id].classes,style:o.sections[l.id].styles,children:(d=l.sections)!=null&&d.length?l.sections.map(m=>c(m)):l.content.map(m=>f(m,r[m.id],l.justify,l.align))},"section-"+l.id);return l.title?v.jsxs("div",{className:`${de["smp-layout-section-with-title"]}`,children:[v.jsx("span",{className:`${de["smp-layout-section-title"]} ${l.justify?`smp-justifyContent-${l.justify}`:""} ${l.align?`smp-alignItems-${l.align}`:""}`,children:v.jsx(De,{label:l.title})}),p]}):p},f=(l,p,d,m)=>{const g=l.colSpan!==void 0?l.colSpan>0?l.colSpan:l.colStart!==void 0&&l.colStart<1?1:null:null,x=g!==null?`span ${g}`:l.colStart,w=l.colEnd!==void 0&&l.colEnd>0?l.colEnd:"",E={gridColumnStart:x,gridColumnEnd:w},O=`${de["smp-layout-cell-container"]} ${d?`smp-justifyContent-${d}`:""} ${m?`smp-alignItems-${m}`:""}`;return p?v.jsx("div",{className:O,style:{...E},"smp-id":l.id,children:v.jsx(Ot,{...p})},l.id):v.jsx(v.Fragment,{})};return v.jsx("div",{className:o.container,style:u,"smp-id":"layout",children:s==null?void 0:s.map(l=>c(l))})},as=({data:r,onClick:e,onEnter:t})=>{var i,o;const[n,s]=$.useState(),a=$.useCallback(u=>{var f,l;if(!((f=u.rows)!=null&&f.length)||!((l=u.columns)!=null&&l.length))return{};const c=u.rows[0];return u.columns.filter(p=>p.visible).reduce((p,d)=>{const m=c.cells[d.name],g={...m,onChange:x=>{s(w=>w&&{...w,[d.name]:{...w[d.name],obj:{...w[d.name].obj,k:x.obj.k}}})},onClick:()=>{m.fun&&e&&e({...m})},onEnter:x=>{t&&t(x)}};return{...p,[d.name]:g}},{})},[e,t]);return $.useEffect(()=>{r&&s(a(r))},[r,a]),!((i=r==null?void 0:r.rows)!=null&&i.length)||!((o=r.columns)!=null&&o.length)?null:n&&v.jsx("header",{className:"smp-appbar","aria-label":"App Bar",children:v.jsx(Rt,{layout:r.rows[0].layout,cells:n})})},is=r=>{var e;return(e=r.children)!=null&&e.length?r.children.map(t=>{var n,s;return{id:((n=t.obj)==null?void 0:n.k)??"",label:t.decode??t.value??((s=t.obj)==null?void 0:s.k)??"",fun:t.fun,icon:t.icon}}):[]},ce=r=>r==null?!1:typeof r=="string"?r.toLocaleLowerCase()=="yes":r,os=({data:r,logo:e,open:t,minifiedOnClose:n=!0,customHeight:s="100vh",onClick:a,onEnter:i,onClose:o,loadOptions:u})=>{var O,S;const[c,f]=$.useState(),[l,p]=$.useState(t??!0),d=$.useRef(null),m=s.trim()?s:"100vh",g=$.useCallback(b=>{var C,U;if(!((C=b==null?void 0:b.rows)!=null&&C.length)||!((U=b==null?void 0:b.columns)!=null&&U.length))return{};const L=b.rows[0];return b.columns.filter(j=>j.visible??!0).reduce((j,P)=>{const D=L.cells[P.name];if(!D||!l&&ce(n)&&D.shape!==ne.BUTTON&&D.shape!==ne.BUTTON_LIST)return j;const I={...D,onChange:W=>{f(B=>{const J={...B};return J!=null&&J[P.name]&&(J[P.name].obj.k=W.obj.k),J})},onClick:W=>{W.fun&&a&&a(W)},onEnter:W=>{i&&i(W)}};return u&&D.shape==ne.BUTTON_LIST&&(I.onOptionsRequest=(W,B)=>u(W,B).then(J=>is(J))),!l&&ce(n)&&(I.data={...I.data,showText:!1,justify:"center"}),{...j,[P.name]:I}},{})},[l,n,a,i,u]),x=$.useCallback(()=>{o==null||o()},[o]),w=()=>{ce(n)?p(b=>!b):(p(!1),o==null||o())};if($.useEffect(()=>{f(g(r))},[r]),$.useEffect(()=>{if(!d.current)return;if(!ce(n)){f(g(r));return}const b=getComputedStyle(d.current).getPropertyValue("--smp-drawer-slide-transition");let L=Number(b);b.endsWith("ms")?L=parseFloat(b):b.endsWith("s")&&(L=parseFloat(b)*1e3),setTimeout(()=>{f(g(r))},L/2)},[l,n]),$.useEffect(()=>{t!==void 0&&!ce(n)&&p(t)},[n,t]),!((O=r==null?void 0:r.rows)!=null&&O.length)||!((S=r.columns)!=null&&S.length))return null;const E={drawer:`smp-drawer ${ce(n)?"smp-drawer-minified":"smp-drawer-fixed"} ${l?"smp-drawer-open":""} ${!ce(n)&&!l?"smp-drawer-no-border":""}`,container:"smp-drawer-container",containerHeader:"smp-drawer-container-header",containerIcon:`${l?"":"smp-drawer-container-icon-close"} smp-drawer-container-icon`,containerLayout:"smp-drawer-container-layout",containerLogo:"smp-drawer-container-logo",backdrop:`smp-drawer-backdrop ${l?"smp-drawer-backdrop-open":""}`};return c&&v.jsxs(v.Fragment,{children:[!ce(n)&&v.jsx("div",{"aria-hidden":"true","aria-label":"drawer-backdrop",className:E.backdrop,onClick:x}),v.jsx("aside",{ref:d,className:E.drawer,style:{height:m},"aria-label":"Drawer","smp-id":"drawer",children:v.jsxs("div",{className:E.container,children:[v.jsxs("div",{className:E.containerHeader,children:[e&&v.jsx("div",{className:E.containerLogo,children:v.jsx(le,{icon:e,title:"drawer_logo",width:"100%",height:24})}),v.jsx("div",{className:E.containerIcon,children:v.jsx(le,{icon:ce(n)?"menu_close":"close",title:"drawer_icon",rotated:!l,isInteractable:!0,onClick:w,width:20,height:20})})]}),v.jsx("div",{className:E.containerLayout,children:v.jsx(Rt,{layout:r.rows[0].layout,cells:c})})]})})]})},ls=({ColumnsNumber:r=1,data:e={},ForceText:t,TextColName:n,TextColor:s="var(--smp-dashList-color-base)",Fillspace:a,FontSize:i,Horizontal:o,ForceIcon:u,IconColName:c,IconColor:f="var(--smp-dashList-color-base)",NumberFormat:l,ForceUM:p,UmColName:d,UmColor:m="var(--smp-dashList-color-base)",ForceValue:g,ValueColName:x,ValueColor:w="var(--smp-dashList-color-base)",SelectLayout:E="1",onClick:O})=>{const S="N/A",b=(e==null?void 0:e.columns)||[],L=(e==null?void 0:e.rows)||[],C=L.length>0,U="--smp-dashList-color",j="smp-layout",P="descr",D="icon",I="um",W="value",B=i||"1em",J="18px",K="--smp-dashList-columns",z="--smp-dashList-fontSize",H={dash:(Y="1")=>{const Z=h(Y),te=Z,re=y(Z,P),fe=y(Z,D),ye=y(Z,I),pe=y(Z,W);return{container:te,descr:re,icon:fe,um:ye,value:pe}},dashList:`smp-dash-list ${ce(a)?"smp-dash-list-fill-space":""}
50
+ ${ce(o)?"smp-dash-list-horizontal":""}`},{format:k}=rt(),h=Y=>`${j}-${Y}`,y=(Y,Z)=>`${Y}__${Z}`,T=Y=>`${U}-${Y}`,_=Y=>{const Z=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(Z.test(Y)){const re=Y.match(Z)||[];if((re==null?void 0:re.length)>3)return"rgb("+re[1]+","+re[2]+","+re[3]+")"}return Y},R=Y=>{if(!l)return Y;const[Z,te]=A(l).map(Te=>parseInt(Te||"0")),re="0,0"+(te?"."+"0".repeat(te):""),fe=k(Y,re,"it");if(!Z)return fe;const[ye,pe]=fe.split(",");return ye+(pe?`,${pe}`:"")},A=Y=>Y.includes(";")?Y.split(";"):[Y],F=Y=>{const Z=re=>{var fe;if(re)return(fe=Y==null?void 0:Y.cells[re])==null?void 0:fe.obj.k},te=re=>{var fe,ye;if(!(b.length<=re))return(ye=(fe=Y==null?void 0:Y.cells[b[re].name])==null?void 0:fe.obj)==null?void 0:ye.k};return{descr:t||Z(n)||te(2)||"",icon:u||Z(c)||te(3)||"",um:p||Z(d)||te(1)||"",value:g||Z(x)||te(0)||""}},V=Y=>{O==null||O(Y)},M=(Y,Z)=>{(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),Y.stopPropagation(),V(Z))},G=(Y=>{const Z=H.dash(Y);return{className:Z,descr:te=>v.jsx("div",{className:Z.descr,children:te},`${Y}-${P}`),icon:te=>v.jsx("div",{className:Z.icon,children:v.jsx(le,{color:f,height:J,icon:te,width:J})},`${Y}-${D}`),um:te=>v.jsx("div",{className:Z.um,children:te},`${Y}-${I}`),value:te=>v.jsx("div",{className:Z.value,children:te},`${Y}-${W}`)}})(E),se=Y=>{const{descr:Z,icon:te,um:re,value:fe}=F(Y),ye={[T(P)]:_(s),[T(I)]:_(m),[T(W)]:_(w)},pe=[],Te=R(fe);switch(E){case"2":te&&pe.push(G.icon(te)),pe.push(G.descr(Z)),pe.push(G.value(re?Te+" "+re:Te));break;default:case"1":pe.push(G.descr(Z)),pe.push(G.value(re?Te+" "+re:Te))}return v.jsx("div",{className:G.className.container,role:"button",style:ye,tabIndex:0,onClick:()=>V(Y),onKeyDown:Pr=>M(Pr,Y),children:pe},Y.rowId)},N={[K]:String(r),[z]:B};return v.jsx("div",{className:H.dashList,style:N,children:C?L.map(Y=>se(Y)):S})},dt={"smp-table":"_smp-table_8dmh0_1","smp-headerCell":"_smp-headerCell_8dmh0_35","smp-resizer":"_smp-resizer_8dmh0_44"},cs="_rowContent_gazwe_13",us="_clickable_gazwe_42",fs="_indent_gazwe_47",ds="_toggle_gazwe_53",ps="_rowLabel_gazwe_69",hs="_cell_gazwe_78",ms="_leftSection_gazwe_86",xe={rowContent:cs,clickable:us,indent:fs,toggle:ds,rowLabel:ps,cell:hs,leftSection:ms};function Ge(r){return!!r&&"children"in r}function gs(r){return!Ge(r)}function ys(r){return JSON.stringify(r).split("").reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0).toString()}const $r=({row:r,columnWidths:e={},level:t=0,rowHeight:n=26,offsetTop:s})=>{var E;const[a,i]=$.useState(!1),o=Ge(r)&&!!((E=r.children)!=null&&E.length),u=r.cells&&Object.keys(r.cells).length>0,c=o,f=t*20,l=()=>{o&&i(!a)},p={content:`${xe.rowContent} ${o?xe.clickable:""}`,toggle:`${xe.toggle}`,indent:`${xe.indent}`,cell:`${xe.cell}`},d=O=>v.jsx(Ot,{...O}),m=()=>v.jsx("span",{className:p.toggle,children:c?a?"▶":"▼":" "}),g=()=>v.jsx("span",{className:p.indent,style:{width:`${f}px`},"aria-hidden":"true"}),x=()=>{const O=gs(r)?"":r.decode||(u?"":"Untitled"),S=s??n*t;return v.jsxs("tr",{className:p.content,onClick:l,role:o?"button":"row","aria-expanded":o?!a:void 0,style:{height:`${n}px`,lineHeight:`calc(${n}px - 2*2px)`,transform:`translateY(${S}px)`},children:[Ge(r)&&v.jsxs("td",{className:xe.leftSection,style:{height:`${n}px`},children:[g(),m(),v.jsx("span",{className:xe.rowLabel,children:O})]}),r.cells&&Object.keys(r.cells).length>0&&Object.entries(r.cells).map(([b,L])=>v.jsx("td",{className:p.cell,style:{width:e[b],minWidth:e[b],height:`${n}px`},children:d(L)},ys(L)||b))]})},w=()=>{var O;return a||!o?null:v.jsx(v.Fragment,{children:Ge(r)&&((O=r.children)==null?void 0:O.map((S,b)=>v.jsx($r,{row:S,level:t+1},`child-${b}`)))})};return v.jsxs(v.Fragment,{children:[x(),w()]})},vs=({label:r,rowHeight:e=28,offsetTop:t=0,level:n=0,onClick:s,isExpanded:a})=>{const i={tr:"smp-groupRow-tr",td:"smp-groupRow-td"};return v.jsx("tr",{className:i.tr,style:{height:e,top:t,lineHeight:`${e}px`},onClick:s,children:v.jsxs("td",{className:i.td,style:{paddingLeft:10+n*20},children:[v.jsx(le,{icon:a?"arrow_drop_down":"arrow_drop_right",width:16}),v.jsx(Ae,{variant:"title",bindValue:r})]})})};function bs(r,e){const t=new Set(r);return t.has(e)?t.delete(e):t.add(e),t}function xs(r,e){return r.map(t=>{const n=e.find(s=>s.column===t.bindValue);return{column:t.bindValue,visible:(n==null?void 0:n.visible)??!0}})}function Ss(r,e,t,n){const s=[];let a=0;return i(r,0,[]),{flatRows:s,offset:a};function i(l,p,d){if(p>=e.length){f(l);return}const m=e[p].column,g=o(l,m);for(const[x,w]of g){const E=[...d,x],O=u(E,p),S=n.has(O);s.push(c(x,O,p,S)),a+=t,S&&i(w,p+1,E)}}function o(l,p){var m;const d=new Map;for(const g of l){const x=((m=g.cells[p])==null?void 0:m.decode)??"N/D";d.has(x)||d.set(x,[]),d.get(x).push(g)}return d}function u(l,p){return`group-${l.join("-")}-${p}`}function c(l,p,d,m){return{isGroup:!0,value:l,cells:{},rowId:p,level:d,isExpanded:m}}function f(l){for(const p of l)s.push(p),a+=t}}const ws=({groups:r=[],isDraggable:e=!0,isEditable:t=!0,onChange:n,onDrop:s,onDragOver:a})=>{const i=r.map(o=>({bindValue:o.column}));return v.jsxs("div",{className:"smp-groupBar-container",onDragOver:a,onDrop:s,children:[v.jsx(le,{icon:"groups"}),v.jsx(Et,{elements:i,isEditable:t,isDraggable:e,displayMode:"CodeOnly",onChange:n})]})},Es=({data:r,lineHeight:e=28,TableHeight:t=400,groups:n,columnSizingMode:s="fixed",showGroupBar:a=!0})=>{var U;const[i,o]=$.useState(r),[u,c]=$.useState(n||[]),[f,l]=$.useState(new Set),p=i&&i.columns?Object.fromEntries(i.columns.map(j=>[j.name,120])):{},[d,m]=$.useState(p),g=$.useRef(null);$.useEffect(()=>{var D;if(!i||!i.columns||i.columns.length)return;const j=((D=g.current)==null?void 0:D.clientWidth)??1e3;let P={};switch(s){case"fixed":P=Object.fromEntries(i.columns.map(I=>[I.name,120]));break;case"fit-grid":{const I=i.columns.filter(B=>B.visible),W=Math.floor(j/I.length);P=Object.fromEntries(I.map(B=>[B.name,W]));break}case"fit-content":P=Object.fromEntries(i.columns.map(I=>{const W=Math.max(...r.rows.map(H=>{var y;const k=(y=H==null?void 0:H.cells)==null?void 0:y[I.name],h=(k==null?void 0:k.decode)||(k==null?void 0:k.value);return h?String(h).length:0}),0),B=I.title?I.title.length:0,J=Math.max(W,B);return[I.name,Math.max(50,J*8+16)]}));break}m(P)},[s,r,i]),$.useEffect(()=>{if(u!=null&&u.length&&r.rows){const{flatRows:j}=Ss(r.rows,u,e,f);o({...r,rows:j})}else o(r)},[r,u,f,e]);const x=j=>{c(xs(j,u))},w=j=>{j.preventDefault();const P=j.dataTransfer.getData("text/plain");if(!P||u.some(W=>W.column===P))return;const I=[...u,{column:P,visible:!0}];c(I)},E=j=>{j.preventDefault()},{virtualItems:O,containerProps:S,innerProps:b}=br({items:(i==null?void 0:i.rows)||[],itemHeight:e,containerHeight:t,overscan:5}),L=(j,P)=>{const D=j.clientX,I=d[P],W=J=>{const K=J.clientX-D,z=Math.max(50,I+K);m(H=>({...H,[P]:z}))},B=()=>{window.removeEventListener("mousemove",W),window.removeEventListener("mouseup",B)};window.addEventListener("mousemove",W),window.addEventListener("mouseup",B)},C={smpTable:`${dt["smp-table"]}`,headerCell:`${dt["smp-headerCell"]}`,resizer:`${dt["smp-resizer"]}`};return i&&v.jsx("div",{className:C.smpTable,...S,ref:g,children:v.jsxs("table",{children:[v.jsxs("thead",{children:[(n||a)&&v.jsx(ws,{groups:u,onChange:x,onDrop:w,onDragOver:E}),v.jsx("tr",{children:i.columns&&((U=i.columns)==null?void 0:U.map(j=>j.visible&&v.jsxs("th",{className:C.headerCell,draggable:!0,onDragStart:P=>{P.dataTransfer.setData("text/plain",j.name)},style:{width:d[j.name],minWidth:d[j.name],maxWidth:d[j.name]},children:[v.jsx(Ae,{variant:"title",bindValue:j.title}),v.jsx("div",{className:C.resizer,onMouseDown:P=>L(P,j.name),role:"region"})]},j.name)))})]}),v.jsx("tbody",{...b,children:O.map(({item:j,index:P,offsetTop:D})=>j.isGroup?v.jsx(vs,{label:j.value||"",rowHeight:e,offsetTop:D,level:j.level,onClick:()=>{const I=j.rowId;I&&l(W=>bs(W,I))},isExpanded:j.isExpanded},j.rowId||`group-${P}`):v.jsx($r,{row:j,columnWidths:d,rowHeight:e,offsetTop:D,isGroup:!1},j.rowId||`row-${P}`))}),v.jsx("tfoot",{children:v.jsx("span",{children:"Tfooter here"})})]})})},Ts=({data:r,Type:e,ShowSubmit:t=!1,SubmitPosition:n="Right",DefaultValue:s,Label:a,LabelPosition:i="Left",onBlur:o,onClick:u,onOptionsRequest:c})=>{const[f,l]=$.useState();$.useEffect(()=>{l(()=>{if(!r)return;const g={...r};return e&&(g.shape=e),g.shape==null&&(g.shape=ne.TEXT_FIELD),s&&(g.obj=Yr(s)),g})},[r,s,e]);const d={container:`smp-field-container ${ce(t)?`smp-field-position-${n}`:""}`},m=()=>{ce(t)||o==null||o(f)};if(f)return v.jsxs("div",{className:d.container,children:[v.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",font:"var(--smp-fontLabel-base)"},children:v.jsx(Ot,{...f,onChange:l,onOptionsRequest:c,fun:r==null?void 0:r.fun,onBlur:m,label:a,labelPosition:i})}),ce(t)&&v.jsx(Se,{optionalDisplayValue:"Confirm",onClick:()=>u==null?void 0:u(f),bindValue:"Confirm"})]})},Os=r=>(r==null?void 0:r.type)==="SmeupDataTree",Rs=r=>(r==null?void 0:r.type)==="SmeupDataTable",js=r=>Os(r)?r.children?r.children.map(e=>({id:e.obj.k,label:e.value??""})):[]:Rs(r)?r.rows.map(e=>{const t=e.cells||e.cells,[n,s]=Object.keys(t);return{id:t[n].obj.k,label:t[s].value||t[s].obj.k}}):[],Ds=({data:r,readOnly:e=!1,hiddenSubmitButton:t=!1,optionsHandler:n,onSubmit:s})=>{const[a,i]=$.useState({});$.useEffect(()=>{i(u(r))},[r]);const o=()=>{const f=c();s({value:f})},u=f=>{var p,d,m;if(!((p=f.rows)!=null&&p.length)||!((d=f.columns)!=null&&d.length))return{};const l=(m=f.rows)==null?void 0:m[0];return f.columns.filter(g=>g.visible??!0).reduce((g,x)=>{const w={...l.cells[x.name],label:x.title,onChange:E=>{i(O=>({...O,[x.name]:{...O[x.name],obj:{...O[x.name].obj,k:E.obj.k},decode:E.decode}}))}};return w.fun&&(w.shape==ne.AUTOCOMPLETE||w.shape==ne.MULTI_AUTOCOMPLETE||w.shape==ne.COMBOBOX)&&(w.onOptionsRequest=async(E,O)=>js(await n(E,O,r,x.name))),w.isEditable==null&&(w.isEditable=!0),e&&(w.isEditable=!1),w.isEditable&&w.shape==null&&(w.shape=ne.TEXT_FIELD),{...g,[x.name]:w}},{})},c=()=>({before:r,after:{type:"SmeupDataTable",columns:JSON.parse(JSON.stringify(r.columns)),rows:[{cells:JSON.parse(JSON.stringify(a))}]}});return a&&v.jsxs("div",{"data-component":"input-panel",style:{display:"flex",flexDirection:"column",gap:"2rem",padding:"2rem"},children:[v.jsx(Rt,{layout:r.rows[0].layout,cells:a}),!t&&v.jsx(Se,{onClick:o,bindValue:"submit",optionalDisplayValue:"Submit"})]})};exports.AppBar=as;exports.Autocomplete=wt;exports.Button=Se;exports.ButtonList=wr;exports.Checkbox=Er;exports.Combobox=Or;exports.DashList=ls;exports.DataTableComponent=Es;exports.DatePicker=Dr;exports.Drawer=os;exports.Field=Ts;exports.Icon=le;exports.InputPanel=Ds;exports.Password=_r;exports.Textfield=Ee;exports.configurePaths=hn;