framework-m-studio 0.2.3__py3-none-any.whl → 0.3.0__py3-none-any.whl
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.
- framework_m_studio/__init__.py +6 -1
- framework_m_studio/app.py +56 -11
- framework_m_studio/checklist_parser.py +421 -0
- framework_m_studio/cli/__init__.py +752 -0
- framework_m_studio/cli/build.py +421 -0
- framework_m_studio/cli/dev.py +214 -0
- framework_m_studio/cli/new.py +754 -0
- framework_m_studio/cli/quality.py +157 -0
- framework_m_studio/cli/studio.py +159 -0
- framework_m_studio/cli/utility.py +50 -0
- framework_m_studio/codegen/generator.py +6 -2
- framework_m_studio/codegen/parser.py +101 -4
- framework_m_studio/codegen/templates/doctype.py.jinja2 +19 -10
- framework_m_studio/codegen/test_generator.py +6 -2
- framework_m_studio/discovery.py +15 -5
- framework_m_studio/docs_generator.py +298 -2
- framework_m_studio/protocol_scanner.py +435 -0
- framework_m_studio/routes.py +39 -11
- {framework_m_studio-0.2.3.dist-info → framework_m_studio-0.3.0.dist-info}/METADATA +7 -2
- framework_m_studio-0.3.0.dist-info/RECORD +32 -0
- framework_m_studio-0.3.0.dist-info/entry_points.txt +18 -0
- framework_m_studio/cli.py +0 -247
- framework_m_studio/static/assets/index-BJ5Noua8.js +0 -171
- framework_m_studio/static/assets/index-CnPUX2YK.css +0 -1
- framework_m_studio/static/favicon.ico +0 -0
- framework_m_studio/static/index.html +0 -40
- framework_m_studio-0.2.3.dist-info/RECORD +0 -28
- framework_m_studio-0.2.3.dist-info/entry_points.txt +0 -4
- {framework_m_studio-0.2.3.dist-info → framework_m_studio-0.3.0.dist-info}/WHEEL +0 -0
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
var K2=Object.defineProperty;var NE=e=>{throw TypeError(e)};var G2=(e,t,n)=>t in e?K2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Q2=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ln=(e,t,n)=>G2(e,typeof t!="symbol"?t+"":t,n),pv=(e,t,n)=>t.has(e)||NE("Cannot "+n);var te=(e,t,n)=>(pv(e,t,"read from private field"),n?n.call(e):t.get(e)),Ne=(e,t,n)=>t.has(e)?NE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Te=(e,t,n,i)=>(pv(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),We=(e,t,n)=>(pv(e,t,"access private method"),n);var Bd=(e,t,n,i)=>({set _(o){Te(e,t,o,n)},get _(){return te(e,t,i)}});var tW=Q2((Ar,$r)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();var PE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ra(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function y$(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,o.get?o:{enumerable:!0,get:function(){return e[i]}})}),n}var mv={exports:{}},uc={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var IE;function Y2(){if(IE)return uc;IE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,o,s){var u=null;if(s!==void 0&&(u=""+s),o.key!==void 0&&(u=""+o.key),"key"in o){s={};for(var c in o)c!=="key"&&(s[c]=o[c])}else s=o;return o=s.ref,{$$typeof:e,type:i,key:u,ref:o!==void 0?o:null,props:s}}return uc.Fragment=t,uc.jsx=n,uc.jsxs=n,uc}var zE;function Ap(){return zE||(zE=1,mv.exports=Y2()),mv.exports}var N=Ap(),gv={exports:{}},Ve={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var FE;function W2(){if(FE)return Ve;FE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function S(P){return P===null||typeof P!="object"?null:(P=y&&P[y]||P["@@iterator"],typeof P=="function"?P:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,v={};function _(P,B,U){this.props=P,this.context=B,this.refs=v,this.updater=U||g}_.prototype.isReactComponent={},_.prototype.setState=function(P,B){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,B,"setState")},_.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function x(){}x.prototype=_.prototype;function E(P,B,U){this.props=P,this.context=B,this.refs=v,this.updater=U||g}var R=E.prototype=new x;R.constructor=E,b(R,_.prototype),R.isPureReactComponent=!0;var C=Array.isArray;function $(){}var A={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function M(P,B,U){var k=U.ref;return{$$typeof:e,type:P,key:B,ref:k!==void 0?k:null,props:U}}function D(P,B){return M(P.type,B,P.props)}function j(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function I(P){var B={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(U){return B[U]})}var L=/\/+/g;function K(P,B){return typeof P=="object"&&P!==null&&P.key!=null?I(""+P.key):B.toString(36)}function G(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then($,$):(P.status="pending",P.then(function(B){P.status==="pending"&&(P.status="fulfilled",P.value=B)},function(B){P.status==="pending"&&(P.status="rejected",P.reason=B)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function q(P,B,U,k,V){var J=typeof P;(J==="undefined"||J==="boolean")&&(P=null);var le=!1;if(P===null)le=!0;else switch(J){case"bigint":case"string":case"number":le=!0;break;case"object":switch(P.$$typeof){case e:case t:le=!0;break;case m:return le=P._init,q(le(P._payload),B,U,k,V)}}if(le)return V=V(P),le=k===""?"."+K(P,0):k,C(V)?(U="",le!=null&&(U=le.replace(L,"$&/")+"/"),q(V,B,U,"",function(fe){return fe})):V!=null&&(j(V)&&(V=D(V,U+(V.key==null||P&&P.key===V.key?"":(""+V.key).replace(L,"$&/")+"/")+le)),B.push(V)),1;le=0;var ie=k===""?".":k+":";if(C(P))for(var se=0;se<P.length;se++)k=P[se],J=ie+K(k,se),le+=q(k,B,U,J,V);else if(se=S(P),typeof se=="function")for(P=se.call(P),se=0;!(k=P.next()).done;)k=k.value,J=ie+K(k,se++),le+=q(k,B,U,J,V);else if(J==="object"){if(typeof P.then=="function")return q(G(P),B,U,k,V);throw B=String(P),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return le}function Q(P,B,U){if(P==null)return P;var k=[],V=0;return q(P,k,"","",function(J){return B.call(U,J,V++)}),k}function W(P){if(P._status===-1){var B=P._result;B=B(),B.then(function(U){(P._status===0||P._status===-1)&&(P._status=1,P._result=U)},function(U){(P._status===0||P._status===-1)&&(P._status=2,P._result=U)}),P._status===-1&&(P._status=0,P._result=B)}if(P._status===1)return P._result.default;throw P._result}var ne=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},X={map:Q,forEach:function(P,B,U){Q(P,function(){B.apply(this,arguments)},U)},count:function(P){var B=0;return Q(P,function(){B++}),B},toArray:function(P){return Q(P,function(B){return B})||[]},only:function(P){if(!j(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Ve.Activity=p,Ve.Children=X,Ve.Component=_,Ve.Fragment=n,Ve.Profiler=o,Ve.PureComponent=E,Ve.StrictMode=i,Ve.Suspense=f,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(P){return A.H.useMemoCache(P)}},Ve.cache=function(P){return function(){return P.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(P,B,U){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var k=b({},P.props),V=P.key;if(B!=null)for(J in B.key!==void 0&&(V=""+B.key),B)!T.call(B,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&B.ref===void 0||(k[J]=B[J]);var J=arguments.length-2;if(J===1)k.children=U;else if(1<J){for(var le=Array(J),ie=0;ie<J;ie++)le[ie]=arguments[ie+2];k.children=le}return M(P.type,V,k)},Ve.createContext=function(P){return P={$$typeof:u,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:s,_context:P},P},Ve.createElement=function(P,B,U){var k,V={},J=null;if(B!=null)for(k in B.key!==void 0&&(J=""+B.key),B)T.call(B,k)&&k!=="key"&&k!=="__self"&&k!=="__source"&&(V[k]=B[k]);var le=arguments.length-2;if(le===1)V.children=U;else if(1<le){for(var ie=Array(le),se=0;se<le;se++)ie[se]=arguments[se+2];V.children=ie}if(P&&P.defaultProps)for(k in le=P.defaultProps,le)V[k]===void 0&&(V[k]=le[k]);return M(P,J,V)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(P){return{$$typeof:c,render:P}},Ve.isValidElement=j,Ve.lazy=function(P){return{$$typeof:m,_payload:{_status:-1,_result:P},_init:W}},Ve.memo=function(P,B){return{$$typeof:d,type:P,compare:B===void 0?null:B}},Ve.startTransition=function(P){var B=A.T,U={};A.T=U;try{var k=P(),V=A.S;V!==null&&V(U,k),typeof k=="object"&&k!==null&&typeof k.then=="function"&&k.then($,ne)}catch(J){ne(J)}finally{B!==null&&U.types!==null&&(B.types=U.types),A.T=B}},Ve.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},Ve.use=function(P){return A.H.use(P)},Ve.useActionState=function(P,B,U){return A.H.useActionState(P,B,U)},Ve.useCallback=function(P,B){return A.H.useCallback(P,B)},Ve.useContext=function(P){return A.H.useContext(P)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(P,B){return A.H.useDeferredValue(P,B)},Ve.useEffect=function(P,B){return A.H.useEffect(P,B)},Ve.useEffectEvent=function(P){return A.H.useEffectEvent(P)},Ve.useId=function(){return A.H.useId()},Ve.useImperativeHandle=function(P,B,U){return A.H.useImperativeHandle(P,B,U)},Ve.useInsertionEffect=function(P,B){return A.H.useInsertionEffect(P,B)},Ve.useLayoutEffect=function(P,B){return A.H.useLayoutEffect(P,B)},Ve.useMemo=function(P,B){return A.H.useMemo(P,B)},Ve.useOptimistic=function(P,B){return A.H.useOptimistic(P,B)},Ve.useReducer=function(P,B,U){return A.H.useReducer(P,B,U)},Ve.useRef=function(P){return A.H.useRef(P)},Ve.useState=function(P){return A.H.useState(P)},Ve.useSyncExternalStore=function(P,B,U){return A.H.useSyncExternalStore(P,B,U)},Ve.useTransition=function(){return A.H.useTransition()},Ve.version="19.2.3",Ve}var kE;function pn(){return kE||(kE=1,gv.exports=W2()),gv.exports}var z=pn();const he=Ra(z);var vv={exports:{}},cc={},yv={exports:{}},bv={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var LE;function X2(){return LE||(LE=1,(function(e){function t(q,Q){var W=q.length;q.push(Q);e:for(;0<W;){var ne=W-1>>>1,X=q[ne];if(0<o(X,Q))q[ne]=Q,q[W]=X,W=ne;else break e}}function n(q){return q.length===0?null:q[0]}function i(q){if(q.length===0)return null;var Q=q[0],W=q.pop();if(W!==Q){q[0]=W;e:for(var ne=0,X=q.length,P=X>>>1;ne<P;){var B=2*(ne+1)-1,U=q[B],k=B+1,V=q[k];if(0>o(U,W))k<X&&0>o(V,U)?(q[ne]=V,q[k]=W,ne=k):(q[ne]=U,q[B]=W,ne=B);else if(k<X&&0>o(V,W))q[ne]=V,q[k]=W,ne=k;else break e}}return Q}function o(q,Q){var W=q.sortIndex-Q.sortIndex;return W!==0?W:q.id-Q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var f=[],d=[],m=1,p=null,y=3,S=!1,g=!1,b=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function R(q){for(var Q=n(d);Q!==null;){if(Q.callback===null)i(d);else if(Q.startTime<=q)i(d),Q.sortIndex=Q.expirationTime,t(f,Q);else break;Q=n(d)}}function C(q){if(b=!1,R(q),!g)if(n(f)!==null)g=!0,$||($=!0,I());else{var Q=n(d);Q!==null&&G(C,Q.startTime-q)}}var $=!1,A=-1,T=5,M=-1;function D(){return v?!0:!(e.unstable_now()-M<T)}function j(){if(v=!1,$){var q=e.unstable_now();M=q;var Q=!0;try{e:{g=!1,b&&(b=!1,x(A),A=-1),S=!0;var W=y;try{t:{for(R(q),p=n(f);p!==null&&!(p.expirationTime>q&&D());){var ne=p.callback;if(typeof ne=="function"){p.callback=null,y=p.priorityLevel;var X=ne(p.expirationTime<=q);if(q=e.unstable_now(),typeof X=="function"){p.callback=X,R(q),Q=!0;break t}p===n(f)&&i(f),R(q)}else i(f);p=n(f)}if(p!==null)Q=!0;else{var P=n(d);P!==null&&G(C,P.startTime-q),Q=!1}}break e}finally{p=null,y=W,S=!1}Q=void 0}}finally{Q?I():$=!1}}}var I;if(typeof E=="function")I=function(){E(j)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,K=L.port2;L.port1.onmessage=j,I=function(){K.postMessage(null)}}else I=function(){_(j,0)};function G(q,Q){A=_(function(){q(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(q){switch(y){case 1:case 2:case 3:var Q=3;break;default:Q=y}var W=y;y=Q;try{return q()}finally{y=W}},e.unstable_requestPaint=function(){v=!0},e.unstable_runWithPriority=function(q,Q){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var W=y;y=q;try{return Q()}finally{y=W}},e.unstable_scheduleCallback=function(q,Q,W){var ne=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?ne+W:ne):W=ne,q){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=W+X,q={id:m++,callback:Q,priorityLevel:q,startTime:W,expirationTime:X,sortIndex:-1},W>ne?(q.sortIndex=W,t(d,q),n(f)===null&&q===n(d)&&(b?(x(A),A=-1):b=!0,G(C,W-ne))):(q.sortIndex=X,t(f,q),g||S||(g=!0,$||($=!0,I()))),q},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(q){var Q=y;return function(){var W=y;y=Q;try{return q.apply(this,arguments)}finally{y=W}}}})(bv)),bv}var qE;function J2(){return qE||(qE=1,yv.exports=X2()),yv.exports}var Sv={exports:{}},qn={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var UE;function Z2(){if(UE)return qn;UE=1;var e=pn();function t(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(f,d,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:f,containerInfo:d,implementation:m}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return qn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,qn.createPortal=function(f,d){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return s(f,d,null,m)},qn.flushSync=function(f){var d=u.T,m=i.p;try{if(u.T=null,i.p=2,f)return f()}finally{u.T=d,i.p=m,i.d.f()}},qn.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,i.d.C(f,d))},qn.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},qn.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var m=d.as,p=c(m,d.crossOrigin),y=typeof d.integrity=="string"?d.integrity:void 0,S=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;m==="style"?i.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:p,integrity:y,fetchPriority:S}):m==="script"&&i.d.X(f,{crossOrigin:p,integrity:y,fetchPriority:S,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},qn.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var m=c(d.as,d.crossOrigin);i.d.M(f,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&i.d.M(f)},qn.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var m=d.as,p=c(m,d.crossOrigin);i.d.L(f,m,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},qn.preloadModule=function(f,d){if(typeof f=="string")if(d){var m=c(d.as,d.crossOrigin);i.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else i.d.m(f)},qn.requestFormReset=function(f){i.d.r(f)},qn.unstable_batchedUpdates=function(f,d){return f(d)},qn.useFormState=function(f,d,m){return u.H.useFormState(f,d,m)},qn.useFormStatus=function(){return u.H.useHostTransitionStatus()},qn.version="19.2.3",qn}var BE;function $p(){if(BE)return Sv.exports;BE=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Sv.exports=Z2(),Sv.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var VE;function eP(){if(VE)return cc;VE=1;var e=J2(),t=pn(),n=$p();function i(r){var a="https://react.dev/errors/"+r;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)a+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function s(r){var a=r,l=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(l=a.return),r=a.return;while(r)}return a.tag===3?l:null}function u(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function c(r){if(r.tag===31){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function f(r){if(s(r)!==r)throw Error(i(188))}function d(r){var a=r.alternate;if(!a){if(a=s(r),a===null)throw Error(i(188));return a!==r?null:r}for(var l=r,h=a;;){var w=l.return;if(w===null)break;var O=w.alternate;if(O===null){if(h=w.return,h!==null){l=h;continue}break}if(w.child===O.child){for(O=w.child;O;){if(O===l)return f(w),r;if(O===h)return f(w),a;O=O.sibling}throw Error(i(188))}if(l.return!==h.return)l=w,h=O;else{for(var F=!1,H=w.child;H;){if(H===l){F=!0,l=w,h=O;break}if(H===h){F=!0,h=w,l=O;break}H=H.sibling}if(!F){for(H=O.child;H;){if(H===l){F=!0,l=O,h=w;break}if(H===h){F=!0,h=O,l=w;break}H=H.sibling}if(!F)throw Error(i(189))}}if(l.alternate!==h)throw Error(i(190))}if(l.tag!==3)throw Error(i(188));return l.stateNode.current===l?r:a}function m(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r;for(r=r.child;r!==null;){if(a=m(r),a!==null)return a;r=r.sibling}return null}var p=Object.assign,y=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),E=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function I(r){return r===null||typeof r!="object"?null:(r=j&&r[j]||r["@@iterator"],typeof r=="function"?r:null)}var L=Symbol.for("react.client.reference");function K(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===L?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case b:return"Fragment";case _:return"Profiler";case v:return"StrictMode";case C:return"Suspense";case $:return"SuspenseList";case M:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case g:return"Portal";case E:return r.displayName||"Context";case x:return(r._context.displayName||"Context")+".Consumer";case R:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case A:return a=r.displayName||null,a!==null?a:K(r.type)||"Memo";case T:a=r._payload,r=r._init;try{return K(r(a))}catch{}}return null}var G=Array.isArray,q=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},ne=[],X=-1;function P(r){return{current:r}}function B(r){0>X||(r.current=ne[X],ne[X]=null,X--)}function U(r,a){X++,ne[X]=r.current,r.current=a}var k=P(null),V=P(null),J=P(null),le=P(null);function ie(r,a){switch(U(J,a),U(V,r),U(k,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?rE(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=rE(a),r=iE(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}B(k),U(k,r)}function se(){B(k),B(V),B(J)}function fe(r){r.memoizedState!==null&&U(le,r);var a=k.current,l=iE(a,r.type);a!==l&&(U(V,r),U(k,l))}function Y(r){V.current===r&&(B(k),B(V)),le.current===r&&(B(le),ac._currentValue=W)}var Z,ue;function ae(r){if(Z===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);Z=a&&a[1]||"",ue=-1<l.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Z+r+ue}var Se=!1;function ye(r,a){if(!r||Se)return"";Se=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(a){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(be){var ge=be}Reflect.construct(r,[],Ee)}else{try{Ee.call()}catch(be){ge=be}r.call(Ee.prototype)}}else{try{throw Error()}catch(be){ge=be}(Ee=r())&&typeof Ee.catch=="function"&&Ee.catch(function(){})}}catch(be){if(be&&ge&&typeof be.stack=="string")return[be.stack,ge.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var w=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");w&&w.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var O=h.DetermineComponentFrameRoot(),F=O[0],H=O[1];if(F&&H){var ee=F.split(`
|
|
44
|
-
`),me=H.split(`
|
|
45
|
-
`);for(w=h=0;h<ee.length&&!ee[h].includes("DetermineComponentFrameRoot");)h++;for(;w<me.length&&!me[w].includes("DetermineComponentFrameRoot");)w++;if(h===ee.length||w===me.length)for(h=ee.length-1,w=me.length-1;1<=h&&0<=w&&ee[h]!==me[w];)w--;for(;1<=h&&0<=w;h--,w--)if(ee[h]!==me[w]){if(h!==1||w!==1)do if(h--,w--,0>w||ee[h]!==me[w]){var _e=`
|
|
46
|
-
`+ee[h].replace(" at new "," at ");return r.displayName&&_e.includes("<anonymous>")&&(_e=_e.replace("<anonymous>",r.displayName)),_e}while(1<=h&&0<=w);break}}}finally{Se=!1,Error.prepareStackTrace=l}return(l=r?r.displayName||r.name:"")?ae(l):""}function Oe(r,a){switch(r.tag){case 26:case 27:case 5:return ae(r.type);case 16:return ae("Lazy");case 13:return r.child!==a&&a!==null?ae("Suspense Fallback"):ae("Suspense");case 19:return ae("SuspenseList");case 0:case 15:return ye(r.type,!1);case 11:return ye(r.type.render,!1);case 1:return ye(r.type,!0);case 31:return ae("Activity");default:return""}}function Re(r){try{var a="",l=null;do a+=Oe(r,l),l=r,r=r.return;while(r);return a}catch(h){return`
|
|
47
|
-
Error generating stack: `+h.message+`
|
|
48
|
-
`+h.stack}}var Ce=Object.prototype.hasOwnProperty,Ae=e.unstable_scheduleCallback,$e=e.unstable_cancelCallback,Fe=e.unstable_shouldYield,Ie=e.unstable_requestPaint,je=e.unstable_now,Ye=e.unstable_getCurrentPriorityLevel,ke=e.unstable_ImmediatePriority,Je=e.unstable_UserBlockingPriority,tt=e.unstable_NormalPriority,wt=e.unstable_LowPriority,tn=e.unstable_IdlePriority,He=e.log,At=e.unstable_setDisableYieldValue,ln=null,$t=null;function mn(r){if(typeof He=="function"&&At(r),$t&&typeof $t.setStrictMode=="function")try{$t.setStrictMode(ln,r)}catch{}}var de=Math.clz32?Math.clz32:xt,ve=Math.log,ot=Math.LN2;function xt(r){return r>>>=0,r===0?32:31-(ve(r)/ot|0)|0}var mt=256,Be=262144,Ct=4194304;function Tt(r){var a=r&42;if(a!==0)return a;switch(r&-r){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:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function gt(r,a,l){var h=r.pendingLanes;if(h===0)return 0;var w=0,O=r.suspendedLanes,F=r.pingedLanes;r=r.warmLanes;var H=h&134217727;return H!==0?(h=H&~O,h!==0?w=Tt(h):(F&=H,F!==0?w=Tt(F):l||(l=H&~r,l!==0&&(w=Tt(l))))):(H=h&~O,H!==0?w=Tt(H):F!==0?w=Tt(F):l||(l=h&~r,l!==0&&(w=Tt(l)))),w===0?0:a!==0&&a!==w&&(a&O)===0&&(O=w&-w,l=a&-a,O>=l||O===32&&(l&4194048)!==0)?a:w}function Yt(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function wn(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Wt(){var r=Ct;return Ct<<=1,(Ct&62914560)===0&&(Ct=4194304),r}function Lt(r){for(var a=[],l=0;31>l;l++)a.push(r);return a}function Hn(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Xt(r,a,l,h,w,O){var F=r.pendingLanes;r.pendingLanes=l,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=l,r.entangledLanes&=l,r.errorRecoveryDisabledLanes&=l,r.shellSuspendCounter=0;var H=r.entanglements,ee=r.expirationTimes,me=r.hiddenUpdates;for(l=F&~l;0<l;){var _e=31-de(l),Ee=1<<_e;H[_e]=0,ee[_e]=-1;var ge=me[_e];if(ge!==null)for(me[_e]=null,_e=0;_e<ge.length;_e++){var be=ge[_e];be!==null&&(be.lane&=-536870913)}l&=~Ee}h!==0&&tr(r,h,0),O!==0&&w===0&&r.tag!==0&&(r.suspendedLanes|=O&~(F&~a))}function tr(r,a,l){r.pendingLanes|=a,r.suspendedLanes&=~a;var h=31-de(a);r.entangledLanes|=a,r.entanglements[h]=r.entanglements[h]|1073741824|l&261930}function gn(r,a){var l=r.entangledLanes|=a;for(r=r.entanglements;l;){var h=31-de(l),w=1<<h;w&a|r[h]&a&&(r[h]|=a),l&=~w}}function kn(r,a){var l=a&-a;return l=(l&42)!==0?1:nr(l),(l&(r.suspendedLanes|a))!==0?0:l}function nr(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function hr(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Kn(){var r=Q.p;return r!==0?r:(r=window.event,r===void 0?32:OE(r.type))}function ei(r,a){var l=Q.p;try{return Q.p=r,a()}finally{Q.p=l}}var Gn=Math.random().toString(36).slice(2),nn="__reactFiber$"+Gn,An="__reactProps$"+Gn,bi="__reactContainer$"+Gn,Ls="__reactEvents$"+Gn,om="__reactListeners$"+Gn,bu="__reactHandles$"+Gn,qi="__reactResources$"+Gn,Si="__reactMarker$"+Gn;function Su(r){delete r[nn],delete r[An],delete r[Ls],delete r[om],delete r[bu]}function Ui(r){var a=r[nn];if(a)return a;for(var l=r.parentNode;l;){if(a=l[bi]||l[nn]){if(l=a.alternate,a.child!==null||l!==null&&l.child!==null)for(r=fE(r);r!==null;){if(l=r[nn])return l;r=fE(r)}return a}r=l,l=r.parentNode}return null}function qs(r){if(r=r[nn]||r[bi]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function _u(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(i(33))}function Us(r){var a=r[qi];return a||(a=r[qi]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function En(r){r[Si]=!0}var HS=new Set,KS={};function zo(r,a){Bs(r,a),Bs(r+"Capture",a)}function Bs(r,a){for(KS[r]=a,r=0;r<a.length;r++)HS.add(a[r])}var zj=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]*$"),GS={},QS={};function Fj(r){return Ce.call(QS,r)?!0:Ce.call(GS,r)?!1:zj.test(r)?QS[r]=!0:(GS[r]=!0,!1)}function Mf(r,a,l){if(Fj(a))if(l===null)r.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var h=a.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+l)}}function Df(r,a,l){if(l===null)r.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+l)}}function Bi(r,a,l,h){if(h===null)r.removeAttribute(l);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(l);return}r.setAttributeNS(a,l,""+h)}}function jr(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function YS(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function kj(r,a,l){var h=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var w=h.get,O=h.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return w.call(this)},set:function(F){l=""+F,O.call(this,F)}}),Object.defineProperty(r,a,{enumerable:h.enumerable}),{getValue:function(){return l},setValue:function(F){l=""+F},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function sm(r){if(!r._valueTracker){var a=YS(r)?"checked":"value";r._valueTracker=kj(r,a,""+r[a])}}function WS(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var l=a.getValue(),h="";return r&&(h=YS(r)?r.checked?"true":"false":r.value),r=h,r!==l?(a.setValue(r),!0):!1}function jf(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var Lj=/[\n"\\]/g;function Nr(r){return r.replace(Lj,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function lm(r,a,l,h,w,O,F,H){r.name="",F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"?r.type=F:r.removeAttribute("type"),a!=null?F==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+jr(a)):r.value!==""+jr(a)&&(r.value=""+jr(a)):F!=="submit"&&F!=="reset"||r.removeAttribute("value"),a!=null?um(r,F,jr(a)):l!=null?um(r,F,jr(l)):h!=null&&r.removeAttribute("value"),w==null&&O!=null&&(r.defaultChecked=!!O),w!=null&&(r.checked=w&&typeof w!="function"&&typeof w!="symbol"),H!=null&&typeof H!="function"&&typeof H!="symbol"&&typeof H!="boolean"?r.name=""+jr(H):r.removeAttribute("name")}function XS(r,a,l,h,w,O,F,H){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(r.type=O),a!=null||l!=null){if(!(O!=="submit"&&O!=="reset"||a!=null)){sm(r);return}l=l!=null?""+jr(l):"",a=a!=null?""+jr(a):l,H||a===r.value||(r.value=a),r.defaultValue=a}h=h??w,h=typeof h!="function"&&typeof h!="symbol"&&!!h,r.checked=H?r.checked:!!h,r.defaultChecked=!!h,F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"&&(r.name=F),sm(r)}function um(r,a,l){a==="number"&&jf(r.ownerDocument)===r||r.defaultValue===""+l||(r.defaultValue=""+l)}function Vs(r,a,l,h){if(r=r.options,a){a={};for(var w=0;w<l.length;w++)a["$"+l[w]]=!0;for(l=0;l<r.length;l++)w=a.hasOwnProperty("$"+r[l].value),r[l].selected!==w&&(r[l].selected=w),w&&h&&(r[l].defaultSelected=!0)}else{for(l=""+jr(l),a=null,w=0;w<r.length;w++){if(r[w].value===l){r[w].selected=!0,h&&(r[w].defaultSelected=!0);return}a!==null||r[w].disabled||(a=r[w])}a!==null&&(a.selected=!0)}}function JS(r,a,l){if(a!=null&&(a=""+jr(a),a!==r.value&&(r.value=a),l==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=l!=null?""+jr(l):""}function ZS(r,a,l,h){if(a==null){if(h!=null){if(l!=null)throw Error(i(92));if(G(h)){if(1<h.length)throw Error(i(93));h=h[0]}l=h}l==null&&(l=""),a=l}l=jr(a),r.defaultValue=l,h=r.textContent,h===l&&h!==""&&h!==null&&(r.value=h),sm(r)}function Hs(r,a){if(a){var l=r.firstChild;if(l&&l===r.lastChild&&l.nodeType===3){l.nodeValue=a;return}}r.textContent=a}var qj=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 e_(r,a,l){var h=a.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?h?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":h?r.setProperty(a,l):typeof l!="number"||l===0||qj.has(a)?a==="float"?r.cssFloat=l:r[a]=(""+l).trim():r[a]=l+"px"}function t_(r,a,l){if(a!=null&&typeof a!="object")throw Error(i(62));if(r=r.style,l!=null){for(var h in l)!l.hasOwnProperty(h)||a!=null&&a.hasOwnProperty(h)||(h.indexOf("--")===0?r.setProperty(h,""):h==="float"?r.cssFloat="":r[h]="");for(var w in a)h=a[w],a.hasOwnProperty(w)&&l[w]!==h&&e_(r,w,h)}else for(var O in a)a.hasOwnProperty(O)&&e_(r,O,a[O])}function cm(r){if(r.indexOf("-")===-1)return!1;switch(r){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 Uj=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"]]),Bj=/^[\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 Nf(r){return Bj.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Vi(){}var fm=null;function dm(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ks=null,Gs=null;function n_(r){var a=qs(r);if(a&&(r=a.stateNode)){var l=r[An]||null;e:switch(r=a.stateNode,a.type){case"input":if(lm(r,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),a=l.name,l.type==="radio"&&a!=null){for(l=r;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Nr(""+a)+'"][type="radio"]'),a=0;a<l.length;a++){var h=l[a];if(h!==r&&h.form===r.form){var w=h[An]||null;if(!w)throw Error(i(90));lm(h,w.value,w.defaultValue,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name)}}for(a=0;a<l.length;a++)h=l[a],h.form===r.form&&WS(h)}break e;case"textarea":JS(r,l.value,l.defaultValue);break e;case"select":a=l.value,a!=null&&Vs(r,!!l.multiple,a,!1)}}}var hm=!1;function r_(r,a,l){if(hm)return r(a,l);hm=!0;try{var h=r(a);return h}finally{if(hm=!1,(Ks!==null||Gs!==null)&&(_d(),Ks&&(a=Ks,r=Gs,Gs=Ks=null,n_(a),r)))for(a=0;a<r.length;a++)n_(r[a])}}function wu(r,a){var l=r.stateNode;if(l===null)return null;var h=l[An]||null;if(h===null)return null;l=h[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(r=r.type,h=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!h;break e;default:r=!1}if(r)return null;if(l&&typeof l!="function")throw Error(i(231,a,typeof l));return l}var Hi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pm=!1;if(Hi)try{var Eu={};Object.defineProperty(Eu,"passive",{get:function(){pm=!0}}),window.addEventListener("test",Eu,Eu),window.removeEventListener("test",Eu,Eu)}catch{pm=!1}var Da=null,mm=null,Pf=null;function i_(){if(Pf)return Pf;var r,a=mm,l=a.length,h,w="value"in Da?Da.value:Da.textContent,O=w.length;for(r=0;r<l&&a[r]===w[r];r++);var F=l-r;for(h=1;h<=F&&a[l-h]===w[O-h];h++);return Pf=w.slice(r,1<h?1-h:void 0)}function If(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function zf(){return!0}function a_(){return!1}function rr(r){function a(l,h,w,O,F){this._reactName=l,this._targetInst=w,this.type=h,this.nativeEvent=O,this.target=F,this.currentTarget=null;for(var H in r)r.hasOwnProperty(H)&&(l=r[H],this[H]=l?l(O):O[H]);return this.isDefaultPrevented=(O.defaultPrevented!=null?O.defaultPrevented:O.returnValue===!1)?zf:a_,this.isPropagationStopped=a_,this}return p(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=zf)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=zf)},persist:function(){},isPersistent:zf}),a}var Fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ff=rr(Fo),xu=p({},Fo,{view:0,detail:0}),Vj=rr(xu),gm,vm,Cu,kf=p({},xu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bm,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Cu&&(Cu&&r.type==="mousemove"?(gm=r.screenX-Cu.screenX,vm=r.screenY-Cu.screenY):vm=gm=0,Cu=r),gm)},movementY:function(r){return"movementY"in r?r.movementY:vm}}),o_=rr(kf),Hj=p({},kf,{dataTransfer:0}),Kj=rr(Hj),Gj=p({},xu,{relatedTarget:0}),ym=rr(Gj),Qj=p({},Fo,{animationName:0,elapsedTime:0,pseudoElement:0}),Yj=rr(Qj),Wj=p({},Fo,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Xj=rr(Wj),Jj=p({},Fo,{data:0}),s_=rr(Jj),Zj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eN={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"},tN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nN(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=tN[r])?!!a[r]:!1}function bm(){return nN}var rN=p({},xu,{key:function(r){if(r.key){var a=Zj[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=If(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?eN[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bm,charCode:function(r){return r.type==="keypress"?If(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?If(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),iN=rr(rN),aN=p({},kf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),l_=rr(aN),oN=p({},xu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bm}),sN=rr(oN),lN=p({},Fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),uN=rr(lN),cN=p({},kf,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),fN=rr(cN),dN=p({},Fo,{newState:0,oldState:0}),hN=rr(dN),pN=[9,13,27,32],Sm=Hi&&"CompositionEvent"in window,Ru=null;Hi&&"documentMode"in document&&(Ru=document.documentMode);var mN=Hi&&"TextEvent"in window&&!Ru,u_=Hi&&(!Sm||Ru&&8<Ru&&11>=Ru),c_=" ",f_=!1;function d_(r,a){switch(r){case"keyup":return pN.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function h_(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Qs=!1;function gN(r,a){switch(r){case"compositionend":return h_(a);case"keypress":return a.which!==32?null:(f_=!0,c_);case"textInput":return r=a.data,r===c_&&f_?null:r;default:return null}}function vN(r,a){if(Qs)return r==="compositionend"||!Sm&&d_(r,a)?(r=i_(),Pf=mm=Da=null,Qs=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return u_&&a.locale!=="ko"?null:a.data;default:return null}}var yN={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 p_(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!yN[r.type]:a==="textarea"}function m_(r,a,l,h){Ks?Gs?Gs.push(h):Gs=[h]:Ks=h,a=Ad(a,"onChange"),0<a.length&&(l=new Ff("onChange","change",null,l,h),r.push({event:l,listeners:a}))}var Ou=null,Au=null;function bN(r){X1(r,0)}function Lf(r){var a=_u(r);if(WS(a))return r}function g_(r,a){if(r==="change")return a}var v_=!1;if(Hi){var _m;if(Hi){var wm="oninput"in document;if(!wm){var y_=document.createElement("div");y_.setAttribute("oninput","return;"),wm=typeof y_.oninput=="function"}_m=wm}else _m=!1;v_=_m&&(!document.documentMode||9<document.documentMode)}function b_(){Ou&&(Ou.detachEvent("onpropertychange",S_),Au=Ou=null)}function S_(r){if(r.propertyName==="value"&&Lf(Au)){var a=[];m_(a,Au,r,dm(r)),r_(bN,a)}}function SN(r,a,l){r==="focusin"?(b_(),Ou=a,Au=l,Ou.attachEvent("onpropertychange",S_)):r==="focusout"&&b_()}function _N(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Lf(Au)}function wN(r,a){if(r==="click")return Lf(a)}function EN(r,a){if(r==="input"||r==="change")return Lf(a)}function xN(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var pr=typeof Object.is=="function"?Object.is:xN;function $u(r,a){if(pr(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var l=Object.keys(r),h=Object.keys(a);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var w=l[h];if(!Ce.call(a,w)||!pr(r[w],a[w]))return!1}return!0}function __(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function w_(r,a){var l=__(r);r=0;for(var h;l;){if(l.nodeType===3){if(h=r+l.textContent.length,r<=a&&h>=a)return{node:l,offset:a-r};r=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=__(l)}}function E_(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?E_(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function x_(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=jf(r.document);a instanceof r.HTMLIFrameElement;){try{var l=typeof a.contentWindow.location.href=="string"}catch{l=!1}if(l)r=a.contentWindow;else break;a=jf(r.document)}return a}function Em(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var CN=Hi&&"documentMode"in document&&11>=document.documentMode,Ys=null,xm=null,Tu=null,Cm=!1;function C_(r,a,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Cm||Ys==null||Ys!==jf(h)||(h=Ys,"selectionStart"in h&&Em(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Tu&&$u(Tu,h)||(Tu=h,h=Ad(xm,"onSelect"),0<h.length&&(a=new Ff("onSelect","select",null,a,l),r.push({event:a,listeners:h}),a.target=Ys)))}function ko(r,a){var l={};return l[r.toLowerCase()]=a.toLowerCase(),l["Webkit"+r]="webkit"+a,l["Moz"+r]="moz"+a,l}var Ws={animationend:ko("Animation","AnimationEnd"),animationiteration:ko("Animation","AnimationIteration"),animationstart:ko("Animation","AnimationStart"),transitionrun:ko("Transition","TransitionRun"),transitionstart:ko("Transition","TransitionStart"),transitioncancel:ko("Transition","TransitionCancel"),transitionend:ko("Transition","TransitionEnd")},Rm={},R_={};Hi&&(R_=document.createElement("div").style,"AnimationEvent"in window||(delete Ws.animationend.animation,delete Ws.animationiteration.animation,delete Ws.animationstart.animation),"TransitionEvent"in window||delete Ws.transitionend.transition);function Lo(r){if(Rm[r])return Rm[r];if(!Ws[r])return r;var a=Ws[r],l;for(l in a)if(a.hasOwnProperty(l)&&l in R_)return Rm[r]=a[l];return r}var O_=Lo("animationend"),A_=Lo("animationiteration"),$_=Lo("animationstart"),RN=Lo("transitionrun"),ON=Lo("transitionstart"),AN=Lo("transitioncancel"),T_=Lo("transitionend"),M_=new Map,Om="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(" ");Om.push("scrollEnd");function ti(r,a){M_.set(r,a),zo(a,[r])}var qf=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Pr=[],Xs=0,Am=0;function Uf(){for(var r=Xs,a=Am=Xs=0;a<r;){var l=Pr[a];Pr[a++]=null;var h=Pr[a];Pr[a++]=null;var w=Pr[a];Pr[a++]=null;var O=Pr[a];if(Pr[a++]=null,h!==null&&w!==null){var F=h.pending;F===null?w.next=w:(w.next=F.next,F.next=w),h.pending=w}O!==0&&D_(l,w,O)}}function Bf(r,a,l,h){Pr[Xs++]=r,Pr[Xs++]=a,Pr[Xs++]=l,Pr[Xs++]=h,Am|=h,r.lanes|=h,r=r.alternate,r!==null&&(r.lanes|=h)}function $m(r,a,l,h){return Bf(r,a,l,h),Vf(r)}function qo(r,a){return Bf(r,null,null,a),Vf(r)}function D_(r,a,l){r.lanes|=l;var h=r.alternate;h!==null&&(h.lanes|=l);for(var w=!1,O=r.return;O!==null;)O.childLanes|=l,h=O.alternate,h!==null&&(h.childLanes|=l),O.tag===22&&(r=O.stateNode,r===null||r._visibility&1||(w=!0)),r=O,O=O.return;return r.tag===3?(O=r.stateNode,w&&a!==null&&(w=31-de(l),r=O.hiddenUpdates,h=r[w],h===null?r[w]=[a]:h.push(a),a.lane=l|536870912),O):null}function Vf(r){if(50<Ju)throw Ju=0,Fg=null,Error(i(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var Js={};function $N(r,a,l,h){this.tag=r,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mr(r,a,l,h){return new $N(r,a,l,h)}function Tm(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Ki(r,a){var l=r.alternate;return l===null?(l=mr(r.tag,a,r.key,r.mode),l.elementType=r.elementType,l.type=r.type,l.stateNode=r.stateNode,l.alternate=r,r.alternate=l):(l.pendingProps=a,l.type=r.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=r.flags&65011712,l.childLanes=r.childLanes,l.lanes=r.lanes,l.child=r.child,l.memoizedProps=r.memoizedProps,l.memoizedState=r.memoizedState,l.updateQueue=r.updateQueue,a=r.dependencies,l.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},l.sibling=r.sibling,l.index=r.index,l.ref=r.ref,l.refCleanup=r.refCleanup,l}function j_(r,a){r.flags&=65011714;var l=r.alternate;return l===null?(r.childLanes=0,r.lanes=a,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=l.childLanes,r.lanes=l.lanes,r.child=l.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=l.memoizedProps,r.memoizedState=l.memoizedState,r.updateQueue=l.updateQueue,r.type=l.type,a=l.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function Hf(r,a,l,h,w,O){var F=0;if(h=r,typeof r=="function")Tm(r)&&(F=1);else if(typeof r=="string")F=N2(r,l,k.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case M:return r=mr(31,l,a,w),r.elementType=M,r.lanes=O,r;case b:return Uo(l.children,w,O,a);case v:F=8,w|=24;break;case _:return r=mr(12,l,a,w|2),r.elementType=_,r.lanes=O,r;case C:return r=mr(13,l,a,w),r.elementType=C,r.lanes=O,r;case $:return r=mr(19,l,a,w),r.elementType=$,r.lanes=O,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case E:F=10;break e;case x:F=9;break e;case R:F=11;break e;case A:F=14;break e;case T:F=16,h=null;break e}F=29,l=Error(i(130,r===null?"null":typeof r,"")),h=null}return a=mr(F,l,a,w),a.elementType=r,a.type=h,a.lanes=O,a}function Uo(r,a,l,h){return r=mr(7,r,h,a),r.lanes=l,r}function Mm(r,a,l){return r=mr(6,r,null,a),r.lanes=l,r}function N_(r){var a=mr(18,null,null,0);return a.stateNode=r,a}function Dm(r,a,l){return a=mr(4,r.children!==null?r.children:[],r.key,a),a.lanes=l,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var P_=new WeakMap;function Ir(r,a){if(typeof r=="object"&&r!==null){var l=P_.get(r);return l!==void 0?l:(a={value:r,source:a,stack:Re(a)},P_.set(r,a),a)}return{value:r,source:a,stack:Re(a)}}var Zs=[],el=0,Kf=null,Mu=0,zr=[],Fr=0,ja=null,_i=1,wi="";function Gi(r,a){Zs[el++]=Mu,Zs[el++]=Kf,Kf=r,Mu=a}function I_(r,a,l){zr[Fr++]=_i,zr[Fr++]=wi,zr[Fr++]=ja,ja=r;var h=_i;r=wi;var w=32-de(h)-1;h&=~(1<<w),l+=1;var O=32-de(a)+w;if(30<O){var F=w-w%5;O=(h&(1<<F)-1).toString(32),h>>=F,w-=F,_i=1<<32-de(a)+w|l<<w|h,wi=O+r}else _i=1<<O|l<<w|h,wi=r}function jm(r){r.return!==null&&(Gi(r,1),I_(r,1,0))}function Nm(r){for(;r===Kf;)Kf=Zs[--el],Zs[el]=null,Mu=Zs[--el],Zs[el]=null;for(;r===ja;)ja=zr[--Fr],zr[Fr]=null,wi=zr[--Fr],zr[Fr]=null,_i=zr[--Fr],zr[Fr]=null}function z_(r,a){zr[Fr++]=_i,zr[Fr++]=wi,zr[Fr++]=ja,_i=a.id,wi=a.overflow,ja=r}var $n=null,Vt=null,ct=!1,Na=null,kr=!1,Pm=Error(i(519));function Pa(r){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Du(Ir(a,r)),Pm}function F_(r){var a=r.stateNode,l=r.type,h=r.memoizedProps;switch(a[nn]=r,a[An]=h,l){case"dialog":rt("cancel",a),rt("close",a);break;case"iframe":case"object":case"embed":rt("load",a);break;case"video":case"audio":for(l=0;l<ec.length;l++)rt(ec[l],a);break;case"source":rt("error",a);break;case"img":case"image":case"link":rt("error",a),rt("load",a);break;case"details":rt("toggle",a);break;case"input":rt("invalid",a),XS(a,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":rt("invalid",a);break;case"textarea":rt("invalid",a),ZS(a,h.value,h.defaultValue,h.children)}l=h.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||a.textContent===""+l||h.suppressHydrationWarning===!0||tE(a.textContent,l)?(h.popover!=null&&(rt("beforetoggle",a),rt("toggle",a)),h.onScroll!=null&&rt("scroll",a),h.onScrollEnd!=null&&rt("scrollend",a),h.onClick!=null&&(a.onclick=Vi),a=!0):a=!1,a||Pa(r,!0)}function k_(r){for($n=r.return;$n;)switch($n.tag){case 5:case 31:case 13:kr=!1;return;case 27:case 3:kr=!0;return;default:$n=$n.return}}function tl(r){if(r!==$n)return!1;if(!ct)return k_(r),ct=!0,!1;var a=r.tag,l;if((l=a!==3&&a!==27)&&((l=a===5)&&(l=r.type,l=!(l!=="form"&&l!=="button")||Zg(r.type,r.memoizedProps)),l=!l),l&&Vt&&Pa(r),k_(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));Vt=cE(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));Vt=cE(r)}else a===27?(a=Vt,Ya(r.type)?(r=iv,iv=null,Vt=r):Vt=a):Vt=$n?qr(r.stateNode.nextSibling):null;return!0}function Bo(){Vt=$n=null,ct=!1}function Im(){var r=Na;return r!==null&&(sr===null?sr=r:sr.push.apply(sr,r),Na=null),r}function Du(r){Na===null?Na=[r]:Na.push(r)}var zm=P(null),Vo=null,Qi=null;function Ia(r,a,l){U(zm,a._currentValue),a._currentValue=l}function Yi(r){r._currentValue=zm.current,B(zm)}function Fm(r,a,l){for(;r!==null;){var h=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,h!==null&&(h.childLanes|=a)):h!==null&&(h.childLanes&a)!==a&&(h.childLanes|=a),r===l)break;r=r.return}}function km(r,a,l,h){var w=r.child;for(w!==null&&(w.return=r);w!==null;){var O=w.dependencies;if(O!==null){var F=w.child;O=O.firstContext;e:for(;O!==null;){var H=O;O=w;for(var ee=0;ee<a.length;ee++)if(H.context===a[ee]){O.lanes|=l,H=O.alternate,H!==null&&(H.lanes|=l),Fm(O.return,l,r),h||(F=null);break e}O=H.next}}else if(w.tag===18){if(F=w.return,F===null)throw Error(i(341));F.lanes|=l,O=F.alternate,O!==null&&(O.lanes|=l),Fm(F,l,r),F=null}else F=w.child;if(F!==null)F.return=w;else for(F=w;F!==null;){if(F===r){F=null;break}if(w=F.sibling,w!==null){w.return=F.return,F=w;break}F=F.return}w=F}}function nl(r,a,l,h){r=null;for(var w=a,O=!1;w!==null;){if(!O){if((w.flags&524288)!==0)O=!0;else if((w.flags&262144)!==0)break}if(w.tag===10){var F=w.alternate;if(F===null)throw Error(i(387));if(F=F.memoizedProps,F!==null){var H=w.type;pr(w.pendingProps.value,F.value)||(r!==null?r.push(H):r=[H])}}else if(w===le.current){if(F=w.alternate,F===null)throw Error(i(387));F.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(r!==null?r.push(ac):r=[ac])}w=w.return}r!==null&&km(a,r,l,h),a.flags|=262144}function Gf(r){for(r=r.firstContext;r!==null;){if(!pr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Ho(r){Vo=r,Qi=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Tn(r){return L_(Vo,r)}function Qf(r,a){return Vo===null&&Ho(r),L_(r,a)}function L_(r,a){var l=a._currentValue;if(a={context:a,memoizedValue:l,next:null},Qi===null){if(r===null)throw Error(i(308));Qi=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else Qi=Qi.next=a;return l}var TN=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(l,h){r.push(h)}};this.abort=function(){a.aborted=!0,r.forEach(function(l){return l()})}},MN=e.unstable_scheduleCallback,DN=e.unstable_NormalPriority,un={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lm(){return{controller:new TN,data:new Map,refCount:0}}function ju(r){r.refCount--,r.refCount===0&&MN(DN,function(){r.controller.abort()})}var Nu=null,qm=0,rl=0,il=null;function jN(r,a){if(Nu===null){var l=Nu=[];qm=0,rl=Vg(),il={status:"pending",value:void 0,then:function(h){l.push(h)}}}return qm++,a.then(q_,q_),a}function q_(){if(--qm===0&&Nu!==null){il!==null&&(il.status="fulfilled");var r=Nu;Nu=null,rl=0,il=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function NN(r,a){var l=[],h={status:"pending",value:null,reason:null,then:function(w){l.push(w)}};return r.then(function(){h.status="fulfilled",h.value=a;for(var w=0;w<l.length;w++)(0,l[w])(a)},function(w){for(h.status="rejected",h.reason=w,w=0;w<l.length;w++)(0,l[w])(void 0)}),h}var U_=q.S;q.S=function(r,a){C1=je(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&jN(r,a),U_!==null&&U_(r,a)};var Ko=P(null);function Um(){var r=Ko.current;return r!==null?r:kt.pooledCache}function Yf(r,a){a===null?U(Ko,Ko.current):U(Ko,a.pool)}function B_(){var r=Um();return r===null?null:{parent:un._currentValue,pool:r}}var al=Error(i(460)),Bm=Error(i(474)),Wf=Error(i(542)),Xf={then:function(){}};function V_(r){return r=r.status,r==="fulfilled"||r==="rejected"}function H_(r,a,l){switch(l=r[l],l===void 0?r.push(a):l!==a&&(a.then(Vi,Vi),a=l),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,G_(r),r;default:if(typeof a.status=="string")a.then(Vi,Vi);else{if(r=kt,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=a,r.status="pending",r.then(function(h){if(a.status==="pending"){var w=a;w.status="fulfilled",w.value=h}},function(h){if(a.status==="pending"){var w=a;w.status="rejected",w.reason=h}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,G_(r),r}throw Qo=a,al}}function Go(r){try{var a=r._init;return a(r._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Qo=l,al):l}}var Qo=null;function K_(){if(Qo===null)throw Error(i(459));var r=Qo;return Qo=null,r}function G_(r){if(r===al||r===Wf)throw Error(i(483))}var ol=null,Pu=0;function Jf(r){var a=Pu;return Pu+=1,ol===null&&(ol=[]),H_(ol,r,a)}function Iu(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function Zf(r,a){throw a.$$typeof===y?Error(i(525)):(r=Object.prototype.toString.call(a),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function Q_(r){function a(ce,re){if(r){var pe=ce.deletions;pe===null?(ce.deletions=[re],ce.flags|=16):pe.push(re)}}function l(ce,re){if(!r)return null;for(;re!==null;)a(ce,re),re=re.sibling;return null}function h(ce){for(var re=new Map;ce!==null;)ce.key!==null?re.set(ce.key,ce):re.set(ce.index,ce),ce=ce.sibling;return re}function w(ce,re){return ce=Ki(ce,re),ce.index=0,ce.sibling=null,ce}function O(ce,re,pe){return ce.index=pe,r?(pe=ce.alternate,pe!==null?(pe=pe.index,pe<re?(ce.flags|=67108866,re):pe):(ce.flags|=67108866,re)):(ce.flags|=1048576,re)}function F(ce){return r&&ce.alternate===null&&(ce.flags|=67108866),ce}function H(ce,re,pe,we){return re===null||re.tag!==6?(re=Mm(pe,ce.mode,we),re.return=ce,re):(re=w(re,pe),re.return=ce,re)}function ee(ce,re,pe,we){var Pe=pe.type;return Pe===b?_e(ce,re,pe.props.children,we,pe.key):re!==null&&(re.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===T&&Go(Pe)===re.type)?(re=w(re,pe.props),Iu(re,pe),re.return=ce,re):(re=Hf(pe.type,pe.key,pe.props,null,ce.mode,we),Iu(re,pe),re.return=ce,re)}function me(ce,re,pe,we){return re===null||re.tag!==4||re.stateNode.containerInfo!==pe.containerInfo||re.stateNode.implementation!==pe.implementation?(re=Dm(pe,ce.mode,we),re.return=ce,re):(re=w(re,pe.children||[]),re.return=ce,re)}function _e(ce,re,pe,we,Pe){return re===null||re.tag!==7?(re=Uo(pe,ce.mode,we,Pe),re.return=ce,re):(re=w(re,pe),re.return=ce,re)}function Ee(ce,re,pe){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=Mm(""+re,ce.mode,pe),re.return=ce,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case S:return pe=Hf(re.type,re.key,re.props,null,ce.mode,pe),Iu(pe,re),pe.return=ce,pe;case g:return re=Dm(re,ce.mode,pe),re.return=ce,re;case T:return re=Go(re),Ee(ce,re,pe)}if(G(re)||I(re))return re=Uo(re,ce.mode,pe,null),re.return=ce,re;if(typeof re.then=="function")return Ee(ce,Jf(re),pe);if(re.$$typeof===E)return Ee(ce,Qf(ce,re),pe);Zf(ce,re)}return null}function ge(ce,re,pe,we){var Pe=re!==null?re.key:null;if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return Pe!==null?null:H(ce,re,""+pe,we);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case S:return pe.key===Pe?ee(ce,re,pe,we):null;case g:return pe.key===Pe?me(ce,re,pe,we):null;case T:return pe=Go(pe),ge(ce,re,pe,we)}if(G(pe)||I(pe))return Pe!==null?null:_e(ce,re,pe,we,null);if(typeof pe.then=="function")return ge(ce,re,Jf(pe),we);if(pe.$$typeof===E)return ge(ce,re,Qf(ce,pe),we);Zf(ce,pe)}return null}function be(ce,re,pe,we,Pe){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return ce=ce.get(pe)||null,H(re,ce,""+we,Pe);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case S:return ce=ce.get(we.key===null?pe:we.key)||null,ee(re,ce,we,Pe);case g:return ce=ce.get(we.key===null?pe:we.key)||null,me(re,ce,we,Pe);case T:return we=Go(we),be(ce,re,pe,we,Pe)}if(G(we)||I(we))return ce=ce.get(pe)||null,_e(re,ce,we,Pe,null);if(typeof we.then=="function")return be(ce,re,pe,Jf(we),Pe);if(we.$$typeof===E)return be(ce,re,pe,Qf(re,we),Pe);Zf(re,we)}return null}function Me(ce,re,pe,we){for(var Pe=null,vt=null,De=re,Ge=re=0,lt=null;De!==null&&Ge<pe.length;Ge++){De.index>Ge?(lt=De,De=null):lt=De.sibling;var yt=ge(ce,De,pe[Ge],we);if(yt===null){De===null&&(De=lt);break}r&&De&&yt.alternate===null&&a(ce,De),re=O(yt,re,Ge),vt===null?Pe=yt:vt.sibling=yt,vt=yt,De=lt}if(Ge===pe.length)return l(ce,De),ct&&Gi(ce,Ge),Pe;if(De===null){for(;Ge<pe.length;Ge++)De=Ee(ce,pe[Ge],we),De!==null&&(re=O(De,re,Ge),vt===null?Pe=De:vt.sibling=De,vt=De);return ct&&Gi(ce,Ge),Pe}for(De=h(De);Ge<pe.length;Ge++)lt=be(De,ce,Ge,pe[Ge],we),lt!==null&&(r&<.alternate!==null&&De.delete(lt.key===null?Ge:lt.key),re=O(lt,re,Ge),vt===null?Pe=lt:vt.sibling=lt,vt=lt);return r&&De.forEach(function(eo){return a(ce,eo)}),ct&&Gi(ce,Ge),Pe}function ze(ce,re,pe,we){if(pe==null)throw Error(i(151));for(var Pe=null,vt=null,De=re,Ge=re=0,lt=null,yt=pe.next();De!==null&&!yt.done;Ge++,yt=pe.next()){De.index>Ge?(lt=De,De=null):lt=De.sibling;var eo=ge(ce,De,yt.value,we);if(eo===null){De===null&&(De=lt);break}r&&De&&eo.alternate===null&&a(ce,De),re=O(eo,re,Ge),vt===null?Pe=eo:vt.sibling=eo,vt=eo,De=lt}if(yt.done)return l(ce,De),ct&&Gi(ce,Ge),Pe;if(De===null){for(;!yt.done;Ge++,yt=pe.next())yt=Ee(ce,yt.value,we),yt!==null&&(re=O(yt,re,Ge),vt===null?Pe=yt:vt.sibling=yt,vt=yt);return ct&&Gi(ce,Ge),Pe}for(De=h(De);!yt.done;Ge++,yt=pe.next())yt=be(De,ce,Ge,yt.value,we),yt!==null&&(r&&yt.alternate!==null&&De.delete(yt.key===null?Ge:yt.key),re=O(yt,re,Ge),vt===null?Pe=yt:vt.sibling=yt,vt=yt);return r&&De.forEach(function(H2){return a(ce,H2)}),ct&&Gi(ce,Ge),Pe}function zt(ce,re,pe,we){if(typeof pe=="object"&&pe!==null&&pe.type===b&&pe.key===null&&(pe=pe.props.children),typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case S:e:{for(var Pe=pe.key;re!==null;){if(re.key===Pe){if(Pe=pe.type,Pe===b){if(re.tag===7){l(ce,re.sibling),we=w(re,pe.props.children),we.return=ce,ce=we;break e}}else if(re.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===T&&Go(Pe)===re.type){l(ce,re.sibling),we=w(re,pe.props),Iu(we,pe),we.return=ce,ce=we;break e}l(ce,re);break}else a(ce,re);re=re.sibling}pe.type===b?(we=Uo(pe.props.children,ce.mode,we,pe.key),we.return=ce,ce=we):(we=Hf(pe.type,pe.key,pe.props,null,ce.mode,we),Iu(we,pe),we.return=ce,ce=we)}return F(ce);case g:e:{for(Pe=pe.key;re!==null;){if(re.key===Pe)if(re.tag===4&&re.stateNode.containerInfo===pe.containerInfo&&re.stateNode.implementation===pe.implementation){l(ce,re.sibling),we=w(re,pe.children||[]),we.return=ce,ce=we;break e}else{l(ce,re);break}else a(ce,re);re=re.sibling}we=Dm(pe,ce.mode,we),we.return=ce,ce=we}return F(ce);case T:return pe=Go(pe),zt(ce,re,pe,we)}if(G(pe))return Me(ce,re,pe,we);if(I(pe)){if(Pe=I(pe),typeof Pe!="function")throw Error(i(150));return pe=Pe.call(pe),ze(ce,re,pe,we)}if(typeof pe.then=="function")return zt(ce,re,Jf(pe),we);if(pe.$$typeof===E)return zt(ce,re,Qf(ce,pe),we);Zf(ce,pe)}return typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint"?(pe=""+pe,re!==null&&re.tag===6?(l(ce,re.sibling),we=w(re,pe),we.return=ce,ce=we):(l(ce,re),we=Mm(pe,ce.mode,we),we.return=ce,ce=we),F(ce)):l(ce,re)}return function(ce,re,pe,we){try{Pu=0;var Pe=zt(ce,re,pe,we);return ol=null,Pe}catch(De){if(De===al||De===Wf)throw De;var vt=mr(29,De,null,ce.mode);return vt.lanes=we,vt.return=ce,vt}finally{}}}var Yo=Q_(!0),Y_=Q_(!1),za=!1;function Vm(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hm(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Fa(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ka(r,a,l){var h=r.updateQueue;if(h===null)return null;if(h=h.shared,(Et&2)!==0){var w=h.pending;return w===null?a.next=a:(a.next=w.next,w.next=a),h.pending=a,a=Vf(r),D_(r,null,l),a}return Bf(r,h,a,l),Vf(r)}function zu(r,a,l){if(a=a.updateQueue,a!==null&&(a=a.shared,(l&4194048)!==0)){var h=a.lanes;h&=r.pendingLanes,l|=h,a.lanes=l,gn(r,l)}}function Km(r,a){var l=r.updateQueue,h=r.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var w=null,O=null;if(l=l.firstBaseUpdate,l!==null){do{var F={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};O===null?w=O=F:O=O.next=F,l=l.next}while(l!==null);O===null?w=O=a:O=O.next=a}else w=O=a;l={baseState:h.baseState,firstBaseUpdate:w,lastBaseUpdate:O,shared:h.shared,callbacks:h.callbacks},r.updateQueue=l;return}r=l.lastBaseUpdate,r===null?l.firstBaseUpdate=a:r.next=a,l.lastBaseUpdate=a}var Gm=!1;function Fu(){if(Gm){var r=il;if(r!==null)throw r}}function ku(r,a,l,h){Gm=!1;var w=r.updateQueue;za=!1;var O=w.firstBaseUpdate,F=w.lastBaseUpdate,H=w.shared.pending;if(H!==null){w.shared.pending=null;var ee=H,me=ee.next;ee.next=null,F===null?O=me:F.next=me,F=ee;var _e=r.alternate;_e!==null&&(_e=_e.updateQueue,H=_e.lastBaseUpdate,H!==F&&(H===null?_e.firstBaseUpdate=me:H.next=me,_e.lastBaseUpdate=ee))}if(O!==null){var Ee=w.baseState;F=0,_e=me=ee=null,H=O;do{var ge=H.lane&-536870913,be=ge!==H.lane;if(be?(st&ge)===ge:(h&ge)===ge){ge!==0&&ge===rl&&(Gm=!0),_e!==null&&(_e=_e.next={lane:0,tag:H.tag,payload:H.payload,callback:null,next:null});e:{var Me=r,ze=H;ge=a;var zt=l;switch(ze.tag){case 1:if(Me=ze.payload,typeof Me=="function"){Ee=Me.call(zt,Ee,ge);break e}Ee=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=ze.payload,ge=typeof Me=="function"?Me.call(zt,Ee,ge):Me,ge==null)break e;Ee=p({},Ee,ge);break e;case 2:za=!0}}ge=H.callback,ge!==null&&(r.flags|=64,be&&(r.flags|=8192),be=w.callbacks,be===null?w.callbacks=[ge]:be.push(ge))}else be={lane:ge,tag:H.tag,payload:H.payload,callback:H.callback,next:null},_e===null?(me=_e=be,ee=Ee):_e=_e.next=be,F|=ge;if(H=H.next,H===null){if(H=w.shared.pending,H===null)break;be=H,H=be.next,be.next=null,w.lastBaseUpdate=be,w.shared.pending=null}}while(!0);_e===null&&(ee=Ee),w.baseState=ee,w.firstBaseUpdate=me,w.lastBaseUpdate=_e,O===null&&(w.shared.lanes=0),Va|=F,r.lanes=F,r.memoizedState=Ee}}function W_(r,a){if(typeof r!="function")throw Error(i(191,r));r.call(a)}function X_(r,a){var l=r.callbacks;if(l!==null)for(r.callbacks=null,r=0;r<l.length;r++)W_(l[r],a)}var sl=P(null),ed=P(0);function J_(r,a){r=ia,U(ed,r),U(sl,a),ia=r|a.baseLanes}function Qm(){U(ed,ia),U(sl,sl.current)}function Ym(){ia=ed.current,B(sl),B(ed)}var gr=P(null),Lr=null;function La(r){var a=r.alternate;U(rn,rn.current&1),U(gr,r),Lr===null&&(a===null||sl.current!==null||a.memoizedState!==null)&&(Lr=r)}function Wm(r){U(rn,rn.current),U(gr,r),Lr===null&&(Lr=r)}function Z_(r){r.tag===22?(U(rn,rn.current),U(gr,r),Lr===null&&(Lr=r)):qa()}function qa(){U(rn,rn.current),U(gr,gr.current)}function vr(r){B(gr),Lr===r&&(Lr=null),B(rn)}var rn=P(0);function td(r){for(var a=r;a!==null;){if(a.tag===13){var l=a.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||nv(l)||rv(l)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Wi=0,Ke=null,Pt=null,cn=null,nd=!1,ll=!1,Wo=!1,rd=0,Lu=0,ul=null,PN=0;function Jt(){throw Error(i(321))}function Xm(r,a){if(a===null)return!1;for(var l=0;l<a.length&&l<r.length;l++)if(!pr(r[l],a[l]))return!1;return!0}function Jm(r,a,l,h,w,O){return Wi=O,Ke=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,q.H=r===null||r.memoizedState===null?Iw:hg,Wo=!1,O=l(h,w),Wo=!1,ll&&(O=tw(a,l,h,w)),ew(r),O}function ew(r){q.H=Bu;var a=Pt!==null&&Pt.next!==null;if(Wi=0,cn=Pt=Ke=null,nd=!1,Lu=0,ul=null,a)throw Error(i(300));r===null||fn||(r=r.dependencies,r!==null&&Gf(r)&&(fn=!0))}function tw(r,a,l,h){Ke=r;var w=0;do{if(ll&&(ul=null),Lu=0,ll=!1,25<=w)throw Error(i(301));if(w+=1,cn=Pt=null,r.updateQueue!=null){var O=r.updateQueue;O.lastEffect=null,O.events=null,O.stores=null,O.memoCache!=null&&(O.memoCache.index=0)}q.H=zw,O=a(l,h)}while(ll);return O}function IN(){var r=q.H,a=r.useState()[0];return a=typeof a.then=="function"?qu(a):a,r=r.useState()[0],(Pt!==null?Pt.memoizedState:null)!==r&&(Ke.flags|=1024),a}function Zm(){var r=rd!==0;return rd=0,r}function eg(r,a,l){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~l}function tg(r){if(nd){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}nd=!1}Wi=0,cn=Pt=Ke=null,ll=!1,Lu=rd=0,ul=null}function Qn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return cn===null?Ke.memoizedState=cn=r:cn=cn.next=r,cn}function an(){if(Pt===null){var r=Ke.alternate;r=r!==null?r.memoizedState:null}else r=Pt.next;var a=cn===null?Ke.memoizedState:cn.next;if(a!==null)cn=a,Pt=r;else{if(r===null)throw Ke.alternate===null?Error(i(467)):Error(i(310));Pt=r,r={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},cn===null?Ke.memoizedState=cn=r:cn=cn.next=r}return cn}function id(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qu(r){var a=Lu;return Lu+=1,ul===null&&(ul=[]),r=H_(ul,r,a),a=Ke,(cn===null?a.memoizedState:cn.next)===null&&(a=a.alternate,q.H=a===null||a.memoizedState===null?Iw:hg),r}function ad(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return qu(r);if(r.$$typeof===E)return Tn(r)}throw Error(i(438,String(r)))}function ng(r){var a=null,l=Ke.updateQueue;if(l!==null&&(a=l.memoCache),a==null){var h=Ke.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(a={data:h.data.map(function(w){return w.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),l===null&&(l=id(),Ke.updateQueue=l),l.memoCache=a,l=a.data[a.index],l===void 0)for(l=a.data[a.index]=Array(r),h=0;h<r;h++)l[h]=D;return a.index++,l}function Xi(r,a){return typeof a=="function"?a(r):a}function od(r){var a=an();return rg(a,Pt,r)}function rg(r,a,l){var h=r.queue;if(h===null)throw Error(i(311));h.lastRenderedReducer=l;var w=r.baseQueue,O=h.pending;if(O!==null){if(w!==null){var F=w.next;w.next=O.next,O.next=F}a.baseQueue=w=O,h.pending=null}if(O=r.baseState,w===null)r.memoizedState=O;else{a=w.next;var H=F=null,ee=null,me=a,_e=!1;do{var Ee=me.lane&-536870913;if(Ee!==me.lane?(st&Ee)===Ee:(Wi&Ee)===Ee){var ge=me.revertLane;if(ge===0)ee!==null&&(ee=ee.next={lane:0,revertLane:0,gesture:null,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null}),Ee===rl&&(_e=!0);else if((Wi&ge)===ge){me=me.next,ge===rl&&(_e=!0);continue}else Ee={lane:0,revertLane:me.revertLane,gesture:null,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null},ee===null?(H=ee=Ee,F=O):ee=ee.next=Ee,Ke.lanes|=ge,Va|=ge;Ee=me.action,Wo&&l(O,Ee),O=me.hasEagerState?me.eagerState:l(O,Ee)}else ge={lane:Ee,revertLane:me.revertLane,gesture:me.gesture,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null},ee===null?(H=ee=ge,F=O):ee=ee.next=ge,Ke.lanes|=Ee,Va|=Ee;me=me.next}while(me!==null&&me!==a);if(ee===null?F=O:ee.next=H,!pr(O,r.memoizedState)&&(fn=!0,_e&&(l=il,l!==null)))throw l;r.memoizedState=O,r.baseState=F,r.baseQueue=ee,h.lastRenderedState=O}return w===null&&(h.lanes=0),[r.memoizedState,h.dispatch]}function ig(r){var a=an(),l=a.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=r;var h=l.dispatch,w=l.pending,O=a.memoizedState;if(w!==null){l.pending=null;var F=w=w.next;do O=r(O,F.action),F=F.next;while(F!==w);pr(O,a.memoizedState)||(fn=!0),a.memoizedState=O,a.baseQueue===null&&(a.baseState=O),l.lastRenderedState=O}return[O,h]}function nw(r,a,l){var h=Ke,w=an(),O=ct;if(O){if(l===void 0)throw Error(i(407));l=l()}else l=a();var F=!pr((Pt||w).memoizedState,l);if(F&&(w.memoizedState=l,fn=!0),w=w.queue,sg(aw.bind(null,h,w,r),[r]),w.getSnapshot!==a||F||cn!==null&&cn.memoizedState.tag&1){if(h.flags|=2048,cl(9,{destroy:void 0},iw.bind(null,h,w,l,a),null),kt===null)throw Error(i(349));O||(Wi&127)!==0||rw(h,a,l)}return l}function rw(r,a,l){r.flags|=16384,r={getSnapshot:a,value:l},a=Ke.updateQueue,a===null?(a=id(),Ke.updateQueue=a,a.stores=[r]):(l=a.stores,l===null?a.stores=[r]:l.push(r))}function iw(r,a,l,h){a.value=l,a.getSnapshot=h,ow(a)&&sw(r)}function aw(r,a,l){return l(function(){ow(a)&&sw(r)})}function ow(r){var a=r.getSnapshot;r=r.value;try{var l=a();return!pr(r,l)}catch{return!0}}function sw(r){var a=qo(r,2);a!==null&&lr(a,r,2)}function ag(r){var a=Qn();if(typeof r=="function"){var l=r;if(r=l(),Wo){mn(!0);try{l()}finally{mn(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xi,lastRenderedState:r},a}function lw(r,a,l,h){return r.baseState=l,rg(r,Pt,typeof h=="function"?h:Xi)}function zN(r,a,l,h,w){if(ud(r))throw Error(i(485));if(r=a.action,r!==null){var O={payload:w,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(F){O.listeners.push(F)}};q.T!==null?l(!0):O.isTransition=!1,h(O),l=a.pending,l===null?(O.next=a.pending=O,uw(a,O)):(O.next=l.next,a.pending=l.next=O)}}function uw(r,a){var l=a.action,h=a.payload,w=r.state;if(a.isTransition){var O=q.T,F={};q.T=F;try{var H=l(w,h),ee=q.S;ee!==null&&ee(F,H),cw(r,a,H)}catch(me){og(r,a,me)}finally{O!==null&&F.types!==null&&(O.types=F.types),q.T=O}}else try{O=l(w,h),cw(r,a,O)}catch(me){og(r,a,me)}}function cw(r,a,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(h){fw(r,a,h)},function(h){return og(r,a,h)}):fw(r,a,l)}function fw(r,a,l){a.status="fulfilled",a.value=l,dw(a),r.state=l,a=r.pending,a!==null&&(l=a.next,l===a?r.pending=null:(l=l.next,a.next=l,uw(r,l)))}function og(r,a,l){var h=r.pending;if(r.pending=null,h!==null){h=h.next;do a.status="rejected",a.reason=l,dw(a),a=a.next;while(a!==h)}r.action=null}function dw(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function hw(r,a){return a}function pw(r,a){if(ct){var l=kt.formState;if(l!==null){e:{var h=Ke;if(ct){if(Vt){t:{for(var w=Vt,O=kr;w.nodeType!==8;){if(!O){w=null;break t}if(w=qr(w.nextSibling),w===null){w=null;break t}}O=w.data,w=O==="F!"||O==="F"?w:null}if(w){Vt=qr(w.nextSibling),h=w.data==="F!";break e}}Pa(h)}h=!1}h&&(a=l[0])}}return l=Qn(),l.memoizedState=l.baseState=a,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hw,lastRenderedState:a},l.queue=h,l=jw.bind(null,Ke,h),h.dispatch=l,h=ag(!1),O=dg.bind(null,Ke,!1,h.queue),h=Qn(),w={state:a,dispatch:null,action:r,pending:null},h.queue=w,l=zN.bind(null,Ke,w,O,l),w.dispatch=l,h.memoizedState=r,[a,l,!1]}function mw(r){var a=an();return gw(a,Pt,r)}function gw(r,a,l){if(a=rg(r,a,hw)[0],r=od(Xi)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var h=qu(a)}catch(F){throw F===al?Wf:F}else h=a;a=an();var w=a.queue,O=w.dispatch;return l!==a.memoizedState&&(Ke.flags|=2048,cl(9,{destroy:void 0},FN.bind(null,w,l),null)),[h,O,r]}function FN(r,a){r.action=a}function vw(r){var a=an(),l=Pt;if(l!==null)return gw(a,l,r);an(),a=a.memoizedState,l=an();var h=l.queue.dispatch;return l.memoizedState=r,[a,h,!1]}function cl(r,a,l,h){return r={tag:r,create:l,deps:h,inst:a,next:null},a=Ke.updateQueue,a===null&&(a=id(),Ke.updateQueue=a),l=a.lastEffect,l===null?a.lastEffect=r.next=r:(h=l.next,l.next=r,r.next=h,a.lastEffect=r),r}function yw(){return an().memoizedState}function sd(r,a,l,h){var w=Qn();Ke.flags|=r,w.memoizedState=cl(1|a,{destroy:void 0},l,h===void 0?null:h)}function ld(r,a,l,h){var w=an();h=h===void 0?null:h;var O=w.memoizedState.inst;Pt!==null&&h!==null&&Xm(h,Pt.memoizedState.deps)?w.memoizedState=cl(a,O,l,h):(Ke.flags|=r,w.memoizedState=cl(1|a,O,l,h))}function bw(r,a){sd(8390656,8,r,a)}function sg(r,a){ld(2048,8,r,a)}function kN(r){Ke.flags|=4;var a=Ke.updateQueue;if(a===null)a=id(),Ke.updateQueue=a,a.events=[r];else{var l=a.events;l===null?a.events=[r]:l.push(r)}}function Sw(r){var a=an().memoizedState;return kN({ref:a,nextImpl:r}),function(){if((Et&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function _w(r,a){return ld(4,2,r,a)}function ww(r,a){return ld(4,4,r,a)}function Ew(r,a){if(typeof a=="function"){r=r();var l=a(r);return function(){typeof l=="function"?l():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function xw(r,a,l){l=l!=null?l.concat([r]):null,ld(4,4,Ew.bind(null,a,r),l)}function lg(){}function Cw(r,a){var l=an();a=a===void 0?null:a;var h=l.memoizedState;return a!==null&&Xm(a,h[1])?h[0]:(l.memoizedState=[r,a],r)}function Rw(r,a){var l=an();a=a===void 0?null:a;var h=l.memoizedState;if(a!==null&&Xm(a,h[1]))return h[0];if(h=r(),Wo){mn(!0);try{r()}finally{mn(!1)}}return l.memoizedState=[h,a],h}function ug(r,a,l){return l===void 0||(Wi&1073741824)!==0&&(st&261930)===0?r.memoizedState=a:(r.memoizedState=l,r=O1(),Ke.lanes|=r,Va|=r,l)}function Ow(r,a,l,h){return pr(l,a)?l:sl.current!==null?(r=ug(r,l,h),pr(r,a)||(fn=!0),r):(Wi&42)===0||(Wi&1073741824)!==0&&(st&261930)===0?(fn=!0,r.memoizedState=l):(r=O1(),Ke.lanes|=r,Va|=r,a)}function Aw(r,a,l,h,w){var O=Q.p;Q.p=O!==0&&8>O?O:8;var F=q.T,H={};q.T=H,dg(r,!1,a,l);try{var ee=w(),me=q.S;if(me!==null&&me(H,ee),ee!==null&&typeof ee=="object"&&typeof ee.then=="function"){var _e=NN(ee,h);Uu(r,a,_e,Sr(r))}else Uu(r,a,h,Sr(r))}catch(Ee){Uu(r,a,{then:function(){},status:"rejected",reason:Ee},Sr())}finally{Q.p=O,F!==null&&H.types!==null&&(F.types=H.types),q.T=F}}function LN(){}function cg(r,a,l,h){if(r.tag!==5)throw Error(i(476));var w=$w(r).queue;Aw(r,w,a,W,l===null?LN:function(){return Tw(r),l(h)})}function $w(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xi,lastRenderedState:W},next:null};var l={};return a.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xi,lastRenderedState:l},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function Tw(r){var a=$w(r);a.next===null&&(a=r.alternate.memoizedState),Uu(r,a.next.queue,{},Sr())}function fg(){return Tn(ac)}function Mw(){return an().memoizedState}function Dw(){return an().memoizedState}function qN(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var l=Sr();r=Fa(l);var h=ka(a,r,l);h!==null&&(lr(h,a,l),zu(h,a,l)),a={cache:Lm()},r.payload=a;return}a=a.return}}function UN(r,a,l){var h=Sr();l={lane:h,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ud(r)?Nw(a,l):(l=$m(r,a,l,h),l!==null&&(lr(l,r,h),Pw(l,a,h)))}function jw(r,a,l){var h=Sr();Uu(r,a,l,h)}function Uu(r,a,l,h){var w={lane:h,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ud(r))Nw(a,w);else{var O=r.alternate;if(r.lanes===0&&(O===null||O.lanes===0)&&(O=a.lastRenderedReducer,O!==null))try{var F=a.lastRenderedState,H=O(F,l);if(w.hasEagerState=!0,w.eagerState=H,pr(H,F))return Bf(r,a,w,0),kt===null&&Uf(),!1}catch{}finally{}if(l=$m(r,a,w,h),l!==null)return lr(l,r,h),Pw(l,a,h),!0}return!1}function dg(r,a,l,h){if(h={lane:2,revertLane:Vg(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},ud(r)){if(a)throw Error(i(479))}else a=$m(r,l,h,2),a!==null&&lr(a,r,2)}function ud(r){var a=r.alternate;return r===Ke||a!==null&&a===Ke}function Nw(r,a){ll=nd=!0;var l=r.pending;l===null?a.next=a:(a.next=l.next,l.next=a),r.pending=a}function Pw(r,a,l){if((l&4194048)!==0){var h=a.lanes;h&=r.pendingLanes,l|=h,a.lanes=l,gn(r,l)}}var Bu={readContext:Tn,use:ad,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useLayoutEffect:Jt,useInsertionEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useSyncExternalStore:Jt,useId:Jt,useHostTransitionStatus:Jt,useFormState:Jt,useActionState:Jt,useOptimistic:Jt,useMemoCache:Jt,useCacheRefresh:Jt};Bu.useEffectEvent=Jt;var Iw={readContext:Tn,use:ad,useCallback:function(r,a){return Qn().memoizedState=[r,a===void 0?null:a],r},useContext:Tn,useEffect:bw,useImperativeHandle:function(r,a,l){l=l!=null?l.concat([r]):null,sd(4194308,4,Ew.bind(null,a,r),l)},useLayoutEffect:function(r,a){return sd(4194308,4,r,a)},useInsertionEffect:function(r,a){sd(4,2,r,a)},useMemo:function(r,a){var l=Qn();a=a===void 0?null:a;var h=r();if(Wo){mn(!0);try{r()}finally{mn(!1)}}return l.memoizedState=[h,a],h},useReducer:function(r,a,l){var h=Qn();if(l!==void 0){var w=l(a);if(Wo){mn(!0);try{l(a)}finally{mn(!1)}}}else w=a;return h.memoizedState=h.baseState=w,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:w},h.queue=r,r=r.dispatch=UN.bind(null,Ke,r),[h.memoizedState,r]},useRef:function(r){var a=Qn();return r={current:r},a.memoizedState=r},useState:function(r){r=ag(r);var a=r.queue,l=jw.bind(null,Ke,a);return a.dispatch=l,[r.memoizedState,l]},useDebugValue:lg,useDeferredValue:function(r,a){var l=Qn();return ug(l,r,a)},useTransition:function(){var r=ag(!1);return r=Aw.bind(null,Ke,r.queue,!0,!1),Qn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,l){var h=Ke,w=Qn();if(ct){if(l===void 0)throw Error(i(407));l=l()}else{if(l=a(),kt===null)throw Error(i(349));(st&127)!==0||rw(h,a,l)}w.memoizedState=l;var O={value:l,getSnapshot:a};return w.queue=O,bw(aw.bind(null,h,O,r),[r]),h.flags|=2048,cl(9,{destroy:void 0},iw.bind(null,h,O,l,a),null),l},useId:function(){var r=Qn(),a=kt.identifierPrefix;if(ct){var l=wi,h=_i;l=(h&~(1<<32-de(h)-1)).toString(32)+l,a="_"+a+"R_"+l,l=rd++,0<l&&(a+="H"+l.toString(32)),a+="_"}else l=PN++,a="_"+a+"r_"+l.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:fg,useFormState:pw,useActionState:pw,useOptimistic:function(r){var a=Qn();a.memoizedState=a.baseState=r;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=l,a=dg.bind(null,Ke,!0,l),l.dispatch=a,[r,a]},useMemoCache:ng,useCacheRefresh:function(){return Qn().memoizedState=qN.bind(null,Ke)},useEffectEvent:function(r){var a=Qn(),l={impl:r};return a.memoizedState=l,function(){if((Et&2)!==0)throw Error(i(440));return l.impl.apply(void 0,arguments)}}},hg={readContext:Tn,use:ad,useCallback:Cw,useContext:Tn,useEffect:sg,useImperativeHandle:xw,useInsertionEffect:_w,useLayoutEffect:ww,useMemo:Rw,useReducer:od,useRef:yw,useState:function(){return od(Xi)},useDebugValue:lg,useDeferredValue:function(r,a){var l=an();return Ow(l,Pt.memoizedState,r,a)},useTransition:function(){var r=od(Xi)[0],a=an().memoizedState;return[typeof r=="boolean"?r:qu(r),a]},useSyncExternalStore:nw,useId:Mw,useHostTransitionStatus:fg,useFormState:mw,useActionState:mw,useOptimistic:function(r,a){var l=an();return lw(l,Pt,r,a)},useMemoCache:ng,useCacheRefresh:Dw};hg.useEffectEvent=Sw;var zw={readContext:Tn,use:ad,useCallback:Cw,useContext:Tn,useEffect:sg,useImperativeHandle:xw,useInsertionEffect:_w,useLayoutEffect:ww,useMemo:Rw,useReducer:ig,useRef:yw,useState:function(){return ig(Xi)},useDebugValue:lg,useDeferredValue:function(r,a){var l=an();return Pt===null?ug(l,r,a):Ow(l,Pt.memoizedState,r,a)},useTransition:function(){var r=ig(Xi)[0],a=an().memoizedState;return[typeof r=="boolean"?r:qu(r),a]},useSyncExternalStore:nw,useId:Mw,useHostTransitionStatus:fg,useFormState:vw,useActionState:vw,useOptimistic:function(r,a){var l=an();return Pt!==null?lw(l,Pt,r,a):(l.baseState=r,[r,l.queue.dispatch])},useMemoCache:ng,useCacheRefresh:Dw};zw.useEffectEvent=Sw;function pg(r,a,l,h){a=r.memoizedState,l=l(h,a),l=l==null?a:p({},a,l),r.memoizedState=l,r.lanes===0&&(r.updateQueue.baseState=l)}var mg={enqueueSetState:function(r,a,l){r=r._reactInternals;var h=Sr(),w=Fa(h);w.payload=a,l!=null&&(w.callback=l),a=ka(r,w,h),a!==null&&(lr(a,r,h),zu(a,r,h))},enqueueReplaceState:function(r,a,l){r=r._reactInternals;var h=Sr(),w=Fa(h);w.tag=1,w.payload=a,l!=null&&(w.callback=l),a=ka(r,w,h),a!==null&&(lr(a,r,h),zu(a,r,h))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var l=Sr(),h=Fa(l);h.tag=2,a!=null&&(h.callback=a),a=ka(r,h,l),a!==null&&(lr(a,r,l),zu(a,r,l))}};function Fw(r,a,l,h,w,O,F){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(h,O,F):a.prototype&&a.prototype.isPureReactComponent?!$u(l,h)||!$u(w,O):!0}function kw(r,a,l,h){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(l,h),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(l,h),a.state!==r&&mg.enqueueReplaceState(a,a.state,null)}function Xo(r,a){var l=a;if("ref"in a){l={};for(var h in a)h!=="ref"&&(l[h]=a[h])}if(r=r.defaultProps){l===a&&(l=p({},l));for(var w in r)l[w]===void 0&&(l[w]=r[w])}return l}function Lw(r){qf(r)}function qw(r){console.error(r)}function Uw(r){qf(r)}function cd(r,a){try{var l=r.onUncaughtError;l(a.value,{componentStack:a.stack})}catch(h){setTimeout(function(){throw h})}}function Bw(r,a,l){try{var h=r.onCaughtError;h(l.value,{componentStack:l.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(w){setTimeout(function(){throw w})}}function gg(r,a,l){return l=Fa(l),l.tag=3,l.payload={element:null},l.callback=function(){cd(r,a)},l}function Vw(r){return r=Fa(r),r.tag=3,r}function Hw(r,a,l,h){var w=l.type.getDerivedStateFromError;if(typeof w=="function"){var O=h.value;r.payload=function(){return w(O)},r.callback=function(){Bw(a,l,h)}}var F=l.stateNode;F!==null&&typeof F.componentDidCatch=="function"&&(r.callback=function(){Bw(a,l,h),typeof w!="function"&&(Ha===null?Ha=new Set([this]):Ha.add(this));var H=h.stack;this.componentDidCatch(h.value,{componentStack:H!==null?H:""})})}function BN(r,a,l,h,w){if(l.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(a=l.alternate,a!==null&&nl(a,l,w,!0),l=gr.current,l!==null){switch(l.tag){case 31:case 13:return Lr===null?wd():l.alternate===null&&Zt===0&&(Zt=3),l.flags&=-257,l.flags|=65536,l.lanes=w,h===Xf?l.flags|=16384:(a=l.updateQueue,a===null?l.updateQueue=new Set([h]):a.add(h),qg(r,h,w)),!1;case 22:return l.flags|=65536,h===Xf?l.flags|=16384:(a=l.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([h])},l.updateQueue=a):(l=a.retryQueue,l===null?a.retryQueue=new Set([h]):l.add(h)),qg(r,h,w)),!1}throw Error(i(435,l.tag))}return qg(r,h,w),wd(),!1}if(ct)return a=gr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=w,h!==Pm&&(r=Error(i(422),{cause:h}),Du(Ir(r,l)))):(h!==Pm&&(a=Error(i(423),{cause:h}),Du(Ir(a,l))),r=r.current.alternate,r.flags|=65536,w&=-w,r.lanes|=w,h=Ir(h,l),w=gg(r.stateNode,h,w),Km(r,w),Zt!==4&&(Zt=2)),!1;var O=Error(i(520),{cause:h});if(O=Ir(O,l),Xu===null?Xu=[O]:Xu.push(O),Zt!==4&&(Zt=2),a===null)return!0;h=Ir(h,l),l=a;do{switch(l.tag){case 3:return l.flags|=65536,r=w&-w,l.lanes|=r,r=gg(l.stateNode,h,r),Km(l,r),!1;case 1:if(a=l.type,O=l.stateNode,(l.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(Ha===null||!Ha.has(O))))return l.flags|=65536,w&=-w,l.lanes|=w,w=Vw(w),Hw(w,r,l,h),Km(l,w),!1}l=l.return}while(l!==null);return!1}var vg=Error(i(461)),fn=!1;function Mn(r,a,l,h){a.child=r===null?Y_(a,null,l,h):Yo(a,r.child,l,h)}function Kw(r,a,l,h,w){l=l.render;var O=a.ref;if("ref"in h){var F={};for(var H in h)H!=="ref"&&(F[H]=h[H])}else F=h;return Ho(a),h=Jm(r,a,l,F,O,w),H=Zm(),r!==null&&!fn?(eg(r,a,w),Ji(r,a,w)):(ct&&H&&jm(a),a.flags|=1,Mn(r,a,h,w),a.child)}function Gw(r,a,l,h,w){if(r===null){var O=l.type;return typeof O=="function"&&!Tm(O)&&O.defaultProps===void 0&&l.compare===null?(a.tag=15,a.type=O,Qw(r,a,O,h,w)):(r=Hf(l.type,null,h,a,a.mode,w),r.ref=a.ref,r.return=a,a.child=r)}if(O=r.child,!Cg(r,w)){var F=O.memoizedProps;if(l=l.compare,l=l!==null?l:$u,l(F,h)&&r.ref===a.ref)return Ji(r,a,w)}return a.flags|=1,r=Ki(O,h),r.ref=a.ref,r.return=a,a.child=r}function Qw(r,a,l,h,w){if(r!==null){var O=r.memoizedProps;if($u(O,h)&&r.ref===a.ref)if(fn=!1,a.pendingProps=h=O,Cg(r,w))(r.flags&131072)!==0&&(fn=!0);else return a.lanes=r.lanes,Ji(r,a,w)}return yg(r,a,l,h,w)}function Yw(r,a,l,h){var w=h.children,O=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((a.flags&128)!==0){if(O=O!==null?O.baseLanes|l:l,r!==null){for(h=a.child=r.child,w=0;h!==null;)w=w|h.lanes|h.childLanes,h=h.sibling;h=w&~O}else h=0,a.child=null;return Ww(r,a,O,l,h)}if((l&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&Yf(a,O!==null?O.cachePool:null),O!==null?J_(a,O):Qm(),Z_(a);else return h=a.lanes=536870912,Ww(r,a,O!==null?O.baseLanes|l:l,l,h)}else O!==null?(Yf(a,O.cachePool),J_(a,O),qa(),a.memoizedState=null):(r!==null&&Yf(a,null),Qm(),qa());return Mn(r,a,w,l),a.child}function Vu(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Ww(r,a,l,h,w){var O=Um();return O=O===null?null:{parent:un._currentValue,pool:O},a.memoizedState={baseLanes:l,cachePool:O},r!==null&&Yf(a,null),Qm(),Z_(a),r!==null&&nl(r,a,h,!0),a.childLanes=w,null}function fd(r,a){return a=hd({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function Xw(r,a,l){return Yo(a,r.child,null,l),r=fd(a,a.pendingProps),r.flags|=2,vr(a),a.memoizedState=null,r}function VN(r,a,l){var h=a.pendingProps,w=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(ct){if(h.mode==="hidden")return r=fd(a,h),a.lanes=536870912,Vu(null,r);if(Wm(a),(r=Vt)?(r=uE(r,kr),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ja!==null?{id:_i,overflow:wi}:null,retryLane:536870912,hydrationErrors:null},l=N_(r),l.return=a,a.child=l,$n=a,Vt=null)):r=null,r===null)throw Pa(a);return a.lanes=536870912,null}return fd(a,h)}var O=r.memoizedState;if(O!==null){var F=O.dehydrated;if(Wm(a),w)if(a.flags&256)a.flags&=-257,a=Xw(r,a,l);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(i(558));else if(fn||nl(r,a,l,!1),w=(l&r.childLanes)!==0,fn||w){if(h=kt,h!==null&&(F=kn(h,l),F!==0&&F!==O.retryLane))throw O.retryLane=F,qo(r,F),lr(h,r,F),vg;wd(),a=Xw(r,a,l)}else r=O.treeContext,Vt=qr(F.nextSibling),$n=a,ct=!0,Na=null,kr=!1,r!==null&&z_(a,r),a=fd(a,h),a.flags|=4096;return a}return r=Ki(r.child,{mode:h.mode,children:h.children}),r.ref=a.ref,a.child=r,r.return=a,r}function dd(r,a){var l=a.ref;if(l===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(i(284));(r===null||r.ref!==l)&&(a.flags|=4194816)}}function yg(r,a,l,h,w){return Ho(a),l=Jm(r,a,l,h,void 0,w),h=Zm(),r!==null&&!fn?(eg(r,a,w),Ji(r,a,w)):(ct&&h&&jm(a),a.flags|=1,Mn(r,a,l,w),a.child)}function Jw(r,a,l,h,w,O){return Ho(a),a.updateQueue=null,l=tw(a,h,l,w),ew(r),h=Zm(),r!==null&&!fn?(eg(r,a,O),Ji(r,a,O)):(ct&&h&&jm(a),a.flags|=1,Mn(r,a,l,O),a.child)}function Zw(r,a,l,h,w){if(Ho(a),a.stateNode===null){var O=Js,F=l.contextType;typeof F=="object"&&F!==null&&(O=Tn(F)),O=new l(h,O),a.memoizedState=O.state!==null&&O.state!==void 0?O.state:null,O.updater=mg,a.stateNode=O,O._reactInternals=a,O=a.stateNode,O.props=h,O.state=a.memoizedState,O.refs={},Vm(a),F=l.contextType,O.context=typeof F=="object"&&F!==null?Tn(F):Js,O.state=a.memoizedState,F=l.getDerivedStateFromProps,typeof F=="function"&&(pg(a,l,F,h),O.state=a.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof O.getSnapshotBeforeUpdate=="function"||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(F=O.state,typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount(),F!==O.state&&mg.enqueueReplaceState(O,O.state,null),ku(a,h,O,w),Fu(),O.state=a.memoizedState),typeof O.componentDidMount=="function"&&(a.flags|=4194308),h=!0}else if(r===null){O=a.stateNode;var H=a.memoizedProps,ee=Xo(l,H);O.props=ee;var me=O.context,_e=l.contextType;F=Js,typeof _e=="object"&&_e!==null&&(F=Tn(_e));var Ee=l.getDerivedStateFromProps;_e=typeof Ee=="function"||typeof O.getSnapshotBeforeUpdate=="function",H=a.pendingProps!==H,_e||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(H||me!==F)&&kw(a,O,h,F),za=!1;var ge=a.memoizedState;O.state=ge,ku(a,h,O,w),Fu(),me=a.memoizedState,H||ge!==me||za?(typeof Ee=="function"&&(pg(a,l,Ee,h),me=a.memoizedState),(ee=za||Fw(a,l,ee,h,ge,me,F))?(_e||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount()),typeof O.componentDidMount=="function"&&(a.flags|=4194308)):(typeof O.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=h,a.memoizedState=me),O.props=h,O.state=me,O.context=F,h=ee):(typeof O.componentDidMount=="function"&&(a.flags|=4194308),h=!1)}else{O=a.stateNode,Hm(r,a),F=a.memoizedProps,_e=Xo(l,F),O.props=_e,Ee=a.pendingProps,ge=O.context,me=l.contextType,ee=Js,typeof me=="object"&&me!==null&&(ee=Tn(me)),H=l.getDerivedStateFromProps,(me=typeof H=="function"||typeof O.getSnapshotBeforeUpdate=="function")||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(F!==Ee||ge!==ee)&&kw(a,O,h,ee),za=!1,ge=a.memoizedState,O.state=ge,ku(a,h,O,w),Fu();var be=a.memoizedState;F!==Ee||ge!==be||za||r!==null&&r.dependencies!==null&&Gf(r.dependencies)?(typeof H=="function"&&(pg(a,l,H,h),be=a.memoizedState),(_e=za||Fw(a,l,_e,h,ge,be,ee)||r!==null&&r.dependencies!==null&&Gf(r.dependencies))?(me||typeof O.UNSAFE_componentWillUpdate!="function"&&typeof O.componentWillUpdate!="function"||(typeof O.componentWillUpdate=="function"&&O.componentWillUpdate(h,be,ee),typeof O.UNSAFE_componentWillUpdate=="function"&&O.UNSAFE_componentWillUpdate(h,be,ee)),typeof O.componentDidUpdate=="function"&&(a.flags|=4),typeof O.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof O.componentDidUpdate!="function"||F===r.memoizedProps&&ge===r.memoizedState||(a.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||F===r.memoizedProps&&ge===r.memoizedState||(a.flags|=1024),a.memoizedProps=h,a.memoizedState=be),O.props=h,O.state=be,O.context=ee,h=_e):(typeof O.componentDidUpdate!="function"||F===r.memoizedProps&&ge===r.memoizedState||(a.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||F===r.memoizedProps&&ge===r.memoizedState||(a.flags|=1024),h=!1)}return O=h,dd(r,a),h=(a.flags&128)!==0,O||h?(O=a.stateNode,l=h&&typeof l.getDerivedStateFromError!="function"?null:O.render(),a.flags|=1,r!==null&&h?(a.child=Yo(a,r.child,null,w),a.child=Yo(a,null,l,w)):Mn(r,a,l,w),a.memoizedState=O.state,r=a.child):r=Ji(r,a,w),r}function e1(r,a,l,h){return Bo(),a.flags|=256,Mn(r,a,l,h),a.child}var bg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sg(r){return{baseLanes:r,cachePool:B_()}}function _g(r,a,l){return r=r!==null?r.childLanes&~l:0,a&&(r|=br),r}function t1(r,a,l){var h=a.pendingProps,w=!1,O=(a.flags&128)!==0,F;if((F=O)||(F=r!==null&&r.memoizedState===null?!1:(rn.current&2)!==0),F&&(w=!0,a.flags&=-129),F=(a.flags&32)!==0,a.flags&=-33,r===null){if(ct){if(w?La(a):qa(),(r=Vt)?(r=uE(r,kr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ja!==null?{id:_i,overflow:wi}:null,retryLane:536870912,hydrationErrors:null},l=N_(r),l.return=a,a.child=l,$n=a,Vt=null)):r=null,r===null)throw Pa(a);return rv(r)?a.lanes=32:a.lanes=536870912,null}var H=h.children;return h=h.fallback,w?(qa(),w=a.mode,H=hd({mode:"hidden",children:H},w),h=Uo(h,w,l,null),H.return=a,h.return=a,H.sibling=h,a.child=H,h=a.child,h.memoizedState=Sg(l),h.childLanes=_g(r,F,l),a.memoizedState=bg,Vu(null,h)):(La(a),wg(a,H))}var ee=r.memoizedState;if(ee!==null&&(H=ee.dehydrated,H!==null)){if(O)a.flags&256?(La(a),a.flags&=-257,a=Eg(r,a,l)):a.memoizedState!==null?(qa(),a.child=r.child,a.flags|=128,a=null):(qa(),H=h.fallback,w=a.mode,h=hd({mode:"visible",children:h.children},w),H=Uo(H,w,l,null),H.flags|=2,h.return=a,H.return=a,h.sibling=H,a.child=h,Yo(a,r.child,null,l),h=a.child,h.memoizedState=Sg(l),h.childLanes=_g(r,F,l),a.memoizedState=bg,a=Vu(null,h));else if(La(a),rv(H)){if(F=H.nextSibling&&H.nextSibling.dataset,F)var me=F.dgst;F=me,h=Error(i(419)),h.stack="",h.digest=F,Du({value:h,source:null,stack:null}),a=Eg(r,a,l)}else if(fn||nl(r,a,l,!1),F=(l&r.childLanes)!==0,fn||F){if(F=kt,F!==null&&(h=kn(F,l),h!==0&&h!==ee.retryLane))throw ee.retryLane=h,qo(r,h),lr(F,r,h),vg;nv(H)||wd(),a=Eg(r,a,l)}else nv(H)?(a.flags|=192,a.child=r.child,a=null):(r=ee.treeContext,Vt=qr(H.nextSibling),$n=a,ct=!0,Na=null,kr=!1,r!==null&&z_(a,r),a=wg(a,h.children),a.flags|=4096);return a}return w?(qa(),H=h.fallback,w=a.mode,ee=r.child,me=ee.sibling,h=Ki(ee,{mode:"hidden",children:h.children}),h.subtreeFlags=ee.subtreeFlags&65011712,me!==null?H=Ki(me,H):(H=Uo(H,w,l,null),H.flags|=2),H.return=a,h.return=a,h.sibling=H,a.child=h,Vu(null,h),h=a.child,H=r.child.memoizedState,H===null?H=Sg(l):(w=H.cachePool,w!==null?(ee=un._currentValue,w=w.parent!==ee?{parent:ee,pool:ee}:w):w=B_(),H={baseLanes:H.baseLanes|l,cachePool:w}),h.memoizedState=H,h.childLanes=_g(r,F,l),a.memoizedState=bg,Vu(r.child,h)):(La(a),l=r.child,r=l.sibling,l=Ki(l,{mode:"visible",children:h.children}),l.return=a,l.sibling=null,r!==null&&(F=a.deletions,F===null?(a.deletions=[r],a.flags|=16):F.push(r)),a.child=l,a.memoizedState=null,l)}function wg(r,a){return a=hd({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function hd(r,a){return r=mr(22,r,null,a),r.lanes=0,r}function Eg(r,a,l){return Yo(a,r.child,null,l),r=wg(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function n1(r,a,l){r.lanes|=a;var h=r.alternate;h!==null&&(h.lanes|=a),Fm(r.return,a,l)}function xg(r,a,l,h,w,O){var F=r.memoizedState;F===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:w,treeForkCount:O}:(F.isBackwards=a,F.rendering=null,F.renderingStartTime=0,F.last=h,F.tail=l,F.tailMode=w,F.treeForkCount=O)}function r1(r,a,l){var h=a.pendingProps,w=h.revealOrder,O=h.tail;h=h.children;var F=rn.current,H=(F&2)!==0;if(H?(F=F&1|2,a.flags|=128):F&=1,U(rn,F),Mn(r,a,h,l),h=ct?Mu:0,!H&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&n1(r,l,a);else if(r.tag===19)n1(r,l,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(w){case"forwards":for(l=a.child,w=null;l!==null;)r=l.alternate,r!==null&&td(r)===null&&(w=l),l=l.sibling;l=w,l===null?(w=a.child,a.child=null):(w=l.sibling,l.sibling=null),xg(a,!1,w,l,O,h);break;case"backwards":case"unstable_legacy-backwards":for(l=null,w=a.child,a.child=null;w!==null;){if(r=w.alternate,r!==null&&td(r)===null){a.child=w;break}r=w.sibling,w.sibling=l,l=w,w=r}xg(a,!0,l,null,O,h);break;case"together":xg(a,!1,null,null,void 0,h);break;default:a.memoizedState=null}return a.child}function Ji(r,a,l){if(r!==null&&(a.dependencies=r.dependencies),Va|=a.lanes,(l&a.childLanes)===0)if(r!==null){if(nl(r,a,l,!1),(l&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(i(153));if(a.child!==null){for(r=a.child,l=Ki(r,r.pendingProps),a.child=l,l.return=a;r.sibling!==null;)r=r.sibling,l=l.sibling=Ki(r,r.pendingProps),l.return=a;l.sibling=null}return a.child}function Cg(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&Gf(r)))}function HN(r,a,l){switch(a.tag){case 3:ie(a,a.stateNode.containerInfo),Ia(a,un,r.memoizedState.cache),Bo();break;case 27:case 5:fe(a);break;case 4:ie(a,a.stateNode.containerInfo);break;case 10:Ia(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Wm(a),null;break;case 13:var h=a.memoizedState;if(h!==null)return h.dehydrated!==null?(La(a),a.flags|=128,null):(l&a.child.childLanes)!==0?t1(r,a,l):(La(a),r=Ji(r,a,l),r!==null?r.sibling:null);La(a);break;case 19:var w=(r.flags&128)!==0;if(h=(l&a.childLanes)!==0,h||(nl(r,a,l,!1),h=(l&a.childLanes)!==0),w){if(h)return r1(r,a,l);a.flags|=128}if(w=a.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),U(rn,rn.current),h)break;return null;case 22:return a.lanes=0,Yw(r,a,l,a.pendingProps);case 24:Ia(a,un,r.memoizedState.cache)}return Ji(r,a,l)}function i1(r,a,l){if(r!==null)if(r.memoizedProps!==a.pendingProps)fn=!0;else{if(!Cg(r,l)&&(a.flags&128)===0)return fn=!1,HN(r,a,l);fn=(r.flags&131072)!==0}else fn=!1,ct&&(a.flags&1048576)!==0&&I_(a,Mu,a.index);switch(a.lanes=0,a.tag){case 16:e:{var h=a.pendingProps;if(r=Go(a.elementType),a.type=r,typeof r=="function")Tm(r)?(h=Xo(r,h),a.tag=1,a=Zw(null,a,r,h,l)):(a.tag=0,a=yg(null,a,r,h,l));else{if(r!=null){var w=r.$$typeof;if(w===R){a.tag=11,a=Kw(null,a,r,h,l);break e}else if(w===A){a.tag=14,a=Gw(null,a,r,h,l);break e}}throw a=K(r)||r,Error(i(306,a,""))}}return a;case 0:return yg(r,a,a.type,a.pendingProps,l);case 1:return h=a.type,w=Xo(h,a.pendingProps),Zw(r,a,h,w,l);case 3:e:{if(ie(a,a.stateNode.containerInfo),r===null)throw Error(i(387));h=a.pendingProps;var O=a.memoizedState;w=O.element,Hm(r,a),ku(a,h,null,l);var F=a.memoizedState;if(h=F.cache,Ia(a,un,h),h!==O.cache&&km(a,[un],l,!0),Fu(),h=F.element,O.isDehydrated)if(O={element:h,isDehydrated:!1,cache:F.cache},a.updateQueue.baseState=O,a.memoizedState=O,a.flags&256){a=e1(r,a,h,l);break e}else if(h!==w){w=Ir(Error(i(424)),a),Du(w),a=e1(r,a,h,l);break e}else{switch(r=a.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(Vt=qr(r.firstChild),$n=a,ct=!0,Na=null,kr=!0,l=Y_(a,null,h,l),a.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Bo(),h===w){a=Ji(r,a,l);break e}Mn(r,a,h,l)}a=a.child}return a;case 26:return dd(r,a),r===null?(l=mE(a.type,null,a.pendingProps,null))?a.memoizedState=l:ct||(l=a.type,r=a.pendingProps,h=$d(J.current).createElement(l),h[nn]=a,h[An]=r,Dn(h,l,r),En(h),a.stateNode=h):a.memoizedState=mE(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return fe(a),r===null&&ct&&(h=a.stateNode=dE(a.type,a.pendingProps,J.current),$n=a,kr=!0,w=Vt,Ya(a.type)?(iv=w,Vt=qr(h.firstChild)):Vt=w),Mn(r,a,a.pendingProps.children,l),dd(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&ct&&((w=h=Vt)&&(h=_2(h,a.type,a.pendingProps,kr),h!==null?(a.stateNode=h,$n=a,Vt=qr(h.firstChild),kr=!1,w=!0):w=!1),w||Pa(a)),fe(a),w=a.type,O=a.pendingProps,F=r!==null?r.memoizedProps:null,h=O.children,Zg(w,O)?h=null:F!==null&&Zg(w,F)&&(a.flags|=32),a.memoizedState!==null&&(w=Jm(r,a,IN,null,null,l),ac._currentValue=w),dd(r,a),Mn(r,a,h,l),a.child;case 6:return r===null&&ct&&((r=l=Vt)&&(l=w2(l,a.pendingProps,kr),l!==null?(a.stateNode=l,$n=a,Vt=null,r=!0):r=!1),r||Pa(a)),null;case 13:return t1(r,a,l);case 4:return ie(a,a.stateNode.containerInfo),h=a.pendingProps,r===null?a.child=Yo(a,null,h,l):Mn(r,a,h,l),a.child;case 11:return Kw(r,a,a.type,a.pendingProps,l);case 7:return Mn(r,a,a.pendingProps,l),a.child;case 8:return Mn(r,a,a.pendingProps.children,l),a.child;case 12:return Mn(r,a,a.pendingProps.children,l),a.child;case 10:return h=a.pendingProps,Ia(a,a.type,h.value),Mn(r,a,h.children,l),a.child;case 9:return w=a.type._context,h=a.pendingProps.children,Ho(a),w=Tn(w),h=h(w),a.flags|=1,Mn(r,a,h,l),a.child;case 14:return Gw(r,a,a.type,a.pendingProps,l);case 15:return Qw(r,a,a.type,a.pendingProps,l);case 19:return r1(r,a,l);case 31:return VN(r,a,l);case 22:return Yw(r,a,l,a.pendingProps);case 24:return Ho(a),h=Tn(un),r===null?(w=Um(),w===null&&(w=kt,O=Lm(),w.pooledCache=O,O.refCount++,O!==null&&(w.pooledCacheLanes|=l),w=O),a.memoizedState={parent:h,cache:w},Vm(a),Ia(a,un,w)):((r.lanes&l)!==0&&(Hm(r,a),ku(a,null,null,l),Fu()),w=r.memoizedState,O=a.memoizedState,w.parent!==h?(w={parent:h,cache:h},a.memoizedState=w,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=w),Ia(a,un,h)):(h=O.cache,Ia(a,un,h),h!==w.cache&&km(a,[un],l,!0))),Mn(r,a,a.pendingProps.children,l),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function Zi(r){r.flags|=4}function Rg(r,a,l,h,w){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(w&335544128)===w)if(r.stateNode.complete)r.flags|=8192;else if(M1())r.flags|=8192;else throw Qo=Xf,Bm}else r.flags&=-16777217}function a1(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!SE(a))if(M1())r.flags|=8192;else throw Qo=Xf,Bm}function pd(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?Wt():536870912,r.lanes|=a,pl|=a)}function Hu(r,a){if(!ct)switch(r.tailMode){case"hidden":a=r.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?r.tail=null:l.sibling=null;break;case"collapsed":l=r.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:h.sibling=null}}function Ht(r){var a=r.alternate!==null&&r.alternate.child===r.child,l=0,h=0;if(a)for(var w=r.child;w!==null;)l|=w.lanes|w.childLanes,h|=w.subtreeFlags&65011712,h|=w.flags&65011712,w.return=r,w=w.sibling;else for(w=r.child;w!==null;)l|=w.lanes|w.childLanes,h|=w.subtreeFlags,h|=w.flags,w.return=r,w=w.sibling;return r.subtreeFlags|=h,r.childLanes=l,a}function KN(r,a,l){var h=a.pendingProps;switch(Nm(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ht(a),null;case 1:return Ht(a),null;case 3:return l=a.stateNode,h=null,r!==null&&(h=r.memoizedState.cache),a.memoizedState.cache!==h&&(a.flags|=2048),Yi(un),se(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(r===null||r.child===null)&&(tl(a)?Zi(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Im())),Ht(a),null;case 26:var w=a.type,O=a.memoizedState;return r===null?(Zi(a),O!==null?(Ht(a),a1(a,O)):(Ht(a),Rg(a,w,null,h,l))):O?O!==r.memoizedState?(Zi(a),Ht(a),a1(a,O)):(Ht(a),a.flags&=-16777217):(r=r.memoizedProps,r!==h&&Zi(a),Ht(a),Rg(a,w,r,h,l)),null;case 27:if(Y(a),l=J.current,w=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==h&&Zi(a);else{if(!h){if(a.stateNode===null)throw Error(i(166));return Ht(a),null}r=k.current,tl(a)?F_(a):(r=dE(w,h,l),a.stateNode=r,Zi(a))}return Ht(a),null;case 5:if(Y(a),w=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==h&&Zi(a);else{if(!h){if(a.stateNode===null)throw Error(i(166));return Ht(a),null}if(O=k.current,tl(a))F_(a);else{var F=$d(J.current);switch(O){case 1:O=F.createElementNS("http://www.w3.org/2000/svg",w);break;case 2:O=F.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;default:switch(w){case"svg":O=F.createElementNS("http://www.w3.org/2000/svg",w);break;case"math":O=F.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;case"script":O=F.createElement("div"),O.innerHTML="<script><\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof h.is=="string"?F.createElement("select",{is:h.is}):F.createElement("select"),h.multiple?O.multiple=!0:h.size&&(O.size=h.size);break;default:O=typeof h.is=="string"?F.createElement(w,{is:h.is}):F.createElement(w)}}O[nn]=a,O[An]=h;e:for(F=a.child;F!==null;){if(F.tag===5||F.tag===6)O.appendChild(F.stateNode);else if(F.tag!==4&&F.tag!==27&&F.child!==null){F.child.return=F,F=F.child;continue}if(F===a)break e;for(;F.sibling===null;){if(F.return===null||F.return===a)break e;F=F.return}F.sibling.return=F.return,F=F.sibling}a.stateNode=O;e:switch(Dn(O,w,h),w){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&Zi(a)}}return Ht(a),Rg(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,l),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==h&&Zi(a);else{if(typeof h!="string"&&a.stateNode===null)throw Error(i(166));if(r=J.current,tl(a)){if(r=a.stateNode,l=a.memoizedProps,h=null,w=$n,w!==null)switch(w.tag){case 27:case 5:h=w.memoizedProps}r[nn]=a,r=!!(r.nodeValue===l||h!==null&&h.suppressHydrationWarning===!0||tE(r.nodeValue,l)),r||Pa(a,!0)}else r=$d(r).createTextNode(h),r[nn]=a,a.stateNode=r}return Ht(a),null;case 31:if(l=a.memoizedState,r===null||r.memoizedState!==null){if(h=tl(a),l!==null){if(r===null){if(!h)throw Error(i(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[nn]=a}else Bo(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ht(a),r=!1}else l=Im(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=l),r=!0;if(!r)return a.flags&256?(vr(a),a):(vr(a),null);if((a.flags&128)!==0)throw Error(i(558))}return Ht(a),null;case 13:if(h=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(w=tl(a),h!==null&&h.dehydrated!==null){if(r===null){if(!w)throw Error(i(318));if(w=a.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(i(317));w[nn]=a}else Bo(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ht(a),w=!1}else w=Im(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=w),w=!0;if(!w)return a.flags&256?(vr(a),a):(vr(a),null)}return vr(a),(a.flags&128)!==0?(a.lanes=l,a):(l=h!==null,r=r!==null&&r.memoizedState!==null,l&&(h=a.child,w=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(w=h.alternate.memoizedState.cachePool.pool),O=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(O=h.memoizedState.cachePool.pool),O!==w&&(h.flags|=2048)),l!==r&&l&&(a.child.flags|=8192),pd(a,a.updateQueue),Ht(a),null);case 4:return se(),r===null&&Qg(a.stateNode.containerInfo),Ht(a),null;case 10:return Yi(a.type),Ht(a),null;case 19:if(B(rn),h=a.memoizedState,h===null)return Ht(a),null;if(w=(a.flags&128)!==0,O=h.rendering,O===null)if(w)Hu(h,!1);else{if(Zt!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(O=td(r),O!==null){for(a.flags|=128,Hu(h,!1),r=O.updateQueue,a.updateQueue=r,pd(a,r),a.subtreeFlags=0,r=l,l=a.child;l!==null;)j_(l,r),l=l.sibling;return U(rn,rn.current&1|2),ct&&Gi(a,h.treeForkCount),a.child}r=r.sibling}h.tail!==null&&je()>bd&&(a.flags|=128,w=!0,Hu(h,!1),a.lanes=4194304)}else{if(!w)if(r=td(O),r!==null){if(a.flags|=128,w=!0,r=r.updateQueue,a.updateQueue=r,pd(a,r),Hu(h,!0),h.tail===null&&h.tailMode==="hidden"&&!O.alternate&&!ct)return Ht(a),null}else 2*je()-h.renderingStartTime>bd&&l!==536870912&&(a.flags|=128,w=!0,Hu(h,!1),a.lanes=4194304);h.isBackwards?(O.sibling=a.child,a.child=O):(r=h.last,r!==null?r.sibling=O:a.child=O,h.last=O)}return h.tail!==null?(r=h.tail,h.rendering=r,h.tail=r.sibling,h.renderingStartTime=je(),r.sibling=null,l=rn.current,U(rn,w?l&1|2:l&1),ct&&Gi(a,h.treeForkCount),r):(Ht(a),null);case 22:case 23:return vr(a),Ym(),h=a.memoizedState!==null,r!==null?r.memoizedState!==null!==h&&(a.flags|=8192):h&&(a.flags|=8192),h?(l&536870912)!==0&&(a.flags&128)===0&&(Ht(a),a.subtreeFlags&6&&(a.flags|=8192)):Ht(a),l=a.updateQueue,l!==null&&pd(a,l.retryQueue),l=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),h=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),h!==l&&(a.flags|=2048),r!==null&&B(Ko),null;case 24:return l=null,r!==null&&(l=r.memoizedState.cache),a.memoizedState.cache!==l&&(a.flags|=2048),Yi(un),Ht(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function GN(r,a){switch(Nm(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return Yi(un),se(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return Y(a),null;case 31:if(a.memoizedState!==null){if(vr(a),a.alternate===null)throw Error(i(340));Bo()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(vr(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Bo()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return B(rn),null;case 4:return se(),null;case 10:return Yi(a.type),null;case 22:case 23:return vr(a),Ym(),r!==null&&B(Ko),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return Yi(un),null;case 25:return null;default:return null}}function o1(r,a){switch(Nm(a),a.tag){case 3:Yi(un),se();break;case 26:case 27:case 5:Y(a);break;case 4:se();break;case 31:a.memoizedState!==null&&vr(a);break;case 13:vr(a);break;case 19:B(rn);break;case 10:Yi(a.type);break;case 22:case 23:vr(a),Ym(),r!==null&&B(Ko);break;case 24:Yi(un)}}function Ku(r,a){try{var l=a.updateQueue,h=l!==null?l.lastEffect:null;if(h!==null){var w=h.next;l=w;do{if((l.tag&r)===r){h=void 0;var O=l.create,F=l.inst;h=O(),F.destroy=h}l=l.next}while(l!==w)}}catch(H){Dt(a,a.return,H)}}function Ua(r,a,l){try{var h=a.updateQueue,w=h!==null?h.lastEffect:null;if(w!==null){var O=w.next;h=O;do{if((h.tag&r)===r){var F=h.inst,H=F.destroy;if(H!==void 0){F.destroy=void 0,w=a;var ee=l,me=H;try{me()}catch(_e){Dt(w,ee,_e)}}}h=h.next}while(h!==O)}}catch(_e){Dt(a,a.return,_e)}}function s1(r){var a=r.updateQueue;if(a!==null){var l=r.stateNode;try{X_(a,l)}catch(h){Dt(r,r.return,h)}}}function l1(r,a,l){l.props=Xo(r.type,r.memoizedProps),l.state=r.memoizedState;try{l.componentWillUnmount()}catch(h){Dt(r,a,h)}}function Gu(r,a){try{var l=r.ref;if(l!==null){switch(r.tag){case 26:case 27:case 5:var h=r.stateNode;break;case 30:h=r.stateNode;break;default:h=r.stateNode}typeof l=="function"?r.refCleanup=l(h):l.current=h}}catch(w){Dt(r,a,w)}}function Ei(r,a){var l=r.ref,h=r.refCleanup;if(l!==null)if(typeof h=="function")try{h()}catch(w){Dt(r,a,w)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(w){Dt(r,a,w)}else l.current=null}function u1(r){var a=r.type,l=r.memoizedProps,h=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":l.autoFocus&&h.focus();break e;case"img":l.src?h.src=l.src:l.srcSet&&(h.srcset=l.srcSet)}}catch(w){Dt(r,r.return,w)}}function Og(r,a,l){try{var h=r.stateNode;m2(h,r.type,l,a),h[An]=a}catch(w){Dt(r,r.return,w)}}function c1(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Ya(r.type)||r.tag===4}function Ag(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||c1(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Ya(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function $g(r,a,l){var h=r.tag;if(h===5||h===6)r=r.stateNode,a?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(r,a):(a=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,a.appendChild(r),l=l._reactRootContainer,l!=null||a.onclick!==null||(a.onclick=Vi));else if(h!==4&&(h===27&&Ya(r.type)&&(l=r.stateNode,a=null),r=r.child,r!==null))for($g(r,a,l),r=r.sibling;r!==null;)$g(r,a,l),r=r.sibling}function md(r,a,l){var h=r.tag;if(h===5||h===6)r=r.stateNode,a?l.insertBefore(r,a):l.appendChild(r);else if(h!==4&&(h===27&&Ya(r.type)&&(l=r.stateNode),r=r.child,r!==null))for(md(r,a,l),r=r.sibling;r!==null;)md(r,a,l),r=r.sibling}function f1(r){var a=r.stateNode,l=r.memoizedProps;try{for(var h=r.type,w=a.attributes;w.length;)a.removeAttributeNode(w[0]);Dn(a,h,l),a[nn]=r,a[An]=l}catch(O){Dt(r,r.return,O)}}var ea=!1,dn=!1,Tg=!1,d1=typeof WeakSet=="function"?WeakSet:Set,xn=null;function QN(r,a){if(r=r.containerInfo,Xg=Id,r=x_(r),Em(r)){if("selectionStart"in r)var l={start:r.selectionStart,end:r.selectionEnd};else e:{l=(l=r.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var w=h.anchorOffset,O=h.focusNode;h=h.focusOffset;try{l.nodeType,O.nodeType}catch{l=null;break e}var F=0,H=-1,ee=-1,me=0,_e=0,Ee=r,ge=null;t:for(;;){for(var be;Ee!==l||w!==0&&Ee.nodeType!==3||(H=F+w),Ee!==O||h!==0&&Ee.nodeType!==3||(ee=F+h),Ee.nodeType===3&&(F+=Ee.nodeValue.length),(be=Ee.firstChild)!==null;)ge=Ee,Ee=be;for(;;){if(Ee===r)break t;if(ge===l&&++me===w&&(H=F),ge===O&&++_e===h&&(ee=F),(be=Ee.nextSibling)!==null)break;Ee=ge,ge=Ee.parentNode}Ee=be}l=H===-1||ee===-1?null:{start:H,end:ee}}else l=null}l=l||{start:0,end:0}}else l=null;for(Jg={focusedElem:r,selectionRange:l},Id=!1,xn=a;xn!==null;)if(a=xn,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,xn=r;else for(;xn!==null;){switch(a=xn,O=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.updateQueue,r=r!==null?r.events:null,r!==null))for(l=0;l<r.length;l++)w=r[l],w.ref.impl=w.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&O!==null){r=void 0,l=a,w=O.memoizedProps,O=O.memoizedState,h=l.stateNode;try{var Me=Xo(l.type,w);r=h.getSnapshotBeforeUpdate(Me,O),h.__reactInternalSnapshotBeforeUpdate=r}catch(ze){Dt(l,l.return,ze)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,l=r.nodeType,l===9)tv(r);else if(l===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":tv(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=a.sibling,r!==null){r.return=a.return,xn=r;break}xn=a.return}}function h1(r,a,l){var h=l.flags;switch(l.tag){case 0:case 11:case 15:na(r,l),h&4&&Ku(5,l);break;case 1:if(na(r,l),h&4)if(r=l.stateNode,a===null)try{r.componentDidMount()}catch(F){Dt(l,l.return,F)}else{var w=Xo(l.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(w,a,r.__reactInternalSnapshotBeforeUpdate)}catch(F){Dt(l,l.return,F)}}h&64&&s1(l),h&512&&Gu(l,l.return);break;case 3:if(na(r,l),h&64&&(r=l.updateQueue,r!==null)){if(a=null,l.child!==null)switch(l.child.tag){case 27:case 5:a=l.child.stateNode;break;case 1:a=l.child.stateNode}try{X_(r,a)}catch(F){Dt(l,l.return,F)}}break;case 27:a===null&&h&4&&f1(l);case 26:case 5:na(r,l),a===null&&h&4&&u1(l),h&512&&Gu(l,l.return);break;case 12:na(r,l);break;case 31:na(r,l),h&4&&g1(r,l);break;case 13:na(r,l),h&4&&v1(r,l),h&64&&(r=l.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(l=r2.bind(null,l),E2(r,l))));break;case 22:if(h=l.memoizedState!==null||ea,!h){a=a!==null&&a.memoizedState!==null||dn,w=ea;var O=dn;ea=h,(dn=a)&&!O?ra(r,l,(l.subtreeFlags&8772)!==0):na(r,l),ea=w,dn=O}break;case 30:break;default:na(r,l)}}function p1(r){var a=r.alternate;a!==null&&(r.alternate=null,p1(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&Su(a)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var Gt=null,ir=!1;function ta(r,a,l){for(l=l.child;l!==null;)m1(r,a,l),l=l.sibling}function m1(r,a,l){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(ln,l)}catch{}switch(l.tag){case 26:dn||Ei(l,a),ta(r,a,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:dn||Ei(l,a);var h=Gt,w=ir;Ya(l.type)&&(Gt=l.stateNode,ir=!1),ta(r,a,l),nc(l.stateNode),Gt=h,ir=w;break;case 5:dn||Ei(l,a);case 6:if(h=Gt,w=ir,Gt=null,ta(r,a,l),Gt=h,ir=w,Gt!==null)if(ir)try{(Gt.nodeType===9?Gt.body:Gt.nodeName==="HTML"?Gt.ownerDocument.body:Gt).removeChild(l.stateNode)}catch(O){Dt(l,a,O)}else try{Gt.removeChild(l.stateNode)}catch(O){Dt(l,a,O)}break;case 18:Gt!==null&&(ir?(r=Gt,sE(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,l.stateNode),wl(r)):sE(Gt,l.stateNode));break;case 4:h=Gt,w=ir,Gt=l.stateNode.containerInfo,ir=!0,ta(r,a,l),Gt=h,ir=w;break;case 0:case 11:case 14:case 15:Ua(2,l,a),dn||Ua(4,l,a),ta(r,a,l);break;case 1:dn||(Ei(l,a),h=l.stateNode,typeof h.componentWillUnmount=="function"&&l1(l,a,h)),ta(r,a,l);break;case 21:ta(r,a,l);break;case 22:dn=(h=dn)||l.memoizedState!==null,ta(r,a,l),dn=h;break;default:ta(r,a,l)}}function g1(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{wl(r)}catch(l){Dt(a,a.return,l)}}}function v1(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{wl(r)}catch(l){Dt(a,a.return,l)}}function YN(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new d1),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new d1),a;default:throw Error(i(435,r.tag))}}function gd(r,a){var l=YN(r);a.forEach(function(h){if(!l.has(h)){l.add(h);var w=i2.bind(null,r,h);h.then(w,w)}})}function ar(r,a){var l=a.deletions;if(l!==null)for(var h=0;h<l.length;h++){var w=l[h],O=r,F=a,H=F;e:for(;H!==null;){switch(H.tag){case 27:if(Ya(H.type)){Gt=H.stateNode,ir=!1;break e}break;case 5:Gt=H.stateNode,ir=!1;break e;case 3:case 4:Gt=H.stateNode.containerInfo,ir=!0;break e}H=H.return}if(Gt===null)throw Error(i(160));m1(O,F,w),Gt=null,ir=!1,O=w.alternate,O!==null&&(O.return=null),w.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)y1(a,r),a=a.sibling}var ni=null;function y1(r,a){var l=r.alternate,h=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:ar(a,r),or(r),h&4&&(Ua(3,r,r.return),Ku(3,r),Ua(5,r,r.return));break;case 1:ar(a,r),or(r),h&512&&(dn||l===null||Ei(l,l.return)),h&64&&ea&&(r=r.updateQueue,r!==null&&(h=r.callbacks,h!==null&&(l=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=l===null?h:l.concat(h))));break;case 26:var w=ni;if(ar(a,r),or(r),h&512&&(dn||l===null||Ei(l,l.return)),h&4){var O=l!==null?l.memoizedState:null;if(h=r.memoizedState,l===null)if(h===null)if(r.stateNode===null){e:{h=r.type,l=r.memoizedProps,w=w.ownerDocument||w;t:switch(h){case"title":O=w.getElementsByTagName("title")[0],(!O||O[Si]||O[nn]||O.namespaceURI==="http://www.w3.org/2000/svg"||O.hasAttribute("itemprop"))&&(O=w.createElement(h),w.head.insertBefore(O,w.querySelector("head > title"))),Dn(O,h,l),O[nn]=r,En(O),h=O;break e;case"link":var F=yE("link","href",w).get(h+(l.href||""));if(F){for(var H=0;H<F.length;H++)if(O=F[H],O.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&O.getAttribute("rel")===(l.rel==null?null:l.rel)&&O.getAttribute("title")===(l.title==null?null:l.title)&&O.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){F.splice(H,1);break t}}O=w.createElement(h),Dn(O,h,l),w.head.appendChild(O);break;case"meta":if(F=yE("meta","content",w).get(h+(l.content||""))){for(H=0;H<F.length;H++)if(O=F[H],O.getAttribute("content")===(l.content==null?null:""+l.content)&&O.getAttribute("name")===(l.name==null?null:l.name)&&O.getAttribute("property")===(l.property==null?null:l.property)&&O.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&O.getAttribute("charset")===(l.charSet==null?null:l.charSet)){F.splice(H,1);break t}}O=w.createElement(h),Dn(O,h,l),w.head.appendChild(O);break;default:throw Error(i(468,h))}O[nn]=r,En(O),h=O}r.stateNode=h}else bE(w,r.type,r.stateNode);else r.stateNode=vE(w,h,r.memoizedProps);else O!==h?(O===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):O.count--,h===null?bE(w,r.type,r.stateNode):vE(w,h,r.memoizedProps)):h===null&&r.stateNode!==null&&Og(r,r.memoizedProps,l.memoizedProps)}break;case 27:ar(a,r),or(r),h&512&&(dn||l===null||Ei(l,l.return)),l!==null&&h&4&&Og(r,r.memoizedProps,l.memoizedProps);break;case 5:if(ar(a,r),or(r),h&512&&(dn||l===null||Ei(l,l.return)),r.flags&32){w=r.stateNode;try{Hs(w,"")}catch(Me){Dt(r,r.return,Me)}}h&4&&r.stateNode!=null&&(w=r.memoizedProps,Og(r,w,l!==null?l.memoizedProps:w)),h&1024&&(Tg=!0);break;case 6:if(ar(a,r),or(r),h&4){if(r.stateNode===null)throw Error(i(162));h=r.memoizedProps,l=r.stateNode;try{l.nodeValue=h}catch(Me){Dt(r,r.return,Me)}}break;case 3:if(Dd=null,w=ni,ni=Td(a.containerInfo),ar(a,r),ni=w,or(r),h&4&&l!==null&&l.memoizedState.isDehydrated)try{wl(a.containerInfo)}catch(Me){Dt(r,r.return,Me)}Tg&&(Tg=!1,b1(r));break;case 4:h=ni,ni=Td(r.stateNode.containerInfo),ar(a,r),or(r),ni=h;break;case 12:ar(a,r),or(r);break;case 31:ar(a,r),or(r),h&4&&(h=r.updateQueue,h!==null&&(r.updateQueue=null,gd(r,h)));break;case 13:ar(a,r),or(r),r.child.flags&8192&&r.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(yd=je()),h&4&&(h=r.updateQueue,h!==null&&(r.updateQueue=null,gd(r,h)));break;case 22:w=r.memoizedState!==null;var ee=l!==null&&l.memoizedState!==null,me=ea,_e=dn;if(ea=me||w,dn=_e||ee,ar(a,r),dn=_e,ea=me,or(r),h&8192)e:for(a=r.stateNode,a._visibility=w?a._visibility&-2:a._visibility|1,w&&(l===null||ee||ea||dn||Jo(r)),l=null,a=r;;){if(a.tag===5||a.tag===26){if(l===null){ee=l=a;try{if(O=ee.stateNode,w)F=O.style,typeof F.setProperty=="function"?F.setProperty("display","none","important"):F.display="none";else{H=ee.stateNode;var Ee=ee.memoizedProps.style,ge=Ee!=null&&Ee.hasOwnProperty("display")?Ee.display:null;H.style.display=ge==null||typeof ge=="boolean"?"":(""+ge).trim()}}catch(Me){Dt(ee,ee.return,Me)}}}else if(a.tag===6){if(l===null){ee=a;try{ee.stateNode.nodeValue=w?"":ee.memoizedProps}catch(Me){Dt(ee,ee.return,Me)}}}else if(a.tag===18){if(l===null){ee=a;try{var be=ee.stateNode;w?lE(be,!0):lE(ee.stateNode,!1)}catch(Me){Dt(ee,ee.return,Me)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;l===a&&(l=null),a=a.return}l===a&&(l=null),a.sibling.return=a.return,a=a.sibling}h&4&&(h=r.updateQueue,h!==null&&(l=h.retryQueue,l!==null&&(h.retryQueue=null,gd(r,l))));break;case 19:ar(a,r),or(r),h&4&&(h=r.updateQueue,h!==null&&(r.updateQueue=null,gd(r,h)));break;case 30:break;case 21:break;default:ar(a,r),or(r)}}function or(r){var a=r.flags;if(a&2){try{for(var l,h=r.return;h!==null;){if(c1(h)){l=h;break}h=h.return}if(l==null)throw Error(i(160));switch(l.tag){case 27:var w=l.stateNode,O=Ag(r);md(r,O,w);break;case 5:var F=l.stateNode;l.flags&32&&(Hs(F,""),l.flags&=-33);var H=Ag(r);md(r,H,F);break;case 3:case 4:var ee=l.stateNode.containerInfo,me=Ag(r);$g(r,me,ee);break;default:throw Error(i(161))}}catch(_e){Dt(r,r.return,_e)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function b1(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;b1(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function na(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)h1(r,a.alternate,a),a=a.sibling}function Jo(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:Ua(4,a,a.return),Jo(a);break;case 1:Ei(a,a.return);var l=a.stateNode;typeof l.componentWillUnmount=="function"&&l1(a,a.return,l),Jo(a);break;case 27:nc(a.stateNode);case 26:case 5:Ei(a,a.return),Jo(a);break;case 22:a.memoizedState===null&&Jo(a);break;case 30:Jo(a);break;default:Jo(a)}r=r.sibling}}function ra(r,a,l){for(l=l&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var h=a.alternate,w=r,O=a,F=O.flags;switch(O.tag){case 0:case 11:case 15:ra(w,O,l),Ku(4,O);break;case 1:if(ra(w,O,l),h=O,w=h.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(me){Dt(h,h.return,me)}if(h=O,w=h.updateQueue,w!==null){var H=h.stateNode;try{var ee=w.shared.hiddenCallbacks;if(ee!==null)for(w.shared.hiddenCallbacks=null,w=0;w<ee.length;w++)W_(ee[w],H)}catch(me){Dt(h,h.return,me)}}l&&F&64&&s1(O),Gu(O,O.return);break;case 27:f1(O);case 26:case 5:ra(w,O,l),l&&h===null&&F&4&&u1(O),Gu(O,O.return);break;case 12:ra(w,O,l);break;case 31:ra(w,O,l),l&&F&4&&g1(w,O);break;case 13:ra(w,O,l),l&&F&4&&v1(w,O);break;case 22:O.memoizedState===null&&ra(w,O,l),Gu(O,O.return);break;case 30:break;default:ra(w,O,l)}a=a.sibling}}function Mg(r,a){var l=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==l&&(r!=null&&r.refCount++,l!=null&&ju(l))}function Dg(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&ju(r))}function ri(r,a,l,h){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)S1(r,a,l,h),a=a.sibling}function S1(r,a,l,h){var w=a.flags;switch(a.tag){case 0:case 11:case 15:ri(r,a,l,h),w&2048&&Ku(9,a);break;case 1:ri(r,a,l,h);break;case 3:ri(r,a,l,h),w&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&ju(r)));break;case 12:if(w&2048){ri(r,a,l,h),r=a.stateNode;try{var O=a.memoizedProps,F=O.id,H=O.onPostCommit;typeof H=="function"&&H(F,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(ee){Dt(a,a.return,ee)}}else ri(r,a,l,h);break;case 31:ri(r,a,l,h);break;case 13:ri(r,a,l,h);break;case 23:break;case 22:O=a.stateNode,F=a.alternate,a.memoizedState!==null?O._visibility&2?ri(r,a,l,h):Qu(r,a):O._visibility&2?ri(r,a,l,h):(O._visibility|=2,fl(r,a,l,h,(a.subtreeFlags&10256)!==0||!1)),w&2048&&Mg(F,a);break;case 24:ri(r,a,l,h),w&2048&&Dg(a.alternate,a);break;default:ri(r,a,l,h)}}function fl(r,a,l,h,w){for(w=w&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var O=r,F=a,H=l,ee=h,me=F.flags;switch(F.tag){case 0:case 11:case 15:fl(O,F,H,ee,w),Ku(8,F);break;case 23:break;case 22:var _e=F.stateNode;F.memoizedState!==null?_e._visibility&2?fl(O,F,H,ee,w):Qu(O,F):(_e._visibility|=2,fl(O,F,H,ee,w)),w&&me&2048&&Mg(F.alternate,F);break;case 24:fl(O,F,H,ee,w),w&&me&2048&&Dg(F.alternate,F);break;default:fl(O,F,H,ee,w)}a=a.sibling}}function Qu(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var l=r,h=a,w=h.flags;switch(h.tag){case 22:Qu(l,h),w&2048&&Mg(h.alternate,h);break;case 24:Qu(l,h),w&2048&&Dg(h.alternate,h);break;default:Qu(l,h)}a=a.sibling}}var Yu=8192;function dl(r,a,l){if(r.subtreeFlags&Yu)for(r=r.child;r!==null;)_1(r,a,l),r=r.sibling}function _1(r,a,l){switch(r.tag){case 26:dl(r,a,l),r.flags&Yu&&r.memoizedState!==null&&P2(l,ni,r.memoizedState,r.memoizedProps);break;case 5:dl(r,a,l);break;case 3:case 4:var h=ni;ni=Td(r.stateNode.containerInfo),dl(r,a,l),ni=h;break;case 22:r.memoizedState===null&&(h=r.alternate,h!==null&&h.memoizedState!==null?(h=Yu,Yu=16777216,dl(r,a,l),Yu=h):dl(r,a,l));break;default:dl(r,a,l)}}function w1(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function Wu(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var l=0;l<a.length;l++){var h=a[l];xn=h,x1(h,r)}w1(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)E1(r),r=r.sibling}function E1(r){switch(r.tag){case 0:case 11:case 15:Wu(r),r.flags&2048&&Ua(9,r,r.return);break;case 3:Wu(r);break;case 12:Wu(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,vd(r)):Wu(r);break;default:Wu(r)}}function vd(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var l=0;l<a.length;l++){var h=a[l];xn=h,x1(h,r)}w1(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:Ua(8,a,a.return),vd(a);break;case 22:l=a.stateNode,l._visibility&2&&(l._visibility&=-3,vd(a));break;default:vd(a)}r=r.sibling}}function x1(r,a){for(;xn!==null;){var l=xn;switch(l.tag){case 0:case 11:case 15:Ua(8,l,a);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var h=l.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:ju(l.memoizedState.cache)}if(h=l.child,h!==null)h.return=l,xn=h;else e:for(l=r;xn!==null;){h=xn;var w=h.sibling,O=h.return;if(p1(h),h===l){xn=null;break e}if(w!==null){w.return=O,xn=w;break e}xn=O}}}var WN={getCacheForType:function(r){var a=Tn(un),l=a.data.get(r);return l===void 0&&(l=r(),a.data.set(r,l)),l},cacheSignal:function(){return Tn(un).controller.signal}},XN=typeof WeakMap=="function"?WeakMap:Map,Et=0,kt=null,nt=null,st=0,Mt=0,yr=null,Ba=!1,hl=!1,jg=!1,ia=0,Zt=0,Va=0,Zo=0,Ng=0,br=0,pl=0,Xu=null,sr=null,Pg=!1,yd=0,C1=0,bd=1/0,Sd=null,Ha=null,vn=0,Ka=null,ml=null,aa=0,Ig=0,zg=null,R1=null,Ju=0,Fg=null;function Sr(){return(Et&2)!==0&&st!==0?st&-st:q.T!==null?Vg():Kn()}function O1(){if(br===0)if((st&536870912)===0||ct){var r=Be;Be<<=1,(Be&3932160)===0&&(Be=262144),br=r}else br=536870912;return r=gr.current,r!==null&&(r.flags|=32),br}function lr(r,a,l){(r===kt&&(Mt===2||Mt===9)||r.cancelPendingCommit!==null)&&(gl(r,0),Ga(r,st,br,!1)),Hn(r,l),((Et&2)===0||r!==kt)&&(r===kt&&((Et&2)===0&&(Zo|=l),Zt===4&&Ga(r,st,br,!1)),xi(r))}function A1(r,a,l){if((Et&6)!==0)throw Error(i(327));var h=!l&&(a&127)===0&&(a&r.expiredLanes)===0||Yt(r,a),w=h?e2(r,a):Lg(r,a,!0),O=h;do{if(w===0){hl&&!h&&Ga(r,a,0,!1);break}else{if(l=r.current.alternate,O&&!JN(l)){w=Lg(r,a,!1),O=!1;continue}if(w===2){if(O=a,r.errorRecoveryDisabledLanes&O)var F=0;else F=r.pendingLanes&-536870913,F=F!==0?F:F&536870912?536870912:0;if(F!==0){a=F;e:{var H=r;w=Xu;var ee=H.current.memoizedState.isDehydrated;if(ee&&(gl(H,F).flags|=256),F=Lg(H,F,!1),F!==2){if(jg&&!ee){H.errorRecoveryDisabledLanes|=O,Zo|=O,w=4;break e}O=sr,sr=w,O!==null&&(sr===null?sr=O:sr.push.apply(sr,O))}w=F}if(O=!1,w!==2)continue}}if(w===1){gl(r,0),Ga(r,a,0,!0);break}e:{switch(h=r,O=w,O){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:Ga(h,a,br,!Ba);break e;case 2:sr=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(w=yd+300-je(),10<w)){if(Ga(h,a,br,!Ba),gt(h,0,!0)!==0)break e;aa=a,h.timeoutHandle=aE($1.bind(null,h,l,sr,Sd,Pg,a,br,Zo,pl,Ba,O,"Throttled",-0,0),w);break e}$1(h,l,sr,Sd,Pg,a,br,Zo,pl,Ba,O,null,-0,0)}}break}while(!0);xi(r)}function $1(r,a,l,h,w,O,F,H,ee,me,_e,Ee,ge,be){if(r.timeoutHandle=-1,Ee=a.subtreeFlags,Ee&8192||(Ee&16785408)===16785408){Ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vi},_1(a,O,Ee);var Me=(O&62914560)===O?yd-je():(O&4194048)===O?C1-je():0;if(Me=I2(Ee,Me),Me!==null){aa=O,r.cancelPendingCommit=Me(z1.bind(null,r,a,O,l,h,w,F,H,ee,_e,Ee,null,ge,be)),Ga(r,O,F,!me);return}}z1(r,a,O,l,h,w,F,H,ee)}function JN(r){for(var a=r;;){var l=a.tag;if((l===0||l===11||l===15)&&a.flags&16384&&(l=a.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var h=0;h<l.length;h++){var w=l[h],O=w.getSnapshot;w=w.value;try{if(!pr(O(),w))return!1}catch{return!1}}if(l=a.child,a.subtreeFlags&16384&&l!==null)l.return=a,a=l;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Ga(r,a,l,h){a&=~Ng,a&=~Zo,r.suspendedLanes|=a,r.pingedLanes&=~a,h&&(r.warmLanes|=a),h=r.expirationTimes;for(var w=a;0<w;){var O=31-de(w),F=1<<O;h[O]=-1,w&=~F}l!==0&&tr(r,l,a)}function _d(){return(Et&6)===0?(Zu(0),!1):!0}function kg(){if(nt!==null){if(Mt===0)var r=nt.return;else r=nt,Qi=Vo=null,tg(r),ol=null,Pu=0,r=nt;for(;r!==null;)o1(r.alternate,r),r=r.return;nt=null}}function gl(r,a){var l=r.timeoutHandle;l!==-1&&(r.timeoutHandle=-1,y2(l)),l=r.cancelPendingCommit,l!==null&&(r.cancelPendingCommit=null,l()),aa=0,kg(),kt=r,nt=l=Ki(r.current,null),st=a,Mt=0,yr=null,Ba=!1,hl=Yt(r,a),jg=!1,pl=br=Ng=Zo=Va=Zt=0,sr=Xu=null,Pg=!1,(a&8)!==0&&(a|=a&32);var h=r.entangledLanes;if(h!==0)for(r=r.entanglements,h&=a;0<h;){var w=31-de(h),O=1<<w;a|=r[w],h&=~O}return ia=a,Uf(),l}function T1(r,a){Ke=null,q.H=Bu,a===al||a===Wf?(a=K_(),Mt=3):a===Bm?(a=K_(),Mt=4):Mt=a===vg?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,yr=a,nt===null&&(Zt=1,cd(r,Ir(a,r.current)))}function M1(){var r=gr.current;return r===null?!0:(st&4194048)===st?Lr===null:(st&62914560)===st||(st&536870912)!==0?r===Lr:!1}function D1(){var r=q.H;return q.H=Bu,r===null?Bu:r}function j1(){var r=q.A;return q.A=WN,r}function wd(){Zt=4,Ba||(st&4194048)!==st&&gr.current!==null||(hl=!0),(Va&134217727)===0&&(Zo&134217727)===0||kt===null||Ga(kt,st,br,!1)}function Lg(r,a,l){var h=Et;Et|=2;var w=D1(),O=j1();(kt!==r||st!==a)&&(Sd=null,gl(r,a)),a=!1;var F=Zt;e:do try{if(Mt!==0&&nt!==null){var H=nt,ee=yr;switch(Mt){case 8:kg(),F=6;break e;case 3:case 2:case 9:case 6:gr.current===null&&(a=!0);var me=Mt;if(Mt=0,yr=null,vl(r,H,ee,me),l&&hl){F=0;break e}break;default:me=Mt,Mt=0,yr=null,vl(r,H,ee,me)}}ZN(),F=Zt;break}catch(_e){T1(r,_e)}while(!0);return a&&r.shellSuspendCounter++,Qi=Vo=null,Et=h,q.H=w,q.A=O,nt===null&&(kt=null,st=0,Uf()),F}function ZN(){for(;nt!==null;)N1(nt)}function e2(r,a){var l=Et;Et|=2;var h=D1(),w=j1();kt!==r||st!==a?(Sd=null,bd=je()+500,gl(r,a)):hl=Yt(r,a);e:do try{if(Mt!==0&&nt!==null){a=nt;var O=yr;t:switch(Mt){case 1:Mt=0,yr=null,vl(r,a,O,1);break;case 2:case 9:if(V_(O)){Mt=0,yr=null,P1(a);break}a=function(){Mt!==2&&Mt!==9||kt!==r||(Mt=7),xi(r)},O.then(a,a);break e;case 3:Mt=7;break e;case 4:Mt=5;break e;case 7:V_(O)?(Mt=0,yr=null,P1(a)):(Mt=0,yr=null,vl(r,a,O,7));break;case 5:var F=null;switch(nt.tag){case 26:F=nt.memoizedState;case 5:case 27:var H=nt;if(F?SE(F):H.stateNode.complete){Mt=0,yr=null;var ee=H.sibling;if(ee!==null)nt=ee;else{var me=H.return;me!==null?(nt=me,Ed(me)):nt=null}break t}}Mt=0,yr=null,vl(r,a,O,5);break;case 6:Mt=0,yr=null,vl(r,a,O,6);break;case 8:kg(),Zt=6;break e;default:throw Error(i(462))}}t2();break}catch(_e){T1(r,_e)}while(!0);return Qi=Vo=null,q.H=h,q.A=w,Et=l,nt!==null?0:(kt=null,st=0,Uf(),Zt)}function t2(){for(;nt!==null&&!Fe();)N1(nt)}function N1(r){var a=i1(r.alternate,r,ia);r.memoizedProps=r.pendingProps,a===null?Ed(r):nt=a}function P1(r){var a=r,l=a.alternate;switch(a.tag){case 15:case 0:a=Jw(l,a,a.pendingProps,a.type,void 0,st);break;case 11:a=Jw(l,a,a.pendingProps,a.type.render,a.ref,st);break;case 5:tg(a);default:o1(l,a),a=nt=j_(a,ia),a=i1(l,a,ia)}r.memoizedProps=r.pendingProps,a===null?Ed(r):nt=a}function vl(r,a,l,h){Qi=Vo=null,tg(a),ol=null,Pu=0;var w=a.return;try{if(BN(r,w,a,l,st)){Zt=1,cd(r,Ir(l,r.current)),nt=null;return}}catch(O){if(w!==null)throw nt=w,O;Zt=1,cd(r,Ir(l,r.current)),nt=null;return}a.flags&32768?(ct||h===1?r=!0:hl||(st&536870912)!==0?r=!1:(Ba=r=!0,(h===2||h===9||h===3||h===6)&&(h=gr.current,h!==null&&h.tag===13&&(h.flags|=16384))),I1(a,r)):Ed(a)}function Ed(r){var a=r;do{if((a.flags&32768)!==0){I1(a,Ba);return}r=a.return;var l=KN(a.alternate,a,ia);if(l!==null){nt=l;return}if(a=a.sibling,a!==null){nt=a;return}nt=a=r}while(a!==null);Zt===0&&(Zt=5)}function I1(r,a){do{var l=GN(r.alternate,r);if(l!==null){l.flags&=32767,nt=l;return}if(l=r.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!a&&(r=r.sibling,r!==null)){nt=r;return}nt=r=l}while(r!==null);Zt=6,nt=null}function z1(r,a,l,h,w,O,F,H,ee){r.cancelPendingCommit=null;do xd();while(vn!==0);if((Et&6)!==0)throw Error(i(327));if(a!==null){if(a===r.current)throw Error(i(177));if(O=a.lanes|a.childLanes,O|=Am,Xt(r,l,O,F,H,ee),r===kt&&(nt=kt=null,st=0),ml=a,Ka=r,aa=l,Ig=O,zg=w,R1=h,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,a2(tt,function(){return U1(),null})):(r.callbackNode=null,r.callbackPriority=0),h=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||h){h=q.T,q.T=null,w=Q.p,Q.p=2,F=Et,Et|=4;try{QN(r,a,l)}finally{Et=F,Q.p=w,q.T=h}}vn=1,F1(),k1(),L1()}}function F1(){if(vn===1){vn=0;var r=Ka,a=ml,l=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||l){l=q.T,q.T=null;var h=Q.p;Q.p=2;var w=Et;Et|=4;try{y1(a,r);var O=Jg,F=x_(r.containerInfo),H=O.focusedElem,ee=O.selectionRange;if(F!==H&&H&&H.ownerDocument&&E_(H.ownerDocument.documentElement,H)){if(ee!==null&&Em(H)){var me=ee.start,_e=ee.end;if(_e===void 0&&(_e=me),"selectionStart"in H)H.selectionStart=me,H.selectionEnd=Math.min(_e,H.value.length);else{var Ee=H.ownerDocument||document,ge=Ee&&Ee.defaultView||window;if(ge.getSelection){var be=ge.getSelection(),Me=H.textContent.length,ze=Math.min(ee.start,Me),zt=ee.end===void 0?ze:Math.min(ee.end,Me);!be.extend&&ze>zt&&(F=zt,zt=ze,ze=F);var ce=w_(H,ze),re=w_(H,zt);if(ce&&re&&(be.rangeCount!==1||be.anchorNode!==ce.node||be.anchorOffset!==ce.offset||be.focusNode!==re.node||be.focusOffset!==re.offset)){var pe=Ee.createRange();pe.setStart(ce.node,ce.offset),be.removeAllRanges(),ze>zt?(be.addRange(pe),be.extend(re.node,re.offset)):(pe.setEnd(re.node,re.offset),be.addRange(pe))}}}}for(Ee=[],be=H;be=be.parentNode;)be.nodeType===1&&Ee.push({element:be,left:be.scrollLeft,top:be.scrollTop});for(typeof H.focus=="function"&&H.focus(),H=0;H<Ee.length;H++){var we=Ee[H];we.element.scrollLeft=we.left,we.element.scrollTop=we.top}}Id=!!Xg,Jg=Xg=null}finally{Et=w,Q.p=h,q.T=l}}r.current=a,vn=2}}function k1(){if(vn===2){vn=0;var r=Ka,a=ml,l=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||l){l=q.T,q.T=null;var h=Q.p;Q.p=2;var w=Et;Et|=4;try{h1(r,a.alternate,a)}finally{Et=w,Q.p=h,q.T=l}}vn=3}}function L1(){if(vn===4||vn===3){vn=0,Ie();var r=Ka,a=ml,l=aa,h=R1;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?vn=5:(vn=0,ml=Ka=null,q1(r,r.pendingLanes));var w=r.pendingLanes;if(w===0&&(Ha=null),hr(l),a=a.stateNode,$t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(ln,a,void 0,(a.current.flags&128)===128)}catch{}if(h!==null){a=q.T,w=Q.p,Q.p=2,q.T=null;try{for(var O=r.onRecoverableError,F=0;F<h.length;F++){var H=h[F];O(H.value,{componentStack:H.stack})}}finally{q.T=a,Q.p=w}}(aa&3)!==0&&xd(),xi(r),w=r.pendingLanes,(l&261930)!==0&&(w&42)!==0?r===Fg?Ju++:(Ju=0,Fg=r):Ju=0,Zu(0)}}function q1(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,ju(a)))}function xd(){return F1(),k1(),L1(),U1()}function U1(){if(vn!==5)return!1;var r=Ka,a=Ig;Ig=0;var l=hr(aa),h=q.T,w=Q.p;try{Q.p=32>l?32:l,q.T=null,l=zg,zg=null;var O=Ka,F=aa;if(vn=0,ml=Ka=null,aa=0,(Et&6)!==0)throw Error(i(331));var H=Et;if(Et|=4,E1(O.current),S1(O,O.current,F,l),Et=H,Zu(0,!1),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(ln,O)}catch{}return!0}finally{Q.p=w,q.T=h,q1(r,a)}}function B1(r,a,l){a=Ir(l,a),a=gg(r.stateNode,a,2),r=ka(r,a,2),r!==null&&(Hn(r,2),xi(r))}function Dt(r,a,l){if(r.tag===3)B1(r,r,l);else for(;a!==null;){if(a.tag===3){B1(a,r,l);break}else if(a.tag===1){var h=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Ha===null||!Ha.has(h))){r=Ir(l,r),l=Vw(2),h=ka(a,l,2),h!==null&&(Hw(l,h,a,r),Hn(h,2),xi(h));break}}a=a.return}}function qg(r,a,l){var h=r.pingCache;if(h===null){h=r.pingCache=new XN;var w=new Set;h.set(a,w)}else w=h.get(a),w===void 0&&(w=new Set,h.set(a,w));w.has(l)||(jg=!0,w.add(l),r=n2.bind(null,r,a,l),a.then(r,r))}function n2(r,a,l){var h=r.pingCache;h!==null&&h.delete(a),r.pingedLanes|=r.suspendedLanes&l,r.warmLanes&=~l,kt===r&&(st&l)===l&&(Zt===4||Zt===3&&(st&62914560)===st&&300>je()-yd?(Et&2)===0&&gl(r,0):Ng|=l,pl===st&&(pl=0)),xi(r)}function V1(r,a){a===0&&(a=Wt()),r=qo(r,a),r!==null&&(Hn(r,a),xi(r))}function r2(r){var a=r.memoizedState,l=0;a!==null&&(l=a.retryLane),V1(r,l)}function i2(r,a){var l=0;switch(r.tag){case 31:case 13:var h=r.stateNode,w=r.memoizedState;w!==null&&(l=w.retryLane);break;case 19:h=r.stateNode;break;case 22:h=r.stateNode._retryCache;break;default:throw Error(i(314))}h!==null&&h.delete(a),V1(r,l)}function a2(r,a){return Ae(r,a)}var Cd=null,yl=null,Ug=!1,Rd=!1,Bg=!1,Qa=0;function xi(r){r!==yl&&r.next===null&&(yl===null?Cd=yl=r:yl=yl.next=r),Rd=!0,Ug||(Ug=!0,s2())}function Zu(r,a){if(!Bg&&Rd){Bg=!0;do for(var l=!1,h=Cd;h!==null;){if(r!==0){var w=h.pendingLanes;if(w===0)var O=0;else{var F=h.suspendedLanes,H=h.pingedLanes;O=(1<<31-de(42|r)+1)-1,O&=w&~(F&~H),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(l=!0,Q1(h,O))}else O=st,O=gt(h,h===kt?O:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(O&3)===0||Yt(h,O)||(l=!0,Q1(h,O));h=h.next}while(l);Bg=!1}}function o2(){H1()}function H1(){Rd=Ug=!1;var r=0;Qa!==0&&v2()&&(r=Qa);for(var a=je(),l=null,h=Cd;h!==null;){var w=h.next,O=K1(h,a);O===0?(h.next=null,l===null?Cd=w:l.next=w,w===null&&(yl=l)):(l=h,(r!==0||(O&3)!==0)&&(Rd=!0)),h=w}vn!==0&&vn!==5||Zu(r),Qa!==0&&(Qa=0)}function K1(r,a){for(var l=r.suspendedLanes,h=r.pingedLanes,w=r.expirationTimes,O=r.pendingLanes&-62914561;0<O;){var F=31-de(O),H=1<<F,ee=w[F];ee===-1?((H&l)===0||(H&h)!==0)&&(w[F]=wn(H,a)):ee<=a&&(r.expiredLanes|=H),O&=~H}if(a=kt,l=st,l=gt(r,r===a?l:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),h=r.callbackNode,l===0||r===a&&(Mt===2||Mt===9)||r.cancelPendingCommit!==null)return h!==null&&h!==null&&$e(h),r.callbackNode=null,r.callbackPriority=0;if((l&3)===0||Yt(r,l)){if(a=l&-l,a===r.callbackPriority)return a;switch(h!==null&&$e(h),hr(l)){case 2:case 8:l=Je;break;case 32:l=tt;break;case 268435456:l=tn;break;default:l=tt}return h=G1.bind(null,r),l=Ae(l,h),r.callbackPriority=a,r.callbackNode=l,a}return h!==null&&h!==null&&$e(h),r.callbackPriority=2,r.callbackNode=null,2}function G1(r,a){if(vn!==0&&vn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var l=r.callbackNode;if(xd()&&r.callbackNode!==l)return null;var h=st;return h=gt(r,r===kt?h:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),h===0?null:(A1(r,h,a),K1(r,je()),r.callbackNode!=null&&r.callbackNode===l?G1.bind(null,r):null)}function Q1(r,a){if(xd())return null;A1(r,a,!0)}function s2(){b2(function(){(Et&6)!==0?Ae(ke,o2):H1()})}function Vg(){if(Qa===0){var r=rl;r===0&&(r=mt,mt<<=1,(mt&261888)===0&&(mt=256)),Qa=r}return Qa}function Y1(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Nf(""+r)}function W1(r,a){var l=a.ownerDocument.createElement("input");return l.name=a.name,l.value=a.value,r.id&&l.setAttribute("form",r.id),a.parentNode.insertBefore(l,a),r=new FormData(r),l.parentNode.removeChild(l),r}function l2(r,a,l,h,w){if(a==="submit"&&l&&l.stateNode===w){var O=Y1((w[An]||null).action),F=h.submitter;F&&(a=(a=F[An]||null)?Y1(a.formAction):F.getAttribute("formAction"),a!==null&&(O=a,F=null));var H=new Ff("action","action",null,h,w);r.push({event:H,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(Qa!==0){var ee=F?W1(w,F):new FormData(w);cg(l,{pending:!0,data:ee,method:w.method,action:O},null,ee)}}else typeof O=="function"&&(H.preventDefault(),ee=F?W1(w,F):new FormData(w),cg(l,{pending:!0,data:ee,method:w.method,action:O},O,ee))},currentTarget:w}]})}}for(var Hg=0;Hg<Om.length;Hg++){var Kg=Om[Hg],u2=Kg.toLowerCase(),c2=Kg[0].toUpperCase()+Kg.slice(1);ti(u2,"on"+c2)}ti(O_,"onAnimationEnd"),ti(A_,"onAnimationIteration"),ti($_,"onAnimationStart"),ti("dblclick","onDoubleClick"),ti("focusin","onFocus"),ti("focusout","onBlur"),ti(RN,"onTransitionRun"),ti(ON,"onTransitionStart"),ti(AN,"onTransitionCancel"),ti(T_,"onTransitionEnd"),Bs("onMouseEnter",["mouseout","mouseover"]),Bs("onMouseLeave",["mouseout","mouseover"]),Bs("onPointerEnter",["pointerout","pointerover"]),Bs("onPointerLeave",["pointerout","pointerover"]),zo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),zo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),zo("onBeforeInput",["compositionend","keypress","textInput","paste"]),zo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),zo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),zo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ec="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(" "),f2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ec));function X1(r,a){a=(a&4)!==0;for(var l=0;l<r.length;l++){var h=r[l],w=h.event;h=h.listeners;e:{var O=void 0;if(a)for(var F=h.length-1;0<=F;F--){var H=h[F],ee=H.instance,me=H.currentTarget;if(H=H.listener,ee!==O&&w.isPropagationStopped())break e;O=H,w.currentTarget=me;try{O(w)}catch(_e){qf(_e)}w.currentTarget=null,O=ee}else for(F=0;F<h.length;F++){if(H=h[F],ee=H.instance,me=H.currentTarget,H=H.listener,ee!==O&&w.isPropagationStopped())break e;O=H,w.currentTarget=me;try{O(w)}catch(_e){qf(_e)}w.currentTarget=null,O=ee}}}}function rt(r,a){var l=a[Ls];l===void 0&&(l=a[Ls]=new Set);var h=r+"__bubble";l.has(h)||(J1(a,r,2,!1),l.add(h))}function Gg(r,a,l){var h=0;a&&(h|=4),J1(l,r,h,a)}var Od="_reactListening"+Math.random().toString(36).slice(2);function Qg(r){if(!r[Od]){r[Od]=!0,HS.forEach(function(l){l!=="selectionchange"&&(f2.has(l)||Gg(l,!1,r),Gg(l,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[Od]||(a[Od]=!0,Gg("selectionchange",!1,a))}}function J1(r,a,l,h){switch(OE(a)){case 2:var w=k2;break;case 8:w=L2;break;default:w=uv}l=w.bind(null,a,l,r),w=void 0,!pm||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(w=!0),h?w!==void 0?r.addEventListener(a,l,{capture:!0,passive:w}):r.addEventListener(a,l,!0):w!==void 0?r.addEventListener(a,l,{passive:w}):r.addEventListener(a,l,!1)}function Yg(r,a,l,h,w){var O=h;if((a&1)===0&&(a&2)===0&&h!==null)e:for(;;){if(h===null)return;var F=h.tag;if(F===3||F===4){var H=h.stateNode.containerInfo;if(H===w)break;if(F===4)for(F=h.return;F!==null;){var ee=F.tag;if((ee===3||ee===4)&&F.stateNode.containerInfo===w)return;F=F.return}for(;H!==null;){if(F=Ui(H),F===null)return;if(ee=F.tag,ee===5||ee===6||ee===26||ee===27){h=O=F;continue e}H=H.parentNode}}h=h.return}r_(function(){var me=O,_e=dm(l),Ee=[];e:{var ge=M_.get(r);if(ge!==void 0){var be=Ff,Me=r;switch(r){case"keypress":if(If(l)===0)break e;case"keydown":case"keyup":be=iN;break;case"focusin":Me="focus",be=ym;break;case"focusout":Me="blur",be=ym;break;case"beforeblur":case"afterblur":be=ym;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":be=o_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":be=Kj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":be=sN;break;case O_:case A_:case $_:be=Yj;break;case T_:be=uN;break;case"scroll":case"scrollend":be=Vj;break;case"wheel":be=fN;break;case"copy":case"cut":case"paste":be=Xj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":be=l_;break;case"toggle":case"beforetoggle":be=hN}var ze=(a&4)!==0,zt=!ze&&(r==="scroll"||r==="scrollend"),ce=ze?ge!==null?ge+"Capture":null:ge;ze=[];for(var re=me,pe;re!==null;){var we=re;if(pe=we.stateNode,we=we.tag,we!==5&&we!==26&&we!==27||pe===null||ce===null||(we=wu(re,ce),we!=null&&ze.push(tc(re,we,pe))),zt)break;re=re.return}0<ze.length&&(ge=new be(ge,Me,null,l,_e),Ee.push({event:ge,listeners:ze}))}}if((a&7)===0){e:{if(ge=r==="mouseover"||r==="pointerover",be=r==="mouseout"||r==="pointerout",ge&&l!==fm&&(Me=l.relatedTarget||l.fromElement)&&(Ui(Me)||Me[bi]))break e;if((be||ge)&&(ge=_e.window===_e?_e:(ge=_e.ownerDocument)?ge.defaultView||ge.parentWindow:window,be?(Me=l.relatedTarget||l.toElement,be=me,Me=Me?Ui(Me):null,Me!==null&&(zt=s(Me),ze=Me.tag,Me!==zt||ze!==5&&ze!==27&&ze!==6)&&(Me=null)):(be=null,Me=me),be!==Me)){if(ze=o_,we="onMouseLeave",ce="onMouseEnter",re="mouse",(r==="pointerout"||r==="pointerover")&&(ze=l_,we="onPointerLeave",ce="onPointerEnter",re="pointer"),zt=be==null?ge:_u(be),pe=Me==null?ge:_u(Me),ge=new ze(we,re+"leave",be,l,_e),ge.target=zt,ge.relatedTarget=pe,we=null,Ui(_e)===me&&(ze=new ze(ce,re+"enter",Me,l,_e),ze.target=pe,ze.relatedTarget=zt,we=ze),zt=we,be&&Me)t:{for(ze=d2,ce=be,re=Me,pe=0,we=ce;we;we=ze(we))pe++;we=0;for(var Pe=re;Pe;Pe=ze(Pe))we++;for(;0<pe-we;)ce=ze(ce),pe--;for(;0<we-pe;)re=ze(re),we--;for(;pe--;){if(ce===re||re!==null&&ce===re.alternate){ze=ce;break t}ce=ze(ce),re=ze(re)}ze=null}else ze=null;be!==null&&Z1(Ee,ge,be,ze,!1),Me!==null&&zt!==null&&Z1(Ee,zt,Me,ze,!0)}}e:{if(ge=me?_u(me):window,be=ge.nodeName&&ge.nodeName.toLowerCase(),be==="select"||be==="input"&&ge.type==="file")var vt=g_;else if(p_(ge))if(v_)vt=EN;else{vt=_N;var De=SN}else be=ge.nodeName,!be||be.toLowerCase()!=="input"||ge.type!=="checkbox"&&ge.type!=="radio"?me&&cm(me.elementType)&&(vt=g_):vt=wN;if(vt&&(vt=vt(r,me))){m_(Ee,vt,l,_e);break e}De&&De(r,ge,me),r==="focusout"&&me&&ge.type==="number"&&me.memoizedProps.value!=null&&um(ge,"number",ge.value)}switch(De=me?_u(me):window,r){case"focusin":(p_(De)||De.contentEditable==="true")&&(Ys=De,xm=me,Tu=null);break;case"focusout":Tu=xm=Ys=null;break;case"mousedown":Cm=!0;break;case"contextmenu":case"mouseup":case"dragend":Cm=!1,C_(Ee,l,_e);break;case"selectionchange":if(CN)break;case"keydown":case"keyup":C_(Ee,l,_e)}var Ge;if(Sm)e:{switch(r){case"compositionstart":var lt="onCompositionStart";break e;case"compositionend":lt="onCompositionEnd";break e;case"compositionupdate":lt="onCompositionUpdate";break e}lt=void 0}else Qs?d_(r,l)&&(lt="onCompositionEnd"):r==="keydown"&&l.keyCode===229&&(lt="onCompositionStart");lt&&(u_&&l.locale!=="ko"&&(Qs||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&Qs&&(Ge=i_()):(Da=_e,mm="value"in Da?Da.value:Da.textContent,Qs=!0)),De=Ad(me,lt),0<De.length&&(lt=new s_(lt,r,null,l,_e),Ee.push({event:lt,listeners:De}),Ge?lt.data=Ge:(Ge=h_(l),Ge!==null&&(lt.data=Ge)))),(Ge=mN?gN(r,l):vN(r,l))&&(lt=Ad(me,"onBeforeInput"),0<lt.length&&(De=new s_("onBeforeInput","beforeinput",null,l,_e),Ee.push({event:De,listeners:lt}),De.data=Ge)),l2(Ee,r,me,l,_e)}X1(Ee,a)})}function tc(r,a,l){return{instance:r,listener:a,currentTarget:l}}function Ad(r,a){for(var l=a+"Capture",h=[];r!==null;){var w=r,O=w.stateNode;if(w=w.tag,w!==5&&w!==26&&w!==27||O===null||(w=wu(r,l),w!=null&&h.unshift(tc(r,w,O)),w=wu(r,a),w!=null&&h.push(tc(r,w,O))),r.tag===3)return h;r=r.return}return[]}function d2(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Z1(r,a,l,h,w){for(var O=a._reactName,F=[];l!==null&&l!==h;){var H=l,ee=H.alternate,me=H.stateNode;if(H=H.tag,ee!==null&&ee===h)break;H!==5&&H!==26&&H!==27||me===null||(ee=me,w?(me=wu(l,O),me!=null&&F.unshift(tc(l,me,ee))):w||(me=wu(l,O),me!=null&&F.push(tc(l,me,ee)))),l=l.return}F.length!==0&&r.push({event:a,listeners:F})}var h2=/\r\n?/g,p2=/\u0000|\uFFFD/g;function eE(r){return(typeof r=="string"?r:""+r).replace(h2,`
|
|
49
|
-
`).replace(p2,"")}function tE(r,a){return a=eE(a),eE(r)===a}function It(r,a,l,h,w,O){switch(l){case"children":typeof h=="string"?a==="body"||a==="textarea"&&h===""||Hs(r,h):(typeof h=="number"||typeof h=="bigint")&&a!=="body"&&Hs(r,""+h);break;case"className":Df(r,"class",h);break;case"tabIndex":Df(r,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Df(r,l,h);break;case"style":t_(r,h,O);break;case"data":if(a!=="object"){Df(r,"data",h);break}case"src":case"href":if(h===""&&(a!=="a"||l!=="href")){r.removeAttribute(l);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){r.removeAttribute(l);break}h=Nf(""+h),r.setAttribute(l,h);break;case"action":case"formAction":if(typeof h=="function"){r.setAttribute(l,"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 O=="function"&&(l==="formAction"?(a!=="input"&&It(r,a,"name",w.name,w,null),It(r,a,"formEncType",w.formEncType,w,null),It(r,a,"formMethod",w.formMethod,w,null),It(r,a,"formTarget",w.formTarget,w,null)):(It(r,a,"encType",w.encType,w,null),It(r,a,"method",w.method,w,null),It(r,a,"target",w.target,w,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){r.removeAttribute(l);break}h=Nf(""+h),r.setAttribute(l,h);break;case"onClick":h!=null&&(r.onclick=Vi);break;case"onScroll":h!=null&&rt("scroll",r);break;case"onScrollEnd":h!=null&&rt("scrollend",r);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(i(61));if(l=h.__html,l!=null){if(w.children!=null)throw Error(i(60));r.innerHTML=l}}break;case"multiple":r.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":r.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){r.removeAttribute("xlink:href");break}l=Nf(""+h),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(l,""+h):r.removeAttribute(l);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":h&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(l,""):r.removeAttribute(l);break;case"capture":case"download":h===!0?r.setAttribute(l,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(l,h):r.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?r.setAttribute(l,h):r.removeAttribute(l);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?r.removeAttribute(l):r.setAttribute(l,h);break;case"popover":rt("beforetoggle",r),rt("toggle",r),Mf(r,"popover",h);break;case"xlinkActuate":Bi(r,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":Bi(r,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":Bi(r,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":Bi(r,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":Bi(r,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":Bi(r,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":Bi(r,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":Bi(r,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":Bi(r,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Mf(r,"is",h);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Uj.get(l)||l,Mf(r,l,h))}}function Wg(r,a,l,h,w,O){switch(l){case"style":t_(r,h,O);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(i(61));if(l=h.__html,l!=null){if(w.children!=null)throw Error(i(60));r.innerHTML=l}}break;case"children":typeof h=="string"?Hs(r,h):(typeof h=="number"||typeof h=="bigint")&&Hs(r,""+h);break;case"onScroll":h!=null&&rt("scroll",r);break;case"onScrollEnd":h!=null&&rt("scrollend",r);break;case"onClick":h!=null&&(r.onclick=Vi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!KS.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(w=l.endsWith("Capture"),a=l.slice(2,w?l.length-7:void 0),O=r[An]||null,O=O!=null?O[l]:null,typeof O=="function"&&r.removeEventListener(a,O,w),typeof h=="function")){typeof O!="function"&&O!==null&&(l in r?r[l]=null:r.hasAttribute(l)&&r.removeAttribute(l)),r.addEventListener(a,h,w);break e}l in r?r[l]=h:h===!0?r.setAttribute(l,""):Mf(r,l,h)}}}function Dn(r,a,l){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":rt("error",r),rt("load",r);var h=!1,w=!1,O;for(O in l)if(l.hasOwnProperty(O)){var F=l[O];if(F!=null)switch(O){case"src":h=!0;break;case"srcSet":w=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:It(r,a,O,F,l,null)}}w&&It(r,a,"srcSet",l.srcSet,l,null),h&&It(r,a,"src",l.src,l,null);return;case"input":rt("invalid",r);var H=O=F=w=null,ee=null,me=null;for(h in l)if(l.hasOwnProperty(h)){var _e=l[h];if(_e!=null)switch(h){case"name":w=_e;break;case"type":F=_e;break;case"checked":ee=_e;break;case"defaultChecked":me=_e;break;case"value":O=_e;break;case"defaultValue":H=_e;break;case"children":case"dangerouslySetInnerHTML":if(_e!=null)throw Error(i(137,a));break;default:It(r,a,h,_e,l,null)}}XS(r,O,H,ee,me,F,w,!1);return;case"select":rt("invalid",r),h=F=O=null;for(w in l)if(l.hasOwnProperty(w)&&(H=l[w],H!=null))switch(w){case"value":O=H;break;case"defaultValue":F=H;break;case"multiple":h=H;default:It(r,a,w,H,l,null)}a=O,l=F,r.multiple=!!h,a!=null?Vs(r,!!h,a,!1):l!=null&&Vs(r,!!h,l,!0);return;case"textarea":rt("invalid",r),O=w=h=null;for(F in l)if(l.hasOwnProperty(F)&&(H=l[F],H!=null))switch(F){case"value":h=H;break;case"defaultValue":w=H;break;case"children":O=H;break;case"dangerouslySetInnerHTML":if(H!=null)throw Error(i(91));break;default:It(r,a,F,H,l,null)}ZS(r,h,w,O);return;case"option":for(ee in l)if(l.hasOwnProperty(ee)&&(h=l[ee],h!=null))switch(ee){case"selected":r.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:It(r,a,ee,h,l,null)}return;case"dialog":rt("beforetoggle",r),rt("toggle",r),rt("cancel",r),rt("close",r);break;case"iframe":case"object":rt("load",r);break;case"video":case"audio":for(h=0;h<ec.length;h++)rt(ec[h],r);break;case"image":rt("error",r),rt("load",r);break;case"details":rt("toggle",r);break;case"embed":case"source":case"link":rt("error",r),rt("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(me in l)if(l.hasOwnProperty(me)&&(h=l[me],h!=null))switch(me){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:It(r,a,me,h,l,null)}return;default:if(cm(a)){for(_e in l)l.hasOwnProperty(_e)&&(h=l[_e],h!==void 0&&Wg(r,a,_e,h,l,void 0));return}}for(H in l)l.hasOwnProperty(H)&&(h=l[H],h!=null&&It(r,a,H,h,l,null))}function m2(r,a,l,h){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var w=null,O=null,F=null,H=null,ee=null,me=null,_e=null;for(be in l){var Ee=l[be];if(l.hasOwnProperty(be)&&Ee!=null)switch(be){case"checked":break;case"value":break;case"defaultValue":ee=Ee;default:h.hasOwnProperty(be)||It(r,a,be,null,h,Ee)}}for(var ge in h){var be=h[ge];if(Ee=l[ge],h.hasOwnProperty(ge)&&(be!=null||Ee!=null))switch(ge){case"type":O=be;break;case"name":w=be;break;case"checked":me=be;break;case"defaultChecked":_e=be;break;case"value":F=be;break;case"defaultValue":H=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(i(137,a));break;default:be!==Ee&&It(r,a,ge,be,h,Ee)}}lm(r,F,H,ee,me,_e,O,w);return;case"select":be=F=H=ge=null;for(O in l)if(ee=l[O],l.hasOwnProperty(O)&&ee!=null)switch(O){case"value":break;case"multiple":be=ee;default:h.hasOwnProperty(O)||It(r,a,O,null,h,ee)}for(w in h)if(O=h[w],ee=l[w],h.hasOwnProperty(w)&&(O!=null||ee!=null))switch(w){case"value":ge=O;break;case"defaultValue":H=O;break;case"multiple":F=O;default:O!==ee&&It(r,a,w,O,h,ee)}a=H,l=F,h=be,ge!=null?Vs(r,!!l,ge,!1):!!h!=!!l&&(a!=null?Vs(r,!!l,a,!0):Vs(r,!!l,l?[]:"",!1));return;case"textarea":be=ge=null;for(H in l)if(w=l[H],l.hasOwnProperty(H)&&w!=null&&!h.hasOwnProperty(H))switch(H){case"value":break;case"children":break;default:It(r,a,H,null,h,w)}for(F in h)if(w=h[F],O=l[F],h.hasOwnProperty(F)&&(w!=null||O!=null))switch(F){case"value":ge=w;break;case"defaultValue":be=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:w!==O&&It(r,a,F,w,h,O)}JS(r,ge,be);return;case"option":for(var Me in l)if(ge=l[Me],l.hasOwnProperty(Me)&&ge!=null&&!h.hasOwnProperty(Me))switch(Me){case"selected":r.selected=!1;break;default:It(r,a,Me,null,h,ge)}for(ee in h)if(ge=h[ee],be=l[ee],h.hasOwnProperty(ee)&&ge!==be&&(ge!=null||be!=null))switch(ee){case"selected":r.selected=ge&&typeof ge!="function"&&typeof ge!="symbol";break;default:It(r,a,ee,ge,h,be)}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 ze in l)ge=l[ze],l.hasOwnProperty(ze)&&ge!=null&&!h.hasOwnProperty(ze)&&It(r,a,ze,null,h,ge);for(me in h)if(ge=h[me],be=l[me],h.hasOwnProperty(me)&&ge!==be&&(ge!=null||be!=null))switch(me){case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(i(137,a));break;default:It(r,a,me,ge,h,be)}return;default:if(cm(a)){for(var zt in l)ge=l[zt],l.hasOwnProperty(zt)&&ge!==void 0&&!h.hasOwnProperty(zt)&&Wg(r,a,zt,void 0,h,ge);for(_e in h)ge=h[_e],be=l[_e],!h.hasOwnProperty(_e)||ge===be||ge===void 0&&be===void 0||Wg(r,a,_e,ge,h,be);return}}for(var ce in l)ge=l[ce],l.hasOwnProperty(ce)&&ge!=null&&!h.hasOwnProperty(ce)&&It(r,a,ce,null,h,ge);for(Ee in h)ge=h[Ee],be=l[Ee],!h.hasOwnProperty(Ee)||ge===be||ge==null&&be==null||It(r,a,Ee,ge,h,be)}function nE(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function g2(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,l=performance.getEntriesByType("resource"),h=0;h<l.length;h++){var w=l[h],O=w.transferSize,F=w.initiatorType,H=w.duration;if(O&&H&&nE(F)){for(F=0,H=w.responseEnd,h+=1;h<l.length;h++){var ee=l[h],me=ee.startTime;if(me>H)break;var _e=ee.transferSize,Ee=ee.initiatorType;_e&&nE(Ee)&&(ee=ee.responseEnd,F+=_e*(ee<H?1:(H-me)/(ee-me)))}if(--h,a+=8*(O+F)/(w.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Xg=null,Jg=null;function $d(r){return r.nodeType===9?r:r.ownerDocument}function rE(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function iE(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function Zg(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var ev=null;function v2(){var r=window.event;return r&&r.type==="popstate"?r===ev?!1:(ev=r,!0):(ev=null,!1)}var aE=typeof setTimeout=="function"?setTimeout:void 0,y2=typeof clearTimeout=="function"?clearTimeout:void 0,oE=typeof Promise=="function"?Promise:void 0,b2=typeof queueMicrotask=="function"?queueMicrotask:typeof oE<"u"?function(r){return oE.resolve(null).then(r).catch(S2)}:aE;function S2(r){setTimeout(function(){throw r})}function Ya(r){return r==="head"}function sE(r,a){var l=a,h=0;do{var w=l.nextSibling;if(r.removeChild(l),w&&w.nodeType===8)if(l=w.data,l==="/$"||l==="/&"){if(h===0){r.removeChild(w),wl(a);return}h--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")h++;else if(l==="html")nc(r.ownerDocument.documentElement);else if(l==="head"){l=r.ownerDocument.head,nc(l);for(var O=l.firstChild;O;){var F=O.nextSibling,H=O.nodeName;O[Si]||H==="SCRIPT"||H==="STYLE"||H==="LINK"&&O.rel.toLowerCase()==="stylesheet"||l.removeChild(O),O=F}}else l==="body"&&nc(r.ownerDocument.body);l=w}while(l);wl(a)}function lE(r,a){var l=r;r=0;do{var h=l.nextSibling;if(l.nodeType===1?a?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(a?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),h&&h.nodeType===8)if(l=h.data,l==="/$"){if(r===0)break;r--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||r++;l=h}while(l)}function tv(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var l=a;switch(a=a.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":tv(l),Su(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}r.removeChild(l)}}function _2(r,a,l,h){for(;r.nodeType===1;){var w=l;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!h&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(h){if(!r[Si])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(O=r.getAttribute("rel"),O==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(O!==w.rel||r.getAttribute("href")!==(w.href==null||w.href===""?null:w.href)||r.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin)||r.getAttribute("title")!==(w.title==null?null:w.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(O=r.getAttribute("src"),(O!==(w.src==null?null:w.src)||r.getAttribute("type")!==(w.type==null?null:w.type)||r.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin))&&O&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var O=w.name==null?null:""+w.name;if(w.type==="hidden"&&r.getAttribute("name")===O)return r}else return r;if(r=qr(r.nextSibling),r===null)break}return null}function w2(r,a,l){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!l||(r=qr(r.nextSibling),r===null))return null;return r}function uE(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=qr(r.nextSibling),r===null))return null;return r}function nv(r){return r.data==="$?"||r.data==="$~"}function rv(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function E2(r,a){var l=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||l.readyState!=="loading")a();else{var h=function(){a(),l.removeEventListener("DOMContentLoaded",h)};l.addEventListener("DOMContentLoaded",h),r._reactRetry=h}}function qr(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var iv=null;function cE(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var l=r.data;if(l==="/$"||l==="/&"){if(a===0)return qr(r.nextSibling);a--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||a++}r=r.nextSibling}return null}function fE(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var l=r.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(a===0)return r;a--}else l!=="/$"&&l!=="/&"||a++}r=r.previousSibling}return null}function dE(r,a,l){switch(a=$d(l),r){case"html":if(r=a.documentElement,!r)throw Error(i(452));return r;case"head":if(r=a.head,!r)throw Error(i(453));return r;case"body":if(r=a.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function nc(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);Su(r)}var Ur=new Map,hE=new Set;function Td(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var oa=Q.d;Q.d={f:x2,r:C2,D:R2,C:O2,L:A2,m:$2,X:M2,S:T2,M:D2};function x2(){var r=oa.f(),a=_d();return r||a}function C2(r){var a=qs(r);a!==null&&a.tag===5&&a.type==="form"?Tw(a):oa.r(r)}var bl=typeof document>"u"?null:document;function pE(r,a,l){var h=bl;if(h&&typeof a=="string"&&a){var w=Nr(a);w='link[rel="'+r+'"][href="'+w+'"]',typeof l=="string"&&(w+='[crossorigin="'+l+'"]'),hE.has(w)||(hE.add(w),r={rel:r,crossOrigin:l,href:a},h.querySelector(w)===null&&(a=h.createElement("link"),Dn(a,"link",r),En(a),h.head.appendChild(a)))}}function R2(r){oa.D(r),pE("dns-prefetch",r,null)}function O2(r,a){oa.C(r,a),pE("preconnect",r,a)}function A2(r,a,l){oa.L(r,a,l);var h=bl;if(h&&r&&a){var w='link[rel="preload"][as="'+Nr(a)+'"]';a==="image"&&l&&l.imageSrcSet?(w+='[imagesrcset="'+Nr(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(w+='[imagesizes="'+Nr(l.imageSizes)+'"]')):w+='[href="'+Nr(r)+'"]';var O=w;switch(a){case"style":O=Sl(r);break;case"script":O=_l(r)}Ur.has(O)||(r=p({rel:"preload",href:a==="image"&&l&&l.imageSrcSet?void 0:r,as:a},l),Ur.set(O,r),h.querySelector(w)!==null||a==="style"&&h.querySelector(rc(O))||a==="script"&&h.querySelector(ic(O))||(a=h.createElement("link"),Dn(a,"link",r),En(a),h.head.appendChild(a)))}}function $2(r,a){oa.m(r,a);var l=bl;if(l&&r){var h=a&&typeof a.as=="string"?a.as:"script",w='link[rel="modulepreload"][as="'+Nr(h)+'"][href="'+Nr(r)+'"]',O=w;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=_l(r)}if(!Ur.has(O)&&(r=p({rel:"modulepreload",href:r},a),Ur.set(O,r),l.querySelector(w)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ic(O)))return}h=l.createElement("link"),Dn(h,"link",r),En(h),l.head.appendChild(h)}}}function T2(r,a,l){oa.S(r,a,l);var h=bl;if(h&&r){var w=Us(h).hoistableStyles,O=Sl(r);a=a||"default";var F=w.get(O);if(!F){var H={loading:0,preload:null};if(F=h.querySelector(rc(O)))H.loading=5;else{r=p({rel:"stylesheet",href:r,"data-precedence":a},l),(l=Ur.get(O))&&av(r,l);var ee=F=h.createElement("link");En(ee),Dn(ee,"link",r),ee._p=new Promise(function(me,_e){ee.onload=me,ee.onerror=_e}),ee.addEventListener("load",function(){H.loading|=1}),ee.addEventListener("error",function(){H.loading|=2}),H.loading|=4,Md(F,a,h)}F={type:"stylesheet",instance:F,count:1,state:H},w.set(O,F)}}}function M2(r,a){oa.X(r,a);var l=bl;if(l&&r){var h=Us(l).hoistableScripts,w=_l(r),O=h.get(w);O||(O=l.querySelector(ic(w)),O||(r=p({src:r,async:!0},a),(a=Ur.get(w))&&ov(r,a),O=l.createElement("script"),En(O),Dn(O,"link",r),l.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},h.set(w,O))}}function D2(r,a){oa.M(r,a);var l=bl;if(l&&r){var h=Us(l).hoistableScripts,w=_l(r),O=h.get(w);O||(O=l.querySelector(ic(w)),O||(r=p({src:r,async:!0,type:"module"},a),(a=Ur.get(w))&&ov(r,a),O=l.createElement("script"),En(O),Dn(O,"link",r),l.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},h.set(w,O))}}function mE(r,a,l,h){var w=(w=J.current)?Td(w):null;if(!w)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(a=Sl(l.href),l=Us(w).hoistableStyles,h=l.get(a),h||(h={type:"style",instance:null,count:0,state:null},l.set(a,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){r=Sl(l.href);var O=Us(w).hoistableStyles,F=O.get(r);if(F||(w=w.ownerDocument||w,F={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(r,F),(O=w.querySelector(rc(r)))&&!O._p&&(F.instance=O,F.state.loading=5),Ur.has(r)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ur.set(r,l),O||j2(w,r,l,F.state))),a&&h===null)throw Error(i(528,""));return F}if(a&&h!==null)throw Error(i(529,""));return null;case"script":return a=l.async,l=l.src,typeof l=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=_l(l),l=Us(w).hoistableScripts,h=l.get(a),h||(h={type:"script",instance:null,count:0,state:null},l.set(a,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function Sl(r){return'href="'+Nr(r)+'"'}function rc(r){return'link[rel="stylesheet"]['+r+"]"}function gE(r){return p({},r,{"data-precedence":r.precedence,precedence:null})}function j2(r,a,l,h){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?h.loading=1:(a=r.createElement("link"),h.preload=a,a.addEventListener("load",function(){return h.loading|=1}),a.addEventListener("error",function(){return h.loading|=2}),Dn(a,"link",l),En(a),r.head.appendChild(a))}function _l(r){return'[src="'+Nr(r)+'"]'}function ic(r){return"script[async]"+r}function vE(r,a,l){if(a.count++,a.instance===null)switch(a.type){case"style":var h=r.querySelector('style[data-href~="'+Nr(l.href)+'"]');if(h)return a.instance=h,En(h),h;var w=p({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return h=(r.ownerDocument||r).createElement("style"),En(h),Dn(h,"style",w),Md(h,l.precedence,r),a.instance=h;case"stylesheet":w=Sl(l.href);var O=r.querySelector(rc(w));if(O)return a.state.loading|=4,a.instance=O,En(O),O;h=gE(l),(w=Ur.get(w))&&av(h,w),O=(r.ownerDocument||r).createElement("link"),En(O);var F=O;return F._p=new Promise(function(H,ee){F.onload=H,F.onerror=ee}),Dn(O,"link",h),a.state.loading|=4,Md(O,l.precedence,r),a.instance=O;case"script":return O=_l(l.src),(w=r.querySelector(ic(O)))?(a.instance=w,En(w),w):(h=l,(w=Ur.get(O))&&(h=p({},l),ov(h,w)),r=r.ownerDocument||r,w=r.createElement("script"),En(w),Dn(w,"link",h),r.head.appendChild(w),a.instance=w);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(h=a.instance,a.state.loading|=4,Md(h,l.precedence,r));return a.instance}function Md(r,a,l){for(var h=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),w=h.length?h[h.length-1]:null,O=w,F=0;F<h.length;F++){var H=h[F];if(H.dataset.precedence===a)O=H;else if(O!==w)break}O?O.parentNode.insertBefore(r,O.nextSibling):(a=l.nodeType===9?l.head:l,a.insertBefore(r,a.firstChild))}function av(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function ov(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var Dd=null;function yE(r,a,l){if(Dd===null){var h=new Map,w=Dd=new Map;w.set(l,h)}else w=Dd,h=w.get(l),h||(h=new Map,w.set(l,h));if(h.has(r))return h;for(h.set(r,null),l=l.getElementsByTagName(r),w=0;w<l.length;w++){var O=l[w];if(!(O[Si]||O[nn]||r==="link"&&O.getAttribute("rel")==="stylesheet")&&O.namespaceURI!=="http://www.w3.org/2000/svg"){var F=O.getAttribute(a)||"";F=r+F;var H=h.get(F);H?H.push(O):h.set(F,[O])}}return h}function bE(r,a,l){r=r.ownerDocument||r,r.head.insertBefore(l,a==="title"?r.querySelector("head > title"):null)}function N2(r,a,l){if(l===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return r=a.disabled,typeof a.precedence=="string"&&r==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function SE(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function P2(r,a,l,h){if(l.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var w=Sl(h.href),O=a.querySelector(rc(w));if(O){a=O._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=jd.bind(r),a.then(r,r)),l.state.loading|=4,l.instance=O,En(O);return}O=a.ownerDocument||a,h=gE(h),(w=Ur.get(w))&&av(h,w),O=O.createElement("link"),En(O);var F=O;F._p=new Promise(function(H,ee){F.onload=H,F.onerror=ee}),Dn(O,"link",h),l.instance=O}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(l,a),(a=l.state.preload)&&(l.state.loading&3)===0&&(r.count++,l=jd.bind(r),a.addEventListener("load",l),a.addEventListener("error",l))}}var sv=0;function I2(r,a){return r.stylesheets&&r.count===0&&Pd(r,r.stylesheets),0<r.count||0<r.imgCount?function(l){var h=setTimeout(function(){if(r.stylesheets&&Pd(r,r.stylesheets),r.unsuspend){var O=r.unsuspend;r.unsuspend=null,O()}},6e4+a);0<r.imgBytes&&sv===0&&(sv=62500*g2());var w=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Pd(r,r.stylesheets),r.unsuspend)){var O=r.unsuspend;r.unsuspend=null,O()}},(r.imgBytes>sv?50:800)+a);return r.unsuspend=l,function(){r.unsuspend=null,clearTimeout(h),clearTimeout(w)}}:null}function jd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Pd(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Nd=null;function Pd(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Nd=new Map,a.forEach(z2,r),Nd=null,jd.call(r))}function z2(r,a){if(!(a.state.loading&4)){var l=Nd.get(r);if(l)var h=l.get(null);else{l=new Map,Nd.set(r,l);for(var w=r.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O<w.length;O++){var F=w[O];(F.nodeName==="LINK"||F.getAttribute("media")!=="not all")&&(l.set(F.dataset.precedence,F),h=F)}h&&l.set(null,h)}w=a.instance,F=w.getAttribute("data-precedence"),O=l.get(F)||h,O===h&&l.set(null,w),l.set(F,w),this.count++,h=jd.bind(this),w.addEventListener("load",h),w.addEventListener("error",h),O?O.parentNode.insertBefore(w,O.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(w,r.firstChild)),a.state.loading|=4}}var ac={$$typeof:E,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function F2(r,a,l,h,w,O,F,H,ee){this.tag=1,this.containerInfo=r,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=Lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lt(0),this.hiddenUpdates=Lt(null),this.identifierPrefix=h,this.onUncaughtError=w,this.onCaughtError=O,this.onRecoverableError=F,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ee,this.incompleteTransitions=new Map}function _E(r,a,l,h,w,O,F,H,ee,me,_e,Ee){return r=new F2(r,a,l,F,ee,me,_e,Ee,H),a=1,O===!0&&(a|=24),O=mr(3,null,null,a),r.current=O,O.stateNode=r,a=Lm(),a.refCount++,r.pooledCache=a,a.refCount++,O.memoizedState={element:h,isDehydrated:l,cache:a},Vm(O),r}function wE(r){return r?(r=Js,r):Js}function EE(r,a,l,h,w,O){w=wE(w),h.context===null?h.context=w:h.pendingContext=w,h=Fa(a),h.payload={element:l},O=O===void 0?null:O,O!==null&&(h.callback=O),l=ka(r,h,a),l!==null&&(lr(l,r,a),zu(l,r,a))}function xE(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var l=r.retryLane;r.retryLane=l!==0&&l<a?l:a}}function lv(r,a){xE(r,a),(r=r.alternate)&&xE(r,a)}function CE(r){if(r.tag===13||r.tag===31){var a=qo(r,67108864);a!==null&&lr(a,r,67108864),lv(r,67108864)}}function RE(r){if(r.tag===13||r.tag===31){var a=Sr();a=nr(a);var l=qo(r,a);l!==null&&lr(l,r,a),lv(r,a)}}var Id=!0;function k2(r,a,l,h){var w=q.T;q.T=null;var O=Q.p;try{Q.p=2,uv(r,a,l,h)}finally{Q.p=O,q.T=w}}function L2(r,a,l,h){var w=q.T;q.T=null;var O=Q.p;try{Q.p=8,uv(r,a,l,h)}finally{Q.p=O,q.T=w}}function uv(r,a,l,h){if(Id){var w=cv(h);if(w===null)Yg(r,a,h,zd,l),AE(r,h);else if(U2(w,r,a,l,h))h.stopPropagation();else if(AE(r,h),a&4&&-1<q2.indexOf(r)){for(;w!==null;){var O=qs(w);if(O!==null)switch(O.tag){case 3:if(O=O.stateNode,O.current.memoizedState.isDehydrated){var F=Tt(O.pendingLanes);if(F!==0){var H=O;for(H.pendingLanes|=2,H.entangledLanes|=2;F;){var ee=1<<31-de(F);H.entanglements[1]|=ee,F&=~ee}xi(O),(Et&6)===0&&(bd=je()+500,Zu(0))}}break;case 31:case 13:H=qo(O,2),H!==null&&lr(H,O,2),_d(),lv(O,2)}if(O=cv(h),O===null&&Yg(r,a,h,zd,l),O===w)break;w=O}w!==null&&h.stopPropagation()}else Yg(r,a,h,null,l)}}function cv(r){return r=dm(r),fv(r)}var zd=null;function fv(r){if(zd=null,r=Ui(r),r!==null){var a=s(r);if(a===null)r=null;else{var l=a.tag;if(l===13){if(r=u(a),r!==null)return r;r=null}else if(l===31){if(r=c(a),r!==null)return r;r=null}else if(l===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return zd=r,null}function OE(r){switch(r){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(Ye()){case ke:return 2;case Je:return 8;case tt:case wt:return 32;case tn:return 268435456;default:return 32}default:return 32}}var dv=!1,Wa=null,Xa=null,Ja=null,oc=new Map,sc=new Map,Za=[],q2="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 AE(r,a){switch(r){case"focusin":case"focusout":Wa=null;break;case"dragenter":case"dragleave":Xa=null;break;case"mouseover":case"mouseout":Ja=null;break;case"pointerover":case"pointerout":oc.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":sc.delete(a.pointerId)}}function lc(r,a,l,h,w,O){return r===null||r.nativeEvent!==O?(r={blockedOn:a,domEventName:l,eventSystemFlags:h,nativeEvent:O,targetContainers:[w]},a!==null&&(a=qs(a),a!==null&&CE(a)),r):(r.eventSystemFlags|=h,a=r.targetContainers,w!==null&&a.indexOf(w)===-1&&a.push(w),r)}function U2(r,a,l,h,w){switch(a){case"focusin":return Wa=lc(Wa,r,a,l,h,w),!0;case"dragenter":return Xa=lc(Xa,r,a,l,h,w),!0;case"mouseover":return Ja=lc(Ja,r,a,l,h,w),!0;case"pointerover":var O=w.pointerId;return oc.set(O,lc(oc.get(O)||null,r,a,l,h,w)),!0;case"gotpointercapture":return O=w.pointerId,sc.set(O,lc(sc.get(O)||null,r,a,l,h,w)),!0}return!1}function $E(r){var a=Ui(r.target);if(a!==null){var l=s(a);if(l!==null){if(a=l.tag,a===13){if(a=u(l),a!==null){r.blockedOn=a,ei(r.priority,function(){RE(l)});return}}else if(a===31){if(a=c(l),a!==null){r.blockedOn=a,ei(r.priority,function(){RE(l)});return}}else if(a===3&&l.stateNode.current.memoizedState.isDehydrated){r.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Fd(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var l=cv(r.nativeEvent);if(l===null){l=r.nativeEvent;var h=new l.constructor(l.type,l);fm=h,l.target.dispatchEvent(h),fm=null}else return a=qs(l),a!==null&&CE(a),r.blockedOn=l,!1;a.shift()}return!0}function TE(r,a,l){Fd(r)&&l.delete(a)}function B2(){dv=!1,Wa!==null&&Fd(Wa)&&(Wa=null),Xa!==null&&Fd(Xa)&&(Xa=null),Ja!==null&&Fd(Ja)&&(Ja=null),oc.forEach(TE),sc.forEach(TE)}function kd(r,a){r.blockedOn===a&&(r.blockedOn=null,dv||(dv=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,B2)))}var Ld=null;function ME(r){Ld!==r&&(Ld=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ld===r&&(Ld=null);for(var a=0;a<r.length;a+=3){var l=r[a],h=r[a+1],w=r[a+2];if(typeof h!="function"){if(fv(h||l)===null)continue;break}var O=qs(l);O!==null&&(r.splice(a,3),a-=3,cg(O,{pending:!0,data:w,method:l.method,action:h},h,w))}}))}function wl(r){function a(ee){return kd(ee,r)}Wa!==null&&kd(Wa,r),Xa!==null&&kd(Xa,r),Ja!==null&&kd(Ja,r),oc.forEach(a),sc.forEach(a);for(var l=0;l<Za.length;l++){var h=Za[l];h.blockedOn===r&&(h.blockedOn=null)}for(;0<Za.length&&(l=Za[0],l.blockedOn===null);)$E(l),l.blockedOn===null&&Za.shift();if(l=(r.ownerDocument||r).$$reactFormReplay,l!=null)for(h=0;h<l.length;h+=3){var w=l[h],O=l[h+1],F=w[An]||null;if(typeof O=="function")F||ME(l);else if(F){var H=null;if(O&&O.hasAttribute("formAction")){if(w=O,F=O[An]||null)H=F.formAction;else if(fv(w)!==null)continue}else H=F.action;typeof H=="function"?l[h+1]=H:(l.splice(h,3),h-=3),ME(l)}}}function DE(){function r(O){O.canIntercept&&O.info==="react-transition"&&O.intercept({handler:function(){return new Promise(function(F){return w=F})},focusReset:"manual",scroll:"manual"})}function a(){w!==null&&(w(),w=null),h||setTimeout(l,20)}function l(){if(!h&&!navigation.transition){var O=navigation.currentEntry;O&&O.url!=null&&navigation.navigate(O.url,{state:O.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,w=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(l,100),function(){h=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),w!==null&&(w(),w=null)}}}function hv(r){this._internalRoot=r}qd.prototype.render=hv.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var l=a.current,h=Sr();EE(l,h,r,a,null,null)},qd.prototype.unmount=hv.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;EE(r.current,2,null,r,null,null),_d(),a[bi]=null}};function qd(r){this._internalRoot=r}qd.prototype.unstable_scheduleHydration=function(r){if(r){var a=Kn();r={blockedOn:null,target:r,priority:a};for(var l=0;l<Za.length&&a!==0&&a<Za[l].priority;l++);Za.splice(l,0,r),l===0&&$E(r)}};var jE=t.version;if(jE!=="19.2.3")throw Error(i(527,jE,"19.2.3"));Q.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=d(a),r=r!==null?m(r):null,r=r===null?null:r.stateNode,r};var V2={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ud=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ud.isDisabled&&Ud.supportsFiber)try{ln=Ud.inject(V2),$t=Ud}catch{}}return cc.createRoot=function(r,a){if(!o(r))throw Error(i(299));var l=!1,h="",w=Lw,O=qw,F=Uw;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(w=a.onUncaughtError),a.onCaughtError!==void 0&&(O=a.onCaughtError),a.onRecoverableError!==void 0&&(F=a.onRecoverableError)),a=_E(r,1,!1,null,null,l,h,null,w,O,F,DE),r[bi]=a.current,Qg(r),new hv(a)},cc.hydrateRoot=function(r,a,l){if(!o(r))throw Error(i(299));var h=!1,w="",O=Lw,F=qw,H=Uw,ee=null;return l!=null&&(l.unstable_strictMode===!0&&(h=!0),l.identifierPrefix!==void 0&&(w=l.identifierPrefix),l.onUncaughtError!==void 0&&(O=l.onUncaughtError),l.onCaughtError!==void 0&&(F=l.onCaughtError),l.onRecoverableError!==void 0&&(H=l.onRecoverableError),l.formState!==void 0&&(ee=l.formState)),a=_E(r,1,!0,a,l??null,h,w,ee,O,F,H,DE),a.context=wE(null),l=a.current,h=Sr(),h=nr(h),w=Fa(h),w.callback=null,ka(l,w,h),l=h,a.current.lanes=l,Hn(a,l),xi(a),r[bi]=a.current,Qg(r),new qd(a)},cc.version="19.2.3",cc}var HE;function tP(){if(HE)return vv.exports;HE=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),vv.exports=eP(),vv.exports}var nP=tP(),Vh={exports:{}},Hh={exports:{}},rP=Hh.exports,KE;function iP(){return KE||(KE=1,(function(e,t){(function(n,i){e.exports=i()})(rP,function(){function n(b){return!isNaN(parseFloat(b))&&isFinite(b)}function i(b){return b.charAt(0).toUpperCase()+b.substring(1)}function o(b){return function(){return this[b]}}var s=["isConstructor","isEval","isNative","isToplevel"],u=["columnNumber","lineNumber"],c=["fileName","functionName","source"],f=["args"],d=["evalOrigin"],m=s.concat(u,c,f,d);function p(b){if(b)for(var v=0;v<m.length;v++)b[m[v]]!==void 0&&this["set"+i(m[v])](b[m[v]])}p.prototype={getArgs:function(){return this.args},setArgs:function(b){if(Object.prototype.toString.call(b)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=b},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(b){if(b instanceof p)this.evalOrigin=b;else if(b instanceof Object)this.evalOrigin=new p(b);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var b=this.getFileName()||"",v=this.getLineNumber()||"",_=this.getColumnNumber()||"",x=this.getFunctionName()||"";return this.getIsEval()?b?"[eval] ("+b+":"+v+":"+_+")":"[eval]:"+v+":"+_:x?x+" ("+b+":"+v+":"+_+")":b+":"+v+":"+_}},p.fromString=function(v){var _=v.indexOf("("),x=v.lastIndexOf(")"),E=v.substring(0,_),R=v.substring(_+1,x).split(","),C=v.substring(x+1);if(C.indexOf("@")===0)var $=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(C,""),A=$[1],T=$[2],M=$[3];return new p({functionName:E,args:R||void 0,fileName:A,lineNumber:T||void 0,columnNumber:M||void 0})};for(var y=0;y<s.length;y++)p.prototype["get"+i(s[y])]=o(s[y]),p.prototype["set"+i(s[y])]=(function(b){return function(v){this[b]=!!v}})(s[y]);for(var S=0;S<u.length;S++)p.prototype["get"+i(u[S])]=o(u[S]),p.prototype["set"+i(u[S])]=(function(b){return function(v){if(!n(v))throw new TypeError(b+" must be a Number");this[b]=Number(v)}})(u[S]);for(var g=0;g<c.length;g++)p.prototype["get"+i(c[g])]=o(c[g]),p.prototype["set"+i(c[g])]=(function(b){return function(v){this[b]=String(v)}})(c[g]);return p})})(Hh)),Hh.exports}var aP=Vh.exports,GE;function oP(){return GE||(GE=1,(function(e,t){(function(n,i){e.exports=i(iP())})(aP,function(i){var o=/(^|@)\S+:\d+/,s=/^\s*at .*(\S+:\d+|\(native\))/m,u=/^(eval@)?(\[native code])?$/;return{parse:function(f){if(typeof f.stacktrace<"u"||typeof f["opera#sourceloc"]<"u")return this.parseOpera(f);if(f.stack&&f.stack.match(s))return this.parseV8OrIE(f);if(f.stack)return this.parseFFOrSafari(f);throw new Error("Cannot parse given Error object")},extractLocation:function(f){if(f.indexOf(":")===-1)return[f];var d=/(.+?)(?::(\d+))?(?::(\d+))?$/,m=d.exec(f.replace(/[()]/g,""));return[m[1],m[2]||void 0,m[3]||void 0]},parseV8OrIE:function(f){var d=f.stack.split(`
|
|
50
|
-
`).filter(function(m){return!!m.match(s)},this);return d.map(function(m){m.indexOf("(eval ")>-1&&(m=m.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var p=m.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),y=p.match(/ (\(.+\)$)/);p=y?p.replace(y[0],""):p;var S=this.extractLocation(y?y[1]:p),g=y&&p||void 0,b=["eval","<anonymous>"].indexOf(S[0])>-1?void 0:S[0];return new i({functionName:g,fileName:b,lineNumber:S[1],columnNumber:S[2],source:m})},this)},parseFFOrSafari:function(f){var d=f.stack.split(`
|
|
51
|
-
`).filter(function(m){return!m.match(u)},this);return d.map(function(m){if(m.indexOf(" > eval")>-1&&(m=m.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),m.indexOf("@")===-1&&m.indexOf(":")===-1)return new i({functionName:m});var p=/((.*".+"[^@]*)?[^@]*)(?:@)/,y=m.match(p),S=y&&y[1]?y[1]:void 0,g=this.extractLocation(m.replace(p,""));return new i({functionName:S,fileName:g[0],lineNumber:g[1],columnNumber:g[2],source:m})},this)},parseOpera:function(f){return!f.stacktrace||f.message.indexOf(`
|
|
52
|
-
`)>-1&&f.message.split(`
|
|
53
|
-
`).length>f.stacktrace.split(`
|
|
54
|
-
`).length?this.parseOpera9(f):f.stack?this.parseOpera11(f):this.parseOpera10(f)},parseOpera9:function(f){for(var d=/Line (\d+).*script (?:in )?(\S+)/i,m=f.message.split(`
|
|
55
|
-
`),p=[],y=2,S=m.length;y<S;y+=2){var g=d.exec(m[y]);g&&p.push(new i({fileName:g[2],lineNumber:g[1],source:m[y]}))}return p},parseOpera10:function(f){for(var d=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,m=f.stacktrace.split(`
|
|
56
|
-
`),p=[],y=0,S=m.length;y<S;y+=2){var g=d.exec(m[y]);g&&p.push(new i({functionName:g[3]||void 0,fileName:g[2],lineNumber:g[1],source:m[y]}))}return p},parseOpera11:function(f){var d=f.stack.split(`
|
|
57
|
-
`).filter(function(m){return!!m.match(o)&&!m.match(/^Error created at/)},this);return d.map(function(m){var p=m.split("@"),y=this.extractLocation(p.pop()),S=p.shift()||"",g=S.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,b;S.match(/\(([^)]*)\)/)&&(b=S.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var v=b===void 0||b==="[arguments not available]"?void 0:b.split(",");return new i({functionName:g,args:v,fileName:y[0],lineNumber:y[1],columnNumber:y[2],source:m})},this)}}})})(Vh)),Vh.exports}oP();function zn(e,t,n){return{hookName:"",trace:[],resourcePath:null}}var eu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},sP={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},fo,gb,s$,lP=(s$=class{constructor(){Ne(this,fo,sP);Ne(this,gb,!1)}setTimeoutProvider(e){Te(this,fo,e)}setTimeout(e,t){return te(this,fo).setTimeout(e,t)}clearTimeout(e){te(this,fo).clearTimeout(e)}setInterval(e,t){return te(this,fo).setInterval(e,t)}clearInterval(e){te(this,fo).clearInterval(e)}},fo=new WeakMap,gb=new WeakMap,s$),ds=new lP;function uP(e){setTimeout(e,0)}var Es=typeof window>"u"||"Deno"in globalThis;function Zn(){}function cP(e,t){return typeof e=="function"?e(t):e}function C0(e){return typeof e=="number"&&e>=0&&e!==1/0}function b$(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Eo(e,t){return typeof e=="function"?e(t):e}function Vr(e,t){return typeof e=="function"?e(t):e}function QE(e,t){const{type:n="all",exact:i,fetchStatus:o,predicate:s,queryKey:u,stale:c}=e;if(u){if(i){if(t.queryHash!==vb(u,t.options))return!1}else if(!kc(t.queryKey,u))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||s&&!s(t))}function YE(e,t){const{exact:n,status:i,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(xs(t.options.mutationKey)!==xs(s))return!1}else if(!kc(t.options.mutationKey,s))return!1}return!(i&&t.state.status!==i||o&&!o(t))}function vb(e,t){return((t==null?void 0:t.queryKeyHashFn)||xs)(e)}function xs(e){return JSON.stringify(e,(t,n)=>R0(n)?Object.keys(n).sort().reduce((i,o)=>(i[o]=n[o],i),{}):n)}function kc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>kc(e[n],t[n])):!1}var fP=Object.prototype.hasOwnProperty;function S$(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=WE(e)&&WE(t);if(!i&&!(R0(e)&&R0(t)))return t;const s=(i?e:Object.keys(e)).length,u=i?t:Object.keys(t),c=u.length,f=i?new Array(c):{};let d=0;for(let m=0;m<c;m++){const p=i?m:u[m],y=e[p],S=t[p];if(y===S){f[p]=y,(i?m<s:fP.call(e,p))&&d++;continue}if(y===null||S===null||typeof y!="object"||typeof S!="object"){f[p]=S;continue}const g=S$(y,S,n+1);f[p]=g,g===y&&d++}return s===c&&d===s?e:f}function cp(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function WE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function R0(e){if(!XE(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!XE(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function XE(e){return Object.prototype.toString.call(e)==="[object Object]"}function dP(e){return new Promise(t=>{ds.setTimeout(t,e)})}function O0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?S$(e,t):t}function hP(e){return e}function pP(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function mP(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var yb=Symbol();function _$(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===yb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function bb(e,t){return typeof e=="function"?e(...t):!!e}function gP(e,t,n){let i=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),i||(i=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var ps,ho,Pl,l$,vP=(l$=class extends eu{constructor(){super();Ne(this,ps);Ne(this,ho);Ne(this,Pl);Te(this,Pl,t=>{if(!Es&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){te(this,ho)||this.setEventListener(te(this,Pl))}onUnsubscribe(){var t;this.hasListeners()||((t=te(this,ho))==null||t.call(this),Te(this,ho,void 0))}setEventListener(t){var n;Te(this,Pl,t),(n=te(this,ho))==null||n.call(this),Te(this,ho,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){te(this,ps)!==t&&(Te(this,ps,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof te(this,ps)=="boolean"?te(this,ps):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ps=new WeakMap,ho=new WeakMap,Pl=new WeakMap,l$),Sb=new vP;function A0(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function i(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{i({status:"fulfilled",value:o}),e(o)},n.reject=o=>{i({status:"rejected",reason:o}),t(o)},n}var yP=uP;function bP(){let e=[],t=0,n=c=>{c()},i=c=>{c()},o=yP;const s=c=>{t?e.push(c):o(()=>{n(c)})},u=()=>{const c=e;e=[],c.length&&o(()=>{i(()=>{c.forEach(f=>{n(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||u()}return f},batchCalls:c=>(...f)=>{s(()=>{c(...f)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{i=c},setScheduler:c=>{o=c}}}var bn=bP(),Il,po,zl,u$,SP=(u$=class extends eu{constructor(){super();Ne(this,Il,!0);Ne(this,po);Ne(this,zl);Te(this,zl,t=>{if(!Es&&window.addEventListener){const n=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){te(this,po)||this.setEventListener(te(this,zl))}onUnsubscribe(){var t;this.hasListeners()||((t=te(this,po))==null||t.call(this),Te(this,po,void 0))}setEventListener(t){var n;Te(this,zl,t),(n=te(this,po))==null||n.call(this),Te(this,po,t(this.setOnline.bind(this)))}setOnline(t){te(this,Il)!==t&&(Te(this,Il,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return te(this,Il)}},Il=new WeakMap,po=new WeakMap,zl=new WeakMap,u$),fp=new SP;function _P(e){return Math.min(1e3*2**e,3e4)}function w$(e){return(e??"online")==="online"?fp.isOnline():!0}var $0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function E$(e){let t=!1,n=0,i;const o=A0(),s=()=>o.status!=="pending",u=b=>{var v;if(!s()){const _=new $0(b);y(_),(v=e.onCancel)==null||v.call(e,_)}},c=()=>{t=!0},f=()=>{t=!1},d=()=>Sb.isFocused()&&(e.networkMode==="always"||fp.isOnline())&&e.canRun(),m=()=>w$(e.networkMode)&&e.canRun(),p=b=>{s()||(i==null||i(),o.resolve(b))},y=b=>{s()||(i==null||i(),o.reject(b))},S=()=>new Promise(b=>{var v;i=_=>{(s()||d())&&b(_)},(v=e.onPause)==null||v.call(e)}).then(()=>{var b;i=void 0,s()||(b=e.onContinue)==null||b.call(e)}),g=()=>{if(s())return;let b;const v=n===0?e.initialPromise:void 0;try{b=v??e.fn()}catch(_){b=Promise.reject(_)}Promise.resolve(b).then(p).catch(_=>{var $;if(s())return;const x=e.retry??(Es?0:3),E=e.retryDelay??_P,R=typeof E=="function"?E(n,_):E,C=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,_);if(t||!C){y(_);return}n++,($=e.onFail)==null||$.call(e,n,_),dP(R).then(()=>d()?void 0:S()).then(()=>{t?y(_):g()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(i==null||i(),o),cancelRetry:c,continueRetry:f,canStart:m,start:()=>(m()?g():S().then(g),o)}}var ms,c$,x$=(c$=class{constructor(){Ne(this,ms)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),C0(this.gcTime)&&Te(this,ms,ds.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Es?1/0:300*1e3))}clearGcTimeout(){te(this,ms)&&(ds.clearTimeout(te(this,ms)),Te(this,ms,void 0))}},ms=new WeakMap,c$),gs,Fl,Br,vs,Cn,nf,ys,li,pa,f$,wP=(f$=class extends x${constructor(t){super();Ne(this,li);Ne(this,gs);Ne(this,Fl);Ne(this,Br);Ne(this,vs);Ne(this,Cn);Ne(this,nf);Ne(this,ys);Te(this,ys,!1),Te(this,nf,t.defaultOptions),this.setOptions(t.options),this.observers=[],Te(this,vs,t.client),Te(this,Br,te(this,vs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Te(this,gs,ZE(this.options)),this.state=t.state??te(this,gs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=te(this,Cn))==null?void 0:t.promise}setOptions(t){if(this.options={...te(this,nf),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=ZE(this.options);n.data!==void 0&&(this.setState(JE(n.data,n.dataUpdatedAt)),Te(this,gs,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&te(this,Br).remove(this)}setData(t,n){const i=O0(this.state.data,t,this.options);return We(this,li,pa).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(t,n){We(this,li,pa).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var i,o;const n=(i=te(this,Cn))==null?void 0:i.promise;return(o=te(this,Cn))==null||o.cancel(t),n?n.then(Zn).catch(Zn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(te(this,gs))}isActive(){return this.observers.some(t=>Vr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===yb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Eo(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!b$(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=te(this,Cn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=te(this,Cn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),te(this,Br).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(te(this,Cn)&&(te(this,ys)?te(this,Cn).cancel({revert:!0}):te(this,Cn).cancelRetry()),this.scheduleGc()),te(this,Br).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||We(this,li,pa).call(this,{type:"invalidate"})}async fetch(t,n){var f,d,m,p,y,S,g,b,v,_,x,E;if(this.state.fetchStatus!=="idle"&&((f=te(this,Cn))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(te(this,Cn))return te(this,Cn).continueRetry(),te(this,Cn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const R=this.observers.find(C=>C.options.queryFn);R&&this.setOptions(R.options)}const i=new AbortController,o=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(Te(this,ys,!0),i.signal)})},s=()=>{const R=_$(this.options,n),$=(()=>{const A={client:te(this,vs),queryKey:this.queryKey,meta:this.meta};return o(A),A})();return Te(this,ys,!1),this.options.persister?this.options.persister(R,$,this):R($)},c=(()=>{const R={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:te(this,vs),state:this.state,fetchFn:s};return o(R),R})();(d=this.options.behavior)==null||d.onFetch(c,this),Te(this,Fl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&We(this,li,pa).call(this,{type:"fetch",meta:(p=c.fetchOptions)==null?void 0:p.meta}),Te(this,Cn,E$({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:R=>{R instanceof $0&&R.revert&&this.setState({...te(this,Fl),fetchStatus:"idle"}),i.abort()},onFail:(R,C)=>{We(this,li,pa).call(this,{type:"failed",failureCount:R,error:C})},onPause:()=>{We(this,li,pa).call(this,{type:"pause"})},onContinue:()=>{We(this,li,pa).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const R=await te(this,Cn).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(S=(y=te(this,Br).config).onSuccess)==null||S.call(y,R,this),(b=(g=te(this,Br).config).onSettled)==null||b.call(g,R,this.state.error,this),R}catch(R){if(R instanceof $0){if(R.silent)return te(this,Cn).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw We(this,li,pa).call(this,{type:"error",error:R}),(_=(v=te(this,Br).config).onError)==null||_.call(v,R,this),(E=(x=te(this,Br).config).onSettled)==null||E.call(x,this.state.data,R,this),R}finally{this.scheduleGc()}}},gs=new WeakMap,Fl=new WeakMap,Br=new WeakMap,vs=new WeakMap,Cn=new WeakMap,nf=new WeakMap,ys=new WeakMap,li=new WeakSet,pa=function(t){const n=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...C$(i.data,this.options),fetchMeta:t.meta??null};case"success":const o={...i,...JE(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Te(this,Fl,t.manual?o:void 0),o;case"error":const s=t.error;return{...i,error:s,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=n(this.state),bn.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),te(this,Br).notify({query:this,type:"updated",action:t})})},f$);function C$(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:w$(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function JE(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ZE(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ur,ft,rf,Jn,bs,kl,ga,mo,af,Ll,ql,Ss,_s,go,Ul,Ot,Ec,T0,M0,D0,j0,N0,P0,I0,R$,d$,EP=(d$=class extends eu{constructor(t,n){super();Ne(this,Ot);Ne(this,ur);Ne(this,ft);Ne(this,rf);Ne(this,Jn);Ne(this,bs);Ne(this,kl);Ne(this,ga);Ne(this,mo);Ne(this,af);Ne(this,Ll);Ne(this,ql);Ne(this,Ss);Ne(this,_s);Ne(this,go);Ne(this,Ul,new Set);this.options=n,Te(this,ur,t),Te(this,mo,null),Te(this,ga,A0()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(te(this,ft).addObserver(this),ex(te(this,ft),this.options)?We(this,Ot,Ec).call(this):this.updateResult(),We(this,Ot,j0).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return z0(te(this,ft),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return z0(te(this,ft),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,We(this,Ot,N0).call(this),We(this,Ot,P0).call(this),te(this,ft).removeObserver(this)}setOptions(t){const n=this.options,i=te(this,ft);if(this.options=te(this,ur).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Vr(this.options.enabled,te(this,ft))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");We(this,Ot,I0).call(this),te(this,ft).setOptions(this.options),n._defaulted&&!cp(this.options,n)&&te(this,ur).getQueryCache().notify({type:"observerOptionsUpdated",query:te(this,ft),observer:this});const o=this.hasListeners();o&&tx(te(this,ft),i,this.options,n)&&We(this,Ot,Ec).call(this),this.updateResult(),o&&(te(this,ft)!==i||Vr(this.options.enabled,te(this,ft))!==Vr(n.enabled,te(this,ft))||Eo(this.options.staleTime,te(this,ft))!==Eo(n.staleTime,te(this,ft)))&&We(this,Ot,T0).call(this);const s=We(this,Ot,M0).call(this);o&&(te(this,ft)!==i||Vr(this.options.enabled,te(this,ft))!==Vr(n.enabled,te(this,ft))||s!==te(this,go))&&We(this,Ot,D0).call(this,s)}getOptimisticResult(t){const n=te(this,ur).getQueryCache().build(te(this,ur),t),i=this.createResult(n,t);return CP(this,i)&&(Te(this,Jn,i),Te(this,kl,this.options),Te(this,bs,te(this,ft).state)),i}getCurrentResult(){return te(this,Jn)}trackResult(t,n){return new Proxy(t,{get:(i,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&te(this,ga).status==="pending"&&te(this,ga).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,o))})}trackProp(t){te(this,Ul).add(t)}getCurrentQuery(){return te(this,ft)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=te(this,ur).defaultQueryOptions(t),i=te(this,ur).getQueryCache().build(te(this,ur),n);return i.fetch().then(()=>this.createResult(i,n))}fetch(t){return We(this,Ot,Ec).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),te(this,Jn)))}createResult(t,n){var M;const i=te(this,ft),o=this.options,s=te(this,Jn),u=te(this,bs),c=te(this,kl),d=t!==i?t.state:te(this,rf),{state:m}=t;let p={...m},y=!1,S;if(n._optimisticResults){const D=this.hasListeners(),j=!D&&ex(t,n),I=D&&tx(t,i,n,o);(j||I)&&(p={...p,...C$(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:g,errorUpdatedAt:b,status:v}=p;S=p.data;let _=!1;if(n.placeholderData!==void 0&&S===void 0&&v==="pending"){let D;s!=null&&s.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(D=s.data,_=!0):D=typeof n.placeholderData=="function"?n.placeholderData((M=te(this,ql))==null?void 0:M.state.data,te(this,ql)):n.placeholderData,D!==void 0&&(v="success",S=O0(s==null?void 0:s.data,D,n),y=!0)}if(n.select&&S!==void 0&&!_)if(s&&S===(u==null?void 0:u.data)&&n.select===te(this,af))S=te(this,Ll);else try{Te(this,af,n.select),S=n.select(S),S=O0(s==null?void 0:s.data,S,n),Te(this,Ll,S),Te(this,mo,null)}catch(D){Te(this,mo,D)}te(this,mo)&&(g=te(this,mo),S=te(this,Ll),b=Date.now(),v="error");const x=p.fetchStatus==="fetching",E=v==="pending",R=v==="error",C=E&&x,$=S!==void 0,T={status:v,fetchStatus:p.fetchStatus,isPending:E,isSuccess:v==="success",isError:R,isInitialLoading:C,isLoading:C,data:S,dataUpdatedAt:p.dataUpdatedAt,error:g,errorUpdatedAt:b,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:x,isRefetching:x&&!E,isLoadingError:R&&!$,isPaused:p.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:R&&$,isStale:_b(t,n),refetch:this.refetch,promise:te(this,ga),isEnabled:Vr(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const D=T.data!==void 0,j=T.status==="error"&&!D,I=G=>{j?G.reject(T.error):D&&G.resolve(T.data)},L=()=>{const G=Te(this,ga,T.promise=A0());I(G)},K=te(this,ga);switch(K.status){case"pending":t.queryHash===i.queryHash&&I(K);break;case"fulfilled":(j||T.data!==K.value)&&L();break;case"rejected":(!j||T.error!==K.reason)&&L();break}}return T}updateResult(){const t=te(this,Jn),n=this.createResult(te(this,ft),this.options);if(Te(this,bs,te(this,ft).state),Te(this,kl,this.options),te(this,bs).data!==void 0&&Te(this,ql,te(this,ft)),cp(n,t))return;Te(this,Jn,n);const i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!te(this,Ul).size)return!0;const u=new Set(s??te(this,Ul));return this.options.throwOnError&&u.add("error"),Object.keys(te(this,Jn)).some(c=>{const f=c;return te(this,Jn)[f]!==t[f]&&u.has(f)})};We(this,Ot,R$).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&We(this,Ot,j0).call(this)}},ur=new WeakMap,ft=new WeakMap,rf=new WeakMap,Jn=new WeakMap,bs=new WeakMap,kl=new WeakMap,ga=new WeakMap,mo=new WeakMap,af=new WeakMap,Ll=new WeakMap,ql=new WeakMap,Ss=new WeakMap,_s=new WeakMap,go=new WeakMap,Ul=new WeakMap,Ot=new WeakSet,Ec=function(t){We(this,Ot,I0).call(this);let n=te(this,ft).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Zn)),n},T0=function(){We(this,Ot,N0).call(this);const t=Eo(this.options.staleTime,te(this,ft));if(Es||te(this,Jn).isStale||!C0(t))return;const i=b$(te(this,Jn).dataUpdatedAt,t)+1;Te(this,Ss,ds.setTimeout(()=>{te(this,Jn).isStale||this.updateResult()},i))},M0=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(te(this,ft)):this.options.refetchInterval)??!1},D0=function(t){We(this,Ot,P0).call(this),Te(this,go,t),!(Es||Vr(this.options.enabled,te(this,ft))===!1||!C0(te(this,go))||te(this,go)===0)&&Te(this,_s,ds.setInterval(()=>{(this.options.refetchIntervalInBackground||Sb.isFocused())&&We(this,Ot,Ec).call(this)},te(this,go)))},j0=function(){We(this,Ot,T0).call(this),We(this,Ot,D0).call(this,We(this,Ot,M0).call(this))},N0=function(){te(this,Ss)&&(ds.clearTimeout(te(this,Ss)),Te(this,Ss,void 0))},P0=function(){te(this,_s)&&(ds.clearInterval(te(this,_s)),Te(this,_s,void 0))},I0=function(){const t=te(this,ur).getQueryCache().build(te(this,ur),this.options);if(t===te(this,ft))return;const n=te(this,ft);Te(this,ft,t),Te(this,rf,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},R$=function(t){bn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(te(this,Jn))}),te(this,ur).getQueryCache().notify({query:te(this,ft),type:"observerResultsUpdated"})})},d$);function xP(e,t){return Vr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ex(e,t){return xP(e,t)||e.state.data!==void 0&&z0(e,t,t.refetchOnMount)}function z0(e,t,n){if(Vr(t.enabled,e)!==!1&&Eo(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&_b(e,t)}return!1}function tx(e,t,n,i){return(e!==t||Vr(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&_b(e,n)}function _b(e,t){return Vr(t.enabled,e)!==!1&&e.isStaleByTime(Eo(t.staleTime,e))}function CP(e,t){return!cp(e.getCurrentResult(),t)}function nx(e){return{onFetch:(t,n)=>{var m,p,y,S,g;const i=t.options,o=(y=(p=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:p.fetchMore)==null?void 0:y.direction,s=((S=t.state.data)==null?void 0:S.pages)||[],u=((g=t.state.data)==null?void 0:g.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const d=async()=>{let b=!1;const v=E=>{gP(E,()=>t.signal,()=>b=!0)},_=_$(t.options,t.fetchOptions),x=async(E,R,C)=>{if(b)return Promise.reject();if(R==null&&E.pages.length)return Promise.resolve(E);const A=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:R,direction:C?"backward":"forward",meta:t.options.meta};return v(j),j})(),T=await _(A),{maxPages:M}=t.options,D=C?mP:pP;return{pages:D(E.pages,T,M),pageParams:D(E.pageParams,R,M)}};if(o&&s.length){const E=o==="backward",R=E?RP:rx,C={pages:s,pageParams:u},$=R(i,C);c=await x(C,$,E)}else{const E=e??s.length;do{const R=f===0?u[0]??i.initialPageParam:rx(i,c);if(f>0&&R==null)break;c=await x(c,R),f++}while(f<E)}return c};t.options.persister?t.fetchFn=()=>{var b,v;return(v=(b=t.options).persister)==null?void 0:v.call(b,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function rx(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function RP(e,{pages:t,pageParams:n}){var i;return t.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,n[0],n):void 0}var of,Ai,Bn,ws,$i,ro,h$,OP=(h$=class extends x${constructor(t){super();Ne(this,$i);Ne(this,of);Ne(this,Ai);Ne(this,Bn);Ne(this,ws);Te(this,of,t.client),this.mutationId=t.mutationId,Te(this,Bn,t.mutationCache),Te(this,Ai,[]),this.state=t.state||O$(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){te(this,Ai).includes(t)||(te(this,Ai).push(t),this.clearGcTimeout(),te(this,Bn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Te(this,Ai,te(this,Ai).filter(n=>n!==t)),this.scheduleGc(),te(this,Bn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){te(this,Ai).length||(this.state.status==="pending"?this.scheduleGc():te(this,Bn).remove(this))}continue(){var t;return((t=te(this,ws))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,c,f,d,m,p,y,S,g,b,v,_,x,E,R,C,$,A;const n=()=>{We(this,$i,ro).call(this,{type:"continue"})},i={client:te(this,of),meta:this.options.meta,mutationKey:this.options.mutationKey};Te(this,ws,E$({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(T,M)=>{We(this,$i,ro).call(this,{type:"failed",failureCount:T,error:M})},onPause:()=>{We(this,$i,ro).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>te(this,Bn).canRun(this)}));const o=this.state.status==="pending",s=!te(this,ws).canStart();try{if(o)n();else{We(this,$i,ro).call(this,{type:"pending",variables:t,isPaused:s}),te(this,Bn).config.onMutate&&await te(this,Bn).config.onMutate(t,this,i);const M=await((c=(u=this.options).onMutate)==null?void 0:c.call(u,t,i));M!==this.state.context&&We(this,$i,ro).call(this,{type:"pending",context:M,variables:t,isPaused:s})}const T=await te(this,ws).start();return await((d=(f=te(this,Bn).config).onSuccess)==null?void 0:d.call(f,T,t,this.state.context,this,i)),await((p=(m=this.options).onSuccess)==null?void 0:p.call(m,T,t,this.state.context,i)),await((S=(y=te(this,Bn).config).onSettled)==null?void 0:S.call(y,T,null,this.state.variables,this.state.context,this,i)),await((b=(g=this.options).onSettled)==null?void 0:b.call(g,T,null,t,this.state.context,i)),We(this,$i,ro).call(this,{type:"success",data:T}),T}catch(T){try{await((_=(v=te(this,Bn).config).onError)==null?void 0:_.call(v,T,t,this.state.context,this,i))}catch(M){Promise.reject(M)}try{await((E=(x=this.options).onError)==null?void 0:E.call(x,T,t,this.state.context,i))}catch(M){Promise.reject(M)}try{await((C=(R=te(this,Bn).config).onSettled)==null?void 0:C.call(R,void 0,T,this.state.variables,this.state.context,this,i))}catch(M){Promise.reject(M)}try{await((A=($=this.options).onSettled)==null?void 0:A.call($,void 0,T,t,this.state.context,i))}catch(M){Promise.reject(M)}throw We(this,$i,ro).call(this,{type:"error",error:T}),T}finally{te(this,Bn).runNext(this)}}},of=new WeakMap,Ai=new WeakMap,Bn=new WeakMap,ws=new WeakMap,$i=new WeakSet,ro=function(t){const n=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),bn.batch(()=>{te(this,Ai).forEach(i=>{i.onMutationUpdate(t)}),te(this,Bn).notify({mutation:this,type:"updated",action:t})})},h$);function O$(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var va,ui,sf,p$,AP=(p$=class extends eu{constructor(t={}){super();Ne(this,va);Ne(this,ui);Ne(this,sf);this.config=t,Te(this,va,new Set),Te(this,ui,new Map),Te(this,sf,0)}build(t,n,i){const o=new OP({client:t,mutationCache:this,mutationId:++Bd(this,sf)._,options:t.defaultMutationOptions(n),state:i});return this.add(o),o}add(t){te(this,va).add(t);const n=Vd(t);if(typeof n=="string"){const i=te(this,ui).get(n);i?i.push(t):te(this,ui).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(te(this,va).delete(t)){const n=Vd(t);if(typeof n=="string"){const i=te(this,ui).get(n);if(i)if(i.length>1){const o=i.indexOf(t);o!==-1&&i.splice(o,1)}else i[0]===t&&te(this,ui).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Vd(t);if(typeof n=="string"){const i=te(this,ui).get(n),o=i==null?void 0:i.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var i;const n=Vd(t);if(typeof n=="string"){const o=(i=te(this,ui).get(n))==null?void 0:i.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){bn.batch(()=>{te(this,va).forEach(t=>{this.notify({type:"removed",mutation:t})}),te(this,va).clear(),te(this,ui).clear()})}getAll(){return Array.from(te(this,va))}find(t){const n={exact:!0,...t};return this.getAll().find(i=>YE(n,i))}findAll(t={}){return this.getAll().filter(n=>YE(t,n))}notify(t){bn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return bn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Zn))))}},va=new WeakMap,ui=new WeakMap,sf=new WeakMap,p$);function Vd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var ya,vo,cr,ba,Ea,Kh,F0,m$,$P=(m$=class extends eu{constructor(n,i){super();Ne(this,Ea);Ne(this,ya);Ne(this,vo);Ne(this,cr);Ne(this,ba);Te(this,ya,n),this.setOptions(i),this.bindMethods(),We(this,Ea,Kh).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const i=this.options;this.options=te(this,ya).defaultMutationOptions(n),cp(this.options,i)||te(this,ya).getMutationCache().notify({type:"observerOptionsUpdated",mutation:te(this,cr),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&xs(i.mutationKey)!==xs(this.options.mutationKey)?this.reset():((o=te(this,cr))==null?void 0:o.state.status)==="pending"&&te(this,cr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=te(this,cr))==null||n.removeObserver(this)}onMutationUpdate(n){We(this,Ea,Kh).call(this),We(this,Ea,F0).call(this,n)}getCurrentResult(){return te(this,vo)}reset(){var n;(n=te(this,cr))==null||n.removeObserver(this),Te(this,cr,void 0),We(this,Ea,Kh).call(this),We(this,Ea,F0).call(this)}mutate(n,i){var o;return Te(this,ba,i),(o=te(this,cr))==null||o.removeObserver(this),Te(this,cr,te(this,ya).getMutationCache().build(te(this,ya),this.options)),te(this,cr).addObserver(this),te(this,cr).execute(n)}},ya=new WeakMap,vo=new WeakMap,cr=new WeakMap,ba=new WeakMap,Ea=new WeakSet,Kh=function(){var i;const n=((i=te(this,cr))==null?void 0:i.state)??O$();Te(this,vo,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},F0=function(n){bn.batch(()=>{var i,o,s,u,c,f,d,m;if(te(this,ba)&&this.hasListeners()){const p=te(this,vo).variables,y=te(this,vo).context,S={client:te(this,ya),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(i=te(this,ba)).onSuccess)==null||o.call(i,n.data,p,y,S)}catch(g){Promise.reject(g)}try{(u=(s=te(this,ba)).onSettled)==null||u.call(s,n.data,null,p,y,S)}catch(g){Promise.reject(g)}}else if((n==null?void 0:n.type)==="error"){try{(f=(c=te(this,ba)).onError)==null||f.call(c,n.error,p,y,S)}catch(g){Promise.reject(g)}try{(m=(d=te(this,ba)).onSettled)==null||m.call(d,void 0,n.error,p,y,S)}catch(g){Promise.reject(g)}}}this.listeners.forEach(p=>{p(te(this,vo))})})},m$),Ti,g$,TP=(g$=class extends eu{constructor(t={}){super();Ne(this,Ti);this.config=t,Te(this,Ti,new Map)}build(t,n,i){const o=n.queryKey,s=n.queryHash??vb(o,n);let u=this.get(s);return u||(u=new wP({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:i,defaultOptions:t.getQueryDefaults(o)}),this.add(u)),u}add(t){te(this,Ti).has(t.queryHash)||(te(this,Ti).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=te(this,Ti).get(t.queryHash);n&&(t.destroy(),n===t&&te(this,Ti).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){bn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return te(this,Ti).get(t)}getAll(){return[...te(this,Ti).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(i=>QE(n,i))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(i=>QE(t,i)):n}notify(t){bn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){bn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){bn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ti=new WeakMap,g$),en,yo,bo,Bl,Vl,So,Hl,Kl,v$,ix=(v$=class{constructor(e={}){Ne(this,en);Ne(this,yo);Ne(this,bo);Ne(this,Bl);Ne(this,Vl);Ne(this,So);Ne(this,Hl);Ne(this,Kl);Te(this,en,e.queryCache||new TP),Te(this,yo,e.mutationCache||new AP),Te(this,bo,e.defaultOptions||{}),Te(this,Bl,new Map),Te(this,Vl,new Map),Te(this,So,0)}mount(){Bd(this,So)._++,te(this,So)===1&&(Te(this,Hl,Sb.subscribe(async e=>{e&&(await this.resumePausedMutations(),te(this,en).onFocus())})),Te(this,Kl,fp.subscribe(async e=>{e&&(await this.resumePausedMutations(),te(this,en).onOnline())})))}unmount(){var e,t;Bd(this,So)._--,te(this,So)===0&&((e=te(this,Hl))==null||e.call(this),Te(this,Hl,void 0),(t=te(this,Kl))==null||t.call(this),Te(this,Kl,void 0))}isFetching(e){return te(this,en).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return te(this,yo).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=te(this,en).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=te(this,en).build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Eo(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return te(this,en).findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),o=te(this,en).get(i.queryHash),s=o==null?void 0:o.state.data,u=cP(t,s);if(u!==void 0)return te(this,en).build(this,i).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return bn.batch(()=>te(this,en).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=te(this,en).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=te(this,en);bn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=te(this,en);return bn.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=bn.batch(()=>te(this,en).findAll(e).map(o=>o.cancel(n)));return Promise.all(i).then(Zn).catch(Zn)}invalidateQueries(e,t={}){return bn.batch(()=>(te(this,en).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=bn.batch(()=>te(this,en).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Zn)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(Zn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=te(this,en).build(this,t);return n.isStaleByTime(Eo(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zn).catch(Zn)}fetchInfiniteQuery(e){return e.behavior=nx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zn).catch(Zn)}ensureInfiniteQueryData(e){return e.behavior=nx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return fp.isOnline()?te(this,yo).resumePausedMutations():Promise.resolve()}getQueryCache(){return te(this,en)}getMutationCache(){return te(this,yo)}getDefaultOptions(){return te(this,bo)}setDefaultOptions(e){Te(this,bo,e)}setQueryDefaults(e,t){te(this,Bl).set(xs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...te(this,Bl).values()],n={};return t.forEach(i=>{kc(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){te(this,Vl).set(xs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...te(this,Vl).values()],n={};return t.forEach(i=>{kc(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...te(this,bo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=vb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===yb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...te(this,bo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){te(this,en).clear(),te(this,yo).clear()}},en=new WeakMap,yo=new WeakMap,bo=new WeakMap,Bl=new WeakMap,Vl=new WeakMap,So=new WeakMap,Hl=new WeakMap,Kl=new WeakMap,v$),A$=z.createContext(void 0),Oa=e=>{const t=z.useContext(A$);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},MP=({client:e,children:t})=>(z.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),N.jsx(A$.Provider,{value:e,children:t})),$$=z.createContext(!1),DP=()=>z.useContext($$);$$.Provider;function jP(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var NP=z.createContext(jP()),PP=()=>z.useContext(NP),IP=(e,t,n)=>{const i=n!=null&&n.state.error&&typeof e.throwOnError=="function"?bb(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},zP=e=>{z.useEffect(()=>{e.clearReset()},[e])},FP=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(o&&e.data===void 0||bb(n,[e.error,i])),kP=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...o)=>n(i(...o)):n(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},LP=(e,t)=>e.isLoading&&e.isFetching&&!t,qP=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ax=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function UP(e,t,n){var y,S,g,b;const i=DP(),o=PP(),s=Oa(),u=s.defaultQueryOptions(e);(S=(y=s.getDefaultOptions().queries)==null?void 0:y._experimental_beforeQuery)==null||S.call(y,u);const c=s.getQueryCache().get(u.queryHash);u._optimisticResults=i?"isRestoring":"optimistic",kP(u),IP(u,o,c),zP(o);const f=!s.getQueryCache().get(u.queryHash),[d]=z.useState(()=>new t(s,u)),m=d.getOptimisticResult(u),p=!i&&e.subscribed!==!1;if(z.useSyncExternalStore(z.useCallback(v=>{const _=p?d.subscribe(bn.batchCalls(v)):Zn;return d.updateResult(),_},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),z.useEffect(()=>{d.setOptions(u)},[u,d]),qP(u,m))throw ax(u,d,o);if(FP({result:m,errorResetBoundary:o,throwOnError:u.throwOnError,query:c,suspense:u.suspense}))throw m.error;if((b=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||b.call(g,u,m),u.experimental_prefetchInRender&&!Es&&LP(m,i)){const v=f?ax(u,d,o):c==null?void 0:c.promise;v==null||v.catch(Zn).finally(()=>{d.updateResult()})}return u.notifyOnChangeProps?m:d.trackResult(m)}function tu(e,t){return UP(e,EP)}function pi(e,t){const n=Oa(),[i]=z.useState(()=>new $P(n,e));z.useEffect(()=>{i.setOptions(e)},[i,e]);const o=z.useSyncExternalStore(z.useCallback(u=>i.subscribe(bn.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),s=z.useCallback((u,c)=>{i.mutate(u,c).catch(Zn)},[i]);if(o.error&&bb(i.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}var T$=typeof global=="object"&&global&&global.Object===Object&&global,BP=typeof self=="object"&&self&&self.Object===Object&&self,Li=T$||BP||Function("return this")(),Gr=Li.Symbol,M$=Object.prototype,VP=M$.hasOwnProperty,HP=M$.toString,fc=Gr?Gr.toStringTag:void 0;function KP(e){var t=VP.call(e,fc),n=e[fc];try{e[fc]=void 0;var i=!0}catch{}var o=HP.call(e);return i&&(t?e[fc]=n:delete e[fc]),o}var GP=Object.prototype,QP=GP.toString;function YP(e){return QP.call(e)}var WP="[object Null]",XP="[object Undefined]",ox=Gr?Gr.toStringTag:void 0;function Aa(e){return e==null?e===void 0?XP:WP:ox&&ox in Object(e)?KP(e):YP(e)}function pt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var JP="[object AsyncFunction]",ZP="[object Function]",eI="[object GeneratorFunction]",tI="[object Proxy]";function lf(e){if(!pt(e))return!1;var t=Aa(e);return t==ZP||t==eI||t==JP||t==tI}var _v=Li["__core-js_shared__"],sx=(function(){var e=/[^.]+$/.exec(_v&&_v.keys&&_v.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function nI(e){return!!sx&&sx in e}var rI=Function.prototype,iI=rI.toString;function As(e){if(e!=null){try{return iI.call(e)}catch{}try{return e+""}catch{}}return""}var aI=/[\\^$.*+?()[\]{}|]/g,oI=/^\[object .+?Constructor\]$/,sI=Function.prototype,lI=Object.prototype,uI=sI.toString,cI=lI.hasOwnProperty,fI=RegExp("^"+uI.call(cI).replace(aI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function dI(e){if(!pt(e)||nI(e))return!1;var t=lf(e)?fI:oI;return t.test(As(e))}function hI(e,t){return e==null?void 0:e[t]}function $s(e,t){var n=hI(e,t);return dI(n)?n:void 0}var Lc=$s(Object,"create");function pI(){this.__data__=Lc?Lc(null):{},this.size=0}function mI(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var gI="__lodash_hash_undefined__",vI=Object.prototype,yI=vI.hasOwnProperty;function bI(e){var t=this.__data__;if(Lc){var n=t[e];return n===gI?void 0:n}return yI.call(t,e)?t[e]:void 0}var SI=Object.prototype,_I=SI.hasOwnProperty;function wI(e){var t=this.__data__;return Lc?t[e]!==void 0:_I.call(t,e)}var EI="__lodash_hash_undefined__";function xI(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Lc&&t===void 0?EI:t,this}function Cs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Cs.prototype.clear=pI;Cs.prototype.delete=mI;Cs.prototype.get=bI;Cs.prototype.has=wI;Cs.prototype.set=xI;function CI(){this.__data__=[],this.size=0}function uf(e,t){return e===t||e!==e&&t!==t}function Tp(e,t){for(var n=e.length;n--;)if(uf(e[n][0],t))return n;return-1}var RI=Array.prototype,OI=RI.splice;function AI(e){var t=this.__data__,n=Tp(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():OI.call(t,n,1),--this.size,!0}function $I(e){var t=this.__data__,n=Tp(t,e);return n<0?void 0:t[n][1]}function TI(e){return Tp(this.__data__,e)>-1}function MI(e,t){var n=this.__data__,i=Tp(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}function $a(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}$a.prototype.clear=CI;$a.prototype.delete=AI;$a.prototype.get=$I;$a.prototype.has=TI;$a.prototype.set=MI;var qc=$s(Li,"Map");function DI(){this.size=0,this.__data__={hash:new Cs,map:new(qc||$a),string:new Cs}}function jI(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Mp(e,t){var n=e.__data__;return jI(t)?n[typeof t=="string"?"string":"hash"]:n.map}function NI(e){var t=Mp(this,e).delete(e);return this.size-=t?1:0,t}function PI(e){return Mp(this,e).get(e)}function II(e){return Mp(this,e).has(e)}function zI(e,t){var n=Mp(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}function Ta(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Ta.prototype.clear=DI;Ta.prototype.delete=NI;Ta.prototype.get=PI;Ta.prototype.has=II;Ta.prototype.set=zI;var FI="__lodash_hash_undefined__";function kI(e){return this.__data__.set(e,FI),this}function LI(e){return this.__data__.has(e)}function Rs(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ta;++t<n;)this.add(e[t])}Rs.prototype.add=Rs.prototype.push=kI;Rs.prototype.has=LI;function qI(e,t,n,i){for(var o=e.length,s=n+-1;++s<o;)if(t(e[s],s,e))return s;return-1}function UI(e){return e!==e}function BI(e,t,n){for(var i=n-1,o=e.length;++i<o;)if(e[i]===t)return i;return-1}function D$(e,t,n){return t===t?BI(e,t,n):qI(e,UI,n)}function wb(e,t){var n=e==null?0:e.length;return!!n&&D$(e,t,0)>-1}function j$(e,t,n){for(var i=-1,o=e==null?0:e.length;++i<o;)if(n(t,e[i]))return!0;return!1}function nu(e,t){for(var n=-1,i=e==null?0:e.length,o=Array(i);++n<i;)o[n]=t(e[n],n,e);return o}function Eb(e){return function(t){return e(t)}}function Uc(e,t){return e.has(t)}var VI=200;function N$(e,t,n,i){var o=-1,s=wb,u=!0,c=e.length,f=[],d=t.length;if(!c)return f;i?(s=j$,u=!1):t.length>=VI&&(s=Uc,u=!1,t=new Rs(t));e:for(;++o<c;){var m=e[o],p=m;if(m=i||m!==0?m:0,u&&p===p){for(var y=d;y--;)if(t[y]===p)continue e;f.push(m)}else s(t,p,i)||f.push(m)}return f}function xb(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e}function Qr(e){return e!=null&&typeof e=="object"}var HI="[object Arguments]";function lx(e){return Qr(e)&&Aa(e)==HI}var P$=Object.prototype,KI=P$.hasOwnProperty,GI=P$.propertyIsEnumerable,Gl=lx((function(){return arguments})())?lx:function(e){return Qr(e)&&KI.call(e,"callee")&&!GI.call(e,"callee")},Sn=Array.isArray,ux=Gr?Gr.isConcatSpreadable:void 0;function QI(e){return Sn(e)||Gl(e)||!!(ux&&e&&e[ux])}function Ts(e,t,n,i,o){var s=-1,u=e.length;for(n||(n=QI),o||(o=[]);++s<u;){var c=e[s];t>0&&n(c)?t>1?Ts(c,t-1,n,i,o):xb(o,c):i||(o[o.length]=c)}return o}function Dp(e){return e}function YI(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var cx=Math.max;function I$(e,t,n){return t=cx(t===void 0?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=cx(i.length-t,0),u=Array(s);++o<s;)u[o]=i[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=i[o];return c[t]=n(u),YI(e,this,c)}}function WI(e){return function(){return e}}var dp=(function(){try{var e=$s(Object,"defineProperty");return e({},"",{}),e}catch{}})(),XI=dp?function(e,t){return dp(e,"toString",{configurable:!0,enumerable:!1,value:WI(t),writable:!0})}:Dp,JI=800,ZI=16,ez=Date.now;function tz(e){var t=0,n=0;return function(){var i=ez(),o=ZI-(i-n);if(n=i,o>0){if(++t>=JI)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var z$=tz(XI);function ru(e,t){return z$(I$(e,t,Dp),e+"")}var nz=9007199254740991;function Cb(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=nz}function Ms(e){return e!=null&&Cb(e.length)&&!lf(e)}function _a(e){return Qr(e)&&Ms(e)}function jp(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var hp=ru(function(e,t){var n=jp(t);return _a(n)&&(n=void 0),_a(e)?N$(e,Ts(t,1,_a,!0),void 0,n):[]}),Dl=$s(Li,"Set");function Gh(){}function Rb(e){var t=-1,n=Array(e.size);return e.forEach(function(i){n[++t]=i}),n}var rz=1/0,iz=Dl&&1/Rb(new Dl([,-0]))[1]==rz?function(e){return new Dl(e)}:Gh,az=200;function Ob(e,t,n){var i=-1,o=wb,s=e.length,u=!0,c=[],f=c;if(n)u=!1,o=j$;else if(s>=az){var d=iz(e);if(d)return Rb(d);u=!1,o=Uc,f=new Rs}else f=c;e:for(;++i<s;){var m=e[i],p=m;if(m=n||m!==0?m:0,u&&p===p){for(var y=f.length;y--;)if(f[y]===p)continue e;c.push(m)}else o(f,p,n)||(f!==c&&f.push(p),c.push(m))}return c}var F$=ru(function(e){var t=jp(e);return t=typeof t=="function"?t:void 0,Ob(Ts(e,1,_a,!0),void 0,t)}),wv,fx;function iu(){return fx||(fx=1,wv=TypeError),wv}const oz={},sz=Object.freeze(Object.defineProperty({__proto__:null,default:oz},Symbol.toStringTag,{value:"Module"})),lz=y$(sz);var Ev,dx;function Np(){if(dx)return Ev;dx=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,i=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,s=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=o&&s&&typeof s.get=="function"?s.get:null,c=o&&Set.prototype.forEach,f=typeof WeakMap=="function"&&WeakMap.prototype,d=f?WeakMap.prototype.has:null,m=typeof WeakSet=="function"&&WeakSet.prototype,p=m?WeakSet.prototype.has:null,y=typeof WeakRef=="function"&&WeakRef.prototype,S=y?WeakRef.prototype.deref:null,g=Boolean.prototype.valueOf,b=Object.prototype.toString,v=Function.prototype.toString,_=String.prototype.match,x=String.prototype.slice,E=String.prototype.replace,R=String.prototype.toUpperCase,C=String.prototype.toLowerCase,$=RegExp.prototype.test,A=Array.prototype.concat,T=Array.prototype.join,M=Array.prototype.slice,D=Math.floor,j=typeof BigInt=="function"?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,K=typeof Symbol=="function"&&typeof Symbol.iterator=="object",G=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===K||!0)?Symbol.toStringTag:null,q=Object.prototype.propertyIsEnumerable,Q=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(de){return de.__proto__}:null);function W(de,ve){if(de===1/0||de===-1/0||de!==de||de&&de>-1e3&&de<1e3||$.call(/e/,ve))return ve;var ot=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof de=="number"){var xt=de<0?-D(-de):D(de);if(xt!==de){var mt=String(xt),Be=x.call(ve,mt.length+1);return E.call(mt,ot,"$&_")+"."+E.call(E.call(Be,/([0-9]{3})/g,"$&_"),/_$/,"")}}return E.call(ve,ot,"$&_")}var ne=lz,X=ne.custom,P=ae(X)?X:null,B={__proto__:null,double:'"',single:"'"},U={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Ev=function de(ve,ot,xt,mt){var Be=ot||{};if(Oe(Be,"quoteStyle")&&!Oe(B,Be.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Oe(Be,"maxStringLength")&&(typeof Be.maxStringLength=="number"?Be.maxStringLength<0&&Be.maxStringLength!==1/0:Be.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Ct=Oe(Be,"customInspect")?Be.customInspect:!0;if(typeof Ct!="boolean"&&Ct!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Oe(Be,"indent")&&Be.indent!==null&&Be.indent!==" "&&!(parseInt(Be.indent,10)===Be.indent&&Be.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Oe(Be,"numericSeparator")&&typeof Be.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Tt=Be.numericSeparator;if(typeof ve>"u")return"undefined";if(ve===null)return"null";if(typeof ve=="boolean")return ve?"true":"false";if(typeof ve=="string")return Je(ve,Be);if(typeof ve=="number"){if(ve===0)return 1/0/ve>0?"0":"-0";var gt=String(ve);return Tt?W(ve,gt):gt}if(typeof ve=="bigint"){var Yt=String(ve)+"n";return Tt?W(ve,Yt):Yt}var wn=typeof Be.depth>"u"?5:Be.depth;if(typeof xt>"u"&&(xt=0),xt>=wn&&wn>0&&typeof ve=="object")return le(ve)?"[Array]":"[Object]";var Wt=ln(Be,xt);if(typeof mt>"u")mt=[];else if(Ae(mt,ve)>=0)return"[Circular]";function Lt(qi,Si,Su){if(Si&&(mt=M.call(mt),mt.push(Si)),Su){var Ui={depth:Be.depth};return Oe(Be,"quoteStyle")&&(Ui.quoteStyle=Be.quoteStyle),de(qi,Ui,xt+1,mt)}return de(qi,Be,xt+1,mt)}if(typeof ve=="function"&&!se(ve)){var Hn=Ce(ve),Xt=mn(ve,Lt);return"[Function"+(Hn?": "+Hn:" (anonymous)")+"]"+(Xt.length>0?" { "+T.call(Xt,", ")+" }":"")}if(ae(ve)){var tr=K?E.call(String(ve),/^(Symbol\(.*\))_[^)]*$/,"$1"):L.call(ve);return typeof ve=="object"&&!K?wt(tr):tr}if(ke(ve)){for(var gn="<"+C.call(String(ve.nodeName)),kn=ve.attributes||[],nr=0;nr<kn.length;nr++)gn+=" "+kn[nr].name+"="+k(V(kn[nr].value),"double",Be);return gn+=">",ve.childNodes&&ve.childNodes.length&&(gn+="..."),gn+="</"+C.call(String(ve.nodeName))+">",gn}if(le(ve)){if(ve.length===0)return"[]";var hr=mn(ve,Lt);return Wt&&!At(hr)?"["+$t(hr,Wt)+"]":"[ "+T.call(hr,", ")+" ]"}if(fe(ve)){var Kn=mn(ve,Lt);return!("cause"in Error.prototype)&&"cause"in ve&&!q.call(ve,"cause")?"{ ["+String(ve)+"] "+T.call(A.call("[cause]: "+Lt(ve.cause),Kn),", ")+" }":Kn.length===0?"["+String(ve)+"]":"{ ["+String(ve)+"] "+T.call(Kn,", ")+" }"}if(typeof ve=="object"&&Ct){if(P&&typeof ve[P]=="function"&&ne)return ne(ve,{depth:wn-xt});if(Ct!=="symbol"&&typeof ve.inspect=="function")return ve.inspect()}if($e(ve)){var ei=[];return i&&i.call(ve,function(qi,Si){ei.push(Lt(Si,ve,!0)+" => "+Lt(qi,ve))}),He("Map",n.call(ve),ei,Wt)}if(je(ve)){var Gn=[];return c&&c.call(ve,function(qi){Gn.push(Lt(qi,ve))}),He("Set",u.call(ve),Gn,Wt)}if(Fe(ve))return tn("WeakMap");if(Ye(ve))return tn("WeakSet");if(Ie(ve))return tn("WeakRef");if(Z(ve))return wt(Lt(Number(ve)));if(Se(ve))return wt(Lt(j.call(ve)));if(ue(ve))return wt(g.call(ve));if(Y(ve))return wt(Lt(String(ve)));if(typeof window<"u"&&ve===window)return"{ [object Window] }";if(typeof globalThis<"u"&&ve===globalThis||typeof PE<"u"&&ve===PE)return"{ [object globalThis] }";if(!ie(ve)&&!se(ve)){var nn=mn(ve,Lt),An=Q?Q(ve)===Object.prototype:ve instanceof Object||ve.constructor===Object,bi=ve instanceof Object?"":"null prototype",Ls=!An&&G&&Object(ve)===ve&&G in ve?x.call(Re(ve),8,-1):bi?"Object":"",om=An||typeof ve.constructor!="function"?"":ve.constructor.name?ve.constructor.name+" ":"",bu=om+(Ls||bi?"["+T.call(A.call([],Ls||[],bi||[]),": ")+"] ":"");return nn.length===0?bu+"{}":Wt?bu+"{"+$t(nn,Wt)+"}":bu+"{ "+T.call(nn,", ")+" }"}return String(ve)};function k(de,ve,ot){var xt=ot.quoteStyle||ve,mt=B[xt];return mt+de+mt}function V(de){return E.call(String(de),/"/g,""")}function J(de){return!G||!(typeof de=="object"&&(G in de||typeof de[G]<"u"))}function le(de){return Re(de)==="[object Array]"&&J(de)}function ie(de){return Re(de)==="[object Date]"&&J(de)}function se(de){return Re(de)==="[object RegExp]"&&J(de)}function fe(de){return Re(de)==="[object Error]"&&J(de)}function Y(de){return Re(de)==="[object String]"&&J(de)}function Z(de){return Re(de)==="[object Number]"&&J(de)}function ue(de){return Re(de)==="[object Boolean]"&&J(de)}function ae(de){if(K)return de&&typeof de=="object"&&de instanceof Symbol;if(typeof de=="symbol")return!0;if(!de||typeof de!="object"||!L)return!1;try{return L.call(de),!0}catch{}return!1}function Se(de){if(!de||typeof de!="object"||!j)return!1;try{return j.call(de),!0}catch{}return!1}var ye=Object.prototype.hasOwnProperty||function(de){return de in this};function Oe(de,ve){return ye.call(de,ve)}function Re(de){return b.call(de)}function Ce(de){if(de.name)return de.name;var ve=_.call(v.call(de),/^function\s*([\w$]+)/);return ve?ve[1]:null}function Ae(de,ve){if(de.indexOf)return de.indexOf(ve);for(var ot=0,xt=de.length;ot<xt;ot++)if(de[ot]===ve)return ot;return-1}function $e(de){if(!n||!de||typeof de!="object")return!1;try{n.call(de);try{u.call(de)}catch{return!0}return de instanceof Map}catch{}return!1}function Fe(de){if(!d||!de||typeof de!="object")return!1;try{d.call(de,d);try{p.call(de,p)}catch{return!0}return de instanceof WeakMap}catch{}return!1}function Ie(de){if(!S||!de||typeof de!="object")return!1;try{return S.call(de),!0}catch{}return!1}function je(de){if(!u||!de||typeof de!="object")return!1;try{u.call(de);try{n.call(de)}catch{return!0}return de instanceof Set}catch{}return!1}function Ye(de){if(!p||!de||typeof de!="object")return!1;try{p.call(de,p);try{d.call(de,d)}catch{return!0}return de instanceof WeakSet}catch{}return!1}function ke(de){return!de||typeof de!="object"?!1:typeof HTMLElement<"u"&&de instanceof HTMLElement?!0:typeof de.nodeName=="string"&&typeof de.getAttribute=="function"}function Je(de,ve){if(de.length>ve.maxStringLength){var ot=de.length-ve.maxStringLength,xt="... "+ot+" more character"+(ot>1?"s":"");return Je(x.call(de,0,ve.maxStringLength),ve)+xt}var mt=U[ve.quoteStyle||"single"];mt.lastIndex=0;var Be=E.call(E.call(de,mt,"\\$1"),/[\x00-\x1f]/g,tt);return k(Be,"single",ve)}function tt(de){var ve=de.charCodeAt(0),ot={8:"b",9:"t",10:"n",12:"f",13:"r"}[ve];return ot?"\\"+ot:"\\x"+(ve<16?"0":"")+R.call(ve.toString(16))}function wt(de){return"Object("+de+")"}function tn(de){return de+" { ? }"}function He(de,ve,ot,xt){var mt=xt?$t(ot,xt):T.call(ot,", ");return de+" ("+ve+") {"+mt+"}"}function At(de){for(var ve=0;ve<de.length;ve++)if(Ae(de[ve],`
|
|
58
|
-
`)>=0)return!1;return!0}function ln(de,ve){var ot;if(de.indent===" ")ot=" ";else if(typeof de.indent=="number"&&de.indent>0)ot=T.call(Array(de.indent+1)," ");else return null;return{base:ot,prev:T.call(Array(ve+1),ot)}}function $t(de,ve){if(de.length===0)return"";var ot=`
|
|
59
|
-
`+ve.prev+ve.base;return ot+T.call(de,","+ot)+`
|
|
60
|
-
`+ve.prev}function mn(de,ve){var ot=le(de),xt=[];if(ot){xt.length=de.length;for(var mt=0;mt<de.length;mt++)xt[mt]=Oe(de,mt)?ve(de[mt],de):""}var Be=typeof I=="function"?I(de):[],Ct;if(K){Ct={};for(var Tt=0;Tt<Be.length;Tt++)Ct["$"+Be[Tt]]=Be[Tt]}for(var gt in de)Oe(de,gt)&&(ot&&String(Number(gt))===gt&><de.length||K&&Ct["$"+gt]instanceof Symbol||($.call(/[^\w$]/,gt)?xt.push(ve(gt,de)+": "+ve(de[gt],de)):xt.push(gt+": "+ve(de[gt],de))));if(typeof I=="function")for(var Yt=0;Yt<Be.length;Yt++)q.call(de,Be[Yt])&&xt.push("["+ve(Be[Yt])+"]: "+ve(de[Be[Yt]],de));return xt}return Ev}var xv,hx;function uz(){if(hx)return xv;hx=1;var e=Np(),t=iu(),n=function(c,f,d){for(var m=c,p;(p=m.next)!=null;m=p)if(p.key===f)return m.next=p.next,d||(p.next=c.next,c.next=p),p},i=function(c,f){if(c){var d=n(c,f);return d&&d.value}},o=function(c,f,d){var m=n(c,f);m?m.value=d:c.next={key:f,next:c.next,value:d}},s=function(c,f){return c?!!n(c,f):!1},u=function(c,f){if(c)return n(c,f,!0)};return xv=function(){var f,d={assert:function(m){if(!d.has(m))throw new t("Side channel does not contain "+e(m))},delete:function(m){var p=f&&f.next,y=u(f,m);return y&&p&&p===y&&(f=void 0),!!y},get:function(m){return i(f,m)},has:function(m){return s(f,m)},set:function(m,p){f||(f={next:void 0}),o(f,m,p)}};return d},xv}var Cv,px;function k$(){return px||(px=1,Cv=Object),Cv}var Rv,mx;function cz(){return mx||(mx=1,Rv=Error),Rv}var Ov,gx;function fz(){return gx||(gx=1,Ov=EvalError),Ov}var Av,vx;function dz(){return vx||(vx=1,Av=RangeError),Av}var $v,yx;function hz(){return yx||(yx=1,$v=ReferenceError),$v}var Tv,bx;function pz(){return bx||(bx=1,Tv=SyntaxError),Tv}var Mv,Sx;function mz(){return Sx||(Sx=1,Mv=URIError),Mv}var Dv,_x;function gz(){return _x||(_x=1,Dv=Math.abs),Dv}var jv,wx;function vz(){return wx||(wx=1,jv=Math.floor),jv}var Nv,Ex;function yz(){return Ex||(Ex=1,Nv=Math.max),Nv}var Pv,xx;function bz(){return xx||(xx=1,Pv=Math.min),Pv}var Iv,Cx;function Sz(){return Cx||(Cx=1,Iv=Math.pow),Iv}var zv,Rx;function _z(){return Rx||(Rx=1,zv=Math.round),zv}var Fv,Ox;function wz(){return Ox||(Ox=1,Fv=Number.isNaN||function(t){return t!==t}),Fv}var kv,Ax;function Ez(){if(Ax)return kv;Ax=1;var e=wz();return kv=function(n){return e(n)||n===0?n:n<0?-1:1},kv}var Lv,$x;function xz(){return $x||($x=1,Lv=Object.getOwnPropertyDescriptor),Lv}var qv,Tx;function L$(){if(Tx)return qv;Tx=1;var e=xz();if(e)try{e([],"length")}catch{e=null}return qv=e,qv}var Uv,Mx;function Cz(){if(Mx)return Uv;Mx=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Uv=e,Uv}var Bv,Dx;function Rz(){return Dx||(Dx=1,Bv=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),i=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var s in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var u=Object.getOwnPropertySymbols(t);if(u.length!==1||u[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(t,n);if(c.value!==o||c.enumerable!==!0)return!1}return!0}),Bv}var Vv,jx;function Oz(){if(jx)return Vv;jx=1;var e=typeof Symbol<"u"&&Symbol,t=Rz();return Vv=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Vv}var Hv,Nx;function q$(){return Nx||(Nx=1,Hv=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Hv}var Kv,Px;function U$(){if(Px)return Kv;Px=1;var e=k$();return Kv=e.getPrototypeOf||null,Kv}var Gv,Ix;function Az(){if(Ix)return Gv;Ix=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,i="[object Function]",o=function(f,d){for(var m=[],p=0;p<f.length;p+=1)m[p]=f[p];for(var y=0;y<d.length;y+=1)m[y+f.length]=d[y];return m},s=function(f,d){for(var m=[],p=d,y=0;p<f.length;p+=1,y+=1)m[y]=f[p];return m},u=function(c,f){for(var d="",m=0;m<c.length;m+=1)d+=c[m],m+1<c.length&&(d+=f);return d};return Gv=function(f){var d=this;if(typeof d!="function"||t.apply(d)!==i)throw new TypeError(e+d);for(var m=s(arguments,1),p,y=function(){if(this instanceof p){var _=d.apply(this,o(m,arguments));return Object(_)===_?_:this}return d.apply(f,o(m,arguments))},S=n(0,d.length-m.length),g=[],b=0;b<S;b++)g[b]="$"+b;if(p=Function("binder","return function ("+u(g,",")+"){ return binder.apply(this,arguments); }")(y),d.prototype){var v=function(){};v.prototype=d.prototype,p.prototype=new v,v.prototype=null}return p},Gv}var Qv,zx;function Pp(){if(zx)return Qv;zx=1;var e=Az();return Qv=Function.prototype.bind||e,Qv}var Yv,Fx;function Ab(){return Fx||(Fx=1,Yv=Function.prototype.call),Yv}var Wv,kx;function B$(){return kx||(kx=1,Wv=Function.prototype.apply),Wv}var Xv,Lx;function $z(){return Lx||(Lx=1,Xv=typeof Reflect<"u"&&Reflect&&Reflect.apply),Xv}var Jv,qx;function Tz(){if(qx)return Jv;qx=1;var e=Pp(),t=B$(),n=Ab(),i=$z();return Jv=i||e.call(n,t),Jv}var Zv,Ux;function V$(){if(Ux)return Zv;Ux=1;var e=Pp(),t=iu(),n=Ab(),i=Tz();return Zv=function(s){if(s.length<1||typeof s[0]!="function")throw new t("a function is required");return i(e,n,s)},Zv}var ey,Bx;function Mz(){if(Bx)return ey;Bx=1;var e=V$(),t=L$(),n;try{n=[].__proto__===Array.prototype}catch(u){if(!u||typeof u!="object"||!("code"in u)||u.code!=="ERR_PROTO_ACCESS")throw u}var i=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,s=o.getPrototypeOf;return ey=i&&typeof i.get=="function"?e([i.get]):typeof s=="function"?function(c){return s(c==null?c:o(c))}:!1,ey}var ty,Vx;function Dz(){if(Vx)return ty;Vx=1;var e=q$(),t=U$(),n=Mz();return ty=e?function(o){return e(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:n?function(o){return n(o)}:null,ty}var ny,Hx;function jz(){if(Hx)return ny;Hx=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Pp();return ny=n.call(e,t),ny}var ry,Kx;function $b(){if(Kx)return ry;Kx=1;var e,t=k$(),n=cz(),i=fz(),o=dz(),s=hz(),u=pz(),c=iu(),f=mz(),d=gz(),m=vz(),p=yz(),y=bz(),S=Sz(),g=_z(),b=Ez(),v=Function,_=function(se){try{return v('"use strict"; return ('+se+").constructor;")()}catch{}},x=L$(),E=Cz(),R=function(){throw new c},C=x?(function(){try{return arguments.callee,R}catch{try{return x(arguments,"callee").get}catch{return R}}})():R,$=Oz()(),A=Dz(),T=U$(),M=q$(),D=B$(),j=Ab(),I={},L=typeof Uint8Array>"u"||!A?e:A(Uint8Array),K={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":$&&A?A([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":I,"%AsyncGenerator%":I,"%AsyncGeneratorFunction%":I,"%AsyncIteratorPrototype%":I,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":i,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":I,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$&&A?A(A([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!$||!A?e:A(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!$||!A?e:A(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$&&A?A(""[Symbol.iterator]()):e,"%Symbol%":$?Symbol:e,"%SyntaxError%":u,"%ThrowTypeError%":C,"%TypedArray%":L,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":f,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":j,"%Function.prototype.apply%":D,"%Object.defineProperty%":E,"%Object.getPrototypeOf%":T,"%Math.abs%":d,"%Math.floor%":m,"%Math.max%":p,"%Math.min%":y,"%Math.pow%":S,"%Math.round%":g,"%Math.sign%":b,"%Reflect.getPrototypeOf%":M};if(A)try{null.error}catch(se){var G=A(A(se));K["%Error.prototype%"]=G}var q=function se(fe){var Y;if(fe==="%AsyncFunction%")Y=_("async function () {}");else if(fe==="%GeneratorFunction%")Y=_("function* () {}");else if(fe==="%AsyncGeneratorFunction%")Y=_("async function* () {}");else if(fe==="%AsyncGenerator%"){var Z=se("%AsyncGeneratorFunction%");Z&&(Y=Z.prototype)}else if(fe==="%AsyncIteratorPrototype%"){var ue=se("%AsyncGenerator%");ue&&A&&(Y=A(ue.prototype))}return K[fe]=Y,Y},Q={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},W=Pp(),ne=jz(),X=W.call(j,Array.prototype.concat),P=W.call(D,Array.prototype.splice),B=W.call(j,String.prototype.replace),U=W.call(j,String.prototype.slice),k=W.call(j,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,J=/\\(\\)?/g,le=function(fe){var Y=U(fe,0,1),Z=U(fe,-1);if(Y==="%"&&Z!=="%")throw new u("invalid intrinsic syntax, expected closing `%`");if(Z==="%"&&Y!=="%")throw new u("invalid intrinsic syntax, expected opening `%`");var ue=[];return B(fe,V,function(ae,Se,ye,Oe){ue[ue.length]=ye?B(Oe,J,"$1"):Se||ae}),ue},ie=function(fe,Y){var Z=fe,ue;if(ne(Q,Z)&&(ue=Q[Z],Z="%"+ue[0]+"%"),ne(K,Z)){var ae=K[Z];if(ae===I&&(ae=q(Z)),typeof ae>"u"&&!Y)throw new c("intrinsic "+fe+" exists, but is not available. Please file an issue!");return{alias:ue,name:Z,value:ae}}throw new u("intrinsic "+fe+" does not exist!")};return ry=function(fe,Y){if(typeof fe!="string"||fe.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Y!="boolean")throw new c('"allowMissing" argument must be a boolean');if(k(/^%?[^%]*%?$/,fe)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Z=le(fe),ue=Z.length>0?Z[0]:"",ae=ie("%"+ue+"%",Y),Se=ae.name,ye=ae.value,Oe=!1,Re=ae.alias;Re&&(ue=Re[0],P(Z,X([0,1],Re)));for(var Ce=1,Ae=!0;Ce<Z.length;Ce+=1){var $e=Z[Ce],Fe=U($e,0,1),Ie=U($e,-1);if((Fe==='"'||Fe==="'"||Fe==="`"||Ie==='"'||Ie==="'"||Ie==="`")&&Fe!==Ie)throw new u("property names with quotes must have matching quotes");if(($e==="constructor"||!Ae)&&(Oe=!0),ue+="."+$e,Se="%"+ue+"%",ne(K,Se))ye=K[Se];else if(ye!=null){if(!($e in ye)){if(!Y)throw new c("base intrinsic for "+fe+" exists, but the property is not available.");return}if(x&&Ce+1>=Z.length){var je=x(ye,$e);Ae=!!je,Ae&&"get"in je&&!("originalValue"in je.get)?ye=je.get:ye=ye[$e]}else Ae=ne(ye,$e),ye=ye[$e];Ae&&!Oe&&(K[Se]=ye)}}return ye},ry}var iy,Gx;function H$(){if(Gx)return iy;Gx=1;var e=$b(),t=V$(),n=t([e("%String.prototype.indexOf%")]);return iy=function(o,s){var u=e(o,!!s);return typeof u=="function"&&n(o,".prototype.")>-1?t([u]):u},iy}var ay,Qx;function K$(){if(Qx)return ay;Qx=1;var e=$b(),t=H$(),n=Np(),i=iu(),o=e("%Map%",!0),s=t("Map.prototype.get",!0),u=t("Map.prototype.set",!0),c=t("Map.prototype.has",!0),f=t("Map.prototype.delete",!0),d=t("Map.prototype.size",!0);return ay=!!o&&function(){var p,y={assert:function(S){if(!y.has(S))throw new i("Side channel does not contain "+n(S))},delete:function(S){if(p){var g=f(p,S);return d(p)===0&&(p=void 0),g}return!1},get:function(S){if(p)return s(p,S)},has:function(S){return p?c(p,S):!1},set:function(S,g){p||(p=new o),u(p,S,g)}};return y},ay}var oy,Yx;function Nz(){if(Yx)return oy;Yx=1;var e=$b(),t=H$(),n=Np(),i=K$(),o=iu(),s=e("%WeakMap%",!0),u=t("WeakMap.prototype.get",!0),c=t("WeakMap.prototype.set",!0),f=t("WeakMap.prototype.has",!0),d=t("WeakMap.prototype.delete",!0);return oy=s?function(){var p,y,S={assert:function(g){if(!S.has(g))throw new o("Side channel does not contain "+n(g))},delete:function(g){if(s&&g&&(typeof g=="object"||typeof g=="function")){if(p)return d(p,g)}else if(i&&y)return y.delete(g);return!1},get:function(g){return s&&g&&(typeof g=="object"||typeof g=="function")&&p?u(p,g):y&&y.get(g)},has:function(g){return s&&g&&(typeof g=="object"||typeof g=="function")&&p?f(p,g):!!y&&y.has(g)},set:function(g,b){s&&g&&(typeof g=="object"||typeof g=="function")?(p||(p=new s),c(p,g,b)):i&&(y||(y=i()),y.set(g,b))}};return S}:i,oy}var sy,Wx;function G$(){if(Wx)return sy;Wx=1;var e=iu(),t=Np(),n=uz(),i=K$(),o=Nz(),s=o||i||n;return sy=function(){var c,f={assert:function(d){if(!f.has(d))throw new e("Side channel does not contain "+t(d))},delete:function(d){return!!c&&c.delete(d)},get:function(d){return c&&c.get(d)},has:function(d){return!!c&&c.has(d)},set:function(d,m){c||(c=s()),c.set(d,m)}};return f},sy}var ly,Xx;function Tb(){if(Xx)return ly;Xx=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return ly={default:n.RFC3986,formatters:{RFC1738:function(i){return e.call(i,t,"+")},RFC3986:function(i){return String(i)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},ly}var uy,Jx;function Q$(){if(Jx)return uy;Jx=1;var e=Tb(),t=G$(),n=Object.prototype.hasOwnProperty,i=Array.isArray,o=t(),s=function(A,T){return o.set(A,T),A},u=function(A){return o.has(A)},c=function(A){return o.get(A)},f=function(A,T){o.set(A,T)},d=(function(){for(var $=[],A=0;A<256;++A)$.push("%"+((A<16?"0":"")+A.toString(16)).toUpperCase());return $})(),m=function(A){for(;A.length>1;){var T=A.pop(),M=T.obj[T.prop];if(i(M)){for(var D=[],j=0;j<M.length;++j)typeof M[j]<"u"&&D.push(M[j]);T.obj[T.prop]=D}}},p=function(A,T){for(var M=T&&T.plainObjects?{__proto__:null}:{},D=0;D<A.length;++D)typeof A[D]<"u"&&(M[D]=A[D]);return M},y=function $(A,T,M){if(!T)return A;if(typeof T!="object"&&typeof T!="function"){if(i(A))A.push(T);else if(A&&typeof A=="object")if(u(A)){var D=c(A)+1;A[D]=T,f(A,D)}else(M&&(M.plainObjects||M.allowPrototypes)||!n.call(Object.prototype,T))&&(A[T]=!0);else return[A,T];return A}if(!A||typeof A!="object"){if(u(T)){for(var j=Object.keys(T),I=M&&M.plainObjects?{__proto__:null,0:A}:{0:A},L=0;L<j.length;L++){var K=parseInt(j[L],10);I[K+1]=T[j[L]]}return s(I,c(T)+1)}return[A].concat(T)}var G=A;return i(A)&&!i(T)&&(G=p(A,M)),i(A)&&i(T)?(T.forEach(function(q,Q){if(n.call(A,Q)){var W=A[Q];W&&typeof W=="object"&&q&&typeof q=="object"?A[Q]=$(W,q,M):A.push(q)}else A[Q]=q}),A):Object.keys(T).reduce(function(q,Q){var W=T[Q];return n.call(q,Q)?q[Q]=$(q[Q],W,M):q[Q]=W,q},G)},S=function(A,T){return Object.keys(T).reduce(function(M,D){return M[D]=T[D],M},A)},g=function($,A,T){var M=$.replace(/\+/g," ");if(T==="iso-8859-1")return M.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(M)}catch{return M}},b=1024,v=function(A,T,M,D,j){if(A.length===0)return A;var I=A;if(typeof A=="symbol"?I=Symbol.prototype.toString.call(A):typeof A!="string"&&(I=String(A)),M==="iso-8859-1")return escape(I).replace(/%u[0-9a-f]{4}/gi,function(ne){return"%26%23"+parseInt(ne.slice(2),16)+"%3B"});for(var L="",K=0;K<I.length;K+=b){for(var G=I.length>=b?I.slice(K,K+b):I,q=[],Q=0;Q<G.length;++Q){var W=G.charCodeAt(Q);if(W===45||W===46||W===95||W===126||W>=48&&W<=57||W>=65&&W<=90||W>=97&&W<=122||j===e.RFC1738&&(W===40||W===41)){q[q.length]=G.charAt(Q);continue}if(W<128){q[q.length]=d[W];continue}if(W<2048){q[q.length]=d[192|W>>6]+d[128|W&63];continue}if(W<55296||W>=57344){q[q.length]=d[224|W>>12]+d[128|W>>6&63]+d[128|W&63];continue}Q+=1,W=65536+((W&1023)<<10|G.charCodeAt(Q)&1023),q[q.length]=d[240|W>>18]+d[128|W>>12&63]+d[128|W>>6&63]+d[128|W&63]}L+=q.join("")}return L},_=function(A){for(var T=[{obj:{o:A},prop:"o"}],M=[],D=0;D<T.length;++D)for(var j=T[D],I=j.obj[j.prop],L=Object.keys(I),K=0;K<L.length;++K){var G=L[K],q=I[G];typeof q=="object"&&q!==null&&M.indexOf(q)===-1&&(T.push({obj:I,prop:G}),M.push(q))}return m(T),A},x=function(A){return Object.prototype.toString.call(A)==="[object RegExp]"},E=function(A){return!A||typeof A!="object"?!1:!!(A.constructor&&A.constructor.isBuffer&&A.constructor.isBuffer(A))},R=function(A,T,M,D){if(u(A)){var j=c(A)+1;return A[j]=T,f(A,j),A}var I=[].concat(A,T);return I.length>M?s(p(I,{plainObjects:D}),I.length-1):I},C=function(A,T){if(i(A)){for(var M=[],D=0;D<A.length;D+=1)M.push(T(A[D]));return M}return T(A)};return uy={arrayToObject:p,assign:S,combine:R,compact:_,decode:g,encode:v,isBuffer:E,isOverflow:u,isRegExp:x,maybeMap:C,merge:y},uy}var cy,Zx;function Pz(){if(Zx)return cy;Zx=1;var e=G$(),t=Q$(),n=Tb(),i=Object.prototype.hasOwnProperty,o={brackets:function(v){return v+"[]"},comma:"comma",indices:function(v,_){return v+"["+_+"]"},repeat:function(v){return v}},s=Array.isArray,u=Array.prototype.push,c=function(b,v){u.apply(b,s(v)?v:[v])},f=Date.prototype.toISOString,d=n.default,m={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:n.formatters[d],indices:!1,serializeDate:function(v){return f.call(v)},skipNulls:!1,strictNullHandling:!1},p=function(v){return typeof v=="string"||typeof v=="number"||typeof v=="boolean"||typeof v=="symbol"||typeof v=="bigint"},y={},S=function b(v,_,x,E,R,C,$,A,T,M,D,j,I,L,K,G,q,Q){for(var W=v,ne=Q,X=0,P=!1;(ne=ne.get(y))!==void 0&&!P;){var B=ne.get(v);if(X+=1,typeof B<"u"){if(B===X)throw new RangeError("Cyclic object value");P=!0}typeof ne.get(y)>"u"&&(X=0)}if(typeof M=="function"?W=M(_,W):W instanceof Date?W=I(W):x==="comma"&&s(W)&&(W=t.maybeMap(W,function(Se){return Se instanceof Date?I(Se):Se})),W===null){if(C)return T&&!G?T(_,m.encoder,q,"key",L):_;W=""}if(p(W)||t.isBuffer(W)){if(T){var U=G?_:T(_,m.encoder,q,"key",L);return[K(U)+"="+K(T(W,m.encoder,q,"value",L))]}return[K(_)+"="+K(String(W))]}var k=[];if(typeof W>"u")return k;var V;if(x==="comma"&&s(W))G&&T&&(W=t.maybeMap(W,T)),V=[{value:W.length>0?W.join(",")||null:void 0}];else if(s(M))V=M;else{var J=Object.keys(W);V=D?J.sort(D):J}var le=A?String(_).replace(/\./g,"%2E"):String(_),ie=E&&s(W)&&W.length===1?le+"[]":le;if(R&&s(W)&&W.length===0)return ie+"[]";for(var se=0;se<V.length;++se){var fe=V[se],Y=typeof fe=="object"&&fe&&typeof fe.value<"u"?fe.value:W[fe];if(!($&&Y===null)){var Z=j&&A?String(fe).replace(/\./g,"%2E"):String(fe),ue=s(W)?typeof x=="function"?x(ie,Z):ie:ie+(j?"."+Z:"["+Z+"]");Q.set(v,X);var ae=e();ae.set(y,Q),c(k,b(Y,ue,x,E,R,C,$,A,x==="comma"&&G&&s(W)?null:T,M,D,j,I,L,K,G,q,ae))}}return k},g=function(v){if(!v)return m;if(typeof v.allowEmptyArrays<"u"&&typeof v.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof v.encodeDotInKeys<"u"&&typeof v.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(v.encoder!==null&&typeof v.encoder<"u"&&typeof v.encoder!="function")throw new TypeError("Encoder has to be a function.");var _=v.charset||m.charset;if(typeof v.charset<"u"&&v.charset!=="utf-8"&&v.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var x=n.default;if(typeof v.format<"u"){if(!i.call(n.formatters,v.format))throw new TypeError("Unknown format option provided.");x=v.format}var E=n.formatters[x],R=m.filter;(typeof v.filter=="function"||s(v.filter))&&(R=v.filter);var C;if(v.arrayFormat in o?C=v.arrayFormat:"indices"in v?C=v.indices?"indices":"repeat":C=m.arrayFormat,"commaRoundTrip"in v&&typeof v.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var $=typeof v.allowDots>"u"?v.encodeDotInKeys===!0?!0:m.allowDots:!!v.allowDots;return{addQueryPrefix:typeof v.addQueryPrefix=="boolean"?v.addQueryPrefix:m.addQueryPrefix,allowDots:$,allowEmptyArrays:typeof v.allowEmptyArrays=="boolean"?!!v.allowEmptyArrays:m.allowEmptyArrays,arrayFormat:C,charset:_,charsetSentinel:typeof v.charsetSentinel=="boolean"?v.charsetSentinel:m.charsetSentinel,commaRoundTrip:!!v.commaRoundTrip,delimiter:typeof v.delimiter>"u"?m.delimiter:v.delimiter,encode:typeof v.encode=="boolean"?v.encode:m.encode,encodeDotInKeys:typeof v.encodeDotInKeys=="boolean"?v.encodeDotInKeys:m.encodeDotInKeys,encoder:typeof v.encoder=="function"?v.encoder:m.encoder,encodeValuesOnly:typeof v.encodeValuesOnly=="boolean"?v.encodeValuesOnly:m.encodeValuesOnly,filter:R,format:x,formatter:E,serializeDate:typeof v.serializeDate=="function"?v.serializeDate:m.serializeDate,skipNulls:typeof v.skipNulls=="boolean"?v.skipNulls:m.skipNulls,sort:typeof v.sort=="function"?v.sort:null,strictNullHandling:typeof v.strictNullHandling=="boolean"?v.strictNullHandling:m.strictNullHandling}};return cy=function(b,v){var _=b,x=g(v),E,R;typeof x.filter=="function"?(R=x.filter,_=R("",_)):s(x.filter)&&(R=x.filter,E=R);var C=[];if(typeof _!="object"||_===null)return"";var $=o[x.arrayFormat],A=$==="comma"&&x.commaRoundTrip;E||(E=Object.keys(_)),x.sort&&E.sort(x.sort);for(var T=e(),M=0;M<E.length;++M){var D=E[M],j=_[D];x.skipNulls&&j===null||c(C,S(j,D,$,A,x.allowEmptyArrays,x.strictNullHandling,x.skipNulls,x.encodeDotInKeys,x.encode?x.encoder:null,x.filter,x.sort,x.allowDots,x.serializeDate,x.format,x.formatter,x.encodeValuesOnly,x.charset,T))}var I=C.join(x.delimiter),L=x.addQueryPrefix===!0?"?":"";return x.charsetSentinel&&(x.charset==="iso-8859-1"?L+="utf8=%26%2310003%3B&":L+="utf8=%E2%9C%93&"),I.length>0?L+I:""},cy}var fy,eC;function Iz(){if(eC)return fy;eC=1;var e=Q$(),t=Object.prototype.hasOwnProperty,n=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(S){return S.replace(/&#(\d+);/g,function(g,b){return String.fromCharCode(parseInt(b,10))})},s=function(S,g,b){if(S&&typeof S=="string"&&g.comma&&S.indexOf(",")>-1)return S.split(",");if(g.throwOnLimitExceeded&&b>=g.arrayLimit)throw new RangeError("Array limit exceeded. Only "+g.arrayLimit+" element"+(g.arrayLimit===1?"":"s")+" allowed in an array.");return S},u="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",f=function(g,b){var v={__proto__:null},_=b.ignoreQueryPrefix?g.replace(/^\?/,""):g;_=_.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var x=b.parameterLimit===1/0?void 0:b.parameterLimit,E=_.split(b.delimiter,b.throwOnLimitExceeded?x+1:x);if(b.throwOnLimitExceeded&&E.length>x)throw new RangeError("Parameter limit exceeded. Only "+x+" parameter"+(x===1?"":"s")+" allowed.");var R=-1,C,$=b.charset;if(b.charsetSentinel)for(C=0;C<E.length;++C)E[C].indexOf("utf8=")===0&&(E[C]===c?$="utf-8":E[C]===u&&($="iso-8859-1"),R=C,C=E.length);for(C=0;C<E.length;++C)if(C!==R){var A=E[C],T=A.indexOf("]="),M=T===-1?A.indexOf("="):T+1,D,j;if(M===-1?(D=b.decoder(A,i.decoder,$,"key"),j=b.strictNullHandling?null:""):(D=b.decoder(A.slice(0,M),i.decoder,$,"key"),D!==null&&(j=e.maybeMap(s(A.slice(M+1),b,n(v[D])?v[D].length:0),function(L){return b.decoder(L,i.decoder,$,"value")}))),j&&b.interpretNumericEntities&&$==="iso-8859-1"&&(j=o(String(j))),A.indexOf("[]=")>-1&&(j=n(j)?[j]:j),D!==null){var I=t.call(v,D);I&&b.duplicates==="combine"?v[D]=e.combine(v[D],j,b.arrayLimit,b.plainObjects):(!I||b.duplicates==="last")&&(v[D]=j)}}return v},d=function(S,g,b,v){var _=0;if(S.length>0&&S[S.length-1]==="[]"){var x=S.slice(0,-1).join("");_=Array.isArray(g)&&g[x]?g[x].length:0}for(var E=v?g:s(g,b,_),R=S.length-1;R>=0;--R){var C,$=S[R];if($==="[]"&&b.parseArrays)e.isOverflow(E)?C=E:C=b.allowEmptyArrays&&(E===""||b.strictNullHandling&&E===null)?[]:e.combine([],E,b.arrayLimit,b.plainObjects);else{C=b.plainObjects?{__proto__:null}:{};var A=$.charAt(0)==="["&&$.charAt($.length-1)==="]"?$.slice(1,-1):$,T=b.decodeDotInKeys?A.replace(/%2E/g,"."):A,M=parseInt(T,10);!b.parseArrays&&T===""?C={0:E}:!isNaN(M)&&$!==T&&String(M)===T&&M>=0&&b.parseArrays&&M<=b.arrayLimit?(C=[],C[M]=E):T!=="__proto__"&&(C[T]=E)}E=C}return E},m=function(g,b){var v=b.allowDots?g.replace(/\.([^.[]+)/g,"[$1]"):g;if(b.depth<=0)return!b.plainObjects&&t.call(Object.prototype,v)&&!b.allowPrototypes?void 0:[v];var _=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,E=_.exec(v),R=E?v.slice(0,E.index):v,C=[];if(R){if(!b.plainObjects&&t.call(Object.prototype,R)&&!b.allowPrototypes)return;C.push(R)}for(var $=0;(E=x.exec(v))!==null&&$<b.depth;){$+=1;var A=E[1].slice(1,-1);if(!b.plainObjects&&t.call(Object.prototype,A)&&!b.allowPrototypes)return;C.push(E[1])}if(E){if(b.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+b.depth+" and strictDepth is true");C.push("["+v.slice(E.index)+"]")}return C},p=function(g,b,v,_){if(g){var x=m(g,v);if(x)return d(x,b,v,_)}},y=function(g){if(!g)return i;if(typeof g.allowEmptyArrays<"u"&&typeof g.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof g.decodeDotInKeys<"u"&&typeof g.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(g.decoder!==null&&typeof g.decoder<"u"&&typeof g.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof g.charset<"u"&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof g.throwOnLimitExceeded<"u"&&typeof g.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var b=typeof g.charset>"u"?i.charset:g.charset,v=typeof g.duplicates>"u"?i.duplicates:g.duplicates;if(v!=="combine"&&v!=="first"&&v!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var _=typeof g.allowDots>"u"?g.decodeDotInKeys===!0?!0:i.allowDots:!!g.allowDots;return{allowDots:_,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:typeof g.allowPrototypes=="boolean"?g.allowPrototypes:i.allowPrototypes,allowSparse:typeof g.allowSparse=="boolean"?g.allowSparse:i.allowSparse,arrayLimit:typeof g.arrayLimit=="number"?g.arrayLimit:i.arrayLimit,charset:b,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:i.charsetSentinel,comma:typeof g.comma=="boolean"?g.comma:i.comma,decodeDotInKeys:typeof g.decodeDotInKeys=="boolean"?g.decodeDotInKeys:i.decodeDotInKeys,decoder:typeof g.decoder=="function"?g.decoder:i.decoder,delimiter:typeof g.delimiter=="string"||e.isRegExp(g.delimiter)?g.delimiter:i.delimiter,depth:typeof g.depth=="number"||g.depth===!1?+g.depth:i.depth,duplicates:v,ignoreQueryPrefix:g.ignoreQueryPrefix===!0,interpretNumericEntities:typeof g.interpretNumericEntities=="boolean"?g.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:typeof g.parameterLimit=="number"?g.parameterLimit:i.parameterLimit,parseArrays:g.parseArrays!==!1,plainObjects:typeof g.plainObjects=="boolean"?g.plainObjects:i.plainObjects,strictDepth:typeof g.strictDepth=="boolean"?!!g.strictDepth:i.strictDepth,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:i.strictNullHandling,throwOnLimitExceeded:typeof g.throwOnLimitExceeded=="boolean"?g.throwOnLimitExceeded:!1}};return fy=function(S,g){var b=y(g);if(S===""||S===null||typeof S>"u")return b.plainObjects?{__proto__:null}:{};for(var v=typeof S=="string"?f(S,b):S,_=b.plainObjects?{__proto__:null}:{},x=Object.keys(v),E=0;E<x.length;++E){var R=x[E],C=p(R,v[R],b,typeof S=="string");_=e.merge(_,C,b)}return b.allowSparse===!0?_:e.compact(_)},fy}var dy,tC;function zz(){if(tC)return dy;tC=1;var e=Pz(),t=Iz(),n=Tb();return dy={formats:n,parse:t,stringify:e},dy}var Fz=zz();const Qh=Ra(Fz);var hy,nC;function kz(){if(nC)return hy;nC=1;function e(t,...n){}return hy=e,hy}var Lz=kz();const cf=Ra(Lz);function qz(e,t){for(var n=-1,i=e==null?0:e.length,o=0,s=[];++n<i;){var u=e[n];t(u,n,e)&&(s[o++]=u)}return s}function Uz(e){return function(t){return t==null?void 0:t[e]}}function Y$(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function Bz(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Yh={exports:{}},Vz=Yh.exports,rC;function Hz(){return rC||(rC=1,(function(e,t){(function(n,i){typeof Bz=="function"?e.exports=i():n.pluralize=i()})(Vz,function(){var n=[],i=[],o={},s={},u={};function c(b){return typeof b=="string"?new RegExp("^"+b+"$","i"):b}function f(b,v){return b===v?v:b===b.toLowerCase()?v.toLowerCase():b===b.toUpperCase()?v.toUpperCase():b[0]===b[0].toUpperCase()?v.charAt(0).toUpperCase()+v.substr(1).toLowerCase():v.toLowerCase()}function d(b,v){return b.replace(/\$(\d{1,2})/g,function(_,x){return v[x]||""})}function m(b,v){return b.replace(v[0],function(_,x){var E=d(v[1],arguments);return f(_===""?b[x-1]:_,E)})}function p(b,v,_){if(!b.length||o.hasOwnProperty(b))return v;for(var x=_.length;x--;){var E=_[x];if(E[0].test(v))return m(v,E)}return v}function y(b,v,_){return function(x){var E=x.toLowerCase();return v.hasOwnProperty(E)?f(x,E):b.hasOwnProperty(E)?f(x,b[E]):p(E,x,_)}}function S(b,v,_,x){return function(E){var R=E.toLowerCase();return v.hasOwnProperty(R)?!0:b.hasOwnProperty(R)?!1:p(R,R,_)===R}}function g(b,v,_){var x=v===1?g.singular(b):g.plural(b);return(_?v+" ":"")+x}return g.plural=y(u,s,n),g.isPlural=S(u,s,n),g.singular=y(s,u,i),g.isSingular=S(s,u,i),g.addPluralRule=function(b,v){n.push([c(b),v])},g.addSingularRule=function(b,v){i.push([c(b),v])},g.addUncountableRule=function(b){if(typeof b=="string"){o[b.toLowerCase()]=!0;return}g.addPluralRule(b,"$0"),g.addSingularRule(b,"$0")},g.addIrregularRule=function(b,v){v=v.toLowerCase(),b=b.toLowerCase(),u[b]=v,s[v]=b},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(b){return g.addIrregularRule(b[0],b[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(b){return g.addPluralRule(b[0],b[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(b){return g.addSingularRule(b[0],b[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(g.addUncountableRule),g})})(Yh)),Yh.exports}var Kz=Hz();const iC=Ra(Kz);var Gz=/\s/;function Qz(e){for(var t=e.length;t--&&Gz.test(e.charAt(t)););return t}var Yz=/^\s+/;function Wz(e){return e&&e.slice(0,Qz(e)+1).replace(Yz,"")}var Xz="[object Symbol]";function ff(e){return typeof e=="symbol"||Qr(e)&&Aa(e)==Xz}var aC=NaN,Jz=/^[-+]0x[0-9a-f]+$/i,Zz=/^0b[01]+$/i,eF=/^0o[0-7]+$/i,tF=parseInt;function nF(e){if(typeof e=="number")return e;if(ff(e))return aC;if(pt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=pt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Wz(e);var n=Zz.test(e);return n||eF.test(e)?tF(e.slice(2),n?2:8):Jz.test(e)?aC:+e}function rF(){this.__data__=new $a,this.size=0}function iF(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function aF(e){return this.__data__.get(e)}function oF(e){return this.__data__.has(e)}var sF=200;function lF(e,t){var n=this.__data__;if(n instanceof $a){var i=n.__data__;if(!qc||i.length<sF-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ta(i)}return n.set(e,t),this.size=n.size,this}function fi(e){var t=this.__data__=new $a(e);this.size=t.size}fi.prototype.clear=rF;fi.prototype.delete=iF;fi.prototype.get=aF;fi.prototype.has=oF;fi.prototype.set=lF;function uF(e,t){for(var n=-1,i=e==null?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var cF=1,fF=2;function W$(e,t,n,i,o,s){var u=n&cF,c=e.length,f=t.length;if(c!=f&&!(u&&f>c))return!1;var d=s.get(e),m=s.get(t);if(d&&m)return d==t&&m==e;var p=-1,y=!0,S=n&fF?new Rs:void 0;for(s.set(e,t),s.set(t,e);++p<c;){var g=e[p],b=t[p];if(i)var v=u?i(b,g,p,t,e,s):i(g,b,p,e,t,s);if(v!==void 0){if(v)continue;y=!1;break}if(S){if(!uF(t,function(_,x){if(!Uc(S,x)&&(g===_||o(g,_,n,i,s)))return S.push(x)})){y=!1;break}}else if(!(g===b||o(g,b,n,i,s))){y=!1;break}}return s.delete(e),s.delete(t),y}var pp=Li.Uint8Array;function dF(e){var t=-1,n=Array(e.size);return e.forEach(function(i,o){n[++t]=[o,i]}),n}var hF=1,pF=2,mF="[object Boolean]",gF="[object Date]",vF="[object Error]",yF="[object Map]",bF="[object Number]",SF="[object RegExp]",_F="[object Set]",wF="[object String]",EF="[object Symbol]",xF="[object ArrayBuffer]",CF="[object DataView]",oC=Gr?Gr.prototype:void 0,py=oC?oC.valueOf:void 0;function RF(e,t,n,i,o,s,u){switch(n){case CF:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case xF:return!(e.byteLength!=t.byteLength||!s(new pp(e),new pp(t)));case mF:case gF:case bF:return uf(+e,+t);case vF:return e.name==t.name&&e.message==t.message;case SF:case wF:return e==t+"";case yF:var c=dF;case _F:var f=i&hF;if(c||(c=Rb),e.size!=t.size&&!f)return!1;var d=u.get(e);if(d)return d==t;i|=pF,u.set(e,t);var m=W$(c(e),c(t),i,o,s,u);return u.delete(e),m;case EF:if(py)return py.call(e)==py.call(t)}return!1}function X$(e,t,n){var i=t(e);return Sn(e)?i:xb(i,n(e))}function J$(){return[]}var OF=Object.prototype,AF=OF.propertyIsEnumerable,sC=Object.getOwnPropertySymbols,Mb=sC?function(e){return e==null?[]:(e=Object(e),qz(sC(e),function(t){return AF.call(e,t)}))}:J$;function $F(){return!1}var Z$=typeof Ar=="object"&&Ar&&!Ar.nodeType&&Ar,lC=Z$&&typeof $r=="object"&&$r&&!$r.nodeType&&$r,TF=lC&&lC.exports===Z$,uC=TF?Li.Buffer:void 0,MF=uC?uC.isBuffer:void 0,Os=MF||$F,DF=9007199254740991,jF=/^(?:0|[1-9]\d*)$/;function Ip(e,t){var n=typeof e;return t=t??DF,!!t&&(n=="number"||n!="symbol"&&jF.test(e))&&e>-1&&e%1==0&&e<t}var NF="[object Arguments]",PF="[object Array]",IF="[object Boolean]",zF="[object Date]",FF="[object Error]",kF="[object Function]",LF="[object Map]",qF="[object Number]",UF="[object Object]",BF="[object RegExp]",VF="[object Set]",HF="[object String]",KF="[object WeakMap]",GF="[object ArrayBuffer]",QF="[object DataView]",YF="[object Float32Array]",WF="[object Float64Array]",XF="[object Int8Array]",JF="[object Int16Array]",ZF="[object Int32Array]",ek="[object Uint8Array]",tk="[object Uint8ClampedArray]",nk="[object Uint16Array]",rk="[object Uint32Array]",Kt={};Kt[YF]=Kt[WF]=Kt[XF]=Kt[JF]=Kt[ZF]=Kt[ek]=Kt[tk]=Kt[nk]=Kt[rk]=!0;Kt[NF]=Kt[PF]=Kt[GF]=Kt[IF]=Kt[QF]=Kt[zF]=Kt[FF]=Kt[kF]=Kt[LF]=Kt[qF]=Kt[UF]=Kt[BF]=Kt[VF]=Kt[HF]=Kt[KF]=!1;function ik(e){return Qr(e)&&Cb(e.length)&&!!Kt[Aa(e)]}var eT=typeof Ar=="object"&&Ar&&!Ar.nodeType&&Ar,Tc=eT&&typeof $r=="object"&&$r&&!$r.nodeType&&$r,ak=Tc&&Tc.exports===eT,my=ak&&T$.process,Ql=(function(){try{var e=Tc&&Tc.require&&Tc.require("util").types;return e||my&&my.binding&&my.binding("util")}catch{}})(),cC=Ql&&Ql.isTypedArray,df=cC?Eb(cC):ik,ok=Object.prototype,sk=ok.hasOwnProperty;function tT(e,t){var n=Sn(e),i=!n&&Gl(e),o=!n&&!i&&Os(e),s=!n&&!i&&!o&&df(e),u=n||i||o||s,c=u?Y$(e.length,String):[],f=c.length;for(var d in e)(t||sk.call(e,d))&&!(u&&(d=="length"||o&&(d=="offset"||d=="parent")||s&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Ip(d,f)))&&c.push(d);return c}var lk=Object.prototype;function zp(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||lk;return e===n}function nT(e,t){return function(n){return e(t(n))}}var uk=nT(Object.keys,Object),ck=Object.prototype,fk=ck.hasOwnProperty;function rT(e){if(!zp(e))return uk(e);var t=[];for(var n in Object(e))fk.call(e,n)&&n!="constructor"&&t.push(n);return t}function ci(e){return Ms(e)?tT(e):rT(e)}function k0(e){return X$(e,ci,Mb)}var dk=1,hk=Object.prototype,pk=hk.hasOwnProperty;function mk(e,t,n,i,o,s){var u=n&dk,c=k0(e),f=c.length,d=k0(t),m=d.length;if(f!=m&&!u)return!1;for(var p=f;p--;){var y=c[p];if(!(u?y in t:pk.call(t,y)))return!1}var S=s.get(e),g=s.get(t);if(S&&g)return S==t&&g==e;var b=!0;s.set(e,t),s.set(t,e);for(var v=u;++p<f;){y=c[p];var _=e[y],x=t[y];if(i)var E=u?i(x,_,y,t,e,s):i(_,x,y,e,t,s);if(!(E===void 0?_===x||o(_,x,n,i,s):E)){b=!1;break}v||(v=y=="constructor")}if(b&&!v){var R=e.constructor,C=t.constructor;R!=C&&"constructor"in e&&"constructor"in t&&!(typeof R=="function"&&R instanceof R&&typeof C=="function"&&C instanceof C)&&(b=!1)}return s.delete(e),s.delete(t),b}var L0=$s(Li,"DataView"),q0=$s(Li,"Promise"),U0=$s(Li,"WeakMap"),fC="[object Map]",gk="[object Object]",dC="[object Promise]",hC="[object Set]",pC="[object WeakMap]",mC="[object DataView]",vk=As(L0),yk=As(qc),bk=As(q0),Sk=As(Dl),_k=As(U0),Kr=Aa;(L0&&Kr(new L0(new ArrayBuffer(1)))!=mC||qc&&Kr(new qc)!=fC||q0&&Kr(q0.resolve())!=dC||Dl&&Kr(new Dl)!=hC||U0&&Kr(new U0)!=pC)&&(Kr=function(e){var t=Aa(e),n=t==gk?e.constructor:void 0,i=n?As(n):"";if(i)switch(i){case vk:return mC;case yk:return fC;case bk:return dC;case Sk:return hC;case _k:return pC}return t});var wk=1,gC="[object Arguments]",vC="[object Array]",Hd="[object Object]",Ek=Object.prototype,yC=Ek.hasOwnProperty;function xk(e,t,n,i,o,s){var u=Sn(e),c=Sn(t),f=u?vC:Kr(e),d=c?vC:Kr(t);f=f==gC?Hd:f,d=d==gC?Hd:d;var m=f==Hd,p=d==Hd,y=f==d;if(y&&Os(e)){if(!Os(t))return!1;u=!0,m=!1}if(y&&!m)return s||(s=new fi),u||df(e)?W$(e,t,n,i,o,s):RF(e,t,f,n,i,o,s);if(!(n&wk)){var S=m&&yC.call(e,"__wrapped__"),g=p&&yC.call(t,"__wrapped__");if(S||g){var b=S?e.value():e,v=g?t.value():t;return s||(s=new fi),o(b,v,n,i,s)}}return y?(s||(s=new fi),mk(e,t,n,i,o,s)):!1}function hf(e,t,n,i,o){return e===t?!0:e==null||t==null||!Qr(e)&&!Qr(t)?e!==e&&t!==t:xk(e,t,n,i,hf,o)}function di(e,t){return hf(e,t)}var Wh={exports:{}};/* @license
|
|
61
|
-
Papa Parse
|
|
62
|
-
v5.5.3
|
|
63
|
-
https://github.com/mholt/PapaParse
|
|
64
|
-
License: MIT
|
|
65
|
-
*/var Ck=Wh.exports,bC;function Rk(){return bC||(bC=1,(function(e,t){((n,i)=>{e.exports=i()})(Ck,function n(){var i=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:{},o,s=!i.document&&!!i.postMessage,u=i.IS_PAPA_WORKER||!1,c={},f=0,d={};function m(T){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(M){var D=C(M);D.chunkSize=parseInt(D.chunkSize),M.step||M.chunk||(D.chunkSize=null),this._handle=new b(D),(this._handle.streamer=this)._config=D}).call(this,T),this.parseChunk=function(M,D){var j=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<j){let L=this._config.newline;L||(I=this._config.quoteChar||'"',L=this._handle.guessLineEndings(M,I)),M=[...M.split(L).slice(j)].join(L)}this.isFirstChunk&&A(this._config.beforeFirstChunk)&&(I=this._config.beforeFirstChunk(M))!==void 0&&(M=I),this.isFirstChunk=!1,this._halted=!1;var j=this._partialLine+M,I=(this._partialLine="",this._handle.parse(j,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(M=I.meta.cursor,j=(this._finished||(this._partialLine=j.substring(M-this._baseIndex),this._baseIndex=M),I&&I.data&&(this._rowCount+=I.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),u)i.postMessage({results:I,workerId:d.WORKER_ID,finished:j});else if(A(this._config.chunk)&&!D){if(this._config.chunk(I,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=I=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(I.data),this._completeResults.errors=this._completeResults.errors.concat(I.errors),this._completeResults.meta=I.meta),this._completed||!j||!A(this._config.complete)||I&&I.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),j||I&&I.meta.paused||this._nextChunk(),I}this._halted=!0},this._sendError=function(M){A(this._config.error)?this._config.error(M):u&&this._config.error&&i.postMessage({workerId:d.WORKER_ID,error:M,finished:!1})}}function p(T){var M;(T=T||{}).chunkSize||(T.chunkSize=d.RemoteChunkSize),m.call(this,T),this._nextChunk=s?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(D){this._input=D,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(M=new XMLHttpRequest,this._config.withCredentials&&(M.withCredentials=this._config.withCredentials),s||(M.onload=$(this._chunkLoaded,this),M.onerror=$(this._chunkError,this)),M.open(this._config.downloadRequestBody?"POST":"GET",this._input,!s),this._config.downloadRequestHeaders){var D,j=this._config.downloadRequestHeaders;for(D in j)M.setRequestHeader(D,j[D])}var I;this._config.chunkSize&&(I=this._start+this._config.chunkSize-1,M.setRequestHeader("Range","bytes="+this._start+"-"+I));try{M.send(this._config.downloadRequestBody)}catch(L){this._chunkError(L.message)}s&&M.status===0&&this._chunkError()}},this._chunkLoaded=function(){M.readyState===4&&(M.status<200||400<=M.status?this._chunkError():(this._start+=this._config.chunkSize||M.responseText.length,this._finished=!this._config.chunkSize||this._start>=(D=>(D=D.getResponseHeader("Content-Range"))!==null?parseInt(D.substring(D.lastIndexOf("/")+1)):-1)(M),this.parseChunk(M.responseText)))},this._chunkError=function(D){D=M.statusText||D,this._sendError(new Error(D))}}function y(T){(T=T||{}).chunkSize||(T.chunkSize=d.LocalChunkSize),m.call(this,T);var M,D,j=typeof FileReader<"u";this.stream=function(I){this._input=I,D=I.slice||I.webkitSlice||I.mozSlice,j?((M=new FileReader).onload=$(this._chunkLoaded,this),M.onerror=$(this._chunkError,this)):M=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var I=this._input,L=(this._config.chunkSize&&(L=Math.min(this._start+this._config.chunkSize,this._input.size),I=D.call(I,this._start,L)),M.readAsText(I,this._config.encoding));j||this._chunkLoaded({target:{result:L}})},this._chunkLoaded=function(I){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(I.target.result)},this._chunkError=function(){this._sendError(M.error)}}function S(T){var M;m.call(this,T=T||{}),this.stream=function(D){return M=D,this._nextChunk()},this._nextChunk=function(){var D,j;if(!this._finished)return D=this._config.chunkSize,M=D?(j=M.substring(0,D),M.substring(D)):(j=M,""),this._finished=!M,this.parseChunk(j)}}function g(T){m.call(this,T=T||{});var M=[],D=!0,j=!1;this.pause=function(){m.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){m.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(I){this._input=I,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){j&&M.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),M.length?this.parseChunk(M.shift()):D=!0},this._streamData=$(function(I){try{M.push(typeof I=="string"?I:I.toString(this._config.encoding)),D&&(D=!1,this._checkIsFinished(),this.parseChunk(M.shift()))}catch(L){this._streamError(L)}},this),this._streamError=$(function(I){this._streamCleanUp(),this._sendError(I)},this),this._streamEnd=$(function(){this._streamCleanUp(),j=!0,this._streamData("")},this),this._streamCleanUp=$(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function b(T){var M,D,j,I,L=Math.pow(2,53),K=-L,G=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,q=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Q=this,W=0,ne=0,X=!1,P=!1,B=[],U={data:[],errors:[],meta:{}};function k(ie){return T.skipEmptyLines==="greedy"?ie.join("").trim()==="":ie.length===1&&ie[0].length===0}function V(){if(U&&j&&(le("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+d.DefaultDelimiter+"'"),j=!1),T.skipEmptyLines&&(U.data=U.data.filter(function(Z){return!k(Z)})),J()){let Z=function(ue,ae){A(T.transformHeader)&&(ue=T.transformHeader(ue,ae)),B.push(ue)};var Y=Z;if(U)if(Array.isArray(U.data[0])){for(var ie=0;J()&&ie<U.data.length;ie++)U.data[ie].forEach(Z);U.data.splice(0,1)}else U.data.forEach(Z)}function se(Z,ue){for(var ae=T.header?{}:[],Se=0;Se<Z.length;Se++){var ye=Se,Oe=Z[Se],Oe=((Re,Ce)=>(Ae=>(T.dynamicTypingFunction&&T.dynamicTyping[Ae]===void 0&&(T.dynamicTyping[Ae]=T.dynamicTypingFunction(Ae)),(T.dynamicTyping[Ae]||T.dynamicTyping)===!0))(Re)?Ce==="true"||Ce==="TRUE"||Ce!=="false"&&Ce!=="FALSE"&&((Ae=>{if(G.test(Ae)&&(Ae=parseFloat(Ae),K<Ae&&Ae<L))return 1})(Ce)?parseFloat(Ce):q.test(Ce)?new Date(Ce):Ce===""?null:Ce):Ce)(ye=T.header?Se>=B.length?"__parsed_extra":B[Se]:ye,Oe=T.transform?T.transform(Oe,ye):Oe);ye==="__parsed_extra"?(ae[ye]=ae[ye]||[],ae[ye].push(Oe)):ae[ye]=Oe}return T.header&&(Se>B.length?le("FieldMismatch","TooManyFields","Too many fields: expected "+B.length+" fields but parsed "+Se,ne+ue):Se<B.length&&le("FieldMismatch","TooFewFields","Too few fields: expected "+B.length+" fields but parsed "+Se,ne+ue)),ae}var fe;U&&(T.header||T.dynamicTyping||T.transform)&&(fe=1,!U.data.length||Array.isArray(U.data[0])?(U.data=U.data.map(se),fe=U.data.length):U.data=se(U.data,0),T.header&&U.meta&&(U.meta.fields=B),ne+=fe)}function J(){return T.header&&B.length===0}function le(ie,se,fe,Y){ie={type:ie,code:se,message:fe},Y!==void 0&&(ie.row=Y),U.errors.push(ie)}A(T.step)&&(I=T.step,T.step=function(ie){U=ie,J()?V():(V(),U.data.length!==0&&(W+=ie.data.length,T.preview&&W>T.preview?D.abort():(U.data=U.data[0],I(U,Q))))}),this.parse=function(ie,se,fe){var Y=T.quoteChar||'"',Y=(T.newline||(T.newline=this.guessLineEndings(ie,Y)),j=!1,T.delimiter?A(T.delimiter)&&(T.delimiter=T.delimiter(ie),U.meta.delimiter=T.delimiter):((Y=((Z,ue,ae,Se,ye)=>{var Oe,Re,Ce,Ae;ye=ye||[","," ","|",";",d.RECORD_SEP,d.UNIT_SEP];for(var $e=0;$e<ye.length;$e++){for(var Fe,Ie=ye[$e],je=0,Ye=0,ke=0,Je=(Ce=void 0,new _({comments:Se,delimiter:Ie,newline:ue,preview:10}).parse(Z)),tt=0;tt<Je.data.length;tt++)ae&&k(Je.data[tt])?ke++:(Fe=Je.data[tt].length,Ye+=Fe,Ce===void 0?Ce=Fe:0<Fe&&(je+=Math.abs(Fe-Ce),Ce=Fe));0<Je.data.length&&(Ye/=Je.data.length-ke),(Re===void 0||je<=Re)&&(Ae===void 0||Ae<Ye)&&1.99<Ye&&(Re=je,Oe=Ie,Ae=Ye)}return{successful:!!(T.delimiter=Oe),bestDelimiter:Oe}})(ie,T.newline,T.skipEmptyLines,T.comments,T.delimitersToGuess)).successful?T.delimiter=Y.bestDelimiter:(j=!0,T.delimiter=d.DefaultDelimiter),U.meta.delimiter=T.delimiter),C(T));return T.preview&&T.header&&Y.preview++,M=ie,D=new _(Y),U=D.parse(M,se,fe),V(),X?{meta:{paused:!0}}:U||{meta:{paused:!1}}},this.paused=function(){return X},this.pause=function(){X=!0,D.abort(),M=A(T.chunk)?"":M.substring(D.getCharIndex())},this.resume=function(){Q.streamer._halted?(X=!1,Q.streamer.parseChunk(M,!0)):setTimeout(Q.resume,3)},this.aborted=function(){return P},this.abort=function(){P=!0,D.abort(),U.meta.aborted=!0,A(T.complete)&&T.complete(U),M=""},this.guessLineEndings=function(Z,Y){Z=Z.substring(0,1048576);var Y=new RegExp(v(Y)+"([^]*?)"+v(Y),"gm"),fe=(Z=Z.replace(Y,"")).split("\r"),Y=Z.split(`
|
|
66
|
-
`),Z=1<Y.length&&Y[0].length<fe[0].length;if(fe.length===1||Z)return`
|
|
67
|
-
`;for(var ue=0,ae=0;ae<fe.length;ae++)fe[ae][0]===`
|
|
68
|
-
`&&ue++;return ue>=fe.length/2?`\r
|
|
69
|
-
`:"\r"}}function v(T){return T.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _(T){var M=(T=T||{}).delimiter,D=T.newline,j=T.comments,I=T.step,L=T.preview,K=T.fastMode,G=null,q=!1,Q=T.quoteChar==null?'"':T.quoteChar,W=Q;if(T.escapeChar!==void 0&&(W=T.escapeChar),(typeof M!="string"||-1<d.BAD_DELIMITERS.indexOf(M))&&(M=","),j===M)throw new Error("Comment character same as delimiter");j===!0?j="#":(typeof j!="string"||-1<d.BAD_DELIMITERS.indexOf(j))&&(j=!1),D!==`
|
|
70
|
-
`&&D!=="\r"&&D!==`\r
|
|
71
|
-
`&&(D=`
|
|
72
|
-
`);var ne=0,X=!1;this.parse=function(P,B,U){if(typeof P!="string")throw new Error("Input must be a string");var k=P.length,V=M.length,J=D.length,le=j.length,ie=A(I),se=[],fe=[],Y=[],Z=ne=0;if(!P)return je();if(K||K!==!1&&P.indexOf(Q)===-1){for(var ue=P.split(D),ae=0;ae<ue.length;ae++){if(Y=ue[ae],ne+=Y.length,ae!==ue.length-1)ne+=D.length;else if(U)return je();if(!j||Y.substring(0,le)!==j){if(ie){if(se=[],Ae(Y.split(M)),Ye(),X)return je()}else Ae(Y.split(M));if(L&&L<=ae)return se=se.slice(0,L),je(!0)}}return je()}for(var Se=P.indexOf(M,ne),ye=P.indexOf(D,ne),Oe=new RegExp(v(W)+v(Q),"g"),Re=P.indexOf(Q,ne);;)if(P[ne]===Q)for(Re=ne,ne++;;){if((Re=P.indexOf(Q,Re+1))===-1)return U||fe.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:se.length,index:ne}),Fe();if(Re===k-1)return Fe(P.substring(ne,Re).replace(Oe,Q));if(Q===W&&P[Re+1]===W)Re++;else if(Q===W||Re===0||P[Re-1]!==W){Se!==-1&&Se<Re+1&&(Se=P.indexOf(M,Re+1));var Ce=$e((ye=ye!==-1&&ye<Re+1?P.indexOf(D,Re+1):ye)===-1?Se:Math.min(Se,ye));if(P.substr(Re+1+Ce,V)===M){Y.push(P.substring(ne,Re).replace(Oe,Q)),P[ne=Re+1+Ce+V]!==Q&&(Re=P.indexOf(Q,ne)),Se=P.indexOf(M,ne),ye=P.indexOf(D,ne);break}if(Ce=$e(ye),P.substring(Re+1+Ce,Re+1+Ce+J)===D){if(Y.push(P.substring(ne,Re).replace(Oe,Q)),Ie(Re+1+Ce+J),Se=P.indexOf(M,ne),Re=P.indexOf(Q,ne),ie&&(Ye(),X))return je();if(L&&se.length>=L)return je(!0);break}fe.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:se.length,index:ne}),Re++}}else if(j&&Y.length===0&&P.substring(ne,ne+le)===j){if(ye===-1)return je();ne=ye+J,ye=P.indexOf(D,ne),Se=P.indexOf(M,ne)}else if(Se!==-1&&(Se<ye||ye===-1))Y.push(P.substring(ne,Se)),ne=Se+V,Se=P.indexOf(M,ne);else{if(ye===-1)break;if(Y.push(P.substring(ne,ye)),Ie(ye+J),ie&&(Ye(),X))return je();if(L&&se.length>=L)return je(!0)}return Fe();function Ae(ke){se.push(ke),Z=ne}function $e(ke){var Je=0;return Je=ke!==-1&&(ke=P.substring(Re+1,ke))&&ke.trim()===""?ke.length:Je}function Fe(ke){return U||(ke===void 0&&(ke=P.substring(ne)),Y.push(ke),ne=k,Ae(Y),ie&&Ye()),je()}function Ie(ke){ne=ke,Ae(Y),Y=[],ye=P.indexOf(D,ne)}function je(ke){if(T.header&&!B&&se.length&&!q){var Je=se[0],tt=Object.create(null),wt=new Set(Je);let tn=!1;for(let He=0;He<Je.length;He++){let At=Je[He];if(tt[At=A(T.transformHeader)?T.transformHeader(At,He):At]){let ln,$t=tt[At];for(;ln=At+"_"+$t,$t++,wt.has(ln););wt.add(ln),Je[He]=ln,tt[At]++,tn=!0,(G=G===null?{}:G)[ln]=At}else tt[At]=1,Je[He]=At;wt.add(At)}tn&&console.warn("Duplicate headers found and renamed."),q=!0}return{data:se,errors:fe,meta:{delimiter:M,linebreak:D,aborted:X,truncated:!!ke,cursor:Z+(B||0),renamedHeaders:G}}}function Ye(){I(je()),se=[],fe=[]}},this.abort=function(){X=!0},this.getCharIndex=function(){return ne}}function x(T){var M=T.data,D=c[M.workerId],j=!1;if(M.error)D.userError(M.error,M.file);else if(M.results&&M.results.data){var I={abort:function(){j=!0,E(M.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:R,resume:R};if(A(D.userStep)){for(var L=0;L<M.results.data.length&&(D.userStep({data:M.results.data[L],errors:M.results.errors,meta:M.results.meta},I),!j);L++);delete M.results}else A(D.userChunk)&&(D.userChunk(M.results,I,M.file),delete M.results)}M.finished&&!j&&E(M.workerId,M.results)}function E(T,M){var D=c[T];A(D.userComplete)&&D.userComplete(M),D.terminate(),delete c[T]}function R(){throw new Error("Not implemented.")}function C(T){if(typeof T!="object"||T===null)return T;var M,D=Array.isArray(T)?[]:{};for(M in T)D[M]=C(T[M]);return D}function $(T,M){return function(){T.apply(M,arguments)}}function A(T){return typeof T=="function"}return d.parse=function(T,M){var D=(M=M||{}).dynamicTyping||!1;if(A(D)&&(M.dynamicTypingFunction=D,D={}),M.dynamicTyping=D,M.transform=!!A(M.transform)&&M.transform,!M.worker||!d.WORKERS_SUPPORTED)return D=null,d.NODE_STREAM_INPUT,typeof T=="string"?(T=(j=>j.charCodeAt(0)!==65279?j:j.slice(1))(T),D=new(M.download?p:S)(M)):T.readable===!0&&A(T.read)&&A(T.on)?D=new g(M):(i.File&&T instanceof File||T instanceof Object)&&(D=new y(M)),D.stream(T);(D=(()=>{var j;return!!d.WORKERS_SUPPORTED&&(j=(()=>{var I=i.URL||i.webkitURL||null,L=n.toString();return d.BLOB_URL||(d.BLOB_URL=I.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",L,")();"],{type:"text/javascript"})))})(),(j=new i.Worker(j)).onmessage=x,j.id=f++,c[j.id]=j)})()).userStep=M.step,D.userChunk=M.chunk,D.userComplete=M.complete,D.userError=M.error,M.step=A(M.step),M.chunk=A(M.chunk),M.complete=A(M.complete),M.error=A(M.error),delete M.worker,D.postMessage({input:T,config:M,workerId:D.id})},d.unparse=function(T,M){var D=!1,j=!0,I=",",L=`\r
|
|
73
|
-
`,K='"',G=K+K,q=!1,Q=null,W=!1,ne=((()=>{if(typeof M=="object"){if(typeof M.delimiter!="string"||d.BAD_DELIMITERS.filter(function(B){return M.delimiter.indexOf(B)!==-1}).length||(I=M.delimiter),typeof M.quotes!="boolean"&&typeof M.quotes!="function"&&!Array.isArray(M.quotes)||(D=M.quotes),typeof M.skipEmptyLines!="boolean"&&typeof M.skipEmptyLines!="string"||(q=M.skipEmptyLines),typeof M.newline=="string"&&(L=M.newline),typeof M.quoteChar=="string"&&(K=M.quoteChar),typeof M.header=="boolean"&&(j=M.header),Array.isArray(M.columns)){if(M.columns.length===0)throw new Error("Option columns is empty");Q=M.columns}M.escapeChar!==void 0&&(G=M.escapeChar+K),M.escapeFormulae instanceof RegExp?W=M.escapeFormulae:typeof M.escapeFormulae=="boolean"&&M.escapeFormulae&&(W=/^[=+\-@\t\r].*$/)}})(),new RegExp(v(K),"g"));if(typeof T=="string"&&(T=JSON.parse(T)),Array.isArray(T)){if(!T.length||Array.isArray(T[0]))return X(null,T,q);if(typeof T[0]=="object")return X(Q||Object.keys(T[0]),T,q)}else if(typeof T=="object")return typeof T.data=="string"&&(T.data=JSON.parse(T.data)),Array.isArray(T.data)&&(T.fields||(T.fields=T.meta&&T.meta.fields||Q),T.fields||(T.fields=Array.isArray(T.data[0])?T.fields:typeof T.data[0]=="object"?Object.keys(T.data[0]):[]),Array.isArray(T.data[0])||typeof T.data[0]=="object"||(T.data=[T.data])),X(T.fields||[],T.data||[],q);throw new Error("Unable to serialize unrecognized input");function X(B,U,k){var V="",J=(typeof B=="string"&&(B=JSON.parse(B)),typeof U=="string"&&(U=JSON.parse(U)),Array.isArray(B)&&0<B.length),le=!Array.isArray(U[0]);if(J&&j){for(var ie=0;ie<B.length;ie++)0<ie&&(V+=I),V+=P(B[ie],ie);0<U.length&&(V+=L)}for(var se=0;se<U.length;se++){var fe=(J?B:U[se]).length,Y=!1,Z=J?Object.keys(U[se]).length===0:U[se].length===0;if(k&&!J&&(Y=k==="greedy"?U[se].join("").trim()==="":U[se].length===1&&U[se][0].length===0),k==="greedy"&&J){for(var ue=[],ae=0;ae<fe;ae++){var Se=le?B[ae]:ae;ue.push(U[se][Se])}Y=ue.join("").trim()===""}if(!Y){for(var ye=0;ye<fe;ye++){0<ye&&!Z&&(V+=I);var Oe=J&&le?B[ye]:ye;V+=P(U[se][Oe],ye)}se<U.length-1&&(!k||0<fe&&!Z)&&(V+=L)}}return V}function P(B,U){var k,V;return B==null?"":B.constructor===Date?JSON.stringify(B).slice(1,25):(V=!1,W&&typeof B=="string"&&W.test(B)&&(B="'"+B,V=!0),k=B.toString().replace(ne,G),(V=V||D===!0||typeof D=="function"&&D(B,U)||Array.isArray(D)&&D[U]||((J,le)=>{for(var ie=0;ie<le.length;ie++)if(-1<J.indexOf(le[ie]))return!0;return!1})(k,d.BAD_DELIMITERS)||-1<k.indexOf(I)||k.charAt(0)===" "||k.charAt(k.length-1)===" ")?K+k+K:k)}},d.RECORD_SEP="",d.UNIT_SEP="",d.BYTE_ORDER_MARK="\uFEFF",d.BAD_DELIMITERS=["\r",`
|
|
74
|
-
`,'"',d.BYTE_ORDER_MARK],d.WORKERS_SUPPORTED=!s&&!!i.Worker,d.NODE_STREAM_INPUT=1,d.LocalChunkSize=10485760,d.RemoteChunkSize=5242880,d.DefaultDelimiter=",",d.Parser=_,d.ParserHandle=b,d.NetworkStreamer=p,d.FileStreamer=y,d.StringStreamer=S,d.ReadableStreamStreamer=g,i.jQuery&&((o=i.jQuery).fn.parse=function(T){var M=T.config||{},D=[];return this.each(function(L){if(!(o(this).prop("tagName").toUpperCase()==="INPUT"&&o(this).attr("type").toLowerCase()==="file"&&i.FileReader)||!this.files||this.files.length===0)return!0;for(var K=0;K<this.files.length;K++)D.push({file:this.files[K],inputElem:this,instanceConfig:o.extend({},M)})}),j(),this;function j(){if(D.length===0)A(T.complete)&&T.complete();else{var L,K,G,q,Q=D[0];if(A(T.before)){var W=T.before(Q.file,Q.inputElem);if(typeof W=="object"){if(W.action==="abort")return L="AbortError",K=Q.file,G=Q.inputElem,q=W.reason,void(A(T.error)&&T.error({name:L},K,G,q));if(W.action==="skip")return void I();typeof W.config=="object"&&(Q.instanceConfig=o.extend(Q.instanceConfig,W.config))}else if(W==="skip")return void I()}var ne=Q.instanceConfig.complete;Q.instanceConfig.complete=function(X){A(ne)&&ne(X,Q.file,Q.inputElem),I()},d.parse(Q.file,Q.instanceConfig)}}function I(){D.splice(0,1),j()}}),u&&(i.onmessage=function(T){T=T.data,d.WORKER_ID===void 0&&T&&(d.WORKER_ID=T.workerId),typeof T.input=="string"?i.postMessage({workerId:d.WORKER_ID,results:d.parse(T.input,T.config),finished:!0}):(i.File&&T.input instanceof File||T.input instanceof Object)&&(T=d.parse(T.input,T.config))&&i.postMessage({workerId:d.WORKER_ID,results:T,finished:!0})}),(p.prototype=Object.create(m.prototype)).constructor=p,(y.prototype=Object.create(m.prototype)).constructor=y,(S.prototype=Object.create(S.prototype)).constructor=S,(g.prototype=Object.create(m.prototype)).constructor=g,d})})(Wh)),Wh.exports}Rk();function Ok(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(o);++i<o;)s[i]=e[i+t];return s}function Ak(e,t,n){if(!pt(n))return!1;var i=typeof t;return(i=="number"?Ms(n)&&Ip(t,n.length):i=="string"&&t in n)?uf(n[t],e):!1}var SC=1/0,$k=17976931348623157e292;function Tk(e){if(!e)return e===0?e:0;if(e=nF(e),e===SC||e===-SC){var t=e<0?-1:1;return t*$k}return e===e?e:0}function iT(e){var t=Tk(e),n=t%1;return t===t?n?t-n:t:0}var Mk=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dk=/^\w*$/;function Db(e,t){if(Sn(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ff(e)?!0:Dk.test(e)||!Mk.test(e)||t!=null&&e in Object(t)}var jk="Expected a function";function jb(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(jk);var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],s=n.cache;if(s.has(o))return s.get(o);var u=e.apply(this,i);return n.cache=s.set(o,u)||s,u};return n.cache=new(jb.Cache||Ta),n}jb.Cache=Ta;var Nk=500;function Pk(e){var t=jb(e,function(i){return n.size===Nk&&n.clear(),i}),n=t.cache;return t}var Ik=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zk=/\\(\\)?/g,aT=Pk(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ik,function(n,i,o,s){t.push(o?s.replace(zk,"$1"):i||n)}),t}),_C=Gr?Gr.prototype:void 0,wC=_C?_C.toString:void 0;function oT(e){if(typeof e=="string")return e;if(Sn(e))return nu(e,oT)+"";if(ff(e))return wC?wC.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Nb(e){return e==null?"":oT(e)}function au(e,t){return Sn(e)?e:Db(e,t)?[e]:aT(Nb(e))}function Ds(e){if(typeof e=="string"||ff(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Fp(e,t){t=au(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[Ds(t[n++])];return n&&n==i?e:void 0}function xe(e,t,n){var i=e==null?void 0:Fp(e,t);return i===void 0?n:i}var Fk=1,kk=2;function Lk(e,t,n,i){var o=n.length,s=o;if(e==null)return!s;for(e=Object(e);o--;){var u=n[o];if(u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){u=n[o];var c=u[0],f=e[c],d=u[1];if(u[2]){if(f===void 0&&!(c in e))return!1}else{var m=new fi,p;if(!(p===void 0?hf(d,f,Fk|kk,i,m):p))return!1}}return!0}function sT(e){return e===e&&!pt(e)}function qk(e){for(var t=ci(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,sT(o)]}return t}function lT(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Uk(e){var t=qk(e);return t.length==1&&t[0][2]?lT(t[0][0],t[0][1]):function(n){return n===e||Lk(n,e,t)}}function Bk(e,t){return e!=null&&t in Object(e)}function uT(e,t,n){t=au(t,e);for(var i=-1,o=t.length,s=!1;++i<o;){var u=Ds(t[i]);if(!(s=e!=null&&n(e,u)))break;e=e[u]}return s||++i!=o?s:(o=e==null?0:e.length,!!o&&Cb(o)&&Ip(u,o)&&(Sn(e)||Gl(e)))}function cT(e,t){return e!=null&&uT(e,t,Bk)}var Vk=1,Hk=2;function Kk(e,t){return Db(e)&&sT(t)?lT(Ds(e),t):function(n){var i=xe(n,e);return i===void 0&&i===t?cT(n,e):hf(t,i,Vk|Hk)}}function Gk(e){return function(t){return Fp(t,e)}}function Qk(e){return Db(e)?Uz(Ds(e)):Gk(e)}function Pb(e){return typeof e=="function"?e:e==null?Dp:typeof e=="object"?Sn(e)?Kk(e[0],e[1]):Uk(e):Qk(e)}var Yk=Object.defineProperty,oe=(e,t)=>Yk(e,"name",{value:t,configurable:!0}),fT=he.createContext({}),Wk=oe(({children:e,isProvided:t,...n})=>{const i=Oa(),o=oe(async m=>{var p;try{return await((p=n.login)==null?void 0:p.call(n,m))}catch(y){return console.warn("Unhandled Error in login: refine always expects a resolved promise.",y),Promise.reject(y)}},"handleLogin"),s=oe(async m=>{var p;try{return await((p=n.register)==null?void 0:p.call(n,m))}catch(y){return console.warn("Unhandled Error in register: refine always expects a resolved promise.",y),Promise.reject(y)}},"handleRegister"),u=oe(async m=>{var p;try{const y=await((p=n.logout)==null?void 0:p.call(n,m));return i.invalidateQueries(),y}catch(y){return console.warn("Unhandled Error in logout: refine always expects a resolved promise.",y),Promise.reject(y)}},"handleLogout"),c=oe(async m=>{var p;try{const y=await((p=n.check)==null?void 0:p.call(n,m));return Promise.resolve(y)}catch(y){return console.warn("Unhandled Error in check: refine always expects a resolved promise.",y),Promise.reject(y)}},"handleCheck"),f=oe(async m=>{var p;try{const y=await((p=n.forgotPassword)==null?void 0:p.call(n,m));return Promise.resolve(y)}catch(y){return console.warn("Unhandled Error in forgotPassword: refine always expects a resolved promise.",y),Promise.reject(y)}},"handleForgotPassword"),d=oe(async m=>{var p;try{const y=await((p=n.updatePassword)==null?void 0:p.call(n,m));return Promise.resolve(y)}catch(y){return console.warn("Unhandled Error in updatePassword: refine always expects a resolved promise.",y),Promise.reject(y)}},"handleUpdatePassword");return he.createElement(fT.Provider,{value:{...n,login:o,logout:u,check:c,register:s,forgotPassword:f,updatePassword:d,isProvided:t}},e)},"AuthProviderContextProvider"),vi=oe(()=>he.useContext(fT),"useAuthProviderContext"),Xk=oe(e=>{const{currentPage:t,pageSize:n,sorters:i,sorter:o,filters:s}=Qh.parse(e.substring(1));return{parsedCurrentPage:t&&Number(t),parsedPageSize:n&&Number(n),parsedSorter:i||o||[],parsedFilters:s??[]}},"parseTableParams"),dT=oe((e,t)=>e.operator!=="and"&&e.operator!=="or"&&t.operator!=="and"&&t.operator!=="or"?("field"in e?e.field:void 0)===("field"in t?t.field:void 0)&&e.operator===t.operator:("key"in e?e.key:void 0)===("key"in t?t.key:void 0)&&e.operator===t.operator,"compareFilters"),hT=oe((e,t)=>e.field===t.field,"compareSorters"),Kd=oe((e,t,n=[])=>(t.filter(o=>(o.operator==="or"||o.operator==="and")&&!o.key).length>1&&cf(!0,`[conditionalFilters]: You have created multiple Conditional Filters at the top level, this requires the key parameter.
|
|
75
|
-
For more information, see https://refine.dev/docs/advanced-tutorials/data-provider/handling-filters/#top-level-multiple-conditional-filters-usage`),F$(e,t,n,dT).filter(o=>o.value!==void 0&&o.value!==null&&(o.operator!=="or"||o.operator==="or"&&o.value.length!==0)&&(o.operator!=="and"||o.operator==="and"&&o.value.length!==0))),"unionFilters"),EC=oe((e,t)=>F$(e,t,hT).filter(n=>n.order!==void 0&&n.order!==null),"unionSorters"),xC=oe((e,t)=>[...hp(t,e,dT),...e],"setInitialFilters"),CC=oe((e,t)=>[...hp(t,e,hT),...e],"setInitialSorters"),gy=oe(e=>e/1e3,"userFriendlySecond"),Jk=oe((e,t)=>!e||!t?!1:!!e.find(n=>n===t),"hasPermission"),Zk=oe(e=>(e=e.replace(/([a-z]{1})([A-Z]{1})/g,"$1-$2"),e=e.replace(/([A-Z]{1})([A-Z]{1})([a-z]{1})/g,"$1-$2$3"),e=e.toLowerCase().replace(/[_-]+/g," ").replace(/\s{2,}/g," ").trim(),e=e.charAt(0).toUpperCase()+e.slice(1),e),"humanizeString"),eL={icon:he.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-testid":"refine-logo",id:"refine-default-logo"},he.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.7889 0.422291C12.6627 -0.140764 11.3373 -0.140764 10.2111 0.422291L2.21115 4.42229C0.85601 5.09986 0 6.48491 0 8V16C0 17.5151 0.85601 18.9001 2.21115 19.5777L10.2111 23.5777C11.3373 24.1408 12.6627 24.1408 13.7889 23.5777L21.7889 19.5777C23.144 18.9001 24 17.5151 24 16V8C24 6.48491 23.144 5.09986 21.7889 4.42229L13.7889 0.422291ZM8 8C8 5.79086 9.79086 4 12 4C14.2091 4 16 5.79086 16 8V16C16 18.2091 14.2091 20 12 20C9.79086 20 8 18.2091 8 16V8Z",fill:"currentColor"}),he.createElement("path",{d:"M14 8C14 9.10457 13.1046 10 12 10C10.8954 10 10 9.10457 10 8C10 6.89543 10.8954 6 12 6C13.1046 6 14 6.89543 14 8Z",fill:"currentColor"})),text:"Refine Project"},Nn={mutationMode:"pessimistic",syncWithLocation:!1,undoableTimeout:5e3,warnWhenUnsavedChanges:!1,liveMode:"off",redirect:{afterCreate:"list",afterClone:"list",afterEdit:"list"},overtime:{enabled:!0,interval:1e3},textTransformers:{humanize:Zk,plural:iC.plural,singular:iC.singular},disableServerSideValidation:!1,disableRouteChangeHandler:!1,title:eL},No=he.createContext({mutationMode:"pessimistic",warnWhenUnsavedChanges:!1,syncWithLocation:!1,undoableTimeout:5e3,liveMode:"off",onLiveEvent:void 0,options:Nn}),tL=oe(({mutationMode:e,warnWhenUnsavedChanges:t,syncWithLocation:n,undoableTimeout:i,children:o,liveMode:s="off",onLiveEvent:u,options:c})=>he.createElement(No.Provider,{value:{__initialized:!0,mutationMode:e,warnWhenUnsavedChanges:t,syncWithLocation:n,undoableTimeout:i,liveMode:s,onLiveEvent:u,options:c}},o),"RefineContextProvider"),nL=oe(({options:e,disableTelemetry:t,liveMode:n,mutationMode:i,reactQueryClientConfig:o,reactQueryDevtoolConfig:s,syncWithLocation:u,undoableTimeout:c,warnWhenUnsavedChanges:f,disableRouteChangeHandler:d}={})=>{var m,p,y,S,g,b,v,_,x,E,R;const C={breadcrumb:e==null?void 0:e.breadcrumb,mutationMode:(e==null?void 0:e.mutationMode)??i??Nn.mutationMode,undoableTimeout:(e==null?void 0:e.undoableTimeout)??c??Nn.undoableTimeout,syncWithLocation:(e==null?void 0:e.syncWithLocation)??u??Nn.syncWithLocation,warnWhenUnsavedChanges:(e==null?void 0:e.warnWhenUnsavedChanges)??f??Nn.warnWhenUnsavedChanges,liveMode:(e==null?void 0:e.liveMode)??n??Nn.liveMode,redirect:{afterCreate:((m=e==null?void 0:e.redirect)==null?void 0:m.afterCreate)??Nn.redirect.afterCreate,afterClone:((p=e==null?void 0:e.redirect)==null?void 0:p.afterClone)??Nn.redirect.afterClone,afterEdit:((y=e==null?void 0:e.redirect)==null?void 0:y.afterEdit)??Nn.redirect.afterEdit},overtime:(e==null?void 0:e.overtime)??Nn.overtime,textTransformers:{humanize:((S=e==null?void 0:e.textTransformers)==null?void 0:S.humanize)??Nn.textTransformers.humanize,plural:((g=e==null?void 0:e.textTransformers)==null?void 0:g.plural)??Nn.textTransformers.plural,singular:((b=e==null?void 0:e.textTransformers)==null?void 0:b.singular)??Nn.textTransformers.singular},disableServerSideValidation:(e==null?void 0:e.disableServerSideValidation)??Nn.disableServerSideValidation,projectId:e==null?void 0:e.projectId,title:{icon:typeof((v=e==null?void 0:e.title)==null?void 0:v.icon)>"u"?Nn.title.icon:(_=e==null?void 0:e.title)==null?void 0:_.icon,text:typeof((x=e==null?void 0:e.title)==null?void 0:x.text)>"u"?Nn.title.text:(E=e==null?void 0:e.title)==null?void 0:E.text},disableRouteChangeHandler:(e==null?void 0:e.disableRouteChangeHandler)??d??Nn.disableRouteChangeHandler},$=(e==null?void 0:e.disableTelemetry)??t??!1,A={clientConfig:((R=e==null?void 0:e.reactQuery)==null?void 0:R.clientConfig)??o??{},devtoolConfig:s??{}};return{optionsWithDefaults:C,disableTelemetryWithDefault:$,reactQueryWithDefaults:A}},"handleRefineOptions"),Di=oe((e,t=[])=>{if(!e)return;let n=t.find(i=>i.identifier===e);return n||(n=t.find(i=>i.name===e)),n},"pickResource"),On=oe((e,t,n)=>{if(t)return t;const i=Di(e,n),o=i==null?void 0:i.meta;return o!=null&&o.dataProviderName?o.dataProviderName:"default"},"pickDataProvider"),Ib=oe(e=>e.startsWith(":"),"isParameter"),Yl=oe(e=>e.split("/").filter(n=>n!==""),"splitToSegments"),rL=oe((e,t)=>{const n=Yl(e),i=Yl(t);return n.length===i.length},"isSegmentCountsSame"),Bc=oe(e=>e.replace(/^\/|\/$/g,""),"removeLeadingTrailingSlashes"),iL=oe((e,t)=>{const n=Bc(e),i=Bc(t);if(!rL(n,i))return!1;const o=Yl(n);return Yl(i).every((u,c)=>Ib(u)||u===o[c])},"checkBySegments"),uo=oe((e,t)=>{const n=[];return["list","show","edit","create","clone"].forEach(o=>{const s=e[o];s&&n.push({action:o,resource:e,route:`/${s.replace(/^\//,"")}`})}),n},"getActionRoutesFromResource"),aL=oe(e=>{var t;if(e.length===0)return;if(e.length===1)return e[0];const n=e.map(s=>({...s,splitted:Yl(Bc(s.route))})),i=((t=n[0])==null?void 0:t.splitted.length)??0;let o=[...n];for(let s=0;s<i;s++){const u=o.filter(c=>!Ib(c.splitted[s]));if(u.length!==0){if(u.length===1){o=u;break}o=u}}return o[0]},"pickMatchedRoute"),oL=oe((e,t)=>{const i=t.flatMap(s=>uo(s,t)).filter(s=>iL(e,s.route)),o=aL(i);return{found:!!o,resource:o==null?void 0:o.resource,action:o==null?void 0:o.action,matchedRoute:o==null?void 0:o.route}},"matchResourceFromRoute"),Wl=oe((e,t)=>{var n;const i=(n=e.meta)==null?void 0:n.parent;return i?t.find(s=>(s.identifier??s.name)===i)??{name:i}:void 0},"getParentResource"),sL=oe(e=>Yl(Bc(e)).flatMap(n=>Ib(n)?[n.slice(1)]:[]),"pickRouteParams"),lL=oe((e,t={})=>e.reduce((n,i)=>{const o=t[i];return typeof o<"u"&&(n[i]=o),n},{}),"prepareRouteParams"),cs=oe((e,t={},n={},i={})=>{const o=sL(e),s=lL(o,{...t,...typeof(n==null?void 0:n.id)<"u"?{id:n.id}:{},...typeof(n==null?void 0:n.action)<"u"?{action:n.action}:{},...typeof(n==null?void 0:n.resource)<"u"?{resource:n.resource}:{},...n==null?void 0:n.params,...i});return e.replace(/:([^\/]+)/g,(u,c)=>{const f=s[c];return typeof f<"u"?`${f}`:u})},"composeRoute"),pT=oe(()=>{const e=vi();return e.isProvided?e:null},"useActiveAuthProvider"),uL=oe(({pagination:e}={})=>{const t=(e==null?void 0:e.mode)??"server",n=(e==null?void 0:e.currentPage)??1,i=(e==null?void 0:e.pageSize)??10;return{currentPage:n,pageSize:i,mode:t}},"handlePaginationParams"),vy=oe((e,t,n,i)=>{const o=i?e(t,i,n):e(t,n),s=n??t;return o===t||typeof o>"u"?s:o},"safeTranslate"),zb=oe((e,t)=>{const{mutationMode:n,undoableTimeout:i}=z.useContext(No);return{mutationMode:e??n,undoableTimeout:t??i}},"useMutationMode"),mT=he.createContext({}),cL=oe(({children:e})=>{const[t,n]=z.useState(!1);return he.createElement(mT.Provider,{value:{warnWhen:t,setWarnWhen:n}},e)},"UnsavedWarnContextProvider"),gT=oe(()=>{const{warnWhenUnsavedChanges:e}=z.useContext(No),{warnWhen:t,setWarnWhen:n}=z.useContext(mT);return{warnWhenUnsavedChanges:e,warnWhen:!!t,setWarnWhen:n??(()=>{})}},"useWarnAboutChange"),fL=oe(()=>{const{syncWithLocation:e}=z.useContext(No);return{syncWithLocation:e}},"useSyncWithLocation"),js=oe(()=>{const{mutationMode:e,syncWithLocation:t,undoableTimeout:n,warnWhenUnsavedChanges:i,liveMode:o,onLiveEvent:s,options:u,__initialized:c}=z.useContext(No);return{__initialized:c,mutationMode:e,syncWithLocation:t,undoableTimeout:n,warnWhenUnsavedChanges:i,liveMode:o,onLiveEvent:s,options:u}},"useRefineContext"),pf=oe(()=>{const{options:{textTransformers:e}}=js();return oe((n="",i)=>{const o=e.humanize(n);return i==="singular"?e.singular(o):e.plural(o)},"getFriendlyName")},"useUserFriendlyName");function vT(e,t,n,i,o,s){var u;const c=s||pf(),f={create:"Create new ",clone:`#${i??""} Clone `,edit:`#${i??""} Edit `,show:`#${i??""} Show `,list:""},d=(t==null?void 0:t.identifier)??(t==null?void 0:t.name),m=((u=t==null?void 0:t.meta)==null?void 0:u.label)??(d&&c(d,n==="list"?"plural":"singular")),p=o??m,y=vy(e,"documentTitle.default","Refine"),S=vy(e,"documentTitle.suffix"," | Refine");let g=y;return n&&d&&(g=vy(e,`documentTitle.${d}.${n}`,`${f[n]??""}${p}${S}`,{id:i})),g}oe(vT,"generateDefaultDocumentTitle");var Tr=class{constructor(e=[]){this.segments=[],this.segments=e}key(){return this.segments}get(){return this.segments}};oe(Tr,"BaseKeyBuilder");var Ma=class extends Tr{params(e){return new Tr([...this.segments,e])}};oe(Ma,"ParamsKeyBuilder");var yT=class extends Tr{id(e){return new Ma([...this.segments,e?String(e):void 0])}};oe(yT,"DataIdRequiringKeyBuilder");var bT=class extends Tr{ids(...e){return new Ma([...this.segments,...e.length?[e.map(t=>String(t))]:[]])}};oe(bT,"DataIdsRequiringKeyBuilder");var ST=class extends Tr{action(e){if(e==="one")return new yT([...this.segments,e]);if(e==="many")return new bT([...this.segments,e]);if(["list","infinite"].includes(e))return new Ma([...this.segments,e]);throw new Error("Invalid action type")}};oe(ST,"DataResourceKeyBuilder");var _T=class extends Tr{resource(e){return new ST([...this.segments,e])}mutation(e){return new Ma([...e==="custom"?this.segments:[this.segments[0]],e])}};oe(_T,"DataKeyBuilder");var wT=class extends Tr{action(e){return new Ma([...this.segments,e])}};oe(wT,"AuthKeyBuilder");var ET=class extends Tr{action(e){return new Ma([...this.segments,e])}};oe(ET,"AccessResourceKeyBuilder");var xT=class extends Tr{resource(e){return new ET([...this.segments,e])}};oe(xT,"AccessKeyBuilder");var CT=class extends Tr{action(e){return new Ma([...this.segments,e])}};oe(CT,"AuditActionKeyBuilder");var RT=class extends Tr{resource(e){return new CT([...this.segments,e])}action(e){return new Ma([...this.segments,e])}};oe(RT,"AuditKeyBuilder");var OT=class extends Tr{data(e){return new _T(["data",e||"default"])}auth(){return new wT(["auth"])}access(){return new xT(["access"])}audit(){return new RT(["audit"])}};oe(OT,"KeyBuilder");var dL=oe(()=>new OT([]),"keys"),AT=oe(e=>{const t={queryKey:e.queryKey,signal:void 0};return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>e.signal}),t},"prepareQueryContext"),_n=oe(()=>({keys:dL}),"useKeys");function hL({options:e,params:t}){const{getPermissions:n}=vi(),{keys:i}=_n();return tu({queryKey:i().auth().action("permissions").get(),queryFn:n?()=>n(t):()=>Promise.resolve(void 0),enabled:!!n,...e,meta:{...e==null?void 0:e.meta,...zn()}})}oe(hL,"usePermissions");function $T({queryOptions:e}={}){const{getIdentity:t}=vi(),{keys:n}=_n();return tu({queryKey:n().auth().action("identity").get(),queryFn:t??(()=>Promise.resolve({})),retry:!1,enabled:!!t,...e,meta:{...e==null?void 0:e.meta,...zn()}})}oe($T,"useGetIdentity");var Fb=oe(()=>{const e=Oa(),{keys:t}=_n();return oe(async()=>{await Promise.all(["check","identity","permissions"].map(i=>e.invalidateQueries({queryKey:t().auth().action(i).get()})))},"invalidate")},"useInvalidateAuthStore");function TT({mutationOptions:e}={}){const t=Fb(),n=er(),{open:i,close:o}=Ns(),{logout:s}=vi(),{keys:u}=_n();return{...pi({mutationKey:u().auth().action("logout").get(),mutationFn:s,...e,onSuccess:(f,d)=>{const{success:m,error:p,redirectTo:y,successNotification:S}=f,{redirectPath:g}=d??{},b=g??y;m&&(o==null||o("useLogout-error"),S&&(i==null||i(pL(S)))),(p||!m)&&(i==null||i(RC(p))),b!==!1&&b&&n({to:b}),t()},onError:f=>{i==null||i(RC(f))},meta:{...e==null?void 0:e.meta,...zn()}})}}oe(TT,"useLogout");var RC=oe(e=>({key:"useLogout-error",type:"error",message:(e==null?void 0:e.name)||"Logout Error",description:(e==null?void 0:e.message)||"Something went wrong during logout"}),"buildNotification"),pL=oe(e=>({message:e.message,description:e.description,key:"logout-success",type:"success"}),"buildSuccessNotification");function mL({mutationOptions:e}={}){var t;const n=Fb(),i=er(),o=Dr(),{close:s,open:u}=Ns(),{login:c}=vi(),{keys:f}=_n(),d=(t=o.params)==null?void 0:t.to;return{...pi({mutationKey:f().auth().action("login").get(),mutationFn:c,onSuccess:async({success:p,redirectTo:y,error:S,successNotification:g})=>{p&&(s==null||s("login-error"),g&&(u==null||u(gL(g)))),(S||!p)&&(u==null||u(OC(S))),p&&(d?i({to:d,type:"replace"}):y&&i({to:y,type:"replace"})),setTimeout(()=>{n()},32)},onError:p=>{u==null||u(OC(p))},...e,meta:{...e==null?void 0:e.meta,...zn()}})}}oe(mL,"useLogin");var OC=oe(e=>({message:(e==null?void 0:e.name)||"Login Error",description:(e==null?void 0:e.message)||"Invalid credentials",key:"login-error",type:"error"}),"buildNotification"),gL=oe(e=>({message:e.message,description:e.description,key:"login-success",type:"success"}),"buildSuccessNotification");function vL({mutationOptions:e}={}){const t=Fb(),n=er(),{close:i,open:o}=Ns(),{register:s}=vi(),{keys:u}=_n();return{...pi({mutationKey:u().auth().action("register").get(),mutationFn:s,onSuccess:async({success:f,redirectTo:d,error:m,successNotification:p})=>{f&&(i==null||i("register-error"),p&&(o==null||o(yL(p)))),(m||!f)&&(o==null||o(AC(m))),d&&n({to:d,type:"replace"}),f&&setTimeout(()=>{t()},32)},onError:f=>{o==null||o(AC(f))},...e,meta:{...e==null?void 0:e.meta,...zn()}})}}oe(vL,"useRegister");var AC=oe(e=>({message:(e==null?void 0:e.name)||"Register Error",description:(e==null?void 0:e.message)||"Error while registering",key:"register-error",type:"error"}),"buildNotification"),yL=oe(e=>({message:e.message,description:e.description,key:"register-success",type:"success"}),"buildSuccessNotification");function bL({mutationOptions:e}={}){const t=er(),{open:n,close:i}=Ns(),{forgotPassword:o}=vi(),{keys:s}=_n();return{...pi({mutationKey:s().auth().action("forgotPassword").get(),mutationFn:o,onSuccess:({success:c,redirectTo:f,error:d,successNotification:m})=>{c&&(i==null||i("forgot-password-error"),m&&(n==null||n(SL(m)))),(d||!c)&&(n==null||n($C(d))),f&&t({to:f,type:"replace"})},onError:c=>{n==null||n($C(c))},...e,meta:{...e==null?void 0:e.meta,...zn()}})}}oe(bL,"useForgotPassword");var $C=oe(e=>({message:(e==null?void 0:e.name)||"Forgot Password Error",description:(e==null?void 0:e.message)||"Error while resetting password",key:"forgot-password-error",type:"error"}),"buildNotification"),SL=oe(e=>({message:e.message,description:e.description,key:"forgot-password-success",type:"success"}),"buildSuccessNotification");function _L({mutationOptions:e}={}){const t=er(),{updatePassword:n}=vi(),{close:i,open:o}=Ns(),{keys:s}=_n(),c=Dr().params??{};return{...pi({mutationKey:s().auth().action("updatePassword").get(),mutationFn:async d=>n==null?void 0:n({...c,...d}),onSuccess:({success:d,redirectTo:m,error:p,successNotification:y})=>{d&&(i==null||i("update-password-error"),y&&(o==null||o(wL(y)))),(p||!d)&&(o==null||o(TC(p))),m&&t({to:m,type:"replace"})},onError:d=>{o==null||o(TC(d))},...e,meta:{...e==null?void 0:e.meta,...zn()}})}}oe(_L,"useUpdatePassword");var TC=oe(e=>({message:(e==null?void 0:e.name)||"Update Password Error",description:(e==null?void 0:e.message)||"Error while updating password",key:"update-password-error",type:"error"}),"buildNotification"),wL=oe(e=>({message:e.message,description:e.description,key:"update-password-success",type:"success"}),"buildSuccessNotification");function MT({queryOptions:e,params:t}={}){const{check:n}=vi(),{keys:i}=_n();return tu({queryKey:i().auth().action("check").get(),queryFn:async()=>await(n==null?void 0:n(t))??{authenticated:!0},retry:!1,...e,meta:{...e==null?void 0:e.meta,...zn()}})}oe(MT,"useIsAuthenticated");function ou(){const e=er(),{onError:t}=vi(),{keys:n}=_n(),{mutate:i}=TT();return{...pi({mutationKey:n().auth().action("onError").get(),...t?{mutationFn:t,onSuccess:({logout:s,redirectTo:u})=>{if(s){i({redirectPath:u});return}if(u){e({to:u,type:"replace"});return}}}:{mutationFn:()=>({})},meta:{...zn()}})}}oe(ou,"useOnError");var EL=oe(()=>{const{isProvided:e}=vi();return!!e},"useIsExistAuthentication"),mf=oe(({enabled:e,isLoading:t,interval:n,onInterval:i})=>{const[o,s]=z.useState(void 0),{options:u}=js(),{overtime:c}=u,f=n??c.interval,d=i??(c==null?void 0:c.onInterval),m=typeof e<"u"?e:typeof c.enabled<"u"?c.enabled:!0;return z.useEffect(()=>{let p;return m&&t&&(p=setInterval(()=>{s(y=>y===void 0?f:y+f)},f)),()=>{typeof p<"u"&&clearInterval(p),s(void 0)}},[t,f,m]),z.useEffect(()=>{d&&o&&d(o)},[o]),{elapsedTime:o}},"useLoadingOvertime"),xL=Object.freeze([]),DT=oe(({resource:e,filters:t,pagination:n,sorters:i,queryOptions:o,successNotification:s,errorNotification:u,meta:c,liveMode:f,onLiveEvent:d,liveParams:m,dataProviderName:p,overtimeOptions:y}={})=>{var S,g,b;const{resources:v,resource:_,identifier:x}=sn({resource:e}),E=gf(),R=Fn(),{mutate:C}=ou(),$=vf(),A=uu(),{keys:T}=_n(),M=On(x,p,v),D=c,j=t,I=i,L=uL({pagination:n}),K=L.mode==="server",G=A({resource:_,meta:D}),q={meta:G,filters:j,hasPagination:K,pagination:L,sorters:I},Q=(o==null?void 0:o.enabled)===void 0||(o==null?void 0:o.enabled)===!0,{getList:W}=E(M);NT({resource:x,types:["*"],params:{meta:G,pagination:L,hasPagination:K,sorters:I,filters:j,subscriptionType:"useList",...m},channel:`resources/${_==null?void 0:_.name}`,enabled:Q,liveMode:f,onLiveEvent:d,meta:{...c,dataProviderName:M}});const ne=z.useMemo(()=>B=>{var U;let k=B;return L.mode==="client"&&(k={...k,data:k.data.slice((L.currentPage-1)*L.pageSize,L.currentPage*L.pageSize),total:k.total}),o!=null&&o.select?(U=o==null?void 0:o.select)==null?void 0:U.call(o,k):k},[L.currentPage,L.pageSize,L.mode,o==null?void 0:o.select]),X=tu({queryKey:T().data(M).resource(x??"").action("list").params({...D||{},filters:j,...K&&{pagination:L},...i&&{sorters:i}}).get(),queryFn:B=>{const U={...G,...AT(B)};return W({resource:(_==null?void 0:_.name)??"",pagination:L,filters:j,sorters:I,meta:U})},...o,enabled:typeof(o==null?void 0:o.enabled)<"u"?o==null?void 0:o.enabled:!!(_!=null&&_.name),select:ne,meta:{...o==null?void 0:o.meta,...zn("useList",_==null?void 0:_.name)}});z.useEffect(()=>{if(X.isSuccess&&X.data){const B=typeof s=="function"?s(X.data,q,x):s;$(B)}},[X.isSuccess,X.data,s]),z.useEffect(()=>{if(X.isError&&X.error){C(X.error);const B=typeof u=="function"?u(X.error,q,x):u;$(B,{key:`${x}-useList-notification`,message:R("notifications.error",{statusCode:X.error.statusCode},`Error (status code: ${X.error.statusCode})`),description:X.error.message,type:"error"})}},[X.isError,(S=X.error)==null?void 0:S.message]);const{elapsedTime:P}=mf({...y,isLoading:X.isFetching});return{query:X,result:{data:((g=X==null?void 0:X.data)==null?void 0:g.data)||xL,total:(b=X==null?void 0:X.data)==null?void 0:b.total},overtime:{elapsedTime:P}}},"useList"),CL=oe(({resource:e,id:t,queryOptions:n,successNotification:i,errorNotification:o,meta:s,liveMode:u,onLiveEvent:c,liveParams:f,dataProviderName:d,overtimeOptions:m})=>{var p,y;const{resources:S,resource:g,identifier:b}=sn({resource:e}),v=gf(),_=Fn(),{mutate:x}=ou(),E=vf(),R=uu(),{keys:C}=_n(),$=s,A=On(b,d,S),{getOne:T}=v(A),M=R({resource:g,meta:$}),D=typeof(n==null?void 0:n.enabled)<"u"?(n==null?void 0:n.enabled)===!0:typeof(g==null?void 0:g.name)<"u"&&typeof t<"u";NT({resource:b,types:["*"],channel:`resources/${g==null?void 0:g.name}`,params:{ids:t?[t]:[],id:t,meta:M,subscriptionType:"useOne",...f},enabled:D,liveMode:u,onLiveEvent:c,meta:{...s,dataProviderName:A}});const j=tu({queryKey:C().data(A).resource(b??"").action("one").id(t??"").params({...$||{}}).get(),queryFn:L=>T({resource:(g==null?void 0:g.name)??"",id:t,meta:{...M,...AT(L)}}),...n,enabled:D,meta:{...n==null?void 0:n.meta,...zn("useOne",g==null?void 0:g.name)}});z.useEffect(()=>{if(j.isSuccess&&j.data){const L=typeof i=="function"?i(j.data,{id:t,...M},b):i;E(L)}},[j.isSuccess,j.data,i]),z.useEffect(()=>{if(j.isError&&j.error){x(j.error);const L=typeof o=="function"?o(j.error,{id:t,...M},b):o;E(L,{key:`${t}-${b}-getOne-notification`,message:_("notifications.error",{statusCode:j.error.statusCode},`Error (status code: ${j.error.statusCode})`),description:j.error.message,type:"error"})}},[j.isError,(p=j.error)==null?void 0:p.message]);const{elapsedTime:I}=mf({...m,isLoading:j.isFetching});return{query:j,result:(y=j.data)==null?void 0:y.data,overtime:{elapsedTime:I}}},"useOne"),RL=oe(({id:e,resource:t,values:n,dataProviderName:i,successNotification:o,errorNotification:s,meta:u,mutationMode:c,undoableTimeout:f,onCancel:d,optimisticUpdateMap:m,invalidates:p,mutationOptions:y,overtimeOptions:S}={})=>{const{resources:g,select:b}=sn({resource:t}),v=Oa(),_=gf(),{mutationMode:x,undoableTimeout:E}=zb(),{mutate:R}=ou(),C=Fn(),$=qb(),{log:A}=Kb(),{notificationDispatch:T}=Ub(),M=vf(),D=su(),j=uu(),{options:{textTransformers:I}}=js(),{keys:L}=_n(),K=pi({mutationFn:({id:X=e,values:P=n,resource:B=t,mutationMode:U=c,undoableTimeout:k=f,onCancel:V=d,meta:J=u,dataProviderName:le=i})=>{if(typeof X>"u")throw hc;if(!P)throw Gd;if(!B)throw dc;const{resource:ie,identifier:se}=b(B),fe=j({resource:ie,meta:J}),Y=U??x,Z=k??E;return Y!=="undoable"?_(On(se,le,g)).update({resource:ie.name,id:X,variables:P,meta:fe}):new Promise((ae,Se)=>{const ye=oe(()=>{_(On(se,le,g)).update({resource:ie.name,id:X,variables:P,meta:fe}).then(Re=>ae(Re)).catch(Re=>Se(Re))},"doMutation"),Oe=oe(()=>{Se({message:"mutationCancelled"})},"cancelMutation");V&&V(Oe),T({type:"ADD",payload:{id:X,resource:se,cancelMutation:Oe,doMutation:ye,seconds:Z,isSilent:!!V}})})},onMutate:async({resource:X=t,id:P=e,mutationMode:B=c,values:U=n,dataProviderName:k=i,meta:V=u,optimisticUpdateMap:J=m??{list:!0,many:!0,detail:!0}})=>{if(typeof P>"u")throw hc;if(!U)throw Gd;if(!X)throw dc;const{identifier:le}=b(X),{gqlMutation:ie,gqlQuery:se,...fe}=V??{},Y=L().data(On(le,k,g)).resource(le),Z=v.getQueriesData({queryKey:Y.get()}),ue=B??x;return await v.cancelQueries({queryKey:Y.get()}),ue!=="pessimistic"&&(J.list&&v.setQueriesData({queryKey:Y.action("list").params(fe??{}).get()},ae=>{if(typeof J.list=="function")return J.list(ae,U,P);if(!ae)return null;const Se=ae.data.map(ye=>{var Oe;return((Oe=ye.id)==null?void 0:Oe.toString())===(P==null?void 0:P.toString())?{id:P,...ye,...U}:ye});return{...ae,data:Se}}),J.many&&v.setQueriesData({queryKey:Y.action("many").get()},ae=>{if(typeof J.many=="function")return J.many(ae,U,P);if(!ae)return null;const Se=ae.data.map(ye=>{var Oe;return((Oe=ye.id)==null?void 0:Oe.toString())===(P==null?void 0:P.toString())&&(ye={id:P,...ye,...U}),ye});return{...ae,data:Se}}),J.detail&&v.setQueriesData({queryKey:Y.action("one").id(P).params(fe??{}).get()},ae=>typeof J.detail=="function"?J.detail(ae,U,P):ae?{...ae,data:{...ae.data,...U}}:null)),{previousQueries:Z}},onSettled:(X,P,B,U)=>{var k;const{id:V=e,resource:J=t,dataProviderName:le=i,invalidates:ie=p??["list","many","detail"]}=B;if(typeof V>"u")throw hc;if(!J)throw dc;const{identifier:se}=b(J);D({resource:se,dataProviderName:On(se,le,g),invalidates:ie,id:V}),T({type:"REMOVE",payload:{id:V,resource:se}}),(k=y==null?void 0:y.onSettled)==null||k.call(y,X,P,B,U)},onSuccess:(X,P,B)=>{var U,k;const{id:V=e,resource:J=t,successNotification:le=o,dataProviderName:ie=i,values:se=n,meta:fe=u}=P;if(typeof V>"u")throw hc;if(!se)throw Gd;if(!J)throw dc;const{resource:Y,identifier:Z}=b(J),ue=I.singular(Z),ae=On(Z,ie,g),Se=j({resource:Y,meta:fe}),ye=typeof le=="function"?le(X,{id:V,values:se},Z):le;M(ye,{key:`${V}-${Z}-notification`,description:C("notifications.success","Successful"),message:C("notifications.editSuccess",{resource:C(`${Z}.${Z}`,ue)},`Successfully updated ${ue}`),type:"success"}),$==null||$({channel:`resources/${Y.name}`,type:"updated",payload:{ids:(U=X.data)!=null&&U.id?[X.data.id]:void 0},date:new Date,meta:{...Se,dataProviderName:ae}});let Oe;if(B){const Fe=L().data(On(Z,ae,g)).resource(Z),Ie=v.getQueryData(Fe.action("one").id(V).get());Oe=Object.keys(se||{}).reduce((je,Ye)=>{var ke;return je[Ye]=(ke=Ie==null?void 0:Ie.data)==null?void 0:ke[Ye],je},{})}const{fields:Re,operation:Ce,variables:Ae,...$e}=Se||{};A==null||A.mutate({action:"update",resource:Y.name,data:se,previousData:Oe,meta:{...$e,dataProviderName:ae,id:V}}),(k=y==null?void 0:y.onSuccess)==null||k.call(y,X,P,B)},onError:(X,P,B)=>{var U;const{id:k=e,resource:V=t,errorNotification:J=s,values:le=n}=P;if(typeof k>"u")throw hc;if(!le)throw Gd;if(!V)throw dc;const{identifier:ie}=b(V);if(B!=null&&B.previousQueries)for(const se of B.previousQueries)v.setQueryData(se[0],se[1]);if(X.message!=="mutationCancelled"){R==null||R(X);const se=I.singular(ie),fe=typeof J=="function"?J(X,{id:k,values:le},ie):J;M(fe,{key:`${k}-${ie}-notification`,message:C("notifications.editError",{resource:C(`${ie}.${ie}`,se),statusCode:X.statusCode},`Error when updating ${se} (status code: ${X.statusCode})`),description:X.message,type:"error"})}(U=y==null?void 0:y.onError)==null||U.call(y,X,P,B)},mutationKey:L().data().mutation("update").get(),...y,meta:{...y==null?void 0:y.meta,...zn()}}),{mutate:G,mutateAsync:q}=K,{elapsedTime:Q}=mf({...S,isLoading:K.isPending});return{mutation:K,mutate:oe((X,P)=>G(X||{},P),"handleMutation"),mutateAsync:oe((X,P)=>q(X||{},P),"handleMutateAsync"),overtime:{elapsedTime:Q}}},"useUpdate"),dc=new Error("[useUpdate]: `resource` is not defined or not matched but is required"),hc=new Error("[useUpdate]: `id` is not defined but is required in edit and clone actions"),Gd=new Error("[useUpdate]: `values` is not provided but is required"),OL=oe(({resource:e,values:t,dataProviderName:n,successNotification:i,errorNotification:o,invalidates:s,meta:u,mutationOptions:c,overtimeOptions:f}={})=>{const{mutate:d}=ou(),m=gf(),p=su(),{resources:y,select:S}=sn(),g=Fn(),b=qb(),{log:v}=Kb(),_=vf(),x=uu(),{options:{textTransformers:E}}=js(),{keys:R}=_n(),C=pi({mutationFn:({resource:I=e,values:L=t,meta:K=u,dataProviderName:G=n})=>{if(!L)throw by;if(!I)throw yy;const{resource:q,identifier:Q}=S(I),W=x({resource:q,meta:K});return m(On(Q,G,y)).create({resource:q.name,variables:L,meta:W})},onSuccess:(I,L,K)=>{var G,q,Q;const{resource:W=e,successNotification:ne=i,dataProviderName:X=n,invalidates:P=s??["list","many"],values:B=t,meta:U=u}=L;if(!B)throw by;if(!W)throw yy;const{resource:k,identifier:V}=S(W),J=E.singular(V),le=On(V,X,y),ie=x({resource:k,meta:U}),se=typeof ne=="function"?ne(I,B,V):ne;_(se,{key:`create-${V}-notification`,message:g("notifications.createSuccess",{resource:g(`${V}.${V}`,J)},`Successfully created ${J}`),description:g("notifications.success","Success"),type:"success"}),p({resource:V,dataProviderName:le,invalidates:P}),b==null||b({channel:`resources/${k.name}`,type:"created",payload:{ids:(G=I==null?void 0:I.data)!=null&&G.id?[I.data.id]:void 0},date:new Date,meta:{...ie,dataProviderName:le}});const{fields:fe,operation:Y,variables:Z,...ue}=ie||{};v==null||v.mutate({action:"create",resource:k.name,data:B,meta:{...ue,dataProviderName:le,id:((q=I==null?void 0:I.data)==null?void 0:q.id)??void 0}}),(Q=c==null?void 0:c.onSuccess)==null||Q.call(c,I,L,K)},onError:(I,L,K)=>{var G;const{resource:q=e,errorNotification:Q=o,values:W=t}=L;if(!W)throw by;if(!q)throw yy;d(I);const{identifier:ne}=S(q),X=E.singular(ne),P=typeof Q=="function"?Q(I,W,ne):Q;_(P,{key:`create-${ne}-notification`,description:I.message,message:g("notifications.createError",{resource:g(`${ne}.${ne}`,X),statusCode:I.statusCode},`There was an error creating ${X} (status code: ${I.statusCode})`),type:"error"}),(G=c==null?void 0:c.onError)==null||G.call(c,I,L,K)},mutationKey:R().data().mutation("create").get(),...c,meta:{...c==null?void 0:c.meta,...zn()}}),{mutate:$,mutateAsync:A,...T}=C,{elapsedTime:M}=mf({...f,isLoading:T.isPending});return{mutation:C,mutate:oe((I,L)=>$(I||{},L),"handleMutation"),mutateAsync:oe((I,L)=>A(I||{},L),"handleMutateAsync"),overtime:{elapsedTime:M}}},"useCreate"),yy=new Error("[useCreate]: `resource` is not defined or not matched but is required"),by=new Error("[useCreate]: `values` is not provided but is required"),kb=oe(({mutationOptions:e,overtimeOptions:t}={})=>{const{mutate:n}=ou(),i=gf(),{resources:o,select:s}=sn(),u=Oa(),{mutationMode:c,undoableTimeout:f}=zb(),{notificationDispatch:d}=Ub(),m=Fn(),p=qb(),{log:y}=Kb(),S=vf(),g=su(),b=uu(),{options:{textTransformers:v}}=js(),{keys:_}=_n(),x=pi({mutationFn:({id:R,mutationMode:C,undoableTimeout:$,resource:A,onCancel:T,meta:M,dataProviderName:D,values:j})=>{const{resource:I,identifier:L}=s(A),K=b({resource:I,meta:M}),G=C??c,q=$??f;return G!=="undoable"?i(On(L,D,o)).deleteOne({resource:I.name,id:R,meta:K,variables:j}):new Promise((W,ne)=>{const X=oe(()=>{i(On(L,D,o)).deleteOne({resource:I.name,id:R,meta:K,variables:j}).then(B=>W(B)).catch(B=>ne(B))},"doMutation"),P=oe(()=>{ne({message:"mutationCancelled"})},"cancelMutation");T&&T(P),d({type:"ADD",payload:{id:R,resource:L,cancelMutation:P,doMutation:X,seconds:q,isSilent:!!T}})})},onMutate:async({id:R,resource:C,mutationMode:$,dataProviderName:A,meta:T})=>{const{identifier:M}=s(C),{gqlMutation:D,gqlQuery:j,...I}=T??{},L=_().data(On(M,A,o)).resource(M),K=$??c;await u.cancelQueries({queryKey:L.get()});const G=u.getQueriesData({queryKey:L.get()});return K!=="pessimistic"&&(u.setQueriesData({queryKey:L.action("list").params(I??{}).get()},q=>q?{data:q.data.filter(W=>{var ne;return((ne=W.id)==null?void 0:ne.toString())!==R.toString()}),total:q.total-1}:null),u.setQueriesData({queryKey:L.action("many").get()},q=>{if(!q)return null;const Q=q.data.filter(W=>{var ne;return((ne=W.id)==null?void 0:ne.toString())!==(R==null?void 0:R.toString())});return{...q,data:Q}})),{previousQueries:G,queryKey:L.get()}},onSettled:(R,C,{id:$,resource:A,dataProviderName:T,invalidates:M=["list","many"]})=>{const{identifier:D}=s(A);g({resource:D,dataProviderName:On(D,T,o),invalidates:M}),d({type:"REMOVE",payload:{id:$,resource:D}})},onSuccess:(R,{id:C,resource:$,successNotification:A,dataProviderName:T,meta:M},D)=>{const{resource:j,identifier:I}=s($),L=v.singular(I),K=On(I,T,o),G=b({resource:j,meta:M}),q=_().data(On(I,K,o)).resource(I);u.removeQueries({queryKey:q.action("one").get()});const Q=typeof A=="function"?A(R,C,I):A;S(Q,{key:`${C}-${I}-notification`,description:m("notifications.success","Success"),message:m("notifications.deleteSuccess",{resource:m(`${I}.${I}`,L)},`Successfully deleted a ${L}`),type:"success"}),p==null||p({channel:`resources/${j.name}`,type:"deleted",payload:{ids:[C]},date:new Date,meta:{...G,dataProviderName:K}});const{fields:W,operation:ne,variables:X,...P}=G||{};y==null||y.mutate({action:"delete",resource:j.name,meta:{...P,dataProviderName:K,id:C}}),u.removeQueries({queryKey:q.action("one").get()})},onError:(R,{id:C,resource:$,errorNotification:A},T)=>{const{identifier:M}=s($);if(T)for(const D of T.previousQueries)u.setQueryData(D[0],D[1]);if(R.message!=="mutationCancelled"){n(R);const D=v.singular(M),j=typeof A=="function"?A(R,C,M):A;S(j,{key:`${C}-${M}-notification`,message:m("notifications.deleteError",{resource:D,statusCode:R.statusCode},`Error (status code: ${R.statusCode})`),description:R.message,type:"error"})}},mutationKey:_().data().mutation("delete").get(),...e,meta:{...e==null?void 0:e.meta,...zn()}}),{elapsedTime:E}=mf({...t,isLoading:x.isPending});return{mutation:x,mutate:x.mutate,mutateAsync:x.mutateAsync,overtime:{elapsedTime:E}}},"useDelete"),jT={default:{}},Lb=he.createContext(jT),AL=oe(({children:e,dataProvider:t})=>{let n=jT;return t&&(!("default"in t)&&("getList"in t||"getOne"in t)?n={default:t}:n=t),he.createElement(Lb.Provider,{value:n},e)},"DataContextProvider"),gf=oe(()=>{const e=z.useContext(Lb);return z.useCallback(n=>{if(n){const i=e==null?void 0:e[n];if(!i)throw new Error(`"${n}" Data provider not found`);if(i&&!(e!=null&&e.default))throw new Error("If you have multiple data providers, you must provide default data provider property");return e[n]}if(e.default)return e.default;throw new Error('There is no "default" data provider. Please pass dataProviderName.')},[e])},"useDataProvider"),kp=he.createContext({}),$L=oe(({liveProvider:e,children:t})=>he.createElement(kp.Provider,{value:{liveProvider:e}},t),"LiveContextProvider"),su=oe(()=>{const{resources:e}=sn(),t=Oa(),{keys:n}=_n();return z.useCallback(async({resource:o,dataProviderName:s,invalidates:u,id:c,invalidationFilters:f={type:"all",refetchType:"active"},invalidationOptions:d={cancelRefetch:!1}})=>{if(u===!1)return;const m=On(o,s,e),p=n().data(m).resource(o??"");await Promise.all(u.map(y=>{switch(y){case"all":return t.invalidateQueries({queryKey:n().data(m).get(),...f,...d});case"list":return t.invalidateQueries({queryKey:p.action("list").get(),...f,...d});case"many":return t.invalidateQueries({queryKey:p.action("many").get(),...f,...d});case"resourceAll":return t.invalidateQueries({queryKey:p.get(),...f,...d});case"detail":return t.invalidateQueries({queryKey:p.action("one").id(c||"").get(),...f,...d});default:return}}))},[])},"useInvalidate"),NT=oe(({resource:e,params:t,channel:n,types:i,enabled:o=!0,liveMode:s,onLiveEvent:u,meta:c})=>{var f;const{resource:d,identifier:m}=sn({resource:e}),{liveProvider:p}=z.useContext(kp),{liveMode:y,onLiveEvent:S}=z.useContext(No),g=s??y,b=su(),v=(c==null?void 0:c.dataProviderName)??((f=d==null?void 0:d.meta)==null?void 0:f.dataProviderName);z.useEffect(()=>{let _;const x=oe(E=>{g==="auto"&&b({resource:m,dataProviderName:v,invalidates:["resourceAll"],invalidationFilters:{type:"active",refetchType:"active"},invalidationOptions:{cancelRefetch:!1}}),u==null||u(E),S==null||S(E)},"callback");return g&&g!=="off"&&o&&(_=p==null?void 0:p.subscribe({channel:n,params:{resource:d==null?void 0:d.name,...t},types:i,callback:x,meta:{...c,dataProviderName:v}})),()=>{_&&(p==null||p.unsubscribe(_))}},[o])},"useResourceSubscription"),TL=oe(e=>{const{liveMode:t}=z.useContext(No);return e??t},"useLiveMode"),qb=oe(()=>{const{liveProvider:e}=z.useContext(kp);return e==null?void 0:e.publish},"usePublish"),PT=z.createContext({notifications:[],notificationDispatch:()=>!1}),ML=[],DL=oe((e,t)=>{switch(t.type){case"ADD":return[...e.filter(i=>!(di(i.id,t.payload.id)&&i.resource===t.payload.resource)),{...t.payload,isRunning:!0}];case"REMOVE":return e.filter(n=>!(di(n.id,t.payload.id)&&n.resource===t.payload.resource));case"DECREASE_NOTIFICATION_SECOND":return e.map(n=>di(n.id,t.payload.id)&&n.resource===t.payload.resource?{...n,seconds:t.payload.seconds-1e3}:n);default:return e}},"undoableQueueReducer"),jL=oe(({children:e})=>{const[t,n]=z.useReducer(DL,ML),i={notifications:t,notificationDispatch:n};return he.createElement(PT.Provider,{value:i},e,typeof window<"u"?t.map(o=>he.createElement(_4,{key:`${o.id}-${o.resource}-queue`,notification:o})):null)},"UndoableQueueContextProvider"),Ub=oe(()=>{const{notifications:e,notificationDispatch:t}=z.useContext(PT);return{notifications:e,notificationDispatch:t}},"useCancelNotification"),Bb=z.createContext({}),NL=oe(({open:e,close:t,children:n})=>he.createElement(Bb.Provider,{value:{open:e,close:t}},n),"NotificationContextProvider"),Ns=oe(()=>{const{open:e,close:t}=z.useContext(Bb);return{open:e,close:t}},"useNotification"),vf=oe(()=>{const{open:e}=Ns();return z.useCallback((n,i)=>{n!==!1&&(n?e==null||e(n):i&&(e==null||e(i)))},[])},"useHandleNotification"),Lp=he.createContext({}),PL=oe(({children:e,i18nProvider:t})=>he.createElement(Lp.Provider,{value:{i18nProvider:t}},e),"I18nContextProvider"),Fn=oe(()=>{const{i18nProvider:e}=z.useContext(Lp);return z.useMemo(()=>{function n(i,o,s){return(e==null?void 0:e.translate(i,o,s))??s??(typeof o=="string"&&typeof s>"u"?o:i)}return oe(n,"translate"),n},[e])},"useTranslate"),IT={},lu=z.createContext(IT),IL=oe(({children:e,router:t})=>he.createElement(lu.Provider,{value:t??IT},e),"RouterContextProvider"),zL=oe(e=>{const t=z.useRef(e);return di(t.current,e)||(t.current=e),t.current},"useMemoized"),zT=oe((e,t)=>{const n=zL(t);return z.useMemo(e,n)},"useDeepMemo"),yf=he.createContext({resources:[]}),FL=oe(({resources:e,children:t})=>{const n=zT(()=>e??[],[e]);return he.createElement(yf.Provider,{value:{resources:n}},t)},"ResourceContextProvider"),kL=oe(()=>{const e=z.useContext(lu);return he.useMemo(()=>(e==null?void 0:e.parse)??(()=>()=>({})),[e==null?void 0:e.parse])()},"useParse"),Dr=oe(()=>{const e=kL();return he.useMemo(()=>e(),[e])},"useParsed"),LL=oe(e=>{const t=Dr();return e??t.id},"useId"),qL=oe(e=>{const t=Dr();return e??t.action},"useAction");function FT(e){const{resources:t}=z.useContext(yf),n=Dr(),i=oe((u,c=!0)=>{const f=Di(u,t);if(f)return{resource:f,identifier:f.identifier??f.name};if(c){const d={name:u,identifier:u},m=d.identifier??d.name;return{resource:d,identifier:m}}},"select");let o;const s=e;if(s){const u=Di(s,t);u?o=u:o={name:s}}else n!=null&&n.resource&&(o=n.resource);return{resources:t,resource:o,select:i,identifier:(o==null?void 0:o.identifier)??(o==null?void 0:o.name)}}oe(FT,"useResource");function sn(e){const{resources:t}=z.useContext(yf),{select:n,identifier:i,resource:o}=FT(),s=(e==null?void 0:e.resource)??i,{identifier:u=void 0,resource:c=void 0}=s?n(s,!0):{},f=i===u,d=LL(),m=qL(e==null?void 0:e.action),p=he.useMemo(()=>f?(e==null?void 0:e.id)??d:e==null?void 0:e.id,[f,e==null?void 0:e.id,d]),[y,S]=he.useState(p);he.useMemo(()=>S(p),[p]);const g=he.useMemo(()=>!f&&!(e!=null&&e.action)?"create":m==="edit"||m==="clone"?m:"create",[m,f,e==null?void 0:e.action]);return{id:y,setId:S,resource:c||o,resources:t,action:m,identifier:u,formAction:g,select:n}}oe(sn,"useResourceParams");var qp=oe(()=>{const{resource:e,resources:t}=sn(),n=Dr();return he.useCallback(({resource:o,action:s,meta:u})=>{var c;const f=o||e;if(!f)return;const d=t.find(S=>!S.identifier||!f.identifier?!1:S.identifier===f.identifier)??t.find(S=>S.identifier?S.identifier===f.name:!1)??t.find(S=>S.name===f.name)??f,p=(c=uo(d,t).find(S=>S.action===s))==null?void 0:c.route;if(!p){cf(!0,`[useGetToPath]: Could not find a route for the "${s}" action of the "${f.name}" resource. Please make sure that the resource has the "${s}" property defined.`);return}return cs(p,d==null?void 0:d.meta,n,u)},[t,e,n])},"useGetToPath"),er=oe(()=>{const e=z.useContext(lu),{select:t}=sn(),n=qp(),o=he.useMemo(()=>(e==null?void 0:e.go)??(()=>()=>{}),[e==null?void 0:e.go])();return z.useCallback(u=>{if(typeof u.to!="object")return o({...u,to:u.to});const{resource:c}=t(u.to.resource);UL(u.to,c);const f=n({resource:c,action:u.to.action,meta:{id:u.to.id,...u.to.meta}});return o({...u,to:f})},[t,o])},"useGo"),UL=oe((e,t)=>{if(!(e!=null&&e.action)||!(e!=null&&e.resource))throw new Error('[useGo]: "action" or "resource" is required.');if(["edit","show","clone"].includes(e==null?void 0:e.action)&&!e.id)throw new Error(`[useGo]: [action: ${e.action}] requires an "id" for resource [resource: ${e.resource}]`);if(!t[e.action])throw new Error(`[useGo]: [action: ${e.action}] is not defined for [resource: ${e.resource}]`)},"handleResourceErrors"),BL=oe(()=>{const{resources:e}=sn(),t=Dr(),n=er(),i=oe((g,b="push")=>{n({to:g,type:b})},"handleUrl"),o=oe((g,b={})=>{var v;const _=typeof g=="string"?Di(g,e)??{name:g}:g,x=(v=uo(_,e).find(E=>E.action==="create"))==null?void 0:v.route;return x?n({to:cs(x,_==null?void 0:_.meta,t,b),type:"path",query:b.query}):""},"createUrl"),s=oe((g,b,v={})=>{var _;const x=encodeURIComponent(b),E=typeof g=="string"?Di(g,e)??{name:g}:g,R=(_=uo(E,e).find(C=>C.action==="edit"))==null?void 0:_.route;return R?n({to:cs(R,E==null?void 0:E.meta,t,{...v,id:x}),type:"path",query:v.query}):""},"editUrl"),u=oe((g,b,v={})=>{var _;const x=encodeURIComponent(b),E=typeof g=="string"?Di(g,e)??{name:g}:g,R=(_=uo(E,e).find(C=>C.action==="clone"))==null?void 0:_.route;return R?n({to:cs(R,E==null?void 0:E.meta,t,{...v,id:x}),type:"path",query:v.query}):""},"cloneUrl"),c=oe((g,b,v={})=>{var _;const x=encodeURIComponent(b),E=typeof g=="string"?Di(g,e)??{name:g}:g,R=(_=uo(E,e).find(C=>C.action==="show"))==null?void 0:_.route;return R?n({to:cs(R,E==null?void 0:E.meta,t,{...v,id:x}),type:"path",query:v.query}):""},"showUrl"),f=oe((g,b={})=>{var v;const _=typeof g=="string"?Di(g,e)??{name:g}:g,x=(v=uo(_,e).find(E=>E.action==="list"))==null?void 0:v.route;return x?n({to:cs(x,_==null?void 0:_.meta,t,b),type:"path",query:b.query}):""},"listUrl");return{create:oe((g,b="push",v={})=>{i(o(g,v),b)},"create"),createUrl:o,edit:oe((g,b,v="push",_={})=>{i(s(g,b,_),v)},"edit"),editUrl:s,clone:oe((g,b,v="push",_={})=>{i(u(g,b,_),v)},"clone"),cloneUrl:u,show:oe((g,b,v="push",_={})=>{i(c(g,b,_),v)},"show"),showUrl:c,list:oe((g,b="push",v={})=>{i(f(g,v),b)},"list"),listUrl:f}},"useNavigation"),VL=oe((e,t)=>{const n=z.useContext(lu),i=n==null?void 0:n.Link,o=er();let s="";return"go"in e&&(n!=null&&n.go||cf(!0,"[Link]: `routerProvider` is not found. To use `go`, Please make sure that you have provided the `routerProvider` for `<Refine />` https://refine.dev/docs/routing/router-provider/ \n"),s=o({...e.go,type:"path"})),"to"in e&&(s=e.to),i?he.createElement(i,{ref:t,...e,to:s,go:void 0}):he.createElement("a",{ref:t,href:s,...e,to:void 0,go:void 0})},"LinkComponent"),HL=z.forwardRef(VL),KL=oe(()=>HL,"useLink"),bf=he.createContext({options:{buttons:{enableAccessControl:!0,hideIfUnauthorized:!1}}}),GL=oe(({can:e,children:t,options:n})=>he.createElement(bf.Provider,{value:{can:e,options:n?{...n,buttons:{enableAccessControl:!0,hideIfUnauthorized:!1,...n.buttons}}:{buttons:{enableAccessControl:!0,hideIfUnauthorized:!1},queryOptions:void 0}}},t),"AccessControlContextProvider"),Vb=oe(e=>{if(!e)return;const{list:t,edit:n,create:i,show:o,clone:s,children:u,meta:c,icon:f,...d}=e,{icon:m,...p}=c??{};return{...d,...c?{meta:p}:{}}},"sanitizeResource"),QL=oe(({action:e,resource:t,params:n,queryOptions:i})=>{const{can:o,options:s}=z.useContext(bf),{keys:u}=_n(),{queryOptions:c}=s||{},f={...c,...i},{resource:d,...m}=n??{},p=Vb(d),y=tu({queryKey:u().access().resource(t).action(e).params({params:{...m,resource:p},enabled:f==null?void 0:f.enabled}).get(),queryFn:()=>(o==null?void 0:o({action:e,resource:t,params:{...m,resource:p}}))??Promise.resolve({can:!0}),enabled:typeof o<"u",...f,meta:{...f==null?void 0:f.meta,...zn()},retry:!1});return typeof o>"u"?{data:{can:!0}}:y},"useCan"),YL=oe(()=>{const{can:e}=he.useContext(bf);return{can:he.useMemo(()=>e?oe(async({params:i,...o})=>{const s=i!=null&&i.resource?Vb(i.resource):void 0;return e({...o,...i?{params:{...i,resource:s}}:{}})},"canWithSanitizedResource"):void 0,[e])}},"useCanWithoutCache"),WL=[],XL=[],JL=Object.freeze([]);function ZL({pagination:e,filters:t,sorters:n,syncWithLocation:i,resource:o,successNotification:s,errorNotification:u,queryOptions:c,liveMode:f,onLiveEvent:d,liveParams:m,meta:p,dataProviderName:y,overtimeOptions:S}={}){var g,b,v,_,x,E,R,C,$;const{syncWithLocation:A}=fL(),T=i??A,M=TL(f),D=uu(),j=Dr(),I=((t==null?void 0:t.mode)||"server")==="server",L=((n==null?void 0:n.mode)||"server")==="server",K=(e==null?void 0:e.mode)!=="off",G=e==null?void 0:e.currentPage,q=e==null?void 0:e.pageSize,Q=p,{parsedCurrentPage:W,parsedPageSize:ne,parsedSorter:X,parsedFilters:P}=Xk(((g=j.params)==null?void 0:g.search)??"?"),B=t==null?void 0:t.initial,U=(t==null?void 0:t.permanent)??WL,k=n==null?void 0:n.initial,V=(n==null?void 0:n.permanent)??XL,J=(t==null?void 0:t.defaultBehavior)??"merge";let le,ie,se,fe;T?(le=((b=j==null?void 0:j.params)==null?void 0:b.currentPage)||W||G||1,ie=((v=j==null?void 0:j.params)==null?void 0:v.pageSize)||ne||q||10,se=((_=j==null?void 0:j.params)==null?void 0:_.sorters)||(X.length?X:k),fe=((x=j==null?void 0:j.params)==null?void 0:x.filters)||(P.length?P:B)):(le=G||1,ie=q||10,se=k,fe=B);const Y=er(),{resource:Z,identifier:ue}=sn({resource:o}),ae=D({resource:Z,meta:Q});he.useEffect(()=>{cf(typeof ue>"u","useTable: `resource` is not defined.")},[ue]);const[Se,ye]=z.useState(CC(V,se??[])),[Oe,Re]=z.useState(xC(U,fe??[])),[Ce,Ae]=z.useState(le),[$e,Fe]=z.useState(ie),Ie=oe(()=>{const{sorters:He,filters:At,pageSize:ln,current:$t,...mn}=(j==null?void 0:j.params)??{};return mn},"getCurrentQueryParams"),je=oe(({pagination:{currentPage:He,pageSize:At},sorters:ln,filters:$t})=>Y({type:"path",options:{keepHash:!0,keepQuery:!0},query:{...K?{currentPage:He,pageSize:At}:{},sorters:ln,filters:$t,...Ie()}})??"","createLinkForSyncWithLocation");z.useEffect(()=>{var He;((He=j==null?void 0:j.params)==null?void 0:He.search)===""&&(Ae(le),Fe(ie),ye(CC(V,se??[])),Re(xC(U,fe??[])))},[(E=j==null?void 0:j.params)==null?void 0:E.search]),z.useEffect(()=>{T&&Y({type:"replace",options:{keepQuery:!0},query:{...K?{pageSize:$e,currentPage:Ce}:{},sorters:hp(Se,V,di),filters:hp(Oe,U,di)}})},[T,Ce,$e,Se,Oe]);const Ye=DT({resource:ue,pagination:{currentPage:Ce,pageSize:$e,mode:e==null?void 0:e.mode},filters:I?Kd(U,Oe):void 0,sorters:L?EC(V,Se):void 0,queryOptions:c,overtimeOptions:S,successNotification:s,errorNotification:u,meta:ae,liveMode:M,liveParams:m,onLiveEvent:d,dataProviderName:y}),ke=z.useCallback(He=>{Re(At=>Kd(U,He,At))},[U]),Je=z.useCallback(He=>{Re(Kd(U,He))},[U]),tt=z.useCallback(He=>{Re(At=>Kd(U,He(At)))},[U]),wt=z.useCallback((He,At=J)=>{typeof He=="function"?tt(He):At==="replace"?Je(He):ke(He)},[tt,Je,ke]),tn=z.useCallback(He=>{ye(()=>EC(V,He))},[V]);return{tableQuery:Ye.query,sorters:Se,setSorters:tn,filters:Oe,setFilters:wt,currentPage:Ce,setCurrentPage:Ae,pageSize:$e,setPageSize:Fe,pageCount:$e?Math.ceil((((R=Ye.result)==null?void 0:R.total)??0)/$e):1,createLinkForSyncWithLocation:je,overtime:Ye.overtime,result:{data:((C=Ye.result)==null?void 0:C.data)||JL,total:($=Ye.result)==null?void 0:$.total}}}oe(ZL,"useTable");var Hb=he.createContext({}),e4=oe(({create:e,get:t,update:n,children:i})=>he.createElement(Hb.Provider,{value:{create:e,get:t,update:n}},i),"AuditLogContextProvider"),Kb=oe(({logMutationOptions:e,renameMutationOptions:t}={})=>{const n=Oa(),i=z.useContext(Hb),{keys:o}=_n(),{resources:s}=z.useContext(yf),{data:u,refetch:c,isLoading:f}=$T({queryOptions:{enabled:!!(i!=null&&i.create)}}),d=pi({mutationFn:async p=>{var y,S;const g=Di(p.resource,s),b=(y=g==null?void 0:g.meta)==null?void 0:y.audit;if(b&&!Jk(b,p.action))return;let v;return f&&(i!=null&&i.create)&&(v=await c()),await((S=i.create)==null?void 0:S.call(i,{...p,author:u??(v==null?void 0:v.data)}))},mutationKey:o().audit().action("log").get(),...e,meta:{...e==null?void 0:e.meta,...zn()}}),m=pi({mutationFn:async p=>{var y;return await((y=i.update)==null?void 0:y.call(i,p))},onSuccess:p=>{p!=null&&p.resource&&n.invalidateQueries({queryKey:o().audit().resource((p==null?void 0:p.resource)??"").action("list").get()})},mutationKey:o().audit().action("rename").get(),...t,meta:{...t==null?void 0:t.meta,...zn()}});return{log:d,rename:m}},"useLog"),t4=oe(({meta:e={}}={})=>{const{i18nProvider:t}=z.useContext(Lp),n=Dr(),i=Fn(),{action:o,resource:s,resources:u}=sn(),{options:{textTransformers:c}}=js(),f=[];if(!(s!=null&&s.name))return{breadcrumbs:f};const d=oe(m=>{var p,y,S,g;const b=typeof m=="string"?Di(m,u)??{name:m}:m;if(b){const v=(p=b==null?void 0:b.meta)==null?void 0:p.parent;v&&d(v);const _=uo(b,u).find(R=>R.action==="list"),x=(y=_==null?void 0:_.resource)!=null&&y.list?_==null?void 0:_.route:void 0,E=x?cs(x,b==null?void 0:b.meta,n,e):void 0;f.push({label:((S=b.meta)==null?void 0:S.label)??i(`${b.name}.${b.name}`,c.humanize(b.name)),href:E,icon:(g=b.meta)==null?void 0:g.icon})}},"addBreadcrumb");if(d(s),o&&o!=="list"){const m=`actions.${o}`,p=i(m);typeof t<"u"&&p===m?(cf(!0,`[useBreadcrumb]: Breadcrumb missing translate key for the "${o}" action. Please add "actions.${o}" key to your translation file.
|
|
76
|
-
For more information, see https://refine.dev/docs/api-reference/core/hooks/useBreadcrumb/#i18n-support`),f.push({label:i(`buttons.${o}`,c.humanize(o))})):f.push({label:i(m,c.humanize(o))})}return{breadcrumbs:f}},"useBreadcrumb"),Xh=oe((e,t)=>{const n=[];let i=Wl(e,t);for(;i;)n.push(i),i=Wl(i,t);return n.reverse(),`/${[...n,e].map(s=>Bc(s.identifier??s.name)).join("/").replace(/^\//,"")}`},"createResourceKey"),n4=oe(e=>{const t={item:{name:"__root__"},children:{}};e.forEach(i=>{const o=[];let s=Wl(i,e);for(;s;)o.push(s),s=Wl(s,e);o.reverse();let u=t;o.forEach(f=>{const d=f.identifier??f.name;u.children[d]||(u.children[d]={item:f,children:{}}),u=u.children[d]});const c=i.identifier??i.name;u.children[c]||(u.children[c]={item:i,children:{}})});const n=oe(i=>{const o=[];return Object.keys(i.children).forEach(s=>{const u=Xh(i.children[s].item,e),c={...i.children[s].item,key:u,children:n(i.children[s])};o.push(c)}),o},"flatten");return n(t)},"createTree"),r4=oe(e=>e.split("?")[0].split("#")[0].replace(/(.+)(\/$)/,"$1"),"getCleanPath"),i4=oe(({meta:e,hideOnMissingParameter:t=!0}={hideOnMissingParameter:!0})=>{const n=Fn(),i=qp(),{resource:o,resources:s}=sn(),{pathname:u}=Dr(),c=pf(),d=`/${((u?r4(u):void 0)??"").replace(/^\//,"")}`,m=o?Xh(o,s):d??"",p=he.useMemo(()=>{if(!o)return[];let g=Wl(o,s);const b=[Xh(o,s)];for(;g;)b.push(Xh(g,s)),g=Wl(g,s);return b},[]),y=he.useCallback(g=>{var b,v,_;if((b=g==null?void 0:g.meta)!=null&&b.hide||!(g!=null&&g.list)&&g.children.length===0)return;const x=g.list?i({resource:g,action:"list",meta:e}):void 0;if(!(t&&x&&x.match(/(\/|^):(.+?)(\/|$){1}/)))return{...g,route:x,icon:(v=g.meta)==null?void 0:v.icon,label:((_=g==null?void 0:g.meta)==null?void 0:_.label)??n(`${g.name}.${g.name}`,c(g.name,"plural"))}},[e,i,n,t]),S=he.useMemo(()=>{const g=n4(s),b=oe(v=>v.flatMap(_=>{const x=b(_.children),E=y({..._,children:x});return E?[E]:[]}),"prepare");return b(g)},[s,y]);return{defaultOpenKeys:p,selectedKey:m,menuItems:S}},"useMenu"),MC=z.createContext({}),a4=oe(()=>{if(!z.useContext(MC))throw new Error("useMetaContext must be used within a MetaContextProvider");return z.useContext(MC)},"useMetaContext"),uu=oe(()=>{const{params:e}=Dr(),t=a4();return oe(({resource:i,meta:o}={})=>{const{meta:s}=Vb(i)??{meta:{}},{filters:u,sorters:c,currentPage:f,pageSize:d,...m}=e??{},p={...s,...m,...o};return t!=null&&t.tenantId&&(p.tenantId=t.tenantId),p},"getMetaFn")},"useMeta"),kT=oe(()=>{const{options:e}=he.useContext(No);return e},"useRefineOptions");function o4({type:e}){const t=Fn(),{textTransformers:{humanize:n}}=kT(),i=`buttons.${e}`,o=n(e);return{label:t(i,o)}}oe(o4,"useActionableButton");var LT=oe(e=>{var t,n,i;const o=Fn(),s=he.useContext(bf),u=((t=e.accessControl)==null?void 0:t.enabled)??s.options.buttons.enableAccessControl,c=((n=e.accessControl)==null?void 0:n.hideIfUnauthorized)??s.options.buttons.hideIfUnauthorized,{data:f}=QL({resource:(i=e.resource)==null?void 0:i.name,action:e.action==="clone"?"create":e.action,params:{meta:e.meta,id:e.id,resource:e.resource},queryOptions:{enabled:u}}),d=he.useMemo(()=>f!=null&&f.can?"":f!=null&&f.reason?f.reason:o("buttons.notAccessTitle","You don't have permission to access"),[f==null?void 0:f.can,f==null?void 0:f.reason,o]),m=u&&c&&!(f!=null&&f.can),p=(f==null?void 0:f.can)===!1;return{title:d,hidden:m,disabled:p,canAccess:f}},"useButtonCanAccess");function s4(e){var t;const n=BL(),i=KL(),o=Fn(),s=pf(),{textTransformers:{humanize:u}}=kT(),{id:c,resource:f,identifier:d}=sn({resource:e.resource,id:e.action==="create"?void 0:e.id}),{canAccess:m,title:p,hidden:y,disabled:S}=LT({action:e.action,accessControl:e.accessControl,meta:e.meta,id:c,resource:f}),g=i,b=he.useMemo(()=>{if(!f)return"";switch(e.action){case"create":case"list":return n[`${e.action}Url`](f,e.meta);default:return c?n[`${e.action}Url`](f,c,e.meta):""}},[f,c,e.meta,n[`${e.action}Url`]]),v=e.action==="list"?o(`${d??e.resource}.titles.list`,s(((t=f==null?void 0:f.meta)==null?void 0:t.label)??d??e.resource,"plural")):o(`buttons.${e.action}`,u(e.action));return{to:b,label:v,title:p,disabled:S,hidden:y,canAccess:m,LinkComponent:g}}oe(s4,"useNavigationButton");function l4(e){const t=Fn(),{mutation:{mutate:n,isPending:i,variables:o}}=kb(),{setWarnWhen:s}=gT(),{mutationMode:u}=zb(e.mutationMode),{id:c,resource:f,identifier:d}=sn({resource:e.resource,id:e.id}),{title:m,disabled:p,hidden:y,canAccess:S}=LT({action:"delete",accessControl:e.accessControl,id:c,resource:f}),g=t("buttons.delete","Delete"),b=t("buttons.delete","Delete"),v=t("buttons.confirm","Are you sure?"),_=t("buttons.cancel","Cancel"),x=c===(o==null?void 0:o.id)&&i;return{label:g,title:m,hidden:y,disabled:p,canAccess:S,loading:x,confirmOkLabel:b,cancelLabel:_,confirmTitle:v,onConfirm:oe(()=>{c&&d&&(s(!1),n({id:c,resource:d,mutationMode:u,successNotification:e.successNotification,errorNotification:e.errorNotification,meta:e.meta,dataProviderName:e.dataProviderName,invalidates:e.invalidates},{onSuccess:e.onSuccess}))},"onConfirm")}}oe(l4,"useDeleteButton");function u4(e){const t=Fn(),{keys:n}=_n(),i=Oa(),o=su(),{identifier:s,id:u,resources:c}=sn({resource:e.resource,id:e.id}),f=!!i.isFetching({queryKey:n().data(On(s,e.dataProviderName,c)).resource(s).action("one").get()}),d=oe(()=>{o({id:u,invalidates:["detail"],dataProviderName:e.dataProviderName,resource:s})},"onClick"),m=t("buttons.refresh","Refresh");return{onClick:d,label:m,loading:f}}oe(u4,"useRefreshButton");var c4=oe(()=>{const[e,t]=z.useState(),n=Fn(),i=er(),{action:o,resource:s}=sn();return z.useEffect(()=>{s&&o&&t(n("pages.error.info",{action:o,resource:s.name},`You may have forgotten to add the "${o}" component to "${s.name}" resource.`))},[s,o]),he.createElement(he.Fragment,null,he.createElement("h1",null,n("pages.error.404",void 0,"Sorry, the page you visited does not exist.")),e&&he.createElement("p",null,e),he.createElement("button",{onClick:()=>{i({to:"/"})}},n("pages.error.backHome",void 0,"Back Home")))},"ErrorComponent"),f4="5.0.8",d4=oe(()=>{var e;const t=EL(),n=z.useContext(Hb),{liveProvider:i}=z.useContext(kp),o=z.useContext(lu),s=z.useContext(Lb),{i18nProvider:u}=z.useContext(Lp),c=z.useContext(Bb),f=z.useContext(bf),{resources:d}=sn(),m=js(),p=!!n.create||!!n.get||!!n.update,y=!!(i!=null&&i.publish)||!!(i!=null&&i.subscribe)||!!(i!=null&&i.unsubscribe),S=!!o.Link||!!o.go||!!o.back||!!o.parse,g=!!s,b=!!(u!=null&&u.changeLocale)||!!(u!=null&&u.getLocale)||!!(u!=null&&u.translate),v=!!c.close||!!c.open,_=!!f.can,x=(e=m==null?void 0:m.options)==null?void 0:e.projectId;return{providers:{auth:t,auditLog:p,live:y,router:S,data:g,i18n:b,notification:v,accessControl:_},version:f4,resourceCount:d.length,projectId:x}},"useTelemetryData"),h4=oe(e=>{try{const t=JSON.stringify(e||{});return typeof btoa<"u"?btoa(t):Buffer.from(t).toString("base64")}catch{return}},"encode"),p4=oe(e=>{const t=new Image;t.src=e},"throughImage"),m4=oe(e=>{fetch(e)},"throughFetch"),g4=oe(e=>{typeof Image<"u"?p4(e):typeof fetch<"u"&&m4(e)},"transport"),v4=oe(()=>{const e=d4(),t=he.useRef(!1);return he.useEffect(()=>{if(t.current)return;const n=h4(e);n&&(g4(`https://telemetry.refine.dev/telemetry?payload=${n}`),t.current=!0)},[]),null},"Telemetry"),y4=oe(e=>{const t=["go","parse","back","Link"],n=Object.keys(e).filter(o=>!t.includes(o));return n.length>0?(console.warn(`Unsupported properties are found in \`routerProvider\` prop. You provided \`${n.join(", ")}\`. Supported properties are \`${t.join(", ")}\`. You may wanted to use \`legacyRouterProvider\` prop instead.`),!0):!1},"checkRouterPropMisuse"),b4=oe(e=>{const t=he.useRef(!1);he.useEffect(()=>{t.current===!1&&e&&y4(e)&&(t.current=!0)},[e])},"useRouterMisuseWarning"),S4=oe(({authProvider:e,dataProvider:t,routerProvider:n,notificationProvider:i,accessControlProvider:o,auditLogProvider:s,resources:u,children:c,liveProvider:f,i18nProvider:d,onLiveEvent:m,options:p})=>{const{optionsWithDefaults:y,disableTelemetryWithDefault:S,reactQueryWithDefaults:g}=nL({options:p}),b=y.disableRouteChangeHandler,v=zT(()=>{var E;return g.clientConfig instanceof ix?g.clientConfig:new ix({...g.clientConfig,defaultOptions:{...g.clientConfig.defaultOptions,queries:{refetchOnWindowFocus:!1,placeholderData:hP,...(E=g.clientConfig.defaultOptions)==null?void 0:E.queries}}})},[g.clientConfig]),x=he.useMemo(()=>typeof i=="function"?i:()=>i,[i])();return b4(n),he.createElement(MP,{client:v},he.createElement(NL,{...x},he.createElement(Wk,{...e??{},isProvided:!!e},he.createElement(AL,{dataProvider:t},he.createElement($L,{liveProvider:f},he.createElement(IL,{router:n},he.createElement(FL,{resources:u??[]},he.createElement(PL,{i18nProvider:d},he.createElement(GL,{...o??{}},he.createElement(e4,{...s??{}},he.createElement(jL,null,he.createElement(tL,{mutationMode:y.mutationMode,warnWhenUnsavedChanges:y.warnWhenUnsavedChanges,syncWithLocation:y.syncWithLocation,undoableTimeout:y.undoableTimeout,liveMode:y.liveMode,onLiveEvent:m,options:y},he.createElement(cL,null,he.createElement(he.Fragment,null,c,!S&&he.createElement(v4,null),!b&&he.createElement(x4,null)))))))))))))))},"Refine"),_4=oe(({notification:e})=>{const t=Fn(),{notificationDispatch:n}=Ub(),{open:i}=Ns(),[o,s]=z.useState(),u=oe(()=>{if(e.isRunning===!0&&(e.seconds===0&&e.doMutation(),e.isSilent||i==null||i({key:`${e.id}-${e.resource}-notification`,type:"progress",message:t("notifications.undoable",{seconds:gy(e.seconds)},`You have ${gy(e.seconds)} seconds to undo`),cancelMutation:e.cancelMutation,undoableTimeout:gy(e.seconds)}),e.seconds>0)){o&&clearTimeout(o);const c=setTimeout(()=>{n({type:"DECREASE_NOTIFICATION_SECOND",payload:{id:e.id,seconds:e.seconds,resource:e.resource}})},1e3);s(c)}},"cancelNotification");return z.useEffect(()=>{u()},[e]),null},"UndoableQueue");function w4({redirectOnFail:e=!0,appendCurrentPathToQuery:t=!0,children:n,fallback:i,loading:o,params:s}){var u;const c=pT(),f=!!(c!=null&&c.isProvided),d=Dr(),m=er(),{isFetching:p,data:{authenticated:y,redirectTo:S}={}}=MT({params:s}),g=f?y:!0;if(!f)return he.createElement(he.Fragment,null,n??null);if(p)return he.createElement(he.Fragment,null,o??null);if(g)return he.createElement(he.Fragment,null,n??null);if(typeof i<"u")return he.createElement(he.Fragment,null,i??null);const b=typeof e=="string"?e:S,v=`${d.pathname}`.replace(/(\?.*|#.*)$/,"");if(b){const _=(u=d.params)!=null&&u.to?d.params.to:m({to:v,options:{keepQuery:!0},type:"path"});return he.createElement(E4,{config:{to:b,query:t&&(_??"").length>1?{to:_}:void 0,type:"replace"}})}return null}oe(w4,"Authenticated");var E4=oe(({config:e})=>{const t=er();return he.useEffect(()=>{t(e)},[t,e]),null},"Redirect"),x4=oe(()=>{var e,t;const n=z.useContext(lu),i=pT(),o=(e=n.parse)==null?void 0:e.call(n),s=((t=o==null?void 0:o())==null?void 0:t.pathname)||"";return z.useEffect(()=>{var u;(u=i==null?void 0:i.check)==null||u.call(i).catch(()=>!1)},[s]),null},"RouteChangeHandler"),xc=$p(),C4=()=>null,R4=({children:e})=>e,es={},it={},DC;function Ps(){if(DC)return it;DC=1;var e=it&&it.__assign||function(){return e=Object.assign||function(x){for(var E,R=1,C=arguments.length;R<C;R++){E=arguments[R];for(var $ in E)Object.prototype.hasOwnProperty.call(E,$)&&(x[$]=E[$])}return x},e.apply(this,arguments)},t=it&&it.__createBinding||(Object.create?(function(x,E,R,C){C===void 0&&(C=R),Object.defineProperty(x,C,{enumerable:!0,get:function(){return E[R]}})}):(function(x,E,R,C){C===void 0&&(C=R),x[C]=E[R]})),n=it&&it.__setModuleDefault||(Object.create?(function(x,E){Object.defineProperty(x,"default",{enumerable:!0,value:E})}):function(x,E){x.default=E}),i=it&&it.__importStar||function(x){if(x&&x.__esModule)return x;var E={};if(x!=null)for(var R in x)R!=="default"&&Object.prototype.hasOwnProperty.call(x,R)&&t(E,x,R);return n(E,x),E},o=it&&it.__spreadArray||function(x,E,R){if(R||arguments.length===2)for(var C=0,$=E.length,A;C<$;C++)(A||!(C in E))&&(A||(A=Array.prototype.slice.call(E,0,C)),A[C]=E[C]);return x.concat(A||Array.prototype.slice.call(E))};Object.defineProperty(it,"__esModule",{value:!0}),it.Priority=it.isModKey=it.shouldRejectKeystrokes=it.useThrottledValue=it.getScrollbarWidth=it.useIsomorphicLayout=it.noop=it.createAction=it.randomId=it.usePointerMovedSinceMount=it.useOuterClick=it.swallowEvent=void 0;var s=i(pn());function u(x){x.stopPropagation(),x.preventDefault()}it.swallowEvent=u;function c(x,E){var R=s.useRef(E);R.current=E,s.useEffect(function(){function C($){var A,T;!((A=x.current)===null||A===void 0)&&A.contains($.target)||$.target===((T=x.current)===null||T===void 0?void 0:T.getRootNode().host)||($.preventDefault(),$.stopPropagation(),R.current())}return window.addEventListener("pointerdown",C,!0),function(){return window.removeEventListener("pointerdown",C,!0)}},[x])}it.useOuterClick=c;function f(){var x=s.useState(!1),E=x[0],R=x[1];return s.useEffect(function(){function C(){R(!0)}if(!E)return window.addEventListener("pointermove",C),function(){return window.removeEventListener("pointermove",C)}},[E]),E}it.usePointerMovedSinceMount=f;function d(){return Math.random().toString(36).substring(2,9)}it.randomId=d;function m(x){return e({id:d()},x)}it.createAction=m;function p(){}it.noop=p,it.useIsomorphicLayout=typeof window>"u"?p:s.useLayoutEffect;function y(){var x=document.createElement("div");x.style.visibility="hidden",x.style.overflow="scroll",document.body.appendChild(x);var E=document.createElement("div");x.appendChild(E);var R=x.offsetWidth-E.offsetWidth;return x.parentNode.removeChild(x),R}it.getScrollbarWidth=y;function S(x,E){E===void 0&&(E=100);var R=s.useState(x),C=R[0],$=R[1],A=s.useRef(Date.now());return s.useEffect(function(){if(E!==0){var T=setTimeout(function(){$(x),A.current=Date.now()},A.current-(Date.now()-E));return function(){clearTimeout(T)}}},[E,x]),E===0?x:C}it.useThrottledValue=S;function g(x){var E,R,C=x===void 0?{ignoreWhenFocused:[]}:x,$=C.ignoreWhenFocused,A=o(["input","textarea"],$,!0).map(function(D){return D.toLowerCase()}),T=document.activeElement,M=T&&(A.indexOf(T.tagName.toLowerCase())!==-1||((E=T.attributes.getNamedItem("role"))===null||E===void 0?void 0:E.value)==="textbox"||((R=T.attributes.getNamedItem("contenteditable"))===null||R===void 0?void 0:R.value)==="true");return M}it.shouldRejectKeystrokes=g;var b=typeof window>"u",v=!b&&window.navigator.platform==="MacIntel";function _(x){return v?x.metaKey:x.ctrlKey}return it.isModKey=_,it.Priority={HIGH:1,NORMAL:0,LOW:-1},it}var ii={},_r={},sa={},Yn={},Cc={exports:{}},O4=Cc.exports,jC;function A4(){return jC||(jC=1,(function(e,t){(function(n,i){i(t)})(O4,(function(n){var i=typeof WeakSet=="function",o=Object.keys;function s(D,j){return D===j||D!==D&&j!==j}function u(D){return D.constructor===Object||D.constructor==null}function c(D){return!!D&&typeof D.then=="function"}function f(D){return!!(D&&D.$$typeof)}function d(){var D=[];return{add:function(j){D.push(j)},has:function(j){return D.indexOf(j)!==-1}}}var m=(function(D){return D?function(){return new WeakSet}:d})(i);function p(D){return function(I){var L=D||I;return function(G,q,Q){Q===void 0&&(Q=m());var W=!!G&&typeof G=="object",ne=!!q&&typeof q=="object";if(W||ne){var X=W&&Q.has(G),P=ne&&Q.has(q);if(X||P)return X&&P;W&&Q.add(G),ne&&Q.add(q)}return L(G,q,Q)}}}function y(D,j,I,L){var K=D.length;if(j.length!==K)return!1;for(;K-- >0;)if(!I(D[K],j[K],L))return!1;return!0}function S(D,j,I,L){var K=D.size===j.size;if(K&&D.size){var G={};D.forEach(function(q,Q){if(K){var W=!1,ne=0;j.forEach(function(X,P){!W&&!G[ne]&&(W=I(Q,P,L)&&I(q,X,L),W&&(G[ne]=!0)),ne++}),K=W}})}return K}var g="_owner",b=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function v(D,j,I,L){var K=o(D),G=K.length;if(o(j).length!==G)return!1;if(G)for(var q=void 0;G-- >0;){if(q=K[G],q===g){var Q=f(D),W=f(j);if((Q||W)&&Q!==W)return!1}if(!b(j,q)||!I(D[q],j[q],L))return!1}return!0}function _(D,j){return D.source===j.source&&D.global===j.global&&D.ignoreCase===j.ignoreCase&&D.multiline===j.multiline&&D.unicode===j.unicode&&D.sticky===j.sticky&&D.lastIndex===j.lastIndex}function x(D,j,I,L){var K=D.size===j.size;if(K&&D.size){var G={};D.forEach(function(q){if(K){var Q=!1,W=0;j.forEach(function(ne){!Q&&!G[W]&&(Q=I(q,ne,L),Q&&(G[W]=!0)),W++}),K=Q}})}return K}var E=typeof Map=="function",R=typeof Set=="function";function C(D){var j=typeof D=="function"?D(I):I;function I(L,K,G){if(L===K)return!0;if(L&&K&&typeof L=="object"&&typeof K=="object"){if(u(L)&&u(K))return v(L,K,j,G);var q=Array.isArray(L),Q=Array.isArray(K);return q||Q?q===Q&&y(L,K,j,G):(q=L instanceof Date,Q=K instanceof Date,q||Q?q===Q&&s(L.getTime(),K.getTime()):(q=L instanceof RegExp,Q=K instanceof RegExp,q||Q?q===Q&&_(L,K):c(L)||c(K)?L===K:E&&(q=L instanceof Map,Q=K instanceof Map,q||Q)?q===Q&&S(L,K,j,G):R&&(q=L instanceof Set,Q=K instanceof Set,q||Q)?q===Q&&x(L,K,j,G):v(L,K,j,G)))}return L!==L&&K!==K}return I}var $=C(),A=C(function(){return s}),T=C(p()),M=C(p(s));n.circularDeepEqual=T,n.circularShallowEqual=M,n.createCustomEqual=C,n.deepEqual=$,n.sameValueZeroEqual=s,n.shallowEqual=A,Object.defineProperty(n,"__esModule",{value:!0})}))})(Cc,Cc.exports)),Cc.exports}var Sy,NC;function Gb(){if(NC)return Sy;NC=1;var e="Invariant failed";function t(n,i){if(!n)throw new Error(e)}return Sy=t,Sy}var la={},ts={},pc={},PC;function $4(){if(PC)return pc;PC=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.Command=void 0;var e=(function(){function t(n,i){var o=this;i===void 0&&(i={}),this.perform=function(){var s=n.perform();if(typeof s=="function"){var u=i.history;u&&(o.historyItem&&u.remove(o.historyItem),o.historyItem=u.add({perform:n.perform,negate:s}),o.history={undo:function(){return u.undo(o.historyItem)},redo:function(){return u.redo(o.historyItem)}})}}}return t})();return pc.Command=e,pc}var IC;function qT(){if(IC)return ts;IC=1;var e=ts&&ts.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(ts,"__esModule",{value:!0}),ts.ActionImpl=void 0;var t=e(Gb()),n=$4(),i=Ps(),o=function(u){var c=u.keywords,f=c===void 0?"":c,d=u.section,m=d===void 0?"":d;return(f+" "+(typeof m=="string"?m:m.name)).trim()},s=(function(){function u(c,f){var d=this,m;this.priority=i.Priority.NORMAL,this.ancestors=[],this.children=[],Object.assign(this,c),this.id=c.id,this.name=c.name,this.keywords=o(c);var p=c.perform;if(this.command=p&&new n.Command({perform:function(){return p(d)}},{history:f.history}),this.perform=(m=this.command)===null||m===void 0?void 0:m.perform,c.parent){var y=f.store[c.parent];(0,t.default)(y,"attempted to create an action whos parent: "+c.parent+" does not exist in the store."),y.addChild(this)}}return u.prototype.addChild=function(c){c.ancestors.unshift(this);for(var f=this.parentActionImpl;f;)c.ancestors.unshift(f),f=f.parentActionImpl;this.children.push(c)},u.prototype.removeChild=function(c){var f=this,d=this.children.indexOf(c);d!==-1&&this.children.splice(d,1),c.children&&c.children.forEach(function(m){f.removeChild(m)})},Object.defineProperty(u.prototype,"parentActionImpl",{get:function(){return this.ancestors[this.ancestors.length-1]},enumerable:!1,configurable:!0}),u.create=function(c,f){return new u(c,f)},u})();return ts.ActionImpl=s,ts}var zC;function UT(){if(zC)return la;zC=1;var e=la&&la.__assign||function(){return e=Object.assign||function(s){for(var u,c=1,f=arguments.length;c<f;c++){u=arguments[c];for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(s[d]=u[d])}return s},e.apply(this,arguments)},t=la&&la.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(la,"__esModule",{value:!0}),la.ActionInterface=void 0;var n=t(Gb()),i=qT(),o=(function(){function s(u,c){u===void 0&&(u=[]),c===void 0&&(c={}),this.actions={},this.options=c,this.add(u)}return s.prototype.add=function(u){for(var c=0;c<u.length;c++){var f=u[c];f.parent&&(0,n.default)(this.actions[f.parent],'Attempted to create action "'+f.name+'" without registering its parent "'+f.parent+'" first.'),this.actions[f.id]=i.ActionImpl.create(f,{history:this.options.historyManager,store:this.actions})}return e({},this.actions)},s.prototype.remove=function(u){var c=this;return u.forEach(function(f){var d=c.actions[f.id];if(d){for(var m=d.children;m.length;){var p=m.pop();if(!p)return;delete c.actions[p.id],p.parentActionImpl&&p.parentActionImpl.removeChild(p),p.children&&m.push.apply(m,p.children)}d.parentActionImpl&&d.parentActionImpl.removeChild(d),delete c.actions[f.id]}}),e({},this.actions)},s})();return la.ActionInterface=o,la}var ns={},FC;function T4(){if(FC)return ns;FC=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.history=ns.HistoryItemImpl=void 0;var e=Ps(),t=(function(){function o(s){this.perform=s.perform,this.negate=s.negate}return o.create=function(s){return new o(s)},o})();ns.HistoryItemImpl=t;var n=(function(){function o(){return this.undoStack=[],this.redoStack=[],o.instance||(o.instance=this,this.init()),o.instance}return o.prototype.init=function(){var s=this;typeof window>"u"||window.addEventListener("keydown",function(u){var c;if(!(!s.redoStack.length&&!s.undoStack.length||(0,e.shouldRejectKeystrokes)())){var f=(c=u.key)===null||c===void 0?void 0:c.toLowerCase();u.metaKey&&f==="z"&&u.shiftKey?s.redo():u.metaKey&&f==="z"&&s.undo()}})},o.prototype.add=function(s){var u=t.create(s);return this.undoStack.push(u),u},o.prototype.remove=function(s){var u=this.undoStack.findIndex(function(f){return f===s});if(u!==-1){this.undoStack.splice(u,1);return}var c=this.redoStack.findIndex(function(f){return f===s});c!==-1&&this.redoStack.splice(c,1)},o.prototype.undo=function(s){if(!s){var u=this.undoStack.pop();return u?(u==null||u.negate(),this.redoStack.push(u),u):void 0}var c=this.undoStack.findIndex(function(f){return f===s});if(c!==-1)return this.undoStack.splice(c,1),s.negate(),this.redoStack.push(s),s},o.prototype.redo=function(s){if(!s){var u=this.redoStack.pop();return u?(u==null||u.perform(),this.undoStack.push(u),u):void 0}var c=this.redoStack.findIndex(function(f){return f===s});if(c!==-1)return this.redoStack.splice(c,1),s.perform(),this.undoStack.push(s),s},o.prototype.reset=function(){this.undoStack.splice(0),this.redoStack.splice(0)},o})(),i=new n;return ns.history=i,Object.freeze(i),ns}var _y={},kC;function cu(){return kC||(kC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.VisualState=void 0,(function(t){t.animatingIn="animating-in",t.showing="showing",t.animatingOut="animating-out",t.hidden="hidden"})(e.VisualState||(e.VisualState={}))})(_y)),_y}var LC;function M4(){if(LC)return Yn;LC=1;var e=Yn&&Yn.__assign||function(){return e=Object.assign||function(g){for(var b,v=1,_=arguments.length;v<_;v++){b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(g[x]=b[x])}return g},e.apply(this,arguments)},t=Yn&&Yn.__createBinding||(Object.create?(function(g,b,v,_){_===void 0&&(_=v),Object.defineProperty(g,_,{enumerable:!0,get:function(){return b[v]}})}):(function(g,b,v,_){_===void 0&&(_=v),g[_]=b[v]})),n=Yn&&Yn.__setModuleDefault||(Object.create?(function(g,b){Object.defineProperty(g,"default",{enumerable:!0,value:b})}):function(g,b){g.default=b}),i=Yn&&Yn.__importStar||function(g){if(g&&g.__esModule)return g;var b={};if(g!=null)for(var v in g)v!=="default"&&Object.prototype.hasOwnProperty.call(g,v)&&t(b,g,v);return n(b,g),b},o=Yn&&Yn.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.useStore=void 0;var s=A4(),u=i(pn()),c=o(Gb()),f=UT(),d=T4(),m=cu();function p(g){var b=u.useRef(e({animations:{enterMs:200,exitMs:100}},g.options)),v=u.useMemo(function(){return new f.ActionInterface(g.actions||[],{historyManager:b.current.enableHistory?d.history:void 0})},[]),_=u.useState({searchQuery:"",currentRootActionId:null,visualState:m.VisualState.hidden,actions:e({},v.actions),activeIndex:0}),x=_[0],E=_[1],R=u.useRef(x);R.current=x;var C=u.useCallback(function(){return R.current},[]),$=u.useMemo(function(){return new y(C)},[C]);u.useEffect(function(){R.current=x,$.notify()},[x,$]);var A=u.useCallback(function(M){return E(function(D){return e(e({},D),{actions:v.add(M)})}),function(){E(function(j){return e(e({},j),{actions:v.remove(M)})})}},[v]),T=u.useRef(null);return u.useMemo(function(){return{getState:C,query:{setCurrentRootAction:function(M){E(function(D){return e(e({},D),{currentRootActionId:M})})},setVisualState:function(M){E(function(D){return e(e({},D),{visualState:typeof M=="function"?M(D.visualState):M})})},setSearch:function(M){return E(function(D){return e(e({},D),{searchQuery:M})})},registerActions:A,toggle:function(){return E(function(M){return e(e({},M),{visualState:[m.VisualState.animatingOut,m.VisualState.hidden].includes(M.visualState)?m.VisualState.animatingIn:m.VisualState.animatingOut})})},setActiveIndex:function(M){return E(function(D){return e(e({},D),{activeIndex:typeof M=="number"?M:M(D.activeIndex)})})},inputRefSetter:function(M){T.current=M},getInput:function(){return(0,c.default)(T.current,"Input is undefined, make sure you apple `query.inputRefSetter` to your search input."),T.current}},options:b.current,subscribe:function(M,D){return $.subscribe(M,D)}}},[C,$,A])}Yn.useStore=p;var y=(function(){function g(b){this.subscribers=[],this.getState=b}return g.prototype.subscribe=function(b,v){var _=this,x=new S(function(){return b(_.getState())},v);return this.subscribers.push(x),this.unsubscribe.bind(this,x)},g.prototype.unsubscribe=function(b){if(this.subscribers.length){var v=this.subscribers.indexOf(b);if(v>-1)return this.subscribers.splice(v,1)}},g.prototype.notify=function(){this.subscribers.forEach(function(b){return b.collect()})},g})(),S=(function(){function g(b,v){this.collector=b,this.onChange=v}return g.prototype.collect=function(){try{var b=this.collector();(0,s.deepEqual)(b,this.collected)||(this.collected=b,this.onChange&&this.onChange(this.collected))}catch(v){console.warn(v)}},g})();return Yn}var wr={},Qd={},qC;function D4(){if(qC)return Qd;qC=1,Object.defineProperty(Qd,"__esModule",{value:!0});var e=["Shift","Meta","Alt","Control"],t=1e3,n="keydown",i=typeof navigator=="object"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"Meta":"Control";function o(f,d){return typeof f.getModifierState=="function"?f.getModifierState(d):!1}function s(f){return f.trim().split(" ").map(function(d){var m=d.split(/\b\+/),p=m.pop();return m=m.map(function(y){return y==="$mod"?i:y}),[m,p]})}function u(f,d){return/^[^A-Za-z0-9]$/.test(f.key)&&d[1]===f.key?!0:!(d[1].toUpperCase()!==f.key.toUpperCase()&&d[1]!==f.code||d[0].find(function(m){return!o(f,m)})||e.find(function(m){return!d[0].includes(m)&&d[1]!==m&&o(f,m)}))}function c(f,d,m){var p,y;m===void 0&&(m={});var S=(p=m.timeout)!==null&&p!==void 0?p:t,g=(y=m.event)!==null&&y!==void 0?y:n,b=Object.keys(d).map(function(E){return[s(E),d[E]]}),v=new Map,_=null,x=function(E){E instanceof KeyboardEvent&&(b.forEach(function(R){var C=R[0],$=R[1],A=v.get(C),T=A||C,M=T[0],D=u(E,M);D?T.length>1?v.set(C,T.slice(1)):(v.delete(C),$(E)):o(E,E.key)||v.delete(C)}),_&&clearTimeout(_),_=setTimeout(v.clear.bind(v),S))};return f.addEventListener(g,x),function(){f.removeEventListener(g,x)}}return Qd.default=c,Qd}var UC;function j4(){if(UC)return wr;UC=1;var e=wr&&wr.__createBinding||(Object.create?(function(v,_,x,E){E===void 0&&(E=x),Object.defineProperty(v,E,{enumerable:!0,get:function(){return _[x]}})}):(function(v,_,x,E){E===void 0&&(E=x),v[E]=_[x]})),t=wr&&wr.__setModuleDefault||(Object.create?(function(v,_){Object.defineProperty(v,"default",{enumerable:!0,value:_})}):function(v,_){v.default=_}),n=wr&&wr.__importStar||function(v){if(v&&v.__esModule)return v;var _={};if(v!=null)for(var x in v)x!=="default"&&Object.prototype.hasOwnProperty.call(v,x)&&e(_,v,x);return t(_,v),_},i=wr&&wr.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(wr,"__esModule",{value:!0}),wr.InternalEvents=void 0;var o=n(pn()),s=i(D4()),u=cu(),c=Po(),f=Ps();function d(){return m(),p(),g(),b(),null}wr.InternalEvents=d;function m(){var v,_,x=(0,c.useKBar)(function(M){return{visualState:M.visualState,showing:M.visualState!==u.VisualState.hidden}}),E=x.query,R=x.options,C=x.visualState,$=x.showing;o.useEffect(function(){var M,D=R.toggleShortcut||"$mod+k",j=(0,s.default)(window,(M={},M[D]=function(I){var L,K,G,q;I.defaultPrevented||(I.preventDefault(),E.toggle(),$?(K=(L=R.callbacks)===null||L===void 0?void 0:L.onClose)===null||K===void 0||K.call(L):(q=(G=R.callbacks)===null||G===void 0?void 0:G.onOpen)===null||q===void 0||q.call(G))},M.Escape=function(I){var L,K;$&&(I.stopPropagation(),I.preventDefault(),(K=(L=R.callbacks)===null||L===void 0?void 0:L.onClose)===null||K===void 0||K.call(L)),E.setVisualState(function(G){return G===u.VisualState.hidden||G===u.VisualState.animatingOut?G:u.VisualState.animatingOut})},M));return function(){j()}},[R.callbacks,R.toggleShortcut,E,$]);var A=o.useRef(),T=o.useCallback(function(M){var D,j,I=0;M===u.VisualState.animatingIn&&(I=((D=R.animations)===null||D===void 0?void 0:D.enterMs)||0),M===u.VisualState.animatingOut&&(I=((j=R.animations)===null||j===void 0?void 0:j.exitMs)||0),clearTimeout(A.current),A.current=setTimeout(function(){var L=!1;E.setVisualState(function(){var K=M===u.VisualState.animatingIn?u.VisualState.showing:u.VisualState.hidden;return K===u.VisualState.hidden&&(L=!0),K}),L&&E.setCurrentRootAction(null)},I)},[(v=R.animations)===null||v===void 0?void 0:v.enterMs,(_=R.animations)===null||_===void 0?void 0:_.exitMs,E]);o.useEffect(function(){switch(C){case u.VisualState.animatingIn:case u.VisualState.animatingOut:T(C);break}},[T,C])}function p(){var v=(0,c.useKBar)(function(E){return{visualState:E.visualState}}),_=v.visualState,x=v.options;o.useEffect(function(){if(!x.disableDocumentLock)if(_===u.VisualState.animatingIn){if(document.body.style.overflow="hidden",!x.disableScrollbarManagement){var E=(0,f.getScrollbarWidth)(),R=getComputedStyle(document.body)["margin-right"];R&&(E+=Number(R.replace(/\D/g,""))),document.body.style.marginRight=E+"px"}}else _===u.VisualState.hidden&&(document.body.style.removeProperty("overflow"),x.disableScrollbarManagement||document.body.style.removeProperty("margin-right"))},[x.disableDocumentLock,x.disableScrollbarManagement,_])}var y=new WeakSet;function S(v){return function(_){y.has(_)||(v(_),y.add(_))}}function g(){var v=(0,c.useKBar)(function(C){return{actions:C.actions,open:C.visualState===u.VisualState.showing}}),_=v.actions,x=v.query,E=v.open,R=v.options;o.useEffect(function(){var C;if(!E){for(var $=Object.keys(_).map(function(q){return _[q]}),A=[],T=0,M=$;T<M.length;T++){var D=M[T];!((C=D.shortcut)===null||C===void 0)&&C.length&&A.push(D)}A=A.sort(function(q,Q){return Q.shortcut.join(" ").length-q.shortcut.join(" ").length});for(var j={},I=function(q){var Q=q.shortcut.join(" ");j[Q]=S(function(W){var ne,X,P,B,U,k;(0,f.shouldRejectKeystrokes)()||(W.preventDefault(),!((ne=q.children)===null||ne===void 0)&&ne.length?(x.setCurrentRootAction(q.id),x.toggle(),(P=(X=R.callbacks)===null||X===void 0?void 0:X.onOpen)===null||P===void 0||P.call(X)):((B=q.command)===null||B===void 0||B.perform(),(k=(U=R.callbacks)===null||U===void 0?void 0:U.onSelectAction)===null||k===void 0||k.call(U,q)))})},L=0,K=A;L<K.length;L++){var D=K[L];I(D)}var G=(0,s.default)(window,j,{timeout:400});return function(){G()}}},[_,E,R.callbacks,x])}function b(){var v=o.useRef(!0),_=(0,c.useKBar)(function(C){return{isShowing:C.visualState===u.VisualState.showing||C.visualState===u.VisualState.animatingIn}}),x=_.isShowing,E=_.query,R=o.useRef(null);o.useEffect(function(){if(v.current){v.current=!1;return}if(x){R.current=document.activeElement;return}var C=document.activeElement;(C==null?void 0:C.tagName.toLowerCase())==="input"&&C.blur();var $=R.current;$&&$!==C&&$.focus()},[x]),o.useEffect(function(){function C($){var A=E.getInput();$.target!==A&&A.focus()}if(x)return window.addEventListener("keydown",C),function(){window.removeEventListener("keydown",C)}},[x,E])}return wr}var BC;function BT(){return BC||(BC=1,(function(e){var t=sa&&sa.__createBinding||(Object.create?(function(f,d,m,p){p===void 0&&(p=m),Object.defineProperty(f,p,{enumerable:!0,get:function(){return d[m]}})}):(function(f,d,m,p){p===void 0&&(p=m),f[p]=d[m]})),n=sa&&sa.__setModuleDefault||(Object.create?(function(f,d){Object.defineProperty(f,"default",{enumerable:!0,value:d})}):function(f,d){f.default=d}),i=sa&&sa.__importStar||function(f){if(f&&f.__esModule)return f;var d={};if(f!=null)for(var m in f)m!=="default"&&Object.prototype.hasOwnProperty.call(f,m)&&t(d,f,m);return n(d,f),d};Object.defineProperty(e,"__esModule",{value:!0}),e.KBarProvider=e.KBarContext=void 0;var o=M4(),s=i(pn()),u=j4();e.KBarContext=s.createContext({});var c=function(f){var d=(0,o.useStore)(f);return s.createElement(e.KBarContext.Provider,{value:d},s.createElement(u.InternalEvents,null),f.children)};e.KBarProvider=c})(sa)),sa}var VC;function Po(){if(VC)return _r;VC=1;var e=_r&&_r.__assign||function(){return e=Object.assign||function(c){for(var f,d=1,m=arguments.length;d<m;d++){f=arguments[d];for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&(c[p]=f[p])}return c},e.apply(this,arguments)},t=_r&&_r.__createBinding||(Object.create?(function(c,f,d,m){m===void 0&&(m=d),Object.defineProperty(c,m,{enumerable:!0,get:function(){return f[d]}})}):(function(c,f,d,m){m===void 0&&(m=d),c[m]=f[d]})),n=_r&&_r.__setModuleDefault||(Object.create?(function(c,f){Object.defineProperty(c,"default",{enumerable:!0,value:f})}):function(c,f){c.default=f}),i=_r&&_r.__importStar||function(c){if(c&&c.__esModule)return c;var f={};if(c!=null)for(var d in c)d!=="default"&&Object.prototype.hasOwnProperty.call(c,d)&&t(f,c,d);return n(f,c),f};Object.defineProperty(_r,"__esModule",{value:!0}),_r.useKBar=void 0;var o=i(pn()),s=BT();function u(c){var f=o.useContext(s.KBarContext),d=f.query,m=f.getState,p=f.subscribe,y=f.options,S=o.useRef(c==null?void 0:c(m())),g=o.useRef(c),b=o.useCallback(function(E){return e(e({},E),{query:d,options:y})},[d,y]),v=o.useState(b(S.current)),_=v[0],x=v[1];return o.useEffect(function(){var E;return g.current&&(E=p(function(R){return g.current(R)},function(R){return x(b(R))})),function(){E&&E()}},[b,p]),_}return _r.useKBar=u,_r}var wy,HC;function N4(){if(HC)return wy;HC=1;var e=1,t=.9,n=.3,i=.1,o=0,s=.999,u=.9999,c=.99,f=/[\\\/\-_+.# \t"@\[\(\{&]/,d=/[\\\/\-_+.# \t"@\[\(\{&]/g;function m(y,S,g,b,v,_){if(_===S.length)return v===y.length?e:c;for(var x=b.charAt(_),E=g.indexOf(x,v),R=0,C,$,A;E>=0;)C=m(y,S,g,b,E+1,_+1),C>R&&(E===v?C*=e:f.test(y.charAt(E-1))?(C*=t,A=y.slice(v,E-1).match(d),A&&v>0&&(C*=Math.pow(s,A.length))):f.test(y.slice(v,E-1))?(C*=o,v>0&&(C*=Math.pow(s,E-v))):(C*=n,v>0&&(C*=Math.pow(s,E-v))),y.charAt(E)!==S.charAt(_)&&(C*=u)),C<i&&g.charAt(E-1)===b.charAt(_+1)&&g.charAt(E-1)!==b.charAt(_)&&($=m(y,S,g,b,E+1,_+2),$*i>C&&(C=$*i)),C>R&&(R=C),E=g.indexOf(x,E+1);return R}function p(y,S){return m(y,S,y.toLowerCase(),S.toLowerCase(),0,0)}return wy=p,wy}var KC;function P4(){return KC||(KC=1,(function(e){var t=ii&&ii.__createBinding||(Object.create?(function(y,S,g,b){b===void 0&&(b=g),Object.defineProperty(y,b,{enumerable:!0,get:function(){return S[g]}})}):(function(y,S,g,b){b===void 0&&(b=g),y[b]=S[g]})),n=ii&&ii.__setModuleDefault||(Object.create?(function(y,S){Object.defineProperty(y,"default",{enumerable:!0,value:S})}):function(y,S){y.default=S}),i=ii&&ii.__importStar||function(y){if(y&&y.__esModule)return y;var S={};if(y!=null)for(var g in y)g!=="default"&&Object.prototype.hasOwnProperty.call(y,g)&&t(S,y,g);return n(S,y),S},o=ii&&ii.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.useDeepMatches=e.useMatches=e.NO_GROUP=void 0;var s=i(pn()),u=Po(),c=Ps(),f=o(N4());e.NO_GROUP={name:"none",priority:c.Priority.NORMAL};function d(y,S){return S.priority-y.priority}function m(){var y=(0,u.useKBar)(function(A){return{search:A.searchQuery,actions:A.actions,rootActionId:A.currentRootActionId}}),S=y.search,g=y.actions,b=y.rootActionId,v=s.useMemo(function(){return Object.keys(g).reduce(function(A,T){var M=g[T];if(!M.parent&&!b&&A.push(M),M.id===b)for(var D=0;D<M.children.length;D++)A.push(M.children[D]);return A},[]).sort(d)},[g,b]),_=s.useCallback(function(A){for(var T=[],M=0;M<A.length;M++)T.push(A[M]);return(function D(j,I){I===void 0&&(I=T);for(var L=0;L<j.length;L++)if(j[L].children.length>0){for(var K=j[L].children,G=0;G<K.length;G++)I.push(K[G]);D(j[L].children,I)}return I})(A)},[]),x=!S,E=s.useMemo(function(){return x?v:_(v)},[_,v,x]),R=p(E,S),C=s.useMemo(function(){for(var A,T,M={},D=[],j=[],I=0;I<R.length;I++){var L=R[I],K=L.action,G=L.score||c.Priority.NORMAL,q={name:typeof K.section=="string"?K.section:((A=K.section)===null||A===void 0?void 0:A.name)||e.NO_GROUP.name,priority:typeof K.section=="string"?G:((T=K.section)===null||T===void 0?void 0:T.priority)||0+G};M[q.name]||(M[q.name]=[],D.push(q)),M[q.name].push({priority:K.priority+G,action:K})}j=D.sort(d).map(function(X){return{name:X.name,actions:M[X.name].sort(d).map(function(P){return P.action})}});for(var Q=[],I=0;I<j.length;I++){var W=j[I];W.name!==e.NO_GROUP.name&&Q.push(W.name);for(var ne=0;ne<W.actions.length;ne++)Q.push(W.actions[ne])}return Q},[R]),$=s.useMemo(function(){return b},[C]);return s.useMemo(function(){return{results:C,rootActionId:$}},[$,C])}e.useMatches=m;function p(y,S){var g=s.useMemo(function(){return{filtered:y,search:S}},[y,S]),b=(0,c.useThrottledValue)(g),v=b.filtered,_=b.search;return s.useMemo(function(){if(_.trim()==="")return v.map(function($){return{score:0,action:$}});for(var x=[],E=0;E<v.length;E++){var R=v[E],C=(0,f.default)([R.name,R.keywords,R.subtitle].join(" "),_);C>0&&x.push({score:C,action:R})}return x},[v,_])}e.useDeepMatches=m})(ii)),ii}var ai={},Ey,GC;function I4(){if(GC)return Ey;GC=1;var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,u=(b,v)=>{for(var _ in v)t(b,_,{get:v[_],enumerable:!0})},c=(b,v,_,x)=>{if(v&&typeof v=="object"||typeof v=="function")for(let E of i(v))!s.call(b,E)&&E!==_&&t(b,E,{get:()=>v[E],enumerable:!(x=n(v,E))||x.enumerable});return b},f=(b,v,_)=>(_=b!=null?e(o(b)):{},c(!b||!b.__esModule?t(_,"default",{value:b,enumerable:!0}):_,b)),d=b=>c(t({},"__esModule",{value:!0}),b),m={};u(m,{composeRefs:()=>S,useComposedRefs:()=>g}),Ey=d(m);var p=f(pn());function y(b,v){if(typeof b=="function")return b(v);b!=null&&(b.current=v)}function S(...b){return v=>{let _=!1;const x=b.map(E=>{const R=y(E,v);return!_&&typeof R=="function"&&(_=!0),R});if(_)return()=>{for(let E=0;E<x.length;E++){const R=x[E];typeof R=="function"?R():y(b[E],null)}}}}function g(...b){return p.useCallback(S(...b),b)}return Ey}var xy,QC;function z4(){if(QC)return xy;QC=1;var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,u=(j,I)=>{for(var L in I)t(j,L,{get:I[L],enumerable:!0})},c=(j,I,L,K)=>{if(I&&typeof I=="object"||typeof I=="function")for(let G of i(I))!s.call(j,G)&&G!==L&&t(j,G,{get:()=>I[G],enumerable:!(K=n(I,G))||K.enumerable});return j},f=(j,I,L)=>(L=j!=null?e(o(j)):{},c(!j||!j.__esModule?t(L,"default",{value:j,enumerable:!0}):L,j)),d=j=>c(t({},"__esModule",{value:!0}),j),m={};u(m,{Root:()=>E,Slot:()=>E,Slottable:()=>A,createSlot:()=>x,createSlottable:()=>$}),xy=d(m);var p=f(pn()),y=I4(),S=Ap(),g=Symbol.for("react.lazy"),b=p[" use ".trim().toString()];function v(j){return typeof j=="object"&&j!==null&&"then"in j}function _(j){return j!=null&&typeof j=="object"&&"$$typeof"in j&&j.$$typeof===g&&"_payload"in j&&v(j._payload)}function x(j){const I=R(j),L=p.forwardRef((K,G)=>{let{children:q,...Q}=K;_(q)&&typeof b=="function"&&(q=b(q._payload));const W=p.Children.toArray(q),ne=W.find(T);if(ne){const X=ne.props.children,P=W.map(B=>B===ne?p.Children.count(X)>1?p.Children.only(null):p.isValidElement(X)?X.props.children:null:B);return(0,S.jsx)(I,{...Q,ref:G,children:p.isValidElement(X)?p.cloneElement(X,void 0,P):null})}return(0,S.jsx)(I,{...Q,ref:G,children:q})});return L.displayName=`${j}.Slot`,L}var E=x("Slot");function R(j){const I=p.forwardRef((L,K)=>{let{children:G,...q}=L;if(_(G)&&typeof b=="function"&&(G=b(G._payload)),p.isValidElement(G)){const Q=D(G),W=M(q,G.props);return G.type!==p.Fragment&&(W.ref=K?(0,y.composeRefs)(K,Q):Q),p.cloneElement(G,W)}return p.Children.count(G)>1?p.Children.only(null):null});return I.displayName=`${j}.SlotClone`,I}var C=Symbol("radix.slottable");function $(j){const I=({children:L})=>(0,S.jsx)(S.Fragment,{children:L});return I.displayName=`${j}.Slottable`,I.__radixId=C,I}var A=$("Slottable");function T(j){return p.isValidElement(j)&&typeof j.type=="function"&&"__radixId"in j.type&&j.type.__radixId===C}function M(j,I){const L={...I};for(const K in I){const G=j[K],q=I[K];/^on[A-Z]/.test(K)?G&&q?L[K]=(...W)=>{const ne=q(...W);return G(...W),ne}:G&&(L[K]=G):K==="style"?L[K]={...G,...q}:K==="className"&&(L[K]=[G,q].filter(Boolean).join(" "))}return{...j,...L}}function D(j){var K,G;let I=(K=Object.getOwnPropertyDescriptor(j.props,"ref"))==null?void 0:K.get,L=I&&"isReactWarning"in I&&I.isReactWarning;return L?j.ref:(I=(G=Object.getOwnPropertyDescriptor(j,"ref"))==null?void 0:G.get,L=I&&"isReactWarning"in I&&I.isReactWarning,L?j.props.ref:j.props.ref||j.ref)}return xy}var Cy,YC;function F4(){if(YC)return Cy;YC=1;var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,u=(E,R)=>{for(var C in R)t(E,C,{get:R[C],enumerable:!0})},c=(E,R,C,$)=>{if(R&&typeof R=="object"||typeof R=="function")for(let A of i(R))!s.call(E,A)&&A!==C&&t(E,A,{get:()=>R[A],enumerable:!($=n(R,A))||$.enumerable});return E},f=(E,R,C)=>(C=E!=null?e(o(E)):{},c(!E||!E.__esModule?t(C,"default",{value:E,enumerable:!0}):C,E)),d=E=>c(t({},"__esModule",{value:!0}),E),m={};u(m,{Primitive:()=>v,Root:()=>x,dispatchDiscreteCustomEvent:()=>_}),Cy=d(m);var p=f(pn()),y=f($p()),S=z4(),g=Ap(),b=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],v=b.reduce((E,R)=>{const C=(0,S.createSlot)(`Primitive.${R}`),$=p.forwardRef((A,T)=>{const{asChild:M,...D}=A,j=M?C:R;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,g.jsx)(j,{...D,ref:T})});return $.displayName=`Primitive.${R}`,{...E,[R]:$}},{});function _(E,R){E&&y.flushSync(()=>E.dispatchEvent(R))}var x=v;return Cy}var Ry,WC;function k4(){if(WC)return Ry;WC=1;var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,u=(S,g)=>{for(var b in g)t(S,b,{get:g[b],enumerable:!0})},c=(S,g,b,v)=>{if(g&&typeof g=="object"||typeof g=="function")for(let _ of i(g))!s.call(S,_)&&_!==b&&t(S,_,{get:()=>g[_],enumerable:!(v=n(g,_))||v.enumerable});return S},f=(S,g,b)=>(b=S!=null?e(o(S)):{},c(!S||!S.__esModule?t(b,"default",{value:S,enumerable:!0}):b,S)),d=S=>c(t({},"__esModule",{value:!0}),S),m={};u(m,{useLayoutEffect:()=>y}),Ry=d(m);var p=f(pn()),y=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{};return Ry}var Oy,XC;function L4(){if(XC)return Oy;XC=1;var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,u=(E,R)=>{for(var C in R)t(E,C,{get:R[C],enumerable:!0})},c=(E,R,C,$)=>{if(R&&typeof R=="object"||typeof R=="function")for(let A of i(R))!s.call(E,A)&&A!==C&&t(E,A,{get:()=>R[A],enumerable:!($=n(R,A))||$.enumerable});return E},f=(E,R,C)=>(C=E!=null?e(o(E)):{},c(!E||!E.__esModule?t(C,"default",{value:E,enumerable:!0}):C,E)),d=E=>c(t({},"__esModule",{value:!0}),E),m={};u(m,{Portal:()=>_,Root:()=>x}),Oy=d(m);var p=f(pn()),y=f($p()),S=F4(),g=k4(),b=Ap(),v="Portal",_=p.forwardRef((E,R)=>{var D;const{container:C,...$}=E,[A,T]=p.useState(!1);(0,g.useLayoutEffect)(()=>T(!0),[]);const M=C||A&&((D=globalThis==null?void 0:globalThis.document)==null?void 0:D.body);return M?y.default.createPortal((0,b.jsx)(S.Primitive.div,{...$,ref:R}),M):null});_.displayName=v;var x=_;return Oy}var JC;function q4(){if(JC)return ai;JC=1;var e=ai&&ai.__createBinding||(Object.create?(function(f,d,m,p){p===void 0&&(p=m),Object.defineProperty(f,p,{enumerable:!0,get:function(){return d[m]}})}):(function(f,d,m,p){p===void 0&&(p=m),f[p]=d[m]})),t=ai&&ai.__setModuleDefault||(Object.create?(function(f,d){Object.defineProperty(f,"default",{enumerable:!0,value:d})}):function(f,d){f.default=d}),n=ai&&ai.__importStar||function(f){if(f&&f.__esModule)return f;var d={};if(f!=null)for(var m in f)m!=="default"&&Object.prototype.hasOwnProperty.call(f,m)&&e(d,f,m);return t(d,f),d};Object.defineProperty(ai,"__esModule",{value:!0}),ai.KBarPortal=void 0;var i=L4(),o=n(pn()),s=cu(),u=Po();function c(f){var d=(0,u.useKBar)(function(m){return{showing:m.visualState!==s.VisualState.hidden}}).showing;return d?o.createElement(i.Portal,null,f.children):null}return ai.KBarPortal=c,ai}var Wn={},ZC;function U4(){if(ZC)return Wn;ZC=1;var e=Wn&&Wn.__assign||function(){return e=Object.assign||function(f){for(var d,m=1,p=arguments.length;m<p;m++){d=arguments[m];for(var y in d)Object.prototype.hasOwnProperty.call(d,y)&&(f[y]=d[y])}return f},e.apply(this,arguments)},t=Wn&&Wn.__createBinding||(Object.create?(function(f,d,m,p){p===void 0&&(p=m),Object.defineProperty(f,p,{enumerable:!0,get:function(){return d[m]}})}):(function(f,d,m,p){p===void 0&&(p=m),f[p]=d[m]})),n=Wn&&Wn.__setModuleDefault||(Object.create?(function(f,d){Object.defineProperty(f,"default",{enumerable:!0,value:d})}):function(f,d){f.default=d}),i=Wn&&Wn.__importStar||function(f){if(f&&f.__esModule)return f;var d={};if(f!=null)for(var m in f)m!=="default"&&Object.prototype.hasOwnProperty.call(f,m)&&t(d,f,m);return n(d,f),d},o=Wn&&Wn.__rest||function(f,d){var m={};for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&d.indexOf(p)<0&&(m[p]=f[p]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var y=0,p=Object.getOwnPropertySymbols(f);y<p.length;y++)d.indexOf(p[y])<0&&Object.prototype.propertyIsEnumerable.call(f,p[y])&&(m[p[y]]=f[p[y]]);return m};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.KBarPositioner=void 0;var s=i(pn()),u={position:"fixed",display:"flex",alignItems:"flex-start",justifyContent:"center",width:"100%",inset:"0px",padding:"14vh 16px 16px"};function c(f){return f?e(e({},u),f):u}return Wn.KBarPositioner=s.forwardRef(function(f,d){var m=f.style,p=f.children,y=o(f,["style","children"]);return s.createElement("div",e({ref:d,style:c(m)},y),p)}),Wn}var Er={},eR;function VT(){return eR||(eR=1,(function(e){var t=Er&&Er.__assign||function(){return t=Object.assign||function(p){for(var y,S=1,g=arguments.length;S<g;S++){y=arguments[S];for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(p[b]=y[b])}return p},t.apply(this,arguments)},n=Er&&Er.__createBinding||(Object.create?(function(p,y,S,g){g===void 0&&(g=S),Object.defineProperty(p,g,{enumerable:!0,get:function(){return y[S]}})}):(function(p,y,S,g){g===void 0&&(g=S),p[g]=y[S]})),i=Er&&Er.__setModuleDefault||(Object.create?(function(p,y){Object.defineProperty(p,"default",{enumerable:!0,value:y})}):function(p,y){p.default=y}),o=Er&&Er.__importStar||function(p){if(p&&p.__esModule)return p;var y={};if(p!=null)for(var S in p)S!=="default"&&Object.prototype.hasOwnProperty.call(p,S)&&n(y,p,S);return i(y,p),y},s=Er&&Er.__rest||function(p,y){var S={};for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&y.indexOf(g)<0&&(S[g]=p[g]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,g=Object.getOwnPropertySymbols(p);b<g.length;b++)y.indexOf(g[b])<0&&Object.prototype.propertyIsEnumerable.call(p,g[b])&&(S[g[b]]=p[g[b]]);return S};Object.defineProperty(e,"__esModule",{value:!0}),e.KBarSearch=e.getListboxItemId=e.KBAR_LISTBOX=void 0;var u=o(pn()),c=cu(),f=Po();e.KBAR_LISTBOX="kbar-listbox";var d=function(p){return"kbar-listbox-item-"+p};e.getListboxItemId=d;function m(p){var y=(0,f.useKBar)(function(A){return{search:A.searchQuery,currentRootActionId:A.currentRootActionId,actions:A.actions,activeIndex:A.activeIndex,showing:A.visualState===c.VisualState.showing}}),S=y.query,g=y.search,b=y.actions,v=y.currentRootActionId,_=y.activeIndex,x=y.showing,E=y.options,R=p.defaultPlaceholder,C=s(p,["defaultPlaceholder"]);u.useEffect(function(){return S.setSearch(""),S.getInput().focus(),function(){return S.setSearch("")}},[v,S]);var $=u.useMemo(function(){var A=R??"Type a command or search…";return v&&b[v]?b[v].name:A},[b,v,R]);return u.createElement("input",t({},C,{ref:S.inputRefSetter,autoFocus:!0,autoComplete:"off",role:"combobox",spellCheck:"false","aria-expanded":x,"aria-controls":e.KBAR_LISTBOX,"aria-activedescendant":(0,e.getListboxItemId)(_),value:g,placeholder:$,onChange:function(A){var T,M,D;(T=p.onChange)===null||T===void 0||T.call(p,A),S.setSearch(A.target.value),(D=(M=E==null?void 0:E.callbacks)===null||M===void 0?void 0:M.onQueryChange)===null||D===void 0||D.call(M,A.target.value)},onKeyDown:function(A){var T;if((T=p.onKeyDown)===null||T===void 0||T.call(p,A),v&&!g&&A.key==="Backspace"){var M=b[v].parent;S.setCurrentRootAction(M)}}}))}e.KBarSearch=m})(Er)),Er}var xr={};function fs(){return fs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},fs.apply(this,arguments)}function B4(e,t){if(e==null)return{};var n={},i=Object.keys(e),o,s;for(s=0;s<i.length;s++)o=i[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var V4=["bottom","height","left","right","top","width"],H4=function(t,n){return t===void 0&&(t={}),n===void 0&&(n={}),V4.some(function(i){return t[i]!==n[i]})},io=new Map,HT,K4=function e(){var t=[];io.forEach(function(n,i){var o=i.getBoundingClientRect();H4(o,n.rect)&&(n.rect=o,t.push(n))}),t.forEach(function(n){n.callbacks.forEach(function(i){return i(n.rect)})}),HT=window.requestAnimationFrame(e)};function G4(e,t){return{observe:function(){var i=io.size===0;io.has(e)?io.get(e).callbacks.push(t):io.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]}),i&&K4()},unobserve:function(){var i=io.get(e);if(i){var o=i.callbacks.indexOf(t);o>=0&&i.callbacks.splice(o,1),i.callbacks.length||io.delete(e),io.size||cancelAnimationFrame(HT)}}}}var mp=typeof window<"u"?he.useLayoutEffect:he.useEffect;function Q4(e,t){t===void 0&&(t={width:0,height:0});var n=he.useState(e.current),i=n[0],o=n[1],s=he.useReducer(Y4,t),u=s[0],c=s[1],f=he.useRef(!1);return mp(function(){e.current!==i&&o(e.current)}),mp(function(){if(i&&!f.current){f.current=!0;var d=i.getBoundingClientRect();c({rect:d})}},[i]),he.useEffect(function(){if(i){var d=G4(i,function(m){c({rect:m})});return d.observe(),function(){d.unobserve()}}},[i]),u}function Y4(e,t){var n=t.rect;return e.height!==n.height||e.width!==n.width?n:e}var W4=function(){return 50},X4=function(t){return t},J4=function(t,n){var i=n?"offsetWidth":"offsetHeight";return t[i]},KT=function(t){for(var n=Math.max(t.start-t.overscan,0),i=Math.min(t.end+t.overscan,t.size-1),o=[],s=n;s<=i;s++)o.push(s);return o};function Z4(e){var t,n=e.size,i=n===void 0?0:n,o=e.estimateSize,s=o===void 0?W4:o,u=e.overscan,c=u===void 0?1:u,f=e.paddingStart,d=f===void 0?0:f,m=e.paddingEnd,p=m===void 0?0:m,y=e.parentRef,S=e.horizontal,g=e.scrollToFn,b=e.useObserver,v=e.initialRect,_=e.onScrollElement,x=e.scrollOffsetFn,E=e.keyExtractor,R=E===void 0?X4:E,C=e.measureSize,$=C===void 0?J4:C,A=e.rangeExtractor,T=A===void 0?KT:A,M=S?"width":"height",D=S?"scrollLeft":"scrollTop",j=he.useRef({scrollOffset:0,measurements:[]}),I=he.useState(0),L=I[0],K=I[1];j.current.scrollOffset=L;var G=b||Q4,q=G(y,v),Q=q[M];j.current.outerSize=Q;var W=he.useCallback(function(Ce){y.current&&(y.current[D]=Ce)},[y,D]),ne=g||W;g=he.useCallback(function(Ce){ne(Ce,W)},[W,ne]);var X=he.useState({}),P=X[0],B=X[1],U=he.useCallback(function(){return B({})},[]),k=he.useRef([]),V=he.useMemo(function(){var Ce=k.current.length>0?Math.min.apply(Math,k.current):0;k.current=[];for(var Ae=j.current.measurements.slice(0,Ce),$e=Ce;$e<i;$e++){var Fe=R($e),Ie=P[Fe],je=Ae[$e-1]?Ae[$e-1].end:d,Ye=typeof Ie=="number"?Ie:s($e),ke=je+Ye;Ae[$e]={index:$e,start:je,size:Ye,end:ke,key:Fe}}return Ae},[s,P,d,i,R]),J=(((t=V[i-1])==null?void 0:t.end)||d)+p;j.current.measurements=V,j.current.totalSize=J;var le=_?_.current:y.current,ie=he.useRef(x);ie.current=x,mp(function(){if(!le){K(0);return}var Ce=function($e){var Fe=ie.current?ie.current($e):le[D];K(Fe)};return Ce(),le.addEventListener("scroll",Ce,{capture:!1,passive:!0}),function(){le.removeEventListener("scroll",Ce)}},[le,D]);var se=tq(j.current),fe=se.start,Y=se.end,Z=he.useMemo(function(){return T({start:fe,end:Y,overscan:c,size:V.length})},[fe,Y,c,V.length,T]),ue=he.useRef($);ue.current=$;var ae=he.useMemo(function(){for(var Ce=[],Ae=function(je,Ye){var ke=Z[je],Je=V[ke],tt=fs(fs({},Je),{},{measureRef:function(tn){if(tn){var He=ue.current(tn,S);if(He!==tt.size){var At=j.current.scrollOffset;tt.start<At&&W(At+(He-tt.size)),k.current.push(ke),B(function(ln){var $t;return fs(fs({},ln),{},($t={},$t[tt.key]=He,$t))})}}}});Ce.push(tt)},$e=0,Fe=Z.length;$e<Fe;$e++)Ae($e);return Ce},[Z,W,S,V]),Se=he.useRef(!1);mp(function(){Se.current&&B({}),Se.current=!0},[s]);var ye=he.useCallback(function(Ce,Ae){var $e=Ae===void 0?{}:Ae,Fe=$e.align,Ie=Fe===void 0?"start":Fe,je=j.current,Ye=je.scrollOffset,ke=je.outerSize;Ie==="auto"&&(Ce<=Ye?Ie="start":Ce>=Ye+ke?Ie="end":Ie="start"),Ie==="start"?g(Ce):Ie==="end"?g(Ce-ke):Ie==="center"&&g(Ce-ke/2)},[g]),Oe=he.useCallback(function(Ce,Ae){var $e=Ae===void 0?{}:Ae,Fe=$e.align,Ie=Fe===void 0?"auto":Fe,je=B4($e,["align"]),Ye=j.current,ke=Ye.measurements,Je=Ye.scrollOffset,tt=Ye.outerSize,wt=ke[Math.max(0,Math.min(Ce,i-1))];if(wt){if(Ie==="auto")if(wt.end>=Je+tt)Ie="end";else if(wt.start<=Je)Ie="start";else return;var tn=Ie==="center"?wt.start+wt.size/2:Ie==="end"?wt.end:wt.start;ye(tn,fs({align:Ie},je))}},[ye,i]),Re=he.useCallback(function(){for(var Ce=arguments.length,Ae=new Array(Ce),$e=0;$e<Ce;$e++)Ae[$e]=arguments[$e];Oe.apply(void 0,Ae),requestAnimationFrame(function(){Oe.apply(void 0,Ae)})},[Oe]);return{virtualItems:ae,totalSize:J,scrollToOffset:ye,scrollToIndex:Re,measure:U}}var eq=function(t,n,i,o){for(;t<=n;){var s=(t+n)/2|0,u=i(s);if(u<o)t=s+1;else if(u>o)n=s-1;else return s}return t>0?t-1:0};function tq(e){for(var t=e.measurements,n=e.outerSize,i=e.scrollOffset,o=t.length-1,s=function(d){return t[d].start},u=eq(0,o,s,i),c=u;c<o&&t[c].end<i+n;)c++;return{start:u,end:c}}const nq=Object.freeze(Object.defineProperty({__proto__:null,defaultRangeExtractor:KT,useVirtual:Z4},Symbol.toStringTag,{value:"Module"})),rq=y$(nq);var tR;function iq(){if(tR)return xr;tR=1;var e=xr&&xr.__assign||function(){return e=Object.assign||function(p){for(var y,S=1,g=arguments.length;S<g;S++){y=arguments[S];for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(p[b]=y[b])}return p},e.apply(this,arguments)},t=xr&&xr.__createBinding||(Object.create?(function(p,y,S,g){g===void 0&&(g=S),Object.defineProperty(p,g,{enumerable:!0,get:function(){return y[S]}})}):(function(p,y,S,g){g===void 0&&(g=S),p[g]=y[S]})),n=xr&&xr.__setModuleDefault||(Object.create?(function(p,y){Object.defineProperty(p,"default",{enumerable:!0,value:y})}):function(p,y){p.default=y}),i=xr&&xr.__importStar||function(p){if(p&&p.__esModule)return p;var y={};if(p!=null)for(var S in p)S!=="default"&&Object.prototype.hasOwnProperty.call(p,S)&&t(y,p,S);return n(y,p),y};Object.defineProperty(xr,"__esModule",{value:!0}),xr.KBarResults=void 0;var o=i(pn()),s=rq,u=VT(),c=Po(),f=Ps(),d=0,m=function(p){var y=o.useRef(null),S=o.useRef(null),g=o.useRef(p.items);g.current=p.items;var b=(0,s.useVirtual)({size:g.current.length,parentRef:S}),v=(0,c.useKBar)(function(M){return{search:M.searchQuery,currentRootActionId:M.currentRootActionId,activeIndex:M.activeIndex}}),_=v.query,x=v.search,E=v.currentRootActionId,R=v.activeIndex,C=v.options;o.useEffect(function(){var M=function(D){var j;D.isComposing||(D.key==="ArrowUp"||D.ctrlKey&&D.key==="p"?(D.preventDefault(),_.setActiveIndex(function(I){var L=I>d?I-1:I;if(typeof g.current[L]=="string"){if(L===0)return I;L-=1}return L})):D.key==="ArrowDown"||D.ctrlKey&&D.key==="n"?(D.preventDefault(),_.setActiveIndex(function(I){var L=I<g.current.length-1?I+1:I;if(typeof g.current[L]=="string"){if(L===g.current.length-1)return I;L+=1}return L})):D.key==="Enter"&&(D.preventDefault(),(j=y.current)===null||j===void 0||j.click()))};return window.addEventListener("keydown",M),function(){return window.removeEventListener("keydown",M)}},[_]);var $=b.scrollToIndex;o.useEffect(function(){$(R,{align:R<=1?"end":"auto"})},[R,$]),o.useEffect(function(){_.setActiveIndex(typeof p.items[d]=="string"?d+1:d)},[x,E,p.items,_]);var A=o.useCallback(function(M){var D,j;typeof M!="string"&&(M.command?(M.command.perform(M),_.toggle()):(_.setSearch(""),_.setCurrentRootAction(M.id)),(j=(D=C.callbacks)===null||D===void 0?void 0:D.onSelectAction)===null||j===void 0||j.call(D,M))},[_,C]),T=(0,f.usePointerMovedSinceMount)();return o.createElement("div",{ref:S,style:{maxHeight:p.maxHeight||400,position:"relative",overflow:"auto"}},o.createElement("div",{role:"listbox",id:u.KBAR_LISTBOX,style:{height:b.totalSize+"px",width:"100%"}},b.virtualItems.map(function(M){var D=g.current[M.index],j=typeof D!="string"&&{onPointerMove:function(){return T&&R!==M.index&&_.setActiveIndex(M.index)},onPointerDown:function(){return _.setActiveIndex(M.index)},onClick:function(){return A(D)}},I=M.index===R;return o.createElement("div",e({ref:I?y:null,id:(0,u.getListboxItemId)(M.index),role:"option","aria-selected":I,key:M.index,style:{position:"absolute",top:0,left:0,width:"100%",transform:"translateY("+M.start+"px)"}},j),o.cloneElement(p.onRender({item:D,active:I}),{ref:M.measureRef}))})))};return xr.KBarResults=m,xr}var oi={},nR;function aq(){if(nR)return oi;nR=1;var e=oi&&oi.__createBinding||(Object.create?(function(u,c,f,d){d===void 0&&(d=f),Object.defineProperty(u,d,{enumerable:!0,get:function(){return c[f]}})}):(function(u,c,f,d){d===void 0&&(d=f),u[d]=c[f]})),t=oi&&oi.__setModuleDefault||(Object.create?(function(u,c){Object.defineProperty(u,"default",{enumerable:!0,value:c})}):function(u,c){u.default=c}),n=oi&&oi.__importStar||function(u){if(u&&u.__esModule)return u;var c={};if(u!=null)for(var f in u)f!=="default"&&Object.prototype.hasOwnProperty.call(u,f)&&e(c,u,f);return t(c,u),c};Object.defineProperty(oi,"__esModule",{value:!0}),oi.useRegisterActions=void 0;var i=n(pn()),o=Po();function s(u,c){c===void 0&&(c=[]);var f=(0,o.useKBar)().query,d=i.useMemo(function(){return u},c);i.useEffect(function(){if(d.length){var m=f.registerActions(d);return function(){m()}}},[f,d])}return oi.useRegisterActions=s,oi}var Cr={},rR;function oq(){if(rR)return Cr;rR=1;var e=Cr&&Cr.__assign||function(){return e=Object.assign||function(p){for(var y,S=1,g=arguments.length;S<g;S++){y=arguments[S];for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(p[b]=y[b])}return p},e.apply(this,arguments)},t=Cr&&Cr.__createBinding||(Object.create?(function(p,y,S,g){g===void 0&&(g=S),Object.defineProperty(p,g,{enumerable:!0,get:function(){return y[S]}})}):(function(p,y,S,g){g===void 0&&(g=S),p[g]=y[S]})),n=Cr&&Cr.__setModuleDefault||(Object.create?(function(p,y){Object.defineProperty(p,"default",{enumerable:!0,value:y})}):function(p,y){p.default=y}),i=Cr&&Cr.__importStar||function(p){if(p&&p.__esModule)return p;var y={};if(p!=null)for(var S in p)S!=="default"&&Object.prototype.hasOwnProperty.call(p,S)&&t(y,p,S);return n(y,p),y};Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.KBarAnimator=void 0;var o=i(pn()),s=cu(),u=Po(),c=Ps(),f=[{opacity:0,transform:"scale(.99)"},{opacity:1,transform:"scale(1.01)"},{opacity:1,transform:"scale(1)"}],d=[{transform:"scale(1)"},{transform:"scale(.98)"},{transform:"scale(1)"}],m=function(p){var y,S,g=p.children,b=p.style,v=p.className,_=(0,u.useKBar)(function(I){return{visualState:I.visualState,currentRootActionId:I.currentRootActionId}}),x=_.visualState,E=_.currentRootActionId,R=_.query,C=_.options,$=o.useRef(null),A=o.useRef(null),T=((y=C==null?void 0:C.animations)===null||y===void 0?void 0:y.enterMs)||0,M=((S=C==null?void 0:C.animations)===null||S===void 0?void 0:S.exitMs)||0;o.useEffect(function(){if(x!==s.VisualState.showing){var I=x===s.VisualState.animatingIn?T:M,L=$.current;L==null||L.animate(f,{duration:I,easing:x===s.VisualState.animatingOut?"ease-in":"ease-out",direction:x===s.VisualState.animatingOut?"reverse":"normal",fill:"forwards"})}},[C,x,T,M]);var D=o.useRef();o.useEffect(function(){if(x===s.VisualState.showing){var I=$.current,L=A.current;if(!I||!L)return;var K=new ResizeObserver(function(G){for(var q=0,Q=G;q<Q.length;q++){var W=Q[q],ne=W.contentRect;D.current||(D.current=ne.height),I.animate([{height:D.current+"px"},{height:ne.height+"px"}],{duration:T/2,easing:"ease-out",fill:"forwards"}),D.current=ne.height}});return K.observe(L),function(){K.unobserve(L)}}},[x,C,T,M]);var j=o.useRef(!0);return o.useEffect(function(){if(j.current){j.current=!1;return}var I=$.current;I&&I.animate(d,{duration:T,easing:"ease-out"})},[E,T]),(0,c.useOuterClick)($,function(){var I,L;R.setVisualState(s.VisualState.animatingOut),(L=(I=C.callbacks)===null||I===void 0?void 0:I.onClose)===null||L===void 0||L.call(I)}),o.createElement("div",{ref:$,style:e(e(e({},f[0]),b),{pointerEvents:"auto"}),className:v},o.createElement("div",{ref:A},g))};return Cr.KBarAnimator=m,Cr}var rs={},iR;function sq(){return iR||(iR=1,(function(e){var t=rs&&rs.__createBinding||(Object.create?(function(i,o,s,u){u===void 0&&(u=s),Object.defineProperty(i,u,{enumerable:!0,get:function(){return o[s]}})}):(function(i,o,s,u){u===void 0&&(u=s),i[u]=o[s]})),n=rs&&rs.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&t(o,i,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(UT(),e),n(qT(),e)})(rs)),rs}var aR;function lq(){return aR||(aR=1,(function(e){var t=es&&es.__createBinding||(Object.create?(function(o,s,u,c){c===void 0&&(c=u),Object.defineProperty(o,c,{enumerable:!0,get:function(){return s[u]}})}):(function(o,s,u,c){c===void 0&&(c=u),o[c]=s[u]})),n=es&&es.__exportStar||function(o,s){for(var u in o)u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u)&&t(s,o,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.Priority=e.createAction=void 0;var i=Ps();Object.defineProperty(e,"createAction",{enumerable:!0,get:function(){return i.createAction}}),Object.defineProperty(e,"Priority",{enumerable:!0,get:function(){return i.Priority}}),n(P4(),e),n(q4(),e),n(U4(),e),n(VT(),e),n(iq(),e),n(Po(),e),n(aq(),e),n(BT(),e),n(oq(),e),n(cu(),e),n(sq(),e)})(es)),es}var Vn=lq(),uq=Object.defineProperty,Sa=(e,t)=>uq(e,"name",{value:t,configurable:!0}),El=Sa(e=>e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()),"capitalize"),cq=Sa(()=>{const e=Fn(),{id:t,action:n,resource:i,resources:o}=sn(),s=qp(),u=er(),{mutation:{mutate:c}}=kb(),f=pf(),d=z.useContext(Vn.KBarContext),{can:m}=YL(),[p,y]=z.useState([]);z.useEffect(()=>{Sa(async()=>await Promise.all(S().flatMap(v=>g(v))),"preaparedActions")().then(v=>y(v.flatMap(_=>_)))},[o,t,i,n]),z.useEffect(()=>{p.length===0&&d.query.setVisualState(Vn.VisualState.hidden)},[p]);const S=Sa(()=>{const b=[...o],v=b==null?void 0:b.findIndex(_=>(_.identifier??(_==null?void 0:_.name))===((i==null?void 0:i.identifier)??(i==null?void 0:i.name)));if(v>0){const _=b[v];b.splice(v,1),b.splice(0,0,_)}return b},"moveActionToFirst"),g=Sa(async b=>{var v,_,x,E,R,C;const{name:$,list:A,create:T,show:M,edit:D}=b,j=(v=b==null?void 0:b.meta)==null?void 0:v.label,I=(_=b==null?void 0:b.meta)==null?void 0:_.icon,L=(x=b==null?void 0:b.meta)==null?void 0:x.canDelete,K=j??e(`${b.name}.${b.name}`,f(b.name,"plural")),G=[];if(A&&(i!==void 0&&(i==null?void 0:i.name)!==$||n!==void 0&&(i==null?void 0:i.name)===$)){const{can:q}=await(m==null?void 0:m({resource:$,action:"list",params:{id:t,resource:b}}))||{can:!0};q&&G.push(Vn.createAction({name:e("actions.list",El("list")),section:K,icon:I,perform:()=>{const Q=s({resource:b,action:"list"});Q&&u({to:Q})}}))}if(((E=b==null?void 0:b.meta)!=null&&E.canCreate||T)&&T&&(n!=="create"||(i==null?void 0:i.name)!==$)){const{can:q}=await(m==null?void 0:m({resource:$,action:"create",params:{resource:b}}))||{can:!0};q&&G.push(Vn.createAction({name:e("actions.create",El("create")),section:K,icon:I,keywords:"new",perform:()=>{const Q=s({resource:b,action:"create"});Q&&u({to:Q})}}))}if((i==null?void 0:i.name)===$&&t){if(((R=b==null?void 0:b.meta)!=null&&R.canShow||M)&&M&&n!=="show"){const{can:q}=await(m==null?void 0:m({resource:$,action:"show",params:{id:t,resource:b}}))||{can:!0};q&&G.push(Vn.createAction({name:e("actions.show",El("show")),section:K,icon:I,perform:()=>{const Q=s({resource:b,action:"show",meta:{id:t}});Q&&u({to:Q})}}))}if(((C=b==null?void 0:b.meta)!=null&&C.canEdit||D)&&D&&n!=="edit"){const{can:q}=await(m==null?void 0:m({resource:$,action:"edit",params:{id:t,resource:b}}))||{can:!0};q&&G.push(Vn.createAction({name:e("actions.edit",El("edit")),section:K,icon:I,perform:()=>{const Q=s({resource:b,action:"edit",meta:{id:t}});Q&&u({to:Q})}}))}if(L){const{can:q}=await(m==null?void 0:m({resource:$,action:"delete",params:{id:t,resource:b}}))||{can:!0};q&&G.push({id:"delete",name:e("actions.delete",El("delete")),section:K,icon:I},Vn.createAction({name:e("buttons.delete",El("delete")),section:e("buttons.confirm","Are you sure?"),parent:"delete",perform:()=>{c({resource:b.name,id:t},{onSuccess:()=>{const Q=s({resource:b,action:"list"});Q&&u({to:Q})}})}}),Vn.createAction({name:e("buttons.cancel","Cancel"),parent:"delete",perform:()=>null}))}}return G},"createActionWithResource");Vn.useRegisterActions(p,[p])},"useRefineKbar"),fq=Sa(()=>{const e={padding:"12px 16px",fontSize:"16px",width:"100%",boxSizing:"border-box",outline:"none",border:"none",background:"rgb(252 252 252)",color:"black"},t={maxWidth:"600px",width:"100%",background:"white",color:"black",borderRadius:"8px",overflow:"hidden",boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.25)"},n={opacity:1,transition:"background 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0s",backdropFilter:"saturate(180%) blur(1px)",background:"rgba(0, 0, 0, 0.1)",zIndex:"9999"};return he.createElement(Vn.KBarPortal,null,he.createElement(Vn.KBarPositioner,{style:n},he.createElement(Vn.KBarAnimator,{style:t},he.createElement(Vn.KBarSearch,{style:e}),he.createElement(hq,null))))},"CommandBar"),dq={padding:"8px 16px",fontSize:"14px",textTransform:"uppercase",fontWeight:"bold",opacity:.5},hq=Sa(()=>{const{results:e,rootActionId:t}=Vn.useMatches();return he.createElement(Vn.KBarResults,{items:e,onRender:({item:n,active:i})=>typeof n=="string"?he.createElement("div",{style:dq},n):he.createElement(GT,{action:n,active:i,currentRootActionId:t})})},"RenderResults"),GT=he.forwardRef(({action:e,active:t,currentRootActionId:n},i)=>{var o;const s=he.useMemo(()=>{if(!n)return e.ancestors;const u=e.ancestors.findIndex(c=>c.id===n);return e.ancestors.slice(u+1)},[e.ancestors,n]);return he.createElement("div",{ref:i,style:{padding:"12px 16px",background:t?"rgba(0 0 0 / 0.05)":"transparent",borderLeft:`2px solid ${t?"rgb(28 28 29)":"transparent"}`,display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer"}},he.createElement("div",{style:{display:"flex",gap:"8px",alignItems:"center",fontSize:14}},e.icon&&e.icon,he.createElement("div",{style:{display:"flex",flexDirection:"column"}},he.createElement("div",null,s.length>0&&s.map(u=>he.createElement(he.Fragment,{key:u.id},he.createElement("span",{style:{opacity:.5,marginRight:8}},u.name),he.createElement("span",{style:{marginRight:8}},"›"))),he.createElement("span",{style:{color:e.name.toLocaleUpperCase()==="DELETE"?"red":"black"}},e.name)),e.subtitle&&he.createElement("span",{style:{fontSize:12}},e.subtitle))),(o=e.shortcut)!=null&&o.length?he.createElement("div",{"aria-hidden":!0,style:{display:"grid",gridAutoFlow:"column",gap:"4px"}},e.shortcut.map(u=>he.createElement("kbd",{key:u,style:{padding:"4px 6px",background:"rgba(0 0 0 / .1)",borderRadius:"4px",fontSize:14}},u))):null)});GT.displayName="ResultItem";var pq=Sa(({commandBarProps:e})=>{const t=z.useContext(QT);cq();const n={...t,...e};return he.createElement(fq,{...n})},"RefineKbar"),QT=z.createContext({}),mq=Sa(({children:e,commandBarProps:t})=>he.createElement(QT.Provider,{value:t??{}},he.createElement(Vn.KBarProvider,null,e)),"RefineKbarProvider");/**
|
|
77
|
-
* react-router v7.12.0
|
|
78
|
-
*
|
|
79
|
-
* Copyright (c) Remix Software Inc.
|
|
80
|
-
*
|
|
81
|
-
* This source code is licensed under the MIT license found in the
|
|
82
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
83
|
-
*
|
|
84
|
-
* @license MIT
|
|
85
|
-
*/var oR="popstate";function gq(e={}){function t(i,o){let{pathname:s,search:u,hash:c}=i.location;return B0("",{pathname:s,search:u,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(i,o){return typeof o=="string"?o:Vc(o)}return yq(t,n,null,e)}function Qt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Yr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function vq(){return Math.random().toString(36).substring(2,10)}function sR(e,t){return{usr:e.state,key:e.key,idx:t}}function B0(e,t,n=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?fu(t):t,state:n,key:t&&t.key||i||vq()}}function Vc({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function fu(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function yq(e,t,n,i={}){let{window:o=document.defaultView,v5Compat:s=!1}=i,u=o.history,c="POP",f=null,d=m();d==null&&(d=0,u.replaceState({...u.state,idx:d},""));function m(){return(u.state||{idx:null}).idx}function p(){c="POP";let v=m(),_=v==null?null:v-d;d=v,f&&f({action:c,location:b.location,delta:_})}function y(v,_){c="PUSH";let x=B0(b.location,v,_);d=m()+1;let E=sR(x,d),R=b.createHref(x);try{u.pushState(E,"",R)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(R)}s&&f&&f({action:c,location:b.location,delta:1})}function S(v,_){c="REPLACE";let x=B0(b.location,v,_);d=m();let E=sR(x,d),R=b.createHref(x);u.replaceState(E,"",R),s&&f&&f({action:c,location:b.location,delta:0})}function g(v){return bq(v)}let b={get action(){return c},get location(){return e(o,u)},listen(v){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(oR,p),f=v,()=>{o.removeEventListener(oR,p),f=null}},createHref(v){return t(o,v)},createURL:g,encodeLocation(v){let _=g(v);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:y,replace:S,go(v){return u.go(v)}};return b}function bq(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Qt(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:Vc(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function YT(e,t,n="/"){return Sq(e,t,n,!1)}function Sq(e,t,n,i){let o=typeof t=="string"?fu(t):t,s=xa(o.pathname||"/",n);if(s==null)return null;let u=WT(e);_q(u);let c=null;for(let f=0;c==null&&f<u.length;++f){let d=Dq(s);c=Tq(u[f],d,i)}return c}function WT(e,t=[],n=[],i="",o=!1){let s=(u,c,f=o,d)=>{let m={relativePath:d===void 0?u.path||"":d,caseSensitive:u.caseSensitive===!0,childrenIndex:c,route:u};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(i)&&f)return;Qt(m.relativePath.startsWith(i),`Absolute route path "${m.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(i.length)}let p=wa([i,m.relativePath]),y=n.concat(m);u.children&&u.children.length>0&&(Qt(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),WT(u.children,t,y,p,f)),!(u.path==null&&!u.index)&&t.push({path:p,score:Aq(p,u.index),routesMeta:y})};return e.forEach((u,c)=>{var f;if(u.path===""||!((f=u.path)!=null&&f.includes("?")))s(u,c);else for(let d of XT(u.path))s(u,c,!0,d)}),t}function XT(e){let t=e.split("/");if(t.length===0)return[];let[n,...i]=t,o=n.endsWith("?"),s=n.replace(/\?$/,"");if(i.length===0)return o?[s,""]:[s];let u=XT(i.join("/")),c=[];return c.push(...u.map(f=>f===""?s:[s,f].join("/"))),o&&c.push(...u),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function _q(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:$q(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var wq=/^:[\w-]+$/,Eq=3,xq=2,Cq=1,Rq=10,Oq=-2,lR=e=>e==="*";function Aq(e,t){let n=e.split("/"),i=n.length;return n.some(lR)&&(i+=Oq),t&&(i+=xq),n.filter(o=>!lR(o)).reduce((o,s)=>o+(wq.test(s)?Eq:s===""?Cq:Rq),i)}function $q(e,t){return e.length===t.length&&e.slice(0,-1).every((i,o)=>i===t[o])?e[e.length-1]-t[t.length-1]:0}function Tq(e,t,n=!1){let{routesMeta:i}=e,o={},s="/",u=[];for(let c=0;c<i.length;++c){let f=i[c],d=c===i.length-1,m=s==="/"?t:t.slice(s.length)||"/",p=Hc({path:f.relativePath,caseSensitive:f.caseSensitive,end:d},m),y=f.route;if(!p&&d&&n&&!i[i.length-1].route.index&&(p=Hc({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},m)),!p)return null;Object.assign(o,p.params),u.push({params:o,pathname:wa([s,p.pathname]),pathnameBase:Iq(wa([s,p.pathnameBase])),route:y}),p.pathnameBase!=="/"&&(s=wa([s,p.pathnameBase]))}return u}function Hc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=Mq(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let s=o[0],u=s.replace(/(.)\/+$/,"$1"),c=o.slice(1);return{params:i.reduce((d,{paramName:m,isOptional:p},y)=>{if(m==="*"){let g=c[y]||"";u=s.slice(0,s.length-g.length).replace(/(.)\/+$/,"$1")}const S=c[y];return p&&!S?d[m]=void 0:d[m]=(S||"").replace(/%2F/g,"/"),d},{}),pathname:s,pathnameBase:u,pattern:e}}function Mq(e,t=!1,n=!0){Yr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,c,f)=>(i.push({paramName:c,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),i]}function Dq(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Yr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function xa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&i!=="/"?null:e.slice(n)||"/"}var JT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jq=e=>JT.test(e);function Nq(e,t="/"){let{pathname:n,search:i="",hash:o=""}=typeof e=="string"?fu(e):e,s;if(n)if(jq(n))s=n;else{if(n.includes("//")){let u=n;n=n.replace(/\/\/+/g,"/"),Yr(!1,`Pathnames cannot have embedded double slashes - normalizing ${u} -> ${n}`)}n.startsWith("/")?s=uR(n.substring(1),"/"):s=uR(n,t)}else s=t;return{pathname:s,search:zq(i),hash:Fq(o)}}function uR(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Ay(e,t,n,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Pq(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Qb(e){let t=Pq(e);return t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase)}function Yb(e,t,n,i=!1){let o;typeof e=="string"?o=fu(e):(o={...e},Qt(!o.pathname||!o.pathname.includes("?"),Ay("?","pathname","search",o)),Qt(!o.pathname||!o.pathname.includes("#"),Ay("#","pathname","hash",o)),Qt(!o.search||!o.search.includes("#"),Ay("#","search","hash",o)));let s=e===""||o.pathname==="",u=s?"/":o.pathname,c;if(u==null)c=n;else{let p=t.length-1;if(!i&&u.startsWith("..")){let y=u.split("/");for(;y[0]==="..";)y.shift(),p-=1;o.pathname=y.join("/")}c=p>=0?t[p]:"/"}let f=Nq(o,c),d=u&&u!=="/"&&u.endsWith("/"),m=(s||u===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(d||m)&&(f.pathname+="/"),f}var wa=e=>e.join("/").replace(/\/\/+/g,"/"),Iq=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),zq=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Fq=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,kq=class{constructor(e,t,n,i=!1){this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Lq(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function qq(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ZT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function eM(e,t){let n=e;if(typeof n!="string"||!JT.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,o=!1;if(ZT)try{let s=new URL(window.location.href),u=n.startsWith("//")?new URL(s.protocol+n):new URL(n),c=xa(u.pathname,t);u.origin===s.origin&&c!=null?n=c+u.search+u.hash:o=!0}catch{Yr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var tM=["POST","PUT","PATCH","DELETE"];new Set(tM);var Uq=["GET",...tM];new Set(Uq);var du=z.createContext(null);du.displayName="DataRouter";var Up=z.createContext(null);Up.displayName="DataRouterState";var Bq=z.createContext(!1),nM=z.createContext({isTransitioning:!1});nM.displayName="ViewTransition";var Vq=z.createContext(new Map);Vq.displayName="Fetchers";var Hq=z.createContext(null);Hq.displayName="Await";var fr=z.createContext(null);fr.displayName="Navigation";var Sf=z.createContext(null);Sf.displayName="Location";var Zr=z.createContext({outlet:null,matches:[],isDataRoute:!1});Zr.displayName="Route";var Wb=z.createContext(null);Wb.displayName="RouteError";var rM="REACT_ROUTER_ERROR",Kq="REDIRECT",Gq="ROUTE_ERROR_RESPONSE";function Qq(e){if(e.startsWith(`${rM}:${Kq}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Yq(e){if(e.startsWith(`${rM}:${Gq}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new kq(t.status,t.statusText,t.data)}catch{}}function Wq(e,{relative:t}={}){Qt(hu(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=z.useContext(fr),{hash:o,pathname:s,search:u}=_f(e,{relative:t}),c=s;return n!=="/"&&(c=s==="/"?n:wa([n,s])),i.createHref({pathname:c,search:u,hash:o})}function hu(){return z.useContext(Sf)!=null}function Wr(){return Qt(hu(),"useLocation() may be used only in the context of a <Router> component."),z.useContext(Sf).location}var iM="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function aM(e){z.useContext(fr).static||z.useLayoutEffect(e)}function gp(){let{isDataRoute:e}=z.useContext(Zr);return e?fU():Xq()}function Xq(){Qt(hu(),"useNavigate() may be used only in the context of a <Router> component.");let e=z.useContext(du),{basename:t,navigator:n}=z.useContext(fr),{matches:i}=z.useContext(Zr),{pathname:o}=Wr(),s=JSON.stringify(Qb(i)),u=z.useRef(!1);return aM(()=>{u.current=!0}),z.useCallback((f,d={})=>{if(Yr(u.current,iM),!u.current)return;if(typeof f=="number"){n.go(f);return}let m=Yb(f,JSON.parse(s),o,d.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:wa([t,m.pathname])),(d.replace?n.replace:n.push)(m,d.state,d)},[t,n,s,o,e])}var Jq=z.createContext(null);function Zq(e){let t=z.useContext(Zr).outlet;return z.useMemo(()=>t&&z.createElement(Jq.Provider,{value:e},t),[t,e])}function oM(){let{matches:e}=z.useContext(Zr),t=e[e.length-1];return t?t.params:{}}function _f(e,{relative:t}={}){let{matches:n}=z.useContext(Zr),{pathname:i}=Wr(),o=JSON.stringify(Qb(n));return z.useMemo(()=>Yb(e,JSON.parse(o),i,t==="path"),[e,o,i,t])}function eU(e,t){return sM(e,t)}function sM(e,t,n,i,o){var x;Qt(hu(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=z.useContext(fr),{matches:u}=z.useContext(Zr),c=u[u.length-1],f=c?c.params:{},d=c?c.pathname:"/",m=c?c.pathnameBase:"/",p=c&&c.route;{let E=p&&p.path||"";uM(d,!p||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${E}">) 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.
|
|
86
|
-
|
|
87
|
-
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let y=Wr(),S;if(t){let E=typeof t=="string"?fu(t):t;Qt(m==="/"||((x=E.pathname)==null?void 0:x.startsWith(m)),`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 "${m}" but pathname "${E.pathname}" was given in the \`location\` prop.`),S=E}else S=y;let g=S.pathname||"/",b=g;if(m!=="/"){let E=m.replace(/^\//,"").split("/");b="/"+g.replace(/^\//,"").split("/").slice(E.length).join("/")}let v=YT(e,{pathname:b});Yr(p||v!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),Yr(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.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 _=aU(v&&v.map(E=>Object.assign({},E,{params:Object.assign({},f,E.params),pathname:wa([m,s.encodeLocation?s.encodeLocation(E.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?m:wa([m,s.encodeLocation?s.encodeLocation(E.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),u,n,i,o);return t&&_?z.createElement(Sf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...S},navigationType:"POP"}},_):_}function tU(){let e=cU(),t=Lq(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=z.createElement(z.Fragment,null,z.createElement("p",null,"💿 Hey developer 👋"),z.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",z.createElement("code",{style:s},"ErrorBoundary")," or"," ",z.createElement("code",{style:s},"errorElement")," prop on your route.")),z.createElement(z.Fragment,null,z.createElement("h2",null,"Unexpected Application Error!"),z.createElement("h3",{style:{fontStyle:"italic"}},t),n?z.createElement("pre",{style:o},n):null,u)}var nU=z.createElement(tU,null),lM=class extends z.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=Yq(e.digest);n&&(e=n)}let t=e!==void 0?z.createElement(Zr.Provider,{value:this.props.routeContext},z.createElement(Wb.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?z.createElement(rU,{error:e},t):t}};lM.contextType=Bq;var $y=new WeakMap;function rU({children:e,error:t}){let{basename:n}=z.useContext(fr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=Qq(t.digest);if(i){let o=$y.get(t);if(o)throw o;let s=eM(i.location,n);if(ZT&&!$y.get(t))if(s.isExternal||i.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:i.replace}));throw $y.set(t,u),u}return z.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return e}function iU({routeContext:e,match:t,children:n}){let i=z.useContext(du);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),z.createElement(Zr.Provider,{value:e},n)}function aU(e,t=[],n=null,i=null,o=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,u=n==null?void 0:n.errors;if(u!=null){let m=s.findIndex(p=>p.route.id&&(u==null?void 0:u[p.route.id])!==void 0);Qt(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),s=s.slice(0,Math.min(s.length,m+1))}let c=!1,f=-1;if(n)for(let m=0;m<s.length;m++){let p=s[m];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(f=m),p.route.id){let{loaderData:y,errors:S}=n,g=p.route.loader&&!y.hasOwnProperty(p.route.id)&&(!S||S[p.route.id]===void 0);if(p.route.lazy||g){c=!0,f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}let d=n&&i?(m,p)=>{var y,S;i(m,{location:n.location,params:((S=(y=n.matches)==null?void 0:y[0])==null?void 0:S.params)??{},unstable_pattern:qq(n.matches),errorInfo:p})}:void 0;return s.reduceRight((m,p,y)=>{let S,g=!1,b=null,v=null;n&&(S=u&&p.route.id?u[p.route.id]:void 0,b=p.route.errorElement||nU,c&&(f<0&&y===0?(uM("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,v=null):f===y&&(g=!0,v=p.route.hydrateFallbackElement||null)));let _=t.concat(s.slice(0,y+1)),x=()=>{let E;return S?E=b:g?E=v:p.route.Component?E=z.createElement(p.route.Component,null):p.route.element?E=p.route.element:E=m,z.createElement(iU,{match:p,routeContext:{outlet:m,matches:_,isDataRoute:n!=null},children:E})};return n&&(p.route.ErrorBoundary||p.route.errorElement||y===0)?z.createElement(lM,{location:n.location,revalidation:n.revalidation,component:b,error:S,children:x(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:d}):x()},null)}function Xb(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function oU(e){let t=z.useContext(du);return Qt(t,Xb(e)),t}function sU(e){let t=z.useContext(Up);return Qt(t,Xb(e)),t}function lU(e){let t=z.useContext(Zr);return Qt(t,Xb(e)),t}function Jb(e){let t=lU(e),n=t.matches[t.matches.length-1];return Qt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function uU(){return Jb("useRouteId")}function cU(){var i;let e=z.useContext(Wb),t=sU("useRouteError"),n=Jb("useRouteError");return e!==void 0?e:(i=t.errors)==null?void 0:i[n]}function fU(){let{router:e}=oU("useNavigate"),t=Jb("useNavigate"),n=z.useRef(!1);return aM(()=>{n.current=!0}),z.useCallback(async(o,s={})=>{Yr(n.current,iM),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...s}))},[e,t])}var cR={};function uM(e,t,n){!t&&!cR[e]&&(cR[e]=!0,Yr(!1,n))}z.memo(dU);function dU({routes:e,future:t,state:n,onError:i}){return sM(e,void 0,n,i,t)}function fR({to:e,replace:t,state:n,relative:i}){Qt(hu(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=z.useContext(fr);Yr(!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:s}=z.useContext(Zr),{pathname:u}=Wr(),c=gp(),f=Yb(e,Qb(s),u,i==="path"),d=JSON.stringify(f);return z.useEffect(()=>{c(JSON.parse(d),{replace:t,state:n,relative:i})},[c,d,i,t,n]),null}function hU(e){return Zq(e.context)}function ao(e){Qt(!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 pU({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:o,static:s=!1,unstable_useTransitions:u}){Qt(!hu(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=z.useMemo(()=>({basename:c,navigator:o,static:s,unstable_useTransitions:u,future:{}}),[c,o,s,u]);typeof n=="string"&&(n=fu(n));let{pathname:d="/",search:m="",hash:p="",state:y=null,key:S="default"}=n,g=z.useMemo(()=>{let b=xa(d,c);return b==null?null:{location:{pathname:b,search:m,hash:p,state:y,key:S},navigationType:i}},[c,d,m,p,y,S,i]);return Yr(g!=null,`<Router basename="${c}"> is not able to match the URL "${d}${m}${p}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:z.createElement(fr.Provider,{value:f},z.createElement(Sf.Provider,{children:t,value:g}))}function mU({children:e,location:t}){return eU(V0(e),t)}function V0(e,t=[]){let n=[];return z.Children.forEach(e,(i,o)=>{if(!z.isValidElement(i))return;let s=[...t,o];if(i.type===z.Fragment){n.push.apply(n,V0(i.props.children,s));return}Qt(i.type===ao,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Qt(!i.props.index||!i.props.children,"An index route cannot have child routes.");let u={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(u.children=V0(i.props.children,s)),n.push(u)}),n}var Jh="get",Zh="application/x-www-form-urlencoded";function Bp(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function gU(e){return Bp(e)&&e.tagName.toLowerCase()==="button"}function vU(e){return Bp(e)&&e.tagName.toLowerCase()==="form"}function yU(e){return Bp(e)&&e.tagName.toLowerCase()==="input"}function bU(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function SU(e,t){return e.button===0&&(!t||t==="_self")&&!bU(e)}var Yd=null;function _U(){if(Yd===null)try{new FormData(document.createElement("form"),0),Yd=!1}catch{Yd=!0}return Yd}var wU=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ty(e){return e!=null&&!wU.has(e)?(Yr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Zh}"`),null):e}function EU(e,t){let n,i,o,s,u;if(vU(e)){let c=e.getAttribute("action");i=c?xa(c,t):null,n=e.getAttribute("method")||Jh,o=Ty(e.getAttribute("enctype"))||Zh,s=new FormData(e)}else if(gU(e)||yU(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(i=f?xa(f,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||Jh,o=Ty(e.getAttribute("formenctype"))||Ty(c.getAttribute("enctype"))||Zh,s=new FormData(c,e),!_U()){let{name:d,type:m,value:p}=e;if(m==="image"){let y=d?`${d}.`:"";s.append(`${y}x`,"0"),s.append(`${y}y`,"0")}else d&&s.append(d,p)}}else{if(Bp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Jh,i=null,o=Zh,u=e}return s&&o==="text/plain"&&(u=s,s=void 0),{action:i,method:n.toLowerCase(),encType:o,formData:s,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Zb(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function xU(e,t,n,i){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${i}`:o.pathname=`${o.pathname}.${i}`:o.pathname==="/"?o.pathname=`_root.${i}`:t&&xa(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${i}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${i}`,o}async function CU(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function RU(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function OU(e,t,n){let i=await Promise.all(e.map(async o=>{let s=t.routes[o.route.id];if(s){let u=await CU(s,n);return u.links?u.links():[]}return[]}));return MU(i.flat(1).filter(RU).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function dR(e,t,n,i,o,s){let u=(f,d)=>n[d]?f.route.id!==n[d].route.id:!0,c=(f,d)=>{var m;return n[d].pathname!==f.pathname||((m=n[d].route.path)==null?void 0:m.endsWith("*"))&&n[d].params["*"]!==f.params["*"]};return s==="assets"?t.filter((f,d)=>u(f,d)||c(f,d)):s==="data"?t.filter((f,d)=>{var p;let m=i.routes[f.route.id];if(!m||!m.hasLoader)return!1;if(u(f,d)||c(f,d))return!0;if(f.route.shouldRevalidate){let y=f.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((p=n[0])==null?void 0:p.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function AU(e,t,{includeHydrateFallback:n}={}){return $U(e.map(i=>{let o=t.routes[i.route.id];if(!o)return[];let s=[o.module];return o.clientActionModule&&(s=s.concat(o.clientActionModule)),o.clientLoaderModule&&(s=s.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(s=s.concat(o.hydrateFallbackModule)),o.imports&&(s=s.concat(o.imports)),s}).flat(1))}function $U(e){return[...new Set(e)]}function TU(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function MU(e,t){let n=new Set;return new Set(t),e.reduce((i,o)=>{let s=JSON.stringify(TU(o));return n.has(s)||(n.add(s),i.push({key:s,link:o})),i},[])}function cM(){let e=z.useContext(du);return Zb(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function DU(){let e=z.useContext(Up);return Zb(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var eS=z.createContext(void 0);eS.displayName="FrameworkContext";function fM(){let e=z.useContext(eS);return Zb(e,"You must render this element inside a <HydratedRouter> element"),e}function jU(e,t){let n=z.useContext(eS),[i,o]=z.useState(!1),[s,u]=z.useState(!1),{onFocus:c,onBlur:f,onMouseEnter:d,onMouseLeave:m,onTouchStart:p}=t,y=z.useRef(null);z.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let b=_=>{_.forEach(x=>{u(x.isIntersecting)})},v=new IntersectionObserver(b,{threshold:.5});return y.current&&v.observe(y.current),()=>{v.disconnect()}}},[e]),z.useEffect(()=>{if(i){let b=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(b)}}},[i]);let S=()=>{o(!0)},g=()=>{o(!1),u(!1)};return n?e!=="intent"?[s,y,{}]:[s,y,{onFocus:mc(c,S),onBlur:mc(f,g),onMouseEnter:mc(d,S),onMouseLeave:mc(m,g),onTouchStart:mc(p,S)}]:[!1,y,{}]}function mc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function NU({page:e,...t}){let{router:n}=cM(),i=z.useMemo(()=>YT(n.routes,e,n.basename),[n.routes,e,n.basename]);return i?z.createElement(IU,{page:e,matches:i,...t}):null}function PU(e){let{manifest:t,routeModules:n}=fM(),[i,o]=z.useState([]);return z.useEffect(()=>{let s=!1;return OU(e,t,n).then(u=>{s||o(u)}),()=>{s=!0}},[e,t,n]),i}function IU({page:e,matches:t,...n}){let i=Wr(),{future:o,manifest:s,routeModules:u}=fM(),{basename:c}=cM(),{loaderData:f,matches:d}=DU(),m=z.useMemo(()=>dR(e,t,d,s,i,"data"),[e,t,d,s,i]),p=z.useMemo(()=>dR(e,t,d,s,i,"assets"),[e,t,d,s,i]),y=z.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let b=new Set,v=!1;if(t.forEach(x=>{var R;let E=s.routes[x.route.id];!E||!E.hasLoader||(!m.some(C=>C.route.id===x.route.id)&&x.route.id in f&&((R=u[x.route.id])!=null&&R.shouldRevalidate)||E.hasClientLoader?v=!0:b.add(x.route.id))}),b.size===0)return[];let _=xU(e,c,o.unstable_trailingSlashAwareDataRequests,"data");return v&&b.size>0&&_.searchParams.set("_routes",t.filter(x=>b.has(x.route.id)).map(x=>x.route.id).join(",")),[_.pathname+_.search]},[c,o.unstable_trailingSlashAwareDataRequests,f,i,s,m,t,e,u]),S=z.useMemo(()=>AU(p,s),[p,s]),g=PU(p);return z.createElement(z.Fragment,null,y.map(b=>z.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...n})),S.map(b=>z.createElement("link",{key:b,rel:"modulepreload",href:b,...n})),g.map(({key:b,link:v})=>z.createElement("link",{key:b,nonce:n.nonce,...v})))}function zU(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var FU=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{FU&&(window.__reactRouterVersion="7.12.0")}catch{}function kU({basename:e,children:t,unstable_useTransitions:n,window:i}){let o=z.useRef();o.current==null&&(o.current=gq({window:i,v5Compat:!0}));let s=o.current,[u,c]=z.useState({action:s.action,location:s.location}),f=z.useCallback(d=>{n===!1?c(d):z.startTransition(()=>c(d))},[n]);return z.useLayoutEffect(()=>s.listen(f),[s,f]),z.createElement(pU,{basename:e,children:t,location:u.location,navigationType:u.action,navigator:s,unstable_useTransitions:n})}var dM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vp=z.forwardRef(function({onClick:t,discover:n="render",prefetch:i="none",relative:o,reloadDocument:s,replace:u,state:c,target:f,to:d,preventScrollReset:m,viewTransition:p,unstable_defaultShouldRevalidate:y,...S},g){let{basename:b,unstable_useTransitions:v}=z.useContext(fr),_=typeof d=="string"&&dM.test(d),x=eM(d,b);d=x.to;let E=Wq(d,{relative:o}),[R,C,$]=jU(i,S),A=UU(d,{replace:u,state:c,target:f,preventScrollReset:m,relative:o,viewTransition:p,unstable_defaultShouldRevalidate:y,unstable_useTransitions:v});function T(D){t&&t(D),D.defaultPrevented||A(D)}let M=z.createElement("a",{...S,...$,href:x.absoluteURL||E,onClick:x.isExternal||s?t:T,ref:zU(g,C),target:f,"data-discover":!_&&n==="render"?"true":void 0});return R&&!_?z.createElement(z.Fragment,null,M,z.createElement(NU,{page:E})):M});Vp.displayName="Link";var hM=z.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:i="",end:o=!1,style:s,to:u,viewTransition:c,children:f,...d},m){let p=_f(u,{relative:d.relative}),y=Wr(),S=z.useContext(Up),{navigator:g,basename:b}=z.useContext(fr),v=S!=null&&GU(p)&&c===!0,_=g.encodeLocation?g.encodeLocation(p).pathname:p.pathname,x=y.pathname,E=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;n||(x=x.toLowerCase(),E=E?E.toLowerCase():null,_=_.toLowerCase()),E&&b&&(E=xa(E,b)||E);const R=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let C=x===_||!o&&x.startsWith(_)&&x.charAt(R)==="/",$=E!=null&&(E===_||!o&&E.startsWith(_)&&E.charAt(_.length)==="/"),A={isActive:C,isPending:$,isTransitioning:v},T=C?t:void 0,M;typeof i=="function"?M=i(A):M=[i,C?"active":null,$?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let D=typeof s=="function"?s(A):s;return z.createElement(Vp,{...d,"aria-current":T,className:M,ref:m,style:D,to:u,viewTransition:c},typeof f=="function"?f(A):f)});hM.displayName="NavLink";var LU=z.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:o,state:s,method:u=Jh,action:c,onSubmit:f,relative:d,preventScrollReset:m,viewTransition:p,unstable_defaultShouldRevalidate:y,...S},g)=>{let{unstable_useTransitions:b}=z.useContext(fr),v=HU(),_=KU(c,{relative:d}),x=u.toLowerCase()==="get"?"get":"post",E=typeof c=="string"&&dM.test(c),R=C=>{if(f&&f(C),C.defaultPrevented)return;C.preventDefault();let $=C.nativeEvent.submitter,A=($==null?void 0:$.getAttribute("formmethod"))||u,T=()=>v($||C.currentTarget,{fetcherKey:t,method:A,navigate:n,replace:o,state:s,relative:d,preventScrollReset:m,viewTransition:p,unstable_defaultShouldRevalidate:y});b&&n!==!1?z.startTransition(()=>T()):T()};return z.createElement("form",{ref:g,method:x,action:_,onSubmit:i?f:R,...S,"data-discover":!E&&e==="render"?"true":void 0})});LU.displayName="Form";function qU(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pM(e){let t=z.useContext(du);return Qt(t,qU(e)),t}function UU(e,{target:t,replace:n,state:i,preventScrollReset:o,relative:s,viewTransition:u,unstable_defaultShouldRevalidate:c,unstable_useTransitions:f}={}){let d=gp(),m=Wr(),p=_f(e,{relative:s});return z.useCallback(y=>{if(SU(y,t)){y.preventDefault();let S=n!==void 0?n:Vc(m)===Vc(p),g=()=>d(e,{replace:S,state:i,preventScrollReset:o,relative:s,viewTransition:u,unstable_defaultShouldRevalidate:c});f?z.startTransition(()=>g()):g()}},[m,d,p,n,i,t,e,o,s,u,c,f])}var BU=0,VU=()=>`__${String(++BU)}__`;function HU(){let{router:e}=pM("useSubmit"),{basename:t}=z.useContext(fr),n=uU(),i=e.fetch,o=e.navigate;return z.useCallback(async(s,u={})=>{let{action:c,method:f,encType:d,formData:m,body:p}=EU(s,t);if(u.navigate===!1){let y=u.fetcherKey||VU();await i(y,n,u.action||c,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:m,body:p,formMethod:u.method||f,formEncType:u.encType||d,flushSync:u.flushSync})}else await o(u.action||c,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:m,body:p,formMethod:u.method||f,formEncType:u.encType||d,replace:u.replace,state:u.state,fromRouteId:n,flushSync:u.flushSync,viewTransition:u.viewTransition})},[i,o,t,n])}function KU(e,{relative:t}={}){let{basename:n}=z.useContext(fr),i=z.useContext(Zr);Qt(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),s={..._f(e||".",{relative:t})},u=Wr();if(e==null){s.search=u.search;let c=new URLSearchParams(s.search),f=c.getAll("index");if(f.some(m=>m==="")){c.delete("index"),f.filter(p=>p).forEach(p=>c.append("index",p));let m=c.toString();s.search=m?`?${m}`:""}}return(!e||e===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:wa([n,s.pathname])),Vc(s)}function GU(e,{relative:t}={}){let n=z.useContext(nM);Qt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=pM("useViewTransitionState"),o=_f(e,{relative:t});if(!n.isTransitioning)return!1;let s=xa(n.currentLocation.pathname,i)||n.currentLocation.pathname,u=xa(n.nextLocation.pathname,i)||n.nextLocation.pathname;return Hc(o.pathname,u)!=null||Hc(o.pathname,s)!=null}var hR=e=>{if(typeof e>"u")return e;const t=Number(e);return`${t}`===e?t:e},QU={addQueryPrefix:!0,skipNulls:!0,arrayFormat:"indices",encode:!1,encodeValuesOnly:!0},YU={go:()=>{const{search:e,hash:t}=Wr(),n=gp();return z.useCallback(({to:o,type:s,query:u,hash:c,options:{keepQuery:f,keepHash:d}={}})=>{const m={...f&&e&&Qh.parse(e,{ignoreQueryPrefix:!0}),...u};m.to&&(m.to=encodeURIComponent(`${m.to}`));const p=Object.keys(m).length>0,y=`#${(c||d&&t||"").replace(/^#/,"")}`,S=y.length>1,b=`${o||""}${p?Qh.stringify(m,QU):""}${S?y:""}`;if(s==="path")return b;n(b,{replace:s==="replace"})},[t,e,n])},back:()=>{const e=gp();return z.useCallback(()=>{e(-1)},[e])},parse:()=>{var e;let t=oM();const{pathname:n,search:i}=Wr(),{resources:o}=z.useContext(yf),{resource:s,action:u,matchedRoute:c}=he.useMemo(()=>oL(n,o),[o,n]);return Object.entries(t).length===0&&c&&(t=((e=Hc(c,n))==null?void 0:e.params)||{}),z.useCallback(()=>{const d=Qh.parse(i,{ignoreQueryPrefix:!0}),m={...t,...d};return{...s&&{resource:s},...u&&{action:u},...(t==null?void 0:t.id)&&{id:decodeURIComponent(t.id)},pathname:n,params:{...m,currentPage:hR(m.currentPage),pageSize:hR(m.pageSize),to:m.to?decodeURIComponent(m.to):void 0}}},[n,i,t,s,u])},Link:he.forwardRef(function(t,n){return he.createElement(Vp,{to:t.to,...t,ref:n})})},WU=({resource:e,fallbackTo:t,meta:n})=>{const i=qp(),{resource:o,resources:s}=sn({resource:e}),u=o||s.find(c=>c.list);if(u){const c=i({resource:u,action:"list",meta:n});return c?he.createElement(fR,{to:c}):null}return t?(console.warn(`No resource is found. navigation to ${t}.`),he.createElement(fR,{to:t})):(console.warn('No resource and "fallbackTo" is found. No navigation will be made.'),null)};function XU(e,t=!0){const{navigator:n}=he.useContext(fr);he.useEffect(()=>{if(!t)return;const i=n.go,o=n.push;return n.push=(...s)=>{e()!==!1&&o(...s)},n.go=(...s)=>{e()!==!1&&i(...s)},()=>{n.push=o,n.go=i}},[n,e,t])}function JU(e,t=!0,n){const i=he.useCallback(s=>(s.preventDefault(),s.returnValue=e,s.returnValue),[e]);he.useEffect(()=>(t&&window.addEventListener("beforeunload",i),()=>{window.removeEventListener("beforeunload",i)}),[i,t]);const o=he.useCallback(()=>{const s=window.confirm(e);return s&&n&&n(),s},[e]);XU(o,t)}var ZU=({translationKey:e="warnWhenUnsavedChanges",message:t="Are you sure you want to leave? You have unsaved changes."})=>{const n=Fn(),{pathname:i}=Wr(),{warnWhen:o,setWarnWhen:s}=gT();he.useEffect(()=>()=>s==null?void 0:s(!1),[i]);const u=he.useMemo(()=>n(e,t),[e,t,n]);return JU(u,o,()=>{s==null||s(!1)}),null};function e3({handler:e}){var t;const n=Wr(),{action:i,id:o,params:s,pathname:u,resource:c}=Dr(),f=Fn(),d=pf(),m=(c==null?void 0:c.identifier)??(c==null?void 0:c.name),y=((t=c==null?void 0:c.meta)==null?void 0:t.label)??d(m,i==="list"?"plural":"singular"),S=f(`${c==null?void 0:c.name}.${c==null?void 0:c.name}`,y);return z.useLayoutEffect(()=>{const g=vT(f,c,i,`${o}`,y,d);e?document.title=e({action:i,resource:{...c??{},meta:{...c==null?void 0:c.meta,label:S}},params:s,pathname:u,autoGeneratedTitle:g}):document.title=g},[n]),he.createElement(he.Fragment,null)}const mM=z.createContext(null);function wf(){const e=z.useContext(mM);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}function t3({children:e}){const[t,n]=z.useState(()=>{const o=localStorage.getItem("studio-theme");return o||(window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark")});z.useEffect(()=>{document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(t),localStorage.setItem("studio-theme",t)},[t]);const i=()=>{n(o=>o==="dark"?"light":"dark")};return N.jsx(mM.Provider,{value:{theme:t,toggleTheme:i,setTheme:n},children:e})}const n3=()=>{const{breadcrumbs:e}=t4(),{theme:t}=wf(),n=t==="dark";return N.jsx("nav",{className:"flex items-center gap-2 text-sm",children:e.map((i,o)=>N.jsxs("div",{className:"flex items-center gap-2",children:[o>0&&N.jsx("svg",{className:`w-4 h-4 ${n?"text-zinc-600":"text-gray-400"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),i.href?N.jsx(Vp,{to:i.href,className:`transition-colors ${n?"text-zinc-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,children:i.label}):N.jsx("span",{className:`font-medium ${n?"text-white":"text-gray-900"}`,children:i.label})]},`breadcrumb-${i.label}`))})},pR=()=>N.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),r3=e=>{switch(e==null?void 0:e.toLowerCase()){case"doctypes":return N.jsx(pR,{});default:return N.jsx(pR,{})}},i3=()=>{const{menuItems:e}=i4(),{theme:t}=wf(),n=t==="dark";return N.jsx("nav",{className:"py-4 px-3",children:N.jsx("div",{className:"space-y-1",children:e.map(i=>N.jsxs(hM,{to:i.route??"/",className:({isActive:o})=>`flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-colors ${o?"bg-blue-500/10 text-blue-500":n?"text-zinc-400 hover:text-white hover:bg-zinc-800":"text-gray-600 hover:text-gray-900 hover:bg-gray-100"}`,children:[r3(String(i.label??"")),N.jsx("span",{children:i.label})]},i.key))})})},a3=({children:e})=>{const{theme:t,toggleTheme:n}=wf();return N.jsxs("div",{className:`flex h-screen ${t==="dark"?"bg-[#0a0a0b]":"bg-gray-50"}`,children:[N.jsxs("aside",{className:`w-56 flex-shrink-0 border-r ${t==="dark"?"bg-[#111113] border-[#27272a]":"bg-white border-gray-200"}`,children:[N.jsx("div",{className:`flex items-center h-14 px-4 border-b ${t==="dark"?"border-[#27272a]":"border-gray-200"}`,children:N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-blue-500 to-indigo-600 rounded-lg flex items-center justify-center",children:N.jsx("span",{className:"text-white font-bold text-sm",children:"M"})}),N.jsx("span",{className:`font-semibold ${t==="dark"?"text-white":"text-gray-900"}`,children:"Studio"})]})}),N.jsx(i3,{})]}),N.jsxs("main",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[N.jsxs("header",{className:`h-14 flex-shrink-0 flex items-center justify-between px-6 border-b ${t==="dark"?"bg-[#111113] border-[#27272a]":"bg-white border-gray-200"}`,children:[N.jsx(n3,{}),N.jsx("button",{onClick:n,className:`p-2 rounded-lg transition-colors ${t==="dark"?"text-[#a1a1aa] hover:text-white hover:bg-[#27272a]":"text-gray-500 hover:text-gray-900 hover:bg-gray-100"}`,title:t==="dark"?"Switch to light mode":"Switch to dark mode",children:t==="dark"?N.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"})}):N.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"})})})]}),N.jsx("div",{className:"flex-1 overflow-auto p-6",children:e})]})]})},o3={apiBaseUrl:"/studio/api",metaBaseUrl:"/studio/api"},s3={...o3,...window.__FRAMEWORK_CONFIG__},xl=s3.apiBaseUrl,gM={getApiUrl:()=>xl,getList:async({resource:e})=>{var o;const t=`${xl}/${e}`,i=await(await fetch(t)).json();return{data:i.doctypes||i.data||i,total:i.count||i.total||(((o=i.doctypes)==null?void 0:o.length)??0)}},getOne:async({resource:e,id:t})=>{const i=`${xl}/${e==="doctypes"?"doctype":e}/${t}`;return{data:await(await fetch(i)).json()}},create:async({resource:e,variables:t})=>{const n=e==="doctypes"?"doctype":e,i=t.name,o=`${xl}/${n}/${i}`;return{data:await(await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json()}},update:async({resource:e,id:t,variables:n})=>{const o=`${xl}/${e==="doctypes"?"doctype":e}/${t}`;return{data:await(await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})).json()}},deleteOne:async({resource:e,id:t})=>{const i=`${xl}/${e==="doctypes"?"doctype":e}/${t}`;return{data:await(await fetch(i,{method:"DELETE"})).json()}},getMany:async({resource:e,ids:t})=>{const n=t.map(o=>gM.getOne({resource:e,id:o,meta:{}}));return{data:(await Promise.all(n)).map(o=>o.data)}},custom:async({url:e,method:t,payload:n,headers:i})=>({data:await(await fetch(e,{method:t||"GET",headers:{"Content-Type":"application/json",...i},body:n?JSON.stringify(n):void 0})).json()})};/**
|
|
88
|
-
* table-core
|
|
89
|
-
*
|
|
90
|
-
* Copyright (c) TanStack
|
|
91
|
-
*
|
|
92
|
-
* This source code is licensed under the MIT license found in the
|
|
93
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
94
|
-
*
|
|
95
|
-
* @license MIT
|
|
96
|
-
*/function l3(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function _o(e,t){return typeof e=="function"?e(t):e}function Mr(e,t){return n=>{t.setState(i=>({...i,[e]:_o(n,i[e])}))}}function Hp(e){return e instanceof Function}function u3(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function c3(e,t){const n=[],i=o=>{o.forEach(s=>{n.push(s);const u=t(s);u!=null&&u.length&&i(u)})};return i(e),n}function Le(e,t,n){let i=[],o;return s=>{let u;n.key&&n.debug&&(u=Date.now());const c=e(s);if(!(c.length!==i.length||c.some((m,p)=>i[p]!==m)))return o;i=c;let d;if(n.key&&n.debug&&(d=Date.now()),o=t(...c),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const m=Math.round((Date.now()-u)*100)/100,p=Math.round((Date.now()-d)*100)/100,y=p/16,S=(g,b)=>{for(g=String(g);g.length<b;)g=" "+g;return g};console.info(`%c⏱ ${S(p,5)} /${S(m,5)} ms`,`
|
|
97
|
-
font-size: .6rem;
|
|
98
|
-
font-weight: bold;
|
|
99
|
-
color: hsl(${Math.max(0,Math.min(120-120*y,120))}deg 100% 31%);`,n==null?void 0:n.key)}return o}}function qe(e,t,n,i){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[t]},key:!1,onChange:i}}function f3(e,t,n,i){const o=()=>{var u;return(u=s.getValue())!=null?u:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:o,getContext:Le(()=>[e,n,t,s],(u,c,f,d)=>({table:u,column:c,row:f,cell:d,getValue:d.getValue,renderValue:d.renderValue}),qe(e.options,"debugCells"))};return e._features.forEach(u=>{u.createCell==null||u.createCell(s,n,t,e)},{}),s}function d3(e,t,n,i){var o,s;const c={...e._getDefaultColumnDef(),...t},f=c.accessorKey;let d=(o=(s=c.id)!=null?s:f?typeof String.prototype.replaceAll=="function"?f.replaceAll(".","_"):f.replace(/\./g,"_"):void 0)!=null?o:typeof c.header=="string"?c.header:void 0,m;if(c.accessorFn?m=c.accessorFn:f&&(f.includes(".")?m=y=>{let S=y;for(const b of f.split(".")){var g;S=(g=S)==null?void 0:g[b]}return S}:m=y=>y[c.accessorKey]),!d)throw new Error;let p={id:`${String(d)}`,accessorFn:m,parent:i,depth:n,columnDef:c,columns:[],getFlatColumns:Le(()=>[!0],()=>{var y;return[p,...(y=p.columns)==null?void 0:y.flatMap(S=>S.getFlatColumns())]},qe(e.options,"debugColumns")),getLeafColumns:Le(()=>[e._getOrderColumnsFn()],y=>{var S;if((S=p.columns)!=null&&S.length){let g=p.columns.flatMap(b=>b.getLeafColumns());return y(g)}return[p]},qe(e.options,"debugColumns"))};for(const y of e._features)y.createColumn==null||y.createColumn(p,e);return p}const Un="debugHeaders";function mR(e,t,n){var i;let s={id:(i=n.id)!=null?i:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const u=[],c=f=>{f.subHeaders&&f.subHeaders.length&&f.subHeaders.map(c),u.push(f)};return c(s),u},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(u=>{u.createHeader==null||u.createHeader(s,e)}),s}const h3={createTable:e=>{e.getHeaderGroups=Le(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,o)=>{var s,u;const c=(s=i==null?void 0:i.map(p=>n.find(y=>y.id===p)).filter(Boolean))!=null?s:[],f=(u=o==null?void 0:o.map(p=>n.find(y=>y.id===p)).filter(Boolean))!=null?u:[],d=n.filter(p=>!(i!=null&&i.includes(p.id))&&!(o!=null&&o.includes(p.id)));return Wd(t,[...c,...d,...f],e)},qe(e.options,Un)),e.getCenterHeaderGroups=Le(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,o)=>(n=n.filter(s=>!(i!=null&&i.includes(s.id))&&!(o!=null&&o.includes(s.id))),Wd(t,n,e,"center")),qe(e.options,Un)),e.getLeftHeaderGroups=Le(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,i)=>{var o;const s=(o=i==null?void 0:i.map(u=>n.find(c=>c.id===u)).filter(Boolean))!=null?o:[];return Wd(t,s,e,"left")},qe(e.options,Un)),e.getRightHeaderGroups=Le(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,i)=>{var o;const s=(o=i==null?void 0:i.map(u=>n.find(c=>c.id===u)).filter(Boolean))!=null?o:[];return Wd(t,s,e,"right")},qe(e.options,Un)),e.getFooterGroups=Le(()=>[e.getHeaderGroups()],t=>[...t].reverse(),qe(e.options,Un)),e.getLeftFooterGroups=Le(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),qe(e.options,Un)),e.getCenterFooterGroups=Le(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),qe(e.options,Un)),e.getRightFooterGroups=Le(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),qe(e.options,Un)),e.getFlatHeaders=Le(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),qe(e.options,Un)),e.getLeftFlatHeaders=Le(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),qe(e.options,Un)),e.getCenterFlatHeaders=Le(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),qe(e.options,Un)),e.getRightFlatHeaders=Le(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),qe(e.options,Un)),e.getCenterLeafHeaders=Le(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),qe(e.options,Un)),e.getLeftLeafHeaders=Le(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),qe(e.options,Un)),e.getRightLeafHeaders=Le(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),qe(e.options,Un)),e.getLeafHeaders=Le(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,i)=>{var o,s,u,c,f,d;return[...(o=(s=t[0])==null?void 0:s.headers)!=null?o:[],...(u=(c=n[0])==null?void 0:c.headers)!=null?u:[],...(f=(d=i[0])==null?void 0:d.headers)!=null?f:[]].map(m=>m.getLeafHeaders()).flat()},qe(e.options,Un))}};function Wd(e,t,n,i){var o,s;let u=0;const c=function(y,S){S===void 0&&(S=1),u=Math.max(u,S),y.filter(g=>g.getIsVisible()).forEach(g=>{var b;(b=g.columns)!=null&&b.length&&c(g.columns,S+1)},0)};c(e);let f=[];const d=(y,S)=>{const g={depth:S,id:[i,`${S}`].filter(Boolean).join("_"),headers:[]},b=[];y.forEach(v=>{const _=[...b].reverse()[0],x=v.column.depth===g.depth;let E,R=!1;if(x&&v.column.parent?E=v.column.parent:(E=v.column,R=!0),_&&(_==null?void 0:_.column)===E)_.subHeaders.push(v);else{const C=mR(n,E,{id:[i,S,E.id,v==null?void 0:v.id].filter(Boolean).join("_"),isPlaceholder:R,placeholderId:R?`${b.filter($=>$.column===E).length}`:void 0,depth:S,index:b.length});C.subHeaders.push(v),b.push(C)}g.headers.push(v),v.headerGroup=g}),f.push(g),S>0&&d(b,S-1)},m=t.map((y,S)=>mR(n,y,{depth:u,index:S}));d(m,u-1),f.reverse();const p=y=>y.filter(g=>g.column.getIsVisible()).map(g=>{let b=0,v=0,_=[0];g.subHeaders&&g.subHeaders.length?(_=[],p(g.subHeaders).forEach(E=>{let{colSpan:R,rowSpan:C}=E;b+=R,_.push(C)})):b=1;const x=Math.min(..._);return v=v+x,g.colSpan=b,g.rowSpan=v,{colSpan:b,rowSpan:v}});return p((o=(s=f[0])==null?void 0:s.headers)!=null?o:[]),f}const tS=(e,t,n,i,o,s,u)=>{let c={id:t,index:i,original:n,depth:o,parentId:u,_valuesCache:{},_uniqueValuesCache:{},getValue:f=>{if(c._valuesCache.hasOwnProperty(f))return c._valuesCache[f];const d=e.getColumn(f);if(d!=null&&d.accessorFn)return c._valuesCache[f]=d.accessorFn(c.original,i),c._valuesCache[f]},getUniqueValues:f=>{if(c._uniqueValuesCache.hasOwnProperty(f))return c._uniqueValuesCache[f];const d=e.getColumn(f);if(d!=null&&d.accessorFn)return d.columnDef.getUniqueValues?(c._uniqueValuesCache[f]=d.columnDef.getUniqueValues(c.original,i),c._uniqueValuesCache[f]):(c._uniqueValuesCache[f]=[c.getValue(f)],c._uniqueValuesCache[f])},renderValue:f=>{var d;return(d=c.getValue(f))!=null?d:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>c3(c.subRows,f=>f.subRows),getParentRow:()=>c.parentId?e.getRow(c.parentId,!0):void 0,getParentRows:()=>{let f=[],d=c;for(;;){const m=d.getParentRow();if(!m)break;f.push(m),d=m}return f.reverse()},getAllCells:Le(()=>[e.getAllLeafColumns()],f=>f.map(d=>f3(e,c,d,d.id)),qe(e.options,"debugRows")),_getAllCellsByColumnId:Le(()=>[c.getAllCells()],f=>f.reduce((d,m)=>(d[m.column.id]=m,d),{}),qe(e.options,"debugRows"))};for(let f=0;f<e._features.length;f++){const d=e._features[f];d==null||d.createRow==null||d.createRow(c,e)}return c},p3={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},vM=(e,t,n)=>{var i,o;const s=n==null||(i=n.toString())==null?void 0:i.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(s))};vM.autoRemove=e=>hi(e);const yM=(e,t,n)=>{var i;return!!(!((i=e.getValue(t))==null||(i=i.toString())==null)&&i.includes(n))};yM.autoRemove=e=>hi(e);const bM=(e,t,n)=>{var i;return((i=e.getValue(t))==null||(i=i.toString())==null?void 0:i.toLowerCase())===(n==null?void 0:n.toLowerCase())};bM.autoRemove=e=>hi(e);const SM=(e,t,n)=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(n)};SM.autoRemove=e=>hi(e);const _M=(e,t,n)=>!n.some(i=>{var o;return!((o=e.getValue(t))!=null&&o.includes(i))});_M.autoRemove=e=>hi(e)||!(e!=null&&e.length);const wM=(e,t,n)=>n.some(i=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(i)});wM.autoRemove=e=>hi(e)||!(e!=null&&e.length);const EM=(e,t,n)=>e.getValue(t)===n;EM.autoRemove=e=>hi(e);const xM=(e,t,n)=>e.getValue(t)==n;xM.autoRemove=e=>hi(e);const nS=(e,t,n)=>{let[i,o]=n;const s=e.getValue(t);return s>=i&&s<=o};nS.resolveFilterValue=e=>{let[t,n]=e,i=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(i)?-1/0:i,u=n===null||Number.isNaN(o)?1/0:o;if(s>u){const c=s;s=u,u=c}return[s,u]};nS.autoRemove=e=>hi(e)||hi(e[0])&&hi(e[1]);const ma={includesString:vM,includesStringSensitive:yM,equalsString:bM,arrIncludes:SM,arrIncludesAll:_M,arrIncludesSome:wM,equals:EM,weakEquals:xM,inNumberRange:nS};function hi(e){return e==null||e===""}const m3={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Mr("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n==null?void 0:n.getValue(e.id);return typeof i=="string"?ma.includesString:typeof i=="number"?ma.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?ma.equals:Array.isArray(i)?ma.arrIncludes:ma.weakEquals},e.getFilterFn=()=>{var n,i;return Hp(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(i=t.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?n:ma[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((i=t.options.enableColumnFilters)!=null?i:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(i=>i.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,i;return(n=(i=t.getState().columnFilters)==null?void 0:i.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(i=>{const o=e.getFilterFn(),s=i==null?void 0:i.find(m=>m.id===e.id),u=_o(n,s?s.value:void 0);if(gR(o,u,e)){var c;return(c=i==null?void 0:i.filter(m=>m.id!==e.id))!=null?c:[]}const f={id:e.id,value:u};if(s){var d;return(d=i==null?void 0:i.map(m=>m.id===e.id?f:m))!=null?d:[]}return i!=null&&i.length?[...i,f]:[f]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),i=o=>{var s;return(s=_o(t,o))==null?void 0:s.filter(u=>{const c=n.find(f=>f.id===u.id);if(c){const f=c.getFilterFn();if(gR(f,u.value,c))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=t=>{var n,i;e.setColumnFilters(t?[]:(n=(i=e.initialState)==null?void 0:i.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function gR(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const g3=(e,t,n)=>n.reduce((i,o)=>{const s=o.getValue(e);return i+(typeof s=="number"?s:0)},0),v3=(e,t,n)=>{let i;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(i>s||i===void 0&&s>=s)&&(i=s)}),i},y3=(e,t,n)=>{let i;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(i<s||i===void 0&&s>=s)&&(i=s)}),i},b3=(e,t,n)=>{let i,o;return n.forEach(s=>{const u=s.getValue(e);u!=null&&(i===void 0?u>=u&&(i=o=u):(i>u&&(i=u),o<u&&(o=u)))}),[i,o]},S3=(e,t)=>{let n=0,i=0;if(t.forEach(o=>{let s=o.getValue(e);s!=null&&(s=+s)>=s&&(++n,i+=s)}),n)return i/n},_3=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!u3(n))return;if(n.length===1)return n[0];const i=Math.floor(n.length/2),o=n.sort((s,u)=>s-u);return n.length%2!==0?o[i]:(o[i-1]+o[i])/2},w3=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),E3=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,x3=(e,t)=>t.length,My={sum:g3,min:v3,max:y3,extent:b3,mean:S3,median:_3,unique:w3,uniqueCount:E3,count:x3},C3={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Mr("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(i=>i!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,i;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((i=t.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n==null?void 0:n.getValue(e.id);if(typeof i=="number")return My.sum;if(Object.prototype.toString.call(i)==="[object Date]")return My.extent},e.getAggregationFn=()=>{var n,i;if(!e)throw new Error;return Hp(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(i=t.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?n:My[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i;e.setGrouping(t?[]:(n=(i=e.initialState)==null?void 0:i.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const i=t.getColumn(n);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function R3(e,t,n){if(!(t!=null&&t.length)||!n)return e;const i=e.filter(s=>!t.includes(s.id));return n==="remove"?i:[...t.map(s=>e.find(u=>u.id===s)).filter(Boolean),...i]}const O3={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Mr("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Le(n=>[Mc(t,n)],n=>n.findIndex(i=>i.id===e.id),qe(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var i;return((i=Mc(t,n)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i;const o=Mc(t,n);return((i=o[o.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Le(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,i)=>o=>{let s=[];if(!(t!=null&&t.length))s=o;else{const u=[...t],c=[...o];for(;c.length&&u.length;){const f=u.shift(),d=c.findIndex(m=>m.id===f);d>-1&&s.push(c.splice(d,1)[0])}s=[...s,...c]}return R3(s,n,i)},qe(e.options,"debugTable"))}},Dy=()=>({left:[],right:[]}),A3={getInitialState:e=>({columnPinning:Dy(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Mr("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const i=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var s,u;if(n==="right"){var c,f;return{left:((c=o==null?void 0:o.left)!=null?c:[]).filter(p=>!(i!=null&&i.includes(p))),right:[...((f=o==null?void 0:o.right)!=null?f:[]).filter(p=>!(i!=null&&i.includes(p))),...i]}}if(n==="left"){var d,m;return{left:[...((d=o==null?void 0:o.left)!=null?d:[]).filter(p=>!(i!=null&&i.includes(p))),...i],right:((m=o==null?void 0:o.right)!=null?m:[]).filter(p=>!(i!=null&&i.includes(p)))}}return{left:((s=o==null?void 0:o.left)!=null?s:[]).filter(p=>!(i!=null&&i.includes(p))),right:((u=o==null?void 0:o.right)!=null?u:[]).filter(p=>!(i!=null&&i.includes(p)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var o,s,u;return((o=i.columnDef.enablePinning)!=null?o:!0)&&((s=(u=t.options.enableColumnPinning)!=null?u:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(c=>c.id),{left:i,right:o}=t.getState().columnPinning,s=n.some(c=>i==null?void 0:i.includes(c)),u=n.some(c=>o==null?void 0:o.includes(c));return s?"left":u?"right":!1},e.getPinnedIndex=()=>{var n,i;const o=e.getIsPinned();return o?(n=(i=t.getState().columnPinning)==null||(i=i[o])==null?void 0:i.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Le(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,i,o)=>{const s=[...i??[],...o??[]];return n.filter(u=>!s.includes(u.column.id))},qe(t.options,"debugRows")),e.getLeftVisibleCells=Le(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,i)=>(i??[]).map(s=>n.find(u=>u.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),qe(t.options,"debugRows")),e.getRightVisibleCells=Le(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,i)=>(i??[]).map(s=>n.find(u=>u.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),qe(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i;return e.setColumnPinning(t?Dy():(n=(i=e.initialState)==null?void 0:i.columnPinning)!=null?n:Dy())},e.getIsSomeColumnsPinned=t=>{var n;const i=e.getState().columnPinning;if(!t){var o,s;return!!((o=i.left)!=null&&o.length||(s=i.right)!=null&&s.length)}return!!((n=i[t])!=null&&n.length)},e.getLeftLeafColumns=Le(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(o=>o.id===i)).filter(Boolean),qe(e.options,"debugColumns")),e.getRightLeafColumns=Le(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(o=>o.id===i)).filter(Boolean),qe(e.options,"debugColumns")),e.getCenterLeafColumns=Le(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i)=>{const o=[...n??[],...i??[]];return t.filter(s=>!o.includes(s.id))},qe(e.options,"debugColumns"))}};function $3(e){return e||(typeof document<"u"?document:null)}const Xd={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},jy=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),T3={getDefaultColumnDef:()=>Xd,getInitialState:e=>({columnSizing:{},columnSizingInfo:jy(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Mr("columnSizing",e),onColumnSizingInfoChange:Mr("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,o;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Xd.minSize,(i=s??e.columnDef.size)!=null?i:Xd.size),(o=e.columnDef.maxSize)!=null?o:Xd.maxSize)},e.getStart=Le(n=>[n,Mc(t,n),t.getState().columnSizing],(n,i)=>i.slice(0,e.getIndex(n)).reduce((o,s)=>o+s.getSize(),0),qe(t.options,"debugColumns")),e.getAfter=Le(n=>[n,Mc(t,n),t.getState().columnSizing],(n,i)=>i.slice(e.getIndex(n)+1).reduce((o,s)=>o+s.getSize(),0),qe(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:i,...o}=n;return o})},e.getCanResize=()=>{var n,i;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((i=t.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const i=o=>{if(o.subHeaders.length)o.subHeaders.forEach(i);else{var s;n+=(s=o.column.getSize())!=null?s:0}};return i(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const i=t.getColumn(e.column.id),o=i==null?void 0:i.getCanResize();return s=>{if(!i||!o||(s.persist==null||s.persist(),Ny(s)&&s.touches&&s.touches.length>1))return;const u=e.getSize(),c=e?e.getLeafHeaders().map(_=>[_.column.id,_.column.getSize()]):[[i.id,i.getSize()]],f=Ny(s)?Math.round(s.touches[0].clientX):s.clientX,d={},m=(_,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(E=>{var R,C;const $=t.options.columnResizeDirection==="rtl"?-1:1,A=(x-((R=E==null?void 0:E.startOffset)!=null?R:0))*$,T=Math.max(A/((C=E==null?void 0:E.startSize)!=null?C:0),-.999999);return E.columnSizingStart.forEach(M=>{let[D,j]=M;d[D]=Math.round(Math.max(j+j*T,0)*100)/100}),{...E,deltaOffset:A,deltaPercentage:T}}),(t.options.columnResizeMode==="onChange"||_==="end")&&t.setColumnSizing(E=>({...E,...d})))},p=_=>m("move",_),y=_=>{m("end",_),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},S=$3(n),g={moveHandler:_=>p(_.clientX),upHandler:_=>{S==null||S.removeEventListener("mousemove",g.moveHandler),S==null||S.removeEventListener("mouseup",g.upHandler),y(_.clientX)}},b={moveHandler:_=>(_.cancelable&&(_.preventDefault(),_.stopPropagation()),p(_.touches[0].clientX),!1),upHandler:_=>{var x;S==null||S.removeEventListener("touchmove",b.moveHandler),S==null||S.removeEventListener("touchend",b.upHandler),_.cancelable&&(_.preventDefault(),_.stopPropagation()),y((x=_.touches[0])==null?void 0:x.clientX)}},v=M3()?{passive:!1}:!1;Ny(s)?(S==null||S.addEventListener("touchmove",b.moveHandler,v),S==null||S.addEventListener("touchend",b.upHandler,v)):(S==null||S.addEventListener("mousemove",g.moveHandler,v),S==null||S.addEventListener("mouseup",g.upHandler,v)),t.setColumnSizingInfo(_=>({..._,startOffset:f,startSize:u,deltaOffset:0,deltaPercentage:0,columnSizingStart:c,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?jy():(n=e.initialState.columnSizingInfo)!=null?n:jy())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((i,o)=>i+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((i,o)=>i+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((i,o)=>i+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((i,o)=>i+o.getSize(),0))!=null?t:0}}};let Jd=null;function M3(){if(typeof Jd=="boolean")return Jd;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Jd=e,Jd}function Ny(e){return e.type==="touchstart"}const D3={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Mr("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(i=>({...i,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,i;const o=e.columns;return(n=o.length?o.some(s=>s.getIsVisible()):(i=t.getState().columnVisibility)==null?void 0:i[e.id])!=null?n:!0},e.getCanHide=()=>{var n,i;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((i=t.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Le(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(i=>i.column.getIsVisible()),qe(t.options,"debugRows")),e.getVisibleCells=Le(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,i,o)=>[...n,...i,...o],qe(t.options,"debugRows"))},createTable:e=>{const t=(n,i)=>Le(()=>[i(),i().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),qe(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var i;e.setColumnVisibility(n?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=n=>{var i;n=(i=n)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,s)=>({...o,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var i;e.toggleAllColumnsVisible((i=n.target)==null?void 0:i.checked)}}};function Mc(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const j3={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},N3={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Mr("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const i=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,o,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((i=t.options.enableGlobalFilter)!=null?i:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>ma.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:i}=e.options;return Hp(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[i])!=null?t:ma[i]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},P3={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Mr("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var i,o;if(!t){e._queue(()=>{t=!0});return}if((i=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var o,s;e.setExpanded(i?{}:(o=(s=e.initialState)==null?void 0:s.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const u=s.split(".");i=Math.max(i,u.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(i=>{var o;const s=i===!0?!0:!!(i!=null&&i[e.id]);let u={};if(i===!0?Object.keys(t.getRowModel().rowsById).forEach(c=>{u[c]=!0}):u=i,n=(o=n)!=null?o:!s,!s&&n)return{...u,[e.id]:!0};if(s&&!n){const{[e.id]:c,...f}=u;return f}return i})},e.getIsExpanded=()=>{var n;const i=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:i===!0||i!=null&&i[e.id])},e.getCanExpand=()=>{var n,i,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((i=t.options.enableExpanding)!=null?i:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e;for(;n&&i.parentId;)i=t.getRow(i.parentId,!0),n=i.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},H0=0,K0=10,Py=()=>({pageIndex:H0,pageSize:K0}),I3={getInitialState:e=>({...e,pagination:{...Py(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Mr("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var i,o;if(!t){e._queue(()=>{t=!0});return}if((i=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=i=>{const o=s=>_o(i,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=i=>{var o;e.setPagination(i?Py():(o=e.initialState.pagination)!=null?o:Py())},e.setPageIndex=i=>{e.setPagination(o=>{let s=_o(i,o.pageIndex);const u=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,u)),{...o,pageIndex:s}})},e.resetPageIndex=i=>{var o,s;e.setPageIndex(i?H0:(o=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?o:H0)},e.resetPageSize=i=>{var o,s;e.setPageSize(i?K0:(o=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?o:K0)},e.setPageSize=i=>{e.setPagination(o=>{const s=Math.max(1,_o(i,o.pageSize)),u=o.pageSize*o.pageIndex,c=Math.floor(u/s);return{...o,pageIndex:c,pageSize:s}})},e.setPageCount=i=>e.setPagination(o=>{var s;let u=_o(i,(s=e.options.pageCount)!=null?s:-1);return typeof u=="number"&&(u=Math.max(-1,u)),{...o,pageCount:u}}),e.getPageOptions=Le(()=>[e.getPageCount()],i=>{let o=[];return i&&i>0&&(o=[...new Array(i)].fill(null).map((s,u)=>u)),o},qe(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:i<o-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},Iy=()=>({top:[],bottom:[]}),z3={getInitialState:e=>({rowPinning:Iy(),...e}),getDefaultOptions:e=>({onRowPinningChange:Mr("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,o)=>{const s=i?e.getLeafRows().map(f=>{let{id:d}=f;return d}):[],u=o?e.getParentRows().map(f=>{let{id:d}=f;return d}):[],c=new Set([...u,e.id,...s]);t.setRowPinning(f=>{var d,m;if(n==="bottom"){var p,y;return{top:((p=f==null?void 0:f.top)!=null?p:[]).filter(b=>!(c!=null&&c.has(b))),bottom:[...((y=f==null?void 0:f.bottom)!=null?y:[]).filter(b=>!(c!=null&&c.has(b))),...Array.from(c)]}}if(n==="top"){var S,g;return{top:[...((S=f==null?void 0:f.top)!=null?S:[]).filter(b=>!(c!=null&&c.has(b))),...Array.from(c)],bottom:((g=f==null?void 0:f.bottom)!=null?g:[]).filter(b=>!(c!=null&&c.has(b)))}}return{top:((d=f==null?void 0:f.top)!=null?d:[]).filter(b=>!(c!=null&&c.has(b))),bottom:((m=f==null?void 0:f.bottom)!=null?m:[]).filter(b=>!(c!=null&&c.has(b)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:i,enablePinning:o}=t.options;return typeof i=="function"?i(e):(n=i??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:i,bottom:o}=t.getState().rowPinning,s=n.some(c=>i==null?void 0:i.includes(c)),u=n.some(c=>o==null?void 0:o.includes(c));return s?"top":u?"bottom":!1},e.getPinnedIndex=()=>{var n,i;const o=e.getIsPinned();if(!o)return-1;const s=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(u=>{let{id:c}=u;return c});return(i=s==null?void 0:s.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,i;return e.setRowPinning(t?Iy():(n=(i=e.initialState)==null?void 0:i.rowPinning)!=null?n:Iy())},e.getIsSomeRowsPinned=t=>{var n;const i=e.getState().rowPinning;if(!t){var o,s;return!!((o=i.top)!=null&&o.length||(s=i.bottom)!=null&&s.length)}return!!((n=i[t])!=null&&n.length)},e._getPinnedRows=(t,n,i)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(u=>{const c=e.getRow(u,!0);return c.getIsAllParentsExpanded()?c:null}):(n??[]).map(u=>t.find(c=>c.id===u))).filter(Boolean).map(u=>({...u,position:i}))},e.getTopRows=Le(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),qe(e.options,"debugRows")),e.getBottomRows=Le(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),qe(e.options,"debugRows")),e.getCenterRows=Le(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,i)=>{const o=new Set([...n??[],...i??[]]);return t.filter(s=>!o.has(s.id))},qe(e.options,"debugRows"))}},F3={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Mr("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const i={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(s=>{s.getCanSelect()&&(i[s.id]=!0)}):o.forEach(s=>{delete i[s.id]}),i})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const i=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(s=>{G0(o,s.id,i,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Le(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?zy(e,n):{rows:[],flatRows:[],rowsById:{}},qe(e.options,"debugTable")),e.getFilteredSelectedRowModel=Le(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?zy(e,n):{rows:[],flatRows:[],rowsById:{}},qe(e.options,"debugTable")),e.getGroupedSelectedRowModel=Le(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?zy(e,n):{rows:[],flatRows:[],rowsById:{}},qe(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let i=!!(t.length&&Object.keys(n).length);return i&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let i=!!t.length;return i&&t.some(o=>!n[o.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,i)=>{const o=e.getIsSelected();t.setRowSelection(s=>{var u;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return s;const c={...s};return G0(c,e.id,n,(u=i==null?void 0:i.selectChildren)!=null?u:!0,t),c})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return rS(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Q0(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Q0(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return i=>{var o;n&&e.toggleSelected((o=i.target)==null?void 0:o.checked)}}}},G0=(e,t,n,i,o)=>{var s;const u=o.getRow(t,!0);n?(u.getCanMultiSelect()||Object.keys(e).forEach(c=>delete e[c]),u.getCanSelect()&&(e[t]=!0)):delete e[t],i&&(s=u.subRows)!=null&&s.length&&u.getCanSelectSubRows()&&u.subRows.forEach(c=>G0(e,c.id,n,i,o))};function zy(e,t){const n=e.getState().rowSelection,i=[],o={},s=function(u,c){return u.map(f=>{var d;const m=rS(f,n);if(m&&(i.push(f),o[f.id]=f),(d=f.subRows)!=null&&d.length&&(f={...f,subRows:s(f.subRows)}),m)return f}).filter(Boolean)};return{rows:s(t.rows),flatRows:i,rowsById:o}}function rS(e,t){var n;return(n=t[e.id])!=null?n:!1}function Q0(e,t,n){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let o=!0,s=!1;return e.subRows.forEach(u=>{if(!(s&&!o)&&(u.getCanSelect()&&(rS(u,t)?s=!0:o=!1),u.subRows&&u.subRows.length)){const c=Q0(u,t);c==="all"?s=!0:(c==="some"&&(s=!0),o=!1)}}),o?"all":s?"some":!1}const Y0=/([0-9]+)/gm,k3=(e,t,n)=>CM($o(e.getValue(n)).toLowerCase(),$o(t.getValue(n)).toLowerCase()),L3=(e,t,n)=>CM($o(e.getValue(n)),$o(t.getValue(n))),q3=(e,t,n)=>iS($o(e.getValue(n)).toLowerCase(),$o(t.getValue(n)).toLowerCase()),U3=(e,t,n)=>iS($o(e.getValue(n)),$o(t.getValue(n))),B3=(e,t,n)=>{const i=e.getValue(n),o=t.getValue(n);return i>o?1:i<o?-1:0},V3=(e,t,n)=>iS(e.getValue(n),t.getValue(n));function iS(e,t){return e===t?0:e>t?1:-1}function $o(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function CM(e,t){const n=e.split(Y0).filter(Boolean),i=t.split(Y0).filter(Boolean);for(;n.length&&i.length;){const o=n.shift(),s=i.shift(),u=parseInt(o,10),c=parseInt(s,10),f=[u,c].sort();if(isNaN(f[0])){if(o>s)return 1;if(s>o)return-1;continue}if(isNaN(f[1]))return isNaN(u)?-1:1;if(u>c)return 1;if(c>u)return-1}return n.length-i.length}const gc={alphanumeric:k3,alphanumericCaseSensitive:L3,text:q3,textCaseSensitive:U3,datetime:B3,basic:V3},H3={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Mr("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const o of n){const s=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return gc.datetime;if(typeof s=="string"&&(i=!0,s.split(Y0).length>1))return gc.alphanumeric}return i?gc.text:gc.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,i;if(!e)throw new Error;return Hp(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(i=t.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?n:gc[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{const o=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(u=>{const c=u==null?void 0:u.find(S=>S.id===e.id),f=u==null?void 0:u.findIndex(S=>S.id===e.id);let d=[],m,p=s?n:o==="desc";if(u!=null&&u.length&&e.getCanMultiSort()&&i?c?m="toggle":m="add":u!=null&&u.length&&f!==u.length-1?m="replace":c?m="toggle":m="replace",m==="toggle"&&(s||o||(m="remove")),m==="add"){var y;d=[...u,{id:e.id,desc:p}],d.splice(0,d.length-((y=t.options.maxMultiSortColCount)!=null?y:Number.MAX_SAFE_INTEGER))}else m==="toggle"?d=u.map(S=>S.id===e.id?{...S,desc:p}:S):m==="remove"?d=u.filter(S=>S.id!==e.id):d=[{id:e.id,desc:p}];return d})},e.getFirstSortDir=()=>{var n,i;return((n=(i=e.columnDef.sortDescFirst)!=null?i:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var i,o;const s=e.getFirstSortDir(),u=e.getIsSorted();return u?u!==s&&((i=t.options.enableSortingRemoval)==null||i)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:u==="desc"?"asc":"desc":s},e.getCanSort=()=>{var n,i;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((i=t.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,i;return(n=(i=e.columnDef.enableMultiSort)!=null?i:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const i=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,i;return(n=(i=t.getState().sorting)==null?void 0:i.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return i=>{n&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i;e.setSorting(t?[]:(n=(i=e.initialState)==null?void 0:i.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},K3=[h3,D3,O3,A3,p3,m3,j3,N3,H3,C3,P3,I3,z3,F3,T3];function G3(e){var t,n;const i=[...K3,...(t=e._features)!=null?t:[]];let o={_features:i};const s=o._features.reduce((y,S)=>Object.assign(y,S.getDefaultOptions==null?void 0:S.getDefaultOptions(o)),{}),u=y=>o.options.mergeOptions?o.options.mergeOptions(s,y):{...s,...y};let f={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(y=>{var S;f=(S=y.getInitialState==null?void 0:y.getInitialState(f))!=null?S:f});const d=[];let m=!1;const p={_features:i,options:{...s,...e},initialState:f,_queue:y=>{d.push(y),m||(m=!0,Promise.resolve().then(()=>{for(;d.length;)d.shift()();m=!1}).catch(S=>setTimeout(()=>{throw S})))},reset:()=>{o.setState(o.initialState)},setOptions:y=>{const S=_o(y,o.options);o.options=u(S)},getState:()=>o.options.state,setState:y=>{o.options.onStateChange==null||o.options.onStateChange(y)},_getRowId:(y,S,g)=>{var b;return(b=o.options.getRowId==null?void 0:o.options.getRowId(y,S,g))!=null?b:`${g?[g.id,S].join("."):S}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(y,S)=>{let g=(S?o.getPrePaginationRowModel():o.getRowModel()).rowsById[y];if(!g&&(g=o.getCoreRowModel().rowsById[y],!g))throw new Error;return g},_getDefaultColumnDef:Le(()=>[o.options.defaultColumn],y=>{var S;return y=(S=y)!=null?S:{},{header:g=>{const b=g.header.column.columnDef;return b.accessorKey?b.accessorKey:b.accessorFn?b.id:null},cell:g=>{var b,v;return(b=(v=g.renderValue())==null||v.toString==null?void 0:v.toString())!=null?b:null},...o._features.reduce((g,b)=>Object.assign(g,b.getDefaultColumnDef==null?void 0:b.getDefaultColumnDef()),{}),...y}},qe(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:Le(()=>[o._getColumnDefs()],y=>{const S=function(g,b,v){return v===void 0&&(v=0),g.map(_=>{const x=d3(o,_,v,b),E=_;return x.columns=E.columns?S(E.columns,x,v+1):[],x})};return S(y)},qe(e,"debugColumns")),getAllFlatColumns:Le(()=>[o.getAllColumns()],y=>y.flatMap(S=>S.getFlatColumns()),qe(e,"debugColumns")),_getAllFlatColumnsById:Le(()=>[o.getAllFlatColumns()],y=>y.reduce((S,g)=>(S[g.id]=g,S),{}),qe(e,"debugColumns")),getAllLeafColumns:Le(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(y,S)=>{let g=y.flatMap(b=>b.getLeafColumns());return S(g)},qe(e,"debugColumns")),getColumn:y=>o._getAllFlatColumnsById()[y]};Object.assign(o,p);for(let y=0;y<o._features.length;y++){const S=o._features[y];S==null||S.createTable==null||S.createTable(o)}return o}function Q3(){return e=>Le(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(o,s,u){s===void 0&&(s=0);const c=[];for(let d=0;d<o.length;d++){const m=tS(e,e._getRowId(o[d],d,u),o[d],d,s,void 0,u==null?void 0:u.id);if(n.flatRows.push(m),n.rowsById[m.id]=m,c.push(m),e.options.getSubRows){var f;m.originalSubRows=e.options.getSubRows(o[d],d),(f=m.originalSubRows)!=null&&f.length&&(m.subRows=i(m.originalSubRows,s+1,m))}}return c};return n.rows=i(t),n},qe(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Y3(e,t,n){return n.options.filterFromLeafRows?W3(e,t,n):X3(e,t,n)}function W3(e,t,n){var i;const o=[],s={},u=(i=n.options.maxLeafRowFilterDepth)!=null?i:100,c=function(f,d){d===void 0&&(d=0);const m=[];for(let y=0;y<f.length;y++){var p;let S=f[y];const g=tS(n,S.id,S.original,S.index,S.depth,void 0,S.parentId);if(g.columnFilters=S.columnFilters,(p=S.subRows)!=null&&p.length&&d<u){if(g.subRows=c(S.subRows,d+1),S=g,t(S)&&!g.subRows.length){m.push(S),s[S.id]=S,o.push(S);continue}if(t(S)||g.subRows.length){m.push(S),s[S.id]=S,o.push(S);continue}}else S=g,t(S)&&(m.push(S),s[S.id]=S,o.push(S))}return m};return{rows:c(e),flatRows:o,rowsById:s}}function X3(e,t,n){var i;const o=[],s={},u=(i=n.options.maxLeafRowFilterDepth)!=null?i:100,c=function(f,d){d===void 0&&(d=0);const m=[];for(let y=0;y<f.length;y++){let S=f[y];if(t(S)){var p;if((p=S.subRows)!=null&&p.length&&d<u){const b=tS(n,S.id,S.original,S.index,S.depth,void 0,S.parentId);b.subRows=c(S.subRows,d+1),S=b}m.push(S),o.push(S),s[S.id]=S}}return m};return{rows:c(e),flatRows:o,rowsById:s}}function J3(){return e=>Le(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,i)=>{if(!t.rows.length||!(n!=null&&n.length)&&!i){for(let y=0;y<t.flatRows.length;y++)t.flatRows[y].columnFilters={},t.flatRows[y].columnFiltersMeta={};return t}const o=[],s=[];(n??[]).forEach(y=>{var S;const g=e.getColumn(y.id);if(!g)return;const b=g.getFilterFn();b&&o.push({id:y.id,filterFn:b,resolvedValue:(S=b.resolveFilterValue==null?void 0:b.resolveFilterValue(y.value))!=null?S:y.value})});const u=(n??[]).map(y=>y.id),c=e.getGlobalFilterFn(),f=e.getAllLeafColumns().filter(y=>y.getCanGlobalFilter());i&&c&&f.length&&(u.push("__global__"),f.forEach(y=>{var S;s.push({id:y.id,filterFn:c,resolvedValue:(S=c.resolveFilterValue==null?void 0:c.resolveFilterValue(i))!=null?S:i})}));let d,m;for(let y=0;y<t.flatRows.length;y++){const S=t.flatRows[y];if(S.columnFilters={},o.length)for(let g=0;g<o.length;g++){d=o[g];const b=d.id;S.columnFilters[b]=d.filterFn(S,b,d.resolvedValue,v=>{S.columnFiltersMeta[b]=v})}if(s.length){for(let g=0;g<s.length;g++){m=s[g];const b=m.id;if(m.filterFn(S,b,m.resolvedValue,v=>{S.columnFiltersMeta[b]=v})){S.columnFilters.__global__=!0;break}}S.columnFilters.__global__!==!0&&(S.columnFilters.__global__=!1)}}const p=y=>{for(let S=0;S<u.length;S++)if(y.columnFilters[u[S]]===!1)return!1;return!0};return Y3(t.rows,p,e)},qe(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}/**
|
|
100
|
-
* react-table
|
|
101
|
-
*
|
|
102
|
-
* Copyright (c) TanStack
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the MIT license found in the
|
|
105
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
106
|
-
*
|
|
107
|
-
* @license MIT
|
|
108
|
-
*/function vR(e,t){return e?Z3(e)?z.createElement(e,t):e:null}function Z3(e){return e5(e)||typeof e=="function"||t5(e)}function e5(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function t5(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function n5(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=z.useState(()=>({current:G3(t)})),[i,o]=z.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...i,...e.state},onStateChange:u=>{o(u),e.onStateChange==null||e.onStateChange(u)}})),n.current}const vc=l3();function r5(){const e=er(),{theme:t}=wf(),[n,i]=z.useState(""),o=t==="dark",{result:s,query:u}=DT({resource:"doctypes"}),c=kb(),f=z.useCallback(async y=>{try{await c.mutateAsync({resource:"doctypes",id:y}),u.refetch()}catch{alert("Failed to delete DocType")}},[c,u]),d=z.useMemo(()=>(s==null?void 0:s.data)??[],[s==null?void 0:s.data]),m=z.useMemo(()=>[vc.accessor("name",{header:"Name",cell:y=>N.jsx("span",{className:`font-medium ${o?"text-white":"text-gray-900"}`,children:y.getValue()})}),vc.accessor("module",{header:"Module",cell:y=>N.jsx("span",{className:`font-mono text-xs ${o?"text-zinc-500":"text-gray-500"}`,children:y.getValue()})}),vc.accessor(y=>{var S;return((S=y.fields)==null?void 0:S.length)??0},{id:"fields",header:"Fields",cell:y=>N.jsx("span",{className:`inline-flex items-center justify-center w-8 h-6 rounded text-xs ${o?"bg-zinc-800 text-zinc-400":"bg-gray-100 text-gray-600"}`,children:y.getValue()})}),vc.accessor("docstring",{header:"Description",cell:y=>{const S=y.getValue();return S?N.jsxs("span",{className:`line-clamp-2 text-sm ${o?"text-zinc-400":"text-gray-600"}`,children:[S.slice(0,100),S.length>100&&"..."]}):N.jsx("span",{className:o?"text-zinc-600":"text-gray-400",children:"—"})}}),vc.display({id:"actions",header:"",cell:y=>N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsx("button",{onClick:S=>{S.stopPropagation(),e({to:`/doctypes/edit/${y.row.original.name}`})},className:"px-3 py-1.5 text-xs font-medium text-blue-500 hover:text-blue-600 hover:bg-blue-500/10 rounded transition-colors",children:"Edit"}),N.jsx("button",{onClick:async S=>{S.stopPropagation(),window.confirm(`Delete DocType "${y.row.original.name}"? This will delete the Python file.`)&&await f(y.row.original.name)},className:"px-3 py-1.5 text-xs font-medium text-red-500 hover:text-red-600 hover:bg-red-500/10 rounded transition-colors",children:"Delete"})]})})],[e,o,f]),p=n5({data:d,columns:m,getCoreRowModel:Q3(),getFilteredRowModel:J3(),state:{globalFilter:n},onGlobalFilterChange:i});return u.isLoading?N.jsx("div",{className:"flex items-center justify-center h-64",children:N.jsxs("div",{className:`flex items-center gap-3 ${o?"text-zinc-400":"text-gray-500"}`,children:[N.jsx("div",{className:"w-5 h-5 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"}),N.jsx("span",{children:"Loading DocTypes..."})]})}):u.isError?N.jsx("div",{className:"flex items-center justify-center h-64",children:N.jsxs("div",{className:"text-center",children:[N.jsx("div",{className:"w-12 h-12 mx-auto mb-4 rounded-full bg-red-500/10 flex items-center justify-center",children:N.jsx("svg",{className:"w-6 h-6 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),N.jsx("p",{className:"text-red-400 font-medium",children:"Failed to load DocTypes"}),N.jsx("p",{className:`text-sm mt-1 ${o?"text-zinc-500":"text-gray-500"}`,children:"Make sure the Studio API is running"})]})}):N.jsxs("div",{children:[N.jsxs("div",{className:"flex items-center justify-between mb-8",children:[N.jsxs("div",{className:"flex-1 min-w-0",children:[N.jsx("h1",{className:`text-2xl font-semibold ${o?"text-white":"text-gray-900"}`,children:"DocTypes"}),N.jsxs("p",{className:`text-sm mt-1 ${o?"text-zinc-400":"text-gray-500"}`,children:[d.length," DocType",d.length!==1?"s":""," in your project"]})]}),N.jsxs("button",{onClick:()=>e({to:"/doctypes/create"}),className:"flex-shrink-0 flex items-center gap-2 px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white text-base font-medium rounded-lg transition-colors shadow-sm whitespace-nowrap",children:[N.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"New DocType"]})]}),N.jsx("div",{className:"mb-6 mt-4",children:N.jsxs("div",{className:`flex h-12 w-full items-center gap-3 rounded-lg px-4
|
|
109
|
-
outline-none transition-all ring-1
|
|
110
|
-
${o?"bg-zinc-800/50 ring-zinc-800/50 focus-within:ring-blue-500/50 text-white":"bg-white ring-gray-200 focus-within:ring-blue-500/50 text-gray-900 shadow-sm"}`,children:[N.jsx("svg",{className:`h-5 w-5 flex-shrink-0 ${o?"text-zinc-500":"text-gray-400"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),N.jsx("input",{type:"text",placeholder:"Search DocTypes...",value:n,onChange:y=>i(y.target.value),className:`search-input h-full w-full bg-transparent text-base
|
|
111
|
-
placeholder:${o?"text-zinc-500":"text-gray-500"}
|
|
112
|
-
border-0 outline-none focus:outline-none focus-visible:outline-none
|
|
113
|
-
focus:border-transparent focus-visible:border-transparent
|
|
114
|
-
focus:ring-0 focus:ring-offset-0
|
|
115
|
-
focus-visible:ring-0 focus-visible:ring-offset-0
|
|
116
|
-
appearance-none`})]})}),N.jsx("div",{className:`rounded-xl overflow-hidden shadow-sm ring-1 ${o?"bg-zinc-900/50 ring-zinc-800/50":"bg-white ring-gray-200"}`,children:N.jsxs("table",{className:"w-full border-collapse",children:[N.jsx("thead",{children:N.jsx("tr",{className:`border-b transition-colors ${o?"bg-zinc-800/30 border-zinc-800/50":"bg-gray-50 border-gray-200/50"}`,children:p.getHeaderGroups().map(y=>y.headers.map(S=>N.jsx("th",{className:`px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider ${o?"text-zinc-500":"text-gray-600"}`,children:vR(S.column.columnDef.header,S.getContext())},S.id)))})}),N.jsx("tbody",{className:`divide-y ${o?"divide-zinc-800/50":"divide-gray-200/50"}`,children:p.getRowModel().rows.length===0?N.jsx("tr",{children:N.jsx("td",{colSpan:5,className:`px-4 py-12 text-center ${o?"text-zinc-500":"text-gray-500"}`,children:n?"No matching DocTypes found":"No DocTypes yet"})}):p.getRowModel().rows.map(y=>N.jsx("tr",{onClick:()=>e({to:`/doctypes/edit/${y.original.name}`}),className:`cursor-pointer transition-colors ${o?"hover:bg-zinc-800/50":"hover:bg-gray-50"}`,children:y.getVisibleCells().map(S=>N.jsx("td",{className:"px-6 py-3",children:vR(S.column.columnDef.cell,S.getContext())},S.id))},y.id))})]})})]})}function i5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return z.useMemo(()=>i=>{t.forEach(o=>o(i))},t)}const Kp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function pu(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function aS(e){return"nodeType"in e}function dr(e){var t,n;return e?pu(e)?e:aS(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function oS(e){const{Document:t}=dr(e);return e instanceof t}function Ef(e){return pu(e)?!1:e instanceof dr(e).HTMLElement}function RM(e){return e instanceof dr(e).SVGElement}function mu(e){return e?pu(e)?e.document:aS(e)?oS(e)?e:Ef(e)||RM(e)?e.ownerDocument:document:document:document}const zi=Kp?z.useLayoutEffect:z.useEffect;function sS(e){const t=z.useRef(e);return zi(()=>{t.current=e}),z.useCallback(function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return t.current==null?void 0:t.current(...i)},[])}function a5(){const e=z.useRef(null),t=z.useCallback((i,o)=>{e.current=setInterval(i,o)},[]),n=z.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Kc(e,t){t===void 0&&(t=[e]);const n=z.useRef(e);return zi(()=>{n.current!==e&&(n.current=e)},t),n}function xf(e,t){const n=z.useRef();return z.useMemo(()=>{const i=e(n.current);return n.current=i,i},[...t])}function vp(e){const t=sS(e),n=z.useRef(null),i=z.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,i]}function W0(e){const t=z.useRef();return z.useEffect(()=>{t.current=e},[e]),t.current}let Fy={};function Cf(e,t){return z.useMemo(()=>{if(t)return t;const n=Fy[e]==null?0:Fy[e]+1;return Fy[e]=n,e+"-"+n},[e,t])}function OM(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return i.reduce((s,u)=>{const c=Object.entries(u);for(const[f,d]of c){const m=s[f];m!=null&&(s[f]=m+e*d)}return s},{...t})}}const jl=OM(1),Gc=OM(-1);function o5(e){return"clientX"in e&&"clientY"in e}function lS(e){if(!e)return!1;const{KeyboardEvent:t}=dr(e.target);return t&&e instanceof t}function s5(e){if(!e)return!1;const{TouchEvent:t}=dr(e.target);return t&&e instanceof t}function X0(e){if(s5(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return o5(e)?{x:e.clientX,y:e.clientY}:null}const Qc=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Qc.Translate.toString(e),Qc.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),yR="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function l5(e){return e.matches(yR)?e:e.querySelector(yR)}const u5={display:"none"};function c5(e){let{id:t,value:n}=e;return he.createElement("div",{id:t,style:u5},n)}function f5(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return he.createElement("div",{id:t,style:o,role:"status","aria-live":i,"aria-atomic":!0},n)}function d5(){const[e,t]=z.useState("");return{announce:z.useCallback(i=>{i!=null&&t(i)},[]),announcement:e}}const AM=z.createContext(null);function h5(e){const t=z.useContext(AM);z.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function p5(){const[e]=z.useState(()=>new Set),t=z.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[z.useCallback(i=>{let{type:o,event:s}=i;e.forEach(u=>{var c;return(c=u[o])==null?void 0:c.call(u,s)})},[e]),t]}const m5={draggable:`
|
|
117
|
-
To pick up a draggable item, press the space bar.
|
|
118
|
-
While dragging, use the arrow keys to move the item.
|
|
119
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
120
|
-
`},g5={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function v5(e){let{announcements:t=g5,container:n,hiddenTextDescribedById:i,screenReaderInstructions:o=m5}=e;const{announce:s,announcement:u}=d5(),c=Cf("DndLiveRegion"),[f,d]=z.useState(!1);if(z.useEffect(()=>{d(!0)},[]),h5(z.useMemo(()=>({onDragStart(p){let{active:y}=p;s(t.onDragStart({active:y}))},onDragMove(p){let{active:y,over:S}=p;t.onDragMove&&s(t.onDragMove({active:y,over:S}))},onDragOver(p){let{active:y,over:S}=p;s(t.onDragOver({active:y,over:S}))},onDragEnd(p){let{active:y,over:S}=p;s(t.onDragEnd({active:y,over:S}))},onDragCancel(p){let{active:y,over:S}=p;s(t.onDragCancel({active:y,over:S}))}}),[s,t])),!f)return null;const m=he.createElement(he.Fragment,null,he.createElement(c5,{id:i,value:o.draggable}),he.createElement(f5,{id:c,announcement:u}));return n?xc.createPortal(m,n):m}var yn;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(yn||(yn={}));function yp(){}function bR(e,t){return z.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function y5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return z.useMemo(()=>[...t].filter(i=>i!=null),[...t])}const mi=Object.freeze({x:0,y:0});function $M(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function TM(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function b5(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function SR(e){let{left:t,top:n,height:i,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+i},{x:t+o,y:n+i}]}function MM(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function _R(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const S5=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const o=_R(t,t.left,t.top),s=[];for(const u of i){const{id:c}=u,f=n.get(c);if(f){const d=$M(_R(f),o);s.push({id:c,data:{droppableContainer:u,value:d}})}}return s.sort(TM)},_5=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const o=SR(t),s=[];for(const u of i){const{id:c}=u,f=n.get(c);if(f){const d=SR(f),m=o.reduce((y,S,g)=>y+$M(d[g],S),0),p=Number((m/4).toFixed(4));s.push({id:c,data:{droppableContainer:u,value:p}})}}return s.sort(TM)};function w5(e,t){const n=Math.max(t.top,e.top),i=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),u=o-i,c=s-n;if(i<o&&n<s){const f=t.width*t.height,d=e.width*e.height,m=u*c,p=m/(f+d-m);return Number(p.toFixed(4))}return 0}const E5=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const o=[];for(const s of i){const{id:u}=s,c=n.get(u);if(c){const f=w5(c,t);f>0&&o.push({id:u,data:{droppableContainer:s,value:f}})}}return o.sort(b5)};function x5(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function DM(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:mi}function C5(e){return function(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];return o.reduce((u,c)=>({...u,top:u.top+e*c.y,bottom:u.bottom+e*c.y,left:u.left+e*c.x,right:u.right+e*c.x}),{...n})}}const R5=C5(1);function O5(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function A5(e,t,n){const i=O5(t);if(!i)return e;const{scaleX:o,scaleY:s,x:u,y:c}=i,f=e.left-u-(1-o)*parseFloat(n),d=e.top-c-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),m=o?e.width/o:e.width,p=s?e.height/s:e.height;return{width:m,height:p,top:d,right:f+m,bottom:d+p,left:f}}const $5={ignoreTransform:!1};function gu(e,t){t===void 0&&(t=$5);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:m}=dr(e).getComputedStyle(e);d&&(n=A5(n,d,m))}const{top:i,left:o,width:s,height:u,bottom:c,right:f}=n;return{top:i,left:o,width:s,height:u,bottom:c,right:f}}function wR(e){return gu(e,{ignoreTransform:!0})}function T5(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function M5(e,t){return t===void 0&&(t=dr(e).getComputedStyle(e)),t.position==="fixed"}function D5(e,t){t===void 0&&(t=dr(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}function Gp(e,t){const n=[];function i(o){if(t!=null&&n.length>=t||!o)return n;if(oS(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Ef(o)||RM(o)||n.includes(o))return n;const s=dr(e).getComputedStyle(o);return o!==e&&D5(o,s)&&n.push(o),M5(o,s)?n:i(o.parentNode)}return e?i(e):n}function jM(e){const[t]=Gp(e,1);return t??null}function ky(e){return!Kp||!e?null:pu(e)?e:aS(e)?oS(e)||e===mu(e).scrollingElement?window:Ef(e)?e:null:null}function NM(e){return pu(e)?e.scrollX:e.scrollLeft}function PM(e){return pu(e)?e.scrollY:e.scrollTop}function J0(e){return{x:NM(e),y:PM(e)}}var Rn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Rn||(Rn={}));function IM(e){return!Kp||!e?!1:e===document.scrollingElement}function zM(e){const t={x:0,y:0},n=IM(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,s=e.scrollLeft<=t.x,u=e.scrollTop>=i.y,c=e.scrollLeft>=i.x;return{isTop:o,isLeft:s,isBottom:u,isRight:c,maxScroll:i,minScroll:t}}const j5={x:.2,y:.2};function N5(e,t,n,i,o){let{top:s,left:u,right:c,bottom:f}=n;i===void 0&&(i=10),o===void 0&&(o=j5);const{isTop:d,isBottom:m,isLeft:p,isRight:y}=zM(e),S={x:0,y:0},g={x:0,y:0},b={height:t.height*o.y,width:t.width*o.x};return!d&&s<=t.top+b.height?(S.y=Rn.Backward,g.y=i*Math.abs((t.top+b.height-s)/b.height)):!m&&f>=t.bottom-b.height&&(S.y=Rn.Forward,g.y=i*Math.abs((t.bottom-b.height-f)/b.height)),!y&&c>=t.right-b.width?(S.x=Rn.Forward,g.x=i*Math.abs((t.right-b.width-c)/b.width)):!p&&u<=t.left+b.width&&(S.x=Rn.Backward,g.x=i*Math.abs((t.left+b.width-u)/b.width)),{direction:S,speed:g}}function P5(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:u}=window;return{top:0,left:0,right:s,bottom:u,width:s,height:u}}const{top:t,left:n,right:i,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:i,bottom:o,width:e.clientWidth,height:e.clientHeight}}function FM(e){return e.reduce((t,n)=>jl(t,J0(n)),mi)}function I5(e){return e.reduce((t,n)=>t+NM(n),0)}function z5(e){return e.reduce((t,n)=>t+PM(n),0)}function F5(e,t){if(t===void 0&&(t=gu),!e)return;const{top:n,left:i,bottom:o,right:s}=t(e);jM(e)&&(o<=0||s<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const k5=[["x",["left","right"],I5],["y",["top","bottom"],z5]];class uS{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=Gp(n),o=FM(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,u,c]of k5)for(const f of u)Object.defineProperty(this,f,{get:()=>{const d=c(i),m=o[s]-d;return this.rect[f]+m},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Dc{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...n)})},this.target=t}add(t,n,i){var o;(o=this.target)==null||o.addEventListener(t,n,i),this.listeners.push([t,n,i])}}function L5(e){const{EventTarget:t}=dr(e);return e instanceof t?e:mu(e)}function Ly(e,t){const n=Math.abs(e.x),i=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+i**2)>t:"x"in t&&"y"in t?n>t.x&&i>t.y:"x"in t?n>t.x:"y"in t?i>t.y:!1}var Hr;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Hr||(Hr={}));function ER(e){e.preventDefault()}function q5(e){e.stopPropagation()}var dt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(dt||(dt={}));const kM={start:[dt.Space,dt.Enter],cancel:[dt.Esc],end:[dt.Space,dt.Enter,dt.Tab]},U5=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case dt.Right:return{...n,x:n.x+25};case dt.Left:return{...n,x:n.x-25};case dt.Down:return{...n,y:n.y+25};case dt.Up:return{...n,y:n.y-25}}};class cS{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Dc(mu(n)),this.windowListeners=new Dc(dr(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Hr.Resize,this.handleCancel),this.windowListeners.add(Hr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Hr.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,i=t.node.current;i&&F5(i),n(mi)}handleKeyDown(t){if(lS(t)){const{active:n,context:i,options:o}=this.props,{keyboardCodes:s=kM,coordinateGetter:u=U5,scrollBehavior:c="smooth"}=o,{code:f}=t;if(s.end.includes(f)){this.handleEnd(t);return}if(s.cancel.includes(f)){this.handleCancel(t);return}const{collisionRect:d}=i.current,m=d?{x:d.left,y:d.top}:mi;this.referenceCoordinates||(this.referenceCoordinates=m);const p=u(t,{active:n,context:i.current,currentCoordinates:m});if(p){const y=Gc(p,m),S={x:0,y:0},{scrollableAncestors:g}=i.current;for(const b of g){const v=t.code,{isTop:_,isRight:x,isLeft:E,isBottom:R,maxScroll:C,minScroll:$}=zM(b),A=P5(b),T={x:Math.min(v===dt.Right?A.right-A.width/2:A.right,Math.max(v===dt.Right?A.left:A.left+A.width/2,p.x)),y:Math.min(v===dt.Down?A.bottom-A.height/2:A.bottom,Math.max(v===dt.Down?A.top:A.top+A.height/2,p.y))},M=v===dt.Right&&!x||v===dt.Left&&!E,D=v===dt.Down&&!R||v===dt.Up&&!_;if(M&&T.x!==p.x){const j=b.scrollLeft+y.x,I=v===dt.Right&&j<=C.x||v===dt.Left&&j>=$.x;if(I&&!y.y){b.scrollTo({left:j,behavior:c});return}I?S.x=b.scrollLeft-j:S.x=v===dt.Right?b.scrollLeft-C.x:b.scrollLeft-$.x,S.x&&b.scrollBy({left:-S.x,behavior:c});break}else if(D&&T.y!==p.y){const j=b.scrollTop+y.y,I=v===dt.Down&&j<=C.y||v===dt.Up&&j>=$.y;if(I&&!y.x){b.scrollTo({top:j,behavior:c});return}I?S.y=b.scrollTop-j:S.y=v===dt.Down?b.scrollTop-C.y:b.scrollTop-$.y,S.y&&b.scrollBy({top:-S.y,behavior:c});break}}this.handleMove(t,jl(Gc(p,this.referenceCoordinates),S))}}}handleMove(t,n){const{onMove:i}=this.props;t.preventDefault(),i(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}cS.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=kM,onActivation:o}=t,{active:s}=n;const{code:u}=e.nativeEvent;if(i.start.includes(u)){const c=s.activatorNode.current;return c&&e.target!==c?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function xR(e){return!!(e&&"distance"in e)}function CR(e){return!!(e&&"delay"in e)}class fS{constructor(t,n,i){var o;i===void 0&&(i=L5(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:s}=t,{target:u}=s;this.props=t,this.events=n,this.document=mu(u),this.documentListeners=new Dc(this.document),this.listeners=new Dc(i),this.windowListeners=new Dc(dr(u)),this.initialCoordinates=(o=X0(s))!=null?o:mi,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:i}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Hr.Resize,this.handleCancel),this.windowListeners.add(Hr.DragStart,ER),this.windowListeners.add(Hr.VisibilityChange,this.handleCancel),this.windowListeners.add(Hr.ContextMenu,ER),this.documentListeners.add(Hr.Keydown,this.handleKeydown),n){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(CR(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(xR(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:i,onPending:o}=this.props;o(i,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Hr.Click,q5,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Hr.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:i,initialCoordinates:o,props:s}=this,{onMove:u,options:{activationConstraint:c}}=s;if(!o)return;const f=(n=X0(t))!=null?n:mi,d=Gc(o,f);if(!i&&c){if(xR(c)){if(c.tolerance!=null&&Ly(d,c.tolerance))return this.handleCancel();if(Ly(d,c.distance))return this.handleStart()}if(CR(c)&&Ly(d,c.tolerance))return this.handleCancel();this.handlePending(c,d);return}t.cancelable&&t.preventDefault(),u(f)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===dt.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const B5={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class dS extends fS{constructor(t){const{event:n}=t,i=mu(n.target);super(t,B5,i)}}dS.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return!n.isPrimary||n.button!==0?!1:(i==null||i({event:n}),!0)}}];const V5={move:{name:"mousemove"},end:{name:"mouseup"}};var Z0;(function(e){e[e.RightClick=2]="RightClick"})(Z0||(Z0={}));class H5 extends fS{constructor(t){super(t,V5,mu(t.event.target))}}H5.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button===Z0.RightClick?!1:(i==null||i({event:n}),!0)}}];const qy={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class K5 extends fS{constructor(t){super(t,qy)}static setup(){return window.addEventListener(qy.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(qy.move.name,t)};function t(){}}}K5.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;const{touches:o}=n;return o.length>1?!1:(i==null||i({event:n}),!0)}}];var jc;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(jc||(jc={}));var bp;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(bp||(bp={}));function G5(e){let{acceleration:t,activator:n=jc.Pointer,canScroll:i,draggingRect:o,enabled:s,interval:u=5,order:c=bp.TreeOrder,pointerCoordinates:f,scrollableAncestors:d,scrollableAncestorRects:m,delta:p,threshold:y}=e;const S=Y5({delta:p,disabled:!s}),[g,b]=a5(),v=z.useRef({x:0,y:0}),_=z.useRef({x:0,y:0}),x=z.useMemo(()=>{switch(n){case jc.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case jc.DraggableRect:return o}},[n,o,f]),E=z.useRef(null),R=z.useCallback(()=>{const $=E.current;if(!$)return;const A=v.current.x*_.current.x,T=v.current.y*_.current.y;$.scrollBy(A,T)},[]),C=z.useMemo(()=>c===bp.TreeOrder?[...d].reverse():d,[c,d]);z.useEffect(()=>{if(!s||!d.length||!x){b();return}for(const $ of C){if((i==null?void 0:i($))===!1)continue;const A=d.indexOf($),T=m[A];if(!T)continue;const{direction:M,speed:D}=N5($,T,x,t,y);for(const j of["x","y"])S[j][M[j]]||(D[j]=0,M[j]=0);if(D.x>0||D.y>0){b(),E.current=$,g(R,u),v.current=D,_.current=M;return}}v.current={x:0,y:0},_.current={x:0,y:0},b()},[t,R,i,b,s,u,JSON.stringify(x),JSON.stringify(S),g,d,C,m,JSON.stringify(y)])}const Q5={x:{[Rn.Backward]:!1,[Rn.Forward]:!1},y:{[Rn.Backward]:!1,[Rn.Forward]:!1}};function Y5(e){let{delta:t,disabled:n}=e;const i=W0(t);return xf(o=>{if(n||!i||!o)return Q5;const s={x:Math.sign(t.x-i.x),y:Math.sign(t.y-i.y)};return{x:{[Rn.Backward]:o.x[Rn.Backward]||s.x===-1,[Rn.Forward]:o.x[Rn.Forward]||s.x===1},y:{[Rn.Backward]:o.y[Rn.Backward]||s.y===-1,[Rn.Forward]:o.y[Rn.Forward]||s.y===1}}},[n,t,i])}function W5(e,t){const n=t!=null?e.get(t):void 0,i=n?n.node.current:null;return xf(o=>{var s;return t==null?null:(s=i??o)!=null?s:null},[i,t])}function X5(e,t){return z.useMemo(()=>e.reduce((n,i)=>{const{sensor:o}=i,s=o.activators.map(u=>({eventName:u.eventName,handler:t(u.handler,i)}));return[...n,...s]},[]),[e,t])}var Yc;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Yc||(Yc={}));var eb;(function(e){e.Optimized="optimized"})(eb||(eb={}));const RR=new Map;function J5(e,t){let{dragging:n,dependencies:i,config:o}=t;const[s,u]=z.useState(null),{frequency:c,measure:f,strategy:d}=o,m=z.useRef(e),p=v(),y=Kc(p),S=z.useCallback(function(_){_===void 0&&(_=[]),!y.current&&u(x=>x===null?_:x.concat(_.filter(E=>!x.includes(E))))},[y]),g=z.useRef(null),b=xf(_=>{if(p&&!n)return RR;if(!_||_===RR||m.current!==e||s!=null){const x=new Map;for(let E of e){if(!E)continue;if(s&&s.length>0&&!s.includes(E.id)&&E.rect.current){x.set(E.id,E.rect.current);continue}const R=E.node.current,C=R?new uS(f(R),R):null;E.rect.current=C,C&&x.set(E.id,C)}return x}return _},[e,s,n,p,f]);return z.useEffect(()=>{m.current=e},[e]),z.useEffect(()=>{p||S()},[n,p]),z.useEffect(()=>{s&&s.length>0&&u(null)},[JSON.stringify(s)]),z.useEffect(()=>{p||typeof c!="number"||g.current!==null||(g.current=setTimeout(()=>{S(),g.current=null},c))},[c,p,S,...i]),{droppableRects:b,measureDroppableContainers:S,measuringScheduled:s!=null};function v(){switch(d){case Yc.Always:return!1;case Yc.BeforeDragging:return n;default:return!n}}}function LM(e,t){return xf(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Z5(e,t){return LM(e,t)}function eB(e){let{callback:t,disabled:n}=e;const i=sS(t),o=z.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(i)},[i,n]);return z.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Qp(e){let{callback:t,disabled:n}=e;const i=sS(t),o=z.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(i)},[n]);return z.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function tB(e){return new uS(gu(e),e)}function OR(e,t,n){t===void 0&&(t=tB);const[i,o]=z.useState(null);function s(){o(f=>{if(!e)return null;if(e.isConnected===!1){var d;return(d=f??n)!=null?d:null}const m=t(e);return JSON.stringify(f)===JSON.stringify(m)?f:m})}const u=eB({callback(f){if(e)for(const d of f){const{type:m,target:p}=d;if(m==="childList"&&p instanceof HTMLElement&&p.contains(e)){s();break}}}}),c=Qp({callback:s});return zi(()=>{s(),e?(c==null||c.observe(e),u==null||u.observe(document.body,{childList:!0,subtree:!0})):(c==null||c.disconnect(),u==null||u.disconnect())},[e]),i}function nB(e){const t=LM(e);return DM(e,t)}const AR=[];function rB(e){const t=z.useRef(e),n=xf(i=>e?i&&i!==AR&&e&&t.current&&e.parentNode===t.current.parentNode?i:Gp(e):AR,[e]);return z.useEffect(()=>{t.current=e},[e]),n}function iB(e){const[t,n]=z.useState(null),i=z.useRef(e),o=z.useCallback(s=>{const u=ky(s.target);u&&n(c=>c?(c.set(u,J0(u)),new Map(c)):null)},[]);return z.useEffect(()=>{const s=i.current;if(e!==s){u(s);const c=e.map(f=>{const d=ky(f);return d?(d.addEventListener("scroll",o,{passive:!0}),[d,J0(d)]):null}).filter(f=>f!=null);n(c.length?new Map(c):null),i.current=e}return()=>{u(e),u(s)};function u(c){c.forEach(f=>{const d=ky(f);d==null||d.removeEventListener("scroll",o)})}},[o,e]),z.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,u)=>jl(s,u),mi):FM(e):mi,[e,t])}function $R(e,t){t===void 0&&(t=[]);const n=z.useRef(null);return z.useEffect(()=>{n.current=null},t),z.useEffect(()=>{const i=e!==mi;i&&!n.current&&(n.current=e),!i&&n.current&&(n.current=null)},[e]),n.current?Gc(e,n.current):mi}function aB(e){z.useEffect(()=>{if(!Kp)return;const t=e.map(n=>{let{sensor:i}=n;return i.setup==null?void 0:i.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function oB(e,t){return z.useMemo(()=>e.reduce((n,i)=>{let{eventName:o,handler:s}=i;return n[o]=u=>{s(u,t)},n},{}),[e,t])}function qM(e){return z.useMemo(()=>e?T5(e):null,[e])}const TR=[];function sB(e,t){t===void 0&&(t=gu);const[n]=e,i=qM(n?dr(n):null),[o,s]=z.useState(TR);function u(){s(()=>e.length?e.map(f=>IM(f)?i:new uS(t(f),f)):TR)}const c=Qp({callback:u});return zi(()=>{c==null||c.disconnect(),u(),e.forEach(f=>c==null?void 0:c.observe(f))},[e]),o}function lB(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ef(t)?t:e}function uB(e){let{measure:t}=e;const[n,i]=z.useState(null),o=z.useCallback(d=>{for(const{target:m}of d)if(Ef(m)){i(p=>{const y=t(m);return p?{...p,width:y.width,height:y.height}:y});break}},[t]),s=Qp({callback:o}),u=z.useCallback(d=>{const m=lB(d);s==null||s.disconnect(),m&&(s==null||s.observe(m)),i(m?t(m):null)},[t,s]),[c,f]=vp(u);return z.useMemo(()=>({nodeRef:c,rect:n,setRef:f}),[n,c,f])}const cB=[{sensor:dS,options:{}},{sensor:cS,options:{}}],fB={current:{}},ep={draggable:{measure:wR},droppable:{measure:wR,strategy:Yc.WhileDragging,frequency:eb.Optimized},dragOverlay:{measure:gu}};class Nc extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,i;return(n=(i=this.get(t))==null?void 0:i.node.current)!=null?n:void 0}}const dB={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Nc,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:yp},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ep,measureDroppableContainers:yp,windowRect:null,measuringScheduled:!1},hB={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:yp,draggableNodes:new Map,over:null,measureDroppableContainers:yp},Yp=z.createContext(hB),UM=z.createContext(dB);function pB(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Nc}}}function mB(e,t){switch(t.type){case yn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case yn.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case yn.DragEnd:case yn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case yn.RegisterDroppable:{const{element:n}=t,{id:i}=n,o=new Nc(e.droppable.containers);return o.set(i,n),{...e,droppable:{...e.droppable,containers:o}}}case yn.SetDroppableDisabled:{const{id:n,key:i,disabled:o}=t,s=e.droppable.containers.get(n);if(!s||i!==s.key)return e;const u=new Nc(e.droppable.containers);return u.set(n,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:u}}}case yn.UnregisterDroppable:{const{id:n,key:i}=t,o=e.droppable.containers.get(n);if(!o||i!==o.key)return e;const s=new Nc(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function gB(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:o}=z.useContext(Yp),s=W0(i),u=W0(n==null?void 0:n.id);return z.useEffect(()=>{if(!t&&!i&&s&&u!=null){if(!lS(s)||document.activeElement===s.target)return;const c=o.get(u);if(!c)return;const{activatorNode:f,node:d}=c;if(!f.current&&!d.current)return;requestAnimationFrame(()=>{for(const m of[f.current,d.current]){if(!m)continue;const p=l5(m);if(p){p.focus();break}}})}},[i,t,o,u,s]),null}function vB(e,t){let{transform:n,...i}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...i}),n):n}function yB(e){return z.useMemo(()=>({draggable:{...ep.draggable,...e==null?void 0:e.draggable},droppable:{...ep.droppable,...e==null?void 0:e.droppable},dragOverlay:{...ep.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function bB(e){let{activeNode:t,measure:n,initialRect:i,config:o=!0}=e;const s=z.useRef(!1),{x:u,y:c}=typeof o=="boolean"?{x:o,y:o}:o;zi(()=>{if(!u&&!c||!t){s.current=!1;return}if(s.current||!i)return;const d=t==null?void 0:t.node.current;if(!d||d.isConnected===!1)return;const m=n(d),p=DM(m,i);if(u||(p.x=0),c||(p.y=0),s.current=!0,Math.abs(p.x)>0||Math.abs(p.y)>0){const y=jM(d);y&&y.scrollBy({top:p.y,left:p.x})}},[t,u,c,i,n])}const BM=z.createContext({...mi,scaleX:1,scaleY:1});var lo;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(lo||(lo={}));const SB=z.memo(function(t){var n,i,o,s;let{id:u,accessibility:c,autoScroll:f=!0,children:d,sensors:m=cB,collisionDetection:p=E5,measuring:y,modifiers:S,...g}=t;const b=z.useReducer(mB,void 0,pB),[v,_]=b,[x,E]=p5(),[R,C]=z.useState(lo.Uninitialized),$=R===lo.Initialized,{draggable:{active:A,nodes:T,translate:M},droppable:{containers:D}}=v,j=A!=null?T.get(A):null,I=z.useRef({initial:null,translated:null}),L=z.useMemo(()=>{var Ct;return A!=null?{id:A,data:(Ct=j==null?void 0:j.data)!=null?Ct:fB,rect:I}:null},[A,j]),K=z.useRef(null),[G,q]=z.useState(null),[Q,W]=z.useState(null),ne=Kc(g,Object.values(g)),X=Cf("DndDescribedBy",u),P=z.useMemo(()=>D.getEnabled(),[D]),B=yB(y),{droppableRects:U,measureDroppableContainers:k,measuringScheduled:V}=J5(P,{dragging:$,dependencies:[M.x,M.y],config:B.droppable}),J=W5(T,A),le=z.useMemo(()=>Q?X0(Q):null,[Q]),ie=Be(),se=Z5(J,B.draggable.measure);bB({activeNode:A!=null?T.get(A):null,config:ie.layoutShiftCompensation,initialRect:se,measure:B.draggable.measure});const fe=OR(J,B.draggable.measure,se),Y=OR(J?J.parentElement:null),Z=z.useRef({activatorEvent:null,active:null,activeNode:J,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:D,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ue=D.getNodeFor((n=Z.current.over)==null?void 0:n.id),ae=uB({measure:B.dragOverlay.measure}),Se=(i=ae.nodeRef.current)!=null?i:J,ye=$?(o=ae.rect)!=null?o:fe:null,Oe=!!(ae.nodeRef.current&&ae.rect),Re=nB(Oe?null:fe),Ce=qM(Se?dr(Se):null),Ae=rB($?ue??J:null),$e=sB(Ae),Fe=vB(S,{transform:{x:M.x-Re.x,y:M.y-Re.y,scaleX:1,scaleY:1},activatorEvent:Q,active:L,activeNodeRect:fe,containerNodeRect:Y,draggingNodeRect:ye,over:Z.current.over,overlayNodeRect:ae.rect,scrollableAncestors:Ae,scrollableAncestorRects:$e,windowRect:Ce}),Ie=le?jl(le,M):null,je=iB(Ae),Ye=$R(je),ke=$R(je,[fe]),Je=jl(Fe,Ye),tt=ye?R5(ye,Fe):null,wt=L&&tt?p({active:L,collisionRect:tt,droppableRects:U,droppableContainers:P,pointerCoordinates:Ie}):null,tn=MM(wt,"id"),[He,At]=z.useState(null),ln=Oe?Fe:jl(Fe,ke),$t=x5(ln,(s=He==null?void 0:He.rect)!=null?s:null,fe),mn=z.useRef(null),de=z.useCallback((Ct,Tt)=>{let{sensor:gt,options:Yt}=Tt;if(K.current==null)return;const wn=T.get(K.current);if(!wn)return;const Wt=Ct.nativeEvent,Lt=new gt({active:K.current,activeNode:wn,event:Wt,options:Yt,context:Z,onAbort(Xt){if(!T.get(Xt))return;const{onDragAbort:gn}=ne.current,kn={id:Xt};gn==null||gn(kn),x({type:"onDragAbort",event:kn})},onPending(Xt,tr,gn,kn){if(!T.get(Xt))return;const{onDragPending:hr}=ne.current,Kn={id:Xt,constraint:tr,initialCoordinates:gn,offset:kn};hr==null||hr(Kn),x({type:"onDragPending",event:Kn})},onStart(Xt){const tr=K.current;if(tr==null)return;const gn=T.get(tr);if(!gn)return;const{onDragStart:kn}=ne.current,nr={activatorEvent:Wt,active:{id:tr,data:gn.data,rect:I}};xc.unstable_batchedUpdates(()=>{kn==null||kn(nr),C(lo.Initializing),_({type:yn.DragStart,initialCoordinates:Xt,active:tr}),x({type:"onDragStart",event:nr}),q(mn.current),W(Wt)})},onMove(Xt){_({type:yn.DragMove,coordinates:Xt})},onEnd:Hn(yn.DragEnd),onCancel:Hn(yn.DragCancel)});mn.current=Lt;function Hn(Xt){return async function(){const{active:gn,collisions:kn,over:nr,scrollAdjustedTranslate:hr}=Z.current;let Kn=null;if(gn&&hr){const{cancelDrop:ei}=ne.current;Kn={activatorEvent:Wt,active:gn,collisions:kn,delta:hr,over:nr},Xt===yn.DragEnd&&typeof ei=="function"&&await Promise.resolve(ei(Kn))&&(Xt=yn.DragCancel)}K.current=null,xc.unstable_batchedUpdates(()=>{_({type:Xt}),C(lo.Uninitialized),At(null),q(null),W(null),mn.current=null;const ei=Xt===yn.DragEnd?"onDragEnd":"onDragCancel";if(Kn){const Gn=ne.current[ei];Gn==null||Gn(Kn),x({type:ei,event:Kn})}})}}},[T]),ve=z.useCallback((Ct,Tt)=>(gt,Yt)=>{const wn=gt.nativeEvent,Wt=T.get(Yt);if(K.current!==null||!Wt||wn.dndKit||wn.defaultPrevented)return;const Lt={active:Wt};Ct(gt,Tt.options,Lt)===!0&&(wn.dndKit={capturedBy:Tt.sensor},K.current=Yt,de(gt,Tt))},[T,de]),ot=X5(m,ve);aB(m),zi(()=>{fe&&R===lo.Initializing&&C(lo.Initialized)},[fe,R]),z.useEffect(()=>{const{onDragMove:Ct}=ne.current,{active:Tt,activatorEvent:gt,collisions:Yt,over:wn}=Z.current;if(!Tt||!gt)return;const Wt={active:Tt,activatorEvent:gt,collisions:Yt,delta:{x:Je.x,y:Je.y},over:wn};xc.unstable_batchedUpdates(()=>{Ct==null||Ct(Wt),x({type:"onDragMove",event:Wt})})},[Je.x,Je.y]),z.useEffect(()=>{const{active:Ct,activatorEvent:Tt,collisions:gt,droppableContainers:Yt,scrollAdjustedTranslate:wn}=Z.current;if(!Ct||K.current==null||!Tt||!wn)return;const{onDragOver:Wt}=ne.current,Lt=Yt.get(tn),Hn=Lt&&Lt.rect.current?{id:Lt.id,rect:Lt.rect.current,data:Lt.data,disabled:Lt.disabled}:null,Xt={active:Ct,activatorEvent:Tt,collisions:gt,delta:{x:wn.x,y:wn.y},over:Hn};xc.unstable_batchedUpdates(()=>{At(Hn),Wt==null||Wt(Xt),x({type:"onDragOver",event:Xt})})},[tn]),zi(()=>{Z.current={activatorEvent:Q,active:L,activeNode:J,collisionRect:tt,collisions:wt,droppableRects:U,draggableNodes:T,draggingNode:Se,draggingNodeRect:ye,droppableContainers:D,over:He,scrollableAncestors:Ae,scrollAdjustedTranslate:Je},I.current={initial:ye,translated:tt}},[L,J,wt,tt,T,Se,ye,U,D,He,Ae,Je]),G5({...ie,delta:M,draggingRect:tt,pointerCoordinates:Ie,scrollableAncestors:Ae,scrollableAncestorRects:$e});const xt=z.useMemo(()=>({active:L,activeNode:J,activeNodeRect:fe,activatorEvent:Q,collisions:wt,containerNodeRect:Y,dragOverlay:ae,draggableNodes:T,droppableContainers:D,droppableRects:U,over:He,measureDroppableContainers:k,scrollableAncestors:Ae,scrollableAncestorRects:$e,measuringConfiguration:B,measuringScheduled:V,windowRect:Ce}),[L,J,fe,Q,wt,Y,ae,T,D,U,He,k,Ae,$e,B,V,Ce]),mt=z.useMemo(()=>({activatorEvent:Q,activators:ot,active:L,activeNodeRect:fe,ariaDescribedById:{draggable:X},dispatch:_,draggableNodes:T,over:He,measureDroppableContainers:k}),[Q,ot,L,fe,_,X,T,He,k]);return he.createElement(AM.Provider,{value:E},he.createElement(Yp.Provider,{value:mt},he.createElement(UM.Provider,{value:xt},he.createElement(BM.Provider,{value:$t},d)),he.createElement(gB,{disabled:(c==null?void 0:c.restoreFocus)===!1})),he.createElement(v5,{...c,hiddenTextDescribedById:X}));function Be(){const Ct=(G==null?void 0:G.autoScrollEnabled)===!1,Tt=typeof f=="object"?f.enabled===!1:f===!1,gt=$&&!Ct&&!Tt;return typeof f=="object"?{...f,enabled:gt}:{enabled:gt}}}),_B=z.createContext(null),MR="button",wB="Draggable";function EB(e){let{id:t,data:n,disabled:i=!1,attributes:o}=e;const s=Cf(wB),{activators:u,activatorEvent:c,active:f,activeNodeRect:d,ariaDescribedById:m,draggableNodes:p,over:y}=z.useContext(Yp),{role:S=MR,roleDescription:g="draggable",tabIndex:b=0}=o??{},v=(f==null?void 0:f.id)===t,_=z.useContext(v?BM:_B),[x,E]=vp(),[R,C]=vp(),$=oB(u,t),A=Kc(n);zi(()=>(p.set(t,{id:t,key:s,node:x,activatorNode:R,data:A}),()=>{const M=p.get(t);M&&M.key===s&&p.delete(t)}),[p,t]);const T=z.useMemo(()=>({role:S,tabIndex:b,"aria-disabled":i,"aria-pressed":v&&S===MR?!0:void 0,"aria-roledescription":g,"aria-describedby":m.draggable}),[i,S,b,v,g,m.draggable]);return{active:f,activatorEvent:c,activeNodeRect:d,attributes:T,isDragging:v,listeners:i?void 0:$,node:x,over:y,setNodeRef:E,setActivatorNodeRef:C,transform:_}}function xB(){return z.useContext(UM)}const CB="Droppable",RB={timeout:25};function OB(e){let{data:t,disabled:n=!1,id:i,resizeObserverConfig:o}=e;const s=Cf(CB),{active:u,dispatch:c,over:f,measureDroppableContainers:d}=z.useContext(Yp),m=z.useRef({disabled:n}),p=z.useRef(!1),y=z.useRef(null),S=z.useRef(null),{disabled:g,updateMeasurementsFor:b,timeout:v}={...RB,...o},_=Kc(b??i),x=z.useCallback(()=>{if(!p.current){p.current=!0;return}S.current!=null&&clearTimeout(S.current),S.current=setTimeout(()=>{d(Array.isArray(_.current)?_.current:[_.current]),S.current=null},v)},[v]),E=Qp({callback:x,disabled:g||!u}),R=z.useCallback((T,M)=>{E&&(M&&(E.unobserve(M),p.current=!1),T&&E.observe(T))},[E]),[C,$]=vp(R),A=Kc(t);return z.useEffect(()=>{!E||!C.current||(E.disconnect(),p.current=!1,E.observe(C.current))},[C,E]),z.useEffect(()=>(c({type:yn.RegisterDroppable,element:{id:i,key:s,disabled:n,node:C,rect:y,data:A}}),()=>c({type:yn.UnregisterDroppable,key:s,id:i})),[i]),z.useEffect(()=>{n!==m.current.disabled&&(c({type:yn.SetDroppableDisabled,id:i,key:s,disabled:n}),m.current.disabled=n)},[i,s,n,c]),{active:u,rect:y,isOver:(f==null?void 0:f.id)===i,node:C,over:f,setNodeRef:$}}function hS(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function AB(e,t){return e.reduce((n,i,o)=>{const s=t.get(i);return s&&(n[o]=s),n},Array(e.length))}function Zd(e){return e!==null&&e>=0}function $B(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function TB(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const VM=e=>{let{rects:t,activeIndex:n,overIndex:i,index:o}=e;const s=hS(t,i,n),u=t[o],c=s[o];return!c||!u?null:{x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height}},eh={scaleX:1,scaleY:1},MB=e=>{var t;let{activeIndex:n,activeNodeRect:i,index:o,rects:s,overIndex:u}=e;const c=(t=s[n])!=null?t:i;if(!c)return null;if(o===n){const d=s[u];return d?{x:0,y:n<u?d.top+d.height-(c.top+c.height):d.top-c.top,...eh}:null}const f=DB(s,o,n);return o>n&&o<=u?{x:0,y:-c.height-f,...eh}:o<n&&o>=u?{x:0,y:c.height+f,...eh}:{x:0,y:0,...eh}};function DB(e,t,n){const i=e[t],o=e[t-1],s=e[t+1];return i?n<t?o?i.top-(o.top+o.height):s?s.top-(i.top+i.height):0:s?s.top-(i.top+i.height):o?i.top-(o.top+o.height):0:0}const HM="Sortable",KM=he.createContext({activeIndex:-1,containerId:HM,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:VM,disabled:{draggable:!1,droppable:!1}});function jB(e){let{children:t,id:n,items:i,strategy:o=VM,disabled:s=!1}=e;const{active:u,dragOverlay:c,droppableRects:f,over:d,measureDroppableContainers:m}=xB(),p=Cf(HM,n),y=c.rect!==null,S=z.useMemo(()=>i.map($=>typeof $=="object"&&"id"in $?$.id:$),[i]),g=u!=null,b=u?S.indexOf(u.id):-1,v=d?S.indexOf(d.id):-1,_=z.useRef(S),x=!$B(S,_.current),E=v!==-1&&b===-1||x,R=TB(s);zi(()=>{x&&g&&m(S)},[x,S,g,m]),z.useEffect(()=>{_.current=S},[S]);const C=z.useMemo(()=>({activeIndex:b,containerId:p,disabled:R,disableTransforms:E,items:S,overIndex:v,useDragOverlay:y,sortedRects:AB(S,f),strategy:o}),[b,p,R.draggable,R.droppable,E,S,v,f,y,o]);return he.createElement(KM.Provider,{value:C},t)}const NB=e=>{let{id:t,items:n,activeIndex:i,overIndex:o}=e;return hS(n,i,o).indexOf(t)},PB=e=>{let{containerId:t,isSorting:n,wasDragging:i,index:o,items:s,newIndex:u,previousItems:c,previousContainerId:f,transition:d}=e;return!d||!i||c!==s&&o===u?!1:n?!0:u!==o&&t===f},IB={duration:200,easing:"ease"},GM="transform",zB=Qc.Transition.toString({property:GM,duration:0,easing:"linear"}),FB={roleDescription:"sortable"};function kB(e){let{disabled:t,index:n,node:i,rect:o}=e;const[s,u]=z.useState(null),c=z.useRef(n);return zi(()=>{if(!t&&n!==c.current&&i.current){const f=o.current;if(f){const d=gu(i.current,{ignoreTransform:!0}),m={x:f.left-d.left,y:f.top-d.top,scaleX:f.width/d.width,scaleY:f.height/d.height};(m.x||m.y)&&u(m)}}n!==c.current&&(c.current=n)},[t,n,i,o]),z.useEffect(()=>{s&&u(null)},[s]),s}function LB(e){let{animateLayoutChanges:t=PB,attributes:n,disabled:i,data:o,getNewIndex:s=NB,id:u,strategy:c,resizeObserverConfig:f,transition:d=IB}=e;const{items:m,containerId:p,activeIndex:y,disabled:S,disableTransforms:g,sortedRects:b,overIndex:v,useDragOverlay:_,strategy:x}=z.useContext(KM),E=qB(i,S),R=m.indexOf(u),C=z.useMemo(()=>({sortable:{containerId:p,index:R,items:m},...o}),[p,o,R,m]),$=z.useMemo(()=>m.slice(m.indexOf(u)),[m,u]),{rect:A,node:T,isOver:M,setNodeRef:D}=OB({id:u,data:C,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:$,...f}}),{active:j,activatorEvent:I,activeNodeRect:L,attributes:K,setNodeRef:G,listeners:q,isDragging:Q,over:W,setActivatorNodeRef:ne,transform:X}=EB({id:u,data:C,attributes:{...FB,...n},disabled:E.draggable}),P=i5(D,G),B=!!j,U=B&&!g&&Zd(y)&&Zd(v),k=!_&&Q,V=k&&U?X:null,le=U?V??(c??x)({rects:b,activeNodeRect:L,activeIndex:y,overIndex:v,index:R}):null,ie=Zd(y)&&Zd(v)?s({id:u,items:m,activeIndex:y,overIndex:v}):R,se=j==null?void 0:j.id,fe=z.useRef({activeId:se,items:m,newIndex:ie,containerId:p}),Y=m!==fe.current.items,Z=t({active:j,containerId:p,isDragging:Q,isSorting:B,id:u,index:R,items:m,newIndex:fe.current.newIndex,previousItems:fe.current.items,previousContainerId:fe.current.containerId,transition:d,wasDragging:fe.current.activeId!=null}),ue=kB({disabled:!Z,index:R,node:T,rect:A});return z.useEffect(()=>{B&&fe.current.newIndex!==ie&&(fe.current.newIndex=ie),p!==fe.current.containerId&&(fe.current.containerId=p),m!==fe.current.items&&(fe.current.items=m)},[B,ie,p,m]),z.useEffect(()=>{if(se===fe.current.activeId)return;if(se!=null&&fe.current.activeId==null){fe.current.activeId=se;return}const Se=setTimeout(()=>{fe.current.activeId=se},50);return()=>clearTimeout(Se)},[se]),{active:j,activeIndex:y,attributes:K,data:C,rect:A,index:R,newIndex:ie,items:m,isOver:M,isSorting:B,isDragging:Q,listeners:q,node:T,overIndex:v,over:W,setNodeRef:P,setActivatorNodeRef:ne,setDroppableNodeRef:D,setDraggableNodeRef:G,transform:ue??le,transition:ae()};function ae(){if(ue||Y&&fe.current.newIndex===R)return zB;if(!(k&&!lS(I)||!d)&&(B||Z))return Qc.Transition.toString({...d,property:GM})}}function qB(e,t){var n,i;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(i=e==null?void 0:e.droppable)!=null?i:t.droppable}}function Sp(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const UB=[dt.Down,dt.Right,dt.Up,dt.Left],BB=(e,t)=>{let{context:{active:n,collisionRect:i,droppableRects:o,droppableContainers:s,over:u,scrollableAncestors:c}}=t;if(UB.includes(e.code)){if(e.preventDefault(),!n||!i)return;const f=[];s.getEnabled().forEach(p=>{if(!p||p!=null&&p.disabled)return;const y=o.get(p.id);if(y)switch(e.code){case dt.Down:i.top<y.top&&f.push(p);break;case dt.Up:i.top>y.top&&f.push(p);break;case dt.Left:i.left>y.left&&f.push(p);break;case dt.Right:i.left<y.left&&f.push(p);break}});const d=_5({collisionRect:i,droppableRects:o,droppableContainers:f});let m=MM(d,"id");if(m===(u==null?void 0:u.id)&&d.length>1&&(m=d[1].id),m!=null){const p=s.get(n.id),y=s.get(m),S=y?o.get(y.id):null,g=y==null?void 0:y.node.current;if(g&&S&&p&&y){const v=Gp(g).some(($,A)=>c[A]!==$),_=QM(p,y),x=VB(p,y),E=v||!_?{x:0,y:0}:{x:x?i.width-S.width:0,y:x?i.height-S.height:0},R={x:S.left,y:S.top};return E.x&&E.y?R:Gc(R,E)}}}};function QM(e,t){return!Sp(e)||!Sp(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function VB(e,t){return!Sp(e)||!Sp(t)||!QM(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function at(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function HB(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),at(e.additionalItems)}function DR(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const xo="__additional_property",_p="additionalProperties",To="allOf",ht="anyOf",Xr="const",Wp="default",pS="dependencies",KB="enum",Pn="__errors",Ft="$id",mS="if",Xl="items",GB="_$junk_option_schema_id$_",tp="$name",Xe="oneOf",tb="patternProperties",bt="properties",Uy="readonly",YM="required",wp="submitButtonOptions",Bt="$ref",Rc="$schema",WM="root",XM="_",QB=["discriminator","propertyName"],jR="formContext",YB="layoutGridLookupMap",gS="__rjsf_additionalProperties",JM="__rjsf_rootSchema",WB="ui:field",vS="ui:widget",Co="ui:options",nb="ui:globalOptions",XB="https://json-schema.org/draft/2019-09/schema",np="https://json-schema.org/draft/2020-12/schema";function Ue(e={},t={}){return e?Object.keys(e).filter(n=>n.indexOf("ui:")===0).reduce((n,i)=>{const o=e[i];return i===vS&&at(o)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):i===Co&&at(o)?{...n,...o}:{...n,[i.substring(3)]:o}},{...t}):{...t}}function JB(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:i=!0}=Ue(t);return i===!1?i:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}var Xp=nT(Object.getPrototypeOf,Object),ZB="[object Object]",e6=Function.prototype,t6=Object.prototype,ZM=e6.toString,n6=t6.hasOwnProperty,r6=ZM.call(Object);function Mo(e){if(!Qr(e)||Aa(e)!=ZB)return!1;var t=Xp(e);if(t===null)return!0;var n=n6.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ZM.call(n)==r6}function rb(e){const t={[Pn]:[],addError(n){this[Pn].push(n)}};if(Array.isArray(e))return e.reduce((n,i,o)=>({...n,[o]:rb(i)}),t);if(Mo(e)){const n=e;return Object.keys(n).reduce((i,o)=>({...i,[o]:rb(n[o])}),t)}return t}function i6(e,t,n){n=typeof n=="function"?n:void 0;var i=n?n(e,t):void 0;return i===void 0?hf(e,t,void 0,n):!!i}function Ut(e,t){return i6(e,t,(n,i)=>{if(typeof n=="function"&&typeof i=="function")return!0})}var a6=Object.prototype,o6=a6.hasOwnProperty;function s6(e,t){return e!=null&&o6.call(e,t)}function ut(e,t){return e!=null&&uT(e,t,s6)}function yS(e,t,n){t=="__proto__"&&dp?dp(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var l6=Object.prototype,u6=l6.hasOwnProperty;function bS(e,t,n){var i=e[t];(!(u6.call(e,t)&&uf(i,n))||n===void 0&&!(t in e))&&yS(e,t,n)}function SS(e,t,n,i){if(!pt(e))return e;t=au(t,e);for(var o=-1,s=t.length,u=s-1,c=e;c!=null&&++o<s;){var f=Ds(t[o]),d=n;if(f==="__proto__"||f==="constructor"||f==="prototype")return e;if(o!=u){var m=c[f];d=i?i(m,f,c):void 0,d===void 0&&(d=pt(m)?m:Ip(t[o+1])?[]:{})}bS(c,f,d),c=c[f]}return e}function Nt(e,t,n){return e==null?e:SS(e,t,n)}function eD(e){return typeof e=="function"?e:Dp}var c6=9007199254740991,By=4294967295,f6=Math.min;function tD(e,t){if(e=iT(e),e<1||e>c6)return[];var n=By,i=f6(e,By);t=eD(t),e-=By;for(var o=Y$(i,t);++n<e;)t(n);return o}function _S(e,t){for(var n=-1,i=e==null?0:e.length;++n<i&&t(e[n],n,e)!==!1;);return e}var NR=Object.create,nD=(function(){function e(){}return function(t){if(!pt(t))return{};if(NR)return NR(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();function d6(e){return function(t,n,i){for(var o=-1,s=Object(t),u=i(t),c=u.length;c--;){var f=u[++o];if(n(s[f],f,s)===!1)break}return t}}var rD=d6();function iD(e,t){return e&&rD(e,t,ci)}function h6(e,t,n){var i=Sn(e),o=i||Os(e)||df(e);if(t=Pb(t),n==null){var s=e&&e.constructor;o?n=i?new s:[]:pt(e)?n=lf(s)?nD(Xp(e)):{}:n={}}return(o?_S:iD)(e,function(u,c,f){return t(n,u,c,f)}),n}function ib(e,t,n){(n!==void 0&&!uf(e[t],n)||n===void 0&&!(t in e))&&yS(e,t,n)}var aD=typeof Ar=="object"&&Ar&&!Ar.nodeType&&Ar,PR=aD&&typeof $r=="object"&&$r&&!$r.nodeType&&$r,p6=PR&&PR.exports===aD,IR=p6?Li.Buffer:void 0,zR=IR?IR.allocUnsafe:void 0;function oD(e,t){if(t)return e.slice();var n=e.length,i=zR?zR(n):new e.constructor(n);return e.copy(i),i}function wS(e){var t=new e.constructor(e.byteLength);return new pp(t).set(new pp(e)),t}function sD(e,t){var n=t?wS(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ES(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}function lD(e){return typeof e.constructor=="function"&&!zp(e)?nD(Xp(e)):{}}function ab(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function vu(e,t,n,i){var o=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],f=void 0;f===void 0&&(f=e[c]),o?yS(n,c,f):bS(n,c,f)}return n}function m6(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var g6=Object.prototype,v6=g6.hasOwnProperty;function y6(e){if(!pt(e))return m6(e);var t=zp(e),n=[];for(var i in e)i=="constructor"&&(t||!v6.call(e,i))||n.push(i);return n}function Rf(e){return Ms(e)?tT(e,!0):y6(e)}function b6(e){return vu(e,Rf(e))}function S6(e,t,n,i,o,s,u){var c=ab(e,n),f=ab(t,n),d=u.get(f);if(d){ib(e,n,d);return}var m=s?s(c,f,n+"",e,t,u):void 0,p=m===void 0;if(p){var y=Sn(f),S=!y&&Os(f),g=!y&&!S&&df(f);m=f,y||S||g?Sn(c)?m=c:_a(c)?m=ES(c):S?(p=!1,m=oD(f,!0)):g?(p=!1,m=sD(f,!0)):m=[]:Mo(f)||Gl(f)?(m=c,Gl(c)?m=b6(c):(!pt(c)||lf(c))&&(m=lD(f))):p=!1}p&&(u.set(f,m),o(m,f,i,s,u),u.delete(f)),ib(e,n,m)}function uD(e,t,n,i,o){e!==t&&rD(t,function(s,u){if(o||(o=new fi),pt(s))S6(e,t,u,n,uD,i,o);else{var c=i?i(ab(e,u),s,u+"",e,t,o):void 0;c===void 0&&(c=s),ib(e,u,c)}},Rf)}function _6(e){return ru(function(t,n){var i=-1,o=n.length,s=o>1?n[o-1]:void 0,u=o>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(o--,s):void 0,u&&Ak(n[0],n[1],u)&&(s=o<3?void 0:s,o=1),t=Object(t);++i<o;){var c=n[i];c&&e(t,c,i,s)}return t})}var w6=_6(function(e,t,n){uD(e,t,n)}),E6=1/0;function x6(e){var t=e==null?0:e.length;return t?Ts(e,E6):[]}function cD(e){return e&&e.length?Ob(e):[]}var C6="[object Map]",R6="[object Set]",O6=Object.prototype,A6=O6.hasOwnProperty;function on(e){if(e==null)return!0;if(Ms(e)&&(Sn(e)||typeof e=="string"||typeof e.splice=="function"||Os(e)||df(e)||Gl(e)))return!e.length;var t=Kr(e);if(t==C6||t==R6)return!e.size;if(zp(e))return!rT(e).length;for(var n in e)if(A6.call(e,n))return!1;return!0}const $6=Object.prototype;function Oc(e){for(const t in e)if($6.hasOwnProperty.call(e,t))return!1;return!0}const T6=["array","boolean","integer","null","number","object","string"];new Set(T6);const M6=["$defs","definitions","properties","patternProperties","dependencies"];new Set(M6);const D6=["items","allOf","oneOf","anyOf"];new Set(D6);const j6=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(j6);function rp(e){return typeof e=="object"}function Oi(e){return rp(e)?Oc(e):e===!0}function Tl(e,t){return e<t?-1:e>t?1:0}function Vy(e,t){const n=e.length;if(n===0)return t;let i=t.length;if(i===0)return e;if(n<i){const s=e;e=t,t=s,i=n}const o=new Set(e);for(let s=0;s<i;s++)o.add(t[s]);return Array.from(o)}function N6(e,t){const n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){const o=e;e=t,t=o}const i=new Set(t);for(let o=0;o<e.length&&i.size>0;o++){const s=e[o];i.delete(s)&&n.push(s)}return n}function FR(e){return e.length===0}function Hy(e){return(t,n)=>{const i=t.length-n.length;if(i!==0)return i;for(let o=0;o<t.length;o++)if(t[o]!==n[o]){const s=e(t[o],n[o]);if(s!==0)return s}return 0}}function fD(e,{threshold:t=12}={}){return n=>{const i=n.length;if(i===0)return n;if(i<=t){const u=[];let c=0;e:for(let f=0;f<i;f++){const d=n[f];for(let m=0;m<c;m++)if(e(d,u[m])===0)continue e;c=u.push(d)}return u}const o=n.slice().sort(e);let s=0;for(let u=1;u<i;u++)e(o[s],o[u])!==0&&++s!==u&&(o[s]=o[u]);return o.length=s+1,o}}function P6(e){return(t,n)=>{const i=[];let o=t.length,s=n.length;if(o===0||s===0)return i;if(o>s){const m=t;t=n,n=m;const p=o;o=s,s=p}const u=[...t].sort(e),c=[...n].sort(e);let f=0,d=0;for(;f<o&&d<s;){const m=e(u[f],c[d]);m===0?((i.length===0||e(i[i.length-1],u[f])!==0)&&i.push(u[f]),f++,d++):m<0?f++:d++}return i}}function I6(e,t){return n=>{if(e.has(n))return e.get(n);const i=t(n);return e.set(n,i),i}}const kR=I6,dD=()=>0,z6=e=>e===void 0,F6=e=>typeof e!="object",LR={boolean:0,number:1,string:2};function k6(e,t){const n=typeof e,i=typeof t;return n===i?Tl(e,t):LR[n]-LR[i]}function L6(e,t){const n=e.length;if(n===0)return t;const i=t.length;if(i===0)return e;if(i>n){const u=e;e=t,t=u}const o=new Set(e),s=t.length;for(let u=0;u<s;u++){const c=t[u];o.has(c)||e.push(c)}return e}function Jp(e,t,n=dD){return(i,o)=>e(i)?e(o)?n(i,o):-1:e(o)?1:t(i,o)}function $l(e){return Jp(z6,e)}function oo(e,t){return Jp(n=>n===void 0||e(n),t)}function Ky(e,t){return Jp(Array.isArray,e,t)}const hn=$l(Tl),Gy=oo(e=>e===0,(e,t)=>e-t);function q6({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const n=kR(t,b=>Object.keys(b).sort());function i(b){return(v,_)=>{const x=n(v),E=n(_),R=Math.min(x.length,E.length);for(let C=0;C<R;C++){const $=Tl(x[C],E[C]);if($!==0)return $}if(x.length!==E.length)return x.length-E.length;for(let C=0;C<R;C++){const $=x[C],A=b(v[$],_[$]);if(A!==0)return A}return 0}}function o(b){const v=Hy(b),_=kR(e,fD(b,{threshold:0}));return(x,E)=>v(_(x),_(E))}const s=o(Tl);function u(b,v){if(rp(b)){if(rp(v)){const _=Object.keys(b),x=Object.keys(v),E=L6(_,x),R=E.length;for(let C=0;C<R;C++){const $=E[C];if(b[$]===v[$])continue;const T=(g[$]??c)(b[$],v[$]);if(T!==0)return T}return 0}return v===!0&&Oc(b)?0:1}return rp(v)?b===!0&&Oc(v)?0:-1:Tl(b,v)}const c=$l(d),f=Jp(F6,Ky(i(c),Hy(d)),k6);function d(b,v){return b===null?-1:v===null?1:f(b,v)}const m=$l(u),p=oo(Oc,i(m)),y=$l(o(u)),S=oo(Oi,u),g={$id:hn,$comment:hn,$defs:p,$ref:hn,$schema:hn,const:c,contains:m,contentEncoding:hn,contentMediaType:hn,default:c,definitions:p,description:hn,else:m,examples:c,exclusiveMaximum:hn,exclusiveMinimum:hn,format:hn,if:m,maximum:hn,maxItems:hn,maxLength:hn,maxProperties:hn,minimum:hn,multipleOf:hn,not:m,pattern:hn,propertyNames:m,readOnly:hn,then:m,title:hn,writeOnly:hn,uniqueItems:oo(b=>b===!1,dD),minLength:Gy,minItems:Gy,minProperties:Gy,required:oo(FR,s),enum:oo(FR,o(d)),type:$l((b,v)=>{const _=Array.isArray(b),x=Array.isArray(v);return!_&&!x?Tl(b,v):s(_?b:[b],x?v:[v])}),items:oo(b=>!Array.isArray(b)&&Oi(b),Ky(u,Hy(u))),anyOf:y,allOf:y,oneOf:y,properties:p,patternProperties:p,additionalProperties:S,additionalItems:S,dependencies:oo(Oc,i($l(Ky(u,s))))};return{compareSchemaValues:d,compareSchemaDefinitions:u}}function qR(e){return e}const hD=(e,t)=>e?hD(t%e,e):t,U6=(e,t)=>Math.abs(e*t)/hD(e,t);function B6(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*Qy(e,t,n){const i=e.length,o=t.length;if(i>0&&o>0)for(let s=0;s<i;s++){const u=e[s];for(let c=0;c<o;c++)yield n(u,t[c])}}function Yy(e,t){return e||t}function UR(e){return(t,n)=>{const i={...t},o=Object.keys(n),s=o.length;for(let u=0;u<s;u++){const c=o[u];i[c]=t[c]===void 0?n[c]:e(t[c],n[c])}return i}}function V6(e){const t=new Map;for(const n of e)for(const i of n[0])t.set(i,n[1]);return t}function is(e,t,n){n===void 0||Oi(n)?delete e[t]:e[t]=n}const H6=["properties","patternProperties","additionalProperties"];function BR(e){const t=Object.keys(e),n=t.length,i=[];for(let o=0;o<n;o++){const s=t[o];i.push({regExp:new RegExp(s),schema:e[s]})}return[i,t]}const VR=[[],[]];function HR(e,t,n){const i=n.length;for(let o=0;o<i;o++){const s=n[o];if(!s.regExp.test(t))continue;const u=s.schema;if(u===!1)return!0;e.push(u)}return!1}const K6=["items","additionalItems"],G6=["if","then","else"];function KR(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function Wy(e,t){if(e===t)return e;switch(e){case"number":if(t==="integer")return"integer";case"integer":if(t==="number")return"integer";default:return}}function as(e,t,n){return[e,t,n]}function Q6(e){const t=new Map;for(const[n,i,o]of e){const s=u=>{if(!o(u))throw new Error(`Schema keys '${n}' and '${i}' are conflicting (${n}: ${JSON.stringify(u[n])}, ${i}: ${JSON.stringify(u[i])})`)};for(const u of[[n,i],[i,n]]){let c=t.get(u[0]);c===void 0&&(c=[],t.set(u[0],c)),c.push({oppositeKey:u[1],check:s})}}return t}const Y6=[as("minimum","maximum",e=>e.maximum>=e.minimum),as("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),as("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),as("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),as("minLength","maxLength",e=>e.maxLength>=e.minLength),as("minItems","maxItems",e=>e.maxItems>=e.minItems),as("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function W6({mergePatterns:e=B6,isSubRegExp:t=Object.is,intersectJson:n=N6,deduplicateJsonSchemaDef:i=qR,defaultMerger:o=qR,assigners:s=[],checks:u=Y6,mergers:c}={}){function f(R){const C=R.length;let $=R[0];for(let A=1;A<C;A++){const T=_($,R[A]);if(T===!1)return!1;Oi(T)||($=T)}return $}function d(R,C,$,A,T,M,D){if(R.length=0,$===!1)return!1;if(R.push($),T!==void 0){if(T===!1)return!1;R.push(T)}if(HR(R,C,M))return!1;const I=R.length<2;if(D===!1){if(I)return;if(HR(R,C,A))return!1}else I&&D!==void 0&&R.push(D);return R.length===1?R[0]:f(R)}function m(R,C,$,A,T,M){const D=$.length;if(D>0&&T!==!1)if(M)Object.assign(R,C);else for(let j=0;j<D;j++){const I=$[j];A.has(I)||(R[I]=_(C[I],T))}return R}const p=(R,{properties:C={},patternProperties:$,additionalProperties:A=!0},{properties:T={},patternProperties:M,additionalProperties:D=!0})=>{const j=Oi(A),I=Oi(D);if(j&&I)return is(R,"properties",x(C,T)),is(R,"patternProperties",$&&M?x($,M):$??M),delete R.additionalProperties,R;const L=_(A,D);is(R,"additionalProperties",L);const K={},G=Object.keys(C),q=G.length,[Q,W]=$?BR($):VR,[ne,X]=M?BR(M):VR,P=[],B=new Set,U=I?void 0:D;for(let se=0;se<q;se++){const fe=G[se];B.add(fe);const Y=d(P,fe,C[fe],Q,T[fe],ne,U);Y!==void 0&&(K[fe]=Y)}const k=Object.keys(T),V=k.length,J=j?void 0:A;for(let se=0;se<V;se++){const fe=k[se];if(B.has(fe))continue;const Y=d(P,fe,T[fe],ne,void 0,Q,J);Y!==void 0&&(K[fe]=Y)}is(R,"properties",K);let le={};const ie=new Set;if(W.length>0&&X.length>0){const se=Qy(W,X,(fe,Y)=>{t(fe,Y)&&ie.add(fe),t(Y,fe)&&ie.add(Y),le[e(fe,Y)]=_($[fe],M[Y])});for(;!se.next().done;);}return le=m(le,$,W,ie,D,I),le=m(le,M,X,ie,A,j),is(R,"patternProperties",le),R},y=(R,{items:C=[],additionalItems:$},{items:A=[],additionalItems:T})=>{const M=Array.isArray(C),D=Array.isArray(A),j=[];if(R.items=j,M&&D){const[I,L,K]=C.length<A.length?[C.length,$,A]:[A.length,T,C];let G=0;for(;G<I;G++)j.push(_(C[G],A[G]));if(L===!1)R.additionalItems=!1;else{const q=L===void 0||Oi(L);for(;G<K.length;G++)j.push(q?K[G]:_(K[G],L));is(R,"additionalItems",$!==void 0&&T!==void 0?_($,T):$??T)}}else if(M||D){const[I,L,K]=M?[C,A,$]:[A,C,T];is(R,"additionalItems",K&&_(K,L));for(let G=0;G<I.length;G++)j.push(_(I[G],L))}else delete R.additionalItems,R.items=_(C,A);return R},S=(R,C,$)=>{KR(R,C);const A=KR({},$);return R.allOf===void 0?R.allOf=[A]:R.allOf=R.allOf.concat(A),R};function g(R,C){return i(Array.from(Qy(R,C,_)))}const b=V6([[H6,p],[K6,y],[G6,S],...s]),v=Q6(u);function _(R,C){if(R===!1||C===!1)return!1;if(Oi(R))return Oi(C)?!0:C;if(Oi(C))return R;let $={...R};const A=new Set,T=new Set,M=Object.keys(C),D=M.length;for(let j=0;j<D;j++){const I=M[j],L=C[I];if(L===void 0)continue;const K=v.get(I);if(K!==void 0){const W=K.length;for(let ne=0;ne<W;ne++){const X=K[ne];R[X.oppositeKey]!==void 0&&T.add(X.check)}}const G=R[I];if(G===void 0){$[I]=L;continue}const q=b.get(I);if(q){A.add(q);continue}const Q=E[I]??o;$[I]=Q(G,L)}for(const j of A)$=j($,R,C);for(const j of T)j($);return $}const x=UR(_),E={$id:o,$ref:o,$schema:o,$comment:o,$defs:x,definitions:x,type:(R,C)=>{if(R===C)return R;const $=Array.isArray(R),A=Array.isArray(C);if(!$&&!A){const T=Wy(R,C);if(T!==void 0)return T}else if($||A){const T=new Set;if($&&A)for(const D of Qy(R,C,Wy))D!==void 0&&T.add(D);else{const D=$?R:C,j=$?C:R,I=D.length;for(let L=0;L<I;L++){const K=Wy(j,D[L]);K!==void 0&&T.add(K)}}const M=T.size;if(M===1)return T.values().next().value;if(M>1)return Array.from(T)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${R.toString()}, ${C.toString()}`)},default:o,description:o,title:o,const:o,format:o,contentEncoding:o,contentMediaType:o,not:(R,C)=>{const $=i([R,C]);return $.length===1?$[0]:{anyOf:$}},pattern:e,readOnly:Yy,writeOnly:Yy,enum:(R,C)=>{const $=n(R,C);if($.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(R)}", "${JSON.stringify(C)}"`);return $},anyOf:g,oneOf:g,allOf:(R,C)=>i(R.concat(C)),propertyNames:_,contains:_,dependencies:UR((R,C)=>Array.isArray(R)?Array.isArray(C)?Vy(R,C):_(C,{required:R}):Array.isArray(C)?_(R,{required:C}):_(R,C)),examples:(R,C)=>{if(!Array.isArray(R)||!Array.isArray(C))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(R)}" and "${JSON.stringify(C)}"`);return Vy(R,C)},multipleOf:(R,C)=>{let $=1;for(;!Number.isInteger(R)||!Number.isInteger(C);)$*=10,R*=10,C*=10;return U6(R,C)/$},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:Yy,required:Vy,...c};return{mergeSchemaDefinitions:_,mergeArrayOfSchemaDefinitions:f}}function X6(e){const t=[],n=[e];for(;n.length>0;){const i=n.pop();if(typeof i=="boolean"||i.allOf===void 0){t.push(i);continue}const{allOf:o,...s}=i;t.push(s);for(let u=o.length-1;u>=0;u--)n.push(o[u])}return t}function J6(e){return t=>e(X6(t))}var yc={},GR;function Z6(){if(GR)return yc;GR=1;var e=/~/,t=/~[01]/g;function n(d){switch(d){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+d)}function i(d){return e.test(d)?d.replace(t,n):d}function o(d,m,p){for(var y,S,g=1,b=m.length;g<b;){if(m[g]==="constructor"||m[g]==="prototype"||m[g]==="__proto__")return d;if(y=i(m[g++]),S=b>g,typeof d[y]>"u"&&(Array.isArray(d)&&y==="-"&&(y=d.length),S&&(m[g]!==""&&m[g]<1/0||m[g]==="-"?d[y]=[]:d[y]={})),!S)break;d=d[y]}var v=d[y];return p===void 0?delete d[y]:d[y]=p,v}function s(d){if(typeof d=="string"){if(d=d.split("/"),d[0]==="")return d;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(d)){for(const m of d)if(typeof m!="string"&&typeof m!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return d}throw new Error("Invalid JSON pointer.")}function u(d,m){if(typeof d!="object")throw new Error("Invalid input object.");m=s(m);var p=m.length;if(p===1)return d;for(var y=1;y<p;){if(d=d[i(m[y++])],p===y)return d;if(typeof d!="object"||d===null)return}}function c(d,m,p){if(typeof d!="object")throw new Error("Invalid input object.");if(m=s(m),m.length===0)throw new Error("Invalid JSON pointer for set.");return o(d,m,p)}function f(d){var m=s(d);return{get:function(p){return u(p,m)},set:function(p,y){return c(p,m,y)}}}return yc.get=u,yc.set=c,yc.compile=f,yc}var e9=Z6();const Xy=Ra(e9);function t9(e,t){return e&&vu(t,ci(t),e)}function n9(e,t){return e&&vu(t,Rf(t),e)}function r9(e,t){return vu(e,Mb(e),t)}var i9=Object.getOwnPropertySymbols,pD=i9?function(e){for(var t=[];e;)xb(t,Mb(e)),e=Xp(e);return t}:J$;function a9(e,t){return vu(e,pD(e),t)}function xS(e){return X$(e,Rf,pD)}var o9=Object.prototype,s9=o9.hasOwnProperty;function l9(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&s9.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function u9(e,t){var n=t?wS(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var c9=/\w*$/;function f9(e){var t=new e.constructor(e.source,c9.exec(e));return t.lastIndex=e.lastIndex,t}var QR=Gr?Gr.prototype:void 0,YR=QR?QR.valueOf:void 0;function d9(e){return YR?Object(YR.call(e)):{}}var h9="[object Boolean]",p9="[object Date]",m9="[object Map]",g9="[object Number]",v9="[object RegExp]",y9="[object Set]",b9="[object String]",S9="[object Symbol]",_9="[object ArrayBuffer]",w9="[object DataView]",E9="[object Float32Array]",x9="[object Float64Array]",C9="[object Int8Array]",R9="[object Int16Array]",O9="[object Int32Array]",A9="[object Uint8Array]",$9="[object Uint8ClampedArray]",T9="[object Uint16Array]",M9="[object Uint32Array]";function D9(e,t,n){var i=e.constructor;switch(t){case _9:return wS(e);case h9:case p9:return new i(+e);case w9:return u9(e,n);case E9:case x9:case C9:case R9:case O9:case A9:case $9:case T9:case M9:return sD(e,n);case m9:return new i;case g9:case b9:return new i(e);case v9:return f9(e);case y9:return new i;case S9:return d9(e)}}var j9="[object Map]";function N9(e){return Qr(e)&&Kr(e)==j9}var WR=Ql&&Ql.isMap,P9=WR?Eb(WR):N9,I9="[object Set]";function z9(e){return Qr(e)&&Kr(e)==I9}var XR=Ql&&Ql.isSet,F9=XR?Eb(XR):z9,k9=1,L9=2,q9=4,mD="[object Arguments]",U9="[object Array]",B9="[object Boolean]",V9="[object Date]",H9="[object Error]",gD="[object Function]",K9="[object GeneratorFunction]",G9="[object Map]",Q9="[object Number]",vD="[object Object]",Y9="[object RegExp]",W9="[object Set]",X9="[object String]",J9="[object Symbol]",Z9="[object WeakMap]",eV="[object ArrayBuffer]",tV="[object DataView]",nV="[object Float32Array]",rV="[object Float64Array]",iV="[object Int8Array]",aV="[object Int16Array]",oV="[object Int32Array]",sV="[object Uint8Array]",lV="[object Uint8ClampedArray]",uV="[object Uint16Array]",cV="[object Uint32Array]",qt={};qt[mD]=qt[U9]=qt[eV]=qt[tV]=qt[B9]=qt[V9]=qt[nV]=qt[rV]=qt[iV]=qt[aV]=qt[oV]=qt[G9]=qt[Q9]=qt[vD]=qt[Y9]=qt[W9]=qt[X9]=qt[J9]=qt[sV]=qt[lV]=qt[uV]=qt[cV]=!0;qt[H9]=qt[gD]=qt[Z9]=!1;function Pc(e,t,n,i,o,s){var u,c=t&k9,f=t&L9,d=t&q9;if(n&&(u=o?n(e,i,o,s):n(e)),u!==void 0)return u;if(!pt(e))return e;var m=Sn(e);if(m){if(u=l9(e),!c)return ES(e,u)}else{var p=Kr(e),y=p==gD||p==K9;if(Os(e))return oD(e,c);if(p==vD||p==mD||y&&!o){if(u=f||y?{}:lD(e),!c)return f?a9(e,n9(u,e)):r9(e,t9(u,e))}else{if(!qt[p])return o?e:{};u=D9(e,p,c)}}s||(s=new fi);var S=s.get(e);if(S)return S;s.set(e,u),F9(e)?e.forEach(function(v){u.add(Pc(v,t,n,v,e,s))}):P9(e)&&e.forEach(function(v,_){u.set(_,Pc(v,t,n,_,e,s))});var g=d?f?xS:k0:f?Rf:ci,b=m?void 0:g(e);return _S(b||e,function(v,_){b&&(_=v,v=e[_]),bS(u,_,Pc(v,t,n,_,e,s))}),u}function fV(e,t){return t.length<2?e:Fp(e,Ok(t,0,-1))}var dV=Object.prototype,hV=dV.hasOwnProperty;function yD(e,t){t=au(t,e);var n=-1,i=t.length;if(!i)return!0;for(var o=e==null||typeof e!="object"&&typeof e!="function";++n<i;){var s=t[n];if(typeof s=="string"){if(s==="__proto__"&&!hV.call(e,"__proto__"))return!1;if(s==="constructor"&&n+1<i&&typeof t[n+1]=="string"&&t[n+1]==="prototype"){if(o&&n===0)continue;return!1}}}var u=fV(e,t);return u==null||delete u[Ds(jp(t))]}function pV(e){return Mo(e)?void 0:e}function ob(e){var t=e==null?0:e.length;return t?Ts(e,1):[]}function bD(e){return z$(I$(e,void 0,ob),e+"")}var mV=1,gV=2,vV=4,Wc=bD(function(e,t){var n={};if(e==null)return n;var i=!1;t=nu(t,function(s){return s=au(s,e),i||(i=s.length>1),s}),vu(e,xS(e),n),i&&(n=Pc(n,mV|gV|vV,pV));for(var o=t.length;o--;)yD(n,t[o]);return n}),bc={exports:{}},Jy,JR;function SD(){if(JR)return Jy;JR=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function n(y){let S="",g=0,b=0;for(b=0;b<y.length;b++)if(g=y[b].charCodeAt(0),g!==48){if(!(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102))return"";S+=y[b];break}for(b+=1;b<y.length;b++){if(g=y[b].charCodeAt(0),!(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102))return"";S+=y[b]}return S}const i=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(y){return y.length=0,!0}function s(y,S,g){if(y.length){const b=n(y);if(b!=="")S.push(b);else return g.error=!0,!1;y.length=0}return!0}function u(y){let S=0;const g={error:!1,address:"",zone:""},b=[],v=[];let _=!1,x=!1,E=s;for(let R=0;R<y.length;R++){const C=y[R];if(!(C==="["||C==="]"))if(C===":"){if(_===!0&&(x=!0),!E(v,b,g))break;if(++S>7){g.error=!0;break}R>0&&y[R-1]===":"&&(_=!0),b.push(":");continue}else if(C==="%"){if(!E(v,b,g))break;E=o}else{v.push(C);continue}}return v.length&&(E===o?g.zone=v.join(""):x?b.push(v.join("")):b.push(n(v))),g.address=b.join(""),g}function c(y){if(f(y,":")<2)return{host:y,isIPV6:!1};const S=u(y);if(S.error)return{host:y,isIPV6:!1};{let g=S.address,b=S.address;return S.zone&&(g+="%"+S.zone,b+="%25"+S.zone),{host:g,isIPV6:!0,escapedHost:b}}}function f(y,S){let g=0;for(let b=0;b<y.length;b++)y[b]===S&&g++;return g}function d(y){let S=y;const g=[];let b=-1,v=0;for(;v=S.length;){if(v===1){if(S===".")break;if(S==="/"){g.push("/");break}else{g.push(S);break}}else if(v===2){if(S[0]==="."){if(S[1]===".")break;if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&(S[1]==="."||S[1]==="/")){g.push("/");break}}else if(v===3&&S==="/.."){g.length!==0&&g.pop(),g.push("/");break}if(S[0]==="."){if(S[1]==="."){if(S[2]==="/"){S=S.slice(3);continue}}else if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&S[1]==="."){if(S[2]==="/"){S=S.slice(2);continue}else if(S[2]==="."&&S[3]==="/"){S=S.slice(3),g.length!==0&&g.pop();continue}}if((b=S.indexOf("/",1))===-1){g.push(S);break}else g.push(S.slice(0,b)),S=S.slice(b)}return g.join("")}function m(y,S){const g=S!==!0?escape:unescape;return y.scheme!==void 0&&(y.scheme=g(y.scheme)),y.userinfo!==void 0&&(y.userinfo=g(y.userinfo)),y.host!==void 0&&(y.host=g(y.host)),y.path!==void 0&&(y.path=g(y.path)),y.query!==void 0&&(y.query=g(y.query)),y.fragment!==void 0&&(y.fragment=g(y.fragment)),y}function p(y){const S=[];if(y.userinfo!==void 0&&(S.push(y.userinfo),S.push("@")),y.host!==void 0){let g=unescape(y.host);if(!t(g)){const b=c(g);b.isIPV6===!0?g=`[${b.escapedHost}]`:g=y.host}S.push(g)}return(typeof y.port=="number"||typeof y.port=="string")&&(S.push(":"),S.push(String(y.port))),S.length?S.join(""):void 0}return Jy={nonSimpleDomain:i,recomposeAuthority:p,normalizeComponentEncoding:m,removeDotSegments:d,isIPv4:t,isUUID:e,normalizeIPv6:c,stringArrayToHexStripped:n},Jy}var Zy,ZR;function yV(){if(ZR)return Zy;ZR=1;const{isUUID:e}=SD(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function i(C){return n.indexOf(C)!==-1}function o(C){return C.secure===!0?!0:C.secure===!1?!1:C.scheme?C.scheme.length===3&&(C.scheme[0]==="w"||C.scheme[0]==="W")&&(C.scheme[1]==="s"||C.scheme[1]==="S")&&(C.scheme[2]==="s"||C.scheme[2]==="S"):!1}function s(C){return C.host||(C.error=C.error||"HTTP URIs must have a host."),C}function u(C){const $=String(C.scheme).toLowerCase()==="https";return(C.port===($?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}function c(C){return C.secure=o(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C}function f(C){if((C.port===(o(C)?443:80)||C.port==="")&&(C.port=void 0),typeof C.secure=="boolean"&&(C.scheme=C.secure?"wss":"ws",C.secure=void 0),C.resourceName){const[$,A]=C.resourceName.split("?");C.path=$&&$!=="/"?$:void 0,C.query=A,C.resourceName=void 0}return C.fragment=void 0,C}function d(C,$){if(!C.path)return C.error="URN can not be parsed",C;const A=C.path.match(t);if(A){const T=$.scheme||C.scheme||"urn";C.nid=A[1].toLowerCase(),C.nss=A[2];const M=`${T}:${$.nid||C.nid}`,D=R(M);C.path=void 0,D&&(C=D.parse(C,$))}else C.error=C.error||"URN can not be parsed.";return C}function m(C,$){if(C.nid===void 0)throw new Error("URN without nid cannot be serialized");const A=$.scheme||C.scheme||"urn",T=C.nid.toLowerCase(),M=`${A}:${$.nid||T}`,D=R(M);D&&(C=D.serialize(C,$));const j=C,I=C.nss;return j.path=`${T||$.nid}:${I}`,$.skipEscape=!0,j}function p(C,$){const A=C;return A.uuid=A.nss,A.nss=void 0,!$.tolerant&&(!A.uuid||!e(A.uuid))&&(A.error=A.error||"UUID is not valid."),A}function y(C){const $=C;return $.nss=(C.uuid||"").toLowerCase(),$}const S={scheme:"http",domainHost:!0,parse:s,serialize:u},g={scheme:"https",domainHost:S.domainHost,parse:s,serialize:u},b={scheme:"ws",domainHost:!0,parse:c,serialize:f},v={scheme:"wss",domainHost:b.domainHost,parse:b.parse,serialize:b.serialize},E={http:S,https:g,ws:b,wss:v,urn:{scheme:"urn",parse:d,serialize:m,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:y,skipNormalize:!0}};Object.setPrototypeOf(E,null);function R(C){return C&&(E[C]||E[C.toLowerCase()])||void 0}return Zy={wsIsSecure:o,SCHEMES:E,isValidSchemeName:i,getSchemeHandler:R},Zy}var eO;function _D(){if(eO)return bc.exports;eO=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:i,isIPv4:o,nonSimpleDomain:s}=SD(),{SCHEMES:u,getSchemeHandler:c}=yV();function f(v,_){return typeof v=="string"?v=y(g(v,_),_):typeof v=="object"&&(v=g(y(v,_),_)),v}function d(v,_,x){const E=x?Object.assign({scheme:"null"},x):{scheme:"null"},R=m(g(v,E),g(_,E),E,!0);return E.skipEscape=!0,y(R,E)}function m(v,_,x,E){const R={};return E||(v=g(y(v,x),x),_=g(y(_,x),x)),x=x||{},!x.tolerant&&_.scheme?(R.scheme=_.scheme,R.userinfo=_.userinfo,R.host=_.host,R.port=_.port,R.path=t(_.path||""),R.query=_.query):(_.userinfo!==void 0||_.host!==void 0||_.port!==void 0?(R.userinfo=_.userinfo,R.host=_.host,R.port=_.port,R.path=t(_.path||""),R.query=_.query):(_.path?(_.path[0]==="/"?R.path=t(_.path):((v.userinfo!==void 0||v.host!==void 0||v.port!==void 0)&&!v.path?R.path="/"+_.path:v.path?R.path=v.path.slice(0,v.path.lastIndexOf("/")+1)+_.path:R.path=_.path,R.path=t(R.path)),R.query=_.query):(R.path=v.path,_.query!==void 0?R.query=_.query:R.query=v.query),R.userinfo=v.userinfo,R.host=v.host,R.port=v.port),R.scheme=v.scheme),R.fragment=_.fragment,R}function p(v,_,x){return typeof v=="string"?(v=unescape(v),v=y(i(g(v,x),!0),{...x,skipEscape:!0})):typeof v=="object"&&(v=y(i(v,!0),{...x,skipEscape:!0})),typeof _=="string"?(_=unescape(_),_=y(i(g(_,x),!0),{...x,skipEscape:!0})):typeof _=="object"&&(_=y(i(_,!0),{...x,skipEscape:!0})),v.toLowerCase()===_.toLowerCase()}function y(v,_){const x={host:v.host,scheme:v.scheme,userinfo:v.userinfo,port:v.port,path:v.path,query:v.query,nid:v.nid,nss:v.nss,uuid:v.uuid,fragment:v.fragment,reference:v.reference,resourceName:v.resourceName,secure:v.secure,error:""},E=Object.assign({},_),R=[],C=c(E.scheme||x.scheme);C&&C.serialize&&C.serialize(x,E),x.path!==void 0&&(E.skipEscape?x.path=unescape(x.path):(x.path=escape(x.path),x.scheme!==void 0&&(x.path=x.path.split("%3A").join(":")))),E.reference!=="suffix"&&x.scheme&&R.push(x.scheme,":");const $=n(x);if($!==void 0&&(E.reference!=="suffix"&&R.push("//"),R.push($),x.path&&x.path[0]!=="/"&&R.push("/")),x.path!==void 0){let A=x.path;!E.absolutePath&&(!C||!C.absolutePath)&&(A=t(A)),$===void 0&&A[0]==="/"&&A[1]==="/"&&(A="/%2F"+A.slice(2)),R.push(A)}return x.query!==void 0&&R.push("?",x.query),x.fragment!==void 0&&R.push("#",x.fragment),R.join("")}const S=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(v,_){const x=Object.assign({},_),E={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let R=!1;x.reference==="suffix"&&(x.scheme?v=x.scheme+":"+v:v="//"+v);const C=v.match(S);if(C){if(E.scheme=C[1],E.userinfo=C[3],E.host=C[4],E.port=parseInt(C[5],10),E.path=C[6]||"",E.query=C[7],E.fragment=C[8],isNaN(E.port)&&(E.port=C[5]),E.host)if(o(E.host)===!1){const T=e(E.host);E.host=T.host.toLowerCase(),R=T.isIPV6}else R=!0;E.scheme===void 0&&E.userinfo===void 0&&E.host===void 0&&E.port===void 0&&E.query===void 0&&!E.path?E.reference="same-document":E.scheme===void 0?E.reference="relative":E.fragment===void 0?E.reference="absolute":E.reference="uri",x.reference&&x.reference!=="suffix"&&x.reference!==E.reference&&(E.error=E.error||"URI is not a "+x.reference+" reference.");const $=c(x.scheme||E.scheme);if(!x.unicodeSupport&&(!$||!$.unicodeSupport)&&E.host&&(x.domainHost||$&&$.domainHost)&&R===!1&&s(E.host))try{E.host=URL.domainToASCII(E.host.toLowerCase())}catch(A){E.error=E.error||"Host's domain name can not be converted to ASCII: "+A}(!$||$&&!$.skipNormalize)&&(v.indexOf("%")!==-1&&(E.scheme!==void 0&&(E.scheme=unescape(E.scheme)),E.host!==void 0&&(E.host=unescape(E.host))),E.path&&(E.path=escape(unescape(E.path))),E.fragment&&(E.fragment=encodeURI(decodeURIComponent(E.fragment)))),$&&$.parse&&$.parse(E,x)}else E.error=E.error||"URI can not be parsed.";return E}const b={SCHEMES:u,normalize:f,resolve:d,resolveComponent:m,equal:p,serialize:y,parse:g};return bc.exports=b,bc.exports.default=b,bc.exports.fastUri=b,bc.exports}var bV=_D();const CS=Ra(bV);function Ep(e,t){if(Ft in e&&CS.equal(e[Ft],t))return e;for(const n of Object.values(e))if(Array.isArray(n)){for(const i of n)if(pt(i)){const o=Ep(i,t);if(o!==void 0)return o}}else if(pt(n)){const i=Ep(n,t);if(i!==void 0)return i}}function sb(e,t){const n=xe(e,Ft,t);Bt in e&&(e={...e,[Bt]:CS.resolve(n,e[Bt])});for(const[i,o]of Object.entries(e))Array.isArray(o)?e={...e,[i]:o.map(s=>pt(s)?sb(s,n):s)}:pt(o)&&(e={...e,[i]:sb(o,n)});return e}function RS(e,t){const n=t[e];return[Wc(t,[e]),n]}function wD(e,t={},n=[],i=xe(t,[Ft])){const o=e||"";let s;if(o.startsWith("#")){const c=decodeURIComponent(o.substring(1));i===void 0||Ft in t&&t[Ft]===i?s=Xy.get(t,c):t[Rc]===np&&(s=Ep(t,i.replace(/\/$/,"")),s!==void 0&&(s=Xy.get(s,c)))}else if(t[Rc]===np){const c=i?CS.resolve(i,o):o,[f,...d]=c.replace(/#\/?$/,"").split("#");s=Ep(t,f.replace(/\/$/,"")),s!==void 0&&(i=s[Ft],on(d)||(s=Xy.get(s,decodeURIComponent(d.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${e}.`);const u=s[Bt];if(u){if(n.includes(u)){if(n.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[m,...p]=n,y=[...p,o,m].join(" -> ");throw new Error(`Definition for ${m} contains a circular reference through ${y}`)}const[c,f]=RS(Bt,s),d=wD(f,t,[...n,o],i);return Object.keys(c).length>0?t[Rc]===XB||t[Rc]===np?{[To]:[c,d]}:{...c,...d}:d}return s}function ED(e,t={},n=xe(t,[Ft])){return wD(e,t,[],n)}var SV="[object String]";function Do(e){return typeof e=="string"||!Sn(e)&&Qr(e)&&Aa(e)==SV}function Fi(e){let t;const n=xe(e,QB);return Do(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function Xc(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}var _V=ru(function(e){return Ob(Ts(e,1,_a,!0))});function gi(e){let{type:t}=e;return!t&&e.const?Xc(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(n=>n!=="null"):t=t[0]),t)}function Ca(e,t){const n=Object.assign({},e);return Object.keys(t).reduce((i,o)=>{const s=e?e[o]:{},u=t[o];return e&&o in e&&at(u)?i[o]=Ca(s,u):e&&t&&(gi(e)==="object"||gi(t)==="object")&&o===YM&&Array.isArray(s)&&Array.isArray(u)?i[o]=_V(s,u):i[o]=u,i},n)}var wV="[object Number]";function xD(e){return typeof e=="number"||Qr(e)&&Aa(e)==wV}function CD(e,t,n){var i;if(e&&n){const o=xe(e,n);if(o===void 0)return;for(let s=0;s<t.length;s++){const u=t[s],c=xe(u,[bt,n],{});if(!(c.type==="object"||c.type==="array")&&(c.const===o||!((i=c.enum)===null||i===void 0)&&i.includes(o)))return s}}}function OS(e,t,n,i,o){if(t===void 0)return 0;const s=CD(t,n,o);if(xD(s))return s;for(let u=0;u<n.length;u++){const c=n[u];if(o&&ut(c,[bt,o])){const f=xe(t,o),d=xe(c,[bt,o],{});if(e.isValid(d,f,i))return u}else if(c[bt]){const f={anyOf:Object.keys(c[bt]).map(m=>({required:[m]}))};let d;if(c.anyOf){const{...m}=c;m.allOf?m.allOf=m.allOf.slice():m.allOf=[],m.allOf.push(f),d=m}else d=Object.assign({},c,f);if(delete d.required,e.isValid(d,t,i))return u}else if(e.isValid(c,t,i))return u}return 0}function In(e,t,n={},i,o,s=!1){return ji(e,t,n,i,void 0,void 0,o,s)[0]}function EV(e,t,n,i,o,s,u){const{if:c,then:f,else:d,...m}=t,p=e.isValid(c,s||{},n);let y=[m],S=[];if(i)f&&typeof f!="boolean"&&(S=S.concat(ji(e,f,n,s,i,o,u))),d&&typeof d!="boolean"&&(S=S.concat(ji(e,d,n,s,i,o,u)));else{const g=p?f:d;g&&typeof g!="boolean"&&(S=S.concat(ji(e,g,n,s,i,o,u)))}return S.length&&(y=S.map(g=>Ca(m,g))),y.flatMap(g=>ji(e,g,n,s,i,o,u))}function RD(e){return e.reduce((n,i)=>i.length>1?i.flatMap(o=>tD(n.length,s=>[...n[s]].concat(o))):(n.forEach(o=>o.push(i[0])),n),[[]])}function OD(e,t){return Object.keys(e.patternProperties).filter(n=>RegExp(n).test(t)).reduce((n,i)=>(Nt(n,[i],e.patternProperties[i]),n),{})}function xV(e,t,n,i,o,s,u,c){const f=AD(e,t,n,i,o,s,u,c);if(f.length>1||f[0]!==t)return f;if(pS in t)return $D(e,t,n,i,o,s,u).flatMap(m=>ji(e,m,n,s,i,o,u));if(To in t&&Array.isArray(t[To])){const d=t.allOf.map(p=>ji(e,p,n,s,i,o,u));return RD(d).map(p=>({...t,allOf:p}))}return[t]}function AD(e,t,n,i,o,s,u,c){const f=Nl(t,n,o,void 0,c);return f!==t?ji(e,f,n,s,i,o,u,c):[t]}function Nl(e,t,n,i,o){if(!at(e))return e;let s=e;if(Bt in s){const{$ref:u,...c}=s;if(n.includes(u))return s;n.push(u),s={...ED(u,t,i),...c},Ft in s&&(i=s[Ft])}if(bt in s){const u=[],c=h6(s[bt],(f,d,m)=>{const p=[...n];f[m]=Nl(d,t,p,i,o),u.push(p)},{});w6(n,cD(x6(u))),s={...s,[bt]:c}}if(Xl in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:Nl(s.items,t,n,i,o)}),o){let u,c;ht in e&&Array.isArray(e[ht])?(u=ht,c=s[ht]):Xe in e&&Array.isArray(e[Xe])&&(u=Xe,c=s[Xe]),u&&c&&(s={...s,[u]:c.map(f=>Nl(f,t,n,i,o))})}return Ut(e,s)?e:s}function CV(e,t,n,i,o){const s={...t,properties:{...t.properties}},u=i&&at(i)?i:{};return Object.keys(u).forEach(c=>{if(!(c in s.properties)){if(tb in s){const f=OD(s,c);if(!on(f)){s.properties[c]=In(e,{[To]:Object.values(f)},n,xe(u,[c]),o),Nt(s.properties,[c,xo],!0);return}}if(_p in s&&s.additionalProperties!==!1){let f;typeof s.additionalProperties!="boolean"?Bt in s.additionalProperties?f=In(e,{[Bt]:xe(s.additionalProperties,[Bt])},n,u,o):"type"in s.additionalProperties?f={...s.additionalProperties}:ht in s.additionalProperties||Xe in s.additionalProperties?f={type:"object",...s.additionalProperties}:f={type:Xc(xe(u,[c]))}:f={type:Xc(xe(u,[c]))},s.properties[c]=f,Nt(s.properties,[c,xo],!0)}else s.properties[c]={type:"null"},Nt(s.properties,[c,xo],!0)}}),s}const{compareSchemaDefinitions:RV,compareSchemaValues:OV}=q6(),{mergeArrayOfSchemaDefinitions:AV}=W6({intersectJson:P6(OV),deduplicateJsonSchemaDef:fD(RV)}),$V=J6(AV);function TV(e){return $V(e)}function ji(e,t,n,i,o=!1,s=[],u,c){return at(t)?xV(e,t,n,o,s,i,u,c).flatMap(d=>{var m;let p=d;if(mS in p)return EV(e,p,n,o,s,i,u);if(To in p){if(o){const{allOf:S,...g}=p;return[...S,g]}try{const S=[],g=[];(m=p.allOf)===null||m===void 0||m.forEach(b=>{typeof b=="object"&&b.contains?S.push(b):g.push(b)}),S.length&&(p={...p,allOf:g}),p=u?u(p):TV(p),S.length&&(p.allOf=S)}catch(S){console.warn(`could not merge subschemas in allOf:
|
|
121
|
-
`,S);const{allOf:g,...b}=p;return b}}return bt in p&&tb in p&&(p=Object.keys(p.properties).reduce((S,g)=>{const b=OD(S,g);return on(b)||(S.properties[g]=In(e,{allOf:[S.properties[g],...Object.values(b)]},n,xe(i,[g]),u)),S},{...p,properties:{...p.properties}})),tb in p||_p in p&&p.additionalProperties!==!1?CV(e,p,n,i,u):p}):[{}]}function MV(e,t,n,i,o){let s;const{oneOf:u,anyOf:c,...f}=t;if(Array.isArray(u)?s=u:Array.isArray(c)&&(s=c),s){const d=o===void 0&&i?{}:o,m=Fi(t);s=s.map(y=>Nl(y,n,[]));const p=OS(e,d,s,n,m);if(i)return s.map(y=>Ca(f,y));t=Ca(f,s[p])}return[t]}function $D(e,t,n,i,o,s,u){const{dependencies:c,...f}=t;return MV(e,f,n,i,s).flatMap(m=>TD(e,c,m,n,i,o,s,u))}function TD(e,t,n,i,o,s,u,c){let f=[n];for(const d in t){if(!o&&xe(u,[d])===void 0||n.properties&&!(d in n.properties))continue;const[m,p]=RS(d,t);return Array.isArray(p)?f[0]=DV(n,p):at(p)&&(f=jV(e,n,i,d,p,o,s,u,c)),f.flatMap(y=>TD(e,m,y,i,o,s,u,c))}return f}function DV(e,t){if(!t)return e;const n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function jV(e,t,n,i,o,s,u,c,f){return ji(e,o,n,c,s,u,f).flatMap(m=>{const{oneOf:p,...y}=m;if(t=Ca(t,y),p===void 0)return t;const S=p.map(b=>typeof b=="boolean"||!(Bt in b)?[b]:AD(e,b,n,s,u,c));return RD(S).flatMap(b=>NV(e,t,n,i,b,s,u,c,f))})}function NV(e,t,n,i,o,s,u,c,f){const d=o.filter(m=>{if(typeof m=="boolean"||!m||!m.properties)return!1;const{[i]:p}=m.properties;if(p){const y={type:"object",properties:{[i]:p}};return e.isValid(y,c,n)||s}return!1});return!s&&d.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):d.flatMap(m=>{const p=m,[y]=RS(i,p.properties),S={...p,properties:y};return ji(e,S,n,c,s,u,f).map(b=>Ca(t,b))})}function Ac(e,t,n,i,o,s={},u){if(Array.isArray(n[o])){const f=Fi(n)||i,d=n[o].map(p=>In(e,p,t,s,u)),m=xe(s,f);if(m!==void 0)return d.find(p=>di(xe(p,[bt,f,Wp],xe(p,[bt,f,Xr])),m))}}function MD(e,t,n,i,o){let s=n;if(ut(n,Bt)&&(s=In(e,n,t,void 0,o)),on(i))return s;const u=Array.isArray(i)?i:i.split("."),[c,...f]=u;if(c&&ut(s,c))return s=xe(s,c),MD(e,t,s,f,o)}function ip(e,t,n,i,o,s){const u=MD(e,t,n,i,s);return u===void 0?o:u}const tO={title:"!@#$_UNKNOWN_$#@!"};function PV(e,t,n,i,o={},s){const u=Array.isArray(i)?[...i]:i.split(".");let c=n;const f=u.pop();u.length&&u.forEach(y=>{c=ip(e,t,c,[bt,y],{},s),ut(c,Xe)?c=Ac(e,t,c,f,Xe,xe(o,y),s):ut(c,ht)&&(c=Ac(e,t,c,f,ht,xe(o,y),s))}),ut(c,Xe)?c=Ac(e,t,c,f,Xe,o,s):ut(c,ht)&&(c=Ac(e,t,c,f,ht,o,s));let d=ip(e,t,c,[bt,f],tO,s);d===tO&&(d=void 0);const m=ip(e,t,c,YM,[],s);let p;return d&&Array.isArray(m)&&(p=m.includes(f)),{field:d,isRequired:p}}function IV(e,t,n,i){var o=-1,s=e==null?0:e.length;for(i&&s&&(n=e[++o]);++o<s;)n=t(n,e[o],o,e);return n}function zV(e,t){return function(n,i){if(n==null)return n;if(!Ms(n))return e(n,i);for(var o=n.length,s=-1,u=Object(n);++s<o&&i(u[s],s,u)!==!1;);return n}}var DD=zV(iD);function FV(e,t,n,i,o){return o(e,function(s,u,c){n=i?(i=!1,s):t(n,s,u,c)}),n}function kV(e,t,n){var i=Sn(e)?IV:FV,o=arguments.length<3;return i(e,Pb(t),n,o,DD)}const LV={type:"object",$id:GB,properties:{__not_really_there__:{type:"number"}}};function lb(e,t,n,i,o){let s=0;return n&&(pt(n.properties)?s+=kV(n.properties,(u,c,f)=>{const d=xe(i,f);if(typeof c=="boolean")return u;if(ut(c,Bt)){const m=In(e,c,t,d,o);return u+lb(e,t,m,d||{},o)}if((ut(c,Xe)||ut(c,ht))&&d){const m=ut(c,Xe)?Xe:ht,p=Fi(c);return u+Jc(e,t,d,xe(c,m),-1,p,o)}if(c.type==="object")return pt(d)&&(u+=1),u+lb(e,t,c,d,o);if(c.type===Xc(d)){let m=u+1;return c.default?m+=d===c.default?1:-1:c.const&&(m+=d===c.const?1:-1),m}return u},0):Do(n.type)&&n.type===Xc(i)&&(s+=1)),s}function Jc(e,t,n,i,o=-1,s,u){const c=i.map(y=>Nl(y,t,[])),f=CD(n,i,s);if(xD(f))return f;const d=c.reduce((y,S,g)=>(OS(e,n,[LV,S],t,s)===1&&y.push(g),y),[]);if(d.length===1)return d[0];d.length||tD(c.length,y=>d.push(y));const m=new Set,{bestIndex:p}=d.reduce((y,S)=>{const{bestScore:g}=y,b=c[S],v=lb(e,t,b,n,u);return m.add(v),v>g?{bestIndex:S,bestScore:v}:y},{bestIndex:o,bestScore:0});return m.size===1&&o>=0?o:p}function AS(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>at(t))}function xp(e){return e==null}function Zc(e,t,n=!1,i=!1,o=!1){if(Array.isArray(t)){const s=Array.isArray(e)?e:[],u=o?s:t,c=o?t:s,f=u.map((d,m)=>c[m]!==void 0?Zc(s[m],t[m],n,i,o):d);return(n||o)&&f.length<c.length&&f.push(...c.slice(f.length)),f}if(at(t)){const s=Object.assign({},e);return Object.keys(t).reduce((u,c)=>{var f;const d=xe(t,c),m=at(e)&&c in e,p=c in t,y=(f=xe(e,c))!==null&&f!==void 0?f:{},S=m&&Object.entries(y).some(([,v])=>at(v)),g=m&&at(xe(e,c)),b=p&&at(d);return g&&b&&!S?(u[c]={...xe(e,c),...d},u):(u[c]=Zc(xe(e,c),d,n,i,o&&(m||!p)),u)},s)}return i&&(e!==void 0&&xp(t)||typeof t=="number"&&isNaN(t))||o&&!xp(t)?e:t}function ef(e,t,n=!1){return Object.keys(t).reduce((i,o)=>{const s=e?e[o]:{},u=t[o];if(e&&o in e&&at(u))i[o]=ef(s,u,n);else if(n&&Array.isArray(s)&&Array.isArray(u)){let c=u;n==="preventDuplicates"&&(c=u.reduce((f,d)=>(s.includes(d)||f.push(d),f),[])),i[o]=s.concat(c)}else i[o]=u;return i},Object.assign({},e))}function jD(e){return Array.isArray(e.enum)&&e.enum.length===1||Xr in e}function $S(e,t,n={},i){const o=In(e,t,n,void 0,i),s=o.oneOf||o.anyOf;return Array.isArray(o.enum)?!0:Array.isArray(s)?s.every(u=>typeof u!="boolean"&&jD(u)):!1}function TS(e,t,n,i){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:$S(e,t.items,n,i)}function ND(e){const t=e[Xr],n=gi(e);return at(t)&&Do(t==null?void 0:t.$data)&&n!=="object"&&n!=="array"}function qV(e){if(KB in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(Xr in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function Jl(e,t){if(e.enum){let s;if(t){const{enumNames:u}=Ue(t);s=u}return e.enum.map((u,c)=>({label:(s==null?void 0:s[c])||String(u),value:u}))}let n,i;e.anyOf?(n=e.anyOf,i=t==null?void 0:t.anyOf):e.oneOf&&(n=e.oneOf,i=t==null?void 0:t.oneOf);let o=Fi(e);if(t){const{optionsSchemaSelector:s=o}=Ue(t);o=s}return n&&n.map((s,u)=>{const{title:c}=Ue(i==null?void 0:i[u]),f=s;let d,m=c;if(o){const p=xe(f,[bt,o],{});d=xe(p,Wp,xe(p,Xr)),m=m||(p==null?void 0:p.title)||f.title||String(d)}else d=qV(f),m=m||f.title||String(d);return{schema:f,label:m,value:d}})}const UV=["string","number","integer","boolean","null"];var Zl;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(Zl||(Zl={}));function e0(e,t=Zl.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){const i=e.items[n];if(typeof i!="boolean")return i}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==Zl.Ignore&&at(e.additionalItems)?e.additionalItems:{}}function PD(e,t){const{default:n,type:i}=e;return Array.isArray(i)&&i.includes("null")&&on(t)&&n===null?null:t}function nO(e,t,n,i,o,s=[],u={},c=!1,f=!1){const{emptyObjectFields:d="populateAllDefaults"}=u;if(i===!0||c)e[t]=n;else if(i==="excludeObjectChildren")(f&&n!==void 0||!at(n)||!on(n))&&(e[t]=n);else if(d!=="skipDefaults"){const m=o===void 0?s.includes(t):o;at(n)?d==="skipEmptyDefaults"?on(n)||(e[t]=n):(!on(n)||s.includes(t))&&(m||d!=="populateRequiredDefaults")&&(e[t]=n):n!==void 0&&(d==="populateAllDefaults"||d==="skipEmptyDefaults"||m&&s.includes(t))&&(e[t]=n)}}function Ro(e,t,n={}){const{parentDefaults:i,rawFormData:o,rootSchema:s={},includeUndefinedValues:u=!1,_recurseList:c=[],experimental_defaultFormStateBehavior:f=void 0,experimental_customMergeAllOf:d=void 0,required:m,shouldMergeDefaultsIntoFormData:p=!1,initialDefaultsGenerated:y}=n;let S=at(o)?o:{};const g=at(t)?t:{};let b=i,v=null,_=f,x=c;if(g[Xr]!==void 0&&(f==null?void 0:f.constAsDefaults)!=="never"&&!ND(g))b=g[Xr];else if(at(b)&&at(g.default)&&!g[ht]&&!g[Xe]&&!g[Bt])b=ef(b,g.default);else if(Wp in g&&!g[ht]&&!g[Xe]&&!g[Bt])b=g.default;else if(Bt in g){const C=g[Bt];c.includes(C)||(x=c.concat(C),v=ED(C,s));const $=o===void 0||at(o)&&on(o);v&&!b&&$&&(b=g.default),p&&v&&!at(o)&&(S=o)}else if(pS in g){const C={...rO(e,g,n,b),...S};v=$D(e,g,s,!1,[],C,d)[0]}else if(AS(g))b=g.items.map((C,$)=>Ro(e,C,{rootSchema:s,includeUndefinedValues:u,_recurseList:c,experimental_defaultFormStateBehavior:f,experimental_customMergeAllOf:d,parentDefaults:Array.isArray(i)?i[$]:void 0,rawFormData:S,required:m,shouldMergeDefaultsIntoFormData:p}));else if(Xe in g){const{oneOf:C,...$}=g;if(C.length===0)return;const A=Fi(g),{type:T="null"}=$;!Array.isArray(T)&&UV.includes(T)&&(_==null?void 0:_.constAsDefaults)==="skipOneOf"&&(_={..._,constAsDefaults:"never"}),v=C[Jc(e,s,o??g.default,C,0,A,d)],v=Ca($,v)}else if(ht in g){const{anyOf:C,...$}=g;if(C.length===0)return;const A=Fi(g);v=C[Jc(e,s,o??g.default,C,0,A,d)],v=Ca($,v)}if(v)return Ro(e,v,{rootSchema:s,includeUndefinedValues:u,_recurseList:x,experimental_defaultFormStateBehavior:_,experimental_customMergeAllOf:d,parentDefaults:b,rawFormData:o??S,required:m,shouldMergeDefaultsIntoFormData:p,initialDefaultsGenerated:y});b===void 0&&(b=g.default);const E=rO(e,g,n,b);let R=E??b;if(p){const{arrayMinItems:C={}}=f||{},{mergeExtraDefaults:$}=C,A=BV(e,g,s,o,f,d);(!at(o)||To in g)&&(R=Zc(R,A,$,!0))}return R}function BV(e,t,n,i,o,s){const u=!jD(t)&&$S(e,t,n,s);let c=i;if(u){const d=Jl(t);c=(d==null?void 0:d.some(p=>Ut(p.value,i)))?i:void 0}return t[Xr]&&(o==null?void 0:o.constAsDefaults)==="always"&&(c=t.const),c}function VV(e,t,{rawFormData:n,rootSchema:i={},includeUndefinedValues:o=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:u=void 0,experimental_customMergeAllOf:c=void 0,required:f,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:m}={},p){{const y=at(n)?n:{},S=t,b=(u==null?void 0:u.allOf)==="populateDefaults"&&To in S||(u==null?void 0:u.emptyObjectFields)!=="skipEmptyDefaults"&&mS in S?In(e,S,i,y,c):S,v=b[Xr],_=Object.keys(b.properties||{}).reduce((x,E)=>{var R;const C=xe(b,[bt,E],{}),$=at(v)&&v[E]!==void 0,A=(at(C)&&Xr in C||$)&&(u==null?void 0:u.constAsDefaults)!=="never"&&!ND(C),T=Ro(e,C,{rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:u,experimental_customMergeAllOf:c,includeUndefinedValues:o===!0,parentDefaults:xe(p,[E]),rawFormData:xe(y,[E]),required:(R=b.required)===null||R===void 0?void 0:R.includes(E),shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:m});return nO(x,E,T,o,f,b.required,u,A,(C==null?void 0:C.type)==="null"),x},{});if(b.additionalProperties&&!m){const x=at(b.additionalProperties)?b.additionalProperties:{},E=new Set;at(p)&&Object.keys(p).filter(C=>!b.properties||!b.properties[C]).forEach(C=>E.add(C));const R=[];Object.keys(y).filter(C=>!b.properties||!b.properties[C]).forEach(C=>{E.add(C),R.push(C)}),E.forEach(C=>{var $;const A=Ro(e,x,{rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:u,experimental_customMergeAllOf:c,includeUndefinedValues:o===!0,parentDefaults:xe(p,[C]),rawFormData:xe(y,[C]),required:($=b.required)===null||$===void 0?void 0:$.includes(C),shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:m});nO(_,C,A,o,f,R)})}return PD(t,_)}}function HV(e,t,{rawFormData:n,rootSchema:i={},_recurseList:o=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:u=void 0,required:c,requiredAsRoot:f=!1,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:m}={},p){var y,S;const g=t,b=(y=s==null?void 0:s.arrayMinItems)!==null&&y!==void 0?y:{},{populate:v,mergeExtraDefaults:_}=b,x=v==="never",E=v==="requiredOnly",R=v==="all"||!x&&!E,C=(S=b==null?void 0:b.computeSkipPopulate)!==null&&S!==void 0?S:(()=>!1),A=(s==null?void 0:s.emptyObjectFields)==="skipEmptyDefaults"?void 0:[];if(Array.isArray(p)&&(p=p.map((j,I)=>{const L=e0(g,Zl.Fallback,I),K=Array.isArray(n)?n[I]:void 0;return Ro(e,L,{rootSchema:i,_recurseList:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:u,parentDefaults:j,rawFormData:K,required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:m})})),Array.isArray(n)){const j=e0(g);if(x)p=n;else{const I=n.map((K,G)=>Ro(e,j,{rootSchema:i,_recurseList:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:u,rawFormData:K,parentDefaults:xe(p,[G]),required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:m}));p=Zc(p,I,(E&&c||R)&&_)}}if((at(g)&&Xr in g&&(s==null?void 0:s.constAsDefaults)!=="never")===!1){if(x)return p??A;if(E&&!c)return p||void 0}let M;const D=Array.isArray(p)?p.length:0;if(!g.minItems||TS(e,g,i,u)||C(e,g,i)||g.minItems<=D)M=p||!c&&!f?p:A;else{const j=p||[],I=e0(g,Zl.Invert),L=I.default,K=Array.from({length:g.minItems-D},()=>Ro(e,I,{parentDefaults:L,rootSchema:i,_recurseList:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:u,required:c,shouldMergeDefaultsIntoFormData:d}));M=j.concat(K)}return PD(t,M)}function rO(e,t,n={},i){switch(gi(t)){case"object":return VV(e,t,n,i);case"array":return HV(e,t,n,i)}}function ID(e,t,n,i,o=!1,s,u,c){if(!at(t))throw new Error("Invalid schema: "+t);const f=In(e,t,i,n,u),d=Ro(e,f,{rootSchema:i,includeUndefinedValues:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:u,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:c,requiredAsRoot:!0});if(f.type!=="object"&&at(f.default))return{...d,...n};if(at(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:m}=s||{};return Zc(d,n,!0,m==="useDefaultIfFormDataUndefined",!0)}return d}function zD(e={}){return"widget"in Ue(e)&&Ue(e).widget!=="hidden"}function FD(e,t,n={},i,o){if(n[vS]==="files")return!0;if(t.items){const s=In(e,t.items,i,void 0,o);return s.type==="string"&&s.format==="data-url"}return!1}function KV(e,t,n={},i,o,s){const u=Ue(n,o),{label:c=!0}=u;let f=!!c;if(f){const d=gi(t),m=xe(t,xo,!1);d==="array"&&(f=m||TS(e,t,i,s)||FD(e,t,n,i,s)||zD(n)),d==="object"&&(f=m),d==="boolean"&&n&&!n[vS]&&(f=!1),n&&n[WB]&&(f=!1)}return f}function kD(e,t,n){for(var i=-1,o=t.length,s={};++i<o;){var u=t[i],c=Fp(e,u);n(c,u)&&SS(s,au(u,e),c)}return s}function GV(e,t){return kD(e,t,function(n,i){return cT(e,i)})}var LD=bD(function(e,t){return e==null?{}:GV(e,t)});function us(e,t,n,i,o,s=[],u){if(Bt in t||pS in t||To in t||mS in t){const f=In(e,t,i,o,u);if(s.findIndex(m=>Ut(m,f))===-1)return us(e,f,n,i,o,s.concat(f),u)}let c={[tp]:n.replace(/^\./,"")};if(Xe in t||ht in t){const f=Xe in t?t.oneOf:t.anyOf,d=Fi(t),m=Jc(e,i,o,f,0,d,u),p=f[m];c={...c,...us(e,p,n,i,o,s,u)}}if(_p in t&&t[_p]!==!1&&Nt(c,gS,!0),Xl in t&&Array.isArray(o)){const{items:f,additionalItems:d}=t;Array.isArray(f)?o.forEach((m,p)=>{f[p]?c[p]=us(e,f[p],`${n}.${p}`,i,m,s,u):d?c[p]=us(e,d,`${n}.${p}`,i,m,s,u):console.warn(`Unable to generate path schema for "${n}.${p}". No schema defined for it`)}):o.forEach((m,p)=>{c[p]=us(e,f,`${n}.${p}`,i,m,s,u)})}else if(bt in t)for(const f in t.properties){const d=xe(t,[bt,f],{});c[f]=us(e,d,`${n}.${f}`,i,xe(o,[f]),s,u)}return c}function qD(e,t,n="",i,o,s){return us(e,t,n,i,o,void 0,s)}function UD(e,t){if(t.length===0&&typeof e!="object")return e;const n=LD(e,t);return Array.isArray(e)?Object.keys(n).map(i=>n[i]):n}function BD(e,t){const n=(o,s)=>typeof o!="object"||on(o)||s&&!on(o),i=(o,s=[],u=[[]])=>{const c=Object.keys(o);return c.forEach(f=>{const d=o[f];if(typeof d=="object"){const m=u.map(p=>[...p,f]);d[gS]&&d[tp]!==""?s.push(d[tp]):i(d,s,m)}else f===tp&&d!==""&&u.forEach(m=>{const p=xe(t,m),y=c.length===1;(n(p,y)||Array.isArray(p)&&p.every(S=>n(S,y)))&&s.push(m)})}),s};return i(e)}function QV(e,t,n={},i){const o=In(e,t,n,i),s=qD(e,o,"",n,i),c=BD(s,i).map(f=>Array.isArray(f)?f.join("."):f);return UD(i,c)}const Cl=Symbol("no Value");function ub(e,t,n,i,o={},s){let u;if(ut(n,bt)){const c={};if(ut(i,bt)){const m=xe(i,bt,{});Object.keys(m).forEach(p=>{ut(o,p)&&(c[p]=void 0)})}const f=Object.keys(xe(n,bt,{})),d={};f.forEach(m=>{const p=xe(o,m);let y=xe(i,[bt,m],{}),S=xe(n,[bt,m],{});ut(y,Bt)&&(y=In(e,y,t,p,s)),ut(S,Bt)&&(S=In(e,S,t,p,s));const g=xe(y,"type"),b=xe(S,"type");if(!g||g===b)if(ut(c,m)&&delete c[m],b==="object"||b==="array"&&Array.isArray(p)){const v=ub(e,t,S,y,p,s);(v!==void 0||b==="array")&&(d[m]=v)}else{const v=xe(S,"default",Cl),_=xe(y,"default",Cl);v!==Cl&&v!==p&&(_===p?c[m]=v:xe(S,"readOnly")===!0&&(c[m]=void 0));const x=xe(S,"const",Cl),E=xe(y,"const",Cl);x!==Cl&&x!==p&&(c[m]=E===p?x:void 0)}}),u={...typeof o=="string"||Array.isArray(o)?void 0:o,...c,...d}}else if(xe(i,"type")==="array"&&xe(n,"type")==="array"&&Array.isArray(o)){let c=xe(i,"items"),f=xe(n,"items");if(typeof c=="object"&&typeof f=="object"&&!Array.isArray(c)&&!Array.isArray(f)){ut(c,Bt)&&(c=In(e,c,t,o,s)),ut(f,Bt)&&(f=In(e,f,t,o,s));const d=xe(c,"type"),m=xe(f,"type");if(!d||d===m){const p=xe(n,"maxItems",-1);m==="object"?u=o.reduce((y,S)=>{const g=ub(e,t,f,c,S,s);return g!==void 0&&(p<0||y.length<p)&&y.push(g),y},[]):u=p>0&&o.length>p?o.slice(0,p):o}}else typeof c=="boolean"&&typeof f=="boolean"&&c===f&&(u=o)}return u}class YV{constructor(t,n,i,o){n&&n[Rc]===np?this.rootSchema=sb(n,xe(n,Ft,"#")):this.rootSchema=n,this.validator=t,this.experimental_defaultFormStateBehavior=i,this.experimental_customMergeAllOf=o}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,n,i={},o){return!t||!n?!1:this.validator!==t||!Ut(this.rootSchema,n)||!Ut(this.experimental_defaultFormStateBehavior,i)||this.experimental_customMergeAllOf!==o}findFieldInSchema(t,n,i){return PV(this.validator,this.rootSchema,t,n,i,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,n,i,o){return Ac(this.validator,this.rootSchema,t,n,i,o,this.experimental_customMergeAllOf)}getDefaultFormState(t,n,i=!1,o){return ID(this.validator,t,n,this.rootSchema,i,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,o)}getDisplayLabel(t,n,i){return KV(this.validator,t,n,this.rootSchema,i,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,n,i,o){return Jc(this.validator,this.rootSchema,t,n,i,o,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,n,i){return OS(this.validator,t,n,this.rootSchema,i)}getFromSchema(t,n,i){return ip(this.validator,this.rootSchema,t,n,i,this.experimental_customMergeAllOf)}isFilesArray(t,n){return FD(this.validator,t,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return TS(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return $S(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(t,n){return QV(this.validator,t,this.rootSchema,n)}retrieveSchema(t,n,i){return In(this.validator,t,this.rootSchema,n,this.experimental_customMergeAllOf,i)}sanitizeDataForNewSchema(t,n,i){return ub(this.validator,this.rootSchema,t,n,i,this.experimental_customMergeAllOf)}toPathSchema(t,n,i){return qD(this.validator,t,n,this.rootSchema,i,this.experimental_customMergeAllOf)}}function WV(e,t,n={},i){return new YV(e,t,n,i)}function XV(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const i=e.slice(5).split(";base64,");if(i.length!==2)throw new Error("File is invalid: dataURI must be base64");const[o,s]=i,[u,...c]=o.split(";"),f=u||"",d=decodeURI(((t=c.map(m=>m.split("=")).find(([m])=>m==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const m=atob(s),p=new Array(m.length);for(let S=0;S<m.length;S++)p[S]=m.charCodeAt(S);return{blob:new window.Blob([new Uint8Array(p)],{type:f}),name:d}}catch(m){throw new Error("File is invalid: "+m.message)}}function so(e,t){let n=String(e);for(;n.length<t;)n="0"+n;return n}function VD(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return VD(t,e).reverse();const n=[];for(let i=e;i<=t;i++)n.push({value:i,label:so(i,2)});return n}function iO(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(let o=0;o<n.length;o++){const s=n[o];if(!Object.prototype.hasOwnProperty.call(t,s)||!Object.is(e[s],t[s]))return!1}return!0}function JV(e,t){let n=e;if(Array.isArray(t)){const i=n.split(/(%\d)/);t.forEach((o,s)=>{const u=i.findIndex(c=>c===`%${s+1}`);u>=0&&(i[u]=o)}),n=i.join("")}return n}function ZV(e,t){return JV(e,t)}function Ii(e,t=[],n){if(Array.isArray(e))return e.map(s=>Ii(s,t)).filter(s=>s!==n);const i=e===""||e===null?-1:Number(e),o=t[i];return o?o.value:n}function e8(e,t,n=[]){const i=Ii(e,n);return Array.isArray(t)?t.filter(o=>!Ut(o,i)):Ut(i,t)?void 0:t}function MS(e,t){return Array.isArray(t)?t.some(n=>Ut(n,e)):Ut(t,e)}function t8(e,t=[],n=!1){const i=t.map((o,s)=>MS(o.value,e)?String(s):void 0).filter(o=>typeof o<"u");return n?i:i[0]}function n8(e,t,n=[]){const i=Ii(e,n);if(!xp(i)){const o=n.findIndex(c=>i===c.value),s=n.map(({value:c})=>c);return t.slice(0,o).concat(i,t.slice(o)).sort((c,f)=>+(s.indexOf(c)>s.indexOf(f)))}return t}var r8=1,i8=4;function DS(e){return Pc(e,r8|i8)}function a8(e,t,n,i){return i=typeof i=="function"?i:void 0,e==null?e:SS(e,t,n,i)}class HD{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let i=Array.isArray(t)&&t.length>0||typeof t=="string"?xe(this.errorSchema,t):this.errorSchema;return!i&&t&&(i={},a8(this.errorSchema,t,i,Object)),i}resetAllErrors(t){return this.errorSchema=t?DS(t):{},this}addErrors(t,n){const i=this.getOrCreateErrorBlock(n);let o=xe(i,Pn);return Array.isArray(o)||(o=[],i[Pn]=o),Array.isArray(t)?Nt(i,Pn,[...new Set([...o,...t])]):Nt(i,Pn,[...new Set([...o,t])]),this}setErrors(t,n){const i=this.getOrCreateErrorBlock(n),o=Array.isArray(t)?[...new Set([...t])]:[t];return Nt(i,Pn,o),this}clearErrors(t){const n=this.getOrCreateErrorBlock(t);return Nt(n,Pn,[]),this}}function o8(e,t){if(e==null)return{};var n=nu(xS(e),function(i){return[i]});return t=Pb(t),kD(e,n,function(i,o){return t(i,o[0])})}var s8=ru(function(e,t){return _a(e)?N$(e,Ts(t,1,_a,!0)):[]});function aO(e,t){const n=Mo(e),i=Mo(t);if(e===t||!n&&!i)return[];if(n&&!i)return ci(e);if(!n&&i)return ci(t);{const o=ci(o8(e,(u,c)=>!Ut(u,xe(t,c)))),s=s8(ci(t),ci(e));return[...o,...s]}}function l8(e,t,n=[1900,new Date().getFullYear()+2],i="YMD"){const{day:o,month:s,year:u,hour:c,minute:f,second:d}=e,m={type:"day",range:[1,31],value:o},p={type:"month",range:[1,12],value:s},y={type:"year",range:n,value:u},S=[];switch(i){case"MDY":S.push(p,m,y);break;case"DMY":S.push(m,p,y);break;case"YMD":default:S.push(y,p,m)}return t&&S.push({type:"hour",range:[0,23],value:c},{type:"minute",range:[0,59],value:f},{type:"second",range:[0,59],value:d}),S}function u8(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function c8(e,t,n={},i=!0){const o={type:t||"text",...u8(e)};return n.inputType?o.type=n.inputType:t||(e.type==="number"?(o.type="number",i&&o.step===void 0&&(o.step="any")):e.type==="integer"&&(o.type="number",o.step===void 0&&(o.step=1))),n.autocomplete&&(o.autoComplete=n.autocomplete),n.accept&&(o.accept=n.accept),o}const oO={props:{disabled:!1},submitText:"Submit",norender:!1};function f8(e={}){const t=Ue(e);if(t&&t[wp]){const n=t[wp];return{...oO,...n}}return oO}function Qe(e,t,n={}){const{templates:i}=t;if(e==="ButtonTemplates")return i[e];if(Object.hasOwn(n,e)&&typeof n[e]=="string"&&Object.hasOwn(i,n[e])){const o=n[e];return i[o]}return n[e]||i[e]}var d8=0;function KD(e){var t=++d8;return Nb(e)+t}function jS(){if(typeof process>"u"||xe(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,KD("test-id-")),e.get(n)}})}var t0={exports:{}},Rt={};/**
|
|
122
|
-
* @license React
|
|
123
|
-
* react-is.production.min.js
|
|
124
|
-
*
|
|
125
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
126
|
-
*
|
|
127
|
-
* This source code is licensed under the MIT license found in the
|
|
128
|
-
* LICENSE file in the root directory of this source tree.
|
|
129
|
-
*/var sO;function h8(){if(sO)return Rt;sO=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function b(v){if(typeof v=="object"&&v!==null){var _=v.$$typeof;switch(_){case e:switch(v=v.type,v){case n:case o:case i:case d:case m:return v;default:switch(v=v&&v.$$typeof,v){case c:case u:case f:case y:case p:case s:return v;default:return _}}case t:return _}}}return Rt.ContextConsumer=u,Rt.ContextProvider=s,Rt.Element=e,Rt.ForwardRef=f,Rt.Fragment=n,Rt.Lazy=y,Rt.Memo=p,Rt.Portal=t,Rt.Profiler=o,Rt.StrictMode=i,Rt.Suspense=d,Rt.SuspenseList=m,Rt.isAsyncMode=function(){return!1},Rt.isConcurrentMode=function(){return!1},Rt.isContextConsumer=function(v){return b(v)===u},Rt.isContextProvider=function(v){return b(v)===s},Rt.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},Rt.isForwardRef=function(v){return b(v)===f},Rt.isFragment=function(v){return b(v)===n},Rt.isLazy=function(v){return b(v)===y},Rt.isMemo=function(v){return b(v)===p},Rt.isPortal=function(v){return b(v)===t},Rt.isProfiler=function(v){return b(v)===o},Rt.isStrictMode=function(v){return b(v)===i},Rt.isSuspense=function(v){return b(v)===d},Rt.isSuspenseList=function(v){return b(v)===m},Rt.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===n||v===o||v===i||v===d||v===m||v===S||typeof v=="object"&&v!==null&&(v.$$typeof===y||v.$$typeof===p||v.$$typeof===s||v.$$typeof===u||v.$$typeof===f||v.$$typeof===g||v.getModuleId!==void 0)},Rt.typeOf=b,Rt}var lO;function p8(){return lO||(lO=1,t0.exports=h8()),t0.exports}var m8=p8();const uO=Ra(m8),n0={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function g8(e){let t=xe(e,"MergedWidget");if(!t){const n=e.defaultProps&&e.defaultProps.options||{};t=({options:i,...o})=>N.jsx(e,{options:{...n,...i},...o}),Nt(e,"MergedWidget",t)}return t}function ki(e,t,n={}){const i=gi(e);if(typeof t=="function"||t&&uO.isForwardRef(z.createElement(t))||uO.isMemo(t))return g8(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in n){const o=n[t];return ki(e,o,n)}if(typeof i=="string"){if(!(i in n0))throw new Error(`No widget for type '${i}' in schema: ${JSON.stringify(e)}`);if(t in n0[i]){const o=n[n0[i][t]];return ki(e,o,n)}}throw new Error(`No widget '${t}' for type '${i}' in schema: ${JSON.stringify(e)}`)}function v8(e){let t=0;for(let n=0;n<e.length;n+=1){const i=e.charCodeAt(n);t=(t<<5)-t+i,t=t&t}return t.toString(16)}function y8(e){const t=new Set;return JSON.stringify(e,(n,i)=>(t.add(n),i)),JSON.stringify(e,Array.from(t).sort())}function Ni(e){return v8(y8(e))}function b8(e){return Ni(e)}function S8(e,t,n={}){try{return ki(e,t,n),!0}catch(i){const o=i;if(o.message&&(o.message.startsWith("No widget")||o.message.startsWith("Unsupported widget")))return!1;throw i}}function Is(e,t){return`${Do(e)?e:e[Ft]}__${t}`}function Of(e){return Is(e,"description")}function GD(e){return Is(e,"error")}function cb(e){return Is(e,"examples")}function QD(e){return Is(e,"help")}function NS(e){return Is(e,"title")}function zs(e,t=!1){const n=t?` ${cb(e)}`:"";return`${GD(e)} ${Of(e)} ${QD(e)}${n}`}function YD(e,t){return`${e}-${t}`}function hs(e,t){return Is(e,t)}function r0(e,t){return Is(e,`optional${t}`)}function yu(e){return!xp(e)&&(!pt(e)||Array.isArray(e)||!on(e))}function _8(e,t){const{rootSchema:n,schemaUtils:i}=e;if(di(t,n))return!0;if(Bt in n){const o=i.retrieveSchema(n);return di(t,o)}return!1}function w8(e,t,n){return t?n:e}function E8(e){return e?new Date(e).toJSON():void 0}function PS(e,t,n){const i=[YB];return ut(e,jR)&&i.unshift(jR),xe(e,[...i,t],n)}function x8(e,t){if(!Array.isArray(t))return e;const n=m=>m.reduce((p,y)=>(p[y]=!0,p),{}),i=m=>m.length>1?`properties '${m.join("', '")}'`:`property '${m[0]}'`,o=n(e),s=t.filter(m=>m==="*"||o[m]),u=n(s),c=e.filter(m=>!u[m]),f=s.indexOf("*");if(f===-1){if(c.length)throw new Error(`uiSchema order list does not contain ${i(c)}`);return s}if(f!==s.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const d=[...s];return d.splice(f,1,...c),d}function i0(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error("Unable to parse date "+e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}function ap(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return ap(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return ap(e.oneOf[0]);if(e.allOf){const t=n=>ap(n);return e.allOf.some(t)}return!1}function WD(e,t,n,i="customDeep"){if(i==="always")return!0;if(i==="shallow"){const{props:u,state:c}=e;return!iO(u,t)||!iO(c,n)}const{props:o,state:s}=e;return!Ut(o,t)||!Ut(s,n)}function cO(e){const t=cD(e.map(n=>pt(n)?gi(n):void 0).flat().filter(n=>n!==void 0));return t.length===1?t[0]:t}function Af(e,t,n,i){const{enableOptionalDataFieldForType:o=[]}=Ue(i,e.globalUiOptions);let s;return ht in t&&Array.isArray(t[ht])?s=cO(t[ht]):Xe in t&&Array.isArray(t[Xe])?s=cO(t[Xe]):s=gi(t),!_8(e,t)&&!n&&!!s&&!Array.isArray(s)&&!!o.find(u=>u===s)}function fO(e,t=!0){const{year:n,month:i,day:o,hour:s=0,minute:u=0,second:c=0}=e,f=Date.UTC(n,i-1,o,s,u,c),d=new Date(f).toJSON();return t?d:d.slice(0,10)}function IS(e,t=[]){if(!e)return[];let n=[];return Pn in e&&(n=n.concat(e[Pn].map(i=>{const o=`.${t.join(".")}`;return{property:o,message:i,stack:`${o} ${i}`}}))),Object.keys(e).reduce((i,o)=>{if(o!==Pn){const s=e[o];Mo(s)&&(i=i.concat(IS(s,[...t,o])))}return i},n)}function XD(e){return Sn(e)?nu(e,Ds):ff(e)?[e]:ES(aT(Nb(e)))}function C8(e){const t=new HD;return e.length&&e.forEach(n=>{const{property:i,message:o}=n,s=i==="."?[]:XD(i);s.length>0&&s[0]===""&&s.splice(0,1),o&&t.addErrors(o,s)}),t.ErrorSchema}function Jr(e,t,n,i){const o=Array.isArray(n)?n:n==null?void 0:n.path,s=e===""?[]:[e],u=o?o.concat(...s):s,c=[t.idPrefix,...u].join(t.idSeparator);let f;return t.nameGenerator&&u.length>0&&(f=t.nameGenerator(u,t.idPrefix,i)),{path:u,[Ft]:c,...f!==void 0&&{name:f}}}function JD(e){return Object.keys(e).reduce((t,n)=>{if(n==="addError")return t;{const i=e[n];return Mo(i)?{...t,[n]:JD(i)}:{...t,[n]:i}}},{})}function R8(e){return Object.values(e).every(t=>t!==-1)}function O8(e){const{className:t="form-control",type:n,range:i,value:o,select:s,rootId:u,name:c,disabled:f,readonly:d,autofocus:m,registry:p,onBlur:y,onFocus:S}=e,g=`${u}_${n}`,{SelectWidget:b}=p.widgets,v=z.useCallback(_=>s(n,_),[s,n]);return N.jsx(b,{schema:{type:"integer"},id:g,name:c,className:t,options:{enumOptions:VD(i[0],i[1])},placeholder:n,value:o,disabled:f,readonly:d,autofocus:m,onChange:v,onBlur:y,onFocus:S,registry:p,label:"","aria-describedby":zs(u)})}function A8(e){const{time:t=!1,disabled:n=!1,readonly:i=!1,options:o,onChange:s,value:u}=e,[c,f]=z.useState(i0(u,t));z.useEffect(()=>{f(i0(u,t))},[t,u]);const d=z.useCallback((S,g)=>{const b={...c,[S]:typeof g>"u"?-1:g};R8(b)?s(fO(b,t)):f(b)},[c,s,t]),m=z.useCallback(S=>{S.preventDefault(),!(n||i)&&s(void 0)},[n,i,s]),p=z.useCallback(S=>{if(S.preventDefault(),n||i)return;const g=i0(new Date().toJSON(),t);s(fO(g,t))},[n,i,t,s]);return{elements:z.useMemo(()=>l8(c,t,o.yearsRange,o.format),[c,t,o.yearsRange,o.format]),handleChange:d,handleClear:m,handleSetNow:p}}function Fs(e){const t=z.useRef(e);return di(e,t.current)||(t.current=e),t.current}function $8(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function T8(e){const{name:t,size:n,type:i}=e;return new Promise((o,s)=>{const u=new window.FileReader;u.onerror=s,u.onload=c=>{var f;typeof((f=c.target)===null||f===void 0?void 0:f.result)=="string"?o({dataURL:$8(c.target.result,t),name:t,size:n,type:i}):o({dataURL:null,name:t,size:n,type:i})},u.readAsDataURL(e)})}function M8(e){return Promise.all(Array.from(e).map(T8))}function dO(e){return e.reduce((t,n)=>{if(!n)return t;try{const{blob:i,name:o}=XV(n);return[...t,{dataURL:n,name:o,size:i.size,type:i.type}]}catch{return t}},[])}function D8(e,t,n=!1){const i=z.useMemo(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]),o=z.useMemo(()=>Array.isArray(e)?dO(e):dO([e||""]),[e]),s=z.useCallback(c=>{M8(c).then(f=>{const d=f.map(m=>m.dataURL||null);t(n?i.concat(...d):d[0])})},[i,n,t]),u=z.useCallback(c=>{if(n){const f=i.filter((d,m)=>m!==c);t(f)}else t(void 0)},[i,n,t]);return{filesInfo:o,handleChange:s,handleRemove:u}}function j8(e){if(!e)return"";const t=new Date(e),n=so(t.getFullYear(),4),i=so(t.getMonth()+1,2),o=so(t.getDate(),2),s=so(t.getHours(),2),u=so(t.getMinutes(),2),c=so(t.getSeconds(),2),f=so(t.getMilliseconds(),3);return`${n}-${i}-${o}T${s}:${u}:${c}.${f}`}function op(e,t,n=!1){if(!t)return e;const{errors:i,errorSchema:o}=e;let s=IS(t),u=t;return on(o)||(u=ef(o,t,n?"preventDuplicates":!0),s=[...i].concat(s)),{errorSchema:u,errors:s}}function N8(e){for(const t in e){const n=e,i=n[t];t===Bt&&typeof i=="string"&&i.startsWith("#")?n[t]=JM+i:n[t]=zS(i)}return e}function P8(e){for(let t=0;t<e.length;t++)e[t]=zS(e[t]);return e}function zS(e){return Array.isArray(e)?P8([...e]):pt(e)?N8({...e}):e}var St;(function(e){e.ArrayItemTitle="Item",e.MissingItems="Missing items definition",e.EmptyArray="No items yet. Use the button below to add some.",e.YesLabel="Yes",e.NoLabel="No",e.CloseLabel="Close",e.ErrorsLabel="Errors",e.NewStringDefault="New Value",e.AddButton="Add",e.AddItemButton="Add Item",e.CopyButton="Copy",e.MoveDownButton="Move down",e.MoveUpButton="Move up",e.RemoveButton="Remove",e.NowLabel="Now",e.ClearLabel="Clear",e.AriaDateLabel="Select a date",e.PreviewLabel="Preview",e.DecrementAriaLabel="Decrease value by 1",e.IncrementAriaLabel="Increase value by 1",e.OptionalObjectAdd="Add data for optional field",e.OptionalObjectRemove="Remove data for optional field",e.OptionalObjectEmptyMsg="No data for optional field",e.Type="Type",e.Value="Value",e.ClearButton="clear input",e.UnknownFieldType="Unknown field type %1",e.OptionPrefix="Option %1",e.TitleOptionPrefix="%1 option %2",e.KeyLabel="%1 Key",e.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',e.UnsupportedField="Unsupported field schema.",e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo="**%1** (%2, %3 bytes)"})(St||(St={}));function I8(e,t){var n=Sn(e)?_S:DD;return n(e,eD(t))}function z8(e,t){return e==null?!0:yD(e,t)}function fb(){return KD("rjsf-array-item-")}function hO(e){return Array.isArray(e)?e.map(t=>({key:fb(),item:t})):[]}function ZD(e){return Array.isArray(e)?e.map(t=>t.item):[]}function F8(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function ej(e,t,n,i){let{addable:o}=Ue(i,e.globalUiOptions);return o!==!1&&(t.maxItems!==void 0?o=n.length<t.maxItems:o=!0),o}function tj(e,t,n,i){if(typeof e.items=="function")try{return e.items(t,n,i)}catch(o){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,o);return}else return e.items}function k8(e,t){const{schemaUtils:n,globalFormOptions:i}=e;let o=t.items;return i.useFallbackUiForUnsupportedType&&!o?o={}:AS(t)&&HB(t)&&(o=t.additionalItems),n.getDefaultFormState(o)}function L8(e){const{schema:t,fieldPathId:n,uiSchema:i,formData:o=[],disabled:s=!1,readonly:u=!1,autofocus:c=!1,required:f=!1,placeholder:d,onBlur:m,onFocus:p,registry:y,rawErrors:S,name:g,onSelectChange:b}=e,{widgets:v,schemaUtils:_,globalFormOptions:x,globalUiOptions:E}=y,R=_.retrieveSchema(t.items,o),C=Jl(R,i),{widget:$="select",title:A,...T}=Ue(i,E),M=ki(t,$,v),D=A??t.title??g,j=_.getDisplayLabel(t,i,E),I=Fs(Jr("",x,n,!0));return N.jsx(M,{id:I[Ft],name:g,multiple:!0,onChange:b,onBlur:m,onFocus:p,options:{...T,enumOptions:C},schema:t,uiSchema:i,registry:y,value:o,disabled:s,readonly:u,required:f,label:D,hideLabel:!j,placeholder:d,autofocus:c,rawErrors:S,htmlName:I.name})}function q8(e){const{schema:t,fieldPathId:n,uiSchema:i,disabled:o=!1,readonly:s=!1,autofocus:u=!1,required:c=!1,hideError:f,placeholder:d,onBlur:m,onFocus:p,formData:y=[],registry:S,rawErrors:g,name:b,onSelectChange:v}=e,{widgets:_,schemaUtils:x,globalFormOptions:E,globalUiOptions:R}=S,{widget:C,title:$,...A}=Ue(i,R),T=ki(t,C,_),M=$??t.title??b,D=x.getDisplayLabel(t,i,R),j=Fs(Jr("",E,n,!0));return N.jsx(T,{id:j[Ft],name:b,multiple:!0,onChange:v,onBlur:m,onFocus:p,options:A,schema:t,uiSchema:i,registry:S,value:y,disabled:o,readonly:s,hideError:f,required:c,label:M,hideLabel:!D,placeholder:d,autofocus:u,rawErrors:g,htmlName:j.name})}function U8(e){const{schema:t,uiSchema:n,fieldPathId:i,name:o,disabled:s=!1,readonly:u=!1,autofocus:c=!1,required:f=!1,onBlur:d,onFocus:m,registry:p,formData:y=[],rawErrors:S,onSelectChange:g}=e,{widgets:b,schemaUtils:v,globalFormOptions:_,globalUiOptions:x}=p,{widget:E="files",title:R,...C}=Ue(n,x),$=ki(t,E,b),A=R??t.title??o,T=v.getDisplayLabel(t,n,x),M=Fs(Jr("",_,i,!0));return N.jsx($,{options:C,id:M[Ft],name:o,multiple:!0,onChange:g,onBlur:d,onFocus:m,schema:t,uiSchema:n,value:y,disabled:s,readonly:u,required:f,registry:p,autofocus:c,rawErrors:S,label:A,hideLabel:!T,htmlName:M.name})}function nj(e){const{itemKey:t,index:n,name:i,disabled:o,hideError:s,readonly:u,registry:c,uiOptions:f,parentUiSchema:d,canAdd:m,canRemove:p=!0,canMoveUp:y,canMoveDown:S,itemSchema:g,itemData:b,itemUiSchema:v,itemFieldPathId:_,itemErrorSchema:x,autofocus:E,onBlur:R,onFocus:C,onChange:$,rawErrors:A,totalItems:T,title:M,handleAddItem:D,handleCopyItem:j,handleRemoveItem:I,handleReorderItems:L}=e,{schemaUtils:K,fields:{ArraySchemaField:G,SchemaField:q},globalUiOptions:Q}=c,W=Fs(_),ne=G||q,X=Qe("ArrayFieldItemTemplate",c,f),P=K.getDisplayLabel(g,v,Q),{description:B}=Ue(v),U=!!B||!!g.description,{orderable:k=!0,removable:V=!0,copyable:J=!1}=f,le={moveUp:k&&y,moveDown:k&&S,copy:J&&m,remove:V&&p,toolbar:!1};le.toolbar=Object.keys(le).some(ae=>le[ae]);const ie=z.useCallback(ae=>{D(ae,n+1)},[D,n]),se=z.useCallback(ae=>{j(ae,n)},[j,n]),fe=z.useCallback(ae=>{I(ae,n)},[I,n]),Y=z.useCallback(ae=>{L(ae,n,n-1)},[L,n]),Z=z.useCallback(ae=>{L(ae,n,n+1)},[L,n]),ue={children:N.jsx(ne,{name:i,title:M,index:n,schema:g,uiSchema:v,formData:b,errorSchema:x,fieldPathId:W,required:F8(g),onChange:$,onBlur:R,onFocus:C,registry:c,disabled:o,readonly:u,hideError:s,autofocus:E,rawErrors:A}),buttonsProps:{fieldPathId:W,disabled:o,readonly:u,canAdd:m,hasCopy:le.copy,hasMoveUp:le.moveUp,hasMoveDown:le.moveDown,hasRemove:le.remove,index:n,totalItems:T,onAddItem:ie,onCopyItem:se,onRemoveItem:fe,onMoveUpItem:Y,onMoveDownItem:Z,registry:c,schema:g,uiSchema:v},itemKey:t,className:"rjsf-array-item",disabled:o,hasToolbar:le.toolbar,index:n,totalItems:T,readonly:u,registry:c,schema:g,uiSchema:v,parentUiSchema:d,displayLabel:P,hasDescription:U};return N.jsx(X,{...ue})}function B8(e){const{schema:t,uiSchema:n={},errorSchema:i,fieldPathId:o,formData:s,name:u,title:c,disabled:f=!1,readonly:d=!1,autofocus:m=!1,required:p=!1,hideError:y=!1,registry:S,onBlur:g,onFocus:b,rawErrors:v,onChange:_,keyedFormData:x,handleAddItem:E,handleCopyItem:R,handleRemoveItem:C,handleReorderItems:$}=e,A=t.title||c||u,{schemaUtils:T,fields:M,formContext:D,globalFormOptions:j,globalUiOptions:I}=S,{OptionalDataControlsField:L}=M,K=Ue(n,I),G=pt(t.items)?t.items:{},q=T.retrieveSchema(G),Q=ZD(x),W=Af(S,t,p,n),ne=yu(s),X=ej(S,t,Q,n)&&(!W||ne),P=ne?x:[],B=W?" rjsf-optional-array-field":"",U=e.childFieldPathId??o,k=W?N.jsx(L,{...e,fieldPathId:U}):void 0,V={canAdd:X,items:P.map((le,ie)=>{const{key:se,item:fe}=le,Y=fe,Z=T.retrieveSchema(G,Y),ue=i?i[ie]:void 0,ae=Jr(ie,j,U),Se=tj(n,fe,ie,D),ye={itemKey:se,index:ie,name:u&&`${u}-${ie}`,registry:S,uiOptions:K,hideError:y,readonly:d,disabled:f,required:p,title:A?`${A}-${ie+1}`:void 0,canAdd:X,canMoveUp:ie>0,canMoveDown:ie<Q.length-1,itemSchema:Z,itemFieldPathId:ae,itemErrorSchema:ue,itemData:Y,itemUiSchema:Se,autofocus:m&&ie===0,onBlur:g,onFocus:b,rawErrors:v,totalItems:x.length,handleAddItem:E,handleCopyItem:R,handleRemoveItem:C,handleReorderItems:$,onChange:_};return N.jsx(nj,{...ye},se)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${q.type}${B}`,disabled:f,fieldPathId:o,uiSchema:n,onAddClick:E,readonly:d,required:p,schema:t,title:A,formData:Q,rawErrors:v,registry:S,optionalDataControl:k},J=Qe("ArrayFieldTemplate",S,K);return N.jsx(J,{...V})}function V8(e){const{schema:t,uiSchema:n={},formData:i,errorSchema:o,fieldPathId:s,name:u,title:c,disabled:f=!1,readonly:d=!1,autofocus:m=!1,required:p=!1,hideError:y=!1,registry:S,onBlur:g,onFocus:b,rawErrors:v,keyedFormData:_,onChange:x,handleAddItem:E,handleCopyItem:R,handleRemoveItem:C,handleReorderItems:$}=e;let{formData:A=[]}=e;const T=t.title||c||u,{schemaUtils:M,fields:D,formContext:j,globalFormOptions:I,globalUiOptions:L}=S,K=Ue(n,L),{OptionalDataControlsField:G}=D,q=Af(S,t,p,n),Q=yu(i),ne=(pt(t.items)?t.items:[]).map((ie,se)=>M.retrieveSchema(ie,A[se])),X=pt(t.additionalItems)?M.retrieveSchema(t.additionalItems,i):null,P=e.childFieldPathId??s;A.length<ne.length&&(A=A.concat(new Array(ne.length-A.length)));const B=Q?_:[],U=q?" rjsf-optional-array-field":"",k=q?N.jsx(G,{...e,fieldPathId:P}):void 0,V=ej(S,t,A,n)&&!!X&&(!q||Q),J={canAdd:V,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${U}`,disabled:f,fieldPathId:s,formData:i,items:B.map((ie,se)=>{const{key:fe,item:Y}=ie,Z=Y,ue=se>=ne.length,ae=(ue&&pt(t.additionalItems)?M.retrieveSchema(t.additionalItems,Z):ne[se])||{},Se=Jr(se,I,P);let ye;ue?ye=n.additionalItems:Array.isArray(n.items)?ye=n.items[se]:ye=tj(n,Y,se,j);const Oe=o?o[se]:void 0,Re={index:se,itemKey:fe,name:u&&`${u}-${se}`,registry:S,uiOptions:K,hideError:y,readonly:d,disabled:f,required:p,title:T?`${T}-${se+1}`:void 0,canAdd:V,canRemove:ue,canMoveUp:se>=ne.length+1,canMoveDown:ue&&se<A.length-1,itemSchema:ae,itemData:Z,itemUiSchema:ye,itemFieldPathId:Se,itemErrorSchema:Oe,autofocus:m&&se===0,onBlur:g,onFocus:b,rawErrors:v,totalItems:_.length,onChange:x,handleAddItem:E,handleCopyItem:R,handleRemoveItem:C,handleReorderItems:$};return N.jsx(nj,{...Re},fe)}),onAddClick:E,readonly:d,required:p,registry:S,schema:t,uiSchema:n,title:T,errorSchema:o,rawErrors:v,optionalDataControl:k},le=Qe("ArrayFieldTemplate",S,K);return N.jsx(le,{...J})}function H8(e=[]){const t=z.useMemo(()=>Ni(e),[e]),[n,i]=z.useState(()=>({formDataHash:t,keyedFormData:hO(e)}));let{keyedFormData:o,formDataHash:s}=n;if(t!==s){const c=Array.isArray(e)?e:[],f=o||[];o=c.length===f.length?f.map((d,m)=>({key:d.key,item:c[m]})):hO(c),s=t,i({formDataHash:s,keyedFormData:o})}const u=z.useCallback(c=>{const f=ZD(c),d=Ni(f);return i({formDataHash:d,keyedFormData:c}),f},[]);return{keyedFormData:o,updateKeyedFormData:u}}function K8(e){const{schema:t,uiSchema:n,errorSchema:i,fieldPathId:o,registry:s,formData:u,onChange:c}=e,{globalFormOptions:f,schemaUtils:d,translateString:m}=s,{keyedFormData:p,updateKeyedFormData:y}=H8(u),S=e.childFieldPathId??o,g=z.useCallback(($,A)=>{$&&$.preventDefault();let T;if(i){T={};for(const j in i){const I=parseInt(j);A===void 0||I<A?Nt(T,[I],i[j]):I>=A&&Nt(T,[I+1],i[j])}}const M={key:fb(),item:k8(s,t)},D=[...p];A!==void 0?D.splice(A,0,M):D.push(M),c(y(D),S.path,T)},[p,s,t,c,y,i,S]),b=z.useCallback(($,A)=>{$&&$.preventDefault();let T;if(i){T={};for(const j in i){const I=parseInt(j);I<=A?Nt(T,[I],i[j]):I>A&&Nt(T,[I+1],i[j])}}const M={key:fb(),item:DS(p[A].item)},D=[...p];A!==void 0?D.splice(A+1,0,M):D.push(M),c(y(D),S.path,T)},[p,c,y,i,S]),v=z.useCallback(($,A)=>{$&&$.preventDefault();let T;if(i){T={};for(const D in i){const j=parseInt(D);j<A?Nt(T,[j],i[D]):j>A&&Nt(T,[j-1],i[D])}}const M=p.filter((D,j)=>j!==A);c(y(M),S.path,T)},[p,c,y,i,S]),_=z.useCallback(($,A,T)=>{$&&($.preventDefault(),$.currentTarget.blur());let M;if(i){M={};for(const I in i){const L=parseInt(I);L==A?Nt(M,[T],i[A]):L==T?Nt(M,[A],i[T]):Nt(M,[I],i[L])}}function D(){const I=p.slice();return I.splice(A,1),I.splice(T,0,p[A]),I}const j=D();c(y(j),S.path,M)},[p,c,y,i,S]),x=z.useCallback(($,A,T,M)=>{c($===void 0?null:$,A,T,M)},[c]),E=z.useCallback($=>{c($,S.path,void 0,S==null?void 0:S[Ft])},[c,S]),R={...e,formData:u,fieldPathId:S,onSelectChange:E},C={...e,handleAddItem:g,handleCopyItem:b,handleRemoveItem:v,handleReorderItems:_,keyedFormData:p,onChange:x};if(!(Xl in t)){if(!f.useFallbackUiForUnsupportedType){const A=Ue(n),T=Qe("UnsupportedFieldTemplate",s,A);return N.jsx(T,{schema:t,fieldPathId:o,reason:m(St.MissingItems),registry:s})}const $={...t,[Xl]:{type:void 0}};R.schema=$,C.schema=$}return d.isMultiSelect(R.schema)?N.jsx(L8,{...R}):zD(n)?N.jsx(q8,{...R}):AS(R.schema)?N.jsx(V8,{...C}):d.isFilesArray(R.schema,n)?N.jsx(U8,{...R}):N.jsx(B8,{...C})}function G8(e){const{schema:t,name:n,uiSchema:i,fieldPathId:o,formData:s,registry:u,required:c,disabled:f,readonly:d,hideError:m,autofocus:p,title:y,onChange:S,onFocus:g,onBlur:b,rawErrors:v}=e,{title:_}=t,{widgets:x,translateString:E,globalUiOptions:R}=u,{widget:C="checkbox",title:$,label:A=!0,enumNames:T,...M}=Ue(i,R),D=ki(t,C,x),j=E(St.YesLabel),I=E(St.NoLabel);let L;const K=$??_??y??n;if(Array.isArray(t.oneOf))L=Jl({oneOf:t.oneOf.map(q=>{if(pt(q))return{...q,title:q.title||(q.const===!0?j:I)}}).filter(q=>q)},i);else{const q=t.enum??[!0,!1];!T&&q.length===2&&q.every(Q=>typeof Q=="boolean")?L=[{value:q[0],label:q[0]?j:I},{value:q[1],label:q[1]?j:I}]:L=Jl({enum:q},i)}const G=z.useCallback((q,Q,W)=>S(q,o.path,Q,W),[S,o]);return N.jsx(D,{options:{...M,enumOptions:L},schema:t,uiSchema:i,id:o.$id,name:n,onChange:G,onFocus:g,onBlur:b,label:K,hideLabel:!A,value:s,required:c,disabled:f,readonly:d,hideError:m,registry:u,autofocus:p,rawErrors:v,htmlName:o.name})}function Q8(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function Y8(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function W8(e,t){switch(t){case"string":return String(e);case"number":{const n=Number(e);return isNaN(n)?0:n}case"boolean":return!!e;default:return e}}function X8(e){const{id:t,formData:n,displayLabel:i=!0,schema:o,name:s,uiSchema:u,required:c,disabled:f=!1,readonly:d=!1,onBlur:m,onFocus:p,registry:y,fieldPathId:S,onChange:g,errorSchema:b}=e,{translateString:v,fields:_,globalFormOptions:x}=y,[E,R]=z.useState(Y8(n)),C=Ue(u),$=Fs(Jr("__internal_type_selector",x,S)),A=v(St.Type),T=z.useMemo(()=>Q8(A),[A]),M=I=>{I!=null&&(R(I),g(W8(n,I),S.path,b,t))};if(!x.useFallbackUiForUnsupportedType){const{reason:I=v(St.UnknownFieldType,[String(o.type)])}=e,L=Qe("UnsupportedFieldTemplate",y,C);return N.jsx(L,{schema:o,fieldPathId:S,reason:I,registry:y})}const D=Qe("FallbackFieldTemplate",y,C),{SchemaField:j}=_;return N.jsx(D,{schema:o,registry:y,typeSelector:N.jsx(j,{fieldPathId:$,name:`${s}__fallback_type`,schema:T,formData:E,onChange:M,onBlur:m,onFocus:p,registry:y,hideLabel:!i,disabled:f,readonly:d,required:c},n?Ni(n):"__empty__"),schemaField:N.jsx(j,{...e,schema:{type:E,title:v(St.Value),...E==="object"&&{additionalProperties:!0}}})})}function J8(e,t){return nu(t,function(n){return e[n]})}function Z8(e){return e==null?[]:J8(e,ci(e))}var eH=Math.max;function tH(e,t,n,i){e=Ms(e)?e:Z8(e),n=n?iT(n):0;var o=e.length;return n<0&&(n=eH(o+n,0)),Do(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&D$(e,t,n)>-1}var nH=Math.min;function rH(e,t,n){for(var i=wb,o=e[0].length,s=e.length,u=s,c=Array(s),f=1/0,d=[];u--;){var m=e[u];f=nH(m.length,f),c[u]=o>=120&&m.length>=120?new Rs(u&&m):void 0}m=e[0];var p=-1,y=c[0];e:for(;++p<o&&d.length<f;){var S=m[p],g=S;if(S=S!==0?S:0,!(y?Uc(y,g):i(d,g))){for(u=s;--u;){var b=c[u];if(!(b?Uc(b,g):i(e[u],g)))continue e}y&&y.push(g),d.push(S)}}return d}function iH(e){return _a(e)?e:[]}var pO=ru(function(e){var t=nu(e,iH);return t.length&&t[0]===e[0]?rH(t):[]});function rj(e){return e===void 0}var Pi;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(Pi||(Pi={}));var Ic;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(Ic||(Ic={}));const aH=/^\$lookup=(.+)/,a0="layoutGrid";function mO(e,t){return e??t}function oH(e){return/^\d+?$/.test(e)}const Oo=jS();function sH(e,t,n,i,o){const s=xe(n,[nb],{}),u=xe(n,e),c={...xe(u,[Co],{}),...t,...s},f={...u};on(c)||Nt(f,[Co],c),on(s)||Nt(f,[nb],s);let{readonly:d}=Ue(f);return(o===!0||rj(d)&&i===!0)&&(d=!0,ut(c,Uy)?Nt(f,[Co,Uy],!0):Nt(f,`ui:${Uy}`,!0)),{fieldUiSchema:f,uiReadonly:d}}function lH(e,t,n="$0m3tH1nG Un3xP3cT3d"){const i=ob([t]).sort(),o=ob([n]).sort();switch(e){case Ic.ALL:return di(i,o);case Ic.SOME:return pO(i,o).length>0;case Ic.NONE:return pO(i,o).length===0;default:return!1}}function Zp(e,t,n){let i={},o=e[t];if(Mo(o)){const{children:s,className:u,...c}=o;if(o=s,u){const d=u.split(" ").map(m=>PS(n,m,m)).join(" ");i={...c,className:d}}else i=c}if(!Array.isArray(o))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:o,gridProps:i}}function gO(e,t,n){let i;if(oH(n)&&e&&(e==null?void 0:e.type)==="array"&&ut(e,Xl)){const o=Number(n),s=e[Xl];Array.isArray(s)?o>s.length?i=jp(s):i=s[o]:i=s,t={[Ft]:t[Ft],path:[...t.path.slice(0,t.path.length-1),o]}}return{rawSchema:i,fieldPathId:t}}function uH(e,t,n,i,o){const{schemaUtils:s,globalFormOptions:u}=e;let c=n,f=o;const d=t.split("."),m=d.pop();let p=s.retrieveSchema(c,i),y=i,S=p.readOnly;d.forEach(v=>{if(f=Jr(v,u,f),ut(p,bt))c=xe(p,[bt,v],{});else if(p&&(ut(p,Xe)||ut(p,ht))){const _=ut(p,Xe)?Xe:ht,x=s.findSelectedOptionInXxxOf(p,v,_,y);c=xe(x,[bt,v],{})}else{const _=gO(p,f,v);c=_.rawSchema??{},f=_.fieldPathId}y=xe(y,v,{}),p=s.retrieveSchema(c,y),S=mO(p.readOnly,S)});let g,b=!1;if(on(p)&&(p=void 0),p&&m){if(p&&(ut(p,Xe)||ut(p,ht))){const _=ut(p,Xe)?Xe:ht;p=s.findSelectedOptionInXxxOf(p,m,_,y)}f=Jr(m,u,f),b=p!==void 0&&Array.isArray(p.required)&&tH(p.required,m);const v=gO(p,f,m);if(v.rawSchema?(p=v.rawSchema,f=v.fieldPathId):(p=xe(p,[bt,m]),p=p&&s.retrieveSchema(p)),S=mO(p==null?void 0:p.readOnly,S),p&&(ut(p,Xe)||ut(p,ht))){const _=ut(p,Xe)?Xe:ht,x=Fi(p);g={options:p[_],hasDiscriminator:!!x}}}return{schema:p,isRequired:b,isReadonly:S,optionsInfo:g,fieldPathId:f}}function cH(e,t){let n=e;return Do(n)&&(n=PS(t,n)),lf(n)?n:null}function fH(e,t){let n,i=null,o={},s;if(Do(t)||rj(t))n=t??"";else{const{name:u="",render:c,...f}=t;n=u,o=f,on(o)||I8(o,(d,m)=>{if(Do(d)){const p=aH.exec(d);if(Array.isArray(p)&&p.length>1){const y=p[1];o[m]=PS(e,y,y)}}}),i=cH(c,e),!u&&i&&(s=N.jsx(i,{...f,"data-testid":Oo.uiComponent}))}return{name:n,UIComponent:i,uiProps:o,rendered:s}}function em(e){const{childrenLayoutGridSchemaId:t,...n}=e,{registry:i,schema:o,formData:s}=n,{schemaUtils:u}=i,c=u.retrieveSchema(o,s);return t.map(f=>z.createElement(FS,{...n,key:`layoutGrid-${Ni(f)}`,schema:c,layoutGridSchema:f}))}function dH(e){const{layoutGridSchema:t,...n}=e,{formData:i,registry:o}=n,{children:s,gridProps:u}=Zp(t,Pi.CONDITION,o),{operator:c,field:f="",value:d}=u,m=xe(i,f,null);return lH(c,m,d)?N.jsx(em,{...n,childrenLayoutGridSchemaId:s}):null}function hH(e){const{layoutGridSchema:t,...n}=e,{registry:i,uiSchema:o}=n,{children:s,gridProps:u}=Zp(t,Pi.COLUMN,i),c=Ue(o),f=Qe("GridTemplate",i,c);return N.jsx(f,{column:!0,"data-testid":Oo.col,...u,children:N.jsx(em,{...n,childrenLayoutGridSchemaId:s})})}function pH(e){const{layoutGridSchema:t,...n}=e,{registry:i,uiSchema:o}=n,{children:s,gridProps:u}=Zp(t,Pi.COLUMNS,i),c=Ue(o),f=Qe("GridTemplate",i,c);return s.map(d=>N.jsx(f,{column:!0,"data-testid":Oo.col,...u,children:N.jsx(em,{...n,childrenLayoutGridSchemaId:[d]})},`column-${Ni(d)}`))}function mH(e){const{layoutGridSchema:t,...n}=e,{registry:i,uiSchema:o}=n,{children:s,gridProps:u}=Zp(t,Pi.ROW,i),c=Ue(o),f=Qe("GridTemplate",i,c);return N.jsx(f,{...u,"data-testid":Oo.row,children:N.jsx(em,{...n,childrenLayoutGridSchemaId:s})})}function gH(e){const{gridSchema:t,schema:n,uiSchema:i,errorSchema:o,fieldPathId:s,onBlur:u,onFocus:c,formData:f,readonly:d,registry:m,layoutGridSchema:p,...y}=e,{onChange:S}=y,{fields:g}=m,{SchemaField:b,LayoutMultiSchemaField:v}=g,_=fH(m,t),{name:x,UIComponent:E,uiProps:R}=_,{schema:C,isRequired:$,isReadonly:A,optionsInfo:T,fieldPathId:M}=uH(m,x,n,f,s),D=Fs(M);if(_.rendered)return _.rendered;if(C){const j=T!=null&&T.hasDiscriminator?v:b,{fieldUiSchema:I,uiReadonly:L}=sH(x,R,i,A,d);return N.jsx(j,{"data-testid":T!=null&&T.hasDiscriminator?Oo.layoutMultiSchemaField:Oo.field,...y,name:x,required:$,readonly:L,schema:C,uiSchema:I,errorSchema:xe(o,x),fieldPathId:D,formData:xe(f,x),onChange:S,onBlur:u,onFocus:c,options:T==null?void 0:T.options,registry:m})}return E?N.jsx(E,{"data-testid":Oo.uiComponent,...y,name:x,required:$,formData:f,readOnly:!!A||d,errorSchema:o,uiSchema:i,schema:n,fieldPathId:s,onBlur:u,onFocus:c,registry:m,...R}):null}function FS(e){const{uiSchema:t}=e;let{layoutGridSchema:n}=e;const i=Ue(t);if(!n&&a0 in i&&pt(i[a0])&&(n=i[a0]),pt(n)){if(Pi.ROW in n)return N.jsx(mH,{...e,layoutGridSchema:n});if(Pi.COLUMN in n)return N.jsx(hH,{...e,layoutGridSchema:n});if(Pi.COLUMNS in n)return N.jsx(pH,{...e,layoutGridSchema:n});if(Pi.CONDITION in n)return N.jsx(dH,{...e,layoutGridSchema:n})}return N.jsx(gH,{...e,gridSchema:n})}FS.TEST_IDS=Oo;function vH(e){const{fieldPathId:t,title:n,schema:i,uiSchema:o,required:s,registry:u,name:c}=e,f=Ue(o,u.globalUiOptions),{title:d}=f,{title:m}=i,p=d||n||m||c;if(!p)return null;const y=Qe("TitleFieldTemplate",u,f);return N.jsx(y,{id:NS(t),title:p,required:s,schema:i,uiSchema:o,registry:u})}function o0(e,t,n){const i="!@#!@$@#$!@$#";return e.map(({schema:s})=>s).find(s=>{const u=xe(s,[bt,t]);return xe(u,Wp,xe(u,Xr,i))===n})}function vO(e,t,n,i,o){const s=t.map(f=>n.retrieveSchema(f,o));let u=e;ut(e,Xe)?u={...e,[Xe]:s}:ut(e,ht)&&(u={...e,[ht]:s});const c=Jl(u,i);if(!c)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(u)}`);return c}function yH(e){var Z;const{name:t,baseType:n,disabled:i=!1,formData:o,fieldPathId:s,onBlur:u,onChange:c,options:f,onFocus:d,registry:m,uiSchema:p,schema:y,autofocus:S,readonly:g,required:b,errorSchema:v,hideError:_=!1}=e,{widgets:x,schemaUtils:E,globalUiOptions:R}=m,[C,$]=z.useState(vO(y,f,E,p,o)),A=xe(s,Ft),T=Fi(y),M=Qe("FieldErrorTemplate",m,f),D=Qe("FieldTemplate",m,f),j=Ni(y),I=Ni(f),L=p?Ni(p):"",K=o?Ni(o):"";z.useEffect(()=>{$(vO(y,f,E,p,o))},[j,I,E,L,K]);const{widget:G=T?"radio":"select",title:q="",placeholder:Q="",optionsSchemaSelector:W=T,hideError:ne,...X}=Ue(p);if(!W)throw new Error("No selector field provided for the LayoutMultiSchemaField");const P=xe(o,W);let B=xe((Z=C[0])==null?void 0:Z.schema,[bt,W],{});const U=o0(C,W,P);B=B!=null&&B.type?B:{...B,type:(U==null?void 0:U.type)||n};const k=ki(B,G,x),V=ne===void 0?_:!!ne,J=xe(v,[Pn],[]),le=Wc(v,[Pn]),ie=E.getDisplayLabel(y,p,R),se=ue=>{const ae=o0(C,W,ue),Se=o0(C,W,P);let ye=E.sanitizeDataForNewSchema(ae,Se,o);ye&&ae&&(ye=E.getDefaultFormState(ae,ye,"excludeObjectChildren")),ye&&Nt(ye,W,ue),c(ye,s.path,void 0,A)},fe={enumOptions:C,...X},Y=!V&&J.length>0?N.jsx(M,{fieldPathId:s,schema:y,errors:J,registry:m}):void 0;return N.jsx(D,{fieldPathId:s,id:A,schema:y,label:(q||y.title)??"",disabled:i||Array.isArray(C)&&on(C),uiSchema:p,required:b,readonly:!!g,registry:m,displayLabel:ie,errors:Y,onChange:c,onKeyRename:Gh,onKeyRenameBlur:Gh,onRemoveProperty:Gh,children:N.jsx(k,{id:A,name:t,schema:y,label:(q||y.title)??"",disabled:i||Array.isArray(C)&&on(C),uiSchema:p,autofocus:S,readonly:g,required:b,registry:m,multiple:!1,rawErrors:J,hideError:V,hideLabel:!ie,errorSchema:le,placeholder:Q,onChange:se,onBlur:u,onFocus:d,value:P,options:fe,htmlName:s.name})})}class yO extends z.Component{constructor(n){super(n);Ln(this,"onOptionChange",n=>{const{selectedOption:i,retrievedOptions:o}=this.state,{formData:s,onChange:u,registry:c,fieldPathId:f}=this.props,{schemaUtils:d}=c,m=n!==void 0?parseInt(n,10):-1;if(m===i)return;const p=m>=0?o[m]:void 0,y=i>=0?o[i]:void 0;let S=d.sanitizeDataForNewSchema(p,y,s);p&&(S=d.getDefaultFormState(p,S,"excludeObjectChildren")),this.setState({selectedOption:m},()=>{u(S,f.path,void 0,this.getFieldId())})});const{formData:i,options:o,registry:{schemaUtils:s}}=this.props,u=o.map(c=>s.retrieveSchema(c,i));this.state={retrievedOptions:u,selectedOption:this.getMatchingOption(0,i,u)}}componentDidUpdate(n,i){const{formData:o,options:s,fieldPathId:u}=this.props,{selectedOption:c}=this.state;let f=this.state;if(!Ut(n.options,s)){const{registry:{schemaUtils:d}}=this.props,m=s.map(p=>d.retrieveSchema(p,o));f={selectedOption:c,retrievedOptions:m}}if(!Ut(o,n.formData)&&u.$id===n.fieldPathId.$id){const{retrievedOptions:d}=f,m=this.getMatchingOption(c,o,d);i&&m!==c&&(f={selectedOption:m,retrievedOptions:d})}f!==this.state&&this.setState(f)}getMatchingOption(n,i,o){const{schema:s,registry:{schemaUtils:u}}=this.props,c=Fi(s);return u.getClosestMatchingOption(i,o,n,c)}getFieldId(){const{fieldPathId:n,schema:i}=this.props;return`${n.$id}${i.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:n,disabled:i=!1,errorSchema:o={},formData:s,onBlur:u,onFocus:c,readonly:f,required:d=!1,registry:m,schema:p,uiSchema:y}=this.props,{widgets:S,fields:g,translateString:b,globalUiOptions:v,schemaUtils:_}=m,{SchemaField:x}=g,E=Qe("MultiSchemaFieldTemplate",m,v),R=Af(m,p,d,y),C=yu(s),{selectedOption:$,retrievedOptions:A}=this.state,{widget:T="select",placeholder:M,autofocus:D,autocomplete:j,title:I=p.title,...L}=Ue(y,v),K=ki({type:"number"},T,S),G=xe(o,Pn,[]),q=Wc(o,[Pn]),Q=_.getDisplayLabel(p,y,v),W=$>=0&&A[$]||null;let ne;if(W){const{required:le}=p;ne=le?Ca({required:le},W):W}let X=[];Xe in p&&y&&Xe in y?Array.isArray(y[Xe])?X=y[Xe]:console.warn(`uiSchema.oneOf is not an array for "${I||n}"`):ht in p&&y&&ht in y&&(Array.isArray(y[ht])?X=y[ht]:console.warn(`uiSchema.anyOf is not an array for "${I||n}"`));let P=y;$>=0&&X.length>$&&(P=X[$]);const B=I?St.TitleOptionPrefix:St.OptionPrefix,U=I?[I]:[],k=A.map((le,ie)=>{const{title:se=le.title}=Ue(X[ie]);return{label:se||b(B,U.concat(String(ie+1))),value:ie}}),V=!R||C?N.jsx(K,{id:this.getFieldId(),name:`${n}${p.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:u,onFocus:c,disabled:i||on(k),multiple:!1,rawErrors:G,errorSchema:q,value:$>=0?$:void 0,options:{enumOptions:k,...L},registry:m,placeholder:M,autocomplete:j,autofocus:D,label:I??n,hideLabel:!Q,readonly:f}):void 0,J=ne&&ne.type!=="null"&&N.jsx(x,{...this.props,schema:ne,uiSchema:P})||null;return N.jsx(E,{schema:p,registry:m,uiSchema:y,selector:V,optionSchemaField:J})}}const bH=/\.([0-9]*0)*$/,SH=/[0.]0*$/;function _H(e){const{registry:t,onChange:n,formData:i,value:o}=e,[s,u]=z.useState(o),{StringField:c}=t.fields;let f=i;const d=z.useCallback((m,p,y,S)=>{u(m),`${m}`.charAt(0)==="."&&(m=`0${m}`);const g=typeof m=="string"&&m.match(bH)?DR(m.replace(SH,"")):DR(m);n(g,p,y,S)},[n]);if(typeof s=="string"&&typeof f=="number"){const m=new RegExp(`^(${String(f).replace(".","\\.")})?\\.?0*$`);s.match(m)&&(f=s)}return N.jsx(c,{...e,formData:f,onChange:d})}function Mi(){return Mi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Mi.apply(null,arguments)}const th=["strong","em","del","mark"],bO=[["**",th[0]],["__",th[0]],["~~",th[2]],["==",th[3]],["*","em"],["_","em"]];function wH(e,t){for(var n=1,i=t+1;i<e.length&&n>0;)e[i]!=="\\"?(e[i]==="["&&n++,e[i]==="]"&&n--,i++):i+=2;if(n===0&&i<e.length&&(e[i]==="("||e[i]==="[")){var o=e[i]==="("?")":"]",s=1;for(i++;i<e.length&&s>0;)e[i]!=="\\"?(e[i]==="("&&o===")"&&s++,e[i]===o&&s--,i++):i+=2;if(s===0)return i}return-1}function EH(e,t){if(!t||!t.inline&&!t.simple)return null;var n=e[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var i="",o=0,s="",u=0;u<6;u++){var c=bO[u][0];if(e.startsWith(c)&&e.length>=2*c.length){i=c,o=c.length,s=bO[u][1];break}}if(!i)return null;for(var f=o,d=!1,m=!1,p="",y=0,S="",g=!1,b="";f<e.length;){var v=e[f];if(g)S+=v,g=!1,b=v,f++;else if(v!=="\\")if(v!=="`"||y!==0){if(v==="["&&!d&&y===0){var _=wH(e,f);if(_!==-1){S+=e.slice(f,_),f=_,b=e[_-1];continue}}if(m)S+=v,p?v===p&&(p=""):v==='"'||v==="'"?p=v:v===">"&&(m=!1),b=v,f++;else if(v!=="<"||d){if(v===`
|
|
130
|
-
`&&b===`
|
|
131
|
-
`&&!d&&y===0)return null;if(!d&&y===0){for(var x=0;f+x<e.length&&e[f+x]===i[0];)x++;if(x>=o&&(o!==1||i!=="*"&&i!=="_"||e[f-1]!==i&&e[f+1]!==i)){var E=[e.slice(0,f+x),s,S+e.slice(f+o,f+x)];return E.index=0,E.input=e,E}}S+=v,b=v,f++}else{var R=e[f+1],C=e.indexOf(">",f);if(C!==-1){var $=e.slice(f,C+1).endsWith("/>");R==="/"?y=Math.max(0,y-1):$||y++}m=!0,S+=v,b=v,f++}}else d=!d,S+=v,b=v,f++;else S+=v,g=!0,b=v,f++}return null}const xH=["children","options"],SO=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),_O={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},CH=["style","script","pre"],RH=["src","href","data","formAction","srcDoc","action"],OH=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,AH=/\n{2,}$/,wO=/^(\s*>[\s\S]*?)(?=\n\n|$)/,$H=/^ *> ?/gm,TH=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,MH=/^ {2,}\n/,DH=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,EO=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,xO=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,jH=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,NH=/^(?:\n *)*\n/,PH=/\r\n?/g,IH=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,zH=/^\[\^([^\]]+)]/,FH=/\f/g,kH=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,LH=/^\[(x|\s)\]/,CO=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,RO=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,OO=/^([^\n]+)\n *(=|-)\2{2,} *\n/,kS=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function qH(e){const t=kS.exec(e);if(!t)return null;const n=t[1],i=n.toLowerCase(),o=i.length+1;let s=t[0].length;e[s]===`
|
|
132
|
-
`&&s++;const u=s;let c=s,f=1;const d=e.length;for(;f>0;){const p=e.indexOf("<",s);if(p===-1)return null;let y=-1,S=-1;if(e[p+1]==="/")S=p;else if(e[p+1]===i[0]||e[p+1]===n[0]){let g=!0;for(let b=0;b<i.length;b++){const v=e[p+1+b];if(v!==i[b]&&v!==n[b]){g=!1;break}}!g||e[p+o]!==" "&&e[p+o]!==">"||(y=p)}if(y!==-1||S!==-1)if(y!==-1&&(S===-1||y<S))s=y+o+1,f++;else{let g=S+2;for(;g<d;){const v=e[g];if(v!==" "&&v!==" "&&v!==`
|
|
133
|
-
`&&v!=="\r")break;g++}if(g+i.length>d)return null;let b=!0;for(let v=0;v<i.length;v++){const _=e[g+v];if(_!==i[v]&&_!==n[v]){b=!1;break}}if(!b){s=g;continue}for(g+=i.length;g<d;){const v=e[g];if(v!==" "&&v!==" "&&v!==`
|
|
134
|
-
`&&v!=="\r")break;g++}if(g>=d||e[g]!==">"){s=g;continue}c=S,s=g+1,f--}else s=p+1}let m=0;for(;s+m<d&&e[s+m]===`
|
|
135
|
-
`;)m++;return[e.slice(0,s+m),n,t[2],e.slice(u,c)]}const UH=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,AO=/^<!--[\s\S]*?(?:-->)/,BH=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,db=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,VH=/^\{.*\}$/,HH=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,KH=/^<([^ >]+[:@\/][^ >]+)>/,GH=/-([a-z])?/gi,$O=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,QH=/^[^\n]+(?: \n|\n{2,})/,YH=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,WH=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,XH=/^\[([^\]]*)\] ?\[([^\]]*)\]/,JH=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,ZH=/\t/g,eK=/(^ *\||\| *$)/g,tK=/^ *:-+: *$/,nK=/^ *:-+ *$/,rK=/^ *-+: *$/,iK=/^(:[a-zA-Z0-9-_]+:)/,aK=/^\\([^0-9A-Za-z\s])/,oK=/\\([^0-9A-Za-z\s])/g,sK=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,lK=/^\n+/,uK=/^([ \t]*)/,cK=/(?:^|\n)( *)$/,LS="(?:\\d+\\.)",qS="(?:[*+-])";function ij(e){return"( *)("+(e===1?LS:qS)+") +"}const aj=ij(1),oj=ij(2);function sj(e){return RegExp("^"+(e===1?aj:oj))}const fK=sj(1),dK=sj(2);function lj(e){return RegExp("^"+(e===1?aj:oj)+"[^\\n]*(?:\\n(?!\\1"+(e===1?LS:qS)+" )[^\\n]*)*(\\n|$)","gm")}const hK=lj(1),pK=lj(2);function uj(e){const t=e===1?LS:qS;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const cj=uj(1),fj=uj(2);function TO(e,t){const n=t===1,i=n?cj:fj,o=n?hK:pK,s=n?fK:dK;return{t:u=>s.test(u),o:wo(function(u,c){const f=cK.exec(c.prevCapture);return f&&(c.list||!c.inline&&!c.simple)?i.exec(u=f[1]+u):null}),u:1,i(u,c,f){const d=n?+u[2]:void 0,m=u[0].replace(AH,`
|
|
136
|
-
`).match(o),p=s.exec(m[0]),y=RegExp("^ {1,"+(p?p[0].length:0)+"}","gm");let S=!1;return{items:m.map(function(g,b){const v=g.replace(y,"").replace(s,""),_=b===m.length-1,x=Ci(v,`
|
|
137
|
-
|
|
138
|
-
`)||_&&S;S=x;const E=f.inline,R=f.list;let C;f.list=!0,x?(f.inline=!1,C=zc(v)+`
|
|
139
|
-
|
|
140
|
-
`):(f.inline=!0,C=zc(v));const $=c(C,f);return f.inline=E,f.list=R,$}),ordered:n,start:d}}}}const mK=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),gK=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function MO(e){return typeof e=="string"}function zc(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function hb(e,t){return e.startsWith(t)}function Ci(e,t){return e.indexOf(t)!==-1}function vK(e,t,n){if(Array.isArray(n)){for(let i=0;i<n.length;i++)if(hb(e,n[i]))return!0;return!1}return n(e,t)}function Sc(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function yK(e){return rK.test(e)?"right":tK.test(e)?"center":nK.test(e)?"left":null}function DO(e,t,n,i){const o=n.inTable;n.inTable=!0;let s=[[]],u="";function c(){if(!u)return;const f=s[s.length-1];f.push.apply(f,t(u,n)),u=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((f,d,m)=>{f.trim()==="|"&&(c(),i)?d!==0&&d!==m.length-1&&s.push([]):u+=f}),c(),n.inTable=o,s}function bK(e,t,n){n.inline=!0;const i=e[2]?e[2].replace(eK,"").split("|").map(yK):[],o=e[3]?(function(u,c,f){return u.trim().split(`
|
|
141
|
-
`).map(function(d){return DO(d,c,f,!0)})})(e[3],t,n):[],s=DO(e[1],t,n,!!o.length);return n.inline=!1,o.length?{align:i,cells:o,header:s,type:"25"}:{children:s,type:"21"}}function jO(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function wo(e){return e.inline=1,e}function to(e){return wo(function(t,n){return n.inline?e.exec(t):null})}function nh(e){return wo(function(t,n){return n.inline||n.simple?e.exec(t):null})}function ua(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function NO(e){return wo(function(t){return e.exec(t)})}const SK=/(javascript|vbscript|data(?!:image)):/i;function _K(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(SK.test(t))return null}catch{return null}return e}function Ri(e){return e&&e.replace(oK,"$1")}function sp(e,t,n){const i=n.inline||!1,o=n.simple||!1;n.inline=!0,n.simple=!0;const s=e(t,n);return n.inline=i,n.simple=o,s}function wK(e,t,n){const i=n.inline||!1,o=n.simple||!1;n.inline=!1,n.simple=!0;const s=e(t,n);return n.inline=i,n.simple=o,s}function EK(e,t,n){const i=n.inline||!1;n.inline=!1;const o=e(t,n);return n.inline=i,o}const xK=(e,t,n)=>({children:sp(t,e[2],n)});function s0(){return{}}function CK(...e){return e.filter(Boolean).join(" ")}function l0(e,t,n){let i=e;const o=t.split(".");for(;o.length&&(i=i[o[0]],i!==void 0);)o.shift();return i||n}function u0(e,t,n,i){if(!t||!t.trim())return null;const o=t.match(OH);return o?o.reduce(function(s,u){const c=u.indexOf("=");if(c!==-1){const f=(function(p){return p.indexOf("-")!==-1&&p.match(BH)===null&&(p=p.replace(GH,function(y,S){return S.toUpperCase()})),p})(u.slice(0,c)).trim(),d=SO[f]||f;if(d==="ref")return s;const m=s[d]=(function(p,y,S,g){return y==="style"?(function(b){const v=[];if(!b)return v;let _="",x=0,E="";for(let C=0;C<b.length;C++){const $=b[C];if($==='"'||$==="'")E?$===E&&(E="",x--):(E=$,x++);else if($==="("&&_.endsWith("url"))x++;else if($===")"&&x>0)x--;else if($===";"&&x===0){const A=_.indexOf(":");A>0&&v.push([_.slice(0,A).trim(),_.slice(A+1).trim()]),_="";continue}_+=$}const R=_.indexOf(":");return R>0&&v.push([_.slice(0,R).trim(),_.slice(R+1).trim()]),v})(S).reduce(function(b,[v,_]){return b[v.replace(/(-[a-z])/g,x=>x[1].toUpperCase())]=g(_,p,v),b},{}):RH.indexOf(y)!==-1?g(Ri(S),p,y):(S.match(VH)&&(S=Ri(S.slice(1,S.length-1))),S==="true"||S!=="false"&&S)})(e,f,(function(p){const y=p[0];return(y==='"'||y==="'")&&p.length>=2&&p[p.length-1]===y?p.slice(1,-1):p})(u.slice(c+1).trim()),n);typeof m=="string"&&(kS.test(m)||db.test(m))&&(s[d]=i(m.trim()))}else u!=="style"&&(s[SO[u]||u]=!0);return s},{}):null}function PO(e,t){for(let n=0;n<e.length;n++)if(e[n].test(t))return!0;return!1}function RK(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?Mi({},_O,t.namedCodesToUnicode):_O;const n=t.slugify||Sc,i=t.sanitizer||_K,o=t.createElement||z.createElement,s=[wO,EO,xO,t.enforceAtxHeadings?RO:CO,OO,$O,cj,fj],u=[...s,QH,kS,AO,db];function c(g,b,...v){const _=l0(t.overrides,g+".props",{});return o((function(x,E){const R=l0(E,x);return R?typeof R=="function"||typeof R=="object"&&"render"in R?R:l0(E,x+".component",x):x})(g,t.overrides),Mi({},b,_,{className:CK(b==null?void 0:b.className,_.className)||void 0}),...v)}function f(g){g=g.replace(kH,"");let b=!1;t.forceInline?b=!0:t.forceBlock||(b=JH.test(g)===!1);const v=y(b?g:zc(g).replace(lK,"")+`
|
|
142
|
-
|
|
143
|
-
`,{inline:b});if(t.ast)return v;const _=S(v);for(;MO(_[_.length-1])&&!_[_.length-1].trim();)_.pop();if(d.length&&_.push(c("footer",{key:"footer"},d.map(function(R){return c("div",{id:n(R.identifier,Sc),key:R.identifier},R.identifier,S(y(R.footnote,{inline:!0})))}))),t.wrapper===null)return _;const x=t.wrapper||(b?"span":"div");let E;if(_.length>1||t.forceWrapper)E=_;else{if(_.length===1)return E=_[0],typeof E=="string"?c("span",{key:"outer"},E):E;E=null}return o(x,Mi({key:"outer"},t.wrapperProps),E)}const d=[],m={},p={0:{t:[">"],o:ua(wO),u:1,i(g,b,v){const[,_,x]=g[0].replace($H,"").match(TH);return{alert:_,children:b(x,v)}}},1:{t:[" "],o:to(MH),u:1,i:s0},2:{t:function(g,b){if(b.inline||b.simple)return!1;var v=g[0];return v==="-"||v==="*"||v==="_"},o:ua(DH),u:1,i:s0},3:{t:[" "],o:ua(xO),u:0,i:g=>({lang:void 0,text:Ri(zc(g[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:ua(EO),u:0,i:g=>({attrs:u0("code",g[3]||"",i,f),lang:g[2]||void 0,text:g[4],type:"3"})},5:{t:["`"],o:nh(jH),u:3,i:g=>({text:Ri(g[2])})},6:{t:["[^"],o:ua(IH),u:0,i:g=>(d.push({footnote:g[2],identifier:g[1]}),{})},7:{t:["[^"],o:to(zH),u:1,i:g=>({target:"#"+n(g[1],Sc),text:g[1]})},8:{t:["[ ]","[x]"],o:to(LH),u:1,i:g=>({completed:g[1].toLowerCase()==="x"})},9:{t:["#"],o:ua(t.enforceAtxHeadings?RO:CO),u:1,i:(g,b,v)=>({children:sp(b,g[2],v),id:n(g[2],Sc),level:g[1].length})},10:{t:g=>{const b=g.indexOf(`
|
|
144
|
-
`);return b>0&&b<g.length-1&&(g[b+1]==="="||g[b+1]==="-")},o:ua(OO),u:1,i:(g,b,v)=>({children:sp(b,g[1],v),level:g[2]==="="?1:2,type:"9"})},11:{t:["<"],o:wo(qH),u:1,i(g,b,v){const[,_]=g[3].match(uK),x=RegExp("^"+_,"gm"),E=g[3].replace(x,""),R=PO(u,E)?EK:sp,C=g[1].toLowerCase(),$=CH.indexOf(C)!==-1,A=($?C:g[1]).trim(),T={attrs:u0(A,g[2],i,f),noInnerParse:$,tag:A};if(v.inAnchor=v.inAnchor||C==="a",$)T.text=g[3];else{const M=v.inHTML;v.inHTML=!0,T.children=R(b,E,v),v.inHTML=M}return v.inAnchor=!1,T}},13:{t:["<"],o:NO(db),u:1,i(g){const b=g[1].trim();return{attrs:u0(b,g[2]||"",i,f),tag:b}}},12:{t:["<!--"],o:NO(AO),u:1,i:()=>({})},14:{t:["!["],o:nh(gK),u:1,i:g=>({alt:Ri(g[1]),target:Ri(g[2]),title:Ri(g[3])})},15:{t:["["],o:to(mK),u:3,i:(g,b,v)=>({children:wK(b,g[1],v),target:Ri(g[2]),title:Ri(g[3])})},16:{t:function(g,b){return!(!b.inline||b.inAnchor)&&g[0]==="<"&&(Ci(g,":")||Ci(g,"@")||Ci(g,"/"))},o:to(KH),u:0,i(g){let b=g[1],v=!1;return Ci(b,"@")&&!Ci(b,"//")&&(v=!0,b=b.replace("mailto:","")),{children:[{text:b,type:"27"}],target:v?"mailto:"+b:b,type:"15"}}},17:{t:(g,b)=>!b.inAnchor&&!t.disableAutoLink&&hb(g,"http"),o:to(HH),u:0,i:g=>({children:[{text:g[1],type:"27"}],target:g[1],title:void 0,type:"15"})},20:TO(0,1),30:TO(0,2),19:{t:[`
|
|
145
|
-
`],o:ua(NH),u:3,i:s0},21:{t:function(g,b){return!b.inline&&!b.simple},o:wo(function(g,b){if(b.inline||b.simple||b.inHTML&&!Ci(g,`
|
|
146
|
-
|
|
147
|
-
`)&&!Ci(b.prevCapture,`
|
|
148
|
-
|
|
149
|
-
`))return null;let v="",_=0;for(;;){const E=g.indexOf(`
|
|
150
|
-
`,_),R=g.slice(_,E===-1?void 0:E+1),C=g[_];if((C===">"||C==="#"||C==="|"||C==="`"||C==="~"||C==="*"||C==="-"||C==="_"||C===" ")&&PO(s,R)||(v+=R,E===-1||!R.trim()))break;_=E+1}const x=zc(v);return x===""?null:[v,,x]}),u:3,i:xK},22:{t:["["],o:to(YH),u:0,i:g=>(m[g[1]]={target:g[2],title:g[4]},{})},23:{t:["!["],o:nh(WH),u:0,i:g=>({alt:g[1]?Ri(g[1]):void 0,ref:g[2]})},24:{t:g=>g[0]==="["&&!Ci(g,"]("),o:to(XH),u:0,i:(g,b,v)=>({children:b(g[1],v),fallbackChildren:g[0],ref:g[2]})},25:{t:["|"],o:ua($O),u:1,i:bK},27:{o:wo(function(g,b){let v;return hb(g,":")&&(v=iK.exec(g)),v||sK.exec(g)}),u:4,i(g){const b=g[0];return{text:Ci(b,"&")?b.replace(UH,(v,_)=>t.namedCodesToUnicode[_]||v):b}}},34:{t:["*","_","~","="],o:wo(EH),u:2,i:(g,b,v)=>({children:b(g[2],v),tag:g[1]})},28:{t:["\\"],o:nh(aK),u:1,i:g=>({text:g[1],type:"27"})}};t.disableParsingRawHTML===!0&&(delete p[11],delete p[13]);const y=(function(g){var b=Object.keys(g);function v(_,x){var E=[];if(x.prevCapture=x.prevCapture||"",_.trim())for(;_;)for(var R=0;R<b.length;){var C=b[R],$=g[C];if(!$.t||vK(_,x,$.t)){var A=$.o(_,x);if(A&&A[0]){_=_.substring(A[0].length);var T=$.i(A,v,x);x.prevCapture+=A[0],T.type||(T.type=C),E.push(T);break}R++}else R++}return x.prevCapture="",E}return b.sort(function(_,x){return g[_].u-g[x].u||(_<x?-1:1)}),function(_,x){return v((function(E){return E.replace(PH,`
|
|
151
|
-
`).replace(FH,"").replace(ZH," ")})(_),x)}})(p),S=(function(g,b,v,_,x){function E(R){return Array.isArray(R)?R.map(C=>"text"in C?C.text:""):"text"in R?R.text:""}return function R(C,$={}){const A=($.renderDepth||0)+1;if(A>2500)return E(C);$.renderDepth=A;try{if(Array.isArray(C)){const M=$.key,D=[];let j=!1;for(let I=0;I<C.length;I++){$.key=I;const L=R(C[I],$),K=MO(L);K&&j?D[D.length-1]+=L:L!==null&&D.push(L),j=K}return $.key=M,$.renderDepth=A-1,D}const T=(function(M,D,j){const I=()=>(function(L,K,G,q,Q,W,ne){switch(L.type){case"0":{const X={key:G.key};return L.alert&&(X.className="markdown-alert-"+W(L.alert.toLowerCase(),Sc),L.children.unshift({attrs:{},children:[{type:"27",text:L.alert}],noInnerParse:!0,type:"11",tag:"header"})),q("blockquote",X,K(L.children,G))}case"1":return q("br",{key:G.key});case"2":return q("hr",{key:G.key});case"3":return q("pre",{key:G.key},q("code",Mi({},L.attrs,{className:L.lang?"lang-"+L.lang:""}),L.text));case"5":return q("code",{key:G.key},L.text);case"7":return q("a",{key:G.key,href:Q(L.target,"a","href")},q("sup",{key:G.key},L.text));case"8":return q("input",{checked:L.completed,key:G.key,readOnly:!0,type:"checkbox"});case"9":return q("h"+L.level,{id:L.id,key:G.key},K(L.children,G));case"11":return q(L.tag,Mi({key:G.key},L.attrs),L.text||(L.children?K(L.children,G):""));case"13":return q(L.tag,Mi({},L.attrs,{key:G.key}));case"14":return q("img",{key:G.key,alt:L.alt||void 0,title:L.title||void 0,src:Q(L.target,"img","src")});case"15":return q("a",{key:G.key,href:Q(L.target,"a","href"),title:L.title},K(L.children,G));case"23":return ne[L.ref]?q("img",{key:G.key,alt:L.alt,src:Q(ne[L.ref].target,"img","src"),title:ne[L.ref].title}):null;case"24":return ne[L.ref]?q("a",{key:G.key,href:Q(ne[L.ref].target,"a","href"),title:ne[L.ref].title},K(L.children,G)):q("span",{key:G.key},L.fallbackChildren);case"25":{const X=L;return q("table",{key:G.key},q("thead",null,q("tr",null,X.header.map(function(P,B){return q("th",{key:B,style:jO(X,B)},K(P,G))}))),q("tbody",null,X.cells.map(function(P,B){return q("tr",{key:B},P.map(function(U,k){return q("td",{key:k,style:jO(X,k)},K(U,G))}))})))}case"27":return L.text;case"34":return q(L.tag,{key:G.key},K(L.children,G));case"20":case"30":return q(L.ordered?"ol":"ul",{key:G.key,start:L.type==="20"?L.start:void 0},L.items.map(function(X,P){return q("li",{key:P},K(X,G))}));case"19":return`
|
|
152
|
-
`;case"21":return q("p",{key:G.key},K(L.children,G));default:return null}})(M,D,j,b,v,_,x);return g?g(I,M,D,j):I()})(C,R,$);return $.renderDepth=A-1,T}catch(T){if(T instanceof RangeError&&T.message.includes("Maximum call stack"))return E(C);throw T}}})(t.renderRule,c,i,n,m);return f(e)}const $f=e=>{let{children:t,options:n}=e,i=(function(o,s){if(o==null)return{};var u={};for(var c in o)if({}.hasOwnProperty.call(o,c)){if(s.indexOf(c)!==-1)continue;u[c]=o[c]}return u})(e,xH);return RK(t??"",Mi({},n,{wrapperProps:Mi({},n==null?void 0:n.wrapperProps,i)}))},dj=Symbol("remove-this-key"),IO=Symbol("reset");function OK(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function AK(e,t){switch(t){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};case"string":default:return e(St.NewStringDefault)}}function $K(e){const{fieldPathId:t,schema:n,registry:i,uiSchema:o,errorSchema:s,formData:u,onChange:c,onBlur:f,onFocus:d,disabled:m,readonly:p,required:y,hideError:S,propertyName:g,handleKeyRename:b,handleRemoveProperty:v,addedByAdditionalProperties:_}=e,[x,E]=z.useState(!1),{globalFormOptions:R,fields:C}=i,{SchemaField:$}=C,A=Fs(Jr(g,R,t.path)),T=z.useCallback((I,L,K,G)=>{I===void 0&&_&&(I=""),c(I,L,K,G)},[c,_]),M=z.useCallback(I=>{g!==I&&E(!0),b(g,I)},[g,b]),D=z.useCallback(I=>{const{target:{value:L}}=I;M(L)},[M]),j=z.useCallback(()=>{v(g)},[g,v]);return N.jsx($,{name:g,required:y,schema:n,uiSchema:o,errorSchema:s,fieldPathId:A,formData:u,wasPropertyKeyModified:x,onKeyRename:M,onKeyRenameBlur:D,onRemoveProperty:j,onChange:T,onBlur:f,onFocus:d,registry:i,disabled:m,readonly:p,hideError:S})}function TK(e){const{schema:t,uiSchema:n={},formData:i,errorSchema:o,fieldPathId:s,name:u,required:c=!1,disabled:f,readonly:d,hideError:m,onBlur:p,onFocus:y,onChange:S,registry:g,title:b}=e,{fields:v,schemaUtils:_,translateString:x,globalUiOptions:E}=g,{OptionalDataControlsField:R}=v,C=_.retrieveSchema(t,i,!0),$=Ue(n,E),{properties:A={}}=C,T=e.childFieldPathId??s,M=$.title??C.title??b??u,D=$.description??C.description,j=Af(g,C,c,n),I=yu(i);let L=[];const K=z.useCallback((P,B)=>{const{duplicateKeySuffixSeparator:U="-"}=Ue(n,E);let k=0,V=P;for(;ut(B,V);)V=`${P}${U}${++k}`;return V},[n,E]),G=z.useCallback(()=>{if(!(C.additionalProperties||C.patternProperties))return;const{translateString:P}=g,B={...i},U=K("newKey",B);if(C.patternProperties)Nt(B,U,null);else{let k,V,J;if(pt(C.additionalProperties)){k=C.additionalProperties.type,V=C.additionalProperties.const,J=C.additionalProperties.default;let ie=C.additionalProperties;if(Bt in ie){const{schemaUtils:se}=g;ie=se.retrieveSchema({[Bt]:ie[Bt]},i),k=ie.type,V=ie.const,J=ie.default}!k&&(ht in ie||Xe in ie)&&(k="object")}const le=V??J??AK(P,k);Nt(B,U,le)}S(B,T.path)},[i,S,g,T,K,C]),q=z.useCallback((P,B)=>{if(P!==B){const U=K(B,i),k={...i},V={[P]:U},J=Object.keys(k).map(ie=>({[V[ie]||ie]:k[ie]})),le=Object.assign({},...J);S(le,T.path)}},[i,S,T,K]),Q=z.useCallback(P=>{S(dj,[...T.path,P])},[S,T]);if(!j||I)try{const P=Object.keys(A);L=x8(P,$.order)}catch(P){return N.jsxs("div",{children:[N.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:N.jsx($f,{options:{disableParsingRawHTML:!0},children:x(St.InvalidObjectField,[u||"root",P.message])})}),N.jsx("pre",{children:JSON.stringify(C)})]})}const W=Qe("ObjectFieldTemplate",g,$),ne=j?N.jsx(R,{...e,fieldPathId:T,schema:C}):void 0,X={title:$.label===!1?"":M,description:$.label===!1?void 0:D,properties:L.map(P=>{const B=ut(C,[bt,P,xo]),U=B?n.additionalProperties:n[P],k=Ue(U).widget==="hidden";return{content:N.jsx($K,{propertyName:P,required:OK(C,P),schema:xe(C,[bt,P],{}),uiSchema:U,errorSchema:xe(o,[P]),fieldPathId:T,formData:xe(i,[P]),handleKeyRename:q,handleRemoveProperty:Q,addedByAdditionalProperties:B,onChange:S,onBlur:p,onFocus:y,registry:g,disabled:f,readonly:d,hideError:m},P),name:P,readonly:d,disabled:f,required:c,hidden:k}}),readonly:d,disabled:f,required:c,fieldPathId:s,uiSchema:n,errorSchema:o,schema:C,formData:i,registry:g,optionalDataControl:ne,className:j?"rjsf-optional-object-field":void 0};return N.jsx(W,{...X,onAddProperty:G})}function MK(e){const{schema:t,uiSchema:n={},formData:i,disabled:o=!1,readonly:s=!1,onChange:u,errorSchema:c,fieldPathId:f,registry:d}=e,{globalUiOptions:m={},schemaUtils:p,translateString:y}=d,S=Ue(n,m),g=Qe("OptionalDataControlsTemplate",d,S),b=yu(i);let v,_,x,E;if(o||s)v=r0(f,"Msg"),_=b?void 0:y(St.OptionalObjectEmptyMsg);else{const R=b?St.OptionalObjectRemove:St.OptionalObjectAdd;_=y(R),b?(v=r0(f,"Remove"),E=()=>u(void 0,f.path,c)):(v=r0(f,"Add"),x=()=>{let C=p.getDefaultFormState(t,i,"excludeObjectChildren");C===void 0&&(C=gi(t)==="array"?[]:{}),u(C,f.path,c)})}return _&&N.jsx(g,{id:v,registry:d,schema:t,uiSchema:n,label:_,onAddClick:x,onRemoveClick:E})}const DK={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function jK(e,t,n){const i=t.field,{fields:o}=n;if(typeof i=="function")return i;if(typeof i=="string"&&i in o)return o[i];const s=gi(e),u=Array.isArray(s)?s[0]:s||"",c=e.$id;let f=DK[u];return c&&c in o&&(f=c),!f&&(e.anyOf||e.oneOf)?()=>null:f in o?o[f]:o.FallbackField}function NK(e){const{schema:t,fieldPathId:n,uiSchema:i,formData:o,errorSchema:s,name:u,onChange:c,onKeyRename:f,onKeyRenameBlur:d,onRemoveProperty:m,required:p=!1,registry:y,wasPropertyKeyModified:S=!1}=e,{schemaUtils:g,globalFormOptions:b,globalUiOptions:v,fields:_}=y,{AnyOfField:x,OneOfField:E}=_,R=Ue(i,v),C=Qe("FieldTemplate",y,R),$=Qe("DescriptionFieldTemplate",y,R),A=Qe("FieldHelpTemplate",y,R),T=Qe("FieldErrorTemplate",y,R),M=g.retrieveSchema(t,o),D=n[Ft],j=z.useCallback((ye,Oe,Re,Ce)=>c(ye,Oe,Re,Ce||D),[D,c]),I=jK(M,R,y),L=!!(R.disabled??e.disabled),K=!!(R.readonly??(e.readonly||e.schema.readOnly||M.readOnly)),G=R.hideError,q=G===void 0?e.hideError:!!G,Q=!!(R.autofocus??e.autofocus);if(Object.keys(M).length===0)return null;let W=g.getDisplayLabel(M,i,v);const ne=R.field&&R.fieldReplacesAnyOrOneOf===!0;let X,P,B={fieldPathId:n};if((ht in M||Xe in M)&&!ne&&!g.isSelect(M)){M[ht]?(X=x,P=M[ht].map(Re=>g.retrieveSchema(pt(Re)?Re:{},o))):M[Xe]&&(X=E,P=M[Xe].map(Re=>g.retrieveSchema(pt(Re)?Re:{},o)));const ye=Af(y,M,p,i),Oe=yu(o);W=W&&(!ye||Oe),B={childFieldPathId:n,fieldPathId:Jr("XxxOf",b,n)}}const{__errors:U,...k}=s||{},V=Wc(i,["ui:classNames","classNames","ui:style"]);Co in V&&(V[Co]=Wc(V[Co],["classNames","style"]));const J=N.jsx(I,{...e,onChange:j,...B,schema:M,uiSchema:V,disabled:L,readonly:K,hideError:q,autofocus:Q,errorSchema:k,rawErrors:U}),le=n[Ft];let ie;S?ie=u:ie=xo in M?u:R.title||e.schema.title||M.title||e.title||u;const se=R.description||e.schema.description||M.description||"",fe=R.help,Y=R.widget==="hidden",Z=["rjsf-field",`rjsf-field-${gi(M)}`];!q&&U&&U.length>0&&Z.push("rjsf-field-error"),R.classNames&&Z.push(R.classNames);const ue=N.jsx(A,{help:fe,fieldPathId:n,schema:M,uiSchema:i,hasErrors:!q&&U&&U.length>0,registry:y}),ae=q||X&&!g.isSelect(M)?void 0:N.jsx(T,{errors:U,errorSchema:s,fieldPathId:n,schema:M,uiSchema:i,registry:y}),Se={description:N.jsx($,{id:Of(le),description:se,schema:M,uiSchema:i,registry:y}),rawDescription:se,help:ue,rawHelp:typeof fe=="string"?fe:void 0,errors:ae,rawErrors:q?void 0:U,fieldPathId:n,id:le,label:ie,hidden:Y,onChange:c,onKeyRename:f,onKeyRenameBlur:d,onRemoveProperty:m,required:p,disabled:L,readonly:K,hideError:q,displayLabel:W,classNames:Z.join(" ").trim(),style:R.style,formData:o,schema:M,uiSchema:i,registry:y};return N.jsx(C,{...Se,children:N.jsxs(N.Fragment,{children:[J,X&&N.jsx(X,{name:u,disabled:L,readonly:K,hideError:q,errorSchema:s,formData:o,fieldPathId:n,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:P,registry:y,required:p,schema:M,uiSchema:i})]})})}class PK extends z.Component{shouldComponentUpdate(t){const{registry:{globalFormOptions:n}}=this.props,{experimental_componentUpdateStrategy:i="customDeep"}=n;return WD(this,t,this.state,i)}render(){return N.jsx(NK,{...this.props})}}function IK(e){const{schema:t,name:n,uiSchema:i,fieldPathId:o,formData:s,required:u,disabled:c=!1,readonly:f=!1,autofocus:d=!1,onChange:m,onBlur:p,onFocus:y,registry:S,rawErrors:g,hideError:b,title:v}=e,{title:_,format:x}=t,{widgets:E,schemaUtils:R,globalUiOptions:C}=S,$=R.isSelect(t)?Jl(t,i):void 0;let A=$?"select":"text";x&&S8(t,x,E)&&(A=x);const{widget:T=A,placeholder:M="",title:D,...j}=Ue(i),I=R.getDisplayLabel(t,i,C),L=D??v??_??n,K=ki(t,T,E),G=z.useCallback((q,Q,W)=>m(q,o.path,Q,W),[m,o]);return N.jsx(K,{options:{...j,enumOptions:$},schema:t,uiSchema:i,id:o.$id,name:n,label:L,hideLabel:!I,hideError:b,value:s,onChange:G,onBlur:p,onFocus:y,required:u,disabled:c,readonly:f,autofocus:d,registry:S,placeholder:M,rawErrors:g,htmlName:o.name})}function zK(e){const{formData:t,onChange:n,fieldPathId:i}=e;return z.useEffect(()=>{t===void 0&&n(null,i.path)},[i,t,n]),null}function FK(){return{AnyOfField:yO,ArrayField:K8,BooleanField:G8,FallbackField:X8,LayoutGridField:FS,LayoutHeaderField:vH,LayoutMultiSchemaField:yH,NumberField:_H,ObjectField:TK,OneOfField:yO,OptionalDataControlsField:MK,SchemaField:PK,StringField:IK,NullField:zK}}function kK(e){const{fieldPathId:t,description:n,registry:i,schema:o,uiSchema:s}=e,u=Ue(s,i.globalUiOptions),{label:c=!0}=u;if(!n||!c)return null;const f=Qe("DescriptionFieldTemplate",i,u);return N.jsx(f,{id:Of(t),description:n,schema:o,uiSchema:s,registry:i})}function LK(e){const{children:t,className:n,buttonsProps:i,displayLabel:o,hasDescription:s,hasToolbar:u,registry:c,uiSchema:f}=e,d=Ue(f),m=Qe("ArrayFieldItemButtonsTemplate",c,d),p={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},y=s?31:9,S={display:"flex",alignItems:o?"center":"baseline"},g={display:"flex",justifyContent:"flex-end",marginTop:o?`${y}px`:0};return N.jsxs("div",{className:n,style:S,children:[N.jsx("div",{className:u?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:t}),u&&N.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:N.jsx("div",{className:"btn-group",style:g,children:N.jsx(m,{...i,style:p})})})]})}function qK(e){const{disabled:t,hasCopy:n,hasMoveDown:i,hasMoveUp:o,hasRemove:s,fieldPathId:u,onCopyItem:c,onRemoveItem:f,onMoveDownItem:d,onMoveUpItem:m,readonly:p,registry:y,uiSchema:S}=e,{CopyButton:g,MoveDownButton:b,MoveUpButton:v,RemoveButton:_}=y.templates.ButtonTemplates;return N.jsxs(N.Fragment,{children:[(o||i)&&N.jsx(v,{id:hs(u,"moveUp"),className:"rjsf-array-item-move-up",disabled:t||p||!o,onClick:m,uiSchema:S,registry:y}),(o||i)&&N.jsx(b,{id:hs(u,"moveDown"),className:"rjsf-array-item-move-down",disabled:t||p||!i,onClick:d,uiSchema:S,registry:y}),n&&N.jsx(g,{id:hs(u,"copy"),className:"rjsf-array-item-copy",disabled:t||p,onClick:c,uiSchema:S,registry:y}),s&&N.jsx(_,{id:hs(u,"remove"),className:"rjsf-array-item-remove",disabled:t||p,onClick:f,uiSchema:S,registry:y})]})}function UK(e){const{canAdd:t,className:n,disabled:i,fieldPathId:o,uiSchema:s,items:u,optionalDataControl:c,onAddClick:f,readonly:d,registry:m,required:p,schema:y,title:S}=e,g=Ue(s),b=Qe("ArrayFieldDescriptionTemplate",m,g),v=Qe("ArrayFieldTitleTemplate",m,g),_=!d&&!i,{ButtonTemplates:{AddButton:x}}=m.templates;return N.jsxs("fieldset",{className:n,id:o.$id,children:[N.jsx(v,{fieldPathId:o,title:g.title||S,required:p,schema:y,uiSchema:s,registry:m,optionalDataControl:_?c:void 0}),N.jsx(b,{fieldPathId:o,description:g.description||y.description,schema:y,uiSchema:s,registry:m}),_?void 0:c,N.jsx("div",{className:"row array-item-list",children:u}),t&&N.jsx(x,{id:hs(o,"add"),className:"rjsf-array-item-add",onClick:f,disabled:i||d,uiSchema:s,registry:m})]})}function BK(e){const{fieldPathId:t,title:n,schema:i,uiSchema:o,required:s,registry:u,optionalDataControl:c}=e,f=Ue(o,u.globalUiOptions),{label:d=!0}=f;if(!n||!d)return null;const m=Qe("TitleFieldTemplate",u,f);return N.jsx(m,{id:NS(t),title:n,required:s,schema:i,uiSchema:o,registry:u,optionalDataControl:c})}function VK(e){const{id:t,name:n,htmlName:i,value:o,readonly:s,disabled:u,autofocus:c,onBlur:f,onFocus:d,onChange:m,onChangeOverride:p,options:y,schema:S,uiSchema:g,registry:b,rawErrors:v,type:_,hideLabel:x,hideError:E,...R}=e,{ClearButton:C}=b.templates.ButtonTemplates;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const $={...R,...c8(S,_,y)};let A;$.type==="number"||$.type==="integer"?A=o||o===0?o:"":A=o??"";const T=z.useCallback(({target:{value:I}})=>m(I===""?y.emptyValue:I),[m,y]),M=z.useCallback(({target:I})=>f(t,I&&I.value),[f,t]),D=z.useCallback(({target:I})=>d(t,I&&I.value),[d,t]),j=z.useCallback(I=>{I.preventDefault(),I.stopPropagation(),m(y.emptyValue??"")},[m,y.emptyValue]);return N.jsxs(N.Fragment,{children:[N.jsx("input",{id:t,name:i||t,className:"form-control",readOnly:s,disabled:u,autoFocus:c,value:A,...$,list:S.examples?cb(t):void 0,onChange:p||T,onBlur:M,onFocus:D,"aria-describedby":zs(t,!!S.examples)}),y.allowClearTextInputs&&!s&&!u&&A&&N.jsx(C,{registry:b,onClick:j}),Array.isArray(S.examples)&&N.jsx("datalist",{id:cb(t),children:S.examples.concat(S.default&&!S.examples.includes(S.default)?[S.default]:[]).map(I=>N.jsx("option",{value:I},I))},`datalist_${t}`)]})}function HK({uiSchema:e}){const{submitText:t,norender:n,props:i={}}=f8(e);return n?null:N.jsx("div",{children:N.jsx("button",{type:"submit",...i,className:`btn btn-info ${i.className||""}`,children:t})})}function jo(e){const{iconType:t="default",icon:n,className:i,uiSchema:o,registry:s,...u}=e;return N.jsx("button",{type:"button",className:`btn btn-${t} ${i}`,...u,children:N.jsx("i",{className:`glyphicon glyphicon-${n}`})})}function KK(e){const{registry:{translateString:t}}=e;return N.jsx(jo,{title:t(St.CopyButton),...e,icon:"copy"})}function GK(e){const{registry:{translateString:t}}=e;return N.jsx(jo,{title:t(St.MoveDownButton),...e,icon:"arrow-down"})}function QK(e){const{registry:{translateString:t}}=e;return N.jsx(jo,{title:t(St.MoveUpButton),...e,icon:"arrow-up"})}function YK(e){const{registry:{translateString:t}}=e;return N.jsx(jo,{title:t(St.RemoveButton),...e,iconType:"danger",icon:"remove"})}function WK({id:e,className:t,onClick:n,disabled:i,registry:o,...s}){const{translateString:u}=o;return N.jsx(jo,{id:e,iconType:"default",icon:"remove",className:"btn-clear col-xs-12",title:u(St.ClearButton),onClick:n,disabled:i,registry:o,...s})}function XK({id:e,className:t,onClick:n,disabled:i,registry:o}){const{translateString:s}=o;return N.jsx("div",{className:"row",children:N.jsx("p",{className:`col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${t}`,children:N.jsx(jo,{id:e,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:s(St.AddButton),onClick:n,disabled:i,registry:o})})})}function JK(){return{SubmitButton:HK,AddButton:XK,CopyButton:KK,MoveDownButton:GK,MoveUpButton:QK,RemoveButton:YK,ClearButton:WK}}const hj=jS();function pj({description:e,registry:t,uiSchema:n={}}){const{globalUiOptions:i}=t;return Ue(n,i).enableMarkdownInDescription&&typeof e=="string"?N.jsx($f,{options:{disableParsingRawHTML:!0},"data-testid":hj.markdown,children:e}):e}pj.TEST_IDS=hj;function ZK(e){const{id:t,description:n,registry:i,uiSchema:o}=e;return n?N.jsx("div",{id:t,className:"field-description",children:N.jsx(pj,{description:n,registry:i,uiSchema:o})}):null}function e7({errors:e,registry:t}){const{translateString:n}=t;return N.jsxs("div",{className:"panel panel-danger errors",children:[N.jsx("div",{className:"panel-heading",children:N.jsx("h3",{className:"panel-title",children:n(St.ErrorsLabel)})}),N.jsx("ul",{className:"list-group",children:e.map((i,o)=>N.jsx("li",{className:"list-group-item text-danger",children:i.stack},o))})]})}function t7(e){const{schema:t,registry:n,typeSelector:i,schemaField:o}=e,s=Qe("MultiSchemaFieldTemplate",n);return N.jsx(s,{selector:i,optionSchemaField:o,schema:t,registry:n})}const n7="*";function mj(e){const{label:t,required:n,id:i}=e;return t?N.jsxs("label",{className:"control-label",htmlFor:i,children:[t,n&&N.jsx("span",{className:"required",children:n7})]}):null}function r7(e){const{id:t,label:n,children:i,errors:o,help:s,description:u,hidden:c,required:f,displayLabel:d,registry:m,uiSchema:p}=e,y=Ue(p),S=Qe("WrapIfAdditionalTemplate",m,y);if(c)return N.jsx("div",{className:"hidden",children:i});const g=y.widget==="checkbox";return N.jsxs(S,{...e,children:[d&&!g&&N.jsx(mj,{label:n,required:f,id:t}),d&&u?u:null,i,o,s]})}function i7(e){const{errors:t=[],fieldPathId:n}=e;if(t.length===0)return null;const i=GD(n);return N.jsx("div",{children:N.jsx("ul",{id:i,className:"error-detail bs-callout bs-callout-info",children:t.filter(o=>!!o).map((o,s)=>N.jsx("li",{className:"text-danger",children:o},s))})})}const gj=jS();function vj({help:e,registry:t,uiSchema:n={}}){const{globalUiOptions:i}=t;return Ue(n,i).enableMarkdownInHelp&&typeof e=="string"?N.jsx($f,{options:{disableParsingRawHTML:!0},"data-testid":gj.markdown,children:e}):e}vj.TEST_IDS=gj;function a7(e){const{fieldPathId:t,help:n,uiSchema:i,registry:o}=e;return n?N.jsx("div",{id:QD(t),className:"help-block",children:N.jsx(vj,{help:n,registry:o,uiSchema:i})}):null}function o7(e){const{children:t,column:n,className:i,...o}=e;return N.jsx("div",{className:i,...o,children:t})}function s7(e){const{selector:t,optionSchemaField:n}=e;return N.jsxs("div",{className:"panel panel-default panel-body",children:[N.jsx("div",{className:"form-group",children:t}),n]})}function l7(e){const{className:t,description:n,disabled:i,formData:o,fieldPathId:s,onAddProperty:u,optionalDataControl:c,properties:f,readonly:d,registry:m,required:p,schema:y,title:S,uiSchema:g}=e,b=Ue(g),v=Qe("TitleFieldTemplate",m,b),_=Qe("DescriptionFieldTemplate",m,b);if((y.oneOf||y.anyOf)&&!y.properties&&f.length===0)return null;const E=!d&&!i,{ButtonTemplates:{AddButton:R}}=m.templates;return N.jsxs("fieldset",{className:t,id:s.$id,children:[S&&N.jsx(v,{id:NS(s),title:S,required:p,schema:y,uiSchema:g,registry:m,optionalDataControl:E?c:void 0}),n&&N.jsx(_,{id:Of(s),description:n,schema:y,uiSchema:g,registry:m}),E?void 0:c,f.map(C=>C.content),JB(y,g,o)&&N.jsx(R,{id:hs(s,"add"),className:"rjsf-object-property-expand",onClick:u,disabled:i||d,uiSchema:g,registry:m})]})}function u7(e){const{id:t,registry:n,label:i,onAddClick:o,onRemoveClick:s}=e;return o?N.jsx(jo,{id:t,registry:n,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:o,title:i}):s?N.jsx(jo,{id:t,registry:n,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:s,title:i}):N.jsx("em",{id:t,children:i})}const c7="*";function f7(e){const{id:t,title:n,required:i,optionalDataControl:o}=e;return N.jsxs("legend",{id:t,children:[n,i&&N.jsx("span",{className:"required",children:c7}),o&&N.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:o})]})}function d7(e){const{schema:t,fieldPathId:n,reason:i,registry:o}=e,{translateString:s}=o;let u=St.UnsupportedField;const c=[];return n&&n.$id&&(u=St.UnsupportedFieldWithId,c.push(n.$id)),i&&(u=u===St.UnsupportedField?St.UnsupportedFieldWithReason:St.UnsupportedFieldWithIdAndReason,c.push(i)),N.jsxs("div",{className:"unsupported-field",children:[N.jsx("p",{children:N.jsx($f,{options:{disableParsingRawHTML:!0},children:s(u,c)})}),t&&N.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function h7(e){const{id:t,classNames:n,style:i,disabled:o,displayLabel:s,label:u,onKeyRenameBlur:c,onRemoveProperty:f,rawDescription:d,readonly:m,required:p,schema:y,hideError:S,rawErrors:g,children:b,uiSchema:v,registry:_}=e,{templates:x,translateString:E}=_,{RemoveButton:R}=x.ButtonTemplates,C=E(St.KeyLabel,[u]),$=xo in y,A=!!d,T=["form-group",n];!S&&g&&g.length>0&&T.push("has-error has-danger");const M=T.join(" ").trim();if(!$)return N.jsx("div",{className:M,style:i,children:b});const D=A?46:26;return N.jsx("div",{className:M,style:i,children:N.jsxs("div",{className:"row",children:[N.jsx("div",{className:"col-xs-5 form-additional",children:N.jsxs("div",{className:"form-group",children:[s&&N.jsx(mj,{label:C,required:p,id:`${t}-key`}),s&&d&&N.jsx("div",{children:" "}),N.jsx("input",{className:"form-control",type:"text",id:`${t}-key`,onBlur:c,defaultValue:u})]})}),N.jsx("div",{className:"form-additional form-group col-xs-5",children:b}),N.jsx("div",{className:"col-xs-2",style:{marginTop:s?`${D}px`:void 0},children:N.jsx(R,{id:hs(t,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:o||m,onClick:f,uiSchema:v,registry:_})})]})})}function p7(){return{ArrayFieldDescriptionTemplate:kK,ArrayFieldItemTemplate:LK,ArrayFieldItemButtonsTemplate:qK,ArrayFieldTemplate:UK,ArrayFieldTitleTemplate:BK,ButtonTemplates:JK(),BaseInputTemplate:VK,DescriptionFieldTemplate:ZK,ErrorListTemplate:e7,FallbackFieldTemplate:t7,FieldTemplate:r7,FieldErrorTemplate:i7,FieldHelpTemplate:a7,GridTemplate:o7,MultiSchemaFieldTemplate:s7,ObjectFieldTemplate:l7,OptionalDataControlsTemplate:u7,TitleFieldTemplate:f7,UnsupportedFieldTemplate:d7,WrapIfAdditionalTemplate:h7}}function m7(e){const{disabled:t=!1,readonly:n=!1,autofocus:i=!1,options:o,id:s,name:u,registry:c,onBlur:f,onFocus:d}=e,{translateString:m}=c,{elements:p,handleChange:y,handleClear:S,handleSetNow:g}=A8(e);return N.jsxs("ul",{className:"list-inline",children:[p.map((b,v)=>N.jsx("li",{className:"list-inline-item",children:N.jsx(O8,{rootId:s,name:u,select:y,...b,disabled:t,readonly:n,registry:c,onBlur:f,onFocus:d,autofocus:i&&v===0})},v)),(o.hideNowButton!=="undefined"?!o.hideNowButton:!0)&&N.jsx("li",{className:"list-inline-item",children:N.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:g,children:m(St.NowLabel)})}),(o.hideClearButton!=="undefined"?!o.hideClearButton:!0)&&N.jsx("li",{className:"list-inline-item",children:N.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:S,children:m(St.ClearLabel)})})]})}function g7({time:e=!0,...t}){const{AltDateWidget:n}=t.registry.widgets;return N.jsx(n,{time:e,...t})}function v7({schema:e,uiSchema:t,options:n,id:i,value:o,disabled:s,readonly:u,label:c,hideLabel:f,autofocus:d=!1,onBlur:m,onFocus:p,onChange:y,registry:S,htmlName:g}){const b=Qe("DescriptionFieldTemplate",S,n),v=ap(e),_=z.useCallback(A=>y(A.target.checked),[y]),x=z.useCallback(A=>m(i,A.target.checked),[m,i]),E=z.useCallback(A=>p(i,A.target.checked),[p,i]),$=Ue(t).widget==="checkbox"?void 0:n.description??e.description;return N.jsxs("div",{className:`checkbox ${s||u?"disabled":""}`,children:[!f&&$&&N.jsx(b,{id:Of(i),description:$,schema:e,uiSchema:t,registry:S}),N.jsxs("label",{children:[N.jsx("input",{type:"checkbox",id:i,name:g||i,checked:typeof o>"u"?!1:o,required:v,disabled:s||u,autoFocus:d,onChange:_,onBlur:x,onFocus:E,"aria-describedby":zs(i)}),w8(N.jsx("span",{children:c}),f)]})]})}function y7({id:e,disabled:t,options:{inline:n=!1,enumOptions:i,enumDisabled:o,emptyValue:s},value:u,autofocus:c=!1,readonly:f,onChange:d,onBlur:m,onFocus:p,htmlName:y}){const S=Array.isArray(u)?u:[u],g=z.useCallback(({target:v})=>m(e,Ii(v&&v.value,i,s)),[m,e,i,s]),b=z.useCallback(({target:v})=>p(e,Ii(v&&v.value,i,s)),[p,e,i,s]);return N.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(i)&&i.map((v,_)=>{const x=MS(v.value,S),E=Array.isArray(o)&&o.indexOf(v.value)!==-1,R=t||E||f?"disabled":"",C=A=>{A.target.checked?d(n8(_,S,i)):d(e8(_,S,i))},$=N.jsxs("span",{children:[N.jsx("input",{type:"checkbox",id:YD(e,_),name:y||e,checked:x,value:String(_),disabled:t||E||f,autoFocus:c&&_===0,onChange:C,onBlur:g,onFocus:b,"aria-describedby":zs(e)}),N.jsx("span",{children:v.label})]});return n?N.jsx("label",{className:`checkbox-inline ${R}`,children:$},_):N.jsx("div",{className:`checkbox ${R}`,children:N.jsx("label",{children:$})},_)})})}function b7(e){const{disabled:t,readonly:n,options:i,registry:o}=e,s=Qe("BaseInputTemplate",o,i);return N.jsx(s,{type:"color",...e,disabled:t||n})}function S7(e){const{onChange:t,options:n,registry:i}=e,o=Qe("BaseInputTemplate",i,n),s=z.useCallback(u=>t(u||void 0),[t]);return N.jsx(o,{type:"date",...e,onChange:s})}function _7(e){const{onChange:t,value:n,options:i,registry:o}=e,s=Qe("BaseInputTemplate",o,i);return N.jsx(s,{type:"datetime-local",...e,value:j8(n),onChange:u=>t(E8(u))})}function w7(e){const{options:t,registry:n}=e,i=Qe("BaseInputTemplate",n,t);return N.jsx(i,{type:"email",...e})}function E7({fileInfo:e,registry:t}){const{translateString:n}=t,{dataURL:i,type:o,name:s}=e;return i?["image/jpeg","image/png"].includes(o)?N.jsx("img",{src:i,style:{maxWidth:"100%"},className:"file-preview"}):N.jsxs(N.Fragment,{children:[" ",N.jsx("a",{download:`preview-${s}`,href:i,className:"file-download",children:n(St.PreviewLabel)})]}):null}function x7({filesInfo:e,registry:t,preview:n,onRemove:i,options:o}){if(e.length===0)return null;const{translateString:s}=t,{RemoveButton:u}=Qe("ButtonTemplates",t,o);return N.jsx("ul",{className:"file-info",children:e.map((c,f)=>{const{name:d,size:m,type:p}=c,y=()=>i(f);return N.jsxs("li",{children:[N.jsx($f,{children:s(St.FilesInfo,[d,p,String(m)])}),n&&N.jsx(E7,{fileInfo:c,registry:t}),N.jsx(u,{onClick:y,registry:t})]},f)})})}function C7(e){const{disabled:t,readonly:n,required:i,multiple:o,onChange:s,value:u,options:c,registry:f}=e,{filesInfo:d,handleChange:m,handleRemove:p}=D8(u,s,o),y=Qe("BaseInputTemplate",f,c),S=g=>{g.target.files&&m(g.target.files)};return N.jsxs("div",{children:[N.jsx(y,{...e,disabled:t||n,type:"file",required:u?!1:i,onChangeOverride:S,value:"",accept:c.accept?String(c.accept):void 0}),N.jsx(x7,{filesInfo:d,onRemove:p,registry:f,preview:c.filePreview,options:c})]})}function R7({id:e,value:t,htmlName:n}){return N.jsx("input",{type:"hidden",id:e,name:n||e,value:typeof t>"u"?"":t})}function O7(e){const{options:t,registry:n}=e,i=Qe("BaseInputTemplate",n,t);return N.jsx(i,{type:"password",...e})}function A7({options:e,value:t,required:n,disabled:i,readonly:o,autofocus:s=!1,onBlur:u,onFocus:c,onChange:f,id:d,htmlName:m}){const{enumOptions:p,enumDisabled:y,inline:S,emptyValue:g}=e,b=z.useCallback(({target:_})=>u(d,Ii(_&&_.value,p,g)),[u,p,g,d]),v=z.useCallback(({target:_})=>c(d,Ii(_&&_.value,p,g)),[c,p,g,d]);return N.jsx("div",{className:"field-radio-group",id:d,role:"radiogroup",children:Array.isArray(p)&&p.map((_,x)=>{const E=MS(_.value,t),R=Array.isArray(y)&&y.indexOf(_.value)!==-1,C=i||R||o?"disabled":"",$=()=>f(_.value),A=N.jsxs("span",{children:[N.jsx("input",{type:"radio",id:YD(d,x),checked:E,name:m||d,required:n,value:String(x),disabled:i||R||o,autoFocus:s&&x===0,onChange:$,onBlur:b,onFocus:v,"aria-describedby":zs(d)}),N.jsx("span",{children:_.label})]});return S?N.jsx("label",{className:`radio-inline ${C}`,children:A},x):N.jsx("div",{className:`radio ${C}`,children:N.jsx("label",{children:A})},x)})})}function $7(e){const{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return N.jsxs("div",{className:"field-range-wrapper",children:[N.jsx(n,{type:"range",...e}),N.jsx("span",{className:"range-view",children:t})]})}function T7({id:e,value:t,required:n,disabled:i,readonly:o,autofocus:s,onChange:u,onFocus:c,onBlur:f,schema:d,options:m,htmlName:p}){const{stars:y=5,shape:S="star"}=m,g=d.maximum?Math.min(d.maximum,5):Math.min(Math.max(y,1),5),b=d.minimum||0,v=z.useCallback(R=>{!i&&!o&&u(R)},[u,i,o]),_=z.useCallback(R=>{if(c){const C=Number(R.target.dataset.value);c(e,C)}},[c,e]),x=z.useCallback(R=>{if(f){const C=Number(R.target.dataset.value);f(e,C)}},[f,e]),E=R=>S==="heart"?R?"♥":"♡":R?"★":"☆";return N.jsx(N.Fragment,{children:N.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:i||o?"default":"pointer"},children:[[...Array(g)].map((R,C)=>{const $=b+C,A=$<=t;return N.jsx("span",{onClick:()=>v($),onFocus:_,onBlur:x,"data-value":$,tabIndex:i||o?-1:0,role:"radio","aria-checked":$===t,"aria-label":`${$} ${S==="heart"?"heart":"star"}${$===1?"":"s"}`,style:{color:A?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:E(A)},C)}),N.jsx("input",{type:"hidden",id:e,name:p||e,value:t||"",required:n,disabled:i||o,"aria-hidden":"true"})]})})}function c0(e,t){return t?Array.from(e.target.options).slice().filter(n=>n.selected).map(n=>n.value):e.target.value}function M7({schema:e,id:t,options:n,value:i,required:o,disabled:s,readonly:u,multiple:c=!1,autofocus:f=!1,onChange:d,onBlur:m,onFocus:p,placeholder:y,htmlName:S}){const{enumOptions:g,enumDisabled:b,emptyValue:v}=n,_=c?[]:"",x=z.useCallback(A=>{const T=c0(A,c);return p(t,Ii(T,g,v))},[p,t,c,g,v]),E=z.useCallback(A=>{const T=c0(A,c);return m(t,Ii(T,g,v))},[m,t,c,g,v]),R=z.useCallback(A=>{const T=c0(A,c);return d(Ii(T,g,v))},[d,c,g,v]),C=t8(i,g,c),$=!c&&e.default===void 0;return N.jsxs("select",{id:t,name:S||t,multiple:c,role:"combobox",className:"form-control",value:typeof C>"u"?_:C,required:o,disabled:s||u,autoFocus:f,onBlur:E,onFocus:x,onChange:R,"aria-describedby":zs(t),children:[$&&N.jsx("option",{value:"",children:y}),Array.isArray(g)&&g.map(({value:A,label:T},M)=>{const D=b&&b.indexOf(A)!==-1;return N.jsx("option",{value:String(M),disabled:D,children:T},M)})]})}function D7({id:e,options:t={},placeholder:n,value:i,required:o,disabled:s,readonly:u,autofocus:c=!1,onChange:f,onBlur:d,onFocus:m,htmlName:p}){const y=z.useCallback(({target:{value:b}})=>f(b===""?t.emptyValue:b),[f,t.emptyValue]),S=z.useCallback(({target:b})=>d(e,b&&b.value),[d,e]),g=z.useCallback(({target:b})=>m(e,b&&b.value),[e,m]);return N.jsx("textarea",{id:e,name:p||e,className:"form-control",value:i||"",placeholder:n,required:o,disabled:s,readOnly:u,autoFocus:c,rows:t.rows,onBlur:S,onFocus:g,onChange:y,"aria-describedby":zs(e)})}function j7(e){const{options:t,registry:n}=e,i=Qe("BaseInputTemplate",n,t);return N.jsx(i,{...e})}function N7(e){const{onChange:t,options:n,registry:i}=e,o=Qe("BaseInputTemplate",i,n),s=z.useCallback(u=>t(u?`${u}:00`:void 0),[t]);return N.jsx(o,{type:"time",...e,onChange:s})}function P7(e){const{options:t,registry:n}=e,i=Qe("BaseInputTemplate",n,t);return N.jsx(i,{type:"url",...e})}function I7(e){const{options:t,registry:n}=e,i=Qe("BaseInputTemplate",n,t);return N.jsx(i,{type:"number",...e})}function z7(){return{AltDateWidget:m7,AltDateTimeWidget:g7,CheckboxWidget:v7,CheckboxesWidget:y7,ColorWidget:b7,DateWidget:S7,DateTimeWidget:_7,EmailWidget:w7,FileWidget:C7,HiddenWidget:R7,PasswordWidget:O7,RadioWidget:A7,RangeWidget:$7,RatingWidget:T7,SelectWidget:M7,TextWidget:j7,TextareaWidget:D7,TimeWidget:N7,UpDownWidget:I7,URLWidget:P7}}function F7(){return{fields:FK(),templates:p7(),widgets:z7(),rootSchema:{},formContext:{},translateString:ZV,globalFormOptions:{idPrefix:WM,idSeparator:XM,useFallbackUiForUnsupportedType:!1}}}function Rl(e,t){return{...LD(e,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...t!==void 0&&{status:t}}}class k7 extends z.Component{constructor(n){super(n);Ln(this,"formElement");Ln(this,"pendingChanges",[]);Ln(this,"_isProcessingUserChange",!1);Ln(this,"getUsedFormData",(n,i)=>UD(n,i));Ln(this,"getFieldNames",(n,i)=>BD(n,i));Ln(this,"omitExtraData",n=>{const{schema:i,schemaUtils:o}=this.state;return o.omitExtraData(i,n)});Ln(this,"setFieldValue",(n,i)=>{const{registry:o}=this.state,s=Array.isArray(n)?n:n.split("."),u=Jr("",o.globalFormOptions,s);this.onChange(i,s,void 0,u[Ft])});Ln(this,"onChange",(n,i,o,s)=>{this.pendingChanges.push({newValue:n,path:i,newErrorSchema:o,id:s}),this.pendingChanges.length===1&&this.processPendingChange()});Ln(this,"reset",()=>{const{formData:n,initialFormData:i=IO,onChange:o}=this.props,c={formData:this.getStateFromProps(this.props,n??i,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(c,()=>o&&o(Rl({...this.state,...c})))});Ln(this,"onBlur",(n,i)=>{const{onBlur:o,omitExtraData:s,liveOmit:u,liveValidate:c}=this.props;if(o&&o(n,i),s===!0&&u==="onBlur"||c==="onBlur"){const{onChange:f,extraErrors:d}=this.props,{formData:m}=this.state;let p=m,y={formData:p};if(s===!0&&u==="onBlur"&&(p=this.omitExtraData(m),y={formData:p}),c==="onBlur"){const{schema:g,schemaUtils:b,errorSchema:v,customErrors:_,retrievedSchema:x}=this.state,E=this.liveValidate(g,b,v,p,d,_,x);y={formData:p,...E,customErrors:_}}const S=Object.keys(y).filter(g=>!g.startsWith("schemaValidation")).some(g=>{const b=xe(this.state,g),v=xe(y,g);return!Ut(b,v)});this.setState(y,()=>{f&&S&&f(Rl({...this.state,...y}),n)})}});Ln(this,"onFocus",(n,i)=>{const{onFocus:o}=this.props;o&&o(n,i)});Ln(this,"onSubmit",n=>{if(n.preventDefault(),n.target!==n.currentTarget)return;n.persist();const{omitExtraData:i,extraErrors:o,noValidate:s,onSubmit:u}=this.props;let{formData:c}=this.state;if(i===!0&&(c=this.omitExtraData(c)),s||this.validateFormWithFormData(c)){const f=o||{},d=o?IS(o):[];this.setState({formData:c,errors:d,errorSchema:f,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{u&&u(Rl({...this.state,formData:c},"submitted"),n)})}});Ln(this,"submit",()=>{if(this.formElement.current){const n=new CustomEvent("submit",{cancelable:!0});n.preventDefault(),this.formElement.current.dispatchEvent(n),this.formElement.current.requestSubmit()}});Ln(this,"validateFormWithFormData",n=>{const{extraErrors:i,extraErrorsBlockSubmit:o,focusOnFirstError:s,onError:u}=this.props,{errors:c}=this.state,f=this.validate(n);let d=f.errors,m=f.errorSchema;const p=d,y=m,S=d.length>0||i&&o;if(S){if(i){const g=op(f,i);m=g.errorSchema,d=g.errors}s&&(typeof s=="function"?s(d[0]):this.focusOnError(d[0])),this.setState({errors:d,errorSchema:m,schemaValidationErrors:p,schemaValidationErrorSchema:y},()=>{u?u(d):console.error("Form validation failed",d)})}else c.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}});return!S});if(!n.validator)throw new Error("A validator is required for Form functionality to work");const{formData:i,initialFormData:o,onChange:s}=n,u=i??o;this.state=this.getStateFromProps(n,u,void 0,void 0,void 0,!0),s&&!Ut(this.state.formData,u)&&s(Rl(this.state)),this.formElement=z.createRef()}getSnapshotBeforeUpdate(n,i){if(!Ut(this.props,n)){const o=aO(this.props.formData,n.formData),s=aO(this.props.formData,this.state.formData),u=!Ut(n.schema,this.props.schema),c=o.length>0||!Ut(n.formData,this.props.formData),f=s.length>0||!Ut(this.state.formData,this.props.formData),d=this.getStateFromProps(this.props,this.props.formData,u||c?void 0:this.state.retrievedSchema,u,o,!f),m=!Ut(d,i);return{nextState:d,shouldUpdate:m}}return{shouldUpdate:!1}}componentDidUpdate(n,i,o){if(o.shouldUpdate){const{nextState:s}=o,u=!Ut(s.formData,this.props.formData),c=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,c&&u)return;u&&!Ut(s.formData,i.formData)&&this.props.onChange&&this.props.onChange(Rl(s)),this.setState(s)}}getStateFromProps(n,i,o,s=!1,u=[],c=!1){var q;const f=this.state||{},d="schema"in n?n.schema:this.props.schema,m="validator"in n?n.validator:this.props.validator,p=("uiSchema"in n?n.uiSchema:this.props.uiSchema)||{},y=n.formData===void 0&&this.props.formData===void 0,S=typeof i<"u",g="liveValidate"in n?n.liveValidate:this.props.liveValidate,b=S&&!n.noValidate&&g,v="experimental_defaultFormStateBehavior"in n?n.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,_="experimental_customMergeAllOf"in n?n.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let x=f.schemaUtils;(!x||x.doesSchemaUtilsDiffer(m,d,v,_))&&(x=WV(m,d,v,_));const E=x.getRootSchema();let R=i;i===IO?R=void 0:i===void 0&&y&&(R=f.formData);const C=x.getDefaultFormState(E,R,!1,f.initialDefaultsGenerated),$=this.updateRetrievedSchema(o??x.retrieveSchema(E,C)),A=()=>n.noValidate||s?{errors:[],errorSchema:{}}:n.liveValidate?{errors:f.errors||[],errorSchema:f.errorSchema||{}}:{errors:f.schemaValidationErrors||[],errorSchema:f.schemaValidationErrorSchema||{}};let T,M,D=f.schemaValidationErrors,j=f.schemaValidationErrorSchema;if(b&&!c){const Q=this.liveValidate(E,x,f.errorSchema,C,void 0,f.customErrors,o,o!==void 0);T=Q.errors,M=Q.errorSchema,D=Q.schemaValidationErrors,j=Q.schemaValidationErrorSchema}else{const Q=A();if(T=Q.errors,M=Q.errorSchema,u.length>0&&!b){const ne=u.reduce((X,P)=>(X[P]=void 0,X),{});M=j=ef(Q.errorSchema,ne,"preventDuplicates")}const W=this.mergeErrors({errorSchema:M,errors:T},n.extraErrors,f.customErrors);T=W.errors,M=W.errorSchema}const I=this.getRegistry(n,E,x),L=Ut(f.registry,I)?f.registry:I,K=f.fieldPathId&&((q=f.fieldPathId)==null?void 0:q[Ft])===L.globalFormOptions.idPrefix?f.fieldPathId:Jr("",L.globalFormOptions);return{schemaUtils:x,schema:E,uiSchema:p,fieldPathId:K,formData:C,edit:S,errors:T,errorSchema:M,schemaValidationErrors:D,schemaValidationErrorSchema:j,retrievedSchema:$,initialDefaultsGenerated:!0,registry:L}}shouldComponentUpdate(n,i){const{experimental_componentUpdateStrategy:o="customDeep"}=this.props;return WD(this,n,i,o)}validate(n,i=this.state.schema,o,s){const u=o||this.state.schemaUtils,{customValidate:c,transformErrors:f,uiSchema:d}=this.props,m=s??u.retrieveSchema(i,n);return u.getValidator().validateFormData(n,m,c,f,d)}renderErrors(n){const{errors:i,errorSchema:o,schema:s,uiSchema:u}=this.state,c=Ue(u),f=Qe("ErrorListTemplate",n,c);return i&&i.length?N.jsx(f,{errors:i,errorSchema:o||{},schema:s,uiSchema:u,registry:n}):null}mergeErrors(n,i,o){let s=n.errorSchema,u=n.errors;if(i){const c=op(n,i);s=c.errorSchema,u=c.errors}if(o){const c=op(n,o.ErrorSchema,!0);s=c.errorSchema,u=c.errors}return{errors:u,errorSchema:s}}liveValidate(n,i,o,s,u,c,f,d=!1){const m=this.validate(s,n,i,f),p=m.errors;let y=m.errorSchema;d&&(y=ef(o,m.errorSchema,"preventDuplicates"));const S=p,g=y;return{...this.mergeErrors({errorSchema:y,errors:p},u,c),schemaValidationErrors:S,schemaValidationErrorSchema:g}}processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;const{newValue:n,path:i,id:o}=this.pendingChanges[0],{newErrorSchema:s}=this.pendingChanges[0],{extraErrors:u,omitExtraData:c,liveOmit:f,noValidate:d,liveValidate:m,onChange:p}=this.props,{formData:y,schemaUtils:S,schema:g,fieldPathId:b,schemaValidationErrorSchema:v,errors:_}=this.state;let{customErrors:x,errorSchema:E}=this.state;const R=b.path[0]||"",C=!i||i.length===0||i.length===1&&i[0]===R;let $=this.state.retrievedSchema,A=C?n:DS(y);const T=at(A)&&Object.keys(A).length>0&&Object.values(A).every(K=>K===void 0),M=y==null,D=T&&M?void 0:A;if(at(A)||Array.isArray(A)){n===dj?z8(A,i):C||Nt(A,i,n);const K=this.getStateFromProps(this.props,D,void 0,void 0,void 0,!0);A=K.formData,$=K.retrievedSchema}const j=!d&&(m===!0||m==="onChange");let I={formData:A,schema:g},L=A;if(c===!0&&(f===!0||f==="onChange")&&(L=this.omitExtraData(A),I={formData:L}),s){const K=C?v:xe(v,i);if(!on(K))C?E=s:Nt(E,i,s);else if(x||(x=new HD),C){const G=xe(s,Pn);G&&x.setErrors(G)}else Nt(x.ErrorSchema,i,s)}else x&&xe(x.ErrorSchema,[...i,Pn])&&x.clearErrors(i);if(j&&this.pendingChanges.length===1){const K=this.liveValidate(g,S,E,L,u,x,$);I={formData:L,...K,customErrors:x}}else if(!d&&s){const K=this.mergeErrors({errorSchema:E,errors:_},u,x);I={formData:L,...K,customErrors:x}}this.setState(I,()=>{p&&p(Rl({...this.state,...I}),o),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(n){var o;return Ut(n,(o=this.state)==null?void 0:o.retrievedSchema)?this.state.retrievedSchema:n}getGlobalFormOptions(n){const{uiSchema:i={},experimental_componentUpdateStrategy:o,idSeparator:s=XM,idPrefix:u=WM,nameGenerator:c,useFallbackUiForUnsupportedType:f=!1}=n;return{idPrefix:i["ui:rootFieldId"]||u,idSeparator:s,useFallbackUiForUnsupportedType:f,...o!==void 0&&{experimental_componentUpdateStrategy:o},...c!==void 0&&{nameGenerator:c}}}getRegistry(n,i,o){var y;const{translateString:s,uiSchema:u={}}=n,{fields:c,templates:f,widgets:d,formContext:m,translateString:p}=F7();return{fields:{...c,...n.fields},templates:{...f,...n.templates,ButtonTemplates:{...f.ButtonTemplates,...(y=n.templates)==null?void 0:y.ButtonTemplates}},widgets:{...d,...n.widgets},rootSchema:i,formContext:n.formContext||m,schemaUtils:o,translateString:s||p,globalUiOptions:u[nb],globalFormOptions:this.getGlobalFormOptions(n)}}focusOnError(n){const{idPrefix:i="root",idSeparator:o="_"}=this.props,{property:s}=n,u=XD(s);u[0]===""?u[0]=i:u.unshift(i);const c=u.join(o);let f=this.formElement.current.elements[c];f||(f=this.formElement.current.querySelector(`input[id^="${c}"`)),f&&f.length&&(f=f[0]),f&&f.focus()}validateForm(){const{omitExtraData:n}=this.props;let{formData:i}=this.state;return n===!0&&(i=this.omitExtraData(i)),this.validateFormWithFormData(i)}render(){const{children:n,id:i,className:o="",tagName:s,name:u,method:c,target:f,action:d,autoComplete:m,enctype:p,acceptCharset:y,noHtml5Validate:S=!1,disabled:g,readonly:b,showErrorList:v="top",_internalFormWrapper:_}=this.props,{schema:x,uiSchema:E,formData:R,errorSchema:C,fieldPathId:$,registry:A}=this.state,{SchemaField:T}=A.fields,{SubmitButton:M}=A.templates.ButtonTemplates,D=_?s:void 0,j=_||s||"form";let{[wp]:I={}}=Ue(E);g&&(I={...I,props:{...I.props,disabled:!0}});const L={[Co]:{[wp]:I}};return N.jsxs(j,{className:o||"rjsf",id:i,name:u,method:c,target:f,action:d,autoComplete:m,encType:p,acceptCharset:y,noValidate:S,onSubmit:this.onSubmit,as:D,ref:this.formElement,children:[v==="top"&&this.renderErrors(A),N.jsx(T,{name:"",schema:x,uiSchema:E,errorSchema:C,fieldPathId:$,formData:R,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:A,disabled:g,readonly:b}),n||N.jsx(M,{uiSchema:L,registry:A}),v==="bottom"&&this.renderErrors(A)]})}}var rh={exports:{}},f0={},ca={},os={},d0={},h0={},p0={},zO;function Cp(){return zO||(zO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(x){if(super(),!e.IDENTIFIER.test(x))throw new Error("CodeGen: name must be a valid identifier");this.str=x}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class i extends t{constructor(x){super(),this._items=typeof x=="string"?[x]:x}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const x=this._items[0];return x===""||x==='""'}get str(){var x;return(x=this._str)!==null&&x!==void 0?x:this._str=this._items.reduce((E,R)=>`${E}${R}`,"")}get names(){var x;return(x=this._names)!==null&&x!==void 0?x:this._names=this._items.reduce((E,R)=>(R instanceof n&&(E[R.str]=(E[R.str]||0)+1),E),{})}}e._Code=i,e.nil=new i("");function o(_,...x){const E=[_[0]];let R=0;for(;R<x.length;)c(E,x[R]),E.push(_[++R]);return new i(E)}e._=o;const s=new i("+");function u(_,...x){const E=[S(_[0])];let R=0;for(;R<x.length;)E.push(s),c(E,x[R]),E.push(s,S(_[++R]));return f(E),new i(E)}e.str=u;function c(_,x){x instanceof i?_.push(...x._items):x instanceof n?_.push(x):_.push(p(x))}e.addCodeArg=c;function f(_){let x=1;for(;x<_.length-1;){if(_[x]===s){const E=d(_[x-1],_[x+1]);if(E!==void 0){_.splice(x-1,3,E);continue}_[x++]="+"}x++}}function d(_,x){if(x==='""')return _;if(_==='""')return x;if(typeof _=="string")return x instanceof n||_[_.length-1]!=='"'?void 0:typeof x!="string"?`${_.slice(0,-1)}${x}"`:x[0]==='"'?_.slice(0,-1)+x.slice(1):void 0;if(typeof x=="string"&&x[0]==='"'&&!(_ instanceof n))return`"${_}${x.slice(1)}`}function m(_,x){return x.emptyStr()?_:_.emptyStr()?x:u`${_}${x}`}e.strConcat=m;function p(_){return typeof _=="number"||typeof _=="boolean"||_===null?_:S(Array.isArray(_)?_.join(","):_)}function y(_){return new i(S(_))}e.stringify=y;function S(_){return JSON.stringify(_).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=S;function g(_){return typeof _=="string"&&e.IDENTIFIER.test(_)?new i(`.${_}`):o`[${_}]`}e.getProperty=g;function b(_){if(typeof _=="string"&&e.IDENTIFIER.test(_))return new i(`${_}`);throw new Error(`CodeGen: invalid export name: ${_}, use explicit $id name mapping`)}e.getEsmExportName=b;function v(_){return new i(_.toString())}e.regexpCode=v})(p0)),p0}var m0={},FO;function kO(){return FO||(FO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Cp();class n extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.value}}var i;(function(f){f[f.Started=0]="Started",f[f.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:d,parent:m}={}){this._names={},this._prefixes=d,this._parent=m}toName(d){return d instanceof t.Name?d:this.name(d)}name(d){return new t.Name(this._newName(d))}_newName(d){const m=this._names[d]||this._nameGroup(d);return`${d}${m.index++}`}_nameGroup(d){var m,p;if(!((p=(m=this._parent)===null||m===void 0?void 0:m._prefixes)===null||p===void 0)&&p.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}e.Scope=o;class s extends t.Name{constructor(d,m){super(m),this.prefix=d}setValue(d,{property:m,itemIndex:p}){this.value=d,this.scopePath=(0,t._)`.${new t.Name(m)}[${p}]`}}e.ValueScopeName=s;const u=(0,t._)`\n`;class c extends o{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?u:t.nil}}get(){return this._scope}name(d){return new s(d,this._newName(d))}value(d,m){var p;if(m.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const y=this.toName(d),{prefix:S}=y,g=(p=m.key)!==null&&p!==void 0?p:m.ref;let b=this._values[S];if(b){const x=b.get(g);if(x)return x}else b=this._values[S]=new Map;b.set(g,y);const v=this._scope[S]||(this._scope[S]=[]),_=v.length;return v[_]=m.ref,y.setValue(m,{property:S,itemIndex:_}),y}getValue(d,m){const p=this._values[d];if(p)return p.get(m)}scopeRefs(d,m=this._values){return this._reduceValues(m,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${d}${p.scopePath}`})}scopeCode(d=this._values,m,p){return this._reduceValues(d,y=>{if(y.value===void 0)throw new Error(`CodeGen: name "${y}" has no value`);return y.value.code},m,p)}_reduceValues(d,m,p={},y){let S=t.nil;for(const g in d){const b=d[g];if(!b)continue;const v=p[g]=p[g]||new Map;b.forEach(_=>{if(v.has(_))return;v.set(_,i.Started);let x=m(_);if(x){const E=this.opts.es5?e.varKinds.var:e.varKinds.const;S=(0,t._)`${S}${E} ${_} = ${x};${this.opts._n}`}else if(x=y==null?void 0:y(_))S=(0,t._)`${S}${x}${this.opts._n}`;else throw new n(_);v.set(_,i.Completed)})}return S}}e.ValueScope=c})(m0)),m0}var LO;function et(){return LO||(LO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=Cp(),n=kO();var i=Cp();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var o=kO();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(k,V){return this}}class u extends s{constructor(k,V,J){super(),this.varKind=k,this.name=V,this.rhs=J}render({es5:k,_n:V}){const J=k?n.varKinds.var:this.varKind,le=this.rhs===void 0?"":` = ${this.rhs}`;return`${J} ${this.name}${le};`+V}optimizeNames(k,V){if(k[this.name.str])return this.rhs&&(this.rhs=K(this.rhs,k,V)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(k,V,J){super(),this.lhs=k,this.rhs=V,this.sideEffects=J}render({_n:k}){return`${this.lhs} = ${this.rhs};`+k}optimizeNames(k,V){if(!(this.lhs instanceof t.Name&&!k[this.lhs.str]&&!this.sideEffects))return this.rhs=K(this.rhs,k,V),this}get names(){const k=this.lhs instanceof t.Name?{}:{...this.lhs.names};return L(k,this.rhs)}}class f extends c{constructor(k,V,J,le){super(k,J,le),this.op=V}render({_n:k}){return`${this.lhs} ${this.op}= ${this.rhs};`+k}}class d extends s{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`${this.label}:`+k}}class m extends s{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`break${this.label?` ${this.label}`:""};`+k}}class p extends s{constructor(k){super(),this.error=k}render({_n:k}){return`throw ${this.error};`+k}get names(){return this.error.names}}class y extends s{constructor(k){super(),this.code=k}render({_n:k}){return`${this.code};`+k}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(k,V){return this.code=K(this.code,k,V),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class S extends s{constructor(k=[]){super(),this.nodes=k}render(k){return this.nodes.reduce((V,J)=>V+J.render(k),"")}optimizeNodes(){const{nodes:k}=this;let V=k.length;for(;V--;){const J=k[V].optimizeNodes();Array.isArray(J)?k.splice(V,1,...J):J?k[V]=J:k.splice(V,1)}return k.length>0?this:void 0}optimizeNames(k,V){const{nodes:J}=this;let le=J.length;for(;le--;){const ie=J[le];ie.optimizeNames(k,V)||(G(k,ie.names),J.splice(le,1))}return J.length>0?this:void 0}get names(){return this.nodes.reduce((k,V)=>I(k,V.names),{})}}class g extends S{render(k){return"{"+k._n+super.render(k)+"}"+k._n}}class b extends S{}class v extends g{}v.kind="else";class _ extends g{constructor(k,V){super(V),this.condition=k}render(k){let V=`if(${this.condition})`+super.render(k);return this.else&&(V+="else "+this.else.render(k)),V}optimizeNodes(){super.optimizeNodes();const k=this.condition;if(k===!0)return this.nodes;let V=this.else;if(V){const J=V.optimizeNodes();V=this.else=Array.isArray(J)?new v(J):J}if(V)return k===!1?V instanceof _?V:V.nodes:this.nodes.length?this:new _(q(k),V instanceof _?[V]:V.nodes);if(!(k===!1||!this.nodes.length))return this}optimizeNames(k,V){var J;if(this.else=(J=this.else)===null||J===void 0?void 0:J.optimizeNames(k,V),!!(super.optimizeNames(k,V)||this.else))return this.condition=K(this.condition,k,V),this}get names(){const k=super.names;return L(k,this.condition),this.else&&I(k,this.else.names),k}}_.kind="if";class x extends g{}x.kind="for";class E extends x{constructor(k){super(),this.iteration=k}render(k){return`for(${this.iteration})`+super.render(k)}optimizeNames(k,V){if(super.optimizeNames(k,V))return this.iteration=K(this.iteration,k,V),this}get names(){return I(super.names,this.iteration.names)}}class R extends x{constructor(k,V,J,le){super(),this.varKind=k,this.name=V,this.from=J,this.to=le}render(k){const V=k.es5?n.varKinds.var:this.varKind,{name:J,from:le,to:ie}=this;return`for(${V} ${J}=${le}; ${J}<${ie}; ${J}++)`+super.render(k)}get names(){const k=L(super.names,this.from);return L(k,this.to)}}class C extends x{constructor(k,V,J,le){super(),this.loop=k,this.varKind=V,this.name=J,this.iterable=le}render(k){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(k)}optimizeNames(k,V){if(super.optimizeNames(k,V))return this.iterable=K(this.iterable,k,V),this}get names(){return I(super.names,this.iterable.names)}}class $ extends g{constructor(k,V,J){super(),this.name=k,this.args=V,this.async=J}render(k){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(k)}}$.kind="func";class A extends S{render(k){return"return "+super.render(k)}}A.kind="return";class T extends g{render(k){let V="try"+super.render(k);return this.catch&&(V+=this.catch.render(k)),this.finally&&(V+=this.finally.render(k)),V}optimizeNodes(){var k,V;return super.optimizeNodes(),(k=this.catch)===null||k===void 0||k.optimizeNodes(),(V=this.finally)===null||V===void 0||V.optimizeNodes(),this}optimizeNames(k,V){var J,le;return super.optimizeNames(k,V),(J=this.catch)===null||J===void 0||J.optimizeNames(k,V),(le=this.finally)===null||le===void 0||le.optimizeNames(k,V),this}get names(){const k=super.names;return this.catch&&I(k,this.catch.names),this.finally&&I(k,this.finally.names),k}}class M extends g{constructor(k){super(),this.error=k}render(k){return`catch(${this.error})`+super.render(k)}}M.kind="catch";class D extends g{render(k){return"finally"+super.render(k)}}D.kind="finally";class j{constructor(k,V={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...V,_n:V.lines?`
|
|
153
|
-
`:""},this._extScope=k,this._scope=new n.Scope({parent:k}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(k){return this._scope.name(k)}scopeName(k){return this._extScope.name(k)}scopeValue(k,V){const J=this._extScope.value(k,V);return(this._values[J.prefix]||(this._values[J.prefix]=new Set)).add(J),J}getScopeValue(k,V){return this._extScope.getValue(k,V)}scopeRefs(k){return this._extScope.scopeRefs(k,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(k,V,J,le){const ie=this._scope.toName(V);return J!==void 0&&le&&(this._constants[ie.str]=J),this._leafNode(new u(k,ie,J)),ie}const(k,V,J){return this._def(n.varKinds.const,k,V,J)}let(k,V,J){return this._def(n.varKinds.let,k,V,J)}var(k,V,J){return this._def(n.varKinds.var,k,V,J)}assign(k,V,J){return this._leafNode(new c(k,V,J))}add(k,V){return this._leafNode(new f(k,e.operators.ADD,V))}code(k){return typeof k=="function"?k():k!==t.nil&&this._leafNode(new y(k)),this}object(...k){const V=["{"];for(const[J,le]of k)V.length>1&&V.push(","),V.push(J),(J!==le||this.opts.es5)&&(V.push(":"),(0,t.addCodeArg)(V,le));return V.push("}"),new t._Code(V)}if(k,V,J){if(this._blockNode(new _(k)),V&&J)this.code(V).else().code(J).endIf();else if(V)this.code(V).endIf();else if(J)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(k){return this._elseNode(new _(k))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(_,v)}_for(k,V){return this._blockNode(k),V&&this.code(V).endFor(),this}for(k,V){return this._for(new E(k),V)}forRange(k,V,J,le,ie=this.opts.es5?n.varKinds.var:n.varKinds.let){const se=this._scope.toName(k);return this._for(new R(ie,se,V,J),()=>le(se))}forOf(k,V,J,le=n.varKinds.const){const ie=this._scope.toName(k);if(this.opts.es5){const se=V instanceof t.Name?V:this.var("_arr",V);return this.forRange("_i",0,(0,t._)`${se}.length`,fe=>{this.var(ie,(0,t._)`${se}[${fe}]`),J(ie)})}return this._for(new C("of",le,ie,V),()=>J(ie))}forIn(k,V,J,le=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(k,(0,t._)`Object.keys(${V})`,J);const ie=this._scope.toName(k);return this._for(new C("in",le,ie,V),()=>J(ie))}endFor(){return this._endBlockNode(x)}label(k){return this._leafNode(new d(k))}break(k){return this._leafNode(new m(k))}return(k){const V=new A;if(this._blockNode(V),this.code(k),V.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(A)}try(k,V,J){if(!V&&!J)throw new Error('CodeGen: "try" without "catch" and "finally"');const le=new T;if(this._blockNode(le),this.code(k),V){const ie=this.name("e");this._currNode=le.catch=new M(ie),V(ie)}return J&&(this._currNode=le.finally=new D,this.code(J)),this._endBlockNode(M,D)}throw(k){return this._leafNode(new p(k))}block(k,V){return this._blockStarts.push(this._nodes.length),k&&this.code(k).endBlock(V),this}endBlock(k){const V=this._blockStarts.pop();if(V===void 0)throw new Error("CodeGen: not in self-balancing block");const J=this._nodes.length-V;if(J<0||k!==void 0&&J!==k)throw new Error(`CodeGen: wrong number of nodes: ${J} vs ${k} expected`);return this._nodes.length=V,this}func(k,V=t.nil,J,le){return this._blockNode(new $(k,V,J)),le&&this.code(le).endFunc(),this}endFunc(){return this._endBlockNode($)}optimize(k=1){for(;k-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(k){return this._currNode.nodes.push(k),this}_blockNode(k){this._currNode.nodes.push(k),this._nodes.push(k)}_endBlockNode(k,V){const J=this._currNode;if(J instanceof k||V&&J instanceof V)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${V?`${k.kind}/${V.kind}`:k.kind}"`)}_elseNode(k){const V=this._currNode;if(!(V instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=V.else=k,this}get _root(){return this._nodes[0]}get _currNode(){const k=this._nodes;return k[k.length-1]}set _currNode(k){const V=this._nodes;V[V.length-1]=k}}e.CodeGen=j;function I(U,k){for(const V in k)U[V]=(U[V]||0)+(k[V]||0);return U}function L(U,k){return k instanceof t._CodeOrName?I(U,k.names):U}function K(U,k,V){if(U instanceof t.Name)return J(U);if(!le(U))return U;return new t._Code(U._items.reduce((ie,se)=>(se instanceof t.Name&&(se=J(se)),se instanceof t._Code?ie.push(...se._items):ie.push(se),ie),[]));function J(ie){const se=V[ie.str];return se===void 0||k[ie.str]!==1?ie:(delete k[ie.str],se)}function le(ie){return ie instanceof t._Code&&ie._items.some(se=>se instanceof t.Name&&k[se.str]===1&&V[se.str]!==void 0)}}function G(U,k){for(const V in k)U[V]=(U[V]||0)-(k[V]||0)}function q(U){return typeof U=="boolean"||typeof U=="number"||U===null?!U:(0,t._)`!${B(U)}`}e.not=q;const Q=P(e.operators.AND);function W(...U){return U.reduce(Q)}e.and=W;const ne=P(e.operators.OR);function X(...U){return U.reduce(ne)}e.or=X;function P(U){return(k,V)=>k===t.nil?V:V===t.nil?k:(0,t._)`${B(k)} ${U} ${B(V)}`}function B(U){return U instanceof t.Name?U:(0,t._)`(${U})`}})(h0)),h0}var Ze={},qO;function _t(){if(qO)return Ze;qO=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.checkStrictMode=Ze.getErrorPath=Ze.Type=Ze.useFunc=Ze.setEvaluated=Ze.evaluatedPropsToName=Ze.mergeEvaluated=Ze.eachItem=Ze.unescapeJsonPointer=Ze.escapeJsonPointer=Ze.escapeFragment=Ze.unescapeFragment=Ze.schemaRefOrVal=Ze.schemaHasRulesButRef=Ze.schemaHasRules=Ze.checkUnknownRules=Ze.alwaysValidSchema=Ze.toHash=void 0;const e=et(),t=Cp();function n(C){const $={};for(const A of C)$[A]=!0;return $}Ze.toHash=n;function i(C,$){return typeof $=="boolean"?$:Object.keys($).length===0?!0:(o(C,$),!s($,C.self.RULES.all))}Ze.alwaysValidSchema=i;function o(C,$=C.schema){const{opts:A,self:T}=C;if(!A.strictSchema||typeof $=="boolean")return;const M=T.RULES.keywords;for(const D in $)M[D]||R(C,`unknown keyword: "${D}"`)}Ze.checkUnknownRules=o;function s(C,$){if(typeof C=="boolean")return!C;for(const A in C)if($[A])return!0;return!1}Ze.schemaHasRules=s;function u(C,$){if(typeof C=="boolean")return!C;for(const A in C)if(A!=="$ref"&&$.all[A])return!0;return!1}Ze.schemaHasRulesButRef=u;function c({topSchemaRef:C,schemaPath:$},A,T,M){if(!M){if(typeof A=="number"||typeof A=="boolean")return A;if(typeof A=="string")return(0,e._)`${A}`}return(0,e._)`${C}${$}${(0,e.getProperty)(T)}`}Ze.schemaRefOrVal=c;function f(C){return p(decodeURIComponent(C))}Ze.unescapeFragment=f;function d(C){return encodeURIComponent(m(C))}Ze.escapeFragment=d;function m(C){return typeof C=="number"?`${C}`:C.replace(/~/g,"~0").replace(/\//g,"~1")}Ze.escapeJsonPointer=m;function p(C){return C.replace(/~1/g,"/").replace(/~0/g,"~")}Ze.unescapeJsonPointer=p;function y(C,$){if(Array.isArray(C))for(const A of C)$(A);else $(C)}Ze.eachItem=y;function S({mergeNames:C,mergeToName:$,mergeValues:A,resultToName:T}){return(M,D,j,I)=>{const L=j===void 0?D:j instanceof e.Name?(D instanceof e.Name?C(M,D,j):$(M,D,j),j):D instanceof e.Name?($(M,j,D),D):A(D,j);return I===e.Name&&!(L instanceof e.Name)?T(M,L):L}}Ze.mergeEvaluated={props:S({mergeNames:(C,$,A)=>C.if((0,e._)`${A} !== true && ${$} !== undefined`,()=>{C.if((0,e._)`${$} === true`,()=>C.assign(A,!0),()=>C.assign(A,(0,e._)`${A} || {}`).code((0,e._)`Object.assign(${A}, ${$})`))}),mergeToName:(C,$,A)=>C.if((0,e._)`${A} !== true`,()=>{$===!0?C.assign(A,!0):(C.assign(A,(0,e._)`${A} || {}`),b(C,A,$))}),mergeValues:(C,$)=>C===!0?!0:{...C,...$},resultToName:g}),items:S({mergeNames:(C,$,A)=>C.if((0,e._)`${A} !== true && ${$} !== undefined`,()=>C.assign(A,(0,e._)`${$} === true ? true : ${A} > ${$} ? ${A} : ${$}`)),mergeToName:(C,$,A)=>C.if((0,e._)`${A} !== true`,()=>C.assign(A,$===!0?!0:(0,e._)`${A} > ${$} ? ${A} : ${$}`)),mergeValues:(C,$)=>C===!0?!0:Math.max(C,$),resultToName:(C,$)=>C.var("items",$)})};function g(C,$){if($===!0)return C.var("props",!0);const A=C.var("props",(0,e._)`{}`);return $!==void 0&&b(C,A,$),A}Ze.evaluatedPropsToName=g;function b(C,$,A){Object.keys(A).forEach(T=>C.assign((0,e._)`${$}${(0,e.getProperty)(T)}`,!0))}Ze.setEvaluated=b;const v={};function _(C,$){return C.scopeValue("func",{ref:$,code:v[$.code]||(v[$.code]=new t._Code($.code))})}Ze.useFunc=_;var x;(function(C){C[C.Num=0]="Num",C[C.Str=1]="Str"})(x||(Ze.Type=x={}));function E(C,$,A){if(C instanceof e.Name){const T=$===x.Num;return A?T?(0,e._)`"[" + ${C} + "]"`:(0,e._)`"['" + ${C} + "']"`:T?(0,e._)`"/" + ${C}`:(0,e._)`"/" + ${C}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return A?(0,e.getProperty)(C).toString():"/"+m(C)}Ze.getErrorPath=E;function R(C,$,A=C.opts.strictSchema){if(A){if($=`strict mode: ${$}`,A===!0)throw new Error($);C.self.logger.warn($)}}return Ze.checkStrictMode=R,Ze}var ih={},UO;function Io(){if(UO)return ih;UO=1,Object.defineProperty(ih,"__esModule",{value:!0});const e=et(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return ih.default=t,ih}var BO;function tm(){return BO||(BO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=et(),n=_t(),i=Io();e.keywordError={message:({keyword:v})=>(0,t.str)`must pass "${v}" keyword validation`},e.keyword$DataError={message:({keyword:v,schemaType:_})=>_?(0,t.str)`"${v}" keyword must be ${_} ($data)`:(0,t.str)`"${v}" keyword is invalid ($data)`};function o(v,_=e.keywordError,x,E){const{it:R}=v,{gen:C,compositeRule:$,allErrors:A}=R,T=p(v,_,x);E??($||A)?f(C,T):d(R,(0,t._)`[${T}]`)}e.reportError=o;function s(v,_=e.keywordError,x){const{it:E}=v,{gen:R,compositeRule:C,allErrors:$}=E,A=p(v,_,x);f(R,A),C||$||d(E,i.default.vErrors)}e.reportExtraError=s;function u(v,_){v.assign(i.default.errors,_),v.if((0,t._)`${i.default.vErrors} !== null`,()=>v.if(_,()=>v.assign((0,t._)`${i.default.vErrors}.length`,_),()=>v.assign(i.default.vErrors,null)))}e.resetErrorsCount=u;function c({gen:v,keyword:_,schemaValue:x,data:E,errsCount:R,it:C}){if(R===void 0)throw new Error("ajv implementation error");const $=v.name("err");v.forRange("i",R,i.default.errors,A=>{v.const($,(0,t._)`${i.default.vErrors}[${A}]`),v.if((0,t._)`${$}.instancePath === undefined`,()=>v.assign((0,t._)`${$}.instancePath`,(0,t.strConcat)(i.default.instancePath,C.errorPath))),v.assign((0,t._)`${$}.schemaPath`,(0,t.str)`${C.errSchemaPath}/${_}`),C.opts.verbose&&(v.assign((0,t._)`${$}.schema`,x),v.assign((0,t._)`${$}.data`,E))})}e.extendErrors=c;function f(v,_){const x=v.const("err",_);v.if((0,t._)`${i.default.vErrors} === null`,()=>v.assign(i.default.vErrors,(0,t._)`[${x}]`),(0,t._)`${i.default.vErrors}.push(${x})`),v.code((0,t._)`${i.default.errors}++`)}function d(v,_){const{gen:x,validateName:E,schemaEnv:R}=v;R.$async?x.throw((0,t._)`new ${v.ValidationError}(${_})`):(x.assign((0,t._)`${E}.errors`,_),x.return(!1))}const m={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(v,_,x){const{createErrors:E}=v.it;return E===!1?(0,t._)`{}`:y(v,_,x)}function y(v,_,x={}){const{gen:E,it:R}=v,C=[S(R,x),g(v,x)];return b(v,_,C),E.object(...C)}function S({errorPath:v},{instancePath:_}){const x=_?(0,t.str)`${v}${(0,n.getErrorPath)(_,n.Type.Str)}`:v;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,x)]}function g({keyword:v,it:{errSchemaPath:_}},{schemaPath:x,parentSchema:E}){let R=E?_:(0,t.str)`${_}/${v}`;return x&&(R=(0,t.str)`${R}${(0,n.getErrorPath)(x,n.Type.Str)}`),[m.schemaPath,R]}function b(v,{params:_,message:x},E){const{keyword:R,data:C,schemaValue:$,it:A}=v,{opts:T,propertyName:M,topSchemaRef:D,schemaPath:j}=A;E.push([m.keyword,R],[m.params,typeof _=="function"?_(v):_||(0,t._)`{}`]),T.messages&&E.push([m.message,typeof x=="function"?x(v):x]),T.verbose&&E.push([m.schema,$],[m.parentSchema,(0,t._)`${D}${j}`],[i.default.data,C]),M&&E.push([m.propertyName,M])}})(d0)),d0}var VO;function L7(){if(VO)return os;VO=1,Object.defineProperty(os,"__esModule",{value:!0}),os.boolOrEmptySchema=os.topBoolOrEmptySchema=void 0;const e=tm(),t=et(),n=Io(),i={message:"boolean schema is false"};function o(c){const{gen:f,schema:d,validateName:m}=c;d===!1?u(c,!1):typeof d=="object"&&d.$async===!0?f.return(n.default.data):(f.assign((0,t._)`${m}.errors`,null),f.return(!0))}os.topBoolOrEmptySchema=o;function s(c,f){const{gen:d,schema:m}=c;m===!1?(d.var(f,!1),u(c)):d.var(f,!0)}os.boolOrEmptySchema=s;function u(c,f){const{gen:d,data:m}=c,p={gen:d,keyword:"false schema",data:m,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(p,i,void 0,f)}return os}var jn={},ss={},HO;function yj(){if(HO)return ss;HO=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.getRules=ss.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function n(o){return typeof o=="string"&&t.has(o)}ss.isJSONType=n;function i(){const o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}return ss.getRules=i,ss}var fa={},KO;function bj(){if(KO)return fa;KO=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.shouldUseRule=fa.shouldUseGroup=fa.schemaHasRulesForType=void 0;function e({schema:i,self:o},s){const u=o.RULES.types[s];return u&&u!==!0&&t(i,u)}fa.schemaHasRulesForType=e;function t(i,o){return o.rules.some(s=>n(i,s))}fa.shouldUseGroup=t;function n(i,o){var s;return i[o.keyword]!==void 0||((s=o.definition.implements)===null||s===void 0?void 0:s.some(u=>i[u]!==void 0))}return fa.shouldUseRule=n,fa}var GO;function Rp(){if(GO)return jn;GO=1,Object.defineProperty(jn,"__esModule",{value:!0}),jn.reportTypeError=jn.checkDataTypes=jn.checkDataType=jn.coerceAndCheckDataType=jn.getJSONTypes=jn.getSchemaTypes=jn.DataType=void 0;const e=yj(),t=bj(),n=tm(),i=et(),o=_t();var s;(function(x){x[x.Correct=0]="Correct",x[x.Wrong=1]="Wrong"})(s||(jn.DataType=s={}));function u(x){const E=c(x.type);if(E.includes("null")){if(x.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!E.length&&x.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');x.nullable===!0&&E.push("null")}return E}jn.getSchemaTypes=u;function c(x){const E=Array.isArray(x)?x:x?[x]:[];if(E.every(e.isJSONType))return E;throw new Error("type must be JSONType or JSONType[]: "+E.join(","))}jn.getJSONTypes=c;function f(x,E){const{gen:R,data:C,opts:$}=x,A=m(E,$.coerceTypes),T=E.length>0&&!(A.length===0&&E.length===1&&(0,t.schemaHasRulesForType)(x,E[0]));if(T){const M=g(E,C,$.strictNumbers,s.Wrong);R.if(M,()=>{A.length?p(x,E,A):v(x)})}return T}jn.coerceAndCheckDataType=f;const d=new Set(["string","number","integer","boolean","null"]);function m(x,E){return E?x.filter(R=>d.has(R)||E==="array"&&R==="array"):[]}function p(x,E,R){const{gen:C,data:$,opts:A}=x,T=C.let("dataType",(0,i._)`typeof ${$}`),M=C.let("coerced",(0,i._)`undefined`);A.coerceTypes==="array"&&C.if((0,i._)`${T} == 'object' && Array.isArray(${$}) && ${$}.length == 1`,()=>C.assign($,(0,i._)`${$}[0]`).assign(T,(0,i._)`typeof ${$}`).if(g(E,$,A.strictNumbers),()=>C.assign(M,$))),C.if((0,i._)`${M} !== undefined`);for(const j of R)(d.has(j)||j==="array"&&A.coerceTypes==="array")&&D(j);C.else(),v(x),C.endIf(),C.if((0,i._)`${M} !== undefined`,()=>{C.assign($,M),y(x,M)});function D(j){switch(j){case"string":C.elseIf((0,i._)`${T} == "number" || ${T} == "boolean"`).assign(M,(0,i._)`"" + ${$}`).elseIf((0,i._)`${$} === null`).assign(M,(0,i._)`""`);return;case"number":C.elseIf((0,i._)`${T} == "boolean" || ${$} === null
|
|
154
|
-
|| (${T} == "string" && ${$} && ${$} == +${$})`).assign(M,(0,i._)`+${$}`);return;case"integer":C.elseIf((0,i._)`${T} === "boolean" || ${$} === null
|
|
155
|
-
|| (${T} === "string" && ${$} && ${$} == +${$} && !(${$} % 1))`).assign(M,(0,i._)`+${$}`);return;case"boolean":C.elseIf((0,i._)`${$} === "false" || ${$} === 0 || ${$} === null`).assign(M,!1).elseIf((0,i._)`${$} === "true" || ${$} === 1`).assign(M,!0);return;case"null":C.elseIf((0,i._)`${$} === "" || ${$} === 0 || ${$} === false`),C.assign(M,null);return;case"array":C.elseIf((0,i._)`${T} === "string" || ${T} === "number"
|
|
156
|
-
|| ${T} === "boolean" || ${$} === null`).assign(M,(0,i._)`[${$}]`)}}}function y({gen:x,parentData:E,parentDataProperty:R},C){x.if((0,i._)`${E} !== undefined`,()=>x.assign((0,i._)`${E}[${R}]`,C))}function S(x,E,R,C=s.Correct){const $=C===s.Correct?i.operators.EQ:i.operators.NEQ;let A;switch(x){case"null":return(0,i._)`${E} ${$} null`;case"array":A=(0,i._)`Array.isArray(${E})`;break;case"object":A=(0,i._)`${E} && typeof ${E} == "object" && !Array.isArray(${E})`;break;case"integer":A=T((0,i._)`!(${E} % 1) && !isNaN(${E})`);break;case"number":A=T();break;default:return(0,i._)`typeof ${E} ${$} ${x}`}return C===s.Correct?A:(0,i.not)(A);function T(M=i.nil){return(0,i.and)((0,i._)`typeof ${E} == "number"`,M,R?(0,i._)`isFinite(${E})`:i.nil)}}jn.checkDataType=S;function g(x,E,R,C){if(x.length===1)return S(x[0],E,R,C);let $;const A=(0,o.toHash)(x);if(A.array&&A.object){const T=(0,i._)`typeof ${E} != "object"`;$=A.null?T:(0,i._)`!${E} || ${T}`,delete A.null,delete A.array,delete A.object}else $=i.nil;A.number&&delete A.integer;for(const T in A)$=(0,i.and)($,S(T,E,R,C));return $}jn.checkDataTypes=g;const b={message:({schema:x})=>`must be ${x}`,params:({schema:x,schemaValue:E})=>typeof x=="string"?(0,i._)`{type: ${x}}`:(0,i._)`{type: ${E}}`};function v(x){const E=_(x);(0,n.reportError)(E,b)}jn.reportTypeError=v;function _(x){const{gen:E,data:R,schema:C}=x,$=(0,o.schemaRefOrVal)(x,C,"type");return{gen:E,keyword:"type",data:R,schema:C.type,schemaCode:$,schemaValue:$,parentSchema:C,params:{},it:x}}return jn}var _c={},QO;function q7(){if(QO)return _c;QO=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.assignDefaults=void 0;const e=et(),t=_t();function n(o,s){const{properties:u,items:c}=o.schema;if(s==="object"&&u)for(const f in u)i(o,f,u[f].default);else s==="array"&&Array.isArray(c)&&c.forEach((f,d)=>i(o,d,f.default))}_c.assignDefaults=n;function i(o,s,u){const{gen:c,compositeRule:f,data:d,opts:m}=o;if(u===void 0)return;const p=(0,e._)`${d}${(0,e.getProperty)(s)}`;if(f){(0,t.checkStrictMode)(o,`default is ignored for: ${p}`);return}let y=(0,e._)`${p} === undefined`;m.useDefaults==="empty"&&(y=(0,e._)`${y} || ${p} === null || ${p} === ""`),c.if(y,(0,e._)`${p} = ${(0,e.stringify)(u)}`)}return _c}var si={},jt={},YO;function yi(){if(YO)return jt;YO=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.validateUnion=jt.validateArray=jt.usePattern=jt.callValidateCode=jt.schemaProperties=jt.allSchemaProperties=jt.noPropertyInData=jt.propertyInData=jt.isOwnProperty=jt.hasPropFunc=jt.reportMissingProp=jt.checkMissingProp=jt.checkReportMissingProp=void 0;const e=et(),t=_t(),n=Io(),i=_t();function o(x,E){const{gen:R,data:C,it:$}=x;R.if(m(R,C,E,$.opts.ownProperties),()=>{x.setParams({missingProperty:(0,e._)`${E}`},!0),x.error()})}jt.checkReportMissingProp=o;function s({gen:x,data:E,it:{opts:R}},C,$){return(0,e.or)(...C.map(A=>(0,e.and)(m(x,E,A,R.ownProperties),(0,e._)`${$} = ${A}`)))}jt.checkMissingProp=s;function u(x,E){x.setParams({missingProperty:E},!0),x.error()}jt.reportMissingProp=u;function c(x){return x.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}jt.hasPropFunc=c;function f(x,E,R){return(0,e._)`${c(x)}.call(${E}, ${R})`}jt.isOwnProperty=f;function d(x,E,R,C){const $=(0,e._)`${E}${(0,e.getProperty)(R)} !== undefined`;return C?(0,e._)`${$} && ${f(x,E,R)}`:$}jt.propertyInData=d;function m(x,E,R,C){const $=(0,e._)`${E}${(0,e.getProperty)(R)} === undefined`;return C?(0,e.or)($,(0,e.not)(f(x,E,R))):$}jt.noPropertyInData=m;function p(x){return x?Object.keys(x).filter(E=>E!=="__proto__"):[]}jt.allSchemaProperties=p;function y(x,E){return p(E).filter(R=>!(0,t.alwaysValidSchema)(x,E[R]))}jt.schemaProperties=y;function S({schemaCode:x,data:E,it:{gen:R,topSchemaRef:C,schemaPath:$,errorPath:A},it:T},M,D,j){const I=j?(0,e._)`${x}, ${E}, ${C}${$}`:E,L=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,A)],[n.default.parentData,T.parentData],[n.default.parentDataProperty,T.parentDataProperty],[n.default.rootData,n.default.rootData]];T.opts.dynamicRef&&L.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const K=(0,e._)`${I}, ${R.object(...L)}`;return D!==e.nil?(0,e._)`${M}.call(${D}, ${K})`:(0,e._)`${M}(${K})`}jt.callValidateCode=S;const g=(0,e._)`new RegExp`;function b({gen:x,it:{opts:E}},R){const C=E.unicodeRegExp?"u":"",{regExp:$}=E.code,A=$(R,C);return x.scopeValue("pattern",{key:A.toString(),ref:A,code:(0,e._)`${$.code==="new RegExp"?g:(0,i.useFunc)(x,$)}(${R}, ${C})`})}jt.usePattern=b;function v(x){const{gen:E,data:R,keyword:C,it:$}=x,A=E.name("valid");if($.allErrors){const M=E.let("valid",!0);return T(()=>E.assign(M,!1)),M}return E.var(A,!0),T(()=>E.break()),A;function T(M){const D=E.const("len",(0,e._)`${R}.length`);E.forRange("i",0,D,j=>{x.subschema({keyword:C,dataProp:j,dataPropType:t.Type.Num},A),E.if((0,e.not)(A),M)})}}jt.validateArray=v;function _(x){const{gen:E,schema:R,keyword:C,it:$}=x;if(!Array.isArray(R))throw new Error("ajv implementation error");if(R.some(D=>(0,t.alwaysValidSchema)($,D))&&!$.opts.unevaluated)return;const T=E.let("valid",!1),M=E.name("_valid");E.block(()=>R.forEach((D,j)=>{const I=x.subschema({keyword:C,schemaProp:j,compositeRule:!0},M);E.assign(T,(0,e._)`${T} || ${M}`),x.mergeValidEvaluated(I,M)||E.if((0,e.not)(T))})),x.result(T,()=>x.reset(),()=>x.error(!0))}return jt.validateUnion=_,jt}var WO;function U7(){if(WO)return si;WO=1,Object.defineProperty(si,"__esModule",{value:!0}),si.validateKeywordUsage=si.validSchemaType=si.funcKeywordCode=si.macroKeywordCode=void 0;const e=et(),t=Io(),n=yi(),i=tm();function o(y,S){const{gen:g,keyword:b,schema:v,parentSchema:_,it:x}=y,E=S.macro.call(x.self,v,_,x),R=d(g,b,E);x.opts.validateSchema!==!1&&x.self.validateSchema(E,!0);const C=g.name("valid");y.subschema({schema:E,schemaPath:e.nil,errSchemaPath:`${x.errSchemaPath}/${b}`,topSchemaRef:R,compositeRule:!0},C),y.pass(C,()=>y.error(!0))}si.macroKeywordCode=o;function s(y,S){var g;const{gen:b,keyword:v,schema:_,parentSchema:x,$data:E,it:R}=y;f(R,S);const C=!E&&S.compile?S.compile.call(R.self,_,x,R):S.validate,$=d(b,v,C),A=b.let("valid");y.block$data(A,T),y.ok((g=S.valid)!==null&&g!==void 0?g:A);function T(){if(S.errors===!1)j(),S.modifying&&u(y),I(()=>y.error());else{const L=S.async?M():D();S.modifying&&u(y),I(()=>c(y,L))}}function M(){const L=b.let("ruleErrs",null);return b.try(()=>j((0,e._)`await `),K=>b.assign(A,!1).if((0,e._)`${K} instanceof ${R.ValidationError}`,()=>b.assign(L,(0,e._)`${K}.errors`),()=>b.throw(K))),L}function D(){const L=(0,e._)`${$}.errors`;return b.assign(L,null),j(e.nil),L}function j(L=S.async?(0,e._)`await `:e.nil){const K=R.opts.passContext?t.default.this:t.default.self,G=!("compile"in S&&!E||S.schema===!1);b.assign(A,(0,e._)`${L}${(0,n.callValidateCode)(y,$,K,G)}`,S.modifying)}function I(L){var K;b.if((0,e.not)((K=S.valid)!==null&&K!==void 0?K:A),L)}}si.funcKeywordCode=s;function u(y){const{gen:S,data:g,it:b}=y;S.if(b.parentData,()=>S.assign(g,(0,e._)`${b.parentData}[${b.parentDataProperty}]`))}function c(y,S){const{gen:g}=y;g.if((0,e._)`Array.isArray(${S})`,()=>{g.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${S} : ${t.default.vErrors}.concat(${S})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(y)},()=>y.error())}function f({schemaEnv:y},S){if(S.async&&!y.$async)throw new Error("async keyword in sync schema")}function d(y,S,g){if(g===void 0)throw new Error(`keyword "${S}" failed to compile`);return y.scopeValue("keyword",typeof g=="function"?{ref:g}:{ref:g,code:(0,e.stringify)(g)})}function m(y,S,g=!1){return!S.length||S.some(b=>b==="array"?Array.isArray(y):b==="object"?y&&typeof y=="object"&&!Array.isArray(y):typeof y==b||g&&typeof y>"u")}si.validSchemaType=m;function p({schema:y,opts:S,self:g,errSchemaPath:b},v,_){if(Array.isArray(v.keyword)?!v.keyword.includes(_):v.keyword!==_)throw new Error("ajv implementation error");const x=v.dependencies;if(x!=null&&x.some(E=>!Object.prototype.hasOwnProperty.call(y,E)))throw new Error(`parent schema must have dependencies of ${_}: ${x.join(",")}`);if(v.validateSchema&&!v.validateSchema(y[_])){const R=`keyword "${_}" value is invalid at path "${b}": `+g.errorsText(v.validateSchema.errors);if(S.validateSchema==="log")g.logger.error(R);else throw new Error(R)}}return si.validateKeywordUsage=p,si}var da={},XO;function B7(){if(XO)return da;XO=1,Object.defineProperty(da,"__esModule",{value:!0}),da.extendSubschemaMode=da.extendSubschemaData=da.getSubschema=void 0;const e=et(),t=_t();function n(s,{keyword:u,schemaProp:c,schema:f,schemaPath:d,errSchemaPath:m,topSchemaRef:p}){if(u!==void 0&&f!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(u!==void 0){const y=s.schema[u];return c===void 0?{schema:y,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(u)}`,errSchemaPath:`${s.errSchemaPath}/${u}`}:{schema:y[c],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(u)}${(0,e.getProperty)(c)}`,errSchemaPath:`${s.errSchemaPath}/${u}/${(0,t.escapeFragment)(c)}`}}if(f!==void 0){if(d===void 0||m===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:f,schemaPath:d,topSchemaRef:p,errSchemaPath:m}}throw new Error('either "keyword" or "schema" must be passed')}da.getSubschema=n;function i(s,u,{dataProp:c,dataPropType:f,data:d,dataTypes:m,propertyName:p}){if(d!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:y}=u;if(c!==void 0){const{errorPath:g,dataPathArr:b,opts:v}=u,_=y.let("data",(0,e._)`${u.data}${(0,e.getProperty)(c)}`,!0);S(_),s.errorPath=(0,e.str)`${g}${(0,t.getErrorPath)(c,f,v.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${c}`,s.dataPathArr=[...b,s.parentDataProperty]}if(d!==void 0){const g=d instanceof e.Name?d:y.let("data",d,!0);S(g),p!==void 0&&(s.propertyName=p)}m&&(s.dataTypes=m);function S(g){s.data=g,s.dataLevel=u.dataLevel+1,s.dataTypes=[],u.definedProperties=new Set,s.parentData=u.data,s.dataNames=[...u.dataNames,g]}}da.extendSubschemaData=i;function o(s,{jtdDiscriminator:u,jtdMetadata:c,compositeRule:f,createErrors:d,allErrors:m}){f!==void 0&&(s.compositeRule=f),d!==void 0&&(s.createErrors=d),m!==void 0&&(s.allErrors=m),s.jtdDiscriminator=u,s.jtdMetadata=c}return da.extendSubschemaMode=o,da}var Xn={},g0,JO;function Sj(){return JO||(JO=1,g0=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var i,o,s;if(Array.isArray(t)){if(i=t.length,i!=n.length)return!1;for(o=i;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),i=s.length,i!==Object.keys(n).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=i;o--!==0;){var u=s[o];if(!e(t[u],n[u]))return!1}return!0}return t!==t&&n!==n}),g0}var v0={exports:{}},ZO;function V7(){if(ZO)return v0.exports;ZO=1;var e=v0.exports=function(i,o,s){typeof o=="function"&&(s=o,o={}),s=o.cb||s;var u=typeof s=="function"?s:s.pre||function(){},c=s.post||function(){};t(o,u,c,i,"",i)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(i,o,s,u,c,f,d,m,p,y){if(u&&typeof u=="object"&&!Array.isArray(u)){o(u,c,f,d,m,p,y);for(var S in u){var g=u[S];if(Array.isArray(g)){if(S in e.arrayKeywords)for(var b=0;b<g.length;b++)t(i,o,s,g[b],c+"/"+S+"/"+b,f,c,S,u,b)}else if(S in e.propsKeywords){if(g&&typeof g=="object")for(var v in g)t(i,o,s,g[v],c+"/"+S+"/"+n(v),f,c,S,u,v)}else(S in e.keywords||i.allKeys&&!(S in e.skipKeywords))&&t(i,o,s,g,c+"/"+S,f,c,S,u)}s(u,c,f,d,m,p,y)}}function n(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return v0.exports}var eA;function nm(){if(eA)return Xn;eA=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.getSchemaRefs=Xn.resolveUrl=Xn.normalizeId=Xn._getFullPath=Xn.getFullPath=Xn.inlineRef=void 0;const e=_t(),t=Sj(),n=V7(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(b,v=!0){return typeof b=="boolean"?!0:v===!0?!u(b):v?c(b)<=v:!1}Xn.inlineRef=o;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(b){for(const v in b){if(s.has(v))return!0;const _=b[v];if(Array.isArray(_)&&_.some(u)||typeof _=="object"&&u(_))return!0}return!1}function c(b){let v=0;for(const _ in b){if(_==="$ref")return 1/0;if(v++,!i.has(_)&&(typeof b[_]=="object"&&(0,e.eachItem)(b[_],x=>v+=c(x)),v===1/0))return 1/0}return v}function f(b,v="",_){_!==!1&&(v=p(v));const x=b.parse(v);return d(b,x)}Xn.getFullPath=f;function d(b,v){return b.serialize(v).split("#")[0]+"#"}Xn._getFullPath=d;const m=/#\/?$/;function p(b){return b?b.replace(m,""):""}Xn.normalizeId=p;function y(b,v,_){return _=p(_),b.resolve(v,_)}Xn.resolveUrl=y;const S=/^[a-z_][-a-z0-9._]*$/i;function g(b,v){if(typeof b=="boolean")return{};const{schemaId:_,uriResolver:x}=this.opts,E=p(b[_]||v),R={"":E},C=f(x,E,!1),$={},A=new Set;return n(b,{allKeys:!0},(D,j,I,L)=>{if(L===void 0)return;const K=C+j;let G=R[L];typeof D[_]=="string"&&(G=q.call(this,D[_])),Q.call(this,D.$anchor),Q.call(this,D.$dynamicAnchor),R[j]=G;function q(W){const ne=this.opts.uriResolver.resolve;if(W=p(G?ne(G,W):W),A.has(W))throw M(W);A.add(W);let X=this.refs[W];return typeof X=="string"&&(X=this.refs[X]),typeof X=="object"?T(D,X.schema,W):W!==p(K)&&(W[0]==="#"?(T(D,$[W],W),$[W]=D):this.refs[W]=K),W}function Q(W){if(typeof W=="string"){if(!S.test(W))throw new Error(`invalid anchor "${W}"`);q.call(this,`#${W}`)}}}),$;function T(D,j,I){if(j!==void 0&&!t(D,j))throw M(I)}function M(D){return new Error(`reference "${D}" resolves to more than one schema`)}}return Xn.getSchemaRefs=g,Xn}var tA;function rm(){if(tA)return ca;tA=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.getData=ca.KeywordCxt=ca.validateFunctionCode=void 0;const e=L7(),t=Rp(),n=bj(),i=Rp(),o=q7(),s=U7(),u=B7(),c=et(),f=Io(),d=nm(),m=_t(),p=tm();function y(Y){if(C(Y)&&(A(Y),R(Y))){v(Y);return}S(Y,()=>(0,e.topBoolOrEmptySchema)(Y))}ca.validateFunctionCode=y;function S({gen:Y,validateName:Z,schema:ue,schemaEnv:ae,opts:Se},ye){Se.code.es5?Y.func(Z,(0,c._)`${f.default.data}, ${f.default.valCxt}`,ae.$async,()=>{Y.code((0,c._)`"use strict"; ${x(ue,Se)}`),b(Y,Se),Y.code(ye)}):Y.func(Z,(0,c._)`${f.default.data}, ${g(Se)}`,ae.$async,()=>Y.code(x(ue,Se)).code(ye))}function g(Y){return(0,c._)`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${Y.dynamicRef?(0,c._)`, ${f.default.dynamicAnchors}={}`:c.nil}}={}`}function b(Y,Z){Y.if(f.default.valCxt,()=>{Y.var(f.default.instancePath,(0,c._)`${f.default.valCxt}.${f.default.instancePath}`),Y.var(f.default.parentData,(0,c._)`${f.default.valCxt}.${f.default.parentData}`),Y.var(f.default.parentDataProperty,(0,c._)`${f.default.valCxt}.${f.default.parentDataProperty}`),Y.var(f.default.rootData,(0,c._)`${f.default.valCxt}.${f.default.rootData}`),Z.dynamicRef&&Y.var(f.default.dynamicAnchors,(0,c._)`${f.default.valCxt}.${f.default.dynamicAnchors}`)},()=>{Y.var(f.default.instancePath,(0,c._)`""`),Y.var(f.default.parentData,(0,c._)`undefined`),Y.var(f.default.parentDataProperty,(0,c._)`undefined`),Y.var(f.default.rootData,f.default.data),Z.dynamicRef&&Y.var(f.default.dynamicAnchors,(0,c._)`{}`)})}function v(Y){const{schema:Z,opts:ue,gen:ae}=Y;S(Y,()=>{ue.$comment&&Z.$comment&&L(Y),D(Y),ae.let(f.default.vErrors,null),ae.let(f.default.errors,0),ue.unevaluated&&_(Y),T(Y),K(Y)})}function _(Y){const{gen:Z,validateName:ue}=Y;Y.evaluated=Z.const("evaluated",(0,c._)`${ue}.evaluated`),Z.if((0,c._)`${Y.evaluated}.dynamicProps`,()=>Z.assign((0,c._)`${Y.evaluated}.props`,(0,c._)`undefined`)),Z.if((0,c._)`${Y.evaluated}.dynamicItems`,()=>Z.assign((0,c._)`${Y.evaluated}.items`,(0,c._)`undefined`))}function x(Y,Z){const ue=typeof Y=="object"&&Y[Z.schemaId];return ue&&(Z.code.source||Z.code.process)?(0,c._)`/*# sourceURL=${ue} */`:c.nil}function E(Y,Z){if(C(Y)&&(A(Y),R(Y))){$(Y,Z);return}(0,e.boolOrEmptySchema)(Y,Z)}function R({schema:Y,self:Z}){if(typeof Y=="boolean")return!Y;for(const ue in Y)if(Z.RULES.all[ue])return!0;return!1}function C(Y){return typeof Y.schema!="boolean"}function $(Y,Z){const{schema:ue,gen:ae,opts:Se}=Y;Se.$comment&&ue.$comment&&L(Y),j(Y),I(Y);const ye=ae.const("_errs",f.default.errors);T(Y,ye),ae.var(Z,(0,c._)`${ye} === ${f.default.errors}`)}function A(Y){(0,m.checkUnknownRules)(Y),M(Y)}function T(Y,Z){if(Y.opts.jtd)return q(Y,[],!1,Z);const ue=(0,t.getSchemaTypes)(Y.schema),ae=(0,t.coerceAndCheckDataType)(Y,ue);q(Y,ue,!ae,Z)}function M(Y){const{schema:Z,errSchemaPath:ue,opts:ae,self:Se}=Y;Z.$ref&&ae.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(Z,Se.RULES)&&Se.logger.warn(`$ref: keywords ignored in schema at path "${ue}"`)}function D(Y){const{schema:Z,opts:ue}=Y;Z.default!==void 0&&ue.useDefaults&&ue.strictSchema&&(0,m.checkStrictMode)(Y,"default is ignored in the schema root")}function j(Y){const Z=Y.schema[Y.opts.schemaId];Z&&(Y.baseId=(0,d.resolveUrl)(Y.opts.uriResolver,Y.baseId,Z))}function I(Y){if(Y.schema.$async&&!Y.schemaEnv.$async)throw new Error("async schema in sync schema")}function L({gen:Y,schemaEnv:Z,schema:ue,errSchemaPath:ae,opts:Se}){const ye=ue.$comment;if(Se.$comment===!0)Y.code((0,c._)`${f.default.self}.logger.log(${ye})`);else if(typeof Se.$comment=="function"){const Oe=(0,c.str)`${ae}/$comment`,Re=Y.scopeValue("root",{ref:Z.root});Y.code((0,c._)`${f.default.self}.opts.$comment(${ye}, ${Oe}, ${Re}.schema)`)}}function K(Y){const{gen:Z,schemaEnv:ue,validateName:ae,ValidationError:Se,opts:ye}=Y;ue.$async?Z.if((0,c._)`${f.default.errors} === 0`,()=>Z.return(f.default.data),()=>Z.throw((0,c._)`new ${Se}(${f.default.vErrors})`)):(Z.assign((0,c._)`${ae}.errors`,f.default.vErrors),ye.unevaluated&&G(Y),Z.return((0,c._)`${f.default.errors} === 0`))}function G({gen:Y,evaluated:Z,props:ue,items:ae}){ue instanceof c.Name&&Y.assign((0,c._)`${Z}.props`,ue),ae instanceof c.Name&&Y.assign((0,c._)`${Z}.items`,ae)}function q(Y,Z,ue,ae){const{gen:Se,schema:ye,data:Oe,allErrors:Re,opts:Ce,self:Ae}=Y,{RULES:$e}=Ae;if(ye.$ref&&(Ce.ignoreKeywordsWithRef||!(0,m.schemaHasRulesButRef)(ye,$e))){Se.block(()=>le(Y,"$ref",$e.all.$ref.definition));return}Ce.jtd||W(Y,Z),Se.block(()=>{for(const Ie of $e.rules)Fe(Ie);Fe($e.post)});function Fe(Ie){(0,n.shouldUseGroup)(ye,Ie)&&(Ie.type?(Se.if((0,i.checkDataType)(Ie.type,Oe,Ce.strictNumbers)),Q(Y,Ie),Z.length===1&&Z[0]===Ie.type&&ue&&(Se.else(),(0,i.reportTypeError)(Y)),Se.endIf()):Q(Y,Ie),Re||Se.if((0,c._)`${f.default.errors} === ${ae||0}`))}}function Q(Y,Z){const{gen:ue,schema:ae,opts:{useDefaults:Se}}=Y;Se&&(0,o.assignDefaults)(Y,Z.type),ue.block(()=>{for(const ye of Z.rules)(0,n.shouldUseRule)(ae,ye)&&le(Y,ye.keyword,ye.definition,Z.type)})}function W(Y,Z){Y.schemaEnv.meta||!Y.opts.strictTypes||(ne(Y,Z),Y.opts.allowUnionTypes||X(Y,Z),P(Y,Y.dataTypes))}function ne(Y,Z){if(Z.length){if(!Y.dataTypes.length){Y.dataTypes=Z;return}Z.forEach(ue=>{U(Y.dataTypes,ue)||V(Y,`type "${ue}" not allowed by context "${Y.dataTypes.join(",")}"`)}),k(Y,Z)}}function X(Y,Z){Z.length>1&&!(Z.length===2&&Z.includes("null"))&&V(Y,"use allowUnionTypes to allow union type keyword")}function P(Y,Z){const ue=Y.self.RULES.all;for(const ae in ue){const Se=ue[ae];if(typeof Se=="object"&&(0,n.shouldUseRule)(Y.schema,Se)){const{type:ye}=Se.definition;ye.length&&!ye.some(Oe=>B(Z,Oe))&&V(Y,`missing type "${ye.join(",")}" for keyword "${ae}"`)}}}function B(Y,Z){return Y.includes(Z)||Z==="number"&&Y.includes("integer")}function U(Y,Z){return Y.includes(Z)||Z==="integer"&&Y.includes("number")}function k(Y,Z){const ue=[];for(const ae of Y.dataTypes)U(Z,ae)?ue.push(ae):Z.includes("integer")&&ae==="number"&&ue.push("integer");Y.dataTypes=ue}function V(Y,Z){const ue=Y.schemaEnv.baseId+Y.errSchemaPath;Z+=` at "${ue}" (strictTypes)`,(0,m.checkStrictMode)(Y,Z,Y.opts.strictTypes)}class J{constructor(Z,ue,ae){if((0,s.validateKeywordUsage)(Z,ue,ae),this.gen=Z.gen,this.allErrors=Z.allErrors,this.keyword=ae,this.data=Z.data,this.schema=Z.schema[ae],this.$data=ue.$data&&Z.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m.schemaRefOrVal)(Z,this.schema,ae,this.$data),this.schemaType=ue.schemaType,this.parentSchema=Z.schema,this.params={},this.it=Z,this.def=ue,this.$data)this.schemaCode=Z.gen.const("vSchema",fe(this.$data,Z));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,ue.schemaType,ue.allowUndefined))throw new Error(`${ae} value must be ${JSON.stringify(ue.schemaType)}`);("code"in ue?ue.trackErrors:ue.errors!==!1)&&(this.errsCount=Z.gen.const("_errs",f.default.errors))}result(Z,ue,ae){this.failResult((0,c.not)(Z),ue,ae)}failResult(Z,ue,ae){this.gen.if(Z),ae?ae():this.error(),ue?(this.gen.else(),ue(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(Z,ue){this.failResult((0,c.not)(Z),void 0,ue)}fail(Z){if(Z===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(Z),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(Z){if(!this.$data)return this.fail(Z);const{schemaCode:ue}=this;this.fail((0,c._)`${ue} !== undefined && (${(0,c.or)(this.invalid$data(),Z)})`)}error(Z,ue,ae){if(ue){this.setParams(ue),this._error(Z,ae),this.setParams({});return}this._error(Z,ae)}_error(Z,ue){(Z?p.reportExtraError:p.reportError)(this,this.def.error,ue)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(Z){this.allErrors||this.gen.if(Z)}setParams(Z,ue){ue?Object.assign(this.params,Z):this.params=Z}block$data(Z,ue,ae=c.nil){this.gen.block(()=>{this.check$data(Z,ae),ue()})}check$data(Z=c.nil,ue=c.nil){if(!this.$data)return;const{gen:ae,schemaCode:Se,schemaType:ye,def:Oe}=this;ae.if((0,c.or)((0,c._)`${Se} === undefined`,ue)),Z!==c.nil&&ae.assign(Z,!0),(ye.length||Oe.validateSchema)&&(ae.elseIf(this.invalid$data()),this.$dataError(),Z!==c.nil&&ae.assign(Z,!1)),ae.else()}invalid$data(){const{gen:Z,schemaCode:ue,schemaType:ae,def:Se,it:ye}=this;return(0,c.or)(Oe(),Re());function Oe(){if(ae.length){if(!(ue instanceof c.Name))throw new Error("ajv implementation error");const Ce=Array.isArray(ae)?ae:[ae];return(0,c._)`${(0,i.checkDataTypes)(Ce,ue,ye.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function Re(){if(Se.validateSchema){const Ce=Z.scopeValue("validate$data",{ref:Se.validateSchema});return(0,c._)`!${Ce}(${ue})`}return c.nil}}subschema(Z,ue){const ae=(0,u.getSubschema)(this.it,Z);(0,u.extendSubschemaData)(ae,this.it,Z),(0,u.extendSubschemaMode)(ae,Z);const Se={...this.it,...ae,items:void 0,props:void 0};return E(Se,ue),Se}mergeEvaluated(Z,ue){const{it:ae,gen:Se}=this;ae.opts.unevaluated&&(ae.props!==!0&&Z.props!==void 0&&(ae.props=m.mergeEvaluated.props(Se,Z.props,ae.props,ue)),ae.items!==!0&&Z.items!==void 0&&(ae.items=m.mergeEvaluated.items(Se,Z.items,ae.items,ue)))}mergeValidEvaluated(Z,ue){const{it:ae,gen:Se}=this;if(ae.opts.unevaluated&&(ae.props!==!0||ae.items!==!0))return Se.if(ue,()=>this.mergeEvaluated(Z,c.Name)),!0}}ca.KeywordCxt=J;function le(Y,Z,ue,ae){const Se=new J(Y,ue,Z);"code"in ue?ue.code(Se,ae):Se.$data&&ue.validate?(0,s.funcKeywordCode)(Se,ue):"macro"in ue?(0,s.macroKeywordCode)(Se,ue):(ue.compile||ue.validate)&&(0,s.funcKeywordCode)(Se,ue)}const ie=/^\/(?:[^~]|~0|~1)*$/,se=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function fe(Y,{dataLevel:Z,dataNames:ue,dataPathArr:ae}){let Se,ye;if(Y==="")return f.default.rootData;if(Y[0]==="/"){if(!ie.test(Y))throw new Error(`Invalid JSON-pointer: ${Y}`);Se=Y,ye=f.default.rootData}else{const Ae=se.exec(Y);if(!Ae)throw new Error(`Invalid JSON-pointer: ${Y}`);const $e=+Ae[1];if(Se=Ae[2],Se==="#"){if($e>=Z)throw new Error(Ce("property/index",$e));return ae[Z-$e]}if($e>Z)throw new Error(Ce("data",$e));if(ye=ue[Z-$e],!Se)return ye}let Oe=ye;const Re=Se.split("/");for(const Ae of Re)Ae&&(ye=(0,c._)`${ye}${(0,c.getProperty)((0,m.unescapeJsonPointer)(Ae))}`,Oe=(0,c._)`${Oe} && ${ye}`);return Oe;function Ce(Ae,$e){return`Cannot access ${Ae} ${$e} levels up, current level is ${Z}`}}return ca.getData=fe,ca}var ah={},nA;function US(){if(nA)return ah;nA=1,Object.defineProperty(ah,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return ah.default=e,ah}var oh={},rA;function im(){if(rA)return oh;rA=1,Object.defineProperty(oh,"__esModule",{value:!0});const e=nm();class t extends Error{constructor(i,o,s,u){super(u||`can't resolve reference ${s} from id ${o}`),this.missingRef=(0,e.resolveUrl)(i,o,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return oh.default=t,oh}var Rr={},iA;function BS(){if(iA)return Rr;iA=1,Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.resolveSchema=Rr.getCompilingSchema=Rr.resolveRef=Rr.compileSchema=Rr.SchemaEnv=void 0;const e=et(),t=US(),n=Io(),i=nm(),o=_t(),s=rm();class u{constructor(_){var x;this.refs={},this.dynamicAnchors={};let E;typeof _.schema=="object"&&(E=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(x=_.baseId)!==null&&x!==void 0?x:(0,i.normalizeId)(E==null?void 0:E[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=E==null?void 0:E.$async,this.refs={}}}Rr.SchemaEnv=u;function c(v){const _=m.call(this,v);if(_)return _;const x=(0,i.getFullPath)(this.opts.uriResolver,v.root.baseId),{es5:E,lines:R}=this.opts.code,{ownProperties:C}=this.opts,$=new e.CodeGen(this.scope,{es5:E,lines:R,ownProperties:C});let A;v.$async&&(A=$.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const T=$.scopeName("validate");v.validateName=T;const M={gen:$,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:$.scopeValue("schema",this.opts.code.source===!0?{ref:v.schema,code:(0,e.stringify)(v.schema)}:{ref:v.schema}),validateName:T,ValidationError:A,schema:v.schema,schemaEnv:v,rootId:x,baseId:v.baseId||x,schemaPath:e.nil,errSchemaPath:v.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let D;try{this._compilations.add(v),(0,s.validateFunctionCode)(M),$.optimize(this.opts.code.optimize);const j=$.toString();D=`${$.scopeRefs(n.default.scope)}return ${j}`,this.opts.code.process&&(D=this.opts.code.process(D,v));const L=new Function(`${n.default.self}`,`${n.default.scope}`,D)(this,this.scope.get());if(this.scope.value(T,{ref:L}),L.errors=null,L.schema=v.schema,L.schemaEnv=v,v.$async&&(L.$async=!0),this.opts.code.source===!0&&(L.source={validateName:T,validateCode:j,scopeValues:$._values}),this.opts.unevaluated){const{props:K,items:G}=M;L.evaluated={props:K instanceof e.Name?void 0:K,items:G instanceof e.Name?void 0:G,dynamicProps:K instanceof e.Name,dynamicItems:G instanceof e.Name},L.source&&(L.source.evaluated=(0,e.stringify)(L.evaluated))}return v.validate=L,v}catch(j){throw delete v.validate,delete v.validateName,D&&this.logger.error("Error compiling schema, function code:",D),j}finally{this._compilations.delete(v)}}Rr.compileSchema=c;function f(v,_,x){var E;x=(0,i.resolveUrl)(this.opts.uriResolver,_,x);const R=v.refs[x];if(R)return R;let C=y.call(this,v,x);if(C===void 0){const $=(E=v.localRefs)===null||E===void 0?void 0:E[x],{schemaId:A}=this.opts;$&&(C=new u({schema:$,schemaId:A,root:v,baseId:_}))}if(C!==void 0)return v.refs[x]=d.call(this,C)}Rr.resolveRef=f;function d(v){return(0,i.inlineRef)(v.schema,this.opts.inlineRefs)?v.schema:v.validate?v:c.call(this,v)}function m(v){for(const _ of this._compilations)if(p(_,v))return _}Rr.getCompilingSchema=m;function p(v,_){return v.schema===_.schema&&v.root===_.root&&v.baseId===_.baseId}function y(v,_){let x;for(;typeof(x=this.refs[_])=="string";)_=x;return x||this.schemas[_]||S.call(this,v,_)}function S(v,_){const x=this.opts.uriResolver.parse(_),E=(0,i._getFullPath)(this.opts.uriResolver,x);let R=(0,i.getFullPath)(this.opts.uriResolver,v.baseId,void 0);if(Object.keys(v.schema).length>0&&E===R)return b.call(this,x,v);const C=(0,i.normalizeId)(E),$=this.refs[C]||this.schemas[C];if(typeof $=="string"){const A=S.call(this,v,$);return typeof(A==null?void 0:A.schema)!="object"?void 0:b.call(this,x,A)}if(typeof($==null?void 0:$.schema)=="object"){if($.validate||c.call(this,$),C===(0,i.normalizeId)(_)){const{schema:A}=$,{schemaId:T}=this.opts,M=A[T];return M&&(R=(0,i.resolveUrl)(this.opts.uriResolver,R,M)),new u({schema:A,schemaId:T,root:v,baseId:R})}return b.call(this,x,$)}}Rr.resolveSchema=S;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function b(v,{baseId:_,schema:x,root:E}){var R;if(((R=v.fragment)===null||R===void 0?void 0:R[0])!=="/")return;for(const A of v.fragment.slice(1).split("/")){if(typeof x=="boolean")return;const T=x[(0,o.unescapeFragment)(A)];if(T===void 0)return;x=T;const M=typeof x=="object"&&x[this.opts.schemaId];!g.has(A)&&M&&(_=(0,i.resolveUrl)(this.opts.uriResolver,_,M))}let C;if(typeof x!="boolean"&&x.$ref&&!(0,o.schemaHasRulesButRef)(x,this.RULES)){const A=(0,i.resolveUrl)(this.opts.uriResolver,_,x.$ref);C=S.call(this,E,A)}const{schemaId:$}=this.opts;if(C=C||new u({schema:x,schemaId:$,root:E,baseId:_}),C.schema!==C.root.schema)return C}return Rr}const H7="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",K7="Meta-schema for $data reference (JSON AnySchema extension proposal)",G7="object",Q7=["$data"],Y7={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},W7=!1,X7={$id:H7,description:K7,type:G7,required:Q7,properties:Y7,additionalProperties:W7};var sh={},aA;function J7(){if(aA)return sh;aA=1,Object.defineProperty(sh,"__esModule",{value:!0});const e=_D();return e.code='require("ajv/dist/runtime/uri").default',sh.default=e,sh}var oA;function Z7(){return oA||(oA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=rm();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=et();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const i=US(),o=im(),s=yj(),u=BS(),c=et(),f=nm(),d=Rp(),m=_t(),p=X7,y=J7(),S=(X,P)=>new RegExp(X,P);S.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},x=200;function E(X){var P,B,U,k,V,J,le,ie,se,fe,Y,Z,ue,ae,Se,ye,Oe,Re,Ce,Ae,$e,Fe,Ie,je,Ye;const ke=X.strict,Je=(P=X.code)===null||P===void 0?void 0:P.optimize,tt=Je===!0||Je===void 0?1:Je||0,wt=(U=(B=X.code)===null||B===void 0?void 0:B.regExp)!==null&&U!==void 0?U:S,tn=(k=X.uriResolver)!==null&&k!==void 0?k:y.default;return{strictSchema:(J=(V=X.strictSchema)!==null&&V!==void 0?V:ke)!==null&&J!==void 0?J:!0,strictNumbers:(ie=(le=X.strictNumbers)!==null&&le!==void 0?le:ke)!==null&&ie!==void 0?ie:!0,strictTypes:(fe=(se=X.strictTypes)!==null&&se!==void 0?se:ke)!==null&&fe!==void 0?fe:"log",strictTuples:(Z=(Y=X.strictTuples)!==null&&Y!==void 0?Y:ke)!==null&&Z!==void 0?Z:"log",strictRequired:(ae=(ue=X.strictRequired)!==null&&ue!==void 0?ue:ke)!==null&&ae!==void 0?ae:!1,code:X.code?{...X.code,optimize:tt,regExp:wt}:{optimize:tt,regExp:wt},loopRequired:(Se=X.loopRequired)!==null&&Se!==void 0?Se:x,loopEnum:(ye=X.loopEnum)!==null&&ye!==void 0?ye:x,meta:(Oe=X.meta)!==null&&Oe!==void 0?Oe:!0,messages:(Re=X.messages)!==null&&Re!==void 0?Re:!0,inlineRefs:(Ce=X.inlineRefs)!==null&&Ce!==void 0?Ce:!0,schemaId:(Ae=X.schemaId)!==null&&Ae!==void 0?Ae:"$id",addUsedSchema:($e=X.addUsedSchema)!==null&&$e!==void 0?$e:!0,validateSchema:(Fe=X.validateSchema)!==null&&Fe!==void 0?Fe:!0,validateFormats:(Ie=X.validateFormats)!==null&&Ie!==void 0?Ie:!0,unicodeRegExp:(je=X.unicodeRegExp)!==null&&je!==void 0?je:!0,int32range:(Ye=X.int32range)!==null&&Ye!==void 0?Ye:!0,uriResolver:tn}}class R{constructor(P={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,P=this.opts={...P,...E(P)};const{es5:B,lines:U}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:b,es5:B,lines:U}),this.logger=I(P.logger);const k=P.validateFormats;P.validateFormats=!1,this.RULES=(0,s.getRules)(),C.call(this,v,P,"NOT SUPPORTED"),C.call(this,_,P,"DEPRECATED","warn"),this._metaOpts=D.call(this),P.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),P.keywords&&M.call(this,P.keywords),typeof P.meta=="object"&&this.addMetaSchema(P.meta),A.call(this),P.validateFormats=k}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:P,meta:B,schemaId:U}=this.opts;let k=p;U==="id"&&(k={...p},k.id=k.$id,delete k.$id),B&&P&&this.addMetaSchema(k,k[U],!1)}defaultMeta(){const{meta:P,schemaId:B}=this.opts;return this.opts.defaultMeta=typeof P=="object"?P[B]||P:void 0}validate(P,B){let U;if(typeof P=="string"){if(U=this.getSchema(P),!U)throw new Error(`no schema with key or ref "${P}"`)}else U=this.compile(P);const k=U(B);return"$async"in U||(this.errors=U.errors),k}compile(P,B){const U=this._addSchema(P,B);return U.validate||this._compileSchemaEnv(U)}compileAsync(P,B){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:U}=this.opts;return k.call(this,P,B);async function k(fe,Y){await V.call(this,fe.$schema);const Z=this._addSchema(fe,Y);return Z.validate||J.call(this,Z)}async function V(fe){fe&&!this.getSchema(fe)&&await k.call(this,{$ref:fe},!0)}async function J(fe){try{return this._compileSchemaEnv(fe)}catch(Y){if(!(Y instanceof o.default))throw Y;return le.call(this,Y),await ie.call(this,Y.missingSchema),J.call(this,fe)}}function le({missingSchema:fe,missingRef:Y}){if(this.refs[fe])throw new Error(`AnySchema ${fe} is loaded but ${Y} cannot be resolved`)}async function ie(fe){const Y=await se.call(this,fe);this.refs[fe]||await V.call(this,Y.$schema),this.refs[fe]||this.addSchema(Y,fe,B)}async function se(fe){const Y=this._loading[fe];if(Y)return Y;try{return await(this._loading[fe]=U(fe))}finally{delete this._loading[fe]}}}addSchema(P,B,U,k=this.opts.validateSchema){if(Array.isArray(P)){for(const J of P)this.addSchema(J,void 0,U,k);return this}let V;if(typeof P=="object"){const{schemaId:J}=this.opts;if(V=P[J],V!==void 0&&typeof V!="string")throw new Error(`schema ${J} must be string`)}return B=(0,f.normalizeId)(B||V),this._checkUnique(B),this.schemas[B]=this._addSchema(P,U,B,k,!0),this}addMetaSchema(P,B,U=this.opts.validateSchema){return this.addSchema(P,B,!0,U),this}validateSchema(P,B){if(typeof P=="boolean")return!0;let U;if(U=P.$schema,U!==void 0&&typeof U!="string")throw new Error("$schema must be a string");if(U=U||this.opts.defaultMeta||this.defaultMeta(),!U)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const k=this.validate(U,P);if(!k&&B){const V="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(V);else throw new Error(V)}return k}getSchema(P){let B;for(;typeof(B=$.call(this,P))=="string";)P=B;if(B===void 0){const{schemaId:U}=this.opts,k=new u.SchemaEnv({schema:{},schemaId:U});if(B=u.resolveSchema.call(this,k,P),!B)return;this.refs[P]=B}return B.validate||this._compileSchemaEnv(B)}removeSchema(P){if(P instanceof RegExp)return this._removeAllSchemas(this.schemas,P),this._removeAllSchemas(this.refs,P),this;switch(typeof P){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const B=$.call(this,P);return typeof B=="object"&&this._cache.delete(B.schema),delete this.schemas[P],delete this.refs[P],this}case"object":{const B=P;this._cache.delete(B);let U=P[this.opts.schemaId];return U&&(U=(0,f.normalizeId)(U),delete this.schemas[U],delete this.refs[U]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(P){for(const B of P)this.addKeyword(B);return this}addKeyword(P,B){let U;if(typeof P=="string")U=P,typeof B=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),B.keyword=U);else if(typeof P=="object"&&B===void 0){if(B=P,U=B.keyword,Array.isArray(U)&&!U.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(K.call(this,U,B),!B)return(0,m.eachItem)(U,V=>G.call(this,V)),this;Q.call(this,B);const k={...B,type:(0,d.getJSONTypes)(B.type),schemaType:(0,d.getJSONTypes)(B.schemaType)};return(0,m.eachItem)(U,k.type.length===0?V=>G.call(this,V,k):V=>k.type.forEach(J=>G.call(this,V,k,J))),this}getKeyword(P){const B=this.RULES.all[P];return typeof B=="object"?B.definition:!!B}removeKeyword(P){const{RULES:B}=this;delete B.keywords[P],delete B.all[P];for(const U of B.rules){const k=U.rules.findIndex(V=>V.keyword===P);k>=0&&U.rules.splice(k,1)}return this}addFormat(P,B){return typeof B=="string"&&(B=new RegExp(B)),this.formats[P]=B,this}errorsText(P=this.errors,{separator:B=", ",dataVar:U="data"}={}){return!P||P.length===0?"No errors":P.map(k=>`${U}${k.instancePath} ${k.message}`).reduce((k,V)=>k+B+V)}$dataMetaSchema(P,B){const U=this.RULES.all;P=JSON.parse(JSON.stringify(P));for(const k of B){const V=k.split("/").slice(1);let J=P;for(const le of V)J=J[le];for(const le in U){const ie=U[le];if(typeof ie!="object")continue;const{$data:se}=ie.definition,fe=J[le];se&&fe&&(J[le]=ne(fe))}}return P}_removeAllSchemas(P,B){for(const U in P){const k=P[U];(!B||B.test(U))&&(typeof k=="string"?delete P[U]:k&&!k.meta&&(this._cache.delete(k.schema),delete P[U]))}}_addSchema(P,B,U,k=this.opts.validateSchema,V=this.opts.addUsedSchema){let J;const{schemaId:le}=this.opts;if(typeof P=="object")J=P[le];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof P!="boolean")throw new Error("schema must be object or boolean")}let ie=this._cache.get(P);if(ie!==void 0)return ie;U=(0,f.normalizeId)(J||U);const se=f.getSchemaRefs.call(this,P,U);return ie=new u.SchemaEnv({schema:P,schemaId:le,meta:B,baseId:U,localRefs:se}),this._cache.set(ie.schema,ie),V&&!U.startsWith("#")&&(U&&this._checkUnique(U),this.refs[U]=ie),k&&this.validateSchema(P,!0),ie}_checkUnique(P){if(this.schemas[P]||this.refs[P])throw new Error(`schema with key or id "${P}" already exists`)}_compileSchemaEnv(P){if(P.meta?this._compileMetaSchema(P):u.compileSchema.call(this,P),!P.validate)throw new Error("ajv implementation error");return P.validate}_compileMetaSchema(P){const B=this.opts;this.opts=this._metaOpts;try{u.compileSchema.call(this,P)}finally{this.opts=B}}}R.ValidationError=i.default,R.MissingRefError=o.default,e.default=R;function C(X,P,B,U="error"){for(const k in X){const V=k;V in P&&this.logger[U](`${B}: option ${k}. ${X[V]}`)}}function $(X){return X=(0,f.normalizeId)(X),this.schemas[X]||this.refs[X]}function A(){const X=this.opts.schemas;if(X)if(Array.isArray(X))this.addSchema(X);else for(const P in X)this.addSchema(X[P],P)}function T(){for(const X in this.opts.formats){const P=this.opts.formats[X];P&&this.addFormat(X,P)}}function M(X){if(Array.isArray(X)){this.addVocabulary(X);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const P in X){const B=X[P];B.keyword||(B.keyword=P),this.addKeyword(B)}}function D(){const X={...this.opts};for(const P of g)delete X[P];return X}const j={log(){},warn(){},error(){}};function I(X){if(X===!1)return j;if(X===void 0)return console;if(X.log&&X.warn&&X.error)return X;throw new Error("logger must implement log, warn and error methods")}const L=/^[a-z_$][a-z0-9_$:-]*$/i;function K(X,P){const{RULES:B}=this;if((0,m.eachItem)(X,U=>{if(B.keywords[U])throw new Error(`Keyword ${U} is already defined`);if(!L.test(U))throw new Error(`Keyword ${U} has invalid name`)}),!!P&&P.$data&&!("code"in P||"validate"in P))throw new Error('$data keyword must have "code" or "validate" function')}function G(X,P,B){var U;const k=P==null?void 0:P.post;if(B&&k)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:V}=this;let J=k?V.post:V.rules.find(({type:ie})=>ie===B);if(J||(J={type:B,rules:[]},V.rules.push(J)),V.keywords[X]=!0,!P)return;const le={keyword:X,definition:{...P,type:(0,d.getJSONTypes)(P.type),schemaType:(0,d.getJSONTypes)(P.schemaType)}};P.before?q.call(this,J,le,P.before):J.rules.push(le),V.all[X]=le,(U=P.implements)===null||U===void 0||U.forEach(ie=>this.addKeyword(ie))}function q(X,P,B){const U=X.rules.findIndex(k=>k.keyword===B);U>=0?X.rules.splice(U,0,P):(X.rules.push(P),this.logger.warn(`rule ${B} is not defined`))}function Q(X){let{metaSchema:P}=X;P!==void 0&&(X.$data&&this.opts.$data&&(P=ne(P)),X.validateSchema=this.compile(P,!0))}const W={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ne(X){return{anyOf:[X,W]}}})(f0)),f0}var lh={},uh={},ch={},sA;function eG(){if(sA)return ch;sA=1,Object.defineProperty(ch,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return ch.default=e,ch}var no={},lA;function tG(){if(lA)return no;lA=1,Object.defineProperty(no,"__esModule",{value:!0}),no.callRef=no.getValidate=void 0;const e=im(),t=yi(),n=et(),i=Io(),o=BS(),s=_t(),u={keyword:"$ref",schemaType:"string",code(d){const{gen:m,schema:p,it:y}=d,{baseId:S,schemaEnv:g,validateName:b,opts:v,self:_}=y,{root:x}=g;if((p==="#"||p==="#/")&&S===x.baseId)return R();const E=o.resolveRef.call(_,x,S,p);if(E===void 0)throw new e.default(y.opts.uriResolver,S,p);if(E instanceof o.SchemaEnv)return C(E);return $(E);function R(){if(g===x)return f(d,b,g,g.$async);const A=m.scopeValue("root",{ref:x});return f(d,(0,n._)`${A}.validate`,x,x.$async)}function C(A){const T=c(d,A);f(d,T,A,A.$async)}function $(A){const T=m.scopeValue("schema",v.code.source===!0?{ref:A,code:(0,n.stringify)(A)}:{ref:A}),M=m.name("valid"),D=d.subschema({schema:A,dataTypes:[],schemaPath:n.nil,topSchemaRef:T,errSchemaPath:p},M);d.mergeEvaluated(D),d.ok(M)}}};function c(d,m){const{gen:p}=d;return m.validate?p.scopeValue("validate",{ref:m.validate}):(0,n._)`${p.scopeValue("wrapper",{ref:m})}.validate`}no.getValidate=c;function f(d,m,p,y){const{gen:S,it:g}=d,{allErrors:b,schemaEnv:v,opts:_}=g,x=_.passContext?i.default.this:n.nil;y?E():R();function E(){if(!v.$async)throw new Error("async schema referenced by sync schema");const A=S.let("valid");S.try(()=>{S.code((0,n._)`await ${(0,t.callValidateCode)(d,m,x)}`),$(m),b||S.assign(A,!0)},T=>{S.if((0,n._)`!(${T} instanceof ${g.ValidationError})`,()=>S.throw(T)),C(T),b||S.assign(A,!1)}),d.ok(A)}function R(){d.result((0,t.callValidateCode)(d,m,x),()=>$(m),()=>C(m))}function C(A){const T=(0,n._)`${A}.errors`;S.assign(i.default.vErrors,(0,n._)`${i.default.vErrors} === null ? ${T} : ${i.default.vErrors}.concat(${T})`),S.assign(i.default.errors,(0,n._)`${i.default.vErrors}.length`)}function $(A){var T;if(!g.opts.unevaluated)return;const M=(T=p==null?void 0:p.validate)===null||T===void 0?void 0:T.evaluated;if(g.props!==!0)if(M&&!M.dynamicProps)M.props!==void 0&&(g.props=s.mergeEvaluated.props(S,M.props,g.props));else{const D=S.var("props",(0,n._)`${A}.evaluated.props`);g.props=s.mergeEvaluated.props(S,D,g.props,n.Name)}if(g.items!==!0)if(M&&!M.dynamicItems)M.items!==void 0&&(g.items=s.mergeEvaluated.items(S,M.items,g.items));else{const D=S.var("items",(0,n._)`${A}.evaluated.items`);g.items=s.mergeEvaluated.items(S,D,g.items,n.Name)}}}return no.callRef=f,no.default=u,no}var uA;function nG(){if(uA)return uh;uA=1,Object.defineProperty(uh,"__esModule",{value:!0});const e=eG(),t=tG(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return uh.default=n,uh}var fh={},dh={},cA;function rG(){if(cA)return dh;cA=1,Object.defineProperty(dh,"__esModule",{value:!0});const e=et(),t=e.operators,n={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},i={message:({keyword:s,schemaCode:u})=>(0,e.str)`must be ${n[s].okStr} ${u}`,params:({keyword:s,schemaCode:u})=>(0,e._)`{comparison: ${n[s].okStr}, limit: ${u}}`},o={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:i,code(s){const{keyword:u,data:c,schemaCode:f}=s;s.fail$data((0,e._)`${c} ${n[u].fail} ${f} || isNaN(${c})`)}};return dh.default=o,dh}var hh={},fA;function iG(){if(fA)return hh;fA=1,Object.defineProperty(hh,"__esModule",{value:!0});const e=et(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,e._)`{multipleOf: ${i}}`},code(i){const{gen:o,data:s,schemaCode:u,it:c}=i,f=c.opts.multipleOfPrecision,d=o.let("res"),m=f?(0,e._)`Math.abs(Math.round(${d}) - ${d}) > 1e-${f}`:(0,e._)`${d} !== parseInt(${d})`;i.fail$data((0,e._)`(${u} === 0 || (${d} = ${s}/${u}, ${m}))`)}};return hh.default=n,hh}var ph={},mh={},dA;function aG(){if(dA)return mh;dA=1,Object.defineProperty(mh,"__esModule",{value:!0});function e(t){const n=t.length;let i=0,o=0,s;for(;o<n;)i++,s=t.charCodeAt(o++),s>=55296&&s<=56319&&o<n&&(s=t.charCodeAt(o),(s&64512)===56320&&o++);return i}return mh.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',mh}var hA;function oG(){if(hA)return ph;hA=1,Object.defineProperty(ph,"__esModule",{value:!0});const e=et(),t=_t(),n=aG(),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:u}){const c=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${c} than ${u} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:u,data:c,schemaCode:f,it:d}=s,m=u==="maxLength"?e.operators.GT:e.operators.LT,p=d.opts.unicode===!1?(0,e._)`${c}.length`:(0,e._)`${(0,t.useFunc)(s.gen,n.default)}(${c})`;s.fail$data((0,e._)`${p} ${m} ${f}`)}};return ph.default=o,ph}var gh={},pA;function sG(){if(pA)return gh;pA=1,Object.defineProperty(gh,"__esModule",{value:!0});const e=yi(),t=et(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,t.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,t._)`{pattern: ${o}}`},code(o){const{data:s,$data:u,schema:c,schemaCode:f,it:d}=o,m=d.opts.unicodeRegExp?"u":"",p=u?(0,t._)`(new RegExp(${f}, ${m}))`:(0,e.usePattern)(o,c);o.fail$data((0,t._)`!${p}.test(${s})`)}};return gh.default=i,gh}var vh={},mA;function lG(){if(mA)return vh;mA=1,Object.defineProperty(vh,"__esModule",{value:!0});const e=et(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:o}){const s=i==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${o} properties`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:o,data:s,schemaCode:u}=i,c=o==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${s}).length ${c} ${u}`)}};return vh.default=n,vh}var yh={},gA;function uG(){if(gA)return yh;gA=1,Object.defineProperty(yh,"__esModule",{value:!0});const e=yi(),t=et(),n=_t(),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:u,schema:c,schemaCode:f,data:d,$data:m,it:p}=s,{opts:y}=p;if(!m&&c.length===0)return;const S=c.length>=y.loopRequired;if(p.allErrors?g():b(),y.strictRequired){const x=s.parentSchema.properties,{definedProperties:E}=s.it;for(const R of c)if((x==null?void 0:x[R])===void 0&&!E.has(R)){const C=p.schemaEnv.baseId+p.errSchemaPath,$=`required property "${R}" is not defined at "${C}" (strictRequired)`;(0,n.checkStrictMode)(p,$,p.opts.strictRequired)}}function g(){if(S||m)s.block$data(t.nil,v);else for(const x of c)(0,e.checkReportMissingProp)(s,x)}function b(){const x=u.let("missing");if(S||m){const E=u.let("valid",!0);s.block$data(E,()=>_(x,E)),s.ok(E)}else u.if((0,e.checkMissingProp)(s,c,x)),(0,e.reportMissingProp)(s,x),u.else()}function v(){u.forOf("prop",f,x=>{s.setParams({missingProperty:x}),u.if((0,e.noPropertyInData)(u,d,x,y.ownProperties),()=>s.error())})}function _(x,E){s.setParams({missingProperty:x}),u.forOf(x,f,()=>{u.assign(E,(0,e.propertyInData)(u,d,x,y.ownProperties)),u.if((0,t.not)(E),()=>{s.error(),u.break()})},t.nil)}}};return yh.default=o,yh}var bh={},vA;function cG(){if(vA)return bh;vA=1,Object.defineProperty(bh,"__esModule",{value:!0});const e=et(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:o}){const s=i==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${o} items`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:o,data:s,schemaCode:u}=i,c=o==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${s}.length ${c} ${u}`)}};return bh.default=n,bh}var Sh={},_h={},yA;function VS(){if(yA)return _h;yA=1,Object.defineProperty(_h,"__esModule",{value:!0});const e=Sj();return e.code='require("ajv/dist/runtime/equal").default',_h.default=e,_h}var bA;function fG(){if(bA)return Sh;bA=1,Object.defineProperty(Sh,"__esModule",{value:!0});const e=Rp(),t=et(),n=_t(),i=VS(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:u,j:c}})=>(0,t.str)`must NOT have duplicate items (items ## ${c} and ${u} are identical)`,params:({params:{i:u,j:c}})=>(0,t._)`{i: ${u}, j: ${c}}`},code(u){const{gen:c,data:f,$data:d,schema:m,parentSchema:p,schemaCode:y,it:S}=u;if(!d&&!m)return;const g=c.let("valid"),b=p.items?(0,e.getSchemaTypes)(p.items):[];u.block$data(g,v,(0,t._)`${y} === false`),u.ok(g);function v(){const R=c.let("i",(0,t._)`${f}.length`),C=c.let("j");u.setParams({i:R,j:C}),c.assign(g,!0),c.if((0,t._)`${R} > 1`,()=>(_()?x:E)(R,C))}function _(){return b.length>0&&!b.some(R=>R==="object"||R==="array")}function x(R,C){const $=c.name("item"),A=(0,e.checkDataTypes)(b,$,S.opts.strictNumbers,e.DataType.Wrong),T=c.const("indices",(0,t._)`{}`);c.for((0,t._)`;${R}--;`,()=>{c.let($,(0,t._)`${f}[${R}]`),c.if(A,(0,t._)`continue`),b.length>1&&c.if((0,t._)`typeof ${$} == "string"`,(0,t._)`${$} += "_"`),c.if((0,t._)`typeof ${T}[${$}] == "number"`,()=>{c.assign(C,(0,t._)`${T}[${$}]`),u.error(),c.assign(g,!1).break()}).code((0,t._)`${T}[${$}] = ${R}`)})}function E(R,C){const $=(0,n.useFunc)(c,i.default),A=c.name("outer");c.label(A).for((0,t._)`;${R}--;`,()=>c.for((0,t._)`${C} = ${R}; ${C}--;`,()=>c.if((0,t._)`${$}(${f}[${R}], ${f}[${C}])`,()=>{u.error(),c.assign(g,!1).break(A)})))}}};return Sh.default=s,Sh}var wh={},SA;function dG(){if(SA)return wh;SA=1,Object.defineProperty(wh,"__esModule",{value:!0});const e=et(),t=_t(),n=VS(),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:u,data:c,$data:f,schemaCode:d,schema:m}=s;f||m&&typeof m=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(u,n.default)}(${c}, ${d})`):s.fail((0,e._)`${m} !== ${c}`)}};return wh.default=o,wh}var Eh={},_A;function hG(){if(_A)return Eh;_A=1,Object.defineProperty(Eh,"__esModule",{value:!0});const e=et(),t=_t(),n=VS(),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:u,data:c,$data:f,schema:d,schemaCode:m,it:p}=s;if(!f&&d.length===0)throw new Error("enum must have non-empty array");const y=d.length>=p.opts.loopEnum;let S;const g=()=>S??(S=(0,t.useFunc)(u,n.default));let b;if(y||f)b=u.let("valid"),s.block$data(b,v);else{if(!Array.isArray(d))throw new Error("ajv implementation error");const x=u.const("vSchema",m);b=(0,e.or)(...d.map((E,R)=>_(x,R)))}s.pass(b);function v(){u.assign(b,!1),u.forOf("v",m,x=>u.if((0,e._)`${g()}(${c}, ${x})`,()=>u.assign(b,!0).break()))}function _(x,E){const R=d[E];return typeof R=="object"&&R!==null?(0,e._)`${g()}(${c}, ${x}[${E}])`:(0,e._)`${c} === ${R}`}}};return Eh.default=o,Eh}var wA;function pG(){if(wA)return fh;wA=1,Object.defineProperty(fh,"__esModule",{value:!0});const e=rG(),t=iG(),n=oG(),i=sG(),o=lG(),s=uG(),u=cG(),c=fG(),f=dG(),d=hG(),m=[e.default,t.default,n.default,i.default,o.default,s.default,u.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,d.default];return fh.default=m,fh}var xh={},Ol={},EA;function _j(){if(EA)return Ol;EA=1,Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.validateAdditionalItems=void 0;const e=et(),t=_t(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:u,it:c}=s,{items:f}=u;if(!Array.isArray(f)){(0,t.checkStrictMode)(c,'"additionalItems" is ignored when "items" is not an array of schemas');return}o(s,f)}};function o(s,u){const{gen:c,schema:f,data:d,keyword:m,it:p}=s;p.items=!0;const y=c.const("len",(0,e._)`${d}.length`);if(f===!1)s.setParams({len:u.length}),s.pass((0,e._)`${y} <= ${u.length}`);else if(typeof f=="object"&&!(0,t.alwaysValidSchema)(p,f)){const g=c.var("valid",(0,e._)`${y} <= ${u.length}`);c.if((0,e.not)(g),()=>S(g)),s.ok(g)}function S(g){c.forRange("i",u.length,y,b=>{s.subschema({keyword:m,dataProp:b,dataPropType:t.Type.Num},g),p.allErrors||c.if((0,e.not)(g),()=>c.break())})}}return Ol.validateAdditionalItems=o,Ol.default=i,Ol}var Ch={},Al={},xA;function wj(){if(xA)return Al;xA=1,Object.defineProperty(Al,"__esModule",{value:!0}),Al.validateTuple=void 0;const e=et(),t=_t(),n=yi(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:u,it:c}=s;if(Array.isArray(u))return o(s,"additionalItems",u);c.items=!0,!(0,t.alwaysValidSchema)(c,u)&&s.ok((0,n.validateArray)(s))}};function o(s,u,c=s.schema){const{gen:f,parentSchema:d,data:m,keyword:p,it:y}=s;b(d),y.opts.unevaluated&&c.length&&y.items!==!0&&(y.items=t.mergeEvaluated.items(f,c.length,y.items));const S=f.name("valid"),g=f.const("len",(0,e._)`${m}.length`);c.forEach((v,_)=>{(0,t.alwaysValidSchema)(y,v)||(f.if((0,e._)`${g} > ${_}`,()=>s.subschema({keyword:p,schemaProp:_,dataProp:_},S)),s.ok(S))});function b(v){const{opts:_,errSchemaPath:x}=y,E=c.length,R=E===v.minItems&&(E===v.maxItems||v[u]===!1);if(_.strictTuples&&!R){const C=`"${p}" is ${E}-tuple, but minItems or maxItems/${u} are not specified or different at path "${x}"`;(0,t.checkStrictMode)(y,C,_.strictTuples)}}}return Al.validateTuple=o,Al.default=i,Al}var CA;function mG(){if(CA)return Ch;CA=1,Object.defineProperty(Ch,"__esModule",{value:!0});const e=wj(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return Ch.default=t,Ch}var Rh={},RA;function gG(){if(RA)return Rh;RA=1,Object.defineProperty(Rh,"__esModule",{value:!0});const e=et(),t=_t(),n=yi(),i=_j(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:u}})=>(0,e.str)`must NOT have more than ${u} items`,params:({params:{len:u}})=>(0,e._)`{limit: ${u}}`},code(u){const{schema:c,parentSchema:f,it:d}=u,{prefixItems:m}=f;d.items=!0,!(0,t.alwaysValidSchema)(d,c)&&(m?(0,i.validateAdditionalItems)(u,m):u.ok((0,n.validateArray)(u)))}};return Rh.default=s,Rh}var Oh={},OA;function vG(){if(OA)return Oh;OA=1,Object.defineProperty(Oh,"__esModule",{value:!0});const e=et(),t=_t(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:o,max:s}})=>s===void 0?(0,e.str)`must contain at least ${o} valid item(s)`:(0,e.str)`must contain at least ${o} and no more than ${s} valid item(s)`,params:({params:{min:o,max:s}})=>s===void 0?(0,e._)`{minContains: ${o}}`:(0,e._)`{minContains: ${o}, maxContains: ${s}}`},code(o){const{gen:s,schema:u,parentSchema:c,data:f,it:d}=o;let m,p;const{minContains:y,maxContains:S}=c;d.opts.next?(m=y===void 0?1:y,p=S):m=1;const g=s.const("len",(0,e._)`${f}.length`);if(o.setParams({min:m,max:p}),p===void 0&&m===0){(0,t.checkStrictMode)(d,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&m>p){(0,t.checkStrictMode)(d,'"minContains" > "maxContains" is always invalid'),o.fail();return}if((0,t.alwaysValidSchema)(d,u)){let E=(0,e._)`${g} >= ${m}`;p!==void 0&&(E=(0,e._)`${E} && ${g} <= ${p}`),o.pass(E);return}d.items=!0;const b=s.name("valid");p===void 0&&m===1?_(b,()=>s.if(b,()=>s.break())):m===0?(s.let(b,!0),p!==void 0&&s.if((0,e._)`${f}.length > 0`,v)):(s.let(b,!1),v()),o.result(b,()=>o.reset());function v(){const E=s.name("_valid"),R=s.let("count",0);_(E,()=>s.if(E,()=>x(R)))}function _(E,R){s.forRange("i",0,g,C=>{o.subschema({keyword:"contains",dataProp:C,dataPropType:t.Type.Num,compositeRule:!0},E),R()})}function x(E){s.code((0,e._)`${E}++`),p===void 0?s.if((0,e._)`${E} >= ${m}`,()=>s.assign(b,!0).break()):(s.if((0,e._)`${E} > ${p}`,()=>s.assign(b,!1).break()),m===1?s.assign(b,!0):s.if((0,e._)`${E} >= ${m}`,()=>s.assign(b,!0)))}}};return Oh.default=i,Oh}var y0={},AA;function yG(){return AA||(AA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=et(),n=_t(),i=yi();e.error={message:({params:{property:f,depsCount:d,deps:m}})=>{const p=d===1?"property":"properties";return(0,t.str)`must have ${p} ${m} when property ${f} is present`},params:({params:{property:f,depsCount:d,deps:m,missingProperty:p}})=>(0,t._)`{property: ${f},
|
|
157
|
-
missingProperty: ${p},
|
|
158
|
-
depsCount: ${d},
|
|
159
|
-
deps: ${m}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(f){const[d,m]=s(f);u(f,d),c(f,m)}};function s({schema:f}){const d={},m={};for(const p in f){if(p==="__proto__")continue;const y=Array.isArray(f[p])?d:m;y[p]=f[p]}return[d,m]}function u(f,d=f.schema){const{gen:m,data:p,it:y}=f;if(Object.keys(d).length===0)return;const S=m.let("missing");for(const g in d){const b=d[g];if(b.length===0)continue;const v=(0,i.propertyInData)(m,p,g,y.opts.ownProperties);f.setParams({property:g,depsCount:b.length,deps:b.join(", ")}),y.allErrors?m.if(v,()=>{for(const _ of b)(0,i.checkReportMissingProp)(f,_)}):(m.if((0,t._)`${v} && (${(0,i.checkMissingProp)(f,b,S)})`),(0,i.reportMissingProp)(f,S),m.else())}}e.validatePropertyDeps=u;function c(f,d=f.schema){const{gen:m,data:p,keyword:y,it:S}=f,g=m.name("valid");for(const b in d)(0,n.alwaysValidSchema)(S,d[b])||(m.if((0,i.propertyInData)(m,p,b,S.opts.ownProperties),()=>{const v=f.subschema({keyword:y,schemaProp:b},g);f.mergeValidEvaluated(v,g)},()=>m.var(g,!0)),f.ok(g))}e.validateSchemaDeps=c,e.default=o})(y0)),y0}var Ah={},$A;function bG(){if($A)return Ah;$A=1,Object.defineProperty(Ah,"__esModule",{value:!0});const e=et(),t=_t(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:o})=>(0,e._)`{propertyName: ${o.propertyName}}`},code(o){const{gen:s,schema:u,data:c,it:f}=o;if((0,t.alwaysValidSchema)(f,u))return;const d=s.name("valid");s.forIn("key",c,m=>{o.setParams({propertyName:m}),o.subschema({keyword:"propertyNames",data:m,dataTypes:["string"],propertyName:m,compositeRule:!0},d),s.if((0,e.not)(d),()=>{o.error(!0),f.allErrors||s.break()})}),o.ok(d)}};return Ah.default=i,Ah}var $h={},TA;function Ej(){if(TA)return $h;TA=1,Object.defineProperty($h,"__esModule",{value:!0});const e=yi(),t=et(),n=Io(),i=_t(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:u})=>(0,t._)`{additionalProperty: ${u.additionalProperty}}`},code(u){const{gen:c,schema:f,parentSchema:d,data:m,errsCount:p,it:y}=u;if(!p)throw new Error("ajv implementation error");const{allErrors:S,opts:g}=y;if(y.props=!0,g.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(y,f))return;const b=(0,e.allSchemaProperties)(d.properties),v=(0,e.allSchemaProperties)(d.patternProperties);_(),u.ok((0,t._)`${p} === ${n.default.errors}`);function _(){c.forIn("key",m,$=>{!b.length&&!v.length?R($):c.if(x($),()=>R($))})}function x($){let A;if(b.length>8){const T=(0,i.schemaRefOrVal)(y,d.properties,"properties");A=(0,e.isOwnProperty)(c,T,$)}else b.length?A=(0,t.or)(...b.map(T=>(0,t._)`${$} === ${T}`)):A=t.nil;return v.length&&(A=(0,t.or)(A,...v.map(T=>(0,t._)`${(0,e.usePattern)(u,T)}.test(${$})`))),(0,t.not)(A)}function E($){c.code((0,t._)`delete ${m}[${$}]`)}function R($){if(g.removeAdditional==="all"||g.removeAdditional&&f===!1){E($);return}if(f===!1){u.setParams({additionalProperty:$}),u.error(),S||c.break();return}if(typeof f=="object"&&!(0,i.alwaysValidSchema)(y,f)){const A=c.name("valid");g.removeAdditional==="failing"?(C($,A,!1),c.if((0,t.not)(A),()=>{u.reset(),E($)})):(C($,A),S||c.if((0,t.not)(A),()=>c.break()))}}function C($,A,T){const M={keyword:"additionalProperties",dataProp:$,dataPropType:i.Type.Str};T===!1&&Object.assign(M,{compositeRule:!0,createErrors:!1,allErrors:!1}),u.subschema(M,A)}}};return $h.default=s,$h}var Th={},MA;function SG(){if(MA)return Th;MA=1,Object.defineProperty(Th,"__esModule",{value:!0});const e=rm(),t=yi(),n=_t(),i=Ej(),o={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:u,schema:c,parentSchema:f,data:d,it:m}=s;m.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(m,i.default,"additionalProperties"));const p=(0,t.allSchemaProperties)(c);for(const v of p)m.definedProperties.add(v);m.opts.unevaluated&&p.length&&m.props!==!0&&(m.props=n.mergeEvaluated.props(u,(0,n.toHash)(p),m.props));const y=p.filter(v=>!(0,n.alwaysValidSchema)(m,c[v]));if(y.length===0)return;const S=u.name("valid");for(const v of y)g(v)?b(v):(u.if((0,t.propertyInData)(u,d,v,m.opts.ownProperties)),b(v),m.allErrors||u.else().var(S,!0),u.endIf()),s.it.definedProperties.add(v),s.ok(S);function g(v){return m.opts.useDefaults&&!m.compositeRule&&c[v].default!==void 0}function b(v){s.subschema({keyword:"properties",schemaProp:v,dataProp:v},S)}}};return Th.default=o,Th}var Mh={},DA;function _G(){if(DA)return Mh;DA=1,Object.defineProperty(Mh,"__esModule",{value:!0});const e=yi(),t=et(),n=_t(),i=_t(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:u,schema:c,data:f,parentSchema:d,it:m}=s,{opts:p}=m,y=(0,e.allSchemaProperties)(c),S=y.filter(R=>(0,n.alwaysValidSchema)(m,c[R]));if(y.length===0||S.length===y.length&&(!m.opts.unevaluated||m.props===!0))return;const g=p.strictSchema&&!p.allowMatchingProperties&&d.properties,b=u.name("valid");m.props!==!0&&!(m.props instanceof t.Name)&&(m.props=(0,i.evaluatedPropsToName)(u,m.props));const{props:v}=m;_();function _(){for(const R of y)g&&x(R),m.allErrors?E(R):(u.var(b,!0),E(R),u.if(b))}function x(R){for(const C in g)new RegExp(R).test(C)&&(0,n.checkStrictMode)(m,`property ${C} matches pattern ${R} (use allowMatchingProperties)`)}function E(R){u.forIn("key",f,C=>{u.if((0,t._)`${(0,e.usePattern)(s,R)}.test(${C})`,()=>{const $=S.includes(R);$||s.subschema({keyword:"patternProperties",schemaProp:R,dataProp:C,dataPropType:i.Type.Str},b),m.opts.unevaluated&&v!==!0?u.assign((0,t._)`${v}[${C}]`,!0):!$&&!m.allErrors&&u.if((0,t.not)(b),()=>u.break())})})}}};return Mh.default=o,Mh}var Dh={},jA;function wG(){if(jA)return Dh;jA=1,Object.defineProperty(Dh,"__esModule",{value:!0});const e=_t(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:i,schema:o,it:s}=n;if((0,e.alwaysValidSchema)(s,o)){n.fail();return}const u=i.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},u),n.failResult(u,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return Dh.default=t,Dh}var jh={},NA;function EG(){if(NA)return jh;NA=1,Object.defineProperty(jh,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:yi().validateUnion,error:{message:"must match a schema in anyOf"}};return jh.default=t,jh}var Nh={},PA;function xG(){if(PA)return Nh;PA=1,Object.defineProperty(Nh,"__esModule",{value:!0});const e=et(),t=_t(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:o})=>(0,e._)`{passingSchemas: ${o.passing}}`},code(o){const{gen:s,schema:u,parentSchema:c,it:f}=o;if(!Array.isArray(u))throw new Error("ajv implementation error");if(f.opts.discriminator&&c.discriminator)return;const d=u,m=s.let("valid",!1),p=s.let("passing",null),y=s.name("_valid");o.setParams({passing:p}),s.block(S),o.result(m,()=>o.reset(),()=>o.error(!0));function S(){d.forEach((g,b)=>{let v;(0,t.alwaysValidSchema)(f,g)?s.var(y,!0):v=o.subschema({keyword:"oneOf",schemaProp:b,compositeRule:!0},y),b>0&&s.if((0,e._)`${y} && ${m}`).assign(m,!1).assign(p,(0,e._)`[${p}, ${b}]`).else(),s.if(y,()=>{s.assign(m,!0),s.assign(p,b),v&&o.mergeEvaluated(v,e.Name)})})}}};return Nh.default=i,Nh}var Ph={},IA;function CG(){if(IA)return Ph;IA=1,Object.defineProperty(Ph,"__esModule",{value:!0});const e=_t(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:i,schema:o,it:s}=n;if(!Array.isArray(o))throw new Error("ajv implementation error");const u=i.name("valid");o.forEach((c,f)=>{if((0,e.alwaysValidSchema)(s,c))return;const d=n.subschema({keyword:"allOf",schemaProp:f},u);n.ok(u),n.mergeEvaluated(d)})}};return Ph.default=t,Ph}var Ih={},zA;function RG(){if(zA)return Ih;zA=1,Object.defineProperty(Ih,"__esModule",{value:!0});const e=et(),t=_t(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:u,parentSchema:c,it:f}=s;c.then===void 0&&c.else===void 0&&(0,t.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const d=o(f,"then"),m=o(f,"else");if(!d&&!m)return;const p=u.let("valid",!0),y=u.name("_valid");if(S(),s.reset(),d&&m){const b=u.let("ifClause");s.setParams({ifClause:b}),u.if(y,g("then",b),g("else",b))}else d?u.if(y,g("then")):u.if((0,e.not)(y),g("else"));s.pass(p,()=>s.error(!0));function S(){const b=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},y);s.mergeEvaluated(b)}function g(b,v){return()=>{const _=s.subschema({keyword:b},y);u.assign(p,y),s.mergeValidEvaluated(_,p),v?u.assign(v,(0,e._)`${b}`):s.setParams({ifClause:b})}}}};function o(s,u){const c=s.schema[u];return c!==void 0&&!(0,t.alwaysValidSchema)(s,c)}return Ih.default=i,Ih}var zh={},FA;function OG(){if(FA)return zh;FA=1,Object.defineProperty(zh,"__esModule",{value:!0});const e=_t(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:i,it:o}){i.if===void 0&&(0,e.checkStrictMode)(o,`"${n}" without "if" is ignored`)}};return zh.default=t,zh}var kA;function AG(){if(kA)return xh;kA=1,Object.defineProperty(xh,"__esModule",{value:!0});const e=_j(),t=mG(),n=wj(),i=gG(),o=vG(),s=yG(),u=bG(),c=Ej(),f=SG(),d=_G(),m=wG(),p=EG(),y=xG(),S=CG(),g=RG(),b=OG();function v(_=!1){const x=[m.default,p.default,y.default,S.default,g.default,b.default,u.default,c.default,s.default,f.default,d.default];return _?x.push(t.default,i.default):x.push(e.default,n.default),x.push(o.default),x}return xh.default=v,xh}var Fh={},kh={},LA;function $G(){if(LA)return kh;LA=1,Object.defineProperty(kh,"__esModule",{value:!0});const e=et(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,e._)`{format: ${i}}`},code(i,o){const{gen:s,data:u,$data:c,schema:f,schemaCode:d,it:m}=i,{opts:p,errSchemaPath:y,schemaEnv:S,self:g}=m;if(!p.validateFormats)return;c?b():v();function b(){const _=s.scopeValue("formats",{ref:g.formats,code:p.code.formats}),x=s.const("fDef",(0,e._)`${_}[${d}]`),E=s.let("fType"),R=s.let("format");s.if((0,e._)`typeof ${x} == "object" && !(${x} instanceof RegExp)`,()=>s.assign(E,(0,e._)`${x}.type || "string"`).assign(R,(0,e._)`${x}.validate`),()=>s.assign(E,(0,e._)`"string"`).assign(R,x)),i.fail$data((0,e.or)(C(),$()));function C(){return p.strictSchema===!1?e.nil:(0,e._)`${d} && !${R}`}function $(){const A=S.$async?(0,e._)`(${x}.async ? await ${R}(${u}) : ${R}(${u}))`:(0,e._)`${R}(${u})`,T=(0,e._)`(typeof ${R} == "function" ? ${A} : ${R}.test(${u}))`;return(0,e._)`${R} && ${R} !== true && ${E} === ${o} && !${T}`}}function v(){const _=g.formats[f];if(!_){C();return}if(_===!0)return;const[x,E,R]=$(_);x===o&&i.pass(A());function C(){if(p.strictSchema===!1){g.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${f}" ignored in schema at path "${y}"`}}function $(T){const M=T instanceof RegExp?(0,e.regexpCode)(T):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(f)}`:void 0,D=s.scopeValue("formats",{key:f,ref:T,code:M});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,e._)`${D}.validate`]:["string",T,D]}function A(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!S.$async)throw new Error("async format in sync schema");return(0,e._)`await ${R}(${u})`}return typeof E=="function"?(0,e._)`${R}(${u})`:(0,e._)`${R}.test(${u})`}}}};return kh.default=n,kh}var qA;function TG(){if(qA)return Fh;qA=1,Object.defineProperty(Fh,"__esModule",{value:!0});const t=[$G().default];return Fh.default=t,Fh}var ls={},UA;function MG(){return UA||(UA=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.contentVocabulary=ls.metadataVocabulary=void 0,ls.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ls.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),ls}var BA;function DG(){if(BA)return lh;BA=1,Object.defineProperty(lh,"__esModule",{value:!0});const e=nG(),t=pG(),n=AG(),i=TG(),o=MG(),s=[e.default,t.default,(0,n.default)(),i.default,o.metadataVocabulary,o.contentVocabulary];return lh.default=s,lh}var Lh={},wc={},VA;function jG(){if(VA)return wc;VA=1,Object.defineProperty(wc,"__esModule",{value:!0}),wc.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(wc.DiscrError=e={})),wc}var HA;function NG(){if(HA)return Lh;HA=1,Object.defineProperty(Lh,"__esModule",{value:!0});const e=et(),t=jG(),n=BS(),i=im(),o=_t(),u={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:c,tagName:f}})=>c===t.DiscrError.Tag?`tag "${f}" must be string`:`value of tag "${f}" must be in oneOf`,params:({params:{discrError:c,tag:f,tagName:d}})=>(0,e._)`{error: ${c}, tag: ${d}, tagValue: ${f}}`},code(c){const{gen:f,data:d,schema:m,parentSchema:p,it:y}=c,{oneOf:S}=p;if(!y.opts.discriminator)throw new Error("discriminator: requires discriminator option");const g=m.propertyName;if(typeof g!="string")throw new Error("discriminator: requires propertyName");if(m.mapping)throw new Error("discriminator: mapping is not supported");if(!S)throw new Error("discriminator: requires oneOf keyword");const b=f.let("valid",!1),v=f.const("tag",(0,e._)`${d}${(0,e.getProperty)(g)}`);f.if((0,e._)`typeof ${v} == "string"`,()=>_(),()=>c.error(!1,{discrError:t.DiscrError.Tag,tag:v,tagName:g})),c.ok(b);function _(){const R=E();f.if(!1);for(const C in R)f.elseIf((0,e._)`${v} === ${C}`),f.assign(b,x(R[C]));f.else(),c.error(!1,{discrError:t.DiscrError.Mapping,tag:v,tagName:g}),f.endIf()}function x(R){const C=f.name("valid"),$=c.subschema({keyword:"oneOf",schemaProp:R},C);return c.mergeEvaluated($,e.Name),C}function E(){var R;const C={},$=T(p);let A=!0;for(let j=0;j<S.length;j++){let I=S[j];if(I!=null&&I.$ref&&!(0,o.schemaHasRulesButRef)(I,y.self.RULES)){const K=I.$ref;if(I=n.resolveRef.call(y.self,y.schemaEnv.root,y.baseId,K),I instanceof n.SchemaEnv&&(I=I.schema),I===void 0)throw new i.default(y.opts.uriResolver,y.baseId,K)}const L=(R=I==null?void 0:I.properties)===null||R===void 0?void 0:R[g];if(typeof L!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${g}"`);A=A&&($||T(I)),M(L,j)}if(!A)throw new Error(`discriminator: "${g}" must be required`);return C;function T({required:j}){return Array.isArray(j)&&j.includes(g)}function M(j,I){if(j.const)D(j.const,I);else if(j.enum)for(const L of j.enum)D(L,I);else throw new Error(`discriminator: "properties/${g}" must have "const" or "enum"`)}function D(j,I){if(typeof j!="string"||j in C)throw new Error(`discriminator: "${g}" values must be unique strings`);C[j]=I}}}};return Lh.default=u,Lh}const PG="http://json-schema.org/draft-07/schema#",IG="http://json-schema.org/draft-07/schema#",zG="Core schema meta-schema",FG={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},kG=["object","boolean"],LG={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},qG={$schema:PG,$id:IG,title:zG,definitions:FG,type:kG,properties:LG,default:!0};var KA;function xj(){return KA||(KA=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=Z7(),i=DG(),o=NG(),s=qG,u=["/properties"],c="http://json-schema.org/draft-07/schema";class f extends n.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(g=>this.addVocabulary(g)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const g=this.opts.$data?this.$dataMetaSchema(s,u):s;this.addMetaSchema(g,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=f,e.exports=t=f,e.exports.Ajv=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var d=rm();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var m=et();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return m._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return m.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return m.CodeGen}});var p=US();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var y=im();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return y.default}})})(rh,rh.exports)),rh.exports}var UG=xj();const BG=Ra(UG);var qh={exports:{}},b0={},GA;function VG(){return GA||(GA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(M,D){return{validate:M,compare:D}}e.fullFormats={date:t(s,u),time:t(f,d),"date-time":t(p,y),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:b,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:T,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:_,int32:{type:"number",validate:R},int64:{type:"number",validate:C},float:{type:"number",validate:$},double:{type:"number",validate:$},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,u),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,y),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(M){return M%4===0&&(M%100!==0||M%400===0)}const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(M){const D=i.exec(M);if(!D)return!1;const j=+D[1],I=+D[2],L=+D[3];return I>=1&&I<=12&&L>=1&&L<=(I===2&&n(j)?29:o[I])}function u(M,D){if(M&&D)return M>D?1:M<D?-1:0}const c=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function f(M,D){const j=c.exec(M);if(!j)return!1;const I=+j[1],L=+j[2],K=+j[3],G=j[5];return(I<=23&&L<=59&&K<=59||I===23&&L===59&&K===60)&&(!D||G!=="")}function d(M,D){if(!(M&&D))return;const j=c.exec(M),I=c.exec(D);if(j&&I)return M=j[1]+j[2]+j[3]+(j[4]||""),D=I[1]+I[2]+I[3]+(I[4]||""),M>D?1:M<D?-1:0}const m=/t|\s/i;function p(M){const D=M.split(m);return D.length===2&&s(D[0])&&f(D[1],!0)}function y(M,D){if(!(M&&D))return;const[j,I]=M.split(m),[L,K]=D.split(m),G=u(j,L);if(G!==void 0)return G||d(I,K)}const S=/\/|:/,g=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function b(M){return S.test(M)&&g.test(M)}const v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function _(M){return v.lastIndex=0,v.test(M)}const x=-2147483648,E=2**31-1;function R(M){return Number.isInteger(M)&&M<=E&&M>=x}function C(M){return Number.isInteger(M)}function $(){return!0}const A=/[^\\]\\Z/;function T(M){if(A.test(M))return!1;try{return new RegExp(M),!0}catch{return!1}}})(b0)),b0}var S0={},QA;function HG(){return QA||(QA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=xj(),n=et(),i=n.operators,o={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},s={message:({keyword:c,schemaCode:f})=>n.str`should be ${o[c].okStr} ${f}`,params:({keyword:c,schemaCode:f})=>n._`{comparison: ${o[c].okStr}, limit: ${f}}`};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:s,code(c){const{gen:f,data:d,schemaCode:m,keyword:p,it:y}=c,{opts:S,self:g}=y;if(!S.validateFormats)return;const b=new t.KeywordCxt(y,g.RULES.all.format.definition,"format");b.$data?v():_();function v(){const E=f.scopeValue("formats",{ref:g.formats,code:S.code.formats}),R=f.const("fmt",n._`${E}[${b.schemaCode}]`);c.fail$data(n.or(n._`typeof ${R} != "object"`,n._`${R} instanceof RegExp`,n._`typeof ${R}.compare != "function"`,x(R)))}function _(){const E=b.schema,R=g.formats[E];if(!R||R===!0)return;if(typeof R!="object"||R instanceof RegExp||typeof R.compare!="function")throw new Error(`"${p}": format "${E}" does not define "compare" function`);const C=f.scopeValue("formats",{key:E,ref:R,code:S.code.formats?n._`${S.code.formats}${n.getProperty(E)}`:void 0});c.fail$data(x(C))}function x(E){return n._`${E}.compare(${d}, ${m}) ${o[p].fail} 0`}},dependencies:["format"]};const u=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=u})(S0)),S0}var YA;function KG(){return YA||(YA=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=VG(),i=HG(),o=et(),s=new o.Name("fullFormats"),u=new o.Name("fastFormats"),c=(d,m={keywords:!0})=>{if(Array.isArray(m))return f(d,m,n.fullFormats,s),d;const[p,y]=m.mode==="fast"?[n.fastFormats,u]:[n.fullFormats,s],S=m.formats||n.formatNames;return f(d,S,p,y),m.keywords&&i.default(d),d};c.get=(d,m="full")=>{const y=(m==="fast"?n.fastFormats:n.fullFormats)[d];if(!y)throw new Error(`Unknown format "${d}"`);return y};function f(d,m,p,y){var S,g;(S=(g=d.opts.code).formats)!==null&&S!==void 0||(g.formats=o._`require("ajv-formats/dist/formats").${y}`);for(const b of m)d.addFormat(b,p[b])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(qh,qh.exports)),qh.exports}var GG=KG();const WA=Ra(GG),QG={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},YG=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,WG=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function XG(e,t,n={},i,o=BG,s){let u=new o({...QG,...n});return i?WA(u,i):i!==!1&&WA(u),u.addFormat("data-url",WG),u.addFormat("color",YG),u.addKeyword(xo),u.addKeyword(gS),Array.isArray(e)&&u.addMetaSchema(e),pt(t)&&Object.keys(t).forEach(c=>{u.addFormat(c,t[c])}),s&&(u=s(u)),u}function JG(e=[],t){return e.map(i=>{var o;const{instancePath:s,keyword:u,params:c,schemaPath:f,parentSchema:d,...m}=i;let{message:p=""}=m,y=s.replace(/\//g,"."),S=`${y} ${p}`.trim(),g="";const b=[...((o=c.deps)===null||o===void 0?void 0:o.split(", "))||[],c.missingProperty,c.property].filter(v=>v);if(b.length>0)b.forEach(v=>{const _=y?`${y}.${v}`:v;let x=Ue(xe(t,`${_.replace(/^\./,"")}`)).title;if(x===void 0){const E=f.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([v]);x=Ue(xe(t,E)).title}if(x)p=p.replace(`'${v}'`,`'${x}'`),g=x;else{const E=xe(d,[bt,v,"title"]);E&&(p=p.replace(`'${v}'`,`'${E}'`),g=E)}}),S=p;else{const v=Ue(xe(t,`${y.replace(/^\./,"")}`)).title;if(v)S=`'${v}' ${p}`.trim(),g=v;else{const _=d==null?void 0:d.title;_&&(S=`'${_}' ${p}`.trim(),g=_)}}return"missingProperty"in c&&(y=y?`${y}.${c.missingProperty}`:c.missingProperty),{name:u,property:y,message:p,params:c,stack:S,schemaPath:f,title:g}}).reduce((i,o)=>{const{message:s,schemaPath:u}=o,c=u==null?void 0:u.indexOf(`/${ht}/`),f=u==null?void 0:u.indexOf(`/${Xe}/`);let d;return c&&c>=0?d=u==null?void 0:u.substring(0,c):f&&f>=0&&(d=u==null?void 0:u.substring(0,f)),(d?i.find(p=>{var y;return p.message===s&&((y=p.schemaPath)===null||y===void 0?void 0:y.startsWith(d))}):void 0)||i.push(o),i},[])}function ZG(e,t,n,i,o,s,u){const{validationError:c}=t;let f=JG(t.errors,u);c&&(f=[...f,{stack:c.message}]),typeof s=="function"&&(f=s(f,u));let d=C8(f);if(c&&(d={...d,$schema:{__errors:[c.message]}}),typeof o!="function")return{errors:f,errorSchema:d};const m=ID(e,i,n,i,!0),p=o(m,rb(m),u,d),y=JD(p);return op({errors:f,errorSchema:d},y)}class eQ{constructor(t,n){const{additionalMetaSchemas:i,customFormats:o,ajvOptionsOverrides:s,ajvFormatOptions:u,AjvClass:c,extenderFn:f}=t;this.ajv=XG(i,o,s,u,c,f),this.localizer=n}reset(){this.ajv.removeSchema()}rawValidation(t,n){var i,o;let s,u;try{t[Ft]&&(u=this.ajv.getSchema(t[Ft])),u===void 0&&(u=this.ajv.compile(t)),u(n)}catch(f){s=f}let c;return u&&(typeof this.localizer=="function"&&(((i=u.errors)!==null&&i!==void 0?i:[]).forEach(f=>{var d;["missingProperty","property"].forEach(m=>{var p;!((p=f.params)===null||p===void 0)&&p[m]&&(f.params[m]=`'${f.params[m]}'`)}),!((d=f.params)===null||d===void 0)&&d.deps&&(f.params.deps=f.params.deps.split(", ").map(m=>`'${m}'`).join(", "))}),this.localizer(u.errors),((o=u.errors)!==null&&o!==void 0?o:[]).forEach(f=>{var d;["missingProperty","property"].forEach(m=>{var p;!((p=f.params)===null||p===void 0)&&p[m]&&(f.params[m]=f.params[m].slice(1,-1))}),!((d=f.params)===null||d===void 0)&&d.deps&&(f.params.deps=f.params.deps.split(", ").map(m=>m.slice(1,-1)).join(", "))})),c=u.errors||void 0,u.errors=null),{errors:c,validationError:s}}validateFormData(t,n,i,o,s){const u=this.rawValidation(n,t);return ZG(this,u,t,n,i,o,s)}handleSchemaUpdate(t){var n,i;const o=(n=t[Ft])!==null&&n!==void 0?n:JM;this.ajv.getSchema(o)===void 0?this.ajv.addSchema(t,o):Ut(t,(i=this.ajv.getSchema(o))===null||i===void 0?void 0:i.schema)||(this.ajv.removeSchema(o),this.ajv.addSchema(t,o))}isValid(t,n,i){var o;try{this.handleSchemaUpdate(i);const s=zS(t),u=(o=s[Ft])!==null&&o!==void 0?o:b8(s);let c;return c=this.ajv.getSchema(u),c===void 0&&(c=this.ajv.addSchema(s,u).getSchema(u)||this.ajv.compile(s)),c(n)}catch(s){return console.warn("Error encountered compiling schema:",s),!1}}}function tQ(e={},t){return new eQ(e,t)}const nQ=tQ();function rQ(e){return{type:"object",required:["name","type"],properties:{name:{type:"string",title:"Field Name",description:"Python-valid identifier (e.g., 'user_name')",pattern:"^[a-z_][a-z0-9_]*$"},type:{type:"string",title:"Type",enum:e.map(t=>t.name)},required:{type:"boolean",title:"Required",default:!0},label:{type:"string",title:"Label",description:"Display label (defaults to field name if empty)"},default:{type:"string",title:"Default Value",description:`Python expression (e.g., '"hello"', 'None', '42')`},description:{type:"string",title:"Description",description:"Docstring for the field"},hidden:{type:"boolean",title:"Hidden",description:"Hide this field from forms",default:!1},read_only:{type:"boolean",title:"Read Only",description:"Make this field non-editable",default:!1},validators:{type:"object",title:"Validators",properties:{min_length:{type:"integer",title:"Min Length",minimum:0},max_length:{type:"integer",title:"Max Length",minimum:1},pattern:{type:"string",title:"Regex Pattern"},min_value:{type:"number",title:"Minimum Value"},max_value:{type:"number",title:"Maximum Value"}}}}}}function iQ(e){return{name:{"ui:autofocus":!0,"ui:placeholder":"field_name"},type:{"ui:widget":"select","ui:enumNames":e.map(t=>t.label)},description:{"ui:widget":"textarea","ui:options":{rows:2}},validators:{"ui:collapsed":!0}}}const Cj="w-full px-3 py-2 rounded-lg border transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 disabled:opacity-50 bg-white dark:bg-zinc-800 border-gray-200 dark:border-zinc-700 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-zinc-500",aQ="w-full px-3 py-2 rounded-lg border transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 disabled:opacity-50 bg-white dark:bg-zinc-800 border-gray-200 dark:border-zinc-700 text-gray-900 dark:text-white";function oQ(e){const{id:t,value:n,required:i,disabled:o,onChange:s,placeholder:u}=e;return N.jsx("input",{id:t,type:"text",value:n||"",required:i,disabled:o,placeholder:u,onChange:c=>s(c.target.value),className:Cj})}function sQ(e){const{id:t,value:n,required:i,disabled:o,onChange:s,options:u}=e;return N.jsx("textarea",{id:t,value:n||"",required:i,disabled:o,rows:(u==null?void 0:u.rows)||3,onChange:c=>s(c.target.value),className:`${Cj} resize-none`})}function lQ(e){const{id:t,value:n,required:i,disabled:o,onChange:s,options:u}=e,{enumOptions:c}=u;return N.jsxs("select",{id:t,value:n||"",required:i,disabled:o,onChange:f=>s(f.target.value),className:aQ,children:[N.jsx("option",{value:"",disabled:!0,children:"Select..."}),(c||[]).map(f=>N.jsx("option",{value:f.value,children:f.label},f.value))]})}function uQ(e){const{id:t,value:n,disabled:i,onChange:o,label:s}=e;return N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsx("input",{id:t,type:"checkbox",checked:n||!1,disabled:i,onChange:u=>o(u.target.checked),className:"w-4 h-4 rounded border-gray-300 dark:border-zinc-600 bg-white dark:bg-zinc-800 text-blue-500 focus:ring-blue-500"}),N.jsx("label",{htmlFor:t,className:"text-sm text-gray-700 dark:text-zinc-300",children:s})]})}const cQ={TextWidget:oQ,TextareaWidget:sQ,SelectWidget:lQ,CheckboxWidget:uQ};function fQ(e){var f,d;const{id:t,label:n,children:i,errors:o,description:s,required:u}=e,c=o&&((d=(f=o.props)==null?void 0:f.errors)==null?void 0:d.length)>0;return N.jsxs("div",{className:"mb-4",children:[n&&N.jsxs("label",{htmlFor:t,className:`block text-sm font-medium mb-1 ${c?"text-red-500":"text-gray-600 dark:text-zinc-400"}`,children:[n,u&&N.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),i,s&&N.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-zinc-500",children:s}),c&&N.jsx("div",{className:"mt-1 text-xs text-red-500",children:o})]})}function dQ(e){const{title:t,properties:n,uiSchema:i}=e,[o,s]=z.useState((i==null?void 0:i["ui:collapsed"])||!1);return(i==null?void 0:i["ui:collapsed"])!==void 0?N.jsxs("div",{className:"border border-gray-200 dark:border-zinc-700 rounded-lg overflow-hidden mt-4",children:[N.jsxs("button",{type:"button",onClick:()=>s(!o),className:"w-full px-4 py-2 bg-gray-50 dark:bg-zinc-800 text-left text-sm font-medium text-gray-700 dark:text-zinc-300 hover:bg-gray-100 dark:hover:bg-zinc-700 flex items-center justify-between",children:[N.jsx("span",{children:t||"Advanced"}),N.jsx("svg",{className:`w-4 h-4 transition-transform ${o?"":"rotate-180"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),!o&&N.jsx("div",{className:"p-4 space-y-2 bg-gray-50/50 dark:bg-zinc-900/50",children:n.map(c=>c.content)})]}):N.jsxs("div",{className:"space-y-2",children:[t&&N.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:t}),n.map(c=>c.content)]})}function hQ({field:e,fieldTypes:t,onChange:n}){const i=z.useMemo(()=>rQ(t),[t]),o=z.useMemo(()=>iQ(t),[t]);if(!e)return N.jsx("div",{className:"flex items-center justify-center h-full text-gray-500 dark:text-zinc-500",children:N.jsxs("div",{className:"text-center",children:[N.jsx("svg",{className:"w-12 h-12 mx-auto mb-3 text-gray-400 dark:text-zinc-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),N.jsx("p",{children:"Select a field to edit its properties"})]})});const s=()=>{let u=e.type;!e.required&&!u.includes("None")&&(u=`${u} | None`);let c=`${e.name}: ${u}`;return e.default&&(c+=` = ${e.default}`),c};return N.jsxs("div",{className:"p-4",children:[N.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:"Field Properties"}),N.jsx(k7,{schema:i,uiSchema:o,formData:e,validator:nQ,widgets:cQ,templates:{FieldTemplate:fQ,ObjectFieldTemplate:dQ},onChange:u=>n(u.formData),onSubmit:()=>{},liveValidate:!0,children:N.jsx(N.Fragment,{})}),N.jsxs("div",{className:"mt-6 p-4 bg-gray-100 dark:bg-zinc-900 rounded-lg border border-gray-200 dark:border-zinc-700",children:[N.jsxs("div",{className:"text-xs text-gray-500 dark:text-zinc-500 mb-2 flex items-center gap-2",children:[N.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"})}),"Generated Python Type"]}),N.jsx("code",{className:"text-green-600 dark:text-green-400 font-mono text-sm block",children:s()}),e.description&&N.jsxs("code",{className:"text-gray-500 dark:text-zinc-500 font-mono text-xs block mt-1",children:['"""docstring: ',e.description,'"""']})]})]})}function XA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function pQ(e){if(Array.isArray(e))return e}function mQ(e,t,n){return(t=wQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gQ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,o,s,u,c=[],f=!0,d=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(f=(i=s.call(n)).done)&&(c.push(i.value),c.length!==t);f=!0);}catch(m){d=!0,o=m}finally{try{if(!f&&n.return!=null&&(u=n.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}function vQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
160
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function ZA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JA(Object(n),!0).forEach(function(i){mQ(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JA(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function yQ(e,t){if(e==null)return{};var n,i,o=bQ(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function bQ(e,t){if(e==null)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;n[i]=e[i]}return n}function SQ(e,t){return pQ(e)||gQ(e,t)||EQ(e,t)||vQ()}function _Q(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wQ(e){var t=_Q(e,"string");return typeof t=="symbol"?t:t+""}function EQ(e,t){if(e){if(typeof e=="string")return XA(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?XA(e,t):void 0}}function xQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function t$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e$(Object(n),!0).forEach(function(i){xQ(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e$(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function CQ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(i){return t.reduceRight(function(o,s){return s(o)},i)}}function $c(e){return function t(){for(var n=this,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return o.length>=e.length?e.apply(this,o):function(){for(var u=arguments.length,c=new Array(u),f=0;f<u;f++)c[f]=arguments[f];return t.apply(n,[].concat(o,c))}}}function Op(e){return{}.toString.call(e).includes("Object")}function RQ(e){return!Object.keys(e).length}function tf(e){return typeof e=="function"}function OQ(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function AQ(e,t){return Op(t)||Ao("changeType"),Object.keys(t).some(function(n){return!OQ(e,n)})&&Ao("changeField"),t}function $Q(e){tf(e)||Ao("selectorType")}function TQ(e){tf(e)||Op(e)||Ao("handlerType"),Op(e)&&Object.values(e).some(function(t){return!tf(t)})&&Ao("handlersType")}function MQ(e){e||Ao("initialIsRequired"),Op(e)||Ao("initialType"),RQ(e)&&Ao("initialContent")}function DQ(e,t){throw new Error(e[t]||e.default)}var jQ={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Ao=$c(DQ)(jQ),Uh={changes:AQ,selector:$Q,handler:TQ,initial:MQ};function NQ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Uh.initial(e),Uh.handler(t);var n={current:e},i=$c(zQ)(n,t),o=$c(IQ)(n),s=$c(Uh.changes)(e),u=$c(PQ)(n);function c(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(m){return m};return Uh.selector(d),d(n.current)}function f(d){CQ(i,o,s,u)(d)}return[c,f]}function PQ(e,t){return tf(t)?t(e.current):t}function IQ(e,t){return e.current=t$(t$({},e.current),t),t}function zQ(e,t,n){return tf(t)?t(e.current):Object.keys(n).forEach(function(i){var o;return(o=t[i])===null||o===void 0?void 0:o.call(t,e.current[i])}),n}var FQ={create:NQ},kQ={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function LQ(e){return function t(){for(var n=this,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return o.length>=e.length?e.apply(this,o):function(){for(var u=arguments.length,c=new Array(u),f=0;f<u;f++)c[f]=arguments[f];return t.apply(n,[].concat(o,c))}}}function qQ(e){return{}.toString.call(e).includes("Object")}function UQ(e){return e||n$("configIsRequired"),qQ(e)||n$("configType"),e.urls?(BQ(),{paths:{vs:e.urls.monacoBase}}):e}function BQ(){console.warn(Rj.deprecation)}function VQ(e,t){throw new Error(e[t]||e.default)}var Rj={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
161
|
-
You are using deprecated way of configuration.
|
|
162
|
-
|
|
163
|
-
Instead of using
|
|
164
|
-
monaco.config({ urls: { monacoBase: '...' } })
|
|
165
|
-
use
|
|
166
|
-
monaco.config({ paths: { vs: '...' } })
|
|
167
|
-
|
|
168
|
-
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
169
|
-
`},n$=LQ(VQ)(Rj),HQ={config:UQ},KQ=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return function(o){return n.reduceRight(function(s,u){return u(s)},o)}};function Oj(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],Oj(e[n],t[n]))}),ZA(ZA({},e),t)}var GQ={type:"cancelation",msg:"operation is manually canceled"};function _0(e){var t=!1,n=new Promise(function(i,o){e.then(function(s){return t?o(GQ):i(s)}),e.catch(o)});return n.cancel=function(){return t=!0},n}var QQ=["monaco"],YQ=FQ.create({config:kQ,isInitialized:!1,resolve:null,reject:null,monaco:null}),Aj=SQ(YQ,2),Tf=Aj[0],am=Aj[1];function WQ(e){var t=HQ.config(e),n=t.monaco,i=yQ(t,QQ);am(function(o){return{config:Oj(o.config,i),monaco:n}})}function XQ(){var e=Tf(function(t){var n=t.monaco,i=t.isInitialized,o=t.resolve;return{monaco:n,isInitialized:i,resolve:o}});if(!e.isInitialized){if(am({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),_0(w0);if(window.monaco&&window.monaco.editor)return $j(window.monaco),e.resolve(window.monaco),_0(w0);KQ(JQ,eY)(tY)}return _0(w0)}function JQ(e){return document.body.appendChild(e)}function ZQ(e){var t=document.createElement("script");return e&&(t.src=e),t}function eY(e){var t=Tf(function(i){var o=i.config,s=i.reject;return{config:o,reject:s}}),n=ZQ("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function tY(){var e=Tf(function(n){var i=n.config,o=n.resolve,s=n.reject;return{config:i,resolve:o,reject:s}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var i=n.m||n;$j(i),e.resolve(i)},function(n){e.reject(n)})}function $j(e){Tf().monaco||am({monaco:e})}function nY(){return Tf(function(e){var t=e.monaco;return t})}var w0=new Promise(function(e,t){return am({resolve:e,reject:t})}),Tj={config:WQ,init:XQ,__getMonacoInstance:nY},rY={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},E0=rY,iY={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},aY=iY;function oY({children:e}){return he.createElement("div",{style:aY.container},e)}var sY=oY,lY=sY;function uY({width:e,height:t,isEditorReady:n,loading:i,_ref:o,className:s,wrapperProps:u}){return he.createElement("section",{style:{...E0.wrapper,width:e,height:t},...u},!n&&he.createElement(lY,null,i),he.createElement("div",{ref:o,style:{...E0.fullWidth,...!n&&E0.hide},className:s}))}var cY=uY,Mj=z.memo(cY);function fY(e){z.useEffect(e,[])}var Dj=fY;function dY(e,t,n=!0){let i=z.useRef(!0);z.useEffect(i.current||!n?()=>{i.current=!1}:e,t)}var Or=dY;function Fc(){}function Ml(e,t,n,i){return hY(e,i)||pY(e,t,n,i)}function hY(e,t){return e.editor.getModel(jj(e,t))}function pY(e,t,n,i){return e.editor.createModel(t,n,i?jj(e,i):void 0)}function jj(e,t){return e.Uri.parse(t)}function mY({original:e,modified:t,language:n,originalLanguage:i,modifiedLanguage:o,originalModelPath:s,modifiedModelPath:u,keepCurrentOriginalModel:c=!1,keepCurrentModifiedModel:f=!1,theme:d="light",loading:m="Loading...",options:p={},height:y="100%",width:S="100%",className:g,wrapperProps:b={},beforeMount:v=Fc,onMount:_=Fc}){let[x,E]=z.useState(!1),[R,C]=z.useState(!0),$=z.useRef(null),A=z.useRef(null),T=z.useRef(null),M=z.useRef(_),D=z.useRef(v),j=z.useRef(!1);Dj(()=>{let G=Tj.init();return G.then(q=>(A.current=q)&&C(!1)).catch(q=>(q==null?void 0:q.type)!=="cancelation"&&console.error("Monaco initialization: error:",q)),()=>$.current?K():G.cancel()}),Or(()=>{if($.current&&A.current){let G=$.current.getOriginalEditor(),q=Ml(A.current,e||"",i||n||"text",s||"");q!==G.getModel()&&G.setModel(q)}},[s],x),Or(()=>{if($.current&&A.current){let G=$.current.getModifiedEditor(),q=Ml(A.current,t||"",o||n||"text",u||"");q!==G.getModel()&&G.setModel(q)}},[u],x),Or(()=>{let G=$.current.getModifiedEditor();G.getOption(A.current.editor.EditorOption.readOnly)?G.setValue(t||""):t!==G.getValue()&&(G.executeEdits("",[{range:G.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),G.pushUndoStop())},[t],x),Or(()=>{var G,q;(q=(G=$.current)==null?void 0:G.getModel())==null||q.original.setValue(e||"")},[e],x),Or(()=>{let{original:G,modified:q}=$.current.getModel();A.current.editor.setModelLanguage(G,i||n||"text"),A.current.editor.setModelLanguage(q,o||n||"text")},[n,i,o],x),Or(()=>{var G;(G=A.current)==null||G.editor.setTheme(d)},[d],x),Or(()=>{var G;(G=$.current)==null||G.updateOptions(p)},[p],x);let I=z.useCallback(()=>{var Q;if(!A.current)return;D.current(A.current);let G=Ml(A.current,e||"",i||n||"text",s||""),q=Ml(A.current,t||"",o||n||"text",u||"");(Q=$.current)==null||Q.setModel({original:G,modified:q})},[n,t,o,e,i,s,u]),L=z.useCallback(()=>{var G;!j.current&&T.current&&($.current=A.current.editor.createDiffEditor(T.current,{automaticLayout:!0,...p}),I(),(G=A.current)==null||G.editor.setTheme(d),E(!0),j.current=!0)},[p,d,I]);z.useEffect(()=>{x&&M.current($.current,A.current)},[x]),z.useEffect(()=>{!R&&!x&&L()},[R,x,L]);function K(){var q,Q,W,ne;let G=(q=$.current)==null?void 0:q.getModel();c||((Q=G==null?void 0:G.original)==null||Q.dispose()),f||((W=G==null?void 0:G.modified)==null||W.dispose()),(ne=$.current)==null||ne.dispose()}return he.createElement(Mj,{width:S,height:y,isEditorReady:x,loading:m,_ref:T,className:g,wrapperProps:b})}var gY=mY;z.memo(gY);function vY(e){let t=z.useRef();return z.useEffect(()=>{t.current=e},[e]),t.current}var yY=vY,Bh=new Map;function bY({defaultValue:e,defaultLanguage:t,defaultPath:n,value:i,language:o,path:s,theme:u="light",line:c,loading:f="Loading...",options:d={},overrideServices:m={},saveViewState:p=!0,keepCurrentModel:y=!1,width:S="100%",height:g="100%",className:b,wrapperProps:v={},beforeMount:_=Fc,onMount:x=Fc,onChange:E,onValidate:R=Fc}){let[C,$]=z.useState(!1),[A,T]=z.useState(!0),M=z.useRef(null),D=z.useRef(null),j=z.useRef(null),I=z.useRef(x),L=z.useRef(_),K=z.useRef(),G=z.useRef(i),q=yY(s),Q=z.useRef(!1),W=z.useRef(!1);Dj(()=>{let P=Tj.init();return P.then(B=>(M.current=B)&&T(!1)).catch(B=>(B==null?void 0:B.type)!=="cancelation"&&console.error("Monaco initialization: error:",B)),()=>D.current?X():P.cancel()}),Or(()=>{var B,U,k,V;let P=Ml(M.current,e||i||"",t||o||"",s||n||"");P!==((B=D.current)==null?void 0:B.getModel())&&(p&&Bh.set(q,(U=D.current)==null?void 0:U.saveViewState()),(k=D.current)==null||k.setModel(P),p&&((V=D.current)==null||V.restoreViewState(Bh.get(s))))},[s],C),Or(()=>{var P;(P=D.current)==null||P.updateOptions(d)},[d],C),Or(()=>{!D.current||i===void 0||(D.current.getOption(M.current.editor.EditorOption.readOnly)?D.current.setValue(i):i!==D.current.getValue()&&(W.current=!0,D.current.executeEdits("",[{range:D.current.getModel().getFullModelRange(),text:i,forceMoveMarkers:!0}]),D.current.pushUndoStop(),W.current=!1))},[i],C),Or(()=>{var B,U;let P=(B=D.current)==null?void 0:B.getModel();P&&o&&((U=M.current)==null||U.editor.setModelLanguage(P,o))},[o],C),Or(()=>{var P;c!==void 0&&((P=D.current)==null||P.revealLine(c))},[c],C),Or(()=>{var P;(P=M.current)==null||P.editor.setTheme(u)},[u],C);let ne=z.useCallback(()=>{var P;if(!(!j.current||!M.current)&&!Q.current){L.current(M.current);let B=s||n,U=Ml(M.current,i||e||"",t||o||"",B||"");D.current=(P=M.current)==null?void 0:P.editor.create(j.current,{model:U,automaticLayout:!0,...d},m),p&&D.current.restoreViewState(Bh.get(B)),M.current.editor.setTheme(u),c!==void 0&&D.current.revealLine(c),$(!0),Q.current=!0}},[e,t,n,i,o,s,d,m,p,u,c]);z.useEffect(()=>{C&&I.current(D.current,M.current)},[C]),z.useEffect(()=>{!A&&!C&&ne()},[A,C,ne]),G.current=i,z.useEffect(()=>{var P,B;C&&E&&((P=K.current)==null||P.dispose(),K.current=(B=D.current)==null?void 0:B.onDidChangeModelContent(U=>{W.current||E(D.current.getValue(),U)}))},[C,E]),z.useEffect(()=>{if(C){let P=M.current.editor.onDidChangeMarkers(B=>{var k;let U=(k=D.current.getModel())==null?void 0:k.uri;if(U&&B.find(V=>V.path===U.path)){let V=M.current.editor.getModelMarkers({resource:U});R==null||R(V)}});return()=>{P==null||P.dispose()}}return()=>{}},[C,R]);function X(){var P,B;(P=K.current)==null||P.dispose(),y?p&&Bh.set(s,D.current.saveViewState()):(B=D.current.getModel())==null||B.dispose(),D.current.dispose()}return he.createElement(Mj,{width:S,height:g,isEditorReady:C,loading:f,_ref:j,className:b,wrapperProps:v})}var SY=bY,_Y=z.memo(SY),wY=_Y;function EY(e){const t=[],n=e.fields.some(c=>c.validators&&Object.keys(c.validators).length>0);t.push('"""'),t.push(`${e.name} DocType`),e.docstring&&(t.push(""),t.push(e.docstring)),t.push('"""'),t.push(""),t.push("from __future__ import annotations"),t.push("");const i=new Set,o=e.fields.some(c=>c.type==="datetime"||c.type==="date"),s=e.fields.some(c=>c.type==="UUID"),u=e.fields.some(c=>c.type==="Decimal");return n&&(i.add("from typing import Annotated"),i.add(""),i.add("from pydantic import Field")),o&&i.add("from datetime import datetime, date"),s&&i.add("from uuid import UUID"),u&&i.add("from decimal import Decimal"),i.forEach(c=>t.push(c)),i.size>0&&t.push(""),t.push("from framework_m.core.base import BaseDocType"),t.push(""),t.push(""),t.push(`class ${e.name}(BaseDocType):`),e.docstring&&(t.push(` """${e.docstring}"""`),t.push("")),e.fields.length===0?t.push(" pass"):e.fields.forEach(c=>{let f=c.type;const d=f.match(/^Annotated\[(.*?)\s*,.*\]$/s);d&&(f=d[1].trim());const m=[];if(c.validators){const p=c.validators;p.min_length!==void 0&&p.min_length!==null&&m.push(`min_length=${p.min_length}`),p.max_length!==void 0&&p.max_length!==null&&m.push(`max_length=${p.max_length}`),p.pattern&&m.push(`pattern="${p.pattern}"`),p.min_value!==void 0&&p.min_value!==null&&m.push(`ge=${p.min_value}`),p.max_value!==void 0&&p.max_value!==null&&m.push(`le=${p.max_value}`)}if(c.description&&m.push(`description="${c.description}"`),c.label&&m.push(`label="${c.label}"`),m.length>0){const p=`Field(${m.join(", ")})`;!c.required&&!f.includes("None")?f=`Annotated[${f} | None, ${p}]`:f=`Annotated[${f}, ${p}]`;let y=` ${c.name}: ${f}`;c.default?y+=` = ${c.default}`:c.required||(y+=" = None"),t.push(y)}else{!c.required&&!f.includes("None")&&(f=`${f} | None`);let p=` ${c.name}: ${f}`;c.default?p+=` = ${c.default}`:c.required||(p+=" = None"),t.push(p)}}),t.push(""),t.push(" class Config:"),t.push(` tablename = "${Nj(e.name)}"`),t.push(` verbose_name = "${e.name}"`),t.push(""),t.join(`
|
|
170
|
-
`)}function Nj(e){return e.replace(/([A-Z])/g,"_$1").toLowerCase().replace(/^_/,"")}function xY({schema:e,className:t=""}){const n=z.useMemo(()=>EY(e),[e]);return N.jsxs("div",{className:`flex flex-col h-full ${t}`,children:[N.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-slate-800 border-b border-slate-700",children:[N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsx("svg",{className:"w-4 h-4 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"})}),N.jsxs("span",{className:"text-sm font-medium text-slate-300",children:[Nj(e.name||"doctype"),".py"]})]}),N.jsxs("button",{onClick:()=>navigator.clipboard.writeText(n),className:"text-xs text-slate-400 hover:text-white transition-colors flex items-center gap-1",children:[N.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})}),"Copy"]})]}),N.jsx("div",{className:"flex-1 min-h-0",children:N.jsx(wY,{height:"100%",language:"python",value:n,theme:"vs-dark",options:{readOnly:!0,minimap:{enabled:!1},fontSize:13,lineNumbers:"on",scrollBeyondLastLine:!1,automaticLayout:!0,folding:!0,wordWrap:"on",padding:{top:12,bottom:12},renderLineHighlight:"none",overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,scrollbar:{vertical:"auto",horizontal:"hidden",useShadows:!1}}})})]})}function Pj(){return window.__STUDIO_FIELD_COMPONENTS__||(window.__STUDIO_FIELD_COMPONENTS__=new Map),window.__STUDIO_FIELD_COMPONENTS__}function CY(e){return Pj().get(e)||null}function RY(){Pj(),console.log("[Studio] Field component registry initialized")}const ks="w-full px-3 py-2 rounded-lg border transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 disabled:opacity-50 bg-white dark:bg-zinc-800 border-gray-200 dark:border-zinc-700 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-zinc-500",OY="rounded border-gray-300 dark:border-zinc-600 text-blue-600 focus:ring-blue-500";function lp({value:e,onChange:t,disabled:n,description:i}){return N.jsx("input",{type:"text",value:String(e??""),onChange:o=>t(o.target.value),disabled:n,placeholder:i,className:ks})}function AY({value:e,onChange:t,disabled:n,description:i}){return N.jsx("textarea",{value:String(e??""),onChange:o=>t(o.target.value),disabled:n,placeholder:i,rows:4,className:ks})}function $Y({value:e,onChange:t,disabled:n,schema:i}){const o=(i==null?void 0:i.type)==="float"?"0.01":"1";return N.jsx("input",{type:"number",value:e!==void 0?String(e):"",onChange:s=>{const u=s.target.value;t(u===""?void 0:(i==null?void 0:i.type)==="float"?parseFloat(u):parseInt(u))},disabled:n,step:o,className:ks})}function TY({value:e,onChange:t,disabled:n,fieldName:i}){return N.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[N.jsx("input",{type:"checkbox",checked:!!e,onChange:o=>t(o.target.checked),disabled:n,className:OY}),N.jsx("span",{className:"text-sm text-gray-700 dark:text-zinc-300",children:i})]})}function MY({value:e,onChange:t,disabled:n,schema:i}){const o=(i==null?void 0:i.options)||[];return N.jsxs("select",{value:String(e??""),onChange:s=>t(s.target.value),disabled:n,className:ks,children:[N.jsx("option",{value:"",children:"Select..."}),o.map(s=>N.jsx("option",{value:s,children:s},s))]})}function DY({value:e,onChange:t,disabled:n}){return N.jsx("input",{type:"date",value:String(e??""),onChange:i=>t(i.target.value),disabled:n,className:ks})}function jY({value:e,onChange:t,disabled:n}){return N.jsx("input",{type:"datetime-local",value:String(e??""),onChange:i=>t(i.target.value),disabled:n,className:ks})}function NY({value:e,onChange:t,disabled:n}){const i=typeof e=="string"?e:JSON.stringify(e,null,2);return N.jsx("textarea",{value:i,onChange:o=>{try{t(JSON.parse(o.target.value))}catch{t(o.target.value)}},disabled:n,rows:6,className:`${ks} font-mono text-sm`,placeholder:"{}"})}const PY={text:lp,textarea:AY,number:$Y,checkbox:TY,select:MY,date:DY,datetime:jY,json:NY,email:lp,url:lp};function IY(e){return PY[e]||lp}function zY(e){const t=CY(e);return t||IY(e)}function FY(e){return{str:"text",text:"textarea",int:"number",float:"number",Decimal:"number",bool:"checkbox",date:"date",datetime:"datetime",email:"email",url:"url",dict:"json",json:"json",list:"json"}[e]||"text"}function r$({fields:e,initialValues:t={},onSubmit:n,onChange:i,readOnly:o=!1}){const[s,u]=z.useState(t),[c,f]=z.useState([]),[d,m]=z.useState(!1),p=z.useCallback(()=>{const b=[];for(const v of e){const _=s[v.name];if(v.required&&(_==null||_==="")&&b.push({field:v.name,message:`${v.name} is required`}),v.validators&&_!==void 0&&_!==null&&_!==""){const{min_length:x,max_length:E,min_value:R,max_value:C,pattern:$}=v.validators;if(x!==void 0&&typeof _=="string"&&_.length<x&&b.push({field:v.name,message:`Minimum length is ${x}`}),E!==void 0&&typeof _=="string"&&_.length>E&&b.push({field:v.name,message:`Maximum length is ${E}`}),R!==void 0&&typeof _=="number"&&_<R&&b.push({field:v.name,message:`Minimum value is ${R}`}),C!==void 0&&typeof _=="number"&&_>C&&b.push({field:v.name,message:`Maximum value is ${C}`}),$!==void 0&&typeof _=="string")try{new RegExp($).test(_)||b.push({field:v.name,message:`Does not match pattern: ${$}`})}catch{}}}return b},[e,s]),y=z.useCallback((b,v)=>{const _={...s,[b]:v};u(_),i==null||i(_),d&&f(x=>x.filter(E=>E.field!==b))},[s,i,d]),S=z.useCallback(b=>{b.preventDefault(),m(!0);const v=p();f(v),v.length===0&&(n==null||n(s))},[p,s,n]),g=b=>{var v;return(v=c.find(_=>_.field===b))==null?void 0:v.message};return N.jsxs("form",{onSubmit:S,className:"space-y-4",children:[e.map(b=>{const v=FY(b.type),_=zY(v),x=g(b.name),E={value:s[b.name],onChange:R=>y(b.name,R),fieldName:b.name,fieldType:b.type,disabled:o,required:b.required,description:b.description,schema:{type:b.type,...b.validators}};return N.jsxs("div",{className:"space-y-1",children:[N.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-zinc-300",children:[b.name,b.required&&N.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),N.jsx(_,{...E}),b.description&&N.jsx("p",{className:"text-xs text-gray-500 dark:text-zinc-500",children:b.description}),x&&N.jsx("p",{className:"text-xs text-red-500",children:x})]},b.name)}),!o&&n&&N.jsxs("div",{className:"pt-4 border-t border-gray-200 dark:border-zinc-700",children:[N.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium transition-colors",children:"Submit"}),c.length>0&&N.jsxs("p",{className:"mt-2 text-sm text-red-500",children:["Please fix ",c.length," validation error(s) above."]})]})]})}function kY(e,t){if(e==null)return"-";switch(t){case"bool":return e?"Yes":"No";case"date":case"datetime":return String(e);case"dict":case"json":case"list":return JSON.stringify(e).slice(0,50)+"...";default:return String(e)}}function LY({fields:e,data:t,onRowClick:n,onDelete:i,pageSize:o=10,paginated:s=!0}){const[u,c]=z.useState(1),[f,d]=z.useState(null),[m,p]=z.useState("asc"),y=z.useMemo(()=>e.slice(0,5),[e]),S=z.useMemo(()=>f?[...t].sort((E,R)=>{const C=E[f],$=R[f];if(C===$)return 0;if(C==null)return 1;if($==null)return-1;const A=String(C).localeCompare(String($));return m==="asc"?A:-A}):t,[t,f,m]),g=z.useMemo(()=>{if(!s)return S;const E=(u-1)*o;return S.slice(E,E+o)},[S,u,o,s]),b=Math.ceil(t.length/o),v=z.useCallback(E=>{f===E?p(R=>R==="asc"?"desc":"asc"):(d(E),p("asc"))},[f]),_=z.useCallback((E,R)=>{n==null||n(E,(u-1)*o+R)},[n,u,o]),x=z.useCallback((E,R,C)=>{C.stopPropagation(),i==null||i(E,(u-1)*o+R)},[i,u,o]);return N.jsxs("div",{className:"border border-gray-200 dark:border-zinc-700 rounded-lg overflow-hidden",children:[N.jsx("div",{className:"overflow-x-auto",children:N.jsxs("table",{className:"w-full",children:[N.jsx("thead",{className:"bg-gray-50 dark:bg-zinc-800",children:N.jsxs("tr",{children:[N.jsx("th",{className:"w-12 px-3 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400",children:"#"}),y.map(E=>N.jsx("th",{onClick:()=>v(E.name),className:"px-3 py-2 text-left text-xs font-medium text-gray-500 dark:text-zinc-400 cursor-pointer hover:bg-gray-100 dark:hover:bg-zinc-700 transition-colors",children:N.jsxs("div",{className:"flex items-center gap-1",children:[E.name,f===E.name&&N.jsx("svg",{className:`w-3 h-3 transition-transform ${m==="desc"?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 15l7-7 7 7"})})]})},E.name)),i&&N.jsx("th",{className:"w-16 px-3 py-2 text-center text-xs font-medium text-gray-500 dark:text-zinc-400",children:"Actions"})]})}),N.jsx("tbody",{className:"divide-y divide-gray-100 dark:divide-zinc-800",children:g.length===0?N.jsx("tr",{children:N.jsx("td",{colSpan:y.length+2,className:"px-4 py-8 text-center text-gray-400 dark:text-zinc-500 text-sm",children:"No data available."})}):g.map((E,R)=>N.jsxs("tr",{onClick:()=>_(E,R),className:"hover:bg-gray-50 dark:hover:bg-zinc-800/50 cursor-pointer transition-colors",children:[N.jsx("td",{className:"px-3 py-2 text-xs text-gray-400 dark:text-zinc-500",children:(u-1)*o+R+1}),y.map(C=>N.jsx("td",{className:"px-3 py-2 text-sm text-gray-900 dark:text-white truncate max-w-[200px]",children:kY(E[C.name],C.type)},C.name)),i&&N.jsx("td",{className:"px-3 py-2 text-center",children:N.jsx("button",{type:"button",onClick:C=>x(E,R,C),className:"p-1 text-gray-400 hover:text-red-500 dark:text-zinc-500 dark:hover:text-red-400 transition-colors",title:"Delete",children:N.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})})]},String(E.id||R)))})]})}),s&&b>1&&N.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-gray-200 dark:border-zinc-700 bg-gray-50 dark:bg-zinc-800",children:[N.jsxs("div",{className:"text-sm text-gray-500 dark:text-zinc-400",children:["Showing ",(u-1)*o+1," to"," ",Math.min(u*o,t.length)," of ",t.length," rows"]}),N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsx("button",{type:"button",onClick:()=>c(E=>Math.max(1,E-1)),disabled:u===1,className:"px-3 py-1 text-sm border border-gray-300 dark:border-zinc-600 rounded hover:bg-gray-100 dark:hover:bg-zinc-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Previous"}),N.jsxs("span",{className:"text-sm text-gray-600 dark:text-zinc-400",children:["Page ",u," of ",b]}),N.jsx("button",{type:"button",onClick:()=>c(E=>Math.min(b,E+1)),disabled:u===b,className:"px-3 py-1 text-sm border border-gray-300 dark:border-zinc-600 rounded hover:bg-gray-100 dark:hover:bg-zinc-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Next"})]})]})]})}const qY=["Alice","Bob","Charlie","Diana","Eve","Frank","Grace","Henry"],UY=["lorem","ipsum","dolor","sit","amet","consectetur","adipiscing","elit"],BY=["alice@example.com","bob@test.org","charlie@demo.io","diana@sample.net"],VY=["https://example.com","https://test.org","https://demo.io","https://sample.net"];function co(e,t){return Math.floor(Math.random()*(t-e+1))+e}function x0(e,t,n=2){const i=Math.random()*(t-e)+e;return parseFloat(i.toFixed(n))}function up(e){return e[co(0,e.length-1)]}function ha(e){return Array.from({length:e},()=>up(UY)).join(" ")}function HY(){const e=new Date,t=co(0,365);return new Date(e.getTime()-t*24*60*60*1e3).toISOString().split("T")[0]}function pb(){const e=new Date,t=co(0,365);return new Date(e.getTime()-t*24*60*60*1e3).toISOString().slice(0,16)}function mb(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function KY(e,t){const n=t.toLowerCase();switch(e){case"str":case"text":return n.includes("name")?up(qY):n.includes("title")?ha(3).charAt(0).toUpperCase()+ha(3).slice(1):n.includes("description")?ha(8):ha(2);case"int":return n.includes("age")?co(18,80):n.includes("quantity")||n.includes("count")?co(1,100):n.includes("year")?co(2e3,2030):co(1,1e3);case"float":case"Decimal":return n.includes("price")||n.includes("amount")||n.includes("cost")?x0(10,1e3,2):(n.includes("rate")||n.includes("percentage"),x0(0,100,2));case"bool":return Math.random()>.5;case"date":return HY();case"datetime":return pb();case"UUID":return mb();case"email":return up(BY);case"url":return up(VY);case"dict":case"json":return{key:ha(1),value:co(1,100)};case"list":return[ha(1),ha(1),ha(1)];case"Table":return[];case"Link":return mb();default:return ha(2)}}function Ij(e){const t={id:mb(),created_at:pb(),updated_at:pb()};for(const n of e){if(!n.required&&Math.random()<.3){t[n.name]=null;continue}t[n.name]=KY(n.type,n.name)}return t}function i$(e,t){return Array.from({length:t},()=>Ij(e))}function GY({fields:e,doctypeName:t}){const[n,i]=z.useState("table"),[o,s]=z.useState([]),[u,c]=z.useState(null),[f,d]=z.useState(null),[m,p]=z.useState(!1),[y,S]=z.useState(!1);z.useEffect(()=>{e.length>0&&s(i$(e,10))},[e]);const g=z.useMemo(()=>({total:o.length,fields:e.length}),[o.length,e.length]),b=z.useCallback(()=>{c(null),d(null),S(!0),p(!0)},[]),v=z.useCallback(($,A)=>{c($),d(A),S(!1),p(!0)},[]),_=z.useCallback($=>{if(y){const A={...$,id:crypto.randomUUID?crypto.randomUUID():Date.now().toString(),created_at:new Date().toISOString(),updated_at:new Date().toISOString()};s(T=>[...T,A])}else f!==null&&s(A=>{const T=[...A];return T[f]={...T[f],...$,updated_at:new Date().toISOString()},T});p(!1),c(null),d(null),S(!1)},[y,f]),x=z.useCallback(($,A)=>{confirm(`Delete this ${t}?`)&&s(T=>T.filter((M,D)=>D!==A))},[t]),E=z.useCallback($=>{s(A=>[...A,...i$(e,$)])},[e]),R=z.useCallback(()=>{confirm("Clear all sandbox data?")&&s([])},[]),C=z.useCallback(()=>{p(!1),c(null),d(null),S(!1)},[]);return N.jsxs("div",{className:"h-full flex flex-col",children:[N.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-zinc-700",children:[N.jsxs("div",{className:"flex items-center gap-4",children:[N.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:["Sandbox: ",t]}),N.jsxs("span",{className:"text-sm text-gray-500 dark:text-zinc-400",children:[g.total," records • ",g.fields," fields"]})]}),N.jsx("div",{className:"flex items-center gap-2",children:N.jsxs("div",{className:"flex rounded-lg overflow-hidden border border-gray-200 dark:border-zinc-700",children:[N.jsx("button",{type:"button",onClick:()=>i("table"),className:`px-3 py-1.5 text-sm transition-colors ${n==="table"?"bg-blue-600 text-white":"bg-white dark:bg-zinc-800 text-gray-600 dark:text-zinc-400 hover:bg-gray-50 dark:hover:bg-zinc-700"}`,children:N.jsxs("span",{className:"flex items-center gap-1.5",children:[N.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})}),"Table"]})}),N.jsx("button",{type:"button",onClick:()=>i("form"),className:`px-3 py-1.5 text-sm transition-colors ${n==="form"?"bg-blue-600 text-white":"bg-white dark:bg-zinc-800 text-gray-600 dark:text-zinc-400 hover:bg-gray-50 dark:hover:bg-zinc-700"}`,children:N.jsxs("span",{className:"flex items-center gap-1.5",children:[N.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),"Form"]})})]})})]}),N.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-100 dark:border-zinc-800 bg-gray-50 dark:bg-zinc-900",children:[N.jsxs("button",{type:"button",onClick:b,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm bg-blue-600 hover:bg-blue-700 text-white rounded transition-colors",children:[N.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"New"]}),N.jsxs("div",{className:"flex items-center gap-1 border-l border-gray-200 dark:border-zinc-700 pl-2 ml-1",children:[N.jsx("button",{type:"button",onClick:()=>E(5),className:"px-2 py-1.5 text-xs text-gray-600 dark:text-zinc-400 hover:bg-gray-100 dark:hover:bg-zinc-800 rounded transition-colors",children:"+5 rows"}),N.jsx("button",{type:"button",onClick:()=>E(50),className:"px-2 py-1.5 text-xs text-gray-600 dark:text-zinc-400 hover:bg-gray-100 dark:hover:bg-zinc-800 rounded transition-colors",children:"+50 rows"}),N.jsx("button",{type:"button",onClick:R,className:"px-2 py-1.5 text-xs text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded transition-colors",children:"Clear"})]})]}),N.jsxs("div",{className:"flex-1 overflow-hidden flex",children:[N.jsx("div",{className:`flex-1 overflow-auto p-4 ${m?"hidden md:block":""}`,children:n==="table"?N.jsx(LY,{fields:e,data:o,onRowClick:v,onDelete:x,pageSize:10,paginated:!0}):N.jsx("div",{className:"max-w-xl",children:o.length>0?N.jsxs(N.Fragment,{children:[N.jsxs("div",{className:"mb-4 text-sm text-gray-500 dark:text-zinc-400",children:["Showing record 1 of ",o.length]}),N.jsx(r$,{fields:e,initialValues:o[0],onSubmit:_,readOnly:!0})]}):N.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-zinc-500",children:'No records. Click "New" to create one.'})})}),m&&N.jsxs("div",{className:"w-full md:w-96 border-l border-gray-200 dark:border-zinc-700 bg-white dark:bg-zinc-900 flex flex-col",children:[N.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-zinc-700",children:[N.jsx("h4",{className:"font-medium text-gray-900 dark:text-white",children:y?"New Record":"Edit Record"}),N.jsx("button",{type:"button",onClick:C,className:"p-1 text-gray-400 hover:text-gray-600 dark:text-zinc-500 dark:hover:text-zinc-300",children:N.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),N.jsx("div",{className:"flex-1 overflow-auto p-4",children:N.jsx(r$,{fields:e,initialValues:y?Ij(e):u||{},onSubmit:_})})]})]})]})}const QY=[{name:"validate",description:"Validate document before saving. Raise ValueError for validation errors.",signature:"async def validate(self, doc: DocType) -> None:",body:" pass"},{name:"before_save",description:"Called before persisting to database. Use for computed fields.",signature:"async def before_save(self, doc: DocType) -> None:",body:" pass"},{name:"after_save",description:"Called after successful save. Use for side effects like notifications.",signature:"async def after_save(self, doc: DocType) -> None:",body:" pass"},{name:"before_delete",description:"Called before deleting. Use for cleanup or validation.",signature:"async def before_delete(self, doc: DocType) -> None:",body:" pass"}];function YY({doctypeName:e,initialHooks:t,onChange:n,readOnly:i=!1}){var x,E;const[o,s]=z.useState(t||QY.map(R=>({...R,signature:R.signature.replace("DocType",e)}))),[u,c]=z.useState(null),[f,d]=z.useState(""),[m,p]=z.useState(!1),[y,S]=z.useState(""),g=z.useCallback(R=>{const C=o.find($=>$.name===R);C&&(c(R),d(C.body))},[o]),b=z.useCallback(R=>{d(R);const C=o.map($=>$.name===u?{...$,body:R}:$);s(C),n==null||n(C)},[o,u,n]),v=z.useCallback(()=>{if(!y.trim())return;const R=y.toLowerCase().replace(/\s+/g,"_"),C={name:R,description:"Custom method",signature:`async def ${R}(self, doc: ${e}) -> None:`,body:` # Add your custom logic here
|
|
171
|
-
pass`,isCustom:!0},$=[...o,C];s($),n==null||n($),S(""),p(!1),c(R),d(C.body)},[y,e,o,n]),_=z.useCallback(R=>{const C=o.find($=>$.name===R);if(C!=null&&C.isCustom&&confirm(`Delete method "${R}"?`)){const $=o.filter(A=>A.name!==R);s($),n==null||n($),u===R&&(c(null),d(""))}},[o,u,n]);return N.jsxs("div",{className:"h-full flex flex-col",children:[N.jsxs("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-zinc-700",children:[N.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:[e,"Controller"]}),N.jsx("p",{className:"text-sm text-gray-500 dark:text-zinc-400",children:"Edit lifecycle hooks and custom methods"})]}),N.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[N.jsxs("div",{className:"w-64 border-r border-gray-200 dark:border-zinc-700 flex flex-col",children:[N.jsxs("div",{className:"flex-1 overflow-auto",children:[N.jsx("div",{className:"px-3 py-2 text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Lifecycle Hooks"}),o.filter(R=>!R.isCustom).map(R=>N.jsxs("button",{onClick:()=>g(R.name),className:`w-full text-left px-3 py-2 text-sm transition-colors ${u===R.name?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"text-gray-700 dark:text-zinc-300 hover:bg-gray-50 dark:hover:bg-zinc-800"}`,children:[N.jsx("div",{className:"font-medium",children:R.name}),N.jsx("div",{className:"text-xs text-gray-500 dark:text-zinc-500 truncate",children:R.description})]},R.name)),o.some(R=>R.isCustom)&&N.jsxs(N.Fragment,{children:[N.jsx("div",{className:"px-3 py-2 mt-2 text-xs font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider border-t border-gray-200 dark:border-zinc-700",children:"Custom Methods"}),o.filter(R=>R.isCustom).map(R=>N.jsxs("div",{className:`flex items-center justify-between px-3 py-2 text-sm transition-colors ${u===R.name?"bg-blue-50 dark:bg-blue-900/20":"hover:bg-gray-50 dark:hover:bg-zinc-800"}`,children:[N.jsx("button",{onClick:()=>g(R.name),className:`flex-1 text-left ${u===R.name?"text-blue-600 dark:text-blue-400":"text-gray-700 dark:text-zinc-300"}`,children:R.name}),!i&&N.jsx("button",{onClick:()=>_(R.name),className:"p-1 text-gray-400 hover:text-red-500 dark:text-zinc-500",title:"Delete method",children:N.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},R.name))]})]}),!i&&N.jsx("div",{className:"p-3 border-t border-gray-200 dark:border-zinc-700",children:m?N.jsxs("div",{className:"space-y-2",children:[N.jsx("input",{type:"text",value:y,onChange:R=>S(R.target.value),placeholder:"method_name",className:"w-full px-2 py-1 text-sm border border-gray-300 dark:border-zinc-600 rounded bg-white dark:bg-zinc-800 text-gray-900 dark:text-white",autoFocus:!0,onKeyDown:R=>{R.key==="Enter"&&v(),R.key==="Escape"&&p(!1)}}),N.jsxs("div",{className:"flex gap-1",children:[N.jsx("button",{onClick:v,className:"flex-1 px-2 py-1 text-xs bg-blue-600 text-white rounded hover:bg-blue-700",children:"Add"}),N.jsx("button",{onClick:()=>p(!1),className:"flex-1 px-2 py-1 text-xs border border-gray-300 dark:border-zinc-600 rounded hover:bg-gray-100 dark:hover:bg-zinc-700",children:"Cancel"})]})]}):N.jsxs("button",{onClick:()=>p(!0),className:"w-full flex items-center justify-center gap-1 px-3 py-1.5 text-sm text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded transition-colors",children:[N.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add Method"]})})]}),N.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:u?N.jsxs(N.Fragment,{children:[N.jsx("div",{className:"px-4 py-2 bg-gray-50 dark:bg-zinc-800 border-b border-gray-200 dark:border-zinc-700",children:N.jsx("code",{className:"text-sm font-mono text-purple-600 dark:text-purple-400",children:(x=o.find(R=>R.name===u))==null?void 0:x.signature})}),N.jsx("div",{className:"flex-1 overflow-auto",children:N.jsx("textarea",{value:f,onChange:R=>b(R.target.value),disabled:i,className:"w-full h-full p-4 font-mono text-sm bg-gray-900 text-green-400 resize-none focus:outline-none",placeholder:" # Add your code here",spellCheck:!1})}),N.jsx("div",{className:"px-4 py-2 bg-gray-50 dark:bg-zinc-800 border-t border-gray-200 dark:border-zinc-700 text-xs text-gray-500 dark:text-zinc-400",children:(E=o.find(R=>R.name===u))==null?void 0:E.description})]}):N.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-400 dark:text-zinc-500",children:N.jsxs("div",{className:"text-center",children:[N.jsx("svg",{className:"w-12 h-12 mx-auto mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"})}),N.jsx("p",{children:"Select a method to edit"})]})})})]})]})}function WY(e){const t=e.match(/^Annotated\[(.*?),/);return t?t[1].trim():e}function a$(e){if(!e)return"";const t=[];return e.min_length!==void 0&&t.push(`min_length=${e.min_length}`),e.max_length!==void 0&&t.push(`max_length=${e.max_length}`),e.pattern&&t.push(`pattern="${e.pattern}"`),e.min_value!==void 0&&t.push(`ge=${e.min_value}`),e.max_value!==void 0&&t.push(`le=${e.max_value}`),t.length>0?`Field(${t.join(", ")})`:""}function XY({field:e,isSelected:t,onSelect:n,onDelete:i,isDark:o}){const{attributes:s,listeners:u,setNodeRef:c,transform:f,transition:d}=LB({id:e._id}),m={transform:Qc.Transform.toString(f),transition:d};return N.jsx("div",{ref:c,style:m,className:`p-3 rounded-lg border cursor-pointer transition-all ${t?"bg-blue-500/10 border-blue-500":o?"bg-zinc-800 border-zinc-700 hover:border-zinc-600":"bg-white border-gray-200 hover:border-gray-300 shadow-sm"}`,onClick:n,children:N.jsxs("div",{className:"flex items-center gap-3",children:[N.jsx("div",{...s,...u,className:`cursor-grab ${o?"text-zinc-500 hover:text-zinc-400":"text-gray-400 hover:text-gray-600"}`,children:N.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:N.jsx("path",{d:"M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z"})})}),N.jsxs("div",{className:"flex-1 min-w-0",children:[N.jsx("div",{className:`font-medium truncate ${o?"text-white":"text-gray-900"}`,children:e.name}),N.jsxs("div",{className:`text-sm ${o?"text-zinc-400":"text-gray-500"}`,children:[N.jsx("div",{className:"font-mono truncate",children:WY(e.type)}),N.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.required&&N.jsx("span",{className:"text-red-500",children:"required"}),a$(e.validators)&&N.jsx("span",{className:"text-green-500 truncate",children:a$(e.validators)})]})]})]}),N.jsx("button",{onClick:p=>{p.stopPropagation(),i()},className:`transition-colors ${o?"text-zinc-500 hover:text-red-400":"text-gray-400 hover:text-red-500"}`,children:N.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})})}function o$(){const{id:e}=oM(),t=er(),n=su(),i=!e,{result:o,query:s}=CL({resource:"doctypes",id:e||"",queryOptions:{enabled:!i}}),u=RL(),c=OL(),[f,d]=z.useState(()=>({name:"",docstring:"",fields:[]})),[m,p]=z.useState(null),[y,S]=z.useState(!1),[g,b]=z.useState([]),{theme:v}=wf(),_=v==="dark";z.useEffect(()=>{fetch("/studio/api/field-types").then(j=>j.json()).then(j=>{j.field_types&&b(j.field_types)}).catch(j=>console.error("Failed to fetch field types:",j))},[]),z.useEffect(()=>{d({name:"",docstring:"",fields:[]}),p(null)},[e]);const x=o,E=(x==null?void 0:x.data)??x;z.useEffect(()=>{if(!i&&(E!=null&&E.name)){console.log("Initializing doctype from API data:",E),console.log("Raw API fields:",E.fields);const j=(E.fields||[]).map((I,L)=>(console.log("Mapping field:",I.name,"validators:",I.validators),{...I,required:I.required??!0,_id:I._id||`field_${Date.now()}_${L}`}));console.log("Mapped fields:",j),d({name:E.name||"",docstring:E.docstring||"",fields:j})}},[E,i]);const R=y5(bR(dS),bR(cS,{coordinateGetter:BB})),C=z.useCallback(j=>{const{active:I,over:L}=j;L&&I.id!==L.id&&d(K=>{const G=K.fields.findIndex(Q=>Q._id===I.id),q=K.fields.findIndex(Q=>Q._id===L.id);return{...K,fields:hS(K.fields,G,q)}})},[]),$=z.useCallback(()=>{let j=0;d(I=>{const K={name:`field_${I.fields.length+1}`,type:"str",required:!0,_id:`field_${Date.now()}_${I.fields.length}`};return j=I.fields.length,{...I,fields:[...I.fields,K]}}),p(j)},[]),A=z.useCallback(j=>{d(I=>({...I,fields:I.fields.filter((L,K)=>K!==j)})),p(null)},[]),T=z.useCallback(j=>{m===null||m<0||d(I=>({...I,fields:I.fields.map((L,K)=>K===m?{...j,_id:L._id}:L)}))},[m]),M=z.useCallback(()=>{if(!f.name.trim()){alert("DocType name is required");return}S(!0);const j={name:f.name,docstring:f.docstring,fields:f.fields.map(({_id:L,...K})=>K)};console.log("Save payload:",JSON.stringify(j,null,2));const I={onSuccess:()=>{S(!1),n({resource:"doctypes",invalidates:["list","detail"]}),t({to:"/doctypes"})},onError:()=>{S(!1),alert("Failed to save DocType")}};i?c.mutate({resource:"doctypes",values:j,invalidates:[]},I):u.mutate({resource:"doctypes",id:e,values:j,invalidates:[]},I)},[f,i,e,c,u,t,n]);return!i&&s.isLoading?N.jsx("div",{className:"flex items-center justify-center h-64",children:N.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-400"})}):N.jsxs("div",{className:"h-full flex flex-col",children:[N.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${_?"border-zinc-700 bg-zinc-800/50":"border-gray-200 bg-white"}`,children:[N.jsxs("div",{className:"flex items-center gap-4",children:[N.jsx("button",{onClick:()=>t({to:"/doctypes"}),className:`transition-colors ${_?"text-zinc-400 hover:text-white":"text-gray-400 hover:text-gray-600"}`,children:N.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),N.jsx("input",{type:"text",value:f.name,onChange:j=>d(I=>({...I,name:j.target.value})),placeholder:"DocType Name",className:`text-xl font-bold bg-transparent border-none focus:outline-none focus:ring-2 focus:ring-blue-500 rounded px-2 py-1 ${_?"text-white placeholder-zinc-500":"text-gray-900 placeholder-gray-400"}`})]}),N.jsxs("button",{onClick:M,disabled:y||!f.name,className:"px-4 py-2 bg-blue-600 hover:bg-blue-700 disabled:bg-zinc-600 disabled:cursor-not-allowed text-white rounded-lg font-medium transition-colors shadow-sm flex items-center gap-2",children:[y?N.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}):N.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Save"]})]}),N.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[N.jsxs("div",{className:`w-80 border-r flex flex-col ${_?"border-zinc-700 bg-zinc-800/30":"border-gray-200 bg-gray-50"}`,children:[N.jsxs("div",{className:`px-4 h-14 border-b flex items-center justify-between ${_?"border-zinc-700":"border-gray-200"}`,children:[N.jsx("h2",{className:`font-semibold ${_?"text-white":"text-gray-900"}`,children:"Fields"}),N.jsx("button",{onClick:$,className:"px-3 py-1.5 bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium rounded-lg transition-colors shadow-sm",children:"+ Add Field"})]}),N.jsxs("div",{className:"flex-1 overflow-y-auto p-4",children:[N.jsx(SB,{sensors:R,collisionDetection:S5,onDragEnd:C,children:N.jsx(jB,{items:f.fields.map(j=>j._id),strategy:MB,children:N.jsx("div",{className:"space-y-2",children:f.fields.map((j,I)=>N.jsx(XY,{field:j,isSelected:m===I,onSelect:()=>p(I),onDelete:()=>A(I),isDark:_},j._id))})})}),f.fields.length===0&&N.jsx("div",{className:`text-center py-8 ${_?"text-zinc-500":"text-gray-500"}`,children:'No fields yet. Click "Add Field" to start.'})]})]}),N.jsxs("div",{className:`flex-1 flex flex-col overflow-hidden ${_?"bg-zinc-900/50":"bg-white"}`,children:[N.jsxs("div",{className:`flex items-center h-14 border-b ${_?"border-zinc-700":"border-gray-200"}`,children:[N.jsx("button",{onClick:()=>p(m!==null?m:0),className:`px-4 h-full inline-flex items-center text-sm font-medium transition-colors ${m!==null?"text-blue-500 border-b-2 border-blue-500":_?"text-zinc-400 hover:text-zinc-300":"text-gray-500 hover:text-gray-700"}`,children:"Properties"}),N.jsx("button",{onClick:()=>p(null),className:`px-4 h-full inline-flex items-center text-sm font-medium transition-colors ${m===null?"text-blue-500 border-b-2 border-blue-500":_?"text-zinc-400 hover:text-zinc-300":"text-gray-500 hover:text-gray-700"}`,children:"Code Preview"}),N.jsx("button",{onClick:()=>p(-1),className:`px-4 h-full inline-flex items-center text-sm font-medium transition-colors ${m===-1?"text-blue-500 border-b-2 border-blue-500":_?"text-zinc-400 hover:text-zinc-300":"text-gray-500 hover:text-gray-700"}`,children:"Sandbox"}),N.jsx("button",{onClick:()=>p(-2),className:`px-4 h-full inline-flex items-center text-sm font-medium transition-colors ${m===-2?"text-blue-500 border-b-2 border-blue-500":_?"text-zinc-400 hover:text-zinc-300":"text-gray-500 hover:text-gray-700"}`,children:"Controller"})]}),N.jsx("div",{className:"flex-1 overflow-hidden",children:m!==null&&m>=0?N.jsx("div",{className:"h-full overflow-y-auto",children:N.jsx(hQ,{field:f.fields[m],fieldTypes:g,onChange:T},m)}):m===-1?N.jsx(GY,{fields:f.fields,doctypeName:f.name||"DocType"}):m===-2?N.jsx(YY,{doctypeName:f.name||"DocType"}):N.jsx(xY,{schema:f,className:"h-full"})})]})]})]})}RY();function JY(){return N.jsx(t3,{children:N.jsx(kU,{basename:"/studio/ui",children:N.jsx(mq,{children:N.jsxs(R4,{children:[N.jsxs(S4,{dataProvider:gM,routerProvider:YU,resources:[{name:"doctypes",list:"/doctypes",create:"/doctypes/create",edit:"/doctypes/edit/:id",meta:{label:"DocTypes",icon:"📄"}}],options:{syncWithLocation:!0,warnWhenUnsavedChanges:!0,projectId:"framework-m-studio"},children:[N.jsx(mU,{children:N.jsxs(ao,{element:N.jsx(a3,{children:N.jsx(hU,{})}),children:[N.jsx(ao,{index:!0,element:N.jsx(WU,{resource:"doctypes"})}),N.jsxs(ao,{path:"/doctypes",children:[N.jsx(ao,{index:!0,element:N.jsx(r5,{})}),N.jsx(ao,{path:"create",element:N.jsx(o$,{})}),N.jsx(ao,{path:"edit/:id",element:N.jsx(o$,{})})]}),N.jsx(ao,{path:"*",element:N.jsx(c4,{})})]})}),N.jsx(pq,{}),N.jsx(ZU,{}),N.jsx(e3,{})]}),N.jsx(C4,{})]})})})})}const ZY=document.getElementById("root"),eW=nP.createRoot(ZY);eW.render(N.jsx(he.StrictMode,{children:N.jsx(JY,{})}))});export default tW();
|