@sme.up/ketchup2 2.0.0-SNAPSHOT-20250528103823 → 2.0.0-SNAPSHOT-20250529095955

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 (36) hide show
  1. package/dist/assets/svg/menu_close.svg +1 -0
  2. package/dist/basic-components/button/button.d.ts.map +1 -1
  3. package/dist/basic-components/checkbox/checkbox.d.ts.map +1 -1
  4. package/dist/basic-components/chips/chips.d.ts.map +1 -1
  5. package/dist/basic-components/combobox/combobox.d.ts.map +1 -1
  6. package/dist/basic-components/date-picker/date-picker-calendar/date-picker-calendar.d.ts.map +1 -1
  7. package/dist/basic-components/icon/icon.d.ts.map +1 -1
  8. package/dist/basic-components/list/list.d.ts.map +1 -1
  9. package/dist/basic-components/mulitple-autocomplete/multiple-autocomplete.d.ts.map +1 -1
  10. package/dist/basic-components/password/password.d.ts.map +1 -1
  11. package/dist/basic-components/searchbar/search-bar.d.ts.map +1 -1
  12. package/dist/basic-components/textfield/textfield-types.d.ts +1 -0
  13. package/dist/basic-components/textfield/textfield-types.d.ts.map +1 -1
  14. package/dist/basic-components/textfield/textfield.d.ts.map +1 -1
  15. package/dist/basic-components/typography/typography.d.ts.map +1 -1
  16. package/dist/components/app-bar/app-bar.d.ts.map +1 -1
  17. package/dist/components/dash-list/dash-list.d.ts.map +1 -1
  18. package/dist/components/drawer/drawer-types.d.ts +39 -0
  19. package/dist/components/drawer/drawer-types.d.ts.map +1 -0
  20. package/dist/components/drawer/drawer.d.ts +3 -0
  21. package/dist/components/drawer/drawer.d.ts.map +1 -0
  22. package/dist/components/drawer/drawer.data.d.ts +6 -0
  23. package/dist/components/drawer/drawer.data.d.ts.map +1 -0
  24. package/dist/components/field/field.d.ts.map +1 -1
  25. package/dist/components/input-panel/input-panel.d.ts.map +1 -1
  26. package/dist/functional-components/helper-text/helper-text.d.ts.map +1 -1
  27. package/dist/functional-components/label/label.d.ts.map +1 -1
  28. package/dist/functional-components/layout/layout-utils.d.ts +6 -0
  29. package/dist/functional-components/layout/layout-utils.d.ts.map +1 -1
  30. package/dist/functional-components/layout/layout.d.ts.map +1 -1
  31. package/dist/index.d.ts +3 -0
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/ketchup2.cjs.js +14 -14
  34. package/dist/ketchup2.css +1 -1
  35. package/dist/ketchup2.es.js +2297 -2260
  36. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- "use strict";var Ar=Object.defineProperty;var $r=(n,e,t)=>e in n?Ar(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ve=(n,e,t)=>$r(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react");function kr(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const Ne=kr(M);var Me={exports:{}},Te={};/**
1
+ "use strict";var Er=Object.defineProperty;var wr=(r,e,t)=>e in r?Er(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var ye=(r,e,t)=>wr(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react");function Tr(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 $e=Tr(L);var je={exports:{}},we={};/**
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 wt;function Lr(){if(wt)return Te;wt=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(r,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:n,type:r,key:i,ref:s!==void 0?s:null,props:a}}return Te.Fragment=e,Te.jsx=t,Te.jsxs=t,Te}var Re={};/**
9
+ */var mt;function Or(){if(mt)return we;mt=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 we.Fragment=e,we.jsx=t,we.jsxs=t,we}var Te={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,37 +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 Ot;function jr(){return Ot||(Ot=1,process.env.NODE_ENV!=="production"&&function(){function n(d){if(d==null)return null;if(typeof d=="function")return d.$$typeof===A?null:d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case y:return"Fragment";case w:return"Profiler";case S:return"StrictMode";case b:return"Suspense";case P:return"SuspenseList";case V:return"Activity"}if(typeof d=="object")switch(typeof d.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),d.$$typeof){case m:return"Portal";case O:return(d.displayName||"Context")+".Provider";case v:return(d._context.displayName||"Context")+".Consumer";case D:var g=d.render;return d=d.displayName,d||(d=g.displayName||g.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case j:return g=d.displayName||null,g!==null?g:n(d.type)||"Memo";case U:g=d._payload,d=d._init;try{return n(d(g))}catch{}}return null}function e(d){return""+d}function t(d){try{e(d);var g=!1}catch{g=!0}if(g){g=console;var x=g.error,T=typeof Symbol=="function"&&Symbol.toStringTag&&d[Symbol.toStringTag]||d.constructor.name||"Object";return x.call(g,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",T),e(d)}}function r(d){if(d===y)return"<>";if(typeof d=="object"&&d!==null&&d.$$typeof===U)return"<...>";try{var g=n(d);return g?"<"+g+">":"<...>"}catch{return"<...>"}}function s(){var d=F.A;return d===null?null:d.getOwner()}function a(){return Error("react-stack-top-frame")}function i(d){if(W.call(d,"key")){var g=Object.getOwnPropertyDescriptor(d,"key").get;if(g&&g.isReactWarning)return!1}return d.key!==void 0}function o(d,g){function x(){ne||(ne=!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)",g))}x.isReactWarning=!0,Object.defineProperty(d,"key",{get:x,configurable:!0})}function l(){var d=n(this.type);return J[d]||(J[d]=!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.")),d=this.props.ref,d!==void 0?d:null}function u(d,g,x,T,_,R,L,I){return x=R.ref,d={$$typeof:p,type:d,key:g,props:R,_owner:_},(x!==void 0?x:null)!==null?Object.defineProperty(d,"ref",{enumerable:!1,get:l}):Object.defineProperty(d,"ref",{enumerable:!1,value:null}),d._store={},Object.defineProperty(d._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(d,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(d,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:L}),Object.defineProperty(d,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:I}),Object.freeze&&(Object.freeze(d.props),Object.freeze(d)),d}function f(d,g,x,T,_,R,L,I){var $=g.children;if($!==void 0)if(T)if(X($)){for(T=0;T<$.length;T++)c($[T]);Object.freeze&&Object.freeze($)}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 c($);if(W.call(g,"key")){$=n(d);var K=Object.keys(g).filter(function(re){return re!=="key"});T=0<K.length?"{key: someKey, "+K.join(": ..., ")+": ...}":"{key: someKey}",k[$+T]||(K=0<K.length?"{"+K.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var yt;function Rr(){return yt||(yt=1,process.env.NODE_ENV!=="production"&&function(){function r(d){if(d==null)return null;if(typeof d=="function")return d.$$typeof===j?null:d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case y:return"Fragment";case O:return"Profiler";case x:return"StrictMode";case v:return"Suspense";case C:return"SuspenseList";case V:return"Activity"}if(typeof d=="object")switch(typeof d.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),d.$$typeof){case g:return"Portal";case E:return(d.displayName||"Context")+".Provider";case b:return(d._context.displayName||"Context")+".Consumer";case D:var m=d.render;return d=d.displayName,d||(d=m.displayName||m.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case $:return m=d.displayName||null,m!==null?m:r(d.type)||"Memo";case Y:m=d._payload,d=d._init;try{return r(d(m))}catch{}}return null}function e(d){return""+d}function t(d){try{e(d);var m=!1}catch{m=!0}if(m){m=console;var w=m.error,R=typeof Symbol=="function"&&Symbol.toStringTag&&d[Symbol.toStringTag]||d.constructor.name||"Object";return w.call(m,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",R),e(d)}}function n(d){if(d===y)return"<>";if(typeof d=="object"&&d!==null&&d.$$typeof===Y)return"<...>";try{var m=r(d);return m?"<"+m+">":"<...>"}catch{return"<...>"}}function s(){var d=N.A;return d===null?null:d.getOwner()}function a(){return Error("react-stack-top-frame")}function i(d){if(U.call(d,"key")){var m=Object.getOwnPropertyDescriptor(d,"key").get;if(m&&m.isReactWarning)return!1}return d.key!==void 0}function o(d,m){function w(){ne||(ne=!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)",m))}w.isReactWarning=!0,Object.defineProperty(d,"key",{get:w,configurable:!0})}function l(){var d=r(this.type);return X[d]||(X[d]=!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.")),d=this.props.ref,d!==void 0?d:null}function c(d,m,w,R,T,P,_,M){return w=P.ref,d={$$typeof:h,type:d,key:m,props:P,_owner:T},(w!==void 0?w:null)!==null?Object.defineProperty(d,"ref",{enumerable:!1,get:l}):Object.defineProperty(d,"ref",{enumerable:!1,value:null}),d._store={},Object.defineProperty(d._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(d,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(d,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:_}),Object.defineProperty(d,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.freeze&&(Object.freeze(d.props),Object.freeze(d)),d}function f(d,m,w,R,T,P,_,M){var k=m.children;if(k!==void 0)if(R)if(B(k)){for(R=0;R<k.length;R++)u(k[R]);Object.freeze&&Object.freeze(k)}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 u(k);if(U.call(m,"key")){k=r(d);var K=Object.keys(m).filter(function(re){return re!=="key"});R=0<K.length?"{key: someKey, "+K.join(": ..., ")+": ...}":"{key: someKey}",I[k+R]||(K=0<K.length?"{"+K.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,T,$,K,$),k[$+T]=!0)}if($=null,x!==void 0&&(t(x),$=""+x),i(g)&&(t(g.key),$=""+g.key),"key"in g){x={};for(var H in g)H!=="key"&&(x[H]=g[H])}else x=g;return $&&o(x,typeof d=="function"?d.displayName||d.name||"Unknown":d),u(d,$,R,_,s(),x,L,I)}function c(d){typeof d=="object"&&d!==null&&d.$$typeof===p&&d._store&&(d._store.validated=1)}var h=M,p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),O=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),A=Symbol.for("react.client.reference"),F=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=Object.prototype.hasOwnProperty,X=Array.isArray,B=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(d){return d()}};var ne,J={},Y=h["react-stack-bottom-frame"].bind(h,a)(),z=B(r(a)),k={};Re.Fragment=y,Re.jsx=function(d,g,x,T,_){var R=1e4>F.recentlyCreatedOwnerStacks++;return f(d,g,x,!1,T,_,R?Error("react-stack-top-frame"):Y,R?B(r(d)):z)},Re.jsxs=function(d,g,x,T,_){var R=1e4>F.recentlyCreatedOwnerStacks++;return f(d,g,x,!0,T,_,R?Error("react-stack-top-frame"):Y,R?B(r(d)):z)}}()),Re}var Tt;function Ir(){return Tt||(Tt=1,process.env.NODE_ENV==="production"?Me.exports=Lr():Me.exports=jr()),Me.exports}var E=Ir();const ce={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"},Nr=n=>n.t=="D8",Mr=n=>{if(n){const e=n.split(";");if(e.length==3)return{t:e[0],p:e[1],k:e[2]}}return{t:"",p:"",k:""}};class Ke{constructor(e,t){ve(this,"class");ve(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new Ke(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 Fr(n,e){if(vt(n)){const f=new Date(n);if(!isNaN(f.getTime()))return f}const t=new Date,r=n.replaceAll("/","").replaceAll("-","");let s="DDMMYYYY";e==="en"&&(s="MMDDYYYY");const a=s.indexOf("DD"),i=s.indexOf("MM");let o=0,l=0,u="";switch(r.length){case 1:case 2:return o=parseInt(r),t.setDate(o),Fe(t)?t:n;case 3:case 4:return o=parseInt(r.substring(0,2)),l=parseInt(r.substring(2,4)),i===0?(t.setDate(l),t.setMonth(o-1)):a===0&&(t.setDate(o),t.setMonth(l-1)),Fe(t)?t:n;case 5:case 6:{o=parseInt(r.substring(0,2)),l=parseInt(r.substring(2,4)),Number(r.substring(4))>50?u="19"+r.substring(4):u="20"+r.substring(4);let f=0,c=0;return i===0?(f=l,c=o-1,t.setFullYear(parseInt(u),c,f)):a===0&&(f=o,c=l-1,t.setFullYear(parseInt(u),c,f)),ht(o,c,parseInt(u))&&Fe(t)?t:n}case 7:case 8:{o=parseInt(r.substring(0,2)),l=parseInt(r.substring(2,4)),u=r.substring(4);let f=0,c=0;return i===0?(f=l,c=o-1,t.setFullYear(parseInt(u),c,f)):a===0&&(f=o,c=l-1,t.setFullYear(parseInt(u),c,f)),ht(f,c,parseInt(u))&&Fe(t)?t:n}}return n}function vt(n){return/^\d{4}-\d{2}-\d{2}$/.test(n)&&n.length===10}function Fe(n){return n instanceof Date&&!isNaN(n.getTime())}function Vr(n){if(!/^\d{8}$/.test(n))return!1;const e=parseInt(n.slice(0,4),10),t=parseInt(n.slice(4,6),10),r=parseInt(n.slice(6,8),10);return ht(r,t-1,e)}function ht(n,e,t){const r=[31,Yr(t)?29:28,31,30,31,30,31,31,30,31,30,31];return!(e<0||e>11||n<1||n>r[e])}function Yr(n){return n%4===0&&(n%100!==0||n%400===0)}function Ur(n){const e=n.getFullYear(),t=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return isNaN(e)||isNaN(Number(t))||isNaN(Number(r))?n.toString():`${e}-${t}-${r}`}class Be{constructor(e,t){ve(this,"class");ve(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=Rt.get(`${e.t}${e.p}`);if(t)return new Be(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=Rt.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 Rt=new Map([["D8*YYMD",{legacyToIso(n){return Vr(n)&&`${n.substring(0,4)}-${n.substring(4,6)}-${n.substring(6,8)}`||n},isoToLegacy(n){return vt(n)&&n.replaceAll("-","")||n}}]]),ze=(n,e)=>{M.useEffect(()=>{const t=r=>{typeof n=="object"&&n!==null&&"current"in n&&n.current&&!n.current.contains(r.target)&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[n,e])};function xt({position:n="bottom",enabled:e=!0}){const t=M.useRef(null),r=M.useRef(null),[s,a]=M.useState(0),i=M.useCallback(()=>{const o=t.current,l=r.current;if(!o||!l)return;const{top:u,left:f,width:c,height:h}=o.getBoundingClientRect();a(c);const p=l.offsetHeight,m=l.offsetWidth;if(m===0||p===0){requestAnimationFrame(i);return}let y=u+window.scrollY,S=f+window.scrollX;switch(n){case"top":y-=p;break;case"bottom":y+=h;break;case"left":S-=m;break;case"right":S+=c;break}requestAnimationFrame(()=>{l.style.transform=`translate(${S}px, ${y}px)`})},[n]);return M.useLayoutEffect(()=>{e&&t.current&&r.current&&i();const o=new MutationObserver(()=>{r.current&&i()});return r.current&&o.observe(r.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:r,anchorWidth:s}}const Ge=(n,e,t)=>{if(t)switch(t){case"CodeOnly":return n;case"DescOnly":return e||"";case"Both":return`${n} - ${e}`}return n},De={"smp-list":"_smp-list_1ux5k_1","smp-list-container":"_smp-list-container_1ux5k_18","smp-list-listItem":"_smp-list-listItem_1ux5k_23"},nt={"smp-helper-text":"_smp-helper-text_10pis_1","smp-helper-text-danger":"_smp-helper-text-danger_10pis_9","smp-helper-text-warning":"_smp-helper-text-warning_10pis_13","smp-helper-text-disabled":"_smp-helper-text-disabled_10pis_17"},Wr=({helperText:n,disabled:e,state:t})=>{const r={container:`${nt["smp-helper-text"]} ${e?nt["smp-helper-text-disabled"]:""} ${t?nt[`smp-helper-text-${t}`]:""}`};return E.jsx("span",{className:r.container,children:n})},Dt={"smp-label":"_smp-label_3ywt3_1","smp-label-disabled":"_smp-label-disabled_3ywt3_5"},pr=({label:n,disabled:e})=>{const t={container:`${Dt["smp-label"]} ${e?Dt["smp-label-disabled"]:""}`};return E.jsx("span",{className:t.container,children:n})};function Hr(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}function Je(){return Je=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Je.apply(null,arguments)}function mt(n,e){return mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},mt(n,e)}function qr(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,mt(n,e)}function st(n,e,t){if(t||arguments.length===2)for(var r=0,s=e.length,a;r<s;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return n.concat(a||Array.prototype.slice.call(e))}var Ve={};/*!
22
+ <%s key={someKey} {...props} />`,R,k,K,k),I[k+R]=!0)}if(k=null,w!==void 0&&(t(w),k=""+w),i(m)&&(t(m.key),k=""+m.key),"key"in m){w={};for(var H in m)H!=="key"&&(w[H]=m[H])}else w=m;return k&&o(w,typeof d=="function"?d.displayName||d.name||"Unknown":d),c(d,k,P,T,s(),w,_,M)}function u(d){typeof d=="object"&&d!==null&&d.$$typeof===h&&d._store&&(d._store.validated=1)}var p=L,h=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),E=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),j=Symbol.for("react.client.reference"),N=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.prototype.hasOwnProperty,B=Array.isArray,G=console.createTask?console.createTask:function(){return null};p={"react-stack-bottom-frame":function(d){return d()}};var ne,X={},W=p["react-stack-bottom-frame"].bind(p,a)(),z=G(n(a)),I={};Te.Fragment=y,Te.jsx=function(d,m,w,R,T){var P=1e4>N.recentlyCreatedOwnerStacks++;return f(d,m,w,!1,R,T,P?Error("react-stack-top-frame"):W,P?G(n(d)):z)},Te.jsxs=function(d,m,w,R,T){var P=1e4>N.recentlyCreatedOwnerStacks++;return f(d,m,w,!0,R,T,P?Error("react-stack-top-frame"):W,P?G(n(d)):z)}}()),Te}var vt;function Dr(){return vt||(vt=1,process.env.NODE_ENV==="production"?je.exports=Or():je.exports=Rr()),je.exports}var S=Dr();const oe={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"},Pr=r=>r.t=="D8",Ar=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 Ve{constructor(e,t){ye(this,"class");ye(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new Ve(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 Cr(r,e){if(ft(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),Le(t)?t:r;case 3:case 4:return o=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),i===0?(t.setDate(l),t.setMonth(o-1)):a===0&&(t.setDate(o),t.setMonth(l-1)),Le(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)),it(o,u,parseInt(c))&&Le(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)),it(f,u,parseInt(c))&&Le(t)?t:r}}return r}function ft(r){return/^\d{4}-\d{2}-\d{2}$/.test(r)&&r.length===10}function Le(r){return r instanceof Date&&!isNaN(r.getTime())}function $r(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 it(n,t-1,e)}function it(r,e,t){const n=[31,jr(t)?29:28,31,30,31,30,31,31,30,31,30,31];return!(e<0||e>11||r<1||r>n[e])}function jr(r){return r%4===0&&(r%100!==0||r%400===0)}function Lr(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 Ye{constructor(e,t){ye(this,"class");ye(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=bt.get(`${e.t}${e.p}`);if(t)return new Ye(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=bt.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 bt=new Map([["D8*YYMD",{legacyToIso(r){return $r(r)&&`${r.substring(0,4)}-${r.substring(4,6)}-${r.substring(6,8)}`||r},isoToLegacy(r){return ft(r)&&r.replaceAll("-","")||r}}]]),Ue=(r,e)=>{L.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 dt({position:r="bottom",enabled:e=!0}){const t=L.useRef(null),n=L.useRef(null),[s,a]=L.useState(0),i=L.useCallback(()=>{const o=t.current,l=n.current;if(!o||!l)return;const{top:c,left:f,width:u,height:p}=o.getBoundingClientRect();a(u);const h=l.offsetHeight,g=l.offsetWidth;if(g===0||h===0){requestAnimationFrame(i);return}let y=c+window.scrollY,x=f+window.scrollX;switch(r){case"top":y-=h;break;case"bottom":y+=p;break;case"left":x-=g;break;case"right":x+=u;break}requestAnimationFrame(()=>{l.style.transform=`translate(${x}px, ${y}px)`})},[r]);return L.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 We=(r,e,t)=>{if(t)switch(t){case"CodeOnly":return r;case"DescOnly":return e||"";case"Both":return`${r} - ${e}`}return r},kr=({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})},nr=({label:r,disabled:e})=>{const t={container:`smp-label ${e?"smp-label-disabled":""}`};return S.jsx("span",{className:t.container,children:r})};function Ir(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 He(){return He=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},He.apply(null,arguments)}function ot(r,e){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},ot(r,e)}function Nr(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,ot(r,e)}function Xe(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 ke={};/*!
23
23
  * content-type
24
24
  * Copyright(c) 2015 Douglas Christopher Wilson
25
25
  * MIT Licensed
26
- */var Ct;function Kr(){if(Ct)return Ve;Ct=1;var n=/; *([!#$%&'*+.^_`|~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-]+$/,r=/\\([\u000b\u0020-\u00ff])/g,s=/([\\"])/g,a=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;Ve.format=i,Ve.parse=o;function i(c){if(!c||typeof c!="object")throw new TypeError("argument obj is required");var h=c.parameters,p=c.type;if(!p||!a.test(p))throw new TypeError("invalid type");var m=p;if(h&&typeof h=="object")for(var y,S=Object.keys(h).sort(),w=0;w<S.length;w++){if(y=S[w],!t.test(y))throw new TypeError("invalid parameter name");m+="; "+y+"="+u(h[y])}return m}function o(c){if(!c)throw new TypeError("argument string is required");var h=typeof c=="object"?l(c):c;if(typeof h!="string")throw new TypeError("argument string is required to be a string");var p=h.indexOf(";"),m=p!==-1?h.slice(0,p).trim():h.trim();if(!a.test(m))throw new TypeError("invalid media type");var y=new f(m.toLowerCase());if(p!==-1){var S,w,v;for(n.lastIndex=p;w=n.exec(h);){if(w.index!==p)throw new TypeError("invalid parameter format");p+=w[0].length,S=w[1].toLowerCase(),v=w[2],v.charCodeAt(0)===34&&(v=v.slice(1,-1),v.indexOf("\\")!==-1&&(v=v.replace(r,"$1"))),y.parameters[S]=v}if(p!==h.length)throw new TypeError("invalid parameter format")}return y}function l(c){var h;if(typeof c.getHeader=="function"?h=c.getHeader("content-type"):typeof c.headers=="object"&&(h=c.headers&&c.headers["content-type"]),typeof h!="string")throw new TypeError("content-type header is missing from object");return h}function u(c){var h=String(c);if(t.test(h))return h;if(h.length>0&&!e.test(h))throw new TypeError("invalid parameter value");return'"'+h.replace(s,"\\$1")+'"'}function f(c){this.parameters=Object.create(null),this.type=c}return Ve}var Br=Kr(),Oe=new Map,hr=function(e){return e.cloneNode(!0)},Pt=function(){return window.location.protocol==="file:"},mr=function(e,t,r){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=Br.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)r(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)r(o,s);else throw o}},s.open("GET",e),s.withCredentials=t,s.overrideMimeType&&s.overrideMimeType("text/xml"),s.send()},be={},At=function(e,t){be[e]=be[e]||[],be[e].push(t)},zr=function(e){for(var t=function(i,o){setTimeout(function(){if(Array.isArray(be[e])){var l=Oe.get(e),u=be[e][i];l instanceof SVGSVGElement&&u(null,hr(l)),l instanceof Error&&u(l),i===be[e].length-1&&delete be[e]}},0)},r=0,s=be[e].length;r<s;r++)t(r)},Gr=function(e,t,r){if(Oe.has(e)){var s=Oe.get(e);if(s===void 0){At(e,r);return}if(s instanceof SVGSVGElement){r(null,hr(s));return}}Oe.set(e,void 0),At(e,r),mr(e,t,function(a,i){var o;a?Oe.set(e,a):((o=i.responseXML)===null||o===void 0?void 0:o.documentElement)instanceof SVGSVGElement&&Oe.set(e,i.responseXML.documentElement),zr(e)})},Jr=function(e,t,r){mr(e,t,function(s,a){var i;s?r(s):((i=a.responseXML)===null||i===void 0?void 0:i.documentElement)instanceof SVGSVGElement&&r(null,a.responseXML.documentElement)})},Xr=0,Zr=function(){return++Xr},de=[],$t={},Qr="http://www.w3.org/2000/svg",at="http://www.w3.org/1999/xlink",kt=function(e,t,r,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(de.indexOf(e)!==-1){de.splice(de.indexOf(e),1),e=null;return}de.push(e),e.setAttribute("src","");var u=s?Gr:Jr;u(l,a,function(f,c){if(!c){de.splice(de.indexOf(e),1),e=null,o(f);return}var h=e.getAttribute("id");h&&c.setAttribute("id",h);var p=e.getAttribute("title");p&&c.setAttribute("title",p);var m=e.getAttribute("width");m&&c.setAttribute("width",m);var y=e.getAttribute("height");y&&c.setAttribute("height",y);var S=Array.from(new Set(st(st(st([],(c.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();c.setAttribute("class",S);var w=e.getAttribute("style");w&&c.setAttribute("style",w),c.setAttribute("data-src",l);var v=[].filter.call(e.attributes,function(z){return/^data-\w[\w-]*$/.test(z.name)});if(Array.prototype.forEach.call(v,function(z){z.name&&z.value&&c.setAttribute(z.name,z.value)}),r){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"]},D,b,P,j,U;Object.keys(O).forEach(function(z){D=z,P=O[z],b=c.querySelectorAll(D+"[id]");for(var k=function(T,_){j=b[T].id,U=j+"-"+Zr();var R;Array.prototype.forEach.call(P,function(N){R=c.querySelectorAll("["+N+'*="'+j+'"]');for(var G=0,ee=R.length;G<ee;G++){var te=R[G].getAttribute(N);te&&!te.match(new RegExp('url\\("?#'+j+'"?\\)'))||R[G].setAttribute(N,"url(#"+U+")")}});for(var L=c.querySelectorAll("[*|href]"),I=[],$=0,K=L.length;$<K;$++){var H=L[$].getAttributeNS(at,"href");H&&H.toString()==="#"+b[T].id&&I.push(L[$])}for(var re=0,C=I.length;re<C;re++)I[re].setAttributeNS(at,"href","#"+U);b[T].id=U},d=0,g=b.length;d<g;d++)k(d)})}c.removeAttribute("xmlns:a");for(var V=c.querySelectorAll("script"),A=[],F,W,X=0,B=V.length;X<B;X++)W=V[X].getAttribute("type"),(!W||W==="application/ecmascript"||W==="application/javascript"||W==="text/javascript")&&(F=V[X].innerText||V[X].textContent,F&&A.push(F),c.removeChild(V[X]));if(A.length>0&&(t==="always"||t==="once"&&!$t[l])){for(var ne=0,J=A.length;ne<J;ne++)new Function(A[ne])(window);$t[l]=!0}var Y=c.querySelectorAll("style");if(Array.prototype.forEach.call(Y,function(z){z.textContent+=""}),c.setAttribute("xmlns",Qr),c.setAttribute("xmlns:xlink",at),i(c),!e.parentNode){de.splice(de.indexOf(e),1),e=null,o(new Error("Parent node is null"));return}e.parentNode.replaceChild(c,e),de.splice(de.indexOf(e),1),e=null,o(null,c)})},en=function(e,t){var r=t===void 0?{}:t,s=r.afterAll,a=s===void 0?function(){}:s,i=r.afterEach,o=i===void 0?function(){}:i,l=r.beforeEach,u=l===void 0?function(){}:l,f=r.cacheRequests,c=f===void 0?!0:f,h=r.evalScripts,p=h===void 0?"never":h,m=r.httpRequestWithCredentials,y=m===void 0?!1:m,S=r.renumerateIRIElements,w=S===void 0?!0:S;if(e&&"length"in e)for(var v=0,O=0,D=e.length;O<D;O++)kt(e[O],p,w,c,y,u,function(b,P){o(b,P),e&&"length"in e&&e.length===++v&&a(v)});else e?kt(e,p,w,c,y,u,function(b,P){o(b,P),a(1),e=null}):a(0)},Ye={exports:{}},Ue={exports:{}},Z={};/** @license React v16.13.1
26
+ */var xt;function _r(){if(xt)return ke;xt=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-]+$/;ke.format=i,ke.parse=o;function i(u){if(!u||typeof u!="object")throw new TypeError("argument obj is required");var p=u.parameters,h=u.type;if(!h||!a.test(h))throw new TypeError("invalid type");var g=h;if(p&&typeof p=="object")for(var y,x=Object.keys(p).sort(),O=0;O<x.length;O++){if(y=x[O],!t.test(y))throw new TypeError("invalid parameter name");g+="; "+y+"="+c(p[y])}return g}function o(u){if(!u)throw new TypeError("argument string is required");var p=typeof u=="object"?l(u):u;if(typeof p!="string")throw new TypeError("argument string is required to be a string");var h=p.indexOf(";"),g=h!==-1?p.slice(0,h).trim():p.trim();if(!a.test(g))throw new TypeError("invalid media type");var y=new f(g.toLowerCase());if(h!==-1){var x,O,b;for(r.lastIndex=h;O=r.exec(p);){if(O.index!==h)throw new TypeError("invalid parameter format");h+=O[0].length,x=O[1].toLowerCase(),b=O[2],b.charCodeAt(0)===34&&(b=b.slice(1,-1),b.indexOf("\\")!==-1&&(b=b.replace(n,"$1"))),y.parameters[x]=b}if(h!==p.length)throw new TypeError("invalid parameter format")}return y}function l(u){var p;if(typeof u.getHeader=="function"?p=u.getHeader("content-type"):typeof u.headers=="object"&&(p=u.headers&&u.headers["content-type"]),typeof p!="string")throw new TypeError("content-type header is missing from object");return p}function c(u){var p=String(u);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(u){this.parameters=Object.create(null),this.type=u}return ke}var Mr=_r(),Ee=new Map,sr=function(e){return e.cloneNode(!0)},St=function(){return window.location.protocol==="file:"},ar=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=Mr.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(St()?"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||St()&&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()},me={},Et=function(e,t){me[e]=me[e]||[],me[e].push(t)},Fr=function(e){for(var t=function(i,o){setTimeout(function(){if(Array.isArray(me[e])){var l=Ee.get(e),c=me[e][i];l instanceof SVGSVGElement&&c(null,sr(l)),l instanceof Error&&c(l),i===me[e].length-1&&delete me[e]}},0)},n=0,s=me[e].length;n<s;n++)t(n)},Vr=function(e,t,n){if(Ee.has(e)){var s=Ee.get(e);if(s===void 0){Et(e,n);return}if(s instanceof SVGSVGElement){n(null,sr(s));return}}Ee.set(e,void 0),Et(e,n),ar(e,t,function(a,i){var o;a?Ee.set(e,a):((o=i.responseXML)===null||o===void 0?void 0:o.documentElement)instanceof SVGSVGElement&&Ee.set(e,i.responseXML.documentElement),Fr(e)})},Yr=function(e,t,n){ar(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)})},Ur=0,Wr=function(){return++Ur},de=[],wt={},Hr="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xlink",Tt=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(de.indexOf(e)!==-1){de.splice(de.indexOf(e),1),e=null;return}de.push(e),e.setAttribute("src","");var c=s?Vr:Yr;c(l,a,function(f,u){if(!u){de.splice(de.indexOf(e),1),e=null,o(f);return}var p=e.getAttribute("id");p&&u.setAttribute("id",p);var h=e.getAttribute("title");h&&u.setAttribute("title",h);var g=e.getAttribute("width");g&&u.setAttribute("width",g);var y=e.getAttribute("height");y&&u.setAttribute("height",y);var x=Array.from(new Set(Xe(Xe(Xe([],(u.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();u.setAttribute("class",x);var O=e.getAttribute("style");O&&u.setAttribute("style",O),u.setAttribute("data-src",l);var b=[].filter.call(e.attributes,function(z){return/^data-\w[\w-]*$/.test(z.name)});if(Array.prototype.forEach.call(b,function(z){z.name&&z.value&&u.setAttribute(z.name,z.value)}),n){var E={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"]},D,v,C,$,Y;Object.keys(E).forEach(function(z){D=z,C=E[z],v=u.querySelectorAll(D+"[id]");for(var I=function(R,T){$=v[R].id,Y=$+"-"+Wr();var P;Array.prototype.forEach.call(C,function(F){P=u.querySelectorAll("["+F+'*="'+$+'"]');for(var J=0,ee=P.length;J<ee;J++){var te=P[J].getAttribute(F);te&&!te.match(new RegExp('url\\("?#'+$+'"?\\)'))||P[J].setAttribute(F,"url(#"+Y+")")}});for(var _=u.querySelectorAll("[*|href]"),M=[],k=0,K=_.length;k<K;k++){var H=_[k].getAttributeNS(Ze,"href");H&&H.toString()==="#"+v[R].id&&M.push(_[k])}for(var re=0,A=M.length;re<A;re++)M[re].setAttributeNS(Ze,"href","#"+Y);v[R].id=Y},d=0,m=v.length;d<m;d++)I(d)})}u.removeAttribute("xmlns:a");for(var V=u.querySelectorAll("script"),j=[],N,U,B=0,G=V.length;B<G;B++)U=V[B].getAttribute("type"),(!U||U==="application/ecmascript"||U==="application/javascript"||U==="text/javascript")&&(N=V[B].innerText||V[B].textContent,N&&j.push(N),u.removeChild(V[B]));if(j.length>0&&(t==="always"||t==="once"&&!wt[l])){for(var ne=0,X=j.length;ne<X;ne++)new Function(j[ne])(window);wt[l]=!0}var W=u.querySelectorAll("style");if(Array.prototype.forEach.call(W,function(z){z.textContent+=""}),u.setAttribute("xmlns",Hr),u.setAttribute("xmlns:xlink",Ze),i(u),!e.parentNode){de.splice(de.indexOf(e),1),e=null,o(new Error("Parent node is null"));return}e.parentNode.replaceChild(u,e),de.splice(de.indexOf(e),1),e=null,o(null,u)})},qr=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,p=n.evalScripts,h=p===void 0?"never":p,g=n.httpRequestWithCredentials,y=g===void 0?!1:g,x=n.renumerateIRIElements,O=x===void 0?!0:x;if(e&&"length"in e)for(var b=0,E=0,D=e.length;E<D;E++)Tt(e[E],h,O,u,y,c,function(v,C){o(v,C),e&&"length"in e&&e.length===++b&&a(b)});else e?Tt(e,h,O,u,y,c,function(v,C){o(v,C),a(1),e=null}):a(0)},Ie={exports:{}},Ne={exports:{}},Z={};/** @license React v16.13.1
27
27
  * react-is.production.min.js
28
28
  *
29
29
  * Copyright (c) Facebook, Inc. and its affiliates.
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var Lt;function tn(){if(Lt)return Z;Lt=1;var n=typeof Symbol=="function"&&Symbol.for,e=n?Symbol.for("react.element"):60103,t=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,i=n?Symbol.for("react.provider"):60109,o=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,c=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,p=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,S=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,v=n?Symbol.for("react.scope"):60119;function O(b){if(typeof b=="object"&&b!==null){var P=b.$$typeof;switch(P){case e:switch(b=b.type,b){case l:case u:case r:case a:case s:case c:return b;default:switch(b=b&&b.$$typeof,b){case o:case f:case m:case p:case i:return b;default:return P}}case t:return P}}}function D(b){return O(b)===u}return Z.AsyncMode=l,Z.ConcurrentMode=u,Z.ContextConsumer=o,Z.ContextProvider=i,Z.Element=e,Z.ForwardRef=f,Z.Fragment=r,Z.Lazy=m,Z.Memo=p,Z.Portal=t,Z.Profiler=a,Z.StrictMode=s,Z.Suspense=c,Z.isAsyncMode=function(b){return D(b)||O(b)===l},Z.isConcurrentMode=D,Z.isContextConsumer=function(b){return O(b)===o},Z.isContextProvider=function(b){return O(b)===i},Z.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Z.isForwardRef=function(b){return O(b)===f},Z.isFragment=function(b){return O(b)===r},Z.isLazy=function(b){return O(b)===m},Z.isMemo=function(b){return O(b)===p},Z.isPortal=function(b){return O(b)===t},Z.isProfiler=function(b){return O(b)===a},Z.isStrictMode=function(b){return O(b)===s},Z.isSuspense=function(b){return O(b)===c},Z.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===u||b===a||b===s||b===c||b===h||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===p||b.$$typeof===i||b.$$typeof===o||b.$$typeof===f||b.$$typeof===S||b.$$typeof===w||b.$$typeof===v||b.$$typeof===y)},Z.typeOf=O,Z}var Q={};/** @license React v16.13.1
33
+ */var Ot;function Kr(){if(Ot)return Z;Ot=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,p=r?Symbol.for("react.suspense_list"):60120,h=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,x=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,b=r?Symbol.for("react.scope"):60119;function E(v){if(typeof v=="object"&&v!==null){var C=v.$$typeof;switch(C){case e:switch(v=v.type,v){case l:case c:case n:case a:case s:case u:return v;default:switch(v=v&&v.$$typeof,v){case o:case f:case g:case h:case i:return v;default:return C}}case t:return C}}}function D(v){return E(v)===c}return Z.AsyncMode=l,Z.ConcurrentMode=c,Z.ContextConsumer=o,Z.ContextProvider=i,Z.Element=e,Z.ForwardRef=f,Z.Fragment=n,Z.Lazy=g,Z.Memo=h,Z.Portal=t,Z.Profiler=a,Z.StrictMode=s,Z.Suspense=u,Z.isAsyncMode=function(v){return D(v)||E(v)===l},Z.isConcurrentMode=D,Z.isContextConsumer=function(v){return E(v)===o},Z.isContextProvider=function(v){return E(v)===i},Z.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},Z.isForwardRef=function(v){return E(v)===f},Z.isFragment=function(v){return E(v)===n},Z.isLazy=function(v){return E(v)===g},Z.isMemo=function(v){return E(v)===h},Z.isPortal=function(v){return E(v)===t},Z.isProfiler=function(v){return E(v)===a},Z.isStrictMode=function(v){return E(v)===s},Z.isSuspense=function(v){return E(v)===u},Z.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===n||v===c||v===a||v===s||v===u||v===p||typeof v=="object"&&v!==null&&(v.$$typeof===g||v.$$typeof===h||v.$$typeof===i||v.$$typeof===o||v.$$typeof===f||v.$$typeof===x||v.$$typeof===O||v.$$typeof===b||v.$$typeof===y)},Z.typeOf=E,Z}var Q={};/** @license React v16.13.1
34
34
  * react-is.development.js
35
35
  *
36
36
  * Copyright (c) Facebook, Inc. and its affiliates.
37
37
  *
38
38
  * This source code is licensed under the MIT license found in the
39
39
  * LICENSE file in the root directory of this source tree.
40
- */var jt;function rn(){return jt||(jt=1,process.env.NODE_ENV!=="production"&&function(){var n=typeof Symbol=="function"&&Symbol.for,e=n?Symbol.for("react.element"):60103,t=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,i=n?Symbol.for("react.provider"):60109,o=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,c=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,p=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,S=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,v=n?Symbol.for("react.scope"):60119;function O(C){return typeof C=="string"||typeof C=="function"||C===r||C===u||C===a||C===s||C===c||C===h||typeof C=="object"&&C!==null&&(C.$$typeof===m||C.$$typeof===p||C.$$typeof===i||C.$$typeof===o||C.$$typeof===f||C.$$typeof===S||C.$$typeof===w||C.$$typeof===v||C.$$typeof===y)}function D(C){if(typeof C=="object"&&C!==null){var N=C.$$typeof;switch(N){case e:var G=C.type;switch(G){case l:case u:case r:case a:case s:case c:return G;default:var ee=G&&G.$$typeof;switch(ee){case o:case f:case m:case p:case i:return ee;default:return N}}case t:return N}}}var b=l,P=u,j=o,U=i,V=e,A=f,F=r,W=m,X=p,B=t,ne=a,J=s,Y=c,z=!1;function k(C){return z||(z=!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.")),d(C)||D(C)===l}function d(C){return D(C)===u}function g(C){return D(C)===o}function x(C){return D(C)===i}function T(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function _(C){return D(C)===f}function R(C){return D(C)===r}function L(C){return D(C)===m}function I(C){return D(C)===p}function $(C){return D(C)===t}function K(C){return D(C)===a}function H(C){return D(C)===s}function re(C){return D(C)===c}Q.AsyncMode=b,Q.ConcurrentMode=P,Q.ContextConsumer=j,Q.ContextProvider=U,Q.Element=V,Q.ForwardRef=A,Q.Fragment=F,Q.Lazy=W,Q.Memo=X,Q.Portal=B,Q.Profiler=ne,Q.StrictMode=J,Q.Suspense=Y,Q.isAsyncMode=k,Q.isConcurrentMode=d,Q.isContextConsumer=g,Q.isContextProvider=x,Q.isElement=T,Q.isForwardRef=_,Q.isFragment=R,Q.isLazy=L,Q.isMemo=I,Q.isPortal=$,Q.isProfiler=K,Q.isStrictMode=H,Q.isSuspense=re,Q.isValidElementType=O,Q.typeOf=D}()),Q}var It;function gr(){return It||(It=1,process.env.NODE_ENV==="production"?Ue.exports=tn():Ue.exports=rn()),Ue.exports}/*
40
+ */var Rt;function Br(){return Rt||(Rt=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,p=r?Symbol.for("react.suspense_list"):60120,h=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,x=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,b=r?Symbol.for("react.scope"):60119;function E(A){return typeof A=="string"||typeof A=="function"||A===n||A===c||A===a||A===s||A===u||A===p||typeof A=="object"&&A!==null&&(A.$$typeof===g||A.$$typeof===h||A.$$typeof===i||A.$$typeof===o||A.$$typeof===f||A.$$typeof===x||A.$$typeof===O||A.$$typeof===b||A.$$typeof===y)}function D(A){if(typeof A=="object"&&A!==null){var F=A.$$typeof;switch(F){case e:var J=A.type;switch(J){case l:case c:case n:case a:case s:case u:return J;default:var ee=J&&J.$$typeof;switch(ee){case o:case f:case g:case h:case i:return ee;default:return F}}case t:return F}}}var v=l,C=c,$=o,Y=i,V=e,j=f,N=n,U=g,B=h,G=t,ne=a,X=s,W=u,z=!1;function I(A){return z||(z=!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.")),d(A)||D(A)===l}function d(A){return D(A)===c}function m(A){return D(A)===o}function w(A){return D(A)===i}function R(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function T(A){return D(A)===f}function P(A){return D(A)===n}function _(A){return D(A)===g}function M(A){return D(A)===h}function k(A){return D(A)===t}function K(A){return D(A)===a}function H(A){return D(A)===s}function re(A){return D(A)===u}Q.AsyncMode=v,Q.ConcurrentMode=C,Q.ContextConsumer=$,Q.ContextProvider=Y,Q.Element=V,Q.ForwardRef=j,Q.Fragment=N,Q.Lazy=U,Q.Memo=B,Q.Portal=G,Q.Profiler=ne,Q.StrictMode=X,Q.Suspense=W,Q.isAsyncMode=I,Q.isConcurrentMode=d,Q.isContextConsumer=m,Q.isContextProvider=w,Q.isElement=R,Q.isForwardRef=T,Q.isFragment=P,Q.isLazy=_,Q.isMemo=M,Q.isPortal=k,Q.isProfiler=K,Q.isStrictMode=H,Q.isSuspense=re,Q.isValidElementType=E,Q.typeOf=D}()),Q}var Dt;function ir(){return Dt||(Dt=1,process.env.NODE_ENV==="production"?Ne.exports=Kr():Ne.exports=Br()),Ne.exports}/*
41
41
  object-assign
42
42
  (c) Sindre Sorhus
43
43
  @license MIT
44
- */var it,Nt;function nn(){if(Nt)return it;Nt=1;var n=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function r(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 u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return it=s()?Object.assign:function(a,i){for(var o,l=r(a),u,f=1;f<arguments.length;f++){o=Object(arguments[f]);for(var c in o)e.call(o,c)&&(l[c]=o[c]);if(n){u=n(o);for(var h=0;h<u.length;h++)t.call(o,u[h])&&(l[u[h]]=o[u[h]])}}return l},it}var ot,Mt;function St(){if(Mt)return ot;Mt=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ot=n,ot}var lt,Ft;function yr(){return Ft||(Ft=1,lt=Function.call.bind(Object.prototype.hasOwnProperty)),lt}var ct,Vt;function sn(){if(Vt)return ct;Vt=1;var n=function(){};if(process.env.NODE_ENV!=="production"){var e=St(),t={},r=yr();n=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(a,i,o,l,u){if(process.env.NODE_ENV!=="production"){for(var f in a)if(r(a,f)){var c;try{if(typeof a[f]!="function"){var h=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 h.name="Invariant Violation",h}c=a[f](i,f,l,o,null,e)}catch(m){c=m}if(c&&!(c instanceof Error)&&n((l||"React class")+": type specification of "+o+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in t)){t[c.message]=!0;var p=u?u():"";n("Failed "+o+" type: "+c.message+(p??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},ct=s,ct}var ut,Yt;function an(){if(Yt)return ut;Yt=1;var n=gr(),e=nn(),t=St(),r=yr(),s=sn(),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 ut=function(o,l){var u=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function c(d){var g=d&&(u&&d[u]||d[f]);if(typeof g=="function")return g}var h="<<anonymous>>",p={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:v(),arrayOf:O,element:D(),elementType:b(),instanceOf:P,node:A(),objectOf:U,oneOf:j,oneOfType:V,shape:W,exact:X};function m(d,g){return d===g?d!==0||1/d===1/g:d!==d&&g!==g}function y(d,g){this.message=d,this.data=g&&typeof g=="object"?g:{},this.stack=""}y.prototype=Error.prototype;function S(d){if(process.env.NODE_ENV!=="production")var g={},x=0;function T(R,L,I,$,K,H,re){if($=$||h,H=H||I,re!==t){if(l){var C=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 C.name="Invariant Violation",C}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var N=$+":"+I;!g[N]&&x<3&&(a("You are manually calling a React.PropTypes validation function for the `"+H+"` prop on `"+$+"`. 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."),g[N]=!0,x++)}}return L[I]==null?R?L[I]===null?new y("The "+K+" `"+H+"` is marked as required "+("in `"+$+"`, but its value is `null`.")):new y("The "+K+" `"+H+"` is marked as required in "+("`"+$+"`, but its value is `undefined`.")):null:d(L,I,$,K,H)}var _=T.bind(null,!1);return _.isRequired=T.bind(null,!0),_}function w(d){function g(x,T,_,R,L,I){var $=x[T],K=J($);if(K!==d){var H=Y($);return new y("Invalid "+R+" `"+L+"` of type "+("`"+H+"` supplied to `"+_+"`, expected ")+("`"+d+"`."),{expectedType:d})}return null}return S(g)}function v(){return S(i)}function O(d){function g(x,T,_,R,L){if(typeof d!="function")return new y("Property `"+L+"` of component `"+_+"` has invalid PropType notation inside arrayOf.");var I=x[T];if(!Array.isArray(I)){var $=J(I);return new y("Invalid "+R+" `"+L+"` of type "+("`"+$+"` supplied to `"+_+"`, expected an array."))}for(var K=0;K<I.length;K++){var H=d(I,K,_,R,L+"["+K+"]",t);if(H instanceof Error)return H}return null}return S(g)}function D(){function d(g,x,T,_,R){var L=g[x];if(!o(L)){var I=J(L);return new y("Invalid "+_+" `"+R+"` of type "+("`"+I+"` supplied to `"+T+"`, expected a single ReactElement."))}return null}return S(d)}function b(){function d(g,x,T,_,R){var L=g[x];if(!n.isValidElementType(L)){var I=J(L);return new y("Invalid "+_+" `"+R+"` of type "+("`"+I+"` supplied to `"+T+"`, expected a single ReactElement type."))}return null}return S(d)}function P(d){function g(x,T,_,R,L){if(!(x[T]instanceof d)){var I=d.name||h,$=k(x[T]);return new y("Invalid "+R+" `"+L+"` of type "+("`"+$+"` supplied to `"+_+"`, expected ")+("instance of `"+I+"`."))}return null}return S(g)}function j(d){if(!Array.isArray(d))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 g(x,T,_,R,L){for(var I=x[T],$=0;$<d.length;$++)if(m(I,d[$]))return null;var K=JSON.stringify(d,function(re,C){var N=Y(C);return N==="symbol"?String(C):C});return new y("Invalid "+R+" `"+L+"` of value `"+String(I)+"` "+("supplied to `"+_+"`, expected one of "+K+"."))}return S(g)}function U(d){function g(x,T,_,R,L){if(typeof d!="function")return new y("Property `"+L+"` of component `"+_+"` has invalid PropType notation inside objectOf.");var I=x[T],$=J(I);if($!=="object")return new y("Invalid "+R+" `"+L+"` of type "+("`"+$+"` supplied to `"+_+"`, expected an object."));for(var K in I)if(r(I,K)){var H=d(I,K,_,R,L+"."+K,t);if(H instanceof Error)return H}return null}return S(g)}function V(d){if(!Array.isArray(d))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var g=0;g<d.length;g++){var x=d[g];if(typeof x!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(x)+" at index "+g+"."),i}function T(_,R,L,I,$){for(var K=[],H=0;H<d.length;H++){var re=d[H],C=re(_,R,L,I,$,t);if(C==null)return null;C.data&&r(C.data,"expectedType")&&K.push(C.data.expectedType)}var N=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new y("Invalid "+I+" `"+$+"` supplied to "+("`"+L+"`"+N+"."))}return S(T)}function A(){function d(g,x,T,_,R){return B(g[x])?null:new y("Invalid "+_+" `"+R+"` supplied to "+("`"+T+"`, expected a ReactNode."))}return S(d)}function F(d,g,x,T,_){return new y((d||"React class")+": "+g+" type `"+x+"."+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+_+"`.")}function W(d){function g(x,T,_,R,L){var I=x[T],$=J(I);if($!=="object")return new y("Invalid "+R+" `"+L+"` of type `"+$+"` "+("supplied to `"+_+"`, expected `object`."));for(var K in d){var H=d[K];if(typeof H!="function")return F(_,R,L,K,Y(H));var re=H(I,K,_,R,L+"."+K,t);if(re)return re}return null}return S(g)}function X(d){function g(x,T,_,R,L){var I=x[T],$=J(I);if($!=="object")return new y("Invalid "+R+" `"+L+"` of type `"+$+"` "+("supplied to `"+_+"`, expected `object`."));var K=e({},x[T],d);for(var H in K){var re=d[H];if(r(d,H)&&typeof re!="function")return F(_,R,L,H,Y(re));if(!re)return new y("Invalid "+R+" `"+L+"` key `"+H+"` supplied to `"+_+"`.\nBad object: "+JSON.stringify(x[T],null," ")+`
45
- Valid keys: `+JSON.stringify(Object.keys(d),null," "));var C=re(I,H,_,R,L+"."+H,t);if(C)return C}return null}return S(g)}function B(d){switch(typeof d){case"number":case"string":case"undefined":return!0;case"boolean":return!d;case"object":if(Array.isArray(d))return d.every(B);if(d===null||o(d))return!0;var g=c(d);if(g){var x=g.call(d),T;if(g!==d.entries){for(;!(T=x.next()).done;)if(!B(T.value))return!1}else for(;!(T=x.next()).done;){var _=T.value;if(_&&!B(_[1]))return!1}}else return!1;return!0;default:return!1}}function ne(d,g){return d==="symbol"?!0:g?g["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&g instanceof Symbol:!1}function J(d){var g=typeof d;return Array.isArray(d)?"array":d instanceof RegExp?"object":ne(g,d)?"symbol":g}function Y(d){if(typeof d>"u"||d===null)return""+d;var g=J(d);if(g==="object"){if(d instanceof Date)return"date";if(d instanceof RegExp)return"regexp"}return g}function z(d){var g=Y(d);switch(g){case"array":case"object":return"an "+g;case"boolean":case"date":case"regexp":return"a "+g;default:return g}}function k(d){return!d.constructor||!d.constructor.name?h:d.constructor.name}return p.checkPropTypes=s,p.resetWarningCache=s.resetWarningCache,p.PropTypes=p,p},ut}var ft,Ut;function on(){if(Ut)return ft;Ut=1;var n=St();function e(){}function t(){}return t.resetWarningCache=e,ft=function(){function r(i,o,l,u,f,c){if(c!==n){var h=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 h.name="Invariant Violation",h}}r.isRequired=r;function s(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:e};return a.PropTypes=a,a},ft}var Wt;function ln(){if(Wt)return Ye.exports;if(Wt=1,process.env.NODE_ENV!=="production"){var n=gr(),e=!0;Ye.exports=an()(n.isElement,e)}else Ye.exports=on()();return Ye.exports}var ae=ln(),cn=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},un=function(e,t){for(var r in e)if(!(r in t))return!0;for(var s in t)if(e[s]!==t[s])return!0;return!1},fn=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],We="http://www.w3.org/2000/svg",Ht="http://www.w3.org/1999/xlink",Xe=function(n){function e(){for(var r,s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];return r=n.call.apply(n,[this].concat(a))||this,r.initialState={hasError:!1,isLoading:!0},r.state=r.initialState,r._isMounted=!1,r.reactWrapper=void 0,r.nonReactWrapper=void 0,r.refCallback=function(o){r.reactWrapper=o},r}qr(e,n);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof cn(this.reactWrapper).Node){var a=this.props,i=a.desc,o=a.evalScripts,l=a.httpRequestWithCredentials,u=a.renumerateIRIElements,f=a.src,c=a.title,h=a.useRequestCache,p=this.props.onError,m=this.props.beforeInjection,y=this.props.afterInjection,S=this.props.wrapper,w,v;S==="svg"?(w=document.createElementNS(We,S),w.setAttribute("xmlns",We),w.setAttribute("xmlns:xlink",Ht),v=document.createElementNS(We,S)):(w=document.createElement(S),v=document.createElement(S)),w.appendChild(v),v.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(w);var O=function(j){if(s.removeSVG(),!s._isMounted){p(j);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){p(j)})},D=function(j,U){if(j){O(j);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{y(U)}catch(V){O(V)}})},b=function(j){if(j.setAttribute("role","img"),i){var U=j.querySelector(":scope > desc");U&&j.removeChild(U);var V=document.createElement("desc");V.innerHTML=i,j.prepend(V)}if(c){var A=j.querySelector(":scope > title");A&&j.removeChild(A);var F=document.createElement("title");F.innerHTML=c,j.prepend(F)}try{m(j)}catch(W){O(W)}};en(v,{afterEach:D,beforeEach:b,cacheRequests:h,evalScripts:o,httpRequestWithCredentials:l,renumerateIRIElements:u})}},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;un(Je({},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=Hr(s,fn),u=o;return Ne.createElement(u,Je({},l,{ref:this.refCallback},o==="svg"?{xmlns:We,xmlnsXlink:Ht}:{}),this.state.isLoading&&i&&Ne.createElement(i,null),this.state.hasError&&a&&Ne.createElement(a,null))},e}(Ne.Component);Xe.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Xe.propTypes={afterInjection:ae.func,beforeInjection:ae.func,desc:ae.string,evalScripts:ae.oneOf(["always","once","never"]),fallback:ae.oneOfType([ae.func,ae.object,ae.string]),httpRequestWithCredentials:ae.bool,loading:ae.oneOfType([ae.func,ae.object,ae.string]),onError:ae.func,renumerateIRIElements:ae.bool,src:ae.string.isRequired,title:ae.string,useRequestCache:ae.bool,wrapper:ae.oneOf(["div","span","svg"])};const Ee={"smp-icon":"_smp-icon_g6sim_1","smp-icon-rotated":"_smp-icon-rotated_g6sim_15","smp-icon-base":"_smp-icon-base_g6sim_19","smp-icon-interactable":"_smp-icon-interactable_g6sim_22","smp-icon-danger":"_smp-icon-danger_g6sim_33","smp-icon-warning":"_smp-icon-warning_g6sim_37","smp-icon-onDanger":"_smp-icon-onDanger_g6sim_45","smp-icon-onPrimary":"_smp-icon-onPrimary_g6sim_49","smp-icon-spin":"_smp-icon-spin_g6sim_53","smp-image-interactable":"_smp-image-interactable_g6sim_58"};let gt={assets:"/"};const dn=n=>{gt={...gt,...n}},qt=n=>`${gt.assets}/${n}`.replace(/\/+/g,"/"),ge=M.memo(({icon:n,width:e,height:t,placeholderIcon:r,color:s,disabled:a,state:i="base",rotated:o=!1,onClick:l,isInteractable:u=!1,spin:f=!1,title:c})=>{const[h,p]=M.useState(n),m=n&&(n.indexOf(".")>-1||n.indexOf("/")>-1||n.indexOf("\\")>-1),y=qt(`assets/svg/${n}.svg`),S=qt(`assets/svg/${r}.svg`),w={img:`${u?Ee["smp-image-interactable"]:""}`,svg:`${Ee["smp-icon"]} ${i?Ee[`smp-icon-${i}`]:""} ${o?Ee["smp-icon-rotated"]:""} ${u?Ee["smp-icon-interactable"]:""} ${f?Ee["smp-icon-spin"]:""}`},v=()=>{!a&&l&&l()};return E.jsx(E.Fragment,{children:m?E.jsx("img",{src:h,width:e||"16px",height:t||"auto",alt:c,onError:()=>p(S),onClick:v,className:w.img,onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&v()}}):E.jsx(Xe,{src:y,fallback:()=>E.jsx(Xe,{src:S,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:c,role:"application",fill:s,"aria-disabled":a,className:w.svg,onClick:v})})}),pe={"smp-textfield-wrapper":"_smp-textfield-wrapper_rs3gf_4","smp-textfield":"_smp-textfield_rs3gf_4","smp-textfield-extraSmall":"_smp-textfield-extraSmall_rs3gf_66","smp-textfield-small":"_smp-textfield-small_rs3gf_71","smp-textfield-medium":"_smp-textfield-medium_rs3gf_76","smp-textfield-large":"_smp-textfield-large_rs3gf_81","smp-textfield-extraLarge":"_smp-textfield-extraLarge_rs3gf_86","smp-textfield-input":"_smp-textfield-input_rs3gf_92","smp-textfield-outlined":"_smp-textfield-outlined_rs3gf_111","smp-textfield-danger":"_smp-textfield-danger_rs3gf_122","smp-textfield-readOnly":"_smp-textfield-readOnly_rs3gf_126","smp-textfield-variant-notSelectable":"_smp-textfield-variant-notSelectable_rs3gf_131","smp-textfield-disabled":"_smp-textfield-disabled_rs3gf_141"},Se=({disabled:n,readOnly:e,bindValue:t,icon:r,onBlur:s,onChange:a,placeholder:i,shapeIcon:o,sizing:l,state:u,variant:f,rotatedShapeIcon:c=!1,onShapeIconClick:h,ref:p,inputRef:m,onKeyDown:y,inputType:S="text",ariaLabel:w="input field",label:v,helperText:O=!1,error:D,appearance:b="base"})=>{const P=D?"danger":u,j=D||u=="danger"?"error":o,U=O||!!D,V=F=>{a==null||a(F.target.value)},A={wrapper:`${pe["smp-textfield-wrapper"]}`,container:`${pe["smp-textfield"]} ${n?pe["smp-textfield-disabled"]:""} ${e?pe["smp-textfield-readOnly"]:""} ${i?pe["smp-textfield-placeholder"]:""} ${l?pe[`smp-textfield-${l}`]:""} ${P?pe[`smp-textfield-${P}`]:""} ${f?pe[`smp-textfield-variant-${f}`]:""} ${b?pe[`smp-textfield-${b}`]:""}`,input:`${pe["smp-textfield-input"]}`};return E.jsxs("div",{className:A.wrapper,children:[v&&E.jsx(pr,{label:v,disabled:n}),E.jsxs("div",{className:A.container,ref:p,children:[r&&E.jsx(ge,{icon:r,disabled:n}),E.jsx("input",{type:S,value:t,placeholder:i,onChange:V,onBlur:s,className:A.input,disabled:n,readOnly:e,onKeyDown:y,"aria-label":w,ref:m}),j&&E.jsx(ge,{icon:j,disabled:n,state:P,onClick:h,rotated:c})]}),U&&E.jsx(Wr,{helperText:D,disabled:n,state:P})]})};function pn({items:n,itemHeight:e,containerHeight:t,overscan:r=5}){const[s,a]=M.useState(0),i=M.useRef(null),o=n.length*e,l=Math.max(0,Math.floor(s/e)-r),u=Math.min(n.length-1,Math.floor((s+t)/e)+r),f=[];for(let p=l;p<=u;p++)f.push({item:n[p],index:p,offsetTop:p*e});const c=M.useCallback(p=>{const m=p.target.scrollTop;a(m)},[]),h=p=>{if(!i.current)return;const m=p*e,y=m+e,S=i.current,w=S.scrollTop,v=w+t;m<w?S.scrollTop=m:y>v&&(S.scrollTop=y-t)};return{virtualItems:f,containerProps:{ref:i,style:{maxHeight:`${t}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:c},innerProps:{style:{height:`${o}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:s,viewportHeight:t,totalHeight:o,startIndex:l,endIndex:u},scrollToIndex:h}}const hn=10,br=({id:n,options:e,displayMode:t,ref:r,showFilter:s,selectedIndex:a=null,activeIndex:i=[],width:o,onClick:l,onKeyDown:u})=>{var A;const[f,c]=M.useState(""),h=24,[p,m]=M.useState(a!==null?a:-1),y=s!==void 0?s:e.length>hn,S=f?e.filter(F=>F.label.toLowerCase().includes(f.toLowerCase())):e,w=F=>{c(F)},{virtualItems:v,containerProps:O,innerProps:D,scrollToIndex:b}=pn({items:S,itemHeight:h,containerHeight:200,overscan:5});M.useEffect(()=>{a!==null&&a!==p&&m(a)},[a]),M.useEffect(()=>{p>=0&&p<S.length&&b(p)},[p,S]);const P=F=>{if(F.key==="ArrowDown"||F.key==="ArrowUp"){F.preventDefault();let W=p;F.key==="ArrowDown"?W=p<S.length-1?p+1:0:F.key==="ArrowUp"&&(W=p>0?p-1:S.length-1),m(W)}else F.key==="Enter"?p>=0&&p<S.length&&(l==null||l(S[p])):F.key==="Escape"&&(F.preventDefault(),F.stopPropagation());u&&u(F)},j=F=>{P(F)},U=F=>{P(F)},V={wrapper:`${De["smp-list"]}`,container:`${De["smp-list-container"]}`,virtualScroll:`${De["smp-list-virtualScroll"]}`,listItem:`${De["smp-list-listItem"]}`};return E.jsxs("div",{id:n,ref:r,className:V.wrapper,style:{width:o},children:[y&&E.jsx(Se,{bindValue:f,placeholder:"Search...",onChange:w,onKeyDown:j}),E.jsx("div",{...O,className:V.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:U,"aria-activedescendant":p>=0&&p<S.length?(A=S[p])==null?void 0:A.id:void 0,children:E.jsx("div",{...D,className:V.virtualScroll,children:v.map(({item:F,index:W,offsetTop:X})=>{const B=i.includes(F.id);return E.jsxs("li",{role:"option",id:F.id,"aria-selected":p===W?"true":"false",tabIndex:-1,className:`${V.listItem} ${p===W?De["selected-item"]:""}`,"aria-label":F.id+"-"+F.label,style:{height:`${h}px`,lineHeight:`calc(${h}px - 2*2px)`,transform:`translateY(${X}px)`},onClick:()=>{l==null||l(F),m(W)},children:[Ge(F.id,F.label,t),B&&E.jsx(ge,{icon:"check",width:16})]},F.id)})})})]})},vr=({displayMode:n,bindValue:e,optionalDisplayValue:t,...r})=>{const[s,a]=M.useState(Ge(e,t,n));return M.useEffect(()=>{a(e)},[e]),M.useEffect(()=>{a(Ge(e,t,n))},[t,n]),E.jsx(Se,{...r,bindValue:s})},mn=n=>{const e=M.useRef(null);return M.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),r=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{r()},n)}},_t=({bindValue:n,optionalDisplayValue:e,options:t,displayMode:r,listDisplayMode:s="Both",minimumChars:a=3,placeholder:i,fun:o,_changeOnEnter:l=!1,onChange:u,onOptionsRequest:f,_multiActiveIndex:c,...h})=>{const[p,m]=M.useState(n),[y,S]=M.useState(e),[w,v]=M.useState(!1),[O,D]=M.useState(t||[]),[b,P]=M.useState(0),[j,U]=M.useState([n]),{anchorRef:V,targetRef:A,anchorWidth:F}=xt({position:"bottom",enabled:w});ze(A,()=>v(!1));const W=mn(400),X=Y=>{Y.length>=a?o&&f&&W(async()=>{const z=await f(o,Y);D(z),P(z.length>0?0:-1),v(!0)}):v(!1),m(Y),S(e),l||u==null||u(Y,e)},B=Y=>{l?(m(""),S("")):(m(Y.id),S(Y.label)),u==null||u(Y.id,Y.label);const z=O.findIndex(k=>k.id===Y.id);P(z),U([Y.id]),v(!1)},ne=Y=>{Y.key==="Escape"&&(v(!1),P(-1))},J=Y=>{if((Y.key==="ArrowDown"||Y.key==="ArrowUp")&&(Y.preventDefault(),w)){const z=Y.key==="ArrowDown"?(b+1)%O.length:(b-1+O.length)%O.length;P(z)}switch(Y.key){case"Enter":b>=0&&b<O.length?B(O[b]):l&&(u==null||u(p,""),v(!1),m(""),S(""));break;case"Escape":v(!1),P(-1);break}};return E.jsxs("div",{children:[E.jsx(vr,{...h,bindValue:p,optionalDisplayValue:y,displayMode:r,shapeIcon:"magnify",placeholder:i,ref:V,onChange:X,onKeyDown:J,"aria-autocomplete":"list"}),w&&E.jsx(br,{options:O,displayMode:s,onClick:B,ref:A,selectedIndex:b,activeIndex:c||j,width:F,showFilter:!1,onKeyDown:ne})]})},Kt=n=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[n],Bt=n=>({primary:"onPrimary",danger:"onDanger",base:"base"})[n],Ce={"smp-button-container":"_smp-button-container_1v5bs_1","smp-button-extraSmall":"_smp-button-extraSmall_1v5bs_65","smp-button-small":"_smp-button-small_1v5bs_70","smp-button-base":"_smp-button-base_1v5bs_75","smp-button-large":"_smp-button-large_1v5bs_80","smp-button-extraLarge":"_smp-button-extraLarge_1v5bs_85","smp-button-fullWidth":"_smp-button-fullWidth_1v5bs_90","smp-buttonType-raised":"_smp-buttonType-raised_1v5bs_95","smp-buttonVariant-base":"_smp-buttonVariant-base_1v5bs_97","smp-buttonVariant-primary":"_smp-buttonVariant-primary_1v5bs_111","smp-buttonVariant-danger":"_smp-buttonVariant-danger_1v5bs_125","smp-buttonType-outlined":"_smp-buttonType-outlined_1v5bs_152","smp-buttonType-ghost":"_smp-buttonType-ghost_1v5bs_214"},Le=({bindValue:n,onClick:e,ariaLabel:t,icon:r,disabled:s,sizing:a="base",variant:i="primary",appearance:o="raised",showIcon:l=!0,showText:u=!0,fullWidth:f=!1,loading:c=!1,title:h,optionalDisplayValue:p})=>{const m={container:`${Ce["smp-button-container"]} ${a?Ce[`smp-button-${a}`]:""} ${i?Ce[`smp-buttonVariant-${i}`]:""} ${o?Ce[`smp-buttonType-${o}`]:""} ${f?Ce["smp-button-fullWidth"]:""}`};return E.jsx("button",{className:m.container,onClick:e,"aria-label":t,disabled:s,"aria-busy":c,title:h||p,children:c?E.jsx(ge,{icon:"spinner",state:Bt(i),spin:!0}):E.jsxs(E.Fragment,{children:[r&&l&&E.jsx(ge,{icon:r,disabled:s,state:Bt(i),width:Kt(a),height:Kt(a)}),u&&n&&E.jsx("span",{children:n})]})})},xr=({bindValue:n,onChange:e,onBlur:t})=>{const r=s=>{e&&e(s.target.checked)};return E.jsx("input",{type:"checkbox",checked:n,onChange:r,onBlur:t})},gn={titleLarge:"h2",title:"h3",body:"h6",label:"label"},dt={"smp-typography":"_smp-typography_oznk3_1","smp-typography-body":"_smp-typography-body_oznk3_12","smp-typography-large":"_smp-typography-large_oznk3_16","smp-typography-titleLarge":"_smp-typography-titleLarge_oznk3_20","smp-typography-label":"_smp-typography-label_oznk3_24","smp-typography-disabled":"_smp-typography-disabled_oznk3_29"},yn=({variant:n="body",bindValue:e,color:t,...r})=>{const s=gn[n],a={container:`${dt["smp-typography"]} ${n?dt[`smp-typography-${n}`]:""} ${r.disabled?dt["smp-typography-disabled"]:""}`};return E.jsx(s,{className:a.container,disabled:r.disabled,style:{"--smp-typography-color-base":t},children:e})},zt={"smp-chips-container":"_smp-chips-container_1i0jc_1","smp-chips-element":"_smp-chips-element_1i0jc_11"},Sr=({elements:n,isEditable:e=!1,displayMode:t="Both",onChange:r,color:s,backgroundColor:a})=>{const i={container:`${zt["smp-chips-container"]}`,element:`${zt["smp-chips-element"]}`},o=l=>{r==null||r(n.filter((u,f)=>f!==l))};return E.jsx("div",{className:i.container,role:"list",children:n.map((l,u)=>{const f=Ge(l.bindValue,l.optionalDisplayValue,t);return E.jsxs("div",{className:i.element,role:"listitem",style:{"--smp-chips-backgroundColor-base":a},children:[E.jsx(yn,{variant:"label",bindValue:f,color:s}),e&&E.jsx(ge,{icon:"close",isInteractable:!0,onClick:()=>o(u),color:s})]},u)})})};function _r(n,e){const t=M.useRef(null);M.useEffect(()=>{if(!n)return;const r=typeof e=="object"&&e!==null&&"current"in e?e.current:null;if(!r)return;t.current=document.activeElement;const s=()=>r?Array.from(r.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(u=>!u.hasAttribute("disabled")&&u.offsetParent!==null):[];(()=>{const u=s();u.length>0&&requestAnimationFrame(()=>u[0].focus())})();const i=u=>{if(u.key==="Escape"||u.key!=="Tab")return;const f=s();if(f.length===0)return;const c=f[0],h=f[f.length-1];u.shiftKey&&document.activeElement===c?(u.preventDefault(),h.focus()):!u.shiftKey&&document.activeElement===h&&(u.preventDefault(),c.focus())},o=u=>{if(r&&!r.contains(u.target)){u.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 u;(u=t.current)==null||u.focus()})}},[n,e])}const Er=({bindValue:n,onChange:e,options:t=[],optionalDisplayValue:r,displayMode:s,listDisplayMode:a="Both",fun:i,onOptionsRequest:o,multiActiveIndex:l,...u})=>{const[f,c]=M.useState(!1),[h,p]=M.useState(t),[m,y]=M.useState(-1),[S,w]=M.useState([n]),v=M.useId(),{anchorRef:O,targetRef:D,anchorWidth:b}=xt({position:"bottom",enabled:f});ze(D,()=>c(!1)),_r(f,D);const P=A=>{e==null||e(A.id,A.label);const F=h.findIndex(W=>W.id===A.id);y(F),w([A.id]),c(!1)},j=A=>{A.key==="Escape"&&(c(!1),y(-1))},U=A=>{(A.key==="ArrowDown"||A.key==="ArrowUp")&&(A.preventDefault(),V())},V=()=>{i&&o&&o(i,void 0).then(A=>{p(A),y(A.length>0?0:-1),c(!0)})};return E.jsxs("div",{role:"combobox","aria-expanded":f,"aria-controls":v,"aria-owns":v,children:[E.jsx(vr,{...u,bindValue:n,optionalDisplayValue:r,displayMode:s,onShapeIconClick:V,onKeyDown:U,shapeIcon:"arrow_drop_down",rotatedShapeIcon:f,readOnly:!0,ref:O,"aria-autocomplete":"list",variant:"notSelectable"}),f&&E.jsx(br,{id:v,options:h,displayMode:a,ref:D,selectedIndex:m,activeIndex:l||S,width:b,onClick:P,onKeyDown:j})]})},q=n=>typeof n=="string",Pe=()=>{let n,e;const t=new Promise((r,s)=>{n=r,e=s});return t.resolve=n,t.reject=e,t},Gt=n=>n==null?"":""+n,bn=(n,e,t)=>{n.forEach(r=>{e[r]&&(t[r]=e[r])})},vn=/###/g,Jt=n=>n&&n.indexOf("###")>-1?n.replace(vn,"."):n,Xt=n=>!n||q(n),$e=(n,e,t)=>{const r=q(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(Xt(n))return{};const a=Jt(r[s]);!n[a]&&t&&(n[a]=new t),Object.prototype.hasOwnProperty.call(n,a)?n=n[a]:n={},++s}return Xt(n)?{}:{obj:n,k:Jt(r[s])}},Zt=(n,e,t)=>{const{obj:r,k:s}=$e(n,e,Object);if(r!==void 0||e.length===1){r[s]=t;return}let a=e[e.length-1],i=e.slice(0,e.length-1),o=$e(n,i,Object);for(;o.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),o=$e(n,i,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${a}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=t},xn=(n,e,t,r)=>{const{obj:s,k:a}=$e(n,e,Object);s[a]=s[a]||[],s[a].push(t)},Ze=(n,e)=>{const{obj:t,k:r}=$e(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r]},Sn=(n,e,t)=>{const r=Ze(n,t);return r!==void 0?r:Ze(e,t)},wr=(n,e,t)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?q(n[r])||n[r]instanceof String||q(e[r])||e[r]instanceof String?t&&(n[r]=e[r]):wr(n[r],e[r],t):n[r]=e[r]);return n},we=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const En=n=>q(n)?n.replace(/[&<>"'\/]/g,e=>_n[e]):n;class wn{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 r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const On=[" ",",","?","!",";"],Tn=new wn(20),Rn=(n,e,t)=>{e=e||"",t=t||"";const r=On.filter(i=>e.indexOf(i)<0&&t.indexOf(i)<0);if(r.length===0)return!0;const s=Tn.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!s.test(n);if(!a){const i=n.indexOf(t);i>0&&!s.test(n.substring(0,i))&&(a=!0)}return a},yt=(n,e,t=".")=>{if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const r=e.split(t);let s=n;for(let a=0;a<r.length;){if(!s||typeof s!="object")return;let i,o="";for(let l=a;l<r.length;++l)if(l!==a&&(o+=t),o+=r[l],i=s[o],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<r.length-1)continue;a+=l-a+1;break}s=i}return s},je=n=>n==null?void 0:n.replace("_","-"),Dn={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){var t,r;(r=(t=console==null?void 0:console[n])==null?void 0:t.apply)==null||r.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,r,s){return s&&!this.debug?null:(q(e[0])&&(e[0]=`${r}${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 me=new Qe;class tt{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(t)||0;this.observers[r].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 Qt 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,r,s={}){var u,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],r&&(Array.isArray(r)?o.push(...r):q(r)&&a?o.push(...r.split(a)):o.push(r)));const l=Ze(this.data,o);return!l&&!t&&!r&&e.indexOf(".")>-1&&(e=o[0],t=o[1],r=o.slice(2).join(".")),l||!i||!q(r)?l:yt((f=(u=this.data)==null?void 0:u[e])==null?void 0:f[t],r,a)}addResource(e,t,r,s,a={silent:!1}){const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let o=[e,t];r&&(o=o.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(o=e.split("."),s=t,t=o[1]),this.addNamespaces(t),Zt(this.data,o,s),a.silent||this.emit("added",e,t,r,s)}addResources(e,t,r,s={silent:!1}){for(const a in r)(q(r[a])||Array.isArray(r[a]))&&this.addResource(e,t,a,r[a],{silent:!0});s.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,s,a,i={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),s=r,r=t,t=o[1]),this.addNamespaces(t);let l=Ze(this.data,o)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?wr(l,r,a):l={...l,...r},Zt(this.data,o,l),i.silent||this.emit("added",e,t,r)}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 Or={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,r,s){return n.forEach(a=>{var i;e=((i=this.processors[a])==null?void 0:i.process(e,t,r,s))??e}),e}};const er={},tr=n=>!q(n)&&typeof n!="boolean"&&typeof n!="number";class et extends tt{constructor(e,t={}){super(),bn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=me.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const r={...t};if(e==null)return!1;const s=this.resolve(e,r);return(s==null?void 0:s.res)!==void 0}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Rn(e,r,s);if(i&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:q(a)?[a]:a};const u=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(s)}return{key:e,namespaces:q(a)?[a]:a}}translate(e,t,r){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),u=l[l.length-1];let f=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const c=s.lng||this.language,h=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode")return h?a?{res:`${u}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:`${u}${f}${o}`:a?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:o;const p=this.resolve(e,s);let m=p==null?void 0:p.res;const y=(p==null?void 0:p.usedKey)||o,S=(p==null?void 0:p.exactUsedKey)||o,w=["[object Number]","[object Function]","[object RegExp]"],v=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject,D=s.count!==void 0&&!q(s.count),b=et.hasDefaultValue(s),P=D?this.pluralResolver.getSuffix(c,s.count,s):"",j=s.ordinal&&D?this.pluralResolver.getSuffix(c,s.count,{ordinal:!1}):"",U=D&&!s.ordinal&&s.count===0,V=U&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${P}`]||s[`defaultValue${j}`]||s.defaultValue;let A=m;O&&!m&&b&&(A=V);const F=tr(A),W=Object.prototype.toString.apply(A);if(O&&A&&F&&w.indexOf(W)<0&&!(q(v)&&Array.isArray(A))){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(y,A,{...s,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return a?(p.res=X,p.usedParams=this.getUsedParamsDetails(s),p):X}if(i){const X=Array.isArray(A),B=X?[]:{},ne=X?S:y;for(const J in A)if(Object.prototype.hasOwnProperty.call(A,J)){const Y=`${ne}${i}${J}`;b&&!m?B[J]=this.translate(Y,{...s,defaultValue:tr(V)?V[J]:void 0,joinArrays:!1,ns:l}):B[J]=this.translate(Y,{...s,joinArrays:!1,ns:l}),B[J]===Y&&(B[J]=A[J])}m=B}}else if(O&&q(v)&&Array.isArray(m))m=m.join(v),m&&(m=this.extendTranslation(m,e,s,r));else{let X=!1,B=!1;!this.isValidLookup(m)&&b&&(X=!0,m=V),this.isValidLookup(m)||(B=!0,m=o);const J=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:m,Y=b&&V!==m&&this.options.updateMissing;if(B||X||Y){if(this.logger.log(Y?"updateKey":"missingKey",c,u,o,Y?V:m),i){const g=this.resolve(o,{...s,keySeparator:!1});g&&g.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 z=[];const k=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&k&&k[0])for(let g=0;g<k.length;g++)z.push(k[g]);else this.options.saveMissingTo==="all"?z=this.languageUtils.toResolveHierarchy(s.lng||this.language):z.push(s.lng||this.language);const d=(g,x,T)=>{var R;const _=b&&T!==m?T:J;this.options.missingKeyHandler?this.options.missingKeyHandler(g,u,x,_,Y,s):(R=this.backendConnector)!=null&&R.saveMissing&&this.backendConnector.saveMissing(g,u,x,_,Y,s),this.emit("missingKey",g,u,x,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&D?z.forEach(g=>{const x=this.pluralResolver.getSuffixes(g,s);U&&s[`defaultValue${this.options.pluralSeparator}zero`]&&x.indexOf(`${this.options.pluralSeparator}zero`)<0&&x.push(`${this.options.pluralSeparator}zero`),x.forEach(T=>{d([g],o+T,s[`defaultValue${T}`]||V)})}):d(z,o,V))}m=this.extendTranslation(m,e,s,p,r),B&&m===o&&this.options.appendNamespaceToMissingKey&&(m=`${u}${f}${o}`),(B||X)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${f}${o}`:o,X?m:void 0,s))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(s),p):m}extendTranslation(e,t,r,s,a){var l,u;if((l=this.i18nFormat)!=null&&l.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=q(e)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(f){const p=e.match(this.interpolator.nestingRegexp);c=p&&p.length}let h=r.replace&&!q(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,r.lng||this.language||s.usedLng,r),f){const p=e.match(this.interpolator.nestingRegexp),m=p&&p.length;c<m&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...p)=>(a==null?void 0:a[0])===p[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${t[0]}`),null):this.translate(...p,t),r)),r.interpolation&&this.interpolator.reset()}const i=r.postProcess||this.options.postProcess,o=q(i)?[i]:i;return e!=null&&(o!=null&&o.length)&&r.applyPostProcessor!==!1&&(e=Or.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,s,a,i,o;return q(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,t),f=u.key;s=f;let c=u.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const h=t.count!==void 0&&!q(t.count),p=h&&!t.ordinal&&t.count===0,m=t.context!==void 0&&(q(t.context)||typeof t.context=="number")&&t.context!=="",y=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(S=>{var w,v;this.isValidLookup(r)||(o=S,!er[`${y[0]}-${S}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((v=this.utils)!=null&&v.hasLoadedNamespace(o))&&(er[`${y[0]}-${S}`]=!0,this.logger.warn(`key "${s}" for languages "${y.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!!!")),y.forEach(O=>{var P;if(this.isValidLookup(r))return;i=O;const D=[f];if((P=this.i18nFormat)!=null&&P.addLookupKeys)this.i18nFormat.addLookupKeys(D,f,O,S,t);else{let j;h&&(j=this.pluralResolver.getSuffix(O,t.count,t));const U=`${this.options.pluralSeparator}zero`,V=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(D.push(f+j),t.ordinal&&j.indexOf(V)===0&&D.push(f+j.replace(V,this.options.pluralSeparator)),p&&D.push(f+U)),m){const A=`${f}${this.options.contextSeparator}${t.context}`;D.push(A),h&&(D.push(A+j),t.ordinal&&j.indexOf(V)===0&&D.push(A+j.replace(V,this.options.pluralSeparator)),p&&D.push(A+U))}}let b;for(;b=D.pop();)this.isValidLookup(r)||(a=b,r=this.getResource(O,S,b,t))}))})}),{res:r,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,r,s={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,r,s):this.resourceStore.getResource(e,t,r,s)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!q(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const a of t)delete s[a]}return s}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&e[r]!==void 0)return!0;return!1}}class rr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=me.create("languageUtils")}getScriptPartFromCode(e){if(e=je(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=je(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(r=>{if(t)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const s=this.getScriptPartFromCode(r);if(this.isSupportedCode(s))return t=s;const a=this.getLanguagePartFromCode(r);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 r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=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)),r.forEach(i=>{s.indexOf(i)<0&&a(this.formatLanguageCode(i))}),s}}const nr={zero:0,one:1,two:2,few:3,many:4,other:5},sr={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Cn{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=me.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const r=je(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:s});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),sr;if(!e.match(/-|_/))return sr;const l=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(l,t)}return this.pluralRulesCache[a]=i,i}needsPlural(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,r={}){return this.getSuffixes(e,r).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((s,a)=>nr[s]-nr[a]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,r={}){const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const ar=(n,e,t,r=".",s=!0)=>{let a=Sn(n,e,t);return!a&&s&&q(t)&&(a=yt(n,t,r),a===void 0&&(a=yt(e,t,r))),a},pt=n=>n.replace(/\$/g,"$$$$");class Pn{constructor(e={}){var t;this.logger=me.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(r=>r),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:s,prefix:a,prefixEscaped:i,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:f,unescapePrefix:c,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:y,nestingOptionsSeparator:S,maxReplaces:w,alwaysFormat:v}=e.interpolation;this.escape=t!==void 0?t:En,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?we(a):i||"{{",this.suffix=o?we(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=h?we(h):p||we("$t("),this.nestingSuffix=m?we(m):y||we(")"),this.nestingOptionsSeparator=S||",",this.maxReplaces=w||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,r)=>(t==null?void 0:t.source)===r?(t.lastIndex=0,t):new RegExp(r,"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,r,s){var p;let a,i,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const v=ar(t,l,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,r,{...s,...t,interpolationkey:m}):v}const y=m.split(this.formatSeparator),S=y.shift().trim(),w=y.join(this.formatSeparator).trim();return this.format(ar(t,l,S,this.options.keySeparator,this.options.ignoreJSONStructure),w,r,{...s,...t,interpolationkey:S})};this.resetRegExp();const f=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,c=((p=s==null?void 0:s.interpolation)==null?void 0:p.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>pt(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?pt(this.escape(m)):pt(m)}].forEach(m=>{for(o=0;a=m.regex.exec(e);){const y=a[1].trim();if(i=u(y),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,y))i="";else if(c){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),i="";else!q(i)&&!this.useRawValueToEscape&&(i=Gt(i));const S=m.safeValue(i);if(e=e.replace(a[0],S),c?(m.regex.lastIndex+=i.length,m.regex.lastIndex-=a[0].length):m.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,r={}){let s,a,i;const o=(l,u)=>{const f=this.nestingOptionsSeparator;if(l.indexOf(f)<0)return l;const c=l.split(new RegExp(`${f}[ ]*{`));let h=`{${c[1]}`;l=c[0],h=this.interpolate(h,i);const p=h.match(/'/g),m=h.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!m||m.length%2!==0)&&(h=h.replace(/'/g,'"'));try{i=JSON.parse(h),u&&(i={...u,...i})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,y),`${l}${f}${h}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];i={...r},i=i.replace&&!q(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(c=>c.trim());s[1]=f.shift(),l=f,u=!0}if(a=t(o.call(this,s[1].trim(),i),i),a&&s[0]===e&&!q(a))return a;q(a)||(a=Gt(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),a=""),u&&(a=l.reduce((f,c)=>this.format(f,c,r.lng,{...r,interpolationkey:s[1].trim()}),a.trim())),e=e.replace(s[0],a),this.regexp.lastIndex=0}return e}}const An=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const r=n.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[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(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();t[f]||(t[f]=u),u==="false"&&(t[f]=!1),u==="true"&&(t[f]=!0),isNaN(u)||(t[f]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},ir=n=>{const e={};return(t,r,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});const i=r+JSON.stringify(a);let o=e[i];return o||(o=n(je(r),s),e[i]=o),o(t)}},$n=n=>(e,t,r)=>n(je(t),r)(e);class kn{constructor(e={}){this.logger=me.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const r=t.cacheInBuiltFormats?ir:$n;this.formats={number:r((s,a)=>{const i=new Intl.NumberFormat(s,{...a});return o=>i.format(o)}),currency:r((s,a)=>{const i=new Intl.NumberFormat(s,{...a,style:"currency"});return o=>i.format(o)}),datetime:r((s,a)=>{const i=new Intl.DateTimeFormat(s,{...a});return o=>i.format(o)}),relativetime:r((s,a)=>{const i=new Intl.RelativeTimeFormat(s,{...a});return o=>i.format(o,a.range||"day")}),list:r((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()]=ir(t)}format(e,t,r,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 c;const{formatName:u,formatOptions:f}=An(l);if(this.formats[u]){let h=o;try{const p=((c=s==null?void 0:s.formatParams)==null?void 0:c[s.interpolationkey])||{},m=p.locale||p.lng||s.locale||s.lng||r;h=this.formats[u](o,m,{...f,...s,...p})}catch(p){this.logger.warn(p)}return h}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}const Ln=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class jn extends tt{constructor(e,t,r,s={}){var a,i;super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=me.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,r,s.backend,s)}queueLoad(e,t,r,s){const a={},i={},o={},l={};return e.forEach(u=>{let f=!0;t.forEach(c=>{const h=`${u}|${c}`;!r.reload&&this.store.hasResourceBundle(u,c)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?i[h]===void 0&&(i[h]=!0):(this.state[h]=1,f=!1,i[h]===void 0&&(i[h]=!0),a[h]===void 0&&(a[h]=!0),l[c]===void 0&&(l[c]=!0)))}),f||(o[u]=!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,r){const s=e.split("|"),a=s[0],i=s[1];t&&this.emit("failedLoading",a,i,t),!t&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const o={};this.queue.forEach(l=>{xn(l.loaded,[a],i),Ln(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const f=l.loaded[u];f.length&&f.forEach(c=>{o[u][c]===void 0&&(o[u][c]=!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,r,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:r,tried:s,wait:a,callback:i});return}this.readingCalls++;const o=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(u&&f&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,r,s+1,a*2,i)},a);return}i(u,f)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(f=>o(null,f)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,t,o)}prepareLoading(e,t,r={},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,r,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e,t=""){const r=e.split("|"),s=r[0],a=r[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,r,s,a,i={},o=()=>{}){var l,u,f,c,h;if((u=(l=this.services)==null?void 0:l.utils)!=null&&u.hasLoadedNamespace&&!((c=(f=this.services)==null?void 0:f.utils)!=null&&c.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${r}" 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(!(r==null||r==="")){if((h=this.backend)!=null&&h.create){const p={...i,isUpdate:a},m=this.backend.create.bind(this.backend);if(m.length<6)try{let y;m.length===5?y=m(e,t,r,s,p):y=m(e,t,r,s),y&&typeof y.then=="function"?y.then(S=>o(null,S)).catch(o):o(null,y)}catch(y){o(y)}else m(e,t,r,s,o,p)}!e||!e[0]||this.store.addResource(e[0],t,r,s)}}}const or=()=>({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:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),q(n[1])&&(e.defaultValue=n[1]),q(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(r=>{e[r]=t[r]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),lr=n=>{var e,t;return q(n.ns)&&(n.ns=[n.ns]),q(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),q(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((t=(e=n.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},He=()=>{},In=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class Ie extends tt{constructor(e={},t){if(super(),this.options=lr(e),this.services={},this.logger=me,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 r=or();this.options={...r,...this.options,...lr(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const s=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?me.init(s(this.modules.logger),this.options):me.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=kn;const f=new rr(this.options);this.store=new Qt(this.options.resources,this.options);const c=this.services;c.logger=me,c.resourceStore=this.store,c.languageUtils=f,c.pluralResolver=new Cn(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(c.formatter=s(u),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Pn(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new jn(s(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.languageDetector&&(c.languageDetector=s(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=s(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new et(this.services,this.options),this.translator.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,t||(t=He),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[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(u=>{this[u]=(...f)=>this.store[u](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...f)=>(this.store[u](...f),this)});const o=Pe(),l=()=>{const u=(f,c)=>{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(c),t(f,c)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(e,t=He){var a,i;let r=t;const s=q(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};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,u=>l(u)),this.services.backendConnector.load(o,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(e,t,r){const s=Pe();return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=He),this.services.backendConnector.reload(e,t,a=>{s.resolve(),r(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"&&Or.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 r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;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 r=Pe();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,r.resolve((...u)=>this.t(...u)),t&&t(o,(...u)=>this.t(...u))},i=o=>{var f,c;!e&&!o&&this.services.languageDetector&&(o=[]);const l=q(o)?o:o&&o[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(q(o)?[o]:o);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),(c=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||c.call(f,u)),this.loadResources(u,h=>{a(h,u)})};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),r}getFixedT(e,t,r){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||r||s.keyPrefix);const u=this.options.keySeparator||".";let f;return l.keyPrefix&&Array.isArray(a)?f=a.map(c=>`${l.keyPrefix}${u}${c}`):f=l.keyPrefix?`${l.keyPrefix}${u}${a}`:a,this.t(f,l)};return q(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=r,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 r=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const o=t.precheck(this,i);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!s||i(a,e)))}loadNamespaces(e,t){const r=Pe();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=>{r.resolve(),t&&t(s)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=Pe();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=>{r.resolve(),t&&t(i)}),r):(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"],r=((a=this.services)==null?void 0:a.languageUtils)||new rr(or());return t.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new Ie(e,t)}cloneInstance(e={},t=He){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new Ie(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)},r){const o=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((f,c)=>(f[c]={...l[u][c]},f),l[u]),l),{});a.store=new Qt(o,s),a.services.resourceStore=a.store}return a.translator=new et(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 se=Ie.createInstance();se.createInstance=Ie.createInstance;se.createInstance;se.dir;se.init;se.loadResources;se.reloadResources;se.use;se.changeLanguage;se.getFixedT;se.t;se.exists;se.setDefaultNamespace;se.hasLoadedNamespace;se.loadNamespaces;se.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 cr(n,e){return new RegExp(qn(n),e)}function qn(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Kn(n,e,t,r){let s=e;const a=Bn(n,t);if(!s){const o=Math.abs(a);o-Math.floor(o)?s="0,0.00":s="0,0"}const i=zn(s);return new Intl.NumberFormat(r,i).format(a)}function Bn(n,e,t,r,s){let a=n;if(typeof a!="number"){let o;e&&r===void 0?o=",":o=".";const l=o=="."?",":".";a=a.replace(cr(l,"g"),""),a=a.replace(cr(o,"g"),"."),a=Number(a)}const i=Number(a);return isNaN(i)?NaN:i}function zn(n){const e={};n.includes(",")?e.useGrouping=!0:e.useGrouping=!1;const t=n.indexOf(".");if(t>-1){const s=(n.substring(t+1).match(/0/g)||[]).length;e.minimumFractionDigits=s,e.maximumFractionDigits=s}else e.minimumFractionDigits=0,e.maximumFractionDigits=0;return e}se.init({lng:typeof navigator<"u"&&navigator.language.split("-")[0]||"en",fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,e,t,r)=>{const s=(r==null?void 0:r.type)??"number";try{switch(s){case"date":{const a=n instanceof Date?n:new Date(n);return new Intl.DateTimeFormat(t,{dateStyle:e||"short"}).format(a)}default:case"number":{const a=(r==null?void 0:r.inputIsLocalized)??!1;return Kn(n,e,a,t)}}}catch{return n}}},resources:{en:{translation:Hn},it:{translation:Vn}}});const Gn=(n,e,t,r)=>se.format(n,e,t||se.language,r),Jn=(n,e)=>se.t(n,e);function rt(){const n=M.useCallback((r,s,a,i)=>Gn(r,s,a||void 0,i),[]),e=M.useCallback(()=>se.languages[0],[]),t=M.useCallback((r,s)=>Jn(r,s),[]);return{format:n,getCurrentLanguage:e,translate:t}}var Et=(n=>(n.CALENDAR_FOR="Date.CalendarFor",n.CLOSE="Generic.Close",n.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",n))(Et||{}),ie=(n=>(n.MONDAY="Day.Monday",n.MONDAY_SHORT="Day.MondayShort",n.TUESDAY="Day.Tuesday",n.TUESDAY_SHORT="Day.TuesdayShort",n.WEDNESDAY="Day.Wednesday",n.WEDNESDAY_SHORT="Day.WednesdayShort",n.THURSDAY="Day.Thursday",n.THURSDAY_SHORT="Day.ThursdayShort",n.FRIDAY="Day.Friday",n.FRIDAY_SHORT="Day.FridayShort",n.SATURDAY="Day.Saturday",n.SATURDAY_SHORT="Day.SaturdayShort",n.SUNDAY="Day.Sunday",n.SUNDAY_SHORT="Day.SundayShort",n))(ie||{}),oe=(n=>(n.JANUARY="Month.January",n.FEBRUARY="Month.February",n.MARCH="Month.March",n.APRIL="Month.April",n.MAY="Month.May",n.JUNE="Month.June",n.JULY="Month.July",n.AUGUST="Month.August",n.SEPTEMBER="Month.September",n.OCTOBER="Month.October",n.NOVEMBER="Month.November",n.DECEMBER="Month.December",n))(oe||{}),bt=(n=>(n.PREVIOUS_DAY="Date.PreviousDay",n.PREVIOUS_WEEK="Date.PreviousWeek",n.PREVIOUS_MONTH="Date.PreviousMonth",n.PREVIOUS_YEAR="Date.PreviousYear",n.NEXT_DAY="Date.NextDay",n.NEXT_WEEK="Date.NextWeek",n.NEXT_MONTH="Date.NextMonth",n.NEXT_YEAR="Date.NextYear",n.YESTERDAY="Date.Yesterday",n.TODAY="Date.Today",n.TOMORROW="Date.Tomorrow",n))(bt||{});const he={"smp-datepickercalendar":"_smp-datepickercalendar_u2io5_1","smp-datepickercalendar-table":"_smp-datepickercalendar-table_u2io5_30","smp-datepickercalendar-th":"_smp-datepickercalendar-th_u2io5_42","smp-datepickercalendar-td":"_smp-datepickercalendar-td_u2io5_53","smp-datepickercalendar-td-today":"_smp-datepickercalendar-td-today_u2io5_72","smp-datepickercalendar-td-selected":"_smp-datepickercalendar-td-selected_u2io5_78","smp-datepickercalendar-td-focused":"_smp-datepickercalendar-td-focused_u2io5_83","smp-datepickercalendar-label":"_smp-datepickercalendar-label_u2io5_93"};function Xn({selectedDate:n,onDateChange:e,disabledDateRanges:t=[],initialValue:r,targetRef:s}){const{translate:a}=rt(),i=()=>{if(!r)return;const k=new Date(r);return isNaN(k.getTime())?void 0:k},[o]=M.useState(new Date),[l,u]=M.useState(n||i()||new Date),[f,c]=M.useState(l?l.getMonth():new Date().getMonth()),[h,p]=M.useState(l?l.getFullYear():new Date().getFullYear()),[m,y]=M.useState(l?l.getDate():null),S=M.useRef(null),w=M.useRef([]),v=[a(oe.JANUARY),a(oe.FEBRUARY),a(oe.MARCH),a(oe.APRIL),a(oe.MAY),a(oe.JUNE),a(oe.JULY),a(oe.AUGUST),a(oe.SEPTEMBER),a(oe.OCTOBER),a(oe.NOVEMBER),a(oe.DECEMBER)],O=[{value:a(ie.SUNDAY_SHORT),full:a(ie.SUNDAY)},{value:a(ie.MONDAY_SHORT),full:a(ie.MONDAY)},{value:a(ie.TUESDAY_SHORT),full:a(ie.TUESDAY)},{value:a(ie.WEDNESDAY_SHORT),full:a(ie.WEDNESDAY)},{value:a(ie.THURSDAY_SHORT),full:a(ie.THURSDAY)},{value:a(ie.FRIDAY_SHORT),full:a(ie.FRIDAY)},{value:a(ie.SATURDAY_SHORT),full:a(ie.SATURDAY)}],D=k=>t.some(d=>{const g=d.start.getTime(),x=d.end.getTime(),T=k.getTime();return T>=g&&T<=x}),b=k=>{D(k)||(u(k),y(k.getDate()),e&&e(Ur(k)))},P=()=>{f===0?(c(11),p(h-1)):c(f-1),y(1)},j=()=>{f===11?(c(0),p(h+1)):c(f+1),y(1)},U=(k,d)=>new Date(k,d+1,0).getDate(),V=(k,d)=>new Date(k,d,1).getDay(),A=k=>{var g;const d=B.findIndex(x=>x!==null&&x.getDate()===k);d!==-1&&w.current[d]&&((g=w.current[d])==null||g.focus(),y(k))},F=(k,d)=>{const g=B[d];if(!g)return;const x=U(h,f),T=g.getDate();switch(k.key){case"ArrowRight":k.preventDefault();{let _=T+1,R=new Date(h,f,_);if(_>x){const L=f===11?h+1:h,I=f===11?0:f+1;_=1,R=new Date(L,I,_),j(),setTimeout(()=>{W(1,"forward")},0);return}D(R)?W(_,"forward"):A(_)}break;case"Tab":break;case"ArrowLeft":k.preventDefault();{let _=T-1,R=new Date(h,f,_);if(_<1){const L=f===0?h-1:h,I=f===0?11:f-1,$=U(L,I);_=$,R=new Date(L,I,_),P(),setTimeout(()=>{W($,"backward")},0);return}D(R)?W(_,"backward"):A(_)}break;case"ArrowUp":k.preventDefault();{let _=T-7,R=new Date(h,f,_);if(_<1){const L=f===0?h-1:h,I=f===0?11:f-1;_=U(L,I)+_,R=new Date(L,I,_),P(),setTimeout(()=>{W(_,"backward")},0);return}D(R)?W(_,"backward"):A(_)}break;case"ArrowDown":k.preventDefault();{let _=T+7,R=new Date(h,f,_);if(_>x){const L=f===11?h+1:h,I=f===11?0:f+1;_=_-x,R=new Date(L,I,_),j(),setTimeout(()=>{W(_,"forward")},0);return}D(R)?W(_,"forward"):A(_)}break;case"Home":k.preventDefault(),W(1,"forward");break;case"End":k.preventDefault(),W(x,"backward");break;case"PageUp":k.preventDefault(),P(),setTimeout(()=>{const _=U(f===0?h-1:h,f===0?11:f-1),R=Math.min(T,_);W(R,"forward")},0);break;case"PageDown":k.preventDefault(),j(),setTimeout(()=>{const _=U(f===11?h+1:h,f===11?0:f+1),R=Math.min(T,_);W(R,"forward")},0);break;case" ":case"Space":if(D(g))return;y(g.getDate()),u(g);break;case"Enter":k.preventDefault(),b(g);break}},W=(k,d)=>{const g=U(h,f);if(d==="forward"){for(let x=k;x<=g;x++){const T=new Date(h,f,x);if(!D(T)){A(x);return}}j(),setTimeout(()=>{W(1,"forward")},0)}else{for(let R=k;R>=1;R--){const L=new Date(h,f,R);if(!D(L)){A(R);return}}const x=f===0?h-1:h,T=f===0?11:f-1,_=U(x,T);P(),setTimeout(()=>{W(_,"backward")},0)}},B=(()=>{const k=U(h,f),d=V(h,f),g=[];for(let x=0;x<d;x++)g.push(null);for(let x=1;x<=k;x++){const T=new Date(h,f,x);g.push(T)}return g})(),ne=[];let J=[];B.forEach((k,d)=>{if(J.push(k),J.length===7||d===B.length-1){for(;J.length<7;)J.push(null);ne.push(J),J=[]}}),M.useEffect(()=>{var k;if(m!==null){const d=B.findIndex(g=>g!==null&&g.getDate()===m);d!==-1&&w.current[d]&&((k=w.current[d])==null||k.focus())}},[f,h,m,B]);const Y={label:`${he["smp-datepickercalendar-label"]}`,wrapper:`${he["smp-datepickercalendar"]}`,calendar:`${he["smp-datepickercalendar"]}`,table:`${he["smp-datepickercalendar-table"]}`,th:`${he["smp-datepickercalendar-th"]}`,td:(k,d,g,x)=>`${he["smp-datepickercalendar-td"]}
46
- ${k?he["smp-datepickercalendar-td-today"]:""}
47
- ${d?he["smp-datepickercalendar-td-selected"]:""}
48
- ${g?he["smp-datepickercalendar-td-focused"]:""}
49
- ${x?he["smp-datepickercalendar-td-disabled"]:""}`},z=()=>`${v[f]} ${h.toString()}`;return E.jsxs("div",{className:Y.wrapper,ref:s,role:"dialog",tabIndex:-1,"aria-modal":"true",children:[E.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[E.jsx(Le,{onClick:P,ariaLabel:a(bt.PREVIOUS_MONTH),bindValue:"<",appearance:"ghost",variant:"base"}),E.jsx("div",{"aria-label":z(),className:Y.label,children:z()}),E.jsx(Le,{onClick:j,ariaLabel:a(bt.NEXT_MONTH),bindValue:">",appearance:"ghost",variant:"base"})]}),E.jsxs("table",{ref:S,role:"grid","aria-label":`${a(Et.CALENDAR_FOR)} ${v[f]} ${h}`,className:Y.table,children:[E.jsx("thead",{children:E.jsx("tr",{children:O.map(k=>E.jsx("th",{scope:"col",abbr:k.full,className:Y.th,children:k.value},k.value))})}),E.jsx("tbody",{children:ne.map((k,d)=>E.jsx("tr",{children:k.map((g,x)=>{const T=d*7+x;if(g===null)return E.jsx("td",{className:Y.td(!1,!1,!1,!0)},`empty-${x}`);const _=g.getDate()===o.getDate()&&g.getMonth()===o.getMonth()&&g.getFullYear()===o.getFullYear(),R=l&&g.getDate()===l.getDate()&&g.getMonth()===l.getMonth()&&g.getFullYear()===l.getFullYear(),L=m===g.getDate(),I=D(g);return E.jsx("td",{role:"gridcell","aria-selected":R,tabIndex:L?0:-1,onClick:()=>b(g),onKeyDown:$=>F($,T),"aria-label":`${g.getDate()} ${v[g.getMonth()]} ${g.getFullYear()}`,"data-selected":R,"aria-disabled":I,ref:$=>{w.current[T]=$},className:Y.td(_,R,L,I),children:g.getDate()},`day-${x}`)})},`week-${d}`))})]})]})}const Tr=({bindValue:n,placeholder:e,onChange:t,disabledDateRanges:r,...s})=>{const[a,i]=M.useState(!1),[o,l]=M.useState(n||""),[u,f]=M.useState(""),{anchorRef:c,targetRef:h}=xt({position:"bottom",enabled:a});ze(h,()=>{i(!1)}),ze(c,()=>{if(typeof c=="object"&&c!==null&&"current"in c){const P=c.current.querySelector("input");P&&P===document.activeElement&&w()}}),_r(a,h);const{format:p,getCurrentLanguage:m}=rt(),y=M.useCallback(P=>{const j=P.length>5&&Fr(P,m())||P,U=p(j,void 0,void 0,{type:"date"}),V=typeof j!="string",A=V&&j.toISOString().substring(0,10)||"";return{isValid:V,formattedDate:U,isoDate:A,normalizedDate:j}},[m,p]);M.useEffect(()=>{const{formattedDate:P,isoDate:j,isValid:U}=y(n);l(U&&j||n),f(U&&P||n)},[n,p,y]);const S=()=>i(P=>!P),w=()=>{O(u)},v=P=>{O(P),i(!1)},O=P=>{const{isoDate:j,isValid:U}=y(P);t&&t(U&&j||P)},D=P=>{f(P)},b=P=>{P.key==="Enter"&&(P.preventDefault(),O(u))};return E.jsxs("div",{children:[E.jsx(Se,{bindValue:u,placeholder:e,onBlur:w,onChange:D,onKeyDown:b,shapeIcon:"calendar",onShapeIconClick:S,ref:c,...s}),a&&E.jsx(Xn,{disabledDateRanges:r,onDateChange:v,initialValue:vt(o)&&o||"",targetRef:h})]})},Zn={"smp-multipleAutocomplete-container":"_smp-multipleAutocomplete-container_1mtv2_1"},Qn=({elements:n,displayMode:e,minimumChars:t,listDisplayMode:r,placeholder:s,fun:a,onOptionsRequest:i,onChange:o})=>{const l=n.map(c=>c.bindValue),u=(c,h)=>{const p=[...n];if(c=="")p.pop();else{const m=p.findIndex(y=>y.bindValue===c&&y.optionalDisplayValue===h);m>=0?p.splice(m,1):p.push({bindValue:c,optionalDisplayValue:h})}o==null||o(p)},f={container:`${Zn["smp-multipleAutocomplete-container"]}`};return E.jsxs("div",{className:f.container,children:[E.jsx(Sr,{elements:n,displayMode:e,isEditable:!0,onChange:c=>{o==null||o(c)}}),E.jsx(_t,{bindValue:"",fun:a,onChange:u,_changeOnEnter:!0,listDisplayMode:r,minimumChars:t,placeholder:s,onOptionsRequest:i,_multiActiveIndex:l})]})},Rr=({...n})=>{const[e,t]=M.useState(!1),r=e?"visibility-off":"visibility";return E.jsx(Se,{...n,inputType:e?"text":"password",shapeIcon:r,onShapeIconClick:()=>t(!e),ariaLabel:"password"})},es=({...n})=>{const[e,t]=M.useState(n.bindValue),{translate:r}=rt(),s=a=>{var i;a.key==="Enter"&&(a.preventDefault(),(i=n.onEnter)==null||i.call(n,e))};return E.jsx(Se,{...n,placeholder:n.placeholder?n.placeholder:r(Et.SPOTLIGHT_DEFAULT_PLACEHOLDER),icon:"magnify",inputType:"search",bindValue:e,onChange:t,onKeyDown:s,ariaLabel:"search bar"})};class xe{constructor(e,t){ve(this,"class");ve(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new xe(e,e.k.split(";"))}static fromString(e){return new xe({t:"",p:""},e.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const qe=(n,e,t)=>({obj:{t:n.obj.t,p:n.obj.p,k:e},decode:t||n.decode,shape:n.shape}),ur=n=>{const e=xe.fromDataObj(n.obj),t=n.decode?xe.fromString(n.decode).getValue():[];return e.getValue().map((r,s)=>({bindValue:r,optionalDisplayValue:t.length>=s?t[s]:""}))},ts=(n,e)=>{const t=new xe(n.obj,e.map(s=>s.bindValue)).getLegacyValue(),r=new xe(n.obj,e.map(s=>s.optionalDisplayValue?s.optionalDisplayValue:"")).getLegacyValue();return qe(n,t,r)},Dr=({decode:n,shape:e,obj:t,data:r,icon:s,fun:a,placeholderIcon:i,label:o,onChange:l,onClick:u,onEnter:f,onBlur:c,onOptionsRequest:h})=>{const p={obj:t,shape:e,decode:n},m={onBlur:c,onOptionsRequest:h,fun:a,icon:s,label:o,...r},y=(v,O)=>Nr(t)?qe(p,new Be(t,v).getLegacyValue()):qe(p,v,O),S=v=>qe(p,new Ke(t,v).getLegacyValue()),w=v=>ts(p,v);switch(e){case ce.AUTOCOMPLETE:{const v={...m,bindValue:t.k,optionalDisplayValue:n,onChange:(O,D)=>{l==null||l(y(O,D))}};return E.jsx(_t,{...v})}case ce.BUTTON:{const v={...m,bindValue:t.k,optionalDisplayValue:n,onClick:()=>{u==null||u(y(t.k))}};return E.jsx(Le,{...v})}case ce.COMBOBOX:{const v={...m,bindValue:t.k,optionalDisplayValue:n,onChange:(O,D)=>{l==null||l(y(O,D))}};return E.jsx(Er,{...v})}case ce.CHECKBOX:{const v={...m,bindValue:Ke.fromDataObj(t).getValue(),optionalDisplayValue:n,onChange:O=>{l==null||l(S(O))}};return E.jsx(xr,{...v})}case ce.CHIP:{const v={...m,elements:ur(p)};return E.jsx(Sr,{...v})}case ce.DATE:{const v={...m,bindValue:Be.fromDataObj(t).getValue(),onChange:O=>{l==null||l(y(O))}};return E.jsx(Tr,{...v})}case ce.ICON:case ce.IMAGE:{const v={...m,icon:s,placeholderIcon:i,isInteractable:!!m.fun,onClick:()=>{u==null||u(y(t.k))}};return E.jsx(ge,{...v})}case ce.MULTI_AUTOCOMPLETE:{const v={...m,elements:ur(p),onChange:O=>{l==null||l(w(O))}};return E.jsx(Qn,{...v})}case ce.PASSWORD:{const v={...m,bindValue:t.k,onChange:O=>{l==null||l(y(O))}};return E.jsx(Rr,{...v})}case ce.SPOTLIGHT:{const v={...m,bindValue:t.k,onEnter:O=>{f==null||f(y(O))}};return E.jsx(es,{...v})}case ce.TEXT_FIELD:case void 0:{const v={...m,bindValue:t.k,onChange:O=>{l==null||l(y(O))}};return E.jsx(Se,{...v})}}},rs=(n,e)=>{const t=[];for(let r=0;r<n.length;r+=e)t.push(n.slice(r,r+e));return t},Cr=(n,e)=>n.map(t=>{var a,i;if((a=t.sections)!=null&&a.length)return{...t,sections:Cr(t.sections,e),content:t.content};let r=t.sections,s=t.content;return(i=t.content)!=null&&i.length&&t.columns&&+t.columns>1&&(r=rs(t.content.filter(l=>!!e[l.id]),+t.columns).map((l,u)=>({...t,id:`${t.id}-${u}`,content:l,gridCols:t.columns,horizontal:!0})),s=[]),{...t,sections:r,content:s}}),fr=(n,e)=>{const t=n.some(r=>r.dim)?n.map(r=>r.dim||"auto").join(" "):`repeat(${n.length}, 1fr)`;return{[e]:t}},fe={"smp-layout":"_smp-layout_1trbe_1","smp-layout-horizontal":"_smp-layout-horizontal_1trbe_10","smp-layout-section-grid":"_smp-layout-section-grid_1trbe_15","smp-layout-section-vertical":"_smp-layout-section-vertical_1trbe_17","smp-layout-section-horizontal":"_smp-layout-section-horizontal_1trbe_21","smp-layout-section-flex":"_smp-layout-section-flex_1trbe_26","smp-grid-template-cols":"_smp-grid-template-cols_1trbe_38","smp-grid-template-rows":"_smp-grid-template-rows_1trbe_42","smp-layout-section-with-title":"_smp-layout-section-with-title_1trbe_46","smp-layout-section-title":"_smp-layout-section-title_1trbe_52","smp-layout-cell-container":"_smp-layout-cell-container_1trbe_58"},ns=({layout:n,cells:e})=>{var f;if(!((f=n.sections)!=null&&f.length))return E.jsx(E.Fragment,{});const t="--smp-grid-template-cols",r=Cr(n.sections,e),s=c=>c==null?void 0:c.reduce((h,p)=>{var v,O;let m="",y={},S={},w="";return(v=p.sections)!=null&&v.length?(m=fe["smp-layout-section-grid"],y=s(p.sections),p.gridCols==null&&p.horizontal&&(w=`${fe["smp-grid-template-cols"]}`,S=fr(p.sections,t))):(O=p.content)!=null&&O.length&&(p.gridCols&&p.gridCols>0?(m=fe["smp-layout-section-grid"],w=`${fe["smp-grid-template-cols"]}`,S={[t]:`repeat(${p.gridCols}, 1fr)`}):m=fe["smp-layout-section-flex"]),{...h,...y,[p.id]:{classes:`${m} ${fe[p.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${w} ${p.hdsp?`smp-justifyContent-${p.hdsp}`:""} ${p.vdsp?`smp-alignItems-${p.vdsp}`:""}`,styles:S}}},{}),a=s(r),i={container:`${fe["smp-layout"]} ${n.horizontal?fe["smp-layout-horizontal"]:""}`,sections:a},o=fr(r,t),l=c=>{var p;const h=E.jsx("div",{"smp-id":"section-"+c.id,className:i.sections[c.id].classes,style:i.sections[c.id].styles,children:(p=c.sections)!=null&&p.length?c.sections.map(m=>l(m)):c.content.map(m=>u(m,e[m.id],c.hdsp,c.vdsp))},"section-"+c.id);return c.title?E.jsxs("div",{className:`${fe["smp-layout-section-with-title"]}`,children:[E.jsx("span",{className:`${fe["smp-layout-section-title"]} ${c.hdsp?`smp-justifyContent-${c.hdsp}`:""} ${c.vdsp?`smp-alignItems-${c.vdsp}`:""}`,children:E.jsx(pr,{label:c.title})}),h]}):h},u=(c,h,p,m)=>{const y=c.colSpan!==void 0?c.colSpan>0?c.colSpan:c.colStart!==void 0&&c.colStart<1?1:null:null,S=y!==null?`span ${y}`:c.colStart,w=c.colEnd!==void 0&&c.colEnd>0?c.colEnd:"",v={gridColumnStart:S,gridColumnEnd:w},O=`${fe["smp-layout-cell-container"]} ${p?`smp-justifyContent-${p}`:""} ${m?`smp-alignItems-${m}`:""}`;return E.jsx("div",{className:O,style:{...v},"smp-id":c.id,children:h?E.jsx(Dr,{...h}):E.jsx(E.Fragment,{})},c.id)};return E.jsx("div",{className:i.container,style:o,"smp-id":"layout",children:r==null?void 0:r.map(c=>l(c))})},ss={"smp-appbar":"_smp-appbar_u7bbt_1"},as=({data:n,onClick:e,onEnter:t})=>{var i,o;const[r,s]=M.useState(),a=M.useCallback(l=>{var f,c;if(!((f=l.rows)!=null&&f.length)||!((c=l.columns)!=null&&c.length))return{};const u=l.rows[0];return l.columns.filter(h=>h.visible).reduce((h,p)=>{const m=u.cells[p.name],y={...m,onChange:S=>{s(w=>w&&{...w,[p.name]:{...w[p.name],obj:{...w[p.name].obj,k:S.obj.k}}})},onClick:()=>{m.fun&&e&&e({...m})},onEnter:S=>{t&&t(S)}};return{...h,[p.name]:y}},{})},[e,t]);return M.useEffect(()=>{s(a(n))},[n,a]),!((i=n==null?void 0:n.rows)!=null&&i.length)||!((o=n.columns)!=null&&o.length)?null:r&&E.jsx("header",{className:ss["smp-appbar"],"aria-label":"App Bar",children:E.jsx(ns,{layout:n.rows[0].layout,cells:r})})},Ae={"smp-dash-list":"_smp-dash-list_ajkcc_1","smp-dash-list-fill-space":"_smp-dash-list-fill-space_ajkcc_25","smp-dash-list-horizontal":"_smp-dash-list-horizontal_ajkcc_30","smp-layout-1":"_smp-layout-1_ajkcc_34","smp-layout-2":"_smp-layout-2_ajkcc_38","smp-layout-1__descr":"_smp-layout-1__descr_ajkcc_67","smp-layout-2__descr":"_smp-layout-2__descr_ajkcc_68","smp-layout-1__value":"_smp-layout-1__value_ajkcc_76","smp-layout-2__value":"_smp-layout-2__value_ajkcc_77","smp-layout-2__icon":"_smp-layout-2__icon_ajkcc_84"},ke=n=>n==null?!1:typeof n=="string"?n.toLocaleLowerCase()=="yes":n,is=({ColumnsNumber:n=1,data:e={},ForceText:t,TextColName:r,TextColor:s="var(--smp-dashList-color-base)",Fillspace:a,FontSize:i,Horizontal:o,ForceIcon:l,IconColName:u,IconColor:f="var(--smp-dashList-color-base)",NumberFormat:c,ForceUM:h,UmColName:p,UmColor:m="var(--smp-dashList-color-base)",ForceValue:y,ValueColName:S,ValueColor:w="var(--smp-dashList-color-base)",SelectLayout:v="1",onClick:O})=>{const D="N/A",b=(e==null?void 0:e.columns)||[],P=(e==null?void 0:e.rows)||[],j=P.length>0,U="--smp-dashList-color",V="smp-layout",A="descr",F="icon",W="um",X="value",B=i||"1em",ne="18px",J="--smp-dashList-columns",Y="--smp-dashList-fontSize",z={dash:(N="1")=>{const G=d(N),ee=Ae[G],te=g(G,A),le=g(G,F),ye=g(G,W),ue=g(G,X);return{container:ee,descr:te,icon:le,um:ye,value:ue}},dashList:`${Ae["smp-dash-list"]} ${ke(a)?Ae["smp-dash-list-fill-space"]:""}
50
- ${ke(o)?Ae["smp-dash-list-horizontal"]:""}`},{format:k}=rt(),d=N=>`${V}-${N}`,g=(N,G)=>Ae[`${N}__${G}`],x=N=>`${U}-${N}`,T=N=>{const G=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(G.test(N)){const te=N.match(G)||[];if((te==null?void 0:te.length)>3)return"rgb("+te[1]+","+te[2]+","+te[3]+")"}return N},_=N=>{if(!c)return N;const[G,ee]=R(c).map(_e=>parseInt(_e||"0")),te="0,0"+(ee?"."+"0".repeat(ee):""),le=k(N,te,"it");if(!G)return le;const[ye,ue]=le.split(",");return ye+(ue?`,${ue}`:"")},R=N=>N.includes(";")?N.split(";"):[N],L=N=>{const G=te=>{var le;if(te)return(le=N==null?void 0:N.cells[te])==null?void 0:le.obj.k},ee=te=>{var le,ye;if(!(b.length<=te))return(ye=(le=N==null?void 0:N.cells[b[te].name])==null?void 0:le.obj)==null?void 0:ye.k};return{descr:t||G(r)||ee(2)||"",icon:l||G(u)||ee(3)||"",um:h||G(p)||ee(1)||"",value:y||G(S)||ee(0)||""}},I=N=>{O==null||O(N)},$=(N,G)=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),N.stopPropagation(),I(G))},H=(N=>{const G=z.dash(N);return{className:G,descr:ee=>E.jsx("div",{className:G.descr,children:ee},`${N}-${A}`),icon:ee=>E.jsx("div",{className:G.icon,children:E.jsx(ge,{color:f,height:ne,icon:ee,width:ne})},`${N}-${F}`),um:ee=>E.jsx("div",{className:G.um,children:ee},`${N}-${W}`),value:ee=>E.jsx("div",{className:G.value,children:ee},`${N}-${X}`)}})(v),re=N=>{const{descr:G,icon:ee,um:te,value:le}=L(N),ye={[x(A)]:T(s),[x(W)]:T(m),[x(X)]:T(w)},ue=[],_e=_(le);switch(v){case"2":ee&&ue.push(H.icon(ee)),ue.push(H.descr(G)),ue.push(H.value(te?_e+" "+te:_e));break;default:case"1":ue.push(H.descr(G)),ue.push(H.value(te?_e+" "+te:_e))}return E.jsx("div",{className:H.className.container,role:"button",style:ye,tabIndex:0,onClick:()=>I(N),onKeyDown:Pr=>$(Pr,N),children:ue},N.id)},C={[J]:String(n),[Y]:B};return E.jsx("div",{className:z.dashList,style:C,children:j?P.map(N=>re(N)):D})},dr={"smp-field-container":"_smp-field-container_2ay2r_1","smp-field-position-Left":"_smp-field-position-Left_2ay2r_6","smp-field-position-Right":"_smp-field-position-Right_2ay2r_10","smp-field-position-Top":"_smp-field-position-Top_2ay2r_14","smp-field-position-Bottom":"_smp-field-position-Bottom_2ay2r_18"},os=({data:n,Type:e,ShowSubmit:t=!1,SubmitPosition:r="Right",DefaultValue:s,Label:a,LabelPosition:i="Left",onBlur:o,onClick:l,onOptionsRequest:u})=>{const[f,c]=M.useState();M.useEffect(()=>{c(()=>{const y={...n};return e&&(y.shape=e),s&&(y.obj=Mr(s)),y})},[n,s,e]);const h=ke(t)?dr[`smp-field-position-${r}`]:"",p={container:`${dr["smp-field-container"]} ${h}`},m=()=>{ke(t)||o==null||o(f)};if(f)return E.jsxs("div",{className:p.container,children:[E.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",font:"var(--smp-fontLabel-base)"},children:E.jsx(Dr,{...f,onChange:c,onOptionsRequest:u,fun:n.fun,onBlur:m,label:a,labelPosition:i})}),ke(t)&&E.jsx(Le,{bindValue:"Confirm",onClick:()=>l==null?void 0:l(f)})]})};exports.AppBar=as;exports.Autocomplete=_t;exports.Button=Le;exports.Checkbox=xr;exports.Combobox=Er;exports.DashList=is;exports.DatePicker=Tr;exports.Field=os;exports.Icon=ge;exports.Password=Rr;exports.Textfield=Se;exports.configurePaths=dn;
44
+ */var Qe,Pt;function Gr(){if(Pt)return Qe;Pt=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 Qe=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 p=0;p<c.length;p++)t.call(o,c[p])&&(l[c[p]]=o[c[p]])}}return l},Qe}var et,At;function pt(){if(At)return et;At=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return et=r,et}var tt,Ct;function or(){return Ct||(Ct=1,tt=Function.call.bind(Object.prototype.hasOwnProperty)),tt}var rt,$t;function zr(){if($t)return rt;$t=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var e=pt(),t={},n=or();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 p=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 p.name="Invariant Violation",p}u=a[f](i,f,l,o,null,e)}catch(g){u=g}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 h=c?c():"";r("Failed "+o+" type: "+u.message+(h??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},rt=s,rt}var nt,jt;function Jr(){if(jt)return nt;jt=1;var r=ir(),e=Gr(),t=pt(),n=or(),s=zr(),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 nt=function(o,l){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function u(d){var m=d&&(c&&d[c]||d[f]);if(typeof m=="function")return m}var p="<<anonymous>>",h={array:O("array"),bigint:O("bigint"),bool:O("boolean"),func:O("function"),number:O("number"),object:O("object"),string:O("string"),symbol:O("symbol"),any:b(),arrayOf:E,element:D(),elementType:v(),instanceOf:C,node:j(),objectOf:Y,oneOf:$,oneOfType:V,shape:U,exact:B};function g(d,m){return d===m?d!==0||1/d===1/m:d!==d&&m!==m}function y(d,m){this.message=d,this.data=m&&typeof m=="object"?m:{},this.stack=""}y.prototype=Error.prototype;function x(d){if(process.env.NODE_ENV!=="production")var m={},w=0;function R(P,_,M,k,K,H,re){if(k=k||p,H=H||M,re!==t){if(l){var A=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 A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var F=k+":"+M;!m[F]&&w<3&&(a("You are manually calling a React.PropTypes validation function for the `"+H+"` 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."),m[F]=!0,w++)}}return _[M]==null?P?_[M]===null?new y("The "+K+" `"+H+"` is marked as required "+("in `"+k+"`, but its value is `null`.")):new y("The "+K+" `"+H+"` is marked as required in "+("`"+k+"`, but its value is `undefined`.")):null:d(_,M,k,K,H)}var T=R.bind(null,!1);return T.isRequired=R.bind(null,!0),T}function O(d){function m(w,R,T,P,_,M){var k=w[R],K=X(k);if(K!==d){var H=W(k);return new y("Invalid "+P+" `"+_+"` of type "+("`"+H+"` supplied to `"+T+"`, expected ")+("`"+d+"`."),{expectedType:d})}return null}return x(m)}function b(){return x(i)}function E(d){function m(w,R,T,P,_){if(typeof d!="function")return new y("Property `"+_+"` of component `"+T+"` has invalid PropType notation inside arrayOf.");var M=w[R];if(!Array.isArray(M)){var k=X(M);return new y("Invalid "+P+" `"+_+"` of type "+("`"+k+"` supplied to `"+T+"`, expected an array."))}for(var K=0;K<M.length;K++){var H=d(M,K,T,P,_+"["+K+"]",t);if(H instanceof Error)return H}return null}return x(m)}function D(){function d(m,w,R,T,P){var _=m[w];if(!o(_)){var M=X(_);return new y("Invalid "+T+" `"+P+"` of type "+("`"+M+"` supplied to `"+R+"`, expected a single ReactElement."))}return null}return x(d)}function v(){function d(m,w,R,T,P){var _=m[w];if(!r.isValidElementType(_)){var M=X(_);return new y("Invalid "+T+" `"+P+"` of type "+("`"+M+"` supplied to `"+R+"`, expected a single ReactElement type."))}return null}return x(d)}function C(d){function m(w,R,T,P,_){if(!(w[R]instanceof d)){var M=d.name||p,k=I(w[R]);return new y("Invalid "+P+" `"+_+"` of type "+("`"+k+"` supplied to `"+T+"`, expected ")+("instance of `"+M+"`."))}return null}return x(m)}function $(d){if(!Array.isArray(d))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 m(w,R,T,P,_){for(var M=w[R],k=0;k<d.length;k++)if(g(M,d[k]))return null;var K=JSON.stringify(d,function(re,A){var F=W(A);return F==="symbol"?String(A):A});return new y("Invalid "+P+" `"+_+"` of value `"+String(M)+"` "+("supplied to `"+T+"`, expected one of "+K+"."))}return x(m)}function Y(d){function m(w,R,T,P,_){if(typeof d!="function")return new y("Property `"+_+"` of component `"+T+"` has invalid PropType notation inside objectOf.");var M=w[R],k=X(M);if(k!=="object")return new y("Invalid "+P+" `"+_+"` of type "+("`"+k+"` supplied to `"+T+"`, expected an object."));for(var K in M)if(n(M,K)){var H=d(M,K,T,P,_+"."+K,t);if(H instanceof Error)return H}return null}return x(m)}function V(d){if(!Array.isArray(d))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var m=0;m<d.length;m++){var w=d[m];if(typeof w!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(w)+" at index "+m+"."),i}function R(T,P,_,M,k){for(var K=[],H=0;H<d.length;H++){var re=d[H],A=re(T,P,_,M,k,t);if(A==null)return null;A.data&&n(A.data,"expectedType")&&K.push(A.data.expectedType)}var F=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new y("Invalid "+M+" `"+k+"` supplied to "+("`"+_+"`"+F+"."))}return x(R)}function j(){function d(m,w,R,T,P){return G(m[w])?null:new y("Invalid "+T+" `"+P+"` supplied to "+("`"+R+"`, expected a ReactNode."))}return x(d)}function N(d,m,w,R,T){return new y((d||"React class")+": "+m+" type `"+w+"."+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+T+"`.")}function U(d){function m(w,R,T,P,_){var M=w[R],k=X(M);if(k!=="object")return new y("Invalid "+P+" `"+_+"` of type `"+k+"` "+("supplied to `"+T+"`, expected `object`."));for(var K in d){var H=d[K];if(typeof H!="function")return N(T,P,_,K,W(H));var re=H(M,K,T,P,_+"."+K,t);if(re)return re}return null}return x(m)}function B(d){function m(w,R,T,P,_){var M=w[R],k=X(M);if(k!=="object")return new y("Invalid "+P+" `"+_+"` of type `"+k+"` "+("supplied to `"+T+"`, expected `object`."));var K=e({},w[R],d);for(var H in K){var re=d[H];if(n(d,H)&&typeof re!="function")return N(T,P,_,H,W(re));if(!re)return new y("Invalid "+P+" `"+_+"` key `"+H+"` supplied to `"+T+"`.\nBad object: "+JSON.stringify(w[R],null," ")+`
45
+ Valid keys: `+JSON.stringify(Object.keys(d),null," "));var A=re(M,H,T,P,_+"."+H,t);if(A)return A}return null}return x(m)}function G(d){switch(typeof d){case"number":case"string":case"undefined":return!0;case"boolean":return!d;case"object":if(Array.isArray(d))return d.every(G);if(d===null||o(d))return!0;var m=u(d);if(m){var w=m.call(d),R;if(m!==d.entries){for(;!(R=w.next()).done;)if(!G(R.value))return!1}else for(;!(R=w.next()).done;){var T=R.value;if(T&&!G(T[1]))return!1}}else return!1;return!0;default:return!1}}function ne(d,m){return d==="symbol"?!0:m?m["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&m instanceof Symbol:!1}function X(d){var m=typeof d;return Array.isArray(d)?"array":d instanceof RegExp?"object":ne(m,d)?"symbol":m}function W(d){if(typeof d>"u"||d===null)return""+d;var m=X(d);if(m==="object"){if(d instanceof Date)return"date";if(d instanceof RegExp)return"regexp"}return m}function z(d){var m=W(d);switch(m){case"array":case"object":return"an "+m;case"boolean":case"date":case"regexp":return"a "+m;default:return m}}function I(d){return!d.constructor||!d.constructor.name?p:d.constructor.name}return h.checkPropTypes=s,h.resetWarningCache=s.resetWarningCache,h.PropTypes=h,h},nt}var st,Lt;function Xr(){if(Lt)return st;Lt=1;var r=pt();function e(){}function t(){}return t.resetWarningCache=e,st=function(){function n(i,o,l,c,f,u){if(u!==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},st}var kt;function Zr(){if(kt)return Ie.exports;if(kt=1,process.env.NODE_ENV!=="production"){var r=ir(),e=!0;Ie.exports=Jr()(r.isElement,e)}else Ie.exports=Xr()();return Ie.exports}var ae=Zr(),Qr=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},en=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},tn=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],_e="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xlink",qe=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}Nr(e,r);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof Qr(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,p=a.useRequestCache,h=this.props.onError,g=this.props.beforeInjection,y=this.props.afterInjection,x=this.props.wrapper,O,b;x==="svg"?(O=document.createElementNS(_e,x),O.setAttribute("xmlns",_e),O.setAttribute("xmlns:xlink",It),b=document.createElementNS(_e,x)):(O=document.createElement(x),b=document.createElement(x)),O.appendChild(b),b.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(O);var E=function($){if(s.removeSVG(),!s._isMounted){h($);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){h($)})},D=function($,Y){if($){E($);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{y(Y)}catch(V){E(V)}})},v=function($){if($.setAttribute("role","img"),i){var Y=$.querySelector(":scope > desc");Y&&$.removeChild(Y);var V=document.createElement("desc");V.innerHTML=i,$.prepend(V)}if(u){var j=$.querySelector(":scope > title");j&&$.removeChild(j);var N=document.createElement("title");N.innerHTML=u,$.prepend(N)}try{g($)}catch(U){E(U)}};qr(b,{afterEach:D,beforeEach:v,cacheRequests:p,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;en(He({},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=Ir(s,tn),c=o;return $e.createElement(c,He({},l,{ref:this.refCallback},o==="svg"?{xmlns:_e,xmlnsXlink:It}:{}),this.state.isLoading&&i&&$e.createElement(i,null),this.state.hasError&&a&&$e.createElement(a,null))},e}($e.Component);qe.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};qe.propTypes={afterInjection:ae.func,beforeInjection:ae.func,desc:ae.string,evalScripts:ae.oneOf(["always","once","never"]),fallback:ae.oneOfType([ae.func,ae.object,ae.string]),httpRequestWithCredentials:ae.bool,loading:ae.oneOfType([ae.func,ae.object,ae.string]),onError:ae.func,renumerateIRIElements:ae.bool,src:ae.string.isRequired,title:ae.string,useRequestCache:ae.bool,wrapper:ae.oneOf(["div","span","svg"])};let lt={assets:"/"};const rn=r=>{lt={...lt,...r}},Nt=r=>`${lt.assets}/${r}`.replace(/\/+/g,"/"),he=L.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[p,h]=L.useState(r),g=r&&(r.indexOf(".")>-1||r.indexOf("/")>-1||r.indexOf("\\")>-1),y=Nt(`assets/svg/${r}.svg`),x=Nt(`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":""}`},b=()=>{!a&&l&&l()};return S.jsx(S.Fragment,{children:g?S.jsx("img",{src:p,width:e||"16px",height:t||"auto",alt:u,onError:()=>h(x),onClick:b,className:O.img,onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&b()}}):S.jsx(qe,{src:y,fallback:()=>S.jsx(qe,{src:x,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:u,role:"application",fill:s,"aria-disabled":a,className:O.svg,onClick:b})})}),be=({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:p,ref:h,inputRef:g,onKeyDown:y,inputType:x="text",ariaLabel:O="input field",label:b,helperText:E=!1,error:D,appearance:v="base",fullWidth:C=!1})=>{const $=D?"danger":c,Y=D||c=="danger"?"error":o,V=E||!!D,j=U=>{a==null||a(U.target.value)},N={wrapper:`smp-textfield-wrapper ${C?"smp-textfield-fullWidth":""}`,container:`smp-textfield ${r?"smp-textfield-disabled":""} ${e?"smp-textfield-readOnly":""} ${i?"smp-textfield-placeholder":""} ${l?`smp-textfield-${l}`:""} ${$?`smp-textfield-${$}`:""} ${f?`smp-textfield-variant-${f}`:""} ${v?`smp-textfield-${v}`:""}`,input:"smp-textfield-input "};return S.jsxs("div",{className:N.wrapper,"data-component":"textfield",children:[b&&S.jsx(nr,{label:b,disabled:r}),S.jsxs("div",{className:N.container,ref:h,children:[n&&S.jsx(he,{icon:n,disabled:r}),S.jsx("input",{type:x,value:t,placeholder:i,onChange:j,onBlur:s,className:N.input,disabled:r,readOnly:e,onKeyDown:y,"aria-label":O,ref:g}),Y&&S.jsx(he,{icon:Y,disabled:r,state:$,onClick:p,rotated:u})]}),V&&S.jsx(kr,{helperText:D,disabled:r,state:$})]})};function nn({items:r,itemHeight:e,containerHeight:t,overscan:n=5}){const[s,a]=L.useState(0),i=L.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 h=l;h<=c;h++)f.push({item:r[h],index:h,offsetTop:h*e});const u=L.useCallback(h=>{const g=h.target.scrollTop;a(g)},[]),p=h=>{if(!i.current)return;const g=h*e,y=g+e,x=i.current,O=x.scrollTop,b=O+t;g<O?x.scrollTop=g:y>b&&(x.scrollTop=y-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:p}}const sn=10,lr=({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]=L.useState(""),p=24,[h,g]=L.useState(a!==null?a:-1),y=s!==void 0?s:e.length>sn,x=f?e.filter(N=>N.label.toLowerCase().includes(f.toLowerCase())):e,O=N=>{u(N)},{virtualItems:b,containerProps:E,innerProps:D,scrollToIndex:v}=nn({items:x,itemHeight:p,containerHeight:200,overscan:5});L.useEffect(()=>{a!==null&&a!==h&&g(a)},[a]),L.useEffect(()=>{h>=0&&h<x.length&&v(h)},[h,x]);const C=N=>{if(N.key==="ArrowDown"||N.key==="ArrowUp"){N.preventDefault();let U=h;N.key==="ArrowDown"?U=h<x.length-1?h+1:0:N.key==="ArrowUp"&&(U=h>0?h-1:x.length-1),g(U)}else N.key==="Enter"?h>=0&&h<x.length&&(l==null||l(x[h])):N.key==="Escape"&&(N.preventDefault(),N.stopPropagation());c&&c(N)},$=N=>{C(N)},Y=N=>{C(N)},V={wrapper:"smp-list",container:"smp-list-container",virtualScroll:"smp-list-virtualScroll",listItem:"smp-list-listItem"};return S.jsxs("div",{id:r,ref:n,className:V.wrapper,"data-component":"list",style:{width:o},children:[y&&S.jsx(be,{bindValue:f,placeholder:"Search...",onChange:O,onKeyDown:$}),S.jsx("div",{...E,className:V.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:Y,"aria-activedescendant":h>=0&&h<x.length?(j=x[h])==null?void 0:j.id:void 0,children:S.jsx("div",{...D,className:V.virtualScroll,children:b.map(({item:N,index:U,offsetTop:B})=>{const G=i.includes(N.id);return S.jsxs("li",{role:"option",id:N.id,"aria-selected":h===U?"true":"false",tabIndex:-1,className:`${V.listItem} ${h===U?"selected-item":""}`,"aria-label":N.id+"-"+N.label,style:{height:`${p}px`,lineHeight:`calc(${p}px - 2*2px)`,transform:`translateY(${B}px)`},onClick:()=>{l==null||l(N),g(U)},children:[We(N.id,N.label,t),G&&S.jsx(he,{icon:"check",width:16})]},N.id)})})})]})},cr=({displayMode:r,bindValue:e,optionalDisplayValue:t,...n})=>{const[s,a]=L.useState(We(e,t,r));return L.useEffect(()=>{a(e)},[e]),L.useEffect(()=>{a(We(e,t,r))},[t,r]),S.jsx(be,{...n,bindValue:s})},an=r=>{const e=L.useRef(null);return L.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),n=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{n()},r)}},ht=({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,...p})=>{const[h,g]=L.useState(r),[y,x]=L.useState(e),[O,b]=L.useState(!1),[E,D]=L.useState(t||[]),[v,C]=L.useState(0),[$,Y]=L.useState([r]),{anchorRef:V,targetRef:j,anchorWidth:N}=dt({position:"bottom",enabled:O});Ue(j,()=>b(!1));const U=an(400),B=W=>{W.length>=a?o&&f&&U(async()=>{const z=await f(o,W);D(z),C(z.length>0?0:-1),b(!0)}):b(!1),g(W),x(e),l||c==null||c(W,e)},G=W=>{l?(g(""),x("")):(g(W.id),x(W.label)),c==null||c(W.id,W.label);const z=E.findIndex(I=>I.id===W.id);C(z),Y([W.id]),b(!1)},ne=W=>{W.key==="Escape"&&(b(!1),C(-1))},X=W=>{if((W.key==="ArrowDown"||W.key==="ArrowUp")&&(W.preventDefault(),O)){const z=W.key==="ArrowDown"?(v+1)%E.length:(v-1+E.length)%E.length;C(z)}switch(W.key){case"Enter":v>=0&&v<E.length?G(E[v]):l&&(c==null||c(h,""),b(!1),g(""),x(""));break;case"Escape":b(!1),C(-1);break}};return S.jsxs("div",{"data-component":"autocomplete",children:[S.jsx(cr,{...p,bindValue:h,optionalDisplayValue:y,displayMode:n,shapeIcon:"magnify",placeholder:i,ref:V,onChange:B,onKeyDown:X,"aria-autocomplete":"list"}),O&&S.jsx(lr,{options:E,displayMode:s,onClick:G,ref:j,selectedIndex:v,activeIndex:u||$,width:N,showFilter:!1,onKeyDown:ne})]})},_t=r=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[r],Mt=r=>({primary:"onPrimary",danger:"onDanger",base:"base"})[r],Pe=({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:p,optionalDisplayValue:h})=>{const g={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:g.container,onClick:e,"aria-label":t,disabled:s,"aria-busy":u,title:p||h,children:u?S.jsx(he,{icon:"spinner",state:Mt(i),spin:!0}):S.jsxs(S.Fragment,{children:[n&&l&&S.jsx(he,{icon:n,disabled:s,state:Mt(i),width:_t(a),height:_t(a)}),c&&r&&S.jsx("span",{children:r})]})})},ur=({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})},on={titleLarge:"h2",title:"h3",body:"h6",label:"label"},ln=({variant:r="body",bindValue:e,color:t,...n})=>{const s=on[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})},fr=({elements:r,isEditable:e=!1,displayMode:t="Both",onChange:n,color:s,backgroundColor:a})=>{const i={container:`${["smp-chips-container"]}`,element:"smp-chips-element"},o=l=>{n==null||n(r.filter((c,f)=>f!==l))};return S.jsx("div",{className:i.container,role:"list","data-component":"chip",children:r.map((l,c)=>{const f=We(l.bindValue,l.optionalDisplayValue,t);return S.jsxs("div",{className:i.element,role:"listitem",style:{"--smp-chips-backgroundColor-base":a},children:[S.jsx(ln,{variant:"label",bindValue:f,color:s}),e&&S.jsx(he,{icon:"close",isInteractable:!0,onClick:()=>o(c),color:s})]},c)})})};function dr(r,e){const t=L.useRef(null);L.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],p=f[f.length-1];c.shiftKey&&document.activeElement===u?(c.preventDefault(),p.focus()):!c.shiftKey&&document.activeElement===p&&(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 pr=({bindValue:r,onChange:e,options:t=[],optionalDisplayValue:n,displayMode:s,listDisplayMode:a="Both",fun:i,onOptionsRequest:o,multiActiveIndex:l,...c})=>{const[f,u]=L.useState(!1),[p,h]=L.useState(t),[g,y]=L.useState(-1),[x,O]=L.useState([r]),b=L.useId(),{anchorRef:E,targetRef:D,anchorWidth:v}=dt({position:"bottom",enabled:f});Ue(D,()=>u(!1)),dr(f,D);const C=j=>{e==null||e(j.id,j.label);const N=p.findIndex(U=>U.id===j.id);y(N),O([j.id]),u(!1)},$=j=>{j.key==="Escape"&&(u(!1),y(-1))},Y=j=>{(j.key==="ArrowDown"||j.key==="ArrowUp")&&(j.preventDefault(),V())},V=()=>{i&&o&&o(i,void 0).then(j=>{h(j),y(j.length>0?0:-1),u(!0)})};return S.jsxs("div",{role:"combobox","aria-expanded":f,"aria-controls":b,"aria-owns":b,"data-component":"combobox",children:[S.jsx(cr,{...c,bindValue:r,optionalDisplayValue:n,displayMode:s,onShapeIconClick:V,onKeyDown:Y,shapeIcon:"arrow_drop_down",rotatedShapeIcon:f,readOnly:!0,ref:E,"aria-autocomplete":"list",variant:"notSelectable"}),f&&S.jsx(lr,{id:b,options:p,displayMode:a,ref:D,selectedIndex:g,activeIndex:l||x,width:v,onClick:C,onKeyDown:$})]})},q=r=>typeof r=="string",Oe=()=>{let r,e;const t=new Promise((n,s)=>{r=n,e=s});return t.resolve=r,t.reject=e,t},Ft=r=>r==null?"":""+r,cn=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},un=/###/g,Vt=r=>r&&r.indexOf("###")>-1?r.replace(un,"."):r,Yt=r=>!r||q(r),Re=(r,e,t)=>{const n=q(e)?e.split("."):e;let s=0;for(;s<n.length-1;){if(Yt(r))return{};const a=Vt(n[s]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++s}return Yt(r)?{}:{obj:r,k:Vt(n[s])}},Ut=(r,e,t)=>{const{obj:n,k:s}=Re(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=Re(r,i,Object);for(;o.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),o=Re(r,i,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${a}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=t},fn=(r,e,t,n)=>{const{obj:s,k:a}=Re(r,e,Object);s[a]=s[a]||[],s[a].push(t)},Ke=(r,e)=>{const{obj:t,k:n}=Re(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},dn=(r,e,t)=>{const n=Ke(r,t);return n!==void 0?n:Ke(e,t)},hr=(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]):hr(r[n],e[n],t):r[n]=e[n]);return r},Se=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var pn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const hn=r=>q(r)?r.replace(/[&<>"'\/]/g,e=>pn[e]):r;class gn{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 mn=[" ",",","?","!",";"],yn=new gn(20),vn=(r,e,t)=>{e=e||"",t=t||"";const n=mn.filter(i=>e.indexOf(i)<0&&t.indexOf(i)<0);if(n.length===0)return!0;const s=yn.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},ct=(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},Ae=r=>r==null?void 0:r.replace("_","-"),bn={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 Be{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||bn,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 Be(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Be(this.logger,e)}}var pe=new Be;class ze{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 Wt extends ze{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 l=Ke(this.data,o);return!l&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),l||!i||!q(n)?l:ct((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),Ut(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 l=Ke(this.data,o)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?hr(l,n,a):l={...l,...n},Ut(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 gr={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 Ht={},qt=r=>!q(r)&&typeof r!="boolean"&&typeof r!="number";class Ge extends ze{constructor(e,t={}){super(),cn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=pe.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&&!vn(e,n,s);if(i&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.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: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,p=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode")return p?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 h=this.resolve(e,s);let g=h==null?void 0:h.res;const y=(h==null?void 0:h.usedKey)||o,x=(h==null?void 0:h.exactUsedKey)||o,O=["[object Number]","[object Function]","[object RegExp]"],b=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,D=s.count!==void 0&&!q(s.count),v=Ge.hasDefaultValue(s),C=D?this.pluralResolver.getSuffix(u,s.count,s):"",$=s.ordinal&&D?this.pluralResolver.getSuffix(u,s.count,{ordinal:!1}):"",Y=D&&!s.ordinal&&s.count===0,V=Y&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${C}`]||s[`defaultValue${$}`]||s.defaultValue;let j=g;E&&!g&&v&&(j=V);const N=qt(j),U=Object.prototype.toString.apply(j);if(E&&j&&N&&O.indexOf(U)<0&&!(q(b)&&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 B=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,j,{...s,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return a?(h.res=B,h.usedParams=this.getUsedParamsDetails(s),h):B}if(i){const B=Array.isArray(j),G=B?[]:{},ne=B?x:y;for(const X in j)if(Object.prototype.hasOwnProperty.call(j,X)){const W=`${ne}${i}${X}`;v&&!g?G[X]=this.translate(W,{...s,defaultValue:qt(V)?V[X]:void 0,joinArrays:!1,ns:l}):G[X]=this.translate(W,{...s,joinArrays:!1,ns:l}),G[X]===W&&(G[X]=j[X])}g=G}}else if(E&&q(b)&&Array.isArray(g))g=g.join(b),g&&(g=this.extendTranslation(g,e,s,n));else{let B=!1,G=!1;!this.isValidLookup(g)&&v&&(B=!0,g=V),this.isValidLookup(g)||(G=!0,g=o);const X=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&G?void 0:g,W=v&&V!==g&&this.options.updateMissing;if(G||B||W){if(this.logger.log(W?"updateKey":"missingKey",u,c,o,W?V:g),i){const m=this.resolve(o,{...s,keySeparator:!1});m&&m.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 z=[];const I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&I&&I[0])for(let m=0;m<I.length;m++)z.push(I[m]);else this.options.saveMissingTo==="all"?z=this.languageUtils.toResolveHierarchy(s.lng||this.language):z.push(s.lng||this.language);const d=(m,w,R)=>{var P;const T=v&&R!==g?R:X;this.options.missingKeyHandler?this.options.missingKeyHandler(m,c,w,T,W,s):(P=this.backendConnector)!=null&&P.saveMissing&&this.backendConnector.saveMissing(m,c,w,T,W,s),this.emit("missingKey",m,c,w,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&D?z.forEach(m=>{const w=this.pluralResolver.getSuffixes(m,s);Y&&s[`defaultValue${this.options.pluralSeparator}zero`]&&w.indexOf(`${this.options.pluralSeparator}zero`)<0&&w.push(`${this.options.pluralSeparator}zero`),w.forEach(R=>{d([m],o+R,s[`defaultValue${R}`]||V)})}):d(z,o,V))}g=this.extendTranslation(g,e,s,h,n),G&&g===o&&this.options.appendNamespaceToMissingKey&&(g=`${c}${f}${o}`),(G||B)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${f}${o}`:o,B?g:void 0,s))}return a?(h.res=g,h.usedParams=this.getUsedParamsDetails(s),h):g}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=q(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 h=e.match(this.interpolator.nestingRegexp);u=h&&h.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 h=e.match(this.interpolator.nestingRegexp),g=h&&h.length;u<g&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...h)=>(a==null?void 0:a[0])===h[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${t[0]}`),null):this.translate(...h,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=gr.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(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 p=t.count!==void 0&&!q(t.count),h=p&&!t.ordinal&&t.count===0,g=t.context!==void 0&&(q(t.context)||typeof t.context=="number")&&t.context!=="",y=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(x=>{var O,b;this.isValidLookup(n)||(o=x,!Ht[`${y[0]}-${x}`]&&((O=this.utils)!=null&&O.hasLoadedNamespace)&&!((b=this.utils)!=null&&b.hasLoadedNamespace(o))&&(Ht[`${y[0]}-${x}`]=!0,this.logger.warn(`key "${s}" for languages "${y.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!!!")),y.forEach(E=>{var C;if(this.isValidLookup(n))return;i=E;const D=[f];if((C=this.i18nFormat)!=null&&C.addLookupKeys)this.i18nFormat.addLookupKeys(D,f,E,x,t);else{let $;p&&($=this.pluralResolver.getSuffix(E,t.count,t));const Y=`${this.options.pluralSeparator}zero`,V=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(D.push(f+$),t.ordinal&&$.indexOf(V)===0&&D.push(f+$.replace(V,this.options.pluralSeparator)),h&&D.push(f+Y)),g){const j=`${f}${this.options.contextSeparator}${t.context}`;D.push(j),p&&(D.push(j+$),t.ordinal&&$.indexOf(V)===0&&D.push(j+$.replace(V,this.options.pluralSeparator)),h&&D.push(j+Y))}}let v;for(;v=D.pop();)this.isValidLookup(n)||(a=v,n=this.getResource(E,x,v,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 Kt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=pe.create("languageUtils")}getScriptPartFromCode(e){if(e=Ae(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=Ae(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 Bt={zero:0,one:1,two:2,few:3,many:4,other:5},Gt={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class xn{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=pe.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Ae(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!"),Gt;if(!e.match(/-|_/))return Gt;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)=>Bt[s]-Bt[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 zt=(r,e,t,n=".",s=!0)=>{let a=dn(r,e,t);return!a&&s&&q(t)&&(a=ct(r,t,n),a===void 0&&(a=ct(e,t,n))),a},at=r=>r.replace(/\$/g,"$$$$");class Sn{constructor(e={}){var t;this.logger=pe.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:p,nestingPrefixEscaped:h,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:x,maxReplaces:O,alwaysFormat:b}=e.interpolation;this.escape=t!==void 0?t:hn,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?Se(a):i||"{{",this.suffix=o?Se(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=p?Se(p):h||Se("$t("),this.nestingSuffix=g?Se(g):y||Se(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=O||1e3,this.alwaysFormat=b!==void 0?b:!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 h;let a,i,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(g.indexOf(this.formatSeparator)<0){const b=zt(t,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,n,{...s,...t,interpolationkey:g}):b}const y=g.split(this.formatSeparator),x=y.shift().trim(),O=y.join(this.formatSeparator).trim();return this.format(zt(t,l,x,this.options.keySeparator,this.options.ignoreJSONStructure),O,n,{...s,...t,interpolationkey:x})};this.resetRegExp();const f=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,u=((h=s==null?void 0:s.interpolation)==null?void 0:h.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>at(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?at(this.escape(g)):at(g)}].forEach(g=>{for(o=0;a=g.regex.exec(e);){const y=a[1].trim();if(i=c(y),i===void 0)if(typeof f=="function"){const O=f(e,a,s);i=q(O)?O:""}else if(s&&Object.prototype.hasOwnProperty.call(s,y))i="";else if(u){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),i="";else!q(i)&&!this.useRawValueToEscape&&(i=Ft(i));const x=g.safeValue(i);if(e=e.replace(a[0],x),u?(g.regex.lastIndex+=i.length,g.regex.lastIndex-=a[0].length):g.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 p=`{${u[1]}`;l=u[0],p=this.interpolate(p,i);const h=p.match(/'/g),g=p.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!g||g.length%2!==0)&&(p=p.replace(/'/g,'"'));try{i=JSON.parse(p),c&&(i={...c,...i})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,y),`${l}${f}${p}`}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&&!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(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&&!q(a))return a;q(a)||(a=Ft(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 En=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}},Jt=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(Ae(n),s),e[i]=o),o(t)}},wn=r=>(e,t,n)=>r(Ae(t),n)(e);class Tn{constructor(e={}){this.logger=pe.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Jt:wn;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()]=Jt(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}=En(l);if(this.formats[c]){let p=o;try{const h=((u=s==null?void 0:s.formatParams)==null?void 0:u[s.interpolationkey])||{},g=h.locale||h.lng||s.locale||s.lng||n;p=this.formats[c](o,g,{...f,...s,...h})}catch(h){this.logger.warn(h)}return p}else this.logger.warn(`there was no format function for ${c}`);return o},e)}}const On=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Rn extends ze{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=pe.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 p=`${c}|${u}`;!n.reload&&this.store.hasResourceBundle(c,u)?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),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=>{fn(l.loaded,[a],i),On(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();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 l,c,f,u,p;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((p=this.backend)!=null&&p.create){const h={...i,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let y;g.length===5?y=g(e,t,n,s,h):y=g(e,t,n,s),y&&typeof y.then=="function"?y.then(x=>o(null,x)).catch(o):o(null,y)}catch(y){o(y)}else g(e,t,n,s,o,h)}!e||!e[0]||this.store.addResource(e[0],t,n,s)}}}const Xt=()=>({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}),Zt=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},Me=()=>{},Dn=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class Ce extends ze{constructor(e={},t){if(super(),this.options=Zt(e),this.services={},this.logger=pe,this.modules={external:[]},Dn(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=Xt();this.options={...n,...this.options,...Zt(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?pe.init(s(this.modules.logger),this.options):pe.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Tn;const f=new Kt(this.options);this.store=new Wt(this.options.resources,this.options);const u=this.services;u.logger=pe,u.resourceStore=this.store,u.languageUtils=f,u.pluralResolver=new xn(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 Sn(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new Rn(s(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",(p,...h)=>{this.emit(p,...h)}),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 Ge(this.services,this.options),this.translator.on("*",(p,...h)=>{this.emit(p,...h)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Me),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=Oe(),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=Me){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=[],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=Oe();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=Me),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"&&gr.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=Oe();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=q(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(q(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,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 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 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,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=Oe();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=Oe();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 Kt(Xt());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new Ce(e,t)}cloneInstance(e={},t=Me){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new Ce(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 Wt(o,s),a.services.resourceStore=a.store}return a.translator=new Ge(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 se=Ce.createInstance();se.createInstance=Ce.createInstance;se.createInstance;se.dir;se.init;se.loadResources;se.reloadResources;se.use;se.changeLanguage;se.getFixedT;se.t;se.exists;se.setDefaultNamespace;se.hasLoadedNamespace;se.loadNamespaces;se.loadLanguages;const Pn={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"},An={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},Cn={CalendarFor:"Calendario per",Close:"Chiudi",SpotlightDefaultPlaceholder:"Esegui Comando"},$n={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:Pn,Month:An,Generic:Cn},jn={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"},Ln={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},kn={CalendarFor:"Calendar for",Close:"Close",SpotlightDefaultPlaceholder:"Execute Command"},In={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:jn,Month:Ln,Generic:kn};function Qt(r,e){return new RegExp(Nn(r),e)}function Nn(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _n(r,e,t,n){let s=e;const a=Mn(r,t);if(!s){const o=Math.abs(a);o-Math.floor(o)?s="0,0.00":s="0,0"}const i=Fn(s);return new Intl.NumberFormat(n,i).format(a)}function Mn(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(Qt(l,"g"),""),a=a.replace(Qt(o,"g"),"."),a=Number(a)}const i=Number(a);return isNaN(i)?NaN:i}function Fn(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}se.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 _n(r,e,a,t)}}}catch{return r}}},resources:{en:{translation:In},it:{translation:$n}}});const Vn=(r,e,t,n)=>se.format(r,e,t||se.language,n),Yn=(r,e)=>se.t(r,e);function Je(){const r=L.useCallback((n,s,a,i)=>Vn(n,s,a||void 0,i),[]),e=L.useCallback(()=>se.languages[0],[]),t=L.useCallback((n,s)=>Yn(n,s),[]);return{format:r,getCurrentLanguage:e,translate:t}}var gt=(r=>(r.CALENDAR_FOR="Date.CalendarFor",r.CLOSE="Generic.Close",r.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",r))(gt||{}),ie=(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))(ie||{}),le=(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))(le||{}),ut=(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))(ut||{});function Un({selectedDate:r,onDateChange:e,disabledDateRanges:t=[],initialValue:n,targetRef:s}){const{translate:a}=Je(),i=()=>{if(!n)return;const I=new Date(n);return isNaN(I.getTime())?void 0:I},[o]=L.useState(new Date),[l,c]=L.useState(r||i()||new Date),[f,u]=L.useState(l?l.getMonth():new Date().getMonth()),[p,h]=L.useState(l?l.getFullYear():new Date().getFullYear()),[g,y]=L.useState(l?l.getDate():null),x=L.useRef(null),O=L.useRef([]),b=[a(le.JANUARY),a(le.FEBRUARY),a(le.MARCH),a(le.APRIL),a(le.MAY),a(le.JUNE),a(le.JULY),a(le.AUGUST),a(le.SEPTEMBER),a(le.OCTOBER),a(le.NOVEMBER),a(le.DECEMBER)],E=[{value:a(ie.SUNDAY_SHORT),full:a(ie.SUNDAY)},{value:a(ie.MONDAY_SHORT),full:a(ie.MONDAY)},{value:a(ie.TUESDAY_SHORT),full:a(ie.TUESDAY)},{value:a(ie.WEDNESDAY_SHORT),full:a(ie.WEDNESDAY)},{value:a(ie.THURSDAY_SHORT),full:a(ie.THURSDAY)},{value:a(ie.FRIDAY_SHORT),full:a(ie.FRIDAY)},{value:a(ie.SATURDAY_SHORT),full:a(ie.SATURDAY)}],D=I=>t.some(d=>{const m=d.start.getTime(),w=d.end.getTime(),R=I.getTime();return R>=m&&R<=w}),v=I=>{D(I)||(c(I),y(I.getDate()),e&&e(Lr(I)))},C=()=>{f===0?(u(11),h(p-1)):u(f-1),y(1)},$=()=>{f===11?(u(0),h(p+1)):u(f+1),y(1)},Y=(I,d)=>new Date(I,d+1,0).getDate(),V=(I,d)=>new Date(I,d,1).getDay(),j=I=>{var m;const d=G.findIndex(w=>w!==null&&w.getDate()===I);d!==-1&&O.current[d]&&((m=O.current[d])==null||m.focus(),y(I))},N=(I,d)=>{const m=G[d];if(!m)return;const w=Y(p,f),R=m.getDate();switch(I.key){case"ArrowRight":I.preventDefault();{let T=R+1,P=new Date(p,f,T);if(T>w){const _=f===11?p+1:p,M=f===11?0:f+1;T=1,P=new Date(_,M,T),$(),setTimeout(()=>{U(1,"forward")},0);return}D(P)?U(T,"forward"):j(T)}break;case"Tab":break;case"ArrowLeft":I.preventDefault();{let T=R-1,P=new Date(p,f,T);if(T<1){const _=f===0?p-1:p,M=f===0?11:f-1,k=Y(_,M);T=k,P=new Date(_,M,T),C(),setTimeout(()=>{U(k,"backward")},0);return}D(P)?U(T,"backward"):j(T)}break;case"ArrowUp":I.preventDefault();{let T=R-7,P=new Date(p,f,T);if(T<1){const _=f===0?p-1:p,M=f===0?11:f-1;T=Y(_,M)+T,P=new Date(_,M,T),C(),setTimeout(()=>{U(T,"backward")},0);return}D(P)?U(T,"backward"):j(T)}break;case"ArrowDown":I.preventDefault();{let T=R+7,P=new Date(p,f,T);if(T>w){const _=f===11?p+1:p,M=f===11?0:f+1;T=T-w,P=new Date(_,M,T),$(),setTimeout(()=>{U(T,"forward")},0);return}D(P)?U(T,"forward"):j(T)}break;case"Home":I.preventDefault(),U(1,"forward");break;case"End":I.preventDefault(),U(w,"backward");break;case"PageUp":I.preventDefault(),C(),setTimeout(()=>{const T=Y(f===0?p-1:p,f===0?11:f-1),P=Math.min(R,T);U(P,"forward")},0);break;case"PageDown":I.preventDefault(),$(),setTimeout(()=>{const T=Y(f===11?p+1:p,f===11?0:f+1),P=Math.min(R,T);U(P,"forward")},0);break;case" ":case"Space":if(D(m))return;y(m.getDate()),c(m);break;case"Enter":I.preventDefault(),v(m);break}},U=(I,d)=>{const m=Y(p,f);if(d==="forward"){for(let w=I;w<=m;w++){const R=new Date(p,f,w);if(!D(R)){j(w);return}}$(),setTimeout(()=>{U(1,"forward")},0)}else{for(let P=I;P>=1;P--){const _=new Date(p,f,P);if(!D(_)){j(P);return}}const w=f===0?p-1:p,R=f===0?11:f-1,T=Y(w,R);C(),setTimeout(()=>{U(T,"backward")},0)}},G=(()=>{const I=Y(p,f),d=V(p,f),m=[];for(let w=0;w<d;w++)m.push(null);for(let w=1;w<=I;w++){const R=new Date(p,f,w);m.push(R)}return m})(),ne=[];let X=[];G.forEach((I,d)=>{if(X.push(I),X.length===7||d===G.length-1){for(;X.length<7;)X.push(null);ne.push(X),X=[]}}),L.useEffect(()=>{var I;if(g!==null){const d=G.findIndex(m=>m!==null&&m.getDate()===g);d!==-1&&O.current[d]&&((I=O.current[d])==null||I.focus())}},[f,p,g,G]);const W={label:"smp-datepickercalendar-label",wrapper:"smp-datepickercalendar",calendar:"smp-datepickercalendar",table:"smp-datepickercalendar-table",th:"smp-datepickercalendar-th",td:(I,d,m,w)=>`smp-datepickercalendar-td
46
+ ${I?"smp-datepickercalendar-td-today":""}
47
+ ${d?"smp-datepickercalendar-td-selected":""}
48
+ ${m?"smp-datepickercalendar-td-focused":""}
49
+ ${w?"smp-datepickercalendar-td-disabled":""}`},z=()=>`${b[f]} ${p.toString()}`;return S.jsxs("div",{className:W.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(Pe,{onClick:C,ariaLabel:a(ut.PREVIOUS_MONTH),bindValue:"<",appearance:"ghost",variant:"base"}),S.jsx("div",{"aria-label":z(),className:W.label,children:z()}),S.jsx(Pe,{onClick:$,ariaLabel:a(ut.NEXT_MONTH),bindValue:">",appearance:"ghost",variant:"base"})]}),S.jsxs("table",{ref:x,role:"grid","aria-label":`${a(gt.CALENDAR_FOR)} ${b[f]} ${p}`,className:W.table,children:[S.jsx("thead",{children:S.jsx("tr",{children:E.map(I=>S.jsx("th",{scope:"col",abbr:I.full,className:W.th,children:I.value},I.value))})}),S.jsx("tbody",{children:ne.map((I,d)=>S.jsx("tr",{children:I.map((m,w)=>{const R=d*7+w;if(m===null)return S.jsx("td",{className:W.td(!1,!1,!1,!0)},`empty-${w}`);const T=m.getDate()===o.getDate()&&m.getMonth()===o.getMonth()&&m.getFullYear()===o.getFullYear(),P=l&&m.getDate()===l.getDate()&&m.getMonth()===l.getMonth()&&m.getFullYear()===l.getFullYear(),_=g===m.getDate(),M=D(m);return S.jsx("td",{role:"gridcell","aria-selected":P,tabIndex:_?0:-1,onClick:()=>v(m),onKeyDown:k=>N(k,R),"aria-label":`${m.getDate()} ${b[m.getMonth()]} ${m.getFullYear()}`,"data-selected":P,"aria-disabled":M,ref:k=>{O.current[R]=k},className:W.td(T,P,_,M),children:m.getDate()},`day-${w}`)})},`week-${d}`))})]})]})}const mr=({bindValue:r,placeholder:e,onChange:t,disabledDateRanges:n,...s})=>{const[a,i]=L.useState(!1),[o,l]=L.useState(r||""),[c,f]=L.useState(""),{anchorRef:u,targetRef:p}=dt({position:"bottom",enabled:a});Ue(p,()=>{i(!1)}),Ue(u,()=>{if(typeof u=="object"&&u!==null&&"current"in u){const C=u.current.querySelector("input");C&&C===document.activeElement&&O()}}),dr(a,p);const{format:h,getCurrentLanguage:g}=Je(),y=L.useCallback(C=>{const $=C.length>5&&Cr(C,g())||C,Y=h($,void 0,void 0,{type:"date"}),V=typeof $!="string",j=V&&$.toISOString().substring(0,10)||"";return{isValid:V,formattedDate:Y,isoDate:j,normalizedDate:$}},[g,h]);L.useEffect(()=>{const{formattedDate:C,isoDate:$,isValid:Y}=y(r);l(Y&&$||r),f(Y&&C||r)},[r,h,y]);const x=()=>i(C=>!C),O=()=>{E(c)},b=C=>{E(C),i(!1)},E=C=>{const{isoDate:$,isValid:Y}=y(C);t&&t(Y&&$||C)},D=C=>{f(C)},v=C=>{C.key==="Enter"&&(C.preventDefault(),E(c))};return S.jsxs("div",{"data-component":"date-picker",children:[S.jsx(be,{bindValue:c,placeholder:e,onBlur:O,onChange:D,onKeyDown:v,shapeIcon:"calendar",onShapeIconClick:x,ref:u,...s}),a&&S.jsx(Un,{disabledDateRanges:n,onDateChange:b,initialValue:ft(o)&&o||"",targetRef:p})]})},Wn=({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,p)=>{const h=[...r];if(u=="")h.pop();else{const g=h.findIndex(y=>y.bindValue===u&&y.optionalDisplayValue===p);g>=0?h.splice(g,1):h.push({bindValue:u,optionalDisplayValue:p})}o==null||o(h)},f={container:"smp-multipleAutocomplete-container"};return S.jsxs("div",{className:f.container,"data-component":"multiple-autocomplete",children:[S.jsx(fr,{elements:r,displayMode:e,isEditable:!0,onChange:u=>{o==null||o(u)}}),S.jsx(ht,{bindValue:"",fun:a,onChange:c,_changeOnEnter:!0,listDisplayMode:n,minimumChars:t,placeholder:s,onOptionsRequest:i,_multiActiveIndex:l})]})},yr=({...r})=>{const[e,t]=L.useState(!1),n=e?"visibility-off":"visibility";return S.jsx(be,{...r,inputType:e?"text":"password",shapeIcon:n,onShapeIconClick:()=>t(!e),ariaLabel:"password","data-component":"password"})},Hn=({...r})=>{const[e,t]=L.useState(r.bindValue),{translate:n}=Je(),s=a=>{var i;a.key==="Enter"&&(a.preventDefault(),(i=r.onEnter)==null||i.call(r,e))};return S.jsx(be,{...r,placeholder:r.placeholder?r.placeholder:n(gt.SPOTLIGHT_DEFAULT_PLACEHOLDER),icon:"magnify",inputType:"search",bindValue:e,onChange:t,onKeyDown:s,ariaLabel:"search bar","data-component":"search-bar"})};class ve{constructor(e,t){ye(this,"class");ye(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new ve(e,e.k.split(";"))}static fromString(e){return new ve({t:"",p:""},e.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const Fe=(r,e,t)=>({obj:{t:r.obj.t,p:r.obj.p,k:e},decode:t||r.decode,shape:r.shape}),er=r=>{const e=ve.fromDataObj(r.obj),t=r.decode?ve.fromString(r.decode).getValue():[];return e.getValue().map((n,s)=>({bindValue:n,optionalDisplayValue:t.length>=s?t[s]:""}))},qn=(r,e)=>{const t=new ve(r.obj,e.map(s=>s.bindValue)).getLegacyValue(),n=new ve(r.obj,e.map(s=>s.optionalDisplayValue?s.optionalDisplayValue:"")).getLegacyValue();return Fe(r,t,n)},vr=({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:p})=>{const h={obj:t,shape:e,decode:r},g={onBlur:u,onOptionsRequest:p,fun:a,icon:s,label:o,...n},y=(b,E)=>Pr(t)?Fe(h,new Ye(t,b).getLegacyValue()):Fe(h,b,E),x=b=>Fe(h,new Ve(t,b).getLegacyValue()),O=b=>qn(h,b);switch(e){case oe.AUTOCOMPLETE:{const b={...g,bindValue:t.k,optionalDisplayValue:r,onChange:(E,D)=>{l==null||l(y(E,D))}};return S.jsx(ht,{...b})}case oe.BUTTON:{const b={...g,bindValue:t.k,optionalDisplayValue:r,onClick:()=>{c==null||c(y(t.k))}};return S.jsx(Pe,{...b})}case oe.COMBOBOX:{const b={...g,bindValue:t.k,optionalDisplayValue:r,onChange:(E,D)=>{l==null||l(y(E,D))}};return S.jsx(pr,{...b})}case oe.CHECKBOX:{const b={...g,bindValue:Ve.fromDataObj(t).getValue(),optionalDisplayValue:r,onChange:E=>{l==null||l(x(E))}};return S.jsx(ur,{...b})}case oe.CHIP:{const b={...g,elements:er(h)};return S.jsx(fr,{...b})}case oe.DATE:{const b={...g,bindValue:Ye.fromDataObj(t).getValue(),onChange:E=>{l==null||l(y(E))}};return S.jsx(mr,{...b})}case oe.ICON:case oe.IMAGE:{const b={...g,icon:s,placeholderIcon:i,isInteractable:!!g.fun,onClick:()=>{c==null||c(y(t.k))}};return S.jsx(he,{...b})}case oe.MULTI_AUTOCOMPLETE:{const b={...g,elements:er(h),onChange:E=>{l==null||l(O(E))}};return S.jsx(Wn,{...b})}case oe.PASSWORD:{const b={...g,bindValue:t.k,onChange:E=>{l==null||l(y(E))}};return S.jsx(yr,{...b})}case oe.SPOTLIGHT:{const b={...g,bindValue:t.k,onEnter:E=>{f==null||f(y(E))}};return S.jsx(Hn,{...b})}case oe.TEXT_FIELD:case void 0:{const b={...g,bindValue:t.k,onChange:E=>{l==null||l(y(E))}};return S.jsx(be,{...b})}}},Kn=(r,e)=>{const t=[];for(let n=0;n<r.length;n+=e)t.push(r.slice(n,n+e));return t},br=(r,e)=>r.map(t=>{var a,i;if((a=t.sections)!=null&&a.length)return{...t,sections:br(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=Kn(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}}),tr=(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}},rr=r=>r.some(e=>e.dim&&!e.dim.endsWith("%")),ue={"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"},xr=({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=br(r.sections,e),a=p=>p==null?void 0:p.reduce((h,g)=>{var E,D;let y="",x={},O={},b="";return(E=g.sections)!=null&&E.length?(y=ue["smp-layout-section-grid"],x=a(g.sections),g.gridCols==null&&(b=`${ue[g.horizontal?"smp-grid-template-cols":"smp-grid-template-rows"]}`,(g.horizontal||rr(g.sections))&&(O=tr(g.sections,g.horizontal?t:n)))):(D=g.content)!=null&&D.length&&(g.gridCols!==void 0&&g.gridCols>0?(y=ue["smp-layout-section-grid"],b=`${ue["smp-grid-template-cols"]}`,O={[t]:`repeat(${g.gridCols}, 1fr)`}):y=ue["smp-layout-section-flex"]),{...h,...x,[g.id]:{classes:`${y} ${ue[g.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${b} ${g.hdsp?`smp-justifyContent-${g.hdsp}`:""} ${g.vdsp?`smp-alignItems-${g.vdsp}`:""}`,styles:O}}},{}),i=a(s),o={container:`${ue["smp-layout"]} ${r.horizontal?ue["smp-layout-horizontal"]:ue["smp-layout-vertical"]}`,sections:i},l=r.horizontal||rr(r.sections)?tr(s,r.horizontal?t:n):{},c=p=>{var g;const h=S.jsx("div",{"smp-id":"section-"+p.id,className:o.sections[p.id].classes,style:o.sections[p.id].styles,children:(g=p.sections)!=null&&g.length?p.sections.map(y=>c(y)):p.content.map(y=>f(y,e[y.id],p.hdsp,p.vdsp))},"section-"+p.id);return p.title?S.jsxs("div",{className:`${ue["smp-layout-section-with-title"]}`,children:[S.jsx("span",{className:`${ue["smp-layout-section-title"]} ${p.hdsp?`smp-justifyContent-${p.hdsp}`:""} ${p.vdsp?`smp-alignItems-${p.vdsp}`:""}`,children:S.jsx(nr,{label:p.title})}),h]}):h},f=(p,h,g,y)=>{const x=p.colSpan!==void 0?p.colSpan>0?p.colSpan:p.colStart!==void 0&&p.colStart<1?1:null:null,O=x!==null?`span ${x}`:p.colStart,b=p.colEnd!==void 0&&p.colEnd>0?p.colEnd:"",E={gridColumnStart:O,gridColumnEnd:b},D=`${ue["smp-layout-cell-container"]} ${g?`smp-justifyContent-${g}`:""} ${y?`smp-alignItems-${y}`:""}`;return h?S.jsx("div",{className:D,style:{...E},"smp-id":p.id,children:S.jsx(vr,{...h})},p.id):S.jsx(S.Fragment,{})};return S.jsx("div",{className:o.container,style:l,"smp-id":"layout",children:s==null?void 0:s.map(p=>c(p))})},Bn=({data:r,onClick:e,onEnter:t})=>{var i,o;const[n,s]=L.useState(),a=L.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(p=>p.visible).reduce((p,h)=>{const g=c.cells[h.name],y={...g,onChange:x=>{s(O=>O&&{...O,[h.name]:{...O[h.name],obj:{...O[h.name].obj,k:x.obj.k}}})},onClick:()=>{g.fun&&e&&e({...g})},onEnter:x=>{t&&t(x)}};return{...p,[h.name]:y}},{})},[e,t]);return L.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(xr,{layout:r.rows[0].layout,cells:n})})},De=r=>r==null?!1:typeof r=="string"?r.toLocaleLowerCase()=="yes":r,Gn=({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:p,UmColName:h,UmColor:g="var(--smp-dashList-color-base)",ForceValue:y,ValueColName:x,ValueColor:O="var(--smp-dashList-color-base)",SelectLayout:b="1",onClick:E})=>{const D="N/A",v=(e==null?void 0:e.columns)||[],C=(e==null?void 0:e.rows)||[],$=C.length>0,Y="--smp-dashList-color",V="smp-layout",j="descr",N="icon",U="um",B="value",G=i||"1em",ne="18px",X="--smp-dashList-columns",W="--smp-dashList-fontSize",z={dash:(F="1")=>{const J=d(F),ee=J,te=m(J,j),ce=m(J,N),ge=m(J,U),fe=m(J,B);return{container:ee,descr:te,icon:ce,um:ge,value:fe}},dashList:`smp-dash-list ${De(a)?"smp-dash-list-fill-space":""}
50
+ ${De(o)?"smp-dash-list-horizontal":""}`},{format:I}=Je(),d=F=>`${V}-${F}`,m=(F,J)=>`${F}__${J}`,w=F=>`${Y}-${F}`,R=F=>{const J=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(J.test(F)){const te=F.match(J)||[];if((te==null?void 0:te.length)>3)return"rgb("+te[1]+","+te[2]+","+te[3]+")"}return F},T=F=>{if(!u)return F;const[J,ee]=P(u).map(xe=>parseInt(xe||"0")),te="0,0"+(ee?"."+"0".repeat(ee):""),ce=I(F,te,"it");if(!J)return ce;const[ge,fe]=ce.split(",");return ge+(fe?`,${fe}`:"")},P=F=>F.includes(";")?F.split(";"):[F],_=F=>{const J=te=>{var ce;if(te)return(ce=F==null?void 0:F.cells[te])==null?void 0:ce.obj.k},ee=te=>{var ce,ge;if(!(v.length<=te))return(ge=(ce=F==null?void 0:F.cells[v[te].name])==null?void 0:ce.obj)==null?void 0:ge.k};return{descr:t||J(n)||ee(2)||"",icon:l||J(c)||ee(3)||"",um:p||J(h)||ee(1)||"",value:y||J(x)||ee(0)||""}},M=F=>{E==null||E(F)},k=(F,J)=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),F.stopPropagation(),M(J))},H=(F=>{const J=z.dash(F);return{className:J,descr:ee=>S.jsx("div",{className:J.descr,children:ee},`${F}-${j}`),icon:ee=>S.jsx("div",{className:J.icon,children:S.jsx(he,{color:f,height:ne,icon:ee,width:ne})},`${F}-${N}`),um:ee=>S.jsx("div",{className:J.um,children:ee},`${F}-${U}`),value:ee=>S.jsx("div",{className:J.value,children:ee},`${F}-${B}`)}})(b),re=F=>{const{descr:J,icon:ee,um:te,value:ce}=_(F),ge={[w(j)]:R(s),[w(U)]:R(g),[w(B)]:R(O)},fe=[],xe=T(ce);switch(b){case"2":ee&&fe.push(H.icon(ee)),fe.push(H.descr(J)),fe.push(H.value(te?xe+" "+te:xe));break;default:case"1":fe.push(H.descr(J)),fe.push(H.value(te?xe+" "+te:xe))}return S.jsx("div",{className:H.className.container,role:"button",style:ge,tabIndex:0,onClick:()=>M(F),onKeyDown:Sr=>k(Sr,F),children:fe},F.id)},A={[X]:String(r),[W]:G};return S.jsx("div",{className:z.dashList,style:A,children:$?C.map(F=>re(F)):D})},zn=({data:r,open:e,minifiedOnClose:t=!0,customHeight:n="100vh",onClick:s,onEnter:a,onClose:i})=>{var O,b;const[o,l]=L.useState(),[c,f]=L.useState(e??!0),u=L.useRef(null),p=n.trim()?n:"100vh",h=L.useCallback(E=>{var v,C;if(!((v=E.rows)!=null&&v.length)||!((C=E.columns)!=null&&C.length))return{};const D=E.rows[0];return E.columns.filter($=>$.visible).reduce(($,Y)=>{const V=D.cells[Y.name];if(!c&&t&&V.shape!==oe.BUTTON)return $;const j={...V,onChange:N=>{l(U=>{const B={...U};return B!=null&&B[Y.name]&&(B[Y.name].obj.k=N.obj.k),B})},onClick:()=>{V.fun&&s&&s({...V})},onEnter:N=>{a&&a(N)}};return!c&&t&&(j.data={...j.data,showText:!1}),{...$,[Y.name]:j}},{})},[s,a,c,t]),g=L.useCallback(()=>{i==null||i()},[i]),y=()=>{t?f(E=>!E):(f(!1),i==null||i())};if(L.useEffect(()=>{l(h(r))},[r]),L.useEffect(()=>{if(!u.current)return;if(!t){l(h(r));return}const E=getComputedStyle(u.current).getPropertyValue("--smp-drawer-slide-transition");let D=Number(E);E.endsWith("ms")?D=parseFloat(E):E.endsWith("s")&&(D=parseFloat(E)*1e3),setTimeout(()=>{l(h(r))},D/2)},[c,t]),L.useEffect(()=>{e!==void 0&&!t&&f(e)},[t,e]),!((O=r==null?void 0:r.rows)!=null&&O.length)||!((b=r.columns)!=null&&b.length))return null;const x={drawer:`smp-drawer ${t?"smp-drawer-minified":"smp-drawer-fixed"} ${c?"smp-drawer-open":""}`,container:"smp-drawer-container",containerIcon:"smp-drawer-container-icon",containerLayout:"smp-drawer-container-layout",backdrop:`smp-drawer-backdrop ${c?"smp-drawer-backdrop-open":""}`};return o&&S.jsxs(S.Fragment,{children:[!t&&S.jsx("div",{"aria-hidden":"true","aria-label":"drawer-backdrop",className:x.backdrop,onClick:g}),S.jsx("aside",{ref:u,className:x.drawer,style:{height:p},"aria-label":"Drawer",children:S.jsxs("div",{className:x.container,children:[S.jsx("div",{className:x.containerIcon,children:S.jsx(he,{icon:t?"menu_close":"close",title:"drawer_icon",rotated:!c,isInteractable:!0,onClick:y,width:24,height:24})}),S.jsx("div",{className:x.containerLayout,children:S.jsx(xr,{layout:r.rows[0].layout,cells:o})})]})})]})},Jn=({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]=L.useState();L.useEffect(()=>{u(()=>{const y={...r};return e&&(y.shape=e),s&&(y.obj=Ar(s)),y})},[r,s,e]);const h={container:`smp-field-container ${De(t)?`smp-field-position-${n}`:""}`},g=()=>{De(t)||o==null||o(f)};if(f)return S.jsxs("div",{className:h.container,children:[S.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",font:"var(--smp-fontLabel-base)"},children:S.jsx(vr,{...f,onChange:u,onOptionsRequest:c,fun:r.fun,onBlur:g,label:a,labelPosition:i})}),De(t)&&S.jsx(Pe,{bindValue:"Confirm",onClick:()=>l==null?void 0:l(f)})]})};exports.AppBar=Bn;exports.Autocomplete=ht;exports.Button=Pe;exports.Checkbox=ur;exports.Combobox=pr;exports.DashList=Gn;exports.DatePicker=mr;exports.Drawer=zn;exports.Field=Jn;exports.Icon=he;exports.Password=yr;exports.Textfield=be;exports.configurePaths=rn;