apiskill 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))l(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function r(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(a){if(a.ep)return;a.ep=!0;const u=r(a);fetch(a.href,u)}})();function qd(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var tu={exports:{}},pi={},nu={exports:{}},je={};/**
1
+ (function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))l(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function r(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(a){if(a.ep)return;a.ep=!0;const u=r(a);fetch(a.href,u)}})();function qd(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var nu={exports:{}},hi={},ru={exports:{}},je={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var vd;function gm(){if(vd)return je;vd=1;var i=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),k=Symbol.iterator;function E(C){return C===null||typeof C!="object"?null:(C=k&&C[k]||C["@@iterator"],typeof C=="function"?C:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,S={};function I(C,M,he){this.props=C,this.context=M,this.refs=S,this.updater=he||O}I.prototype.isReactComponent={},I.prototype.setState=function(C,M){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,M,"setState")},I.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function R(){}R.prototype=I.prototype;function H(C,M,he){this.props=C,this.context=M,this.refs=S,this.updater=he||O}var F=H.prototype=new R;F.constructor=H,b(F,I.prototype),F.isPureReactComponent=!0;var K=Array.isArray,G=Object.prototype.hasOwnProperty,Q={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function U(C,M,he){var J,ye={},pe=null,Ne=null;if(M!=null)for(J in M.ref!==void 0&&(Ne=M.ref),M.key!==void 0&&(pe=""+M.key),M)G.call(M,J)&&!q.hasOwnProperty(J)&&(ye[J]=M[J]);var ke=arguments.length-2;if(ke===1)ye.children=he;else if(1<ke){for(var Ce=Array(ke),Ge=0;Ge<ke;Ge++)Ce[Ge]=arguments[Ge+2];ye.children=Ce}if(C&&C.defaultProps)for(J in ke=C.defaultProps,ke)ye[J]===void 0&&(ye[J]=ke[J]);return{$$typeof:i,type:C,key:pe,ref:Ne,props:ye,_owner:Q.current}}function ae(C,M){return{$$typeof:i,type:C.type,key:M,ref:C.ref,props:C.props,_owner:C._owner}}function D(C){return typeof C=="object"&&C!==null&&C.$$typeof===i}function Z(C){var M={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(he){return M[he]})}var te=/\/+/g;function de(C,M){return typeof C=="object"&&C!==null&&C.key!=null?Z(""+C.key):M.toString(36)}function Ie(C,M,he,J,ye){var pe=typeof C;(pe==="undefined"||pe==="boolean")&&(C=null);var Ne=!1;if(C===null)Ne=!0;else switch(pe){case"string":case"number":Ne=!0;break;case"object":switch(C.$$typeof){case i:case n:Ne=!0}}if(Ne)return Ne=C,ye=ye(Ne),C=J===""?"."+de(Ne,0):J,K(ye)?(he="",C!=null&&(he=C.replace(te,"$&/")+"/"),Ie(ye,M,he,"",function(Ge){return Ge})):ye!=null&&(D(ye)&&(ye=ae(ye,he+(!ye.key||Ne&&Ne.key===ye.key?"":(""+ye.key).replace(te,"$&/")+"/")+C)),M.push(ye)),1;if(Ne=0,J=J===""?".":J+":",K(C))for(var ke=0;ke<C.length;ke++){pe=C[ke];var Ce=J+de(pe,ke);Ne+=Ie(pe,M,he,Ce,ye)}else if(Ce=E(C),typeof Ce=="function")for(C=Ce.call(C),ke=0;!(pe=C.next()).done;)pe=pe.value,Ce=J+de(pe,ke++),Ne+=Ie(pe,M,he,Ce,ye);else if(pe==="object")throw M=String(C),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.");return Ne}function _e(C,M,he){if(C==null)return C;var J=[],ye=0;return Ie(C,J,"","",function(pe){return M.call(he,pe,ye++)}),J}function De(C){if(C._status===-1){var M=C._result;M=M(),M.then(function(he){(C._status===0||C._status===-1)&&(C._status=1,C._result=he)},function(he){(C._status===0||C._status===-1)&&(C._status=2,C._result=he)}),C._status===-1&&(C._status=0,C._result=M)}if(C._status===1)return C._result.default;throw C._result}var xe={current:null},W={transition:null},ne={ReactCurrentDispatcher:xe,ReactCurrentBatchConfig:W,ReactCurrentOwner:Q};function X(){throw Error("act(...) is not supported in production builds of React.")}return je.Children={map:_e,forEach:function(C,M,he){_e(C,function(){M.apply(this,arguments)},he)},count:function(C){var M=0;return _e(C,function(){M++}),M},toArray:function(C){return _e(C,function(M){return M})||[]},only:function(C){if(!D(C))throw Error("React.Children.only expected to receive a single React element child.");return C}},je.Component=I,je.Fragment=r,je.Profiler=a,je.PureComponent=H,je.StrictMode=l,je.Suspense=y,je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,je.act=X,je.cloneElement=function(C,M,he){if(C==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+C+".");var J=b({},C.props),ye=C.key,pe=C.ref,Ne=C._owner;if(M!=null){if(M.ref!==void 0&&(pe=M.ref,Ne=Q.current),M.key!==void 0&&(ye=""+M.key),C.type&&C.type.defaultProps)var ke=C.type.defaultProps;for(Ce in M)G.call(M,Ce)&&!q.hasOwnProperty(Ce)&&(J[Ce]=M[Ce]===void 0&&ke!==void 0?ke[Ce]:M[Ce])}var Ce=arguments.length-2;if(Ce===1)J.children=he;else if(1<Ce){ke=Array(Ce);for(var Ge=0;Ge<Ce;Ge++)ke[Ge]=arguments[Ge+2];J.children=ke}return{$$typeof:i,type:C.type,key:ye,ref:pe,props:J,_owner:Ne}},je.createContext=function(C){return C={$$typeof:d,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},C.Provider={$$typeof:u,_context:C},C.Consumer=C},je.createElement=U,je.createFactory=function(C){var M=U.bind(null,C);return M.type=C,M},je.createRef=function(){return{current:null}},je.forwardRef=function(C){return{$$typeof:h,render:C}},je.isValidElement=D,je.lazy=function(C){return{$$typeof:x,_payload:{_status:-1,_result:C},_init:De}},je.memo=function(C,M){return{$$typeof:g,type:C,compare:M===void 0?null:M}},je.startTransition=function(C){var M=W.transition;W.transition={};try{C()}finally{W.transition=M}},je.unstable_act=X,je.useCallback=function(C,M){return xe.current.useCallback(C,M)},je.useContext=function(C){return xe.current.useContext(C)},je.useDebugValue=function(){},je.useDeferredValue=function(C){return xe.current.useDeferredValue(C)},je.useEffect=function(C,M){return xe.current.useEffect(C,M)},je.useId=function(){return xe.current.useId()},je.useImperativeHandle=function(C,M,he){return xe.current.useImperativeHandle(C,M,he)},je.useInsertionEffect=function(C,M){return xe.current.useInsertionEffect(C,M)},je.useLayoutEffect=function(C,M){return xe.current.useLayoutEffect(C,M)},je.useMemo=function(C,M){return xe.current.useMemo(C,M)},je.useReducer=function(C,M,he){return xe.current.useReducer(C,M,he)},je.useRef=function(C){return xe.current.useRef(C)},je.useState=function(C){return xe.current.useState(C)},je.useSyncExternalStore=function(C,M,he){return xe.current.useSyncExternalStore(C,M,he)},je.useTransition=function(){return xe.current.useTransition()},je.version="18.3.1",je}var wd;function _u(){return wd||(wd=1,nu.exports=gm()),nu.exports}/**
9
+ */var vd;function gm(){if(vd)return je;vd=1;var i=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),k=Symbol.iterator;function E(C){return C===null||typeof C!="object"?null:(C=k&&C[k]||C["@@iterator"],typeof C=="function"?C:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,S={};function I(C,M,he){this.props=C,this.context=M,this.refs=S,this.updater=he||O}I.prototype.isReactComponent={},I.prototype.setState=function(C,M){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,M,"setState")},I.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function R(){}R.prototype=I.prototype;function H(C,M,he){this.props=C,this.context=M,this.refs=S,this.updater=he||O}var F=H.prototype=new R;F.constructor=H,b(F,I.prototype),F.isPureReactComponent=!0;var K=Array.isArray,G=Object.prototype.hasOwnProperty,Q={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function U(C,M,he){var J,ye={},pe=null,Ne=null;if(M!=null)for(J in M.ref!==void 0&&(Ne=M.ref),M.key!==void 0&&(pe=""+M.key),M)G.call(M,J)&&!q.hasOwnProperty(J)&&(ye[J]=M[J]);var ke=arguments.length-2;if(ke===1)ye.children=he;else if(1<ke){for(var Ce=Array(ke),Ge=0;Ge<ke;Ge++)Ce[Ge]=arguments[Ge+2];ye.children=Ce}if(C&&C.defaultProps)for(J in ke=C.defaultProps,ke)ye[J]===void 0&&(ye[J]=ke[J]);return{$$typeof:i,type:C,key:pe,ref:Ne,props:ye,_owner:Q.current}}function ae(C,M){return{$$typeof:i,type:C.type,key:M,ref:C.ref,props:C.props,_owner:C._owner}}function D(C){return typeof C=="object"&&C!==null&&C.$$typeof===i}function Z(C){var M={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(he){return M[he]})}var te=/\/+/g;function de(C,M){return typeof C=="object"&&C!==null&&C.key!=null?Z(""+C.key):M.toString(36)}function Ie(C,M,he,J,ye){var pe=typeof C;(pe==="undefined"||pe==="boolean")&&(C=null);var Ne=!1;if(C===null)Ne=!0;else switch(pe){case"string":case"number":Ne=!0;break;case"object":switch(C.$$typeof){case i:case n:Ne=!0}}if(Ne)return Ne=C,ye=ye(Ne),C=J===""?"."+de(Ne,0):J,K(ye)?(he="",C!=null&&(he=C.replace(te,"$&/")+"/"),Ie(ye,M,he,"",function(Ge){return Ge})):ye!=null&&(D(ye)&&(ye=ae(ye,he+(!ye.key||Ne&&Ne.key===ye.key?"":(""+ye.key).replace(te,"$&/")+"/")+C)),M.push(ye)),1;if(Ne=0,J=J===""?".":J+":",K(C))for(var ke=0;ke<C.length;ke++){pe=C[ke];var Ce=J+de(pe,ke);Ne+=Ie(pe,M,he,Ce,ye)}else if(Ce=E(C),typeof Ce=="function")for(C=Ce.call(C),ke=0;!(pe=C.next()).done;)pe=pe.value,Ce=J+de(pe,ke++),Ne+=Ie(pe,M,he,Ce,ye);else if(pe==="object")throw M=String(C),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.");return Ne}function _e(C,M,he){if(C==null)return C;var J=[],ye=0;return Ie(C,J,"","",function(pe){return M.call(he,pe,ye++)}),J}function De(C){if(C._status===-1){var M=C._result;M=M(),M.then(function(he){(C._status===0||C._status===-1)&&(C._status=1,C._result=he)},function(he){(C._status===0||C._status===-1)&&(C._status=2,C._result=he)}),C._status===-1&&(C._status=0,C._result=M)}if(C._status===1)return C._result.default;throw C._result}var xe={current:null},W={transition:null},ne={ReactCurrentDispatcher:xe,ReactCurrentBatchConfig:W,ReactCurrentOwner:Q};function X(){throw Error("act(...) is not supported in production builds of React.")}return je.Children={map:_e,forEach:function(C,M,he){_e(C,function(){M.apply(this,arguments)},he)},count:function(C){var M=0;return _e(C,function(){M++}),M},toArray:function(C){return _e(C,function(M){return M})||[]},only:function(C){if(!D(C))throw Error("React.Children.only expected to receive a single React element child.");return C}},je.Component=I,je.Fragment=r,je.Profiler=a,je.PureComponent=H,je.StrictMode=l,je.Suspense=y,je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,je.act=X,je.cloneElement=function(C,M,he){if(C==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+C+".");var J=b({},C.props),ye=C.key,pe=C.ref,Ne=C._owner;if(M!=null){if(M.ref!==void 0&&(pe=M.ref,Ne=Q.current),M.key!==void 0&&(ye=""+M.key),C.type&&C.type.defaultProps)var ke=C.type.defaultProps;for(Ce in M)G.call(M,Ce)&&!q.hasOwnProperty(Ce)&&(J[Ce]=M[Ce]===void 0&&ke!==void 0?ke[Ce]:M[Ce])}var Ce=arguments.length-2;if(Ce===1)J.children=he;else if(1<Ce){ke=Array(Ce);for(var Ge=0;Ge<Ce;Ge++)ke[Ge]=arguments[Ge+2];J.children=ke}return{$$typeof:i,type:C.type,key:ye,ref:pe,props:J,_owner:Ne}},je.createContext=function(C){return C={$$typeof:d,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},C.Provider={$$typeof:u,_context:C},C.Consumer=C},je.createElement=U,je.createFactory=function(C){var M=U.bind(null,C);return M.type=C,M},je.createRef=function(){return{current:null}},je.forwardRef=function(C){return{$$typeof:h,render:C}},je.isValidElement=D,je.lazy=function(C){return{$$typeof:x,_payload:{_status:-1,_result:C},_init:De}},je.memo=function(C,M){return{$$typeof:g,type:C,compare:M===void 0?null:M}},je.startTransition=function(C){var M=W.transition;W.transition={};try{C()}finally{W.transition=M}},je.unstable_act=X,je.useCallback=function(C,M){return xe.current.useCallback(C,M)},je.useContext=function(C){return xe.current.useContext(C)},je.useDebugValue=function(){},je.useDeferredValue=function(C){return xe.current.useDeferredValue(C)},je.useEffect=function(C,M){return xe.current.useEffect(C,M)},je.useId=function(){return xe.current.useId()},je.useImperativeHandle=function(C,M,he){return xe.current.useImperativeHandle(C,M,he)},je.useInsertionEffect=function(C,M){return xe.current.useInsertionEffect(C,M)},je.useLayoutEffect=function(C,M){return xe.current.useLayoutEffect(C,M)},je.useMemo=function(C,M){return xe.current.useMemo(C,M)},je.useReducer=function(C,M,he){return xe.current.useReducer(C,M,he)},je.useRef=function(C){return xe.current.useRef(C)},je.useState=function(C){return xe.current.useState(C)},je.useSyncExternalStore=function(C,M,he){return xe.current.useSyncExternalStore(C,M,he)},je.useTransition=function(){return xe.current.useTransition()},je.version="18.3.1",je}var wd;function _u(){return wd||(wd=1,ru.exports=gm()),ru.exports}/**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
12
12
  *
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var kd;function vm(){if(kd)return pi;kd=1;var i=_u(),n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function d(h,y,g){var x,k={},E=null,O=null;g!==void 0&&(E=""+g),y.key!==void 0&&(E=""+y.key),y.ref!==void 0&&(O=y.ref);for(x in y)l.call(y,x)&&!u.hasOwnProperty(x)&&(k[x]=y[x]);if(h&&h.defaultProps)for(x in y=h.defaultProps,y)k[x]===void 0&&(k[x]=y[x]);return{$$typeof:n,type:h,key:E,ref:O,props:k,_owner:a.current}}return pi.Fragment=r,pi.jsx=d,pi.jsxs=d,pi}var Sd;function wm(){return Sd||(Sd=1,tu.exports=vm()),tu.exports}var p=wm(),A=_u();const km=qd(A);var Fl={},ru={exports:{}},Et={},su={exports:{}},iu={};/**
17
+ */var kd;function vm(){if(kd)return hi;kd=1;var i=_u(),n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function d(h,y,g){var x,k={},E=null,O=null;g!==void 0&&(E=""+g),y.key!==void 0&&(E=""+y.key),y.ref!==void 0&&(O=y.ref);for(x in y)l.call(y,x)&&!u.hasOwnProperty(x)&&(k[x]=y[x]);if(h&&h.defaultProps)for(x in y=h.defaultProps,y)k[x]===void 0&&(k[x]=y[x]);return{$$typeof:n,type:h,key:E,ref:O,props:k,_owner:a.current}}return hi.Fragment=r,hi.jsx=d,hi.jsxs=d,hi}var Sd;function wm(){return Sd||(Sd=1,nu.exports=vm()),nu.exports}var p=wm(),A=_u();const km=qd(A);var Fl={},su={exports:{}},Ot={},iu={exports:{}},lu={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -22,7 +22,7 @@
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */var jd;function Sm(){return jd||(jd=1,(function(i){function n(W,ne){var X=W.length;W.push(ne);e:for(;0<X;){var C=X-1>>>1,M=W[C];if(0<a(M,ne))W[C]=ne,W[X]=M,X=C;else break e}}function r(W){return W.length===0?null:W[0]}function l(W){if(W.length===0)return null;var ne=W[0],X=W.pop();if(X!==ne){W[0]=X;e:for(var C=0,M=W.length,he=M>>>1;C<he;){var J=2*(C+1)-1,ye=W[J],pe=J+1,Ne=W[pe];if(0>a(ye,X))pe<M&&0>a(Ne,ye)?(W[C]=Ne,W[pe]=X,C=pe):(W[C]=ye,W[J]=X,C=J);else if(pe<M&&0>a(Ne,X))W[C]=Ne,W[pe]=X,C=pe;else break e}}return ne}function a(W,ne){var X=W.sortIndex-ne.sortIndex;return X!==0?X:W.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;i.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();i.unstable_now=function(){return d.now()-h}}var y=[],g=[],x=1,k=null,E=3,O=!1,b=!1,S=!1,I=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(W){for(var ne=r(g);ne!==null;){if(ne.callback===null)l(g);else if(ne.startTime<=W)l(g),ne.sortIndex=ne.expirationTime,n(y,ne);else break;ne=r(g)}}function K(W){if(S=!1,F(W),!b)if(r(y)!==null)b=!0,De(G);else{var ne=r(g);ne!==null&&xe(K,ne.startTime-W)}}function G(W,ne){b=!1,S&&(S=!1,R(U),U=-1),O=!0;var X=E;try{for(F(ne),k=r(y);k!==null&&(!(k.expirationTime>ne)||W&&!Z());){var C=k.callback;if(typeof C=="function"){k.callback=null,E=k.priorityLevel;var M=C(k.expirationTime<=ne);ne=i.unstable_now(),typeof M=="function"?k.callback=M:k===r(y)&&l(y),F(ne)}else l(y);k=r(y)}if(k!==null)var he=!0;else{var J=r(g);J!==null&&xe(K,J.startTime-ne),he=!1}return he}finally{k=null,E=X,O=!1}}var Q=!1,q=null,U=-1,ae=5,D=-1;function Z(){return!(i.unstable_now()-D<ae)}function te(){if(q!==null){var W=i.unstable_now();D=W;var ne=!0;try{ne=q(!0,W)}finally{ne?de():(Q=!1,q=null)}}else Q=!1}var de;if(typeof H=="function")de=function(){H(te)};else if(typeof MessageChannel<"u"){var Ie=new MessageChannel,_e=Ie.port2;Ie.port1.onmessage=te,de=function(){_e.postMessage(null)}}else de=function(){I(te,0)};function De(W){q=W,Q||(Q=!0,de())}function xe(W,ne){U=I(function(){W(i.unstable_now())},ne)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(W){W.callback=null},i.unstable_continueExecution=function(){b||O||(b=!0,De(G))},i.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<W?Math.floor(1e3/W):5},i.unstable_getCurrentPriorityLevel=function(){return E},i.unstable_getFirstCallbackNode=function(){return r(y)},i.unstable_next=function(W){switch(E){case 1:case 2:case 3:var ne=3;break;default:ne=E}var X=E;E=ne;try{return W()}finally{E=X}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(W,ne){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var X=E;E=W;try{return ne()}finally{E=X}},i.unstable_scheduleCallback=function(W,ne,X){var C=i.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?C+X:C):X=C,W){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=X+M,W={id:x++,callback:ne,priorityLevel:W,startTime:X,expirationTime:M,sortIndex:-1},X>C?(W.sortIndex=X,n(g,W),r(y)===null&&W===r(g)&&(S?(R(U),U=-1):S=!0,xe(K,X-C))):(W.sortIndex=M,n(y,W),b||O||(b=!0,De(G))),W},i.unstable_shouldYield=Z,i.unstable_wrapCallback=function(W){var ne=E;return function(){var X=E;E=ne;try{return W.apply(this,arguments)}finally{E=X}}}})(iu)),iu}var xd;function jm(){return xd||(xd=1,su.exports=Sm()),su.exports}/**
25
+ */var jd;function Sm(){return jd||(jd=1,(function(i){function n(W,ne){var X=W.length;W.push(ne);e:for(;0<X;){var C=X-1>>>1,M=W[C];if(0<a(M,ne))W[C]=ne,W[X]=M,X=C;else break e}}function r(W){return W.length===0?null:W[0]}function l(W){if(W.length===0)return null;var ne=W[0],X=W.pop();if(X!==ne){W[0]=X;e:for(var C=0,M=W.length,he=M>>>1;C<he;){var J=2*(C+1)-1,ye=W[J],pe=J+1,Ne=W[pe];if(0>a(ye,X))pe<M&&0>a(Ne,ye)?(W[C]=Ne,W[pe]=X,C=pe):(W[C]=ye,W[J]=X,C=J);else if(pe<M&&0>a(Ne,X))W[C]=Ne,W[pe]=X,C=pe;else break e}}return ne}function a(W,ne){var X=W.sortIndex-ne.sortIndex;return X!==0?X:W.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;i.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();i.unstable_now=function(){return d.now()-h}}var y=[],g=[],x=1,k=null,E=3,O=!1,b=!1,S=!1,I=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(W){for(var ne=r(g);ne!==null;){if(ne.callback===null)l(g);else if(ne.startTime<=W)l(g),ne.sortIndex=ne.expirationTime,n(y,ne);else break;ne=r(g)}}function K(W){if(S=!1,F(W),!b)if(r(y)!==null)b=!0,De(G);else{var ne=r(g);ne!==null&&xe(K,ne.startTime-W)}}function G(W,ne){b=!1,S&&(S=!1,R(U),U=-1),O=!0;var X=E;try{for(F(ne),k=r(y);k!==null&&(!(k.expirationTime>ne)||W&&!Z());){var C=k.callback;if(typeof C=="function"){k.callback=null,E=k.priorityLevel;var M=C(k.expirationTime<=ne);ne=i.unstable_now(),typeof M=="function"?k.callback=M:k===r(y)&&l(y),F(ne)}else l(y);k=r(y)}if(k!==null)var he=!0;else{var J=r(g);J!==null&&xe(K,J.startTime-ne),he=!1}return he}finally{k=null,E=X,O=!1}}var Q=!1,q=null,U=-1,ae=5,D=-1;function Z(){return!(i.unstable_now()-D<ae)}function te(){if(q!==null){var W=i.unstable_now();D=W;var ne=!0;try{ne=q(!0,W)}finally{ne?de():(Q=!1,q=null)}}else Q=!1}var de;if(typeof H=="function")de=function(){H(te)};else if(typeof MessageChannel<"u"){var Ie=new MessageChannel,_e=Ie.port2;Ie.port1.onmessage=te,de=function(){_e.postMessage(null)}}else de=function(){I(te,0)};function De(W){q=W,Q||(Q=!0,de())}function xe(W,ne){U=I(function(){W(i.unstable_now())},ne)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(W){W.callback=null},i.unstable_continueExecution=function(){b||O||(b=!0,De(G))},i.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<W?Math.floor(1e3/W):5},i.unstable_getCurrentPriorityLevel=function(){return E},i.unstable_getFirstCallbackNode=function(){return r(y)},i.unstable_next=function(W){switch(E){case 1:case 2:case 3:var ne=3;break;default:ne=E}var X=E;E=ne;try{return W()}finally{E=X}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(W,ne){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var X=E;E=W;try{return ne()}finally{E=X}},i.unstable_scheduleCallback=function(W,ne,X){var C=i.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?C+X:C):X=C,W){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=X+M,W={id:x++,callback:ne,priorityLevel:W,startTime:X,expirationTime:M,sortIndex:-1},X>C?(W.sortIndex=X,n(g,W),r(y)===null&&W===r(g)&&(S?(R(U),U=-1):S=!0,xe(K,X-C))):(W.sortIndex=M,n(y,W),b||O||(b=!0,De(G))),W},i.unstable_shouldYield=Z,i.unstable_wrapCallback=function(W){var ne=E;return function(){var X=E;E=ne;try{return W.apply(this,arguments)}finally{E=X}}}})(lu)),lu}var xd;function jm(){return xd||(xd=1,iu.exports=Sm()),iu.exports}/**
26
26
  * @license React
27
27
  * react-dom.production.min.js
28
28
  *
@@ -30,14 +30,14 @@
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var Nd;function xm(){if(Nd)return Et;Nd=1;var i=_u(),n=jm();function r(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=new Set,a={};function u(e,t){d(e,t),d(e+"Capture",t)}function d(e,t){for(a[e]=t,e=0;e<t.length;e++)l.add(t[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y=Object.prototype.hasOwnProperty,g=/^[: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]*$/,x={},k={};function E(e){return y.call(k,e)?!0:y.call(x,e)?!1:g.test(e)?k[e]=!0:(x[e]=!0,!1)}function O(e,t,s,o){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function b(e,t,s,o){if(t===null||typeof t>"u"||O(e,t,s,o))return!0;if(o)return!1;if(s!==null)switch(s.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function S(e,t,s,o,c,f,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=c,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=f,this.removeEmptyString=m}var I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){I[e]=new S(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];I[t]=new S(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){I[e]=new S(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){I[e]=new S(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){I[e]=new S(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){I[e]=new S(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){I[e]=new S(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){I[e]=new S(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){I[e]=new S(e,5,!1,e.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function H(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(R,H);I[t]=new S(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(R,H);I[t]=new S(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(R,H);I[t]=new S(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){I[e]=new S(e,1,!1,e.toLowerCase(),null,!1,!1)}),I.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){I[e]=new S(e,1,!1,e.toLowerCase(),null,!0,!0)});function F(e,t,s,o){var c=I.hasOwnProperty(t)?I[t]:null;(c!==null?c.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(b(t,s,c,o)&&(s=null),o||c===null?E(t)&&(s===null?e.removeAttribute(t):e.setAttribute(t,""+s)):c.mustUseProperty?e[c.propertyName]=s===null?c.type===3?!1:"":s:(t=c.attributeName,o=c.attributeNamespace,s===null?e.removeAttribute(t):(c=c.type,s=c===3||c===4&&s===!0?"":""+s,o?e.setAttributeNS(o,t,s):e.setAttribute(t,s))))}var K=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,G=Symbol.for("react.element"),Q=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),ae=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),Z=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),Ie=Symbol.for("react.suspense_list"),_e=Symbol.for("react.memo"),De=Symbol.for("react.lazy"),xe=Symbol.for("react.offscreen"),W=Symbol.iterator;function ne(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var X=Object.assign,C;function M(e){if(C===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);C=t&&t[1]||""}return`
33
+ */var Nd;function xm(){if(Nd)return Ot;Nd=1;var i=_u(),n=jm();function r(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=new Set,a={};function u(e,t){d(e,t),d(e+"Capture",t)}function d(e,t){for(a[e]=t,e=0;e<t.length;e++)l.add(t[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y=Object.prototype.hasOwnProperty,g=/^[: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]*$/,x={},k={};function E(e){return y.call(k,e)?!0:y.call(x,e)?!1:g.test(e)?k[e]=!0:(x[e]=!0,!1)}function O(e,t,s,o){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function b(e,t,s,o){if(t===null||typeof t>"u"||O(e,t,s,o))return!0;if(o)return!1;if(s!==null)switch(s.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function S(e,t,s,o,c,f,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=c,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=f,this.removeEmptyString=m}var I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){I[e]=new S(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];I[t]=new S(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){I[e]=new S(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){I[e]=new S(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){I[e]=new S(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){I[e]=new S(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){I[e]=new S(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){I[e]=new S(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){I[e]=new S(e,5,!1,e.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function H(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(R,H);I[t]=new S(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(R,H);I[t]=new S(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(R,H);I[t]=new S(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){I[e]=new S(e,1,!1,e.toLowerCase(),null,!1,!1)}),I.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){I[e]=new S(e,1,!1,e.toLowerCase(),null,!0,!0)});function F(e,t,s,o){var c=I.hasOwnProperty(t)?I[t]:null;(c!==null?c.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(b(t,s,c,o)&&(s=null),o||c===null?E(t)&&(s===null?e.removeAttribute(t):e.setAttribute(t,""+s)):c.mustUseProperty?e[c.propertyName]=s===null?c.type===3?!1:"":s:(t=c.attributeName,o=c.attributeNamespace,s===null?e.removeAttribute(t):(c=c.type,s=c===3||c===4&&s===!0?"":""+s,o?e.setAttributeNS(o,t,s):e.setAttribute(t,s))))}var K=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,G=Symbol.for("react.element"),Q=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),ae=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),Z=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),Ie=Symbol.for("react.suspense_list"),_e=Symbol.for("react.memo"),De=Symbol.for("react.lazy"),xe=Symbol.for("react.offscreen"),W=Symbol.iterator;function ne(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var X=Object.assign,C;function M(e){if(C===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);C=t&&t[1]||""}return`
34
34
  `+C+e}var he=!1;function J(e,t){if(!e||he)return"";he=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(L){var o=L}Reflect.construct(e,[],t)}else{try{t.call()}catch(L){o=L}e.call(t.prototype)}else{try{throw Error()}catch(L){o=L}e()}}catch(L){if(L&&o&&typeof L.stack=="string"){for(var c=L.stack.split(`
35
35
  `),f=o.stack.split(`
36
36
  `),m=c.length-1,v=f.length-1;1<=m&&0<=v&&c[m]!==f[v];)v--;for(;1<=m&&0<=v;m--,v--)if(c[m]!==f[v]){if(m!==1||v!==1)do if(m--,v--,0>v||c[m]!==f[v]){var w=`
37
- `+c[m].replace(" at new "," at ");return e.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",e.displayName)),w}while(1<=m&&0<=v);break}}}finally{he=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?M(e):""}function ye(e){switch(e.tag){case 5:return M(e.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return e=J(e.type,!1),e;case 11:return e=J(e.type.render,!1),e;case 1:return e=J(e.type,!0),e;default:return""}}function pe(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case q:return"Fragment";case Q:return"Portal";case ae:return"Profiler";case U:return"StrictMode";case de:return"Suspense";case Ie:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Z:return(e.displayName||"Context")+".Consumer";case D:return(e._context.displayName||"Context")+".Provider";case te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _e:return t=e.displayName||null,t!==null?t:pe(e.type)||"Memo";case De:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}function Ne(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(t);case 8:return t===U?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ke(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ce(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ge(e){var t=Ce(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,f=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(m){o=""+m,f.call(this,m)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(m){o=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function rn(e){e._valueTracker||(e._valueTracker=Ge(e))}function sr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),o="";return e&&(o=Ce(e)?e.checked?"true":"false":e.value),e=o,e!==s?(t.setValue(e),!0):!1}function Y(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Se(e,t){var s=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function st(e,t){var s=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;s=ke(t.value!=null?t.value:s),e._wrapperState={initialChecked:o,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Je(e,t){t=t.checked,t!=null&&F(e,"checked",t,!1)}function it(e,t){Je(e,t);var s=ke(t.value),o=t.type;if(s!=null)o==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Tn(e,t.type,s):t.hasOwnProperty("defaultValue")&&Tn(e,t.type,ke(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sn(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,s||t===e.value||(e.value=t),e.defaultValue=t}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function Tn(e,t,s){(t!=="number"||Y(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var _n=Array.isArray;function pn(e,t,s,o){if(e=e.options,t){t={};for(var c=0;c<s.length;c++)t["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=t.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&o&&(e[s].defaultSelected=!0)}else{for(s=""+ke(s),t=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,o&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Cs(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return X({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Es(e,t){var s=t.value;if(s==null){if(s=t.children,t=t.defaultValue,s!=null){if(t!=null)throw Error(r(92));if(_n(s)){if(1<s.length)throw Error(r(93));s=s[0]}t=s}t==null&&(t=""),s=t}e._wrapperState={initialValue:ke(s)}}function at(e,t){var s=ke(t.value),o=ke(t.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),t.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),o!=null&&(e.defaultValue=""+o)}function kt(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ot(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ir(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ot(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ir,lr=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,s,o,c){MSApp.execUnsafeLocalFunction(function(){return e(t,s,o,c)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ir=Ir||document.createElement("div"),Ir.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ir.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Pt(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var In={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Lr=["Webkit","ms","Moz","O"];Object.keys(In).forEach(function(e){Lr.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),In[t]=In[e]})});function or(e,t,s){return t==null||typeof t=="boolean"||t===""?"":s||typeof t!="number"||t===0||In.hasOwnProperty(e)&&In[e]?(""+t).trim():t+"px"}function Ar(e,t){e=e.style;for(var s in t)if(t.hasOwnProperty(s)){var o=s.indexOf("--")===0,c=or(s,t[s],o);s==="float"&&(s="cssFloat"),o?e.setProperty(s,c):e[s]=c}}var bi=X({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Os(e,t){if(t){if(bi[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!="object")throw Error(r(62))}}function Ln(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ts=null;function An(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _s=null,hn=null,Pn=null;function ar(e){if(e=Xs(e)){if(typeof _s!="function")throw Error(r(280));var t=e.stateNode;t&&(t=rl(t),_s(e.stateNode,e.type,t))}}function Pr(e){hn?Pn?Pn.push(e):Pn=[e]:hn=e}function bt(){if(hn){var e=hn,t=Pn;if(Pn=hn=null,ar(e),t)for(e=0;e<t.length;e++)ar(t[e])}}function Wt(e,t){return e(t)}function br(){}var mn=!1;function Le(e,t,s){if(mn)return e(t,s);mn=!0;try{return Wt(e,t,s)}finally{mn=!1,(hn!==null||Pn!==null)&&(br(),bt())}}function ln(e,t){var s=e.stateNode;if(s===null)return null;var o=rl(s);if(o===null)return null;s=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(r(231,t,typeof s));return s}var Is=!1;if(h)try{var ur={};Object.defineProperty(ur,"passive",{get:function(){Is=!0}}),window.addEventListener("test",ur,ur),window.removeEventListener("test",ur,ur)}catch{Is=!1}function Mr(e,t,s,o,c,f,m,v,w){var L=Array.prototype.slice.call(arguments,3);try{t.apply(s,L)}catch(z){this.onError(z)}}var Mt=!1,bn=null,Rr=!1,Mn=null,Ls={onError:function(e){Mt=!0,bn=e}};function vo(e,t,s,o,c,f,m,v,w){Mt=!1,bn=null,Mr.apply(Ls,arguments)}function As(e,t,s,o,c,f,m,v,w){if(vo.apply(this,arguments),Mt){if(Mt){var L=bn;Mt=!1,bn=null}else throw Error(r(198));Rr||(Rr=!0,Mn=L)}}function yn(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function Mi(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Ps(e){if(yn(e)!==e)throw Error(r(188))}function wo(e){var t=e.alternate;if(!t){if(t=yn(e),t===null)throw Error(r(188));return t!==e?null:e}for(var s=e,o=t;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(o=c.return,o!==null){s=o;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return Ps(c),e;if(f===o)return Ps(c),t;f=f.sibling}throw Error(r(188))}if(s.return!==o.return)s=c,o=f;else{for(var m=!1,v=c.child;v;){if(v===s){m=!0,s=c,o=f;break}if(v===o){m=!0,o=c,s=f;break}v=v.sibling}if(!m){for(v=f.child;v;){if(v===s){m=!0,s=f,o=c;break}if(v===o){m=!0,o=f,s=c;break}v=v.sibling}if(!m)throw Error(r(189))}}if(s.alternate!==o)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?e:t}function Ri(e){return e=wo(e),e!==null?$i(e):null}function $i(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=$i(e);if(t!==null)return t;e=e.sibling}return null}var Di=n.unstable_scheduleCallback,$r=n.unstable_cancelCallback,ko=n.unstable_shouldYield,So=n.unstable_requestPaint,ze=n.unstable_now,jo=n.unstable_getCurrentPriorityLevel,bs=n.unstable_ImmediatePriority,zi=n.unstable_UserBlockingPriority,Dr=n.unstable_NormalPriority,xo=n.unstable_LowPriority,Bi=n.unstable_IdlePriority,gn=null,Rt=null;function N(e){if(Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(gn,e,void 0,(e.current.flags&128)===128)}catch{}}var P=Math.clz32?Math.clz32:we,le=Math.log,ge=Math.LN2;function we(e){return e>>>=0,e===0?32:31-(le(e)/ge|0)|0}var fe=64,Ve=4194304;function Oe(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function mt(e,t){var s=e.pendingLanes;if(s===0)return 0;var o=0,c=e.suspendedLanes,f=e.pingedLanes,m=s&268435455;if(m!==0){var v=m&~c;v!==0?o=Oe(v):(f&=m,f!==0&&(o=Oe(f)))}else m=s&~c,m!==0?o=Oe(m):f!==0&&(o=Oe(f));if(o===0)return 0;if(t!==0&&t!==o&&(t&c)===0&&(c=o&-o,f=t&-t,c>=f||c===16&&(f&4194240)!==0))return t;if((o&4)!==0&&(o|=s&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)s=31-P(t),c=1<<s,o|=e[s],t&=~c;return o}function Ui(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ut(e,t){for(var s=e.suspendedLanes,o=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes;0<f;){var m=31-P(f),v=1<<m,w=c[m];w===-1?((v&s)===0||(v&o)!==0)&&(c[m]=Ui(v,t)):w<=t&&(e.expiredLanes|=v),f&=~v}}function $t(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ms(){var e=fe;return fe<<=1,(fe&4194240)===0&&(fe=64),e}function zr(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function Qt(e,t,s){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-P(t),e[t]=s}function Dp(e,t){var s=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<s;){var c=31-P(s),f=1<<c;t[c]=0,o[c]=-1,e[c]=-1,s&=~f}}function No(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var o=31-P(s),c=1<<o;c&t|e[o]&t&&(e[o]|=t),s&=~c}}var Ae=0;function Ju(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Yu,Co,Gu,Xu,Zu,Eo=!1,Fi=[],Rn=null,$n=null,Dn=null,Rs=new Map,$s=new Map,zn=[],zp="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 submit".split(" ");function ec(e,t){switch(e){case"focusin":case"focusout":Rn=null;break;case"dragenter":case"dragleave":$n=null;break;case"mouseover":case"mouseout":Dn=null;break;case"pointerover":case"pointerout":Rs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$s.delete(t.pointerId)}}function Ds(e,t,s,o,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:s,eventSystemFlags:o,nativeEvent:f,targetContainers:[c]},t!==null&&(t=Xs(t),t!==null&&Co(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Bp(e,t,s,o,c){switch(t){case"focusin":return Rn=Ds(Rn,e,t,s,o,c),!0;case"dragenter":return $n=Ds($n,e,t,s,o,c),!0;case"mouseover":return Dn=Ds(Dn,e,t,s,o,c),!0;case"pointerover":var f=c.pointerId;return Rs.set(f,Ds(Rs.get(f)||null,e,t,s,o,c)),!0;case"gotpointercapture":return f=c.pointerId,$s.set(f,Ds($s.get(f)||null,e,t,s,o,c)),!0}return!1}function tc(e){var t=cr(e.target);if(t!==null){var s=yn(t);if(s!==null){if(t=s.tag,t===13){if(t=Mi(s),t!==null){e.blockedOn=t,Zu(e.priority,function(){Gu(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Vi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=To(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var o=new s.constructor(s.type,s);Ts=o,s.target.dispatchEvent(o),Ts=null}else return t=Xs(s),t!==null&&Co(t),e.blockedOn=s,!1;t.shift()}return!0}function nc(e,t,s){Vi(e)&&s.delete(t)}function Up(){Eo=!1,Rn!==null&&Vi(Rn)&&(Rn=null),$n!==null&&Vi($n)&&($n=null),Dn!==null&&Vi(Dn)&&(Dn=null),Rs.forEach(nc),$s.forEach(nc)}function zs(e,t){e.blockedOn===t&&(e.blockedOn=null,Eo||(Eo=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Up)))}function Bs(e){function t(c){return zs(c,e)}if(0<Fi.length){zs(Fi[0],e);for(var s=1;s<Fi.length;s++){var o=Fi[s];o.blockedOn===e&&(o.blockedOn=null)}}for(Rn!==null&&zs(Rn,e),$n!==null&&zs($n,e),Dn!==null&&zs(Dn,e),Rs.forEach(t),$s.forEach(t),s=0;s<zn.length;s++)o=zn[s],o.blockedOn===e&&(o.blockedOn=null);for(;0<zn.length&&(s=zn[0],s.blockedOn===null);)tc(s),s.blockedOn===null&&zn.shift()}var Br=K.ReactCurrentBatchConfig,Ki=!0;function Fp(e,t,s,o){var c=Ae,f=Br.transition;Br.transition=null;try{Ae=1,Oo(e,t,s,o)}finally{Ae=c,Br.transition=f}}function Vp(e,t,s,o){var c=Ae,f=Br.transition;Br.transition=null;try{Ae=4,Oo(e,t,s,o)}finally{Ae=c,Br.transition=f}}function Oo(e,t,s,o){if(Ki){var c=To(e,t,s,o);if(c===null)qo(e,t,o,qi,s),ec(e,o);else if(Bp(c,e,t,s,o))o.stopPropagation();else if(ec(e,o),t&4&&-1<zp.indexOf(e)){for(;c!==null;){var f=Xs(c);if(f!==null&&Yu(f),f=To(e,t,s,o),f===null&&qo(e,t,o,qi,s),f===c)break;c=f}c!==null&&o.stopPropagation()}else qo(e,t,o,null,s)}}var qi=null;function To(e,t,s,o){if(qi=null,e=An(o),e=cr(e),e!==null)if(t=yn(e),t===null)e=null;else if(s=t.tag,s===13){if(e=Mi(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return qi=e,null}function rc(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(jo()){case bs:return 1;case zi:return 4;case Dr:case xo:return 16;case Bi:return 536870912;default:return 16}default:return 16}}var Bn=null,_o=null,Hi=null;function sc(){if(Hi)return Hi;var e,t=_o,s=t.length,o,c="value"in Bn?Bn.value:Bn.textContent,f=c.length;for(e=0;e<s&&t[e]===c[e];e++);var m=s-e;for(o=1;o<=m&&t[s-o]===c[f-o];o++);return Hi=c.slice(e,1<o?1-o:void 0)}function Wi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Qi(){return!0}function ic(){return!1}function Tt(e){function t(s,o,c,f,m){this._reactName=s,this._targetInst=c,this.type=o,this.nativeEvent=f,this.target=m,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(s=e[v],this[v]=s?s(f):f[v]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Qi:ic,this.isPropagationStopped=ic,this}return X(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Qi)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Qi)},persist:function(){},isPersistent:Qi}),t}var Ur={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Io=Tt(Ur),Us=X({},Ur,{view:0,detail:0}),Kp=Tt(Us),Lo,Ao,Fs,Ji=X({},Us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bo,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Fs&&(Fs&&e.type==="mousemove"?(Lo=e.screenX-Fs.screenX,Ao=e.screenY-Fs.screenY):Ao=Lo=0,Fs=e),Lo)},movementY:function(e){return"movementY"in e?e.movementY:Ao}}),lc=Tt(Ji),qp=X({},Ji,{dataTransfer:0}),Hp=Tt(qp),Wp=X({},Us,{relatedTarget:0}),Po=Tt(Wp),Qp=X({},Ur,{animationName:0,elapsedTime:0,pseudoElement:0}),Jp=Tt(Qp),Yp=X({},Ur,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gp=Tt(Yp),Xp=X({},Ur,{data:0}),oc=Tt(Xp),Zp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eh={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"},th={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=th[e])?!!t[e]:!1}function bo(){return nh}var rh=X({},Us,{key:function(e){if(e.key){var t=Zp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Wi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?eh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bo,charCode:function(e){return e.type==="keypress"?Wi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sh=Tt(rh),ih=X({},Ji,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ac=Tt(ih),lh=X({},Us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bo}),oh=Tt(lh),ah=X({},Ur,{propertyName:0,elapsedTime:0,pseudoElement:0}),uh=Tt(ah),ch=X({},Ji,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),fh=Tt(ch),dh=[9,13,27,32],Mo=h&&"CompositionEvent"in window,Vs=null;h&&"documentMode"in document&&(Vs=document.documentMode);var ph=h&&"TextEvent"in window&&!Vs,uc=h&&(!Mo||Vs&&8<Vs&&11>=Vs),cc=" ",fc=!1;function dc(e,t){switch(e){case"keyup":return dh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fr=!1;function hh(e,t){switch(e){case"compositionend":return pc(t);case"keypress":return t.which!==32?null:(fc=!0,cc);case"textInput":return e=t.data,e===cc&&fc?null:e;default:return null}}function mh(e,t){if(Fr)return e==="compositionend"||!Mo&&dc(e,t)?(e=sc(),Hi=_o=Bn=null,Fr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return uc&&t.locale!=="ko"?null:t.data;default:return null}}var yh={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 hc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!yh[e.type]:t==="textarea"}function mc(e,t,s,o){Pr(o),t=el(t,"onChange"),0<t.length&&(s=new Io("onChange","change",null,s,o),e.push({event:s,listeners:t}))}var Ks=null,qs=null;function gh(e){Pc(e,0)}function Yi(e){var t=Wr(e);if(sr(t))return e}function vh(e,t){if(e==="change")return t}var yc=!1;if(h){var Ro;if(h){var $o="oninput"in document;if(!$o){var gc=document.createElement("div");gc.setAttribute("oninput","return;"),$o=typeof gc.oninput=="function"}Ro=$o}else Ro=!1;yc=Ro&&(!document.documentMode||9<document.documentMode)}function vc(){Ks&&(Ks.detachEvent("onpropertychange",wc),qs=Ks=null)}function wc(e){if(e.propertyName==="value"&&Yi(qs)){var t=[];mc(t,qs,e,An(e)),Le(gh,t)}}function wh(e,t,s){e==="focusin"?(vc(),Ks=t,qs=s,Ks.attachEvent("onpropertychange",wc)):e==="focusout"&&vc()}function kh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yi(qs)}function Sh(e,t){if(e==="click")return Yi(t)}function jh(e,t){if(e==="input"||e==="change")return Yi(t)}function xh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Jt=typeof Object.is=="function"?Object.is:xh;function Hs(e,t){if(Jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),o=Object.keys(t);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var c=s[o];if(!y.call(t,c)||!Jt(e[c],t[c]))return!1}return!0}function kc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sc(e,t){var s=kc(e);e=0;for(var o;s;){if(s.nodeType===3){if(o=e+s.textContent.length,e<=t&&o>=t)return{node:s,offset:t-e};e=o}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=kc(s)}}function jc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xc(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=Y(e.document)}return t}function Do(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Nh(e){var t=xc(),s=e.focusedElem,o=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&jc(s.ownerDocument.documentElement,s)){if(o!==null&&Do(s)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in s)s.selectionStart=t,s.selectionEnd=Math.min(e,s.value.length);else if(e=(t=s.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var c=s.textContent.length,f=Math.min(o.start,c);o=o.end===void 0?f:Math.min(o.end,c),!e.extend&&f>o&&(c=o,o=f,f=c),c=Sc(s,f);var m=Sc(s,o);c&&m&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(c.node,c.offset),e.removeAllRanges(),f>o?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),e.addRange(t)))}}for(t=[],e=s;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<t.length;s++)e=t[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ch=h&&"documentMode"in document&&11>=document.documentMode,Vr=null,zo=null,Ws=null,Bo=!1;function Nc(e,t,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Bo||Vr==null||Vr!==Y(o)||(o=Vr,"selectionStart"in o&&Do(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Ws&&Hs(Ws,o)||(Ws=o,o=el(zo,"onSelect"),0<o.length&&(t=new Io("onSelect","select",null,t,s),e.push({event:t,listeners:o}),t.target=Vr)))}function Gi(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Kr={animationend:Gi("Animation","AnimationEnd"),animationiteration:Gi("Animation","AnimationIteration"),animationstart:Gi("Animation","AnimationStart"),transitionend:Gi("Transition","TransitionEnd")},Uo={},Cc={};h&&(Cc=document.createElement("div").style,"AnimationEvent"in window||(delete Kr.animationend.animation,delete Kr.animationiteration.animation,delete Kr.animationstart.animation),"TransitionEvent"in window||delete Kr.transitionend.transition);function Xi(e){if(Uo[e])return Uo[e];if(!Kr[e])return e;var t=Kr[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in Cc)return Uo[e]=t[s];return e}var Ec=Xi("animationend"),Oc=Xi("animationiteration"),Tc=Xi("animationstart"),_c=Xi("transitionend"),Ic=new Map,Lc="abort auxClick 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(" ");function Un(e,t){Ic.set(e,t),u(t,[e])}for(var Fo=0;Fo<Lc.length;Fo++){var Vo=Lc[Fo],Eh=Vo.toLowerCase(),Oh=Vo[0].toUpperCase()+Vo.slice(1);Un(Eh,"on"+Oh)}Un(Ec,"onAnimationEnd"),Un(Oc,"onAnimationIteration"),Un(Tc,"onAnimationStart"),Un("dblclick","onDoubleClick"),Un("focusin","onFocus"),Un("focusout","onBlur"),Un(_c,"onTransitionEnd"),d("onMouseEnter",["mouseout","mouseover"]),d("onMouseLeave",["mouseout","mouseover"]),d("onPointerEnter",["pointerout","pointerover"]),d("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qs="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(" "),Th=new Set("cancel close invalid load scroll toggle".split(" ").concat(Qs));function Ac(e,t,s){var o=e.type||"unknown-event";e.currentTarget=s,As(o,t,void 0,e),e.currentTarget=null}function Pc(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var o=e[s],c=o.event;o=o.listeners;e:{var f=void 0;if(t)for(var m=o.length-1;0<=m;m--){var v=o[m],w=v.instance,L=v.currentTarget;if(v=v.listener,w!==f&&c.isPropagationStopped())break e;Ac(c,v,L),f=w}else for(m=0;m<o.length;m++){if(v=o[m],w=v.instance,L=v.currentTarget,v=v.listener,w!==f&&c.isPropagationStopped())break e;Ac(c,v,L),f=w}}}if(Rr)throw e=Mn,Rr=!1,Mn=null,e}function Me(e,t){var s=t[Go];s===void 0&&(s=t[Go]=new Set);var o=e+"__bubble";s.has(o)||(bc(t,e,2,!1),s.add(o))}function Ko(e,t,s){var o=0;t&&(o|=4),bc(s,e,o,t)}var Zi="_reactListening"+Math.random().toString(36).slice(2);function Js(e){if(!e[Zi]){e[Zi]=!0,l.forEach(function(s){s!=="selectionchange"&&(Th.has(s)||Ko(s,!1,e),Ko(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zi]||(t[Zi]=!0,Ko("selectionchange",!1,t))}}function bc(e,t,s,o){switch(rc(t)){case 1:var c=Fp;break;case 4:c=Vp;break;default:c=Oo}s=c.bind(null,t,s,e),c=void 0,!Is||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),o?c!==void 0?e.addEventListener(t,s,{capture:!0,passive:c}):e.addEventListener(t,s,!0):c!==void 0?e.addEventListener(t,s,{passive:c}):e.addEventListener(t,s,!1)}function qo(e,t,s,o,c){var f=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var m=o.tag;if(m===3||m===4){var v=o.stateNode.containerInfo;if(v===c||v.nodeType===8&&v.parentNode===c)break;if(m===4)for(m=o.return;m!==null;){var w=m.tag;if((w===3||w===4)&&(w=m.stateNode.containerInfo,w===c||w.nodeType===8&&w.parentNode===c))return;m=m.return}for(;v!==null;){if(m=cr(v),m===null)return;if(w=m.tag,w===5||w===6){o=f=m;continue e}v=v.parentNode}}o=o.return}Le(function(){var L=f,z=An(s),B=[];e:{var $=Ic.get(e);if($!==void 0){var ee=Io,se=e;switch(e){case"keypress":if(Wi(s)===0)break e;case"keydown":case"keyup":ee=sh;break;case"focusin":se="focus",ee=Po;break;case"focusout":se="blur",ee=Po;break;case"beforeblur":case"afterblur":ee=Po;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=lc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=Hp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=oh;break;case Ec:case Oc:case Tc:ee=Jp;break;case _c:ee=uh;break;case"scroll":ee=Kp;break;case"wheel":ee=fh;break;case"copy":case"cut":case"paste":ee=Gp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=ac}var ie=(t&4)!==0,Ke=!ie&&e==="scroll",T=ie?$!==null?$+"Capture":null:$;ie=[];for(var j=L,_;j!==null;){_=j;var V=_.stateNode;if(_.tag===5&&V!==null&&(_=V,T!==null&&(V=ln(j,T),V!=null&&ie.push(Ys(j,V,_)))),Ke)break;j=j.return}0<ie.length&&($=new ee($,se,null,s,z),B.push({event:$,listeners:ie}))}}if((t&7)===0){e:{if($=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",$&&s!==Ts&&(se=s.relatedTarget||s.fromElement)&&(cr(se)||se[vn]))break e;if((ee||$)&&($=z.window===z?z:($=z.ownerDocument)?$.defaultView||$.parentWindow:window,ee?(se=s.relatedTarget||s.toElement,ee=L,se=se?cr(se):null,se!==null&&(Ke=yn(se),se!==Ke||se.tag!==5&&se.tag!==6)&&(se=null)):(ee=null,se=L),ee!==se)){if(ie=lc,V="onMouseLeave",T="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(ie=ac,V="onPointerLeave",T="onPointerEnter",j="pointer"),Ke=ee==null?$:Wr(ee),_=se==null?$:Wr(se),$=new ie(V,j+"leave",ee,s,z),$.target=Ke,$.relatedTarget=_,V=null,cr(z)===L&&(ie=new ie(T,j+"enter",se,s,z),ie.target=_,ie.relatedTarget=Ke,V=ie),Ke=V,ee&&se)t:{for(ie=ee,T=se,j=0,_=ie;_;_=qr(_))j++;for(_=0,V=T;V;V=qr(V))_++;for(;0<j-_;)ie=qr(ie),j--;for(;0<_-j;)T=qr(T),_--;for(;j--;){if(ie===T||T!==null&&ie===T.alternate)break t;ie=qr(ie),T=qr(T)}ie=null}else ie=null;ee!==null&&Mc(B,$,ee,ie,!1),se!==null&&Ke!==null&&Mc(B,Ke,se,ie,!0)}}e:{if($=L?Wr(L):window,ee=$.nodeName&&$.nodeName.toLowerCase(),ee==="select"||ee==="input"&&$.type==="file")var oe=vh;else if(hc($))if(yc)oe=jh;else{oe=kh;var ue=wh}else(ee=$.nodeName)&&ee.toLowerCase()==="input"&&($.type==="checkbox"||$.type==="radio")&&(oe=Sh);if(oe&&(oe=oe(e,L))){mc(B,oe,s,z);break e}ue&&ue(e,$,L),e==="focusout"&&(ue=$._wrapperState)&&ue.controlled&&$.type==="number"&&Tn($,"number",$.value)}switch(ue=L?Wr(L):window,e){case"focusin":(hc(ue)||ue.contentEditable==="true")&&(Vr=ue,zo=L,Ws=null);break;case"focusout":Ws=zo=Vr=null;break;case"mousedown":Bo=!0;break;case"contextmenu":case"mouseup":case"dragend":Bo=!1,Nc(B,s,z);break;case"selectionchange":if(Ch)break;case"keydown":case"keyup":Nc(B,s,z)}var ce;if(Mo)e:{switch(e){case"compositionstart":var me="onCompositionStart";break e;case"compositionend":me="onCompositionEnd";break e;case"compositionupdate":me="onCompositionUpdate";break e}me=void 0}else Fr?dc(e,s)&&(me="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(me="onCompositionStart");me&&(uc&&s.locale!=="ko"&&(Fr||me!=="onCompositionStart"?me==="onCompositionEnd"&&Fr&&(ce=sc()):(Bn=z,_o="value"in Bn?Bn.value:Bn.textContent,Fr=!0)),ue=el(L,me),0<ue.length&&(me=new oc(me,e,null,s,z),B.push({event:me,listeners:ue}),ce?me.data=ce:(ce=pc(s),ce!==null&&(me.data=ce)))),(ce=ph?hh(e,s):mh(e,s))&&(L=el(L,"onBeforeInput"),0<L.length&&(z=new oc("onBeforeInput","beforeinput",null,s,z),B.push({event:z,listeners:L}),z.data=ce))}Pc(B,t)})}function Ys(e,t,s){return{instance:e,listener:t,currentTarget:s}}function el(e,t){for(var s=t+"Capture",o=[];e!==null;){var c=e,f=c.stateNode;c.tag===5&&f!==null&&(c=f,f=ln(e,s),f!=null&&o.unshift(Ys(e,f,c)),f=ln(e,t),f!=null&&o.push(Ys(e,f,c))),e=e.return}return o}function qr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Mc(e,t,s,o,c){for(var f=t._reactName,m=[];s!==null&&s!==o;){var v=s,w=v.alternate,L=v.stateNode;if(w!==null&&w===o)break;v.tag===5&&L!==null&&(v=L,c?(w=ln(s,f),w!=null&&m.unshift(Ys(s,w,v))):c||(w=ln(s,f),w!=null&&m.push(Ys(s,w,v)))),s=s.return}m.length!==0&&e.push({event:t,listeners:m})}var _h=/\r\n?/g,Ih=/\u0000|\uFFFD/g;function Rc(e){return(typeof e=="string"?e:""+e).replace(_h,`
38
- `).replace(Ih,"")}function tl(e,t,s){if(t=Rc(t),Rc(e)!==t&&s)throw Error(r(425))}function nl(){}var Ho=null,Wo=null;function Qo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Jo=typeof setTimeout=="function"?setTimeout:void 0,Lh=typeof clearTimeout=="function"?clearTimeout:void 0,$c=typeof Promise=="function"?Promise:void 0,Ah=typeof queueMicrotask=="function"?queueMicrotask:typeof $c<"u"?function(e){return $c.resolve(null).then(e).catch(Ph)}:Jo;function Ph(e){setTimeout(function(){throw e})}function Yo(e,t){var s=t,o=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(o===0){e.removeChild(c),Bs(t);return}o--}else s!=="$"&&s!=="$?"&&s!=="$!"||o++;s=c}while(s);Bs(t)}function Fn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Dc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(t===0)return e;t--}else s==="/$"&&t++}e=e.previousSibling}return null}var Hr=Math.random().toString(36).slice(2),on="__reactFiber$"+Hr,Gs="__reactProps$"+Hr,vn="__reactContainer$"+Hr,Go="__reactEvents$"+Hr,bh="__reactListeners$"+Hr,Mh="__reactHandles$"+Hr;function cr(e){var t=e[on];if(t)return t;for(var s=e.parentNode;s;){if(t=s[vn]||s[on]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=Dc(e);e!==null;){if(s=e[on])return s;e=Dc(e)}return t}e=s,s=e.parentNode}return null}function Xs(e){return e=e[on]||e[vn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function rl(e){return e[Gs]||null}var Xo=[],Qr=-1;function Vn(e){return{current:e}}function Re(e){0>Qr||(e.current=Xo[Qr],Xo[Qr]=null,Qr--)}function Pe(e,t){Qr++,Xo[Qr]=e.current,e.current=t}var Kn={},ct=Vn(Kn),St=Vn(!1),fr=Kn;function Jr(e,t){var s=e.type.contextTypes;if(!s)return Kn;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in s)c[f]=t[f];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}function jt(e){return e=e.childContextTypes,e!=null}function sl(){Re(St),Re(ct)}function zc(e,t,s){if(ct.current!==Kn)throw Error(r(168));Pe(ct,t),Pe(St,s)}function Bc(e,t,s){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return s;o=o.getChildContext();for(var c in o)if(!(c in t))throw Error(r(108,Ne(e)||"Unknown",c));return X({},s,o)}function il(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kn,fr=ct.current,Pe(ct,e),Pe(St,St.current),!0}function Uc(e,t,s){var o=e.stateNode;if(!o)throw Error(r(169));s?(e=Bc(e,t,fr),o.__reactInternalMemoizedMergedChildContext=e,Re(St),Re(ct),Pe(ct,e)):Re(St),Pe(St,s)}var wn=null,ll=!1,Zo=!1;function Fc(e){wn===null?wn=[e]:wn.push(e)}function Rh(e){ll=!0,Fc(e)}function qn(){if(!Zo&&wn!==null){Zo=!0;var e=0,t=Ae;try{var s=wn;for(Ae=1;e<s.length;e++){var o=s[e];do o=o(!0);while(o!==null)}wn=null,ll=!1}catch(c){throw wn!==null&&(wn=wn.slice(e+1)),Di(bs,qn),c}finally{Ae=t,Zo=!1}}return null}var Yr=[],Gr=0,ol=null,al=0,Dt=[],zt=0,dr=null,kn=1,Sn="";function pr(e,t){Yr[Gr++]=al,Yr[Gr++]=ol,ol=e,al=t}function Vc(e,t,s){Dt[zt++]=kn,Dt[zt++]=Sn,Dt[zt++]=dr,dr=e;var o=kn;e=Sn;var c=32-P(o)-1;o&=~(1<<c),s+=1;var f=32-P(t)+c;if(30<f){var m=c-c%5;f=(o&(1<<m)-1).toString(32),o>>=m,c-=m,kn=1<<32-P(t)+c|s<<c|o,Sn=f+e}else kn=1<<f|s<<c|o,Sn=e}function ea(e){e.return!==null&&(pr(e,1),Vc(e,1,0))}function ta(e){for(;e===ol;)ol=Yr[--Gr],Yr[Gr]=null,al=Yr[--Gr],Yr[Gr]=null;for(;e===dr;)dr=Dt[--zt],Dt[zt]=null,Sn=Dt[--zt],Dt[zt]=null,kn=Dt[--zt],Dt[zt]=null}var _t=null,It=null,$e=!1,Yt=null;function Kc(e,t){var s=Vt(5,null,null,0);s.elementType="DELETED",s.stateNode=t,s.return=e,t=e.deletions,t===null?(e.deletions=[s],e.flags|=16):t.push(s)}function qc(e,t){switch(e.tag){case 5:var s=e.type;return t=t.nodeType!==1||s.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,_t=e,It=Fn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_t=e,It=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(s=dr!==null?{id:kn,overflow:Sn}:null,e.memoizedState={dehydrated:t,treeContext:s,retryLane:1073741824},s=Vt(18,null,null,0),s.stateNode=t,s.return=e,e.child=s,_t=e,It=null,!0):!1;default:return!1}}function na(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ra(e){if($e){var t=It;if(t){var s=t;if(!qc(e,t)){if(na(e))throw Error(r(418));t=Fn(s.nextSibling);var o=_t;t&&qc(e,t)?Kc(o,s):(e.flags=e.flags&-4097|2,$e=!1,_t=e)}}else{if(na(e))throw Error(r(418));e.flags=e.flags&-4097|2,$e=!1,_t=e}}}function Hc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_t=e}function ul(e){if(e!==_t)return!1;if(!$e)return Hc(e),$e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Qo(e.type,e.memoizedProps)),t&&(t=It)){if(na(e))throw Wc(),Error(r(418));for(;t;)Kc(e,t),t=Fn(t.nextSibling)}if(Hc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(t===0){It=Fn(e.nextSibling);break e}t--}else s!=="$"&&s!=="$!"&&s!=="$?"||t++}e=e.nextSibling}It=null}}else It=_t?Fn(e.stateNode.nextSibling):null;return!0}function Wc(){for(var e=It;e;)e=Fn(e.nextSibling)}function Xr(){It=_t=null,$e=!1}function sa(e){Yt===null?Yt=[e]:Yt.push(e)}var $h=K.ReactCurrentBatchConfig;function Zs(e,t,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(r(309));var o=s.stateNode}if(!o)throw Error(r(147,e));var c=o,f=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===f?t.ref:(t=function(m){var v=c.refs;m===null?delete v[f]:v[f]=m},t._stringRef=f,t)}if(typeof e!="string")throw Error(r(284));if(!s._owner)throw Error(r(290,e))}return e}function cl(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Qc(e){var t=e._init;return t(e._payload)}function Jc(e){function t(T,j){if(e){var _=T.deletions;_===null?(T.deletions=[j],T.flags|=16):_.push(j)}}function s(T,j){if(!e)return null;for(;j!==null;)t(T,j),j=j.sibling;return null}function o(T,j){for(T=new Map;j!==null;)j.key!==null?T.set(j.key,j):T.set(j.index,j),j=j.sibling;return T}function c(T,j){return T=Zn(T,j),T.index=0,T.sibling=null,T}function f(T,j,_){return T.index=_,e?(_=T.alternate,_!==null?(_=_.index,_<j?(T.flags|=2,j):_):(T.flags|=2,j)):(T.flags|=1048576,j)}function m(T){return e&&T.alternate===null&&(T.flags|=2),T}function v(T,j,_,V){return j===null||j.tag!==6?(j=Ja(_,T.mode,V),j.return=T,j):(j=c(j,_),j.return=T,j)}function w(T,j,_,V){var oe=_.type;return oe===q?z(T,j,_.props.children,V,_.key):j!==null&&(j.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===De&&Qc(oe)===j.type)?(V=c(j,_.props),V.ref=Zs(T,j,_),V.return=T,V):(V=bl(_.type,_.key,_.props,null,T.mode,V),V.ref=Zs(T,j,_),V.return=T,V)}function L(T,j,_,V){return j===null||j.tag!==4||j.stateNode.containerInfo!==_.containerInfo||j.stateNode.implementation!==_.implementation?(j=Ya(_,T.mode,V),j.return=T,j):(j=c(j,_.children||[]),j.return=T,j)}function z(T,j,_,V,oe){return j===null||j.tag!==7?(j=Sr(_,T.mode,V,oe),j.return=T,j):(j=c(j,_),j.return=T,j)}function B(T,j,_){if(typeof j=="string"&&j!==""||typeof j=="number")return j=Ja(""+j,T.mode,_),j.return=T,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case G:return _=bl(j.type,j.key,j.props,null,T.mode,_),_.ref=Zs(T,null,j),_.return=T,_;case Q:return j=Ya(j,T.mode,_),j.return=T,j;case De:var V=j._init;return B(T,V(j._payload),_)}if(_n(j)||ne(j))return j=Sr(j,T.mode,_,null),j.return=T,j;cl(T,j)}return null}function $(T,j,_,V){var oe=j!==null?j.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return oe!==null?null:v(T,j,""+_,V);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case G:return _.key===oe?w(T,j,_,V):null;case Q:return _.key===oe?L(T,j,_,V):null;case De:return oe=_._init,$(T,j,oe(_._payload),V)}if(_n(_)||ne(_))return oe!==null?null:z(T,j,_,V,null);cl(T,_)}return null}function ee(T,j,_,V,oe){if(typeof V=="string"&&V!==""||typeof V=="number")return T=T.get(_)||null,v(j,T,""+V,oe);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case G:return T=T.get(V.key===null?_:V.key)||null,w(j,T,V,oe);case Q:return T=T.get(V.key===null?_:V.key)||null,L(j,T,V,oe);case De:var ue=V._init;return ee(T,j,_,ue(V._payload),oe)}if(_n(V)||ne(V))return T=T.get(_)||null,z(j,T,V,oe,null);cl(j,V)}return null}function se(T,j,_,V){for(var oe=null,ue=null,ce=j,me=j=0,nt=null;ce!==null&&me<_.length;me++){ce.index>me?(nt=ce,ce=null):nt=ce.sibling;var Te=$(T,ce,_[me],V);if(Te===null){ce===null&&(ce=nt);break}e&&ce&&Te.alternate===null&&t(T,ce),j=f(Te,j,me),ue===null?oe=Te:ue.sibling=Te,ue=Te,ce=nt}if(me===_.length)return s(T,ce),$e&&pr(T,me),oe;if(ce===null){for(;me<_.length;me++)ce=B(T,_[me],V),ce!==null&&(j=f(ce,j,me),ue===null?oe=ce:ue.sibling=ce,ue=ce);return $e&&pr(T,me),oe}for(ce=o(T,ce);me<_.length;me++)nt=ee(ce,T,me,_[me],V),nt!==null&&(e&&nt.alternate!==null&&ce.delete(nt.key===null?me:nt.key),j=f(nt,j,me),ue===null?oe=nt:ue.sibling=nt,ue=nt);return e&&ce.forEach(function(er){return t(T,er)}),$e&&pr(T,me),oe}function ie(T,j,_,V){var oe=ne(_);if(typeof oe!="function")throw Error(r(150));if(_=oe.call(_),_==null)throw Error(r(151));for(var ue=oe=null,ce=j,me=j=0,nt=null,Te=_.next();ce!==null&&!Te.done;me++,Te=_.next()){ce.index>me?(nt=ce,ce=null):nt=ce.sibling;var er=$(T,ce,Te.value,V);if(er===null){ce===null&&(ce=nt);break}e&&ce&&er.alternate===null&&t(T,ce),j=f(er,j,me),ue===null?oe=er:ue.sibling=er,ue=er,ce=nt}if(Te.done)return s(T,ce),$e&&pr(T,me),oe;if(ce===null){for(;!Te.done;me++,Te=_.next())Te=B(T,Te.value,V),Te!==null&&(j=f(Te,j,me),ue===null?oe=Te:ue.sibling=Te,ue=Te);return $e&&pr(T,me),oe}for(ce=o(T,ce);!Te.done;me++,Te=_.next())Te=ee(ce,T,me,Te.value,V),Te!==null&&(e&&Te.alternate!==null&&ce.delete(Te.key===null?me:Te.key),j=f(Te,j,me),ue===null?oe=Te:ue.sibling=Te,ue=Te);return e&&ce.forEach(function(ym){return t(T,ym)}),$e&&pr(T,me),oe}function Ke(T,j,_,V){if(typeof _=="object"&&_!==null&&_.type===q&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case G:e:{for(var oe=_.key,ue=j;ue!==null;){if(ue.key===oe){if(oe=_.type,oe===q){if(ue.tag===7){s(T,ue.sibling),j=c(ue,_.props.children),j.return=T,T=j;break e}}else if(ue.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===De&&Qc(oe)===ue.type){s(T,ue.sibling),j=c(ue,_.props),j.ref=Zs(T,ue,_),j.return=T,T=j;break e}s(T,ue);break}else t(T,ue);ue=ue.sibling}_.type===q?(j=Sr(_.props.children,T.mode,V,_.key),j.return=T,T=j):(V=bl(_.type,_.key,_.props,null,T.mode,V),V.ref=Zs(T,j,_),V.return=T,T=V)}return m(T);case Q:e:{for(ue=_.key;j!==null;){if(j.key===ue)if(j.tag===4&&j.stateNode.containerInfo===_.containerInfo&&j.stateNode.implementation===_.implementation){s(T,j.sibling),j=c(j,_.children||[]),j.return=T,T=j;break e}else{s(T,j);break}else t(T,j);j=j.sibling}j=Ya(_,T.mode,V),j.return=T,T=j}return m(T);case De:return ue=_._init,Ke(T,j,ue(_._payload),V)}if(_n(_))return se(T,j,_,V);if(ne(_))return ie(T,j,_,V);cl(T,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,j!==null&&j.tag===6?(s(T,j.sibling),j=c(j,_),j.return=T,T=j):(s(T,j),j=Ja(_,T.mode,V),j.return=T,T=j),m(T)):s(T,j)}return Ke}var Zr=Jc(!0),Yc=Jc(!1),fl=Vn(null),dl=null,es=null,ia=null;function la(){ia=es=dl=null}function oa(e){var t=fl.current;Re(fl),e._currentValue=t}function aa(e,t,s){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===s)break;e=e.return}}function ts(e,t){dl=e,ia=es=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(xt=!0),e.firstContext=null)}function Bt(e){var t=e._currentValue;if(ia!==e)if(e={context:e,memoizedValue:t,next:null},es===null){if(dl===null)throw Error(r(308));es=e,dl.dependencies={lanes:0,firstContext:e}}else es=es.next=e;return t}var hr=null;function ua(e){hr===null?hr=[e]:hr.push(e)}function Gc(e,t,s,o){var c=t.interleaved;return c===null?(s.next=s,ua(t)):(s.next=c.next,c.next=s),t.interleaved=s,jn(e,o)}function jn(e,t){e.lanes|=t;var s=e.alternate;for(s!==null&&(s.lanes|=t),s=e,e=e.return;e!==null;)e.childLanes|=t,s=e.alternate,s!==null&&(s.childLanes|=t),s=e,e=e.return;return s.tag===3?s.stateNode:null}var Hn=!1;function ca(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function xn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wn(e,t,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ee&2)!==0){var c=o.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),o.pending=t,jn(e,s)}return c=o.interleaved,c===null?(t.next=t,ua(o)):(t.next=c.next,c.next=t),o.interleaved=t,jn(e,s)}function pl(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,No(e,s)}}function Zc(e,t){var s=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var c=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var m={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};f===null?c=f=m:f=f.next=m,s=s.next}while(s!==null);f===null?c=f=t:f=f.next=t}else c=f=t;s={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:o.shared,effects:o.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function hl(e,t,s,o){var c=e.updateQueue;Hn=!1;var f=c.firstBaseUpdate,m=c.lastBaseUpdate,v=c.shared.pending;if(v!==null){c.shared.pending=null;var w=v,L=w.next;w.next=null,m===null?f=L:m.next=L,m=w;var z=e.alternate;z!==null&&(z=z.updateQueue,v=z.lastBaseUpdate,v!==m&&(v===null?z.firstBaseUpdate=L:v.next=L,z.lastBaseUpdate=w))}if(f!==null){var B=c.baseState;m=0,z=L=w=null,v=f;do{var $=v.lane,ee=v.eventTime;if((o&$)===$){z!==null&&(z=z.next={eventTime:ee,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var se=e,ie=v;switch($=t,ee=s,ie.tag){case 1:if(se=ie.payload,typeof se=="function"){B=se.call(ee,B,$);break e}B=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=ie.payload,$=typeof se=="function"?se.call(ee,B,$):se,$==null)break e;B=X({},B,$);break e;case 2:Hn=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,$=c.effects,$===null?c.effects=[v]:$.push(v))}else ee={eventTime:ee,lane:$,tag:v.tag,payload:v.payload,callback:v.callback,next:null},z===null?(L=z=ee,w=B):z=z.next=ee,m|=$;if(v=v.next,v===null){if(v=c.shared.pending,v===null)break;$=v,v=$.next,$.next=null,c.lastBaseUpdate=$,c.shared.pending=null}}while(!0);if(z===null&&(w=B),c.baseState=w,c.firstBaseUpdate=L,c.lastBaseUpdate=z,t=c.shared.interleaved,t!==null){c=t;do m|=c.lane,c=c.next;while(c!==t)}else f===null&&(c.shared.lanes=0);gr|=m,e.lanes=m,e.memoizedState=B}}function ef(e,t,s){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],c=o.callback;if(c!==null){if(o.callback=null,o=s,typeof c!="function")throw Error(r(191,c));c.call(o)}}}var ei={},an=Vn(ei),ti=Vn(ei),ni=Vn(ei);function mr(e){if(e===ei)throw Error(r(174));return e}function fa(e,t){switch(Pe(ni,t),Pe(ti,e),Pe(an,ei),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ir(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ir(t,e)}Re(an),Pe(an,t)}function ns(){Re(an),Re(ti),Re(ni)}function tf(e){mr(ni.current);var t=mr(an.current),s=ir(t,e.type);t!==s&&(Pe(ti,e),Pe(an,s))}function da(e){ti.current===e&&(Re(an),Re(ti))}var Be=Vn(0);function ml(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var pa=[];function ha(){for(var e=0;e<pa.length;e++)pa[e]._workInProgressVersionPrimary=null;pa.length=0}var yl=K.ReactCurrentDispatcher,ma=K.ReactCurrentBatchConfig,yr=0,Ue=null,Xe=null,et=null,gl=!1,ri=!1,si=0,Dh=0;function ft(){throw Error(r(321))}function ya(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!Jt(e[s],t[s]))return!1;return!0}function ga(e,t,s,o,c,f){if(yr=f,Ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,yl.current=e===null||e.memoizedState===null?Fh:Vh,e=s(o,c),ri){f=0;do{if(ri=!1,si=0,25<=f)throw Error(r(301));f+=1,et=Xe=null,t.updateQueue=null,yl.current=Kh,e=s(o,c)}while(ri)}if(yl.current=kl,t=Xe!==null&&Xe.next!==null,yr=0,et=Xe=Ue=null,gl=!1,t)throw Error(r(300));return e}function va(){var e=si!==0;return si=0,e}function un(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?Ue.memoizedState=et=e:et=et.next=e,et}function Ut(){if(Xe===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=et===null?Ue.memoizedState:et.next;if(t!==null)et=t,Xe=e;else{if(e===null)throw Error(r(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},et===null?Ue.memoizedState=et=e:et=et.next=e}return et}function ii(e,t){return typeof t=="function"?t(e):t}function wa(e){var t=Ut(),s=t.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=e;var o=Xe,c=o.baseQueue,f=s.pending;if(f!==null){if(c!==null){var m=c.next;c.next=f.next,f.next=m}o.baseQueue=c=f,s.pending=null}if(c!==null){f=c.next,o=o.baseState;var v=m=null,w=null,L=f;do{var z=L.lane;if((yr&z)===z)w!==null&&(w=w.next={lane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),o=L.hasEagerState?L.eagerState:e(o,L.action);else{var B={lane:z,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null};w===null?(v=w=B,m=o):w=w.next=B,Ue.lanes|=z,gr|=z}L=L.next}while(L!==null&&L!==f);w===null?m=o:w.next=v,Jt(o,t.memoizedState)||(xt=!0),t.memoizedState=o,t.baseState=m,t.baseQueue=w,s.lastRenderedState=o}if(e=s.interleaved,e!==null){c=e;do f=c.lane,Ue.lanes|=f,gr|=f,c=c.next;while(c!==e)}else c===null&&(s.lanes=0);return[t.memoizedState,s.dispatch]}function ka(e){var t=Ut(),s=t.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=e;var o=s.dispatch,c=s.pending,f=t.memoizedState;if(c!==null){s.pending=null;var m=c=c.next;do f=e(f,m.action),m=m.next;while(m!==c);Jt(f,t.memoizedState)||(xt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,o]}function nf(){}function rf(e,t){var s=Ue,o=Ut(),c=t(),f=!Jt(o.memoizedState,c);if(f&&(o.memoizedState=c,xt=!0),o=o.queue,Sa(of.bind(null,s,o,e),[e]),o.getSnapshot!==t||f||et!==null&&et.memoizedState.tag&1){if(s.flags|=2048,li(9,lf.bind(null,s,o,c,t),void 0,null),tt===null)throw Error(r(349));(yr&30)!==0||sf(s,t,c)}return c}function sf(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Ue.updateQueue,t===null?(t={lastEffect:null,stores:null},Ue.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function lf(e,t,s,o){t.value=s,t.getSnapshot=o,af(t)&&uf(e)}function of(e,t,s){return s(function(){af(t)&&uf(e)})}function af(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!Jt(e,s)}catch{return!0}}function uf(e){var t=jn(e,1);t!==null&&en(t,e,1,-1)}function cf(e){var t=un();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ii,lastRenderedState:e},t.queue=e,e=e.dispatch=Uh.bind(null,Ue,e),[t.memoizedState,e]}function li(e,t,s,o){return e={tag:e,create:t,destroy:s,deps:o,next:null},t=Ue.updateQueue,t===null?(t={lastEffect:null,stores:null},Ue.updateQueue=t,t.lastEffect=e.next=e):(s=t.lastEffect,s===null?t.lastEffect=e.next=e:(o=s.next,s.next=e,e.next=o,t.lastEffect=e)),e}function ff(){return Ut().memoizedState}function vl(e,t,s,o){var c=un();Ue.flags|=e,c.memoizedState=li(1|t,s,void 0,o===void 0?null:o)}function wl(e,t,s,o){var c=Ut();o=o===void 0?null:o;var f=void 0;if(Xe!==null){var m=Xe.memoizedState;if(f=m.destroy,o!==null&&ya(o,m.deps)){c.memoizedState=li(t,s,f,o);return}}Ue.flags|=e,c.memoizedState=li(1|t,s,f,o)}function df(e,t){return vl(8390656,8,e,t)}function Sa(e,t){return wl(2048,8,e,t)}function pf(e,t){return wl(4,2,e,t)}function hf(e,t){return wl(4,4,e,t)}function mf(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function yf(e,t,s){return s=s!=null?s.concat([e]):null,wl(4,4,mf.bind(null,t,e),s)}function ja(){}function gf(e,t){var s=Ut();t=t===void 0?null:t;var o=s.memoizedState;return o!==null&&t!==null&&ya(t,o[1])?o[0]:(s.memoizedState=[e,t],e)}function vf(e,t){var s=Ut();t=t===void 0?null:t;var o=s.memoizedState;return o!==null&&t!==null&&ya(t,o[1])?o[0]:(e=e(),s.memoizedState=[e,t],e)}function wf(e,t,s){return(yr&21)===0?(e.baseState&&(e.baseState=!1,xt=!0),e.memoizedState=s):(Jt(s,t)||(s=Ms(),Ue.lanes|=s,gr|=s,e.baseState=!0),t)}function zh(e,t){var s=Ae;Ae=s!==0&&4>s?s:4,e(!0);var o=ma.transition;ma.transition={};try{e(!1),t()}finally{Ae=s,ma.transition=o}}function kf(){return Ut().memoizedState}function Bh(e,t,s){var o=Gn(e);if(s={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null},Sf(e))jf(t,s);else if(s=Gc(e,t,s,o),s!==null){var c=gt();en(s,e,o,c),xf(s,t,o)}}function Uh(e,t,s){var o=Gn(e),c={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null};if(Sf(e))jf(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var m=t.lastRenderedState,v=f(m,s);if(c.hasEagerState=!0,c.eagerState=v,Jt(v,m)){var w=t.interleaved;w===null?(c.next=c,ua(t)):(c.next=w.next,w.next=c),t.interleaved=c;return}}catch{}finally{}s=Gc(e,t,c,o),s!==null&&(c=gt(),en(s,e,o,c),xf(s,t,o))}}function Sf(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function jf(e,t){ri=gl=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function xf(e,t,s){if((s&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,No(e,s)}}var kl={readContext:Bt,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useInsertionEffect:ft,useLayoutEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useMutableSource:ft,useSyncExternalStore:ft,useId:ft,unstable_isNewReconciler:!1},Fh={readContext:Bt,useCallback:function(e,t){return un().memoizedState=[e,t===void 0?null:t],e},useContext:Bt,useEffect:df,useImperativeHandle:function(e,t,s){return s=s!=null?s.concat([e]):null,vl(4194308,4,mf.bind(null,t,e),s)},useLayoutEffect:function(e,t){return vl(4194308,4,e,t)},useInsertionEffect:function(e,t){return vl(4,2,e,t)},useMemo:function(e,t){var s=un();return t=t===void 0?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var o=un();return t=s!==void 0?s(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=Bh.bind(null,Ue,e),[o.memoizedState,e]},useRef:function(e){var t=un();return e={current:e},t.memoizedState=e},useState:cf,useDebugValue:ja,useDeferredValue:function(e){return un().memoizedState=e},useTransition:function(){var e=cf(!1),t=e[0];return e=zh.bind(null,e[1]),un().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var o=Ue,c=un();if($e){if(s===void 0)throw Error(r(407));s=s()}else{if(s=t(),tt===null)throw Error(r(349));(yr&30)!==0||sf(o,t,s)}c.memoizedState=s;var f={value:s,getSnapshot:t};return c.queue=f,df(of.bind(null,o,f,e),[e]),o.flags|=2048,li(9,lf.bind(null,o,f,s,t),void 0,null),s},useId:function(){var e=un(),t=tt.identifierPrefix;if($e){var s=Sn,o=kn;s=(o&~(1<<32-P(o)-1)).toString(32)+s,t=":"+t+"R"+s,s=si++,0<s&&(t+="H"+s.toString(32)),t+=":"}else s=Dh++,t=":"+t+"r"+s.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Vh={readContext:Bt,useCallback:gf,useContext:Bt,useEffect:Sa,useImperativeHandle:yf,useInsertionEffect:pf,useLayoutEffect:hf,useMemo:vf,useReducer:wa,useRef:ff,useState:function(){return wa(ii)},useDebugValue:ja,useDeferredValue:function(e){var t=Ut();return wf(t,Xe.memoizedState,e)},useTransition:function(){var e=wa(ii)[0],t=Ut().memoizedState;return[e,t]},useMutableSource:nf,useSyncExternalStore:rf,useId:kf,unstable_isNewReconciler:!1},Kh={readContext:Bt,useCallback:gf,useContext:Bt,useEffect:Sa,useImperativeHandle:yf,useInsertionEffect:pf,useLayoutEffect:hf,useMemo:vf,useReducer:ka,useRef:ff,useState:function(){return ka(ii)},useDebugValue:ja,useDeferredValue:function(e){var t=Ut();return Xe===null?t.memoizedState=e:wf(t,Xe.memoizedState,e)},useTransition:function(){var e=ka(ii)[0],t=Ut().memoizedState;return[e,t]},useMutableSource:nf,useSyncExternalStore:rf,useId:kf,unstable_isNewReconciler:!1};function Gt(e,t){if(e&&e.defaultProps){t=X({},t),e=e.defaultProps;for(var s in e)t[s]===void 0&&(t[s]=e[s]);return t}return t}function xa(e,t,s,o){t=e.memoizedState,s=s(o,t),s=s==null?t:X({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Sl={isMounted:function(e){return(e=e._reactInternals)?yn(e)===e:!1},enqueueSetState:function(e,t,s){e=e._reactInternals;var o=gt(),c=Gn(e),f=xn(o,c);f.payload=t,s!=null&&(f.callback=s),t=Wn(e,f,c),t!==null&&(en(t,e,c,o),pl(t,e,c))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var o=gt(),c=Gn(e),f=xn(o,c);f.tag=1,f.payload=t,s!=null&&(f.callback=s),t=Wn(e,f,c),t!==null&&(en(t,e,c,o),pl(t,e,c))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=gt(),o=Gn(e),c=xn(s,o);c.tag=2,t!=null&&(c.callback=t),t=Wn(e,c,o),t!==null&&(en(t,e,o,s),pl(t,e,o))}};function Nf(e,t,s,o,c,f,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,f,m):t.prototype&&t.prototype.isPureReactComponent?!Hs(s,o)||!Hs(c,f):!0}function Cf(e,t,s){var o=!1,c=Kn,f=t.contextType;return typeof f=="object"&&f!==null?f=Bt(f):(c=jt(t)?fr:ct.current,o=t.contextTypes,f=(o=o!=null)?Jr(e,c):Kn),t=new t(s,f),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Sl,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=c,e.__reactInternalMemoizedMaskedChildContext=f),t}function Ef(e,t,s,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,o),t.state!==e&&Sl.enqueueReplaceState(t,t.state,null)}function Na(e,t,s,o){var c=e.stateNode;c.props=s,c.state=e.memoizedState,c.refs={},ca(e);var f=t.contextType;typeof f=="object"&&f!==null?c.context=Bt(f):(f=jt(t)?fr:ct.current,c.context=Jr(e,f)),c.state=e.memoizedState,f=t.getDerivedStateFromProps,typeof f=="function"&&(xa(e,t,f,s),c.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(t=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),t!==c.state&&Sl.enqueueReplaceState(c,c.state,null),hl(e,s,c,o),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function rs(e,t){try{var s="",o=t;do s+=ye(o),o=o.return;while(o);var c=s}catch(f){c=`
37
+ `+c[m].replace(" at new "," at ");return e.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",e.displayName)),w}while(1<=m&&0<=v);break}}}finally{he=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?M(e):""}function ye(e){switch(e.tag){case 5:return M(e.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return e=J(e.type,!1),e;case 11:return e=J(e.type.render,!1),e;case 1:return e=J(e.type,!0),e;default:return""}}function pe(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case q:return"Fragment";case Q:return"Portal";case ae:return"Profiler";case U:return"StrictMode";case de:return"Suspense";case Ie:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Z:return(e.displayName||"Context")+".Consumer";case D:return(e._context.displayName||"Context")+".Provider";case te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _e:return t=e.displayName||null,t!==null?t:pe(e.type)||"Memo";case De:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}function Ne(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(t);case 8:return t===U?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ke(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ce(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ge(e){var t=Ce(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,f=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(m){o=""+m,f.call(this,m)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(m){o=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function sn(e){e._valueTracker||(e._valueTracker=Ge(e))}function sr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),o="";return e&&(o=Ce(e)?e.checked?"true":"false":e.value),e=o,e!==s?(t.setValue(e),!0):!1}function Y(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Se(e,t){var s=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function st(e,t){var s=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;s=ke(t.value!=null?t.value:s),e._wrapperState={initialChecked:o,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Je(e,t){t=t.checked,t!=null&&F(e,"checked",t,!1)}function it(e,t){Je(e,t);var s=ke(t.value),o=t.type;if(s!=null)o==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Tn(e,t.type,s):t.hasOwnProperty("defaultValue")&&Tn(e,t.type,ke(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ln(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,s||t===e.value||(e.value=t),e.defaultValue=t}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function Tn(e,t,s){(t!=="number"||Y(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var _n=Array.isArray;function pn(e,t,s,o){if(e=e.options,t){t={};for(var c=0;c<s.length;c++)t["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=t.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&o&&(e[s].defaultSelected=!0)}else{for(s=""+ke(s),t=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,o&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Cs(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return X({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Es(e,t){var s=t.value;if(s==null){if(s=t.children,t=t.defaultValue,s!=null){if(t!=null)throw Error(r(92));if(_n(s)){if(1<s.length)throw Error(r(93));s=s[0]}t=s}t==null&&(t=""),s=t}e._wrapperState={initialValue:ke(s)}}function at(e,t){var s=ke(t.value),o=ke(t.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),t.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),o!=null&&(e.defaultValue=""+o)}function kt(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Tt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ir(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Tt(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ir,lr=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,s,o,c){MSApp.execUnsafeLocalFunction(function(){return e(t,s,o,c)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ir=Ir||document.createElement("div"),Ir.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ir.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function bt(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var In={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Lr=["Webkit","ms","Moz","O"];Object.keys(In).forEach(function(e){Lr.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),In[t]=In[e]})});function or(e,t,s){return t==null||typeof t=="boolean"||t===""?"":s||typeof t!="number"||t===0||In.hasOwnProperty(e)&&In[e]?(""+t).trim():t+"px"}function Ar(e,t){e=e.style;for(var s in t)if(t.hasOwnProperty(s)){var o=s.indexOf("--")===0,c=or(s,t[s],o);s==="float"&&(s="cssFloat"),o?e.setProperty(s,c):e[s]=c}}var Mi=X({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Os(e,t){if(t){if(Mi[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!="object")throw Error(r(62))}}function Ln(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ts=null;function An(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _s=null,hn=null,Pn=null;function ar(e){if(e=Zs(e)){if(typeof _s!="function")throw Error(r(280));var t=e.stateNode;t&&(t=rl(t),_s(e.stateNode,e.type,t))}}function Pr(e){hn?Pn?Pn.push(e):Pn=[e]:hn=e}function Mt(){if(hn){var e=hn,t=Pn;if(Pn=hn=null,ar(e),t)for(e=0;e<t.length;e++)ar(t[e])}}function Qt(e,t){return e(t)}function br(){}var mn=!1;function Le(e,t,s){if(mn)return e(t,s);mn=!0;try{return Qt(e,t,s)}finally{mn=!1,(hn!==null||Pn!==null)&&(br(),Mt())}}function St(e,t){var s=e.stateNode;if(s===null)return null;var o=rl(s);if(o===null)return null;s=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(r(231,t,typeof s));return s}var Is=!1;if(h)try{var ur={};Object.defineProperty(ur,"passive",{get:function(){Is=!0}}),window.addEventListener("test",ur,ur),window.removeEventListener("test",ur,ur)}catch{Is=!1}function Mr(e,t,s,o,c,f,m,v,w){var L=Array.prototype.slice.call(arguments,3);try{t.apply(s,L)}catch(z){this.onError(z)}}var Rt=!1,bn=null,Rr=!1,Mn=null,Ls={onError:function(e){Rt=!0,bn=e}};function wo(e,t,s,o,c,f,m,v,w){Rt=!1,bn=null,Mr.apply(Ls,arguments)}function As(e,t,s,o,c,f,m,v,w){if(wo.apply(this,arguments),Rt){if(Rt){var L=bn;Rt=!1,bn=null}else throw Error(r(198));Rr||(Rr=!0,Mn=L)}}function yn(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function Ri(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Ps(e){if(yn(e)!==e)throw Error(r(188))}function ko(e){var t=e.alternate;if(!t){if(t=yn(e),t===null)throw Error(r(188));return t!==e?null:e}for(var s=e,o=t;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(o=c.return,o!==null){s=o;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return Ps(c),e;if(f===o)return Ps(c),t;f=f.sibling}throw Error(r(188))}if(s.return!==o.return)s=c,o=f;else{for(var m=!1,v=c.child;v;){if(v===s){m=!0,s=c,o=f;break}if(v===o){m=!0,o=c,s=f;break}v=v.sibling}if(!m){for(v=f.child;v;){if(v===s){m=!0,s=f,o=c;break}if(v===o){m=!0,o=f,s=c;break}v=v.sibling}if(!m)throw Error(r(189))}}if(s.alternate!==o)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?e:t}function $i(e){return e=ko(e),e!==null?Di(e):null}function Di(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Di(e);if(t!==null)return t;e=e.sibling}return null}var zi=n.unstable_scheduleCallback,$r=n.unstable_cancelCallback,So=n.unstable_shouldYield,jo=n.unstable_requestPaint,ze=n.unstable_now,xo=n.unstable_getCurrentPriorityLevel,bs=n.unstable_ImmediatePriority,Ms=n.unstable_UserBlockingPriority,Dr=n.unstable_NormalPriority,No=n.unstable_LowPriority,Bi=n.unstable_IdlePriority,gn=null,$t=null;function N(e){if($t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(gn,e,void 0,(e.current.flags&128)===128)}catch{}}var P=Math.clz32?Math.clz32:we,le=Math.log,ge=Math.LN2;function we(e){return e>>>=0,e===0?32:31-(le(e)/ge|0)|0}var fe=64,Ve=4194304;function Oe(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function mt(e,t){var s=e.pendingLanes;if(s===0)return 0;var o=0,c=e.suspendedLanes,f=e.pingedLanes,m=s&268435455;if(m!==0){var v=m&~c;v!==0?o=Oe(v):(f&=m,f!==0&&(o=Oe(f)))}else m=s&~c,m!==0?o=Oe(m):f!==0&&(o=Oe(f));if(o===0)return 0;if(t!==0&&t!==o&&(t&c)===0&&(c=o&-o,f=t&-t,c>=f||c===16&&(f&4194240)!==0))return t;if((o&4)!==0&&(o|=s&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)s=31-P(t),c=1<<s,o|=e[s],t&=~c;return o}function Ui(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ut(e,t){for(var s=e.suspendedLanes,o=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes;0<f;){var m=31-P(f),v=1<<m,w=c[m];w===-1?((v&s)===0||(v&o)!==0)&&(c[m]=Ui(v,t)):w<=t&&(e.expiredLanes|=v),f&=~v}}function Dt(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Rs(){var e=fe;return fe<<=1,(fe&4194240)===0&&(fe=64),e}function zr(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function Jt(e,t,s){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-P(t),e[t]=s}function Dp(e,t){var s=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<s;){var c=31-P(s),f=1<<c;t[c]=0,o[c]=-1,e[c]=-1,s&=~f}}function Co(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var o=31-P(s),c=1<<o;c&t|e[o]&t&&(e[o]|=t),s&=~c}}var Ae=0;function Ju(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Yu,Eo,Gu,Xu,Zu,Oo=!1,Fi=[],Rn=null,$n=null,Dn=null,$s=new Map,Ds=new Map,zn=[],zp="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 submit".split(" ");function ec(e,t){switch(e){case"focusin":case"focusout":Rn=null;break;case"dragenter":case"dragleave":$n=null;break;case"mouseover":case"mouseout":Dn=null;break;case"pointerover":case"pointerout":$s.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ds.delete(t.pointerId)}}function zs(e,t,s,o,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:s,eventSystemFlags:o,nativeEvent:f,targetContainers:[c]},t!==null&&(t=Zs(t),t!==null&&Eo(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Bp(e,t,s,o,c){switch(t){case"focusin":return Rn=zs(Rn,e,t,s,o,c),!0;case"dragenter":return $n=zs($n,e,t,s,o,c),!0;case"mouseover":return Dn=zs(Dn,e,t,s,o,c),!0;case"pointerover":var f=c.pointerId;return $s.set(f,zs($s.get(f)||null,e,t,s,o,c)),!0;case"gotpointercapture":return f=c.pointerId,Ds.set(f,zs(Ds.get(f)||null,e,t,s,o,c)),!0}return!1}function tc(e){var t=cr(e.target);if(t!==null){var s=yn(t);if(s!==null){if(t=s.tag,t===13){if(t=Ri(s),t!==null){e.blockedOn=t,Zu(e.priority,function(){Gu(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Vi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=_o(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var o=new s.constructor(s.type,s);Ts=o,s.target.dispatchEvent(o),Ts=null}else return t=Zs(s),t!==null&&Eo(t),e.blockedOn=s,!1;t.shift()}return!0}function nc(e,t,s){Vi(e)&&s.delete(t)}function Up(){Oo=!1,Rn!==null&&Vi(Rn)&&(Rn=null),$n!==null&&Vi($n)&&($n=null),Dn!==null&&Vi(Dn)&&(Dn=null),$s.forEach(nc),Ds.forEach(nc)}function Bs(e,t){e.blockedOn===t&&(e.blockedOn=null,Oo||(Oo=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Up)))}function Us(e){function t(c){return Bs(c,e)}if(0<Fi.length){Bs(Fi[0],e);for(var s=1;s<Fi.length;s++){var o=Fi[s];o.blockedOn===e&&(o.blockedOn=null)}}for(Rn!==null&&Bs(Rn,e),$n!==null&&Bs($n,e),Dn!==null&&Bs(Dn,e),$s.forEach(t),Ds.forEach(t),s=0;s<zn.length;s++)o=zn[s],o.blockedOn===e&&(o.blockedOn=null);for(;0<zn.length&&(s=zn[0],s.blockedOn===null);)tc(s),s.blockedOn===null&&zn.shift()}var Br=K.ReactCurrentBatchConfig,Ki=!0;function Fp(e,t,s,o){var c=Ae,f=Br.transition;Br.transition=null;try{Ae=1,To(e,t,s,o)}finally{Ae=c,Br.transition=f}}function Vp(e,t,s,o){var c=Ae,f=Br.transition;Br.transition=null;try{Ae=4,To(e,t,s,o)}finally{Ae=c,Br.transition=f}}function To(e,t,s,o){if(Ki){var c=_o(e,t,s,o);if(c===null)Ho(e,t,o,qi,s),ec(e,o);else if(Bp(c,e,t,s,o))o.stopPropagation();else if(ec(e,o),t&4&&-1<zp.indexOf(e)){for(;c!==null;){var f=Zs(c);if(f!==null&&Yu(f),f=_o(e,t,s,o),f===null&&Ho(e,t,o,qi,s),f===c)break;c=f}c!==null&&o.stopPropagation()}else Ho(e,t,o,null,s)}}var qi=null;function _o(e,t,s,o){if(qi=null,e=An(o),e=cr(e),e!==null)if(t=yn(e),t===null)e=null;else if(s=t.tag,s===13){if(e=Ri(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return qi=e,null}function rc(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(xo()){case bs:return 1;case Ms:return 4;case Dr:case No:return 16;case Bi:return 536870912;default:return 16}default:return 16}}var Bn=null,Io=null,Hi=null;function sc(){if(Hi)return Hi;var e,t=Io,s=t.length,o,c="value"in Bn?Bn.value:Bn.textContent,f=c.length;for(e=0;e<s&&t[e]===c[e];e++);var m=s-e;for(o=1;o<=m&&t[s-o]===c[f-o];o++);return Hi=c.slice(e,1<o?1-o:void 0)}function Wi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Qi(){return!0}function ic(){return!1}function _t(e){function t(s,o,c,f,m){this._reactName=s,this._targetInst=c,this.type=o,this.nativeEvent=f,this.target=m,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(s=e[v],this[v]=s?s(f):f[v]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Qi:ic,this.isPropagationStopped=ic,this}return X(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Qi)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Qi)},persist:function(){},isPersistent:Qi}),t}var Ur={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lo=_t(Ur),Fs=X({},Ur,{view:0,detail:0}),Kp=_t(Fs),Ao,Po,Vs,Ji=X({},Fs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mo,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Vs&&(Vs&&e.type==="mousemove"?(Ao=e.screenX-Vs.screenX,Po=e.screenY-Vs.screenY):Po=Ao=0,Vs=e),Ao)},movementY:function(e){return"movementY"in e?e.movementY:Po}}),lc=_t(Ji),qp=X({},Ji,{dataTransfer:0}),Hp=_t(qp),Wp=X({},Fs,{relatedTarget:0}),bo=_t(Wp),Qp=X({},Ur,{animationName:0,elapsedTime:0,pseudoElement:0}),Jp=_t(Qp),Yp=X({},Ur,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gp=_t(Yp),Xp=X({},Ur,{data:0}),oc=_t(Xp),Zp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eh={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"},th={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=th[e])?!!t[e]:!1}function Mo(){return nh}var rh=X({},Fs,{key:function(e){if(e.key){var t=Zp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Wi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?eh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mo,charCode:function(e){return e.type==="keypress"?Wi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sh=_t(rh),ih=X({},Ji,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ac=_t(ih),lh=X({},Fs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mo}),oh=_t(lh),ah=X({},Ur,{propertyName:0,elapsedTime:0,pseudoElement:0}),uh=_t(ah),ch=X({},Ji,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),fh=_t(ch),dh=[9,13,27,32],Ro=h&&"CompositionEvent"in window,Ks=null;h&&"documentMode"in document&&(Ks=document.documentMode);var ph=h&&"TextEvent"in window&&!Ks,uc=h&&(!Ro||Ks&&8<Ks&&11>=Ks),cc=" ",fc=!1;function dc(e,t){switch(e){case"keyup":return dh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fr=!1;function hh(e,t){switch(e){case"compositionend":return pc(t);case"keypress":return t.which!==32?null:(fc=!0,cc);case"textInput":return e=t.data,e===cc&&fc?null:e;default:return null}}function mh(e,t){if(Fr)return e==="compositionend"||!Ro&&dc(e,t)?(e=sc(),Hi=Io=Bn=null,Fr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return uc&&t.locale!=="ko"?null:t.data;default:return null}}var yh={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 hc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!yh[e.type]:t==="textarea"}function mc(e,t,s,o){Pr(o),t=el(t,"onChange"),0<t.length&&(s=new Lo("onChange","change",null,s,o),e.push({event:s,listeners:t}))}var qs=null,Hs=null;function gh(e){Pc(e,0)}function Yi(e){var t=Wr(e);if(sr(t))return e}function vh(e,t){if(e==="change")return t}var yc=!1;if(h){var $o;if(h){var Do="oninput"in document;if(!Do){var gc=document.createElement("div");gc.setAttribute("oninput","return;"),Do=typeof gc.oninput=="function"}$o=Do}else $o=!1;yc=$o&&(!document.documentMode||9<document.documentMode)}function vc(){qs&&(qs.detachEvent("onpropertychange",wc),Hs=qs=null)}function wc(e){if(e.propertyName==="value"&&Yi(Hs)){var t=[];mc(t,Hs,e,An(e)),Le(gh,t)}}function wh(e,t,s){e==="focusin"?(vc(),qs=t,Hs=s,qs.attachEvent("onpropertychange",wc)):e==="focusout"&&vc()}function kh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yi(Hs)}function Sh(e,t){if(e==="click")return Yi(t)}function jh(e,t){if(e==="input"||e==="change")return Yi(t)}function xh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Yt=typeof Object.is=="function"?Object.is:xh;function Ws(e,t){if(Yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),o=Object.keys(t);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var c=s[o];if(!y.call(t,c)||!Yt(e[c],t[c]))return!1}return!0}function kc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sc(e,t){var s=kc(e);e=0;for(var o;s;){if(s.nodeType===3){if(o=e+s.textContent.length,e<=t&&o>=t)return{node:s,offset:t-e};e=o}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=kc(s)}}function jc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xc(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=Y(e.document)}return t}function zo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Nh(e){var t=xc(),s=e.focusedElem,o=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&jc(s.ownerDocument.documentElement,s)){if(o!==null&&zo(s)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in s)s.selectionStart=t,s.selectionEnd=Math.min(e,s.value.length);else if(e=(t=s.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var c=s.textContent.length,f=Math.min(o.start,c);o=o.end===void 0?f:Math.min(o.end,c),!e.extend&&f>o&&(c=o,o=f,f=c),c=Sc(s,f);var m=Sc(s,o);c&&m&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(c.node,c.offset),e.removeAllRanges(),f>o?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),e.addRange(t)))}}for(t=[],e=s;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<t.length;s++)e=t[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ch=h&&"documentMode"in document&&11>=document.documentMode,Vr=null,Bo=null,Qs=null,Uo=!1;function Nc(e,t,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Uo||Vr==null||Vr!==Y(o)||(o=Vr,"selectionStart"in o&&zo(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Qs&&Ws(Qs,o)||(Qs=o,o=el(Bo,"onSelect"),0<o.length&&(t=new Lo("onSelect","select",null,t,s),e.push({event:t,listeners:o}),t.target=Vr)))}function Gi(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Kr={animationend:Gi("Animation","AnimationEnd"),animationiteration:Gi("Animation","AnimationIteration"),animationstart:Gi("Animation","AnimationStart"),transitionend:Gi("Transition","TransitionEnd")},Fo={},Cc={};h&&(Cc=document.createElement("div").style,"AnimationEvent"in window||(delete Kr.animationend.animation,delete Kr.animationiteration.animation,delete Kr.animationstart.animation),"TransitionEvent"in window||delete Kr.transitionend.transition);function Xi(e){if(Fo[e])return Fo[e];if(!Kr[e])return e;var t=Kr[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in Cc)return Fo[e]=t[s];return e}var Ec=Xi("animationend"),Oc=Xi("animationiteration"),Tc=Xi("animationstart"),_c=Xi("transitionend"),Ic=new Map,Lc="abort auxClick 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(" ");function Un(e,t){Ic.set(e,t),u(t,[e])}for(var Vo=0;Vo<Lc.length;Vo++){var Ko=Lc[Vo],Eh=Ko.toLowerCase(),Oh=Ko[0].toUpperCase()+Ko.slice(1);Un(Eh,"on"+Oh)}Un(Ec,"onAnimationEnd"),Un(Oc,"onAnimationIteration"),Un(Tc,"onAnimationStart"),Un("dblclick","onDoubleClick"),Un("focusin","onFocus"),Un("focusout","onBlur"),Un(_c,"onTransitionEnd"),d("onMouseEnter",["mouseout","mouseover"]),d("onMouseLeave",["mouseout","mouseover"]),d("onPointerEnter",["pointerout","pointerover"]),d("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Js="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(" "),Th=new Set("cancel close invalid load scroll toggle".split(" ").concat(Js));function Ac(e,t,s){var o=e.type||"unknown-event";e.currentTarget=s,As(o,t,void 0,e),e.currentTarget=null}function Pc(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var o=e[s],c=o.event;o=o.listeners;e:{var f=void 0;if(t)for(var m=o.length-1;0<=m;m--){var v=o[m],w=v.instance,L=v.currentTarget;if(v=v.listener,w!==f&&c.isPropagationStopped())break e;Ac(c,v,L),f=w}else for(m=0;m<o.length;m++){if(v=o[m],w=v.instance,L=v.currentTarget,v=v.listener,w!==f&&c.isPropagationStopped())break e;Ac(c,v,L),f=w}}}if(Rr)throw e=Mn,Rr=!1,Mn=null,e}function Me(e,t){var s=t[Xo];s===void 0&&(s=t[Xo]=new Set);var o=e+"__bubble";s.has(o)||(bc(t,e,2,!1),s.add(o))}function qo(e,t,s){var o=0;t&&(o|=4),bc(s,e,o,t)}var Zi="_reactListening"+Math.random().toString(36).slice(2);function Ys(e){if(!e[Zi]){e[Zi]=!0,l.forEach(function(s){s!=="selectionchange"&&(Th.has(s)||qo(s,!1,e),qo(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zi]||(t[Zi]=!0,qo("selectionchange",!1,t))}}function bc(e,t,s,o){switch(rc(t)){case 1:var c=Fp;break;case 4:c=Vp;break;default:c=To}s=c.bind(null,t,s,e),c=void 0,!Is||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),o?c!==void 0?e.addEventListener(t,s,{capture:!0,passive:c}):e.addEventListener(t,s,!0):c!==void 0?e.addEventListener(t,s,{passive:c}):e.addEventListener(t,s,!1)}function Ho(e,t,s,o,c){var f=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var m=o.tag;if(m===3||m===4){var v=o.stateNode.containerInfo;if(v===c||v.nodeType===8&&v.parentNode===c)break;if(m===4)for(m=o.return;m!==null;){var w=m.tag;if((w===3||w===4)&&(w=m.stateNode.containerInfo,w===c||w.nodeType===8&&w.parentNode===c))return;m=m.return}for(;v!==null;){if(m=cr(v),m===null)return;if(w=m.tag,w===5||w===6){o=f=m;continue e}v=v.parentNode}}o=o.return}Le(function(){var L=f,z=An(s),B=[];e:{var $=Ic.get(e);if($!==void 0){var ee=Lo,se=e;switch(e){case"keypress":if(Wi(s)===0)break e;case"keydown":case"keyup":ee=sh;break;case"focusin":se="focus",ee=bo;break;case"focusout":se="blur",ee=bo;break;case"beforeblur":case"afterblur":ee=bo;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=lc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=Hp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=oh;break;case Ec:case Oc:case Tc:ee=Jp;break;case _c:ee=uh;break;case"scroll":ee=Kp;break;case"wheel":ee=fh;break;case"copy":case"cut":case"paste":ee=Gp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=ac}var ie=(t&4)!==0,Ke=!ie&&e==="scroll",T=ie?$!==null?$+"Capture":null:$;ie=[];for(var j=L,_;j!==null;){_=j;var V=_.stateNode;if(_.tag===5&&V!==null&&(_=V,T!==null&&(V=St(j,T),V!=null&&ie.push(Gs(j,V,_)))),Ke)break;j=j.return}0<ie.length&&($=new ee($,se,null,s,z),B.push({event:$,listeners:ie}))}}if((t&7)===0){e:{if($=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",$&&s!==Ts&&(se=s.relatedTarget||s.fromElement)&&(cr(se)||se[vn]))break e;if((ee||$)&&($=z.window===z?z:($=z.ownerDocument)?$.defaultView||$.parentWindow:window,ee?(se=s.relatedTarget||s.toElement,ee=L,se=se?cr(se):null,se!==null&&(Ke=yn(se),se!==Ke||se.tag!==5&&se.tag!==6)&&(se=null)):(ee=null,se=L),ee!==se)){if(ie=lc,V="onMouseLeave",T="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(ie=ac,V="onPointerLeave",T="onPointerEnter",j="pointer"),Ke=ee==null?$:Wr(ee),_=se==null?$:Wr(se),$=new ie(V,j+"leave",ee,s,z),$.target=Ke,$.relatedTarget=_,V=null,cr(z)===L&&(ie=new ie(T,j+"enter",se,s,z),ie.target=_,ie.relatedTarget=Ke,V=ie),Ke=V,ee&&se)t:{for(ie=ee,T=se,j=0,_=ie;_;_=qr(_))j++;for(_=0,V=T;V;V=qr(V))_++;for(;0<j-_;)ie=qr(ie),j--;for(;0<_-j;)T=qr(T),_--;for(;j--;){if(ie===T||T!==null&&ie===T.alternate)break t;ie=qr(ie),T=qr(T)}ie=null}else ie=null;ee!==null&&Mc(B,$,ee,ie,!1),se!==null&&Ke!==null&&Mc(B,Ke,se,ie,!0)}}e:{if($=L?Wr(L):window,ee=$.nodeName&&$.nodeName.toLowerCase(),ee==="select"||ee==="input"&&$.type==="file")var oe=vh;else if(hc($))if(yc)oe=jh;else{oe=kh;var ue=wh}else(ee=$.nodeName)&&ee.toLowerCase()==="input"&&($.type==="checkbox"||$.type==="radio")&&(oe=Sh);if(oe&&(oe=oe(e,L))){mc(B,oe,s,z);break e}ue&&ue(e,$,L),e==="focusout"&&(ue=$._wrapperState)&&ue.controlled&&$.type==="number"&&Tn($,"number",$.value)}switch(ue=L?Wr(L):window,e){case"focusin":(hc(ue)||ue.contentEditable==="true")&&(Vr=ue,Bo=L,Qs=null);break;case"focusout":Qs=Bo=Vr=null;break;case"mousedown":Uo=!0;break;case"contextmenu":case"mouseup":case"dragend":Uo=!1,Nc(B,s,z);break;case"selectionchange":if(Ch)break;case"keydown":case"keyup":Nc(B,s,z)}var ce;if(Ro)e:{switch(e){case"compositionstart":var me="onCompositionStart";break e;case"compositionend":me="onCompositionEnd";break e;case"compositionupdate":me="onCompositionUpdate";break e}me=void 0}else Fr?dc(e,s)&&(me="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(me="onCompositionStart");me&&(uc&&s.locale!=="ko"&&(Fr||me!=="onCompositionStart"?me==="onCompositionEnd"&&Fr&&(ce=sc()):(Bn=z,Io="value"in Bn?Bn.value:Bn.textContent,Fr=!0)),ue=el(L,me),0<ue.length&&(me=new oc(me,e,null,s,z),B.push({event:me,listeners:ue}),ce?me.data=ce:(ce=pc(s),ce!==null&&(me.data=ce)))),(ce=ph?hh(e,s):mh(e,s))&&(L=el(L,"onBeforeInput"),0<L.length&&(z=new oc("onBeforeInput","beforeinput",null,s,z),B.push({event:z,listeners:L}),z.data=ce))}Pc(B,t)})}function Gs(e,t,s){return{instance:e,listener:t,currentTarget:s}}function el(e,t){for(var s=t+"Capture",o=[];e!==null;){var c=e,f=c.stateNode;c.tag===5&&f!==null&&(c=f,f=St(e,s),f!=null&&o.unshift(Gs(e,f,c)),f=St(e,t),f!=null&&o.push(Gs(e,f,c))),e=e.return}return o}function qr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Mc(e,t,s,o,c){for(var f=t._reactName,m=[];s!==null&&s!==o;){var v=s,w=v.alternate,L=v.stateNode;if(w!==null&&w===o)break;v.tag===5&&L!==null&&(v=L,c?(w=St(s,f),w!=null&&m.unshift(Gs(s,w,v))):c||(w=St(s,f),w!=null&&m.push(Gs(s,w,v)))),s=s.return}m.length!==0&&e.push({event:t,listeners:m})}var _h=/\r\n?/g,Ih=/\u0000|\uFFFD/g;function Rc(e){return(typeof e=="string"?e:""+e).replace(_h,`
38
+ `).replace(Ih,"")}function tl(e,t,s){if(t=Rc(t),Rc(e)!==t&&s)throw Error(r(425))}function nl(){}var Wo=null,Qo=null;function Jo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Yo=typeof setTimeout=="function"?setTimeout:void 0,Lh=typeof clearTimeout=="function"?clearTimeout:void 0,$c=typeof Promise=="function"?Promise:void 0,Ah=typeof queueMicrotask=="function"?queueMicrotask:typeof $c<"u"?function(e){return $c.resolve(null).then(e).catch(Ph)}:Yo;function Ph(e){setTimeout(function(){throw e})}function Go(e,t){var s=t,o=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(o===0){e.removeChild(c),Us(t);return}o--}else s!=="$"&&s!=="$?"&&s!=="$!"||o++;s=c}while(s);Us(t)}function Fn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Dc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(t===0)return e;t--}else s==="/$"&&t++}e=e.previousSibling}return null}var Hr=Math.random().toString(36).slice(2),on="__reactFiber$"+Hr,Xs="__reactProps$"+Hr,vn="__reactContainer$"+Hr,Xo="__reactEvents$"+Hr,bh="__reactListeners$"+Hr,Mh="__reactHandles$"+Hr;function cr(e){var t=e[on];if(t)return t;for(var s=e.parentNode;s;){if(t=s[vn]||s[on]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=Dc(e);e!==null;){if(s=e[on])return s;e=Dc(e)}return t}e=s,s=e.parentNode}return null}function Zs(e){return e=e[on]||e[vn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function rl(e){return e[Xs]||null}var Zo=[],Qr=-1;function Vn(e){return{current:e}}function Re(e){0>Qr||(e.current=Zo[Qr],Zo[Qr]=null,Qr--)}function Pe(e,t){Qr++,Zo[Qr]=e.current,e.current=t}var Kn={},ct=Vn(Kn),jt=Vn(!1),fr=Kn;function Jr(e,t){var s=e.type.contextTypes;if(!s)return Kn;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in s)c[f]=t[f];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}function xt(e){return e=e.childContextTypes,e!=null}function sl(){Re(jt),Re(ct)}function zc(e,t,s){if(ct.current!==Kn)throw Error(r(168));Pe(ct,t),Pe(jt,s)}function Bc(e,t,s){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return s;o=o.getChildContext();for(var c in o)if(!(c in t))throw Error(r(108,Ne(e)||"Unknown",c));return X({},s,o)}function il(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kn,fr=ct.current,Pe(ct,e),Pe(jt,jt.current),!0}function Uc(e,t,s){var o=e.stateNode;if(!o)throw Error(r(169));s?(e=Bc(e,t,fr),o.__reactInternalMemoizedMergedChildContext=e,Re(jt),Re(ct),Pe(ct,e)):Re(jt),Pe(jt,s)}var wn=null,ll=!1,ea=!1;function Fc(e){wn===null?wn=[e]:wn.push(e)}function Rh(e){ll=!0,Fc(e)}function qn(){if(!ea&&wn!==null){ea=!0;var e=0,t=Ae;try{var s=wn;for(Ae=1;e<s.length;e++){var o=s[e];do o=o(!0);while(o!==null)}wn=null,ll=!1}catch(c){throw wn!==null&&(wn=wn.slice(e+1)),zi(bs,qn),c}finally{Ae=t,ea=!1}}return null}var Yr=[],Gr=0,ol=null,al=0,zt=[],Bt=0,dr=null,kn=1,Sn="";function pr(e,t){Yr[Gr++]=al,Yr[Gr++]=ol,ol=e,al=t}function Vc(e,t,s){zt[Bt++]=kn,zt[Bt++]=Sn,zt[Bt++]=dr,dr=e;var o=kn;e=Sn;var c=32-P(o)-1;o&=~(1<<c),s+=1;var f=32-P(t)+c;if(30<f){var m=c-c%5;f=(o&(1<<m)-1).toString(32),o>>=m,c-=m,kn=1<<32-P(t)+c|s<<c|o,Sn=f+e}else kn=1<<f|s<<c|o,Sn=e}function ta(e){e.return!==null&&(pr(e,1),Vc(e,1,0))}function na(e){for(;e===ol;)ol=Yr[--Gr],Yr[Gr]=null,al=Yr[--Gr],Yr[Gr]=null;for(;e===dr;)dr=zt[--Bt],zt[Bt]=null,Sn=zt[--Bt],zt[Bt]=null,kn=zt[--Bt],zt[Bt]=null}var It=null,Lt=null,$e=!1,Gt=null;function Kc(e,t){var s=Kt(5,null,null,0);s.elementType="DELETED",s.stateNode=t,s.return=e,t=e.deletions,t===null?(e.deletions=[s],e.flags|=16):t.push(s)}function qc(e,t){switch(e.tag){case 5:var s=e.type;return t=t.nodeType!==1||s.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,It=e,Lt=Fn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,It=e,Lt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(s=dr!==null?{id:kn,overflow:Sn}:null,e.memoizedState={dehydrated:t,treeContext:s,retryLane:1073741824},s=Kt(18,null,null,0),s.stateNode=t,s.return=e,e.child=s,It=e,Lt=null,!0):!1;default:return!1}}function ra(e){return(e.mode&1)!==0&&(e.flags&128)===0}function sa(e){if($e){var t=Lt;if(t){var s=t;if(!qc(e,t)){if(ra(e))throw Error(r(418));t=Fn(s.nextSibling);var o=It;t&&qc(e,t)?Kc(o,s):(e.flags=e.flags&-4097|2,$e=!1,It=e)}}else{if(ra(e))throw Error(r(418));e.flags=e.flags&-4097|2,$e=!1,It=e}}}function Hc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;It=e}function ul(e){if(e!==It)return!1;if(!$e)return Hc(e),$e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Jo(e.type,e.memoizedProps)),t&&(t=Lt)){if(ra(e))throw Wc(),Error(r(418));for(;t;)Kc(e,t),t=Fn(t.nextSibling)}if(Hc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(t===0){Lt=Fn(e.nextSibling);break e}t--}else s!=="$"&&s!=="$!"&&s!=="$?"||t++}e=e.nextSibling}Lt=null}}else Lt=It?Fn(e.stateNode.nextSibling):null;return!0}function Wc(){for(var e=Lt;e;)e=Fn(e.nextSibling)}function Xr(){Lt=It=null,$e=!1}function ia(e){Gt===null?Gt=[e]:Gt.push(e)}var $h=K.ReactCurrentBatchConfig;function ei(e,t,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(r(309));var o=s.stateNode}if(!o)throw Error(r(147,e));var c=o,f=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===f?t.ref:(t=function(m){var v=c.refs;m===null?delete v[f]:v[f]=m},t._stringRef=f,t)}if(typeof e!="string")throw Error(r(284));if(!s._owner)throw Error(r(290,e))}return e}function cl(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Qc(e){var t=e._init;return t(e._payload)}function Jc(e){function t(T,j){if(e){var _=T.deletions;_===null?(T.deletions=[j],T.flags|=16):_.push(j)}}function s(T,j){if(!e)return null;for(;j!==null;)t(T,j),j=j.sibling;return null}function o(T,j){for(T=new Map;j!==null;)j.key!==null?T.set(j.key,j):T.set(j.index,j),j=j.sibling;return T}function c(T,j){return T=Zn(T,j),T.index=0,T.sibling=null,T}function f(T,j,_){return T.index=_,e?(_=T.alternate,_!==null?(_=_.index,_<j?(T.flags|=2,j):_):(T.flags|=2,j)):(T.flags|=1048576,j)}function m(T){return e&&T.alternate===null&&(T.flags|=2),T}function v(T,j,_,V){return j===null||j.tag!==6?(j=Ya(_,T.mode,V),j.return=T,j):(j=c(j,_),j.return=T,j)}function w(T,j,_,V){var oe=_.type;return oe===q?z(T,j,_.props.children,V,_.key):j!==null&&(j.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===De&&Qc(oe)===j.type)?(V=c(j,_.props),V.ref=ei(T,j,_),V.return=T,V):(V=bl(_.type,_.key,_.props,null,T.mode,V),V.ref=ei(T,j,_),V.return=T,V)}function L(T,j,_,V){return j===null||j.tag!==4||j.stateNode.containerInfo!==_.containerInfo||j.stateNode.implementation!==_.implementation?(j=Ga(_,T.mode,V),j.return=T,j):(j=c(j,_.children||[]),j.return=T,j)}function z(T,j,_,V,oe){return j===null||j.tag!==7?(j=Sr(_,T.mode,V,oe),j.return=T,j):(j=c(j,_),j.return=T,j)}function B(T,j,_){if(typeof j=="string"&&j!==""||typeof j=="number")return j=Ya(""+j,T.mode,_),j.return=T,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case G:return _=bl(j.type,j.key,j.props,null,T.mode,_),_.ref=ei(T,null,j),_.return=T,_;case Q:return j=Ga(j,T.mode,_),j.return=T,j;case De:var V=j._init;return B(T,V(j._payload),_)}if(_n(j)||ne(j))return j=Sr(j,T.mode,_,null),j.return=T,j;cl(T,j)}return null}function $(T,j,_,V){var oe=j!==null?j.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return oe!==null?null:v(T,j,""+_,V);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case G:return _.key===oe?w(T,j,_,V):null;case Q:return _.key===oe?L(T,j,_,V):null;case De:return oe=_._init,$(T,j,oe(_._payload),V)}if(_n(_)||ne(_))return oe!==null?null:z(T,j,_,V,null);cl(T,_)}return null}function ee(T,j,_,V,oe){if(typeof V=="string"&&V!==""||typeof V=="number")return T=T.get(_)||null,v(j,T,""+V,oe);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case G:return T=T.get(V.key===null?_:V.key)||null,w(j,T,V,oe);case Q:return T=T.get(V.key===null?_:V.key)||null,L(j,T,V,oe);case De:var ue=V._init;return ee(T,j,_,ue(V._payload),oe)}if(_n(V)||ne(V))return T=T.get(_)||null,z(j,T,V,oe,null);cl(j,V)}return null}function se(T,j,_,V){for(var oe=null,ue=null,ce=j,me=j=0,nt=null;ce!==null&&me<_.length;me++){ce.index>me?(nt=ce,ce=null):nt=ce.sibling;var Te=$(T,ce,_[me],V);if(Te===null){ce===null&&(ce=nt);break}e&&ce&&Te.alternate===null&&t(T,ce),j=f(Te,j,me),ue===null?oe=Te:ue.sibling=Te,ue=Te,ce=nt}if(me===_.length)return s(T,ce),$e&&pr(T,me),oe;if(ce===null){for(;me<_.length;me++)ce=B(T,_[me],V),ce!==null&&(j=f(ce,j,me),ue===null?oe=ce:ue.sibling=ce,ue=ce);return $e&&pr(T,me),oe}for(ce=o(T,ce);me<_.length;me++)nt=ee(ce,T,me,_[me],V),nt!==null&&(e&&nt.alternate!==null&&ce.delete(nt.key===null?me:nt.key),j=f(nt,j,me),ue===null?oe=nt:ue.sibling=nt,ue=nt);return e&&ce.forEach(function(er){return t(T,er)}),$e&&pr(T,me),oe}function ie(T,j,_,V){var oe=ne(_);if(typeof oe!="function")throw Error(r(150));if(_=oe.call(_),_==null)throw Error(r(151));for(var ue=oe=null,ce=j,me=j=0,nt=null,Te=_.next();ce!==null&&!Te.done;me++,Te=_.next()){ce.index>me?(nt=ce,ce=null):nt=ce.sibling;var er=$(T,ce,Te.value,V);if(er===null){ce===null&&(ce=nt);break}e&&ce&&er.alternate===null&&t(T,ce),j=f(er,j,me),ue===null?oe=er:ue.sibling=er,ue=er,ce=nt}if(Te.done)return s(T,ce),$e&&pr(T,me),oe;if(ce===null){for(;!Te.done;me++,Te=_.next())Te=B(T,Te.value,V),Te!==null&&(j=f(Te,j,me),ue===null?oe=Te:ue.sibling=Te,ue=Te);return $e&&pr(T,me),oe}for(ce=o(T,ce);!Te.done;me++,Te=_.next())Te=ee(ce,T,me,Te.value,V),Te!==null&&(e&&Te.alternate!==null&&ce.delete(Te.key===null?me:Te.key),j=f(Te,j,me),ue===null?oe=Te:ue.sibling=Te,ue=Te);return e&&ce.forEach(function(ym){return t(T,ym)}),$e&&pr(T,me),oe}function Ke(T,j,_,V){if(typeof _=="object"&&_!==null&&_.type===q&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case G:e:{for(var oe=_.key,ue=j;ue!==null;){if(ue.key===oe){if(oe=_.type,oe===q){if(ue.tag===7){s(T,ue.sibling),j=c(ue,_.props.children),j.return=T,T=j;break e}}else if(ue.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===De&&Qc(oe)===ue.type){s(T,ue.sibling),j=c(ue,_.props),j.ref=ei(T,ue,_),j.return=T,T=j;break e}s(T,ue);break}else t(T,ue);ue=ue.sibling}_.type===q?(j=Sr(_.props.children,T.mode,V,_.key),j.return=T,T=j):(V=bl(_.type,_.key,_.props,null,T.mode,V),V.ref=ei(T,j,_),V.return=T,T=V)}return m(T);case Q:e:{for(ue=_.key;j!==null;){if(j.key===ue)if(j.tag===4&&j.stateNode.containerInfo===_.containerInfo&&j.stateNode.implementation===_.implementation){s(T,j.sibling),j=c(j,_.children||[]),j.return=T,T=j;break e}else{s(T,j);break}else t(T,j);j=j.sibling}j=Ga(_,T.mode,V),j.return=T,T=j}return m(T);case De:return ue=_._init,Ke(T,j,ue(_._payload),V)}if(_n(_))return se(T,j,_,V);if(ne(_))return ie(T,j,_,V);cl(T,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,j!==null&&j.tag===6?(s(T,j.sibling),j=c(j,_),j.return=T,T=j):(s(T,j),j=Ya(_,T.mode,V),j.return=T,T=j),m(T)):s(T,j)}return Ke}var Zr=Jc(!0),Yc=Jc(!1),fl=Vn(null),dl=null,es=null,la=null;function oa(){la=es=dl=null}function aa(e){var t=fl.current;Re(fl),e._currentValue=t}function ua(e,t,s){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===s)break;e=e.return}}function ts(e,t){dl=e,la=es=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Nt=!0),e.firstContext=null)}function Ut(e){var t=e._currentValue;if(la!==e)if(e={context:e,memoizedValue:t,next:null},es===null){if(dl===null)throw Error(r(308));es=e,dl.dependencies={lanes:0,firstContext:e}}else es=es.next=e;return t}var hr=null;function ca(e){hr===null?hr=[e]:hr.push(e)}function Gc(e,t,s,o){var c=t.interleaved;return c===null?(s.next=s,ca(t)):(s.next=c.next,c.next=s),t.interleaved=s,jn(e,o)}function jn(e,t){e.lanes|=t;var s=e.alternate;for(s!==null&&(s.lanes|=t),s=e,e=e.return;e!==null;)e.childLanes|=t,s=e.alternate,s!==null&&(s.childLanes|=t),s=e,e=e.return;return s.tag===3?s.stateNode:null}var Hn=!1;function fa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function xn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wn(e,t,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ee&2)!==0){var c=o.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),o.pending=t,jn(e,s)}return c=o.interleaved,c===null?(t.next=t,ca(o)):(t.next=c.next,c.next=t),o.interleaved=t,jn(e,s)}function pl(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,Co(e,s)}}function Zc(e,t){var s=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var c=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var m={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};f===null?c=f=m:f=f.next=m,s=s.next}while(s!==null);f===null?c=f=t:f=f.next=t}else c=f=t;s={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:o.shared,effects:o.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function hl(e,t,s,o){var c=e.updateQueue;Hn=!1;var f=c.firstBaseUpdate,m=c.lastBaseUpdate,v=c.shared.pending;if(v!==null){c.shared.pending=null;var w=v,L=w.next;w.next=null,m===null?f=L:m.next=L,m=w;var z=e.alternate;z!==null&&(z=z.updateQueue,v=z.lastBaseUpdate,v!==m&&(v===null?z.firstBaseUpdate=L:v.next=L,z.lastBaseUpdate=w))}if(f!==null){var B=c.baseState;m=0,z=L=w=null,v=f;do{var $=v.lane,ee=v.eventTime;if((o&$)===$){z!==null&&(z=z.next={eventTime:ee,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var se=e,ie=v;switch($=t,ee=s,ie.tag){case 1:if(se=ie.payload,typeof se=="function"){B=se.call(ee,B,$);break e}B=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=ie.payload,$=typeof se=="function"?se.call(ee,B,$):se,$==null)break e;B=X({},B,$);break e;case 2:Hn=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,$=c.effects,$===null?c.effects=[v]:$.push(v))}else ee={eventTime:ee,lane:$,tag:v.tag,payload:v.payload,callback:v.callback,next:null},z===null?(L=z=ee,w=B):z=z.next=ee,m|=$;if(v=v.next,v===null){if(v=c.shared.pending,v===null)break;$=v,v=$.next,$.next=null,c.lastBaseUpdate=$,c.shared.pending=null}}while(!0);if(z===null&&(w=B),c.baseState=w,c.firstBaseUpdate=L,c.lastBaseUpdate=z,t=c.shared.interleaved,t!==null){c=t;do m|=c.lane,c=c.next;while(c!==t)}else f===null&&(c.shared.lanes=0);gr|=m,e.lanes=m,e.memoizedState=B}}function ef(e,t,s){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],c=o.callback;if(c!==null){if(o.callback=null,o=s,typeof c!="function")throw Error(r(191,c));c.call(o)}}}var ti={},an=Vn(ti),ni=Vn(ti),ri=Vn(ti);function mr(e){if(e===ti)throw Error(r(174));return e}function da(e,t){switch(Pe(ri,t),Pe(ni,e),Pe(an,ti),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ir(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ir(t,e)}Re(an),Pe(an,t)}function ns(){Re(an),Re(ni),Re(ri)}function tf(e){mr(ri.current);var t=mr(an.current),s=ir(t,e.type);t!==s&&(Pe(ni,e),Pe(an,s))}function pa(e){ni.current===e&&(Re(an),Re(ni))}var Be=Vn(0);function ml(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ha=[];function ma(){for(var e=0;e<ha.length;e++)ha[e]._workInProgressVersionPrimary=null;ha.length=0}var yl=K.ReactCurrentDispatcher,ya=K.ReactCurrentBatchConfig,yr=0,Ue=null,Xe=null,et=null,gl=!1,si=!1,ii=0,Dh=0;function ft(){throw Error(r(321))}function ga(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!Yt(e[s],t[s]))return!1;return!0}function va(e,t,s,o,c,f){if(yr=f,Ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,yl.current=e===null||e.memoizedState===null?Fh:Vh,e=s(o,c),si){f=0;do{if(si=!1,ii=0,25<=f)throw Error(r(301));f+=1,et=Xe=null,t.updateQueue=null,yl.current=Kh,e=s(o,c)}while(si)}if(yl.current=kl,t=Xe!==null&&Xe.next!==null,yr=0,et=Xe=Ue=null,gl=!1,t)throw Error(r(300));return e}function wa(){var e=ii!==0;return ii=0,e}function un(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?Ue.memoizedState=et=e:et=et.next=e,et}function Ft(){if(Xe===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=et===null?Ue.memoizedState:et.next;if(t!==null)et=t,Xe=e;else{if(e===null)throw Error(r(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},et===null?Ue.memoizedState=et=e:et=et.next=e}return et}function li(e,t){return typeof t=="function"?t(e):t}function ka(e){var t=Ft(),s=t.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=e;var o=Xe,c=o.baseQueue,f=s.pending;if(f!==null){if(c!==null){var m=c.next;c.next=f.next,f.next=m}o.baseQueue=c=f,s.pending=null}if(c!==null){f=c.next,o=o.baseState;var v=m=null,w=null,L=f;do{var z=L.lane;if((yr&z)===z)w!==null&&(w=w.next={lane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),o=L.hasEagerState?L.eagerState:e(o,L.action);else{var B={lane:z,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null};w===null?(v=w=B,m=o):w=w.next=B,Ue.lanes|=z,gr|=z}L=L.next}while(L!==null&&L!==f);w===null?m=o:w.next=v,Yt(o,t.memoizedState)||(Nt=!0),t.memoizedState=o,t.baseState=m,t.baseQueue=w,s.lastRenderedState=o}if(e=s.interleaved,e!==null){c=e;do f=c.lane,Ue.lanes|=f,gr|=f,c=c.next;while(c!==e)}else c===null&&(s.lanes=0);return[t.memoizedState,s.dispatch]}function Sa(e){var t=Ft(),s=t.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=e;var o=s.dispatch,c=s.pending,f=t.memoizedState;if(c!==null){s.pending=null;var m=c=c.next;do f=e(f,m.action),m=m.next;while(m!==c);Yt(f,t.memoizedState)||(Nt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,o]}function nf(){}function rf(e,t){var s=Ue,o=Ft(),c=t(),f=!Yt(o.memoizedState,c);if(f&&(o.memoizedState=c,Nt=!0),o=o.queue,ja(of.bind(null,s,o,e),[e]),o.getSnapshot!==t||f||et!==null&&et.memoizedState.tag&1){if(s.flags|=2048,oi(9,lf.bind(null,s,o,c,t),void 0,null),tt===null)throw Error(r(349));(yr&30)!==0||sf(s,t,c)}return c}function sf(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Ue.updateQueue,t===null?(t={lastEffect:null,stores:null},Ue.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function lf(e,t,s,o){t.value=s,t.getSnapshot=o,af(t)&&uf(e)}function of(e,t,s){return s(function(){af(t)&&uf(e)})}function af(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!Yt(e,s)}catch{return!0}}function uf(e){var t=jn(e,1);t!==null&&tn(t,e,1,-1)}function cf(e){var t=un();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:li,lastRenderedState:e},t.queue=e,e=e.dispatch=Uh.bind(null,Ue,e),[t.memoizedState,e]}function oi(e,t,s,o){return e={tag:e,create:t,destroy:s,deps:o,next:null},t=Ue.updateQueue,t===null?(t={lastEffect:null,stores:null},Ue.updateQueue=t,t.lastEffect=e.next=e):(s=t.lastEffect,s===null?t.lastEffect=e.next=e:(o=s.next,s.next=e,e.next=o,t.lastEffect=e)),e}function ff(){return Ft().memoizedState}function vl(e,t,s,o){var c=un();Ue.flags|=e,c.memoizedState=oi(1|t,s,void 0,o===void 0?null:o)}function wl(e,t,s,o){var c=Ft();o=o===void 0?null:o;var f=void 0;if(Xe!==null){var m=Xe.memoizedState;if(f=m.destroy,o!==null&&ga(o,m.deps)){c.memoizedState=oi(t,s,f,o);return}}Ue.flags|=e,c.memoizedState=oi(1|t,s,f,o)}function df(e,t){return vl(8390656,8,e,t)}function ja(e,t){return wl(2048,8,e,t)}function pf(e,t){return wl(4,2,e,t)}function hf(e,t){return wl(4,4,e,t)}function mf(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function yf(e,t,s){return s=s!=null?s.concat([e]):null,wl(4,4,mf.bind(null,t,e),s)}function xa(){}function gf(e,t){var s=Ft();t=t===void 0?null:t;var o=s.memoizedState;return o!==null&&t!==null&&ga(t,o[1])?o[0]:(s.memoizedState=[e,t],e)}function vf(e,t){var s=Ft();t=t===void 0?null:t;var o=s.memoizedState;return o!==null&&t!==null&&ga(t,o[1])?o[0]:(e=e(),s.memoizedState=[e,t],e)}function wf(e,t,s){return(yr&21)===0?(e.baseState&&(e.baseState=!1,Nt=!0),e.memoizedState=s):(Yt(s,t)||(s=Rs(),Ue.lanes|=s,gr|=s,e.baseState=!0),t)}function zh(e,t){var s=Ae;Ae=s!==0&&4>s?s:4,e(!0);var o=ya.transition;ya.transition={};try{e(!1),t()}finally{Ae=s,ya.transition=o}}function kf(){return Ft().memoizedState}function Bh(e,t,s){var o=Gn(e);if(s={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null},Sf(e))jf(t,s);else if(s=Gc(e,t,s,o),s!==null){var c=gt();tn(s,e,o,c),xf(s,t,o)}}function Uh(e,t,s){var o=Gn(e),c={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null};if(Sf(e))jf(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var m=t.lastRenderedState,v=f(m,s);if(c.hasEagerState=!0,c.eagerState=v,Yt(v,m)){var w=t.interleaved;w===null?(c.next=c,ca(t)):(c.next=w.next,w.next=c),t.interleaved=c;return}}catch{}finally{}s=Gc(e,t,c,o),s!==null&&(c=gt(),tn(s,e,o,c),xf(s,t,o))}}function Sf(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function jf(e,t){si=gl=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function xf(e,t,s){if((s&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,Co(e,s)}}var kl={readContext:Ut,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useInsertionEffect:ft,useLayoutEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useMutableSource:ft,useSyncExternalStore:ft,useId:ft,unstable_isNewReconciler:!1},Fh={readContext:Ut,useCallback:function(e,t){return un().memoizedState=[e,t===void 0?null:t],e},useContext:Ut,useEffect:df,useImperativeHandle:function(e,t,s){return s=s!=null?s.concat([e]):null,vl(4194308,4,mf.bind(null,t,e),s)},useLayoutEffect:function(e,t){return vl(4194308,4,e,t)},useInsertionEffect:function(e,t){return vl(4,2,e,t)},useMemo:function(e,t){var s=un();return t=t===void 0?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var o=un();return t=s!==void 0?s(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=Bh.bind(null,Ue,e),[o.memoizedState,e]},useRef:function(e){var t=un();return e={current:e},t.memoizedState=e},useState:cf,useDebugValue:xa,useDeferredValue:function(e){return un().memoizedState=e},useTransition:function(){var e=cf(!1),t=e[0];return e=zh.bind(null,e[1]),un().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var o=Ue,c=un();if($e){if(s===void 0)throw Error(r(407));s=s()}else{if(s=t(),tt===null)throw Error(r(349));(yr&30)!==0||sf(o,t,s)}c.memoizedState=s;var f={value:s,getSnapshot:t};return c.queue=f,df(of.bind(null,o,f,e),[e]),o.flags|=2048,oi(9,lf.bind(null,o,f,s,t),void 0,null),s},useId:function(){var e=un(),t=tt.identifierPrefix;if($e){var s=Sn,o=kn;s=(o&~(1<<32-P(o)-1)).toString(32)+s,t=":"+t+"R"+s,s=ii++,0<s&&(t+="H"+s.toString(32)),t+=":"}else s=Dh++,t=":"+t+"r"+s.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Vh={readContext:Ut,useCallback:gf,useContext:Ut,useEffect:ja,useImperativeHandle:yf,useInsertionEffect:pf,useLayoutEffect:hf,useMemo:vf,useReducer:ka,useRef:ff,useState:function(){return ka(li)},useDebugValue:xa,useDeferredValue:function(e){var t=Ft();return wf(t,Xe.memoizedState,e)},useTransition:function(){var e=ka(li)[0],t=Ft().memoizedState;return[e,t]},useMutableSource:nf,useSyncExternalStore:rf,useId:kf,unstable_isNewReconciler:!1},Kh={readContext:Ut,useCallback:gf,useContext:Ut,useEffect:ja,useImperativeHandle:yf,useInsertionEffect:pf,useLayoutEffect:hf,useMemo:vf,useReducer:Sa,useRef:ff,useState:function(){return Sa(li)},useDebugValue:xa,useDeferredValue:function(e){var t=Ft();return Xe===null?t.memoizedState=e:wf(t,Xe.memoizedState,e)},useTransition:function(){var e=Sa(li)[0],t=Ft().memoizedState;return[e,t]},useMutableSource:nf,useSyncExternalStore:rf,useId:kf,unstable_isNewReconciler:!1};function Xt(e,t){if(e&&e.defaultProps){t=X({},t),e=e.defaultProps;for(var s in e)t[s]===void 0&&(t[s]=e[s]);return t}return t}function Na(e,t,s,o){t=e.memoizedState,s=s(o,t),s=s==null?t:X({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Sl={isMounted:function(e){return(e=e._reactInternals)?yn(e)===e:!1},enqueueSetState:function(e,t,s){e=e._reactInternals;var o=gt(),c=Gn(e),f=xn(o,c);f.payload=t,s!=null&&(f.callback=s),t=Wn(e,f,c),t!==null&&(tn(t,e,c,o),pl(t,e,c))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var o=gt(),c=Gn(e),f=xn(o,c);f.tag=1,f.payload=t,s!=null&&(f.callback=s),t=Wn(e,f,c),t!==null&&(tn(t,e,c,o),pl(t,e,c))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=gt(),o=Gn(e),c=xn(s,o);c.tag=2,t!=null&&(c.callback=t),t=Wn(e,c,o),t!==null&&(tn(t,e,o,s),pl(t,e,o))}};function Nf(e,t,s,o,c,f,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,f,m):t.prototype&&t.prototype.isPureReactComponent?!Ws(s,o)||!Ws(c,f):!0}function Cf(e,t,s){var o=!1,c=Kn,f=t.contextType;return typeof f=="object"&&f!==null?f=Ut(f):(c=xt(t)?fr:ct.current,o=t.contextTypes,f=(o=o!=null)?Jr(e,c):Kn),t=new t(s,f),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Sl,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=c,e.__reactInternalMemoizedMaskedChildContext=f),t}function Ef(e,t,s,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,o),t.state!==e&&Sl.enqueueReplaceState(t,t.state,null)}function Ca(e,t,s,o){var c=e.stateNode;c.props=s,c.state=e.memoizedState,c.refs={},fa(e);var f=t.contextType;typeof f=="object"&&f!==null?c.context=Ut(f):(f=xt(t)?fr:ct.current,c.context=Jr(e,f)),c.state=e.memoizedState,f=t.getDerivedStateFromProps,typeof f=="function"&&(Na(e,t,f,s),c.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(t=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),t!==c.state&&Sl.enqueueReplaceState(c,c.state,null),hl(e,s,c,o),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function rs(e,t){try{var s="",o=t;do s+=ye(o),o=o.return;while(o);var c=s}catch(f){c=`
39
39
  Error generating stack: `+f.message+`
40
- `+f.stack}return{value:e,source:t,stack:c,digest:null}}function Ca(e,t,s){return{value:e,source:null,stack:s??null,digest:t??null}}function Ea(e,t){try{console.error(t.value)}catch(s){setTimeout(function(){throw s})}}var qh=typeof WeakMap=="function"?WeakMap:Map;function Of(e,t,s){s=xn(-1,s),s.tag=3,s.payload={element:null};var o=t.value;return s.callback=function(){Tl||(Tl=!0,Ua=o),Ea(e,t)},s}function Tf(e,t,s){s=xn(-1,s),s.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var c=t.value;s.payload=function(){return o(c)},s.callback=function(){Ea(e,t)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(s.callback=function(){Ea(e,t),typeof o!="function"&&(Jn===null?Jn=new Set([this]):Jn.add(this));var m=t.stack;this.componentDidCatch(t.value,{componentStack:m!==null?m:""})}),s}function _f(e,t,s){var o=e.pingCache;if(o===null){o=e.pingCache=new qh;var c=new Set;o.set(t,c)}else c=o.get(t),c===void 0&&(c=new Set,o.set(t,c));c.has(s)||(c.add(s),e=im.bind(null,e,t,s),t.then(e,e))}function If(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Lf(e,t,s,o,c){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(t=xn(-1,1),t.tag=2,Wn(s,t,1))),s.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var Hh=K.ReactCurrentOwner,xt=!1;function yt(e,t,s,o){t.child=e===null?Yc(t,null,s,o):Zr(t,e.child,s,o)}function Af(e,t,s,o,c){s=s.render;var f=t.ref;return ts(t,c),o=ga(e,t,s,o,f,c),s=va(),e!==null&&!xt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Nn(e,t,c)):($e&&s&&ea(t),t.flags|=1,yt(e,t,o,c),t.child)}function Pf(e,t,s,o,c){if(e===null){var f=s.type;return typeof f=="function"&&!Qa(f)&&f.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(t.tag=15,t.type=f,bf(e,t,f,o,c)):(e=bl(s.type,null,o,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,(e.lanes&c)===0){var m=f.memoizedProps;if(s=s.compare,s=s!==null?s:Hs,s(m,o)&&e.ref===t.ref)return Nn(e,t,c)}return t.flags|=1,e=Zn(f,o),e.ref=t.ref,e.return=t,t.child=e}function bf(e,t,s,o,c){if(e!==null){var f=e.memoizedProps;if(Hs(f,o)&&e.ref===t.ref)if(xt=!1,t.pendingProps=o=f,(e.lanes&c)!==0)(e.flags&131072)!==0&&(xt=!0);else return t.lanes=e.lanes,Nn(e,t,c)}return Oa(e,t,s,o,c)}function Mf(e,t,s){var o=t.pendingProps,c=o.children,f=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Pe(is,Lt),Lt|=s;else{if((s&1073741824)===0)return e=f!==null?f.baseLanes|s:s,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Pe(is,Lt),Lt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=f!==null?f.baseLanes:s,Pe(is,Lt),Lt|=o}else f!==null?(o=f.baseLanes|s,t.memoizedState=null):o=s,Pe(is,Lt),Lt|=o;return yt(e,t,c,s),t.child}function Rf(e,t){var s=t.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(t.flags|=512,t.flags|=2097152)}function Oa(e,t,s,o,c){var f=jt(s)?fr:ct.current;return f=Jr(t,f),ts(t,c),s=ga(e,t,s,o,f,c),o=va(),e!==null&&!xt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Nn(e,t,c)):($e&&o&&ea(t),t.flags|=1,yt(e,t,s,c),t.child)}function $f(e,t,s,o,c){if(jt(s)){var f=!0;il(t)}else f=!1;if(ts(t,c),t.stateNode===null)xl(e,t),Cf(t,s,o),Na(t,s,o,c),o=!0;else if(e===null){var m=t.stateNode,v=t.memoizedProps;m.props=v;var w=m.context,L=s.contextType;typeof L=="object"&&L!==null?L=Bt(L):(L=jt(s)?fr:ct.current,L=Jr(t,L));var z=s.getDerivedStateFromProps,B=typeof z=="function"||typeof m.getSnapshotBeforeUpdate=="function";B||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(v!==o||w!==L)&&Ef(t,m,o,L),Hn=!1;var $=t.memoizedState;m.state=$,hl(t,o,m,c),w=t.memoizedState,v!==o||$!==w||St.current||Hn?(typeof z=="function"&&(xa(t,s,z,o),w=t.memoizedState),(v=Hn||Nf(t,s,v,o,$,w,L))?(B||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=w),m.props=o,m.state=w,m.context=L,o=v):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{m=t.stateNode,Xc(e,t),v=t.memoizedProps,L=t.type===t.elementType?v:Gt(t.type,v),m.props=L,B=t.pendingProps,$=m.context,w=s.contextType,typeof w=="object"&&w!==null?w=Bt(w):(w=jt(s)?fr:ct.current,w=Jr(t,w));var ee=s.getDerivedStateFromProps;(z=typeof ee=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(v!==B||$!==w)&&Ef(t,m,o,w),Hn=!1,$=t.memoizedState,m.state=$,hl(t,o,m,c);var se=t.memoizedState;v!==B||$!==se||St.current||Hn?(typeof ee=="function"&&(xa(t,s,ee,o),se=t.memoizedState),(L=Hn||Nf(t,s,L,o,$,se,w)||!1)?(z||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(o,se,w),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(o,se,w)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=se),m.props=o,m.state=se,m.context=w,o=L):(typeof m.componentDidUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),o=!1)}return Ta(e,t,s,o,f,c)}function Ta(e,t,s,o,c,f){Rf(e,t);var m=(t.flags&128)!==0;if(!o&&!m)return c&&Uc(t,s,!1),Nn(e,t,f);o=t.stateNode,Hh.current=t;var v=m&&typeof s.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&m?(t.child=Zr(t,e.child,null,f),t.child=Zr(t,null,v,f)):yt(e,t,v,f),t.memoizedState=o.state,c&&Uc(t,s,!0),t.child}function Df(e){var t=e.stateNode;t.pendingContext?zc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&zc(e,t.context,!1),fa(e,t.containerInfo)}function zf(e,t,s,o,c){return Xr(),sa(c),t.flags|=256,yt(e,t,s,o),t.child}var _a={dehydrated:null,treeContext:null,retryLane:0};function Ia(e){return{baseLanes:e,cachePool:null,transitions:null}}function Bf(e,t,s){var o=t.pendingProps,c=Be.current,f=!1,m=(t.flags&128)!==0,v;if((v=m)||(v=e!==null&&e.memoizedState===null?!1:(c&2)!==0),v?(f=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),Pe(Be,c&1),e===null)return ra(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(m=o.children,e=o.fallback,f?(o=t.mode,f=t.child,m={mode:"hidden",children:m},(o&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=m):f=Ml(m,o,0,null),e=Sr(e,o,s,null),f.return=t,e.return=t,f.sibling=e,t.child=f,t.child.memoizedState=Ia(s),t.memoizedState=_a,e):La(t,m));if(c=e.memoizedState,c!==null&&(v=c.dehydrated,v!==null))return Wh(e,t,m,o,v,c,s);if(f){f=o.fallback,m=t.mode,c=e.child,v=c.sibling;var w={mode:"hidden",children:o.children};return(m&1)===0&&t.child!==c?(o=t.child,o.childLanes=0,o.pendingProps=w,t.deletions=null):(o=Zn(c,w),o.subtreeFlags=c.subtreeFlags&14680064),v!==null?f=Zn(v,f):(f=Sr(f,m,s,null),f.flags|=2),f.return=t,o.return=t,o.sibling=f,t.child=o,o=f,f=t.child,m=e.child.memoizedState,m=m===null?Ia(s):{baseLanes:m.baseLanes|s,cachePool:null,transitions:m.transitions},f.memoizedState=m,f.childLanes=e.childLanes&~s,t.memoizedState=_a,o}return f=e.child,e=f.sibling,o=Zn(f,{mode:"visible",children:o.children}),(t.mode&1)===0&&(o.lanes=s),o.return=t,o.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=o,t.memoizedState=null,o}function La(e,t){return t=Ml({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function jl(e,t,s,o){return o!==null&&sa(o),Zr(t,e.child,null,s),e=La(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Wh(e,t,s,o,c,f,m){if(s)return t.flags&256?(t.flags&=-257,o=Ca(Error(r(422))),jl(e,t,m,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(f=o.fallback,c=t.mode,o=Ml({mode:"visible",children:o.children},c,0,null),f=Sr(f,c,m,null),f.flags|=2,o.return=t,f.return=t,o.sibling=f,t.child=o,(t.mode&1)!==0&&Zr(t,e.child,null,m),t.child.memoizedState=Ia(m),t.memoizedState=_a,f);if((t.mode&1)===0)return jl(e,t,m,null);if(c.data==="$!"){if(o=c.nextSibling&&c.nextSibling.dataset,o)var v=o.dgst;return o=v,f=Error(r(419)),o=Ca(f,o,void 0),jl(e,t,m,o)}if(v=(m&e.childLanes)!==0,xt||v){if(o=tt,o!==null){switch(m&-m){case 4:c=2;break;case 16:c=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(o.suspendedLanes|m))!==0?0:c,c!==0&&c!==f.retryLane&&(f.retryLane=c,jn(e,c),en(o,e,c,-1))}return Wa(),o=Ca(Error(r(421))),jl(e,t,m,o)}return c.data==="$?"?(t.flags|=128,t.child=e.child,t=lm.bind(null,e),c._reactRetry=t,null):(e=f.treeContext,It=Fn(c.nextSibling),_t=t,$e=!0,Yt=null,e!==null&&(Dt[zt++]=kn,Dt[zt++]=Sn,Dt[zt++]=dr,kn=e.id,Sn=e.overflow,dr=t),t=La(t,o.children),t.flags|=4096,t)}function Uf(e,t,s){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),aa(e.return,t,s)}function Aa(e,t,s,o,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:c}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=o,f.tail=s,f.tailMode=c)}function Ff(e,t,s){var o=t.pendingProps,c=o.revealOrder,f=o.tail;if(yt(e,t,o.children,s),o=Be.current,(o&2)!==0)o=o&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Uf(e,s,t);else if(e.tag===19)Uf(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(Pe(Be,o),(t.mode&1)===0)t.memoizedState=null;else switch(c){case"forwards":for(s=t.child,c=null;s!==null;)e=s.alternate,e!==null&&ml(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=t.child,t.child=null):(c=s.sibling,s.sibling=null),Aa(t,!1,c,s,f);break;case"backwards":for(s=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&ml(e)===null){t.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}Aa(t,!0,s,null,f);break;case"together":Aa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function xl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Nn(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),gr|=t.lanes,(s&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,s=Zn(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=Zn(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Qh(e,t,s){switch(t.tag){case 3:Df(t),Xr();break;case 5:tf(t);break;case 1:jt(t.type)&&il(t);break;case 4:fa(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,c=t.memoizedProps.value;Pe(fl,o._currentValue),o._currentValue=c;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Pe(Be,Be.current&1),t.flags|=128,null):(s&t.child.childLanes)!==0?Bf(e,t,s):(Pe(Be,Be.current&1),e=Nn(e,t,s),e!==null?e.sibling:null);Pe(Be,Be.current&1);break;case 19:if(o=(s&t.childLanes)!==0,(e.flags&128)!==0){if(o)return Ff(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Pe(Be,Be.current),o)break;return null;case 22:case 23:return t.lanes=0,Mf(e,t,s)}return Nn(e,t,s)}var Vf,Pa,Kf,qf;Vf=function(e,t){for(var s=t.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},Pa=function(){},Kf=function(e,t,s,o){var c=e.memoizedProps;if(c!==o){e=t.stateNode,mr(an.current);var f=null;switch(s){case"input":c=Se(e,c),o=Se(e,o),f=[];break;case"select":c=X({},c,{value:void 0}),o=X({},o,{value:void 0}),f=[];break;case"textarea":c=Cs(e,c),o=Cs(e,o),f=[];break;default:typeof c.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=nl)}Os(s,o);var m;s=null;for(L in c)if(!o.hasOwnProperty(L)&&c.hasOwnProperty(L)&&c[L]!=null)if(L==="style"){var v=c[L];for(m in v)v.hasOwnProperty(m)&&(s||(s={}),s[m]="")}else L!=="dangerouslySetInnerHTML"&&L!=="children"&&L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&L!=="autoFocus"&&(a.hasOwnProperty(L)?f||(f=[]):(f=f||[]).push(L,null));for(L in o){var w=o[L];if(v=c!=null?c[L]:void 0,o.hasOwnProperty(L)&&w!==v&&(w!=null||v!=null))if(L==="style")if(v){for(m in v)!v.hasOwnProperty(m)||w&&w.hasOwnProperty(m)||(s||(s={}),s[m]="");for(m in w)w.hasOwnProperty(m)&&v[m]!==w[m]&&(s||(s={}),s[m]=w[m])}else s||(f||(f=[]),f.push(L,s)),s=w;else L==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,v=v?v.__html:void 0,w!=null&&v!==w&&(f=f||[]).push(L,w)):L==="children"?typeof w!="string"&&typeof w!="number"||(f=f||[]).push(L,""+w):L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&(a.hasOwnProperty(L)?(w!=null&&L==="onScroll"&&Me("scroll",e),f||v===w||(f=[])):(f=f||[]).push(L,w))}s&&(f=f||[]).push("style",s);var L=f;(t.updateQueue=L)&&(t.flags|=4)}},qf=function(e,t,s,o){s!==o&&(t.flags|=4)};function oi(e,t){if(!$e)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,o=0;if(t)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,o|=c.subtreeFlags&14680064,o|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,o|=c.subtreeFlags,o|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=o,e.childLanes=s,t}function Jh(e,t,s){var o=t.pendingProps;switch(ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return jt(t.type)&&sl(),dt(t),null;case 3:return o=t.stateNode,ns(),Re(St),Re(ct),ha(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(ul(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Yt!==null&&(Ka(Yt),Yt=null))),Pa(e,t),dt(t),null;case 5:da(t);var c=mr(ni.current);if(s=t.type,e!==null&&t.stateNode!=null)Kf(e,t,s,o,c),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(r(166));return dt(t),null}if(e=mr(an.current),ul(t)){o=t.stateNode,s=t.type;var f=t.memoizedProps;switch(o[on]=t,o[Gs]=f,e=(t.mode&1)!==0,s){case"dialog":Me("cancel",o),Me("close",o);break;case"iframe":case"object":case"embed":Me("load",o);break;case"video":case"audio":for(c=0;c<Qs.length;c++)Me(Qs[c],o);break;case"source":Me("error",o);break;case"img":case"image":case"link":Me("error",o),Me("load",o);break;case"details":Me("toggle",o);break;case"input":st(o,f),Me("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!f.multiple},Me("invalid",o);break;case"textarea":Es(o,f),Me("invalid",o)}Os(s,f),c=null;for(var m in f)if(f.hasOwnProperty(m)){var v=f[m];m==="children"?typeof v=="string"?o.textContent!==v&&(f.suppressHydrationWarning!==!0&&tl(o.textContent,v,e),c=["children",v]):typeof v=="number"&&o.textContent!==""+v&&(f.suppressHydrationWarning!==!0&&tl(o.textContent,v,e),c=["children",""+v]):a.hasOwnProperty(m)&&v!=null&&m==="onScroll"&&Me("scroll",o)}switch(s){case"input":rn(o),sn(o,f,!0);break;case"textarea":rn(o),kt(o);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(o.onclick=nl)}o=c,t.updateQueue=o,o!==null&&(t.flags|=4)}else{m=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ot(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=m.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=m.createElement(s,{is:o.is}):(e=m.createElement(s),s==="select"&&(m=e,o.multiple?m.multiple=!0:o.size&&(m.size=o.size))):e=m.createElementNS(e,s),e[on]=t,e[Gs]=o,Vf(e,t,!1,!1),t.stateNode=e;e:{switch(m=Ln(s,o),s){case"dialog":Me("cancel",e),Me("close",e),c=o;break;case"iframe":case"object":case"embed":Me("load",e),c=o;break;case"video":case"audio":for(c=0;c<Qs.length;c++)Me(Qs[c],e);c=o;break;case"source":Me("error",e),c=o;break;case"img":case"image":case"link":Me("error",e),Me("load",e),c=o;break;case"details":Me("toggle",e),c=o;break;case"input":st(e,o),c=Se(e,o),Me("invalid",e);break;case"option":c=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},c=X({},o,{value:void 0}),Me("invalid",e);break;case"textarea":Es(e,o),c=Cs(e,o),Me("invalid",e);break;default:c=o}Os(s,c),v=c;for(f in v)if(v.hasOwnProperty(f)){var w=v[f];f==="style"?Ar(e,w):f==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,w!=null&&lr(e,w)):f==="children"?typeof w=="string"?(s!=="textarea"||w!=="")&&Pt(e,w):typeof w=="number"&&Pt(e,""+w):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(a.hasOwnProperty(f)?w!=null&&f==="onScroll"&&Me("scroll",e):w!=null&&F(e,f,w,m))}switch(s){case"input":rn(e),sn(e,o,!1);break;case"textarea":rn(e),kt(e);break;case"option":o.value!=null&&e.setAttribute("value",""+ke(o.value));break;case"select":e.multiple=!!o.multiple,f=o.value,f!=null?pn(e,!!o.multiple,f,!1):o.defaultValue!=null&&pn(e,!!o.multiple,o.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=nl)}switch(s){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return dt(t),null;case 6:if(e&&t.stateNode!=null)qf(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(r(166));if(s=mr(ni.current),mr(an.current),ul(t)){if(o=t.stateNode,s=t.memoizedProps,o[on]=t,(f=o.nodeValue!==s)&&(e=_t,e!==null))switch(e.tag){case 3:tl(o.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&tl(o.nodeValue,s,(e.mode&1)!==0)}f&&(t.flags|=4)}else o=(s.nodeType===9?s:s.ownerDocument).createTextNode(o),o[on]=t,t.stateNode=o}return dt(t),null;case 13:if(Re(Be),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if($e&&It!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Wc(),Xr(),t.flags|=98560,f=!1;else if(f=ul(t),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[on]=t}else Xr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),f=!1}else Yt!==null&&(Ka(Yt),Yt=null),f=!0;if(!f)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=s,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Be.current&1)!==0?Ze===0&&(Ze=3):Wa())),t.updateQueue!==null&&(t.flags|=4),dt(t),null);case 4:return ns(),Pa(e,t),e===null&&Js(t.stateNode.containerInfo),dt(t),null;case 10:return oa(t.type._context),dt(t),null;case 17:return jt(t.type)&&sl(),dt(t),null;case 19:if(Re(Be),f=t.memoizedState,f===null)return dt(t),null;if(o=(t.flags&128)!==0,m=f.rendering,m===null)if(o)oi(f,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(m=ml(e),m!==null){for(t.flags|=128,oi(f,!1),o=m.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=s,s=t.child;s!==null;)f=s,e=o,f.flags&=14680066,m=f.alternate,m===null?(f.childLanes=0,f.lanes=e,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=m.childLanes,f.lanes=m.lanes,f.child=m.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=m.memoizedProps,f.memoizedState=m.memoizedState,f.updateQueue=m.updateQueue,f.type=m.type,e=m.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return Pe(Be,Be.current&1|2),t.child}e=e.sibling}f.tail!==null&&ze()>ls&&(t.flags|=128,o=!0,oi(f,!1),t.lanes=4194304)}else{if(!o)if(e=ml(m),e!==null){if(t.flags|=128,o=!0,s=e.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),oi(f,!0),f.tail===null&&f.tailMode==="hidden"&&!m.alternate&&!$e)return dt(t),null}else 2*ze()-f.renderingStartTime>ls&&s!==1073741824&&(t.flags|=128,o=!0,oi(f,!1),t.lanes=4194304);f.isBackwards?(m.sibling=t.child,t.child=m):(s=f.last,s!==null?s.sibling=m:t.child=m,f.last=m)}return f.tail!==null?(t=f.tail,f.rendering=t,f.tail=t.sibling,f.renderingStartTime=ze(),t.sibling=null,s=Be.current,Pe(Be,o?s&1|2:s&1),t):(dt(t),null);case 22:case 23:return Ha(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?(Lt&1073741824)!==0&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function Yh(e,t){switch(ta(t),t.tag){case 1:return jt(t.type)&&sl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ns(),Re(St),Re(ct),ha(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return da(t),null;case 13:if(Re(Be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Xr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Re(Be),null;case 4:return ns(),null;case 10:return oa(t.type._context),null;case 22:case 23:return Ha(),null;case 24:return null;default:return null}}var Nl=!1,pt=!1,Gh=typeof WeakSet=="function"?WeakSet:Set,re=null;function ss(e,t){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(o){Fe(e,t,o)}else s.current=null}function ba(e,t,s){try{s()}catch(o){Fe(e,t,o)}}var Hf=!1;function Xh(e,t){if(Ho=Ki,e=xc(),Do(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var c=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var m=0,v=-1,w=-1,L=0,z=0,B=e,$=null;t:for(;;){for(var ee;B!==s||c!==0&&B.nodeType!==3||(v=m+c),B!==f||o!==0&&B.nodeType!==3||(w=m+o),B.nodeType===3&&(m+=B.nodeValue.length),(ee=B.firstChild)!==null;)$=B,B=ee;for(;;){if(B===e)break t;if($===s&&++L===c&&(v=m),$===f&&++z===o&&(w=m),(ee=B.nextSibling)!==null)break;B=$,$=B.parentNode}B=ee}s=v===-1||w===-1?null:{start:v,end:w}}else s=null}s=s||{start:0,end:0}}else s=null;for(Wo={focusedElem:e,selectionRange:s},Ki=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var se=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(se!==null){var ie=se.memoizedProps,Ke=se.memoizedState,T=t.stateNode,j=T.getSnapshotBeforeUpdate(t.elementType===t.type?ie:Gt(t.type,ie),Ke);T.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(V){Fe(t,t.return,V)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return se=Hf,Hf=!1,se}function ai(e,t,s){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var c=o=o.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&ba(t,s,f)}c=c.next}while(c!==o)}}function Cl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var s=t=t.next;do{if((s.tag&e)===e){var o=s.create;s.destroy=o()}s=s.next}while(s!==t)}}function Ma(e){var t=e.ref;if(t!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof t=="function"?t(e):t.current=e}}function Wf(e){var t=e.alternate;t!==null&&(e.alternate=null,Wf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[on],delete t[Gs],delete t[Go],delete t[bh],delete t[Mh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Qf(e){return e.tag===5||e.tag===3||e.tag===4}function Jf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ra(e,t,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?s.nodeType===8?s.parentNode.insertBefore(e,t):s.insertBefore(e,t):(s.nodeType===8?(t=s.parentNode,t.insertBefore(e,s)):(t=s,t.appendChild(e)),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=nl));else if(o!==4&&(e=e.child,e!==null))for(Ra(e,t,s),e=e.sibling;e!==null;)Ra(e,t,s),e=e.sibling}function $a(e,t,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for($a(e,t,s),e=e.sibling;e!==null;)$a(e,t,s),e=e.sibling}var lt=null,Xt=!1;function Qn(e,t,s){for(s=s.child;s!==null;)Yf(e,t,s),s=s.sibling}function Yf(e,t,s){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(gn,s)}catch{}switch(s.tag){case 5:pt||ss(s,t);case 6:var o=lt,c=Xt;lt=null,Qn(e,t,s),lt=o,Xt=c,lt!==null&&(Xt?(e=lt,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):lt.removeChild(s.stateNode));break;case 18:lt!==null&&(Xt?(e=lt,s=s.stateNode,e.nodeType===8?Yo(e.parentNode,s):e.nodeType===1&&Yo(e,s),Bs(e)):Yo(lt,s.stateNode));break;case 4:o=lt,c=Xt,lt=s.stateNode.containerInfo,Xt=!0,Qn(e,t,s),lt=o,Xt=c;break;case 0:case 11:case 14:case 15:if(!pt&&(o=s.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){c=o=o.next;do{var f=c,m=f.destroy;f=f.tag,m!==void 0&&((f&2)!==0||(f&4)!==0)&&ba(s,t,m),c=c.next}while(c!==o)}Qn(e,t,s);break;case 1:if(!pt&&(ss(s,t),o=s.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=s.memoizedProps,o.state=s.memoizedState,o.componentWillUnmount()}catch(v){Fe(s,t,v)}Qn(e,t,s);break;case 21:Qn(e,t,s);break;case 22:s.mode&1?(pt=(o=pt)||s.memoizedState!==null,Qn(e,t,s),pt=o):Qn(e,t,s);break;default:Qn(e,t,s)}}function Gf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new Gh),t.forEach(function(o){var c=om.bind(null,e,o);s.has(o)||(s.add(o),o.then(c,c))})}}function Zt(e,t){var s=t.deletions;if(s!==null)for(var o=0;o<s.length;o++){var c=s[o];try{var f=e,m=t,v=m;e:for(;v!==null;){switch(v.tag){case 5:lt=v.stateNode,Xt=!1;break e;case 3:lt=v.stateNode.containerInfo,Xt=!0;break e;case 4:lt=v.stateNode.containerInfo,Xt=!0;break e}v=v.return}if(lt===null)throw Error(r(160));Yf(f,m,c),lt=null,Xt=!1;var w=c.alternate;w!==null&&(w.return=null),c.return=null}catch(L){Fe(c,t,L)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Xf(t,e),t=t.sibling}function Xf(e,t){var s=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Zt(t,e),cn(e),o&4){try{ai(3,e,e.return),Cl(3,e)}catch(ie){Fe(e,e.return,ie)}try{ai(5,e,e.return)}catch(ie){Fe(e,e.return,ie)}}break;case 1:Zt(t,e),cn(e),o&512&&s!==null&&ss(s,s.return);break;case 5:if(Zt(t,e),cn(e),o&512&&s!==null&&ss(s,s.return),e.flags&32){var c=e.stateNode;try{Pt(c,"")}catch(ie){Fe(e,e.return,ie)}}if(o&4&&(c=e.stateNode,c!=null)){var f=e.memoizedProps,m=s!==null?s.memoizedProps:f,v=e.type,w=e.updateQueue;if(e.updateQueue=null,w!==null)try{v==="input"&&f.type==="radio"&&f.name!=null&&Je(c,f),Ln(v,m);var L=Ln(v,f);for(m=0;m<w.length;m+=2){var z=w[m],B=w[m+1];z==="style"?Ar(c,B):z==="dangerouslySetInnerHTML"?lr(c,B):z==="children"?Pt(c,B):F(c,z,B,L)}switch(v){case"input":it(c,f);break;case"textarea":at(c,f);break;case"select":var $=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!f.multiple;var ee=f.value;ee!=null?pn(c,!!f.multiple,ee,!1):$!==!!f.multiple&&(f.defaultValue!=null?pn(c,!!f.multiple,f.defaultValue,!0):pn(c,!!f.multiple,f.multiple?[]:"",!1))}c[Gs]=f}catch(ie){Fe(e,e.return,ie)}}break;case 6:if(Zt(t,e),cn(e),o&4){if(e.stateNode===null)throw Error(r(162));c=e.stateNode,f=e.memoizedProps;try{c.nodeValue=f}catch(ie){Fe(e,e.return,ie)}}break;case 3:if(Zt(t,e),cn(e),o&4&&s!==null&&s.memoizedState.isDehydrated)try{Bs(t.containerInfo)}catch(ie){Fe(e,e.return,ie)}break;case 4:Zt(t,e),cn(e);break;case 13:Zt(t,e),cn(e),c=e.child,c.flags&8192&&(f=c.memoizedState!==null,c.stateNode.isHidden=f,!f||c.alternate!==null&&c.alternate.memoizedState!==null||(Ba=ze())),o&4&&Gf(e);break;case 22:if(z=s!==null&&s.memoizedState!==null,e.mode&1?(pt=(L=pt)||z,Zt(t,e),pt=L):Zt(t,e),cn(e),o&8192){if(L=e.memoizedState!==null,(e.stateNode.isHidden=L)&&!z&&(e.mode&1)!==0)for(re=e,z=e.child;z!==null;){for(B=re=z;re!==null;){switch($=re,ee=$.child,$.tag){case 0:case 11:case 14:case 15:ai(4,$,$.return);break;case 1:ss($,$.return);var se=$.stateNode;if(typeof se.componentWillUnmount=="function"){o=$,s=$.return;try{t=o,se.props=t.memoizedProps,se.state=t.memoizedState,se.componentWillUnmount()}catch(ie){Fe(o,s,ie)}}break;case 5:ss($,$.return);break;case 22:if($.memoizedState!==null){td(B);continue}}ee!==null?(ee.return=$,re=ee):td(B)}z=z.sibling}e:for(z=null,B=e;;){if(B.tag===5){if(z===null){z=B;try{c=B.stateNode,L?(f=c.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(v=B.stateNode,w=B.memoizedProps.style,m=w!=null&&w.hasOwnProperty("display")?w.display:null,v.style.display=or("display",m))}catch(ie){Fe(e,e.return,ie)}}}else if(B.tag===6){if(z===null)try{B.stateNode.nodeValue=L?"":B.memoizedProps}catch(ie){Fe(e,e.return,ie)}}else if((B.tag!==22&&B.tag!==23||B.memoizedState===null||B===e)&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===e)break e;for(;B.sibling===null;){if(B.return===null||B.return===e)break e;z===B&&(z=null),B=B.return}z===B&&(z=null),B.sibling.return=B.return,B=B.sibling}}break;case 19:Zt(t,e),cn(e),o&4&&Gf(e);break;case 21:break;default:Zt(t,e),cn(e)}}function cn(e){var t=e.flags;if(t&2){try{e:{for(var s=e.return;s!==null;){if(Qf(s)){var o=s;break e}s=s.return}throw Error(r(160))}switch(o.tag){case 5:var c=o.stateNode;o.flags&32&&(Pt(c,""),o.flags&=-33);var f=Jf(e);$a(e,f,c);break;case 3:case 4:var m=o.stateNode.containerInfo,v=Jf(e);Ra(e,v,m);break;default:throw Error(r(161))}}catch(w){Fe(e,e.return,w)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Zh(e,t,s){re=e,Zf(e)}function Zf(e,t,s){for(var o=(e.mode&1)!==0;re!==null;){var c=re,f=c.child;if(c.tag===22&&o){var m=c.memoizedState!==null||Nl;if(!m){var v=c.alternate,w=v!==null&&v.memoizedState!==null||pt;v=Nl;var L=pt;if(Nl=m,(pt=w)&&!L)for(re=c;re!==null;)m=re,w=m.child,m.tag===22&&m.memoizedState!==null?nd(c):w!==null?(w.return=m,re=w):nd(c);for(;f!==null;)re=f,Zf(f),f=f.sibling;re=c,Nl=v,pt=L}ed(e)}else(c.subtreeFlags&8772)!==0&&f!==null?(f.return=c,re=f):ed(e)}}function ed(e){for(;re!==null;){var t=re;if((t.flags&8772)!==0){var s=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:pt||Cl(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!pt)if(s===null)o.componentDidMount();else{var c=t.elementType===t.type?s.memoizedProps:Gt(t.type,s.memoizedProps);o.componentDidUpdate(c,s.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var f=t.updateQueue;f!==null&&ef(t,f,o);break;case 3:var m=t.updateQueue;if(m!==null){if(s=null,t.child!==null)switch(t.child.tag){case 5:s=t.child.stateNode;break;case 1:s=t.child.stateNode}ef(t,m,s)}break;case 5:var v=t.stateNode;if(s===null&&t.flags&4){s=v;var w=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":w.autoFocus&&s.focus();break;case"img":w.src&&(s.src=w.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var L=t.alternate;if(L!==null){var z=L.memoizedState;if(z!==null){var B=z.dehydrated;B!==null&&Bs(B)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}pt||t.flags&512&&Ma(t)}catch($){Fe(t,t.return,$)}}if(t===e){re=null;break}if(s=t.sibling,s!==null){s.return=t.return,re=s;break}re=t.return}}function td(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var s=t.sibling;if(s!==null){s.return=t.return,re=s;break}re=t.return}}function nd(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var s=t.return;try{Cl(4,t)}catch(w){Fe(t,s,w)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var c=t.return;try{o.componentDidMount()}catch(w){Fe(t,c,w)}}var f=t.return;try{Ma(t)}catch(w){Fe(t,f,w)}break;case 5:var m=t.return;try{Ma(t)}catch(w){Fe(t,m,w)}}}catch(w){Fe(t,t.return,w)}if(t===e){re=null;break}var v=t.sibling;if(v!==null){v.return=t.return,re=v;break}re=t.return}}var em=Math.ceil,El=K.ReactCurrentDispatcher,Da=K.ReactCurrentOwner,Ft=K.ReactCurrentBatchConfig,Ee=0,tt=null,Ye=null,ot=0,Lt=0,is=Vn(0),Ze=0,ui=null,gr=0,Ol=0,za=0,ci=null,Nt=null,Ba=0,ls=1/0,Cn=null,Tl=!1,Ua=null,Jn=null,_l=!1,Yn=null,Il=0,fi=0,Fa=null,Ll=-1,Al=0;function gt(){return(Ee&6)!==0?ze():Ll!==-1?Ll:Ll=ze()}function Gn(e){return(e.mode&1)===0?1:(Ee&2)!==0&&ot!==0?ot&-ot:$h.transition!==null?(Al===0&&(Al=Ms()),Al):(e=Ae,e!==0||(e=window.event,e=e===void 0?16:rc(e.type)),e)}function en(e,t,s,o){if(50<fi)throw fi=0,Fa=null,Error(r(185));Qt(e,s,o),((Ee&2)===0||e!==tt)&&(e===tt&&((Ee&2)===0&&(Ol|=s),Ze===4&&Xn(e,ot)),Ct(e,o),s===1&&Ee===0&&(t.mode&1)===0&&(ls=ze()+500,ll&&qn()))}function Ct(e,t){var s=e.callbackNode;ut(e,t);var o=mt(e,e===tt?ot:0);if(o===0)s!==null&&$r(s),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(s!=null&&$r(s),t===1)e.tag===0?Rh(sd.bind(null,e)):Fc(sd.bind(null,e)),Ah(function(){(Ee&6)===0&&qn()}),s=null;else{switch(Ju(o)){case 1:s=bs;break;case 4:s=zi;break;case 16:s=Dr;break;case 536870912:s=Bi;break;default:s=Dr}s=dd(s,rd.bind(null,e))}e.callbackPriority=t,e.callbackNode=s}}function rd(e,t){if(Ll=-1,Al=0,(Ee&6)!==0)throw Error(r(327));var s=e.callbackNode;if(os()&&e.callbackNode!==s)return null;var o=mt(e,e===tt?ot:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||t)t=Pl(e,o);else{t=o;var c=Ee;Ee|=2;var f=ld();(tt!==e||ot!==t)&&(Cn=null,ls=ze()+500,wr(e,t));do try{rm();break}catch(v){id(e,v)}while(!0);la(),El.current=f,Ee=c,Ye!==null?t=0:(tt=null,ot=0,t=Ze)}if(t!==0){if(t===2&&(c=$t(e),c!==0&&(o=c,t=Va(e,c))),t===1)throw s=ui,wr(e,0),Xn(e,o),Ct(e,ze()),s;if(t===6)Xn(e,o);else{if(c=e.current.alternate,(o&30)===0&&!tm(c)&&(t=Pl(e,o),t===2&&(f=$t(e),f!==0&&(o=f,t=Va(e,f))),t===1))throw s=ui,wr(e,0),Xn(e,o),Ct(e,ze()),s;switch(e.finishedWork=c,e.finishedLanes=o,t){case 0:case 1:throw Error(r(345));case 2:kr(e,Nt,Cn);break;case 3:if(Xn(e,o),(o&130023424)===o&&(t=Ba+500-ze(),10<t)){if(mt(e,0)!==0)break;if(c=e.suspendedLanes,(c&o)!==o){gt(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=Jo(kr.bind(null,e,Nt,Cn),t);break}kr(e,Nt,Cn);break;case 4:if(Xn(e,o),(o&4194240)===o)break;for(t=e.eventTimes,c=-1;0<o;){var m=31-P(o);f=1<<m,m=t[m],m>c&&(c=m),o&=~f}if(o=c,o=ze()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*em(o/1960))-o,10<o){e.timeoutHandle=Jo(kr.bind(null,e,Nt,Cn),o);break}kr(e,Nt,Cn);break;case 5:kr(e,Nt,Cn);break;default:throw Error(r(329))}}}return Ct(e,ze()),e.callbackNode===s?rd.bind(null,e):null}function Va(e,t){var s=ci;return e.current.memoizedState.isDehydrated&&(wr(e,t).flags|=256),e=Pl(e,t),e!==2&&(t=Nt,Nt=s,t!==null&&Ka(t)),e}function Ka(e){Nt===null?Nt=e:Nt.push.apply(Nt,e)}function tm(e){for(var t=e;;){if(t.flags&16384){var s=t.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var o=0;o<s.length;o++){var c=s[o],f=c.getSnapshot;c=c.value;try{if(!Jt(f(),c))return!1}catch{return!1}}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Xn(e,t){for(t&=~za,t&=~Ol,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var s=31-P(t),o=1<<s;e[s]=-1,t&=~o}}function sd(e){if((Ee&6)!==0)throw Error(r(327));os();var t=mt(e,0);if((t&1)===0)return Ct(e,ze()),null;var s=Pl(e,t);if(e.tag!==0&&s===2){var o=$t(e);o!==0&&(t=o,s=Va(e,o))}if(s===1)throw s=ui,wr(e,0),Xn(e,t),Ct(e,ze()),s;if(s===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,kr(e,Nt,Cn),Ct(e,ze()),null}function qa(e,t){var s=Ee;Ee|=1;try{return e(t)}finally{Ee=s,Ee===0&&(ls=ze()+500,ll&&qn())}}function vr(e){Yn!==null&&Yn.tag===0&&(Ee&6)===0&&os();var t=Ee;Ee|=1;var s=Ft.transition,o=Ae;try{if(Ft.transition=null,Ae=1,e)return e()}finally{Ae=o,Ft.transition=s,Ee=t,(Ee&6)===0&&qn()}}function Ha(){Lt=is.current,Re(is)}function wr(e,t){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,Lh(s)),Ye!==null)for(s=Ye.return;s!==null;){var o=s;switch(ta(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&sl();break;case 3:ns(),Re(St),Re(ct),ha();break;case 5:da(o);break;case 4:ns();break;case 13:Re(Be);break;case 19:Re(Be);break;case 10:oa(o.type._context);break;case 22:case 23:Ha()}s=s.return}if(tt=e,Ye=e=Zn(e.current,null),ot=Lt=t,Ze=0,ui=null,za=Ol=gr=0,Nt=ci=null,hr!==null){for(t=0;t<hr.length;t++)if(s=hr[t],o=s.interleaved,o!==null){s.interleaved=null;var c=o.next,f=s.pending;if(f!==null){var m=f.next;f.next=c,o.next=m}s.pending=o}hr=null}return e}function id(e,t){do{var s=Ye;try{if(la(),yl.current=kl,gl){for(var o=Ue.memoizedState;o!==null;){var c=o.queue;c!==null&&(c.pending=null),o=o.next}gl=!1}if(yr=0,et=Xe=Ue=null,ri=!1,si=0,Da.current=null,s===null||s.return===null){Ze=1,ui=t,Ye=null;break}e:{var f=e,m=s.return,v=s,w=t;if(t=ot,v.flags|=32768,w!==null&&typeof w=="object"&&typeof w.then=="function"){var L=w,z=v,B=z.tag;if((z.mode&1)===0&&(B===0||B===11||B===15)){var $=z.alternate;$?(z.updateQueue=$.updateQueue,z.memoizedState=$.memoizedState,z.lanes=$.lanes):(z.updateQueue=null,z.memoizedState=null)}var ee=If(m);if(ee!==null){ee.flags&=-257,Lf(ee,m,v,f,t),ee.mode&1&&_f(f,L,t),t=ee,w=L;var se=t.updateQueue;if(se===null){var ie=new Set;ie.add(w),t.updateQueue=ie}else se.add(w);break e}else{if((t&1)===0){_f(f,L,t),Wa();break e}w=Error(r(426))}}else if($e&&v.mode&1){var Ke=If(m);if(Ke!==null){(Ke.flags&65536)===0&&(Ke.flags|=256),Lf(Ke,m,v,f,t),sa(rs(w,v));break e}}f=w=rs(w,v),Ze!==4&&(Ze=2),ci===null?ci=[f]:ci.push(f),f=m;do{switch(f.tag){case 3:f.flags|=65536,t&=-t,f.lanes|=t;var T=Of(f,w,t);Zc(f,T);break e;case 1:v=w;var j=f.type,_=f.stateNode;if((f.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Jn===null||!Jn.has(_)))){f.flags|=65536,t&=-t,f.lanes|=t;var V=Tf(f,v,t);Zc(f,V);break e}}f=f.return}while(f!==null)}ad(s)}catch(oe){t=oe,Ye===s&&s!==null&&(Ye=s=s.return);continue}break}while(!0)}function ld(){var e=El.current;return El.current=kl,e===null?kl:e}function Wa(){(Ze===0||Ze===3||Ze===2)&&(Ze=4),tt===null||(gr&268435455)===0&&(Ol&268435455)===0||Xn(tt,ot)}function Pl(e,t){var s=Ee;Ee|=2;var o=ld();(tt!==e||ot!==t)&&(Cn=null,wr(e,t));do try{nm();break}catch(c){id(e,c)}while(!0);if(la(),Ee=s,El.current=o,Ye!==null)throw Error(r(261));return tt=null,ot=0,Ze}function nm(){for(;Ye!==null;)od(Ye)}function rm(){for(;Ye!==null&&!ko();)od(Ye)}function od(e){var t=fd(e.alternate,e,Lt);e.memoizedProps=e.pendingProps,t===null?ad(e):Ye=t,Da.current=null}function ad(e){var t=e;do{var s=t.alternate;if(e=t.return,(t.flags&32768)===0){if(s=Jh(s,t,Lt),s!==null){Ye=s;return}}else{if(s=Yh(s,t),s!==null){s.flags&=32767,Ye=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ze=6,Ye=null;return}}if(t=t.sibling,t!==null){Ye=t;return}Ye=t=e}while(t!==null);Ze===0&&(Ze=5)}function kr(e,t,s){var o=Ae,c=Ft.transition;try{Ft.transition=null,Ae=1,sm(e,t,s,o)}finally{Ft.transition=c,Ae=o}return null}function sm(e,t,s,o){do os();while(Yn!==null);if((Ee&6)!==0)throw Error(r(327));s=e.finishedWork;var c=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var f=s.lanes|s.childLanes;if(Dp(e,f),e===tt&&(Ye=tt=null,ot=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||_l||(_l=!0,dd(Dr,function(){return os(),null})),f=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||f){f=Ft.transition,Ft.transition=null;var m=Ae;Ae=1;var v=Ee;Ee|=4,Da.current=null,Xh(e,s),Xf(s,e),Nh(Wo),Ki=!!Ho,Wo=Ho=null,e.current=s,Zh(s),So(),Ee=v,Ae=m,Ft.transition=f}else e.current=s;if(_l&&(_l=!1,Yn=e,Il=c),f=e.pendingLanes,f===0&&(Jn=null),N(s.stateNode),Ct(e,ze()),t!==null)for(o=e.onRecoverableError,s=0;s<t.length;s++)c=t[s],o(c.value,{componentStack:c.stack,digest:c.digest});if(Tl)throw Tl=!1,e=Ua,Ua=null,e;return(Il&1)!==0&&e.tag!==0&&os(),f=e.pendingLanes,(f&1)!==0?e===Fa?fi++:(fi=0,Fa=e):fi=0,qn(),null}function os(){if(Yn!==null){var e=Ju(Il),t=Ft.transition,s=Ae;try{if(Ft.transition=null,Ae=16>e?16:e,Yn===null)var o=!1;else{if(e=Yn,Yn=null,Il=0,(Ee&6)!==0)throw Error(r(331));var c=Ee;for(Ee|=4,re=e.current;re!==null;){var f=re,m=f.child;if((re.flags&16)!==0){var v=f.deletions;if(v!==null){for(var w=0;w<v.length;w++){var L=v[w];for(re=L;re!==null;){var z=re;switch(z.tag){case 0:case 11:case 15:ai(8,z,f)}var B=z.child;if(B!==null)B.return=z,re=B;else for(;re!==null;){z=re;var $=z.sibling,ee=z.return;if(Wf(z),z===L){re=null;break}if($!==null){$.return=ee,re=$;break}re=ee}}}var se=f.alternate;if(se!==null){var ie=se.child;if(ie!==null){se.child=null;do{var Ke=ie.sibling;ie.sibling=null,ie=Ke}while(ie!==null)}}re=f}}if((f.subtreeFlags&2064)!==0&&m!==null)m.return=f,re=m;else e:for(;re!==null;){if(f=re,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:ai(9,f,f.return)}var T=f.sibling;if(T!==null){T.return=f.return,re=T;break e}re=f.return}}var j=e.current;for(re=j;re!==null;){m=re;var _=m.child;if((m.subtreeFlags&2064)!==0&&_!==null)_.return=m,re=_;else e:for(m=j;re!==null;){if(v=re,(v.flags&2048)!==0)try{switch(v.tag){case 0:case 11:case 15:Cl(9,v)}}catch(oe){Fe(v,v.return,oe)}if(v===m){re=null;break e}var V=v.sibling;if(V!==null){V.return=v.return,re=V;break e}re=v.return}}if(Ee=c,qn(),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(gn,e)}catch{}o=!0}return o}finally{Ae=s,Ft.transition=t}}return!1}function ud(e,t,s){t=rs(s,t),t=Of(e,t,1),e=Wn(e,t,1),t=gt(),e!==null&&(Qt(e,1,t),Ct(e,t))}function Fe(e,t,s){if(e.tag===3)ud(e,e,s);else for(;t!==null;){if(t.tag===3){ud(t,e,s);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Jn===null||!Jn.has(o))){e=rs(s,e),e=Tf(t,e,1),t=Wn(t,e,1),e=gt(),t!==null&&(Qt(t,1,e),Ct(t,e));break}}t=t.return}}function im(e,t,s){var o=e.pingCache;o!==null&&o.delete(t),t=gt(),e.pingedLanes|=e.suspendedLanes&s,tt===e&&(ot&s)===s&&(Ze===4||Ze===3&&(ot&130023424)===ot&&500>ze()-Ba?wr(e,0):za|=s),Ct(e,t)}function cd(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ve,Ve<<=1,(Ve&130023424)===0&&(Ve=4194304)));var s=gt();e=jn(e,t),e!==null&&(Qt(e,t,s),Ct(e,s))}function lm(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),cd(e,s)}function om(e,t){var s=0;switch(e.tag){case 13:var o=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(r(314))}o!==null&&o.delete(t),cd(e,s)}var fd;fd=function(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps||St.current)xt=!0;else{if((e.lanes&s)===0&&(t.flags&128)===0)return xt=!1,Qh(e,t,s);xt=(e.flags&131072)!==0}else xt=!1,$e&&(t.flags&1048576)!==0&&Vc(t,al,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;xl(e,t),e=t.pendingProps;var c=Jr(t,ct.current);ts(t,s),c=ga(null,t,o,e,c,s);var f=va();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,jt(o)?(f=!0,il(t)):f=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,ca(t),c.updater=Sl,t.stateNode=c,c._reactInternals=t,Na(t,o,e,s),t=Ta(null,t,o,!0,f,s)):(t.tag=0,$e&&f&&ea(t),yt(null,t,c,s),t=t.child),t;case 16:o=t.elementType;e:{switch(xl(e,t),e=t.pendingProps,c=o._init,o=c(o._payload),t.type=o,c=t.tag=um(o),e=Gt(o,e),c){case 0:t=Oa(null,t,o,e,s);break e;case 1:t=$f(null,t,o,e,s);break e;case 11:t=Af(null,t,o,e,s);break e;case 14:t=Pf(null,t,o,Gt(o.type,e),s);break e}throw Error(r(306,o,""))}return t;case 0:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:Gt(o,c),Oa(e,t,o,c,s);case 1:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:Gt(o,c),$f(e,t,o,c,s);case 3:e:{if(Df(t),e===null)throw Error(r(387));o=t.pendingProps,f=t.memoizedState,c=f.element,Xc(e,t),hl(t,o,null,s);var m=t.memoizedState;if(o=m.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){c=rs(Error(r(423)),t),t=zf(e,t,o,s,c);break e}else if(o!==c){c=rs(Error(r(424)),t),t=zf(e,t,o,s,c);break e}else for(It=Fn(t.stateNode.containerInfo.firstChild),_t=t,$e=!0,Yt=null,s=Yc(t,null,o,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Xr(),o===c){t=Nn(e,t,s);break e}yt(e,t,o,s)}t=t.child}return t;case 5:return tf(t),e===null&&ra(t),o=t.type,c=t.pendingProps,f=e!==null?e.memoizedProps:null,m=c.children,Qo(o,c)?m=null:f!==null&&Qo(o,f)&&(t.flags|=32),Rf(e,t),yt(e,t,m,s),t.child;case 6:return e===null&&ra(t),null;case 13:return Bf(e,t,s);case 4:return fa(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Zr(t,null,o,s):yt(e,t,o,s),t.child;case 11:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:Gt(o,c),Af(e,t,o,c,s);case 7:return yt(e,t,t.pendingProps,s),t.child;case 8:return yt(e,t,t.pendingProps.children,s),t.child;case 12:return yt(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(o=t.type._context,c=t.pendingProps,f=t.memoizedProps,m=c.value,Pe(fl,o._currentValue),o._currentValue=m,f!==null)if(Jt(f.value,m)){if(f.children===c.children&&!St.current){t=Nn(e,t,s);break e}}else for(f=t.child,f!==null&&(f.return=t);f!==null;){var v=f.dependencies;if(v!==null){m=f.child;for(var w=v.firstContext;w!==null;){if(w.context===o){if(f.tag===1){w=xn(-1,s&-s),w.tag=2;var L=f.updateQueue;if(L!==null){L=L.shared;var z=L.pending;z===null?w.next=w:(w.next=z.next,z.next=w),L.pending=w}}f.lanes|=s,w=f.alternate,w!==null&&(w.lanes|=s),aa(f.return,s,t),v.lanes|=s;break}w=w.next}}else if(f.tag===10)m=f.type===t.type?null:f.child;else if(f.tag===18){if(m=f.return,m===null)throw Error(r(341));m.lanes|=s,v=m.alternate,v!==null&&(v.lanes|=s),aa(m,s,t),m=f.sibling}else m=f.child;if(m!==null)m.return=f;else for(m=f;m!==null;){if(m===t){m=null;break}if(f=m.sibling,f!==null){f.return=m.return,m=f;break}m=m.return}f=m}yt(e,t,c.children,s),t=t.child}return t;case 9:return c=t.type,o=t.pendingProps.children,ts(t,s),c=Bt(c),o=o(c),t.flags|=1,yt(e,t,o,s),t.child;case 14:return o=t.type,c=Gt(o,t.pendingProps),c=Gt(o.type,c),Pf(e,t,o,c,s);case 15:return bf(e,t,t.type,t.pendingProps,s);case 17:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:Gt(o,c),xl(e,t),t.tag=1,jt(o)?(e=!0,il(t)):e=!1,ts(t,s),Cf(t,o,c),Na(t,o,c,s),Ta(null,t,o,!0,e,s);case 19:return Ff(e,t,s);case 22:return Mf(e,t,s)}throw Error(r(156,t.tag))};function dd(e,t){return Di(e,t)}function am(e,t,s,o){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(e,t,s,o){return new am(e,t,s,o)}function Qa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function um(e){if(typeof e=="function")return Qa(e)?1:0;if(e!=null){if(e=e.$$typeof,e===te)return 11;if(e===_e)return 14}return 2}function Zn(e,t){var s=e.alternate;return s===null?(s=Vt(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function bl(e,t,s,o,c,f){var m=2;if(o=e,typeof e=="function")Qa(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case q:return Sr(s.children,c,f,t);case U:m=8,c|=8;break;case ae:return e=Vt(12,s,t,c|2),e.elementType=ae,e.lanes=f,e;case de:return e=Vt(13,s,t,c),e.elementType=de,e.lanes=f,e;case Ie:return e=Vt(19,s,t,c),e.elementType=Ie,e.lanes=f,e;case xe:return Ml(s,c,f,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D:m=10;break e;case Z:m=9;break e;case te:m=11;break e;case _e:m=14;break e;case De:m=16,o=null;break e}throw Error(r(130,e==null?e:typeof e,""))}return t=Vt(m,s,t,c),t.elementType=e,t.type=o,t.lanes=f,t}function Sr(e,t,s,o){return e=Vt(7,e,o,t),e.lanes=s,e}function Ml(e,t,s,o){return e=Vt(22,e,o,t),e.elementType=xe,e.lanes=s,e.stateNode={isHidden:!1},e}function Ja(e,t,s){return e=Vt(6,e,null,t),e.lanes=s,e}function Ya(e,t,s){return t=Vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cm(e,t,s,o,c){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zr(0),this.expirationTimes=zr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zr(0),this.identifierPrefix=o,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Ga(e,t,s,o,c,f,m,v,w){return e=new cm(e,t,s,v,w),t===1?(t=1,f===!0&&(t|=8)):t=0,f=Vt(3,null,null,t),e.current=f,f.stateNode=e,f.memoizedState={element:o,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},ca(f),e}function fm(e,t,s){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Q,key:o==null?null:""+o,children:e,containerInfo:t,implementation:s}}function pd(e){if(!e)return Kn;e=e._reactInternals;e:{if(yn(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(jt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var s=e.type;if(jt(s))return Bc(e,s,t)}return t}function hd(e,t,s,o,c,f,m,v,w){return e=Ga(s,o,!0,e,c,f,m,v,w),e.context=pd(null),s=e.current,o=gt(),c=Gn(s),f=xn(o,c),f.callback=t??null,Wn(s,f,c),e.current.lanes=c,Qt(e,c,o),Ct(e,o),e}function Rl(e,t,s,o){var c=t.current,f=gt(),m=Gn(c);return s=pd(s),t.context===null?t.context=s:t.pendingContext=s,t=xn(f,m),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=Wn(c,t,m),e!==null&&(en(e,c,m,f),pl(e,c,m)),m}function $l(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function md(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function Xa(e,t){md(e,t),(e=e.alternate)&&md(e,t)}function dm(){return null}var yd=typeof reportError=="function"?reportError:function(e){console.error(e)};function Za(e){this._internalRoot=e}Dl.prototype.render=Za.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));Rl(e,t,null,null)},Dl.prototype.unmount=Za.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vr(function(){Rl(null,e,null,null)}),t[vn]=null}};function Dl(e){this._internalRoot=e}Dl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xu();e={blockedOn:null,target:e,priority:t};for(var s=0;s<zn.length&&t!==0&&t<zn[s].priority;s++);zn.splice(s,0,e),s===0&&tc(e)}};function eu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function zl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function gd(){}function pm(e,t,s,o,c){if(c){if(typeof o=="function"){var f=o;o=function(){var L=$l(m);f.call(L)}}var m=hd(t,o,e,0,null,!1,!1,"",gd);return e._reactRootContainer=m,e[vn]=m.current,Js(e.nodeType===8?e.parentNode:e),vr(),m}for(;c=e.lastChild;)e.removeChild(c);if(typeof o=="function"){var v=o;o=function(){var L=$l(w);v.call(L)}}var w=Ga(e,0,!1,null,null,!1,!1,"",gd);return e._reactRootContainer=w,e[vn]=w.current,Js(e.nodeType===8?e.parentNode:e),vr(function(){Rl(t,w,s,o)}),w}function Bl(e,t,s,o,c){var f=s._reactRootContainer;if(f){var m=f;if(typeof c=="function"){var v=c;c=function(){var w=$l(m);v.call(w)}}Rl(t,m,e,c)}else m=pm(s,t,e,c,o);return $l(m)}Yu=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var s=Oe(t.pendingLanes);s!==0&&(No(t,s|1),Ct(t,ze()),(Ee&6)===0&&(ls=ze()+500,qn()))}break;case 13:vr(function(){var o=jn(e,1);if(o!==null){var c=gt();en(o,e,1,c)}}),Xa(e,1)}},Co=function(e){if(e.tag===13){var t=jn(e,134217728);if(t!==null){var s=gt();en(t,e,134217728,s)}Xa(e,134217728)}},Gu=function(e){if(e.tag===13){var t=Gn(e),s=jn(e,t);if(s!==null){var o=gt();en(s,e,t,o)}Xa(e,t)}},Xu=function(){return Ae},Zu=function(e,t){var s=Ae;try{return Ae=e,t()}finally{Ae=s}},_s=function(e,t,s){switch(t){case"input":if(it(e,s),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<s.length;t++){var o=s[t];if(o!==e&&o.form===e.form){var c=rl(o);if(!c)throw Error(r(90));sr(o),it(o,c)}}}break;case"textarea":at(e,s);break;case"select":t=s.value,t!=null&&pn(e,!!s.multiple,t,!1)}},Wt=qa,br=vr;var hm={usingClientEntryPoint:!1,Events:[Xs,Wr,rl,Pr,bt,qa]},di={findFiberByHostInstance:cr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},mm={bundleType:di.bundleType,version:di.version,rendererPackageName:di.rendererPackageName,rendererConfig:di.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:K.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ri(e),e===null?null:e.stateNode},findFiberByHostInstance:di.findFiberByHostInstance||dm,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ul=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ul.isDisabled&&Ul.supportsFiber)try{gn=Ul.inject(mm),Rt=Ul}catch{}}return Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hm,Et.createPortal=function(e,t){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!eu(t))throw Error(r(200));return fm(e,t,null,s)},Et.createRoot=function(e,t){if(!eu(e))throw Error(r(299));var s=!1,o="",c=yd;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Ga(e,1,!1,null,null,s,!1,o,c),e[vn]=t.current,Js(e.nodeType===8?e.parentNode:e),new Za(t)},Et.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=Ri(t),e=e===null?null:e.stateNode,e},Et.flushSync=function(e){return vr(e)},Et.hydrate=function(e,t,s){if(!zl(t))throw Error(r(200));return Bl(null,e,t,!0,s)},Et.hydrateRoot=function(e,t,s){if(!eu(e))throw Error(r(405));var o=s!=null&&s.hydratedSources||null,c=!1,f="",m=yd;if(s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(m=s.onRecoverableError)),t=hd(t,null,e,1,s??null,c,!1,f,m),e[vn]=t.current,Js(e),o)for(e=0;e<o.length;e++)s=o[e],c=s._getVersion,c=c(s._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[s,c]:t.mutableSourceEagerHydrationData.push(s,c);return new Dl(t)},Et.render=function(e,t,s){if(!zl(t))throw Error(r(200));return Bl(null,e,t,!1,s)},Et.unmountComponentAtNode=function(e){if(!zl(e))throw Error(r(40));return e._reactRootContainer?(vr(function(){Bl(null,null,e,!1,function(){e._reactRootContainer=null,e[vn]=null})}),!0):!1},Et.unstable_batchedUpdates=qa,Et.unstable_renderSubtreeIntoContainer=function(e,t,s,o){if(!zl(s))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Bl(e,t,s,!1,o)},Et.version="18.3.1-next-f1338f8080-20240426",Et}var Cd;function Nm(){if(Cd)return ru.exports;Cd=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(n){console.error(n)}}return i(),ru.exports=xm(),ru.exports}var Ed;function Cm(){if(Ed)return Fl;Ed=1;var i=Nm();return Fl.createRoot=i.createRoot,Fl.hydrateRoot=i.hydrateRoot,Fl}var Em=Cm();const Om=qd(Em);/**
40
+ `+f.stack}return{value:e,source:t,stack:c,digest:null}}function Ea(e,t,s){return{value:e,source:null,stack:s??null,digest:t??null}}function Oa(e,t){try{console.error(t.value)}catch(s){setTimeout(function(){throw s})}}var qh=typeof WeakMap=="function"?WeakMap:Map;function Of(e,t,s){s=xn(-1,s),s.tag=3,s.payload={element:null};var o=t.value;return s.callback=function(){Tl||(Tl=!0,Fa=o),Oa(e,t)},s}function Tf(e,t,s){s=xn(-1,s),s.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var c=t.value;s.payload=function(){return o(c)},s.callback=function(){Oa(e,t)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(s.callback=function(){Oa(e,t),typeof o!="function"&&(Jn===null?Jn=new Set([this]):Jn.add(this));var m=t.stack;this.componentDidCatch(t.value,{componentStack:m!==null?m:""})}),s}function _f(e,t,s){var o=e.pingCache;if(o===null){o=e.pingCache=new qh;var c=new Set;o.set(t,c)}else c=o.get(t),c===void 0&&(c=new Set,o.set(t,c));c.has(s)||(c.add(s),e=im.bind(null,e,t,s),t.then(e,e))}function If(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Lf(e,t,s,o,c){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(t=xn(-1,1),t.tag=2,Wn(s,t,1))),s.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var Hh=K.ReactCurrentOwner,Nt=!1;function yt(e,t,s,o){t.child=e===null?Yc(t,null,s,o):Zr(t,e.child,s,o)}function Af(e,t,s,o,c){s=s.render;var f=t.ref;return ts(t,c),o=va(e,t,s,o,f,c),s=wa(),e!==null&&!Nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Nn(e,t,c)):($e&&s&&ta(t),t.flags|=1,yt(e,t,o,c),t.child)}function Pf(e,t,s,o,c){if(e===null){var f=s.type;return typeof f=="function"&&!Ja(f)&&f.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(t.tag=15,t.type=f,bf(e,t,f,o,c)):(e=bl(s.type,null,o,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,(e.lanes&c)===0){var m=f.memoizedProps;if(s=s.compare,s=s!==null?s:Ws,s(m,o)&&e.ref===t.ref)return Nn(e,t,c)}return t.flags|=1,e=Zn(f,o),e.ref=t.ref,e.return=t,t.child=e}function bf(e,t,s,o,c){if(e!==null){var f=e.memoizedProps;if(Ws(f,o)&&e.ref===t.ref)if(Nt=!1,t.pendingProps=o=f,(e.lanes&c)!==0)(e.flags&131072)!==0&&(Nt=!0);else return t.lanes=e.lanes,Nn(e,t,c)}return Ta(e,t,s,o,c)}function Mf(e,t,s){var o=t.pendingProps,c=o.children,f=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Pe(is,At),At|=s;else{if((s&1073741824)===0)return e=f!==null?f.baseLanes|s:s,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Pe(is,At),At|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=f!==null?f.baseLanes:s,Pe(is,At),At|=o}else f!==null?(o=f.baseLanes|s,t.memoizedState=null):o=s,Pe(is,At),At|=o;return yt(e,t,c,s),t.child}function Rf(e,t){var s=t.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(t.flags|=512,t.flags|=2097152)}function Ta(e,t,s,o,c){var f=xt(s)?fr:ct.current;return f=Jr(t,f),ts(t,c),s=va(e,t,s,o,f,c),o=wa(),e!==null&&!Nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Nn(e,t,c)):($e&&o&&ta(t),t.flags|=1,yt(e,t,s,c),t.child)}function $f(e,t,s,o,c){if(xt(s)){var f=!0;il(t)}else f=!1;if(ts(t,c),t.stateNode===null)xl(e,t),Cf(t,s,o),Ca(t,s,o,c),o=!0;else if(e===null){var m=t.stateNode,v=t.memoizedProps;m.props=v;var w=m.context,L=s.contextType;typeof L=="object"&&L!==null?L=Ut(L):(L=xt(s)?fr:ct.current,L=Jr(t,L));var z=s.getDerivedStateFromProps,B=typeof z=="function"||typeof m.getSnapshotBeforeUpdate=="function";B||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(v!==o||w!==L)&&Ef(t,m,o,L),Hn=!1;var $=t.memoizedState;m.state=$,hl(t,o,m,c),w=t.memoizedState,v!==o||$!==w||jt.current||Hn?(typeof z=="function"&&(Na(t,s,z,o),w=t.memoizedState),(v=Hn||Nf(t,s,v,o,$,w,L))?(B||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=w),m.props=o,m.state=w,m.context=L,o=v):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{m=t.stateNode,Xc(e,t),v=t.memoizedProps,L=t.type===t.elementType?v:Xt(t.type,v),m.props=L,B=t.pendingProps,$=m.context,w=s.contextType,typeof w=="object"&&w!==null?w=Ut(w):(w=xt(s)?fr:ct.current,w=Jr(t,w));var ee=s.getDerivedStateFromProps;(z=typeof ee=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(v!==B||$!==w)&&Ef(t,m,o,w),Hn=!1,$=t.memoizedState,m.state=$,hl(t,o,m,c);var se=t.memoizedState;v!==B||$!==se||jt.current||Hn?(typeof ee=="function"&&(Na(t,s,ee,o),se=t.memoizedState),(L=Hn||Nf(t,s,L,o,$,se,w)||!1)?(z||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(o,se,w),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(o,se,w)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=se),m.props=o,m.state=se,m.context=w,o=L):(typeof m.componentDidUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),o=!1)}return _a(e,t,s,o,f,c)}function _a(e,t,s,o,c,f){Rf(e,t);var m=(t.flags&128)!==0;if(!o&&!m)return c&&Uc(t,s,!1),Nn(e,t,f);o=t.stateNode,Hh.current=t;var v=m&&typeof s.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&m?(t.child=Zr(t,e.child,null,f),t.child=Zr(t,null,v,f)):yt(e,t,v,f),t.memoizedState=o.state,c&&Uc(t,s,!0),t.child}function Df(e){var t=e.stateNode;t.pendingContext?zc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&zc(e,t.context,!1),da(e,t.containerInfo)}function zf(e,t,s,o,c){return Xr(),ia(c),t.flags|=256,yt(e,t,s,o),t.child}var Ia={dehydrated:null,treeContext:null,retryLane:0};function La(e){return{baseLanes:e,cachePool:null,transitions:null}}function Bf(e,t,s){var o=t.pendingProps,c=Be.current,f=!1,m=(t.flags&128)!==0,v;if((v=m)||(v=e!==null&&e.memoizedState===null?!1:(c&2)!==0),v?(f=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),Pe(Be,c&1),e===null)return sa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(m=o.children,e=o.fallback,f?(o=t.mode,f=t.child,m={mode:"hidden",children:m},(o&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=m):f=Ml(m,o,0,null),e=Sr(e,o,s,null),f.return=t,e.return=t,f.sibling=e,t.child=f,t.child.memoizedState=La(s),t.memoizedState=Ia,e):Aa(t,m));if(c=e.memoizedState,c!==null&&(v=c.dehydrated,v!==null))return Wh(e,t,m,o,v,c,s);if(f){f=o.fallback,m=t.mode,c=e.child,v=c.sibling;var w={mode:"hidden",children:o.children};return(m&1)===0&&t.child!==c?(o=t.child,o.childLanes=0,o.pendingProps=w,t.deletions=null):(o=Zn(c,w),o.subtreeFlags=c.subtreeFlags&14680064),v!==null?f=Zn(v,f):(f=Sr(f,m,s,null),f.flags|=2),f.return=t,o.return=t,o.sibling=f,t.child=o,o=f,f=t.child,m=e.child.memoizedState,m=m===null?La(s):{baseLanes:m.baseLanes|s,cachePool:null,transitions:m.transitions},f.memoizedState=m,f.childLanes=e.childLanes&~s,t.memoizedState=Ia,o}return f=e.child,e=f.sibling,o=Zn(f,{mode:"visible",children:o.children}),(t.mode&1)===0&&(o.lanes=s),o.return=t,o.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=o,t.memoizedState=null,o}function Aa(e,t){return t=Ml({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function jl(e,t,s,o){return o!==null&&ia(o),Zr(t,e.child,null,s),e=Aa(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Wh(e,t,s,o,c,f,m){if(s)return t.flags&256?(t.flags&=-257,o=Ea(Error(r(422))),jl(e,t,m,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(f=o.fallback,c=t.mode,o=Ml({mode:"visible",children:o.children},c,0,null),f=Sr(f,c,m,null),f.flags|=2,o.return=t,f.return=t,o.sibling=f,t.child=o,(t.mode&1)!==0&&Zr(t,e.child,null,m),t.child.memoizedState=La(m),t.memoizedState=Ia,f);if((t.mode&1)===0)return jl(e,t,m,null);if(c.data==="$!"){if(o=c.nextSibling&&c.nextSibling.dataset,o)var v=o.dgst;return o=v,f=Error(r(419)),o=Ea(f,o,void 0),jl(e,t,m,o)}if(v=(m&e.childLanes)!==0,Nt||v){if(o=tt,o!==null){switch(m&-m){case 4:c=2;break;case 16:c=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(o.suspendedLanes|m))!==0?0:c,c!==0&&c!==f.retryLane&&(f.retryLane=c,jn(e,c),tn(o,e,c,-1))}return Qa(),o=Ea(Error(r(421))),jl(e,t,m,o)}return c.data==="$?"?(t.flags|=128,t.child=e.child,t=lm.bind(null,e),c._reactRetry=t,null):(e=f.treeContext,Lt=Fn(c.nextSibling),It=t,$e=!0,Gt=null,e!==null&&(zt[Bt++]=kn,zt[Bt++]=Sn,zt[Bt++]=dr,kn=e.id,Sn=e.overflow,dr=t),t=Aa(t,o.children),t.flags|=4096,t)}function Uf(e,t,s){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),ua(e.return,t,s)}function Pa(e,t,s,o,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:c}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=o,f.tail=s,f.tailMode=c)}function Ff(e,t,s){var o=t.pendingProps,c=o.revealOrder,f=o.tail;if(yt(e,t,o.children,s),o=Be.current,(o&2)!==0)o=o&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Uf(e,s,t);else if(e.tag===19)Uf(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(Pe(Be,o),(t.mode&1)===0)t.memoizedState=null;else switch(c){case"forwards":for(s=t.child,c=null;s!==null;)e=s.alternate,e!==null&&ml(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=t.child,t.child=null):(c=s.sibling,s.sibling=null),Pa(t,!1,c,s,f);break;case"backwards":for(s=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&ml(e)===null){t.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}Pa(t,!0,s,null,f);break;case"together":Pa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function xl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Nn(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),gr|=t.lanes,(s&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,s=Zn(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=Zn(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Qh(e,t,s){switch(t.tag){case 3:Df(t),Xr();break;case 5:tf(t);break;case 1:xt(t.type)&&il(t);break;case 4:da(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,c=t.memoizedProps.value;Pe(fl,o._currentValue),o._currentValue=c;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Pe(Be,Be.current&1),t.flags|=128,null):(s&t.child.childLanes)!==0?Bf(e,t,s):(Pe(Be,Be.current&1),e=Nn(e,t,s),e!==null?e.sibling:null);Pe(Be,Be.current&1);break;case 19:if(o=(s&t.childLanes)!==0,(e.flags&128)!==0){if(o)return Ff(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Pe(Be,Be.current),o)break;return null;case 22:case 23:return t.lanes=0,Mf(e,t,s)}return Nn(e,t,s)}var Vf,ba,Kf,qf;Vf=function(e,t){for(var s=t.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},ba=function(){},Kf=function(e,t,s,o){var c=e.memoizedProps;if(c!==o){e=t.stateNode,mr(an.current);var f=null;switch(s){case"input":c=Se(e,c),o=Se(e,o),f=[];break;case"select":c=X({},c,{value:void 0}),o=X({},o,{value:void 0}),f=[];break;case"textarea":c=Cs(e,c),o=Cs(e,o),f=[];break;default:typeof c.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=nl)}Os(s,o);var m;s=null;for(L in c)if(!o.hasOwnProperty(L)&&c.hasOwnProperty(L)&&c[L]!=null)if(L==="style"){var v=c[L];for(m in v)v.hasOwnProperty(m)&&(s||(s={}),s[m]="")}else L!=="dangerouslySetInnerHTML"&&L!=="children"&&L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&L!=="autoFocus"&&(a.hasOwnProperty(L)?f||(f=[]):(f=f||[]).push(L,null));for(L in o){var w=o[L];if(v=c!=null?c[L]:void 0,o.hasOwnProperty(L)&&w!==v&&(w!=null||v!=null))if(L==="style")if(v){for(m in v)!v.hasOwnProperty(m)||w&&w.hasOwnProperty(m)||(s||(s={}),s[m]="");for(m in w)w.hasOwnProperty(m)&&v[m]!==w[m]&&(s||(s={}),s[m]=w[m])}else s||(f||(f=[]),f.push(L,s)),s=w;else L==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,v=v?v.__html:void 0,w!=null&&v!==w&&(f=f||[]).push(L,w)):L==="children"?typeof w!="string"&&typeof w!="number"||(f=f||[]).push(L,""+w):L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&(a.hasOwnProperty(L)?(w!=null&&L==="onScroll"&&Me("scroll",e),f||v===w||(f=[])):(f=f||[]).push(L,w))}s&&(f=f||[]).push("style",s);var L=f;(t.updateQueue=L)&&(t.flags|=4)}},qf=function(e,t,s,o){s!==o&&(t.flags|=4)};function ai(e,t){if(!$e)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,o=0;if(t)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,o|=c.subtreeFlags&14680064,o|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,o|=c.subtreeFlags,o|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=o,e.childLanes=s,t}function Jh(e,t,s){var o=t.pendingProps;switch(na(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return xt(t.type)&&sl(),dt(t),null;case 3:return o=t.stateNode,ns(),Re(jt),Re(ct),ma(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(ul(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Gt!==null&&(qa(Gt),Gt=null))),ba(e,t),dt(t),null;case 5:pa(t);var c=mr(ri.current);if(s=t.type,e!==null&&t.stateNode!=null)Kf(e,t,s,o,c),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(r(166));return dt(t),null}if(e=mr(an.current),ul(t)){o=t.stateNode,s=t.type;var f=t.memoizedProps;switch(o[on]=t,o[Xs]=f,e=(t.mode&1)!==0,s){case"dialog":Me("cancel",o),Me("close",o);break;case"iframe":case"object":case"embed":Me("load",o);break;case"video":case"audio":for(c=0;c<Js.length;c++)Me(Js[c],o);break;case"source":Me("error",o);break;case"img":case"image":case"link":Me("error",o),Me("load",o);break;case"details":Me("toggle",o);break;case"input":st(o,f),Me("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!f.multiple},Me("invalid",o);break;case"textarea":Es(o,f),Me("invalid",o)}Os(s,f),c=null;for(var m in f)if(f.hasOwnProperty(m)){var v=f[m];m==="children"?typeof v=="string"?o.textContent!==v&&(f.suppressHydrationWarning!==!0&&tl(o.textContent,v,e),c=["children",v]):typeof v=="number"&&o.textContent!==""+v&&(f.suppressHydrationWarning!==!0&&tl(o.textContent,v,e),c=["children",""+v]):a.hasOwnProperty(m)&&v!=null&&m==="onScroll"&&Me("scroll",o)}switch(s){case"input":sn(o),ln(o,f,!0);break;case"textarea":sn(o),kt(o);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(o.onclick=nl)}o=c,t.updateQueue=o,o!==null&&(t.flags|=4)}else{m=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Tt(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=m.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=m.createElement(s,{is:o.is}):(e=m.createElement(s),s==="select"&&(m=e,o.multiple?m.multiple=!0:o.size&&(m.size=o.size))):e=m.createElementNS(e,s),e[on]=t,e[Xs]=o,Vf(e,t,!1,!1),t.stateNode=e;e:{switch(m=Ln(s,o),s){case"dialog":Me("cancel",e),Me("close",e),c=o;break;case"iframe":case"object":case"embed":Me("load",e),c=o;break;case"video":case"audio":for(c=0;c<Js.length;c++)Me(Js[c],e);c=o;break;case"source":Me("error",e),c=o;break;case"img":case"image":case"link":Me("error",e),Me("load",e),c=o;break;case"details":Me("toggle",e),c=o;break;case"input":st(e,o),c=Se(e,o),Me("invalid",e);break;case"option":c=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},c=X({},o,{value:void 0}),Me("invalid",e);break;case"textarea":Es(e,o),c=Cs(e,o),Me("invalid",e);break;default:c=o}Os(s,c),v=c;for(f in v)if(v.hasOwnProperty(f)){var w=v[f];f==="style"?Ar(e,w):f==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,w!=null&&lr(e,w)):f==="children"?typeof w=="string"?(s!=="textarea"||w!=="")&&bt(e,w):typeof w=="number"&&bt(e,""+w):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(a.hasOwnProperty(f)?w!=null&&f==="onScroll"&&Me("scroll",e):w!=null&&F(e,f,w,m))}switch(s){case"input":sn(e),ln(e,o,!1);break;case"textarea":sn(e),kt(e);break;case"option":o.value!=null&&e.setAttribute("value",""+ke(o.value));break;case"select":e.multiple=!!o.multiple,f=o.value,f!=null?pn(e,!!o.multiple,f,!1):o.defaultValue!=null&&pn(e,!!o.multiple,o.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=nl)}switch(s){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return dt(t),null;case 6:if(e&&t.stateNode!=null)qf(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(r(166));if(s=mr(ri.current),mr(an.current),ul(t)){if(o=t.stateNode,s=t.memoizedProps,o[on]=t,(f=o.nodeValue!==s)&&(e=It,e!==null))switch(e.tag){case 3:tl(o.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&tl(o.nodeValue,s,(e.mode&1)!==0)}f&&(t.flags|=4)}else o=(s.nodeType===9?s:s.ownerDocument).createTextNode(o),o[on]=t,t.stateNode=o}return dt(t),null;case 13:if(Re(Be),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if($e&&Lt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Wc(),Xr(),t.flags|=98560,f=!1;else if(f=ul(t),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[on]=t}else Xr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),f=!1}else Gt!==null&&(qa(Gt),Gt=null),f=!0;if(!f)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=s,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Be.current&1)!==0?Ze===0&&(Ze=3):Qa())),t.updateQueue!==null&&(t.flags|=4),dt(t),null);case 4:return ns(),ba(e,t),e===null&&Ys(t.stateNode.containerInfo),dt(t),null;case 10:return aa(t.type._context),dt(t),null;case 17:return xt(t.type)&&sl(),dt(t),null;case 19:if(Re(Be),f=t.memoizedState,f===null)return dt(t),null;if(o=(t.flags&128)!==0,m=f.rendering,m===null)if(o)ai(f,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(m=ml(e),m!==null){for(t.flags|=128,ai(f,!1),o=m.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=s,s=t.child;s!==null;)f=s,e=o,f.flags&=14680066,m=f.alternate,m===null?(f.childLanes=0,f.lanes=e,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=m.childLanes,f.lanes=m.lanes,f.child=m.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=m.memoizedProps,f.memoizedState=m.memoizedState,f.updateQueue=m.updateQueue,f.type=m.type,e=m.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return Pe(Be,Be.current&1|2),t.child}e=e.sibling}f.tail!==null&&ze()>ls&&(t.flags|=128,o=!0,ai(f,!1),t.lanes=4194304)}else{if(!o)if(e=ml(m),e!==null){if(t.flags|=128,o=!0,s=e.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),ai(f,!0),f.tail===null&&f.tailMode==="hidden"&&!m.alternate&&!$e)return dt(t),null}else 2*ze()-f.renderingStartTime>ls&&s!==1073741824&&(t.flags|=128,o=!0,ai(f,!1),t.lanes=4194304);f.isBackwards?(m.sibling=t.child,t.child=m):(s=f.last,s!==null?s.sibling=m:t.child=m,f.last=m)}return f.tail!==null?(t=f.tail,f.rendering=t,f.tail=t.sibling,f.renderingStartTime=ze(),t.sibling=null,s=Be.current,Pe(Be,o?s&1|2:s&1),t):(dt(t),null);case 22:case 23:return Wa(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?(At&1073741824)!==0&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function Yh(e,t){switch(na(t),t.tag){case 1:return xt(t.type)&&sl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ns(),Re(jt),Re(ct),ma(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return pa(t),null;case 13:if(Re(Be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Xr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Re(Be),null;case 4:return ns(),null;case 10:return aa(t.type._context),null;case 22:case 23:return Wa(),null;case 24:return null;default:return null}}var Nl=!1,pt=!1,Gh=typeof WeakSet=="function"?WeakSet:Set,re=null;function ss(e,t){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(o){Fe(e,t,o)}else s.current=null}function Ma(e,t,s){try{s()}catch(o){Fe(e,t,o)}}var Hf=!1;function Xh(e,t){if(Wo=Ki,e=xc(),zo(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var c=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var m=0,v=-1,w=-1,L=0,z=0,B=e,$=null;t:for(;;){for(var ee;B!==s||c!==0&&B.nodeType!==3||(v=m+c),B!==f||o!==0&&B.nodeType!==3||(w=m+o),B.nodeType===3&&(m+=B.nodeValue.length),(ee=B.firstChild)!==null;)$=B,B=ee;for(;;){if(B===e)break t;if($===s&&++L===c&&(v=m),$===f&&++z===o&&(w=m),(ee=B.nextSibling)!==null)break;B=$,$=B.parentNode}B=ee}s=v===-1||w===-1?null:{start:v,end:w}}else s=null}s=s||{start:0,end:0}}else s=null;for(Qo={focusedElem:e,selectionRange:s},Ki=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var se=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(se!==null){var ie=se.memoizedProps,Ke=se.memoizedState,T=t.stateNode,j=T.getSnapshotBeforeUpdate(t.elementType===t.type?ie:Xt(t.type,ie),Ke);T.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(V){Fe(t,t.return,V)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return se=Hf,Hf=!1,se}function ui(e,t,s){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var c=o=o.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&Ma(t,s,f)}c=c.next}while(c!==o)}}function Cl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var s=t=t.next;do{if((s.tag&e)===e){var o=s.create;s.destroy=o()}s=s.next}while(s!==t)}}function Ra(e){var t=e.ref;if(t!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof t=="function"?t(e):t.current=e}}function Wf(e){var t=e.alternate;t!==null&&(e.alternate=null,Wf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[on],delete t[Xs],delete t[Xo],delete t[bh],delete t[Mh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Qf(e){return e.tag===5||e.tag===3||e.tag===4}function Jf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $a(e,t,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?s.nodeType===8?s.parentNode.insertBefore(e,t):s.insertBefore(e,t):(s.nodeType===8?(t=s.parentNode,t.insertBefore(e,s)):(t=s,t.appendChild(e)),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=nl));else if(o!==4&&(e=e.child,e!==null))for($a(e,t,s),e=e.sibling;e!==null;)$a(e,t,s),e=e.sibling}function Da(e,t,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(Da(e,t,s),e=e.sibling;e!==null;)Da(e,t,s),e=e.sibling}var lt=null,Zt=!1;function Qn(e,t,s){for(s=s.child;s!==null;)Yf(e,t,s),s=s.sibling}function Yf(e,t,s){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(gn,s)}catch{}switch(s.tag){case 5:pt||ss(s,t);case 6:var o=lt,c=Zt;lt=null,Qn(e,t,s),lt=o,Zt=c,lt!==null&&(Zt?(e=lt,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):lt.removeChild(s.stateNode));break;case 18:lt!==null&&(Zt?(e=lt,s=s.stateNode,e.nodeType===8?Go(e.parentNode,s):e.nodeType===1&&Go(e,s),Us(e)):Go(lt,s.stateNode));break;case 4:o=lt,c=Zt,lt=s.stateNode.containerInfo,Zt=!0,Qn(e,t,s),lt=o,Zt=c;break;case 0:case 11:case 14:case 15:if(!pt&&(o=s.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){c=o=o.next;do{var f=c,m=f.destroy;f=f.tag,m!==void 0&&((f&2)!==0||(f&4)!==0)&&Ma(s,t,m),c=c.next}while(c!==o)}Qn(e,t,s);break;case 1:if(!pt&&(ss(s,t),o=s.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=s.memoizedProps,o.state=s.memoizedState,o.componentWillUnmount()}catch(v){Fe(s,t,v)}Qn(e,t,s);break;case 21:Qn(e,t,s);break;case 22:s.mode&1?(pt=(o=pt)||s.memoizedState!==null,Qn(e,t,s),pt=o):Qn(e,t,s);break;default:Qn(e,t,s)}}function Gf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new Gh),t.forEach(function(o){var c=om.bind(null,e,o);s.has(o)||(s.add(o),o.then(c,c))})}}function en(e,t){var s=t.deletions;if(s!==null)for(var o=0;o<s.length;o++){var c=s[o];try{var f=e,m=t,v=m;e:for(;v!==null;){switch(v.tag){case 5:lt=v.stateNode,Zt=!1;break e;case 3:lt=v.stateNode.containerInfo,Zt=!0;break e;case 4:lt=v.stateNode.containerInfo,Zt=!0;break e}v=v.return}if(lt===null)throw Error(r(160));Yf(f,m,c),lt=null,Zt=!1;var w=c.alternate;w!==null&&(w.return=null),c.return=null}catch(L){Fe(c,t,L)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Xf(t,e),t=t.sibling}function Xf(e,t){var s=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(en(t,e),cn(e),o&4){try{ui(3,e,e.return),Cl(3,e)}catch(ie){Fe(e,e.return,ie)}try{ui(5,e,e.return)}catch(ie){Fe(e,e.return,ie)}}break;case 1:en(t,e),cn(e),o&512&&s!==null&&ss(s,s.return);break;case 5:if(en(t,e),cn(e),o&512&&s!==null&&ss(s,s.return),e.flags&32){var c=e.stateNode;try{bt(c,"")}catch(ie){Fe(e,e.return,ie)}}if(o&4&&(c=e.stateNode,c!=null)){var f=e.memoizedProps,m=s!==null?s.memoizedProps:f,v=e.type,w=e.updateQueue;if(e.updateQueue=null,w!==null)try{v==="input"&&f.type==="radio"&&f.name!=null&&Je(c,f),Ln(v,m);var L=Ln(v,f);for(m=0;m<w.length;m+=2){var z=w[m],B=w[m+1];z==="style"?Ar(c,B):z==="dangerouslySetInnerHTML"?lr(c,B):z==="children"?bt(c,B):F(c,z,B,L)}switch(v){case"input":it(c,f);break;case"textarea":at(c,f);break;case"select":var $=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!f.multiple;var ee=f.value;ee!=null?pn(c,!!f.multiple,ee,!1):$!==!!f.multiple&&(f.defaultValue!=null?pn(c,!!f.multiple,f.defaultValue,!0):pn(c,!!f.multiple,f.multiple?[]:"",!1))}c[Xs]=f}catch(ie){Fe(e,e.return,ie)}}break;case 6:if(en(t,e),cn(e),o&4){if(e.stateNode===null)throw Error(r(162));c=e.stateNode,f=e.memoizedProps;try{c.nodeValue=f}catch(ie){Fe(e,e.return,ie)}}break;case 3:if(en(t,e),cn(e),o&4&&s!==null&&s.memoizedState.isDehydrated)try{Us(t.containerInfo)}catch(ie){Fe(e,e.return,ie)}break;case 4:en(t,e),cn(e);break;case 13:en(t,e),cn(e),c=e.child,c.flags&8192&&(f=c.memoizedState!==null,c.stateNode.isHidden=f,!f||c.alternate!==null&&c.alternate.memoizedState!==null||(Ua=ze())),o&4&&Gf(e);break;case 22:if(z=s!==null&&s.memoizedState!==null,e.mode&1?(pt=(L=pt)||z,en(t,e),pt=L):en(t,e),cn(e),o&8192){if(L=e.memoizedState!==null,(e.stateNode.isHidden=L)&&!z&&(e.mode&1)!==0)for(re=e,z=e.child;z!==null;){for(B=re=z;re!==null;){switch($=re,ee=$.child,$.tag){case 0:case 11:case 14:case 15:ui(4,$,$.return);break;case 1:ss($,$.return);var se=$.stateNode;if(typeof se.componentWillUnmount=="function"){o=$,s=$.return;try{t=o,se.props=t.memoizedProps,se.state=t.memoizedState,se.componentWillUnmount()}catch(ie){Fe(o,s,ie)}}break;case 5:ss($,$.return);break;case 22:if($.memoizedState!==null){td(B);continue}}ee!==null?(ee.return=$,re=ee):td(B)}z=z.sibling}e:for(z=null,B=e;;){if(B.tag===5){if(z===null){z=B;try{c=B.stateNode,L?(f=c.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(v=B.stateNode,w=B.memoizedProps.style,m=w!=null&&w.hasOwnProperty("display")?w.display:null,v.style.display=or("display",m))}catch(ie){Fe(e,e.return,ie)}}}else if(B.tag===6){if(z===null)try{B.stateNode.nodeValue=L?"":B.memoizedProps}catch(ie){Fe(e,e.return,ie)}}else if((B.tag!==22&&B.tag!==23||B.memoizedState===null||B===e)&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===e)break e;for(;B.sibling===null;){if(B.return===null||B.return===e)break e;z===B&&(z=null),B=B.return}z===B&&(z=null),B.sibling.return=B.return,B=B.sibling}}break;case 19:en(t,e),cn(e),o&4&&Gf(e);break;case 21:break;default:en(t,e),cn(e)}}function cn(e){var t=e.flags;if(t&2){try{e:{for(var s=e.return;s!==null;){if(Qf(s)){var o=s;break e}s=s.return}throw Error(r(160))}switch(o.tag){case 5:var c=o.stateNode;o.flags&32&&(bt(c,""),o.flags&=-33);var f=Jf(e);Da(e,f,c);break;case 3:case 4:var m=o.stateNode.containerInfo,v=Jf(e);$a(e,v,m);break;default:throw Error(r(161))}}catch(w){Fe(e,e.return,w)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Zh(e,t,s){re=e,Zf(e)}function Zf(e,t,s){for(var o=(e.mode&1)!==0;re!==null;){var c=re,f=c.child;if(c.tag===22&&o){var m=c.memoizedState!==null||Nl;if(!m){var v=c.alternate,w=v!==null&&v.memoizedState!==null||pt;v=Nl;var L=pt;if(Nl=m,(pt=w)&&!L)for(re=c;re!==null;)m=re,w=m.child,m.tag===22&&m.memoizedState!==null?nd(c):w!==null?(w.return=m,re=w):nd(c);for(;f!==null;)re=f,Zf(f),f=f.sibling;re=c,Nl=v,pt=L}ed(e)}else(c.subtreeFlags&8772)!==0&&f!==null?(f.return=c,re=f):ed(e)}}function ed(e){for(;re!==null;){var t=re;if((t.flags&8772)!==0){var s=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:pt||Cl(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!pt)if(s===null)o.componentDidMount();else{var c=t.elementType===t.type?s.memoizedProps:Xt(t.type,s.memoizedProps);o.componentDidUpdate(c,s.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var f=t.updateQueue;f!==null&&ef(t,f,o);break;case 3:var m=t.updateQueue;if(m!==null){if(s=null,t.child!==null)switch(t.child.tag){case 5:s=t.child.stateNode;break;case 1:s=t.child.stateNode}ef(t,m,s)}break;case 5:var v=t.stateNode;if(s===null&&t.flags&4){s=v;var w=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":w.autoFocus&&s.focus();break;case"img":w.src&&(s.src=w.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var L=t.alternate;if(L!==null){var z=L.memoizedState;if(z!==null){var B=z.dehydrated;B!==null&&Us(B)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}pt||t.flags&512&&Ra(t)}catch($){Fe(t,t.return,$)}}if(t===e){re=null;break}if(s=t.sibling,s!==null){s.return=t.return,re=s;break}re=t.return}}function td(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var s=t.sibling;if(s!==null){s.return=t.return,re=s;break}re=t.return}}function nd(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var s=t.return;try{Cl(4,t)}catch(w){Fe(t,s,w)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var c=t.return;try{o.componentDidMount()}catch(w){Fe(t,c,w)}}var f=t.return;try{Ra(t)}catch(w){Fe(t,f,w)}break;case 5:var m=t.return;try{Ra(t)}catch(w){Fe(t,m,w)}}}catch(w){Fe(t,t.return,w)}if(t===e){re=null;break}var v=t.sibling;if(v!==null){v.return=t.return,re=v;break}re=t.return}}var em=Math.ceil,El=K.ReactCurrentDispatcher,za=K.ReactCurrentOwner,Vt=K.ReactCurrentBatchConfig,Ee=0,tt=null,Ye=null,ot=0,At=0,is=Vn(0),Ze=0,ci=null,gr=0,Ol=0,Ba=0,fi=null,Ct=null,Ua=0,ls=1/0,Cn=null,Tl=!1,Fa=null,Jn=null,_l=!1,Yn=null,Il=0,di=0,Va=null,Ll=-1,Al=0;function gt(){return(Ee&6)!==0?ze():Ll!==-1?Ll:Ll=ze()}function Gn(e){return(e.mode&1)===0?1:(Ee&2)!==0&&ot!==0?ot&-ot:$h.transition!==null?(Al===0&&(Al=Rs()),Al):(e=Ae,e!==0||(e=window.event,e=e===void 0?16:rc(e.type)),e)}function tn(e,t,s,o){if(50<di)throw di=0,Va=null,Error(r(185));Jt(e,s,o),((Ee&2)===0||e!==tt)&&(e===tt&&((Ee&2)===0&&(Ol|=s),Ze===4&&Xn(e,ot)),Et(e,o),s===1&&Ee===0&&(t.mode&1)===0&&(ls=ze()+500,ll&&qn()))}function Et(e,t){var s=e.callbackNode;ut(e,t);var o=mt(e,e===tt?ot:0);if(o===0)s!==null&&$r(s),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(s!=null&&$r(s),t===1)e.tag===0?Rh(sd.bind(null,e)):Fc(sd.bind(null,e)),Ah(function(){(Ee&6)===0&&qn()}),s=null;else{switch(Ju(o)){case 1:s=bs;break;case 4:s=Ms;break;case 16:s=Dr;break;case 536870912:s=Bi;break;default:s=Dr}s=dd(s,rd.bind(null,e))}e.callbackPriority=t,e.callbackNode=s}}function rd(e,t){if(Ll=-1,Al=0,(Ee&6)!==0)throw Error(r(327));var s=e.callbackNode;if(os()&&e.callbackNode!==s)return null;var o=mt(e,e===tt?ot:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||t)t=Pl(e,o);else{t=o;var c=Ee;Ee|=2;var f=ld();(tt!==e||ot!==t)&&(Cn=null,ls=ze()+500,wr(e,t));do try{rm();break}catch(v){id(e,v)}while(!0);oa(),El.current=f,Ee=c,Ye!==null?t=0:(tt=null,ot=0,t=Ze)}if(t!==0){if(t===2&&(c=Dt(e),c!==0&&(o=c,t=Ka(e,c))),t===1)throw s=ci,wr(e,0),Xn(e,o),Et(e,ze()),s;if(t===6)Xn(e,o);else{if(c=e.current.alternate,(o&30)===0&&!tm(c)&&(t=Pl(e,o),t===2&&(f=Dt(e),f!==0&&(o=f,t=Ka(e,f))),t===1))throw s=ci,wr(e,0),Xn(e,o),Et(e,ze()),s;switch(e.finishedWork=c,e.finishedLanes=o,t){case 0:case 1:throw Error(r(345));case 2:kr(e,Ct,Cn);break;case 3:if(Xn(e,o),(o&130023424)===o&&(t=Ua+500-ze(),10<t)){if(mt(e,0)!==0)break;if(c=e.suspendedLanes,(c&o)!==o){gt(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=Yo(kr.bind(null,e,Ct,Cn),t);break}kr(e,Ct,Cn);break;case 4:if(Xn(e,o),(o&4194240)===o)break;for(t=e.eventTimes,c=-1;0<o;){var m=31-P(o);f=1<<m,m=t[m],m>c&&(c=m),o&=~f}if(o=c,o=ze()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*em(o/1960))-o,10<o){e.timeoutHandle=Yo(kr.bind(null,e,Ct,Cn),o);break}kr(e,Ct,Cn);break;case 5:kr(e,Ct,Cn);break;default:throw Error(r(329))}}}return Et(e,ze()),e.callbackNode===s?rd.bind(null,e):null}function Ka(e,t){var s=fi;return e.current.memoizedState.isDehydrated&&(wr(e,t).flags|=256),e=Pl(e,t),e!==2&&(t=Ct,Ct=s,t!==null&&qa(t)),e}function qa(e){Ct===null?Ct=e:Ct.push.apply(Ct,e)}function tm(e){for(var t=e;;){if(t.flags&16384){var s=t.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var o=0;o<s.length;o++){var c=s[o],f=c.getSnapshot;c=c.value;try{if(!Yt(f(),c))return!1}catch{return!1}}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Xn(e,t){for(t&=~Ba,t&=~Ol,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var s=31-P(t),o=1<<s;e[s]=-1,t&=~o}}function sd(e){if((Ee&6)!==0)throw Error(r(327));os();var t=mt(e,0);if((t&1)===0)return Et(e,ze()),null;var s=Pl(e,t);if(e.tag!==0&&s===2){var o=Dt(e);o!==0&&(t=o,s=Ka(e,o))}if(s===1)throw s=ci,wr(e,0),Xn(e,t),Et(e,ze()),s;if(s===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,kr(e,Ct,Cn),Et(e,ze()),null}function Ha(e,t){var s=Ee;Ee|=1;try{return e(t)}finally{Ee=s,Ee===0&&(ls=ze()+500,ll&&qn())}}function vr(e){Yn!==null&&Yn.tag===0&&(Ee&6)===0&&os();var t=Ee;Ee|=1;var s=Vt.transition,o=Ae;try{if(Vt.transition=null,Ae=1,e)return e()}finally{Ae=o,Vt.transition=s,Ee=t,(Ee&6)===0&&qn()}}function Wa(){At=is.current,Re(is)}function wr(e,t){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,Lh(s)),Ye!==null)for(s=Ye.return;s!==null;){var o=s;switch(na(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&sl();break;case 3:ns(),Re(jt),Re(ct),ma();break;case 5:pa(o);break;case 4:ns();break;case 13:Re(Be);break;case 19:Re(Be);break;case 10:aa(o.type._context);break;case 22:case 23:Wa()}s=s.return}if(tt=e,Ye=e=Zn(e.current,null),ot=At=t,Ze=0,ci=null,Ba=Ol=gr=0,Ct=fi=null,hr!==null){for(t=0;t<hr.length;t++)if(s=hr[t],o=s.interleaved,o!==null){s.interleaved=null;var c=o.next,f=s.pending;if(f!==null){var m=f.next;f.next=c,o.next=m}s.pending=o}hr=null}return e}function id(e,t){do{var s=Ye;try{if(oa(),yl.current=kl,gl){for(var o=Ue.memoizedState;o!==null;){var c=o.queue;c!==null&&(c.pending=null),o=o.next}gl=!1}if(yr=0,et=Xe=Ue=null,si=!1,ii=0,za.current=null,s===null||s.return===null){Ze=1,ci=t,Ye=null;break}e:{var f=e,m=s.return,v=s,w=t;if(t=ot,v.flags|=32768,w!==null&&typeof w=="object"&&typeof w.then=="function"){var L=w,z=v,B=z.tag;if((z.mode&1)===0&&(B===0||B===11||B===15)){var $=z.alternate;$?(z.updateQueue=$.updateQueue,z.memoizedState=$.memoizedState,z.lanes=$.lanes):(z.updateQueue=null,z.memoizedState=null)}var ee=If(m);if(ee!==null){ee.flags&=-257,Lf(ee,m,v,f,t),ee.mode&1&&_f(f,L,t),t=ee,w=L;var se=t.updateQueue;if(se===null){var ie=new Set;ie.add(w),t.updateQueue=ie}else se.add(w);break e}else{if((t&1)===0){_f(f,L,t),Qa();break e}w=Error(r(426))}}else if($e&&v.mode&1){var Ke=If(m);if(Ke!==null){(Ke.flags&65536)===0&&(Ke.flags|=256),Lf(Ke,m,v,f,t),ia(rs(w,v));break e}}f=w=rs(w,v),Ze!==4&&(Ze=2),fi===null?fi=[f]:fi.push(f),f=m;do{switch(f.tag){case 3:f.flags|=65536,t&=-t,f.lanes|=t;var T=Of(f,w,t);Zc(f,T);break e;case 1:v=w;var j=f.type,_=f.stateNode;if((f.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Jn===null||!Jn.has(_)))){f.flags|=65536,t&=-t,f.lanes|=t;var V=Tf(f,v,t);Zc(f,V);break e}}f=f.return}while(f!==null)}ad(s)}catch(oe){t=oe,Ye===s&&s!==null&&(Ye=s=s.return);continue}break}while(!0)}function ld(){var e=El.current;return El.current=kl,e===null?kl:e}function Qa(){(Ze===0||Ze===3||Ze===2)&&(Ze=4),tt===null||(gr&268435455)===0&&(Ol&268435455)===0||Xn(tt,ot)}function Pl(e,t){var s=Ee;Ee|=2;var o=ld();(tt!==e||ot!==t)&&(Cn=null,wr(e,t));do try{nm();break}catch(c){id(e,c)}while(!0);if(oa(),Ee=s,El.current=o,Ye!==null)throw Error(r(261));return tt=null,ot=0,Ze}function nm(){for(;Ye!==null;)od(Ye)}function rm(){for(;Ye!==null&&!So();)od(Ye)}function od(e){var t=fd(e.alternate,e,At);e.memoizedProps=e.pendingProps,t===null?ad(e):Ye=t,za.current=null}function ad(e){var t=e;do{var s=t.alternate;if(e=t.return,(t.flags&32768)===0){if(s=Jh(s,t,At),s!==null){Ye=s;return}}else{if(s=Yh(s,t),s!==null){s.flags&=32767,Ye=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ze=6,Ye=null;return}}if(t=t.sibling,t!==null){Ye=t;return}Ye=t=e}while(t!==null);Ze===0&&(Ze=5)}function kr(e,t,s){var o=Ae,c=Vt.transition;try{Vt.transition=null,Ae=1,sm(e,t,s,o)}finally{Vt.transition=c,Ae=o}return null}function sm(e,t,s,o){do os();while(Yn!==null);if((Ee&6)!==0)throw Error(r(327));s=e.finishedWork;var c=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var f=s.lanes|s.childLanes;if(Dp(e,f),e===tt&&(Ye=tt=null,ot=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||_l||(_l=!0,dd(Dr,function(){return os(),null})),f=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||f){f=Vt.transition,Vt.transition=null;var m=Ae;Ae=1;var v=Ee;Ee|=4,za.current=null,Xh(e,s),Xf(s,e),Nh(Qo),Ki=!!Wo,Qo=Wo=null,e.current=s,Zh(s),jo(),Ee=v,Ae=m,Vt.transition=f}else e.current=s;if(_l&&(_l=!1,Yn=e,Il=c),f=e.pendingLanes,f===0&&(Jn=null),N(s.stateNode),Et(e,ze()),t!==null)for(o=e.onRecoverableError,s=0;s<t.length;s++)c=t[s],o(c.value,{componentStack:c.stack,digest:c.digest});if(Tl)throw Tl=!1,e=Fa,Fa=null,e;return(Il&1)!==0&&e.tag!==0&&os(),f=e.pendingLanes,(f&1)!==0?e===Va?di++:(di=0,Va=e):di=0,qn(),null}function os(){if(Yn!==null){var e=Ju(Il),t=Vt.transition,s=Ae;try{if(Vt.transition=null,Ae=16>e?16:e,Yn===null)var o=!1;else{if(e=Yn,Yn=null,Il=0,(Ee&6)!==0)throw Error(r(331));var c=Ee;for(Ee|=4,re=e.current;re!==null;){var f=re,m=f.child;if((re.flags&16)!==0){var v=f.deletions;if(v!==null){for(var w=0;w<v.length;w++){var L=v[w];for(re=L;re!==null;){var z=re;switch(z.tag){case 0:case 11:case 15:ui(8,z,f)}var B=z.child;if(B!==null)B.return=z,re=B;else for(;re!==null;){z=re;var $=z.sibling,ee=z.return;if(Wf(z),z===L){re=null;break}if($!==null){$.return=ee,re=$;break}re=ee}}}var se=f.alternate;if(se!==null){var ie=se.child;if(ie!==null){se.child=null;do{var Ke=ie.sibling;ie.sibling=null,ie=Ke}while(ie!==null)}}re=f}}if((f.subtreeFlags&2064)!==0&&m!==null)m.return=f,re=m;else e:for(;re!==null;){if(f=re,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:ui(9,f,f.return)}var T=f.sibling;if(T!==null){T.return=f.return,re=T;break e}re=f.return}}var j=e.current;for(re=j;re!==null;){m=re;var _=m.child;if((m.subtreeFlags&2064)!==0&&_!==null)_.return=m,re=_;else e:for(m=j;re!==null;){if(v=re,(v.flags&2048)!==0)try{switch(v.tag){case 0:case 11:case 15:Cl(9,v)}}catch(oe){Fe(v,v.return,oe)}if(v===m){re=null;break e}var V=v.sibling;if(V!==null){V.return=v.return,re=V;break e}re=v.return}}if(Ee=c,qn(),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(gn,e)}catch{}o=!0}return o}finally{Ae=s,Vt.transition=t}}return!1}function ud(e,t,s){t=rs(s,t),t=Of(e,t,1),e=Wn(e,t,1),t=gt(),e!==null&&(Jt(e,1,t),Et(e,t))}function Fe(e,t,s){if(e.tag===3)ud(e,e,s);else for(;t!==null;){if(t.tag===3){ud(t,e,s);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Jn===null||!Jn.has(o))){e=rs(s,e),e=Tf(t,e,1),t=Wn(t,e,1),e=gt(),t!==null&&(Jt(t,1,e),Et(t,e));break}}t=t.return}}function im(e,t,s){var o=e.pingCache;o!==null&&o.delete(t),t=gt(),e.pingedLanes|=e.suspendedLanes&s,tt===e&&(ot&s)===s&&(Ze===4||Ze===3&&(ot&130023424)===ot&&500>ze()-Ua?wr(e,0):Ba|=s),Et(e,t)}function cd(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ve,Ve<<=1,(Ve&130023424)===0&&(Ve=4194304)));var s=gt();e=jn(e,t),e!==null&&(Jt(e,t,s),Et(e,s))}function lm(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),cd(e,s)}function om(e,t){var s=0;switch(e.tag){case 13:var o=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(r(314))}o!==null&&o.delete(t),cd(e,s)}var fd;fd=function(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps||jt.current)Nt=!0;else{if((e.lanes&s)===0&&(t.flags&128)===0)return Nt=!1,Qh(e,t,s);Nt=(e.flags&131072)!==0}else Nt=!1,$e&&(t.flags&1048576)!==0&&Vc(t,al,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;xl(e,t),e=t.pendingProps;var c=Jr(t,ct.current);ts(t,s),c=va(null,t,o,e,c,s);var f=wa();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xt(o)?(f=!0,il(t)):f=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,fa(t),c.updater=Sl,t.stateNode=c,c._reactInternals=t,Ca(t,o,e,s),t=_a(null,t,o,!0,f,s)):(t.tag=0,$e&&f&&ta(t),yt(null,t,c,s),t=t.child),t;case 16:o=t.elementType;e:{switch(xl(e,t),e=t.pendingProps,c=o._init,o=c(o._payload),t.type=o,c=t.tag=um(o),e=Xt(o,e),c){case 0:t=Ta(null,t,o,e,s);break e;case 1:t=$f(null,t,o,e,s);break e;case 11:t=Af(null,t,o,e,s);break e;case 14:t=Pf(null,t,o,Xt(o.type,e),s);break e}throw Error(r(306,o,""))}return t;case 0:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:Xt(o,c),Ta(e,t,o,c,s);case 1:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:Xt(o,c),$f(e,t,o,c,s);case 3:e:{if(Df(t),e===null)throw Error(r(387));o=t.pendingProps,f=t.memoizedState,c=f.element,Xc(e,t),hl(t,o,null,s);var m=t.memoizedState;if(o=m.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){c=rs(Error(r(423)),t),t=zf(e,t,o,s,c);break e}else if(o!==c){c=rs(Error(r(424)),t),t=zf(e,t,o,s,c);break e}else for(Lt=Fn(t.stateNode.containerInfo.firstChild),It=t,$e=!0,Gt=null,s=Yc(t,null,o,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Xr(),o===c){t=Nn(e,t,s);break e}yt(e,t,o,s)}t=t.child}return t;case 5:return tf(t),e===null&&sa(t),o=t.type,c=t.pendingProps,f=e!==null?e.memoizedProps:null,m=c.children,Jo(o,c)?m=null:f!==null&&Jo(o,f)&&(t.flags|=32),Rf(e,t),yt(e,t,m,s),t.child;case 6:return e===null&&sa(t),null;case 13:return Bf(e,t,s);case 4:return da(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Zr(t,null,o,s):yt(e,t,o,s),t.child;case 11:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:Xt(o,c),Af(e,t,o,c,s);case 7:return yt(e,t,t.pendingProps,s),t.child;case 8:return yt(e,t,t.pendingProps.children,s),t.child;case 12:return yt(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(o=t.type._context,c=t.pendingProps,f=t.memoizedProps,m=c.value,Pe(fl,o._currentValue),o._currentValue=m,f!==null)if(Yt(f.value,m)){if(f.children===c.children&&!jt.current){t=Nn(e,t,s);break e}}else for(f=t.child,f!==null&&(f.return=t);f!==null;){var v=f.dependencies;if(v!==null){m=f.child;for(var w=v.firstContext;w!==null;){if(w.context===o){if(f.tag===1){w=xn(-1,s&-s),w.tag=2;var L=f.updateQueue;if(L!==null){L=L.shared;var z=L.pending;z===null?w.next=w:(w.next=z.next,z.next=w),L.pending=w}}f.lanes|=s,w=f.alternate,w!==null&&(w.lanes|=s),ua(f.return,s,t),v.lanes|=s;break}w=w.next}}else if(f.tag===10)m=f.type===t.type?null:f.child;else if(f.tag===18){if(m=f.return,m===null)throw Error(r(341));m.lanes|=s,v=m.alternate,v!==null&&(v.lanes|=s),ua(m,s,t),m=f.sibling}else m=f.child;if(m!==null)m.return=f;else for(m=f;m!==null;){if(m===t){m=null;break}if(f=m.sibling,f!==null){f.return=m.return,m=f;break}m=m.return}f=m}yt(e,t,c.children,s),t=t.child}return t;case 9:return c=t.type,o=t.pendingProps.children,ts(t,s),c=Ut(c),o=o(c),t.flags|=1,yt(e,t,o,s),t.child;case 14:return o=t.type,c=Xt(o,t.pendingProps),c=Xt(o.type,c),Pf(e,t,o,c,s);case 15:return bf(e,t,t.type,t.pendingProps,s);case 17:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:Xt(o,c),xl(e,t),t.tag=1,xt(o)?(e=!0,il(t)):e=!1,ts(t,s),Cf(t,o,c),Ca(t,o,c,s),_a(null,t,o,!0,e,s);case 19:return Ff(e,t,s);case 22:return Mf(e,t,s)}throw Error(r(156,t.tag))};function dd(e,t){return zi(e,t)}function am(e,t,s,o){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kt(e,t,s,o){return new am(e,t,s,o)}function Ja(e){return e=e.prototype,!(!e||!e.isReactComponent)}function um(e){if(typeof e=="function")return Ja(e)?1:0;if(e!=null){if(e=e.$$typeof,e===te)return 11;if(e===_e)return 14}return 2}function Zn(e,t){var s=e.alternate;return s===null?(s=Kt(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function bl(e,t,s,o,c,f){var m=2;if(o=e,typeof e=="function")Ja(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case q:return Sr(s.children,c,f,t);case U:m=8,c|=8;break;case ae:return e=Kt(12,s,t,c|2),e.elementType=ae,e.lanes=f,e;case de:return e=Kt(13,s,t,c),e.elementType=de,e.lanes=f,e;case Ie:return e=Kt(19,s,t,c),e.elementType=Ie,e.lanes=f,e;case xe:return Ml(s,c,f,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D:m=10;break e;case Z:m=9;break e;case te:m=11;break e;case _e:m=14;break e;case De:m=16,o=null;break e}throw Error(r(130,e==null?e:typeof e,""))}return t=Kt(m,s,t,c),t.elementType=e,t.type=o,t.lanes=f,t}function Sr(e,t,s,o){return e=Kt(7,e,o,t),e.lanes=s,e}function Ml(e,t,s,o){return e=Kt(22,e,o,t),e.elementType=xe,e.lanes=s,e.stateNode={isHidden:!1},e}function Ya(e,t,s){return e=Kt(6,e,null,t),e.lanes=s,e}function Ga(e,t,s){return t=Kt(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cm(e,t,s,o,c){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zr(0),this.expirationTimes=zr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zr(0),this.identifierPrefix=o,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Xa(e,t,s,o,c,f,m,v,w){return e=new cm(e,t,s,v,w),t===1?(t=1,f===!0&&(t|=8)):t=0,f=Kt(3,null,null,t),e.current=f,f.stateNode=e,f.memoizedState={element:o,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},fa(f),e}function fm(e,t,s){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Q,key:o==null?null:""+o,children:e,containerInfo:t,implementation:s}}function pd(e){if(!e)return Kn;e=e._reactInternals;e:{if(yn(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(xt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var s=e.type;if(xt(s))return Bc(e,s,t)}return t}function hd(e,t,s,o,c,f,m,v,w){return e=Xa(s,o,!0,e,c,f,m,v,w),e.context=pd(null),s=e.current,o=gt(),c=Gn(s),f=xn(o,c),f.callback=t??null,Wn(s,f,c),e.current.lanes=c,Jt(e,c,o),Et(e,o),e}function Rl(e,t,s,o){var c=t.current,f=gt(),m=Gn(c);return s=pd(s),t.context===null?t.context=s:t.pendingContext=s,t=xn(f,m),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=Wn(c,t,m),e!==null&&(tn(e,c,m,f),pl(e,c,m)),m}function $l(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function md(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function Za(e,t){md(e,t),(e=e.alternate)&&md(e,t)}function dm(){return null}var yd=typeof reportError=="function"?reportError:function(e){console.error(e)};function eu(e){this._internalRoot=e}Dl.prototype.render=eu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));Rl(e,t,null,null)},Dl.prototype.unmount=eu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vr(function(){Rl(null,e,null,null)}),t[vn]=null}};function Dl(e){this._internalRoot=e}Dl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xu();e={blockedOn:null,target:e,priority:t};for(var s=0;s<zn.length&&t!==0&&t<zn[s].priority;s++);zn.splice(s,0,e),s===0&&tc(e)}};function tu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function zl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function gd(){}function pm(e,t,s,o,c){if(c){if(typeof o=="function"){var f=o;o=function(){var L=$l(m);f.call(L)}}var m=hd(t,o,e,0,null,!1,!1,"",gd);return e._reactRootContainer=m,e[vn]=m.current,Ys(e.nodeType===8?e.parentNode:e),vr(),m}for(;c=e.lastChild;)e.removeChild(c);if(typeof o=="function"){var v=o;o=function(){var L=$l(w);v.call(L)}}var w=Xa(e,0,!1,null,null,!1,!1,"",gd);return e._reactRootContainer=w,e[vn]=w.current,Ys(e.nodeType===8?e.parentNode:e),vr(function(){Rl(t,w,s,o)}),w}function Bl(e,t,s,o,c){var f=s._reactRootContainer;if(f){var m=f;if(typeof c=="function"){var v=c;c=function(){var w=$l(m);v.call(w)}}Rl(t,m,e,c)}else m=pm(s,t,e,c,o);return $l(m)}Yu=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var s=Oe(t.pendingLanes);s!==0&&(Co(t,s|1),Et(t,ze()),(Ee&6)===0&&(ls=ze()+500,qn()))}break;case 13:vr(function(){var o=jn(e,1);if(o!==null){var c=gt();tn(o,e,1,c)}}),Za(e,1)}},Eo=function(e){if(e.tag===13){var t=jn(e,134217728);if(t!==null){var s=gt();tn(t,e,134217728,s)}Za(e,134217728)}},Gu=function(e){if(e.tag===13){var t=Gn(e),s=jn(e,t);if(s!==null){var o=gt();tn(s,e,t,o)}Za(e,t)}},Xu=function(){return Ae},Zu=function(e,t){var s=Ae;try{return Ae=e,t()}finally{Ae=s}},_s=function(e,t,s){switch(t){case"input":if(it(e,s),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<s.length;t++){var o=s[t];if(o!==e&&o.form===e.form){var c=rl(o);if(!c)throw Error(r(90));sr(o),it(o,c)}}}break;case"textarea":at(e,s);break;case"select":t=s.value,t!=null&&pn(e,!!s.multiple,t,!1)}},Qt=Ha,br=vr;var hm={usingClientEntryPoint:!1,Events:[Zs,Wr,rl,Pr,Mt,Ha]},pi={findFiberByHostInstance:cr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},mm={bundleType:pi.bundleType,version:pi.version,rendererPackageName:pi.rendererPackageName,rendererConfig:pi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:K.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=$i(e),e===null?null:e.stateNode},findFiberByHostInstance:pi.findFiberByHostInstance||dm,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ul=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ul.isDisabled&&Ul.supportsFiber)try{gn=Ul.inject(mm),$t=Ul}catch{}}return Ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hm,Ot.createPortal=function(e,t){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!tu(t))throw Error(r(200));return fm(e,t,null,s)},Ot.createRoot=function(e,t){if(!tu(e))throw Error(r(299));var s=!1,o="",c=yd;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Xa(e,1,!1,null,null,s,!1,o,c),e[vn]=t.current,Ys(e.nodeType===8?e.parentNode:e),new eu(t)},Ot.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=$i(t),e=e===null?null:e.stateNode,e},Ot.flushSync=function(e){return vr(e)},Ot.hydrate=function(e,t,s){if(!zl(t))throw Error(r(200));return Bl(null,e,t,!0,s)},Ot.hydrateRoot=function(e,t,s){if(!tu(e))throw Error(r(405));var o=s!=null&&s.hydratedSources||null,c=!1,f="",m=yd;if(s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(m=s.onRecoverableError)),t=hd(t,null,e,1,s??null,c,!1,f,m),e[vn]=t.current,Ys(e),o)for(e=0;e<o.length;e++)s=o[e],c=s._getVersion,c=c(s._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[s,c]:t.mutableSourceEagerHydrationData.push(s,c);return new Dl(t)},Ot.render=function(e,t,s){if(!zl(t))throw Error(r(200));return Bl(null,e,t,!1,s)},Ot.unmountComponentAtNode=function(e){if(!zl(e))throw Error(r(40));return e._reactRootContainer?(vr(function(){Bl(null,null,e,!1,function(){e._reactRootContainer=null,e[vn]=null})}),!0):!1},Ot.unstable_batchedUpdates=Ha,Ot.unstable_renderSubtreeIntoContainer=function(e,t,s,o){if(!zl(s))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Bl(e,t,s,!1,o)},Ot.version="18.3.1-next-f1338f8080-20240426",Ot}var Cd;function Nm(){if(Cd)return su.exports;Cd=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(n){console.error(n)}}return i(),su.exports=xm(),su.exports}var Ed;function Cm(){if(Ed)return Fl;Ed=1;var i=Nm();return Fl.createRoot=i.createRoot,Fl.hydrateRoot=i.hydrateRoot,Fl}var Em=Cm();const Om=qd(Em);/**
41
41
  * @license lucide-react v0.468.0 - ISC
42
42
  *
43
43
  * This source code is licensed under the ISC license.
@@ -67,17 +67,17 @@ Error generating stack: `+f.message+`
67
67
  *
68
68
  * This source code is licensed under the ISC license.
69
69
  * See the LICENSE file in the root directory of this source tree.
70
- */const Ni=Qe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
70
+ */const Ci=Qe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
71
71
  * @license lucide-react v0.468.0 - ISC
72
72
  *
73
73
  * This source code is licensed under the ISC license.
74
74
  * See the LICENSE file in the root directory of this source tree.
75
- */const Ci=Qe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
75
+ */const Ei=Qe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
76
76
  * @license lucide-react v0.468.0 - ISC
77
77
  *
78
78
  * This source code is licensed under the ISC license.
79
79
  * See the LICENSE file in the root directory of this source tree.
80
- */const wi=Qe("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/**
80
+ */const ki=Qe("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/**
81
81
  * @license lucide-react v0.468.0 - ISC
82
82
  *
83
83
  * This source code is licensed under the ISC license.
@@ -127,12 +127,12 @@ Error generating stack: `+f.message+`
127
127
  *
128
128
  * This source code is licensed under the ISC license.
129
129
  * See the LICENSE file in the root directory of this source tree.
130
- */const io=Qe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
130
+ */const lo=Qe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
131
131
  * @license lucide-react v0.468.0 - ISC
132
132
  *
133
133
  * This source code is licensed under the ISC license.
134
134
  * See the LICENSE file in the root directory of this source tree.
135
- */const wu=Qe("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);/**
135
+ */const eo=Qe("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);/**
136
136
  * @license lucide-react v0.468.0 - ISC
137
137
  *
138
138
  * This source code is licensed under the ISC license.
@@ -157,46 +157,46 @@ Error generating stack: `+f.message+`
157
157
  *
158
158
  * This source code is licensed under the ISC license.
159
159
  * See the LICENSE file in the root directory of this source tree.
160
- */const lo=Qe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
160
+ */const oo=Qe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
161
161
  * @license lucide-react v0.468.0 - ISC
162
162
  *
163
163
  * This source code is licensed under the ISC license.
164
164
  * See the LICENSE file in the root directory of this source tree.
165
- */const eo=Qe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Au=Symbol.for("yaml.alias"),ku=Symbol.for("yaml.document"),rr=Symbol.for("yaml.map"),Jd=Symbol.for("yaml.pair"),dn=Symbol.for("yaml.scalar"),Ss=Symbol.for("yaml.seq"),Ht=Symbol.for("yaml.node.type"),_r=i=>!!i&&typeof i=="object"&&i[Ht]===Au,oo=i=>!!i&&typeof i=="object"&&i[Ht]===ku,Ii=i=>!!i&&typeof i=="object"&&i[Ht]===rr,We=i=>!!i&&typeof i=="object"&&i[Ht]===Jd,be=i=>!!i&&typeof i=="object"&&i[Ht]===dn,Li=i=>!!i&&typeof i=="object"&&i[Ht]===Ss;function qe(i){if(i&&typeof i=="object")switch(i[Ht]){case rr:case Ss:return!0}return!1}function He(i){if(i&&typeof i=="object")switch(i[Ht]){case Au:case rr:case dn:case Ss:return!0}return!1}const Yd=i=>(be(i)||qe(i))&&!!i.anchor,jr=Symbol("break visit"),Dm=Symbol("skip children"),ki=Symbol("remove node");function js(i,n){const r=zm(n);oo(i)?cs(null,i.contents,r,Object.freeze([i]))===ki&&(i.contents=null):cs(null,i,r,Object.freeze([]))}js.BREAK=jr;js.SKIP=Dm;js.REMOVE=ki;function cs(i,n,r,l){const a=Bm(i,n,r,l);if(He(a)||We(a))return Um(i,l,a),cs(i,a,r,l);if(typeof a!="symbol"){if(qe(n)){l=Object.freeze(l.concat(n));for(let u=0;u<n.items.length;++u){const d=cs(u,n.items[u],r,l);if(typeof d=="number")u=d-1;else{if(d===jr)return jr;d===ki&&(n.items.splice(u,1),u-=1)}}}else if(We(n)){l=Object.freeze(l.concat(n));const u=cs("key",n.key,r,l);if(u===jr)return jr;u===ki&&(n.key=null);const d=cs("value",n.value,r,l);if(d===jr)return jr;d===ki&&(n.value=null)}}return a}function zm(i){return typeof i=="object"&&(i.Collection||i.Node||i.Value)?Object.assign({Alias:i.Node,Map:i.Node,Scalar:i.Node,Seq:i.Node},i.Value&&{Map:i.Value,Scalar:i.Value,Seq:i.Value},i.Collection&&{Map:i.Collection,Seq:i.Collection},i):i}function Bm(i,n,r,l){var a,u,d,h,y;if(typeof r=="function")return r(i,n,l);if(Ii(n))return(a=r.Map)==null?void 0:a.call(r,i,n,l);if(Li(n))return(u=r.Seq)==null?void 0:u.call(r,i,n,l);if(We(n))return(d=r.Pair)==null?void 0:d.call(r,i,n,l);if(be(n))return(h=r.Scalar)==null?void 0:h.call(r,i,n,l);if(_r(n))return(y=r.Alias)==null?void 0:y.call(r,i,n,l)}function Um(i,n,r){const l=n[n.length-1];if(qe(l))l.items[i]=r;else if(We(l))i==="key"?l.key=r:l.value=r;else if(oo(l))l.contents=r;else{const a=_r(l)?"alias":"scalar";throw new Error(`Cannot replace node with ${a} parent`)}}const Fm={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Vm=i=>i.replace(/[!,[\]{}]/g,n=>Fm[n]);class vt{constructor(n,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},vt.defaultYaml,n),this.tags=Object.assign({},vt.defaultTags,r)}clone(){const n=new vt(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){const n=new vt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:vt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},vt.defaultTags);break}return n}add(n,r){this.atNextDocument&&(this.yaml={explicit:vt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},vt.defaultTags),this.atNextDocument=!1);const l=n.trim().split(/[ \t]+/),a=l.shift();switch(a){case"%TAG":{if(l.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),l.length<2))return!1;const[u,d]=l;return this.tags[u]=d,!0}case"%YAML":{if(this.yaml.explicit=!0,l.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;const[u]=l;if(u==="1.1"||u==="1.2")return this.yaml.version=u,!0;{const d=/^\d+\.\d+$/.test(u);return r(6,`Unsupported YAML version ${u}`,d),!1}}default:return r(0,`Unknown directive ${a}`,!0),!1}}tagName(n,r){if(n==="!")return"!";if(n[0]!=="!")return r(`Not a valid tag: ${n}`),null;if(n[1]==="<"){const d=n.slice(2,-1);return d==="!"||d==="!!"?(r(`Verbatim tags aren't resolved, so ${n} is invalid.`),null):(n[n.length-1]!==">"&&r("Verbatim tags must end with a >"),d)}const[,l,a]=n.match(/^(.*!)([^!]*)$/s);a||r(`The ${n} tag has no suffix`);const u=this.tags[l];if(u)try{return u+decodeURIComponent(a)}catch(d){return r(String(d)),null}return l==="!"?n:(r(`Could not resolve tag: ${n}`),null)}tagString(n){for(const[r,l]of Object.entries(this.tags))if(n.startsWith(l))return r+Vm(n.substring(l.length));return n[0]==="!"?n:`!<${n}>`}toString(n){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],l=Object.entries(this.tags);let a;if(n&&l.length>0&&He(n.contents)){const u={};js(n.contents,(d,h)=>{He(h)&&h.tag&&(u[h.tag]=!0)}),a=Object.keys(u)}else a=[];for(const[u,d]of l)u==="!!"&&d==="tag:yaml.org,2002:"||(!n||a.some(h=>h.startsWith(d)))&&r.push(`%TAG ${u} ${d}`);return r.join(`
166
- `)}}vt.defaultYaml={explicit:!1,version:"1.2"};vt.defaultTags={"!!":"tag:yaml.org,2002:"};function Gd(i){if(/[\x00-\x19\s,[\]{}]/.test(i)){const r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(i)}`;throw new Error(r)}return!0}function Xd(i){const n=new Set;return js(i,{Value(r,l){l.anchor&&n.add(l.anchor)}}),n}function Zd(i,n){for(let r=1;;++r){const l=`${i}${r}`;if(!n.has(l))return l}}function Km(i,n){const r=[],l=new Map;let a=null;return{onAnchor:u=>{r.push(u),a??(a=Xd(i));const d=Zd(n,a);return a.add(d),d},setAnchors:()=>{for(const u of r){const d=l.get(u);if(typeof d=="object"&&d.anchor&&(be(d.node)||qe(d.node)))d.node.anchor=d.anchor;else{const h=new Error("Failed to resolve repeated object (this should not happen)");throw h.source=u,h}}},sourceObjects:l}}function fs(i,n,r,l){if(l&&typeof l=="object")if(Array.isArray(l))for(let a=0,u=l.length;a<u;++a){const d=l[a],h=fs(i,l,String(a),d);h===void 0?delete l[a]:h!==d&&(l[a]=h)}else if(l instanceof Map)for(const a of Array.from(l.keys())){const u=l.get(a),d=fs(i,l,a,u);d===void 0?l.delete(a):d!==u&&l.set(a,d)}else if(l instanceof Set)for(const a of Array.from(l)){const u=fs(i,l,a,a);u===void 0?l.delete(a):u!==a&&(l.delete(a),l.add(u))}else for(const[a,u]of Object.entries(l)){const d=fs(i,l,a,u);d===void 0?delete l[a]:d!==u&&(l[a]=d)}return i.call(n,r,l)}function qt(i,n,r){if(Array.isArray(i))return i.map((l,a)=>qt(l,String(a),r));if(i&&typeof i.toJSON=="function"){if(!r||!Yd(i))return i.toJSON(n,r);const l={aliasCount:0,count:1,res:void 0};r.anchors.set(i,l),r.onCreate=u=>{l.res=u,delete r.onCreate};const a=i.toJSON(n,r);return r.onCreate&&r.onCreate(a),a}return typeof i=="bigint"&&!(r!=null&&r.keep)?Number(i):i}class Pu{constructor(n){Object.defineProperty(this,Ht,{value:n})}clone(){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(n.range=this.range.slice()),n}toJS(n,{mapAsMap:r,maxAliasCount:l,onAnchor:a,reviver:u}={}){if(!oo(n))throw new TypeError("A document argument is required");const d={anchors:new Map,doc:n,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},h=qt(this,"",d);if(typeof a=="function")for(const{count:y,res:g}of d.anchors.values())a(g,y);return typeof u=="function"?fs(u,{"":h},"",h):h}}class bu extends Pu{constructor(n){super(Au),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n,r){let l;r!=null&&r.aliasResolveCache?l=r.aliasResolveCache:(l=[],js(n,{Node:(u,d)=>{(_r(d)||Yd(d))&&l.push(d)}}),r&&(r.aliasResolveCache=l));let a;for(const u of l){if(u===this)break;u.anchor===this.source&&(a=u)}return a}toJSON(n,r){if(!r)return{source:this.source};const{anchors:l,doc:a,maxAliasCount:u}=r,d=this.resolve(a,r);if(!d){const y=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(y)}let h=l.get(d);if(h||(qt(d,null,r),h=l.get(d)),(h==null?void 0:h.res)===void 0){const y="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(y)}if(u>=0&&(h.count+=1,h.aliasCount===0&&(h.aliasCount=Jl(a,d,l)),h.count*h.aliasCount>u)){const y="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(y)}return h.res}toString(n,r,l){const a=`*${this.source}`;if(n){if(Gd(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){const u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(u)}if(n.implicitKey)return`${a} `}return a}}function Jl(i,n,r){if(_r(n)){const l=n.resolve(i),a=r&&l&&r.get(l);return a?a.count*a.aliasCount:0}else if(qe(n)){let l=0;for(const a of n.items){const u=Jl(i,a,r);u>l&&(l=u)}return l}else if(We(n)){const l=Jl(i,n.key,r),a=Jl(i,n.value,r);return Math.max(l,a)}return 1}const ep=i=>!i||typeof i!="function"&&typeof i!="object";class ve extends Pu{constructor(n){super(dn),this.value=n}toJSON(n,r){return r!=null&&r.keep?this.value:qt(this.value,n,r)}toString(){return String(this.value)}}ve.BLOCK_FOLDED="BLOCK_FOLDED";ve.BLOCK_LITERAL="BLOCK_LITERAL";ve.PLAIN="PLAIN";ve.QUOTE_DOUBLE="QUOTE_DOUBLE";ve.QUOTE_SINGLE="QUOTE_SINGLE";const qm="tag:yaml.org,2002:";function Hm(i,n,r){if(n){const l=r.filter(u=>u.tag===n),a=l.find(u=>!u.format)??l[0];if(!a)throw new Error(`Tag ${n} not found`);return a}return r.find(l=>{var a;return((a=l.identify)==null?void 0:a.call(l,i))&&!l.format})}function Ei(i,n,r){var k,E,O;if(oo(i)&&(i=i.contents),He(i))return i;if(We(i)){const b=(E=(k=r.schema[rr]).createNode)==null?void 0:E.call(k,r.schema,null,r);return b.items.push(i),b}(i instanceof String||i instanceof Number||i instanceof Boolean||typeof BigInt<"u"&&i instanceof BigInt)&&(i=i.valueOf());const{aliasDuplicateObjects:l,onAnchor:a,onTagObj:u,schema:d,sourceObjects:h}=r;let y;if(l&&i&&typeof i=="object"){if(y=h.get(i),y)return y.anchor??(y.anchor=a(i)),new bu(y.anchor);y={anchor:null,node:null},h.set(i,y)}n!=null&&n.startsWith("!!")&&(n=qm+n.slice(2));let g=Hm(i,n,d.tags);if(!g){if(i&&typeof i.toJSON=="function"&&(i=i.toJSON()),!i||typeof i!="object"){const b=new ve(i);return y&&(y.node=b),b}g=i instanceof Map?d[rr]:Symbol.iterator in Object(i)?d[Ss]:d[rr]}u&&(u(g),delete r.onTagObj);const x=g!=null&&g.createNode?g.createNode(r.schema,i,r):typeof((O=g==null?void 0:g.nodeClass)==null?void 0:O.from)=="function"?g.nodeClass.from(r.schema,i,r):new ve(i);return n?x.tag=n:g.default||(x.tag=g.tag),y&&(y.node=x),x}function to(i,n,r){let l=r;for(let a=n.length-1;a>=0;--a){const u=n[a];if(typeof u=="number"&&Number.isInteger(u)&&u>=0){const d=[];d[u]=l,l=d}else l=new Map([[u,l]])}return Ei(l,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:i,sourceObjects:new Map})}const mi=i=>i==null||typeof i=="object"&&!!i[Symbol.iterator]().next().done;class tp extends Pu{constructor(n,r){super(n),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(n){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return n&&(r.schema=n),r.items=r.items.map(l=>He(l)||We(l)?l.clone(n):l),this.range&&(r.range=this.range.slice()),r}addIn(n,r){if(mi(n))this.add(r);else{const[l,...a]=n,u=this.get(l,!0);if(qe(u))u.addIn(a,r);else if(u===void 0&&this.schema)this.set(l,to(this.schema,a,r));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${a}`)}}deleteIn(n){const[r,...l]=n;if(l.length===0)return this.delete(r);const a=this.get(r,!0);if(qe(a))return a.deleteIn(l);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}getIn(n,r){const[l,...a]=n,u=this.get(l,!0);return a.length===0?!r&&be(u)?u.value:u:qe(u)?u.getIn(a,r):void 0}hasAllNullValues(n){return this.items.every(r=>{if(!We(r))return!1;const l=r.value;return l==null||n&&be(l)&&l.value==null&&!l.commentBefore&&!l.comment&&!l.tag})}hasIn(n){const[r,...l]=n;if(l.length===0)return this.has(r);const a=this.get(r,!0);return qe(a)?a.hasIn(l):!1}setIn(n,r){const[l,...a]=n;if(a.length===0)this.set(l,r);else{const u=this.get(l,!0);if(qe(u))u.setIn(a,r);else if(u===void 0&&this.schema)this.set(l,to(this.schema,a,r));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${a}`)}}}const Wm=i=>i.replace(/^(?!$)(?: $)?/gm,"#");function En(i,n){return/^\n+$/.test(i)?i.substring(1):n?i.replace(/^(?! *$)/gm,n):i}const Nr=(i,n,r)=>i.endsWith(`
165
+ */const to=Qe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Au=Symbol.for("yaml.alias"),ku=Symbol.for("yaml.document"),rr=Symbol.for("yaml.map"),Jd=Symbol.for("yaml.pair"),dn=Symbol.for("yaml.scalar"),Ss=Symbol.for("yaml.seq"),Wt=Symbol.for("yaml.node.type"),_r=i=>!!i&&typeof i=="object"&&i[Wt]===Au,ao=i=>!!i&&typeof i=="object"&&i[Wt]===ku,Li=i=>!!i&&typeof i=="object"&&i[Wt]===rr,We=i=>!!i&&typeof i=="object"&&i[Wt]===Jd,be=i=>!!i&&typeof i=="object"&&i[Wt]===dn,Ai=i=>!!i&&typeof i=="object"&&i[Wt]===Ss;function qe(i){if(i&&typeof i=="object")switch(i[Wt]){case rr:case Ss:return!0}return!1}function He(i){if(i&&typeof i=="object")switch(i[Wt]){case Au:case rr:case dn:case Ss:return!0}return!1}const Yd=i=>(be(i)||qe(i))&&!!i.anchor,jr=Symbol("break visit"),Dm=Symbol("skip children"),Si=Symbol("remove node");function js(i,n){const r=zm(n);ao(i)?cs(null,i.contents,r,Object.freeze([i]))===Si&&(i.contents=null):cs(null,i,r,Object.freeze([]))}js.BREAK=jr;js.SKIP=Dm;js.REMOVE=Si;function cs(i,n,r,l){const a=Bm(i,n,r,l);if(He(a)||We(a))return Um(i,l,a),cs(i,a,r,l);if(typeof a!="symbol"){if(qe(n)){l=Object.freeze(l.concat(n));for(let u=0;u<n.items.length;++u){const d=cs(u,n.items[u],r,l);if(typeof d=="number")u=d-1;else{if(d===jr)return jr;d===Si&&(n.items.splice(u,1),u-=1)}}}else if(We(n)){l=Object.freeze(l.concat(n));const u=cs("key",n.key,r,l);if(u===jr)return jr;u===Si&&(n.key=null);const d=cs("value",n.value,r,l);if(d===jr)return jr;d===Si&&(n.value=null)}}return a}function zm(i){return typeof i=="object"&&(i.Collection||i.Node||i.Value)?Object.assign({Alias:i.Node,Map:i.Node,Scalar:i.Node,Seq:i.Node},i.Value&&{Map:i.Value,Scalar:i.Value,Seq:i.Value},i.Collection&&{Map:i.Collection,Seq:i.Collection},i):i}function Bm(i,n,r,l){var a,u,d,h,y;if(typeof r=="function")return r(i,n,l);if(Li(n))return(a=r.Map)==null?void 0:a.call(r,i,n,l);if(Ai(n))return(u=r.Seq)==null?void 0:u.call(r,i,n,l);if(We(n))return(d=r.Pair)==null?void 0:d.call(r,i,n,l);if(be(n))return(h=r.Scalar)==null?void 0:h.call(r,i,n,l);if(_r(n))return(y=r.Alias)==null?void 0:y.call(r,i,n,l)}function Um(i,n,r){const l=n[n.length-1];if(qe(l))l.items[i]=r;else if(We(l))i==="key"?l.key=r:l.value=r;else if(ao(l))l.contents=r;else{const a=_r(l)?"alias":"scalar";throw new Error(`Cannot replace node with ${a} parent`)}}const Fm={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Vm=i=>i.replace(/[!,[\]{}]/g,n=>Fm[n]);class vt{constructor(n,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},vt.defaultYaml,n),this.tags=Object.assign({},vt.defaultTags,r)}clone(){const n=new vt(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){const n=new vt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:vt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},vt.defaultTags);break}return n}add(n,r){this.atNextDocument&&(this.yaml={explicit:vt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},vt.defaultTags),this.atNextDocument=!1);const l=n.trim().split(/[ \t]+/),a=l.shift();switch(a){case"%TAG":{if(l.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),l.length<2))return!1;const[u,d]=l;return this.tags[u]=d,!0}case"%YAML":{if(this.yaml.explicit=!0,l.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;const[u]=l;if(u==="1.1"||u==="1.2")return this.yaml.version=u,!0;{const d=/^\d+\.\d+$/.test(u);return r(6,`Unsupported YAML version ${u}`,d),!1}}default:return r(0,`Unknown directive ${a}`,!0),!1}}tagName(n,r){if(n==="!")return"!";if(n[0]!=="!")return r(`Not a valid tag: ${n}`),null;if(n[1]==="<"){const d=n.slice(2,-1);return d==="!"||d==="!!"?(r(`Verbatim tags aren't resolved, so ${n} is invalid.`),null):(n[n.length-1]!==">"&&r("Verbatim tags must end with a >"),d)}const[,l,a]=n.match(/^(.*!)([^!]*)$/s);a||r(`The ${n} tag has no suffix`);const u=this.tags[l];if(u)try{return u+decodeURIComponent(a)}catch(d){return r(String(d)),null}return l==="!"?n:(r(`Could not resolve tag: ${n}`),null)}tagString(n){for(const[r,l]of Object.entries(this.tags))if(n.startsWith(l))return r+Vm(n.substring(l.length));return n[0]==="!"?n:`!<${n}>`}toString(n){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],l=Object.entries(this.tags);let a;if(n&&l.length>0&&He(n.contents)){const u={};js(n.contents,(d,h)=>{He(h)&&h.tag&&(u[h.tag]=!0)}),a=Object.keys(u)}else a=[];for(const[u,d]of l)u==="!!"&&d==="tag:yaml.org,2002:"||(!n||a.some(h=>h.startsWith(d)))&&r.push(`%TAG ${u} ${d}`);return r.join(`
166
+ `)}}vt.defaultYaml={explicit:!1,version:"1.2"};vt.defaultTags={"!!":"tag:yaml.org,2002:"};function Gd(i){if(/[\x00-\x19\s,[\]{}]/.test(i)){const r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(i)}`;throw new Error(r)}return!0}function Xd(i){const n=new Set;return js(i,{Value(r,l){l.anchor&&n.add(l.anchor)}}),n}function Zd(i,n){for(let r=1;;++r){const l=`${i}${r}`;if(!n.has(l))return l}}function Km(i,n){const r=[],l=new Map;let a=null;return{onAnchor:u=>{r.push(u),a??(a=Xd(i));const d=Zd(n,a);return a.add(d),d},setAnchors:()=>{for(const u of r){const d=l.get(u);if(typeof d=="object"&&d.anchor&&(be(d.node)||qe(d.node)))d.node.anchor=d.anchor;else{const h=new Error("Failed to resolve repeated object (this should not happen)");throw h.source=u,h}}},sourceObjects:l}}function fs(i,n,r,l){if(l&&typeof l=="object")if(Array.isArray(l))for(let a=0,u=l.length;a<u;++a){const d=l[a],h=fs(i,l,String(a),d);h===void 0?delete l[a]:h!==d&&(l[a]=h)}else if(l instanceof Map)for(const a of Array.from(l.keys())){const u=l.get(a),d=fs(i,l,a,u);d===void 0?l.delete(a):d!==u&&l.set(a,d)}else if(l instanceof Set)for(const a of Array.from(l)){const u=fs(i,l,a,a);u===void 0?l.delete(a):u!==a&&(l.delete(a),l.add(u))}else for(const[a,u]of Object.entries(l)){const d=fs(i,l,a,u);d===void 0?delete l[a]:d!==u&&(l[a]=d)}return i.call(n,r,l)}function Ht(i,n,r){if(Array.isArray(i))return i.map((l,a)=>Ht(l,String(a),r));if(i&&typeof i.toJSON=="function"){if(!r||!Yd(i))return i.toJSON(n,r);const l={aliasCount:0,count:1,res:void 0};r.anchors.set(i,l),r.onCreate=u=>{l.res=u,delete r.onCreate};const a=i.toJSON(n,r);return r.onCreate&&r.onCreate(a),a}return typeof i=="bigint"&&!(r!=null&&r.keep)?Number(i):i}class Pu{constructor(n){Object.defineProperty(this,Wt,{value:n})}clone(){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(n.range=this.range.slice()),n}toJS(n,{mapAsMap:r,maxAliasCount:l,onAnchor:a,reviver:u}={}){if(!ao(n))throw new TypeError("A document argument is required");const d={anchors:new Map,doc:n,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},h=Ht(this,"",d);if(typeof a=="function")for(const{count:y,res:g}of d.anchors.values())a(g,y);return typeof u=="function"?fs(u,{"":h},"",h):h}}class bu extends Pu{constructor(n){super(Au),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n,r){let l;r!=null&&r.aliasResolveCache?l=r.aliasResolveCache:(l=[],js(n,{Node:(u,d)=>{(_r(d)||Yd(d))&&l.push(d)}}),r&&(r.aliasResolveCache=l));let a;for(const u of l){if(u===this)break;u.anchor===this.source&&(a=u)}return a}toJSON(n,r){if(!r)return{source:this.source};const{anchors:l,doc:a,maxAliasCount:u}=r,d=this.resolve(a,r);if(!d){const y=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(y)}let h=l.get(d);if(h||(Ht(d,null,r),h=l.get(d)),(h==null?void 0:h.res)===void 0){const y="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(y)}if(u>=0&&(h.count+=1,h.aliasCount===0&&(h.aliasCount=Jl(a,d,l)),h.count*h.aliasCount>u)){const y="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(y)}return h.res}toString(n,r,l){const a=`*${this.source}`;if(n){if(Gd(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){const u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(u)}if(n.implicitKey)return`${a} `}return a}}function Jl(i,n,r){if(_r(n)){const l=n.resolve(i),a=r&&l&&r.get(l);return a?a.count*a.aliasCount:0}else if(qe(n)){let l=0;for(const a of n.items){const u=Jl(i,a,r);u>l&&(l=u)}return l}else if(We(n)){const l=Jl(i,n.key,r),a=Jl(i,n.value,r);return Math.max(l,a)}return 1}const ep=i=>!i||typeof i!="function"&&typeof i!="object";class ve extends Pu{constructor(n){super(dn),this.value=n}toJSON(n,r){return r!=null&&r.keep?this.value:Ht(this.value,n,r)}toString(){return String(this.value)}}ve.BLOCK_FOLDED="BLOCK_FOLDED";ve.BLOCK_LITERAL="BLOCK_LITERAL";ve.PLAIN="PLAIN";ve.QUOTE_DOUBLE="QUOTE_DOUBLE";ve.QUOTE_SINGLE="QUOTE_SINGLE";const qm="tag:yaml.org,2002:";function Hm(i,n,r){if(n){const l=r.filter(u=>u.tag===n),a=l.find(u=>!u.format)??l[0];if(!a)throw new Error(`Tag ${n} not found`);return a}return r.find(l=>{var a;return((a=l.identify)==null?void 0:a.call(l,i))&&!l.format})}function Oi(i,n,r){var k,E,O;if(ao(i)&&(i=i.contents),He(i))return i;if(We(i)){const b=(E=(k=r.schema[rr]).createNode)==null?void 0:E.call(k,r.schema,null,r);return b.items.push(i),b}(i instanceof String||i instanceof Number||i instanceof Boolean||typeof BigInt<"u"&&i instanceof BigInt)&&(i=i.valueOf());const{aliasDuplicateObjects:l,onAnchor:a,onTagObj:u,schema:d,sourceObjects:h}=r;let y;if(l&&i&&typeof i=="object"){if(y=h.get(i),y)return y.anchor??(y.anchor=a(i)),new bu(y.anchor);y={anchor:null,node:null},h.set(i,y)}n!=null&&n.startsWith("!!")&&(n=qm+n.slice(2));let g=Hm(i,n,d.tags);if(!g){if(i&&typeof i.toJSON=="function"&&(i=i.toJSON()),!i||typeof i!="object"){const b=new ve(i);return y&&(y.node=b),b}g=i instanceof Map?d[rr]:Symbol.iterator in Object(i)?d[Ss]:d[rr]}u&&(u(g),delete r.onTagObj);const x=g!=null&&g.createNode?g.createNode(r.schema,i,r):typeof((O=g==null?void 0:g.nodeClass)==null?void 0:O.from)=="function"?g.nodeClass.from(r.schema,i,r):new ve(i);return n?x.tag=n:g.default||(x.tag=g.tag),y&&(y.node=x),x}function no(i,n,r){let l=r;for(let a=n.length-1;a>=0;--a){const u=n[a];if(typeof u=="number"&&Number.isInteger(u)&&u>=0){const d=[];d[u]=l,l=d}else l=new Map([[u,l]])}return Oi(l,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:i,sourceObjects:new Map})}const yi=i=>i==null||typeof i=="object"&&!!i[Symbol.iterator]().next().done;class tp extends Pu{constructor(n,r){super(n),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(n){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return n&&(r.schema=n),r.items=r.items.map(l=>He(l)||We(l)?l.clone(n):l),this.range&&(r.range=this.range.slice()),r}addIn(n,r){if(yi(n))this.add(r);else{const[l,...a]=n,u=this.get(l,!0);if(qe(u))u.addIn(a,r);else if(u===void 0&&this.schema)this.set(l,no(this.schema,a,r));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${a}`)}}deleteIn(n){const[r,...l]=n;if(l.length===0)return this.delete(r);const a=this.get(r,!0);if(qe(a))return a.deleteIn(l);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}getIn(n,r){const[l,...a]=n,u=this.get(l,!0);return a.length===0?!r&&be(u)?u.value:u:qe(u)?u.getIn(a,r):void 0}hasAllNullValues(n){return this.items.every(r=>{if(!We(r))return!1;const l=r.value;return l==null||n&&be(l)&&l.value==null&&!l.commentBefore&&!l.comment&&!l.tag})}hasIn(n){const[r,...l]=n;if(l.length===0)return this.has(r);const a=this.get(r,!0);return qe(a)?a.hasIn(l):!1}setIn(n,r){const[l,...a]=n;if(a.length===0)this.set(l,r);else{const u=this.get(l,!0);if(qe(u))u.setIn(a,r);else if(u===void 0&&this.schema)this.set(l,no(this.schema,a,r));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${a}`)}}}const Wm=i=>i.replace(/^(?!$)(?: $)?/gm,"#");function En(i,n){return/^\n+$/.test(i)?i.substring(1):n?i.replace(/^(?! *$)/gm,n):i}const Nr=(i,n,r)=>i.endsWith(`
167
167
  `)?En(r,n):r.includes(`
168
168
  `)?`
169
- `+En(r,n):(i.endsWith(" ")?"":" ")+r,np="flow",Su="block",Yl="quoted";function ao(i,n,r="flow",{indentAtStart:l,lineWidth:a=80,minContentWidth:u=20,onFold:d,onOverflow:h}={}){if(!a||a<0)return i;a<u&&(u=0);const y=Math.max(1+u,1+a-n.length);if(i.length<=y)return i;const g=[],x={};let k=a-n.length;typeof l=="number"&&(l>a-Math.max(2,u)?g.push(0):k=a-l);let E,O,b=!1,S=-1,I=-1,R=-1;r===Su&&(S=Od(i,S,n.length),S!==-1&&(k=S+y));for(let F;F=i[S+=1];){if(r===Yl&&F==="\\"){switch(I=S,i[S+1]){case"x":S+=3;break;case"u":S+=5;break;case"U":S+=9;break;default:S+=1}R=S}if(F===`
169
+ `+En(r,n):(i.endsWith(" ")?"":" ")+r,np="flow",Su="block",Yl="quoted";function uo(i,n,r="flow",{indentAtStart:l,lineWidth:a=80,minContentWidth:u=20,onFold:d,onOverflow:h}={}){if(!a||a<0)return i;a<u&&(u=0);const y=Math.max(1+u,1+a-n.length);if(i.length<=y)return i;const g=[],x={};let k=a-n.length;typeof l=="number"&&(l>a-Math.max(2,u)?g.push(0):k=a-l);let E,O,b=!1,S=-1,I=-1,R=-1;r===Su&&(S=Od(i,S,n.length),S!==-1&&(k=S+y));for(let F;F=i[S+=1];){if(r===Yl&&F==="\\"){switch(I=S,i[S+1]){case"x":S+=3;break;case"u":S+=5;break;case"U":S+=9;break;default:S+=1}R=S}if(F===`
170
170
  `)r===Su&&(S=Od(i,S,n.length)),k=S+n.length+y,E=void 0;else{if(F===" "&&O&&O!==" "&&O!==`
171
171
  `&&O!==" "){const K=i[S+1];K&&K!==" "&&K!==`
172
172
  `&&K!==" "&&(E=S)}if(S>=k)if(E)g.push(E),k=E+y,E=void 0;else if(r===Yl){for(;O===" "||O===" ";)O=F,F=i[S+=1],b=!0;const K=S>R+1?S-2:I-1;if(x[K])return i;g.push(K),x[K]=!0,k=K+y,E=void 0}else b=!0}O=F}if(b&&h&&h(),g.length===0)return i;d&&d();let H=i.slice(0,g[0]);for(let F=0;F<g.length;++F){const K=g[F],G=g[F+1]||i.length;K===0?H=`
173
173
  ${n}${i.slice(0,G)}`:(r===Yl&&x[K]&&(H+=`${i[K]}\\`),H+=`
174
174
  ${n}${i.slice(K+1,G)}`)}return H}function Od(i,n,r){let l=n,a=n+1,u=i[a];for(;u===" "||u===" ";)if(n<a+r)u=i[++n];else{do u=i[++n];while(u&&u!==`
175
- `);l=n,a=n+1,u=i[a]}return l}const uo=(i,n)=>({indentAtStart:n?i.indent.length:i.indentAtStart,lineWidth:i.options.lineWidth,minContentWidth:i.options.minContentWidth}),co=i=>/^(%|---|\.\.\.)/m.test(i);function Qm(i,n,r){if(!n||n<0)return!1;const l=n-r,a=i.length;if(a<=l)return!1;for(let u=0,d=0;u<a;++u)if(i[u]===`
176
- `){if(u-d>l)return!0;if(d=u+1,a-d<=l)return!1}return!0}function Si(i,n){const r=JSON.stringify(i);if(n.options.doubleQuotedAsJSON)return r;const{implicitKey:l}=n,a=n.options.doubleQuotedMinMultiLineLength,u=n.indent||(co(i)?" ":"");let d="",h=0;for(let y=0,g=r[y];g;g=r[++y])if(g===" "&&r[y+1]==="\\"&&r[y+2]==="n"&&(d+=r.slice(h,y)+"\\ ",y+=1,h=y,g="\\"),g==="\\")switch(r[y+1]){case"u":{d+=r.slice(h,y);const x=r.substr(y+2,4);switch(x){case"0000":d+="\\0";break;case"0007":d+="\\a";break;case"000b":d+="\\v";break;case"001b":d+="\\e";break;case"0085":d+="\\N";break;case"00a0":d+="\\_";break;case"2028":d+="\\L";break;case"2029":d+="\\P";break;default:x.substr(0,2)==="00"?d+="\\x"+x.substr(2):d+=r.substr(y,6)}y+=5,h=y+1}break;case"n":if(l||r[y+2]==='"'||r.length<a)y+=1;else{for(d+=r.slice(h,y)+`
175
+ `);l=n,a=n+1,u=i[a]}return l}const co=(i,n)=>({indentAtStart:n?i.indent.length:i.indentAtStart,lineWidth:i.options.lineWidth,minContentWidth:i.options.minContentWidth}),fo=i=>/^(%|---|\.\.\.)/m.test(i);function Qm(i,n,r){if(!n||n<0)return!1;const l=n-r,a=i.length;if(a<=l)return!1;for(let u=0,d=0;u<a;++u)if(i[u]===`
176
+ `){if(u-d>l)return!0;if(d=u+1,a-d<=l)return!1}return!0}function ji(i,n){const r=JSON.stringify(i);if(n.options.doubleQuotedAsJSON)return r;const{implicitKey:l}=n,a=n.options.doubleQuotedMinMultiLineLength,u=n.indent||(fo(i)?" ":"");let d="",h=0;for(let y=0,g=r[y];g;g=r[++y])if(g===" "&&r[y+1]==="\\"&&r[y+2]==="n"&&(d+=r.slice(h,y)+"\\ ",y+=1,h=y,g="\\"),g==="\\")switch(r[y+1]){case"u":{d+=r.slice(h,y);const x=r.substr(y+2,4);switch(x){case"0000":d+="\\0";break;case"0007":d+="\\a";break;case"000b":d+="\\v";break;case"001b":d+="\\e";break;case"0085":d+="\\N";break;case"00a0":d+="\\_";break;case"2028":d+="\\L";break;case"2029":d+="\\P";break;default:x.substr(0,2)==="00"?d+="\\x"+x.substr(2):d+=r.substr(y,6)}y+=5,h=y+1}break;case"n":if(l||r[y+2]==='"'||r.length<a)y+=1;else{for(d+=r.slice(h,y)+`
177
177
 
178
178
  `;r[y+2]==="\\"&&r[y+3]==="n"&&r[y+4]!=='"';)d+=`
179
- `,y+=2;d+=u,r[y+2]===" "&&(d+="\\"),y+=1,h=y+1}break;default:y+=1}return d=h?d+r.slice(h):r,l?d:ao(d,u,Yl,uo(n,!1))}function ju(i,n){if(n.options.singleQuote===!1||n.implicitKey&&i.includes(`
180
- `)||/[ \t]\n|\n[ \t]/.test(i))return Si(i,n);const r=n.indent||(co(i)?" ":""),l="'"+i.replace(/'/g,"''").replace(/\n+/g,`$&
181
- ${r}`)+"'";return n.implicitKey?l:ao(l,r,np,uo(n,!1))}function ds(i,n){const{singleQuote:r}=n.options;let l;if(r===!1)l=Si;else{const a=i.includes('"'),u=i.includes("'");a&&!u?l=ju:u&&!a?l=Si:l=r?ju:Si}return l(i,n)}let xu;try{xu=new RegExp(`(^|(?<!
179
+ `,y+=2;d+=u,r[y+2]===" "&&(d+="\\"),y+=1,h=y+1}break;default:y+=1}return d=h?d+r.slice(h):r,l?d:uo(d,u,Yl,co(n,!1))}function ju(i,n){if(n.options.singleQuote===!1||n.implicitKey&&i.includes(`
180
+ `)||/[ \t]\n|\n[ \t]/.test(i))return ji(i,n);const r=n.indent||(fo(i)?" ":""),l="'"+i.replace(/'/g,"''").replace(/\n+/g,`$&
181
+ ${r}`)+"'";return n.implicitKey?l:uo(l,r,np,co(n,!1))}function ds(i,n){const{singleQuote:r}=n.options;let l;if(r===!1)l=ji;else{const a=i.includes('"'),u=i.includes("'");a&&!u?l=ju:u&&!a?l=ji:l=r?ju:ji}return l(i,n)}let xu;try{xu=new RegExp(`(^|(?<!
182
182
  ))
183
183
  +(?!
184
- |$)`,"g")}catch{xu=/\n+(?!\n|$)/g}function Gl({comment:i,type:n,value:r},l,a,u){const{blockQuote:d,commentString:h,lineWidth:y}=l.options;if(!d||/\n[\t ]+$/.test(r))return ds(r,l);const g=l.indent||(l.forceBlockIndent||co(r)?" ":""),x=d==="literal"?!0:d==="folded"||n===ve.BLOCK_FOLDED?!1:n===ve.BLOCK_LITERAL?!0:!Qm(r,y,g.length);if(!r)return x?`|
184
+ |$)`,"g")}catch{xu=/\n+(?!\n|$)/g}function Gl({comment:i,type:n,value:r},l,a,u){const{blockQuote:d,commentString:h,lineWidth:y}=l.options;if(!d||/\n[\t ]+$/.test(r))return ds(r,l);const g=l.indent||(l.forceBlockIndent||fo(r)?" ":""),x=d==="literal"?!0:d==="folded"||n===ve.BLOCK_FOLDED?!1:n===ve.BLOCK_LITERAL?!0:!Qm(r,y,g.length);if(!r)return x?`|
185
185
  `:`>
186
186
  `;let k,E;for(E=r.length;E>0;--E){const G=r[E-1];if(G!==`
187
187
  `&&G!==" "&&G!==" ")break}let O=r.substring(E);const b=O.indexOf(`
188
188
  `);b===-1?k="-":r===O||b!==O.length-1?(k="+",u&&u()):k="",O&&(r=r.slice(0,-O.length),O[O.length-1]===`
189
189
  `&&(O=O.slice(0,-1)),O=O.replace(xu,`$&${g}`));let S=!1,I,R=-1;for(I=0;I<r.length;++I){const G=r[I];if(G===" ")S=!0;else if(G===`
190
190
  `)R=I;else break}let H=r.substring(0,R<I?R+1:I);H&&(r=r.substring(H.length),H=H.replace(/\n+/g,`$&${g}`));let K=(S?g?"2":"1":"")+k;if(i&&(K+=" "+h(i.replace(/ ?[\r\n]+/g," ")),a&&a()),!x){const G=r.replace(/\n+/g,`
191
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${g}`);let Q=!1;const q=uo(l,!0);d!=="folded"&&n!==ve.BLOCK_FOLDED&&(q.onOverflow=()=>{Q=!0});const U=ao(`${H}${G}${O}`,g,Su,q);if(!Q)return`>${K}
191
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${g}`);let Q=!1;const q=co(l,!0);d!=="folded"&&n!==ve.BLOCK_FOLDED&&(q.onOverflow=()=>{Q=!0});const U=uo(`${H}${G}${O}`,g,Su,q);if(!Q)return`>${K}
192
192
  ${g}${U}`}return r=r.replace(/\n+/g,`$&${g}`),`|${K}
193
193
  ${g}${H}${r}${O}`}function Jm(i,n,r,l){const{type:a,value:u}=i,{actualString:d,implicitKey:h,indent:y,indentStep:g,inFlow:x}=n;if(h&&u.includes(`
194
194
  `)||x&&/[[\]{},]/.test(u))return ds(u,n);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return h||x||!u.includes(`
195
195
  `)?ds(u,n):Gl(i,n,r,l);if(!h&&!x&&a!==ve.PLAIN&&u.includes(`
196
- `))return Gl(i,n,r,l);if(co(u)){if(y==="")return n.forceBlockIndent=!0,Gl(i,n,r,l);if(h&&y===g)return ds(u,n)}const k=u.replace(/\n+/g,`$&
197
- ${y}`);if(d){const E=S=>{var I;return S.default&&S.tag!=="tag:yaml.org,2002:str"&&((I=S.test)==null?void 0:I.test(k))},{compat:O,tags:b}=n.doc.schema;if(b.some(E)||O!=null&&O.some(E))return ds(u,n)}return h?k:ao(k,y,np,uo(n,!1))}function Mu(i,n,r,l){const{implicitKey:a,inFlow:u}=n,d=typeof i.value=="string"?i:Object.assign({},i,{value:String(i.value)});let{type:h}=i;h!==ve.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(d.value)&&(h=ve.QUOTE_DOUBLE);const y=x=>{switch(x){case ve.BLOCK_FOLDED:case ve.BLOCK_LITERAL:return a||u?ds(d.value,n):Gl(d,n,r,l);case ve.QUOTE_DOUBLE:return Si(d.value,n);case ve.QUOTE_SINGLE:return ju(d.value,n);case ve.PLAIN:return Jm(d,n,r,l);default:return null}};let g=y(h);if(g===null){const{defaultKeyType:x,defaultStringType:k}=n.options,E=a&&x||k;if(g=y(E),g===null)throw new Error(`Unsupported default string type ${E}`)}return g}function rp(i,n){const r=Object.assign({blockQuote:!0,commentString:Wm,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},i.schema.toStringOptions,n);let l;switch(r.collectionStyle){case"block":l=!1;break;case"flow":l=!0;break;default:l=null}return{anchors:new Set,doc:i,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:l,options:r}}function Ym(i,n){var a;if(n.tag){const u=i.filter(d=>d.tag===n.tag);if(u.length>0)return u.find(d=>d.format===n.format)??u[0]}let r,l;if(be(n)){l=n.value;let u=i.filter(d=>{var h;return(h=d.identify)==null?void 0:h.call(d,l)});if(u.length>1){const d=u.filter(h=>h.test);d.length>0&&(u=d)}r=u.find(d=>d.format===n.format)??u.find(d=>!d.format)}else l=n,r=i.find(u=>u.nodeClass&&l instanceof u.nodeClass);if(!r){const u=((a=l==null?void 0:l.constructor)==null?void 0:a.name)??(l===null?"null":typeof l);throw new Error(`Tag not resolved for ${u} value`)}return r}function Gm(i,n,{anchors:r,doc:l}){if(!l.directives)return"";const a=[],u=(be(i)||qe(i))&&i.anchor;u&&Gd(u)&&(r.add(u),a.push(`&${u}`));const d=i.tag??(n.default?null:n.tag);return d&&a.push(l.directives.tagString(d)),a.join(" ")}function vs(i,n,r,l){var y;if(We(i))return i.toString(n,r,l);if(_r(i)){if(n.doc.directives)return i.toString(n);if((y=n.resolvedAliases)!=null&&y.has(i))throw new TypeError("Cannot stringify circular structure without alias nodes");n.resolvedAliases?n.resolvedAliases.add(i):n.resolvedAliases=new Set([i]),i=i.resolve(n.doc)}let a;const u=He(i)?i:n.doc.createNode(i,{onTagObj:g=>a=g});a??(a=Ym(n.doc.schema.tags,u));const d=Gm(u,a,n);d.length>0&&(n.indentAtStart=(n.indentAtStart??0)+d.length+1);const h=typeof a.stringify=="function"?a.stringify(u,n,r,l):be(u)?Mu(u,n,r,l):u.toString(n,r,l);return d?be(u)||h[0]==="{"||h[0]==="["?`${d} ${h}`:`${d}
196
+ `))return Gl(i,n,r,l);if(fo(u)){if(y==="")return n.forceBlockIndent=!0,Gl(i,n,r,l);if(h&&y===g)return ds(u,n)}const k=u.replace(/\n+/g,`$&
197
+ ${y}`);if(d){const E=S=>{var I;return S.default&&S.tag!=="tag:yaml.org,2002:str"&&((I=S.test)==null?void 0:I.test(k))},{compat:O,tags:b}=n.doc.schema;if(b.some(E)||O!=null&&O.some(E))return ds(u,n)}return h?k:uo(k,y,np,co(n,!1))}function Mu(i,n,r,l){const{implicitKey:a,inFlow:u}=n,d=typeof i.value=="string"?i:Object.assign({},i,{value:String(i.value)});let{type:h}=i;h!==ve.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(d.value)&&(h=ve.QUOTE_DOUBLE);const y=x=>{switch(x){case ve.BLOCK_FOLDED:case ve.BLOCK_LITERAL:return a||u?ds(d.value,n):Gl(d,n,r,l);case ve.QUOTE_DOUBLE:return ji(d.value,n);case ve.QUOTE_SINGLE:return ju(d.value,n);case ve.PLAIN:return Jm(d,n,r,l);default:return null}};let g=y(h);if(g===null){const{defaultKeyType:x,defaultStringType:k}=n.options,E=a&&x||k;if(g=y(E),g===null)throw new Error(`Unsupported default string type ${E}`)}return g}function rp(i,n){const r=Object.assign({blockQuote:!0,commentString:Wm,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},i.schema.toStringOptions,n);let l;switch(r.collectionStyle){case"block":l=!1;break;case"flow":l=!0;break;default:l=null}return{anchors:new Set,doc:i,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:l,options:r}}function Ym(i,n){var a;if(n.tag){const u=i.filter(d=>d.tag===n.tag);if(u.length>0)return u.find(d=>d.format===n.format)??u[0]}let r,l;if(be(n)){l=n.value;let u=i.filter(d=>{var h;return(h=d.identify)==null?void 0:h.call(d,l)});if(u.length>1){const d=u.filter(h=>h.test);d.length>0&&(u=d)}r=u.find(d=>d.format===n.format)??u.find(d=>!d.format)}else l=n,r=i.find(u=>u.nodeClass&&l instanceof u.nodeClass);if(!r){const u=((a=l==null?void 0:l.constructor)==null?void 0:a.name)??(l===null?"null":typeof l);throw new Error(`Tag not resolved for ${u} value`)}return r}function Gm(i,n,{anchors:r,doc:l}){if(!l.directives)return"";const a=[],u=(be(i)||qe(i))&&i.anchor;u&&Gd(u)&&(r.add(u),a.push(`&${u}`));const d=i.tag??(n.default?null:n.tag);return d&&a.push(l.directives.tagString(d)),a.join(" ")}function vs(i,n,r,l){var y;if(We(i))return i.toString(n,r,l);if(_r(i)){if(n.doc.directives)return i.toString(n);if((y=n.resolvedAliases)!=null&&y.has(i))throw new TypeError("Cannot stringify circular structure without alias nodes");n.resolvedAliases?n.resolvedAliases.add(i):n.resolvedAliases=new Set([i]),i=i.resolve(n.doc)}let a;const u=He(i)?i:n.doc.createNode(i,{onTagObj:g=>a=g});a??(a=Ym(n.doc.schema.tags,u));const d=Gm(u,a,n);d.length>0&&(n.indentAtStart=(n.indentAtStart??0)+d.length+1);const h=typeof a.stringify=="function"?a.stringify(u,n,r,l):be(u)?Mu(u,n,r,l):u.toString(n,r,l);return d?be(u)||h[0]==="{"||h[0]==="["?`${d} ${h}`:`${d}
198
198
  ${n.indent}${h}`:h}function Xm({key:i,value:n},r,l,a){const{allNullValues:u,doc:d,indent:h,indentStep:y,options:{commentString:g,indentSeq:x,simpleKeys:k}}=r;let E=He(i)&&i.comment||null;if(k){if(E)throw new Error("With simple keys, key nodes cannot have comments");if(qe(i)||!He(i)&&typeof i=="object"){const q="With simple keys, collection cannot be used as a key value";throw new Error(q)}}let O=!k&&(!i||E&&n==null&&!r.inFlow||qe(i)||(be(i)?i.type===ve.BLOCK_FOLDED||i.type===ve.BLOCK_LITERAL:typeof i=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!O&&(k||!u),indent:h+y});let b=!1,S=!1,I=vs(i,r,()=>b=!0,()=>S=!0);if(!O&&!r.inFlow&&I.length>1024){if(k)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");O=!0}if(r.inFlow){if(u||n==null)return b&&l&&l(),I===""?"?":O?`? ${I}`:I}else if(u&&!k||n==null&&O)return I=`? ${I}`,E&&!b?I+=Nr(I,r.indent,g(E)):S&&a&&a(),I;b&&(E=null),O?(E&&(I+=Nr(I,r.indent,g(E))),I=`? ${I}
199
- ${h}:`):(I=`${I}:`,E&&(I+=Nr(I,r.indent,g(E))));let R,H,F;He(n)?(R=!!n.spaceBefore,H=n.commentBefore,F=n.comment):(R=!1,H=null,F=null,n&&typeof n=="object"&&(n=d.createNode(n))),r.implicitKey=!1,!O&&!E&&be(n)&&(r.indentAtStart=I.length+1),S=!1,!x&&y.length>=2&&!r.inFlow&&!O&&Li(n)&&!n.flow&&!n.tag&&!n.anchor&&(r.indent=r.indent.substring(2));let K=!1;const G=vs(n,r,()=>K=!0,()=>S=!0);let Q=" ";if(E||R||H){if(Q=R?`
199
+ ${h}:`):(I=`${I}:`,E&&(I+=Nr(I,r.indent,g(E))));let R,H,F;He(n)?(R=!!n.spaceBefore,H=n.commentBefore,F=n.comment):(R=!1,H=null,F=null,n&&typeof n=="object"&&(n=d.createNode(n))),r.implicitKey=!1,!O&&!E&&be(n)&&(r.indentAtStart=I.length+1),S=!1,!x&&y.length>=2&&!r.inFlow&&!O&&Ai(n)&&!n.flow&&!n.tag&&!n.anchor&&(r.indent=r.indent.substring(2));let K=!1;const G=vs(n,r,()=>K=!0,()=>S=!0);let Q=" ";if(E||R||H){if(Q=R?`
200
200
  `:"",H){const q=g(H);Q+=`
201
201
  ${En(q,r.indent)}`}G===""&&!r.inFlow?Q===`
202
202
  `&&F&&(Q=`
@@ -205,32 +205,32 @@ ${En(q,r.indent)}`}G===""&&!r.inFlow?Q===`
205
205
  ${r.indent}`}else if(!O&&qe(n)){const q=G[0],U=G.indexOf(`
206
206
  `),ae=U!==-1,D=r.inFlow??n.flow??n.items.length===0;if(ae||!D){let Z=!1;if(ae&&(q==="&"||q==="!")){let te=G.indexOf(" ");q==="&"&&te!==-1&&te<U&&G[te+1]==="!"&&(te=G.indexOf(" ",te+1)),(te===-1||U<te)&&(Z=!0)}Z||(Q=`
207
207
  ${r.indent}`)}}else(G===""||G[0]===`
208
- `)&&(Q="");return I+=Q+G,r.inFlow?K&&l&&l():F&&!K?I+=Nr(I,r.indent,g(F)):S&&a&&a(),I}function sp(i,n){(i==="debug"||i==="warn")&&console.warn(n)}const Vl="<<",On={identify:i=>i===Vl||typeof i=="symbol"&&i.description===Vl,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ve(Symbol(Vl)),{addToJSMap:ip}),stringify:()=>Vl},Zm=(i,n)=>(On.identify(n)||be(n)&&(!n.type||n.type===ve.PLAIN)&&On.identify(n.value))&&(i==null?void 0:i.doc.schema.tags.some(r=>r.tag===On.tag&&r.default));function ip(i,n,r){if(r=i&&_r(r)?r.resolve(i.doc):r,Li(r))for(const l of r.items)lu(i,n,l);else if(Array.isArray(r))for(const l of r)lu(i,n,l);else lu(i,n,r)}function lu(i,n,r){const l=i&&_r(r)?r.resolve(i.doc):r;if(!Ii(l))throw new Error("Merge sources must be maps or map aliases");const a=l.toJSON(null,i,Map);for(const[u,d]of a)n instanceof Map?n.has(u)||n.set(u,d):n instanceof Set?n.add(u):Object.prototype.hasOwnProperty.call(n,u)||Object.defineProperty(n,u,{value:d,writable:!0,enumerable:!0,configurable:!0});return n}function lp(i,n,{key:r,value:l}){if(He(r)&&r.addToJSMap)r.addToJSMap(i,n,l);else if(Zm(i,r))ip(i,n,l);else{const a=qt(r,"",i);if(n instanceof Map)n.set(a,qt(l,a,i));else if(n instanceof Set)n.add(a);else{const u=ey(r,a,i),d=qt(l,u,i);u in n?Object.defineProperty(n,u,{value:d,writable:!0,enumerable:!0,configurable:!0}):n[u]=d}}return n}function ey(i,n,r){if(n===null)return"";if(typeof n!="object")return String(n);if(He(i)&&(r!=null&&r.doc)){const l=rp(r.doc,{});l.anchors=new Set;for(const u of r.anchors.keys())l.anchors.add(u.anchor);l.inFlow=!0,l.inStringifyKey=!0;const a=i.toString(l);if(!r.mapKeyWarned){let u=JSON.stringify(a);u.length>40&&(u=u.substring(0,36)+'..."'),sp(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${u}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return a}return JSON.stringify(n)}function Ru(i,n,r){const l=Ei(i,void 0,r),a=Ei(n,void 0,r);return new wt(l,a)}class wt{constructor(n,r=null){Object.defineProperty(this,Ht,{value:Jd}),this.key=n,this.value=r}clone(n){let{key:r,value:l}=this;return He(r)&&(r=r.clone(n)),He(l)&&(l=l.clone(n)),new wt(r,l)}toJSON(n,r){const l=r!=null&&r.mapAsMap?new Map:{};return lp(r,l,this)}toString(n,r,l){return n!=null&&n.doc?Xm(this,n,r,l):JSON.stringify(this)}}function op(i,n,r){return(n.inFlow??i.flow?ny:ty)(i,n,r)}function ty({comment:i,items:n},r,{blockItemPrefix:l,flowChars:a,itemIndent:u,onChompKeep:d,onComment:h}){const{indent:y,options:{commentString:g}}=r,x=Object.assign({},r,{indent:u,type:null});let k=!1;const E=[];for(let b=0;b<n.length;++b){const S=n[b];let I=null;if(He(S))!k&&S.spaceBefore&&E.push(""),no(r,E,S.commentBefore,k),S.comment&&(I=S.comment);else if(We(S)){const H=He(S.key)?S.key:null;H&&(!k&&H.spaceBefore&&E.push(""),no(r,E,H.commentBefore,k))}k=!1;let R=vs(S,x,()=>I=null,()=>k=!0);I&&(R+=Nr(R,u,g(I))),k&&I&&(k=!1),E.push(l+R)}let O;if(E.length===0)O=a.start+a.end;else{O=E[0];for(let b=1;b<E.length;++b){const S=E[b];O+=S?`
208
+ `)&&(Q="");return I+=Q+G,r.inFlow?K&&l&&l():F&&!K?I+=Nr(I,r.indent,g(F)):S&&a&&a(),I}function sp(i,n){(i==="debug"||i==="warn")&&console.warn(n)}const Vl="<<",On={identify:i=>i===Vl||typeof i=="symbol"&&i.description===Vl,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ve(Symbol(Vl)),{addToJSMap:ip}),stringify:()=>Vl},Zm=(i,n)=>(On.identify(n)||be(n)&&(!n.type||n.type===ve.PLAIN)&&On.identify(n.value))&&(i==null?void 0:i.doc.schema.tags.some(r=>r.tag===On.tag&&r.default));function ip(i,n,r){if(r=i&&_r(r)?r.resolve(i.doc):r,Ai(r))for(const l of r.items)ou(i,n,l);else if(Array.isArray(r))for(const l of r)ou(i,n,l);else ou(i,n,r)}function ou(i,n,r){const l=i&&_r(r)?r.resolve(i.doc):r;if(!Li(l))throw new Error("Merge sources must be maps or map aliases");const a=l.toJSON(null,i,Map);for(const[u,d]of a)n instanceof Map?n.has(u)||n.set(u,d):n instanceof Set?n.add(u):Object.prototype.hasOwnProperty.call(n,u)||Object.defineProperty(n,u,{value:d,writable:!0,enumerable:!0,configurable:!0});return n}function lp(i,n,{key:r,value:l}){if(He(r)&&r.addToJSMap)r.addToJSMap(i,n,l);else if(Zm(i,r))ip(i,n,l);else{const a=Ht(r,"",i);if(n instanceof Map)n.set(a,Ht(l,a,i));else if(n instanceof Set)n.add(a);else{const u=ey(r,a,i),d=Ht(l,u,i);u in n?Object.defineProperty(n,u,{value:d,writable:!0,enumerable:!0,configurable:!0}):n[u]=d}}return n}function ey(i,n,r){if(n===null)return"";if(typeof n!="object")return String(n);if(He(i)&&(r!=null&&r.doc)){const l=rp(r.doc,{});l.anchors=new Set;for(const u of r.anchors.keys())l.anchors.add(u.anchor);l.inFlow=!0,l.inStringifyKey=!0;const a=i.toString(l);if(!r.mapKeyWarned){let u=JSON.stringify(a);u.length>40&&(u=u.substring(0,36)+'..."'),sp(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${u}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return a}return JSON.stringify(n)}function Ru(i,n,r){const l=Oi(i,void 0,r),a=Oi(n,void 0,r);return new wt(l,a)}class wt{constructor(n,r=null){Object.defineProperty(this,Wt,{value:Jd}),this.key=n,this.value=r}clone(n){let{key:r,value:l}=this;return He(r)&&(r=r.clone(n)),He(l)&&(l=l.clone(n)),new wt(r,l)}toJSON(n,r){const l=r!=null&&r.mapAsMap?new Map:{};return lp(r,l,this)}toString(n,r,l){return n!=null&&n.doc?Xm(this,n,r,l):JSON.stringify(this)}}function op(i,n,r){return(n.inFlow??i.flow?ny:ty)(i,n,r)}function ty({comment:i,items:n},r,{blockItemPrefix:l,flowChars:a,itemIndent:u,onChompKeep:d,onComment:h}){const{indent:y,options:{commentString:g}}=r,x=Object.assign({},r,{indent:u,type:null});let k=!1;const E=[];for(let b=0;b<n.length;++b){const S=n[b];let I=null;if(He(S))!k&&S.spaceBefore&&E.push(""),ro(r,E,S.commentBefore,k),S.comment&&(I=S.comment);else if(We(S)){const H=He(S.key)?S.key:null;H&&(!k&&H.spaceBefore&&E.push(""),ro(r,E,H.commentBefore,k))}k=!1;let R=vs(S,x,()=>I=null,()=>k=!0);I&&(R+=Nr(R,u,g(I))),k&&I&&(k=!1),E.push(l+R)}let O;if(E.length===0)O=a.start+a.end;else{O=E[0];for(let b=1;b<E.length;++b){const S=E[b];O+=S?`
209
209
  ${y}${S}`:`
210
210
  `}}return i?(O+=`
211
- `+En(g(i),y),h&&h()):k&&d&&d(),O}function ny({items:i},n,{flowChars:r,itemIndent:l}){const{indent:a,indentStep:u,flowCollectionPadding:d,options:{commentString:h}}=n;l+=u;const y=Object.assign({},n,{indent:l,inFlow:!0,type:null});let g=!1,x=0;const k=[];for(let b=0;b<i.length;++b){const S=i[b];let I=null;if(He(S))S.spaceBefore&&k.push(""),no(n,k,S.commentBefore,!1),S.comment&&(I=S.comment);else if(We(S)){const H=He(S.key)?S.key:null;H&&(H.spaceBefore&&k.push(""),no(n,k,H.commentBefore,!1),H.comment&&(g=!0));const F=He(S.value)?S.value:null;F?(F.comment&&(I=F.comment),F.commentBefore&&(g=!0)):S.value==null&&(H!=null&&H.comment)&&(I=H.comment)}I&&(g=!0);let R=vs(S,y,()=>I=null);g||(g=k.length>x||R.includes(`
211
+ `+En(g(i),y),h&&h()):k&&d&&d(),O}function ny({items:i},n,{flowChars:r,itemIndent:l}){const{indent:a,indentStep:u,flowCollectionPadding:d,options:{commentString:h}}=n;l+=u;const y=Object.assign({},n,{indent:l,inFlow:!0,type:null});let g=!1,x=0;const k=[];for(let b=0;b<i.length;++b){const S=i[b];let I=null;if(He(S))S.spaceBefore&&k.push(""),ro(n,k,S.commentBefore,!1),S.comment&&(I=S.comment);else if(We(S)){const H=He(S.key)?S.key:null;H&&(H.spaceBefore&&k.push(""),ro(n,k,H.commentBefore,!1),H.comment&&(g=!0));const F=He(S.value)?S.value:null;F?(F.comment&&(I=F.comment),F.commentBefore&&(g=!0)):S.value==null&&(H!=null&&H.comment)&&(I=H.comment)}I&&(g=!0);let R=vs(S,y,()=>I=null);g||(g=k.length>x||R.includes(`
212
212
  `)),b<i.length-1?R+=",":n.options.trailingComma&&(n.options.lineWidth>0&&(g||(g=k.reduce((H,F)=>H+F.length+2,2)+(R.length+2)>n.options.lineWidth)),g&&(R+=",")),I&&(R+=Nr(R,l,h(I))),k.push(R),x=k.length}const{start:E,end:O}=r;if(k.length===0)return E+O;if(!g){const b=k.reduce((S,I)=>S+I.length+2,2);g=n.options.lineWidth>0&&b>n.options.lineWidth}if(g){let b=E;for(const S of k)b+=S?`
213
213
  ${u}${a}${S}`:`
214
214
  `;return`${b}
215
- ${a}${O}`}else return`${E}${d}${k.join(" ")}${d}${O}`}function no({indent:i,options:{commentString:n}},r,l,a){if(l&&a&&(l=l.replace(/^\n+/,"")),l){const u=En(n(l),i);r.push(u.trimStart())}}function Cr(i,n){const r=be(n)?n.value:n;for(const l of i)if(We(l)&&(l.key===n||l.key===r||be(l.key)&&l.key.value===r))return l}class Kt extends tp{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(rr,n),this.items=[]}static from(n,r,l){const{keepUndefined:a,replacer:u}=l,d=new this(n),h=(y,g)=>{if(typeof u=="function")g=u.call(r,y,g);else if(Array.isArray(u)&&!u.includes(y))return;(g!==void 0||a)&&d.items.push(Ru(y,g,l))};if(r instanceof Map)for(const[y,g]of r)h(y,g);else if(r&&typeof r=="object")for(const y of Object.keys(r))h(y,r[y]);return typeof n.sortMapEntries=="function"&&d.items.sort(n.sortMapEntries),d}add(n,r){var d;let l;We(n)?l=n:!n||typeof n!="object"||!("key"in n)?l=new wt(n,n==null?void 0:n.value):l=new wt(n.key,n.value);const a=Cr(this.items,l.key),u=(d=this.schema)==null?void 0:d.sortMapEntries;if(a){if(!r)throw new Error(`Key ${l.key} already set`);be(a.value)&&ep(l.value)?a.value.value=l.value:a.value=l.value}else if(u){const h=this.items.findIndex(y=>u(l,y)<0);h===-1?this.items.push(l):this.items.splice(h,0,l)}else this.items.push(l)}delete(n){const r=Cr(this.items,n);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(n,r){const l=Cr(this.items,n),a=l==null?void 0:l.value;return(!r&&be(a)?a.value:a)??void 0}has(n){return!!Cr(this.items,n)}set(n,r){this.add(new wt(n,r),!0)}toJSON(n,r,l){const a=l?new l:r!=null&&r.mapAsMap?new Map:{};r!=null&&r.onCreate&&r.onCreate(a);for(const u of this.items)lp(r,a,u);return a}toString(n,r,l){if(!n)return JSON.stringify(this);for(const a of this.items)if(!We(a))throw new Error(`Map items must all be pairs; found ${JSON.stringify(a)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),op(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:l,onComment:r})}}const xs={collection:"map",default:!0,nodeClass:Kt,tag:"tag:yaml.org,2002:map",resolve(i,n){return Ii(i)||n("Expected a mapping for this tag"),i},createNode:(i,n,r)=>Kt.from(i,n,r)};class Er extends tp{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(Ss,n),this.items=[]}add(n){this.items.push(n)}delete(n){const r=Kl(n);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(n,r){const l=Kl(n);if(typeof l!="number")return;const a=this.items[l];return!r&&be(a)?a.value:a}has(n){const r=Kl(n);return typeof r=="number"&&r<this.items.length}set(n,r){const l=Kl(n);if(typeof l!="number")throw new Error(`Expected a valid index, not ${n}.`);const a=this.items[l];be(a)&&ep(r)?a.value=r:this.items[l]=r}toJSON(n,r){const l=[];r!=null&&r.onCreate&&r.onCreate(l);let a=0;for(const u of this.items)l.push(qt(u,String(a++),r));return l}toString(n,r,l){return n?op(this,n,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(n.indent||"")+" ",onChompKeep:l,onComment:r}):JSON.stringify(this)}static from(n,r,l){const{replacer:a}=l,u=new this(n);if(r&&Symbol.iterator in Object(r)){let d=0;for(let h of r){if(typeof a=="function"){const y=r instanceof Set?h:String(d++);h=a.call(r,y,h)}u.items.push(Ei(h,void 0,l))}}return u}}function Kl(i){let n=be(i)?i.value:i;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}const Ns={collection:"seq",default:!0,nodeClass:Er,tag:"tag:yaml.org,2002:seq",resolve(i,n){return Li(i)||n("Expected a sequence for this tag"),i},createNode:(i,n,r)=>Er.from(i,n,r)},fo={identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify(i,n,r,l){return n=Object.assign({actualString:!0},n),Mu(i,n,r,l)}},po={identify:i=>i==null,createNode:()=>new ve(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ve(null),stringify:({source:i},n)=>typeof i=="string"&&po.test.test(i)?i:n.options.nullStr},$u={identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:i=>new ve(i[0]==="t"||i[0]==="T"),stringify({source:i,value:n},r){if(i&&$u.test.test(i)){const l=i[0]==="t"||i[0]==="T";if(n===l)return i}return n?r.options.trueStr:r.options.falseStr}};function nn({format:i,minFractionDigits:n,tag:r,value:l}){if(typeof l=="bigint")return String(l);const a=typeof l=="number"?l:Number(l);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let u=Object.is(l,-0)?"-0":JSON.stringify(l);if(!i&&n&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(u)){let d=u.indexOf(".");d<0&&(d=u.length,u+=".");let h=n-(u.length-d-1);for(;h-- >0;)u+="0"}return u}const ap={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:nn},up={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i),stringify(i){const n=Number(i.value);return isFinite(n)?n.toExponential():nn(i)}},cp={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(i){const n=new ve(parseFloat(i)),r=i.indexOf(".");return r!==-1&&i[i.length-1]==="0"&&(n.minFractionDigits=i.length-r-1),n},stringify:nn},ho=i=>typeof i=="bigint"||Number.isInteger(i),Du=(i,n,r,{intAsBigInt:l})=>l?BigInt(i):parseInt(i.substring(n),r);function fp(i,n,r){const{value:l}=i;return ho(l)&&l>=0?r+l.toString(n):nn(i)}const dp={identify:i=>ho(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(i,n,r)=>Du(i,2,8,r),stringify:i=>fp(i,8,"0o")},pp={identify:ho,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(i,n,r)=>Du(i,0,10,r),stringify:nn},hp={identify:i=>ho(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(i,n,r)=>Du(i,2,16,r),stringify:i=>fp(i,16,"0x")},ry=[xs,Ns,fo,po,$u,dp,pp,hp,ap,up,cp];function Td(i){return typeof i=="bigint"||Number.isInteger(i)}const ql=({value:i})=>JSON.stringify(i),sy=[{identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify:ql},{identify:i=>i==null,createNode:()=>new ve(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:ql},{identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:i=>i==="true",stringify:ql},{identify:Td,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(i,n,{intAsBigInt:r})=>r?BigInt(i):parseInt(i,10),stringify:({value:i})=>Td(i)?i.toString():JSON.stringify(i)},{identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:i=>parseFloat(i),stringify:ql}],iy={default:!0,tag:"",test:/^/,resolve(i,n){return n(`Unresolved plain scalar ${JSON.stringify(i)}`),i}},ly=[xs,Ns].concat(sy,iy),zu={identify:i=>i instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(i,n){if(typeof atob=="function"){const r=atob(i.replace(/[\n\r]/g,"")),l=new Uint8Array(r.length);for(let a=0;a<r.length;++a)l[a]=r.charCodeAt(a);return l}else return n("This environment does not support reading binary tags; either Buffer or atob is required"),i},stringify({comment:i,type:n,value:r},l,a,u){if(!r)return"";const d=r;let h;if(typeof btoa=="function"){let y="";for(let g=0;g<d.length;++g)y+=String.fromCharCode(d[g]);h=btoa(y)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(n??(n=ve.BLOCK_LITERAL),n!==ve.QUOTE_DOUBLE){const y=Math.max(l.options.lineWidth-l.indent.length,l.options.minContentWidth),g=Math.ceil(h.length/y),x=new Array(g);for(let k=0,E=0;k<g;++k,E+=y)x[k]=h.substr(E,y);h=x.join(n===ve.BLOCK_LITERAL?`
216
- `:" ")}return Mu({comment:i,type:n,value:h},l,a,u)}};function mp(i,n){if(Li(i))for(let r=0;r<i.items.length;++r){let l=i.items[r];if(!We(l)){if(Ii(l)){l.items.length>1&&n("Each pair must have its own sequence indicator");const a=l.items[0]||new wt(new ve(null));if(l.commentBefore&&(a.key.commentBefore=a.key.commentBefore?`${l.commentBefore}
215
+ ${a}${O}`}else return`${E}${d}${k.join(" ")}${d}${O}`}function ro({indent:i,options:{commentString:n}},r,l,a){if(l&&a&&(l=l.replace(/^\n+/,"")),l){const u=En(n(l),i);r.push(u.trimStart())}}function Cr(i,n){const r=be(n)?n.value:n;for(const l of i)if(We(l)&&(l.key===n||l.key===r||be(l.key)&&l.key.value===r))return l}class qt extends tp{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(rr,n),this.items=[]}static from(n,r,l){const{keepUndefined:a,replacer:u}=l,d=new this(n),h=(y,g)=>{if(typeof u=="function")g=u.call(r,y,g);else if(Array.isArray(u)&&!u.includes(y))return;(g!==void 0||a)&&d.items.push(Ru(y,g,l))};if(r instanceof Map)for(const[y,g]of r)h(y,g);else if(r&&typeof r=="object")for(const y of Object.keys(r))h(y,r[y]);return typeof n.sortMapEntries=="function"&&d.items.sort(n.sortMapEntries),d}add(n,r){var d;let l;We(n)?l=n:!n||typeof n!="object"||!("key"in n)?l=new wt(n,n==null?void 0:n.value):l=new wt(n.key,n.value);const a=Cr(this.items,l.key),u=(d=this.schema)==null?void 0:d.sortMapEntries;if(a){if(!r)throw new Error(`Key ${l.key} already set`);be(a.value)&&ep(l.value)?a.value.value=l.value:a.value=l.value}else if(u){const h=this.items.findIndex(y=>u(l,y)<0);h===-1?this.items.push(l):this.items.splice(h,0,l)}else this.items.push(l)}delete(n){const r=Cr(this.items,n);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(n,r){const l=Cr(this.items,n),a=l==null?void 0:l.value;return(!r&&be(a)?a.value:a)??void 0}has(n){return!!Cr(this.items,n)}set(n,r){this.add(new wt(n,r),!0)}toJSON(n,r,l){const a=l?new l:r!=null&&r.mapAsMap?new Map:{};r!=null&&r.onCreate&&r.onCreate(a);for(const u of this.items)lp(r,a,u);return a}toString(n,r,l){if(!n)return JSON.stringify(this);for(const a of this.items)if(!We(a))throw new Error(`Map items must all be pairs; found ${JSON.stringify(a)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),op(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:l,onComment:r})}}const xs={collection:"map",default:!0,nodeClass:qt,tag:"tag:yaml.org,2002:map",resolve(i,n){return Li(i)||n("Expected a mapping for this tag"),i},createNode:(i,n,r)=>qt.from(i,n,r)};class Er extends tp{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(Ss,n),this.items=[]}add(n){this.items.push(n)}delete(n){const r=Kl(n);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(n,r){const l=Kl(n);if(typeof l!="number")return;const a=this.items[l];return!r&&be(a)?a.value:a}has(n){const r=Kl(n);return typeof r=="number"&&r<this.items.length}set(n,r){const l=Kl(n);if(typeof l!="number")throw new Error(`Expected a valid index, not ${n}.`);const a=this.items[l];be(a)&&ep(r)?a.value=r:this.items[l]=r}toJSON(n,r){const l=[];r!=null&&r.onCreate&&r.onCreate(l);let a=0;for(const u of this.items)l.push(Ht(u,String(a++),r));return l}toString(n,r,l){return n?op(this,n,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(n.indent||"")+" ",onChompKeep:l,onComment:r}):JSON.stringify(this)}static from(n,r,l){const{replacer:a}=l,u=new this(n);if(r&&Symbol.iterator in Object(r)){let d=0;for(let h of r){if(typeof a=="function"){const y=r instanceof Set?h:String(d++);h=a.call(r,y,h)}u.items.push(Oi(h,void 0,l))}}return u}}function Kl(i){let n=be(i)?i.value:i;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}const Ns={collection:"seq",default:!0,nodeClass:Er,tag:"tag:yaml.org,2002:seq",resolve(i,n){return Ai(i)||n("Expected a sequence for this tag"),i},createNode:(i,n,r)=>Er.from(i,n,r)},po={identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify(i,n,r,l){return n=Object.assign({actualString:!0},n),Mu(i,n,r,l)}},ho={identify:i=>i==null,createNode:()=>new ve(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ve(null),stringify:({source:i},n)=>typeof i=="string"&&ho.test.test(i)?i:n.options.nullStr},$u={identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:i=>new ve(i[0]==="t"||i[0]==="T"),stringify({source:i,value:n},r){if(i&&$u.test.test(i)){const l=i[0]==="t"||i[0]==="T";if(n===l)return i}return n?r.options.trueStr:r.options.falseStr}};function rn({format:i,minFractionDigits:n,tag:r,value:l}){if(typeof l=="bigint")return String(l);const a=typeof l=="number"?l:Number(l);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let u=Object.is(l,-0)?"-0":JSON.stringify(l);if(!i&&n&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(u)){let d=u.indexOf(".");d<0&&(d=u.length,u+=".");let h=n-(u.length-d-1);for(;h-- >0;)u+="0"}return u}const ap={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:rn},up={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i),stringify(i){const n=Number(i.value);return isFinite(n)?n.toExponential():rn(i)}},cp={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(i){const n=new ve(parseFloat(i)),r=i.indexOf(".");return r!==-1&&i[i.length-1]==="0"&&(n.minFractionDigits=i.length-r-1),n},stringify:rn},mo=i=>typeof i=="bigint"||Number.isInteger(i),Du=(i,n,r,{intAsBigInt:l})=>l?BigInt(i):parseInt(i.substring(n),r);function fp(i,n,r){const{value:l}=i;return mo(l)&&l>=0?r+l.toString(n):rn(i)}const dp={identify:i=>mo(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(i,n,r)=>Du(i,2,8,r),stringify:i=>fp(i,8,"0o")},pp={identify:mo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(i,n,r)=>Du(i,0,10,r),stringify:rn},hp={identify:i=>mo(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(i,n,r)=>Du(i,2,16,r),stringify:i=>fp(i,16,"0x")},ry=[xs,Ns,po,ho,$u,dp,pp,hp,ap,up,cp];function Td(i){return typeof i=="bigint"||Number.isInteger(i)}const ql=({value:i})=>JSON.stringify(i),sy=[{identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify:ql},{identify:i=>i==null,createNode:()=>new ve(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:ql},{identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:i=>i==="true",stringify:ql},{identify:Td,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(i,n,{intAsBigInt:r})=>r?BigInt(i):parseInt(i,10),stringify:({value:i})=>Td(i)?i.toString():JSON.stringify(i)},{identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:i=>parseFloat(i),stringify:ql}],iy={default:!0,tag:"",test:/^/,resolve(i,n){return n(`Unresolved plain scalar ${JSON.stringify(i)}`),i}},ly=[xs,Ns].concat(sy,iy),zu={identify:i=>i instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(i,n){if(typeof atob=="function"){const r=atob(i.replace(/[\n\r]/g,"")),l=new Uint8Array(r.length);for(let a=0;a<r.length;++a)l[a]=r.charCodeAt(a);return l}else return n("This environment does not support reading binary tags; either Buffer or atob is required"),i},stringify({comment:i,type:n,value:r},l,a,u){if(!r)return"";const d=r;let h;if(typeof btoa=="function"){let y="";for(let g=0;g<d.length;++g)y+=String.fromCharCode(d[g]);h=btoa(y)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(n??(n=ve.BLOCK_LITERAL),n!==ve.QUOTE_DOUBLE){const y=Math.max(l.options.lineWidth-l.indent.length,l.options.minContentWidth),g=Math.ceil(h.length/y),x=new Array(g);for(let k=0,E=0;k<g;++k,E+=y)x[k]=h.substr(E,y);h=x.join(n===ve.BLOCK_LITERAL?`
216
+ `:" ")}return Mu({comment:i,type:n,value:h},l,a,u)}};function mp(i,n){if(Ai(i))for(let r=0;r<i.items.length;++r){let l=i.items[r];if(!We(l)){if(Li(l)){l.items.length>1&&n("Each pair must have its own sequence indicator");const a=l.items[0]||new wt(new ve(null));if(l.commentBefore&&(a.key.commentBefore=a.key.commentBefore?`${l.commentBefore}
217
217
  ${a.key.commentBefore}`:l.commentBefore),l.comment){const u=a.value??a.key;u.comment=u.comment?`${l.comment}
218
- ${u.comment}`:l.comment}l=a}i.items[r]=We(l)?l:new wt(l)}}else n("Expected a sequence for this tag");return i}function yp(i,n,r){const{replacer:l}=r,a=new Er(i);a.tag="tag:yaml.org,2002:pairs";let u=0;if(n&&Symbol.iterator in Object(n))for(let d of n){typeof l=="function"&&(d=l.call(n,String(u++),d));let h,y;if(Array.isArray(d))if(d.length===2)h=d[0],y=d[1];else throw new TypeError(`Expected [key, value] tuple: ${d}`);else if(d&&d instanceof Object){const g=Object.keys(d);if(g.length===1)h=g[0],y=d[h];else throw new TypeError(`Expected tuple with one key, not ${g.length} keys`)}else h=d;a.items.push(Ru(h,y,r))}return a}const Bu={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:mp,createNode:yp};class ys extends Er{constructor(){super(),this.add=Kt.prototype.add.bind(this),this.delete=Kt.prototype.delete.bind(this),this.get=Kt.prototype.get.bind(this),this.has=Kt.prototype.has.bind(this),this.set=Kt.prototype.set.bind(this),this.tag=ys.tag}toJSON(n,r){if(!r)return super.toJSON(n);const l=new Map;r!=null&&r.onCreate&&r.onCreate(l);for(const a of this.items){let u,d;if(We(a)?(u=qt(a.key,"",r),d=qt(a.value,u,r)):u=qt(a,"",r),l.has(u))throw new Error("Ordered maps must not include duplicate keys");l.set(u,d)}return l}static from(n,r,l){const a=yp(n,r,l),u=new this;return u.items=a.items,u}}ys.tag="tag:yaml.org,2002:omap";const Uu={collection:"seq",identify:i=>i instanceof Map,nodeClass:ys,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,n){const r=mp(i,n),l=[];for(const{key:a}of r.items)be(a)&&(l.includes(a.value)?n(`Ordered maps must not include duplicate keys: ${a.value}`):l.push(a.value));return Object.assign(new ys,r)},createNode:(i,n,r)=>ys.from(i,n,r)};function gp({value:i,source:n},r){return n&&(i?vp:wp).test.test(n)?n:i?r.options.trueStr:r.options.falseStr}const vp={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ve(!0),stringify:gp},wp={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ve(!1),stringify:gp},oy={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:nn},ay={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i.replace(/_/g,"")),stringify(i){const n=Number(i.value);return isFinite(n)?n.toExponential():nn(i)}},uy={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(i){const n=new ve(parseFloat(i.replace(/_/g,""))),r=i.indexOf(".");if(r!==-1){const l=i.substring(r+1).replace(/_/g,"");l[l.length-1]==="0"&&(n.minFractionDigits=l.length)}return n},stringify:nn},Ai=i=>typeof i=="bigint"||Number.isInteger(i);function mo(i,n,r,{intAsBigInt:l}){const a=i[0];if((a==="-"||a==="+")&&(n+=1),i=i.substring(n).replace(/_/g,""),l){switch(r){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}const d=BigInt(i);return a==="-"?BigInt(-1)*d:d}const u=parseInt(i,r);return a==="-"?-1*u:u}function Fu(i,n,r){const{value:l}=i;if(Ai(l)){const a=l.toString(n);return l<0?"-"+r+a.substr(1):r+a}return nn(i)}const cy={identify:Ai,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(i,n,r)=>mo(i,2,2,r),stringify:i=>Fu(i,2,"0b")},fy={identify:Ai,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(i,n,r)=>mo(i,1,8,r),stringify:i=>Fu(i,8,"0")},dy={identify:Ai,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(i,n,r)=>mo(i,0,10,r),stringify:nn},py={identify:Ai,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(i,n,r)=>mo(i,2,16,r),stringify:i=>Fu(i,16,"0x")};class gs extends Kt{constructor(n){super(n),this.tag=gs.tag}add(n){let r;We(n)?r=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?r=new wt(n.key,null):r=new wt(n,null),Cr(this.items,r.key)||this.items.push(r)}get(n,r){const l=Cr(this.items,n);return!r&&We(l)?be(l.key)?l.key.value:l.key:l}set(n,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);const l=Cr(this.items,n);l&&!r?this.items.splice(this.items.indexOf(l),1):!l&&r&&this.items.push(new wt(n))}toJSON(n,r){return super.toJSON(n,r,Set)}toString(n,r,l){if(!n)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},n,{allNullValues:!0}),r,l);throw new Error("Set items must all have null values")}static from(n,r,l){const{replacer:a}=l,u=new this(n);if(r&&Symbol.iterator in Object(r))for(let d of r)typeof a=="function"&&(d=a.call(r,d,d)),u.items.push(Ru(d,null,l));return u}}gs.tag="tag:yaml.org,2002:set";const Vu={collection:"map",identify:i=>i instanceof Set,nodeClass:gs,default:!1,tag:"tag:yaml.org,2002:set",createNode:(i,n,r)=>gs.from(i,n,r),resolve(i,n){if(Ii(i)){if(i.hasAllNullValues(!0))return Object.assign(new gs,i);n("Set items must all have null values")}else n("Expected a mapping for this tag");return i}};function Ku(i,n){const r=i[0],l=r==="-"||r==="+"?i.substring(1):i,a=d=>n?BigInt(d):Number(d),u=l.replace(/_/g,"").split(":").reduce((d,h)=>d*a(60)+a(h),a(0));return r==="-"?a(-1)*u:u}function kp(i){let{value:n}=i,r=d=>d;if(typeof n=="bigint")r=d=>BigInt(d);else if(isNaN(n)||!isFinite(n))return nn(i);let l="";n<0&&(l="-",n*=r(-1));const a=r(60),u=[n%a];return n<60?u.unshift(0):(n=(n-u[0])/a,u.unshift(n%a),n>=60&&(n=(n-u[0])/a,u.unshift(n))),l+u.map(d=>String(d).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Sp={identify:i=>typeof i=="bigint"||Number.isInteger(i),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(i,n,{intAsBigInt:r})=>Ku(i,r),stringify:kp},jp={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:i=>Ku(i,!1),stringify:kp},yo={identify:i=>i instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(i){const n=i.match(yo.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,l,a,u,d,h]=n.map(Number),y=n[7]?Number((n[7]+"00").substr(1,3)):0;let g=Date.UTC(r,l-1,a,u||0,d||0,h||0,y);const x=n[8];if(x&&x!=="Z"){let k=Ku(x,!1);Math.abs(k)<30&&(k*=60),g-=6e4*k}return new Date(g)},stringify:({value:i})=>(i==null?void 0:i.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},_d=[xs,Ns,fo,po,vp,wp,cy,fy,dy,py,oy,ay,uy,zu,On,Uu,Bu,Vu,Sp,jp,yo],Id=new Map([["core",ry],["failsafe",[xs,Ns,fo]],["json",ly],["yaml11",_d],["yaml-1.1",_d]]),Ld={binary:zu,bool:$u,float:cp,floatExp:up,floatNaN:ap,floatTime:jp,int:pp,intHex:hp,intOct:dp,intTime:Sp,map:xs,merge:On,null:po,omap:Uu,pairs:Bu,seq:Ns,set:Vu,timestamp:yo},hy={"tag:yaml.org,2002:binary":zu,"tag:yaml.org,2002:merge":On,"tag:yaml.org,2002:omap":Uu,"tag:yaml.org,2002:pairs":Bu,"tag:yaml.org,2002:set":Vu,"tag:yaml.org,2002:timestamp":yo};function ou(i,n,r){const l=Id.get(n);if(l&&!i)return r&&!l.includes(On)?l.concat(On):l.slice();let a=l;if(!a)if(Array.isArray(i))a=[];else{const u=Array.from(Id.keys()).filter(d=>d!=="yaml11").map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown schema "${n}"; use one of ${u} or define customTags array`)}if(Array.isArray(i))for(const u of i)a=a.concat(u);else typeof i=="function"&&(a=i(a.slice()));return r&&(a=a.concat(On)),a.reduce((u,d)=>{const h=typeof d=="string"?Ld[d]:d;if(!h){const y=JSON.stringify(d),g=Object.keys(Ld).map(x=>JSON.stringify(x)).join(", ");throw new Error(`Unknown custom tag ${y}; use one of ${g}`)}return u.includes(h)||u.push(h),u},[])}const my=(i,n)=>i.key<n.key?-1:i.key>n.key?1:0;class qu{constructor({compat:n,customTags:r,merge:l,resolveKnownTags:a,schema:u,sortMapEntries:d,toStringDefaults:h}){this.compat=Array.isArray(n)?ou(n,"compat"):n?ou(null,n):null,this.name=typeof u=="string"&&u||"core",this.knownTags=a?hy:{},this.tags=ou(r,this.name,l),this.toStringOptions=h??null,Object.defineProperty(this,rr,{value:xs}),Object.defineProperty(this,dn,{value:fo}),Object.defineProperty(this,Ss,{value:Ns}),this.sortMapEntries=typeof d=="function"?d:d===!0?my:null}clone(){const n=Object.create(qu.prototype,Object.getOwnPropertyDescriptors(this));return n.tags=this.tags.slice(),n}}function yy(i,n){var y;const r=[];let l=n.directives===!0;if(n.directives!==!1&&i.directives){const g=i.directives.toString(i);g?(r.push(g),l=!0):i.directives.docStart&&(l=!0)}l&&r.push("---");const a=rp(i,n),{commentString:u}=a.options;if(i.commentBefore){r.length!==1&&r.unshift("");const g=u(i.commentBefore);r.unshift(En(g,""))}let d=!1,h=null;if(i.contents){if(He(i.contents)){if(i.contents.spaceBefore&&l&&r.push(""),i.contents.commentBefore){const k=u(i.contents.commentBefore);r.push(En(k,""))}a.forceBlockIndent=!!i.comment,h=i.contents.comment}const g=h?void 0:()=>d=!0;let x=vs(i.contents,a,()=>h=null,g);h&&(x+=Nr(x,"",u(h))),(x[0]==="|"||x[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${x}`:r.push(x)}else r.push(vs(i.contents,a));if((y=i.directives)!=null&&y.docEnd)if(i.comment){const g=u(i.comment);g.includes(`
218
+ ${u.comment}`:l.comment}l=a}i.items[r]=We(l)?l:new wt(l)}}else n("Expected a sequence for this tag");return i}function yp(i,n,r){const{replacer:l}=r,a=new Er(i);a.tag="tag:yaml.org,2002:pairs";let u=0;if(n&&Symbol.iterator in Object(n))for(let d of n){typeof l=="function"&&(d=l.call(n,String(u++),d));let h,y;if(Array.isArray(d))if(d.length===2)h=d[0],y=d[1];else throw new TypeError(`Expected [key, value] tuple: ${d}`);else if(d&&d instanceof Object){const g=Object.keys(d);if(g.length===1)h=g[0],y=d[h];else throw new TypeError(`Expected tuple with one key, not ${g.length} keys`)}else h=d;a.items.push(Ru(h,y,r))}return a}const Bu={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:mp,createNode:yp};class ys extends Er{constructor(){super(),this.add=qt.prototype.add.bind(this),this.delete=qt.prototype.delete.bind(this),this.get=qt.prototype.get.bind(this),this.has=qt.prototype.has.bind(this),this.set=qt.prototype.set.bind(this),this.tag=ys.tag}toJSON(n,r){if(!r)return super.toJSON(n);const l=new Map;r!=null&&r.onCreate&&r.onCreate(l);for(const a of this.items){let u,d;if(We(a)?(u=Ht(a.key,"",r),d=Ht(a.value,u,r)):u=Ht(a,"",r),l.has(u))throw new Error("Ordered maps must not include duplicate keys");l.set(u,d)}return l}static from(n,r,l){const a=yp(n,r,l),u=new this;return u.items=a.items,u}}ys.tag="tag:yaml.org,2002:omap";const Uu={collection:"seq",identify:i=>i instanceof Map,nodeClass:ys,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,n){const r=mp(i,n),l=[];for(const{key:a}of r.items)be(a)&&(l.includes(a.value)?n(`Ordered maps must not include duplicate keys: ${a.value}`):l.push(a.value));return Object.assign(new ys,r)},createNode:(i,n,r)=>ys.from(i,n,r)};function gp({value:i,source:n},r){return n&&(i?vp:wp).test.test(n)?n:i?r.options.trueStr:r.options.falseStr}const vp={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ve(!0),stringify:gp},wp={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ve(!1),stringify:gp},oy={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:rn},ay={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i.replace(/_/g,"")),stringify(i){const n=Number(i.value);return isFinite(n)?n.toExponential():rn(i)}},uy={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(i){const n=new ve(parseFloat(i.replace(/_/g,""))),r=i.indexOf(".");if(r!==-1){const l=i.substring(r+1).replace(/_/g,"");l[l.length-1]==="0"&&(n.minFractionDigits=l.length)}return n},stringify:rn},Pi=i=>typeof i=="bigint"||Number.isInteger(i);function yo(i,n,r,{intAsBigInt:l}){const a=i[0];if((a==="-"||a==="+")&&(n+=1),i=i.substring(n).replace(/_/g,""),l){switch(r){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}const d=BigInt(i);return a==="-"?BigInt(-1)*d:d}const u=parseInt(i,r);return a==="-"?-1*u:u}function Fu(i,n,r){const{value:l}=i;if(Pi(l)){const a=l.toString(n);return l<0?"-"+r+a.substr(1):r+a}return rn(i)}const cy={identify:Pi,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(i,n,r)=>yo(i,2,2,r),stringify:i=>Fu(i,2,"0b")},fy={identify:Pi,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(i,n,r)=>yo(i,1,8,r),stringify:i=>Fu(i,8,"0")},dy={identify:Pi,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(i,n,r)=>yo(i,0,10,r),stringify:rn},py={identify:Pi,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(i,n,r)=>yo(i,2,16,r),stringify:i=>Fu(i,16,"0x")};class gs extends qt{constructor(n){super(n),this.tag=gs.tag}add(n){let r;We(n)?r=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?r=new wt(n.key,null):r=new wt(n,null),Cr(this.items,r.key)||this.items.push(r)}get(n,r){const l=Cr(this.items,n);return!r&&We(l)?be(l.key)?l.key.value:l.key:l}set(n,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);const l=Cr(this.items,n);l&&!r?this.items.splice(this.items.indexOf(l),1):!l&&r&&this.items.push(new wt(n))}toJSON(n,r){return super.toJSON(n,r,Set)}toString(n,r,l){if(!n)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},n,{allNullValues:!0}),r,l);throw new Error("Set items must all have null values")}static from(n,r,l){const{replacer:a}=l,u=new this(n);if(r&&Symbol.iterator in Object(r))for(let d of r)typeof a=="function"&&(d=a.call(r,d,d)),u.items.push(Ru(d,null,l));return u}}gs.tag="tag:yaml.org,2002:set";const Vu={collection:"map",identify:i=>i instanceof Set,nodeClass:gs,default:!1,tag:"tag:yaml.org,2002:set",createNode:(i,n,r)=>gs.from(i,n,r),resolve(i,n){if(Li(i)){if(i.hasAllNullValues(!0))return Object.assign(new gs,i);n("Set items must all have null values")}else n("Expected a mapping for this tag");return i}};function Ku(i,n){const r=i[0],l=r==="-"||r==="+"?i.substring(1):i,a=d=>n?BigInt(d):Number(d),u=l.replace(/_/g,"").split(":").reduce((d,h)=>d*a(60)+a(h),a(0));return r==="-"?a(-1)*u:u}function kp(i){let{value:n}=i,r=d=>d;if(typeof n=="bigint")r=d=>BigInt(d);else if(isNaN(n)||!isFinite(n))return rn(i);let l="";n<0&&(l="-",n*=r(-1));const a=r(60),u=[n%a];return n<60?u.unshift(0):(n=(n-u[0])/a,u.unshift(n%a),n>=60&&(n=(n-u[0])/a,u.unshift(n))),l+u.map(d=>String(d).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Sp={identify:i=>typeof i=="bigint"||Number.isInteger(i),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(i,n,{intAsBigInt:r})=>Ku(i,r),stringify:kp},jp={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:i=>Ku(i,!1),stringify:kp},go={identify:i=>i instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(i){const n=i.match(go.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,l,a,u,d,h]=n.map(Number),y=n[7]?Number((n[7]+"00").substr(1,3)):0;let g=Date.UTC(r,l-1,a,u||0,d||0,h||0,y);const x=n[8];if(x&&x!=="Z"){let k=Ku(x,!1);Math.abs(k)<30&&(k*=60),g-=6e4*k}return new Date(g)},stringify:({value:i})=>(i==null?void 0:i.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},_d=[xs,Ns,po,ho,vp,wp,cy,fy,dy,py,oy,ay,uy,zu,On,Uu,Bu,Vu,Sp,jp,go],Id=new Map([["core",ry],["failsafe",[xs,Ns,po]],["json",ly],["yaml11",_d],["yaml-1.1",_d]]),Ld={binary:zu,bool:$u,float:cp,floatExp:up,floatNaN:ap,floatTime:jp,int:pp,intHex:hp,intOct:dp,intTime:Sp,map:xs,merge:On,null:ho,omap:Uu,pairs:Bu,seq:Ns,set:Vu,timestamp:go},hy={"tag:yaml.org,2002:binary":zu,"tag:yaml.org,2002:merge":On,"tag:yaml.org,2002:omap":Uu,"tag:yaml.org,2002:pairs":Bu,"tag:yaml.org,2002:set":Vu,"tag:yaml.org,2002:timestamp":go};function au(i,n,r){const l=Id.get(n);if(l&&!i)return r&&!l.includes(On)?l.concat(On):l.slice();let a=l;if(!a)if(Array.isArray(i))a=[];else{const u=Array.from(Id.keys()).filter(d=>d!=="yaml11").map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown schema "${n}"; use one of ${u} or define customTags array`)}if(Array.isArray(i))for(const u of i)a=a.concat(u);else typeof i=="function"&&(a=i(a.slice()));return r&&(a=a.concat(On)),a.reduce((u,d)=>{const h=typeof d=="string"?Ld[d]:d;if(!h){const y=JSON.stringify(d),g=Object.keys(Ld).map(x=>JSON.stringify(x)).join(", ");throw new Error(`Unknown custom tag ${y}; use one of ${g}`)}return u.includes(h)||u.push(h),u},[])}const my=(i,n)=>i.key<n.key?-1:i.key>n.key?1:0;class qu{constructor({compat:n,customTags:r,merge:l,resolveKnownTags:a,schema:u,sortMapEntries:d,toStringDefaults:h}){this.compat=Array.isArray(n)?au(n,"compat"):n?au(null,n):null,this.name=typeof u=="string"&&u||"core",this.knownTags=a?hy:{},this.tags=au(r,this.name,l),this.toStringOptions=h??null,Object.defineProperty(this,rr,{value:xs}),Object.defineProperty(this,dn,{value:po}),Object.defineProperty(this,Ss,{value:Ns}),this.sortMapEntries=typeof d=="function"?d:d===!0?my:null}clone(){const n=Object.create(qu.prototype,Object.getOwnPropertyDescriptors(this));return n.tags=this.tags.slice(),n}}function yy(i,n){var y;const r=[];let l=n.directives===!0;if(n.directives!==!1&&i.directives){const g=i.directives.toString(i);g?(r.push(g),l=!0):i.directives.docStart&&(l=!0)}l&&r.push("---");const a=rp(i,n),{commentString:u}=a.options;if(i.commentBefore){r.length!==1&&r.unshift("");const g=u(i.commentBefore);r.unshift(En(g,""))}let d=!1,h=null;if(i.contents){if(He(i.contents)){if(i.contents.spaceBefore&&l&&r.push(""),i.contents.commentBefore){const k=u(i.contents.commentBefore);r.push(En(k,""))}a.forceBlockIndent=!!i.comment,h=i.contents.comment}const g=h?void 0:()=>d=!0;let x=vs(i.contents,a,()=>h=null,g);h&&(x+=Nr(x,"",u(h))),(x[0]==="|"||x[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${x}`:r.push(x)}else r.push(vs(i.contents,a));if((y=i.directives)!=null&&y.docEnd)if(i.comment){const g=u(i.comment);g.includes(`
219
219
  `)?(r.push("..."),r.push(En(g,""))):r.push(`... ${g}`)}else r.push("...");else{let g=i.comment;g&&d&&(g=g.replace(/^\n+/,"")),g&&((!d||h)&&r[r.length-1]!==""&&r.push(""),r.push(En(u(g),"")))}return r.join(`
220
220
  `)+`
221
- `}class go{constructor(n,r,l){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Ht,{value:ku});let a=null;typeof r=="function"||Array.isArray(r)?a=r:l===void 0&&r&&(l=r,r=void 0);const u=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},l);this.options=u;let{version:d}=u;l!=null&&l._directives?(this.directives=l._directives.atDocument(),this.directives.yaml.explicit&&(d=this.directives.yaml.version)):this.directives=new vt({version:d}),this.setSchema(d,l),this.contents=n===void 0?null:this.createNode(n,a,l)}clone(){const n=Object.create(go.prototype,{[Ht]:{value:ku}});return n.commentBefore=this.commentBefore,n.comment=this.comment,n.errors=this.errors.slice(),n.warnings=this.warnings.slice(),n.options=Object.assign({},this.options),this.directives&&(n.directives=this.directives.clone()),n.schema=this.schema.clone(),n.contents=He(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){as(this.contents)&&this.contents.add(n)}addIn(n,r){as(this.contents)&&this.contents.addIn(n,r)}createAlias(n,r){if(!n.anchor){const l=Xd(this);n.anchor=!r||l.has(r)?Zd(r||"a",l):r}return new bu(n.anchor)}createNode(n,r,l){let a;if(typeof r=="function")n=r.call({"":n},"",n),a=r;else if(Array.isArray(r)){const I=H=>typeof H=="number"||H instanceof String||H instanceof Number,R=r.filter(I).map(String);R.length>0&&(r=r.concat(R)),a=r}else l===void 0&&r&&(l=r,r=void 0);const{aliasDuplicateObjects:u,anchorPrefix:d,flow:h,keepUndefined:y,onTagObj:g,tag:x}=l??{},{onAnchor:k,setAnchors:E,sourceObjects:O}=Km(this,d||"a"),b={aliasDuplicateObjects:u??!0,keepUndefined:y??!1,onAnchor:k,onTagObj:g,replacer:a,schema:this.schema,sourceObjects:O},S=Ei(n,x,b);return h&&qe(S)&&(S.flow=!0),E(),S}createPair(n,r,l={}){const a=this.createNode(n,null,l),u=this.createNode(r,null,l);return new wt(a,u)}delete(n){return as(this.contents)?this.contents.delete(n):!1}deleteIn(n){return mi(n)?this.contents==null?!1:(this.contents=null,!0):as(this.contents)?this.contents.deleteIn(n):!1}get(n,r){return qe(this.contents)?this.contents.get(n,r):void 0}getIn(n,r){return mi(n)?!r&&be(this.contents)?this.contents.value:this.contents:qe(this.contents)?this.contents.getIn(n,r):void 0}has(n){return qe(this.contents)?this.contents.has(n):!1}hasIn(n){return mi(n)?this.contents!==void 0:qe(this.contents)?this.contents.hasIn(n):!1}set(n,r){this.contents==null?this.contents=to(this.schema,[n],r):as(this.contents)&&this.contents.set(n,r)}setIn(n,r){mi(n)?this.contents=r:this.contents==null?this.contents=to(this.schema,Array.from(n),r):as(this.contents)&&this.contents.setIn(n,r)}setSchema(n,r={}){typeof n=="number"&&(n=String(n));let l;switch(n){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new vt({version:"1.1"}),l={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=n:this.directives=new vt({version:n}),l={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,l=null;break;default:{const a=JSON.stringify(n);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${a}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(l)this.schema=new qu(Object.assign(l,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:n,jsonArg:r,mapAsMap:l,maxAliasCount:a,onAnchor:u,reviver:d}={}){const h={anchors:new Map,doc:this,keep:!n,mapAsMap:l===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},y=qt(this.contents,r??"",h);if(typeof u=="function")for(const{count:g,res:x}of h.anchors.values())u(x,g);return typeof d=="function"?fs(d,{"":y},"",y):y}toJSON(n,r){return this.toJS({json:!0,jsonArg:n,mapAsMap:!1,onAnchor:r})}toString(n={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in n&&(!Number.isInteger(n.indent)||Number(n.indent)<=0)){const r=JSON.stringify(n.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return yy(this,n)}}function as(i){if(qe(i))return!0;throw new Error("Expected a YAML collection as document contents")}class xp extends Error{constructor(n,r,l,a){super(),this.name=n,this.code=l,this.message=a,this.pos=r}}class yi extends xp{constructor(n,r,l){super("YAMLParseError",n,r,l)}}class gy extends xp{constructor(n,r,l){super("YAMLWarning",n,r,l)}}const Ad=(i,n)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(h=>n.linePos(h));const{line:l,col:a}=r.linePos[0];r.message+=` at line ${l}, column ${a}`;let u=a-1,d=i.substring(n.lineStarts[l-1],n.lineStarts[l]).replace(/[\n\r]+$/,"");if(u>=60&&d.length>80){const h=Math.min(u-39,d.length-79);d="…"+d.substring(h),u-=h-1}if(d.length>80&&(d=d.substring(0,79)+"…"),l>1&&/^ *$/.test(d.substring(0,u))){let h=i.substring(n.lineStarts[l-2],n.lineStarts[l-1]);h.length>80&&(h=h.substring(0,79)+`…
221
+ `}class vo{constructor(n,r,l){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Wt,{value:ku});let a=null;typeof r=="function"||Array.isArray(r)?a=r:l===void 0&&r&&(l=r,r=void 0);const u=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},l);this.options=u;let{version:d}=u;l!=null&&l._directives?(this.directives=l._directives.atDocument(),this.directives.yaml.explicit&&(d=this.directives.yaml.version)):this.directives=new vt({version:d}),this.setSchema(d,l),this.contents=n===void 0?null:this.createNode(n,a,l)}clone(){const n=Object.create(vo.prototype,{[Wt]:{value:ku}});return n.commentBefore=this.commentBefore,n.comment=this.comment,n.errors=this.errors.slice(),n.warnings=this.warnings.slice(),n.options=Object.assign({},this.options),this.directives&&(n.directives=this.directives.clone()),n.schema=this.schema.clone(),n.contents=He(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){as(this.contents)&&this.contents.add(n)}addIn(n,r){as(this.contents)&&this.contents.addIn(n,r)}createAlias(n,r){if(!n.anchor){const l=Xd(this);n.anchor=!r||l.has(r)?Zd(r||"a",l):r}return new bu(n.anchor)}createNode(n,r,l){let a;if(typeof r=="function")n=r.call({"":n},"",n),a=r;else if(Array.isArray(r)){const I=H=>typeof H=="number"||H instanceof String||H instanceof Number,R=r.filter(I).map(String);R.length>0&&(r=r.concat(R)),a=r}else l===void 0&&r&&(l=r,r=void 0);const{aliasDuplicateObjects:u,anchorPrefix:d,flow:h,keepUndefined:y,onTagObj:g,tag:x}=l??{},{onAnchor:k,setAnchors:E,sourceObjects:O}=Km(this,d||"a"),b={aliasDuplicateObjects:u??!0,keepUndefined:y??!1,onAnchor:k,onTagObj:g,replacer:a,schema:this.schema,sourceObjects:O},S=Oi(n,x,b);return h&&qe(S)&&(S.flow=!0),E(),S}createPair(n,r,l={}){const a=this.createNode(n,null,l),u=this.createNode(r,null,l);return new wt(a,u)}delete(n){return as(this.contents)?this.contents.delete(n):!1}deleteIn(n){return yi(n)?this.contents==null?!1:(this.contents=null,!0):as(this.contents)?this.contents.deleteIn(n):!1}get(n,r){return qe(this.contents)?this.contents.get(n,r):void 0}getIn(n,r){return yi(n)?!r&&be(this.contents)?this.contents.value:this.contents:qe(this.contents)?this.contents.getIn(n,r):void 0}has(n){return qe(this.contents)?this.contents.has(n):!1}hasIn(n){return yi(n)?this.contents!==void 0:qe(this.contents)?this.contents.hasIn(n):!1}set(n,r){this.contents==null?this.contents=no(this.schema,[n],r):as(this.contents)&&this.contents.set(n,r)}setIn(n,r){yi(n)?this.contents=r:this.contents==null?this.contents=no(this.schema,Array.from(n),r):as(this.contents)&&this.contents.setIn(n,r)}setSchema(n,r={}){typeof n=="number"&&(n=String(n));let l;switch(n){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new vt({version:"1.1"}),l={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=n:this.directives=new vt({version:n}),l={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,l=null;break;default:{const a=JSON.stringify(n);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${a}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(l)this.schema=new qu(Object.assign(l,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:n,jsonArg:r,mapAsMap:l,maxAliasCount:a,onAnchor:u,reviver:d}={}){const h={anchors:new Map,doc:this,keep:!n,mapAsMap:l===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},y=Ht(this.contents,r??"",h);if(typeof u=="function")for(const{count:g,res:x}of h.anchors.values())u(x,g);return typeof d=="function"?fs(d,{"":y},"",y):y}toJSON(n,r){return this.toJS({json:!0,jsonArg:n,mapAsMap:!1,onAnchor:r})}toString(n={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in n&&(!Number.isInteger(n.indent)||Number(n.indent)<=0)){const r=JSON.stringify(n.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return yy(this,n)}}function as(i){if(qe(i))return!0;throw new Error("Expected a YAML collection as document contents")}class xp extends Error{constructor(n,r,l,a){super(),this.name=n,this.code=l,this.message=a,this.pos=r}}class gi extends xp{constructor(n,r,l){super("YAMLParseError",n,r,l)}}class gy extends xp{constructor(n,r,l){super("YAMLWarning",n,r,l)}}const Ad=(i,n)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(h=>n.linePos(h));const{line:l,col:a}=r.linePos[0];r.message+=` at line ${l}, column ${a}`;let u=a-1,d=i.substring(n.lineStarts[l-1],n.lineStarts[l]).replace(/[\n\r]+$/,"");if(u>=60&&d.length>80){const h=Math.min(u-39,d.length-79);d="…"+d.substring(h),u-=h-1}if(d.length>80&&(d=d.substring(0,79)+"…"),l>1&&/^ *$/.test(d.substring(0,u))){let h=i.substring(n.lineStarts[l-2],n.lineStarts[l-1]);h.length>80&&(h=h.substring(0,79)+`…
222
222
  `),d=h+d}if(/[^ ]/.test(d)){let h=1;const y=r.linePos[1];(y==null?void 0:y.line)===l&&y.col>a&&(h=Math.max(1,Math.min(y.col-a,80-u)));const g=" ".repeat(u)+"^".repeat(h);r.message+=`:
223
223
 
224
224
  ${d}
225
225
  ${g}
226
- `}};function ws(i,{flow:n,indicator:r,next:l,offset:a,onError:u,parentIndent:d,startOnNewline:h}){let y=!1,g=h,x=h,k="",E="",O=!1,b=!1,S=null,I=null,R=null,H=null,F=null,K=null,G=null;for(const U of i)switch(b&&(U.type!=="space"&&U.type!=="newline"&&U.type!=="comma"&&u(U.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),b=!1),S&&(g&&U.type!=="comment"&&U.type!=="newline"&&u(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),S=null),U.type){case"space":!n&&(r!=="doc-start"||(l==null?void 0:l.type)!=="flow-collection")&&U.source.includes(" ")&&(S=U),x=!0;break;case"comment":{x||u(U,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const ae=U.source.substring(1)||" ";k?k+=E+ae:k=ae,E="",g=!1;break}case"newline":g?k?k+=U.source:(!K||r!=="seq-item-ind")&&(y=!0):E+=U.source,g=!0,O=!0,(I||R)&&(H=U),x=!0;break;case"anchor":I&&u(U,"MULTIPLE_ANCHORS","A node can have at most one anchor"),U.source.endsWith(":")&&u(U.offset+U.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),I=U,G??(G=U.offset),g=!1,x=!1,b=!0;break;case"tag":{R&&u(U,"MULTIPLE_TAGS","A node can have at most one tag"),R=U,G??(G=U.offset),g=!1,x=!1,b=!0;break}case r:(I||R)&&u(U,"BAD_PROP_ORDER",`Anchors and tags must be after the ${U.source} indicator`),K&&u(U,"UNEXPECTED_TOKEN",`Unexpected ${U.source} in ${n??"collection"}`),K=U,g=r==="seq-item-ind"||r==="explicit-key-ind",x=!1;break;case"comma":if(n){F&&u(U,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),F=U,g=!1,x=!1;break}default:u(U,"UNEXPECTED_TOKEN",`Unexpected ${U.type} token`),g=!1,x=!1}const Q=i[i.length-1],q=Q?Q.offset+Q.source.length:a;return b&&l&&l.type!=="space"&&l.type!=="newline"&&l.type!=="comma"&&(l.type!=="scalar"||l.source!=="")&&u(l.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S&&(g&&S.indent<=d||(l==null?void 0:l.type)==="block-map"||(l==null?void 0:l.type)==="block-seq")&&u(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:F,found:K,spaceBefore:y,comment:k,hasNewline:O,anchor:I,tag:R,newlineAfterProp:H,end:q,start:G??q}}function Oi(i){if(!i)return null;switch(i.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(i.source.includes(`
227
- `))return!0;if(i.end){for(const n of i.end)if(n.type==="newline")return!0}return!1;case"flow-collection":for(const n of i.items){for(const r of n.start)if(r.type==="newline")return!0;if(n.sep){for(const r of n.sep)if(r.type==="newline")return!0}if(Oi(n.key)||Oi(n.value))return!0}return!1;default:return!0}}function Nu(i,n,r){if((n==null?void 0:n.type)==="flow-collection"){const l=n.end[0];l.indent===i&&(l.source==="]"||l.source==="}")&&Oi(n)&&r(l,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Np(i,n,r){const{uniqueKeys:l}=i.options;if(l===!1)return!1;const a=typeof l=="function"?l:(u,d)=>u===d||be(u)&&be(d)&&u.value===d.value;return n.some(u=>a(u.key,r))}const Pd="All mapping items must start at the same column";function vy({composeNode:i,composeEmptyNode:n},r,l,a,u){var x;const d=(u==null?void 0:u.nodeClass)??Kt,h=new d(r.schema);r.atRoot&&(r.atRoot=!1);let y=l.offset,g=null;for(const k of l.items){const{start:E,key:O,sep:b,value:S}=k,I=ws(E,{indicator:"explicit-key-ind",next:O??(b==null?void 0:b[0]),offset:y,onError:a,parentIndent:l.indent,startOnNewline:!0}),R=!I.found;if(R){if(O&&(O.type==="block-seq"?a(y,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in O&&O.indent!==l.indent&&a(y,"BAD_INDENT",Pd)),!I.anchor&&!I.tag&&!b){g=I.end,I.comment&&(h.comment?h.comment+=`
228
- `+I.comment:h.comment=I.comment);continue}(I.newlineAfterProp||Oi(O))&&a(O??E[E.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((x=I.found)==null?void 0:x.indent)!==l.indent&&a(y,"BAD_INDENT",Pd);r.atKey=!0;const H=I.end,F=O?i(r,O,I,a):n(r,H,E,null,I,a);r.schema.compat&&Nu(l.indent,O,a),r.atKey=!1,Np(r,h.items,F)&&a(H,"DUPLICATE_KEY","Map keys must be unique");const K=ws(b??[],{indicator:"map-value-ind",next:S,offset:F.range[2],onError:a,parentIndent:l.indent,startOnNewline:!O||O.type==="block-scalar"});if(y=K.end,K.found){R&&((S==null?void 0:S.type)==="block-map"&&!K.hasNewline&&a(y,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&I.start<K.found.offset-1024&&a(F.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const G=S?i(r,S,K,a):n(r,y,b,null,K,a);r.schema.compat&&Nu(l.indent,S,a),y=G.range[2];const Q=new wt(F,G);r.options.keepSourceTokens&&(Q.srcToken=k),h.items.push(Q)}else{R&&a(F.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),K.comment&&(F.comment?F.comment+=`
229
- `+K.comment:F.comment=K.comment);const G=new wt(F);r.options.keepSourceTokens&&(G.srcToken=k),h.items.push(G)}}return g&&g<y&&a(g,"IMPOSSIBLE","Map comment with trailing content"),h.range=[l.offset,y,g??y],h}function wy({composeNode:i,composeEmptyNode:n},r,l,a,u){const d=(u==null?void 0:u.nodeClass)??Er,h=new d(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let y=l.offset,g=null;for(const{start:x,value:k}of l.items){const E=ws(x,{indicator:"seq-item-ind",next:k,offset:y,onError:a,parentIndent:l.indent,startOnNewline:!0});if(!E.found)if(E.anchor||E.tag||k)(k==null?void 0:k.type)==="block-seq"?a(E.end,"BAD_INDENT","All sequence items must start at the same column"):a(y,"MISSING_CHAR","Sequence item without - indicator");else{g=E.end,E.comment&&(h.comment=E.comment);continue}const O=k?i(r,k,E,a):n(r,E.end,x,null,E,a);r.schema.compat&&Nu(l.indent,k,a),y=O.range[2],h.items.push(O)}return h.range=[l.offset,y,g??y],h}function Pi(i,n,r,l){let a="";if(i){let u=!1,d="";for(const h of i){const{source:y,type:g}=h;switch(g){case"space":u=!0;break;case"comment":{r&&!u&&l(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const x=y.substring(1)||" ";a?a+=d+x:a=x,d="";break}case"newline":a&&(d+=y),u=!0;break;default:l(h,"UNEXPECTED_TOKEN",`Unexpected ${g} at node end`)}n+=y.length}}return{comment:a,offset:n}}const au="Block collections are not allowed within flow collections",uu=i=>i&&(i.type==="block-map"||i.type==="block-seq");function ky({composeNode:i,composeEmptyNode:n},r,l,a,u){var I;const d=l.start.source==="{",h=d?"flow map":"flow sequence",y=(u==null?void 0:u.nodeClass)??(d?Kt:Er),g=new y(r.schema);g.flow=!0;const x=r.atRoot;x&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let k=l.offset+l.start.source.length;for(let R=0;R<l.items.length;++R){const H=l.items[R],{start:F,key:K,sep:G,value:Q}=H,q=ws(F,{flow:h,indicator:"explicit-key-ind",next:K??(G==null?void 0:G[0]),offset:k,onError:a,parentIndent:l.indent,startOnNewline:!1});if(!q.found){if(!q.anchor&&!q.tag&&!G&&!Q){R===0&&q.comma?a(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`):R<l.items.length-1&&a(q.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${h}`),q.comment&&(g.comment?g.comment+=`
230
- `+q.comment:g.comment=q.comment),k=q.end;continue}!d&&r.options.strict&&Oi(K)&&a(K,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(R===0)q.comma&&a(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`);else if(q.comma||a(q.start,"MISSING_CHAR",`Missing , between ${h} items`),q.comment){let U="";e:for(const ae of F)switch(ae.type){case"comma":case"space":break;case"comment":U=ae.source.substring(1);break e;default:break e}if(U){let ae=g.items[g.items.length-1];We(ae)&&(ae=ae.value??ae.key),ae.comment?ae.comment+=`
231
- `+U:ae.comment=U,q.comment=q.comment.substring(U.length+1)}}if(!d&&!G&&!q.found){const U=Q?i(r,Q,q,a):n(r,q.end,G,null,q,a);g.items.push(U),k=U.range[2],uu(Q)&&a(U.range,"BLOCK_IN_FLOW",au)}else{r.atKey=!0;const U=q.end,ae=K?i(r,K,q,a):n(r,U,F,null,q,a);uu(K)&&a(ae.range,"BLOCK_IN_FLOW",au),r.atKey=!1;const D=ws(G??[],{flow:h,indicator:"map-value-ind",next:Q,offset:ae.range[2],onError:a,parentIndent:l.indent,startOnNewline:!1});if(D.found){if(!d&&!q.found&&r.options.strict){if(G)for(const de of G){if(de===D.found)break;if(de.type==="newline"){a(de,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}q.start<D.found.offset-1024&&a(D.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else Q&&("source"in Q&&((I=Q.source)==null?void 0:I[0])===":"?a(Q,"MISSING_CHAR",`Missing space after : in ${h}`):a(D.start,"MISSING_CHAR",`Missing , or : between ${h} items`));const Z=Q?i(r,Q,D,a):D.found?n(r,D.end,G,null,D,a):null;Z?uu(Q)&&a(Z.range,"BLOCK_IN_FLOW",au):D.comment&&(ae.comment?ae.comment+=`
232
- `+D.comment:ae.comment=D.comment);const te=new wt(ae,Z);if(r.options.keepSourceTokens&&(te.srcToken=H),d){const de=g;Np(r,de.items,ae)&&a(U,"DUPLICATE_KEY","Map keys must be unique"),de.items.push(te)}else{const de=new Kt(r.schema);de.flow=!0,de.items.push(te);const Ie=(Z??ae).range;de.range=[ae.range[0],Ie[1],Ie[2]],g.items.push(de)}k=Z?Z.range[2]:D.end}}const E=d?"}":"]",[O,...b]=l.end;let S=k;if((O==null?void 0:O.source)===E)S=O.offset+O.source.length;else{const R=h[0].toUpperCase()+h.substring(1),H=x?`${R} must end with a ${E}`:`${R} in block collection must be sufficiently indented and end with a ${E}`;a(k,x?"MISSING_CHAR":"BAD_INDENT",H),O&&O.source.length!==1&&b.unshift(O)}if(b.length>0){const R=Pi(b,S,r.options.strict,a);R.comment&&(g.comment?g.comment+=`
233
- `+R.comment:g.comment=R.comment),g.range=[l.offset,S,R.offset]}else g.range=[l.offset,S,S];return g}function cu(i,n,r,l,a,u){const d=r.type==="block-map"?vy(i,n,r,l,u):r.type==="block-seq"?wy(i,n,r,l,u):ky(i,n,r,l,u),h=d.constructor;return a==="!"||a===h.tagName?(d.tag=h.tagName,d):(a&&(d.tag=a),d)}function Sy(i,n,r,l,a){var E;const u=l.tag,d=u?n.directives.tagName(u.source,O=>a(u,"TAG_RESOLVE_FAILED",O)):null;if(r.type==="block-seq"){const{anchor:O,newlineAfterProp:b}=l,S=O&&u?O.offset>u.offset?O:u:O??u;S&&(!b||b.offset<S.offset)&&a(S,"MISSING_CHAR","Missing newline after block sequence props")}const h=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!u||!d||d==="!"||d===Kt.tagName&&h==="map"||d===Er.tagName&&h==="seq")return cu(i,n,r,a,d);let y=n.schema.tags.find(O=>O.tag===d&&O.collection===h);if(!y){const O=n.schema.knownTags[d];if((O==null?void 0:O.collection)===h)n.schema.tags.push(Object.assign({},O,{default:!1})),y=O;else return O?a(u,"BAD_COLLECTION_TYPE",`${O.tag} used for ${h} collection, but expects ${O.collection??"scalar"}`,!0):a(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${d}`,!0),cu(i,n,r,a,d)}const g=cu(i,n,r,a,d,y),x=((E=y.resolve)==null?void 0:E.call(y,g,O=>a(u,"TAG_RESOLVE_FAILED",O),n.options))??g,k=He(x)?x:new ve(x);return k.range=g.range,k.tag=d,y!=null&&y.format&&(k.format=y.format),k}function jy(i,n,r){const l=n.offset,a=xy(n,i.options.strict,r);if(!a)return{value:"",type:null,comment:"",range:[l,l,l]};const u=a.mode===">"?ve.BLOCK_FOLDED:ve.BLOCK_LITERAL,d=n.source?Ny(n.source):[];let h=d.length;for(let S=d.length-1;S>=0;--S){const I=d[S][1];if(I===""||I==="\r")h=S;else break}if(h===0){const S=a.chomp==="+"&&d.length>0?`
226
+ `}};function ws(i,{flow:n,indicator:r,next:l,offset:a,onError:u,parentIndent:d,startOnNewline:h}){let y=!1,g=h,x=h,k="",E="",O=!1,b=!1,S=null,I=null,R=null,H=null,F=null,K=null,G=null;for(const U of i)switch(b&&(U.type!=="space"&&U.type!=="newline"&&U.type!=="comma"&&u(U.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),b=!1),S&&(g&&U.type!=="comment"&&U.type!=="newline"&&u(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),S=null),U.type){case"space":!n&&(r!=="doc-start"||(l==null?void 0:l.type)!=="flow-collection")&&U.source.includes(" ")&&(S=U),x=!0;break;case"comment":{x||u(U,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const ae=U.source.substring(1)||" ";k?k+=E+ae:k=ae,E="",g=!1;break}case"newline":g?k?k+=U.source:(!K||r!=="seq-item-ind")&&(y=!0):E+=U.source,g=!0,O=!0,(I||R)&&(H=U),x=!0;break;case"anchor":I&&u(U,"MULTIPLE_ANCHORS","A node can have at most one anchor"),U.source.endsWith(":")&&u(U.offset+U.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),I=U,G??(G=U.offset),g=!1,x=!1,b=!0;break;case"tag":{R&&u(U,"MULTIPLE_TAGS","A node can have at most one tag"),R=U,G??(G=U.offset),g=!1,x=!1,b=!0;break}case r:(I||R)&&u(U,"BAD_PROP_ORDER",`Anchors and tags must be after the ${U.source} indicator`),K&&u(U,"UNEXPECTED_TOKEN",`Unexpected ${U.source} in ${n??"collection"}`),K=U,g=r==="seq-item-ind"||r==="explicit-key-ind",x=!1;break;case"comma":if(n){F&&u(U,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),F=U,g=!1,x=!1;break}default:u(U,"UNEXPECTED_TOKEN",`Unexpected ${U.type} token`),g=!1,x=!1}const Q=i[i.length-1],q=Q?Q.offset+Q.source.length:a;return b&&l&&l.type!=="space"&&l.type!=="newline"&&l.type!=="comma"&&(l.type!=="scalar"||l.source!=="")&&u(l.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S&&(g&&S.indent<=d||(l==null?void 0:l.type)==="block-map"||(l==null?void 0:l.type)==="block-seq")&&u(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:F,found:K,spaceBefore:y,comment:k,hasNewline:O,anchor:I,tag:R,newlineAfterProp:H,end:q,start:G??q}}function Ti(i){if(!i)return null;switch(i.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(i.source.includes(`
227
+ `))return!0;if(i.end){for(const n of i.end)if(n.type==="newline")return!0}return!1;case"flow-collection":for(const n of i.items){for(const r of n.start)if(r.type==="newline")return!0;if(n.sep){for(const r of n.sep)if(r.type==="newline")return!0}if(Ti(n.key)||Ti(n.value))return!0}return!1;default:return!0}}function Nu(i,n,r){if((n==null?void 0:n.type)==="flow-collection"){const l=n.end[0];l.indent===i&&(l.source==="]"||l.source==="}")&&Ti(n)&&r(l,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Np(i,n,r){const{uniqueKeys:l}=i.options;if(l===!1)return!1;const a=typeof l=="function"?l:(u,d)=>u===d||be(u)&&be(d)&&u.value===d.value;return n.some(u=>a(u.key,r))}const Pd="All mapping items must start at the same column";function vy({composeNode:i,composeEmptyNode:n},r,l,a,u){var x;const d=(u==null?void 0:u.nodeClass)??qt,h=new d(r.schema);r.atRoot&&(r.atRoot=!1);let y=l.offset,g=null;for(const k of l.items){const{start:E,key:O,sep:b,value:S}=k,I=ws(E,{indicator:"explicit-key-ind",next:O??(b==null?void 0:b[0]),offset:y,onError:a,parentIndent:l.indent,startOnNewline:!0}),R=!I.found;if(R){if(O&&(O.type==="block-seq"?a(y,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in O&&O.indent!==l.indent&&a(y,"BAD_INDENT",Pd)),!I.anchor&&!I.tag&&!b){g=I.end,I.comment&&(h.comment?h.comment+=`
228
+ `+I.comment:h.comment=I.comment);continue}(I.newlineAfterProp||Ti(O))&&a(O??E[E.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((x=I.found)==null?void 0:x.indent)!==l.indent&&a(y,"BAD_INDENT",Pd);r.atKey=!0;const H=I.end,F=O?i(r,O,I,a):n(r,H,E,null,I,a);r.schema.compat&&Nu(l.indent,O,a),r.atKey=!1,Np(r,h.items,F)&&a(H,"DUPLICATE_KEY","Map keys must be unique");const K=ws(b??[],{indicator:"map-value-ind",next:S,offset:F.range[2],onError:a,parentIndent:l.indent,startOnNewline:!O||O.type==="block-scalar"});if(y=K.end,K.found){R&&((S==null?void 0:S.type)==="block-map"&&!K.hasNewline&&a(y,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&I.start<K.found.offset-1024&&a(F.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const G=S?i(r,S,K,a):n(r,y,b,null,K,a);r.schema.compat&&Nu(l.indent,S,a),y=G.range[2];const Q=new wt(F,G);r.options.keepSourceTokens&&(Q.srcToken=k),h.items.push(Q)}else{R&&a(F.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),K.comment&&(F.comment?F.comment+=`
229
+ `+K.comment:F.comment=K.comment);const G=new wt(F);r.options.keepSourceTokens&&(G.srcToken=k),h.items.push(G)}}return g&&g<y&&a(g,"IMPOSSIBLE","Map comment with trailing content"),h.range=[l.offset,y,g??y],h}function wy({composeNode:i,composeEmptyNode:n},r,l,a,u){const d=(u==null?void 0:u.nodeClass)??Er,h=new d(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let y=l.offset,g=null;for(const{start:x,value:k}of l.items){const E=ws(x,{indicator:"seq-item-ind",next:k,offset:y,onError:a,parentIndent:l.indent,startOnNewline:!0});if(!E.found)if(E.anchor||E.tag||k)(k==null?void 0:k.type)==="block-seq"?a(E.end,"BAD_INDENT","All sequence items must start at the same column"):a(y,"MISSING_CHAR","Sequence item without - indicator");else{g=E.end,E.comment&&(h.comment=E.comment);continue}const O=k?i(r,k,E,a):n(r,E.end,x,null,E,a);r.schema.compat&&Nu(l.indent,k,a),y=O.range[2],h.items.push(O)}return h.range=[l.offset,y,g??y],h}function bi(i,n,r,l){let a="";if(i){let u=!1,d="";for(const h of i){const{source:y,type:g}=h;switch(g){case"space":u=!0;break;case"comment":{r&&!u&&l(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const x=y.substring(1)||" ";a?a+=d+x:a=x,d="";break}case"newline":a&&(d+=y),u=!0;break;default:l(h,"UNEXPECTED_TOKEN",`Unexpected ${g} at node end`)}n+=y.length}}return{comment:a,offset:n}}const uu="Block collections are not allowed within flow collections",cu=i=>i&&(i.type==="block-map"||i.type==="block-seq");function ky({composeNode:i,composeEmptyNode:n},r,l,a,u){var I;const d=l.start.source==="{",h=d?"flow map":"flow sequence",y=(u==null?void 0:u.nodeClass)??(d?qt:Er),g=new y(r.schema);g.flow=!0;const x=r.atRoot;x&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let k=l.offset+l.start.source.length;for(let R=0;R<l.items.length;++R){const H=l.items[R],{start:F,key:K,sep:G,value:Q}=H,q=ws(F,{flow:h,indicator:"explicit-key-ind",next:K??(G==null?void 0:G[0]),offset:k,onError:a,parentIndent:l.indent,startOnNewline:!1});if(!q.found){if(!q.anchor&&!q.tag&&!G&&!Q){R===0&&q.comma?a(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`):R<l.items.length-1&&a(q.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${h}`),q.comment&&(g.comment?g.comment+=`
230
+ `+q.comment:g.comment=q.comment),k=q.end;continue}!d&&r.options.strict&&Ti(K)&&a(K,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(R===0)q.comma&&a(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`);else if(q.comma||a(q.start,"MISSING_CHAR",`Missing , between ${h} items`),q.comment){let U="";e:for(const ae of F)switch(ae.type){case"comma":case"space":break;case"comment":U=ae.source.substring(1);break e;default:break e}if(U){let ae=g.items[g.items.length-1];We(ae)&&(ae=ae.value??ae.key),ae.comment?ae.comment+=`
231
+ `+U:ae.comment=U,q.comment=q.comment.substring(U.length+1)}}if(!d&&!G&&!q.found){const U=Q?i(r,Q,q,a):n(r,q.end,G,null,q,a);g.items.push(U),k=U.range[2],cu(Q)&&a(U.range,"BLOCK_IN_FLOW",uu)}else{r.atKey=!0;const U=q.end,ae=K?i(r,K,q,a):n(r,U,F,null,q,a);cu(K)&&a(ae.range,"BLOCK_IN_FLOW",uu),r.atKey=!1;const D=ws(G??[],{flow:h,indicator:"map-value-ind",next:Q,offset:ae.range[2],onError:a,parentIndent:l.indent,startOnNewline:!1});if(D.found){if(!d&&!q.found&&r.options.strict){if(G)for(const de of G){if(de===D.found)break;if(de.type==="newline"){a(de,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}q.start<D.found.offset-1024&&a(D.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else Q&&("source"in Q&&((I=Q.source)==null?void 0:I[0])===":"?a(Q,"MISSING_CHAR",`Missing space after : in ${h}`):a(D.start,"MISSING_CHAR",`Missing , or : between ${h} items`));const Z=Q?i(r,Q,D,a):D.found?n(r,D.end,G,null,D,a):null;Z?cu(Q)&&a(Z.range,"BLOCK_IN_FLOW",uu):D.comment&&(ae.comment?ae.comment+=`
232
+ `+D.comment:ae.comment=D.comment);const te=new wt(ae,Z);if(r.options.keepSourceTokens&&(te.srcToken=H),d){const de=g;Np(r,de.items,ae)&&a(U,"DUPLICATE_KEY","Map keys must be unique"),de.items.push(te)}else{const de=new qt(r.schema);de.flow=!0,de.items.push(te);const Ie=(Z??ae).range;de.range=[ae.range[0],Ie[1],Ie[2]],g.items.push(de)}k=Z?Z.range[2]:D.end}}const E=d?"}":"]",[O,...b]=l.end;let S=k;if((O==null?void 0:O.source)===E)S=O.offset+O.source.length;else{const R=h[0].toUpperCase()+h.substring(1),H=x?`${R} must end with a ${E}`:`${R} in block collection must be sufficiently indented and end with a ${E}`;a(k,x?"MISSING_CHAR":"BAD_INDENT",H),O&&O.source.length!==1&&b.unshift(O)}if(b.length>0){const R=bi(b,S,r.options.strict,a);R.comment&&(g.comment?g.comment+=`
233
+ `+R.comment:g.comment=R.comment),g.range=[l.offset,S,R.offset]}else g.range=[l.offset,S,S];return g}function fu(i,n,r,l,a,u){const d=r.type==="block-map"?vy(i,n,r,l,u):r.type==="block-seq"?wy(i,n,r,l,u):ky(i,n,r,l,u),h=d.constructor;return a==="!"||a===h.tagName?(d.tag=h.tagName,d):(a&&(d.tag=a),d)}function Sy(i,n,r,l,a){var E;const u=l.tag,d=u?n.directives.tagName(u.source,O=>a(u,"TAG_RESOLVE_FAILED",O)):null;if(r.type==="block-seq"){const{anchor:O,newlineAfterProp:b}=l,S=O&&u?O.offset>u.offset?O:u:O??u;S&&(!b||b.offset<S.offset)&&a(S,"MISSING_CHAR","Missing newline after block sequence props")}const h=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!u||!d||d==="!"||d===qt.tagName&&h==="map"||d===Er.tagName&&h==="seq")return fu(i,n,r,a,d);let y=n.schema.tags.find(O=>O.tag===d&&O.collection===h);if(!y){const O=n.schema.knownTags[d];if((O==null?void 0:O.collection)===h)n.schema.tags.push(Object.assign({},O,{default:!1})),y=O;else return O?a(u,"BAD_COLLECTION_TYPE",`${O.tag} used for ${h} collection, but expects ${O.collection??"scalar"}`,!0):a(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${d}`,!0),fu(i,n,r,a,d)}const g=fu(i,n,r,a,d,y),x=((E=y.resolve)==null?void 0:E.call(y,g,O=>a(u,"TAG_RESOLVE_FAILED",O),n.options))??g,k=He(x)?x:new ve(x);return k.range=g.range,k.tag=d,y!=null&&y.format&&(k.format=y.format),k}function jy(i,n,r){const l=n.offset,a=xy(n,i.options.strict,r);if(!a)return{value:"",type:null,comment:"",range:[l,l,l]};const u=a.mode===">"?ve.BLOCK_FOLDED:ve.BLOCK_LITERAL,d=n.source?Ny(n.source):[];let h=d.length;for(let S=d.length-1;S>=0;--S){const I=d[S][1];if(I===""||I==="\r")h=S;else break}if(h===0){const S=a.chomp==="+"&&d.length>0?`
234
234
  `.repeat(Math.max(1,d.length-1)):"";let I=l+a.length;return n.source&&(I+=n.source.length),{value:S,type:u,comment:a.comment,range:[l,I,I]}}let y=n.indent+a.indent,g=n.offset+a.length,x=0;for(let S=0;S<h;++S){const[I,R]=d[S];if(R===""||R==="\r")a.indent===0&&I.length>y&&(y=I.length);else{I.length<y&&r(g+I.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),a.indent===0&&(y=I.length),x=S,y===0&&!i.atRoot&&r(g,"BAD_INDENT","Block scalar values in collections must be indented");break}g+=I.length+R.length+1}for(let S=d.length-1;S>=h;--S)d[S][0].length>y&&(h=S+1);let k="",E="",O=!1;for(let S=0;S<x;++S)k+=d[S][0].slice(y)+`
235
235
  `;for(let S=x;S<h;++S){let[I,R]=d[S];g+=I.length+R.length+1;const H=R[R.length-1]==="\r";if(H&&(R=R.slice(0,-1)),R&&I.length<y){const K=`Block scalar lines must not be less indented than their ${a.indent?"explicit indentation indicator":"first line"}`;r(g-R.length-(H?2:1),"BAD_INDENT",K),I=""}u===ve.BLOCK_LITERAL?(k+=E+I.slice(y)+R,E=`
236
236
  `):I.length>y||R[0]===" "?(E===" "?E=`
@@ -245,7 +245,7 @@ ${g}
245
245
  `+d[S][0].slice(y);k[k.length-1]!==`
246
246
  `&&(k+=`
247
247
  `);break;default:k+=`
248
- `}const b=l+a.length+n.source.length;return{value:k,type:u,comment:a.comment,range:[l,b,b]}}function xy({offset:i,props:n},r,l){if(n[0].type!=="block-scalar-header")return l(n[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:a}=n[0],u=a[0];let d=0,h="",y=-1;for(let E=1;E<a.length;++E){const O=a[E];if(!h&&(O==="-"||O==="+"))h=O;else{const b=Number(O);!d&&b?d=b:y===-1&&(y=i+E)}}y!==-1&&l(y,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let g=!1,x="",k=a.length;for(let E=1;E<n.length;++E){const O=n[E];switch(O.type){case"space":g=!0;case"newline":k+=O.source.length;break;case"comment":r&&!g&&l(O,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),k+=O.source.length,x=O.source.substring(1);break;case"error":l(O,"UNEXPECTED_TOKEN",O.message),k+=O.source.length;break;default:{const b=`Unexpected token in block scalar header: ${O.type}`;l(O,"UNEXPECTED_TOKEN",b);const S=O.source;S&&typeof S=="string"&&(k+=S.length)}}}return{mode:u,indent:d,chomp:h,comment:x,length:k}}function Ny(i){const n=i.split(/\n( *)/),r=n[0],l=r.match(/^( *)/),u=[l!=null&&l[1]?[l[1],r.slice(l[1].length)]:["",r]];for(let d=1;d<n.length;d+=2)u.push([n[d],n[d+1]]);return u}function Cy(i,n,r){const{offset:l,type:a,source:u,end:d}=i;let h,y;const g=(E,O,b)=>r(l+E,O,b);switch(a){case"scalar":h=ve.PLAIN,y=Ey(u,g);break;case"single-quoted-scalar":h=ve.QUOTE_SINGLE,y=Oy(u,g);break;case"double-quoted-scalar":h=ve.QUOTE_DOUBLE,y=Ty(u,g);break;default:return r(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[l,l+u.length,l+u.length]}}const x=l+u.length,k=Pi(d,x,n,r);return{value:y,type:h,comment:k.comment,range:[l,x,k.offset]}}function Ey(i,n){let r="";switch(i[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${i[0]}`;break}case"@":case"`":{r=`reserved character ${i[0]}`;break}}return r&&n(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Cp(i)}function Oy(i,n){return(i[i.length-1]!=="'"||i.length===1)&&n(i.length,"MISSING_CHAR","Missing closing 'quote"),Cp(i.slice(1,-1)).replace(/''/g,"'")}function Cp(i){let n,r;try{n=new RegExp(`(.*?)(?<![ ])[ ]*\r?
248
+ `}const b=l+a.length+n.source.length;return{value:k,type:u,comment:a.comment,range:[l,b,b]}}function xy({offset:i,props:n},r,l){if(n[0].type!=="block-scalar-header")return l(n[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:a}=n[0],u=a[0];let d=0,h="",y=-1;for(let E=1;E<a.length;++E){const O=a[E];if(!h&&(O==="-"||O==="+"))h=O;else{const b=Number(O);!d&&b?d=b:y===-1&&(y=i+E)}}y!==-1&&l(y,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let g=!1,x="",k=a.length;for(let E=1;E<n.length;++E){const O=n[E];switch(O.type){case"space":g=!0;case"newline":k+=O.source.length;break;case"comment":r&&!g&&l(O,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),k+=O.source.length,x=O.source.substring(1);break;case"error":l(O,"UNEXPECTED_TOKEN",O.message),k+=O.source.length;break;default:{const b=`Unexpected token in block scalar header: ${O.type}`;l(O,"UNEXPECTED_TOKEN",b);const S=O.source;S&&typeof S=="string"&&(k+=S.length)}}}return{mode:u,indent:d,chomp:h,comment:x,length:k}}function Ny(i){const n=i.split(/\n( *)/),r=n[0],l=r.match(/^( *)/),u=[l!=null&&l[1]?[l[1],r.slice(l[1].length)]:["",r]];for(let d=1;d<n.length;d+=2)u.push([n[d],n[d+1]]);return u}function Cy(i,n,r){const{offset:l,type:a,source:u,end:d}=i;let h,y;const g=(E,O,b)=>r(l+E,O,b);switch(a){case"scalar":h=ve.PLAIN,y=Ey(u,g);break;case"single-quoted-scalar":h=ve.QUOTE_SINGLE,y=Oy(u,g);break;case"double-quoted-scalar":h=ve.QUOTE_DOUBLE,y=Ty(u,g);break;default:return r(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[l,l+u.length,l+u.length]}}const x=l+u.length,k=bi(d,x,n,r);return{value:y,type:h,comment:k.comment,range:[l,x,k.offset]}}function Ey(i,n){let r="";switch(i[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${i[0]}`;break}case"@":case"`":{r=`reserved character ${i[0]}`;break}}return r&&n(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Cp(i)}function Oy(i,n){return(i[i.length-1]!=="'"||i.length===1)&&n(i.length,"MISSING_CHAR","Missing closing 'quote"),Cp(i.slice(1,-1)).replace(/''/g,"'")}function Cp(i){let n,r;try{n=new RegExp(`(.*?)(?<![ ])[ ]*\r?
249
249
  `,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
250
250
  `,"sy")}catch{n=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let l=n.exec(i);if(!l)return i;let a=l[1],u=" ",d=n.lastIndex;for(r.lastIndex=d;l=r.exec(i);)l[1]===""?u===`
251
251
  `?a+=u:u=`
@@ -260,40 +260,40 @@ ${g}
260
260
  `);)l===`
261
261
  `&&(r+=`
262
262
  `),n+=1,l=i[n+1];return r||(r=" "),{fold:r,offset:n}}const Iy={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
263
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Ly(i,n,r,l){const a=i.substr(n,r),d=a.length===r&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;if(isNaN(d)){const h=i.substr(n-2,r+2);return l(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${h}`),h}return String.fromCodePoint(d)}function Ep(i,n,r,l){const{value:a,type:u,comment:d,range:h}=n.type==="block-scalar"?jy(i,n,l):Cy(n,i.options.strict,l),y=r?i.directives.tagName(r.source,k=>l(r,"TAG_RESOLVE_FAILED",k)):null;let g;i.options.stringKeys&&i.atKey?g=i.schema[dn]:y?g=Ay(i.schema,a,y,r,l):n.type==="scalar"?g=Py(i,a,n,l):g=i.schema[dn];let x;try{const k=g.resolve(a,E=>l(r??n,"TAG_RESOLVE_FAILED",E),i.options);x=be(k)?k:new ve(k)}catch(k){const E=k instanceof Error?k.message:String(k);l(r??n,"TAG_RESOLVE_FAILED",E),x=new ve(a)}return x.range=h,x.source=a,u&&(x.type=u),y&&(x.tag=y),g.format&&(x.format=g.format),d&&(x.comment=d),x}function Ay(i,n,r,l,a){var h;if(r==="!")return i[dn];const u=[];for(const y of i.tags)if(!y.collection&&y.tag===r)if(y.default&&y.test)u.push(y);else return y;for(const y of u)if((h=y.test)!=null&&h.test(n))return y;const d=i.knownTags[r];return d&&!d.collection?(i.tags.push(Object.assign({},d,{default:!1,test:void 0})),d):(a(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),i[dn])}function Py({atKey:i,directives:n,schema:r},l,a,u){const d=r.tags.find(h=>{var y;return(h.default===!0||i&&h.default==="key")&&((y=h.test)==null?void 0:y.test(l))})||r[dn];if(r.compat){const h=r.compat.find(y=>{var g;return y.default&&((g=y.test)==null?void 0:g.test(l))})??r[dn];if(d.tag!==h.tag){const y=n.tagString(d.tag),g=n.tagString(h.tag),x=`Value may be parsed as either ${y} or ${g}`;u(a,"TAG_RESOLVE_FAILED",x,!0)}}return d}function by(i,n,r){if(n){r??(r=n.length);for(let l=r-1;l>=0;--l){let a=n[l];switch(a.type){case"space":case"comment":case"newline":i-=a.source.length;continue}for(a=n[++l];(a==null?void 0:a.type)==="space";)i+=a.source.length,a=n[++l];break}}return i}const My={composeNode:Op,composeEmptyNode:Hu};function Op(i,n,r,l){const a=i.atKey,{spaceBefore:u,comment:d,anchor:h,tag:y}=r;let g,x=!0;switch(n.type){case"alias":g=Ry(i,n,l),(h||y)&&l(n,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=Ep(i,n,y,l),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{g=Sy(My,i,n,r,l),h&&(g.anchor=h.source.substring(1))}catch(k){const E=k instanceof Error?k.message:String(k);l(n,"RESOURCE_EXHAUSTION",E)}break;default:{const k=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;l(n,"UNEXPECTED_TOKEN",k),x=!1}}return g??(g=Hu(i,n.offset,void 0,null,r,l)),h&&g.anchor===""&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),a&&i.options.stringKeys&&(!be(g)||typeof g.value!="string"||g.tag&&g.tag!=="tag:yaml.org,2002:str")&&l(y??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),u&&(g.spaceBefore=!0),d&&(n.type==="scalar"&&n.source===""?g.comment=d:g.commentBefore=d),i.options.keepSourceTokens&&x&&(g.srcToken=n),g}function Hu(i,n,r,l,{spaceBefore:a,comment:u,anchor:d,tag:h,end:y},g){const x={type:"scalar",offset:by(n,r,l),indent:-1,source:""},k=Ep(i,x,h,g);return d&&(k.anchor=d.source.substring(1),k.anchor===""&&g(d,"BAD_ALIAS","Anchor cannot be an empty string")),a&&(k.spaceBefore=!0),u&&(k.comment=u,k.range[2]=y),k}function Ry({options:i},{offset:n,source:r,end:l},a){const u=new bu(r.substring(1));u.source===""&&a(n,"BAD_ALIAS","Alias cannot be an empty string"),u.source.endsWith(":")&&a(n+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const d=n+r.length,h=Pi(l,d,i.strict,a);return u.range=[n,d,h.offset],h.comment&&(u.comment=h.comment),u}function $y(i,n,{offset:r,start:l,value:a,end:u},d){const h=Object.assign({_directives:n},i),y=new go(void 0,h),g={atKey:!1,atRoot:!0,directives:y.directives,options:y.options,schema:y.schema},x=ws(l,{indicator:"doc-start",next:a??(u==null?void 0:u[0]),offset:r,onError:d,parentIndent:0,startOnNewline:!0});x.found&&(y.directives.docStart=!0,a&&(a.type==="block-map"||a.type==="block-seq")&&!x.hasNewline&&d(x.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),y.contents=a?Op(g,a,x,d):Hu(g,x.end,l,null,x,d);const k=y.contents.range[2],E=Pi(u,k,!1,d);return E.comment&&(y.comment=E.comment),y.range=[r,k,E.offset],y}function hi(i){if(typeof i=="number")return[i,i+1];if(Array.isArray(i))return i.length===2?i:[i[0],i[1]];const{offset:n,source:r}=i;return[n,n+(typeof r=="string"?r.length:1)]}function bd(i){var a;let n="",r=!1,l=!1;for(let u=0;u<i.length;++u){const d=i[u];switch(d[0]){case"#":n+=(n===""?"":l?`
263
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Ly(i,n,r,l){const a=i.substr(n,r),d=a.length===r&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;if(isNaN(d)){const h=i.substr(n-2,r+2);return l(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${h}`),h}return String.fromCodePoint(d)}function Ep(i,n,r,l){const{value:a,type:u,comment:d,range:h}=n.type==="block-scalar"?jy(i,n,l):Cy(n,i.options.strict,l),y=r?i.directives.tagName(r.source,k=>l(r,"TAG_RESOLVE_FAILED",k)):null;let g;i.options.stringKeys&&i.atKey?g=i.schema[dn]:y?g=Ay(i.schema,a,y,r,l):n.type==="scalar"?g=Py(i,a,n,l):g=i.schema[dn];let x;try{const k=g.resolve(a,E=>l(r??n,"TAG_RESOLVE_FAILED",E),i.options);x=be(k)?k:new ve(k)}catch(k){const E=k instanceof Error?k.message:String(k);l(r??n,"TAG_RESOLVE_FAILED",E),x=new ve(a)}return x.range=h,x.source=a,u&&(x.type=u),y&&(x.tag=y),g.format&&(x.format=g.format),d&&(x.comment=d),x}function Ay(i,n,r,l,a){var h;if(r==="!")return i[dn];const u=[];for(const y of i.tags)if(!y.collection&&y.tag===r)if(y.default&&y.test)u.push(y);else return y;for(const y of u)if((h=y.test)!=null&&h.test(n))return y;const d=i.knownTags[r];return d&&!d.collection?(i.tags.push(Object.assign({},d,{default:!1,test:void 0})),d):(a(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),i[dn])}function Py({atKey:i,directives:n,schema:r},l,a,u){const d=r.tags.find(h=>{var y;return(h.default===!0||i&&h.default==="key")&&((y=h.test)==null?void 0:y.test(l))})||r[dn];if(r.compat){const h=r.compat.find(y=>{var g;return y.default&&((g=y.test)==null?void 0:g.test(l))})??r[dn];if(d.tag!==h.tag){const y=n.tagString(d.tag),g=n.tagString(h.tag),x=`Value may be parsed as either ${y} or ${g}`;u(a,"TAG_RESOLVE_FAILED",x,!0)}}return d}function by(i,n,r){if(n){r??(r=n.length);for(let l=r-1;l>=0;--l){let a=n[l];switch(a.type){case"space":case"comment":case"newline":i-=a.source.length;continue}for(a=n[++l];(a==null?void 0:a.type)==="space";)i+=a.source.length,a=n[++l];break}}return i}const My={composeNode:Op,composeEmptyNode:Hu};function Op(i,n,r,l){const a=i.atKey,{spaceBefore:u,comment:d,anchor:h,tag:y}=r;let g,x=!0;switch(n.type){case"alias":g=Ry(i,n,l),(h||y)&&l(n,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=Ep(i,n,y,l),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{g=Sy(My,i,n,r,l),h&&(g.anchor=h.source.substring(1))}catch(k){const E=k instanceof Error?k.message:String(k);l(n,"RESOURCE_EXHAUSTION",E)}break;default:{const k=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;l(n,"UNEXPECTED_TOKEN",k),x=!1}}return g??(g=Hu(i,n.offset,void 0,null,r,l)),h&&g.anchor===""&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),a&&i.options.stringKeys&&(!be(g)||typeof g.value!="string"||g.tag&&g.tag!=="tag:yaml.org,2002:str")&&l(y??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),u&&(g.spaceBefore=!0),d&&(n.type==="scalar"&&n.source===""?g.comment=d:g.commentBefore=d),i.options.keepSourceTokens&&x&&(g.srcToken=n),g}function Hu(i,n,r,l,{spaceBefore:a,comment:u,anchor:d,tag:h,end:y},g){const x={type:"scalar",offset:by(n,r,l),indent:-1,source:""},k=Ep(i,x,h,g);return d&&(k.anchor=d.source.substring(1),k.anchor===""&&g(d,"BAD_ALIAS","Anchor cannot be an empty string")),a&&(k.spaceBefore=!0),u&&(k.comment=u,k.range[2]=y),k}function Ry({options:i},{offset:n,source:r,end:l},a){const u=new bu(r.substring(1));u.source===""&&a(n,"BAD_ALIAS","Alias cannot be an empty string"),u.source.endsWith(":")&&a(n+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const d=n+r.length,h=bi(l,d,i.strict,a);return u.range=[n,d,h.offset],h.comment&&(u.comment=h.comment),u}function $y(i,n,{offset:r,start:l,value:a,end:u},d){const h=Object.assign({_directives:n},i),y=new vo(void 0,h),g={atKey:!1,atRoot:!0,directives:y.directives,options:y.options,schema:y.schema},x=ws(l,{indicator:"doc-start",next:a??(u==null?void 0:u[0]),offset:r,onError:d,parentIndent:0,startOnNewline:!0});x.found&&(y.directives.docStart=!0,a&&(a.type==="block-map"||a.type==="block-seq")&&!x.hasNewline&&d(x.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),y.contents=a?Op(g,a,x,d):Hu(g,x.end,l,null,x,d);const k=y.contents.range[2],E=bi(u,k,!1,d);return E.comment&&(y.comment=E.comment),y.range=[r,k,E.offset],y}function mi(i){if(typeof i=="number")return[i,i+1];if(Array.isArray(i))return i.length===2?i:[i[0],i[1]];const{offset:n,source:r}=i;return[n,n+(typeof r=="string"?r.length:1)]}function bd(i){var a;let n="",r=!1,l=!1;for(let u=0;u<i.length;++u){const d=i[u];switch(d[0]){case"#":n+=(n===""?"":l?`
264
264
 
265
265
  `:`
266
- `)+(d.substring(1)||" "),r=!0,l=!1;break;case"%":((a=i[u+1])==null?void 0:a[0])!=="#"&&(u+=1),r=!1;break;default:r||(l=!0),r=!1}}return{comment:n,afterEmptyLine:l}}class Dy{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,l,a,u)=>{const d=hi(r);u?this.warnings.push(new gy(d,l,a)):this.errors.push(new yi(d,l,a))},this.directives=new vt({version:n.version||"1.2"}),this.options=n}decorate(n,r){const{comment:l,afterEmptyLine:a}=bd(this.prelude);if(l){const u=n.contents;if(r)n.comment=n.comment?`${n.comment}
266
+ `)+(d.substring(1)||" "),r=!0,l=!1;break;case"%":((a=i[u+1])==null?void 0:a[0])!=="#"&&(u+=1),r=!1;break;default:r||(l=!0),r=!1}}return{comment:n,afterEmptyLine:l}}class Dy{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,l,a,u)=>{const d=mi(r);u?this.warnings.push(new gy(d,l,a)):this.errors.push(new gi(d,l,a))},this.directives=new vt({version:n.version||"1.2"}),this.options=n}decorate(n,r){const{comment:l,afterEmptyLine:a}=bd(this.prelude);if(l){const u=n.contents;if(r)n.comment=n.comment?`${n.comment}
267
267
  ${l}`:l;else if(a||n.directives.docStart||!u)n.commentBefore=l;else if(qe(u)&&!u.flow&&u.items.length>0){let d=u.items[0];We(d)&&(d=d.key);const h=d.commentBefore;d.commentBefore=h?`${l}
268
268
  ${h}`:l}else{const d=u.commentBefore;u.commentBefore=d?`${l}
269
- ${d}`:l}}r?(Array.prototype.push.apply(n.errors,this.errors),Array.prototype.push.apply(n.warnings,this.warnings)):(n.errors=this.errors,n.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:bd(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(n,r=!1,l=-1){for(const a of n)yield*this.next(a);yield*this.end(r,l)}*next(n){switch(n.type){case"directive":this.directives.add(n.source,(r,l,a)=>{const u=hi(n);u[0]+=r,this.onError(u,"BAD_DIRECTIVE",l,a)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{const r=$y(this.options,this.directives,n,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(n,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(n.source);break;case"error":{const r=n.source?`${n.message}: ${JSON.stringify(n.source)}`:n.message,l=new yi(hi(n),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(l):this.doc.errors.push(l);break}case"doc-end":{if(!this.doc){const l="Unexpected doc-end without preceding document";this.errors.push(new yi(hi(n),"UNEXPECTED_TOKEN",l));break}this.doc.directives.docEnd=!0;const r=Pi(n.end,n.offset+n.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){const l=this.doc.comment;this.doc.comment=l?`${l}
270
- ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new yi(hi(n),"UNEXPECTED_TOKEN",`Unsupported token ${n.type}`))}}*end(n=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(n){const l=Object.assign({_directives:this.directives},this.options),a=new go(void 0,l);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),a.range=[0,r,r],this.decorate(a,!1),yield a}}}const Tp="\uFEFF",_p="",Ip="",Cu="";function zy(i){switch(i){case Tp:return"byte-order-mark";case _p:return"doc-mode";case Ip:return"flow-error-end";case Cu:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
269
+ ${d}`:l}}r?(Array.prototype.push.apply(n.errors,this.errors),Array.prototype.push.apply(n.warnings,this.warnings)):(n.errors=this.errors,n.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:bd(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(n,r=!1,l=-1){for(const a of n)yield*this.next(a);yield*this.end(r,l)}*next(n){switch(n.type){case"directive":this.directives.add(n.source,(r,l,a)=>{const u=mi(n);u[0]+=r,this.onError(u,"BAD_DIRECTIVE",l,a)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{const r=$y(this.options,this.directives,n,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(n,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(n.source);break;case"error":{const r=n.source?`${n.message}: ${JSON.stringify(n.source)}`:n.message,l=new gi(mi(n),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(l):this.doc.errors.push(l);break}case"doc-end":{if(!this.doc){const l="Unexpected doc-end without preceding document";this.errors.push(new gi(mi(n),"UNEXPECTED_TOKEN",l));break}this.doc.directives.docEnd=!0;const r=bi(n.end,n.offset+n.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){const l=this.doc.comment;this.doc.comment=l?`${l}
270
+ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new gi(mi(n),"UNEXPECTED_TOKEN",`Unsupported token ${n.type}`))}}*end(n=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(n){const l=Object.assign({_directives:this.directives},this.options),a=new vo(void 0,l);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),a.range=[0,r,r],this.decorate(a,!1),yield a}}}const Tp="\uFEFF",_p="",Ip="",Cu="";function zy(i){switch(i){case Tp:return"byte-order-mark";case _p:return"doc-mode";case Ip:return"flow-error-end";case Cu:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
271
271
  `:case`\r
272
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(i[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function tn(i){switch(i){case void 0:case" ":case`
272
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(i[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function nn(i){switch(i){case void 0:case" ":case`
273
273
  `:case"\r":case" ":return!0;default:return!1}}const Md=new Set("0123456789ABCDEFabcdef"),By=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Hl=new Set(",[]{}"),Uy=new Set(` ,[]{}
274
- \r `),fu=i=>!i||Uy.has(i);class Fy{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(n,r=!1){if(n){if(typeof n!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+n:n,this.lineEndPos=null}this.atEnd=!r;let l=this.next??"stream";for(;l&&(r||this.hasChars(1));)l=yield*this.parseNext(l)}atLineEnd(){let n=this.pos,r=this.buffer[n];for(;r===" "||r===" ";)r=this.buffer[++n];return!r||r==="#"||r===`
274
+ \r `),du=i=>!i||Uy.has(i);class Fy{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(n,r=!1){if(n){if(typeof n!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+n:n,this.lineEndPos=null}this.atEnd=!r;let l=this.next??"stream";for(;l&&(r||this.hasChars(1));)l=yield*this.parseNext(l)}atLineEnd(){let n=this.pos,r=this.buffer[n];for(;r===" "||r===" ";)r=this.buffer[++n];return!r||r==="#"||r===`
275
275
  `?!0:r==="\r"?this.buffer[n+1]===`
276
276
  `:!1}charAt(n){return this.buffer[this.pos+n]}continueScalar(n){let r=this.buffer[n];if(this.indentNext>0){let l=0;for(;r===" ";)r=this.buffer[++l+n];if(r==="\r"){const a=this.buffer[l+n+1];if(a===`
277
277
  `||!a&&!this.atEnd)return n+l+1}return r===`
278
- `||l>=this.indentNext||!r&&!this.atEnd?n+l:-1}if(r==="-"||r==="."){const l=this.buffer.substr(n,3);if((l==="---"||l==="...")&&tn(this.buffer[n+3]))return-1}return n}getLine(){let n=this.lineEndPos;return(typeof n!="number"||n!==-1&&n<this.pos)&&(n=this.buffer.indexOf(`
279
- `,this.pos),this.lineEndPos=n),n===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[n-1]==="\r"&&(n-=1),this.buffer.substring(this.pos,n))}hasChars(n){return this.pos+n<=this.buffer.length}setNext(n){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=n,null}peek(n){return this.buffer.substr(this.pos,n)}*parseNext(n){switch(n){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let n=this.getLine();if(n===null)return this.setNext("stream");if(n[0]===Tp&&(yield*this.pushCount(1),n=n.substring(1)),n[0]==="%"){let r=n.length,l=n.indexOf("#");for(;l!==-1;){const u=n[l-1];if(u===" "||u===" "){r=l-1;break}else l=n.indexOf("#",l+1)}for(;;){const u=n[r-1];if(u===" "||u===" ")r-=1;else break}const a=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(n.length-a),this.pushNewline(),"stream"}if(this.atLineEnd()){const r=yield*this.pushSpaces(!0);return yield*this.pushCount(n.length-r),yield*this.pushNewline(),"stream"}return yield _p,yield*this.parseLineStart()}*parseLineStart(){const n=this.charAt(0);if(!n&&!this.atEnd)return this.setNext("line-start");if(n==="-"||n==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const r=this.peek(3);if((r==="---"||r==="...")&&tn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!tn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[n,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((n==="-"||n==="?"||n===":")&&tn(r)){const l=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=l,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const n=this.getLine();if(n===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(n[r]){case"#":yield*this.pushCount(n.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(fu),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(n.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,r,l=-1;do n=yield*this.pushNewline(),n>0?(r=yield*this.pushSpaces(!1),this.indentValue=l=r):r=0,r+=yield*this.pushSpaces(!0);while(n+r>0);const a=this.getLine();if(a===null)return this.setNext("flow");if((l!==-1&&l<this.indentNext&&a[0]!=="#"||l===0&&(a.startsWith("---")||a.startsWith("..."))&&tn(a[3]))&&!(l===this.indentNext-1&&this.flowLevel===1&&(a[0]==="]"||a[0]==="}")))return this.flowLevel=0,yield Ip,yield*this.parseLineStart();let u=0;for(;a[u]===",";)u+=yield*this.pushCount(1),u+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(u+=yield*this.pushIndicators(),a[u]){case void 0:return"flow";case"#":return yield*this.pushCount(a.length-u),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(fu),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const d=this.charAt(1);if(this.flowKey||tn(d)||d===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const n=this.charAt(0);let r=this.buffer.indexOf(n,this.pos+1);if(n==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let u=0;for(;this.buffer[r-1-u]==="\\";)u+=1;if(u%2===0)break;r=this.buffer.indexOf('"',r+1)}const l=this.buffer.substring(0,r);let a=l.indexOf(`
278
+ `||l>=this.indentNext||!r&&!this.atEnd?n+l:-1}if(r==="-"||r==="."){const l=this.buffer.substr(n,3);if((l==="---"||l==="...")&&nn(this.buffer[n+3]))return-1}return n}getLine(){let n=this.lineEndPos;return(typeof n!="number"||n!==-1&&n<this.pos)&&(n=this.buffer.indexOf(`
279
+ `,this.pos),this.lineEndPos=n),n===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[n-1]==="\r"&&(n-=1),this.buffer.substring(this.pos,n))}hasChars(n){return this.pos+n<=this.buffer.length}setNext(n){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=n,null}peek(n){return this.buffer.substr(this.pos,n)}*parseNext(n){switch(n){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let n=this.getLine();if(n===null)return this.setNext("stream");if(n[0]===Tp&&(yield*this.pushCount(1),n=n.substring(1)),n[0]==="%"){let r=n.length,l=n.indexOf("#");for(;l!==-1;){const u=n[l-1];if(u===" "||u===" "){r=l-1;break}else l=n.indexOf("#",l+1)}for(;;){const u=n[r-1];if(u===" "||u===" ")r-=1;else break}const a=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(n.length-a),this.pushNewline(),"stream"}if(this.atLineEnd()){const r=yield*this.pushSpaces(!0);return yield*this.pushCount(n.length-r),yield*this.pushNewline(),"stream"}return yield _p,yield*this.parseLineStart()}*parseLineStart(){const n=this.charAt(0);if(!n&&!this.atEnd)return this.setNext("line-start");if(n==="-"||n==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const r=this.peek(3);if((r==="---"||r==="...")&&nn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!nn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[n,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((n==="-"||n==="?"||n===":")&&nn(r)){const l=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=l,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const n=this.getLine();if(n===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(n[r]){case"#":yield*this.pushCount(n.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(du),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(n.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,r,l=-1;do n=yield*this.pushNewline(),n>0?(r=yield*this.pushSpaces(!1),this.indentValue=l=r):r=0,r+=yield*this.pushSpaces(!0);while(n+r>0);const a=this.getLine();if(a===null)return this.setNext("flow");if((l!==-1&&l<this.indentNext&&a[0]!=="#"||l===0&&(a.startsWith("---")||a.startsWith("..."))&&nn(a[3]))&&!(l===this.indentNext-1&&this.flowLevel===1&&(a[0]==="]"||a[0]==="}")))return this.flowLevel=0,yield Ip,yield*this.parseLineStart();let u=0;for(;a[u]===",";)u+=yield*this.pushCount(1),u+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(u+=yield*this.pushIndicators(),a[u]){case void 0:return"flow";case"#":return yield*this.pushCount(a.length-u),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(du),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const d=this.charAt(1);if(this.flowKey||nn(d)||d===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const n=this.charAt(0);let r=this.buffer.indexOf(n,this.pos+1);if(n==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let u=0;for(;this.buffer[r-1-u]==="\\";)u+=1;if(u%2===0)break;r=this.buffer.indexOf('"',r+1)}const l=this.buffer.substring(0,r);let a=l.indexOf(`
280
280
  `,this.pos);if(a!==-1){for(;a!==-1;){const u=this.continueScalar(a+1);if(u===-1)break;a=l.indexOf(`
281
- `,u)}a!==-1&&(r=a-(l[a-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let n=this.pos;for(;;){const r=this.buffer[++n];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>tn(r)||r==="#")}*parseBlockScalar(){let n=this.pos-1,r=0,l;e:for(let u=this.pos;l=this.buffer[u];++u)switch(l){case" ":r+=1;break;case`
281
+ `,u)}a!==-1&&(r=a-(l[a-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let n=this.pos;for(;;){const r=this.buffer[++n];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>nn(r)||r==="#")}*parseBlockScalar(){let n=this.pos-1,r=0,l;e:for(let u=this.pos;l=this.buffer[u];++u)switch(l){case" ":r+=1;break;case`
282
282
  `:n=u,r=0;break;case"\r":{const d=this.buffer[u+1];if(!d&&!this.atEnd)return this.setNext("block-scalar");if(d===`
283
283
  `)break}default:break e}if(!l&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const u=this.continueScalar(n+1);if(u===-1)break;n=this.buffer.indexOf(`
284
284
  `,u)}while(n!==-1);if(n===-1){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let a=n+1;for(l=this.buffer[a];l===" ";)l=this.buffer[++a];if(l===" "){for(;l===" "||l===" "||l==="\r"||l===`
285
285
  `;)l=this.buffer[++a];n=a-1}else if(!this.blockScalarKeep)do{let u=n-1,d=this.buffer[u];d==="\r"&&(d=this.buffer[--u]);const h=u;for(;d===" ";)d=this.buffer[--u];if(d===`
286
- `&&u>=this.pos&&u+1+r>h)n=u;else break}while(!0);return yield Cu,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let r=this.pos-1,l=this.pos-1,a;for(;a=this.buffer[++l];)if(a===":"){const u=this.buffer[l+1];if(tn(u)||n&&Hl.has(u))break;r=l}else if(tn(a)){let u=this.buffer[l+1];if(a==="\r"&&(u===`
286
+ `&&u>=this.pos&&u+1+r>h)n=u;else break}while(!0);return yield Cu,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let r=this.pos-1,l=this.pos-1,a;for(;a=this.buffer[++l];)if(a===":"){const u=this.buffer[l+1];if(nn(u)||n&&Hl.has(u))break;r=l}else if(nn(a)){let u=this.buffer[l+1];if(a==="\r"&&(u===`
287
287
  `?(l+=1,a=`
288
288
  `,u=this.buffer[l+1]):r=l),u==="#"||n&&Hl.has(u))break;if(a===`
289
- `){const d=this.continueScalar(l+1);if(d===-1)break;l=Math.max(l,d-2)}}else{if(n&&Hl.has(a))break;r=l}return!a&&!this.atEnd?this.setNext("plain-scalar"):(yield Cu,yield*this.pushToIndex(r+1,!0),n?"flow":"doc")}*pushCount(n){return n>0?(yield this.buffer.substr(this.pos,n),this.pos+=n,n):0}*pushToIndex(n,r){const l=this.buffer.slice(this.pos,n);return l?(yield l,this.pos+=l.length,l.length):(r&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(fu))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const n=this.flowLevel>0,r=this.charAt(1);if(tn(r)||n&&Hl.has(r))return n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let n=this.pos+2,r=this.buffer[n];for(;!tn(r)&&r!==">";)r=this.buffer[++n];return yield*this.pushToIndex(r===">"?n+1:n,!1)}else{let n=this.pos+1,r=this.buffer[n];for(;r;)if(By.has(r))r=this.buffer[++n];else if(r==="%"&&Md.has(this.buffer[n+1])&&Md.has(this.buffer[n+2]))r=this.buffer[n+=3];else break;return yield*this.pushToIndex(n,!1)}}*pushNewline(){const n=this.buffer[this.pos];return n===`
289
+ `){const d=this.continueScalar(l+1);if(d===-1)break;l=Math.max(l,d-2)}}else{if(n&&Hl.has(a))break;r=l}return!a&&!this.atEnd?this.setNext("plain-scalar"):(yield Cu,yield*this.pushToIndex(r+1,!0),n?"flow":"doc")}*pushCount(n){return n>0?(yield this.buffer.substr(this.pos,n),this.pos+=n,n):0}*pushToIndex(n,r){const l=this.buffer.slice(this.pos,n);return l?(yield l,this.pos+=l.length,l.length):(r&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(du))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const n=this.flowLevel>0,r=this.charAt(1);if(nn(r)||n&&Hl.has(r))return n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let n=this.pos+2,r=this.buffer[n];for(;!nn(r)&&r!==">";)r=this.buffer[++n];return yield*this.pushToIndex(r===">"?n+1:n,!1)}else{let n=this.pos+1,r=this.buffer[n];for(;r;)if(By.has(r))r=this.buffer[++n];else if(r==="%"&&Md.has(this.buffer[n+1])&&Md.has(this.buffer[n+2]))r=this.buffer[n+=3];else break;return yield*this.pushToIndex(n,!1)}}*pushNewline(){const n=this.buffer[this.pos];return n===`
290
290
  `?yield*this.pushCount(1):n==="\r"&&this.charAt(1)===`
291
291
  `?yield*this.pushCount(2):0}*pushSpaces(n){let r=this.pos-1,l;do l=this.buffer[++r];while(l===" "||n&&l===" ");const a=r-this.pos;return a>0&&(yield this.buffer.substr(this.pos,a),this.pos=r),a}*pushUntil(n){let r=this.pos,l=this.buffer[r];for(;!n(l);)l=this.buffer[++r];return yield*this.pushToIndex(r,!1)}}class Vy{constructor(){this.lineStarts=[],this.addNewLine=n=>this.lineStarts.push(n),this.linePos=n=>{let r=0,l=this.lineStarts.length;for(;r<l;){const u=r+l>>1;this.lineStarts[u]<n?r=u+1:l=u}if(this.lineStarts[r]===n)return{line:r+1,col:1};if(r===0)return{line:0,col:n};const a=this.lineStarts[r-1];return{line:r,col:n-a+1}}}}function tr(i,n){for(let r=0;r<i.length;++r)if(i[r].type===n)return!0;return!1}function Rd(i){for(let n=0;n<i.length;++n)switch(i[n].type){case"space":case"comment":case"newline":break;default:return n}return-1}function Lp(i){switch(i==null?void 0:i.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Wl(i){switch(i.type){case"document":return i.start;case"block-map":{const n=i.items[i.items.length-1];return n.sep??n.start}case"block-seq":return i.items[i.items.length-1].start;default:return[]}}function us(i){var r;if(i.length===0)return[];let n=i.length;e:for(;--n>=0;)switch(i[n].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((r=i[++n])==null?void 0:r.type)==="space";);return i.splice(n,i.length)}function $d(i){if(i.start.type==="flow-seq-start")for(const n of i.items)n.sep&&!n.value&&!tr(n.start,"explicit-key-ind")&&!tr(n.sep,"map-value-ind")&&(n.key&&(n.value=n.key),delete n.key,Lp(n.value)?n.value.end?Array.prototype.push.apply(n.value.end,n.sep):n.value.end=n.sep:Array.prototype.push.apply(n.start,n.sep),delete n.sep)}class Ky{constructor(n){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Fy,this.onNewLine=n}*parse(n,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const l of this.lexer.lex(n,r))yield*this.next(l);r||(yield*this.end())}*next(n){if(this.source=n,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=n.length;return}const r=zy(n);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&n[0]===" "&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const l=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:l,source:n}),this.offset+=n.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const n=this.peek(1);if(this.type==="doc-end"&&(n==null?void 0:n.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!n)return yield*this.stream();switch(n.type){case"document":return yield*this.document(n);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(n);case"block-scalar":return yield*this.blockScalar(n);case"block-map":return yield*this.blockMap(n);case"block-seq":return yield*this.blockSequence(n);case"flow-collection":return yield*this.flowCollection(n);case"doc-end":return yield*this.documentEnd(n)}yield*this.pop()}peek(n){return this.stack[this.stack.length-n]}*pop(n){const r=n??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{const l=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in l?l.indent:0:r.type==="flow-collection"&&l.type==="document"&&(r.indent=0),r.type==="flow-collection"&&$d(r),l.type){case"document":l.value=r;break;case"block-scalar":l.props.push(r);break;case"block-map":{const a=l.items[l.items.length-1];if(a.value){l.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(a.sep)a.value=r;else{Object.assign(a,{key:r,sep:[]}),this.onKeyLine=!a.explicitKey;return}break}case"block-seq":{const a=l.items[l.items.length-1];a.value?l.items.push({start:[],value:r}):a.value=r;break}case"flow-collection":{const a=l.items[l.items.length-1];!a||a.value?l.items.push({start:[],key:r,sep:[]}):a.sep?a.value=r:Object.assign(a,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((l.type==="document"||l.type==="block-map"||l.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){const a=r.items[r.items.length-1];a&&!a.sep&&!a.value&&a.start.length>0&&Rd(a.start)===-1&&(r.indent===0||a.start.every(u=>u.type!=="comment"||u.indent<r.indent))&&(l.type==="document"?l.end=a.start:l.items.push({start:a.start}),r.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const n={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&n.start.push(this.sourceToken),this.stack.push(n);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(n){if(n.value)return yield*this.lineEnd(n);switch(this.type){case"doc-start":{Rd(n.start)!==-1?(yield*this.pop(),yield*this.step()):n.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":n.start.push(this.sourceToken);return}const r=this.startBlockValue(n);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(n){if(this.type==="map-value-ind"){const r=Wl(this.peek(2)),l=us(r);let a;n.end?(a=n.end,a.push(this.sourceToken),delete n.end):a=[this.sourceToken];const u={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:l,key:n,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(n)}*blockScalar(n){switch(this.type){case"space":case"comment":case"newline":n.props.push(this.sourceToken);return;case"scalar":if(n.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
292
292
  `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
293
293
  `,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(n){var l;const r=n.items[n.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){const a="end"in r.value?r.value.end:void 0,u=Array.isArray(a)?a[a.length-1]:void 0;(u==null?void 0:u.type)==="comment"?a==null||a.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)n.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,n.indent)){const a=n.items[n.items.length-2],u=(l=a==null?void 0:a.value)==null?void 0:l.end;if(Array.isArray(u)){Array.prototype.push.apply(u,r.start),u.push(this.sourceToken),n.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=n.indent){const a=!this.onKeyLine&&this.indent===n.indent,u=a&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind";let d=[];if(u&&r.sep&&!r.value){const h=[];for(let y=0;y<r.sep.length;++y){const g=r.sep[y];switch(g.type){case"newline":h.push(y);break;case"space":break;case"comment":g.indent>n.indent&&(h.length=0);break;default:h.length=0}}h.length>=2&&(d=r.sep.splice(h[1]))}switch(this.type){case"anchor":case"tag":u||r.value?(d.push(this.sourceToken),n.items.push({start:d}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):u||r.value?(d.push(this.sourceToken),n.items.push({start:d,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)n.items.push({start:[],key:null,sep:[this.sourceToken]});else if(tr(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:null,sep:[this.sourceToken]}]});else if(Lp(r.key)&&!tr(r.sep,"newline")){const h=us(r.start),y=r.key,g=r.sep;g.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:h,key:y,sep:g}]})}else d.length>0?r.sep=r.sep.concat(d,this.sourceToken):r.sep.push(this.sourceToken);else if(tr(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{const h=us(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:h,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||u?n.items.push({start:d,key:null,sep:[this.sourceToken]}):tr(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const h=this.flowScalar(this.type);u||r.value?(n.items.push({start:d,key:h,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(h):(Object.assign(r,{key:h,sep:[]}),this.onKeyLine=!0);return}default:{const h=this.startBlockValue(n);if(h){if(h.type==="block-seq"){if(!r.explicitKey&&r.sep&&!tr(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else a&&n.items.push({start:d});this.stack.push(h);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(n){var l;const r=n.items[n.items.length-1];switch(this.type){case"newline":if(r.value){const a="end"in r.value?r.value.end:void 0,u=Array.isArray(a)?a[a.length-1]:void 0;(u==null?void 0:u.type)==="comment"?a==null||a.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)n.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,n.indent)){const a=n.items[n.items.length-2],u=(l=a==null?void 0:a.value)==null?void 0:l.end;if(Array.isArray(u)){Array.prototype.push.apply(u,r.start),u.push(this.sourceToken),n.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=n.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==n.indent)break;r.value||tr(r.start,"seq-item-ind")?n.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>n.indent){const a=this.startBlockValue(n);if(a){this.stack.push(a);return}}yield*this.pop(),yield*this.step()}*flowCollection(n){const r=n.items[n.items.length-1];if(this.type==="flow-error-end"){let l;do yield*this.pop(),l=this.peek(1);while((l==null?void 0:l.type)==="flow-collection")}else if(n.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?n.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?n.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?n.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const a=this.flowScalar(this.type);!r||r.value?n.items.push({start:[],key:a,sep:[]}):r.sep?this.stack.push(a):Object.assign(r,{key:a,sep:[]});return}case"flow-map-end":case"flow-seq-end":n.end.push(this.sourceToken);return}const l=this.startBlockValue(n);l?this.stack.push(l):(yield*this.pop(),yield*this.step())}else{const l=this.peek(2);if(l.type==="block-map"&&(this.type==="map-value-ind"&&l.indent===n.indent||this.type==="newline"&&!l.items[l.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&l.type!=="flow-collection"){const a=Wl(l),u=us(a);$d(n);const d=n.end.splice(1,n.end.length);d.push(this.sourceToken);const h={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:u,key:n,sep:d}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=h}else yield*this.lineEnd(n)}}flowScalar(n){if(this.onNewLine){let r=this.source.indexOf(`
294
294
  `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
295
- `,r)+1}return{type:n,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(n){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const r=Wl(n),l=us(r);return l.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const r=Wl(n),l=us(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,r){return this.type!=="comment"||this.indent<=r?!1:n.every(l=>l.type==="newline"||l.type==="space")}*documentEnd(n){this.type!=="doc-mode"&&(n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(n){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function qy(i){const n=i.prettyErrors!==!1;return{lineCounter:i.lineCounter||n&&new Vy||null,prettyErrors:n}}function Hy(i,n={}){const{lineCounter:r,prettyErrors:l}=qy(n),a=new Ky(r==null?void 0:r.addNewLine),u=new Dy(n);let d=null;for(const h of u.compose(a.parse(i),!0,i.length))if(!d)d=h;else if(d.options.logLevel!=="silent"){d.errors.push(new yi(h.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return l&&r&&(d.errors.forEach(Ad(i,r)),d.warnings.forEach(Ad(i,r))),d}function Wy(i,n,r){let l;const a=Hy(i,r);if(!a)return null;if(a.warnings.forEach(u=>sp(a.options.logLevel,u)),a.errors.length>0){if(a.options.logLevel!=="silent")throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:l},r))}const Qy=new Set(["get","post","put","delete","patch","options","head"]);function Ap(i){const n=Gy(i);if(!n)throw new Error("请输入 API CLI 配置文本");let r;try{r=JSON.parse(n)}catch{r=Wy(n)}const l=r&&typeof r=="object"?r:{};return Qu(l.api??l.config??l.operation??r)}function Jy(){return Wu({method:"post",path:"/api/v1/example/{id}",summary:"创建示例",operationId:"createExample",tags:["示例","后台管理"],description:"接口用途、业务约束、鉴权说明等。",parameters:[{name:"id",location:"path",required:!0,type:"string",description:"示例 ID"}],requestBody:{required:!0,contentType:"application/json",fields:[{name:"name",type:"string",required:!0,description:"名称"},{name:"profile",type:"object",description:"扩展信息",children:[{name:"email",type:"string",description:"邮箱"}]}]},responses:[{status:"200",description:"OK",contentType:"application/json",fields:[{name:"data",type:"object",description:"响应数据",children:[{name:"id",type:"string",description:"记录 ID"}]}]}]})}function Wu(i){return JSON.stringify({api:Qu(i)})}function Qu(i){if(!i||typeof i!="object")throw new Error("接口配置不能为空");const n=i,r=rt(n.method).toLowerCase();if(!Qy.has(r))throw new Error("请选择有效的请求方法");const l=Zy(rt(n.path)),a=rt(n.summary);if(!l)throw new Error("接口路径不能为空");if(!a)throw new Error("接口名称不能为空");const u=ji(n.parameters).map(ro).filter(g=>g.name),d=n.requestBody&&typeof n.requestBody=="object"?n.requestBody:{},h=ji(d.fields).map(ro).filter(g=>g.name),y=ji(n.responses).map(Yy).filter(g=>g.status);return y.length||y.push({status:"200",description:"Success",contentType:"application/json",fields:[]}),{method:r,path:l,summary:a,description:rt(n.description),operationId:rt(n.operationId),tags:Xy(n.tags),parameters:u,requestBody:{required:!!d.required,contentType:rt(d.contentType)||"application/json",fields:h},responses:y}}function Yy(i){const n=i&&typeof i=="object"?i:{};return{status:rt(n.status)||"200",description:rt(n.description)||"Success",contentType:rt(n.contentType)||"application/json",fields:ji(n.fields).map(ro).filter(r=>r.name)}}function ro(i){const n=i&&typeof i=="object"?i:{},r=rt(n.location);return{name:rt(n.name),location:["query","path","header","cookie","body"].includes(r)?r:"query",required:!!n.required,type:rt(n.type)||"string",format:rt(n.format),description:rt(n.description),defaultValue:rt(n.defaultValue),enumValue:rt(n.enumValue),children:ji(n.children).map(ro).filter(l=>l.name)}}function Gy(i){return i.trim().replace(/^```(?:json|ya?ml|yaml)?\s*/i,"").replace(/```$/i,"").trim()}function Xy(i){return Array.isArray(i)?i.map(rt).filter(Boolean):rt(i).split(",").map(n=>n.trim()).filter(Boolean)}function Zy(i){return i?i.startsWith("/")?i:`/${i}`:""}function rt(i){return typeof i=="string"?i.trim():""}function ji(i){return Array.isArray(i)?i:[]}const eg="/api/openapi/import",tg="/api/openapi/document",ng="/api/openapi/auth-check",rg="/api/openapi/cache",sg="/api/openapi/versions",ig="/api/openapi/version-select",lg="/api/openapi/version-meta",og="/api/openapi/version-delete",ag="/api/openapi/version-export",ug="/api/mock/start",cg="/api/mock/status",fg="/api/openapi/custom-operation",dg="/api/openapi/custom-operation/delete",pg="/api/openapi/operation-links",hg="apiskill.swagger.syncedAt.v1",mg="apiskill.swagger.sourceUrl.v1",yg=["get","post","put","delete","patch","options","head"],gg=12;function vg(i){const n=i.paths??{};return Object.entries(n).flatMap(([r,l])=>yg.flatMap(a=>{var x;const u=l==null?void 0:l[a];if(!u)return[];const d=(x=u.tags)!=null&&x.length?u.tags:["未分组"],h=u.summary||u.description||"未命名接口",y=u.parameters??[],g=[a,r,h,u.description,u.operationId,d.join(" "),y.map(k=>`${k.name} ${k.description??""}`).join(" ")].filter(Boolean).join(" ").toLowerCase();return[{id:`${a.toUpperCase()} ${r}`,path:r,method:a,operation:u,tags:d,summary:h,hasBody:Ag(u),searchable:g}]})).sort((r,l)=>r.path.localeCompare(l.path)||r.method.localeCompare(l.method))}function wg(i){const n=new Map;return i.forEach(r=>{r.tags.forEach(l=>n.set(l,(n.get(l)??0)+1))}),[...n.entries()].map(([r,l])=>({name:r,count:l})).sort((r,l)=>l.count-r.count||r.name.localeCompare(l.name))}function xi(i){return i?decodeURIComponent(i.split("/").pop()??i):""}function At(i,n,r=new Set){var l;if(n){if(n.$ref){if(r.has(n.$ref))return{type:"object",description:`循环引用: ${xi(n.$ref)}`};r.add(n.$ref);const a=n.$ref.startsWith("#/")?n.$ref.slice(2).split("/").reduce((u,d)=>{if(u&&typeof u=="object")return u[decodeURIComponent(d)]},i):void 0;return At(i,a,r)}return(l=n.allOf)!=null&&l.length?kg(i,n.allOf,n):n}}function kg(i,n,r){return n.reduce((l,a)=>{const u=At(i,a)??{};return{...l,...u,description:[l.description,u.description].filter(Boolean).join(";")||l.description,required:[...new Set([...l.required??[],...u.required??[]])],properties:{...l.properties??{},...u.properties??{}}}},{...r,allOf:void 0})}function ps(i,n){var l,a,u;if(!n)return"-";if(n.$ref)return xi(n.$ref);const r=At(i,n)??n;if((l=r.enum)!=null&&l.length){const d=r.enum.map(Tr).join(" | ");return`${r.type??"enum"}<${d}>`}return r.type==="array"?`${ps(i,r.items)}[]`:(a=r.anyOf)!=null&&a.length?r.anyOf.map(d=>ps(i,d)).join(" | "):(u=r.oneOf)!=null&&u.length?r.oneOf.map(d=>ps(i,d)).join(" | "):r.additionalProperties&&typeof r.additionalProperties=="object"?`Record<string, ${ps(i,r.additionalProperties)}>`:[r.type,r.format].filter(Boolean).join(":")||"object"}function Or(i){var n;return((n=i==null?void 0:i.description)==null?void 0:n.trim())||""}function nr(i,n,r={}){var y;const l=r.depth??0;if(!n||l>gg)return[];if(n.$ref){if((y=r.seen)!=null&&y.has(n.$ref))return[{name:r.prefix||xi(n.$ref),path:r.prefix||xi(n.$ref),location:r.location,required:!1,type:xi(n.$ref),description:"循环引用,已停止展开",defaultValue:"",enumValue:"",depth:l}];const g=new Set(r.seen??[]);return g.add(n.$ref),nr(i,At(i,n),{...r,seen:g})}const a=At(i,n)??n,u=[],d=a.properties??{},h=a.required??r.requiredFields??[];if(a.type==="array"){const g=r.prefix||"[]";return u.push(du(i,g,g,a,!1,l,r.location)),u.push(...nr(i,a.items,{...r,prefix:`${g}[]`,depth:l+1})),u}return Object.keys(d).length===0?(r.prefix&&u.push(du(i,r.prefix.split(".").pop()??r.prefix,r.prefix,a,!1,l,r.location)),u):(Pg(d).forEach(([g,x])=>{const k=r.prefix?`${r.prefix}.${g}`:g,E=h.includes(g);u.push(du(i,g,k,x,E,l,r.location));const O=At(i,x)??x;if(O.type==="array"||!!(O.properties&&Object.keys(O.properties).length)||!!O.$ref){if(O.type==="array"){const S=O.items,I=At(i,S)??S;u.push(...nr(i,S,{...r,prefix:`${k}[]`,requiredFields:I==null?void 0:I.required,depth:l+1}));return}u.push(...nr(i,x,{...r,prefix:k,requiredFields:O.required,depth:l+1}))}}),u)}function Pp(i,n=[]){return Ti(n.filter(r=>r.in!=="body").map(r=>{var a;const l=bg(r);return{name:r.name,path:r.name,location:r.in,required:!!r.required,type:ps(i,l),description:r.description||Or(l)||"",defaultValue:(l==null?void 0:l.default)===void 0?"":Tr(l.default),enumValue:((a=l==null?void 0:l.enum)==null?void 0:a.map(Tr).join(", "))??"",depth:0}}))}function Sg(i,n){var d,h,y;const r=((d=n.requestBody)==null?void 0:d.content)??{},l=Object.fromEntries(Object.entries(r).map(([g,x])=>[g,Ti(nr(i,x.schema).map(k=>({...k,location:"body"})))]));if(Object.keys(l).length)return l;const a=(h=n.parameters)==null?void 0:h.find(g=>g.in==="body");if(!(a!=null&&a.schema))return{};const u=(y=n.consumes)!=null&&y.length?n.consumes:["application/json"];return Object.fromEntries(u.map(g=>[g,Ti(nr(i,a.schema).map(x=>({...x,location:"body"})))]))}function jg(i,n){const r=n.responses??{};return Object.fromEntries(Object.entries(r).map(([l,a])=>{var g;const u=a.content??{},d=Object.fromEntries(Object.entries(u).map(([x,k])=>[x,Ti(nr(i,k.schema).map(E=>({...E,location:`response ${l}`})))]));if(Object.keys(d).length)return[l,d];const h=a.schema??a.responseSchema;if(!h)return[l,{}];const y=(g=n.produces)!=null&&g.length?n.produces:["application/json"];return[l,Object.fromEntries(y.map(x=>[x,Ti(nr(i,h).map(k=>({...k,location:`response ${l}`})))]))]}))}function bp(i,n){const r=n.operation,l=Eg(r);return{method:n.method,path:n.path,summary:n.summary,description:r.description||"",operationId:r.operationId||"",tags:n.tags,parameters:Pp(i,r.parameters).map(Cg),requestBody:{required:(l==null?void 0:l.required)??!1,contentType:(l==null?void 0:l.contentType)||"application/json",fields:l!=null&&l.schema?ks(i,l.schema):[]},responses:Object.entries(r.responses??{}).map(([a,u])=>{const d=Og(r,u);return{status:a,description:u.description||"",contentType:(d==null?void 0:d.contentType)||"application/json",fields:d!=null&&d.schema?ks(i,d.schema):[]}})}}function xg(i,n){return Wu(bp(i,n))}function Ng(i){return JSON.stringify({method:i.method.toUpperCase(),path:i.path,tags:i.tags,summary:i.summary,operation:i.operation},null,2)}function Cg(i){return{name:i.path||i.name,location:Ig(i.location),required:i.required,type:Lg(i.type),description:i.description||"",defaultValue:i.defaultValue||"",enumValue:i.enumValue||""}}function Eg(i){var a,u,d,h,y;const n=((a=i.requestBody)==null?void 0:a.content)??{},r=Object.entries(n)[0];if(r!=null&&r[1].schema)return{required:!!((u=i.requestBody)!=null&&u.required),contentType:r[0],schema:r[1].schema};const l=(d=i.parameters)==null?void 0:d.find(g=>g.in==="body");if(l!=null&&l.schema)return{required:!!l.required,contentType:((h=i.consumes)==null?void 0:h.find(g=>g.includes("json")))??((y=i.consumes)==null?void 0:y[0])??"application/json",schema:l.schema}}function Og(i,n){var a,u;const r=Object.entries(n.content??{})[0];if(r!=null&&r[1].schema)return{contentType:r[0],schema:r[1].schema};const l=n.schema??n.responseSchema;if(l)return{contentType:((a=i.produces)==null?void 0:a.find(d=>d.includes("json")))??((u=i.produces)==null?void 0:u[0])??"application/json",schema:l}}function ks(i,n,r=new Set){const l=At(i,n)??n;if(n.$ref){if(r.has(n.$ref))return[];const a=new Set(r);return a.add(n.$ref),ks(i,l,a)}return l.type==="array"?[{name:"items",location:"body",type:"array",description:Or(n)||Or(l),children:l.items?ks(i,l.items,r):[]}]:Object.entries(l.properties??{}).map(([a,u])=>Tg(i,a,u,(l.required??[]).includes(a),r))}function Tg(i,n,r,l,a){var y;const u=At(i,r)??r,d=_g(i,r),h={name:n,location:"body",required:l,type:d,format:u.format||r.format||"",description:Or(r)||Or(u),defaultValue:u.default===void 0?"":Tr(u.default),enumValue:((y=u.enum)==null?void 0:y.map(Tr).join(", "))??""};if(d==="object"&&(h.children=r.$ref&&a.has(r.$ref)?[]:ks(i,u,Dd(r,a))),d==="array"){const g=u.items;h.children=g?ks(i,g,Dd(r,a)):[]}return h}function Dd(i,n){if(!i.$ref)return n;const r=new Set(n);return r.add(i.$ref),r}function _g(i,n){const r=At(i,n)??n;return r.type==="array"?"array":r.type==="object"||r.properties||n.$ref?"object":r.type==="integer"?"integer":r.type==="number"?"number":r.type==="boolean"?"boolean":"string"}function Ig(i){return i==="path"||i==="query"||i==="header"||i==="cookie"||i==="body"?i:"body"}function Lg(i){const n=i.toLowerCase();return n.includes("[]")||n.includes("array")?"array":n.includes("object")?"object":n.includes("integer")?"integer":n.includes("number")?"number":n.includes("boolean")?"boolean":"string"}function Ag(i){var n;return!!i.requestBody||!!((n=i.parameters)!=null&&n.some(r=>r.in==="body"))}function Pg(i){return Object.entries(i).sort(([n],[r])=>n.localeCompare(r,void 0,{sensitivity:"base"}))}function Ti(i){return[...i].sort((n,r)=>{const l=n.path||n.name,a=r.path||r.name;return l.localeCompare(a,void 0,{sensitivity:"base"})})}function bg(i){var n;if(i.schema)return i.schema;if(!(!i.type&&!i.format&&!i.items&&!((n=i.enum)!=null&&n.length)&&i.default===void 0))return{type:i.type,format:i.format,items:i.items,enum:i.enum,default:i.default,description:i.description}}function du(i,n,r,l,a,u,d){var y;const h=At(i,l)??l;return{name:n,path:r,location:d,required:a,type:ps(i,l),description:Or(l)||Or(h),defaultValue:h.default===void 0?"":Tr(h.default),enumValue:((y=h.enum)==null?void 0:y.map(Tr).join(", "))??"",depth:u}}function Tr(i){if(i==null)return"";if(typeof i=="string")return i;const n=JSON.stringify(i);return n===void 0?String(i):n}const Mg=["get","post","put","delete","patch","options","head"],Rg=["string","number","integer","boolean","array","object"],$g=["query","path","header","cookie"];function Dg({selectedVersionId:i,saving:n,initialConfig:r,onClose:l,onSave:a}){var Ne,ke,Ce,Ge,rn,sr;const u=A.useMemo(()=>r??Ap(Jy()),[r]),[d,h]=A.useState(u.method),[y,g]=A.useState(u.path),[x,k]=A.useState(u.summary),[E,O]=A.useState(u.operationId??""),[b,S]=A.useState((u.tags??[]).join(",")),[I,R]=A.useState(u.description??""),[H,F]=A.useState(!!((Ne=u.requestBody)!=null&&Ne.required)),[K,G]=A.useState(((ke=u.requestBody)==null?void 0:ke.contentType)||"application/json"),[Q,q]=A.useState((Ce=u.parameters)!=null&&Ce.length?u.parameters:[ht("query")]),[U,ae]=A.useState((rn=(Ge=u.requestBody)==null?void 0:Ge.fields)!=null&&rn.length?u.requestBody.fields:[ht("body")]),[D,Z]=A.useState((sr=u.responses)!=null&&sr.length?u.responses:[gi()]),[te,de]=A.useState(()=>Wu(u)),[Ie,_e]=A.useState(!1),[De,xe]=A.useState([]),W=A.useRef(!1),ne=A.useRef(null),X=r?"编辑当前接口":i?"追加到当前版本":"保存为新版本",C=A.useMemo(()=>Ug({method:d,path:y,summary:x,operationId:E,tags:b,description:I,requestBodyRequired:H,requestContentType:K,parameters:Q,bodyFields:U,responses:D}),[U,I,d,E,Q,y,H,K,D,x,b]);A.useEffect(()=>{if(W.current){W.current=!1;return}de(Fg(C))},[C]),A.useEffect(()=>{const Y=ne.current;if(!Y)return;const Se=window.getComputedStyle(Y),st=Number.parseFloat(Se.lineHeight)||18,Je=(Number.parseFloat(Se.paddingTop)||0)+(Number.parseFloat(Se.paddingBottom)||0)+(Number.parseFloat(Se.borderTopWidth)||0)+(Number.parseFloat(Se.borderBottomWidth)||0),it=st*3+Je,sn=st*16+Je;Y.style.height="auto",Y.style.height=`${Math.min(sn,Math.max(it,Y.scrollHeight))}px`},[te]);function M(Y){Y.preventDefault();const Se=zd(te);if(Se.errors.length){xe(Se.errors);return}xe([]),a(Se.config)}function he(Y){de(Y);const Se=zd(Y);Se.errors.length||(W.current=!0,xe([]),J(Se.config))}function J(Y){var Se,st,Je,it,sn,Tn;h(Y.method),g(Y.path),k(Y.summary),O(Y.operationId??""),S((Y.tags??[]).join(",")),R(Y.description??""),F(!!((Se=Y.requestBody)!=null&&Se.required)),G(((st=Y.requestBody)==null?void 0:st.contentType)||"application/json"),q((Je=Y.parameters)!=null&&Je.length?Y.parameters:[ht("query")]),ae((sn=(it=Y.requestBody)==null?void 0:it.fields)!=null&&sn.length?Y.requestBody.fields:[ht("body")]),Z((Tn=Y.responses)!=null&&Tn.length?Y.responses:[gi()])}function ye(){if(Kg(te,ne.current)){pe();return}navigator.clipboard.writeText(te).then(pe).catch(()=>{})}function pe(){_e(!0),window.setTimeout(()=>_e(!1),1600)}return p.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"add-api-title",children:p.jsxs("form",{className:"api-config-dialog",onSubmit:M,noValidate:!0,children:[p.jsxs("div",{className:"import-dialog-header",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow",children:"Manual API Config"}),p.jsx("h2",{id:"add-api-title",children:r?"编辑API配置":"新增API配置"})]}),p.jsx("span",{className:"import-badge running",children:X})]}),p.jsxs("div",{className:"api-config-body",children:[De.length?p.jsx(zg,{errors:De}):null,p.jsxs("section",{className:"api-config-section",children:[p.jsxs("div",{className:"section-title-row",children:[p.jsxs("div",{children:[p.jsx("h3",{children:"CLI配置"}),p.jsx("p",{children:"支持紧凑 JSON 或 YAML。CLI 与下方表单保持联动,粘贴有效配置后会自动同步表单。"})]}),p.jsxs("button",{type:"button",className:"secondary-button",onClick:ye,children:[Ie?p.jsx(Ni,{size:15}):p.jsx(wi,{size:15}),Ie?"已复制":"复制"]})]}),p.jsx("textarea",{ref:ne,className:"api-cli-editor",value:te,onChange:Y=>he(Y.target.value),rows:3,spellCheck:!1})]}),p.jsxs("section",{className:"api-config-section",children:[p.jsxs("div",{className:"section-title-row",children:[p.jsx("h3",{children:"基础信息"}),p.jsx("code",{children:i||"manual-new-version"})]}),p.jsxs("div",{className:"api-config-grid",children:[p.jsxs("label",{children:[p.jsx("span",{children:"方法 *"}),p.jsx("select",{value:d,onChange:Y=>h(Y.target.value),children:Mg.map(Y=>p.jsx("option",{value:Y,children:Y.toUpperCase()},Y))})]}),p.jsxs("label",{className:"span-2",children:[p.jsx("span",{children:"路径 *"}),p.jsx("input",{value:y,onChange:Y=>g(Y.target.value),placeholder:"/api/v1/example/{id}"})]}),p.jsxs("label",{children:[p.jsx("span",{children:"接口名称 *"}),p.jsx("input",{value:x,onChange:Y=>k(Y.target.value),placeholder:"查询示例详情"})]}),p.jsxs("label",{children:[p.jsx("span",{children:"Operation ID"}),p.jsx("input",{value:E,onChange:Y=>O(Y.target.value),placeholder:"getExampleDetail"})]}),p.jsxs("label",{children:[p.jsx("span",{children:"分组 Tags"}),p.jsx("input",{value:b,onChange:Y=>S(Y.target.value),placeholder:"示例,后台管理"})]}),p.jsxs("label",{className:"span-all",children:[p.jsx("span",{children:"说明"}),p.jsx("textarea",{value:I,onChange:Y=>R(Y.target.value),placeholder:"接口用途、业务约束、注意事项"})]})]})]}),p.jsx(Bg,{title:"参数",description:"用于 path / query / header / cookie 参数。body 字段请放到请求体。",fields:Q,allowLocation:!0,onAdd:()=>q([...Q,ht("query")]),onChange:(Y,Se)=>q(fn(Q,Y,Se)),onRemove:Y=>q(vi(Q,Y,ht("query")))}),p.jsxs("section",{className:"api-config-section",children:[p.jsxs("div",{className:"section-title-row",children:[p.jsxs("div",{children:[p.jsx("h3",{children:"请求体"}),p.jsx("p",{children:"对象字段可以展开配置子字段,也支持用点号声明嵌套字段,例如 user.name。"})]}),p.jsxs("label",{className:"inline-check",children:[p.jsx("input",{type:"checkbox",checked:H,onChange:Y=>F(Y.target.checked)}),"必填"]})]}),p.jsx("div",{className:"api-config-grid compact",children:p.jsxs("label",{children:[p.jsx("span",{children:"Content-Type"}),p.jsx("input",{value:K,onChange:Y=>G(Y.target.value)})]})}),p.jsx(so,{fields:U,onAdd:()=>ae([...U,ht("body")]),onChange:(Y,Se)=>ae(fn(U,Y,{...Se,location:"body"})),onRemove:Y=>ae(vi(U,Y,ht("body")))})]}),p.jsxs("section",{className:"api-config-section",children:[p.jsxs("div",{className:"section-title-row",children:[p.jsxs("div",{children:[p.jsx("h3",{children:"响应"}),p.jsx("p",{children:"每个状态码可配置一组响应字段,保存时会写入 OpenAPI responses。"})]}),p.jsxs("button",{type:"button",className:"secondary-button",onClick:()=>Z([...D,gi()]),children:[p.jsx(io,{size:15}),"状态码"]})]}),D.map((Y,Se)=>{var st;return p.jsxs("div",{className:"response-config",children:[p.jsxs("div",{className:"api-config-grid compact",children:[p.jsxs("label",{children:[p.jsx("span",{children:"状态码 *"}),p.jsx("input",{value:Y.status,onChange:Je=>Z(fn(D,Se,{...Y,status:Je.target.value}))})]}),p.jsxs("label",{children:[p.jsx("span",{children:"描述"}),p.jsx("input",{value:Y.description??"",onChange:Je=>Z(fn(D,Se,{...Y,description:Je.target.value}))})]}),p.jsxs("label",{children:[p.jsx("span",{children:"Content-Type"}),p.jsx("input",{value:Y.contentType??"application/json",onChange:Je=>Z(fn(D,Se,{...Y,contentType:Je.target.value}))})]}),p.jsx("button",{type:"button",className:"icon-danger-button",onClick:()=>Z(vi(D,Se,gi())),children:p.jsx(lo,{size:15})})]}),p.jsx(so,{fields:(st=Y.fields)!=null&&st.length?Y.fields:[ht("body")],onAdd:()=>Z(fn(D,Se,{...Y,fields:[...Y.fields??[],ht("body")]})),onChange:(Je,it)=>Z(fn(D,Se,{...Y,fields:fn(Y.fields??[],Je,{...it,location:"body"})})),onRemove:Je=>Z(fn(D,Se,{...Y,fields:vi(Y.fields??[],Je,ht("body"))}))})]},`response-${Se}`)})]})]}),p.jsxs("div",{className:"import-dialog-actions",children:[p.jsx("button",{className:"secondary-button",type:"button",onClick:l,disabled:n,children:"取消"}),p.jsxs("button",{className:"primary-button",type:"submit",disabled:n,children:[p.jsx(Rm,{size:16}),n?"保存中":"保存"]})]})]})})}function zg({errors:i}){return p.jsxs("div",{className:"api-config-errors",children:[p.jsx(Ci,{size:17}),p.jsxs("div",{children:[p.jsx("strong",{children:"请补全必填配置"}),i.map(n=>p.jsx("p",{children:n},n))]})]})}function Bg({title:i,description:n,fields:r,allowLocation:l,onAdd:a,onChange:u,onRemove:d}){return p.jsxs("section",{className:"api-config-section",children:[p.jsxs("div",{className:"section-title-row",children:[p.jsxs("div",{children:[p.jsx("h3",{children:i}),p.jsx("p",{children:n})]}),p.jsxs("button",{type:"button",className:"secondary-button",onClick:a,children:[p.jsx(io,{size:15}),"字段"]})]}),p.jsx(so,{fields:r,allowLocation:l,onAdd:a,onChange:u,onRemove:d})]})}function so({fields:i,allowLocation:n,onAdd:r,onChange:l,onRemove:a}){return p.jsxs("div",{className:"field-config-table",children:[p.jsxs("div",{className:`field-config-head ${n?"with-location":""}`,children:[n?p.jsx("span",{children:"位置"}):null,p.jsx("span",{children:"字段名"}),p.jsx("span",{children:"类型"}),p.jsx("span",{children:"必填"}),p.jsx("span",{children:"说明"}),p.jsx("span",{children:"枚举"}),p.jsx("span",{})]}),i.map((u,d)=>{var h;return p.jsxs("div",{className:"field-config-item",children:[p.jsxs("div",{className:`field-config-row ${n?"with-location":""}`,children:[n?p.jsx("select",{value:u.location??"query",onChange:y=>l(d,{...u,location:y.target.value}),children:$g.map(y=>p.jsx("option",{value:y,children:y},y))}):null,p.jsx("input",{value:u.name,onChange:y=>l(d,{...u,name:y.target.value}),placeholder:"id / user.name"}),p.jsx("select",{value:u.type||"string",onChange:y=>l(d,qg(u,y.target.value)),children:Rg.map(y=>p.jsx("option",{value:y,children:y},y))}),p.jsx("label",{className:"field-check",children:p.jsx("input",{type:"checkbox",checked:!!u.required,onChange:y=>l(d,{...u,required:y.target.checked})})}),p.jsx("input",{value:u.description??"",onChange:y=>l(d,{...u,description:y.target.value}),placeholder:"字段说明"}),p.jsx("input",{value:u.enumValue??"",onChange:y=>l(d,{...u,enumValue:y.target.value}),placeholder:"a,b,c"}),p.jsx("button",{type:"button",className:"icon-danger-button",onClick:()=>a(d),"aria-label":"删除字段",children:p.jsx(lo,{size:15})})]}),u.type==="object"||u.type==="array"?p.jsxs("div",{className:"child-field-config",children:[p.jsx("div",{className:"child-field-title",children:"下一级结构"}),p.jsx(so,{fields:(h=u.children)!=null&&h.length?u.children:[ht("body")],onAdd:()=>l(d,{...u,children:[...u.children??[],ht("body")]}),onChange:(y,g)=>l(d,{...u,children:fn(u.children??[],y,g)}),onRemove:y=>l(d,{...u,children:vi(u.children??[],y,ht("body"))})})]}):null]},`field-${d}`)}),p.jsxs("button",{type:"button",className:"field-add-row",onClick:r,children:[p.jsx(io,{size:14}),"增加字段"]})]})}function Ug(i){return{method:i.method,path:i.path,summary:i.summary,operationId:i.operationId,tags:i.tags.split(",").map(n=>n.trim()).filter(Boolean),description:i.description,parameters:i.parameters,requestBody:{required:i.requestBodyRequired,contentType:i.requestContentType,fields:i.bodyFields},responses:i.responses}}function zd(i){try{return Vg(Ap(i))}catch(n){return{config:Hg(),errors:[n instanceof Error?n.message:"CLI 配置解析失败"]}}}function Fg(i){return JSON.stringify({api:i})}function Vg(i){var r,l,a;const n=[];if(i.method||n.push("请选择请求方法"),(r=i.path)!=null&&r.trim()||n.push("请填写接口路径"),(l=i.summary)!=null&&l.trim()||n.push("请填写接口名称"),Xl(i.parameters??[],"参数",n),Xl(((a=i.requestBody)==null?void 0:a.fields)??[],"请求体字段",n),(i.responses??[]).forEach((u,d)=>{var h;(h=u.status)!=null&&h.trim()||n.push(`响应 #${d+1} 请填写状态码`),Xl(u.fields??[],`响应 ${u.status||`#${d+1}`} 字段`,n)}),n.length)return{config:i,errors:n};try{return{config:Qu(i),errors:[]}}catch(u){return{config:i,errors:[u instanceof Error?u.message:"接口配置校验失败"]}}}function Xl(i,n,r,l=""){i.forEach((a,u)=>{var h;const d=`${n}${l?` ${l}`:""} #${u+1}`;Mp(a)&&((h=a.name)!=null&&h.trim()||r.push(`${d} 请填写字段名`),(a.type==="object"||a.type==="array")&&Xl(a.children??[],n,r,a.name||`#${u+1}`))})}function Kg(i,n){if(n)return n.focus(),n.select(),document.execCommand("copy");const r=document.createElement("textarea");r.value=i,r.setAttribute("readonly","true"),r.style.position="fixed",r.style.left="-9999px",r.style.top="0",document.body.appendChild(r),r.focus(),r.select();try{return document.execCommand("copy")}finally{document.body.removeChild(r)}}function Mp(i){var n,r,l,a,u;return!!((n=i.name)!=null&&n.trim()||(r=i.description)!=null&&r.trim()||(l=i.enumValue)!=null&&l.trim()||(a=i.defaultValue)!=null&&a.trim()||i.required||(u=i.children)!=null&&u.some(Mp))}function qg(i,n){var r;return n==="object"||n==="array"?{...i,type:n,children:(r=i.children)!=null&&r.length?i.children:[ht("body")]}:{...i,type:n,children:void 0}}function Hg(){return{method:"get",path:"",summary:"",responses:[gi()]}}function ht(i="query"){return{name:"",location:i,required:!1,type:"string",description:"",enumValue:""}}function gi(){return{status:"200",description:"Success",contentType:"application/json",fields:[ht("body")]}}function fn(i,n,r){return n>=i.length?[...i,r]:i.map((l,a)=>a===n?r:l)}function vi(i,n,r){const l=i.filter((a,u)=>u!==n);return l.length?l:[r]}function Wg({versions:i,selectedVersionId:n,currentVersion:r,disabled:l,onSelect:a,onPrepareUpdate:u,onUpdateEnvironment:d,onDelete:h}){const[y,g]=A.useState(!1),[x,k]=A.useState(""),[E,O]=A.useState(""),[b,S]=A.useState(""),[I,R]=A.useState(""),[H,F]=A.useState(""),K=A.useMemo(()=>r??i.find(D=>D.versionId===n),[r,n,i]);A.useEffect(()=>{y||(k(""),F(""))},[y]);function G(D){F(""),k(D.versionId||""),O(D.environmentName||""),S(D.environmentBaseUrl||"")}async function Q(D){R(D),F("");try{await d(D,E,b),k(""),F("环境已保存")}catch(Z){F(Z instanceof Error?Z.message:"环境保存失败")}finally{R("")}}async function q(D){const Z=D.versionId;if(Z&&window.confirm(`确认删除文档版本 ${pu(D)}?`)){R(Z),F("");try{await h(Z),F("版本已删除")}catch(te){F(te instanceof Error?te.message:"版本删除失败")}finally{R("")}}}async function U(D){const Z=D.versionId;if(Z){R(Z),F("");try{await u(D),g(!1)}catch(te){F(te instanceof Error?te.message:"准备更新失败")}finally{R("")}}}function ae(D){if(!D)return;const Z=document.createElement("a");Z.href=`${ag}?versionId=${encodeURIComponent(D)}`,Z.download=`${D}.json`,document.body.appendChild(Z),Z.click(),document.body.removeChild(Z)}return p.jsxs("div",{className:"version-manager",children:[p.jsxs("button",{className:"version-manager-trigger",onClick:()=>g(!0),disabled:l||!i.length,children:[p.jsx(Qd,{size:16}),p.jsxs("span",{children:[p.jsx("strong",{children:K?pu(K):"无缓存版本"}),p.jsx("small",{children:K?[K.environmentName||"未设置环境",K.paths===void 0?"":`${K.paths} paths`,K.savedAt?Bd(K.savedAt):""].filter(Boolean).join(" · "):"导入或爬取文档后可管理版本"})]})]}),y?p.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"version-manager-title",children:p.jsxs("div",{className:"version-manager-dialog",children:[p.jsxs("div",{className:"import-dialog-header",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow",children:"Document Versions"}),p.jsx("h2",{id:"version-manager-title",children:"文档版本管理"})]}),p.jsx("button",{className:"icon-secondary-button",onClick:()=>g(!1),"aria-label":"关闭",children:p.jsx(eo,{size:17})})]}),p.jsxs("div",{className:"version-manager-body",children:[H?p.jsx("div",{className:H.includes("失败")||H.includes("不支持")?"version-message error":"version-message",children:H}):null,i.length?i.map(D=>{const Z=D.versionId||"",te=x===Z,de=I===Z,Ie=Z===n;return p.jsxs("section",{className:`version-item ${Ie?"active":""}`,children:[p.jsxs("div",{className:"version-item-main",children:[p.jsxs("div",{children:[p.jsxs("div",{className:"version-item-title",children:[p.jsx("strong",{children:pu(D)}),Ie?p.jsx("span",{children:"当前"}):null]}),p.jsx("p",{children:Z})]}),p.jsxs("div",{className:"version-item-stats",children:[p.jsx("span",{children:D.mode||"unknown"}),p.jsxs("span",{children:[D.paths??0," paths"]}),p.jsxs("span",{children:[D.schemas??0," schemas"]}),p.jsx("span",{children:D.savedAt?Bd(D.savedAt):"-"})]})]}),te?p.jsxs("div",{className:"version-env-editor",children:[p.jsxs("label",{children:["环境名称",p.jsx("input",{value:E,onChange:_e=>O(_e.target.value),placeholder:"例如 dev / test / prod"})]}),p.jsxs("label",{children:["Base URL",p.jsx("input",{value:b,onChange:_e=>S(_e.target.value),placeholder:"https://api.example.com"})]})]}):p.jsxs("div",{className:"version-env-summary",children:[p.jsx("span",{children:D.environmentName||"未设置环境"}),p.jsx("code",{children:D.environmentBaseUrl||"未设置 Base URL"})]}),p.jsxs("div",{className:"version-item-actions",children:[p.jsxs("button",{className:"secondary-button",onClick:()=>a(Z),disabled:Ie||de||!Z,children:[p.jsx(wu,{size:15}),"切换"]}),p.jsxs("button",{className:"primary-button",onClick:()=>U(D),disabled:de||!Z,children:[p.jsx(wu,{size:15}),"更新"]}),te?p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"primary-button",onClick:()=>Q(Z),disabled:de||!Z,children:[p.jsx(Ni,{size:15}),"保存环境"]}),p.jsx("button",{className:"secondary-button",onClick:()=>k(""),disabled:de,children:"取消"})]}):p.jsxs("button",{className:"secondary-button",onClick:()=>G(D),disabled:de||!Z,children:[p.jsx(Iu,{size:15}),"环境"]}),p.jsxs("button",{className:"secondary-button",onClick:()=>ae(Z),disabled:!Z,children:[p.jsx(Am,{size:15}),"导出"]}),p.jsxs("button",{className:"danger-button",onClick:()=>q(D),disabled:de||!Z,children:[p.jsx(lo,{size:15}),"删除"]})]})]},Z)}):p.jsx("p",{className:"muted",children:"暂无缓存版本。"})]})]})}):null]})}function pu(i){return i.title||i.inputUrl||i.versionId||"未命名版本"}function Bd(i){const n=new Date(i);return Number.isNaN(n.getTime())?i:n.toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}const Qg=["all","get","post","put","delete","patch"],hu="apiskill-open-endpoint-tabs";function Ud(i){return{id:i.id,method:i.method,path:i.path,summary:i.summary||i.operation.operationId||i.path}}function mu(i,n){return`${i||"local"}::${n.id}`}function Jg(){const[i,n]=A.useState(null),[r,l]=A.useState("loading"),[a,u]=A.useState(""),[d,h]=A.useState(""),[y,g]=A.useState("all"),[x,k]=A.useState("all"),[E,O]=A.useState(!1),[b,S]=A.useState(""),[I,R]=A.useState(!1),[H,F]=A.useState([]),[K,G]=A.useState(!1),[Q,q]=A.useState(""),[U,ae]=A.useState("blank"),[D,Z]=A.useState([]),[te,de]=A.useState(""),[Ie,_e]=A.useState(void 0),[De,xe]=A.useState(""),[W,ne]=A.useState(""),[X,C]=A.useState(""),[M,he]=A.useState(""),[J,ye]=A.useState(null),[pe,Ne]=A.useState("API Skill Document"),[ke,Ce]=A.useState("1.0.0"),[Ge,rn]=A.useState("Created from API Skill blank document."),[sr,Y]=A.useState(!1),[Se,st]=A.useState(""),[Je,it]=A.useState(""),[sn,Tn]=A.useState(""),[_n,pn]=A.useState(""),[Cs,Es]=A.useState(""),[at,kt]=A.useState(null),[Ot,ir]=A.useState(null),[Ir,lr]=A.useState(!1),[Pt,In]=A.useState(null),[Lr,or]=A.useState(""),[Ar,bi]=A.useState(!1),[Os,Ln]=A.useState(void 0),[Ts,An]=A.useState(void 0),[_s,hn]=A.useState({}),[Pn,ar]=A.useState(!1),Pr=A.useRef(null);A.useEffect(()=>{async function N(){try{await Mr()}catch(P){u(P instanceof Error?P.message:"读取最新缓存失败"),l("ready")}finally{Mt()}}N(),jo()},[]);const bt=A.useMemo(()=>i?vg(i):[],[i]),Wt=A.useMemo(()=>new Map(bt.map(N=>[N.id,N])),[bt]),br=A.useMemo(()=>wg(bt),[bt]),mn=A.useMemo(()=>{const N=d.trim().toLowerCase();return bt.filter(P=>{const le=!N||P.searchable.includes(N),ge=y==="all"||P.tags.includes(y),we=x==="all"||P.method===x,fe=!E||P.hasBody;return le&&ge&&we&&fe})},[E,bt,x,d,y]),Le=A.useMemo(()=>{if(!(!b&&I))return Wt.get(b)??mn[0]},[I,Wt,mn,b]),ln=A.useMemo(()=>D.find(N=>N.versionId===te)??Ie,[te,Ie,D]),Is=Le?mu(te,Le):"",ur=Le?_s[Is]??Ql(Le.operation["x-apiskill-links"]):void 0;A.useEffect(()=>{Le&&Le.id!==b&&S(Le.id)},[Le,b]),A.useEffect(()=>{Le&&F(N=>N.some(P=>P.id===Le.id)?N:[...N,Ud(Le)])},[Le]),A.useEffect(()=>{F(N=>N.filter(P=>Wt.has(P.id)))},[Wt]),A.useEffect(()=>{var N;if(!(!te||!Wt.size))try{const P=localStorage.getItem(hu);if(!P){G(!0);return}const le=JSON.parse(P);if(le.versionId!==te){G(!0);return}const ge=le.tabIds.map(fe=>Wt.get(fe)).filter(fe=>!!fe).map(Ud);F(ge);const we=le.selectedId&&Wt.has(le.selectedId)?le.selectedId:((N=ge[0])==null?void 0:N.id)??"";S(we),R(le.allowEmptyDetail&&!we)}catch{localStorage.removeItem(hu)}finally{G(!0)}},[Wt,te]),A.useEffect(()=>{if(!te||!K)return;const N={versionId:te,tabIds:H.map(P=>P.id),selectedId:b,allowEmptyDetail:I};localStorage.setItem(hu,JSON.stringify(N))},[I,H,b,te,K]),A.useEffect(()=>{if((at==null?void 0:at.status)!=="running")return;const N=window.setInterval(()=>{kt(P=>!P||P.status!=="running"?P:{...P,progress:Math.min(88,P.progress+(P.mode==="crawl"||P.mode==="curl"?4:7))})},600);return()=>window.clearInterval(N)},[at==null?void 0:at.status,at==null?void 0:at.mode]);async function Mr(N){var ge,we,fe,Ve;G(!1);const P=N?await fetch(ig,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:N})}):await fetch(rg,{cache:"no-store"});if(P.status===404){n(null),de(""),_e(void 0),F([]),l("ready");return}if(!P.ok)throw new Error(`读取缓存失败: ${P.status}`);const le=await P.json();n(le.document),R(!1),F([]),xe(((ge=le.meta)==null?void 0:ge.savedAt)||""),de(((we=le.meta)==null?void 0:we.versionId)||""),_e(le.meta),Mn(le.meta,le.document),it(((fe=le.meta)==null?void 0:fe.resolvedUrl)||((Ve=le.meta)==null?void 0:Ve.inputUrl)||""),le.versions&&Z(le.versions),l("ready")}async function Mt(){const N=await fetch(sg,{cache:"no-store"});if(!N.ok)return;const P=await N.json();Z(P.versions??[])}function bn(N){return N==="file"||N==="crawl"||N==="curl"||N==="upload"}function Rr(N){if(bn(N))return N}function Mn(N,P){const le=Rr(N==null?void 0:N.mode);le&&ae(le),bn(N==null?void 0:N.mode)&&vo(N.mode,N.inputUrl||""),((N==null?void 0:N.mode)==="document"||(N==null?void 0:N.mode)==="manual")&&(P!=null&&P.info)&&(ae("blank"),Ne(P.info.title||"API Skill Document"),Ce(P.info.version||"1.0.0"),rn(P.info.description||""))}function Ls(N){if(!Se)return"";const P=D.find(le=>le.versionId===Se)??(te===Se?Ie:void 0);return N==="blank"?(P==null?void 0:P.mode)==="document"||(P==null?void 0:P.mode)==="manual"?Se:"":(P==null?void 0:P.mode)===N?Se:""}function vo(N,P){N==="crawl"?C(P):N==="curl"?he(P):N==="file"&&ne(P)}function As(N){return N==="curl"?"请输入 CURL 命令":N==="upload"?"请选择 JSON 或 YAML 文件":N==="crawl"?"请输入在线文档页地址":"请输入 Swagger/OpenAPI 文件地址"}function yn(){U==="crawl"?C(""):U==="curl"?he(""):U==="upload"?(ye(null),Pr.current&&(Pr.current.value="")):ne("")}async function Mi(N){if(N==="upload"){if(!J)throw new Error(As(N));if(!/\.(json|ya?ml)$/i.test(J.name))throw new Error("仅支持 JSON、YAML 或 YML 文件");return{input:J.name,content:await J.text()}}const P=N==="crawl"?X.trim():N==="curl"?M.trim():W.trim();if(!P)throw new Error(As(N));return{input:P}}async function Ps(N,P={type:"none"},le=!1,ge){var mt,Ui;let we;try{we=await Mi(N)}catch(ut){const $t=ut instanceof Error?ut.message:As(N);u($t),kt({open:!0,mode:N,status:"error",progress:100,inputUrl:"",message:"未开始",error:$t});return}const fe=we.input,Ve=ge||void 0,Oe=!!Ve;Y(!1),q(N),u(""),kt({open:!0,mode:N,status:"running",progress:N==="crawl"&&!le?6:N==="curl"?14:N==="crawl"?12:18,inputUrl:fe,message:N==="crawl"&&!le?"正在检测文档访问权限":N==="crawl"?Oe?"正在爬取并更新当前版本文档":"正在由 Node 爬取在线文档并识别 OpenAPI JSON 地址":N==="curl"?Oe?"正在执行 CURL 并更新当前版本文档":"正在解析并执行 CURL 请求":N==="upload"?Oe?"正在解析上传文件并更新当前版本文档":"正在读取并解析上传的 JSON / YAML 文件":Oe?"正在拉取并更新当前版本文档":"正在由 Node 拉取并解析 OpenAPI JSON 文件"});try{if(N!=="curl"&&N!=="upload"&&!le&&P.type==="none"){const zr=await t0(fe,N);if(zr.requiresAuth){ir({open:!0,mode:N,inputUrl:fe,message:zr.message||"该文档地址需要用户名和密码",updateVersionId:Ve}),kt(null),q("");return}kt(Qt=>(Qt==null?void 0:Qt.status)==="running"?{...Qt,progress:N==="crawl"?12:18,message:N==="crawl"?Oe?"正在爬取并更新当前版本文档":"正在由 Node 爬取在线文档并识别 OpenAPI JSON 地址":Oe?"正在拉取并更新当前版本文档":"正在由 Node 拉取并解析 OpenAPI JSON 文件"}:Qt)}const ut=await Zg(fe,N,P,we.content,Ve),$t=ut.document,Ms=new Date().toISOString();localStorage.setItem(hg,Ms),localStorage.setItem(mg,fe),P.type==="basic"&&pn(""),G(!1),n($t),R(!1),F([]),xe(Ms),de(((mt=ut.meta)==null?void 0:mt.versionId)||""),_e(ut.meta),it(((Ui=ut.meta)==null?void 0:Ui.resolvedUrl)||fe),Mn(ut.meta,$t),l("ready"),ut.versions?Z(ut.versions):await Mt(),kt({open:!0,mode:N,status:"success",progress:100,inputUrl:fe,message:Oe?"文档已更新并覆盖原版本":"文档已解析并保存为独立版本",meta:ut.meta}),st("")}catch(ut){const $t=ut instanceof Error?ut.message:"导入失败,请检查地址或文档格式";u($t),kt({open:!0,mode:N,status:"error",progress:100,inputUrl:fe,message:"处理失败",error:$t})}finally{q("")}}async function wo(){var ge,we,fe,Ve;const N=pe.trim();if(!N){u("请输入文档名称");return}const P=Ls("blank")||void 0,le=!!P;q("blank"),u(""),kt({open:!0,mode:"blank",status:"running",progress:45,inputUrl:N,message:le?"正在更新当前 OpenAPI 文档":"正在创建空白 OpenAPI 文档"});try{const Oe=await e0({title:N,version:ke.trim()||"1.0.0",description:Ge.trim(),versionId:P}),mt=((ge=Oe.meta)==null?void 0:ge.savedAt)||new Date().toISOString();G(!1),n(Oe.document),R(!0),F([]),S(""),xe(mt),de(((we=Oe.meta)==null?void 0:we.versionId)||""),_e(Oe.meta),it(((fe=Oe.meta)==null?void 0:fe.resolvedUrl)||((Ve=Oe.meta)==null?void 0:Ve.inputUrl)||"manual-document"),Mn(Oe.meta,Oe.document),l("ready"),Oe.versions?Z(Oe.versions):await Mt(),kt({open:!0,mode:"blank",status:"success",progress:100,inputUrl:N,message:le?"文档已更新并覆盖原版本":"空白文档已创建,可以继续新增 API 配置",meta:Oe.meta}),Y(!1),st("")}catch(Oe){const mt=Oe instanceof Error?Oe.message:"创建文档失败";u(mt),kt({open:!0,mode:"blank",status:"error",progress:100,inputUrl:N,message:"创建失败",error:mt})}finally{q("")}}async function Ri(N,P){await navigator.clipboard.writeText(P),Es(N),window.setTimeout(()=>Es(""),1600)}function $i(){const N=(Ot==null?void 0:Ot.updateVersionId)??"";ir(null),Ps((Ot==null?void 0:Ot.mode)??"crawl",{type:"basic",username:sn,password:_n},!0,N)}function Di(N){F(P=>{const le=P.findIndex(we=>we.id===N),ge=P.filter(we=>we.id!==N);if(N===b){const we=ge[le]??ge[le-1];R(!we),S((we==null?void 0:we.id)??"")}return ge})}function $r(N){R(!1),S(N)}function ko(N,P){const le=mu(te,N);hn(ge=>({...ge,[le]:Ql(P)}))}async function So(N,P,le){const ge=await fetch(lg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:N,environmentName:P,environmentBaseUrl:le})}),we=await ge.json();if(!ge.ok)throw new Error(we.error||"环境保存失败");const fe=we;Z(fe.versions??[]),N===te&&_e(fe.meta)}async function ze(N){const P=await fetch(og,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:N})}),le=await P.json();if(!P.ok)throw new Error(le.error||"版本删除失败");const ge=le;if(Z(ge.versions??[]),N===te){if(ge.nextVersionId){await Mr(ge.nextVersionId);return}n(null),de(""),_e(void 0),F([]),xe(""),it(""),l("ready")}}async function jo(){try{const N=await fetch(cg,{cache:"no-store"});if(!N.ok)return;In(await N.json())}catch{}}async function bs(){var N;if(!i||!gn.endpoints){or("请先导入、爬取或新建 API 文档,并至少包含一个接口后再启动 MOCK 服务");return}bi(!0),or(""),u("");try{const P=await fetch(ug,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:te||void 0})}),le=await P.json();if(!P.ok)throw new Error(le.error||"MOCK 服务启动失败");const ge=le;In(ge),or((N=ge.mock)!=null&&N.url?`MOCK 服务已启动:${ge.mock.url}`:"MOCK 服务已启动")}catch(P){or(P instanceof Error?P.message:"MOCK 服务启动失败")}finally{bi(!1)}}async function zi(N){const P=N.versionId||"";if(!P)throw new Error("请选择要更新的文档版本");const le=N.mode||"";P!==te?await Mr(P):Mn(N,i),ae(bn(le)?le:"blank"),st(P),Y(!0),u("")}async function Dr(N){var P,le,ge,we;ar(!0),u("");try{const fe=await n0(te||void 0,N,Ts),Ve=((P=fe.meta)==null?void 0:P.savedAt)||new Date().toISOString();n(fe.document),xe(Ve),de(((le=fe.meta)==null?void 0:le.versionId)||""),_e(fe.meta),it(((ge=fe.meta)==null?void 0:ge.resolvedUrl)||((we=fe.meta)==null?void 0:we.inputUrl)||"manual-api-config"),l("ready"),lr(!1),Ln(void 0),An(void 0),await Mt()}catch(fe){u(fe instanceof Error?fe.message:"新增接口保存失败")}finally{ar(!1)}}async function xo(N){var P,le,ge,we;if(!te){u("请先选择一个本地缓存版本");return}if(window.confirm(`确认删除 ${N.method.toUpperCase()} ${N.path}?`)){ar(!0),u("");try{const fe=await r0(te,N.method,N.path);n(fe.document),xe(((P=fe.meta)==null?void 0:P.savedAt)||new Date().toISOString()),de(((le=fe.meta)==null?void 0:le.versionId)||te),_e(fe.meta),it(((ge=fe.meta)==null?void 0:ge.resolvedUrl)||((we=fe.meta)==null?void 0:we.inputUrl)||"manual-api-config"),l("ready"),S(""),F(Ve=>Ve.filter(Oe=>Oe.id!==N.id)),await Mt()}catch(fe){u(fe instanceof Error?fe.message:"删除接口失败")}finally{ar(!1)}}}async function Bi(N,P){var fe,Ve;if(!te)throw new Error("请先选择一个本地缓存版本");const le=await fetch(pg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:te,method:N.method,path:N.path,links:P})}),ge=await le.json();if(!le.ok)throw new Error(ge.error||"关联配置保存失败");const we=ge;n(we.document),xe(((fe=we.meta)==null?void 0:fe.savedAt)||new Date().toISOString()),de(((Ve=we.meta)==null?void 0:Ve.versionId)||te),_e(we.meta),hn(Oe=>{var mt;return{...Oe,[mu(((mt=we.meta)==null?void 0:mt.versionId)||te,N)]:Ql(P)}}),we.versions?Z(we.versions):await Mt()}const gn=A.useMemo(()=>{var ge;const N=i!=null&&i.paths?Object.keys(i.paths).length:0,P=((ge=i==null?void 0:i.components)==null?void 0:ge.schemas)??(i==null?void 0:i.definitions)??{},le=Object.keys(P).length;return{paths:N,schemas:le,endpoints:bt.length,tags:br.length}},[i,bt.length,br.length]),Rt=!!Ls(U);return r==="loading"?p.jsxs("main",{className:"state-screen",children:[p.jsx(Lm,{className:"state-icon"}),p.jsx("h1",{children:"正在读取最新缓存"}),p.jsx("p",{children:"如果没有缓存版本,将进入空文档状态。"})]}):r==="error"?p.jsxs("main",{className:"state-screen",children:[p.jsx(Ci,{className:"state-icon error"}),p.jsx("h1",{children:"接口文档加载失败"}),p.jsx("p",{children:a})]}):p.jsxs("div",{className:"app-shell",children:[p.jsxs("header",{className:"topbar",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow",children:"OpenAPI 3.0 Console"}),p.jsx("h1",{children:"API Skill Console"})]}),p.jsxs("div",{className:"topbar-actions",children:[p.jsx(Wg,{versions:D,selectedVersionId:te,currentVersion:ln,disabled:!!Q,onSelect:N=>{!N||N===te||Mr(N)},onPrepareUpdate:zi,onUpdateEnvironment:So,onDelete:ze}),p.jsxs("button",{className:"primary-button",onClick:()=>{Ln(void 0),An(void 0),lr(!0)},children:[p.jsx(io,{size:16}),"新增API配置"]}),p.jsxs("div",{className:"sync-meta",children:[p.jsxs("span",{children:["接口 ",gn.endpoints]}),p.jsxs("span",{children:["Schema ",gn.schemas]}),p.jsx("span",{children:De?`同步 ${g0(De)}`:"未加载文档"})]})]})]}),p.jsxs("section",{className:"source-panel document-toolbar",children:[p.jsxs("div",{className:"document-source-summary",children:[p.jsx("span",{children:"当前文档源"}),p.jsx("strong",{children:Je||"未加载"}),Pt!=null&&Pt.running&&Pt.mock?p.jsxs("small",{children:["MOCK ",Pt.mock.url," · ",Pt.mock.routesCount," routes"]}):null]}),p.jsxs("div",{className:"source-panel-actions",children:[p.jsxs("button",{className:"secondary-button",onClick:bs,disabled:Ar,children:[p.jsx(Qd,{size:16,className:Ar?"spin":""}),Ar?"启动中":"启动MOCK服务"]}),p.jsxs("button",{className:"secondary-button",onClick:()=>{st(""),ae("blank"),Y(!0)},disabled:!!Q,children:[p.jsx(hs,{size:16}),"新建文档"]})]}),Lr?p.jsx("div",{className:`version-message ${Lr.includes("失败")||Lr.includes("请先")?"error":""}`,children:Lr}):null]}),a?p.jsxs("div",{className:"inline-error",children:[p.jsx(Ci,{size:16}),a]}):null,at!=null&&at.open?p.jsx(Xg,{state:at,onClose:()=>kt(null)}):null,Ot!=null&&Ot.open?p.jsx(Yg,{state:Ot,username:sn,password:_n,onUsernameChange:Tn,onPasswordChange:pn,onClose:()=>ir(null),onSubmit:$i}):null,sr?p.jsx(Gg,{activeTab:U,updating:Rt,title:pe,version:ke,description:Ge,fileSourceUrl:W,crawlSourceUrl:X,curlSourceText:M,uploadFile:J,uploadInputRef:Pr,saving:Q===U,onTabChange:ae,onTitleChange:Ne,onVersionChange:Ce,onDescriptionChange:rn,onFileSourceUrlChange:ne,onCrawlSourceUrlChange:C,onCurlSourceTextChange:he,onUploadFileChange:ye,onClear:yn,onClose:()=>{Q||(Y(!1),st(""))},onSubmit:()=>{if(U==="blank"){wo();return}Ps(U,{type:"none"},!1,Ls(U))}}):null,Ir?p.jsx(Dg,{selectedVersionId:te,saving:Pn,initialConfig:Os,onClose:()=>{lr(!1),Ln(void 0),An(void 0)},onSave:Dr}):null,p.jsxs("section",{className:"workspace",children:[p.jsxs("aside",{className:"sidebar",children:[p.jsxs("div",{className:"search-box",children:[p.jsx($m,{size:17}),p.jsx("input",{value:d,onChange:N=>h(N.target.value),placeholder:"搜索路径、摘要、参数、tag"}),d?p.jsx("button",{type:"button",className:"search-clear-button",onClick:()=>h(""),"aria-label":"清空搜索",children:p.jsx(eo,{size:15})}):null]}),p.jsxs("div",{className:"filters",children:[p.jsxs("label",{children:[p.jsx(bm,{size:15}),p.jsxs("select",{value:y,onChange:N=>g(N.target.value),children:[p.jsxs("option",{value:"all",children:["全部分组 (",gn.tags,")"]}),br.map(N=>p.jsxs("option",{value:N.name,children:[N.name," (",N.count,")"]},N.name))]})]}),p.jsxs("label",{className:"checkbox-line",children:[p.jsx("input",{type:"checkbox",checked:E,onChange:N=>O(N.target.checked)}),"仅看有请求体"]})]}),p.jsx("div",{className:"method-tabs","aria-label":"method filters",children:Qg.map(N=>p.jsx("button",{className:x===N?"active":"",onClick:()=>k(N),title:N==="all"?"全部方法":N.toUpperCase(),children:N==="all"?"ALL":N.toUpperCase()},N))}),p.jsxs("div",{className:"endpoint-count",children:["显示 ",mn.length," / ",bt.length]}),p.jsx("div",{className:"endpoint-list",children:mn.map(N=>p.jsxs("button",{className:`endpoint-item ${N.id===(Le==null?void 0:Le.id)?"selected":""}`,onClick:()=>$r(N.id),children:[p.jsx("span",{className:`method method-${N.method}`,children:N.method.toUpperCase()}),p.jsxs("span",{className:"endpoint-main",children:[p.jsx("strong",{children:N.summary}),p.jsx("small",{children:N.path})]})]},N.id))})]}),p.jsxs("main",{className:"detail-pane",children:[H.length?p.jsx("div",{className:"opened-api-tabs","aria-label":"已打开 API 页签",children:H.map(N=>p.jsxs("div",{className:`opened-api-tab opened-api-tab-${N.method} ${N.id===(Le==null?void 0:Le.id)?"active":""}`,role:"button",tabIndex:0,onClick:()=>$r(N.id),onKeyDown:P=>{P.key!=="Enter"&&P.key!==" "||(P.preventDefault(),$r(N.id))},title:`${N.method.toUpperCase()} ${N.path}`,children:[p.jsx("span",{className:`opened-api-tab-method method-${N.method}`,children:N.method.toUpperCase()}),p.jsx("span",{className:"opened-api-tab-text",children:p.jsx("strong",{children:N.summary})}),p.jsx("button",{type:"button",className:"opened-api-tab-close","aria-label":"关闭页签",onClick:P=>{P.stopPropagation(),Di(N.id)},children:p.jsx(eo,{size:14})})]},N.id))}):null,i&&Le?p.jsx(s0,{doc:i,endpoint:Le,copied:Cs,onCopy:(N,P)=>Ri(N,P),onEdit:()=>{Ln(bp(i,Le)),An({method:Le.method,path:Le.path}),lr(!0)},onDelete:()=>void xo(Le),onSaveLinks:Bi,linksDraft:ur??Ql(Le.operation["x-apiskill-links"]),onLinksDraftChange:N=>ko(Le,N),environmentBaseUrl:(ln==null?void 0:ln.environmentBaseUrl)||""}):i?mn.length?p.jsxs("div",{className:"empty-state",children:[p.jsx(ms,{size:32}),p.jsx("h2",{children:"未打开接口"}),p.jsx("p",{children:"从左侧列表选择接口后会在上方生成可关闭页签。"})]}):p.jsxs("div",{className:"empty-state",children:[p.jsx(ms,{size:32}),p.jsx("h2",{children:"没有匹配的接口"}),p.jsx("p",{children:"调整搜索词、分组或方法过滤条件。"})]}):p.jsxs("div",{className:"empty-state",children:[p.jsx(ms,{size:32}),p.jsx("h2",{children:"暂无 API 文档数据"}),p.jsx("p",{children:"导入现有 Swagger/OpenAPI 文档,或新建空白文档后从零维护接口。"})]})]})]})]})}function Yg({state:i,username:n,password:r,onUsernameChange:l,onPasswordChange:a,onClose:u,onSubmit:d}){return p.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"document-auth-title",children:p.jsxs("div",{className:"auth-dialog",children:[p.jsxs("div",{className:"import-dialog-header",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow",children:"Document Auth"}),p.jsx("h2",{id:"document-auth-title",children:"输入文档访问凭据"})]}),p.jsx("span",{className:"import-badge running",children:"需要登录"})]}),p.jsxs("div",{className:"auth-dialog-body",children:[p.jsxs("div",{className:"auth-message",children:[p.jsx(Mm,{size:18}),p.jsx("span",{children:i.message})]}),p.jsxs("div",{className:"auth-target",children:[p.jsx("span",{children:"文档地址"}),p.jsx("strong",{children:i.inputUrl})]}),p.jsxs("div",{className:"auth-fields",children:[p.jsxs("label",{children:["用户名",p.jsx("input",{value:n,onChange:h=>l(h.target.value),autoComplete:"username",autoFocus:!0})]}),p.jsxs("label",{children:["密码",p.jsx("input",{value:r,onChange:h=>a(h.target.value),type:"password",autoComplete:"current-password",onKeyDown:h=>{h.key==="Enter"&&d()}})]})]})]}),p.jsxs("div",{className:"import-dialog-actions",children:[p.jsx("button",{className:"secondary-button",onClick:u,children:"取消"}),p.jsxs("button",{className:"primary-button",onClick:d,children:[p.jsx(Wd,{size:16}),"使用凭据继续"]})]})]})})}function Gg({activeTab:i,updating:n,title:r,version:l,description:a,fileSourceUrl:u,crawlSourceUrl:d,curlSourceText:h,uploadFile:y,uploadInputRef:g,saving:x,onTabChange:k,onTitleChange:E,onVersionChange:O,onDescriptionChange:b,onFileSourceUrlChange:S,onCrawlSourceUrlChange:I,onCurlSourceTextChange:R,onUploadFileChange:H,onClear:F,onClose:K,onSubmit:G}){var ae;const Q=[{id:"blank",label:"空白文档",icon:hs},{id:"file",label:"在线文档",icon:wu},{id:"crawl",label:"爬取网页",icon:Pm},{id:"curl",label:"执行 CURL",icon:Lu},{id:"upload",label:"导入文件",icon:ms}],q=i==="blank"?!!r.trim():i==="file"?!!u.trim():i==="crawl"?!!d.trim():i==="curl"?!!h.trim():!!y,U=((ae=Q.find(D=>D.id===i))==null?void 0:ae.icon)??hs;return p.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"document-dialog-title",children:p.jsxs("div",{className:"document-dialog",children:[p.jsxs("div",{className:"import-dialog-header",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow",children:"OpenAPI Document"}),p.jsx("h2",{id:"document-dialog-title",children:n?"更新文档":"新建文档"})]}),p.jsx("button",{className:"icon-secondary-button",onClick:K,"aria-label":"关闭",disabled:x,children:p.jsx(eo,{size:17})})]}),p.jsx("div",{className:"document-dialog-tabs",role:"tablist","aria-label":"新建文档方式",children:Q.map(D=>{const Z=D.icon;return p.jsxs("button",{className:i===D.id?"active":"",onClick:()=>k(D.id),role:"tab","aria-selected":i===D.id,disabled:x,children:[p.jsx(Z,{size:15}),D.label]},D.id)})}),p.jsx("div",{className:"document-dialog-body",role:"tabpanel",children:i==="blank"?p.jsxs("div",{className:"blank-document-fields",children:[p.jsxs("label",{className:"source-input",children:[p.jsx(ms,{size:16}),p.jsx("input",{value:r,onChange:D=>E(D.target.value),placeholder:"文档名称,例如 Customer Service API",autoFocus:!0})]}),p.jsxs("label",{className:"source-input",children:[p.jsx(hs,{size:16}),p.jsx("input",{value:l,onChange:D=>O(D.target.value),placeholder:"文档版本,例如 1.0.0"})]}),p.jsxs("label",{className:"source-input",children:[p.jsx(Iu,{size:16}),p.jsx("input",{value:a,onChange:D=>b(D.target.value),placeholder:"文档描述,可选"})]})]}):i==="upload"?p.jsxs("label",{className:"source-file-picker document-file-picker",children:[p.jsx(ms,{size:18}),p.jsx("input",{ref:g,type:"file",accept:".json,.yaml,.yml,application/json,application/yaml,text/yaml,text/x-yaml",onChange:D=>{var Z;return H(((Z=D.target.files)==null?void 0:Z[0])??null)}}),p.jsx("span",{children:y?y.name:"选择 JSON / YAML 文件"}),p.jsx("small",{children:y?"点击可重新选择文件":"支持 OpenAPI 3.x 与 Swagger 2.0"})]}):p.jsxs("label",{className:`source-input document-source-input ${i==="curl"?"source-input-multiline":""}`,children:[p.jsx(Zl,{size:16}),i==="curl"?p.jsx("textarea",{value:h,onChange:D=>R(D.target.value),placeholder:"粘贴 curl 命令,例如 curl 'https://example.com/openapi.yaml' -H 'accept: application/yaml'",spellCheck:!1,autoFocus:!0}):p.jsx("input",{value:i==="file"?u:d,onChange:D=>{i==="file"?S(D.target.value):I(D.target.value)},placeholder:i==="file"?"输入 Swagger/OpenAPI JSON 或 YAML 文件地址":"输入 Swagger UI / Knife4j / Redoc 在线文档页地址",autoFocus:!0})]})}),p.jsxs("div",{className:"import-dialog-actions document-dialog-actions",children:[i!=="blank"&&q?p.jsx("button",{className:"secondary-button clear-document-source",onClick:F,disabled:x,children:"清空"}):null,p.jsx("button",{className:"secondary-button",onClick:K,disabled:x,children:"取消"}),p.jsxs("button",{className:"primary-button",onClick:G,disabled:x||!q,children:[p.jsx(U,{size:16,className:x?"spin":""}),x?"处理中":n?"更新":i==="blank"?"创建":"确认"]})]})]})})}function Xg({state:i,onClose:n}){var a,u,d,h,y;const r=i.mode==="blank"?"新建空白文档":i.mode==="crawl"?"爬取在线文档":i.mode==="curl"?"执行 CURL":i.mode==="upload"?"上传 JSON / YAML 文件":"导入 JSON / YAML 文件",l=i.status!=="running";return p.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"import-status-title",children:p.jsxs("div",{className:"import-dialog",children:[p.jsxs("div",{className:"import-dialog-header",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow",children:"OpenAPI Import"}),p.jsx("h2",{id:"import-status-title",children:r})]}),p.jsx("span",{className:`import-badge ${i.status}`,children:i.status==="running"?"处理中":i.status==="success"?"已完成":"失败"})]}),p.jsx("div",{className:"progress-track","aria-label":"导入进度",children:p.jsx("div",{className:`progress-bar ${i.status}`,style:{width:`${i.progress}%`}})}),p.jsxs("div",{className:"import-summary",children:[p.jsxs("div",{children:[p.jsx("span",{children:"输入地址"}),p.jsx("strong",{children:i.inputUrl||"-"})]}),p.jsxs("div",{children:[p.jsx("span",{children:"当前状态"}),p.jsx("strong",{children:i.message})]}),(a=i.meta)!=null&&a.resolvedUrl?p.jsxs("div",{children:[p.jsx("span",{children:"解析地址"}),p.jsx("strong",{children:i.meta.resolvedUrl})]}):null,(u=i.meta)!=null&&u.versionId?p.jsxs("div",{children:[p.jsx("span",{children:"版本"}),p.jsx("strong",{children:i.meta.versionId})]}):null,(d=i.meta)!=null&&d.savedPath?p.jsxs("div",{children:[p.jsx("span",{children:"保存位置"}),p.jsx("strong",{children:i.meta.savedPath})]}):null,i.status==="success"?p.jsxs("div",{className:"import-counts",children:[p.jsxs("span",{children:["接口路径 ",((h=i.meta)==null?void 0:h.paths)??0]}),p.jsxs("span",{children:["Schema ",((y=i.meta)==null?void 0:y.schemas)??0]})]}):null,i.error?p.jsxs("div",{className:"import-error",children:[p.jsx(Ci,{size:16}),i.error]}):null]}),p.jsx("div",{className:"import-dialog-actions",children:p.jsx("button",{className:"secondary-button",onClick:n,disabled:!l,children:l?"关闭":"处理中"})})]})})}async function Zg(i,n,r,l,a){const u=await fetch(eg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({url:i,mode:n,auth:r,content:l,versionId:a})}),d=await u.json();if(!u.ok)throw new Error(d.error||"导入失败");return d}async function e0(i){const n=await fetch(tg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(i)}),r=await n.json();if(!n.ok)throw new Error(r.error||"创建文档失败");return r}async function t0(i,n){const r=await fetch(ng,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({url:i,mode:n})}),l=await r.json();if(!r.ok)throw new Error(l.error||"检测文档访问权限失败");return l}async function n0(i,n,r){const l=await fetch(fg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:i,config:n,replaceTarget:r})}),a=await l.json();if(!l.ok)throw new Error(a.error||"新增接口保存失败");return a}async function r0(i,n,r){const l=await fetch(dg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:i,method:n,path:r})}),a=await l.json();if(!l.ok)throw new Error(a.error||"删除接口失败");return a}function s0({doc:i,endpoint:n,copied:r,onCopy:l,onEdit:a,onDelete:u,onSaveLinks:d,linksDraft:h,onLinksDraftChange:y,environmentBaseUrl:g}){const x=A.useMemo(()=>Pp(i,n.operation.parameters),[i,n]),k=A.useMemo(()=>Sg(i,n.operation),[i,n]),E=A.useMemo(()=>jg(i,n.operation),[i,n]),O=A.useMemo(()=>xg(i,n),[i,n]),b=A.useMemo(()=>Ng(n),[n]),[S,I]=A.useState("ai"),[R,H]=A.useState(!1),F=S==="json"?b:O,K=S==="json"?"复制原始 Operation":"复制 API CLI";function G(){$p(n.path),navigator.clipboard.writeText(n.path).catch(()=>{}),H(!0),window.setTimeout(()=>H(!1),1600)}return p.jsxs("article",{className:"endpoint-detail",children:[p.jsxs("div",{className:"detail-header",children:[p.jsxs("div",{children:[p.jsxs("div",{className:"endpoint-title-line",children:[p.jsx("span",{className:`method method-${n.method}`,children:n.method.toUpperCase()}),p.jsx("h2",{children:n.summary}),p.jsx("div",{className:"tag-row",children:n.tags.map(Q=>p.jsx("span",{children:Q},Q))})]}),p.jsxs("div",{className:"path-row",children:[p.jsx("code",{className:"path-line",children:n.path}),p.jsxs("button",{type:"button",className:"path-copy-button",onClick:G,title:"复制 API 路由地址",children:[R?p.jsx(Ni,{size:14}):p.jsx(wi,{size:14}),p.jsx("span",{children:R?"已复制":"复制"})]})]})]}),p.jsxs("div",{className:"detail-actions",children:[p.jsxs("button",{className:"secondary-button",onClick:a,children:[p.jsx(Iu,{size:15}),"编辑"]}),p.jsxs("button",{className:"danger-button",onClick:u,children:[p.jsx(lo,{size:15}),"删除"]})]})]}),n.operation.description?p.jsx("p",{className:"description",children:n.operation.description}):null,p.jsxs("section",{className:"copy-preview",children:[p.jsxs("div",{className:"copy-preview-toolbar",children:[p.jsxs("div",{className:"copy-tabs",role:"tablist","aria-label":"可复制内容",children:[p.jsxs("button",{className:S==="ai"?"active":"",onClick:()=>I("ai"),role:"tab","aria-selected":S==="ai",children:[p.jsx(wi,{size:15}),"API Cli"]}),p.jsxs("button",{className:S==="json"?"active":"",onClick:()=>I("json"),role:"tab","aria-selected":S==="json",children:[p.jsx(hs,{size:15}),"原始 Operation"]}),p.jsxs("button",{className:S==="test"?"active":"",onClick:()=>I("test"),role:"tab","aria-selected":S==="test",children:[p.jsx(Lu,{size:15}),"测试请求"]}),p.jsxs("button",{className:S==="links"?"active":"",onClick:()=>I("links"),role:"tab","aria-selected":S==="links",children:[p.jsx(Zl,{size:15}),"关联地址"]})]}),S==="test"||S==="links"?null:p.jsxs("button",{className:"copy-inline-button",onClick:()=>l(S,F),children:[r===S?p.jsx(Ni,{size:16}):p.jsx(wi,{size:16}),r===S?"已复制":K]})]}),S==="test"?p.jsx(l0,{doc:i,endpoint:n,environmentBaseUrl:g}):S==="links"?p.jsx(i0,{endpoint:n,links:h,onChange:y,onSave:Q=>d(n,Q)}):p.jsx("pre",{className:"copy-preview-content",children:F})]}),p.jsx(gu,{title:"请求参数",count:x.length,children:p.jsx(vu,{rows:x,empty:"无 query / path / header 参数"})}),p.jsx(gu,{title:"请求体",count:Object.values(k).reduce((Q,q)=>Q+q.length,0),children:Object.keys(k).length?Object.entries(k).map(([Q,q])=>p.jsxs("div",{className:"media-block",children:[p.jsx("h4",{children:Q}),p.jsx(vu,{rows:q,empty:"空对象或无字段说明"})]},Q)):p.jsx("p",{className:"muted",children:"无请求体"})}),p.jsx(gu,{title:"响应字段",count:Object.values(E).reduce((Q,q)=>Q+Object.values(q).flat().length,0),children:Object.keys(n.operation.responses??{}).length?Object.entries(n.operation.responses??{}).map(([Q,q])=>{const U=E[Q]??{};return p.jsxs("div",{className:"response-block",children:[p.jsxs("div",{className:"response-heading",children:[p.jsx("strong",{children:Q}),p.jsx("span",{children:q.description||"无描述"})]}),Object.keys(U).length?Object.entries(U).map(([ae,D])=>p.jsxs("div",{className:"media-block",children:[p.jsx("h4",{children:ae}),p.jsx(vu,{rows:D,empty:"空对象或无字段说明"})]},ae)):p.jsx("p",{className:"muted",children:"无字段说明"})]},Q)}):p.jsx("p",{className:"muted",children:"无响应说明"})})]})}function i0({endpoint:i,links:n,onChange:r,onSave:l}){const[a,u]=A.useState(!1),[d,h]=A.useState("");A.useEffect(()=>{h("")},[i.id]);async function y(){u(!0),h("");try{await l(n),h("关联配置已保存")}catch(g){h(g instanceof Error?g.message:"关联配置保存失败")}finally{u(!1)}}return p.jsxs("div",{className:"endpoint-links-config",children:[d?p.jsx("div",{className:`version-message ${d.includes("失败")?"error":""}`,children:d}):null,p.jsxs("div",{className:"links-grid",children:[p.jsx(Fd,{title:"原型地址",value:n.prototype??Eu(),onChange:g=>r({...n,prototype:g})}),p.jsx(Fd,{title:"UI地址",value:n.ui??Eu(),onChange:g=>r({...n,ui:g})})]}),p.jsx("div",{className:"links-actions",children:p.jsxs("button",{className:"primary-button",onClick:y,disabled:a,children:[p.jsx(Ni,{size:16}),a?"保存中":"保存关联配置"]})})]})}function Fd({title:i,value:n,onChange:r}){const l=n.sourceType==="online",a=n.sourceType==="curl";function u(h){r({...n,...h})}function d(){const h=a?n.curl:n.url;h&&($p(h),navigator.clipboard.writeText(h).catch(()=>{}))}return p.jsxs("section",{className:"tester-panel link-editor-panel",children:[p.jsxs("div",{className:"tester-panel-title",children:[p.jsx(Zl,{size:15}),i]}),p.jsxs("div",{className:"tester-form-grid",children:[p.jsxs("label",{children:["类型",p.jsxs("select",{value:n.sourceType||"local",onChange:h=>u({sourceType:h.target.value}),children:[p.jsx("option",{value:"local",children:"本地文件地址"}),p.jsx("option",{value:"online",children:"在线地址"}),p.jsx("option",{value:"curl",children:"CURL"})]})]}),p.jsxs("label",{children:["标题",p.jsx("input",{value:n.title||"",onChange:h=>u({title:h.target.value}),placeholder:"例如 Figma 原型 / 用户列表页面"})]}),a?p.jsxs("label",{className:"span-all",children:["CURL 命令",p.jsx("textarea",{value:n.curl||"",onChange:h=>u({curl:h.target.value}),placeholder:"curl 'https://example.com/prototype' -H 'Authorization: Bearer ...'",spellCheck:!1})]}):p.jsxs("label",{className:"span-all",children:["地址",p.jsx("input",{value:n.url||"",onChange:h=>u({url:h.target.value}),placeholder:l?"https://example.com/prototype":"/Users/name/project/design/user-list.fig"})]}),l?p.jsxs(p.Fragment,{children:[p.jsxs("label",{children:["访问方式",p.jsxs("select",{value:n.authType||"none",onChange:h=>u({authType:h.target.value}),children:[p.jsx("option",{value:"none",children:"无需登录"}),p.jsx("option",{value:"browser",children:"浏览器登录 / Cookie"}),p.jsx("option",{value:"bearer",children:"Bearer Token"}),p.jsx("option",{value:"header",children:"自定义 Header"})]})]}),n.authType==="header"?p.jsxs("label",{children:["Header 名称",p.jsx("input",{value:n.headerName||"",onChange:h=>u({headerName:h.target.value}),placeholder:"X-Auth-Token"})]}):null,n.authType==="bearer"||n.authType==="header"?p.jsxs("label",{className:"span-all",children:["Token / Header 值",p.jsx("input",{value:n.token||"",onChange:h=>u({token:h.target.value}),placeholder:"仅保存在本地文档缓存中,用于记录访问凭据",type:"password"})]}):null]}):null,p.jsxs("label",{className:"span-all",children:["备注",p.jsx("input",{value:n.note||"",onChange:h=>u({note:h.target.value}),placeholder:a?"例如 CURL 里的 token 来源、过期方式或请求前置条件":l?"例如需要先登录公司 SSO,或 token 过期时找谁更新":"例如本地原型文件位置、分支或打开方式"})]})]}),p.jsxs("div",{className:"link-editor-actions",children:[p.jsxs("button",{className:"secondary-button",onClick:d,disabled:!(a?n.curl:n.url),children:[p.jsx(wi,{size:15}),a?"复制CURL":"复制地址"]}),l&&n.url?p.jsxs("a",{className:"secondary-button link-button",href:n.url,target:"_blank",rel:"noreferrer",children:[p.jsx(Zl,{size:15}),"打开地址"]}):null]})]})}function Ql(i){return{prototype:Vd(i==null?void 0:i.prototype),ui:Vd(i==null?void 0:i.ui)}}function Vd(i){const n=(i==null?void 0:i.sourceType)==="online"||(i==null?void 0:i.sourceType)==="curl"?i.sourceType:"local";return{...Eu(),...i??{},sourceType:n,authType:(i==null?void 0:i.authType)||"none"}}function Eu(){return{sourceType:"local",title:"",url:"",curl:"",authType:"none",token:"",headerName:"",note:""}}function l0({doc:i,endpoint:n,environmentBaseUrl:r}){const l=n.operation.parameters??[],a=l.filter(J=>J.in==="path"),u=l.filter(J=>J.in==="query"),d=l.filter(J=>J.in==="header"),h=A.useMemo(()=>o0(n),[n]),y=A.useRef(""),[g,x]=A.useState(""),[k,E]=A.useState("none"),[O,b]=A.useState(""),[S,I]=A.useState("Authorization"),[R,H]=A.useState("header"),[F,K]=A.useState(""),[G,Q]=A.useState(""),[q,U]=A.useState({}),[ae,D]=A.useState({}),[Z,te]=A.useState(""),[de,Ie]=A.useState(`{
295
+ `,r)+1}return{type:n,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(n){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const r=Wl(n),l=us(r);return l.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const r=Wl(n),l=us(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,r){return this.type!=="comment"||this.indent<=r?!1:n.every(l=>l.type==="newline"||l.type==="space")}*documentEnd(n){this.type!=="doc-mode"&&(n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(n){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function qy(i){const n=i.prettyErrors!==!1;return{lineCounter:i.lineCounter||n&&new Vy||null,prettyErrors:n}}function Hy(i,n={}){const{lineCounter:r,prettyErrors:l}=qy(n),a=new Ky(r==null?void 0:r.addNewLine),u=new Dy(n);let d=null;for(const h of u.compose(a.parse(i),!0,i.length))if(!d)d=h;else if(d.options.logLevel!=="silent"){d.errors.push(new gi(h.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return l&&r&&(d.errors.forEach(Ad(i,r)),d.warnings.forEach(Ad(i,r))),d}function Wy(i,n,r){let l;const a=Hy(i,r);if(!a)return null;if(a.warnings.forEach(u=>sp(a.options.logLevel,u)),a.errors.length>0){if(a.options.logLevel!=="silent")throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:l},r))}const Qy=new Set(["get","post","put","delete","patch","options","head"]);function Ap(i){const n=Gy(i);if(!n)throw new Error("请输入 API CLI 配置文本");let r;try{r=JSON.parse(n)}catch{r=Wy(n)}const l=r&&typeof r=="object"?r:{};return Qu(l.api??l.config??l.operation??r)}function Jy(){return Wu({method:"post",path:"/api/v1/example/{id}",summary:"创建示例",operationId:"createExample",tags:["示例","后台管理"],description:"接口用途、业务约束、鉴权说明等。",parameters:[{name:"id",location:"path",required:!0,type:"string",description:"示例 ID"}],requestBody:{required:!0,contentType:"application/json",fields:[{name:"name",type:"string",required:!0,description:"名称"},{name:"profile",type:"object",description:"扩展信息",children:[{name:"email",type:"string",description:"邮箱"}]}]},responses:[{status:"200",description:"OK",contentType:"application/json",fields:[{name:"data",type:"object",description:"响应数据",children:[{name:"id",type:"string",description:"记录 ID"}]}]}]})}function Wu(i){return JSON.stringify({api:Qu(i)})}function Qu(i){if(!i||typeof i!="object")throw new Error("接口配置不能为空");const n=i,r=rt(n.method).toLowerCase();if(!Qy.has(r))throw new Error("请选择有效的请求方法");const l=Zy(rt(n.path)),a=rt(n.summary);if(!l)throw new Error("接口路径不能为空");if(!a)throw new Error("接口名称不能为空");const u=xi(n.parameters).map(so).filter(g=>g.name),d=n.requestBody&&typeof n.requestBody=="object"?n.requestBody:{},h=xi(d.fields).map(so).filter(g=>g.name),y=xi(n.responses).map(Yy).filter(g=>g.status);return y.length||y.push({status:"200",description:"Success",contentType:"application/json",fields:[]}),{method:r,path:l,summary:a,description:rt(n.description),operationId:rt(n.operationId),tags:Xy(n.tags),parameters:u,requestBody:{required:!!d.required,contentType:rt(d.contentType)||"application/json",fields:h},responses:y}}function Yy(i){const n=i&&typeof i=="object"?i:{};return{status:rt(n.status)||"200",description:rt(n.description)||"Success",contentType:rt(n.contentType)||"application/json",fields:xi(n.fields).map(so).filter(r=>r.name)}}function so(i){const n=i&&typeof i=="object"?i:{},r=rt(n.location);return{name:rt(n.name),location:["query","path","header","cookie","body"].includes(r)?r:"query",required:!!n.required,type:rt(n.type)||"string",format:rt(n.format),description:rt(n.description),defaultValue:rt(n.defaultValue),enumValue:rt(n.enumValue),children:xi(n.children).map(so).filter(l=>l.name)}}function Gy(i){return i.trim().replace(/^```(?:json|ya?ml|yaml)?\s*/i,"").replace(/```$/i,"").trim()}function Xy(i){return Array.isArray(i)?i.map(rt).filter(Boolean):rt(i).split(",").map(n=>n.trim()).filter(Boolean)}function Zy(i){return i?i.startsWith("/")?i:`/${i}`:""}function rt(i){return typeof i=="string"?i.trim():""}function xi(i){return Array.isArray(i)?i:[]}const eg="/api/openapi/import",tg="/api/openapi/document",ng="/api/openapi/auth-check",rg="/api/openapi/cache",sg="/api/openapi/versions",ig="/api/openapi/version-select",lg="/api/openapi/version-meta",og="/api/openapi/version-delete",ag="/api/openapi/version-export",ug="/api/mock/start",cg="/api/mock/status",fg="/api/openapi/custom-operation",dg="/api/openapi/custom-operation/delete",pg="/api/openapi/operation-links",hg="apiskill.swagger.syncedAt.v1",mg="apiskill.swagger.sourceUrl.v1",yg=["get","post","put","delete","patch","options","head"],gg=12;function vg(i){const n=i.paths??{};return Object.entries(n).flatMap(([r,l])=>yg.flatMap(a=>{var x;const u=l==null?void 0:l[a];if(!u)return[];const d=(x=u.tags)!=null&&x.length?u.tags:["未分组"],h=u.summary||u.description||"未命名接口",y=u.parameters??[],g=[a,r,h,u.description,u.operationId,d.join(" "),y.map(k=>`${k.name} ${k.description??""}`).join(" ")].filter(Boolean).join(" ").toLowerCase();return[{id:`${a.toUpperCase()} ${r}`,path:r,method:a,operation:u,tags:d,summary:h,hasBody:Ag(u),searchable:g}]})).sort((r,l)=>r.path.localeCompare(l.path)||r.method.localeCompare(l.method))}function wg(i){const n=new Map;return i.forEach(r=>{r.tags.forEach(l=>n.set(l,(n.get(l)??0)+1))}),[...n.entries()].map(([r,l])=>({name:r,count:l})).sort((r,l)=>l.count-r.count||r.name.localeCompare(l.name))}function Ni(i){return i?decodeURIComponent(i.split("/").pop()??i):""}function Pt(i,n,r=new Set){var l;if(n){if(n.$ref){if(r.has(n.$ref))return{type:"object",description:`循环引用: ${Ni(n.$ref)}`};r.add(n.$ref);const a=n.$ref.startsWith("#/")?n.$ref.slice(2).split("/").reduce((u,d)=>{if(u&&typeof u=="object")return u[decodeURIComponent(d)]},i):void 0;return Pt(i,a,r)}return(l=n.allOf)!=null&&l.length?kg(i,n.allOf,n):n}}function kg(i,n,r){return n.reduce((l,a)=>{const u=Pt(i,a)??{};return{...l,...u,description:[l.description,u.description].filter(Boolean).join(";")||l.description,required:[...new Set([...l.required??[],...u.required??[]])],properties:{...l.properties??{},...u.properties??{}}}},{...r,allOf:void 0})}function ps(i,n){var l,a,u;if(!n)return"-";if(n.$ref)return Ni(n.$ref);const r=Pt(i,n)??n;if((l=r.enum)!=null&&l.length){const d=r.enum.map(Tr).join(" | ");return`${r.type??"enum"}<${d}>`}return r.type==="array"?`${ps(i,r.items)}[]`:(a=r.anyOf)!=null&&a.length?r.anyOf.map(d=>ps(i,d)).join(" | "):(u=r.oneOf)!=null&&u.length?r.oneOf.map(d=>ps(i,d)).join(" | "):r.additionalProperties&&typeof r.additionalProperties=="object"?`Record<string, ${ps(i,r.additionalProperties)}>`:[r.type,r.format].filter(Boolean).join(":")||"object"}function Or(i){var n;return((n=i==null?void 0:i.description)==null?void 0:n.trim())||""}function nr(i,n,r={}){var y;const l=r.depth??0;if(!n||l>gg)return[];if(n.$ref){if((y=r.seen)!=null&&y.has(n.$ref))return[{name:r.prefix||Ni(n.$ref),path:r.prefix||Ni(n.$ref),location:r.location,required:!1,type:Ni(n.$ref),description:"循环引用,已停止展开",defaultValue:"",enumValue:"",depth:l}];const g=new Set(r.seen??[]);return g.add(n.$ref),nr(i,Pt(i,n),{...r,seen:g})}const a=Pt(i,n)??n,u=[],d=a.properties??{},h=a.required??r.requiredFields??[];if(a.type==="array"){const g=r.prefix||"[]";return u.push(pu(i,g,g,a,!1,l,r.location)),u.push(...nr(i,a.items,{...r,prefix:`${g}[]`,depth:l+1})),u}return Object.keys(d).length===0?(r.prefix&&u.push(pu(i,r.prefix.split(".").pop()??r.prefix,r.prefix,a,!1,l,r.location)),u):(Pg(d).forEach(([g,x])=>{const k=r.prefix?`${r.prefix}.${g}`:g,E=h.includes(g);u.push(pu(i,g,k,x,E,l,r.location));const O=Pt(i,x)??x;if(O.type==="array"||!!(O.properties&&Object.keys(O.properties).length)||!!O.$ref){if(O.type==="array"){const S=O.items,I=Pt(i,S)??S;u.push(...nr(i,S,{...r,prefix:`${k}[]`,requiredFields:I==null?void 0:I.required,depth:l+1}));return}u.push(...nr(i,x,{...r,prefix:k,requiredFields:O.required,depth:l+1}))}}),u)}function Pp(i,n=[]){return _i(n.filter(r=>r.in!=="body").map(r=>{var a;const l=bg(r);return{name:r.name,path:r.name,location:r.in,required:!!r.required,type:ps(i,l),description:r.description||Or(l)||"",defaultValue:(l==null?void 0:l.default)===void 0?"":Tr(l.default),enumValue:((a=l==null?void 0:l.enum)==null?void 0:a.map(Tr).join(", "))??"",depth:0}}))}function Sg(i,n){var d,h,y;const r=((d=n.requestBody)==null?void 0:d.content)??{},l=Object.fromEntries(Object.entries(r).map(([g,x])=>[g,_i(nr(i,x.schema).map(k=>({...k,location:"body"})))]));if(Object.keys(l).length)return l;const a=(h=n.parameters)==null?void 0:h.find(g=>g.in==="body");if(!(a!=null&&a.schema))return{};const u=(y=n.consumes)!=null&&y.length?n.consumes:["application/json"];return Object.fromEntries(u.map(g=>[g,_i(nr(i,a.schema).map(x=>({...x,location:"body"})))]))}function jg(i,n){const r=n.responses??{};return Object.fromEntries(Object.entries(r).map(([l,a])=>{var g;const u=a.content??{},d=Object.fromEntries(Object.entries(u).map(([x,k])=>[x,_i(nr(i,k.schema).map(E=>({...E,location:`response ${l}`})))]));if(Object.keys(d).length)return[l,d];const h=a.schema??a.responseSchema;if(!h)return[l,{}];const y=(g=n.produces)!=null&&g.length?n.produces:["application/json"];return[l,Object.fromEntries(y.map(x=>[x,_i(nr(i,h).map(k=>({...k,location:`response ${l}`})))]))]}))}function bp(i,n){const r=n.operation,l=Eg(r);return{method:n.method,path:n.path,summary:n.summary,description:r.description||"",operationId:r.operationId||"",tags:n.tags,parameters:Pp(i,r.parameters).map(Cg),requestBody:{required:(l==null?void 0:l.required)??!1,contentType:(l==null?void 0:l.contentType)||"application/json",fields:l!=null&&l.schema?ks(i,l.schema):[]},responses:Object.entries(r.responses??{}).map(([a,u])=>{const d=Og(r,u);return{status:a,description:u.description||"",contentType:(d==null?void 0:d.contentType)||"application/json",fields:d!=null&&d.schema?ks(i,d.schema):[]}})}}function xg(i,n){return Wu(bp(i,n))}function Ng(i){return JSON.stringify({method:i.method.toUpperCase(),path:i.path,tags:i.tags,summary:i.summary,operation:i.operation},null,2)}function Cg(i){return{name:i.path||i.name,location:Ig(i.location),required:i.required,type:Lg(i.type),description:i.description||"",defaultValue:i.defaultValue||"",enumValue:i.enumValue||""}}function Eg(i){var a,u,d,h,y;const n=((a=i.requestBody)==null?void 0:a.content)??{},r=Object.entries(n)[0];if(r!=null&&r[1].schema)return{required:!!((u=i.requestBody)!=null&&u.required),contentType:r[0],schema:r[1].schema};const l=(d=i.parameters)==null?void 0:d.find(g=>g.in==="body");if(l!=null&&l.schema)return{required:!!l.required,contentType:((h=i.consumes)==null?void 0:h.find(g=>g.includes("json")))??((y=i.consumes)==null?void 0:y[0])??"application/json",schema:l.schema}}function Og(i,n){var a,u;const r=Object.entries(n.content??{})[0];if(r!=null&&r[1].schema)return{contentType:r[0],schema:r[1].schema};const l=n.schema??n.responseSchema;if(l)return{contentType:((a=i.produces)==null?void 0:a.find(d=>d.includes("json")))??((u=i.produces)==null?void 0:u[0])??"application/json",schema:l}}function ks(i,n,r=new Set){const l=Pt(i,n)??n;if(n.$ref){if(r.has(n.$ref))return[];const a=new Set(r);return a.add(n.$ref),ks(i,l,a)}return l.type==="array"?[{name:"items",location:"body",type:"array",description:Or(n)||Or(l),children:l.items?ks(i,l.items,r):[]}]:Object.entries(l.properties??{}).map(([a,u])=>Tg(i,a,u,(l.required??[]).includes(a),r))}function Tg(i,n,r,l,a){var y;const u=Pt(i,r)??r,d=_g(i,r),h={name:n,location:"body",required:l,type:d,format:u.format||r.format||"",description:Or(r)||Or(u),defaultValue:u.default===void 0?"":Tr(u.default),enumValue:((y=u.enum)==null?void 0:y.map(Tr).join(", "))??""};if(d==="object"&&(h.children=r.$ref&&a.has(r.$ref)?[]:ks(i,u,Dd(r,a))),d==="array"){const g=u.items;h.children=g?ks(i,g,Dd(r,a)):[]}return h}function Dd(i,n){if(!i.$ref)return n;const r=new Set(n);return r.add(i.$ref),r}function _g(i,n){const r=Pt(i,n)??n;return r.type==="array"?"array":r.type==="object"||r.properties||n.$ref?"object":r.type==="integer"?"integer":r.type==="number"?"number":r.type==="boolean"?"boolean":"string"}function Ig(i){return i==="path"||i==="query"||i==="header"||i==="cookie"||i==="body"?i:"body"}function Lg(i){const n=i.toLowerCase();return n.includes("[]")||n.includes("array")?"array":n.includes("object")?"object":n.includes("integer")?"integer":n.includes("number")?"number":n.includes("boolean")?"boolean":"string"}function Ag(i){var n;return!!i.requestBody||!!((n=i.parameters)!=null&&n.some(r=>r.in==="body"))}function Pg(i){return Object.entries(i).sort(([n],[r])=>n.localeCompare(r,void 0,{sensitivity:"base"}))}function _i(i){return[...i].sort((n,r)=>{const l=n.path||n.name,a=r.path||r.name;return l.localeCompare(a,void 0,{sensitivity:"base"})})}function bg(i){var n;if(i.schema)return i.schema;if(!(!i.type&&!i.format&&!i.items&&!((n=i.enum)!=null&&n.length)&&i.default===void 0))return{type:i.type,format:i.format,items:i.items,enum:i.enum,default:i.default,description:i.description}}function pu(i,n,r,l,a,u,d){var y;const h=Pt(i,l)??l;return{name:n,path:r,location:d,required:a,type:ps(i,l),description:Or(l)||Or(h),defaultValue:h.default===void 0?"":Tr(h.default),enumValue:((y=h.enum)==null?void 0:y.map(Tr).join(", "))??"",depth:u}}function Tr(i){if(i==null)return"";if(typeof i=="string")return i;const n=JSON.stringify(i);return n===void 0?String(i):n}const Mg=["get","post","put","delete","patch","options","head"],Rg=["string","number","integer","boolean","array","object"],$g=["query","path","header","cookie"];function Dg({selectedVersionId:i,saving:n,initialConfig:r,onClose:l,onSave:a}){var Ne,ke,Ce,Ge,sn,sr;const u=A.useMemo(()=>r??Ap(Jy()),[r]),[d,h]=A.useState(u.method),[y,g]=A.useState(u.path),[x,k]=A.useState(u.summary),[E,O]=A.useState(u.operationId??""),[b,S]=A.useState((u.tags??[]).join(",")),[I,R]=A.useState(u.description??""),[H,F]=A.useState(!!((Ne=u.requestBody)!=null&&Ne.required)),[K,G]=A.useState(((ke=u.requestBody)==null?void 0:ke.contentType)||"application/json"),[Q,q]=A.useState((Ce=u.parameters)!=null&&Ce.length?u.parameters:[ht("query")]),[U,ae]=A.useState((sn=(Ge=u.requestBody)==null?void 0:Ge.fields)!=null&&sn.length?u.requestBody.fields:[ht("body")]),[D,Z]=A.useState((sr=u.responses)!=null&&sr.length?u.responses:[vi()]),[te,de]=A.useState(()=>Wu(u)),[Ie,_e]=A.useState(!1),[De,xe]=A.useState([]),W=A.useRef(!1),ne=A.useRef(null),X=r?"编辑当前接口":i?"追加到当前版本":"保存为新版本",C=A.useMemo(()=>Ug({method:d,path:y,summary:x,operationId:E,tags:b,description:I,requestBodyRequired:H,requestContentType:K,parameters:Q,bodyFields:U,responses:D}),[U,I,d,E,Q,y,H,K,D,x,b]);A.useEffect(()=>{if(W.current){W.current=!1;return}de(Fg(C))},[C]),A.useEffect(()=>{const Y=ne.current;if(!Y)return;const Se=window.getComputedStyle(Y),st=Number.parseFloat(Se.lineHeight)||18,Je=(Number.parseFloat(Se.paddingTop)||0)+(Number.parseFloat(Se.paddingBottom)||0)+(Number.parseFloat(Se.borderTopWidth)||0)+(Number.parseFloat(Se.borderBottomWidth)||0),it=st*3+Je,ln=st*16+Je;Y.style.height="auto",Y.style.height=`${Math.min(ln,Math.max(it,Y.scrollHeight))}px`},[te]);function M(Y){Y.preventDefault();const Se=zd(te);if(Se.errors.length){xe(Se.errors);return}xe([]),a(Se.config)}function he(Y){de(Y);const Se=zd(Y);Se.errors.length||(W.current=!0,xe([]),J(Se.config))}function J(Y){var Se,st,Je,it,ln,Tn;h(Y.method),g(Y.path),k(Y.summary),O(Y.operationId??""),S((Y.tags??[]).join(",")),R(Y.description??""),F(!!((Se=Y.requestBody)!=null&&Se.required)),G(((st=Y.requestBody)==null?void 0:st.contentType)||"application/json"),q((Je=Y.parameters)!=null&&Je.length?Y.parameters:[ht("query")]),ae((ln=(it=Y.requestBody)==null?void 0:it.fields)!=null&&ln.length?Y.requestBody.fields:[ht("body")]),Z((Tn=Y.responses)!=null&&Tn.length?Y.responses:[vi()])}function ye(){if(Kg(te,ne.current)){pe();return}navigator.clipboard.writeText(te).then(pe).catch(()=>{})}function pe(){_e(!0),window.setTimeout(()=>_e(!1),1600)}return p.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"add-api-title",children:p.jsxs("form",{className:"api-config-dialog",onSubmit:M,noValidate:!0,children:[p.jsxs("div",{className:"import-dialog-header",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow",children:"Manual API Config"}),p.jsx("h2",{id:"add-api-title",children:r?"编辑API配置":"新增API配置"})]}),p.jsx("span",{className:"import-badge running",children:X})]}),p.jsxs("div",{className:"api-config-body",children:[De.length?p.jsx(zg,{errors:De}):null,p.jsxs("section",{className:"api-config-section",children:[p.jsxs("div",{className:"section-title-row",children:[p.jsxs("div",{children:[p.jsx("h3",{children:"CLI配置"}),p.jsx("p",{children:"支持紧凑 JSON 或 YAML。CLI 与下方表单保持联动,粘贴有效配置后会自动同步表单。"})]}),p.jsxs("button",{type:"button",className:"secondary-button",onClick:ye,children:[Ie?p.jsx(Ci,{size:15}):p.jsx(ki,{size:15}),Ie?"已复制":"复制"]})]}),p.jsx("textarea",{ref:ne,className:"api-cli-editor",value:te,onChange:Y=>he(Y.target.value),rows:3,spellCheck:!1})]}),p.jsxs("section",{className:"api-config-section",children:[p.jsxs("div",{className:"section-title-row",children:[p.jsx("h3",{children:"基础信息"}),p.jsx("code",{children:i||"manual-new-version"})]}),p.jsxs("div",{className:"api-config-grid",children:[p.jsxs("label",{children:[p.jsx("span",{children:"方法 *"}),p.jsx("select",{value:d,onChange:Y=>h(Y.target.value),children:Mg.map(Y=>p.jsx("option",{value:Y,children:Y.toUpperCase()},Y))})]}),p.jsxs("label",{className:"span-2",children:[p.jsx("span",{children:"路径 *"}),p.jsx("input",{value:y,onChange:Y=>g(Y.target.value),placeholder:"/api/v1/example/{id}"})]}),p.jsxs("label",{children:[p.jsx("span",{children:"接口名称 *"}),p.jsx("input",{value:x,onChange:Y=>k(Y.target.value),placeholder:"查询示例详情"})]}),p.jsxs("label",{children:[p.jsx("span",{children:"Operation ID"}),p.jsx("input",{value:E,onChange:Y=>O(Y.target.value),placeholder:"getExampleDetail"})]}),p.jsxs("label",{children:[p.jsx("span",{children:"分组 Tags"}),p.jsx("input",{value:b,onChange:Y=>S(Y.target.value),placeholder:"示例,后台管理"})]}),p.jsxs("label",{className:"span-all",children:[p.jsx("span",{children:"说明"}),p.jsx("textarea",{value:I,onChange:Y=>R(Y.target.value),placeholder:"接口用途、业务约束、注意事项"})]})]})]}),p.jsx(Bg,{title:"参数",description:"用于 path / query / header / cookie 参数。body 字段请放到请求体。",fields:Q,allowLocation:!0,onAdd:()=>q([...Q,ht("query")]),onChange:(Y,Se)=>q(fn(Q,Y,Se)),onRemove:Y=>q(wi(Q,Y,ht("query")))}),p.jsxs("section",{className:"api-config-section",children:[p.jsxs("div",{className:"section-title-row",children:[p.jsxs("div",{children:[p.jsx("h3",{children:"请求体"}),p.jsx("p",{children:"对象字段可以展开配置子字段,也支持用点号声明嵌套字段,例如 user.name。"})]}),p.jsxs("label",{className:"inline-check",children:[p.jsx("input",{type:"checkbox",checked:H,onChange:Y=>F(Y.target.checked)}),"必填"]})]}),p.jsx("div",{className:"api-config-grid compact",children:p.jsxs("label",{children:[p.jsx("span",{children:"Content-Type"}),p.jsx("input",{value:K,onChange:Y=>G(Y.target.value)})]})}),p.jsx(io,{fields:U,onAdd:()=>ae([...U,ht("body")]),onChange:(Y,Se)=>ae(fn(U,Y,{...Se,location:"body"})),onRemove:Y=>ae(wi(U,Y,ht("body")))})]}),p.jsxs("section",{className:"api-config-section",children:[p.jsxs("div",{className:"section-title-row",children:[p.jsxs("div",{children:[p.jsx("h3",{children:"响应"}),p.jsx("p",{children:"每个状态码可配置一组响应字段,保存时会写入 OpenAPI responses。"})]}),p.jsxs("button",{type:"button",className:"secondary-button",onClick:()=>Z([...D,vi()]),children:[p.jsx(lo,{size:15}),"状态码"]})]}),D.map((Y,Se)=>{var st;return p.jsxs("div",{className:"response-config",children:[p.jsxs("div",{className:"api-config-grid compact",children:[p.jsxs("label",{children:[p.jsx("span",{children:"状态码 *"}),p.jsx("input",{value:Y.status,onChange:Je=>Z(fn(D,Se,{...Y,status:Je.target.value}))})]}),p.jsxs("label",{children:[p.jsx("span",{children:"描述"}),p.jsx("input",{value:Y.description??"",onChange:Je=>Z(fn(D,Se,{...Y,description:Je.target.value}))})]}),p.jsxs("label",{children:[p.jsx("span",{children:"Content-Type"}),p.jsx("input",{value:Y.contentType??"application/json",onChange:Je=>Z(fn(D,Se,{...Y,contentType:Je.target.value}))})]}),p.jsx("button",{type:"button",className:"icon-danger-button",onClick:()=>Z(wi(D,Se,vi())),children:p.jsx(oo,{size:15})})]}),p.jsx(io,{fields:(st=Y.fields)!=null&&st.length?Y.fields:[ht("body")],onAdd:()=>Z(fn(D,Se,{...Y,fields:[...Y.fields??[],ht("body")]})),onChange:(Je,it)=>Z(fn(D,Se,{...Y,fields:fn(Y.fields??[],Je,{...it,location:"body"})})),onRemove:Je=>Z(fn(D,Se,{...Y,fields:wi(Y.fields??[],Je,ht("body"))}))})]},`response-${Se}`)})]})]}),p.jsxs("div",{className:"import-dialog-actions",children:[p.jsx("button",{className:"secondary-button",type:"button",onClick:l,disabled:n,children:"取消"}),p.jsxs("button",{className:"primary-button",type:"submit",disabled:n,children:[p.jsx(Rm,{size:16}),n?"保存中":"保存"]})]})]})})}function zg({errors:i}){return p.jsxs("div",{className:"api-config-errors",children:[p.jsx(Ei,{size:17}),p.jsxs("div",{children:[p.jsx("strong",{children:"请补全必填配置"}),i.map(n=>p.jsx("p",{children:n},n))]})]})}function Bg({title:i,description:n,fields:r,allowLocation:l,onAdd:a,onChange:u,onRemove:d}){return p.jsxs("section",{className:"api-config-section",children:[p.jsxs("div",{className:"section-title-row",children:[p.jsxs("div",{children:[p.jsx("h3",{children:i}),p.jsx("p",{children:n})]}),p.jsxs("button",{type:"button",className:"secondary-button",onClick:a,children:[p.jsx(lo,{size:15}),"字段"]})]}),p.jsx(io,{fields:r,allowLocation:l,onAdd:a,onChange:u,onRemove:d})]})}function io({fields:i,allowLocation:n,onAdd:r,onChange:l,onRemove:a}){return p.jsxs("div",{className:"field-config-table",children:[p.jsxs("div",{className:`field-config-head ${n?"with-location":""}`,children:[n?p.jsx("span",{children:"位置"}):null,p.jsx("span",{children:"字段名"}),p.jsx("span",{children:"类型"}),p.jsx("span",{children:"必填"}),p.jsx("span",{children:"说明"}),p.jsx("span",{children:"枚举"}),p.jsx("span",{})]}),i.map((u,d)=>{var h;return p.jsxs("div",{className:"field-config-item",children:[p.jsxs("div",{className:`field-config-row ${n?"with-location":""}`,children:[n?p.jsx("select",{value:u.location??"query",onChange:y=>l(d,{...u,location:y.target.value}),children:$g.map(y=>p.jsx("option",{value:y,children:y},y))}):null,p.jsx("input",{value:u.name,onChange:y=>l(d,{...u,name:y.target.value}),placeholder:"id / user.name"}),p.jsx("select",{value:u.type||"string",onChange:y=>l(d,qg(u,y.target.value)),children:Rg.map(y=>p.jsx("option",{value:y,children:y},y))}),p.jsx("label",{className:"field-check",children:p.jsx("input",{type:"checkbox",checked:!!u.required,onChange:y=>l(d,{...u,required:y.target.checked})})}),p.jsx("input",{value:u.description??"",onChange:y=>l(d,{...u,description:y.target.value}),placeholder:"字段说明"}),p.jsx("input",{value:u.enumValue??"",onChange:y=>l(d,{...u,enumValue:y.target.value}),placeholder:"a,b,c"}),p.jsx("button",{type:"button",className:"icon-danger-button",onClick:()=>a(d),"aria-label":"删除字段",children:p.jsx(oo,{size:15})})]}),u.type==="object"||u.type==="array"?p.jsxs("div",{className:"child-field-config",children:[p.jsx("div",{className:"child-field-title",children:"下一级结构"}),p.jsx(io,{fields:(h=u.children)!=null&&h.length?u.children:[ht("body")],onAdd:()=>l(d,{...u,children:[...u.children??[],ht("body")]}),onChange:(y,g)=>l(d,{...u,children:fn(u.children??[],y,g)}),onRemove:y=>l(d,{...u,children:wi(u.children??[],y,ht("body"))})})]}):null]},`field-${d}`)}),p.jsxs("button",{type:"button",className:"field-add-row",onClick:r,children:[p.jsx(lo,{size:14}),"增加字段"]})]})}function Ug(i){return{method:i.method,path:i.path,summary:i.summary,operationId:i.operationId,tags:i.tags.split(",").map(n=>n.trim()).filter(Boolean),description:i.description,parameters:i.parameters,requestBody:{required:i.requestBodyRequired,contentType:i.requestContentType,fields:i.bodyFields},responses:i.responses}}function zd(i){try{return Vg(Ap(i))}catch(n){return{config:Hg(),errors:[n instanceof Error?n.message:"CLI 配置解析失败"]}}}function Fg(i){return JSON.stringify({api:i})}function Vg(i){var r,l,a;const n=[];if(i.method||n.push("请选择请求方法"),(r=i.path)!=null&&r.trim()||n.push("请填写接口路径"),(l=i.summary)!=null&&l.trim()||n.push("请填写接口名称"),Xl(i.parameters??[],"参数",n),Xl(((a=i.requestBody)==null?void 0:a.fields)??[],"请求体字段",n),(i.responses??[]).forEach((u,d)=>{var h;(h=u.status)!=null&&h.trim()||n.push(`响应 #${d+1} 请填写状态码`),Xl(u.fields??[],`响应 ${u.status||`#${d+1}`} 字段`,n)}),n.length)return{config:i,errors:n};try{return{config:Qu(i),errors:[]}}catch(u){return{config:i,errors:[u instanceof Error?u.message:"接口配置校验失败"]}}}function Xl(i,n,r,l=""){i.forEach((a,u)=>{var h;const d=`${n}${l?` ${l}`:""} #${u+1}`;Mp(a)&&((h=a.name)!=null&&h.trim()||r.push(`${d} 请填写字段名`),(a.type==="object"||a.type==="array")&&Xl(a.children??[],n,r,a.name||`#${u+1}`))})}function Kg(i,n){if(n)return n.focus(),n.select(),document.execCommand("copy");const r=document.createElement("textarea");r.value=i,r.setAttribute("readonly","true"),r.style.position="fixed",r.style.left="-9999px",r.style.top="0",document.body.appendChild(r),r.focus(),r.select();try{return document.execCommand("copy")}finally{document.body.removeChild(r)}}function Mp(i){var n,r,l,a,u;return!!((n=i.name)!=null&&n.trim()||(r=i.description)!=null&&r.trim()||(l=i.enumValue)!=null&&l.trim()||(a=i.defaultValue)!=null&&a.trim()||i.required||(u=i.children)!=null&&u.some(Mp))}function qg(i,n){var r;return n==="object"||n==="array"?{...i,type:n,children:(r=i.children)!=null&&r.length?i.children:[ht("body")]}:{...i,type:n,children:void 0}}function Hg(){return{method:"get",path:"",summary:"",responses:[vi()]}}function ht(i="query"){return{name:"",location:i,required:!1,type:"string",description:"",enumValue:""}}function vi(){return{status:"200",description:"Success",contentType:"application/json",fields:[ht("body")]}}function fn(i,n,r){return n>=i.length?[...i,r]:i.map((l,a)=>a===n?r:l)}function wi(i,n,r){const l=i.filter((a,u)=>u!==n);return l.length?l:[r]}function Wg({versions:i,selectedVersionId:n,currentVersion:r,disabled:l,onSelect:a,onPrepareUpdate:u,onUpdateEnvironment:d,onDelete:h}){const[y,g]=A.useState(!1),[x,k]=A.useState(""),[E,O]=A.useState(""),[b,S]=A.useState(""),[I,R]=A.useState(""),[H,F]=A.useState(""),K=A.useMemo(()=>r??i.find(D=>D.versionId===n),[r,n,i]);A.useEffect(()=>{y||(k(""),F(""))},[y]);function G(D){F(""),k(D.versionId||""),O(D.environmentName||""),S(D.environmentBaseUrl||"")}async function Q(D){R(D),F("");try{await d(D,E,b),k(""),F("环境已保存")}catch(Z){F(Z instanceof Error?Z.message:"环境保存失败")}finally{R("")}}async function q(D){const Z=D.versionId;if(Z&&window.confirm(`确认删除文档版本 ${hu(D)}?`)){R(Z),F("");try{await h(Z),F("版本已删除")}catch(te){F(te instanceof Error?te.message:"版本删除失败")}finally{R("")}}}async function U(D){const Z=D.versionId;if(Z){R(Z),F("");try{await u(D),g(!1)}catch(te){F(te instanceof Error?te.message:"准备更新失败")}finally{R("")}}}function ae(D){if(!D)return;const Z=document.createElement("a");Z.href=`${ag}?versionId=${encodeURIComponent(D)}`,Z.download=`${D}.json`,document.body.appendChild(Z),Z.click(),document.body.removeChild(Z)}return p.jsxs("div",{className:"version-manager",children:[p.jsxs("button",{className:"version-manager-trigger",onClick:()=>g(!0),disabled:l||!i.length,children:[p.jsx(Qd,{size:16}),p.jsxs("span",{children:[p.jsx("strong",{children:K?hu(K):"无缓存版本"}),p.jsx("small",{children:K?[K.environmentName||"未设置环境",K.paths===void 0?"":`${K.paths} paths`,K.savedAt?Bd(K.savedAt):""].filter(Boolean).join(" · "):"导入或爬取文档后可管理版本"})]})]}),y?p.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"version-manager-title",children:p.jsxs("div",{className:"version-manager-dialog",children:[p.jsxs("div",{className:"import-dialog-header",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow",children:"Document Versions"}),p.jsx("h2",{id:"version-manager-title",children:"文档版本管理"})]}),p.jsx("button",{className:"icon-secondary-button",onClick:()=>g(!1),"aria-label":"关闭",children:p.jsx(to,{size:17})})]}),p.jsxs("div",{className:"version-manager-body",children:[H?p.jsx("div",{className:H.includes("失败")||H.includes("不支持")?"version-message error":"version-message",children:H}):null,i.length?i.map(D=>{const Z=D.versionId||"",te=x===Z,de=I===Z,Ie=Z===n;return p.jsxs("section",{className:`version-item ${Ie?"active":""}`,children:[p.jsxs("div",{className:"version-item-main",children:[p.jsxs("div",{children:[p.jsxs("div",{className:"version-item-title",children:[p.jsx("strong",{children:hu(D)}),Ie?p.jsx("span",{children:"当前"}):null]}),p.jsx("p",{children:Z})]}),p.jsxs("div",{className:"version-item-stats",children:[p.jsx("span",{children:D.mode||"unknown"}),p.jsxs("span",{children:[D.paths??0," paths"]}),p.jsxs("span",{children:[D.schemas??0," schemas"]}),p.jsx("span",{children:D.savedAt?Bd(D.savedAt):"-"})]})]}),te?p.jsxs("div",{className:"version-env-editor",children:[p.jsxs("label",{children:["环境名称",p.jsx("input",{value:E,onChange:_e=>O(_e.target.value),placeholder:"例如 dev / test / prod"})]}),p.jsxs("label",{children:["Base URL",p.jsx("input",{value:b,onChange:_e=>S(_e.target.value),placeholder:"https://api.example.com"})]})]}):p.jsxs("div",{className:"version-env-summary",children:[p.jsx("span",{children:D.environmentName||"未设置环境"}),p.jsx("code",{children:D.environmentBaseUrl||"未设置 Base URL"})]}),p.jsxs("div",{className:"version-item-actions",children:[p.jsxs("button",{className:"secondary-button",onClick:()=>a(Z),disabled:Ie||de||!Z,children:[p.jsx(eo,{size:15}),"切换"]}),p.jsxs("button",{className:"primary-button",onClick:()=>U(D),disabled:de||!Z,children:[p.jsx(eo,{size:15}),"更新"]}),te?p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"primary-button",onClick:()=>Q(Z),disabled:de||!Z,children:[p.jsx(Ci,{size:15}),"保存环境"]}),p.jsx("button",{className:"secondary-button",onClick:()=>k(""),disabled:de,children:"取消"})]}):p.jsxs("button",{className:"secondary-button",onClick:()=>G(D),disabled:de||!Z,children:[p.jsx(Iu,{size:15}),"环境"]}),p.jsxs("button",{className:"secondary-button",onClick:()=>ae(Z),disabled:!Z,children:[p.jsx(Am,{size:15}),"导出"]}),p.jsxs("button",{className:"danger-button",onClick:()=>q(D),disabled:de||!Z,children:[p.jsx(oo,{size:15}),"删除"]})]})]},Z)}):p.jsx("p",{className:"muted",children:"暂无缓存版本。"})]})]})}):null]})}function hu(i){return i.title||i.inputUrl||i.versionId||"未命名版本"}function Bd(i){const n=new Date(i);return Number.isNaN(n.getTime())?i:n.toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}const Qg=["all","get","post","put","delete","patch"],mu="apiskill-open-endpoint-tabs";function Ud(i){return{id:i.id,method:i.method,path:i.path,summary:i.summary||i.operation.operationId||i.path}}function yu(i,n){return`${i||"local"}::${n.id}`}function Jg(){const[i,n]=A.useState(null),[r,l]=A.useState("loading"),[a,u]=A.useState(""),[d,h]=A.useState(""),[y,g]=A.useState("all"),[x,k]=A.useState("all"),[E,O]=A.useState(!1),[b,S]=A.useState(""),[I,R]=A.useState(!1),[H,F]=A.useState([]),[K,G]=A.useState(!1),[Q,q]=A.useState(""),[U,ae]=A.useState("blank"),[D,Z]=A.useState([]),[te,de]=A.useState(""),[Ie,_e]=A.useState(void 0),[De,xe]=A.useState(""),[W,ne]=A.useState(""),[X,C]=A.useState(""),[M,he]=A.useState(""),[J,ye]=A.useState(null),[pe,Ne]=A.useState("API Skill Document"),[ke,Ce]=A.useState("1.0.0"),[Ge,sn]=A.useState("Created from API Skill blank document."),[sr,Y]=A.useState(!1),[Se,st]=A.useState(""),[Je,it]=A.useState(""),[ln,Tn]=A.useState(""),[_n,pn]=A.useState(""),[Cs,Es]=A.useState(""),[at,kt]=A.useState(null),[Tt,ir]=A.useState(null),[Ir,lr]=A.useState(!1),[bt,In]=A.useState(null),[Lr,or]=A.useState(""),[Ar,Mi]=A.useState(!1),[Os,Ln]=A.useState(void 0),[Ts,An]=A.useState(void 0),[_s,hn]=A.useState({}),[Pn,ar]=A.useState(!1),Pr=A.useRef(null);A.useEffect(()=>{async function N(){try{await Mr()}catch(P){u(P instanceof Error?P.message:"读取最新缓存失败"),l("ready")}finally{Rt()}}N(),xo()},[]);const Mt=A.useMemo(()=>i?vg(i):[],[i]),Qt=A.useMemo(()=>new Map(Mt.map(N=>[N.id,N])),[Mt]),br=A.useMemo(()=>wg(Mt),[Mt]),mn=A.useMemo(()=>{const N=d.trim().toLowerCase();return Mt.filter(P=>{const le=!N||P.searchable.includes(N),ge=y==="all"||P.tags.includes(y),we=x==="all"||P.method===x,fe=!E||P.hasBody;return le&&ge&&we&&fe})},[E,Mt,x,d,y]),Le=A.useMemo(()=>{if(!(!b&&I))return Qt.get(b)??mn[0]},[I,Qt,mn,b]),St=A.useMemo(()=>D.find(N=>N.versionId===te)??Ie,[te,Ie,D]),Is=Le?yu(te,Le):"",ur=Le?_s[Is]??Ql(Le.operation["x-apiskill-links"]):void 0;A.useEffect(()=>{Le&&Le.id!==b&&S(Le.id)},[Le,b]),A.useEffect(()=>{Le&&F(N=>N.some(P=>P.id===Le.id)?N:[...N,Ud(Le)])},[Le]),A.useEffect(()=>{F(N=>N.filter(P=>Qt.has(P.id)))},[Qt]),A.useEffect(()=>{var N;if(!(!te||!Qt.size))try{const P=localStorage.getItem(mu);if(!P){G(!0);return}const le=JSON.parse(P);if(le.versionId!==te){G(!0);return}const ge=le.tabIds.map(fe=>Qt.get(fe)).filter(fe=>!!fe).map(Ud);F(ge);const we=le.selectedId&&Qt.has(le.selectedId)?le.selectedId:((N=ge[0])==null?void 0:N.id)??"";S(we),R(le.allowEmptyDetail&&!we)}catch{localStorage.removeItem(mu)}finally{G(!0)}},[Qt,te]),A.useEffect(()=>{if(!te||!K)return;const N={versionId:te,tabIds:H.map(P=>P.id),selectedId:b,allowEmptyDetail:I};localStorage.setItem(mu,JSON.stringify(N))},[I,H,b,te,K]),A.useEffect(()=>{if((at==null?void 0:at.status)!=="running")return;const N=window.setInterval(()=>{kt(P=>!P||P.status!=="running"?P:{...P,progress:Math.min(88,P.progress+(P.mode==="crawl"||P.mode==="curl"?4:7))})},600);return()=>window.clearInterval(N)},[at==null?void 0:at.status,at==null?void 0:at.mode]);async function Mr(N){var ge,we,fe,Ve;G(!1);const P=N?await fetch(ig,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:N})}):await fetch(rg,{cache:"no-store"});if(P.status===404){n(null),de(""),_e(void 0),F([]),l("ready");return}if(!P.ok)throw new Error(`读取缓存失败: ${P.status}`);const le=await P.json();n(le.document),R(!1),F([]),xe(((ge=le.meta)==null?void 0:ge.savedAt)||""),de(((we=le.meta)==null?void 0:we.versionId)||""),_e(le.meta),Mn(le.meta,le.document),it(((fe=le.meta)==null?void 0:fe.resolvedUrl)||((Ve=le.meta)==null?void 0:Ve.inputUrl)||""),le.versions&&Z(le.versions),l("ready")}async function Rt(){const N=await fetch(sg,{cache:"no-store"});if(!N.ok)return;const P=await N.json();Z(P.versions??[])}function bn(N){return N==="file"||N==="crawl"||N==="curl"||N==="upload"}function Rr(N){if(bn(N))return N}function Mn(N,P){const le=Rr(N==null?void 0:N.mode);le&&ae(le),bn(N==null?void 0:N.mode)&&wo(N.mode,N.inputUrl||""),((N==null?void 0:N.mode)==="document"||(N==null?void 0:N.mode)==="manual")&&(P!=null&&P.info)&&(ae("blank"),Ne(P.info.title||"API Skill Document"),Ce(P.info.version||"1.0.0"),sn(P.info.description||""))}function Ls(N){if(!Se)return"";const P=D.find(le=>le.versionId===Se)??(te===Se?Ie:void 0);return N==="blank"?(P==null?void 0:P.mode)==="document"||(P==null?void 0:P.mode)==="manual"?Se:"":(P==null?void 0:P.mode)===N?Se:""}function wo(N,P){N==="crawl"?C(P):N==="curl"?he(P):N==="file"&&ne(P)}function As(N){return N==="curl"?"请输入 CURL 命令":N==="upload"?"请选择 JSON 或 YAML 文件":N==="crawl"?"请输入在线文档页地址":"请输入 Swagger/OpenAPI 文件地址"}function yn(){U==="crawl"?C(""):U==="curl"?he(""):U==="upload"?(ye(null),Pr.current&&(Pr.current.value="")):ne("")}async function Ri(N){if(N==="upload"){if(!J)throw new Error(As(N));if(!/\.(json|ya?ml)$/i.test(J.name))throw new Error("仅支持 JSON、YAML 或 YML 文件");return{input:J.name,content:await J.text()}}const P=N==="crawl"?X.trim():N==="curl"?M.trim():W.trim();if(!P)throw new Error(As(N));return{input:P}}async function Ps(N,P={type:"none"},le=!1,ge){var mt,Ui;let we;try{we=await Ri(N)}catch(ut){const Dt=ut instanceof Error?ut.message:As(N);u(Dt),kt({open:!0,mode:N,status:"error",progress:100,inputUrl:"",message:"未开始",error:Dt});return}const fe=we.input,Ve=ge||void 0,Oe=!!Ve;Y(!1),q(N),u(""),kt({open:!0,mode:N,status:"running",progress:N==="crawl"&&!le?6:N==="curl"?14:N==="crawl"?12:18,inputUrl:fe,message:N==="crawl"&&!le?"正在检测文档访问权限":N==="crawl"?Oe?"正在爬取并更新当前版本文档":"正在由 Node 爬取在线文档并识别 OpenAPI JSON 地址":N==="curl"?Oe?"正在执行 CURL 并更新当前版本文档":"正在解析并执行 CURL 请求":N==="upload"?Oe?"正在解析上传文件并更新当前版本文档":"正在读取并解析上传的 JSON / YAML 文件":Oe?"正在拉取并更新当前版本文档":"正在由 Node 拉取并解析 OpenAPI JSON 文件"});try{if(N!=="curl"&&N!=="upload"&&!le&&P.type==="none"){const zr=await t0(fe,N);if(zr.requiresAuth){ir({open:!0,mode:N,inputUrl:fe,message:zr.message||"该文档地址需要用户名和密码",updateVersionId:Ve}),kt(null),q("");return}kt(Jt=>(Jt==null?void 0:Jt.status)==="running"?{...Jt,progress:N==="crawl"?12:18,message:N==="crawl"?Oe?"正在爬取并更新当前版本文档":"正在由 Node 爬取在线文档并识别 OpenAPI JSON 地址":Oe?"正在拉取并更新当前版本文档":"正在由 Node 拉取并解析 OpenAPI JSON 文件"}:Jt)}const ut=await Zg(fe,N,P,we.content,Ve),Dt=ut.document,Rs=new Date().toISOString();localStorage.setItem(hg,Rs),localStorage.setItem(mg,fe),P.type==="basic"&&pn(""),G(!1),n(Dt),R(!1),F([]),xe(Rs),de(((mt=ut.meta)==null?void 0:mt.versionId)||""),_e(ut.meta),it(((Ui=ut.meta)==null?void 0:Ui.resolvedUrl)||fe),Mn(ut.meta,Dt),l("ready"),ut.versions?Z(ut.versions):await Rt(),kt({open:!0,mode:N,status:"success",progress:100,inputUrl:fe,message:Oe?"文档已更新并覆盖原版本":"文档已解析并保存为独立版本",meta:ut.meta}),st("")}catch(ut){const Dt=ut instanceof Error?ut.message:"导入失败,请检查地址或文档格式";u(Dt),kt({open:!0,mode:N,status:"error",progress:100,inputUrl:fe,message:"处理失败",error:Dt})}finally{q("")}}async function ko(){var ge,we,fe,Ve;const N=pe.trim();if(!N){u("请输入文档名称");return}const P=Ls("blank")||void 0,le=!!P;q("blank"),u(""),kt({open:!0,mode:"blank",status:"running",progress:45,inputUrl:N,message:le?"正在更新当前 OpenAPI 文档":"正在创建空白 OpenAPI 文档"});try{const Oe=await e0({title:N,version:ke.trim()||"1.0.0",description:Ge.trim(),versionId:P}),mt=((ge=Oe.meta)==null?void 0:ge.savedAt)||new Date().toISOString();G(!1),n(Oe.document),R(!0),F([]),S(""),xe(mt),de(((we=Oe.meta)==null?void 0:we.versionId)||""),_e(Oe.meta),it(((fe=Oe.meta)==null?void 0:fe.resolvedUrl)||((Ve=Oe.meta)==null?void 0:Ve.inputUrl)||"manual-document"),Mn(Oe.meta,Oe.document),l("ready"),Oe.versions?Z(Oe.versions):await Rt(),kt({open:!0,mode:"blank",status:"success",progress:100,inputUrl:N,message:le?"文档已更新并覆盖原版本":"空白文档已创建,可以继续新增 API 配置",meta:Oe.meta}),Y(!1),st("")}catch(Oe){const mt=Oe instanceof Error?Oe.message:"创建文档失败";u(mt),kt({open:!0,mode:"blank",status:"error",progress:100,inputUrl:N,message:"创建失败",error:mt})}finally{q("")}}async function $i(N,P){await navigator.clipboard.writeText(P),Es(N),window.setTimeout(()=>Es(""),1600)}function Di(){const N=(Tt==null?void 0:Tt.updateVersionId)??"";ir(null),Ps((Tt==null?void 0:Tt.mode)??"crawl",{type:"basic",username:ln,password:_n},!0,N)}function zi(N){F(P=>{const le=P.findIndex(we=>we.id===N),ge=P.filter(we=>we.id!==N);if(N===b){const we=ge[le]??ge[le-1];R(!we),S((we==null?void 0:we.id)??"")}return ge})}function $r(N){R(!1),S(N)}function So(N,P){const le=yu(te,N);hn(ge=>({...ge,[le]:Ql(P)}))}async function jo(N,P,le){const ge=await fetch(lg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:N,environmentName:P,environmentBaseUrl:le})}),we=await ge.json();if(!ge.ok)throw new Error(we.error||"环境保存失败");const fe=we;Z(fe.versions??[]),N===te&&_e(fe.meta)}async function ze(N){const P=await fetch(og,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:N})}),le=await P.json();if(!P.ok)throw new Error(le.error||"版本删除失败");const ge=le;if(Z(ge.versions??[]),N===te){if(ge.nextVersionId){await Mr(ge.nextVersionId);return}n(null),de(""),_e(void 0),F([]),xe(""),it(""),l("ready")}}async function xo(){try{const N=await fetch(cg,{cache:"no-store"});if(!N.ok)return;In(await N.json())}catch{}}async function bs(){var N;if(!i||!gn.endpoints){or("请先导入、爬取或新建 API 文档,并至少包含一个接口后再启动 MOCK 服务");return}Mi(!0),or(""),u("");try{const P=await fetch(ug,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:te||void 0})}),le=await P.json();if(!P.ok)throw new Error(le.error||"MOCK 服务启动失败");const ge=le;In(ge),or((N=ge.mock)!=null&&N.url?`MOCK 服务已启动:${ge.mock.url}`:"MOCK 服务已启动")}catch(P){or(P instanceof Error?P.message:"MOCK 服务启动失败")}finally{Mi(!1)}}async function Ms(N){const P=N.versionId||"";if(!P)throw new Error("请选择要更新的文档版本");const le=N.mode||"";P!==te?await Mr(P):Mn(N,i),ae(bn(le)?le:"blank"),st(P),Y(!0),u("")}async function Dr(N){var P,le,ge,we;ar(!0),u("");try{const fe=await n0(te||void 0,N,Ts),Ve=((P=fe.meta)==null?void 0:P.savedAt)||new Date().toISOString();n(fe.document),xe(Ve),de(((le=fe.meta)==null?void 0:le.versionId)||""),_e(fe.meta),it(((ge=fe.meta)==null?void 0:ge.resolvedUrl)||((we=fe.meta)==null?void 0:we.inputUrl)||"manual-api-config"),l("ready"),lr(!1),Ln(void 0),An(void 0),await Rt()}catch(fe){u(fe instanceof Error?fe.message:"新增接口保存失败")}finally{ar(!1)}}async function No(N){var P,le,ge,we;if(!te){u("请先选择一个本地缓存版本");return}if(window.confirm(`确认删除 ${N.method.toUpperCase()} ${N.path}?`)){ar(!0),u("");try{const fe=await r0(te,N.method,N.path);n(fe.document),xe(((P=fe.meta)==null?void 0:P.savedAt)||new Date().toISOString()),de(((le=fe.meta)==null?void 0:le.versionId)||te),_e(fe.meta),it(((ge=fe.meta)==null?void 0:ge.resolvedUrl)||((we=fe.meta)==null?void 0:we.inputUrl)||"manual-api-config"),l("ready"),S(""),F(Ve=>Ve.filter(Oe=>Oe.id!==N.id)),await Rt()}catch(fe){u(fe instanceof Error?fe.message:"删除接口失败")}finally{ar(!1)}}}async function Bi(N,P){var fe,Ve;if(!te)throw new Error("请先选择一个本地缓存版本");const le=await fetch(pg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:te,method:N.method,path:N.path,links:P})}),ge=await le.json();if(!le.ok)throw new Error(ge.error||"关联配置保存失败");const we=ge;n(we.document),xe(((fe=we.meta)==null?void 0:fe.savedAt)||new Date().toISOString()),de(((Ve=we.meta)==null?void 0:Ve.versionId)||te),_e(we.meta),hn(Oe=>{var mt;return{...Oe,[yu(((mt=we.meta)==null?void 0:mt.versionId)||te,N)]:Ql(P)}}),we.versions?Z(we.versions):await Rt()}const gn=A.useMemo(()=>{var ge;const N=i!=null&&i.paths?Object.keys(i.paths).length:0,P=((ge=i==null?void 0:i.components)==null?void 0:ge.schemas)??(i==null?void 0:i.definitions)??{},le=Object.keys(P).length;return{paths:N,schemas:le,endpoints:Mt.length,tags:br.length}},[i,Mt.length,br.length]),$t=!!Ls(U);return r==="loading"?p.jsxs("main",{className:"state-screen",children:[p.jsx(Lm,{className:"state-icon"}),p.jsx("h1",{children:"正在读取最新缓存"}),p.jsx("p",{children:"如果没有缓存版本,将进入空文档状态。"})]}):r==="error"?p.jsxs("main",{className:"state-screen",children:[p.jsx(Ei,{className:"state-icon error"}),p.jsx("h1",{children:"接口文档加载失败"}),p.jsx("p",{children:a})]}):p.jsxs("div",{className:"app-shell",children:[p.jsxs("header",{className:"topbar",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow",children:"OpenAPI 3.0 Console"}),p.jsx("h1",{children:"API Skill Console"})]}),p.jsxs("div",{className:"topbar-actions",children:[p.jsx(Wg,{versions:D,selectedVersionId:te,currentVersion:St,disabled:!!Q,onSelect:N=>{!N||N===te||Mr(N)},onPrepareUpdate:Ms,onUpdateEnvironment:jo,onDelete:ze}),p.jsxs("button",{className:"primary-button",onClick:()=>{Ln(void 0),An(void 0),lr(!0)},children:[p.jsx(lo,{size:16}),"新增API配置"]}),p.jsxs("div",{className:"sync-meta",children:[p.jsxs("span",{children:["接口 ",gn.endpoints]}),p.jsxs("span",{children:["Schema ",gn.schemas]}),p.jsx("span",{children:De?`同步 ${g0(De)}`:"未加载文档"})]})]})]}),p.jsxs("section",{className:"source-panel document-toolbar",children:[p.jsxs("div",{className:"document-source-summary",children:[p.jsx("span",{children:"当前文档源"}),p.jsx("strong",{children:Je||"未加载"}),bt!=null&&bt.running&&bt.mock?p.jsxs("small",{children:["MOCK ",bt.mock.url," · ",bt.mock.routesCount," routes"]}):null]}),p.jsxs("div",{className:"source-panel-actions",children:[p.jsxs("button",{className:"primary-button",onClick:()=>{St&&Ms(St)},disabled:!!Q||!St,title:St?"按当前文档最初的生成方式更新并覆盖原版本":"请先新建或导入文档",children:[p.jsx(eo,{size:16}),"更新文档"]}),p.jsxs("button",{className:"secondary-button",onClick:bs,disabled:Ar,children:[p.jsx(Qd,{size:16,className:Ar?"spin":""}),Ar?"启动中":"启动MOCK服务"]}),p.jsxs("button",{className:"secondary-button",onClick:()=>{st(""),ae("blank"),Y(!0)},disabled:!!Q,children:[p.jsx(hs,{size:16}),"新建文档"]})]}),Lr?p.jsx("div",{className:`version-message ${Lr.includes("失败")||Lr.includes("请先")?"error":""}`,children:Lr}):null]}),a?p.jsxs("div",{className:"inline-error",children:[p.jsx(Ei,{size:16}),a]}):null,at!=null&&at.open?p.jsx(Xg,{state:at,onClose:()=>kt(null)}):null,Tt!=null&&Tt.open?p.jsx(Yg,{state:Tt,username:ln,password:_n,onUsernameChange:Tn,onPasswordChange:pn,onClose:()=>ir(null),onSubmit:Di}):null,sr?p.jsx(Gg,{activeTab:U,updating:$t,title:pe,version:ke,description:Ge,fileSourceUrl:W,crawlSourceUrl:X,curlSourceText:M,uploadFile:J,uploadInputRef:Pr,saving:Q===U,onTabChange:ae,onTitleChange:Ne,onVersionChange:Ce,onDescriptionChange:sn,onFileSourceUrlChange:ne,onCrawlSourceUrlChange:C,onCurlSourceTextChange:he,onUploadFileChange:ye,onClear:yn,onClose:()=>{Q||(Y(!1),st(""))},onSubmit:()=>{if(U==="blank"){ko();return}Ps(U,{type:"none"},!1,Ls(U))}}):null,Ir?p.jsx(Dg,{selectedVersionId:te,saving:Pn,initialConfig:Os,onClose:()=>{lr(!1),Ln(void 0),An(void 0)},onSave:Dr}):null,p.jsxs("section",{className:"workspace",children:[p.jsxs("aside",{className:"sidebar",children:[p.jsxs("div",{className:"search-box",children:[p.jsx($m,{size:17}),p.jsx("input",{value:d,onChange:N=>h(N.target.value),placeholder:"搜索路径、摘要、参数、tag"}),d?p.jsx("button",{type:"button",className:"search-clear-button",onClick:()=>h(""),"aria-label":"清空搜索",children:p.jsx(to,{size:15})}):null]}),p.jsxs("div",{className:"filters",children:[p.jsxs("label",{children:[p.jsx(bm,{size:15}),p.jsxs("select",{value:y,onChange:N=>g(N.target.value),children:[p.jsxs("option",{value:"all",children:["全部分组 (",gn.tags,")"]}),br.map(N=>p.jsxs("option",{value:N.name,children:[N.name," (",N.count,")"]},N.name))]})]}),p.jsxs("label",{className:"checkbox-line",children:[p.jsx("input",{type:"checkbox",checked:E,onChange:N=>O(N.target.checked)}),"仅看有请求体"]})]}),p.jsx("div",{className:"method-tabs","aria-label":"method filters",children:Qg.map(N=>p.jsx("button",{className:x===N?"active":"",onClick:()=>k(N),title:N==="all"?"全部方法":N.toUpperCase(),children:N==="all"?"ALL":N.toUpperCase()},N))}),p.jsxs("div",{className:"endpoint-count",children:["显示 ",mn.length," / ",Mt.length]}),p.jsx("div",{className:"endpoint-list",children:mn.map(N=>p.jsxs("button",{className:`endpoint-item ${N.id===(Le==null?void 0:Le.id)?"selected":""}`,onClick:()=>$r(N.id),children:[p.jsx("span",{className:`method method-${N.method}`,children:N.method.toUpperCase()}),p.jsxs("span",{className:"endpoint-main",children:[p.jsx("strong",{children:N.summary}),p.jsx("small",{children:N.path})]})]},N.id))})]}),p.jsxs("main",{className:"detail-pane",children:[H.length?p.jsx("div",{className:"opened-api-tabs","aria-label":"已打开 API 页签",children:H.map(N=>p.jsxs("div",{className:`opened-api-tab opened-api-tab-${N.method} ${N.id===(Le==null?void 0:Le.id)?"active":""}`,role:"button",tabIndex:0,onClick:()=>$r(N.id),onKeyDown:P=>{P.key!=="Enter"&&P.key!==" "||(P.preventDefault(),$r(N.id))},title:`${N.method.toUpperCase()} ${N.path}`,children:[p.jsx("span",{className:`opened-api-tab-method method-${N.method}`,children:N.method.toUpperCase()}),p.jsx("span",{className:"opened-api-tab-text",children:p.jsx("strong",{children:N.summary})}),p.jsx("button",{type:"button",className:"opened-api-tab-close","aria-label":"关闭页签",onClick:P=>{P.stopPropagation(),zi(N.id)},children:p.jsx(to,{size:14})})]},N.id))}):null,i&&Le?p.jsx(s0,{doc:i,endpoint:Le,copied:Cs,onCopy:(N,P)=>$i(N,P),onEdit:()=>{Ln(bp(i,Le)),An({method:Le.method,path:Le.path}),lr(!0)},onDelete:()=>void No(Le),onSaveLinks:Bi,linksDraft:ur??Ql(Le.operation["x-apiskill-links"]),onLinksDraftChange:N=>So(Le,N),environmentBaseUrl:(St==null?void 0:St.environmentBaseUrl)||""}):i?mn.length?p.jsxs("div",{className:"empty-state",children:[p.jsx(ms,{size:32}),p.jsx("h2",{children:"未打开接口"}),p.jsx("p",{children:"从左侧列表选择接口后会在上方生成可关闭页签。"})]}):p.jsxs("div",{className:"empty-state",children:[p.jsx(ms,{size:32}),p.jsx("h2",{children:"没有匹配的接口"}),p.jsx("p",{children:"调整搜索词、分组或方法过滤条件。"})]}):p.jsxs("div",{className:"empty-state",children:[p.jsx(ms,{size:32}),p.jsx("h2",{children:"暂无 API 文档数据"}),p.jsx("p",{children:"导入现有 Swagger/OpenAPI 文档,或新建空白文档后从零维护接口。"})]})]})]})]})}function Yg({state:i,username:n,password:r,onUsernameChange:l,onPasswordChange:a,onClose:u,onSubmit:d}){return p.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"document-auth-title",children:p.jsxs("div",{className:"auth-dialog",children:[p.jsxs("div",{className:"import-dialog-header",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow",children:"Document Auth"}),p.jsx("h2",{id:"document-auth-title",children:"输入文档访问凭据"})]}),p.jsx("span",{className:"import-badge running",children:"需要登录"})]}),p.jsxs("div",{className:"auth-dialog-body",children:[p.jsxs("div",{className:"auth-message",children:[p.jsx(Mm,{size:18}),p.jsx("span",{children:i.message})]}),p.jsxs("div",{className:"auth-target",children:[p.jsx("span",{children:"文档地址"}),p.jsx("strong",{children:i.inputUrl})]}),p.jsxs("div",{className:"auth-fields",children:[p.jsxs("label",{children:["用户名",p.jsx("input",{value:n,onChange:h=>l(h.target.value),autoComplete:"username",autoFocus:!0})]}),p.jsxs("label",{children:["密码",p.jsx("input",{value:r,onChange:h=>a(h.target.value),type:"password",autoComplete:"current-password",onKeyDown:h=>{h.key==="Enter"&&d()}})]})]})]}),p.jsxs("div",{className:"import-dialog-actions",children:[p.jsx("button",{className:"secondary-button",onClick:u,children:"取消"}),p.jsxs("button",{className:"primary-button",onClick:d,children:[p.jsx(Wd,{size:16}),"使用凭据继续"]})]})]})})}function Gg({activeTab:i,updating:n,title:r,version:l,description:a,fileSourceUrl:u,crawlSourceUrl:d,curlSourceText:h,uploadFile:y,uploadInputRef:g,saving:x,onTabChange:k,onTitleChange:E,onVersionChange:O,onDescriptionChange:b,onFileSourceUrlChange:S,onCrawlSourceUrlChange:I,onCurlSourceTextChange:R,onUploadFileChange:H,onClear:F,onClose:K,onSubmit:G}){var ae;const Q=[{id:"blank",label:"空白文档",icon:hs},{id:"file",label:"在线文档",icon:eo},{id:"crawl",label:"爬取网页",icon:Pm},{id:"curl",label:"执行 CURL",icon:Lu},{id:"upload",label:"导入文件",icon:ms}],q=i==="blank"?!!r.trim():i==="file"?!!u.trim():i==="crawl"?!!d.trim():i==="curl"?!!h.trim():!!y,U=((ae=Q.find(D=>D.id===i))==null?void 0:ae.icon)??hs;return p.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"document-dialog-title",children:p.jsxs("div",{className:"document-dialog",children:[p.jsxs("div",{className:"import-dialog-header",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow",children:"OpenAPI Document"}),p.jsx("h2",{id:"document-dialog-title",children:n?"更新文档":"新建文档"})]}),p.jsx("button",{className:"icon-secondary-button",onClick:K,"aria-label":"关闭",disabled:x,children:p.jsx(to,{size:17})})]}),p.jsx("div",{className:"document-dialog-tabs",role:"tablist","aria-label":"新建文档方式",children:Q.map(D=>{const Z=D.icon;return p.jsxs("button",{className:i===D.id?"active":"",onClick:()=>k(D.id),role:"tab","aria-selected":i===D.id,disabled:x,children:[p.jsx(Z,{size:15}),D.label]},D.id)})}),p.jsx("div",{className:"document-dialog-body",role:"tabpanel",children:i==="blank"?p.jsxs("div",{className:"blank-document-fields",children:[p.jsxs("label",{className:"source-input",children:[p.jsx(ms,{size:16}),p.jsx("input",{value:r,onChange:D=>E(D.target.value),placeholder:"文档名称,例如 Customer Service API",autoFocus:!0})]}),p.jsxs("label",{className:"source-input",children:[p.jsx(hs,{size:16}),p.jsx("input",{value:l,onChange:D=>O(D.target.value),placeholder:"文档版本,例如 1.0.0"})]}),p.jsxs("label",{className:"source-input",children:[p.jsx(Iu,{size:16}),p.jsx("input",{value:a,onChange:D=>b(D.target.value),placeholder:"文档描述,可选"})]})]}):i==="upload"?p.jsxs("label",{className:"source-file-picker document-file-picker",children:[p.jsx(ms,{size:18}),p.jsx("input",{ref:g,type:"file",accept:".json,.yaml,.yml,application/json,application/yaml,text/yaml,text/x-yaml",onChange:D=>{var Z;return H(((Z=D.target.files)==null?void 0:Z[0])??null)}}),p.jsx("span",{children:y?y.name:"选择 JSON / YAML 文件"}),p.jsx("small",{children:y?"点击可重新选择文件":"支持 OpenAPI 3.x 与 Swagger 2.0"})]}):p.jsxs("label",{className:`source-input document-source-input ${i==="curl"?"source-input-multiline":""}`,children:[p.jsx(Zl,{size:16}),i==="curl"?p.jsx("textarea",{value:h,onChange:D=>R(D.target.value),placeholder:"粘贴 curl 命令,例如 curl 'https://example.com/openapi.yaml' -H 'accept: application/yaml'",spellCheck:!1,autoFocus:!0}):p.jsx("input",{value:i==="file"?u:d,onChange:D=>{i==="file"?S(D.target.value):I(D.target.value)},placeholder:i==="file"?"输入 Swagger/OpenAPI JSON 或 YAML 文件地址":"输入 Swagger UI / Knife4j / Redoc 在线文档页地址",autoFocus:!0})]})}),p.jsxs("div",{className:"import-dialog-actions document-dialog-actions",children:[i!=="blank"&&q?p.jsx("button",{className:"secondary-button clear-document-source",onClick:F,disabled:x,children:"清空"}):null,p.jsx("button",{className:"secondary-button",onClick:K,disabled:x,children:"取消"}),p.jsxs("button",{className:"primary-button",onClick:G,disabled:x||!q,children:[p.jsx(U,{size:16,className:x?"spin":""}),x?"处理中":n?"更新":i==="blank"?"创建":"确认"]})]})]})})}function Xg({state:i,onClose:n}){var a,u,d,h,y;const r=i.mode==="blank"?"新建空白文档":i.mode==="crawl"?"爬取在线文档":i.mode==="curl"?"执行 CURL":i.mode==="upload"?"上传 JSON / YAML 文件":"导入 JSON / YAML 文件",l=i.status!=="running";return p.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"import-status-title",children:p.jsxs("div",{className:"import-dialog",children:[p.jsxs("div",{className:"import-dialog-header",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow",children:"OpenAPI Import"}),p.jsx("h2",{id:"import-status-title",children:r})]}),p.jsx("span",{className:`import-badge ${i.status}`,children:i.status==="running"?"处理中":i.status==="success"?"已完成":"失败"})]}),p.jsx("div",{className:"progress-track","aria-label":"导入进度",children:p.jsx("div",{className:`progress-bar ${i.status}`,style:{width:`${i.progress}%`}})}),p.jsxs("div",{className:"import-summary",children:[p.jsxs("div",{children:[p.jsx("span",{children:"输入地址"}),p.jsx("strong",{children:i.inputUrl||"-"})]}),p.jsxs("div",{children:[p.jsx("span",{children:"当前状态"}),p.jsx("strong",{children:i.message})]}),(a=i.meta)!=null&&a.resolvedUrl?p.jsxs("div",{children:[p.jsx("span",{children:"解析地址"}),p.jsx("strong",{children:i.meta.resolvedUrl})]}):null,(u=i.meta)!=null&&u.versionId?p.jsxs("div",{children:[p.jsx("span",{children:"版本"}),p.jsx("strong",{children:i.meta.versionId})]}):null,(d=i.meta)!=null&&d.savedPath?p.jsxs("div",{children:[p.jsx("span",{children:"保存位置"}),p.jsx("strong",{children:i.meta.savedPath})]}):null,i.status==="success"?p.jsxs("div",{className:"import-counts",children:[p.jsxs("span",{children:["接口路径 ",((h=i.meta)==null?void 0:h.paths)??0]}),p.jsxs("span",{children:["Schema ",((y=i.meta)==null?void 0:y.schemas)??0]})]}):null,i.error?p.jsxs("div",{className:"import-error",children:[p.jsx(Ei,{size:16}),i.error]}):null]}),p.jsx("div",{className:"import-dialog-actions",children:p.jsx("button",{className:"secondary-button",onClick:n,disabled:!l,children:l?"关闭":"处理中"})})]})})}async function Zg(i,n,r,l,a){const u=await fetch(eg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({url:i,mode:n,auth:r,content:l,versionId:a})}),d=await u.json();if(!u.ok)throw new Error(d.error||"导入失败");return d}async function e0(i){const n=await fetch(tg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(i)}),r=await n.json();if(!n.ok)throw new Error(r.error||"创建文档失败");return r}async function t0(i,n){const r=await fetch(ng,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({url:i,mode:n})}),l=await r.json();if(!r.ok)throw new Error(l.error||"检测文档访问权限失败");return l}async function n0(i,n,r){const l=await fetch(fg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:i,config:n,replaceTarget:r})}),a=await l.json();if(!l.ok)throw new Error(a.error||"新增接口保存失败");return a}async function r0(i,n,r){const l=await fetch(dg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:i,method:n,path:r})}),a=await l.json();if(!l.ok)throw new Error(a.error||"删除接口失败");return a}function s0({doc:i,endpoint:n,copied:r,onCopy:l,onEdit:a,onDelete:u,onSaveLinks:d,linksDraft:h,onLinksDraftChange:y,environmentBaseUrl:g}){const x=A.useMemo(()=>Pp(i,n.operation.parameters),[i,n]),k=A.useMemo(()=>Sg(i,n.operation),[i,n]),E=A.useMemo(()=>jg(i,n.operation),[i,n]),O=A.useMemo(()=>xg(i,n),[i,n]),b=A.useMemo(()=>Ng(n),[n]),[S,I]=A.useState("ai"),[R,H]=A.useState(!1),F=S==="json"?b:O,K=S==="json"?"复制原始 Operation":"复制 API CLI";function G(){$p(n.path),navigator.clipboard.writeText(n.path).catch(()=>{}),H(!0),window.setTimeout(()=>H(!1),1600)}return p.jsxs("article",{className:"endpoint-detail",children:[p.jsxs("div",{className:"detail-header",children:[p.jsxs("div",{children:[p.jsxs("div",{className:"endpoint-title-line",children:[p.jsx("span",{className:`method method-${n.method}`,children:n.method.toUpperCase()}),p.jsx("h2",{children:n.summary}),p.jsx("div",{className:"tag-row",children:n.tags.map(Q=>p.jsx("span",{children:Q},Q))})]}),p.jsxs("div",{className:"path-row",children:[p.jsx("code",{className:"path-line",children:n.path}),p.jsxs("button",{type:"button",className:"path-copy-button",onClick:G,title:"复制 API 路由地址",children:[R?p.jsx(Ci,{size:14}):p.jsx(ki,{size:14}),p.jsx("span",{children:R?"已复制":"复制"})]})]})]}),p.jsxs("div",{className:"detail-actions",children:[p.jsxs("button",{className:"secondary-button",onClick:a,children:[p.jsx(Iu,{size:15}),"编辑"]}),p.jsxs("button",{className:"danger-button",onClick:u,children:[p.jsx(oo,{size:15}),"删除"]})]})]}),n.operation.description?p.jsx("p",{className:"description",children:n.operation.description}):null,p.jsxs("section",{className:"copy-preview",children:[p.jsxs("div",{className:"copy-preview-toolbar",children:[p.jsxs("div",{className:"copy-tabs",role:"tablist","aria-label":"可复制内容",children:[p.jsxs("button",{className:S==="ai"?"active":"",onClick:()=>I("ai"),role:"tab","aria-selected":S==="ai",children:[p.jsx(ki,{size:15}),"API Cli"]}),p.jsxs("button",{className:S==="json"?"active":"",onClick:()=>I("json"),role:"tab","aria-selected":S==="json",children:[p.jsx(hs,{size:15}),"原始 Operation"]}),p.jsxs("button",{className:S==="test"?"active":"",onClick:()=>I("test"),role:"tab","aria-selected":S==="test",children:[p.jsx(Lu,{size:15}),"测试请求"]}),p.jsxs("button",{className:S==="links"?"active":"",onClick:()=>I("links"),role:"tab","aria-selected":S==="links",children:[p.jsx(Zl,{size:15}),"关联地址"]})]}),S==="test"||S==="links"?null:p.jsxs("button",{className:"copy-inline-button",onClick:()=>l(S,F),children:[r===S?p.jsx(Ci,{size:16}):p.jsx(ki,{size:16}),r===S?"已复制":K]})]}),S==="test"?p.jsx(l0,{doc:i,endpoint:n,environmentBaseUrl:g}):S==="links"?p.jsx(i0,{endpoint:n,links:h,onChange:y,onSave:Q=>d(n,Q)}):p.jsx("pre",{className:"copy-preview-content",children:F})]}),p.jsx(vu,{title:"请求参数",count:x.length,children:p.jsx(wu,{rows:x,empty:"无 query / path / header 参数"})}),p.jsx(vu,{title:"请求体",count:Object.values(k).reduce((Q,q)=>Q+q.length,0),children:Object.keys(k).length?Object.entries(k).map(([Q,q])=>p.jsxs("div",{className:"media-block",children:[p.jsx("h4",{children:Q}),p.jsx(wu,{rows:q,empty:"空对象或无字段说明"})]},Q)):p.jsx("p",{className:"muted",children:"无请求体"})}),p.jsx(vu,{title:"响应字段",count:Object.values(E).reduce((Q,q)=>Q+Object.values(q).flat().length,0),children:Object.keys(n.operation.responses??{}).length?Object.entries(n.operation.responses??{}).map(([Q,q])=>{const U=E[Q]??{};return p.jsxs("div",{className:"response-block",children:[p.jsxs("div",{className:"response-heading",children:[p.jsx("strong",{children:Q}),p.jsx("span",{children:q.description||"无描述"})]}),Object.keys(U).length?Object.entries(U).map(([ae,D])=>p.jsxs("div",{className:"media-block",children:[p.jsx("h4",{children:ae}),p.jsx(wu,{rows:D,empty:"空对象或无字段说明"})]},ae)):p.jsx("p",{className:"muted",children:"无字段说明"})]},Q)}):p.jsx("p",{className:"muted",children:"无响应说明"})})]})}function i0({endpoint:i,links:n,onChange:r,onSave:l}){const[a,u]=A.useState(!1),[d,h]=A.useState("");A.useEffect(()=>{h("")},[i.id]);async function y(){u(!0),h("");try{await l(n),h("关联配置已保存")}catch(g){h(g instanceof Error?g.message:"关联配置保存失败")}finally{u(!1)}}return p.jsxs("div",{className:"endpoint-links-config",children:[d?p.jsx("div",{className:`version-message ${d.includes("失败")?"error":""}`,children:d}):null,p.jsxs("div",{className:"links-grid",children:[p.jsx(Fd,{title:"原型地址",value:n.prototype??Eu(),onChange:g=>r({...n,prototype:g})}),p.jsx(Fd,{title:"UI地址",value:n.ui??Eu(),onChange:g=>r({...n,ui:g})})]}),p.jsx("div",{className:"links-actions",children:p.jsxs("button",{className:"primary-button",onClick:y,disabled:a,children:[p.jsx(Ci,{size:16}),a?"保存中":"保存关联配置"]})})]})}function Fd({title:i,value:n,onChange:r}){const l=n.sourceType==="online",a=n.sourceType==="curl";function u(h){r({...n,...h})}function d(){const h=a?n.curl:n.url;h&&($p(h),navigator.clipboard.writeText(h).catch(()=>{}))}return p.jsxs("section",{className:"tester-panel link-editor-panel",children:[p.jsxs("div",{className:"tester-panel-title",children:[p.jsx(Zl,{size:15}),i]}),p.jsxs("div",{className:"tester-form-grid",children:[p.jsxs("label",{children:["类型",p.jsxs("select",{value:n.sourceType||"local",onChange:h=>u({sourceType:h.target.value}),children:[p.jsx("option",{value:"local",children:"本地文件地址"}),p.jsx("option",{value:"online",children:"在线地址"}),p.jsx("option",{value:"curl",children:"CURL"})]})]}),p.jsxs("label",{children:["标题",p.jsx("input",{value:n.title||"",onChange:h=>u({title:h.target.value}),placeholder:"例如 Figma 原型 / 用户列表页面"})]}),a?p.jsxs("label",{className:"span-all",children:["CURL 命令",p.jsx("textarea",{value:n.curl||"",onChange:h=>u({curl:h.target.value}),placeholder:"curl 'https://example.com/prototype' -H 'Authorization: Bearer ...'",spellCheck:!1})]}):p.jsxs("label",{className:"span-all",children:["地址",p.jsx("input",{value:n.url||"",onChange:h=>u({url:h.target.value}),placeholder:l?"https://example.com/prototype":"/Users/name/project/design/user-list.fig"})]}),l?p.jsxs(p.Fragment,{children:[p.jsxs("label",{children:["访问方式",p.jsxs("select",{value:n.authType||"none",onChange:h=>u({authType:h.target.value}),children:[p.jsx("option",{value:"none",children:"无需登录"}),p.jsx("option",{value:"browser",children:"浏览器登录 / Cookie"}),p.jsx("option",{value:"bearer",children:"Bearer Token"}),p.jsx("option",{value:"header",children:"自定义 Header"})]})]}),n.authType==="header"?p.jsxs("label",{children:["Header 名称",p.jsx("input",{value:n.headerName||"",onChange:h=>u({headerName:h.target.value}),placeholder:"X-Auth-Token"})]}):null,n.authType==="bearer"||n.authType==="header"?p.jsxs("label",{className:"span-all",children:["Token / Header 值",p.jsx("input",{value:n.token||"",onChange:h=>u({token:h.target.value}),placeholder:"仅保存在本地文档缓存中,用于记录访问凭据",type:"password"})]}):null]}):null,p.jsxs("label",{className:"span-all",children:["备注",p.jsx("input",{value:n.note||"",onChange:h=>u({note:h.target.value}),placeholder:a?"例如 CURL 里的 token 来源、过期方式或请求前置条件":l?"例如需要先登录公司 SSO,或 token 过期时找谁更新":"例如本地原型文件位置、分支或打开方式"})]})]}),p.jsxs("div",{className:"link-editor-actions",children:[p.jsxs("button",{className:"secondary-button",onClick:d,disabled:!(a?n.curl:n.url),children:[p.jsx(ki,{size:15}),a?"复制CURL":"复制地址"]}),l&&n.url?p.jsxs("a",{className:"secondary-button link-button",href:n.url,target:"_blank",rel:"noreferrer",children:[p.jsx(Zl,{size:15}),"打开地址"]}):null]})]})}function Ql(i){return{prototype:Vd(i==null?void 0:i.prototype),ui:Vd(i==null?void 0:i.ui)}}function Vd(i){const n=(i==null?void 0:i.sourceType)==="online"||(i==null?void 0:i.sourceType)==="curl"?i.sourceType:"local";return{...Eu(),...i??{},sourceType:n,authType:(i==null?void 0:i.authType)||"none"}}function Eu(){return{sourceType:"local",title:"",url:"",curl:"",authType:"none",token:"",headerName:"",note:""}}function l0({doc:i,endpoint:n,environmentBaseUrl:r}){const l=n.operation.parameters??[],a=l.filter(J=>J.in==="path"),u=l.filter(J=>J.in==="query"),d=l.filter(J=>J.in==="header"),h=A.useMemo(()=>o0(n),[n]),y=A.useRef(""),[g,x]=A.useState(""),[k,E]=A.useState("none"),[O,b]=A.useState(""),[S,I]=A.useState("Authorization"),[R,H]=A.useState("header"),[F,K]=A.useState(""),[G,Q]=A.useState(""),[q,U]=A.useState({}),[ae,D]=A.useState({}),[Z,te]=A.useState(""),[de,Ie]=A.useState(`{
296
296
  "Content-Type": "application/json"
297
297
  }`),[_e,De]=A.useState(!1),[xe,W]=A.useState(""),[ne,X]=A.useState(null);A.useEffect(()=>{U({}),D({}),X(null),W(""),te(h!=null&&h.schema?JSON.stringify(Ou(i,h.schema),null,2):""),Ie(h?`{
298
298
  "Content-Type": "application/json"
299
- }`:"{}")},[i,n.id,h]),A.useEffect(()=>{const J=r.trim();x(ye=>{const pe=y.current;return y.current=J,!ye||ye===pe?J:ye})},[r]);const C=A.useMemo(()=>{try{return Kd(g,n.path,l,q,R==="query"?{[S]:O}:{})}catch{return n.path}},[R,S,O,g,n.path,l,q]);function M(){const J={},ye={};l.forEach((pe,Ne)=>{const ke=_i(pe,Ne),Ce=f0(a0(i,pe));(pe.in==="path"||pe.in==="query")&&(J[ke]=Ce),pe.in==="header"&&(ye[ke]=Ce)}),U(J),D(ye),h!=null&&h.schema&&!["get","head"].includes(n.method)?(te(JSON.stringify(xr(i,h.schema),null,2)),Ie(JSON.stringify({...p0(de),"Content-Type":h.mediaType},null,2))):te(""),X(null),W("")}async function he(){De(!0),W(""),X(null);try{const J=Rp(de),ye=d0({customHeaders:J,headerParams:d,headerValues:ae,authType:k,authValue:O,apiKeyName:S,apiKeyLocation:R,basicUsername:F,basicPassword:G}),pe=Kd(g,n.path,l,q,R==="query"?{[S]:O}:{}),Ne=["get","head"].includes(n.method)?void 0:Z.trim()||void 0,ke=await h0({url:pe,method:n.method.toUpperCase(),headers:ye,body:Ne});X(ke)}catch(J){W(J instanceof Error?J.message:"请求失败")}finally{De(!1)}}return p.jsxs("div",{className:"request-tester",children:[p.jsxs("div",{className:"request-line",children:[p.jsx("span",{className:`method method-${n.method}`,children:n.method.toUpperCase()}),p.jsxs("label",{children:["Base URL",p.jsx("input",{value:g,onChange:J=>x(J.target.value),placeholder:"https://api.example.com"})]}),p.jsxs("div",{className:"request-actions",children:[p.jsxs("button",{className:"primary-button",onClick:he,disabled:_e,children:[p.jsx(Lu,{size:16}),_e?"请求中":"发送请求"]}),p.jsxs("button",{className:"secondary-button",onClick:M,disabled:_e,children:[p.jsx(hs,{size:16}),"MOCK数据"]})]})]}),p.jsx("code",{className:"request-preview",children:C}),p.jsxs("div",{className:"tester-grid",children:[p.jsxs("section",{className:"tester-panel",children:[p.jsxs("div",{className:"tester-panel-title",children:[p.jsx(Wd,{size:15}),"鉴权"]}),p.jsxs("div",{className:"tester-form-grid",children:[p.jsxs("label",{children:["类型",p.jsxs("select",{value:k,onChange:J=>E(J.target.value),children:[p.jsx("option",{value:"none",children:"None"}),p.jsx("option",{value:"bearer",children:"Bearer Token"}),p.jsx("option",{value:"jwt",children:"JWT Token"}),p.jsx("option",{value:"apiKey",children:"API Key"}),p.jsx("option",{value:"basic",children:"Basic Auth"})]})]}),k==="apiKey"?p.jsxs(p.Fragment,{children:[p.jsxs("label",{children:["Key 名称",p.jsx("input",{value:S,onChange:J=>I(J.target.value),placeholder:"X-API-Key"})]}),p.jsxs("label",{children:["位置",p.jsxs("select",{value:R,onChange:J=>H(J.target.value),children:[p.jsx("option",{value:"header",children:"Header"}),p.jsx("option",{value:"query",children:"Query"})]})]}),p.jsxs("label",{children:["Value",p.jsx("input",{value:O,onChange:J=>b(J.target.value),placeholder:"api key value"})]})]}):k==="basic"?p.jsxs(p.Fragment,{children:[p.jsxs("label",{children:["Username",p.jsx("input",{value:F,onChange:J=>K(J.target.value)})]}),p.jsxs("label",{children:["Password",p.jsx("input",{value:G,onChange:J=>Q(J.target.value),type:"password"})]})]}):k!=="none"?p.jsxs("label",{children:["Token",p.jsx("input",{value:O,onChange:J=>b(J.target.value),placeholder:"token"})]}):null]})]}),p.jsxs("section",{className:"tester-panel",children:[p.jsx("div",{className:"tester-panel-title",children:"参数"}),p.jsx(yu,{title:"Path",parameters:a,values:q,onChange:U}),p.jsx(yu,{title:"Query",parameters:u,values:q,onChange:U}),p.jsx(yu,{title:"Header",parameters:d,values:ae,onChange:D})]})]}),p.jsxs("div",{className:"tester-grid",children:[p.jsxs("section",{className:"tester-panel",children:[p.jsx("div",{className:"tester-panel-title",children:"请求头 JSON"}),p.jsx("textarea",{value:de,onChange:J=>Ie(J.target.value),spellCheck:!1})]}),p.jsxs("section",{className:"tester-panel",children:[p.jsxs("div",{className:"tester-panel-title",children:["请求体 ",h?`(${h.mediaType})`:""]}),p.jsx("textarea",{value:Z,onChange:J=>te(J.target.value),disabled:!h||["get","head"].includes(n.method),spellCheck:!1,placeholder:h?"JSON / raw body":"该接口没有请求体"})]})]}),xe?p.jsxs("div",{className:"import-error",children:[p.jsx(Ci,{size:16}),xe]}):null,p.jsxs("section",{className:"tester-panel response-panel",children:[p.jsx("div",{className:"tester-panel-title",children:"响应"}),ne?p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"response-meta-line",children:[p.jsxs("span",{className:ne.status>=200&&ne.status<300?"status-ok":"status-error",children:[ne.status," ",ne.statusText]}),p.jsxs("span",{children:[ne.elapsedMs,"ms"]}),p.jsx("span",{children:ne.url})]}),p.jsx("pre",{children:m0(ne.body)})]}):p.jsx("p",{className:"muted",children:"发送请求后显示响应内容。"})]})]})}function yu({title:i,parameters:n,values:r,onChange:l}){return n.length?p.jsxs("div",{className:"param-editor",children:[p.jsx("h4",{children:i}),n.map((a,u)=>{var h;const d=_i(a,u);return p.jsxs("label",{children:[p.jsxs("span",{children:[a.name,a.required?p.jsx("b",{children:"*"}):null]}),p.jsx("input",{value:r[d]??"",onChange:y=>l({...r,[d]:y.target.value}),placeholder:a.description||((h=a.schema)==null?void 0:h.description)||""})]},d)})]}):null}function o0(i){var d,h,y,g;const n=((d=i.operation.requestBody)==null?void 0:d.content)??{},r=Object.entries(n),a=r.find(([x])=>x.includes("json"))??r[0],u=(h=i.operation.parameters)==null?void 0:h.find(x=>x.in==="body");if(!a&&(u!=null&&u.schema))return{mediaType:((y=i.operation.consumes)==null?void 0:y.find(x=>x.includes("json")))??((g=i.operation.consumes)==null?void 0:g[0])??"application/json",schema:u.schema};if(a)return{mediaType:a[0],schema:a[1].schema}}function Ou(i,n,r=0,l=new Set){var d;if(!n||r>8)return{};const a=At(i,n)??n;if(l.has(a))return{};if(l.add(a),a.default!==void 0)return a.default;if((d=a.enum)!=null&&d.length)return a.enum[0];if(a.type==="array")return[Ou(i,a.items,r+1,l)];if(a.type==="integer"||a.type==="number")return 0;if(a.type==="boolean")return!1;if(a.type==="string")return"";const u=a.properties??{};return Object.fromEntries(Object.entries(u).map(([h,y])=>[h,Ou(i,y,r+1,new Set(l))]))}function a0(i,n){var l;if(n.default!==void 0)return n.default;if((l=n.enum)!=null&&l.length)return n.enum[0];const r=u0(n);return xr(i,r,n.name)}function xr(i,n,r="",l=0,a=new Set){var x,k,E,O;if(!n||l>8)return Tu(r)??"mock-value";const u=At(i,n)??n;if(a.has(u))return{};const d=new Set(a);if(d.add(u),u.default!==void 0)return u.default;if(n.default!==void 0)return n.default;if((x=u.enum)!=null&&x.length)return u.enum[0];if((k=n.enum)!=null&&k.length)return n.enum[0];const h=Tu(r,u.format||n.format),y=u.type||n.type||(u.properties?"object":"");if(h!==void 0&&(!y||y==="string"||y==="integer"||y==="number"))return h;if((E=u.oneOf)!=null&&E.length)return xr(i,u.oneOf[0],r,l+1,d);if((O=u.anyOf)!=null&&O.length)return xr(i,u.anyOf[0],r,l+1,d);if(y==="array")return[xr(i,u.items,r,l+1,d)];if(y==="integer"||y==="number")return c0(r);if(y==="boolean")return!0;if(y==="string")return h??"mock-value";const g=u.properties??{};return Object.keys(g).length?Object.fromEntries(Object.entries(g).map(([b,S])=>[b,xr(i,S,b,l+1,d)])):u.additionalProperties&&typeof u.additionalProperties=="object"?{key:xr(i,u.additionalProperties,"value",l+1,d)}:h??{}}function u0(i){var n;if(i.schema)return i.schema;if(!(!i.type&&!i.format&&!i.items&&!((n=i.enum)!=null&&n.length)&&i.default===void 0))return{type:i.type,format:i.format,items:i.items,enum:i.enum,default:i.default,description:i.description}}function Tu(i,n=""){const r=i.toLowerCase().replace(/[^a-z0-9]/g,"");if(n==="date-time")return new Date().toISOString();if(n==="date")return new Date().toISOString().slice(0,10);if(n==="email"||r.includes("email"))return"mock@example.com";if(n==="uuid"||r.includes("uuid"))return"00000000-0000-4000-8000-000000000000";if(r==="id"||r.endsWith("id")||r==="page"||r==="pagenum"||r==="pageindex")return 1;if(r==="pagesize"||r==="limit"||r==="size")return 10;if(r.includes("phone")||r.includes("mobile"))return"13800000000";if(r.includes("name")||r.includes("title")||r.includes("keyword"))return"mock-name";if(r.includes("url"))return"https://example.com";if(r.includes("date"))return new Date().toISOString().slice(0,10);if(r.includes("time"))return new Date().toISOString()}function c0(i){const n=Tu(i);return typeof n=="number"?n:1}function f0(i){return i==null?"":typeof i=="string"?i:typeof i=="number"||typeof i=="boolean"?String(i):JSON.stringify(i)}function _i(i,n){return`${i.in}-${i.name}-${n}`}function Kd(i,n,r,l,a){if(!i.trim()&&!/^https?:\/\//i.test(n))throw new Error("请输入 Base URL,例如 https://api.example.com");const u=i.trim()||void 0;let d=n;r.forEach((y,g)=>{if(y.in!=="path")return;const x=l[_i(y,g)]??"";d=d.replace(new RegExp(`\\{${y0(y.name)}\\}`,"g"),encodeURIComponent(x))});const h=new URL(d,u);return r.forEach((y,g)=>{if(y.in!=="query")return;const x=l[_i(y,g)]??"";x&&h.searchParams.append(y.name,x)}),Object.entries(a).forEach(([y,g])=>{y.trim()&&g.trim()&&h.searchParams.set(y.trim(),g.trim())}),h.toString()}function d0({customHeaders:i,headerParams:n,headerValues:r,authType:l,authValue:a,apiKeyName:u,apiKeyLocation:d,basicUsername:h,basicPassword:y}){const g={...i};return n.forEach((x,k)=>{const E=r[_i(x,k)];E&&(g[x.name]=E)}),(l==="bearer"||l==="jwt")&&a.trim()&&(g.Authorization=`Bearer ${a.trim()}`),l==="apiKey"&&d==="header"&&u.trim()&&a.trim()&&(g[u.trim()]=a.trim()),l==="basic"&&(h||y)&&(g.Authorization=`Basic ${btoa(`${h}:${y}`)}`),g}function Rp(i){if(!i.trim())return{};const n=JSON.parse(i);return Object.fromEntries(Object.entries(n).map(([r,l])=>[r,String(l)]))}function p0(i){try{return Rp(i)}catch{return{}}}async function h0(i){const n=await fetch("/api/request/send",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(i)}),r=await n.json();if(!n.ok)throw new Error(r.error||"请求失败");return r}function m0(i){try{return JSON.stringify(JSON.parse(i),null,2)}catch{return i}}function $p(i){const n=document.createElement("textarea");n.value=i,n.setAttribute("readonly","true"),n.style.position="fixed",n.style.left="-9999px",n.style.top="0",document.body.appendChild(n),n.focus(),n.select();try{return document.execCommand("copy")}finally{document.body.removeChild(n)}}function y0(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gu({title:i,count:n,children:r}){return p.jsxs("section",{className:"detail-section",children:[p.jsxs("div",{className:"section-title",children:[p.jsx("h3",{children:i}),p.jsx("span",{children:n})]}),r]})}function vu({rows:i,empty:n}){return i.length?p.jsx("div",{className:"table-wrap",children:p.jsxs("table",{children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{children:"字段"}),p.jsx("th",{children:"位置"}),p.jsx("th",{children:"必填"}),p.jsx("th",{children:"类型"}),p.jsx("th",{children:"说明"}),p.jsx("th",{children:"默认值"}),p.jsx("th",{children:"枚举"})]})}),p.jsx("tbody",{children:i.map((r,l)=>p.jsxs("tr",{children:[p.jsx("td",{children:p.jsx("code",{style:{paddingLeft:r.depth*16},children:r.name})}),p.jsx("td",{children:r.location||"-"}),p.jsx("td",{children:r.required?"是":"否"}),p.jsx("td",{children:r.type}),p.jsx("td",{children:r.description||"-"}),p.jsx("td",{children:r.defaultValue||"-"}),p.jsx("td",{children:r.enumValue||"-"})]},`${r.location}-${r.path}-${r.depth}-${l}`))})]})}):p.jsx("p",{className:"muted",children:n})}function g0(i){const n=new Date(i);return Number.isNaN(n.getTime())?i:n.toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}Om.createRoot(document.getElementById("root")).render(p.jsx(km.StrictMode,{children:p.jsx(Jg,{})}));
299
+ }`:"{}")},[i,n.id,h]),A.useEffect(()=>{const J=r.trim();x(ye=>{const pe=y.current;return y.current=J,!ye||ye===pe?J:ye})},[r]);const C=A.useMemo(()=>{try{return Kd(g,n.path,l,q,R==="query"?{[S]:O}:{})}catch{return n.path}},[R,S,O,g,n.path,l,q]);function M(){const J={},ye={};l.forEach((pe,Ne)=>{const ke=Ii(pe,Ne),Ce=f0(a0(i,pe));(pe.in==="path"||pe.in==="query")&&(J[ke]=Ce),pe.in==="header"&&(ye[ke]=Ce)}),U(J),D(ye),h!=null&&h.schema&&!["get","head"].includes(n.method)?(te(JSON.stringify(xr(i,h.schema),null,2)),Ie(JSON.stringify({...p0(de),"Content-Type":h.mediaType},null,2))):te(""),X(null),W("")}async function he(){De(!0),W(""),X(null);try{const J=Rp(de),ye=d0({customHeaders:J,headerParams:d,headerValues:ae,authType:k,authValue:O,apiKeyName:S,apiKeyLocation:R,basicUsername:F,basicPassword:G}),pe=Kd(g,n.path,l,q,R==="query"?{[S]:O}:{}),Ne=["get","head"].includes(n.method)?void 0:Z.trim()||void 0,ke=await h0({url:pe,method:n.method.toUpperCase(),headers:ye,body:Ne});X(ke)}catch(J){W(J instanceof Error?J.message:"请求失败")}finally{De(!1)}}return p.jsxs("div",{className:"request-tester",children:[p.jsxs("div",{className:"request-line",children:[p.jsx("span",{className:`method method-${n.method}`,children:n.method.toUpperCase()}),p.jsxs("label",{children:["Base URL",p.jsx("input",{value:g,onChange:J=>x(J.target.value),placeholder:"https://api.example.com"})]}),p.jsxs("div",{className:"request-actions",children:[p.jsxs("button",{className:"primary-button",onClick:he,disabled:_e,children:[p.jsx(Lu,{size:16}),_e?"请求中":"发送请求"]}),p.jsxs("button",{className:"secondary-button",onClick:M,disabled:_e,children:[p.jsx(hs,{size:16}),"MOCK数据"]})]})]}),p.jsx("code",{className:"request-preview",children:C}),p.jsxs("div",{className:"tester-grid",children:[p.jsxs("section",{className:"tester-panel",children:[p.jsxs("div",{className:"tester-panel-title",children:[p.jsx(Wd,{size:15}),"鉴权"]}),p.jsxs("div",{className:"tester-form-grid",children:[p.jsxs("label",{children:["类型",p.jsxs("select",{value:k,onChange:J=>E(J.target.value),children:[p.jsx("option",{value:"none",children:"None"}),p.jsx("option",{value:"bearer",children:"Bearer Token"}),p.jsx("option",{value:"jwt",children:"JWT Token"}),p.jsx("option",{value:"apiKey",children:"API Key"}),p.jsx("option",{value:"basic",children:"Basic Auth"})]})]}),k==="apiKey"?p.jsxs(p.Fragment,{children:[p.jsxs("label",{children:["Key 名称",p.jsx("input",{value:S,onChange:J=>I(J.target.value),placeholder:"X-API-Key"})]}),p.jsxs("label",{children:["位置",p.jsxs("select",{value:R,onChange:J=>H(J.target.value),children:[p.jsx("option",{value:"header",children:"Header"}),p.jsx("option",{value:"query",children:"Query"})]})]}),p.jsxs("label",{children:["Value",p.jsx("input",{value:O,onChange:J=>b(J.target.value),placeholder:"api key value"})]})]}):k==="basic"?p.jsxs(p.Fragment,{children:[p.jsxs("label",{children:["Username",p.jsx("input",{value:F,onChange:J=>K(J.target.value)})]}),p.jsxs("label",{children:["Password",p.jsx("input",{value:G,onChange:J=>Q(J.target.value),type:"password"})]})]}):k!=="none"?p.jsxs("label",{children:["Token",p.jsx("input",{value:O,onChange:J=>b(J.target.value),placeholder:"token"})]}):null]})]}),p.jsxs("section",{className:"tester-panel",children:[p.jsx("div",{className:"tester-panel-title",children:"参数"}),p.jsx(gu,{title:"Path",parameters:a,values:q,onChange:U}),p.jsx(gu,{title:"Query",parameters:u,values:q,onChange:U}),p.jsx(gu,{title:"Header",parameters:d,values:ae,onChange:D})]})]}),p.jsxs("div",{className:"tester-grid",children:[p.jsxs("section",{className:"tester-panel",children:[p.jsx("div",{className:"tester-panel-title",children:"请求头 JSON"}),p.jsx("textarea",{value:de,onChange:J=>Ie(J.target.value),spellCheck:!1})]}),p.jsxs("section",{className:"tester-panel",children:[p.jsxs("div",{className:"tester-panel-title",children:["请求体 ",h?`(${h.mediaType})`:""]}),p.jsx("textarea",{value:Z,onChange:J=>te(J.target.value),disabled:!h||["get","head"].includes(n.method),spellCheck:!1,placeholder:h?"JSON / raw body":"该接口没有请求体"})]})]}),xe?p.jsxs("div",{className:"import-error",children:[p.jsx(Ei,{size:16}),xe]}):null,p.jsxs("section",{className:"tester-panel response-panel",children:[p.jsx("div",{className:"tester-panel-title",children:"响应"}),ne?p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"response-meta-line",children:[p.jsxs("span",{className:ne.status>=200&&ne.status<300?"status-ok":"status-error",children:[ne.status," ",ne.statusText]}),p.jsxs("span",{children:[ne.elapsedMs,"ms"]}),p.jsx("span",{children:ne.url})]}),p.jsx("pre",{children:m0(ne.body)})]}):p.jsx("p",{className:"muted",children:"发送请求后显示响应内容。"})]})]})}function gu({title:i,parameters:n,values:r,onChange:l}){return n.length?p.jsxs("div",{className:"param-editor",children:[p.jsx("h4",{children:i}),n.map((a,u)=>{var h;const d=Ii(a,u);return p.jsxs("label",{children:[p.jsxs("span",{children:[a.name,a.required?p.jsx("b",{children:"*"}):null]}),p.jsx("input",{value:r[d]??"",onChange:y=>l({...r,[d]:y.target.value}),placeholder:a.description||((h=a.schema)==null?void 0:h.description)||""})]},d)})]}):null}function o0(i){var d,h,y,g;const n=((d=i.operation.requestBody)==null?void 0:d.content)??{},r=Object.entries(n),a=r.find(([x])=>x.includes("json"))??r[0],u=(h=i.operation.parameters)==null?void 0:h.find(x=>x.in==="body");if(!a&&(u!=null&&u.schema))return{mediaType:((y=i.operation.consumes)==null?void 0:y.find(x=>x.includes("json")))??((g=i.operation.consumes)==null?void 0:g[0])??"application/json",schema:u.schema};if(a)return{mediaType:a[0],schema:a[1].schema}}function Ou(i,n,r=0,l=new Set){var d;if(!n||r>8)return{};const a=Pt(i,n)??n;if(l.has(a))return{};if(l.add(a),a.default!==void 0)return a.default;if((d=a.enum)!=null&&d.length)return a.enum[0];if(a.type==="array")return[Ou(i,a.items,r+1,l)];if(a.type==="integer"||a.type==="number")return 0;if(a.type==="boolean")return!1;if(a.type==="string")return"";const u=a.properties??{};return Object.fromEntries(Object.entries(u).map(([h,y])=>[h,Ou(i,y,r+1,new Set(l))]))}function a0(i,n){var l;if(n.default!==void 0)return n.default;if((l=n.enum)!=null&&l.length)return n.enum[0];const r=u0(n);return xr(i,r,n.name)}function xr(i,n,r="",l=0,a=new Set){var x,k,E,O;if(!n||l>8)return Tu(r)??"mock-value";const u=Pt(i,n)??n;if(a.has(u))return{};const d=new Set(a);if(d.add(u),u.default!==void 0)return u.default;if(n.default!==void 0)return n.default;if((x=u.enum)!=null&&x.length)return u.enum[0];if((k=n.enum)!=null&&k.length)return n.enum[0];const h=Tu(r,u.format||n.format),y=u.type||n.type||(u.properties?"object":"");if(h!==void 0&&(!y||y==="string"||y==="integer"||y==="number"))return h;if((E=u.oneOf)!=null&&E.length)return xr(i,u.oneOf[0],r,l+1,d);if((O=u.anyOf)!=null&&O.length)return xr(i,u.anyOf[0],r,l+1,d);if(y==="array")return[xr(i,u.items,r,l+1,d)];if(y==="integer"||y==="number")return c0(r);if(y==="boolean")return!0;if(y==="string")return h??"mock-value";const g=u.properties??{};return Object.keys(g).length?Object.fromEntries(Object.entries(g).map(([b,S])=>[b,xr(i,S,b,l+1,d)])):u.additionalProperties&&typeof u.additionalProperties=="object"?{key:xr(i,u.additionalProperties,"value",l+1,d)}:h??{}}function u0(i){var n;if(i.schema)return i.schema;if(!(!i.type&&!i.format&&!i.items&&!((n=i.enum)!=null&&n.length)&&i.default===void 0))return{type:i.type,format:i.format,items:i.items,enum:i.enum,default:i.default,description:i.description}}function Tu(i,n=""){const r=i.toLowerCase().replace(/[^a-z0-9]/g,"");if(n==="date-time")return new Date().toISOString();if(n==="date")return new Date().toISOString().slice(0,10);if(n==="email"||r.includes("email"))return"mock@example.com";if(n==="uuid"||r.includes("uuid"))return"00000000-0000-4000-8000-000000000000";if(r==="id"||r.endsWith("id")||r==="page"||r==="pagenum"||r==="pageindex")return 1;if(r==="pagesize"||r==="limit"||r==="size")return 10;if(r.includes("phone")||r.includes("mobile"))return"13800000000";if(r.includes("name")||r.includes("title")||r.includes("keyword"))return"mock-name";if(r.includes("url"))return"https://example.com";if(r.includes("date"))return new Date().toISOString().slice(0,10);if(r.includes("time"))return new Date().toISOString()}function c0(i){const n=Tu(i);return typeof n=="number"?n:1}function f0(i){return i==null?"":typeof i=="string"?i:typeof i=="number"||typeof i=="boolean"?String(i):JSON.stringify(i)}function Ii(i,n){return`${i.in}-${i.name}-${n}`}function Kd(i,n,r,l,a){if(!i.trim()&&!/^https?:\/\//i.test(n))throw new Error("请输入 Base URL,例如 https://api.example.com");const u=i.trim()||void 0;let d=n;r.forEach((y,g)=>{if(y.in!=="path")return;const x=l[Ii(y,g)]??"";d=d.replace(new RegExp(`\\{${y0(y.name)}\\}`,"g"),encodeURIComponent(x))});const h=new URL(d,u);return r.forEach((y,g)=>{if(y.in!=="query")return;const x=l[Ii(y,g)]??"";x&&h.searchParams.append(y.name,x)}),Object.entries(a).forEach(([y,g])=>{y.trim()&&g.trim()&&h.searchParams.set(y.trim(),g.trim())}),h.toString()}function d0({customHeaders:i,headerParams:n,headerValues:r,authType:l,authValue:a,apiKeyName:u,apiKeyLocation:d,basicUsername:h,basicPassword:y}){const g={...i};return n.forEach((x,k)=>{const E=r[Ii(x,k)];E&&(g[x.name]=E)}),(l==="bearer"||l==="jwt")&&a.trim()&&(g.Authorization=`Bearer ${a.trim()}`),l==="apiKey"&&d==="header"&&u.trim()&&a.trim()&&(g[u.trim()]=a.trim()),l==="basic"&&(h||y)&&(g.Authorization=`Basic ${btoa(`${h}:${y}`)}`),g}function Rp(i){if(!i.trim())return{};const n=JSON.parse(i);return Object.fromEntries(Object.entries(n).map(([r,l])=>[r,String(l)]))}function p0(i){try{return Rp(i)}catch{return{}}}async function h0(i){const n=await fetch("/api/request/send",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(i)}),r=await n.json();if(!n.ok)throw new Error(r.error||"请求失败");return r}function m0(i){try{return JSON.stringify(JSON.parse(i),null,2)}catch{return i}}function $p(i){const n=document.createElement("textarea");n.value=i,n.setAttribute("readonly","true"),n.style.position="fixed",n.style.left="-9999px",n.style.top="0",document.body.appendChild(n),n.focus(),n.select();try{return document.execCommand("copy")}finally{document.body.removeChild(n)}}function y0(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vu({title:i,count:n,children:r}){return p.jsxs("section",{className:"detail-section",children:[p.jsxs("div",{className:"section-title",children:[p.jsx("h3",{children:i}),p.jsx("span",{children:n})]}),r]})}function wu({rows:i,empty:n}){return i.length?p.jsx("div",{className:"table-wrap",children:p.jsxs("table",{children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{children:"字段"}),p.jsx("th",{children:"位置"}),p.jsx("th",{children:"必填"}),p.jsx("th",{children:"类型"}),p.jsx("th",{children:"说明"}),p.jsx("th",{children:"默认值"}),p.jsx("th",{children:"枚举"})]})}),p.jsx("tbody",{children:i.map((r,l)=>p.jsxs("tr",{children:[p.jsx("td",{children:p.jsx("code",{style:{paddingLeft:r.depth*16},children:r.name})}),p.jsx("td",{children:r.location||"-"}),p.jsx("td",{children:r.required?"是":"否"}),p.jsx("td",{children:r.type}),p.jsx("td",{children:r.description||"-"}),p.jsx("td",{children:r.defaultValue||"-"}),p.jsx("td",{children:r.enumValue||"-"})]},`${r.location}-${r.path}-${r.depth}-${l}`))})]})}):p.jsx("p",{className:"muted",children:n})}function g0(i){const n=new Date(i);return Number.isNaN(n.getTime())?i:n.toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}Om.createRoot(document.getElementById("root")).render(p.jsx(km.StrictMode,{children:p.jsx(Jg,{})}));