@sme.up/ketchup2 2.0.0-SNAPSHOT-20250609101523 → 2.0.0-SNAPSHOT-20250609155313

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.
@@ -1,4 +1,4 @@
1
- "use strict";var wr=Object.defineProperty;var Er=(r,e,t)=>e in r?wr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var ye=(r,e,t)=>Er(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react");function Tr(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const je=Tr(j);var Le={exports:{}},Te={};/**
1
+ "use strict";var Er=Object.defineProperty;var Tr=(r,e,t)=>e in r?Er(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var ye=(r,e,t)=>Tr(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react");function Or(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const Ce=Or(C);var Le={exports:{}},Oe={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var mt;function Or(){if(mt)return Te;mt=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,s,a){var o=null;if(a!==void 0&&(o=""+a),s.key!==void 0&&(o=""+s.key),"key"in s){a={};for(var i in s)i!=="key"&&(a[i]=s[i])}else a=s;return s=a.ref,{$$typeof:r,type:n,key:o,ref:s!==void 0?s:null,props:a}}return Te.Fragment=e,Te.jsx=t,Te.jsxs=t,Te}var Oe={};/**
9
+ */var mt;function Rr(){if(mt)return Oe;mt=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,s,a){var o=null;if(a!==void 0&&(o=""+a),s.key!==void 0&&(o=""+s.key),"key"in s){a={};for(var i in s)i!=="key"&&(a[i]=s[i])}else a=s;return s=a.ref,{$$typeof:r,type:n,key:o,ref:s!==void 0?s:null,props:a}}return Oe.Fragment=e,Oe.jsx=t,Oe.jsxs=t,Oe}var Re={};/**
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 yt;function Rr(){return yt||(yt=1,process.env.NODE_ENV!=="production"&&function(){function r(p){if(p==null)return null;if(typeof p=="function")return p.$$typeof===C?null:p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case y:return"Fragment";case T:return"Profiler";case x:return"StrictMode";case v:return"Suspense";case $:return"SuspenseList";case V:return"Activity"}if(typeof p=="object")switch(typeof p.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),p.$$typeof){case h:return"Portal";case w:return(p.displayName||"Context")+".Provider";case D:return(p._context.displayName||"Context")+".Consumer";case S:var m=p.render;return p=p.displayName,p||(p=m.displayName||m.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case k:return m=p.displayName||null,m!==null?m:r(p.type)||"Memo";case Y:m=p._payload,p=p._init;try{return r(p(m))}catch{}}return null}function e(p){return""+p}function t(p){try{e(p);var m=!1}catch{m=!0}if(m){m=console;var E=m.error,R=typeof Symbol=="function"&&Symbol.toStringTag&&p[Symbol.toStringTag]||p.constructor.name||"Object";return E.call(m,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",R),e(p)}}function n(p){if(p===y)return"<>";if(typeof p=="object"&&p!==null&&p.$$typeof===Y)return"<...>";try{var m=r(p);return m?"<"+m+">":"<...>"}catch{return"<...>"}}function s(){var p=_.A;return p===null?null:p.getOwner()}function a(){return Error("react-stack-top-frame")}function o(p){if(U.call(p,"key")){var m=Object.getOwnPropertyDescriptor(p,"key").get;if(m&&m.isReactWarning)return!1}return p.key!==void 0}function i(p,m){function E(){re||(re=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",m))}E.isReactWarning=!0,Object.defineProperty(p,"key",{get:E,configurable:!0})}function l(){var p=r(this.type);return X[p]||(X[p]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),p=this.props.ref,p!==void 0?p:null}function c(p,m,E,R,O,P,N,M){return E=P.ref,p={$$typeof:g,type:p,key:m,props:P,_owner:O},(E!==void 0?E:null)!==null?Object.defineProperty(p,"ref",{enumerable:!1,get:l}):Object.defineProperty(p,"ref",{enumerable:!1,value:null}),p._store={},Object.defineProperty(p._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(p,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(p,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:N}),Object.defineProperty(p,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.freeze&&(Object.freeze(p.props),Object.freeze(p)),p}function f(p,m,E,R,O,P,N,M){var L=m.children;if(L!==void 0)if(R)if(z(L)){for(R=0;R<L.length;R++)u(L[R]);Object.freeze&&Object.freeze(L)}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(L);if(U.call(m,"key")){L=r(p);var B=Object.keys(m).filter(function(ne){return ne!=="key"});R=0<B.length?"{key: someKey, "+B.join(": ..., ")+": ...}":"{key: someKey}",I[L+R]||(B=0<B.length?"{"+B.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var yt;function Dr(){return yt||(yt=1,process.env.NODE_ENV!=="production"&&function(){function r(p){if(p==null)return null;if(typeof p=="function")return p.$$typeof===j?null:p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case y:return"Fragment";case w:return"Profiler";case x:return"StrictMode";case v:return"Suspense";case P:return"SuspenseList";case V:return"Activity"}if(typeof p=="object")switch(typeof p.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),p.$$typeof){case g:return"Portal";case D:return(p.displayName||"Context")+".Provider";case R:return(p._context.displayName||"Context")+".Consumer";case b:var m=p.render;return p=p.displayName,p||(p=m.displayName||m.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case L:return m=p.displayName||null,m!==null?m:r(p.type)||"Memo";case Y:m=p._payload,p=p._init;try{return r(p(m))}catch{}}return null}function e(p){return""+p}function t(p){try{e(p);var m=!1}catch{m=!0}if(m){m=console;var E=m.error,O=typeof Symbol=="function"&&Symbol.toStringTag&&p[Symbol.toStringTag]||p.constructor.name||"Object";return E.call(m,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",O),e(p)}}function n(p){if(p===y)return"<>";if(typeof p=="object"&&p!==null&&p.$$typeof===Y)return"<...>";try{var m=r(p);return m?"<"+m+">":"<...>"}catch{return"<...>"}}function s(){var p=_.A;return p===null?null:p.getOwner()}function a(){return Error("react-stack-top-frame")}function o(p){if(U.call(p,"key")){var m=Object.getOwnPropertyDescriptor(p,"key").get;if(m&&m.isReactWarning)return!1}return p.key!==void 0}function i(p,m){function E(){re||(re=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",m))}E.isReactWarning=!0,Object.defineProperty(p,"key",{get:E,configurable:!0})}function c(){var p=r(this.type);return X[p]||(X[p]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),p=this.props.ref,p!==void 0?p:null}function l(p,m,E,O,T,$,N,M){return E=$.ref,p={$$typeof:h,type:p,key:m,props:$,_owner:T},(E!==void 0?E:null)!==null?Object.defineProperty(p,"ref",{enumerable:!1,get:c}):Object.defineProperty(p,"ref",{enumerable:!1,value:null}),p._store={},Object.defineProperty(p._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(p,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(p,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:N}),Object.defineProperty(p,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.freeze&&(Object.freeze(p.props),Object.freeze(p)),p}function u(p,m,E,O,T,$,N,M){var k=m.children;if(k!==void 0)if(O)if(z(k)){for(O=0;O<k.length;O++)f(k[O]);Object.freeze&&Object.freeze(k)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(k);if(U.call(m,"key")){k=r(p);var K=Object.keys(m).filter(function(ne){return ne!=="key"});O=0<K.length?"{key: someKey, "+K.join(": ..., ")+": ...}":"{key: someKey}",I[k+O]||(K=0<K.length?"{"+K.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,R,L,B,L),I[L+R]=!0)}if(L=null,E!==void 0&&(t(E),L=""+E),o(m)&&(t(m.key),L=""+m.key),"key"in m){E={};for(var q in m)q!=="key"&&(E[q]=m[q])}else E=m;return L&&i(E,typeof p=="function"?p.displayName||p.name||"Unknown":p),c(p,L,P,O,s(),E,N,M)}function u(p){typeof p=="object"&&p!==null&&p.$$typeof===g&&p._store&&(p._store.validated=1)}var d=j,g=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),w=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),C=Symbol.for("react.client.reference"),_=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.prototype.hasOwnProperty,z=Array.isArray,H=console.createTask?console.createTask:function(){return null};d={"react-stack-bottom-frame":function(p){return p()}};var re,X={},W=d["react-stack-bottom-frame"].bind(d,a)(),G=H(n(a)),I={};Oe.Fragment=y,Oe.jsx=function(p,m,E,R,O){var P=1e4>_.recentlyCreatedOwnerStacks++;return f(p,m,E,!1,R,O,P?Error("react-stack-top-frame"):W,P?H(n(p)):G)},Oe.jsxs=function(p,m,E,R,O){var P=1e4>_.recentlyCreatedOwnerStacks++;return f(p,m,E,!0,R,O,P?Error("react-stack-top-frame"):W,P?H(n(p)):G)}}()),Oe}var vt;function Dr(){return vt||(vt=1,process.env.NODE_ENV==="production"?Le.exports=Or():Le.exports=Rr()),Le.exports}var b=Dr();const oe={AUTOCOMPLETE:"ACP",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",ICON:"ICO",IMAGE:"IMG",MULTI_AUTOCOMPLETE:"AML",SPOTLIGHT:"SPL",TEXT_FIELD:"ITX",PASSWORD:"PWD"},Pr=r=>r.t=="D8",Ar=r=>{if(r){const e=r.split(";");if(e.length==3)return{t:e[0],p:e[1],k:e[2]}}return{t:"",p:"",k:""}};class Ye{constructor(e,t){ye(this,"class");ye(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new Ye(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 $r(r,e){if(ft(r)){const f=new Date(r);if(!isNaN(f.getTime()))return f}const t=new Date,n=r.replaceAll("/","").replaceAll("-","");let s="DDMMYYYY";e==="en"&&(s="MMDDYYYY");const a=s.indexOf("DD"),o=s.indexOf("MM");let i=0,l=0,c="";switch(n.length){case 1:case 2:return i=parseInt(n),t.setDate(i),ke(t)?t:r;case 3:case 4:return i=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),o===0?(t.setMonth(i-1),t.setDate(l)):a===0&&(t.setMonth(l-1),t.setDate(i)),ke(t)?t:r;case 5:case 6:{i=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 o===0?(f=l,u=i-1,t.setFullYear(parseInt(c),u,f)):a===0&&(f=i,u=l-1,t.setFullYear(parseInt(c),u,f)),it(i,u,parseInt(c))&&ke(t)?t:r}case 7:case 8:{i=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),c=n.substring(4);let f=0,u=0;return o===0?(f=l,u=i-1,t.setFullYear(parseInt(c),u,f)):a===0&&(f=i,u=l-1,t.setFullYear(parseInt(c),u,f)),it(f,u,parseInt(c))&&ke(t)?t:r}}return r}function ft(r){return/^\d{4}-\d{2}-\d{2}$/.test(r)&&r.length===10}function ke(r){return r instanceof Date&&!isNaN(r.getTime())}function Cr(r){if(!/^\d{8}$/.test(r))return!1;const e=parseInt(r.slice(0,4),10),t=parseInt(r.slice(4,6),10),n=parseInt(r.slice(6,8),10);return it(n,t-1,e)}function it(r,e,t){const n=[31,jr(t)?29:28,31,30,31,30,31,31,30,31,30,31];return!(e<0||e>11||r<1||r>n[e])}function jr(r){return r%4===0&&(r%100!==0||r%400===0)}function Lr(r){const e=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),n=String(r.getDate()).padStart(2,"0");return isNaN(e)||isNaN(Number(t))||isNaN(Number(n))?r.toString():`${e}-${t}-${n}`}class Ue{constructor(e,t){ye(this,"class");ye(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=bt.get(`${e.t}${e.p}`);if(t)return new Ue(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=bt.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.date}}const bt=new Map([["D8*YYMD",{legacyToIso(r){return Cr(r)&&`${r.substring(0,4)}-${r.substring(4,6)}-${r.substring(6,8)}`||r},isoToLegacy(r){return ft(r)&&r.replaceAll("-","")||r}}]]),We=(r,e)=>{j.useEffect(()=>{const t=n=>{typeof r=="object"&&r!==null&&"current"in r&&r.current&&!r.current.contains(n.target)&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[r,e])};function dt({position:r="bottom",enabled:e=!0}){const t=j.useRef(null),n=j.useRef(null),[s,a]=j.useState(0),o=j.useCallback(()=>{const i=t.current,l=n.current;if(!i||!l)return;const{top:c,left:f,width:u,height:d}=i.getBoundingClientRect();a(u);const g=l.offsetHeight,h=l.offsetWidth;if(h===0||g===0){requestAnimationFrame(o);return}let y=c+window.scrollY,x=f+window.scrollX;switch(r){case"top":y-=g;break;case"bottom":y+=d;break;case"left":x-=h;break;case"right":x+=u;break}requestAnimationFrame(()=>{l.style.transform=`translate(${x}px, ${y}px)`})},[r]);return j.useLayoutEffect(()=>{e&&t.current&&n.current&&o();const i=new MutationObserver(()=>{n.current&&o()});return n.current&&i.observe(n.current,{childList:!0,subtree:!0}),window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0),i.disconnect()}},[o,e]),{anchorRef:t,targetRef:n,anchorWidth:s}}const He=(r,e,t)=>{if(t)switch(t){case"CodeOnly":return r;case"DescOnly":return e||"";case"Both":return`${r} - ${e}`}return r},kr=({helperText:r,disabled:e,state:t})=>{const n={container:`smp-helper-text ${e?"smp-helper-text-disabled":""} ${t?`smp-helper-text-${t}`:""}`};return b.jsx("span",{className:n.container,children:r})},nr=({label:r,disabled:e})=>{const t={container:`smp-label ${e?"smp-label-disabled":""}`};return b.jsx("span",{className:t.container,children:r})};function Ir(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}function qe(){return qe=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},qe.apply(null,arguments)}function ot(r,e){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},ot(r,e)}function Nr(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,ot(r,e)}function Xe(r,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,a;n<s;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||Array.prototype.slice.call(e))}var Ie={};/*!
22
+ <%s key={someKey} {...props} />`,O,k,K,k),I[k+O]=!0)}if(k=null,E!==void 0&&(t(E),k=""+E),o(m)&&(t(m.key),k=""+m.key),"key"in m){E={};for(var q in m)q!=="key"&&(E[q]=m[q])}else E=m;return k&&i(E,typeof p=="function"?p.displayName||p.name||"Unknown":p),l(p,k,$,T,s(),E,N,M)}function f(p){typeof p=="object"&&p!==null&&p.$$typeof===h&&p._store&&(p._store.validated=1)}var d=C,h=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),D=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),j=Symbol.for("react.client.reference"),_=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.prototype.hasOwnProperty,z=Array.isArray,H=console.createTask?console.createTask:function(){return null};d={"react-stack-bottom-frame":function(p){return p()}};var re,X={},W=d["react-stack-bottom-frame"].bind(d,a)(),G=H(n(a)),I={};Re.Fragment=y,Re.jsx=function(p,m,E,O,T){var $=1e4>_.recentlyCreatedOwnerStacks++;return u(p,m,E,!1,O,T,$?Error("react-stack-top-frame"):W,$?H(n(p)):G)},Re.jsxs=function(p,m,E,O,T){var $=1e4>_.recentlyCreatedOwnerStacks++;return u(p,m,E,!0,O,T,$?Error("react-stack-top-frame"):W,$?H(n(p)):G)}}()),Re}var vt;function Pr(){return vt||(vt=1,process.env.NODE_ENV==="production"?Le.exports=Rr():Le.exports=Dr()),Le.exports}var S=Pr();const oe={AUTOCOMPLETE:"ACP",BUTTON_LIST:"BTL",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",ICON:"ICO",IMAGE:"IMG",MULTI_AUTOCOMPLETE:"AML",SPOTLIGHT:"SPL",TEXT_FIELD:"ITX",PASSWORD:"PWD"},$r=r=>r.t=="D8",Ar=r=>{if(r){const e=r.split(";");if(e.length==3)return{t:e[0],p:e[1],k:e[2]}}return{t:"",p:"",k:""}};class Ye{constructor(e,t){ye(this,"class");ye(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new Ye(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 jr(r,e){if(ft(r)){const u=new Date(r);if(!isNaN(u.getTime()))return u}const t=new Date,n=r.replaceAll("/","").replaceAll("-","");let s="DDMMYYYY";e==="en"&&(s="MMDDYYYY");const a=s.indexOf("DD"),o=s.indexOf("MM");let i=0,c=0,l="";switch(n.length){case 1:case 2:return i=parseInt(n),t.setDate(i),ke(t)?t:r;case 3:case 4:return i=parseInt(n.substring(0,2)),c=parseInt(n.substring(2,4)),o===0?(t.setMonth(i-1),t.setDate(c)):a===0&&(t.setMonth(c-1),t.setDate(i)),ke(t)?t:r;case 5:case 6:{i=parseInt(n.substring(0,2)),c=parseInt(n.substring(2,4)),Number(n.substring(4))>50?l="19"+n.substring(4):l="20"+n.substring(4);let u=0,f=0;return o===0?(u=c,f=i-1,t.setFullYear(parseInt(l),f,u)):a===0&&(u=i,f=c-1,t.setFullYear(parseInt(l),f,u)),it(i,f,parseInt(l))&&ke(t)?t:r}case 7:case 8:{i=parseInt(n.substring(0,2)),c=parseInt(n.substring(2,4)),l=n.substring(4);let u=0,f=0;return o===0?(u=c,f=i-1,t.setFullYear(parseInt(l),f,u)):a===0&&(u=i,f=c-1,t.setFullYear(parseInt(l),f,u)),it(u,f,parseInt(l))&&ke(t)?t:r}}return r}function ft(r){return/^\d{4}-\d{2}-\d{2}$/.test(r)&&r.length===10}function ke(r){return r instanceof Date&&!isNaN(r.getTime())}function Cr(r){if(!/^\d{8}$/.test(r))return!1;const e=parseInt(r.slice(0,4),10),t=parseInt(r.slice(4,6),10),n=parseInt(r.slice(6,8),10);return it(n,t-1,e)}function it(r,e,t){const n=[31,Lr(t)?29:28,31,30,31,30,31,31,30,31,30,31];return!(e<0||e>11||r<1||r>n[e])}function Lr(r){return r%4===0&&(r%100!==0||r%400===0)}function kr(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 Ue{constructor(e,t){ye(this,"class");ye(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=bt.get(`${e.t}${e.p}`);if(t)return new Ue(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=bt.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.date}}const bt=new Map([["D8*YYMD",{legacyToIso(r){return Cr(r)&&`${r.substring(0,4)}-${r.substring(4,6)}-${r.substring(6,8)}`||r},isoToLegacy(r){return ft(r)&&r.replaceAll("-","")||r}}]]),We=(r,e)=>{C.useEffect(()=>{const t=n=>{typeof r=="object"&&r!==null&&"current"in r&&r.current&&!r.current.contains(n.target)&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[r,e])};function dt({position:r="bottom",enabled:e=!0}){const t=C.useRef(null),n=C.useRef(null),[s,a]=C.useState(0),o=C.useCallback(()=>{const i=t.current,c=n.current;if(!i||!c)return;const{top:l,left:u,width:f,height:d}=i.getBoundingClientRect();a(f);const h=c.offsetHeight,g=c.offsetWidth;if(g===0||h===0){requestAnimationFrame(o);return}let y=l+window.scrollY,x=u+window.scrollX;switch(r){case"top":y-=h;break;case"bottom":y+=d;break;case"left":x-=g;break;case"right":x+=f;break}requestAnimationFrame(()=>{c.style.transform=`translate(${x}px, ${y}px)`})},[r]);return C.useLayoutEffect(()=>{e&&t.current&&n.current&&o();const i=new MutationObserver(()=>{n.current&&o()});return n.current&&i.observe(n.current,{childList:!0,subtree:!0}),window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0),i.disconnect()}},[o,e]),{anchorRef:t,targetRef:n,anchorWidth:s}}const He=(r,e,t)=>{if(t)switch(t){case"CodeOnly":return r;case"DescOnly":return e||"";case"Both":return`${r} - ${e}`}return r},Ir=({helperText:r,disabled:e,state:t})=>{const n={container:`smp-helper-text ${e?"smp-helper-text-disabled":""} ${t?`smp-helper-text-${t}`:""}`};return S.jsx("span",{className:n.container,children:r})},nr=({label:r,disabled:e})=>{const t={container:`smp-label ${e?"smp-label-disabled":""}`};return S.jsx("span",{className:t.container,children:r})};function Nr(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 qe(){return qe=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},qe.apply(null,arguments)}function ot(r,e){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},ot(r,e)}function _r(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,ot(r,e)}function Xe(r,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,a;n<s;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||Array.prototype.slice.call(e))}var Ie={};/*!
23
23
  * content-type
24
24
  * Copyright(c) 2015 Douglas Christopher Wilson
25
25
  * MIT Licensed
26
- */var xt;function _r(){if(xt)return Ie;xt=1;var r=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,e=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,t=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,n=/\\([\u000b\u0020-\u00ff])/g,s=/([\\"])/g,a=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;Ie.format=o,Ie.parse=i;function o(u){if(!u||typeof u!="object")throw new TypeError("argument obj is required");var d=u.parameters,g=u.type;if(!g||!a.test(g))throw new TypeError("invalid type");var h=g;if(d&&typeof d=="object")for(var y,x=Object.keys(d).sort(),T=0;T<x.length;T++){if(y=x[T],!t.test(y))throw new TypeError("invalid parameter name");h+="; "+y+"="+c(d[y])}return h}function i(u){if(!u)throw new TypeError("argument string is required");var d=typeof u=="object"?l(u):u;if(typeof d!="string")throw new TypeError("argument string is required to be a string");var g=d.indexOf(";"),h=g!==-1?d.slice(0,g).trim():d.trim();if(!a.test(h))throw new TypeError("invalid media type");var y=new f(h.toLowerCase());if(g!==-1){var x,T,D;for(r.lastIndex=g;T=r.exec(d);){if(T.index!==g)throw new TypeError("invalid parameter format");g+=T[0].length,x=T[1].toLowerCase(),D=T[2],D.charCodeAt(0)===34&&(D=D.slice(1,-1),D.indexOf("\\")!==-1&&(D=D.replace(n,"$1"))),y.parameters[x]=D}if(g!==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 Ie}var Mr=_r(),we=new Map,sr=function(e){return e.cloneNode(!0)},St=function(){return window.location.protocol==="file:"},ar=function(e,t,n){var s=new XMLHttpRequest;s.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&s.readyState===2){var a=s.getResponseHeader("Content-Type");if(!a)throw new Error("Content type not found");var o=Mr.parse(a).type;if(!(o==="image/svg+xml"||o==="text/plain"))throw new Error("Invalid content type: ".concat(o))}if(s.readyState===4){if(s.status===404||s.responseXML===null)throw new Error(St()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(s.status===200||St()&&s.status===0)n(null,s);else throw new Error("There was a problem injecting the SVG: "+s.status+" "+s.statusText)}}catch(i){if(s.abort(),i instanceof Error)n(i,s);else throw i}},s.open("GET",e),s.withCredentials=t,s.overrideMimeType&&s.overrideMimeType("text/xml"),s.send()},me={},wt=function(e,t){me[e]=me[e]||[],me[e].push(t)},Fr=function(e){for(var t=function(o,i){setTimeout(function(){if(Array.isArray(me[e])){var l=we.get(e),c=me[e][o];l instanceof SVGSVGElement&&c(null,sr(l)),l instanceof Error&&c(l),o===me[e].length-1&&delete me[e]}},0)},n=0,s=me[e].length;n<s;n++)t(n)},Vr=function(e,t,n){if(we.has(e)){var s=we.get(e);if(s===void 0){wt(e,n);return}if(s instanceof SVGSVGElement){n(null,sr(s));return}}we.set(e,void 0),wt(e,n),ar(e,t,function(a,o){var i;a?we.set(e,a):((i=o.responseXML)===null||i===void 0?void 0:i.documentElement)instanceof SVGSVGElement&&we.set(e,o.responseXML.documentElement),Fr(e)})},Yr=function(e,t,n){ar(e,t,function(s,a){var o;s?n(s):((o=a.responseXML)===null||o===void 0?void 0:o.documentElement)instanceof SVGSVGElement&&n(null,a.responseXML.documentElement)})},Ur=0,Wr=function(){return++Ur},pe=[],Et={},Hr="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xlink",Tt=function(e,t,n,s,a,o,i){var l=e.getAttribute("data-src")||e.getAttribute("src");if(!l){i(new Error("Invalid data-src or src attribute"));return}if(pe.indexOf(e)!==-1){pe.splice(pe.indexOf(e),1),e=null;return}pe.push(e),e.setAttribute("src","");var c=s?Vr:Yr;c(l,a,function(f,u){if(!u){pe.splice(pe.indexOf(e),1),e=null,i(f);return}var d=e.getAttribute("id");d&&u.setAttribute("id",d);var g=e.getAttribute("title");g&&u.setAttribute("title",g);var h=e.getAttribute("width");h&&u.setAttribute("width",h);var y=e.getAttribute("height");y&&u.setAttribute("height",y);var x=Array.from(new Set(Xe(Xe(Xe([],(u.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();u.setAttribute("class",x);var T=e.getAttribute("style");T&&u.setAttribute("style",T),u.setAttribute("data-src",l);var D=[].filter.call(e.attributes,function(G){return/^data-\w[\w-]*$/.test(G.name)});if(Array.prototype.forEach.call(D,function(G){G.name&&G.value&&u.setAttribute(G.name,G.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"]},S,v,$,k,Y;Object.keys(w).forEach(function(G){S=G,$=w[G],v=u.querySelectorAll(S+"[id]");for(var I=function(R,O){k=v[R].id,Y=k+"-"+Wr();var P;Array.prototype.forEach.call($,function(F){P=u.querySelectorAll("["+F+'*="'+k+'"]');for(var J=0,ee=P.length;J<ee;J++){var te=P[J].getAttribute(F);te&&!te.match(new RegExp('url\\("?#'+k+'"?\\)'))||P[J].setAttribute(F,"url(#"+Y+")")}});for(var N=u.querySelectorAll("[*|href]"),M=[],L=0,B=N.length;L<B;L++){var q=N[L].getAttributeNS(Ze,"href");q&&q.toString()==="#"+v[R].id&&M.push(N[L])}for(var ne=0,A=M.length;ne<A;ne++)M[ne].setAttributeNS(Ze,"href","#"+Y);v[R].id=Y},p=0,m=v.length;p<m;p++)I(p)})}u.removeAttribute("xmlns:a");for(var V=u.querySelectorAll("script"),C=[],_,U,z=0,H=V.length;z<H;z++)U=V[z].getAttribute("type"),(!U||U==="application/ecmascript"||U==="application/javascript"||U==="text/javascript")&&(_=V[z].innerText||V[z].textContent,_&&C.push(_),u.removeChild(V[z]));if(C.length>0&&(t==="always"||t==="once"&&!Et[l])){for(var re=0,X=C.length;re<X;re++)new Function(C[re])(window);Et[l]=!0}var W=u.querySelectorAll("style");if(Array.prototype.forEach.call(W,function(G){G.textContent+=""}),u.setAttribute("xmlns",Hr),u.setAttribute("xmlns:xlink",Ze),o(u),!e.parentNode){pe.splice(pe.indexOf(e),1),e=null,i(new Error("Parent node is null"));return}e.parentNode.replaceChild(u,e),pe.splice(pe.indexOf(e),1),e=null,i(null,u)})},qr=function(e,t){var n=t===void 0?{}:t,s=n.afterAll,a=s===void 0?function(){}:s,o=n.afterEach,i=o===void 0?function(){}:o,l=n.beforeEach,c=l===void 0?function(){}:l,f=n.cacheRequests,u=f===void 0?!0:f,d=n.evalScripts,g=d===void 0?"never":d,h=n.httpRequestWithCredentials,y=h===void 0?!1:h,x=n.renumerateIRIElements,T=x===void 0?!0:x;if(e&&"length"in e)for(var D=0,w=0,S=e.length;w<S;w++)Tt(e[w],g,T,u,y,c,function(v,$){i(v,$),e&&"length"in e&&e.length===++D&&a(D)});else e?Tt(e,g,T,u,y,c,function(v,$){i(v,$),a(1),e=null}):a(0)},Ne={exports:{}},_e={exports:{}},Z={};/** @license React v16.13.1
26
+ */var xt;function Mr(){if(xt)return Ie;xt=1;var r=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,e=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,t=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,n=/\\([\u000b\u0020-\u00ff])/g,s=/([\\"])/g,a=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;Ie.format=o,Ie.parse=i;function o(f){if(!f||typeof f!="object")throw new TypeError("argument obj is required");var d=f.parameters,h=f.type;if(!h||!a.test(h))throw new TypeError("invalid type");var g=h;if(d&&typeof d=="object")for(var y,x=Object.keys(d).sort(),w=0;w<x.length;w++){if(y=x[w],!t.test(y))throw new TypeError("invalid parameter name");g+="; "+y+"="+l(d[y])}return g}function i(f){if(!f)throw new TypeError("argument string is required");var d=typeof f=="object"?c(f):f;if(typeof d!="string")throw new TypeError("argument string is required to be a string");var h=d.indexOf(";"),g=h!==-1?d.slice(0,h).trim():d.trim();if(!a.test(g))throw new TypeError("invalid media type");var y=new u(g.toLowerCase());if(h!==-1){var x,w,R;for(r.lastIndex=h;w=r.exec(d);){if(w.index!==h)throw new TypeError("invalid parameter format");h+=w[0].length,x=w[1].toLowerCase(),R=w[2],R.charCodeAt(0)===34&&(R=R.slice(1,-1),R.indexOf("\\")!==-1&&(R=R.replace(n,"$1"))),y.parameters[x]=R}if(h!==d.length)throw new TypeError("invalid parameter format")}return y}function c(f){var d;if(typeof f.getHeader=="function"?d=f.getHeader("content-type"):typeof f.headers=="object"&&(d=f.headers&&f.headers["content-type"]),typeof d!="string")throw new TypeError("content-type header is missing from object");return d}function l(f){var d=String(f);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 u(f){this.parameters=Object.create(null),this.type=f}return Ie}var Fr=Mr(),we=new Map,sr=function(e){return e.cloneNode(!0)},St=function(){return window.location.protocol==="file:"},ar=function(e,t,n){var s=new XMLHttpRequest;s.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&s.readyState===2){var a=s.getResponseHeader("Content-Type");if(!a)throw new Error("Content type not found");var o=Fr.parse(a).type;if(!(o==="image/svg+xml"||o==="text/plain"))throw new Error("Invalid content type: ".concat(o))}if(s.readyState===4){if(s.status===404||s.responseXML===null)throw new Error(St()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(s.status===200||St()&&s.status===0)n(null,s);else throw new Error("There was a problem injecting the SVG: "+s.status+" "+s.statusText)}}catch(i){if(s.abort(),i instanceof Error)n(i,s);else throw i}},s.open("GET",e),s.withCredentials=t,s.overrideMimeType&&s.overrideMimeType("text/xml"),s.send()},me={},wt=function(e,t){me[e]=me[e]||[],me[e].push(t)},Vr=function(e){for(var t=function(o,i){setTimeout(function(){if(Array.isArray(me[e])){var c=we.get(e),l=me[e][o];c instanceof SVGSVGElement&&l(null,sr(c)),c instanceof Error&&l(c),o===me[e].length-1&&delete me[e]}},0)},n=0,s=me[e].length;n<s;n++)t(n)},Yr=function(e,t,n){if(we.has(e)){var s=we.get(e);if(s===void 0){wt(e,n);return}if(s instanceof SVGSVGElement){n(null,sr(s));return}}we.set(e,void 0),wt(e,n),ar(e,t,function(a,o){var i;a?we.set(e,a):((i=o.responseXML)===null||i===void 0?void 0:i.documentElement)instanceof SVGSVGElement&&we.set(e,o.responseXML.documentElement),Vr(e)})},Ur=function(e,t,n){ar(e,t,function(s,a){var o;s?n(s):((o=a.responseXML)===null||o===void 0?void 0:o.documentElement)instanceof SVGSVGElement&&n(null,a.responseXML.documentElement)})},Wr=0,Hr=function(){return++Wr},pe=[],Et={},qr="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xlink",Tt=function(e,t,n,s,a,o,i){var c=e.getAttribute("data-src")||e.getAttribute("src");if(!c){i(new Error("Invalid data-src or src attribute"));return}if(pe.indexOf(e)!==-1){pe.splice(pe.indexOf(e),1),e=null;return}pe.push(e),e.setAttribute("src","");var l=s?Yr:Ur;l(c,a,function(u,f){if(!f){pe.splice(pe.indexOf(e),1),e=null,i(u);return}var d=e.getAttribute("id");d&&f.setAttribute("id",d);var h=e.getAttribute("title");h&&f.setAttribute("title",h);var g=e.getAttribute("width");g&&f.setAttribute("width",g);var y=e.getAttribute("height");y&&f.setAttribute("height",y);var x=Array.from(new Set(Xe(Xe(Xe([],(f.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();f.setAttribute("class",x);var w=e.getAttribute("style");w&&f.setAttribute("style",w),f.setAttribute("data-src",c);var R=[].filter.call(e.attributes,function(G){return/^data-\w[\w-]*$/.test(G.name)});if(Array.prototype.forEach.call(R,function(G){G.name&&G.value&&f.setAttribute(G.name,G.value)}),n){var D={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"]},b,v,P,L,Y;Object.keys(D).forEach(function(G){b=G,P=D[G],v=f.querySelectorAll(b+"[id]");for(var I=function(O,T){L=v[O].id,Y=L+"-"+Hr();var $;Array.prototype.forEach.call(P,function(F){$=f.querySelectorAll("["+F+'*="'+L+'"]');for(var J=0,ee=$.length;J<ee;J++){var te=$[J].getAttribute(F);te&&!te.match(new RegExp('url\\("?#'+L+'"?\\)'))||$[J].setAttribute(F,"url(#"+Y+")")}});for(var N=f.querySelectorAll("[*|href]"),M=[],k=0,K=N.length;k<K;k++){var q=N[k].getAttributeNS(Ze,"href");q&&q.toString()==="#"+v[O].id&&M.push(N[k])}for(var ne=0,A=M.length;ne<A;ne++)M[ne].setAttributeNS(Ze,"href","#"+Y);v[O].id=Y},p=0,m=v.length;p<m;p++)I(p)})}f.removeAttribute("xmlns:a");for(var V=f.querySelectorAll("script"),j=[],_,U,z=0,H=V.length;z<H;z++)U=V[z].getAttribute("type"),(!U||U==="application/ecmascript"||U==="application/javascript"||U==="text/javascript")&&(_=V[z].innerText||V[z].textContent,_&&j.push(_),f.removeChild(V[z]));if(j.length>0&&(t==="always"||t==="once"&&!Et[c])){for(var re=0,X=j.length;re<X;re++)new Function(j[re])(window);Et[c]=!0}var W=f.querySelectorAll("style");if(Array.prototype.forEach.call(W,function(G){G.textContent+=""}),f.setAttribute("xmlns",qr),f.setAttribute("xmlns:xlink",Ze),o(f),!e.parentNode){pe.splice(pe.indexOf(e),1),e=null,i(new Error("Parent node is null"));return}e.parentNode.replaceChild(f,e),pe.splice(pe.indexOf(e),1),e=null,i(null,f)})},Br=function(e,t){var n=t===void 0?{}:t,s=n.afterAll,a=s===void 0?function(){}:s,o=n.afterEach,i=o===void 0?function(){}:o,c=n.beforeEach,l=c===void 0?function(){}:c,u=n.cacheRequests,f=u===void 0?!0:u,d=n.evalScripts,h=d===void 0?"never":d,g=n.httpRequestWithCredentials,y=g===void 0?!1:g,x=n.renumerateIRIElements,w=x===void 0?!0:x;if(e&&"length"in e)for(var R=0,D=0,b=e.length;D<b;D++)Tt(e[D],h,w,f,y,l,function(v,P){i(v,P),e&&"length"in e&&e.length===++R&&a(R)});else e?Tt(e,h,w,f,y,l,function(v,P){i(v,P),a(1),e=null}):a(0)},Ne={exports:{}},_e={exports:{}},Z={};/** @license React v16.13.1
27
27
  * react-is.production.min.js
28
28
  *
29
29
  * Copyright (c) Facebook, Inc. and its affiliates.
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var Ot;function Kr(){if(Ot)return Z;Ot=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,o=r?Symbol.for("react.provider"):60109,i=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,c=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,u=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,x=r?Symbol.for("react.fundamental"):60117,T=r?Symbol.for("react.responder"):60118,D=r?Symbol.for("react.scope"):60119;function w(v){if(typeof v=="object"&&v!==null){var $=v.$$typeof;switch($){case e:switch(v=v.type,v){case l:case c:case n:case a:case s:case u:return v;default:switch(v=v&&v.$$typeof,v){case i:case f:case h:case g:case o:return v;default:return $}}case t:return $}}}function S(v){return w(v)===c}return Z.AsyncMode=l,Z.ConcurrentMode=c,Z.ContextConsumer=i,Z.ContextProvider=o,Z.Element=e,Z.ForwardRef=f,Z.Fragment=n,Z.Lazy=h,Z.Memo=g,Z.Portal=t,Z.Profiler=a,Z.StrictMode=s,Z.Suspense=u,Z.isAsyncMode=function(v){return S(v)||w(v)===l},Z.isConcurrentMode=S,Z.isContextConsumer=function(v){return w(v)===i},Z.isContextProvider=function(v){return w(v)===o},Z.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},Z.isForwardRef=function(v){return w(v)===f},Z.isFragment=function(v){return w(v)===n},Z.isLazy=function(v){return w(v)===h},Z.isMemo=function(v){return w(v)===g},Z.isPortal=function(v){return w(v)===t},Z.isProfiler=function(v){return w(v)===a},Z.isStrictMode=function(v){return w(v)===s},Z.isSuspense=function(v){return w(v)===u},Z.isValidElementType=function(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===h||v.$$typeof===g||v.$$typeof===o||v.$$typeof===i||v.$$typeof===f||v.$$typeof===x||v.$$typeof===T||v.$$typeof===D||v.$$typeof===y)},Z.typeOf=w,Z}var Q={};/** @license React v16.13.1
33
+ */var Ot;function Kr(){if(Ot)return Z;Ot=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,o=r?Symbol.for("react.provider"):60109,i=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,l=r?Symbol.for("react.concurrent_mode"):60111,u=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,h=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,x=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,R=r?Symbol.for("react.scope"):60119;function D(v){if(typeof v=="object"&&v!==null){var P=v.$$typeof;switch(P){case e:switch(v=v.type,v){case c:case l:case n:case a:case s:case f:return v;default:switch(v=v&&v.$$typeof,v){case i:case u:case g:case h:case o:return v;default:return P}}case t:return P}}}function b(v){return D(v)===l}return Z.AsyncMode=c,Z.ConcurrentMode=l,Z.ContextConsumer=i,Z.ContextProvider=o,Z.Element=e,Z.ForwardRef=u,Z.Fragment=n,Z.Lazy=g,Z.Memo=h,Z.Portal=t,Z.Profiler=a,Z.StrictMode=s,Z.Suspense=f,Z.isAsyncMode=function(v){return b(v)||D(v)===c},Z.isConcurrentMode=b,Z.isContextConsumer=function(v){return D(v)===i},Z.isContextProvider=function(v){return D(v)===o},Z.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},Z.isForwardRef=function(v){return D(v)===u},Z.isFragment=function(v){return D(v)===n},Z.isLazy=function(v){return D(v)===g},Z.isMemo=function(v){return D(v)===h},Z.isPortal=function(v){return D(v)===t},Z.isProfiler=function(v){return D(v)===a},Z.isStrictMode=function(v){return D(v)===s},Z.isSuspense=function(v){return D(v)===f},Z.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===n||v===l||v===a||v===s||v===f||v===d||typeof v=="object"&&v!==null&&(v.$$typeof===g||v.$$typeof===h||v.$$typeof===o||v.$$typeof===i||v.$$typeof===u||v.$$typeof===x||v.$$typeof===w||v.$$typeof===R||v.$$typeof===y)},Z.typeOf=D,Z}var Q={};/** @license React v16.13.1
34
34
  * react-is.development.js
35
35
  *
36
36
  * Copyright (c) Facebook, Inc. and its affiliates.
37
37
  *
38
38
  * This source code is licensed under the MIT license found in the
39
39
  * LICENSE file in the root directory of this source tree.
40
- */var Rt;function Br(){return Rt||(Rt=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,o=r?Symbol.for("react.provider"):60109,i=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,c=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,u=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,x=r?Symbol.for("react.fundamental"):60117,T=r?Symbol.for("react.responder"):60118,D=r?Symbol.for("react.scope"):60119;function w(A){return typeof A=="string"||typeof A=="function"||A===n||A===c||A===a||A===s||A===u||A===d||typeof A=="object"&&A!==null&&(A.$$typeof===h||A.$$typeof===g||A.$$typeof===o||A.$$typeof===i||A.$$typeof===f||A.$$typeof===x||A.$$typeof===T||A.$$typeof===D||A.$$typeof===y)}function S(A){if(typeof A=="object"&&A!==null){var F=A.$$typeof;switch(F){case e:var J=A.type;switch(J){case l:case c:case n:case a:case s:case u:return J;default:var ee=J&&J.$$typeof;switch(ee){case i:case f:case h:case g:case o:return ee;default:return F}}case t:return F}}}var v=l,$=c,k=i,Y=o,V=e,C=f,_=n,U=h,z=g,H=t,re=a,X=s,W=u,G=!1;function I(A){return G||(G=!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.")),p(A)||S(A)===l}function p(A){return S(A)===c}function m(A){return S(A)===i}function E(A){return S(A)===o}function R(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function O(A){return S(A)===f}function P(A){return S(A)===n}function N(A){return S(A)===h}function M(A){return S(A)===g}function L(A){return S(A)===t}function B(A){return S(A)===a}function q(A){return S(A)===s}function ne(A){return S(A)===u}Q.AsyncMode=v,Q.ConcurrentMode=$,Q.ContextConsumer=k,Q.ContextProvider=Y,Q.Element=V,Q.ForwardRef=C,Q.Fragment=_,Q.Lazy=U,Q.Memo=z,Q.Portal=H,Q.Profiler=re,Q.StrictMode=X,Q.Suspense=W,Q.isAsyncMode=I,Q.isConcurrentMode=p,Q.isContextConsumer=m,Q.isContextProvider=E,Q.isElement=R,Q.isForwardRef=O,Q.isFragment=P,Q.isLazy=N,Q.isMemo=M,Q.isPortal=L,Q.isProfiler=B,Q.isStrictMode=q,Q.isSuspense=ne,Q.isValidElementType=w,Q.typeOf=S}()),Q}var Dt;function ir(){return Dt||(Dt=1,process.env.NODE_ENV==="production"?_e.exports=Kr():_e.exports=Br()),_e.exports}/*
40
+ */var Rt;function zr(){return Rt||(Rt=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,o=r?Symbol.for("react.provider"):60109,i=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,l=r?Symbol.for("react.concurrent_mode"):60111,u=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,h=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,x=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,R=r?Symbol.for("react.scope"):60119;function D(A){return typeof A=="string"||typeof A=="function"||A===n||A===l||A===a||A===s||A===f||A===d||typeof A=="object"&&A!==null&&(A.$$typeof===g||A.$$typeof===h||A.$$typeof===o||A.$$typeof===i||A.$$typeof===u||A.$$typeof===x||A.$$typeof===w||A.$$typeof===R||A.$$typeof===y)}function b(A){if(typeof A=="object"&&A!==null){var F=A.$$typeof;switch(F){case e:var J=A.type;switch(J){case c:case l:case n:case a:case s:case f:return J;default:var ee=J&&J.$$typeof;switch(ee){case i:case u:case g:case h:case o:return ee;default:return F}}case t:return F}}}var v=c,P=l,L=i,Y=o,V=e,j=u,_=n,U=g,z=h,H=t,re=a,X=s,W=f,G=!1;function I(A){return G||(G=!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.")),p(A)||b(A)===c}function p(A){return b(A)===l}function m(A){return b(A)===i}function E(A){return b(A)===o}function O(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function T(A){return b(A)===u}function $(A){return b(A)===n}function N(A){return b(A)===g}function M(A){return b(A)===h}function k(A){return b(A)===t}function K(A){return b(A)===a}function q(A){return b(A)===s}function ne(A){return b(A)===f}Q.AsyncMode=v,Q.ConcurrentMode=P,Q.ContextConsumer=L,Q.ContextProvider=Y,Q.Element=V,Q.ForwardRef=j,Q.Fragment=_,Q.Lazy=U,Q.Memo=z,Q.Portal=H,Q.Profiler=re,Q.StrictMode=X,Q.Suspense=W,Q.isAsyncMode=I,Q.isConcurrentMode=p,Q.isContextConsumer=m,Q.isContextProvider=E,Q.isElement=O,Q.isForwardRef=T,Q.isFragment=$,Q.isLazy=N,Q.isMemo=M,Q.isPortal=k,Q.isProfiler=K,Q.isStrictMode=q,Q.isSuspense=ne,Q.isValidElementType=D,Q.typeOf=b}()),Q}var Dt;function ir(){return Dt||(Dt=1,process.env.NODE_ENV==="production"?_e.exports=Kr():_e.exports=zr()),_e.exports}/*
41
41
  object-assign
42
42
  (c) Sindre Sorhus
43
43
  @license MIT
44
- */var Qe,Pt;function zr(){if(Pt)return Qe;Pt=1;var r=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function s(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},i=0;i<10;i++)o["_"+String.fromCharCode(i)]=i;var l=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Qe=s()?Object.assign:function(a,o){for(var i,l=n(a),c,f=1;f<arguments.length;f++){i=Object(arguments[f]);for(var u in i)e.call(i,u)&&(l[u]=i[u]);if(r){c=r(i);for(var d=0;d<c.length;d++)t.call(i,c[d])&&(l[c[d]]=i[c[d]])}}return l},Qe}var et,At;function pt(){if(At)return et;At=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return et=r,et}var tt,$t;function or(){return $t||($t=1,tt=Function.call.bind(Object.prototype.hasOwnProperty)),tt}var rt,Ct;function Gr(){if(Ct)return rt;Ct=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var e=pt(),t={},n=or();r=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function s(a,o,i,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")+": "+i+" 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](o,f,l,i,null,e)}catch(h){u=h}if(u&&!(u instanceof Error)&&r((l||"React class")+": type specification of "+i+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in t)){t[u.message]=!0;var g=c?c():"";r("Failed "+i+" type: "+u.message+(g??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},rt=s,rt}var nt,jt;function Jr(){if(jt)return nt;jt=1;var r=ir(),e=zr(),t=pt(),n=or(),s=Gr(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(i){var l="Warning: "+i;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return nt=function(i,l){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function u(p){var m=p&&(c&&p[c]||p[f]);if(typeof m=="function")return m}var d="<<anonymous>>",g={array:T("array"),bigint:T("bigint"),bool:T("boolean"),func:T("function"),number:T("number"),object:T("object"),string:T("string"),symbol:T("symbol"),any:D(),arrayOf:w,element:S(),elementType:v(),instanceOf:$,node:C(),objectOf:Y,oneOf:k,oneOfType:V,shape:U,exact:z};function h(p,m){return p===m?p!==0||1/p===1/m:p!==p&&m!==m}function y(p,m){this.message=p,this.data=m&&typeof m=="object"?m:{},this.stack=""}y.prototype=Error.prototype;function x(p){if(process.env.NODE_ENV!=="production")var m={},E=0;function R(P,N,M,L,B,q,ne){if(L=L||d,q=q||M,ne!==t){if(l){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var F=L+":"+M;!m[F]&&E<3&&(a("You are manually calling a React.PropTypes validation function for the `"+q+"` prop on `"+L+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),m[F]=!0,E++)}}return N[M]==null?P?N[M]===null?new y("The "+B+" `"+q+"` is marked as required "+("in `"+L+"`, but its value is `null`.")):new y("The "+B+" `"+q+"` is marked as required in "+("`"+L+"`, but its value is `undefined`.")):null:p(N,M,L,B,q)}var O=R.bind(null,!1);return O.isRequired=R.bind(null,!0),O}function T(p){function m(E,R,O,P,N,M){var L=E[R],B=X(L);if(B!==p){var q=W(L);return new y("Invalid "+P+" `"+N+"` of type "+("`"+q+"` supplied to `"+O+"`, expected ")+("`"+p+"`."),{expectedType:p})}return null}return x(m)}function D(){return x(o)}function w(p){function m(E,R,O,P,N){if(typeof p!="function")return new y("Property `"+N+"` of component `"+O+"` has invalid PropType notation inside arrayOf.");var M=E[R];if(!Array.isArray(M)){var L=X(M);return new y("Invalid "+P+" `"+N+"` of type "+("`"+L+"` supplied to `"+O+"`, expected an array."))}for(var B=0;B<M.length;B++){var q=p(M,B,O,P,N+"["+B+"]",t);if(q instanceof Error)return q}return null}return x(m)}function S(){function p(m,E,R,O,P){var N=m[E];if(!i(N)){var M=X(N);return new y("Invalid "+O+" `"+P+"` of type "+("`"+M+"` supplied to `"+R+"`, expected a single ReactElement."))}return null}return x(p)}function v(){function p(m,E,R,O,P){var N=m[E];if(!r.isValidElementType(N)){var M=X(N);return new y("Invalid "+O+" `"+P+"` of type "+("`"+M+"` supplied to `"+R+"`, expected a single ReactElement type."))}return null}return x(p)}function $(p){function m(E,R,O,P,N){if(!(E[R]instanceof p)){var M=p.name||d,L=I(E[R]);return new y("Invalid "+P+" `"+N+"` of type "+("`"+L+"` supplied to `"+O+"`, expected ")+("instance of `"+M+"`."))}return null}return x(m)}function k(p){if(!Array.isArray(p))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.")),o;function m(E,R,O,P,N){for(var M=E[R],L=0;L<p.length;L++)if(h(M,p[L]))return null;var B=JSON.stringify(p,function(ne,A){var F=W(A);return F==="symbol"?String(A):A});return new y("Invalid "+P+" `"+N+"` of value `"+String(M)+"` "+("supplied to `"+O+"`, expected one of "+B+"."))}return x(m)}function Y(p){function m(E,R,O,P,N){if(typeof p!="function")return new y("Property `"+N+"` of component `"+O+"` has invalid PropType notation inside objectOf.");var M=E[R],L=X(M);if(L!=="object")return new y("Invalid "+P+" `"+N+"` of type "+("`"+L+"` supplied to `"+O+"`, expected an object."));for(var B in M)if(n(M,B)){var q=p(M,B,O,P,N+"."+B,t);if(q instanceof Error)return q}return null}return x(m)}function V(p){if(!Array.isArray(p))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var m=0;m<p.length;m++){var E=p[m];if(typeof E!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(E)+" at index "+m+"."),o}function R(O,P,N,M,L){for(var B=[],q=0;q<p.length;q++){var ne=p[q],A=ne(O,P,N,M,L,t);if(A==null)return null;A.data&&n(A.data,"expectedType")&&B.push(A.data.expectedType)}var F=B.length>0?", expected one of type ["+B.join(", ")+"]":"";return new y("Invalid "+M+" `"+L+"` supplied to "+("`"+N+"`"+F+"."))}return x(R)}function C(){function p(m,E,R,O,P){return H(m[E])?null:new y("Invalid "+O+" `"+P+"` supplied to "+("`"+R+"`, expected a ReactNode."))}return x(p)}function _(p,m,E,R,O){return new y((p||"React class")+": "+m+" type `"+E+"."+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+O+"`.")}function U(p){function m(E,R,O,P,N){var M=E[R],L=X(M);if(L!=="object")return new y("Invalid "+P+" `"+N+"` of type `"+L+"` "+("supplied to `"+O+"`, expected `object`."));for(var B in p){var q=p[B];if(typeof q!="function")return _(O,P,N,B,W(q));var ne=q(M,B,O,P,N+"."+B,t);if(ne)return ne}return null}return x(m)}function z(p){function m(E,R,O,P,N){var M=E[R],L=X(M);if(L!=="object")return new y("Invalid "+P+" `"+N+"` of type `"+L+"` "+("supplied to `"+O+"`, expected `object`."));var B=e({},E[R],p);for(var q in B){var ne=p[q];if(n(p,q)&&typeof ne!="function")return _(O,P,N,q,W(ne));if(!ne)return new y("Invalid "+P+" `"+N+"` key `"+q+"` supplied to `"+O+"`.\nBad object: "+JSON.stringify(E[R],null," ")+`
45
- Valid keys: `+JSON.stringify(Object.keys(p),null," "));var A=ne(M,q,O,P,N+"."+q,t);if(A)return A}return null}return x(m)}function H(p){switch(typeof p){case"number":case"string":case"undefined":return!0;case"boolean":return!p;case"object":if(Array.isArray(p))return p.every(H);if(p===null||i(p))return!0;var m=u(p);if(m){var E=m.call(p),R;if(m!==p.entries){for(;!(R=E.next()).done;)if(!H(R.value))return!1}else for(;!(R=E.next()).done;){var O=R.value;if(O&&!H(O[1]))return!1}}else return!1;return!0;default:return!1}}function re(p,m){return p==="symbol"?!0:m?m["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&m instanceof Symbol:!1}function X(p){var m=typeof p;return Array.isArray(p)?"array":p instanceof RegExp?"object":re(m,p)?"symbol":m}function W(p){if(typeof p>"u"||p===null)return""+p;var m=X(p);if(m==="object"){if(p instanceof Date)return"date";if(p instanceof RegExp)return"regexp"}return m}function G(p){var m=W(p);switch(m){case"array":case"object":return"an "+m;case"boolean":case"date":case"regexp":return"a "+m;default:return m}}function I(p){return!p.constructor||!p.constructor.name?d:p.constructor.name}return g.checkPropTypes=s,g.resetWarningCache=s.resetWarningCache,g.PropTypes=g,g},nt}var st,Lt;function Xr(){if(Lt)return st;Lt=1;var r=pt();function e(){}function t(){}return t.resetWarningCache=e,st=function(){function n(o,i,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},st}var kt;function Zr(){if(kt)return Ne.exports;if(kt=1,process.env.NODE_ENV!=="production"){var r=ir(),e=!0;Ne.exports=Jr()(r.isElement,e)}else Ne.exports=Xr()();return Ne.exports}var ae=Zr(),Qr=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},en=function(e,t){for(var n in e)if(!(n in t))return!0;for(var s in t)if(e[s]!==t[s])return!0;return!1},tn=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Me="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xlink",Ee=function(r){function e(){for(var n,s=arguments.length,a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];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(i){n.reactWrapper=i},n}Nr(e,r);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof Qr(this.reactWrapper).Node){var a=this.props,o=a.desc,i=a.evalScripts,l=a.httpRequestWithCredentials,c=a.renumerateIRIElements,f=a.src,u=a.title,d=a.useRequestCache,g=this.props.onError,h=this.props.beforeInjection,y=this.props.afterInjection,x=this.props.wrapper,T,D;x==="svg"?(T=document.createElementNS(Me,x),T.setAttribute("xmlns",Me),T.setAttribute("xmlns:xlink",It),D=document.createElementNS(Me,x)):(T=document.createElement(x),D=document.createElement(x)),T.appendChild(D),D.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(T);var w=function(k){if(s.removeSVG(),!s._isMounted){g(k);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){g(k)})},S=function(k,Y){if(k){w(k);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{y(Y)}catch(V){w(V)}})},v=function(k){if(k.setAttribute("role","img"),o){var Y=k.querySelector(":scope > desc");Y&&k.removeChild(Y);var V=document.createElement("desc");V.innerHTML=o,k.prepend(V)}if(u){var C=k.querySelector(":scope > title");C&&k.removeChild(C);var _=document.createElement("title");_.innerHTML=u,k.prepend(_)}try{h(k)}catch(U){w(U)}};qr(D,{afterEach:S,beforeEach:v,cacheRequests:d,evalScripts:i,httpRequestWithCredentials:l,renumerateIRIElements:c})}},t.removeSVG=function(){var s;(s=this.nonReactWrapper)!=null&&s.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},t.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},t.componentDidUpdate=function(s){var a=this;en(qe({},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 o=s.loading;s.renumerateIRIElements,s.src,s.title,s.useRequestCache;var i=s.wrapper,l=Ir(s,tn),c=i;return je.createElement(c,qe({},l,{ref:this.refCallback},i==="svg"?{xmlns:Me,xmlnsXlink:It}:{}),this.state.isLoading&&o&&je.createElement(o,null),this.state.hasError&&a&&je.createElement(a,null))},e}(je.Component);Ee.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Ee.propTypes={afterInjection:ae.func,beforeInjection:ae.func,desc:ae.string,evalScripts:ae.oneOf(["always","once","never"]),fallback:ae.oneOfType([ae.func,ae.object,ae.string]),httpRequestWithCredentials:ae.bool,loading:ae.oneOfType([ae.func,ae.object,ae.string]),onError:ae.func,renumerateIRIElements:ae.bool,src:ae.string.isRequired,title:ae.string,useRequestCache:ae.bool,wrapper:ae.oneOf(["div","span","svg"])};let lt={assets:"/"};const rn=r=>{lt={...lt,...r}},Nt=r=>`${lt.assets}/${r}`.replace(/\/+/g,"/"),ce=j.memo(({icon:r,width:e,height:t,placeholderIcon:n,color:s,disabled:a,state:o="base",rotated:i=!1,onClick:l,isInteractable:c=!1,spin:f=!1,title:u})=>{const[d,g]=j.useState(r),h=(r==null?void 0:r.startsWith("http"))||(r==null?void 0:r.startsWith("/")),y=h&&(r==null?void 0:r.toLowerCase().endsWith(".svg")),x=Nt(`assets/svg/${r}.svg`),T=Nt(`assets/svg/${n}.svg`),D={img:`${c?"smp-image-interactable":""}`,svg:`smp-icon ${o?`smp-icon-${o}`:""} ${i?"smp-icon-rotated":""} ${c?"smp-icon-interactable":""} ${f?"smp-icon-spin":""}`},w=()=>{!a&&l&&l()};return b.jsx(b.Fragment,{children:y?b.jsx(Ee,{src:r,fallback:()=>b.jsx(Ee,{src:T,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:u,role:"application",fill:s,"aria-disabled":a,className:D.svg,onClick:w}):h?b.jsx("img",{src:d,width:e||"16px",height:t||"auto",alt:u,onError:()=>g(T),onClick:w,className:D.img,title:u,onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&w()}}):b.jsx(Ee,{src:x,fallback:()=>b.jsx(Ee,{src:T,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:u,role:"application",fill:s,"aria-disabled":a,className:D.svg,onClick:w})})}),be=({disabled:r,readOnly:e,bindValue:t,icon:n,onBlur:s,onChange:a,placeholder:o,shapeIcon:i,sizing:l,state:c,variant:f,rotatedShapeIcon:u=!1,onShapeIconClick:d,ref:g,inputRef:h,onKeyDown:y,inputType:x="text",ariaLabel:T="input field",label:D,helperText:w=!1,error:S,appearance:v="base",fullWidth:$=!1,_dataComponent:k="textfield",width:Y})=>{const V=S?"danger":c,C=S||c=="danger"?"error":i,_=w||!!S,U=re=>{a==null||a(re.target.value)},z={wrapper:`smp-textfield-wrapper ${$?"smp-textfield-fullWidth":""}`,container:`smp-textfield ${r?"smp-textfield-disabled":""} ${e?"smp-textfield-readOnly":""} ${o?"smp-textfield-placeholder":""} ${l?`smp-textfield-${l}`:""} ${V?`smp-textfield-${V}`:""} ${f?`smp-textfield-variant-${f}`:""} ${v?`smp-textfield-${v}`:""}`,input:"smp-textfield-input "},H=Y?{"--smp-textField-width-base":Y}:void 0;return b.jsxs("div",{className:z.wrapper,"data-component":k,children:[D&&b.jsx(nr,{label:D,disabled:r}),b.jsxs("div",{className:z.container,ref:g,style:H,children:[n&&b.jsx(ce,{icon:n,disabled:r}),b.jsx("input",{type:x,value:t,placeholder:o,onChange:U,onBlur:s,className:z.input,disabled:r,readOnly:e,onKeyDown:y,"aria-label":T,ref:h}),C&&b.jsx(ce,{icon:C,disabled:r,state:V,onClick:d,rotated:u})]}),_&&b.jsx(kr,{helperText:S,disabled:r,state:V})]})};function nn({items:r,itemHeight:e,containerHeight:t,overscan:n=5}){const[s,a]=j.useState(0),o=j.useRef(null),i=r.length*e,l=Math.max(0,Math.floor(s/e)-n),c=Math.min(r.length-1,Math.floor((s+t)/e)+n),f=[];for(let g=l;g<=c;g++)f.push({item:r[g],index:g,offsetTop:g*e});const u=j.useCallback(g=>{const h=g.target.scrollTop;a(h)},[]),d=g=>{if(!o.current)return;const h=g*e,y=h+e,x=o.current,T=x.scrollTop,D=T+t;h<T?x.scrollTop=h:y>D&&(x.scrollTop=y-t)};return{virtualItems:f,containerProps:{ref:o,style:{maxHeight:`${t}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:u},innerProps:{style:{height:`${i}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:s,viewportHeight:t,totalHeight:i,startIndex:l,endIndex:c},scrollToIndex:d}}const sn=10,lr=({id:r,options:e,displayMode:t,ref:n,showFilter:s,selectedIndex:a=null,activeIndex:o=[],width:i,onClick:l,onKeyDown:c})=>{var C;const[f,u]=j.useState(""),d=24,[g,h]=j.useState(a!==null?a:-1),y=s!==void 0?s:e.length>sn,x=f?e.filter(_=>_.label.toLowerCase().includes(f.toLowerCase())):e,T=_=>{u(_)},{virtualItems:D,containerProps:w,innerProps:S,scrollToIndex:v}=nn({items:x,itemHeight:d,containerHeight:200,overscan:5});j.useEffect(()=>{a!==null&&a!==g&&h(a)},[a]),j.useEffect(()=>{g>=0&&g<x.length&&v(g)},[g,x]);const $=_=>{if(_.key==="ArrowDown"||_.key==="ArrowUp"){_.preventDefault();let U=g;_.key==="ArrowDown"?U=g<x.length-1?g+1:0:_.key==="ArrowUp"&&(U=g>0?g-1:x.length-1),h(U)}else _.key==="Enter"?g>=0&&g<x.length&&(l==null||l(x[g])):_.key==="Escape"&&(_.preventDefault(),_.stopPropagation());c&&c(_)},k=_=>{$(_)},Y=_=>{$(_)},V={wrapper:"smp-list",container:"smp-list-container",virtualScroll:"smp-list-virtualScroll",listItem:"smp-list-listItem"};return b.jsxs("div",{id:r,ref:n,className:V.wrapper,"data-component":"list",style:{width:i},children:[y&&b.jsx(be,{bindValue:f,placeholder:"Search...",onChange:T,onKeyDown:k}),b.jsx("div",{...w,className:V.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:Y,"aria-activedescendant":g>=0&&g<x.length?(C=x[g])==null?void 0:C.id:void 0,children:b.jsx("div",{...S,className:V.virtualScroll,children:D.map(({item:_,index:U,offsetTop:z})=>{const H=o.includes(_.id);return b.jsxs("li",{role:"option",id:_.id,"aria-selected":g===U?"true":"false",tabIndex:-1,className:`${V.listItem} ${g===U?"selected-item":""}`,"aria-label":_.id+"-"+_.label,style:{height:`${d}px`,lineHeight:`calc(${d}px - 2*2px)`,transform:`translateY(${z}px)`},onClick:()=>{l==null||l(_),h(U)},children:[He(_.id,_.label,t),H&&b.jsx(ce,{icon:"check",width:16})]},_.id)})})})]})},cr=({displayMode:r,bindValue:e,optionalDisplayValue:t,...n})=>{const[s,a]=j.useState(He(e,t,r));return j.useEffect(()=>{a(e)},[e]),j.useEffect(()=>{a(He(e,t,r))},[t,r]),b.jsx(be,{...n,bindValue:s})},an=r=>{const e=j.useRef(null);return j.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),n=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{n()},r)}},ht=({bindValue:r,optionalDisplayValue:e,options:t,displayMode:n,listDisplayMode:s="Both",minimumChars:a=3,placeholder:o,fun:i,_changeOnEnter:l=!1,onChange:c,onOptionsRequest:f,_multiActiveIndex:u,...d})=>{const[g,h]=j.useState(r),[y,x]=j.useState(e),[T,D]=j.useState(!1),[w,S]=j.useState(t||[]),[v,$]=j.useState(0),[k,Y]=j.useState([r]),{anchorRef:V,targetRef:C,anchorWidth:_}=dt({position:"bottom",enabled:T});We(C,()=>D(!1));const U=an(400),z=W=>{W.length>=a?i&&f&&U(async()=>{const G=await f(i,W);S(G),$(G.length>0?0:-1),D(!0)}):D(!1),h(W),x(e),l||c==null||c(W,e)},H=W=>{l?(h(""),x("")):(h(W.id),x(W.label)),c==null||c(W.id,W.label);const G=w.findIndex(I=>I.id===W.id);$(G),Y([W.id]),D(!1)},re=W=>{W.key==="Escape"&&(D(!1),$(-1))},X=W=>{if((W.key==="ArrowDown"||W.key==="ArrowUp")&&(W.preventDefault(),T)){const G=W.key==="ArrowDown"?(v+1)%w.length:(v-1+w.length)%w.length;$(G)}switch(W.key){case"Enter":v>=0&&v<w.length?H(w[v]):l&&(c==null||c(g,""),D(!1),h(""),x(""));break;case"Escape":D(!1),$(-1);break}};return b.jsxs("div",{"data-component":"autocomplete",children:[b.jsx(cr,{...d,bindValue:g,optionalDisplayValue:y,displayMode:n,shapeIcon:"magnify",placeholder:o,ref:V,onChange:z,onKeyDown:X,"aria-autocomplete":"list"}),T&&b.jsx(lr,{options:w,displayMode:s,onClick:H,ref:C,selectedIndex:v,activeIndex:u||k,width:_,showFilter:!1,onKeyDown:re})]})},_t=r=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[r],Mt=r=>({primary:"onPrimary",danger:"onDanger",base:"base"})[r],Ae=({bindValue:r,onClick:e,ariaLabel:t,icon:n,disabled:s,sizing:a="base",variant:o="primary",appearance:i="raised",showIcon:l=!0,showText:c=!0,fullWidth:f=!1,loading:u=!1,title:d,optionalDisplayValue:g})=>{const h={container:`smp-button smp-button-container ${a?`smp-button-${a}`:""} ${o?`smp-buttonVariant-${o}`:""} ${i?`smp-buttonType-${i}`:""} ${f?"smp-button-fullWidth":""}`};return b.jsx("button",{"data-component":"button",className:h.container,onClick:e,"aria-label":t,disabled:s,"aria-busy":u,title:d||g,children:u?b.jsx(ce,{icon:"spinner",state:Mt(o),spin:!0}):b.jsxs(b.Fragment,{children:[n&&l&&b.jsx(ce,{icon:n,disabled:s,state:Mt(o),width:_t(a),height:_t(a)}),c&&r&&b.jsx("span",{children:r})]})})},ur=({bindValue:r,onChange:e,onBlur:t})=>{const n=s=>{e&&e(s.target.checked)};return b.jsx("input",{"data-component":"checkbox",type:"checkbox",checked:r,onChange:n,onBlur:t})},on={titleLarge:"h2",title:"h3",body:"h6",label:"label"},ln=({variant:r="body",bindValue:e,color:t,...n})=>{const s=on[r],a={container:`smp-typography ${r?`smp-typography-${r}`:""} ${n.disabled?"smp-typography-disabled":""}`};return b.jsx(s,{className:a.container,disabled:n.disabled,style:{"--smp-typography-color-base":t},children:e})},fr=({elements:r,isEditable:e=!1,displayMode:t="Both",onChange:n,color:s,backgroundColor:a,isDraggable:o=!1})=>{const[i,l]=j.useState(null),c={container:`${["smp-chips-container"]}`,element:"smp-chips-element"},f=g=>{n==null||n(r.filter((h,y)=>y!==g))},u=g=>{l(g)},d=g=>{if(i===null||i===g)return;const h=[...r],[y]=h.splice(i,1);h.splice(g,0,y),n==null||n(h),l(null)};return b.jsx("div",{className:c.container,role:"list","data-component":"chip",children:r.flatMap((g,h)=>{const y=He(g.bindValue,g.optionalDisplayValue,t),x=b.jsxs("div",{className:c.element,role:"listitem",draggable:o,onDragStart:()=>u(h),onDragOver:D=>o&&D.preventDefault(),onDrop:()=>o&&d(h),style:{"--smp-chips-backgroundColor-base":a},children:[o&&b.jsx(ce,{icon:"drag_indicator_horizontal",isInteractable:!0}),b.jsx(ln,{variant:"label",bindValue:y,color:s}),e&&b.jsx(ce,{icon:"close",isInteractable:!0,onClick:()=>f(h),color:s})]},`chip-${h}`),T=o&&h<r.length-1?b.jsx(ce,{icon:"chevron-right",color:s},`separator-${h}`):null;return[x,T].filter(Boolean)})})};function dr(r,e){const t=j.useRef(null);j.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 o=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())},i=c=>{if(n&&!n.contains(c.target)){c.preventDefault();const f=s();f.length>0&&f[0].focus()}};document.addEventListener("keydown",o),document.addEventListener("mousedown",i);const l=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.removeEventListener("mousedown",i),document.body.style.overflow=l,t.current&&requestAnimationFrame(()=>{var c;(c=t.current)==null||c.focus()})}},[r,e])}const pr=({bindValue:r,onChange:e,options:t=[],optionalDisplayValue:n,displayMode:s,listDisplayMode:a="Both",fun:o,onOptionsRequest:i,multiActiveIndex:l,...c})=>{const[f,u]=j.useState(!1),[d,g]=j.useState(t),[h,y]=j.useState(-1),[x,T]=j.useState([r]),D=j.useId(),{anchorRef:w,targetRef:S,anchorWidth:v}=dt({position:"bottom",enabled:f});We(S,()=>u(!1)),dr(f,S);const $=C=>{e==null||e(C.id,C.label);const _=d.findIndex(U=>U.id===C.id);y(_),T([C.id]),u(!1)},k=C=>{C.key==="Escape"&&(u(!1),y(-1))},Y=C=>{(C.key==="ArrowDown"||C.key==="ArrowUp")&&(C.preventDefault(),V())},V=()=>{o&&i&&i(o,void 0).then(C=>{g(C),y(C.length>0?0:-1),u(!0)})};return b.jsxs("div",{role:"combobox","aria-expanded":f,"aria-controls":D,"aria-owns":D,"data-component":"combobox",children:[b.jsx(cr,{...c,bindValue:r,optionalDisplayValue:n,displayMode:s,onShapeIconClick:V,onKeyDown:Y,shapeIcon:"arrow_drop_down",rotatedShapeIcon:f,readOnly:!0,ref:w,"aria-autocomplete":"list",variant:"notSelectable"}),f&&b.jsx(lr,{id:D,options:d,displayMode:a,ref:S,selectedIndex:h,activeIndex:l||x,width:v,onClick:$,onKeyDown:k})]})},K=r=>typeof r=="string",Re=()=>{let r,e;const t=new Promise((n,s)=>{r=n,e=s});return t.resolve=r,t.reject=e,t},Ft=r=>r==null?"":""+r,cn=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},un=/###/g,Vt=r=>r&&r.indexOf("###")>-1?r.replace(un,"."):r,Yt=r=>!r||K(r),De=(r,e,t)=>{const n=K(e)?e.split("."):e;let s=0;for(;s<n.length-1;){if(Yt(r))return{};const a=Vt(n[s]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++s}return Yt(r)?{}:{obj:r,k:Vt(n[s])}},Ut=(r,e,t)=>{const{obj:n,k:s}=De(r,e,Object);if(n!==void 0||e.length===1){n[s]=t;return}let a=e[e.length-1],o=e.slice(0,e.length-1),i=De(r,o,Object);for(;i.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),i=De(r,o,Object),i!=null&&i.obj&&typeof i.obj[`${i.k}.${a}`]<"u"&&(i.obj=void 0);i.obj[`${i.k}.${a}`]=t},fn=(r,e,t,n)=>{const{obj:s,k:a}=De(r,e,Object);s[a]=s[a]||[],s[a].push(t)},Ke=(r,e)=>{const{obj:t,k:n}=De(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},dn=(r,e,t)=>{const n=Ke(r,t);return n!==void 0?n:Ke(e,t)},hr=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?K(r[n])||r[n]instanceof String||K(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):hr(r[n],e[n],t):r[n]=e[n]);return r},Se=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var pn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const hn=r=>K(r)?r.replace(/[&<>"'\/]/g,e=>pn[e]):r;class gn{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const mn=[" ",",","?","!",";"],yn=new gn(20),vn=(r,e,t)=>{e=e||"",t=t||"";const n=mn.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(n.length===0)return!0;const s=yn.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!s.test(r);if(!a){const o=r.indexOf(t);o>0&&!s.test(r.substring(0,o))&&(a=!0)}return a},ct=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const n=e.split(t);let s=r;for(let a=0;a<n.length;){if(!s||typeof s!="object")return;let o,i="";for(let l=a;l<n.length;++l)if(l!==a&&(i+=t),i+=n[l],o=s[i],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<n.length-1)continue;a+=l-a+1;break}s=o}return s},$e=r=>r==null?void 0:r.replace("_","-"),bn={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,n;(n=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||n.call(t,console,e)}};class Be{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||bn,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,s){return s&&!this.debug?null:(K(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Be(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Be(this.logger,e)}}var he=new Be;class Ge{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 o=0;o<a;o++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,a])=>{for(let o=0;o<a;o++)s.apply(s,[e,...t])})}}class Wt extends Ge{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,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let i;e.indexOf(".")>-1?i=e.split("."):(i=[e,t],n&&(Array.isArray(n)?i.push(...n):K(n)&&a?i.push(...n.split(a)):i.push(n)));const l=Ke(this.data,i);return!l&&!t&&!n&&e.indexOf(".")>-1&&(e=i[0],t=i[1],n=i.slice(2).join(".")),l||!o||!K(n)?l:ct((f=(c=this.data)==null?void 0:c[e])==null?void 0:f[t],n,a)}addResource(e,t,n,s,a={silent:!1}){const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let i=[e,t];n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split("."),s=t,t=i[1]),this.addNamespaces(t),Ut(this.data,i,s),a.silent||this.emit("added",e,t,n,s)}addResources(e,t,n,s={silent:!1}){for(const a in n)(K(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,o={silent:!1,skipCopy:!1}){let i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),s=n,n=t,t=i[1]),this.addNamespaces(t);let l=Ke(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?hr(l,n,a):l={...l,...n},Ut(this.data,i,l),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var gr={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,s){return r.forEach(a=>{var o;e=((o=this.processors[a])==null?void 0:o.process(e,t,n,s))??e}),e}};const Ht={},qt=r=>!K(r)&&typeof r!="boolean"&&typeof r!="number";class ze extends Ge{constructor(e,t={}){super(),cn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=he.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 o=n&&e.indexOf(n)>-1,i=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!vn(e,n,s);if(o&&!i){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:K(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:K(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,o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:i,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}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:`${c}${f}${i}`:a?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:i;const g=this.resolve(e,s);let h=g==null?void 0:g.res;const y=(g==null?void 0:g.usedKey)||i,x=(g==null?void 0:g.exactUsedKey)||i,T=["[object Number]","[object Function]","[object RegExp]"],D=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,S=s.count!==void 0&&!K(s.count),v=ze.hasDefaultValue(s),$=S?this.pluralResolver.getSuffix(u,s.count,s):"",k=s.ordinal&&S?this.pluralResolver.getSuffix(u,s.count,{ordinal:!1}):"",Y=S&&!s.ordinal&&s.count===0,V=Y&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${$}`]||s[`defaultValue${k}`]||s.defaultValue;let C=h;w&&!h&&v&&(C=V);const _=qt(C),U=Object.prototype.toString.apply(C);if(w&&C&&_&&T.indexOf(U)<0&&!(K(D)&&Array.isArray(C))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const z=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,C,{...s,ns:l}):`key '${i} (${this.language})' returned an object instead of string.`;return a?(g.res=z,g.usedParams=this.getUsedParamsDetails(s),g):z}if(o){const z=Array.isArray(C),H=z?[]:{},re=z?x:y;for(const X in C)if(Object.prototype.hasOwnProperty.call(C,X)){const W=`${re}${o}${X}`;v&&!h?H[X]=this.translate(W,{...s,defaultValue:qt(V)?V[X]:void 0,joinArrays:!1,ns:l}):H[X]=this.translate(W,{...s,joinArrays:!1,ns:l}),H[X]===W&&(H[X]=C[X])}h=H}}else if(w&&K(D)&&Array.isArray(h))h=h.join(D),h&&(h=this.extendTranslation(h,e,s,n));else{let z=!1,H=!1;!this.isValidLookup(h)&&v&&(z=!0,h=V),this.isValidLookup(h)||(H=!0,h=i);const X=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&H?void 0:h,W=v&&V!==h&&this.options.updateMissing;if(H||z||W){if(this.logger.log(W?"updateKey":"missingKey",u,c,i,W?V:h),o){const m=this.resolve(i,{...s,keySeparator:!1});m&&m.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let G=[];const I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&I&&I[0])for(let m=0;m<I.length;m++)G.push(I[m]);else this.options.saveMissingTo==="all"?G=this.languageUtils.toResolveHierarchy(s.lng||this.language):G.push(s.lng||this.language);const p=(m,E,R)=>{var P;const O=v&&R!==h?R:X;this.options.missingKeyHandler?this.options.missingKeyHandler(m,c,E,O,W,s):(P=this.backendConnector)!=null&&P.saveMissing&&this.backendConnector.saveMissing(m,c,E,O,W,s),this.emit("missingKey",m,c,E,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?G.forEach(m=>{const E=this.pluralResolver.getSuffixes(m,s);Y&&s[`defaultValue${this.options.pluralSeparator}zero`]&&E.indexOf(`${this.options.pluralSeparator}zero`)<0&&E.push(`${this.options.pluralSeparator}zero`),E.forEach(R=>{p([m],i+R,s[`defaultValue${R}`]||V)})}):p(G,i,V))}h=this.extendTranslation(h,e,s,g,n),H&&h===i&&this.options.appendNamespaceToMissingKey&&(h=`${c}${f}${i}`),(H||z)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${f}${i}`:i,z?h:void 0,s))}return a?(g.res=h,g.usedParams=this.getUsedParamsDetails(s),g):h}extendTranslation(e,t,n,s,a){var l,c;if((l=this.i18nFormat)!=null&&l.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const f=K(e)&&(((c=n==null?void 0:n.interpolation)==null?void 0:c.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(f){const g=e.match(this.interpolator.nestingRegexp);u=g&&g.length}let d=n.replace&&!K(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language||s.usedLng,n),f){const g=e.match(this.interpolator.nestingRegexp),h=g&&g.length;u<h&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...g)=>(a==null?void 0:a[0])===g[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${t[0]}`),null):this.translate(...g,t),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,i=K(o)?[o]:o;return e!=null&&(i!=null&&i.length)&&n.applyPostProcessor!==!1&&(e=gr.handle(i,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,s,a,o,i;return K(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&&!K(t.count),g=d&&!t.ordinal&&t.count===0,h=t.context!==void 0&&(K(t.context)||typeof t.context=="number")&&t.context!=="",y=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(x=>{var T,D;this.isValidLookup(n)||(i=x,!Ht[`${y[0]}-${x}`]&&((T=this.utils)!=null&&T.hasLoadedNamespace)&&!((D=this.utils)!=null&&D.hasLoadedNamespace(i))&&(Ht[`${y[0]}-${x}`]=!0,this.logger.warn(`key "${s}" for languages "${y.join(", ")}" won't get resolved as namespace "${i}" 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 $;if(this.isValidLookup(n))return;o=w;const S=[f];if(($=this.i18nFormat)!=null&&$.addLookupKeys)this.i18nFormat.addLookupKeys(S,f,w,x,t);else{let k;d&&(k=this.pluralResolver.getSuffix(w,t.count,t));const Y=`${this.options.pluralSeparator}zero`,V=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(S.push(f+k),t.ordinal&&k.indexOf(V)===0&&S.push(f+k.replace(V,this.options.pluralSeparator)),g&&S.push(f+Y)),h){const C=`${f}${this.options.contextSeparator}${t.context}`;S.push(C),d&&(S.push(C+k),t.ordinal&&k.indexOf(V)===0&&S.push(C+k.replace(V,this.options.pluralSeparator)),g&&S.push(C+Y))}}let v;for(;v=S.pop();)this.isValidLookup(n)||(a=v,n=this.getResource(w,x,v,t))}))})}),{res:n,usedKey:s,exactUsedKey:a,usedLng:o,usedNS:i}}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&&!K(e.replace);let s=n?e.replace:e;if(n&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const a of t)delete s[a]}return s}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}class Kt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=he.create("languageUtils")}getScriptPartFromCode(e){if(e=$e(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=$e(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(K(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(o=>{if(o===a)return o;if(!(o.indexOf("-")<0&&a.indexOf("-")<0)&&(o.indexOf("-")>0&&a.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===a||o.indexOf(a)===0&&a.length>1))return o})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),K(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=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return K(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))):K(e)&&a(this.formatLanguageCode(e)),n.forEach(o=>{s.indexOf(o)<0&&a(this.formatLanguageCode(o))}),s}}const Bt={zero:0,one:1,two:2,few:3,many:4,other:5},zt={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class xn{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=he.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=$e(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 o;try{o=new Intl.PluralRules(n,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),zt;if(!e.match(/-|_/))return zt;const l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,t)}return this.pluralRulesCache[a]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((s,a)=>Bt[s]-Bt[a]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,n={}){const s=this.getRule(e,n);return s?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Gt=(r,e,t,n=".",s=!0)=>{let a=dn(r,e,t);return!a&&s&&K(t)&&(a=ct(r,t,n),a===void 0&&(a=ct(e,t,n))),a},at=r=>r.replace(/\$/g,"$$$$");class Sn{constructor(e={}){var t;this.logger=he.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:o,suffix:i,suffixEscaped:l,formatSeparator:c,unescapeSuffix:f,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:g,nestingSuffix:h,nestingSuffixEscaped:y,nestingOptionsSeparator:x,maxReplaces:T,alwaysFormat:D}=e.interpolation;this.escape=t!==void 0?t:hn,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?Se(a):o||"{{",this.suffix=i?Se(i):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?Se(d):g||Se("$t("),this.nestingSuffix=h?Se(h):y||Se(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=T||1e3,this.alwaysFormat=D!==void 0?D:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>(t==null?void 0:t.source)===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,s){var g;let a,o,i;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=h=>{if(h.indexOf(this.formatSeparator)<0){const D=Gt(t,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(D,void 0,n,{...s,...t,interpolationkey:h}):D}const y=h.split(this.formatSeparator),x=y.shift().trim(),T=y.join(this.formatSeparator).trim();return this.format(Gt(t,l,x,this.options.keySeparator,this.options.ignoreJSONStructure),T,n,{...s,...t,interpolationkey:x})};this.resetRegExp();const f=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,u=((g=s==null?void 0:s.interpolation)==null?void 0:g.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>at(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?at(this.escape(h)):at(h)}].forEach(h=>{for(i=0;a=h.regex.exec(e);){const y=a[1].trim();if(o=c(y),o===void 0)if(typeof f=="function"){const T=f(e,a,s);o=K(T)?T:""}else if(s&&Object.prototype.hasOwnProperty.call(s,y))o="";else if(u){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),o="";else!K(o)&&!this.useRawValueToEscape&&(o=Ft(o));const x=h.safeValue(o);if(e=e.replace(a[0],x),u?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=a[0].length):h.regex.lastIndex=0,i++,i>=this.maxReplaces)break}}),e}nest(e,t,n={}){let s,a,o;const i=(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,o);const g=d.match(/'/g),h=d.match(/"/g);(((g==null?void 0:g.length)??0)%2===0&&!h||h.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),c&&(o={...c,...o})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,y),`${l}${f}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];o={...n},o=o.replace&&!K(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.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(i.call(this,s[1].trim(),o),o),a&&s[0]===e&&!K(a))return a;K(a)||(a=Ft(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),a=""),c&&(a=l.reduce((f,u)=>this.format(f,u,n.lng,{...n,interpolationkey:s[1].trim()}),a.trim())),e=e.replace(s[0],a),this.regexp.lastIndex=0}return e}}const wn=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(o=>{if(o){const[i,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),f=i.trim();t[f]||(t[f]=c),c==="false"&&(t[f]=!1),c==="true"&&(t[f]=!0),isNaN(c)||(t[f]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},Jt=r=>{const e={};return(t,n,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});const o=n+JSON.stringify(a);let i=e[o];return i||(i=r($e(n),s),e[o]=i),i(t)}},En=r=>(e,t,n)=>r($e(t),n)(e);class Tn{constructor(e={}){this.logger=he.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Jt:En;this.formats={number:n((s,a)=>{const o=new Intl.NumberFormat(s,{...a});return i=>o.format(i)}),currency:n((s,a)=>{const o=new Intl.NumberFormat(s,{...a,style:"currency"});return i=>o.format(i)}),datetime:n((s,a)=>{const o=new Intl.DateTimeFormat(s,{...a});return i=>o.format(i)}),relativetime:n((s,a)=>{const o=new Intl.RelativeTimeFormat(s,{...a});return i=>o.format(i,a.range||"day")}),list:n((s,a)=>{const o=new Intl.ListFormat(s,{...a});return i=>o.format(i)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Jt(t)}format(e,t,n,s={}){const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(i=>i.indexOf(")")>-1)){const i=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,i)].join(this.formatSeparator)}return a.reduce((i,l)=>{var u;const{formatName:c,formatOptions:f}=wn(l);if(this.formats[c]){let d=i;try{const g=((u=s==null?void 0:s.formatParams)==null?void 0:u[s.interpolationkey])||{},h=g.locale||g.lng||s.locale||s.lng||n;d=this.formats[c](i,h,{...f,...s,...g})}catch(g){this.logger.warn(g)}return d}else this.logger.warn(`there was no format function for ${c}`);return i},e)}}const On=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Rn extends Ge{constructor(e,t,n,s={}){var a,o;super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=he.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=[],(o=(a=this.backend)==null?void 0:a.init)==null||o.call(a,n,s.backend,s)}queueLoad(e,t,n,s){const a={},o={},i={},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?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,f=!1,o[d]===void 0&&(o[d]=!0),a[d]===void 0&&(a[d]=!0),l[u]===void 0&&(l[u]=!0)))}),f||(i[c]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){const s=e.split("|"),a=s[0],o=s[1];t&&this.emit("failedLoading",a,o,t),!t&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const i={};this.queue.forEach(l=>{fn(l.loaded,[a],o),On(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{i[c]||(i[c]={});const f=l.loaded[c];f.length&&f.forEach(u=>{i[c][u]===void 0&&(i[c][u]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(l=>!l.done)}read(e,t,n,s=0,a=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:a,callback:o});return}this.readingCalls++;const i=(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,o)},a);return}o(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=>i(null,f)).catch(i):i(null,c)}catch(c){i(c)}return}return l(e,t,i)}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();K(e)&&(e=this.languageUtils.toResolveHierarchy(e)),K(t)&&(t=[t]);const a=this.queueLoad(e,t,n,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}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,(o,i)=>{o&&this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`,o),!o&&i&&this.logger.log(`${t}loaded namespace ${a} for language ${s}`,i),this.loaded(e,o,i)})}saveMissing(e,t,n,s,a,o={},i=()=>{}){var l,c,f,u,d;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((u=(f=this.services)==null?void 0:f.utils)!=null&&u.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((d=this.backend)!=null&&d.create){const g={...o,isUpdate:a},h=this.backend.create.bind(this.backend);if(h.length<6)try{let y;h.length===5?y=h(e,t,n,s,g):y=h(e,t,n,s),y&&typeof y.then=="function"?y.then(x=>i(null,x)).catch(i):i(null,y)}catch(y){i(y)}else h(e,t,n,s,i,g)}!e||!e[0]||this.store.addResource(e[0],t,n,s)}}}const Xt=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),K(r[1])&&(e.defaultValue=r[1]),K(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Zt=r=>{var e,t;return K(r.ns)&&(r.ns=[r.ns]),K(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),K(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},Fe=()=>{},Dn=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class Ce extends Ge{constructor(e={},t){if(super(),this.options=Zt(e),this.services={},this.logger=he,this.modules={external:[]},Dn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(K(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=Xt();this.options={...n,...this.options,...Zt(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?he.init(s(this.modules.logger),this.options):he.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Tn;const f=new Kt(this.options);this.store=new Wt(this.options.resources,this.options);const u=this.services;u.logger=he,u.resourceStore=this.store,u.languageUtils=f,u.pluralResolver=new xn(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(u.formatter=s(c),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new Sn(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new Rn(s(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",(d,...g)=>{this.emit(d,...g)}),this.modules.languageDetector&&(u.languageDetector=s(this.modules.languageDetector),u.languageDetector.init&&u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=s(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new ze(this.services,this.options),this.translator.on("*",(d,...g)=>{this.emit(d,...g)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Fe),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 i=Re(),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),i.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),i}loadResources(e,t=Fe){var a,o;let n=t;const s=K(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 i=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};s?l(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>l(f)),(o=(a=this.options.preload)==null?void 0:a.forEach)==null||o.call(a,c=>l(c)),this.services.backendConnector.load(i,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(c)})}else n(null)}reloadResources(e,t,n){const s=Re();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=Fe),this.services.backendConnector.reload(e,t,a=>{s.resolve(),n(a)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&gr.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=Re();this.emit("languageChanging",e);const s=i=>{this.language=i,this.languages=this.services.languageUtils.toResolveHierarchy(i),this.resolvedLanguage=void 0,this.setResolvedLanguage(i)},a=(i,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(i,(...c)=>this.t(...c))},o=i=>{var f,u;!e&&!i&&this.services.languageDetector&&(i=[]);const l=K(i)?i:i&&i[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(K(i)?[i]:i);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?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),n}getFixedT(e,t,n){const s=(a,o,...i)=>{let l;typeof o!="object"?l=this.options.overloadTranslationOptionHandler([a,o].concat(i)):l={...o},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 K(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 o=(i,l)=>{const c=this.services.backendConnector.state[`${i}|${l}`];return c===-1||c===0||c===2};if(t.precheck){const i=t.precheck(this,o);if(i!==void 0)return i}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!s||o(a,e)))}loadNamespaces(e,t){const n=Re();return this.options.ns?(K(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=Re();K(e)&&(e=[e]);const s=this.options.preload||[],a=e.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=s.concat(a),this.loadResources(o=>{n.resolve(),t&&t(o)}),n):(t&&t(),Promise.resolve())}dir(e){var s,a;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((a=this.services)==null?void 0:a.languageUtils)||new Kt(Xt());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new Ce(e,t)}cloneInstance(e={},t=Fe){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new Ce(s);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(i=>{a[i]=this[i]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const i=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((f,u)=>(f[u]={...l[c][u]},f),l[c]),l),{});a.store=new Wt(i,s),a.services.resourceStore=a.store}return a.translator=new ze(a.services,s),a.translator.on("*",(i,...l)=>{a.emit(i,...l)}),a.init(s,t),a.translator.options=s,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const se=Ce.createInstance();se.createInstance=Ce.createInstance;se.createInstance;se.dir;se.init;se.loadResources;se.reloadResources;se.use;se.changeLanguage;se.getFixedT;se.t;se.exists;se.setDefaultNamespace;se.hasLoadedNamespace;se.loadNamespaces;se.loadLanguages;const Pn={Friday:"Venerdì",FridayShort:"Ven",Monday:"Lunedì",MondayShort:"Lun",Saturday:"Sabato",SaturdayShort:"Sab",Sunday:"Domenica",SundayShort:"Dom",Tuesday:"Martedì",TuesdayShort:"Mar",Thursday:"Giovedì",ThursdayShort:"Gio",Wednesday:"Mercoledì",WednesdayShort:"Mer"},An={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},$n={CalendarFor:"Calendario per",Close:"Chiudi",SpotlightDefaultPlaceholder:"Esegui Comando"},Cn={Date:{NextDay:"Giorno Successivo",NextMonth:"Mese Successivo",NextWeek:"Settimana Successiva",NextYear:"Anno Successivo",PreviousDay:"Giorno Precedente",PreviousMonth:"Mese Precedente",PreviousWeek:"Settimana Precedente",PreviousYear:"Anno Precedente",Today:"Oggi",Tomorrow:"Domani",Yesterday:"Ieri"},Day:Pn,Month:An,Generic:$n},jn={Friday:"Friday",FridayShort:"Fri",Monday:"Monday",MondayShort:"Mon",Saturday:"Saturday",SaturdayShort:"Sat",Sunday:"Sunday",SundayShort:"Sun",Tuesday:"Tuesday",TuesdayShort:"Tue",Thursday:"Thursday",ThursdayShort:"Thu",Wednesday:"Wednesday",WednesdayShort:"Wed"},Ln={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},kn={CalendarFor:"Calendar for",Close:"Close",SpotlightDefaultPlaceholder:"Execute Command"},In={Date:{NextDay:"Next Day",NextMonth:"Next Month",NextWeek:"Next Week",NextYear:"Next Year",PreviousDay:"Previous Day",PreviousMonth:"Previous Month",PreviousWeek:"Previous Week",PreviousYear:"Previous Year",Today:"Today",Tomorrow:"Tomorrow",Yesterday:"Yesterday"},Day:jn,Month:Ln,Generic:kn};function Qt(r,e){return new RegExp(Nn(r),e)}function Nn(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _n(r,e,t,n){let s=e;const a=Mn(r,t);if(!s){const i=Math.abs(a);i-Math.floor(i)?s="0,0.00":s="0,0"}const o=Fn(s);return new Intl.NumberFormat(n,o).format(a)}function Mn(r,e,t,n,s){let a=r;if(typeof a!="number"){let i;e&&n===void 0?i=",":i=".";const l=i=="."?",":".";a=a.replace(Qt(l,"g"),""),a=a.replace(Qt(i,"g"),"."),a=Number(a)}const o=Number(a);return isNaN(o)?NaN:o}function Fn(r){const e={};r.includes(",")?e.useGrouping=!0:e.useGrouping=!1;const t=r.indexOf(".");if(t>-1){const s=(r.substring(t+1).match(/0/g)||[]).length;e.minimumFractionDigits=s,e.maximumFractionDigits=s}else e.minimumFractionDigits=0,e.maximumFractionDigits=0;return e}se.init({lng:typeof navigator<"u"&&navigator.language.split("-")[0]||"en",fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(r,e,t,n)=>{const s=(n==null?void 0:n.type)??"number";try{switch(s){case"date":{const a=r instanceof Date?r:new Date(r);return new Intl.DateTimeFormat(t,{dateStyle:e||"short"}).format(a)}default:case"number":{const a=(n==null?void 0:n.inputIsLocalized)??!1;return _n(r,e,a,t)}}}catch{return r}}},resources:{en:{translation:In},it:{translation:Cn}}});const Vn=(r,e,t,n)=>se.format(r,e,t||se.language,n),Yn=(r,e)=>se.t(r,e);function Je(){const r=j.useCallback((n,s,a,o)=>Vn(n,s,a||void 0,o),[]),e=j.useCallback(()=>se.languages[0],[]),t=j.useCallback((n,s)=>Yn(n,s),[]);return{format:r,getCurrentLanguage:e,translate:t}}var gt=(r=>(r.CALENDAR_FOR="Date.CalendarFor",r.CLOSE="Generic.Close",r.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",r))(gt||{}),ie=(r=>(r.MONDAY="Day.Monday",r.MONDAY_SHORT="Day.MondayShort",r.TUESDAY="Day.Tuesday",r.TUESDAY_SHORT="Day.TuesdayShort",r.WEDNESDAY="Day.Wednesday",r.WEDNESDAY_SHORT="Day.WednesdayShort",r.THURSDAY="Day.Thursday",r.THURSDAY_SHORT="Day.ThursdayShort",r.FRIDAY="Day.Friday",r.FRIDAY_SHORT="Day.FridayShort",r.SATURDAY="Day.Saturday",r.SATURDAY_SHORT="Day.SaturdayShort",r.SUNDAY="Day.Sunday",r.SUNDAY_SHORT="Day.SundayShort",r))(ie||{}),le=(r=>(r.JANUARY="Month.January",r.FEBRUARY="Month.February",r.MARCH="Month.March",r.APRIL="Month.April",r.MAY="Month.May",r.JUNE="Month.June",r.JULY="Month.July",r.AUGUST="Month.August",r.SEPTEMBER="Month.September",r.OCTOBER="Month.October",r.NOVEMBER="Month.November",r.DECEMBER="Month.December",r))(le||{}),ut=(r=>(r.PREVIOUS_DAY="Date.PreviousDay",r.PREVIOUS_WEEK="Date.PreviousWeek",r.PREVIOUS_MONTH="Date.PreviousMonth",r.PREVIOUS_YEAR="Date.PreviousYear",r.NEXT_DAY="Date.NextDay",r.NEXT_WEEK="Date.NextWeek",r.NEXT_MONTH="Date.NextMonth",r.NEXT_YEAR="Date.NextYear",r.YESTERDAY="Date.Yesterday",r.TODAY="Date.Today",r.TOMORROW="Date.Tomorrow",r))(ut||{});function Un({selectedDate:r,onDateChange:e,disabledDateRanges:t=[],initialValue:n,targetRef:s}){const{translate:a}=Je(),o=()=>{if(!n)return;const I=new Date(n);return isNaN(I.getTime())?void 0:I},[i]=j.useState(new Date),[l,c]=j.useState(r||o()||new Date),[f,u]=j.useState(l?l.getMonth():new Date().getMonth()),[d,g]=j.useState(l?l.getFullYear():new Date().getFullYear()),[h,y]=j.useState(l?l.getDate():null),x=j.useRef(null),T=j.useRef([]),D=[a(le.JANUARY),a(le.FEBRUARY),a(le.MARCH),a(le.APRIL),a(le.MAY),a(le.JUNE),a(le.JULY),a(le.AUGUST),a(le.SEPTEMBER),a(le.OCTOBER),a(le.NOVEMBER),a(le.DECEMBER)],w=[{value:a(ie.SUNDAY_SHORT),full:a(ie.SUNDAY)},{value:a(ie.MONDAY_SHORT),full:a(ie.MONDAY)},{value:a(ie.TUESDAY_SHORT),full:a(ie.TUESDAY)},{value:a(ie.WEDNESDAY_SHORT),full:a(ie.WEDNESDAY)},{value:a(ie.THURSDAY_SHORT),full:a(ie.THURSDAY)},{value:a(ie.FRIDAY_SHORT),full:a(ie.FRIDAY)},{value:a(ie.SATURDAY_SHORT),full:a(ie.SATURDAY)}],S=I=>t.some(p=>{const m=p.start.getTime(),E=p.end.getTime(),R=I.getTime();return R>=m&&R<=E}),v=I=>{S(I)||(c(I),y(I.getDate()),e&&e(Lr(I)))},$=()=>{f===0?(u(11),g(d-1)):u(f-1),y(1)},k=()=>{f===11?(u(0),g(d+1)):u(f+1),y(1)},Y=(I,p)=>new Date(I,p+1,0).getDate(),V=(I,p)=>new Date(I,p,1).getDay(),C=I=>{var m;const p=H.findIndex(E=>E!==null&&E.getDate()===I);p!==-1&&T.current[p]&&((m=T.current[p])==null||m.focus(),y(I))},_=(I,p)=>{const m=H[p];if(!m)return;const E=Y(d,f),R=m.getDate();switch(I.key){case"ArrowRight":I.preventDefault();{let O=R+1,P=new Date(d,f,O);if(O>E){const N=f===11?d+1:d,M=f===11?0:f+1;O=1,P=new Date(N,M,O),k(),setTimeout(()=>{U(1,"forward")},0);return}S(P)?U(O,"forward"):C(O)}break;case"Tab":break;case"ArrowLeft":I.preventDefault();{let O=R-1,P=new Date(d,f,O);if(O<1){const N=f===0?d-1:d,M=f===0?11:f-1,L=Y(N,M);O=L,P=new Date(N,M,O),$(),setTimeout(()=>{U(L,"backward")},0);return}S(P)?U(O,"backward"):C(O)}break;case"ArrowUp":I.preventDefault();{let O=R-7,P=new Date(d,f,O);if(O<1){const N=f===0?d-1:d,M=f===0?11:f-1;O=Y(N,M)+O,P=new Date(N,M,O),$(),setTimeout(()=>{U(O,"backward")},0);return}S(P)?U(O,"backward"):C(O)}break;case"ArrowDown":I.preventDefault();{let O=R+7,P=new Date(d,f,O);if(O>E){const N=f===11?d+1:d,M=f===11?0:f+1;O=O-E,P=new Date(N,M,O),k(),setTimeout(()=>{U(O,"forward")},0);return}S(P)?U(O,"forward"):C(O)}break;case"Home":I.preventDefault(),U(1,"forward");break;case"End":I.preventDefault(),U(E,"backward");break;case"PageUp":I.preventDefault(),$(),setTimeout(()=>{const O=Y(f===0?d-1:d,f===0?11:f-1),P=Math.min(R,O);U(P,"forward")},0);break;case"PageDown":I.preventDefault(),k(),setTimeout(()=>{const O=Y(f===11?d+1:d,f===11?0:f+1),P=Math.min(R,O);U(P,"forward")},0);break;case" ":case"Space":if(S(m))return;y(m.getDate()),c(m);break;case"Enter":I.preventDefault(),v(m);break}},U=(I,p)=>{const m=Y(d,f);if(p==="forward"){for(let E=I;E<=m;E++){const R=new Date(d,f,E);if(!S(R)){C(E);return}}k(),setTimeout(()=>{U(1,"forward")},0)}else{for(let P=I;P>=1;P--){const N=new Date(d,f,P);if(!S(N)){C(P);return}}const E=f===0?d-1:d,R=f===0?11:f-1,O=Y(E,R);$(),setTimeout(()=>{U(O,"backward")},0)}},H=(()=>{const I=Y(d,f),p=V(d,f),m=[];for(let E=0;E<p;E++)m.push(null);for(let E=1;E<=I;E++){const R=new Date(d,f,E);m.push(R)}return m})(),re=[];let X=[];H.forEach((I,p)=>{if(X.push(I),X.length===7||p===H.length-1){for(;X.length<7;)X.push(null);re.push(X),X=[]}}),j.useEffect(()=>{var I;if(h!==null){const p=H.findIndex(m=>m!==null&&m.getDate()===h);p!==-1&&T.current[p]&&((I=T.current[p])==null||I.focus())}},[f,d,h,H]);const W={label:"smp-datepickercalendar-label",wrapper:"smp-datepickercalendar",calendar:"smp-datepickercalendar",table:"smp-datepickercalendar-table",th:"smp-datepickercalendar-th",td:(I,p,m,E)=>`smp-datepickercalendar-td
44
+ */var Qe,Pt;function Gr(){if(Pt)return Qe;Pt=1;var r=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function s(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},i=0;i<10;i++)o["_"+String.fromCharCode(i)]=i;var c=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(u){l[u]=u}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Qe=s()?Object.assign:function(a,o){for(var i,c=n(a),l,u=1;u<arguments.length;u++){i=Object(arguments[u]);for(var f in i)e.call(i,f)&&(c[f]=i[f]);if(r){l=r(i);for(var d=0;d<l.length;d++)t.call(i,l[d])&&(c[l[d]]=i[l[d]])}}return c},Qe}var et,$t;function pt(){if($t)return et;$t=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return et=r,et}var tt,At;function or(){return At||(At=1,tt=Function.call.bind(Object.prototype.hasOwnProperty)),tt}var rt,jt;function Jr(){if(jt)return rt;jt=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var e=pt(),t={},n=or();r=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function s(a,o,i,c,l){if(process.env.NODE_ENV!=="production"){for(var u in a)if(n(a,u)){var f;try{if(typeof a[u]!="function"){var d=Error((c||"React class")+": "+i+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=a[u](o,u,c,i,null,e)}catch(g){f=g}if(f&&!(f instanceof Error)&&r((c||"React class")+": type specification of "+i+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in t)){t[f.message]=!0;var h=l?l():"";r("Failed "+i+" type: "+f.message+(h??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},rt=s,rt}var nt,Ct;function Xr(){if(Ct)return nt;Ct=1;var r=ir(),e=Gr(),t=pt(),n=or(),s=Jr(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(i){var c="Warning: "+i;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function o(){return null}return nt=function(i,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(p){var m=p&&(l&&p[l]||p[u]);if(typeof m=="function")return m}var d="<<anonymous>>",h={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:R(),arrayOf:D,element:b(),elementType:v(),instanceOf:P,node:j(),objectOf:Y,oneOf:L,oneOfType:V,shape:U,exact:z};function g(p,m){return p===m?p!==0||1/p===1/m:p!==p&&m!==m}function y(p,m){this.message=p,this.data=m&&typeof m=="object"?m:{},this.stack=""}y.prototype=Error.prototype;function x(p){if(process.env.NODE_ENV!=="production")var m={},E=0;function O($,N,M,k,K,q,ne){if(k=k||d,q=q||M,ne!==t){if(c){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var F=k+":"+M;!m[F]&&E<3&&(a("You are manually calling a React.PropTypes validation function for the `"+q+"` prop on `"+k+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),m[F]=!0,E++)}}return N[M]==null?$?N[M]===null?new y("The "+K+" `"+q+"` is marked as required "+("in `"+k+"`, but its value is `null`.")):new y("The "+K+" `"+q+"` is marked as required in "+("`"+k+"`, but its value is `undefined`.")):null:p(N,M,k,K,q)}var T=O.bind(null,!1);return T.isRequired=O.bind(null,!0),T}function w(p){function m(E,O,T,$,N,M){var k=E[O],K=X(k);if(K!==p){var q=W(k);return new y("Invalid "+$+" `"+N+"` of type "+("`"+q+"` supplied to `"+T+"`, expected ")+("`"+p+"`."),{expectedType:p})}return null}return x(m)}function R(){return x(o)}function D(p){function m(E,O,T,$,N){if(typeof p!="function")return new y("Property `"+N+"` of component `"+T+"` has invalid PropType notation inside arrayOf.");var M=E[O];if(!Array.isArray(M)){var k=X(M);return new y("Invalid "+$+" `"+N+"` of type "+("`"+k+"` supplied to `"+T+"`, expected an array."))}for(var K=0;K<M.length;K++){var q=p(M,K,T,$,N+"["+K+"]",t);if(q instanceof Error)return q}return null}return x(m)}function b(){function p(m,E,O,T,$){var N=m[E];if(!i(N)){var M=X(N);return new y("Invalid "+T+" `"+$+"` of type "+("`"+M+"` supplied to `"+O+"`, expected a single ReactElement."))}return null}return x(p)}function v(){function p(m,E,O,T,$){var N=m[E];if(!r.isValidElementType(N)){var M=X(N);return new y("Invalid "+T+" `"+$+"` of type "+("`"+M+"` supplied to `"+O+"`, expected a single ReactElement type."))}return null}return x(p)}function P(p){function m(E,O,T,$,N){if(!(E[O]instanceof p)){var M=p.name||d,k=I(E[O]);return new y("Invalid "+$+" `"+N+"` of type "+("`"+k+"` supplied to `"+T+"`, expected ")+("instance of `"+M+"`."))}return null}return x(m)}function L(p){if(!Array.isArray(p))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.")),o;function m(E,O,T,$,N){for(var M=E[O],k=0;k<p.length;k++)if(g(M,p[k]))return null;var K=JSON.stringify(p,function(ne,A){var F=W(A);return F==="symbol"?String(A):A});return new y("Invalid "+$+" `"+N+"` of value `"+String(M)+"` "+("supplied to `"+T+"`, expected one of "+K+"."))}return x(m)}function Y(p){function m(E,O,T,$,N){if(typeof p!="function")return new y("Property `"+N+"` of component `"+T+"` has invalid PropType notation inside objectOf.");var M=E[O],k=X(M);if(k!=="object")return new y("Invalid "+$+" `"+N+"` of type "+("`"+k+"` supplied to `"+T+"`, expected an object."));for(var K in M)if(n(M,K)){var q=p(M,K,T,$,N+"."+K,t);if(q instanceof Error)return q}return null}return x(m)}function V(p){if(!Array.isArray(p))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var m=0;m<p.length;m++){var E=p[m];if(typeof E!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(E)+" at index "+m+"."),o}function O(T,$,N,M,k){for(var K=[],q=0;q<p.length;q++){var ne=p[q],A=ne(T,$,N,M,k,t);if(A==null)return null;A.data&&n(A.data,"expectedType")&&K.push(A.data.expectedType)}var F=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new y("Invalid "+M+" `"+k+"` supplied to "+("`"+N+"`"+F+"."))}return x(O)}function j(){function p(m,E,O,T,$){return H(m[E])?null:new y("Invalid "+T+" `"+$+"` supplied to "+("`"+O+"`, expected a ReactNode."))}return x(p)}function _(p,m,E,O,T){return new y((p||"React class")+": "+m+" type `"+E+"."+O+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+T+"`.")}function U(p){function m(E,O,T,$,N){var M=E[O],k=X(M);if(k!=="object")return new y("Invalid "+$+" `"+N+"` of type `"+k+"` "+("supplied to `"+T+"`, expected `object`."));for(var K in p){var q=p[K];if(typeof q!="function")return _(T,$,N,K,W(q));var ne=q(M,K,T,$,N+"."+K,t);if(ne)return ne}return null}return x(m)}function z(p){function m(E,O,T,$,N){var M=E[O],k=X(M);if(k!=="object")return new y("Invalid "+$+" `"+N+"` of type `"+k+"` "+("supplied to `"+T+"`, expected `object`."));var K=e({},E[O],p);for(var q in K){var ne=p[q];if(n(p,q)&&typeof ne!="function")return _(T,$,N,q,W(ne));if(!ne)return new y("Invalid "+$+" `"+N+"` key `"+q+"` supplied to `"+T+"`.\nBad object: "+JSON.stringify(E[O],null," ")+`
45
+ Valid keys: `+JSON.stringify(Object.keys(p),null," "));var A=ne(M,q,T,$,N+"."+q,t);if(A)return A}return null}return x(m)}function H(p){switch(typeof p){case"number":case"string":case"undefined":return!0;case"boolean":return!p;case"object":if(Array.isArray(p))return p.every(H);if(p===null||i(p))return!0;var m=f(p);if(m){var E=m.call(p),O;if(m!==p.entries){for(;!(O=E.next()).done;)if(!H(O.value))return!1}else for(;!(O=E.next()).done;){var T=O.value;if(T&&!H(T[1]))return!1}}else return!1;return!0;default:return!1}}function re(p,m){return p==="symbol"?!0:m?m["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&m instanceof Symbol:!1}function X(p){var m=typeof p;return Array.isArray(p)?"array":p instanceof RegExp?"object":re(m,p)?"symbol":m}function W(p){if(typeof p>"u"||p===null)return""+p;var m=X(p);if(m==="object"){if(p instanceof Date)return"date";if(p instanceof RegExp)return"regexp"}return m}function G(p){var m=W(p);switch(m){case"array":case"object":return"an "+m;case"boolean":case"date":case"regexp":return"a "+m;default:return m}}function I(p){return!p.constructor||!p.constructor.name?d:p.constructor.name}return h.checkPropTypes=s,h.resetWarningCache=s.resetWarningCache,h.PropTypes=h,h},nt}var st,Lt;function Zr(){if(Lt)return st;Lt=1;var r=pt();function e(){}function t(){}return t.resetWarningCache=e,st=function(){function n(o,i,c,l,u,f){if(f!==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},st}var kt;function Qr(){if(kt)return Ne.exports;if(kt=1,process.env.NODE_ENV!=="production"){var r=ir(),e=!0;Ne.exports=Xr()(r.isElement,e)}else Ne.exports=Zr()();return Ne.exports}var ae=Qr(),en=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},tn=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},rn=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Me="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xlink",Ee=function(r){function e(){for(var n,s=arguments.length,a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];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(i){n.reactWrapper=i},n}_r(e,r);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof en(this.reactWrapper).Node){var a=this.props,o=a.desc,i=a.evalScripts,c=a.httpRequestWithCredentials,l=a.renumerateIRIElements,u=a.src,f=a.title,d=a.useRequestCache,h=this.props.onError,g=this.props.beforeInjection,y=this.props.afterInjection,x=this.props.wrapper,w,R;x==="svg"?(w=document.createElementNS(Me,x),w.setAttribute("xmlns",Me),w.setAttribute("xmlns:xlink",It),R=document.createElementNS(Me,x)):(w=document.createElement(x),R=document.createElement(x)),w.appendChild(R),R.dataset.src=u,this.nonReactWrapper=this.reactWrapper.appendChild(w);var D=function(L){if(s.removeSVG(),!s._isMounted){h(L);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){h(L)})},b=function(L,Y){if(L){D(L);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{y(Y)}catch(V){D(V)}})},v=function(L){if(L.setAttribute("role","img"),o){var Y=L.querySelector(":scope > desc");Y&&L.removeChild(Y);var V=document.createElement("desc");V.innerHTML=o,L.prepend(V)}if(f){var j=L.querySelector(":scope > title");j&&L.removeChild(j);var _=document.createElement("title");_.innerHTML=f,L.prepend(_)}try{g(L)}catch(U){D(U)}};Br(R,{afterEach:b,beforeEach:v,cacheRequests:d,evalScripts:i,httpRequestWithCredentials:c,renumerateIRIElements:l})}},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;tn(qe({},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 o=s.loading;s.renumerateIRIElements,s.src,s.title,s.useRequestCache;var i=s.wrapper,c=Nr(s,rn),l=i;return Ce.createElement(l,qe({},c,{ref:this.refCallback},i==="svg"?{xmlns:Me,xmlnsXlink:It}:{}),this.state.isLoading&&o&&Ce.createElement(o,null),this.state.hasError&&a&&Ce.createElement(a,null))},e}(Ce.Component);Ee.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Ee.propTypes={afterInjection:ae.func,beforeInjection:ae.func,desc:ae.string,evalScripts:ae.oneOf(["always","once","never"]),fallback:ae.oneOfType([ae.func,ae.object,ae.string]),httpRequestWithCredentials:ae.bool,loading:ae.oneOfType([ae.func,ae.object,ae.string]),onError:ae.func,renumerateIRIElements:ae.bool,src:ae.string.isRequired,title:ae.string,useRequestCache:ae.bool,wrapper:ae.oneOf(["div","span","svg"])};let lt={assets:"/"};const nn=r=>{lt={...lt,...r}},Nt=r=>`${lt.assets}/${r}`.replace(/\/+/g,"/"),ce=C.memo(({icon:r,width:e,height:t,placeholderIcon:n,color:s,disabled:a,state:o="base",rotated:i=!1,onClick:c,isInteractable:l=!1,spin:u=!1,title:f})=>{const[d,h]=C.useState(r),g=(r==null?void 0:r.startsWith("http"))||(r==null?void 0:r.startsWith("/")),y=g&&(r==null?void 0:r.toLowerCase().endsWith(".svg")),x=Nt(`assets/svg/${r}.svg`),w=Nt(`assets/svg/${n}.svg`),R={img:`${l?"smp-image-interactable":""}`,svg:`smp-icon ${o?`smp-icon-${o}`:""} ${i?"smp-icon-rotated":""} ${l?"smp-icon-interactable":""} ${u?"smp-icon-spin":""}`},D=()=>{!a&&c&&c()};return S.jsx(S.Fragment,{children:y?S.jsx(Ee,{src:r,fallback:()=>S.jsx(Ee,{src:w,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:f,role:"application",fill:s,"aria-disabled":a,className:R.svg,onClick:D}):g?S.jsx("img",{src:d,width:e||"16px",height:t||"auto",alt:f,onError:()=>h(w),onClick:D,className:R.img,title:f,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&D()}}):S.jsx(Ee,{src:x,fallback:()=>S.jsx(Ee,{src:w,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:f,role:"application",fill:s,"aria-disabled":a,className:R.svg,onClick:D})})}),be=({disabled:r,readOnly:e,bindValue:t,icon:n,onBlur:s,onChange:a,placeholder:o,shapeIcon:i,sizing:c,state:l,variant:u,rotatedShapeIcon:f=!1,onShapeIconClick:d,ref:h,inputRef:g,onKeyDown:y,inputType:x="text",ariaLabel:w="input field",label:R,helperText:D=!1,error:b,appearance:v="base",fullWidth:P=!1,_dataComponent:L="textfield",width:Y})=>{const V=b?"danger":l,j=b||l=="danger"?"error":i,_=D||!!b,U=re=>{a==null||a(re.target.value)},z={wrapper:`smp-textfield-wrapper ${P?"smp-textfield-fullWidth":""}`,container:`smp-textfield ${r?"smp-textfield-disabled":""} ${e?"smp-textfield-readOnly":""} ${o?"smp-textfield-placeholder":""} ${c?`smp-textfield-${c}`:""} ${V?`smp-textfield-${V}`:""} ${u?`smp-textfield-variant-${u}`:""} ${v?`smp-textfield-${v}`:""}`,input:"smp-textfield-input "},H=Y?{"--smp-textField-width-base":Y}:void 0;return S.jsxs("div",{className:z.wrapper,"data-component":L,children:[R&&S.jsx(nr,{label:R,disabled:r}),S.jsxs("div",{className:z.container,ref:h,style:H,children:[n&&S.jsx(ce,{icon:n,disabled:r}),S.jsx("input",{type:x,value:t,placeholder:o,onChange:U,onBlur:s,className:z.input,disabled:r,readOnly:e,onKeyDown:y,"aria-label":w,ref:g}),j&&S.jsx(ce,{icon:j,disabled:r,state:V,onClick:d,rotated:f})]}),_&&S.jsx(Ir,{helperText:b,disabled:r,state:V})]})};function sn({items:r,itemHeight:e,containerHeight:t,overscan:n=5}){const[s,a]=C.useState(0),o=C.useRef(null),i=r.length*e,c=Math.max(0,Math.floor(s/e)-n),l=Math.min(r.length-1,Math.floor((s+t)/e)+n),u=[];for(let h=c;h<=l;h++)u.push({item:r[h],index:h,offsetTop:h*e});const f=C.useCallback(h=>{const g=h.target.scrollTop;a(g)},[]),d=h=>{if(!o.current)return;const g=h*e,y=g+e,x=o.current,w=x.scrollTop,R=w+t;g<w?x.scrollTop=g:y>R&&(x.scrollTop=y-t)};return{virtualItems:u,containerProps:{ref:o,style:{maxHeight:`${t}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:f},innerProps:{style:{height:`${i}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:s,viewportHeight:t,totalHeight:i,startIndex:c,endIndex:l},scrollToIndex:d}}const an=10,lr=({id:r,options:e,displayMode:t,ref:n,showFilter:s,selectedIndex:a=null,activeIndex:o=[],width:i,onClick:c,onKeyDown:l})=>{var j;const[u,f]=C.useState(""),d=24,[h,g]=C.useState(a!==null?a:-1),y=s!==void 0?s:e.length>an,x=u?e.filter(_=>_.label.toLowerCase().includes(u.toLowerCase())):e,w=_=>{f(_)},{virtualItems:R,containerProps:D,innerProps:b,scrollToIndex:v}=sn({items:x,itemHeight:d,containerHeight:200,overscan:5});C.useEffect(()=>{a!==null&&a!==h&&g(a)},[a]),C.useEffect(()=>{h>=0&&h<x.length&&v(h)},[h,x]);const P=_=>{if(_.key==="ArrowDown"||_.key==="ArrowUp"){_.preventDefault();let U=h;_.key==="ArrowDown"?U=h<x.length-1?h+1:0:_.key==="ArrowUp"&&(U=h>0?h-1:x.length-1),g(U)}else _.key==="Enter"?h>=0&&h<x.length&&(c==null||c(x[h])):_.key==="Escape"&&(_.preventDefault(),_.stopPropagation());l&&l(_)},L=_=>{P(_)},Y=_=>{P(_)},V={wrapper:"smp-list",container:"smp-list-container",virtualScroll:"smp-list-virtualScroll",listItem:"smp-list-listItem"};return S.jsxs("div",{id:r,ref:n,className:V.wrapper,"data-component":"list",style:{width:i},children:[y&&S.jsx(be,{bindValue:u,placeholder:"Search...",onChange:w,onKeyDown:L}),S.jsx("div",{...D,className:V.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:Y,"aria-activedescendant":h>=0&&h<x.length?(j=x[h])==null?void 0:j.id:void 0,children:S.jsx("div",{...b,className:V.virtualScroll,children:R.map(({item:_,index:U,offsetTop:z})=>{const H=o.includes(_.id);return S.jsxs("li",{role:"option",id:_.id,"aria-selected":h===U?"true":"false",tabIndex:-1,className:`${V.listItem} ${h===U?"selected-item":""}`,"aria-label":_.id+"-"+_.label,style:{height:`${d}px`,lineHeight:`calc(${d}px - 2*2px)`,transform:`translateY(${z}px)`},onClick:()=>{c==null||c(_),g(U)},children:[He(_.id,_.label,t),H&&S.jsx(ce,{icon:"check",width:16})]},_.id)})})})]})},cr=({displayMode:r,bindValue:e,optionalDisplayValue:t,...n})=>{const[s,a]=C.useState(He(e,t,r));return C.useEffect(()=>{a(e)},[e]),C.useEffect(()=>{a(He(e,t,r))},[t,r]),S.jsx(be,{...n,bindValue:s})},on=r=>{const e=C.useRef(null);return C.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),n=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{n()},r)}},ht=({bindValue:r,optionalDisplayValue:e,options:t,displayMode:n,listDisplayMode:s="Both",minimumChars:a=3,placeholder:o,fun:i,_changeOnEnter:c=!1,onChange:l,onOptionsRequest:u,_multiActiveIndex:f,...d})=>{const[h,g]=C.useState(r),[y,x]=C.useState(e),[w,R]=C.useState(!1),[D,b]=C.useState(t||[]),[v,P]=C.useState(0),[L,Y]=C.useState([r]),{anchorRef:V,targetRef:j,anchorWidth:_}=dt({position:"bottom",enabled:w});We(j,()=>R(!1));const U=on(400),z=W=>{W.length>=a?i&&u&&U(async()=>{const G=await u(i,W);b(G),P(G.length>0?0:-1),R(!0)}):R(!1),g(W),x(e),c||l==null||l(W,e)},H=W=>{c?(g(""),x("")):(g(W.id),x(W.label)),l==null||l(W.id,W.label);const G=D.findIndex(I=>I.id===W.id);P(G),Y([W.id]),R(!1)},re=W=>{W.key==="Escape"&&(R(!1),P(-1))},X=W=>{if((W.key==="ArrowDown"||W.key==="ArrowUp")&&(W.preventDefault(),w)){const G=W.key==="ArrowDown"?(v+1)%D.length:(v-1+D.length)%D.length;P(G)}switch(W.key){case"Enter":v>=0&&v<D.length?H(D[v]):c&&(l==null||l(h,""),R(!1),g(""),x(""));break;case"Escape":R(!1),P(-1);break}};return S.jsxs("div",{"data-component":"autocomplete",children:[S.jsx(cr,{...d,bindValue:h,optionalDisplayValue:y,displayMode:n,shapeIcon:"magnify",placeholder:o,ref:V,onChange:z,onKeyDown:X,"aria-autocomplete":"list"}),w&&S.jsx(lr,{options:D,displayMode:s,onClick:H,ref:j,selectedIndex:v,activeIndex:f||L,width:_,showFilter:!1,onKeyDown:re})]})},_t=r=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[r],Mt=r=>({primary:"onPrimary",danger:"onDanger",base:"base"})[r],Te=({bindValue:r,onClick:e,ariaLabel:t,icon:n,disabled:s,sizing:a="base",variant:o="primary",appearance:i="raised",showIcon:c=!0,showText:l=!0,fullWidth:u=!1,loading:f=!1,title:d,optionalDisplayValue:h})=>{const g={container:`smp-button smp-button-container ${a?`smp-button-${a}`:""} ${o?`smp-buttonVariant-${o}`:""} ${i?`smp-buttonType-${i}`:""} ${u?"smp-button-fullWidth":""}`};return S.jsx("button",{"data-component":"button",className:g.container,onClick:e,"aria-label":t,disabled:s,"aria-busy":f,title:d||h,children:f?S.jsx(ce,{icon:"spinner",state:Mt(o),spin:!0}):S.jsxs(S.Fragment,{children:[n&&c&&S.jsx(ce,{icon:n,disabled:s,state:Mt(o),width:_t(a),height:_t(a)}),l&&r&&S.jsx("span",{children:r})]})})},ur=({options:r,direction:e="row",disposition:t="start",sizing:n,variant:s,appearance:a,showText:o,showIcon:i,fullWidth:c,disabled:l,onClick:u})=>{const f={container:`smp-button-list smp-button-list-${e} smp-justifyContent-${t}`},d=r==null?void 0:r.map((h,g)=>{const y={bindValue:h.id,label:h.label,fun:h.fun,icon:h.icon,variant:s,appearance:a,showText:o,showIcon:i,fullWidth:c,disabled:l,sizing:n,onClick:()=>{u==null||u(h.id,h.fun)}};return S.jsx(Te,{...y},`button-${g}`)});return S.jsx("div",{role:"list","data-component":"button-list",className:f.container,children:d})},fr=({bindValue:r,onChange:e,onBlur:t})=>{const n=s=>{e&&e(s.target.checked)};return S.jsx("input",{"data-component":"checkbox",type:"checkbox",checked:r,onChange:n,onBlur:t})},ln={titleLarge:"h2",title:"h3",body:"h6",label:"label"},cn=({variant:r="body",bindValue:e,color:t,...n})=>{const s=ln[r],a={container:`smp-typography ${r?`smp-typography-${r}`:""} ${n.disabled?"smp-typography-disabled":""}`};return S.jsx(s,{className:a.container,disabled:n.disabled,style:{"--smp-typography-color-base":t},children:e})},dr=({elements:r,isEditable:e=!1,displayMode:t="Both",onChange:n,color:s,backgroundColor:a,isDraggable:o=!1})=>{const[i,c]=C.useState(null),l={container:`${["smp-chips-container"]}`,element:"smp-chips-element"},u=h=>{n==null||n(r.filter((g,y)=>y!==h))},f=h=>{c(h)},d=h=>{if(i===null||i===h)return;const g=[...r],[y]=g.splice(i,1);g.splice(h,0,y),n==null||n(g),c(null)};return S.jsx("div",{className:l.container,role:"list","data-component":"chip",children:r.flatMap((h,g)=>{const y=He(h.bindValue,h.optionalDisplayValue,t),x=S.jsxs("div",{className:l.element,role:"listitem",draggable:o,onDragStart:()=>f(g),onDragOver:R=>o&&R.preventDefault(),onDrop:()=>o&&d(g),style:{"--smp-chips-backgroundColor-base":a},children:[o&&S.jsx(ce,{icon:"drag_indicator_horizontal",isInteractable:!0}),S.jsx(cn,{variant:"label",bindValue:y,color:s}),e&&S.jsx(ce,{icon:"close",isInteractable:!0,onClick:()=>u(g),color:s})]},`chip-${g}`),w=o&&g<r.length-1?S.jsx(ce,{icon:"chevron-right",color:s},`separator-${g}`):null;return[x,w].filter(Boolean)})})};function pr(r,e){const t=C.useRef(null);C.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(l=>!l.hasAttribute("disabled")&&l.offsetParent!==null):[];(()=>{const l=s();l.length>0&&requestAnimationFrame(()=>l[0].focus())})();const o=l=>{if(l.key==="Escape"||l.key!=="Tab")return;const u=s();if(u.length===0)return;const f=u[0],d=u[u.length-1];l.shiftKey&&document.activeElement===f?(l.preventDefault(),d.focus()):!l.shiftKey&&document.activeElement===d&&(l.preventDefault(),f.focus())},i=l=>{if(n&&!n.contains(l.target)){l.preventDefault();const u=s();u.length>0&&u[0].focus()}};document.addEventListener("keydown",o),document.addEventListener("mousedown",i);const c=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.removeEventListener("mousedown",i),document.body.style.overflow=c,t.current&&requestAnimationFrame(()=>{var l;(l=t.current)==null||l.focus()})}},[r,e])}const hr=({bindValue:r,onChange:e,options:t=[],optionalDisplayValue:n,displayMode:s,listDisplayMode:a="Both",fun:o,onOptionsRequest:i,multiActiveIndex:c,...l})=>{const[u,f]=C.useState(!1),[d,h]=C.useState(t),[g,y]=C.useState(-1),[x,w]=C.useState([r]),R=C.useId(),{anchorRef:D,targetRef:b,anchorWidth:v}=dt({position:"bottom",enabled:u});We(b,()=>f(!1)),pr(u,b);const P=j=>{e==null||e(j.id,j.label);const _=d.findIndex(U=>U.id===j.id);y(_),w([j.id]),f(!1)},L=j=>{j.key==="Escape"&&(f(!1),y(-1))},Y=j=>{(j.key==="ArrowDown"||j.key==="ArrowUp")&&(j.preventDefault(),V())},V=()=>{o&&i&&i(o,void 0).then(j=>{h(j),y(j.length>0?0:-1),f(!0)})};return S.jsxs("div",{role:"combobox","aria-expanded":u,"aria-controls":R,"aria-owns":R,"data-component":"combobox",children:[S.jsx(cr,{...l,bindValue:r,optionalDisplayValue:n,displayMode:s,onShapeIconClick:V,onKeyDown:Y,shapeIcon:"arrow_drop_down",rotatedShapeIcon:u,readOnly:!0,ref:D,"aria-autocomplete":"list",variant:"notSelectable"}),u&&S.jsx(lr,{id:R,options:d,displayMode:a,ref:b,selectedIndex:g,activeIndex:c||x,width:v,onClick:P,onKeyDown:L})]})},B=r=>typeof r=="string",De=()=>{let r,e;const t=new Promise((n,s)=>{r=n,e=s});return t.resolve=r,t.reject=e,t},Ft=r=>r==null?"":""+r,un=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},fn=/###/g,Vt=r=>r&&r.indexOf("###")>-1?r.replace(fn,"."):r,Yt=r=>!r||B(r),Pe=(r,e,t)=>{const n=B(e)?e.split("."):e;let s=0;for(;s<n.length-1;){if(Yt(r))return{};const a=Vt(n[s]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++s}return Yt(r)?{}:{obj:r,k:Vt(n[s])}},Ut=(r,e,t)=>{const{obj:n,k:s}=Pe(r,e,Object);if(n!==void 0||e.length===1){n[s]=t;return}let a=e[e.length-1],o=e.slice(0,e.length-1),i=Pe(r,o,Object);for(;i.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),i=Pe(r,o,Object),i!=null&&i.obj&&typeof i.obj[`${i.k}.${a}`]<"u"&&(i.obj=void 0);i.obj[`${i.k}.${a}`]=t},dn=(r,e,t,n)=>{const{obj:s,k:a}=Pe(r,e,Object);s[a]=s[a]||[],s[a].push(t)},Be=(r,e)=>{const{obj:t,k:n}=Pe(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},pn=(r,e,t)=>{const n=Be(r,t);return n!==void 0?n:Be(e,t)},gr=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?B(r[n])||r[n]instanceof String||B(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):gr(r[n],e[n],t):r[n]=e[n]);return r},Se=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const gn=r=>B(r)?r.replace(/[&<>"'\/]/g,e=>hn[e]):r;class mn{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 yn=[" ",",","?","!",";"],vn=new mn(20),bn=(r,e,t)=>{e=e||"",t=t||"";const n=yn.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(n.length===0)return!0;const s=vn.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!s.test(r);if(!a){const o=r.indexOf(t);o>0&&!s.test(r.substring(0,o))&&(a=!0)}return a},ct=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const n=e.split(t);let s=r;for(let a=0;a<n.length;){if(!s||typeof s!="object")return;let o,i="";for(let c=a;c<n.length;++c)if(c!==a&&(i+=t),i+=n[c],o=s[i],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&c<n.length-1)continue;a+=c-a+1;break}s=o}return s},Ae=r=>r==null?void 0:r.replace("_","-"),xn={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 Ke{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||xn,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:(B(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Ke(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Ke(this.logger,e)}}var he=new Ke;class Ge{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 o=0;o<a;o++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,a])=>{for(let o=0;o<a;o++)s.apply(s,[e,...t])})}}class Wt extends Ge{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 l,u;const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let i;e.indexOf(".")>-1?i=e.split("."):(i=[e,t],n&&(Array.isArray(n)?i.push(...n):B(n)&&a?i.push(...n.split(a)):i.push(n)));const c=Be(this.data,i);return!c&&!t&&!n&&e.indexOf(".")>-1&&(e=i[0],t=i[1],n=i.slice(2).join(".")),c||!o||!B(n)?c:ct((u=(l=this.data)==null?void 0:l[e])==null?void 0:u[t],n,a)}addResource(e,t,n,s,a={silent:!1}){const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let i=[e,t];n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split("."),s=t,t=i[1]),this.addNamespaces(t),Ut(this.data,i,s),a.silent||this.emit("added",e,t,n,s)}addResources(e,t,n,s={silent:!1}){for(const a in n)(B(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,o={silent:!1,skipCopy:!1}){let i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),s=n,n=t,t=i[1]),this.addNamespaces(t);let c=Be(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?gr(c,n,a):c={...c,...n},Ut(this.data,i,c),o.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 mr={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,s){return r.forEach(a=>{var o;e=((o=this.processors[a])==null?void 0:o.process(e,t,n,s))??e}),e}};const Ht={},qt=r=>!B(r)&&typeof r!="boolean"&&typeof r!="number";class ze extends Ge{constructor(e,t={}){super(),un(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=he.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 o=n&&e.indexOf(n)>-1,i=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!bn(e,n,s);if(o&&!i){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:B(a)?[a]:a};const l=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(l[0])>-1)&&(a=l.shift()),e=l.join(s)}return{key:e,namespaces:B(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,o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:i,namespaces:c}=this.extractFromKey(e[e.length-1],s),l=c[c.length-1];let u=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const f=s.lng||this.language,d=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return d?a?{res:`${l}${u}${i}`,usedKey:i,exactUsedKey:i,usedLng:f,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:`${l}${u}${i}`:a?{res:i,usedKey:i,exactUsedKey:i,usedLng:f,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:i;const h=this.resolve(e,s);let g=h==null?void 0:h.res;const y=(h==null?void 0:h.usedKey)||i,x=(h==null?void 0:h.exactUsedKey)||i,w=["[object Number]","[object Function]","[object RegExp]"],R=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,D=!this.i18nFormat||this.i18nFormat.handleAsObject,b=s.count!==void 0&&!B(s.count),v=ze.hasDefaultValue(s),P=b?this.pluralResolver.getSuffix(f,s.count,s):"",L=s.ordinal&&b?this.pluralResolver.getSuffix(f,s.count,{ordinal:!1}):"",Y=b&&!s.ordinal&&s.count===0,V=Y&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${P}`]||s[`defaultValue${L}`]||s.defaultValue;let j=g;D&&!g&&v&&(j=V);const _=qt(j),U=Object.prototype.toString.apply(j);if(D&&j&&_&&w.indexOf(U)<0&&!(B(R)&&Array.isArray(j))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const z=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,j,{...s,ns:c}):`key '${i} (${this.language})' returned an object instead of string.`;return a?(h.res=z,h.usedParams=this.getUsedParamsDetails(s),h):z}if(o){const z=Array.isArray(j),H=z?[]:{},re=z?x:y;for(const X in j)if(Object.prototype.hasOwnProperty.call(j,X)){const W=`${re}${o}${X}`;v&&!g?H[X]=this.translate(W,{...s,defaultValue:qt(V)?V[X]:void 0,joinArrays:!1,ns:c}):H[X]=this.translate(W,{...s,joinArrays:!1,ns:c}),H[X]===W&&(H[X]=j[X])}g=H}}else if(D&&B(R)&&Array.isArray(g))g=g.join(R),g&&(g=this.extendTranslation(g,e,s,n));else{let z=!1,H=!1;!this.isValidLookup(g)&&v&&(z=!0,g=V),this.isValidLookup(g)||(H=!0,g=i);const X=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&H?void 0:g,W=v&&V!==g&&this.options.updateMissing;if(H||z||W){if(this.logger.log(W?"updateKey":"missingKey",f,l,i,W?V:g),o){const m=this.resolve(i,{...s,keySeparator:!1});m&&m.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let G=[];const I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&I&&I[0])for(let m=0;m<I.length;m++)G.push(I[m]);else this.options.saveMissingTo==="all"?G=this.languageUtils.toResolveHierarchy(s.lng||this.language):G.push(s.lng||this.language);const p=(m,E,O)=>{var $;const T=v&&O!==g?O:X;this.options.missingKeyHandler?this.options.missingKeyHandler(m,l,E,T,W,s):($=this.backendConnector)!=null&&$.saveMissing&&this.backendConnector.saveMissing(m,l,E,T,W,s),this.emit("missingKey",m,l,E,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?G.forEach(m=>{const E=this.pluralResolver.getSuffixes(m,s);Y&&s[`defaultValue${this.options.pluralSeparator}zero`]&&E.indexOf(`${this.options.pluralSeparator}zero`)<0&&E.push(`${this.options.pluralSeparator}zero`),E.forEach(O=>{p([m],i+O,s[`defaultValue${O}`]||V)})}):p(G,i,V))}g=this.extendTranslation(g,e,s,h,n),H&&g===i&&this.options.appendNamespaceToMissingKey&&(g=`${l}${u}${i}`),(H||z)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${i}`:i,z?g:void 0,s))}return a?(h.res=g,h.usedParams=this.getUsedParamsDetails(s),h):g}extendTranslation(e,t,n,s,a){var c,l;if((c=this.i18nFormat)!=null&&c.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 u=B(e)&&(((l=n==null?void 0:n.interpolation)==null?void 0:l.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const h=e.match(this.interpolator.nestingRegexp);f=h&&h.length}let d=n.replace&&!B(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),u){const h=e.match(this.interpolator.nestingRegexp),g=h&&h.length;f<g&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...h)=>(a==null?void 0:a[0])===h[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${t[0]}`),null):this.translate(...h,t),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,i=B(o)?[o]:o;return e!=null&&(i!=null&&i.length)&&n.applyPostProcessor!==!1&&(e=mr.handle(i,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,s,a,o,i;return B(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(c,t),u=l.key;s=u;let f=l.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const d=t.count!==void 0&&!B(t.count),h=d&&!t.ordinal&&t.count===0,g=t.context!==void 0&&(B(t.context)||typeof t.context=="number")&&t.context!=="",y=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);f.forEach(x=>{var w,R;this.isValidLookup(n)||(i=x,!Ht[`${y[0]}-${x}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((R=this.utils)!=null&&R.hasLoadedNamespace(i))&&(Ht[`${y[0]}-${x}`]=!0,this.logger.warn(`key "${s}" for languages "${y.join(", ")}" won't get resolved as namespace "${i}" 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(D=>{var P;if(this.isValidLookup(n))return;o=D;const b=[u];if((P=this.i18nFormat)!=null&&P.addLookupKeys)this.i18nFormat.addLookupKeys(b,u,D,x,t);else{let L;d&&(L=this.pluralResolver.getSuffix(D,t.count,t));const Y=`${this.options.pluralSeparator}zero`,V=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(b.push(u+L),t.ordinal&&L.indexOf(V)===0&&b.push(u+L.replace(V,this.options.pluralSeparator)),h&&b.push(u+Y)),g){const j=`${u}${this.options.contextSeparator}${t.context}`;b.push(j),d&&(b.push(j+L),t.ordinal&&L.indexOf(V)===0&&b.push(j+L.replace(V,this.options.pluralSeparator)),h&&b.push(j+Y))}}let v;for(;v=b.pop();)this.isValidLookup(n)||(a=v,n=this.getResource(D,x,v,t))}))})}),{res:n,usedKey:s,exactUsedKey:a,usedLng:o,usedNS:i}}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&&!B(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 Bt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=he.create("languageUtils")}getScriptPartFromCode(e){if(e=Ae(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=Ae(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(B(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(o=>{if(o===a)return o;if(!(o.indexOf("-")<0&&a.indexOf("-")<0)&&(o.indexOf("-")>0&&a.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===a||o.indexOf(a)===0&&a.length>1))return o})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),B(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=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return B(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))):B(e)&&a(this.formatLanguageCode(e)),n.forEach(o=>{s.indexOf(o)<0&&a(this.formatLanguageCode(o))}),s}}const Kt={zero:0,one:1,two:2,few:3,many:4,other:5},zt={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Sn{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=he.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Ae(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:s});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(n,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),zt;if(!e.match(/-|_/))return zt;const c=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(c,t)}return this.pluralRulesCache[a]=o,o}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)=>Kt[s]-Kt[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 Gt=(r,e,t,n=".",s=!0)=>{let a=pn(r,e,t);return!a&&s&&B(t)&&(a=ct(r,t,n),a===void 0&&(a=ct(e,t,n))),a},at=r=>r.replace(/\$/g,"$$$$");class wn{constructor(e={}){var t;this.logger=he.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:o,suffix:i,suffixEscaped:c,formatSeparator:l,unescapeSuffix:u,unescapePrefix:f,nestingPrefix:d,nestingPrefixEscaped:h,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:x,maxReplaces:w,alwaysFormat:R}=e.interpolation;this.escape=t!==void 0?t:gn,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?Se(a):o||"{{",this.suffix=i?Se(i):c||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?Se(d):h||Se("$t("),this.nestingSuffix=g?Se(g):y||Se(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=w||1e3,this.alwaysFormat=R!==void 0?R:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>(t==null?void 0:t.source)===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,s){var h;let a,o,i;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=g=>{if(g.indexOf(this.formatSeparator)<0){const R=Gt(t,c,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(R,void 0,n,{...s,...t,interpolationkey:g}):R}const y=g.split(this.formatSeparator),x=y.shift().trim(),w=y.join(this.formatSeparator).trim();return this.format(Gt(t,c,x,this.options.keySeparator,this.options.ignoreJSONStructure),w,n,{...s,...t,interpolationkey:x})};this.resetRegExp();const u=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((h=s==null?void 0:s.interpolation)==null?void 0:h.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>at(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?at(this.escape(g)):at(g)}].forEach(g=>{for(i=0;a=g.regex.exec(e);){const y=a[1].trim();if(o=l(y),o===void 0)if(typeof u=="function"){const w=u(e,a,s);o=B(w)?w:""}else if(s&&Object.prototype.hasOwnProperty.call(s,y))o="";else if(f){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),o="";else!B(o)&&!this.useRawValueToEscape&&(o=Ft(o));const x=g.safeValue(o);if(e=e.replace(a[0],x),f?(g.regex.lastIndex+=o.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,i++,i>=this.maxReplaces)break}}),e}nest(e,t,n={}){let s,a,o;const i=(c,l)=>{const u=this.nestingOptionsSeparator;if(c.indexOf(u)<0)return c;const f=c.split(new RegExp(`${u}[ ]*{`));let d=`{${f[1]}`;c=f[0],d=this.interpolate(d,o);const h=d.match(/'/g),g=d.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!g||g.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),l&&(o={...l,...o})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,y),`${c}${u}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,c};for(;s=this.nestingRegexp.exec(e);){let c=[];o={...n},o=o.replace&&!B(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const u=s[1].split(this.formatSeparator).map(f=>f.trim());s[1]=u.shift(),c=u,l=!0}if(a=t(i.call(this,s[1].trim(),o),o),a&&s[0]===e&&!B(a))return a;B(a)||(a=Ft(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),a=""),l&&(a=c.reduce((u,f)=>this.format(u,f,n.lng,{...n,interpolationkey:s[1].trim()}),a.trim())),e=e.replace(s[0],a),this.regexp.lastIndex=0}return e}}const En=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const n=r.split("(");e=n[0].toLowerCase().trim();const s=n[1].substring(0,n[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(o=>{if(o){const[i,...c]=o.split(":"),l=c.join(":").trim().replace(/^'+|'+$/g,""),u=i.trim();t[u]||(t[u]=l),l==="false"&&(t[u]=!1),l==="true"&&(t[u]=!0),isNaN(l)||(t[u]=parseInt(l,10))}})}return{formatName:e,formatOptions:t}},Jt=r=>{const e={};return(t,n,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});const o=n+JSON.stringify(a);let i=e[o];return i||(i=r(Ae(n),s),e[o]=i),i(t)}},Tn=r=>(e,t,n)=>r(Ae(t),n)(e);class On{constructor(e={}){this.logger=he.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Jt:Tn;this.formats={number:n((s,a)=>{const o=new Intl.NumberFormat(s,{...a});return i=>o.format(i)}),currency:n((s,a)=>{const o=new Intl.NumberFormat(s,{...a,style:"currency"});return i=>o.format(i)}),datetime:n((s,a)=>{const o=new Intl.DateTimeFormat(s,{...a});return i=>o.format(i)}),relativetime:n((s,a)=>{const o=new Intl.RelativeTimeFormat(s,{...a});return i=>o.format(i,a.range||"day")}),list:n((s,a)=>{const o=new Intl.ListFormat(s,{...a});return i=>o.format(i)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Jt(t)}format(e,t,n,s={}){const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(i=>i.indexOf(")")>-1)){const i=a.findIndex(c=>c.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,i)].join(this.formatSeparator)}return a.reduce((i,c)=>{var f;const{formatName:l,formatOptions:u}=En(c);if(this.formats[l]){let d=i;try{const h=((f=s==null?void 0:s.formatParams)==null?void 0:f[s.interpolationkey])||{},g=h.locale||h.lng||s.locale||s.lng||n;d=this.formats[l](i,g,{...u,...s,...h})}catch(h){this.logger.warn(h)}return d}else this.logger.warn(`there was no format function for ${l}`);return i},e)}}const Rn=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Dn extends Ge{constructor(e,t,n,s={}){var a,o;super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=he.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=[],(o=(a=this.backend)==null?void 0:a.init)==null||o.call(a,n,s.backend,s)}queueLoad(e,t,n,s){const a={},o={},i={},c={};return e.forEach(l=>{let u=!0;t.forEach(f=>{const d=`${l}|${f}`;!n.reload&&this.store.hasResourceBundle(l,f)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,u=!1,o[d]===void 0&&(o[d]=!0),a[d]===void 0&&(a[d]=!0),c[f]===void 0&&(c[f]=!0)))}),u||(i[l]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(c)}}loaded(e,t,n){const s=e.split("|"),a=s[0],o=s[1];t&&this.emit("failedLoading",a,o,t),!t&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const i={};this.queue.forEach(c=>{dn(c.loaded,[a],o),Rn(c,e),t&&c.errors.push(t),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(l=>{i[l]||(i[l]={});const u=c.loaded[l];u.length&&u.forEach(f=>{i[l][f]===void 0&&(i[l][f]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(c=>!c.done)}read(e,t,n,s=0,a=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:a,callback:o});return}this.readingCalls++;const i=(l,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(l&&u&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,s+1,a*2,o)},a);return}o(l,u)},c=this.backend[n].bind(this.backend);if(c.length===2){try{const l=c(e,t);l&&typeof l.then=="function"?l.then(u=>i(null,u)).catch(i):i(null,l)}catch(l){i(l)}return}return c(e,t,i)}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();B(e)&&(e=this.languageUtils.toResolveHierarchy(e)),B(t)&&(t=[t]);const a=this.queueLoad(e,t,n,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}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,(o,i)=>{o&&this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`,o),!o&&i&&this.logger.log(`${t}loaded namespace ${a} for language ${s}`,i),this.loaded(e,o,i)})}saveMissing(e,t,n,s,a,o={},i=()=>{}){var c,l,u,f,d;if((l=(c=this.services)==null?void 0:c.utils)!=null&&l.hasLoadedNamespace&&!((f=(u=this.services)==null?void 0:u.utils)!=null&&f.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 h={...o,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let y;g.length===5?y=g(e,t,n,s,h):y=g(e,t,n,s),y&&typeof y.then=="function"?y.then(x=>i(null,x)).catch(i):i(null,y)}catch(y){i(y)}else g(e,t,n,s,i,h)}!e||!e[0]||this.store.addResource(e[0],t,n,s)}}}const Xt=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),B(r[1])&&(e.defaultValue=r[1]),B(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Zt=r=>{var e,t;return B(r.ns)&&(r.ns=[r.ns]),B(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),B(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},Fe=()=>{},Pn=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class je extends Ge{constructor(e={},t){if(super(),this.options=Zt(e),this.services={},this.logger=he,this.modules={external:[]},Pn(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&&(B(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=Xt();this.options={...n,...this.options,...Zt(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const s=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?he.init(s(this.modules.logger),this.options):he.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=On;const u=new Bt(this.options);this.store=new Wt(this.options.resources,this.options);const f=this.services;f.logger=he,f.resourceStore=this.store,f.languageUtils=u,f.pluralResolver=new Sn(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),l&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(f.formatter=s(l),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new wn(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Dn(s(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.languageDetector&&(f.languageDetector=s(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=s(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new ze(this.services,this.options),this.translator.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Fe),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[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(l=>{this[l]=(...u)=>this.store[l](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...u)=>(this.store[l](...u),this)});const i=De(),c=()=>{const l=(u,f)=>{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),i.resolve(f),t(u,f)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),i}loadResources(e,t=Fe){var a,o;let n=t;const s=B(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 i=[],c=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(f=>{f!=="cimode"&&i.indexOf(f)<0&&i.push(f)})};s?c(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>c(u)),(o=(a=this.options.preload)==null?void 0:a.forEach)==null||o.call(a,l=>c(l)),this.services.backendConnector.load(i,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(l)})}else n(null)}reloadResources(e,t,n){const s=De();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=Fe),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"&&mr.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=De();this.emit("languageChanging",e);const s=i=>{this.language=i,this.languages=this.services.languageUtils.toResolveHierarchy(i),this.resolvedLanguage=void 0,this.setResolvedLanguage(i)},a=(i,c)=>{c?this.isLanguageChangingTo===e&&(s(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,n.resolve((...l)=>this.t(...l)),t&&t(i,(...l)=>this.t(...l))},o=i=>{var u,f;!e&&!i&&this.services.languageDetector&&(i=[]);const c=B(i)?i:i&&i[0],l=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(B(i)?[i]:i);l&&(this.language||s(l),this.translator.language||this.translator.changeLanguage(l),(f=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||f.call(u,l)),this.loadResources(l,d=>{a(d,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),n}getFixedT(e,t,n){const s=(a,o,...i)=>{let c;typeof o!="object"?c=this.options.overloadTranslationOptionHandler([a,o].concat(i)):c={...o},c.lng=c.lng||s.lng,c.lngs=c.lngs||s.lngs,c.ns=c.ns||s.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||n||s.keyPrefix);const l=this.options.keySeparator||".";let u;return c.keyPrefix&&Array.isArray(a)?u=a.map(f=>`${c.keyPrefix}${l}${f}`):u=c.keyPrefix?`${c.keyPrefix}${l}${a}`:a,this.t(u,c)};return B(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 o=(i,c)=>{const l=this.services.backendConnector.state[`${i}|${c}`];return l===-1||l===0||l===2};if(t.precheck){const i=t.precheck(this,o);if(i!==void 0)return i}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!s||o(a,e)))}loadNamespaces(e,t){const n=De();return this.options.ns?(B(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=De();B(e)&&(e=[e]);const s=this.options.preload||[],a=e.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=s.concat(a),this.loadResources(o=>{n.resolve(),t&&t(o)}),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 Bt(Xt());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new je(e,t)}cloneInstance(e={},t=Fe){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new je(s);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(i=>{a[i]=this[i]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const i=Object.keys(this.store.data).reduce((c,l)=>(c[l]={...this.store.data[l]},c[l]=Object.keys(c[l]).reduce((u,f)=>(u[f]={...c[l][f]},u),c[l]),c),{});a.store=new Wt(i,s),a.services.resourceStore=a.store}return a.translator=new ze(a.services,s),a.translator.on("*",(i,...c)=>{a.emit(i,...c)}),a.init(s,t),a.translator.options=s,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const se=je.createInstance();se.createInstance=je.createInstance;se.createInstance;se.dir;se.init;se.loadResources;se.reloadResources;se.use;se.changeLanguage;se.getFixedT;se.t;se.exists;se.setDefaultNamespace;se.hasLoadedNamespace;se.loadNamespaces;se.loadLanguages;const $n={Friday:"Venerdì",FridayShort:"Ven",Monday:"Lunedì",MondayShort:"Lun",Saturday:"Sabato",SaturdayShort:"Sab",Sunday:"Domenica",SundayShort:"Dom",Tuesday:"Martedì",TuesdayShort:"Mar",Thursday:"Giovedì",ThursdayShort:"Gio",Wednesday:"Mercoledì",WednesdayShort:"Mer"},An={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},jn={CalendarFor:"Calendario per",Close:"Chiudi",SpotlightDefaultPlaceholder:"Esegui Comando"},Cn={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:$n,Month:An,Generic:jn},Ln={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"},kn={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},In={CalendarFor:"Calendar for",Close:"Close",SpotlightDefaultPlaceholder:"Execute Command"},Nn={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:Ln,Month:kn,Generic:In};function Qt(r,e){return new RegExp(_n(r),e)}function _n(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Mn(r,e,t,n){let s=e;const a=Fn(r,t);if(!s){const i=Math.abs(a);i-Math.floor(i)?s="0,0.00":s="0,0"}const o=Vn(s);return new Intl.NumberFormat(n,o).format(a)}function Fn(r,e,t,n,s){let a=r;if(typeof a!="number"){let i;e&&n===void 0?i=",":i=".";const c=i=="."?",":".";a=a.replace(Qt(c,"g"),""),a=a.replace(Qt(i,"g"),"."),a=Number(a)}const o=Number(a);return isNaN(o)?NaN:o}function Vn(r){const e={};r.includes(",")?e.useGrouping=!0:e.useGrouping=!1;const t=r.indexOf(".");if(t>-1){const s=(r.substring(t+1).match(/0/g)||[]).length;e.minimumFractionDigits=s,e.maximumFractionDigits=s}else e.minimumFractionDigits=0,e.maximumFractionDigits=0;return e}se.init({lng:typeof navigator<"u"&&navigator.language.split("-")[0]||"en",fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(r,e,t,n)=>{const s=(n==null?void 0:n.type)??"number";try{switch(s){case"date":{const a=r instanceof Date?r:new Date(r);return new Intl.DateTimeFormat(t,{dateStyle:e||"short"}).format(a)}default:case"number":{const a=(n==null?void 0:n.inputIsLocalized)??!1;return Mn(r,e,a,t)}}}catch{return r}}},resources:{en:{translation:Nn},it:{translation:Cn}}});const Yn=(r,e,t,n)=>se.format(r,e,t||se.language,n),Un=(r,e)=>se.t(r,e);function Je(){const r=C.useCallback((n,s,a,o)=>Yn(n,s,a||void 0,o),[]),e=C.useCallback(()=>se.languages[0],[]),t=C.useCallback((n,s)=>Un(n,s),[]);return{format:r,getCurrentLanguage:e,translate:t}}var gt=(r=>(r.CALENDAR_FOR="Date.CalendarFor",r.CLOSE="Generic.Close",r.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",r))(gt||{}),ie=(r=>(r.MONDAY="Day.Monday",r.MONDAY_SHORT="Day.MondayShort",r.TUESDAY="Day.Tuesday",r.TUESDAY_SHORT="Day.TuesdayShort",r.WEDNESDAY="Day.Wednesday",r.WEDNESDAY_SHORT="Day.WednesdayShort",r.THURSDAY="Day.Thursday",r.THURSDAY_SHORT="Day.ThursdayShort",r.FRIDAY="Day.Friday",r.FRIDAY_SHORT="Day.FridayShort",r.SATURDAY="Day.Saturday",r.SATURDAY_SHORT="Day.SaturdayShort",r.SUNDAY="Day.Sunday",r.SUNDAY_SHORT="Day.SundayShort",r))(ie||{}),le=(r=>(r.JANUARY="Month.January",r.FEBRUARY="Month.February",r.MARCH="Month.March",r.APRIL="Month.April",r.MAY="Month.May",r.JUNE="Month.June",r.JULY="Month.July",r.AUGUST="Month.August",r.SEPTEMBER="Month.September",r.OCTOBER="Month.October",r.NOVEMBER="Month.November",r.DECEMBER="Month.December",r))(le||{}),ut=(r=>(r.PREVIOUS_DAY="Date.PreviousDay",r.PREVIOUS_WEEK="Date.PreviousWeek",r.PREVIOUS_MONTH="Date.PreviousMonth",r.PREVIOUS_YEAR="Date.PreviousYear",r.NEXT_DAY="Date.NextDay",r.NEXT_WEEK="Date.NextWeek",r.NEXT_MONTH="Date.NextMonth",r.NEXT_YEAR="Date.NextYear",r.YESTERDAY="Date.Yesterday",r.TODAY="Date.Today",r.TOMORROW="Date.Tomorrow",r))(ut||{});function Wn({selectedDate:r,onDateChange:e,disabledDateRanges:t=[],initialValue:n,targetRef:s}){const{translate:a}=Je(),o=()=>{if(!n)return;const I=new Date(n);return isNaN(I.getTime())?void 0:I},[i]=C.useState(new Date),[c,l]=C.useState(r||o()||new Date),[u,f]=C.useState(c?c.getMonth():new Date().getMonth()),[d,h]=C.useState(c?c.getFullYear():new Date().getFullYear()),[g,y]=C.useState(c?c.getDate():null),x=C.useRef(null),w=C.useRef([]),R=[a(le.JANUARY),a(le.FEBRUARY),a(le.MARCH),a(le.APRIL),a(le.MAY),a(le.JUNE),a(le.JULY),a(le.AUGUST),a(le.SEPTEMBER),a(le.OCTOBER),a(le.NOVEMBER),a(le.DECEMBER)],D=[{value:a(ie.SUNDAY_SHORT),full:a(ie.SUNDAY)},{value:a(ie.MONDAY_SHORT),full:a(ie.MONDAY)},{value:a(ie.TUESDAY_SHORT),full:a(ie.TUESDAY)},{value:a(ie.WEDNESDAY_SHORT),full:a(ie.WEDNESDAY)},{value:a(ie.THURSDAY_SHORT),full:a(ie.THURSDAY)},{value:a(ie.FRIDAY_SHORT),full:a(ie.FRIDAY)},{value:a(ie.SATURDAY_SHORT),full:a(ie.SATURDAY)}],b=I=>t.some(p=>{const m=p.start.getTime(),E=p.end.getTime(),O=I.getTime();return O>=m&&O<=E}),v=I=>{b(I)||(l(I),y(I.getDate()),e&&e(kr(I)))},P=()=>{u===0?(f(11),h(d-1)):f(u-1),y(1)},L=()=>{u===11?(f(0),h(d+1)):f(u+1),y(1)},Y=(I,p)=>new Date(I,p+1,0).getDate(),V=(I,p)=>new Date(I,p,1).getDay(),j=I=>{var m;const p=H.findIndex(E=>E!==null&&E.getDate()===I);p!==-1&&w.current[p]&&((m=w.current[p])==null||m.focus(),y(I))},_=(I,p)=>{const m=H[p];if(!m)return;const E=Y(d,u),O=m.getDate();switch(I.key){case"ArrowRight":I.preventDefault();{let T=O+1,$=new Date(d,u,T);if(T>E){const N=u===11?d+1:d,M=u===11?0:u+1;T=1,$=new Date(N,M,T),L(),setTimeout(()=>{U(1,"forward")},0);return}b($)?U(T,"forward"):j(T)}break;case"Tab":break;case"ArrowLeft":I.preventDefault();{let T=O-1,$=new Date(d,u,T);if(T<1){const N=u===0?d-1:d,M=u===0?11:u-1,k=Y(N,M);T=k,$=new Date(N,M,T),P(),setTimeout(()=>{U(k,"backward")},0);return}b($)?U(T,"backward"):j(T)}break;case"ArrowUp":I.preventDefault();{let T=O-7,$=new Date(d,u,T);if(T<1){const N=u===0?d-1:d,M=u===0?11:u-1;T=Y(N,M)+T,$=new Date(N,M,T),P(),setTimeout(()=>{U(T,"backward")},0);return}b($)?U(T,"backward"):j(T)}break;case"ArrowDown":I.preventDefault();{let T=O+7,$=new Date(d,u,T);if(T>E){const N=u===11?d+1:d,M=u===11?0:u+1;T=T-E,$=new Date(N,M,T),L(),setTimeout(()=>{U(T,"forward")},0);return}b($)?U(T,"forward"):j(T)}break;case"Home":I.preventDefault(),U(1,"forward");break;case"End":I.preventDefault(),U(E,"backward");break;case"PageUp":I.preventDefault(),P(),setTimeout(()=>{const T=Y(u===0?d-1:d,u===0?11:u-1),$=Math.min(O,T);U($,"forward")},0);break;case"PageDown":I.preventDefault(),L(),setTimeout(()=>{const T=Y(u===11?d+1:d,u===11?0:u+1),$=Math.min(O,T);U($,"forward")},0);break;case" ":case"Space":if(b(m))return;y(m.getDate()),l(m);break;case"Enter":I.preventDefault(),v(m);break}},U=(I,p)=>{const m=Y(d,u);if(p==="forward"){for(let E=I;E<=m;E++){const O=new Date(d,u,E);if(!b(O)){j(E);return}}L(),setTimeout(()=>{U(1,"forward")},0)}else{for(let $=I;$>=1;$--){const N=new Date(d,u,$);if(!b(N)){j($);return}}const E=u===0?d-1:d,O=u===0?11:u-1,T=Y(E,O);P(),setTimeout(()=>{U(T,"backward")},0)}},H=(()=>{const I=Y(d,u),p=V(d,u),m=[];for(let E=0;E<p;E++)m.push(null);for(let E=1;E<=I;E++){const O=new Date(d,u,E);m.push(O)}return m})(),re=[];let X=[];H.forEach((I,p)=>{if(X.push(I),X.length===7||p===H.length-1){for(;X.length<7;)X.push(null);re.push(X),X=[]}}),C.useEffect(()=>{var I;if(g!==null){const p=H.findIndex(m=>m!==null&&m.getDate()===g);p!==-1&&w.current[p]&&((I=w.current[p])==null||I.focus())}},[u,d,g,H]);const W={label:"smp-datepickercalendar-label",wrapper:"smp-datepickercalendar",calendar:"smp-datepickercalendar",table:"smp-datepickercalendar-table",th:"smp-datepickercalendar-th",td:(I,p,m,E)=>`smp-datepickercalendar-td
46
46
  ${I?"smp-datepickercalendar-td-today":""}
47
47
  ${p?"smp-datepickercalendar-td-selected":""}
48
48
  ${m?"smp-datepickercalendar-td-focused":""}
49
- ${E?"smp-datepickercalendar-td-disabled":""}`},G=()=>`${D[f]} ${d.toString()}`;return b.jsxs("div",{className:W.wrapper,ref:s,role:"dialog",tabIndex:-1,"aria-modal":"true","data-component":"datepicker-calendar",children:[b.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[b.jsx(Ae,{onClick:$,ariaLabel:a(ut.PREVIOUS_MONTH),bindValue:"<",appearance:"ghost",variant:"base"}),b.jsx("div",{"aria-label":G(),className:W.label,children:G()}),b.jsx(Ae,{onClick:k,ariaLabel:a(ut.NEXT_MONTH),bindValue:">",appearance:"ghost",variant:"base"})]}),b.jsxs("table",{ref:x,role:"grid","aria-label":`${a(gt.CALENDAR_FOR)} ${D[f]} ${d}`,className:W.table,children:[b.jsx("thead",{children:b.jsx("tr",{children:w.map(I=>b.jsx("th",{scope:"col",abbr:I.full,className:W.th,children:I.value},I.value))})}),b.jsx("tbody",{children:re.map((I,p)=>b.jsx("tr",{children:I.map((m,E)=>{const R=p*7+E;if(m===null)return b.jsx("td",{className:W.td(!1,!1,!1,!0)},`empty-${E}`);const O=m.getDate()===i.getDate()&&m.getMonth()===i.getMonth()&&m.getFullYear()===i.getFullYear(),P=l&&m.getDate()===l.getDate()&&m.getMonth()===l.getMonth()&&m.getFullYear()===l.getFullYear(),N=h===m.getDate(),M=S(m);return b.jsx("td",{role:"gridcell","aria-selected":P,tabIndex:N?0:-1,onClick:()=>v(m),onKeyDown:L=>_(L,R),"aria-label":`${m.getDate()} ${D[m.getMonth()]} ${m.getFullYear()}`,"data-selected":P,"aria-disabled":M,ref:L=>{T.current[R]=L},className:W.td(O,P,N,M),children:m.getDate()},`day-${E}`)})},`week-${p}`))})]})]})}const mr=({bindValue:r,placeholder:e,onChange:t,disabledDateRanges:n,...s})=>{const[a,o]=j.useState(!1),[i,l]=j.useState(r||""),[c,f]=j.useState(""),{anchorRef:u,targetRef:d}=dt({position:"bottom",enabled:a});We(d,()=>{o(!1)}),We(u,()=>{if(typeof u=="object"&&u!==null&&"current"in u){const $=u.current.querySelector("input");$&&$===document.activeElement&&T()}}),dr(a,d);const{format:g,getCurrentLanguage:h}=Je(),y=j.useCallback($=>{const k=$.length>5&&$r($,h())||$,Y=g(k,void 0,void 0,{type:"date"}),V=typeof k!="string",C=V&&k.toISOString().substring(0,10)||"";return{isValid:V,formattedDate:Y,isoDate:C,normalizedDate:k}},[h,g]);j.useEffect(()=>{const{formattedDate:$,isoDate:k,isValid:Y}=y(r);l(Y&&k||r),f(Y&&$||r)},[r,g,y]);const x=()=>o($=>!$),T=()=>{w(c)},D=$=>{w($),o(!1)},w=$=>{const{isoDate:k,isValid:Y}=y($);t&&t(Y&&k||$)},S=$=>{f($)},v=$=>{$.key==="Enter"&&($.preventDefault(),w(c))};return b.jsxs("div",{"data-component":"date-picker",children:[b.jsx(be,{bindValue:c,placeholder:e,onBlur:T,onChange:S,onKeyDown:v,shapeIcon:"calendar",onShapeIconClick:x,ref:u,...s}),a&&b.jsx(Un,{disabledDateRanges:n,onDateChange:D,initialValue:ft(i)&&i||"",targetRef:d})]})},Wn=({elements:r,displayMode:e,minimumChars:t,listDisplayMode:n,placeholder:s,fun:a,onOptionsRequest:o,onChange:i})=>{const l=r.map(u=>u.bindValue),c=(u,d)=>{const g=[...r];if(u=="")g.pop();else{const h=g.findIndex(y=>y.bindValue===u&&y.optionalDisplayValue===d);h>=0?g.splice(h,1):g.push({bindValue:u,optionalDisplayValue:d})}i==null||i(g)},f={container:"smp-multipleAutocomplete-container"};return b.jsxs("div",{className:f.container,"data-component":"multiple-autocomplete",children:[b.jsx(fr,{elements:r,displayMode:e,isEditable:!0,onChange:u=>{i==null||i(u)}}),b.jsx(ht,{bindValue:"",fun:a,onChange:c,_changeOnEnter:!0,listDisplayMode:n,minimumChars:t,placeholder:s,onOptionsRequest:o,_multiActiveIndex:l})]})},yr=({...r})=>{const[e,t]=j.useState(!1),n=e?"visibility-off":"visibility";return b.jsx(be,{...r,inputType:e?"text":"password",shapeIcon:n,onShapeIconClick:()=>t(!e),ariaLabel:"password","data-component":"password"})},Hn=({...r})=>{const[e,t]=j.useState(r.bindValue),{translate:n}=Je(),s=a=>{var o;a.key==="Enter"&&(a.preventDefault(),(o=r.onEnter)==null||o.call(r,e))};return b.jsx(be,{...r,placeholder:r.placeholder?r.placeholder:n(gt.SPOTLIGHT_DEFAULT_PLACEHOLDER),icon:"magnify",inputType:"search",bindValue:e,onChange:t,onKeyDown:s,ariaLabel:"search bar",_dataComponent:"search-bar"})};class ve{constructor(e,t){ye(this,"class");ye(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new ve(e,e.k.split(";"))}static fromString(e){return new ve({t:"",p:""},e.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const Ve=(r,e,t)=>({obj:{t:r.obj.t,p:r.obj.p,k:e},decode:t||r.decode,shape:r.shape}),er=r=>{const e=ve.fromDataObj(r.obj),t=r.decode?ve.fromString(r.decode).getValue():[];return e.getValue().map((n,s)=>({bindValue:n,optionalDisplayValue:t.length>=s?t[s]:""}))},qn=(r,e)=>{const t=new ve(r.obj,e.map(s=>s.bindValue)).getLegacyValue(),n=new ve(r.obj,e.map(s=>s.optionalDisplayValue?s.optionalDisplayValue:"")).getLegacyValue();return Ve(r,t,n)},vr=({decode:r,shape:e,obj:t,data:n,icon:s,fun:a,placeholderIcon:o,label:i,onChange:l,onClick:c,onEnter:f,onBlur:u,onOptionsRequest:d,isEditable:g})=>{const h={obj:t,shape:e,decode:r},y={onBlur:u,onOptionsRequest:d,fun:a,icon:s,label:i,isEditable:g,...n},x=(w,S)=>Pr(t)?Ve(h,new Ue(t,w).getLegacyValue()):Ve(h,w,S),T=w=>Ve(h,new Ye(t,w).getLegacyValue()),D=w=>qn(h,w);switch(e){case oe.AUTOCOMPLETE:{const w={...y,bindValue:t.k,optionalDisplayValue:r,onChange:(S,v)=>{l==null||l(x(S,v))}};return b.jsx(ht,{...w})}case oe.BUTTON:{const w={...y,bindValue:t.k,optionalDisplayValue:r,onClick:()=>{c==null||c(x(t.k))}};return b.jsx(Ae,{...w})}case oe.COMBOBOX:{const w={...y,bindValue:t.k,optionalDisplayValue:r,onChange:(S,v)=>{l==null||l(x(S,v))}};return b.jsx(pr,{...w})}case oe.CHECKBOX:{const w={...y,bindValue:Ye.fromDataObj(t).getValue(),optionalDisplayValue:r,onChange:S=>{l==null||l(T(S))}};return b.jsx(ur,{...w})}case oe.CHIP:{const w={...y,elements:er(h)};return b.jsx(fr,{...w})}case oe.DATE:{const w={...y,bindValue:Ue.fromDataObj(t).getValue(),onChange:S=>{l==null||l(x(S))}};return b.jsx(mr,{...w})}case oe.ICON:case oe.IMAGE:{const w={...y,icon:s,placeholderIcon:o,isInteractable:!!y.fun,onClick:()=>{c==null||c(x(t.k))}};return b.jsx(ce,{...w})}case oe.MULTI_AUTOCOMPLETE:{const w={...y,elements:er(h),onChange:S=>{l==null||l(D(S))}};return b.jsx(Wn,{...w})}case oe.PASSWORD:{const w={...y,bindValue:t.k,onChange:S=>{l==null||l(x(S))}};return b.jsx(yr,{...w})}case oe.SPOTLIGHT:{const w={...y,bindValue:t.k,onEnter:S=>{f==null||f(x(S))}};return b.jsx(Hn,{...w})}case oe.TEXT_FIELD:case void 0:{const w={...y,bindValue:t.k,onChange:S=>{l==null||l(x(S))}};return b.jsx(be,{...w})}}},Kn=(r,e)=>{const t=[];for(let n=0;n<r.length;n+=e)t.push(r.slice(n,n+e));return t},br=(r,e)=>r.map(t=>{var a,o;if((a=t.sections)!=null&&a.length)return{...t,sections:br(t.sections,e),content:t.content};let n=t.sections,s=t.content;return(o=t.content)!=null&&o.length&&t.columns&&+t.columns>1&&(n=Kn(t.content.filter(l=>!!e[l.id]),+t.columns).map((l,c)=>({...t,id:`${t.id}-${c}`,content:l,gridCols:t.columns,horizontal:!0})),s=[]),{...t,sections:n,content:s}}),tr=(r,e)=>{if(!e)return{};const t=r.some(n=>n.dim)?r.map(n=>n.dim||"auto").join(" "):`repeat(${r.length}, 1fr)`;return{[e]:t}},rr=r=>r.some(e=>e.dim&&!e.dim.endsWith("%")),fe={"smp-layout":"_smp-layout_xrjwg_1","smp-layout-horizontal":"_smp-layout-horizontal_xrjwg_9","smp-layout-vertical":"_smp-layout-vertical_xrjwg_13","smp-layout-section-grid":"_smp-layout-section-grid_xrjwg_18","smp-layout-section-vertical":"_smp-layout-section-vertical_xrjwg_20","smp-layout-section-horizontal":"_smp-layout-section-horizontal_xrjwg_24","smp-layout-section-flex":"_smp-layout-section-flex_xrjwg_29","smp-layout-cell-container":"_smp-layout-cell-container_xrjwg_34","smp-grid-template-cols":"_smp-grid-template-cols_xrjwg_44","smp-grid-template-rows":"_smp-grid-template-rows_xrjwg_48","smp-layout-section-with-title":"_smp-layout-section-with-title_xrjwg_52","smp-layout-section-title":"_smp-layout-section-title_xrjwg_58"},xr=({layout:r,cells:e})=>{var u;if(!((u=r.sections)!=null&&u.length))return b.jsx(b.Fragment,{});const t="--smp-grid-template-cols",n="--smp-grid-template-rows",s=br(r.sections,e),a=d=>d==null?void 0:d.reduce((g,h)=>{var w,S;let y="",x={},T={},D="";return(w=h.sections)!=null&&w.length?(y=fe["smp-layout-section-grid"],x=a(h.sections),h.gridCols==null&&(D=`${fe[h.horizontal?"smp-grid-template-cols":"smp-grid-template-rows"]}`,(h.horizontal||rr(h.sections))&&(T=tr(h.sections,h.horizontal?t:n)))):(S=h.content)!=null&&S.length&&(h.gridCols!==void 0&&h.gridCols>0?(y=fe["smp-layout-section-grid"],D=`${fe["smp-grid-template-cols"]}`,T={[t]:`repeat(${h.gridCols}, 1fr)`}):y=fe["smp-layout-section-flex"]),{...g,...x,[h.id]:{classes:`${y} ${fe[h.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${D} ${h.hdsp?`smp-justifyContent-${h.hdsp}`:""} ${h.vdsp?`smp-alignItems-${h.vdsp}`:""}`,styles:T}}},{}),o=a(s),i={container:`${fe["smp-layout"]} ${r.horizontal?fe["smp-layout-horizontal"]:fe["smp-layout-vertical"]}`,sections:o},l=r.horizontal||rr(r.sections)?tr(s,r.horizontal?t:n):{},c=d=>{var h;const g=b.jsx("div",{"smp-id":"section-"+d.id,className:i.sections[d.id].classes,style:i.sections[d.id].styles,children:(h=d.sections)!=null&&h.length?d.sections.map(y=>c(y)):d.content.map(y=>f(y,e[y.id],d.hdsp,d.vdsp))},"section-"+d.id);return d.title?b.jsxs("div",{className:`${fe["smp-layout-section-with-title"]}`,children:[b.jsx("span",{className:`${fe["smp-layout-section-title"]} ${d.hdsp?`smp-justifyContent-${d.hdsp}`:""} ${d.vdsp?`smp-alignItems-${d.vdsp}`:""}`,children:b.jsx(nr,{label:d.title})}),g]}):g},f=(d,g,h,y)=>{const x=d.colSpan!==void 0?d.colSpan>0?d.colSpan:d.colStart!==void 0&&d.colStart<1?1:null:null,T=x!==null?`span ${x}`:d.colStart,D=d.colEnd!==void 0&&d.colEnd>0?d.colEnd:"",w={gridColumnStart:T,gridColumnEnd:D},S=`${fe["smp-layout-cell-container"]} ${h?`smp-justifyContent-${h}`:""} ${y?`smp-alignItems-${y}`:""}`;return g?b.jsx("div",{className:S,style:{...w},"smp-id":d.id,children:b.jsx(vr,{...g})},d.id):b.jsx(b.Fragment,{})};return b.jsx("div",{className:i.container,style:l,"smp-id":"layout",children:s==null?void 0:s.map(d=>c(d))})},Bn=({data:r,onClick:e,onEnter:t})=>{var o,i;const[n,s]=j.useState(),a=j.useCallback(l=>{var f,u;if(!((f=l.rows)!=null&&f.length)||!((u=l.columns)!=null&&u.length))return{};const c=l.rows[0];return l.columns.filter(d=>d.visible).reduce((d,g)=>{const h=c.cells[g.name],y={...h,onChange:x=>{s(T=>T&&{...T,[g.name]:{...T[g.name],obj:{...T[g.name].obj,k:x.obj.k}}})},onClick:()=>{h.fun&&e&&e({...h})},onEnter:x=>{t&&t(x)}};return{...d,[g.name]:y}},{})},[e,t]);return j.useEffect(()=>{s(a(r))},[r,a]),!((o=r==null?void 0:r.rows)!=null&&o.length)||!((i=r.columns)!=null&&i.length)?null:n&&b.jsx("header",{className:"smp-appbar","aria-label":"App Bar",children:b.jsx(xr,{layout:r.rows[0].layout,cells:n})})},Pe=r=>r==null?!1:typeof r=="string"?r.toLocaleLowerCase()=="yes":r,zn=({ColumnsNumber:r=1,data:e={},ForceText:t,TextColName:n,TextColor:s="var(--smp-dashList-color-base)",Fillspace:a,FontSize:o,Horizontal:i,ForceIcon:l,IconColName:c,IconColor:f="var(--smp-dashList-color-base)",NumberFormat:u,ForceUM:d,UmColName:g,UmColor:h="var(--smp-dashList-color-base)",ForceValue:y,ValueColName:x,ValueColor:T="var(--smp-dashList-color-base)",SelectLayout:D="1",onClick:w})=>{const S="N/A",v=(e==null?void 0:e.columns)||[],$=(e==null?void 0:e.rows)||[],k=$.length>0,Y="--smp-dashList-color",V="smp-layout",C="descr",_="icon",U="um",z="value",H=o||"1em",re="18px",X="--smp-dashList-columns",W="--smp-dashList-fontSize",G={dash:(F="1")=>{const J=p(F),ee=J,te=m(J,C),ue=m(J,_),ge=m(J,U),de=m(J,z);return{container:ee,descr:te,icon:ue,um:ge,value:de}},dashList:`smp-dash-list ${Pe(a)?"smp-dash-list-fill-space":""}
50
- ${Pe(i)?"smp-dash-list-horizontal":""}`},{format:I}=Je(),p=F=>`${V}-${F}`,m=(F,J)=>`${F}__${J}`,E=F=>`${Y}-${F}`,R=F=>{const J=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(J.test(F)){const te=F.match(J)||[];if((te==null?void 0:te.length)>3)return"rgb("+te[1]+","+te[2]+","+te[3]+")"}return F},O=F=>{if(!u)return F;const[J,ee]=P(u).map(xe=>parseInt(xe||"0")),te="0,0"+(ee?"."+"0".repeat(ee):""),ue=I(F,te,"it");if(!J)return ue;const[ge,de]=ue.split(",");return ge+(de?`,${de}`:"")},P=F=>F.includes(";")?F.split(";"):[F],N=F=>{const J=te=>{var ue;if(te)return(ue=F==null?void 0:F.cells[te])==null?void 0:ue.obj.k},ee=te=>{var ue,ge;if(!(v.length<=te))return(ge=(ue=F==null?void 0:F.cells[v[te].name])==null?void 0:ue.obj)==null?void 0:ge.k};return{descr:t||J(n)||ee(2)||"",icon:l||J(c)||ee(3)||"",um:d||J(g)||ee(1)||"",value:y||J(x)||ee(0)||""}},M=F=>{w==null||w(F)},L=(F,J)=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),F.stopPropagation(),M(J))},q=(F=>{const J=G.dash(F);return{className:J,descr:ee=>b.jsx("div",{className:J.descr,children:ee},`${F}-${C}`),icon:ee=>b.jsx("div",{className:J.icon,children:b.jsx(ce,{color:f,height:re,icon:ee,width:re})},`${F}-${_}`),um:ee=>b.jsx("div",{className:J.um,children:ee},`${F}-${U}`),value:ee=>b.jsx("div",{className:J.value,children:ee},`${F}-${z}`)}})(D),ne=F=>{const{descr:J,icon:ee,um:te,value:ue}=N(F),ge={[E(C)]:R(s),[E(U)]:R(h),[E(z)]:R(T)},de=[],xe=O(ue);switch(D){case"2":ee&&de.push(q.icon(ee)),de.push(q.descr(J)),de.push(q.value(te?xe+" "+te:xe));break;default:case"1":de.push(q.descr(J)),de.push(q.value(te?xe+" "+te:xe))}return b.jsx("div",{className:q.className.container,role:"button",style:ge,tabIndex:0,onClick:()=>M(F),onKeyDown:Sr=>L(Sr,F),children:de},F.rowId)},A={[X]:String(r),[W]:H};return b.jsx("div",{className:G.dashList,style:A,children:k?$.map(F=>ne(F)):S})},Gn=({data:r,logo:e,open:t,minifiedOnClose:n=!0,customHeight:s="100vh",onClick:a,onEnter:o,onClose:i})=>{var D,w;const[l,c]=j.useState(),[f,u]=j.useState(t??!0),d=j.useRef(null),g=s.trim()?s:"100vh",h=j.useCallback(S=>{var $,k;if(!(($=S.rows)!=null&&$.length)||!((k=S.columns)!=null&&k.length))return{};const v=S.rows[0];return S.columns.filter(Y=>Y.visible).reduce((Y,V)=>{const C=v.cells[V.name];if(!f&&n&&C.shape!==oe.BUTTON)return Y;const _={...C,onChange:U=>{c(z=>{const H={...z};return H!=null&&H[V.name]&&(H[V.name].obj.k=U.obj.k),H})},onClick:()=>{C.fun&&a&&a({...C})},onEnter:U=>{o&&o(U)}};return!f&&n&&(_.data={..._.data,showText:!1}),{...Y,[V.name]:_}},{})},[a,o,f,n]),y=j.useCallback(()=>{i==null||i()},[i]),x=()=>{n?u(S=>!S):(u(!1),i==null||i())};if(j.useEffect(()=>{c(h(r))},[r]),j.useEffect(()=>{if(!d.current)return;if(!n){c(h(r));return}const S=getComputedStyle(d.current).getPropertyValue("--smp-drawer-slide-transition");let v=Number(S);S.endsWith("ms")?v=parseFloat(S):S.endsWith("s")&&(v=parseFloat(S)*1e3),setTimeout(()=>{c(h(r))},v/2)},[f,n]),j.useEffect(()=>{t!==void 0&&!n&&u(t)},[n,t]),!((D=r==null?void 0:r.rows)!=null&&D.length)||!((w=r.columns)!=null&&w.length))return null;const T={drawer:`smp-drawer ${n?"smp-drawer-minified":"smp-drawer-fixed"} ${f?"smp-drawer-open":""}`,container:"smp-drawer-container",containerHeader:"smp-drawer-container-header",containerIcon:`${f?"":"smp-drawer-container-icon-close"} smp-drawer-container-icon`,containerLayout:"smp-drawer-container-layout",containerLogo:"smp-drawer-container-logo",backdrop:`smp-drawer-backdrop ${f?"smp-drawer-backdrop-open":""}`};return l&&b.jsxs(b.Fragment,{children:[!n&&b.jsx("div",{"aria-hidden":"true","aria-label":"drawer-backdrop",className:T.backdrop,onClick:y}),b.jsx("aside",{ref:d,className:T.drawer,style:{height:g},"aria-label":"Drawer","smp-id":"drawer",children:b.jsxs("div",{className:T.container,children:[b.jsxs("div",{className:T.containerHeader,children:[e&&b.jsx("div",{className:T.containerLogo,children:b.jsx(ce,{icon:e,title:"drawer_logo",width:"100%",height:24})}),b.jsx("div",{className:T.containerIcon,children:b.jsx(ce,{icon:n?"menu_close":"close",title:"drawer_icon",rotated:!f,isInteractable:!0,onClick:x,width:20,height:20})})]}),b.jsx("div",{className:T.containerLayout,children:b.jsx(xr,{layout:r.rows[0].layout,cells:l})})]})})]})},Jn=({data:r,Type:e,ShowSubmit:t=!1,SubmitPosition:n="Right",DefaultValue:s,Label:a,LabelPosition:o="Left",onBlur:i,onClick:l,onOptionsRequest:c})=>{const[f,u]=j.useState();j.useEffect(()=>{u(()=>{const y={...r};return e&&(y.shape=e),s&&(y.obj=Ar(s)),y})},[r,s,e]);const g={container:`smp-field-container ${Pe(t)?`smp-field-position-${n}`:""}`},h=()=>{Pe(t)||i==null||i(f)};if(f)return b.jsxs("div",{className:g.container,children:[b.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",font:"var(--smp-fontLabel-base)"},children:b.jsx(vr,{...f,onChange:u,onOptionsRequest:c,fun:r.fun,onBlur:h,label:a,labelPosition:o})}),Pe(t)&&b.jsx(Ae,{bindValue:"Confirm",onClick:()=>l==null?void 0:l(f)})]})};exports.AppBar=Bn;exports.Autocomplete=ht;exports.Button=Ae;exports.Checkbox=ur;exports.Combobox=pr;exports.DashList=zn;exports.DatePicker=mr;exports.Drawer=Gn;exports.Field=Jn;exports.Icon=ce;exports.Password=yr;exports.Textfield=be;exports.configurePaths=rn;
49
+ ${E?"smp-datepickercalendar-td-disabled":""}`},G=()=>`${R[u]} ${d.toString()}`;return S.jsxs("div",{className:W.wrapper,ref:s,role:"dialog",tabIndex:-1,"aria-modal":"true","data-component":"datepicker-calendar",children:[S.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[S.jsx(Te,{onClick:P,ariaLabel:a(ut.PREVIOUS_MONTH),bindValue:"<",appearance:"ghost",variant:"base"}),S.jsx("div",{"aria-label":G(),className:W.label,children:G()}),S.jsx(Te,{onClick:L,ariaLabel:a(ut.NEXT_MONTH),bindValue:">",appearance:"ghost",variant:"base"})]}),S.jsxs("table",{ref:x,role:"grid","aria-label":`${a(gt.CALENDAR_FOR)} ${R[u]} ${d}`,className:W.table,children:[S.jsx("thead",{children:S.jsx("tr",{children:D.map(I=>S.jsx("th",{scope:"col",abbr:I.full,className:W.th,children:I.value},I.value))})}),S.jsx("tbody",{children:re.map((I,p)=>S.jsx("tr",{children:I.map((m,E)=>{const O=p*7+E;if(m===null)return S.jsx("td",{className:W.td(!1,!1,!1,!0)},`empty-${E}`);const T=m.getDate()===i.getDate()&&m.getMonth()===i.getMonth()&&m.getFullYear()===i.getFullYear(),$=c&&m.getDate()===c.getDate()&&m.getMonth()===c.getMonth()&&m.getFullYear()===c.getFullYear(),N=g===m.getDate(),M=b(m);return S.jsx("td",{role:"gridcell","aria-selected":$,tabIndex:N?0:-1,onClick:()=>v(m),onKeyDown:k=>_(k,O),"aria-label":`${m.getDate()} ${R[m.getMonth()]} ${m.getFullYear()}`,"data-selected":$,"aria-disabled":M,ref:k=>{w.current[O]=k},className:W.td(T,$,N,M),children:m.getDate()},`day-${E}`)})},`week-${p}`))})]})]})}const yr=({bindValue:r,placeholder:e,onChange:t,disabledDateRanges:n,...s})=>{const[a,o]=C.useState(!1),[i,c]=C.useState(r||""),[l,u]=C.useState(""),{anchorRef:f,targetRef:d}=dt({position:"bottom",enabled:a});We(d,()=>{o(!1)}),We(f,()=>{if(typeof f=="object"&&f!==null&&"current"in f){const P=f.current.querySelector("input");P&&P===document.activeElement&&w()}}),pr(a,d);const{format:h,getCurrentLanguage:g}=Je(),y=C.useCallback(P=>{const L=P.length>5&&jr(P,g())||P,Y=h(L,void 0,void 0,{type:"date"}),V=typeof L!="string",j=V&&L.toISOString().substring(0,10)||"";return{isValid:V,formattedDate:Y,isoDate:j,normalizedDate:L}},[g,h]);C.useEffect(()=>{const{formattedDate:P,isoDate:L,isValid:Y}=y(r);c(Y&&L||r),u(Y&&P||r)},[r,h,y]);const x=()=>o(P=>!P),w=()=>{D(l)},R=P=>{D(P),o(!1)},D=P=>{const{isoDate:L,isValid:Y}=y(P);t&&t(Y&&L||P)},b=P=>{u(P)},v=P=>{P.key==="Enter"&&(P.preventDefault(),D(l))};return S.jsxs("div",{"data-component":"date-picker",children:[S.jsx(be,{bindValue:l,placeholder:e,onBlur:w,onChange:b,onKeyDown:v,shapeIcon:"calendar",onShapeIconClick:x,ref:f,...s}),a&&S.jsx(Wn,{disabledDateRanges:n,onDateChange:R,initialValue:ft(i)&&i||"",targetRef:d})]})},Hn=({elements:r,displayMode:e,minimumChars:t,listDisplayMode:n,placeholder:s,fun:a,onOptionsRequest:o,onChange:i})=>{const c=r.map(f=>f.bindValue),l=(f,d)=>{const h=[...r];if(f=="")h.pop();else{const g=h.findIndex(y=>y.bindValue===f&&y.optionalDisplayValue===d);g>=0?h.splice(g,1):h.push({bindValue:f,optionalDisplayValue:d})}i==null||i(h)},u={container:"smp-multipleAutocomplete-container"};return S.jsxs("div",{className:u.container,"data-component":"multiple-autocomplete",children:[S.jsx(dr,{elements:r,displayMode:e,isEditable:!0,onChange:f=>{i==null||i(f)}}),S.jsx(ht,{bindValue:"",fun:a,onChange:l,_changeOnEnter:!0,listDisplayMode:n,minimumChars:t,placeholder:s,onOptionsRequest:o,_multiActiveIndex:c})]})},vr=({...r})=>{const[e,t]=C.useState(!1),n=e?"visibility-off":"visibility";return S.jsx(be,{...r,inputType:e?"text":"password",shapeIcon:n,onShapeIconClick:()=>t(!e),ariaLabel:"password","data-component":"password"})},qn=({...r})=>{const[e,t]=C.useState(r.bindValue),{translate:n}=Je(),s=a=>{var o;a.key==="Enter"&&(a.preventDefault(),(o=r.onEnter)==null||o.call(r,e))};return S.jsx(be,{...r,placeholder:r.placeholder?r.placeholder:n(gt.SPOTLIGHT_DEFAULT_PLACEHOLDER),icon:"magnify",inputType:"search",bindValue:e,onChange:t,onKeyDown:s,ariaLabel:"search bar",_dataComponent:"search-bar"})};class ve{constructor(e,t){ye(this,"class");ye(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new ve(e,e.k.split(";"))}static fromString(e){return new ve({t:"",p:""},e.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const Ve=(r,e,t)=>({obj:{t:r.obj.t,p:r.obj.p,k:e},decode:t||r.decode,shape:r.shape,fun:r.fun}),er=r=>{const e=ve.fromDataObj(r.obj),t=r.decode?ve.fromString(r.decode).getValue():[];return e.getValue().map((n,s)=>({bindValue:n,optionalDisplayValue:t.length>=s?t[s]:""}))},Bn=(r,e)=>{const t=new ve(r.obj,e.map(s=>s.bindValue)).getLegacyValue(),n=new ve(r.obj,e.map(s=>s.optionalDisplayValue?s.optionalDisplayValue:"")).getLegacyValue();return Ve(r,t,n)},br=({decode:r,shape:e,obj:t,data:n,icon:s,fun:a,placeholderIcon:o,label:i,options:c,onChange:l,onClick:u,onEnter:f,onBlur:d,onOptionsRequest:h,isEditable:g})=>{const y={obj:t,shape:e,decode:r,icon:s},x={onBlur:d,onOptionsRequest:h,fun:a,icon:s,label:i,isEditable:g,...n},w=(b,v,P)=>$r(t)?Ve(b,new Ue(t,v).getLegacyValue()):Ve(b,v,P),R=b=>Ve(y,new Ye(t,b).getLegacyValue()),D=b=>Bn(y,b);switch(e){case oe.AUTOCOMPLETE:{const b={...x,bindValue:t.k,optionalDisplayValue:r,onChange:(v,P)=>{l==null||l(w(y,v,P))}};return S.jsx(ht,{...b})}case oe.BUTTON:{const b={...x,bindValue:t.k,optionalDisplayValue:r,onClick:()=>{u==null||u(w(y,t.k))}};return S.jsx(Te,{...b})}case oe.BUTTON_LIST:{const b={...x,options:c,onClick:(v,P)=>{const L={...y,fun:P};u==null||u(w(L,v))}};return S.jsx(ur,{...b})}case oe.COMBOBOX:{const b={...x,bindValue:t.k,optionalDisplayValue:r,onChange:(v,P)=>{l==null||l(w(y,v,P))}};return S.jsx(hr,{...b})}case oe.CHECKBOX:{const b={...x,bindValue:Ye.fromDataObj(t).getValue(),optionalDisplayValue:r,onChange:v=>{l==null||l(R(v))}};return S.jsx(fr,{...b})}case oe.CHIP:{const b={...x,elements:er(y)};return S.jsx(dr,{...b})}case oe.DATE:{const b={...x,bindValue:Ue.fromDataObj(t).getValue(),onChange:v=>{l==null||l(w(y,v))}};return S.jsx(yr,{...b})}case oe.ICON:case oe.IMAGE:{const b={...x,icon:s,placeholderIcon:o,isInteractable:!!x.fun,onClick:()=>{u==null||u(w(y,t.k))}};return S.jsx(ce,{...b})}case oe.MULTI_AUTOCOMPLETE:{const b={...x,elements:er(y),onChange:v=>{l==null||l(D(v))}};return S.jsx(Hn,{...b})}case oe.PASSWORD:{const b={...x,bindValue:t.k,onChange:v=>{l==null||l(w(y,v))}};return S.jsx(vr,{...b})}case oe.SPOTLIGHT:{const b={...x,bindValue:t.k,onEnter:v=>{f==null||f(w(y,v))}};return S.jsx(qn,{...b})}case oe.TEXT_FIELD:case void 0:{const b={...x,bindValue:t.k,onChange:v=>{l==null||l(w(y,v))}};return S.jsx(be,{...b})}}},Kn=(r,e)=>{const t=[];for(let n=0;n<r.length;n+=e)t.push(r.slice(n,n+e));return t},xr=(r,e)=>r.map(t=>{var a,o;if((a=t.sections)!=null&&a.length)return{...t,sections:xr(t.sections,e),content:t.content};let n=t.sections,s=t.content;return(o=t.content)!=null&&o.length&&t.columns&&+t.columns>1&&(n=Kn(t.content.filter(c=>!!e[c.id]),+t.columns).map((c,l)=>({...t,id:`${t.id}-${l}`,content:c,gridCols:t.columns,horizontal:!0})),s=[]),{...t,sections:n,content:s}}),tr=(r,e)=>{if(!e)return{};const t=r.some(n=>n.dim)?r.map(n=>n.dim||"auto").join(" "):`repeat(${r.length}, 1fr)`;return{[e]:t}},rr=r=>r.some(e=>e.dim&&!e.dim.endsWith("%")),fe={"smp-layout":"_smp-layout_xrjwg_1","smp-layout-horizontal":"_smp-layout-horizontal_xrjwg_9","smp-layout-vertical":"_smp-layout-vertical_xrjwg_13","smp-layout-section-grid":"_smp-layout-section-grid_xrjwg_18","smp-layout-section-vertical":"_smp-layout-section-vertical_xrjwg_20","smp-layout-section-horizontal":"_smp-layout-section-horizontal_xrjwg_24","smp-layout-section-flex":"_smp-layout-section-flex_xrjwg_29","smp-layout-cell-container":"_smp-layout-cell-container_xrjwg_34","smp-grid-template-cols":"_smp-grid-template-cols_xrjwg_44","smp-grid-template-rows":"_smp-grid-template-rows_xrjwg_48","smp-layout-section-with-title":"_smp-layout-section-with-title_xrjwg_52","smp-layout-section-title":"_smp-layout-section-title_xrjwg_58"},Sr=({layout:r,cells:e})=>{var f;if(!((f=r.sections)!=null&&f.length))return S.jsx(S.Fragment,{});const t="--smp-grid-template-cols",n="--smp-grid-template-rows",s=xr(r.sections,e),a=d=>d==null?void 0:d.reduce((h,g)=>{var D,b;let y="",x={},w={},R="";return(D=g.sections)!=null&&D.length?(y=fe["smp-layout-section-grid"],x=a(g.sections),g.gridCols==null&&(R=`${fe[g.horizontal?"smp-grid-template-cols":"smp-grid-template-rows"]}`,(g.horizontal||rr(g.sections))&&(w=tr(g.sections,g.horizontal?t:n)))):(b=g.content)!=null&&b.length&&(g.gridCols!==void 0&&g.gridCols>0?(y=fe["smp-layout-section-grid"],R=`${fe["smp-grid-template-cols"]}`,w={[t]:`repeat(${g.gridCols}, 1fr)`}):y=fe["smp-layout-section-flex"]),{...h,...x,[g.id]:{classes:`${y} ${fe[g.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${R} ${g.hdsp?`smp-justifyContent-${g.hdsp}`:""} ${g.vdsp?`smp-alignItems-${g.vdsp}`:""}`,styles:w}}},{}),o=a(s),i={container:`${fe["smp-layout"]} ${r.horizontal?fe["smp-layout-horizontal"]:fe["smp-layout-vertical"]}`,sections:o},c=r.horizontal||rr(r.sections)?tr(s,r.horizontal?t:n):{},l=d=>{var g;const h=S.jsx("div",{"smp-id":"section-"+d.id,className:i.sections[d.id].classes,style:i.sections[d.id].styles,children:(g=d.sections)!=null&&g.length?d.sections.map(y=>l(y)):d.content.map(y=>u(y,e[y.id],d.hdsp,d.vdsp))},"section-"+d.id);return d.title?S.jsxs("div",{className:`${fe["smp-layout-section-with-title"]}`,children:[S.jsx("span",{className:`${fe["smp-layout-section-title"]} ${d.hdsp?`smp-justifyContent-${d.hdsp}`:""} ${d.vdsp?`smp-alignItems-${d.vdsp}`:""}`,children:S.jsx(nr,{label:d.title})}),h]}):h},u=(d,h,g,y)=>{const x=d.colSpan!==void 0?d.colSpan>0?d.colSpan:d.colStart!==void 0&&d.colStart<1?1:null:null,w=x!==null?`span ${x}`:d.colStart,R=d.colEnd!==void 0&&d.colEnd>0?d.colEnd:"",D={gridColumnStart:w,gridColumnEnd:R},b=`${fe["smp-layout-cell-container"]} ${g?`smp-justifyContent-${g}`:""} ${y?`smp-alignItems-${y}`:""}`;return h?S.jsx("div",{className:b,style:{...D},"smp-id":d.id,children:S.jsx(br,{...h})},d.id):S.jsx(S.Fragment,{})};return S.jsx("div",{className:i.container,style:c,"smp-id":"layout",children:s==null?void 0:s.map(d=>l(d))})},zn=({data:r,onClick:e,onEnter:t})=>{var o,i;const[n,s]=C.useState(),a=C.useCallback(c=>{var u,f;if(!((u=c.rows)!=null&&u.length)||!((f=c.columns)!=null&&f.length))return{};const l=c.rows[0];return c.columns.filter(d=>d.visible).reduce((d,h)=>{const g=l.cells[h.name],y={...g,onChange:x=>{s(w=>w&&{...w,[h.name]:{...w[h.name],obj:{...w[h.name].obj,k:x.obj.k}}})},onClick:()=>{g.fun&&e&&e({...g})},onEnter:x=>{t&&t(x)}};return{...d,[h.name]:y}},{})},[e,t]);return C.useEffect(()=>{s(a(r))},[r,a]),!((o=r==null?void 0:r.rows)!=null&&o.length)||!((i=r.columns)!=null&&i.length)?null:n&&S.jsx("header",{className:"smp-appbar","aria-label":"App Bar",children:S.jsx(Sr,{layout:r.rows[0].layout,cells:n})})},$e=r=>r==null?!1:typeof r=="string"?r.toLocaleLowerCase()=="yes":r,Gn=({ColumnsNumber:r=1,data:e={},ForceText:t,TextColName:n,TextColor:s="var(--smp-dashList-color-base)",Fillspace:a,FontSize:o,Horizontal:i,ForceIcon:c,IconColName:l,IconColor:u="var(--smp-dashList-color-base)",NumberFormat:f,ForceUM:d,UmColName:h,UmColor:g="var(--smp-dashList-color-base)",ForceValue:y,ValueColName:x,ValueColor:w="var(--smp-dashList-color-base)",SelectLayout:R="1",onClick:D})=>{const b="N/A",v=(e==null?void 0:e.columns)||[],P=(e==null?void 0:e.rows)||[],L=P.length>0,Y="--smp-dashList-color",V="smp-layout",j="descr",_="icon",U="um",z="value",H=o||"1em",re="18px",X="--smp-dashList-columns",W="--smp-dashList-fontSize",G={dash:(F="1")=>{const J=p(F),ee=J,te=m(J,j),ue=m(J,_),ge=m(J,U),de=m(J,z);return{container:ee,descr:te,icon:ue,um:ge,value:de}},dashList:`smp-dash-list ${$e(a)?"smp-dash-list-fill-space":""}
50
+ ${$e(i)?"smp-dash-list-horizontal":""}`},{format:I}=Je(),p=F=>`${V}-${F}`,m=(F,J)=>`${F}__${J}`,E=F=>`${Y}-${F}`,O=F=>{const J=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(J.test(F)){const te=F.match(J)||[];if((te==null?void 0:te.length)>3)return"rgb("+te[1]+","+te[2]+","+te[3]+")"}return F},T=F=>{if(!f)return F;const[J,ee]=$(f).map(xe=>parseInt(xe||"0")),te="0,0"+(ee?"."+"0".repeat(ee):""),ue=I(F,te,"it");if(!J)return ue;const[ge,de]=ue.split(",");return ge+(de?`,${de}`:"")},$=F=>F.includes(";")?F.split(";"):[F],N=F=>{const J=te=>{var ue;if(te)return(ue=F==null?void 0:F.cells[te])==null?void 0:ue.obj.k},ee=te=>{var ue,ge;if(!(v.length<=te))return(ge=(ue=F==null?void 0:F.cells[v[te].name])==null?void 0:ue.obj)==null?void 0:ge.k};return{descr:t||J(n)||ee(2)||"",icon:c||J(l)||ee(3)||"",um:d||J(h)||ee(1)||"",value:y||J(x)||ee(0)||""}},M=F=>{D==null||D(F)},k=(F,J)=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),F.stopPropagation(),M(J))},q=(F=>{const J=G.dash(F);return{className:J,descr:ee=>S.jsx("div",{className:J.descr,children:ee},`${F}-${j}`),icon:ee=>S.jsx("div",{className:J.icon,children:S.jsx(ce,{color:u,height:re,icon:ee,width:re})},`${F}-${_}`),um:ee=>S.jsx("div",{className:J.um,children:ee},`${F}-${U}`),value:ee=>S.jsx("div",{className:J.value,children:ee},`${F}-${z}`)}})(R),ne=F=>{const{descr:J,icon:ee,um:te,value:ue}=N(F),ge={[E(j)]:O(s),[E(U)]:O(g),[E(z)]:O(w)},de=[],xe=T(ue);switch(R){case"2":ee&&de.push(q.icon(ee)),de.push(q.descr(J)),de.push(q.value(te?xe+" "+te:xe));break;default:case"1":de.push(q.descr(J)),de.push(q.value(te?xe+" "+te:xe))}return S.jsx("div",{className:q.className.container,role:"button",style:ge,tabIndex:0,onClick:()=>M(F),onKeyDown:wr=>k(wr,F),children:de},F.rowId)},A={[X]:String(r),[W]:H};return S.jsx("div",{className:G.dashList,style:A,children:L?P.map(F=>ne(F)):b})},Jn=({data:r,logo:e,open:t,minifiedOnClose:n=!0,customHeight:s="100vh",onClick:a,onEnter:o,onClose:i})=>{var R,D;const[c,l]=C.useState(),[u,f]=C.useState(t??!0),d=C.useRef(null),h=s.trim()?s:"100vh",g=C.useCallback(b=>{var P,L;if(!((P=b.rows)!=null&&P.length)||!((L=b.columns)!=null&&L.length))return{};const v=b.rows[0];return b.columns.filter(Y=>Y.visible).reduce((Y,V)=>{const j=v.cells[V.name];if(!u&&n&&j.shape!==oe.BUTTON)return Y;const _={...j,onChange:U=>{l(z=>{const H={...z};return H!=null&&H[V.name]&&(H[V.name].obj.k=U.obj.k),H})},onClick:()=>{j.fun&&a&&a({...j})},onEnter:U=>{o&&o(U)}};return!u&&n&&(_.data={..._.data,showText:!1}),{...Y,[V.name]:_}},{})},[a,o,u,n]),y=C.useCallback(()=>{i==null||i()},[i]),x=()=>{n?f(b=>!b):(f(!1),i==null||i())};if(C.useEffect(()=>{l(g(r))},[r]),C.useEffect(()=>{if(!d.current)return;if(!n){l(g(r));return}const b=getComputedStyle(d.current).getPropertyValue("--smp-drawer-slide-transition");let v=Number(b);b.endsWith("ms")?v=parseFloat(b):b.endsWith("s")&&(v=parseFloat(b)*1e3),setTimeout(()=>{l(g(r))},v/2)},[u,n]),C.useEffect(()=>{t!==void 0&&!n&&f(t)},[n,t]),!((R=r==null?void 0:r.rows)!=null&&R.length)||!((D=r.columns)!=null&&D.length))return null;const w={drawer:`smp-drawer ${n?"smp-drawer-minified":"smp-drawer-fixed"} ${u?"smp-drawer-open":""}`,container:"smp-drawer-container",containerHeader:"smp-drawer-container-header",containerIcon:`${u?"":"smp-drawer-container-icon-close"} smp-drawer-container-icon`,containerLayout:"smp-drawer-container-layout",containerLogo:"smp-drawer-container-logo",backdrop:`smp-drawer-backdrop ${u?"smp-drawer-backdrop-open":""}`};return c&&S.jsxs(S.Fragment,{children:[!n&&S.jsx("div",{"aria-hidden":"true","aria-label":"drawer-backdrop",className:w.backdrop,onClick:y}),S.jsx("aside",{ref:d,className:w.drawer,style:{height:h},"aria-label":"Drawer","smp-id":"drawer",children:S.jsxs("div",{className:w.container,children:[S.jsxs("div",{className:w.containerHeader,children:[e&&S.jsx("div",{className:w.containerLogo,children:S.jsx(ce,{icon:e,title:"drawer_logo",width:"100%",height:24})}),S.jsx("div",{className:w.containerIcon,children:S.jsx(ce,{icon:n?"menu_close":"close",title:"drawer_icon",rotated:!u,isInteractable:!0,onClick:x,width:20,height:20})})]}),S.jsx("div",{className:w.containerLayout,children:S.jsx(Sr,{layout:r.rows[0].layout,cells:c})})]})})]})},Xn=({data:r,Type:e,ShowSubmit:t=!1,SubmitPosition:n="Right",DefaultValue:s,Label:a,LabelPosition:o="Left",onBlur:i,onClick:c,onOptionsRequest:l})=>{const[u,f]=C.useState();C.useEffect(()=>{f(()=>{const y={...r};return e&&(y.shape=e),s&&(y.obj=Ar(s)),y})},[r,s,e]);const h={container:`smp-field-container ${$e(t)?`smp-field-position-${n}`:""}`},g=()=>{$e(t)||i==null||i(u)};if(u)return S.jsxs("div",{className:h.container,children:[S.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",font:"var(--smp-fontLabel-base)"},children:S.jsx(br,{...u,onChange:f,onOptionsRequest:l,fun:r.fun,onBlur:g,label:a,labelPosition:o})}),$e(t)&&S.jsx(Te,{bindValue:"Confirm",onClick:()=>c==null?void 0:c(u)})]})};exports.AppBar=zn;exports.Autocomplete=ht;exports.Button=Te;exports.ButtonList=ur;exports.Checkbox=fr;exports.Combobox=hr;exports.DashList=Gn;exports.DatePicker=yr;exports.Drawer=Jn;exports.Field=Xn;exports.Icon=ce;exports.Password=vr;exports.Textfield=be;exports.configurePaths=nn;