@ansible/ansible-ui-framework 2.4.1120 → 2.4.1121

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,4 +9,5 @@ export declare function DataEditor(props: {
9
9
  setError: (error?: string) => void;
10
10
  isReadOnly?: boolean;
11
11
  className?: string;
12
+ lineNumbers?: boolean;
12
13
  }): import("react/jsx-runtime").JSX.Element;
package/index.js CHANGED
@@ -45334,9 +45334,9 @@ function jEe(e) {
45334
45334
  _e(() => {
45335
45335
  if (l.current) {
45336
45336
  const p = Ra.editor.create(l.current, {
45337
- lineNumbers: "on",
45337
+ lineNumbers: e.lineNumbers ? "on" : "off",
45338
+ lineDecorationsWidth: e.lineNumbers ? void 0 : 0,
45338
45339
  theme: "data-editor-dark",
45339
- lineDecorationsWidth: 8,
45340
45340
  padding: { top: KD, bottom: ZD },
45341
45341
  fontSize: 14,
45342
45342
  fontFamily: "RedHatMono",
@@ -45350,7 +45350,7 @@ function jEe(e) {
45350
45350
  });
45351
45351
  return u.current.editor = p, () => p.dispose();
45352
45352
  }
45353
- }, []), _e(() => {
45353
+ }, [e.lineNumbers]), _e(() => {
45354
45354
  var b;
45355
45355
  const p = (b = u == null ? void 0 : u.current) == null ? void 0 : b.editor;
45356
45356
  if (!p)
@@ -48188,7 +48188,7 @@ function g6e(e) {
48188
48188
  ), E.addAlert({ variant: "success", title: t("File downloaded"), timeout: !0 });
48189
48189
  }, [E, p, c, x, n, t]);
48190
48190
  Xy(() => {
48191
- const F = bs(ys(p(n)), x);
48191
+ const F = bs(ys(p(n), c), x);
48192
48192
  T(F);
48193
48193
  }, [p, c, x, n]);
48194
48194
  const M = XAe(e.label, e.isRequired);
package/index.umd.cjs CHANGED
@@ -551,7 +551,7 @@ ${o}${y}`}else p=`${g}${l}${h.join(" ")}${l}${y}`;return e&&(p+=Po(p,o,c(e)),a&&
551
551
  `:""}var gwe=mwe,vwe={dump:gwe};function tx(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var ywe=un,bwe=lj,xwe=dj,_we=vj,wwe=yj,Swe=q1,Owe=Bj.load,Cwe=Bj.loadAll,Twe=vwe.dump,Ewe=kn,kwe={binary:Sj,float:gj,map:fj,null:hj,pairs:Cj,set:Tj,timestamp:_j,bool:pj,int:mj,merge:wj,omap:Oj,seq:uj,str:cj},Awe=tx("safeLoad","load"),Pwe=tx("safeLoadAll","loadAll"),jwe=tx("safeDump","dump"),s$={Type:ywe,Schema:bwe,FAILSAFE_SCHEMA:xwe,JSON_SCHEMA:_we,CORE_SCHEMA:wwe,DEFAULT_SCHEMA:Swe,load:Owe,loadAll:Cwe,dump:Twe,YAMLException:Ewe,types:kwe,safeLoad:Awe,safeLoadAll:Pwe,safeDump:jwe};function l$(e,t,n){const r=new Map,i=c=>{if(t==="*")return!0;const u=c.getLanguageId();return Array.isArray(t)?t.includes(u):t===u},a=async c=>{const u=await n.provideMarkerData(c);!c.isDisposed()&&i(c)&&e.editor.setModelMarkers(c,n.owner,u??[])},o=c=>{if(!i(c))return;let u;r.set(String(c.uri),c.onDidChangeContent(()=>{clearTimeout(u),u=setTimeout(()=>{a(c)},500)})),a(c)},s=c=>{e.editor.setModelMarkers(c,n.owner,[]);const u=String(c.uri),f=r.get(u);f&&(f.dispose(),r.delete(u))},l=[e.editor.onDidCreateModel(o),e.editor.onWillDisposeModel(c=>{var u;s(c),(u=n.doReset)==null||u.call(n,c)}),e.editor.onDidChangeModelLanguage(c=>{var u;s(c.model),o(c.model),(u=n.doReset)==null||u.call(n,c.model)})];for(const c of e.editor.getModels())o(c);return{dispose(){for(const c of r.keys())s(e.editor.getModel(e.Uri.parse(c)));for(;l.length;)l.pop().dispose()}}}function $we(e,t){let{createData:n,interval:r=3e4,label:i,moduleId:a,stopWhenIdleFor:o=12e4}=t,s,l=0,c=!1;const u=()=>{s&&(s.dispose(),s=void 0)},f=setInterval(()=>{if(!s)return;Date.now()-l>o&&u()},r);return{dispose(){c=!0,clearInterval(f),u()},getWorker(...d){if(c)throw new Error("Worker manager has been disposed");return l=Date.now(),s||(s=e.editor.createWebWorker({createData:n,label:i,moduleId:a})),s.withSyncedResources(d)},updateCreateData(d){n=d,u()}}}var c$;(()=>{var e={470:i=>{function a(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function o(l,c){for(var u,f="",d=0,h=-1,p=0,g=0;g<=l.length;++g){if(g<l.length)u=l.charCodeAt(g);else{if(u===47)break;u=47}if(u===47){if(!(h===g-1||p===1))if(h!==g-1&&p===2){if(f.length<2||d!==2||f.charCodeAt(f.length-1)!==46||f.charCodeAt(f.length-2)!==46){if(f.length>2){var y=f.lastIndexOf("/");if(y!==f.length-1){y===-1?(f="",d=0):d=(f=f.slice(0,y)).length-1-f.lastIndexOf("/"),h=g,p=0;continue}}else if(f.length===2||f.length===1){f="",d=0,h=g,p=0;continue}}c&&(f.length>0?f+="/..":f="..",d=2)}else f.length>0?f+="/"+l.slice(h+1,g):f=l.slice(h+1,g),d=g-h-1;h=g,p=0}else u===46&&p!==-1?++p:p=-1}return f}var s={resolve:function(){for(var l,c="",u=!1,f=arguments.length-1;f>=-1&&!u;f--){var d;f>=0?d=arguments[f]:(l===void 0&&(l=process.cwd()),d=l),a(d),d.length!==0&&(c=d+"/"+c,u=d.charCodeAt(0)===47)}return c=o(c,!u),u?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(l){if(a(l),l.length===0)return".";var c=l.charCodeAt(0)===47,u=l.charCodeAt(l.length-1)===47;return(l=o(l,!c)).length!==0||c||(l="."),l.length>0&&u&&(l+="/"),c?"/"+l:l},isAbsolute:function(l){return a(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,c=0;c<arguments.length;++c){var u=arguments[c];a(u),u.length>0&&(l===void 0?l=u:l+="/"+u)}return l===void 0?".":s.normalize(l)},relative:function(l,c){if(a(l),a(c),l===c||(l=s.resolve(l))===(c=s.resolve(c)))return"";for(var u=1;u<l.length&&l.charCodeAt(u)===47;++u);for(var f=l.length,d=f-u,h=1;h<c.length&&c.charCodeAt(h)===47;++h);for(var p=c.length-h,g=d<p?d:p,y=-1,b=0;b<=g;++b){if(b===g){if(p>g){if(c.charCodeAt(h+b)===47)return c.slice(h+b+1);if(b===0)return c.slice(h+b)}else d>g&&(l.charCodeAt(u+b)===47?y=b:b===0&&(y=0));break}var x=l.charCodeAt(u+b);if(x!==c.charCodeAt(h+b))break;x===47&&(y=b)}var w="";for(b=u+y+1;b<=f;++b)b!==f&&l.charCodeAt(b)!==47||(w.length===0?w+="..":w+="/..");return w.length>0?w+c.slice(h+y):(h+=y,c.charCodeAt(h)===47&&++h,c.slice(h))},_makeLong:function(l){return l},dirname:function(l){if(a(l),l.length===0)return".";for(var c=l.charCodeAt(0),u=c===47,f=-1,d=!0,h=l.length-1;h>=1;--h)if((c=l.charCodeAt(h))===47){if(!d){f=h;break}}else d=!1;return f===-1?u?"/":".":u&&f===1?"//":l.slice(0,f)},basename:function(l,c){if(c!==void 0&&typeof c!="string")throw new TypeError('"ext" argument must be a string');a(l);var u,f=0,d=-1,h=!0;if(c!==void 0&&c.length>0&&c.length<=l.length){if(c.length===l.length&&c===l)return"";var p=c.length-1,g=-1;for(u=l.length-1;u>=0;--u){var y=l.charCodeAt(u);if(y===47){if(!h){f=u+1;break}}else g===-1&&(h=!1,g=u+1),p>=0&&(y===c.charCodeAt(p)?--p==-1&&(d=u):(p=-1,d=g))}return f===d?d=g:d===-1&&(d=l.length),l.slice(f,d)}for(u=l.length-1;u>=0;--u)if(l.charCodeAt(u)===47){if(!h){f=u+1;break}}else d===-1&&(h=!1,d=u+1);return d===-1?"":l.slice(f,d)},extname:function(l){a(l);for(var c=-1,u=0,f=-1,d=!0,h=0,p=l.length-1;p>=0;--p){var g=l.charCodeAt(p);if(g!==47)f===-1&&(d=!1,f=p+1),g===46?c===-1?c=p:h!==1&&(h=1):c!==-1&&(h=-1);else if(!d){u=p+1;break}}return c===-1||f===-1||h===0||h===1&&c===f-1&&c===u+1?"":l.slice(c,f)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return function(c,u){var f=u.dir||u.root,d=u.base||(u.name||"")+(u.ext||"");return f?f===u.root?f+d:f+"/"+d:d}(0,l)},parse:function(l){a(l);var c={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return c;var u,f=l.charCodeAt(0),d=f===47;d?(c.root="/",u=1):u=0;for(var h=-1,p=0,g=-1,y=!0,b=l.length-1,x=0;b>=u;--b)if((f=l.charCodeAt(b))!==47)g===-1&&(y=!1,g=b+1),f===46?h===-1?h=b:x!==1&&(x=1):h!==-1&&(x=-1);else if(!y){p=b+1;break}return h===-1||g===-1||x===0||x===1&&h===g-1&&h===p+1?g!==-1&&(c.base=c.name=p===0&&d?l.slice(1,g):l.slice(p,g)):(p===0&&d?(c.name=l.slice(1,h),c.base=l.slice(1,g)):(c.name=l.slice(p,h),c.base=l.slice(p,g)),c.ext=l.slice(h,g)),p>0?c.dir=l.slice(0,p-1):d&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,i.exports=s}},t={};function n(i){var a=t[i];if(a!==void 0)return a.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}n.d=(i,a)=>{for(var o in a)n.o(a,o)&&!n.o(i,o)&&Object.defineProperty(i,o,{enumerable:!0,get:a[o]})},n.o=(i,a)=>Object.prototype.hasOwnProperty.call(i,a),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>d,Utils:()=>M}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const a=/^\w[\w\d+.-]*$/,o=/^\//,s=/^\/\//;function l(P,$){if(!P.scheme&&$)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${P.authority}", path: "${P.path}", query: "${P.query}", fragment: "${P.fragment}"}`);if(P.scheme&&!a.test(P.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(P.path){if(P.authority){if(!o.test(P.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(P.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const c="",u="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{constructor($,D,j,L,W,B=!1){Ti(this,"scheme");Ti(this,"authority");Ti(this,"path");Ti(this,"query");Ti(this,"fragment");typeof $=="object"?(this.scheme=$.scheme||c,this.authority=$.authority||c,this.path=$.path||c,this.query=$.query||c,this.fragment=$.fragment||c):(this.scheme=function(q,U){return q||U?q:"file"}($,B),this.authority=D||c,this.path=function(q,U){switch(q){case"https":case"http":case"file":U?U[0]!==u&&(U=u+U):U=u}return U}(this.scheme,j||c),this.query=L||c,this.fragment=W||c,l(this,B))}static isUri($){return $ instanceof d||!!$&&typeof $.authority=="string"&&typeof $.fragment=="string"&&typeof $.path=="string"&&typeof $.query=="string"&&typeof $.scheme=="string"&&typeof $.fsPath=="string"&&typeof $.with=="function"&&typeof $.toString=="function"}get fsPath(){return x(this,!1)}with($){if(!$)return this;let{scheme:D,authority:j,path:L,query:W,fragment:B}=$;return D===void 0?D=this.scheme:D===null&&(D=c),j===void 0?j=this.authority:j===null&&(j=c),L===void 0?L=this.path:L===null&&(L=c),W===void 0?W=this.query:W===null&&(W=c),B===void 0?B=this.fragment:B===null&&(B=c),D===this.scheme&&j===this.authority&&L===this.path&&W===this.query&&B===this.fragment?this:new p(D,j,L,W,B)}static parse($,D=!1){const j=f.exec($);return j?new p(j[2]||c,C(j[4]||c),C(j[5]||c),C(j[7]||c),C(j[9]||c),D):new p(c,c,c,c,c)}static file($){let D=c;if(i&&($=$.replace(/\\/g,u)),$[0]===u&&$[1]===u){const j=$.indexOf(u,2);j===-1?(D=$.substring(2),$=u):(D=$.substring(2,j),$=$.substring(j)||u)}return new p("file",D,$,c,c)}static from($){const D=new p($.scheme,$.authority,$.path,$.query,$.fragment);return l(D,!0),D}toString($=!1){return w(this,$)}toJSON(){return this}static revive($){if($){if($ instanceof d)return $;{const D=new p($);return D._formatted=$.external,D._fsPath=$._sep===h?$.fsPath:null,D}}return $}}const h=i?1:void 0;class p extends d{constructor(){super(...arguments);Ti(this,"_formatted",null);Ti(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=x(this,!1)),this._fsPath}toString(D=!1){return D?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)}toJSON(){const D={$mid:1};return this._fsPath&&(D.fsPath=this._fsPath,D._sep=h),this._formatted&&(D.external=this._formatted),this.path&&(D.path=this.path),this.scheme&&(D.scheme=this.scheme),this.authority&&(D.authority=this.authority),this.query&&(D.query=this.query),this.fragment&&(D.fragment=this.fragment),D}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function y(P,$,D){let j,L=-1;for(let W=0;W<P.length;W++){const B=P.charCodeAt(W);if(B>=97&&B<=122||B>=65&&B<=90||B>=48&&B<=57||B===45||B===46||B===95||B===126||$&&B===47||D&&B===91||D&&B===93||D&&B===58)L!==-1&&(j+=encodeURIComponent(P.substring(L,W)),L=-1),j!==void 0&&(j+=P.charAt(W));else{j===void 0&&(j=P.substr(0,W));const q=g[B];q!==void 0?(L!==-1&&(j+=encodeURIComponent(P.substring(L,W)),L=-1),j+=q):L===-1&&(L=W)}}return L!==-1&&(j+=encodeURIComponent(P.substring(L))),j!==void 0?j:P}function b(P){let $;for(let D=0;D<P.length;D++){const j=P.charCodeAt(D);j===35||j===63?($===void 0&&($=P.substr(0,D)),$+=g[j]):$!==void 0&&($+=P[D])}return $!==void 0?$:P}function x(P,$){let D;return D=P.authority&&P.path.length>1&&P.scheme==="file"?`//${P.authority}${P.path}`:P.path.charCodeAt(0)===47&&(P.path.charCodeAt(1)>=65&&P.path.charCodeAt(1)<=90||P.path.charCodeAt(1)>=97&&P.path.charCodeAt(1)<=122)&&P.path.charCodeAt(2)===58?$?P.path.substr(1):P.path[1].toLowerCase()+P.path.substr(2):P.path,i&&(D=D.replace(/\//g,"\\")),D}function w(P,$){const D=$?b:y;let j="",{scheme:L,authority:W,path:B,query:q,fragment:U}=P;if(L&&(j+=L,j+=":"),(W||L==="file")&&(j+=u,j+=u),W){let R=W.indexOf("@");if(R!==-1){const Y=W.substr(0,R);W=W.substr(R+1),R=Y.lastIndexOf(":"),R===-1?j+=D(Y,!1,!1):(j+=D(Y.substr(0,R),!1,!1),j+=":",j+=D(Y.substr(R+1),!1,!0)),j+="@"}W=W.toLowerCase(),R=W.lastIndexOf(":"),R===-1?j+=D(W,!1,!0):(j+=D(W.substr(0,R),!1,!0),j+=W.substr(R))}if(B){if(B.length>=3&&B.charCodeAt(0)===47&&B.charCodeAt(2)===58){const R=B.charCodeAt(1);R>=65&&R<=90&&(B=`/${String.fromCharCode(R+32)}:${B.substr(3)}`)}else if(B.length>=2&&B.charCodeAt(1)===58){const R=B.charCodeAt(0);R>=65&&R<=90&&(B=`${String.fromCharCode(R+32)}:${B.substr(2)}`)}j+=D(B,!0,!1)}return q&&(j+="?",j+=D(q,!1,!1)),U&&(j+="#",j+=$?U:y(U,!1,!1)),j}function S(P){try{return decodeURIComponent(P)}catch{return P.length>3?P.substr(0,3)+S(P.substr(3)):P}}const O=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(P){return P.match(O)?P.replace(O,$=>S($)):P}var k=n(470);const A=k.posix||k,I="/";var M;(function(P){P.joinPath=function($,...D){return $.with({path:A.join($.path,...D)})},P.resolvePath=function($,...D){let j=$.path,L=!1;j[0]!==I&&(j=I+j,L=!0);let W=A.resolve(j,...D);return L&&W[0]===I&&!$.authority&&(W=W.substring(1)),$.with({path:W})},P.dirname=function($){if($.path.length===0||$.path===I)return $;let D=A.dirname($.path);return D.length===1&&D.charCodeAt(0)===46&&(D=""),$.with({path:D})},P.basename=function($){return A.basename($.path)},P.extname=function($){return A.extname($.path)}})(M||(M={}))})(),c$=r})();const{URI:oa,Utils:QTe}=c$;function Dwe(e){return e===8?1:e===4?2:e===2?3:4}function Iwe(e){return e===1?8:e===2?4:e===3?2:1}function Mwe(e){return e}function Lwe(e){return e}function nx(e){return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function An(e){return{startLineNumber:e.start.line+1,startColumn:e.start.character+1,endLineNumber:e.end.line+1,endColumn:e.end.character+1}}function Nwe(e){return{location:{range:nx(e),uri:String(e.resource)},message:e.message}}function Fwe(e){return{...An(e.location.range),message:e.message,resource:oa.parse(e.location.uri)}}function Rwe(e){const t={message:e.message,range:nx(e),severity:Dwe(e.severity)};return typeof e.code=="string"?t.code=e.code:e.code!=null&&(t.code=e.code.value,t.codeDescription={href:String(e.code.target)}),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(Nwe)),e.tags&&(t.tags=e.tags.map(Mwe)),e.source!=null&&(t.source=e.source),t}function u$(e,t){var n;const r={...An(e.range),message:e.message,severity:e.severity?Iwe(e.severity):(n=t==null?void 0:t.defaultSeverity)!==null&&n!==void 0?n:8};return e.code!=null&&(r.code=e.codeDescription==null?String(e.code):{value:String(e.code),target:oa.parse(e.codeDescription.href)}),e.relatedInformation&&(r.relatedInformation=e.relatedInformation.map(Fwe)),e.tags&&(r.tags=e.tags.map(Lwe)),e.source!=null&&(r.source=e.source),r}function f$(e){return{range:An(e.range),text:e.newText}}function Wwe(e){const t={};return e.ignoreIfExists!=null&&(t.ignoreIfExists=e.ignoreIfExists),e.ignoreIfNotExists!=null&&(t.ignoreIfNotExists=e.ignoreIfNotExists),e.overwrite!=null&&(t.overwrite=e.overwrite),e.recursive!=null&&(t.recursive=e.recursive),t}function Bwe(e){const t=e.kind==="create"?{newResource:oa.parse(e.uri)}:e.kind==="delete"?{oldResource:oa.parse(e.uri)}:{oldResource:oa.parse(e.oldUri),newResource:oa.parse(e.newUri)};return e.options&&(t.options=Wwe(e.options)),t}function d$(e,t,n){return{resource:oa.parse(t),versionId:n,textEdit:f$(e)}}function zwe(e){var t;const n=[];if(e.changes)for(const[r,i]of Object.entries(e.changes))for(const a of i)n.push(d$(a,r));if(e.documentChanges)for(const r of e.documentChanges)if("textDocument"in r)for(const i of r.edits)n.push(d$(i,r.textDocument.uri,(t=r.textDocument.version)!==null&&t!==void 0?t:void 0));else n.push(Bwe(r));return{edits:n}}function Vwe(e,t){const n={title:e.title,isPreferred:e.isPreferred};return e.diagnostics&&(n.diagnostics=e.diagnostics.map(r=>u$(r,t))),e.disabled&&(n.disabled=e.disabled.reason),e.edit&&(n.edit=zwe(e.edit)),e.isPreferred!=null&&(n.isPreferred=e.isPreferred),e.kind&&(n.kind=e.kind),n}function eEe(e){return e}function Uwe(e){const t={diagnostics:e.markers.map(Rwe),triggerKind:e.trigger};return e.only!=null&&(t.only=[e.only]),t}function Hwe(e){const t={title:e.title,id:e.command};return e.arguments&&(t.arguments=e.arguments),t}function qwe(e){return e===1?18:e===2?0:e===3?1:e===4?2:e===5?3:e===6?4:e===7?5:e===8?7:e===9?8:e===10?9:e===11?12:e===12?13:e===13?15:e===14?17:e===15?27:e===16?19:e===17?20:e===18?21:e===19?23:e===20?16:e===21?14:e===22?6:e===23?10:e===24?11:24}function Gwe(e){return e}function h$(e){return{value:e.value}}function Ywe(e){return{range:An(e.range),text:e.newText}}function Kwe(e){return"range"in e?An(e.range):"insert"in e&&"replace"in e?{insert:An(e.insert),replace:An(e.replace)}:An(e)}function Zwe(e,t){var n,r,i,a,o;const s=(n=t.itemDefaults)!==null&&n!==void 0?n:{},l=(r=e.textEdit)!==null&&r!==void 0?r:s.editRange,c=(i=e.commitCharacters)!==null&&i!==void 0?i:s.commitCharacters,u=(a=e.insertTextFormat)!==null&&a!==void 0?a:s.insertTextFormat,f=(o=e.insertTextMode)!==null&&o!==void 0?o:s.insertTextMode;let d=e.insertText,h;l?(h=Kwe(l),"newText"in l&&(d=l.newText)):h={...t.range};const p={insertText:d??"",kind:e.kind==null?18:qwe(e.kind),label:e.label,range:h};return e.additionalTextEdits&&(p.additionalTextEdits=e.additionalTextEdits.map(Ywe)),e.command&&(p.command=Hwe(e.command)),c&&(p.commitCharacters=c),e.detail!=null&&(p.detail=e.detail),typeof e.documentation=="string"?p.documentation=e.documentation:e.documentation&&(p.documentation=h$(e.documentation)),e.filterText!=null&&(p.filterText=e.filterText),u===2?p.insertTextRules=4:f===2&&(p.insertTextRules=1),e.preselect!=null&&(p.preselect=e.preselect),e.sortText!=null&&(p.sortText=e.sortText),e.tags&&(p.tags=e.tags.map(Gwe)),p}function Xwe(e,t){return{incomplete:!!e.isIncomplete,suggestions:e.items.map(n=>Zwe(n,{range:t.range,itemDefaults:e.itemDefaults}))}}function Jwe(e){return e===1?0:e===2?1:e===3?2:e===4?3:e===5?4:e===6?5:e===7?6:e===8?7:e===9?8:e===10?9:e===11?10:e===12?11:e===13?12:e===14?13:e===15?14:e===16?15:e===17?16:e===18?17:e===19?18:e===20?19:e===21?20:e===22?21:e===23?22:e===24?23:e===25?24:25}function Qwe(e){return e}function p$(e){var t,n,r;const i={detail:(t=e.detail)!==null&&t!==void 0?t:"",kind:Jwe(e.kind),name:e.name,range:An(e.range),selectionRange:An(e.selectionRange),tags:(r=(n=e.tags)===null||n===void 0?void 0:n.map(Qwe))!==null&&r!==void 0?r:[]};return e.children&&(i.children=e.children.map(p$)),i}function e2e(e){const t={start:e.startLine+1,end:e.endLine+1};return e.kind!=null&&(t.kind={value:e.kind}),t}function m$(e){return typeof e=="string"?{value:e}:{value:`\`\`\`${e.language}
552
552
  ${e.value}
553
553
  \`\`\``}}function t2e(e){return typeof e=="string"||"language"in e?[m$(e)]:Array.isArray(e)?e.map(m$):[h$(e)]}function n2e(e){const t={contents:t2e(e.contents)};return e.range&&(t.range=An(e.range)),t}function rx(e){return{character:e.column-1,line:e.lineNumber-1}}function r2e(e){const t={range:An(e.range)};return e.tooltip!=null&&(t.tooltip=e.tooltip),e.target!=null&&(t.url=oa.parse(e.target)),t}function i2e(e){const t={range:An(e.targetRange),targetSelectionRange:An(e.targetSelectionRange),uri:oa.parse(e.targetUri)};return e.originSelectionRange&&(t.originSelectionRange=An(e.originSelectionRange)),t}function g$(e){return{owner:"yaml",async provideMarkerData(t){const r=await(await e(t.uri)).doValidation(String(t.uri));return r==null?void 0:r.map(i=>u$(i))},async doReset(t){await(await e(t.uri)).resetSchema(String(t.uri))}}}function a2e(e){return{triggerCharacters:[" ",":"],async provideCompletionItems(t,n){const r=t.uri,i=t.getWordUntilPosition(n),o=await(await e(r)).doComplete(String(r),rx(n));if(o)return Xwe(o,{range:{startLineNumber:n.lineNumber,startColumn:i.startColumn,endLineNumber:n.lineNumber,endColumn:i.endColumn}})}}}function o2e(e){return{async provideDefinition(t,n){const r=t.uri,a=await(await e(r)).doDefinition(String(r),rx(n));return a==null?void 0:a.map(i2e)}}}function s2e(e){return{async provideHover(t,n){const r=t.uri,a=await(await e(r)).doHover(String(r),rx(n));if(a)return n2e(a)}}}function l2e(e){return{displayName:"yaml",async provideDocumentSymbols(t){const n=t.uri,i=await(await e(n)).findDocumentSymbols(String(n));return i==null?void 0:i.map(p$)}}}function c2e(e){return{displayName:"yaml",async provideDocumentFormattingEdits(t){const n=t.uri,i=await(await e(n)).format(String(n));return i==null?void 0:i.map(f$)}}}function u2e(e){return{async provideLinks(t){const n=t.uri,i=await(await e(n)).findLinks(String(n));if(i)return{links:i.map(r2e)}}}}function f2e(e){return{async provideCodeActions(t,n,r){const i=t.uri,o=await(await e(i)).getCodeAction(String(i),nx(n),Uwe(r));if(o)return{actions:o.map(s=>Vwe(s)),dispose(){}}}}}function d2e(e){return{async provideFoldingRanges(t){const n=t.uri,i=await(await e(n)).getFoldingRanges(String(n));return i==null?void 0:i.map(e2e)}}}function h2e(e,t){const n={completion:!0,customTags:[],enableSchemaRequest:!1,format:!0,isKubernetes:!1,hover:!0,schemas:[],validate:!0,yamlVersion:"1.2",...t};e.languages.register({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml"]});const r=$we(e,{label:"yaml",moduleId:"monaco-yaml/yaml.worker",createData:n});let i=l$(e,"yaml",g$(r.getWorker));const a=[r,e.languages.registerCompletionItemProvider("yaml",a2e(r.getWorker)),e.languages.registerHoverProvider("yaml",s2e(r.getWorker)),e.languages.registerDefinitionProvider("yaml",o2e(r.getWorker)),e.languages.registerDocumentSymbolProvider("yaml",l2e(r.getWorker)),e.languages.registerDocumentFormattingEditProvider("yaml",c2e(r.getWorker)),e.languages.registerLinkProvider("yaml",u2e(r.getWorker)),e.languages.registerCodeActionProvider("yaml",f2e(r.getWorker)),e.languages.registerFoldingRangeProvider("yaml",d2e(r.getWorker)),e.languages.setLanguageConfiguration("yaml",{comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.languages.IndentAction.Indent}}]})];return{dispose(){for(const o of a)o.dispose();i.dispose()},update(o){r.updateCreateData(Object.assign(n,o)),i.dispose(),i=l$(e,"yaml",g$(r.getWorker))}}}function p2e(e){const t=ii(e),{language:n,value:r,onChange:i,setError:a,isReadOnly:o}=e,s=_.useRef(null),l=_.useRef(null),c=_.useCallback(p=>{if(!s.current)return;s.current.style.minHeight=`${v$+x$}px`;const g=p.split(`
554
- `).length;s.current.style.height=`${g*v$+x$}px`},[]),u=_.useRef({});_.useEffect(()=>{if(l.current){const p=ca.editor.create(l.current,{lineNumbers:"on",theme:"data-editor-dark",lineDecorationsWidth:8,padding:{top:y$,bottom:b$},fontSize:14,fontFamily:"RedHatMono",scrollBeyondLastLine:!1,minimap:{enabled:!1},renderLineHighlightOnlyWhenFocus:!0,scrollbar:{alwaysConsumeMouseWheel:!1}});return u.current.editor=p,()=>p.dispose()}},[]),_.useEffect(()=>{var b;const p=(b=u==null?void 0:u.current)==null?void 0:b.editor;if(!p)return;const g=p.getModel();if(!g)return;const y=g.onDidChangeContent(()=>{const x=p.getValue()??"";i(x),c(x)});return()=>y.dispose()},[i,c]),_.useEffect(()=>{var g;const p=(g=u==null?void 0:u.current)==null?void 0:g.editor;p&&p.getValue()!==r&&(p.setValue(r),c(r))},[r,c]),_.useEffect(()=>{var g;const p=(g=u==null?void 0:u.current)==null?void 0:g.editor;p&&p.updateOptions({readOnly:o})},[o]);const[f,d]=_.useState(!1);_.useEffect(()=>{var b;const p=(b=u==null?void 0:u.current)==null?void 0:b.editor;if(!p)return;const g=p.getModel();if(!g)return;ca.editor.setModelLanguage(g,n);const y=ca.editor.onDidChangeMarkers(()=>{const x=ca.editor.getModelMarkers({owner:g.getLanguageId(),resource:g.uri});d(x.length>0),a(x.length>0?x.map(w=>w.message).join(`
554
+ `).length;s.current.style.height=`${g*v$+x$}px`},[]),u=_.useRef({});_.useEffect(()=>{if(l.current){const p=ca.editor.create(l.current,{lineNumbers:e.lineNumbers?"on":"off",lineDecorationsWidth:e.lineNumbers?void 0:0,theme:"data-editor-dark",padding:{top:y$,bottom:b$},fontSize:14,fontFamily:"RedHatMono",scrollBeyondLastLine:!1,minimap:{enabled:!1},renderLineHighlightOnlyWhenFocus:!0,scrollbar:{alwaysConsumeMouseWheel:!1}});return u.current.editor=p,()=>p.dispose()}},[e.lineNumbers]),_.useEffect(()=>{var b;const p=(b=u==null?void 0:u.current)==null?void 0:b.editor;if(!p)return;const g=p.getModel();if(!g)return;const y=g.onDidChangeContent(()=>{const x=p.getValue()??"";i(x),c(x)});return()=>y.dispose()},[i,c]),_.useEffect(()=>{var g;const p=(g=u==null?void 0:u.current)==null?void 0:g.editor;p&&p.getValue()!==r&&(p.setValue(r),c(r))},[r,c]),_.useEffect(()=>{var g;const p=(g=u==null?void 0:u.current)==null?void 0:g.editor;p&&p.updateOptions({readOnly:o})},[o]);const[f,d]=_.useState(!1);_.useEffect(()=>{var b;const p=(b=u==null?void 0:u.current)==null?void 0:b.editor;if(!p)return;const g=p.getModel();if(!g)return;ca.editor.setModelLanguage(g,n);const y=ca.editor.onDidChangeMarkers(()=>{const x=ca.editor.getModelMarkers({owner:g.getLanguageId(),resource:g.uri});d(x.length>0),a(x.length>0?x.map(w=>w.message).join(`
555
555
  `):void 0)});return()=>y.dispose()},[n,a]),fs(l,()=>{var g;const p=(g=u==null?void 0:u.current)==null?void 0:g.editor;p&&p.layout()});const h=ds();return _.useEffect(()=>{var g;const p=(g=u==null?void 0:u.current)==null?void 0:g.editor;p&&p.updateOptions({theme:h.activeTheme==="dark"?"data-editor-dark":"data-editor-light"})},[h.activeTheme]),m.jsx(m2e,{className:e.className,"aria-invalid":f?"true":void 0,ref:s,children:m.jsx(g2e,{id:t,"data-cy":t,ref:l,className:"data-editor"})})}const m2e=Ae.div`
556
556
  position: relative;
557
557
  min-height: 33px;
@@ -562,7 +562,7 @@ ${e.value}
562
562
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function D2e(e){if(Array.isArray(e))return lx(e)}function T$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function E$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T$(Object(n),!0).forEach(function(r){k$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function k$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gu(e,t){return L2e(e)||M2e(e,t)||A$(e,t)||I2e()}function I2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
563
563
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A$(e,t){if(e){if(typeof e=="string")return lx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lx(e,t)}}function lx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M2e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){a=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function L2e(e){if(Array.isArray(e))return e}var N2e="file-invalid-type",F2e="file-too-large",R2e="file-too-small",W2e="too-many-files",B2e=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:N2e,message:"File type must be ".concat(n)}},P$=function(t){return{code:F2e,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},j$=function(t){return{code:R2e,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},z2e={code:W2e,message:"Too many files"};function $$(e,t){var n=e.type==="application/x-moz-file"||P2e(e,t);return[n,n?null:B2e(t)]}function D$(e,t,n){if(Io(e.size))if(Io(t)&&Io(n)){if(e.size>n)return[!1,P$(n)];if(e.size<t)return[!1,j$(t)]}else{if(Io(t)&&e.size<t)return[!1,j$(t)];if(Io(n)&&e.size>n)return[!1,P$(n)]}return[!0,null]}function Io(e){return e!=null}function V2e(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles,s=e.validator;return!a&&t.length>1||a&&o>=1&&t.length>o?!1:t.every(function(l){var c=$$(l,n),u=gu(c,1),f=u[0],d=D$(l,r,i),h=gu(d,1),p=h[0],g=s?s(l):null;return f&&p&&!g})}function Yp(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Kp(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function I$(e){e.preventDefault()}function U2e(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function H2e(e){return e.indexOf("Edge/")!==-1}function q2e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return U2e(e)||H2e(e)}function Si(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return t.some(function(s){return!Yp(r)&&s&&s.apply(void 0,[r].concat(a)),Yp(r)})}}function G2e(){return"showOpenFilePicker"in window}function Y2e(e){if(Io(e)){var t=Object.entries(e).filter(function(n){var r=gu(n,2),i=r[0],a=r[1],o=!0;return M$(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(a)||!a.every(L$))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=gu(r,2),a=i[0],o=i[1];return E$(E$({},n),{},k$({},a,o))},{});return[{description:"Files",accept:t}]}return e}function K2e(e){if(Io(e))return Object.entries(e).reduce(function(t,n){var r=gu(n,2),i=r[0],a=r[1];return[].concat(C$(t),[i],C$(a))},[]).filter(function(t){return M$(t)||L$(t)}).join(",")}function Z2e(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function X2e(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function M$(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function L$(e){return/^.*\.[\w]+$/.test(e)}var J2e=["children"],Q2e=["open"],eSe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],tSe=["refKey","onChange","onClick"];function nSe(e){return aSe(e)||iSe(e)||N$(e)||rSe()}function rSe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
564
564
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iSe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aSe(e){if(Array.isArray(e))return ux(e)}function cx(e,t){return lSe(e)||sSe(e,t)||N$(e,t)||oSe()}function oSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
565
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N$(e,t){if(e){if(typeof e=="string")return ux(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ux(e,t)}}function ux(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sSe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){a=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function lSe(e){if(Array.isArray(e))return e}function F$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F$(Object(n),!0).forEach(function(r){fx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zp(e,t){if(e==null)return{};var n=cSe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cSe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var dx=_.forwardRef(function(e,t){var n=e.children,r=Zp(e,J2e),i=W$(r),a=i.open,o=Zp(i,Q2e);return _.useImperativeHandle(t,function(){return{open:a}},[a]),_.createElement(_.Fragment,null,n(Tt(Tt({},o),{},{open:a})))});dx.displayName="Dropzone";var R$={disabled:!1,getFilesFromEvent:_2e,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};dx.defaultProps=R$,dx.propTypes={children:v.func,accept:v.objectOf(v.arrayOf(v.string)),multiple:v.bool,preventDropOnDocument:v.bool,noClick:v.bool,noKeyboard:v.bool,noDrag:v.bool,noDragEventsBubbling:v.bool,minSize:v.number,maxSize:v.number,maxFiles:v.number,disabled:v.bool,getFilesFromEvent:v.func,onFileDialogCancel:v.func,onFileDialogOpen:v.func,useFsAccessApi:v.bool,autoFocus:v.bool,onDragEnter:v.func,onDragLeave:v.func,onDragOver:v.func,onDrop:v.func,onDropAccepted:v.func,onDropRejected:v.func,onError:v.func,validator:v.func};var hx={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function W$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Tt(Tt({},R$),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,o=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,d=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,g=t.onFileDialogCancel,y=t.onFileDialogOpen,b=t.useFsAccessApi,x=t.autoFocus,w=t.preventDropOnDocument,S=t.noClick,O=t.noKeyboard,C=t.noDrag,k=t.noDragEventsBubbling,A=t.onError,I=t.validator,M=_.useMemo(function(){return K2e(n)},[n]),P=_.useMemo(function(){return Y2e(n)},[n]),$=_.useMemo(function(){return typeof y=="function"?y:B$},[y]),D=_.useMemo(function(){return typeof g=="function"?g:B$},[g]),j=_.useRef(null),L=_.useRef(null),W=_.useReducer(uSe,hx),B=cx(W,2),q=B[0],U=B[1],R=q.isFocused,Y=q.isFileDialogActive,ne=_.useRef(typeof window<"u"&&window.isSecureContext&&b&&G2e()),re=function(){!ne.current&&Y&&setTimeout(function(){if(L.current){var Q=L.current.files;Q.length||(U({type:"closeDialog"}),D())}},300)};_.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[L,Y,D,ne]);var ae=_.useRef([]),X=function(Q){j.current&&j.current.contains(Q.target)||(Q.preventDefault(),ae.current=[])};_.useEffect(function(){return w&&(document.addEventListener("dragover",I$,!1),document.addEventListener("drop",X,!1)),function(){w&&(document.removeEventListener("dragover",I$),document.removeEventListener("drop",X))}},[j,w]),_.useEffect(function(){return!r&&x&&j.current&&j.current.focus(),function(){}},[j,x,r]);var ue=_.useCallback(function(G){A?A(G):console.error(G)},[A]),fe=_.useCallback(function(G){G.preventDefault(),G.persist(),K(G),ae.current=[].concat(nSe(ae.current),[G.target]),Kp(G)&&Promise.resolve(i(G)).then(function(Q){if(!(Yp(G)&&!k)){var ye=Q.length,ke=ye>0&&V2e({files:Q,accept:M,minSize:o,maxSize:a,multiple:s,maxFiles:l,validator:I}),Le=ye>0&&!ke;U({isDragAccept:ke,isDragReject:Le,isDragActive:!0,type:"setDraggedFiles"}),c&&c(G)}}).catch(function(Q){return ue(Q)})},[i,c,ue,k,M,o,a,s,l,I]),ve=_.useCallback(function(G){G.preventDefault(),G.persist(),K(G);var Q=Kp(G);if(Q&&G.dataTransfer)try{G.dataTransfer.dropEffect="copy"}catch{}return Q&&f&&f(G),!1},[f,k]),J=_.useCallback(function(G){G.preventDefault(),G.persist(),K(G);var Q=ae.current.filter(function(ke){return j.current&&j.current.contains(ke)}),ye=Q.indexOf(G.target);ye!==-1&&Q.splice(ye,1),ae.current=Q,!(Q.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Kp(G)&&u&&u(G))},[j,u,k]),ie=_.useCallback(function(G,Q){var ye=[],ke=[];G.forEach(function(Le){var Fe=$$(Le,M),lt=cx(Fe,2),Et=lt[0],ct=lt[1],Qt=D$(Le,o,a),Be=cx(Qt,2),Ne=Be[0],ot=Be[1],Ut=I?I(Le):null;if(Et&&Ne&&!Ut)ye.push(Le);else{var kt=[ct,ot];Ut&&(kt=kt.concat(Ut)),ke.push({file:Le,errors:kt.filter(function(jn){return jn})})}}),(!s&&ye.length>1||s&&l>=1&&ye.length>l)&&(ye.forEach(function(Le){ke.push({file:Le,errors:[z2e]})}),ye.splice(0)),U({acceptedFiles:ye,fileRejections:ke,type:"setFiles"}),d&&d(ye,ke,Q),ke.length>0&&p&&p(ke,Q),ye.length>0&&h&&h(ye,Q)},[U,s,M,o,a,l,d,h,p,I]),ge=_.useCallback(function(G){G.preventDefault(),G.persist(),K(G),ae.current=[],Kp(G)&&Promise.resolve(i(G)).then(function(Q){Yp(G)&&!k||ie(Q,G)}).catch(function(Q){return ue(Q)}),U({type:"reset"})},[i,ie,ue,k]),V=_.useCallback(function(){if(ne.current){U({type:"openDialog"}),$();var G={multiple:s,types:P};window.showOpenFilePicker(G).then(function(Q){return i(Q)}).then(function(Q){ie(Q,null),U({type:"closeDialog"})}).catch(function(Q){Z2e(Q)?(D(Q),U({type:"closeDialog"})):X2e(Q)?(ne.current=!1,L.current?(L.current.value=null,L.current.click()):ue(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ue(Q)});return}L.current&&(U({type:"openDialog"}),$(),L.current.value=null,L.current.click())},[U,$,D,b,ie,ue,P,s]),De=_.useCallback(function(G){!j.current||!j.current.isEqualNode(G.target)||(G.key===" "||G.key==="Enter"||G.keyCode===32||G.keyCode===13)&&(G.preventDefault(),V())},[j,V]),Ee=_.useCallback(function(){U({type:"focus"})},[]),Re=_.useCallback(function(){U({type:"blur"})},[]),Ve=_.useCallback(function(){S||(q2e()?setTimeout(V,0):V())},[S,V]),at=function(Q){return r?null:Q},jt=function(Q){return O?null:at(Q)},N=function(Q){return C?null:at(Q)},K=function(Q){k&&Q.stopPropagation()},Z=_.useMemo(function(){return function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Q=G.refKey,ye=Q===void 0?"ref":Q,ke=G.role,Le=G.onKeyDown,Fe=G.onFocus,lt=G.onBlur,Et=G.onClick,ct=G.onDragEnter,Qt=G.onDragOver,Be=G.onDragLeave,Ne=G.onDrop,ot=Zp(G,eSe);return Tt(Tt(fx({onKeyDown:jt(Si(Le,De)),onFocus:jt(Si(Fe,Ee)),onBlur:jt(Si(lt,Re)),onClick:at(Si(Et,Ve)),onDragEnter:N(Si(ct,fe)),onDragOver:N(Si(Qt,ve)),onDragLeave:N(Si(Be,J)),onDrop:N(Si(Ne,ge)),role:typeof ke=="string"&&ke!==""?ke:"presentation"},ye,j),!r&&!O?{tabIndex:0}:{}),ot)}},[j,De,Ee,Re,Ve,fe,ve,J,ge,O,C,r]),de=_.useCallback(function(G){G.stopPropagation()},[]),ce=_.useMemo(function(){return function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Q=G.refKey,ye=Q===void 0?"ref":Q,ke=G.onChange,Le=G.onClick,Fe=Zp(G,tSe),lt=fx({accept:M,multiple:s,type:"file",style:{display:"none"},onChange:at(Si(ke,ge)),onClick:at(Si(Le,de)),tabIndex:-1},ye,L);return Tt(Tt({},lt),Fe)}},[L,n,s,ge,r]);return Tt(Tt({},q),{},{isFocused:R&&!r,getRootProps:Z,getInputProps:ce,rootRef:j,inputRef:L,open:at(V)})}function uSe(e,t){switch(t.type){case"focus":return Tt(Tt({},e),{},{isFocused:!0});case"blur":return Tt(Tt({},e),{},{isFocused:!1});case"openDialog":return Tt(Tt({},hx),{},{isFileDialogActive:!0});case"closeDialog":return Tt(Tt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Tt(Tt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Tt(Tt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Tt({},hx);default:return e}}function B$(){}function fSe(e){const{t}=He(),n=af(),{onDrop:r}=e,i=_.useCallback(s=>{if(!s||s.length===0)return;const l=s[0],c=new FileReader;c.onload=()=>{const u=c.result;if(typeof u=="string"){const f={variant:"success",title:t("File uploaded"),timeout:!0};n.addAlert(f),r(u)}},c.onerror=()=>{const u={variant:"danger",title:t("Failed to upload file"),children:t("Unable to upload")};n.addAlert(u)},c.readAsText(l)},[t,n,r]),{getRootProps:a,getInputProps:o}=W$({onDrop:i,noClick:!0,accept:{"application/json":[".json"],"text/yaml":[".yaml",".yml"]}});return m.jsxs("div",{id:"code-editor-dropzone",...a({disabled:!0}),style:{width:"100%",height:"100%"},children:[m.jsx("input",{id:"code-editor-dropzone-input",...o(),ref:e.inputRef}),e.children]})}const dSe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Xp{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||dSe,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Xp(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Xp(this.logger,t)}}var Oi=new Xp;class Jp{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]=this.observers[r]||[],this.observers[r].push(n)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t]=this.observers[t].filter(r=>r!==n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.observers[t]&&[].concat(this.observers[t]).forEach(o=>{o(...r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(o=>{o.apply(o,[t,...r])})}}function vu(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function z$(e){return e==null?"":""+e}function hSe(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}function px(e,t,n){function r(o){return o&&o.indexOf("###")>-1?o.replace(/###/g,"."):o}function i(){return!e||typeof e=="string"}const a=typeof t!="string"?[].concat(t):t.split(".");for(;a.length>1;){if(i())return{};const o=r(a.shift());!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={}}return i()?{}:{obj:e,k:r(a.shift())}}function V$(e,t,n){const{obj:r,k:i}=px(e,t,Object);r[i]=n}function pSe(e,t,n,r){const{obj:i,k:a}=px(e,t,Object);i[a]=i[a]||[],r&&(i[a]=i[a].concat(n)),r||i[a].push(n)}function Qp(e,t){const{obj:n,k:r}=px(e,t);if(n)return n[r]}function mSe(e,t,n){const r=Qp(e,n);return r!==void 0?r:Qp(t,n)}function U$(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):U$(e[r],t[r],n):e[r]=t[r]);return e}function al(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var gSe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function vSe(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>gSe[t]):e}const ySe=[" ",",","?","!",";"];function bSe(e,t,n){t=t||"",n=n||"";const r=ySe.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const i=new RegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(e);if(!a){const o=e.indexOf(n);o>0&&!i.test(e.substring(0,o))&&(a=!0)}return a}function em(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let a=0;a<r.length;++a){if(!i||typeof i[r[a]]=="string"&&a+1<r.length)return;if(i[r[a]]===void 0){let o=2,s=r.slice(a,a+o).join(n),l=i[s];for(;l===void 0&&r.length>a+o;)o++,s=r.slice(a,a+o).join(n),l=i[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}const c=r.slice(a+o).join(n);return c?em(l,c,n):void 0}i=i[r[a]]}return i}function tm(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class H$ extends Jp{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s=[t,n];r&&typeof r!="string"&&(s=s.concat(r)),r&&typeof r=="string"&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."));const l=Qp(this.data,s);return l||!o||typeof r!="string"?l:em(this.data&&this.data[t]&&this.data[t][n],r,a)}addResource(t,n,r,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(s=t.split("."),i=n,n=s[1]),this.addNamespaces(n),V$(this.data,s,i),a.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(typeof r[a]=="string"||Object.prototype.toString.apply(r[a])==="[object Array]")&&this.addResource(t,n,a,r[a],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),i=r,r=n,n=s[1]),this.addNamespaces(n);let l=Qp(this.data,s)||{};i?U$(l,r,a):l={...l,...r},V$(this.data,s,l),o.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var q$={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(a=>{this.processors[a]&&(t=this.processors[a].process(t,n,r,i))}),t}};const G$={};class nm extends Jp{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),hSe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Oi.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const o=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!bSe(t,r,i);if(o&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:a};const c=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),t=c.join(i)}return typeof a=="string"&&(a=[a]),{key:t,namespaces:a}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(t[t.length-1],n),l=s[s.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const S=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${S}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${S}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:o}const f=this.resolve(t,n);let d=f&&f.res;const h=f&&f.usedKey||o,p=f&&f.exactUsedKey||o,g=Object.prototype.toString.apply(d),y=["[object Number]","[object Function]","[object RegExp]"],b=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject;if(x&&d&&(typeof d!="string"&&typeof d!="boolean"&&typeof d!="number")&&y.indexOf(g)<0&&!(typeof b=="string"&&g==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,d,{...n,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(f.res=S,f.usedParams=this.getUsedParamsDetails(n),f):S}if(a){const S=g==="[object Array]",O=S?[]:{},C=S?p:h;for(const k in d)if(Object.prototype.hasOwnProperty.call(d,k)){const A=`${C}${a}${k}`;O[k]=this.translate(A,{...n,joinArrays:!1,ns:s}),O[k]===A&&(O[k]=d[k])}d=O}}else if(x&&typeof b=="string"&&g==="[object Array]")d=d.join(b),d&&(d=this.extendTranslation(d,t,n,r));else{let S=!1,O=!1;const C=n.count!==void 0&&typeof n.count!="string",k=nm.hasDefaultValue(n),A=C?this.pluralResolver.getSuffix(c,n.count,n):"",I=n.ordinal&&C?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",M=n[`defaultValue${A}`]||n[`defaultValue${I}`]||n.defaultValue;!this.isValidLookup(d)&&k&&(S=!0,d=M),this.isValidLookup(d)||(O=!0,d=o);const $=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:d,D=k&&M!==d&&this.options.updateMissing;if(O||S||D){if(this.logger.log(D?"updateKey":"missingKey",c,l,o,D?M:d),a){const B=this.resolve(o,{...n,keySeparator:!1});B&&B.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let j=[];const L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let B=0;B<L.length;B++)j.push(L[B]);else this.options.saveMissingTo==="all"?j=this.languageUtils.toResolveHierarchy(n.lng||this.language):j.push(n.lng||this.language);const W=(B,q,U)=>{const R=k&&U!==d?U:$;this.options.missingKeyHandler?this.options.missingKeyHandler(B,l,q,R,D,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(B,l,q,R,D,n),this.emit("missingKey",B,l,q,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?j.forEach(B=>{this.pluralResolver.getSuffixes(B,n).forEach(q=>{W([B],o+q,n[`defaultValue${q}`]||M)})}):W(j,o,M))}d=this.extendTranslation(d,t,n,f,r),O&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${l}:${o}`),(O||S)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,S?d:void 0):d=this.options.parseMissingKeyHandler(d))}return i?(f.res=d,f.usedParams=this.getUsedParamsDetails(n),f):d}extendTranslation(t,n,r,i,a){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const d=t.match(this.interpolator.nestingRegexp);u=d&&d.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language,r),c){const d=t.match(this.interpolator.nestingRegexp),h=d&&d.length;u<h&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(r.lng=i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var d=arguments.length,h=new Array(d),p=0;p<d;p++)h[p]=arguments[p];return a&&a[0]===h[0]&&!r.context?(o.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${n[0]}`),null):o.translate(...h,n)},r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,l=typeof s=="string"?[s]:s;return t!=null&&l&&l.length&&r.applyPostProcessor!==!1&&(t=q$.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,a,o,s;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;i=u;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const d=n.count!==void 0&&typeof n.count!="string",h=d&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(y=>{this.isValidLookup(r)||(s=y,!G$[`${g[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(G$[`${g[0]}-${y}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(b=>{if(this.isValidLookup(r))return;o=b;const x=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(x,u,b,y,n);else{let S;d&&(S=this.pluralResolver.getSuffix(b,n.count,n));const O=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(x.push(u+S),n.ordinal&&S.indexOf(C)===0&&x.push(u+S.replace(C,this.options.pluralSeparator)),h&&x.push(u+O)),p){const k=`${u}${this.options.contextSeparator}${n.context}`;x.push(k),d&&(x.push(k+S),n.ordinal&&S.indexOf(C)===0&&x.push(k+S.replace(C,this.options.pluralSeparator)),h&&x.push(k+O))}}let w;for(;w=x.pop();)this.isValidLookup(r)||(a=w,r=this.getResource(b,y,w,n))}))})}),{res:r,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const a of n)delete i[a]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function mx(e){return e.charAt(0).toUpperCase()+e.slice(1)}class Y${constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Oi.create("languageUtils")}getScriptPartFromCode(t){if(t=tm(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=tm(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=mx(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=mx(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=mx(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&a.indexOf(i)===0)return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),r.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}let xSe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],_Se={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const wSe=["v1","v2","v3"],SSe=["v4"],K$={zero:0,one:1,two:2,few:3,many:4,other:5};function OSe(){const e={};return xSe.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:_Se[t.fc]}})}),e}class CSe{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Oi.create("pluralResolver"),(!this.options.compatibilityJSON||SSe.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=OSe()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(tm(t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,a)=>K$[i]-K$[a]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const a=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?a():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!wSe.includes(this.options.compatibilityJSON)}}function Z$(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=mSe(e,t,n);return!a&&i&&typeof n=="string"&&(a=em(e,n,r),a===void 0&&(a=em(t,n,r))),a}class TSe{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Oi.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const n=t.interpolation;this.escape=n.escape!==void 0?n.escape:vSe,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?al(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?al(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?al(n.nestingPrefix):n.nestingPrefixEscaped||al("$t("),this.nestingSuffix=n.nestingSuffix?al(n.nestingSuffix):n.nestingSuffixEscaped||al(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(t,"g");const n=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(n,"g");const r=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(r,"g")}interpolate(t,n,r,i){let a,o,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(p){return p.replace(/\$/g,"$$$$")}const u=p=>{if(p.indexOf(this.formatSeparator)<0){const x=Z$(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,r,{...i,...n,interpolationkey:p}):x}const g=p.split(this.formatSeparator),y=g.shift().trim(),b=g.join(this.formatSeparator).trim();return this.format(Z$(n,l,y,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:y})};this.resetRegExp();const f=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>c(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?c(this.escape(p)):c(p)}].forEach(p=>{for(s=0;a=p.regex.exec(t);){const g=a[1].trim();if(o=u(g),o===void 0)if(typeof f=="function"){const b=f(t,a,i);o=typeof b=="string"?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))o="";else if(d){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=z$(o));const y=p.safeValue(o);if(t=t.replace(a[0],y),d?(p.regex.lastIndex+=o.length,p.regex.lastIndex-=a[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,o;function s(l,c){const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const f=l.split(new RegExp(`${u}[ ]*{`));let d=`{${f[1]}`;l=f[0],d=this.interpolate(d,o);const h=d.match(/'/g),p=d.match(/"/g);(h&&h.length%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),c&&(o={...c,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${u}${d}`}return delete o.defaultValue,l}for(;i=this.nestingRegexp.exec(t);){let l=[];o={...r},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const u=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=u.shift(),l=u,c=!0}if(a=n(s.call(this,i[1].trim(),o),o),a&&i[0]===t&&typeof a!="string")return a;typeof a!="string"&&(a=z$(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),a=""),c&&(a=l.reduce((u,f)=>this.format(u,f,r.lng,{...r,interpolationkey:i[1].trim()}),a.trim())),t=t.replace(i[0],a),this.regexp.lastIndex=0}return t}}function ESe(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(o=>{if(!o)return;const[s,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,"");n[s.trim()]||(n[s.trim()]=c),c==="false"&&(n[s.trim()]=!1),c==="true"&&(n[s.trim()]=!0),isNaN(c)||(n[s.trim()]=parseInt(c,10))})}return{formatName:t,formatOptions:n}}function ol(e){const t={};return function(r,i,a){const o=i+JSON.stringify(a);let s=t[o];return s||(s=e(tm(i),a),t[o]=s),s(r)}}class kSe{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Oi.create("formatter"),this.options=t,this.formats={number:ol((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return a=>i.format(a)}),currency:ol((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>i.format(a)}),datetime:ol((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return a=>i.format(a)}),relativetime:ol((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return a=>i.format(a,r.range||"day")}),list:ol((n,r)=>{const i=new Intl.ListFormat(n,{...r});return a=>i.format(a)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=ol(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((s,l)=>{const{formatName:c,formatOptions:u}=ESe(l);if(this.formats[c]){let f=s;try{const d=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},h=d.locale||d.lng||i.locale||i.lng||r;f=this.formats[c](s,h,{...u,...i,...d})}catch(d){this.logger.warn(d)}return f}else this.logger.warn(`there was no format function for ${c}`);return s},t)}}function ASe(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class PSe extends Jp{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Oi.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const a={},o={},s={},l={};return t.forEach(c=>{let u=!0;n.forEach(f=>{const d=`${c}|${f}`;!r.reload&&this.store.hasResourceBundle(c,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),l[f]===void 0&&(l[f]=!0)))}),u||(s[c]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),a=i[0],o=i[1];n&&this.emit("failedLoading",a,o,n),r&&this.store.addResourceBundle(a,o,r),this.state[t]=n?-1:2;const s={};this.queue.forEach(l=>{pSe(l.loaded,[a],o),ASe(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const u=l.loaded[c];u.length&&u.forEach(f=>{s[c][f]===void 0&&(s[c][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:a,callback:o});return}this.readingCalls++;const s=(c,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(c&&u&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,a*2,o)},a);return}o(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>s(null,u)).catch(s):s(null,c)}catch(c){s(c)}return}return l(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const a=this.queueLoad(t,n,r,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],a=r[1];this.read(i,a,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${n}loading namespace ${a} for language ${i} failed`,o),!o&&s&&this.logger.log(`${n}loaded namespace ${a} for language ${i}`,s),this.loaded(t,o,s)})}saveMissing(t,n,r,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:a},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,n,r,i,l):u=c(t,n,r,i),u&&typeof u.then=="function"?u.then(f=>s(null,f)).catch(s):s(null,u)}catch(u){s(u)}else c(t,n,r,i,s,l)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function X$(){return{debug:!1,initImmediate:!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:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function J$(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function rm(){}function jSe(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class yu extends Jp{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=J$(t),this.services={},this.logger=Oi,this.modules={external:[]},jSe(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=X$();this.options={...i,...this.options,...J$(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function a(u){return u?typeof u=="function"?new u:u:null}if(!this.options.isClone){this.modules.logger?Oi.init(a(this.modules.logger),this.options):Oi.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=kSe);const f=new Y$(this.options);this.store=new H$(this.options.resources,this.options);const d=this.services;d.logger=Oi,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new CSe(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(d.formatter=a(u),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new TSe(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new PSe(a(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),y=1;y<p;y++)g[y-1]=arguments[y];t.emit(h,...g)}),this.modules.languageDetector&&(d.languageDetector=a(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=a(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new nm(this.services,this.options),this.translator.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),y=1;y<p;y++)g[y-1]=arguments[y];t.emit(h,...g)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=rm),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=vu(),c=()=>{const u=(f,d)=>{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),l.resolve(d),r(f,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rm;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(c=>{c!=="cimode"&&a.indexOf(c)<0&&a.push(c)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(s=>o(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const i=vu();return t||(t=this.languages),n||(n=this.options.ns),r||(r=rm),this.services.backendConnector.reload(t,n,a=>{i.resolve(),r(a)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&q$.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=vu();this.emit("languageChanging",t);const a=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,c)=>{c?(a(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||a(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{o(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,n,r){var i=this;const a=function(o,s){let l;if(typeof s!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),f=2;f<c;f++)u[f-2]=arguments[f];l=i.options.overloadTranslationOptionHandler([o,s].concat(u))}else l={...s};l.lng=l.lng||a.lng,l.lngs=l.lngs||a.lngs,l.ns=l.ns||a.ns,l.keyPrefix=l.keyPrefix||r||a.keyPrefix;const d=i.options.keySeparator||".";let h;return l.keyPrefix&&Array.isArray(o)?h=o.map(p=>`${l.keyPrefix}${d}${p}`):h=l.keyPrefix?`${l.keyPrefix}${d}${o}`:o,i.t(h,l)};return typeof t=="string"?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===2};if(n.precheck){const s=n.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,t)&&(!i||o(a,t)))}loadNamespaces(t,n){const r=vu();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=vu();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],a=t.filter(o=>i.indexOf(o)<0);return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new Y$(X$());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new yu(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rm;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},a=new yu(i);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new H$(this.store.data,i),a.services.resourceStore=a.store),a.translator=new nm(a.services,i),a.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];a.emit(s,...c)}),a.init(i,n),a.translator.options=i,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 Pn=yu.createInstance();Pn.createInstance=yu.createInstance,Pn.createInstance,Pn.dir,Pn.init,Pn.loadResources,Pn.reloadResources,Pn.use,Pn.changeLanguage,Pn.getFixedT;const gx=Pn.t;Pn.exists,Pn.setDefaultNamespace,Pn.hasLoadedNamespace,Pn.loadNamespaces,Pn.loadLanguages;function $Se(e){return m.jsx(E.Icon,{size:"md",children:m.jsx(xe.AngleRightIcon,{"data-cy":"expandable",style:{transform:e.isExpanded?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.2s",alignSelf:"center"},onClick:()=>e.setExpanded(!e.isExpanded),"aria-label":e.isExpanded?gx("Collapse"):gx("Expand")})})}function DSe(e,t,n="txt"){const r=new Blob(t.split("/n"),{type:"text/plain"}),i=document.createElement("a");i.href=URL.createObjectURL(r),i.download=e+"."+n,document.body.appendChild(i),i.click(),document.body.removeChild(i)}function Cr(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function ISe(e,t){return typeof e=="string"&&t===!0?{value:!0,message:gx("{{label}} is required.",{label:Cr(e.toLocaleLowerCase())})}:void 0}function MSe(e){const{t}=He(),{name:n,format:r,disableCopy:i,disableUpload:a,disableDownload:o,disableExpand:s,validate:l,isArray:c}=e,u=ii(e),{formState:{isSubmitting:f,isValidating:d},setError:h,getValues:p,clearErrors:g,control:y}=ia(),b="yaml",[x,w]=_.useState(b),[S,O]=_.useState(!e.defaultCollapsed),[C,k]=_.useState(()=>{const W=p(n);return typeof W=="string"?W:ll(W,b)}),A=af(),{writeToClipboard:I}=d5(),M=_.useCallback(()=>I(ll(sl(p(n),c),x)),[p,c,x,n,I]),P=_.useCallback(W=>{k(ll(sl(W,c),x))},[c,x]),$=_.useRef(null),D=_.useCallback(()=>{var W;return(W=$.current)==null?void 0:W.click()},[]),j=_.useCallback(()=>{const W=n||"data",B=x==="json"?"json":"yaml";DSe(W,ll(sl(p(n),c),x),B),A.addAlert({variant:"success",title:t("File downloaded"),timeout:!0})},[A,p,c,x,n,t]);_.useLayoutEffect(()=>{const W=ll(sl(p(n)),x);k(W)},[p,c,x,n]);const L=ISe(e.label,e.isRequired);return m.jsx(Js,{name:n,control:y,shouldUnregister:!0,render:({field:{name:W,onChange:B},fieldState:{error:q}})=>{var R;function U(Y){switch(r){case"object":B(sl(Y,c));return;default:B(ll(sl(Y,c),r));break}}return m.jsxs(Rr,{fieldId:u,icon:!s&&m.jsx($Se,{isExpanded:S,setExpanded:O}),label:e.label,labelHelpTitle:e.labelHelpTitle,labelHelp:e.labelHelp,additionalControls:m.jsx(eD,{handleCopy:!i&&M,handleUpload:!a&&D,handleDownload:!o&&j,language:x,setLanguage:w,children:e.additionalControls}),helperTextInvalid:!(l&&d)&&((R=q==null?void 0:q.message)==null?void 0:R.split(`
565
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N$(e,t){if(e){if(typeof e=="string")return ux(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ux(e,t)}}function ux(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sSe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){a=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function lSe(e){if(Array.isArray(e))return e}function F$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F$(Object(n),!0).forEach(function(r){fx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zp(e,t){if(e==null)return{};var n=cSe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cSe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var dx=_.forwardRef(function(e,t){var n=e.children,r=Zp(e,J2e),i=W$(r),a=i.open,o=Zp(i,Q2e);return _.useImperativeHandle(t,function(){return{open:a}},[a]),_.createElement(_.Fragment,null,n(Tt(Tt({},o),{},{open:a})))});dx.displayName="Dropzone";var R$={disabled:!1,getFilesFromEvent:_2e,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};dx.defaultProps=R$,dx.propTypes={children:v.func,accept:v.objectOf(v.arrayOf(v.string)),multiple:v.bool,preventDropOnDocument:v.bool,noClick:v.bool,noKeyboard:v.bool,noDrag:v.bool,noDragEventsBubbling:v.bool,minSize:v.number,maxSize:v.number,maxFiles:v.number,disabled:v.bool,getFilesFromEvent:v.func,onFileDialogCancel:v.func,onFileDialogOpen:v.func,useFsAccessApi:v.bool,autoFocus:v.bool,onDragEnter:v.func,onDragLeave:v.func,onDragOver:v.func,onDrop:v.func,onDropAccepted:v.func,onDropRejected:v.func,onError:v.func,validator:v.func};var hx={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function W$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Tt(Tt({},R$),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,o=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,d=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,g=t.onFileDialogCancel,y=t.onFileDialogOpen,b=t.useFsAccessApi,x=t.autoFocus,w=t.preventDropOnDocument,S=t.noClick,O=t.noKeyboard,C=t.noDrag,k=t.noDragEventsBubbling,A=t.onError,I=t.validator,M=_.useMemo(function(){return K2e(n)},[n]),P=_.useMemo(function(){return Y2e(n)},[n]),$=_.useMemo(function(){return typeof y=="function"?y:B$},[y]),D=_.useMemo(function(){return typeof g=="function"?g:B$},[g]),j=_.useRef(null),L=_.useRef(null),W=_.useReducer(uSe,hx),B=cx(W,2),q=B[0],U=B[1],R=q.isFocused,Y=q.isFileDialogActive,ne=_.useRef(typeof window<"u"&&window.isSecureContext&&b&&G2e()),re=function(){!ne.current&&Y&&setTimeout(function(){if(L.current){var Q=L.current.files;Q.length||(U({type:"closeDialog"}),D())}},300)};_.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[L,Y,D,ne]);var ae=_.useRef([]),X=function(Q){j.current&&j.current.contains(Q.target)||(Q.preventDefault(),ae.current=[])};_.useEffect(function(){return w&&(document.addEventListener("dragover",I$,!1),document.addEventListener("drop",X,!1)),function(){w&&(document.removeEventListener("dragover",I$),document.removeEventListener("drop",X))}},[j,w]),_.useEffect(function(){return!r&&x&&j.current&&j.current.focus(),function(){}},[j,x,r]);var ue=_.useCallback(function(G){A?A(G):console.error(G)},[A]),fe=_.useCallback(function(G){G.preventDefault(),G.persist(),K(G),ae.current=[].concat(nSe(ae.current),[G.target]),Kp(G)&&Promise.resolve(i(G)).then(function(Q){if(!(Yp(G)&&!k)){var ye=Q.length,ke=ye>0&&V2e({files:Q,accept:M,minSize:o,maxSize:a,multiple:s,maxFiles:l,validator:I}),Le=ye>0&&!ke;U({isDragAccept:ke,isDragReject:Le,isDragActive:!0,type:"setDraggedFiles"}),c&&c(G)}}).catch(function(Q){return ue(Q)})},[i,c,ue,k,M,o,a,s,l,I]),ve=_.useCallback(function(G){G.preventDefault(),G.persist(),K(G);var Q=Kp(G);if(Q&&G.dataTransfer)try{G.dataTransfer.dropEffect="copy"}catch{}return Q&&f&&f(G),!1},[f,k]),J=_.useCallback(function(G){G.preventDefault(),G.persist(),K(G);var Q=ae.current.filter(function(ke){return j.current&&j.current.contains(ke)}),ye=Q.indexOf(G.target);ye!==-1&&Q.splice(ye,1),ae.current=Q,!(Q.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Kp(G)&&u&&u(G))},[j,u,k]),ie=_.useCallback(function(G,Q){var ye=[],ke=[];G.forEach(function(Le){var Fe=$$(Le,M),lt=cx(Fe,2),Et=lt[0],ct=lt[1],Qt=D$(Le,o,a),Be=cx(Qt,2),Ne=Be[0],ot=Be[1],Ut=I?I(Le):null;if(Et&&Ne&&!Ut)ye.push(Le);else{var kt=[ct,ot];Ut&&(kt=kt.concat(Ut)),ke.push({file:Le,errors:kt.filter(function(jn){return jn})})}}),(!s&&ye.length>1||s&&l>=1&&ye.length>l)&&(ye.forEach(function(Le){ke.push({file:Le,errors:[z2e]})}),ye.splice(0)),U({acceptedFiles:ye,fileRejections:ke,type:"setFiles"}),d&&d(ye,ke,Q),ke.length>0&&p&&p(ke,Q),ye.length>0&&h&&h(ye,Q)},[U,s,M,o,a,l,d,h,p,I]),ge=_.useCallback(function(G){G.preventDefault(),G.persist(),K(G),ae.current=[],Kp(G)&&Promise.resolve(i(G)).then(function(Q){Yp(G)&&!k||ie(Q,G)}).catch(function(Q){return ue(Q)}),U({type:"reset"})},[i,ie,ue,k]),V=_.useCallback(function(){if(ne.current){U({type:"openDialog"}),$();var G={multiple:s,types:P};window.showOpenFilePicker(G).then(function(Q){return i(Q)}).then(function(Q){ie(Q,null),U({type:"closeDialog"})}).catch(function(Q){Z2e(Q)?(D(Q),U({type:"closeDialog"})):X2e(Q)?(ne.current=!1,L.current?(L.current.value=null,L.current.click()):ue(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ue(Q)});return}L.current&&(U({type:"openDialog"}),$(),L.current.value=null,L.current.click())},[U,$,D,b,ie,ue,P,s]),De=_.useCallback(function(G){!j.current||!j.current.isEqualNode(G.target)||(G.key===" "||G.key==="Enter"||G.keyCode===32||G.keyCode===13)&&(G.preventDefault(),V())},[j,V]),Ee=_.useCallback(function(){U({type:"focus"})},[]),Re=_.useCallback(function(){U({type:"blur"})},[]),Ve=_.useCallback(function(){S||(q2e()?setTimeout(V,0):V())},[S,V]),at=function(Q){return r?null:Q},jt=function(Q){return O?null:at(Q)},N=function(Q){return C?null:at(Q)},K=function(Q){k&&Q.stopPropagation()},Z=_.useMemo(function(){return function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Q=G.refKey,ye=Q===void 0?"ref":Q,ke=G.role,Le=G.onKeyDown,Fe=G.onFocus,lt=G.onBlur,Et=G.onClick,ct=G.onDragEnter,Qt=G.onDragOver,Be=G.onDragLeave,Ne=G.onDrop,ot=Zp(G,eSe);return Tt(Tt(fx({onKeyDown:jt(Si(Le,De)),onFocus:jt(Si(Fe,Ee)),onBlur:jt(Si(lt,Re)),onClick:at(Si(Et,Ve)),onDragEnter:N(Si(ct,fe)),onDragOver:N(Si(Qt,ve)),onDragLeave:N(Si(Be,J)),onDrop:N(Si(Ne,ge)),role:typeof ke=="string"&&ke!==""?ke:"presentation"},ye,j),!r&&!O?{tabIndex:0}:{}),ot)}},[j,De,Ee,Re,Ve,fe,ve,J,ge,O,C,r]),de=_.useCallback(function(G){G.stopPropagation()},[]),ce=_.useMemo(function(){return function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Q=G.refKey,ye=Q===void 0?"ref":Q,ke=G.onChange,Le=G.onClick,Fe=Zp(G,tSe),lt=fx({accept:M,multiple:s,type:"file",style:{display:"none"},onChange:at(Si(ke,ge)),onClick:at(Si(Le,de)),tabIndex:-1},ye,L);return Tt(Tt({},lt),Fe)}},[L,n,s,ge,r]);return Tt(Tt({},q),{},{isFocused:R&&!r,getRootProps:Z,getInputProps:ce,rootRef:j,inputRef:L,open:at(V)})}function uSe(e,t){switch(t.type){case"focus":return Tt(Tt({},e),{},{isFocused:!0});case"blur":return Tt(Tt({},e),{},{isFocused:!1});case"openDialog":return Tt(Tt({},hx),{},{isFileDialogActive:!0});case"closeDialog":return Tt(Tt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Tt(Tt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Tt(Tt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Tt({},hx);default:return e}}function B$(){}function fSe(e){const{t}=He(),n=af(),{onDrop:r}=e,i=_.useCallback(s=>{if(!s||s.length===0)return;const l=s[0],c=new FileReader;c.onload=()=>{const u=c.result;if(typeof u=="string"){const f={variant:"success",title:t("File uploaded"),timeout:!0};n.addAlert(f),r(u)}},c.onerror=()=>{const u={variant:"danger",title:t("Failed to upload file"),children:t("Unable to upload")};n.addAlert(u)},c.readAsText(l)},[t,n,r]),{getRootProps:a,getInputProps:o}=W$({onDrop:i,noClick:!0,accept:{"application/json":[".json"],"text/yaml":[".yaml",".yml"]}});return m.jsxs("div",{id:"code-editor-dropzone",...a({disabled:!0}),style:{width:"100%",height:"100%"},children:[m.jsx("input",{id:"code-editor-dropzone-input",...o(),ref:e.inputRef}),e.children]})}const dSe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Xp{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||dSe,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Xp(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Xp(this.logger,t)}}var Oi=new Xp;class Jp{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]=this.observers[r]||[],this.observers[r].push(n)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t]=this.observers[t].filter(r=>r!==n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.observers[t]&&[].concat(this.observers[t]).forEach(o=>{o(...r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(o=>{o.apply(o,[t,...r])})}}function vu(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function z$(e){return e==null?"":""+e}function hSe(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}function px(e,t,n){function r(o){return o&&o.indexOf("###")>-1?o.replace(/###/g,"."):o}function i(){return!e||typeof e=="string"}const a=typeof t!="string"?[].concat(t):t.split(".");for(;a.length>1;){if(i())return{};const o=r(a.shift());!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={}}return i()?{}:{obj:e,k:r(a.shift())}}function V$(e,t,n){const{obj:r,k:i}=px(e,t,Object);r[i]=n}function pSe(e,t,n,r){const{obj:i,k:a}=px(e,t,Object);i[a]=i[a]||[],r&&(i[a]=i[a].concat(n)),r||i[a].push(n)}function Qp(e,t){const{obj:n,k:r}=px(e,t);if(n)return n[r]}function mSe(e,t,n){const r=Qp(e,n);return r!==void 0?r:Qp(t,n)}function U$(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):U$(e[r],t[r],n):e[r]=t[r]);return e}function al(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var gSe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function vSe(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>gSe[t]):e}const ySe=[" ",",","?","!",";"];function bSe(e,t,n){t=t||"",n=n||"";const r=ySe.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const i=new RegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(e);if(!a){const o=e.indexOf(n);o>0&&!i.test(e.substring(0,o))&&(a=!0)}return a}function em(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let a=0;a<r.length;++a){if(!i||typeof i[r[a]]=="string"&&a+1<r.length)return;if(i[r[a]]===void 0){let o=2,s=r.slice(a,a+o).join(n),l=i[s];for(;l===void 0&&r.length>a+o;)o++,s=r.slice(a,a+o).join(n),l=i[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}const c=r.slice(a+o).join(n);return c?em(l,c,n):void 0}i=i[r[a]]}return i}function tm(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class H$ extends Jp{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s=[t,n];r&&typeof r!="string"&&(s=s.concat(r)),r&&typeof r=="string"&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."));const l=Qp(this.data,s);return l||!o||typeof r!="string"?l:em(this.data&&this.data[t]&&this.data[t][n],r,a)}addResource(t,n,r,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(s=t.split("."),i=n,n=s[1]),this.addNamespaces(n),V$(this.data,s,i),a.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(typeof r[a]=="string"||Object.prototype.toString.apply(r[a])==="[object Array]")&&this.addResource(t,n,a,r[a],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),i=r,r=n,n=s[1]),this.addNamespaces(n);let l=Qp(this.data,s)||{};i?U$(l,r,a):l={...l,...r},V$(this.data,s,l),o.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var q$={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(a=>{this.processors[a]&&(t=this.processors[a].process(t,n,r,i))}),t}};const G$={};class nm extends Jp{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),hSe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Oi.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const o=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!bSe(t,r,i);if(o&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:a};const c=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),t=c.join(i)}return typeof a=="string"&&(a=[a]),{key:t,namespaces:a}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(t[t.length-1],n),l=s[s.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const S=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${S}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${S}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:o}const f=this.resolve(t,n);let d=f&&f.res;const h=f&&f.usedKey||o,p=f&&f.exactUsedKey||o,g=Object.prototype.toString.apply(d),y=["[object Number]","[object Function]","[object RegExp]"],b=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject;if(x&&d&&(typeof d!="string"&&typeof d!="boolean"&&typeof d!="number")&&y.indexOf(g)<0&&!(typeof b=="string"&&g==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,d,{...n,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(f.res=S,f.usedParams=this.getUsedParamsDetails(n),f):S}if(a){const S=g==="[object Array]",O=S?[]:{},C=S?p:h;for(const k in d)if(Object.prototype.hasOwnProperty.call(d,k)){const A=`${C}${a}${k}`;O[k]=this.translate(A,{...n,joinArrays:!1,ns:s}),O[k]===A&&(O[k]=d[k])}d=O}}else if(x&&typeof b=="string"&&g==="[object Array]")d=d.join(b),d&&(d=this.extendTranslation(d,t,n,r));else{let S=!1,O=!1;const C=n.count!==void 0&&typeof n.count!="string",k=nm.hasDefaultValue(n),A=C?this.pluralResolver.getSuffix(c,n.count,n):"",I=n.ordinal&&C?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",M=n[`defaultValue${A}`]||n[`defaultValue${I}`]||n.defaultValue;!this.isValidLookup(d)&&k&&(S=!0,d=M),this.isValidLookup(d)||(O=!0,d=o);const $=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:d,D=k&&M!==d&&this.options.updateMissing;if(O||S||D){if(this.logger.log(D?"updateKey":"missingKey",c,l,o,D?M:d),a){const B=this.resolve(o,{...n,keySeparator:!1});B&&B.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let j=[];const L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let B=0;B<L.length;B++)j.push(L[B]);else this.options.saveMissingTo==="all"?j=this.languageUtils.toResolveHierarchy(n.lng||this.language):j.push(n.lng||this.language);const W=(B,q,U)=>{const R=k&&U!==d?U:$;this.options.missingKeyHandler?this.options.missingKeyHandler(B,l,q,R,D,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(B,l,q,R,D,n),this.emit("missingKey",B,l,q,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?j.forEach(B=>{this.pluralResolver.getSuffixes(B,n).forEach(q=>{W([B],o+q,n[`defaultValue${q}`]||M)})}):W(j,o,M))}d=this.extendTranslation(d,t,n,f,r),O&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${l}:${o}`),(O||S)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,S?d:void 0):d=this.options.parseMissingKeyHandler(d))}return i?(f.res=d,f.usedParams=this.getUsedParamsDetails(n),f):d}extendTranslation(t,n,r,i,a){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const d=t.match(this.interpolator.nestingRegexp);u=d&&d.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language,r),c){const d=t.match(this.interpolator.nestingRegexp),h=d&&d.length;u<h&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(r.lng=i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var d=arguments.length,h=new Array(d),p=0;p<d;p++)h[p]=arguments[p];return a&&a[0]===h[0]&&!r.context?(o.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${n[0]}`),null):o.translate(...h,n)},r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,l=typeof s=="string"?[s]:s;return t!=null&&l&&l.length&&r.applyPostProcessor!==!1&&(t=q$.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,a,o,s;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;i=u;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const d=n.count!==void 0&&typeof n.count!="string",h=d&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(y=>{this.isValidLookup(r)||(s=y,!G$[`${g[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(G$[`${g[0]}-${y}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(b=>{if(this.isValidLookup(r))return;o=b;const x=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(x,u,b,y,n);else{let S;d&&(S=this.pluralResolver.getSuffix(b,n.count,n));const O=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(x.push(u+S),n.ordinal&&S.indexOf(C)===0&&x.push(u+S.replace(C,this.options.pluralSeparator)),h&&x.push(u+O)),p){const k=`${u}${this.options.contextSeparator}${n.context}`;x.push(k),d&&(x.push(k+S),n.ordinal&&S.indexOf(C)===0&&x.push(k+S.replace(C,this.options.pluralSeparator)),h&&x.push(k+O))}}let w;for(;w=x.pop();)this.isValidLookup(r)||(a=w,r=this.getResource(b,y,w,n))}))})}),{res:r,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const a of n)delete i[a]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function mx(e){return e.charAt(0).toUpperCase()+e.slice(1)}class Y${constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Oi.create("languageUtils")}getScriptPartFromCode(t){if(t=tm(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=tm(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=mx(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=mx(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=mx(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&a.indexOf(i)===0)return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),r.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}let xSe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],_Se={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const wSe=["v1","v2","v3"],SSe=["v4"],K$={zero:0,one:1,two:2,few:3,many:4,other:5};function OSe(){const e={};return xSe.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:_Se[t.fc]}})}),e}class CSe{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Oi.create("pluralResolver"),(!this.options.compatibilityJSON||SSe.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=OSe()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(tm(t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,a)=>K$[i]-K$[a]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const a=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?a():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!wSe.includes(this.options.compatibilityJSON)}}function Z$(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=mSe(e,t,n);return!a&&i&&typeof n=="string"&&(a=em(e,n,r),a===void 0&&(a=em(t,n,r))),a}class TSe{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Oi.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const n=t.interpolation;this.escape=n.escape!==void 0?n.escape:vSe,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?al(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?al(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?al(n.nestingPrefix):n.nestingPrefixEscaped||al("$t("),this.nestingSuffix=n.nestingSuffix?al(n.nestingSuffix):n.nestingSuffixEscaped||al(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(t,"g");const n=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(n,"g");const r=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(r,"g")}interpolate(t,n,r,i){let a,o,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(p){return p.replace(/\$/g,"$$$$")}const u=p=>{if(p.indexOf(this.formatSeparator)<0){const x=Z$(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,r,{...i,...n,interpolationkey:p}):x}const g=p.split(this.formatSeparator),y=g.shift().trim(),b=g.join(this.formatSeparator).trim();return this.format(Z$(n,l,y,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:y})};this.resetRegExp();const f=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>c(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?c(this.escape(p)):c(p)}].forEach(p=>{for(s=0;a=p.regex.exec(t);){const g=a[1].trim();if(o=u(g),o===void 0)if(typeof f=="function"){const b=f(t,a,i);o=typeof b=="string"?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))o="";else if(d){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=z$(o));const y=p.safeValue(o);if(t=t.replace(a[0],y),d?(p.regex.lastIndex+=o.length,p.regex.lastIndex-=a[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,o;function s(l,c){const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const f=l.split(new RegExp(`${u}[ ]*{`));let d=`{${f[1]}`;l=f[0],d=this.interpolate(d,o);const h=d.match(/'/g),p=d.match(/"/g);(h&&h.length%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),c&&(o={...c,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${u}${d}`}return delete o.defaultValue,l}for(;i=this.nestingRegexp.exec(t);){let l=[];o={...r},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const u=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=u.shift(),l=u,c=!0}if(a=n(s.call(this,i[1].trim(),o),o),a&&i[0]===t&&typeof a!="string")return a;typeof a!="string"&&(a=z$(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),a=""),c&&(a=l.reduce((u,f)=>this.format(u,f,r.lng,{...r,interpolationkey:i[1].trim()}),a.trim())),t=t.replace(i[0],a),this.regexp.lastIndex=0}return t}}function ESe(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(o=>{if(!o)return;const[s,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,"");n[s.trim()]||(n[s.trim()]=c),c==="false"&&(n[s.trim()]=!1),c==="true"&&(n[s.trim()]=!0),isNaN(c)||(n[s.trim()]=parseInt(c,10))})}return{formatName:t,formatOptions:n}}function ol(e){const t={};return function(r,i,a){const o=i+JSON.stringify(a);let s=t[o];return s||(s=e(tm(i),a),t[o]=s),s(r)}}class kSe{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Oi.create("formatter"),this.options=t,this.formats={number:ol((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return a=>i.format(a)}),currency:ol((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>i.format(a)}),datetime:ol((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return a=>i.format(a)}),relativetime:ol((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return a=>i.format(a,r.range||"day")}),list:ol((n,r)=>{const i=new Intl.ListFormat(n,{...r});return a=>i.format(a)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=ol(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((s,l)=>{const{formatName:c,formatOptions:u}=ESe(l);if(this.formats[c]){let f=s;try{const d=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},h=d.locale||d.lng||i.locale||i.lng||r;f=this.formats[c](s,h,{...u,...i,...d})}catch(d){this.logger.warn(d)}return f}else this.logger.warn(`there was no format function for ${c}`);return s},t)}}function ASe(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class PSe extends Jp{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Oi.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const a={},o={},s={},l={};return t.forEach(c=>{let u=!0;n.forEach(f=>{const d=`${c}|${f}`;!r.reload&&this.store.hasResourceBundle(c,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),l[f]===void 0&&(l[f]=!0)))}),u||(s[c]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),a=i[0],o=i[1];n&&this.emit("failedLoading",a,o,n),r&&this.store.addResourceBundle(a,o,r),this.state[t]=n?-1:2;const s={};this.queue.forEach(l=>{pSe(l.loaded,[a],o),ASe(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const u=l.loaded[c];u.length&&u.forEach(f=>{s[c][f]===void 0&&(s[c][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:a,callback:o});return}this.readingCalls++;const s=(c,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(c&&u&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,a*2,o)},a);return}o(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>s(null,u)).catch(s):s(null,c)}catch(c){s(c)}return}return l(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const a=this.queueLoad(t,n,r,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],a=r[1];this.read(i,a,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${n}loading namespace ${a} for language ${i} failed`,o),!o&&s&&this.logger.log(`${n}loaded namespace ${a} for language ${i}`,s),this.loaded(t,o,s)})}saveMissing(t,n,r,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:a},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,n,r,i,l):u=c(t,n,r,i),u&&typeof u.then=="function"?u.then(f=>s(null,f)).catch(s):s(null,u)}catch(u){s(u)}else c(t,n,r,i,s,l)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function X$(){return{debug:!1,initImmediate:!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:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function J$(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function rm(){}function jSe(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class yu extends Jp{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=J$(t),this.services={},this.logger=Oi,this.modules={external:[]},jSe(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=X$();this.options={...i,...this.options,...J$(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function a(u){return u?typeof u=="function"?new u:u:null}if(!this.options.isClone){this.modules.logger?Oi.init(a(this.modules.logger),this.options):Oi.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=kSe);const f=new Y$(this.options);this.store=new H$(this.options.resources,this.options);const d=this.services;d.logger=Oi,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new CSe(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(d.formatter=a(u),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new TSe(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new PSe(a(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),y=1;y<p;y++)g[y-1]=arguments[y];t.emit(h,...g)}),this.modules.languageDetector&&(d.languageDetector=a(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=a(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new nm(this.services,this.options),this.translator.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),y=1;y<p;y++)g[y-1]=arguments[y];t.emit(h,...g)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=rm),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=vu(),c=()=>{const u=(f,d)=>{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),l.resolve(d),r(f,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rm;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(c=>{c!=="cimode"&&a.indexOf(c)<0&&a.push(c)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(s=>o(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const i=vu();return t||(t=this.languages),n||(n=this.options.ns),r||(r=rm),this.services.backendConnector.reload(t,n,a=>{i.resolve(),r(a)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&q$.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=vu();this.emit("languageChanging",t);const a=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,c)=>{c?(a(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||a(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{o(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,n,r){var i=this;const a=function(o,s){let l;if(typeof s!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),f=2;f<c;f++)u[f-2]=arguments[f];l=i.options.overloadTranslationOptionHandler([o,s].concat(u))}else l={...s};l.lng=l.lng||a.lng,l.lngs=l.lngs||a.lngs,l.ns=l.ns||a.ns,l.keyPrefix=l.keyPrefix||r||a.keyPrefix;const d=i.options.keySeparator||".";let h;return l.keyPrefix&&Array.isArray(o)?h=o.map(p=>`${l.keyPrefix}${d}${p}`):h=l.keyPrefix?`${l.keyPrefix}${d}${o}`:o,i.t(h,l)};return typeof t=="string"?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===2};if(n.precheck){const s=n.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,t)&&(!i||o(a,t)))}loadNamespaces(t,n){const r=vu();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=vu();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],a=t.filter(o=>i.indexOf(o)<0);return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new Y$(X$());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new yu(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rm;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},a=new yu(i);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new H$(this.store.data,i),a.services.resourceStore=a.store),a.translator=new nm(a.services,i),a.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];a.emit(s,...c)}),a.init(i,n),a.translator.options=i,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 Pn=yu.createInstance();Pn.createInstance=yu.createInstance,Pn.createInstance,Pn.dir,Pn.init,Pn.loadResources,Pn.reloadResources,Pn.use,Pn.changeLanguage,Pn.getFixedT;const gx=Pn.t;Pn.exists,Pn.setDefaultNamespace,Pn.hasLoadedNamespace,Pn.loadNamespaces,Pn.loadLanguages;function $Se(e){return m.jsx(E.Icon,{size:"md",children:m.jsx(xe.AngleRightIcon,{"data-cy":"expandable",style:{transform:e.isExpanded?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.2s",alignSelf:"center"},onClick:()=>e.setExpanded(!e.isExpanded),"aria-label":e.isExpanded?gx("Collapse"):gx("Expand")})})}function DSe(e,t,n="txt"){const r=new Blob(t.split("/n"),{type:"text/plain"}),i=document.createElement("a");i.href=URL.createObjectURL(r),i.download=e+"."+n,document.body.appendChild(i),i.click(),document.body.removeChild(i)}function Cr(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function ISe(e,t){return typeof e=="string"&&t===!0?{value:!0,message:gx("{{label}} is required.",{label:Cr(e.toLocaleLowerCase())})}:void 0}function MSe(e){const{t}=He(),{name:n,format:r,disableCopy:i,disableUpload:a,disableDownload:o,disableExpand:s,validate:l,isArray:c}=e,u=ii(e),{formState:{isSubmitting:f,isValidating:d},setError:h,getValues:p,clearErrors:g,control:y}=ia(),b="yaml",[x,w]=_.useState(b),[S,O]=_.useState(!e.defaultCollapsed),[C,k]=_.useState(()=>{const W=p(n);return typeof W=="string"?W:ll(W,b)}),A=af(),{writeToClipboard:I}=d5(),M=_.useCallback(()=>I(ll(sl(p(n),c),x)),[p,c,x,n,I]),P=_.useCallback(W=>{k(ll(sl(W,c),x))},[c,x]),$=_.useRef(null),D=_.useCallback(()=>{var W;return(W=$.current)==null?void 0:W.click()},[]),j=_.useCallback(()=>{const W=n||"data",B=x==="json"?"json":"yaml";DSe(W,ll(sl(p(n),c),x),B),A.addAlert({variant:"success",title:t("File downloaded"),timeout:!0})},[A,p,c,x,n,t]);_.useLayoutEffect(()=>{const W=ll(sl(p(n),c),x);k(W)},[p,c,x,n]);const L=ISe(e.label,e.isRequired);return m.jsx(Js,{name:n,control:y,shouldUnregister:!0,render:({field:{name:W,onChange:B},fieldState:{error:q}})=>{var R;function U(Y){switch(r){case"object":B(sl(Y,c));return;default:B(ll(sl(Y,c),r));break}}return m.jsxs(Rr,{fieldId:u,icon:!s&&m.jsx($Se,{isExpanded:S,setExpanded:O}),label:e.label,labelHelpTitle:e.labelHelpTitle,labelHelp:e.labelHelp,additionalControls:m.jsx(eD,{handleCopy:!i&&M,handleUpload:!a&&D,handleDownload:!o&&j,language:x,setLanguage:w,children:e.additionalControls}),helperTextInvalid:!(l&&d)&&((R=q==null?void 0:q.message)==null?void 0:R.split(`
566
566
  `)),isRequired:e.isRequired,children:[S&&m.jsx(fSe,{onDrop:P,isDisabled:f||e.isReadOnly,inputRef:$,children:m.jsx(p2e,{"data-cy":u,id:u,name:W,language:x,value:C,onChange:U,setError:Y=>{Y?h(W,{message:Y}):g(W)},isReadOnly:e.isReadOnly||f,className:e.isReadOnly?"pf-v5-c-form-control pf-m-disabled":"pf-v5-c-form-control"})}),!S&&m.jsx("div",{className:"pf-v5-c-form-control"})]})},rules:{required:L,validate:e.validate}})}function Q$(e){const{t}=He(),{handleCopy:n,handleDownload:r,handleUpload:i}=e;return!n&&!r&&!i?m.jsx(m.Fragment,{}):m.jsxs(E.Flex,{spaceItems:{default:"spaceItemsMd"},children:[n&&m.jsx(E.FlexItem,{children:m.jsx(jf,{id:"copy-button","data-cy":"copy-button","aria-label":t("Copy to clipboard"),type:"button",onClick:n,children:m.jsx(E.Icon,{size:"md",children:m.jsx(xe.CopyIcon,{})})})}),i&&m.jsx(E.FlexItem,{children:m.jsx(jf,{id:"upload-button","data-cy":"upload-button","aria-label":t("Upload from file"),type:"button",onClick:i,children:m.jsx(E.Icon,{size:"md",children:m.jsx(xe.UploadIcon,{})})})}),r&&m.jsx(E.FlexItem,{children:m.jsx(jf,{id:"download-button","data-cy":"download-button","aria-label":t("Download file"),type:"button",onClick:r,children:m.jsx(E.Icon,{size:"md",children:m.jsx(xe.DownloadIcon,{})})})})]})}function eD(e){const{t}=He(),{handleCopy:n,handleDownload:r,handleUpload:i,language:a,setLanguage:o}=e;return m.jsxs(E.Flex,{spaceItems:{default:"spaceItemsLg"},children:[m.jsx(E.FlexItem,{children:e.children}),m.jsx(Q$,{handleCopy:n,handleDownload:r,handleUpload:i}),m.jsx(E.FlexItem,{align:{default:"alignRight"},children:m.jsxs(E.ToggleGroup,{isCompact:!0,children:[m.jsx(E.ToggleGroupItem,{id:"toggle-yaml","data-cy":"toggle-yaml","aria-label":t("Toggle to YAML"),isSelected:a==="yaml",text:"YAML",type:"button",onChange:()=>o("yaml")}),m.jsx(E.ToggleGroupItem,{id:"toggle-json","data-cy":"toggle-json","aria-label":t("Toggle to JSON"),isSelected:a==="json",text:"JSON",type:"button",onChange:()=>o("json")})]})})]})}function sl(e,t){if(e==null)return t?[]:{};if(typeof e=="string")try{e=JSON.parse(e)}catch{try{e=s$.load(e)}catch{return{}}}return t?Array.isArray(e)?e:[]:Array.isArray(e)?{}:e}function ll(e,t){if(e==null)return"";try{switch(t){case"json":return JSON.stringify(e,null,2);case"yaml":{const n=s$.dump(e).trimEnd();switch(n){case"null":case"{}":case"[]":return"";default:return n}}}}catch{}return""}function LSe(e){const{name:t,label:n,labelHelpTitle:r,labelHelp:i,additionalControls:a,placeholderText:o,options:s,footer:l,helperText:c,isDisabled:u,isReadOnly:f,isRequired:d,validate:h,fieldNameToResetOnFieldChange:p}=e,g=ii(e),{control:y,formState:{isSubmitting:b,isValidating:x},resetField:w}=ia(),[S,O]=_.useState(!1),C=_.useCallback(()=>O(!S),[S]),[k]=Dt();return m.jsx(Js,{name:t,control:y,shouldUnregister:!0,render:({field:{onChange:A,value:I},fieldState:{error:M}})=>{I===""&&s.length===1&&d&&A(s[0].value);const P=(j,L)=>{var W;A((W=s.find(B=>B.label===L.toString()))==null?void 0:W.value),p&&w(p),O(!1)},$=M!=null&&M.message?h&&x?k.validating:M==null?void 0:M.message:void 0,D=s.find(j=>j.value===I);return m.jsx(Rr,{fieldId:g,label:n,labelHelpTitle:r,labelHelp:i,additionalControls:a,helperText:c,helperTextInvalid:$,isRequired:d,children:m.jsx(za,{id:g,placeholderText:o,variant:"single","aria-describedby":`${g}-form-group`,selections:D==null?void 0:D.label,onSelect:P,isOpen:S,onToggle:C,onClear:d?void 0:()=>{A(null),O(!1)},maxHeight:280,validated:$?"error":void 0,isDisabled:u||f||b,hasPlaceholderStyle:!0,footer:l,ouiaId:"menu-select","data-cy":g,children:s.map(j=>{const L=Ii(j);return m.jsx(ni,{id:L,value:j.label,label:j.label,description:j.description,"data-cy":L,children:j.label},j.label)})})})},rules:{required:typeof n=="string"&&d===!0?{value:!0,message:`${Cr(n.toLocaleLowerCase())} is required.`}:void 0,validate:h}})}function NSe(e){const{name:t,helperText:n,validate:r,additionalControls:i,label:a,labelHelp:o,labelHelpTitle:s,labelOn:l,labelOff:c}=e,{control:u,formState:{isSubmitting:f,isValidating:d}}=ia(),h=ii(e);return m.jsx(Js,{name:t,control:u,shouldUnregister:!0,render:({field:{onChange:p,value:g},fieldState:{error:y}})=>{const b=r&&d||y==null?void 0:y.message;return m.jsx(Rr,{fieldId:h,"data-cy":h+"-form-group",label:a,labelHelpTitle:s,labelHelp:o,helperText:n,helperTextInvalid:b,additionalControls:i,children:m.jsx(E.Switch,{"data-cy":h+"-toggle","aria-label":a,isChecked:g,onChange:x=>p(x),isDisabled:f,label:l,labelOff:c})})}})}function FSe(e){const{type:t,name:n,label:r,labelHelpTitle:i,labelHelp:a,additionalControls:o,placeholder:s,button:l,helperText:c,isDisabled:u,isReadOnly:f,isRequired:d,validate:h,minLength:p,maxLength:g,min:y,max:b,pattern:x,selectTitle:w,selectOpen:S,selectValue:O,autoFocus:C,autoComplete:k}=e,A=ii(e),{control:I,setValue:M,formState:{isSubmitting:P,isValidating:$}}=ia(),[D,j]=_.useState(!1),[L]=Dt();return m.jsx(Js,{name:n,control:I,shouldUnregister:!0,render:({field:{onChange:W,value:B,name:q},fieldState:{error:U}})=>{const R=U!=null&&U.message?h&&$?L.validating:U==null?void 0:U.message:void 0;function Y(ne){W(ne.trimStart())}return m.jsx(Rr,{fieldId:A,label:r,labelHelpTitle:i,labelHelp:a,additionalControls:o,helperText:c,helperTextInvalid:R,isRequired:d,children:m.jsxs(E.InputGroup,{children:[m.jsx(E.InputGroupItem,{isFill:!0,children:m.jsx(E.TextArea,{id:A,placeholder:s,onChange:(ne,re)=>Y(re),value:B??"","aria-describedby":A?`${A}-form-group`:void 0,validated:R?"error":void 0,type:t==="password"?D?"text":"password":t,readOnlyVariant:f?"default":void 0,isDisabled:u,autoFocus:C,autoComplete:k||"off","data-cy":A})}),t==="password"&&m.jsx(E.Button,{variant:"control",onClick:()=>j(!D),isDisabled:u||f,children:D?m.jsx(xe.EyeIcon,{}):m.jsx(xe.EyeSlashIcon,{})}),w&&m.jsx(E.Button,{ouiaId:`lookup-${q}-button`,variant:"control",onClick:()=>S==null?void 0:S(ne=>{if(O){const re=O(ne);M(q,re,{shouldValidate:!0})}},w),"aria-label":"Options menu",isDisabled:u||P,children:m.jsx(xe.SearchIcon,{})}),l&&l]})})},rules:{required:typeof r=="string"&&d===!0?{value:!0,message:`${Cr(r.toLocaleLowerCase())} is required.`}:void 0,validate:h,minLength:typeof r=="string"&&typeof p=="number"?{value:p,message:`${Cr(r.toLocaleLowerCase())} must be at least ${p} characters.`}:p,maxLength:typeof r=="string"&&typeof g=="number"?{value:g,message:`${Cr(r.toLocaleLowerCase())} cannot be greater than ${g} characters.`}:g,min:typeof r=="string"&&(typeof y=="number"||typeof y=="string")?{value:y,message:`${Cr(r.toLocaleLowerCase())} must be less than ${y}.`}:p,max:typeof r=="string"&&(typeof b=="number"||typeof b=="string")?{value:b,message:`${Cr(r.toLocaleLowerCase())} cannot be greater than ${b}.`}:p,pattern:x}})}function RSe(e){const{type:t,name:n,label:r,labelHelpTitle:i,labelHelp:a,additionalControls:o,placeholder:s,button:l,helperText:c,isDisabled:u,isReadOnly:f,isRequired:d,validate:h,minLength:p,maxLength:g,min:y,max:b,pattern:x,selectTitle:w,selectOpen:S,selectValue:O,autoFocus:C,autoComplete:k}=e,A=ii(e),{control:I,setValue:M,formState:{isSubmitting:P,isValidating:$}}=ia(),[D,j]=_.useState(!1),[L]=Dt();return m.jsx(Js,{name:n,control:I,shouldUnregister:!0,render:({field:{onChange:W,value:B,name:q},fieldState:{error:U}})=>{const R=U!=null&&U.message?h&&$?L.validating:U==null?void 0:U.message:void 0;function Y(ne){W(ne.trimStart())}return m.jsx(Rr,{fieldId:A,label:r,labelHelpTitle:i,labelHelp:a,additionalControls:o,helperText:c,helperTextInvalid:R,isRequired:d,children:m.jsxs(E.InputGroup,{children:[m.jsx(E.InputGroupItem,{isFill:!0,children:m.jsx(E.TextInput,{id:A,placeholder:s,onChange:(ne,re)=>Y(re),value:B??"","aria-describedby":A?`${A}-form-group`:void 0,validated:R?"error":void 0,type:t==="password"?D?"text":"password":t,readOnlyVariant:f?"default":void 0,isDisabled:u,autoFocus:C,autoComplete:k||"off","data-cy":A})}),t==="password"&&m.jsx(E.Button,{variant:"control",onClick:()=>j(!D),isDisabled:u||f,children:D?m.jsx(xe.EyeIcon,{}):m.jsx(xe.EyeSlashIcon,{})}),w&&m.jsx(E.Button,{ouiaId:`lookup-${q}-button`,variant:"control",onClick:()=>S==null?void 0:S(ne=>{if(O){const re=O(ne);M(q,re,{shouldValidate:!0})}},w),"aria-label":"Options menu",isDisabled:u||P,children:m.jsx(xe.SearchIcon,{"data-cy":"lookup-button"})}),l&&l]})})},rules:{required:typeof r=="string"&&d===!0?{value:!0,message:`${Cr(r.toLocaleLowerCase())} is required.`}:void 0,validate:h,minLength:typeof r=="string"&&typeof p=="number"?{value:p,message:`${Cr(r.toLocaleLowerCase())} must be at least ${p} characters.`}:p,maxLength:typeof r=="string"&&typeof g=="number"?{value:g,message:`${Cr(r.toLocaleLowerCase())} cannot be greater than ${g} characters.`}:g,min:typeof r=="string"&&(typeof y=="number"||typeof y=="string")?{value:y,message:`${Cr(r.toLocaleLowerCase())} must be less than ${y}.`}:p,max:typeof r=="string"&&(typeof b=="number"||typeof b=="string")?{value:b,message:`${Cr(r.toLocaleLowerCase())} cannot be greater than ${b}.`}:p,pattern:x}})}const vx=_.createContext({isOpen:!1,setState:()=>({})});function im(){return _.useContext(vx)}function tD(e){const t=dn("xl"),[n,r]=_.useState(()=>t),i=_.useCallback(a=>{a.isOpen!==void 0&&r(a.isOpen)},[]);return _.useEffect(()=>i({isOpen:t}),[t,i]),m.jsx(vx.Provider,{value:{isOpen:n,setState:i},children:e.children})}function nD(){const e=Ot.useNavigate(),t=dn("xl"),n=im();return _.useCallback(i=>{e(i),t||n.setState({isOpen:!n.isOpen})},[e,t,n])}const rD=_.createContext({notificationsDrawerOpen:!1,setNotificationsDrawerOpen:()=>{throw new Error("PageNotificationsContext not implemented")},notificationGroups:{},setNotificationGroups:()=>{throw new Error("PageNotificationsContext not implemented")}});function am(){return _.useContext(rD)}function WSe(e){const[t,n]=_.useState(!1),[r,i]=_.useState({});return m.jsx(rD.Provider,{value:{notificationGroups:r,setNotificationGroups:i,notificationsDrawerOpen:t,setNotificationsDrawerOpen:n},children:e.children})}function BSe(e){const{t}=He(),{notificationsDrawerOpen:n,setNotificationsDrawerOpen:r}=am(),i=_.useRef(null);function a(){var s;r(!1),(s=i.current)==null||s.focus()}const{notificationGroups:o}=am();return m.jsx(E.Drawer,{isExpanded:n,onExpand:()=>r(!0),children:m.jsx(E.DrawerContent,{panelContent:m.jsx(E.DrawerPanelContent,{children:m.jsxs(E.NotificationDrawer,{"data-cy":"notifications-drawer",children:[m.jsx(E.NotificationDrawerHeader,{title:t("Notifications"),children:m.jsx(E.DrawerCloseButton,{onClick:a})}),m.jsx(E.NotificationDrawerBody,{children:m.jsx(E.NotificationDrawerGroupList,{children:Object.values(o).map((s,l)=>m.jsx(VSe,{group:s},l))})})]})}),children:m.jsx(zSe,{children:e.children})})})}const zSe=Ae(E.DrawerContentBody)`
567
567
  max-height: 100%;
568
568
  `;function VSe(e){const{t}=He(),[n,r]=_.useState(!0);return m.jsx(E.NotificationDrawerGroup,{title:e.group.title,isExpanded:n,count:e.group.notifications.length,onExpand:(i,a)=>r(a),children:m.jsxs(E.NotificationDrawerList,{isHidden:!n,children:[e.group.notifications.map((i,a)=>m.jsx(USe,{notification:i},a)),e.group.notifications.length===0&&m.jsxs(E.EmptyState,{variant:E.EmptyStateVariant.full,children:[m.jsx(E.EmptyStateHeader,{headingLevel:"h2",titleText:t("No notifications")}),m.jsx(E.EmptyStateBody,{children:t("There are currently no notifications.")})]})]})})}function USe(e){const t=e.notification.variant==="info"?void 0:e.notification.variant,n=Ot.useNavigate(),{setNotificationsDrawerOpen:r}=am(),i=e.notification.timestamp?new Date(e.notification.timestamp):void 0,a=i?`${i.toLocaleDateString()} ${i.toLocaleTimeString()}`:void 0;return m.jsxs(E.NotificationDrawerListItem,{variant:e.notification.variant,onClick:()=>{n(e.notification.to),r(!1)},children:[m.jsx(E.NotificationDrawerListItemHeader,{title:e.notification.title,variant:t}),m.jsx(E.NotificationDrawerListItemBody,{timestamp:a,children:e.notification.description})]})}const iD=_.createContext({tabBreadcrumb:{},setTabBreadcrumb:()=>{}});function HSe(e){const[t,n]=_.useState();return m.jsx(iD.Provider,{value:{tabBreadcrumb:t,setTabBreadcrumb:n},children:e.children})}const qSe=()=>_.useContext(iD);function aD(e){return m.jsx(a5,{children:m.jsx(v2,{children:m.jsx(m2,{children:m.jsx(u5,{children:m.jsx(tD,{children:m.jsx(WSe,{children:m.jsx(HSe,{children:e.children})})})})})})})}function GSe(e){const t=Ot.useNavigate();return e.breadcrumbs?m.jsx(E.Breadcrumb,{style:e.style,children:e.breadcrumbs.map((n,r)=>n.label?m.jsx(E.BreadcrumbItem,{"data-cy":n.label,id:n.id,component:n.component,isActive:n.to===void 0,children:n.to?m.jsx("a",{href:n.to,"data-cy":n.label,onClick:i=>{i.preventDefault(),n.to&&t(n.to)},children:n.label}):n.label},n.id??n.label??r):m.jsx(_.Fragment,{},r))}):m.jsx(_.Fragment,{})}function oD(e){const{title:t,description:n,controls:r,headerActions:i,footer:a}=e,o=dn("lg"),s=dn("xl"),l=dn("md"),[c]=Dt(),{tabBreadcrumb:u}=qSe(),f=_.useMemo(()=>{const d=[];return e.breadcrumbs&&d.push(...e.breadcrumbs),u&&d.push(u),d},[e.breadcrumbs,u]);return m.jsx(E.PageSection,{variant:E.PageSectionVariants.light,className:"bg-lighten border-bottom",style:{paddingTop:(f!=null&&f.length,s?16:12),paddingBottom:s?16:12},children:m.jsxs(E.Stack,{hasGutter:!0,children:[m.jsxs(E.Flex,{flexWrap:{default:"nowrap"},alignItems:{default:"alignItemsStretch"},children:[m.jsxs(E.FlexItem,{grow:{default:"grow"},children:[f.length>0&&m.jsx(GSe,{breadcrumbs:f!=null&&f.length?f:void 0,style:{paddingBottom:o?6:4}}),t?e.titleHelp?m.jsx(E.Popover,{headerContent:e.titleHelpTitle,bodyContent:m.jsxs(E.Stack,{hasGutter:!0,children:[typeof e.titleHelp=="string"?m.jsx(E.StackItem,{children:e.titleHelp}):e.titleHelp.map((d,h)=>m.jsx(E.StackItem,{children:d},h)),e.titleDocLink&&m.jsx(E.StackItem,{children:m.jsx(E.Button,{icon:m.jsx(xe.ExternalLinkAltIcon,{}),variant:"link",onClick:()=>window.open(e.titleDocLink,"_blank"),isInline:!0,children:c.documentation})})]}),position:"bottom-start",children:m.jsxs(E.Title,{"data-cy":"page-title",headingLevel:"h1",children:[t,m.jsx(E.Button,{variant:"link",style:{padding:0,marginTop:1,marginLeft:8,verticalAlign:"top"},children:m.jsx(xe.OutlinedQuestionCircleIcon,{})})]})}):m.jsx(E.Title,{"data-cy":"page-title",headingLevel:"h1",children:t}):m.jsx(E.Title,{headingLevel:"h1",children:m.jsx(E.Skeleton,{width:"160px"})}),l&&n&&m.jsx("div",{"data-cy":"app-description",style:{paddingTop:s?4:2,opacity:.8},children:typeof n=="string"?m.jsx(E.Truncate,{content:n}):m.jsx(E.Stack,{children:n.map(d=>m.jsx(E.StackItem,{children:d},d))})})]}),t&&(i||r)&&m.jsxs(E.Flex,{"data-cy":"manage-view",direction:{default:"column"},spaceItems:{default:"spaceItemsSm",xl:"spaceItemsMd"},justifyContent:{default:"justifyContentCenter"},children:[r&&m.jsx(E.FlexItem,{grow:{default:"grow"},children:r}),i&&m.jsx(E.FlexItem,{children:i})]})]}),a]})})}function YSe(e){const[t]=Dt();return m.jsx(f5,{message:t.errorText,children:m.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%",maxHeight:"100%"},children:e.children})})}function KSe(e){const t=dn("sm");return m.jsxs(E.Masthead,{display:{default:"inline"},style:{borderBottom:"1px solid #fff4",paddingRight:0},children:[m.jsx(sD,{}),t&&m.jsx(E.MastheadMain,{children:m.jsx(E.MastheadBrand,{component:n=>m.jsx(Ot.Link,{...n,to:"/"}),children:e.brand})}),m.jsx(E.MastheadContent,{style:{marginLeft:0,minHeight:0},children:m.jsx(E.Toolbar,{id:"toolbar","data-cy":"toolbar",inset:{default:"insetNone"},style:{padding:0},children:m.jsx(E.ToolbarContent,{children:e.children})})})]})}function sD(){const e=im();return m.jsx(E.MastheadToggle,{onClick:()=>e.setState({isOpen:!e.isOpen}),children:m.jsx(E.PageToggleButton,{"data-cy":"nav-toggle",variant:"plain","aria-label":"Global navigation",children:m.jsx(xe.BarsIcon,{})})})}function ZSe(){const{setNotificationsDrawerOpen:e,notificationGroups:t}=am(),n=Object.values(t).reduce((r,i)=>r+i.notifications.length,0);return m.jsx(E.NotificationBadge,{"data-cy":"notification-badge",variant:n===0?"read":"unread",count:n,onClick:()=>e(r=>!r)})}function XSe(){const{t:e}=He(),t=y2(e);return m.jsx(E.Button,{"data-cy":"settings-icon",icon:m.jsx(xe.CogIcon,{}),variant:E.ButtonVariant.plain,onClick:t})}function JSe(){const[e,t]=_.useContext(ya);return e.activeTheme==="dark"?m.jsx(E.Button,{"data-cy":"settings-icon",variant:"plain",onClick:()=>t({...e,theme:"light"}),children:m.jsx(xe.MoonIcon,{})}):m.jsx(E.Button,{"data-cy":"theme-icon",variant:"plain",onClick:()=>t({...e,theme:"dark"}),children:m.jsx(xe.SunIcon,{})})}function lD(e){const{navigation:t}=e,n=im();return m.jsx(E.PageSidebar,{isSidebarOpen:n.isOpen,className:"bg-lighten",children:m.jsx(E.PageSidebarBody,{children:m.jsx(E.Nav,{"data-cy":"page-navigation",className:"side-nav",children:m.jsx(E.NavList,{children:m.jsx(om,{baseRoute:"",items:t})})})})})}function om(e){return m.jsx(m.Fragment,{children:e.items.filter(t=>"hidden"in t?t.hidden!==!0:!0).map((t,n)=>m.jsx(QSe,{item:t,baseRoute:e.baseRoute},n))})}function QSe(e){var c;const{item:t}=e,[n,r]=_.useState(()=>localStorage.getItem("default-nav-expanded")==="true"||localStorage.getItem((t.id??t.label)+"-expanded")==="true"),i=u=>{r(u),localStorage.setItem((t.id??t.label)+"-expanded",u?"true":"false")};let a;if("id"in e.item)a=e.item.id;else if("children"in e.item){const u=e.item.children.find(f=>f.path==="");u&&"id"in u&&(a=u.id)}const o=nD();let s=e.baseRoute+"/"+t.path;if(s=s.replace("//","/"),t.path==="/"&&"children"in t)return m.jsx(om,{items:t.children,baseRoute:""});const l="children"in t&&((c=t.children)==null?void 0:c.find(u=>u.label));if(!l&&"label"in t){const u=location.pathname.endsWith(s);return m.jsxs(E.NavItem,{id:a,href:s,isActive:u,className:u?"bg-lighten":void 0,onClick:()=>o(s),"data-cy":a,style:{display:"flex",alignItems:"left",flexDirection:"column"},children:[t.label,t.subtitle&&m.jsx("div",{style:{fontSize:"x-small",opacity:.5,textAlign:"left"},children:t.subtitle})]})}return!l||t.label===void 0?null:t.label?m.jsx(E.NavExpandable,{title:m.jsxs("div",{children:[m.jsx("div",{style:{textAlign:"left"},children:t.label}),t.subtitle&&m.jsx("div",{style:{fontSize:"small",opacity:.5,textAlign:"left"},children:t.subtitle})]}),isExpanded:n,onExpand:(u,f)=>i(f),children:m.jsx(om,{items:t.children,baseRoute:s})}):m.jsx(om,{items:t.children,baseRoute:s})}const cD=_.createContext({});function eOe(){return _.useContext(cD)}function tOe(e){const t=_.useMemo(()=>uD("",e.navigation),[e.navigation]);return m.jsx(cD.Provider,{value:t,children:e.children})}function uD(e,t){const n={};return t.forEach(r=>{const i=(e+"/"+r.path).replace("//","/");"id"in r&&typeof r.id=="string"&&(n[r.id]=i),"children"in r&&Object.assign(n,uD(i,r.children))}),n}function nOe(e){const{navigation:t,basename:n,masthead:r}=e,i=_.useMemo(()=>[{path:"",element:m.jsx(aD,{children:m.jsx(Ot.Outlet,{})}),children:[{path:"login",element:e.login},{path:"",element:e.root,children:[{path:"",element:m.jsx(E.Page,{header:r,sidebar:m.jsx(lD,{navigation:t}),children:m.jsx(BSe,{children:m.jsx(Ot.Outlet,{})})}),children:t}]},{path:"*",element:m.jsx(A3,{})}]}],[r,t,e.login,e.root]),a=_.useMemo(()=>Ot.createBrowserRouter(i,{basename:n}),[n,i]);return m.jsx(tOe,{navigation:t,children:m.jsx(Ot.RouterProvider,{router:a})})}function rOe(e){return e.replace(/^\//,"")}function fD(e,t){for(const n of e){if("id"in n&&n.id===t)return n;if("children"in n){const r=fD(n.children,t);if(r)return r}}}function dD(e,t){for(let n=0;n<e.length;n++){const r=e[n];if("id"in r&&r.id===t)return e.splice(n,1),r;if("children"in r){const i=dD(r.children,t);if(i)return i}}}function hD(e,t,n){for(const r of e)if("id"in r&&r.id===t){const i=r;"children"in r||(i.children=[]),i.children.push(n);return}else"children"in r&&hD(r.children,t,n)}function pD(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if("id"in i&&i.id===t){e.splice(r+1,0,n);return}else"children"in i&&pD(i.children,t,n)}}function mD(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if("id"in i&&i.id===t){e.splice(r,0,n);return}else"children"in i&&mD(i.children,t,n)}}function gD(){const e=eOe();return _.useCallback((t,n)=>{let r=e[t]??"";const i=n==null?void 0:n.params,a=n==null?void 0:n.query;return r?(i&&(r=Object.keys(i).reduce((o,s)=>{let l=i[s];if(l===void 0)return o;l=encodeURIComponent(l.toString());const c=":"+s,u=new RegExp(c+"(?!.*"+c+")","g");return o.replace(u,l)},r)),a&&(r=`${r}?${Object.keys(a).map(o=>{let s=a[o];return s===void 0?"":(s=encodeURIComponent(s.toString()),`${o}=${s}`)}).join("&").replace("/&&/g","&")}`)):console.error(`Page id ${t} not found`),r},[e])}function iOe(){const e=Ot.useNavigate(),t=gD();return _.useCallback((n,r)=>{const i=t(n,r);i&&e(i)},[e,t])}function aOe(e){const{loading:t}=e,[n,r]=_.useState((e==null?void 0:e.initialTabIndex)??0),i=_.useCallback((l,c)=>r(c),[r]),a=_.Children.toArray(e.children),o=a.map((l,c)=>{if(_.isValidElement(l)&&l.type===yx){const u=l.props.label;return m.jsx(E.Tab,{title:u||m.jsx(E.Skeleton,{width:"60px"}),eventKey:c},u??c)}return l}),s=a[n];return t?m.jsx(vD,{children:m.jsx(yx,{children:m.jsx(E.PageSection,{variant:"light",children:m.jsx(E.Skeleton,{})})})}):m.jsxs(m.Fragment,{children:[m.jsx(vD,{activeKey:n,onSelect:i,inset:{default:"insetSm"},isBox:!0,children:o}),s]})}function yx(e){return m.jsx(m.Fragment,{children:e.children})}const vD=Ae(E.Tabs)`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ansible/ansible-ui-framework",
3
3
  "description": "A framework for building applications using PatternFly.",
4
- "version": "2.4.1120",
4
+ "version": "2.4.1121",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",