@sme.up/ketchup2 2.0.0-SNAPSHOT-20250630152637 → 2.0.0-SNAPSHOT-20250630152733

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.
@@ -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 Pt;function Br(){if(Pt)return Ae;Pt=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 Ae.Fragment=e,Ae.jsx=t,Ae.jsxs=t,Ae}var Ne={};/**
9
+ */var kt;function Br(){if(kt)return Ae;kt=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 Ae.Fragment=e,Ae.jsx=t,Ae.jsxs=t,Ae}var Ne={};/**
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 kt;function Hr(){return kt||(kt=1,process.env.NODE_ENV!=="production"&&function(){function r(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===R?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case y:return"Fragment";case E:return"Profiler";case S:return"StrictMode";case b:return"Suspense";case D:return"SuspenseList";case v:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case d:return"Portal";case w:return(h.displayName||"Context")+".Provider";case T:return(h._context.displayName||"Context")+".Consumer";case O:var x=h.render;return h=h.displayName,h||(h=x.displayName||x.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case N:return x=h.displayName||null,x!==null?x:r(h.type)||"Memo";case L:x=h._payload,h=h._init;try{return r(h(x))}catch{}}return null}function e(h){return""+h}function t(h){try{e(h);var x=!1}catch{x=!0}if(x){x=console;var j=x.error,I=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return j.call(x,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",I),e(h)}}function n(h){if(h===y)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===L)return"<...>";try{var x=r(h);return x?"<"+x+">":"<...>"}catch{return"<...>"}}function s(){var h=M.A;return h===null?null:h.getOwner()}function a(){return Error("react-stack-top-frame")}function i(h){if(C.call(h,"key")){var x=Object.getOwnPropertyDescriptor(h,"key").get;if(x&&x.isReactWarning)return!1}return h.key!==void 0}function o(h,x){function j(){A||(A=!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)",x))}j.isReactWarning=!0,Object.defineProperty(h,"key",{get:j,configurable:!0})}function l(){var h=r(this.type);return Y[h]||(Y[h]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),h=this.props.ref,h!==void 0?h:null}function c(h,x,j,I,$,k,B,H){return j=k.ref,h={$$typeof:m,type:h,key:x,props:k,_owner:$},(j!==void 0?j:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:l}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:B}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:H}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function f(h,x,j,I,$,k,B,H){var W=x.children;if(W!==void 0)if(I)if(P(W)){for(I=0;I<W.length;I++)u(W[I]);Object.freeze&&Object.freeze(W)}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(W);if(C.call(x,"key")){W=r(h);var X=Object.keys(x).filter(function(se){return se!=="key"});I=0<X.length?"{key: someKey, "+X.join(": ..., ")+": ...}":"{key: someKey}",U[W+I]||(X=0<X.length?"{"+X.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var Pt;function Hr(){return Pt||(Pt=1,process.env.NODE_ENV!=="production"&&function(){function r(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===R?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case y:return"Fragment";case E:return"Profiler";case S:return"StrictMode";case b:return"Suspense";case D:return"SuspenseList";case v:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case p:return"Portal";case w:return(h.displayName||"Context")+".Provider";case T:return(h._context.displayName||"Context")+".Consumer";case O:var x=h.render;return h=h.displayName,h||(h=x.displayName||x.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case N:return x=h.displayName||null,x!==null?x:r(h.type)||"Memo";case I:x=h._payload,h=h._init;try{return r(h(x))}catch{}}return null}function e(h){return""+h}function t(h){try{e(h);var x=!1}catch{x=!0}if(x){x=console;var j=x.error,k=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return j.call(x,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",k),e(h)}}function n(h){if(h===y)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===I)return"<...>";try{var x=r(h);return x?"<"+x+">":"<...>"}catch{return"<...>"}}function s(){var h=M.A;return h===null?null:h.getOwner()}function a(){return Error("react-stack-top-frame")}function i(h){if(C.call(h,"key")){var x=Object.getOwnPropertyDescriptor(h,"key").get;if(x&&x.isReactWarning)return!1}return h.key!==void 0}function o(h,x){function j(){P||(P=!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)",x))}j.isReactWarning=!0,Object.defineProperty(h,"key",{get:j,configurable:!0})}function l(){var h=r(this.type);return Y[h]||(Y[h]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),h=this.props.ref,h!==void 0?h:null}function c(h,x,j,k,$,A,U,H){return j=A.ref,h={$$typeof:m,type:h,key:x,props:A,_owner:$},(j!==void 0?j:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:l}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:U}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:H}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function f(h,x,j,k,$,A,U,H){var B=x.children;if(B!==void 0)if(k)if(L(B)){for(k=0;k<B.length;k++)u(B[k]);Object.freeze&&Object.freeze(B)}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(B);if(C.call(x,"key")){B=r(h);var X=Object.keys(x).filter(function(se){return se!=="key"});k=0<X.length?"{key: someKey, "+X.join(": ..., ")+": ...}":"{key: someKey}",W[B+k]||(X=0<X.length?"{"+X.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} />`,I,W,X,W),U[W+I]=!0)}if(W=null,j!==void 0&&(t(j),W=""+j),i(x)&&(t(x.key),W=""+x.key),"key"in x){j={};for(var q in x)q!=="key"&&(j[q]=x[q])}else j=x;return W&&o(j,typeof h=="function"?h.displayName||h.name||"Unknown":h),c(h,W,k,$,s(),j,B,H)}function u(h){typeof h=="object"&&h!==null&&h.$$typeof===m&&h._store&&(h._store.validated=1)}var p=_,m=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),w=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),R=Symbol.for("react.client.reference"),M=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=Object.prototype.hasOwnProperty,P=Array.isArray,V=console.createTask?console.createTask:function(){return null};p={"react-stack-bottom-frame":function(h){return h()}};var A,Y={},K=p["react-stack-bottom-frame"].bind(p,a)(),J=V(n(a)),U={};Ne.Fragment=y,Ne.jsx=function(h,x,j,I,$){var k=1e4>M.recentlyCreatedOwnerStacks++;return f(h,x,j,!1,I,$,k?Error("react-stack-top-frame"):K,k?V(n(h)):J)},Ne.jsxs=function(h,x,j,I,$){var k=1e4>M.recentlyCreatedOwnerStacks++;return f(h,x,j,!0,I,$,k?Error("react-stack-top-frame"):K,k?V(n(h)):J)}}()),Ne}var At;function Gr(){return At||(At=1,process.env.NODE_ENV==="production"?Be.exports=Br():Be.exports=Hr()),Be.exports}var g=Gr();const De=({label:r,disabled:e,htmlFor:t})=>{const n={container:`smp-label ${e?"smp-label-disabled":""}`};return g.jsx("label",{className:n.container,htmlFor:t,children:r})},pe={"smp-layout":"_smp-layout_pdvd2_1","smp-layout-horizontal":"_smp-layout-horizontal_pdvd2_9","smp-layout-vertical":"_smp-layout-vertical_pdvd2_14","smp-layout-section-grid":"_smp-layout-section-grid_pdvd2_19","smp-layout-section-vertical":"_smp-layout-section-vertical_pdvd2_22","smp-layout-section-horizontal":"_smp-layout-section-horizontal_pdvd2_26","smp-layout-cell-container":"_smp-layout-cell-container_pdvd2_31","smp-layout-section-flex":"_smp-layout-section-flex_pdvd2_35","smp-grid-template-cols":"_smp-grid-template-cols_pdvd2_52","smp-grid-template-rows":"_smp-grid-template-rows_pdvd2_56","smp-layout-section-with-title":"_smp-layout-section-with-title_pdvd2_60","smp-layout-section-title":"_smp-layout-section-title_pdvd2_66"},Kr=(r,e)=>{const t=[];for(let n=0;n<r.length;n+=e)t.push(r.slice(n,n+e));return t},Er=(r,e)=>r.map(t=>{var a,i;if((a=t.sections)!=null&&a.length)return{...t,sections:Er(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=Kr(t.content.filter(l=>e.includes(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}}),Nt=(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}},Mt=r=>r.some(e=>e.dim&&!e.dim.endsWith("%"));function qr(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 tt(){return tt=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},tt.apply(null,arguments)}function wt(r,e){return wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},wt(r,e)}function zr(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,wt(r,e)}function pt(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 He={};/*!
22
+ <%s key={someKey} {...props} />`,k,B,X,B),W[B+k]=!0)}if(B=null,j!==void 0&&(t(j),B=""+j),i(x)&&(t(x.key),B=""+x.key),"key"in x){j={};for(var K in x)K!=="key"&&(j[K]=x[K])}else j=x;return B&&o(j,typeof h=="function"?h.displayName||h.name||"Unknown":h),c(h,B,A,$,s(),j,U,H)}function u(h){typeof h=="object"&&h!==null&&h.$$typeof===m&&h._store&&(h._store.validated=1)}var d=_,m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),w=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),R=Symbol.for("react.client.reference"),M=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=Object.prototype.hasOwnProperty,L=Array.isArray,F=console.createTask?console.createTask:function(){return null};d={"react-stack-bottom-frame":function(h){return h()}};var P,Y={},z=d["react-stack-bottom-frame"].bind(d,a)(),J=F(n(a)),W={};Ne.Fragment=y,Ne.jsx=function(h,x,j,k,$){var A=1e4>M.recentlyCreatedOwnerStacks++;return f(h,x,j,!1,k,$,A?Error("react-stack-top-frame"):z,A?F(n(h)):J)},Ne.jsxs=function(h,x,j,k,$){var A=1e4>M.recentlyCreatedOwnerStacks++;return f(h,x,j,!0,k,$,A?Error("react-stack-top-frame"):z,A?F(n(h)):J)}}()),Ne}var At;function Gr(){return At||(At=1,process.env.NODE_ENV==="production"?Be.exports=Br():Be.exports=Hr()),Be.exports}var g=Gr();const De=({label:r,disabled:e,htmlFor:t})=>{const n={container:`smp-label ${e?"smp-label-disabled":""}`};return g.jsx("label",{className:n.container,htmlFor:t,children:r})},pe={"smp-layout":"_smp-layout_pdvd2_1","smp-layout-horizontal":"_smp-layout-horizontal_pdvd2_9","smp-layout-vertical":"_smp-layout-vertical_pdvd2_14","smp-layout-section-grid":"_smp-layout-section-grid_pdvd2_19","smp-layout-section-vertical":"_smp-layout-section-vertical_pdvd2_22","smp-layout-section-horizontal":"_smp-layout-section-horizontal_pdvd2_26","smp-layout-cell-container":"_smp-layout-cell-container_pdvd2_31","smp-layout-section-flex":"_smp-layout-section-flex_pdvd2_35","smp-grid-template-cols":"_smp-grid-template-cols_pdvd2_52","smp-grid-template-rows":"_smp-grid-template-rows_pdvd2_56","smp-layout-section-with-title":"_smp-layout-section-with-title_pdvd2_60","smp-layout-section-title":"_smp-layout-section-title_pdvd2_66"},Kr=(r,e)=>{const t=[];for(let n=0;n<r.length;n+=e)t.push(r.slice(n,n+e));return t},Er=(r,e)=>r.map(t=>{var a,i;if((a=t.sections)!=null&&a.length)return{...t,sections:Er(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=Kr(t.content.filter(l=>e.includes(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}}),Nt=(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}},Mt=r=>r.some(e=>e.dim&&!e.dim.endsWith("%"));function qr(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 tt(){return tt=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},tt.apply(null,arguments)}function wt(r,e){return wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},wt(r,e)}function zr(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,wt(r,e)}function pt(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 He={};/*!
23
23
  * content-type
24
24
  * Copyright(c) 2015 Douglas Christopher Wilson
25
25
  * MIT Licensed
26
- */var Ft;function Jr(){if(Ft)return He;Ft=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-]+$/;He.format=i,He.parse=o;function i(u){if(!u||typeof u!="object")throw new TypeError("argument obj is required");var p=u.parameters,m=u.type;if(!m||!a.test(m))throw new TypeError("invalid type");var d=m;if(p&&typeof p=="object")for(var y,S=Object.keys(p).sort(),E=0;E<S.length;E++){if(y=S[E],!t.test(y))throw new TypeError("invalid parameter name");d+="; "+y+"="+c(p[y])}return d}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 m=p.indexOf(";"),d=m!==-1?p.slice(0,m).trim():p.trim();if(!a.test(d))throw new TypeError("invalid media type");var y=new f(d.toLowerCase());if(m!==-1){var S,E,T;for(r.lastIndex=m;E=r.exec(p);){if(E.index!==m)throw new TypeError("invalid parameter format");m+=E[0].length,S=E[1].toLowerCase(),T=E[2],T.charCodeAt(0)===34&&(T=T.slice(1,-1),T.indexOf("\\")!==-1&&(T=T.replace(n,"$1"))),y.parameters[S]=T}if(m!==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 He}var Xr=Jr(),Le=new Map,Tr=function(e){return e.cloneNode(!0)},Vt=function(){return window.location.protocol==="file:"},Or=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=Xr.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(Vt()?"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||Vt()&&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()},xe={},Yt=function(e,t){xe[e]=xe[e]||[],xe[e].push(t)},Zr=function(e){for(var t=function(i,o){setTimeout(function(){if(Array.isArray(xe[e])){var l=Le.get(e),c=xe[e][i];l instanceof SVGSVGElement&&c(null,Tr(l)),l instanceof Error&&c(l),i===xe[e].length-1&&delete xe[e]}},0)},n=0,s=xe[e].length;n<s;n++)t(n)},Qr=function(e,t,n){if(Le.has(e)){var s=Le.get(e);if(s===void 0){Yt(e,n);return}if(s instanceof SVGSVGElement){n(null,Tr(s));return}}Le.set(e,void 0),Yt(e,n),Or(e,t,function(a,i){var o;a?Le.set(e,a):((o=i.responseXML)===null||o===void 0?void 0:o.documentElement)instanceof SVGSVGElement&&Le.set(e,i.responseXML.documentElement),Zr(e)})},en=function(e,t,n){Or(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)})},tn=0,rn=function(){return++tn},ge=[],Ut={},nn="http://www.w3.org/2000/svg",ht="http://www.w3.org/1999/xlink",Wt=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(ge.indexOf(e)!==-1){ge.splice(ge.indexOf(e),1),e=null;return}ge.push(e),e.setAttribute("src","");var c=s?Qr:en;c(l,a,function(f,u){if(!u){ge.splice(ge.indexOf(e),1),e=null,o(f);return}var p=e.getAttribute("id");p&&u.setAttribute("id",p);var m=e.getAttribute("title");m&&u.setAttribute("title",m);var d=e.getAttribute("width");d&&u.setAttribute("width",d);var y=e.getAttribute("height");y&&u.setAttribute("height",y);var S=Array.from(new Set(pt(pt(pt([],(u.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();u.setAttribute("class",S);var E=e.getAttribute("style");E&&u.setAttribute("style",E),u.setAttribute("data-src",l);var T=[].filter.call(e.attributes,function(J){return/^data-\w[\w-]*$/.test(J.name)});if(Array.prototype.forEach.call(T,function(J){J.name&&J.value&&u.setAttribute(J.name,J.value)}),n){var w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},O,b,D,N,L;Object.keys(w).forEach(function(J){O=J,D=w[J],b=u.querySelectorAll(O+"[id]");for(var U=function(I,$){N=b[I].id,L=N+"-"+rn();var k;Array.prototype.forEach.call(D,function(G){k=u.querySelectorAll("["+G+'*="'+N+'"]');for(var Z=0,re=k.length;Z<re;Z++){var ne=k[Z].getAttribute(G);ne&&!ne.match(new RegExp('url\\("?#'+N+'"?\\)'))||k[Z].setAttribute(G,"url(#"+L+")")}});for(var B=u.querySelectorAll("[*|href]"),H=[],W=0,X=B.length;W<X;W++){var q=B[W].getAttributeNS(ht,"href");q&&q.toString()==="#"+b[I].id&&H.push(B[W])}for(var se=0,F=H.length;se<F;se++)H[se].setAttributeNS(ht,"href","#"+L);b[I].id=L},h=0,x=b.length;h<x;h++)U(h)})}u.removeAttribute("xmlns:a");for(var v=u.querySelectorAll("script"),R=[],M,C,P=0,V=v.length;P<V;P++)C=v[P].getAttribute("type"),(!C||C==="application/ecmascript"||C==="application/javascript"||C==="text/javascript")&&(M=v[P].innerText||v[P].textContent,M&&R.push(M),u.removeChild(v[P]));if(R.length>0&&(t==="always"||t==="once"&&!Ut[l])){for(var A=0,Y=R.length;A<Y;A++)new Function(R[A])(window);Ut[l]=!0}var K=u.querySelectorAll("style");if(Array.prototype.forEach.call(K,function(J){J.textContent+=""}),u.setAttribute("xmlns",nn),u.setAttribute("xmlns:xlink",ht),i(u),!e.parentNode){ge.splice(ge.indexOf(e),1),e=null,o(new Error("Parent node is null"));return}e.parentNode.replaceChild(u,e),ge.splice(ge.indexOf(e),1),e=null,o(null,u)})},sn=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,m=p===void 0?"never":p,d=n.httpRequestWithCredentials,y=d===void 0?!1:d,S=n.renumerateIRIElements,E=S===void 0?!0:S;if(e&&"length"in e)for(var T=0,w=0,O=e.length;w<O;w++)Wt(e[w],m,E,u,y,c,function(b,D){o(b,D),e&&"length"in e&&e.length===++T&&a(T)});else e?Wt(e,m,E,u,y,c,function(b,D){o(b,D),a(1),e=null}):a(0)},Ge={exports:{}},Ke={exports:{}},Q={};/** @license React v16.13.1
26
+ */var Ft;function Jr(){if(Ft)return He;Ft=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-]+$/;He.format=i,He.parse=o;function i(u){if(!u||typeof u!="object")throw new TypeError("argument obj is required");var d=u.parameters,m=u.type;if(!m||!a.test(m))throw new TypeError("invalid type");var p=m;if(d&&typeof d=="object")for(var y,S=Object.keys(d).sort(),E=0;E<S.length;E++){if(y=S[E],!t.test(y))throw new TypeError("invalid parameter name");p+="; "+y+"="+c(d[y])}return p}function o(u){if(!u)throw new TypeError("argument string is required");var d=typeof u=="object"?l(u):u;if(typeof d!="string")throw new TypeError("argument string is required to be a string");var m=d.indexOf(";"),p=m!==-1?d.slice(0,m).trim():d.trim();if(!a.test(p))throw new TypeError("invalid media type");var y=new f(p.toLowerCase());if(m!==-1){var S,E,T;for(r.lastIndex=m;E=r.exec(d);){if(E.index!==m)throw new TypeError("invalid parameter format");m+=E[0].length,S=E[1].toLowerCase(),T=E[2],T.charCodeAt(0)===34&&(T=T.slice(1,-1),T.indexOf("\\")!==-1&&(T=T.replace(n,"$1"))),y.parameters[S]=T}if(m!==d.length)throw new TypeError("invalid parameter format")}return y}function l(u){var d;if(typeof u.getHeader=="function"?d=u.getHeader("content-type"):typeof u.headers=="object"&&(d=u.headers&&u.headers["content-type"]),typeof d!="string")throw new TypeError("content-type header is missing from object");return d}function c(u){var d=String(u);if(t.test(d))return d;if(d.length>0&&!e.test(d))throw new TypeError("invalid parameter value");return'"'+d.replace(s,"\\$1")+'"'}function f(u){this.parameters=Object.create(null),this.type=u}return He}var Xr=Jr(),Ie=new Map,Tr=function(e){return e.cloneNode(!0)},Vt=function(){return window.location.protocol==="file:"},Or=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=Xr.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(Vt()?"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||Vt()&&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()},xe={},Yt=function(e,t){xe[e]=xe[e]||[],xe[e].push(t)},Zr=function(e){for(var t=function(i,o){setTimeout(function(){if(Array.isArray(xe[e])){var l=Ie.get(e),c=xe[e][i];l instanceof SVGSVGElement&&c(null,Tr(l)),l instanceof Error&&c(l),i===xe[e].length-1&&delete xe[e]}},0)},n=0,s=xe[e].length;n<s;n++)t(n)},Qr=function(e,t,n){if(Ie.has(e)){var s=Ie.get(e);if(s===void 0){Yt(e,n);return}if(s instanceof SVGSVGElement){n(null,Tr(s));return}}Ie.set(e,void 0),Yt(e,n),Or(e,t,function(a,i){var o;a?Ie.set(e,a):((o=i.responseXML)===null||o===void 0?void 0:o.documentElement)instanceof SVGSVGElement&&Ie.set(e,i.responseXML.documentElement),Zr(e)})},en=function(e,t,n){Or(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)})},tn=0,rn=function(){return++tn},ge=[],Ut={},nn="http://www.w3.org/2000/svg",ht="http://www.w3.org/1999/xlink",Wt=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(ge.indexOf(e)!==-1){ge.splice(ge.indexOf(e),1),e=null;return}ge.push(e),e.setAttribute("src","");var c=s?Qr:en;c(l,a,function(f,u){if(!u){ge.splice(ge.indexOf(e),1),e=null,o(f);return}var d=e.getAttribute("id");d&&u.setAttribute("id",d);var m=e.getAttribute("title");m&&u.setAttribute("title",m);var p=e.getAttribute("width");p&&u.setAttribute("width",p);var y=e.getAttribute("height");y&&u.setAttribute("height",y);var S=Array.from(new Set(pt(pt(pt([],(u.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();u.setAttribute("class",S);var E=e.getAttribute("style");E&&u.setAttribute("style",E),u.setAttribute("data-src",l);var T=[].filter.call(e.attributes,function(J){return/^data-\w[\w-]*$/.test(J.name)});if(Array.prototype.forEach.call(T,function(J){J.name&&J.value&&u.setAttribute(J.name,J.value)}),n){var w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},O,b,D,N,I;Object.keys(w).forEach(function(J){O=J,D=w[J],b=u.querySelectorAll(O+"[id]");for(var W=function(k,$){N=b[k].id,I=N+"-"+rn();var A;Array.prototype.forEach.call(D,function(G){A=u.querySelectorAll("["+G+'*="'+N+'"]');for(var Z=0,re=A.length;Z<re;Z++){var ne=A[Z].getAttribute(G);ne&&!ne.match(new RegExp('url\\("?#'+N+'"?\\)'))||A[Z].setAttribute(G,"url(#"+I+")")}});for(var U=u.querySelectorAll("[*|href]"),H=[],B=0,X=U.length;B<X;B++){var K=U[B].getAttributeNS(ht,"href");K&&K.toString()==="#"+b[k].id&&H.push(U[B])}for(var se=0,V=H.length;se<V;se++)H[se].setAttributeNS(ht,"href","#"+I);b[k].id=I},h=0,x=b.length;h<x;h++)W(h)})}u.removeAttribute("xmlns:a");for(var v=u.querySelectorAll("script"),R=[],M,C,L=0,F=v.length;L<F;L++)C=v[L].getAttribute("type"),(!C||C==="application/ecmascript"||C==="application/javascript"||C==="text/javascript")&&(M=v[L].innerText||v[L].textContent,M&&R.push(M),u.removeChild(v[L]));if(R.length>0&&(t==="always"||t==="once"&&!Ut[l])){for(var P=0,Y=R.length;P<Y;P++)new Function(R[P])(window);Ut[l]=!0}var z=u.querySelectorAll("style");if(Array.prototype.forEach.call(z,function(J){J.textContent+=""}),u.setAttribute("xmlns",nn),u.setAttribute("xmlns:xlink",ht),i(u),!e.parentNode){ge.splice(ge.indexOf(e),1),e=null,o(new Error("Parent node is null"));return}e.parentNode.replaceChild(u,e),ge.splice(ge.indexOf(e),1),e=null,o(null,u)})},sn=function(e,t){var n=t===void 0?{}:t,s=n.afterAll,a=s===void 0?function(){}:s,i=n.afterEach,o=i===void 0?function(){}:i,l=n.beforeEach,c=l===void 0?function(){}:l,f=n.cacheRequests,u=f===void 0?!0:f,d=n.evalScripts,m=d===void 0?"never":d,p=n.httpRequestWithCredentials,y=p===void 0?!1:p,S=n.renumerateIRIElements,E=S===void 0?!0:S;if(e&&"length"in e)for(var T=0,w=0,O=e.length;w<O;w++)Wt(e[w],m,E,u,y,c,function(b,D){o(b,D),e&&"length"in e&&e.length===++T&&a(T)});else e?Wt(e,m,E,u,y,c,function(b,D){o(b,D),a(1),e=null}):a(0)},Ge={exports:{}},Ke={exports:{}},Q={};/** @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 Bt;function an(){if(Bt)return Q;Bt=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,m=r?Symbol.for("react.memo"):60115,d=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,S=r?Symbol.for("react.fundamental"):60117,E=r?Symbol.for("react.responder"):60118,T=r?Symbol.for("react.scope"):60119;function w(b){if(typeof b=="object"&&b!==null){var D=b.$$typeof;switch(D){case e:switch(b=b.type,b){case l:case c:case n:case a:case s:case u:return b;default:switch(b=b&&b.$$typeof,b){case o:case f:case d:case m:case i:return b;default:return D}}case t:return D}}}function O(b){return w(b)===c}return Q.AsyncMode=l,Q.ConcurrentMode=c,Q.ContextConsumer=o,Q.ContextProvider=i,Q.Element=e,Q.ForwardRef=f,Q.Fragment=n,Q.Lazy=d,Q.Memo=m,Q.Portal=t,Q.Profiler=a,Q.StrictMode=s,Q.Suspense=u,Q.isAsyncMode=function(b){return O(b)||w(b)===l},Q.isConcurrentMode=O,Q.isContextConsumer=function(b){return w(b)===o},Q.isContextProvider=function(b){return w(b)===i},Q.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Q.isForwardRef=function(b){return w(b)===f},Q.isFragment=function(b){return w(b)===n},Q.isLazy=function(b){return w(b)===d},Q.isMemo=function(b){return w(b)===m},Q.isPortal=function(b){return w(b)===t},Q.isProfiler=function(b){return w(b)===a},Q.isStrictMode=function(b){return w(b)===s},Q.isSuspense=function(b){return w(b)===u},Q.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===c||b===a||b===s||b===u||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===d||b.$$typeof===m||b.$$typeof===i||b.$$typeof===o||b.$$typeof===f||b.$$typeof===S||b.$$typeof===E||b.$$typeof===T||b.$$typeof===y)},Q.typeOf=w,Q}var ee={};/** @license React v16.13.1
33
+ */var Bt;function an(){if(Bt)return Q;Bt=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,o=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,c=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,u=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,p=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,S=r?Symbol.for("react.fundamental"):60117,E=r?Symbol.for("react.responder"):60118,T=r?Symbol.for("react.scope"):60119;function w(b){if(typeof b=="object"&&b!==null){var D=b.$$typeof;switch(D){case e:switch(b=b.type,b){case l:case c:case n:case a:case s:case u:return b;default:switch(b=b&&b.$$typeof,b){case o:case f:case p:case m:case i:return b;default:return D}}case t:return D}}}function O(b){return w(b)===c}return Q.AsyncMode=l,Q.ConcurrentMode=c,Q.ContextConsumer=o,Q.ContextProvider=i,Q.Element=e,Q.ForwardRef=f,Q.Fragment=n,Q.Lazy=p,Q.Memo=m,Q.Portal=t,Q.Profiler=a,Q.StrictMode=s,Q.Suspense=u,Q.isAsyncMode=function(b){return O(b)||w(b)===l},Q.isConcurrentMode=O,Q.isContextConsumer=function(b){return w(b)===o},Q.isContextProvider=function(b){return w(b)===i},Q.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Q.isForwardRef=function(b){return w(b)===f},Q.isFragment=function(b){return w(b)===n},Q.isLazy=function(b){return w(b)===p},Q.isMemo=function(b){return w(b)===m},Q.isPortal=function(b){return w(b)===t},Q.isProfiler=function(b){return w(b)===a},Q.isStrictMode=function(b){return w(b)===s},Q.isSuspense=function(b){return w(b)===u},Q.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===c||b===a||b===s||b===u||b===d||typeof b=="object"&&b!==null&&(b.$$typeof===p||b.$$typeof===m||b.$$typeof===i||b.$$typeof===o||b.$$typeof===f||b.$$typeof===S||b.$$typeof===E||b.$$typeof===T||b.$$typeof===y)},Q.typeOf=w,Q}var ee={};/** @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 Ht;function on(){return Ht||(Ht=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,m=r?Symbol.for("react.memo"):60115,d=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,S=r?Symbol.for("react.fundamental"):60117,E=r?Symbol.for("react.responder"):60118,T=r?Symbol.for("react.scope"):60119;function w(F){return typeof F=="string"||typeof F=="function"||F===n||F===c||F===a||F===s||F===u||F===p||typeof F=="object"&&F!==null&&(F.$$typeof===d||F.$$typeof===m||F.$$typeof===i||F.$$typeof===o||F.$$typeof===f||F.$$typeof===S||F.$$typeof===E||F.$$typeof===T||F.$$typeof===y)}function O(F){if(typeof F=="object"&&F!==null){var G=F.$$typeof;switch(G){case e:var Z=F.type;switch(Z){case l:case c:case n:case a:case s:case u:return Z;default:var re=Z&&Z.$$typeof;switch(re){case o:case f:case d:case m:case i:return re;default:return G}}case t:return G}}}var b=l,D=c,N=o,L=i,v=e,R=f,M=n,C=d,P=m,V=t,A=a,Y=s,K=u,J=!1;function U(F){return J||(J=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),h(F)||O(F)===l}function h(F){return O(F)===c}function x(F){return O(F)===o}function j(F){return O(F)===i}function I(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function $(F){return O(F)===f}function k(F){return O(F)===n}function B(F){return O(F)===d}function H(F){return O(F)===m}function W(F){return O(F)===t}function X(F){return O(F)===a}function q(F){return O(F)===s}function se(F){return O(F)===u}ee.AsyncMode=b,ee.ConcurrentMode=D,ee.ContextConsumer=N,ee.ContextProvider=L,ee.Element=v,ee.ForwardRef=R,ee.Fragment=M,ee.Lazy=C,ee.Memo=P,ee.Portal=V,ee.Profiler=A,ee.StrictMode=Y,ee.Suspense=K,ee.isAsyncMode=U,ee.isConcurrentMode=h,ee.isContextConsumer=x,ee.isContextProvider=j,ee.isElement=I,ee.isForwardRef=$,ee.isFragment=k,ee.isLazy=B,ee.isMemo=H,ee.isPortal=W,ee.isProfiler=X,ee.isStrictMode=q,ee.isSuspense=se,ee.isValidElementType=w,ee.typeOf=O}()),ee}var Gt;function _r(){return Gt||(Gt=1,process.env.NODE_ENV==="production"?Ke.exports=an():Ke.exports=on()),Ke.exports}/*
40
+ */var Ht;function on(){return Ht||(Ht=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,o=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,c=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,u=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,p=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,S=r?Symbol.for("react.fundamental"):60117,E=r?Symbol.for("react.responder"):60118,T=r?Symbol.for("react.scope"):60119;function w(V){return typeof V=="string"||typeof V=="function"||V===n||V===c||V===a||V===s||V===u||V===d||typeof V=="object"&&V!==null&&(V.$$typeof===p||V.$$typeof===m||V.$$typeof===i||V.$$typeof===o||V.$$typeof===f||V.$$typeof===S||V.$$typeof===E||V.$$typeof===T||V.$$typeof===y)}function O(V){if(typeof V=="object"&&V!==null){var G=V.$$typeof;switch(G){case e:var Z=V.type;switch(Z){case l:case c:case n:case a:case s:case u:return Z;default:var re=Z&&Z.$$typeof;switch(re){case o:case f:case p:case m:case i:return re;default:return G}}case t:return G}}}var b=l,D=c,N=o,I=i,v=e,R=f,M=n,C=p,L=m,F=t,P=a,Y=s,z=u,J=!1;function W(V){return J||(J=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),h(V)||O(V)===l}function h(V){return O(V)===c}function x(V){return O(V)===o}function j(V){return O(V)===i}function k(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function $(V){return O(V)===f}function A(V){return O(V)===n}function U(V){return O(V)===p}function H(V){return O(V)===m}function B(V){return O(V)===t}function X(V){return O(V)===a}function K(V){return O(V)===s}function se(V){return O(V)===u}ee.AsyncMode=b,ee.ConcurrentMode=D,ee.ContextConsumer=N,ee.ContextProvider=I,ee.Element=v,ee.ForwardRef=R,ee.Fragment=M,ee.Lazy=C,ee.Memo=L,ee.Portal=F,ee.Profiler=P,ee.StrictMode=Y,ee.Suspense=z,ee.isAsyncMode=W,ee.isConcurrentMode=h,ee.isContextConsumer=x,ee.isContextProvider=j,ee.isElement=k,ee.isForwardRef=$,ee.isFragment=A,ee.isLazy=U,ee.isMemo=H,ee.isPortal=B,ee.isProfiler=X,ee.isStrictMode=K,ee.isSuspense=se,ee.isValidElementType=w,ee.typeOf=O}()),ee}var Gt;function _r(){return Gt||(Gt=1,process.env.NODE_ENV==="production"?Ke.exports=an():Ke.exports=on()),Ke.exports}/*
41
41
  object-assign
42
42
  (c) Sindre Sorhus
43
43
  @license MIT
44
- */var mt,Kt;function ln(){if(Kt)return mt;Kt=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 mt=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},mt}var gt,qt;function Dt(){if(qt)return gt;qt=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return gt=r,gt}var yt,zt;function Rr(){return zt||(zt=1,yt=Function.call.bind(Object.prototype.hasOwnProperty)),yt}var bt,Jt;function cn(){if(Jt)return bt;Jt=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var e=Dt(),t={},n=Rr();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(d){u=d}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 m=c?c():"";r("Failed "+o+" type: "+u.message+(m??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},bt=s,bt}var vt,Xt;function un(){if(Xt)return vt;Xt=1;var r=_r(),e=ln(),t=Dt(),n=Rr(),s=cn(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var l="Warning: "+o;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return vt=function(o,l){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function u(h){var x=h&&(c&&h[c]||h[f]);if(typeof x=="function")return x}var p="<<anonymous>>",m={array:E("array"),bigint:E("bigint"),bool:E("boolean"),func:E("function"),number:E("number"),object:E("object"),string:E("string"),symbol:E("symbol"),any:T(),arrayOf:w,element:O(),elementType:b(),instanceOf:D,node:R(),objectOf:L,oneOf:N,oneOfType:v,shape:C,exact:P};function d(h,x){return h===x?h!==0||1/h===1/x:h!==h&&x!==x}function y(h,x){this.message=h,this.data=x&&typeof x=="object"?x:{},this.stack=""}y.prototype=Error.prototype;function S(h){if(process.env.NODE_ENV!=="production")var x={},j=0;function I(k,B,H,W,X,q,se){if(W=W||p,q=q||H,se!==t){if(l){var F=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 F.name="Invariant Violation",F}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var G=W+":"+H;!x[G]&&j<3&&(a("You are manually calling a React.PropTypes validation function for the `"+q+"` prop on `"+W+"`. 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."),x[G]=!0,j++)}}return B[H]==null?k?B[H]===null?new y("The "+X+" `"+q+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new y("The "+X+" `"+q+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:h(B,H,W,X,q)}var $=I.bind(null,!1);return $.isRequired=I.bind(null,!0),$}function E(h){function x(j,I,$,k,B,H){var W=j[I],X=Y(W);if(X!==h){var q=K(W);return new y("Invalid "+k+" `"+B+"` of type "+("`"+q+"` supplied to `"+$+"`, expected ")+("`"+h+"`."),{expectedType:h})}return null}return S(x)}function T(){return S(i)}function w(h){function x(j,I,$,k,B){if(typeof h!="function")return new y("Property `"+B+"` of component `"+$+"` has invalid PropType notation inside arrayOf.");var H=j[I];if(!Array.isArray(H)){var W=Y(H);return new y("Invalid "+k+" `"+B+"` of type "+("`"+W+"` supplied to `"+$+"`, expected an array."))}for(var X=0;X<H.length;X++){var q=h(H,X,$,k,B+"["+X+"]",t);if(q instanceof Error)return q}return null}return S(x)}function O(){function h(x,j,I,$,k){var B=x[j];if(!o(B)){var H=Y(B);return new y("Invalid "+$+" `"+k+"` of type "+("`"+H+"` supplied to `"+I+"`, expected a single ReactElement."))}return null}return S(h)}function b(){function h(x,j,I,$,k){var B=x[j];if(!r.isValidElementType(B)){var H=Y(B);return new y("Invalid "+$+" `"+k+"` of type "+("`"+H+"` supplied to `"+I+"`, expected a single ReactElement type."))}return null}return S(h)}function D(h){function x(j,I,$,k,B){if(!(j[I]instanceof h)){var H=h.name||p,W=U(j[I]);return new y("Invalid "+k+" `"+B+"` of type "+("`"+W+"` supplied to `"+$+"`, expected ")+("instance of `"+H+"`."))}return null}return S(x)}function N(h){if(!Array.isArray(h))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function x(j,I,$,k,B){for(var H=j[I],W=0;W<h.length;W++)if(d(H,h[W]))return null;var X=JSON.stringify(h,function(se,F){var G=K(F);return G==="symbol"?String(F):F});return new y("Invalid "+k+" `"+B+"` of value `"+String(H)+"` "+("supplied to `"+$+"`, expected one of "+X+"."))}return S(x)}function L(h){function x(j,I,$,k,B){if(typeof h!="function")return new y("Property `"+B+"` of component `"+$+"` has invalid PropType notation inside objectOf.");var H=j[I],W=Y(H);if(W!=="object")return new y("Invalid "+k+" `"+B+"` of type "+("`"+W+"` supplied to `"+$+"`, expected an object."));for(var X in H)if(n(H,X)){var q=h(H,X,$,k,B+"."+X,t);if(q instanceof Error)return q}return null}return S(x)}function v(h){if(!Array.isArray(h))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var x=0;x<h.length;x++){var j=h[x];if(typeof j!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+J(j)+" at index "+x+"."),i}function I($,k,B,H,W){for(var X=[],q=0;q<h.length;q++){var se=h[q],F=se($,k,B,H,W,t);if(F==null)return null;F.data&&n(F.data,"expectedType")&&X.push(F.data.expectedType)}var G=X.length>0?", expected one of type ["+X.join(", ")+"]":"";return new y("Invalid "+H+" `"+W+"` supplied to "+("`"+B+"`"+G+"."))}return S(I)}function R(){function h(x,j,I,$,k){return V(x[j])?null:new y("Invalid "+$+" `"+k+"` supplied to "+("`"+I+"`, expected a ReactNode."))}return S(h)}function M(h,x,j,I,$){return new y((h||"React class")+": "+x+" type `"+j+"."+I+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+$+"`.")}function C(h){function x(j,I,$,k,B){var H=j[I],W=Y(H);if(W!=="object")return new y("Invalid "+k+" `"+B+"` of type `"+W+"` "+("supplied to `"+$+"`, expected `object`."));for(var X in h){var q=h[X];if(typeof q!="function")return M($,k,B,X,K(q));var se=q(H,X,$,k,B+"."+X,t);if(se)return se}return null}return S(x)}function P(h){function x(j,I,$,k,B){var H=j[I],W=Y(H);if(W!=="object")return new y("Invalid "+k+" `"+B+"` of type `"+W+"` "+("supplied to `"+$+"`, expected `object`."));var X=e({},j[I],h);for(var q in X){var se=h[q];if(n(h,q)&&typeof se!="function")return M($,k,B,q,K(se));if(!se)return new y("Invalid "+k+" `"+B+"` key `"+q+"` supplied to `"+$+"`.\nBad object: "+JSON.stringify(j[I],null," ")+`
45
- Valid keys: `+JSON.stringify(Object.keys(h),null," "));var F=se(H,q,$,k,B+"."+q,t);if(F)return F}return null}return S(x)}function V(h){switch(typeof h){case"number":case"string":case"undefined":return!0;case"boolean":return!h;case"object":if(Array.isArray(h))return h.every(V);if(h===null||o(h))return!0;var x=u(h);if(x){var j=x.call(h),I;if(x!==h.entries){for(;!(I=j.next()).done;)if(!V(I.value))return!1}else for(;!(I=j.next()).done;){var $=I.value;if($&&!V($[1]))return!1}}else return!1;return!0;default:return!1}}function A(h,x){return h==="symbol"?!0:x?x["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&x instanceof Symbol:!1}function Y(h){var x=typeof h;return Array.isArray(h)?"array":h instanceof RegExp?"object":A(x,h)?"symbol":x}function K(h){if(typeof h>"u"||h===null)return""+h;var x=Y(h);if(x==="object"){if(h instanceof Date)return"date";if(h instanceof RegExp)return"regexp"}return x}function J(h){var x=K(h);switch(x){case"array":case"object":return"an "+x;case"boolean":case"date":case"regexp":return"a "+x;default:return x}}function U(h){return!h.constructor||!h.constructor.name?p:h.constructor.name}return m.checkPropTypes=s,m.resetWarningCache=s.resetWarningCache,m.PropTypes=m,m},vt}var xt,Zt;function fn(){if(Zt)return xt;Zt=1;var r=Dt();function e(){}function t(){}return t.resetWarningCache=e,xt=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},xt}var Qt;function dn(){if(Qt)return Ge.exports;if(Qt=1,process.env.NODE_ENV!=="production"){var r=_r(),e=!0;Ge.exports=un()(r.isElement,e)}else Ge.exports=fn()();return Ge.exports}var ie=dn(),pn=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},hn=function(e,t){for(var n in e)if(!(n in t))return!0;for(var s in t)if(e[s]!==t[s])return!0;return!1},mn=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],qe="http://www.w3.org/2000/svg",er="http://www.w3.org/1999/xlink",Pe=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}zr(e,r);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof pn(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,m=this.props.onError,d=this.props.beforeInjection,y=this.props.afterInjection,S=this.props.wrapper,E,T;S==="svg"?(E=document.createElementNS(qe,S),E.setAttribute("xmlns",qe),E.setAttribute("xmlns:xlink",er),T=document.createElementNS(qe,S)):(E=document.createElement(S),T=document.createElement(S)),E.appendChild(T),T.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(E);var w=function(N){if(s.removeSVG(),!s._isMounted){m(N);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){m(N)})},O=function(N,L){if(N){w(N);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{y(L)}catch(v){w(v)}})},b=function(N){if(N.setAttribute("role","img"),i){var L=N.querySelector(":scope > desc");L&&N.removeChild(L);var v=document.createElement("desc");v.innerHTML=i,N.prepend(v)}if(u){var R=N.querySelector(":scope > title");R&&N.removeChild(R);var M=document.createElement("title");M.innerHTML=u,N.prepend(M)}try{d(N)}catch(C){w(C)}};sn(T,{afterEach:O,beforeEach:b,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;hn(tt({},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=qr(s,mn),c=o;return We.createElement(c,tt({},l,{ref:this.refCallback},o==="svg"?{xmlns:qe,xmlnsXlink:er}:{}),this.state.isLoading&&i&&We.createElement(i,null),this.state.hasError&&a&&We.createElement(a,null))},e}(We.Component);Pe.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Pe.propTypes={afterInjection:ie.func,beforeInjection:ie.func,desc:ie.string,evalScripts:ie.oneOf(["always","once","never"]),fallback:ie.oneOfType([ie.func,ie.object,ie.string]),httpRequestWithCredentials:ie.bool,loading:ie.oneOfType([ie.func,ie.object,ie.string]),onError:ie.func,renumerateIRIElements:ie.bool,src:ie.string.isRequired,title:ie.string,useRequestCache:ie.bool,wrapper:ie.oneOf(["div","span","svg"])};let Et={assets:"/"};const gn=r=>{Et={...Et,...r}},tr=r=>`${Et.assets}/${r}`.replace(/\/+/g,"/"),oe=_.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,tabIndex:p})=>{const[m,d]=_.useState(r),y=(r==null?void 0:r.startsWith("http"))||(r==null?void 0:r.startsWith("/")),S=y&&(r==null?void 0:r.toLowerCase().endsWith(".svg")),E=tr(`assets/svg/${r}.svg`),T=tr(`assets/svg/${n}.svg`),w={img:`${c?"smp-image-interactable":""}`,svg:`smp-icon ${i?`smp-icon-${i}`:""} ${o?"smp-icon-rotated":""} ${c?"smp-icon-interactable":""} ${f?"smp-icon-spin":""}`},O=()=>{!a&&c&&l&&l()},b=D=>{!a&&c&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),O())};return g.jsx(g.Fragment,{children:S?g.jsx(Pe,{src:r,fallback:()=>g.jsx(Pe,{src:T,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:u,role:"application",fill:s,"aria-disabled":a,className:w.svg,onClick:O,onKeyDown:b,tabIndex:p}):y?g.jsx("img",{src:m,width:e||"16px",height:t||"auto",alt:u,onError:()=>d(T),onClick:O,className:w.img,title:u,onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&O()}}):g.jsx(Pe,{src:E,fallback:()=>g.jsx(Pe,{src:T,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:u,role:"application",fill:s,"aria-disabled":a,className:w.svg,onClick:O,onKeyDown:b,tabIndex:p})})}),rr=r=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[r],nr=r=>({primary:"onPrimary",danger:"onDanger",base:"base"})[r],Se=({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,justify:p="center",title:m,optionalDisplayValue:d,squared:y=!1,submit:S=!1})=>{const E={container:`smp-button smp-button-container ${a?`smp-button-${a}`:""} ${i?`smp-buttonVariant-${i}`:""} ${o?`smp-buttonType-${o}`:""} ${f?"smp-button-fullWidth":""} smp-justifyContent-${p} ${y&&!c?"smp-button-squared":""}`};return g.jsx("button",{"data-component":"button",type:S?"submit":"button",className:E.container,onClick:e,"aria-label":t,disabled:s,"aria-busy":u,title:m||d,children:u?g.jsx(oe,{icon:"spinner",state:nr(i),spin:!0}):g.jsxs(g.Fragment,{children:[n&&l&&g.jsx(oe,{icon:n,disabled:s,state:nr(i),width:rr(a),height:rr(a)}),c&&g.jsx("span",{children:d||r})]})})},yn={titleLarge:"h2",title:"h3",body:"h6",label:"label"},_e=({variant:r="body",bindValue:e,color:t,...n})=>{const s=yn[r],a={container:`smp-typography ${r?`smp-typography-${r}`:""} ${n.disabled?"smp-typography-disabled":""}`};return g.jsx(s,{className:a.container,disabled:n.disabled,style:{"--smp-typography-color-base":t},children:e})},ye={"smp-tabbar-container":"_smp-tabbar-container_1scvh_1","smp-tabbar-scroll-button":"_smp-tabbar-scroll-button_1scvh_8","smp-tabbar-scroll-buttonRight":"_smp-tabbar-scroll-buttonRight_1scvh_13","smp-tabbar-scroll-buttonLeft":"_smp-tabbar-scroll-buttonLeft_1scvh_17","smp-tabbar-list-wrapper":"_smp-tabbar-list-wrapper_1scvh_21","smp-tabbar-list":"_smp-tabbar-list_1scvh_21","smp-tabbar-tab":"_smp-tabbar-tab_1scvh_38","smp-active":"_smp-active_1scvh_62","smp-tabbar-tab-extraSmall":"_smp-tabbar-tab-extraSmall_1scvh_75","smp-tabbar-tab-small":"_smp-tabbar-tab-small_1scvh_80","smp-tabbar-tab-base":"_smp-tabbar-tab-base_1scvh_85","smp-tabbar-tab-large":"_smp-tabbar-tab-large_1scvh_90","smp-tabbar-tab-extraLarge":"_smp-tabbar-tab-extraLarge_1scvh_95"},bn=({data:r,sizing:e="large",toolbar:t=!0,selectedIndex:n,onTabChange:s})=>{const[a,i]=_.useState(0),o=n??a,[l,c]=_.useState(!1),[f,u]=_.useState(!1),p=_.useRef(null);if(_.useEffect(()=>{const w=p.current;if(!w)return;S();const O=()=>S();return w.addEventListener("scroll",O),window.addEventListener("resize",S),()=>{w.removeEventListener("scroll",O),window.removeEventListener("resize",S)}},[]),!r.children||r.children.length===0)return g.jsx("div",{className:"tab-bar-empty",children:"No tabs available"});const m={container:ye["smp-tabbar-container"],listWrapper:ye["smp-tabbar-list-wrapper"],list:ye["smp-tabbar-list"],tab:`${ye["smp-tabbar-tab"]} ${e?ye[`smp-tabbar-tab-${e}`]:""}`,scrollButtonRight:`${ye["smp-tabbar-scroll-button"]} ${ye["smp-tabbar-scroll-buttonRight"]}`,scrollButtonLeft:`${ye["smp-tabbar-scroll-button"]} ${ye["smp-tabbar-scroll-buttonLeft"]}`,active:ye["smp-active"]},d=100,y=2,S=()=>{const w=p.current;w&&(c(w.scrollLeft>0),u(w.scrollLeft+w.clientWidth<w.scrollWidth-y))},E=()=>{var w;(w=p.current)==null||w.scrollBy({left:-d,behavior:"smooth"})},T=()=>{var w;(w=p.current)==null||w.scrollBy({left:d,behavior:"smooth"})};return g.jsxs("div",{className:m.container,role:"tabpanel","data-component":"tab-bar",children:[l&&g.jsx("div",{className:m.scrollButtonLeft,children:g.jsx(Se,{bindValue:"",optionalDisplayValue:"<",onClick:E,variant:"base",sizing:e})}),g.jsx("div",{className:m.listWrapper,children:g.jsx("div",{className:m.list,ref:p,role:"tablist",children:r.children.map((w,O)=>g.jsxs("button",{className:`${O===a?m.active:""} ${m.tab} `,role:"tab","aria-selected":O===o,tabIndex:O===o?0:-1,onClick:()=>{s&&s(O),i(O)},children:[w.icon&&g.jsx(oe,{icon:w.icon,placeholderIcon:w.placeholderIcon}),g.jsx(_e,{variant:"body",bindValue:w.decode||"Tab[object Object]"}),t&&(o===O?g.jsx(oe,{icon:"more_vert",placeholderIcon:w.placeholderIcon,isInteractable:!0,onClick:()=>{console.log("clicked icon")}}):g.jsx(oe,{icon:"empty"}))]},O))})}),f&&g.jsx("div",{className:m.scrollButtonRight,children:g.jsx(Se,{bindValue:"",optionalDisplayValue:">",onClick:T,variant:"base",sizing:e})})]})},rt=({children:r,layout:e={horizontal:!1,sectionsType:"tab",sections:[{id:"1",content:Array.isArray(r)?r.map(t=>({id:t.props.id})):[{id:r.props.id}]}]}})=>{const[t,n]=_.useState(0),s={};_.Children.forEach(r,d=>{_.isValidElement(d)&&(s[d.props.id]=d)});const a="--smp-grid-template-cols",i="--smp-grid-template-rows",o=Er(e.sections??[],Object.keys(s)),l=d=>d.reduce((y,S)=>{var b,D;let E="",T={},w={},O="";return(b=S.sections)!=null&&b.length?(E=pe["smp-layout-section-grid"],T=l(S.sections),S.gridCols===void 0&&(O=pe[S.horizontal?"smp-grid-template-cols":"smp-grid-template-rows"],(S.horizontal||Mt(S.sections))&&(w=Nt(S.sections,S.horizontal?a:i)))):(D=S.content)!=null&&D.length&&(S.gridCols!==void 0&&S.gridCols>0?(E=pe["smp-layout-section-grid"],O=pe["smp-grid-template-cols"],w={[a]:`repeat(${S.gridCols}, 1fr)`}):E=pe["smp-layout-section-flex"]),{...y,...T,[S.id]:{classes:`${E} ${pe[S.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${O} ${S.justify?`smp-justifyContent-${S.justify}`:""} ${S.align?`smp-alignItems-${S.align}`:""}`,styles:w}}},{}),c=l(o),f=`${pe["smp-layout"]} ${e.horizontal?pe["smp-layout-horizontal"]:pe["smp-layout-vertical"]}`,u=e.horizontal||Mt(e.sections||[])?Nt(o,e.horizontal?a:i):{},p=(d,y)=>{var E,T;const S=g.jsx("div",{"smp-id":`section-${d.id}`,className:c[d.id].classes,style:c[d.id].styles,children:(E=d.sections)!=null&&E.length?d.sections.map(w=>p(w)):(T=d.content)==null?void 0:T.map(w=>m(w,d.justify,d.align))},`section-${d.id}`);return d.title&&!y?g.jsxs("div",{className:pe["smp-layout-section-with-title"],children:[g.jsx("span",{className:`${pe["smp-layout-section-title"]} ${d.justify?`smp-justifyContent-${d.justify}`:""} ${d.align?`smp-alignItems-${d.align}`:""}`,children:g.jsx(De,{label:d.title})}),S]},`title-section-${d.id}`):S},m=(d,y,S)=>{const E=s[d.id];if(!E)return null;const w={gridColumnStart:(d.colSpan&&d.colSpan>0?`span ${d.colSpan}`:d.colStart&&d.colStart<1?"1":void 0)??d.colStart,gridColumnEnd:d.colEnd&&d.colEnd>0?d.colEnd:void 0},O=`${pe["smp-layout-cell-container"]} ${y?`smp-justifyContent-${y}`:""} ${S?`smp-alignItems-${S}`:""}`;return g.jsx("div",{className:O,style:w,"smp-id":d.id,children:E},d.id)};return g.jsxs("div",{className:f,style:u,"smp-id":"layout",children:[e.sectionsType==="tab"&&e.sections&&(e==null?void 0:e.sections.length)>1&&g.jsx(bn,{data:{type:"SmeupDataTree",children:o.map(d=>({decode:d.title||d.id||"Tab",obj:{t:"",p:"",k:""},placeholderIcon:"tab",cells:{},children:[],shape:void 0}))},selectedIndex:t,onTabChange:n,toolbar:!1}),e.sectionsType?p(o[t],!0):o.map(d=>p(d))]})},te={AUTOCOMPLETE:"ACP",BUTTON_LIST:"BTL",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",ICON:"ICO",IMAGE:"IMG",INPUT_NUMBER:"INR",MEMO:"MEM",MULTI_AUTOCOMPLETE:"AML",RADIO:"RAD",SPOTLIGHT:"SPL",SWITCH:"SWT",TEXT_FIELD:"ITX",TIME:"TIM",PASSWORD:"PWD"},vn=r=>r.t=="D8",xn=r=>r.t=="I1",Sn=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 nt{constructor(e,t){de(this,"class");de(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new nt(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 wn(r,e){if(jt(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),ze(t)?t:r;case 3:case 4:return o=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),i===0?(t.setMonth(o-1),t.setDate(l)):a===0&&(t.setMonth(l-1),t.setDate(o)),ze(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)),Tt(o,u,parseInt(c))&&ze(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)),Tt(f,u,parseInt(c))&&ze(t)?t:r}}return r}function jt(r){return/^\d{4}-\d{2}-\d{2}$/.test(r)&&r.length===10}function ze(r){return r instanceof Date&&!isNaN(r.getTime())}function En(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 Tt(n,t-1,e)}function Tt(r,e,t){const n=[31,Tn(t)?29:28,31,30,31,30,31,31,30,31,30,31];return!(e<0||e>11||r<1||r>n[e])}function Tn(r){return r%4===0&&(r%100!==0||r%400===0)}function On(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 st{constructor(e,t){de(this,"class");de(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=sr.get(`${e.t}${e.p}`);if(t)return new st(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=sr.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 sr=new Map([["D8*YYMD",{legacyToIso(r){return En(r)&&`${r.substring(0,4)}-${r.substring(4,6)}-${r.substring(6,8)}`||r},isoToLegacy(r){return jt(r)&&r.replaceAll("-","")||r}}]]);function ct({position:r="bottom",enabled:e=!0}){const t=_.useRef(null),n=_.useRef(null),[s,a]=_.useState(0),i=_.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 m=l.offsetHeight,d=l.offsetWidth;if(d===0||m===0){requestAnimationFrame(i);return}let y=c+window.scrollY,S=f+window.scrollX;switch(r){case"top":y-=m;break;case"bottom":y+=p;break;case"left":S-=d;break;case"right":S+=u;break}requestAnimationFrame(()=>{l.style.transform=`translate(${S}px, ${y}px)`,l.style.opacity="1"})},[r]);return _.useLayoutEffect(()=>{if(!e)return;let o;const l=()=>{const f=t.current,u=n.current;f&&u?i():o=requestAnimationFrame(l)};o=requestAnimationFrame(l);const c=new MutationObserver(()=>{i()});return n.current&&c.observe(n.current,{childList:!0,subtree:!0}),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0),()=>{cancelAnimationFrame(o),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),c.disconnect()}},[i,e]),{anchorRef:t,targetRef:n,anchorWidth:s}}const ke=(r,e,t)=>{if(r=="")return"";if(t)switch(t){case"CodeOnly":return r;case"DescOnly":return e||"";case"Both":return`${r} - ${e}`}return r},Dr=({helperText:r,disabled:e,state:t,id:n})=>{const s={container:`smp-helper-text ${e?"smp-helper-text-disabled":""} ${t?`smp-helper-text-${t}`:""}`};return g.jsx("label",{className:s.container,id:n,children:r})},he={"smp-textfield-wrapper":"_smp-textfield-wrapper_prxya_4","smp-textfield":"_smp-textfield_prxya_4","smp-textfield-extraSmall":"_smp-textfield-extraSmall_prxya_31","smp-textfield-small":"_smp-textfield-small_prxya_36","smp-textfield-medium":"_smp-textfield-medium_prxya_41","smp-textfield-large":"_smp-textfield-large_prxya_46","smp-textfield-extraLarge":"_smp-textfield-extraLarge_prxya_51","smp-textfield-input":"_smp-textfield-input_prxya_57","smp-textfield-outlined":"_smp-textfield-outlined_prxya_80","smp-textfield-danger":"_smp-textfield-danger_prxya_91","smp-textfield-readOnly":"_smp-textfield-readOnly_prxya_95","smp-textfield-variant-notSelectable":"_smp-textfield-variant-notSelectable_prxya_100","smp-textfield-disabled":"_smp-textfield-disabled_prxya_110","smp-textfield-fullWidth":"_smp-textfield-fullWidth_prxya_119","smp-textfield-top-right-indicator":"_smp-textfield-top-right-indicator_prxya_123"},we=({disabled:r,bindValue:e,icon:t,onBlur:n,onChange:s,placeholder:a,isEditable:i=!0,shapeIcon:o,sizing:l,state:c,variant:f,tooltip:u=!1,rotatedShapeIcon:p=!1,onShapeIconClick:m,ref:d,inputRef:y,onKeyDown:S,inputType:E="text",ariaLabel:T="input field",label:w,helperText:O=!1,error:b,appearance:D="base",fullWidth:N=!1,_dataComponent:L="textfield",min:v,max:R,step:M,inputMode:C="text",width:P,autocomplete:V,size:A,maxLength:Y})=>{const K=_.useId(),J=`${K}-helper`,U=b?"danger":c,h=b||c=="danger"?"error":o,x=O||!!b,j=k=>{s==null||s(k.target.value)},I={wrapper:`${he["smp-textfield-wrapper"]} ${N?he["smp-textfield-fullWidth"]:""}`,container:`${he["smp-textfield"]} ${r?he["smp-textfield-disabled"]:""} ${a?he["smp-textfield-placeholder"]:""} ${l?he[`smp-textfield-${l}`]:""} ${U?he[`smp-textfield-${U}`]:""} ${D?he[`smp-textfield-${D}`]:""} ${i?"":he["smp-textfield-readOnly"]} ${u?he["smp-textfield-top-right-indicator"]:""}`,input:`${he["smp-textfield-input"]}`};if(f&&(f!=="notSelectable"||i)){const k=he[`smp-textfield-variant-${f}`];k&&(I.container+=` ${k}`)}const $=P?{"--smp-textField-width-base":P}:void 0;return g.jsxs("div",{className:I.wrapper,"data-component":L,children:[w&&g.jsx(De,{label:w,disabled:r,htmlFor:K}),g.jsxs("div",{className:I.container,ref:d,style:$,children:[t&&g.jsx(oe,{icon:t,disabled:r}),g.jsx("input",{id:K,type:E,value:e,placeholder:a,onChange:j,onBlur:n,className:I.input,disabled:r,readOnly:!i,onKeyDown:S,"aria-label":T,ref:y,"aria-describedby":x?J:void 0,min:v,max:R,step:M,inputMode:C,autoComplete:V,size:A,maxLength:Y}),h&&g.jsx(oe,{icon:h,disabled:r,state:U,onClick:m,rotated:p,isInteractable:i,tabIndex:0})]}),x&&g.jsx(Dr,{helperText:b,disabled:r,state:U,id:J})]})};function jr({items:r,itemHeight:e,containerHeight:t,overscan:n=5}){const[s,a]=_.useState(0),i=_.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 m=l;m<=c;m++)f.push({item:r[m],index:m,offsetTop:m*e});const u=_.useCallback(m=>{const d=m.target.scrollTop;a(d)},[]),p=m=>{if(!i.current)return;const d=m*e,y=d+e,S=i.current,E=S.scrollTop,T=E+t;d<E?S.scrollTop=d:y>T&&(S.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 Je={"smp-list":"_smp-list_6ni6l_1","smp-list-container":"_smp-list-container_6ni6l_12","smp-list-listItem":"_smp-list-listItem_6ni6l_17"};function _n(r,e,t="14px IBM Plex Sans, sans-serif",n=32){const a=document.createElement("canvas").getContext("2d");if(!a)return 200;a.font=t;let i=0;for(const o of r){const l=ke(o.id,o.label,e),c=a.measureText(l);i=Math.max(i,c.width)}return Math.ceil(i+n)}const Rn=10,$r=({id:r,options:e,displayMode:t="Both",ref:n,showFilter:s,selectedIndex:a=null,activeIndex:i=[],width:o,onClick:l,onKeyDown:c,isOpen:f})=>{var V;const[u,p]=_.useState(""),m=40,[d,y]=_.useState(a!==null?a:-1),[S,E]=_.useState(o||200),T=_.useRef(null),w=s!==void 0?s:e.length>Rn,O=u?e.filter(A=>A.label.toLowerCase().includes(u.toLowerCase())):e,b=A=>{p(A)},{virtualItems:D,containerProps:N,innerProps:L,scrollToIndex:v}=jr({items:O,itemHeight:m,containerHeight:200,overscan:5});_.useEffect(()=>{a!==null&&a!==d&&y(a)},[a]),_.useEffect(()=>{d>=0&&d<O.length&&v(d)},[d,O]),_.useEffect(()=>{f&&(T!=null&&T.current)&&T.current.focus()},[f,T]),_.useEffect(()=>{const A=_n(e,t);E(A)},[e,t]);const R=A=>{if(A.key==="ArrowDown"||A.key==="ArrowUp"){A.preventDefault();let Y=d;A.key==="ArrowDown"?Y=d<O.length-1?d+1:0:A.key==="ArrowUp"&&(Y=d>0?d-1:O.length-1),y(Y)}else A.key==="Enter"?d>=0&&d<O.length&&(l==null||l(O[d])):A.key==="Escape"&&(A.preventDefault(),A.stopPropagation());c&&c(A)},M=A=>{R(A)},C=A=>{R(A)},P={wrapper:`${Je["smp-list"]}`,container:`${Je["smp-list-container"]}`,virtualScroll:`${Je["smp-list-virtualScroll"]}`,listItem:`${Je["smp-list-listItem"]}`};return g.jsxs("div",{id:r,ref:n,className:P.wrapper,"data-component":"list",style:{width:S,minWidth:o},children:[w&&g.jsx(we,{bindValue:u,placeholder:"Search...",fullWidth:!0,onChange:b,onKeyDown:M,inputRef:T}),g.jsx("div",{...N,className:P.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:C,"aria-activedescendant":d>=0&&d<O.length?(V=O[d])==null?void 0:V.id:void 0,children:g.jsx("div",{...L,className:P.virtualScroll,children:D.map(({item:A,index:Y,offsetTop:K})=>{const J=i.includes(A.id);return g.jsxs("li",{role:"option",id:A.id,"aria-selected":d===Y?"true":"false",tabIndex:-1,className:`${P.listItem} ${d===Y?"selected-item":""}`,"aria-label":A.id+"-"+A.label,style:{height:`${m}px`,lineHeight:`calc(${m}px - 2*2px)`,transform:`translateY(${K}px)`},onClick:()=>{l==null||l(A),y(Y)},children:[ke(A.id,A.label,t),J&&g.jsx(oe,{icon:"check",width:16})]},A.id)})})})]})},$t=({displayMode:r,bindValue:e,optionalDisplayValue:t,...n})=>{const[s,a]=_.useState(ke(e,t,r));return _.useEffect(()=>{a(e)},[e]),_.useEffect(()=>{a(ke(e,t,r))},[t,r]),g.jsx(we,{...n,bindValue:s})},Dn=r=>{const e=_.useRef(null);return _.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),n=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{n()},r)}};function ut({children:r}){const[e,t]=_.useState(!1);return _.useEffect(()=>{t(!0)},[]),e?Ur.createPortal(r,document.body):null}const ft=(r,e,t)=>{_.useEffect(()=>{if(!e)return;const n=s=>{typeof r=="object"&&r!==null&&"current"in r&&r.current&&!r.current.contains(s.target)&&t()};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[r,t,e])},z=r=>typeof r=="string",Me=()=>{let r,e;const t=new Promise((n,s)=>{r=n,e=s});return t.resolve=r,t.reject=e,t},ar=r=>r==null?"":""+r,jn=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},$n=/###/g,ir=r=>r&&r.indexOf("###")>-1?r.replace($n,"."):r,or=r=>!r||z(r),Fe=(r,e,t)=>{const n=z(e)?e.split("."):e;let s=0;for(;s<n.length-1;){if(or(r))return{};const a=ir(n[s]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++s}return or(r)?{}:{obj:r,k:ir(n[s])}},lr=(r,e,t)=>{const{obj:n,k:s}=Fe(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=Fe(r,i,Object);for(;o.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),o=Fe(r,i,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${a}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=t},Cn=(r,e,t,n)=>{const{obj:s,k:a}=Fe(r,e,Object);s[a]=s[a]||[],s[a].push(t)},at=(r,e)=>{const{obj:t,k:n}=Fe(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},Ln=(r,e,t)=>{const n=at(r,t);return n!==void 0?n:at(e,t)},Cr=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?z(r[n])||r[n]instanceof String||z(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):Cr(r[n],e[n],t):r[n]=e[n]);return r},Ce=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var In={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Pn=r=>z(r)?r.replace(/[&<>"'\/]/g,e=>In[e]):r;class kn{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const An=[" ",",","?","!",";"],Nn=new kn(20),Mn=(r,e,t)=>{e=e||"",t=t||"";const n=An.filter(i=>e.indexOf(i)<0&&t.indexOf(i)<0);if(n.length===0)return!0;const s=Nn.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},Ot=(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},Ve=r=>r==null?void 0:r.replace("_","-"),Fn={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 it{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Fn,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,s){return s&&!this.debug?null:(z(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new it(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new it(this.logger,e)}}var be=new it;class dt{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 cr extends dt{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,s={}){var c,f;const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):z(n)&&a?o.push(...n.split(a)):o.push(n)));const l=at(this.data,o);return!l&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),l||!i||!z(n)?l:Ot((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),lr(this.data,o,s),a.silent||this.emit("added",e,t,n,s)}addResources(e,t,n,s={silent:!1}){for(const a in n)(z(n[a])||Array.isArray(n[a]))&&this.addResource(e,t,a,n[a],{silent:!0});s.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,s,a,i={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),s=n,n=t,t=o[1]),this.addNamespaces(t);let l=at(this.data,o)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?Cr(l,n,a):l={...l,...n},lr(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 Lr={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 ur={},fr=r=>!z(r)&&typeof r!="boolean"&&typeof r!="number";class ot extends dt{constructor(e,t={}){super(),jn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=be.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&&!Mn(e,n,s);if(i&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:z(a)?[a]:a};const c=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),e=c.join(s)}return{key:e,namespaces:z(a)?[a]:a}}translate(e,t,n){let s=typeof t=="object"?{...t}:t;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(s={...s}),s||(s={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const a=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],s),c=l[l.length-1];let f=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const u=s.lng||this.language,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 m=this.resolve(e,s);let d=m==null?void 0:m.res;const y=(m==null?void 0:m.usedKey)||o,S=(m==null?void 0:m.exactUsedKey)||o,E=["[object Number]","[object Function]","[object RegExp]"],T=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,O=s.count!==void 0&&!z(s.count),b=ot.hasDefaultValue(s),D=O?this.pluralResolver.getSuffix(u,s.count,s):"",N=s.ordinal&&O?this.pluralResolver.getSuffix(u,s.count,{ordinal:!1}):"",L=O&&!s.ordinal&&s.count===0,v=L&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${D}`]||s[`defaultValue${N}`]||s.defaultValue;let R=d;w&&!d&&b&&(R=v);const M=fr(R),C=Object.prototype.toString.apply(R);if(w&&R&&M&&E.indexOf(C)<0&&!(z(T)&&Array.isArray(R))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,R,{...s,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return a?(m.res=P,m.usedParams=this.getUsedParamsDetails(s),m):P}if(i){const P=Array.isArray(R),V=P?[]:{},A=P?S:y;for(const Y in R)if(Object.prototype.hasOwnProperty.call(R,Y)){const K=`${A}${i}${Y}`;b&&!d?V[Y]=this.translate(K,{...s,defaultValue:fr(v)?v[Y]:void 0,joinArrays:!1,ns:l}):V[Y]=this.translate(K,{...s,joinArrays:!1,ns:l}),V[Y]===K&&(V[Y]=R[Y])}d=V}}else if(w&&z(T)&&Array.isArray(d))d=d.join(T),d&&(d=this.extendTranslation(d,e,s,n));else{let P=!1,V=!1;!this.isValidLookup(d)&&b&&(P=!0,d=v),this.isValidLookup(d)||(V=!0,d=o);const Y=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&V?void 0:d,K=b&&v!==d&&this.options.updateMissing;if(V||P||K){if(this.logger.log(K?"updateKey":"missingKey",u,c,o,K?v:d),i){const x=this.resolve(o,{...s,keySeparator:!1});x&&x.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 J=[];const U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(let x=0;x<U.length;x++)J.push(U[x]);else this.options.saveMissingTo==="all"?J=this.languageUtils.toResolveHierarchy(s.lng||this.language):J.push(s.lng||this.language);const h=(x,j,I)=>{var k;const $=b&&I!==d?I:Y;this.options.missingKeyHandler?this.options.missingKeyHandler(x,c,j,$,K,s):(k=this.backendConnector)!=null&&k.saveMissing&&this.backendConnector.saveMissing(x,c,j,$,K,s),this.emit("missingKey",x,c,j,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?J.forEach(x=>{const j=this.pluralResolver.getSuffixes(x,s);L&&s[`defaultValue${this.options.pluralSeparator}zero`]&&j.indexOf(`${this.options.pluralSeparator}zero`)<0&&j.push(`${this.options.pluralSeparator}zero`),j.forEach(I=>{h([x],o+I,s[`defaultValue${I}`]||v)})}):h(J,o,v))}d=this.extendTranslation(d,e,s,m,n),V&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${c}${f}${o}`),(V||P)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${f}${o}`:o,P?d:void 0,s))}return a?(m.res=d,m.usedParams=this.getUsedParamsDetails(s),m):d}extendTranslation(e,t,n,s,a){var l,c;if((l=this.i18nFormat)!=null&&l.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const f=z(e)&&(((c=n==null?void 0:n.interpolation)==null?void 0:c.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(f){const m=e.match(this.interpolator.nestingRegexp);u=m&&m.length}let p=n.replace&&!z(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 m=e.match(this.interpolator.nestingRegexp),d=m&&m.length;u<d&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...m)=>(a==null?void 0:a[0])===m[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${t[0]}`),null):this.translate(...m,t),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,o=z(i)?[i]:i;return e!=null&&(o!=null&&o.length)&&n.applyPostProcessor!==!1&&(e=Lr.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,s,a,i,o;return z(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(l,t),f=c.key;s=f;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const p=t.count!==void 0&&!z(t.count),m=p&&!t.ordinal&&t.count===0,d=t.context!==void 0&&(z(t.context)||typeof t.context=="number")&&t.context!=="",y=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(S=>{var E,T;this.isValidLookup(n)||(o=S,!ur[`${y[0]}-${S}`]&&((E=this.utils)!=null&&E.hasLoadedNamespace)&&!((T=this.utils)!=null&&T.hasLoadedNamespace(o))&&(ur[`${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(w=>{var D;if(this.isValidLookup(n))return;i=w;const O=[f];if((D=this.i18nFormat)!=null&&D.addLookupKeys)this.i18nFormat.addLookupKeys(O,f,w,S,t);else{let N;p&&(N=this.pluralResolver.getSuffix(w,t.count,t));const L=`${this.options.pluralSeparator}zero`,v=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(O.push(f+N),t.ordinal&&N.indexOf(v)===0&&O.push(f+N.replace(v,this.options.pluralSeparator)),m&&O.push(f+L)),d){const R=`${f}${this.options.contextSeparator}${t.context}`;O.push(R),p&&(O.push(R+N),t.ordinal&&N.indexOf(v)===0&&O.push(R+N.replace(v,this.options.pluralSeparator)),m&&O.push(R+L))}}let b;for(;b=O.pop();)this.isValidLookup(n)||(a=b,n=this.getResource(w,S,b,t))}))})}),{res:n,usedKey:s,exactUsedKey:a,usedLng:i,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n,s={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,n,s):this.resourceStore.getResource(e,t,n,s)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!z(e.replace);let s=n?e.replace:e;if(n&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const a of t)delete s[a]}return s}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}class dr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=be.create("languageUtils")}getScriptPartFromCode(e){if(e=Ve(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=Ve(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(z(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const s=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const s=this.getScriptPartFromCode(n);if(this.isSupportedCode(s))return t=s;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),z(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),s=[],a=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return z(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):z(e)&&a(this.formatLanguageCode(e)),n.forEach(i=>{s.indexOf(i)<0&&a(this.formatLanguageCode(i))}),s}}const pr={zero:0,one:1,two:2,few:3,many:4,other:5},hr={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Vn{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=be.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Ve(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!"),hr;if(!e.match(/-|_/))return hr;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)=>pr[s]-pr[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 mr=(r,e,t,n=".",s=!0)=>{let a=Ln(r,e,t);return!a&&s&&z(t)&&(a=Ot(r,t,n),a===void 0&&(a=Ot(e,t,n))),a},St=r=>r.replace(/\$/g,"$$$$");class Yn{constructor(e={}){var t;this.logger=be.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:m,nestingSuffix:d,nestingSuffixEscaped:y,nestingOptionsSeparator:S,maxReplaces:E,alwaysFormat:T}=e.interpolation;this.escape=t!==void 0?t:Pn,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?Ce(a):i||"{{",this.suffix=o?Ce(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=p?Ce(p):m||Ce("$t("),this.nestingSuffix=d?Ce(d):y||Ce(")"),this.nestingOptionsSeparator=S||",",this.maxReplaces=E||1e3,this.alwaysFormat=T!==void 0?T:!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 m;let a,i,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=d=>{if(d.indexOf(this.formatSeparator)<0){const T=mr(t,l,d,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(T,void 0,n,{...s,...t,interpolationkey:d}):T}const y=d.split(this.formatSeparator),S=y.shift().trim(),E=y.join(this.formatSeparator).trim();return this.format(mr(t,l,S,this.options.keySeparator,this.options.ignoreJSONStructure),E,n,{...s,...t,interpolationkey:S})};this.resetRegExp();const f=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,u=((m=s==null?void 0:s.interpolation)==null?void 0:m.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:d=>St(d)},{regex:this.regexp,safeValue:d=>this.escapeValue?St(this.escape(d)):St(d)}].forEach(d=>{for(o=0;a=d.regex.exec(e);){const y=a[1].trim();if(i=c(y),i===void 0)if(typeof f=="function"){const E=f(e,a,s);i=z(E)?E:""}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!z(i)&&!this.useRawValueToEscape&&(i=ar(i));const S=d.safeValue(i);if(e=e.replace(a[0],S),u?(d.regex.lastIndex+=i.length,d.regex.lastIndex-=a[0].length):d.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 m=p.match(/'/g),d=p.match(/"/g);(((m==null?void 0:m.length)??0)%2===0&&!d||d.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&&!z(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let c=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(u=>u.trim());s[1]=f.shift(),l=f,c=!0}if(a=t(o.call(this,s[1].trim(),i),i),a&&s[0]===e&&!z(a))return a;z(a)||(a=ar(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 Un=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}},gr=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(Ve(n),s),e[i]=o),o(t)}},Wn=r=>(e,t,n)=>r(Ve(t),n)(e);class Bn{constructor(e={}){this.logger=be.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?gr: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()]=gr(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}=Un(l);if(this.formats[c]){let p=o;try{const m=((u=s==null?void 0:s.formatParams)==null?void 0:u[s.interpolationkey])||{},d=m.locale||m.lng||s.locale||s.lng||n;p=this.formats[c](o,d,{...f,...s,...m})}catch(m){this.logger.warn(m)}return p}else this.logger.warn(`there was no format function for ${c}`);return o},e)}}const Hn=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Gn extends dt{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=be.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=>{Cn(l.loaded,[a],i),Hn(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});const f=l.loaded[c];f.length&&f.forEach(u=>{o[c][u]===void 0&&(o[c][u]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,t,n,s=0,a=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:a,callback:i});return}this.readingCalls++;const o=(c,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const u=this.waitingReads.shift();this.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}if(c&&f&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,s+1,a*2,i)},a);return}i(c,f)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const c=l(e,t);c&&typeof c.then=="function"?c.then(f=>o(null,f)).catch(o):o(null,c)}catch(c){o(c)}return}return l(e,t,o)}prepareLoading(e,t,n={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();z(e)&&(e=this.languageUtils.toResolveHierarchy(e)),z(t)&&(t=[t]);const a=this.queueLoad(e,t,n,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),s=n[0],a=n[1];this.read(s,a,"read",void 0,void 0,(i,o)=>{i&&this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`,i),!i&&o&&this.logger.log(`${t}loaded namespace ${a} for language ${s}`,o),this.loaded(e,i,o)})}saveMissing(e,t,n,s,a,i={},o=()=>{}){var l,c,f,u,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 m={...i,isUpdate:a},d=this.backend.create.bind(this.backend);if(d.length<6)try{let y;d.length===5?y=d(e,t,n,s,m):y=d(e,t,n,s),y&&typeof y.then=="function"?y.then(S=>o(null,S)).catch(o):o(null,y)}catch(y){o(y)}else d(e,t,n,s,o,m)}!e||!e[0]||this.store.addResource(e[0],t,n,s)}}}const yr=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),z(r[1])&&(e.defaultValue=r[1]),z(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),br=r=>{var e,t;return z(r.ns)&&(r.ns=[r.ns]),z(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),z(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((t=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},Xe=()=>{},Kn=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class Ye extends dt{constructor(e={},t){if(super(),this.options=br(e),this.services={},this.logger=be,this.modules={external:[]},Kn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(z(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=yr();this.options={...n,...this.options,...br(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?be.init(s(this.modules.logger),this.options):be.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Bn;const f=new dr(this.options);this.store=new cr(this.options.resources,this.options);const u=this.services;u.logger=be,u.resourceStore=this.store,u.languageUtils=f,u.pluralResolver=new Vn(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 Yn(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new Gn(s(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",(p,...m)=>{this.emit(p,...m)}),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 ot(this.services,this.options),this.translator.on("*",(p,...m)=>{this.emit(p,...m)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Xe),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=Me(),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=Xe){var a,i;let n=t;const s=z(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const o=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};s?l(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>l(f)),(i=(a=this.options.preload)==null?void 0:a.forEach)==null||i.call(a,c=>l(c)),this.services.backendConnector.load(o,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(c)})}else n(null)}reloadResources(e,t,n){const s=Me();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=Xe),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"&&Lr.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=Me();this.emit("languageChanging",e);const s=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},a=(o,l)=>{l?this.isLanguageChangingTo===e&&(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,n.resolve((...c)=>this.t(...c)),t&&t(o,(...c)=>this.t(...c))},i=o=>{var f,u;!e&&!o&&this.services.languageDetector&&(o=[]);const l=z(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(z(o)?[o]:o);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),(u=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||u.call(f,c)),this.loadResources(c,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 z(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=n,s}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const i=(o,l)=>{const c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(t.precheck){const o=t.precheck(this,i);if(o!==void 0)return o}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(n,e)&&(!s||i(a,e)))}loadNamespaces(e,t){const n=Me();return this.options.ns?(z(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{n.resolve(),t&&t(s)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Me();z(e)&&(e=[e]);const s=this.options.preload||[],a=e.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=s.concat(a),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}dir(e){var s,a;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((a=this.services)==null?void 0:a.languageUtils)||new dr(yr());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new Ye(e,t)}cloneInstance(e={},t=Xe){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new Ye(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 cr(o,s),a.services.resourceStore=a.store}return a.translator=new ot(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 ae=Ye.createInstance();ae.createInstance=Ye.createInstance;ae.createInstance;ae.dir;ae.init;ae.loadResources;ae.reloadResources;ae.use;ae.changeLanguage;ae.getFixedT;ae.t;ae.exists;ae.setDefaultNamespace;ae.hasLoadedNamespace;ae.loadNamespaces;ae.loadLanguages;const qn={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"},zn={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},Jn={CalendarFor:"Calendario per",Close:"Chiudi",SpotlightDefaultPlaceholder:"Esegui Comando",CheckObjectWrongValidation:"Oggetto non valido",ConfirmButton:"Conferma",AutocompleteDefaultPlaceholder:"Inserisci codice o descrizione"},Xn={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:qn,Month:zn,Generic:Jn},Zn={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"},Qn={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},es={CalendarFor:"Calendar for",Close:"Close",SpotlightDefaultPlaceholder:"Execute Command",CheckObjectWrongValidation:"Object not valid",ConfirmButton:"Confirm",AutocompleteDefaultPlaceholder:"Type code or description"},ts={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:Zn,Month:Qn,Generic:es};function vr(r,e){return new RegExp(rs(r),e)}function rs(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const ns=(r,e,t)=>{let n=r;return isNaN(n)||(e!=null&&(n=Math.max(n,e)),t!=null&&(n=Math.min(n,t))),n},ss=(r,e)=>{var i,o;const n=Intl.NumberFormat(r).formatToParts(1000.1),s=((i=n.find(l=>l.type==="group"))==null?void 0:i.value)??",",a=e??((o=n.find(l=>l.type==="decimal"))==null?void 0:o.value)??".";return{groupingChar:s,decimalChar:a}};function as(r,e,t,n){let s=e;const a=ls(r,t);if(!s){const o=Math.abs(a);o-Math.floor(o)?s="0,0.00":s="0,0"}const i=cs(s);return new Intl.NumberFormat(n,i).format(a)}const is=(r,e,t)=>{const n=r.lastIndexOf(t);if(n!==-1)return r.length-n-1;const s=t==="."?",":".",a=r.lastIndexOf(s);return a!==-1&&!(s===e&&r.length-a-1===3)?r.length-a-1:0},os=(r,e,t)=>{if(!r)return NaN;let n=r.replace(/\s/g,""),s=t;const a=(n.match(/\./g)||[]).length,i=(n.match(/,/g)||[]).length;if(a&&i)s=n.lastIndexOf(".")>n.lastIndexOf(",")?".":",";else if(!n.includes(t)){const l=n.includes(".")?".":",",c=l==="."?a:i;c>1||c===1&&l===e&&n.length-n.lastIndexOf(l)-1===3||(s=l)}const o=s==="."?",":".";return n=n.replace(new RegExp(`\\${o}`,"g"),""),s!=="."&&(n=n.replace(new RegExp(`\\${s}`,"g"),".")),parseFloat(n)};function ls(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(vr(l,"g"),""),a=a.replace(vr(o,"g"),"."),a=Number(a)}const i=Number(a);return isNaN(i)?NaN:i}function cs(r){const e={};r.includes(",")?e.useGrouping=!0:e.useGrouping=!1;const t=r.indexOf(".");if(t>-1){const s=(r.substring(t+1).match(/0/g)||[]).length;e.minimumFractionDigits=s,e.maximumFractionDigits=s}else e.minimumFractionDigits=0,e.maximumFractionDigits=0;return e}ae.init({lng:typeof navigator<"u"&&navigator.language.split("-")[0]||"en",fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(r,e,t,n)=>{const s=(n==null?void 0:n.type)??"number";try{switch(s){case"date":{const a=r instanceof Date?r:new Date(r);return new Intl.DateTimeFormat(t,{dateStyle:e||"short"}).format(a)}default:case"number":{const a=(n==null?void 0:n.inputIsLocalized)??!1;return as(r,e,a,t)}}}catch{return r}}},resources:{en:{translation:ts},it:{translation:Xn}}});const us=(r,e,t,n)=>ae.format(r,e,t||ae.language,n),fs=(r,e)=>ae.t(r,e);function je(){const r=_.useCallback((n,s,a,i)=>us(n,s,a||void 0,i),[]),e=_.useCallback(()=>ae.languages[0],[]),t=_.useCallback((n,s)=>fs(n,s),[]);return{format:r,getCurrentLanguage:e,translate:t}}var Te=(r=>(r.CALENDAR_FOR="Date.CalendarFor",r.CLOSE="Generic.Close",r.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",r.CHECK_OBJECT_WRONG_VALIDATION="Generic.CheckObjectWrongValidation",r.CONFIRM_BUTTON="Generic.ConfirmButton",r.AUTOCOMPLETE_DEFAULT_PLACEHOLDER="Generic.AutocompleteDefaultPlaceholder",r))(Te||{}),le=(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))(le||{}),ue=(r=>(r.JANUARY="Month.January",r.FEBRUARY="Month.February",r.MARCH="Month.March",r.APRIL="Month.April",r.MAY="Month.May",r.JUNE="Month.June",r.JULY="Month.July",r.AUGUST="Month.August",r.SEPTEMBER="Month.September",r.OCTOBER="Month.October",r.NOVEMBER="Month.November",r.DECEMBER="Month.December",r))(ue||{}),_t=(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))(_t||{});const Ct=({bindValue:r,optionalDisplayValue:e,options:t,displayMode:n,listDisplayMode:s="Both",minimumChars:a=3,isEditable:i=!0,fun:o,_changeOnEnter:l=!1,onChange:c,onOptionsRequest:f,_multiActiveIndex:u,...p})=>{const m=_.useRef(null),[d,y]=_.useState(r),[S,E]=_.useState(e),{translate:T}=je(),[w,O]=_.useState(!1),[b,D]=_.useState(t||[]),[N,L]=_.useState(0),[v,R]=_.useState([r]),{anchorRef:M,targetRef:C,anchorWidth:P}=ct({position:"bottom",enabled:w}),V=_.useCallback(()=>{var h;O(!1),(h=m==null?void 0:m.current)==null||h.focus()},[]);ft(C,w,()=>V());const A=Dn(400),Y=h=>{h.length>=a?o&&f&&A(async()=>{const x=await f(o,h);D(x),L(x.length>0?0:-1),O(!0)}):V(),y(h),E(e),l||c==null||c(h,e)},K=h=>{l?(y(""),E("")):(y(h.id),E(h.label)),c==null||c(h.id,h.label);const x=b.findIndex(j=>j.id===h.id);L(x),R([h.id]),V()},J=h=>{h.key==="Escape"&&(V(),L(-1))},U=h=>{if((h.key==="ArrowDown"||h.key==="ArrowUp")&&(h.preventDefault(),w)){const x=h.key==="ArrowDown"?(N+1)%b.length:(N-1+b.length)%b.length;L(x)}switch(h.key){case"Enter":N>=0&&N<b.length?K(b[N]):l&&(c==null||c(d,""),V(),y(""),E(""));break;case"Escape":V(),L(-1);break}};return g.jsxs("div",{"data-component":"autocomplete",children:[g.jsx($t,{...p,bindValue:d,optionalDisplayValue:S,displayMode:n,isEditable:i,shapeIcon:"magnify",placeholder:T(Te.AUTOCOMPLETE_DEFAULT_PLACEHOLDER),ref:M,inputRef:m,onChange:Y,onKeyDown:U,"aria-autocomplete":"list"}),w&&g.jsx(ut,{children:g.jsx($r,{options:b,displayMode:s,onClick:K,ref:C,selectedIndex:N,activeIndex:u||v,width:P,showFilter:!1,onKeyDown:J,isOpen:w})})]})},Ir=({options:r,fun:e,direction:t="row",disposition:n="start",sizing:s,variant:a,appearance:i,showText:o,showIcon:l,fullWidth:c,disabled:f,justify:u,squared:p,onClick:m,onOptionsRequest:d})=>{const[y,S]=_.useState(r);_.useEffect(()=>{!y&&d&&e&&d(e,void 0).then(w=>S(w)).catch(w=>{console.error("Errore nel caricamento delle opzioni per ButtonList",w)})},[y,e,d]);const E={container:`smp-button-list smp-button-list-${t} smp-justifyContent-${n}`},T=y==null?void 0:y.map((w,O)=>{const b={bindValue:w.id,optionalDisplayValue:w.label,fun:w.fun,icon:w.icon,variant:a,appearance:i,showText:o,showIcon:l,fullWidth:c,disabled:f,sizing:s,justify:u,squared:p,onClick:()=>{m==null||m(w.id,w.fun)}};return g.jsx(Se,{...b},`button-${O}`)});return g.jsx("div",{role:"list","data-component":"button-list",className:E.container,children:T})},ds={"smp-checkbox-wrapper":"_smp-checkbox-wrapper_z14lq_2"},Pr=({bindValue:r,_dataComponent:e="checkbox",disabled:t,label:n,isEditable:s=!0,onChange:a,onBlur:i,variant:o="checkbox"})=>{const l=_.useId(),c=u=>{s&&a&&a(u.target.checked)},f={wrapper:`${ds["smp-checkbox-wrapper"]}`};return g.jsxs("div",{className:f.wrapper,"data-component":e,children:[n&&g.jsx(De,{label:n,disabled:t,htmlFor:l}),g.jsx("input",{"data-component":"checkbox",type:"checkbox",checked:r,onChange:c,onBlur:i,role:o==="switch"?"switch":"checkbox",id:l})]})},Lt=({elements:r,isEditable:e=!1,displayMode:t="Both",onChange:n,color:s,backgroundColor:a,isDraggable:i=!1})=>{const[o,l]=_.useState(null),c={container:`${["smp-chips-container"]}`,element:"smp-chips-element"},f=m=>{n==null||n(r.filter((d,y)=>y!==m))},u=m=>{l(m)},p=m=>{if(o===null||o===m)return;const d=[...r],[y]=d.splice(o,1);d.splice(m,0,y),n==null||n(d),l(null)};return g.jsx("div",{className:c.container,role:"list","data-component":"chip",children:r.flatMap((m,d)=>{const y=ke(m.bindValue,m.optionalDisplayValue,t),S=g.jsxs("div",{className:c.element,role:"listitem",draggable:i,onDragStart:()=>u(d),onDragOver:T=>i&&T.preventDefault(),onDrop:()=>i&&p(d),style:{"--smp-chips-backgroundColor-base":a},children:[i&&g.jsx(oe,{icon:"drag_indicator_horizontal",isInteractable:!0}),g.jsx(_e,{variant:"label",bindValue:y,color:s}),e&&g.jsx(oe,{icon:"close",isInteractable:!0,onClick:()=>f(d),color:s})]},`chip-${d}`),E=i&&d<r.length-1?g.jsx(oe,{icon:"chevron-right",color:s},`separator-${d}`):null;return[S,E].filter(Boolean)})})};function It(r,e){const t=_.useRef(null);_.useEffect(()=>{if(!r)return;const n=typeof e=="object"&&e!==null&&"current"in e?e.current:null;if(!n)return;t.current=document.activeElement;const s=()=>n?Array.from(n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null):[];(()=>{const c=s();c.length>0&&requestAnimationFrame(()=>c[0].focus())})();const i=c=>{if(c.key==="Escape"||c.key!=="Tab")return;const f=s();if(f.length===0)return;const 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 kr=({bindValue:r,onChange:e,options:t=[],optionalDisplayValue:n,isEditable:s,displayMode:a,listDisplayMode:i="Both",fun:o,onOptionsRequest:l,multiActiveIndex:c,...f})=>{const u=_.useRef(null),[p,m]=_.useState(!1),[d,y]=_.useState(t),[S,E]=_.useState(-1),[T,w]=_.useState([r]),O=_.useId(),{anchorRef:b,targetRef:D,anchorWidth:N}=ct({position:"bottom",enabled:p}),L=_.useCallback(()=>{var P;m(!1),(P=u==null?void 0:u.current)==null||P.focus()},[]);ft(D,p,()=>L()),It(p,D);const v=P=>{e==null||e(P.id,P.label);const V=d.findIndex(A=>A.id===P.id);E(V),w([P.id]),L()},R=P=>{P.key==="Escape"&&(L(),E(-1))},M=P=>{(P.key==="ArrowDown"||P.key==="ArrowUp")&&(P.preventDefault(),C())},C=()=>{o&&l&&l(o,void 0).then(P=>{y(P),E(P.length>0?0:-1),m(!0)})};return g.jsxs("div",{role:"combobox","aria-expanded":p,"aria-controls":O,"aria-owns":O,"data-component":"combobox",children:[g.jsx($t,{...f,bindValue:r,optionalDisplayValue:n,displayMode:a,onShapeIconClick:C,onKeyDown:M,shapeIcon:"arrow_drop_down",rotatedShapeIcon:p,isEditable:s,ref:b,inputRef:u,"aria-autocomplete":"list",variant:"notSelectable"}),p&&g.jsx(ut,{children:g.jsx($r,{id:O,options:d,displayMode:i,ref:D,isOpen:p,selectedIndex:S,activeIndex:c||T,width:N,onClick:v,onKeyDown:R})})]})},ps={"smp-datepickercalendar-position":"_smp-datepickercalendar-position_1lf9g_1"};function hs({selectedDate:r,onDateChange:e,disabledDateRanges:t=[],initialValue:n,targetRef:s}){const{translate:a}=je(),i=()=>{if(!n)return;const U=new Date(n);return isNaN(U.getTime())?void 0:U},[o]=_.useState(new Date),[l,c]=_.useState(r||i()||new Date),[f,u]=_.useState(l?l.getMonth():new Date().getMonth()),[p,m]=_.useState(l?l.getFullYear():new Date().getFullYear()),[d,y]=_.useState(l?l.getDate():null),S=_.useRef(null),E=_.useRef([]),T=[a(ue.JANUARY),a(ue.FEBRUARY),a(ue.MARCH),a(ue.APRIL),a(ue.MAY),a(ue.JUNE),a(ue.JULY),a(ue.AUGUST),a(ue.SEPTEMBER),a(ue.OCTOBER),a(ue.NOVEMBER),a(ue.DECEMBER)],w=[{value:a(le.SUNDAY_SHORT),full:a(le.SUNDAY)},{value:a(le.MONDAY_SHORT),full:a(le.MONDAY)},{value:a(le.TUESDAY_SHORT),full:a(le.TUESDAY)},{value:a(le.WEDNESDAY_SHORT),full:a(le.WEDNESDAY)},{value:a(le.THURSDAY_SHORT),full:a(le.THURSDAY)},{value:a(le.FRIDAY_SHORT),full:a(le.FRIDAY)},{value:a(le.SATURDAY_SHORT),full:a(le.SATURDAY)}],O=U=>t.some(h=>{const x=h.start.getTime(),j=h.end.getTime(),I=U.getTime();return I>=x&&I<=j}),b=U=>{O(U)||(c(U),y(U.getDate()),e&&e(On(U)))},D=()=>{f===0?(u(11),m(p-1)):u(f-1),y(1)},N=()=>{f===11?(u(0),m(p+1)):u(f+1),y(1)},L=(U,h)=>new Date(U,h+1,0).getDate(),v=(U,h)=>new Date(U,h,1).getDay(),R=U=>{var x;const h=V.findIndex(j=>j!==null&&j.getDate()===U);h!==-1&&E.current[h]&&((x=E.current[h])==null||x.focus(),y(U))},M=(U,h)=>{const x=V[h];if(!x)return;const j=L(p,f),I=x.getDate();switch(U.key){case"ArrowRight":U.preventDefault();{let $=I+1,k=new Date(p,f,$);if($>j){const B=f===11?p+1:p,H=f===11?0:f+1;$=1,k=new Date(B,H,$),N(),setTimeout(()=>{C(1,"forward")},0);return}O(k)?C($,"forward"):R($)}break;case"Tab":break;case"ArrowLeft":U.preventDefault();{let $=I-1,k=new Date(p,f,$);if($<1){const B=f===0?p-1:p,H=f===0?11:f-1,W=L(B,H);$=W,k=new Date(B,H,$),D(),setTimeout(()=>{C(W,"backward")},0);return}O(k)?C($,"backward"):R($)}break;case"ArrowUp":U.preventDefault();{let $=I-7,k=new Date(p,f,$);if($<1){const B=f===0?p-1:p,H=f===0?11:f-1;$=L(B,H)+$,k=new Date(B,H,$),D(),setTimeout(()=>{C($,"backward")},0);return}O(k)?C($,"backward"):R($)}break;case"ArrowDown":U.preventDefault();{let $=I+7,k=new Date(p,f,$);if($>j){const B=f===11?p+1:p,H=f===11?0:f+1;$=$-j,k=new Date(B,H,$),N(),setTimeout(()=>{C($,"forward")},0);return}O(k)?C($,"forward"):R($)}break;case"Home":U.preventDefault(),C(1,"forward");break;case"End":U.preventDefault(),C(j,"backward");break;case"PageUp":U.preventDefault(),D(),setTimeout(()=>{const $=L(f===0?p-1:p,f===0?11:f-1),k=Math.min(I,$);C(k,"forward")},0);break;case"PageDown":U.preventDefault(),N(),setTimeout(()=>{const $=L(f===11?p+1:p,f===11?0:f+1),k=Math.min(I,$);C(k,"forward")},0);break;case" ":case"Space":if(O(x))return;y(x.getDate()),c(x);break;case"Enter":U.preventDefault(),b(x);break}},C=(U,h)=>{const x=L(p,f);if(h==="forward"){for(let j=U;j<=x;j++){const I=new Date(p,f,j);if(!O(I)){R(j);return}}N(),setTimeout(()=>{C(1,"forward")},0)}else{for(let k=U;k>=1;k--){const B=new Date(p,f,k);if(!O(B)){R(k);return}}const j=f===0?p-1:p,I=f===0?11:f-1,$=L(j,I);D(),setTimeout(()=>{C($,"backward")},0)}},V=(()=>{const U=L(p,f),h=v(p,f),x=[];for(let j=0;j<h;j++)x.push(null);for(let j=1;j<=U;j++){const I=new Date(p,f,j);x.push(I)}return x})(),A=[];let Y=[];V.forEach((U,h)=>{if(Y.push(U),Y.length===7||h===V.length-1){for(;Y.length<7;)Y.push(null);A.push(Y),Y=[]}}),_.useEffect(()=>{var U;if(d!==null){const h=V.findIndex(x=>x!==null&&x.getDate()===d);h!==-1&&E.current[h]&&((U=E.current[h])==null||U.focus())}},[f,p,d,V]);const K={label:"smp-datepickercalendar-label",wrapper:`smp-datepickercalendar ${ps["smp-datepickercalendar-position"]}`,calendar:"smp-datepickercalendar",table:"smp-datepickercalendar-table",th:"smp-datepickercalendar-th",td:(U,h,x,j)=>`smp-datepickercalendar-td
46
- ${U?"smp-datepickercalendar-td-today":""}
44
+ */var mt,Kt;function ln(){if(Kt)return mt;Kt=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 mt=s()?Object.assign:function(a,i){for(var o,l=n(a),c,f=1;f<arguments.length;f++){o=Object(arguments[f]);for(var u in o)e.call(o,u)&&(l[u]=o[u]);if(r){c=r(o);for(var d=0;d<c.length;d++)t.call(o,c[d])&&(l[c[d]]=o[c[d]])}}return l},mt}var gt,qt;function Dt(){if(qt)return gt;qt=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return gt=r,gt}var yt,zt;function Rr(){return zt||(zt=1,yt=Function.call.bind(Object.prototype.hasOwnProperty)),yt}var bt,Jt;function cn(){if(Jt)return bt;Jt=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var e=Dt(),t={},n=Rr();r=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(a,i,o,l,c){if(process.env.NODE_ENV!=="production"){for(var f in a)if(n(a,f)){var u;try{if(typeof a[f]!="function"){var d=Error((l||"React class")+": "+o+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=a[f](i,f,l,o,null,e)}catch(p){u=p}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 m=c?c():"";r("Failed "+o+" type: "+u.message+(m??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},bt=s,bt}var vt,Xt;function un(){if(Xt)return vt;Xt=1;var r=_r(),e=ln(),t=Dt(),n=Rr(),s=cn(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var l="Warning: "+o;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return vt=function(o,l){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function u(h){var x=h&&(c&&h[c]||h[f]);if(typeof x=="function")return x}var d="<<anonymous>>",m={array:E("array"),bigint:E("bigint"),bool:E("boolean"),func:E("function"),number:E("number"),object:E("object"),string:E("string"),symbol:E("symbol"),any:T(),arrayOf:w,element:O(),elementType:b(),instanceOf:D,node:R(),objectOf:I,oneOf:N,oneOfType:v,shape:C,exact:L};function p(h,x){return h===x?h!==0||1/h===1/x:h!==h&&x!==x}function y(h,x){this.message=h,this.data=x&&typeof x=="object"?x:{},this.stack=""}y.prototype=Error.prototype;function S(h){if(process.env.NODE_ENV!=="production")var x={},j=0;function k(A,U,H,B,X,K,se){if(B=B||d,K=K||H,se!==t){if(l){var V=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 V.name="Invariant Violation",V}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var G=B+":"+H;!x[G]&&j<3&&(a("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+B+"`. 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."),x[G]=!0,j++)}}return U[H]==null?A?U[H]===null?new y("The "+X+" `"+K+"` is marked as required "+("in `"+B+"`, but its value is `null`.")):new y("The "+X+" `"+K+"` is marked as required in "+("`"+B+"`, but its value is `undefined`.")):null:h(U,H,B,X,K)}var $=k.bind(null,!1);return $.isRequired=k.bind(null,!0),$}function E(h){function x(j,k,$,A,U,H){var B=j[k],X=Y(B);if(X!==h){var K=z(B);return new y("Invalid "+A+" `"+U+"` of type "+("`"+K+"` supplied to `"+$+"`, expected ")+("`"+h+"`."),{expectedType:h})}return null}return S(x)}function T(){return S(i)}function w(h){function x(j,k,$,A,U){if(typeof h!="function")return new y("Property `"+U+"` of component `"+$+"` has invalid PropType notation inside arrayOf.");var H=j[k];if(!Array.isArray(H)){var B=Y(H);return new y("Invalid "+A+" `"+U+"` of type "+("`"+B+"` supplied to `"+$+"`, expected an array."))}for(var X=0;X<H.length;X++){var K=h(H,X,$,A,U+"["+X+"]",t);if(K instanceof Error)return K}return null}return S(x)}function O(){function h(x,j,k,$,A){var U=x[j];if(!o(U)){var H=Y(U);return new y("Invalid "+$+" `"+A+"` of type "+("`"+H+"` supplied to `"+k+"`, expected a single ReactElement."))}return null}return S(h)}function b(){function h(x,j,k,$,A){var U=x[j];if(!r.isValidElementType(U)){var H=Y(U);return new y("Invalid "+$+" `"+A+"` of type "+("`"+H+"` supplied to `"+k+"`, expected a single ReactElement type."))}return null}return S(h)}function D(h){function x(j,k,$,A,U){if(!(j[k]instanceof h)){var H=h.name||d,B=W(j[k]);return new y("Invalid "+A+" `"+U+"` of type "+("`"+B+"` supplied to `"+$+"`, expected ")+("instance of `"+H+"`."))}return null}return S(x)}function N(h){if(!Array.isArray(h))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function x(j,k,$,A,U){for(var H=j[k],B=0;B<h.length;B++)if(p(H,h[B]))return null;var X=JSON.stringify(h,function(se,V){var G=z(V);return G==="symbol"?String(V):V});return new y("Invalid "+A+" `"+U+"` of value `"+String(H)+"` "+("supplied to `"+$+"`, expected one of "+X+"."))}return S(x)}function I(h){function x(j,k,$,A,U){if(typeof h!="function")return new y("Property `"+U+"` of component `"+$+"` has invalid PropType notation inside objectOf.");var H=j[k],B=Y(H);if(B!=="object")return new y("Invalid "+A+" `"+U+"` of type "+("`"+B+"` supplied to `"+$+"`, expected an object."));for(var X in H)if(n(H,X)){var K=h(H,X,$,A,U+"."+X,t);if(K instanceof Error)return K}return null}return S(x)}function v(h){if(!Array.isArray(h))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var x=0;x<h.length;x++){var j=h[x];if(typeof j!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+J(j)+" at index "+x+"."),i}function k($,A,U,H,B){for(var X=[],K=0;K<h.length;K++){var se=h[K],V=se($,A,U,H,B,t);if(V==null)return null;V.data&&n(V.data,"expectedType")&&X.push(V.data.expectedType)}var G=X.length>0?", expected one of type ["+X.join(", ")+"]":"";return new y("Invalid "+H+" `"+B+"` supplied to "+("`"+U+"`"+G+"."))}return S(k)}function R(){function h(x,j,k,$,A){return F(x[j])?null:new y("Invalid "+$+" `"+A+"` supplied to "+("`"+k+"`, expected a ReactNode."))}return S(h)}function M(h,x,j,k,$){return new y((h||"React class")+": "+x+" type `"+j+"."+k+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+$+"`.")}function C(h){function x(j,k,$,A,U){var H=j[k],B=Y(H);if(B!=="object")return new y("Invalid "+A+" `"+U+"` of type `"+B+"` "+("supplied to `"+$+"`, expected `object`."));for(var X in h){var K=h[X];if(typeof K!="function")return M($,A,U,X,z(K));var se=K(H,X,$,A,U+"."+X,t);if(se)return se}return null}return S(x)}function L(h){function x(j,k,$,A,U){var H=j[k],B=Y(H);if(B!=="object")return new y("Invalid "+A+" `"+U+"` of type `"+B+"` "+("supplied to `"+$+"`, expected `object`."));var X=e({},j[k],h);for(var K in X){var se=h[K];if(n(h,K)&&typeof se!="function")return M($,A,U,K,z(se));if(!se)return new y("Invalid "+A+" `"+U+"` key `"+K+"` supplied to `"+$+"`.\nBad object: "+JSON.stringify(j[k],null," ")+`
45
+ Valid keys: `+JSON.stringify(Object.keys(h),null," "));var V=se(H,K,$,A,U+"."+K,t);if(V)return V}return null}return S(x)}function F(h){switch(typeof h){case"number":case"string":case"undefined":return!0;case"boolean":return!h;case"object":if(Array.isArray(h))return h.every(F);if(h===null||o(h))return!0;var x=u(h);if(x){var j=x.call(h),k;if(x!==h.entries){for(;!(k=j.next()).done;)if(!F(k.value))return!1}else for(;!(k=j.next()).done;){var $=k.value;if($&&!F($[1]))return!1}}else return!1;return!0;default:return!1}}function P(h,x){return h==="symbol"?!0:x?x["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&x instanceof Symbol:!1}function Y(h){var x=typeof h;return Array.isArray(h)?"array":h instanceof RegExp?"object":P(x,h)?"symbol":x}function z(h){if(typeof h>"u"||h===null)return""+h;var x=Y(h);if(x==="object"){if(h instanceof Date)return"date";if(h instanceof RegExp)return"regexp"}return x}function J(h){var x=z(h);switch(x){case"array":case"object":return"an "+x;case"boolean":case"date":case"regexp":return"a "+x;default:return x}}function W(h){return!h.constructor||!h.constructor.name?d:h.constructor.name}return m.checkPropTypes=s,m.resetWarningCache=s.resetWarningCache,m.PropTypes=m,m},vt}var xt,Zt;function fn(){if(Zt)return xt;Zt=1;var r=Dt();function e(){}function t(){}return t.resetWarningCache=e,xt=function(){function n(i,o,l,c,f,u){if(u!==r){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}n.isRequired=n;function s(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:e};return a.PropTypes=a,a},xt}var Qt;function dn(){if(Qt)return Ge.exports;if(Qt=1,process.env.NODE_ENV!=="production"){var r=_r(),e=!0;Ge.exports=un()(r.isElement,e)}else Ge.exports=fn()();return Ge.exports}var ie=dn(),pn=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},hn=function(e,t){for(var n in e)if(!(n in t))return!0;for(var s in t)if(e[s]!==t[s])return!0;return!1},mn=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],qe="http://www.w3.org/2000/svg",er="http://www.w3.org/1999/xlink",ke=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}zr(e,r);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof pn(this.reactWrapper).Node){var a=this.props,i=a.desc,o=a.evalScripts,l=a.httpRequestWithCredentials,c=a.renumerateIRIElements,f=a.src,u=a.title,d=a.useRequestCache,m=this.props.onError,p=this.props.beforeInjection,y=this.props.afterInjection,S=this.props.wrapper,E,T;S==="svg"?(E=document.createElementNS(qe,S),E.setAttribute("xmlns",qe),E.setAttribute("xmlns:xlink",er),T=document.createElementNS(qe,S)):(E=document.createElement(S),T=document.createElement(S)),E.appendChild(T),T.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(E);var w=function(N){if(s.removeSVG(),!s._isMounted){m(N);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){m(N)})},O=function(N,I){if(N){w(N);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{y(I)}catch(v){w(v)}})},b=function(N){if(N.setAttribute("role","img"),i){var I=N.querySelector(":scope > desc");I&&N.removeChild(I);var v=document.createElement("desc");v.innerHTML=i,N.prepend(v)}if(u){var R=N.querySelector(":scope > title");R&&N.removeChild(R);var M=document.createElement("title");M.innerHTML=u,N.prepend(M)}try{p(N)}catch(C){w(C)}};sn(T,{afterEach:O,beforeEach:b,cacheRequests:d,evalScripts:o,httpRequestWithCredentials:l,renumerateIRIElements:c})}},t.removeSVG=function(){var s;(s=this.nonReactWrapper)!=null&&s.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},t.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},t.componentDidUpdate=function(s){var a=this;hn(tt({},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=qr(s,mn),c=o;return We.createElement(c,tt({},l,{ref:this.refCallback},o==="svg"?{xmlns:qe,xmlnsXlink:er}:{}),this.state.isLoading&&i&&We.createElement(i,null),this.state.hasError&&a&&We.createElement(a,null))},e}(We.Component);ke.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};ke.propTypes={afterInjection:ie.func,beforeInjection:ie.func,desc:ie.string,evalScripts:ie.oneOf(["always","once","never"]),fallback:ie.oneOfType([ie.func,ie.object,ie.string]),httpRequestWithCredentials:ie.bool,loading:ie.oneOfType([ie.func,ie.object,ie.string]),onError:ie.func,renumerateIRIElements:ie.bool,src:ie.string.isRequired,title:ie.string,useRequestCache:ie.bool,wrapper:ie.oneOf(["div","span","svg"])};let Et={assets:"/"};const gn=r=>{Et={...Et,...r}},tr=r=>`${Et.assets}/${r}`.replace(/\/+/g,"/"),oe=_.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,tabIndex:d})=>{const[m,p]=_.useState(r),y=(r==null?void 0:r.startsWith("http"))||(r==null?void 0:r.startsWith("/")),S=y&&(r==null?void 0:r.toLowerCase().endsWith(".svg")),E=tr(`assets/svg/${r}.svg`),T=tr(`assets/svg/${n}.svg`),w={img:`${c?"smp-image-interactable":""}`,svg:`smp-icon ${i?`smp-icon-${i}`:""} ${o?"smp-icon-rotated":""} ${c?"smp-icon-interactable":""} ${f?"smp-icon-spin":""}`},O=()=>{!a&&c&&l&&l()},b=D=>{!a&&c&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),O())};return g.jsx(g.Fragment,{children:S?g.jsx(ke,{src:r,fallback:()=>g.jsx(ke,{src:T,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:u,role:"application",fill:s,"aria-disabled":a,className:w.svg,onClick:O,onKeyDown:b,tabIndex:d}):y?g.jsx("img",{src:m,width:e||"16px",height:t||"auto",alt:u,onError:()=>p(T),onClick:O,className:w.img,title:u,onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&O()}}):g.jsx(ke,{src:E,fallback:()=>g.jsx(ke,{src:T,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:u,role:"application",fill:s,"aria-disabled":a,className:w.svg,onClick:O,onKeyDown:b,tabIndex:d})})}),rr=r=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[r],nr=r=>({primary:"onPrimary",danger:"onDanger",base:"base"})[r],Se=({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,justify:d="center",title:m,optionalDisplayValue:p,squared:y=!1,submit:S=!1})=>{const E={container:`smp-button smp-button-container ${a?`smp-button-${a}`:""} ${i?`smp-buttonVariant-${i}`:""} ${o?`smp-buttonType-${o}`:""} ${f?"smp-button-fullWidth":""} smp-justifyContent-${d} ${y&&!c?"smp-button-squared":""}`};return g.jsx("button",{"data-component":"button",type:S?"submit":"button",className:E.container,onClick:e,"aria-label":t,disabled:s,"aria-busy":u,title:m||p,children:u?g.jsx(oe,{icon:"spinner",state:nr(i),spin:!0}):g.jsxs(g.Fragment,{children:[n&&l&&g.jsx(oe,{icon:n,disabled:s,state:nr(i),width:rr(a),height:rr(a)}),c&&g.jsx("span",{children:p||r})]})})},yn={titleLarge:"h2",title:"h3",body:"h6",label:"label"},_e=({variant:r="body",bindValue:e,color:t,...n})=>{const s=yn[r],a={container:`smp-typography ${r?`smp-typography-${r}`:""} ${n.disabled?"smp-typography-disabled":""}`};return g.jsx(s,{className:a.container,disabled:n.disabled,style:{"--smp-typography-color-base":t},children:e})},ye={"smp-tabbar-container":"_smp-tabbar-container_1scvh_1","smp-tabbar-scroll-button":"_smp-tabbar-scroll-button_1scvh_8","smp-tabbar-scroll-buttonRight":"_smp-tabbar-scroll-buttonRight_1scvh_13","smp-tabbar-scroll-buttonLeft":"_smp-tabbar-scroll-buttonLeft_1scvh_17","smp-tabbar-list-wrapper":"_smp-tabbar-list-wrapper_1scvh_21","smp-tabbar-list":"_smp-tabbar-list_1scvh_21","smp-tabbar-tab":"_smp-tabbar-tab_1scvh_38","smp-active":"_smp-active_1scvh_62","smp-tabbar-tab-extraSmall":"_smp-tabbar-tab-extraSmall_1scvh_75","smp-tabbar-tab-small":"_smp-tabbar-tab-small_1scvh_80","smp-tabbar-tab-base":"_smp-tabbar-tab-base_1scvh_85","smp-tabbar-tab-large":"_smp-tabbar-tab-large_1scvh_90","smp-tabbar-tab-extraLarge":"_smp-tabbar-tab-extraLarge_1scvh_95"},bn=({data:r,sizing:e="large",toolbar:t=!0,selectedIndex:n,onTabChange:s})=>{const[a,i]=_.useState(0),o=n??a,[l,c]=_.useState(!1),[f,u]=_.useState(!1),d=_.useRef(null);if(_.useEffect(()=>{const w=d.current;if(!w)return;S();const O=()=>S();return w.addEventListener("scroll",O),window.addEventListener("resize",S),()=>{w.removeEventListener("scroll",O),window.removeEventListener("resize",S)}},[]),!r.children||r.children.length===0)return g.jsx("div",{className:"tab-bar-empty",children:"No tabs available"});const m={container:ye["smp-tabbar-container"],listWrapper:ye["smp-tabbar-list-wrapper"],list:ye["smp-tabbar-list"],tab:`${ye["smp-tabbar-tab"]} ${e?ye[`smp-tabbar-tab-${e}`]:""}`,scrollButtonRight:`${ye["smp-tabbar-scroll-button"]} ${ye["smp-tabbar-scroll-buttonRight"]}`,scrollButtonLeft:`${ye["smp-tabbar-scroll-button"]} ${ye["smp-tabbar-scroll-buttonLeft"]}`,active:ye["smp-active"]},p=100,y=2,S=()=>{const w=d.current;w&&(c(w.scrollLeft>0),u(w.scrollLeft+w.clientWidth<w.scrollWidth-y))},E=()=>{var w;(w=d.current)==null||w.scrollBy({left:-p,behavior:"smooth"})},T=()=>{var w;(w=d.current)==null||w.scrollBy({left:p,behavior:"smooth"})};return g.jsxs("div",{className:m.container,role:"tabpanel","data-component":"tab-bar",children:[l&&g.jsx("div",{className:m.scrollButtonLeft,children:g.jsx(Se,{bindValue:"",optionalDisplayValue:"<",onClick:E,variant:"base",sizing:e})}),g.jsx("div",{className:m.listWrapper,children:g.jsx("div",{className:m.list,ref:d,role:"tablist",children:r.children.map((w,O)=>g.jsxs("button",{className:`${O===a?m.active:""} ${m.tab} `,role:"tab","aria-selected":O===o,tabIndex:O===o?0:-1,onClick:()=>{s&&s(O),i(O)},children:[w.icon&&g.jsx(oe,{icon:w.icon,placeholderIcon:w.placeholderIcon}),g.jsx(_e,{variant:"body",bindValue:w.decode||"Tab[object Object]"}),t&&(o===O?g.jsx(oe,{icon:"more_vert",placeholderIcon:w.placeholderIcon,isInteractable:!0,onClick:()=>{console.log("clicked icon")}}):g.jsx(oe,{icon:"empty"}))]},O))})}),f&&g.jsx("div",{className:m.scrollButtonRight,children:g.jsx(Se,{bindValue:"",optionalDisplayValue:">",onClick:T,variant:"base",sizing:e})})]})},rt=({children:r,layout:e={horizontal:!1,sectionsType:"tab",sections:[{id:"1",content:Array.isArray(r)?r.map(t=>({id:t.props.id})):[{id:r.props.id}]}]}})=>{const[t,n]=_.useState(0),s={};_.Children.forEach(r,p=>{_.isValidElement(p)&&(s[p.props.id]=p)});const a="--smp-grid-template-cols",i="--smp-grid-template-rows",o=Er(e.sections??[],Object.keys(s)),l=p=>p.reduce((y,S)=>{var b,D;let E="",T={},w={},O="";return(b=S.sections)!=null&&b.length?(E=pe["smp-layout-section-grid"],T=l(S.sections),S.gridCols===void 0&&(O=pe[S.horizontal?"smp-grid-template-cols":"smp-grid-template-rows"],(S.horizontal||Mt(S.sections))&&(w=Nt(S.sections,S.horizontal?a:i)))):(D=S.content)!=null&&D.length&&(S.gridCols!==void 0&&S.gridCols>0?(E=pe["smp-layout-section-grid"],O=pe["smp-grid-template-cols"],w={[a]:`repeat(${S.gridCols}, 1fr)`}):E=pe["smp-layout-section-flex"]),{...y,...T,[S.id]:{classes:`${E} ${pe[S.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${O} ${S.justify?`smp-justifyContent-${S.justify}`:""} ${S.align?`smp-alignItems-${S.align}`:""}`,styles:w}}},{}),c=l(o),f=`${pe["smp-layout"]} ${e.horizontal?pe["smp-layout-horizontal"]:pe["smp-layout-vertical"]}`,u=e.horizontal||Mt(e.sections||[])?Nt(o,e.horizontal?a:i):{},d=(p,y)=>{var E,T;const S=g.jsx("div",{"smp-id":`section-${p.id}`,className:c[p.id].classes,style:c[p.id].styles,children:(E=p.sections)!=null&&E.length?p.sections.map(w=>d(w)):(T=p.content)==null?void 0:T.map(w=>m(w,p.justify,p.align))},`section-${p.id}`);return p.title&&!y?g.jsxs("div",{className:pe["smp-layout-section-with-title"],children:[g.jsx("span",{className:`${pe["smp-layout-section-title"]} ${p.justify?`smp-justifyContent-${p.justify}`:""} ${p.align?`smp-alignItems-${p.align}`:""}`,children:g.jsx(De,{label:p.title})}),S]},`title-section-${p.id}`):S},m=(p,y,S)=>{const E=s[p.id];if(!E)return null;const w={gridColumnStart:(p.colSpan&&p.colSpan>0?`span ${p.colSpan}`:p.colStart&&p.colStart<1?"1":void 0)??p.colStart,gridColumnEnd:p.colEnd&&p.colEnd>0?p.colEnd:void 0},O=`${pe["smp-layout-cell-container"]} ${y?`smp-justifyContent-${y}`:""} ${S?`smp-alignItems-${S}`:""}`;return g.jsx("div",{className:O,style:w,"smp-id":p.id,children:E},p.id)};return g.jsxs("div",{className:f,style:u,"smp-id":"layout",children:[e.sectionsType==="tab"&&e.sections&&(e==null?void 0:e.sections.length)>1&&g.jsx(bn,{data:{type:"SmeupDataTree",children:o.map(p=>({decode:p.title||p.id||"Tab",obj:{t:"",p:"",k:""},placeholderIcon:"tab",cells:{},children:[],shape:void 0}))},selectedIndex:t,onTabChange:n,toolbar:!1}),e.sectionsType?d(o[t],!0):o.map(p=>d(p))]})},te={AUTOCOMPLETE:"ACP",BUTTON_LIST:"BTL",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",ICON:"ICO",IMAGE:"IMG",INPUT_NUMBER:"INR",MEMO:"MEM",MULTI_AUTOCOMPLETE:"AML",RADIO:"RAD",SPOTLIGHT:"SPL",SWITCH:"SWT",TEXT_FIELD:"ITX",TIME:"TIM",PASSWORD:"PWD"},vn=r=>r.t=="D8",xn=r=>r.t=="I1",Sn=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 nt{constructor(e,t){de(this,"class");de(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new nt(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 wn(r,e){if(jt(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),ze(t)?t:r;case 3:case 4:return o=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),i===0?(t.setMonth(o-1),t.setDate(l)):a===0&&(t.setMonth(l-1),t.setDate(o)),ze(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)),Tt(o,u,parseInt(c))&&ze(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)),Tt(f,u,parseInt(c))&&ze(t)?t:r}}return r}function jt(r){return/^\d{4}-\d{2}-\d{2}$/.test(r)&&r.length===10}function ze(r){return r instanceof Date&&!isNaN(r.getTime())}function En(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 Tt(n,t-1,e)}function Tt(r,e,t){const n=[31,Tn(t)?29:28,31,30,31,30,31,31,30,31,30,31];return!(e<0||e>11||r<1||r>n[e])}function Tn(r){return r%4===0&&(r%100!==0||r%400===0)}function On(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 st{constructor(e,t){de(this,"class");de(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=sr.get(`${e.t}${e.p}`);if(t)return new st(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=sr.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 sr=new Map([["D8*YYMD",{legacyToIso(r){return En(r)&&`${r.substring(0,4)}-${r.substring(4,6)}-${r.substring(6,8)}`||r},isoToLegacy(r){return jt(r)&&r.replaceAll("-","")||r}}]]);function ct({position:r="bottom",enabled:e=!0}){const t=_.useRef(null),n=_.useRef(null),[s,a]=_.useState(0),i=_.useCallback(()=>{const o=t.current,l=n.current;if(!o||!l)return;const{top:c,left:f,width:u,height:d}=o.getBoundingClientRect();a(u);const m=l.offsetHeight,p=l.offsetWidth;if(p===0||m===0){requestAnimationFrame(i);return}let y=c+window.scrollY,S=f+window.scrollX;switch(r){case"top":y-=m;break;case"bottom":y+=d;break;case"left":S-=p;break;case"right":S+=u;break}requestAnimationFrame(()=>{l.style.transform=`translate(${S}px, ${y}px)`,l.style.opacity="1"})},[r]);return _.useLayoutEffect(()=>{if(!e)return;let o;const l=()=>{const f=t.current,u=n.current;f&&u?i():o=requestAnimationFrame(l)};o=requestAnimationFrame(l);const c=new MutationObserver(()=>{i()});return n.current&&c.observe(n.current,{childList:!0,subtree:!0}),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0),()=>{cancelAnimationFrame(o),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),c.disconnect()}},[i,e]),{anchorRef:t,targetRef:n,anchorWidth:s}}const Pe=(r,e,t)=>{if(r=="")return"";if(t)switch(t){case"CodeOnly":return r;case"DescOnly":return e||"";case"Both":return`${r} - ${e}`}return r},Dr=({helperText:r,disabled:e,state:t,id:n})=>{const s={container:`smp-helper-text ${e?"smp-helper-text-disabled":""} ${t?`smp-helper-text-${t}`:""}`};return g.jsx("label",{className:s.container,id:n,children:r})},he={"smp-textfield-wrapper":"_smp-textfield-wrapper_ep1c3_4","smp-textfield":"_smp-textfield_ep1c3_4","smp-textfield-variant-notSelectable":"_smp-textfield-variant-notSelectable_ep1c3_29","smp-textfield-extraSmall":"_smp-textfield-extraSmall_ep1c3_35","smp-textfield-small":"_smp-textfield-small_ep1c3_40","smp-textfield-medium":"_smp-textfield-medium_ep1c3_45","smp-textfield-large":"_smp-textfield-large_ep1c3_50","smp-textfield-extraLarge":"_smp-textfield-extraLarge_ep1c3_55","smp-textfield-input":"_smp-textfield-input_ep1c3_61","smp-textfield-outlined":"_smp-textfield-outlined_ep1c3_84","smp-textfield-danger":"_smp-textfield-danger_ep1c3_95","smp-textfield-readOnly":"_smp-textfield-readOnly_ep1c3_99","smp-textfield-disabled":"_smp-textfield-disabled_ep1c3_114","smp-textfield-fullWidth":"_smp-textfield-fullWidth_ep1c3_123","smp-textfield-top-right-indicator":"_smp-textfield-top-right-indicator_ep1c3_127"},we=({disabled:r,bindValue:e,icon:t,placeholder:n,isEditable:s=!0,shapeIcon:a,sizing:i,state:o,variant:l,tooltip:c=!1,rotatedShapeIcon:f=!1,ref:u,inputRef:d,inputType:m="text",ariaLabel:p="input field",label:y,helperText:S=!1,error:E,appearance:T="base",fullWidth:w=!1,_dataComponent:O="textfield",min:b,max:D,step:N,inputMode:I="text",width:v,autocomplete:R,size:M,maxLength:C,onBlur:L,onChange:F,onKeyDown:P,onShapeIconClick:Y,onClick:z})=>{const J=_.useId(),W=`${J}-helper`,h=E?"danger":o,x=E||o=="danger"?"error":a,j=S||!!E,k=U=>{F==null||F(U.target.value)},$={wrapper:`${he["smp-textfield-wrapper"]} ${w?he["smp-textfield-fullWidth"]:""}`,container:`${he["smp-textfield"]} ${r?he["smp-textfield-disabled"]:""} ${n?he["smp-textfield-placeholder"]:""} ${i?he[`smp-textfield-${i}`]:""} ${h?he[`smp-textfield-${h}`]:""} ${T?he[`smp-textfield-${T}`]:""} ${s?"":he["smp-textfield-readOnly"]} ${c?he["smp-textfield-top-right-indicator"]:""}`,input:`${he["smp-textfield-input"]}`};if(l&&(l!=="notSelectable"||s)){const U=he[`smp-textfield-variant-${l}`];U&&($.container+=` ${U}`)}const A=v?{"--smp-textField-width-base":v}:void 0;return g.jsxs("div",{className:$.wrapper,"data-component":O,children:[y&&g.jsx(De,{label:y,disabled:r,htmlFor:J}),g.jsxs("div",{className:$.container,ref:u,style:A,children:[t&&g.jsx(oe,{icon:t,disabled:r}),g.jsx("input",{id:J,type:m,value:e,placeholder:n,onChange:k,onBlur:L,className:$.input,disabled:r,readOnly:!s,onKeyDown:P,"aria-label":p,ref:d,"aria-describedby":j?W:void 0,min:b,max:D,step:N,inputMode:I,autoComplete:R,size:M,maxLength:C,onClick:z}),x&&g.jsx(oe,{icon:x,disabled:r,state:h,onClick:Y,rotated:f,isInteractable:s,tabIndex:0})]}),j&&g.jsx(Dr,{helperText:E,disabled:r,state:h,id:W})]})};function jr({items:r,itemHeight:e,containerHeight:t,overscan:n=5}){const[s,a]=_.useState(0),i=_.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 m=l;m<=c;m++)f.push({item:r[m],index:m,offsetTop:m*e});const u=_.useCallback(m=>{const p=m.target.scrollTop;a(p)},[]),d=m=>{if(!i.current)return;const p=m*e,y=p+e,S=i.current,E=S.scrollTop,T=E+t;p<E?S.scrollTop=p:y>T&&(S.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:d}}const Je={"smp-list":"_smp-list_6ni6l_1","smp-list-container":"_smp-list-container_6ni6l_12","smp-list-listItem":"_smp-list-listItem_6ni6l_17"};function _n(r,e,t="14px IBM Plex Sans, sans-serif",n=32){const a=document.createElement("canvas").getContext("2d");if(!a)return 200;a.font=t;let i=0;for(const o of r){const l=Pe(o.id,o.label,e),c=a.measureText(l);i=Math.max(i,c.width)}return Math.ceil(i+n)}const Rn=10,$r=({id:r,options:e,displayMode:t="Both",ref:n,showFilter:s,selectedIndex:a=null,activeIndex:i=[],width:o,onClick:l,onKeyDown:c,isOpen:f})=>{var F;const[u,d]=_.useState(""),m=40,[p,y]=_.useState(a!==null?a:-1),[S,E]=_.useState(o||200),T=_.useRef(null),w=s!==void 0?s:e.length>Rn,O=u?e.filter(P=>P.label.toLowerCase().includes(u.toLowerCase())):e,b=P=>{d(P)},{virtualItems:D,containerProps:N,innerProps:I,scrollToIndex:v}=jr({items:O,itemHeight:m,containerHeight:200,overscan:5});_.useEffect(()=>{a!==null&&a!==p&&y(a)},[a]),_.useEffect(()=>{p>=0&&p<O.length&&v(p)},[p,O]),_.useEffect(()=>{f&&(T!=null&&T.current)&&T.current.focus()},[f,T]),_.useEffect(()=>{const P=_n(e,t);E(P)},[e,t]);const R=P=>{if(P.key==="ArrowDown"||P.key==="ArrowUp"){P.preventDefault();let Y=p;P.key==="ArrowDown"?Y=p<O.length-1?p+1:0:P.key==="ArrowUp"&&(Y=p>0?p-1:O.length-1),y(Y)}else P.key==="Enter"?p>=0&&p<O.length&&(l==null||l(O[p])):P.key==="Escape"&&(P.preventDefault(),P.stopPropagation());c&&c(P)},M=P=>{R(P)},C=P=>{R(P)},L={wrapper:`${Je["smp-list"]}`,container:`${Je["smp-list-container"]}`,virtualScroll:`${Je["smp-list-virtualScroll"]}`,listItem:`${Je["smp-list-listItem"]}`};return g.jsxs("div",{id:r,ref:n,className:L.wrapper,"data-component":"list",style:{width:S,minWidth:o},children:[w&&g.jsx(we,{bindValue:u,placeholder:"Search...",fullWidth:!0,onChange:b,onKeyDown:M,inputRef:T}),g.jsx("div",{...N,className:L.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:C,"aria-activedescendant":p>=0&&p<O.length?(F=O[p])==null?void 0:F.id:void 0,children:g.jsx("div",{...I,className:L.virtualScroll,children:D.map(({item:P,index:Y,offsetTop:z})=>{const J=i.includes(P.id);return g.jsxs("li",{role:"option",id:P.id,"aria-selected":p===Y?"true":"false",tabIndex:-1,className:`${L.listItem} ${p===Y?"selected-item":""}`,"aria-label":P.id+"-"+P.label,style:{height:`${m}px`,lineHeight:`calc(${m}px - 2*2px)`,transform:`translateY(${z}px)`},onClick:()=>{l==null||l(P),y(Y)},children:[Pe(P.id,P.label,t),J&&g.jsx(oe,{icon:"check",width:16})]},P.id)})})})]})},$t=({displayMode:r,bindValue:e,optionalDisplayValue:t,...n})=>{const[s,a]=_.useState(Pe(e,t,r));return _.useEffect(()=>{a(e)},[e]),_.useEffect(()=>{a(Pe(e,t,r))},[t,r]),g.jsx(we,{...n,bindValue:s})},Dn=r=>{const e=_.useRef(null);return _.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),n=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{n()},r)}};function ut({children:r}){const[e,t]=_.useState(!1);return _.useEffect(()=>{t(!0)},[]),e?Ur.createPortal(r,document.body):null}const ft=(r,e,t)=>{_.useEffect(()=>{if(!e)return;const n=s=>{(r==null?void 0:r.some(i=>{if(typeof i=="object"&&i!==null&&"current"in i){const o=i==null?void 0:i.current;return o&&o.contains(s.target)}}))||t()};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[r,t,e])},q=r=>typeof r=="string",Me=()=>{let r,e;const t=new Promise((n,s)=>{r=n,e=s});return t.resolve=r,t.reject=e,t},ar=r=>r==null?"":""+r,jn=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},$n=/###/g,ir=r=>r&&r.indexOf("###")>-1?r.replace($n,"."):r,or=r=>!r||q(r),Fe=(r,e,t)=>{const n=q(e)?e.split("."):e;let s=0;for(;s<n.length-1;){if(or(r))return{};const a=ir(n[s]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++s}return or(r)?{}:{obj:r,k:ir(n[s])}},lr=(r,e,t)=>{const{obj:n,k:s}=Fe(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=Fe(r,i,Object);for(;o.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),o=Fe(r,i,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${a}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=t},Cn=(r,e,t,n)=>{const{obj:s,k:a}=Fe(r,e,Object);s[a]=s[a]||[],s[a].push(t)},at=(r,e)=>{const{obj:t,k:n}=Fe(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},In=(r,e,t)=>{const n=at(r,t);return n!==void 0?n:at(e,t)},Cr=(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]):Cr(r[n],e[n],t):r[n]=e[n]);return r},Ce=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Ln={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const kn=r=>q(r)?r.replace(/[&<>"'\/]/g,e=>Ln[e]):r;class Pn{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const An=[" ",",","?","!",";"],Nn=new Pn(20),Mn=(r,e,t)=>{e=e||"",t=t||"";const n=An.filter(i=>e.indexOf(i)<0&&t.indexOf(i)<0);if(n.length===0)return!0;const s=Nn.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},Ot=(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},Ve=r=>r==null?void 0:r.replace("_","-"),Fn={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 it{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Fn,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 it(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new it(this.logger,e)}}var be=new it;class dt{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 cr extends dt{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=at(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:Ot((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),lr(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=at(this.data,o)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?Cr(l,n,a):l={...l,...n},lr(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 Ir={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 ur={},fr=r=>!q(r)&&typeof r!="boolean"&&typeof r!="number";class ot extends dt{constructor(e,t={}){super(),jn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=be.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&&!Mn(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,d=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode")return d?a?{res:`${c}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:`${c}${f}${o}`:a?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:o;const m=this.resolve(e,s);let p=m==null?void 0:m.res;const y=(m==null?void 0:m.usedKey)||o,S=(m==null?void 0:m.exactUsedKey)||o,E=["[object Number]","[object Function]","[object RegExp]"],T=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,O=s.count!==void 0&&!q(s.count),b=ot.hasDefaultValue(s),D=O?this.pluralResolver.getSuffix(u,s.count,s):"",N=s.ordinal&&O?this.pluralResolver.getSuffix(u,s.count,{ordinal:!1}):"",I=O&&!s.ordinal&&s.count===0,v=I&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${D}`]||s[`defaultValue${N}`]||s.defaultValue;let R=p;w&&!p&&b&&(R=v);const M=fr(R),C=Object.prototype.toString.apply(R);if(w&&R&&M&&E.indexOf(C)<0&&!(q(T)&&Array.isArray(R))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,R,{...s,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return a?(m.res=L,m.usedParams=this.getUsedParamsDetails(s),m):L}if(i){const L=Array.isArray(R),F=L?[]:{},P=L?S:y;for(const Y in R)if(Object.prototype.hasOwnProperty.call(R,Y)){const z=`${P}${i}${Y}`;b&&!p?F[Y]=this.translate(z,{...s,defaultValue:fr(v)?v[Y]:void 0,joinArrays:!1,ns:l}):F[Y]=this.translate(z,{...s,joinArrays:!1,ns:l}),F[Y]===z&&(F[Y]=R[Y])}p=F}}else if(w&&q(T)&&Array.isArray(p))p=p.join(T),p&&(p=this.extendTranslation(p,e,s,n));else{let L=!1,F=!1;!this.isValidLookup(p)&&b&&(L=!0,p=v),this.isValidLookup(p)||(F=!0,p=o);const Y=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&F?void 0:p,z=b&&v!==p&&this.options.updateMissing;if(F||L||z){if(this.logger.log(z?"updateKey":"missingKey",u,c,o,z?v:p),i){const x=this.resolve(o,{...s,keySeparator:!1});x&&x.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 J=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let x=0;x<W.length;x++)J.push(W[x]);else this.options.saveMissingTo==="all"?J=this.languageUtils.toResolveHierarchy(s.lng||this.language):J.push(s.lng||this.language);const h=(x,j,k)=>{var A;const $=b&&k!==p?k:Y;this.options.missingKeyHandler?this.options.missingKeyHandler(x,c,j,$,z,s):(A=this.backendConnector)!=null&&A.saveMissing&&this.backendConnector.saveMissing(x,c,j,$,z,s),this.emit("missingKey",x,c,j,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?J.forEach(x=>{const j=this.pluralResolver.getSuffixes(x,s);I&&s[`defaultValue${this.options.pluralSeparator}zero`]&&j.indexOf(`${this.options.pluralSeparator}zero`)<0&&j.push(`${this.options.pluralSeparator}zero`),j.forEach(k=>{h([x],o+k,s[`defaultValue${k}`]||v)})}):h(J,o,v))}p=this.extendTranslation(p,e,s,m,n),F&&p===o&&this.options.appendNamespaceToMissingKey&&(p=`${c}${f}${o}`),(F||L)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${f}${o}`:o,L?p:void 0,s))}return a?(m.res=p,m.usedParams=this.getUsedParamsDetails(s),m):p}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 m=e.match(this.interpolator.nestingRegexp);u=m&&m.length}let d=n.replace&&!q(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language||s.usedLng,n),f){const m=e.match(this.interpolator.nestingRegexp),p=m&&m.length;u<p&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...m)=>(a==null?void 0:a[0])===m[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${t[0]}`),null):this.translate(...m,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=Ir.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 d=t.count!==void 0&&!q(t.count),m=d&&!t.ordinal&&t.count===0,p=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(S=>{var E,T;this.isValidLookup(n)||(o=S,!ur[`${y[0]}-${S}`]&&((E=this.utils)!=null&&E.hasLoadedNamespace)&&!((T=this.utils)!=null&&T.hasLoadedNamespace(o))&&(ur[`${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(w=>{var D;if(this.isValidLookup(n))return;i=w;const O=[f];if((D=this.i18nFormat)!=null&&D.addLookupKeys)this.i18nFormat.addLookupKeys(O,f,w,S,t);else{let N;d&&(N=this.pluralResolver.getSuffix(w,t.count,t));const I=`${this.options.pluralSeparator}zero`,v=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(O.push(f+N),t.ordinal&&N.indexOf(v)===0&&O.push(f+N.replace(v,this.options.pluralSeparator)),m&&O.push(f+I)),p){const R=`${f}${this.options.contextSeparator}${t.context}`;O.push(R),d&&(O.push(R+N),t.ordinal&&N.indexOf(v)===0&&O.push(R+N.replace(v,this.options.pluralSeparator)),m&&O.push(R+I))}}let b;for(;b=O.pop();)this.isValidLookup(n)||(a=b,n=this.getResource(w,S,b,t))}))})}),{res:n,usedKey:s,exactUsedKey:a,usedLng:i,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n,s={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,n,s):this.resourceStore.getResource(e,t,n,s)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!q(e.replace);let s=n?e.replace:e;if(n&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const a of t)delete s[a]}return s}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}class dr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=be.create("languageUtils")}getScriptPartFromCode(e){if(e=Ve(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=Ve(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 pr={zero:0,one:1,two:2,few:3,many:4,other:5},hr={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Vn{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=be.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Ve(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!"),hr;if(!e.match(/-|_/))return hr;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)=>pr[s]-pr[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 mr=(r,e,t,n=".",s=!0)=>{let a=In(r,e,t);return!a&&s&&q(t)&&(a=Ot(r,t,n),a===void 0&&(a=Ot(e,t,n))),a},St=r=>r.replace(/\$/g,"$$$$");class Yn{constructor(e={}){var t;this.logger=be.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:s,prefix:a,prefixEscaped:i,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:f,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:m,nestingSuffix:p,nestingSuffixEscaped:y,nestingOptionsSeparator:S,maxReplaces:E,alwaysFormat:T}=e.interpolation;this.escape=t!==void 0?t:kn,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?Ce(a):i||"{{",this.suffix=o?Ce(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?Ce(d):m||Ce("$t("),this.nestingSuffix=p?Ce(p):y||Ce(")"),this.nestingOptionsSeparator=S||",",this.maxReplaces=E||1e3,this.alwaysFormat=T!==void 0?T:!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 m;let a,i,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(p.indexOf(this.formatSeparator)<0){const T=mr(t,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(T,void 0,n,{...s,...t,interpolationkey:p}):T}const y=p.split(this.formatSeparator),S=y.shift().trim(),E=y.join(this.formatSeparator).trim();return this.format(mr(t,l,S,this.options.keySeparator,this.options.ignoreJSONStructure),E,n,{...s,...t,interpolationkey:S})};this.resetRegExp();const f=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,u=((m=s==null?void 0:s.interpolation)==null?void 0:m.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>St(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?St(this.escape(p)):St(p)}].forEach(p=>{for(o=0;a=p.regex.exec(e);){const y=a[1].trim();if(i=c(y),i===void 0)if(typeof f=="function"){const E=f(e,a,s);i=q(E)?E:""}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=ar(i));const S=p.safeValue(i);if(e=e.replace(a[0],S),u?(p.regex.lastIndex+=i.length,p.regex.lastIndex-=a[0].length):p.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let s,a,i;const o=(l,c)=>{const f=this.nestingOptionsSeparator;if(l.indexOf(f)<0)return l;const u=l.split(new RegExp(`${f}[ ]*{`));let d=`{${u[1]}`;l=u[0],d=this.interpolate(d,i);const m=d.match(/'/g),p=d.match(/"/g);(((m==null?void 0:m.length)??0)%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{i=JSON.parse(d),c&&(i={...c,...i})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,y),`${l}${f}${d}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];i={...n},i=i.replace&&!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=ar(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 Un=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}},gr=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(Ve(n),s),e[i]=o),o(t)}},Wn=r=>(e,t,n)=>r(Ve(t),n)(e);class Bn{constructor(e={}){this.logger=be.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?gr: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()]=gr(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}=Un(l);if(this.formats[c]){let d=o;try{const m=((u=s==null?void 0:s.formatParams)==null?void 0:u[s.interpolationkey])||{},p=m.locale||m.lng||s.locale||s.lng||n;d=this.formats[c](o,p,{...f,...s,...m})}catch(m){this.logger.warn(m)}return d}else this.logger.warn(`there was no format function for ${c}`);return o},e)}}const Hn=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Gn extends dt{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=be.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(i=(a=this.backend)==null?void 0:a.init)==null||i.call(a,n,s.backend,s)}queueLoad(e,t,n,s){const a={},i={},o={},l={};return e.forEach(c=>{let f=!0;t.forEach(u=>{const d=`${c}|${u}`;!n.reload&&this.store.hasResourceBundle(c,u)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?i[d]===void 0&&(i[d]=!0):(this.state[d]=1,f=!1,i[d]===void 0&&(i[d]=!0),a[d]===void 0&&(a[d]=!0),l[u]===void 0&&(l[u]=!0)))}),f||(o[c]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){const s=e.split("|"),a=s[0],i=s[1];t&&this.emit("failedLoading",a,i,t),!t&&n&&this.store.addResourceBundle(a,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const o={};this.queue.forEach(l=>{Cn(l.loaded,[a],i),Hn(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,d;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((u=(f=this.services)==null?void 0:f.utils)!=null&&u.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((d=this.backend)!=null&&d.create){const m={...i,isUpdate:a},p=this.backend.create.bind(this.backend);if(p.length<6)try{let y;p.length===5?y=p(e,t,n,s,m):y=p(e,t,n,s),y&&typeof y.then=="function"?y.then(S=>o(null,S)).catch(o):o(null,y)}catch(y){o(y)}else p(e,t,n,s,o,m)}!e||!e[0]||this.store.addResource(e[0],t,n,s)}}}const yr=()=>({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}),br=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},Xe=()=>{},Kn=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class Ye extends dt{constructor(e={},t){if(super(),this.options=br(e),this.services={},this.logger=be,this.modules={external:[]},Kn(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=yr();this.options={...n,...this.options,...br(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?be.init(s(this.modules.logger),this.options):be.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Bn;const f=new dr(this.options);this.store=new cr(this.options.resources,this.options);const u=this.services;u.logger=be,u.resourceStore=this.store,u.languageUtils=f,u.pluralResolver=new Vn(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 Yn(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new Gn(s(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",(d,...m)=>{this.emit(d,...m)}),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 ot(this.services,this.options),this.translator.on("*",(d,...m)=>{this.emit(d,...m)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Xe),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=Me(),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=Xe){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=Me();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=Xe),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"&&Ir.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=Me();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,d=>{a(d,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e),n}getFixedT(e,t,n){const s=(a,i,...o)=>{let l;typeof i!="object"?l=this.options.overloadTranslationOptionHandler([a,i].concat(o)):l={...i},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||s.keyPrefix);const c=this.options.keySeparator||".";let f;return l.keyPrefix&&Array.isArray(a)?f=a.map(u=>`${l.keyPrefix}${c}${u}`):f=l.keyPrefix?`${l.keyPrefix}${c}${a}`:a,this.t(f,l)};return 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=Me();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=Me();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 dr(yr());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new Ye(e,t)}cloneInstance(e={},t=Xe){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new Ye(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 cr(o,s),a.services.resourceStore=a.store}return a.translator=new ot(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 ae=Ye.createInstance();ae.createInstance=Ye.createInstance;ae.createInstance;ae.dir;ae.init;ae.loadResources;ae.reloadResources;ae.use;ae.changeLanguage;ae.getFixedT;ae.t;ae.exists;ae.setDefaultNamespace;ae.hasLoadedNamespace;ae.loadNamespaces;ae.loadLanguages;const qn={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"},zn={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},Jn={CalendarFor:"Calendario per",Close:"Chiudi",SpotlightDefaultPlaceholder:"Esegui Comando",CheckObjectWrongValidation:"Oggetto non valido",ConfirmButton:"Conferma",AutocompleteDefaultPlaceholder:"Inserisci codice o descrizione"},Xn={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:qn,Month:zn,Generic:Jn},Zn={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"},Qn={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},es={CalendarFor:"Calendar for",Close:"Close",SpotlightDefaultPlaceholder:"Execute Command",CheckObjectWrongValidation:"Object not valid",ConfirmButton:"Confirm",AutocompleteDefaultPlaceholder:"Type code or description"},ts={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:Zn,Month:Qn,Generic:es};function vr(r,e){return new RegExp(rs(r),e)}function rs(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const ns=(r,e,t)=>{let n=r;return isNaN(n)||(e!=null&&(n=Math.max(n,e)),t!=null&&(n=Math.min(n,t))),n},ss=(r,e)=>{var i,o;const n=Intl.NumberFormat(r).formatToParts(1000.1),s=((i=n.find(l=>l.type==="group"))==null?void 0:i.value)??",",a=e??((o=n.find(l=>l.type==="decimal"))==null?void 0:o.value)??".";return{groupingChar:s,decimalChar:a}};function as(r,e,t,n){let s=e;const a=ls(r,t);if(!s){const o=Math.abs(a);o-Math.floor(o)?s="0,0.00":s="0,0"}const i=cs(s);return new Intl.NumberFormat(n,i).format(a)}const is=(r,e,t)=>{const n=r.lastIndexOf(t);if(n!==-1)return r.length-n-1;const s=t==="."?",":".",a=r.lastIndexOf(s);return a!==-1&&!(s===e&&r.length-a-1===3)?r.length-a-1:0},os=(r,e,t)=>{if(!r)return NaN;let n=r.replace(/\s/g,""),s=t;const a=(n.match(/\./g)||[]).length,i=(n.match(/,/g)||[]).length;if(a&&i)s=n.lastIndexOf(".")>n.lastIndexOf(",")?".":",";else if(!n.includes(t)){const l=n.includes(".")?".":",",c=l==="."?a:i;c>1||c===1&&l===e&&n.length-n.lastIndexOf(l)-1===3||(s=l)}const o=s==="."?",":".";return n=n.replace(new RegExp(`\\${o}`,"g"),""),s!=="."&&(n=n.replace(new RegExp(`\\${s}`,"g"),".")),parseFloat(n)};function ls(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(vr(l,"g"),""),a=a.replace(vr(o,"g"),"."),a=Number(a)}const i=Number(a);return isNaN(i)?NaN:i}function cs(r){const e={};r.includes(",")?e.useGrouping=!0:e.useGrouping=!1;const t=r.indexOf(".");if(t>-1){const s=(r.substring(t+1).match(/0/g)||[]).length;e.minimumFractionDigits=s,e.maximumFractionDigits=s}else e.minimumFractionDigits=0,e.maximumFractionDigits=0;return e}ae.init({lng:typeof navigator<"u"&&navigator.language.split("-")[0]||"en",fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(r,e,t,n)=>{const s=(n==null?void 0:n.type)??"number";try{switch(s){case"date":{const a=r instanceof Date?r:new Date(r);return new Intl.DateTimeFormat(t,{dateStyle:e||"short"}).format(a)}default:case"number":{const a=(n==null?void 0:n.inputIsLocalized)??!1;return as(r,e,a,t)}}}catch{return r}}},resources:{en:{translation:ts},it:{translation:Xn}}});const us=(r,e,t,n)=>ae.format(r,e,t||ae.language,n),fs=(r,e)=>ae.t(r,e);function je(){const r=_.useCallback((n,s,a,i)=>us(n,s,a||void 0,i),[]),e=_.useCallback(()=>ae.languages[0],[]),t=_.useCallback((n,s)=>fs(n,s),[]);return{format:r,getCurrentLanguage:e,translate:t}}var Te=(r=>(r.CALENDAR_FOR="Date.CalendarFor",r.CLOSE="Generic.Close",r.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",r.CHECK_OBJECT_WRONG_VALIDATION="Generic.CheckObjectWrongValidation",r.CONFIRM_BUTTON="Generic.ConfirmButton",r.AUTOCOMPLETE_DEFAULT_PLACEHOLDER="Generic.AutocompleteDefaultPlaceholder",r))(Te||{}),le=(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))(le||{}),ue=(r=>(r.JANUARY="Month.January",r.FEBRUARY="Month.February",r.MARCH="Month.March",r.APRIL="Month.April",r.MAY="Month.May",r.JUNE="Month.June",r.JULY="Month.July",r.AUGUST="Month.August",r.SEPTEMBER="Month.September",r.OCTOBER="Month.October",r.NOVEMBER="Month.November",r.DECEMBER="Month.December",r))(ue||{}),_t=(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))(_t||{});const Ct=({bindValue:r,optionalDisplayValue:e,options:t,displayMode:n,listDisplayMode:s="Both",minimumChars:a=3,isEditable:i=!0,fun:o,_changeOnEnter:l=!1,onChange:c,onOptionsRequest:f,_multiActiveIndex:u,...d})=>{const m=_.useRef(null),[p,y]=_.useState(r),[S,E]=_.useState(e),{translate:T}=je(),[w,O]=_.useState(!1),[b,D]=_.useState(t||[]),[N,I]=_.useState(0),[v,R]=_.useState([r]),{anchorRef:M,targetRef:C,anchorWidth:L}=ct({position:"bottom",enabled:w}),F=_.useCallback(()=>{var h;O(!1),(h=m==null?void 0:m.current)==null||h.focus()},[]);ft([C],w,()=>F());const P=Dn(400),Y=h=>{h.length>=a?o&&f&&P(async()=>{const x=await f(o,h);D(x),I(x.length>0?0:-1),O(!0)}):F(),y(h),E(e),l||c==null||c(h,e)},z=h=>{l?(y(""),E("")):(y(h.id),E(h.label)),c==null||c(h.id,h.label);const x=b.findIndex(j=>j.id===h.id);I(x),R([h.id]),F()},J=h=>{h.key==="Escape"&&(F(),I(-1))},W=h=>{if((h.key==="ArrowDown"||h.key==="ArrowUp")&&(h.preventDefault(),w)){const x=h.key==="ArrowDown"?(N+1)%b.length:(N-1+b.length)%b.length;I(x)}switch(h.key){case"Enter":N>=0&&N<b.length?z(b[N]):l&&(c==null||c(p,""),F(),y(""),E(""));break;case"Escape":F(),I(-1);break}};return g.jsxs("div",{"data-component":"autocomplete",children:[g.jsx($t,{...d,bindValue:p,optionalDisplayValue:S,displayMode:n,isEditable:i,shapeIcon:"magnify",placeholder:T(Te.AUTOCOMPLETE_DEFAULT_PLACEHOLDER),ref:M,inputRef:m,onChange:Y,onKeyDown:W,"aria-autocomplete":"list"}),w&&g.jsx(ut,{children:g.jsx($r,{options:b,displayMode:s,onClick:z,ref:C,selectedIndex:N,activeIndex:u||v,width:L,showFilter:!1,onKeyDown:J,isOpen:w})})]})},Lr=({options:r,fun:e,direction:t="row",disposition:n="start",sizing:s,variant:a,appearance:i,showText:o,showIcon:l,fullWidth:c,disabled:f,justify:u,squared:d,onClick:m,onOptionsRequest:p})=>{const[y,S]=_.useState(r);_.useEffect(()=>{!y&&p&&e&&p(e,void 0).then(w=>S(w)).catch(w=>{console.error("Errore nel caricamento delle opzioni per ButtonList",w)})},[y,e,p]);const E={container:`smp-button-list smp-button-list-${t} smp-justifyContent-${n}`},T=y==null?void 0:y.map((w,O)=>{const b={bindValue:w.id,optionalDisplayValue:w.label,fun:w.fun,icon:w.icon,variant:a,appearance:i,showText:o,showIcon:l,fullWidth:c,disabled:f,sizing:s,justify:u,squared:d,onClick:()=>{m==null||m(w.id,w.fun)}};return g.jsx(Se,{...b},`button-${O}`)});return g.jsx("div",{role:"list","data-component":"button-list",className:E.container,children:T})},ds={"smp-checkbox-wrapper":"_smp-checkbox-wrapper_z14lq_2"},kr=({bindValue:r,_dataComponent:e="checkbox",disabled:t,label:n,isEditable:s=!0,onChange:a,onBlur:i,variant:o="checkbox"})=>{const l=_.useId(),c=u=>{s&&a&&a(u.target.checked)},f={wrapper:`${ds["smp-checkbox-wrapper"]}`};return g.jsxs("div",{className:f.wrapper,"data-component":e,children:[n&&g.jsx(De,{label:n,disabled:t,htmlFor:l}),g.jsx("input",{"data-component":"checkbox",type:"checkbox",checked:r,onChange:c,onBlur:i,role:o==="switch"?"switch":"checkbox",id:l})]})},It=({elements:r,isEditable:e=!1,displayMode:t="Both",onChange:n,color:s,backgroundColor:a,isDraggable:i=!1})=>{const[o,l]=_.useState(null),c={container:`${["smp-chips-container"]}`,element:"smp-chips-element"},f=m=>{n==null||n(r.filter((p,y)=>y!==m))},u=m=>{l(m)},d=m=>{if(o===null||o===m)return;const p=[...r],[y]=p.splice(o,1);p.splice(m,0,y),n==null||n(p),l(null)};return g.jsx("div",{className:c.container,role:"list","data-component":"chip",children:r.flatMap((m,p)=>{const y=Pe(m.bindValue,m.optionalDisplayValue,t),S=g.jsxs("div",{className:c.element,role:"listitem",draggable:i,onDragStart:()=>u(p),onDragOver:T=>i&&T.preventDefault(),onDrop:()=>i&&d(p),style:{"--smp-chips-backgroundColor-base":a},children:[i&&g.jsx(oe,{icon:"drag_indicator_horizontal",isInteractable:!0}),g.jsx(_e,{variant:"label",bindValue:y,color:s}),e&&g.jsx(oe,{icon:"close",isInteractable:!0,onClick:()=>f(p),color:s})]},`chip-${p}`),E=i&&p<r.length-1?g.jsx(oe,{icon:"chevron-right",color:s},`separator-${p}`):null;return[S,E].filter(Boolean)})})};function Lt(r,e){const t=_.useRef(null);_.useEffect(()=>{if(!r)return;const n=typeof e=="object"&&e!==null&&"current"in e?e.current:null;if(!n)return;t.current=document.activeElement;const s=()=>n?Array.from(n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null):[];(()=>{const c=s();c.length>0&&requestAnimationFrame(()=>c[0].focus())})();const i=c=>{if(c.key==="Escape"||c.key!=="Tab")return;const f=s();if(f.length===0)return;const u=f[0],d=f[f.length-1];c.shiftKey&&document.activeElement===u?(c.preventDefault(),d.focus()):!c.shiftKey&&document.activeElement===d&&(c.preventDefault(),u.focus())},o=c=>{if(n&&!n.contains(c.target)){c.preventDefault();const f=s();f.length>0&&f[0].focus()}};document.addEventListener("keydown",i),document.addEventListener("mousedown",o);const l=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.removeEventListener("mousedown",o),document.body.style.overflow=l,t.current&&requestAnimationFrame(()=>{var c;(c=t.current)==null||c.focus()})}},[r,e])}const Pr=({bindValue:r,onChange:e,options:t=[],optionalDisplayValue:n,isEditable:s,displayMode:a,listDisplayMode:i="Both",fun:o,onOptionsRequest:l,multiActiveIndex:c,...f})=>{const u=_.useRef(null),[d,m]=_.useState(!1),[p,y]=_.useState(t),[S,E]=_.useState(-1),[T,w]=_.useState([r]),O=_.useId(),{anchorRef:b,targetRef:D,anchorWidth:N}=ct({position:"bottom",enabled:d}),I=_.useCallback(()=>{var L;m(!1),(L=u==null?void 0:u.current)==null||L.focus()},[]);ft([D,b],d,()=>I()),Lt(d,D);const v=L=>{e==null||e(L.id,L.label);const F=p.findIndex(P=>P.id===L.id);E(F),w([L.id]),I()},R=L=>{L.key==="Escape"&&(I(),E(-1))},M=L=>{(L.key==="ArrowDown"||L.key==="ArrowUp")&&(L.preventDefault(),C())},C=()=>{s&&(o&&l?d?m(!1):l(o,void 0).then(L=>{y(L),E(L.length>0?0:-1),m(!0)}):m(L=>!L))};return g.jsxs("div",{role:"combobox","aria-expanded":d,"aria-controls":O,"aria-owns":O,"data-component":"combobox",children:[g.jsx($t,{...f,bindValue:r,optionalDisplayValue:n,displayMode:a,onShapeIconClick:C,onKeyDown:M,onClick:C,shapeIcon:"arrow_drop_down",rotatedShapeIcon:d,isEditable:s,ref:b,inputRef:u,"aria-autocomplete":"list",variant:"notSelectable"}),d&&g.jsx(ut,{children:g.jsx($r,{id:O,options:p,displayMode:i,ref:D,isOpen:d,selectedIndex:S,activeIndex:c||T,width:N,onClick:v,onKeyDown:R})})]})},ps={"smp-datepickercalendar-position":"_smp-datepickercalendar-position_1lf9g_1"};function hs({selectedDate:r,onDateChange:e,disabledDateRanges:t=[],initialValue:n,targetRef:s}){const{translate:a}=je(),i=()=>{if(!n)return;const W=new Date(n);return isNaN(W.getTime())?void 0:W},[o]=_.useState(new Date),[l,c]=_.useState(r||i()||new Date),[f,u]=_.useState(l?l.getMonth():new Date().getMonth()),[d,m]=_.useState(l?l.getFullYear():new Date().getFullYear()),[p,y]=_.useState(l?l.getDate():null),S=_.useRef(null),E=_.useRef([]),T=[a(ue.JANUARY),a(ue.FEBRUARY),a(ue.MARCH),a(ue.APRIL),a(ue.MAY),a(ue.JUNE),a(ue.JULY),a(ue.AUGUST),a(ue.SEPTEMBER),a(ue.OCTOBER),a(ue.NOVEMBER),a(ue.DECEMBER)],w=[{value:a(le.SUNDAY_SHORT),full:a(le.SUNDAY)},{value:a(le.MONDAY_SHORT),full:a(le.MONDAY)},{value:a(le.TUESDAY_SHORT),full:a(le.TUESDAY)},{value:a(le.WEDNESDAY_SHORT),full:a(le.WEDNESDAY)},{value:a(le.THURSDAY_SHORT),full:a(le.THURSDAY)},{value:a(le.FRIDAY_SHORT),full:a(le.FRIDAY)},{value:a(le.SATURDAY_SHORT),full:a(le.SATURDAY)}],O=W=>t.some(h=>{const x=h.start.getTime(),j=h.end.getTime(),k=W.getTime();return k>=x&&k<=j}),b=W=>{O(W)||(c(W),y(W.getDate()),e&&e(On(W)))},D=()=>{f===0?(u(11),m(d-1)):u(f-1),y(1)},N=()=>{f===11?(u(0),m(d+1)):u(f+1),y(1)},I=(W,h)=>new Date(W,h+1,0).getDate(),v=(W,h)=>new Date(W,h,1).getDay(),R=W=>{var x;const h=F.findIndex(j=>j!==null&&j.getDate()===W);h!==-1&&E.current[h]&&((x=E.current[h])==null||x.focus(),y(W))},M=(W,h)=>{const x=F[h];if(!x)return;const j=I(d,f),k=x.getDate();switch(W.key){case"ArrowRight":W.preventDefault();{let $=k+1,A=new Date(d,f,$);if($>j){const U=f===11?d+1:d,H=f===11?0:f+1;$=1,A=new Date(U,H,$),N(),setTimeout(()=>{C(1,"forward")},0);return}O(A)?C($,"forward"):R($)}break;case"Tab":break;case"ArrowLeft":W.preventDefault();{let $=k-1,A=new Date(d,f,$);if($<1){const U=f===0?d-1:d,H=f===0?11:f-1,B=I(U,H);$=B,A=new Date(U,H,$),D(),setTimeout(()=>{C(B,"backward")},0);return}O(A)?C($,"backward"):R($)}break;case"ArrowUp":W.preventDefault();{let $=k-7,A=new Date(d,f,$);if($<1){const U=f===0?d-1:d,H=f===0?11:f-1;$=I(U,H)+$,A=new Date(U,H,$),D(),setTimeout(()=>{C($,"backward")},0);return}O(A)?C($,"backward"):R($)}break;case"ArrowDown":W.preventDefault();{let $=k+7,A=new Date(d,f,$);if($>j){const U=f===11?d+1:d,H=f===11?0:f+1;$=$-j,A=new Date(U,H,$),N(),setTimeout(()=>{C($,"forward")},0);return}O(A)?C($,"forward"):R($)}break;case"Home":W.preventDefault(),C(1,"forward");break;case"End":W.preventDefault(),C(j,"backward");break;case"PageUp":W.preventDefault(),D(),setTimeout(()=>{const $=I(f===0?d-1:d,f===0?11:f-1),A=Math.min(k,$);C(A,"forward")},0);break;case"PageDown":W.preventDefault(),N(),setTimeout(()=>{const $=I(f===11?d+1:d,f===11?0:f+1),A=Math.min(k,$);C(A,"forward")},0);break;case" ":case"Space":if(O(x))return;y(x.getDate()),c(x);break;case"Enter":W.preventDefault(),b(x);break}},C=(W,h)=>{const x=I(d,f);if(h==="forward"){for(let j=W;j<=x;j++){const k=new Date(d,f,j);if(!O(k)){R(j);return}}N(),setTimeout(()=>{C(1,"forward")},0)}else{for(let A=W;A>=1;A--){const U=new Date(d,f,A);if(!O(U)){R(A);return}}const j=f===0?d-1:d,k=f===0?11:f-1,$=I(j,k);D(),setTimeout(()=>{C($,"backward")},0)}},F=(()=>{const W=I(d,f),h=v(d,f),x=[];for(let j=0;j<h;j++)x.push(null);for(let j=1;j<=W;j++){const k=new Date(d,f,j);x.push(k)}return x})(),P=[];let Y=[];F.forEach((W,h)=>{if(Y.push(W),Y.length===7||h===F.length-1){for(;Y.length<7;)Y.push(null);P.push(Y),Y=[]}}),_.useEffect(()=>{var W;if(p!==null){const h=F.findIndex(x=>x!==null&&x.getDate()===p);h!==-1&&E.current[h]&&((W=E.current[h])==null||W.focus())}},[f,d,p,F]);const z={label:"smp-datepickercalendar-label",wrapper:`smp-datepickercalendar ${ps["smp-datepickercalendar-position"]}`,calendar:"smp-datepickercalendar",table:"smp-datepickercalendar-table",th:"smp-datepickercalendar-th",td:(W,h,x,j)=>`smp-datepickercalendar-td
46
+ ${W?"smp-datepickercalendar-td-today":""}
47
47
  ${h?"smp-datepickercalendar-td-selected":""}
48
48
  ${x?"smp-datepickercalendar-td-focused":""}
49
- ${j?"smp-datepickercalendar-td-disabled":""}`},J=()=>`${T[f]} ${p.toString()}`;return g.jsxs("div",{className:K.wrapper,ref:s,role:"dialog",tabIndex:-1,"aria-modal":"true","data-component":"datepicker-calendar",children:[g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[g.jsx(Se,{onClick:D,ariaLabel:a(_t.PREVIOUS_MONTH),optionalDisplayValue:"<",appearance:"ghost",variant:"base",bindValue:"<"}),g.jsx("div",{"aria-label":J(),className:K.label,children:J()}),g.jsx(Se,{onClick:N,ariaLabel:a(_t.NEXT_MONTH),bindValue:">",optionalDisplayValue:">",appearance:"ghost",variant:"base"})]}),g.jsxs("table",{ref:S,role:"grid","aria-label":`${a(Te.CALENDAR_FOR)} ${T[f]} ${p}`,className:K.table,children:[g.jsx("thead",{children:g.jsx("tr",{children:w.map(U=>g.jsx("th",{scope:"col",abbr:U.full,className:K.th,children:U.value},U.value))})}),g.jsx("tbody",{children:A.map((U,h)=>g.jsx("tr",{children:U.map((x,j)=>{const I=h*7+j;if(x===null)return g.jsx("td",{className:K.td(!1,!1,!1,!0)},`empty-${j}`);const $=x.getDate()===o.getDate()&&x.getMonth()===o.getMonth()&&x.getFullYear()===o.getFullYear(),k=l&&x.getDate()===l.getDate()&&x.getMonth()===l.getMonth()&&x.getFullYear()===l.getFullYear(),B=d===x.getDate(),H=O(x);return g.jsx("td",{role:"gridcell","aria-selected":k,tabIndex:B?0:-1,onClick:()=>b(x),onKeyDown:W=>M(W,I),"aria-label":`${x.getDate()} ${T[x.getMonth()]} ${x.getFullYear()}`,"data-selected":k,"aria-disabled":H,ref:W=>{E.current[I]=W},className:K.td($,k,B,H),children:x.getDate()},`day-${j}`)})},`week-${h}`))})]})]})}const Ar=({bindValue:r,placeholder:e,onChange:t,disabledDateRanges:n,isEditable:s=!0,...a})=>{const i=_.useRef(null),[o,l]=_.useState(!1),[c,f]=_.useState(r||""),[u,p]=_.useState(""),{anchorRef:m,targetRef:d}=ct({position:"bottom",enabled:o}),y=_.useCallback(()=>{var v;l(!1),(v=i==null?void 0:i.current)==null||v.focus()},[]);ft(d,o,()=>{y()}),It(o,d);const{format:S,getCurrentLanguage:E}=je(),T=_.useCallback(v=>{const R=v.length>5&&wn(v,E())||v,M=S(R,void 0,void 0,{type:"date"}),C=typeof R!="string",P=C&&R.toISOString().substring(0,10)||"";return{isValid:C,formattedDate:M,isoDate:P,normalizedDate:R}},[E,S]);_.useEffect(()=>{const{formattedDate:v,isoDate:R,isValid:M}=T(r);f(M&&R||r),p(M&&v||r)},[r,S,T]);const w=()=>l(v=>!v),O=()=>{D(u)},b=v=>{D(v),y()},D=v=>{const{isoDate:R,isValid:M}=T(v);t&&t(M&&R||v)},N=v=>{p(v)},L=v=>{v.key==="Enter"&&(v.preventDefault(),D(u))};return g.jsxs("div",{"data-component":"date-picker",children:[g.jsx(we,{...a,bindValue:u,placeholder:e,onBlur:O,onChange:N,onKeyDown:L,shapeIcon:"calendar",onShapeIconClick:w,ref:m,inputRef:i,isEditable:s,size:10,maxLength:a.maxLength?a.maxLength:10}),o&&g.jsx(ut,{children:g.jsx(hs,{disabledDateRanges:n,onDateChange:b,initialValue:jt(c)&&c||"",targetRef:d})})]})},ms=({elements:r,displayMode:e,minimumChars:t,listDisplayMode:n,isEditable:s=!0,placeholder:a,label:i,disabled:o,fun:l,error:c,onOptionsRequest:f,onChange:u,onBlur:p})=>{const m=r.map(S=>S.bindValue),d=(S,E)=>{const T=[...r];if(S=="")T.pop();else{const w=T.findIndex(O=>O.bindValue===S&&O.optionalDisplayValue===E);w>=0?T.splice(w,1):T.push({bindValue:S,optionalDisplayValue:E})}u==null||u(T)},y={container:"smp-multipleAutocomplete-container"};return g.jsxs("div",{className:y.container,"data-component":"multiple-autocomplete",children:[i&&g.jsx(De,{label:i,disabled:o}),g.jsx(Lt,{elements:r,displayMode:e,isEditable:s,onChange:S=>{u==null||u(S)}}),g.jsx(Ct,{bindValue:"",fun:l,isEditable:s,onChange:d,_changeOnEnter:!0,listDisplayMode:n,minimumChars:t,placeholder:a,onOptionsRequest:f,_multiActiveIndex:m,error:c,onBlur:p})]})},Nr=({...r})=>{const[e,t]=_.useState(!1),n=e?"visibility-off":"visibility";return g.jsx(we,{...r,inputType:e?"text":"password",shapeIcon:n,onShapeIconClick:()=>t(!e),ariaLabel:"password","data-component":"password"})},gs=({...r})=>{const[e,t]=_.useState(r.bindValue),{translate:n}=je(),s=a=>{var i;a.key==="Enter"&&(a.preventDefault(),(i=r.onEnter)==null||i.call(r,e))};return g.jsx(we,{...r,placeholder:r.placeholder?r.placeholder:n(Te.SPOTLIGHT_DEFAULT_PLACEHOLDER),icon:"magnify",inputType:"search",bindValue:e,onChange:t,onKeyDown:s,ariaLabel:"search bar",_dataComponent:"search-bar"})},ys=({bindValue:r,optionalDisplayValue:e,label:t})=>{const n={wrapper:"smp-text-wrapper"};return t?g.jsxs("div",{className:n.wrapper,children:[g.jsx(De,{label:t}),g.jsx(_e,{variant:"body",bindValue:e||r})]}):g.jsx(_e,{variant:"body",bindValue:e||r})};class Re{constructor(e,t){de(this,"class");de(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new Re(e,e.k==""?[]:e.k.split(";"))}static fromString(e){return new Re({t:"",p:""},e.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const Ie=(r,e,t)=>({obj:{t:r.obj.t,p:r.obj.p,k:e},decode:t??r.decode,shape:r.shape,fun:r.fun}),xr=r=>{const e=Re.fromDataObj(r.obj),t=r.decode?Re.fromString(r.decode).getValue():[];return e.getValue().map((n,s)=>({bindValue:n,optionalDisplayValue:t.length>=s?t[s]:""}))},bs=(r,e)=>{const t=new Re(r.obj,e.map(s=>s.bindValue)).getLegacyValue(),n=new Re(r.obj,e.map(s=>s.optionalDisplayValue?s.optionalDisplayValue:"")).getLegacyValue();return Ie(r,t,n)},vs=({min:r,max:e,step:t=1,inputMode:n="decimal",dSep:s,bindValue:a,onChange:i,onEnter:o,...l})=>{const{getCurrentLanguage:c}=je(),f=_.useRef(null),u=c(),{groupingChar:p,decimalChar:m}=_.useMemo(()=>ss(u,s),[u,s]),d=_.useCallback((C,P)=>new Intl.NumberFormat(u,{minimumFractionDigits:P,maximumFractionDigits:P,useGrouping:!0}).format(C),[u]),y=_.useCallback(os,[p,m]),S=_.useCallback(ns,[r,e]),E=a!=null&&a.toString().includes(".")?a.toString().split(".")[1].length:0,[T,w]=_.useState(E),[O,b]=_.useState(a!=null?d(a,T):""),D=_.useRef(a??null);_.useEffect(()=>{if(a==null){b(""),D.current=null;return}const C=a.toString().includes(".")?a.toString().split(".")[1].length:0,P=C===0?T:C;P!==T&&w(P),b(d(a,P)),D.current=a},[a,d]);const N=_.useCallback((C,P=!1)=>{if(C.trim()===""){b(""),D.current=null,i==null||i(void 0,""),P&&(o==null||o(void 0));return}const V=y(C,p,m);if(isNaN(V))if(D.current!=null){const A=d(D.current,T);b(A)}else b("");else{const A=S(V,r,e),Y=is(C,p,m);w(Y);const K=d(A,Y);b(K),D.current=A,i==null||i(A,K),P&&(o==null||o(A))}},[y,p,m,S,r,e,d,i,o,T]),L=C=>b(C),v=()=>N(O),R=C=>{if(C.key==="Enter"){C.preventDefault(),N(O,!0);return}if(C.key==="ArrowUp"||C.key==="ArrowDown"){C.preventDefault();const P=C.key==="ArrowUp"?1:-1,V=D.current??0,A=S(V+P*t,r,e);N(d(A,T))}},M=C=>{if(!C.currentTarget.contains(document.activeElement))return;C.preventDefault();const P=C.deltaY<0?1:-1,V=D.current??0,A=S(V+P*t,r,e);N(d(A,T))};return g.jsx("div",{ref:f,"data-component":"input-number",onWheel:M,children:g.jsx(we,{...l,"aria-valuemin":r,"aria-valuemax":e,"aria-valuenow":D.current??void 0,bindValue:O,inputType:"text",inputMode:n,min:r,max:e,step:t,onChange:L,onBlur:v,onKeyDown:R})})};class Ue{constructor(e,t,n="."){de(this,"class");de(this,"value");de(this,"decimalSeparator");this.class=e,this.value=t,this.decimalSeparator=n}static fromDataObj(e,t){const n=t==="."?",":".";if(e.k=="")return new Ue(e,void 0,t);const s=e.k.replace(new RegExp(`\\${n}`,"g"),""),a=parseFloat(s.replace(t,"."));return new Ue(e,a,t)}getLegacyValue(){return this.value!=null?this.value.toString().replace(".",this.decimalSeparator):""}getValue(){return this.value}}const xs=({disabled:r,bindValue:e,onChange:t,placeholder:n,state:s,appearance:a,isEditable:i,label:o,ariaLabel:l,helperText:c,error:f,onBlur:u,onKeyDown:p,rows:m=10,cols:d=150})=>{const y=_.useId(),S=`${y}-helper`,E=f?"danger":s,T=c||!!f,w=b=>{t==null||t(b.target.value)},O={wrapper:"smp-textarea-wrapper",container:`smp-textarea ${r?"smp-textarea-disabled":""} ${n?"smp-textarea-placeholder":""} ${E?`smp-textarea-${E}`:""} ${a?`smp-textarea-${a}`:""} ${i?"":"smp-textarea-readOnly"}`};return g.jsxs("div",{className:O.wrapper,"data-component":"textarea",children:[o&&g.jsx(De,{htmlFor:y,label:o,disabled:r}),g.jsx("textarea",{id:y,value:e,placeholder:n,onChange:w,onBlur:u,className:O.container,disabled:r,readOnly:!i,onKeyDown:p,"aria-label":o?void 0:l,"aria-labelledby":o?y:void 0,"aria-describedby":T?S:void 0,rows:m,cols:d}),T&&g.jsx(Dr,{id:S,helperText:f,disabled:r,state:E})]})};var Rt=(r=>(r.PAGE_DIRECTION="pageDirection",r.LINE_DIRECTION="lineDirection",r))(Rt||{});const Ze={"smp-radio":"_smp-radio_1vo2u_1","smp-radio-horizontal":"_smp-radio-horizontal_1vo2u_10","smp-radio-element":"_smp-radio-element_1vo2u_14","smp-radio-disabled":"_smp-radio-disabled_1vo2u_20"},Ss=({disabled:r=!1,displayMode:e="DescOnly",RadLay:t=Rt.PAGE_DIRECTION,options:n,onOptionsRequest:s,fun:a,label:i,...o})=>{const[l,c]=_.useState(n),f=_.useId();_.useEffect(()=>{!l&&s&&a&&s(a,void 0).then(y=>c(y)).catch(y=>{console.error("Error during loading options (radio)",y)})},[l,s,a]);const u={container:`${Ze["smp-radio"]} ${t==Rt.LINE_DIRECTION?Ze["smp-radio-horizontal"]:""}`,option:`${Ze["smp-radio-element"]} ${r?Ze["smp-radio-disabled"]:""}`},p=()=>{var y;r||(y=o.onBlur)==null||y.call(o)},m=y=>{var S;r||(S=o.onChange)==null||S.call(o,y.id,y.label)},d=_.useId();return g.jsxs("div",{"smp-id":"radio-container",className:u.container,id:f,children:[i&&g.jsx(De,{label:i,disabled:r,htmlFor:f}),l==null?void 0:l.map((y,S)=>g.jsxs("label",{className:u.option,children:[g.jsx("input",{type:"radio",name:d,value:y.id,disabled:r,checked:y.id===o.bindValue,onChange:()=>m(y),onBlur:p}),g.jsx(_e,{variant:"body",bindValue:ke(y.id,y.label,e)})]},S))]})},ws=({value:r,onChange:e,targetRef:t,isOpen:n})=>{const s=_.useRef(null);_.useEffect(()=>{n&&(s!=null&&s.current)&&s.current.focus()},[n,s]);const[a,i,o]=r,l=c=>Array.from({length:c},(f,u)=>g.jsx("option",{value:u,children:u.toString().padStart(2,"0")},u));return g.jsxs("div",{className:"smp-timepicker-widget",ref:t,children:[g.jsx("select",{value:a,ref:s,onChange:c=>e(+c.target.value,i,o),id:"time-picker-hours",children:l(24)}),":",g.jsx("select",{value:i,onChange:c=>e(a,+c.target.value,o),id:"time-picker-minutes",children:l(60)}),":",g.jsx("select",{value:o||0,onChange:c=>e(a,i,+c.target.value),id:"time-picker-seconds",children:l(60)})]})},Sr=r=>{const e=r.match(/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/);if(!e)return!1;const[,t,n,s]=e,a=parseInt(t,10),i=parseInt(n,10),o=s?parseInt(s,10):0;return a>=0&&a<=23&&i>=0&&i<=59&&(s===void 0||o>=0&&o<=59)},Es=r=>{const e=r.split(":").map(t=>parseInt(t,10));return[e[0]||0,e[1]||0,e[2]||0]},Ts=(r,e,t)=>{const n=r!=null&&!isNaN(r)?r.toString().padStart(2,"0"):"",s=e!=null&&!isNaN(e)?e.toString().padStart(2,"0"):"",a=t!=null&&!isNaN(t)?t.toString().padStart(2,"0"):"";return n&&s?`${n}:${s}:${a}`:s?`${s}:${a}`:a},Os=({bindValue:r,placeholder:e="HH:MM:SS",onChange:t,isEditable:n=!0,...s})=>{const a=_.useRef(null),[i,o]=_.useState(!1),[l,c]=_.useState(r||""),[f,u]=_.useState(""),{anchorRef:p,targetRef:m}=ct({position:"bottom",enabled:i}),d=_.useCallback(()=>{var b;o(!1),(b=a==null?void 0:a.current)==null||b.focus()},[]);ft(m,i,()=>o(!1)),It(i,m),_.useEffect(()=>{const b=r||"",D=Sr(b)?b:r||"";c(b),u(D)},[r]),_.useEffect(()=>{const b=D=>{D.key==="Escape"&&o(!1)};return i&&document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[i]);const y=()=>{n&&o(b=>!b)},S=b=>{u(b)},E=(b,D,N)=>{const L=Ts(b,D,N);c(L),u(L),t==null||t(L),d()},T=()=>{O(f)},w=b=>{b.key==="Enter"&&(b.preventDefault(),O(f))},O=b=>{if(b.trim()===""){c(""),u(""),t==null||t("");return}Sr(b)?(c(b),u(b),t==null||t(b)):u(b)};return g.jsxs("div",{"data-component":"time-picker",children:[g.jsx($t,{...s,bindValue:f,placeholder:e,onChange:S,onBlur:T,onKeyDown:w,shapeIcon:"clock",onShapeIconClick:y,isEditable:n,ref:p,inputRef:a}),i&&g.jsx(ut,{children:g.jsx(ws,{value:Es(l),onChange:E,targetRef:m,isOpen:i})})]})};function _s(r){return typeof r=="string"&&/^\d{6}$/.test(r)}class lt{constructor(e,t){de(this,"class");de(this,"time");this.class=e,this.time=t}static fromDataObj(e){const t=wr.get(`${e.t}${e.p}`);if(t)return new lt(e,t.legacyToIso(e.k));throw new Error(`time creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=wr.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.time);throw new Error(`Time object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.time}}const wr=new Map([["I12",{legacyToIso(r){return _s(r)&&`${r.substring(0,2)}:${r.substring(2,4)}:${r.substring(4,6)}`||r},isoToLegacy(r){return r.replaceAll(":","")||r}}]]),Rs={"smp-cell-wrapper":"_smp-cell-wrapper_mdlkz_1"},Oe=({decode:r,shape:e,obj:t,data:n,icon:s,fun:a,placeholderIcon:i,label:o,tooltip:l,options:c,onChange:f,onClick:u,onEnter:p,onBlur:m,onOptionsRequest:d,onContextMenu:y,isEditable:S})=>{const E={obj:t,shape:e,decode:r,icon:s,fun:a},T={onBlur:m,onOptionsRequest:d,fun:a,icon:s,tooltip:l,label:o,isEditable:S,...n},w=(v,R,M)=>vn(t)?Ie(v,new st(t,R).getLegacyValue()):xn(t)?Ie(v,new lt(t,R).getLegacyValue()):Ie(v,R,M),O=(v,R)=>Ie(v,new Ue(t,R,".").getLegacyValue()),b=v=>Ie(E,new nt(t,v).getLegacyValue()),D=v=>bs(E,v),N=()=>{switch(e){case te.AUTOCOMPLETE:{const v={...T,bindValue:t.k,optionalDisplayValue:r,onChange:(R,M)=>{f==null||f(w(E,R,M))}};return g.jsx(Ct,{...v})}case te.BUTTON:{const v={...T,bindValue:t.k,optionalDisplayValue:n!=null&&n.label&&typeof n.label=="string"?n.label:void 0,title:r,onClick:()=>{u==null||u(w(E,t.k))}};return g.jsx(Se,{...v})}case te.BUTTON_LIST:{const v={...T,options:c,onClick:(R,M)=>{const C={...E,fun:M};u==null||u(w(C,R))}};return g.jsx(Ir,{...v})}case te.CHIP:{const v={...T,elements:xr(E)};return g.jsx(Lt,{...v})}case te.CHECKBOX:case te.SWITCH:{const v=e===te.SWITCH,R={...T,bindValue:nt.fromDataObj(t).getValue(),optionalDisplayValue:r,onChange:M=>{f==null||f(b(M))},...v&&{variant:"switch"}};return g.jsx(Pr,{...R})}case te.COMBOBOX:{const v={...T,bindValue:t.k,optionalDisplayValue:r,onChange:(R,M)=>{f==null||f(w(E,R,M))}};return g.jsx(kr,{...v})}case te.DATE:{const v={...T,bindValue:st.fromDataObj(t).getValue(),onChange:R=>{f==null||f(w(E,R))}};return g.jsx(Ar,{...v})}case te.ICON:case te.IMAGE:{const v={...T,icon:s,placeholderIcon:i,isInteractable:!!T.fun,onClick:()=>{u==null||u(w(E,t.k))}};return g.jsx(oe,{...v})}case te.INPUT_NUMBER:{const v={...T,bindValue:Ue.fromDataObj(t,".").getValue(),onChange:R=>{f==null||f(O(E,R))}};return g.jsx(vs,{...v})}case te.MEMO:{const v={...T,bindValue:t.k,optionalDisplayValue:r,onChange:R=>{f==null||f(w(E,R))}};return g.jsx(xs,{...v})}case te.MULTI_AUTOCOMPLETE:{const v={...T,elements:xr(E),onChange:R=>{f==null||f(D(R))}};return g.jsx(ms,{...v})}case te.PASSWORD:{const v={...T,bindValue:t.k,onChange:R=>{f==null||f(w(E,R))}};return g.jsx(Nr,{...v})}case te.RADIO:{const v={...T,bindValue:t.k,onChange:(R,M)=>{f==null||f(w(E,R,M))}};return g.jsx(Ss,{...v})}case te.SPOTLIGHT:{const v={...T,bindValue:t.k,onEnter:R=>{p==null||p(w(E,R))}};return g.jsx(gs,{...v})}case te.TEXT_FIELD:{const v={...T,bindValue:t.k,optionalDisplayValue:r,onChange:R=>{f==null||f(w(E,R))}};return g.jsx(we,{...v})}case te.TIME:{const v={...T,bindValue:lt.fromDataObj(t).getValue(),onChange:R=>{f==null||f(w(E,R))}};return g.jsx(Os,{...v})}default:{const v={...T,bindValue:t.k,optionalDisplayValue:r};return g.jsx(ys,{...v})}}},L={wrapper:`${Rs["smp-cell-wrapper"]}`};return g.jsx("span",{className:L.wrapper,onContextMenu:v=>{y&&l&&(v.preventDefault(),y(E,v.currentTarget))},children:N()})},Ds=({data:r,onClick:e,onEnter:t,onContextMenu:n})=>{var o,l;const[s,a]=_.useState(),i=_.useCallback(c=>{var u,p;if(!((u=c.rows)!=null&&u.length)||!((p=c.columns)!=null&&p.length))return{};const f=c.rows[0];return c.columns.filter(m=>m.visible).reduce((m,d)=>{const y=f.cells[d.name],S={...y,id:d.name,onChange:E=>{a(T=>T&&{...T,[d.name]:{...T[d.name],obj:{...T[d.name].obj,k:E.obj.k}}})},onClick:()=>{y.fun&&e&&e({...y})},onEnter:E=>{t&&t(E)},onContextMenu:(E,T)=>{n&&n(E,T)}};return{...m,[d.name]:S}},{})},[e,t,n]);return _.useEffect(()=>{r&&a(i(r))},[r,i]),!((o=r==null?void 0:r.rows)!=null&&o.length)||!((l=r.columns)!=null&&l.length)?null:s&&g.jsx("header",{className:"smp-appbar","aria-label":"App Bar",children:g.jsx(rt,{layout:r.rows[0].layout,children:Object.values(s).map(c=>g.jsx(Oe,{...c}))})})},js=r=>{var e;return(e=r.children)!=null&&e.length?r.children.map(t=>{var n,s;return{id:((n=t.obj)==null?void 0:n.k)??"",label:t.decode??t.value??((s=t.obj)==null?void 0:s.k)??"",fun:t.fun,icon:t.icon}}):[]},ce=r=>r==null?!1:typeof r=="string"?r.toLocaleLowerCase()=="yes":r,$s=({data:r,logo:e,open:t,minifiedOnClose:n=!0,customHeight:s="100vh",onClick:a,onEnter:i,onClose:o,loadOptions:l,onContextMenu:c})=>{var O,b;const[f,u]=_.useState(),[p,m]=_.useState(t??!0),d=_.useRef(null),y=s.trim()?s:"100vh",S=_.useCallback(D=>{var L,v;if(!((L=D==null?void 0:D.rows)!=null&&L.length)||!((v=D==null?void 0:D.columns)!=null&&v.length))return{};const N=D.rows[0];return D.columns.filter(R=>R.visible??!0).reduce((R,M)=>{const C=N.cells[M.name];if(!C||!p&&ce(n)&&C.shape!==te.BUTTON&&C.shape!==te.BUTTON_LIST)return R;const P={...C,id:M.name,onChange:V=>{u(A=>{const Y={...A};return Y!=null&&Y[M.name]&&(Y[M.name].obj.k=V.obj.k),Y})},onClick:V=>{V.fun&&a&&a(V)},onEnter:V=>{i&&i(V)},onContextMenu:(V,A)=>{c&&c(V,A)}};return l&&C.shape==te.BUTTON_LIST&&(P.onOptionsRequest=(V,A)=>l(V,A).then(Y=>js(Y))),!p&&ce(n)&&(P.data={...P.data,showText:!1,justify:"center",squared:!0}),{...R,[M.name]:P}},{})},[p,n,a,i,l,c]),E=_.useCallback(()=>{o==null||o()},[o]),T=()=>{ce(n)?m(D=>!D):(m(!1),o==null||o())};if(_.useEffect(()=>{u(S(r))},[r]),_.useEffect(()=>{if(!d.current)return;if(!ce(n)){u(S(r));return}const D=getComputedStyle(d.current).getPropertyValue("--smp-drawer-slide-transition");let N=Number(D);D.endsWith("ms")?N=parseFloat(D):D.endsWith("s")&&(N=parseFloat(D)*1e3),setTimeout(()=>{u(S(r))},N/2)},[p,n]),_.useEffect(()=>{t!==void 0&&!ce(n)&&m(t)},[n,t]),!((O=r==null?void 0:r.rows)!=null&&O.length)||!((b=r.columns)!=null&&b.length))return null;const w={drawer:`smp-drawer ${ce(n)?"smp-drawer-minified":"smp-drawer-fixed"} ${p?"smp-drawer-open":""} ${!ce(n)&&!p?"smp-drawer-no-border":""}`,container:"smp-drawer-container",containerHeader:"smp-drawer-container-header",containerIcon:`${p?"":"smp-drawer-container-icon-close"} smp-drawer-container-icon`,containerLayout:"smp-drawer-container-layout",containerLogo:"smp-drawer-container-logo",backdrop:`smp-drawer-backdrop ${p?"smp-drawer-backdrop-open":""}`};return f&&g.jsxs(g.Fragment,{children:[!ce(n)&&g.jsx("div",{"aria-hidden":"true","aria-label":"drawer-backdrop",className:w.backdrop,onClick:E}),g.jsx("aside",{ref:d,className:w.drawer,style:{height:y},"aria-label":"Drawer","smp-id":"drawer",children:g.jsxs("div",{className:w.container,children:[g.jsxs("div",{className:w.containerHeader,children:[e&&g.jsx("div",{className:w.containerLogo,children:g.jsx(oe,{icon:e,title:"drawer_logo",width:"100%",height:24})}),g.jsx("div",{className:w.containerIcon,children:g.jsx(oe,{icon:ce(n)?"menu_close":"close",title:"drawer_icon",rotated:!p,isInteractable:!0,onClick:T,width:20,height:20})})]}),g.jsx("div",{className:w.containerLayout,children:g.jsx(rt,{layout:r.rows[0].layout,children:Object.values(f).map(D=>g.jsx(Oe,{...D}))})})]})})]})},Cs=({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:m,UmColor:d="var(--smp-dashList-color-base)",ForceValue:y,ValueColName:S,ValueColor:E="var(--smp-dashList-color-base)",SelectLayout:T="1",onClick:w})=>{const O="N/A",b=(e==null?void 0:e.columns)||[],D=(e==null?void 0:e.rows)||[],N=D.length>0,L="--smp-dashList-color",v="smp-layout",R="descr",M="icon",C="um",P="value",V=i||"1em",A="18px",Y="--smp-dashList-columns",K="--smp-dashList-fontSize",J={dash:(G="1")=>{const Z=h(G),re=Z,ne=x(Z,R),fe=x(Z,M),ve=x(Z,C),me=x(Z,P);return{container:re,descr:ne,icon:fe,um:ve,value:me}},dashList:`smp-dash-list ${ce(a)?"smp-dash-list-fill-space":""}
50
- ${ce(o)?"smp-dash-list-horizontal":""}`},{format:U}=je(),h=G=>`${v}-${G}`,x=(G,Z)=>`${G}__${Z}`,j=G=>`${L}-${G}`,I=G=>{const Z=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(Z.test(G)){const ne=G.match(Z)||[];if((ne==null?void 0:ne.length)>3)return"rgb("+ne[1]+","+ne[2]+","+ne[3]+")"}return G},$=G=>{if(!u)return G;const[Z,re]=k(u).map($e=>parseInt($e||"0")),ne="0,0"+(re?"."+"0".repeat(re):""),fe=U(G,ne,"it");if(!Z)return fe;const[ve,me]=fe.split(",");return ve+(me?`,${me}`:"")},k=G=>G.includes(";")?G.split(";"):[G],B=G=>{const Z=ne=>{var fe;if(ne)return(fe=G==null?void 0:G.cells[ne])==null?void 0:fe.obj.k},re=ne=>{var fe,ve;if(!(b.length<=ne))return(ve=(fe=G==null?void 0:G.cells[b[ne].name])==null?void 0:fe.obj)==null?void 0:ve.k};return{descr:t||Z(n)||re(2)||"",icon:l||Z(c)||re(3)||"",um:p||Z(m)||re(1)||"",value:y||Z(S)||re(0)||""}},H=G=>{w==null||w(G)},W=(G,Z)=>{(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),G.stopPropagation(),H(Z))},q=(G=>{const Z=J.dash(G);return{className:Z,descr:re=>g.jsx("div",{className:Z.descr,children:re},`${G}-${R}`),icon:re=>g.jsx("div",{className:Z.icon,children:g.jsx(oe,{color:f,height:A,icon:re,width:A})},`${G}-${M}`),um:re=>g.jsx("div",{className:Z.um,children:re},`${G}-${C}`),value:re=>g.jsx("div",{className:Z.value,children:re},`${G}-${P}`)}})(T),se=G=>{const{descr:Z,icon:re,um:ne,value:fe}=B(G),ve={[j(R)]:I(s),[j(C)]:I(d),[j(P)]:I(E)},me=[],$e=$(fe);switch(T){case"2":re&&me.push(q.icon(re)),me.push(q.descr(Z)),me.push(q.value(ne?$e+" "+ne:$e));break;default:case"1":me.push(q.descr(Z)),me.push(q.value(ne?$e+" "+ne:$e))}return g.jsx("div",{className:q.className.container,role:"button",style:ve,tabIndex:0,onClick:()=>H(G),onKeyDown:Fr=>W(Fr,G),children:me},G.rowId)},F={[Y]:String(r),[K]:V};return g.jsx("div",{className:J.dashList,style:F,children:N?D.map(G=>se(G)):O})},Qe={"smp-table":"_smp-table_1qmju_1","smp-headerCell":"_smp-headerCell_1qmju_35","smp-resizer":"_smp-resizer_1qmju_44"},Ls="_rowContent_20wit_2",Is="_clickable_20wit_21",Ps="_indent_20wit_26",ks="_toggle_20wit_32",As="_cell_20wit_38",Ns="_leftSection_20wit_46",Ee={rowContent:Ls,clickable:Is,indent:Ps,toggle:ks,cell:As,leftSection:Ns};function et(r){return!!r&&"children"in r}function Ms(r){return!et(r)}function Fs(r){const e=JSON.stringify(r,Object.keys(r).sort());let t=0,n,s;if(e.length===0)return t.toString();for(n=0;n<e.length;n++)s=e.charCodeAt(n),t=(t<<5)-t+s,t|=0;return Math.abs(t).toString()}const Mr=({row:r,columnWidths:e={},level:t=0,rowHeight:n=26,offsetTop:s})=>{var T;const[a,i]=_.useState(!1),o=et(r)&&!!((T=r.children)!=null&&T.length),l=r.cells&&Object.keys(r.cells).length>0,c=o,f=t*20,u=()=>{o&&i(!a)},p={content:`${Ee.rowContent} ${o?Ee.clickable:""}`,toggle:`${Ee.toggle}`,indent:`${Ee.indent}`,cell:`${Ee.cell}`},m=w=>g.jsx(Oe,{...w}),d=()=>g.jsx("span",{className:p.toggle,children:c&&g.jsx(oe,{icon:a?"arrow_drop_right":"arrow_drop_down",width:16})}),y=()=>g.jsx("span",{className:p.indent,style:{width:`${f}px`},"aria-hidden":"true"}),S=()=>{const w=Ms(r)?"":r.decode||(l?"":"Untitled"),O=s??n*t;return g.jsxs("tr",{className:p.content,onClick:u,role:o?"button":"row","aria-expanded":o?!a:void 0,style:{height:`${n}px`,lineHeight:`calc(${n}px - 2*2px)`,transform:`translateY(${O}px)`},children:[et(r)&&g.jsxs("td",{className:Ee.leftSection,style:{height:`${n}px`},children:[y(),d(),g.jsx("span",{className:Ee.rowLabel,children:w})]}),r.cells&&Object.keys(r.cells).length>0&&Object.entries(r.cells).map(([b,D])=>g.jsx("td",{className:p.cell,style:{width:e[b],minWidth:e[b],height:`${n}px`},children:m({...D,id:b})},Fs(D)||b))]})},E=()=>{var w;return a||!o?null:g.jsx(g.Fragment,{children:et(r)&&((w=r.children)==null?void 0:w.map((O,b)=>g.jsx(Mr,{row:O,level:t+1},`child-${b}`)))})};return g.jsxs(g.Fragment,{children:[S(),E()]})},Vs=({label:r,rowHeight:e=28,offsetTop:t=0,level:n=0,onClick:s,isExpanded:a})=>{const i={tr:"smp-groupRow-tr",td:"smp-groupRow-td"};return g.jsx("tr",{className:i.tr,style:{height:e,top:t,lineHeight:`${e}px`},onClick:s,children:g.jsxs("td",{className:i.td,style:{paddingLeft:10+n*20},children:[g.jsx(oe,{icon:a?"arrow_drop_down":"arrow_drop_right",width:16}),g.jsx(_e,{variant:"title",bindValue:r})]})})};function Ys(r,e){const t=new Set(r);return t.has(e)?t.delete(e):t.add(e),t}function Us(r,e){return r.map(t=>{const n=e.find(s=>s.column===t.bindValue);return{column:t.bindValue,visible:(n==null?void 0:n.visible)??!0}})}function Ws(r,e,t,n){const s=[];let a=0;return i(r,0,[]),{flatRows:s,offset:a};function i(u,p,m){if(p>=e.length){f(u);return}const d=e[p].column,y=o(u,d);for(const[S,E]of y){const T=[...m,S],w=l(T,p),O=n.has(w);s.push(c(S,w,p,O)),a+=t,O&&i(E,p+1,T)}}function o(u,p){var d;const m=new Map;for(const y of u){const S=((d=y.cells[p])==null?void 0:d.decode)??"N/D";m.has(S)||m.set(S,[]),m.get(S).push(y)}return m}function l(u,p){return`group-${u.join("-")}-${p}`}function c(u,p,m,d){return{isGroup:!0,value:u,cells:{},rowId:p,level:m,isExpanded:d}}function f(u){for(const p of u)s.push(p),a+=t}}const Bs=({groups:r=[],isDraggable:e=!0,isEditable:t=!0,onChange:n,onDrop:s,onDragOver:a})=>{const i=r.map(o=>({bindValue:o.column}));return g.jsxs("tr",{className:"smp-groupBar-container",onDragOver:a,onDrop:s,children:[g.jsx("td",{children:g.jsx(oe,{icon:"groups"})}),g.jsx("td",{children:g.jsx(Lt,{elements:i,isEditable:t,isDraggable:e,displayMode:"CodeOnly",onChange:n})})]})},Hs=({columns:r,columnWidths:e})=>g.jsx("tfoot",{children:g.jsx("tr",{children:r.map(t=>t.visible&&g.jsx("td",{className:Qe["smp-headerCell"],style:{width:e[t.name],minWidth:e[t.name],maxWidth:e[t.name]}},t.name))})}),Gs=({columns:r,rows:e,containerRef:t,sizingMode:n})=>{const[s,a]=_.useState({});return _.useEffect(()=>{var i,o;if(!(!r||r.length===0)){if(n==="fixed"){const c=Object.fromEntries(r.map(f=>[f.name,120]));a(c)}else if(n==="fit-grid"){const l=((i=t.current)==null?void 0:i.offsetWidth)||800,c=r.filter(p=>p.visible!==!1),f=l/c.length,u=Object.fromEntries(c.map(p=>[p.name,f]));a(u)}else if(n==="fit-content"){const l={};for(const c of r){if(!c.visible)continue;const f=((o=c.title)==null?void 0:o.length)||0,u=Math.max(...e.map(p=>{var m,d,y,S;return`${((d=(m=p.cells)==null?void 0:m[c.name])==null?void 0:d.decode)||((S=(y=p.cells)==null?void 0:y[c.name])==null?void 0:S.value)||""}`.length}),f);l[c.name]=u*8+24}a(l)}}},[r,e,t,n]),[s,a]},Ks=({data:r,lineHeight:e=28,TableHeight:t=400,groups:n,columnSizingMode:s="fixed",showGroupBar:a=!0})=>{var N;const[i,o]=_.useState(r??{columns:[],rows:[]}),[l,c]=_.useState(n||[]),[f,u]=_.useState(new Set),p=_.useRef(null),[m,d]=Gs({columns:(i==null?void 0:i.columns)??[],rows:(i==null?void 0:i.rows)??[],containerRef:p,sizingMode:s});_.useEffect(()=>{if(l!=null&&l.length&&r.rows){const{flatRows:L}=Ws(r.rows,l,e,f);o({...r,rows:L})}else o(r)},[r,l,f,e]);const y=L=>{c(Us(L,l))},S=L=>{L.preventDefault();const v=L.dataTransfer.getData("text/plain");if(!v||l.some(C=>C.column===v))return;const M=[...l,{column:v,visible:!0}];c(M)},E=L=>{L.preventDefault()},{virtualItems:T,containerProps:w,innerProps:O}=jr({items:(i==null?void 0:i.rows)??[],itemHeight:e,containerHeight:t,overscan:5}),b=(L,v)=>{const R=L.clientX,M=m[v],C=V=>{const A=V.clientX-R,Y=Math.max(50,M+A);d(K=>({...K,[v]:Y}))},P=()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",P)};window.addEventListener("mousemove",C),window.addEventListener("mouseup",P)},D={smpTable:`${Qe["smp-table"]}`,headerCell:`${Qe["smp-headerCell"]}`,resizer:`${Qe["smp-resizer"]}`};return i&&g.jsx("div",{className:D.smpTable,...w,ref:p,children:g.jsxs("table",{children:[g.jsxs("thead",{children:[(n||a)&&g.jsx(Bs,{groups:l,onChange:y,onDrop:S,onDragOver:E}),g.jsx("tr",{children:i.columns&&((N=i.columns)==null?void 0:N.map(L=>L.visible&&g.jsxs("th",{className:D.headerCell,draggable:!0,onDragStart:v=>{v.dataTransfer.setData("text/plain",L.name)},style:{width:m[L.name],minWidth:m[L.name],maxWidth:m[L.name]},children:[g.jsx(_e,{variant:"title",bindValue:L.title}),g.jsx("div",{className:D.resizer,onMouseDown:v=>b(v,L.name),role:"region"})]},L.name)))})]}),g.jsx("tbody",{...O,children:T.map(({item:L,index:v,offsetTop:R})=>{const M=L.rowId||L.value||`${L.isGroup?"group":"row"}-${v}`;return L.isGroup?g.jsx(Vs,{label:L.value||"",rowHeight:e,offsetTop:R,level:L.level,onClick:()=>{const C=L.rowId;C&&u(P=>Ys(P,C))},isExpanded:L.isExpanded},`group-${M}`):g.jsx(Mr,{row:L,columnWidths:m,rowHeight:e,offsetTop:R,isGroup:!1},`row-${M}`)})}),g.jsx(Hs,{columns:i.columns,columnWidths:m})]})})},qs=({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]=_.useState();_.useEffect(()=>{u(()=>{if(!r)return;const y={...r};return e&&(y.shape=e),y.shape==null&&(y.shape=te.TEXT_FIELD),s&&(y.obj=Sn(s)),y})},[r,s,e]);const m={container:`smp-field-container ${ce(t)?`smp-field-position-${n}`:""}`},d=()=>{ce(t)||o==null||o(f)};if(f)return g.jsxs("div",{className:m.container,children:[g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",font:"var(--smp-fontLabel-base)"},children:g.jsx(Oe,{...f,id:"FLD",onChange:u,onOptionsRequest:c,fun:r==null?void 0:r.fun,onBlur:d,label:a,labelPosition:i})}),ce(t)&&g.jsx(Se,{optionalDisplayValue:"Confirm",onClick:()=>l==null?void 0:l(f),bindValue:"Confirm"})]})},zs=r=>(r==null?void 0:r.type)==="SmeupDataTree",Js=r=>(r==null?void 0:r.type)==="SmeupDataTable",Xs=r=>zs(r)?r.children?r.children.map(e=>({id:e.obj.k,label:e.value??""})):[]:Js(r)?r.rows.map(e=>{const t=e.cells||e.cells,[n,s]=Object.keys(t);return{id:t[n].obj.k,label:t[s].value||t[s].obj.k}}):[],Zs=({data:r,id:e,readOnly:t=!1,hiddenSubmitButton:n=!1,updateOnClick:s=!1,decimalSeparator:a=".",optionsHandler:i,onSubmit:o,onCheck:l,onCheckObj:c,onContextMenu:f,onButtonClick:u})=>{var N,L;const[p,m]=_.useState({}),{translate:d}=je(),y=_.useId();_.useEffect(()=>{m(O(r))},[r]);const S=(v,R)=>{m(M=>({...M,[v]:{...M[v],obj:{...M[v].obj,k:R.obj.k},decode:R.decode,data:{...M[v].data,error:void 0},value:R.obj.k}})),s&&(R.shape==te.CHECKBOX||R.shape==te.SWITCH)&&E()},E=v=>{const R=b();o({value:R,cell:v})},T=(v,R)=>{u==null||u({cellId:v,currentState:{type:"SmeupDataTable",columns:r.columns,rows:[{cells:p}]},fun:R||""})},w=async v=>{var R,M;if(p[v].obj.k!=r.rows[0].cells[v].obj.k&&((R=p[v].inputSettings)!=null&&R.checkObject&&c&&((await c({obj:p[v].obj,fun:p[v].fun,cellId:v})).valid||m(P=>({...P,[v]:{...P[v],data:{...P[v].data,error:d(Te.CHECK_OBJECT_WRONG_VALIDATION)}}}))),(M=p[v].inputSettings)!=null&&M.checkValueOnExit)){const C=b();l==null||l({value:C,cell:v})}},O=v=>{var M,C,P;if(!((M=v.rows)!=null&&M.length)||!((C=v.columns)!=null&&C.length))return{};const R=(P=v.rows)==null?void 0:P[0];return v.columns.filter(V=>V.visible??!0).reduce((V,A)=>{const Y={...R.cells[A.name],id:A.name,label:A.title,data:{...R.cells[A.name].data,dSep:a}};return Y.fun&&(Y.onOptionsRequest=async(K,J)=>Xs(await i(K,J,r,A.name))),Y.isEditable==null&&(Y.isEditable=!0),t&&(Y.isEditable=!1),Y.isEditable&&Y.shape==null&&(Y.shape=te.TEXT_FIELD),{...V,[A.name]:Y}},{})},b=()=>({before:r,after:{type:"SmeupDataTable",columns:JSON.parse(JSON.stringify(r.columns)),rows:[{cells:JSON.parse(JSON.stringify(p))}]}}),D=((L=(N=r.setup)==null?void 0:N.commands)==null?void 0:L.map((v,R)=>_.createElement(Oe,{...v,decode:v.value,data:{label:v.value},id:`command-${R}`,key:`command-${R}`,shape:te.BUTTON,onClick:()=>E(v.obj.k)})))||[];return n||D.unshift(g.jsx(Oe,{decode:d(Te.CONFIRM_BUTTON),shape:te.BUTTON,id:"",obj:{t:"",p:"",k:""},data:{submit:!0,label:d(Te.CONFIRM_BUTTON)}},"submit-command")),p&&g.jsxs("form",{"data-component":"input-panel",id:e||y,onSubmit:v=>{v.preventDefault(),E()},children:[g.jsx("div",{style:{padding:"1em 0"},children:g.jsx(rt,{layout:r.rows[0].layout,children:Object.values(p).map(v=>g.jsx(Oe,{...v,onChange:R=>S(v.id,R),onBlur:()=>w(v.id),onContextMenu:f,onClick:()=>{v.shape=="BTN"&&T(v.id,v.fun)},data:{...v.data,autocomplete:"off"}}))})}),D.length>0&&g.jsx(rt,{layout:{sections:[{id:"1",horizontal:!0,justify:"start",content:D.map(v=>({id:v.props.id}))}]},children:D})]})};exports.AppBar=Ds;exports.Autocomplete=Ct;exports.Button=Se;exports.ButtonList=Ir;exports.Checkbox=Pr;exports.Combobox=kr;exports.DashList=Cs;exports.DataTableComponent=Ks;exports.DatePicker=Ar;exports.Drawer=$s;exports.Field=qs;exports.Icon=oe;exports.InputPanel=Zs;exports.Password=Nr;exports.Textfield=we;exports.configurePaths=gn;
49
+ ${j?"smp-datepickercalendar-td-disabled":""}`},J=()=>`${T[f]} ${d.toString()}`;return g.jsxs("div",{className:z.wrapper,ref:s,role:"dialog",tabIndex:-1,"aria-modal":"true","data-component":"datepicker-calendar",children:[g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[g.jsx(Se,{onClick:D,ariaLabel:a(_t.PREVIOUS_MONTH),optionalDisplayValue:"<",appearance:"ghost",variant:"base",bindValue:"<"}),g.jsx("div",{"aria-label":J(),className:z.label,children:J()}),g.jsx(Se,{onClick:N,ariaLabel:a(_t.NEXT_MONTH),bindValue:">",optionalDisplayValue:">",appearance:"ghost",variant:"base"})]}),g.jsxs("table",{ref:S,role:"grid","aria-label":`${a(Te.CALENDAR_FOR)} ${T[f]} ${d}`,className:z.table,children:[g.jsx("thead",{children:g.jsx("tr",{children:w.map(W=>g.jsx("th",{scope:"col",abbr:W.full,className:z.th,children:W.value},W.value))})}),g.jsx("tbody",{children:P.map((W,h)=>g.jsx("tr",{children:W.map((x,j)=>{const k=h*7+j;if(x===null)return g.jsx("td",{className:z.td(!1,!1,!1,!0)},`empty-${j}`);const $=x.getDate()===o.getDate()&&x.getMonth()===o.getMonth()&&x.getFullYear()===o.getFullYear(),A=l&&x.getDate()===l.getDate()&&x.getMonth()===l.getMonth()&&x.getFullYear()===l.getFullYear(),U=p===x.getDate(),H=O(x);return g.jsx("td",{role:"gridcell","aria-selected":A,tabIndex:U?0:-1,onClick:()=>b(x),onKeyDown:B=>M(B,k),"aria-label":`${x.getDate()} ${T[x.getMonth()]} ${x.getFullYear()}`,"data-selected":A,"aria-disabled":H,ref:B=>{E.current[k]=B},className:z.td($,A,U,H),children:x.getDate()},`day-${j}`)})},`week-${h}`))})]})]})}const Ar=({bindValue:r,placeholder:e,onChange:t,disabledDateRanges:n,isEditable:s=!0,...a})=>{const i=_.useRef(null),[o,l]=_.useState(!1),[c,f]=_.useState(r||""),[u,d]=_.useState(""),{anchorRef:m,targetRef:p}=ct({position:"bottom",enabled:o}),y=_.useCallback(()=>{var v;l(!1),(v=i==null?void 0:i.current)==null||v.focus()},[]);ft([p,m],o,()=>{y()}),Lt(o,p);const{format:S,getCurrentLanguage:E}=je(),T=_.useCallback(v=>{const R=v.length>5&&wn(v,E())||v,M=S(R,void 0,void 0,{type:"date"}),C=typeof R!="string",L=C&&R.toISOString().substring(0,10)||"";return{isValid:C,formattedDate:M,isoDate:L,normalizedDate:R}},[E,S]);_.useEffect(()=>{const{formattedDate:v,isoDate:R,isValid:M}=T(r);f(M&&R||r),d(M&&v||r)},[r,S,T]);const w=()=>l(v=>!v),O=()=>{D(u)},b=v=>{D(v),y()},D=v=>{const{isoDate:R,isValid:M}=T(v);t&&t(M&&R||v)},N=v=>{d(v)},I=v=>{v.key==="Enter"&&(v.preventDefault(),D(u))};return g.jsxs("div",{"data-component":"date-picker",children:[g.jsx(we,{...a,bindValue:u,placeholder:e,onBlur:O,onChange:N,onKeyDown:I,shapeIcon:"calendar",onShapeIconClick:w,ref:m,inputRef:i,isEditable:s,size:10,maxLength:a.maxLength?a.maxLength:10}),o&&g.jsx(ut,{children:g.jsx(hs,{disabledDateRanges:n,onDateChange:b,initialValue:jt(c)&&c||"",targetRef:p})})]})},ms=({elements:r,displayMode:e,minimumChars:t,listDisplayMode:n,isEditable:s=!0,placeholder:a,label:i,disabled:o,fun:l,error:c,onOptionsRequest:f,onChange:u,onBlur:d})=>{const m=r.map(S=>S.bindValue),p=(S,E)=>{const T=[...r];if(S=="")T.pop();else{const w=T.findIndex(O=>O.bindValue===S&&O.optionalDisplayValue===E);w>=0?T.splice(w,1):T.push({bindValue:S,optionalDisplayValue:E})}u==null||u(T)},y={container:"smp-multipleAutocomplete-container"};return g.jsxs("div",{className:y.container,"data-component":"multiple-autocomplete",children:[i&&g.jsx(De,{label:i,disabled:o}),g.jsx(It,{elements:r,displayMode:e,isEditable:s,onChange:S=>{u==null||u(S)}}),g.jsx(Ct,{bindValue:"",fun:l,isEditable:s,onChange:p,_changeOnEnter:!0,listDisplayMode:n,minimumChars:t,placeholder:a,onOptionsRequest:f,_multiActiveIndex:m,error:c,onBlur:d})]})},Nr=({...r})=>{const[e,t]=_.useState(!1),n=e?"visibility-off":"visibility";return g.jsx(we,{...r,inputType:e?"text":"password",shapeIcon:n,onShapeIconClick:()=>t(!e),ariaLabel:"password","data-component":"password"})},gs=({...r})=>{const[e,t]=_.useState(r.bindValue),{translate:n}=je(),s=a=>{var i;a.key==="Enter"&&(a.preventDefault(),(i=r.onEnter)==null||i.call(r,e))};return g.jsx(we,{...r,placeholder:r.placeholder?r.placeholder:n(Te.SPOTLIGHT_DEFAULT_PLACEHOLDER),icon:"magnify",inputType:"search",bindValue:e,onChange:t,onKeyDown:s,ariaLabel:"search bar",_dataComponent:"search-bar"})},ys=({bindValue:r,optionalDisplayValue:e,label:t})=>{const n={wrapper:"smp-text-wrapper"};return t?g.jsxs("div",{className:n.wrapper,children:[g.jsx(De,{label:t}),g.jsx(_e,{variant:"body",bindValue:e||r})]}):g.jsx(_e,{variant:"body",bindValue:e||r})};class Re{constructor(e,t){de(this,"class");de(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new Re(e,e.k==""?[]:e.k.split(";"))}static fromString(e){return new Re({t:"",p:""},e.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const Le=(r,e,t)=>({obj:{t:r.obj.t,p:r.obj.p,k:e},decode:t??r.decode,shape:r.shape,fun:r.fun}),xr=r=>{const e=Re.fromDataObj(r.obj),t=r.decode?Re.fromString(r.decode).getValue():[];return e.getValue().map((n,s)=>({bindValue:n,optionalDisplayValue:t.length>=s?t[s]:""}))},bs=(r,e)=>{const t=new Re(r.obj,e.map(s=>s.bindValue)).getLegacyValue(),n=new Re(r.obj,e.map(s=>s.optionalDisplayValue?s.optionalDisplayValue:"")).getLegacyValue();return Le(r,t,n)},vs=({min:r,max:e,step:t=1,inputMode:n="decimal",dSep:s,bindValue:a,onChange:i,onEnter:o,...l})=>{const{getCurrentLanguage:c}=je(),f=_.useRef(null),u=c(),{groupingChar:d,decimalChar:m}=_.useMemo(()=>ss(u,s),[u,s]),p=_.useCallback((C,L)=>new Intl.NumberFormat(u,{minimumFractionDigits:L,maximumFractionDigits:L,useGrouping:!0}).format(C),[u]),y=_.useCallback(os,[d,m]),S=_.useCallback(ns,[r,e]),E=a!=null&&a.toString().includes(".")?a.toString().split(".")[1].length:0,[T,w]=_.useState(E),[O,b]=_.useState(a!=null?p(a,T):""),D=_.useRef(a??null);_.useEffect(()=>{if(a==null){b(""),D.current=null;return}const C=a.toString().includes(".")?a.toString().split(".")[1].length:0,L=C===0?T:C;L!==T&&w(L),b(p(a,L)),D.current=a},[a,p]);const N=_.useCallback((C,L=!1)=>{if(C.trim()===""){b(""),D.current=null,i==null||i(void 0,""),L&&(o==null||o(void 0));return}const F=y(C,d,m);if(isNaN(F))if(D.current!=null){const P=p(D.current,T);b(P)}else b("");else{const P=S(F,r,e),Y=is(C,d,m);w(Y);const z=p(P,Y);b(z),D.current=P,i==null||i(P,z),L&&(o==null||o(P))}},[y,d,m,S,r,e,p,i,o,T]),I=C=>b(C),v=()=>N(O),R=C=>{if(C.key==="Enter"){C.preventDefault(),N(O,!0);return}if(C.key==="ArrowUp"||C.key==="ArrowDown"){C.preventDefault();const L=C.key==="ArrowUp"?1:-1,F=D.current??0,P=S(F+L*t,r,e);N(p(P,T))}},M=C=>{if(!C.currentTarget.contains(document.activeElement))return;C.preventDefault();const L=C.deltaY<0?1:-1,F=D.current??0,P=S(F+L*t,r,e);N(p(P,T))};return g.jsx("div",{ref:f,"data-component":"input-number",onWheel:M,children:g.jsx(we,{...l,"aria-valuemin":r,"aria-valuemax":e,"aria-valuenow":D.current??void 0,bindValue:O,inputType:"text",inputMode:n,min:r,max:e,step:t,onChange:I,onBlur:v,onKeyDown:R})})};class Ue{constructor(e,t,n="."){de(this,"class");de(this,"value");de(this,"decimalSeparator");this.class=e,this.value=t,this.decimalSeparator=n}static fromDataObj(e,t){const n=t==="."?",":".";if(e.k=="")return new Ue(e,void 0,t);const s=e.k.replace(new RegExp(`\\${n}`,"g"),""),a=parseFloat(s.replace(t,"."));return new Ue(e,a,t)}getLegacyValue(){return this.value!=null?this.value.toString().replace(".",this.decimalSeparator):""}getValue(){return this.value}}const xs=({disabled:r,bindValue:e,onChange:t,placeholder:n,state:s,appearance:a,isEditable:i,label:o,ariaLabel:l,helperText:c,error:f,onBlur:u,onKeyDown:d,rows:m=10,cols:p=150})=>{const y=_.useId(),S=`${y}-helper`,E=f?"danger":s,T=c||!!f,w=b=>{t==null||t(b.target.value)},O={wrapper:"smp-textarea-wrapper",container:`smp-textarea ${r?"smp-textarea-disabled":""} ${n?"smp-textarea-placeholder":""} ${E?`smp-textarea-${E}`:""} ${a?`smp-textarea-${a}`:""} ${i?"":"smp-textarea-readOnly"}`};return g.jsxs("div",{className:O.wrapper,"data-component":"textarea",children:[o&&g.jsx(De,{htmlFor:y,label:o,disabled:r}),g.jsx("textarea",{id:y,value:e,placeholder:n,onChange:w,onBlur:u,className:O.container,disabled:r,readOnly:!i,onKeyDown:d,"aria-label":o?void 0:l,"aria-labelledby":o?y:void 0,"aria-describedby":T?S:void 0,rows:m,cols:p}),T&&g.jsx(Dr,{id:S,helperText:f,disabled:r,state:E})]})};var Rt=(r=>(r.PAGE_DIRECTION="pageDirection",r.LINE_DIRECTION="lineDirection",r))(Rt||{});const Ze={"smp-radio":"_smp-radio_1vo2u_1","smp-radio-horizontal":"_smp-radio-horizontal_1vo2u_10","smp-radio-element":"_smp-radio-element_1vo2u_14","smp-radio-disabled":"_smp-radio-disabled_1vo2u_20"},Ss=({disabled:r=!1,displayMode:e="DescOnly",RadLay:t=Rt.PAGE_DIRECTION,options:n,onOptionsRequest:s,fun:a,label:i,...o})=>{const[l,c]=_.useState(n),f=_.useId();_.useEffect(()=>{!l&&s&&a&&s(a,void 0).then(y=>c(y)).catch(y=>{console.error("Error during loading options (radio)",y)})},[l,s,a]);const u={container:`${Ze["smp-radio"]} ${t==Rt.LINE_DIRECTION?Ze["smp-radio-horizontal"]:""}`,option:`${Ze["smp-radio-element"]} ${r?Ze["smp-radio-disabled"]:""}`},d=()=>{var y;r||(y=o.onBlur)==null||y.call(o)},m=y=>{var S;r||(S=o.onChange)==null||S.call(o,y.id,y.label)},p=_.useId();return g.jsxs("div",{"smp-id":"radio-container",className:u.container,id:f,children:[i&&g.jsx(De,{label:i,disabled:r,htmlFor:f}),l==null?void 0:l.map((y,S)=>g.jsxs("label",{className:u.option,children:[g.jsx("input",{type:"radio",name:p,value:y.id,disabled:r,checked:y.id===o.bindValue,onChange:()=>m(y),onBlur:d}),g.jsx(_e,{variant:"body",bindValue:Pe(y.id,y.label,e)})]},S))]})},ws=({value:r,onChange:e,targetRef:t,isOpen:n})=>{const s=_.useRef(null);_.useEffect(()=>{n&&(s!=null&&s.current)&&s.current.focus()},[n,s]);const[a,i,o]=r,l=c=>Array.from({length:c},(f,u)=>g.jsx("option",{value:u,children:u.toString().padStart(2,"0")},u));return g.jsxs("div",{className:"smp-timepicker-widget",ref:t,children:[g.jsx("select",{value:a,ref:s,onChange:c=>e(+c.target.value,i,o),id:"time-picker-hours",children:l(24)}),":",g.jsx("select",{value:i,onChange:c=>e(a,+c.target.value,o),id:"time-picker-minutes",children:l(60)}),":",g.jsx("select",{value:o||0,onChange:c=>e(a,i,+c.target.value),id:"time-picker-seconds",children:l(60)})]})},Sr=r=>{const e=r.match(/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/);if(!e)return!1;const[,t,n,s]=e,a=parseInt(t,10),i=parseInt(n,10),o=s?parseInt(s,10):0;return a>=0&&a<=23&&i>=0&&i<=59&&(s===void 0||o>=0&&o<=59)},Es=r=>{const e=r.split(":").map(t=>parseInt(t,10));return[e[0]||0,e[1]||0,e[2]||0]},Ts=(r,e,t)=>{const n=r!=null&&!isNaN(r)?r.toString().padStart(2,"0"):"",s=e!=null&&!isNaN(e)?e.toString().padStart(2,"0"):"",a=t!=null&&!isNaN(t)?t.toString().padStart(2,"0"):"";return n&&s?`${n}:${s}:${a}`:s?`${s}:${a}`:a},Os=({bindValue:r,placeholder:e="HH:MM:SS",onChange:t,isEditable:n=!0,...s})=>{const a=_.useRef(null),[i,o]=_.useState(!1),[l,c]=_.useState(r||""),[f,u]=_.useState(""),{anchorRef:d,targetRef:m}=ct({position:"bottom",enabled:i}),p=_.useCallback(()=>{var b;o(!1),(b=a==null?void 0:a.current)==null||b.focus()},[]);ft([m,d],i,()=>o(!1)),Lt(i,m),_.useEffect(()=>{const b=r||"",D=Sr(b)?b:r||"";c(b),u(D)},[r]),_.useEffect(()=>{const b=D=>{D.key==="Escape"&&o(!1)};return i&&document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[i]);const y=()=>{n&&o(b=>!b)},S=b=>{u(b)},E=(b,D,N)=>{const I=Ts(b,D,N);c(I),u(I),t==null||t(I),p()},T=()=>{O(f)},w=b=>{b.key==="Enter"&&(b.preventDefault(),O(f))},O=b=>{if(b.trim()===""){c(""),u(""),t==null||t("");return}Sr(b)?(c(b),u(b),t==null||t(b)):u(b)};return g.jsxs("div",{"data-component":"time-picker",children:[g.jsx($t,{...s,bindValue:f,placeholder:e,onChange:S,onBlur:T,onKeyDown:w,shapeIcon:"clock",onShapeIconClick:y,isEditable:n,ref:d,inputRef:a}),i&&g.jsx(ut,{children:g.jsx(ws,{value:Es(l),onChange:E,targetRef:m,isOpen:i})})]})};function _s(r){return typeof r=="string"&&/^\d{6}$/.test(r)}class lt{constructor(e,t){de(this,"class");de(this,"time");this.class=e,this.time=t}static fromDataObj(e){const t=wr.get(`${e.t}${e.p}`);if(t)return new lt(e,t.legacyToIso(e.k));throw new Error(`time creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=wr.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.time);throw new Error(`Time object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.time}}const wr=new Map([["I12",{legacyToIso(r){return _s(r)&&`${r.substring(0,2)}:${r.substring(2,4)}:${r.substring(4,6)}`||r},isoToLegacy(r){return r.replaceAll(":","")||r}}]]),Rs={"smp-cell-wrapper":"_smp-cell-wrapper_mdlkz_1"},Oe=({decode:r,shape:e,obj:t,data:n,icon:s,fun:a,placeholderIcon:i,label:o,tooltip:l,options:c,onChange:f,onClick:u,onEnter:d,onBlur:m,onOptionsRequest:p,onContextMenu:y,isEditable:S})=>{const E={obj:t,shape:e,decode:r,icon:s,fun:a},T={onBlur:m,onOptionsRequest:p,fun:a,icon:s,tooltip:l,label:o,isEditable:S,...n},w=(v,R,M)=>vn(t)?Le(v,new st(t,R).getLegacyValue()):xn(t)?Le(v,new lt(t,R).getLegacyValue()):Le(v,R,M),O=(v,R)=>Le(v,new Ue(t,R,".").getLegacyValue()),b=v=>Le(E,new nt(t,v).getLegacyValue()),D=v=>bs(E,v),N=()=>{switch(e){case te.AUTOCOMPLETE:{const v={...T,bindValue:t.k,optionalDisplayValue:r,onChange:(R,M)=>{f==null||f(w(E,R,M))}};return g.jsx(Ct,{...v})}case te.BUTTON:{const v={...T,bindValue:t.k,optionalDisplayValue:n!=null&&n.label&&typeof n.label=="string"?n.label:void 0,title:r,onClick:()=>{u==null||u(w(E,t.k))}};return g.jsx(Se,{...v})}case te.BUTTON_LIST:{const v={...T,options:c,onClick:(R,M)=>{const C={...E,fun:M};u==null||u(w(C,R))}};return g.jsx(Lr,{...v})}case te.CHIP:{const v={...T,elements:xr(E)};return g.jsx(It,{...v})}case te.CHECKBOX:case te.SWITCH:{const v=e===te.SWITCH,R={...T,bindValue:nt.fromDataObj(t).getValue(),optionalDisplayValue:r,onChange:M=>{f==null||f(b(M))},...v&&{variant:"switch"}};return g.jsx(kr,{...R})}case te.COMBOBOX:{const v={...T,bindValue:t.k,optionalDisplayValue:r,onChange:(R,M)=>{f==null||f(w(E,R,M))}};return g.jsx(Pr,{...v})}case te.DATE:{const v={...T,bindValue:st.fromDataObj(t).getValue(),onChange:R=>{f==null||f(w(E,R))}};return g.jsx(Ar,{...v})}case te.ICON:case te.IMAGE:{const v={...T,icon:s,placeholderIcon:i,isInteractable:!!T.fun,onClick:()=>{u==null||u(w(E,t.k))}};return g.jsx(oe,{...v})}case te.INPUT_NUMBER:{const v={...T,bindValue:Ue.fromDataObj(t,".").getValue(),onChange:R=>{f==null||f(O(E,R))}};return g.jsx(vs,{...v})}case te.MEMO:{const v={...T,bindValue:t.k,optionalDisplayValue:r,onChange:R=>{f==null||f(w(E,R))}};return g.jsx(xs,{...v})}case te.MULTI_AUTOCOMPLETE:{const v={...T,elements:xr(E),onChange:R=>{f==null||f(D(R))}};return g.jsx(ms,{...v})}case te.PASSWORD:{const v={...T,bindValue:t.k,onChange:R=>{f==null||f(w(E,R))}};return g.jsx(Nr,{...v})}case te.RADIO:{const v={...T,bindValue:t.k,onChange:(R,M)=>{f==null||f(w(E,R,M))}};return g.jsx(Ss,{...v})}case te.SPOTLIGHT:{const v={...T,bindValue:t.k,onEnter:R=>{d==null||d(w(E,R))}};return g.jsx(gs,{...v})}case te.TEXT_FIELD:{const v={...T,bindValue:t.k,optionalDisplayValue:r,onChange:R=>{f==null||f(w(E,R))}};return g.jsx(we,{...v})}case te.TIME:{const v={...T,bindValue:lt.fromDataObj(t).getValue(),onChange:R=>{f==null||f(w(E,R))}};return g.jsx(Os,{...v})}default:{const v={...T,bindValue:t.k,optionalDisplayValue:r};return g.jsx(ys,{...v})}}},I={wrapper:`${Rs["smp-cell-wrapper"]}`};return g.jsx("span",{className:I.wrapper,onContextMenu:v=>{y&&l&&(v.preventDefault(),y(E,v.currentTarget))},children:N()})},Ds=({data:r,onClick:e,onEnter:t,onContextMenu:n})=>{var o,l;const[s,a]=_.useState(),i=_.useCallback(c=>{var u,d;if(!((u=c.rows)!=null&&u.length)||!((d=c.columns)!=null&&d.length))return{};const f=c.rows[0];return c.columns.filter(m=>m.visible).reduce((m,p)=>{const y=f.cells[p.name],S={...y,id:p.name,onChange:E=>{a(T=>T&&{...T,[p.name]:{...T[p.name],obj:{...T[p.name].obj,k:E.obj.k}}})},onClick:()=>{y.fun&&e&&e({...y})},onEnter:E=>{t&&t(E)},onContextMenu:(E,T)=>{n&&n(E,T)}};return{...m,[p.name]:S}},{})},[e,t,n]);return _.useEffect(()=>{r&&a(i(r))},[r,i]),!((o=r==null?void 0:r.rows)!=null&&o.length)||!((l=r.columns)!=null&&l.length)?null:s&&g.jsx("header",{className:"smp-appbar","aria-label":"App Bar",children:g.jsx(rt,{layout:r.rows[0].layout,children:Object.values(s).map(c=>g.jsx(Oe,{...c}))})})},js=r=>{var e;return(e=r.children)!=null&&e.length?r.children.map(t=>{var n,s;return{id:((n=t.obj)==null?void 0:n.k)??"",label:t.decode??t.value??((s=t.obj)==null?void 0:s.k)??"",fun:t.fun,icon:t.icon}}):[]},ce=r=>r==null?!1:typeof r=="string"?r.toLocaleLowerCase()=="yes":r,$s=({data:r,logo:e,open:t,minifiedOnClose:n=!0,customHeight:s="100vh",onClick:a,onEnter:i,onClose:o,loadOptions:l,onContextMenu:c})=>{var O,b;const[f,u]=_.useState(),[d,m]=_.useState(t??!0),p=_.useRef(null),y=s.trim()?s:"100vh",S=_.useCallback(D=>{var I,v;if(!((I=D==null?void 0:D.rows)!=null&&I.length)||!((v=D==null?void 0:D.columns)!=null&&v.length))return{};const N=D.rows[0];return D.columns.filter(R=>R.visible??!0).reduce((R,M)=>{const C=N.cells[M.name];if(!C||!d&&ce(n)&&C.shape!==te.BUTTON&&C.shape!==te.BUTTON_LIST)return R;const L={...C,id:M.name,onChange:F=>{u(P=>{const Y={...P};return Y!=null&&Y[M.name]&&(Y[M.name].obj.k=F.obj.k),Y})},onClick:F=>{F.fun&&a&&a(F)},onEnter:F=>{i&&i(F)},onContextMenu:(F,P)=>{c&&c(F,P)}};return l&&C.shape==te.BUTTON_LIST&&(L.onOptionsRequest=(F,P)=>l(F,P).then(Y=>js(Y))),!d&&ce(n)&&(L.data={...L.data,showText:!1,justify:"center",squared:!0}),{...R,[M.name]:L}},{})},[d,n,a,i,l,c]),E=_.useCallback(()=>{o==null||o()},[o]),T=()=>{ce(n)?m(D=>!D):(m(!1),o==null||o())};if(_.useEffect(()=>{u(S(r))},[r]),_.useEffect(()=>{if(!p.current)return;if(!ce(n)){u(S(r));return}const D=getComputedStyle(p.current).getPropertyValue("--smp-drawer-slide-transition");let N=Number(D);D.endsWith("ms")?N=parseFloat(D):D.endsWith("s")&&(N=parseFloat(D)*1e3),setTimeout(()=>{u(S(r))},N/2)},[d,n]),_.useEffect(()=>{t!==void 0&&!ce(n)&&m(t)},[n,t]),!((O=r==null?void 0:r.rows)!=null&&O.length)||!((b=r.columns)!=null&&b.length))return null;const w={drawer:`smp-drawer ${ce(n)?"smp-drawer-minified":"smp-drawer-fixed"} ${d?"smp-drawer-open":""} ${!ce(n)&&!d?"smp-drawer-no-border":""}`,container:"smp-drawer-container",containerHeader:"smp-drawer-container-header",containerIcon:`${d?"":"smp-drawer-container-icon-close"} smp-drawer-container-icon`,containerLayout:"smp-drawer-container-layout",containerLogo:"smp-drawer-container-logo",backdrop:`smp-drawer-backdrop ${d?"smp-drawer-backdrop-open":""}`};return f&&g.jsxs(g.Fragment,{children:[!ce(n)&&g.jsx("div",{"aria-hidden":"true","aria-label":"drawer-backdrop",className:w.backdrop,onClick:E}),g.jsx("aside",{ref:p,className:w.drawer,style:{height:y},"aria-label":"Drawer","smp-id":"drawer",children:g.jsxs("div",{className:w.container,children:[g.jsxs("div",{className:w.containerHeader,children:[e&&g.jsx("div",{className:w.containerLogo,children:g.jsx(oe,{icon:e,title:"drawer_logo",width:"100%",height:24})}),g.jsx("div",{className:w.containerIcon,children:g.jsx(oe,{icon:ce(n)?"menu_close":"close",title:"drawer_icon",rotated:!d,isInteractable:!0,onClick:T,width:20,height:20})})]}),g.jsx("div",{className:w.containerLayout,children:g.jsx(rt,{layout:r.rows[0].layout,children:Object.values(f).map(D=>g.jsx(Oe,{...D}))})})]})})]})},Cs=({ColumnsNumber:r=1,data:e={},ForceText:t,TextColName:n,TextColor:s="var(--smp-dashList-color-base)",Fillspace:a,FontSize:i,Horizontal:o,ForceIcon:l,IconColName:c,IconColor:f="var(--smp-dashList-color-base)",NumberFormat:u,ForceUM:d,UmColName:m,UmColor:p="var(--smp-dashList-color-base)",ForceValue:y,ValueColName:S,ValueColor:E="var(--smp-dashList-color-base)",SelectLayout:T="1",onClick:w})=>{const O="N/A",b=(e==null?void 0:e.columns)||[],D=(e==null?void 0:e.rows)||[],N=D.length>0,I="--smp-dashList-color",v="smp-layout",R="descr",M="icon",C="um",L="value",F=i||"1em",P="18px",Y="--smp-dashList-columns",z="--smp-dashList-fontSize",J={dash:(G="1")=>{const Z=h(G),re=Z,ne=x(Z,R),fe=x(Z,M),ve=x(Z,C),me=x(Z,L);return{container:re,descr:ne,icon:fe,um:ve,value:me}},dashList:`smp-dash-list ${ce(a)?"smp-dash-list-fill-space":""}
50
+ ${ce(o)?"smp-dash-list-horizontal":""}`},{format:W}=je(),h=G=>`${v}-${G}`,x=(G,Z)=>`${G}__${Z}`,j=G=>`${I}-${G}`,k=G=>{const Z=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(Z.test(G)){const ne=G.match(Z)||[];if((ne==null?void 0:ne.length)>3)return"rgb("+ne[1]+","+ne[2]+","+ne[3]+")"}return G},$=G=>{if(!u)return G;const[Z,re]=A(u).map($e=>parseInt($e||"0")),ne="0,0"+(re?"."+"0".repeat(re):""),fe=W(G,ne,"it");if(!Z)return fe;const[ve,me]=fe.split(",");return ve+(me?`,${me}`:"")},A=G=>G.includes(";")?G.split(";"):[G],U=G=>{const Z=ne=>{var fe;if(ne)return(fe=G==null?void 0:G.cells[ne])==null?void 0:fe.obj.k},re=ne=>{var fe,ve;if(!(b.length<=ne))return(ve=(fe=G==null?void 0:G.cells[b[ne].name])==null?void 0:fe.obj)==null?void 0:ve.k};return{descr:t||Z(n)||re(2)||"",icon:l||Z(c)||re(3)||"",um:d||Z(m)||re(1)||"",value:y||Z(S)||re(0)||""}},H=G=>{w==null||w(G)},B=(G,Z)=>{(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),G.stopPropagation(),H(Z))},K=(G=>{const Z=J.dash(G);return{className:Z,descr:re=>g.jsx("div",{className:Z.descr,children:re},`${G}-${R}`),icon:re=>g.jsx("div",{className:Z.icon,children:g.jsx(oe,{color:f,height:P,icon:re,width:P})},`${G}-${M}`),um:re=>g.jsx("div",{className:Z.um,children:re},`${G}-${C}`),value:re=>g.jsx("div",{className:Z.value,children:re},`${G}-${L}`)}})(T),se=G=>{const{descr:Z,icon:re,um:ne,value:fe}=U(G),ve={[j(R)]:k(s),[j(C)]:k(p),[j(L)]:k(E)},me=[],$e=$(fe);switch(T){case"2":re&&me.push(K.icon(re)),me.push(K.descr(Z)),me.push(K.value(ne?$e+" "+ne:$e));break;default:case"1":me.push(K.descr(Z)),me.push(K.value(ne?$e+" "+ne:$e))}return g.jsx("div",{className:K.className.container,role:"button",style:ve,tabIndex:0,onClick:()=>H(G),onKeyDown:Fr=>B(Fr,G),children:me},G.rowId)},V={[Y]:String(r),[z]:F};return g.jsx("div",{className:J.dashList,style:V,children:N?D.map(G=>se(G)):O})},Qe={"smp-table":"_smp-table_1qmju_1","smp-headerCell":"_smp-headerCell_1qmju_35","smp-resizer":"_smp-resizer_1qmju_44"},Is="_rowContent_20wit_2",Ls="_clickable_20wit_21",ks="_indent_20wit_26",Ps="_toggle_20wit_32",As="_cell_20wit_38",Ns="_leftSection_20wit_46",Ee={rowContent:Is,clickable:Ls,indent:ks,toggle:Ps,cell:As,leftSection:Ns};function et(r){return!!r&&"children"in r}function Ms(r){return!et(r)}function Fs(r){const e=JSON.stringify(r,Object.keys(r).sort());let t=0,n,s;if(e.length===0)return t.toString();for(n=0;n<e.length;n++)s=e.charCodeAt(n),t=(t<<5)-t+s,t|=0;return Math.abs(t).toString()}const Mr=({row:r,columnWidths:e={},level:t=0,rowHeight:n=26,offsetTop:s})=>{var T;const[a,i]=_.useState(!1),o=et(r)&&!!((T=r.children)!=null&&T.length),l=r.cells&&Object.keys(r.cells).length>0,c=o,f=t*20,u=()=>{o&&i(!a)},d={content:`${Ee.rowContent} ${o?Ee.clickable:""}`,toggle:`${Ee.toggle}`,indent:`${Ee.indent}`,cell:`${Ee.cell}`},m=w=>g.jsx(Oe,{...w}),p=()=>g.jsx("span",{className:d.toggle,children:c&&g.jsx(oe,{icon:a?"arrow_drop_right":"arrow_drop_down",width:16})}),y=()=>g.jsx("span",{className:d.indent,style:{width:`${f}px`},"aria-hidden":"true"}),S=()=>{const w=Ms(r)?"":r.decode||(l?"":"Untitled"),O=s??n*t;return g.jsxs("tr",{className:d.content,onClick:u,role:o?"button":"row","aria-expanded":o?!a:void 0,style:{height:`${n}px`,lineHeight:`calc(${n}px - 2*2px)`,transform:`translateY(${O}px)`},children:[et(r)&&g.jsxs("td",{className:Ee.leftSection,style:{height:`${n}px`},children:[y(),p(),g.jsx("span",{className:Ee.rowLabel,children:w})]}),r.cells&&Object.keys(r.cells).length>0&&Object.entries(r.cells).map(([b,D])=>g.jsx("td",{className:d.cell,style:{width:e[b],minWidth:e[b],height:`${n}px`},children:m({...D,id:b})},Fs(D)||b))]})},E=()=>{var w;return a||!o?null:g.jsx(g.Fragment,{children:et(r)&&((w=r.children)==null?void 0:w.map((O,b)=>g.jsx(Mr,{row:O,level:t+1},`child-${b}`)))})};return g.jsxs(g.Fragment,{children:[S(),E()]})},Vs=({label:r,rowHeight:e=28,offsetTop:t=0,level:n=0,onClick:s,isExpanded:a})=>{const i={tr:"smp-groupRow-tr",td:"smp-groupRow-td"};return g.jsx("tr",{className:i.tr,style:{height:e,top:t,lineHeight:`${e}px`},onClick:s,children:g.jsxs("td",{className:i.td,style:{paddingLeft:10+n*20},children:[g.jsx(oe,{icon:a?"arrow_drop_down":"arrow_drop_right",width:16}),g.jsx(_e,{variant:"title",bindValue:r})]})})};function Ys(r,e){const t=new Set(r);return t.has(e)?t.delete(e):t.add(e),t}function Us(r,e){return r.map(t=>{const n=e.find(s=>s.column===t.bindValue);return{column:t.bindValue,visible:(n==null?void 0:n.visible)??!0}})}function Ws(r,e,t,n){const s=[];let a=0;return i(r,0,[]),{flatRows:s,offset:a};function i(u,d,m){if(d>=e.length){f(u);return}const p=e[d].column,y=o(u,p);for(const[S,E]of y){const T=[...m,S],w=l(T,d),O=n.has(w);s.push(c(S,w,d,O)),a+=t,O&&i(E,d+1,T)}}function o(u,d){var p;const m=new Map;for(const y of u){const S=((p=y.cells[d])==null?void 0:p.decode)??"N/D";m.has(S)||m.set(S,[]),m.get(S).push(y)}return m}function l(u,d){return`group-${u.join("-")}-${d}`}function c(u,d,m,p){return{isGroup:!0,value:u,cells:{},rowId:d,level:m,isExpanded:p}}function f(u){for(const d of u)s.push(d),a+=t}}const Bs=({groups:r=[],isDraggable:e=!0,isEditable:t=!0,onChange:n,onDrop:s,onDragOver:a})=>{const i=r.map(o=>({bindValue:o.column}));return g.jsxs("tr",{className:"smp-groupBar-container",onDragOver:a,onDrop:s,children:[g.jsx("td",{children:g.jsx(oe,{icon:"groups"})}),g.jsx("td",{children:g.jsx(It,{elements:i,isEditable:t,isDraggable:e,displayMode:"CodeOnly",onChange:n})})]})},Hs=({columns:r,columnWidths:e})=>g.jsx("tfoot",{children:g.jsx("tr",{children:r.map(t=>t.visible&&g.jsx("td",{className:Qe["smp-headerCell"],style:{width:e[t.name],minWidth:e[t.name],maxWidth:e[t.name]}},t.name))})}),Gs=({columns:r,rows:e,containerRef:t,sizingMode:n})=>{const[s,a]=_.useState({});return _.useEffect(()=>{var i,o;if(!(!r||r.length===0)){if(n==="fixed"){const c=Object.fromEntries(r.map(f=>[f.name,120]));a(c)}else if(n==="fit-grid"){const l=((i=t.current)==null?void 0:i.offsetWidth)||800,c=r.filter(d=>d.visible!==!1),f=l/c.length,u=Object.fromEntries(c.map(d=>[d.name,f]));a(u)}else if(n==="fit-content"){const l={};for(const c of r){if(!c.visible)continue;const f=((o=c.title)==null?void 0:o.length)||0,u=Math.max(...e.map(d=>{var m,p,y,S;return`${((p=(m=d.cells)==null?void 0:m[c.name])==null?void 0:p.decode)||((S=(y=d.cells)==null?void 0:y[c.name])==null?void 0:S.value)||""}`.length}),f);l[c.name]=u*8+24}a(l)}}},[r,e,t,n]),[s,a]},Ks=({data:r,lineHeight:e=28,TableHeight:t=400,groups:n,columnSizingMode:s="fixed",showGroupBar:a=!0})=>{var N;const[i,o]=_.useState(r??{columns:[],rows:[]}),[l,c]=_.useState(n||[]),[f,u]=_.useState(new Set),d=_.useRef(null),[m,p]=Gs({columns:(i==null?void 0:i.columns)??[],rows:(i==null?void 0:i.rows)??[],containerRef:d,sizingMode:s});_.useEffect(()=>{if(l!=null&&l.length&&r.rows){const{flatRows:I}=Ws(r.rows,l,e,f);o({...r,rows:I})}else o(r)},[r,l,f,e]);const y=I=>{c(Us(I,l))},S=I=>{I.preventDefault();const v=I.dataTransfer.getData("text/plain");if(!v||l.some(C=>C.column===v))return;const M=[...l,{column:v,visible:!0}];c(M)},E=I=>{I.preventDefault()},{virtualItems:T,containerProps:w,innerProps:O}=jr({items:(i==null?void 0:i.rows)??[],itemHeight:e,containerHeight:t,overscan:5}),b=(I,v)=>{const R=I.clientX,M=m[v],C=F=>{const P=F.clientX-R,Y=Math.max(50,M+P);p(z=>({...z,[v]:Y}))},L=()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",L)};window.addEventListener("mousemove",C),window.addEventListener("mouseup",L)},D={smpTable:`${Qe["smp-table"]}`,headerCell:`${Qe["smp-headerCell"]}`,resizer:`${Qe["smp-resizer"]}`};return i&&g.jsx("div",{className:D.smpTable,...w,ref:d,children:g.jsxs("table",{children:[g.jsxs("thead",{children:[(n||a)&&g.jsx(Bs,{groups:l,onChange:y,onDrop:S,onDragOver:E}),g.jsx("tr",{children:i.columns&&((N=i.columns)==null?void 0:N.map(I=>I.visible&&g.jsxs("th",{className:D.headerCell,draggable:!0,onDragStart:v=>{v.dataTransfer.setData("text/plain",I.name)},style:{width:m[I.name],minWidth:m[I.name],maxWidth:m[I.name]},children:[g.jsx(_e,{variant:"title",bindValue:I.title}),g.jsx("div",{className:D.resizer,onMouseDown:v=>b(v,I.name),role:"region"})]},I.name)))})]}),g.jsx("tbody",{...O,children:T.map(({item:I,index:v,offsetTop:R})=>{const M=I.rowId||I.value||`${I.isGroup?"group":"row"}-${v}`;return I.isGroup?g.jsx(Vs,{label:I.value||"",rowHeight:e,offsetTop:R,level:I.level,onClick:()=>{const C=I.rowId;C&&u(L=>Ys(L,C))},isExpanded:I.isExpanded},`group-${M}`):g.jsx(Mr,{row:I,columnWidths:m,rowHeight:e,offsetTop:R,isGroup:!1},`row-${M}`)})}),g.jsx(Hs,{columns:i.columns,columnWidths:m})]})})},qs=({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]=_.useState();_.useEffect(()=>{u(()=>{if(!r)return;const y={...r};return e&&(y.shape=e),y.shape==null&&(y.shape=te.TEXT_FIELD),s&&(y.obj=Sn(s)),y})},[r,s,e]);const m={container:`smp-field-container ${ce(t)?`smp-field-position-${n}`:""}`},p=()=>{ce(t)||o==null||o(f)};if(f)return g.jsxs("div",{className:m.container,children:[g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",font:"var(--smp-fontLabel-base)"},children:g.jsx(Oe,{...f,id:"FLD",onChange:u,onOptionsRequest:c,fun:r==null?void 0:r.fun,onBlur:p,label:a,labelPosition:i})}),ce(t)&&g.jsx(Se,{optionalDisplayValue:"Confirm",onClick:()=>l==null?void 0:l(f),bindValue:"Confirm"})]})},zs=r=>(r==null?void 0:r.type)==="SmeupDataTree",Js=r=>(r==null?void 0:r.type)==="SmeupDataTable",Xs=r=>zs(r)?r.children?r.children.map(e=>({id:e.obj.k,label:e.value??""})):[]:Js(r)?r.rows.map(e=>{const t=e.cells||e.cells,[n,s]=Object.keys(t);return{id:t[n].obj.k,label:t[s].value||t[s].obj.k}}):[],Zs=({data:r,id:e,readOnly:t=!1,hiddenSubmitButton:n=!1,updateOnClick:s=!1,decimalSeparator:a=".",optionsHandler:i,onSubmit:o,onCheck:l,onCheckObj:c,onContextMenu:f,onButtonClick:u})=>{var N,I;const[d,m]=_.useState({}),{translate:p}=je(),y=_.useId();_.useEffect(()=>{m(O(r))},[r]);const S=(v,R)=>{m(M=>({...M,[v]:{...M[v],obj:{...M[v].obj,k:R.obj.k},decode:R.decode,data:{...M[v].data,error:void 0},value:R.obj.k}})),s&&(R.shape==te.CHECKBOX||R.shape==te.SWITCH)&&E()},E=v=>{const R=b();o({value:R,cell:v})},T=(v,R)=>{u==null||u({cellId:v,currentState:{type:"SmeupDataTable",columns:r.columns,rows:[{cells:d}]},fun:R||""})},w=async v=>{var R,M;if(d[v].obj.k!=r.rows[0].cells[v].obj.k&&((R=d[v].inputSettings)!=null&&R.checkObject&&c&&((await c({obj:d[v].obj,fun:d[v].fun,cellId:v})).valid||m(L=>({...L,[v]:{...L[v],data:{...L[v].data,error:p(Te.CHECK_OBJECT_WRONG_VALIDATION)}}}))),(M=d[v].inputSettings)!=null&&M.checkValueOnExit)){const C=b();l==null||l({value:C,cell:v})}},O=v=>{var M,C,L;if(!((M=v.rows)!=null&&M.length)||!((C=v.columns)!=null&&C.length))return{};const R=(L=v.rows)==null?void 0:L[0];return v.columns.filter(F=>F.visible??!0).reduce((F,P)=>{const Y={...R.cells[P.name],id:P.name,label:P.title,data:{...R.cells[P.name].data,dSep:a}};return Y.fun&&(Y.onOptionsRequest=async(z,J)=>Xs(await i(z,J,r,P.name))),Y.isEditable==null&&(Y.isEditable=!0),t&&(Y.isEditable=!1),Y.isEditable&&Y.shape==null&&(Y.shape=te.TEXT_FIELD),{...F,[P.name]:Y}},{})},b=()=>({before:r,after:{type:"SmeupDataTable",columns:JSON.parse(JSON.stringify(r.columns)),rows:[{cells:JSON.parse(JSON.stringify(d))}]}}),D=((I=(N=r.setup)==null?void 0:N.commands)==null?void 0:I.map((v,R)=>_.createElement(Oe,{...v,decode:v.value,data:{label:v.value},id:`command-${R}`,key:`command-${R}`,shape:te.BUTTON,onClick:()=>E(v.obj.k)})))||[];return n||D.unshift(g.jsx(Oe,{decode:p(Te.CONFIRM_BUTTON),shape:te.BUTTON,id:"",obj:{t:"",p:"",k:""},data:{submit:!0,label:p(Te.CONFIRM_BUTTON)}},"submit-command")),d&&g.jsxs("form",{"data-component":"input-panel",id:e||y,onSubmit:v=>{v.preventDefault(),E()},children:[g.jsx("div",{style:{padding:"1em 0"},children:g.jsx(rt,{layout:r.rows[0].layout,children:Object.values(d).map(v=>g.jsx(Oe,{...v,onChange:R=>S(v.id,R),onBlur:()=>w(v.id),onContextMenu:f,onClick:()=>{v.shape=="BTN"&&T(v.id,v.fun)},data:{...v.data,autocomplete:"off"}}))})}),D.length>0&&g.jsx(rt,{layout:{sections:[{id:"1",horizontal:!0,justify:"start",content:D.map(v=>({id:v.props.id}))}]},children:D})]})};exports.AppBar=Ds;exports.Autocomplete=Ct;exports.Button=Se;exports.ButtonList=Lr;exports.Checkbox=kr;exports.Combobox=Pr;exports.DashList=Cs;exports.DataTableComponent=Ks;exports.DatePicker=Ar;exports.Drawer=$s;exports.Field=qs;exports.Icon=oe;exports.InputPanel=Zs;exports.Password=Nr;exports.Textfield=we;exports.configurePaths=gn;