@paroicms/site-generator-plugin 0.15.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gen-backend/dist/commands/execute-command.js +1 -1
- package/gen-backend/dist/context.js +3 -3
- package/gen-backend/dist/data-format.js +97 -35
- package/gen-backend/dist/db/db-init.js +1 -1
- package/gen-backend/dist/db/db-read.queries.js +92 -31
- package/gen-backend/dist/db/db-write.queries.js +3 -2
- package/gen-backend/dist/db/formatters.js +11 -33
- package/gen-backend/dist/generator/lib/calling-llm-mistral.js +1 -1
- package/gen-backend/dist/generator/lib/create-prompt.js +1 -1
- package/gen-backend/dist/generator/lib/debug-utils.js +1 -1
- package/gen-backend/dist/generator/lib/session-utils.js +1 -1
- package/gen-backend/dist/generator/lib/tasks.js +1 -1
- package/gen-backend/dist/generator/llm-queries/invoke-message-guard.js +9 -17
- package/gen-backend/dist/generator/site-generator/site-generator.js +1 -1
- package/gen-backend/dist/lib/create-raw-context.js +1 -1
- package/gen-backend/dist/plugin.js +5 -4
- package/gen-front/dist/gen-front.mjs +120 -76
- package/package.json +9 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var sN=Object.defineProperty;var lN=(t,n,i)=>n in t?sN(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i;var w=(t,n,i)=>lN(t,typeof n!="symbol"?n+"":n,i);function Zv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var pf={exports:{}},ls={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var A0=Object.defineProperty;var O0=(i,n,r)=>n in i?A0(i,n,{enumerable:!0,config
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var yp;function k0(){if(yp)return ii;yp=1;var i=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(s,o,f){var p=null;if(f!==void 0&&(p=""+f),o.key!==void 0&&(p=""+o.key),"key"in o){f={};for(var h in o)h!=="key"&&(f[h]=o[h])}else f=o;return o=f.ref,{$$typeof:i,type:s,key:p,ref:o!==void 0?o:null,props:f}}return ii.Fragment=n,ii.jsx=r,ii.jsxs=r,ii}var bp;function L0(){return bp||(bp=1,Ro.exports=k0()),Ro.exports}var b=L0();const ie=i=>typeof i=="string",ri=()=>{let i,n;const r=new Promise((s,o)=>{i=s,n=o});return r.resolve=i,r.reject=n,r},Sp=i=>i==null?"":""+i,z0=(i,n,r)=>{i.forEach(s=>{n[s]&&(r[s]=n[s])})},D0=/###/g,xp=i=>i&&i.indexOf("###")>-1?i.replace(D0,"."):i,Np=i=>!i||ie(i),di=(i,n,r)=>{const s=ie(n)?n.split("."):n;let o=0;for(;o<s.length-1;){if(Np(i))return{};const f=xp(s[o]);!i[f]&&r&&(i[f]=new r),Object.prototype.hasOwnProperty.call(i,f)?i=i[f]:i={},++o}return Np(i)?{}:{obj:i,k:xp(s[o])}},Ep=(i,n,r)=>{const{obj:s,k:o}=di(i,n,Object);if(s!==void 0||n.length===1){s[o]=r;return}let f=n[n.length-1],p=n.slice(0,n.length-1),h=di(i,p,Object);for(;h.obj===void 0&&p.length;)f=`${p[p.length-1]}.${f}`,p=p.slice(0,p.length-1),h=di(i,p,Object),h!=null&&h.obj&&typeof h.obj[`${h.k}.${f}`]<"u"&&(h.obj=void 0);h.obj[`${h.k}.${f}`]=r},_0=(i,n,r,s)=>{const{obj:o,k:f}=di(i,n,Object);o[f]=o[f]||[],o[f].push(r)},Xr=(i,n)=>{const{obj:r,k:s}=di(i,n);if(r&&Object.prototype.hasOwnProperty.call(r,s))return r[s]},M0=(i,n,r)=>{const s=Xr(i,r);return s!==void 0?s:Xr(n,r)},sm=(i,n,r)=>{for(const s in n)s!=="__proto__"&&s!=="constructor"&&(s in i?ie(i[s])||i[s]instanceof String||ie(n[s])||n[s]instanceof String?r&&(i[s]=n[s]):sm(i[s],n[s],r):i[s]=n[s]);return i},al=i=>i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var U0={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const B0=i=>ie(i)?i.replace(/[&<>"'\/]/g,n=>U0[n]):i;class H0{constructor(n){this.capacity=n,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(n){const r=this.regExpMap.get(n);if(r!==void 0)return r;const s=new RegExp(n);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(n,s),this.regExpQueue.push(n),s}}const V0=[" ",",","?","!",";"],$0=new H0(20),q0=(i,n,r)=>{n=n||"",r=r||"";const s=V0.filter(p=>n.indexOf(p)<0&&r.indexOf(p)<0);if(s.length===0)return!0;const o=$0.getRegExp(`(${s.map(p=>p==="?"?"\\?":p).join("|")})`);let f=!o.test(i);if(!f){const p=i.indexOf(r);p>0&&!o.test(i.substring(0,p))&&(f=!0)}return f},Uo=(i,n,r=".")=>{if(!i)return;if(i[n])return Object.prototype.hasOwnProperty.call(i,n)?i[n]:void 0;const s=n.split(r);let o=i;for(let f=0;f<s.length;){if(!o||typeof o!="object")return;let p,h="";for(let m=f;m<s.length;++m)if(m!==f&&(h+=r),h+=s[m],p=o[h],p!==void 0){if(["string","number","boolean"].indexOf(typeof p)>-1&&m<s.length-1)continue;f+=m-f+1;break}o=p}return o},pi=i=>i==null?void 0:i.replace("_","-"),G0={type:"logger",log(i){this.output("log",i)},warn(i){this.output("warn",i)},error(i){this.output("error",i)},output(i,n){var r,s;(s=(r=console==null?void 0:console[i])==null?void 0:r.apply)==null||s.call(r,console,n)}};class Jr{constructor(n,r={}){this.init(n,r)}init(n,r={}){this.prefix=r.prefix||"i18next:",this.logger=n||G0,this.options=r,this.debug=r.debug}log(...n){return this.forward(n,"log","",!0)}warn(...n){return this.forward(n,"warn","",!0)}error(...n){return this.forward(n,"error","")}deprecate(...n){return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(n,r,s,o){return o&&!this.debug?null:(ie(n[0])&&(n[0]=`${s}${this.prefix} ${n[0]}`),this.logger[r](n))}create(n){return new Jr(this.logger,{prefix:`${this.prefix}:${n}:`,...this.options})}clone(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new Jr(this.logger,n)}}var Wt=new Jr;class ts{constructor(){this.observers={}}on(n,r){return n.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const o=this.observers[s].get(r)||0;this.observers[s].set(r,o+1)}),this}off(n,r){if(this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n].delete(r)}}emit(n,...r){this.observers[n]&&Array.from(this.observers[n].entries()).forEach(([o,f])=>{for(let p=0;p<f;p++)o(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,f])=>{for(let p=0;p<f;p++)o.apply(o,[n,...r])})}}class Rp extends ts{constructor(n,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=n||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(n){this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}removeNamespaces(n){const r=this.options.ns.indexOf(n);r>-1&&this.options.ns.splice(r,1)}getResource(n,r,s,o={}){var d,v;const f=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,p=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let h;n.indexOf(".")>-1?h=n.split("."):(h=[n,r],s&&(Array.isArray(s)?h.push(...s):ie(s)&&f?h.push(...s.split(f)):h.push(s)));const m=Xr(this.data,h);return!m&&!r&&!s&&n.indexOf(".")>-1&&(n=h[0],r=h[1],s=h.slice(2).join(".")),m||!p||!ie(s)?m:Uo((v=(d=this.data)==null?void 0:d[n])==null?void 0:v[r],s,f)}addResource(n,r,s,o,f={silent:!1}){const p=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator;let h=[n,r];s&&(h=h.concat(p?s.split(p):s)),n.indexOf(".")>-1&&(h=n.split("."),o=r,r=h[1]),this.addNamespaces(r),Ep(this.data,h,o),f.silent||this.emit("added",n,r,s,o)}addResources(n,r,s,o={silent:!1}){for(const f in s)(ie(s[f])||Array.isArray(s[f]))&&this.addResource(n,r,f,s[f],{silent:!0});o.silent||this.emit("added",n,r,s)}addResourceBundle(n,r,s,o,f,p={silent:!1,skipCopy:!1}){let h=[n,r];n.indexOf(".")>-1&&(h=n.split("."),o=s,s=r,r=h[1]),this.addNamespaces(r);let m=Xr(this.data,h)||{};p.skipCopy||(s=JSON.parse(JSON.stringify(s))),o?sm(m,s,f):m={...m,...s},Ep(this.data,h,m),p.silent||this.emit("added",n,r,s)}removeResourceBundle(n,r){this.hasResourceBundle(n,r)&&delete this.data[n][r],this.removeNamespaces(r),this.emit("removed",n,r)}hasResourceBundle(n,r){return this.getResource(n,r)!==void 0}getResourceBundle(n,r){return r||(r=this.options.defaultNS),this.getResource(n,r)}getDataByLanguage(n){return this.data[n]}hasLanguageSomeTranslations(n){const r=this.getDataByLanguage(n);return!!(r&&Object.keys(r)||[]).find(o=>r[o]&&Object.keys(r[o]).length>0)}toJSON(){return this.data}}var um={processors:{},addPostProcessor(i){this.processors[i.name]=i},handle(i,n,r,s,o){return i.forEach(f=>{var p;n=((p=this.processors[f])==null?void 0:p.process(n,r,s,o))??n}),n}};const Tp={},wp=i=>!ie(i)&&typeof i!="boolean"&&typeof i!="number";class Fr extends ts{constructor(n,r={}){super(),z0(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Wt.create("translator")}changeLanguage(n){n&&(this.language=n)}exists(n,r={interpolation:{}}){const s={...r};if(n==null)return!1;const o=this.resolve(n,s);return(o==null?void 0:o.res)!==void 0}extractFromKey(n,r){let s=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let f=r.ns||this.options.defaultNS||[];const p=s&&n.indexOf(s)>-1,h=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!q0(n,s,o);if(p&&!h){const m=n.match(this.interpolator.nestingRegexp);if(m&&m.length>0)return{key:n,namespaces:ie(f)?[f]:f};const d=n.split(s);(s!==o||s===o&&this.options.ns.indexOf(d[0])>-1)&&(f=d.shift()),n=d.join(o)}return{key:n,namespaces:ie(f)?[f]:f}}translate(n,r,s){let o=typeof r=="object"?{...r}:r;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(o={...o}),o||(o={}),n==null)return"";Array.isArray(n)||(n=[String(n)]);const f=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,p=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:h,namespaces:m}=this.extractFromKey(n[n.length-1],o),d=m[m.length-1];let v=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const x=o.lng||this.language,S=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((x==null?void 0:x.toLowerCase())==="cimode")return S?f?{res:`${d}${v}${h}`,usedKey:h,exactUsedKey:h,usedLng:x,usedNS:d,usedParams:this.getUsedParamsDetails(o)}:`${d}${v}${h}`:f?{res:h,usedKey:h,exactUsedKey:h,usedLng:x,usedNS:d,usedParams:this.getUsedParamsDetails(o)}:h;const C=this.resolve(n,o);let E=C==null?void 0:C.res;const z=(C==null?void 0:C.usedKey)||h,B=(C==null?void 0:C.exactUsedKey)||h,U=["[object Number]","[object Function]","[object RegExp]"],D=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,G=!this.i18nFormat||this.i18nFormat.handleAsObject,J=o.count!==void 0&&!ie(o.count),K=Fr.hasDefaultValue(o),ue=J?this.pluralResolver.getSuffix(x,o.count,o):"",re=o.ordinal&&J?this.pluralResolver.getSuffix(x,o.count,{ordinal:!1}):"",ee=J&&!o.ordinal&&o.count===0,F=ee&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${ue}`]||o[`defaultValue${re}`]||o.defaultValue;let ne=E;G&&!E&&K&&(ne=F);const pe=wp(ne),Ke=Object.prototype.toString.apply(ne);if(G&&ne&&pe&&U.indexOf(Ke)<0&&!(ie(D)&&Array.isArray(ne))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const Xe=this.options.returnedObjectHandler?this.options.returnedObjectHandler(z,ne,{...o,ns:m}):`key '${h} (${this.language})' returned an object instead of string.`;return f?(C.res=Xe,C.usedParams=this.getUsedParamsDetails(o),C):Xe}if(p){const Xe=Array.isArray(ne),Ge=Xe?[]:{},Ye=Xe?B:z;for(const _ in ne)if(Object.prototype.hasOwnProperty.call(ne,_)){const Y=`${Ye}${p}${_}`;K&&!E?Ge[_]=this.translate(Y,{...o,defaultValue:wp(F)?F[_]:void 0,joinArrays:!1,ns:m}):Ge[_]=this.translate(Y,{...o,joinArrays:!1,ns:m}),Ge[_]===Y&&(Ge[_]=ne[_])}E=Ge}}else if(G&&ie(D)&&Array.isArray(E))E=E.join(D),E&&(E=this.extendTranslation(E,n,o,s));else{let Xe=!1,Ge=!1;!this.isValidLookup(E)&&K&&(Xe=!0,E=F),this.isValidLookup(E)||(Ge=!0,E=h);const _=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Ge?void 0:E,Y=K&&F!==E&&this.options.updateMissing;if(Ge||Xe||Y){if(this.logger.log(Y?"updateKey":"missingKey",x,d,h,Y?F:E),p){const $=this.resolve(h,{...o,keySeparator:!1});$&&$.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 W=[];const ye=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ye&&ye[0])for(let $=0;$<ye.length;$++)W.push(ye[$]);else this.options.saveMissingTo==="all"?W=this.languageUtils.toResolveHierarchy(o.lng||this.language):W.push(o.lng||this.language);const R=($,Z,Q)=>{var me;const I=K&&Q!==E?Q:_;this.options.missingKeyHandler?this.options.missingKeyHandler($,d,Z,I,Y,o):(me=this.backendConnector)!=null&&me.saveMissing&&this.backendConnector.saveMissing($,d,Z,I,Y,o),this.emit("missingKey",$,d,Z,E)};this.options.saveMissing&&(this.options.saveMissingPlurals&&J?W.forEach($=>{const Z=this.pluralResolver.getSuffixes($,o);ee&&o[`defaultValue${this.options.pluralSeparator}zero`]&&Z.indexOf(`${this.options.pluralSeparator}zero`)<0&&Z.push(`${this.options.pluralSeparator}zero`),Z.forEach(Q=>{R([$],h+Q,o[`defaultValue${Q}`]||F)})}):R(W,h,F))}E=this.extendTranslation(E,n,o,C,s),Ge&&E===h&&this.options.appendNamespaceToMissingKey&&(E=`${d}${v}${h}`),(Ge||Xe)&&this.options.parseMissingKeyHandler&&(E=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${d}${v}${h}`:h,Xe?E:void 0,o))}return f?(C.res=E,C.usedParams=this.getUsedParamsDetails(o),C):E}extendTranslation(n,r,s,o,f){var m,d;if((m=this.i18nFormat)!=null&&m.parse)n=this.i18nFormat.parse(n,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const v=ie(n)&&(((d=s==null?void 0:s.interpolation)==null?void 0:d.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let x;if(v){const C=n.match(this.interpolator.nestingRegexp);x=C&&C.length}let S=s.replace&&!ie(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(S={...this.options.interpolation.defaultVariables,...S}),n=this.interpolator.interpolate(n,S,s.lng||this.language||o.usedLng,s),v){const C=n.match(this.interpolator.nestingRegexp),E=C&&C.length;x<E&&(s.nest=!1)}!s.lng&&o&&o.res&&(s.lng=this.language||o.usedLng),s.nest!==!1&&(n=this.interpolator.nest(n,(...C)=>(f==null?void 0:f[0])===C[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${C[0]} in key: ${r[0]}`),null):this.translate(...C,r),s)),s.interpolation&&this.interpolator.reset()}const p=s.postProcess||this.options.postProcess,h=ie(p)?[p]:p;return n!=null&&(h!=null&&h.length)&&s.applyPostProcessor!==!1&&(n=um.handle(h,n,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),n}resolve(n,r={}){let s,o,f,p,h;return ie(n)&&(n=[n]),n.forEach(m=>{if(this.isValidLookup(s))return;const d=this.extractFromKey(m,r),v=d.key;o=v;let x=d.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const S=r.count!==void 0&&!ie(r.count),C=S&&!r.ordinal&&r.count===0,E=r.context!==void 0&&(ie(r.context)||typeof r.context=="number")&&r.context!=="",z=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);x.forEach(B=>{var U,D;this.isValidLookup(s)||(h=B,!Tp[`${z[0]}-${B}`]&&((U=this.utils)!=null&&U.hasLoadedNamespace)&&!((D=this.utils)!=null&&D.hasLoadedNamespace(h))&&(Tp[`${z[0]}-${B}`]=!0,this.logger.warn(`key "${o}" for languages "${z.join(", ")}" won't get resolved as namespace "${h}" 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!!!")),z.forEach(G=>{var ue;if(this.isValidLookup(s))return;p=G;const J=[v];if((ue=this.i18nFormat)!=null&&ue.addLookupKeys)this.i18nFormat.addLookupKeys(J,v,G,B,r);else{let re;S&&(re=this.pluralResolver.getSuffix(G,r.count,r));const ee=`${this.options.pluralSeparator}zero`,F=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(S&&(J.push(v+re),r.ordinal&&re.indexOf(F)===0&&J.push(v+re.replace(F,this.options.pluralSeparator)),C&&J.push(v+ee)),E){const ne=`${v}${this.options.contextSeparator}${r.context}`;J.push(ne),S&&(J.push(ne+re),r.ordinal&&re.indexOf(F)===0&&J.push(ne+re.replace(F,this.options.pluralSeparator)),C&&J.push(ne+ee))}}let K;for(;K=J.pop();)this.isValidLookup(s)||(f=K,s=this.getResource(G,B,K,r))}))})}),{res:s,usedKey:o,exactUsedKey:f,usedLng:p,usedNS:h}}isValidLookup(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}getResource(n,r,s,o={}){var f;return(f=this.i18nFormat)!=null&&f.getResource?this.i18nFormat.getResource(n,r,s,o):this.resourceStore.getResource(n,r,s,o)}getUsedParamsDetails(n={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=n.replace&&!ie(n.replace);let o=s?n.replace:n;if(s&&typeof n.count<"u"&&(o.count=n.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!s){o={...o};for(const f of r)delete o[f]}return o}static hasDefaultValue(n){const r="defaultValue";for(const s in n)if(Object.prototype.hasOwnProperty.call(n,s)&&r===s.substring(0,r.length)&&n[s]!==void 0)return!0;return!1}}class Cp{constructor(n){this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wt.create("languageUtils")}getScriptPartFromCode(n){if(n=pi(n),!n||n.indexOf("-")<0)return null;const r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(n){if(n=pi(n),!n||n.indexOf("-")<0)return n;const r=n.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(n){if(ie(n)&&n.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(n)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?n.toLowerCase():n)}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}isSupportedCode(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}getBestMatchFromCodes(n){if(!n)return null;let r;return n.forEach(s=>{if(r)return;const o=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(o))&&(r=o)}),!r&&this.options.supportedLngs&&n.forEach(s=>{if(r)return;const o=this.getScriptPartFromCode(s);if(this.isSupportedCode(o))return r=o;const f=this.getLanguagePartFromCode(s);if(this.isSupportedCode(f))return r=f;r=this.options.supportedLngs.find(p=>{if(p===f)return p;if(!(p.indexOf("-")<0&&f.indexOf("-")<0)&&(p.indexOf("-")>0&&f.indexOf("-")<0&&p.substring(0,p.indexOf("-"))===f||p.indexOf(f)===0&&f.length>1))return p})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),ie(n)&&(n=[n]),Array.isArray(n))return n;if(!r)return n.default||[];let s=n[r];return s||(s=n[this.getScriptPartFromCode(r)]),s||(s=n[this.formatLanguageCode(r)]),s||(s=n[this.getLanguagePartFromCode(r)]),s||(s=n.default),s||[]}toResolveHierarchy(n,r){const s=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],n),o=[],f=p=>{p&&(this.isSupportedCode(p)?o.push(p):this.logger.warn(`rejecting language code not found in supportedLngs: ${p}`))};return ie(n)&&(n.indexOf("-")>-1||n.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&f(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&f(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&f(this.getLanguagePartFromCode(n))):ie(n)&&f(this.formatLanguageCode(n)),s.forEach(p=>{o.indexOf(p)<0&&f(this.formatLanguageCode(p))}),o}}const jp={zero:0,one:1,two:2,few:3,many:4,other:5},Ap={select:i=>i===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Y0{constructor(n,r={}){this.languageUtils=n,this.options=r,this.logger=Wt.create("pluralResolver"),this.pluralRulesCache={}}addRule(n,r){this.rules[n]=r}clearCache(){this.pluralRulesCache={}}getRule(n,r={}){const s=pi(n==="dev"?"en":n),o=r.ordinal?"ordinal":"cardinal",f=JSON.stringify({cleanedCode:s,type:o});if(f in this.pluralRulesCache)return this.pluralRulesCache[f];let p;try{p=new Intl.PluralRules(s,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Ap;if(!n.match(/-|_/))return Ap;const m=this.languageUtils.getLanguagePartFromCode(n);p=this.getRule(m,r)}return this.pluralRulesCache[f]=p,p}needsPlural(n,r={}){let s=this.getRule(n,r);return s||(s=this.getRule("dev",r)),(s==null?void 0:s.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(n,r,s={}){return this.getSuffixes(n,s).map(o=>`${r}${o}`)}getSuffixes(n,r={}){let s=this.getRule(n,r);return s||(s=this.getRule("dev",r)),s?s.resolvedOptions().pluralCategories.sort((o,f)=>jp[o]-jp[f]).map(o=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(n,r,s={}){const o=this.getRule(n,s);return o?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${o.select(r)}`:(this.logger.warn(`no plural rule found for: ${n}`),this.getSuffix("dev",r,s))}}const Op=(i,n,r,s=".",o=!0)=>{let f=M0(i,n,r);return!f&&o&&ie(r)&&(f=Uo(i,r,s),f===void 0&&(f=Uo(n,r,s))),f},To=i=>i.replace(/\$/g,"$$$$");class Q0{constructor(n={}){var r;this.logger=Wt.create("interpolator"),this.options=n,this.format=((r=n==null?void 0:n.interpolation)==null?void 0:r.format)||(s=>s),this.init(n)}init(n={}){n.interpolation||(n.interpolation={escapeValue:!0});const{escape:r,escapeValue:s,useRawValueToEscape:o,prefix:f,prefixEscaped:p,suffix:h,suffixEscaped:m,formatSeparator:d,unescapeSuffix:v,unescapePrefix:x,nestingPrefix:S,nestingPrefixEscaped:C,nestingSuffix:E,nestingSuffixEscaped:z,nestingOptionsSeparator:B,maxReplaces:U,alwaysFormat:D}=n.interpolation;this.escape=r!==void 0?r:B0,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=f?al(f):p||"{{",this.suffix=h?al(h):m||"}}",this.formatSeparator=d||",",this.unescapePrefix=v?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=S?al(S):C||al("$t("),this.nestingSuffix=E?al(E):z||al(")"),this.nestingOptionsSeparator=B||",",this.maxReplaces=U||1e3,this.alwaysFormat=D!==void 0?D:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const n=(r,s)=>(r==null?void 0:r.source)===s?(r.lastIndex=0,r):new RegExp(s,"g");this.regexp=n(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=n(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=n(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(n,r,s,o){var C;let f,p,h;const m=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=E=>{if(E.indexOf(this.formatSeparator)<0){const D=Op(r,m,E,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(D,void 0,s,{...o,...r,interpolationkey:E}):D}const z=E.split(this.formatSeparator),B=z.shift().trim(),U=z.join(this.formatSeparator).trim();return this.format(Op(r,m,B,this.options.keySeparator,this.options.ignoreJSONStructure),U,s,{...o,...r,interpolationkey:B})};this.resetRegExp();const v=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,x=((C=o==null?void 0:o.interpolation)==null?void 0:C.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:E=>To(E)},{regex:this.regexp,safeValue:E=>this.escapeValue?To(this.escape(E)):To(E)}].forEach(E=>{for(h=0;f=E.regex.exec(n);){const z=f[1].trim();if(p=d(z),p===void 0)if(typeof v=="function"){const U=v(n,f,o);p=ie(U)?U:""}else if(o&&Object.prototype.hasOwnProperty.call(o,z))p="";else if(x){p=f[0];continue}else this.logger.warn(`missed to pass in variable ${z} for interpolating ${n}`),p="";else!ie(p)&&!this.useRawValueToEscape&&(p=Sp(p));const B=E.safeValue(p);if(n=n.replace(f[0],B),x?(E.regex.lastIndex+=p.length,E.regex.lastIndex-=f[0].length):E.regex.lastIndex=0,h++,h>=this.maxReplaces)break}}),n}nest(n,r,s={}){let o,f,p;const h=(m,d)=>{const v=this.nestingOptionsSeparator;if(m.indexOf(v)<0)return m;const x=m.split(new RegExp(`${v}[ ]*{`));let S=`{${x[1]}`;m=x[0],S=this.interpolate(S,p);const C=S.match(/'/g),E=S.match(/"/g);(((C==null?void 0:C.length)??0)%2===0&&!E||E.length%2!==0)&&(S=S.replace(/'/g,'"'));try{p=JSON.parse(S),d&&(p={...d,...p})}catch(z){return this.logger.warn(`failed parsing options string in nesting for key ${m}`,z),`${m}${v}${S}`}return p.defaultValue&&p.defaultValue.indexOf(this.prefix)>-1&&delete p.defaultValue,m};for(;o=this.nestingRegexp.exec(n);){let m=[];p={...s},p=p.replace&&!ie(p.replace)?p.replace:p,p.applyPostProcessor=!1,delete p.defaultValue;let d=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const v=o[1].split(this.formatSeparator).map(x=>x.trim());o[1]=v.shift(),m=v,d=!0}if(f=r(h.call(this,o[1].trim(),p),p),f&&o[0]===n&&!ie(f))return f;ie(f)||(f=Sp(f)),f||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${n}`),f=""),d&&(f=m.reduce((v,x)=>this.format(v,x,s.lng,{...s,interpolationkey:o[1].trim()}),f.trim())),n=n.replace(o[0],f),this.regexp.lastIndex=0}return n}}const Z0=i=>{let n=i.toLowerCase().trim();const r={};if(i.indexOf("(")>-1){const s=i.split("(");n=s[0].toLowerCase().trim();const o=s[1].substring(0,s[1].length-1);n==="currency"&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):n==="relativetime"&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach(p=>{if(p){const[h,...m]=p.split(":"),d=m.join(":").trim().replace(/^'+|'+$/g,""),v=h.trim();r[v]||(r[v]=d),d==="false"&&(r[v]=!1),d==="true"&&(r[v]=!0),isNaN(d)||(r[v]=parseInt(d,10))}})}return{formatName:n,formatOptions:r}},kp=i=>{const n={};return(r,s,o)=>{let f=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(f={...f,[o.interpolationkey]:void 0});const p=s+JSON.stringify(f);let h=n[p];return h||(h=i(pi(s),o),n[p]=h),h(r)}},K0=i=>(n,r,s)=>i(pi(r),s)(n);class X0{constructor(n={}){this.logger=Wt.create("formatter"),this.options=n,this.init(n)}init(n,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const s=r.cacheInBuiltFormats?kp:K0;this.formats={number:s((o,f)=>{const p=new Intl.NumberFormat(o,{...f});return h=>p.format(h)}),currency:s((o,f)=>{const p=new Intl.NumberFormat(o,{...f,style:"currency"});return h=>p.format(h)}),datetime:s((o,f)=>{const p=new Intl.DateTimeFormat(o,{...f});return h=>p.format(h)}),relativetime:s((o,f)=>{const p=new Intl.RelativeTimeFormat(o,{...f});return h=>p.format(h,f.range||"day")}),list:s((o,f)=>{const p=new Intl.ListFormat(o,{...f});return h=>p.format(h)})}}add(n,r){this.formats[n.toLowerCase().trim()]=r}addCached(n,r){this.formats[n.toLowerCase().trim()]=kp(r)}format(n,r,s,o={}){const f=r.split(this.formatSeparator);if(f.length>1&&f[0].indexOf("(")>1&&f[0].indexOf(")")<0&&f.find(h=>h.indexOf(")")>-1)){const h=f.findIndex(m=>m.indexOf(")")>-1);f[0]=[f[0],...f.splice(1,h)].join(this.formatSeparator)}return f.reduce((h,m)=>{var x;const{formatName:d,formatOptions:v}=Z0(m);if(this.formats[d]){let S=h;try{const C=((x=o==null?void 0:o.formatParams)==null?void 0:x[o.interpolationkey])||{},E=C.locale||C.lng||o.locale||o.lng||s;S=this.formats[d](h,E,{...v,...o,...C})}catch(C){this.logger.warn(C)}return S}else this.logger.warn(`there was no format function for ${d}`);return h},n)}}const J0=(i,n)=>{i.pending[n]!==void 0&&(delete i.pending[n],i.pendingCount--)};class F0 extends ts{constructor(n,r,s,o={}){var f,p;super(),this.backend=n,this.store=r,this.services=s,this.languageUtils=s.languageUtils,this.options=o,this.logger=Wt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(p=(f=this.backend)==null?void 0:f.init)==null||p.call(f,s,o.backend,o)}queueLoad(n,r,s,o){const f={},p={},h={},m={};return n.forEach(d=>{let v=!0;r.forEach(x=>{const S=`${d}|${x}`;!s.reload&&this.store.hasResourceBundle(d,x)?this.state[S]=2:this.state[S]<0||(this.state[S]===1?p[S]===void 0&&(p[S]=!0):(this.state[S]=1,v=!1,p[S]===void 0&&(p[S]=!0),f[S]===void 0&&(f[S]=!0),m[x]===void 0&&(m[x]=!0)))}),v||(h[d]=!0)}),(Object.keys(f).length||Object.keys(p).length)&&this.queue.push({pending:p,pendingCount:Object.keys(p).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(f),pending:Object.keys(p),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(m)}}loaded(n,r,s){const o=n.split("|"),f=o[0],p=o[1];r&&this.emit("failedLoading",f,p,r),!r&&s&&this.store.addResourceBundle(f,p,s,void 0,void 0,{skipCopy:!0}),this.state[n]=r?-1:2,r&&s&&(this.state[n]=0);const h={};this.queue.forEach(m=>{_0(m.loaded,[f],p),J0(m,n),r&&m.errors.push(r),m.pendingCount===0&&!m.done&&(Object.keys(m.loaded).forEach(d=>{h[d]||(h[d]={});const v=m.loaded[d];v.length&&v.forEach(x=>{h[d][x]===void 0&&(h[d][x]=!0)})}),m.done=!0,m.errors.length?m.callback(m.errors):m.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(m=>!m.done)}read(n,r,s,o=0,f=this.retryTimeout,p){if(!n.length)return p(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:r,fcName:s,tried:o,wait:f,callback:p});return}this.readingCalls++;const h=(d,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(d&&v&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,n,r,s,o+1,f*2,p)},f);return}p(d,v)},m=this.backend[s].bind(this.backend);if(m.length===2){try{const d=m(n,r);d&&typeof d.then=="function"?d.then(v=>h(null,v)).catch(h):h(null,d)}catch(d){h(d)}return}return m(n,r,h)}prepareLoading(n,r,s={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();ie(n)&&(n=this.languageUtils.toResolveHierarchy(n)),ie(r)&&(r=[r]);const f=this.queueLoad(n,r,s,o);if(!f.toLoad.length)return f.pending.length||o(),null;f.toLoad.forEach(p=>{this.loadOne(p)})}load(n,r,s){this.prepareLoading(n,r,{},s)}reload(n,r,s){this.prepareLoading(n,r,{reload:!0},s)}loadOne(n,r=""){const s=n.split("|"),o=s[0],f=s[1];this.read(o,f,"read",void 0,void 0,(p,h)=>{p&&this.logger.warn(`${r}loading namespace ${f} for language ${o} failed`,p),!p&&h&&this.logger.log(`${r}loaded namespace ${f} for language ${o}`,h),this.loaded(n,p,h)})}saveMissing(n,r,s,o,f,p={},h=()=>{}){var m,d,v,x,S;if((d=(m=this.services)==null?void 0:m.utils)!=null&&d.hasLoadedNamespace&&!((x=(v=this.services)==null?void 0:v.utils)!=null&&x.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${s}" as the namespace "${r}" 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(!(s==null||s==="")){if((S=this.backend)!=null&&S.create){const C={...p,isUpdate:f},E=this.backend.create.bind(this.backend);if(E.length<6)try{let z;E.length===5?z=E(n,r,s,o,C):z=E(n,r,s,o),z&&typeof z.then=="function"?z.then(B=>h(null,B)).catch(h):h(null,z)}catch(z){h(z)}else E(n,r,s,o,h,C)}!n||!n[0]||this.store.addResource(n[0],r,s,o)}}}const Lp=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:i=>{let n={};if(typeof i[1]=="object"&&(n=i[1]),ie(i[1])&&(n.defaultValue=i[1]),ie(i[2])&&(n.tDescription=i[2]),typeof i[2]=="object"||typeof i[3]=="object"){const r=i[3]||i[2];Object.keys(r).forEach(s=>{n[s]=r[s]})}return n},interpolation:{escapeValue:!0,format:i=>i,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),zp=i=>{var n,r;return ie(i.ns)&&(i.ns=[i.ns]),ie(i.fallbackLng)&&(i.fallbackLng=[i.fallbackLng]),ie(i.fallbackNS)&&(i.fallbackNS=[i.fallbackNS]),((r=(n=i.supportedLngs)==null?void 0:n.indexOf)==null?void 0:r.call(n,"cimode"))<0&&(i.supportedLngs=i.supportedLngs.concat(["cimode"])),typeof i.initImmediate=="boolean"&&(i.initAsync=i.initImmediate),i},Br=()=>{},P0=i=>{Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach(r=>{typeof i[r]=="function"&&(i[r]=i[r].bind(i))})};class mi extends ts{constructor(n={},r){if(super(),this.options=zp(n),this.services={},this.logger=Wt,this.modules={external:[]},P0(this),r&&!this.isInitialized&&!n.isClone){if(!this.options.initAsync)return this.init(n,r),this;setTimeout(()=>{this.init(n,r)},0)}}init(n={},r){this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(ie(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=Lp();this.options={...s,...this.options,...zp(n)},this.options.interpolation={...s.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?Wt.init(o(this.modules.logger),this.options):Wt.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:d=X0;const v=new Cp(this.options);this.store=new Rp(this.options.resources,this.options);const x=this.services;x.logger=Wt,x.resourceStore=this.store,x.languageUtils=v,x.pluralResolver=new Y0(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(x.formatter=o(d),x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new Q0(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new F0(o(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(S,...C)=>{this.emit(S,...C)}),this.modules.languageDetector&&(x.languageDetector=o(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=o(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new Fr(this.services,this.options),this.translator.on("*",(S,...C)=>{this.emit(S,...C)}),this.modules.external.forEach(S=>{S.init&&S.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Br),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[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(d=>{this[d]=(...v)=>this.store[d](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=(...v)=>(this.store[d](...v),this)});const h=ri(),m=()=>{const d=(v,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),h.resolve(x),r(v,x)};if(this.languages&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initAsync?m():setTimeout(m,0),h}loadResources(n,r=Br){var f,p;let s=r;const o=ie(n)?n:this.language;if(typeof n=="function"&&(s=n),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const h=[],m=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(x=>{x!=="cimode"&&h.indexOf(x)<0&&h.push(x)})};o?m(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(v=>m(v)),(p=(f=this.options.preload)==null?void 0:f.forEach)==null||p.call(f,d=>m(d)),this.services.backendConnector.load(h,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(d)})}else s(null)}reloadResources(n,r,s){const o=ri();return typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=void 0),n||(n=this.languages),r||(r=this.options.ns),s||(s=Br),this.services.backendConnector.reload(n,r,f=>{o.resolve(),s(f)}),o}use(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&um.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}setResolvedLanguage(n){if(!(!n||!this.languages)&&!(["cimode","dev"].indexOf(n)>-1)){for(let r=0;r<this.languages.length;r++){const s=this.languages[r];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(n)<0&&this.store.hasLanguageSomeTranslations(n)&&(this.resolvedLanguage=n,this.languages.unshift(n))}}changeLanguage(n,r){this.isLanguageChangingTo=n;const s=ri();this.emit("languageChanging",n);const o=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},f=(h,m)=>{m?this.isLanguageChangingTo===n&&(o(m),this.translator.changeLanguage(m),this.isLanguageChangingTo=void 0,this.emit("languageChanged",m),this.logger.log("languageChanged",m)):this.isLanguageChangingTo=void 0,s.resolve((...d)=>this.t(...d)),r&&r(h,(...d)=>this.t(...d))},p=h=>{var v,x;!n&&!h&&this.services.languageDetector&&(h=[]);const m=ie(h)?h:h&&h[0],d=this.store.hasLanguageSomeTranslations(m)?m:this.services.languageUtils.getBestMatchFromCodes(ie(h)?[h]:h);d&&(this.language||o(d),this.translator.language||this.translator.changeLanguage(d),(x=(v=this.services.languageDetector)==null?void 0:v.cacheUserLanguage)==null||x.call(v,d)),this.loadResources(d,S=>{f(S,d)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?p(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(p):this.services.languageDetector.detect(p):p(n),s}getFixedT(n,r,s){const o=(f,p,...h)=>{let m;typeof p!="object"?m=this.options.overloadTranslationOptionHandler([f,p].concat(h)):m={...p},m.lng=m.lng||o.lng,m.lngs=m.lngs||o.lngs,m.ns=m.ns||o.ns,m.keyPrefix!==""&&(m.keyPrefix=m.keyPrefix||s||o.keyPrefix);const d=this.options.keySeparator||".";let v;return m.keyPrefix&&Array.isArray(f)?v=f.map(x=>`${m.keyPrefix}${d}${x}`):v=m.keyPrefix?`${m.keyPrefix}${d}${f}`:f,this.t(v,m)};return ie(n)?o.lng=n:o.lngs=n,o.ns=r,o.keyPrefix=s,o}t(...n){var r;return(r=this.translator)==null?void 0:r.translate(...n)}exists(...n){var r;return(r=this.translator)==null?void 0:r.exists(...n)}setDefaultNamespace(n){this.options.defaultNS=n}hasLoadedNamespace(n,r={}){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 s=r.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,f=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const p=(h,m)=>{const d=this.services.backendConnector.state[`${h}|${m}`];return d===-1||d===0||d===2};if(r.precheck){const h=r.precheck(this,p);if(h!==void 0)return h}return!!(this.hasResourceBundle(s,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||p(s,n)&&(!o||p(f,n)))}loadNamespaces(n,r){const s=ri();return this.options.ns?(ie(n)&&(n=[n]),n.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{s.resolve(),r&&r(o)}),s):(r&&r(),Promise.resolve())}loadLanguages(n,r){const s=ri();ie(n)&&(n=[n]);const o=this.options.preload||[],f=n.filter(p=>o.indexOf(p)<0&&this.services.languageUtils.isSupportedCode(p));return f.length?(this.options.preload=o.concat(f),this.loadResources(p=>{s.resolve(),r&&r(p)}),s):(r&&r(),Promise.resolve())}dir(n){var o,f;if(n||(n=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!n)return"rtl";const r=["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"],s=((f=this.services)==null?void 0:f.languageUtils)||new Cp(Lp());return r.indexOf(s.getLanguagePartFromCode(n))>-1||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(n={},r){return new mi(n,r)}cloneInstance(n={},r=Br){const s=n.forkResourceStore;s&&delete n.forkResourceStore;const o={...this.options,...n,isClone:!0},f=new mi(o);if((n.debug!==void 0||n.prefix!==void 0)&&(f.logger=f.logger.clone(n)),["store","services","language"].forEach(h=>{f[h]=this[h]}),f.services={...this.services},f.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},s){const h=Object.keys(this.store.data).reduce((m,d)=>(m[d]={...this.store.data[d]},m[d]=Object.keys(m[d]).reduce((v,x)=>(v[x]={...m[d][x]},v),m[d]),m),{});f.store=new Rp(h,o),f.services.resourceStore=f.store}return f.translator=new Fr(f.services,o),f.translator.on("*",(h,...m)=>{f.emit(h,...m)}),f.init(o,r),f.translator.options=o,f.translator.backendConnector.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},f}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const at=mi.createInstance();at.createInstance=mi.createInstance;at.createInstance;at.dir;at.init;at.loadResources;at.reloadResources;at.use;at.changeLanguage;at.getFixedT;at.t;at.exists;at.setDefaultNamespace;at.hasLoadedNamespace;at.loadNamespaces;at.loadLanguages;var wo={exports:{}},oe={};/**
|
|
9
|
+
*/var ey;function oN(){if(ey)return ls;ey=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(a,l,u){var f=null;if(u!==void 0&&(f=""+u),l.key!==void 0&&(f=""+l.key),"key"in l){u={};for(var d in l)d!=="key"&&(u[d]=l[d])}else u=l;return l=u.ref,{$$typeof:t,type:a,key:f,ref:l!==void 0?l:null,props:u}}return ls.Fragment=n,ls.jsx=i,ls.jsxs=i,ls}var ty;function uN(){return ty||(ty=1,pf.exports=oN()),pf.exports}var S=uN();const ce=t=>typeof t=="string",os=()=>{let t,n;const i=new Promise((a,l)=>{t=a,n=l});return i.resolve=t,i.reject=n,i},ny=t=>t==null?"":""+t,cN=(t,n,i)=>{t.forEach(a=>{n[a]&&(i[a]=n[a])})},fN=/###/g,iy=t=>t&&t.indexOf("###")>-1?t.replace(fN,"."):t,ry=t=>!t||ce(t),gs=(t,n,i)=>{const a=ce(n)?n.split("."):n;let l=0;for(;l<a.length-1;){if(ry(t))return{};const u=iy(a[l]);!t[u]&&i&&(t[u]=new i),Object.prototype.hasOwnProperty.call(t,u)?t=t[u]:t={},++l}return ry(t)?{}:{obj:t,k:iy(a[l])}},ay=(t,n,i)=>{const{obj:a,k:l}=gs(t,n,Object);if(a!==void 0||n.length===1){a[l]=i;return}let u=n[n.length-1],f=n.slice(0,n.length-1),d=gs(t,f,Object);for(;d.obj===void 0&&f.length;)u=`${f[f.length-1]}.${u}`,f=f.slice(0,f.length-1),d=gs(t,f,Object),d!=null&&d.obj&&typeof d.obj[`${d.k}.${u}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${u}`]=i},dN=(t,n,i,a)=>{const{obj:l,k:u}=gs(t,n,Object);l[u]=l[u]||[],l[u].push(i)},bo=(t,n)=>{const{obj:i,k:a}=gs(t,n);if(i&&Object.prototype.hasOwnProperty.call(i,a))return i[a]},hN=(t,n,i)=>{const a=bo(t,i);return a!==void 0?a:bo(n,i)},Qv=(t,n,i)=>{for(const a in n)a!=="__proto__"&&a!=="constructor"&&(a in t?ce(t[a])||t[a]instanceof String||ce(n[a])||n[a]instanceof String?i&&(t[a]=n[a]):Qv(t[a],n[a],i):t[a]=n[a]);return t},Gr=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var pN={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const mN=t=>ce(t)?t.replace(/[&<>"'\/]/g,n=>pN[n]):t;class gN{constructor(n){this.capacity=n,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(n){const i=this.regExpMap.get(n);if(i!==void 0)return i;const a=new RegExp(n);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(n,a),this.regExpQueue.push(n),a}}const yN=[" ",",","?","!",";"],vN=new gN(20),bN=(t,n,i)=>{n=n||"",i=i||"";const a=yN.filter(f=>n.indexOf(f)<0&&i.indexOf(f)<0);if(a.length===0)return!0;const l=vN.getRegExp(`(${a.map(f=>f==="?"?"\\?":f).join("|")})`);let u=!l.test(t);if(!u){const f=t.indexOf(i);f>0&&!l.test(t.substring(0,f))&&(u=!0)}return u},Uf=(t,n,i=".")=>{if(!t)return;if(t[n])return Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0;const a=n.split(i);let l=t;for(let u=0;u<a.length;){if(!l||typeof l!="object")return;let f,d="";for(let m=u;m<a.length;++m)if(m!==u&&(d+=i),d+=a[m],f=l[d],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&m<a.length-1)continue;u+=m-u+1;break}l=f}return l},bs=t=>t==null?void 0:t.replace("_","-"),xN={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,n){var i,a;(a=(i=console==null?void 0:console[t])==null?void 0:i.apply)==null||a.call(i,console,n)}};class xo{constructor(n,i={}){this.init(n,i)}init(n,i={}){this.prefix=i.prefix||"i18next:",this.logger=n||xN,this.options=i,this.debug=i.debug}log(...n){return this.forward(n,"log","",!0)}warn(...n){return this.forward(n,"warn","",!0)}error(...n){return this.forward(n,"error","")}deprecate(...n){return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(n,i,a,l){return l&&!this.debug?null:(ce(n[0])&&(n[0]=`${a}${this.prefix} ${n[0]}`),this.logger[i](n))}create(n){return new xo(this.logger,{prefix:`${this.prefix}:${n}:`,...this.options})}clone(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new xo(this.logger,n)}}var wn=new xo;class zo{constructor(){this.observers={}}on(n,i){return n.split(" ").forEach(a=>{this.observers[a]||(this.observers[a]=new Map);const l=this.observers[a].get(i)||0;this.observers[a].set(i,l+1)}),this}off(n,i){if(this.observers[n]){if(!i){delete this.observers[n];return}this.observers[n].delete(i)}}emit(n,...i){this.observers[n]&&Array.from(this.observers[n].entries()).forEach(([l,u])=>{for(let f=0;f<u;f++)l(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([l,u])=>{for(let f=0;f<u;f++)l.apply(l,[n,...i])})}}class sy extends zo{constructor(n,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=n||{},this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(n){this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}removeNamespaces(n){const i=this.options.ns.indexOf(n);i>-1&&this.options.ns.splice(i,1)}getResource(n,i,a,l={}){var p,g;const u=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,f=l.ignoreJSONStructure!==void 0?l.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;n.indexOf(".")>-1?d=n.split("."):(d=[n,i],a&&(Array.isArray(a)?d.push(...a):ce(a)&&u?d.push(...a.split(u)):d.push(a)));const m=bo(this.data,d);return!m&&!i&&!a&&n.indexOf(".")>-1&&(n=d[0],i=d[1],a=d.slice(2).join(".")),m||!f||!ce(a)?m:Uf((g=(p=this.data)==null?void 0:p[n])==null?void 0:g[i],a,u)}addResource(n,i,a,l,u={silent:!1}){const f=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let d=[n,i];a&&(d=d.concat(f?a.split(f):a)),n.indexOf(".")>-1&&(d=n.split("."),l=i,i=d[1]),this.addNamespaces(i),ay(this.data,d,l),u.silent||this.emit("added",n,i,a,l)}addResources(n,i,a,l={silent:!1}){for(const u in a)(ce(a[u])||Array.isArray(a[u]))&&this.addResource(n,i,u,a[u],{silent:!0});l.silent||this.emit("added",n,i,a)}addResourceBundle(n,i,a,l,u,f={silent:!1,skipCopy:!1}){let d=[n,i];n.indexOf(".")>-1&&(d=n.split("."),l=a,a=i,i=d[1]),this.addNamespaces(i);let m=bo(this.data,d)||{};f.skipCopy||(a=JSON.parse(JSON.stringify(a))),l?Qv(m,a,u):m={...m,...a},ay(this.data,d,m),f.silent||this.emit("added",n,i,a)}removeResourceBundle(n,i){this.hasResourceBundle(n,i)&&delete this.data[n][i],this.removeNamespaces(i),this.emit("removed",n,i)}hasResourceBundle(n,i){return this.getResource(n,i)!==void 0}getResourceBundle(n,i){return i||(i=this.options.defaultNS),this.getResource(n,i)}getDataByLanguage(n){return this.data[n]}hasLanguageSomeTranslations(n){const i=this.getDataByLanguage(n);return!!(i&&Object.keys(i)||[]).find(l=>i[l]&&Object.keys(i[l]).length>0)}toJSON(){return this.data}}var Fv={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,n,i,a,l){return t.forEach(u=>{var f;n=((f=this.processors[u])==null?void 0:f.process(n,i,a,l))??n}),n}};const ly={},oy=t=>!ce(t)&&typeof t!="boolean"&&typeof t!="number";class So extends zo{constructor(n,i={}){super(),cN(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,this),this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=wn.create("translator")}changeLanguage(n){n&&(this.language=n)}exists(n,i={interpolation:{}}){const a={...i};if(n==null)return!1;const l=this.resolve(n,a);return(l==null?void 0:l.res)!==void 0}extractFromKey(n,i){let a=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");const l=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let u=i.ns||this.options.defaultNS||[];const f=a&&n.indexOf(a)>-1,d=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!bN(n,a,l);if(f&&!d){const m=n.match(this.interpolator.nestingRegexp);if(m&&m.length>0)return{key:n,namespaces:ce(u)?[u]:u};const p=n.split(a);(a!==l||a===l&&this.options.ns.indexOf(p[0])>-1)&&(u=p.shift()),n=p.join(l)}return{key:n,namespaces:ce(u)?[u]:u}}translate(n,i,a){let l=typeof i=="object"?{...i}:i;if(typeof l!="object"&&this.options.overloadTranslationOptionHandler&&(l=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(l={...l}),l||(l={}),n==null)return"";Array.isArray(n)||(n=[String(n)]);const u=l.returnDetails!==void 0?l.returnDetails:this.options.returnDetails,f=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,{key:d,namespaces:m}=this.extractFromKey(n[n.length-1],l),p=m[m.length-1];let g=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;g===void 0&&(g=":");const v=l.lng||this.language,b=l.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((v==null?void 0:v.toLowerCase())==="cimode")return b?u?{res:`${p}${g}${d}`,usedKey:d,exactUsedKey:d,usedLng:v,usedNS:p,usedParams:this.getUsedParamsDetails(l)}:`${p}${g}${d}`:u?{res:d,usedKey:d,exactUsedKey:d,usedLng:v,usedNS:p,usedParams:this.getUsedParamsDetails(l)}:d;const R=this.resolve(n,l);let N=R==null?void 0:R.res;const O=(R==null?void 0:R.usedKey)||d,U=(R==null?void 0:R.exactUsedKey)||d,z=["[object Number]","[object Function]","[object RegExp]"],L=l.joinArrays!==void 0?l.joinArrays:this.options.joinArrays,G=!this.i18nFormat||this.i18nFormat.handleAsObject,X=l.count!==void 0&&!ce(l.count),F=So.hasDefaultValue(l),pe=X?this.pluralResolver.getSuffix(v,l.count,l):"",fe=l.ordinal&&X?this.pluralResolver.getSuffix(v,l.count,{ordinal:!1}):"",re=X&&!l.ordinal&&l.count===0,ee=re&&l[`defaultValue${this.options.pluralSeparator}zero`]||l[`defaultValue${pe}`]||l[`defaultValue${fe}`]||l.defaultValue;let oe=N;G&&!N&&F&&(oe=ee);const xe=oy(oe),ot=Object.prototype.toString.apply(oe);if(G&&oe&&xe&&z.indexOf(ot)<0&&!(ce(L)&&Array.isArray(oe))){if(!l.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ut=this.options.returnedObjectHandler?this.options.returnedObjectHandler(O,oe,{...l,ns:m}):`key '${d} (${this.language})' returned an object instead of string.`;return u?(R.res=ut,R.usedParams=this.getUsedParamsDetails(l),R):ut}if(f){const ut=Array.isArray(oe),it=ut?[]:{},rt=ut?U:O;for(const B in oe)if(Object.prototype.hasOwnProperty.call(oe,B)){const Y=`${rt}${f}${B}`;F&&!N?it[B]=this.translate(Y,{...l,defaultValue:oy(ee)?ee[B]:void 0,joinArrays:!1,ns:m}):it[B]=this.translate(Y,{...l,joinArrays:!1,ns:m}),it[B]===Y&&(it[B]=oe[B])}N=it}}else if(G&&ce(L)&&Array.isArray(N))N=N.join(L),N&&(N=this.extendTranslation(N,n,l,a));else{let ut=!1,it=!1;!this.isValidLookup(N)&&F&&(ut=!0,N=ee),this.isValidLookup(N)||(it=!0,N=d);const B=(l.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&it?void 0:N,Y=F&&ee!==N&&this.options.updateMissing;if(it||ut||Y){if(this.logger.log(Y?"updateKey":"missingKey",v,p,d,Y?ee:N),f){const V=this.resolve(d,{...l,keySeparator:!1});V&&V.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 ne=[];const ke=this.languageUtils.getFallbackCodes(this.options.fallbackLng,l.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ke&&ke[0])for(let V=0;V<ke.length;V++)ne.push(ke[V]);else this.options.saveMissingTo==="all"?ne=this.languageUtils.toResolveHierarchy(l.lng||this.language):ne.push(l.lng||this.language);const E=(V,Q,I)=>{var Se;const ie=F&&I!==N?I:B;this.options.missingKeyHandler?this.options.missingKeyHandler(V,p,Q,ie,Y,l):(Se=this.backendConnector)!=null&&Se.saveMissing&&this.backendConnector.saveMissing(V,p,Q,ie,Y,l),this.emit("missingKey",V,p,Q,N)};this.options.saveMissing&&(this.options.saveMissingPlurals&&X?ne.forEach(V=>{const Q=this.pluralResolver.getSuffixes(V,l);re&&l[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(I=>{E([V],d+I,l[`defaultValue${I}`]||ee)})}):E(ne,d,ee))}N=this.extendTranslation(N,n,l,R,a),it&&N===d&&this.options.appendNamespaceToMissingKey&&(N=`${p}${g}${d}`),(it||ut)&&this.options.parseMissingKeyHandler&&(N=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${p}${g}${d}`:d,ut?N:void 0,l))}return u?(R.res=N,R.usedParams=this.getUsedParamsDetails(l),R):N}extendTranslation(n,i,a,l,u){var m,p;if((m=this.i18nFormat)!=null&&m.parse)n=this.i18nFormat.parse(n,{...this.options.interpolation.defaultVariables,...a},a.lng||this.language||l.usedLng,l.usedNS,l.usedKey,{resolved:l});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init({...a,interpolation:{...this.options.interpolation,...a.interpolation}});const g=ce(n)&&(((p=a==null?void 0:a.interpolation)==null?void 0:p.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let v;if(g){const R=n.match(this.interpolator.nestingRegexp);v=R&&R.length}let b=a.replace&&!ce(a.replace)?a.replace:a;if(this.options.interpolation.defaultVariables&&(b={...this.options.interpolation.defaultVariables,...b}),n=this.interpolator.interpolate(n,b,a.lng||this.language||l.usedLng,a),g){const R=n.match(this.interpolator.nestingRegexp),N=R&&R.length;v<N&&(a.nest=!1)}!a.lng&&l&&l.res&&(a.lng=this.language||l.usedLng),a.nest!==!1&&(n=this.interpolator.nest(n,(...R)=>(u==null?void 0:u[0])===R[0]&&!a.context?(this.logger.warn(`It seems you are nesting recursively key: ${R[0]} in key: ${i[0]}`),null):this.translate(...R,i),a)),a.interpolation&&this.interpolator.reset()}const f=a.postProcess||this.options.postProcess,d=ce(f)?[f]:f;return n!=null&&(d!=null&&d.length)&&a.applyPostProcessor!==!1&&(n=Fv.handle(d,n,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...l,usedParams:this.getUsedParamsDetails(a)},...a}:a,this)),n}resolve(n,i={}){let a,l,u,f,d;return ce(n)&&(n=[n]),n.forEach(m=>{if(this.isValidLookup(a))return;const p=this.extractFromKey(m,i),g=p.key;l=g;let v=p.namespaces;this.options.fallbackNS&&(v=v.concat(this.options.fallbackNS));const b=i.count!==void 0&&!ce(i.count),R=b&&!i.ordinal&&i.count===0,N=i.context!==void 0&&(ce(i.context)||typeof i.context=="number")&&i.context!=="",O=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);v.forEach(U=>{var z,L;this.isValidLookup(a)||(d=U,!ly[`${O[0]}-${U}`]&&((z=this.utils)!=null&&z.hasLoadedNamespace)&&!((L=this.utils)!=null&&L.hasLoadedNamespace(d))&&(ly[`${O[0]}-${U}`]=!0,this.logger.warn(`key "${l}" for languages "${O.join(", ")}" won't get resolved as namespace "${d}" 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!!!")),O.forEach(G=>{var pe;if(this.isValidLookup(a))return;f=G;const X=[g];if((pe=this.i18nFormat)!=null&&pe.addLookupKeys)this.i18nFormat.addLookupKeys(X,g,G,U,i);else{let fe;b&&(fe=this.pluralResolver.getSuffix(G,i.count,i));const re=`${this.options.pluralSeparator}zero`,ee=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(X.push(g+fe),i.ordinal&&fe.indexOf(ee)===0&&X.push(g+fe.replace(ee,this.options.pluralSeparator)),R&&X.push(g+re)),N){const oe=`${g}${this.options.contextSeparator}${i.context}`;X.push(oe),b&&(X.push(oe+fe),i.ordinal&&fe.indexOf(ee)===0&&X.push(oe+fe.replace(ee,this.options.pluralSeparator)),R&&X.push(oe+re))}}let F;for(;F=X.pop();)this.isValidLookup(a)||(u=F,a=this.getResource(G,U,F,i))}))})}),{res:a,usedKey:l,exactUsedKey:u,usedLng:f,usedNS:d}}isValidLookup(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}getResource(n,i,a,l={}){var u;return(u=this.i18nFormat)!=null&&u.getResource?this.i18nFormat.getResource(n,i,a,l):this.resourceStore.getResource(n,i,a,l)}getUsedParamsDetails(n={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],a=n.replace&&!ce(n.replace);let l=a?n.replace:n;if(a&&typeof n.count<"u"&&(l.count=n.count),this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),!a){l={...l};for(const u of i)delete l[u]}return l}static hasDefaultValue(n){const i="defaultValue";for(const a in n)if(Object.prototype.hasOwnProperty.call(n,a)&&i===a.substring(0,i.length)&&n[a]!==void 0)return!0;return!1}}class uy{constructor(n){this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wn.create("languageUtils")}getScriptPartFromCode(n){if(n=bs(n),!n||n.indexOf("-")<0)return null;const i=n.split("-");return i.length===2||(i.pop(),i[i.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(i.join("-"))}getLanguagePartFromCode(n){if(n=bs(n),!n||n.indexOf("-")<0)return n;const i=n.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(n){if(ce(n)&&n.indexOf("-")>-1){let i;try{i=Intl.getCanonicalLocales(n)[0]}catch{}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(this.options.lowerCaseLng?n.toLowerCase():n)}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}isSupportedCode(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}getBestMatchFromCodes(n){if(!n)return null;let i;return n.forEach(a=>{if(i)return;const l=this.formatLanguageCode(a);(!this.options.supportedLngs||this.isSupportedCode(l))&&(i=l)}),!i&&this.options.supportedLngs&&n.forEach(a=>{if(i)return;const l=this.getScriptPartFromCode(a);if(this.isSupportedCode(l))return i=l;const u=this.getLanguagePartFromCode(a);if(this.isSupportedCode(u))return i=u;i=this.options.supportedLngs.find(f=>{if(f===u)return f;if(!(f.indexOf("-")<0&&u.indexOf("-")<0)&&(f.indexOf("-")>0&&u.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===u||f.indexOf(u)===0&&u.length>1))return f})}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(n,i){if(!n)return[];if(typeof n=="function"&&(n=n(i)),ce(n)&&(n=[n]),Array.isArray(n))return n;if(!i)return n.default||[];let a=n[i];return a||(a=n[this.getScriptPartFromCode(i)]),a||(a=n[this.formatLanguageCode(i)]),a||(a=n[this.getLanguagePartFromCode(i)]),a||(a=n.default),a||[]}toResolveHierarchy(n,i){const a=this.getFallbackCodes((i===!1?[]:i)||this.options.fallbackLng||[],n),l=[],u=f=>{f&&(this.isSupportedCode(f)?l.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return ce(n)&&(n.indexOf("-")>-1||n.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(n))):ce(n)&&u(this.formatLanguageCode(n)),a.forEach(f=>{l.indexOf(f)<0&&u(this.formatLanguageCode(f))}),l}}const cy={zero:0,one:1,two:2,few:3,many:4,other:5},fy={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class SN{constructor(n,i={}){this.languageUtils=n,this.options=i,this.logger=wn.create("pluralResolver"),this.pluralRulesCache={}}addRule(n,i){this.rules[n]=i}clearCache(){this.pluralRulesCache={}}getRule(n,i={}){const a=bs(n==="dev"?"en":n),l=i.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:a,type:l});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let f;try{f=new Intl.PluralRules(a,{type:l})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),fy;if(!n.match(/-|_/))return fy;const m=this.languageUtils.getLanguagePartFromCode(n);f=this.getRule(m,i)}return this.pluralRulesCache[u]=f,f}needsPlural(n,i={}){let a=this.getRule(n,i);return a||(a=this.getRule("dev",i)),(a==null?void 0:a.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(n,i,a={}){return this.getSuffixes(n,a).map(l=>`${i}${l}`)}getSuffixes(n,i={}){let a=this.getRule(n,i);return a||(a=this.getRule("dev",i)),a?a.resolvedOptions().pluralCategories.sort((l,u)=>cy[l]-cy[u]).map(l=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${l}`):[]}getSuffix(n,i,a={}){const l=this.getRule(n,a);return l?`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${l.select(i)}`:(this.logger.warn(`no plural rule found for: ${n}`),this.getSuffix("dev",i,a))}}const dy=(t,n,i,a=".",l=!0)=>{let u=hN(t,n,i);return!u&&l&&ce(i)&&(u=Uf(t,i,a),u===void 0&&(u=Uf(n,i,a))),u},mf=t=>t.replace(/\$/g,"$$$$");class wN{constructor(n={}){var i;this.logger=wn.create("interpolator"),this.options=n,this.format=((i=n==null?void 0:n.interpolation)==null?void 0:i.format)||(a=>a),this.init(n)}init(n={}){n.interpolation||(n.interpolation={escapeValue:!0});const{escape:i,escapeValue:a,useRawValueToEscape:l,prefix:u,prefixEscaped:f,suffix:d,suffixEscaped:m,formatSeparator:p,unescapeSuffix:g,unescapePrefix:v,nestingPrefix:b,nestingPrefixEscaped:R,nestingSuffix:N,nestingSuffixEscaped:O,nestingOptionsSeparator:U,maxReplaces:z,alwaysFormat:L}=n.interpolation;this.escape=i!==void 0?i:mN,this.escapeValue=a!==void 0?a:!0,this.useRawValueToEscape=l!==void 0?l:!1,this.prefix=u?Gr(u):f||"{{",this.suffix=d?Gr(d):m||"}}",this.formatSeparator=p||",",this.unescapePrefix=g?"":v||"-",this.unescapeSuffix=this.unescapePrefix?"":g||"",this.nestingPrefix=b?Gr(b):R||Gr("$t("),this.nestingSuffix=N?Gr(N):O||Gr(")"),this.nestingOptionsSeparator=U||",",this.maxReplaces=z||1e3,this.alwaysFormat=L!==void 0?L:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const n=(i,a)=>(i==null?void 0:i.source)===a?(i.lastIndex=0,i):new RegExp(a,"g");this.regexp=n(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=n(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=n(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(n,i,a,l){var R;let u,f,d;const m=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=N=>{if(N.indexOf(this.formatSeparator)<0){const L=dy(i,m,N,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(L,void 0,a,{...l,...i,interpolationkey:N}):L}const O=N.split(this.formatSeparator),U=O.shift().trim(),z=O.join(this.formatSeparator).trim();return this.format(dy(i,m,U,this.options.keySeparator,this.options.ignoreJSONStructure),z,a,{...l,...i,interpolationkey:U})};this.resetRegExp();const g=(l==null?void 0:l.missingInterpolationHandler)||this.options.missingInterpolationHandler,v=((R=l==null?void 0:l.interpolation)==null?void 0:R.skipOnVariables)!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:N=>mf(N)},{regex:this.regexp,safeValue:N=>this.escapeValue?mf(this.escape(N)):mf(N)}].forEach(N=>{for(d=0;u=N.regex.exec(n);){const O=u[1].trim();if(f=p(O),f===void 0)if(typeof g=="function"){const z=g(n,u,l);f=ce(z)?z:""}else if(l&&Object.prototype.hasOwnProperty.call(l,O))f="";else if(v){f=u[0];continue}else this.logger.warn(`missed to pass in variable ${O} for interpolating ${n}`),f="";else!ce(f)&&!this.useRawValueToEscape&&(f=ny(f));const U=N.safeValue(f);if(n=n.replace(u[0],U),v?(N.regex.lastIndex+=f.length,N.regex.lastIndex-=u[0].length):N.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),n}nest(n,i,a={}){let l,u,f;const d=(m,p)=>{const g=this.nestingOptionsSeparator;if(m.indexOf(g)<0)return m;const v=m.split(new RegExp(`${g}[ ]*{`));let b=`{${v[1]}`;m=v[0],b=this.interpolate(b,f);const R=b.match(/'/g),N=b.match(/"/g);(((R==null?void 0:R.length)??0)%2===0&&!N||N.length%2!==0)&&(b=b.replace(/'/g,'"'));try{f=JSON.parse(b),p&&(f={...p,...f})}catch(O){return this.logger.warn(`failed parsing options string in nesting for key ${m}`,O),`${m}${g}${b}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,m};for(;l=this.nestingRegexp.exec(n);){let m=[];f={...a},f=f.replace&&!ce(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;let p=!1;if(l[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(l[1])){const g=l[1].split(this.formatSeparator).map(v=>v.trim());l[1]=g.shift(),m=g,p=!0}if(u=i(d.call(this,l[1].trim(),f),f),u&&l[0]===n&&!ce(u))return u;ce(u)||(u=ny(u)),u||(this.logger.warn(`missed to resolve ${l[1]} for nesting ${n}`),u=""),p&&(u=m.reduce((g,v)=>this.format(g,v,a.lng,{...a,interpolationkey:l[1].trim()}),u.trim())),n=n.replace(l[0],u),this.regexp.lastIndex=0}return n}}const NN=t=>{let n=t.toLowerCase().trim();const i={};if(t.indexOf("(")>-1){const a=t.split("(");n=a[0].toLowerCase().trim();const l=a[1].substring(0,a[1].length-1);n==="currency"&&l.indexOf(":")<0?i.currency||(i.currency=l.trim()):n==="relativetime"&&l.indexOf(":")<0?i.range||(i.range=l.trim()):l.split(";").forEach(f=>{if(f){const[d,...m]=f.split(":"),p=m.join(":").trim().replace(/^'+|'+$/g,""),g=d.trim();i[g]||(i[g]=p),p==="false"&&(i[g]=!1),p==="true"&&(i[g]=!0),isNaN(p)||(i[g]=parseInt(p,10))}})}return{formatName:n,formatOptions:i}},hy=t=>{const n={};return(i,a,l)=>{let u=l;l&&l.interpolationkey&&l.formatParams&&l.formatParams[l.interpolationkey]&&l[l.interpolationkey]&&(u={...u,[l.interpolationkey]:void 0});const f=a+JSON.stringify(u);let d=n[f];return d||(d=t(bs(a),l),n[f]=d),d(i)}},kN=t=>(n,i,a)=>t(bs(i),a)(n);class RN{constructor(n={}){this.logger=wn.create("formatter"),this.options=n,this.init(n)}init(n,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const a=i.cacheInBuiltFormats?hy:kN;this.formats={number:a((l,u)=>{const f=new Intl.NumberFormat(l,{...u});return d=>f.format(d)}),currency:a((l,u)=>{const f=new Intl.NumberFormat(l,{...u,style:"currency"});return d=>f.format(d)}),datetime:a((l,u)=>{const f=new Intl.DateTimeFormat(l,{...u});return d=>f.format(d)}),relativetime:a((l,u)=>{const f=new Intl.RelativeTimeFormat(l,{...u});return d=>f.format(d,u.range||"day")}),list:a((l,u)=>{const f=new Intl.ListFormat(l,{...u});return d=>f.format(d)})}}add(n,i){this.formats[n.toLowerCase().trim()]=i}addCached(n,i){this.formats[n.toLowerCase().trim()]=hy(i)}format(n,i,a,l={}){const u=i.split(this.formatSeparator);if(u.length>1&&u[0].indexOf("(")>1&&u[0].indexOf(")")<0&&u.find(d=>d.indexOf(")")>-1)){const d=u.findIndex(m=>m.indexOf(")")>-1);u[0]=[u[0],...u.splice(1,d)].join(this.formatSeparator)}return u.reduce((d,m)=>{var v;const{formatName:p,formatOptions:g}=NN(m);if(this.formats[p]){let b=d;try{const R=((v=l==null?void 0:l.formatParams)==null?void 0:v[l.interpolationkey])||{},N=R.locale||R.lng||l.locale||l.lng||a;b=this.formats[p](d,N,{...g,...l,...R})}catch(R){this.logger.warn(R)}return b}else this.logger.warn(`there was no format function for ${p}`);return d},n)}}const EN=(t,n)=>{t.pending[n]!==void 0&&(delete t.pending[n],t.pendingCount--)};class AN extends zo{constructor(n,i,a,l={}){var u,f;super(),this.backend=n,this.store=i,this.services=a,this.languageUtils=a.languageUtils,this.options=l,this.logger=wn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=l.maxParallelReads||10,this.readingCalls=0,this.maxRetries=l.maxRetries>=0?l.maxRetries:5,this.retryTimeout=l.retryTimeout>=1?l.retryTimeout:350,this.state={},this.queue=[],(f=(u=this.backend)==null?void 0:u.init)==null||f.call(u,a,l.backend,l)}queueLoad(n,i,a,l){const u={},f={},d={},m={};return n.forEach(p=>{let g=!0;i.forEach(v=>{const b=`${p}|${v}`;!a.reload&&this.store.hasResourceBundle(p,v)?this.state[b]=2:this.state[b]<0||(this.state[b]===1?f[b]===void 0&&(f[b]=!0):(this.state[b]=1,g=!1,f[b]===void 0&&(f[b]=!0),u[b]===void 0&&(u[b]=!0),m[v]===void 0&&(m[v]=!0)))}),g||(d[p]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:l}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(m)}}loaded(n,i,a){const l=n.split("|"),u=l[0],f=l[1];i&&this.emit("failedLoading",u,f,i),!i&&a&&this.store.addResourceBundle(u,f,a,void 0,void 0,{skipCopy:!0}),this.state[n]=i?-1:2,i&&a&&(this.state[n]=0);const d={};this.queue.forEach(m=>{dN(m.loaded,[u],f),EN(m,n),i&&m.errors.push(i),m.pendingCount===0&&!m.done&&(Object.keys(m.loaded).forEach(p=>{d[p]||(d[p]={});const g=m.loaded[p];g.length&&g.forEach(v=>{d[p][v]===void 0&&(d[p][v]=!0)})}),m.done=!0,m.errors.length?m.callback(m.errors):m.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(m=>!m.done)}read(n,i,a,l=0,u=this.retryTimeout,f){if(!n.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:i,fcName:a,tried:l,wait:u,callback:f});return}this.readingCalls++;const d=(p,g)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(p&&g&&l<this.maxRetries){setTimeout(()=>{this.read.call(this,n,i,a,l+1,u*2,f)},u);return}f(p,g)},m=this.backend[a].bind(this.backend);if(m.length===2){try{const p=m(n,i);p&&typeof p.then=="function"?p.then(g=>d(null,g)).catch(d):d(null,p)}catch(p){d(p)}return}return m(n,i,d)}prepareLoading(n,i,a={},l){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();ce(n)&&(n=this.languageUtils.toResolveHierarchy(n)),ce(i)&&(i=[i]);const u=this.queueLoad(n,i,a,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(f=>{this.loadOne(f)})}load(n,i,a){this.prepareLoading(n,i,{},a)}reload(n,i,a){this.prepareLoading(n,i,{reload:!0},a)}loadOne(n,i=""){const a=n.split("|"),l=a[0],u=a[1];this.read(l,u,"read",void 0,void 0,(f,d)=>{f&&this.logger.warn(`${i}loading namespace ${u} for language ${l} failed`,f),!f&&d&&this.logger.log(`${i}loaded namespace ${u} for language ${l}`,d),this.loaded(n,f,d)})}saveMissing(n,i,a,l,u,f={},d=()=>{}){var m,p,g,v,b;if((p=(m=this.services)==null?void 0:m.utils)!=null&&p.hasLoadedNamespace&&!((v=(g=this.services)==null?void 0:g.utils)!=null&&v.hasLoadedNamespace(i))){this.logger.warn(`did not save key "${a}" as the namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if((b=this.backend)!=null&&b.create){const R={...f,isUpdate:u},N=this.backend.create.bind(this.backend);if(N.length<6)try{let O;N.length===5?O=N(n,i,a,l,R):O=N(n,i,a,l),O&&typeof O.then=="function"?O.then(U=>d(null,U)).catch(d):d(null,O)}catch(O){d(O)}else N(n,i,a,l,d,R)}!n||!n[0]||this.store.addResource(n[0],i,a,l)}}}const py=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let n={};if(typeof t[1]=="object"&&(n=t[1]),ce(t[1])&&(n.defaultValue=t[1]),ce(t[2])&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const i=t[3]||t[2];Object.keys(i).forEach(a=>{n[a]=i[a]})}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),my=t=>{var n,i;return ce(t.ns)&&(t.ns=[t.ns]),ce(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),ce(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),((i=(n=t.supportedLngs)==null?void 0:n.indexOf)==null?void 0:i.call(n,"cimode"))<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t},no=()=>{},$N=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(i=>{typeof t[i]=="function"&&(t[i]=t[i].bind(t))})};class xs extends zo{constructor(n={},i){if(super(),this.options=my(n),this.services={},this.logger=wn,this.modules={external:[]},$N(this),i&&!this.isInitialized&&!n.isClone){if(!this.options.initAsync)return this.init(n,i),this;setTimeout(()=>{this.init(n,i)},0)}}init(n={},i){this.isInitializing=!0,typeof n=="function"&&(i=n,n={}),n.defaultNS==null&&n.ns&&(ce(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const a=py();this.options={...a,...this.options,...my(n)},this.options.interpolation={...a.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const l=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?wn.init(l(this.modules.logger),this.options):wn.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=RN;const g=new uy(this.options);this.store=new sy(this.options.resources,this.options);const v=this.services;v.logger=wn,v.resourceStore=this.store,v.languageUtils=g,v.pluralResolver=new SN(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),p&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(v.formatter=l(p),v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new wN(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new AN(l(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",(b,...R)=>{this.emit(b,...R)}),this.modules.languageDetector&&(v.languageDetector=l(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=l(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new So(this.services,this.options),this.translator.on("*",(b,...R)=>{this.emit(b,...R)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,i||(i=no),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[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(p=>{this[p]=(...g)=>this.store[p](...g)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=(...g)=>(this.store[p](...g),this)});const d=os(),m=()=>{const p=(g,v)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(v),i(g,v)};if(this.languages&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initAsync?m():setTimeout(m,0),d}loadResources(n,i=no){var u,f;let a=i;const l=ce(n)?n:this.language;if(typeof n=="function"&&(a=n),!this.options.resources||this.options.partialBundledLanguages){if((l==null?void 0:l.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return a();const d=[],m=p=>{if(!p||p==="cimode")return;this.services.languageUtils.toResolveHierarchy(p).forEach(v=>{v!=="cimode"&&d.indexOf(v)<0&&d.push(v)})};l?m(l):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(g=>m(g)),(f=(u=this.options.preload)==null?void 0:u.forEach)==null||f.call(u,p=>m(p)),this.services.backendConnector.load(d,this.options.ns,p=>{!p&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),a(p)})}else a(null)}reloadResources(n,i,a){const l=os();return typeof n=="function"&&(a=n,n=void 0),typeof i=="function"&&(a=i,i=void 0),n||(n=this.languages),i||(i=this.options.ns),a||(a=no),this.services.backendConnector.reload(n,i,u=>{l.resolve(),a(u)}),l}use(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&Fv.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}setResolvedLanguage(n){if(!(!n||!this.languages)&&!(["cimode","dev"].indexOf(n)>-1)){for(let i=0;i<this.languages.length;i++){const a=this.languages[i];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}!this.resolvedLanguage&&this.languages.indexOf(n)<0&&this.store.hasLanguageSomeTranslations(n)&&(this.resolvedLanguage=n,this.languages.unshift(n))}}changeLanguage(n,i){this.isLanguageChangingTo=n;const a=os();this.emit("languageChanging",n);const l=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},u=(d,m)=>{m?this.isLanguageChangingTo===n&&(l(m),this.translator.changeLanguage(m),this.isLanguageChangingTo=void 0,this.emit("languageChanged",m),this.logger.log("languageChanged",m)):this.isLanguageChangingTo=void 0,a.resolve((...p)=>this.t(...p)),i&&i(d,(...p)=>this.t(...p))},f=d=>{var g,v;!n&&!d&&this.services.languageDetector&&(d=[]);const m=ce(d)?d:d&&d[0],p=this.store.hasLanguageSomeTranslations(m)?m:this.services.languageUtils.getBestMatchFromCodes(ce(d)?[d]:d);p&&(this.language||l(p),this.translator.language||this.translator.changeLanguage(p),(v=(g=this.services.languageDetector)==null?void 0:g.cacheUserLanguage)==null||v.call(g,p)),this.loadResources(p,b=>{u(b,p)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(n),a}getFixedT(n,i,a){const l=(u,f,...d)=>{let m;typeof f!="object"?m=this.options.overloadTranslationOptionHandler([u,f].concat(d)):m={...f},m.lng=m.lng||l.lng,m.lngs=m.lngs||l.lngs,m.ns=m.ns||l.ns,m.keyPrefix!==""&&(m.keyPrefix=m.keyPrefix||a||l.keyPrefix);const p=this.options.keySeparator||".";let g;return m.keyPrefix&&Array.isArray(u)?g=u.map(v=>`${m.keyPrefix}${p}${v}`):g=m.keyPrefix?`${m.keyPrefix}${p}${u}`:u,this.t(g,m)};return ce(n)?l.lng=n:l.lngs=n,l.ns=i,l.keyPrefix=a,l}t(...n){var i;return(i=this.translator)==null?void 0:i.translate(...n)}exists(...n){var i;return(i=this.translator)==null?void 0:i.exists(...n)}setDefaultNamespace(n){this.options.defaultNS=n}hasLoadedNamespace(n,i={}){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 a=i.lng||this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;const f=(d,m)=>{const p=this.services.backendConnector.state[`${d}|${m}`];return p===-1||p===0||p===2};if(i.precheck){const d=i.precheck(this,f);if(d!==void 0)return d}return!!(this.hasResourceBundle(a,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(a,n)&&(!l||f(u,n)))}loadNamespaces(n,i){const a=os();return this.options.ns?(ce(n)&&(n=[n]),n.forEach(l=>{this.options.ns.indexOf(l)<0&&this.options.ns.push(l)}),this.loadResources(l=>{a.resolve(),i&&i(l)}),a):(i&&i(),Promise.resolve())}loadLanguages(n,i){const a=os();ce(n)&&(n=[n]);const l=this.options.preload||[],u=n.filter(f=>l.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return u.length?(this.options.preload=l.concat(u),this.loadResources(f=>{a.resolve(),i&&i(f)}),a):(i&&i(),Promise.resolve())}dir(n){var l,u;if(n||(n=this.resolvedLanguage||(((l=this.languages)==null?void 0:l.length)>0?this.languages[0]:this.language)),!n)return"rtl";const i=["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"],a=((u=this.services)==null?void 0:u.languageUtils)||new uy(py());return i.indexOf(a.getLanguagePartFromCode(n))>-1||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(n={},i){return new xs(n,i)}cloneInstance(n={},i=no){const a=n.forkResourceStore;a&&delete n.forkResourceStore;const l={...this.options,...n,isClone:!0},u=new xs(l);if((n.debug!==void 0||n.prefix!==void 0)&&(u.logger=u.logger.clone(n)),["store","services","language"].forEach(d=>{u[d]=this[d]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},a){const d=Object.keys(this.store.data).reduce((m,p)=>(m[p]={...this.store.data[p]},m[p]=Object.keys(m[p]).reduce((g,v)=>(g[v]={...m[p][v]},g),m[p]),m),{});u.store=new sy(d,l),u.services.resourceStore=u.store}return u.translator=new So(u.services,l),u.translator.on("*",(d,...m)=>{u.emit(d,...m)}),u.init(l,i),u.translator.options=l,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const bt=xs.createInstance();bt.createInstance=xs.createInstance;bt.createInstance;bt.dir;bt.init;bt.loadResources;bt.reloadResources;bt.use;bt.changeLanguage;bt.getFixedT;bt.t;bt.exists;bt.setDefaultNamespace;bt.hasLoadedNamespace;bt.loadNamespaces;bt.loadLanguages;var gf={exports:{}},me={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react.production.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,17 @@ var A0=Object.defineProperty;var O0=(i,n,r)=>n in i?A0(i,n,{enumerable:!0,config
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Dp;function W0(){if(Dp)return oe;Dp=1;var i=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.iterator;function S(R){return R===null||typeof R!="object"?null:(R=x&&R[x]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,z={};function B(R,$,Z){this.props=R,this.context=$,this.refs=z,this.updater=Z||C}B.prototype.isReactComponent={},B.prototype.setState=function(R,$){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,$,"setState")},B.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function U(){}U.prototype=B.prototype;function D(R,$,Z){this.props=R,this.context=$,this.refs=z,this.updater=Z||C}var G=D.prototype=new U;G.constructor=D,E(G,B.prototype),G.isPureReactComponent=!0;var J=Array.isArray,K={H:null,A:null,T:null,S:null,V:null},ue=Object.prototype.hasOwnProperty;function re(R,$,Z,Q,I,me){return Z=me.ref,{$$typeof:i,type:R,key:$,ref:Z!==void 0?Z:null,props:me}}function ee(R,$){return re(R.type,$,void 0,void 0,void 0,R.props)}function F(R){return typeof R=="object"&&R!==null&&R.$$typeof===i}function ne(R){var $={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(Z){return $[Z]})}var pe=/\/+/g;function Ke(R,$){return typeof R=="object"&&R!==null&&R.key!=null?ne(""+R.key):$.toString(36)}function Xe(){}function Ge(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(Xe,Xe):(R.status="pending",R.then(function($){R.status==="pending"&&(R.status="fulfilled",R.value=$)},function($){R.status==="pending"&&(R.status="rejected",R.reason=$)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function Ye(R,$,Z,Q,I){var me=typeof R;(me==="undefined"||me==="boolean")&&(R=null);var se=!1;if(R===null)se=!0;else switch(me){case"bigint":case"string":case"number":se=!0;break;case"object":switch(R.$$typeof){case i:case n:se=!0;break;case v:return se=R._init,Ye(se(R._payload),$,Z,Q,I)}}if(se)return I=I(R),se=Q===""?"."+Ke(R,0):Q,J(I)?(Z="",se!=null&&(Z=se.replace(pe,"$&/")+"/"),Ye(I,$,Z,"",function(ya){return ya})):I!=null&&(F(I)&&(I=ee(I,Z+(I.key==null||R&&R.key===I.key?"":(""+I.key).replace(pe,"$&/")+"/")+se)),$.push(I)),1;se=0;var gt=Q===""?".":Q+":";if(J(R))for(var ze=0;ze<R.length;ze++)Q=R[ze],me=gt+Ke(Q,ze),se+=Ye(Q,$,Z,me,I);else if(ze=S(R),typeof ze=="function")for(R=ze.call(R),ze=0;!(Q=R.next()).done;)Q=Q.value,me=gt+Ke(Q,ze++),se+=Ye(Q,$,Z,me,I);else if(me==="object"){if(typeof R.then=="function")return Ye(Ge(R),$,Z,Q,I);throw $=String(R),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return se}function _(R,$,Z){if(R==null)return R;var Q=[],I=0;return Ye(R,Q,"","",function(me){return $.call(Z,me,I++)}),Q}function Y(R){if(R._status===-1){var $=R._result;$=$(),$.then(function(Z){(R._status===0||R._status===-1)&&(R._status=1,R._result=Z)},function(Z){(R._status===0||R._status===-1)&&(R._status=2,R._result=Z)}),R._status===-1&&(R._status=0,R._result=$)}if(R._status===1)return R._result.default;throw R._result}var W=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)};function ye(){}return oe.Children={map:_,forEach:function(R,$,Z){_(R,function(){$.apply(this,arguments)},Z)},count:function(R){var $=0;return _(R,function(){$++}),$},toArray:function(R){return _(R,function($){return $})||[]},only:function(R){if(!F(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},oe.Component=B,oe.Fragment=r,oe.Profiler=o,oe.PureComponent=D,oe.StrictMode=s,oe.Suspense=m,oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,oe.__COMPILER_RUNTIME={__proto__:null,c:function(R){return K.H.useMemoCache(R)}},oe.cache=function(R){return function(){return R.apply(null,arguments)}},oe.cloneElement=function(R,$,Z){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var Q=E({},R.props),I=R.key,me=void 0;if($!=null)for(se in $.ref!==void 0&&(me=void 0),$.key!==void 0&&(I=""+$.key),$)!ue.call($,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&$.ref===void 0||(Q[se]=$[se]);var se=arguments.length-2;if(se===1)Q.children=Z;else if(1<se){for(var gt=Array(se),ze=0;ze<se;ze++)gt[ze]=arguments[ze+2];Q.children=gt}return re(R.type,I,void 0,void 0,me,Q)},oe.createContext=function(R){return R={$$typeof:p,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:f,_context:R},R},oe.createElement=function(R,$,Z){var Q,I={},me=null;if($!=null)for(Q in $.key!==void 0&&(me=""+$.key),$)ue.call($,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(I[Q]=$[Q]);var se=arguments.length-2;if(se===1)I.children=Z;else if(1<se){for(var gt=Array(se),ze=0;ze<se;ze++)gt[ze]=arguments[ze+2];I.children=gt}if(R&&R.defaultProps)for(Q in se=R.defaultProps,se)I[Q]===void 0&&(I[Q]=se[Q]);return re(R,me,void 0,void 0,null,I)},oe.createRef=function(){return{current:null}},oe.forwardRef=function(R){return{$$typeof:h,render:R}},oe.isValidElement=F,oe.lazy=function(R){return{$$typeof:v,_payload:{_status:-1,_result:R},_init:Y}},oe.memo=function(R,$){return{$$typeof:d,type:R,compare:$===void 0?null:$}},oe.startTransition=function(R){var $=K.T,Z={};K.T=Z;try{var Q=R(),I=K.S;I!==null&&I(Z,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(ye,W)}catch(me){W(me)}finally{K.T=$}},oe.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},oe.use=function(R){return K.H.use(R)},oe.useActionState=function(R,$,Z){return K.H.useActionState(R,$,Z)},oe.useCallback=function(R,$){return K.H.useCallback(R,$)},oe.useContext=function(R){return K.H.useContext(R)},oe.useDebugValue=function(){},oe.useDeferredValue=function(R,$){return K.H.useDeferredValue(R,$)},oe.useEffect=function(R,$,Z){var Q=K.H;if(typeof Z=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Q.useEffect(R,$)},oe.useId=function(){return K.H.useId()},oe.useImperativeHandle=function(R,$,Z){return K.H.useImperativeHandle(R,$,Z)},oe.useInsertionEffect=function(R,$){return K.H.useInsertionEffect(R,$)},oe.useLayoutEffect=function(R,$){return K.H.useLayoutEffect(R,$)},oe.useMemo=function(R,$){return K.H.useMemo(R,$)},oe.useOptimistic=function(R,$){return K.H.useOptimistic(R,$)},oe.useReducer=function(R,$,Z){return K.H.useReducer(R,$,Z)},oe.useRef=function(R){return K.H.useRef(R)},oe.useState=function(R){return K.H.useState(R)},oe.useSyncExternalStore=function(R,$,Z){return K.H.useSyncExternalStore(R,$,Z)},oe.useTransition=function(){return K.H.useTransition()},oe.version="19.1.0",oe}var _p;function Fo(){return _p||(_p=1,wo.exports=W0()),wo.exports}var T=Fo();const Bo=rm(T),I0=(i,n,r,s)=>{var f,p,h,m;const o=[r,{code:n,...s||{}}];if((p=(f=i==null?void 0:i.services)==null?void 0:f.logger)!=null&&p.forward)return i.services.logger.forward(o,"warn","react-i18next::",!0);fn(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),(m=(h=i==null?void 0:i.services)==null?void 0:h.logger)!=null&&m.warn?i.services.logger.warn(...o):console!=null&&console.warn&&console.warn(...o)},Mp={},Ho=(i,n,r,s)=>{fn(r)&&Mp[r]||(fn(r)&&(Mp[r]=new Date),I0(i,n,r,s))},om=(i,n)=>()=>{if(i.isInitialized)n();else{const r=()=>{setTimeout(()=>{i.off("initialized",r)},0),n()};i.on("initialized",r)}},Vo=(i,n,r)=>{i.loadNamespaces(n,om(i,r))},Up=(i,n,r,s)=>{if(fn(r)&&(r=[r]),i.options.preload&&i.options.preload.indexOf(n)>-1)return Vo(i,r,s);r.forEach(o=>{i.options.ns.indexOf(o)<0&&i.options.ns.push(o)}),i.loadLanguages(n,om(i,s))},eb=(i,n,r={})=>!n.languages||!n.languages.length?(Ho(n,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:n.languages}),!0):n.hasLoadedNamespace(i,{lng:r.lng,precheck:(s,o)=>{var f;if(((f=r.bindI18n)==null?void 0:f.indexOf("languageChanging"))>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!o(s.isLanguageChangingTo,i))return!1}}),fn=i=>typeof i=="string",tb=i=>typeof i=="object"&&i!==null,ab=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,nb={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},lb=i=>nb[i],ib=i=>i.replace(ab,lb);let $o={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ib};const rb=(i={})=>{$o={...$o,...i}},sb=()=>$o;let cm;const ub=i=>{cm=i},ob=()=>cm,cb={type:"3rdParty",init(i){rb(i.options.react),ub(i)}},fb=T.createContext();class db{constructor(){this.usedNamespaces={}}addUsedNamespaces(n){n.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const hb=(i,n)=>{const r=T.useRef();return T.useEffect(()=>{r.current=i},[i,n]),r.current},fm=(i,n,r,s)=>i.getFixedT(n,r,s),pb=(i,n,r,s)=>T.useCallback(fm(i,n,r,s),[i,n,r,s]),ot=(i,n={})=>{var J,K,ue,re;const{i18n:r}=n,{i18n:s,defaultNS:o}=T.useContext(fb)||{},f=r||s||ob();if(f&&!f.reportNamespaces&&(f.reportNamespaces=new db),!f){Ho(f,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const ee=(ne,pe)=>fn(pe)?pe:tb(pe)&&fn(pe.defaultValue)?pe.defaultValue:Array.isArray(ne)?ne[ne.length-1]:ne,F=[ee,{},!1];return F.t=ee,F.i18n={},F.ready=!1,F}(J=f.options.react)!=null&&J.wait&&Ho(f,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const p={...sb(),...f.options.react,...n},{useSuspense:h,keyPrefix:m}=p;let d=o||((K=f.options)==null?void 0:K.defaultNS);d=fn(d)?[d]:d||["translation"],(re=(ue=f.reportNamespaces).addUsedNamespaces)==null||re.call(ue,d);const v=(f.isInitialized||f.initializedStoreOnce)&&d.every(ee=>eb(ee,f,p)),x=pb(f,n.lng||null,p.nsMode==="fallback"?d:d[0],m),S=()=>x,C=()=>fm(f,n.lng||null,p.nsMode==="fallback"?d:d[0],m),[E,z]=T.useState(S);let B=d.join();n.lng&&(B=`${n.lng}${B}`);const U=hb(B),D=T.useRef(!0);T.useEffect(()=>{const{bindI18n:ee,bindI18nStore:F}=p;D.current=!0,!v&&!h&&(n.lng?Up(f,n.lng,d,()=>{D.current&&z(C)}):Vo(f,d,()=>{D.current&&z(C)})),v&&U&&U!==B&&D.current&&z(C);const ne=()=>{D.current&&z(C)};return ee&&(f==null||f.on(ee,ne)),F&&(f==null||f.store.on(F,ne)),()=>{D.current=!1,f&&(ee==null||ee.split(" ").forEach(pe=>f.off(pe,ne))),F&&f&&F.split(" ").forEach(pe=>f.store.off(pe,ne))}},[f,B]),T.useEffect(()=>{D.current&&v&&z(S)},[f,m,v]);const G=[E,f,v];if(G.t=E,G.i18n=f,G.ready=v,v||!v&&!h)return G;throw new Promise(ee=>{n.lng?Up(f,n.lng,d,()=>ee()):Vo(f,d,()=>ee())})},mb="ParoiCMS Site Generator",gb="<p>Describe here the data structure of your website: what types of pages it has and in which sections. In a page type, it is also possible to describe lists of sub-parts.</p><p>Supported languages: English, French.</p>",vb="Create a website about… It will include a blog section, a list of pages, and a dedicated section about… that itself contains the following sub-sections: … The home page should contain an image carousel and a list of subparts, each containing an image and a text.",yb="Add a new text field to the page…",bb="Modify the Site Schema",Sb="Create a Site Schema",xb="Generate the website",Nb="Generate site with sample data (recommended)",Eb="Generate an empty site",Rb="Open the admin-ui",Tb="Open the site",wb="Generated Schema",Cb="Tree View",jb="Site Schema",Ab="Node Types",Ob="Labels",kb="Select language",Lb="Explanations",zb="Current Activity",Db="An error occurred: {{ message }}",_b="An error occurred",Mb="Start Again",Ub="Step {{stepNumber}}: {{kind}}",Bb="This step is in progress…",Hb="This step failed.",Vb="This step had no effect.",$b="No session data available",qb="Step not found",Gb="Welcome to ParoiCMS Site Generator",Yb="Close and start again",Qb="Reset Schema",Zb="unknown error",Kb="Create New Site",Xb="Generating your site…",Jb="The site is generated",Fb="Email:",Pb="Password:",Wb="I agree",Ib="You are about to generate your website.",eS="Cancel",tS="Confirm",aS="Site URL:",nS="Admin URL:",lS="Copy all information to clipboard",iS="<p>Welcome to the ParoiCMS Site Generator tool. This tool helps you create a new website with just a few steps.</p><p>To get started, please verify you're human by completing the CAPTCHA below.</p>",rS="Initial Schema Creation",sS="Schema Update",uS="Site Generation",oS={initial1:"Analyzing your request for site structure…",initial2:"Choosing from predefined fields…",updating1:"Analyzing your update request…",updating2:"Updating schema structure with changes…",generatingSite:"Building your website…",generatingContent:"Creating sample content for your site…"},cS="Login Email",fS="Login Password",dS="Generated Site",hS="Your session has expired. Please refresh the page to start a new session.",pS="Failed to submit your prompt. Please try again.",mS="Failed to generate the site. Please try again.",gS='The source code of this generator is available <a href="https://gitlab.com/paroi/opensource/paroicms/-/tree/main/plugins/site-generator-plugin?ref_type=heads" target="_blank">on GitLab</a> — <a href="https://www.paroicms.org/en" target="_blank">ParoiCMS</a> — Contact me <a href="https://paroi.tech/en" target="_blank">here</a>.',vS="Extend your session",yS="Failed to refresh your session. Please try again.",bS="Error connecting to server. Please check your connection and try again.",SS="Tip: If you want to start over, open the generator in a new tab and close this one.",xS={title:mb,startInstruction:gb,createPromptPlaceholder:vb,updatePromptPlaceholder:yb,modifySchema:bb,createSchema:Sb,generateTheWebsite:xb,generateSiteWithData:Nb,generateEmptySite:Eb,administration:Rb,viewSite:Tb,generatedSchema:wb,treeView:Cb,siteSchema:jb,nodeTypes:Ab,labels:Ob,languageSelector:kb,explanation:Lb,currentActivity:zb,errorOccurred:Db,unknownErrorOccurred:_b,startAgain:Mb,stepTitle:Ub,stepPending:Bb,stepFailed:Hb,stepNoEffect:Vb,noSessionData:$b,stepNotFound:qb,welcomeTitle:Gb,reset:Yb,resetSchema:Qb,unknownError:Zb,createNewSite:Kb,generatingSite:Xb,siteGenerated:Jb,email:Fb,password:Pb,agree:Wb,aboutToGenerateWebsite:Ib,cancel:eS,confirm:tS,siteUrl:aS,adminUrl:nS,copyToClipboard:lS,introduction:iS,initialSchema:rS,updateSchema:sS,generateSite:uS,activity:oS,loginEmail:cS,loginPassword:fS,generatedSite:dS,sessionExpired:hS,promptSubmissionFailed:pS,generationFailed:mS,footerText:gS,extendYourSession:vS,sessionRenewalFailed:yS,errorConnectingToServer:bS,newTabRestartMessage:SS},NS="ParoiCMS - Générateur de Site",ES="<p>Décrivez ici la structure des données de votre site web : quels types de pages, dans quelles rubriques. Il est également possible de décrire des listes de sous-parties de pages.</p><p>Langages autorisés : Français, Anglais.</p>",RS="Génère un site web à propos de… Il contiendra une rubrique blog, une liste de pages, une rubrique dédiée à… contenant elle-même les sous-rubriques suivantes : … La page d'accueil doit contenir un carrousel d'images, et une liste de sous-parties contenant chacune une image et un texte.",TS="Ajoute un nouveau champ texte à la page…",wS="Modifier le schéma du site",CS="Créer un schéma de site",jS="Générer le site web",AS="Générer le site avec des données d'exemple (recommandé)",OS="Générer un site vide",kS="Ouvrir l'espace d'administration du site",LS="Ouvrir le site",zS="Schéma généré",DS="Arborescence",_S="Schéma du site",MS="Types de nœuds",US="Libellés",BS="Sélectionner la langue",HS="Explications",VS="Activité en cours",$S="Une erreur est survenue : {{ message }}",qS="Une erreur est survenue",GS="Recommencer",YS="Étape {{stepNumber}} : {{kind}}",QS="Cette étape est en cours…",ZS="Cette étape a échoué.",KS="Cette étape n'a eu aucun effet.",XS="Données de session non disponibles",JS="Étape introuvable",FS="Bienvenue sur le générateur de site ParoiCMS",PS="Fermer et réinitialiser",WS="Réinitialiser le schéma",IS="erreur inconnue",ex="Créer un nouveau site",tx="Génération de votre site…",ax="Le site est généré",nx="Email :",lx="Mot de passe :",ix="J'accepte",rx="Vous êtes sur le point de générer votre site web.",sx="Annuler",ux="Confirmer",ox="URL du site :",cx="URL d'admin :",fx="Copier toutes les informations dans le presse-papier",dx="<p>Bienvenue sur l'outil de génération de site ParoiCMS. Cet outil vous aide à créer un nouveau site web en quelques étapes.</p><p>Pour commencer, veuillez vérifier que vous êtes humain en complétant le CAPTCHA ci-dessous.</p>",hx="Création du schéma initial",px="Mise à jour du schéma",mx="Génération du site",gx={initial1:"Analyse de votre demande pour la structure du site…",initial2:"Choix parmi les champs prédéfinis…",updating1:"Analyse de votre demande de mise à jour…",updating2:"Mise à jour de la structure du schéma…",generatingSite:"Construction de votre site web…",generatingContent:"Création de contenu exemple pour votre site…"},vx="Email de connexion",yx="Mot de passe",bx="Site généré",Sx="Votre session a expiré. Veuillez rafraîchir la page pour démarrer une nouvelle session.",xx="Échec de l'envoi de votre demande. Veuillez réessayer.",Nx="Échec de la génération du site. Veuillez réessayer.",Ex='Le code source de ce générateur est disponible <a href="https://gitlab.com/paroi/opensource/paroicms/-/tree/main/plugins/site-generator-plugin?ref_type=heads" target="_blank">sur GitLab</a> — <a href="https://www.paroicms.org/fr" target="_blank">ParoiCMS</a> — Contactez-moi <a href="https://paroi.tech/fr" target="_blank">ici</a>.',Rx="Prolonger votre session",Tx="Échec du renouvellement de votre session. Veuillez réessayer.",wx="Erreur de connexion au serveur. Veuillez vérifier votre connexion et réessayer.",Cx="Astuce : si vous souhaitez repartir de zéro, ouvrez le générateur dans un nouvel onglet et fermez celui-ci.",jx={title:NS,startInstruction:ES,createPromptPlaceholder:RS,updatePromptPlaceholder:TS,modifySchema:wS,createSchema:CS,generateTheWebsite:jS,generateSiteWithData:AS,generateEmptySite:OS,administration:kS,viewSite:LS,generatedSchema:zS,treeView:DS,siteSchema:_S,nodeTypes:MS,labels:US,languageSelector:BS,explanation:HS,currentActivity:VS,errorOccurred:$S,unknownErrorOccurred:qS,startAgain:GS,stepTitle:YS,stepPending:QS,stepFailed:ZS,stepNoEffect:KS,noSessionData:XS,stepNotFound:JS,welcomeTitle:FS,reset:PS,resetSchema:WS,unknownError:IS,createNewSite:ex,generatingSite:tx,siteGenerated:ax,email:nx,password:lx,agree:ix,aboutToGenerateWebsite:rx,cancel:sx,confirm:ux,siteUrl:ox,adminUrl:cx,copyToClipboard:fx,introduction:dx,initialSchema:hx,updateSchema:px,generateSite:mx,activity:gx,loginEmail:vx,loginPassword:yx,generatedSite:bx,sessionExpired:Sx,promptSubmissionFailed:xx,generationFailed:Nx,footerText:Ex,extendYourSession:Rx,sessionRenewalFailed:Tx,errorConnectingToServer:wx,newTabRestartMessage:Cx},Ax=`<p>Welcome!</p>
|
|
17
|
+
*/var gy;function CN(){if(gy)return me;gy=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.iterator;function b(E){return E===null||typeof E!="object"?null:(E=v&&E[v]||E["@@iterator"],typeof E=="function"?E:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,O={};function U(E,V,Q){this.props=E,this.context=V,this.refs=O,this.updater=Q||R}U.prototype.isReactComponent={},U.prototype.setState=function(E,V){if(typeof E!="object"&&typeof E!="function"&&E!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,E,V,"setState")},U.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function z(){}z.prototype=U.prototype;function L(E,V,Q){this.props=E,this.context=V,this.refs=O,this.updater=Q||R}var G=L.prototype=new z;G.constructor=L,N(G,U.prototype),G.isPureReactComponent=!0;var X=Array.isArray,F={H:null,A:null,T:null,S:null,V:null},pe=Object.prototype.hasOwnProperty;function fe(E,V,Q,I,ie,Se){return Q=Se.ref,{$$typeof:t,type:E,key:V,ref:Q!==void 0?Q:null,props:Se}}function re(E,V){return fe(E.type,V,void 0,void 0,void 0,E.props)}function ee(E){return typeof E=="object"&&E!==null&&E.$$typeof===t}function oe(E){var V={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(Q){return V[Q]})}var xe=/\/+/g;function ot(E,V){return typeof E=="object"&&E!==null&&E.key!=null?oe(""+E.key):V.toString(36)}function ut(){}function it(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(ut,ut):(E.status="pending",E.then(function(V){E.status==="pending"&&(E.status="fulfilled",E.value=V)},function(V){E.status==="pending"&&(E.status="rejected",E.reason=V)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function rt(E,V,Q,I,ie){var Se=typeof E;(Se==="undefined"||Se==="boolean")&&(E=null);var he=!1;if(E===null)he=!0;else switch(Se){case"bigint":case"string":case"number":he=!0;break;case"object":switch(E.$$typeof){case t:case n:he=!0;break;case g:return he=E._init,rt(he(E._payload),V,Q,I,ie)}}if(he)return ie=ie(E),he=I===""?"."+ot(E,0):I,X(ie)?(Q="",he!=null&&(Q=he.replace(xe,"$&/")+"/"),rt(ie,V,Q,"",function(Fn){return Fn})):ie!=null&&(ee(ie)&&(ie=re(ie,Q+(ie.key==null||E&&E.key===ie.key?"":(""+ie.key).replace(xe,"$&/")+"/")+he)),V.push(ie)),1;he=0;var Ut=I===""?".":I+":";if(X(E))for(var Ge=0;Ge<E.length;Ge++)I=E[Ge],Se=Ut+ot(I,Ge),he+=rt(I,V,Q,Se,ie);else if(Ge=b(E),typeof Ge=="function")for(E=Ge.call(E),Ge=0;!(I=E.next()).done;)I=I.value,Se=Ut+ot(I,Ge++),he+=rt(I,V,Q,Se,ie);else if(Se==="object"){if(typeof E.then=="function")return rt(it(E),V,Q,I,ie);throw V=String(E),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return he}function B(E,V,Q){if(E==null)return E;var I=[],ie=0;return rt(E,I,"","",function(Se){return V.call(Q,Se,ie++)}),I}function Y(E){if(E._status===-1){var V=E._result;V=V(),V.then(function(Q){(E._status===0||E._status===-1)&&(E._status=1,E._result=Q)},function(Q){(E._status===0||E._status===-1)&&(E._status=2,E._result=Q)}),E._status===-1&&(E._status=0,E._result=V)}if(E._status===1)return E._result.default;throw E._result}var ne=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof E=="object"&&E!==null&&typeof E.message=="string"?String(E.message):String(E),error:E});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)};function ke(){}return me.Children={map:B,forEach:function(E,V,Q){B(E,function(){V.apply(this,arguments)},Q)},count:function(E){var V=0;return B(E,function(){V++}),V},toArray:function(E){return B(E,function(V){return V})||[]},only:function(E){if(!ee(E))throw Error("React.Children.only expected to receive a single React element child.");return E}},me.Component=U,me.Fragment=i,me.Profiler=l,me.PureComponent=L,me.StrictMode=a,me.Suspense=m,me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,me.__COMPILER_RUNTIME={__proto__:null,c:function(E){return F.H.useMemoCache(E)}},me.cache=function(E){return function(){return E.apply(null,arguments)}},me.cloneElement=function(E,V,Q){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var I=N({},E.props),ie=E.key,Se=void 0;if(V!=null)for(he in V.ref!==void 0&&(Se=void 0),V.key!==void 0&&(ie=""+V.key),V)!pe.call(V,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&V.ref===void 0||(I[he]=V[he]);var he=arguments.length-2;if(he===1)I.children=Q;else if(1<he){for(var Ut=Array(he),Ge=0;Ge<he;Ge++)Ut[Ge]=arguments[Ge+2];I.children=Ut}return fe(E.type,ie,void 0,void 0,Se,I)},me.createContext=function(E){return E={$$typeof:f,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:u,_context:E},E},me.createElement=function(E,V,Q){var I,ie={},Se=null;if(V!=null)for(I in V.key!==void 0&&(Se=""+V.key),V)pe.call(V,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ie[I]=V[I]);var he=arguments.length-2;if(he===1)ie.children=Q;else if(1<he){for(var Ut=Array(he),Ge=0;Ge<he;Ge++)Ut[Ge]=arguments[Ge+2];ie.children=Ut}if(E&&E.defaultProps)for(I in he=E.defaultProps,he)ie[I]===void 0&&(ie[I]=he[I]);return fe(E,Se,void 0,void 0,null,ie)},me.createRef=function(){return{current:null}},me.forwardRef=function(E){return{$$typeof:d,render:E}},me.isValidElement=ee,me.lazy=function(E){return{$$typeof:g,_payload:{_status:-1,_result:E},_init:Y}},me.memo=function(E,V){return{$$typeof:p,type:E,compare:V===void 0?null:V}},me.startTransition=function(E){var V=F.T,Q={};F.T=Q;try{var I=E(),ie=F.S;ie!==null&&ie(Q,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(ke,ne)}catch(Se){ne(Se)}finally{F.T=V}},me.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},me.use=function(E){return F.H.use(E)},me.useActionState=function(E,V,Q){return F.H.useActionState(E,V,Q)},me.useCallback=function(E,V){return F.H.useCallback(E,V)},me.useContext=function(E){return F.H.useContext(E)},me.useDebugValue=function(){},me.useDeferredValue=function(E,V){return F.H.useDeferredValue(E,V)},me.useEffect=function(E,V,Q){var I=F.H;if(typeof Q=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return I.useEffect(E,V)},me.useId=function(){return F.H.useId()},me.useImperativeHandle=function(E,V,Q){return F.H.useImperativeHandle(E,V,Q)},me.useInsertionEffect=function(E,V){return F.H.useInsertionEffect(E,V)},me.useLayoutEffect=function(E,V){return F.H.useLayoutEffect(E,V)},me.useMemo=function(E,V){return F.H.useMemo(E,V)},me.useOptimistic=function(E,V){return F.H.useOptimistic(E,V)},me.useReducer=function(E,V,Q){return F.H.useReducer(E,V,Q)},me.useRef=function(E){return F.H.useRef(E)},me.useState=function(E){return F.H.useState(E)},me.useSyncExternalStore=function(E,V,Q){return F.H.useSyncExternalStore(E,V,Q)},me.useTransition=function(){return F.H.useTransition()},me.version="19.1.0",me}var yy;function md(){return yy||(yy=1,gf.exports=CN()),gf.exports}var A=md();const Bf=Zv(A),TN=(t,n,i,a)=>{var u,f,d,m;const l=[i,{code:n,...a||{}}];if((f=(u=t==null?void 0:t.services)==null?void 0:u.logger)!=null&&f.forward)return t.services.logger.forward(l,"warn","react-i18next::",!0);Qi(l[0])&&(l[0]=`react-i18next:: ${l[0]}`),(m=(d=t==null?void 0:t.services)==null?void 0:d.logger)!=null&&m.warn?t.services.logger.warn(...l):console!=null&&console.warn&&console.warn(...l)},vy={},_f=(t,n,i,a)=>{Qi(i)&&vy[i]||(Qi(i)&&(vy[i]=new Date),TN(t,n,i,a))},Xv=(t,n)=>()=>{if(t.isInitialized)n();else{const i=()=>{setTimeout(()=>{t.off("initialized",i)},0),n()};t.on("initialized",i)}},qf=(t,n,i)=>{t.loadNamespaces(n,Xv(t,i))},by=(t,n,i,a)=>{if(Qi(i)&&(i=[i]),t.options.preload&&t.options.preload.indexOf(n)>-1)return qf(t,i,a);i.forEach(l=>{t.options.ns.indexOf(l)<0&&t.options.ns.push(l)}),t.loadLanguages(n,Xv(t,a))},ON=(t,n,i={})=>!n.languages||!n.languages.length?(_f(n,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:n.languages}),!0):n.hasLoadedNamespace(t,{lng:i.lng,precheck:(a,l)=>{var u;if(((u=i.bindI18n)==null?void 0:u.indexOf("languageChanging"))>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!l(a.isLanguageChangingTo,t))return!1}}),Qi=t=>typeof t=="string",jN=t=>typeof t=="object"&&t!==null,DN=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,MN={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},LN=t=>MN[t],zN=t=>t.replace(DN,LN);let Kf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:zN};const UN=(t={})=>{Kf={...Kf,...t}},BN=()=>Kf;let Pv;const _N=t=>{Pv=t},qN=()=>Pv,KN={type:"3rdParty",init(t){UN(t.options.react),_N(t)}},VN=A.createContext();class HN{constructor(){this.usedNamespaces={}}addUsedNamespaces(n){n.forEach(i=>{this.usedNamespaces[i]||(this.usedNamespaces[i]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const GN=(t,n)=>{const i=A.useRef();return A.useEffect(()=>{i.current=t},[t,n]),i.current},Wv=(t,n,i,a)=>t.getFixedT(n,i,a),JN=(t,n,i,a)=>A.useCallback(Wv(t,n,i,a),[t,n,i,a]),Ct=(t,n={})=>{var X,F,pe,fe;const{i18n:i}=n,{i18n:a,defaultNS:l}=A.useContext(VN)||{},u=i||a||qN();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new HN),!u){_f(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const re=(oe,xe)=>Qi(xe)?xe:jN(xe)&&Qi(xe.defaultValue)?xe.defaultValue:Array.isArray(oe)?oe[oe.length-1]:oe,ee=[re,{},!1];return ee.t=re,ee.i18n={},ee.ready=!1,ee}(X=u.options.react)!=null&&X.wait&&_f(u,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const f={...BN(),...u.options.react,...n},{useSuspense:d,keyPrefix:m}=f;let p=l||((F=u.options)==null?void 0:F.defaultNS);p=Qi(p)?[p]:p||["translation"],(fe=(pe=u.reportNamespaces).addUsedNamespaces)==null||fe.call(pe,p);const g=(u.isInitialized||u.initializedStoreOnce)&&p.every(re=>ON(re,u,f)),v=JN(u,n.lng||null,f.nsMode==="fallback"?p:p[0],m),b=()=>v,R=()=>Wv(u,n.lng||null,f.nsMode==="fallback"?p:p[0],m),[N,O]=A.useState(b);let U=p.join();n.lng&&(U=`${n.lng}${U}`);const z=GN(U),L=A.useRef(!0);A.useEffect(()=>{const{bindI18n:re,bindI18nStore:ee}=f;L.current=!0,!g&&!d&&(n.lng?by(u,n.lng,p,()=>{L.current&&O(R)}):qf(u,p,()=>{L.current&&O(R)})),g&&z&&z!==U&&L.current&&O(R);const oe=()=>{L.current&&O(R)};return re&&(u==null||u.on(re,oe)),ee&&(u==null||u.store.on(ee,oe)),()=>{L.current=!1,u&&(re==null||re.split(" ").forEach(xe=>u.off(xe,oe))),ee&&u&&ee.split(" ").forEach(xe=>u.store.off(xe,oe))}},[u,U]),A.useEffect(()=>{L.current&&g&&O(b)},[u,m,g]);const G=[N,u,g];if(G.t=N,G.i18n=u,G.ready=g,g||!g&&!d)return G;throw new Promise(re=>{n.lng?by(u,n.lng,p,()=>re()):qf(u,p,()=>re())})},YN="ParoiCMS Site Generator",IN="<p>Describe here the data structure of your website: what types of pages it has and in which sections. In a page type, it is also possible to describe lists of sub-parts.</p><p>Supported languages: English, French.</p>",ZN="Create a website about… It will include a blog section, a list of pages, and a dedicated section about… that itself contains the following sub-sections: … The home page should contain an image carousel and a list of subparts, each containing an image and a text.",QN="Add a new text field to the page…",FN="Modify the Site Schema",XN="Create a Site Schema",PN="Generate the website",WN="Generate site with sample data (recommended)",ek="Generate an empty site",tk="Open the admin-ui",nk="Open the site",ik="Generated Schema",rk="Tree View",ak="Site Schema",sk="Node Types",lk="Labels",ok="Select language",uk="Explanations",ck="Current Activity",fk="An error occurred: {{ message }}",dk="An error occurred",hk="Start Again",pk="Step {{stepNumber}}: {{kind}}",mk="This step is in progress…",gk="This step failed.",yk="This step had no effect.",vk="No session data available",bk="Step not found",xk="Welcome to ParoiCMS Site Generator",Sk="Close and start again",wk="Reset Schema",Nk="unknown error",kk="Create New Site",Rk="Generating your site…",Ek="The site is generated",Ak="Email:",$k="Password:",Ck="I agree",Tk="You are about to generate your website.",Ok="Cancel",jk="Confirm",Dk="Site URL:",Mk="Admin URL:",Lk="Copy all information to clipboard",zk="<p>Welcome to the ParoiCMS Site Generator tool. This tool helps you create a new website with just a few steps.</p><p>To get started, please verify you're human by completing the CAPTCHA below.</p>",Uk="Initial Schema Creation",Bk="Schema Update",_k="Site Generation",qk={initial1:"Analyzing your request for site structure…",initial2:"Choosing from predefined fields…",updating1:"Analyzing your update request…",updating2:"Updating schema structure with changes…",generatingSite:"Building your website…",generatingContent:"Creating sample content for your site…"},Kk="Login Email",Vk="Login Password",Hk="Generated Site",Gk="Your session has expired. Please refresh the page to start a new session.",Jk="Failed to submit your prompt. Please try again.",Yk="Failed to generate the site. Please try again.",Ik='The source code of this generator is available <a href="https://gitlab.com/paroi/opensource/paroicms/-/tree/main/plugins/site-generator-plugin?ref_type=heads" target="_blank">on GitLab</a> — <a href="https://www.paroicms.org/en" target="_blank">ParoiCMS</a> — Contact me <a href="https://paroi.tech/en" target="_blank">here</a>.',Zk="Extend your session",Qk="Failed to refresh your session. Please try again.",Fk="Error connecting to server. Please check your connection and try again.",Xk="Tip: If you want to start over, open the generator in a new tab and close this one.",Pk={title:YN,startInstruction:IN,createPromptPlaceholder:ZN,updatePromptPlaceholder:QN,modifySchema:FN,createSchema:XN,generateTheWebsite:PN,generateSiteWithData:WN,generateEmptySite:ek,administration:tk,viewSite:nk,generatedSchema:ik,treeView:rk,siteSchema:ak,nodeTypes:sk,labels:lk,languageSelector:ok,explanation:uk,currentActivity:ck,errorOccurred:fk,unknownErrorOccurred:dk,startAgain:hk,stepTitle:pk,stepPending:mk,stepFailed:gk,stepNoEffect:yk,noSessionData:vk,stepNotFound:bk,welcomeTitle:xk,reset:Sk,resetSchema:wk,unknownError:Nk,createNewSite:kk,generatingSite:Rk,siteGenerated:Ek,email:Ak,password:$k,agree:Ck,aboutToGenerateWebsite:Tk,cancel:Ok,confirm:jk,siteUrl:Dk,adminUrl:Mk,copyToClipboard:Lk,introduction:zk,initialSchema:Uk,updateSchema:Bk,generateSite:_k,activity:qk,loginEmail:Kk,loginPassword:Vk,generatedSite:Hk,sessionExpired:Gk,promptSubmissionFailed:Jk,generationFailed:Yk,footerText:Ik,extendYourSession:Zk,sessionRenewalFailed:Qk,errorConnectingToServer:Fk,newTabRestartMessage:Xk},Wk="ParoiCMS - Générateur de Site",eR="<p>Décrivez ici la structure des données de votre site web : quels types de pages, dans quelles rubriques. Il est également possible de décrire des listes de sous-parties de pages.</p><p>Langages autorisés : Français, Anglais.</p>",tR="Génère un site web à propos de… Il contiendra une rubrique blog, une liste de pages, une rubrique dédiée à… contenant elle-même les sous-rubriques suivantes : … La page d'accueil doit contenir un carrousel d'images, et une liste de sous-parties contenant chacune une image et un texte.",nR="Ajoute un nouveau champ texte à la page…",iR="Modifier le schéma du site",rR="Créer un schéma de site",aR="Générer le site web",sR="Générer le site avec des données d'exemple (recommandé)",lR="Générer un site vide",oR="Ouvrir l'espace d'administration du site",uR="Ouvrir le site",cR="Schéma généré",fR="Arborescence",dR="Schéma du site",hR="Types de nœuds",pR="Libellés",mR="Sélectionner la langue",gR="Explications",yR="Activité en cours",vR="Une erreur est survenue : {{ message }}",bR="Une erreur est survenue",xR="Recommencer",SR="Étape {{stepNumber}} : {{kind}}",wR="Cette étape est en cours…",NR="Cette étape a échoué.",kR="Cette étape n'a eu aucun effet.",RR="Données de session non disponibles",ER="Étape introuvable",AR="Bienvenue sur le générateur de site ParoiCMS",$R="Fermer et réinitialiser",CR="Réinitialiser le schéma",TR="erreur inconnue",OR="Créer un nouveau site",jR="Génération de votre site…",DR="Le site est généré",MR="Email :",LR="Mot de passe :",zR="J'accepte",UR="Vous êtes sur le point de générer votre site web.",BR="Annuler",_R="Confirmer",qR="URL du site :",KR="URL d'admin :",VR="Copier toutes les informations dans le presse-papier",HR="<p>Bienvenue sur l'outil de génération de site ParoiCMS. Cet outil vous aide à créer un nouveau site web en quelques étapes.</p><p>Pour commencer, veuillez vérifier que vous êtes humain en complétant le CAPTCHA ci-dessous.</p>",GR="Création du schéma initial",JR="Mise à jour du schéma",YR="Génération du site",IR={initial1:"Analyse de votre demande pour la structure du site…",initial2:"Choix parmi les champs prédéfinis…",updating1:"Analyse de votre demande de mise à jour…",updating2:"Mise à jour de la structure du schéma…",generatingSite:"Construction de votre site web…",generatingContent:"Création de contenu exemple pour votre site…"},ZR="Email de connexion",QR="Mot de passe",FR="Site généré",XR="Votre session a expiré. Veuillez rafraîchir la page pour démarrer une nouvelle session.",PR="Échec de l'envoi de votre demande. Veuillez réessayer.",WR="Échec de la génération du site. Veuillez réessayer.",eE='Le code source de ce générateur est disponible <a href="https://gitlab.com/paroi/opensource/paroicms/-/tree/main/plugins/site-generator-plugin?ref_type=heads" target="_blank">sur GitLab</a> — <a href="https://www.paroicms.org/fr" target="_blank">ParoiCMS</a> — Contactez-moi <a href="https://paroi.tech/fr" target="_blank">ici</a>.',tE="Prolonger votre session",nE="Échec du renouvellement de votre session. Veuillez réessayer.",iE="Erreur de connexion au serveur. Veuillez vérifier votre connexion et réessayer.",rE="Astuce : si vous souhaitez repartir de zéro, ouvrez le générateur dans un nouvel onglet et fermez celui-ci.",aE={title:Wk,startInstruction:eR,createPromptPlaceholder:tR,updatePromptPlaceholder:nR,modifySchema:iR,createSchema:rR,generateTheWebsite:aR,generateSiteWithData:sR,generateEmptySite:lR,administration:oR,viewSite:uR,generatedSchema:cR,treeView:fR,siteSchema:dR,nodeTypes:hR,labels:pR,languageSelector:mR,explanation:gR,currentActivity:yR,errorOccurred:vR,unknownErrorOccurred:bR,startAgain:xR,stepTitle:SR,stepPending:wR,stepFailed:NR,stepNoEffect:kR,noSessionData:RR,stepNotFound:ER,welcomeTitle:AR,reset:$R,resetSchema:CR,unknownError:TR,createNewSite:OR,generatingSite:jR,siteGenerated:DR,email:MR,password:LR,agree:zR,aboutToGenerateWebsite:UR,cancel:BR,confirm:_R,siteUrl:qR,adminUrl:KR,copyToClipboard:VR,introduction:HR,initialSchema:GR,updateSchema:JR,generateSite:YR,activity:IR,loginEmail:ZR,loginPassword:QR,generatedSite:FR,sessionExpired:XR,promptSubmissionFailed:PR,generationFailed:WR,footerText:eE,extendYourSession:tE,sessionRenewalFailed:nE,errorConnectingToServer:iE,newTabRestartMessage:rE},sE=`<p>Welcome!</p>
|
|
18
18
|
<p>ParoiCMS is a CMS for showcase websites. Its core feature is that you define the structure of your website. This tool will help you to do it.</p>
|
|
19
|
-
<p>A session identifier will follow you on the tab of your browser, it will be deleted when you close the tab. However, your session data may be retained for debugging purposes.</p>`,
|
|
19
|
+
<p>A session identifier will follow you on the tab of your browser, it will be deleted when you close the tab. However, your session data may be retained for debugging purposes.</p>`,lE=`<p>Bienvenue !</p>
|
|
20
20
|
<p>ParoiCMS est un CMS pour sites vitrines. Sa fonctionnalité principale est que vous définissez la structure de votre site web. Le générateur vous aidera dans cette tâche.</p>
|
|
21
|
-
<p>Un identifiant de session vous suivra dans l'onglet de votre navigateur, il sera supprimé lorsque vous fermerez l'onglet. Mais vos données de session pourront être conservées à des fins de débogage.</p>`,
|
|
21
|
+
<p>Un identifiant de session vous suivra dans l'onglet de votre navigateur, il sera supprimé lorsque vous fermerez l'onglet. Mais vos données de session pourront être conservées à des fins de débogage.</p>`,oE=`<p>Congratulations! Your website has been generated. Now you can authenticate on the admin-ui (using the <strong>local account</strong>) and play with it.</p>
|
|
22
22
|
<p>Notice that it will be deleted in 48 hours. However, if you want to keep it, then <strong>make a backup</strong>. <em>Each backup is a zip file that contains a full Node.js project, ready to be installed and executed in a local environment.</em></p>
|
|
23
23
|
<p>An unattractive theme has been generated. Its purpose is to demonstrate how to write templates for your data structure.</p>
|
|
24
|
-
<p>Make sure to copy the information below, as it will be lost once you close this tab.</p>`,
|
|
24
|
+
<p>Make sure to copy the information below, as it will be lost once you close this tab.</p>`,uE=`<p>Félicitations ! Votre site web a été généré. Vous pouvez maintenant vous authentifier sur le admin-ui (en utilisant le <strong>compte local</strong>) et l'explorer.</p>
|
|
25
25
|
<p>Notez qu'il sera supprimé dans 48 heures. Cependant, si vous souhaitez le conserver, alors <strong>faites une sauvegarde</strong>. <em>Chaque sauvegarde est un fichier zip qui contient un projet Node.js complet, prêt à être installé et exécuté dans un environnement local.</em></p>
|
|
26
26
|
<p>Un thème tout moche a été généré. Son but est de montrer comment écrire des templates pour votre structure de données.</p>
|
|
27
|
-
<p>Assurez-vous de copier les informations ci-dessous, car elles seront perdues une fois que vous fermerez cet onglet.</p>`,
|
|
27
|
+
<p>Assurez-vous de copier les informations ci-dessous, car elles seront perdues une fois que vous fermerez cet onglet.</p>`,cE={en:{translation:{...Pk,introduction:sE,userManual:oE}},fr:{translation:{...aE,introduction:lE,userManual:uE}}};bt.use(KN).init({resources:cE,lng:navigator.language.split("-")[0],fallbackLng:"en",interpolation:{escapeValue:!1}});var yf={exports:{}},us={},vf={exports:{}},bf={};/**
|
|
28
28
|
* @license React
|
|
29
29
|
* scheduler.production.js
|
|
30
30
|
*
|
|
@@ -32,7 +32,7 @@ var A0=Object.defineProperty;var O0=(i,n,r)=>n in i?A0(i,n,{enumerable:!0,config
|
|
|
32
32
|
*
|
|
33
33
|
* This source code is licensed under the MIT license found in the
|
|
34
34
|
* LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/var
|
|
35
|
+
*/var xy;function fE(){return xy||(xy=1,function(t){function n(B,Y){var ne=B.length;B.push(Y);e:for(;0<ne;){var ke=ne-1>>>1,E=B[ke];if(0<l(E,Y))B[ke]=Y,B[ne]=E,ne=ke;else break e}}function i(B){return B.length===0?null:B[0]}function a(B){if(B.length===0)return null;var Y=B[0],ne=B.pop();if(ne!==Y){B[0]=ne;e:for(var ke=0,E=B.length,V=E>>>1;ke<V;){var Q=2*(ke+1)-1,I=B[Q],ie=Q+1,Se=B[ie];if(0>l(I,ne))ie<E&&0>l(Se,I)?(B[ke]=Se,B[ie]=ne,ke=ie):(B[ke]=I,B[Q]=ne,ke=Q);else if(ie<E&&0>l(Se,ne))B[ke]=Se,B[ie]=ne,ke=ie;else break e}}return Y}function l(B,Y){var ne=B.sortIndex-Y.sortIndex;return ne!==0?ne:B.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var f=Date,d=f.now();t.unstable_now=function(){return f.now()-d}}var m=[],p=[],g=1,v=null,b=3,R=!1,N=!1,O=!1,U=!1,z=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function X(B){for(var Y=i(p);Y!==null;){if(Y.callback===null)a(p);else if(Y.startTime<=B)a(p),Y.sortIndex=Y.expirationTime,n(m,Y);else break;Y=i(p)}}function F(B){if(O=!1,X(B),!N)if(i(m)!==null)N=!0,pe||(pe=!0,ot());else{var Y=i(p);Y!==null&&rt(F,Y.startTime-B)}}var pe=!1,fe=-1,re=5,ee=-1;function oe(){return U?!0:!(t.unstable_now()-ee<re)}function xe(){if(U=!1,pe){var B=t.unstable_now();ee=B;var Y=!0;try{e:{N=!1,O&&(O=!1,L(fe),fe=-1),R=!0;var ne=b;try{t:{for(X(B),v=i(m);v!==null&&!(v.expirationTime>B&&oe());){var ke=v.callback;if(typeof ke=="function"){v.callback=null,b=v.priorityLevel;var E=ke(v.expirationTime<=B);if(B=t.unstable_now(),typeof E=="function"){v.callback=E,X(B),Y=!0;break t}v===i(m)&&a(m),X(B)}else a(m);v=i(m)}if(v!==null)Y=!0;else{var V=i(p);V!==null&&rt(F,V.startTime-B),Y=!1}}break e}finally{v=null,b=ne,R=!1}Y=void 0}}finally{Y?ot():pe=!1}}}var ot;if(typeof G=="function")ot=function(){G(xe)};else if(typeof MessageChannel<"u"){var ut=new MessageChannel,it=ut.port2;ut.port1.onmessage=xe,ot=function(){it.postMessage(null)}}else ot=function(){z(xe,0)};function rt(B,Y){fe=z(function(){B(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(B){B.callback=null},t.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<B?Math.floor(1e3/B):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(B){switch(b){case 1:case 2:case 3:var Y=3;break;default:Y=b}var ne=b;b=Y;try{return B()}finally{b=ne}},t.unstable_requestPaint=function(){U=!0},t.unstable_runWithPriority=function(B,Y){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ne=b;b=B;try{return Y()}finally{b=ne}},t.unstable_scheduleCallback=function(B,Y,ne){var ke=t.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?ke+ne:ke):ne=ke,B){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=ne+E,B={id:g++,callback:Y,priorityLevel:B,startTime:ne,expirationTime:E,sortIndex:-1},ne>ke?(B.sortIndex=ne,n(p,B),i(m)===null&&B===i(p)&&(O?(L(fe),fe=-1):O=!0,rt(F,ne-ke))):(B.sortIndex=E,n(m,B),N||R||(N=!0,pe||(pe=!0,ot()))),B},t.unstable_shouldYield=oe,t.unstable_wrapCallback=function(B){var Y=b;return function(){var ne=b;b=Y;try{return B.apply(this,arguments)}finally{b=ne}}}}(bf)),bf}var Sy;function dE(){return Sy||(Sy=1,vf.exports=fE()),vf.exports}var xf={exports:{}},wt={};/**
|
|
36
36
|
* @license React
|
|
37
37
|
* react-dom.production.js
|
|
38
38
|
*
|
|
@@ -40,7 +40,7 @@ var A0=Object.defineProperty;var O0=(i,n,r)=>n in i?A0(i,n,{enumerable:!0,config
|
|
|
40
40
|
*
|
|
41
41
|
* This source code is licensed under the MIT license found in the
|
|
42
42
|
* LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/var
|
|
43
|
+
*/var wy;function hE(){if(wy)return wt;wy=1;var t=md();function n(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},l=Symbol.for("react.portal");function u(m,p,g){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:v==null?null:""+v,children:m,containerInfo:p,implementation:g}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,wt.createPortal=function(m,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(n(299));return u(m,p,null,g)},wt.flushSync=function(m){var p=f.T,g=a.p;try{if(f.T=null,a.p=2,m)return m()}finally{f.T=p,a.p=g,a.d.f()}},wt.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(m,p))},wt.prefetchDNS=function(m){typeof m=="string"&&a.d.D(m)},wt.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var g=p.as,v=d(g,p.crossOrigin),b=typeof p.integrity=="string"?p.integrity:void 0,R=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?a.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:b,fetchPriority:R}):g==="script"&&a.d.X(m,{crossOrigin:v,integrity:b,fetchPriority:R,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},wt.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=d(p.as,p.crossOrigin);a.d.M(m,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(m)},wt.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,v=d(g,p.crossOrigin);a.d.L(m,g,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},wt.preloadModule=function(m,p){if(typeof m=="string")if(p){var g=d(p.as,p.crossOrigin);a.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(m)},wt.requestFormReset=function(m){a.d.r(m)},wt.unstable_batchedUpdates=function(m,p){return m(p)},wt.useFormState=function(m,p,g){return f.H.useFormState(m,p,g)},wt.useFormStatus=function(){return f.H.useHostTransitionStatus()},wt.version="19.1.0",wt}var Ny;function pE(){if(Ny)return xf.exports;Ny=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),xf.exports=hE(),xf.exports}/**
|
|
44
44
|
* @license React
|
|
45
45
|
* react-dom-client.production.js
|
|
46
46
|
*
|
|
@@ -48,75 +48,119 @@ var A0=Object.defineProperty;var O0=(i,n,r)=>n in i?A0(i,n,{enumerable:!0,config
|
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the MIT license found in the
|
|
50
50
|
* LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/var qp;function Bx(){if(qp)return si;qp=1;var i=_x(),n=Fo(),r=Ux();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function p(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(f(e)!==e)throw Error(s(188))}function m(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(s(188));return t!==e?null:e}for(var a=e,l=t;;){var u=a.return;if(u===null)break;var c=u.alternate;if(c===null){if(l=u.return,l!==null){a=l;continue}break}if(u.child===c.child){for(c=u.child;c;){if(c===a)return h(u),e;if(c===l)return h(u),t;c=c.sibling}throw Error(s(188))}if(a.return!==l.return)a=u,l=c;else{for(var g=!1,y=u.child;y;){if(y===a){g=!0,a=u,l=c;break}if(y===l){g=!0,l=u,a=c;break}y=y.sibling}if(!g){for(y=c.child;y;){if(y===a){g=!0,a=c,l=u;break}if(y===l){g=!0,l=c,a=u;break}y=y.sibling}if(!g)throw Error(s(189))}}if(a.alternate!==l)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),D=Symbol.for("react.consumer"),G=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),re=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),pe=Symbol.iterator;function Ke(e){return e===null||typeof e!="object"?null:(e=pe&&e[pe]||e["@@iterator"],typeof e=="function"?e:null)}var Xe=Symbol.for("react.client.reference");function Ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Xe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case B:return"Profiler";case z:return"StrictMode";case K:return"Suspense";case ue:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case G:return(e.displayName||"Context")+".Provider";case D:return(e._context.displayName||"Context")+".Consumer";case J:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case re:return t=e.displayName||null,t!==null?t:Ge(e.type)||"Memo";case ee:t=e._payload,e=e._init;try{return Ge(e(t))}catch{}}return null}var Ye=Array.isArray,_=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},ye=[],R=-1;function $(e){return{current:e}}function Z(e){0>R||(e.current=ye[R],ye[R]=null,R--)}function Q(e,t){R++,ye[R]=e.current,e.current=t}var I=$(null),me=$(null),se=$(null),gt=$(null);function ze(e,t){switch(Q(se,t),Q(me,e),Q(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zh(t),e=Kh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Z(I),Q(I,e)}function ya(){Z(I),Z(me),Z(se)}function us(e){e.memoizedState!==null&&Q(gt,e);var t=I.current,a=Kh(t,e.type);t!==a&&(Q(me,e),Q(I,a))}function Ei(e){me.current===e&&(Z(I),Z(me)),gt.current===e&&(Z(gt),ei._currentValue=W)}var os=Object.prototype.hasOwnProperty,cs=i.unstable_scheduleCallback,fs=i.unstable_cancelCallback,sv=i.unstable_shouldYield,uv=i.unstable_requestPaint,Qt=i.unstable_now,ov=i.unstable_getCurrentPriorityLevel,Tc=i.unstable_ImmediatePriority,wc=i.unstable_UserBlockingPriority,Ri=i.unstable_NormalPriority,cv=i.unstable_LowPriority,Cc=i.unstable_IdlePriority,fv=i.log,dv=i.unstable_setDisableYieldValue,ul=null,vt=null;function ba(e){if(typeof fv=="function"&&dv(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(ul,e)}catch{}}var yt=Math.clz32?Math.clz32:mv,hv=Math.log,pv=Math.LN2;function mv(e){return e>>>=0,e===0?32:31-(hv(e)/pv|0)|0}var Ti=256,wi=4194304;function Za(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ci(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var u=0,c=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var y=l&134217727;return y!==0?(l=y&~c,l!==0?u=Za(l):(g&=y,g!==0?u=Za(g):a||(a=y&~e,a!==0&&(u=Za(a))))):(y=l&~c,y!==0?u=Za(y):g!==0?u=Za(g):a||(a=l&~e,a!==0&&(u=Za(a)))),u===0?0:t!==0&&t!==u&&(t&c)===0&&(c=u&-u,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:u}function ol(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function gv(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function jc(){var e=Ti;return Ti<<=1,(Ti&4194048)===0&&(Ti=256),e}function Ac(){var e=wi;return wi<<=1,(wi&62914560)===0&&(wi=4194304),e}function ds(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function cl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function vv(e,t,a,l,u,c){var g=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var y=e.entanglements,N=e.expirationTimes,O=e.hiddenUpdates;for(a=g&~a;0<a;){var H=31-yt(a),q=1<<H;y[H]=0,N[H]=-1;var k=O[H];if(k!==null)for(O[H]=null,H=0;H<k.length;H++){var L=k[H];L!==null&&(L.lane&=-536870913)}a&=~q}l!==0&&Oc(e,l,0),c!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=c&~(g&~t))}function Oc(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-yt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&4194090}function kc(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-yt(a),u=1<<l;u&t|e[l]&t&&(e[l]|=t),a&=~u}}function hs(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ps(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Lc(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:dp(e.type))}function yv(e,t){var a=Y.p;try{return Y.p=e,t()}finally{Y.p=a}}var Sa=Math.random().toString(36).slice(2),nt="__reactFiber$"+Sa,ct="__reactProps$"+Sa,vn="__reactContainer$"+Sa,ms="__reactEvents$"+Sa,bv="__reactListeners$"+Sa,Sv="__reactHandles$"+Sa,zc="__reactResources$"+Sa,fl="__reactMarker$"+Sa;function gs(e){delete e[nt],delete e[ct],delete e[ms],delete e[bv],delete e[Sv]}function yn(e){var t=e[nt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[vn]||a[nt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Ph(e);e!==null;){if(a=e[nt])return a;e=Ph(e)}return t}e=a,a=e.parentNode}return null}function bn(e){if(e=e[nt]||e[vn]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function dl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function Sn(e){var t=e[zc];return t||(t=e[zc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Je(e){e[fl]=!0}var Dc=new Set,_c={};function Ka(e,t){xn(e,t),xn(e+"Capture",t)}function xn(e,t){for(_c[e]=t,e=0;e<t.length;e++)Dc.add(t[e])}var xv=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Mc={},Uc={};function Nv(e){return os.call(Uc,e)?!0:os.call(Mc,e)?!1:xv.test(e)?Uc[e]=!0:(Mc[e]=!0,!1)}function ji(e,t,a){if(Nv(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ai(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function It(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}var vs,Bc;function Nn(e){if(vs===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);vs=t&&t[1]||"",Bc=-1<a.stack.indexOf(`
|
|
52
|
-
at`)?" (<anonymous>)":-1<
|
|
53
|
-
`+
|
|
54
|
-
`),
|
|
55
|
-
`);for(
|
|
56
|
-
`+
|
|
57
|
-
Error generating stack: `+
|
|
58
|
-
`+a.stack}}function jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Rv(e){var t=Vc(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var u=a.get,c=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(g){l=""+g,c.call(this,g)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(g){l=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Oi(e){e._valueTracker||(e._valueTracker=Rv(e))}function $c(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Vc(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function ki(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Tv=/[\n"\\]/g;function At(e){return e.replace(Tv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ss(e,t,a,l,u,c,g,y){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?xs(e,g,jt(t)):a!=null?xs(e,g,jt(a)):l!=null&&e.removeAttribute("value"),u==null&&c!=null&&(e.defaultChecked=!!c),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.name=""+jt(y):e.removeAttribute("name")}function qc(e,t,a,l,u,c,g,y){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null))return;a=a!=null?""+jt(a):"",t=t!=null?""+jt(t):a,y||t===e.value||(e.value=t),e.defaultValue=t}l=l??u,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=y?e.checked:!!l,e.defaultChecked=!!l,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g)}function xs(e,t,a){t==="number"&&ki(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function En(e,t,a,l){if(e=e.options,t){t={};for(var u=0;u<a.length;u++)t["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=t.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&l&&(e[a].defaultSelected=!0)}else{for(a=""+jt(a),t=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Gc(e,t,a){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+jt(a):""}function Yc(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(s(92));if(Ye(l)){if(1<l.length)throw Error(s(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=jt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l)}function Rn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var wv=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Qc(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||wv.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Zc(e,t,a){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var u in t)l=t[u],t.hasOwnProperty(u)&&a[u]!==l&&Qc(e,u,l)}else for(var c in t)t.hasOwnProperty(c)&&Qc(e,c,t[c])}function Ns(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Cv=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),jv=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Li(e){return jv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Es=null;function Rs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Tn=null,wn=null;function Kc(e){var t=bn(e);if(t&&(e=t.stateNode)){var a=e[ct]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ss(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+At(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var u=l[ct]||null;if(!u)throw Error(s(90));Ss(l,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&$c(l)}break e;case"textarea":Gc(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&En(e,!!a.multiple,t,!1)}}}var Ts=!1;function Xc(e,t,a){if(Ts)return e(t,a);Ts=!0;try{var l=e(t);return l}finally{if(Ts=!1,(Tn!==null||wn!==null)&&(vr(),Tn&&(t=Tn,e=wn,wn=Tn=null,Kc(t),e)))for(t=0;t<e.length;t++)Kc(e[t])}}function hl(e,t){var a=e.stateNode;if(a===null)return null;var l=a[ct]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(s(231,t,typeof a));return a}var ea=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ws=!1;if(ea)try{var pl={};Object.defineProperty(pl,"passive",{get:function(){ws=!0}}),window.addEventListener("test",pl,pl),window.removeEventListener("test",pl,pl)}catch{ws=!1}var xa=null,Cs=null,zi=null;function Jc(){if(zi)return zi;var e,t=Cs,a=t.length,l,u="value"in xa?xa.value:xa.textContent,c=u.length;for(e=0;e<a&&t[e]===u[e];e++);var g=a-e;for(l=1;l<=g&&t[a-l]===u[c-l];l++);return zi=u.slice(e,1<l?1-l:void 0)}function Di(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function _i(){return!0}function Fc(){return!1}function ft(e){function t(a,l,u,c,g){this._reactName=a,this._targetInst=u,this.type=l,this.nativeEvent=c,this.target=g,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(a=e[y],this[y]=a?a(c):c[y]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?_i:Fc,this.isPropagationStopped=Fc,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=_i)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=_i)},persist:function(){},isPersistent:_i}),t}var Xa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mi=ft(Xa),ml=v({},Xa,{view:0,detail:0}),Av=ft(ml),js,As,gl,Ui=v({},ml,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ks,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==gl&&(gl&&e.type==="mousemove"?(js=e.screenX-gl.screenX,As=e.screenY-gl.screenY):As=js=0,gl=e),js)},movementY:function(e){return"movementY"in e?e.movementY:As}}),Pc=ft(Ui),Ov=v({},Ui,{dataTransfer:0}),kv=ft(Ov),Lv=v({},ml,{relatedTarget:0}),Os=ft(Lv),zv=v({},Xa,{animationName:0,elapsedTime:0,pseudoElement:0}),Dv=ft(zv),_v=v({},Xa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Mv=ft(_v),Uv=v({},Xa,{data:0}),Wc=ft(Uv),Bv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hv={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Vv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $v(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vv[e])?!!t[e]:!1}function ks(){return $v}var qv=v({},ml,{key:function(e){if(e.key){var t=Bv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Di(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Hv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ks,charCode:function(e){return e.type==="keypress"?Di(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Di(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Gv=ft(qv),Yv=v({},Ui,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ic=ft(Yv),Qv=v({},ml,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ks}),Zv=ft(Qv),Kv=v({},Xa,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xv=ft(Kv),Jv=v({},Ui,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Fv=ft(Jv),Pv=v({},Xa,{newState:0,oldState:0}),Wv=ft(Pv),Iv=[9,13,27,32],Ls=ea&&"CompositionEvent"in window,vl=null;ea&&"documentMode"in document&&(vl=document.documentMode);var ey=ea&&"TextEvent"in window&&!vl,ef=ea&&(!Ls||vl&&8<vl&&11>=vl),tf=" ",af=!1;function nf(e,t){switch(e){case"keyup":return Iv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cn=!1;function ty(e,t){switch(e){case"compositionend":return lf(t);case"keypress":return t.which!==32?null:(af=!0,tf);case"textInput":return e=t.data,e===tf&&af?null:e;default:return null}}function ay(e,t){if(Cn)return e==="compositionend"||!Ls&&nf(e,t)?(e=Jc(),zi=Cs=xa=null,Cn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ef&&t.locale!=="ko"?null:t.data;default:return null}}var ny={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function rf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ny[e.type]:t==="textarea"}function sf(e,t,a,l){Tn?wn?wn.push(l):wn=[l]:Tn=l,t=Er(t,"onChange"),0<t.length&&(a=new Mi("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var yl=null,bl=null;function ly(e){$h(e,0)}function Bi(e){var t=dl(e);if($c(t))return e}function uf(e,t){if(e==="change")return t}var of=!1;if(ea){var zs;if(ea){var Ds="oninput"in document;if(!Ds){var cf=document.createElement("div");cf.setAttribute("oninput","return;"),Ds=typeof cf.oninput=="function"}zs=Ds}else zs=!1;of=zs&&(!document.documentMode||9<document.documentMode)}function ff(){yl&&(yl.detachEvent("onpropertychange",df),bl=yl=null)}function df(e){if(e.propertyName==="value"&&Bi(bl)){var t=[];sf(t,bl,e,Rs(e)),Xc(ly,t)}}function iy(e,t,a){e==="focusin"?(ff(),yl=t,bl=a,yl.attachEvent("onpropertychange",df)):e==="focusout"&&ff()}function ry(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bi(bl)}function sy(e,t){if(e==="click")return Bi(t)}function uy(e,t){if(e==="input"||e==="change")return Bi(t)}function oy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bt=typeof Object.is=="function"?Object.is:oy;function Sl(e,t){if(bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var u=a[l];if(!os.call(t,u)||!bt(e[u],t[u]))return!1}return!0}function hf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pf(e,t){var a=hf(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=hf(a)}}function mf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ki(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=ki(e.document)}return t}function _s(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var cy=ea&&"documentMode"in document&&11>=document.documentMode,jn=null,Ms=null,xl=null,Us=!1;function vf(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Us||jn==null||jn!==ki(l)||(l=jn,"selectionStart"in l&&_s(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),xl&&Sl(xl,l)||(xl=l,l=Er(Ms,"onSelect"),0<l.length&&(t=new Mi("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=jn)))}function Ja(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var An={animationend:Ja("Animation","AnimationEnd"),animationiteration:Ja("Animation","AnimationIteration"),animationstart:Ja("Animation","AnimationStart"),transitionrun:Ja("Transition","TransitionRun"),transitionstart:Ja("Transition","TransitionStart"),transitioncancel:Ja("Transition","TransitionCancel"),transitionend:Ja("Transition","TransitionEnd")},Bs={},yf={};ea&&(yf=document.createElement("div").style,"AnimationEvent"in window||(delete An.animationend.animation,delete An.animationiteration.animation,delete An.animationstart.animation),"TransitionEvent"in window||delete An.transitionend.transition);function Fa(e){if(Bs[e])return Bs[e];if(!An[e])return e;var t=An[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in yf)return Bs[e]=t[a];return e}var bf=Fa("animationend"),Sf=Fa("animationiteration"),xf=Fa("animationstart"),fy=Fa("transitionrun"),dy=Fa("transitionstart"),hy=Fa("transitioncancel"),Nf=Fa("transitionend"),Ef=new Map,Hs="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Hs.push("scrollEnd");function Ht(e,t){Ef.set(e,t),Ka(t,[e])}var Rf=new WeakMap;function Ot(e,t){if(typeof e=="object"&&e!==null){var a=Rf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Hc(t)},Rf.set(e,t),t)}return{value:e,source:t,stack:Hc(t)}}var kt=[],On=0,Vs=0;function Hi(){for(var e=On,t=Vs=On=0;t<e;){var a=kt[t];kt[t++]=null;var l=kt[t];kt[t++]=null;var u=kt[t];kt[t++]=null;var c=kt[t];if(kt[t++]=null,l!==null&&u!==null){var g=l.pending;g===null?u.next=u:(u.next=g.next,g.next=u),l.pending=u}c!==0&&Tf(a,u,c)}}function Vi(e,t,a,l){kt[On++]=e,kt[On++]=t,kt[On++]=a,kt[On++]=l,Vs|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function $s(e,t,a,l){return Vi(e,t,a,l),$i(e)}function kn(e,t){return Vi(e,null,null,t),$i(e)}function Tf(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var u=!1,c=e.return;c!==null;)c.childLanes|=a,l=c.alternate,l!==null&&(l.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(u=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,u&&t!==null&&(u=31-yt(a),e=c.hiddenUpdates,l=e[u],l===null?e[u]=[t]:l.push(t),t.lane=a|536870912),c):null}function $i(e){if(50<Zl)throw Zl=0,Ku=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ln={};function py(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function St(e,t,a,l){return new py(e,t,a,l)}function qs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ta(e,t){var a=e.alternate;return a===null?(a=St(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function wf(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function qi(e,t,a,l,u,c){var g=0;if(l=e,typeof e=="function")qs(e)&&(g=1);else if(typeof e=="string")g=g0(e,a,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case F:return e=St(31,a,t,u),e.elementType=F,e.lanes=c,e;case E:return Pa(a.children,u,c,t);case z:g=8,u|=24;break;case B:return e=St(12,a,t,u|2),e.elementType=B,e.lanes=c,e;case K:return e=St(13,a,t,u),e.elementType=K,e.lanes=c,e;case ue:return e=St(19,a,t,u),e.elementType=ue,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case U:case G:g=10;break e;case D:g=9;break e;case J:g=11;break e;case re:g=14;break e;case ee:g=16,l=null;break e}g=29,a=Error(s(130,e===null?"null":typeof e,"")),l=null}return t=St(g,a,t,u),t.elementType=e,t.type=l,t.lanes=c,t}function Pa(e,t,a,l){return e=St(7,e,l,t),e.lanes=a,e}function Gs(e,t,a){return e=St(6,e,null,t),e.lanes=a,e}function Ys(e,t,a){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zn=[],Dn=0,Gi=null,Yi=0,Lt=[],zt=0,Wa=null,aa=1,na="";function Ia(e,t){zn[Dn++]=Yi,zn[Dn++]=Gi,Gi=e,Yi=t}function Cf(e,t,a){Lt[zt++]=aa,Lt[zt++]=na,Lt[zt++]=Wa,Wa=e;var l=aa;e=na;var u=32-yt(l)-1;l&=~(1<<u),a+=1;var c=32-yt(t)+u;if(30<c){var g=u-u%5;c=(l&(1<<g)-1).toString(32),l>>=g,u-=g,aa=1<<32-yt(t)+u|a<<u|l,na=c+e}else aa=1<<c|a<<u|l,na=e}function Qs(e){e.return!==null&&(Ia(e,1),Cf(e,1,0))}function Zs(e){for(;e===Gi;)Gi=zn[--Dn],zn[Dn]=null,Yi=zn[--Dn],zn[Dn]=null;for(;e===Wa;)Wa=Lt[--zt],Lt[zt]=null,na=Lt[--zt],Lt[zt]=null,aa=Lt[--zt],Lt[zt]=null}var st=null,Ue=null,Se=!1,en=null,Zt=!1,Ks=Error(s(519));function tn(e){var t=Error(s(418,""));throw Rl(Ot(t,e)),Ks}function jf(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[nt]=e,t[ct]=l,a){case"dialog":he("cancel",t),he("close",t);break;case"iframe":case"object":case"embed":he("load",t);break;case"video":case"audio":for(a=0;a<Xl.length;a++)he(Xl[a],t);break;case"source":he("error",t);break;case"img":case"image":case"link":he("error",t),he("load",t);break;case"details":he("toggle",t);break;case"input":he("invalid",t),qc(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),Oi(t);break;case"select":he("invalid",t);break;case"textarea":he("invalid",t),Yc(t,l.value,l.defaultValue,l.children),Oi(t)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Qh(t.textContent,a)?(l.popover!=null&&(he("beforetoggle",t),he("toggle",t)),l.onScroll!=null&&he("scroll",t),l.onScrollEnd!=null&&he("scrollend",t),l.onClick!=null&&(t.onclick=Rr),t=!0):t=!1,t||tn(e)}function Af(e){for(st=e.return;st;)switch(st.tag){case 5:case 13:Zt=!1;return;case 27:case 3:Zt=!0;return;default:st=st.return}}function Nl(e){if(e!==st)return!1;if(!Se)return Af(e),Se=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||oo(e.type,e.memoizedProps)),a=!a),a&&Ue&&tn(e),Af(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){Ue=$t(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}Ue=null}}else t===27?(t=Ue,Ua(e.type)?(e=po,po=null,Ue=e):Ue=t):Ue=st?$t(e.stateNode.nextSibling):null;return!0}function El(){Ue=st=null,Se=!1}function Of(){var e=en;return e!==null&&(pt===null?pt=e:pt.push.apply(pt,e),en=null),e}function Rl(e){en===null?en=[e]:en.push(e)}var Xs=$(null),an=null,la=null;function Na(e,t,a){Q(Xs,t._currentValue),t._currentValue=a}function ia(e){e._currentValue=Xs.current,Z(Xs)}function Js(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Fs(e,t,a,l){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var c=u.dependencies;if(c!==null){var g=u.child;c=c.firstContext;e:for(;c!==null;){var y=c;c=u;for(var N=0;N<t.length;N++)if(y.context===t[N]){c.lanes|=a,y=c.alternate,y!==null&&(y.lanes|=a),Js(c.return,a,e),l||(g=null);break e}c=y.next}}else if(u.tag===18){if(g=u.return,g===null)throw Error(s(341));g.lanes|=a,c=g.alternate,c!==null&&(c.lanes|=a),Js(g,a,e),g=null}else g=u.child;if(g!==null)g.return=u;else for(g=u;g!==null;){if(g===e){g=null;break}if(u=g.sibling,u!==null){u.return=g.return,g=u;break}g=g.return}u=g}}function Tl(e,t,a,l){e=null;for(var u=t,c=!1;u!==null;){if(!c){if((u.flags&524288)!==0)c=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var g=u.alternate;if(g===null)throw Error(s(387));if(g=g.memoizedProps,g!==null){var y=u.type;bt(u.pendingProps.value,g.value)||(e!==null?e.push(y):e=[y])}}else if(u===gt.current){if(g=u.alternate,g===null)throw Error(s(387));g.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(ei):e=[ei])}u=u.return}e!==null&&Fs(t,e,a,l),t.flags|=262144}function Qi(e){for(e=e.firstContext;e!==null;){if(!bt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function nn(e){an=e,la=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function lt(e){return kf(an,e)}function Zi(e,t){return an===null&&nn(e),kf(e,t)}function kf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},la===null){if(e===null)throw Error(s(308));la=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else la=la.next=t;return a}var my=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},gy=i.unstable_scheduleCallback,vy=i.unstable_NormalPriority,Qe={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ps(){return{controller:new my,data:new Map,refCount:0}}function wl(e){e.refCount--,e.refCount===0&&gy(vy,function(){e.controller.abort()})}var Cl=null,Ws=0,_n=0,Mn=null;function yy(e,t){if(Cl===null){var a=Cl=[];Ws=0,_n=eo(),Mn={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Ws++,t.then(Lf,Lf),t}function Lf(){if(--Ws===0&&Cl!==null){Mn!==null&&(Mn.status="fulfilled");var e=Cl;Cl=null,_n=0,Mn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function by(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var u=0;u<a.length;u++)(0,a[u])(t)},function(u){for(l.status="rejected",l.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),l}var zf=_.S;_.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&yy(e,t),zf!==null&&zf(e,t)};var ln=$(null);function Is(){var e=ln.current;return e!==null?e:ke.pooledCache}function Ki(e,t){t===null?Q(ln,ln.current):Q(ln,t.pool)}function Df(){var e=Is();return e===null?null:{parent:Qe._currentValue,pool:e}}var jl=Error(s(460)),_f=Error(s(474)),Xi=Error(s(542)),eu={then:function(){}};function Mf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ji(){}function Uf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ji,Ji),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Hf(e),e;default:if(typeof t.status=="string")t.then(Ji,Ji);else{if(e=ke,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=l}},function(l){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Hf(e),e}throw Al=t,jl}}var Al=null;function Bf(){if(Al===null)throw Error(s(459));var e=Al;return Al=null,e}function Hf(e){if(e===jl||e===Xi)throw Error(s(483))}var Ea=!1;function tu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function au(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ta(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ne&2)!==0){var u=l.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),l.pending=t,t=$i(e),Tf(e,null,a),t}return Vi(e,l,t,a),$i(e)}function Ol(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,kc(e,a)}}function nu(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var u=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?u=c=g:c=c.next=g,a=a.next}while(a!==null);c===null?u=c=t:c=c.next=t}else u=c=t;a={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:c,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var lu=!1;function kl(){if(lu){var e=Mn;if(e!==null)throw e}}function Ll(e,t,a,l){lu=!1;var u=e.updateQueue;Ea=!1;var c=u.firstBaseUpdate,g=u.lastBaseUpdate,y=u.shared.pending;if(y!==null){u.shared.pending=null;var N=y,O=N.next;N.next=null,g===null?c=O:g.next=O,g=N;var H=e.alternate;H!==null&&(H=H.updateQueue,y=H.lastBaseUpdate,y!==g&&(y===null?H.firstBaseUpdate=O:y.next=O,H.lastBaseUpdate=N))}if(c!==null){var q=u.baseState;g=0,H=O=N=null,y=c;do{var k=y.lane&-536870913,L=k!==y.lane;if(L?(ve&k)===k:(l&k)===k){k!==0&&k===_n&&(lu=!0),H!==null&&(H=H.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});e:{var le=e,te=y;k=t;var je=a;switch(te.tag){case 1:if(le=te.payload,typeof le=="function"){q=le.call(je,q,k);break e}q=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=te.payload,k=typeof le=="function"?le.call(je,q,k):le,k==null)break e;q=v({},q,k);break e;case 2:Ea=!0}}k=y.callback,k!==null&&(e.flags|=64,L&&(e.flags|=8192),L=u.callbacks,L===null?u.callbacks=[k]:L.push(k))}else L={lane:k,tag:y.tag,payload:y.payload,callback:y.callback,next:null},H===null?(O=H=L,N=q):H=H.next=L,g|=k;if(y=y.next,y===null){if(y=u.shared.pending,y===null)break;L=y,y=L.next,L.next=null,u.lastBaseUpdate=L,u.shared.pending=null}}while(!0);H===null&&(N=q),u.baseState=N,u.firstBaseUpdate=O,u.lastBaseUpdate=H,c===null&&(u.shared.lanes=0),za|=g,e.lanes=g,e.memoizedState=q}}function Vf(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function $f(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Vf(a[e],t)}var Un=$(null),Fi=$(0);function qf(e,t){e=da,Q(Fi,e),Q(Un,t),da=e|t.baseLanes}function iu(){Q(Fi,da),Q(Un,Un.current)}function ru(){da=Fi.current,Z(Un),Z(Fi)}var wa=0,ce=null,we=null,$e=null,Pi=!1,Bn=!1,rn=!1,Wi=0,zl=0,Hn=null,Sy=0;function He(){throw Error(s(321))}function su(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!bt(e[a],t[a]))return!1;return!0}function uu(e,t,a,l,u,c){return wa=c,ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_.H=e===null||e.memoizedState===null?Td:wd,rn=!1,c=a(l,u),rn=!1,Bn&&(c=Yf(t,a,l,u)),Gf(e),c}function Gf(e){_.H=lr;var t=we!==null&&we.next!==null;if(wa=0,$e=we=ce=null,Pi=!1,zl=0,Hn=null,t)throw Error(s(300));e===null||Fe||(e=e.dependencies,e!==null&&Qi(e)&&(Fe=!0))}function Yf(e,t,a,l){ce=e;var u=0;do{if(Bn&&(Hn=null),zl=0,Bn=!1,25<=u)throw Error(s(301));if(u+=1,$e=we=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}_.H=Cy,c=t(a,l)}while(Bn);return c}function xy(){var e=_.H,t=e.useState()[0];return t=typeof t.then=="function"?Dl(t):t,e=e.useState()[0],(we!==null?we.memoizedState:null)!==e&&(ce.flags|=1024),t}function ou(){var e=Wi!==0;return Wi=0,e}function cu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function fu(e){if(Pi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pi=!1}wa=0,$e=we=ce=null,Bn=!1,zl=Wi=0,Hn=null}function dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?ce.memoizedState=$e=e:$e=$e.next=e,$e}function qe(){if(we===null){var e=ce.alternate;e=e!==null?e.memoizedState:null}else e=we.next;var t=$e===null?ce.memoizedState:$e.next;if(t!==null)$e=t,we=e;else{if(e===null)throw ce.alternate===null?Error(s(467)):Error(s(310));we=e,e={memoizedState:we.memoizedState,baseState:we.baseState,baseQueue:we.baseQueue,queue:we.queue,next:null},$e===null?ce.memoizedState=$e=e:$e=$e.next=e}return $e}function du(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Dl(e){var t=zl;return zl+=1,Hn===null&&(Hn=[]),e=Uf(Hn,e,t),t=ce,($e===null?t.memoizedState:$e.next)===null&&(t=t.alternate,_.H=t===null||t.memoizedState===null?Td:wd),e}function Ii(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Dl(e);if(e.$$typeof===G)return lt(e)}throw Error(s(438,String(e)))}function hu(e){var t=null,a=ce.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ce.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=du(),ce.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=ne;return t.index++,a}function ra(e,t){return typeof t=="function"?t(e):t}function er(e){var t=qe();return pu(t,we,e)}function pu(e,t,a){var l=e.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=a;var u=e.baseQueue,c=l.pending;if(c!==null){if(u!==null){var g=u.next;u.next=c.next,c.next=g}t.baseQueue=u=c,l.pending=null}if(c=e.baseState,u===null)e.memoizedState=c;else{t=u.next;var y=g=null,N=null,O=t,H=!1;do{var q=O.lane&-536870913;if(q!==O.lane?(ve&q)===q:(wa&q)===q){var k=O.revertLane;if(k===0)N!==null&&(N=N.next={lane:0,revertLane:0,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),q===_n&&(H=!0);else if((wa&k)===k){O=O.next,k===_n&&(H=!0);continue}else q={lane:0,revertLane:O.revertLane,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},N===null?(y=N=q,g=c):N=N.next=q,ce.lanes|=k,za|=k;q=O.action,rn&&a(c,q),c=O.hasEagerState?O.eagerState:a(c,q)}else k={lane:q,revertLane:O.revertLane,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},N===null?(y=N=k,g=c):N=N.next=k,ce.lanes|=q,za|=q;O=O.next}while(O!==null&&O!==t);if(N===null?g=c:N.next=y,!bt(c,e.memoizedState)&&(Fe=!0,H&&(a=Mn,a!==null)))throw a;e.memoizedState=c,e.baseState=g,e.baseQueue=N,l.lastRenderedState=c}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function mu(e){var t=qe(),a=t.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=e;var l=a.dispatch,u=a.pending,c=t.memoizedState;if(u!==null){a.pending=null;var g=u=u.next;do c=e(c,g.action),g=g.next;while(g!==u);bt(c,t.memoizedState)||(Fe=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,l]}function Qf(e,t,a){var l=ce,u=qe(),c=Se;if(c){if(a===void 0)throw Error(s(407));a=a()}else a=t();var g=!bt((we||u).memoizedState,a);g&&(u.memoizedState=a,Fe=!0),u=u.queue;var y=Xf.bind(null,l,u,e);if(_l(2048,8,y,[e]),u.getSnapshot!==t||g||$e!==null&&$e.memoizedState.tag&1){if(l.flags|=2048,Vn(9,tr(),Kf.bind(null,l,u,a,t),null),ke===null)throw Error(s(349));c||(wa&124)!==0||Zf(l,t,a)}return a}function Zf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ce.updateQueue,t===null?(t=du(),ce.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Kf(e,t,a,l){t.value=a,t.getSnapshot=l,Jf(t)&&Ff(e)}function Xf(e,t,a){return a(function(){Jf(t)&&Ff(e)})}function Jf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!bt(e,a)}catch{return!0}}function Ff(e){var t=kn(e,2);t!==null&&Tt(t,e,2)}function gu(e){var t=dt();if(typeof e=="function"){var a=e;if(e=a(),rn){ba(!0);try{a()}finally{ba(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t}function Pf(e,t,a,l){return e.baseState=a,pu(e,we,typeof l=="function"?l:ra)}function Ny(e,t,a,l,u){if(nr(e))throw Error(s(485));if(e=t.action,e!==null){var c={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){c.listeners.push(g)}};_.T!==null?a(!0):c.isTransition=!1,l(c),a=t.pending,a===null?(c.next=t.pending=c,Wf(t,c)):(c.next=a.next,t.pending=a.next=c)}}function Wf(e,t){var a=t.action,l=t.payload,u=e.state;if(t.isTransition){var c=_.T,g={};_.T=g;try{var y=a(u,l),N=_.S;N!==null&&N(g,y),If(e,t,y)}catch(O){vu(e,t,O)}finally{_.T=c}}else try{c=a(u,l),If(e,t,c)}catch(O){vu(e,t,O)}}function If(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){ed(e,t,l)},function(l){return vu(e,t,l)}):ed(e,t,a)}function ed(e,t,a){t.status="fulfilled",t.value=a,td(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Wf(e,a)))}function vu(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,td(t),t=t.next;while(t!==l)}e.action=null}function td(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ad(e,t){return t}function nd(e,t){if(Se){var a=ke.formState;if(a!==null){e:{var l=ce;if(Se){if(Ue){t:{for(var u=Ue,c=Zt;u.nodeType!==8;){if(!c){u=null;break t}if(u=$t(u.nextSibling),u===null){u=null;break t}}c=u.data,u=c==="F!"||c==="F"?u:null}if(u){Ue=$t(u.nextSibling),l=u.data==="F!";break e}}tn(l)}l=!1}l&&(t=a[0])}}return a=dt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ad,lastRenderedState:t},a.queue=l,a=Nd.bind(null,ce,l),l.dispatch=a,l=gu(!1),c=Nu.bind(null,ce,!1,l.queue),l=dt(),u={state:t,dispatch:null,action:e,pending:null},l.queue=u,a=Ny.bind(null,ce,u,c,a),u.dispatch=a,l.memoizedState=e,[t,a,!1]}function ld(e){var t=qe();return id(t,we,e)}function id(e,t,a){if(t=pu(e,t,ad)[0],e=er(ra)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Dl(t)}catch(g){throw g===jl?Xi:g}else l=t;t=qe();var u=t.queue,c=u.dispatch;return a!==t.memoizedState&&(ce.flags|=2048,Vn(9,tr(),Ey.bind(null,u,a),null)),[l,c,e]}function Ey(e,t){e.action=t}function rd(e){var t=qe(),a=we;if(a!==null)return id(t,a,e);qe(),t=t.memoizedState,a=qe();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Vn(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ce.updateQueue,t===null&&(t=du(),ce.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function tr(){return{destroy:void 0,resource:void 0}}function sd(){return qe().memoizedState}function ar(e,t,a,l){var u=dt();l=l===void 0?null:l,ce.flags|=e,u.memoizedState=Vn(1|t,tr(),a,l)}function _l(e,t,a,l){var u=qe();l=l===void 0?null:l;var c=u.memoizedState.inst;we!==null&&l!==null&&su(l,we.memoizedState.deps)?u.memoizedState=Vn(t,c,a,l):(ce.flags|=e,u.memoizedState=Vn(1|t,c,a,l))}function ud(e,t){ar(8390656,8,e,t)}function od(e,t){_l(2048,8,e,t)}function cd(e,t){return _l(4,2,e,t)}function fd(e,t){return _l(4,4,e,t)}function dd(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function hd(e,t,a){a=a!=null?a.concat([e]):null,_l(4,4,dd.bind(null,t,e),a)}function yu(){}function pd(e,t){var a=qe();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&su(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function md(e,t){var a=qe();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&su(t,l[1]))return l[0];if(l=e(),rn){ba(!0);try{e()}finally{ba(!1)}}return a.memoizedState=[l,t],l}function bu(e,t,a){return a===void 0||(wa&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=yh(),ce.lanes|=e,za|=e,a)}function gd(e,t,a,l){return bt(a,t)?a:Un.current!==null?(e=bu(e,a,l),bt(e,t)||(Fe=!0),e):(wa&42)===0?(Fe=!0,e.memoizedState=a):(e=yh(),ce.lanes|=e,za|=e,t)}function vd(e,t,a,l,u){var c=Y.p;Y.p=c!==0&&8>c?c:8;var g=_.T,y={};_.T=y,Nu(e,!1,t,a);try{var N=u(),O=_.S;if(O!==null&&O(y,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var H=by(N,l);Ml(e,t,H,Rt(e))}else Ml(e,t,l,Rt(e))}catch(q){Ml(e,t,{then:function(){},status:"rejected",reason:q},Rt())}finally{Y.p=c,_.T=g}}function Ry(){}function Su(e,t,a,l){if(e.tag!==5)throw Error(s(476));var u=yd(e).queue;vd(e,u,t,W,a===null?Ry:function(){return bd(e),a(l)})}function yd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:W},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bd(e){var t=yd(e).next.queue;Ml(e,t,{},Rt())}function xu(){return lt(ei)}function Sd(){return qe().memoizedState}function xd(){return qe().memoizedState}function Ty(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Rt();e=Ra(a);var l=Ta(t,e,a);l!==null&&(Tt(l,t,a),Ol(l,t,a)),t={cache:Ps()},e.payload=t;return}t=t.return}}function wy(e,t,a){var l=Rt();a={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},nr(e)?Ed(t,a):(a=$s(e,t,a,l),a!==null&&(Tt(a,e,l),Rd(a,t,l)))}function Nd(e,t,a){var l=Rt();Ml(e,t,a,l)}function Ml(e,t,a,l){var u={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(nr(e))Ed(t,u);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var g=t.lastRenderedState,y=c(g,a);if(u.hasEagerState=!0,u.eagerState=y,bt(y,g))return Vi(e,t,u,0),ke===null&&Hi(),!1}catch{}finally{}if(a=$s(e,t,u,l),a!==null)return Tt(a,e,l),Rd(a,t,l),!0}return!1}function Nu(e,t,a,l){if(l={lane:2,revertLane:eo(),action:l,hasEagerState:!1,eagerState:null,next:null},nr(e)){if(t)throw Error(s(479))}else t=$s(e,a,l,2),t!==null&&Tt(t,e,2)}function nr(e){var t=e.alternate;return e===ce||t!==null&&t===ce}function Ed(e,t){Bn=Pi=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Rd(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,kc(e,a)}}var lr={readContext:lt,use:Ii,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useLayoutEffect:He,useInsertionEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useSyncExternalStore:He,useId:He,useHostTransitionStatus:He,useFormState:He,useActionState:He,useOptimistic:He,useMemoCache:He,useCacheRefresh:He},Td={readContext:lt,use:Ii,useCallback:function(e,t){return dt().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:ud,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ar(4194308,4,dd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ar(4194308,4,e,t)},useInsertionEffect:function(e,t){ar(4,2,e,t)},useMemo:function(e,t){var a=dt();t=t===void 0?null:t;var l=e();if(rn){ba(!0);try{e()}finally{ba(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=dt();if(a!==void 0){var u=a(t);if(rn){ba(!0);try{a(t)}finally{ba(!1)}}}else u=t;return l.memoizedState=l.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},l.queue=e,e=e.dispatch=wy.bind(null,ce,e),[l.memoizedState,e]},useRef:function(e){var t=dt();return e={current:e},t.memoizedState=e},useState:function(e){e=gu(e);var t=e.queue,a=Nd.bind(null,ce,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:yu,useDeferredValue:function(e,t){var a=dt();return bu(a,e,t)},useTransition:function(){var e=gu(!1);return e=vd.bind(null,ce,e.queue,!0,!1),dt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ce,u=dt();if(Se){if(a===void 0)throw Error(s(407));a=a()}else{if(a=t(),ke===null)throw Error(s(349));(ve&124)!==0||Zf(l,t,a)}u.memoizedState=a;var c={value:a,getSnapshot:t};return u.queue=c,ud(Xf.bind(null,l,c,e),[e]),l.flags|=2048,Vn(9,tr(),Kf.bind(null,l,c,a,t),null),a},useId:function(){var e=dt(),t=ke.identifierPrefix;if(Se){var a=na,l=aa;a=(l&~(1<<32-yt(l)-1)).toString(32)+a,t="«"+t+"R"+a,a=Wi++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=Sy++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:xu,useFormState:nd,useActionState:nd,useOptimistic:function(e){var t=dt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Nu.bind(null,ce,!0,a),a.dispatch=t,[e,t]},useMemoCache:hu,useCacheRefresh:function(){return dt().memoizedState=Ty.bind(null,ce)}},wd={readContext:lt,use:Ii,useCallback:pd,useContext:lt,useEffect:od,useImperativeHandle:hd,useInsertionEffect:cd,useLayoutEffect:fd,useMemo:md,useReducer:er,useRef:sd,useState:function(){return er(ra)},useDebugValue:yu,useDeferredValue:function(e,t){var a=qe();return gd(a,we.memoizedState,e,t)},useTransition:function(){var e=er(ra)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:Dl(e),t]},useSyncExternalStore:Qf,useId:Sd,useHostTransitionStatus:xu,useFormState:ld,useActionState:ld,useOptimistic:function(e,t){var a=qe();return Pf(a,we,e,t)},useMemoCache:hu,useCacheRefresh:xd},Cy={readContext:lt,use:Ii,useCallback:pd,useContext:lt,useEffect:od,useImperativeHandle:hd,useInsertionEffect:cd,useLayoutEffect:fd,useMemo:md,useReducer:mu,useRef:sd,useState:function(){return mu(ra)},useDebugValue:yu,useDeferredValue:function(e,t){var a=qe();return we===null?bu(a,e,t):gd(a,we.memoizedState,e,t)},useTransition:function(){var e=mu(ra)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:Dl(e),t]},useSyncExternalStore:Qf,useId:Sd,useHostTransitionStatus:xu,useFormState:rd,useActionState:rd,useOptimistic:function(e,t){var a=qe();return we!==null?Pf(a,we,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:hu,useCacheRefresh:xd},$n=null,Ul=0;function ir(e){var t=Ul;return Ul+=1,$n===null&&($n=[]),Uf($n,e,t)}function Bl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function rr(e,t){throw t.$$typeof===x?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Cd(e){var t=e._init;return t(e._payload)}function jd(e){function t(j,w){if(e){var A=j.deletions;A===null?(j.deletions=[w],j.flags|=16):A.push(w)}}function a(j,w){if(!e)return null;for(;w!==null;)t(j,w),w=w.sibling;return null}function l(j){for(var w=new Map;j!==null;)j.key!==null?w.set(j.key,j):w.set(j.index,j),j=j.sibling;return w}function u(j,w){return j=ta(j,w),j.index=0,j.sibling=null,j}function c(j,w,A){return j.index=A,e?(A=j.alternate,A!==null?(A=A.index,A<w?(j.flags|=67108866,w):A):(j.flags|=67108866,w)):(j.flags|=1048576,w)}function g(j){return e&&j.alternate===null&&(j.flags|=67108866),j}function y(j,w,A,V){return w===null||w.tag!==6?(w=Gs(A,j.mode,V),w.return=j,w):(w=u(w,A),w.return=j,w)}function N(j,w,A,V){var X=A.type;return X===E?H(j,w,A.props.children,V,A.key):w!==null&&(w.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===ee&&Cd(X)===w.type)?(w=u(w,A.props),Bl(w,A),w.return=j,w):(w=qi(A.type,A.key,A.props,null,j.mode,V),Bl(w,A),w.return=j,w)}function O(j,w,A,V){return w===null||w.tag!==4||w.stateNode.containerInfo!==A.containerInfo||w.stateNode.implementation!==A.implementation?(w=Ys(A,j.mode,V),w.return=j,w):(w=u(w,A.children||[]),w.return=j,w)}function H(j,w,A,V,X){return w===null||w.tag!==7?(w=Pa(A,j.mode,V,X),w.return=j,w):(w=u(w,A),w.return=j,w)}function q(j,w,A){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=Gs(""+w,j.mode,A),w.return=j,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case S:return A=qi(w.type,w.key,w.props,null,j.mode,A),Bl(A,w),A.return=j,A;case C:return w=Ys(w,j.mode,A),w.return=j,w;case ee:var V=w._init;return w=V(w._payload),q(j,w,A)}if(Ye(w)||Ke(w))return w=Pa(w,j.mode,A,null),w.return=j,w;if(typeof w.then=="function")return q(j,ir(w),A);if(w.$$typeof===G)return q(j,Zi(j,w),A);rr(j,w)}return null}function k(j,w,A,V){var X=w!==null?w.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return X!==null?null:y(j,w,""+A,V);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case S:return A.key===X?N(j,w,A,V):null;case C:return A.key===X?O(j,w,A,V):null;case ee:return X=A._init,A=X(A._payload),k(j,w,A,V)}if(Ye(A)||Ke(A))return X!==null?null:H(j,w,A,V,null);if(typeof A.then=="function")return k(j,w,ir(A),V);if(A.$$typeof===G)return k(j,w,Zi(j,A),V);rr(j,A)}return null}function L(j,w,A,V,X){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return j=j.get(A)||null,y(w,j,""+V,X);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case S:return j=j.get(V.key===null?A:V.key)||null,N(w,j,V,X);case C:return j=j.get(V.key===null?A:V.key)||null,O(w,j,V,X);case ee:var fe=V._init;return V=fe(V._payload),L(j,w,A,V,X)}if(Ye(V)||Ke(V))return j=j.get(A)||null,H(w,j,V,X,null);if(typeof V.then=="function")return L(j,w,A,ir(V),X);if(V.$$typeof===G)return L(j,w,A,Zi(w,V),X);rr(w,V)}return null}function le(j,w,A,V){for(var X=null,fe=null,P=w,ae=w=0,We=null;P!==null&&ae<A.length;ae++){P.index>ae?(We=P,P=null):We=P.sibling;var be=k(j,P,A[ae],V);if(be===null){P===null&&(P=We);break}e&&P&&be.alternate===null&&t(j,P),w=c(be,w,ae),fe===null?X=be:fe.sibling=be,fe=be,P=We}if(ae===A.length)return a(j,P),Se&&Ia(j,ae),X;if(P===null){for(;ae<A.length;ae++)P=q(j,A[ae],V),P!==null&&(w=c(P,w,ae),fe===null?X=P:fe.sibling=P,fe=P);return Se&&Ia(j,ae),X}for(P=l(P);ae<A.length;ae++)We=L(P,j,ae,A[ae],V),We!==null&&(e&&We.alternate!==null&&P.delete(We.key===null?ae:We.key),w=c(We,w,ae),fe===null?X=We:fe.sibling=We,fe=We);return e&&P.forEach(function(qa){return t(j,qa)}),Se&&Ia(j,ae),X}function te(j,w,A,V){if(A==null)throw Error(s(151));for(var X=null,fe=null,P=w,ae=w=0,We=null,be=A.next();P!==null&&!be.done;ae++,be=A.next()){P.index>ae?(We=P,P=null):We=P.sibling;var qa=k(j,P,be.value,V);if(qa===null){P===null&&(P=We);break}e&&P&&qa.alternate===null&&t(j,P),w=c(qa,w,ae),fe===null?X=qa:fe.sibling=qa,fe=qa,P=We}if(be.done)return a(j,P),Se&&Ia(j,ae),X;if(P===null){for(;!be.done;ae++,be=A.next())be=q(j,be.value,V),be!==null&&(w=c(be,w,ae),fe===null?X=be:fe.sibling=be,fe=be);return Se&&Ia(j,ae),X}for(P=l(P);!be.done;ae++,be=A.next())be=L(P,j,ae,be.value,V),be!==null&&(e&&be.alternate!==null&&P.delete(be.key===null?ae:be.key),w=c(be,w,ae),fe===null?X=be:fe.sibling=be,fe=be);return e&&P.forEach(function(j0){return t(j,j0)}),Se&&Ia(j,ae),X}function je(j,w,A,V){if(typeof A=="object"&&A!==null&&A.type===E&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case S:e:{for(var X=A.key;w!==null;){if(w.key===X){if(X=A.type,X===E){if(w.tag===7){a(j,w.sibling),V=u(w,A.props.children),V.return=j,j=V;break e}}else if(w.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===ee&&Cd(X)===w.type){a(j,w.sibling),V=u(w,A.props),Bl(V,A),V.return=j,j=V;break e}a(j,w);break}else t(j,w);w=w.sibling}A.type===E?(V=Pa(A.props.children,j.mode,V,A.key),V.return=j,j=V):(V=qi(A.type,A.key,A.props,null,j.mode,V),Bl(V,A),V.return=j,j=V)}return g(j);case C:e:{for(X=A.key;w!==null;){if(w.key===X)if(w.tag===4&&w.stateNode.containerInfo===A.containerInfo&&w.stateNode.implementation===A.implementation){a(j,w.sibling),V=u(w,A.children||[]),V.return=j,j=V;break e}else{a(j,w);break}else t(j,w);w=w.sibling}V=Ys(A,j.mode,V),V.return=j,j=V}return g(j);case ee:return X=A._init,A=X(A._payload),je(j,w,A,V)}if(Ye(A))return le(j,w,A,V);if(Ke(A)){if(X=Ke(A),typeof X!="function")throw Error(s(150));return A=X.call(A),te(j,w,A,V)}if(typeof A.then=="function")return je(j,w,ir(A),V);if(A.$$typeof===G)return je(j,w,Zi(j,A),V);rr(j,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,w!==null&&w.tag===6?(a(j,w.sibling),V=u(w,A),V.return=j,j=V):(a(j,w),V=Gs(A,j.mode,V),V.return=j,j=V),g(j)):a(j,w)}return function(j,w,A,V){try{Ul=0;var X=je(j,w,A,V);return $n=null,X}catch(P){if(P===jl||P===Xi)throw P;var fe=St(29,P,null,j.mode);return fe.lanes=V,fe.return=j,fe}finally{}}}var qn=jd(!0),Ad=jd(!1),Dt=$(null),Kt=null;function Ca(e){var t=e.alternate;Q(Ze,Ze.current&1),Q(Dt,e),Kt===null&&(t===null||Un.current!==null||t.memoizedState!==null)&&(Kt=e)}function Od(e){if(e.tag===22){if(Q(Ze,Ze.current),Q(Dt,e),Kt===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Kt=e)}}else ja()}function ja(){Q(Ze,Ze.current),Q(Dt,Dt.current)}function sa(e){Z(Dt),Kt===e&&(Kt=null),Z(Ze)}var Ze=$(0);function sr(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||ho(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Eu(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:v({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Ru={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Rt(),u=Ra(l);u.payload=t,a!=null&&(u.callback=a),t=Ta(e,u,l),t!==null&&(Tt(t,e,l),Ol(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Rt(),u=Ra(l);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=Ta(e,u,l),t!==null&&(Tt(t,e,l),Ol(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Rt(),l=Ra(a);l.tag=2,t!=null&&(l.callback=t),t=Ta(e,l,a),t!==null&&(Tt(t,e,a),Ol(t,e,a))}};function kd(e,t,a,l,u,c,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,g):t.prototype&&t.prototype.isPureReactComponent?!Sl(a,l)||!Sl(u,c):!0}function Ld(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Ru.enqueueReplaceState(t,t.state,null)}function sn(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=v({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}var ur=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function zd(e){ur(e)}function Dd(e){console.error(e)}function _d(e){ur(e)}function or(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Md(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Tu(e,t,a){return a=Ra(a),a.tag=3,a.payload={element:null},a.callback=function(){or(e,t)},a}function Ud(e){return e=Ra(e),e.tag=3,e}function Bd(e,t,a,l){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var c=l.value;e.payload=function(){return u(c)},e.callback=function(){Md(t,a,l)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Md(t,a,l),typeof u!="function"&&(Da===null?Da=new Set([this]):Da.add(this));var y=l.stack;this.componentDidCatch(l.value,{componentStack:y!==null?y:""})})}function jy(e,t,a,l,u){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Tl(t,a,u,!0),a=Dt.current,a!==null){switch(a.tag){case 13:return Kt===null?Ju():a.alternate===null&&Be===0&&(Be=3),a.flags&=-257,a.flags|=65536,a.lanes=u,l===eu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Pu(e,l,u)),!1;case 22:return a.flags|=65536,l===eu?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Pu(e,l,u)),!1}throw Error(s(435,a.tag))}return Pu(e,l,u),Ju(),!1}if(Se)return t=Dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,l!==Ks&&(e=Error(s(422),{cause:l}),Rl(Ot(e,a)))):(l!==Ks&&(t=Error(s(423),{cause:l}),Rl(Ot(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=Ot(l,a),u=Tu(e.stateNode,l,u),nu(e,u),Be!==4&&(Be=2)),!1;var c=Error(s(520),{cause:l});if(c=Ot(c,a),Ql===null?Ql=[c]:Ql.push(c),Be!==4&&(Be=2),t===null)return!0;l=Ot(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=Tu(a.stateNode,l,e),nu(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Da===null||!Da.has(c))))return a.flags|=65536,u&=-u,a.lanes|=u,u=Ud(u),Bd(u,e,a,l),nu(a,u),!1}a=a.return}while(a!==null);return!1}var Hd=Error(s(461)),Fe=!1;function Ie(e,t,a,l){t.child=e===null?Ad(t,null,a,l):qn(t,e.child,a,l)}function Vd(e,t,a,l,u){a=a.render;var c=t.ref;if("ref"in l){var g={};for(var y in l)y!=="ref"&&(g[y]=l[y])}else g=l;return nn(t),l=uu(e,t,a,g,c,u),y=ou(),e!==null&&!Fe?(cu(e,t,u),ua(e,t,u)):(Se&&y&&Qs(t),t.flags|=1,Ie(e,t,l,u),t.child)}function $d(e,t,a,l,u){if(e===null){var c=a.type;return typeof c=="function"&&!qs(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,qd(e,t,c,l,u)):(e=qi(a.type,null,l,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!zu(e,u)){var g=c.memoizedProps;if(a=a.compare,a=a!==null?a:Sl,a(g,l)&&e.ref===t.ref)return ua(e,t,u)}return t.flags|=1,e=ta(c,l),e.ref=t.ref,e.return=t,t.child=e}function qd(e,t,a,l,u){if(e!==null){var c=e.memoizedProps;if(Sl(c,l)&&e.ref===t.ref)if(Fe=!1,t.pendingProps=l=c,zu(e,u))(e.flags&131072)!==0&&(Fe=!0);else return t.lanes=e.lanes,ua(e,t,u)}return wu(e,t,a,l,u)}function Gd(e,t,a){var l=t.pendingProps,u=l.children,c=e!==null?e.memoizedState:null;if(l.mode==="hidden"){if((t.flags&128)!==0){if(l=c!==null?c.baseLanes|a:a,e!==null){for(u=t.child=e.child,c=0;u!==null;)c=c|u.lanes|u.childLanes,u=u.sibling;t.childLanes=c&~l}else t.childLanes=0,t.child=null;return Yd(e,t,l,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ki(t,c!==null?c.cachePool:null),c!==null?qf(t,c):iu(),Od(t);else return t.lanes=t.childLanes=536870912,Yd(e,t,c!==null?c.baseLanes|a:a,a)}else c!==null?(Ki(t,c.cachePool),qf(t,c),ja(),t.memoizedState=null):(e!==null&&Ki(t,null),iu(),ja());return Ie(e,t,u,a),t.child}function Yd(e,t,a,l){var u=Is();return u=u===null?null:{parent:Qe._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&Ki(t,null),iu(),Od(t),e!==null&&Tl(e,t,l,!0),null}function cr(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function wu(e,t,a,l,u){return nn(t),a=uu(e,t,a,l,void 0,u),l=ou(),e!==null&&!Fe?(cu(e,t,u),ua(e,t,u)):(Se&&l&&Qs(t),t.flags|=1,Ie(e,t,a,u),t.child)}function Qd(e,t,a,l,u,c){return nn(t),t.updateQueue=null,a=Yf(t,l,a,u),Gf(e),l=ou(),e!==null&&!Fe?(cu(e,t,c),ua(e,t,c)):(Se&&l&&Qs(t),t.flags|=1,Ie(e,t,a,c),t.child)}function Zd(e,t,a,l,u){if(nn(t),t.stateNode===null){var c=Ln,g=a.contextType;typeof g=="object"&&g!==null&&(c=lt(g)),c=new a(l,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Ru,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=l,c.state=t.memoizedState,c.refs={},tu(t),g=a.contextType,c.context=typeof g=="object"&&g!==null?lt(g):Ln,c.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(Eu(t,a,g,l),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(g=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),g!==c.state&&Ru.enqueueReplaceState(c,c.state,null),Ll(t,l,c,u),kl(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){c=t.stateNode;var y=t.memoizedProps,N=sn(a,y);c.props=N;var O=c.context,H=a.contextType;g=Ln,typeof H=="object"&&H!==null&&(g=lt(H));var q=a.getDerivedStateFromProps;H=typeof q=="function"||typeof c.getSnapshotBeforeUpdate=="function",y=t.pendingProps!==y,H||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y||O!==g)&&Ld(t,c,l,g),Ea=!1;var k=t.memoizedState;c.state=k,Ll(t,l,c,u),kl(),O=t.memoizedState,y||k!==O||Ea?(typeof q=="function"&&(Eu(t,a,q,l),O=t.memoizedState),(N=Ea||kd(t,a,N,l,k,O,g))?(H||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=O),c.props=l,c.state=O,c.context=g,l=N):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,au(e,t),g=t.memoizedProps,H=sn(a,g),c.props=H,q=t.pendingProps,k=c.context,O=a.contextType,N=Ln,typeof O=="object"&&O!==null&&(N=lt(O)),y=a.getDerivedStateFromProps,(O=typeof y=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(g!==q||k!==N)&&Ld(t,c,l,N),Ea=!1,k=t.memoizedState,c.state=k,Ll(t,l,c,u),kl();var L=t.memoizedState;g!==q||k!==L||Ea||e!==null&&e.dependencies!==null&&Qi(e.dependencies)?(typeof y=="function"&&(Eu(t,a,y,l),L=t.memoizedState),(H=Ea||kd(t,a,H,l,k,L,N)||e!==null&&e.dependencies!==null&&Qi(e.dependencies))?(O||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,L,N),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,L,N)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=L),c.props=l,c.state=L,c.context=N,l=H):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),l=!1)}return c=l,cr(e,t),l=(t.flags&128)!==0,c||l?(c=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&l?(t.child=qn(t,e.child,null,u),t.child=qn(t,null,a,u)):Ie(e,t,a,u),t.memoizedState=c.state,e=t.child):e=ua(e,t,u),e}function Kd(e,t,a,l){return El(),t.flags|=256,Ie(e,t,a,l),t.child}var Cu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ju(e){return{baseLanes:e,cachePool:Df()}}function Au(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=_t),e}function Xd(e,t,a){var l=t.pendingProps,u=!1,c=(t.flags&128)!==0,g;if((g=c)||(g=e!==null&&e.memoizedState===null?!1:(Ze.current&2)!==0),g&&(u=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Se){if(u?Ca(t):ja(),Se){var y=Ue,N;if(N=y){e:{for(N=y,y=Zt;N.nodeType!==8;){if(!y){y=null;break e}if(N=$t(N.nextSibling),N===null){y=null;break e}}y=N}y!==null?(t.memoizedState={dehydrated:y,treeContext:Wa!==null?{id:aa,overflow:na}:null,retryLane:536870912,hydrationErrors:null},N=St(18,null,null,0),N.stateNode=y,N.return=t,t.child=N,st=t,Ue=null,N=!0):N=!1}N||tn(t)}if(y=t.memoizedState,y!==null&&(y=y.dehydrated,y!==null))return ho(y)?t.lanes=32:t.lanes=536870912,null;sa(t)}return y=l.children,l=l.fallback,u?(ja(),u=t.mode,y=fr({mode:"hidden",children:y},u),l=Pa(l,u,a,null),y.return=t,l.return=t,y.sibling=l,t.child=y,u=t.child,u.memoizedState=ju(a),u.childLanes=Au(e,g,a),t.memoizedState=Cu,l):(Ca(t),Ou(t,y))}if(N=e.memoizedState,N!==null&&(y=N.dehydrated,y!==null)){if(c)t.flags&256?(Ca(t),t.flags&=-257,t=ku(e,t,a)):t.memoizedState!==null?(ja(),t.child=e.child,t.flags|=128,t=null):(ja(),u=l.fallback,y=t.mode,l=fr({mode:"visible",children:l.children},y),u=Pa(u,y,a,null),u.flags|=2,l.return=t,u.return=t,l.sibling=u,t.child=l,qn(t,e.child,null,a),l=t.child,l.memoizedState=ju(a),l.childLanes=Au(e,g,a),t.memoizedState=Cu,t=u);else if(Ca(t),ho(y)){if(g=y.nextSibling&&y.nextSibling.dataset,g)var O=g.dgst;g=O,l=Error(s(419)),l.stack="",l.digest=g,Rl({value:l,source:null,stack:null}),t=ku(e,t,a)}else if(Fe||Tl(e,t,a,!1),g=(a&e.childLanes)!==0,Fe||g){if(g=ke,g!==null&&(l=a&-a,l=(l&42)!==0?1:hs(l),l=(l&(g.suspendedLanes|a))!==0?0:l,l!==0&&l!==N.retryLane))throw N.retryLane=l,kn(e,l),Tt(g,e,l),Hd;y.data==="$?"||Ju(),t=ku(e,t,a)}else y.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,Ue=$t(y.nextSibling),st=t,Se=!0,en=null,Zt=!1,e!==null&&(Lt[zt++]=aa,Lt[zt++]=na,Lt[zt++]=Wa,aa=e.id,na=e.overflow,Wa=t),t=Ou(t,l.children),t.flags|=4096);return t}return u?(ja(),u=l.fallback,y=t.mode,N=e.child,O=N.sibling,l=ta(N,{mode:"hidden",children:l.children}),l.subtreeFlags=N.subtreeFlags&65011712,O!==null?u=ta(O,u):(u=Pa(u,y,a,null),u.flags|=2),u.return=t,l.return=t,l.sibling=u,t.child=l,l=u,u=t.child,y=e.child.memoizedState,y===null?y=ju(a):(N=y.cachePool,N!==null?(O=Qe._currentValue,N=N.parent!==O?{parent:O,pool:O}:N):N=Df(),y={baseLanes:y.baseLanes|a,cachePool:N}),u.memoizedState=y,u.childLanes=Au(e,g,a),t.memoizedState=Cu,l):(Ca(t),a=e.child,e=a.sibling,a=ta(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function Ou(e,t){return t=fr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function fr(e,t){return e=St(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function ku(e,t,a){return qn(t,e.child,null,a),e=Ou(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Jd(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Js(e.return,t,a)}function Lu(e,t,a,l,u){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:u}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=l,c.tail=a,c.tailMode=u)}function Fd(e,t,a){var l=t.pendingProps,u=l.revealOrder,c=l.tail;if(Ie(e,t,l.children,a),l=Ze.current,(l&2)!==0)l=l&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Jd(e,a,t);else if(e.tag===19)Jd(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}switch(Q(Ze,l),u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&sr(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),Lu(t,!1,u,a,c);break;case"backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&sr(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}Lu(t,!0,a,null,c);break;case"together":Lu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ua(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),za|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Tl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,a=ta(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ta(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function zu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Qi(e)))}function Ay(e,t,a){switch(t.tag){case 3:ze(t,t.stateNode.containerInfo),Na(t,Qe,e.memoizedState.cache),El();break;case 27:case 5:us(t);break;case 4:ze(t,t.stateNode.containerInfo);break;case 10:Na(t,t.type,t.memoizedProps.value);break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Ca(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Xd(e,t,a):(Ca(t),e=ua(e,t,a),e!==null?e.sibling:null);Ca(t);break;case 19:var u=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Tl(e,t,a,!1),l=(a&t.childLanes)!==0),u){if(l)return Fd(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Q(Ze,Ze.current),l)break;return null;case 22:case 23:return t.lanes=0,Gd(e,t,a);case 24:Na(t,Qe,e.memoizedState.cache)}return ua(e,t,a)}function Pd(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Fe=!0;else{if(!zu(e,a)&&(t.flags&128)===0)return Fe=!1,Ay(e,t,a);Fe=(e.flags&131072)!==0}else Fe=!1,Se&&(t.flags&1048576)!==0&&Cf(t,Yi,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var l=t.elementType,u=l._init;if(l=u(l._payload),t.type=l,typeof l=="function")qs(l)?(e=sn(l,e),t.tag=1,t=Zd(null,t,l,e,a)):(t.tag=0,t=wu(null,t,l,e,a));else{if(l!=null){if(u=l.$$typeof,u===J){t.tag=11,t=Vd(null,t,l,e,a);break e}else if(u===re){t.tag=14,t=$d(null,t,l,e,a);break e}}throw t=Ge(l)||l,Error(s(306,t,""))}}return t;case 0:return wu(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,u=sn(l,t.pendingProps),Zd(e,t,l,u,a);case 3:e:{if(ze(t,t.stateNode.containerInfo),e===null)throw Error(s(387));l=t.pendingProps;var c=t.memoizedState;u=c.element,au(e,t),Ll(t,l,null,a);var g=t.memoizedState;if(l=g.cache,Na(t,Qe,l),l!==c.cache&&Fs(t,[Qe],a,!0),kl(),l=g.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Kd(e,t,l,a);break e}else if(l!==u){u=Ot(Error(s(424)),t),Rl(u),t=Kd(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ue=$t(e.firstChild),st=t,Se=!0,en=null,Zt=!0,a=Ad(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(El(),l===u){t=ua(e,t,a);break e}Ie(e,t,l,a)}t=t.child}return t;case 26:return cr(e,t),e===null?(a=tp(t.type,null,t.pendingProps,null))?t.memoizedState=a:Se||(a=t.type,e=t.pendingProps,l=Tr(se.current).createElement(a),l[nt]=t,l[ct]=e,tt(l,a,e),Je(l),t.stateNode=l):t.memoizedState=tp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return us(t),e===null&&Se&&(l=t.stateNode=Wh(t.type,t.pendingProps,se.current),st=t,Zt=!0,u=Ue,Ua(t.type)?(po=u,Ue=$t(l.firstChild)):Ue=u),Ie(e,t,t.pendingProps.children,a),cr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Se&&((u=l=Ue)&&(l=n0(l,t.type,t.pendingProps,Zt),l!==null?(t.stateNode=l,st=t,Ue=$t(l.firstChild),Zt=!1,u=!0):u=!1),u||tn(t)),us(t),u=t.type,c=t.pendingProps,g=e!==null?e.memoizedProps:null,l=c.children,oo(u,c)?l=null:g!==null&&oo(u,g)&&(t.flags|=32),t.memoizedState!==null&&(u=uu(e,t,xy,null,null,a),ei._currentValue=u),cr(e,t),Ie(e,t,l,a),t.child;case 6:return e===null&&Se&&((e=a=Ue)&&(a=l0(a,t.pendingProps,Zt),a!==null?(t.stateNode=a,st=t,Ue=null,e=!0):e=!1),e||tn(t)),null;case 13:return Xd(e,t,a);case 4:return ze(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=qn(t,null,l,a):Ie(e,t,l,a),t.child;case 11:return Vd(e,t,t.type,t.pendingProps,a);case 7:return Ie(e,t,t.pendingProps,a),t.child;case 8:return Ie(e,t,t.pendingProps.children,a),t.child;case 12:return Ie(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Na(t,t.type,l.value),Ie(e,t,l.children,a),t.child;case 9:return u=t.type._context,l=t.pendingProps.children,nn(t),u=lt(u),l=l(u),t.flags|=1,Ie(e,t,l,a),t.child;case 14:return $d(e,t,t.type,t.pendingProps,a);case 15:return qd(e,t,t.type,t.pendingProps,a);case 19:return Fd(e,t,a);case 31:return l=t.pendingProps,a=t.mode,l={mode:l.mode,children:l.children},e===null?(a=fr(l,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=ta(e.child,l),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return Gd(e,t,a);case 24:return nn(t),l=lt(Qe),e===null?(u=Is(),u===null&&(u=ke,c=Ps(),u.pooledCache=c,c.refCount++,c!==null&&(u.pooledCacheLanes|=a),u=c),t.memoizedState={parent:l,cache:u},tu(t),Na(t,Qe,u)):((e.lanes&a)!==0&&(au(e,t),Ll(t,null,null,a),kl()),u=e.memoizedState,c=t.memoizedState,u.parent!==l?(u={parent:l,cache:l},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Na(t,Qe,l)):(l=c.cache,Na(t,Qe,l),l!==u.cache&&Fs(t,[Qe],a,!0))),Ie(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function oa(e){e.flags|=4}function Wd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!rp(t)){if(t=Dt.current,t!==null&&((ve&4194048)===ve?Kt!==null:(ve&62914560)!==ve&&(ve&536870912)===0||t!==Kt))throw Al=eu,_f;e.flags|=8192}}function dr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ac():536870912,e.lanes|=t,Zn|=t)}function Hl(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Me(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,l|=u.subtreeFlags&65011712,l|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Oy(e,t,a){var l=t.pendingProps;switch(Zs(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(t),null;case 1:return Me(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ia(Qe),ya(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Nl(t)?oa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Of())),Me(t),null;case 26:return a=t.memoizedState,e===null?(oa(t),a!==null?(Me(t),Wd(t,a)):(Me(t),t.flags&=-16777217)):a?a!==e.memoizedState?(oa(t),Me(t),Wd(t,a)):(Me(t),t.flags&=-16777217):(e.memoizedProps!==l&&oa(t),Me(t),t.flags&=-16777217),null;case 27:Ei(t),a=se.current;var u=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==l&&oa(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return Me(t),null}e=I.current,Nl(t)?jf(t):(e=Wh(u,l,a),t.stateNode=e,oa(t))}return Me(t),null;case 5:if(Ei(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&oa(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return Me(t),null}if(e=I.current,Nl(t))jf(t);else{switch(u=Tr(se.current),e){case 1:e=u.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=u.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=u.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof l.is=="string"?u.createElement("select",{is:l.is}):u.createElement("select"),l.multiple?e.multiple=!0:l.size&&(e.size=l.size);break;default:e=typeof l.is=="string"?u.createElement(a,{is:l.is}):u.createElement(a)}}e[nt]=t,e[ct]=l;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)e.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=e;e:switch(tt(e,a,l),a){case"button":case"input":case"select":case"textarea":e=!!l.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&oa(t)}}return Me(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&oa(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(s(166));if(e=se.current,Nl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,u=st,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[nt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Qh(e.nodeValue,a)),e||tn(t)}else e=Tr(e).createTextNode(l),e[nt]=t,t.stateNode=e}return Me(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Nl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!u)throw Error(s(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(s(317));u[nt]=t}else El(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Me(t),u=!1}else u=Of(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(sa(t),t):(sa(t),null)}if(sa(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=l!==null,e=e!==null&&e.memoizedState!==null,a){l=t.child,u=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(u=l.alternate.memoizedState.cachePool.pool);var c=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==u&&(l.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),dr(t,t.updateQueue),Me(t),null;case 4:return ya(),e===null&&lo(t.stateNode.containerInfo),Me(t),null;case 10:return ia(t.type),Me(t),null;case 19:if(Z(Ze),u=t.memoizedState,u===null)return Me(t),null;if(l=(t.flags&128)!==0,c=u.rendering,c===null)if(l)Hl(u,!1);else{if(Be!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=sr(e),c!==null){for(t.flags|=128,Hl(u,!1),e=c.updateQueue,t.updateQueue=e,dr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)wf(a,e),a=a.sibling;return Q(Ze,Ze.current&1|2),t.child}e=e.sibling}u.tail!==null&&Qt()>mr&&(t.flags|=128,l=!0,Hl(u,!1),t.lanes=4194304)}else{if(!l)if(e=sr(c),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,dr(t,e),Hl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!c.alternate&&!Se)return Me(t),null}else 2*Qt()-u.renderingStartTime>mr&&a!==536870912&&(t.flags|=128,l=!0,Hl(u,!1),t.lanes=4194304);u.isBackwards?(c.sibling=t.child,t.child=c):(e=u.last,e!==null?e.sibling=c:t.child=c,u.last=c)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Qt(),t.sibling=null,e=Ze.current,Q(Ze,l?e&1|2:e&1),t):(Me(t),null);case 22:case 23:return sa(t),ru(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),a=t.updateQueue,a!==null&&dr(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&Z(ln),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ia(Qe),Me(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function ky(e,t){switch(Zs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ia(Qe),ya(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ei(t),null;case 13:if(sa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));El()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Z(Ze),null;case 4:return ya(),null;case 10:return ia(t.type),null;case 22:case 23:return sa(t),ru(),e!==null&&Z(ln),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ia(Qe),null;case 25:return null;default:return null}}function Id(e,t){switch(Zs(t),t.tag){case 3:ia(Qe),ya();break;case 26:case 27:case 5:Ei(t);break;case 4:ya();break;case 13:sa(t);break;case 19:Z(Ze);break;case 10:ia(t.type);break;case 22:case 23:sa(t),ru(),e!==null&&Z(ln);break;case 24:ia(Qe)}}function Vl(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var u=l.next;a=u;do{if((a.tag&e)===e){l=void 0;var c=a.create,g=a.inst;l=c(),g.destroy=l}a=a.next}while(a!==u)}}catch(y){Ae(t,t.return,y)}}function Aa(e,t,a){try{var l=t.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var c=u.next;l=c;do{if((l.tag&e)===e){var g=l.inst,y=g.destroy;if(y!==void 0){g.destroy=void 0,u=t;var N=a,O=y;try{O()}catch(H){Ae(u,N,H)}}}l=l.next}while(l!==c)}}catch(H){Ae(t,t.return,H)}}function eh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{$f(t,a)}catch(l){Ae(e,e.return,l)}}}function th(e,t,a){a.props=sn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ae(e,t,l)}}function $l(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(u){Ae(e,t,u)}}function Xt(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(u){Ae(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){Ae(e,t,u)}else a.current=null}function ah(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(u){Ae(e,e.return,u)}}function Du(e,t,a){try{var l=e.stateNode;Wy(l,e.type,a,t),l[ct]=t}catch(u){Ae(e,e.return,u)}}function nh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ua(e.type)||e.tag===4}function _u(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ua(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Mu(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Rr));else if(l!==4&&(l===27&&Ua(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Mu(e,t,a),e=e.sibling;e!==null;)Mu(e,t,a),e=e.sibling}function hr(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Ua(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(hr(e,t,a),e=e.sibling;e!==null;)hr(e,t,a),e=e.sibling}function lh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);tt(t,l,a),t[nt]=e,t[ct]=a}catch(c){Ae(e,e.return,c)}}var ca=!1,Ve=!1,Uu=!1,ih=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function Ly(e,t){if(e=e.containerInfo,so=kr,e=gf(e),_s(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var u=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var g=0,y=-1,N=-1,O=0,H=0,q=e,k=null;t:for(;;){for(var L;q!==a||u!==0&&q.nodeType!==3||(y=g+u),q!==c||l!==0&&q.nodeType!==3||(N=g+l),q.nodeType===3&&(g+=q.nodeValue.length),(L=q.firstChild)!==null;)k=q,q=L;for(;;){if(q===e)break t;if(k===a&&++O===u&&(y=g),k===c&&++H===l&&(N=g),(L=q.nextSibling)!==null)break;q=k,k=q.parentNode}q=L}a=y===-1||N===-1?null:{start:y,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(uo={focusedElem:e,selectionRange:a},kr=!1,Pe=t;Pe!==null;)if(t=Pe,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,Pe=e;else for(;Pe!==null;){switch(t=Pe,c=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,u=c.memoizedProps,c=c.memoizedState,l=a.stateNode;try{var le=sn(a.type,u,a.elementType===a.type);e=l.getSnapshotBeforeUpdate(le,c),l.__reactInternalSnapshotBeforeUpdate=e}catch(te){Ae(a,a.return,te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)fo(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":fo(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=t.sibling,e!==null){e.return=t.return,Pe=e;break}Pe=t.return}}function rh(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Oa(e,a),l&4&&Vl(5,a);break;case 1:if(Oa(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){Ae(a,a.return,g)}else{var u=sn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Ae(a,a.return,g)}}l&64&&eh(a),l&512&&$l(a,a.return);break;case 3:if(Oa(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{$f(e,t)}catch(g){Ae(a,a.return,g)}}break;case 27:t===null&&l&4&&lh(a);case 26:case 5:Oa(e,a),t===null&&l&4&&ah(a),l&512&&$l(a,a.return);break;case 12:Oa(e,a);break;case 13:Oa(e,a),l&4&&oh(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=$y.bind(null,a),i0(e,a))));break;case 22:if(l=a.memoizedState!==null||ca,!l){t=t!==null&&t.memoizedState!==null||Ve,u=ca;var c=Ve;ca=l,(Ve=t)&&!c?ka(e,a,(a.subtreeFlags&8772)!==0):Oa(e,a),ca=u,Ve=c}break;case 30:break;default:Oa(e,a)}}function sh(e){var t=e.alternate;t!==null&&(e.alternate=null,sh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&gs(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var De=null,ht=!1;function fa(e,t,a){for(a=a.child;a!==null;)uh(e,t,a),a=a.sibling}function uh(e,t,a){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(ul,a)}catch{}switch(a.tag){case 26:Ve||Xt(a,t),fa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ve||Xt(a,t);var l=De,u=ht;Ua(a.type)&&(De=a.stateNode,ht=!1),fa(e,t,a),Fl(a.stateNode),De=l,ht=u;break;case 5:Ve||Xt(a,t);case 6:if(l=De,u=ht,De=null,fa(e,t,a),De=l,ht=u,De!==null)if(ht)try{(De.nodeType===9?De.body:De.nodeName==="HTML"?De.ownerDocument.body:De).removeChild(a.stateNode)}catch(c){Ae(a,t,c)}else try{De.removeChild(a.stateNode)}catch(c){Ae(a,t,c)}break;case 18:De!==null&&(ht?(e=De,Fh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),li(e)):Fh(De,a.stateNode));break;case 4:l=De,u=ht,De=a.stateNode.containerInfo,ht=!0,fa(e,t,a),De=l,ht=u;break;case 0:case 11:case 14:case 15:Ve||Aa(2,a,t),Ve||Aa(4,a,t),fa(e,t,a);break;case 1:Ve||(Xt(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&th(a,t,l)),fa(e,t,a);break;case 21:fa(e,t,a);break;case 22:Ve=(l=Ve)||a.memoizedState!==null,fa(e,t,a),Ve=l;break;default:fa(e,t,a)}}function oh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{li(e)}catch(a){Ae(t,t.return,a)}}function zy(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ih),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ih),t;default:throw Error(s(435,e.tag))}}function Bu(e,t){var a=zy(e);t.forEach(function(l){var u=qy.bind(null,e,l);a.has(l)||(a.add(l),l.then(u,u))})}function xt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var u=a[l],c=e,g=t,y=g;e:for(;y!==null;){switch(y.tag){case 27:if(Ua(y.type)){De=y.stateNode,ht=!1;break e}break;case 5:De=y.stateNode,ht=!1;break e;case 3:case 4:De=y.stateNode.containerInfo,ht=!0;break e}y=y.return}if(De===null)throw Error(s(160));uh(c,g,u),De=null,ht=!1,c=u.alternate,c!==null&&(c.return=null),u.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)ch(t,e),t=t.sibling}var Vt=null;function ch(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xt(t,e),Nt(e),l&4&&(Aa(3,e,e.return),Vl(3,e),Aa(5,e,e.return));break;case 1:xt(t,e),Nt(e),l&512&&(Ve||a===null||Xt(a,a.return)),l&64&&ca&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var u=Vt;if(xt(t,e),Nt(e),l&512&&(Ve||a===null||Xt(a,a.return)),l&4){var c=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(l){case"title":c=u.getElementsByTagName("title")[0],(!c||c[fl]||c[nt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=u.createElement(l),u.head.insertBefore(c,u.querySelector("head > title"))),tt(c,l,a),c[nt]=e,Je(c),l=c;break e;case"link":var g=lp("link","href",u).get(l+(a.href||""));if(g){for(var y=0;y<g.length;y++)if(c=g[y],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(y,1);break t}}c=u.createElement(l),tt(c,l,a),u.head.appendChild(c);break;case"meta":if(g=lp("meta","content",u).get(l+(a.content||""))){for(y=0;y<g.length;y++)if(c=g[y],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(y,1);break t}}c=u.createElement(l),tt(c,l,a),u.head.appendChild(c);break;default:throw Error(s(468,l))}c[nt]=e,Je(c),l=c}e.stateNode=l}else ip(u,e.type,e.stateNode);else e.stateNode=np(u,l,e.memoizedProps);else c!==l?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,l===null?ip(u,e.type,e.stateNode):np(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Du(e,e.memoizedProps,a.memoizedProps)}break;case 27:xt(t,e),Nt(e),l&512&&(Ve||a===null||Xt(a,a.return)),a!==null&&l&4&&Du(e,e.memoizedProps,a.memoizedProps);break;case 5:if(xt(t,e),Nt(e),l&512&&(Ve||a===null||Xt(a,a.return)),e.flags&32){u=e.stateNode;try{Rn(u,"")}catch(L){Ae(e,e.return,L)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,Du(e,u,a!==null?a.memoizedProps:u)),l&1024&&(Uu=!0);break;case 6:if(xt(t,e),Nt(e),l&4){if(e.stateNode===null)throw Error(s(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(L){Ae(e,e.return,L)}}break;case 3:if(jr=null,u=Vt,Vt=wr(t.containerInfo),xt(t,e),Vt=u,Nt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{li(t.containerInfo)}catch(L){Ae(e,e.return,L)}Uu&&(Uu=!1,fh(e));break;case 4:l=Vt,Vt=wr(e.stateNode.containerInfo),xt(t,e),Nt(e),Vt=l;break;case 12:xt(t,e),Nt(e);break;case 13:xt(t,e),Nt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Yu=Qt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Bu(e,l)));break;case 22:u=e.memoizedState!==null;var N=a!==null&&a.memoizedState!==null,O=ca,H=Ve;if(ca=O||u,Ve=H||N,xt(t,e),Ve=H,ca=O,Nt(e),l&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||N||ca||Ve||un(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){N=a=t;try{if(c=N.stateNode,u)g=c.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{y=N.stateNode;var q=N.memoizedProps.style,k=q!=null&&q.hasOwnProperty("display")?q.display:null;y.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(L){Ae(N,N.return,L)}}}else if(t.tag===6){if(a===null){N=t;try{N.stateNode.nodeValue=u?"":N.memoizedProps}catch(L){Ae(N,N.return,L)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Bu(e,a))));break;case 19:xt(t,e),Nt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Bu(e,l)));break;case 30:break;case 21:break;default:xt(t,e),Nt(e)}}function Nt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(nh(l)){a=l;break}l=l.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var u=a.stateNode,c=_u(e);hr(e,c,u);break;case 5:var g=a.stateNode;a.flags&32&&(Rn(g,""),a.flags&=-33);var y=_u(e);hr(e,y,g);break;case 3:case 4:var N=a.stateNode.containerInfo,O=_u(e);Mu(e,O,N);break;default:throw Error(s(161))}}catch(H){Ae(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;fh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Oa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rh(e,t.alternate,t),t=t.sibling}function un(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Aa(4,t,t.return),un(t);break;case 1:Xt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&th(t,t.return,a),un(t);break;case 27:Fl(t.stateNode);case 26:case 5:Xt(t,t.return),un(t);break;case 22:t.memoizedState===null&&un(t);break;case 30:un(t);break;default:un(t)}e=e.sibling}}function ka(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,u=e,c=t,g=c.flags;switch(c.tag){case 0:case 11:case 15:ka(u,c,a),Vl(4,c);break;case 1:if(ka(u,c,a),l=c,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(O){Ae(l,l.return,O)}if(l=c,u=l.updateQueue,u!==null){var y=l.stateNode;try{var N=u.shared.hiddenCallbacks;if(N!==null)for(u.shared.hiddenCallbacks=null,u=0;u<N.length;u++)Vf(N[u],y)}catch(O){Ae(l,l.return,O)}}a&&g&64&&eh(c),$l(c,c.return);break;case 27:lh(c);case 26:case 5:ka(u,c,a),a&&l===null&&g&4&&ah(c),$l(c,c.return);break;case 12:ka(u,c,a);break;case 13:ka(u,c,a),a&&g&4&&oh(u,c);break;case 22:c.memoizedState===null&&ka(u,c,a),$l(c,c.return);break;case 30:break;default:ka(u,c,a)}t=t.sibling}}function Hu(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&wl(a))}function Vu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wl(e))}function Jt(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)dh(e,t,a,l),t=t.sibling}function dh(e,t,a,l){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Jt(e,t,a,l),u&2048&&Vl(9,t);break;case 1:Jt(e,t,a,l);break;case 3:Jt(e,t,a,l),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wl(e)));break;case 12:if(u&2048){Jt(e,t,a,l),e=t.stateNode;try{var c=t.memoizedProps,g=c.id,y=c.onPostCommit;typeof y=="function"&&y(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){Ae(t,t.return,N)}}else Jt(e,t,a,l);break;case 13:Jt(e,t,a,l);break;case 23:break;case 22:c=t.stateNode,g=t.alternate,t.memoizedState!==null?c._visibility&2?Jt(e,t,a,l):ql(e,t):c._visibility&2?Jt(e,t,a,l):(c._visibility|=2,Gn(e,t,a,l,(t.subtreeFlags&10256)!==0)),u&2048&&Hu(g,t);break;case 24:Jt(e,t,a,l),u&2048&&Vu(t.alternate,t);break;default:Jt(e,t,a,l)}}function Gn(e,t,a,l,u){for(u=u&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var c=e,g=t,y=a,N=l,O=g.flags;switch(g.tag){case 0:case 11:case 15:Gn(c,g,y,N,u),Vl(8,g);break;case 23:break;case 22:var H=g.stateNode;g.memoizedState!==null?H._visibility&2?Gn(c,g,y,N,u):ql(c,g):(H._visibility|=2,Gn(c,g,y,N,u)),u&&O&2048&&Hu(g.alternate,g);break;case 24:Gn(c,g,y,N,u),u&&O&2048&&Vu(g.alternate,g);break;default:Gn(c,g,y,N,u)}t=t.sibling}}function ql(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,u=l.flags;switch(l.tag){case 22:ql(a,l),u&2048&&Hu(l.alternate,l);break;case 24:ql(a,l),u&2048&&Vu(l.alternate,l);break;default:ql(a,l)}t=t.sibling}}var Gl=8192;function Yn(e){if(e.subtreeFlags&Gl)for(e=e.child;e!==null;)hh(e),e=e.sibling}function hh(e){switch(e.tag){case 26:Yn(e),e.flags&Gl&&e.memoizedState!==null&&y0(Vt,e.memoizedState,e.memoizedProps);break;case 5:Yn(e);break;case 3:case 4:var t=Vt;Vt=wr(e.stateNode.containerInfo),Yn(e),Vt=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Gl,Gl=16777216,Yn(e),Gl=t):Yn(e));break;default:Yn(e)}}function ph(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Yl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Pe=l,gh(l,e)}ph(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)mh(e),e=e.sibling}function mh(e){switch(e.tag){case 0:case 11:case 15:Yl(e),e.flags&2048&&Aa(9,e,e.return);break;case 3:Yl(e);break;case 12:Yl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,pr(e)):Yl(e);break;default:Yl(e)}}function pr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Pe=l,gh(l,e)}ph(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Aa(8,t,t.return),pr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,pr(t));break;default:pr(t)}e=e.sibling}}function gh(e,t){for(;Pe!==null;){var a=Pe;switch(a.tag){case 0:case 11:case 15:Aa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:wl(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Pe=l;else e:for(a=e;Pe!==null;){l=Pe;var u=l.sibling,c=l.return;if(sh(l),l===a){Pe=null;break e}if(u!==null){u.return=c,Pe=u;break e}Pe=c}}}var Dy={getCacheForType:function(e){var t=lt(Qe),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},_y=typeof WeakMap=="function"?WeakMap:Map,Ne=0,ke=null,de=null,ve=0,Ee=0,Et=null,La=!1,Qn=!1,$u=!1,da=0,Be=0,za=0,on=0,qu=0,_t=0,Zn=0,Ql=null,pt=null,Gu=!1,Yu=0,mr=1/0,gr=null,Da=null,et=0,_a=null,Kn=null,Xn=0,Qu=0,Zu=null,vh=null,Zl=0,Ku=null;function Rt(){if((Ne&2)!==0&&ve!==0)return ve&-ve;if(_.T!==null){var e=_n;return e!==0?e:eo()}return Lc()}function yh(){_t===0&&(_t=(ve&536870912)===0||Se?jc():536870912);var e=Dt.current;return e!==null&&(e.flags|=32),_t}function Tt(e,t,a){(e===ke&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)&&(Jn(e,0),Ma(e,ve,_t,!1)),cl(e,a),((Ne&2)===0||e!==ke)&&(e===ke&&((Ne&2)===0&&(on|=a),Be===4&&Ma(e,ve,_t,!1)),Ft(e))}function bh(e,t,a){if((Ne&6)!==0)throw Error(s(327));var l=!a&&(t&124)===0&&(t&e.expiredLanes)===0||ol(e,t),u=l?By(e,t):Fu(e,t,!0),c=l;do{if(u===0){Qn&&!l&&Ma(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!My(a)){u=Fu(e,t,!1),c=!1;continue}if(u===2){if(c=t,e.errorRecoveryDisabledLanes&c)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var y=e;u=Ql;var N=y.current.memoizedState.isDehydrated;if(N&&(Jn(y,g).flags|=256),g=Fu(y,g,!1),g!==2){if($u&&!N){y.errorRecoveryDisabledLanes|=c,on|=c,u=4;break e}c=pt,pt=u,c!==null&&(pt===null?pt=c:pt.push.apply(pt,c))}u=g}if(c=!1,u!==2)continue}}if(u===1){Jn(e,0),Ma(e,t,0,!0);break}e:{switch(l=e,c=u,c){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:Ma(l,t,_t,!La);break e;case 2:pt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(u=Yu+300-Qt(),10<u)){if(Ma(l,t,_t,!La),Ci(l,0,!0)!==0)break e;l.timeoutHandle=Xh(Sh.bind(null,l,a,pt,gr,Gu,t,_t,on,Zn,La,c,2,-0,0),u);break e}Sh(l,a,pt,gr,Gu,t,_t,on,Zn,La,c,0,-0,0)}}break}while(!0);Ft(e)}function Sh(e,t,a,l,u,c,g,y,N,O,H,q,k,L){if(e.timeoutHandle=-1,q=t.subtreeFlags,(q&8192||(q&16785408)===16785408)&&(Il={stylesheets:null,count:0,unsuspend:v0},hh(t),q=b0(),q!==null)){e.cancelPendingCommit=q(Ch.bind(null,e,t,c,a,l,u,g,y,N,H,1,k,L)),Ma(e,c,g,!O);return}Ch(e,t,c,a,l,u,g,y,N)}function My(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var u=a[l],c=u.getSnapshot;u=u.value;try{if(!bt(c(),u))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ma(e,t,a,l){t&=~qu,t&=~on,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var u=t;0<u;){var c=31-yt(u),g=1<<c;l[c]=-1,u&=~g}a!==0&&Oc(e,a,t)}function vr(){return(Ne&6)===0?(Kl(0),!1):!0}function Xu(){if(de!==null){if(Ee===0)var e=de.return;else e=de,la=an=null,fu(e),$n=null,Ul=0,e=de;for(;e!==null;)Id(e.alternate,e),e=e.return;de=null}}function Jn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,e0(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Xu(),ke=e,de=a=ta(e.current,null),ve=t,Ee=0,Et=null,La=!1,Qn=ol(e,t),$u=!1,Zn=_t=qu=on=za=Be=0,pt=Ql=null,Gu=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var u=31-yt(l),c=1<<u;t|=e[u],l&=~c}return da=t,Hi(),a}function xh(e,t){ce=null,_.H=lr,t===jl||t===Xi?(t=Bf(),Ee=3):t===_f?(t=Bf(),Ee=4):Ee=t===Hd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Et=t,de===null&&(Be=1,or(e,Ot(t,e.current)))}function Nh(){var e=_.H;return _.H=lr,e===null?lr:e}function Eh(){var e=_.A;return _.A=Dy,e}function Ju(){Be=4,La||(ve&4194048)!==ve&&Dt.current!==null||(Qn=!0),(za&134217727)===0&&(on&134217727)===0||ke===null||Ma(ke,ve,_t,!1)}function Fu(e,t,a){var l=Ne;Ne|=2;var u=Nh(),c=Eh();(ke!==e||ve!==t)&&(gr=null,Jn(e,t)),t=!1;var g=Be;e:do try{if(Ee!==0&&de!==null){var y=de,N=Et;switch(Ee){case 8:Xu(),g=6;break e;case 3:case 2:case 9:case 6:Dt.current===null&&(t=!0);var O=Ee;if(Ee=0,Et=null,Fn(e,y,N,O),a&&Qn){g=0;break e}break;default:O=Ee,Ee=0,Et=null,Fn(e,y,N,O)}}Uy(),g=Be;break}catch(H){xh(e,H)}while(!0);return t&&e.shellSuspendCounter++,la=an=null,Ne=l,_.H=u,_.A=c,de===null&&(ke=null,ve=0,Hi()),g}function Uy(){for(;de!==null;)Rh(de)}function By(e,t){var a=Ne;Ne|=2;var l=Nh(),u=Eh();ke!==e||ve!==t?(gr=null,mr=Qt()+500,Jn(e,t)):Qn=ol(e,t);e:do try{if(Ee!==0&&de!==null){t=de;var c=Et;t:switch(Ee){case 1:Ee=0,Et=null,Fn(e,t,c,1);break;case 2:case 9:if(Mf(c)){Ee=0,Et=null,Th(t);break}t=function(){Ee!==2&&Ee!==9||ke!==e||(Ee=7),Ft(e)},c.then(t,t);break e;case 3:Ee=7;break e;case 4:Ee=5;break e;case 7:Mf(c)?(Ee=0,Et=null,Th(t)):(Ee=0,Et=null,Fn(e,t,c,7));break;case 5:var g=null;switch(de.tag){case 26:g=de.memoizedState;case 5:case 27:var y=de;if(!g||rp(g)){Ee=0,Et=null;var N=y.sibling;if(N!==null)de=N;else{var O=y.return;O!==null?(de=O,yr(O)):de=null}break t}}Ee=0,Et=null,Fn(e,t,c,5);break;case 6:Ee=0,Et=null,Fn(e,t,c,6);break;case 8:Xu(),Be=6;break e;default:throw Error(s(462))}}Hy();break}catch(H){xh(e,H)}while(!0);return la=an=null,_.H=l,_.A=u,Ne=a,de!==null?0:(ke=null,ve=0,Hi(),Be)}function Hy(){for(;de!==null&&!sv();)Rh(de)}function Rh(e){var t=Pd(e.alternate,e,da);e.memoizedProps=e.pendingProps,t===null?yr(e):de=t}function Th(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Qd(a,t,t.pendingProps,t.type,void 0,ve);break;case 11:t=Qd(a,t,t.pendingProps,t.type.render,t.ref,ve);break;case 5:fu(t);default:Id(a,t),t=de=wf(t,da),t=Pd(a,t,da)}e.memoizedProps=e.pendingProps,t===null?yr(e):de=t}function Fn(e,t,a,l){la=an=null,fu(t),$n=null,Ul=0;var u=t.return;try{if(jy(e,u,t,a,ve)){Be=1,or(e,Ot(a,e.current)),de=null;return}}catch(c){if(u!==null)throw de=u,c;Be=1,or(e,Ot(a,e.current)),de=null;return}t.flags&32768?(Se||l===1?e=!0:Qn||(ve&536870912)!==0?e=!1:(La=e=!0,(l===2||l===9||l===3||l===6)&&(l=Dt.current,l!==null&&l.tag===13&&(l.flags|=16384))),wh(t,e)):yr(t)}function yr(e){var t=e;do{if((t.flags&32768)!==0){wh(t,La);return}e=t.return;var a=Oy(t.alternate,t,da);if(a!==null){de=a;return}if(t=t.sibling,t!==null){de=t;return}de=t=e}while(t!==null);Be===0&&(Be=5)}function wh(e,t){do{var a=ky(e.alternate,e);if(a!==null){a.flags&=32767,de=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){de=e;return}de=e=a}while(e!==null);Be=6,de=null}function Ch(e,t,a,l,u,c,g,y,N){e.cancelPendingCommit=null;do br();while(et!==0);if((Ne&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(c=t.lanes|t.childLanes,c|=Vs,vv(e,a,c,g,y,N),e===ke&&(de=ke=null,ve=0),Kn=t,_a=e,Xn=a,Qu=c,Zu=u,vh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Gy(Ri,function(){return Lh(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=_.T,_.T=null,u=Y.p,Y.p=2,g=Ne,Ne|=4;try{Ly(e,t,a)}finally{Ne=g,Y.p=u,_.T=l}}et=1,jh(),Ah(),Oh()}}function jh(){if(et===1){et=0;var e=_a,t=Kn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=_.T,_.T=null;var l=Y.p;Y.p=2;var u=Ne;Ne|=4;try{ch(t,e);var c=uo,g=gf(e.containerInfo),y=c.focusedElem,N=c.selectionRange;if(g!==y&&y&&y.ownerDocument&&mf(y.ownerDocument.documentElement,y)){if(N!==null&&_s(y)){var O=N.start,H=N.end;if(H===void 0&&(H=O),"selectionStart"in y)y.selectionStart=O,y.selectionEnd=Math.min(H,y.value.length);else{var q=y.ownerDocument||document,k=q&&q.defaultView||window;if(k.getSelection){var L=k.getSelection(),le=y.textContent.length,te=Math.min(N.start,le),je=N.end===void 0?te:Math.min(N.end,le);!L.extend&&te>je&&(g=je,je=te,te=g);var j=pf(y,te),w=pf(y,je);if(j&&w&&(L.rangeCount!==1||L.anchorNode!==j.node||L.anchorOffset!==j.offset||L.focusNode!==w.node||L.focusOffset!==w.offset)){var A=q.createRange();A.setStart(j.node,j.offset),L.removeAllRanges(),te>je?(L.addRange(A),L.extend(w.node,w.offset)):(A.setEnd(w.node,w.offset),L.addRange(A))}}}}for(q=[],L=y;L=L.parentNode;)L.nodeType===1&&q.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<q.length;y++){var V=q[y];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}kr=!!so,uo=so=null}finally{Ne=u,Y.p=l,_.T=a}}e.current=t,et=2}}function Ah(){if(et===2){et=0;var e=_a,t=Kn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=_.T,_.T=null;var l=Y.p;Y.p=2;var u=Ne;Ne|=4;try{rh(e,t.alternate,t)}finally{Ne=u,Y.p=l,_.T=a}}et=3}}function Oh(){if(et===4||et===3){et=0,uv();var e=_a,t=Kn,a=Xn,l=vh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?et=5:(et=0,Kn=_a=null,kh(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Da=null),ps(a),t=t.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(ul,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=_.T,u=Y.p,Y.p=2,_.T=null;try{for(var c=e.onRecoverableError,g=0;g<l.length;g++){var y=l[g];c(y.value,{componentStack:y.stack})}}finally{_.T=t,Y.p=u}}(Xn&3)!==0&&br(),Ft(e),u=e.pendingLanes,(a&4194090)!==0&&(u&42)!==0?e===Ku?Zl++:(Zl=0,Ku=e):Zl=0,Kl(0)}}function kh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,wl(t)))}function br(e){return jh(),Ah(),Oh(),Lh()}function Lh(){if(et!==5)return!1;var e=_a,t=Qu;Qu=0;var a=ps(Xn),l=_.T,u=Y.p;try{Y.p=32>a?32:a,_.T=null,a=Zu,Zu=null;var c=_a,g=Xn;if(et=0,Kn=_a=null,Xn=0,(Ne&6)!==0)throw Error(s(331));var y=Ne;if(Ne|=4,mh(c.current),dh(c,c.current,g,a),Ne=y,Kl(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(ul,c)}catch{}return!0}finally{Y.p=u,_.T=l,kh(e,t)}}function zh(e,t,a){t=Ot(a,t),t=Tu(e.stateNode,t,2),e=Ta(e,t,2),e!==null&&(cl(e,2),Ft(e))}function Ae(e,t,a){if(e.tag===3)zh(e,e,a);else for(;t!==null;){if(t.tag===3){zh(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Da===null||!Da.has(l))){e=Ot(a,e),a=Ud(2),l=Ta(t,a,2),l!==null&&(Bd(a,l,t,e),cl(l,2),Ft(l));break}}t=t.return}}function Pu(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new _y;var u=new Set;l.set(t,u)}else u=l.get(t),u===void 0&&(u=new Set,l.set(t,u));u.has(a)||($u=!0,u.add(a),e=Vy.bind(null,e,t,a),t.then(e,e))}function Vy(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ke===e&&(ve&a)===a&&(Be===4||Be===3&&(ve&62914560)===ve&&300>Qt()-Yu?(Ne&2)===0&&Jn(e,0):qu|=a,Zn===ve&&(Zn=0)),Ft(e)}function Dh(e,t){t===0&&(t=Ac()),e=kn(e,t),e!==null&&(cl(e,t),Ft(e))}function $y(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Dh(e,a)}function qy(e,t){var a=0;switch(e.tag){case 13:var l=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(t),Dh(e,a)}function Gy(e,t){return cs(e,t)}var Sr=null,Pn=null,Wu=!1,xr=!1,Iu=!1,cn=0;function Ft(e){e!==Pn&&e.next===null&&(Pn===null?Sr=Pn=e:Pn=Pn.next=e),xr=!0,Wu||(Wu=!0,Qy())}function Kl(e,t){if(!Iu&&xr){Iu=!0;do for(var a=!1,l=Sr;l!==null;){if(e!==0){var u=l.pendingLanes;if(u===0)var c=0;else{var g=l.suspendedLanes,y=l.pingedLanes;c=(1<<31-yt(42|e)+1)-1,c&=u&~(g&~y),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,Bh(l,c))}else c=ve,c=Ci(l,l===ke?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||ol(l,c)||(a=!0,Bh(l,c));l=l.next}while(a);Iu=!1}}function Yy(){_h()}function _h(){xr=Wu=!1;var e=0;cn!==0&&(Iy()&&(e=cn),cn=0);for(var t=Qt(),a=null,l=Sr;l!==null;){var u=l.next,c=Mh(l,t);c===0?(l.next=null,a===null?Sr=u:a.next=u,u===null&&(Pn=a)):(a=l,(e!==0||(c&3)!==0)&&(xr=!0)),l=u}Kl(e)}function Mh(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var g=31-yt(c),y=1<<g,N=u[g];N===-1?((y&a)===0||(y&l)!==0)&&(u[g]=gv(y,t)):N<=t&&(e.expiredLanes|=y),c&=~y}if(t=ke,a=ve,a=Ci(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&fs(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ol(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&fs(l),ps(a)){case 2:case 8:a=wc;break;case 32:a=Ri;break;case 268435456:a=Cc;break;default:a=Ri}return l=Uh.bind(null,e),a=cs(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&fs(l),e.callbackPriority=2,e.callbackNode=null,2}function Uh(e,t){if(et!==0&&et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(br()&&e.callbackNode!==a)return null;var l=ve;return l=Ci(e,e===ke?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(bh(e,l,t),Mh(e,Qt()),e.callbackNode!=null&&e.callbackNode===a?Uh.bind(null,e):null)}function Bh(e,t){if(br())return null;bh(e,t,!0)}function Qy(){t0(function(){(Ne&6)!==0?cs(Tc,Yy):_h()})}function eo(){return cn===0&&(cn=jc()),cn}function Hh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Li(""+e)}function Vh(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Zy(e,t,a,l,u){if(t==="submit"&&a&&a.stateNode===u){var c=Hh((u[ct]||null).action),g=l.submitter;g&&(t=(t=g[ct]||null)?Hh(t.formAction):g.getAttribute("formAction"),t!==null&&(c=t,g=null));var y=new Mi("action","action",null,l,u);e.push({event:y,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(cn!==0){var N=g?Vh(u,g):new FormData(u);Su(a,{pending:!0,data:N,method:u.method,action:c},null,N)}}else typeof c=="function"&&(y.preventDefault(),N=g?Vh(u,g):new FormData(u),Su(a,{pending:!0,data:N,method:u.method,action:c},c,N))},currentTarget:u}]})}}for(var to=0;to<Hs.length;to++){var ao=Hs[to],Ky=ao.toLowerCase(),Xy=ao[0].toUpperCase()+ao.slice(1);Ht(Ky,"on"+Xy)}Ht(bf,"onAnimationEnd"),Ht(Sf,"onAnimationIteration"),Ht(xf,"onAnimationStart"),Ht("dblclick","onDoubleClick"),Ht("focusin","onFocus"),Ht("focusout","onBlur"),Ht(fy,"onTransitionRun"),Ht(dy,"onTransitionStart"),Ht(hy,"onTransitionCancel"),Ht(Nf,"onTransitionEnd"),xn("onMouseEnter",["mouseout","mouseover"]),xn("onMouseLeave",["mouseout","mouseover"]),xn("onPointerEnter",["pointerout","pointerover"]),xn("onPointerLeave",["pointerout","pointerover"]),Ka("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ka("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ka("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ka("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ka("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ka("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Jy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xl));function $h(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],u=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var g=l.length-1;0<=g;g--){var y=l[g],N=y.instance,O=y.currentTarget;if(y=y.listener,N!==c&&u.isPropagationStopped())break e;c=y,u.currentTarget=O;try{c(u)}catch(H){ur(H)}u.currentTarget=null,c=N}else for(g=0;g<l.length;g++){if(y=l[g],N=y.instance,O=y.currentTarget,y=y.listener,N!==c&&u.isPropagationStopped())break e;c=y,u.currentTarget=O;try{c(u)}catch(H){ur(H)}u.currentTarget=null,c=N}}}}function he(e,t){var a=t[ms];a===void 0&&(a=t[ms]=new Set);var l=e+"__bubble";a.has(l)||(qh(t,e,2,!1),a.add(l))}function no(e,t,a){var l=0;t&&(l|=4),qh(a,e,l,t)}var Nr="_reactListening"+Math.random().toString(36).slice(2);function lo(e){if(!e[Nr]){e[Nr]=!0,Dc.forEach(function(a){a!=="selectionchange"&&(Jy.has(a)||no(a,!1,e),no(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nr]||(t[Nr]=!0,no("selectionchange",!1,t))}}function qh(e,t,a,l){switch(dp(t)){case 2:var u=N0;break;case 8:u=E0;break;default:u=bo}a=u.bind(null,t,a,e),u=void 0,!ws||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(t,a,{capture:!0,passive:u}):e.addEventListener(t,a,!0):u!==void 0?e.addEventListener(t,a,{passive:u}):e.addEventListener(t,a,!1)}function io(e,t,a,l,u){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var g=l.tag;if(g===3||g===4){var y=l.stateNode.containerInfo;if(y===u)break;if(g===4)for(g=l.return;g!==null;){var N=g.tag;if((N===3||N===4)&&g.stateNode.containerInfo===u)return;g=g.return}for(;y!==null;){if(g=yn(y),g===null)return;if(N=g.tag,N===5||N===6||N===26||N===27){l=c=g;continue e}y=y.parentNode}}l=l.return}Xc(function(){var O=c,H=Rs(a),q=[];e:{var k=Ef.get(e);if(k!==void 0){var L=Mi,le=e;switch(e){case"keypress":if(Di(a)===0)break e;case"keydown":case"keyup":L=Gv;break;case"focusin":le="focus",L=Os;break;case"focusout":le="blur",L=Os;break;case"beforeblur":case"afterblur":L=Os;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=Pc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=kv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=Zv;break;case bf:case Sf:case xf:L=Dv;break;case Nf:L=Xv;break;case"scroll":case"scrollend":L=Av;break;case"wheel":L=Fv;break;case"copy":case"cut":case"paste":L=Mv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=Ic;break;case"toggle":case"beforetoggle":L=Wv}var te=(t&4)!==0,je=!te&&(e==="scroll"||e==="scrollend"),j=te?k!==null?k+"Capture":null:k;te=[];for(var w=O,A;w!==null;){var V=w;if(A=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||A===null||j===null||(V=hl(w,j),V!=null&&te.push(Jl(w,V,A))),je)break;w=w.return}0<te.length&&(k=new L(k,le,null,a,H),q.push({event:k,listeners:te}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",k&&a!==Es&&(le=a.relatedTarget||a.fromElement)&&(yn(le)||le[vn]))break e;if((L||k)&&(k=H.window===H?H:(k=H.ownerDocument)?k.defaultView||k.parentWindow:window,L?(le=a.relatedTarget||a.toElement,L=O,le=le?yn(le):null,le!==null&&(je=f(le),te=le.tag,le!==je||te!==5&&te!==27&&te!==6)&&(le=null)):(L=null,le=O),L!==le)){if(te=Pc,V="onMouseLeave",j="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(te=Ic,V="onPointerLeave",j="onPointerEnter",w="pointer"),je=L==null?k:dl(L),A=le==null?k:dl(le),k=new te(V,w+"leave",L,a,H),k.target=je,k.relatedTarget=A,V=null,yn(H)===O&&(te=new te(j,w+"enter",le,a,H),te.target=A,te.relatedTarget=je,V=te),je=V,L&&le)t:{for(te=L,j=le,w=0,A=te;A;A=Wn(A))w++;for(A=0,V=j;V;V=Wn(V))A++;for(;0<w-A;)te=Wn(te),w--;for(;0<A-w;)j=Wn(j),A--;for(;w--;){if(te===j||j!==null&&te===j.alternate)break t;te=Wn(te),j=Wn(j)}te=null}else te=null;L!==null&&Gh(q,k,L,te,!1),le!==null&&je!==null&&Gh(q,je,le,te,!0)}}e:{if(k=O?dl(O):window,L=k.nodeName&&k.nodeName.toLowerCase(),L==="select"||L==="input"&&k.type==="file")var X=uf;else if(rf(k))if(of)X=uy;else{X=ry;var fe=iy}else L=k.nodeName,!L||L.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?O&&Ns(O.elementType)&&(X=uf):X=sy;if(X&&(X=X(e,O))){sf(q,X,a,H);break e}fe&&fe(e,k,O),e==="focusout"&&O&&k.type==="number"&&O.memoizedProps.value!=null&&xs(k,"number",k.value)}switch(fe=O?dl(O):window,e){case"focusin":(rf(fe)||fe.contentEditable==="true")&&(jn=fe,Ms=O,xl=null);break;case"focusout":xl=Ms=jn=null;break;case"mousedown":Us=!0;break;case"contextmenu":case"mouseup":case"dragend":Us=!1,vf(q,a,H);break;case"selectionchange":if(cy)break;case"keydown":case"keyup":vf(q,a,H)}var P;if(Ls)e:{switch(e){case"compositionstart":var ae="onCompositionStart";break e;case"compositionend":ae="onCompositionEnd";break e;case"compositionupdate":ae="onCompositionUpdate";break e}ae=void 0}else Cn?nf(e,a)&&(ae="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ae="onCompositionStart");ae&&(ef&&a.locale!=="ko"&&(Cn||ae!=="onCompositionStart"?ae==="onCompositionEnd"&&Cn&&(P=Jc()):(xa=H,Cs="value"in xa?xa.value:xa.textContent,Cn=!0)),fe=Er(O,ae),0<fe.length&&(ae=new Wc(ae,e,null,a,H),q.push({event:ae,listeners:fe}),P?ae.data=P:(P=lf(a),P!==null&&(ae.data=P)))),(P=ey?ty(e,a):ay(e,a))&&(ae=Er(O,"onBeforeInput"),0<ae.length&&(fe=new Wc("onBeforeInput","beforeinput",null,a,H),q.push({event:fe,listeners:ae}),fe.data=P)),Zy(q,e,O,a,H)}$h(q,t)})}function Jl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Er(e,t){for(var a=t+"Capture",l=[];e!==null;){var u=e,c=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||c===null||(u=hl(e,a),u!=null&&l.unshift(Jl(e,u,c)),u=hl(e,t),u!=null&&l.push(Jl(e,u,c))),e.tag===3)return l;e=e.return}return[]}function Wn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Gh(e,t,a,l,u){for(var c=t._reactName,g=[];a!==null&&a!==l;){var y=a,N=y.alternate,O=y.stateNode;if(y=y.tag,N!==null&&N===l)break;y!==5&&y!==26&&y!==27||O===null||(N=O,u?(O=hl(a,c),O!=null&&g.unshift(Jl(a,O,N))):u||(O=hl(a,c),O!=null&&g.push(Jl(a,O,N)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var Fy=/\r\n?/g,Py=/\u0000|\uFFFD/g;function Yh(e){return(typeof e=="string"?e:""+e).replace(Fy,`
|
|
59
|
-
`).replace(Py,"")}function Qh(e,t){return t=Yh(t),Yh(e)===t}function Rr(){}function Ce(e,t,a,l,u,c){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Rn(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Rn(e,""+l);break;case"className":Ai(e,"class",l);break;case"tabIndex":Ai(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ai(e,a,l);break;case"style":Zc(e,l,c);break;case"data":if(t!=="object"){Ai(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Li(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(a==="formAction"?(t!=="input"&&Ce(e,t,"name",u.name,u,null),Ce(e,t,"formEncType",u.formEncType,u,null),Ce(e,t,"formMethod",u.formMethod,u,null),Ce(e,t,"formTarget",u.formTarget,u,null)):(Ce(e,t,"encType",u.encType,u,null),Ce(e,t,"method",u.method,u,null),Ce(e,t,"target",u.target,u,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Li(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Rr);break;case"onScroll":l!=null&&he("scroll",e);break;case"onScrollEnd":l!=null&&he("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(u.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Li(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":he("beforetoggle",e),he("toggle",e),ji(e,"popover",l);break;case"xlinkActuate":It(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":It(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":It(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":It(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":It(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":It(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":It(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":It(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":It(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ji(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Cv.get(a)||a,ji(e,a,l))}}function ro(e,t,a,l,u,c){switch(a){case"style":Zc(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(u.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Rn(e,l):(typeof l=="number"||typeof l=="bigint")&&Rn(e,""+l);break;case"onScroll":l!=null&&he("scroll",e);break;case"onScrollEnd":l!=null&&he("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Rr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_c.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),c=e[ct]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,u),typeof l=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,u);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):ji(e,a,l)}}}function tt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":he("error",e),he("load",e);var l=!1,u=!1,c;for(c in a)if(a.hasOwnProperty(c)){var g=a[c];if(g!=null)switch(c){case"src":l=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ce(e,t,c,g,a,null)}}u&&Ce(e,t,"srcSet",a.srcSet,a,null),l&&Ce(e,t,"src",a.src,a,null);return;case"input":he("invalid",e);var y=c=g=u=null,N=null,O=null;for(l in a)if(a.hasOwnProperty(l)){var H=a[l];if(H!=null)switch(l){case"name":u=H;break;case"type":g=H;break;case"checked":N=H;break;case"defaultChecked":O=H;break;case"value":c=H;break;case"defaultValue":y=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(s(137,t));break;default:Ce(e,t,l,H,a,null)}}qc(e,c,y,N,O,g,u,!1),Oi(e);return;case"select":he("invalid",e),l=g=c=null;for(u in a)if(a.hasOwnProperty(u)&&(y=a[u],y!=null))switch(u){case"value":c=y;break;case"defaultValue":g=y;break;case"multiple":l=y;default:Ce(e,t,u,y,a,null)}t=c,a=g,e.multiple=!!l,t!=null?En(e,!!l,t,!1):a!=null&&En(e,!!l,a,!0);return;case"textarea":he("invalid",e),c=u=l=null;for(g in a)if(a.hasOwnProperty(g)&&(y=a[g],y!=null))switch(g){case"value":l=y;break;case"defaultValue":u=y;break;case"children":c=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(s(91));break;default:Ce(e,t,g,y,a,null)}Yc(e,l,u,c),Oi(e);return;case"option":for(N in a)if(a.hasOwnProperty(N)&&(l=a[N],l!=null))switch(N){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ce(e,t,N,l,a,null)}return;case"dialog":he("beforetoggle",e),he("toggle",e),he("cancel",e),he("close",e);break;case"iframe":case"object":he("load",e);break;case"video":case"audio":for(l=0;l<Xl.length;l++)he(Xl[l],e);break;case"image":he("error",e),he("load",e);break;case"details":he("toggle",e);break;case"embed":case"source":case"link":he("error",e),he("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(O in a)if(a.hasOwnProperty(O)&&(l=a[O],l!=null))switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ce(e,t,O,l,a,null)}return;default:if(Ns(t)){for(H in a)a.hasOwnProperty(H)&&(l=a[H],l!==void 0&&ro(e,t,H,l,a,void 0));return}}for(y in a)a.hasOwnProperty(y)&&(l=a[y],l!=null&&Ce(e,t,y,l,a,null))}function Wy(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,c=null,g=null,y=null,N=null,O=null,H=null;for(L in a){var q=a[L];if(a.hasOwnProperty(L)&&q!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":N=q;default:l.hasOwnProperty(L)||Ce(e,t,L,null,l,q)}}for(var k in l){var L=l[k];if(q=a[k],l.hasOwnProperty(k)&&(L!=null||q!=null))switch(k){case"type":c=L;break;case"name":u=L;break;case"checked":O=L;break;case"defaultChecked":H=L;break;case"value":g=L;break;case"defaultValue":y=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(s(137,t));break;default:L!==q&&Ce(e,t,k,L,l,q)}}Ss(e,g,y,N,O,H,c,u);return;case"select":L=g=y=k=null;for(c in a)if(N=a[c],a.hasOwnProperty(c)&&N!=null)switch(c){case"value":break;case"multiple":L=N;default:l.hasOwnProperty(c)||Ce(e,t,c,null,l,N)}for(u in l)if(c=l[u],N=a[u],l.hasOwnProperty(u)&&(c!=null||N!=null))switch(u){case"value":k=c;break;case"defaultValue":y=c;break;case"multiple":g=c;default:c!==N&&Ce(e,t,u,c,l,N)}t=y,a=g,l=L,k!=null?En(e,!!a,k,!1):!!l!=!!a&&(t!=null?En(e,!!a,t,!0):En(e,!!a,a?[]:"",!1));return;case"textarea":L=k=null;for(y in a)if(u=a[y],a.hasOwnProperty(y)&&u!=null&&!l.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:Ce(e,t,y,null,l,u)}for(g in l)if(u=l[g],c=a[g],l.hasOwnProperty(g)&&(u!=null||c!=null))switch(g){case"value":k=u;break;case"defaultValue":L=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(s(91));break;default:u!==c&&Ce(e,t,g,u,l,c)}Gc(e,k,L);return;case"option":for(var le in a)if(k=a[le],a.hasOwnProperty(le)&&k!=null&&!l.hasOwnProperty(le))switch(le){case"selected":e.selected=!1;break;default:Ce(e,t,le,null,l,k)}for(N in l)if(k=l[N],L=a[N],l.hasOwnProperty(N)&&k!==L&&(k!=null||L!=null))switch(N){case"selected":e.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:Ce(e,t,N,k,l,L)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var te in a)k=a[te],a.hasOwnProperty(te)&&k!=null&&!l.hasOwnProperty(te)&&Ce(e,t,te,null,l,k);for(O in l)if(k=l[O],L=a[O],l.hasOwnProperty(O)&&k!==L&&(k!=null||L!=null))switch(O){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(s(137,t));break;default:Ce(e,t,O,k,l,L)}return;default:if(Ns(t)){for(var je in a)k=a[je],a.hasOwnProperty(je)&&k!==void 0&&!l.hasOwnProperty(je)&&ro(e,t,je,void 0,l,k);for(H in l)k=l[H],L=a[H],!l.hasOwnProperty(H)||k===L||k===void 0&&L===void 0||ro(e,t,H,k,l,L);return}}for(var j in a)k=a[j],a.hasOwnProperty(j)&&k!=null&&!l.hasOwnProperty(j)&&Ce(e,t,j,null,l,k);for(q in l)k=l[q],L=a[q],!l.hasOwnProperty(q)||k===L||k==null&&L==null||Ce(e,t,q,k,l,L)}var so=null,uo=null;function Tr(e){return e.nodeType===9?e:e.ownerDocument}function Zh(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Kh(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function oo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var co=null;function Iy(){var e=window.event;return e&&e.type==="popstate"?e===co?!1:(co=e,!0):(co=null,!1)}var Xh=typeof setTimeout=="function"?setTimeout:void 0,e0=typeof clearTimeout=="function"?clearTimeout:void 0,Jh=typeof Promise=="function"?Promise:void 0,t0=typeof queueMicrotask=="function"?queueMicrotask:typeof Jh<"u"?function(e){return Jh.resolve(null).then(e).catch(a0)}:Xh;function a0(e){setTimeout(function(){throw e})}function Ua(e){return e==="head"}function Fh(e,t){var a=t,l=0,u=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"){if(0<l&&8>l){a=l;var g=e.ownerDocument;if(a&1&&Fl(g.documentElement),a&2&&Fl(g.body),a&4)for(a=g.head,Fl(a),g=a.firstChild;g;){var y=g.nextSibling,N=g.nodeName;g[fl]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&g.rel.toLowerCase()==="stylesheet"||a.removeChild(g),g=y}}if(u===0){e.removeChild(c),li(t);return}u--}else a==="$"||a==="$?"||a==="$!"?u++:l=a.charCodeAt(0)-48;else l=0;a=c}while(a);li(t)}function fo(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":fo(a),gs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function n0(e,t,a,l){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[fl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=$t(e.nextSibling),e===null)break}return null}function l0(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=$t(e.nextSibling),e===null))return null;return e}function ho(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function i0(e,t){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function $t(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var po=null;function Ph(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}function Wh(e,t,a){switch(t=Tr(a),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function Fl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);gs(e)}var Mt=new Map,Ih=new Set;function wr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ha=Y.d;Y.d={f:r0,r:s0,D:u0,C:o0,L:c0,m:f0,X:h0,S:d0,M:p0};function r0(){var e=ha.f(),t=vr();return e||t}function s0(e){var t=bn(e);t!==null&&t.tag===5&&t.type==="form"?bd(t):ha.r(e)}var In=typeof document>"u"?null:document;function ep(e,t,a){var l=In;if(l&&typeof t=="string"&&t){var u=At(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),Ih.has(u)||(Ih.add(u),e={rel:e,crossOrigin:a,href:t},l.querySelector(u)===null&&(t=l.createElement("link"),tt(t,"link",e),Je(t),l.head.appendChild(t)))}}function u0(e){ha.D(e),ep("dns-prefetch",e,null)}function o0(e,t){ha.C(e,t),ep("preconnect",e,t)}function c0(e,t,a){ha.L(e,t,a);var l=In;if(l&&e&&t){var u='link[rel="preload"][as="'+At(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+At(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+At(a.imageSizes)+'"]')):u+='[href="'+At(e)+'"]';var c=u;switch(t){case"style":c=el(e);break;case"script":c=tl(e)}Mt.has(c)||(e=v({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Mt.set(c,e),l.querySelector(u)!==null||t==="style"&&l.querySelector(Pl(c))||t==="script"&&l.querySelector(Wl(c))||(t=l.createElement("link"),tt(t,"link",e),Je(t),l.head.appendChild(t)))}}function f0(e,t){ha.m(e,t);var a=In;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+At(l)+'"][href="'+At(e)+'"]',c=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=tl(e)}if(!Mt.has(c)&&(e=v({rel:"modulepreload",href:e},t),Mt.set(c,e),a.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Wl(c)))return}l=a.createElement("link"),tt(l,"link",e),Je(l),a.head.appendChild(l)}}}function d0(e,t,a){ha.S(e,t,a);var l=In;if(l&&e){var u=Sn(l).hoistableStyles,c=el(e);t=t||"default";var g=u.get(c);if(!g){var y={loading:0,preload:null};if(g=l.querySelector(Pl(c)))y.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Mt.get(c))&&mo(e,a);var N=g=l.createElement("link");Je(N),tt(N,"link",e),N._p=new Promise(function(O,H){N.onload=O,N.onerror=H}),N.addEventListener("load",function(){y.loading|=1}),N.addEventListener("error",function(){y.loading|=2}),y.loading|=4,Cr(g,t,l)}g={type:"stylesheet",instance:g,count:1,state:y},u.set(c,g)}}}function h0(e,t){ha.X(e,t);var a=In;if(a&&e){var l=Sn(a).hoistableScripts,u=tl(e),c=l.get(u);c||(c=a.querySelector(Wl(u)),c||(e=v({src:e,async:!0},t),(t=Mt.get(u))&&go(e,t),c=a.createElement("script"),Je(c),tt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(u,c))}}function p0(e,t){ha.M(e,t);var a=In;if(a&&e){var l=Sn(a).hoistableScripts,u=tl(e),c=l.get(u);c||(c=a.querySelector(Wl(u)),c||(e=v({src:e,async:!0,type:"module"},t),(t=Mt.get(u))&&go(e,t),c=a.createElement("script"),Je(c),tt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(u,c))}}function tp(e,t,a,l){var u=(u=se.current)?wr(u):null;if(!u)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=el(a.href),a=Sn(u).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=el(a.href);var c=Sn(u).hoistableStyles,g=c.get(e);if(g||(u=u.ownerDocument||u,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,g),(c=u.querySelector(Pl(e)))&&!c._p&&(g.instance=c,g.state.loading=5),Mt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Mt.set(e,a),c||m0(u,e,a,g.state))),t&&l===null)throw Error(s(528,""));return g}if(t&&l!==null)throw Error(s(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=tl(a),a=Sn(u).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function el(e){return'href="'+At(e)+'"'}function Pl(e){return'link[rel="stylesheet"]['+e+"]"}function ap(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function m0(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),tt(t,"link",a),Je(t),e.head.appendChild(t))}function tl(e){return'[src="'+At(e)+'"]'}function Wl(e){return"script[async]"+e}function np(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+At(a.href)+'"]');if(l)return t.instance=l,Je(l),l;var u=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Je(l),tt(l,"style",u),Cr(l,a.precedence,e),t.instance=l;case"stylesheet":u=el(a.href);var c=e.querySelector(Pl(u));if(c)return t.state.loading|=4,t.instance=c,Je(c),c;l=ap(a),(u=Mt.get(u))&&mo(l,u),c=(e.ownerDocument||e).createElement("link"),Je(c);var g=c;return g._p=new Promise(function(y,N){g.onload=y,g.onerror=N}),tt(c,"link",l),t.state.loading|=4,Cr(c,a.precedence,e),t.instance=c;case"script":return c=tl(a.src),(u=e.querySelector(Wl(c)))?(t.instance=u,Je(u),u):(l=a,(u=Mt.get(c))&&(l=v({},a),go(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),Je(u),tt(u,"link",l),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Cr(l,a.precedence,e));return t.instance}function Cr(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=l.length?l[l.length-1]:null,c=u,g=0;g<l.length;g++){var y=l[g];if(y.dataset.precedence===t)c=y;else if(c!==u)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function mo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function go(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var jr=null;function lp(e,t,a){if(jr===null){var l=new Map,u=jr=new Map;u.set(a,l)}else u=jr,l=u.get(a),l||(l=new Map,u.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var c=a[u];if(!(c[fl]||c[nt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var g=c.getAttribute(t)||"";g=e+g;var y=l.get(g);y?y.push(c):l.set(g,[c])}}return l}function ip(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function g0(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function rp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Il=null;function v0(){}function y0(e,t,a){if(Il===null)throw Error(s(475));var l=Il;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var u=el(a.href),c=e.querySelector(Pl(u));if(c){e=c._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(l.count++,l=Ar.bind(l),e.then(l,l)),t.state.loading|=4,t.instance=c,Je(c);return}c=e.ownerDocument||e,a=ap(a),(u=Mt.get(u))&&mo(a,u),c=c.createElement("link"),Je(c);var g=c;g._p=new Promise(function(y,N){g.onload=y,g.onerror=N}),tt(c,"link",a),t.instance=c}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(l.count++,t=Ar.bind(l),e.addEventListener("load",t),e.addEventListener("error",t))}}function b0(){if(Il===null)throw Error(s(475));var e=Il;return e.stylesheets&&e.count===0&&vo(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&vo(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function Ar(){if(this.count--,this.count===0){if(this.stylesheets)vo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Or=null;function vo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Or=new Map,t.forEach(S0,e),Or=null,Ar.call(e))}function S0(e,t){if(!(t.state.loading&4)){var a=Or.get(e);if(a)var l=a.get(null);else{a=new Map,Or.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<u.length;c++){var g=u[c];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),l=g)}l&&a.set(null,l)}u=t.instance,g=u.getAttribute("data-precedence"),c=a.get(g)||l,c===l&&a.set(null,u),a.set(g,u),this.count++,l=Ar.bind(this),u.addEventListener("load",l),u.addEventListener("error",l),c?c.parentNode.insertBefore(u,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var ei={$$typeof:G,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function x0(e,t,a,l,u,c,g,y){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ds(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ds(0),this.hiddenUpdates=ds(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=c,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map}function sp(e,t,a,l,u,c,g,y,N,O,H,q){return e=new x0(e,t,a,g,y,N,O,q),t=1,c===!0&&(t|=24),c=St(3,null,null,t),e.current=c,c.stateNode=e,t=Ps(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:l,isDehydrated:a,cache:t},tu(c),e}function up(e){return e?(e=Ln,e):Ln}function op(e,t,a,l,u,c){u=up(u),l.context===null?l.context=u:l.pendingContext=u,l=Ra(t),l.payload={element:a},c=c===void 0?null:c,c!==null&&(l.callback=c),a=Ta(e,l,t),a!==null&&(Tt(a,e,t),Ol(a,e,t))}function cp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function yo(e,t){cp(e,t),(e=e.alternate)&&cp(e,t)}function fp(e){if(e.tag===13){var t=kn(e,67108864);t!==null&&Tt(t,e,67108864),yo(e,67108864)}}var kr=!0;function N0(e,t,a,l){var u=_.T;_.T=null;var c=Y.p;try{Y.p=2,bo(e,t,a,l)}finally{Y.p=c,_.T=u}}function E0(e,t,a,l){var u=_.T;_.T=null;var c=Y.p;try{Y.p=8,bo(e,t,a,l)}finally{Y.p=c,_.T=u}}function bo(e,t,a,l){if(kr){var u=So(l);if(u===null)io(e,t,l,Lr,a),hp(e,l);else if(T0(u,e,t,a,l))l.stopPropagation();else if(hp(e,l),t&4&&-1<R0.indexOf(e)){for(;u!==null;){var c=bn(u);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var g=Za(c.pendingLanes);if(g!==0){var y=c;for(y.pendingLanes|=2,y.entangledLanes|=2;g;){var N=1<<31-yt(g);y.entanglements[1]|=N,g&=~N}Ft(c),(Ne&6)===0&&(mr=Qt()+500,Kl(0))}}break;case 13:y=kn(c,2),y!==null&&Tt(y,c,2),vr(),yo(c,2)}if(c=So(l),c===null&&io(e,t,l,Lr,a),c===u)break;u=c}u!==null&&l.stopPropagation()}else io(e,t,l,null,a)}}function So(e){return e=Rs(e),xo(e)}var Lr=null;function xo(e){if(Lr=null,e=yn(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=p(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Lr=e,null}function dp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ov()){case Tc:return 2;case wc:return 8;case Ri:case cv:return 32;case Cc:return 268435456;default:return 32}default:return 32}}var No=!1,Ba=null,Ha=null,Va=null,ti=new Map,ai=new Map,$a=[],R0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function hp(e,t){switch(e){case"focusin":case"focusout":Ba=null;break;case"dragenter":case"dragleave":Ha=null;break;case"mouseover":case"mouseout":Va=null;break;case"pointerover":case"pointerout":ti.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ai.delete(t.pointerId)}}function ni(e,t,a,l,u,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:c,targetContainers:[u]},t!==null&&(t=bn(t),t!==null&&fp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function T0(e,t,a,l,u){switch(t){case"focusin":return Ba=ni(Ba,e,t,a,l,u),!0;case"dragenter":return Ha=ni(Ha,e,t,a,l,u),!0;case"mouseover":return Va=ni(Va,e,t,a,l,u),!0;case"pointerover":var c=u.pointerId;return ti.set(c,ni(ti.get(c)||null,e,t,a,l,u)),!0;case"gotpointercapture":return c=u.pointerId,ai.set(c,ni(ai.get(c)||null,e,t,a,l,u)),!0}return!1}function pp(e){var t=yn(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=p(a),t!==null){e.blockedOn=t,yv(e.priority,function(){if(a.tag===13){var l=Rt();l=hs(l);var u=kn(a,l);u!==null&&Tt(u,a,l),yo(a,l)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=So(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Es=l,a.target.dispatchEvent(l),Es=null}else return t=bn(a),t!==null&&fp(t),e.blockedOn=a,!1;t.shift()}return!0}function mp(e,t,a){zr(e)&&a.delete(t)}function w0(){No=!1,Ba!==null&&zr(Ba)&&(Ba=null),Ha!==null&&zr(Ha)&&(Ha=null),Va!==null&&zr(Va)&&(Va=null),ti.forEach(mp),ai.forEach(mp)}function Dr(e,t){e.blockedOn===t&&(e.blockedOn=null,No||(No=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,w0)))}var _r=null;function gp(e){_r!==e&&(_r=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){_r===e&&(_r=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],u=e[t+2];if(typeof l!="function"){if(xo(l||a)===null)continue;break}var c=bn(a);c!==null&&(e.splice(t,3),t-=3,Su(c,{pending:!0,data:u,method:a.method,action:l},l,u))}}))}function li(e){function t(N){return Dr(N,e)}Ba!==null&&Dr(Ba,e),Ha!==null&&Dr(Ha,e),Va!==null&&Dr(Va,e),ti.forEach(t),ai.forEach(t);for(var a=0;a<$a.length;a++){var l=$a[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<$a.length&&(a=$a[0],a.blockedOn===null);)pp(a),a.blockedOn===null&&$a.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var u=a[l],c=a[l+1],g=u[ct]||null;if(typeof c=="function")g||gp(a);else if(g){var y=null;if(c&&c.hasAttribute("formAction")){if(u=c,g=c[ct]||null)y=g.formAction;else if(xo(u)!==null)continue}else y=g.action;typeof y=="function"?a[l+1]=y:(a.splice(l,3),l-=3),gp(a)}}}function Eo(e){this._internalRoot=e}Mr.prototype.render=Eo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,l=Rt();op(a,l,e,t,null,null)},Mr.prototype.unmount=Eo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;op(e.current,2,null,e,null,null),vr(),t[vn]=null}};function Mr(e){this._internalRoot=e}Mr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Lc();e={blockedOn:null,target:e,priority:t};for(var a=0;a<$a.length&&t!==0&&t<$a[a].priority;a++);$a.splice(a,0,e),a===0&&pp(e)}};var vp=n.version;if(vp!=="19.1.0")throw Error(s(527,vp,"19.1.0"));Y.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=m(t),e=e!==null?d(e):null,e=e===null?null:e.stateNode,e};var C0={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:_,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ur=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ur.isDisabled&&Ur.supportsFiber)try{ul=Ur.inject(C0),vt=Ur}catch{}}return si.createRoot=function(e,t){if(!o(e))throw Error(s(299));var a=!1,l="",u=zd,c=Dd,g=_d,y=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(y=t.unstable_transitionCallbacks)),t=sp(e,1,!1,null,null,a,l,u,c,g,y,null),e[vn]=t.current,lo(e),new Eo(t)},si.hydrateRoot=function(e,t,a){if(!o(e))throw Error(s(299));var l=!1,u="",c=zd,g=Dd,y=_d,N=null,O=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(y=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(N=a.unstable_transitionCallbacks),a.formState!==void 0&&(O=a.formState)),t=sp(e,1,!0,t,a??null,l,u,c,g,y,N,O),t.context=up(null),a=t.current,l=Rt(),l=hs(l),u=Ra(l),u.callback=null,Ta(a,u,l),a=l,t.current.lanes=a,cl(t,a),Ft(t),e[vn]=t.current,lo(e),new Mr(t)},si.version="19.1.0",si}var Gp;function Hx(){if(Gp)return Co.exports;Gp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(n){console.error(n)}}return i(),Co.exports=Bx(),Co.exports}var Vx=Hx();const $x=rm(Vx);var ui={},Yp;function qx(){if(Yp)return ui;Yp=1,Object.defineProperty(ui,"__esModule",{value:!0}),ui.parse=p,ui.serialize=d;const i=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,n=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,s=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,f=(()=>{const S=function(){};return S.prototype=Object.create(null),S})();function p(S,C){const E=new f,z=S.length;if(z<2)return E;const B=(C==null?void 0:C.decode)||v;let U=0;do{const D=S.indexOf("=",U);if(D===-1)break;const G=S.indexOf(";",U),J=G===-1?z:G;if(D>J){U=S.lastIndexOf(";",D-1)+1;continue}const K=h(S,U,D),ue=m(S,D,K),re=S.slice(K,ue);if(E[re]===void 0){let ee=h(S,D+1,J),F=m(S,J,ee);const ne=B(S.slice(ee,F));E[re]=ne}U=J+1}while(U<z);return E}function h(S,C,E){do{const z=S.charCodeAt(C);if(z!==32&&z!==9)return C}while(++C<E);return E}function m(S,C,E){for(;C>E;){const z=S.charCodeAt(--C);if(z!==32&&z!==9)return C+1}return E}function d(S,C,E){const z=(E==null?void 0:E.encode)||encodeURIComponent;if(!i.test(S))throw new TypeError(`argument name is invalid: ${S}`);const B=z(C);if(!n.test(B))throw new TypeError(`argument val is invalid: ${C}`);let U=S+"="+B;if(!E)return U;if(E.maxAge!==void 0){if(!Number.isInteger(E.maxAge))throw new TypeError(`option maxAge is invalid: ${E.maxAge}`);U+="; Max-Age="+E.maxAge}if(E.domain){if(!r.test(E.domain))throw new TypeError(`option domain is invalid: ${E.domain}`);U+="; Domain="+E.domain}if(E.path){if(!s.test(E.path))throw new TypeError(`option path is invalid: ${E.path}`);U+="; Path="+E.path}if(E.expires){if(!x(E.expires)||!Number.isFinite(E.expires.valueOf()))throw new TypeError(`option expires is invalid: ${E.expires}`);U+="; Expires="+E.expires.toUTCString()}if(E.httpOnly&&(U+="; HttpOnly"),E.secure&&(U+="; Secure"),E.partitioned&&(U+="; Partitioned"),E.priority)switch(typeof E.priority=="string"?E.priority.toLowerCase():void 0){case"low":U+="; Priority=Low";break;case"medium":U+="; Priority=Medium";break;case"high":U+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${E.priority}`)}if(E.sameSite)switch(typeof E.sameSite=="string"?E.sameSite.toLowerCase():E.sameSite){case!0:case"strict":U+="; SameSite=Strict";break;case"lax":U+="; SameSite=Lax";break;case"none":U+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${E.sameSite}`)}return U}function v(S){if(S.indexOf("%")===-1)return S;try{return decodeURIComponent(S)}catch{return S}}function x(S){return o.call(S)==="[object Date]"}return ui}qx();var Qp="popstate";function Gx(i={}){function n(o,f){let{pathname:p="/",search:h="",hash:m=""}=hn(o.location.hash.substring(1));return!p.startsWith("/")&&!p.startsWith(".")&&(p="/"+p),qo("",{pathname:p,search:h,hash:m},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function r(o,f){let p=o.document.querySelector("base"),h="";if(p&&p.getAttribute("href")){let m=o.location.href,d=m.indexOf("#");h=d===-1?m:m.slice(0,d)}return h+"#"+(typeof f=="string"?f:gi(f))}function s(o,f){Ut(o.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return Qx(n,r,s,i)}function _e(i,n){if(i===!1||i===null||typeof i>"u")throw new Error(n)}function Ut(i,n){if(!i){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function Yx(){return Math.random().toString(36).substring(2,10)}function Zp(i,n){return{usr:i.state,key:i.key,idx:n}}function qo(i,n,r=null,s){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof n=="string"?hn(n):n,state:r,key:n&&n.key||s||Yx()}}function gi({pathname:i="/",search:n="",hash:r=""}){return n&&n!=="?"&&(i+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(i+=r.charAt(0)==="#"?r:"#"+r),i}function hn(i){let n={};if(i){let r=i.indexOf("#");r>=0&&(n.hash=i.substring(r),i=i.substring(0,r));let s=i.indexOf("?");s>=0&&(n.search=i.substring(s),i=i.substring(0,s)),i&&(n.pathname=i)}return n}function Qx(i,n,r,s={}){let{window:o=document.defaultView,v5Compat:f=!1}=s,p=o.history,h="POP",m=null,d=v();d==null&&(d=0,p.replaceState({...p.state,idx:d},""));function v(){return(p.state||{idx:null}).idx}function x(){h="POP";let B=v(),U=B==null?null:B-d;d=B,m&&m({action:h,location:z.location,delta:U})}function S(B,U){h="PUSH";let D=qo(z.location,B,U);r&&r(D,B),d=v()+1;let G=Zp(D,d),J=z.createHref(D);try{p.pushState(G,"",J)}catch(K){if(K instanceof DOMException&&K.name==="DataCloneError")throw K;o.location.assign(J)}f&&m&&m({action:h,location:z.location,delta:1})}function C(B,U){h="REPLACE";let D=qo(z.location,B,U);r&&r(D,B),d=v();let G=Zp(D,d),J=z.createHref(D);p.replaceState(G,"",J),f&&m&&m({action:h,location:z.location,delta:0})}function E(B){return Zx(B)}let z={get action(){return h},get location(){return i(o,p)},listen(B){if(m)throw new Error("A history only accepts one active listener");return o.addEventListener(Qp,x),m=B,()=>{o.removeEventListener(Qp,x),m=null}},createHref(B){return n(o,B)},createURL:E,encodeLocation(B){let U=E(B);return{pathname:U.pathname,search:U.search,hash:U.hash}},push:S,replace:C,go(B){return p.go(B)}};return z}function Zx(i,n=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),_e(r,"No window.location.(origin|href) available to create URL");let s=typeof i=="string"?i:gi(i);return s=s.replace(/ $/,"%20"),!n&&s.startsWith("//")&&(s=r+s),new URL(s,r)}function dm(i,n,r="/"){return Kx(i,n,r,!1)}function Kx(i,n,r,s){let o=typeof n=="string"?hn(n):n,f=va(o.pathname||"/",r);if(f==null)return null;let p=hm(i);Xx(p);let h=null;for(let m=0;h==null&&m<p.length;++m){let d=i1(f);h=n1(p[m],d,s)}return h}function hm(i,n=[],r=[],s=""){let o=(f,p,h)=>{let m={relativePath:h===void 0?f.path||"":h,caseSensitive:f.caseSensitive===!0,childrenIndex:p,route:f};m.relativePath.startsWith("/")&&(_e(m.relativePath.startsWith(s),`Absolute route path "${m.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(s.length));let d=ga([s,m.relativePath]),v=r.concat(m);f.children&&f.children.length>0&&(_e(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),hm(f.children,n,v,d)),!(f.path==null&&!f.index)&&n.push({path:d,score:t1(d,f.index),routesMeta:v})};return i.forEach((f,p)=>{var h;if(f.path===""||!((h=f.path)!=null&&h.includes("?")))o(f,p);else for(let m of pm(f.path))o(f,p,m)}),n}function pm(i){let n=i.split("/");if(n.length===0)return[];let[r,...s]=n,o=r.endsWith("?"),f=r.replace(/\?$/,"");if(s.length===0)return o?[f,""]:[f];let p=pm(s.join("/")),h=[];return h.push(...p.map(m=>m===""?f:[f,m].join("/"))),o&&h.push(...p),h.map(m=>i.startsWith("/")&&m===""?"/":m)}function Xx(i){i.sort((n,r)=>n.score!==r.score?r.score-n.score:a1(n.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var Jx=/^:[\w-]+$/,Fx=3,Px=2,Wx=1,Ix=10,e1=-2,Kp=i=>i==="*";function t1(i,n){let r=i.split("/"),s=r.length;return r.some(Kp)&&(s+=e1),n&&(s+=Px),r.filter(o=>!Kp(o)).reduce((o,f)=>o+(Jx.test(f)?Fx:f===""?Wx:Ix),s)}function a1(i,n){return i.length===n.length&&i.slice(0,-1).every((s,o)=>s===n[o])?i[i.length-1]-n[n.length-1]:0}function n1(i,n,r=!1){let{routesMeta:s}=i,o={},f="/",p=[];for(let h=0;h<s.length;++h){let m=s[h],d=h===s.length-1,v=f==="/"?n:n.slice(f.length)||"/",x=Pr({path:m.relativePath,caseSensitive:m.caseSensitive,end:d},v),S=m.route;if(!x&&d&&r&&!s[s.length-1].route.index&&(x=Pr({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},v)),!x)return null;Object.assign(o,x.params),p.push({params:o,pathname:ga([f,x.pathname]),pathnameBase:o1(ga([f,x.pathnameBase])),route:S}),x.pathnameBase!=="/"&&(f=ga([f,x.pathnameBase]))}return p}function Pr(i,n){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[r,s]=l1(i.path,i.caseSensitive,i.end),o=n.match(r);if(!o)return null;let f=o[0],p=f.replace(/(.)\/+$/,"$1"),h=o.slice(1);return{params:s.reduce((d,{paramName:v,isOptional:x},S)=>{if(v==="*"){let E=h[S]||"";p=f.slice(0,f.length-E.length).replace(/(.)\/+$/,"$1")}const C=h[S];return x&&!C?d[v]=void 0:d[v]=(C||"").replace(/%2F/g,"/"),d},{}),pathname:f,pathnameBase:p,pattern:i}}function l1(i,n=!1,r=!0){Ut(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let s=[],o="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,h,m)=>(s.push({paramName:h,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return i.endsWith("*")?(s.push({paramName:"*"}),o+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":i!==""&&i!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,n?void 0:"i"),s]}function i1(i){try{return i.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Ut(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),i}}function va(i,n){if(n==="/")return i;if(!i.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,s=i.charAt(r);return s&&s!=="/"?null:i.slice(r)||"/"}function r1(i,n="/"){let{pathname:r,search:s="",hash:o=""}=typeof i=="string"?hn(i):i;return{pathname:r?r.startsWith("/")?r:s1(r,n):n,search:c1(s),hash:f1(o)}}function s1(i,n){let r=n.replace(/\/+$/,"").split("/");return i.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function ko(i,n,r,s){return`Cannot include a '${i}' character in a manually specified \`to.${n}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function u1(i){return i.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function Po(i){let n=u1(i);return n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase)}function Wo(i,n,r,s=!1){let o;typeof i=="string"?o=hn(i):(o={...i},_e(!o.pathname||!o.pathname.includes("?"),ko("?","pathname","search",o)),_e(!o.pathname||!o.pathname.includes("#"),ko("#","pathname","hash",o)),_e(!o.search||!o.search.includes("#"),ko("#","search","hash",o)));let f=i===""||o.pathname==="",p=f?"/":o.pathname,h;if(p==null)h=r;else{let x=n.length-1;if(!s&&p.startsWith("..")){let S=p.split("/");for(;S[0]==="..";)S.shift(),x-=1;o.pathname=S.join("/")}h=x>=0?n[x]:"/"}let m=r1(o,h),d=p&&p!=="/"&&p.endsWith("/"),v=(f||p===".")&&r.endsWith("/");return!m.pathname.endsWith("/")&&(d||v)&&(m.pathname+="/"),m}var ga=i=>i.join("/").replace(/\/\/+/g,"/"),o1=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),c1=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,f1=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i;function d1(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}var mm=["POST","PUT","PATCH","DELETE"];new Set(mm);var h1=["GET",...mm];new Set(h1);var ll=T.createContext(null);ll.displayName="DataRouter";var as=T.createContext(null);as.displayName="DataRouterState";var gm=T.createContext({isTransitioning:!1});gm.displayName="ViewTransition";var p1=T.createContext(new Map);p1.displayName="Fetchers";var m1=T.createContext(null);m1.displayName="Await";var qt=T.createContext(null);qt.displayName="Navigation";var bi=T.createContext(null);bi.displayName="Location";var Gt=T.createContext({outlet:null,matches:[],isDataRoute:!1});Gt.displayName="Route";var Io=T.createContext(null);Io.displayName="RouteError";function g1(i,{relative:n}={}){_e(il(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:s}=T.useContext(qt),{hash:o,pathname:f,search:p}=Si(i,{relative:n}),h=f;return r!=="/"&&(h=f==="/"?r:ga([r,f])),s.createHref({pathname:h,search:p,hash:o})}function il(){return T.useContext(bi)!=null}function Ya(){return _e(il(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(bi).location}var vm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ym(i){T.useContext(qt).static||T.useLayoutEffect(i)}function rl(){let{isDataRoute:i}=T.useContext(Gt);return i?O1():v1()}function v1(){_e(il(),"useNavigate() may be used only in the context of a <Router> component.");let i=T.useContext(ll),{basename:n,navigator:r}=T.useContext(qt),{matches:s}=T.useContext(Gt),{pathname:o}=Ya(),f=JSON.stringify(Po(s)),p=T.useRef(!1);return ym(()=>{p.current=!0}),T.useCallback((m,d={})=>{if(Ut(p.current,vm),!p.current)return;if(typeof m=="number"){r.go(m);return}let v=Wo(m,JSON.parse(f),o,d.relative==="path");i==null&&n!=="/"&&(v.pathname=v.pathname==="/"?n:ga([n,v.pathname])),(d.replace?r.replace:r.push)(v,d.state,d)},[n,r,f,o,i])}T.createContext(null);function y1(){let{matches:i}=T.useContext(Gt),n=i[i.length-1];return n?n.params:{}}function Si(i,{relative:n}={}){let{matches:r}=T.useContext(Gt),{pathname:s}=Ya(),o=JSON.stringify(Po(r));return T.useMemo(()=>Wo(i,JSON.parse(o),s,n==="path"),[i,o,s,n])}function b1(i,n){return bm(i,n)}function bm(i,n,r,s){var U;_e(il(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=T.useContext(qt),{matches:f}=T.useContext(Gt),p=f[f.length-1],h=p?p.params:{},m=p?p.pathname:"/",d=p?p.pathnameBase:"/",v=p&&p.route;{let D=v&&v.path||"";Sm(m,!v||D.endsWith("*")||D.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${D}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
51
|
+
*/var ky;function mE(){if(ky)return us;ky=1;var t=dE(),n=md(),i=pE();function a(e){var r="https://react.dev/errors/"+e;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)r+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var r=e,s=e;if(e.alternate)for(;r.return;)r=r.return;else{e=r;do r=e,(r.flags&4098)!==0&&(s=r.return),e=r.return;while(e)}return r.tag===3?s:null}function f(e){if(e.tag===13){var r=e.memoizedState;if(r===null&&(e=e.alternate,e!==null&&(r=e.memoizedState)),r!==null)return r.dehydrated}return null}function d(e){if(u(e)!==e)throw Error(a(188))}function m(e){var r=e.alternate;if(!r){if(r=u(e),r===null)throw Error(a(188));return r!==e?null:e}for(var s=e,o=r;;){var c=s.return;if(c===null)break;var h=c.alternate;if(h===null){if(o=c.return,o!==null){s=o;continue}break}if(c.child===h.child){for(h=c.child;h;){if(h===s)return d(c),e;if(h===o)return d(c),r;h=h.sibling}throw Error(a(188))}if(s.return!==o.return)s=c,o=h;else{for(var y=!1,x=c.child;x;){if(x===s){y=!0,s=c,o=h;break}if(x===o){y=!0,o=c,s=h;break}x=x.sibling}if(!y){for(x=h.child;x;){if(x===s){y=!0,s=h,o=c;break}if(x===o){y=!0,o=h,s=c;break}x=x.sibling}if(!y)throw Error(a(189))}}if(s.alternate!==o)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?e:r}function p(e){var r=e.tag;if(r===5||r===26||r===27||r===6)return e;for(e=e.child;e!==null;){if(r=p(e),r!==null)return r;e=e.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),L=Symbol.for("react.consumer"),G=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),pe=Symbol.for("react.suspense_list"),fe=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),xe=Symbol.iterator;function ot(e){return e===null||typeof e!="object"?null:(e=xe&&e[xe]||e["@@iterator"],typeof e=="function"?e:null)}var ut=Symbol.for("react.client.reference");function it(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ut?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case U:return"Profiler";case O:return"StrictMode";case F:return"Suspense";case pe:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case G:return(e.displayName||"Context")+".Provider";case L:return(e._context.displayName||"Context")+".Consumer";case X:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case fe:return r=e.displayName||null,r!==null?r:it(e.type)||"Memo";case re:r=e._payload,e=e._init;try{return it(e(r))}catch{}}return null}var rt=Array.isArray,B=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},ke=[],E=-1;function V(e){return{current:e}}function Q(e){0>E||(e.current=ke[E],ke[E]=null,E--)}function I(e,r){E++,ke[E]=e.current,e.current=r}var ie=V(null),Se=V(null),he=V(null),Ut=V(null);function Ge(e,r){switch(I(he,r),I(Se,e),I(ie,null),r.nodeType){case 9:case 11:e=(e=r.documentElement)&&(e=e.namespaceURI)?$g(e):0;break;default:if(e=r.tagName,r=r.namespaceURI)r=$g(r),e=Cg(r,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Q(ie),I(ie,e)}function Fn(){Q(ie),Q(Se),Q(he)}function Po(e){e.memoizedState!==null&&I(Ut,e);var r=ie.current,s=Cg(r,e.type);r!==s&&(I(Se,e),I(ie,s))}function Ks(e){Se.current===e&&(Q(ie),Q(Se)),Ut.current===e&&(Q(Ut),ns._currentValue=ne)}var Wo=Object.prototype.hasOwnProperty,eu=t.unstable_scheduleCallback,tu=t.unstable_cancelCallback,BS=t.unstable_shouldYield,_S=t.unstable_requestPaint,mn=t.unstable_now,qS=t.unstable_getCurrentPriorityLevel,oh=t.unstable_ImmediatePriority,uh=t.unstable_UserBlockingPriority,Vs=t.unstable_NormalPriority,KS=t.unstable_LowPriority,ch=t.unstable_IdlePriority,VS=t.log,HS=t.unstable_setDisableYieldValue,ca=null,Bt=null;function Xn(e){if(typeof VS=="function"&&HS(e),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(ca,e)}catch{}}var _t=Math.clz32?Math.clz32:YS,GS=Math.log,JS=Math.LN2;function YS(e){return e>>>=0,e===0?32:31-(GS(e)/JS|0)|0}var Hs=256,Gs=4194304;function $i(e){var r=e&42;if(r!==0)return r;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Js(e,r,s){var o=e.pendingLanes;if(o===0)return 0;var c=0,h=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var x=o&134217727;return x!==0?(o=x&~h,o!==0?c=$i(o):(y&=x,y!==0?c=$i(y):s||(s=x&~e,s!==0&&(c=$i(s))))):(x=o&~h,x!==0?c=$i(x):y!==0?c=$i(y):s||(s=o&~e,s!==0&&(c=$i(s)))),c===0?0:r!==0&&r!==c&&(r&h)===0&&(h=c&-c,s=r&-r,h>=s||h===32&&(s&4194048)!==0)?r:c}function fa(e,r){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&r)===0}function IS(e,r){switch(e){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function fh(){var e=Hs;return Hs<<=1,(Hs&4194048)===0&&(Hs=256),e}function dh(){var e=Gs;return Gs<<=1,(Gs&62914560)===0&&(Gs=4194304),e}function nu(e){for(var r=[],s=0;31>s;s++)r.push(e);return r}function da(e,r){e.pendingLanes|=r,r!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ZS(e,r,s,o,c,h){var y=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var x=e.entanglements,k=e.expirationTimes,j=e.hiddenUpdates;for(s=y&~s;0<s;){var q=31-_t(s),H=1<<q;x[q]=0,k[q]=-1;var D=j[q];if(D!==null)for(j[q]=null,q=0;q<D.length;q++){var M=D[q];M!==null&&(M.lane&=-536870913)}s&=~H}o!==0&&hh(e,o,0),h!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=h&~(y&~r))}function hh(e,r,s){e.pendingLanes|=r,e.suspendedLanes&=~r;var o=31-_t(r);e.entangledLanes|=r,e.entanglements[o]=e.entanglements[o]|1073741824|s&4194090}function ph(e,r){var s=e.entangledLanes|=r;for(e=e.entanglements;s;){var o=31-_t(s),c=1<<o;c&r|e[o]&r&&(e[o]|=r),s&=~c}}function iu(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ru(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function mh(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:Zg(e.type))}function QS(e,r){var s=Y.p;try{return Y.p=e,r()}finally{Y.p=s}}var Pn=Math.random().toString(36).slice(2),xt="__reactFiber$"+Pn,Tt="__reactProps$"+Pn,ar="__reactContainer$"+Pn,au="__reactEvents$"+Pn,FS="__reactListeners$"+Pn,XS="__reactHandles$"+Pn,gh="__reactResources$"+Pn,ha="__reactMarker$"+Pn;function su(e){delete e[xt],delete e[Tt],delete e[au],delete e[FS],delete e[XS]}function sr(e){var r=e[xt];if(r)return r;for(var s=e.parentNode;s;){if(r=s[ar]||s[xt]){if(s=r.alternate,r.child!==null||s!==null&&s.child!==null)for(e=Dg(e);e!==null;){if(s=e[xt])return s;e=Dg(e)}return r}e=s,s=e.parentNode}return null}function lr(e){if(e=e[xt]||e[ar]){var r=e.tag;if(r===5||r===6||r===13||r===26||r===27||r===3)return e}return null}function pa(e){var r=e.tag;if(r===5||r===26||r===27||r===6)return e.stateNode;throw Error(a(33))}function or(e){var r=e[gh];return r||(r=e[gh]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function ct(e){e[ha]=!0}var yh=new Set,vh={};function Ci(e,r){ur(e,r),ur(e+"Capture",r)}function ur(e,r){for(vh[e]=r,e=0;e<r.length;e++)yh.add(r[e])}var PS=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),bh={},xh={};function WS(e){return Wo.call(xh,e)?!0:Wo.call(bh,e)?!1:PS.test(e)?xh[e]=!0:(bh[e]=!0,!1)}function Ys(e,r,s){if(WS(r))if(s===null)e.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(r);return;case"boolean":var o=r.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(r);return}}e.setAttribute(r,""+s)}}function Is(e,r,s){if(s===null)e.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttribute(r,""+s)}}function Rn(e,r,s,o){if(o===null)e.removeAttribute(s);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(r,s,""+o)}}var lu,Sh;function cr(e){if(lu===void 0)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);lu=r&&r[1]||"",Sh=-1<s.stack.indexOf(`
|
|
52
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
53
|
+
`+lu+e+Sh}var ou=!1;function uu(e,r){if(!e||ou)return"";ou=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(r){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(M){var D=M}Reflect.construct(e,[],H)}else{try{H.call()}catch(M){D=M}e.call(H.prototype)}}else{try{throw Error()}catch(M){D=M}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(M){if(M&&D&&typeof M.stack=="string")return[M.stack,D.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=o.DetermineComponentFrameRoot(),y=h[0],x=h[1];if(y&&x){var k=y.split(`
|
|
54
|
+
`),j=x.split(`
|
|
55
|
+
`);for(c=o=0;o<k.length&&!k[o].includes("DetermineComponentFrameRoot");)o++;for(;c<j.length&&!j[c].includes("DetermineComponentFrameRoot");)c++;if(o===k.length||c===j.length)for(o=k.length-1,c=j.length-1;1<=o&&0<=c&&k[o]!==j[c];)c--;for(;1<=o&&0<=c;o--,c--)if(k[o]!==j[c]){if(o!==1||c!==1)do if(o--,c--,0>c||k[o]!==j[c]){var q=`
|
|
56
|
+
`+k[o].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=o&&0<=c);break}}}finally{ou=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?cr(s):""}function e1(e){switch(e.tag){case 26:case 27:case 5:return cr(e.type);case 16:return cr("Lazy");case 13:return cr("Suspense");case 19:return cr("SuspenseList");case 0:case 15:return uu(e.type,!1);case 11:return uu(e.type.render,!1);case 1:return uu(e.type,!0);case 31:return cr("Activity");default:return""}}function wh(e){try{var r="";do r+=e1(e),e=e.return;while(e);return r}catch(s){return`
|
|
57
|
+
Error generating stack: `+s.message+`
|
|
58
|
+
`+s.stack}}function Qt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nh(e){var r=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function t1(e){var r=Nh(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),o=""+e[r];if(!e.hasOwnProperty(r)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,h=s.set;return Object.defineProperty(e,r,{configurable:!0,get:function(){return c.call(this)},set:function(y){o=""+y,h.call(this,y)}}),Object.defineProperty(e,r,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(y){o=""+y},stopTracking:function(){e._valueTracker=null,delete e[r]}}}}function Zs(e){e._valueTracker||(e._valueTracker=t1(e))}function kh(e){if(!e)return!1;var r=e._valueTracker;if(!r)return!0;var s=r.getValue(),o="";return e&&(o=Nh(e)?e.checked?"true":"false":e.value),e=o,e!==s?(r.setValue(e),!0):!1}function Qs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var n1=/[\n"\\]/g;function Ft(e){return e.replace(n1,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function cu(e,r,s,o,c,h,y,x){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),r!=null?y==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+Qt(r)):e.value!==""+Qt(r)&&(e.value=""+Qt(r)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),r!=null?fu(e,y,Qt(r)):s!=null?fu(e,y,Qt(s)):o!=null&&e.removeAttribute("value"),c==null&&h!=null&&(e.defaultChecked=!!h),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Qt(x):e.removeAttribute("name")}function Rh(e,r,s,o,c,h,y,x){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),r!=null||s!=null){if(!(h!=="submit"&&h!=="reset"||r!=null))return;s=s!=null?""+Qt(s):"",r=r!=null?""+Qt(r):s,x||r===e.value||(e.value=r),e.defaultValue=r}o=o??c,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=x?e.checked:!!o,e.defaultChecked=!!o,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y)}function fu(e,r,s){r==="number"&&Qs(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function fr(e,r,s,o){if(e=e.options,r){r={};for(var c=0;c<s.length;c++)r["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=r.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&o&&(e[s].defaultSelected=!0)}else{for(s=""+Qt(s),r=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,o&&(e[c].defaultSelected=!0);return}r!==null||e[c].disabled||(r=e[c])}r!==null&&(r.selected=!0)}}function Eh(e,r,s){if(r!=null&&(r=""+Qt(r),r!==e.value&&(e.value=r),s==null)){e.defaultValue!==r&&(e.defaultValue=r);return}e.defaultValue=s!=null?""+Qt(s):""}function Ah(e,r,s,o){if(r==null){if(o!=null){if(s!=null)throw Error(a(92));if(rt(o)){if(1<o.length)throw Error(a(93));o=o[0]}s=o}s==null&&(s=""),r=s}s=Qt(r),e.defaultValue=s,o=e.textContent,o===s&&o!==""&&o!==null&&(e.value=o)}function dr(e,r){if(r){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=r;return}}e.textContent=r}var i1=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function $h(e,r,s){var o=r.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?o?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="":o?e.setProperty(r,s):typeof s!="number"||s===0||i1.has(r)?r==="float"?e.cssFloat=s:e[r]=(""+s).trim():e[r]=s+"px"}function Ch(e,r,s){if(r!=null&&typeof r!="object")throw Error(a(62));if(e=e.style,s!=null){for(var o in s)!s.hasOwnProperty(o)||r!=null&&r.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var c in r)o=r[c],r.hasOwnProperty(c)&&s[c]!==o&&$h(e,c,o)}else for(var h in r)r.hasOwnProperty(h)&&$h(e,h,r[h])}function du(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var r1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),a1=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Fs(e){return a1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var hu=null;function pu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hr=null,pr=null;function Th(e){var r=lr(e);if(r&&(e=r.stateNode)){var s=e[Tt]||null;e:switch(e=r.stateNode,r.type){case"input":if(cu(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),r=s.name,s.type==="radio"&&r!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Ft(""+r)+'"][type="radio"]'),r=0;r<s.length;r++){var o=s[r];if(o!==e&&o.form===e.form){var c=o[Tt]||null;if(!c)throw Error(a(90));cu(o,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(r=0;r<s.length;r++)o=s[r],o.form===e.form&&kh(o)}break e;case"textarea":Eh(e,s.value,s.defaultValue);break e;case"select":r=s.value,r!=null&&fr(e,!!s.multiple,r,!1)}}}var mu=!1;function Oh(e,r,s){if(mu)return e(r,s);mu=!0;try{var o=e(r);return o}finally{if(mu=!1,(hr!==null||pr!==null)&&(Ll(),hr&&(r=hr,e=pr,pr=hr=null,Th(r),e)))for(r=0;r<e.length;r++)Th(e[r])}}function ma(e,r){var s=e.stateNode;if(s===null)return null;var o=s[Tt]||null;if(o===null)return null;s=o[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(a(231,r,typeof s));return s}var En=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gu=!1;if(En)try{var ga={};Object.defineProperty(ga,"passive",{get:function(){gu=!0}}),window.addEventListener("test",ga,ga),window.removeEventListener("test",ga,ga)}catch{gu=!1}var Wn=null,yu=null,Xs=null;function jh(){if(Xs)return Xs;var e,r=yu,s=r.length,o,c="value"in Wn?Wn.value:Wn.textContent,h=c.length;for(e=0;e<s&&r[e]===c[e];e++);var y=s-e;for(o=1;o<=y&&r[s-o]===c[h-o];o++);return Xs=c.slice(e,1<o?1-o:void 0)}function Ps(e){var r=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&r===13&&(e=13)):e=r,e===10&&(e=13),32<=e||e===13?e:0}function Ws(){return!0}function Dh(){return!1}function Ot(e){function r(s,o,c,h,y){this._reactName=s,this._targetInst=c,this.type=o,this.nativeEvent=h,this.target=y,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(s=e[x],this[x]=s?s(h):h[x]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Ws:Dh,this.isPropagationStopped=Dh,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Ws)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Ws)},persist:function(){},isPersistent:Ws}),r}var Ti={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},el=Ot(Ti),ya=g({},Ti,{view:0,detail:0}),s1=Ot(ya),vu,bu,va,tl=g({},ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Su,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==va&&(va&&e.type==="mousemove"?(vu=e.screenX-va.screenX,bu=e.screenY-va.screenY):bu=vu=0,va=e),vu)},movementY:function(e){return"movementY"in e?e.movementY:bu}}),Mh=Ot(tl),l1=g({},tl,{dataTransfer:0}),o1=Ot(l1),u1=g({},ya,{relatedTarget:0}),xu=Ot(u1),c1=g({},Ti,{animationName:0,elapsedTime:0,pseudoElement:0}),f1=Ot(c1),d1=g({},Ti,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),h1=Ot(d1),p1=g({},Ti,{data:0}),Lh=Ot(p1),m1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},g1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},y1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function v1(e){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(e):(e=y1[e])?!!r[e]:!1}function Su(){return v1}var b1=g({},ya,{key:function(e){if(e.key){var r=m1[e.key]||e.key;if(r!=="Unidentified")return r}return e.type==="keypress"?(e=Ps(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?g1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Su,charCode:function(e){return e.type==="keypress"?Ps(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ps(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),x1=Ot(b1),S1=g({},tl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zh=Ot(S1),w1=g({},ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Su}),N1=Ot(w1),k1=g({},Ti,{propertyName:0,elapsedTime:0,pseudoElement:0}),R1=Ot(k1),E1=g({},tl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),A1=Ot(E1),$1=g({},Ti,{newState:0,oldState:0}),C1=Ot($1),T1=[9,13,27,32],wu=En&&"CompositionEvent"in window,ba=null;En&&"documentMode"in document&&(ba=document.documentMode);var O1=En&&"TextEvent"in window&&!ba,Uh=En&&(!wu||ba&&8<ba&&11>=ba),Bh=" ",_h=!1;function qh(e,r){switch(e){case"keyup":return T1.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mr=!1;function j1(e,r){switch(e){case"compositionend":return Kh(r);case"keypress":return r.which!==32?null:(_h=!0,Bh);case"textInput":return e=r.data,e===Bh&&_h?null:e;default:return null}}function D1(e,r){if(mr)return e==="compositionend"||!wu&&qh(e,r)?(e=jh(),Xs=yu=Wn=null,mr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Uh&&r.locale!=="ko"?null:r.data;default:return null}}var M1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vh(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r==="input"?!!M1[e.type]:r==="textarea"}function Hh(e,r,s,o){hr?pr?pr.push(o):pr=[o]:hr=o,r=Kl(r,"onChange"),0<r.length&&(s=new el("onChange","change",null,s,o),e.push({event:s,listeners:r}))}var xa=null,Sa=null;function L1(e){Ng(e,0)}function nl(e){var r=pa(e);if(kh(r))return e}function Gh(e,r){if(e==="change")return r}var Jh=!1;if(En){var Nu;if(En){var ku="oninput"in document;if(!ku){var Yh=document.createElement("div");Yh.setAttribute("oninput","return;"),ku=typeof Yh.oninput=="function"}Nu=ku}else Nu=!1;Jh=Nu&&(!document.documentMode||9<document.documentMode)}function Ih(){xa&&(xa.detachEvent("onpropertychange",Zh),Sa=xa=null)}function Zh(e){if(e.propertyName==="value"&&nl(Sa)){var r=[];Hh(r,Sa,e,pu(e)),Oh(L1,r)}}function z1(e,r,s){e==="focusin"?(Ih(),xa=r,Sa=s,xa.attachEvent("onpropertychange",Zh)):e==="focusout"&&Ih()}function U1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return nl(Sa)}function B1(e,r){if(e==="click")return nl(r)}function _1(e,r){if(e==="input"||e==="change")return nl(r)}function q1(e,r){return e===r&&(e!==0||1/e===1/r)||e!==e&&r!==r}var qt=typeof Object.is=="function"?Object.is:q1;function wa(e,r){if(qt(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;var s=Object.keys(e),o=Object.keys(r);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var c=s[o];if(!Wo.call(r,c)||!qt(e[c],r[c]))return!1}return!0}function Qh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fh(e,r){var s=Qh(e);e=0;for(var o;s;){if(s.nodeType===3){if(o=e+s.textContent.length,e<=r&&o>=r)return{node:s,offset:r-e};e=o}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Qh(s)}}function Xh(e,r){return e&&r?e===r?!0:e&&e.nodeType===3?!1:r&&r.nodeType===3?Xh(e,r.parentNode):"contains"in e?e.contains(r):e.compareDocumentPosition?!!(e.compareDocumentPosition(r)&16):!1:!1}function Ph(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var r=Qs(e.document);r instanceof e.HTMLIFrameElement;){try{var s=typeof r.contentWindow.location.href=="string"}catch{s=!1}if(s)e=r.contentWindow;else break;r=Qs(e.document)}return r}function Ru(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r&&(r==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||r==="textarea"||e.contentEditable==="true")}var K1=En&&"documentMode"in document&&11>=document.documentMode,gr=null,Eu=null,Na=null,Au=!1;function Wh(e,r,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Au||gr==null||gr!==Qs(o)||(o=gr,"selectionStart"in o&&Ru(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Na&&wa(Na,o)||(Na=o,o=Kl(Eu,"onSelect"),0<o.length&&(r=new el("onSelect","select",null,r,s),e.push({event:r,listeners:o}),r.target=gr)))}function Oi(e,r){var s={};return s[e.toLowerCase()]=r.toLowerCase(),s["Webkit"+e]="webkit"+r,s["Moz"+e]="moz"+r,s}var yr={animationend:Oi("Animation","AnimationEnd"),animationiteration:Oi("Animation","AnimationIteration"),animationstart:Oi("Animation","AnimationStart"),transitionrun:Oi("Transition","TransitionRun"),transitionstart:Oi("Transition","TransitionStart"),transitioncancel:Oi("Transition","TransitionCancel"),transitionend:Oi("Transition","TransitionEnd")},$u={},ep={};En&&(ep=document.createElement("div").style,"AnimationEvent"in window||(delete yr.animationend.animation,delete yr.animationiteration.animation,delete yr.animationstart.animation),"TransitionEvent"in window||delete yr.transitionend.transition);function ji(e){if($u[e])return $u[e];if(!yr[e])return e;var r=yr[e],s;for(s in r)if(r.hasOwnProperty(s)&&s in ep)return $u[e]=r[s];return e}var tp=ji("animationend"),np=ji("animationiteration"),ip=ji("animationstart"),V1=ji("transitionrun"),H1=ji("transitionstart"),G1=ji("transitioncancel"),rp=ji("transitionend"),ap=new Map,Cu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Cu.push("scrollEnd");function on(e,r){ap.set(e,r),Ci(r,[e])}var sp=new WeakMap;function Xt(e,r){if(typeof e=="object"&&e!==null){var s=sp.get(e);return s!==void 0?s:(r={value:e,source:r,stack:wh(r)},sp.set(e,r),r)}return{value:e,source:r,stack:wh(r)}}var Pt=[],vr=0,Tu=0;function il(){for(var e=vr,r=Tu=vr=0;r<e;){var s=Pt[r];Pt[r++]=null;var o=Pt[r];Pt[r++]=null;var c=Pt[r];Pt[r++]=null;var h=Pt[r];if(Pt[r++]=null,o!==null&&c!==null){var y=o.pending;y===null?c.next=c:(c.next=y.next,y.next=c),o.pending=c}h!==0&&lp(s,c,h)}}function rl(e,r,s,o){Pt[vr++]=e,Pt[vr++]=r,Pt[vr++]=s,Pt[vr++]=o,Tu|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Ou(e,r,s,o){return rl(e,r,s,o),al(e)}function br(e,r){return rl(e,null,null,r),al(e)}function lp(e,r,s){e.lanes|=s;var o=e.alternate;o!==null&&(o.lanes|=s);for(var c=!1,h=e.return;h!==null;)h.childLanes|=s,o=h.alternate,o!==null&&(o.childLanes|=s),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(c=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,c&&r!==null&&(c=31-_t(s),e=h.hiddenUpdates,o=e[c],o===null?e[c]=[r]:o.push(r),r.lane=s|536870912),h):null}function al(e){if(50<Za)throw Za=0,Uc=null,Error(a(185));for(var r=e.return;r!==null;)e=r,r=e.return;return e.tag===3?e.stateNode:null}var xr={};function J1(e,r,s,o){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kt(e,r,s,o){return new J1(e,r,s,o)}function ju(e){return e=e.prototype,!(!e||!e.isReactComponent)}function An(e,r){var s=e.alternate;return s===null?(s=Kt(e.tag,r,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=r,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,r=e.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function op(e,r){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=r,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,r=s.dependencies,e.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),e}function sl(e,r,s,o,c,h){var y=0;if(o=e,typeof e=="function")ju(e)&&(y=1);else if(typeof e=="string")y=Iw(e,s,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ee:return e=Kt(31,s,r,c),e.elementType=ee,e.lanes=h,e;case N:return Di(s.children,c,h,r);case O:y=8,c|=24;break;case U:return e=Kt(12,s,r,c|2),e.elementType=U,e.lanes=h,e;case F:return e=Kt(13,s,r,c),e.elementType=F,e.lanes=h,e;case pe:return e=Kt(19,s,r,c),e.elementType=pe,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:case G:y=10;break e;case L:y=9;break e;case X:y=11;break e;case fe:y=14;break e;case re:y=16,o=null;break e}y=29,s=Error(a(130,e===null?"null":typeof e,"")),o=null}return r=Kt(y,s,r,c),r.elementType=e,r.type=o,r.lanes=h,r}function Di(e,r,s,o){return e=Kt(7,e,o,r),e.lanes=s,e}function Du(e,r,s){return e=Kt(6,e,null,r),e.lanes=s,e}function Mu(e,r,s){return r=Kt(4,e.children!==null?e.children:[],e.key,r),r.lanes=s,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}var Sr=[],wr=0,ll=null,ol=0,Wt=[],en=0,Mi=null,$n=1,Cn="";function Li(e,r){Sr[wr++]=ol,Sr[wr++]=ll,ll=e,ol=r}function up(e,r,s){Wt[en++]=$n,Wt[en++]=Cn,Wt[en++]=Mi,Mi=e;var o=$n;e=Cn;var c=32-_t(o)-1;o&=~(1<<c),s+=1;var h=32-_t(r)+c;if(30<h){var y=c-c%5;h=(o&(1<<y)-1).toString(32),o>>=y,c-=y,$n=1<<32-_t(r)+c|s<<c|o,Cn=h+e}else $n=1<<h|s<<c|o,Cn=e}function Lu(e){e.return!==null&&(Li(e,1),up(e,1,0))}function zu(e){for(;e===ll;)ll=Sr[--wr],Sr[wr]=null,ol=Sr[--wr],Sr[wr]=null;for(;e===Mi;)Mi=Wt[--en],Wt[en]=null,Cn=Wt[--en],Wt[en]=null,$n=Wt[--en],Wt[en]=null}var Rt=null,Ze=null,Ee=!1,zi=null,gn=!1,Uu=Error(a(519));function Ui(e){var r=Error(a(418,""));throw Ea(Xt(r,e)),Uu}function cp(e){var r=e.stateNode,s=e.type,o=e.memoizedProps;switch(r[xt]=e,r[Tt]=o,s){case"dialog":be("cancel",r),be("close",r);break;case"iframe":case"object":case"embed":be("load",r);break;case"video":case"audio":for(s=0;s<Fa.length;s++)be(Fa[s],r);break;case"source":be("error",r);break;case"img":case"image":case"link":be("error",r),be("load",r);break;case"details":be("toggle",r);break;case"input":be("invalid",r),Rh(r,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0),Zs(r);break;case"select":be("invalid",r);break;case"textarea":be("invalid",r),Ah(r,o.value,o.defaultValue,o.children),Zs(r)}s=o.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||r.textContent===""+s||o.suppressHydrationWarning===!0||Ag(r.textContent,s)?(o.popover!=null&&(be("beforetoggle",r),be("toggle",r)),o.onScroll!=null&&be("scroll",r),o.onScrollEnd!=null&&be("scrollend",r),o.onClick!=null&&(r.onclick=Vl),r=!0):r=!1,r||Ui(e)}function fp(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 5:case 13:gn=!1;return;case 27:case 3:gn=!0;return;default:Rt=Rt.return}}function ka(e){if(e!==Rt)return!1;if(!Ee)return fp(e),Ee=!0,!1;var r=e.tag,s;if((s=r!==3&&r!==27)&&((s=r===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||Wc(e.type,e.memoizedProps)),s=!s),s&&Ze&&Ui(e),fp(e),r===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));e:{for(e=e.nextSibling,r=0;e;){if(e.nodeType===8)if(s=e.data,s==="/$"){if(r===0){Ze=cn(e.nextSibling);break e}r--}else s!=="$"&&s!=="$!"&&s!=="$?"||r++;e=e.nextSibling}Ze=null}}else r===27?(r=Ze,mi(e.type)?(e=rf,rf=null,Ze=e):Ze=r):Ze=Rt?cn(e.stateNode.nextSibling):null;return!0}function Ra(){Ze=Rt=null,Ee=!1}function dp(){var e=zi;return e!==null&&(Mt===null?Mt=e:Mt.push.apply(Mt,e),zi=null),e}function Ea(e){zi===null?zi=[e]:zi.push(e)}var Bu=V(null),Bi=null,Tn=null;function ei(e,r,s){I(Bu,r._currentValue),r._currentValue=s}function On(e){e._currentValue=Bu.current,Q(Bu)}function _u(e,r,s){for(;e!==null;){var o=e.alternate;if((e.childLanes&r)!==r?(e.childLanes|=r,o!==null&&(o.childLanes|=r)):o!==null&&(o.childLanes&r)!==r&&(o.childLanes|=r),e===s)break;e=e.return}}function qu(e,r,s,o){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var h=c.dependencies;if(h!==null){var y=c.child;h=h.firstContext;e:for(;h!==null;){var x=h;h=c;for(var k=0;k<r.length;k++)if(x.context===r[k]){h.lanes|=s,x=h.alternate,x!==null&&(x.lanes|=s),_u(h.return,s,e),o||(y=null);break e}h=x.next}}else if(c.tag===18){if(y=c.return,y===null)throw Error(a(341));y.lanes|=s,h=y.alternate,h!==null&&(h.lanes|=s),_u(y,s,e),y=null}else y=c.child;if(y!==null)y.return=c;else for(y=c;y!==null;){if(y===e){y=null;break}if(c=y.sibling,c!==null){c.return=y.return,y=c;break}y=y.return}c=y}}function Aa(e,r,s,o){e=null;for(var c=r,h=!1;c!==null;){if(!h){if((c.flags&524288)!==0)h=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var y=c.alternate;if(y===null)throw Error(a(387));if(y=y.memoizedProps,y!==null){var x=c.type;qt(c.pendingProps.value,y.value)||(e!==null?e.push(x):e=[x])}}else if(c===Ut.current){if(y=c.alternate,y===null)throw Error(a(387));y.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(ns):e=[ns])}c=c.return}e!==null&&qu(r,e,s,o),r.flags|=262144}function ul(e){for(e=e.firstContext;e!==null;){if(!qt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function _i(e){Bi=e,Tn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function St(e){return hp(Bi,e)}function cl(e,r){return Bi===null&&_i(e),hp(e,r)}function hp(e,r){var s=r._currentValue;if(r={context:r,memoizedValue:s,next:null},Tn===null){if(e===null)throw Error(a(308));Tn=r,e.dependencies={lanes:0,firstContext:r},e.flags|=524288}else Tn=Tn.next=r;return s}var Y1=typeof AbortController<"u"?AbortController:function(){var e=[],r=this.signal={aborted:!1,addEventListener:function(s,o){e.push(o)}};this.abort=function(){r.aborted=!0,e.forEach(function(s){return s()})}},I1=t.unstable_scheduleCallback,Z1=t.unstable_NormalPriority,at={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ku(){return{controller:new Y1,data:new Map,refCount:0}}function $a(e){e.refCount--,e.refCount===0&&I1(Z1,function(){e.controller.abort()})}var Ca=null,Vu=0,Nr=0,kr=null;function Q1(e,r){if(Ca===null){var s=Ca=[];Vu=0,Nr=Gc(),kr={status:"pending",value:void 0,then:function(o){s.push(o)}}}return Vu++,r.then(pp,pp),r}function pp(){if(--Vu===0&&Ca!==null){kr!==null&&(kr.status="fulfilled");var e=Ca;Ca=null,Nr=0,kr=null;for(var r=0;r<e.length;r++)(0,e[r])()}}function F1(e,r){var s=[],o={status:"pending",value:null,reason:null,then:function(c){s.push(c)}};return e.then(function(){o.status="fulfilled",o.value=r;for(var c=0;c<s.length;c++)(0,s[c])(r)},function(c){for(o.status="rejected",o.reason=c,c=0;c<s.length;c++)(0,s[c])(void 0)}),o}var mp=B.S;B.S=function(e,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&Q1(e,r),mp!==null&&mp(e,r)};var qi=V(null);function Hu(){var e=qi.current;return e!==null?e:qe.pooledCache}function fl(e,r){r===null?I(qi,qi.current):I(qi,r.pool)}function gp(){var e=Hu();return e===null?null:{parent:at._currentValue,pool:e}}var Ta=Error(a(460)),yp=Error(a(474)),dl=Error(a(542)),Gu={then:function(){}};function vp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function hl(){}function bp(e,r,s){switch(s=e[s],s===void 0?e.push(r):s!==r&&(r.then(hl,hl),r=s),r.status){case"fulfilled":return r.value;case"rejected":throw e=r.reason,Sp(e),e;default:if(typeof r.status=="string")r.then(hl,hl);else{if(e=qe,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=r,e.status="pending",e.then(function(o){if(r.status==="pending"){var c=r;c.status="fulfilled",c.value=o}},function(o){if(r.status==="pending"){var c=r;c.status="rejected",c.reason=o}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw e=r.reason,Sp(e),e}throw Oa=r,Ta}}var Oa=null;function xp(){if(Oa===null)throw Error(a(459));var e=Oa;return Oa=null,e}function Sp(e){if(e===Ta||e===dl)throw Error(a(483))}var ti=!1;function Ju(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yu(e,r){e=e.updateQueue,r.updateQueue===e&&(r.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ni(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ii(e,r,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ce&2)!==0){var c=o.pending;return c===null?r.next=r:(r.next=c.next,c.next=r),o.pending=r,r=al(e),lp(e,null,s),r}return rl(e,o,r,s),al(e)}function ja(e,r,s){if(r=r.updateQueue,r!==null&&(r=r.shared,(s&4194048)!==0)){var o=r.lanes;o&=e.pendingLanes,s|=o,r.lanes=s,ph(e,s)}}function Iu(e,r){var s=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var c=null,h=null;if(s=s.firstBaseUpdate,s!==null){do{var y={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};h===null?c=h=y:h=h.next=y,s=s.next}while(s!==null);h===null?c=h=r:h=h.next=r}else c=h=r;s={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:h,shared:o.shared,callbacks:o.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=r:e.next=r,s.lastBaseUpdate=r}var Zu=!1;function Da(){if(Zu){var e=kr;if(e!==null)throw e}}function Ma(e,r,s,o){Zu=!1;var c=e.updateQueue;ti=!1;var h=c.firstBaseUpdate,y=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var k=x,j=k.next;k.next=null,y===null?h=j:y.next=j,y=k;var q=e.alternate;q!==null&&(q=q.updateQueue,x=q.lastBaseUpdate,x!==y&&(x===null?q.firstBaseUpdate=j:x.next=j,q.lastBaseUpdate=k))}if(h!==null){var H=c.baseState;y=0,q=j=k=null,x=h;do{var D=x.lane&-536870913,M=D!==x.lane;if(M?(Ne&D)===D:(o&D)===D){D!==0&&D===Nr&&(Zu=!0),q!==null&&(q=q.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ue=e,ae=x;D=r;var Le=s;switch(ae.tag){case 1:if(ue=ae.payload,typeof ue=="function"){H=ue.call(Le,H,D);break e}H=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=ae.payload,D=typeof ue=="function"?ue.call(Le,H,D):ue,D==null)break e;H=g({},H,D);break e;case 2:ti=!0}}D=x.callback,D!==null&&(e.flags|=64,M&&(e.flags|=8192),M=c.callbacks,M===null?c.callbacks=[D]:M.push(D))}else M={lane:D,tag:x.tag,payload:x.payload,callback:x.callback,next:null},q===null?(j=q=M,k=H):q=q.next=M,y|=D;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;M=x,x=M.next,M.next=null,c.lastBaseUpdate=M,c.shared.pending=null}}while(!0);q===null&&(k=H),c.baseState=k,c.firstBaseUpdate=j,c.lastBaseUpdate=q,h===null&&(c.shared.lanes=0),fi|=y,e.lanes=y,e.memoizedState=H}}function wp(e,r){if(typeof e!="function")throw Error(a(191,e));e.call(r)}function Np(e,r){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)wp(s[e],r)}var Rr=V(null),pl=V(0);function kp(e,r){e=Bn,I(pl,e),I(Rr,r),Bn=e|r.baseLanes}function Qu(){I(pl,Bn),I(Rr,Rr.current)}function Fu(){Bn=pl.current,Q(Rr),Q(pl)}var ri=0,ge=null,De=null,We=null,ml=!1,Er=!1,Ki=!1,gl=0,La=0,Ar=null,X1=0;function Xe(){throw Error(a(321))}function Xu(e,r){if(r===null)return!1;for(var s=0;s<r.length&&s<e.length;s++)if(!qt(e[s],r[s]))return!1;return!0}function Pu(e,r,s,o,c,h){return ri=h,ge=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,B.H=e===null||e.memoizedState===null?lm:om,Ki=!1,h=s(o,c),Ki=!1,Er&&(h=Ep(r,s,o,c)),Rp(e),h}function Rp(e){B.H=wl;var r=De!==null&&De.next!==null;if(ri=0,We=De=ge=null,ml=!1,La=0,Ar=null,r)throw Error(a(300));e===null||ft||(e=e.dependencies,e!==null&&ul(e)&&(ft=!0))}function Ep(e,r,s,o){ge=e;var c=0;do{if(Er&&(Ar=null),La=0,Er=!1,25<=c)throw Error(a(301));if(c+=1,We=De=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}B.H=rw,h=r(s,o)}while(Er);return h}function P1(){var e=B.H,r=e.useState()[0];return r=typeof r.then=="function"?za(r):r,e=e.useState()[0],(De!==null?De.memoizedState:null)!==e&&(ge.flags|=1024),r}function Wu(){var e=gl!==0;return gl=0,e}function ec(e,r,s){r.updateQueue=e.updateQueue,r.flags&=-2053,e.lanes&=~s}function tc(e){if(ml){for(e=e.memoizedState;e!==null;){var r=e.queue;r!==null&&(r.pending=null),e=e.next}ml=!1}ri=0,We=De=ge=null,Er=!1,La=gl=0,Ar=null}function jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?ge.memoizedState=We=e:We=We.next=e,We}function et(){if(De===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var r=We===null?ge.memoizedState:We.next;if(r!==null)We=r,De=e;else{if(e===null)throw ge.alternate===null?Error(a(467)):Error(a(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},We===null?ge.memoizedState=We=e:We=We.next=e}return We}function nc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function za(e){var r=La;return La+=1,Ar===null&&(Ar=[]),e=bp(Ar,e,r),r=ge,(We===null?r.memoizedState:We.next)===null&&(r=r.alternate,B.H=r===null||r.memoizedState===null?lm:om),e}function yl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return za(e);if(e.$$typeof===G)return St(e)}throw Error(a(438,String(e)))}function ic(e){var r=null,s=ge.updateQueue;if(s!==null&&(r=s.memoCache),r==null){var o=ge.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(r={data:o.data.map(function(c){return c.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),s===null&&(s=nc(),ge.updateQueue=s),s.memoCache=r,s=r.data[r.index],s===void 0)for(s=r.data[r.index]=Array(e),o=0;o<e;o++)s[o]=oe;return r.index++,s}function jn(e,r){return typeof r=="function"?r(e):r}function vl(e){var r=et();return rc(r,De,e)}function rc(e,r,s){var o=e.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=s;var c=e.baseQueue,h=o.pending;if(h!==null){if(c!==null){var y=c.next;c.next=h.next,h.next=y}r.baseQueue=c=h,o.pending=null}if(h=e.baseState,c===null)e.memoizedState=h;else{r=c.next;var x=y=null,k=null,j=r,q=!1;do{var H=j.lane&-536870913;if(H!==j.lane?(Ne&H)===H:(ri&H)===H){var D=j.revertLane;if(D===0)k!==null&&(k=k.next={lane:0,revertLane:0,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),H===Nr&&(q=!0);else if((ri&D)===D){j=j.next,D===Nr&&(q=!0);continue}else H={lane:0,revertLane:j.revertLane,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},k===null?(x=k=H,y=h):k=k.next=H,ge.lanes|=D,fi|=D;H=j.action,Ki&&s(h,H),h=j.hasEagerState?j.eagerState:s(h,H)}else D={lane:H,revertLane:j.revertLane,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},k===null?(x=k=D,y=h):k=k.next=D,ge.lanes|=H,fi|=H;j=j.next}while(j!==null&&j!==r);if(k===null?y=h:k.next=x,!qt(h,e.memoizedState)&&(ft=!0,q&&(s=kr,s!==null)))throw s;e.memoizedState=h,e.baseState=y,e.baseQueue=k,o.lastRenderedState=h}return c===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function ac(e){var r=et(),s=r.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=e;var o=s.dispatch,c=s.pending,h=r.memoizedState;if(c!==null){s.pending=null;var y=c=c.next;do h=e(h,y.action),y=y.next;while(y!==c);qt(h,r.memoizedState)||(ft=!0),r.memoizedState=h,r.baseQueue===null&&(r.baseState=h),s.lastRenderedState=h}return[h,o]}function Ap(e,r,s){var o=ge,c=et(),h=Ee;if(h){if(s===void 0)throw Error(a(407));s=s()}else s=r();var y=!qt((De||c).memoizedState,s);y&&(c.memoizedState=s,ft=!0),c=c.queue;var x=Tp.bind(null,o,c,e);if(Ua(2048,8,x,[e]),c.getSnapshot!==r||y||We!==null&&We.memoizedState.tag&1){if(o.flags|=2048,$r(9,bl(),Cp.bind(null,o,c,s,r),null),qe===null)throw Error(a(349));h||(ri&124)!==0||$p(o,r,s)}return s}function $p(e,r,s){e.flags|=16384,e={getSnapshot:r,value:s},r=ge.updateQueue,r===null?(r=nc(),ge.updateQueue=r,r.stores=[e]):(s=r.stores,s===null?r.stores=[e]:s.push(e))}function Cp(e,r,s,o){r.value=s,r.getSnapshot=o,Op(r)&&jp(e)}function Tp(e,r,s){return s(function(){Op(r)&&jp(e)})}function Op(e){var r=e.getSnapshot;e=e.value;try{var s=r();return!qt(e,s)}catch{return!0}}function jp(e){var r=br(e,2);r!==null&&Yt(r,e,2)}function sc(e){var r=jt();if(typeof e=="function"){var s=e;if(e=s(),Ki){Xn(!0);try{s()}finally{Xn(!1)}}}return r.memoizedState=r.baseState=e,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:e},r}function Dp(e,r,s,o){return e.baseState=s,rc(e,De,typeof o=="function"?o:jn)}function W1(e,r,s,o,c){if(Sl(e))throw Error(a(485));if(e=r.action,e!==null){var h={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){h.listeners.push(y)}};B.T!==null?s(!0):h.isTransition=!1,o(h),s=r.pending,s===null?(h.next=r.pending=h,Mp(r,h)):(h.next=s.next,r.pending=s.next=h)}}function Mp(e,r){var s=r.action,o=r.payload,c=e.state;if(r.isTransition){var h=B.T,y={};B.T=y;try{var x=s(c,o),k=B.S;k!==null&&k(y,x),Lp(e,r,x)}catch(j){lc(e,r,j)}finally{B.T=h}}else try{h=s(c,o),Lp(e,r,h)}catch(j){lc(e,r,j)}}function Lp(e,r,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(o){zp(e,r,o)},function(o){return lc(e,r,o)}):zp(e,r,s)}function zp(e,r,s){r.status="fulfilled",r.value=s,Up(r),e.state=s,r=e.pending,r!==null&&(s=r.next,s===r?e.pending=null:(s=s.next,r.next=s,Mp(e,s)))}function lc(e,r,s){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do r.status="rejected",r.reason=s,Up(r),r=r.next;while(r!==o)}e.action=null}function Up(e){e=e.listeners;for(var r=0;r<e.length;r++)(0,e[r])()}function Bp(e,r){return r}function _p(e,r){if(Ee){var s=qe.formState;if(s!==null){e:{var o=ge;if(Ee){if(Ze){t:{for(var c=Ze,h=gn;c.nodeType!==8;){if(!h){c=null;break t}if(c=cn(c.nextSibling),c===null){c=null;break t}}h=c.data,c=h==="F!"||h==="F"?c:null}if(c){Ze=cn(c.nextSibling),o=c.data==="F!";break e}}Ui(o)}o=!1}o&&(r=s[0])}}return s=jt(),s.memoizedState=s.baseState=r,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bp,lastRenderedState:r},s.queue=o,s=rm.bind(null,ge,o),o.dispatch=s,o=sc(!1),h=dc.bind(null,ge,!1,o.queue),o=jt(),c={state:r,dispatch:null,action:e,pending:null},o.queue=c,s=W1.bind(null,ge,c,h,s),c.dispatch=s,o.memoizedState=e,[r,s,!1]}function qp(e){var r=et();return Kp(r,De,e)}function Kp(e,r,s){if(r=rc(e,r,Bp)[0],e=vl(jn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var o=za(r)}catch(y){throw y===Ta?dl:y}else o=r;r=et();var c=r.queue,h=c.dispatch;return s!==r.memoizedState&&(ge.flags|=2048,$r(9,bl(),ew.bind(null,c,s),null)),[o,h,e]}function ew(e,r){e.action=r}function Vp(e){var r=et(),s=De;if(s!==null)return Kp(r,s,e);et(),r=r.memoizedState,s=et();var o=s.queue.dispatch;return s.memoizedState=e,[r,o,!1]}function $r(e,r,s,o){return e={tag:e,create:s,deps:o,inst:r,next:null},r=ge.updateQueue,r===null&&(r=nc(),ge.updateQueue=r),s=r.lastEffect,s===null?r.lastEffect=e.next=e:(o=s.next,s.next=e,e.next=o,r.lastEffect=e),e}function bl(){return{destroy:void 0,resource:void 0}}function Hp(){return et().memoizedState}function xl(e,r,s,o){var c=jt();o=o===void 0?null:o,ge.flags|=e,c.memoizedState=$r(1|r,bl(),s,o)}function Ua(e,r,s,o){var c=et();o=o===void 0?null:o;var h=c.memoizedState.inst;De!==null&&o!==null&&Xu(o,De.memoizedState.deps)?c.memoizedState=$r(r,h,s,o):(ge.flags|=e,c.memoizedState=$r(1|r,h,s,o))}function Gp(e,r){xl(8390656,8,e,r)}function Jp(e,r){Ua(2048,8,e,r)}function Yp(e,r){return Ua(4,2,e,r)}function Ip(e,r){return Ua(4,4,e,r)}function Zp(e,r){if(typeof r=="function"){e=e();var s=r(e);return function(){typeof s=="function"?s():r(null)}}if(r!=null)return e=e(),r.current=e,function(){r.current=null}}function Qp(e,r,s){s=s!=null?s.concat([e]):null,Ua(4,4,Zp.bind(null,r,e),s)}function oc(){}function Fp(e,r){var s=et();r=r===void 0?null:r;var o=s.memoizedState;return r!==null&&Xu(r,o[1])?o[0]:(s.memoizedState=[e,r],e)}function Xp(e,r){var s=et();r=r===void 0?null:r;var o=s.memoizedState;if(r!==null&&Xu(r,o[1]))return o[0];if(o=e(),Ki){Xn(!0);try{e()}finally{Xn(!1)}}return s.memoizedState=[o,r],o}function uc(e,r,s){return s===void 0||(ri&1073741824)!==0?e.memoizedState=r:(e.memoizedState=s,e=eg(),ge.lanes|=e,fi|=e,s)}function Pp(e,r,s,o){return qt(s,r)?s:Rr.current!==null?(e=uc(e,s,o),qt(e,r)||(ft=!0),e):(ri&42)===0?(ft=!0,e.memoizedState=s):(e=eg(),ge.lanes|=e,fi|=e,r)}function Wp(e,r,s,o,c){var h=Y.p;Y.p=h!==0&&8>h?h:8;var y=B.T,x={};B.T=x,dc(e,!1,r,s);try{var k=c(),j=B.S;if(j!==null&&j(x,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var q=F1(k,o);Ba(e,r,q,Jt(e))}else Ba(e,r,o,Jt(e))}catch(H){Ba(e,r,{then:function(){},status:"rejected",reason:H},Jt())}finally{Y.p=h,B.T=y}}function tw(){}function cc(e,r,s,o){if(e.tag!==5)throw Error(a(476));var c=em(e).queue;Wp(e,c,r,ne,s===null?tw:function(){return tm(e),s(o)})}function em(e){var r=e.memoizedState;if(r!==null)return r;r={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:ne},next:null};var s={};return r.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:s},next:null},e.memoizedState=r,e=e.alternate,e!==null&&(e.memoizedState=r),r}function tm(e){var r=em(e).next.queue;Ba(e,r,{},Jt())}function fc(){return St(ns)}function nm(){return et().memoizedState}function im(){return et().memoizedState}function nw(e){for(var r=e.return;r!==null;){switch(r.tag){case 24:case 3:var s=Jt();e=ni(s);var o=ii(r,e,s);o!==null&&(Yt(o,r,s),ja(o,r,s)),r={cache:Ku()},e.payload=r;return}r=r.return}}function iw(e,r,s){var o=Jt();s={lane:o,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null},Sl(e)?am(r,s):(s=Ou(e,r,s,o),s!==null&&(Yt(s,e,o),sm(s,r,o)))}function rm(e,r,s){var o=Jt();Ba(e,r,s,o)}function Ba(e,r,s,o){var c={lane:o,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null};if(Sl(e))am(r,c);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=r.lastRenderedReducer,h!==null))try{var y=r.lastRenderedState,x=h(y,s);if(c.hasEagerState=!0,c.eagerState=x,qt(x,y))return rl(e,r,c,0),qe===null&&il(),!1}catch{}finally{}if(s=Ou(e,r,c,o),s!==null)return Yt(s,e,o),sm(s,r,o),!0}return!1}function dc(e,r,s,o){if(o={lane:2,revertLane:Gc(),action:o,hasEagerState:!1,eagerState:null,next:null},Sl(e)){if(r)throw Error(a(479))}else r=Ou(e,s,o,2),r!==null&&Yt(r,e,2)}function Sl(e){var r=e.alternate;return e===ge||r!==null&&r===ge}function am(e,r){Er=ml=!0;var s=e.pending;s===null?r.next=r:(r.next=s.next,s.next=r),e.pending=r}function sm(e,r,s){if((s&4194048)!==0){var o=r.lanes;o&=e.pendingLanes,s|=o,r.lanes=s,ph(e,s)}}var wl={readContext:St,use:yl,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useLayoutEffect:Xe,useInsertionEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useSyncExternalStore:Xe,useId:Xe,useHostTransitionStatus:Xe,useFormState:Xe,useActionState:Xe,useOptimistic:Xe,useMemoCache:Xe,useCacheRefresh:Xe},lm={readContext:St,use:yl,useCallback:function(e,r){return jt().memoizedState=[e,r===void 0?null:r],e},useContext:St,useEffect:Gp,useImperativeHandle:function(e,r,s){s=s!=null?s.concat([e]):null,xl(4194308,4,Zp.bind(null,r,e),s)},useLayoutEffect:function(e,r){return xl(4194308,4,e,r)},useInsertionEffect:function(e,r){xl(4,2,e,r)},useMemo:function(e,r){var s=jt();r=r===void 0?null:r;var o=e();if(Ki){Xn(!0);try{e()}finally{Xn(!1)}}return s.memoizedState=[o,r],o},useReducer:function(e,r,s){var o=jt();if(s!==void 0){var c=s(r);if(Ki){Xn(!0);try{s(r)}finally{Xn(!1)}}}else c=r;return o.memoizedState=o.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},o.queue=e,e=e.dispatch=iw.bind(null,ge,e),[o.memoizedState,e]},useRef:function(e){var r=jt();return e={current:e},r.memoizedState=e},useState:function(e){e=sc(e);var r=e.queue,s=rm.bind(null,ge,r);return r.dispatch=s,[e.memoizedState,s]},useDebugValue:oc,useDeferredValue:function(e,r){var s=jt();return uc(s,e,r)},useTransition:function(){var e=sc(!1);return e=Wp.bind(null,ge,e.queue,!0,!1),jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,r,s){var o=ge,c=jt();if(Ee){if(s===void 0)throw Error(a(407));s=s()}else{if(s=r(),qe===null)throw Error(a(349));(Ne&124)!==0||$p(o,r,s)}c.memoizedState=s;var h={value:s,getSnapshot:r};return c.queue=h,Gp(Tp.bind(null,o,h,e),[e]),o.flags|=2048,$r(9,bl(),Cp.bind(null,o,h,s,r),null),s},useId:function(){var e=jt(),r=qe.identifierPrefix;if(Ee){var s=Cn,o=$n;s=(o&~(1<<32-_t(o)-1)).toString(32)+s,r="«"+r+"R"+s,s=gl++,0<s&&(r+="H"+s.toString(32)),r+="»"}else s=X1++,r="«"+r+"r"+s.toString(32)+"»";return e.memoizedState=r},useHostTransitionStatus:fc,useFormState:_p,useActionState:_p,useOptimistic:function(e){var r=jt();r.memoizedState=r.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=s,r=dc.bind(null,ge,!0,s),s.dispatch=r,[e,r]},useMemoCache:ic,useCacheRefresh:function(){return jt().memoizedState=nw.bind(null,ge)}},om={readContext:St,use:yl,useCallback:Fp,useContext:St,useEffect:Jp,useImperativeHandle:Qp,useInsertionEffect:Yp,useLayoutEffect:Ip,useMemo:Xp,useReducer:vl,useRef:Hp,useState:function(){return vl(jn)},useDebugValue:oc,useDeferredValue:function(e,r){var s=et();return Pp(s,De.memoizedState,e,r)},useTransition:function(){var e=vl(jn)[0],r=et().memoizedState;return[typeof e=="boolean"?e:za(e),r]},useSyncExternalStore:Ap,useId:nm,useHostTransitionStatus:fc,useFormState:qp,useActionState:qp,useOptimistic:function(e,r){var s=et();return Dp(s,De,e,r)},useMemoCache:ic,useCacheRefresh:im},rw={readContext:St,use:yl,useCallback:Fp,useContext:St,useEffect:Jp,useImperativeHandle:Qp,useInsertionEffect:Yp,useLayoutEffect:Ip,useMemo:Xp,useReducer:ac,useRef:Hp,useState:function(){return ac(jn)},useDebugValue:oc,useDeferredValue:function(e,r){var s=et();return De===null?uc(s,e,r):Pp(s,De.memoizedState,e,r)},useTransition:function(){var e=ac(jn)[0],r=et().memoizedState;return[typeof e=="boolean"?e:za(e),r]},useSyncExternalStore:Ap,useId:nm,useHostTransitionStatus:fc,useFormState:Vp,useActionState:Vp,useOptimistic:function(e,r){var s=et();return De!==null?Dp(s,De,e,r):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:ic,useCacheRefresh:im},Cr=null,_a=0;function Nl(e){var r=_a;return _a+=1,Cr===null&&(Cr=[]),bp(Cr,e,r)}function qa(e,r){r=r.props.ref,e.ref=r!==void 0?r:null}function kl(e,r){throw r.$$typeof===v?Error(a(525)):(e=Object.prototype.toString.call(r),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":e)))}function um(e){var r=e._init;return r(e._payload)}function cm(e){function r(C,$){if(e){var T=C.deletions;T===null?(C.deletions=[$],C.flags|=16):T.push($)}}function s(C,$){if(!e)return null;for(;$!==null;)r(C,$),$=$.sibling;return null}function o(C){for(var $=new Map;C!==null;)C.key!==null?$.set(C.key,C):$.set(C.index,C),C=C.sibling;return $}function c(C,$){return C=An(C,$),C.index=0,C.sibling=null,C}function h(C,$,T){return C.index=T,e?(T=C.alternate,T!==null?(T=T.index,T<$?(C.flags|=67108866,$):T):(C.flags|=67108866,$)):(C.flags|=1048576,$)}function y(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function x(C,$,T,K){return $===null||$.tag!==6?($=Du(T,C.mode,K),$.return=C,$):($=c($,T),$.return=C,$)}function k(C,$,T,K){var P=T.type;return P===N?q(C,$,T.props.children,K,T.key):$!==null&&($.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===re&&um(P)===$.type)?($=c($,T.props),qa($,T),$.return=C,$):($=sl(T.type,T.key,T.props,null,C.mode,K),qa($,T),$.return=C,$)}function j(C,$,T,K){return $===null||$.tag!==4||$.stateNode.containerInfo!==T.containerInfo||$.stateNode.implementation!==T.implementation?($=Mu(T,C.mode,K),$.return=C,$):($=c($,T.children||[]),$.return=C,$)}function q(C,$,T,K,P){return $===null||$.tag!==7?($=Di(T,C.mode,K,P),$.return=C,$):($=c($,T),$.return=C,$)}function H(C,$,T){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=Du(""+$,C.mode,T),$.return=C,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case b:return T=sl($.type,$.key,$.props,null,C.mode,T),qa(T,$),T.return=C,T;case R:return $=Mu($,C.mode,T),$.return=C,$;case re:var K=$._init;return $=K($._payload),H(C,$,T)}if(rt($)||ot($))return $=Di($,C.mode,T,null),$.return=C,$;if(typeof $.then=="function")return H(C,Nl($),T);if($.$$typeof===G)return H(C,cl(C,$),T);kl(C,$)}return null}function D(C,$,T,K){var P=$!==null?$.key:null;if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return P!==null?null:x(C,$,""+T,K);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case b:return T.key===P?k(C,$,T,K):null;case R:return T.key===P?j(C,$,T,K):null;case re:return P=T._init,T=P(T._payload),D(C,$,T,K)}if(rt(T)||ot(T))return P!==null?null:q(C,$,T,K,null);if(typeof T.then=="function")return D(C,$,Nl(T),K);if(T.$$typeof===G)return D(C,$,cl(C,T),K);kl(C,T)}return null}function M(C,$,T,K,P){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return C=C.get(T)||null,x($,C,""+K,P);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case b:return C=C.get(K.key===null?T:K.key)||null,k($,C,K,P);case R:return C=C.get(K.key===null?T:K.key)||null,j($,C,K,P);case re:var ye=K._init;return K=ye(K._payload),M(C,$,T,K,P)}if(rt(K)||ot(K))return C=C.get(T)||null,q($,C,K,P,null);if(typeof K.then=="function")return M(C,$,T,Nl(K),P);if(K.$$typeof===G)return M(C,$,T,cl($,K),P);kl($,K)}return null}function ue(C,$,T,K){for(var P=null,ye=null,te=$,se=$=0,ht=null;te!==null&&se<T.length;se++){te.index>se?(ht=te,te=null):ht=te.sibling;var Re=D(C,te,T[se],K);if(Re===null){te===null&&(te=ht);break}e&&te&&Re.alternate===null&&r(C,te),$=h(Re,$,se),ye===null?P=Re:ye.sibling=Re,ye=Re,te=ht}if(se===T.length)return s(C,te),Ee&&Li(C,se),P;if(te===null){for(;se<T.length;se++)te=H(C,T[se],K),te!==null&&($=h(te,$,se),ye===null?P=te:ye.sibling=te,ye=te);return Ee&&Li(C,se),P}for(te=o(te);se<T.length;se++)ht=M(te,C,se,T[se],K),ht!==null&&(e&&ht.alternate!==null&&te.delete(ht.key===null?se:ht.key),$=h(ht,$,se),ye===null?P=ht:ye.sibling=ht,ye=ht);return e&&te.forEach(function(xi){return r(C,xi)}),Ee&&Li(C,se),P}function ae(C,$,T,K){if(T==null)throw Error(a(151));for(var P=null,ye=null,te=$,se=$=0,ht=null,Re=T.next();te!==null&&!Re.done;se++,Re=T.next()){te.index>se?(ht=te,te=null):ht=te.sibling;var xi=D(C,te,Re.value,K);if(xi===null){te===null&&(te=ht);break}e&&te&&xi.alternate===null&&r(C,te),$=h(xi,$,se),ye===null?P=xi:ye.sibling=xi,ye=xi,te=ht}if(Re.done)return s(C,te),Ee&&Li(C,se),P;if(te===null){for(;!Re.done;se++,Re=T.next())Re=H(C,Re.value,K),Re!==null&&($=h(Re,$,se),ye===null?P=Re:ye.sibling=Re,ye=Re);return Ee&&Li(C,se),P}for(te=o(te);!Re.done;se++,Re=T.next())Re=M(te,C,se,Re.value,K),Re!==null&&(e&&Re.alternate!==null&&te.delete(Re.key===null?se:Re.key),$=h(Re,$,se),ye===null?P=Re:ye.sibling=Re,ye=Re);return e&&te.forEach(function(aN){return r(C,aN)}),Ee&&Li(C,se),P}function Le(C,$,T,K){if(typeof T=="object"&&T!==null&&T.type===N&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case b:e:{for(var P=T.key;$!==null;){if($.key===P){if(P=T.type,P===N){if($.tag===7){s(C,$.sibling),K=c($,T.props.children),K.return=C,C=K;break e}}else if($.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===re&&um(P)===$.type){s(C,$.sibling),K=c($,T.props),qa(K,T),K.return=C,C=K;break e}s(C,$);break}else r(C,$);$=$.sibling}T.type===N?(K=Di(T.props.children,C.mode,K,T.key),K.return=C,C=K):(K=sl(T.type,T.key,T.props,null,C.mode,K),qa(K,T),K.return=C,C=K)}return y(C);case R:e:{for(P=T.key;$!==null;){if($.key===P)if($.tag===4&&$.stateNode.containerInfo===T.containerInfo&&$.stateNode.implementation===T.implementation){s(C,$.sibling),K=c($,T.children||[]),K.return=C,C=K;break e}else{s(C,$);break}else r(C,$);$=$.sibling}K=Mu(T,C.mode,K),K.return=C,C=K}return y(C);case re:return P=T._init,T=P(T._payload),Le(C,$,T,K)}if(rt(T))return ue(C,$,T,K);if(ot(T)){if(P=ot(T),typeof P!="function")throw Error(a(150));return T=P.call(T),ae(C,$,T,K)}if(typeof T.then=="function")return Le(C,$,Nl(T),K);if(T.$$typeof===G)return Le(C,$,cl(C,T),K);kl(C,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,$!==null&&$.tag===6?(s(C,$.sibling),K=c($,T),K.return=C,C=K):(s(C,$),K=Du(T,C.mode,K),K.return=C,C=K),y(C)):s(C,$)}return function(C,$,T,K){try{_a=0;var P=Le(C,$,T,K);return Cr=null,P}catch(te){if(te===Ta||te===dl)throw te;var ye=Kt(29,te,null,C.mode);return ye.lanes=K,ye.return=C,ye}finally{}}}var Tr=cm(!0),fm=cm(!1),tn=V(null),yn=null;function ai(e){var r=e.alternate;I(st,st.current&1),I(tn,e),yn===null&&(r===null||Rr.current!==null||r.memoizedState!==null)&&(yn=e)}function dm(e){if(e.tag===22){if(I(st,st.current),I(tn,e),yn===null){var r=e.alternate;r!==null&&r.memoizedState!==null&&(yn=e)}}else si()}function si(){I(st,st.current),I(tn,tn.current)}function Dn(e){Q(tn),yn===e&&(yn=null),Q(st)}var st=V(0);function Rl(e){for(var r=e;r!==null;){if(r.tag===13){var s=r.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||nf(s)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function hc(e,r,s,o){r=e.memoizedState,s=s(o,r),s=s==null?r:g({},r,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var pc={enqueueSetState:function(e,r,s){e=e._reactInternals;var o=Jt(),c=ni(o);c.payload=r,s!=null&&(c.callback=s),r=ii(e,c,o),r!==null&&(Yt(r,e,o),ja(r,e,o))},enqueueReplaceState:function(e,r,s){e=e._reactInternals;var o=Jt(),c=ni(o);c.tag=1,c.payload=r,s!=null&&(c.callback=s),r=ii(e,c,o),r!==null&&(Yt(r,e,o),ja(r,e,o))},enqueueForceUpdate:function(e,r){e=e._reactInternals;var s=Jt(),o=ni(s);o.tag=2,r!=null&&(o.callback=r),r=ii(e,o,s),r!==null&&(Yt(r,e,s),ja(r,e,s))}};function hm(e,r,s,o,c,h,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,h,y):r.prototype&&r.prototype.isPureReactComponent?!wa(s,o)||!wa(c,h):!0}function pm(e,r,s,o){e=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(s,o),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(s,o),r.state!==e&&pc.enqueueReplaceState(r,r.state,null)}function Vi(e,r){var s=r;if("ref"in r){s={};for(var o in r)o!=="ref"&&(s[o]=r[o])}if(e=e.defaultProps){s===r&&(s=g({},s));for(var c in e)s[c]===void 0&&(s[c]=e[c])}return s}var El=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function mm(e){El(e)}function gm(e){console.error(e)}function ym(e){El(e)}function Al(e,r){try{var s=e.onUncaughtError;s(r.value,{componentStack:r.stack})}catch(o){setTimeout(function(){throw o})}}function vm(e,r,s){try{var o=e.onCaughtError;o(s.value,{componentStack:s.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function mc(e,r,s){return s=ni(s),s.tag=3,s.payload={element:null},s.callback=function(){Al(e,r)},s}function bm(e){return e=ni(e),e.tag=3,e}function xm(e,r,s,o){var c=s.type.getDerivedStateFromError;if(typeof c=="function"){var h=o.value;e.payload=function(){return c(h)},e.callback=function(){vm(r,s,o)}}var y=s.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){vm(r,s,o),typeof c!="function"&&(di===null?di=new Set([this]):di.add(this));var x=o.stack;this.componentDidCatch(o.value,{componentStack:x!==null?x:""})})}function aw(e,r,s,o,c){if(s.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(r=s.alternate,r!==null&&Aa(r,s,c,!0),s=tn.current,s!==null){switch(s.tag){case 13:return yn===null?_c():s.alternate===null&&Qe===0&&(Qe=3),s.flags&=-257,s.flags|=65536,s.lanes=c,o===Gu?s.flags|=16384:(r=s.updateQueue,r===null?s.updateQueue=new Set([o]):r.add(o),Kc(e,o,c)),!1;case 22:return s.flags|=65536,o===Gu?s.flags|=16384:(r=s.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([o])},s.updateQueue=r):(s=r.retryQueue,s===null?r.retryQueue=new Set([o]):s.add(o)),Kc(e,o,c)),!1}throw Error(a(435,s.tag))}return Kc(e,o,c),_c(),!1}if(Ee)return r=tn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=c,o!==Uu&&(e=Error(a(422),{cause:o}),Ea(Xt(e,s)))):(o!==Uu&&(r=Error(a(423),{cause:o}),Ea(Xt(r,s))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,o=Xt(o,s),c=mc(e.stateNode,o,c),Iu(e,c),Qe!==4&&(Qe=2)),!1;var h=Error(a(520),{cause:o});if(h=Xt(h,s),Ia===null?Ia=[h]:Ia.push(h),Qe!==4&&(Qe=2),r===null)return!0;o=Xt(o,s),s=r;do{switch(s.tag){case 3:return s.flags|=65536,e=c&-c,s.lanes|=e,e=mc(s.stateNode,o,e),Iu(s,e),!1;case 1:if(r=s.type,h=s.stateNode,(s.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(di===null||!di.has(h))))return s.flags|=65536,c&=-c,s.lanes|=c,c=bm(c),xm(c,e,s,o),Iu(s,c),!1}s=s.return}while(s!==null);return!1}var Sm=Error(a(461)),ft=!1;function gt(e,r,s,o){r.child=e===null?fm(r,null,s,o):Tr(r,e.child,s,o)}function wm(e,r,s,o,c){s=s.render;var h=r.ref;if("ref"in o){var y={};for(var x in o)x!=="ref"&&(y[x]=o[x])}else y=o;return _i(r),o=Pu(e,r,s,y,h,c),x=Wu(),e!==null&&!ft?(ec(e,r,c),Mn(e,r,c)):(Ee&&x&&Lu(r),r.flags|=1,gt(e,r,o,c),r.child)}function Nm(e,r,s,o,c){if(e===null){var h=s.type;return typeof h=="function"&&!ju(h)&&h.defaultProps===void 0&&s.compare===null?(r.tag=15,r.type=h,km(e,r,h,o,c)):(e=sl(s.type,null,o,r,r.mode,c),e.ref=r.ref,e.return=r,r.child=e)}if(h=e.child,!Nc(e,c)){var y=h.memoizedProps;if(s=s.compare,s=s!==null?s:wa,s(y,o)&&e.ref===r.ref)return Mn(e,r,c)}return r.flags|=1,e=An(h,o),e.ref=r.ref,e.return=r,r.child=e}function km(e,r,s,o,c){if(e!==null){var h=e.memoizedProps;if(wa(h,o)&&e.ref===r.ref)if(ft=!1,r.pendingProps=o=h,Nc(e,c))(e.flags&131072)!==0&&(ft=!0);else return r.lanes=e.lanes,Mn(e,r,c)}return gc(e,r,s,o,c)}function Rm(e,r,s){var o=r.pendingProps,c=o.children,h=e!==null?e.memoizedState:null;if(o.mode==="hidden"){if((r.flags&128)!==0){if(o=h!==null?h.baseLanes|s:s,e!==null){for(c=r.child=e.child,h=0;c!==null;)h=h|c.lanes|c.childLanes,c=c.sibling;r.childLanes=h&~o}else r.childLanes=0,r.child=null;return Em(e,r,o,s)}if((s&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},e!==null&&fl(r,h!==null?h.cachePool:null),h!==null?kp(r,h):Qu(),dm(r);else return r.lanes=r.childLanes=536870912,Em(e,r,h!==null?h.baseLanes|s:s,s)}else h!==null?(fl(r,h.cachePool),kp(r,h),si(),r.memoizedState=null):(e!==null&&fl(r,null),Qu(),si());return gt(e,r,c,s),r.child}function Em(e,r,s,o){var c=Hu();return c=c===null?null:{parent:at._currentValue,pool:c},r.memoizedState={baseLanes:s,cachePool:c},e!==null&&fl(r,null),Qu(),dm(r),e!==null&&Aa(e,r,o,!0),null}function $l(e,r){var s=r.ref;if(s===null)e!==null&&e.ref!==null&&(r.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(e===null||e.ref!==s)&&(r.flags|=4194816)}}function gc(e,r,s,o,c){return _i(r),s=Pu(e,r,s,o,void 0,c),o=Wu(),e!==null&&!ft?(ec(e,r,c),Mn(e,r,c)):(Ee&&o&&Lu(r),r.flags|=1,gt(e,r,s,c),r.child)}function Am(e,r,s,o,c,h){return _i(r),r.updateQueue=null,s=Ep(r,o,s,c),Rp(e),o=Wu(),e!==null&&!ft?(ec(e,r,h),Mn(e,r,h)):(Ee&&o&&Lu(r),r.flags|=1,gt(e,r,s,h),r.child)}function $m(e,r,s,o,c){if(_i(r),r.stateNode===null){var h=xr,y=s.contextType;typeof y=="object"&&y!==null&&(h=St(y)),h=new s(o,h),r.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=pc,r.stateNode=h,h._reactInternals=r,h=r.stateNode,h.props=o,h.state=r.memoizedState,h.refs={},Ju(r),y=s.contextType,h.context=typeof y=="object"&&y!==null?St(y):xr,h.state=r.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(hc(r,s,y,o),h.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(y=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),y!==h.state&&pc.enqueueReplaceState(h,h.state,null),Ma(r,o,h,c),Da(),h.state=r.memoizedState),typeof h.componentDidMount=="function"&&(r.flags|=4194308),o=!0}else if(e===null){h=r.stateNode;var x=r.memoizedProps,k=Vi(s,x);h.props=k;var j=h.context,q=s.contextType;y=xr,typeof q=="object"&&q!==null&&(y=St(q));var H=s.getDerivedStateFromProps;q=typeof H=="function"||typeof h.getSnapshotBeforeUpdate=="function",x=r.pendingProps!==x,q||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(x||j!==y)&&pm(r,h,o,y),ti=!1;var D=r.memoizedState;h.state=D,Ma(r,o,h,c),Da(),j=r.memoizedState,x||D!==j||ti?(typeof H=="function"&&(hc(r,s,H,o),j=r.memoizedState),(k=ti||hm(r,s,k,o,D,j,y))?(q||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(r.flags|=4194308)):(typeof h.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=o,r.memoizedState=j),h.props=o,h.state=j,h.context=y,o=k):(typeof h.componentDidMount=="function"&&(r.flags|=4194308),o=!1)}else{h=r.stateNode,Yu(e,r),y=r.memoizedProps,q=Vi(s,y),h.props=q,H=r.pendingProps,D=h.context,j=s.contextType,k=xr,typeof j=="object"&&j!==null&&(k=St(j)),x=s.getDerivedStateFromProps,(j=typeof x=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==H||D!==k)&&pm(r,h,o,k),ti=!1,D=r.memoizedState,h.state=D,Ma(r,o,h,c),Da();var M=r.memoizedState;y!==H||D!==M||ti||e!==null&&e.dependencies!==null&&ul(e.dependencies)?(typeof x=="function"&&(hc(r,s,x,o),M=r.memoizedState),(q=ti||hm(r,s,q,o,D,M,k)||e!==null&&e.dependencies!==null&&ul(e.dependencies))?(j||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(o,M,k),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(o,M,k)),typeof h.componentDidUpdate=="function"&&(r.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(r.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(r.flags|=1024),r.memoizedProps=o,r.memoizedState=M),h.props=o,h.state=M,h.context=k,o=q):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(r.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(r.flags|=1024),o=!1)}return h=o,$l(e,r),o=(r.flags&128)!==0,h||o?(h=r.stateNode,s=o&&typeof s.getDerivedStateFromError!="function"?null:h.render(),r.flags|=1,e!==null&&o?(r.child=Tr(r,e.child,null,c),r.child=Tr(r,null,s,c)):gt(e,r,s,c),r.memoizedState=h.state,e=r.child):e=Mn(e,r,c),e}function Cm(e,r,s,o){return Ra(),r.flags|=256,gt(e,r,s,o),r.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:gp()}}function bc(e,r,s){return e=e!==null?e.childLanes&~s:0,r&&(e|=nn),e}function Tm(e,r,s){var o=r.pendingProps,c=!1,h=(r.flags&128)!==0,y;if((y=h)||(y=e!==null&&e.memoizedState===null?!1:(st.current&2)!==0),y&&(c=!0,r.flags&=-129),y=(r.flags&32)!==0,r.flags&=-33,e===null){if(Ee){if(c?ai(r):si(),Ee){var x=Ze,k;if(k=x){e:{for(k=x,x=gn;k.nodeType!==8;){if(!x){x=null;break e}if(k=cn(k.nextSibling),k===null){x=null;break e}}x=k}x!==null?(r.memoizedState={dehydrated:x,treeContext:Mi!==null?{id:$n,overflow:Cn}:null,retryLane:536870912,hydrationErrors:null},k=Kt(18,null,null,0),k.stateNode=x,k.return=r,r.child=k,Rt=r,Ze=null,k=!0):k=!1}k||Ui(r)}if(x=r.memoizedState,x!==null&&(x=x.dehydrated,x!==null))return nf(x)?r.lanes=32:r.lanes=536870912,null;Dn(r)}return x=o.children,o=o.fallback,c?(si(),c=r.mode,x=Cl({mode:"hidden",children:x},c),o=Di(o,c,s,null),x.return=r,o.return=r,x.sibling=o,r.child=x,c=r.child,c.memoizedState=vc(s),c.childLanes=bc(e,y,s),r.memoizedState=yc,o):(ai(r),xc(r,x))}if(k=e.memoizedState,k!==null&&(x=k.dehydrated,x!==null)){if(h)r.flags&256?(ai(r),r.flags&=-257,r=Sc(e,r,s)):r.memoizedState!==null?(si(),r.child=e.child,r.flags|=128,r=null):(si(),c=o.fallback,x=r.mode,o=Cl({mode:"visible",children:o.children},x),c=Di(c,x,s,null),c.flags|=2,o.return=r,c.return=r,o.sibling=c,r.child=o,Tr(r,e.child,null,s),o=r.child,o.memoizedState=vc(s),o.childLanes=bc(e,y,s),r.memoizedState=yc,r=c);else if(ai(r),nf(x)){if(y=x.nextSibling&&x.nextSibling.dataset,y)var j=y.dgst;y=j,o=Error(a(419)),o.stack="",o.digest=y,Ea({value:o,source:null,stack:null}),r=Sc(e,r,s)}else if(ft||Aa(e,r,s,!1),y=(s&e.childLanes)!==0,ft||y){if(y=qe,y!==null&&(o=s&-s,o=(o&42)!==0?1:iu(o),o=(o&(y.suspendedLanes|s))!==0?0:o,o!==0&&o!==k.retryLane))throw k.retryLane=o,br(e,o),Yt(y,e,o),Sm;x.data==="$?"||_c(),r=Sc(e,r,s)}else x.data==="$?"?(r.flags|=192,r.child=e.child,r=null):(e=k.treeContext,Ze=cn(x.nextSibling),Rt=r,Ee=!0,zi=null,gn=!1,e!==null&&(Wt[en++]=$n,Wt[en++]=Cn,Wt[en++]=Mi,$n=e.id,Cn=e.overflow,Mi=r),r=xc(r,o.children),r.flags|=4096);return r}return c?(si(),c=o.fallback,x=r.mode,k=e.child,j=k.sibling,o=An(k,{mode:"hidden",children:o.children}),o.subtreeFlags=k.subtreeFlags&65011712,j!==null?c=An(j,c):(c=Di(c,x,s,null),c.flags|=2),c.return=r,o.return=r,o.sibling=c,r.child=o,o=c,c=r.child,x=e.child.memoizedState,x===null?x=vc(s):(k=x.cachePool,k!==null?(j=at._currentValue,k=k.parent!==j?{parent:j,pool:j}:k):k=gp(),x={baseLanes:x.baseLanes|s,cachePool:k}),c.memoizedState=x,c.childLanes=bc(e,y,s),r.memoizedState=yc,o):(ai(r),s=e.child,e=s.sibling,s=An(s,{mode:"visible",children:o.children}),s.return=r,s.sibling=null,e!==null&&(y=r.deletions,y===null?(r.deletions=[e],r.flags|=16):y.push(e)),r.child=s,r.memoizedState=null,s)}function xc(e,r){return r=Cl({mode:"visible",children:r},e.mode),r.return=e,e.child=r}function Cl(e,r){return e=Kt(22,e,null,r),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Sc(e,r,s){return Tr(r,e.child,null,s),e=xc(r,r.pendingProps.children),e.flags|=2,r.memoizedState=null,e}function Om(e,r,s){e.lanes|=r;var o=e.alternate;o!==null&&(o.lanes|=r),_u(e.return,r,s)}function wc(e,r,s,o,c){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:c}:(h.isBackwards=r,h.rendering=null,h.renderingStartTime=0,h.last=o,h.tail=s,h.tailMode=c)}function jm(e,r,s){var o=r.pendingProps,c=o.revealOrder,h=o.tail;if(gt(e,r,o.children,s),o=st.current,(o&2)!==0)o=o&1|2,r.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=r.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Om(e,s,r);else if(e.tag===19)Om(e,s,r);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===r)break e;for(;e.sibling===null;){if(e.return===null||e.return===r)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}switch(I(st,o),c){case"forwards":for(s=r.child,c=null;s!==null;)e=s.alternate,e!==null&&Rl(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=r.child,r.child=null):(c=s.sibling,s.sibling=null),wc(r,!1,c,s,h);break;case"backwards":for(s=null,c=r.child,r.child=null;c!==null;){if(e=c.alternate,e!==null&&Rl(e)===null){r.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}wc(r,!0,s,null,h);break;case"together":wc(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Mn(e,r,s){if(e!==null&&(r.dependencies=e.dependencies),fi|=r.lanes,(s&r.childLanes)===0)if(e!==null){if(Aa(e,r,s,!1),(s&r.childLanes)===0)return null}else return null;if(e!==null&&r.child!==e.child)throw Error(a(153));if(r.child!==null){for(e=r.child,s=An(e,e.pendingProps),r.child=s,s.return=r;e.sibling!==null;)e=e.sibling,s=s.sibling=An(e,e.pendingProps),s.return=r;s.sibling=null}return r.child}function Nc(e,r){return(e.lanes&r)!==0?!0:(e=e.dependencies,!!(e!==null&&ul(e)))}function sw(e,r,s){switch(r.tag){case 3:Ge(r,r.stateNode.containerInfo),ei(r,at,e.memoizedState.cache),Ra();break;case 27:case 5:Po(r);break;case 4:Ge(r,r.stateNode.containerInfo);break;case 10:ei(r,r.type,r.memoizedProps.value);break;case 13:var o=r.memoizedState;if(o!==null)return o.dehydrated!==null?(ai(r),r.flags|=128,null):(s&r.child.childLanes)!==0?Tm(e,r,s):(ai(r),e=Mn(e,r,s),e!==null?e.sibling:null);ai(r);break;case 19:var c=(e.flags&128)!==0;if(o=(s&r.childLanes)!==0,o||(Aa(e,r,s,!1),o=(s&r.childLanes)!==0),c){if(o)return jm(e,r,s);r.flags|=128}if(c=r.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),I(st,st.current),o)break;return null;case 22:case 23:return r.lanes=0,Rm(e,r,s);case 24:ei(r,at,e.memoizedState.cache)}return Mn(e,r,s)}function Dm(e,r,s){if(e!==null)if(e.memoizedProps!==r.pendingProps)ft=!0;else{if(!Nc(e,s)&&(r.flags&128)===0)return ft=!1,sw(e,r,s);ft=(e.flags&131072)!==0}else ft=!1,Ee&&(r.flags&1048576)!==0&&up(r,ol,r.index);switch(r.lanes=0,r.tag){case 16:e:{e=r.pendingProps;var o=r.elementType,c=o._init;if(o=c(o._payload),r.type=o,typeof o=="function")ju(o)?(e=Vi(o,e),r.tag=1,r=$m(null,r,o,e,s)):(r.tag=0,r=gc(null,r,o,e,s));else{if(o!=null){if(c=o.$$typeof,c===X){r.tag=11,r=wm(null,r,o,e,s);break e}else if(c===fe){r.tag=14,r=Nm(null,r,o,e,s);break e}}throw r=it(o)||o,Error(a(306,r,""))}}return r;case 0:return gc(e,r,r.type,r.pendingProps,s);case 1:return o=r.type,c=Vi(o,r.pendingProps),$m(e,r,o,c,s);case 3:e:{if(Ge(r,r.stateNode.containerInfo),e===null)throw Error(a(387));o=r.pendingProps;var h=r.memoizedState;c=h.element,Yu(e,r),Ma(r,o,null,s);var y=r.memoizedState;if(o=y.cache,ei(r,at,o),o!==h.cache&&qu(r,[at],s,!0),Da(),o=y.element,h.isDehydrated)if(h={element:o,isDehydrated:!1,cache:y.cache},r.updateQueue.baseState=h,r.memoizedState=h,r.flags&256){r=Cm(e,r,o,s);break e}else if(o!==c){c=Xt(Error(a(424)),r),Ea(c),r=Cm(e,r,o,s);break e}else{switch(e=r.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ze=cn(e.firstChild),Rt=r,Ee=!0,zi=null,gn=!0,s=fm(r,null,o,s),r.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(Ra(),o===c){r=Mn(e,r,s);break e}gt(e,r,o,s)}r=r.child}return r;case 26:return $l(e,r),e===null?(s=Ug(r.type,null,r.pendingProps,null))?r.memoizedState=s:Ee||(s=r.type,e=r.pendingProps,o=Hl(he.current).createElement(s),o[xt]=r,o[Tt]=e,vt(o,s,e),ct(o),r.stateNode=o):r.memoizedState=Ug(r.type,e.memoizedProps,r.pendingProps,e.memoizedState),null;case 27:return Po(r),e===null&&Ee&&(o=r.stateNode=Mg(r.type,r.pendingProps,he.current),Rt=r,gn=!0,c=Ze,mi(r.type)?(rf=c,Ze=cn(o.firstChild)):Ze=c),gt(e,r,r.pendingProps.children,s),$l(e,r),e===null&&(r.flags|=4194304),r.child;case 5:return e===null&&Ee&&((c=o=Ze)&&(o=Mw(o,r.type,r.pendingProps,gn),o!==null?(r.stateNode=o,Rt=r,Ze=cn(o.firstChild),gn=!1,c=!0):c=!1),c||Ui(r)),Po(r),c=r.type,h=r.pendingProps,y=e!==null?e.memoizedProps:null,o=h.children,Wc(c,h)?o=null:y!==null&&Wc(c,y)&&(r.flags|=32),r.memoizedState!==null&&(c=Pu(e,r,P1,null,null,s),ns._currentValue=c),$l(e,r),gt(e,r,o,s),r.child;case 6:return e===null&&Ee&&((e=s=Ze)&&(s=Lw(s,r.pendingProps,gn),s!==null?(r.stateNode=s,Rt=r,Ze=null,e=!0):e=!1),e||Ui(r)),null;case 13:return Tm(e,r,s);case 4:return Ge(r,r.stateNode.containerInfo),o=r.pendingProps,e===null?r.child=Tr(r,null,o,s):gt(e,r,o,s),r.child;case 11:return wm(e,r,r.type,r.pendingProps,s);case 7:return gt(e,r,r.pendingProps,s),r.child;case 8:return gt(e,r,r.pendingProps.children,s),r.child;case 12:return gt(e,r,r.pendingProps.children,s),r.child;case 10:return o=r.pendingProps,ei(r,r.type,o.value),gt(e,r,o.children,s),r.child;case 9:return c=r.type._context,o=r.pendingProps.children,_i(r),c=St(c),o=o(c),r.flags|=1,gt(e,r,o,s),r.child;case 14:return Nm(e,r,r.type,r.pendingProps,s);case 15:return km(e,r,r.type,r.pendingProps,s);case 19:return jm(e,r,s);case 31:return o=r.pendingProps,s=r.mode,o={mode:o.mode,children:o.children},e===null?(s=Cl(o,s),s.ref=r.ref,r.child=s,s.return=r,r=s):(s=An(e.child,o),s.ref=r.ref,r.child=s,s.return=r,r=s),r;case 22:return Rm(e,r,s);case 24:return _i(r),o=St(at),e===null?(c=Hu(),c===null&&(c=qe,h=Ku(),c.pooledCache=h,h.refCount++,h!==null&&(c.pooledCacheLanes|=s),c=h),r.memoizedState={parent:o,cache:c},Ju(r),ei(r,at,c)):((e.lanes&s)!==0&&(Yu(e,r),Ma(r,null,null,s),Da()),c=e.memoizedState,h=r.memoizedState,c.parent!==o?(c={parent:o,cache:o},r.memoizedState=c,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=c),ei(r,at,o)):(o=h.cache,ei(r,at,o),o!==c.cache&&qu(r,[at],s,!0))),gt(e,r,r.pendingProps.children,s),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function Ln(e){e.flags|=4}function Mm(e,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Vg(r)){if(r=tn.current,r!==null&&((Ne&4194048)===Ne?yn!==null:(Ne&62914560)!==Ne&&(Ne&536870912)===0||r!==yn))throw Oa=Gu,yp;e.flags|=8192}}function Tl(e,r){r!==null&&(e.flags|=4),e.flags&16384&&(r=e.tag!==22?dh():536870912,e.lanes|=r,Mr|=r)}function Ka(e,r){if(!Ee)switch(e.tailMode){case"hidden":r=e.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?r||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Ie(e){var r=e.alternate!==null&&e.alternate.child===e.child,s=0,o=0;if(r)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,o|=c.subtreeFlags&65011712,o|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,o|=c.subtreeFlags,o|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=o,e.childLanes=s,r}function lw(e,r,s){var o=r.pendingProps;switch(zu(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(r),null;case 1:return Ie(r),null;case 3:return s=r.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),On(at),Fn(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(ka(r)?Ln(r):e===null||e.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,dp())),Ie(r),null;case 26:return s=r.memoizedState,e===null?(Ln(r),s!==null?(Ie(r),Mm(r,s)):(Ie(r),r.flags&=-16777217)):s?s!==e.memoizedState?(Ln(r),Ie(r),Mm(r,s)):(Ie(r),r.flags&=-16777217):(e.memoizedProps!==o&&Ln(r),Ie(r),r.flags&=-16777217),null;case 27:Ks(r),s=he.current;var c=r.type;if(e!==null&&r.stateNode!=null)e.memoizedProps!==o&&Ln(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return Ie(r),null}e=ie.current,ka(r)?cp(r):(e=Mg(c,o,s),r.stateNode=e,Ln(r))}return Ie(r),null;case 5:if(Ks(r),s=r.type,e!==null&&r.stateNode!=null)e.memoizedProps!==o&&Ln(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return Ie(r),null}if(e=ie.current,ka(r))cp(r);else{switch(c=Hl(he.current),e){case 1:e=c.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:e=c.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":e=c.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":e=c.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof o.is=="string"?c.createElement("select",{is:o.is}):c.createElement("select"),o.multiple?e.multiple=!0:o.size&&(e.size=o.size);break;default:e=typeof o.is=="string"?c.createElement(s,{is:o.is}):c.createElement(s)}}e[xt]=r,e[Tt]=o;e:for(c=r.child;c!==null;){if(c.tag===5||c.tag===6)e.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===r)break e;for(;c.sibling===null;){if(c.return===null||c.return===r)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r.stateNode=e;e:switch(vt(e,s,o),s){case"button":case"input":case"select":case"textarea":e=!!o.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Ln(r)}}return Ie(r),r.flags&=-16777217,null;case 6:if(e&&r.stateNode!=null)e.memoizedProps!==o&&Ln(r);else{if(typeof o!="string"&&r.stateNode===null)throw Error(a(166));if(e=he.current,ka(r)){if(e=r.stateNode,s=r.memoizedProps,o=null,c=Rt,c!==null)switch(c.tag){case 27:case 5:o=c.memoizedProps}e[xt]=r,e=!!(e.nodeValue===s||o!==null&&o.suppressHydrationWarning===!0||Ag(e.nodeValue,s)),e||Ui(r)}else e=Hl(e).createTextNode(o),e[xt]=r,r.stateNode=e}return Ie(r),null;case 13:if(o=r.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ka(r),o!==null&&o.dehydrated!==null){if(e===null){if(!c)throw Error(a(318));if(c=r.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(a(317));c[xt]=r}else Ra(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ie(r),c=!1}else c=dp(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return r.flags&256?(Dn(r),r):(Dn(r),null)}if(Dn(r),(r.flags&128)!==0)return r.lanes=s,r;if(s=o!==null,e=e!==null&&e.memoizedState!==null,s){o=r.child,c=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(c=o.alternate.memoizedState.cachePool.pool);var h=null;o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),h!==c&&(o.flags|=2048)}return s!==e&&s&&(r.child.flags|=8192),Tl(r,r.updateQueue),Ie(r),null;case 4:return Fn(),e===null&&Zc(r.stateNode.containerInfo),Ie(r),null;case 10:return On(r.type),Ie(r),null;case 19:if(Q(st),c=r.memoizedState,c===null)return Ie(r),null;if(o=(r.flags&128)!==0,h=c.rendering,h===null)if(o)Ka(c,!1);else{if(Qe!==0||e!==null&&(e.flags&128)!==0)for(e=r.child;e!==null;){if(h=Rl(e),h!==null){for(r.flags|=128,Ka(c,!1),e=h.updateQueue,r.updateQueue=e,Tl(r,e),r.subtreeFlags=0,e=s,s=r.child;s!==null;)op(s,e),s=s.sibling;return I(st,st.current&1|2),r.child}e=e.sibling}c.tail!==null&&mn()>Dl&&(r.flags|=128,o=!0,Ka(c,!1),r.lanes=4194304)}else{if(!o)if(e=Rl(h),e!==null){if(r.flags|=128,o=!0,e=e.updateQueue,r.updateQueue=e,Tl(r,e),Ka(c,!0),c.tail===null&&c.tailMode==="hidden"&&!h.alternate&&!Ee)return Ie(r),null}else 2*mn()-c.renderingStartTime>Dl&&s!==536870912&&(r.flags|=128,o=!0,Ka(c,!1),r.lanes=4194304);c.isBackwards?(h.sibling=r.child,r.child=h):(e=c.last,e!==null?e.sibling=h:r.child=h,c.last=h)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=mn(),r.sibling=null,e=st.current,I(st,o?e&1|2:e&1),r):(Ie(r),null);case 22:case 23:return Dn(r),Fu(),o=r.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(r.flags|=8192):o&&(r.flags|=8192),o?(s&536870912)!==0&&(r.flags&128)===0&&(Ie(r),r.subtreeFlags&6&&(r.flags|=8192)):Ie(r),s=r.updateQueue,s!==null&&Tl(r,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==s&&(r.flags|=2048),e!==null&&Q(qi),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),r.memoizedState.cache!==s&&(r.flags|=2048),On(at),Ie(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function ow(e,r){switch(zu(r),r.tag){case 1:return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return On(at),Fn(),e=r.flags,(e&65536)!==0&&(e&128)===0?(r.flags=e&-65537|128,r):null;case 26:case 27:case 5:return Ks(r),null;case 13:if(Dn(r),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Ra()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return Q(st),null;case 4:return Fn(),null;case 10:return On(r.type),null;case 22:case 23:return Dn(r),Fu(),e!==null&&Q(qi),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 24:return On(at),null;case 25:return null;default:return null}}function Lm(e,r){switch(zu(r),r.tag){case 3:On(at),Fn();break;case 26:case 27:case 5:Ks(r);break;case 4:Fn();break;case 13:Dn(r);break;case 19:Q(st);break;case 10:On(r.type);break;case 22:case 23:Dn(r),Fu(),e!==null&&Q(qi);break;case 24:On(at)}}function Va(e,r){try{var s=r.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var c=o.next;s=c;do{if((s.tag&e)===e){o=void 0;var h=s.create,y=s.inst;o=h(),y.destroy=o}s=s.next}while(s!==c)}}catch(x){Ue(r,r.return,x)}}function li(e,r,s){try{var o=r.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var h=c.next;o=h;do{if((o.tag&e)===e){var y=o.inst,x=y.destroy;if(x!==void 0){y.destroy=void 0,c=r;var k=s,j=x;try{j()}catch(q){Ue(c,k,q)}}}o=o.next}while(o!==h)}}catch(q){Ue(r,r.return,q)}}function zm(e){var r=e.updateQueue;if(r!==null){var s=e.stateNode;try{Np(r,s)}catch(o){Ue(e,e.return,o)}}}function Um(e,r,s){s.props=Vi(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(o){Ue(e,r,o)}}function Ha(e,r){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof s=="function"?e.refCleanup=s(o):s.current=o}}catch(c){Ue(e,r,c)}}function vn(e,r){var s=e.ref,o=e.refCleanup;if(s!==null)if(typeof o=="function")try{o()}catch(c){Ue(e,r,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(c){Ue(e,r,c)}else s.current=null}function Bm(e){var r=e.type,s=e.memoizedProps,o=e.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":s.autoFocus&&o.focus();break e;case"img":s.src?o.src=s.src:s.srcSet&&(o.srcset=s.srcSet)}}catch(c){Ue(e,e.return,c)}}function kc(e,r,s){try{var o=e.stateNode;Cw(o,e.type,s,r),o[Tt]=r}catch(c){Ue(e,e.return,c)}}function _m(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&mi(e.type)||e.tag===4}function Rc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_m(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&mi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ec(e,r,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,r?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,r):(r=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,r.appendChild(e),s=s._reactRootContainer,s!=null||r.onclick!==null||(r.onclick=Vl));else if(o!==4&&(o===27&&mi(e.type)&&(s=e.stateNode,r=null),e=e.child,e!==null))for(Ec(e,r,s),e=e.sibling;e!==null;)Ec(e,r,s),e=e.sibling}function Ol(e,r,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,r?s.insertBefore(e,r):s.appendChild(e);else if(o!==4&&(o===27&&mi(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Ol(e,r,s),e=e.sibling;e!==null;)Ol(e,r,s),e=e.sibling}function qm(e){var r=e.stateNode,s=e.memoizedProps;try{for(var o=e.type,c=r.attributes;c.length;)r.removeAttributeNode(c[0]);vt(r,o,s),r[xt]=e,r[Tt]=s}catch(h){Ue(e,e.return,h)}}var zn=!1,Pe=!1,Ac=!1,Km=typeof WeakSet=="function"?WeakSet:Set,dt=null;function uw(e,r){if(e=e.containerInfo,Xc=Ql,e=Ph(e),Ru(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var c=o.anchorOffset,h=o.focusNode;o=o.focusOffset;try{s.nodeType,h.nodeType}catch{s=null;break e}var y=0,x=-1,k=-1,j=0,q=0,H=e,D=null;t:for(;;){for(var M;H!==s||c!==0&&H.nodeType!==3||(x=y+c),H!==h||o!==0&&H.nodeType!==3||(k=y+o),H.nodeType===3&&(y+=H.nodeValue.length),(M=H.firstChild)!==null;)D=H,H=M;for(;;){if(H===e)break t;if(D===s&&++j===c&&(x=y),D===h&&++q===o&&(k=y),(M=H.nextSibling)!==null)break;H=D,D=H.parentNode}H=M}s=x===-1||k===-1?null:{start:x,end:k}}else s=null}s=s||{start:0,end:0}}else s=null;for(Pc={focusedElem:e,selectionRange:s},Ql=!1,dt=r;dt!==null;)if(r=dt,e=r.child,(r.subtreeFlags&1024)!==0&&e!==null)e.return=r,dt=e;else for(;dt!==null;){switch(r=dt,h=r.alternate,e=r.flags,r.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,s=r,c=h.memoizedProps,h=h.memoizedState,o=s.stateNode;try{var ue=Vi(s.type,c,s.elementType===s.type);e=o.getSnapshotBeforeUpdate(ue,h),o.__reactInternalSnapshotBeforeUpdate=e}catch(ae){Ue(s,s.return,ae)}}break;case 3:if((e&1024)!==0){if(e=r.stateNode.containerInfo,s=e.nodeType,s===9)tf(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":tf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(a(163))}if(e=r.sibling,e!==null){e.return=r.return,dt=e;break}dt=r.return}}function Vm(e,r,s){var o=s.flags;switch(s.tag){case 0:case 11:case 15:oi(e,s),o&4&&Va(5,s);break;case 1:if(oi(e,s),o&4)if(e=s.stateNode,r===null)try{e.componentDidMount()}catch(y){Ue(s,s.return,y)}else{var c=Vi(s.type,r.memoizedProps);r=r.memoizedState;try{e.componentDidUpdate(c,r,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Ue(s,s.return,y)}}o&64&&zm(s),o&512&&Ha(s,s.return);break;case 3:if(oi(e,s),o&64&&(e=s.updateQueue,e!==null)){if(r=null,s.child!==null)switch(s.child.tag){case 27:case 5:r=s.child.stateNode;break;case 1:r=s.child.stateNode}try{Np(e,r)}catch(y){Ue(s,s.return,y)}}break;case 27:r===null&&o&4&&qm(s);case 26:case 5:oi(e,s),r===null&&o&4&&Bm(s),o&512&&Ha(s,s.return);break;case 12:oi(e,s);break;case 13:oi(e,s),o&4&&Jm(e,s),o&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=vw.bind(null,s),zw(e,s))));break;case 22:if(o=s.memoizedState!==null||zn,!o){r=r!==null&&r.memoizedState!==null||Pe,c=zn;var h=Pe;zn=o,(Pe=r)&&!h?ui(e,s,(s.subtreeFlags&8772)!==0):oi(e,s),zn=c,Pe=h}break;case 30:break;default:oi(e,s)}}function Hm(e){var r=e.alternate;r!==null&&(e.alternate=null,Hm(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&su(r)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Je=null,Dt=!1;function Un(e,r,s){for(s=s.child;s!==null;)Gm(e,r,s),s=s.sibling}function Gm(e,r,s){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(ca,s)}catch{}switch(s.tag){case 26:Pe||vn(s,r),Un(e,r,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Pe||vn(s,r);var o=Je,c=Dt;mi(s.type)&&(Je=s.stateNode,Dt=!1),Un(e,r,s),Pa(s.stateNode),Je=o,Dt=c;break;case 5:Pe||vn(s,r);case 6:if(o=Je,c=Dt,Je=null,Un(e,r,s),Je=o,Dt=c,Je!==null)if(Dt)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(s.stateNode)}catch(h){Ue(s,r,h)}else try{Je.removeChild(s.stateNode)}catch(h){Ue(s,r,h)}break;case 18:Je!==null&&(Dt?(e=Je,jg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),ss(e)):jg(Je,s.stateNode));break;case 4:o=Je,c=Dt,Je=s.stateNode.containerInfo,Dt=!0,Un(e,r,s),Je=o,Dt=c;break;case 0:case 11:case 14:case 15:Pe||li(2,s,r),Pe||li(4,s,r),Un(e,r,s);break;case 1:Pe||(vn(s,r),o=s.stateNode,typeof o.componentWillUnmount=="function"&&Um(s,r,o)),Un(e,r,s);break;case 21:Un(e,r,s);break;case 22:Pe=(o=Pe)||s.memoizedState!==null,Un(e,r,s),Pe=o;break;default:Un(e,r,s)}}function Jm(e,r){if(r.memoizedState===null&&(e=r.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ss(e)}catch(s){Ue(r,r.return,s)}}function cw(e){switch(e.tag){case 13:case 19:var r=e.stateNode;return r===null&&(r=e.stateNode=new Km),r;case 22:return e=e.stateNode,r=e._retryCache,r===null&&(r=e._retryCache=new Km),r;default:throw Error(a(435,e.tag))}}function $c(e,r){var s=cw(e);r.forEach(function(o){var c=bw.bind(null,e,o);s.has(o)||(s.add(o),o.then(c,c))})}function Vt(e,r){var s=r.deletions;if(s!==null)for(var o=0;o<s.length;o++){var c=s[o],h=e,y=r,x=y;e:for(;x!==null;){switch(x.tag){case 27:if(mi(x.type)){Je=x.stateNode,Dt=!1;break e}break;case 5:Je=x.stateNode,Dt=!1;break e;case 3:case 4:Je=x.stateNode.containerInfo,Dt=!0;break e}x=x.return}if(Je===null)throw Error(a(160));Gm(h,y,c),Je=null,Dt=!1,h=c.alternate,h!==null&&(h.return=null),c.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)Ym(r,e),r=r.sibling}var un=null;function Ym(e,r){var s=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Vt(r,e),Ht(e),o&4&&(li(3,e,e.return),Va(3,e),li(5,e,e.return));break;case 1:Vt(r,e),Ht(e),o&512&&(Pe||s===null||vn(s,s.return)),o&64&&zn&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?o:s.concat(o))));break;case 26:var c=un;if(Vt(r,e),Ht(e),o&512&&(Pe||s===null||vn(s,s.return)),o&4){var h=s!==null?s.memoizedState:null;if(o=e.memoizedState,s===null)if(o===null)if(e.stateNode===null){e:{o=e.type,s=e.memoizedProps,c=c.ownerDocument||c;t:switch(o){case"title":h=c.getElementsByTagName("title")[0],(!h||h[ha]||h[xt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=c.createElement(o),c.head.insertBefore(h,c.querySelector("head > title"))),vt(h,o,s),h[xt]=e,ct(h),o=h;break e;case"link":var y=qg("link","href",c).get(o+(s.href||""));if(y){for(var x=0;x<y.length;x++)if(h=y[x],h.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&h.getAttribute("rel")===(s.rel==null?null:s.rel)&&h.getAttribute("title")===(s.title==null?null:s.title)&&h.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){y.splice(x,1);break t}}h=c.createElement(o),vt(h,o,s),c.head.appendChild(h);break;case"meta":if(y=qg("meta","content",c).get(o+(s.content||""))){for(x=0;x<y.length;x++)if(h=y[x],h.getAttribute("content")===(s.content==null?null:""+s.content)&&h.getAttribute("name")===(s.name==null?null:s.name)&&h.getAttribute("property")===(s.property==null?null:s.property)&&h.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&h.getAttribute("charset")===(s.charSet==null?null:s.charSet)){y.splice(x,1);break t}}h=c.createElement(o),vt(h,o,s),c.head.appendChild(h);break;default:throw Error(a(468,o))}h[xt]=e,ct(h),o=h}e.stateNode=o}else Kg(c,e.type,e.stateNode);else e.stateNode=_g(c,o,e.memoizedProps);else h!==o?(h===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):h.count--,o===null?Kg(c,e.type,e.stateNode):_g(c,o,e.memoizedProps)):o===null&&e.stateNode!==null&&kc(e,e.memoizedProps,s.memoizedProps)}break;case 27:Vt(r,e),Ht(e),o&512&&(Pe||s===null||vn(s,s.return)),s!==null&&o&4&&kc(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Vt(r,e),Ht(e),o&512&&(Pe||s===null||vn(s,s.return)),e.flags&32){c=e.stateNode;try{dr(c,"")}catch(M){Ue(e,e.return,M)}}o&4&&e.stateNode!=null&&(c=e.memoizedProps,kc(e,c,s!==null?s.memoizedProps:c)),o&1024&&(Ac=!0);break;case 6:if(Vt(r,e),Ht(e),o&4){if(e.stateNode===null)throw Error(a(162));o=e.memoizedProps,s=e.stateNode;try{s.nodeValue=o}catch(M){Ue(e,e.return,M)}}break;case 3:if(Yl=null,c=un,un=Gl(r.containerInfo),Vt(r,e),un=c,Ht(e),o&4&&s!==null&&s.memoizedState.isDehydrated)try{ss(r.containerInfo)}catch(M){Ue(e,e.return,M)}Ac&&(Ac=!1,Im(e));break;case 4:o=un,un=Gl(e.stateNode.containerInfo),Vt(r,e),Ht(e),un=o;break;case 12:Vt(r,e),Ht(e);break;case 13:Vt(r,e),Ht(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Mc=mn()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,$c(e,o)));break;case 22:c=e.memoizedState!==null;var k=s!==null&&s.memoizedState!==null,j=zn,q=Pe;if(zn=j||c,Pe=q||k,Vt(r,e),Pe=q,zn=j,Ht(e),o&8192)e:for(r=e.stateNode,r._visibility=c?r._visibility&-2:r._visibility|1,c&&(s===null||k||zn||Pe||Hi(e)),s=null,r=e;;){if(r.tag===5||r.tag===26){if(s===null){k=s=r;try{if(h=k.stateNode,c)y=h.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{x=k.stateNode;var H=k.memoizedProps.style,D=H!=null&&H.hasOwnProperty("display")?H.display:null;x.style.display=D==null||typeof D=="boolean"?"":(""+D).trim()}}catch(M){Ue(k,k.return,M)}}}else if(r.tag===6){if(s===null){k=r;try{k.stateNode.nodeValue=c?"":k.memoizedProps}catch(M){Ue(k,k.return,M)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===e)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break e;for(;r.sibling===null;){if(r.return===null||r.return===e)break e;s===r&&(s=null),r=r.return}s===r&&(s=null),r.sibling.return=r.return,r=r.sibling}o&4&&(o=e.updateQueue,o!==null&&(s=o.retryQueue,s!==null&&(o.retryQueue=null,$c(e,s))));break;case 19:Vt(r,e),Ht(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,$c(e,o)));break;case 30:break;case 21:break;default:Vt(r,e),Ht(e)}}function Ht(e){var r=e.flags;if(r&2){try{for(var s,o=e.return;o!==null;){if(_m(o)){s=o;break}o=o.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var c=s.stateNode,h=Rc(e);Ol(e,h,c);break;case 5:var y=s.stateNode;s.flags&32&&(dr(y,""),s.flags&=-33);var x=Rc(e);Ol(e,x,y);break;case 3:case 4:var k=s.stateNode.containerInfo,j=Rc(e);Ec(e,j,k);break;default:throw Error(a(161))}}catch(q){Ue(e,e.return,q)}e.flags&=-3}r&4096&&(e.flags&=-4097)}function Im(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var r=e;Im(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),e=e.sibling}}function oi(e,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Vm(e,r.alternate,r),r=r.sibling}function Hi(e){for(e=e.child;e!==null;){var r=e;switch(r.tag){case 0:case 11:case 14:case 15:li(4,r,r.return),Hi(r);break;case 1:vn(r,r.return);var s=r.stateNode;typeof s.componentWillUnmount=="function"&&Um(r,r.return,s),Hi(r);break;case 27:Pa(r.stateNode);case 26:case 5:vn(r,r.return),Hi(r);break;case 22:r.memoizedState===null&&Hi(r);break;case 30:Hi(r);break;default:Hi(r)}e=e.sibling}}function ui(e,r,s){for(s=s&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var o=r.alternate,c=e,h=r,y=h.flags;switch(h.tag){case 0:case 11:case 15:ui(c,h,s),Va(4,h);break;case 1:if(ui(c,h,s),o=h,c=o.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(j){Ue(o,o.return,j)}if(o=h,c=o.updateQueue,c!==null){var x=o.stateNode;try{var k=c.shared.hiddenCallbacks;if(k!==null)for(c.shared.hiddenCallbacks=null,c=0;c<k.length;c++)wp(k[c],x)}catch(j){Ue(o,o.return,j)}}s&&y&64&&zm(h),Ha(h,h.return);break;case 27:qm(h);case 26:case 5:ui(c,h,s),s&&o===null&&y&4&&Bm(h),Ha(h,h.return);break;case 12:ui(c,h,s);break;case 13:ui(c,h,s),s&&y&4&&Jm(c,h);break;case 22:h.memoizedState===null&&ui(c,h,s),Ha(h,h.return);break;case 30:break;default:ui(c,h,s)}r=r.sibling}}function Cc(e,r){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(e=r.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&$a(s))}function Tc(e,r){e=null,r.alternate!==null&&(e=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==e&&(r.refCount++,e!=null&&$a(e))}function bn(e,r,s,o){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Zm(e,r,s,o),r=r.sibling}function Zm(e,r,s,o){var c=r.flags;switch(r.tag){case 0:case 11:case 15:bn(e,r,s,o),c&2048&&Va(9,r);break;case 1:bn(e,r,s,o);break;case 3:bn(e,r,s,o),c&2048&&(e=null,r.alternate!==null&&(e=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==e&&(r.refCount++,e!=null&&$a(e)));break;case 12:if(c&2048){bn(e,r,s,o),e=r.stateNode;try{var h=r.memoizedProps,y=h.id,x=h.onPostCommit;typeof x=="function"&&x(y,r.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(k){Ue(r,r.return,k)}}else bn(e,r,s,o);break;case 13:bn(e,r,s,o);break;case 23:break;case 22:h=r.stateNode,y=r.alternate,r.memoizedState!==null?h._visibility&2?bn(e,r,s,o):Ga(e,r):h._visibility&2?bn(e,r,s,o):(h._visibility|=2,Or(e,r,s,o,(r.subtreeFlags&10256)!==0)),c&2048&&Cc(y,r);break;case 24:bn(e,r,s,o),c&2048&&Tc(r.alternate,r);break;default:bn(e,r,s,o)}}function Or(e,r,s,o,c){for(c=c&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var h=e,y=r,x=s,k=o,j=y.flags;switch(y.tag){case 0:case 11:case 15:Or(h,y,x,k,c),Va(8,y);break;case 23:break;case 22:var q=y.stateNode;y.memoizedState!==null?q._visibility&2?Or(h,y,x,k,c):Ga(h,y):(q._visibility|=2,Or(h,y,x,k,c)),c&&j&2048&&Cc(y.alternate,y);break;case 24:Or(h,y,x,k,c),c&&j&2048&&Tc(y.alternate,y);break;default:Or(h,y,x,k,c)}r=r.sibling}}function Ga(e,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var s=e,o=r,c=o.flags;switch(o.tag){case 22:Ga(s,o),c&2048&&Cc(o.alternate,o);break;case 24:Ga(s,o),c&2048&&Tc(o.alternate,o);break;default:Ga(s,o)}r=r.sibling}}var Ja=8192;function jr(e){if(e.subtreeFlags&Ja)for(e=e.child;e!==null;)Qm(e),e=e.sibling}function Qm(e){switch(e.tag){case 26:jr(e),e.flags&Ja&&e.memoizedState!==null&&Qw(un,e.memoizedState,e.memoizedProps);break;case 5:jr(e);break;case 3:case 4:var r=un;un=Gl(e.stateNode.containerInfo),jr(e),un=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ja,Ja=16777216,jr(e),Ja=r):jr(e));break;default:jr(e)}}function Fm(e){var r=e.alternate;if(r!==null&&(e=r.child,e!==null)){r.child=null;do r=e.sibling,e.sibling=null,e=r;while(e!==null)}}function Ya(e){var r=e.deletions;if((e.flags&16)!==0){if(r!==null)for(var s=0;s<r.length;s++){var o=r[s];dt=o,Pm(o,e)}Fm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Xm(e),e=e.sibling}function Xm(e){switch(e.tag){case 0:case 11:case 15:Ya(e),e.flags&2048&&li(9,e,e.return);break;case 3:Ya(e);break;case 12:Ya(e);break;case 22:var r=e.stateNode;e.memoizedState!==null&&r._visibility&2&&(e.return===null||e.return.tag!==13)?(r._visibility&=-3,jl(e)):Ya(e);break;default:Ya(e)}}function jl(e){var r=e.deletions;if((e.flags&16)!==0){if(r!==null)for(var s=0;s<r.length;s++){var o=r[s];dt=o,Pm(o,e)}Fm(e)}for(e=e.child;e!==null;){switch(r=e,r.tag){case 0:case 11:case 15:li(8,r,r.return),jl(r);break;case 22:s=r.stateNode,s._visibility&2&&(s._visibility&=-3,jl(r));break;default:jl(r)}e=e.sibling}}function Pm(e,r){for(;dt!==null;){var s=dt;switch(s.tag){case 0:case 11:case 15:li(8,s,r);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var o=s.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:$a(s.memoizedState.cache)}if(o=s.child,o!==null)o.return=s,dt=o;else e:for(s=e;dt!==null;){o=dt;var c=o.sibling,h=o.return;if(Hm(o),o===s){dt=null;break e}if(c!==null){c.return=h,dt=c;break e}dt=h}}}var fw={getCacheForType:function(e){var r=St(at),s=r.data.get(e);return s===void 0&&(s=e(),r.data.set(e,s)),s}},dw=typeof WeakMap=="function"?WeakMap:Map,Ce=0,qe=null,ve=null,Ne=0,Te=0,Gt=null,ci=!1,Dr=!1,Oc=!1,Bn=0,Qe=0,fi=0,Gi=0,jc=0,nn=0,Mr=0,Ia=null,Mt=null,Dc=!1,Mc=0,Dl=1/0,Ml=null,di=null,yt=0,hi=null,Lr=null,zr=0,Lc=0,zc=null,Wm=null,Za=0,Uc=null;function Jt(){if((Ce&2)!==0&&Ne!==0)return Ne&-Ne;if(B.T!==null){var e=Nr;return e!==0?e:Gc()}return mh()}function eg(){nn===0&&(nn=(Ne&536870912)===0||Ee?fh():536870912);var e=tn.current;return e!==null&&(e.flags|=32),nn}function Yt(e,r,s){(e===qe&&(Te===2||Te===9)||e.cancelPendingCommit!==null)&&(Ur(e,0),pi(e,Ne,nn,!1)),da(e,s),((Ce&2)===0||e!==qe)&&(e===qe&&((Ce&2)===0&&(Gi|=s),Qe===4&&pi(e,Ne,nn,!1)),xn(e))}function tg(e,r,s){if((Ce&6)!==0)throw Error(a(327));var o=!s&&(r&124)===0&&(r&e.expiredLanes)===0||fa(e,r),c=o?mw(e,r):qc(e,r,!0),h=o;do{if(c===0){Dr&&!o&&pi(e,r,0,!1);break}else{if(s=e.current.alternate,h&&!hw(s)){c=qc(e,r,!1),h=!1;continue}if(c===2){if(h=r,e.errorRecoveryDisabledLanes&h)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){r=y;e:{var x=e;c=Ia;var k=x.current.memoizedState.isDehydrated;if(k&&(Ur(x,y).flags|=256),y=qc(x,y,!1),y!==2){if(Oc&&!k){x.errorRecoveryDisabledLanes|=h,Gi|=h,c=4;break e}h=Mt,Mt=c,h!==null&&(Mt===null?Mt=h:Mt.push.apply(Mt,h))}c=y}if(h=!1,c!==2)continue}}if(c===1){Ur(e,0),pi(e,r,0,!0);break}e:{switch(o=e,h=c,h){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:pi(o,r,nn,!ci);break e;case 2:Mt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(c=Mc+300-mn(),10<c)){if(pi(o,r,nn,!ci),Js(o,0,!0)!==0)break e;o.timeoutHandle=Tg(ng.bind(null,o,s,Mt,Ml,Dc,r,nn,Gi,Mr,ci,h,2,-0,0),c);break e}ng(o,s,Mt,Ml,Dc,r,nn,Gi,Mr,ci,h,0,-0,0)}}break}while(!0);xn(e)}function ng(e,r,s,o,c,h,y,x,k,j,q,H,D,M){if(e.timeoutHandle=-1,H=r.subtreeFlags,(H&8192||(H&16785408)===16785408)&&(ts={stylesheets:null,count:0,unsuspend:Zw},Qm(r),H=Fw(),H!==null)){e.cancelPendingCommit=H(ug.bind(null,e,r,h,s,o,c,y,x,k,q,1,D,M)),pi(e,h,y,!j);return}ug(e,r,h,s,o,c,y,x,k)}function hw(e){for(var r=e;;){var s=r.tag;if((s===0||s===11||s===15)&&r.flags&16384&&(s=r.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var o=0;o<s.length;o++){var c=s[o],h=c.getSnapshot;c=c.value;try{if(!qt(h(),c))return!1}catch{return!1}}if(s=r.child,r.subtreeFlags&16384&&s!==null)s.return=r,r=s;else{if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function pi(e,r,s,o){r&=~jc,r&=~Gi,e.suspendedLanes|=r,e.pingedLanes&=~r,o&&(e.warmLanes|=r),o=e.expirationTimes;for(var c=r;0<c;){var h=31-_t(c),y=1<<h;o[h]=-1,c&=~y}s!==0&&hh(e,s,r)}function Ll(){return(Ce&6)===0?(Qa(0),!1):!0}function Bc(){if(ve!==null){if(Te===0)var e=ve.return;else e=ve,Tn=Bi=null,tc(e),Cr=null,_a=0,e=ve;for(;e!==null;)Lm(e.alternate,e),e=e.return;ve=null}}function Ur(e,r){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,Ow(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Bc(),qe=e,ve=s=An(e.current,null),Ne=r,Te=0,Gt=null,ci=!1,Dr=fa(e,r),Oc=!1,Mr=nn=jc=Gi=fi=Qe=0,Mt=Ia=null,Dc=!1,(r&8)!==0&&(r|=r&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=r;0<o;){var c=31-_t(o),h=1<<c;r|=e[c],o&=~h}return Bn=r,il(),s}function ig(e,r){ge=null,B.H=wl,r===Ta||r===dl?(r=xp(),Te=3):r===yp?(r=xp(),Te=4):Te=r===Sm?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Gt=r,ve===null&&(Qe=1,Al(e,Xt(r,e.current)))}function rg(){var e=B.H;return B.H=wl,e===null?wl:e}function ag(){var e=B.A;return B.A=fw,e}function _c(){Qe=4,ci||(Ne&4194048)!==Ne&&tn.current!==null||(Dr=!0),(fi&134217727)===0&&(Gi&134217727)===0||qe===null||pi(qe,Ne,nn,!1)}function qc(e,r,s){var o=Ce;Ce|=2;var c=rg(),h=ag();(qe!==e||Ne!==r)&&(Ml=null,Ur(e,r)),r=!1;var y=Qe;e:do try{if(Te!==0&&ve!==null){var x=ve,k=Gt;switch(Te){case 8:Bc(),y=6;break e;case 3:case 2:case 9:case 6:tn.current===null&&(r=!0);var j=Te;if(Te=0,Gt=null,Br(e,x,k,j),s&&Dr){y=0;break e}break;default:j=Te,Te=0,Gt=null,Br(e,x,k,j)}}pw(),y=Qe;break}catch(q){ig(e,q)}while(!0);return r&&e.shellSuspendCounter++,Tn=Bi=null,Ce=o,B.H=c,B.A=h,ve===null&&(qe=null,Ne=0,il()),y}function pw(){for(;ve!==null;)sg(ve)}function mw(e,r){var s=Ce;Ce|=2;var o=rg(),c=ag();qe!==e||Ne!==r?(Ml=null,Dl=mn()+500,Ur(e,r)):Dr=fa(e,r);e:do try{if(Te!==0&&ve!==null){r=ve;var h=Gt;t:switch(Te){case 1:Te=0,Gt=null,Br(e,r,h,1);break;case 2:case 9:if(vp(h)){Te=0,Gt=null,lg(r);break}r=function(){Te!==2&&Te!==9||qe!==e||(Te=7),xn(e)},h.then(r,r);break e;case 3:Te=7;break e;case 4:Te=5;break e;case 7:vp(h)?(Te=0,Gt=null,lg(r)):(Te=0,Gt=null,Br(e,r,h,7));break;case 5:var y=null;switch(ve.tag){case 26:y=ve.memoizedState;case 5:case 27:var x=ve;if(!y||Vg(y)){Te=0,Gt=null;var k=x.sibling;if(k!==null)ve=k;else{var j=x.return;j!==null?(ve=j,zl(j)):ve=null}break t}}Te=0,Gt=null,Br(e,r,h,5);break;case 6:Te=0,Gt=null,Br(e,r,h,6);break;case 8:Bc(),Qe=6;break e;default:throw Error(a(462))}}gw();break}catch(q){ig(e,q)}while(!0);return Tn=Bi=null,B.H=o,B.A=c,Ce=s,ve!==null?0:(qe=null,Ne=0,il(),Qe)}function gw(){for(;ve!==null&&!BS();)sg(ve)}function sg(e){var r=Dm(e.alternate,e,Bn);e.memoizedProps=e.pendingProps,r===null?zl(e):ve=r}function lg(e){var r=e,s=r.alternate;switch(r.tag){case 15:case 0:r=Am(s,r,r.pendingProps,r.type,void 0,Ne);break;case 11:r=Am(s,r,r.pendingProps,r.type.render,r.ref,Ne);break;case 5:tc(r);default:Lm(s,r),r=ve=op(r,Bn),r=Dm(s,r,Bn)}e.memoizedProps=e.pendingProps,r===null?zl(e):ve=r}function Br(e,r,s,o){Tn=Bi=null,tc(r),Cr=null,_a=0;var c=r.return;try{if(aw(e,c,r,s,Ne)){Qe=1,Al(e,Xt(s,e.current)),ve=null;return}}catch(h){if(c!==null)throw ve=c,h;Qe=1,Al(e,Xt(s,e.current)),ve=null;return}r.flags&32768?(Ee||o===1?e=!0:Dr||(Ne&536870912)!==0?e=!1:(ci=e=!0,(o===2||o===9||o===3||o===6)&&(o=tn.current,o!==null&&o.tag===13&&(o.flags|=16384))),og(r,e)):zl(r)}function zl(e){var r=e;do{if((r.flags&32768)!==0){og(r,ci);return}e=r.return;var s=lw(r.alternate,r,Bn);if(s!==null){ve=s;return}if(r=r.sibling,r!==null){ve=r;return}ve=r=e}while(r!==null);Qe===0&&(Qe=5)}function og(e,r){do{var s=ow(e.alternate,e);if(s!==null){s.flags&=32767,ve=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!r&&(e=e.sibling,e!==null)){ve=e;return}ve=e=s}while(e!==null);Qe=6,ve=null}function ug(e,r,s,o,c,h,y,x,k){e.cancelPendingCommit=null;do Ul();while(yt!==0);if((Ce&6)!==0)throw Error(a(327));if(r!==null){if(r===e.current)throw Error(a(177));if(h=r.lanes|r.childLanes,h|=Tu,ZS(e,s,h,y,x,k),e===qe&&(ve=qe=null,Ne=0),Lr=r,hi=e,zr=s,Lc=h,zc=c,Wm=o,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,xw(Vs,function(){return pg(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||o){o=B.T,B.T=null,c=Y.p,Y.p=2,y=Ce,Ce|=4;try{uw(e,r,s)}finally{Ce=y,Y.p=c,B.T=o}}yt=1,cg(),fg(),dg()}}function cg(){if(yt===1){yt=0;var e=hi,r=Lr,s=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||s){s=B.T,B.T=null;var o=Y.p;Y.p=2;var c=Ce;Ce|=4;try{Ym(r,e);var h=Pc,y=Ph(e.containerInfo),x=h.focusedElem,k=h.selectionRange;if(y!==x&&x&&x.ownerDocument&&Xh(x.ownerDocument.documentElement,x)){if(k!==null&&Ru(x)){var j=k.start,q=k.end;if(q===void 0&&(q=j),"selectionStart"in x)x.selectionStart=j,x.selectionEnd=Math.min(q,x.value.length);else{var H=x.ownerDocument||document,D=H&&H.defaultView||window;if(D.getSelection){var M=D.getSelection(),ue=x.textContent.length,ae=Math.min(k.start,ue),Le=k.end===void 0?ae:Math.min(k.end,ue);!M.extend&&ae>Le&&(y=Le,Le=ae,ae=y);var C=Fh(x,ae),$=Fh(x,Le);if(C&&$&&(M.rangeCount!==1||M.anchorNode!==C.node||M.anchorOffset!==C.offset||M.focusNode!==$.node||M.focusOffset!==$.offset)){var T=H.createRange();T.setStart(C.node,C.offset),M.removeAllRanges(),ae>Le?(M.addRange(T),M.extend($.node,$.offset)):(T.setEnd($.node,$.offset),M.addRange(T))}}}}for(H=[],M=x;M=M.parentNode;)M.nodeType===1&&H.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<H.length;x++){var K=H[x];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}Ql=!!Xc,Pc=Xc=null}finally{Ce=c,Y.p=o,B.T=s}}e.current=r,yt=2}}function fg(){if(yt===2){yt=0;var e=hi,r=Lr,s=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||s){s=B.T,B.T=null;var o=Y.p;Y.p=2;var c=Ce;Ce|=4;try{Vm(e,r.alternate,r)}finally{Ce=c,Y.p=o,B.T=s}}yt=3}}function dg(){if(yt===4||yt===3){yt=0,_S();var e=hi,r=Lr,s=zr,o=Wm;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?yt=5:(yt=0,Lr=hi=null,hg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(di=null),ru(s),r=r.stateNode,Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(ca,r,void 0,(r.current.flags&128)===128)}catch{}if(o!==null){r=B.T,c=Y.p,Y.p=2,B.T=null;try{for(var h=e.onRecoverableError,y=0;y<o.length;y++){var x=o[y];h(x.value,{componentStack:x.stack})}}finally{B.T=r,Y.p=c}}(zr&3)!==0&&Ul(),xn(e),c=e.pendingLanes,(s&4194090)!==0&&(c&42)!==0?e===Uc?Za++:(Za=0,Uc=e):Za=0,Qa(0)}}function hg(e,r){(e.pooledCacheLanes&=r)===0&&(r=e.pooledCache,r!=null&&(e.pooledCache=null,$a(r)))}function Ul(e){return cg(),fg(),dg(),pg()}function pg(){if(yt!==5)return!1;var e=hi,r=Lc;Lc=0;var s=ru(zr),o=B.T,c=Y.p;try{Y.p=32>s?32:s,B.T=null,s=zc,zc=null;var h=hi,y=zr;if(yt=0,Lr=hi=null,zr=0,(Ce&6)!==0)throw Error(a(331));var x=Ce;if(Ce|=4,Xm(h.current),Zm(h,h.current,y,s),Ce=x,Qa(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(ca,h)}catch{}return!0}finally{Y.p=c,B.T=o,hg(e,r)}}function mg(e,r,s){r=Xt(s,r),r=mc(e.stateNode,r,2),e=ii(e,r,2),e!==null&&(da(e,2),xn(e))}function Ue(e,r,s){if(e.tag===3)mg(e,e,s);else for(;r!==null;){if(r.tag===3){mg(r,e,s);break}else if(r.tag===1){var o=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(di===null||!di.has(o))){e=Xt(s,e),s=bm(2),o=ii(r,s,2),o!==null&&(xm(s,o,r,e),da(o,2),xn(o));break}}r=r.return}}function Kc(e,r,s){var o=e.pingCache;if(o===null){o=e.pingCache=new dw;var c=new Set;o.set(r,c)}else c=o.get(r),c===void 0&&(c=new Set,o.set(r,c));c.has(s)||(Oc=!0,c.add(s),e=yw.bind(null,e,r,s),r.then(e,e))}function yw(e,r,s){var o=e.pingCache;o!==null&&o.delete(r),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,qe===e&&(Ne&s)===s&&(Qe===4||Qe===3&&(Ne&62914560)===Ne&&300>mn()-Mc?(Ce&2)===0&&Ur(e,0):jc|=s,Mr===Ne&&(Mr=0)),xn(e)}function gg(e,r){r===0&&(r=dh()),e=br(e,r),e!==null&&(da(e,r),xn(e))}function vw(e){var r=e.memoizedState,s=0;r!==null&&(s=r.retryLane),gg(e,s)}function bw(e,r){var s=0;switch(e.tag){case 13:var o=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(r),gg(e,s)}function xw(e,r){return eu(e,r)}var Bl=null,_r=null,Vc=!1,_l=!1,Hc=!1,Ji=0;function xn(e){e!==_r&&e.next===null&&(_r===null?Bl=_r=e:_r=_r.next=e),_l=!0,Vc||(Vc=!0,ww())}function Qa(e,r){if(!Hc&&_l){Hc=!0;do for(var s=!1,o=Bl;o!==null;){if(e!==0){var c=o.pendingLanes;if(c===0)var h=0;else{var y=o.suspendedLanes,x=o.pingedLanes;h=(1<<31-_t(42|e)+1)-1,h&=c&~(y&~x),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(s=!0,xg(o,h))}else h=Ne,h=Js(o,o===qe?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(h&3)===0||fa(o,h)||(s=!0,xg(o,h));o=o.next}while(s);Hc=!1}}function Sw(){yg()}function yg(){_l=Vc=!1;var e=0;Ji!==0&&(Tw()&&(e=Ji),Ji=0);for(var r=mn(),s=null,o=Bl;o!==null;){var c=o.next,h=vg(o,r);h===0?(o.next=null,s===null?Bl=c:s.next=c,c===null&&(_r=s)):(s=o,(e!==0||(h&3)!==0)&&(_l=!0)),o=c}Qa(e)}function vg(e,r){for(var s=e.suspendedLanes,o=e.pingedLanes,c=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var y=31-_t(h),x=1<<y,k=c[y];k===-1?((x&s)===0||(x&o)!==0)&&(c[y]=IS(x,r)):k<=r&&(e.expiredLanes|=x),h&=~x}if(r=qe,s=Ne,s=Js(e,e===r?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,s===0||e===r&&(Te===2||Te===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&tu(o),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||fa(e,s)){if(r=s&-s,r===e.callbackPriority)return r;switch(o!==null&&tu(o),ru(s)){case 2:case 8:s=uh;break;case 32:s=Vs;break;case 268435456:s=ch;break;default:s=Vs}return o=bg.bind(null,e),s=eu(s,o),e.callbackPriority=r,e.callbackNode=s,r}return o!==null&&o!==null&&tu(o),e.callbackPriority=2,e.callbackNode=null,2}function bg(e,r){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(Ul()&&e.callbackNode!==s)return null;var o=Ne;return o=Js(e,e===qe?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(tg(e,o,r),vg(e,mn()),e.callbackNode!=null&&e.callbackNode===s?bg.bind(null,e):null)}function xg(e,r){if(Ul())return null;tg(e,r,!0)}function ww(){jw(function(){(Ce&6)!==0?eu(oh,Sw):yg()})}function Gc(){return Ji===0&&(Ji=fh()),Ji}function Sg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Fs(""+e)}function wg(e,r){var s=r.ownerDocument.createElement("input");return s.name=r.name,s.value=r.value,e.id&&s.setAttribute("form",e.id),r.parentNode.insertBefore(s,r),e=new FormData(e),s.parentNode.removeChild(s),e}function Nw(e,r,s,o,c){if(r==="submit"&&s&&s.stateNode===c){var h=Sg((c[Tt]||null).action),y=o.submitter;y&&(r=(r=y[Tt]||null)?Sg(r.formAction):y.getAttribute("formAction"),r!==null&&(h=r,y=null));var x=new el("action","action",null,o,c);e.push({event:x,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Ji!==0){var k=y?wg(c,y):new FormData(c);cc(s,{pending:!0,data:k,method:c.method,action:h},null,k)}}else typeof h=="function"&&(x.preventDefault(),k=y?wg(c,y):new FormData(c),cc(s,{pending:!0,data:k,method:c.method,action:h},h,k))},currentTarget:c}]})}}for(var Jc=0;Jc<Cu.length;Jc++){var Yc=Cu[Jc],kw=Yc.toLowerCase(),Rw=Yc[0].toUpperCase()+Yc.slice(1);on(kw,"on"+Rw)}on(tp,"onAnimationEnd"),on(np,"onAnimationIteration"),on(ip,"onAnimationStart"),on("dblclick","onDoubleClick"),on("focusin","onFocus"),on("focusout","onBlur"),on(V1,"onTransitionRun"),on(H1,"onTransitionStart"),on(G1,"onTransitionCancel"),on(rp,"onTransitionEnd"),ur("onMouseEnter",["mouseout","mouseover"]),ur("onMouseLeave",["mouseout","mouseover"]),ur("onPointerEnter",["pointerout","pointerover"]),ur("onPointerLeave",["pointerout","pointerover"]),Ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ci("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fa="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ew=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fa));function Ng(e,r){r=(r&4)!==0;for(var s=0;s<e.length;s++){var o=e[s],c=o.event;o=o.listeners;e:{var h=void 0;if(r)for(var y=o.length-1;0<=y;y--){var x=o[y],k=x.instance,j=x.currentTarget;if(x=x.listener,k!==h&&c.isPropagationStopped())break e;h=x,c.currentTarget=j;try{h(c)}catch(q){El(q)}c.currentTarget=null,h=k}else for(y=0;y<o.length;y++){if(x=o[y],k=x.instance,j=x.currentTarget,x=x.listener,k!==h&&c.isPropagationStopped())break e;h=x,c.currentTarget=j;try{h(c)}catch(q){El(q)}c.currentTarget=null,h=k}}}}function be(e,r){var s=r[au];s===void 0&&(s=r[au]=new Set);var o=e+"__bubble";s.has(o)||(kg(r,e,2,!1),s.add(o))}function Ic(e,r,s){var o=0;r&&(o|=4),kg(s,e,o,r)}var ql="_reactListening"+Math.random().toString(36).slice(2);function Zc(e){if(!e[ql]){e[ql]=!0,yh.forEach(function(s){s!=="selectionchange"&&(Ew.has(s)||Ic(s,!1,e),Ic(s,!0,e))});var r=e.nodeType===9?e:e.ownerDocument;r===null||r[ql]||(r[ql]=!0,Ic("selectionchange",!1,r))}}function kg(e,r,s,o){switch(Zg(r)){case 2:var c=Ww;break;case 8:c=eN;break;default:c=uf}s=c.bind(null,r,s,e),c=void 0,!gu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(c=!0),o?c!==void 0?e.addEventListener(r,s,{capture:!0,passive:c}):e.addEventListener(r,s,!0):c!==void 0?e.addEventListener(r,s,{passive:c}):e.addEventListener(r,s,!1)}function Qc(e,r,s,o,c){var h=o;if((r&1)===0&&(r&2)===0&&o!==null)e:for(;;){if(o===null)return;var y=o.tag;if(y===3||y===4){var x=o.stateNode.containerInfo;if(x===c)break;if(y===4)for(y=o.return;y!==null;){var k=y.tag;if((k===3||k===4)&&y.stateNode.containerInfo===c)return;y=y.return}for(;x!==null;){if(y=sr(x),y===null)return;if(k=y.tag,k===5||k===6||k===26||k===27){o=h=y;continue e}x=x.parentNode}}o=o.return}Oh(function(){var j=h,q=pu(s),H=[];e:{var D=ap.get(e);if(D!==void 0){var M=el,ue=e;switch(e){case"keypress":if(Ps(s)===0)break e;case"keydown":case"keyup":M=x1;break;case"focusin":ue="focus",M=xu;break;case"focusout":ue="blur",M=xu;break;case"beforeblur":case"afterblur":M=xu;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":M=Mh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=o1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=N1;break;case tp:case np:case ip:M=f1;break;case rp:M=R1;break;case"scroll":case"scrollend":M=s1;break;case"wheel":M=A1;break;case"copy":case"cut":case"paste":M=h1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=zh;break;case"toggle":case"beforetoggle":M=C1}var ae=(r&4)!==0,Le=!ae&&(e==="scroll"||e==="scrollend"),C=ae?D!==null?D+"Capture":null:D;ae=[];for(var $=j,T;$!==null;){var K=$;if(T=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||T===null||C===null||(K=ma($,C),K!=null&&ae.push(Xa($,K,T))),Le)break;$=$.return}0<ae.length&&(D=new M(D,ue,null,s,q),H.push({event:D,listeners:ae}))}}if((r&7)===0){e:{if(D=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",D&&s!==hu&&(ue=s.relatedTarget||s.fromElement)&&(sr(ue)||ue[ar]))break e;if((M||D)&&(D=q.window===q?q:(D=q.ownerDocument)?D.defaultView||D.parentWindow:window,M?(ue=s.relatedTarget||s.toElement,M=j,ue=ue?sr(ue):null,ue!==null&&(Le=u(ue),ae=ue.tag,ue!==Le||ae!==5&&ae!==27&&ae!==6)&&(ue=null)):(M=null,ue=j),M!==ue)){if(ae=Mh,K="onMouseLeave",C="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(ae=zh,K="onPointerLeave",C="onPointerEnter",$="pointer"),Le=M==null?D:pa(M),T=ue==null?D:pa(ue),D=new ae(K,$+"leave",M,s,q),D.target=Le,D.relatedTarget=T,K=null,sr(q)===j&&(ae=new ae(C,$+"enter",ue,s,q),ae.target=T,ae.relatedTarget=Le,K=ae),Le=K,M&&ue)t:{for(ae=M,C=ue,$=0,T=ae;T;T=qr(T))$++;for(T=0,K=C;K;K=qr(K))T++;for(;0<$-T;)ae=qr(ae),$--;for(;0<T-$;)C=qr(C),T--;for(;$--;){if(ae===C||C!==null&&ae===C.alternate)break t;ae=qr(ae),C=qr(C)}ae=null}else ae=null;M!==null&&Rg(H,D,M,ae,!1),ue!==null&&Le!==null&&Rg(H,Le,ue,ae,!0)}}e:{if(D=j?pa(j):window,M=D.nodeName&&D.nodeName.toLowerCase(),M==="select"||M==="input"&&D.type==="file")var P=Gh;else if(Vh(D))if(Jh)P=_1;else{P=U1;var ye=z1}else M=D.nodeName,!M||M.toLowerCase()!=="input"||D.type!=="checkbox"&&D.type!=="radio"?j&&du(j.elementType)&&(P=Gh):P=B1;if(P&&(P=P(e,j))){Hh(H,P,s,q);break e}ye&&ye(e,D,j),e==="focusout"&&j&&D.type==="number"&&j.memoizedProps.value!=null&&fu(D,"number",D.value)}switch(ye=j?pa(j):window,e){case"focusin":(Vh(ye)||ye.contentEditable==="true")&&(gr=ye,Eu=j,Na=null);break;case"focusout":Na=Eu=gr=null;break;case"mousedown":Au=!0;break;case"contextmenu":case"mouseup":case"dragend":Au=!1,Wh(H,s,q);break;case"selectionchange":if(K1)break;case"keydown":case"keyup":Wh(H,s,q)}var te;if(wu)e:{switch(e){case"compositionstart":var se="onCompositionStart";break e;case"compositionend":se="onCompositionEnd";break e;case"compositionupdate":se="onCompositionUpdate";break e}se=void 0}else mr?qh(e,s)&&(se="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(se="onCompositionStart");se&&(Uh&&s.locale!=="ko"&&(mr||se!=="onCompositionStart"?se==="onCompositionEnd"&&mr&&(te=jh()):(Wn=q,yu="value"in Wn?Wn.value:Wn.textContent,mr=!0)),ye=Kl(j,se),0<ye.length&&(se=new Lh(se,e,null,s,q),H.push({event:se,listeners:ye}),te?se.data=te:(te=Kh(s),te!==null&&(se.data=te)))),(te=O1?j1(e,s):D1(e,s))&&(se=Kl(j,"onBeforeInput"),0<se.length&&(ye=new Lh("onBeforeInput","beforeinput",null,s,q),H.push({event:ye,listeners:se}),ye.data=te)),Nw(H,e,j,s,q)}Ng(H,r)})}function Xa(e,r,s){return{instance:e,listener:r,currentTarget:s}}function Kl(e,r){for(var s=r+"Capture",o=[];e!==null;){var c=e,h=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||h===null||(c=ma(e,s),c!=null&&o.unshift(Xa(e,c,h)),c=ma(e,r),c!=null&&o.push(Xa(e,c,h))),e.tag===3)return o;e=e.return}return[]}function qr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rg(e,r,s,o,c){for(var h=r._reactName,y=[];s!==null&&s!==o;){var x=s,k=x.alternate,j=x.stateNode;if(x=x.tag,k!==null&&k===o)break;x!==5&&x!==26&&x!==27||j===null||(k=j,c?(j=ma(s,h),j!=null&&y.unshift(Xa(s,j,k))):c||(j=ma(s,h),j!=null&&y.push(Xa(s,j,k)))),s=s.return}y.length!==0&&e.push({event:r,listeners:y})}var Aw=/\r\n?/g,$w=/\u0000|\uFFFD/g;function Eg(e){return(typeof e=="string"?e:""+e).replace(Aw,`
|
|
59
|
+
`).replace($w,"")}function Ag(e,r){return r=Eg(r),Eg(e)===r}function Vl(){}function Me(e,r,s,o,c,h){switch(s){case"children":typeof o=="string"?r==="body"||r==="textarea"&&o===""||dr(e,o):(typeof o=="number"||typeof o=="bigint")&&r!=="body"&&dr(e,""+o);break;case"className":Is(e,"class",o);break;case"tabIndex":Is(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Is(e,s,o);break;case"style":Ch(e,o,h);break;case"data":if(r!=="object"){Is(e,"data",o);break}case"src":case"href":if(o===""&&(r!=="a"||s!=="href")){e.removeAttribute(s);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(s);break}o=Fs(""+o),e.setAttribute(s,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(s==="formAction"?(r!=="input"&&Me(e,r,"name",c.name,c,null),Me(e,r,"formEncType",c.formEncType,c,null),Me(e,r,"formMethod",c.formMethod,c,null),Me(e,r,"formTarget",c.formTarget,c,null)):(Me(e,r,"encType",c.encType,c,null),Me(e,r,"method",c.method,c,null),Me(e,r,"target",c.target,c,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(s);break}o=Fs(""+o),e.setAttribute(s,o);break;case"onClick":o!=null&&(e.onclick=Vl);break;case"onScroll":o!=null&&be("scroll",e);break;case"onScrollEnd":o!=null&&be("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(s=o.__html,s!=null){if(c.children!=null)throw Error(a(60));e.innerHTML=s}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}s=Fs(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(s,""+o):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":o===!0?e.setAttribute(s,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(s,o):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(s,o):e.removeAttribute(s);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(s):e.setAttribute(s,o);break;case"popover":be("beforetoggle",e),be("toggle",e),Ys(e,"popover",o);break;case"xlinkActuate":Rn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Rn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Rn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Rn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Rn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Rn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Rn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Rn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Rn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Ys(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=r1.get(s)||s,Ys(e,s,o))}}function Fc(e,r,s,o,c,h){switch(s){case"style":Ch(e,o,h);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(s=o.__html,s!=null){if(c.children!=null)throw Error(a(60));e.innerHTML=s}}break;case"children":typeof o=="string"?dr(e,o):(typeof o=="number"||typeof o=="bigint")&&dr(e,""+o);break;case"onScroll":o!=null&&be("scroll",e);break;case"onScrollEnd":o!=null&&be("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Vl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vh.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(c=s.endsWith("Capture"),r=s.slice(2,c?s.length-7:void 0),h=e[Tt]||null,h=h!=null?h[s]:null,typeof h=="function"&&e.removeEventListener(r,h,c),typeof o=="function")){typeof h!="function"&&h!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(r,o,c);break e}s in e?e[s]=o:o===!0?e.setAttribute(s,""):Ys(e,s,o)}}}function vt(e,r,s){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":be("error",e),be("load",e);var o=!1,c=!1,h;for(h in s)if(s.hasOwnProperty(h)){var y=s[h];if(y!=null)switch(h){case"src":o=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Me(e,r,h,y,s,null)}}c&&Me(e,r,"srcSet",s.srcSet,s,null),o&&Me(e,r,"src",s.src,s,null);return;case"input":be("invalid",e);var x=h=y=c=null,k=null,j=null;for(o in s)if(s.hasOwnProperty(o)){var q=s[o];if(q!=null)switch(o){case"name":c=q;break;case"type":y=q;break;case"checked":k=q;break;case"defaultChecked":j=q;break;case"value":h=q;break;case"defaultValue":x=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(a(137,r));break;default:Me(e,r,o,q,s,null)}}Rh(e,h,x,k,j,y,c,!1),Zs(e);return;case"select":be("invalid",e),o=y=h=null;for(c in s)if(s.hasOwnProperty(c)&&(x=s[c],x!=null))switch(c){case"value":h=x;break;case"defaultValue":y=x;break;case"multiple":o=x;default:Me(e,r,c,x,s,null)}r=h,s=y,e.multiple=!!o,r!=null?fr(e,!!o,r,!1):s!=null&&fr(e,!!o,s,!0);return;case"textarea":be("invalid",e),h=c=o=null;for(y in s)if(s.hasOwnProperty(y)&&(x=s[y],x!=null))switch(y){case"value":o=x;break;case"defaultValue":c=x;break;case"children":h=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(a(91));break;default:Me(e,r,y,x,s,null)}Ah(e,o,c,h),Zs(e);return;case"option":for(k in s)if(s.hasOwnProperty(k)&&(o=s[k],o!=null))switch(k){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:Me(e,r,k,o,s,null)}return;case"dialog":be("beforetoggle",e),be("toggle",e),be("cancel",e),be("close",e);break;case"iframe":case"object":be("load",e);break;case"video":case"audio":for(o=0;o<Fa.length;o++)be(Fa[o],e);break;case"image":be("error",e),be("load",e);break;case"details":be("toggle",e);break;case"embed":case"source":case"link":be("error",e),be("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(j in s)if(s.hasOwnProperty(j)&&(o=s[j],o!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Me(e,r,j,o,s,null)}return;default:if(du(r)){for(q in s)s.hasOwnProperty(q)&&(o=s[q],o!==void 0&&Fc(e,r,q,o,s,void 0));return}}for(x in s)s.hasOwnProperty(x)&&(o=s[x],o!=null&&Me(e,r,x,o,s,null))}function Cw(e,r,s,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,h=null,y=null,x=null,k=null,j=null,q=null;for(M in s){var H=s[M];if(s.hasOwnProperty(M)&&H!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":k=H;default:o.hasOwnProperty(M)||Me(e,r,M,null,o,H)}}for(var D in o){var M=o[D];if(H=s[D],o.hasOwnProperty(D)&&(M!=null||H!=null))switch(D){case"type":h=M;break;case"name":c=M;break;case"checked":j=M;break;case"defaultChecked":q=M;break;case"value":y=M;break;case"defaultValue":x=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(a(137,r));break;default:M!==H&&Me(e,r,D,M,o,H)}}cu(e,y,x,k,j,q,h,c);return;case"select":M=y=x=D=null;for(h in s)if(k=s[h],s.hasOwnProperty(h)&&k!=null)switch(h){case"value":break;case"multiple":M=k;default:o.hasOwnProperty(h)||Me(e,r,h,null,o,k)}for(c in o)if(h=o[c],k=s[c],o.hasOwnProperty(c)&&(h!=null||k!=null))switch(c){case"value":D=h;break;case"defaultValue":x=h;break;case"multiple":y=h;default:h!==k&&Me(e,r,c,h,o,k)}r=x,s=y,o=M,D!=null?fr(e,!!s,D,!1):!!o!=!!s&&(r!=null?fr(e,!!s,r,!0):fr(e,!!s,s?[]:"",!1));return;case"textarea":M=D=null;for(x in s)if(c=s[x],s.hasOwnProperty(x)&&c!=null&&!o.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Me(e,r,x,null,o,c)}for(y in o)if(c=o[y],h=s[y],o.hasOwnProperty(y)&&(c!=null||h!=null))switch(y){case"value":D=c;break;case"defaultValue":M=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(a(91));break;default:c!==h&&Me(e,r,y,c,o,h)}Eh(e,D,M);return;case"option":for(var ue in s)if(D=s[ue],s.hasOwnProperty(ue)&&D!=null&&!o.hasOwnProperty(ue))switch(ue){case"selected":e.selected=!1;break;default:Me(e,r,ue,null,o,D)}for(k in o)if(D=o[k],M=s[k],o.hasOwnProperty(k)&&D!==M&&(D!=null||M!=null))switch(k){case"selected":e.selected=D&&typeof D!="function"&&typeof D!="symbol";break;default:Me(e,r,k,D,o,M)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ae in s)D=s[ae],s.hasOwnProperty(ae)&&D!=null&&!o.hasOwnProperty(ae)&&Me(e,r,ae,null,o,D);for(j in o)if(D=o[j],M=s[j],o.hasOwnProperty(j)&&D!==M&&(D!=null||M!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(a(137,r));break;default:Me(e,r,j,D,o,M)}return;default:if(du(r)){for(var Le in s)D=s[Le],s.hasOwnProperty(Le)&&D!==void 0&&!o.hasOwnProperty(Le)&&Fc(e,r,Le,void 0,o,D);for(q in o)D=o[q],M=s[q],!o.hasOwnProperty(q)||D===M||D===void 0&&M===void 0||Fc(e,r,q,D,o,M);return}}for(var C in s)D=s[C],s.hasOwnProperty(C)&&D!=null&&!o.hasOwnProperty(C)&&Me(e,r,C,null,o,D);for(H in o)D=o[H],M=s[H],!o.hasOwnProperty(H)||D===M||D==null&&M==null||Me(e,r,H,D,o,M)}var Xc=null,Pc=null;function Hl(e){return e.nodeType===9?e:e.ownerDocument}function $g(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Cg(e,r){if(e===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&r==="foreignObject"?0:e}function Wc(e,r){return e==="textarea"||e==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var ef=null;function Tw(){var e=window.event;return e&&e.type==="popstate"?e===ef?!1:(ef=e,!0):(ef=null,!1)}var Tg=typeof setTimeout=="function"?setTimeout:void 0,Ow=typeof clearTimeout=="function"?clearTimeout:void 0,Og=typeof Promise=="function"?Promise:void 0,jw=typeof queueMicrotask=="function"?queueMicrotask:typeof Og<"u"?function(e){return Og.resolve(null).then(e).catch(Dw)}:Tg;function Dw(e){setTimeout(function(){throw e})}function mi(e){return e==="head"}function jg(e,r){var s=r,o=0,c=0;do{var h=s.nextSibling;if(e.removeChild(s),h&&h.nodeType===8)if(s=h.data,s==="/$"){if(0<o&&8>o){s=o;var y=e.ownerDocument;if(s&1&&Pa(y.documentElement),s&2&&Pa(y.body),s&4)for(s=y.head,Pa(s),y=s.firstChild;y;){var x=y.nextSibling,k=y.nodeName;y[ha]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&y.rel.toLowerCase()==="stylesheet"||s.removeChild(y),y=x}}if(c===0){e.removeChild(h),ss(r);return}c--}else s==="$"||s==="$?"||s==="$!"?c++:o=s.charCodeAt(0)-48;else o=0;s=h}while(s);ss(r)}function tf(e){var r=e.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var s=r;switch(r=r.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":tf(s),su(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function Mw(e,r,s,o){for(;e.nodeType===1;){var c=s;if(e.nodeName.toLowerCase()!==r.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[ha])switch(r){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(r==="input"&&e.type==="hidden"){var h=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=cn(e.nextSibling),e===null)break}return null}function Lw(e,r,s){if(r==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=cn(e.nextSibling),e===null))return null;return e}function nf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function zw(e,r){var s=e.ownerDocument;if(e.data!=="$?"||s.readyState==="complete")r();else{var o=function(){r(),s.removeEventListener("DOMContentLoaded",o)};s.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function cn(e){for(;e!=null;e=e.nextSibling){var r=e.nodeType;if(r===1||r===3)break;if(r===8){if(r=e.data,r==="$"||r==="$!"||r==="$?"||r==="F!"||r==="F")break;if(r==="/$")return null}}return e}var rf=null;function Dg(e){e=e.previousSibling;for(var r=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(r===0)return e;r--}else s==="/$"&&r++}e=e.previousSibling}return null}function Mg(e,r,s){switch(r=Hl(s),e){case"html":if(e=r.documentElement,!e)throw Error(a(452));return e;case"head":if(e=r.head,!e)throw Error(a(453));return e;case"body":if(e=r.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Pa(e){for(var r=e.attributes;r.length;)e.removeAttributeNode(r[0]);su(e)}var rn=new Map,Lg=new Set;function Gl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _n=Y.d;Y.d={f:Uw,r:Bw,D:_w,C:qw,L:Kw,m:Vw,X:Gw,S:Hw,M:Jw};function Uw(){var e=_n.f(),r=Ll();return e||r}function Bw(e){var r=lr(e);r!==null&&r.tag===5&&r.type==="form"?tm(r):_n.r(e)}var Kr=typeof document>"u"?null:document;function zg(e,r,s){var o=Kr;if(o&&typeof r=="string"&&r){var c=Ft(r);c='link[rel="'+e+'"][href="'+c+'"]',typeof s=="string"&&(c+='[crossorigin="'+s+'"]'),Lg.has(c)||(Lg.add(c),e={rel:e,crossOrigin:s,href:r},o.querySelector(c)===null&&(r=o.createElement("link"),vt(r,"link",e),ct(r),o.head.appendChild(r)))}}function _w(e){_n.D(e),zg("dns-prefetch",e,null)}function qw(e,r){_n.C(e,r),zg("preconnect",e,r)}function Kw(e,r,s){_n.L(e,r,s);var o=Kr;if(o&&e&&r){var c='link[rel="preload"][as="'+Ft(r)+'"]';r==="image"&&s&&s.imageSrcSet?(c+='[imagesrcset="'+Ft(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(c+='[imagesizes="'+Ft(s.imageSizes)+'"]')):c+='[href="'+Ft(e)+'"]';var h=c;switch(r){case"style":h=Vr(e);break;case"script":h=Hr(e)}rn.has(h)||(e=g({rel:"preload",href:r==="image"&&s&&s.imageSrcSet?void 0:e,as:r},s),rn.set(h,e),o.querySelector(c)!==null||r==="style"&&o.querySelector(Wa(h))||r==="script"&&o.querySelector(es(h))||(r=o.createElement("link"),vt(r,"link",e),ct(r),o.head.appendChild(r)))}}function Vw(e,r){_n.m(e,r);var s=Kr;if(s&&e){var o=r&&typeof r.as=="string"?r.as:"script",c='link[rel="modulepreload"][as="'+Ft(o)+'"][href="'+Ft(e)+'"]',h=c;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Hr(e)}if(!rn.has(h)&&(e=g({rel:"modulepreload",href:e},r),rn.set(h,e),s.querySelector(c)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(es(h)))return}o=s.createElement("link"),vt(o,"link",e),ct(o),s.head.appendChild(o)}}}function Hw(e,r,s){_n.S(e,r,s);var o=Kr;if(o&&e){var c=or(o).hoistableStyles,h=Vr(e);r=r||"default";var y=c.get(h);if(!y){var x={loading:0,preload:null};if(y=o.querySelector(Wa(h)))x.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":r},s),(s=rn.get(h))&&af(e,s);var k=y=o.createElement("link");ct(k),vt(k,"link",e),k._p=new Promise(function(j,q){k.onload=j,k.onerror=q}),k.addEventListener("load",function(){x.loading|=1}),k.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Jl(y,r,o)}y={type:"stylesheet",instance:y,count:1,state:x},c.set(h,y)}}}function Gw(e,r){_n.X(e,r);var s=Kr;if(s&&e){var o=or(s).hoistableScripts,c=Hr(e),h=o.get(c);h||(h=s.querySelector(es(c)),h||(e=g({src:e,async:!0},r),(r=rn.get(c))&&sf(e,r),h=s.createElement("script"),ct(h),vt(h,"link",e),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(c,h))}}function Jw(e,r){_n.M(e,r);var s=Kr;if(s&&e){var o=or(s).hoistableScripts,c=Hr(e),h=o.get(c);h||(h=s.querySelector(es(c)),h||(e=g({src:e,async:!0,type:"module"},r),(r=rn.get(c))&&sf(e,r),h=s.createElement("script"),ct(h),vt(h,"link",e),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(c,h))}}function Ug(e,r,s,o){var c=(c=he.current)?Gl(c):null;if(!c)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(r=Vr(s.href),s=or(c).hoistableStyles,o=s.get(r),o||(o={type:"style",instance:null,count:0,state:null},s.set(r,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=Vr(s.href);var h=or(c).hoistableStyles,y=h.get(e);if(y||(c=c.ownerDocument||c,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,y),(h=c.querySelector(Wa(e)))&&!h._p&&(y.instance=h,y.state.loading=5),rn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},rn.set(e,s),h||Yw(c,e,s,y.state))),r&&o===null)throw Error(a(528,""));return y}if(r&&o!==null)throw Error(a(529,""));return null;case"script":return r=s.async,s=s.src,typeof s=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Hr(s),s=or(c).hoistableScripts,o=s.get(r),o||(o={type:"script",instance:null,count:0,state:null},s.set(r,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Vr(e){return'href="'+Ft(e)+'"'}function Wa(e){return'link[rel="stylesheet"]['+e+"]"}function Bg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function Yw(e,r,s,o){e.querySelector('link[rel="preload"][as="style"]['+r+"]")?o.loading=1:(r=e.createElement("link"),o.preload=r,r.addEventListener("load",function(){return o.loading|=1}),r.addEventListener("error",function(){return o.loading|=2}),vt(r,"link",s),ct(r),e.head.appendChild(r))}function Hr(e){return'[src="'+Ft(e)+'"]'}function es(e){return"script[async]"+e}function _g(e,r,s){if(r.count++,r.instance===null)switch(r.type){case"style":var o=e.querySelector('style[data-href~="'+Ft(s.href)+'"]');if(o)return r.instance=o,ct(o),o;var c=g({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),ct(o),vt(o,"style",c),Jl(o,s.precedence,e),r.instance=o;case"stylesheet":c=Vr(s.href);var h=e.querySelector(Wa(c));if(h)return r.state.loading|=4,r.instance=h,ct(h),h;o=Bg(s),(c=rn.get(c))&&af(o,c),h=(e.ownerDocument||e).createElement("link"),ct(h);var y=h;return y._p=new Promise(function(x,k){y.onload=x,y.onerror=k}),vt(h,"link",o),r.state.loading|=4,Jl(h,s.precedence,e),r.instance=h;case"script":return h=Hr(s.src),(c=e.querySelector(es(h)))?(r.instance=c,ct(c),c):(o=s,(c=rn.get(h))&&(o=g({},s),sf(o,c)),e=e.ownerDocument||e,c=e.createElement("script"),ct(c),vt(c,"link",o),e.head.appendChild(c),r.instance=c);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(o=r.instance,r.state.loading|=4,Jl(o,s.precedence,e));return r.instance}function Jl(e,r,s){for(var o=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=o.length?o[o.length-1]:null,h=c,y=0;y<o.length;y++){var x=o[y];if(x.dataset.precedence===r)h=x;else if(h!==c)break}h?h.parentNode.insertBefore(e,h.nextSibling):(r=s.nodeType===9?s.head:s,r.insertBefore(e,r.firstChild))}function af(e,r){e.crossOrigin==null&&(e.crossOrigin=r.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=r.referrerPolicy),e.title==null&&(e.title=r.title)}function sf(e,r){e.crossOrigin==null&&(e.crossOrigin=r.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=r.referrerPolicy),e.integrity==null&&(e.integrity=r.integrity)}var Yl=null;function qg(e,r,s){if(Yl===null){var o=new Map,c=Yl=new Map;c.set(s,o)}else c=Yl,o=c.get(s),o||(o=new Map,c.set(s,o));if(o.has(e))return o;for(o.set(e,null),s=s.getElementsByTagName(e),c=0;c<s.length;c++){var h=s[c];if(!(h[ha]||h[xt]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var y=h.getAttribute(r)||"";y=e+y;var x=o.get(y);x?x.push(h):o.set(y,[h])}}return o}function Kg(e,r,s){e=e.ownerDocument||e,e.head.insertBefore(s,r==="title"?e.querySelector("head > title"):null)}function Iw(e,r,s){if(s===1||r.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return e=r.disabled,typeof r.precedence=="string"&&e==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Vg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var ts=null;function Zw(){}function Qw(e,r,s){if(ts===null)throw Error(a(475));var o=ts;if(r.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var c=Vr(s.href),h=e.querySelector(Wa(c));if(h){e=h._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(o.count++,o=Il.bind(o),e.then(o,o)),r.state.loading|=4,r.instance=h,ct(h);return}h=e.ownerDocument||e,s=Bg(s),(c=rn.get(c))&&af(s,c),h=h.createElement("link"),ct(h);var y=h;y._p=new Promise(function(x,k){y.onload=x,y.onerror=k}),vt(h,"link",s),r.instance=h}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(r,e),(e=r.state.preload)&&(r.state.loading&3)===0&&(o.count++,r=Il.bind(o),e.addEventListener("load",r),e.addEventListener("error",r))}}function Fw(){if(ts===null)throw Error(a(475));var e=ts;return e.stylesheets&&e.count===0&&lf(e,e.stylesheets),0<e.count?function(r){var s=setTimeout(function(){if(e.stylesheets&&lf(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(s)}}:null}function Il(){if(this.count--,this.count===0){if(this.stylesheets)lf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zl=null;function lf(e,r){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zl=new Map,r.forEach(Xw,e),Zl=null,Il.call(e))}function Xw(e,r){if(!(r.state.loading&4)){var s=Zl.get(e);if(s)var o=s.get(null);else{s=new Map,Zl.set(e,s);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<c.length;h++){var y=c[h];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(s.set(y.dataset.precedence,y),o=y)}o&&s.set(null,o)}c=r.instance,y=c.getAttribute("data-precedence"),h=s.get(y)||o,h===o&&s.set(null,c),s.set(y,c),this.count++,o=Il.bind(this),c.addEventListener("load",o),c.addEventListener("error",o),h?h.parentNode.insertBefore(c,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),r.state.loading|=4}}var ns={$$typeof:G,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function Pw(e,r,s,o,c,h,y,x){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=nu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nu(0),this.hiddenUpdates=nu(null),this.identifierPrefix=o,this.onUncaughtError=c,this.onCaughtError=h,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function Hg(e,r,s,o,c,h,y,x,k,j,q,H){return e=new Pw(e,r,s,y,x,k,j,H),r=1,h===!0&&(r|=24),h=Kt(3,null,null,r),e.current=h,h.stateNode=e,r=Ku(),r.refCount++,e.pooledCache=r,r.refCount++,h.memoizedState={element:o,isDehydrated:s,cache:r},Ju(h),e}function Gg(e){return e?(e=xr,e):xr}function Jg(e,r,s,o,c,h){c=Gg(c),o.context===null?o.context=c:o.pendingContext=c,o=ni(r),o.payload={element:s},h=h===void 0?null:h,h!==null&&(o.callback=h),s=ii(e,o,r),s!==null&&(Yt(s,e,r),ja(s,e,r))}function Yg(e,r){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<r?s:r}}function of(e,r){Yg(e,r),(e=e.alternate)&&Yg(e,r)}function Ig(e){if(e.tag===13){var r=br(e,67108864);r!==null&&Yt(r,e,67108864),of(e,67108864)}}var Ql=!0;function Ww(e,r,s,o){var c=B.T;B.T=null;var h=Y.p;try{Y.p=2,uf(e,r,s,o)}finally{Y.p=h,B.T=c}}function eN(e,r,s,o){var c=B.T;B.T=null;var h=Y.p;try{Y.p=8,uf(e,r,s,o)}finally{Y.p=h,B.T=c}}function uf(e,r,s,o){if(Ql){var c=cf(o);if(c===null)Qc(e,r,o,Fl,s),Qg(e,o);else if(nN(c,e,r,s,o))o.stopPropagation();else if(Qg(e,o),r&4&&-1<tN.indexOf(e)){for(;c!==null;){var h=lr(c);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var y=$i(h.pendingLanes);if(y!==0){var x=h;for(x.pendingLanes|=2,x.entangledLanes|=2;y;){var k=1<<31-_t(y);x.entanglements[1]|=k,y&=~k}xn(h),(Ce&6)===0&&(Dl=mn()+500,Qa(0))}}break;case 13:x=br(h,2),x!==null&&Yt(x,h,2),Ll(),of(h,2)}if(h=cf(o),h===null&&Qc(e,r,o,Fl,s),h===c)break;c=h}c!==null&&o.stopPropagation()}else Qc(e,r,o,null,s)}}function cf(e){return e=pu(e),ff(e)}var Fl=null;function ff(e){if(Fl=null,e=sr(e),e!==null){var r=u(e);if(r===null)e=null;else{var s=r.tag;if(s===13){if(e=f(r),e!==null)return e;e=null}else if(s===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;e=null}else r!==e&&(e=null)}}return Fl=e,null}function Zg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(qS()){case oh:return 2;case uh:return 8;case Vs:case KS:return 32;case ch:return 268435456;default:return 32}default:return 32}}var df=!1,gi=null,yi=null,vi=null,is=new Map,rs=new Map,bi=[],tN="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Qg(e,r){switch(e){case"focusin":case"focusout":gi=null;break;case"dragenter":case"dragleave":yi=null;break;case"mouseover":case"mouseout":vi=null;break;case"pointerover":case"pointerout":is.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":rs.delete(r.pointerId)}}function as(e,r,s,o,c,h){return e===null||e.nativeEvent!==h?(e={blockedOn:r,domEventName:s,eventSystemFlags:o,nativeEvent:h,targetContainers:[c]},r!==null&&(r=lr(r),r!==null&&Ig(r)),e):(e.eventSystemFlags|=o,r=e.targetContainers,c!==null&&r.indexOf(c)===-1&&r.push(c),e)}function nN(e,r,s,o,c){switch(r){case"focusin":return gi=as(gi,e,r,s,o,c),!0;case"dragenter":return yi=as(yi,e,r,s,o,c),!0;case"mouseover":return vi=as(vi,e,r,s,o,c),!0;case"pointerover":var h=c.pointerId;return is.set(h,as(is.get(h)||null,e,r,s,o,c)),!0;case"gotpointercapture":return h=c.pointerId,rs.set(h,as(rs.get(h)||null,e,r,s,o,c)),!0}return!1}function Fg(e){var r=sr(e.target);if(r!==null){var s=u(r);if(s!==null){if(r=s.tag,r===13){if(r=f(s),r!==null){e.blockedOn=r,QS(e.priority,function(){if(s.tag===13){var o=Jt();o=iu(o);var c=br(s,o);c!==null&&Yt(c,s,o),of(s,o)}});return}}else if(r===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xl(e){if(e.blockedOn!==null)return!1;for(var r=e.targetContainers;0<r.length;){var s=cf(e.nativeEvent);if(s===null){s=e.nativeEvent;var o=new s.constructor(s.type,s);hu=o,s.target.dispatchEvent(o),hu=null}else return r=lr(s),r!==null&&Ig(r),e.blockedOn=s,!1;r.shift()}return!0}function Xg(e,r,s){Xl(e)&&s.delete(r)}function iN(){df=!1,gi!==null&&Xl(gi)&&(gi=null),yi!==null&&Xl(yi)&&(yi=null),vi!==null&&Xl(vi)&&(vi=null),is.forEach(Xg),rs.forEach(Xg)}function Pl(e,r){e.blockedOn===r&&(e.blockedOn=null,df||(df=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,iN)))}var Wl=null;function Pg(e){Wl!==e&&(Wl=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wl===e&&(Wl=null);for(var r=0;r<e.length;r+=3){var s=e[r],o=e[r+1],c=e[r+2];if(typeof o!="function"){if(ff(o||s)===null)continue;break}var h=lr(s);h!==null&&(e.splice(r,3),r-=3,cc(h,{pending:!0,data:c,method:s.method,action:o},o,c))}}))}function ss(e){function r(k){return Pl(k,e)}gi!==null&&Pl(gi,e),yi!==null&&Pl(yi,e),vi!==null&&Pl(vi,e),is.forEach(r),rs.forEach(r);for(var s=0;s<bi.length;s++){var o=bi[s];o.blockedOn===e&&(o.blockedOn=null)}for(;0<bi.length&&(s=bi[0],s.blockedOn===null);)Fg(s),s.blockedOn===null&&bi.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(o=0;o<s.length;o+=3){var c=s[o],h=s[o+1],y=c[Tt]||null;if(typeof h=="function")y||Pg(s);else if(y){var x=null;if(h&&h.hasAttribute("formAction")){if(c=h,y=h[Tt]||null)x=y.formAction;else if(ff(c)!==null)continue}else x=y.action;typeof x=="function"?s[o+1]=x:(s.splice(o,3),o-=3),Pg(s)}}}function hf(e){this._internalRoot=e}eo.prototype.render=hf.prototype.render=function(e){var r=this._internalRoot;if(r===null)throw Error(a(409));var s=r.current,o=Jt();Jg(s,o,e,r,null,null)},eo.prototype.unmount=hf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var r=e.containerInfo;Jg(e.current,2,null,e,null,null),Ll(),r[ar]=null}};function eo(e){this._internalRoot=e}eo.prototype.unstable_scheduleHydration=function(e){if(e){var r=mh();e={blockedOn:null,target:e,priority:r};for(var s=0;s<bi.length&&r!==0&&r<bi[s].priority;s++);bi.splice(s,0,e),s===0&&Fg(e)}};var Wg=n.version;if(Wg!=="19.1.0")throw Error(a(527,Wg,"19.1.0"));Y.findDOMNode=function(e){var r=e._reactInternals;if(r===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=m(r),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var rN={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var to=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!to.isDisabled&&to.supportsFiber)try{ca=to.inject(rN),Bt=to}catch{}}return us.createRoot=function(e,r){if(!l(e))throw Error(a(299));var s=!1,o="",c=mm,h=gm,y=ym,x=null;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(c=r.onUncaughtError),r.onCaughtError!==void 0&&(h=r.onCaughtError),r.onRecoverableError!==void 0&&(y=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(x=r.unstable_transitionCallbacks)),r=Hg(e,1,!1,null,null,s,o,c,h,y,x,null),e[ar]=r.current,Zc(e),new hf(r)},us.hydrateRoot=function(e,r,s){if(!l(e))throw Error(a(299));var o=!1,c="",h=mm,y=gm,x=ym,k=null,j=null;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(h=s.onUncaughtError),s.onCaughtError!==void 0&&(y=s.onCaughtError),s.onRecoverableError!==void 0&&(x=s.onRecoverableError),s.unstable_transitionCallbacks!==void 0&&(k=s.unstable_transitionCallbacks),s.formState!==void 0&&(j=s.formState)),r=Hg(e,1,!0,r,s??null,o,c,h,y,x,k,j),r.context=Gg(null),s=r.current,o=Jt(),o=iu(o),c=ni(o),c.callback=null,ii(s,c,o),s=o,r.current.lanes=s,da(r,s),xn(r),e[ar]=r.current,Zc(e),new eo(r)},us.version="19.1.0",us}var Ry;function gE(){if(Ry)return yf.exports;Ry=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),yf.exports=mE(),yf.exports}var yE=gE();const vE=Zv(yE);var cs={},Ey;function bE(){if(Ey)return cs;Ey=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.parse=f,cs.serialize=p;const t=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,n=/^[\u0021-\u003A\u003C-\u007E]*$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,l=Object.prototype.toString,u=(()=>{const b=function(){};return b.prototype=Object.create(null),b})();function f(b,R){const N=new u,O=b.length;if(O<2)return N;const U=(R==null?void 0:R.decode)||g;let z=0;do{const L=b.indexOf("=",z);if(L===-1)break;const G=b.indexOf(";",z),X=G===-1?O:G;if(L>X){z=b.lastIndexOf(";",L-1)+1;continue}const F=d(b,z,L),pe=m(b,L,F),fe=b.slice(F,pe);if(N[fe]===void 0){let re=d(b,L+1,X),ee=m(b,X,re);const oe=U(b.slice(re,ee));N[fe]=oe}z=X+1}while(z<O);return N}function d(b,R,N){do{const O=b.charCodeAt(R);if(O!==32&&O!==9)return R}while(++R<N);return N}function m(b,R,N){for(;R>N;){const O=b.charCodeAt(--R);if(O!==32&&O!==9)return R+1}return N}function p(b,R,N){const O=(N==null?void 0:N.encode)||encodeURIComponent;if(!t.test(b))throw new TypeError(`argument name is invalid: ${b}`);const U=O(R);if(!n.test(U))throw new TypeError(`argument val is invalid: ${R}`);let z=b+"="+U;if(!N)return z;if(N.maxAge!==void 0){if(!Number.isInteger(N.maxAge))throw new TypeError(`option maxAge is invalid: ${N.maxAge}`);z+="; Max-Age="+N.maxAge}if(N.domain){if(!i.test(N.domain))throw new TypeError(`option domain is invalid: ${N.domain}`);z+="; Domain="+N.domain}if(N.path){if(!a.test(N.path))throw new TypeError(`option path is invalid: ${N.path}`);z+="; Path="+N.path}if(N.expires){if(!v(N.expires)||!Number.isFinite(N.expires.valueOf()))throw new TypeError(`option expires is invalid: ${N.expires}`);z+="; Expires="+N.expires.toUTCString()}if(N.httpOnly&&(z+="; HttpOnly"),N.secure&&(z+="; Secure"),N.partitioned&&(z+="; Partitioned"),N.priority)switch(typeof N.priority=="string"?N.priority.toLowerCase():void 0){case"low":z+="; Priority=Low";break;case"medium":z+="; Priority=Medium";break;case"high":z+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${N.priority}`)}if(N.sameSite)switch(typeof N.sameSite=="string"?N.sameSite.toLowerCase():N.sameSite){case!0:case"strict":z+="; SameSite=Strict";break;case"lax":z+="; SameSite=Lax";break;case"none":z+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${N.sameSite}`)}return z}function g(b){if(b.indexOf("%")===-1)return b;try{return decodeURIComponent(b)}catch{return b}}function v(b){return l.call(b)==="[object Date]"}return cs}bE();var Ay="popstate";function xE(t={}){function n(l,u){let{pathname:f="/",search:d="",hash:m=""}=Wi(l.location.hash.substring(1));return!f.startsWith("/")&&!f.startsWith(".")&&(f="/"+f),Vf("",{pathname:f,search:d,hash:m},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function i(l,u){let f=l.document.querySelector("base"),d="";if(f&&f.getAttribute("href")){let m=l.location.href,p=m.indexOf("#");d=p===-1?m:m.slice(0,p)}return d+"#"+(typeof u=="string"?u:Ss(u))}function a(l,u){sn(l.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(u)})`)}return wE(n,i,a,t)}function Ye(t,n){if(t===!1||t===null||typeof t>"u")throw new Error(n)}function sn(t,n){if(!t){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function SE(){return Math.random().toString(36).substring(2,10)}function $y(t,n){return{usr:t.state,key:t.key,idx:n}}function Vf(t,n,i=null,a){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof n=="string"?Wi(n):n,state:i,key:n&&n.key||a||SE()}}function Ss({pathname:t="/",search:n="",hash:i=""}){return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function Wi(t){let n={};if(t){let i=t.indexOf("#");i>=0&&(n.hash=t.substring(i),t=t.substring(0,i));let a=t.indexOf("?");a>=0&&(n.search=t.substring(a),t=t.substring(0,a)),t&&(n.pathname=t)}return n}function wE(t,n,i,a={}){let{window:l=document.defaultView,v5Compat:u=!1}=a,f=l.history,d="POP",m=null,p=g();p==null&&(p=0,f.replaceState({...f.state,idx:p},""));function g(){return(f.state||{idx:null}).idx}function v(){d="POP";let U=g(),z=U==null?null:U-p;p=U,m&&m({action:d,location:O.location,delta:z})}function b(U,z){d="PUSH";let L=Vf(O.location,U,z);i&&i(L,U),p=g()+1;let G=$y(L,p),X=O.createHref(L);try{f.pushState(G,"",X)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;l.location.assign(X)}u&&m&&m({action:d,location:O.location,delta:1})}function R(U,z){d="REPLACE";let L=Vf(O.location,U,z);i&&i(L,U),p=g();let G=$y(L,p),X=O.createHref(L);f.replaceState(G,"",X),u&&m&&m({action:d,location:O.location,delta:0})}function N(U){return NE(U)}let O={get action(){return d},get location(){return t(l,f)},listen(U){if(m)throw new Error("A history only accepts one active listener");return l.addEventListener(Ay,v),m=U,()=>{l.removeEventListener(Ay,v),m=null}},createHref(U){return n(l,U)},createURL:N,encodeLocation(U){let z=N(U);return{pathname:z.pathname,search:z.search,hash:z.hash}},push:b,replace:R,go(U){return f.go(U)}};return O}function NE(t,n=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Ye(i,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Ss(t);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=i+a),new URL(a,i)}function eb(t,n,i="/"){return kE(t,n,i,!1)}function kE(t,n,i,a){let l=typeof n=="string"?Wi(n):n,u=Gn(l.pathname||"/",i);if(u==null)return null;let f=tb(t);RE(f);let d=null;for(let m=0;d==null&&m<f.length;++m){let p=zE(u);d=ME(f[m],p,a)}return d}function tb(t,n=[],i=[],a=""){let l=(u,f,d)=>{let m={relativePath:d===void 0?u.path||"":d,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};m.relativePath.startsWith("/")&&(Ye(m.relativePath.startsWith(a),`Absolute route path "${m.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(a.length));let p=Hn([a,m.relativePath]),g=i.concat(m);u.children&&u.children.length>0&&(Ye(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),tb(u.children,n,g,p)),!(u.path==null&&!u.index)&&n.push({path:p,score:jE(p,u.index),routesMeta:g})};return t.forEach((u,f)=>{var d;if(u.path===""||!((d=u.path)!=null&&d.includes("?")))l(u,f);else for(let m of nb(u.path))l(u,f,m)}),n}function nb(t){let n=t.split("/");if(n.length===0)return[];let[i,...a]=n,l=i.endsWith("?"),u=i.replace(/\?$/,"");if(a.length===0)return l?[u,""]:[u];let f=nb(a.join("/")),d=[];return d.push(...f.map(m=>m===""?u:[u,m].join("/"))),l&&d.push(...f),d.map(m=>t.startsWith("/")&&m===""?"/":m)}function RE(t){t.sort((n,i)=>n.score!==i.score?i.score-n.score:DE(n.routesMeta.map(a=>a.childrenIndex),i.routesMeta.map(a=>a.childrenIndex)))}var EE=/^:[\w-]+$/,AE=3,$E=2,CE=1,TE=10,OE=-2,Cy=t=>t==="*";function jE(t,n){let i=t.split("/"),a=i.length;return i.some(Cy)&&(a+=OE),n&&(a+=$E),i.filter(l=>!Cy(l)).reduce((l,u)=>l+(EE.test(u)?AE:u===""?CE:TE),a)}function DE(t,n){return t.length===n.length&&t.slice(0,-1).every((a,l)=>a===n[l])?t[t.length-1]-n[n.length-1]:0}function ME(t,n,i=!1){let{routesMeta:a}=t,l={},u="/",f=[];for(let d=0;d<a.length;++d){let m=a[d],p=d===a.length-1,g=u==="/"?n:n.slice(u.length)||"/",v=wo({path:m.relativePath,caseSensitive:m.caseSensitive,end:p},g),b=m.route;if(!v&&p&&i&&!a[a.length-1].route.index&&(v=wo({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},g)),!v)return null;Object.assign(l,v.params),f.push({params:l,pathname:Hn([u,v.pathname]),pathnameBase:qE(Hn([u,v.pathnameBase])),route:b}),v.pathnameBase!=="/"&&(u=Hn([u,v.pathnameBase]))}return f}function wo(t,n){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[i,a]=LE(t.path,t.caseSensitive,t.end),l=n.match(i);if(!l)return null;let u=l[0],f=u.replace(/(.)\/+$/,"$1"),d=l.slice(1);return{params:a.reduce((p,{paramName:g,isOptional:v},b)=>{if(g==="*"){let N=d[b]||"";f=u.slice(0,u.length-N.length).replace(/(.)\/+$/,"$1")}const R=d[b];return v&&!R?p[g]=void 0:p[g]=(R||"").replace(/%2F/g,"/"),p},{}),pathname:u,pathnameBase:f,pattern:t}}function LE(t,n=!1,i=!0){sn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let a=[],l="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,d,m)=>(a.push({paramName:d,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(a.push({paramName:"*"}),l+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?l+="\\/*$":t!==""&&t!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,n?void 0:"i"),a]}function zE(t){try{return t.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return sn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),t}}function Gn(t,n){if(n==="/")return t;if(!t.toLowerCase().startsWith(n.toLowerCase()))return null;let i=n.endsWith("/")?n.length-1:n.length,a=t.charAt(i);return a&&a!=="/"?null:t.slice(i)||"/"}function UE(t,n="/"){let{pathname:i,search:a="",hash:l=""}=typeof t=="string"?Wi(t):t;return{pathname:i?i.startsWith("/")?i:BE(i,n):n,search:KE(a),hash:VE(l)}}function BE(t,n){let i=n.replace(/\/+$/,"").split("/");return t.split("/").forEach(l=>{l===".."?i.length>1&&i.pop():l!=="."&&i.push(l)}),i.length>1?i.join("/"):"/"}function Sf(t,n,i,a){return`Cannot include a '${t}' character in a manually specified \`to.${n}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function _E(t){return t.filter((n,i)=>i===0||n.route.path&&n.route.path.length>0)}function gd(t){let n=_E(t);return n.map((i,a)=>a===n.length-1?i.pathname:i.pathnameBase)}function yd(t,n,i,a=!1){let l;typeof t=="string"?l=Wi(t):(l={...t},Ye(!l.pathname||!l.pathname.includes("?"),Sf("?","pathname","search",l)),Ye(!l.pathname||!l.pathname.includes("#"),Sf("#","pathname","hash",l)),Ye(!l.search||!l.search.includes("#"),Sf("#","search","hash",l)));let u=t===""||l.pathname==="",f=u?"/":l.pathname,d;if(f==null)d=i;else{let v=n.length-1;if(!a&&f.startsWith("..")){let b=f.split("/");for(;b[0]==="..";)b.shift(),v-=1;l.pathname=b.join("/")}d=v>=0?n[v]:"/"}let m=UE(l,d),p=f&&f!=="/"&&f.endsWith("/"),g=(u||f===".")&&i.endsWith("/");return!m.pathname.endsWith("/")&&(p||g)&&(m.pathname+="/"),m}var Hn=t=>t.join("/").replace(/\/\/+/g,"/"),qE=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),KE=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,VE=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function HE(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}var ib=["POST","PUT","PATCH","DELETE"];new Set(ib);var GE=["GET",...ib];new Set(GE);var ia=A.createContext(null);ia.displayName="DataRouter";var Uo=A.createContext(null);Uo.displayName="DataRouterState";var rb=A.createContext({isTransitioning:!1});rb.displayName="ViewTransition";var JE=A.createContext(new Map);JE.displayName="Fetchers";var YE=A.createContext(null);YE.displayName="Await";var fn=A.createContext(null);fn.displayName="Navigation";var As=A.createContext(null);As.displayName="Location";var dn=A.createContext({outlet:null,matches:[],isDataRoute:!1});dn.displayName="Route";var vd=A.createContext(null);vd.displayName="RouteError";function IE(t,{relative:n}={}){Ye(ra(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:a}=A.useContext(fn),{hash:l,pathname:u,search:f}=$s(t,{relative:n}),d=u;return i!=="/"&&(d=u==="/"?i:Hn([i,u])),a.createHref({pathname:d,search:f,hash:l})}function ra(){return A.useContext(As)!=null}function Ei(){return Ye(ra(),"useLocation() may be used only in the context of a <Router> component."),A.useContext(As).location}var ab="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function sb(t){A.useContext(fn).static||A.useLayoutEffect(t)}function aa(){let{isDataRoute:t}=A.useContext(dn);return t?lA():ZE()}function ZE(){Ye(ra(),"useNavigate() may be used only in the context of a <Router> component.");let t=A.useContext(ia),{basename:n,navigator:i}=A.useContext(fn),{matches:a}=A.useContext(dn),{pathname:l}=Ei(),u=JSON.stringify(gd(a)),f=A.useRef(!1);return sb(()=>{f.current=!0}),A.useCallback((m,p={})=>{if(sn(f.current,ab),!f.current)return;if(typeof m=="number"){i.go(m);return}let g=yd(m,JSON.parse(u),l,p.relative==="path");t==null&&n!=="/"&&(g.pathname=g.pathname==="/"?n:Hn([n,g.pathname])),(p.replace?i.replace:i.push)(g,p.state,p)},[n,i,u,l,t])}A.createContext(null);function QE(){let{matches:t}=A.useContext(dn),n=t[t.length-1];return n?n.params:{}}function $s(t,{relative:n}={}){let{matches:i}=A.useContext(dn),{pathname:a}=Ei(),l=JSON.stringify(gd(i));return A.useMemo(()=>yd(t,JSON.parse(l),a,n==="path"),[t,l,a,n])}function FE(t,n){return lb(t,n)}function lb(t,n,i,a){var z;Ye(ra(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=A.useContext(fn),{matches:u}=A.useContext(dn),f=u[u.length-1],d=f?f.params:{},m=f?f.pathname:"/",p=f?f.pathnameBase:"/",g=f&&f.route;{let L=g&&g.path||"";ob(m,!g||L.endsWith("*")||L.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${L}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
60
60
|
|
|
61
|
-
Please change the parent <Route path="${D}"> to <Route path="${D==="/"?"*":`${D}/*`}">.`)}let x=Ya(),S;if(n){let D=typeof n=="string"?hn(n):n;_e(d==="/"||((U=D.pathname)==null?void 0:U.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${D.pathname}" was given in the \`location\` prop.`),S=D}else S=x;let C=S.pathname||"/",E=C;if(d!=="/"){let D=d.replace(/^\//,"").split("/");E="/"+C.replace(/^\//,"").split("/").slice(D.length).join("/")}let z=dm(i,{pathname:E});Ut(v||z!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),Ut(z==null||z[z.length-1].route.element!==void 0||z[z.length-1].route.Component!==void 0||z[z.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let B=R1(z&&z.map(D=>Object.assign({},D,{params:Object.assign({},h,D.params),pathname:ga([d,o.encodeLocation?o.encodeLocation(D.pathname).pathname:D.pathname]),pathnameBase:D.pathnameBase==="/"?d:ga([d,o.encodeLocation?o.encodeLocation(D.pathnameBase).pathname:D.pathnameBase])})),f,r,s);return n&&B?T.createElement(bi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...S},navigationType:"POP"}},B):B}function S1(){let i=A1(),n=d1(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),r=i instanceof Error?i.stack:null,s="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:s},f={padding:"2px 4px",backgroundColor:s},p=null;return console.error("Error handled by React Router default ErrorBoundary:",i),p=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:f},"ErrorBoundary")," or"," ",T.createElement("code",{style:f},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},n),r?T.createElement("pre",{style:o},r):null,p)}var x1=T.createElement(S1,null),N1=class extends T.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,n){return n.location!==i.location||n.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:n.error,location:n.location,revalidation:i.revalidation||n.revalidation}}componentDidCatch(i,n){console.error("React Router caught the following error during render",i,n)}render(){return this.state.error!==void 0?T.createElement(Gt.Provider,{value:this.props.routeContext},T.createElement(Io.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function E1({routeContext:i,match:n,children:r}){let s=T.useContext(ll);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),T.createElement(Gt.Provider,{value:i},r)}function R1(i,n=[],r=null,s=null){if(i==null){if(!r)return null;if(r.errors)i=r.matches;else if(n.length===0&&!r.initialized&&r.matches.length>0)i=r.matches;else return null}let o=i,f=r==null?void 0:r.errors;if(f!=null){let m=o.findIndex(d=>d.route.id&&(f==null?void 0:f[d.route.id])!==void 0);_e(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),o=o.slice(0,Math.min(o.length,m+1))}let p=!1,h=-1;if(r)for(let m=0;m<o.length;m++){let d=o[m];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(h=m),d.route.id){let{loaderData:v,errors:x}=r,S=d.route.loader&&!v.hasOwnProperty(d.route.id)&&(!x||x[d.route.id]===void 0);if(d.route.lazy||S){p=!0,h>=0?o=o.slice(0,h+1):o=[o[0]];break}}}return o.reduceRight((m,d,v)=>{let x,S=!1,C=null,E=null;r&&(x=f&&d.route.id?f[d.route.id]:void 0,C=d.route.errorElement||x1,p&&(h<0&&v===0?(Sm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,E=null):h===v&&(S=!0,E=d.route.hydrateFallbackElement||null)));let z=n.concat(o.slice(0,v+1)),B=()=>{let U;return x?U=C:S?U=E:d.route.Component?U=T.createElement(d.route.Component,null):d.route.element?U=d.route.element:U=m,T.createElement(E1,{match:d,routeContext:{outlet:m,matches:z,isDataRoute:r!=null},children:U})};return r&&(d.route.ErrorBoundary||d.route.errorElement||v===0)?T.createElement(N1,{location:r.location,revalidation:r.revalidation,component:C,error:x,children:B(),routeContext:{outlet:null,matches:z,isDataRoute:!0}}):B()},null)}function ec(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function T1(i){let n=T.useContext(ll);return _e(n,ec(i)),n}function w1(i){let n=T.useContext(as);return _e(n,ec(i)),n}function C1(i){let n=T.useContext(Gt);return _e(n,ec(i)),n}function tc(i){let n=C1(i),r=n.matches[n.matches.length-1];return _e(r.route.id,`${i} can only be used on routes that contain a unique "id"`),r.route.id}function j1(){return tc("useRouteId")}function A1(){var s;let i=T.useContext(Io),n=w1("useRouteError"),r=tc("useRouteError");return i!==void 0?i:(s=n.errors)==null?void 0:s[r]}function O1(){let{router:i}=T1("useNavigate"),n=tc("useNavigate"),r=T.useRef(!1);return ym(()=>{r.current=!0}),T.useCallback(async(o,f={})=>{Ut(r.current,vm),r.current&&(typeof o=="number"?i.navigate(o):await i.navigate(o,{fromRouteId:n,...f}))},[i,n])}var Xp={};function Sm(i,n,r){!n&&!Xp[i]&&(Xp[i]=!0,Ut(!1,r))}T.memo(k1);function k1({routes:i,future:n,state:r}){return bm(i,void 0,r,n)}function L1({to:i,replace:n,state:r,relative:s}){_e(il(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=T.useContext(qt);Ut(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=T.useContext(Gt),{pathname:p}=Ya(),h=rl(),m=Wo(i,Po(f),p,s==="path"),d=JSON.stringify(m);return T.useEffect(()=>{h(JSON.parse(d),{replace:n,state:r,relative:s})},[h,d,s,n,r]),null}function Gr(i){_e(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function z1({basename:i="/",children:n=null,location:r,navigationType:s="POP",navigator:o,static:f=!1}){_e(!il(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=i.replace(/^\/*/,"/"),h=T.useMemo(()=>({basename:p,navigator:o,static:f,future:{}}),[p,o,f]);typeof r=="string"&&(r=hn(r));let{pathname:m="/",search:d="",hash:v="",state:x=null,key:S="default"}=r,C=T.useMemo(()=>{let E=va(m,p);return E==null?null:{location:{pathname:E,search:d,hash:v,state:x,key:S},navigationType:s}},[p,m,d,v,x,S,s]);return Ut(C!=null,`<Router basename="${p}"> is not able to match the URL "${m}${d}${v}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:T.createElement(qt.Provider,{value:h},T.createElement(bi.Provider,{children:n,value:C}))}function D1({children:i,location:n}){return b1(Go(i),n)}function Go(i,n=[]){let r=[];return T.Children.forEach(i,(s,o)=>{if(!T.isValidElement(s))return;let f=[...n,o];if(s.type===T.Fragment){r.push.apply(r,Go(s.props.children,f));return}_e(s.type===Gr,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),_e(!s.props.index||!s.props.children,"An index route cannot have child routes.");let p={id:s.props.id||f.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(p.children=Go(s.props.children,f)),r.push(p)}),r}var Yr="get",Qr="application/x-www-form-urlencoded";function ns(i){return i!=null&&typeof i.tagName=="string"}function _1(i){return ns(i)&&i.tagName.toLowerCase()==="button"}function M1(i){return ns(i)&&i.tagName.toLowerCase()==="form"}function U1(i){return ns(i)&&i.tagName.toLowerCase()==="input"}function B1(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function H1(i,n){return i.button===0&&(!n||n==="_self")&&!B1(i)}var Hr=null;function V1(){if(Hr===null)try{new FormData(document.createElement("form"),0),Hr=!1}catch{Hr=!0}return Hr}var $1=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Lo(i){return i!=null&&!$1.has(i)?(Ut(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Qr}"`),null):i}function q1(i,n){let r,s,o,f,p;if(M1(i)){let h=i.getAttribute("action");s=h?va(h,n):null,r=i.getAttribute("method")||Yr,o=Lo(i.getAttribute("enctype"))||Qr,f=new FormData(i)}else if(_1(i)||U1(i)&&(i.type==="submit"||i.type==="image")){let h=i.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=i.getAttribute("formaction")||h.getAttribute("action");if(s=m?va(m,n):null,r=i.getAttribute("formmethod")||h.getAttribute("method")||Yr,o=Lo(i.getAttribute("formenctype"))||Lo(h.getAttribute("enctype"))||Qr,f=new FormData(h,i),!V1()){let{name:d,type:v,value:x}=i;if(v==="image"){let S=d?`${d}.`:"";f.append(`${S}x`,"0"),f.append(`${S}y`,"0")}else d&&f.append(d,x)}}else{if(ns(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Yr,s=null,o=Qr,p=i}return f&&o==="text/plain"&&(p=f,f=void 0),{action:s,method:r.toLowerCase(),encType:o,formData:f,body:p}}function ac(i,n){if(i===!1||i===null||typeof i>"u")throw new Error(n)}async function G1(i,n){if(i.id in n)return n[i.id];try{let r=await import(i.module);return n[i.id]=r,r}catch(r){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Y1(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function Q1(i,n,r){let s=await Promise.all(i.map(async o=>{let f=n.routes[o.route.id];if(f){let p=await G1(f,r);return p.links?p.links():[]}return[]}));return J1(s.flat(1).filter(Y1).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Jp(i,n,r,s,o,f){let p=(m,d)=>r[d]?m.route.id!==r[d].route.id:!0,h=(m,d)=>{var v;return r[d].pathname!==m.pathname||((v=r[d].route.path)==null?void 0:v.endsWith("*"))&&r[d].params["*"]!==m.params["*"]};return f==="assets"?n.filter((m,d)=>p(m,d)||h(m,d)):f==="data"?n.filter((m,d)=>{var x;let v=s.routes[m.route.id];if(!v||!v.hasLoader)return!1;if(p(m,d)||h(m,d))return!0;if(m.route.shouldRevalidate){let S=m.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((x=r[0])==null?void 0:x.params)||{},nextUrl:new URL(i,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function Z1(i,n,{includeHydrateFallback:r}={}){return K1(i.map(s=>{let o=n.routes[s.route.id];if(!o)return[];let f=[o.module];return o.clientActionModule&&(f=f.concat(o.clientActionModule)),o.clientLoaderModule&&(f=f.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(f=f.concat(o.hydrateFallbackModule)),o.imports&&(f=f.concat(o.imports)),f}).flat(1))}function K1(i){return[...new Set(i)]}function X1(i){let n={},r=Object.keys(i).sort();for(let s of r)n[s]=i[s];return n}function J1(i,n){let r=new Set;return new Set(n),i.reduce((s,o)=>{let f=JSON.stringify(X1(o));return r.has(f)||(r.add(f),s.push({key:f,link:o})),s},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var F1=new Set([100,101,204,205]);function P1(i,n){let r=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return r.pathname==="/"?r.pathname="_root.data":n&&va(r.pathname,n)==="/"?r.pathname=`${n.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function xm(){let i=T.useContext(ll);return ac(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function W1(){let i=T.useContext(as);return ac(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var nc=T.createContext(void 0);nc.displayName="FrameworkContext";function Nm(){let i=T.useContext(nc);return ac(i,"You must render this element inside a <HydratedRouter> element"),i}function I1(i,n){let r=T.useContext(nc),[s,o]=T.useState(!1),[f,p]=T.useState(!1),{onFocus:h,onBlur:m,onMouseEnter:d,onMouseLeave:v,onTouchStart:x}=n,S=T.useRef(null);T.useEffect(()=>{if(i==="render"&&p(!0),i==="viewport"){let z=U=>{U.forEach(D=>{p(D.isIntersecting)})},B=new IntersectionObserver(z,{threshold:.5});return S.current&&B.observe(S.current),()=>{B.disconnect()}}},[i]),T.useEffect(()=>{if(s){let z=setTimeout(()=>{p(!0)},100);return()=>{clearTimeout(z)}}},[s]);let C=()=>{o(!0)},E=()=>{o(!1),p(!1)};return r?i!=="intent"?[f,S,{}]:[f,S,{onFocus:oi(h,C),onBlur:oi(m,E),onMouseEnter:oi(d,C),onMouseLeave:oi(v,E),onTouchStart:oi(x,C)}]:[!1,S,{}]}function oi(i,n){return r=>{i&&i(r),r.defaultPrevented||n(r)}}function e2({page:i,...n}){let{router:r}=xm(),s=T.useMemo(()=>dm(r.routes,i,r.basename),[r.routes,i,r.basename]);return s?T.createElement(a2,{page:i,matches:s,...n}):null}function t2(i){let{manifest:n,routeModules:r}=Nm(),[s,o]=T.useState([]);return T.useEffect(()=>{let f=!1;return Q1(i,n,r).then(p=>{f||o(p)}),()=>{f=!0}},[i,n,r]),s}function a2({page:i,matches:n,...r}){let s=Ya(),{manifest:o,routeModules:f}=Nm(),{basename:p}=xm(),{loaderData:h,matches:m}=W1(),d=T.useMemo(()=>Jp(i,n,m,o,s,"data"),[i,n,m,o,s]),v=T.useMemo(()=>Jp(i,n,m,o,s,"assets"),[i,n,m,o,s]),x=T.useMemo(()=>{if(i===s.pathname+s.search+s.hash)return[];let E=new Set,z=!1;if(n.forEach(U=>{var G;let D=o.routes[U.route.id];!D||!D.hasLoader||(!d.some(J=>J.route.id===U.route.id)&&U.route.id in h&&((G=f[U.route.id])!=null&&G.shouldRevalidate)||D.hasClientLoader?z=!0:E.add(U.route.id))}),E.size===0)return[];let B=P1(i,p);return z&&E.size>0&&B.searchParams.set("_routes",n.filter(U=>E.has(U.route.id)).map(U=>U.route.id).join(",")),[B.pathname+B.search]},[p,h,s,o,d,n,i,f]),S=T.useMemo(()=>Z1(v,o),[v,o]),C=t2(v);return T.createElement(T.Fragment,null,x.map(E=>T.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...r})),S.map(E=>T.createElement("link",{key:E,rel:"modulepreload",href:E,...r})),C.map(({key:E,link:z})=>T.createElement("link",{key:E,...z})))}function n2(...i){return n=>{i.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}var Em=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Em&&(window.__reactRouterVersion="7.6.3")}catch{}function l2({basename:i,children:n,window:r}){let s=T.useRef();s.current==null&&(s.current=Gx({window:r,v5Compat:!0}));let o=s.current,[f,p]=T.useState({action:o.action,location:o.location}),h=T.useCallback(m=>{T.startTransition(()=>p(m))},[p]);return T.useLayoutEffect(()=>o.listen(h),[o,h]),T.createElement(z1,{basename:i,children:n,location:f.location,navigationType:f.action,navigator:o})}var Rm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tm=T.forwardRef(function({onClick:n,discover:r="render",prefetch:s="none",relative:o,reloadDocument:f,replace:p,state:h,target:m,to:d,preventScrollReset:v,viewTransition:x,...S},C){let{basename:E}=T.useContext(qt),z=typeof d=="string"&&Rm.test(d),B,U=!1;if(typeof d=="string"&&z&&(B=d,Em))try{let F=new URL(window.location.href),ne=d.startsWith("//")?new URL(F.protocol+d):new URL(d),pe=va(ne.pathname,E);ne.origin===F.origin&&pe!=null?d=pe+ne.search+ne.hash:U=!0}catch{Ut(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let D=g1(d,{relative:o}),[G,J,K]=I1(s,S),ue=u2(d,{replace:p,state:h,target:m,preventScrollReset:v,relative:o,viewTransition:x});function re(F){n&&n(F),F.defaultPrevented||ue(F)}let ee=T.createElement("a",{...S,...K,href:B||D,onClick:U||f?n:re,ref:n2(C,J),target:m,"data-discover":!z&&r==="render"?"true":void 0});return G&&!z?T.createElement(T.Fragment,null,ee,T.createElement(e2,{page:D})):ee});Tm.displayName="Link";var i2=T.forwardRef(function({"aria-current":n="page",caseSensitive:r=!1,className:s="",end:o=!1,style:f,to:p,viewTransition:h,children:m,...d},v){let x=Si(p,{relative:d.relative}),S=Ya(),C=T.useContext(as),{navigator:E,basename:z}=T.useContext(qt),B=C!=null&&h2(x)&&h===!0,U=E.encodeLocation?E.encodeLocation(x).pathname:x.pathname,D=S.pathname,G=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;r||(D=D.toLowerCase(),G=G?G.toLowerCase():null,U=U.toLowerCase()),G&&z&&(G=va(G,z)||G);const J=U!=="/"&&U.endsWith("/")?U.length-1:U.length;let K=D===U||!o&&D.startsWith(U)&&D.charAt(J)==="/",ue=G!=null&&(G===U||!o&&G.startsWith(U)&&G.charAt(U.length)==="/"),re={isActive:K,isPending:ue,isTransitioning:B},ee=K?n:void 0,F;typeof s=="function"?F=s(re):F=[s,K?"active":null,ue?"pending":null,B?"transitioning":null].filter(Boolean).join(" ");let ne=typeof f=="function"?f(re):f;return T.createElement(Tm,{...d,"aria-current":ee,className:F,ref:v,style:ne,to:p,viewTransition:h},typeof m=="function"?m(re):m)});i2.displayName="NavLink";var r2=T.forwardRef(({discover:i="render",fetcherKey:n,navigate:r,reloadDocument:s,replace:o,state:f,method:p=Yr,action:h,onSubmit:m,relative:d,preventScrollReset:v,viewTransition:x,...S},C)=>{let E=f2(),z=d2(h,{relative:d}),B=p.toLowerCase()==="get"?"get":"post",U=typeof h=="string"&&Rm.test(h),D=G=>{if(m&&m(G),G.defaultPrevented)return;G.preventDefault();let J=G.nativeEvent.submitter,K=(J==null?void 0:J.getAttribute("formmethod"))||p;E(J||G.currentTarget,{fetcherKey:n,method:K,navigate:r,replace:o,state:f,relative:d,preventScrollReset:v,viewTransition:x})};return T.createElement("form",{ref:C,method:B,action:z,onSubmit:s?m:D,...S,"data-discover":!U&&i==="render"?"true":void 0})});r2.displayName="Form";function s2(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wm(i){let n=T.useContext(ll);return _e(n,s2(i)),n}function u2(i,{target:n,replace:r,state:s,preventScrollReset:o,relative:f,viewTransition:p}={}){let h=rl(),m=Ya(),d=Si(i,{relative:f});return T.useCallback(v=>{if(H1(v,n)){v.preventDefault();let x=r!==void 0?r:gi(m)===gi(d);h(i,{replace:x,state:s,preventScrollReset:o,relative:f,viewTransition:p})}},[m,h,d,r,s,n,i,o,f,p])}var o2=0,c2=()=>`__${String(++o2)}__`;function f2(){let{router:i}=wm("useSubmit"),{basename:n}=T.useContext(qt),r=j1();return T.useCallback(async(s,o={})=>{let{action:f,method:p,encType:h,formData:m,body:d}=q1(s,n);if(o.navigate===!1){let v=o.fetcherKey||c2();await i.fetch(v,r,o.action||f,{preventScrollReset:o.preventScrollReset,formData:m,body:d,formMethod:o.method||p,formEncType:o.encType||h,flushSync:o.flushSync})}else await i.navigate(o.action||f,{preventScrollReset:o.preventScrollReset,formData:m,body:d,formMethod:o.method||p,formEncType:o.encType||h,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[i,n,r])}function d2(i,{relative:n}={}){let{basename:r}=T.useContext(qt),s=T.useContext(Gt);_e(s,"useFormAction must be used inside a RouteContext");let[o]=s.matches.slice(-1),f={...Si(i||".",{relative:n})},p=Ya();if(i==null){f.search=p.search;let h=new URLSearchParams(f.search),m=h.getAll("index");if(m.some(v=>v==="")){h.delete("index"),m.filter(x=>x).forEach(x=>h.append("index",x));let v=h.toString();f.search=v?`?${v}`:""}}return(!i||i===".")&&o.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:ga([r,f.pathname])),gi(f)}function h2(i,n={}){let r=T.useContext(gm);_e(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=wm("useViewTransitionState"),o=Si(i,{relative:n.relative});if(!r.isTransitioning)return!1;let f=va(r.currentLocation.pathname,s)||r.currentLocation.pathname,p=va(r.nextLocation.pathname,s)||r.nextLocation.pathname;return Pr(o.pathname,p)!=null||Pr(o.pathname,f)!=null}[...F1];function p2(i){return i.varName?` for '${i.varName}'`:""}function m2(i,n={}){if(i==null||i===""&&!n.allowEmpty)throw new Error(`Missing string value${p2(n)}`);return typeof i=="string"?i:i.toString()}const g2=`${`//${document.location.host}`}/api/plugin/site-generator`;let Cm;const[zo]=document.getElementsByClassName("js-script-site-generator");zo&&zo instanceof HTMLScriptElement&&(Cm=m2(zo.dataset.googleRecaptchaSiteKey,{varName:"data-google-recaptcha-site-key"}));const Do=Cm;async function Ga(i){try{const n=await fetch(g2,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return n.ok?n.json():{success:!1,userMessage:`Failed to execute command: ${n.statusText}`}}catch(n){return{success:!1,userMessage:`Communication error: ${n.message}`}}}const Fp=i=>{let n;const r=new Set,s=(d,v)=>{const x=typeof d=="function"?d(n):d;if(!Object.is(x,n)){const S=n;n=v??(typeof x!="object"||x===null)?x:Object.assign({},n,x),r.forEach(C=>C(n,S))}},o=()=>n,h={setState:s,getState:o,getInitialState:()=>m,subscribe:d=>(r.add(d),()=>r.delete(d))},m=n=i(s,o,h);return h},v2=i=>i?Fp(i):Fp,y2=i=>i;function b2(i,n=y2){const r=Bo.useSyncExternalStore(i.subscribe,()=>n(i.getState()),()=>n(i.getInitialState()));return Bo.useDebugValue(r),r}const Pp=i=>{const n=v2(i),r=s=>b2(n,s);return Object.assign(r,n),r},S2=i=>i?Pp(i):Pp,lc="site-generator-session-token";function Wp(i){try{sessionStorage.setItem(lc,i)}catch(n){console.error("Failed to save session token",n)}}function vi(){try{return sessionStorage.getItem(lc)??void 0}catch(i){console.error("Failed to get session token",i)}}function x2(){try{sessionStorage.removeItem(lc)}catch(i){console.error("Failed to remove session token",i)}}const N2=2e3,nl=new Map;function E2(i){if(nl.has(i))return;const n=window.setInterval(()=>{R2(i)},N2);nl.set(i,n)}function Vr(i){const n=nl.get(i);n&&(window.clearInterval(n),nl.delete(i))}function ic(){nl.forEach(i=>{window.clearInterval(i)}),nl.clear()}async function R2(i){const n=vi();if(!n){Vr(i);return}try{const r=await Ga({command:"loadStep",sessionToken:n,stepNumber:i});if(r.success&&r.result){const s=r.result;T2(s),s.status!=="pending"&&Vr(i)}else console.error("Error polling step:",r),Vr(i)}catch(r){console.error("Error polling step:",r),Vr(i)}}function T2(i){const{updateStep:n}=pn.getState();n(i)}function _o(i){ic(),i.steps.forEach(n=>{n.status==="pending"&&E2(n.stepNumber)})}const pn=S2((i,n)=>({workSession:void 0,isLoading:!1,error:void 0,activeStepNumber:void 0,setWorkSession:r=>{i({workSession:r}),r&&_o(r)},updateStep:r=>{const{workSession:s}=n();if(!s)return;const o=s.steps.map(p=>p.stepNumber===r.stepNumber?r:p),f={...s,steps:o};i({workSession:f}),r.status==="pending"&&_o(f)},appendNewStep:r=>{const{workSession:s}=n();if(!s)return;const o={...s,steps:[...s.steps,r]};i({workSession:o}),r.status==="pending"&&_o(o)},setIsLoading:r=>i({isLoading:r}),setError:r=>i({error:r}),setActiveStepNumber:r=>i({activeStepNumber:r}),resetSession:()=>{ic(),i({workSession:void 0,isLoading:!1,error:void 0,activeStepNumber:void 0})}})),rt=T.forwardRef((i,n)=>{const{label:r,severity:s="primary",loading:o,children:f,onClick:p,className:h="",disabled:m,...d}=i,[v,x]=T.useState(!1),S=v||o,C=["Button",s==="secondary"?"secondary":"",S?"loading":"",h].filter(Boolean).join(" "),E=async z=>{if(p)try{z.preventDefault(),x(!0),await p(z)}finally{x(!1)}};return b.jsxs("button",{ref:n,type:"button",className:C,onClick:E,disabled:m||S,...d,children:[!S&&f,!S&&r]})});rt.displayName="Button";function ls({size:i="medium"}){return b.jsx("div",{className:`Spinner Spinner-${i}`,"aria-label":"Loading"})}function Zr({activeStep:i}){const{t:n}=ot(),r=rl(),{workSession:s}=pn(),o=()=>{r("/")},f=p=>{r(`/step/${p}`)};return!s||!s.steps||s.steps.length===0?b.jsx("div",{className:"Sidebar",children:b.jsx(rt,{className:`Sidebar-button ${i===void 0?"active":""}`,onClick:o,children:n("startAgain")})}):b.jsxs("div",{className:"Sidebar",children:[b.jsx(rt,{className:`Sidebar-button ${i===void 0?"active":""}`,onClick:o,children:n("startAgain")}),b.jsx("div",{className:"Sidebar-steps",children:s.steps.map(p=>b.jsxs("div",{className:"Sidebar-step",children:[b.jsx(rt,{className:`Sidebar-button ${i===p.stepNumber?"active":""} ${p.status==="pending"?"has-spinner":""}`,onClick:()=>f(p.stepNumber),children:n("stepTitle",{stepNumber:p.stepNumber,kind:n(p.kind)})}),p.status==="pending"&&b.jsx("div",{className:"Sidebar-spinner",children:b.jsx(ls,{size:"small"})})]},p.stepNumber))})]})}function jm({initialValue:i="",placeholder:n,submitLabel:r,onSubmit:s,isLoading:o=!1,error:f}){const{t:p}=ot(),[h,m]=T.useState(i),d=x=>{m(x.target.value)},v=async()=>{h.trim()&&await s(h.trim())};return b.jsxs("div",{className:"PromptForm",children:[f&&b.jsx("div",{className:"Alert error mb-3",children:b.jsx("p",{children:f})}),b.jsx("textarea",{className:"PromptForm-textarea",placeholder:n||p("createPromptPlaceholder"),value:h,onChange:d,rows:6,disabled:o}),b.jsx(rt,{onClick:v,loading:o,disabled:!h.trim()||o,className:"PromptForm-button mt-3",children:r})]})}function wt({header:i,footer:n,children:r,className:s=""}){const o=["Card",s].filter(Boolean).join(" ");return b.jsxs("div",{className:o,children:[i&&b.jsx("div",{className:"Card-header",children:i}),b.jsx("div",{className:"Card-body",children:r}),n&&b.jsx("div",{className:"Card-footer",children:n})]})}function w2(){const{t:i}=ot(),n=rl(),[r,s]=T.useState(!1),[o,f]=T.useState(void 0),{workSession:p,appendNewStep:h}=pn(),m=async d=>{if(!p)return;s(!0),f(void 0);const v=vi();if(!v){f(i("sessionExpired")),s(!1);return}try{const x=await Ga({command:"createSiteSchema",sessionToken:v,prompt:d});if(x.success&&x.result){const S=x.result;h(S),n(`/step/${S.stepNumber}`)}else f(i("promptSubmissionFailed"))}catch(x){console.error("Error submitting prompt:",x),f(i("errorOccurred"))}finally{s(!1)}};return b.jsxs("div",{className:"RouteLayout",children:[b.jsx("div",{className:"RouteLayout-main",children:b.jsxs(wt,{className:"p-4",children:[b.jsx("h1",{className:"mb-4",children:i("welcomeTitle")}),b.jsx("div",{className:"Text mb-4",dangerouslySetInnerHTML:{__html:i("startInstruction")}}),p&&p.steps.length>0&&b.jsx("p",{className:"InfoText",children:i("newTabRestartMessage")}),b.jsx(jm,{submitLabel:i("createSchema"),onSubmit:m,isLoading:r,error:o})]})}),b.jsx("div",{className:"RouteLayout-sidebar",children:b.jsx(Zr,{activeStep:void 0})})]})}function C2(i){return"siteId"in i}function rc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var mn=rc();function Am(i){mn=i}var hi={exec:()=>null};function xe(i,n=""){let r=typeof i=="string"?i:i.source;const s={replace:(o,f)=>{let p=typeof f=="string"?f:f.source;return p=p.replace(ut.caret,"$1"),r=r.replace(o,p),s},getRegex:()=>new RegExp(r,n)};return s}var ut={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:i=>new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}#`),htmlBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}<(?:[a-z].*>|!--)`,"i")},j2=/^(?:[ \t]*(?:\n|$))+/,A2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,O2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,xi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,k2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,sc=/(?:[*+-]|\d{1,9}[.)])/,Om=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,km=xe(Om).replace(/bull/g,sc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),L2=xe(Om).replace(/bull/g,sc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),uc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,z2=/^[^\n]+/,oc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,D2=xe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",oc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_2=xe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,sc).getRegex(),is="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",cc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,M2=xe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",cc).replace("tag",is).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Lm=xe(uc).replace("hr",xi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",is).getRegex(),U2=xe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Lm).getRegex(),fc={blockquote:U2,code:A2,def:D2,fences:O2,heading:k2,hr:xi,html:M2,lheading:km,list:_2,newline:j2,paragraph:Lm,table:hi,text:z2},Ip=xe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",xi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",is).getRegex(),B2={...fc,lheading:L2,table:Ip,paragraph:xe(uc).replace("hr",xi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ip).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",is).getRegex()},H2={...fc,html:xe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",cc).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:hi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xe(uc).replace("hr",xi).replace("heading",` *#{1,6} *[^
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
`)}}}
|
|
66
|
-
`)}}
|
|
61
|
+
Please change the parent <Route path="${L}"> to <Route path="${L==="/"?"*":`${L}/*`}">.`)}let v=Ei(),b;if(n){let L=typeof n=="string"?Wi(n):n;Ye(p==="/"||((z=L.pathname)==null?void 0:z.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${L.pathname}" was given in the \`location\` prop.`),b=L}else b=v;let R=b.pathname||"/",N=R;if(p!=="/"){let L=p.replace(/^\//,"").split("/");N="/"+R.replace(/^\//,"").split("/").slice(L.length).join("/")}let O=eb(t,{pathname:N});sn(g||O!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),sn(O==null||O[O.length-1].route.element!==void 0||O[O.length-1].route.Component!==void 0||O[O.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let U=tA(O&&O.map(L=>Object.assign({},L,{params:Object.assign({},d,L.params),pathname:Hn([p,l.encodeLocation?l.encodeLocation(L.pathname).pathname:L.pathname]),pathnameBase:L.pathnameBase==="/"?p:Hn([p,l.encodeLocation?l.encodeLocation(L.pathnameBase).pathname:L.pathnameBase])})),u,i,a);return n&&U?A.createElement(As.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},U):U}function XE(){let t=sA(),n=HE(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),i=t instanceof Error?t.stack:null,a="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:a},u={padding:"2px 4px",backgroundColor:a},f=null;return console.error("Error handled by React Router default ErrorBoundary:",t),f=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:u},"ErrorBoundary")," or"," ",A.createElement("code",{style:u},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},n),i?A.createElement("pre",{style:l},i):null,f)}var PE=A.createElement(XE,null),WE=class extends A.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?A.createElement(dn.Provider,{value:this.props.routeContext},A.createElement(vd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function eA({routeContext:t,match:n,children:i}){let a=A.useContext(ia);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),A.createElement(dn.Provider,{value:t},i)}function tA(t,n=[],i=null,a=null){if(t==null){if(!i)return null;if(i.errors)t=i.matches;else if(n.length===0&&!i.initialized&&i.matches.length>0)t=i.matches;else return null}let l=t,u=i==null?void 0:i.errors;if(u!=null){let m=l.findIndex(p=>p.route.id&&(u==null?void 0:u[p.route.id])!==void 0);Ye(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),l=l.slice(0,Math.min(l.length,m+1))}let f=!1,d=-1;if(i)for(let m=0;m<l.length;m++){let p=l[m];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=m),p.route.id){let{loaderData:g,errors:v}=i,b=p.route.loader&&!g.hasOwnProperty(p.route.id)&&(!v||v[p.route.id]===void 0);if(p.route.lazy||b){f=!0,d>=0?l=l.slice(0,d+1):l=[l[0]];break}}}return l.reduceRight((m,p,g)=>{let v,b=!1,R=null,N=null;i&&(v=u&&p.route.id?u[p.route.id]:void 0,R=p.route.errorElement||PE,f&&(d<0&&g===0?(ob("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,N=null):d===g&&(b=!0,N=p.route.hydrateFallbackElement||null)));let O=n.concat(l.slice(0,g+1)),U=()=>{let z;return v?z=R:b?z=N:p.route.Component?z=A.createElement(p.route.Component,null):p.route.element?z=p.route.element:z=m,A.createElement(eA,{match:p,routeContext:{outlet:m,matches:O,isDataRoute:i!=null},children:z})};return i&&(p.route.ErrorBoundary||p.route.errorElement||g===0)?A.createElement(WE,{location:i.location,revalidation:i.revalidation,component:R,error:v,children:U(),routeContext:{outlet:null,matches:O,isDataRoute:!0}}):U()},null)}function bd(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nA(t){let n=A.useContext(ia);return Ye(n,bd(t)),n}function iA(t){let n=A.useContext(Uo);return Ye(n,bd(t)),n}function rA(t){let n=A.useContext(dn);return Ye(n,bd(t)),n}function xd(t){let n=rA(t),i=n.matches[n.matches.length-1];return Ye(i.route.id,`${t} can only be used on routes that contain a unique "id"`),i.route.id}function aA(){return xd("useRouteId")}function sA(){var a;let t=A.useContext(vd),n=iA("useRouteError"),i=xd("useRouteError");return t!==void 0?t:(a=n.errors)==null?void 0:a[i]}function lA(){let{router:t}=nA("useNavigate"),n=xd("useNavigate"),i=A.useRef(!1);return sb(()=>{i.current=!0}),A.useCallback(async(l,u={})=>{sn(i.current,ab),i.current&&(typeof l=="number"?t.navigate(l):await t.navigate(l,{fromRouteId:n,...u}))},[t,n])}var Ty={};function ob(t,n,i){!n&&!Ty[t]&&(Ty[t]=!0,sn(!1,i))}A.memo(oA);function oA({routes:t,future:n,state:i}){return lb(t,void 0,i,n)}function uA({to:t,replace:n,state:i,relative:a}){Ye(ra(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=A.useContext(fn);sn(!l,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=A.useContext(dn),{pathname:f}=Ei(),d=aa(),m=yd(t,gd(u),f,a==="path"),p=JSON.stringify(m);return A.useEffect(()=>{d(JSON.parse(p),{replace:n,state:i,relative:a})},[d,p,a,n,i]),null}function fo(t){Ye(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function cA({basename:t="/",children:n=null,location:i,navigationType:a="POP",navigator:l,static:u=!1}){Ye(!ra(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=t.replace(/^\/*/,"/"),d=A.useMemo(()=>({basename:f,navigator:l,static:u,future:{}}),[f,l,u]);typeof i=="string"&&(i=Wi(i));let{pathname:m="/",search:p="",hash:g="",state:v=null,key:b="default"}=i,R=A.useMemo(()=>{let N=Gn(m,f);return N==null?null:{location:{pathname:N,search:p,hash:g,state:v,key:b},navigationType:a}},[f,m,p,g,v,b,a]);return sn(R!=null,`<Router basename="${f}"> is not able to match the URL "${m}${p}${g}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:A.createElement(fn.Provider,{value:d},A.createElement(As.Provider,{children:n,value:R}))}function fA({children:t,location:n}){return FE(Hf(t),n)}function Hf(t,n=[]){let i=[];return A.Children.forEach(t,(a,l)=>{if(!A.isValidElement(a))return;let u=[...n,l];if(a.type===A.Fragment){i.push.apply(i,Hf(a.props.children,u));return}Ye(a.type===fo,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ye(!a.props.index||!a.props.children,"An index route cannot have child routes.");let f={id:a.props.id||u.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(f.children=Hf(a.props.children,u)),i.push(f)}),i}var ho="get",po="application/x-www-form-urlencoded";function Bo(t){return t!=null&&typeof t.tagName=="string"}function dA(t){return Bo(t)&&t.tagName.toLowerCase()==="button"}function hA(t){return Bo(t)&&t.tagName.toLowerCase()==="form"}function pA(t){return Bo(t)&&t.tagName.toLowerCase()==="input"}function mA(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function gA(t,n){return t.button===0&&(!n||n==="_self")&&!mA(t)}var io=null;function yA(){if(io===null)try{new FormData(document.createElement("form"),0),io=!1}catch{io=!0}return io}var vA=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function wf(t){return t!=null&&!vA.has(t)?(sn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${po}"`),null):t}function bA(t,n){let i,a,l,u,f;if(hA(t)){let d=t.getAttribute("action");a=d?Gn(d,n):null,i=t.getAttribute("method")||ho,l=wf(t.getAttribute("enctype"))||po,u=new FormData(t)}else if(dA(t)||pA(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=t.getAttribute("formaction")||d.getAttribute("action");if(a=m?Gn(m,n):null,i=t.getAttribute("formmethod")||d.getAttribute("method")||ho,l=wf(t.getAttribute("formenctype"))||wf(d.getAttribute("enctype"))||po,u=new FormData(d,t),!yA()){let{name:p,type:g,value:v}=t;if(g==="image"){let b=p?`${p}.`:"";u.append(`${b}x`,"0"),u.append(`${b}y`,"0")}else p&&u.append(p,v)}}else{if(Bo(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=ho,a=null,l=po,f=t}return u&&l==="text/plain"&&(f=u,u=void 0),{action:a,method:i.toLowerCase(),encType:l,formData:u,body:f}}function Sd(t,n){if(t===!1||t===null||typeof t>"u")throw new Error(n)}async function xA(t,n){if(t.id in n)return n[t.id];try{let i=await import(t.module);return n[t.id]=i,i}catch(i){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function SA(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function wA(t,n,i){let a=await Promise.all(t.map(async l=>{let u=n.routes[l.route.id];if(u){let f=await xA(u,i);return f.links?f.links():[]}return[]}));return EA(a.flat(1).filter(SA).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Oy(t,n,i,a,l,u){let f=(m,p)=>i[p]?m.route.id!==i[p].route.id:!0,d=(m,p)=>{var g;return i[p].pathname!==m.pathname||((g=i[p].route.path)==null?void 0:g.endsWith("*"))&&i[p].params["*"]!==m.params["*"]};return u==="assets"?n.filter((m,p)=>f(m,p)||d(m,p)):u==="data"?n.filter((m,p)=>{var v;let g=a.routes[m.route.id];if(!g||!g.hasLoader)return!1;if(f(m,p)||d(m,p))return!0;if(m.route.shouldRevalidate){let b=m.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((v=i[0])==null?void 0:v.params)||{},nextUrl:new URL(t,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function NA(t,n,{includeHydrateFallback:i}={}){return kA(t.map(a=>{let l=n.routes[a.route.id];if(!l)return[];let u=[l.module];return l.clientActionModule&&(u=u.concat(l.clientActionModule)),l.clientLoaderModule&&(u=u.concat(l.clientLoaderModule)),i&&l.hydrateFallbackModule&&(u=u.concat(l.hydrateFallbackModule)),l.imports&&(u=u.concat(l.imports)),u}).flat(1))}function kA(t){return[...new Set(t)]}function RA(t){let n={},i=Object.keys(t).sort();for(let a of i)n[a]=t[a];return n}function EA(t,n){let i=new Set;return new Set(n),t.reduce((a,l)=>{let u=JSON.stringify(RA(l));return i.has(u)||(i.add(u),a.push({key:u,link:l})),a},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var AA=new Set([100,101,204,205]);function $A(t,n){let i=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return i.pathname==="/"?i.pathname="_root.data":n&&Gn(i.pathname,n)==="/"?i.pathname=`${n.replace(/\/$/,"")}/_root.data`:i.pathname=`${i.pathname.replace(/\/$/,"")}.data`,i}function ub(){let t=A.useContext(ia);return Sd(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function CA(){let t=A.useContext(Uo);return Sd(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var wd=A.createContext(void 0);wd.displayName="FrameworkContext";function cb(){let t=A.useContext(wd);return Sd(t,"You must render this element inside a <HydratedRouter> element"),t}function TA(t,n){let i=A.useContext(wd),[a,l]=A.useState(!1),[u,f]=A.useState(!1),{onFocus:d,onBlur:m,onMouseEnter:p,onMouseLeave:g,onTouchStart:v}=n,b=A.useRef(null);A.useEffect(()=>{if(t==="render"&&f(!0),t==="viewport"){let O=z=>{z.forEach(L=>{f(L.isIntersecting)})},U=new IntersectionObserver(O,{threshold:.5});return b.current&&U.observe(b.current),()=>{U.disconnect()}}},[t]),A.useEffect(()=>{if(a){let O=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(O)}}},[a]);let R=()=>{l(!0)},N=()=>{l(!1),f(!1)};return i?t!=="intent"?[u,b,{}]:[u,b,{onFocus:fs(d,R),onBlur:fs(m,N),onMouseEnter:fs(p,R),onMouseLeave:fs(g,N),onTouchStart:fs(v,R)}]:[!1,b,{}]}function fs(t,n){return i=>{t&&t(i),i.defaultPrevented||n(i)}}function OA({page:t,...n}){let{router:i}=ub(),a=A.useMemo(()=>eb(i.routes,t,i.basename),[i.routes,t,i.basename]);return a?A.createElement(DA,{page:t,matches:a,...n}):null}function jA(t){let{manifest:n,routeModules:i}=cb(),[a,l]=A.useState([]);return A.useEffect(()=>{let u=!1;return wA(t,n,i).then(f=>{u||l(f)}),()=>{u=!0}},[t,n,i]),a}function DA({page:t,matches:n,...i}){let a=Ei(),{manifest:l,routeModules:u}=cb(),{basename:f}=ub(),{loaderData:d,matches:m}=CA(),p=A.useMemo(()=>Oy(t,n,m,l,a,"data"),[t,n,m,l,a]),g=A.useMemo(()=>Oy(t,n,m,l,a,"assets"),[t,n,m,l,a]),v=A.useMemo(()=>{if(t===a.pathname+a.search+a.hash)return[];let N=new Set,O=!1;if(n.forEach(z=>{var G;let L=l.routes[z.route.id];!L||!L.hasLoader||(!p.some(X=>X.route.id===z.route.id)&&z.route.id in d&&((G=u[z.route.id])!=null&&G.shouldRevalidate)||L.hasClientLoader?O=!0:N.add(z.route.id))}),N.size===0)return[];let U=$A(t,f);return O&&N.size>0&&U.searchParams.set("_routes",n.filter(z=>N.has(z.route.id)).map(z=>z.route.id).join(",")),[U.pathname+U.search]},[f,d,a,l,p,n,t,u]),b=A.useMemo(()=>NA(g,l),[g,l]),R=jA(g);return A.createElement(A.Fragment,null,v.map(N=>A.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...i})),b.map(N=>A.createElement("link",{key:N,rel:"modulepreload",href:N,...i})),R.map(({key:N,link:O})=>A.createElement("link",{key:N,...O})))}function MA(...t){return n=>{t.forEach(i=>{typeof i=="function"?i(n):i!=null&&(i.current=n)})}}var fb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{fb&&(window.__reactRouterVersion="7.6.3")}catch{}function LA({basename:t,children:n,window:i}){let a=A.useRef();a.current==null&&(a.current=xE({window:i,v5Compat:!0}));let l=a.current,[u,f]=A.useState({action:l.action,location:l.location}),d=A.useCallback(m=>{A.startTransition(()=>f(m))},[f]);return A.useLayoutEffect(()=>l.listen(d),[l,d]),A.createElement(cA,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:l})}var db=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hb=A.forwardRef(function({onClick:n,discover:i="render",prefetch:a="none",relative:l,reloadDocument:u,replace:f,state:d,target:m,to:p,preventScrollReset:g,viewTransition:v,...b},R){let{basename:N}=A.useContext(fn),O=typeof p=="string"&&db.test(p),U,z=!1;if(typeof p=="string"&&O&&(U=p,fb))try{let ee=new URL(window.location.href),oe=p.startsWith("//")?new URL(ee.protocol+p):new URL(p),xe=Gn(oe.pathname,N);oe.origin===ee.origin&&xe!=null?p=xe+oe.search+oe.hash:z=!0}catch{sn(!1,`<Link to="${p}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let L=IE(p,{relative:l}),[G,X,F]=TA(a,b),pe=_A(p,{replace:f,state:d,target:m,preventScrollReset:g,relative:l,viewTransition:v});function fe(ee){n&&n(ee),ee.defaultPrevented||pe(ee)}let re=A.createElement("a",{...b,...F,href:U||L,onClick:z||u?n:fe,ref:MA(R,X),target:m,"data-discover":!O&&i==="render"?"true":void 0});return G&&!O?A.createElement(A.Fragment,null,re,A.createElement(OA,{page:L})):re});hb.displayName="Link";var zA=A.forwardRef(function({"aria-current":n="page",caseSensitive:i=!1,className:a="",end:l=!1,style:u,to:f,viewTransition:d,children:m,...p},g){let v=$s(f,{relative:p.relative}),b=Ei(),R=A.useContext(Uo),{navigator:N,basename:O}=A.useContext(fn),U=R!=null&&GA(v)&&d===!0,z=N.encodeLocation?N.encodeLocation(v).pathname:v.pathname,L=b.pathname,G=R&&R.navigation&&R.navigation.location?R.navigation.location.pathname:null;i||(L=L.toLowerCase(),G=G?G.toLowerCase():null,z=z.toLowerCase()),G&&O&&(G=Gn(G,O)||G);const X=z!=="/"&&z.endsWith("/")?z.length-1:z.length;let F=L===z||!l&&L.startsWith(z)&&L.charAt(X)==="/",pe=G!=null&&(G===z||!l&&G.startsWith(z)&&G.charAt(z.length)==="/"),fe={isActive:F,isPending:pe,isTransitioning:U},re=F?n:void 0,ee;typeof a=="function"?ee=a(fe):ee=[a,F?"active":null,pe?"pending":null,U?"transitioning":null].filter(Boolean).join(" ");let oe=typeof u=="function"?u(fe):u;return A.createElement(hb,{...p,"aria-current":re,className:ee,ref:g,style:oe,to:f,viewTransition:d},typeof m=="function"?m(fe):m)});zA.displayName="NavLink";var UA=A.forwardRef(({discover:t="render",fetcherKey:n,navigate:i,reloadDocument:a,replace:l,state:u,method:f=ho,action:d,onSubmit:m,relative:p,preventScrollReset:g,viewTransition:v,...b},R)=>{let N=VA(),O=HA(d,{relative:p}),U=f.toLowerCase()==="get"?"get":"post",z=typeof d=="string"&&db.test(d),L=G=>{if(m&&m(G),G.defaultPrevented)return;G.preventDefault();let X=G.nativeEvent.submitter,F=(X==null?void 0:X.getAttribute("formmethod"))||f;N(X||G.currentTarget,{fetcherKey:n,method:F,navigate:i,replace:l,state:u,relative:p,preventScrollReset:g,viewTransition:v})};return A.createElement("form",{ref:R,method:U,action:O,onSubmit:a?m:L,...b,"data-discover":!z&&t==="render"?"true":void 0})});UA.displayName="Form";function BA(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pb(t){let n=A.useContext(ia);return Ye(n,BA(t)),n}function _A(t,{target:n,replace:i,state:a,preventScrollReset:l,relative:u,viewTransition:f}={}){let d=aa(),m=Ei(),p=$s(t,{relative:u});return A.useCallback(g=>{if(gA(g,n)){g.preventDefault();let v=i!==void 0?i:Ss(m)===Ss(p);d(t,{replace:v,state:a,preventScrollReset:l,relative:u,viewTransition:f})}},[m,d,p,i,a,n,t,l,u,f])}var qA=0,KA=()=>`__${String(++qA)}__`;function VA(){let{router:t}=pb("useSubmit"),{basename:n}=A.useContext(fn),i=aA();return A.useCallback(async(a,l={})=>{let{action:u,method:f,encType:d,formData:m,body:p}=bA(a,n);if(l.navigate===!1){let g=l.fetcherKey||KA();await t.fetch(g,i,l.action||u,{preventScrollReset:l.preventScrollReset,formData:m,body:p,formMethod:l.method||f,formEncType:l.encType||d,flushSync:l.flushSync})}else await t.navigate(l.action||u,{preventScrollReset:l.preventScrollReset,formData:m,body:p,formMethod:l.method||f,formEncType:l.encType||d,replace:l.replace,state:l.state,fromRouteId:i,flushSync:l.flushSync,viewTransition:l.viewTransition})},[t,n,i])}function HA(t,{relative:n}={}){let{basename:i}=A.useContext(fn),a=A.useContext(dn);Ye(a,"useFormAction must be used inside a RouteContext");let[l]=a.matches.slice(-1),u={...$s(t||".",{relative:n})},f=Ei();if(t==null){u.search=f.search;let d=new URLSearchParams(u.search),m=d.getAll("index");if(m.some(g=>g==="")){d.delete("index"),m.filter(v=>v).forEach(v=>d.append("index",v));let g=d.toString();u.search=g?`?${g}`:""}}return(!t||t===".")&&l.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(u.pathname=u.pathname==="/"?i:Hn([i,u.pathname])),Ss(u)}function GA(t,n={}){let i=A.useContext(rb);Ye(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=pb("useViewTransitionState"),l=$s(t,{relative:n.relative});if(!i.isTransitioning)return!1;let u=Gn(i.currentLocation.pathname,a)||i.currentLocation.pathname,f=Gn(i.nextLocation.pathname,a)||i.nextLocation.pathname;return wo(l.pathname,f)!=null||wo(l.pathname,u)!=null}[...AA];const Cs=t=>Array.isArray(t)?t:[t],JA=(t,n)=>{const i=[[],[]];for(const a of t)n(a)?i[0].push(a):i[1].push(a);return i},mb=Array,Yi=(t,n)=>t.includes(n),YA=(t,n=0)=>[...new Array(t)].map((i,a)=>a+n),Be=(t,n,i)=>t===void 0?n===void 0?[]:Array.isArray(n)?n:[n]:(Array.isArray(n)?t.push(...n):t.push(n),t),Zi=(t,n)=>n==null?t??[]:t==null?Cs(n):t.concat(n),IA=(...t)=>t.reduce(Zi,[]),Fi=(t,n,i)=>{if(t===void 0)return Array.isArray(n)?n:[n];const a=(i==null?void 0:i.isEqual)??((l,u)=>l===u);for(const l of Cs(n))t.some(u=>a(u,l))||t.push(l);return t},ZA=(t,n)=>t.reduce((i,a)=>{const l=a[n];return i[l]=Be(i[l],a),i},{}),Xr=(t,n,i)=>t.length===n.length&&t.every(i!=null&&i.isEqual?(a,l)=>i.isEqual(a,n[l]):(a,l)=>a===n[l]),er=(t,n)=>hn(t)===n,hn=t=>{const n=typeof t;return n==="object"?t===null?"null":"object":n==="function"?"object":n},Jn={boolean:"boolean",null:"null",undefined:"undefined",bigint:"a bigint",number:"a number",object:"an object",string:"a string",symbol:"a symbol"},QA={...Jn,function:"a function"};class FA extends Error{}const nt=t=>Pr(t,FA),Pr=(t,n=Error)=>{throw new n(t)};class XA extends Error{constructor(){super(...arguments);w(this,"name","ParseError")}}const J=t=>Pr(t,XA),gb=t=>` ${t}`,_e=(t,n)=>{const i={},a=Array.isArray(t);let l=!1;for(const[u,f]of Object.entries(t).entries()){const d=a?n(u,f[1]):n(...f,u);l||(l=typeof d[0]=="number");const m=Array.isArray(d[0])||d.length===0?d:[d];for(const[p,g]of m)typeof p=="object"?i[p.group]=Be(i[p.group],g):i[p]=g}return l?Object.values(i):i},yb=Object.entries,Nn=(t,n)=>t in n,Nd=(t,n)=>n in t;class PA{constructor(n){Object.assign(this,n)}}const WA=class{};class vb extends WA{}const e$=(t,n)=>{const i={},a={};let l;for(l in t)l in n?i[l]=t[l]:a[l]=t[l];return[i,a]},t$=(t,n)=>e$(t,n)[1],Ts=t=>Object.keys(t).length===0,No=t=>[...Object.entries(t),...Object.getOwnPropertySymbols(t).map(n=>[n,t[n]])],n$=(t,n)=>Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)),i$=t=>{const n=Object.keys(t).sort(),i={};for(let a=0;a<n.length;a++)i[n[a]]=t[n[a]];return i},qn=gb("represents an uninitialized value"),r$=t=>Object.values(t).filter(n=>typeof n=="number"?!0:typeof t[n]!="number"),bb={Array,Boolean,Date,Error,Function,Map,Number,Promise,RegExp,Set,String,WeakMap,WeakSet},xb=globalThis.File??Blob,Sb={ArrayBuffer,Blob,File:xb,FormData,Headers,Request,Response,URL},a$={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array},Wr={...bb,...Sb,...a$,String,Number,Boolean},kd=t=>{var a;let n=Object.getPrototypeOf(t);for(;n!=null&&n.constructor&&(!Nn(n.constructor.name,Wr)||!(t instanceof Wr[n.constructor.name]));)n=Object.getPrototypeOf(n);const i=(a=n==null?void 0:n.constructor)==null?void 0:a.name;if(!(i===void 0||i==="Object"))return i},Gf=t=>typeof t=="object"&&t!==null?kd(t)??"object":hn(t),kt=Array.isArray,s$={Array:"an array",Function:"a function",Date:"a Date",RegExp:"a RegExp",Error:"an Error",Map:"a Map",Set:"a Set",String:"a String object",Number:"a Number object",Boolean:"a Boolean object",Promise:"a Promise",WeakMap:"a WeakMap",WeakSet:"a WeakSet"},l$={ArrayBuffer:"an ArrayBuffer instance",Blob:"a Blob instance",File:"a File instance",FormData:"a FormData instance",Headers:"a Headers instance",Request:"a Request instance",Response:"a Response instance",URL:"a URL instance"},o$={Int8Array:"an Int8Array",Uint8Array:"a Uint8Array",Uint8ClampedArray:"a Uint8ClampedArray",Int16Array:"an Int16Array",Uint16Array:"a Uint16Array",Int32Array:"an Int32Array",Uint32Array:"a Uint32Array",Float32Array:"a Float32Array",Float64Array:"a Float64Array",BigInt64Array:"a BigInt64Array",BigUint64Array:"a BigUint64Array"},u$={...s$,...l$,...o$},Rd=t=>{const n=Object(t).name??null;return n&&Nn(n,Wr)&&Wr[n]===t?n:null},jy=(t,n)=>{let i=t.prototype;for(;i!==null;){if(i===n.prototype)return!0;i=Object.getPrototypeOf(i)}return!1},c$=t=>wb(t,new Map),wb=(t,n)=>{if(typeof t!="object"||t===null)return t;if(n!=null&&n.has(t))return n.get(t);const i=Rd(t.constructor);if(i==="Date")return new Date(t.getTime());if(i&&i!=="Array")return t;const a=Array.isArray(t)?t.slice():Object.create(Object.getPrototypeOf(t)),l=Object.getOwnPropertyDescriptors(t);if(n){n.set(t,a);for(const u in l){const f=l[u];"get"in f||"set"in f||(f.value=wb(f.value,n))}}return Object.defineProperties(a,l),a},f$=t=>{let n=qn;return()=>n===qn?n=t():n},_o=t=>typeof t=="function"&&t.length===0,d$=class extends Function{constructor(...t){const n=t.slice(0,-1),i=t.at(-1);try{super(...n,i)}catch(a){return nt(`Encountered an unexpected error while compiling your definition:
|
|
62
|
+
Message: ${a}
|
|
63
|
+
Source: (${t.slice(0,-1)}) => {
|
|
64
|
+
${t.at(-1)}
|
|
65
|
+
}`)}}};class sa{constructor(n,...[i]){return Object.assign(Object.setPrototypeOf(n.bind((i==null?void 0:i.bind)??this),this.constructor.prototype),i==null?void 0:i.attach)}}const h$=f$(()=>{try{return new Function("return false")()}catch{return!0}});class kn{constructor(){}}const p$=()=>{var t,n,i;try{return(((i=(((n=(t=new Error().stack)==null?void 0:t.split(`
|
|
66
|
+
`)[2])==null?void 0:n.trim())||"").match(/\(?(.+?)(?::\d+:\d+)?\)?$/))==null?void 0:i[1])||"unknown").replace(/^file:\/\//,"")}catch{return"unknown"}};var Lv;const m$=((Lv=globalThis.process)==null?void 0:Lv.env)??{},g$={fileName:p$,env:m$},y$=t=>t[0].toUpperCase()+t.slice(1),Nb=t=>new RegExp(v$(t),typeof t=="string"?"":t.flags),v$=t=>`^(?:${typeof t=="string"?t:t.source})$`,wi={negativeLookahead:t=>`(?!${t})`,nonCapturingGroup:t=>`(?:${t})`},Jf="\\",qo={" ":1,"\n":1," ":1},b$=/^-0\.?0*$/.source,kb=/[1-9]\d*/.source,x$=/\.\d+/.source,S$=/\.\d*[1-9]/.source,Rb=t=>Nb(wi.negativeLookahead(b$)+wi.nonCapturingGroup("-?"+wi.nonCapturingGroup(wi.nonCapturingGroup("0|"+kb)+wi.nonCapturingGroup(t.decimalPattern)+"?")+(t.allowDecimalOnly?"|"+t.decimalPattern:"")+"?")),Dy=Rb({decimalPattern:S$,allowDecimalOnly:!1}),w$=Dy.test.bind(Dy),Yf=Rb({decimalPattern:x$,allowDecimalOnly:!0});Yf.test.bind(Yf);const N$=/^-?\d*\.?\d*$/,k$=t=>t.length!==0&&N$.test(t),ko=Nb(wi.negativeLookahead("^-0$")+"-?"+wi.nonCapturingGroup(wi.nonCapturingGroup("0|"+kb))),R$=ko.test.bind(ko),If=/^-?\d+$/,E$=If.test.bind(If),Eb={number:"a number",bigint:"a bigint",integer:"an integer"},Ab=(t,n)=>`'${t}' was parsed as ${Eb[n]} but could not be narrowed to a literal value. Avoid unnecessary leading or trailing zeros and other abnormal notation`,A$=(t,n)=>n==="number"?w$(t):R$(t),$$=(t,n)=>n==="number"?Number(t):Number.parseInt(t),C$=(t,n)=>n==="number"?k$(t):E$(t),T$=(t,n)=>Ed(t,"number",n),O$=(t,n)=>Ed(t,"number",{...n,strict:!0}),j$=(t,n)=>Ed(t,"integer",n),Ed=(t,n,i)=>{const a=$$(t,n);return!Number.isNaN(a)&&C$(t,n)?i!=null&&i.strict?A$(t,n)?a:J(Ab(t,n)):a:i!=null&&i.errorOnFail?J((i==null?void 0:i.errorOnFail)===!0?`Failed to parse ${Eb[n]} from '${t}'`:i==null?void 0:i.errorOnFail):void 0},D$=t=>{if(t[t.length-1]!=="n")return;const n=t.slice(0,-1);let i;try{i=BigInt(n)}catch{return}if(ko.test(n))return i;if(If.test(n))return J(Ab(t,"bigint"))},M$="0.46.0",L$={version:M$,filename:g$.fileName(),FileConstructor:xb},Os=L$,My=new Map,Nf=Object.create(null),Zf=t=>{const n=My.get(t);if(n)return n;let i=z$(t);return Nf[i]?i=`${i}${Nf[i]++}`:Nf[i]=1,Os[i]=t,My.set(t,i),i},ws=t=>/^[$A-Z_a-z][\w$]*$/.test(t),z$=t=>{switch(typeof t){case"object":{if(t===null)break;const n=kd(t)??"object";return n[0].toLowerCase()+n.slice(1)}case"function":return ws(t.name)?t.name:"fn";case"symbol":return t.description&&ws(t.description)?t.description:"symbol"}return nt(`Unexpected attempt to register serializable value of type ${hn(t)}`)},Ad=t=>typeof t=="string"?JSON.stringify(t):typeof t=="bigint"?`${t}n`:`${t}`,U$=(t,n={})=>ys(t,{onUndefined:"$ark.undefined",onBigInt:i=>`$ark.bigint-${i}`,...n},[]),ze=(t,n)=>{switch(hn(t)){case"object":const i=t,a=i.constructor.name;return a==="Object"||a==="Array"?(n==null?void 0:n.quoteKeys)===!1?Ro(i,(n==null?void 0:n.indent)??0,""):JSON.stringify(ys(i,ea,[]),null,n==null?void 0:n.indent):Ro(i,(n==null?void 0:n.indent)??0,"");case"symbol":return ea.onSymbol(t);default:return Ad(t)}},Ro=(t,n,i)=>{if(typeof t=="function")return ea.onFunction(t);if(typeof t!="object"||t===null)return Ad(t);const a=i+" ".repeat(n);if(Array.isArray(t)){if(t.length===0)return"[]";const u=t.map(f=>Ro(f,n,a)).join(`,
|
|
67
|
+
`+a);return n?`[
|
|
68
|
+
${a}${u}
|
|
69
|
+
${i}]`:`[${u}]`}const l=t.constructor.name;if(l==="Object"){const u=No(t).map(([f,d])=>{const m=typeof f=="symbol"?ea.onSymbol(f):ws(f)?f:JSON.stringify(f),p=Ro(d,n,a);return`${a}${m}: ${p}`});return u.length===0?"{}":n?`{
|
|
70
|
+
${u.join(`,
|
|
71
|
+
`)}
|
|
72
|
+
${i}}`:`{${u.join(", ")}}`}return t instanceof Date?js(t):"expression"in t&&typeof t.expression=="string"?t.expression:l},ea={onCycle:()=>"(cycle)",onSymbol:t=>`Symbol(${Zf(t)})`,onFunction:t=>`Function(${Zf(t)})`},ys=(t,n,i)=>{var a,l;switch(hn(t)){case"object":{const u=t;if("toJSON"in u&&typeof u.toJSON=="function")return u.toJSON();if(typeof u=="function")return ea.onFunction(u);if(i.includes(u))return"(cycle)";const f=[...i,u];if(Array.isArray(u))return u.map(m=>ys(m,n,f));if(u instanceof Date)return u.toDateString();const d={};for(const m in u)d[m]=ys(u[m],n,f);for(const m of Object.getOwnPropertySymbols(u))d[((a=n.onSymbol)==null?void 0:a.call(n,m))??m.toString()]=ys(u[m],n,f);return d}case"symbol":return ea.onSymbol(t);case"bigint":return((l=n.onBigInt)==null?void 0:l.call(n,t))??`${t}n`;case"undefined":return n.onUndefined??"undefined";case"string":return t.replaceAll("\\","\\\\");default:return t}},js=t=>{const n=t.getFullYear(),i=t.getMonth(),a=t.getDate(),l=t.getHours(),u=t.getMinutes(),f=t.getSeconds(),d=t.getMilliseconds();if(i===0&&a===1&&l===0&&u===0&&f===0&&d===0)return`${n}`;const m=`${B$[i]} ${a}, ${n}`;if(l===0&&u===0&&f===0&&d===0)return m;let p=t.toLocaleTimeString();const g=p.endsWith(" AM")||p.endsWith(" PM")?p.slice(-3):"";return g&&(p=p.slice(0,-g.length)),d?p+=`.${q$(d,3)}`:_$.test(p)&&(p=p.slice(0,-3)),`${p+g}, ${m}`},B$=["January","February","March","April","May","June","July","August","September","October","November","December"],_$=/:\d\d:00$/,q$=(t,n)=>String(t).padStart(n,"0"),$b=(t,n,...[i])=>{const a=(i==null?void 0:i.stringifySymbol)??ze;let l=t;switch(typeof n){case"string":l=ws(n)?t===""?n:`${t}.${n}`:`${t}[${JSON.stringify(n)}]`;break;case"number":l=`${t}[${n}]`;break;case"symbol":l=`${t}[${a(n)}]`;break;default:i!=null&&i.stringifyNonKey?l=`${t}[${i.stringifyNonKey(n)}]`:J(`${ze(n)} must be a PropertyKey or stringifyNonKey must be passed to options`)}return l},Ds=(t,...n)=>t.reduce((i,a)=>$b(i,a,...n),"");class Cb extends mb{constructor(...i){super();w(this,"cache",{});this.push(...i)}toJSON(){if(this.cache.json)return this.cache.json;this.cache.json=[];for(let i=0;i<this.length;i++)this.cache.json.push(typeof this[i]=="symbol"?ze(this[i]):this[i]);return this.cache.json}stringify(){return this.cache.stringify?this.cache.stringify:this.cache.stringify=Ds(this)}stringifyAncestors(){if(this.cache.stringifyAncestors)return this.cache.stringifyAncestors;let i="";const a=[i];for(const l of this)i=$b(i,l),a.push(i);return this.cache.stringifyAncestors=a}}class K${constructor(n){w(this,"chars");w(this,"i");w(this,"def");this.def=n,this.chars=[...n],this.i=0}shift(){return this.chars[this.i++]??""}get lookahead(){return this.chars[this.i]??""}get nextLookahead(){return this.chars[this.i+1]??""}get length(){return this.chars.length}shiftUntil(n){let i="";for(;this.lookahead;){if(n(this,i))if(i[i.length-1]===Jf)i=i.slice(0,-1);else break;i+=this.shift()}return i}shiftUntilLookahead(n){return typeof n=="string"?this.shiftUntil(i=>i.lookahead===n):this.shiftUntil(i=>i.lookahead in n)}shiftUntilNonWhitespace(){return this.shiftUntil(()=>!(this.lookahead in qo))}jumpToIndex(n){this.i=n<0?this.length+n:n}jumpForward(n){this.i+=n}get location(){return this.i}get unscanned(){return this.chars.slice(this.i,this.length).join("")}get scanned(){return this.chars.slice(0,this.i).join("")}sliceChars(n,i){return this.chars.slice(n,i).join("")}lookaheadIs(n){return this.lookahead===n}lookaheadIsIn(n){return this.lookahead in n}}let Qf="$ark",V$=2;for(;Qf in globalThis;)Qf=`$ark${V$++}`;const Tb=Qf;globalThis[Tb]=Os;const Z=Os,H$=t=>`${Tb}.${t}`,$t=t=>H$(Zf(t));class Ob extends vb{constructor(...i){super();w(this,"argNames");w(this,"body","");w(this,"indentation",0);this.argNames=i;for(const a of i){if(a in this)throw new Error(`Arg name '${a}' would overwrite an existing property on FunctionBody`);this[a]=a}}indent(){return this.indentation+=4,this}dedent(){return this.indentation-=4,this}prop(i,a=!1){return jb(i,a)}index(i,a=!1){return Db(`${i}`,a)}line(i){return this.body+=`${" ".repeat(this.indentation)}${i}
|
|
73
|
+
`,this}const(i,a){return this.line(`const ${i} = ${a}`),this}let(i,a){return this.line(`let ${i} = ${a}`)}set(i,a){return this.line(`${i} = ${a}`)}if(i,a){return this.block(`if (${i})`,a)}elseIf(i,a){return this.block(`else if (${i})`,a)}else(i){return this.block("else",i)}for(i,a,l=0){return this.block(`for (let i = ${l}; ${i}; i++)`,a)}forIn(i,a){return this.block(`for (const k in ${i})`,a)}block(i,a,l=""){return this.line(`${i} {`),this.indent(),a(this),this.dedent(),this.line(`}${l}`)}return(i=""){return this.line(`return ${i}`)}write(i="anonymous",a=0){return`${i}(${this.argNames.join(", ")}) { ${a?this.body.split(`
|
|
74
|
+
`).map(l=>" ".repeat(a)+`${l}`).join(`
|
|
75
|
+
`):this.body} }`}compile(){return new d$(...this.argNames,this.body)}}const Ms=t=>er(t,"object")||typeof t=="symbol"?$t(t):Ad(t),jb=(t,n=!1)=>typeof t=="string"&&ws(t)?`${n?"?":""}.${t}`:Db(G$(t),n),G$=t=>typeof t=="symbol"?$t(t):JSON.stringify(t),Db=(t,n=!1)=>`${n?"?.":""}[${t}]`;class kf extends Ob{constructor(i){super("data","ctx");w(this,"traversalKind");w(this,"optimistic");this.traversalKind=i.kind,this.optimistic=i.optimistic===!0}invoke(i,a){const l=(a==null?void 0:a.arg)??this.data,u=typeof i=="string"?!0:this.requiresContextFor(i),f=typeof i=="string"?i:i.id;return u?`${this.referenceToId(f,a)}(${l}, ${this.ctx})`:`${this.referenceToId(f,a)}(${l})`}referenceToId(i,a){const l=(a==null?void 0:a.kind)??this.traversalKind,u=`this.${i}${l}`;return a!=null&&a.bind?`${u}.bind(${a==null?void 0:a.bind})`:u}requiresContextFor(i){return this.traversalKind==="Apply"||i.allowsRequiresContext}initializeErrorCount(){return this.const("errorCount","ctx.currentErrorCount")}returnIfFail(){return this.if("ctx.currentErrorCount > errorCount",()=>this.return())}returnIfFailFast(){return this.if("ctx.failFast && ctx.currentErrorCount > errorCount",()=>this.return())}traverseKey(i,a,l){const u=this.requiresContextFor(l);return u&&this.line(`${this.ctx}.path.push(${i})`),this.check(l,{arg:a}),u&&this.line(`${this.ctx}.path.pop()`),this}check(i,a){return this.traversalKind==="Allows"?this.if(`!${this.invoke(i,a)}`,()=>this.return(!1)):this.line(this.invoke(i,a))}}const Mb=t=>_e(t,(n,i)=>[n,kt(i)?[...i]:i]),Yn=gb("arkKind"),le=(t,n)=>(t==null?void 0:t[Yn])===n,Et=t=>le(t,"root")||le(t,"constraint"),J$=["unit","proto","domain"],Ko=["required","optional","index","sequence"],Lb=["pattern","divisor","exactLength","max","min","maxLength","minLength","before","after"],$d=[...Lb,...Ko,"structure","predicate"],Vo=["alias","union","morph","unit","intersection","proto","domain"],Y$=[...Vo,...$d],zb=_e($d,(t,n)=>[n,1]),I$=_e([...Ko,"undeclared"],(t,n)=>[n,1]),Ub=_e(Y$,(t,n)=>[n,t]),mo=t=>typeof t=="string"&&t in Ub,Eo=t=>Ub[t],Cd=t=>Vo.slice(Eo(t)+1);[...Cd("union")];[...Cd("morph")];const Xi=t=>typeof t=="string"||typeof t=="boolean"||t===null?t:typeof t=="number"?Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t:Ms(t),Ho=t=>{let n="{ ";for(const[i,a]of Object.entries(t))n+=`${i}: ${Ms(a)}, `;return n+" }"},Fe=t=>{var i,a,l,u;const n=t;return n.hasAssociatedError&&((i=n.defaults).expected??(i.expected=f=>"description"in f?f.description:n.defaults.description(f)),(a=n.defaults).actual??(a.actual=f=>ze(f)),(l=n.defaults).problem??(l.problem=f=>`must be ${f.expected}${f.actual?` (was ${f.actual})`:""}`),(u=n.defaults).message??(u.message=f=>{if(f.path.length===0)return f.problem;const d=`${f.propString} ${f.problem}`;return d[0]==="["?`value at ${d}`:d})),n};class Z$ extends Error{constructor(i,a){super(ze(a,{quoteKeys:!1,indent:4}));w(this,"name","ToJsonSchemaError");w(this,"code");w(this,"context");this.code=i,this.context=a}hasCode(i){return this.code===i}}const Q$={dialect:"https://json-schema.org/draft/2020-12/schema",useRefs:!1,fallback:{arrayObject:t=>lt.throw("arrayObject",t),arrayPostfix:t=>lt.throw("arrayPostfix",t),defaultValue:t=>lt.throw("defaultValue",t),domain:t=>lt.throw("domain",t),morph:t=>lt.throw("morph",t),patternIntersection:t=>lt.throw("patternIntersection",t),predicate:t=>lt.throw("predicate",t),proto:t=>lt.throw("proto",t),symbolKey:t=>lt.throw("symbolKey",t),unit:t=>lt.throw("unit",t),date:t=>lt.throw("date",t)}},lt={Error:Z$,throw:(...t)=>{throw new lt.Error(...t)},throwInternalOperandError:(t,n)=>nt(`Unexpected JSON Schema input for ${t}: ${ze(n)}`),defaultConfig:Q$};Z.config??(Z.config={});const Ff=(t,n)=>{if(!n)return t;const i={...t};let a;for(a in n){const l={...t.keywords};if(a==="keywords"){for(const u in n[a]){const f=n.keywords[u];f!==void 0&&(l[u]=typeof f=="string"?{description:f}:f)}i.keywords=l}else a==="toJsonSchema"?i[a]=Bb(t.toJsonSchema,n.toJsonSchema):mo(a)?i[a]={...t[a],...n[a]}:i[a]=n[a]}return i},Bb=(t,n)=>{if(!t)return n??{};if(!n)return t;const i={...t};let a;for(a in n)a==="fallback"?i.fallback=F$(t.fallback,n.fallback):i[a]=n[a];return i},F$=(t,n)=>{t=Ly(t),n=Ly(n);const i={};let a;for(a in lt.defaultConfig.fallback)i[a]=n[a]??n.default??t[a]??t.default??lt.defaultConfig.fallback[a];return i},Ly=t=>typeof t=="function"?{default:t}:t??{};var zv,Uv;class ta extends(Uv=vb,zv=Yn,Uv){constructor({prefixPath:i,relativePath:a,...l},u){super();w(this,zv,"error");w(this,"path");w(this,"data");w(this,"nodeConfig");w(this,"input");w(this,"ctx");this.input=l,this.ctx=u,n$(this,l);const f=u.data;l.code==="union"&&(l.errors=l.errors.flatMap(m=>{const p=m.hasCode("union")?m.errors:[m];return!i&&!a?p:p.map(g=>g.transform(v=>({...v,path:IA(i,v.path,a)})))})),this.nodeConfig=u.config[this.code];const d=[...l.path??u.path];a&&d.push(...a),i&&d.unshift(...i),this.path=new Cb(...d),this.data="data"in l?l.data:f}transform(i){return new ta(i({data:this.data,path:this.path,...this.input}),this.ctx)}hasCode(i){return this.code===i}get propString(){return Ds(this.path)}get expected(){var a;if(this.input.expected)return this.input.expected;const i=((a=this.meta)==null?void 0:a.expected)??this.nodeConfig.expected;return typeof i=="function"?i(this.input):i}get actual(){var a;if(this.input.actual)return this.input.actual;const i=((a=this.meta)==null?void 0:a.actual)??this.nodeConfig.actual;return typeof i=="function"?i(this.data):i}get problem(){var a;if(this.input.problem)return this.input.problem;const i=((a=this.meta)==null?void 0:a.problem)??this.nodeConfig.problem;return typeof i=="function"?i(this):i}get message(){var a;if(this.input.message)return this.input.message;const i=((a=this.meta)==null?void 0:a.message)??this.nodeConfig.message;return typeof i=="function"?i(this):i}get flat(){return this.hasCode("intersection")?[...this.errors]:[this]}toJSON(){return{data:this.data,path:this.path,...this.input,expected:this.expected,actual:this.actual,problem:this.problem,message:this.message}}toString(){return this.message}throw(){throw this}}var Bv,_v;class ki extends(_v=mb,Bv=Yn,_v){constructor(i){super();w(this,Bv,"errors");w(this,"ctx");w(this,"byPath",Object.create(null));w(this,"byAncestorPath",Object.create(null));w(this,"count",0);w(this,"mutable",this);this.ctx=i}get flatByPath(){return _e(this.byPath,(i,a)=>[i,a.flat])}get flatProblemsByPath(){return _e(this.byPath,(i,a)=>[i,a.flat.map(l=>l.problem)])}throw(){throw this.toTraversalError()}toTraversalError(){return new X$(this)}add(i){this.includes(i)||this._add(i)}transform(i){const a=new ki(this.ctx);for(const l of this)a.add(i(l));return a}merge(i){for(const a of i)this.includes(a)||this._add(new ta({...a,path:[...this.ctx.path,...a.path]},this.ctx))}affectsPath(i){return this.length===0?!1:i.stringifyAncestors().some(a=>a in this.byPath)||i.stringify()in this.byAncestorPath}get summary(){return this.toString()}get issues(){return this}toJSON(){return[...this.map(i=>i.toJSON())]}toString(){return this.join(`
|
|
76
|
+
`)}_add(i){const a=this.byPath[i.propString];if(a){if(a.hasCode("union")&&a.errors.length===0)return;const l=i.hasCode("union")&&i.errors.length===0?i:new ta({code:"intersection",errors:a.hasCode("intersection")?[...a.errors,i]:[a,i]},this.ctx),u=this.indexOf(a);this.mutable[u===-1?this.length:u]=l,this.byPath[i.propString]=l,this.addAncestorPaths(i)}else this.byPath[i.propString]=i,this.addAncestorPaths(i),this.mutable.push(i);this.count++}addAncestorPaths(i){for(const a of i.path.stringifyAncestors())this.byAncestorPath[a]=Be(this.byAncestorPath[a],i)}}class X$ extends Error{constructor(i){var n=(...HD)=>(super(...HD),w(this,"name","TraversalError"),this);i.length===1?n(i.summary):n(`
|
|
77
|
+
`+i.map(a=>` • ${P$(a)}`).join(`
|
|
78
|
+
`)),Object.defineProperty(this,"arkErrors",{value:i,enumerable:!1})}}const P$=t=>t.toString().split(`
|
|
79
|
+
`).join(`
|
|
80
|
+
`);class Ir{constructor(n,i){w(this,"path",[]);w(this,"errors",new ki(this));w(this,"root");w(this,"config");w(this,"queuedMorphs",[]);w(this,"branches",[]);w(this,"seen",{});this.root=n,this.config=i}get data(){let n=this.root;for(const i of this.path)n=n==null?void 0:n[i];return n}get propString(){return Ds(this.path)}reject(n){return this.error(n),!1}mustBe(n){return this.error(n),!1}error(n){const i=typeof n=="object"?n.code?n:{...n,code:"predicate"}:{code:"predicate",expected:n};return this.errorFromContext(i)}hasError(){return this.currentErrorCount!==0}get currentBranch(){return this.branches.at(-1)}queueMorphs(n){const i={path:new Cb(...this.path),morphs:n};this.currentBranch?this.currentBranch.queuedMorphs.push(i):this.queuedMorphs.push(i)}finalize(n){return this.queuedMorphs.length&&(typeof this.root=="object"&&this.root!==null&&this.config.clone&&(this.root=this.config.clone(this.root)),this.applyQueuedMorphs()),this.hasError()?n?n(this.errors):this.errors:this.root}get currentErrorCount(){return this.currentBranch?this.currentBranch.error?1:0:this.errors.count}get failFast(){return this.branches.length!==0}pushBranch(){this.branches.push({error:void 0,queuedMorphs:[]})}popBranch(){return this.branches.pop()}get external(){return this}errorFromNodeContext(n){return this.errorFromContext(n)}errorFromContext(n){const i=new ta(n,this);return this.currentBranch?this.currentBranch.error=i:this.errors.add(i),i}applyQueuedMorphs(){for(;this.queuedMorphs.length;){const n=this.queuedMorphs;this.queuedMorphs=[];for(const{path:i,morphs:a}of n)this.errors.affectsPath(i)||this.applyMorphsAtPath(i,a)}}applyMorphsAtPath(n,i){const a=n.at(-1);let l;if(a!==void 0){l=this.root;for(let u=0;u<n.length-1;u++)l=l[n[u]]}this.path=[...n];for(const u of i){const f=Et(u),d=u(l===void 0?this.root:l[a],this);if(d instanceof ta){this.errors.add(d);break}if(d instanceof ki){f||this.errors.merge(d);break}l===void 0?this.root=d:l[a]=d,this.applyQueuedMorphs()}}}const In=(t,n,i)=>{if(!i)return n();i.path.push(t);const a=n();return i.path.pop(),a};class _b extends sa{constructor(i,a){var u;super((f,d,m=this.onFail)=>d?(this.traverseApply(f,d),d.hasError()?d.errors:d.data):this.rootApply(f,m),{attach:i});w(this,"attachments");w(this,"$");w(this,"onFail");w(this,"includesTransform");w(this,"includesContextualPredicate");w(this,"isCyclic");w(this,"allowsRequiresContext");w(this,"rootApplyStrategy");w(this,"contextFreeMorph");w(this,"rootApply");w(this,"referencesById");w(this,"shallowReferences");w(this,"flatRefs");w(this,"flatMorphs");w(this,"allows");w(this,"compiledMeta",t2(this.metaJson));w(this,"precedence",Eo(this.kind));w(this,"precompilation");w(this,"assert",(i,a)=>this(i,a,l=>l.throw()));this.attachments=i,this.$=a,this.onFail=this.meta.onFail??this.$.resolvedConfig.onFail,this.includesTransform=this.hasKind("morph")||this.hasKind("structure")&&this.structuralMorph!==void 0,this.includesContextualPredicate=this.hasKind("predicate")&&this.inner.predicate.length!==1,this.isCyclic=this.kind==="alias",this.referencesById={[this.id]:this},this.shallowReferences=this.hasKind("structure")?[this,...this.children]:this.children.reduce((f,d)=>n2(f,d.shallowReferences),[this]);const l=this.isStructural();this.flatRefs=[],this.flatMorphs=[];for(let f=0;f<this.children.length;f++){if(this.includesTransform||(this.includesTransform=this.children[f].includesTransform),this.includesContextualPredicate||(this.includesContextualPredicate=this.children[f].includesContextualPredicate),this.isCyclic||(this.isCyclic=this.children[f].isCyclic),!l){const d=this.children[f].flatRefs;for(let m=0;m<d.length;m++){const p=d[m];if(!this.flatRefs.some(g=>qb(g,p))){this.flatRefs.push(p);for(const g of p.node.branches)(g.hasKind("morph")||g.hasKind("intersection")&&((u=g.structure)==null?void 0:u.structuralMorph)!==void 0)&&this.flatMorphs.push({path:p.path,propString:p.propString,node:g})}}}Object.assign(this.referencesById,this.children[f].referencesById)}this.flatRefs.sort((f,d)=>f.path.length>d.path.length?1:f.path.length<d.path.length?-1:f.propString>d.propString?1:f.propString<d.propString||f.node.expression<d.node.expression?-1:1),this.allowsRequiresContext=this.includesContextualPredicate||this.isCyclic,this.rootApplyStrategy=!this.allowsRequiresContext&&this.flatMorphs.length===0?this.shallowMorphs.length===0?"allows":this.shallowMorphs.every(f=>f.length===1||f.name==="$arkStructuralMorph")?this.hasKind("union")?this.branches.some(f=>f.shallowMorphs.length>1)?"contextual":"branchedOptimistic":this.shallowMorphs.length>1?"contextual":"optimistic":"contextual":"contextual",this.rootApply=this.createRootApply(),this.allows=this.allowsRequiresContext?f=>this.traverseAllows(f,new Ir(f,this.$.resolvedConfig)):f=>this.traverseAllows(f)}get shallowMorphs(){return[]}createRootApply(){switch(this.rootApplyStrategy){case"allows":return(a,l)=>{if(this.allows(a))return a;const u=new Ir(a,this.$.resolvedConfig);return this.traverseApply(a,u),u.finalize(l)};case"contextual":return(a,l)=>{const u=new Ir(a,this.$.resolvedConfig);return this.traverseApply(a,u),u.finalize(l)};case"optimistic":this.contextFreeMorph=this.shallowMorphs[0];const i=this.$.resolvedConfig.clone;return(a,l)=>{if(this.allows(a))return this.contextFreeMorph(i&&(typeof a=="object"&&a!==null||typeof a=="function")?i(a):a);const u=new Ir(a,this.$.resolvedConfig);return this.traverseApply(a,u),u.finalize(l)};case"branchedOptimistic":return this.createBranchedOptimisticRootApply();default:return this.rootApplyStrategy,nt(`Unexpected rootApplyStrategy ${this.rootApplyStrategy}`)}}cacheGetter(i,a){return Object.defineProperty(this,i,{value:a}),a}get description(){var i;return this.cacheGetter("description",((i=this.meta)==null?void 0:i.description)??this.$.resolvedConfig[this.kind].description(this))}get references(){return Object.values(this.referencesById)}traverse(i,a){return this(i,a,null)}get in(){return this.cacheGetter("in",this.getIo("in"))}get out(){return this.cacheGetter("out",this.getIo("out"))}getIo(i){if(!this.includesTransform)return this;const a={};for(const[l,u]of this.innerEntries){const f=this.impl.keys[l];if(f.reduceIo)f.reduceIo(i,a,u);else if(f.child){const d=u;a[l]=kt(d)?d.map(m=>m[i]):d[i]}else a[l]=u}return this.$.node(this.kind,a)}toJSON(){return this.json}toString(){return`Type<${this.expression}>`}equals(i){const a=Et(i)?i:this.$.parseDefinition(i);return this.innerHash===a.innerHash}ifEquals(i){return this.equals(i)?this:void 0}hasKind(i){return this.kind===i}assertHasKind(i){return this.kind!==i&&Pr(`${this.kind} node was not of asserted kind ${i}`),this}hasKindIn(...i){return i.includes(this.kind)}assertHasKindIn(...i){return Yi(i,this.kind)||Pr(`${this.kind} node was not one of asserted kinds ${i}`),this}isBasis(){return Yi(J$,this.kind)}isConstraint(){return Yi($d,this.kind)}isStructural(){return Yi(Ko,this.kind)}isRefinement(){return Yi(Lb,this.kind)}isRoot(){return Yi(Vo,this.kind)}isUnknown(){return this.hasKind("intersection")&&this.children.length===0}isNever(){return this.hasKind("union")&&this.children.length===0}hasUnit(i){return this.hasKind("unit")&&this.allows(i)}hasOpenIntersection(){return this.impl.intersectionIsOpen}get nestableExpression(){return this.expression}select(i){const a=ps.normalize(i);return this._select(a)}_select(i){let a=ps.applyBoundary[i.boundary??"references"](this);return i.kind&&(a=a.filter(l=>l.kind===i.kind)),i.where&&(a=a.filter(i.where)),ps.applyMethod[i.method??"filter"](a,this,i)}transform(i,a){return this._transform(i,this._createTransformContext(a))}_createTransformContext(i){return{root:this,selected:void 0,seen:{},path:[],parseOptions:{prereduced:(i==null?void 0:i.prereduced)??!1},undeclaredKeyHandling:void 0,...i}}_transform(i,a){var v;const l=a.bindScope??this.$;if(a.seen[this.id])return this.$.lazilyResolve(a.seen[this.id]);if(((v=a.shouldTransform)==null?void 0:v.call(a,this,a))===!1)return this;let u;a.seen[this.id]=()=>u,this.hasKind("structure")&&this.undeclared!==a.undeclaredKeyHandling&&(a={...a,undeclaredKeyHandling:this.undeclared});const f=_e(this.inner,(b,R)=>{if(!this.impl.keys[b].child)return[b,R];const N=R;if(!kt(N)){const U=N._transform(i,a);return U?[b,U]:[]}if(N.length===0)return[b,R];const O=N.flatMap(U=>U._transform(i,a)??[]);return O.length?[b,O]:[]});delete a.seen[this.id];const d=Object.assign(f,{meta:this.meta}),m=a.selected&&!a.selected.includes(this)?d:i(this.kind,d,a);if(m===null)return null;if(Et(m))return u=m;const p=Object.keys(m);return(p.length===0||p.length===1&&p[0]==="meta")&&!Ts(this.inner)?null:(this.kind==="required"||this.kind==="optional"||this.kind==="index")&&!("value"in m)?a.undeclaredKeyHandling?{...m,value:Z.intrinsic.unknown}:null:(this.kind==="morph"&&(m.in??(m.in=Z.intrinsic.unknown)),u=l.node(this.kind,m,a.parseOptions))}configureReferences(i,a="references"){const l=ps.normalize(a),u=typeof i=="string"?(p,g)=>({...g,meta:{...g.meta,description:i}}):typeof i=="function"?(p,g)=>({...g,meta:i(g.meta)}):(p,g)=>({...g,meta:{...g.meta,...i}});if(l.boundary==="self")return this.$.node(this.kind,u(this.kind,{...this.inner,meta:this.meta}));const f=this._select(l),d=f&&Cs(f),m=l.boundary==="child"?(p,g)=>g.root.children.includes(p):l.boundary==="shallow"?p=>p.kind!=="structure":()=>!0;return this.$.finalize(this.transform(u,{shouldTransform:m,selected:d}))}}const ps={applyBoundary:{self:t=>[t],child:t=>[...t.children],shallow:t=>[...t.shallowReferences],references:t=>[...t.references]},applyMethod:{filter:t=>t,assertFilter:(t,n,i)=>(t.length===0&&Pr(zy(n,i)),t),find:t=>t[0],assertFind:(t,n,i)=>(t.length===0&&Pr(zy(n,i)),t[0])},normalize:t=>typeof t=="function"?{boundary:"references",method:"filter",where:t}:typeof t=="string"?Nn(t,ps.applyBoundary)?{method:"filter",boundary:t}:{boundary:"references",method:"filter",kind:t}:{boundary:"references",method:"filter",...t}},zy=(t,n)=>`${t} had no references matching ${ze(n)}.`,W$=t=>Ds(t,{stringifyNonKey:n=>n.expression}),e2=/"(\$ark\.[^"]+)"/g,t2=t=>JSON.stringify(t).replaceAll(e2,"$1"),Ni=(t,n)=>({path:t,node:n,propString:W$(t)}),qb=(t,n)=>t.propString===n.propString&&t.node.equals(n.node),Uy=(t,n)=>Fi(t,n,{isEqual:qb}),n2=(t,n)=>Fi(t,n,{isEqual:(i,a)=>i.equals(a)});class W extends Array{static init(n,i,a,l){return new W({kind:n,l:i,r:a,path:(l==null?void 0:l.path)??[],optional:(l==null?void 0:l.optional)??!1})}add(n,i,a,l){return this.push({kind:n,l:i,r:a,path:(l==null?void 0:l.path)??[],optional:(l==null?void 0:l.optional)??!1}),this}get summary(){return this.describeReasons()}describeReasons(){if(this.length===1){const{path:n,l:i,r:a}=this[0],l=Ds(n);return Kb(`Intersection${l&&` at ${l}`} of ${By(i,a)}`)}return`The following intersections result in unsatisfiable types:
|
|
81
|
+
• ${this.map(({path:n,l:i,r:a})=>`${n}: ${By(i,a)}`).join(`
|
|
82
|
+
• `)}`}throw(){return J(this.describeReasons())}invert(){const n=this.map(i=>({...i,l:i.r,r:i.l}));return n instanceof W?n:new W(...n)}withPrefixKey(n,i){return this.map(a=>({...a,path:[n,...a.path],optional:a.optional||i==="optional"}))}toNeverIfDisjoint(){return Z.intrinsic.never}}const By=(t,n)=>`${Xf(t)} and ${Xf(n)}`,Xf=t=>Et(t)?t.expression:kt(t)?t.map(Xf).join(" | ")||"never":String(t),Kb=t=>`${t} results in an unsatisfiable type`,Jr={},Zn=(t,n,i)=>mt(t,n,{$:i,invert:!1,pipe:!1}),Pf=(t,n,i)=>mt(t,n,{$:i,invert:!1,pipe:!0}),mt=(t,n,i)=>{const a=i.pipe?"|>":"&",l=`${t.hash}${a}${n.hash}`;if(Jr[l]!==void 0)return Jr[l];if(!i.pipe){const d=`${n.hash}${a}${t.hash}`;if(Jr[d]!==void 0){const m=Jr[d],p=m instanceof W?m.invert():m;return Jr[l]=p,p}}const u=!i.pipe||!t.includesTransform&&!n.includesTransform;if(u&&t.equals(n))return t;let f=u?Wf(t,n,i):t.hasKindIn(...Vo)?i2(t,n,i):Wf(t,n,i);return Et(f)&&(t.equals(f)?f=t:n.equals(f)&&(f=n)),Jr[l]=f,f},Wf=(t,n,i)=>{const a=t.precedence<n.precedence?t.kind:n.kind,l=t.impl.intersections[n.kind]??n.impl.intersections[t.kind];if(l===void 0)return null;if(a===t.kind)return l(t,n,i);{let u=l(n,t,{...i,invert:!i.invert});return u instanceof W&&(u=u.invert()),u}},i2=(t,n,i)=>t.includesTransform||n.includesTransform?i.invert?_y(n,t,i):_y(t,n,i):Wf(t,n,i),_y=(t,n,i)=>t.distribute(a=>r2(a,n,i),a=>{const l=a.filter(Et);if(l.length===0)return W.init("union",t.branches,n.branches);if(l.length<t.branches.length||!t.branches.every((f,d)=>f.in.equals(l[d].in)))return i.$.parseSchema(l);if(l.length===1)return l[0];const u={branches:l};return i.$.parseSchema(u)}),r2=(t,n,i)=>{if(t.hasKind("morph")){const l=[...t.morphs];if(t.lastMorphIfNode){const u=mt(t.lastMorphIfNode,n,i);if(u instanceof W)return u;l[l.length-1]=u}else l.push(n);return i.$.node("morph",{morphs:l,in:t.inner.in})}if(n.hasKind("morph")){const l=mt(t,n.in,i);return l instanceof W?l:i.$.node("morph",{morphs:[n],in:l})}return i.$.node("morph",{morphs:[n],in:t})};class la extends _b{constructor(i,a){super(i,a);w(this,"impliedSiblings");Object.defineProperty(this,Yn,{value:"constraint",enumerable:!1})}intersect(i){return Zn(this,i,this.$)}}class Go extends la{constructor(){super(...arguments);w(this,"traverseApply",(i,a)=>{this.traverseAllows(i,a)||a.errorFromNodeContext(this.errorContext)})}compile(i){i.traversalKind==="Allows"?i.return(this.compiledCondition):i.if(this.compiledNegation,()=>i.line(`${i.ctx}.errorFromNodeContext(${this.compiledErrorContext})`))}get errorContext(){return{code:this.kind,description:this.description,meta:this.meta,...this.inner}}get compiledErrorContext(){return Ho(this.errorContext)}}const Lt=t=>(n,i)=>{if(kt(n)){if(n.length===0)return;const l=n.map(u=>i.$.node(t,u));return t==="predicate"?l:l.sort((u,f)=>u.hash<f.hash?-1:1)}const a=i.$.node(t,n);return a.hasOpenIntersection()?[a]:a},Ao=t=>{const n=t.r.shift();if(!n){let a=t.l.length===0&&t.kind==="structure"?Z.intrinsic.unknown.internal:t.ctx.$.node(t.kind,Object.assign(t.baseInner,a2(t.l)),{prereduced:!0});for(const l of t.roots){if(a instanceof W)return a;a=mt(l,a,t.ctx)}return a}let i=!1;for(let a=0;a<t.l.length;a++){const l=mt(t.l[a],n,t.ctx);if(l!==null){if(l instanceof W)return l;if(i){if(!t.l.includes(l))return nt(`Unexpectedly encountered multiple distinct intersection results for refinement ${l}`)}else{if(l.isRoot())return t.roots.push(l),t.l.splice(a),Ao(t);t.l[a]=l,i=!0}}}if(i||t.l.push(n),t.kind==="intersection"&&n.impliedSiblings)for(const a of n.impliedSiblings)Fi(t.r,a);return Ao(t)},$o=t=>Object.entries(t).flatMap(([i,a])=>i in zb?a:[]).sort((i,a)=>i.precedence<a.precedence?-1:i.precedence>a.precedence?1:i.kind==="predicate"&&a.kind==="predicate"?0:i.hash<a.hash?-1:1),a2=t=>{const n={};for(const i of t)if(i.hasOpenIntersection())n[i.kind]=Be(n[i.kind],i);else{if(n[i.kind])return nt(`Unexpected intersection of closed refinements of kind ${i.kind}`);n[i.kind]=i}return n},s2=(...t)=>J(l2(...t)),l2=(t,n,i)=>{const a=i.hasKind("morph")?"a morph":i.isUnknown()?"unknown":i.exclude(n).defaultShortDescription;return`${y$(t)} operand must be ${n.description} (was ${a})`},o2=(t,n,i)=>new Co(t,n,i,i,null);class Vb extends sa{}var qv,Kv;class Co extends(Kv=sa,qv=Yn,Kv){constructor(i,a,l,u,f){super((...d)=>{const m=_e(this.names,(p,g)=>{const v=this.arg$.parse(d[p]);return v.extends(this.constraints[p])||J(u2(g,this.constraints[p].expression,v.expression)),[g,v]});if(this.defIsLazy()){const p=this.bodyDef(m);return this.$.parse(p)}return this.$.parse(a,{args:m})});w(this,qv,"generic");w(this,"paramDefs");w(this,"bodyDef");w(this,"$");w(this,"arg$");w(this,"baseInstantiation");w(this,"hkt");w(this,"description");this.paramDefs=i,this.bodyDef=a,this.$=l,this.arg$=u,this.hkt=f,this.description=f?new f().description??`a generic type for ${f.constructor.name}`:"a generic type",this.baseInstantiation=this(...this.constraints)}defIsLazy(){return this.bodyDef instanceof Vb}cacheGetter(i,a){return Object.defineProperty(this,i,{value:a}),a}get json(){return this.cacheGetter("json",{params:this.params.map(i=>i[1].isUnknown()?i[0]:[i[0],i[1].json]),body:U$(this.bodyDef)})}get params(){return this.cacheGetter("params",this.paramDefs.map(i=>typeof i=="string"?[i,Z.intrinsic.unknown]:[i[0],this.$.parse(i[1])]))}get names(){return this.cacheGetter("names",this.params.map(i=>i[0]))}get constraints(){return this.cacheGetter("constraints",this.params.map(i=>i[1]))}get internal(){return this}get referencesById(){return this.baseInstantiation.internal.referencesById}get references(){return this.baseInstantiation.internal.references}}const u2=(t,n,i)=>`${t} must be assignable to ${n} (was ${i})`,c2=Fe({kind:"predicate",hasAssociatedError:!0,collapsibleKey:"predicate",keys:{predicate:{}},normalize:t=>typeof t=="function"?{predicate:t}:t,defaults:{description:t=>`valid according to ${t.predicate.name||"an anonymous predicate"}`},intersectionIsOpen:!0,intersections:{predicate:()=>null}});class f2 extends la{constructor(){super(...arguments);w(this,"serializedPredicate",$t(this.predicate));w(this,"compiledCondition",`${this.serializedPredicate}(data, ctx)`);w(this,"compiledNegation",`!${this.compiledCondition}`);w(this,"impliedBasis",null);w(this,"expression",this.serializedPredicate);w(this,"traverseAllows",this.predicate);w(this,"errorContext",{code:"predicate",description:this.description,meta:this.meta});w(this,"compiledErrorContext",Ho(this.errorContext));w(this,"traverseApply",(i,a)=>{!this.predicate(i,a.external)&&!a.hasError()&&a.errorFromNodeContext(this.errorContext)})}compile(i){if(i.traversalKind==="Allows"){i.return(this.compiledCondition);return}i.if(`${this.compiledNegation} && !ctx.hasError()`,()=>i.line(`ctx.errorFromNodeContext(${this.compiledErrorContext})`))}reduceJsonSchema(i,a){return a.fallback.predicate({code:"predicate",base:i,predicate:this.predicate})}}const Hb={implementation:c2,Node:f2},d2=Fe({kind:"divisor",collapsibleKey:"rule",keys:{rule:{parse:t=>Number.isInteger(t)?t:J(p2(t))}},normalize:t=>typeof t=="number"?{rule:t}:t,hasAssociatedError:!0,defaults:{description:t=>t.rule===1?"an integer":t.rule===2?"even":`a multiple of ${t.rule}`},intersections:{divisor:(t,n,i)=>i.$.node("divisor",{rule:Math.abs(t.rule*n.rule/m2(t.rule,n.rule))})},obviatesBasisDescription:!0});class h2 extends Go{constructor(){super(...arguments);w(this,"traverseAllows",i=>i%this.rule===0);w(this,"compiledCondition",`data % ${this.rule} === 0`);w(this,"compiledNegation",`data % ${this.rule} !== 0`);w(this,"impliedBasis",Z.intrinsic.number.internal);w(this,"expression",`% ${this.rule}`)}reduceJsonSchema(i){return i.type="integer",this.rule===1||(i.multipleOf=this.rule),i}}const Gb={implementation:d2,Node:h2},p2=t=>`divisor must be an integer (was ${t})`,m2=(t,n)=>{let i,a=t,l=n;for(;l!==0;)i=l,l=a%l,a=i;return a};class oa extends Go{constructor(){super(...arguments);w(this,"boundOperandKind",b2[this.kind]);w(this,"compiledActual",this.boundOperandKind==="value"?"data":this.boundOperandKind==="length"?"data.length":"data.valueOf()");w(this,"comparator",x2(this.kind,this.exclusive));w(this,"numericLimit",this.rule.valueOf());w(this,"expression",`${this.comparator} ${this.rule}`);w(this,"compiledCondition",`${this.compiledActual} ${this.comparator} ${this.numericLimit}`);w(this,"compiledNegation",`${this.compiledActual} ${g2[this.comparator]} ${this.numericLimit}`);w(this,"stringLimit",this.boundOperandKind==="date"?S2(this.numericLimit):`${this.numericLimit}`);w(this,"limitKind",this.comparator[0]==="<"?"upper":"lower")}isStricterThan(i){return(this.limitKind==="upper"?this.numericLimit<i.numericLimit:this.numericLimit>i.numericLimit)||this.numericLimit===i.numericLimit&&this.exclusive===!0&&!i.exclusive}overlapsRange(i){return!(this.isStricterThan(i)||this.numericLimit===i.numericLimit&&(this.exclusive||i.exclusive))}overlapIsUnit(i){return this.numericLimit===i.numericLimit&&!this.exclusive&&!i.exclusive}}const g2={"<":">=","<=":">",">":"<=",">=":"<"},y2={min:"max",minLength:"maxLength",after:"before"},Jb={parse:t=>t||void 0},Yb=t=>n=>{if(typeof n=="number")return{rule:n};const{exclusive:i,...a}=n;return i?{...a,rule:t==="minLength"?a.rule+1:a.rule-1}:a},Ib=t=>n=>{if(typeof n=="number"||typeof n=="string"||n instanceof Date)return{rule:n};const{exclusive:i,...a}=n;if(!i)return a;const l=typeof a.rule=="number"?a.rule:typeof a.rule=="string"?new Date(a.rule).valueOf():a.rule.valueOf();return i?{...a,rule:t==="after"?l+1:l-1}:a},Zb=t=>typeof t=="string"||typeof t=="number"?new Date(t):t,v2=(t,n)=>`${t} bound must be a positive integer (was ${n})`,Td=t=>n=>((!Number.isInteger(n)||n<0)&&J(v2(t,n)),n),b2={min:"value",max:"value",minLength:"length",maxLength:"length",after:"date",before:"date"},x2=(t,n)=>`${Nn(t,y2)?">":"<"}${n?"":"="}`,S2=t=>typeof t=="string"?t:new Date(t).toLocaleString(),w2=t=>`Bounded expression ${t} must be exactly one of number, string, Array, or Date`,N2=Fe({kind:"after",collapsibleKey:"rule",hasAssociatedError:!0,keys:{rule:{parse:Zb,serialize:t=>t.toISOString()}},normalize:Ib("after"),defaults:{description:t=>`${t.collapsibleLimitString} or later`,actual:js},intersections:{after:(t,n)=>t.isStricterThan(n)?t:n}});class k2 extends oa{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.Date.internal);w(this,"collapsibleLimitString",js(this.rule));w(this,"traverseAllows",i=>i>=this.rule)}reduceJsonSchema(i,a){return a.fallback.date({code:"date",base:i,after:this.rule})}}const Qb={implementation:N2,Node:k2},R2=Fe({kind:"before",collapsibleKey:"rule",hasAssociatedError:!0,keys:{rule:{parse:Zb,serialize:t=>t.toISOString()}},normalize:Ib("before"),defaults:{description:t=>`${t.collapsibleLimitString} or earlier`,actual:js},intersections:{before:(t,n)=>t.isStricterThan(n)?t:n,after:(t,n,i)=>t.overlapsRange(n)?t.overlapIsUnit(n)?i.$.node("unit",{unit:t.rule}):null:W.init("range",t,n)}});class E2 extends oa{constructor(){super(...arguments);w(this,"collapsibleLimitString",js(this.rule));w(this,"traverseAllows",i=>i<=this.rule);w(this,"impliedBasis",Z.intrinsic.Date.internal)}reduceJsonSchema(i,a){return a.fallback.date({code:"date",base:i,before:this.rule})}}const Fb={implementation:R2,Node:E2},A2=Fe({kind:"exactLength",collapsibleKey:"rule",keys:{rule:{parse:Td("exactLength")}},normalize:t=>typeof t=="number"?{rule:t}:t,hasAssociatedError:!0,defaults:{description:t=>`exactly length ${t.rule}`,actual:t=>`${t.length}`},intersections:{exactLength:(t,n,i)=>W.init("unit",i.$.node("unit",{unit:t.rule}),i.$.node("unit",{unit:n.rule}),{path:["length"]}),minLength:(t,n)=>t.rule>=n.rule?t:W.init("range",t,n),maxLength:(t,n)=>t.rule<=n.rule?t:W.init("range",t,n)}});class $2 extends Go{constructor(){super(...arguments);w(this,"traverseAllows",i=>i.length===this.rule);w(this,"compiledCondition",`data.length === ${this.rule}`);w(this,"compiledNegation",`data.length !== ${this.rule}`);w(this,"impliedBasis",Z.intrinsic.lengthBoundable.internal);w(this,"expression",`== ${this.rule}`)}reduceJsonSchema(i){switch(i.type){case"string":return i.minLength=this.rule,i.maxLength=this.rule,i;case"array":return i.minItems=this.rule,i.maxItems=this.rule,i;default:return lt.throwInternalOperandError("exactLength",i)}}}const Xb={implementation:A2,Node:$2},C2=Fe({kind:"max",collapsibleKey:"rule",hasAssociatedError:!0,keys:{rule:{},exclusive:Jb},normalize:t=>typeof t=="number"?{rule:t}:t,defaults:{description:t=>t.rule===0?t.exclusive?"negative":"non-positive":`${t.exclusive?"less than":"at most"} ${t.rule}`},intersections:{max:(t,n)=>t.isStricterThan(n)?t:n,min:(t,n,i)=>t.overlapsRange(n)?t.overlapIsUnit(n)?i.$.node("unit",{unit:t.rule}):null:W.init("range",t,n)},obviatesBasisDescription:!0});class T2 extends oa{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.number.internal);w(this,"traverseAllows",this.exclusive?i=>i<this.rule:i=>i<=this.rule)}reduceJsonSchema(i){return this.exclusive?i.exclusiveMaximum=this.rule:i.maximum=this.rule,i}}const Pb={implementation:C2,Node:T2},O2=Fe({kind:"maxLength",collapsibleKey:"rule",hasAssociatedError:!0,keys:{rule:{parse:Td("maxLength")}},reduce:(t,n)=>t.rule===0?n.node("exactLength",t):void 0,normalize:Yb("maxLength"),defaults:{description:t=>`at most length ${t.rule}`,actual:t=>`${t.length}`},intersections:{maxLength:(t,n)=>t.isStricterThan(n)?t:n,minLength:(t,n,i)=>t.overlapsRange(n)?t.overlapIsUnit(n)?i.$.node("exactLength",{rule:t.rule}):null:W.init("range",t,n)}});class j2 extends oa{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.lengthBoundable.internal);w(this,"traverseAllows",i=>i.length<=this.rule)}reduceJsonSchema(i){switch(i.type){case"string":return i.maxLength=this.rule,i;case"array":return i.maxItems=this.rule,i;default:return lt.throwInternalOperandError("maxLength",i)}}}const Wb={implementation:O2,Node:j2},D2=Fe({kind:"min",collapsibleKey:"rule",hasAssociatedError:!0,keys:{rule:{},exclusive:Jb},normalize:t=>typeof t=="number"?{rule:t}:t,defaults:{description:t=>t.rule===0?t.exclusive?"positive":"non-negative":`${t.exclusive?"more than":"at least"} ${t.rule}`},intersections:{min:(t,n)=>t.isStricterThan(n)?t:n},obviatesBasisDescription:!0});class M2 extends oa{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.number.internal);w(this,"traverseAllows",this.exclusive?i=>i>this.rule:i=>i>=this.rule)}reduceJsonSchema(i){return this.exclusive?i.exclusiveMinimum=this.rule:i.minimum=this.rule,i}}const e0={implementation:D2,Node:M2},L2=Fe({kind:"minLength",collapsibleKey:"rule",hasAssociatedError:!0,keys:{rule:{parse:Td("minLength")}},reduce:t=>t.rule===0?Z.intrinsic.unknown:void 0,normalize:Yb("minLength"),defaults:{description:t=>t.rule===1?"non-empty":`at least length ${t.rule}`,actual:t=>t.length===0?"":`${t.length}`},intersections:{minLength:(t,n)=>t.isStricterThan(n)?t:n}});class z2 extends oa{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.lengthBoundable.internal);w(this,"traverseAllows",i=>i.length>=this.rule)}reduceJsonSchema(i){switch(i.type){case"string":return i.minLength=this.rule,i;case"array":return i.minItems=this.rule,i;default:return lt.throwInternalOperandError("minLength",i)}}}const t0={implementation:L2,Node:z2},U2={min:e0.implementation,max:Pb.implementation,minLength:t0.implementation,maxLength:Wb.implementation,exactLength:Xb.implementation,after:Qb.implementation,before:Fb.implementation},B2={min:e0.Node,max:Pb.Node,minLength:t0.Node,maxLength:Wb.Node,exactLength:Xb.Node,after:Qb.Node,before:Fb.Node},_2=Fe({kind:"pattern",collapsibleKey:"rule",keys:{rule:{},flags:{}},normalize:t=>typeof t=="string"?{rule:t}:t instanceof RegExp?t.flags?{rule:t.source,flags:t.flags}:{rule:t.source}:t,obviatesBasisDescription:!0,obviatesBasisExpression:!0,hasAssociatedError:!0,intersectionIsOpen:!0,defaults:{description:t=>`matched by ${t.rule}`},intersections:{pattern:()=>null}});class q2 extends Go{constructor(){super(...arguments);w(this,"instance",new RegExp(this.rule,this.flags));w(this,"expression",`${this.instance}`);w(this,"traverseAllows",this.instance.test.bind(this.instance));w(this,"compiledCondition",`${this.expression}.test(data)`);w(this,"compiledNegation",`!${this.compiledCondition}`);w(this,"impliedBasis",Z.intrinsic.string.internal)}reduceJsonSchema(i,a){return i.pattern?a.fallback.patternIntersection({code:"patternIntersection",base:i,pattern:this.rule}):(i.pattern=this.rule,i)}}const n0={implementation:_2,Node:q2},go=(t,n)=>{const i=K2(t);return n&&!n.includes(i)?J(`Root of kind ${i} should be one of ${n}`):i},K2=t=>{if(le(t,"root"))return t.kind;if(typeof t=="string")return t[0]==="$"?"alias":t in Jn?"domain":"proto";if(typeof t=="function")return"proto";if(typeof t!="object"||t===null)return J(qy(t));if("morphs"in t)return"morph";if("branches"in t||kt(t))return"union";if("unit"in t)return"unit";if("reference"in t)return"alias";const n=Object.keys(t);return n.length===0||n.some(i=>i in zb)?"intersection":"proto"in t?"proto":"domain"in t?"domain":J(qy(t))},qy=t=>`${ze(t)} is not a valid type schema`,ro={},V2=t=>kt(t)?t.map(n=>n.collapsibleJson):t.collapsibleJson,an={};Z.nodesByRegisteredId=an;const i0=t=>(ro[t]??(ro[t]=0),`${t}${++ro[t]}`),r0=t=>{var p;const n=Jo[t.kind],i=((p=n.applyConfig)==null?void 0:p.call(n,t.def,t.$.resolvedConfig))??t.def,a={},{meta:l,...u}=i,f=l===void 0?{}:typeof l=="string"?{description:l}:l,d=yb(u).sort(([g],[v])=>mo(g)?mo(v)?Eo(g)-Eo(v):1:mo(v)||g<v?-1:1).filter(([g,v])=>{if(g.startsWith("meta.")){const b=g.slice(5);return f[b]=v,!1}return!0});for(const g of d){const v=g[0],b=n.keys[v];if(!b)return J(`Key ${v} is not valid on ${t.kind} schema`);const R=b.parse?b.parse(g[1],t):g[1];R!==qn&&(R!==void 0||b.preserveUndefined)&&(a[v]=R)}if(n.reduce&&!t.prereduced){const g=n.reduce(a,t.$);if(g)return g instanceof W?g.throw():G2(g,f)}return Od({id:t.id,kind:t.kind,inner:a,meta:f,$:t.$})},Od=({id:t,kind:n,inner:i,meta:a,$:l,ignoreCache:u})=>{const f=Jo[n],d=yb(i),m=[];let p={};for(const[z,L]of d){const G=f.keys[z],X=G.serialize??(G.child?V2:Xi);if(p[z]=X(L),G.child===!0){const F=L;kt(F)?m.push(...F):m.push(F)}else typeof G.child=="function"&&m.push(...G.child(L))}f.finalizeInnerJson&&(p=f.finalizeInnerJson(p));let g={...p},v={};Ts(a)||(v=_e(a,(z,L)=>[z,z==="examples"?L:Xi(L)]),g.meta=ao(v,"description",!0)),p=ao(p,f.collapsibleKey,!1);const b=JSON.stringify({kind:n,...p});g=ao(g,f.collapsibleKey,!1);const R=ao(g,f.collapsibleKey,!0),N=JSON.stringify({kind:n,...g});if(l.nodesByHash[N]&&!u)return l.nodesByHash[N];const O={id:t,kind:n,impl:f,inner:i,innerEntries:d,innerJson:p,innerHash:b,meta:a,metaJson:v,json:g,hash:N,collapsibleJson:R,children:m};if(n!=="intersection")for(const z in i)z!=="in"&&z!=="out"&&(O[z]=i[z]);const U=new ZC[n](O,l);return l.nodesByHash[N]=U},H2=(t,n)=>t.id===n?t:(Et(an[n])&&nt(`Unexpected attempt to overwrite node id ${n}`),Od({id:n,kind:t.kind,inner:t.inner,meta:t.meta,$:t.$,ignoreCache:!0})),G2=(t,n,i)=>Od({id:i0(n.alias??t.kind),kind:t.kind,inner:t.inner,meta:n,$:t.$}),ao=(t,n,i)=>{const a=Object.keys(t);if(a.length===1&&a[0]===n){const l=t[n];if(i||er(l,"object")&&(Object.keys(l).length===1||Array.isArray(l)))return l}return t},ed=(t,n,i)=>{if(t.key!==n.key)return null;const a=t.key;let l=mt(t.value,n.value,i);const u=t.required||n.required?"required":"optional";if(l instanceof W)if(u==="optional")l=Z.intrinsic.never.internal;else return l.withPrefixKey(t.key,t.required&&n.required?"required":"optional");if(u==="required")return i.$.node("required",{key:a,value:l});const f=t.hasDefault()?n.hasDefault()?t.default===n.default?t.default:J(s0(t.default,n.default)):t.default:n.hasDefault()?n.default:qn;return i.$.node("optional",{key:a,value:l,default:f})};class a0 extends la{constructor(){super(...arguments);w(this,"required",this.kind==="required");w(this,"optional",this.kind==="optional");w(this,"impliedBasis",Z.intrinsic.object.internal);w(this,"serializedKey",Ms(this.key));w(this,"compiledKey",typeof this.key=="string"?this.key:this.serializedKey);w(this,"flatRefs",Be(this.value.flatRefs.map(i=>Ni([this.key,...i.path],i.node)),Ni([this.key],this.value)));w(this,"traverseAllows",(i,a)=>this.key in i?In(this.key,()=>this.value.traverseAllows(i[this.key],a),a):this.optional);w(this,"traverseApply",(i,a)=>{this.key in i?In(this.key,()=>this.value.traverseApply(i[this.key],a),a):this.hasKind("required")&&a.errorFromNodeContext(this.errorContext)})}_transform(i,a){a.path.push(this.key);const l=super._transform(i,a);return a.path.pop(),l}hasDefault(){return"default"in this.inner}compile(i){i.if(`${this.serializedKey} in data`,()=>i.traverseKey(this.serializedKey,`data${i.prop(this.key)}`,this.value)),this.hasKind("required")&&i.else(()=>i.traversalKind==="Apply"?i.line(`ctx.errorFromNodeContext(${this.compiledErrorContext})`):i.return(!1)),i.traversalKind==="Allows"&&i.return(!0)}}const s0=(t,n)=>`Invalid intersection of default values ${ze(t)} & ${ze(n)}`,J2=Fe({kind:"optional",hasAssociatedError:!1,intersectionIsOpen:!0,keys:{key:{},value:{child:!0,parse:(t,n)=>n.$.parseSchema(t)},default:{preserveUndefined:!0}},normalize:t=>t,reduce:(t,n)=>{if(n.resolvedConfig.exactOptionalPropertyTypes===!1&&!t.value.allows(void 0))return n.node("optional",{...t,value:t.value.or(de.undefined)},{prereduced:!0})},defaults:{description:t=>`${t.compiledKey}?: ${t.value.description}`},intersections:{optional:ed}});class Y2 extends a0{constructor(...i){super(...i);w(this,"expression",this.hasDefault()?`${this.compiledKey}: ${this.value.expression} = ${ze(this.inner.default)}`:`${this.compiledKey}?: ${this.value.expression}`);w(this,"defaultValueMorph",I2(this));w(this,"defaultValueMorphRef",this.defaultValueMorph&&$t(this.defaultValueMorph));"default"in this.inner&&Dd(this.value,this.inner.default,this.key)}get outProp(){if(!this.hasDefault())return this;const{default:i,...a}=this.inner;return this.cacheGetter("outProp",this.$.node("required",a,{prereduced:!0}))}}const jd={implementation:J2,Node:Y2},Rf={},I2=t=>{if(!t.hasDefault())return;const n=`{${t.compiledKey}: ${t.value.id} = ${Xi(t.default)}}`;return Rf[n]??(Rf[n]=l0(t.key,t.value,t.default))},l0=(t,n,i)=>{if(typeof i=="function")return n.includesTransform?(l,u)=>(In(t,()=>n(l[t]=i(),u),u),l):l=>(l[t]=i(),l);const a=n.includesTransform?n.assert(i):i;return er(a,"object")?(l,u)=>(In(t,()=>n(l[t]=i,u),u),l):l=>(l[t]=a,l)},Dd=(t,n,i)=>{const a=_o(n);er(n,"object")&&!a&&J(Z2(i));const l=t.in(a?n():n);if(l instanceof ki){i===null&&J(`Default ${l.summary}`);const u=l.transform(f=>f.transform(d=>({...d,prefixPath:[i]})));J(`Default for ${u.summary}`)}return n},Z2=t=>`Non-primitive default ${t===null?"":typeof t=="number"?`for value at [${t}] `:`for ${Ms(t)} `}must be specified as a function like () => ({my: 'object'})`;class Ls extends _b{constructor(i,a){super(i,a);w(this,"branches",this.hasKind("union")?this.inner.branches:[this]);w(this,"_keyof");w(this,"pipe",Object.assign(this._pipe.bind(this),{try:this.tryPipe.bind(this)}));Object.defineProperty(this,Yn,{value:"root",enumerable:!1})}get internal(){return this}get"~standard"(){return{vendor:"arktype",version:1,validate:i=>{const a=this(i);return a instanceof ki?a:{value:a}}}}as(){return this}brand(i){return i===""?J(Q2):this}readonly(){return this}distribute(i,a){const l=this.branches.map(i);return(a==null?void 0:a(l))??l}get shortDescription(){return this.meta.description??this.defaultShortDescription}toJsonSchema(i={}){const a=Bb(this.$.resolvedConfig.toJsonSchema,i);a.useRefs||(a.useRefs=this.isCyclic);const l=typeof a.dialect=="string"?{$schema:a.dialect}:{};return Object.assign(l,this.toJsonSchemaRecurse(a)),a.useRefs&&(l.$defs=_e(this.references,(u,f)=>f.isRoot()&&!f.alwaysExpandJsonSchema?[f.id,f.toResolvedJsonSchema(a)]:[])),l}toJsonSchemaRecurse(i){return i.useRefs&&!this.alwaysExpandJsonSchema?{$ref:`#/$defs/${this.id}`}:this.toResolvedJsonSchema(i)}get alwaysExpandJsonSchema(){return this.isBasis()||this.kind==="alias"||this.hasKind("union")&&this.isBoolean}toResolvedJsonSchema(i){const a=this.innerToJsonSchema(i);return Object.assign(a,this.metaJson)}intersect(i){const a=this.$.parseDefinition(i),l=this.rawIntersect(a);return l instanceof W?l:this.$.finalize(l)}rawIntersect(i){return Zn(this,i,this.$)}toNeverIfDisjoint(){return this}and(i){const a=this.intersect(i);return a instanceof W?a.throw():a}rawAnd(i){const a=this.rawIntersect(i);return a instanceof W?a.throw():a}or(i){const a=this.$.parseDefinition(i);return this.$.finalize(this.rawOr(a))}rawOr(i){const a=[...this.branches,...i.branches];return this.$.node("union",a)}map(i){return this.$.schema(this.applyStructuralOperation("map",[i]))}pick(...i){return this.$.schema(this.applyStructuralOperation("pick",i))}omit(...i){return this.$.schema(this.applyStructuralOperation("omit",i))}required(){return this.$.schema(this.applyStructuralOperation("required",[]))}partial(){return this.$.schema(this.applyStructuralOperation("partial",[]))}keyof(){if(this._keyof)return this._keyof;const i=this.applyStructuralOperation("keyof",[]).reduce((a,l)=>a.intersect(l).toNeverIfDisjoint(),Z.intrinsic.unknown.internal);return i.branches.length===0&&J(Kb(`keyof ${this.expression}`)),this._keyof=this.$.finalize(i)}get props(){return this.branches.length!==1?J(F2(this.expression)):[...this.applyStructuralOperation("props",[])[0]]}merge(i){const a=this.$.parseDefinition(i);return this.$.schema(a.distribute(l=>this.applyStructuralOperation("merge",[Ky(l)??J(Vy("merge",l.expression))])))}applyStructuralOperation(i,a){return this.distribute(l=>{if(l.equals(Z.intrinsic.object)&&i!=="merge")return l;const u=Ky(l);if(u||J(Vy(i,l.expression)),i==="keyof")return u.keyof();if(i==="get")return u.get(...a);if(i==="props")return u.props;const f=i==="required"?"require":i==="partial"?"optionalize":i;return this.$.node("intersection",{...l.inner,structure:u[f](...a)})})}get(...i){return i[0]===void 0?this:this.$.schema(this.applyStructuralOperation("get",i))}extract(i){const a=this.$.parseDefinition(i);return this.$.schema(this.branches.filter(l=>l.extends(a)))}exclude(i){const a=this.$.parseDefinition(i);return this.$.schema(this.branches.filter(l=>!l.extends(a)))}array(){return this.$.schema(this.isUnknown()?{proto:Array}:{proto:Array,sequence:this},{prereduced:!0})}overlaps(i){return!(this.intersect(i)instanceof W)}extends(i){const a=this.intersect(i);return!(a instanceof W)&&this.equals(a)}ifExtends(i){return this.extends(i)?this:void 0}subsumes(i){return this.$.parseDefinition(i).extends(this)}configure(i,a="shallow"){return this.configureReferences(i,a)}describe(i,a="shallow"){return this.configure({description:i},a)}optional(){return[this,"?"]}default(i){return Dd(this,i,null),[this,"=",i]}from(i){return this.assert(i)}_pipe(...i){const a=i.reduce((l,u)=>l.rawPipeOnce(u),this);return this.$.finalize(a)}tryPipe(...i){const a=i.reduce((l,u)=>l.rawPipeOnce(le(u,"root")?u:(f,d)=>{try{return u(f,d)}catch(m){return d.error({code:"predicate",predicate:u,actual:`aborted due to error:
|
|
83
|
+
${m}
|
|
84
|
+
`})}}),this);return this.$.finalize(a)}to(i){return this.$.finalize(this.toNode(this.$.parseDefinition(i)))}toNode(i){const a=Pf(this,i,this.$);return a instanceof W?a.throw():a}rawPipeOnce(i){return le(i,"root")?this.toNode(i):this.distribute(a=>a.hasKind("morph")?this.$.node("morph",{in:a.inner.in,morphs:[...a.morphs,i]}):this.$.node("morph",{in:a,morphs:[i]}),this.$.parseSchema)}narrow(i){return this.constrainOut("predicate",i)}constrain(i,a){return this._constrain("root",i,a)}constrainIn(i,a){return this._constrain("in",i,a)}constrainOut(i,a){return this._constrain("out",i,a)}_constrain(i,a,l){const u=this.$.node(a,l);if(u.isRoot())return u.isUnknown()?this:nt(`Unexpected constraint node ${u}`);const f=i==="root"?this:this[i];if(f.hasKind("morph")||u.impliedBasis&&!f.extends(u.impliedBasis))return s2(a,u.impliedBasis,this);const d=this.$.node("intersection",{[u.kind]:u}),m=i==="out"?Pf(this,d,this.$):Zn(this,d,this.$);return m instanceof W&&m.throw(),this.$.finalize(m)}onUndeclaredKey(i){const a=typeof i=="string"?i:i.rule,l=typeof i=="string"?!1:i.deep;return this.$.finalize(this.transform((u,f)=>u==="structure"?a==="ignore"?t$(f,{undeclared:1}):{...f,undeclared:a}:f,l?void 0:{shouldTransform:u=>!Yi(Ko,u.kind)}))}hasEqualMorphs(i){return!this.includesTransform&&!i.includesTransform?!0:!(!Xr(this.shallowMorphs,i.shallowMorphs)||!Xr(this.flatMorphs,i.flatMorphs,{isEqual:(a,l)=>{var u,f;return a.propString===l.propString&&(a.node.hasKind("morph")&&l.node.hasKind("morph")?a.node.hasEqualMorphs(l.node):a.node.hasKind("intersection")&&l.node.hasKind("intersection")?((u=a.node.structure)==null?void 0:u.structuralMorphRef)===((f=l.node.structure)==null?void 0:f.structuralMorphRef):!1)}}))}onDeepUndeclaredKey(i){return this.onUndeclaredKey({rule:i,deep:!0})}filter(i){return this.constrainIn("predicate",i)}divisibleBy(i){return this.constrain("divisor",i)}matching(i){return this.constrain("pattern",i)}atLeast(i){return this.constrain("min",i)}atMost(i){return this.constrain("max",i)}moreThan(i){return this.constrain("min",Yr(i))}lessThan(i){return this.constrain("max",Yr(i))}atLeastLength(i){return this.constrain("minLength",i)}atMostLength(i){return this.constrain("maxLength",i)}moreThanLength(i){return this.constrain("minLength",Yr(i))}lessThanLength(i){return this.constrain("maxLength",Yr(i))}exactlyLength(i){return this.constrain("exactLength",i)}atOrAfter(i){return this.constrain("after",i)}atOrBefore(i){return this.constrain("before",i)}laterThan(i){return this.constrain("after",Yr(i))}earlierThan(i){return this.constrain("before",Yr(i))}}const Q2="Expected a non-empty brand name after #",Yr=t=>typeof t=="object"&&!(t instanceof Date)?{...t,exclusive:!0}:{rule:t,exclusive:!0},so=(t,n)=>le(n,"root")?le(t,"root")?t.extends(n):n.allows(t):le(t,"root")?t.hasUnit(n):n===t,Ky=t=>{var n;return t.hasKind("morph")?null:t.hasKind("intersection")?t.inner.structure??(((n=t.basis)==null?void 0:n.domain)==="object"?t.$.bindReference(Z.intrinsic.emptyStructure):null):t.isBasis()&&t.domain==="object"?t.$.bindReference(Z.intrinsic.emptyStructure):null},F2=t=>`Props cannot be extracted from a union. Use .distribute to extract props from each branch instead. Received:
|
|
85
|
+
${t}`,Vy=(t,n)=>`${t} operand must be an object (was ${n})`,zs=(t,n)=>_e(Cd(t),(i,a)=>[a,n]),X2=t=>typeof t=="string"?{reference:t}:t,Hy=t=>t instanceof W?Z.intrinsic.never.internal:t,P2=Fe({kind:"alias",hasAssociatedError:!1,collapsibleKey:"reference",keys:{reference:{serialize:t=>t.startsWith("$")?t:`$ark.${t}`},resolve:{}},normalize:X2,defaults:{description:t=>t.reference},intersections:{alias:(t,n,i)=>i.$.lazilyResolve(()=>Hy(mt(t.resolution,n.resolution,i)),`${t.reference}${i.pipe?"=>":"&"}${n.reference}`),...zs("alias",(t,n,i)=>n.isUnknown()?t:n.isNever()?n:n.isBasis()&&!n.overlaps(Z.intrinsic.object)?W.init("assignability",Z.intrinsic.object,n):i.$.lazilyResolve(()=>Hy(mt(t.resolution,n,i)),`${t.reference}${i.pipe?"=>":"&"}${n.id}`))}});class W2 extends Ls{constructor(){super(...arguments);w(this,"expression",this.reference);w(this,"structure");w(this,"traverseAllows",(i,a)=>{const l=a.seen[this.reference];return l!=null&&l.includes(i)?!0:(a.seen[this.reference]=Be(l,i),this.resolution.traverseAllows(i,a))});w(this,"traverseApply",(i,a)=>{const l=a.seen[this.reference];l!=null&&l.includes(i)||(a.seen[this.reference]=Be(l,i),this.resolution.traverseApply(i,a))})}get resolution(){const i=this._resolve();return an[this.id]=i}_resolve(){if(this.resolve)return this.resolve();if(this.reference[0]==="$")return this.$.resolveRoot(this.reference.slice(1));const i=this.reference;let a=an[i];const l=[];for(;le(a,"context");){if(l.includes(a.id))return J(eC(a.id,l));l.push(a.id),a=an[a.id]}return le(a,"root")?a:nt(`Unexpected resolution for reference ${this.reference}
|
|
86
|
+
Seen: [${l.join("->")}]
|
|
87
|
+
Resolution: ${ze(a)}`)}get resolutionId(){if(this.reference.includes("&")||this.reference.includes("=>"))return this.resolution.id;if(this.reference[0]!=="$")return this.reference;const i=this.reference.slice(1),a=this.$.resolutions[i];return typeof a=="string"?a:le(a,"root")?a.id:nt(`Unexpected resolution for reference ${this.reference}: ${ze(a)}`)}get defaultShortDescription(){return Jn.object}innerToJsonSchema(i){return this.resolution.toJsonSchemaRecurse(i)}compile(i){const a=this.resolutionId;i.if(`ctx.seen.${a} && ctx.seen.${a}.includes(data)`,()=>i.return(!0)),i.if(`!ctx.seen.${a}`,()=>i.line(`ctx.seen.${a} = []`)),i.line(`ctx.seen.${a}.push(data)`),i.return(i.invoke(a))}}const eC=(t,n)=>`Alias '${t}' has a shallow resolution cycle: ${[...n,t].join("->")}`,Md={implementation:P2,Node:W2};class Ld extends Ls{constructor(){super(...arguments);w(this,"traverseApply",(i,a)=>{this.traverseAllows(i,a)||a.errorFromNodeContext(this.errorContext)})}get errorContext(){return{code:this.kind,description:this.description,meta:this.meta,...this.inner}}get compiledErrorContext(){return Ho(this.errorContext)}compile(i){i.traversalKind==="Allows"?i.return(this.compiledCondition):i.if(this.compiledNegation,()=>i.line(`${i.ctx}.errorFromNodeContext(${this.compiledErrorContext})`))}}const tC=Fe({kind:"domain",hasAssociatedError:!0,collapsibleKey:"domain",keys:{domain:{},numberAllowsNaN:{}},normalize:t=>typeof t=="string"?{domain:t}:Nd(t,"numberAllowsNaN")&&t.domain!=="number"?J(zd.writeBadAllowNanMessage(t.domain)):t,applyConfig:(t,n)=>t.numberAllowsNaN===void 0&&t.domain==="number"&&n.numberAllowsNaN?{...t,numberAllowsNaN:!0}:t,defaults:{description:t=>Jn[t.domain],actual:t=>Number.isNaN(t)?"NaN":Jn[hn(t)]},intersections:{domain:(t,n)=>t.domain==="number"&&n.domain==="number"?t.numberAllowsNaN?n:t:W.init("domain",t,n)}});class nC extends Ld{constructor(){super(...arguments);w(this,"requiresNaNCheck",this.domain==="number"&&!this.numberAllowsNaN);w(this,"traverseAllows",this.requiresNaNCheck?i=>typeof i=="number"&&!Number.isNaN(i):i=>hn(i)===this.domain);w(this,"compiledCondition",this.domain==="object"?'((typeof data === "object" && data !== null) || typeof data === "function")':`typeof data === "${this.domain}"${this.requiresNaNCheck?" && !Number.isNaN(data)":""}`);w(this,"compiledNegation",this.domain==="object"?'((typeof data !== "object" || data === null) && typeof data !== "function")':`typeof data !== "${this.domain}"${this.requiresNaNCheck?" || Number.isNaN(data)":""}`);w(this,"expression",this.numberAllowsNaN?"number | NaN":this.domain)}get nestableExpression(){return this.numberAllowsNaN?`(${this.expression})`:this.expression}get defaultShortDescription(){return Jn[this.domain]}innerToJsonSchema(i){return this.domain==="bigint"||this.domain==="symbol"?i.fallback.domain({code:"domain",base:{},domain:this.domain}):{type:this.domain}}}const zd={implementation:tC,Node:nC,writeBadAllowNanMessage:t=>`numberAllowsNaN may only be specified with domain "number" (was ${t})`},iC=Fe({kind:"intersection",hasAssociatedError:!0,normalize:t=>{if(Et(t))return t;const{structure:n,...i}=t,a=!!n,l=n??{},u=_e(i,(f,d)=>Nn(f,I$)?(a&&J(`Flattened structure key ${f} cannot be specified alongside a root 'structure' key.`),l[f]=d,[]):[f,d]);return(le(l,"constraint")||!Ts(l))&&(u.structure=l),u},finalizeInnerJson:({structure:t,...n})=>er(t,"object")?{...t,...n}:n,keys:{domain:{child:!0,parse:(t,n)=>n.$.node("domain",t)},proto:{child:!0,parse:(t,n)=>n.$.node("proto",t)},structure:{child:!0,parse:(t,n)=>n.$.node("structure",t),serialize:t=>{var f;if(!((f=t.sequence)!=null&&f.minLength))return t.collapsibleJson;const{sequence:n,...i}=t.collapsibleJson,{minVariadicLength:a,...l}=n,u=l.variadic&&Object.keys(l).length===1?l.variadic:l;return{...i,sequence:u}}},divisor:{child:!0,parse:Lt("divisor")},max:{child:!0,parse:Lt("max")},min:{child:!0,parse:Lt("min")},maxLength:{child:!0,parse:Lt("maxLength")},minLength:{child:!0,parse:Lt("minLength")},exactLength:{child:!0,parse:Lt("exactLength")},before:{child:!0,parse:Lt("before")},after:{child:!0,parse:Lt("after")},pattern:{child:!0,parse:Lt("pattern")},predicate:{child:!0,parse:Lt("predicate")}},reduce:(t,n)=>Gy({},t,{$:n,invert:!1,pipe:!1}),defaults:{description:t=>{if(t.children.length===0)return"unknown";if(t.structure)return t.structure.description;const n=[];if(t.basis&&!t.refinements.some(i=>i.impl.obviatesBasisDescription)&&n.push(t.basis.description),t.refinements.length){const i=t.refinements.toSorted((a,l)=>a.kind==="min"&&l.kind==="max"?-1:0).map(a=>a.description);n.push(...i)}return t.inner.predicate&&n.push(...t.inner.predicate.map(i=>i.description)),n.join(" and ")},expected:t=>` ◦ ${t.errors.map(n=>n.expected).join(`
|
|
88
|
+
◦ `)}`,problem:t=>`(${t.actual}) must be...
|
|
89
|
+
${t.expected}`},intersections:{intersection:(t,n,i)=>Gy(t.inner,n.inner,i),...zs("intersection",(t,n,i)=>{var m;if(t.children.length===0)return n;const{domain:a,proto:l,...u}=t.inner,f=l??a,d=f?mt(f,n,i):n;return d instanceof W?d:(m=t==null?void 0:t.basis)!=null&&m.equals(d)?t:t.$.node("intersection",{...u,[d.kind]:d},{prereduced:!0})})}});class rC extends Ls{constructor(){super(...arguments);w(this,"basis",this.inner.domain??this.inner.proto??null);w(this,"refinements",this.children.filter(i=>i.isRefinement()));w(this,"structure",this.inner.structure);w(this,"expression",aC(this));w(this,"traverseAllows",(i,a)=>this.children.every(l=>l.traverseAllows(i,a)));w(this,"traverseApply",(i,a)=>{const l=a.currentErrorCount;if(!(this.basis&&(this.basis.traverseApply(i,a),a.currentErrorCount>l))){if(this.refinements.length){for(let u=0;u<this.refinements.length-1;u++)if(this.refinements[u].traverseApply(i,a),a.failFast&&a.currentErrorCount>l)return;if(this.refinements.at(-1).traverseApply(i,a),a.currentErrorCount>l)return}if(!(this.structure&&(this.structure.traverseApply(i,a),a.currentErrorCount>l))&&this.inner.predicate){for(let u=0;u<this.inner.predicate.length-1;u++)if(this.inner.predicate[u].traverseApply(i,a),a.failFast&&a.currentErrorCount>l)return;this.inner.predicate.at(-1).traverseApply(i,a)}}})}get shallowMorphs(){var i;return(i=this.inner.structure)!=null&&i.structuralMorph?[this.inner.structure.structuralMorph]:[]}get defaultShortDescription(){var i;return((i=this.basis)==null?void 0:i.defaultShortDescription)??"present"}innerToJsonSchema(i){return this.children.reduce((a,l)=>l.isBasis()?l.toJsonSchemaRecurse(i):l.reduceJsonSchema(a,i),{})}compile(i){if(i.traversalKind==="Allows"){for(const a of this.children)i.check(a);i.return(!0);return}if(i.initializeErrorCount(),this.basis&&(i.check(this.basis),this.children.length>1&&i.returnIfFail()),this.refinements.length){for(let a=0;a<this.refinements.length-1;a++)i.check(this.refinements[a]),i.returnIfFailFast();i.check(this.refinements.at(-1)),(this.structure||this.inner.predicate)&&i.returnIfFail()}if(this.structure&&(i.check(this.structure),this.inner.predicate&&i.returnIfFail()),this.inner.predicate){for(let a=0;a<this.inner.predicate.length-1;a++)i.check(this.inner.predicate[a]),i.returnIfFail();i.check(this.inner.predicate.at(-1))}}}const o0={implementation:iC,Node:rC},aC=t=>{var i;let n=((i=t.structure)==null?void 0:i.expression)||`${t.basis&&!t.refinements.some(a=>a.impl.obviatesBasisExpression)?t.basis.nestableExpression+" ":""}${t.refinements.map(a=>a.expression).join(" & ")}`||"unknown";return n==="Array == 0"&&(n="[]"),n},Gy=(t,n,i)=>{const a={},l=t.proto??t.domain,u=n.proto??n.domain,f=l?u?mt(l,u,i):l:u;return f instanceof W?f:(f&&(a[f.kind]=f),Ao({kind:"intersection",baseInner:a,l:$o(t),r:$o(n),roots:[],ctx:i}))},sC=Fe({kind:"morph",hasAssociatedError:!1,keys:{in:{child:!0,parse:(t,n)=>n.$.parseSchema(t)},morphs:{parse:Cs,serialize:t=>t.map(n=>le(n,"root")?n.json:$t(n))},declaredIn:{child:!1,serialize:t=>t.json},declaredOut:{child:!1,serialize:t=>t.json}},normalize:t=>t,defaults:{description:t=>{var n;return`a morph from ${t.in.description} to ${((n=t.out)==null?void 0:n.description)??"unknown"}`}},intersections:{morph:(t,n,i)=>{if(!t.hasEqualMorphs(n))return J(oC(t.expression,n.expression));const a=mt(t.in,n.in,i);if(a instanceof W)return a;const l={morphs:t.morphs};if(t.declaredIn||n.declaredIn){const u=mt(t.in,n.in,i);if(u instanceof W)return u.throw();l.declaredIn=u}if(t.declaredOut||n.declaredOut){const u=mt(t.out,n.out,i);if(u instanceof W)return u.throw();l.declaredOut=u}return a.distribute(u=>i.$.node("morph",{...l,in:u}),i.$.parseSchema)},...zs("morph",(t,n,i)=>{const a=t.inner.in?mt(t.inner.in,n,i):n;return a instanceof W?a:a.equals(t.inner.in)?t:i.$.node("morph",{...t.inner,in:a})})}});class lC extends Ls{constructor(){super(...arguments);w(this,"serializedMorphs",this.morphs.map($t));w(this,"compiledMorphs",`[${this.serializedMorphs}]`);w(this,"lastMorph",this.inner.morphs.at(-1));w(this,"lastMorphIfNode",le(this.lastMorph,"root")?this.lastMorph:void 0);w(this,"introspectableIn",this.inner.in);w(this,"introspectableOut",this.lastMorphIfNode?Object.assign(this.referencesById,this.lastMorphIfNode.referencesById)&&this.lastMorphIfNode.out:void 0);w(this,"expression",`(In: ${this.in.expression}) => ${this.lastMorphIfNode?"To":"Out"}<${this.out.expression}>`);w(this,"traverseAllows",(i,a)=>!this.introspectableIn||this.introspectableIn.traverseAllows(i,a));w(this,"traverseApply",(i,a)=>{this.introspectableIn&&this.introspectableIn.traverseApply(i,a),a.queueMorphs(this.morphs)})}get shallowMorphs(){var i;return Array.isArray((i=this.inner.in)==null?void 0:i.shallowMorphs)?[...this.inner.in.shallowMorphs,...this.morphs]:this.morphs}get in(){var i;return this.declaredIn??((i=this.inner.in)==null?void 0:i.in)??Z.intrinsic.unknown.internal}get out(){return this.declaredOut??this.introspectableOut??Z.intrinsic.unknown.internal}declareIn(i){return this.$.node("morph",{...this.inner,declaredIn:i})}declareOut(i){return this.$.node("morph",{...this.inner,declaredOut:i})}get defaultShortDescription(){return this.in.meta.description??this.in.defaultShortDescription}innerToJsonSchema(i){var a;return i.fallback.morph({code:"morph",base:this.in.toJsonSchemaRecurse(i),out:((a=this.introspectableOut)==null?void 0:a.toJsonSchemaRecurse(i))??null})}compile(i){if(i.traversalKind==="Allows"){if(!this.introspectableIn)return;i.return(i.invoke(this.introspectableIn));return}this.introspectableIn&&i.line(i.invoke(this.introspectableIn)),i.line(`ctx.queueMorphs(${this.compiledMorphs})`)}hasEqualMorphs(i){return Xr(this.morphs,i.morphs,{isEqual:(a,l)=>a===l||le(a,"root")&&le(l,"root")&&a.equals(l)})}}const u0={implementation:sC,Node:lC},oC=(t,n)=>`The intersection of distinct morphs at a single path is indeterminate:
|
|
90
|
+
Left: ${t}
|
|
91
|
+
Right: ${n}`,uC=Fe({kind:"proto",hasAssociatedError:!0,collapsibleKey:"proto",keys:{proto:{serialize:t=>Rd(t)??Xi(t)},dateAllowsInvalid:{}},normalize:t=>{const n=typeof t=="string"?{proto:Wr[t]}:typeof t=="function"?Et(t)?t:{proto:t}:typeof t.proto=="string"?{...t,proto:Wr[t.proto]}:t;return typeof n.proto!="function"&&J(To.writeInvalidSchemaMessage(n.proto)),Nd(n,"dateAllowsInvalid")&&n.proto!==Date&&J(To.writeBadInvalidDateMessage(n.proto)),n},applyConfig:(t,n)=>t.dateAllowsInvalid===void 0&&t.proto===Date&&n.dateAllowsInvalid?{...t,dateAllowsInvalid:!0}:t,defaults:{description:t=>t.builtinName?u$[t.builtinName]:`an instance of ${t.proto.name}`,actual:t=>t instanceof Date&&t.toString()==="Invalid Date"?"an invalid Date":Gf(t)},intersections:{proto:(t,n)=>t.proto===Date&&n.proto===Date?t.dateAllowsInvalid?n:t:jy(t.proto,n.proto)?t:jy(n.proto,t.proto)?n:W.init("proto",t,n),domain:(t,n)=>n.domain==="object"?t:W.init("domain",Z.intrinsic.object.internal,n)}});class cC extends Ld{constructor(){super(...arguments);w(this,"builtinName",Rd(this.proto));w(this,"serializedConstructor",this.json.proto);w(this,"requiresInvalidDateCheck",this.proto===Date&&!this.dateAllowsInvalid);w(this,"traverseAllows",this.requiresInvalidDateCheck?i=>i instanceof Date&&i.toString()!=="Invalid Date":i=>i instanceof this.proto);w(this,"compiledCondition",`data instanceof ${this.serializedConstructor}${this.requiresInvalidDateCheck?' && data.toString() !== "Invalid Date"':""}`);w(this,"compiledNegation",`!(${this.compiledCondition})`);w(this,"expression",this.dateAllowsInvalid?"Date | InvalidDate":this.proto.name);w(this,"domain","object")}innerToJsonSchema(i){var a,l;switch(this.builtinName){case"Array":return{type:"array"};case"Date":return((l=(a=i.fallback).date)==null?void 0:l.call(a,{code:"date",base:{}}))??i.fallback.proto({code:"proto",base:{},proto:this.proto});default:return i.fallback.proto({code:"proto",base:{},proto:this.proto})}}get nestableExpression(){return this.dateAllowsInvalid?`(${this.expression})`:this.expression}get defaultShortDescription(){return this.description}}const To={implementation:uC,Node:cC,writeBadInvalidDateMessage:t=>`dateAllowsInvalid may only be specified with constructor Date (was ${t.name})`,writeInvalidSchemaMessage:t=>`instanceOf operand must be a function (was ${hn(t)})`},fC=Fe({kind:"union",hasAssociatedError:!0,collapsibleKey:"branches",keys:{ordered:{},branches:{child:!0,parse:(t,n)=>{const i=[];for(const a of t){const l=le(a,"root")?a.branches:n.$.parseSchema(a).branches;for(const u of l)if(u.hasKind("morph")){const f=i.findIndex(d=>d.hasKind("morph")&&d.hasEqualMorphs(u));if(f===-1)i.push(u);else{const d=i[f];i[f]=n.$.node("morph",{...d.inner,in:d.in.rawOr(u.in)})}}else i.push(u)}return n.def.ordered||i.sort((a,l)=>a.hash<l.hash?-1:1),i}}},normalize:t=>kt(t)?{branches:t}:t,reduce:(t,n)=>{const i=wC(t);if(i.length===1)return i[0];if(i.length!==t.branches.length)return n.node("union",{...t,branches:i},{prereduced:!0})},defaults:{description:t=>t.distribute(n=>n.description,Qr),expected:t=>{const n=ZA(t.errors,"propString"),i=Object.entries(n).map(([a,l])=>{const u=[];for(const m of l)Fi(u,m.expected);const f=Qr(u),d=l.every(m=>m.actual===l[0].actual)?l[0].actual:ze(l[0].data);return`${a&&`${a} `}must be ${f}${d&&` (was ${d})`}`});return Qr(i)},problem:t=>t.expected,message:t=>t.problem},intersections:{union:(t,n,i)=>{if(t.isNever!==n.isNever)return W.init("presence",t,n);let a;return t.ordered?(n.ordered&&J(kC(t.expression,n.expression)),a=Ef(n.branches,t.branches,i),a instanceof W&&a.invert()):a=Ef(t.branches,n.branches,i),a instanceof W?a:i.$.parseSchema(t.ordered||n.ordered?{branches:a,ordered:!0}:{branches:a})},...zs("union",(t,n,i)=>{const a=Ef(t.branches,[n],i);return a instanceof W?a:a.length===1?a[0]:i.$.parseSchema(t.ordered?{branches:a,ordered:!0}:{branches:a})})}});class dC extends Ls{constructor(){super(...arguments);w(this,"isBoolean",this.branches.length===2&&this.branches[0].hasUnit(!1)&&this.branches[1].hasUnit(!0));w(this,"unitBranches",this.branches.filter(i=>i.in.hasKind("unit")));w(this,"discriminant",this.discriminate());w(this,"discriminantJson",this.discriminant?bC(this.discriminant):null);w(this,"expression",this.distribute(i=>i.nestableExpression,SC));w(this,"traverseAllows",(i,a)=>this.branches.some(l=>l.traverseAllows(i,a)));w(this,"traverseApply",(i,a)=>{const l=[];for(let u=0;u<this.branches.length;u++){if(a.pushBranch(),this.branches[u].traverseApply(i,a),!a.hasError())return this.branches[u].includesTransform?a.queuedMorphs.push(...a.popBranch().queuedMorphs):a.popBranch();l.push(a.popBranch().error)}a.errorFromNodeContext({code:"union",errors:l,meta:this.meta})});w(this,"traverseOptimistic",i=>{for(let a=0;a<this.branches.length;a++){const l=this.branches[a];if(l.traverseAllows(i))return l.contextFreeMorph?l.contextFreeMorph(i):i}return qn})}get branchGroups(){const i=[];let a=-1;for(const l of this.branches){if(l.hasKind("unit")&&l.domain==="boolean"){a===-1?(a=i.length,i.push(l)):i[a]=Z.intrinsic.boolean;continue}i.push(l)}return i}createBranchedOptimisticRootApply(){return(i,a)=>{const l=this.traverseOptimistic(i);if(l!==qn)return l;const u=new Ir(i,this.$.resolvedConfig);return this.traverseApply(i,u),u.finalize(a)}}get shallowMorphs(){return this.branches.reduce((i,a)=>Fi(i,a.shallowMorphs),[])}get defaultShortDescription(){return this.distribute(i=>i.defaultShortDescription,Qr)}innerToJsonSchema(i){if(this.branchGroups.length===1&&this.branchGroups[0].equals(Z.intrinsic.boolean))return{type:"boolean"};const a=this.branchGroups.map(l=>l.toJsonSchemaRecurse(i));return a.every(l=>Object.keys(l).length===1&&Nd(l,"const"))?{enum:a.map(l=>l.const)}:{anyOf:a}}compile(i){if(!this.discriminant||this.unitBranches.length===this.branches.length&&this.branches.length===2)return this.compileIndiscriminable(i);let a=this.discriminant.optionallyChainedPropString;this.discriminant.kind==="domain"&&(a=`typeof ${a} === "object" ? ${a} === null ? "null" : "object" : typeof ${a} === "function" ? "object" : typeof ${a}`);const l=this.discriminant.cases,u=Object.keys(l),{optimistic:f}=i;if(i.optimistic=!1,i.block(`switch(${a})`,()=>{for(const v in l){const b=l[v],R=v==="default"?v:`case ${v}`;i.line(`${R}: return ${b===!0?f?i.data:b:f?`${i.invoke(b)} ? ${b.contextFreeMorph?`${$t(b.contextFreeMorph)}(${i.data})`:i.data} : "${qn}"`:i.invoke(b)}`)}return i}),i.traversalKind==="Allows"){i.return(f?`"${qn}"`:!1);return}const d=Qr(this.discriminant.kind==="domain"?u.map(v=>{const b=v.slice(1,-1);return b==="function"?Jn.object:Jn[b]}):u),m=this.discriminant.path.map(v=>typeof v=="symbol"?$t(v):JSON.stringify(v)),p=JSON.stringify(d),g=this.discriminant.kind==="domain"?`${yC}[${a}]`:`${vC}(${a})`;i.line(`ctx.errorFromNodeContext({
|
|
92
|
+
code: "predicate",
|
|
93
|
+
expected: ${p},
|
|
94
|
+
actual: ${g},
|
|
95
|
+
relativePath: [${m}],
|
|
96
|
+
meta: ${this.compiledMeta}
|
|
97
|
+
})`)}compileIndiscriminable(i){if(i.traversalKind==="Apply"){i.const("errors","[]");for(const a of this.branches)i.line("ctx.pushBranch()").line(i.invoke(a)).if("!ctx.hasError()",()=>i.return(a.includesTransform?"ctx.queuedMorphs.push(...ctx.popBranch().queuedMorphs)":"ctx.popBranch()")).line("errors.push(ctx.popBranch().error)");i.line(`ctx.errorFromNodeContext({ code: "union", errors, meta: ${this.compiledMeta} })`)}else{const{optimistic:a}=i;i.optimistic=!1;for(const l of this.branches)i.if(`${i.invoke(l)}`,()=>i.return(a?l.contextFreeMorph?`${$t(l.contextFreeMorph)}(${i.data})`:i.data:!0));i.return(a?`"${qn}"`:!1)}}get nestableExpression(){return this.isBoolean?"boolean":`(${this.expression})`}discriminate(){var f,d;if(this.branches.length<2||this.isCyclic)return null;if(this.unitBranches.length===this.branches.length){const m=_e(this.unitBranches,(p,g)=>[`${g.in.serializedValue}`,g.hasKind("morph")?g:!0]);return{kind:"unit",path:[],optionallyChainedPropString:"data",cases:m}}const i=[];for(let m=0;m<this.branches.length-1;m++){const p=this.branches[m];for(let g=m+1;g<this.branches.length;g++){const v=this.branches[g],b=Zn(p.in,v.in,p.$);if(b instanceof W)for(const R of b){if(!R.kind||R.optional)continue;let N,O;if(R.kind==="domain"){const z=R.l,L=R.r;N=`"${typeof z=="string"?z:z.domain}"`,O=`"${typeof L=="string"?L:L.domain}"`}else if(R.kind==="unit")N=R.l.serializedValue,O=R.r.serializedValue;else continue;const U=i.find(z=>Xr(z.path,R.path)&&z.kind===R.kind);U?(U.cases[N]?U.cases[N].branchIndices=Fi(U.cases[N].branchIndices,m):(f=U.cases)[N]??(f[N]={branchIndices:[m],condition:R.l}),U.cases[O]?U.cases[O].branchIndices=Fi(U.cases[O].branchIndices,g):(d=U.cases)[O]??(d[O]={branchIndices:[g],condition:R.r})):i.push({kind:R.kind,cases:{[N]:{branchIndices:[m],condition:R.l},[O]:{branchIndices:[g],condition:R.r}},path:R.path})}}}const a=this.ordered?mC(i,this.branches):i;if(!a.length)return null;const l=hC(a,this),u={};for(const m in l.best.cases){const p=pC(l,m);if(p===null){u[m]=!0;continue}if(p.length===this.branches.length)return null;this.ordered&&p.sort((b,R)=>b.originalIndex-R.originalIndex);const g=p.map(b=>b.branch),v=g.length===1?g[0]:this.$.node("union",this.ordered?{branches:g,ordered:!0}:g);Object.assign(this.referencesById,v.referencesById),u[m]=v}if(l.defaultEntries.length){const m=l.defaultEntries.map(p=>p.branch);u.default=this.$.node("union",this.ordered?{branches:m,ordered:!0}:m,{prereduced:!0}),Object.assign(this.referencesById,u.default.referencesById)}return Object.assign(l.location,{cases:u})}}const hC=(t,n)=>{const i=t.sort((u,f)=>Object.keys(f.cases).length-Object.keys(u.cases).length)[0],a={kind:i.kind,path:i.path,optionallyChainedPropString:c0(i.path)},l=n.branches.map((u,f)=>({originalIndex:f,branch:u}));return{best:i,location:a,defaultEntries:l,node:n}},pC=(t,n)=>{const i=t.best.cases[n],a=gC(i.condition,t.location.path,t.node.$);let l=[];const u=[];for(let f=0;f<t.defaultEntries.length;f++){const d=t.defaultEntries[f];if(i.branchIndices.includes(d.originalIndex)){const m=Jy(t.node.branches[d.originalIndex],t.location);m===null?l=null:l==null||l.push({originalIndex:d.originalIndex,branch:m})}else if(d.branch.hasKind("alias")&&a.hasKind("domain")&&a.domain==="object")l==null||l.push(d);else{if(d.branch.in.overlaps(a)){const m=Jy(d.branch,t.location);l==null||l.push({originalIndex:d.originalIndex,branch:m})}u.push(d)}}return t.defaultEntries=u,l},mC=(t,n)=>t.filter(a=>{const l=Object.values(a.cases).map(u=>u.branchIndices);for(let u=0;u<l.length-1;u++){const f=l[u];for(let d=u+1;d<l.length;d++){const m=l[d];for(const p of f)for(const g of m)if(p>g&&n[p].overlaps(n[g]))return!1}}return!0}),gC=(t,n,i)=>{let a=t==="undefined"?i.node("unit",{unit:void 0}):t==="null"?i.node("unit",{unit:null}):t==="boolean"?i.units([!0,!1]):t;for(let l=n.length-1;l>=0;l--){const u=n[l];a=i.node("intersection",typeof u=="number"?{proto:"Array",sequence:[...YA(u).map(f=>({})),a]}:{domain:"object",required:[{key:u,value:a}]})}return a},c0=t=>t.reduce((n,i)=>n+jb(i,!0),"data"),yC=$t(QA),vC=$t(ze),f0={implementation:fC,Node:dC},bC=t=>({kind:t.kind,path:t.path.map(n=>typeof n=="string"?n:Ms(n)),cases:_e(t.cases,(n,i)=>[n,i===!0?i:i.hasKind("union")&&i.discriminantJson?i.discriminantJson:i.json])}),xC={delimiter:" | ",finalDelimiter:" | "},SC=t=>Qr(t,xC),Qr=(t,n)=>{const i=(n==null?void 0:n.delimiter)??", ",a=(n==null?void 0:n.finalDelimiter)??" or ";if(t.length===0)return"never";if(t.length===1)return t[0];if(t.length===2&&t[0]==="false"&&t[1]==="true"||t[0]==="true"&&t[1]==="false")return"boolean";const l={},u=t.filter(d=>l[d]?!1:l[d]=!0),f=u.pop();return`${u.join(i)}${u.length?a:""}${f}`},Ef=(t,n,i)=>{const a=n.map(()=>[]);for(let u=0;u<t.length;u++){let f={};for(let d=0;d<n.length;d++){if(a[d]===null)continue;if(t[u].equals(n[d])){a[d]=null,f={};break}const m=mt(t[u],n[d],i);if(!(m instanceof W)){if(m.equals(t[u])){a[d].push(t[u]),f={};break}m.equals(n[d])?a[d]=null:f[d]=m}}for(const d in f)a[d][u]=f[d]}const l=a.flatMap((u,f)=>(u==null?void 0:u.flatMap(d=>d.branches))??n[f]);return l.length===0?W.init("union",t,n):l},wC=({branches:t,ordered:n})=>{if(t.length<2)return t;const i=t.map(()=>!0);for(let a=0;a<t.length;a++)for(let l=a+1;l<t.length&&i[a]&&i[l];l++){if(t[a].equals(t[l])){i[l]=!1;continue}const u=Zn(t[a].in,t[l].in,t[0].$);u instanceof W||(n||NC(t[a],t[l]),u.equals(t[a].in)?i[a]=!!n:u.equals(t[l].in)&&(i[l]=!1))}return t.filter((a,l)=>i[l])},NC=(t,n)=>{!t.includesTransform&&!n.includesTransform||(Xr(t.shallowMorphs,n.shallowMorphs)||J(Yy(t.expression,n.expression)),Xr(t.flatMorphs,n.flatMorphs,{isEqual:(i,a)=>{var l,u;return i.propString===a.propString&&(i.node.hasKind("morph")&&a.node.hasKind("morph")?i.node.hasEqualMorphs(a.node):i.node.hasKind("intersection")&&a.node.hasKind("intersection")?((l=i.node.structure)==null?void 0:l.structuralMorphRef)===((u=a.node.structure)==null?void 0:u.structuralMorphRef):!1)}})||J(Yy(t.expression,n.expression)))},Jy=(t,n)=>t.transform((i,a)=>i==="domain"||i==="unit"?null:a,{shouldTransform:(i,a)=>{const l=c0(a.path);return n.optionallyChainedPropString.startsWith(l)?i.hasKind("domain")&&i.domain==="object"||(i.hasKind("domain")||n.kind==="unit")&&l===n.optionallyChainedPropString?!0:i.children.length!==0&&i.kind!=="index":!1}}),Yy=(t,n)=>`An unordered union of a type including a morph and a type with overlapping input is indeterminate:
|
|
98
|
+
Left: ${t}
|
|
99
|
+
Right: ${n}`,kC=(t,n)=>`The intersection of two ordered unions is indeterminate:
|
|
100
|
+
Left: ${t}
|
|
101
|
+
Right: ${n}`,RC=Fe({kind:"unit",hasAssociatedError:!0,keys:{unit:{preserveUndefined:!0,serialize:t=>t instanceof Date?t.toISOString():Xi(t)}},normalize:t=>t,defaults:{description:t=>ze(t.unit),problem:({expected:t,actual:n})=>`${t===n?`must be reference equal to ${t} (serialized to the same value)`:`must be ${t} (was ${n})`}`},intersections:{unit:(t,n)=>W.init("unit",t,n),...zs("unit",(t,n)=>{if(n.allows(t.unit))return t;const i=n.hasKind("intersection")?n.basis:n;if(i){const a=i.hasKind("domain")?i:Z.intrinsic.object;if(t.domain!==a.domain){const l=t.domain==="undefined"||t.domain==="null"||t.domain==="boolean"?t.domain:Z.intrinsic[t.domain];return W.init("domain",l,a)}}return W.init("assignability",t,n.hasKind("intersection")?n.children.find(a=>!a.allows(t.unit)):n)})}});class EC extends Ld{constructor(){super(...arguments);w(this,"compiledValue",this.json.unit);w(this,"serializedValue",typeof this.unit=="string"||this.unit instanceof Date?JSON.stringify(this.compiledValue):`${this.compiledValue}`);w(this,"compiledCondition",Iy(this.unit,this.serializedValue));w(this,"compiledNegation",Iy(this.unit,this.serializedValue,"negated"));w(this,"expression",ze(this.unit));w(this,"domain",hn(this.unit));w(this,"traverseAllows",this.unit instanceof Date?i=>i instanceof Date&&i.toISOString()===this.compiledValue:Number.isNaN(this.unit)?i=>Number.isNaN(i):i=>i===this.unit)}get defaultShortDescription(){return this.domain==="object"?Jn.object:this.description}innerToJsonSchema(i){return this.unit===null?{type:"null"}:Z.intrinsic.jsonPrimitive.allows(this.unit)?{const:this.unit}:i.fallback.unit({code:"unit",base:{},unit:this.unit})}}const d0={implementation:RC,Node:EC},Iy=(t,n,i)=>{if(t instanceof Date){const a=`data instanceof Date && data.toISOString() === ${n}`;return i?`!(${a})`:a}return Number.isNaN(t)?`${i?"!":""}Number.isNaN(data)`:`data ${i?"!":"="}== ${n}`},AC=Fe({kind:"index",hasAssociatedError:!1,intersectionIsOpen:!0,keys:{signature:{child:!0,parse:(t,n)=>{const i=n.$.parseSchema(t);if(!i.extends(Z.intrinsic.key))return J(TC(i.expression));const a=i.branches.filter(l=>l.hasKind("unit"));return a.length?J(CC(a.map(l=>ze(l.unit)))):i}},value:{child:!0,parse:(t,n)=>n.$.parseSchema(t)}},normalize:t=>t,defaults:{description:t=>`[${t.signature.expression}]: ${t.value.description}`},intersections:{index:(t,n,i)=>{if(t.signature.equals(n.signature)){const a=mt(t.value,n.value,i),l=a instanceof W?Z.intrinsic.never.internal:a;return i.$.node("index",{signature:t.signature,value:l})}return t.signature.extends(n.signature)&&t.value.subsumes(n.value)?n:n.signature.extends(t.signature)&&n.value.subsumes(t.value)?t:null}}});class $C extends la{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.object.internal);w(this,"expression",`[${this.signature.expression}]: ${this.value.expression}`);w(this,"flatRefs",Be(this.value.flatRefs.map(i=>Ni([this.signature,...i.path],i.node)),Ni([this.signature],this.value)));w(this,"traverseAllows",(i,a)=>No(i).every(l=>this.signature.traverseAllows(l[0],a)?In(l[0],()=>this.value.traverseAllows(l[1],a),a):!0));w(this,"traverseApply",(i,a)=>{for(const l of No(i))this.signature.traverseAllows(l[0],a)&&In(l[0],()=>this.value.traverseApply(l[1],a),a)})}_transform(i,a){a.path.push(this.signature);const l=super._transform(i,a);return a.path.pop(),l}compile(){}}const h0={implementation:AC,Node:$C},CC=t=>`Index keys ${t.join(", ")} should be specified as named props.`,TC=t=>`Indexed key definition '${t}' must be a string or symbol`,OC=Fe({kind:"required",hasAssociatedError:!0,intersectionIsOpen:!0,keys:{key:{},value:{child:!0,parse:(t,n)=>n.$.parseSchema(t)}},normalize:t=>t,defaults:{description:t=>`${t.compiledKey}: ${t.value.description}`,expected:t=>t.missingValueDescription,actual:()=>"missing"},intersections:{required:ed,optional:ed}});class jC extends a0{constructor(){super(...arguments);w(this,"expression",`${this.compiledKey}: ${this.value.expression}`);w(this,"errorContext",Object.freeze({code:"required",missingValueDescription:this.value.defaultShortDescription,relativePath:[this.key],meta:this.meta}));w(this,"compiledErrorContext",Ho(this.errorContext))}}const p0={implementation:OC,Node:jC},DC=Fe({kind:"sequence",hasAssociatedError:!1,collapsibleKey:"variadic",keys:{prefix:{child:!0,parse:(t,n)=>{if(t.length!==0)return t.map(i=>n.$.parseSchema(i))}},optionals:{child:!0,parse:(t,n)=>{if(t.length!==0)return t.map(i=>n.$.parseSchema(i))}},defaultables:{child:t=>t.map(n=>n[0]),parse:(t,n)=>{if(t.length!==0)return t.map(i=>{const a=n.$.parseSchema(i[0]);return Dd(a,i[1],null),[a,i[1]]})},serialize:t=>t.map(n=>[n[0].collapsibleJson,Xi(n[1])])},variadic:{child:!0,parse:(t,n)=>n.$.parseSchema(t,n)},minVariadicLength:{parse:t=>t===0?void 0:t},postfix:{child:!0,parse:(t,n)=>{if(t.length!==0)return t.map(i=>n.$.parseSchema(i))}}},normalize:t=>{var n,i,a;if(typeof t=="string")return{variadic:t};if("variadic"in t||"prefix"in t||"defaultables"in t||"optionals"in t||"postfix"in t||"minVariadicLength"in t){if((n=t.postfix)!=null&&n.length){if(!t.variadic)return J(UC);if((i=t.optionals)!=null&&i.length||(a=t.defaultables)!=null&&a.length)return J(g0)}return t.minVariadicLength&&!t.variadic?J("minVariadicLength may not be specified without a variadic element"):t}return{variadic:t}},reduce:(t,n)=>{var d,m,p,g,v,b,R;let i=t.minVariadicLength??0;const a=((d=t.prefix)==null?void 0:d.slice())??[],l=((m=t.defaultables)==null?void 0:m.slice())??[],u=((p=t.optionals)==null?void 0:p.slice())??[],f=((g=t.postfix)==null?void 0:g.slice())??[];if(t.variadic){for(;(v=u.at(-1))!=null&&v.equals(t.variadic);)u.pop();if(u.length===0&&l.length===0)for(;(b=a.at(-1))!=null&&b.equals(t.variadic);)a.pop(),i++;for(;(R=f[0])!=null&&R.equals(t.variadic);)f.shift(),i++}else u.length===0&&l.length===0&&a.push(...f.splice(0));if(i!==t.minVariadicLength||t.prefix&&t.prefix.length!==a.length)return n.node("sequence",{...t,prefix:a,defaultables:l,optionals:u,postfix:f,minVariadicLength:i},{prereduced:!0})},defaults:{description:t=>t.isVariadicOnly?`${t.variadic.nestableExpression}[]`:`[${t.tuple.map(i=>i.kind==="defaultables"?`${i.node.nestableExpression} = ${ze(i.default)}`:i.kind==="optionals"?`${i.node.nestableExpression}?`:i.kind==="variadic"?`...${i.node.nestableExpression}[]`:i.node.expression).join(", ")}]`},intersections:{sequence:(t,n,i)=>{const a=ms({l:t.tuple,r:n.tuple,disjoint:new W,result:[],fixedVariants:[],ctx:i}),l=a.disjoint.length===0?[a,...a.fixedVariants]:a.fixedVariants;return l.length===0?a.disjoint:l.length===1?i.$.node("sequence",Zy(l[0].result)):i.$.node("union",l.map(u=>({proto:Array,sequence:Zy(u.result)})))}}});var Vv,Hv,Gv,Jv;class MC extends la{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.Array.internal);w(this,"tuple",zC(this.inner));w(this,"prefixLength",((Vv=this.prefix)==null?void 0:Vv.length)??0);w(this,"defaultablesLength",((Hv=this.defaultables)==null?void 0:Hv.length)??0);w(this,"optionalsLength",((Gv=this.optionals)==null?void 0:Gv.length)??0);w(this,"postfixLength",((Jv=this.postfix)==null?void 0:Jv.length)??0);w(this,"defaultablesAndOptionals",[]);w(this,"prevariadic",this.tuple.filter(i=>i.kind==="defaultables"||i.kind==="optionals"?(this.defaultablesAndOptionals.push(i.node),!0):i.kind==="prefix"));w(this,"variadicOrPostfix",Zi(this.variadic&&[this.variadic],this.postfix));w(this,"flatRefs",this.addFlatRefs());w(this,"isVariadicOnly",this.prevariadic.length+this.postfixLength===0);w(this,"minVariadicLength",this.inner.minVariadicLength??0);w(this,"minLength",this.prefixLength+this.minVariadicLength+this.postfixLength);w(this,"minLengthNode",this.minLength===0?null:this.$.node("minLength",this.minLength));w(this,"maxLength",this.variadic?null:this.tuple.length);w(this,"maxLengthNode",this.maxLength===null?null:this.$.node("maxLength",this.maxLength));w(this,"impliedSiblings",this.minLengthNode?this.maxLengthNode?[this.minLengthNode,this.maxLengthNode]:[this.minLengthNode]:this.maxLengthNode?[this.maxLengthNode]:[]);w(this,"defaultValueMorphs",LC(this));w(this,"defaultValueMorphsReference",this.defaultValueMorphs.length?$t(this.defaultValueMorphs):void 0);w(this,"traverseAllows",(i,a)=>{for(let l=0;l<i.length;l++)if(!this.elementAtIndex(i,l).node.traverseAllows(i[l],a))return!1;return!0});w(this,"traverseApply",(i,a)=>{let l=0;for(;l<i.length;l++)In(l,()=>this.elementAtIndex(i,l).node.traverseApply(i[l],a),a)});w(this,"expression",this.description)}addFlatRefs(){return Uy(this.flatRefs,this.prevariadic.flatMap((i,a)=>Be(i.node.flatRefs.map(l=>Ni([`${a}`,...l.path],l.node)),Ni([`${a}`],i.node)))),Uy(this.flatRefs,this.variadicOrPostfix.flatMap(i=>Be(i.flatRefs.map(a=>Ni([Z.intrinsic.nonNegativeIntegerString.internal,...a.path],a.node)),Ni([Z.intrinsic.nonNegativeIntegerString.internal],i)))),this.flatRefs}elementAtIndex(i,a){if(a<this.prevariadic.length)return this.tuple[a];const l=i.length-this.postfixLength;return a>=l?{kind:"postfix",node:this.postfix[a-l]}:{kind:"variadic",node:this.variadic??nt(`Unexpected attempt to access index ${a} on ${this}`)}}get element(){return this.cacheGetter("element",this.$.node("union",this.children))}compile(i){if(this.prefix)for(const[a,l]of this.prefix.entries())i.traverseKey(`${a}`,`data[${a}]`,l);for(const[a,l]of this.defaultablesAndOptionals.entries()){const u=`${a+this.prefixLength}`;i.if(`${u} >= ${i.data}.length`,()=>i.traversalKind==="Allows"?i.return(!0):i.return()),i.traverseKey(u,`data[${u}]`,l)}if(this.variadic&&(this.postfix&&i.const("firstPostfixIndex",`${i.data}.length${this.postfix?`- ${this.postfix.length}`:""}`),i.for(`i < ${this.postfix?"firstPostfixIndex":"data.length"}`,()=>i.traverseKey("i","data[i]",this.variadic),this.prevariadic.length),this.postfix))for(const[a,l]of this.postfix.entries()){const u=`firstPostfixIndex + ${a}`;i.traverseKey(u,`data[${u}]`,l)}i.traversalKind==="Allows"&&i.return(!0)}_transform(i,a){a.path.push(Z.intrinsic.nonNegativeIntegerString.internal);const l=super._transform(i,a);return a.path.pop(),l}reduceJsonSchema(i,a){if(this.prevariadic.length&&(i.prefixItems=this.prevariadic.map(l=>{const u=l.node.toJsonSchemaRecurse(a);if(l.kind==="defaultables"){const f=typeof l.default=="function"?l.default():l.default;u.default=Z.intrinsic.jsonData.allows(f)?f:a.fallback.defaultValue({code:"defaultValue",base:u,value:f})}return u})),this.minLength&&(i.minItems=this.minLength),this.variadic){const l=Object.assign(i,{items:this.variadic.toJsonSchemaRecurse(a)});if(this.maxLength&&(l.maxItems=this.maxLength),this.postfix){const u=this.postfix.map(f=>f.toJsonSchemaRecurse(a));i=a.fallback.arrayPostfix({code:"arrayPostfix",base:l,elements:u})}}else i.items=!1,delete i.maxItems;return i}}const Af={},LC=t=>{if(!t.defaultables)return[];const n=[];let i="[";const a=t.prefixLength+t.defaultablesLength-1;for(let l=t.prefixLength;l<=a;l++){const[u,f]=t.defaultables[l-t.prefixLength];n.push(l0(l,u,f)),i+=`${l}: ${u.id} = ${Xi(f)}, `}return i+="]",Af[i]??(Af[i]=n)},m0={implementation:DC,Node:MC},zC=t=>{const n=[];if(t.prefix)for(const i of t.prefix)n.push({kind:"prefix",node:i});if(t.defaultables)for(const[i,a]of t.defaultables)n.push({kind:"defaultables",node:i,default:a});if(t.optionals)for(const i of t.optionals)n.push({kind:"optionals",node:i});if(t.variadic&&n.push({kind:"variadic",node:t.variadic}),t.postfix)for(const i of t.postfix)n.push({kind:"postfix",node:i});return n},Zy=t=>t.reduce((n,i)=>(i.kind==="variadic"?n.variadic=i.node:i.kind==="defaultables"?n.defaultables=Be(n.defaultables,[[i.node,i.default]]):n[i.kind]=Be(n[i.kind],i.node),n),{}),g0="A postfix required element cannot follow an optional or defaultable element",UC="A postfix element requires a variadic element",ms=t=>{var v,b;const[n,...i]=t.l,[a,...l]=t.r;if(!n||!a)return t;const u=((v=i.at(-1))==null?void 0:v.kind)==="postfix",f=((b=l.at(-1))==null?void 0:b.kind)==="postfix",d=n.kind==="prefix"||a.kind==="prefix"?"prefix":n.kind==="postfix"||a.kind==="postfix"?"postfix":n.kind==="variadic"&&a.kind==="variadic"?"variadic":u||f?"prefix":n.kind==="defaultables"||a.kind==="defaultables"?"defaultables":"optionals";if(n.kind==="prefix"&&a.kind==="variadic"&&f){const R=ms({...t,fixedVariants:[],r:l.map(N=>({...N,kind:"prefix"}))});R.disjoint.length===0&&t.fixedVariants.push(R)}else if(a.kind==="prefix"&&n.kind==="variadic"&&u){const R=ms({...t,fixedVariants:[],l:i.map(N=>({...N,kind:"prefix"}))});R.disjoint.length===0&&t.fixedVariants.push(R)}const m=mt(n.node,a.node,t.ctx);if(m instanceof W)if(d==="prefix"||d==="postfix")t.disjoint.push(...m.withPrefixKey(d==="prefix"?t.result.length:`-${i.length+1}`,"required")),t.result=[...t.result,{kind:d,node:Z.intrinsic.never.internal}];else return d==="optionals"||d==="defaultables"?t:ms({...t,fixedVariants:[],l:i.map(R=>({...R,kind:"prefix"})),r:i.map(R=>({...R,kind:"prefix"}))});else d==="defaultables"?(n.kind==="defaultables"&&a.kind==="defaultables"&&n.default!==a.default&&J(s0(n.default,a.default)),t.result=[...t.result,{kind:d,node:m,default:n.kind==="defaultables"?n.default:a.kind==="defaultables"?a.default:nt(`Unexpected defaultable intersection from ${n.kind} and ${a.kind} elements.`)}]):t.result=[...t.result,{kind:d,node:m}];const p=t.l.length,g=t.r.length;return(n.kind!=="variadic"||p>=g&&(a.kind==="variadic"||g===1))&&(t.l=i),(a.kind!=="variadic"||g>=p&&(n.kind==="variadic"||p===1))&&(t.r=l),ms(t)},y0=t=>n=>{var i,a;if(n.props.length||n.index){const l=((i=n.index)==null?void 0:i.map(f=>f[t]))??[];for(const f of n.props)l.push(f[t]);n.undeclared&&l.push(`+ (undeclared): ${n.undeclared}`);const u=`{ ${l.join(", ")} }`;return n.sequence?`${u} & ${n.sequence.description}`:u}return((a=n.sequence)==null?void 0:a.description)??"{}"},BC=y0("description"),_C=y0("expression"),Qy=(t,n,i)=>{const a=t.required?"required":"optional";if(!n.signature.allows(t.key))return null;const l=Zn(t.value,n.value,i);return l instanceof W?a==="optional"?i.node("optional",{key:t.key,value:Z.intrinsic.never.internal}):l.withPrefixKey(t.key,t.kind):null},qC=Fe({kind:"structure",hasAssociatedError:!1,normalize:t=>t,applyConfig:(t,n)=>!t.undeclared&&n.onUndeclaredKey!=="ignore"?{...t,undeclared:n.onUndeclaredKey}:t,keys:{required:{child:!0,parse:Lt("required"),reduceIo:(t,n,i)=>{n.required=Be(n.required,i.map(a=>a[t]))}},optional:{child:!0,parse:Lt("optional"),reduceIo:(t,n,i)=>{if(t==="in"){n.optional=i.map(a=>a.in);return}for(const a of i)n[a.outProp.kind]=Be(n[a.outProp.kind],a.outProp.out)}},index:{child:!0,parse:Lt("index")},sequence:{child:!0,parse:Lt("sequence")},undeclared:{parse:t=>t==="ignore"?void 0:t,reduceIo:(t,n,i)=>{i==="delete"&&(t==="in"?delete n.undeclared:n.undeclared="reject")}}},defaults:{description:BC},intersections:{structure:(t,n,i)=>{const a={...t.inner},l={...n.inner},u=new W;if(t.undeclared){const m=t.keyof();for(const p of n.requiredKeys)m.allows(p)||u.add("presence",Z.intrinsic.never.internal,n.propsByKey[p].value,{path:[p]});l.optional&&(l.optional=l.optional.filter(p=>m.allows(p.key))),l.index&&(l.index=l.index.flatMap(p=>{if(p.signature.extends(m))return p;const g=Zn(m,p.signature,i.$);if(g instanceof W)return[];const v=td(g,p.value,i.$);return v.required&&(l.required=Zi(l.required,v.required)),v.optional&&(l.optional=Zi(l.optional,v.optional)),v.index??[]}))}if(n.undeclared){const m=n.keyof();for(const p of t.requiredKeys)m.allows(p)||u.add("presence",t.propsByKey[p].value,Z.intrinsic.never.internal,{path:[p]});a.optional&&(a.optional=a.optional.filter(p=>m.allows(p.key))),a.index&&(a.index=a.index.flatMap(p=>{if(p.signature.extends(m))return p;const g=Zn(m,p.signature,i.$);if(g instanceof W)return[];const v=td(g,p.value,i.$);return v.required&&(a.required=Zi(a.required,v.required)),v.optional&&(a.optional=Zi(a.optional,v.optional)),v.index??[]}))}const f={};(t.undeclared||n.undeclared)&&(f.undeclared=t.undeclared==="reject"||n.undeclared==="reject"?"reject":"delete");const d=Ao({kind:"structure",baseInner:f,l:$o(a),r:$o(l),roots:[],ctx:i});return d instanceof W&&u.push(...d),u.length?u:d}},reduce:(t,n)=>{if(t.index){if(!(t.required||t.optional))return;let i=!1;const a=t.required??[],l=t.optional??[],u=[...l];for(const f of t.index){for(const d of a){const m=Qy(d,f,n);if(m instanceof W)return m}for(const[d,m]of l.entries()){const p=Qy(m,f,n);if(p instanceof W)return p;p!==null&&(u[d]=p,i=!0)}}if(i)return n.node("structure",{...t,optional:u},{prereduced:!0})}}});var Yv,Iv;class KC extends la{constructor(){super(...arguments);w(this,"impliedBasis",Z.intrinsic.object.internal);w(this,"impliedSiblings",this.children.flatMap(i=>i.impliedSiblings??[]));w(this,"props",Zi(this.required,this.optional));w(this,"propsByKey",_e(this.props,(i,a)=>[a.key,a]));w(this,"propsByKeyReference",$t(this.propsByKey));w(this,"expression",_C(this));w(this,"requiredKeys",((Yv=this.required)==null?void 0:Yv.map(i=>i.key))??[]);w(this,"optionalKeys",((Iv=this.optional)==null?void 0:Iv.map(i=>i.key))??[]);w(this,"literalKeys",[...this.requiredKeys,...this.optionalKeys]);w(this,"_keyof");w(this,"traverseAllows",(i,a)=>this._traverse("Allows",i,a));w(this,"traverseApply",(i,a)=>this._traverse("Apply",i,a));w(this,"_traverse",(i,a,l)=>{const u=(l==null?void 0:l.currentErrorCount)??0;for(let f=0;f<this.props.length;f++)if(i==="Allows"){if(!this.props[f].traverseAllows(a,l))return!1}else if(this.props[f].traverseApply(a,l),l.failFast&&l.currentErrorCount>u)return!1;if(this.sequence){if(i==="Allows"){if(!this.sequence.traverseAllows(a,l))return!1}else if(this.sequence.traverseApply(a,l),l.failFast&&l.currentErrorCount>u)return!1}if(this.index||this.undeclared==="reject"){const f=Object.keys(a);f.push(...Object.getOwnPropertySymbols(a));for(let d=0;d<f.length;d++){const m=f[d];if(this.index){for(const p of this.index)if(p.signature.traverseAllows(m,l)){if(i==="Allows"){if(!In(m,()=>p.value.traverseAllows(a[m],l),l))return!1}else if(In(m,()=>p.value.traverseApply(a[m],l),l),l.failFast&&l.currentErrorCount>u)return!1}}if(this.undeclared==="reject"&&!this.declaresKey(m)&&(i==="Allows"||(l.errorFromNodeContext({code:"predicate",expected:"removed",actual:"",relativePath:[m],meta:this.meta}),l.failFast)))return!1}}return this.structuralMorph&&l&&!l.hasError()&&l.queueMorphs([this.structuralMorph]),!0});w(this,"declaresKey",i=>{var a;return i in this.propsByKey||((a=this.index)==null?void 0:a.some(l=>l.signature.allows(i)))||this.sequence!==void 0&&Z.intrinsic.nonNegativeIntegerString.allows(i)});w(this,"structuralMorphRef",this.structuralMorph&&$t(this.structuralMorph))}keyof(){if(this._keyof)return this._keyof;let i=this.$.units(this.literalKeys).branches;if(this.index)for(const{signature:a}of this.index)i=i.concat(a.branches);return this._keyof=this.$.node("union",i)}map(i){return this.$.node("structure",this.props.flatMap(i).reduce((a,l)=>{const u=this.propsByKey[l.key];if(Et(l))return l.kind!=="required"&&l.kind!=="optional"?J(`Map result must have kind "required" or "optional" (was ${l.kind})`):(a[l.kind]=Be(a[l.kind],l),a);const f=l.kind??(u==null?void 0:u.kind)??"required",d=_e(l,(m,p)=>m in jd.implementation.keys?[m,p]:[]);return a[f]=Be(a[f],this.$.node(f,d)),a},{}))}assertHasKeys(i){const a=i.filter(l=>!so(l,this.keyof()));if(a.length)return J(Fy(this.expression,a))}get(i,...a){var m;let l,u=!1;const f=JC(i);if((typeof f=="string"||typeof f=="symbol")&&this.propsByKey[f]&&(l=this.propsByKey[f].value,u=this.propsByKey[f].required),this.index)for(const p of this.index)so(f,p.signature)&&(l=(l==null?void 0:l.and(p.value))??p.value);if(this.sequence&&so(f,Z.intrinsic.nonNegativeIntegerString))if(le(f,"root"))this.sequence.variadic&&(l=(l==null?void 0:l.and(this.sequence.element))??this.sequence.element);else{const p=Number.parseInt(f);if(p<this.sequence.prevariadic.length){const g=this.sequence.prevariadic[p].node;l=(l==null?void 0:l.and(g))??g,u||(u=p<this.sequence.prefixLength)}else if(this.sequence.variadic){const g=this.$.node("union",this.sequence.variadicOrPostfix);l=(l==null?void 0:l.and(g))??g}}if(!l)return(m=this.sequence)!=null&&m.variadic&&le(f,"root")&&f.extends(Z.intrinsic.number)?J(YC(f.expression,this.sequence.expression)):J(Fy(this.expression,[f]));const d=l.get(...a);return u?d:d.or(Z.intrinsic.undefined)}pick(...i){return this.assertHasKeys(i),this.$.node("structure",this.filterKeys("pick",i))}omit(...i){return this.assertHasKeys(i),this.$.node("structure",this.filterKeys("omit",i))}optionalize(){const{required:i,...a}=this.inner;return this.$.node("structure",{...a,optional:this.props.map(l=>l.hasKind("required")?this.$.node("optional",l.inner):l)})}require(){const{optional:i,...a}=this.inner;return this.$.node("structure",{...a,required:this.props.map(l=>l.hasKind("optional")?{key:l.key,value:l.value}:l)})}merge(i){const a=this.filterKeys("omit",[i.keyof()]);return i.required&&(a.required=Be(a.required,i.required)),i.optional&&(a.optional=Be(a.optional,i.optional)),i.index&&(a.index=Be(a.index,i.index)),i.sequence&&(a.sequence=i.sequence),i.undeclared?a.undeclared=i.undeclared:delete a.undeclared,this.$.node("structure",a)}filterKeys(i,a){const l=Mb(this.inner),u=f=>{const d=a.some(m=>so(f,m));return i==="pick"?d:!d};return l.required&&(l.required=l.required.filter(f=>u(f.key))),l.optional&&(l.optional=l.optional.filter(f=>u(f.key))),l.index&&(l.index=l.index.filter(f=>u(f.signature))),l}get defaultable(){var i;return this.cacheGetter("defaultable",((i=this.optional)==null?void 0:i.filter(a=>a.hasDefault()))??[])}_compileDeclaresKey(i){const a=[];if(this.props.length&&a.push(`k in ${this.propsByKeyReference}`),this.index)for(const l of this.index)a.push(i.invoke(l.signature,{kind:"Allows",arg:"k"}));return this.sequence&&a.push("$ark.intrinsic.nonNegativeIntegerString.allows(k)"),a.join(" || ")||"false"}get structuralMorph(){return this.cacheGetter("structuralMorph",HC(this))}compile(i){i.traversalKind==="Apply"&&i.initializeErrorCount();for(const a of this.props)i.check(a),i.traversalKind==="Apply"&&i.returnIfFailFast();if(this.sequence&&(i.check(this.sequence),i.traversalKind==="Apply"&&i.returnIfFailFast()),(this.index||this.undeclared==="reject")&&(i.const("keys","Object.keys(data)"),i.line("keys.push(...Object.getOwnPropertySymbols(data))"),i.for("i < keys.length",()=>this.compileExhaustiveEntry(i))),i.traversalKind==="Allows")return i.return(!0);this.structuralMorphRef&&i.if("ctx && !ctx.hasError()",()=>(i.line("ctx.queueMorphs(["),GC(i,this),i.line("])")))}compileExhaustiveEntry(i){if(i.const("k","keys[i]"),this.index)for(const a of this.index)i.if(`${i.invoke(a.signature,{arg:"k",kind:"Allows"})}`,()=>i.traverseKey("k","data[k]",a.value));return this.undeclared==="reject"&&i.if(`!(${this._compileDeclaresKey(i)})`,()=>i.traversalKind==="Allows"?i.return(!1):i.line(`ctx.errorFromNodeContext({ code: "predicate", expected: "removed", actual: "", relativePath: [k], meta: ${this.compiledMeta} })`).if("ctx.failFast",()=>i.return())),i}reduceJsonSchema(i,a){var l;switch(i.type){case"object":return this.reduceObjectJsonSchema(i,a);case"array":const u=((l=this.sequence)==null?void 0:l.reduceJsonSchema(i,a))??i;return this.props.length||this.index?a.fallback.arrayObject({code:"arrayObject",base:u,object:this.reduceObjectJsonSchema({type:"object"},a)}):u;default:return lt.throwInternalOperandError("structure",i)}}reduceObjectJsonSchema(i,a){if(this.props.length){i.properties={};for(const l of this.props){const u=l.value.toJsonSchemaRecurse(a);if(typeof l.key=="symbol"){a.fallback.symbolKey({code:"symbolKey",base:i,key:l.key,value:u,optional:l.optional});continue}if(l.hasDefault()){const f=typeof l.default=="function"?l.default():l.default;u.default=Z.intrinsic.jsonData.allows(f)?f:a.fallback.defaultValue({code:"defaultValue",base:u,value:f})}i.properties[l.key]=u}this.requiredKeys.length&&i.properties&&(i.required=this.requiredKeys.filter(l=>typeof l=="string"&&l in i.properties))}if(this.index)for(const l of this.index){const u=l.value.toJsonSchemaRecurse(a);if(l.signature.equals(Z.intrinsic.string)){i.additionalProperties=u;continue}for(const f of l.signature.branches){if(!f.extends(Z.intrinsic.string)){i=a.fallback.symbolKey({code:"symbolKey",base:i,key:null,value:u,optional:!1});continue}let d={type:"string"};if(f.hasKind("morph")&&(d=a.fallback.morph({code:"morph",base:f.in.toJsonSchemaRecurse(a),out:f.out.toJsonSchemaRecurse(a)})),!f.hasKind("intersection"))return nt(`Unexpected index branch kind ${f.kind}.`);const{pattern:m}=f.inner;if(m){const p=Object.assign(d,{pattern:m[0].rule});for(let g=1;g<m.length;g++)d=a.fallback.patternIntersection({code:"patternIntersection",base:p,pattern:m[g].rule});i.patternProperties??(i.patternProperties={}),i.patternProperties[p.pattern]=u}}}return this.undeclared&&!i.additionalProperties&&(i.additionalProperties=!1),i}}const $f={},VC=t=>{var i,a;let n="";for(let l=0;l<t.defaultable.length;l++)n+=t.defaultable[l].defaultValueMorphRef;if((i=t.sequence)!=null&&i.defaultValueMorphsReference&&(n+=(a=t.sequence)==null?void 0:a.defaultValueMorphsReference),t.undeclared==="delete"){if(n+="delete !(",t.required)for(const l of t.required)n+=l.compiledKey+" | ";if(t.optional)for(const l of t.optional)n+=l.compiledKey+" | ";if(t.index)for(const l of t.index)n+=l.signature.id+" | ";if(t.sequence)if(t.sequence.maxLength===null)n+=de.nonNegativeIntegerString.id;else for(let l=0;l<t.sequence.tuple.length;l++)n+=l+" | ";n+=")"}return n},HC=t=>{const n=VC(t);if(!n)return;if($f[n])return $f[n];const i=(a,l)=>{var u;for(let f=0;f<t.defaultable.length;f++)t.defaultable[f].key in a||t.defaultable[f].defaultValueMorph(a,l);if((u=t.sequence)!=null&&u.defaultables)for(let f=a.length-t.sequence.prefixLength;f<t.sequence.defaultables.length;f++)t.sequence.defaultValueMorphs[f](a,l);if(t.undeclared==="delete")for(const f in a)t.declaresKey(f)||delete a[f];return a};return $f[n]=i},GC=(t,n)=>{var l;const a=`(data${n.defaultable.some(u=>u.defaultValueMorph.length===2)||((l=n.sequence)==null?void 0:l.defaultValueMorphs.some(u=>u.length===2))?", ctx":""})`;return t.block(`${a} => `,u=>{var f;for(let d=0;d<n.defaultable.length;d++){const{serializedKey:m,defaultValueMorphRef:p}=n.defaultable[d];u.if(`!(${m} in data)`,g=>g.line(`${p}${a}`))}return(f=n.sequence)!=null&&f.defaultables&&u.for(`i < ${n.sequence.defaultables.length}`,d=>d.set("data[i]",5),`data.length - ${n.sequence.prefixLength}`),n.undeclared==="delete"&&u.forIn("data",d=>d.if(`!(${n._compileDeclaresKey(d)})`,m=>m.line("delete data[k]"))),u.return("data")})},v0={implementation:qC,Node:KC},JC=t=>(le(t,"root")&&t.hasKind("unit")&&(t=t.unit),typeof t=="number"&&(t=`${t}`),t),YC=(t,n)=>`${t} is not allowed as an array index on ${n}. Use the 'nonNegativeIntegerString' keyword instead.`,td=(t,n,i)=>{const[a,l]=JA(t.branches,f=>f.hasKind("unit"));if(!a.length)return{index:i.node("index",{signature:t,value:n})};const u={};for(const f of a){const d=i.node("required",{key:f.unit,value:n});u[d.kind]=Be(u[d.kind],d)}return l.length&&(u.index=i.node("index",{signature:l,value:n})),u},IC=t=>le(t,"root")?t.expression:ze(t),Fy=(t,n)=>`Key${n.length===1?"":"s"} ${n.map(IC).join(", ")} ${n.length===1?"does":"do"} not exist on ${t}`,Jo={...U2,alias:Md.implementation,domain:zd.implementation,unit:d0.implementation,proto:To.implementation,union:f0.implementation,morph:u0.implementation,intersection:o0.implementation,divisor:Gb.implementation,pattern:n0.implementation,predicate:Hb.implementation,required:p0.implementation,optional:jd.implementation,index:h0.implementation,sequence:m0.implementation,structure:v0.implementation};Z.defaultConfig=i$(Object.assign(_e(Jo,(t,n)=>[t,n.defaults]),{jitless:h$(),clone:c$,onUndeclaredKey:"ignore",exactOptionalPropertyTypes:!0,numberAllowsNaN:!1,dateAllowsInvalid:!1,onFail:null,keywords:{},toJsonSchema:lt.defaultConfig}));Z.resolvedConfig=Ff(Z.defaultConfig,Z.config);const ZC={...B2,alias:Md.Node,domain:zd.Node,unit:d0.Node,proto:To.Node,union:f0.Node,morph:u0.Node,intersection:o0.Node,divisor:Gb.Node,pattern:n0.Node,predicate:Hb.Node,required:p0.Node,optional:jd.Node,index:h0.Node,sequence:m0.Node,structure:v0.Node};class nd extends PA{get[Yn](){return"module"}}const b0=(t,n)=>new nd(_e(t,(i,a)=>[i,le(a,"module")?b0(a,n):n.bindReference(a)])),QC=t=>kt(t)?t:"branches"in t&&kt(t.branches)?t.branches:void 0,FC=(t,n)=>J(`Node of kind ${n} is not valid as a ${t} definition`),Xy=t=>`#${t} duplicates public alias ${t}`,Cf={};Z.ambient??(Z.ambient={});let Py;const x0="function $",XC=t=>S0(t,w0(t)),S0=(t,n)=>{const i=n.write(x0,4),a=n.compile()();for(const l of t)l.precompilation||(l.traverseAllows=a[`${l.id}Allows`].bind(a),l.isRoot()&&!l.allowsRequiresContext&&(l.allows=l.traverseAllows),l.traverseApply=a[`${l.id}Apply`].bind(a),a[`${l.id}Optimistic`]&&(l.traverseOptimistic=a[`${l.id}Optimistic`].bind(a)),l.precompilation=i)},w0=t=>new Ob().return(t.reduce((n,i)=>{const a=new kf({kind:"Allows"}).indent();i.compile(a);const l=a.write(`${i.id}Allows`),u=new kf({kind:"Apply"}).indent();i.compile(u);const f=u.write(`${i.id}Apply`),d=`${n}${l},
|
|
102
|
+
${f},
|
|
103
|
+
`;if(!i.hasKind("union"))return d;const m=new kf({kind:"Allows",optimistic:!0}).indent();i.compile(m);const p=m.write(`${i.id}Optimistic`);return`${d}${p},
|
|
104
|
+
`},`{
|
|
105
|
+
`)+"}");class N0{constructor(n,i){w(this,"config");w(this,"resolvedConfig");w(this,"name");w(this,"referencesById",{});w(this,"references",[]);w(this,"resolutions",{});w(this,"exportedNames",[]);w(this,"aliases",{});w(this,"resolved",!1);w(this,"nodesByHash",{});w(this,"intrinsic");w(this,"_json");w(this,"generic",(...n)=>{const i=this;return(a,l)=>new Co(n,l?new Vb(a):a,i,i,l??null)});w(this,"units",(n,i)=>{const a=[];for(const u of n)a.includes(u)||a.push(u);const l=a.map(u=>this.node("unit",{unit:u},i));return this.node("union",l,{...i,prereduced:!0})});w(this,"lazyResolutions",[]);w(this,"schema",(n,i)=>this.finalize(this.parseSchema(n,i)));w(this,"parseSchema",(n,i)=>this.node(go(n),n,i));w(this,"precompilation");w(this,"_exportedResolutions");w(this,"_exports");w(this,"node",(n,i,a={})=>{const l=this.preparseNode(n,i,a);if(Et(l))return this.bindReference(l);const u=this.createParseContext(l),f=r0(u),d=this.bindReference(f);return an[u.id]=d});w(this,"parse",(n,i={})=>this.finalize(this.parseDefinition(n,i)));this.config=Ff(Z.config,i),this.resolvedConfig=Ff(Z.resolvedConfig,i),this.name=this.resolvedConfig.name??`anonymousScope${Object.keys(Cf).length}`,this.name in Cf&&J(`A Scope already named ${this.name} already exists`),Cf[this.name]=this;const a=Object.entries(n).map(l=>this.preparseOwnAliasEntry(...l));for(const[l,u]of a){let f=l;if(l[0]==="#"?(f=l.slice(1),f in this.aliases&&J(Xy(f)),this.aliases[f]=u):(f in this.aliases&&J(Xy(l)),this.aliases[f]=u,this.exportedNames.push(f)),!le(u,"module")&&!le(u,"generic")&&!_o(u)){const d=this.preparseOwnDefinitionFormat(u,{alias:f});this.resolutions[f]=le(d,"root")?this.bindReference(d):this.createParseContext(d).id}}Py??(Py=this.node("union",{branches:["string","number","object","bigint","symbol",{unit:!0},{unit:!1},{unit:void 0},{unit:null}]},{prereduced:!0})),this.nodesByHash[Py.hash]=this.node("intersection",{},{prereduced:!0}),this.intrinsic=Z.intrinsic?_e(Z.intrinsic,(l,u)=>l.startsWith("json")?[]:[l,this.bindReference(u)]):{}}get[Yn](){return"scope"}cacheGetter(n,i){return Object.defineProperty(this,n,{value:i}),i}get internal(){return this}get json(){return this._json||this.export(),this._json}defineSchema(n){return n}lazilyResolve(n,i){const a=this.node("alias",{reference:i??"synthetic",resolve:n},{prereduced:!0});return this.resolved||this.lazyResolutions.push(a),a}preparseNode(n,i,a){var d;let l=typeof n=="string"?n:go(i,n);if(Et(i)&&i.kind===l)return i;if(l==="alias"&&!(a!=null&&a.prereduced)){const{reference:m}=Md.implementation.normalize(i,this);if(m.startsWith("$")){const p=this.resolveRoot(m.slice(1));i=p,l=p.kind}}else if(l==="union"&&er(i,"object")){const m=QC(i);(m==null?void 0:m.length)===1&&(i=m[0],l=go(i))}if(Et(i)&&i.kind===l)return i;const u=Jo[l],f=((d=u.normalize)==null?void 0:d.call(u,i,this))??i;return Et(f)?f.kind===l?f:FC(l,f.kind):{...a,$:this,kind:l,def:f,prefix:a.alias??l}}bindReference(n){let i;return Et(n)?i=n.$===this?n:new n.constructor(n.attachments,this):i=n.$===this?n:new Co(n.params,n.bodyDef,n.$,this,n.hkt),this.resolved||Object.assign(this.referencesById,i.referencesById),i}resolveRoot(n){return this.maybeResolveRoot(n)??J(A0(n))}maybeResolveRoot(n){const i=this.maybeResolve(n);if(!le(i,"generic"))return i}maybeResolveSubalias(n){return id(this.aliases,n)??id(this.ambient,n)}get ambient(){return Z.ambient}maybeResolve(n){var l;const i=this.resolutions[n];if(i){if(typeof i!="string")return this.bindReference(i);const u=an[i];if(le(u,"root"))return this.resolutions[n]=u;if(le(u,"context")){if(u.phase==="resolving")return this.node("alias",{reference:`$${n}`},{prereduced:!0});if(u.phase==="resolved")return nt(`Unexpected resolved context for was uncached by its scope: ${ze(u)}`);u.phase="resolving";const f=this.bindReference(this.parseOwnDefinitionFormat(u.def,u));return u.phase="resolved",an[f.id]=f,an[u.id]=f,this.resolutions[n]=f}return nt(`Unexpected nodesById entry for ${i}: ${ze(u)}`)}let a=this.aliases[n]??((l=this.ambient)==null?void 0:l[n]);return a?(a=this.normalizeRootScopeValue(a),le(a,"generic")?this.resolutions[n]=this.bindReference(a):le(a,"module")?(a.root||J($0(n)),this.resolutions[n]=this.bindReference(a.root)):this.resolutions[n]=this.parse(a,{alias:n})):this.maybeResolveSubalias(n)}createParseContext(n){const i=n.id??i0(n.prefix);return an[i]=Object.assign(n,{[Yn]:"context",$:this,id:i,phase:"unresolved"})}traversal(n){return new Ir(n,this.resolvedConfig)}import(...n){return new nd(_e(this.export(...n),(i,a)=>[`#${i}`,a]))}export(...n){if(!this._exports){this._exports={};for(const a of this.exportedNames){const l=this.aliases[a];this._exports[a]=le(l,"module")?b0(l,this):Wy(this.maybeResolve(a))}for(const a of this.lazyResolutions)a.resolution;if(this._exportedResolutions=E0(this,this._exports),this._json=R0(this._exportedResolutions),Object.assign(this.resolutions,this._exportedResolutions),this.references=Object.values(this.referencesById),!this.resolvedConfig.jitless){const a=w0(this.references);this.precompilation=a.write(x0,4),S0(this.references,a)}this.resolved=!0}const i=n.length?n:this.exportedNames;return new nd(_e(i,(a,l)=>[l,this._exports[l]]))}resolve(n){return this.export()[n]}parseDefinition(n,i={}){if(le(n,"root"))return this.bindReference(n);const a=this.preparseOwnDefinitionFormat(n,i);if(le(a,"root"))return this.bindReference(a);const l=this.createParseContext(a);an[l.id]=l;let u=this.bindReference(this.parseOwnDefinitionFormat(n,l));return u.isCyclic&&(u=H2(u,l.id)),an[l.id]=u,u}finalize(n){return Wy(n),!n.precompilation&&!this.resolvedConfig.jitless&&XC(n.references),n}}class k0 extends N0{parseOwnDefinitionFormat(n,i){return r0(i)}preparseOwnDefinitionFormat(n,i){return this.preparseNode(go(n),n,i)}preparseOwnAliasEntry(n,i){return[n,i]}normalizeRootScopeValue(n){return n}}const Wy=t=>{const n=t.references.filter(i=>i.hasKind("alias"));for(const i of n){Object.assign(i.referencesById,i.resolution.referencesById);for(const a of t.references)i.id in a.referencesById&&Object.assign(a.referencesById,i.referencesById)}return t},R0=t=>_e(t,(n,i)=>[n,le(i,"root")||le(i,"generic")?i.json:le(i,"module")?R0(i):nt(`Unexpected resolution ${ze(i)}`)]),id=(t,n)=>{const i=n.indexOf(".");if(i===-1)return;const a=n.slice(0,i),l=t[a];if(l===void 0)return;if(!le(l,"module"))return J(PC(a));const u=n.slice(i+1),f=l[u];if(f===void 0)return id(l,u);if(le(f,"root")||le(f,"generic"))return f;if(le(f,"module"))return f.root??J($0(n));nt(`Unexpected resolution for alias '${n}': ${ze(f)}`)},Ud=(t,n)=>new k0(t,n),Us=new k0({}),E0=(t,n)=>{const i={};for(const a in n){const l=n[a];if(le(l,"module")){const u=E0(t,l),f=_e(u,(d,m)=>[`${a}.${d}`,m]);Object.assign(i,f)}else le(l,"root")||le(l,"generic")?i[a]=l:nt(`Unexpected scope resolution ${ze(l)}`)}return i},A0=t=>`'${t}' is unresolvable`,PC=t=>`'${t}' must reference a module to be accessed using dot syntax`,$0=t=>`Reference to submodule '${t}' must specify an alias`;Us.export();const Ke=Us.schema,Bd=Us.node;Us.defineSchema;const Qn=Us.generic,C0="^(?:0|[1-9]\\d*)$",WC=new RegExp(C0);$t(WC);const T0=Ud({bigint:"bigint",boolean:[{unit:!1},{unit:!0}],false:{unit:!1},never:[],null:{unit:null},number:"number",object:"object",string:"string",symbol:"symbol",true:{unit:!0},unknown:{},undefined:{unit:void 0},Array,Date},{prereducedAliases:!0}).export();Z.intrinsic={...T0};const O0=Ud({integer:{domain:"number",divisor:1},lengthBoundable:["string",Array],key:["string","symbol"],nonNegativeIntegerString:{domain:"string",pattern:C0}},{prereducedAliases:!0}).export();Object.assign(Z.intrinsic,O0);const eT=Ud({jsonPrimitive:["string","number",{unit:!0},{unit:!1},{unit:null}],jsonObject:{domain:"object",index:{signature:"string",value:"$jsonData"}},jsonData:["$jsonPrimitive","$jsonObject"]},{prereducedAliases:!0}).export(),de={...T0,...O0,...eT,emptyStructure:Bd("structure",{},{prereduced:!0})};Z.intrinsic={...de};const tT=t=>typeof t=="string"&&t[0]==="d"&&(t[1]==="'"||t[1]==='"')&&t.at(-1)===t[1],ev=t=>t.toString()!=="Invalid Date",nT=t=>t.slice(2,-1),j0=t=>`'${t}' could not be parsed by the Date constructor`,iT=(t,n)=>rT(t,n),rT=(t,n)=>{const i=new Date(t);if(ev(i))return i;const a=T$(t);if(a!==void 0){const l=new Date(a);if(ev(l))return l}return n?J(n===!0?j0(t):n):void 0},tv=(t,n)=>{const i=t.scanner.shiftUntil(sT[M0[n]]);if(t.scanner.lookahead==="")return t.error(oT(i,n));if(t.scanner.shift(),n==="/"){try{new RegExp(i)}catch(a){J(String(a))}t.root=t.ctx.$.node("intersection",{domain:"string",pattern:i},{prereduced:!0})}else if(Nn(n,D0))t.root=t.ctx.$.node("unit",{unit:i});else{const a=iT(i,j0(i));t.root=t.ctx.$.node("unit",{meta:i,unit:a})}},D0={"'":1,'"':1},aT={"/":1,"'":1,'"':1},M0={"d'":"'",'d"':'"',"'":"'",'"':'"',"/":"/"},sT={"'":t=>t.lookahead==="'",'"':t=>t.lookahead==='"',"/":t=>t.lookahead==="/"},lT={'"':"double-quote","'":"single-quote","/":"forward slash"},oT=(t,n)=>`${n}${t} requires a closing ${lT[M0[n]]}`,uT=t=>`Private type references should not include '#'. Use '${t}' instead.`,L0="Optional definitions like 'string?' are only valid as properties in an object or tuple",z0="Defaultable definitions like 'number = 0' are only valid as properties in an object or tuple",cT={">":!0,">=":!0},fT={"<":!0,"<=":!0},Oo={"<":">",">":"<","<=":">=",">=":"<=","==":"=="},dT=t=>`Unmatched )${t===""?"":` before ${t}`}`,U0=t=>`Missing ${t}`,hT=(t,n)=>`Left bounds are only valid when paired with right bounds (try ...${n}${t})`,B0=t=>`Left-bounded expressions must specify their limits using < or <= (was ${t})`,pT=(t,n,i,a)=>`An expression may have at most one left bound (parsed ${t}${Oo[n]}, ${i}${Oo[a]})`,mT=(t,n,i)=>_0(t,n,i,[]),_0=(t,n,i,a)=>{const l=i.parseUntilFinalizer();return a.push(l.root),l.finalizer===">"?a.length!==n.params.length?i.error(q0(t,n.names,a.map(u=>u.expression))):a:l.finalizer===","?_0(t,n,i,a):l.error(U0(">"))},q0=(t,n,i)=>`${t}<${n.join(", ")}> requires exactly ${n.length} args (got ${i.length}${i.length===0?"":`: ${i.join(", ")}`})`,nv=t=>{const n=t.scanner.shiftUntilNextTerminator();n==="keyof"?t.addPrefix("keyof"):t.root=yT(t,n)},gT=(t,n,i)=>{if(i.scanner.shiftUntilNonWhitespace(),i.scanner.shift()!=="<")return i.error(q0(t,n.names,[]));const l=mT(t,n,i);return n(...l)},yT=(t,n)=>vT(t,n)??bT(t,n)??t.error(n===""?t.scanner.lookahead==="#"?uT(t.shiftedByOne().scanner.shiftUntilNextTerminator()):K0(t):A0(n)),vT=(t,n)=>{var a;if((a=t.ctx.args)!=null&&a[n]){const l=t.ctx.args[n];return typeof l!="string"?l:t.ctx.$.node("alias",{reference:l},{prereduced:!0})}const i=t.ctx.$.maybeResolve(n);if(le(i,"root"))return i;if(i!==void 0)return le(i,"generic")?gT(n,i,t):J(`Unexpected resolution ${ze(i)}`)},bT=(t,n)=>{const i=O$(n);if(i!==void 0)return t.ctx.$.node("unit",{unit:i});const a=D$(n);if(a!==void 0)return t.ctx.$.node("unit",{unit:a})},K0=t=>{const n=t.previousOperator();return n?V0(n,t.scanner.unscanned):xT(t.scanner.unscanned)},V0=(t,n="")=>`Token '${t}' requires a right operand${n?` before '${n}'`:""}`,xT=t=>`Expected an expression${t?` before '${t}'`:""}`,H0=t=>t.scanner.lookahead===""?t.error(K0(t)):t.scanner.lookahead==="("?t.shiftedByOne().reduceGroupOpen():t.scanner.lookaheadIsIn(aT)?tv(t,t.scanner.shift()):t.scanner.lookaheadIsIn(qo)?H0(t.shiftedByOne()):t.scanner.lookahead==="d"&&t.scanner.nextLookahead in D0?tv(t,`${t.scanner.shift()}${t.scanner.shift()}`):nv(t),Ii=class Ii extends K${shiftUntilNextTerminator(){return this.shiftUntilNonWhitespace(),this.shiftUntil(()=>this.lookahead in Ii.terminatingChars)}};w(Ii,"terminatingChars",{"<":1,">":1,"=":1,"|":1,"&":1,")":1,"[":1,"%":1,",":1,":":1,"?":1,"#":1,...qo}),w(Ii,"finalizingLookaheads",{">":1,",":1,"":1,"=":1,"?":1}),w(Ii,"lookaheadIsFinalizing",(n,i)=>n===">"?i[0]==="="?i[1]==="=":i.trimStart()===""||Nn(i.trimStart()[0],Ii.terminatingChars):n==="="?i[0]!=="=":n===","||n==="?");let Ns=Ii;const ST=(t,n)=>{const i=NT(t,n);if(t.root.hasKind("unit")){if(typeof t.root.unit=="number"){t.reduceLeftBound(t.root.unit,i),t.unsetRoot();return}if(t.root.unit instanceof Date){const a=`d'${t.root.description??t.root.unit.toISOString()}'`;t.unsetRoot(),t.reduceLeftBound(a,i);return}}return RT(t,i)},wT={"<":1,">":1,"=":1},NT=(t,n)=>t.scanner.lookaheadIs("=")?`${n}${t.scanner.shift()}`:n,iv=(t,n,i,a)=>i.extends(Z.intrinsic.number)?typeof n!="number"?J(rd(t,n,a)):t==="=="?["min","max"]:t[0]===">"?["min"]:["max"]:i.extends(Z.intrinsic.lengthBoundable)?typeof n!="number"?J(rd(t,n,a)):t==="=="?["exactLength"]:t[0]===">"?["minLength"]:["maxLength"]:i.extends(Z.intrinsic.Date)?t==="=="?["after","before"]:t[0]===">"?["after"]:["before"]:J(w2(i.expression)),kT=t=>({rule:tT(t.limit)?nT(t.limit):t.limit,exclusive:t.comparator.length===1}),RT=(t,n)=>{const i=t.unsetRoot(),a=t.scanner.location;t.parseOperand();const l=t.unsetRoot(),u=t.scanner.sliceChars(a,t.scanner.location);if(t.root=i,!l.hasKind("unit")||typeof l.unit!="number"&&!(l.unit instanceof Date))return t.error(rd(n,u,"right"));const f=l.unit,d=n.length===1,m=iv(n,typeof f=="number"?f:u,i,"right");for(const g of m)t.constrainRoot(g,n==="=="?{rule:f}:{rule:f,exclusive:d});if(!t.branches.leftBound)return;if(!Nn(n,fT))return t.error(B0(n));const p=iv(t.branches.leftBound.comparator,t.branches.leftBound.limit,i,"left");t.constrainRoot(p[0],kT(t.branches.leftBound)),t.branches.leftBound=null},rd=(t,n,i)=>`Comparator ${i==="left"?Oo[t]:t} must be ${i==="left"?"preceded":"followed"} by a corresponding literal (was ${n})`,ET=t=>{t.scanner.shiftUntilNonWhitespace();const n=t.scanner.shiftUntilNextTerminator();t.root=t.root.brand(n)},AT=t=>{const n=t.scanner.shiftUntilNextTerminator(),i=j$(n,{errorOnFail:rv(n)});i===0&&t.error(rv(0)),t.root=t.root.constrain("divisor",i)},rv=t=>`% operator must be followed by a non-zero integer literal (was ${t})`,G0=t=>{const n=t.scanner.shift();return n===""?t.finalize(""):n==="["?t.scanner.shift()==="]"?t.setRoot(t.root.array()):t.error($T):n==="|"?t.scanner.lookahead===">"?t.shiftedByOne().pushRootToBranch("|>"):t.pushRootToBranch(n):n==="&"?t.pushRootToBranch(n):n===")"?t.finalizeGroup():Ns.lookaheadIsFinalizing(n,t.scanner.unscanned)?t.finalize(n):Nn(n,wT)?ST(t,n):n==="%"?AT(t):n==="#"?ET(t):n in qo?G0(t):t.error(_d(n))},_d=(t,n="")=>`'${t}' is not allowed here${n&&` (should be ${n})`}`,$T="Missing expected ']'",CT=t=>{const n=t.unsetRoot();t.parseOperand();const i=t.unsetRoot();if(!i.hasKind("unit"))return t.error(TT(i.expression));const a=i.unit instanceof Date?()=>new Date(i.unit):i.unit;return[n,"=",a]},TT=t=>`Default value '${t}' must a literal value`,av=(t,n)=>{const i=n.$.maybeResolveRoot(t);if(i)return i;if(t.endsWith("[]")){const u=n.$.maybeResolveRoot(t.slice(0,-2));if(u)return u.array()}const a=new Yo(new Ns(t),n),l=OT(a);return a.finalizer===">"&&J(_d(">")),l},OT=t=>{t.parseOperand();let n=qd(t).root;return n?(t.finalizer==="="?n=CT(t):t.finalizer==="?"&&(n=[n,"?"]),t.scanner.shiftUntilNonWhitespace(),t.scanner.lookahead&&J(_d(t.scanner.lookahead)),n):nt(`Root was unexpectedly unset after parsing string '${t.scanner.scanned}'`)},qd=t=>{for(;t.finalizer===void 0;)jT(t);return t},jT=t=>t.hasRoot()?t.parseOperator():t.parseOperand();class Yo{constructor(n,i){w(this,"root");w(this,"branches",{prefixes:[],leftBound:null,intersection:null,union:null,pipe:null});w(this,"finalizer");w(this,"groups",[]);w(this,"scanner");w(this,"ctx");this.scanner=n,this.ctx=i}error(n){return J(n)}hasRoot(){return this.root!==void 0}setRoot(n){this.root=n}unsetRoot(){const n=this.root;return this.root=void 0,n}constrainRoot(...n){this.root=this.root.constrain(n[0],n[1])}finalize(n){if(this.groups.length)return this.error(U0(")"));this.finalizeBranches(),this.finalizer=n}reduceLeftBound(n,i){const a=Oo[i];if(!Nn(a,cT))return this.error(B0(i));if(this.branches.leftBound)return this.error(pT(this.branches.leftBound.limit,this.branches.leftBound.comparator,n,a));this.branches.leftBound={comparator:a,limit:n}}finalizeBranches(){if(this.assertRangeUnset(),this.branches.pipe){this.pushRootToBranch("|>"),this.root=this.branches.pipe;return}if(this.branches.union){this.pushRootToBranch("|"),this.root=this.branches.union;return}if(this.branches.intersection){this.pushRootToBranch("&"),this.root=this.branches.intersection;return}this.applyPrefixes()}finalizeGroup(){this.finalizeBranches();const n=this.groups.pop();if(!n)return this.error(dT(this.scanner.unscanned));this.branches=n}addPrefix(n){this.branches.prefixes.push(n)}applyPrefixes(){for(;this.branches.prefixes.length;){const n=this.branches.prefixes.pop();this.root=n==="keyof"?this.root.keyof():nt(`Unexpected prefix '${n}'`)}}pushRootToBranch(n){var a,l,u;this.assertRangeUnset(),this.applyPrefixes();const i=this.root;this.root=void 0,this.branches.intersection=((a=this.branches.intersection)==null?void 0:a.rawAnd(i))??i,n!=="&"&&(this.branches.union=((l=this.branches.union)==null?void 0:l.rawOr(this.branches.intersection))??this.branches.intersection,this.branches.intersection=null,n!=="|"&&(this.branches.pipe=((u=this.branches.pipe)==null?void 0:u.rawPipeOnce(this.branches.union))??this.branches.union,this.branches.union=null))}parseUntilFinalizer(){return qd(new Yo(this.scanner,this.ctx))}parseOperator(){return G0(this)}parseOperand(){return H0(this)}assertRangeUnset(){if(this.branches.leftBound)return this.error(hT(this.branches.leftBound.limit,this.branches.leftBound.comparator))}reduceGroupOpen(){this.groups.push(this.branches),this.branches={prefixes:[],leftBound:null,union:null,intersection:null,pipe:null}}previousOperator(){var n;return((n=this.branches.leftBound)==null?void 0:n.comparator)??this.branches.prefixes.at(-1)??(this.branches.intersection?"&":this.branches.union?"|":this.branches.pipe?"|>":void 0)}shiftedByOne(){return this.scanner.shift(),this}}const DT="An empty string is not a valid generic parameter name",ad=(t,n,i)=>{t.shiftUntilNonWhitespace();const a=t.shiftUntilNextTerminator();return a===""?t.lookahead===""&&n.length?n:J(DT):(t.shiftUntilNonWhitespace(),MT(t,a,n,i))},sv="extends ",MT=(t,n,i,a)=>{if(t.shiftUntilNonWhitespace(),t.unscanned.startsWith(sv))t.jumpForward(sv.length);else return t.lookahead===","&&t.shift(),i.push(n),ad(t,i,a);const l=qd(new Yo(t,a));return i.push([n,l.root]),ad(t,i,a)};class LT extends sa{constructor(i){super((...a)=>new lo(i)(...a),{bind:i});w(this,"$");this.$=i}in(i){return new lo(this.$,i===void 0?void 0:this.$.parse(i))}at(i,a){return new lo(this.$).at(i,a)}case(i,a){return new lo(this.$).case(i,a)}}class lo extends sa{constructor(i,a){super(l=>this.caseEntries(Object.entries(l).map(([u,f])=>u==="default"?[u,f]:[this.$.parse(u),f])));w(this,"$");w(this,"in");w(this,"key");w(this,"branches",[]);this.$=i,this.in=a}at(i,a){return this.key&&J(UT),this.branches.length&&J(zT),this.key=i,a?this.match(a):this}case(i,a){return this.caseEntry(this.$.parse(i),a)}caseEntry(i,a){const u=(this.key?this.$.parse({[this.key]:i}):i).pipe(a);return this.branches.push(u),this}match(i){return this(i)}strings(i){return this.caseEntries(Object.entries(i).map(([a,l])=>a==="default"?[a,l]:[this.$.node("unit",{unit:a}),l]))}caseEntries(i){for(let a=0;a<i.length;a++){const[l,u]=i[a];if(l==="default")return a!==i.length-1&&J("default may only be specified as the last key of a switch definition"),this.default(u);if(typeof u!="function")return J(`Value for case "${l}" must be a function (was ${hn(u)})`);this.caseEntry(l,u)}return this}default(i){typeof i=="function"&&this.case(de.unknown,i);const a={branches:this.branches,ordered:!0};(i==="never"||i==="assert")&&(a.meta={onFail:lv});const l=this.$.node("union",a);if(!this.in)return this.$.finalize(l);let u=this.in.pipe(l);return(i==="never"||i==="assert")&&(u=u.configureReferences({onFail:lv},"self")),this.$.finalize(u)}}const lv=t=>t.throw(),zT="A key matcher must be specified before the first case i.e. match.at('foo') or match.in<object>().at('bar')",UT="At most one key matcher may be specified per expression",J0=(t,n)=>{if(kt(t)){if(t[1]==="=")return[n.$.parseOwnDefinitionFormat(t[0],n),"=",t[2]];if(t[1]==="?")return[n.$.parseOwnDefinitionFormat(t[0],n),"?"]}return P0(t,n)},BT="Only required keys may make their values optional, e.g. { [mySymbol]: ['number', '?'] }",_T="Only required keys may specify default values, e.g. { value: 'number = 0' }",qT=(t,n)=>{var f;let i;const a={},l=No(t);for(const[d,m]of l){const p=HT(d);if(p.kind==="spread"){if(!Ts(a))return J(VT);const N=n.$.parseOwnDefinitionFormat(m,n);if(N.equals(de.object))continue;if(!N.hasKind("intersection")||!((f=N.basis)!=null&&f.equals(de.object)))return J(GT(N.expression));i=N.structure;continue}if(p.kind==="undeclared"){m!=="reject"&&m!=="delete"&&m!=="ignore"&&J(KT(m)),a.undeclared=m;continue}const g=J0(m,n),v=p;if(p.kind==="required"){kt(g)?Tf(a,"optional",g[1]==="="?{key:p.normalized,value:g[0],default:g[2]}:{key:p.normalized,value:g[0]},n):Tf(a,"required",{key:p.normalized,value:g},n);continue}if(kt(g)&&(g[1]==="?"&&J(BT),g[1]==="="&&J(_T)),p.kind==="optional"){Tf(a,"optional",{key:p.normalized,value:g},n);continue}const b=n.$.parseOwnDefinitionFormat(v.normalized,n),R=td(b,g,n.$);R.index&&(a.index=Be(a.index,R.index)),R.required&&(a.required=Be(a.required,R.required))}const u=n.$.node("structure",a);return n.$.parseSchema({domain:"object",structure:(i==null?void 0:i.merge(u))??u})},Tf=(t,n,i,a)=>{t[n]=Be(t[n],a.$.node(n,i))},KT=t=>`Value of '+' key must be 'reject', 'delete', or 'ignore' (was ${ze(t)})`,VT="Spread operator may only be used as the first key in an object",HT=t=>typeof t=="symbol"?{kind:"required",normalized:t}:t.at(-1)==="?"?t.at(-2)===Jf?{kind:"required",normalized:`${t.slice(0,-2)}?`}:{kind:"optional",normalized:t.slice(0,-1)}:t[0]==="["&&t.at(-1)==="]"?{kind:"index",normalized:t.slice(1,-1)}:t[0]===Jf&&t[1]==="["&&t.at(-1)==="]"?{kind:"required",normalized:t.slice(1)}:t==="..."?{kind:"spread"}:t==="+"?{kind:"undeclared"}:{kind:"required",normalized:t==="\\..."?"...":t==="\\+"?"+":t},GT=t=>`Spread operand must resolve to an object literal type (was ${t})`,JT=(t,n)=>tO(t)?Q0[t[0]](t,n):WT(t)?Z0[t[1]](t,n):null,YT=(t,n)=>n.$.parseOwnDefinitionFormat(t[1],n).keyof(),Of=(t,n)=>{if(t[2]===void 0)return J(V0(t[1],""));const i=n.$.parseOwnDefinitionFormat(t[0],n),a=n.$.parseOwnDefinitionFormat(t[2],n);if(t[1]==="|")return n.$.node("union",{branches:[i,a]});const l=t[1]==="&"?Zn(i,a,n.$):Pf(i,a,n.$);return l instanceof W?l.throw():l},IT=(t,n)=>n.$.parseOwnDefinitionFormat(t[0],n).array(),ZT=(t,n)=>typeof t[2]!="function"?J(Y0("=>",t[2])):n.$.parseOwnDefinitionFormat(t[0],n).pipe(t[2]),Y0=(t,n)=>`${t===":"?"Narrow":"Morph"} expression requires a function following '${t}' (was ${typeof n})`,QT=(t,n)=>typeof t[2]!="function"?J(Y0(":",t[2])):n.$.parseOwnDefinitionFormat(t[0],n).constrain("predicate",t[2]),FT=(t,n)=>n.$.parseOwnDefinitionFormat(t[0],n).configureReferences(t[2],"shallow"),I0=t=>t,XT=I0({"[]":IT,"?":()=>J(L0)}),PT=I0({"|":Of,"&":Of,":":QT,"=>":ZT,"|>":Of,"@":FT,"=":()=>J(z0)}),Z0={...XT,...PT},WT=t=>Z0[t[1]]!==void 0,eO=t=>t,Q0=eO({keyof:YT,instanceof:(t,n)=>{if(typeof t[1]!="function")return J(ov(Gf(t[1])));const i=t.slice(1).map(a=>typeof a=="function"?n.$.node("proto",{proto:a}):J(ov(Gf(a))));return i.length===1?i[0]:n.$.node("union",{branches:i})},"===":(t,n)=>n.$.units(t.slice(1))}),tO=t=>Q0[t[0]]!==void 0,ov=t=>`Expected a constructor following 'instanceof' operator (was ${t})`,nO=(t,n)=>{let i=[{}],a=0;for(;a<t.length;){let l=!1;t[a]==="..."&&a<t.length-1&&(l=!0,a++);const u=J0(t[a],n),[f,d,m]=kt(u)?u:[u];if(a++,l){if(!f.extends(Z.intrinsic.Array))return J(aO(f.expression));i=i.flatMap(p=>f.distribute(g=>rO(Mb(p),g)))}else i=i.map(p=>d==="?"?F0(p,f):d==="="?iO(p,f,m):sd(p,f))}return n.$.parseSchema(i.map(l=>Ts(l)?{proto:Array,exactLength:0}:{proto:Array,sequence:l}))},sd=(t,n)=>t.defaultables||t.optionals?J(t.variadic?g0:sO):(t.variadic?t.postfix=Be(t.postfix,n):t.prefix=Be(t.prefix,n),t),F0=(t,n)=>t.variadic?J(X0):(t.optionals=Be(t.optionals,n),t),iO=(t,n,i)=>t.variadic?J(X0):t.optionals?J(lO):(t.defaultables=Be(t.defaultables,[[n,i]]),t),uv=(t,n)=>(t.postfix&&J(cv),t.variadic?t.variadic.equals(n)||J(cv):t.variadic=n.internal,t),rO=(t,n)=>{const i=n.select({method:"find",kind:"sequence"});if(!i)return uv(t,Z.intrinsic.unknown);if(i.prefix)for(const a of i.prefix)sd(t,a);if(i.optionals)for(const a of i.optionals)F0(t,a);if(i.variadic&&uv(t,i.variadic),i.postfix)for(const a of i.postfix)sd(t,a);return t},aO=t=>`Spread element must be an array (was ${t})`,cv="A tuple may have at most one variadic element",sO="A required element may not follow an optional element",X0="An optional element may not follow a variadic element",lO="A defaultable element may not follow an optional element without a default",jf={},P0=(t,n)=>{var i;if(typeof t=="string"){if(n.args&&Object.keys(n.args).some(l=>t.includes(l)))return av(t,n);const a=jf[i=n.$.name]??(jf[i]={});return a[t]??(a[t]=av(t,n))}return er(t,"object")?oO(t,n):J(ld(hn(t)))},oO=(t,n)=>{const i=kd(t);switch(i){case void 0:return le(t,"root")?t:qT(t,n);case"Array":return uO(t,n);case"RegExp":return n.$.node("intersection",{domain:"string",pattern:t},{prereduced:!0});case"Function":{const a=_o(t)?t():t;return le(a,"root")?a:J(ld("Function"))}default:return J(ld(i??ze(t)))}},uO=(t,n)=>JT(t,n)??nO(t,n),ld=t=>`Type definitions must be strings or objects (was ${t})`;class cO extends sa{constructor(n){const i=Object.assign({errors:ki,hkt:kn,$:n,raw:n.parse,module:n.constructor.module,scope:n.constructor.scope,define:n.define,match:n.match,generic:n.generic,schema:n.schema,keywords:n.ambient,unit:n.unit,enumerated:n.enumerated,instanceOf:n.instanceOf,valueOf:n.valueOf,or:n.or,and:n.and,merge:n.merge,pipe:n.pipe},n.ambientAttachments);super((...a)=>{if(a.length===1)return n.parse(a[0]);if(a.length===2&&typeof a[0]=="string"&&a[0][0]==="<"&&a[0].at(-1)===">"){const l=a[0].slice(1,-1),u=n.parseGenericParams(l,{});return new Co(u,a[1],n,n,null)}return n.parse(a)},{bind:n,attach:i})}}const ks=Z,Zr=class Zr extends N0{constructor(){super(...arguments);w(this,"unit",i=>this.units([i]));w(this,"valueOf",i=>this.units(r$(i)));w(this,"enumerated",(...i)=>this.units(i));w(this,"instanceOf",i=>this.node("proto",{proto:i},{prereduced:!0}));w(this,"or",(...i)=>this.schema(i.map(a=>this.parse(a))));w(this,"and",(...i)=>i.reduce((a,l)=>a.and(this.parse(l)),this.intrinsic.unknown));w(this,"merge",(...i)=>i.reduce((a,l)=>a.merge(this.parse(l)),this.intrinsic.object));w(this,"pipe",(...i)=>this.intrinsic.unknown.pipe(...i));w(this,"match",new LT(this));w(this,"declare",()=>({type:this.type}));w(this,"type",new cO(this))}get ambientAttachments(){if(ks.typeAttachments)return this.cacheGetter("ambientAttachments",_e(ks.typeAttachments,(i,a)=>[i,this.bindReference(a)]))}preparseOwnAliasEntry(i,a){var d;const l=i.indexOf("<");if(l===-1){if(le(a,"module")||le(a,"generic"))return[i,a];const m=this.name==="ark"?i:i==="root"?this.name:`${this.name}.${i}`,p=(d=this.resolvedConfig.keywords)==null?void 0:d[m];return p&&(a=[a,"@",p]),[i,a]}i.at(-1)!==">"&&J("'>' must be the last character of a generic declaration in a scope");const u=i.slice(0,l),f=i.slice(l+1,-1);return[u,()=>{const m=this.parseGenericParams(f,{alias:u});return o2(m,a,this)}]}parseGenericParams(i,a){return ad(new Ns(i),[],this.createParseContext({...a,def:i,prefix:"generic"}))}normalizeRootScopeValue(i){return _o(i)&&!le(i,"generic")?i():i}preparseOwnDefinitionFormat(i,a){return{...a,def:i,prefix:a.alias??"type"}}parseOwnDefinitionFormat(i,a){!(a.alias&&a.alias in this.aliases)&&!a.args&&(a.args={this:a.id});const u=P0(i,a);if(kt(u)){if(u[1]==="=")return J(z0);if(u[1]==="?")return J(L0)}return u}define(i){return i}};w(Zr,"scope",(i,a={})=>new Zr(i,a)),w(Zr,"module",(i,a={})=>Zr.scope(i,a).export());let jo=Zr;const fO=Object.assign(jo.scope,{define:t=>t}),Ae=jo;class dO extends kn{constructor(){super(...arguments);w(this,"description",'merge an object\'s properties onto another like `Merge(User, { isAdmin: "true" })`')}}const hO=Qn(["base",de.object],["props",de.object])(t=>t.base.merge(t.props),dO),pO=Ae.module({Key:de.key,Merge:hO});class mO extends kn{}const gO=Qn("element")(t=>{const n=t.element.exclude(de.Array),i=n.array();return n.rawOr(i).pipe(Cs).distribute(a=>a.assertHasKind("morph").declareOut(i),Ke)},mO),yO=Ae.module({root:de.Array,readonly:"root",index:de.nonNegativeIntegerString,liftFrom:gO},{name:"Array"}),od=Ke(["string",Os.FileConstructor]),vO=od.rawOr(od.array()),fv=Ke({meta:"an object representing parsed form data",domain:"object",index:{signature:"string",value:vO}}),bO=Ae.module({root:["instanceof",FormData],value:od,parsed:fv,parse:Ke({in:FormData,morphs:t=>{const n={};for(const[i,a]of t)if(i in n){const l=n[i];typeof l=="string"||l instanceof Os.FileConstructor?n[i]=[l,a]:l.push(a)}else n[i]=a;return n},declaredOut:fv})},{name:"FormData"}),xO=Ae.module({Int8:["instanceof",Int8Array],Uint8:["instanceof",Uint8Array],Uint8Clamped:["instanceof",Uint8ClampedArray],Int16:["instanceof",Int16Array],Uint16:["instanceof",Uint16Array],Int32:["instanceof",Int32Array],Uint32:["instanceof",Uint32Array],Float32:["instanceof",Float32Array],Float64:["instanceof",Float64Array],BigInt64:["instanceof",BigInt64Array],BigUint64:["instanceof",BigUint64Array]},{name:"TypedArray"}),SO={Boolean:1,Number:1,String:1},wO=Ae.module({..._e({...bb,...Sb},(t,n)=>t in SO?[]:[t,["instanceof",n]]),Array:yO,TypedArray:xO,FormData:bO}),NO=Ke({domain:{domain:"number",meta:"a number representing a Unix timestamp"},divisor:{rule:1,meta:"an integer representing a Unix timestamp"},min:{rule:-864e13,meta:"a Unix timestamp after -8640000000000000"},max:{rule:864e13,meta:"a Unix timestamp before 8640000000000000"},meta:"an integer representing a safe Unix timestamp"}),kO=Ke({domain:"number",divisor:1}),W0=Ae.module({root:de.number,integer:kO,epoch:NO,safe:Ke({domain:{domain:"number",numberAllowsNaN:!1},min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER}),NaN:["===",Number.NaN],Infinity:["===",Number.POSITIVE_INFINITY],NegativeInfinity:["===",Number.NEGATIVE_INFINITY]},{name:"number"}),He=(t,n,i)=>{const a={domain:"string",pattern:{rule:t.source,flags:t.flags,meta:n}};return i&&(a.meta={format:i}),Bd("intersection",a)},dv=He(ko,"a well-formed integer string"),ex=Ae.module({root:dv,parse:Ke({in:dv,morphs:(t,n)=>{const i=Number.parseInt(t);return Number.isSafeInteger(i)?i:n.error("an integer in the range Number.MIN_SAFE_INTEGER to Number.MAX_SAFE_INTEGER")},declaredOut:de.integer})},{name:"string.integer"}),RO=He(/^[\dA-Fa-f]+$/,"hex characters only"),EO=Ae.module({root:He(/^(?:[\d+/A-Za-z]{4})*(?:[\d+/A-Za-z]{2}==|[\d+/A-Za-z]{3}=)?$/,"base64-encoded"),url:He(/^(?:[\w-]{4})*(?:[\w-]{2}(?:==|%3D%3D)?|[\w-]{3}(?:=|%3D)?)?$/,"base64url-encoded")},{name:"string.base64"}),hv=He(/^[A-Z].*$/,"capitalized"),AO=Ae.module({root:Ke({in:"string",morphs:t=>t.charAt(0).toUpperCase()+t.slice(1),declaredOut:hv}),preformatted:hv},{name:"string.capitalize"}),$O=t=>{const n=t.replaceAll(/[ -]+/g,"");let i=0,a,l,u=!1;for(let f=n.length-1;f>=0;f--)a=n.substring(f,f+1),l=Number.parseInt(a,10),u?(l*=2,i+=l>=10?l%10+1:l):i+=l,u=!u;return!!(i%10===0&&n)},CO=/^(?:4\d{12}(?:\d{3,6})?|5[1-5]\d{14}|(222[1-9]|22[3-9]\d|2[3-6]\d{2}|27[01]\d|2720)\d{12}|6(?:011|5\d\d)\d{12,15}|3[47]\d{13}|3(?:0[0-5]|[68]\d)\d{11}|(?:2131|1800|35\d{3})\d{11}|6[27]\d{14}|^(81\d{14,17}))$/,TO=Ke({domain:"string",pattern:{meta:"a credit card number",rule:CO.source},predicate:{meta:"a credit card number",predicate:$O}}),OO=/^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))(T((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([,.]\d+(?!:))?)?(\17[0-5]\d([,.]\d+)?)?([Zz]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,jO=t=>!Number.isNaN(new Date(t).valueOf()),pv=Ke({domain:"string",predicate:{meta:"a parsable date",predicate:jO}}).assertHasKind("intersection"),mv=ex.root.internal.narrow((t,n)=>{const i=Number.parseInt(t),a=W0.epoch(i);return a instanceof ki?(n.errors.merge(a),!1):!0}).configure({description:"an integer string representing a safe Unix timestamp"},"self").assertHasKind("intersection"),DO=Ae.module({root:mv,parse:Ke({in:mv,morphs:t=>new Date(t),declaredOut:de.Date})},{name:"string.date.epoch"}),gv=He(OO,"an ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) date").internal.assertHasKind("intersection"),MO=Ae.module({root:gv,parse:Ke({in:gv,morphs:t=>new Date(t),declaredOut:de.Date})},{name:"string.date.iso"}),LO=Ae.module({root:pv,parse:Ke({declaredIn:pv,in:"string",morphs:(t,n)=>{const i=new Date(t);return Number.isNaN(i.valueOf())?n.error("a parsable date"):i},declaredOut:de.Date}),iso:MO,epoch:DO},{name:"string.date"}),zO=He(/^[\w%+.-]+@[\d.A-Za-z-]+\.[A-Za-z]{2,}$/,"an email address","email"),yv="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",Si=`(${yv}[.]){3}${yv}`,UO=new RegExp(`^${Si}$`),tt="(?:[0-9a-fA-F]{1,4})",BO=new RegExp(`^((?:${tt}:){7}(?:${tt}|:)|(?:${tt}:){6}(?:${Si}|:${tt}|:)|(?:${tt}:){5}(?::${Si}|(:${tt}){1,2}|:)|(?:${tt}:){4}(?:(:${tt}){0,1}:${Si}|(:${tt}){1,3}|:)|(?:${tt}:){3}(?:(:${tt}){0,2}:${Si}|(:${tt}){1,4}|:)|(?:${tt}:){2}(?:(:${tt}){0,3}:${Si}|(:${tt}){1,5}|:)|(?:${tt}:){1}(?:(:${tt}){0,4}:${Si}|(:${tt}){1,6}|:)|(?::((?::${tt}){0,5}:${Si}|(?::${tt}){1,7}|:)))(%[0-9a-zA-Z.]{1,})?$`),_O=Ae.module({root:["v4 | v6","@","an IP address"],v4:He(UO,"an IPv4 address","ipv4"),v6:He(BO,"an IPv6 address","ipv6")},{name:"string.ip"}),Fr="a JSON string",tx=t=>{if(!(t instanceof SyntaxError))throw t;return`must be ${Fr} (${t})`},qO=Ke({meta:Fr,domain:"string",predicate:{meta:Fr,predicate:(t,n)=>{try{return JSON.parse(t),!0}catch(i){return n.reject({code:"predicate",expected:Fr,problem:tx(i)})}}}}),KO=(t,n)=>{if(t.length===0)return n.error({code:"predicate",expected:Fr,actual:"empty"});try{return JSON.parse(t)}catch(i){return n.error({code:"predicate",expected:Fr,problem:tx(i)})}},VO=Ae.module({root:qO,parse:Ke({meta:"safe JSON string parser",in:"string",morphs:KO,declaredOut:de.jsonObject})},{name:"string.json"}),vv=He(/^[a-z]*$/,"only lowercase letters"),HO=Ae.module({root:Ke({in:"string",morphs:t=>t.toLowerCase(),declaredOut:vv}),preformatted:vv},{name:"string.lower"}),nx=["NFC","NFD","NFKC","NFKD"],Bs=_e(nx,(t,n)=>[n,Ke({domain:"string",predicate:i=>i.normalize(n)===i,meta:`${n}-normalized unicode`})]),Io=_e(nx,(t,n)=>[n,Ke({in:"string",morphs:i=>i.normalize(n),declaredOut:Bs[n]})]),GO=Ae.module({root:Io.NFC,preformatted:Bs.NFC},{name:"string.normalize.NFC"}),JO=Ae.module({root:Io.NFD,preformatted:Bs.NFD},{name:"string.normalize.NFD"}),YO=Ae.module({root:Io.NFKC,preformatted:Bs.NFKC},{name:"string.normalize.NFKC"}),IO=Ae.module({root:Io.NFKD,preformatted:Bs.NFKD},{name:"string.normalize.NFKD"}),ZO=Ae.module({root:"NFC",NFC:GO,NFD:JO,NFKC:YO,NFKD:IO},{name:"string.normalize"}),bv=He(Yf,"a well-formed numeric string"),QO=Ae.module({root:bv,parse:Ke({in:bv,morphs:t=>Number.parseFloat(t),declaredOut:de.number})},{name:"string.numeric"}),xv="a regex pattern",FO=Ke({domain:"string",predicate:{meta:xv,predicate:(t,n)=>{try{return new RegExp(t),!0}catch(i){return n.reject({code:"predicate",expected:xv,problem:String(i)})}}},meta:{format:"regex"}}),XO=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*)(?:\.(?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*))*))?(?:\+([\dA-Za-z-]+(?:\.[\dA-Za-z-]+)*))?$/,PO=He(XO,"a semantic version (see https://semver.org/)"),Sv=He(/^\S.*\S$|^\S?$/,"trimmed"),WO=Ae.module({root:Ke({in:"string",morphs:t=>t.trim(),declaredOut:Sv}),preformatted:Sv},{name:"string.trim"}),wv=He(/^[A-Z]*$/,"only uppercase letters"),ej=Ae.module({root:Ke({in:"string",morphs:t=>t.toUpperCase(),declaredOut:wv}),preformatted:wv},{name:"string.upper"}),tj=t=>{if(URL.canParse)return URL.canParse(t);try{return new URL(t),!0}catch{return!1}},Nv=Ke({domain:"string",predicate:{meta:"a URL string",predicate:tj},meta:{format:"uri"}}),nj=Ae.module({root:Nv,parse:Ke({declaredIn:Nv,in:"string",morphs:(t,n)=>{try{return new URL(t)}catch{return n.error("a URL string")}},declaredOut:Ke(URL)})},{name:"string.url"}),ij=Ae.module({root:["versioned | nil | max","@",{description:"a UUID",format:"uuid"}],"#nil":"'00000000-0000-0000-0000-000000000000'","#max":"'ffffffff-ffff-ffff-ffff-ffffffffffff'","#versioned":/[\da-f]{8}-[\da-f]{4}-[1-8][\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}/i,v1:He(/^[\da-f]{8}-[\da-f]{4}-1[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv1"),v2:He(/^[\da-f]{8}-[\da-f]{4}-2[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv2"),v3:He(/^[\da-f]{8}-[\da-f]{4}-3[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv3"),v4:He(/^[\da-f]{8}-[\da-f]{4}-4[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv4"),v5:He(/^[\da-f]{8}-[\da-f]{4}-5[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv5"),v6:He(/^[\da-f]{8}-[\da-f]{4}-6[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv6"),v7:He(/^[\da-f]{8}-[\da-f]{4}-7[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv7"),v8:He(/^[\da-f]{8}-[\da-f]{4}-8[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i,"a UUIDv8")},{name:"string.uuid"}),rj=Ae.module({root:de.string,alpha:He(/^[A-Za-z]*$/,"only letters"),alphanumeric:He(/^[\dA-Za-z]*$/,"only letters and digits 0-9"),hex:RO,base64:EO,capitalize:AO,creditCard:TO,date:LO,digits:He(/^\d*$/,"only digits 0-9"),email:zO,integer:ex,ip:_O,json:VO,lower:HO,normalize:ZO,numeric:QO,regex:FO,semver:PO,trim:WO,upper:ej,url:nj,uuid:ij},{name:"string"}),aj=Ae.module({bigint:de.bigint,boolean:de.boolean,false:de.false,never:de.never,null:de.null,number:de.number,object:de.object,string:de.string,symbol:de.symbol,true:de.true,unknown:de.unknown,undefined:de.undefined}),sj=Ae.module({root:de.unknown,any:de.unknown},{name:"unknown"}),lj=Ae.module({root:de.jsonObject,stringify:Bd("morph",{in:de.jsonObject,morphs:t=>JSON.stringify(t),declaredOut:de.string})},{name:"object.json"}),oj=Ae.module({root:de.object,json:lj},{name:"object"});class uj extends kn{constructor(){super(...arguments);w(this,"description",'instantiate an object from an index signature and corresponding value type like `Record("string", "number")`')}}const cj=Qn(["K",de.key],"V")(t=>({domain:"object",index:{signature:t.K,value:t.V}}),uj);class fj extends kn{constructor(){super(...arguments);w(this,"description",'pick a set of properties from an object like `Pick(User, "name | age")`')}}const dj=Qn(["T",de.object],["K",de.key])(t=>t.T.pick(t.K),fj);class hj extends kn{constructor(){super(...arguments);w(this,"description",'omit a set of properties from an object like `Omit(User, "age")`')}}const pj=Qn(["T",de.object],["K",de.key])(t=>t.T.omit(t.K),hj);class mj extends kn{constructor(){super(...arguments);w(this,"description","make all named properties of an object optional like `Partial(User)`")}}const gj=Qn(["T",de.object])(t=>t.T.partial(),mj);class yj extends kn{constructor(){super(...arguments);w(this,"description","make all named properties of an object required like `Required(User)`")}}const vj=Qn(["T",de.object])(t=>t.T.required(),yj);class bj extends kn{constructor(){super(...arguments);w(this,"description",'exclude branches of a union like `Exclude("boolean", "true")`')}}const xj=Qn("T","U")(t=>t.T.exclude(t.U),bj);class Sj extends kn{constructor(){super(...arguments);w(this,"description",'extract branches of a union like `Extract("0 | false | 1", "number")`')}}const wj=Qn("T","U")(t=>t.T.extract(t.U),Sj),Nj=Ae.module({Exclude:xj,Extract:wj,Omit:pj,Partial:gj,Pick:dj,Record:cj,Required:vj}),tr=fO({...aj,...Nj,...wO,...pO,string:rj,number:W0,object:oj,unknown:sj},{prereducedAliases:!0,name:"ark"}),pt=tr.export();Object.assign(ks.ambient,pt);ks.typeAttachments={string:pt.string.root,number:pt.number.root,bigint:pt.bigint,boolean:pt.boolean,symbol:pt.symbol,undefined:pt.undefined,null:pt.null,object:pt.object.root,unknown:pt.unknown.root,false:pt.false,true:pt.true,never:pt.never,arrayIndex:pt.Array.index,Key:pt.Key,Record:pt.Record,Array:pt.Array.root,Date:pt.Date};const ix=Object.assign(tr.type,ks.typeAttachments);tr.match;tr.generic;tr.schema;tr.define;tr.declare;const kj=ix("string|undefined"),kv=kj.assert(void 0),Rj=`${kv?`//${document.location.hostname}:${kv}`:`//${document.location.host}`}/api/plugin/site-generator`;let rx;const[Df]=document.getElementsByClassName("js-script-site-generator");Df&&Df instanceof HTMLScriptElement&&(rx=ix("string").assert(Df.dataset.googleRecaptchaSiteKey));const Mf=rx;async function Ri(t){try{const n=await fetch(Rj,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return n.ok?n.json():{success:!1,userMessage:`Failed to execute command: ${n.statusText}`}}catch(n){return{success:!1,userMessage:`Communication error: ${n.message}`}}}const Rv=t=>{let n;const i=new Set,a=(p,g)=>{const v=typeof p=="function"?p(n):p;if(!Object.is(v,n)){const b=n;n=g??(typeof v!="object"||v===null)?v:Object.assign({},n,v),i.forEach(R=>R(n,b))}},l=()=>n,d={setState:a,getState:l,getInitialState:()=>m,subscribe:p=>(i.add(p),()=>i.delete(p))},m=n=t(a,l,d);return d},Ej=t=>t?Rv(t):Rv,Aj=t=>t;function $j(t,n=Aj){const i=Bf.useSyncExternalStore(t.subscribe,()=>n(t.getState()),()=>n(t.getInitialState()));return Bf.useDebugValue(i),i}const Ev=t=>{const n=Ej(t),i=a=>$j(n,a);return Object.assign(i,n),i},Cj=t=>t?Ev(t):Ev,Kd="site-generator-session-token";function Av(t){try{sessionStorage.setItem(Kd,t)}catch(n){console.error("Failed to save session token",n)}}function Rs(){try{return sessionStorage.getItem(Kd)??void 0}catch(t){console.error("Failed to get session token",t)}}function Tj(){try{sessionStorage.removeItem(Kd)}catch(t){console.error("Failed to remove session token",t)}}const Oj=2e3,na=new Map;function jj(t){if(na.has(t))return;const n=window.setInterval(()=>{Dj(t)},Oj);na.set(t,n)}function oo(t){const n=na.get(t);n&&(window.clearInterval(n),na.delete(t))}function Vd(){na.forEach(t=>{window.clearInterval(t)}),na.clear()}async function Dj(t){const n=Rs();if(!n){oo(t);return}try{const i=await Ri({command:"loadStep",sessionToken:n,stepNumber:t});if(i.success&&i.result){const a=i.result;Mj(a),a.status!=="pending"&&oo(t)}else console.error("Error polling step:",i),oo(t)}catch(i){console.error("Error polling step:",i),oo(t)}}function Mj(t){const{updateStep:n}=nr.getState();n(t)}function Lf(t){Vd(),t.steps.forEach(n=>{n.status==="pending"&&jj(n.stepNumber)})}const nr=Cj((t,n)=>({workSession:void 0,isLoading:!1,error:void 0,activeStepNumber:void 0,setWorkSession:i=>{t({workSession:i}),i&&Lf(i)},updateStep:i=>{const{workSession:a}=n();if(!a)return;const l=a.steps.map(f=>f.stepNumber===i.stepNumber?i:f),u={...a,steps:l};t({workSession:u}),i.status==="pending"&&Lf(u)},appendNewStep:i=>{const{workSession:a}=n();if(!a)return;const l={...a,steps:[...a.steps,i]};t({workSession:l}),i.status==="pending"&&Lf(l)},setIsLoading:i=>t({isLoading:i}),setError:i=>t({error:i}),setActiveStepNumber:i=>t({activeStepNumber:i}),resetSession:()=>{Vd(),t({workSession:void 0,isLoading:!1,error:void 0,activeStepNumber:void 0})}})),Nt=A.forwardRef((t,n)=>{const{label:i,severity:a="primary",loading:l,children:u,onClick:f,className:d="",disabled:m,...p}=t,[g,v]=A.useState(!1),b=g||l,R=["Button",a==="secondary"?"secondary":"",b?"loading":"",d].filter(Boolean).join(" "),N=async O=>{if(f)try{O.preventDefault(),v(!0),await f(O)}finally{v(!1)}};return S.jsxs("button",{ref:n,type:"button",className:R,onClick:N,disabled:m||b,...p,children:[!b&&u,!b&&i]})});Nt.displayName="Button";function Zo({size:t="medium"}){return S.jsx("div",{className:`Spinner Spinner-${t}`,"aria-label":"Loading"})}function yo({activeStep:t}){const{t:n}=Ct(),i=aa(),{workSession:a}=nr(),l=()=>{i("/")},u=f=>{i(`/step/${f}`)};return!a||!a.steps||a.steps.length===0?S.jsx("div",{className:"Sidebar",children:S.jsx(Nt,{className:`Sidebar-button ${t===void 0?"active":""}`,onClick:l,children:n("startAgain")})}):S.jsxs("div",{className:"Sidebar",children:[S.jsx(Nt,{className:`Sidebar-button ${t===void 0?"active":""}`,onClick:l,children:n("startAgain")}),S.jsx("div",{className:"Sidebar-steps",children:a.steps.map(f=>S.jsxs("div",{className:"Sidebar-step",children:[S.jsx(Nt,{className:`Sidebar-button ${t===f.stepNumber?"active":""} ${f.status==="pending"?"has-spinner":""}`,onClick:()=>u(f.stepNumber),children:n("stepTitle",{stepNumber:f.stepNumber,kind:n(f.kind)})}),f.status==="pending"&&S.jsx("div",{className:"Sidebar-spinner",children:S.jsx(Zo,{size:"small"})})]},f.stepNumber))})]})}function ax({initialValue:t="",placeholder:n,submitLabel:i,onSubmit:a,isLoading:l=!1,error:u}){const{t:f}=Ct(),[d,m]=A.useState(t),p=v=>{m(v.target.value)},g=async()=>{d.trim()&&await a(d.trim())};return S.jsxs("div",{className:"PromptForm",children:[u&&S.jsx("div",{className:"Alert error mb-3",children:S.jsx("p",{children:u})}),S.jsx("textarea",{className:"PromptForm-textarea",placeholder:n||f("createPromptPlaceholder"),value:d,onChange:p,rows:6,disabled:l}),S.jsx(Nt,{onClick:g,loading:l,disabled:!d.trim()||l,className:"PromptForm-button mt-3",children:i})]})}function It({header:t,footer:n,children:i,className:a=""}){const l=["Card",a].filter(Boolean).join(" ");return S.jsxs("div",{className:l,children:[t&&S.jsx("div",{className:"Card-header",children:t}),S.jsx("div",{className:"Card-body",children:i}),n&&S.jsx("div",{className:"Card-footer",children:n})]})}function Lj(){const{t}=Ct(),n=aa(),[i,a]=A.useState(!1),[l,u]=A.useState(void 0),{workSession:f,appendNewStep:d}=nr(),m=async p=>{if(!f)return;a(!0),u(void 0);const g=Rs();if(!g){u(t("sessionExpired")),a(!1);return}try{const v=await Ri({command:"createSiteSchema",sessionToken:g,prompt:p});if(v.success&&v.result){const b=v.result;d(b),n(`/step/${b.stepNumber}`)}else u(t("promptSubmissionFailed"))}catch(v){console.error("Error submitting prompt:",v),u(t("errorOccurred"))}finally{a(!1)}};return S.jsxs("div",{className:"RouteLayout",children:[S.jsx("div",{className:"RouteLayout-main",children:S.jsxs(It,{className:"p-4",children:[S.jsx("h1",{className:"mb-4",children:t("welcomeTitle")}),S.jsx("div",{className:"Text mb-4",dangerouslySetInnerHTML:{__html:t("startInstruction")}}),f&&f.steps.length>0&&S.jsx("p",{className:"InfoText",children:t("newTabRestartMessage")}),S.jsx(ax,{submitLabel:t("createSchema"),onSubmit:m,isLoading:i,error:l})]})}),S.jsx("div",{className:"RouteLayout-sidebar",children:S.jsx(yo,{activeStep:void 0})})]})}function zj(t){return"siteId"in t}function Hd(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ir=Hd();function sx(t){ir=t}var vs={exec:()=>null};function $e(t,n=""){let i=typeof t=="string"?t:t.source;const a={replace:(l,u)=>{let f=typeof u=="string"?u:u.source;return f=f.replace(At.caret,"$1"),i=i.replace(l,f),a},getRegex:()=>new RegExp(i,n)};return a}var At={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},Uj=/^(?:[ \t]*(?:\n|$))+/,Bj=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_j=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_s=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qj=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Gd=/(?:[*+-]|\d{1,9}[.)])/,lx=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ox=$e(lx).replace(/bull/g,Gd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Kj=$e(lx).replace(/bull/g,Gd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Jd=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Vj=/^[^\n]+/,Yd=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Hj=$e(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yd).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Gj=$e(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Gd).getRegex(),Qo="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Id=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Jj=$e("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Id).replace("tag",Qo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ux=$e(Jd).replace("hr",_s).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qo).getRegex(),Yj=$e(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ux).getRegex(),Zd={blockquote:Yj,code:Bj,def:Hj,fences:_j,heading:qj,hr:_s,html:Jj,lheading:ox,list:Gj,newline:Uj,paragraph:ux,table:vs,text:Vj},$v=$e("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_s).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qo).getRegex(),Ij={...Zd,lheading:Kj,table:$v,paragraph:$e(Jd).replace("hr",_s).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",$v).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qo).getRegex()},Zj={...Zd,html:$e(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Id).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:vs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:$e(Jd).replace("hr",_s).replace("heading",` *#{1,6} *[^
|
|
106
|
+
]`).replace("lheading",ox).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Qj=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Fj=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,cx=/^( {2,}|\\)\n(?!\s*$)/,Xj=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Fo=/[\p{P}\p{S}]/u,Qd=/[\s\p{P}\p{S}]/u,fx=/[^\s\p{P}\p{S}]/u,Pj=$e(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Qd).getRegex(),dx=/(?!~)[\p{P}\p{S}]/u,Wj=/(?!~)[\s\p{P}\p{S}]/u,e3=/(?:[^\s\p{P}\p{S}]|~)/u,t3=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,hx=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,n3=$e(hx,"u").replace(/punct/g,Fo).getRegex(),i3=$e(hx,"u").replace(/punct/g,dx).getRegex(),px="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",r3=$e(px,"gu").replace(/notPunctSpace/g,fx).replace(/punctSpace/g,Qd).replace(/punct/g,Fo).getRegex(),a3=$e(px,"gu").replace(/notPunctSpace/g,e3).replace(/punctSpace/g,Wj).replace(/punct/g,dx).getRegex(),s3=$e("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,fx).replace(/punctSpace/g,Qd).replace(/punct/g,Fo).getRegex(),l3=$e(/\\(punct)/,"gu").replace(/punct/g,Fo).getRegex(),o3=$e(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),u3=$e(Id).replace("(?:-->|$)","-->").getRegex(),c3=$e("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",u3).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Do=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,f3=$e(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Do).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mx=$e(/^!?\[(label)\]\[(ref)\]/).replace("label",Do).replace("ref",Yd).getRegex(),gx=$e(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yd).getRegex(),d3=$e("reflink|nolink(?!\\()","g").replace("reflink",mx).replace("nolink",gx).getRegex(),Fd={_backpedal:vs,anyPunctuation:l3,autolink:o3,blockSkip:t3,br:cx,code:Fj,del:vs,emStrongLDelim:n3,emStrongRDelimAst:r3,emStrongRDelimUnd:s3,escape:Qj,link:f3,nolink:gx,punctuation:Pj,reflink:mx,reflinkSearch:d3,tag:c3,text:Xj,url:vs},h3={...Fd,link:$e(/^!?\[(label)\]\((.*?)\)/).replace("label",Do).getRegex(),reflink:$e(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Do).getRegex()},ud={...Fd,emStrongRDelimAst:a3,emStrongLDelim:i3,url:$e(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},p3={...ud,br:$e(cx).replace("{2,}","*").getRegex(),text:$e(ud.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},uo={normal:Zd,gfm:Ij,pedantic:Zj},ds={normal:Fd,gfm:ud,breaks:p3,pedantic:h3},m3={"&":"&","<":"<",">":">",'"':""","'":"'"},Cv=t=>m3[t];function Sn(t,n){if(n){if(At.escapeTest.test(t))return t.replace(At.escapeReplace,Cv)}else if(At.escapeTestNoEncode.test(t))return t.replace(At.escapeReplaceNoEncode,Cv);return t}function Tv(t){try{t=encodeURI(t).replace(At.percentDecode,"%")}catch{return null}return t}function Ov(t,n){var u;const i=t.replace(At.findPipe,(f,d,m)=>{let p=!1,g=d;for(;--g>=0&&m[g]==="\\";)p=!p;return p?"|":" |"}),a=i.split(At.splitPipe);let l=0;if(a[0].trim()||a.shift(),a.length>0&&!((u=a.at(-1))!=null&&u.trim())&&a.pop(),n)if(a.length>n)a.splice(n);else for(;a.length<n;)a.push("");for(;l<a.length;l++)a[l]=a[l].trim().replace(At.slashPipe,"|");return a}function hs(t,n,i){const a=t.length;if(a===0)return"";let l=0;for(;l<a&&t.charAt(a-l-1)===n;)l++;return t.slice(0,a-l)}function g3(t,n){if(t.indexOf(n[1])===-1)return-1;let i=0;for(let a=0;a<t.length;a++)if(t[a]==="\\")a++;else if(t[a]===n[0])i++;else if(t[a]===n[1]&&(i--,i<0))return a;return i>0?-2:-1}function jv(t,n,i,a,l){const u=n.href,f=n.title||null,d=t[1].replace(l.other.outputLinkReplace,"$1");a.state.inLink=!0;const m={type:t[0].charAt(0)==="!"?"image":"link",raw:i,href:u,title:f,text:d,tokens:a.inlineTokens(d)};return a.state.inLink=!1,m}function y3(t,n,i){const a=t.match(i.other.indentCodeCompensation);if(a===null)return n;const l=a[1];return n.split(`
|
|
107
|
+
`).map(u=>{const f=u.match(i.other.beginningSpace);if(f===null)return u;const[d]=f;return d.length>=l.length?u.slice(l.length):u}).join(`
|
|
108
|
+
`)}var Mo=class{constructor(t){w(this,"options");w(this,"rules");w(this,"lexer");this.options=t||ir}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const i=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:hs(i,`
|
|
109
|
+
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const i=n[0],a=y3(i,n[3]||"",this.rules);return{type:"code",raw:i,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:a}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let i=n[2].trim();if(this.rules.other.endingHash.test(i)){const a=hs(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:hs(n[0],`
|
|
110
|
+
`)}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){let i=hs(n[0],`
|
|
67
111
|
`).split(`
|
|
68
|
-
`),
|
|
69
|
-
`),
|
|
70
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");
|
|
71
|
-
${
|
|
72
|
-
${
|
|
73
|
-
`+
|
|
74
|
-
`),
|
|
75
|
-
`+
|
|
76
|
-
`),
|
|
77
|
-
`);continue}}return{type:"blockquote",raw:
|
|
78
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,
|
|
79
|
-
`,1)[0],
|
|
80
|
-
`,
|
|
81
|
-
`,1)[0];let
|
|
82
|
-
`+
|
|
83
|
-
`+
|
|
84
|
-
`,
|
|
85
|
-
`):[],
|
|
86
|
-
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:
|
|
87
|
-
`),this.blockTokens(n,this.tokens);for(let
|
|
88
|
-
`:
|
|
89
|
-
`+
|
|
90
|
-
`+
|
|
91
|
-
`+
|
|
92
|
-
`+
|
|
93
|
-
`+
|
|
94
|
-
`+
|
|
95
|
-
`+
|
|
96
|
-
`+
|
|
97
|
-
`;return
|
|
98
|
-
`:"<pre><code>"+(
|
|
99
|
-
`}blockquote({tokens:
|
|
100
|
-
${this.parser.parse(
|
|
101
|
-
`}html({text:
|
|
102
|
-
`}hr(
|
|
103
|
-
`}list(
|
|
104
|
-
`+
|
|
105
|
-
`}listitem(
|
|
106
|
-
`}checkbox({checked:
|
|
107
|
-
`}table(
|
|
112
|
+
`),a="",l="";const u=[];for(;i.length>0;){let f=!1;const d=[];let m;for(m=0;m<i.length;m++)if(this.rules.other.blockquoteStart.test(i[m]))d.push(i[m]),f=!0;else if(!f)d.push(i[m]);else break;i=i.slice(m);const p=d.join(`
|
|
113
|
+
`),g=p.replace(this.rules.other.blockquoteSetextReplace,`
|
|
114
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
|
|
115
|
+
${p}`:p,l=l?`${l}
|
|
116
|
+
${g}`:g;const v=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(g,u,!0),this.lexer.state.top=v,i.length===0)break;const b=u.at(-1);if((b==null?void 0:b.type)==="code")break;if((b==null?void 0:b.type)==="blockquote"){const R=b,N=R.raw+`
|
|
117
|
+
`+i.join(`
|
|
118
|
+
`),O=this.blockquote(N);u[u.length-1]=O,a=a.substring(0,a.length-R.raw.length)+O.raw,l=l.substring(0,l.length-R.text.length)+O.text;break}else if((b==null?void 0:b.type)==="list"){const R=b,N=R.raw+`
|
|
119
|
+
`+i.join(`
|
|
120
|
+
`),O=this.list(N);u[u.length-1]=O,a=a.substring(0,a.length-b.raw.length)+O.raw,l=l.substring(0,l.length-R.raw.length)+O.raw,i=N.substring(u.at(-1).raw.length).split(`
|
|
121
|
+
`);continue}}return{type:"blockquote",raw:a,tokens:u,text:l}}}list(t){let n=this.rules.block.list.exec(t);if(n){let i=n[1].trim();const a=i.length>1,l={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");const u=this.rules.other.listItemRegex(i);let f=!1;for(;t;){let m=!1,p="",g="";if(!(n=u.exec(t))||this.rules.block.hr.test(t))break;p=n[0],t=t.substring(p.length);let v=n[2].split(`
|
|
122
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,z=>" ".repeat(3*z.length)),b=t.split(`
|
|
123
|
+
`,1)[0],R=!v.trim(),N=0;if(this.options.pedantic?(N=2,g=v.trimStart()):R?N=n[1].length+1:(N=n[2].search(this.rules.other.nonSpaceChar),N=N>4?1:N,g=v.slice(N),N+=n[1].length),R&&this.rules.other.blankLine.test(b)&&(p+=b+`
|
|
124
|
+
`,t=t.substring(b.length+1),m=!0),!m){const z=this.rules.other.nextBulletRegex(N),L=this.rules.other.hrRegex(N),G=this.rules.other.fencesBeginRegex(N),X=this.rules.other.headingBeginRegex(N),F=this.rules.other.htmlBeginRegex(N);for(;t;){const pe=t.split(`
|
|
125
|
+
`,1)[0];let fe;if(b=pe,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),fe=b):fe=b.replace(this.rules.other.tabCharGlobal," "),G.test(b)||X.test(b)||F.test(b)||z.test(b)||L.test(b))break;if(fe.search(this.rules.other.nonSpaceChar)>=N||!b.trim())g+=`
|
|
126
|
+
`+fe.slice(N);else{if(R||v.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||G.test(v)||X.test(v)||L.test(v))break;g+=`
|
|
127
|
+
`+b}!R&&!b.trim()&&(R=!0),p+=pe+`
|
|
128
|
+
`,t=t.substring(pe.length+1),v=fe.slice(N)}}l.loose||(f?l.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(f=!0));let O=null,U;this.options.gfm&&(O=this.rules.other.listIsTask.exec(g),O&&(U=O[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),l.items.push({type:"list_item",raw:p,task:!!O,checked:U,loose:!1,text:g,tokens:[]}),l.raw+=p}const d=l.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let m=0;m<l.items.length;m++)if(this.lexer.state.top=!1,l.items[m].tokens=this.lexer.blockTokens(l.items[m].text,[]),!l.loose){const p=l.items[m].tokens.filter(v=>v.type==="space"),g=p.length>0&&p.some(v=>this.rules.other.anyLine.test(v.raw));l.loose=g}if(l.loose)for(let m=0;m<l.items.length;m++)l.items[m].loose=!0;return l}}html(t){const n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){const n=this.rules.block.def.exec(t);if(n){const i=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:i,raw:n[0],href:a,title:l}}}table(t){var f;const n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;const i=Ov(n[1]),a=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(f=n[3])!=null&&f.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
129
|
+
`):[],u={type:"table",raw:n[0],header:[],align:[],rows:[]};if(i.length===a.length){for(const d of a)this.rules.other.tableAlignRight.test(d)?u.align.push("right"):this.rules.other.tableAlignCenter.test(d)?u.align.push("center"):this.rules.other.tableAlignLeft.test(d)?u.align.push("left"):u.align.push(null);for(let d=0;d<i.length;d++)u.header.push({text:i[d],tokens:this.lexer.inline(i[d]),header:!0,align:u.align[d]});for(const d of l)u.rows.push(Ov(d,u.header.length).map((m,p)=>({text:m,tokens:this.lexer.inline(m),header:!1,align:u.align[p]})));return u}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const i=n[1].charAt(n[1].length-1)===`
|
|
130
|
+
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:i,tokens:this.lexer.inline(i)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const i=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;const u=hs(i.slice(0,-1),"\\");if((i.length-u.length)%2===0)return}else{const u=g3(n[2],"()");if(u===-2)return;if(u>-1){const d=(n[0].indexOf("!")===0?5:4)+n[1].length+u;n[2]=n[2].substring(0,u),n[0]=n[0].substring(0,d).trim(),n[3]=""}}let a=n[2],l="";if(this.options.pedantic){const u=this.rules.other.pedanticHrefTitle.exec(a);u&&(a=u[1],l=u[3])}else l=n[3]?n[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),jv(n,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){const a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=n[a.toLowerCase()];if(!l){const u=i[0].charAt(0);return{type:"text",raw:u,text:u}}return jv(i,l,i[0],this.lexer,this.rules)}}emStrong(t,n,i=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!a||a[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(a[1]||a[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const u=[...a[0]].length-1;let f,d,m=u,p=0;const g=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(g.lastIndex=0,n=n.slice(-1*t.length+u);(a=g.exec(n))!=null;){if(f=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!f)continue;if(d=[...f].length,a[3]||a[4]){m+=d;continue}else if((a[5]||a[6])&&u%3&&!((u+d)%3)){p+=d;continue}if(m-=d,m>0)continue;d=Math.min(d,d+m+p);const v=[...a[0]][0].length,b=t.slice(0,u+a.index+v+d);if(Math.min(u,d)%2){const N=b.slice(1,-1);return{type:"em",raw:b,text:N,tokens:this.lexer.inlineTokens(N)}}const R=b.slice(2,-2);return{type:"strong",raw:b,text:R,tokens:this.lexer.inlineTokens(R)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let i=n[2].replace(this.rules.other.newLineCharGlobal," ");const a=this.rules.other.nonSpaceChar.test(i),l=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&l&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:n[0],text:i}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let i,a;return n[2]==="@"?(i=n[1],a="mailto:"+i):(i=n[1],a=i),{type:"link",raw:n[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let n;if(n=this.rules.inline.url.exec(t)){let a,l;if(n[2]==="@")a=n[0],l="mailto:"+a;else{let u;do u=n[0],n[0]=((i=this.rules.inline._backpedal.exec(n[0]))==null?void 0:i[0])??"";while(u!==n[0]);a=n[0],n[1]==="www."?l="http://"+n[0]:l=n[0]}return{type:"link",raw:n[0],text:a,href:l,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){const i=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:i}}}},Kn=class cd{constructor(n){w(this,"tokens");w(this,"options");w(this,"state");w(this,"tokenizer");w(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=n||ir,this.options.tokenizer=this.options.tokenizer||new Mo,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const i={other:At,block:uo.normal,inline:ds.normal};this.options.pedantic?(i.block=uo.pedantic,i.inline=ds.pedantic):this.options.gfm&&(i.block=uo.gfm,this.options.breaks?i.inline=ds.breaks:i.inline=ds.gfm),this.tokenizer.rules=i}static get rules(){return{block:uo,inline:ds}}static lex(n,i){return new cd(i).lex(n)}static lexInline(n,i){return new cd(i).inlineTokens(n)}lex(n){n=n.replace(At.carriageReturn,`
|
|
131
|
+
`),this.blockTokens(n,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){const a=this.inlineQueue[i];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(n,i=[],a=!1){var l,u,f;for(this.options.pedantic&&(n=n.replace(At.tabCharGlobal," ").replace(At.spaceLine,""));n;){let d;if((u=(l=this.options.extensions)==null?void 0:l.block)!=null&&u.some(p=>(d=p.call({lexer:this},n,i))?(n=n.substring(d.raw.length),i.push(d),!0):!1))continue;if(d=this.tokenizer.space(n)){n=n.substring(d.raw.length);const p=i.at(-1);d.raw.length===1&&p!==void 0?p.raw+=`
|
|
132
|
+
`:i.push(d);continue}if(d=this.tokenizer.code(n)){n=n.substring(d.raw.length);const p=i.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=`
|
|
133
|
+
`+d.raw,p.text+=`
|
|
134
|
+
`+d.text,this.inlineQueue.at(-1).src=p.text):i.push(d);continue}if(d=this.tokenizer.fences(n)){n=n.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.heading(n)){n=n.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.hr(n)){n=n.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.blockquote(n)){n=n.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.list(n)){n=n.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.html(n)){n=n.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.def(n)){n=n.substring(d.raw.length);const p=i.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=`
|
|
135
|
+
`+d.raw,p.text+=`
|
|
136
|
+
`+d.raw,this.inlineQueue.at(-1).src=p.text):this.tokens.links[d.tag]||(this.tokens.links[d.tag]={href:d.href,title:d.title});continue}if(d=this.tokenizer.table(n)){n=n.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.lheading(n)){n=n.substring(d.raw.length),i.push(d);continue}let m=n;if((f=this.options.extensions)!=null&&f.startBlock){let p=1/0;const g=n.slice(1);let v;this.options.extensions.startBlock.forEach(b=>{v=b.call({lexer:this},g),typeof v=="number"&&v>=0&&(p=Math.min(p,v))}),p<1/0&&p>=0&&(m=n.substring(0,p+1))}if(this.state.top&&(d=this.tokenizer.paragraph(m))){const p=i.at(-1);a&&(p==null?void 0:p.type)==="paragraph"?(p.raw+=`
|
|
137
|
+
`+d.raw,p.text+=`
|
|
138
|
+
`+d.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):i.push(d),a=m.length!==n.length,n=n.substring(d.raw.length);continue}if(d=this.tokenizer.text(n)){n=n.substring(d.raw.length);const p=i.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=`
|
|
139
|
+
`+d.raw,p.text+=`
|
|
140
|
+
`+d.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):i.push(d);continue}if(n){const p="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return this.state.top=!0,i}inline(n,i=[]){return this.inlineQueue.push({src:n,tokens:i}),i}inlineTokens(n,i=[]){var d,m,p;let a=n,l=null;if(this.tokens.links){const g=Object.keys(this.tokens.links);if(g.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)g.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,l.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(l=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let u=!1,f="";for(;n;){u||(f=""),u=!1;let g;if((m=(d=this.options.extensions)==null?void 0:d.inline)!=null&&m.some(b=>(g=b.call({lexer:this},n,i))?(n=n.substring(g.raw.length),i.push(g),!0):!1))continue;if(g=this.tokenizer.escape(n)){n=n.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.tag(n)){n=n.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.link(n)){n=n.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(g.raw.length);const b=i.at(-1);g.type==="text"&&(b==null?void 0:b.type)==="text"?(b.raw+=g.raw,b.text+=g.text):i.push(g);continue}if(g=this.tokenizer.emStrong(n,a,f)){n=n.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.codespan(n)){n=n.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.br(n)){n=n.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.del(n)){n=n.substring(g.raw.length),i.push(g);continue}if(g=this.tokenizer.autolink(n)){n=n.substring(g.raw.length),i.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(n))){n=n.substring(g.raw.length),i.push(g);continue}let v=n;if((p=this.options.extensions)!=null&&p.startInline){let b=1/0;const R=n.slice(1);let N;this.options.extensions.startInline.forEach(O=>{N=O.call({lexer:this},R),typeof N=="number"&&N>=0&&(b=Math.min(b,N))}),b<1/0&&b>=0&&(v=n.substring(0,b+1))}if(g=this.tokenizer.inlineText(v)){n=n.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(f=g.raw.slice(-1)),u=!0;const b=i.at(-1);(b==null?void 0:b.type)==="text"?(b.raw+=g.raw,b.text+=g.text):i.push(g);continue}if(n){const b="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(b);break}else throw new Error(b)}}return i}},Lo=class{constructor(t){w(this,"options");w(this,"parser");this.options=t||ir}space(t){return""}code({text:t,lang:n,escaped:i}){var u;const a=(u=(n||"").match(At.notSpaceStart))==null?void 0:u[0],l=t.replace(At.endingNewline,"")+`
|
|
141
|
+
`;return a?'<pre><code class="language-'+Sn(a)+'">'+(i?l:Sn(l,!0))+`</code></pre>
|
|
142
|
+
`:"<pre><code>"+(i?l:Sn(l,!0))+`</code></pre>
|
|
143
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
144
|
+
${this.parser.parse(t)}</blockquote>
|
|
145
|
+
`}html({text:t}){return t}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
|
|
146
|
+
`}hr(t){return`<hr>
|
|
147
|
+
`}list(t){const n=t.ordered,i=t.start;let a="";for(let f=0;f<t.items.length;f++){const d=t.items[f];a+=this.listitem(d)}const l=n?"ol":"ul",u=n&&i!==1?' start="'+i+'"':"";return"<"+l+u+`>
|
|
148
|
+
`+a+"</"+l+`>
|
|
149
|
+
`}listitem(t){var i;let n="";if(t.task){const a=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=a+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=a+" "+Sn(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):n+=a+" "}return n+=this.parser.parse(t.tokens,!!t.loose),`<li>${n}</li>
|
|
150
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
151
|
+
`}table(t){let n="",i="";for(let l=0;l<t.header.length;l++)i+=this.tablecell(t.header[l]);n+=this.tablerow({text:i});let a="";for(let l=0;l<t.rows.length;l++){const u=t.rows[l];i="";for(let f=0;f<u.length;f++)i+=this.tablecell(u[f]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
|
108
152
|
<thead>
|
|
109
153
|
`+n+`</thead>
|
|
110
|
-
`+
|
|
111
|
-
`}tablerow({text:
|
|
112
|
-
${
|
|
113
|
-
`}tablecell(
|
|
114
|
-
`}strong({tokens:
|
|
115
|
-
`+this.renderer.text(
|
|
116
|
-
Please report this to https://github.com/markedjs/marked.`,i){const s="<p>An error occurred:</p><pre>"+Pt(r.message+"",!0)+"</pre>";return n?Promise.resolve(s):s}if(n)return Promise.reject(r);throw r}}},dn=new oN;function Re(i,n){return dn.parse(i,n)}Re.options=Re.setOptions=function(i){return dn.setOptions(i),Re.defaults=dn.defaults,Am(Re.defaults),Re};Re.getDefaults=rc;Re.defaults=mn;Re.use=function(...i){return dn.use(...i),Re.defaults=dn.defaults,Am(Re.defaults),Re};Re.walkTokens=function(i,n){return dn.walkTokens(i,n)};Re.parseInline=dn.parseInline;Re.Parser=ma;Re.parser=ma.parse;Re.Renderer=es;Re.TextRenderer=pc;Re.Lexer=pa;Re.lexer=pa.lex;Re.Tokenizer=Ir;Re.Hooks=Kr;Re.parse=Re;Re.options;Re.setOptions;Re.use;Re.walkTokens;Re.parseInline;ma.parse;pa.lex;function cN(i){if(!i)return"";try{return Re.parse(i,{async:!1,gfm:!0,breaks:!0})}catch(n){return console.error("Error rendering markdown:",n),i}}function Ni({content:i,title:n,variant:r="default",className:s="",children:o}){const f=["Explanation",`Explanation-${r}`,s].filter(Boolean).join(" ");return b.jsxs("div",{className:f,children:[n&&b.jsx("h3",{className:"Explanation-title",children:n}),b.jsx("div",{className:"Explanation-content markdown-content",dangerouslySetInnerHTML:{__html:cN(i)}}),o]})}function fN({isOpen:i,title:n,message:r,confirmLabel:s,cancelLabel:o,onConfirm:f,onCancel:p}){const{t:h}=ot(),[m,d]=T.useState(!0);if(!i)return null;const v=async()=>{await f({withSampleData:m})},x=S=>{S.key==="Escape"&&p()};return b.jsxs("div",{className:"ConfirmDialog",children:[b.jsx("div",{className:"ConfirmDialog-backdrop",onClick:p,onKeyDown:x,tabIndex:0,role:"button","aria-label":"Close dialog"}),b.jsxs("div",{className:"ConfirmDialog-container",children:[b.jsx("div",{className:"ConfirmDialog-header",children:b.jsx("h3",{className:"ConfirmDialog-title",children:n})}),b.jsxs("div",{className:"ConfirmDialog-body",children:[b.jsx("p",{children:r}),b.jsx("div",{className:"ConfirmDialog-checkbox mt-3",children:b.jsxs("label",{children:[b.jsx("input",{type:"checkbox",checked:m,onChange:S=>d(S.target.checked)}),b.jsx("span",{className:"ml-2",children:h("generateSiteWithData")})]})})]}),b.jsxs("div",{className:"ConfirmDialog-footer",children:[b.jsx(rt,{onClick:p,severity:"secondary",className:"ConfirmDialog-button",children:o||h("cancel")}),b.jsx(rt,{onClick:v,className:"ConfirmDialog-button",children:s||h("confirm")})]})]})]})}function M(){return M=Object.assign?Object.assign.bind():function(i){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var s in r)({}).hasOwnProperty.call(r,s)&&(i[s]=r[s])}return i},M.apply(null,arguments)}function ge(i,n){if(i==null)return{};var r={};for(var s in i)if({}.hasOwnProperty.call(i,s)){if(n.indexOf(s)!==-1)continue;r[s]=i[s]}return r}var Vm={},$m=T.createContext(Vm),dN=(i,n)=>M({},i,n),hN=()=>T.useContext($m),mc=T.createContext(()=>{});mc.displayName="JVR.DispatchShowTools";function pN(){return T.useReducer(dN,Vm)}function qm(){return T.useContext(mc)}var Gm=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx($m.Provider,{value:n,children:b.jsx(mc.Provider,{value:r,children:s})})};Gm.displayName="JVR.ShowTools";var Ym={},Qm=T.createContext(Ym),mN=(i,n)=>M({},i,n),ss=()=>T.useContext(Qm),gc=T.createContext(()=>{});gc.displayName="JVR.DispatchExpands";function gN(){return T.useReducer(mN,Ym)}function vN(){return T.useContext(gc)}var Zm=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx(Qm.Provider,{value:n,children:b.jsx(gc.Provider,{value:r,children:s})})};Zm.displayName="JVR.Expands";var Km={Str:{as:"span","data-type":"string",style:{color:"var(--w-rjv-type-string-color, #cb4b16)"},className:"w-rjv-type",children:"string"},Url:{as:"a",style:{color:"var(--w-rjv-type-url-color, #0969da)"},"data-type":"url",className:"w-rjv-type",children:"url"},Undefined:{style:{color:"var(--w-rjv-type-undefined-color, #586e75)"},as:"span","data-type":"undefined",className:"w-rjv-type",children:"undefined"},Null:{style:{color:"var(--w-rjv-type-null-color, #d33682)"},as:"span","data-type":"null",className:"w-rjv-type",children:"null"},Map:{style:{color:"var(--w-rjv-type-map-color, #268bd2)",marginRight:3},as:"span","data-type":"map",className:"w-rjv-type",children:"Map"},Nan:{style:{color:"var(--w-rjv-type-nan-color, #859900)"},as:"span","data-type":"nan",className:"w-rjv-type",children:"NaN"},Bigint:{style:{color:"var(--w-rjv-type-bigint-color, #268bd2)"},as:"span","data-type":"bigint",className:"w-rjv-type",children:"bigint"},Int:{style:{color:"var(--w-rjv-type-int-color, #268bd2)"},as:"span","data-type":"int",className:"w-rjv-type",children:"int"},Set:{style:{color:"var(--w-rjv-type-set-color, #268bd2)",marginRight:3},as:"span","data-type":"set",className:"w-rjv-type",children:"Set"},Float:{style:{color:"var(--w-rjv-type-float-color, #859900)"},as:"span","data-type":"float",className:"w-rjv-type",children:"float"},True:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},False:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},Date:{style:{color:"var(--w-rjv-type-date-color, #268bd2)"},as:"span","data-type":"date",className:"w-rjv-type",children:"date"}},Xm=T.createContext(Km),yN=(i,n)=>M({},i,n),Le=()=>T.useContext(Xm),vc=T.createContext(()=>{});vc.displayName="JVR.DispatchTypes";function bN(){return T.useReducer(yN,Km)}function SN(){return T.useContext(vc)}function Jm(i){var{initial:n,dispatch:r,children:s}=i;return b.jsx(Xm.Provider,{value:n,children:b.jsx(vc.Provider,{value:r,children:s})})}Jm.displayName="JVR.Types";var xN=["style"];function Fm(i){var{style:n}=i,r=ge(i,xN),s=M({cursor:"pointer",height:"1em",width:"1em",userSelect:"none",display:"inline-flex"},n);return b.jsx("svg",M({viewBox:"0 0 24 24",fill:"var(--w-rjv-arrow-color, currentColor)",style:s},r,{children:b.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})}))}Fm.displayName="JVR.TriangleArrow";var Pm={Arrow:{as:"span",className:"w-rjv-arrow",style:{transform:"rotate(0deg)",transition:"all 0.3s"},children:b.jsx(Fm,{})},Colon:{as:"span",style:{color:"var(--w-rjv-colon-color, var(--w-rjv-color))",marginLeft:0,marginRight:2},className:"w-rjv-colon",children:":"},Quote:{as:"span",style:{color:"var(--w-rjv-quotes-color, #236a7c)"},className:"w-rjv-quotes",children:'"'},ValueQuote:{as:"span",style:{color:"var(--w-rjv-quotes-string-color, #cb4b16)"},className:"w-rjv-quotes",children:'"'},BracketsLeft:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-start",children:"["},BracketsRight:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-end",children:"]"},BraceLeft:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-start",children:"{"},BraceRight:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-end",children:"}"}},Wm=T.createContext(Pm),NN=(i,n)=>M({},i,n),mt=()=>T.useContext(Wm),yc=T.createContext(()=>{});yc.displayName="JVR.DispatchSymbols";function EN(){return T.useReducer(NN,Pm)}function RN(){return T.useContext(yc)}var Im=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx(Wm.Provider,{value:n,children:b.jsx(yc.Provider,{value:r,children:s})})};Im.displayName="JVR.Symbols";var eg={Copied:{className:"w-rjv-copied",style:{height:"1em",width:"1em",cursor:"pointer",verticalAlign:"middle",marginLeft:5}},CountInfo:{as:"span",className:"w-rjv-object-size",style:{color:"var(--w-rjv-info-color, #0000004d)",paddingLeft:8,fontStyle:"italic"}},CountInfoExtra:{as:"span",className:"w-rjv-object-extra",style:{paddingLeft:8}},Ellipsis:{as:"span",style:{cursor:"pointer",color:"var(--w-rjv-ellipsis-color, #cb4b16)",userSelect:"none"},className:"w-rjv-ellipsis",children:"..."},Row:{as:"div",className:"w-rjv-line"},KeyName:{as:"span",className:"w-rjv-object-key"}},tg=T.createContext(eg),TN=(i,n)=>M({},i,n),Bt=()=>T.useContext(tg),bc=T.createContext(()=>{});bc.displayName="JVR.DispatchSection";function wN(){return T.useReducer(TN,eg)}function CN(){return T.useContext(bc)}var ag=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx(tg.Provider,{value:n,children:b.jsx(bc.Provider,{value:r,children:s})})};ag.displayName="JVR.Section";var ng={objectSortKeys:!1,indentWidth:15},Sc=T.createContext(ng);Sc.displayName="JVR.Context";var lg=T.createContext(()=>{});lg.displayName="JVR.DispatchContext";function jN(i,n){return M({},i,n)}var gn=()=>T.useContext(Sc),ig=i=>{var{children:n,initialState:r,initialTypes:s}=i,[o,f]=T.useReducer(jN,Object.assign({},ng,r)),[p,h]=pN(),[m,d]=gN(),[v,x]=bN(),[S,C]=EN(),[E,z]=wN();return T.useEffect(()=>f(M({},r)),[r]),b.jsx(Sc.Provider,{value:o,children:b.jsx(lg.Provider,{value:f,children:b.jsx(Gm,{initial:p,dispatch:h,children:b.jsx(Zm,{initial:m,dispatch:d,children:b.jsx(Jm,{initial:M({},v,s),dispatch:x,children:b.jsx(Im,{initial:S,dispatch:C,children:b.jsx(ag,{initial:E,dispatch:z,children:n})})})})})})})};ig.displayName="JVR.Provider";function AN(i){if(i==null)throw new TypeError("Cannot destructure "+i)}var ON=["isNumber","value","parentValue","keyName","keys"],kN=["as","render"],LN=["as","render"],zN=["as","render"],DN=["as","style","render"],_N=["as","render"],MN=["as","render"],UN=["as","render"],BN=["as","render"],Ko=i=>{var{Quote:n={}}=mt(),{isNumber:r,value:s,parentValue:o,keyName:f,keys:p}=i,h=ge(i,ON);if(r)return null;var{as:m,render:d}=n,v=ge(n,kN),x=m||"span",S=M({},h,v),C={value:s,parentValue:o,keyName:f,keys:p||(f?[f]:[])},E=d&&typeof d=="function"&&d(S,C);return E||b.jsx(x,M({},S))};Ko.displayName="JVR.Quote";var yi=i=>{var{ValueQuote:n={}}=mt(),r=M({},(AN(i),i)),{as:s,render:o}=n,f=ge(n,LN),p=s||"span",h=M({},r,f),m=o&&typeof o=="function"&&o(h,{});return m||b.jsx(p,M({},h))};yi.displayName="JVR.ValueQuote";var rg=i=>{var{value:n,parentValue:r,keyName:s,keys:o}=i,{Colon:f={}}=mt(),{as:p,render:h}=f,m=ge(f,zN),d=p||"span",v=h&&typeof h=="function"&&h(m,{value:n,parentValue:r,keyName:s,keys:o||(s?[s]:[])});return v||b.jsx(d,M({},m))};rg.displayName="JVR.Colon";var sg=i=>{var{Arrow:n={}}=mt(),r=ss(),{expandKey:s,style:o,value:f,parentValue:p,keyName:h,keys:m}=i,d=!!r[s],{as:v,style:x,render:S}=n,C=ge(n,DN),E=v||"span",z=S&&typeof S=="function",B=M({},C,{"data-expanded":d,style:M({},x,o)}),U={value:f,parentValue:p,keyName:h,keys:m||(h?[h]:[])},D=z&&S(B,U);return D||b.jsx(E,M({},C,{style:M({},x,o)}))};sg.displayName="JVR.Arrow";var ug=i=>{var{isBrackets:n,value:r,parentValue:s,keyName:o,keys:f}=i,{BracketsLeft:p={},BraceLeft:h={}}=mt(),m={value:r,parentValue:s,keyName:o,keys:f||(o?[o]:[])};if(n){var{as:d,render:v}=p,x=ge(p,_N),S=d||"span",C=v&&typeof v=="function"&&v(x,m);return C||b.jsx(S,M({},x))}var{as:E,render:z}=h,B=ge(h,MN),U=E||"span",D=z&&typeof z=="function"&&z(B,m);return D||b.jsx(U,M({},B))};ug.displayName="JVR.BracketsOpen";var xc=i=>{var{isBrackets:n,isVisiable:r,value:s,parentValue:o,keyName:f,keys:p}=i,h={value:s,parentValue:o,keyName:f,keys:p||(f?[f]:[])};if(!r)return null;var{BracketsRight:m={},BraceRight:d={}}=mt();if(n){var{as:v,render:x}=m,S=ge(m,UN),C=v||"span",E=x&&typeof x=="function"&&x(S,h);return E||b.jsx(C,M({},S))}var{as:z,render:B}=d,U=ge(d,BN),D=z||"span",G=B&&typeof B=="function"&&B(U,h);return G||b.jsx(D,M({},U))};xc.displayName="JVR.BracketsClose";var og=i=>{var n,{value:r,expandKey:s,level:o,keys:f=[]}=i,p=ss(),h=Array.isArray(r),{collapsed:m,shouldExpandNodeInitially:d}=gn(),v=r instanceof Set,x=typeof m=="boolean"?m:typeof m=="number"?o>m:!1,S=(n=p[s])!=null?n:x,C=Object.keys(r).length;if(p[s]===void 0&&d&&d(S,{value:r,keys:f,level:o})||S||C===0)return null;var E={paddingLeft:4};return b.jsx("div",{style:E,children:b.jsx(xc,{isBrackets:h||v,isVisiable:!0})})};og.displayName="JVR.NestedClose";var HN=["as","render"],VN=["as","render"],$N=["as","render"],qN=["as","render"],GN=["as","render"],YN=["as","render"],QN=["as","render"],ZN=["as","render"],KN=["as","render"],XN=["as","render"],JN=["as","render"],FN=["as","render"],PN=["as","render"],Xo=i=>{if(i===void 0)return"0n";if(typeof i=="string")try{i=BigInt(i)}catch{return"0n"}return i?i.toString()+"n":"0n"},cg=i=>{var{value:n,keyName:r}=i,{Set:s={},displayDataTypes:o}=Le(),f=n instanceof Set;if(!f||!o)return null;var{as:p,render:h}=s,m=ge(s,HN),d=h&&typeof h=="function",v=d&&h(m,{type:"type",value:n,keyName:r});if(v)return v;var x=p||"span";return b.jsx(x,M({},m))};cg.displayName="JVR.SetComp";var fg=i=>{var{value:n,keyName:r}=i,{Map:s={},displayDataTypes:o}=Le(),f=n instanceof Map;if(!f||!o)return null;var{as:p,render:h}=s,m=ge(s,VN),d=h&&typeof h=="function",v=d&&h(m,{type:"type",value:n,keyName:r});if(v)return v;var x=p||"span";return b.jsx(x,M({},m))};fg.displayName="JVR.MapComp";var Yt={opacity:.75,paddingRight:4},dg=i=>{var{children:n="",keyName:r}=i,{Str:s={},displayDataTypes:o}=Le(),{shortenTextAfterLength:f=30,stringEllipsis:p="..."}=gn(),{as:h,render:m}=s,d=ge(s,$N),v=n,[x,S]=T.useState(f&&v.length>f);T.useEffect(()=>S(f&&v.length>f),[f]);var C=h||"span",E=M({},Yt,s.style||{});f>0&&(d.style=M({},d.style,{cursor:v.length<=f?"initial":"pointer"}),v.length>f&&(d.onClick=()=>{S(!x)}));var z=x?""+v.slice(0,f)+p:v,B=m&&typeof m=="function",U=B&&m(M({},d,{style:E}),{type:"type",value:n,keyName:r}),D=x?"w-rjv-value w-rjv-value-short":"w-rjv-value",G=B&&m(M({},d,{children:z,className:D}),{type:"value",value:n,keyName:r});return b.jsxs(T.Fragment,{children:[o&&(U||b.jsx(C,M({},d,{style:E}))),G||b.jsxs(T.Fragment,{children:[b.jsx(yi,{}),b.jsx(C,M({},d,{className:D,children:z})),b.jsx(yi,{})]})]})};dg.displayName="JVR.TypeString";var hg=i=>{var{children:n,keyName:r}=i,{True:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,qN),m=f||"span",d=M({},Yt,s.style||{}),v=p&&typeof p=="function",x=v&&p(M({},h,{style:d}),{type:"type",value:n,keyName:r}),S=v&&p(M({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(T.Fragment,{children:[o&&(x||b.jsx(m,M({},h,{style:d}))),S||b.jsx(m,M({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};hg.displayName="JVR.TypeTrue";var pg=i=>{var{children:n,keyName:r}=i,{False:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,GN),m=f||"span",d=M({},Yt,s.style||{}),v=p&&typeof p=="function",x=v&&p(M({},h,{style:d}),{type:"type",value:n,keyName:r}),S=v&&p(M({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(T.Fragment,{children:[o&&(x||b.jsx(m,M({},h,{style:d}))),S||b.jsx(m,M({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};pg.displayName="JVR.TypeFalse";var mg=i=>{var{children:n,keyName:r}=i,{Float:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,YN),m=f||"span",d=M({},Yt,s.style||{}),v=p&&typeof p=="function",x=v&&p(M({},h,{style:d}),{type:"type",value:n,keyName:r}),S=v&&p(M({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(T.Fragment,{children:[o&&(x||b.jsx(m,M({},h,{style:d}))),S||b.jsx(m,M({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};mg.displayName="JVR.TypeFloat";var gg=i=>{var{children:n,keyName:r}=i,{Int:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,QN),m=f||"span",d=M({},Yt,s.style||{}),v=p&&typeof p=="function",x=v&&p(M({},h,{style:d}),{type:"type",value:n,keyName:r}),S=v&&p(M({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(T.Fragment,{children:[o&&(x||b.jsx(m,M({},h,{style:d}))),S||b.jsx(m,M({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};gg.displayName="JVR.TypeInt";var vg=i=>{var{children:n,keyName:r}=i,{Bigint:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,ZN),m=f||"span",d=M({},Yt,s.style||{}),v=p&&typeof p=="function",x=v&&p(M({},h,{style:d}),{type:"type",value:n,keyName:r}),S=v&&p(M({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(T.Fragment,{children:[o&&(x||b.jsx(m,M({},h,{style:d}))),S||b.jsx(m,M({},h,{className:"w-rjv-value",children:Xo(n==null?void 0:n.toString())}))]})};vg.displayName="JVR.TypeFloat";var yg=i=>{var{children:n,keyName:r}=i,{Url:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,KN),m=f||"span",d=M({},Yt,s.style),v=p&&typeof p=="function",x=v&&p(M({},h,{style:d}),{type:"type",value:n,keyName:r}),S=v&&p(M({},h,{children:n==null?void 0:n.href,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(T.Fragment,{children:[o&&(x||b.jsx(m,M({},h,{style:d}))),S||b.jsxs("a",M({href:n==null?void 0:n.href,target:"_blank"},h,{className:"w-rjv-value",children:[b.jsx(yi,{}),n==null?void 0:n.href,b.jsx(yi,{})]}))]})};yg.displayName="JVR.TypeUrl";var bg=i=>{var{children:n,keyName:r}=i,{Date:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,XN),m=f||"span",d=M({},Yt,s.style||{}),v=p&&typeof p=="function",x=v&&p(M({},h,{style:d}),{type:"type",value:n,keyName:r}),S=n instanceof Date?n.toLocaleString():n,C=v&&p(M({},h,{children:S,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(T.Fragment,{children:[o&&(x||b.jsx(m,M({},h,{style:d}))),C||b.jsx(m,M({},h,{className:"w-rjv-value",children:S}))]})};bg.displayName="JVR.TypeDate";var Sg=i=>{var{children:n,keyName:r}=i,{Undefined:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,JN),m=f||"span",d=M({},Yt,s.style||{}),v=p&&typeof p=="function",x=v&&p(M({},h,{style:d}),{type:"type",value:n,keyName:r}),S=v&&p(M({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(T.Fragment,{children:[o&&(x||b.jsx(m,M({},h,{style:d}))),S]})};Sg.displayName="JVR.TypeUndefined";var xg=i=>{var{children:n,keyName:r}=i,{Null:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,FN),m=f||"span",d=M({},Yt,s.style||{}),v=p&&typeof p=="function",x=v&&p(M({},h,{style:d}),{type:"type",value:n,keyName:r}),S=v&&p(M({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(T.Fragment,{children:[o&&(x||b.jsx(m,M({},h,{style:d}))),S]})};xg.displayName="JVR.TypeNull";var Ng=i=>{var{children:n,keyName:r}=i,{Nan:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,PN),m=f||"span",d=M({},Yt,s.style||{}),v=p&&typeof p=="function",x=v&&p(M({},h,{style:d}),{type:"type",value:n,keyName:r}),S=v&&p(M({},h,{children:n==null?void 0:n.toString(),className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(T.Fragment,{children:[o&&(x||b.jsx(m,M({},h,{style:d}))),S]})};Ng.displayName="JVR.TypeNan";var WN=i=>Number(i)===i&&i%1!==0||isNaN(i),Eg=i=>{var{value:n,keyName:r}=i,s={keyName:r};return n instanceof URL?b.jsx(yg,M({},s,{children:n})):typeof n=="string"?b.jsx(dg,M({},s,{children:n})):n===!0?b.jsx(hg,M({},s,{children:n})):n===!1?b.jsx(pg,M({},s,{children:n})):n===null?b.jsx(xg,M({},s,{children:n})):n===void 0?b.jsx(Sg,M({},s,{children:n})):n instanceof Date?b.jsx(bg,M({},s,{children:n})):typeof n=="number"&&isNaN(n)?b.jsx(Ng,M({},s,{children:n})):typeof n=="number"&&WN(n)?b.jsx(mg,M({},s,{children:n})):typeof n=="bigint"?b.jsx(vg,M({},s,{children:n})):typeof n=="number"?b.jsx(gg,M({},s,{children:n})):null};Eg.displayName="JVR.Value";function Qa(i,n,r){var s=RN(),o=[i.className,n.className].filter(Boolean).join(" "),f=M({},i,n,{className:o,style:M({},i.style,n.style),children:n.children||i.children});T.useEffect(()=>s({[r]:f}),[n])}function Ct(i,n,r){var s=SN(),o=[i.className,n.className].filter(Boolean).join(" "),f=M({},i,n,{className:o,style:M({},i.style,n.style),children:n.children||i.children});T.useEffect(()=>s({[r]:f}),[n])}function sl(i,n,r){var s=CN(),o=[i.className,n.className].filter(Boolean).join(" "),f=M({},i,n,{className:o,style:M({},i.style,n.style),children:n.children||i.children});T.useEffect(()=>s({[r]:f}),[n])}var IN=["as","render"],Rg=i=>{var{KeyName:n={}}=Bt();return sl(n,i,"KeyName"),null};Rg.displayName="JVR.KeyName";var Tg=i=>{var{children:n,value:r,parentValue:s,keyName:o,keys:f}=i,p=typeof n=="number",h={color:p?"var(--w-rjv-key-number, #268bd2)":"var(--w-rjv-key-string, #002b36)"},{KeyName:m={}}=Bt(),{as:d,render:v}=m,x=ge(m,IN);x.style=M({},x.style,h);var S=d||"span",C=v&&typeof v=="function"&&v(M({},x,{children:n}),{value:r,parentValue:s,keyName:o,keys:f||(o?[o]:[])});return C||b.jsx(S,M({},x,{children:n}))};Tg.displayName="JVR.KeyNameComp";var eE=["children","value","parentValue","keyName","keys"],tE=["as","render","children"],wg=i=>{var{Row:n={}}=Bt();return sl(n,i,"Row"),null};wg.displayName="JVR.Row";var Cg=i=>{var{children:n,value:r,parentValue:s,keyName:o,keys:f}=i,p=ge(i,eE),{Row:h={}}=Bt(),{as:m,render:d}=h,v=ge(h,tE),x=m||"div",S=d&&typeof d=="function"&&d(M({},p,v,{children:n}),{value:r,keyName:o,parentValue:s,keys:f});return S||b.jsx(x,M({},p,v,{children:n}))};Cg.displayName="JVR.RowComp";function aE(i){var n=T.useRef();return T.useEffect(()=>{n.current=i}),n.current}function nE(i){var{value:n,highlightUpdates:r,highlightContainer:s}=i,o=aE(n),f=T.useMemo(()=>{if(!r||o===void 0)return!1;if(typeof n!=typeof o)return!0;if(typeof n=="number")return isNaN(n)&&isNaN(o)?!1:n!==o;if(Array.isArray(n)!==Array.isArray(o))return!0;if(typeof n=="object"||typeof n=="function")return!1;if(n!==o)return!0},[r,n]);T.useEffect(()=>{s&&s.current&&f&&"animate"in s.current&&s.current.animate([{backgroundColor:"var(--w-rjv-update-color, #ebcb8b)"},{backgroundColor:""}],{duration:1e3,easing:"ease-in"})},[f,n,s])}var lE=["keyName","value","parentValue","expandKey","keys"],iE=["as","render"],Nc=i=>{var{keyName:n,value:r,parentValue:s,expandKey:o,keys:f}=i,p=ge(i,lE),{onCopied:h,enableClipboard:m}=gn(),d=hN(),v=d[o],[x,S]=T.useState(!1),{Copied:C={}}=Bt();if(m===!1||!v)return null;var E=K=>{K.stopPropagation();var ue="";typeof r=="number"&&r===1/0?ue="Infinity":typeof r=="number"&&isNaN(r)?ue="NaN":typeof r=="bigint"?ue=Xo(r):r instanceof Date?ue=r.toLocaleString():ue=JSON.stringify(r,(ee,F)=>typeof F=="bigint"?Xo(F):F,2),h&&h(ue,r),S(!0);var re=navigator.clipboard||{writeText(ee){return new Promise((F,ne)=>{var pe=document.createElement("textarea");pe.style.position="absolute",pe.style.opacity="0",pe.style.left="-99999999px",pe.value=ee,document.body.appendChild(pe),pe.select(),document.execCommand("copy")?F():ne(),pe.remove()})}};re.writeText(ue).then(()=>{var ee=setTimeout(()=>{S(!1),clearTimeout(ee)},3e3)}).catch(ee=>{})},z={style:{display:"inline-flex"},fill:x?"var(--w-rjv-copied-success-color, #28a745)":"var(--w-rjv-copied-color, currentColor)",onClick:E},{render:B}=C,U=ge(C,iE),D=M({},U,p,z,{style:M({},U.style,p.style,z.style)}),G=B&&typeof B=="function",J=G&&B(M({},D,{"data-copied":x}),{value:r,keyName:n,keys:f,parentValue:s});return J||(x?b.jsx("svg",M({viewBox:"0 0 32 36"},D,{children:b.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})):b.jsx("svg",M({viewBox:"0 0 32 36"},D,{children:b.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})))};Nc.displayName="JVR.Copied";function jg(){var i=T.useRef(null);return i.current===null&&(i.current="custom-id-"+Math.random().toString(36).substr(2,9)),i.current}var Ag=i=>{var n,{value:r,expandKey:s="",level:o,keys:f=[]}=i,p=ss(),{objectSortKeys:h,indentWidth:m,collapsed:d,shouldExpandNodeInitially:v}=gn(),x=Array.isArray(r),S=typeof d=="boolean"?d:typeof d=="number"?o>d:!1,C=(n=p[s])!=null?n:S;if(p[s]===void 0&&v&&v(C,{value:r,keys:f,level:o})||C)return null;var E=x?Object.entries(r).map(B=>[Number(B[0]),B[1]]):Object.entries(r);h&&(E=h===!0?E.sort((B,U)=>{var[D]=B,[G]=U;return typeof D=="string"&&typeof G=="string"?D.localeCompare(G):0}):E.sort((B,U)=>{var[D,G]=B,[J,K]=U;return typeof D=="string"&&typeof J=="string"?h(D,J,G,K):0}));var z={borderLeft:"var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)",paddingLeft:m,marginLeft:6};return b.jsx("div",{className:"w-rjv-wrap",style:z,children:E.map((B,U)=>{var[D,G]=B;return b.jsx(Og,{parentValue:r,keyName:D,keys:[...f,D],value:G,level:o},U)})})};Ag.displayName="JVR.KeyValues";var Ec=i=>{var{keyName:n,parentValue:r,keys:s,value:o}=i,{highlightUpdates:f}=gn(),p=typeof n=="number",h=T.useRef(null);nE({value:o,highlightUpdates:f,highlightContainer:h});var m={keyName:n,value:o,keys:s,parentValue:r};return b.jsxs(T.Fragment,{children:[b.jsxs("span",{ref:h,children:[b.jsx(Ko,M({isNumber:p,"data-placement":"left"},m)),b.jsx(Tg,M({},m,{children:n})),b.jsx(Ko,M({isNumber:p,"data-placement":"right"},m))]}),b.jsx(rg,M({},m))]})};Ec.displayName="JVR.KayName";var Og=i=>{var{keyName:n,value:r,parentValue:s,level:o=0,keys:f=[]}=i,p=qm(),h=jg(),m=Array.isArray(r),d=r instanceof Set,v=r instanceof Map,x=r instanceof Date,S=r instanceof URL,C=r&&typeof r=="object"&&!m&&!d&&!v&&!x&&!S,E=C||m||d||v;if(E){var z=d?Array.from(r):v?Object.fromEntries(r):r;return b.jsx(Rc,{keyName:n,value:z,parentValue:s,initialValue:r,keys:f,level:o+1})}var B={onMouseEnter:()=>p({[h]:!0}),onMouseLeave:()=>p({[h]:!1})};return b.jsxs(Cg,M({className:"w-rjv-line",value:r,keyName:n,keys:f,parentValue:s},B,{children:[b.jsx(Ec,{keyName:n,value:r,keys:f,parentValue:s}),b.jsx(Eg,{keyName:n,value:r}),b.jsx(Nc,{keyName:n,value:r,keys:f,parentValue:s,expandKey:h})]}))};Og.displayName="JVR.KeyValuesItem";var rE=["value","keyName"],sE=["as","render"],kg=i=>{var{CountInfoExtra:n={}}=Bt();return sl(n,i,"CountInfoExtra"),null};kg.displayName="JVR.CountInfoExtra";var Lg=i=>{var{value:n={},keyName:r}=i,s=ge(i,rE),{CountInfoExtra:o={}}=Bt(),{as:f,render:p}=o,h=ge(o,sE);if(!p&&!h.children)return null;var m=f||"span",d=p&&typeof p=="function",v=M({},h,s),x=d&&p(v,{value:n,keyName:r});return x||b.jsx(m,M({},v))};Lg.displayName="JVR.CountInfoExtraComps";var uE=["value","keyName"],oE=["as","render"],zg=i=>{var{CountInfo:n={}}=Bt();return sl(n,i,"CountInfo"),null};zg.displayName="JVR.CountInfo";var Dg=i=>{var{value:n={},keyName:r}=i,s=ge(i,uE),{displayObjectSize:o}=gn(),{CountInfo:f={}}=Bt();if(!o)return null;var{as:p,render:h}=f,m=ge(f,oE),d=p||"span";m.style=M({},m.style,i.style);var v=Object.keys(n).length;m.children||(m.children=v+" item"+(v===1?"":"s"));var x=M({},m,s),S=h&&typeof h=="function",C=S&&h(M({},x,{"data-length":v}),{value:n,keyName:r});return C||b.jsx(d,M({},x))};Dg.displayName="JVR.CountInfoComp";var cE=["as","render"],_g=i=>{var{Ellipsis:n={}}=Bt();return sl(n,i,"Ellipsis"),null};_g.displayName="JVR.Ellipsis";var Mg=i=>{var{isExpanded:n,value:r,keyName:s}=i,{Ellipsis:o={}}=Bt(),{as:f,render:p}=o,h=ge(o,cE),m=f||"span",d=p&&typeof p=="function"&&p(M({},h,{"data-expanded":n}),{value:r,keyName:s});return d||(!n||typeof r=="object"&&Object.keys(r).length==0?null:b.jsx(m,M({},h)))};Mg.displayName="JVR.EllipsisComp";var Ug=i=>{var n,{keyName:r,expandKey:s,keys:o=[],initialValue:f,value:p,parentValue:h,level:m}=i,d=ss(),v=vN(),{onExpand:x,collapsed:S,shouldExpandNodeInitially:C}=gn(),E=Array.isArray(p),z=p instanceof Set,B=typeof S=="boolean"?S:typeof S=="number"?m>S:!1,U=typeof p=="object",D=(n=d[s])!=null?n:B,G=C&&C(D,{value:p,keys:o,level:m});d[s]===void 0&&G!==void 0&&(D=G);var J=()=>{var pe={expand:!D,value:p,keyid:s,keyName:r};x&&x(pe),v({[s]:pe.expand})},K={display:"inline-flex",alignItems:"center"},ue={transform:"rotate("+(D?"-90":"0")+"deg)",transition:"all 0.3s"},re=Object.keys(p).length,ee=re!==0&&(E||z||U),F={style:K};ee&&(F.onClick=J);var ne={keyName:r,value:p,keys:o,parentValue:h};return b.jsxs("span",M({},F,{children:[ee&&b.jsx(sg,M({style:ue,expandKey:s},ne)),(r||typeof r=="number")&&b.jsx(Ec,M({},ne)),b.jsx(cg,{value:f,keyName:r}),b.jsx(fg,{value:f,keyName:r}),b.jsx(ug,M({isBrackets:E||z},ne)),b.jsx(Mg,{keyName:r,value:p,isExpanded:D}),b.jsx(xc,M({isVisiable:D||!ee,isBrackets:E||z},ne)),b.jsx(Dg,{value:p,keyName:r}),b.jsx(Lg,{value:p,keyName:r}),b.jsx(Nc,{keyName:r,value:p,expandKey:s,parentValue:h,keys:o})]}))};Ug.displayName="JVR.NestedOpen";var fE=["className","children","parentValue","keyid","level","value","initialValue","keys","keyName"],Rc=T.forwardRef((i,n)=>{var{className:r="",parentValue:s,level:o=1,value:f,initialValue:p,keys:h,keyName:m}=i,d=ge(i,fE),v=qm(),x=jg(),S=[r,"w-rjv-inner"].filter(Boolean).join(" "),C={onMouseEnter:()=>v({[x]:!0}),onMouseLeave:()=>v({[x]:!1})};return b.jsxs("div",M({className:S,ref:n},d,C,{children:[b.jsx(Ug,{expandKey:x,value:f,level:o,keys:h,parentValue:s,keyName:m,initialValue:p}),b.jsx(Ag,{expandKey:x,value:f,level:o,keys:h,parentValue:s,keyName:m}),b.jsx(og,{expandKey:x,value:f,level:o,keys:h})]}))});Rc.displayName="JVR.Container";var Bg=i=>{var{BraceLeft:n={}}=mt();return Qa(n,i,"BraceLeft"),null};Bg.displayName="JVR.BraceLeft";var Hg=i=>{var{BraceRight:n={}}=mt();return Qa(n,i,"BraceRight"),null};Hg.displayName="JVR.BraceRight";var Vg=i=>{var{BracketsLeft:n={}}=mt();return Qa(n,i,"BracketsLeft"),null};Vg.displayName="JVR.BracketsLeft";var $g=i=>{var{BracketsRight:n={}}=mt();return Qa(n,i,"BracketsRight"),null};$g.displayName="JVR.BracketsRight";var qg=i=>{var{Arrow:n={}}=mt();return Qa(n,i,"Arrow"),null};qg.displayName="JVR.Arrow";var Gg=i=>{var{Colon:n={}}=mt();return Qa(n,i,"Colon"),null};Gg.displayName="JVR.Colon";var Yg=i=>{var{Quote:n={}}=mt();return Qa(n,i,"Quote"),null};Yg.displayName="JVR.Quote";var Qg=i=>{var{ValueQuote:n={}}=mt();return Qa(n,i,"ValueQuote"),null};Qg.displayName="JVR.ValueQuote";var Zg=i=>{var{Bigint:n={}}=Le();return Ct(n,i,"Bigint"),null};Zg.displayName="JVR.Bigint";var Kg=i=>{var{Date:n={}}=Le();return Ct(n,i,"Date"),null};Kg.displayName="JVR.Date";var Xg=i=>{var{False:n={}}=Le();return Ct(n,i,"False"),null};Xg.displayName="JVR.False";var Jg=i=>{var{Float:n={}}=Le();return Ct(n,i,"Float"),null};Jg.displayName="JVR.Float";var Fg=i=>{var{Int:n={}}=Le();return Ct(n,i,"Int"),null};Fg.displayName="JVR.Int";var Pg=i=>{var{Map:n={}}=Le();return Ct(n,i,"Map"),null};Pg.displayName="JVR.Map";var Wg=i=>{var{Nan:n={}}=Le();return Ct(n,i,"Nan"),null};Wg.displayName="JVR.Nan";var Ig=i=>{var{Null:n={}}=Le();return Ct(n,i,"Null"),null};Ig.displayName="JVR.Null";var ev=i=>{var{Set:n={}}=Le();return Ct(n,i,"Set"),null};ev.displayName="JVR.Set";var tv=i=>{var{Str:n={}}=Le();return Ct(n,i,"Str"),null};tv.displayName="JVR.StringText";var av=i=>{var{True:n={}}=Le();return Ct(n,i,"True"),null};av.displayName="JVR.True";var nv=i=>{var{Undefined:n={}}=Le();return Ct(n,i,"Undefined"),null};nv.displayName="JVR.Undefined";var lv=i=>{var{Url:n={}}=Le();return Ct(n,i,"Url"),null};lv.displayName="JVR.Url";var iv=i=>{var{Copied:n={}}=Bt();return sl(n,i,"Copied"),null};iv.displayName="JVR.Copied";var dE=["className","style","value","children","collapsed","shouldExpandNodeInitially","indentWidth","displayObjectSize","shortenTextAfterLength","stringEllipsis","highlightUpdates","enableClipboard","displayDataTypes","objectSortKeys","onExpand","onCopied"],Te=T.forwardRef((i,n)=>{var{className:r="",style:s,value:o,children:f,collapsed:p,shouldExpandNodeInitially:h,indentWidth:m=15,displayObjectSize:d=!0,shortenTextAfterLength:v=30,stringEllipsis:x,highlightUpdates:S=!0,enableClipboard:C=!0,displayDataTypes:E=!0,objectSortKeys:z=!1,onExpand:B,onCopied:U}=i,D=ge(i,dE),G=M({lineHeight:1.4,fontFamily:"var(--w-rjv-font-family, Menlo, monospace)",color:"var(--w-rjv-color, #002b36)",backgroundColor:"var(--w-rjv-background-color, #00000000)",fontSize:13},s),J=["w-json-view-container","w-rjv",r].filter(Boolean).join(" ");return b.jsxs(ig,{initialState:{value:o,objectSortKeys:z,indentWidth:m,shouldExpandNodeInitially:h,displayObjectSize:d,collapsed:p,enableClipboard:C,shortenTextAfterLength:v,stringEllipsis:x,highlightUpdates:S,onCopied:U,onExpand:B},initialTypes:{displayDataTypes:E},children:[b.jsx(Rc,M({value:o},D,{ref:n,className:J,style:G})),f]})});Te.Bigint=Zg;Te.Date=Kg;Te.False=Xg;Te.Float=Jg;Te.Int=Fg;Te.Map=Pg;Te.Nan=Wg;Te.Null=Ig;Te.Set=ev;Te.String=tv;Te.True=av;Te.Undefined=nv;Te.Url=lv;Te.ValueQuote=Qg;Te.Arrow=qg;Te.Colon=Gg;Te.Quote=Yg;Te.Ellipsis=_g;Te.BraceLeft=Bg;Te.BraceRight=Hg;Te.BracketsLeft=Vg;Te.BracketsRight=$g;Te.Copied=iv;Te.CountInfo=zg;Te.CountInfoExtra=kg;Te.KeyName=Rg;Te.Row=wg;Te.displayName="JVR.JsonView";var lm={"--w-rjv-font-family":"monospace","--w-rjv-color":"#002b36","--w-rjv-key-string":"#002b36","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ebebeb","--w-rjv-arrow-color":"var(--w-rjv-color)","--w-rjv-edit-color":"var(--w-rjv-color)","--w-rjv-info-color":"#0000004d","--w-rjv-update-color":"#ebcb8b","--w-rjv-copied-color":"#002b36","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#236a7c","--w-rjv-colon-color":"#002b36","--w-rjv-brackets-color":"#236a7c","--w-rjv-quotes-color":"var(--w-rjv-key-string)","--w-rjv-quotes-string-color":"var(--w-rjv-type-string-color)","--w-rjv-type-string-color":"#cb4b16","--w-rjv-type-int-color":"#268bd2","--w-rjv-type-float-color":"#859900","--w-rjv-type-bigint-color":"#268bd2","--w-rjv-type-boolean-color":"#2aa198","--w-rjv-type-date-color":"#586e75","--w-rjv-type-url-color":"#0969da","--w-rjv-type-null-color":"#d33682","--w-rjv-type-nan-color":"#859900","--w-rjv-type-undefined-color":"#586e75"};function hE(i){const n=Object.keys(i),r=n.length>0?n[0]:void 0;return(s,o,f={})=>{if(!r)return f.default??s;const p=i[o]??i[r],h=s.split(".");let m=p;for(const d of h){if(typeof m=="string"||!m||!Object.prototype.hasOwnProperty.call(m,d))return f.default??s;m=m[d]}return typeof m=="string"?m:f.default??s}}function pE({siteSchema:i,schemaTranslate:n}){const r=new Set;return b.jsx("ul",{children:b.jsx(Jo,{schema:i,schemaT:n,typeName:"home",displayedNodeTypeNames:r})})}function Jo({schema:i,schemaT:n,typeName:r,depth:s=0,displayedNodeTypeNames:o}){const{i18n:f}=ot(),p=mE(i,r);if(!p)return null;const h=p.routingChildren||[],m=p.regularChildren||[],d=p.lists||[],v=p.documentKind==="routing",x=n(`nodeTypes.${r}.label`,f.language,{default:r});return o.has(r)?b.jsx("li",{children:b.jsxs("div",{children:[v?b.jsx("strong",{children:x}):x," (",b.jsx("code",{children:r}),")"]})}):(o.add(r),b.jsxs("li",{children:[b.jsxs("div",{children:[v?b.jsx("strong",{children:x}):x," (",b.jsx("code",{children:r}),")"]}),d.map(S=>b.jsxs("div",{style:{marginLeft:"30px",color:"#999",fontStyle:"italic"},children:[n(`nodeTypes.${r}.lists.${S.listName}.label`,f.language,{default:S.listName})," ","(",b.jsx("code",{children:S.listName})," [",b.jsx("code",{children:S.parts.join("</code>, <code>")}),"])"]},S.listName)),h.length>0&&b.jsx("ul",{children:h.map(S=>b.jsx(Jo,{schema:i,schemaT:n,typeName:S,depth:s+1,displayedNodeTypeNames:o},S))}),m.length>0&&b.jsx("ul",{children:m.map(S=>b.jsx(Jo,{schema:i,schemaT:n,typeName:S,depth:s+1,displayedNodeTypeNames:o},S))})]}))}function mE(i,n){var r;return(r=i.nodeTypes)==null?void 0:r.find(s=>s.kind==="document"&&s.typeName===n)}const qr=Te;function gE({step:i}){const{t:n}=ot(),[r,s]=T.useState("tree"),{siteSchema:o,l10n:f}=i,p=hE(f),h=(m,d)=>d.keys.length===1&&d.keys[0]==="plugins";return b.jsxs("div",{className:"SchemaViewer",children:[b.jsxs("div",{className:"SchemaViewer-tabs",children:[b.jsx(rt,{className:`SchemaViewer-tab ${r==="tree"?"active":""}`,onClick:()=>s("tree"),children:n("treeView")}),b.jsx(rt,{className:`SchemaViewer-tab ${r==="schema"?"active":""}`,onClick:()=>s("schema"),children:n("siteSchema")}),b.jsx(rt,{className:`SchemaViewer-tab ${r==="locales"?"active":""}`,onClick:()=>s("locales"),children:n("labels")})]}),b.jsxs("div",{className:"SchemaViewer-main",children:[b.jsx("div",{className:"SchemaViewer-content",style:{display:r==="tree"?"block":"none"},children:b.jsx(pE,{siteSchema:o,schemaTranslate:p})}),b.jsx("div",{className:"SchemaViewer-content",style:{display:r==="locales"?"block":"none"},children:b.jsx(qr,{value:f,style:lm,enableClipboard:!1,displayObjectSize:!1,displayDataTypes:!1,shortenTextAfterLength:0})}),b.jsx("div",{className:"SchemaViewer-content",style:{display:r==="schema"?"block":"none"},children:b.jsxs(qr,{value:o,style:lm,enableClipboard:!1,displayObjectSize:!1,displayDataTypes:!1,shortenTextAfterLength:0,shouldExpandNodeInitially:h,children:[b.jsx(qr.Colon,{render:(m,{parentValue:d})=>Array.isArray(d)&&m.children===":"?b.jsx("span",{}):b.jsx("span",{...m})}),b.jsx(qr.KeyName,{render:({...m},{parentValue:d})=>Array.isArray(d)&&Number.isFinite(m.children)?b.jsx("span",{}):b.jsx("span",{...m})})]})})]})]})}function vE({step:i}){const{t:n}=ot(),{workSession:r,appendNewStep:s}=pn(),[o,f]=T.useState(!1),[p,h]=T.useState(!1),[m,d]=T.useState(!1),[v,x]=T.useState(void 0),S=rl(),C=()=>{f(!o)},E=async B=>{if(!r)return;d(!0),x(void 0);const U=vi();if(!U){x(n("sessionExpired")),d(!1);return}try{const D=await Ga({command:"updateSiteSchema",sessionToken:U,prompt:B,fromStepNumber:i.stepNumber});D.success&&D.result?(f(!1),s(D.result),S(`/step/${D.result.stepNumber}`)):x(n("promptSubmissionFailed"))}catch(D){console.error("Error updating schema:",D),x(n("errorOccurred"))}finally{d(!1)}},z=async({withSampleData:B})=>{if(!r)return;d(!0),x(void 0),h(!1);const U=vi();if(!U){x(n("sessionExpired")),d(!1);return}try{const D=await Ga({command:"generateSite",sessionToken:U,fromStepNumber:i.stepNumber,withSampleData:B});D.success&&D.result?(s(D.result),S(`/step/${D.result.stepNumber}`)):x(n("generationFailed"))}catch(D){console.error("Error generating site:",D),x(n("errorOccurred"))}finally{d(!1)}};return b.jsx(wt,{children:b.jsxs("div",{className:"CompletedStep",children:[b.jsx(gE,{step:i}),i.explanation&&b.jsx(Ni,{content:i.explanation,title:n("explanation")}),b.jsxs("div",{className:"CompletedStep-actions",children:[b.jsx(rt,{onClick:C,className:"CompletedStep-button",children:n("modifySchema")}),b.jsx(rt,{onClick:()=>h(!0),className:"CompletedStep-button",children:n("generateTheWebsite")})]}),o&&b.jsxs("div",{className:"CompletedStep-updateForm",children:[b.jsx("h3",{children:n("updateSchema")}),b.jsx(jm,{placeholder:n("updatePromptPlaceholder"),submitLabel:n("modifySchema"),onSubmit:E,isLoading:m,error:v})]}),b.jsx(fN,{isOpen:p,title:n("generateTheWebsite"),message:n("aboutToGenerateWebsite"),confirmLabel:n("confirm"),onConfirm:z,onCancel:()=>h(!1)}),v&&!o&&b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:v})})]})})}function yE({step:i}){const{t:n}=ot();return b.jsx(wt,{children:b.jsxs("div",{className:"ErrorStep",children:[b.jsx("p",{className:"ErrorStep-message",children:n("stepFailed")}),i.explanation&&b.jsx(Ni,{content:i.explanation,variant:"error"})]})})}function bE({step:i}){const{t:n}=ot(),r=()=>{const s=`
|
|
154
|
+
`+a+`</table>
|
|
155
|
+
`}tablerow({text:t}){return`<tr>
|
|
156
|
+
${t}</tr>
|
|
157
|
+
`}tablecell(t){const n=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+n+`</${i}>
|
|
158
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Sn(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:i}){const a=this.parser.parseInline(i),l=Tv(t);if(l===null)return a;t=l;let u='<a href="'+t+'"';return n&&(u+=' title="'+Sn(n)+'"'),u+=">"+a+"</a>",u}image({href:t,title:n,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));const l=Tv(t);if(l===null)return Sn(i);t=l;let u=`<img src="${t}" alt="${i}"`;return n&&(u+=` title="${Sn(n)}"`),u+=">",u}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Sn(t.text)}},Xd=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Vn=class fd{constructor(n){w(this,"options");w(this,"renderer");w(this,"textRenderer");this.options=n||ir,this.options.renderer=this.options.renderer||new Lo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Xd}static parse(n,i){return new fd(i).parse(n)}static parseInline(n,i){return new fd(i).parseInline(n)}parse(n,i=!0){var l,u;let a="";for(let f=0;f<n.length;f++){const d=n[f];if((u=(l=this.options.extensions)==null?void 0:l.renderers)!=null&&u[d.type]){const p=d,g=this.options.extensions.renderers[p.type].call({parser:this},p);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(p.type)){a+=g||"";continue}}const m=d;switch(m.type){case"space":{a+=this.renderer.space(m);continue}case"hr":{a+=this.renderer.hr(m);continue}case"heading":{a+=this.renderer.heading(m);continue}case"code":{a+=this.renderer.code(m);continue}case"table":{a+=this.renderer.table(m);continue}case"blockquote":{a+=this.renderer.blockquote(m);continue}case"list":{a+=this.renderer.list(m);continue}case"html":{a+=this.renderer.html(m);continue}case"paragraph":{a+=this.renderer.paragraph(m);continue}case"text":{let p=m,g=this.renderer.text(p);for(;f+1<n.length&&n[f+1].type==="text";)p=n[++f],g+=`
|
|
159
|
+
`+this.renderer.text(p);i?a+=this.renderer.paragraph({type:"paragraph",raw:g,text:g,tokens:[{type:"text",raw:g,text:g,escaped:!0}]}):a+=g;continue}default:{const p='Token with "'+m.type+'" type was not found.';if(this.options.silent)return console.error(p),"";throw new Error(p)}}}return a}parseInline(n,i=this.renderer){var l,u;let a="";for(let f=0;f<n.length;f++){const d=n[f];if((u=(l=this.options.extensions)==null?void 0:l.renderers)!=null&&u[d.type]){const p=this.options.extensions.renderers[d.type].call({parser:this},d);if(p!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(d.type)){a+=p||"";continue}}const m=d;switch(m.type){case"escape":{a+=i.text(m);break}case"html":{a+=i.html(m);break}case"link":{a+=i.link(m);break}case"image":{a+=i.image(m);break}case"strong":{a+=i.strong(m);break}case"em":{a+=i.em(m);break}case"codespan":{a+=i.codespan(m);break}case"br":{a+=i.br(m);break}case"del":{a+=i.del(m);break}case"text":{a+=i.text(m);break}default:{const p='Token with "'+m.type+'" type was not found.';if(this.options.silent)return console.error(p),"";throw new Error(p)}}}return a}},zf,vo=(zf=class{constructor(t){w(this,"options");w(this,"block");this.options=t||ir}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Kn.lex:Kn.lexInline}provideParser(){return this.block?Vn.parse:Vn.parseInline}},w(zf,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),zf),v3=class{constructor(...t){w(this,"defaults",Hd());w(this,"options",this.setOptions);w(this,"parse",this.parseMarkdown(!0));w(this,"parseInline",this.parseMarkdown(!1));w(this,"Parser",Vn);w(this,"Renderer",Lo);w(this,"TextRenderer",Xd);w(this,"Lexer",Kn);w(this,"Tokenizer",Mo);w(this,"Hooks",vo);this.use(...t)}walkTokens(t,n){var a,l;let i=[];for(const u of t)switch(i=i.concat(n.call(this,u)),u.type){case"table":{const f=u;for(const d of f.header)i=i.concat(this.walkTokens(d.tokens,n));for(const d of f.rows)for(const m of d)i=i.concat(this.walkTokens(m.tokens,n));break}case"list":{const f=u;i=i.concat(this.walkTokens(f.items,n));break}default:{const f=u;(l=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&l[f.type]?this.defaults.extensions.childTokens[f.type].forEach(d=>{const m=f[d].flat(1/0);i=i.concat(this.walkTokens(m,n))}):f.tokens&&(i=i.concat(this.walkTokens(f.tokens,n)))}}return i}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{const a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){const u=n.renderers[l.name];u?n.renderers[l.name]=function(...f){let d=l.renderer.apply(this,f);return d===!1&&(d=u.apply(this,f)),d}:n.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const u=n[l.level];u?u.unshift(l.tokenizer):n[l.level]=[l.tokenizer],l.start&&(l.level==="block"?n.startBlock?n.startBlock.push(l.start):n.startBlock=[l.start]:l.level==="inline"&&(n.startInline?n.startInline.push(l.start):n.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(n.childTokens[l.name]=l.childTokens)}),a.extensions=n),i.renderer){const l=this.defaults.renderer||new Lo(this.defaults);for(const u in i.renderer){if(!(u in l))throw new Error(`renderer '${u}' does not exist`);if(["options","parser"].includes(u))continue;const f=u,d=i.renderer[f],m=l[f];l[f]=(...p)=>{let g=d.apply(l,p);return g===!1&&(g=m.apply(l,p)),g||""}}a.renderer=l}if(i.tokenizer){const l=this.defaults.tokenizer||new Mo(this.defaults);for(const u in i.tokenizer){if(!(u in l))throw new Error(`tokenizer '${u}' does not exist`);if(["options","rules","lexer"].includes(u))continue;const f=u,d=i.tokenizer[f],m=l[f];l[f]=(...p)=>{let g=d.apply(l,p);return g===!1&&(g=m.apply(l,p)),g}}a.tokenizer=l}if(i.hooks){const l=this.defaults.hooks||new vo;for(const u in i.hooks){if(!(u in l))throw new Error(`hook '${u}' does not exist`);if(["options","block"].includes(u))continue;const f=u,d=i.hooks[f],m=l[f];vo.passThroughHooks.has(u)?l[f]=p=>{if(this.defaults.async)return Promise.resolve(d.call(l,p)).then(v=>m.call(l,v));const g=d.call(l,p);return m.call(l,g)}:l[f]=(...p)=>{let g=d.apply(l,p);return g===!1&&(g=m.apply(l,p)),g}}a.hooks=l}if(i.walkTokens){const l=this.defaults.walkTokens,u=i.walkTokens;a.walkTokens=function(f){let d=[];return d.push(u.call(this,f)),l&&(d=d.concat(l.call(this,f))),d}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Kn.lex(t,n??this.defaults)}parser(t,n){return Vn.parse(t,n??this.defaults)}parseMarkdown(t){return(i,a)=>{const l={...a},u={...this.defaults,...l},f=this.onError(!!u.silent,!!u.async);if(this.defaults.async===!0&&l.async===!1)return f(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return f(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return f(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));u.hooks&&(u.hooks.options=u,u.hooks.block=t);const d=u.hooks?u.hooks.provideLexer():t?Kn.lex:Kn.lexInline,m=u.hooks?u.hooks.provideParser():t?Vn.parse:Vn.parseInline;if(u.async)return Promise.resolve(u.hooks?u.hooks.preprocess(i):i).then(p=>d(p,u)).then(p=>u.hooks?u.hooks.processAllTokens(p):p).then(p=>u.walkTokens?Promise.all(this.walkTokens(p,u.walkTokens)).then(()=>p):p).then(p=>m(p,u)).then(p=>u.hooks?u.hooks.postprocess(p):p).catch(f);try{u.hooks&&(i=u.hooks.preprocess(i));let p=d(i,u);u.hooks&&(p=u.hooks.processAllTokens(p)),u.walkTokens&&this.walkTokens(p,u.walkTokens);let g=m(p,u);return u.hooks&&(g=u.hooks.postprocess(g)),g}catch(p){return f(p)}}}onError(t,n){return i=>{if(i.message+=`
|
|
160
|
+
Please report this to https://github.com/markedjs/marked.`,t){const a="<p>An error occurred:</p><pre>"+Sn(i.message+"",!0)+"</pre>";return n?Promise.resolve(a):a}if(n)return Promise.reject(i);throw i}}},Pi=new v3;function Oe(t,n){return Pi.parse(t,n)}Oe.options=Oe.setOptions=function(t){return Pi.setOptions(t),Oe.defaults=Pi.defaults,sx(Oe.defaults),Oe};Oe.getDefaults=Hd;Oe.defaults=ir;Oe.use=function(...t){return Pi.use(...t),Oe.defaults=Pi.defaults,sx(Oe.defaults),Oe};Oe.walkTokens=function(t,n){return Pi.walkTokens(t,n)};Oe.parseInline=Pi.parseInline;Oe.Parser=Vn;Oe.parser=Vn.parse;Oe.Renderer=Lo;Oe.TextRenderer=Xd;Oe.Lexer=Kn;Oe.lexer=Kn.lex;Oe.Tokenizer=Mo;Oe.Hooks=vo;Oe.parse=Oe;Oe.options;Oe.setOptions;Oe.use;Oe.walkTokens;Oe.parseInline;Vn.parse;Kn.lex;function b3(t){if(!t)return"";try{return Oe.parse(t,{async:!1,gfm:!0,breaks:!0})}catch(n){return console.error("Error rendering markdown:",n),t}}function qs({content:t,title:n,variant:i="default",className:a="",children:l}){const u=["Explanation",`Explanation-${i}`,a].filter(Boolean).join(" ");return S.jsxs("div",{className:u,children:[n&&S.jsx("h3",{className:"Explanation-title",children:n}),S.jsx("div",{className:"Explanation-content markdown-content",dangerouslySetInnerHTML:{__html:b3(t)}}),l]})}function x3({isOpen:t,title:n,message:i,confirmLabel:a,cancelLabel:l,onConfirm:u,onCancel:f}){const{t:d}=Ct(),[m,p]=A.useState(!0);if(!t)return null;const g=async()=>{await u({withSampleData:m})},v=b=>{b.key==="Escape"&&f()};return S.jsxs("div",{className:"ConfirmDialog",children:[S.jsx("div",{className:"ConfirmDialog-backdrop",onClick:f,onKeyDown:v,tabIndex:0,role:"button","aria-label":"Close dialog"}),S.jsxs("div",{className:"ConfirmDialog-container",children:[S.jsx("div",{className:"ConfirmDialog-header",children:S.jsx("h3",{className:"ConfirmDialog-title",children:n})}),S.jsxs("div",{className:"ConfirmDialog-body",children:[S.jsx("p",{children:i}),S.jsx("div",{className:"ConfirmDialog-checkbox mt-3",children:S.jsxs("label",{children:[S.jsx("input",{type:"checkbox",checked:m,onChange:b=>p(b.target.checked)}),S.jsx("span",{className:"ml-2",children:d("generateSiteWithData")})]})})]}),S.jsxs("div",{className:"ConfirmDialog-footer",children:[S.jsx(Nt,{onClick:f,severity:"secondary",className:"ConfirmDialog-button",children:l||d("cancel")}),S.jsx(Nt,{onClick:g,className:"ConfirmDialog-button",children:a||d("confirm")})]})]})]})}function _(){return _=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var a in i)({}).hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},_.apply(null,arguments)}function we(t,n){if(t==null)return{};var i={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(n.indexOf(a)!==-1)continue;i[a]=t[a]}return i}var yx={},vx=A.createContext(yx),S3=(t,n)=>_({},t,n),w3=()=>A.useContext(vx),Pd=A.createContext(()=>{});Pd.displayName="JVR.DispatchShowTools";function N3(){return A.useReducer(S3,yx)}function bx(){return A.useContext(Pd)}var xx=t=>{var{initial:n,dispatch:i,children:a}=t;return S.jsx(vx.Provider,{value:n,children:S.jsx(Pd.Provider,{value:i,children:a})})};xx.displayName="JVR.ShowTools";var Sx={},wx=A.createContext(Sx),k3=(t,n)=>_({},t,n),Xo=()=>A.useContext(wx),Wd=A.createContext(()=>{});Wd.displayName="JVR.DispatchExpands";function R3(){return A.useReducer(k3,Sx)}function E3(){return A.useContext(Wd)}var Nx=t=>{var{initial:n,dispatch:i,children:a}=t;return S.jsx(wx.Provider,{value:n,children:S.jsx(Wd.Provider,{value:i,children:a})})};Nx.displayName="JVR.Expands";var kx={Str:{as:"span","data-type":"string",style:{color:"var(--w-rjv-type-string-color, #cb4b16)"},className:"w-rjv-type",children:"string"},Url:{as:"a",style:{color:"var(--w-rjv-type-url-color, #0969da)"},"data-type":"url",className:"w-rjv-type",children:"url"},Undefined:{style:{color:"var(--w-rjv-type-undefined-color, #586e75)"},as:"span","data-type":"undefined",className:"w-rjv-type",children:"undefined"},Null:{style:{color:"var(--w-rjv-type-null-color, #d33682)"},as:"span","data-type":"null",className:"w-rjv-type",children:"null"},Map:{style:{color:"var(--w-rjv-type-map-color, #268bd2)",marginRight:3},as:"span","data-type":"map",className:"w-rjv-type",children:"Map"},Nan:{style:{color:"var(--w-rjv-type-nan-color, #859900)"},as:"span","data-type":"nan",className:"w-rjv-type",children:"NaN"},Bigint:{style:{color:"var(--w-rjv-type-bigint-color, #268bd2)"},as:"span","data-type":"bigint",className:"w-rjv-type",children:"bigint"},Int:{style:{color:"var(--w-rjv-type-int-color, #268bd2)"},as:"span","data-type":"int",className:"w-rjv-type",children:"int"},Set:{style:{color:"var(--w-rjv-type-set-color, #268bd2)",marginRight:3},as:"span","data-type":"set",className:"w-rjv-type",children:"Set"},Float:{style:{color:"var(--w-rjv-type-float-color, #859900)"},as:"span","data-type":"float",className:"w-rjv-type",children:"float"},True:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},False:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},Date:{style:{color:"var(--w-rjv-type-date-color, #268bd2)"},as:"span","data-type":"date",className:"w-rjv-type",children:"date"}},Rx=A.createContext(kx),A3=(t,n)=>_({},t,n),Ve=()=>A.useContext(Rx),eh=A.createContext(()=>{});eh.displayName="JVR.DispatchTypes";function $3(){return A.useReducer(A3,kx)}function C3(){return A.useContext(eh)}function Ex(t){var{initial:n,dispatch:i,children:a}=t;return S.jsx(Rx.Provider,{value:n,children:S.jsx(eh.Provider,{value:i,children:a})})}Ex.displayName="JVR.Types";var T3=["style"];function Ax(t){var{style:n}=t,i=we(t,T3),a=_({cursor:"pointer",height:"1em",width:"1em",userSelect:"none",display:"inline-flex"},n);return S.jsx("svg",_({viewBox:"0 0 24 24",fill:"var(--w-rjv-arrow-color, currentColor)",style:a},i,{children:S.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})}))}Ax.displayName="JVR.TriangleArrow";var $x={Arrow:{as:"span",className:"w-rjv-arrow",style:{transform:"rotate(0deg)",transition:"all 0.3s"},children:S.jsx(Ax,{})},Colon:{as:"span",style:{color:"var(--w-rjv-colon-color, var(--w-rjv-color))",marginLeft:0,marginRight:2},className:"w-rjv-colon",children:":"},Quote:{as:"span",style:{color:"var(--w-rjv-quotes-color, #236a7c)"},className:"w-rjv-quotes",children:'"'},ValueQuote:{as:"span",style:{color:"var(--w-rjv-quotes-string-color, #cb4b16)"},className:"w-rjv-quotes",children:'"'},BracketsLeft:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-start",children:"["},BracketsRight:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-end",children:"]"},BraceLeft:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-start",children:"{"},BraceRight:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-end",children:"}"}},Cx=A.createContext($x),O3=(t,n)=>_({},t,n),zt=()=>A.useContext(Cx),th=A.createContext(()=>{});th.displayName="JVR.DispatchSymbols";function j3(){return A.useReducer(O3,$x)}function D3(){return A.useContext(th)}var Tx=t=>{var{initial:n,dispatch:i,children:a}=t;return S.jsx(Cx.Provider,{value:n,children:S.jsx(th.Provider,{value:i,children:a})})};Tx.displayName="JVR.Symbols";var Ox={Copied:{className:"w-rjv-copied",style:{height:"1em",width:"1em",cursor:"pointer",verticalAlign:"middle",marginLeft:5}},CountInfo:{as:"span",className:"w-rjv-object-size",style:{color:"var(--w-rjv-info-color, #0000004d)",paddingLeft:8,fontStyle:"italic"}},CountInfoExtra:{as:"span",className:"w-rjv-object-extra",style:{paddingLeft:8}},Ellipsis:{as:"span",style:{cursor:"pointer",color:"var(--w-rjv-ellipsis-color, #cb4b16)",userSelect:"none"},className:"w-rjv-ellipsis",children:"..."},Row:{as:"div",className:"w-rjv-line"},KeyName:{as:"span",className:"w-rjv-object-key"}},jx=A.createContext(Ox),M3=(t,n)=>_({},t,n),ln=()=>A.useContext(jx),nh=A.createContext(()=>{});nh.displayName="JVR.DispatchSection";function L3(){return A.useReducer(M3,Ox)}function z3(){return A.useContext(nh)}var Dx=t=>{var{initial:n,dispatch:i,children:a}=t;return S.jsx(jx.Provider,{value:n,children:S.jsx(nh.Provider,{value:i,children:a})})};Dx.displayName="JVR.Section";var Mx={objectSortKeys:!1,indentWidth:15},ih=A.createContext(Mx);ih.displayName="JVR.Context";var Lx=A.createContext(()=>{});Lx.displayName="JVR.DispatchContext";function U3(t,n){return _({},t,n)}var rr=()=>A.useContext(ih),zx=t=>{var{children:n,initialState:i,initialTypes:a}=t,[l,u]=A.useReducer(U3,Object.assign({},Mx,i)),[f,d]=N3(),[m,p]=R3(),[g,v]=$3(),[b,R]=j3(),[N,O]=L3();return A.useEffect(()=>u(_({},i)),[i]),S.jsx(ih.Provider,{value:l,children:S.jsx(Lx.Provider,{value:u,children:S.jsx(xx,{initial:f,dispatch:d,children:S.jsx(Nx,{initial:m,dispatch:p,children:S.jsx(Ex,{initial:_({},g,a),dispatch:v,children:S.jsx(Tx,{initial:b,dispatch:R,children:S.jsx(Dx,{initial:N,dispatch:O,children:n})})})})})})})};zx.displayName="JVR.Provider";function B3(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var _3=["isNumber","value","parentValue","keyName","keys"],q3=["as","render"],K3=["as","render"],V3=["as","render"],H3=["as","style","render"],G3=["as","render"],J3=["as","render"],Y3=["as","render"],I3=["as","render"],dd=t=>{var{Quote:n={}}=zt(),{isNumber:i,value:a,parentValue:l,keyName:u,keys:f}=t,d=we(t,_3);if(i)return null;var{as:m,render:p}=n,g=we(n,q3),v=m||"span",b=_({},d,g),R={value:a,parentValue:l,keyName:u,keys:f||(u?[u]:[])},N=p&&typeof p=="function"&&p(b,R);return N||S.jsx(v,_({},b))};dd.displayName="JVR.Quote";var Es=t=>{var{ValueQuote:n={}}=zt(),i=_({},(B3(t),t)),{as:a,render:l}=n,u=we(n,K3),f=a||"span",d=_({},i,u),m=l&&typeof l=="function"&&l(d,{});return m||S.jsx(f,_({},d))};Es.displayName="JVR.ValueQuote";var Ux=t=>{var{value:n,parentValue:i,keyName:a,keys:l}=t,{Colon:u={}}=zt(),{as:f,render:d}=u,m=we(u,V3),p=f||"span",g=d&&typeof d=="function"&&d(m,{value:n,parentValue:i,keyName:a,keys:l||(a?[a]:[])});return g||S.jsx(p,_({},m))};Ux.displayName="JVR.Colon";var Bx=t=>{var{Arrow:n={}}=zt(),i=Xo(),{expandKey:a,style:l,value:u,parentValue:f,keyName:d,keys:m}=t,p=!!i[a],{as:g,style:v,render:b}=n,R=we(n,H3),N=g||"span",O=b&&typeof b=="function",U=_({},R,{"data-expanded":p,style:_({},v,l)}),z={value:u,parentValue:f,keyName:d,keys:m||(d?[d]:[])},L=O&&b(U,z);return L||S.jsx(N,_({},R,{style:_({},v,l)}))};Bx.displayName="JVR.Arrow";var _x=t=>{var{isBrackets:n,value:i,parentValue:a,keyName:l,keys:u}=t,{BracketsLeft:f={},BraceLeft:d={}}=zt(),m={value:i,parentValue:a,keyName:l,keys:u||(l?[l]:[])};if(n){var{as:p,render:g}=f,v=we(f,G3),b=p||"span",R=g&&typeof g=="function"&&g(v,m);return R||S.jsx(b,_({},v))}var{as:N,render:O}=d,U=we(d,J3),z=N||"span",L=O&&typeof O=="function"&&O(U,m);return L||S.jsx(z,_({},U))};_x.displayName="JVR.BracketsOpen";var rh=t=>{var{isBrackets:n,isVisiable:i,value:a,parentValue:l,keyName:u,keys:f}=t,d={value:a,parentValue:l,keyName:u,keys:f||(u?[u]:[])};if(!i)return null;var{BracketsRight:m={},BraceRight:p={}}=zt();if(n){var{as:g,render:v}=m,b=we(m,Y3),R=g||"span",N=v&&typeof v=="function"&&v(b,d);return N||S.jsx(R,_({},b))}var{as:O,render:U}=p,z=we(p,I3),L=O||"span",G=U&&typeof U=="function"&&U(z,d);return G||S.jsx(L,_({},z))};rh.displayName="JVR.BracketsClose";var qx=t=>{var n,{value:i,expandKey:a,level:l,keys:u=[]}=t,f=Xo(),d=Array.isArray(i),{collapsed:m,shouldExpandNodeInitially:p}=rr(),g=i instanceof Set,v=typeof m=="boolean"?m:typeof m=="number"?l>m:!1,b=(n=f[a])!=null?n:v,R=Object.keys(i).length;if(f[a]===void 0&&p&&p(b,{value:i,keys:u,level:l})||b||R===0)return null;var N={paddingLeft:4};return S.jsx("div",{style:N,children:S.jsx(rh,{isBrackets:d||g,isVisiable:!0})})};qx.displayName="JVR.NestedClose";var Z3=["as","render"],Q3=["as","render"],F3=["as","render"],X3=["as","render"],P3=["as","render"],W3=["as","render"],eD=["as","render"],tD=["as","render"],nD=["as","render"],iD=["as","render"],rD=["as","render"],aD=["as","render"],sD=["as","render"],hd=t=>{if(t===void 0)return"0n";if(typeof t=="string")try{t=BigInt(t)}catch{return"0n"}return t?t.toString()+"n":"0n"},Kx=t=>{var{value:n,keyName:i}=t,{Set:a={},displayDataTypes:l}=Ve(),u=n instanceof Set;if(!u||!l)return null;var{as:f,render:d}=a,m=we(a,Z3),p=d&&typeof d=="function",g=p&&d(m,{type:"type",value:n,keyName:i});if(g)return g;var v=f||"span";return S.jsx(v,_({},m))};Kx.displayName="JVR.SetComp";var Vx=t=>{var{value:n,keyName:i}=t,{Map:a={},displayDataTypes:l}=Ve(),u=n instanceof Map;if(!u||!l)return null;var{as:f,render:d}=a,m=we(a,Q3),p=d&&typeof d=="function",g=p&&d(m,{type:"type",value:n,keyName:i});if(g)return g;var v=f||"span";return S.jsx(v,_({},m))};Vx.displayName="JVR.MapComp";var pn={opacity:.75,paddingRight:4},Hx=t=>{var{children:n="",keyName:i}=t,{Str:a={},displayDataTypes:l}=Ve(),{shortenTextAfterLength:u=30,stringEllipsis:f="..."}=rr(),{as:d,render:m}=a,p=we(a,F3),g=n,[v,b]=A.useState(u&&g.length>u);A.useEffect(()=>b(u&&g.length>u),[u]);var R=d||"span",N=_({},pn,a.style||{});u>0&&(p.style=_({},p.style,{cursor:g.length<=u?"initial":"pointer"}),g.length>u&&(p.onClick=()=>{b(!v)}));var O=v?""+g.slice(0,u)+f:g,U=m&&typeof m=="function",z=U&&m(_({},p,{style:N}),{type:"type",value:n,keyName:i}),L=v?"w-rjv-value w-rjv-value-short":"w-rjv-value",G=U&&m(_({},p,{children:O,className:L}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(z||S.jsx(R,_({},p,{style:N}))),G||S.jsxs(A.Fragment,{children:[S.jsx(Es,{}),S.jsx(R,_({},p,{className:L,children:O})),S.jsx(Es,{})]})]})};Hx.displayName="JVR.TypeString";var Gx=t=>{var{children:n,keyName:i}=t,{True:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,X3),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b||S.jsx(m,_({},d,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};Gx.displayName="JVR.TypeTrue";var Jx=t=>{var{children:n,keyName:i}=t,{False:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,P3),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b||S.jsx(m,_({},d,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};Jx.displayName="JVR.TypeFalse";var Yx=t=>{var{children:n,keyName:i}=t,{Float:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,W3),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b||S.jsx(m,_({},d,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};Yx.displayName="JVR.TypeFloat";var Ix=t=>{var{children:n,keyName:i}=t,{Int:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,eD),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b||S.jsx(m,_({},d,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};Ix.displayName="JVR.TypeInt";var Zx=t=>{var{children:n,keyName:i}=t,{Bigint:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,tD),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b||S.jsx(m,_({},d,{className:"w-rjv-value",children:hd(n==null?void 0:n.toString())}))]})};Zx.displayName="JVR.TypeFloat";var Qx=t=>{var{children:n,keyName:i}=t,{Url:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,nD),m=u||"span",p=_({},pn,a.style),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n==null?void 0:n.href,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b||S.jsxs("a",_({href:n==null?void 0:n.href,target:"_blank"},d,{className:"w-rjv-value",children:[S.jsx(Es,{}),n==null?void 0:n.href,S.jsx(Es,{})]}))]})};Qx.displayName="JVR.TypeUrl";var Fx=t=>{var{children:n,keyName:i}=t,{Date:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,iD),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=n instanceof Date?n.toLocaleString():n,R=g&&f(_({},d,{children:b,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),R||S.jsx(m,_({},d,{className:"w-rjv-value",children:b}))]})};Fx.displayName="JVR.TypeDate";var Xx=t=>{var{children:n,keyName:i}=t,{Undefined:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,rD),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b]})};Xx.displayName="JVR.TypeUndefined";var Px=t=>{var{children:n,keyName:i}=t,{Null:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,aD),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b]})};Px.displayName="JVR.TypeNull";var Wx=t=>{var{children:n,keyName:i}=t,{Nan:a={},displayDataTypes:l}=Ve(),{as:u,render:f}=a,d=we(a,sD),m=u||"span",p=_({},pn,a.style||{}),g=f&&typeof f=="function",v=g&&f(_({},d,{style:p}),{type:"type",value:n,keyName:i}),b=g&&f(_({},d,{children:n==null?void 0:n.toString(),className:"w-rjv-value"}),{type:"value",value:n,keyName:i});return S.jsxs(A.Fragment,{children:[l&&(v||S.jsx(m,_({},d,{style:p}))),b]})};Wx.displayName="JVR.TypeNan";var lD=t=>Number(t)===t&&t%1!==0||isNaN(t),eS=t=>{var{value:n,keyName:i}=t,a={keyName:i};return n instanceof URL?S.jsx(Qx,_({},a,{children:n})):typeof n=="string"?S.jsx(Hx,_({},a,{children:n})):n===!0?S.jsx(Gx,_({},a,{children:n})):n===!1?S.jsx(Jx,_({},a,{children:n})):n===null?S.jsx(Px,_({},a,{children:n})):n===void 0?S.jsx(Xx,_({},a,{children:n})):n instanceof Date?S.jsx(Fx,_({},a,{children:n})):typeof n=="number"&&isNaN(n)?S.jsx(Wx,_({},a,{children:n})):typeof n=="number"&&lD(n)?S.jsx(Yx,_({},a,{children:n})):typeof n=="bigint"?S.jsx(Zx,_({},a,{children:n})):typeof n=="number"?S.jsx(Ix,_({},a,{children:n})):null};eS.displayName="JVR.Value";function Ai(t,n,i){var a=D3(),l=[t.className,n.className].filter(Boolean).join(" "),u=_({},t,n,{className:l,style:_({},t.style,n.style),children:n.children||t.children});A.useEffect(()=>a({[i]:u}),[n])}function Zt(t,n,i){var a=C3(),l=[t.className,n.className].filter(Boolean).join(" "),u=_({},t,n,{className:l,style:_({},t.style,n.style),children:n.children||t.children});A.useEffect(()=>a({[i]:u}),[n])}function ua(t,n,i){var a=z3(),l=[t.className,n.className].filter(Boolean).join(" "),u=_({},t,n,{className:l,style:_({},t.style,n.style),children:n.children||t.children});A.useEffect(()=>a({[i]:u}),[n])}var oD=["as","render"],tS=t=>{var{KeyName:n={}}=ln();return ua(n,t,"KeyName"),null};tS.displayName="JVR.KeyName";var nS=t=>{var{children:n,value:i,parentValue:a,keyName:l,keys:u}=t,f=typeof n=="number",d={color:f?"var(--w-rjv-key-number, #268bd2)":"var(--w-rjv-key-string, #002b36)"},{KeyName:m={}}=ln(),{as:p,render:g}=m,v=we(m,oD);v.style=_({},v.style,d);var b=p||"span",R=g&&typeof g=="function"&&g(_({},v,{children:n}),{value:i,parentValue:a,keyName:l,keys:u||(l?[l]:[])});return R||S.jsx(b,_({},v,{children:n}))};nS.displayName="JVR.KeyNameComp";var uD=["children","value","parentValue","keyName","keys"],cD=["as","render","children"],iS=t=>{var{Row:n={}}=ln();return ua(n,t,"Row"),null};iS.displayName="JVR.Row";var rS=t=>{var{children:n,value:i,parentValue:a,keyName:l,keys:u}=t,f=we(t,uD),{Row:d={}}=ln(),{as:m,render:p}=d,g=we(d,cD),v=m||"div",b=p&&typeof p=="function"&&p(_({},f,g,{children:n}),{value:i,keyName:l,parentValue:a,keys:u});return b||S.jsx(v,_({},f,g,{children:n}))};rS.displayName="JVR.RowComp";function fD(t){var n=A.useRef();return A.useEffect(()=>{n.current=t}),n.current}function dD(t){var{value:n,highlightUpdates:i,highlightContainer:a}=t,l=fD(n),u=A.useMemo(()=>{if(!i||l===void 0)return!1;if(typeof n!=typeof l)return!0;if(typeof n=="number")return isNaN(n)&&isNaN(l)?!1:n!==l;if(Array.isArray(n)!==Array.isArray(l))return!0;if(typeof n=="object"||typeof n=="function")return!1;if(n!==l)return!0},[i,n]);A.useEffect(()=>{a&&a.current&&u&&"animate"in a.current&&a.current.animate([{backgroundColor:"var(--w-rjv-update-color, #ebcb8b)"},{backgroundColor:""}],{duration:1e3,easing:"ease-in"})},[u,n,a])}var hD=["keyName","value","parentValue","expandKey","keys"],pD=["as","render"],ah=t=>{var{keyName:n,value:i,parentValue:a,expandKey:l,keys:u}=t,f=we(t,hD),{onCopied:d,enableClipboard:m}=rr(),p=w3(),g=p[l],[v,b]=A.useState(!1),{Copied:R={}}=ln();if(m===!1||!g)return null;var N=F=>{F.stopPropagation();var pe="";typeof i=="number"&&i===1/0?pe="Infinity":typeof i=="number"&&isNaN(i)?pe="NaN":typeof i=="bigint"?pe=hd(i):i instanceof Date?pe=i.toLocaleString():pe=JSON.stringify(i,(re,ee)=>typeof ee=="bigint"?hd(ee):ee,2),d&&d(pe,i),b(!0);var fe=navigator.clipboard||{writeText(re){return new Promise((ee,oe)=>{var xe=document.createElement("textarea");xe.style.position="absolute",xe.style.opacity="0",xe.style.left="-99999999px",xe.value=re,document.body.appendChild(xe),xe.select(),document.execCommand("copy")?ee():oe(),xe.remove()})}};fe.writeText(pe).then(()=>{var re=setTimeout(()=>{b(!1),clearTimeout(re)},3e3)}).catch(re=>{})},O={style:{display:"inline-flex"},fill:v?"var(--w-rjv-copied-success-color, #28a745)":"var(--w-rjv-copied-color, currentColor)",onClick:N},{render:U}=R,z=we(R,pD),L=_({},z,f,O,{style:_({},z.style,f.style,O.style)}),G=U&&typeof U=="function",X=G&&U(_({},L,{"data-copied":v}),{value:i,keyName:n,keys:u,parentValue:a});return X||(v?S.jsx("svg",_({viewBox:"0 0 32 36"},L,{children:S.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})):S.jsx("svg",_({viewBox:"0 0 32 36"},L,{children:S.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})))};ah.displayName="JVR.Copied";function aS(){var t=A.useRef(null);return t.current===null&&(t.current="custom-id-"+Math.random().toString(36).substr(2,9)),t.current}var sS=t=>{var n,{value:i,expandKey:a="",level:l,keys:u=[]}=t,f=Xo(),{objectSortKeys:d,indentWidth:m,collapsed:p,shouldExpandNodeInitially:g}=rr(),v=Array.isArray(i),b=typeof p=="boolean"?p:typeof p=="number"?l>p:!1,R=(n=f[a])!=null?n:b;if(f[a]===void 0&&g&&g(R,{value:i,keys:u,level:l})||R)return null;var N=v?Object.entries(i).map(U=>[Number(U[0]),U[1]]):Object.entries(i);d&&(N=d===!0?N.sort((U,z)=>{var[L]=U,[G]=z;return typeof L=="string"&&typeof G=="string"?L.localeCompare(G):0}):N.sort((U,z)=>{var[L,G]=U,[X,F]=z;return typeof L=="string"&&typeof X=="string"?d(L,X,G,F):0}));var O={borderLeft:"var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)",paddingLeft:m,marginLeft:6};return S.jsx("div",{className:"w-rjv-wrap",style:O,children:N.map((U,z)=>{var[L,G]=U;return S.jsx(lS,{parentValue:i,keyName:L,keys:[...u,L],value:G,level:l},z)})})};sS.displayName="JVR.KeyValues";var sh=t=>{var{keyName:n,parentValue:i,keys:a,value:l}=t,{highlightUpdates:u}=rr(),f=typeof n=="number",d=A.useRef(null);dD({value:l,highlightUpdates:u,highlightContainer:d});var m={keyName:n,value:l,keys:a,parentValue:i};return S.jsxs(A.Fragment,{children:[S.jsxs("span",{ref:d,children:[S.jsx(dd,_({isNumber:f,"data-placement":"left"},m)),S.jsx(nS,_({},m,{children:n})),S.jsx(dd,_({isNumber:f,"data-placement":"right"},m))]}),S.jsx(Ux,_({},m))]})};sh.displayName="JVR.KayName";var lS=t=>{var{keyName:n,value:i,parentValue:a,level:l=0,keys:u=[]}=t,f=bx(),d=aS(),m=Array.isArray(i),p=i instanceof Set,g=i instanceof Map,v=i instanceof Date,b=i instanceof URL,R=i&&typeof i=="object"&&!m&&!p&&!g&&!v&&!b,N=R||m||p||g;if(N){var O=p?Array.from(i):g?Object.fromEntries(i):i;return S.jsx(lh,{keyName:n,value:O,parentValue:a,initialValue:i,keys:u,level:l+1})}var U={onMouseEnter:()=>f({[d]:!0}),onMouseLeave:()=>f({[d]:!1})};return S.jsxs(rS,_({className:"w-rjv-line",value:i,keyName:n,keys:u,parentValue:a},U,{children:[S.jsx(sh,{keyName:n,value:i,keys:u,parentValue:a}),S.jsx(eS,{keyName:n,value:i}),S.jsx(ah,{keyName:n,value:i,keys:u,parentValue:a,expandKey:d})]}))};lS.displayName="JVR.KeyValuesItem";var mD=["value","keyName"],gD=["as","render"],oS=t=>{var{CountInfoExtra:n={}}=ln();return ua(n,t,"CountInfoExtra"),null};oS.displayName="JVR.CountInfoExtra";var uS=t=>{var{value:n={},keyName:i}=t,a=we(t,mD),{CountInfoExtra:l={}}=ln(),{as:u,render:f}=l,d=we(l,gD);if(!f&&!d.children)return null;var m=u||"span",p=f&&typeof f=="function",g=_({},d,a),v=p&&f(g,{value:n,keyName:i});return v||S.jsx(m,_({},g))};uS.displayName="JVR.CountInfoExtraComps";var yD=["value","keyName"],vD=["as","render"],cS=t=>{var{CountInfo:n={}}=ln();return ua(n,t,"CountInfo"),null};cS.displayName="JVR.CountInfo";var fS=t=>{var{value:n={},keyName:i}=t,a=we(t,yD),{displayObjectSize:l}=rr(),{CountInfo:u={}}=ln();if(!l)return null;var{as:f,render:d}=u,m=we(u,vD),p=f||"span";m.style=_({},m.style,t.style);var g=Object.keys(n).length;m.children||(m.children=g+" item"+(g===1?"":"s"));var v=_({},m,a),b=d&&typeof d=="function",R=b&&d(_({},v,{"data-length":g}),{value:n,keyName:i});return R||S.jsx(p,_({},v))};fS.displayName="JVR.CountInfoComp";var bD=["as","render"],dS=t=>{var{Ellipsis:n={}}=ln();return ua(n,t,"Ellipsis"),null};dS.displayName="JVR.Ellipsis";var hS=t=>{var{isExpanded:n,value:i,keyName:a}=t,{Ellipsis:l={}}=ln(),{as:u,render:f}=l,d=we(l,bD),m=u||"span",p=f&&typeof f=="function"&&f(_({},d,{"data-expanded":n}),{value:i,keyName:a});return p||(!n||typeof i=="object"&&Object.keys(i).length==0?null:S.jsx(m,_({},d)))};hS.displayName="JVR.EllipsisComp";var pS=t=>{var n,{keyName:i,expandKey:a,keys:l=[],initialValue:u,value:f,parentValue:d,level:m}=t,p=Xo(),g=E3(),{onExpand:v,collapsed:b,shouldExpandNodeInitially:R}=rr(),N=Array.isArray(f),O=f instanceof Set,U=typeof b=="boolean"?b:typeof b=="number"?m>b:!1,z=typeof f=="object",L=(n=p[a])!=null?n:U,G=R&&R(L,{value:f,keys:l,level:m});p[a]===void 0&&G!==void 0&&(L=G);var X=()=>{var xe={expand:!L,value:f,keyid:a,keyName:i};v&&v(xe),g({[a]:xe.expand})},F={display:"inline-flex",alignItems:"center"},pe={transform:"rotate("+(L?"-90":"0")+"deg)",transition:"all 0.3s"},fe=Object.keys(f).length,re=fe!==0&&(N||O||z),ee={style:F};re&&(ee.onClick=X);var oe={keyName:i,value:f,keys:l,parentValue:d};return S.jsxs("span",_({},ee,{children:[re&&S.jsx(Bx,_({style:pe,expandKey:a},oe)),(i||typeof i=="number")&&S.jsx(sh,_({},oe)),S.jsx(Kx,{value:u,keyName:i}),S.jsx(Vx,{value:u,keyName:i}),S.jsx(_x,_({isBrackets:N||O},oe)),S.jsx(hS,{keyName:i,value:f,isExpanded:L}),S.jsx(rh,_({isVisiable:L||!re,isBrackets:N||O},oe)),S.jsx(fS,{value:f,keyName:i}),S.jsx(uS,{value:f,keyName:i}),S.jsx(ah,{keyName:i,value:f,expandKey:a,parentValue:d,keys:l})]}))};pS.displayName="JVR.NestedOpen";var xD=["className","children","parentValue","keyid","level","value","initialValue","keys","keyName"],lh=A.forwardRef((t,n)=>{var{className:i="",parentValue:a,level:l=1,value:u,initialValue:f,keys:d,keyName:m}=t,p=we(t,xD),g=bx(),v=aS(),b=[i,"w-rjv-inner"].filter(Boolean).join(" "),R={onMouseEnter:()=>g({[v]:!0}),onMouseLeave:()=>g({[v]:!1})};return S.jsxs("div",_({className:b,ref:n},p,R,{children:[S.jsx(pS,{expandKey:v,value:u,level:l,keys:d,parentValue:a,keyName:m,initialValue:f}),S.jsx(sS,{expandKey:v,value:u,level:l,keys:d,parentValue:a,keyName:m}),S.jsx(qx,{expandKey:v,value:u,level:l,keys:d})]}))});lh.displayName="JVR.Container";var mS=t=>{var{BraceLeft:n={}}=zt();return Ai(n,t,"BraceLeft"),null};mS.displayName="JVR.BraceLeft";var gS=t=>{var{BraceRight:n={}}=zt();return Ai(n,t,"BraceRight"),null};gS.displayName="JVR.BraceRight";var yS=t=>{var{BracketsLeft:n={}}=zt();return Ai(n,t,"BracketsLeft"),null};yS.displayName="JVR.BracketsLeft";var vS=t=>{var{BracketsRight:n={}}=zt();return Ai(n,t,"BracketsRight"),null};vS.displayName="JVR.BracketsRight";var bS=t=>{var{Arrow:n={}}=zt();return Ai(n,t,"Arrow"),null};bS.displayName="JVR.Arrow";var xS=t=>{var{Colon:n={}}=zt();return Ai(n,t,"Colon"),null};xS.displayName="JVR.Colon";var SS=t=>{var{Quote:n={}}=zt();return Ai(n,t,"Quote"),null};SS.displayName="JVR.Quote";var wS=t=>{var{ValueQuote:n={}}=zt();return Ai(n,t,"ValueQuote"),null};wS.displayName="JVR.ValueQuote";var NS=t=>{var{Bigint:n={}}=Ve();return Zt(n,t,"Bigint"),null};NS.displayName="JVR.Bigint";var kS=t=>{var{Date:n={}}=Ve();return Zt(n,t,"Date"),null};kS.displayName="JVR.Date";var RS=t=>{var{False:n={}}=Ve();return Zt(n,t,"False"),null};RS.displayName="JVR.False";var ES=t=>{var{Float:n={}}=Ve();return Zt(n,t,"Float"),null};ES.displayName="JVR.Float";var AS=t=>{var{Int:n={}}=Ve();return Zt(n,t,"Int"),null};AS.displayName="JVR.Int";var $S=t=>{var{Map:n={}}=Ve();return Zt(n,t,"Map"),null};$S.displayName="JVR.Map";var CS=t=>{var{Nan:n={}}=Ve();return Zt(n,t,"Nan"),null};CS.displayName="JVR.Nan";var TS=t=>{var{Null:n={}}=Ve();return Zt(n,t,"Null"),null};TS.displayName="JVR.Null";var OS=t=>{var{Set:n={}}=Ve();return Zt(n,t,"Set"),null};OS.displayName="JVR.Set";var jS=t=>{var{Str:n={}}=Ve();return Zt(n,t,"Str"),null};jS.displayName="JVR.StringText";var DS=t=>{var{True:n={}}=Ve();return Zt(n,t,"True"),null};DS.displayName="JVR.True";var MS=t=>{var{Undefined:n={}}=Ve();return Zt(n,t,"Undefined"),null};MS.displayName="JVR.Undefined";var LS=t=>{var{Url:n={}}=Ve();return Zt(n,t,"Url"),null};LS.displayName="JVR.Url";var zS=t=>{var{Copied:n={}}=ln();return ua(n,t,"Copied"),null};zS.displayName="JVR.Copied";var SD=["className","style","value","children","collapsed","shouldExpandNodeInitially","indentWidth","displayObjectSize","shortenTextAfterLength","stringEllipsis","highlightUpdates","enableClipboard","displayDataTypes","objectSortKeys","onExpand","onCopied"],je=A.forwardRef((t,n)=>{var{className:i="",style:a,value:l,children:u,collapsed:f,shouldExpandNodeInitially:d,indentWidth:m=15,displayObjectSize:p=!0,shortenTextAfterLength:g=30,stringEllipsis:v,highlightUpdates:b=!0,enableClipboard:R=!0,displayDataTypes:N=!0,objectSortKeys:O=!1,onExpand:U,onCopied:z}=t,L=we(t,SD),G=_({lineHeight:1.4,fontFamily:"var(--w-rjv-font-family, Menlo, monospace)",color:"var(--w-rjv-color, #002b36)",backgroundColor:"var(--w-rjv-background-color, #00000000)",fontSize:13},a),X=["w-json-view-container","w-rjv",i].filter(Boolean).join(" ");return S.jsxs(zx,{initialState:{value:l,objectSortKeys:O,indentWidth:m,shouldExpandNodeInitially:d,displayObjectSize:p,collapsed:f,enableClipboard:R,shortenTextAfterLength:g,stringEllipsis:v,highlightUpdates:b,onCopied:z,onExpand:U},initialTypes:{displayDataTypes:N},children:[S.jsx(lh,_({value:l},L,{ref:n,className:X,style:G})),u]})});je.Bigint=NS;je.Date=kS;je.False=RS;je.Float=ES;je.Int=AS;je.Map=$S;je.Nan=CS;je.Null=TS;je.Set=OS;je.String=jS;je.True=DS;je.Undefined=MS;je.Url=LS;je.ValueQuote=wS;je.Arrow=bS;je.Colon=xS;je.Quote=SS;je.Ellipsis=dS;je.BraceLeft=mS;je.BraceRight=gS;je.BracketsLeft=yS;je.BracketsRight=vS;je.Copied=zS;je.CountInfo=cS;je.CountInfoExtra=oS;je.KeyName=tS;je.Row=iS;je.displayName="JVR.JsonView";var Dv={"--w-rjv-font-family":"monospace","--w-rjv-color":"#002b36","--w-rjv-key-string":"#002b36","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ebebeb","--w-rjv-arrow-color":"var(--w-rjv-color)","--w-rjv-edit-color":"var(--w-rjv-color)","--w-rjv-info-color":"#0000004d","--w-rjv-update-color":"#ebcb8b","--w-rjv-copied-color":"#002b36","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#236a7c","--w-rjv-colon-color":"#002b36","--w-rjv-brackets-color":"#236a7c","--w-rjv-quotes-color":"var(--w-rjv-key-string)","--w-rjv-quotes-string-color":"var(--w-rjv-type-string-color)","--w-rjv-type-string-color":"#cb4b16","--w-rjv-type-int-color":"#268bd2","--w-rjv-type-float-color":"#859900","--w-rjv-type-bigint-color":"#268bd2","--w-rjv-type-boolean-color":"#2aa198","--w-rjv-type-date-color":"#586e75","--w-rjv-type-url-color":"#0969da","--w-rjv-type-null-color":"#d33682","--w-rjv-type-nan-color":"#859900","--w-rjv-type-undefined-color":"#586e75"};function wD(t){const n=Object.keys(t),i=n.length>0?n[0]:void 0;return(a,l,u={})=>{if(!i)return u.default??a;const f=t[l]??t[i],d=a.split(".");let m=f;for(const p of d){if(typeof m=="string"||!m||!Object.prototype.hasOwnProperty.call(m,p))return u.default??a;m=m[p]}return typeof m=="string"?m:u.default??a}}function ND({siteSchema:t,schemaTranslate:n}){const i=new Set;return S.jsx("ul",{children:S.jsx(pd,{schema:t,schemaT:n,typeName:"home",displayedNodeTypeNames:i})})}function pd({schema:t,schemaT:n,typeName:i,depth:a=0,displayedNodeTypeNames:l}){const{i18n:u}=Ct(),f=kD(t,i);if(!f)return null;const d=f.routingChildren||[],m=f.regularChildren||[],p=f.lists||[],g=f.documentKind==="routing",v=n(`nodeTypes.${i}.label`,u.language,{default:i});return l.has(i)?S.jsx("li",{children:S.jsxs("div",{children:[g?S.jsx("strong",{children:v}):v," (",S.jsx("code",{children:i}),")"]})}):(l.add(i),S.jsxs("li",{children:[S.jsxs("div",{children:[g?S.jsx("strong",{children:v}):v," (",S.jsx("code",{children:i}),")"]}),p.map(b=>S.jsxs("div",{style:{marginLeft:"30px",color:"#999",fontStyle:"italic"},children:[n(`nodeTypes.${i}.lists.${b.listName}.label`,u.language,{default:b.listName})," ","(",S.jsx("code",{children:b.listName})," [",S.jsx("code",{children:b.parts.join("</code>, <code>")}),"])"]},b.listName)),d.length>0&&S.jsx("ul",{children:d.map(b=>S.jsx(pd,{schema:t,schemaT:n,typeName:b,depth:a+1,displayedNodeTypeNames:l},b))}),m.length>0&&S.jsx("ul",{children:m.map(b=>S.jsx(pd,{schema:t,schemaT:n,typeName:b,depth:a+1,displayedNodeTypeNames:l},b))})]}))}function kD(t,n){var i;return(i=t.nodeTypes)==null?void 0:i.find(a=>a.kind==="document"&&a.typeName===n)}const co=je;function RD({step:t}){const{t:n}=Ct(),[i,a]=A.useState("tree"),{siteSchema:l,l10n:u}=t,f=wD(u),d=(m,p)=>p.keys.length===1&&p.keys[0]==="plugins";return S.jsxs("div",{className:"SchemaViewer",children:[S.jsxs("div",{className:"SchemaViewer-tabs",children:[S.jsx(Nt,{className:`SchemaViewer-tab ${i==="tree"?"active":""}`,onClick:()=>a("tree"),children:n("treeView")}),S.jsx(Nt,{className:`SchemaViewer-tab ${i==="schema"?"active":""}`,onClick:()=>a("schema"),children:n("siteSchema")}),S.jsx(Nt,{className:`SchemaViewer-tab ${i==="locales"?"active":""}`,onClick:()=>a("locales"),children:n("labels")})]}),S.jsxs("div",{className:"SchemaViewer-main",children:[S.jsx("div",{className:"SchemaViewer-content",style:{display:i==="tree"?"block":"none"},children:S.jsx(ND,{siteSchema:l,schemaTranslate:f})}),S.jsx("div",{className:"SchemaViewer-content",style:{display:i==="locales"?"block":"none"},children:S.jsx(co,{value:u,style:Dv,enableClipboard:!1,displayObjectSize:!1,displayDataTypes:!1,shortenTextAfterLength:0})}),S.jsx("div",{className:"SchemaViewer-content",style:{display:i==="schema"?"block":"none"},children:S.jsxs(co,{value:l,style:Dv,enableClipboard:!1,displayObjectSize:!1,displayDataTypes:!1,shortenTextAfterLength:0,shouldExpandNodeInitially:d,children:[S.jsx(co.Colon,{render:(m,{parentValue:p})=>Array.isArray(p)&&m.children===":"?S.jsx("span",{}):S.jsx("span",{...m})}),S.jsx(co.KeyName,{render:({...m},{parentValue:p})=>Array.isArray(p)&&Number.isFinite(m.children)?S.jsx("span",{}):S.jsx("span",{...m})})]})})]})]})}function ED({step:t}){const{t:n}=Ct(),{workSession:i,appendNewStep:a}=nr(),[l,u]=A.useState(!1),[f,d]=A.useState(!1),[m,p]=A.useState(!1),[g,v]=A.useState(void 0),b=aa(),R=()=>{u(!l)},N=async U=>{if(!i)return;p(!0),v(void 0);const z=Rs();if(!z){v(n("sessionExpired")),p(!1);return}try{const L=await Ri({command:"updateSiteSchema",sessionToken:z,prompt:U,fromStepNumber:t.stepNumber});L.success&&L.result?(u(!1),a(L.result),b(`/step/${L.result.stepNumber}`)):v(n("promptSubmissionFailed"))}catch(L){console.error("Error updating schema:",L),v(n("errorOccurred"))}finally{p(!1)}},O=async({withSampleData:U})=>{if(!i)return;p(!0),v(void 0),d(!1);const z=Rs();if(!z){v(n("sessionExpired")),p(!1);return}try{const L=await Ri({command:"generateSite",sessionToken:z,fromStepNumber:t.stepNumber,withSampleData:U});L.success&&L.result?(a(L.result),b(`/step/${L.result.stepNumber}`)):v(n("generationFailed"))}catch(L){console.error("Error generating site:",L),v(n("errorOccurred"))}finally{p(!1)}};return S.jsx(It,{children:S.jsxs("div",{className:"CompletedStep",children:[S.jsx(RD,{step:t}),t.explanation&&S.jsx(qs,{content:t.explanation,title:n("explanation")}),S.jsxs("div",{className:"CompletedStep-actions",children:[S.jsx(Nt,{onClick:R,className:"CompletedStep-button",children:n("modifySchema")}),S.jsx(Nt,{onClick:()=>d(!0),className:"CompletedStep-button",children:n("generateTheWebsite")})]}),l&&S.jsxs("div",{className:"CompletedStep-updateForm",children:[S.jsx("h3",{children:n("updateSchema")}),S.jsx(ax,{placeholder:n("updatePromptPlaceholder"),submitLabel:n("modifySchema"),onSubmit:N,isLoading:m,error:g})]}),S.jsx(x3,{isOpen:f,title:n("generateTheWebsite"),message:n("aboutToGenerateWebsite"),confirmLabel:n("confirm"),onConfirm:O,onCancel:()=>d(!1)}),g&&!l&&S.jsx("div",{className:"Alert error",children:S.jsx("p",{children:g})})]})})}function AD({step:t}){const{t:n}=Ct();return S.jsx(It,{children:S.jsxs("div",{className:"ErrorStep",children:[S.jsx("p",{className:"ErrorStep-message",children:n("stepFailed")}),t.explanation&&S.jsx(qs,{content:t.explanation,variant:"error"})]})})}function $D({step:t}){const{t:n}=Ct(),i=()=>{const a=`
|
|
117
161
|
${n("siteGenerated")}
|
|
118
|
-
${n("loginEmail")}: ${
|
|
119
|
-
${n("loginPassword")}: ${
|
|
120
|
-
${n("siteUrl")}: ${
|
|
121
|
-
${n("adminUrl")}: ${
|
|
122
|
-
`.trim();navigator.clipboard.writeText(s)};return b.jsx(wt,{children:b.jsxs("div",{className:"GeneratedSite",children:[i.status==="pending"&&b.jsxs("div",{className:"GeneratedSite-pending",children:[b.jsx(ls,{size:"small"}),b.jsx("p",{children:n("generatingContent")})]}),i.explanation&&b.jsx(Ni,{content:i.explanation,title:n("explanation"),variant:"info"}),b.jsx("div",{className:"GeneratedSite-header",children:b.jsx("h2",{className:"GeneratedSite-title",children:n("generatedSite")})}),b.jsx("div",{className:"Text my-4",dangerouslySetInnerHTML:{__html:n("userManual")}}),b.jsxs("div",{className:"GeneratedSite-information",children:[b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("loginEmail")}),b.jsx("div",{className:"GeneratedSite-value",children:b.jsx("input",{type:"text",value:i.loginEmail,readOnly:!0,className:"GeneratedSite-input"})})]}),b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("loginPassword")}),b.jsx("div",{className:"GeneratedSite-value",children:b.jsx("input",{type:"text",value:i.loginPassword,readOnly:!0,className:"GeneratedSite-input"})})]}),b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("adminUrl")}),b.jsxs("div",{className:"GeneratedSite-value",children:[b.jsx("input",{type:"text",value:i.adminUiUrl,readOnly:!0,className:"GeneratedSite-input"}),b.jsx(rt,{className:"GeneratedSite-link-button",onClick:()=>{window.open(i.adminUiUrl,"_blank")},"aria-label":n("administration"),children:"↗"})]})]}),b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("siteUrl")}),b.jsxs("div",{className:"GeneratedSite-value",children:[b.jsx("input",{type:"text",value:i.siteUrl,readOnly:!0,className:"GeneratedSite-input"}),b.jsx(rt,{className:"GeneratedSite-link-button",onClick:()=>{window.open(i.siteUrl,"_blank")},"aria-label":n("viewSite"),children:"↗"})]})]})]}),b.jsx("div",{className:"GeneratedSite-actions",children:b.jsx(rt,{onClick:r,className:"GeneratedSite-copy-button",children:n("copyToClipboard")})})]})})}function SE({step:i}){const{t:n}=ot();return b.jsx(wt,{children:b.jsxs("div",{className:"ErrorStep",children:[b.jsx("p",{className:"ErrorStep-message ErrorStep-message-warning",children:n("stepNoEffect")}),i.explanation&&b.jsx(Ni,{content:i.explanation,variant:"warning"})]})})}function im({step:i}){const{t:n}=ot();return b.jsx(wt,{children:b.jsxs("div",{className:"PendingStep",children:[b.jsx("div",{className:"PendingStep-header",children:b.jsx("h2",{children:n("stepTitle",{stepNumber:i.stepNumber,kind:n(i.kind)})})}),b.jsx("div",{className:"PendingStep-spinner",children:b.jsx(ls,{size:"large"})}),i.currentActivity&&b.jsxs("div",{className:"PendingStep-activity",children:[b.jsx("h3",{children:n("currentActivity")}),b.jsx("p",{children:n(`activity.${i.currentActivity}`)})]}),i.explanation&&b.jsx(Ni,{content:i.explanation,title:n("explanation"),variant:"info"})]})})}function xE({step:i}){if(i.status==="failed")return b.jsx(yE,{step:i});if(i.status==="noEffect")return b.jsx(SE,{step:i});if(i.kind==="initialSchema"||i.kind==="updateSchema")return i.status==="pending"?b.jsx(im,{step:i}):b.jsx(vE,{step:i});if(i.kind==="generateSite")return i.status==="pending"&&!C2(i)?b.jsx(im,{step:i}):b.jsx(bE,{step:i});throw new Error(`Unknown step kind: ${i.kind}`)}function NE(){const{t:i}=ot(),n=rl(),{stepNumber:r}=y1(),{workSession:s,setActiveStepNumber:o}=pn(),f=r===void 0?void 0:Number.parseInt(r,10);if(T.useEffect(()=>(o(f),()=>o(void 0)),[f,o]),T.useEffect(()=>{if(!s||!s.steps)return;s.steps.some(m=>m.stepNumber===f)||n("/")},[f,s,n]),!s||!s.steps)return b.jsxs("div",{className:"RouteLayout",children:[b.jsx("div",{className:"RouteLayout-main",children:b.jsx(wt,{className:"p-4",children:b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:i("noSessionData")})})})}),b.jsx("div",{className:"RouteLayout-sidebar",children:b.jsx(Zr,{activeStep:f})})]});const p=s.steps.find(h=>h.stepNumber===f);return p?b.jsxs("div",{className:"RouteLayout",children:[b.jsx("div",{className:"RouteLayout-main",children:b.jsx(xE,{step:p})}),b.jsx("div",{className:"RouteLayout-sidebar",children:b.jsx(Zr,{activeStep:f})})]}):b.jsxs("div",{className:"RouteLayout",children:[b.jsx("div",{className:"RouteLayout-main",children:b.jsx(wt,{className:"p-4",children:b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:i("stepNotFound")})})})}),b.jsx("div",{className:"RouteLayout-sidebar",children:b.jsx(Zr,{activeStep:f})})]})}function EE({sessionToken:i,onSessionExpired:n}){const{workSession:r,isLoading:s,error:o,setWorkSession:f,setIsLoading:p,setError:h,resetSession:m}=pn();return T.useEffect(()=>()=>{ic()},[]),T.useEffect(()=>{(async()=>{p(!0),h(void 0);try{const v=await Ga({command:"loadWorkSession",sessionToken:i});v.success&&v.result?(f(v.result),at.changeLanguage(v.result.language)):(h(v.userMessage||"Failed to load session"),v.success||(m(),x2(),n()))}catch(v){h("Error connecting to server"),console.error(v)}finally{p(!1)}})()},[i,f,p,h,n]),s?b.jsx("div",{className:"Layout-center p-4",children:b.jsx(wt,{className:"p-4 max-w-2xl",children:b.jsx("div",{className:"Text text-center",children:b.jsx("p",{children:"Loading session..."})})})}):o?b.jsx("div",{className:"Layout-center p-4",children:b.jsx(wt,{className:"p-4 max-w-2xl",children:b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:o})})})}):r?b.jsx(l2,{children:b.jsxs(D1,{children:[b.jsx(Gr,{path:"/",element:b.jsx(w2,{})}),b.jsx(Gr,{path:"/step/:stepNumber",element:b.jsx(NE,{})}),b.jsx(Gr,{path:"*",element:b.jsx(L1,{to:"/",replace:!0})})]})}):b.jsx("div",{className:"Layout-center p-4",children:b.jsx(wt,{className:"p-4 max-w-2xl",children:b.jsx("div",{className:"Text text-center",children:b.jsx("p",{children:"Session not available."})})})})}function RE({sessionToken:i}){const{t:n,i18n:r}=ot(),s=async o=>{const f=o.target.value;await r.changeLanguage(f),i&&await Ga({command:"setLanguage",sessionToken:i,language:f})};return b.jsxs("footer",{className:"App-footer",children:[b.jsx("span",{className:"InlineText",dangerouslySetInnerHTML:{__html:n("footerText")}}),b.jsx("span",{className:"LanguageSelector",children:b.jsxs("select",{className:"LanguageSelector-select",value:r.language,onChange:s,"aria-label":"Select language",children:[b.jsx("option",{value:"en",children:"English"}),b.jsx("option",{value:"fr",children:"Français"})]})})]})}function rv({onTokenReceived:i}){const[n,r]=T.useState(!!window.grecaptcha),s=Do;return T.useEffect(()=>{if(s){if(window.onRecaptchaSubmitted=o=>{i(o)},window.onRecaptchaExpired=()=>{i("")},n===!1&&!window.grecaptcha){r("loading");const o=document.createElement("script");o.src="https://www.google.com/recaptcha/api.js",o.async=!0,o.defer=!0,o.onload=()=>r(!0),document.head.appendChild(o)}else r(!0);return()=>{window.onRecaptchaSubmitted=void 0,window.onRecaptchaExpired=void 0}}},[s,i]),b.jsx(b.Fragment,{children:Do&&n===!0?b.jsx("div",{className:"g-recaptcha","data-sitekey":Do,"data-callback":"onRecaptchaSubmitted","data-expired-callback":"onRecaptchaExpired"}):b.jsx("div",{className:"RecaptchaBox",children:b.jsx(ls,{})})})}function TE({onVerified:i}){const{t:n,i18n:r}=ot(),[s,o]=T.useState(""),[f,p]=T.useState(),h=async()=>{var m;if(s){p(void 0);try{const d=await Ga({command:"newSession",recaptchaToken:s,language:r.language});d.success&&((m=d.result)!=null&&m.token)?i(d.result.token):p("Failed to create session")}catch(d){p("Error connecting to server"),console.error(d)}}};return b.jsx("div",{className:"Layout-center p-4",children:b.jsxs(wt,{className:"max-w-2xl p-4",children:[b.jsx("h2",{className:"AppTitle mb-4 text-center",children:n("title")}),b.jsx("div",{className:"Text my-4",dangerouslySetInnerHTML:{__html:n("introduction")}}),f&&b.jsx("div",{className:"Alert error",children:b.jsx("p",{className:"m-0",children:f})}),b.jsxs("div",{className:"Layout-flex Layout-align-center Layout-gap Layout-justify-center Layout-wrap",children:[b.jsx(rv,{onTokenReceived:o}),b.jsx(rt,{label:n("agree"),onClick:h,disabled:!s})]})]})})}function wE({expiredToken:i,onTokenRefreshed:n}){const{t:r}=ot(),[s,o]=T.useState(),f=async p=>{var h;if(p){o(void 0);try{const m=await Ga({command:"renewSession",sessionToken:i,recaptchaToken:p});m.success&&((h=m.result)!=null&&h.token)?n(m.result.token):o(r("sessionRenewalFailed"))}catch(m){o(r("errorConnectingToServer")),console.error(m)}}};return b.jsx("div",{className:"Dialog-backdrop",children:b.jsx("div",{className:"Dialog-container",children:b.jsxs(wt,{className:"p-4",children:[b.jsx("h2",{className:"mb-4 text-center",children:r("extendYourSession")}),s&&b.jsx("div",{className:"Alert error",children:b.jsx("p",{className:"m-0",children:s})}),b.jsx("div",{className:"Layout-flex Layout-align-center Layout-gap Layout-justify-center Layout-wrap my-4",children:b.jsx(rv,{onTokenReceived:f})}),b.jsx("p",{className:"InfoText",children:r("newTabRestartMessage")})]})})})}function CE(i){if(!i)return!1;try{const n=i.split(".");if(n.length!==3)return!1;const r=JSON.parse(atob(n[1]));if(!r.exp)return!1;const s=r.exp*1e3;return Date.now()<s?!0:"expired"}catch(n){return console.error("Error checking JWT token validity:",n),!1}}function jE(){const[i,n]=T.useState(),[r,s]=T.useState(),o=pn(h=>h.resetSession);T.useEffect(()=>{const h=vi(),m=CE(h);if(!h||!m){o();return}m==="expired"?s(h):n(h)},[o]);const f=h=>{Wp(h),n(h)},p=h=>{Wp(h),n(h),s(void 0)};return b.jsxs("div",{className:"App",children:[b.jsx("div",{className:"App-content",children:i?b.jsx(EE,{sessionToken:i,onSessionExpired:()=>n(void 0)}):r?b.jsx(wE,{expiredToken:r,onTokenRefreshed:p}):b.jsx(TE,{onVerified:f})}),b.jsx(RE,{sessionToken:i})]})}async function AE(){const i=document.getElementById("site-generator-app");i&&$x.createRoot(i).render(b.jsx(Bo.StrictMode,{children:b.jsx(jE,{})}))}AE().catch(i=>console.error(i));
|
|
162
|
+
${n("loginEmail")}: ${t.loginEmail}
|
|
163
|
+
${n("loginPassword")}: ${t.loginPassword}
|
|
164
|
+
${n("siteUrl")}: ${t.siteUrl}
|
|
165
|
+
${n("adminUrl")}: ${t.adminUiUrl}
|
|
166
|
+
`.trim();navigator.clipboard.writeText(a)};return S.jsx(It,{children:S.jsxs("div",{className:"GeneratedSite",children:[t.status==="pending"&&S.jsxs("div",{className:"GeneratedSite-pending",children:[S.jsx(Zo,{size:"small"}),S.jsx("p",{children:n("generatingContent")})]}),t.explanation&&S.jsx(qs,{content:t.explanation,title:n("explanation"),variant:"info"}),S.jsx("div",{className:"GeneratedSite-header",children:S.jsx("h2",{className:"GeneratedSite-title",children:n("generatedSite")})}),S.jsx("div",{className:"Text my-4",dangerouslySetInnerHTML:{__html:n("userManual")}}),S.jsxs("div",{className:"GeneratedSite-information",children:[S.jsxs("div",{className:"GeneratedSite-field",children:[S.jsx("div",{className:"GeneratedSite-label",children:n("loginEmail")}),S.jsx("div",{className:"GeneratedSite-value",children:S.jsx("input",{type:"text",value:t.loginEmail,readOnly:!0,className:"GeneratedSite-input"})})]}),S.jsxs("div",{className:"GeneratedSite-field",children:[S.jsx("div",{className:"GeneratedSite-label",children:n("loginPassword")}),S.jsx("div",{className:"GeneratedSite-value",children:S.jsx("input",{type:"text",value:t.loginPassword,readOnly:!0,className:"GeneratedSite-input"})})]}),S.jsxs("div",{className:"GeneratedSite-field",children:[S.jsx("div",{className:"GeneratedSite-label",children:n("adminUrl")}),S.jsxs("div",{className:"GeneratedSite-value",children:[S.jsx("input",{type:"text",value:t.adminUiUrl,readOnly:!0,className:"GeneratedSite-input"}),S.jsx(Nt,{className:"GeneratedSite-link-button",onClick:()=>{window.open(t.adminUiUrl,"_blank")},"aria-label":n("administration"),children:"↗"})]})]}),S.jsxs("div",{className:"GeneratedSite-field",children:[S.jsx("div",{className:"GeneratedSite-label",children:n("siteUrl")}),S.jsxs("div",{className:"GeneratedSite-value",children:[S.jsx("input",{type:"text",value:t.siteUrl,readOnly:!0,className:"GeneratedSite-input"}),S.jsx(Nt,{className:"GeneratedSite-link-button",onClick:()=>{window.open(t.siteUrl,"_blank")},"aria-label":n("viewSite"),children:"↗"})]})]})]}),S.jsx("div",{className:"GeneratedSite-actions",children:S.jsx(Nt,{onClick:i,className:"GeneratedSite-copy-button",children:n("copyToClipboard")})})]})})}function CD({step:t}){const{t:n}=Ct();return S.jsx(It,{children:S.jsxs("div",{className:"ErrorStep",children:[S.jsx("p",{className:"ErrorStep-message ErrorStep-message-warning",children:n("stepNoEffect")}),t.explanation&&S.jsx(qs,{content:t.explanation,variant:"warning"})]})})}function Mv({step:t}){const{t:n}=Ct();return S.jsx(It,{children:S.jsxs("div",{className:"PendingStep",children:[S.jsx("div",{className:"PendingStep-header",children:S.jsx("h2",{children:n("stepTitle",{stepNumber:t.stepNumber,kind:n(t.kind)})})}),S.jsx("div",{className:"PendingStep-spinner",children:S.jsx(Zo,{size:"large"})}),t.currentActivity&&S.jsxs("div",{className:"PendingStep-activity",children:[S.jsx("h3",{children:n("currentActivity")}),S.jsx("p",{children:n(`activity.${t.currentActivity}`)})]}),t.explanation&&S.jsx(qs,{content:t.explanation,title:n("explanation"),variant:"info"})]})})}function TD({step:t}){if(t.status==="failed")return S.jsx(AD,{step:t});if(t.status==="noEffect")return S.jsx(CD,{step:t});if(t.kind==="initialSchema"||t.kind==="updateSchema")return t.status==="pending"?S.jsx(Mv,{step:t}):S.jsx(ED,{step:t});if(t.kind==="generateSite")return t.status==="pending"&&!zj(t)?S.jsx(Mv,{step:t}):S.jsx($D,{step:t});throw new Error(`Unknown step kind: ${t.kind}`)}function OD(){const{t}=Ct(),n=aa(),{stepNumber:i}=QE(),{workSession:a,setActiveStepNumber:l}=nr(),u=i===void 0?void 0:Number.parseInt(i,10);if(A.useEffect(()=>(l(u),()=>l(void 0)),[u,l]),A.useEffect(()=>{if(!a||!a.steps)return;a.steps.some(m=>m.stepNumber===u)||n("/")},[u,a,n]),!a||!a.steps)return S.jsxs("div",{className:"RouteLayout",children:[S.jsx("div",{className:"RouteLayout-main",children:S.jsx(It,{className:"p-4",children:S.jsx("div",{className:"Alert error",children:S.jsx("p",{children:t("noSessionData")})})})}),S.jsx("div",{className:"RouteLayout-sidebar",children:S.jsx(yo,{activeStep:u})})]});const f=a.steps.find(d=>d.stepNumber===u);return f?S.jsxs("div",{className:"RouteLayout",children:[S.jsx("div",{className:"RouteLayout-main",children:S.jsx(TD,{step:f})}),S.jsx("div",{className:"RouteLayout-sidebar",children:S.jsx(yo,{activeStep:u})})]}):S.jsxs("div",{className:"RouteLayout",children:[S.jsx("div",{className:"RouteLayout-main",children:S.jsx(It,{className:"p-4",children:S.jsx("div",{className:"Alert error",children:S.jsx("p",{children:t("stepNotFound")})})})}),S.jsx("div",{className:"RouteLayout-sidebar",children:S.jsx(yo,{activeStep:u})})]})}function jD({sessionToken:t,onSessionExpired:n}){const{workSession:i,isLoading:a,error:l,setWorkSession:u,setIsLoading:f,setError:d,resetSession:m}=nr();return A.useEffect(()=>()=>{Vd()},[]),A.useEffect(()=>{(async()=>{f(!0),d(void 0);try{const g=await Ri({command:"loadWorkSession",sessionToken:t});g.success&&g.result?(u(g.result),bt.changeLanguage(g.result.language)):(d(g.userMessage||"Failed to load session"),g.success||(m(),Tj(),n()))}catch(g){d("Error connecting to server"),console.error(g)}finally{f(!1)}})()},[t,u,f,d,n]),a?S.jsx("div",{className:"Layout-center p-4",children:S.jsx(It,{className:"p-4 max-w-2xl",children:S.jsx("div",{className:"Text text-center",children:S.jsx("p",{children:"Loading session..."})})})}):l?S.jsx("div",{className:"Layout-center p-4",children:S.jsx(It,{className:"p-4 max-w-2xl",children:S.jsx("div",{className:"Alert error",children:S.jsx("p",{children:l})})})}):i?S.jsx(LA,{children:S.jsxs(fA,{children:[S.jsx(fo,{path:"/",element:S.jsx(Lj,{})}),S.jsx(fo,{path:"/step/:stepNumber",element:S.jsx(OD,{})}),S.jsx(fo,{path:"*",element:S.jsx(uA,{to:"/",replace:!0})})]})}):S.jsx("div",{className:"Layout-center p-4",children:S.jsx(It,{className:"p-4 max-w-2xl",children:S.jsx("div",{className:"Text text-center",children:S.jsx("p",{children:"Session not available."})})})})}function DD({sessionToken:t}){const{t:n,i18n:i}=Ct(),a=async l=>{const u=l.target.value;await i.changeLanguage(u),t&&await Ri({command:"setLanguage",sessionToken:t,language:u})};return S.jsxs("footer",{className:"App-footer",children:[S.jsx("span",{className:"InlineText",dangerouslySetInnerHTML:{__html:n("footerText")}}),S.jsx("span",{className:"LanguageSelector",children:S.jsxs("select",{className:"LanguageSelector-select",value:i.language,onChange:a,"aria-label":"Select language",children:[S.jsx("option",{value:"en",children:"English"}),S.jsx("option",{value:"fr",children:"Français"})]})})]})}function US({onTokenReceived:t}){const[n,i]=A.useState(!!window.grecaptcha),a=Mf;return A.useEffect(()=>{if(a){if(window.onRecaptchaSubmitted=l=>{t(l)},window.onRecaptchaExpired=()=>{t("")},n===!1&&!window.grecaptcha){i("loading");const l=document.createElement("script");l.src="https://www.google.com/recaptcha/api.js",l.async=!0,l.defer=!0,l.onload=()=>i(!0),document.head.appendChild(l)}else i(!0);return()=>{window.onRecaptchaSubmitted=void 0,window.onRecaptchaExpired=void 0}}},[a,t]),S.jsx(S.Fragment,{children:Mf&&n===!0?S.jsx("div",{className:"g-recaptcha","data-sitekey":Mf,"data-callback":"onRecaptchaSubmitted","data-expired-callback":"onRecaptchaExpired"}):S.jsx("div",{className:"RecaptchaBox",children:S.jsx(Zo,{})})})}function MD({onVerified:t}){const{t:n,i18n:i}=Ct(),[a,l]=A.useState(""),[u,f]=A.useState(),d=async()=>{var m;if(a){f(void 0);try{const p=await Ri({command:"newSession",recaptchaToken:a,language:i.language});p.success&&((m=p.result)!=null&&m.token)?t(p.result.token):f("Failed to create session")}catch(p){f("Error connecting to server"),console.error(p)}}};return S.jsx("div",{className:"Layout-center p-4",children:S.jsxs(It,{className:"max-w-2xl p-4",children:[S.jsx("h2",{className:"AppTitle mb-4 text-center",children:n("title")}),S.jsx("div",{className:"Text my-4",dangerouslySetInnerHTML:{__html:n("introduction")}}),u&&S.jsx("div",{className:"Alert error",children:S.jsx("p",{className:"m-0",children:u})}),S.jsxs("div",{className:"Layout-flex Layout-align-center Layout-gap Layout-justify-center Layout-wrap",children:[S.jsx(US,{onTokenReceived:l}),S.jsx(Nt,{label:n("agree"),onClick:d,disabled:!a})]})]})})}function LD({expiredToken:t,onTokenRefreshed:n}){const{t:i}=Ct(),[a,l]=A.useState(),u=async f=>{var d;if(f){l(void 0);try{const m=await Ri({command:"renewSession",sessionToken:t,recaptchaToken:f});m.success&&((d=m.result)!=null&&d.token)?n(m.result.token):l(i("sessionRenewalFailed"))}catch(m){l(i("errorConnectingToServer")),console.error(m)}}};return S.jsx("div",{className:"Dialog-backdrop",children:S.jsx("div",{className:"Dialog-container",children:S.jsxs(It,{className:"p-4",children:[S.jsx("h2",{className:"mb-4 text-center",children:i("extendYourSession")}),a&&S.jsx("div",{className:"Alert error",children:S.jsx("p",{className:"m-0",children:a})}),S.jsx("div",{className:"Layout-flex Layout-align-center Layout-gap Layout-justify-center Layout-wrap my-4",children:S.jsx(US,{onTokenReceived:u})}),S.jsx("p",{className:"InfoText",children:i("newTabRestartMessage")})]})})})}function zD(t){if(!t)return!1;try{const n=t.split(".");if(n.length!==3)return!1;const i=JSON.parse(atob(n[1]));if(!i.exp)return!1;const a=i.exp*1e3;return Date.now()<a?!0:"expired"}catch(n){return console.error("Error checking JWT token validity:",n),!1}}function UD(){const[t,n]=A.useState(),[i,a]=A.useState(),l=nr(d=>d.resetSession);A.useEffect(()=>{const d=Rs(),m=zD(d);if(!d||!m){l();return}m==="expired"?a(d):n(d)},[l]);const u=d=>{Av(d),n(d)},f=d=>{Av(d),n(d),a(void 0)};return S.jsxs("div",{className:"App",children:[S.jsx("div",{className:"App-content",children:t?S.jsx(jD,{sessionToken:t,onSessionExpired:()=>n(void 0)}):i?S.jsx(LD,{expiredToken:i,onTokenRefreshed:f}):S.jsx(MD,{onVerified:u})}),S.jsx(DD,{sessionToken:t})]})}async function BD(){const t=document.getElementById("site-generator-app");t&&vE.createRoot(t).render(S.jsx(Bf.StrictMode,{children:S.jsx(UD,{})}))}BD().catch(t=>console.error(t));
|