certimate/ui/dist/assets/index-5t0OlkS6.js
2024-09-26 20:31:04 +08:00

314 lines
759 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var cT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Z$=cT((cV,qu)=>{function Tw(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(n,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();var Zc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rw={exports:{}},Qd={},Pw={exports:{}},tt={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var yc=Symbol.for("react.element"),uT=Symbol.for("react.portal"),dT=Symbol.for("react.fragment"),fT=Symbol.for("react.strict_mode"),hT=Symbol.for("react.profiler"),pT=Symbol.for("react.provider"),mT=Symbol.for("react.context"),gT=Symbol.for("react.forward_ref"),vT=Symbol.for("react.suspense"),yT=Symbol.for("react.memo"),xT=Symbol.for("react.lazy"),Ky=Symbol.iterator;function wT(e){return e===null||typeof e!="object"?null:(e=Ky&&e[Ky]||e["@@iterator"],typeof e=="function"?e:null)}var Aw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dw=Object.assign,Ow={};function ka(e,t,r){this.props=e,this.context=t,this.refs=Ow,this.updater=r||Aw}ka.prototype.isReactComponent={};ka.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};ka.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Mw(){}Mw.prototype=ka.prototype;function zm(e,t,r){this.props=e,this.context=t,this.refs=Ow,this.updater=r||Aw}var Um=zm.prototype=new Mw;Um.constructor=zm;Dw(Um,ka.prototype);Um.isPureReactComponent=!0;var Gy=Array.isArray,Iw=Object.prototype.hasOwnProperty,$m={current:null},Lw={key:!0,ref:!0,__self:!0,__source:!0};function Fw(e,t,r){var n,s={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Iw.call(t,n)&&!Lw.hasOwnProperty(n)&&(s[n]=t[n]);var l=arguments.length-2;if(l===1)s.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)s[n]===void 0&&(s[n]=l[n]);return{$$typeof:yc,type:e,key:o,ref:i,props:s,_owner:$m.current}}function _T(e,t){return{$$typeof:yc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Vm(e){return typeof e=="object"&&e!==null&&e.$$typeof===yc}function bT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Zy=/\/+/g;function uh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?bT(""+e.key):t.toString(36)}function Eu(e,t,r,n,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case yc:case uT:i=!0}}if(i)return i=e,s=s(i),e=n===""?"."+uh(i,0):n,Gy(s)?(r="",e!=null&&(r=e.replace(Zy,"$&/")+"/"),Eu(s,t,r,"",function(u){return u})):s!=null&&(Vm(s)&&(s=_T(s,r+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(Zy,"$&/")+"/")+e)),t.push(s)),1;if(i=0,n=n===""?".":n+":",Gy(e))for(var l=0;l<e.length;l++){o=e[l];var c=n+uh(o,l);i+=Eu(o,t,r,c,s)}else if(c=wT(e),typeof c=="function")for(e=c.call(e),l=0;!(o=e.next()).done;)o=o.value,c=n+uh(o,l++),i+=Eu(o,t,r,c,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function qc(e,t,r){if(e==null)return e;var n=[],s=0;return Eu(e,n,"","",function(o){return t.call(r,o,s++)}),n}function ST(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var _r={current:null},Nu={transition:null},kT={ReactCurrentDispatcher:_r,ReactCurrentBatchConfig:Nu,ReactCurrentOwner:$m};function zw(){throw Error("act(...) is not supported in production builds of React.")}tt.Children={map:qc,forEach:function(e,t,r){qc(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return qc(e,function(){t++}),t},toArray:function(e){return qc(e,function(t){return t})||[]},only:function(e){if(!Vm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};tt.Component=ka;tt.Fragment=dT;tt.Profiler=hT;tt.PureComponent=zm;tt.StrictMode=fT;tt.Suspense=vT;tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kT;tt.act=zw;tt.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Dw({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=$m.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)Iw.call(t,c)&&!Lw.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];n.children=l}return{$$typeof:yc,type:e.type,key:s,ref:o,props:n,_owner:i}};tt.createContext=function(e){return e={$$typeof:mT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:pT,_context:e},e.Consumer=e};tt.createElement=Fw;tt.createFactory=function(e){var t=Fw.bind(null,e);return t.type=e,t};tt.createRef=function(){return{current:null}};tt.forwardRef=function(e){return{$$typeof:gT,render:e}};tt.isValidElement=Vm;tt.lazy=function(e){return{$$typeof:xT,_payload:{_status:-1,_result:e},_init:ST}};tt.memo=function(e,t){return{$$typeof:yT,type:e,compare:t===void 0?null:t}};tt.startTransition=function(e){var t=Nu.transition;Nu.transition={};try{e()}finally{Nu.transition=t}};tt.unstable_act=zw;tt.useCallback=function(e,t){return _r.current.useCallback(e,t)};tt.useContext=function(e){return _r.current.useContext(e)};tt.useDebugValue=function(){};tt.useDeferredValue=function(e){return _r.current.useDeferredValue(e)};tt.useEffect=function(e,t){return _r.current.useEffect(e,t)};tt.useId=function(){return _r.current.useId()};tt.useImperativeHandle=function(e,t,r){return _r.current.useImperativeHandle(e,t,r)};tt.useInsertionEffect=function(e,t){return _r.current.useInsertionEffect(e,t)};tt.useLayoutEffect=function(e,t){return _r.current.useLayoutEffect(e,t)};tt.useMemo=function(e,t){return _r.current.useMemo(e,t)};tt.useReducer=function(e,t,r){return _r.current.useReducer(e,t,r)};tt.useRef=function(e){return _r.current.useRef(e)};tt.useState=function(e){return _r.current.useState(e)};tt.useSyncExternalStore=function(e,t,r){return _r.current.useSyncExternalStore(e,t,r)};tt.useTransition=function(){return _r.current.useTransition()};tt.version="18.3.1";Pw.exports=tt;var g=Pw.exports;const Be=Fm(g),Uw=Tw({__proto__:null,default:Be},[g]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var CT=g,jT=Symbol.for("react.element"),ET=Symbol.for("react.fragment"),NT=Object.prototype.hasOwnProperty,TT=CT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,RT={key:!0,ref:!0,__self:!0,__source:!0};function $w(e,t,r){var n,s={},o=null,i=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)NT.call(t,n)&&!RT.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:jT,type:e,key:o,ref:i,props:s,_owner:TT.current}}Qd.Fragment=ET;Qd.jsx=$w;Qd.jsxs=$w;Rw.exports=Qd;var a=Rw.exports,ip={},Vw={exports:{}},Kr={},Bw={exports:{}},Ww={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(K,I){var Q=K.length;K.push(I);e:for(;0<Q;){var z=Q-1>>>1,$=K[z];if(0<s($,I))K[z]=I,K[Q]=$,Q=z;else break e}}function r(K){return K.length===0?null:K[0]}function n(K){if(K.length===0)return null;var I=K[0],Q=K.pop();if(Q!==I){K[0]=Q;e:for(var z=0,$=K.length,he=$>>>1;z<he;){var ne=2*(z+1)-1,se=K[ne],Oe=ne+1,pe=K[Oe];if(0>s(se,Q))Oe<$&&0>s(pe,se)?(K[z]=pe,K[Oe]=Q,z=Oe):(K[z]=se,K[ne]=Q,z=ne);else if(Oe<$&&0>s(pe,Q))K[z]=pe,K[Oe]=Q,z=Oe;else break e}}return I}function s(K,I){var Q=K.sortIndex-I.sortIndex;return Q!==0?Q:K.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],u=[],d=1,f=null,m=3,v=!1,x=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,p=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 w(K){for(var I=r(u);I!==null;){if(I.callback===null)n(u);else if(I.startTime<=K)n(u),I.sortIndex=I.expirationTime,t(c,I);else break;I=r(u)}}function C(K){if(y=!1,w(K),!x)if(r(c)!==null)x=!0,te(j);else{var I=r(u);I!==null&&B(C,I.startTime-K)}}function j(K,I){x=!1,y&&(y=!1,p(P),P=-1),v=!0;var Q=m;try{for(w(I),f=r(c);f!==null&&(!(f.expirationTime>I)||K&&!q());){var z=f.callback;if(typeof z=="function"){f.callback=null,m=f.priorityLevel;var $=z(f.expirationTime<=I);I=e.unstable_now(),typeof $=="function"?f.callback=$:f===r(c)&&n(c),w(I)}else n(c);f=r(c)}if(f!==null)var he=!0;else{var ne=r(u);ne!==null&&B(C,ne.startTime-I),he=!1}return he}finally{f=null,m=Q,v=!1}}var E=!1,R=null,P=-1,A=5,L=-1;function q(){return!(e.unstable_now()-L<A)}function N(){if(R!==null){var K=e.unstable_now();L=K;var I=!0;try{I=R(!0,K)}finally{I?F():(E=!1,R=null)}}else E=!1}var F;if(typeof h=="function")F=function(){h(N)};else if(typeof MessageChannel<"u"){var b=new MessageChannel,V=b.port2;b.port1.onmessage=N,F=function(){V.postMessage(null)}}else F=function(){_(N,0)};function te(K){R=K,E||(E=!0,F())}function B(K,I){P=_(function(){K(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_continueExecution=function(){x||v||(x=!0,te(j))},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(K){switch(m){case 1:case 2:case 3:var I=3;break;default:I=m}var Q=m;m=I;try{return K()}finally{m=Q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(K,I){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var Q=m;m=K;try{return I()}finally{m=Q}},e.unstable_scheduleCallback=function(K,I,Q){var z=e.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?z+Q:z):Q=z,K){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=Q+$,K={id:d++,callback:I,priorityLevel:K,startTime:Q,expirationTime:$,sortIndex:-1},Q>z?(K.sortIndex=Q,t(u,K),r(c)===null&&K===r(u)&&(y?(p(P),P=-1):y=!0,B(C,Q-z))):(K.sortIndex=$,t(c,K),x||v||(x=!0,te(j))),K},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(K){var I=m;return function(){var Q=m;m=I;try{return K.apply(this,arguments)}finally{m=Q}}}})(Ww);Bw.exports=Ww;var PT=Bw.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var AT=g,Hr=PT;function ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 Hw=new Set,Rl={};function ci(e,t){ca(e,t),ca(e+"Capture",t)}function ca(e,t){for(Rl[e]=t,e=0;e<t.length;e++)Hw.add(t[e])}var ys=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ap=Object.prototype.hasOwnProperty,DT=/^[: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]*$/,qy={},Xy={};function OT(e){return ap.call(Xy,e)?!0:ap.call(qy,e)?!1:DT.test(e)?Xy[e]=!0:(qy[e]=!0,!1)}function MT(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function IT(e,t,r,n){if(t===null||typeof t>"u"||MT(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 br(e,t,r,n,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var nr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){nr[e]=new br(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];nr[t]=new br(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){nr[e]=new br(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){nr[e]=new br(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){nr[e]=new br(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){nr[e]=new br(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){nr[e]=new br(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){nr[e]=new br(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){nr[e]=new br(e,5,!1,e.toLowerCase(),null,!1,!1)});var Bm=/[\-:]([a-z])/g;function Wm(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(Bm,Wm);nr[t]=new br(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(Bm,Wm);nr[t]=new br(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(Bm,Wm);nr[t]=new br(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){nr[e]=new br(e,1,!1,e.toLowerCase(),null,!1,!1)});nr.xlinkHref=new br("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){nr[e]=new br(e,1,!1,e.toLowerCase(),null,!0,!0)});function Hm(e,t,r,n){var s=nr.hasOwnProperty(t)?nr[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(IT(t,r,s,n)&&(r=null),n||s===null?OT(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Ns=AT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Xc=Symbol.for("react.element"),Ri=Symbol.for("react.portal"),Pi=Symbol.for("react.fragment"),Ym=Symbol.for("react.strict_mode"),lp=Symbol.for("react.profiler"),Yw=Symbol.for("react.provider"),Kw=Symbol.for("react.context"),Km=Symbol.for("react.forward_ref"),cp=Symbol.for("react.suspense"),up=Symbol.for("react.suspense_list"),Gm=Symbol.for("react.memo"),Ks=Symbol.for("react.lazy"),Gw=Symbol.for("react.offscreen"),Qy=Symbol.iterator;function $a(e){return e===null||typeof e!="object"?null:(e=Qy&&e[Qy]||e["@@iterator"],typeof e=="function"?e:null)}var Mt=Object.assign,dh;function nl(e){if(dh===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);dh=t&&t[1]||""}return`
`+dh+e}var fh=!1;function hh(e,t){if(!e||fh)return"";fh=!0;var r=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(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(`
`),o=n.stack.split(`
`),i=s.length-1,l=o.length-1;1<=i&&0<=l&&s[i]!==o[l];)l--;for(;1<=i&&0<=l;i--,l--)if(s[i]!==o[l]){if(i!==1||l!==1)do if(i--,l--,0>l||s[i]!==o[l]){var c=`
`+s[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=l);break}}}finally{fh=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?nl(e):""}function LT(e){switch(e.tag){case 5:return nl(e.type);case 16:return nl("Lazy");case 13:return nl("Suspense");case 19:return nl("SuspenseList");case 0:case 2:case 15:return e=hh(e.type,!1),e;case 11:return e=hh(e.type.render,!1),e;case 1:return e=hh(e.type,!0),e;default:return""}}function dp(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 Pi:return"Fragment";case Ri:return"Portal";case lp:return"Profiler";case Ym:return"StrictMode";case cp:return"Suspense";case up:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Kw:return(e.displayName||"Context")+".Consumer";case Yw:return(e._context.displayName||"Context")+".Provider";case Km:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gm:return t=e.displayName||null,t!==null?t:dp(e.type)||"Memo";case Ks:t=e._payload,e=e._init;try{return dp(e(t))}catch{}}return null}function FT(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 dp(t);case 8:return t===Ym?"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 go(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function zT(e){var t=Zw(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qc(e){e._valueTracker||(e._valueTracker=zT(e))}function qw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Zw(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Xu(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 fp(e,t){var r=t.checked;return Mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Jy(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=go(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Xw(e,t){t=t.checked,t!=null&&Hm(e,"checked",t,!1)}function hp(e,t){Xw(e,t);var r=go(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pp(e,t.type,r):t.hasOwnProperty("defaultValue")&&pp(e,t.type,go(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ex(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function pp(e,t,r){(t!=="number"||Xu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var sl=Array.isArray;function Ki(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+go(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function mp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ie(91));return Mt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function tx(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(ie(92));if(sl(r)){if(1<r.length)throw Error(ie(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:go(r)}}function Qw(e,t){var r=go(t.value),n=go(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function rx(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Jw(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 gp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Jw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Jc,e_=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Jc=Jc||document.createElement("div"),Jc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Jc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Pl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var gl={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},UT=["Webkit","ms","Moz","O"];Object.keys(gl).forEach(function(e){UT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),gl[t]=gl[e]})});function t_(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||gl.hasOwnProperty(e)&&gl[e]?(""+t).trim():t+"px"}function r_(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=t_(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var $T=Mt({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 vp(e,t){if(t){if($T[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ie(62))}}function yp(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 xp=null;function Zm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wp=null,Gi=null,Zi=null;function nx(e){if(e=_c(e)){if(typeof wp!="function")throw Error(ie(280));var t=e.stateNode;t&&(t=nf(t),wp(e.stateNode,e.type,t))}}function n_(e){Gi?Zi?Zi.push(e):Zi=[e]:Gi=e}function s_(){if(Gi){var e=Gi,t=Zi;if(Zi=Gi=null,nx(e),t)for(e=0;e<t.length;e++)nx(t[e])}}function o_(e,t){return e(t)}function i_(){}var ph=!1;function a_(e,t,r){if(ph)return e(t,r);ph=!0;try{return o_(e,t,r)}finally{ph=!1,(Gi!==null||Zi!==null)&&(i_(),s_())}}function Al(e,t){var r=e.stateNode;if(r===null)return null;var n=nf(r);if(n===null)return null;r=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(ie(231,t,typeof r));return r}var _p=!1;if(ys)try{var Va={};Object.defineProperty(Va,"passive",{get:function(){_p=!0}}),window.addEventListener("test",Va,Va),window.removeEventListener("test",Va,Va)}catch{_p=!1}function VT(e,t,r,n,s,o,i,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var vl=!1,Qu=null,Ju=!1,bp=null,BT={onError:function(e){vl=!0,Qu=e}};function WT(e,t,r,n,s,o,i,l,c){vl=!1,Qu=null,VT.apply(BT,arguments)}function HT(e,t,r,n,s,o,i,l,c){if(WT.apply(this,arguments),vl){if(vl){var u=Qu;vl=!1,Qu=null}else throw Error(ie(198));Ju||(Ju=!0,bp=u)}}function ui(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function l_(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 sx(e){if(ui(e)!==e)throw Error(ie(188))}function YT(e){var t=e.alternate;if(!t){if(t=ui(e),t===null)throw Error(ie(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var o=s.alternate;if(o===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===r)return sx(s),e;if(o===n)return sx(s),t;o=o.sibling}throw Error(ie(188))}if(r.return!==n.return)r=s,n=o;else{for(var i=!1,l=s.child;l;){if(l===r){i=!0,r=s,n=o;break}if(l===n){i=!0,n=s,r=o;break}l=l.sibling}if(!i){for(l=o.child;l;){if(l===r){i=!0,r=o,n=s;break}if(l===n){i=!0,n=o,r=s;break}l=l.sibling}if(!i)throw Error(ie(189))}}if(r.alternate!==n)throw Error(ie(190))}if(r.tag!==3)throw Error(ie(188));return r.stateNode.current===r?e:t}function c_(e){return e=YT(e),e!==null?u_(e):null}function u_(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=u_(e);if(t!==null)return t;e=e.sibling}return null}var d_=Hr.unstable_scheduleCallback,ox=Hr.unstable_cancelCallback,KT=Hr.unstable_shouldYield,GT=Hr.unstable_requestPaint,Ut=Hr.unstable_now,ZT=Hr.unstable_getCurrentPriorityLevel,qm=Hr.unstable_ImmediatePriority,f_=Hr.unstable_UserBlockingPriority,ed=Hr.unstable_NormalPriority,qT=Hr.unstable_LowPriority,h_=Hr.unstable_IdlePriority,Jd=null,Vn=null;function XT(e){if(Vn&&typeof Vn.onCommitFiberRoot=="function")try{Vn.onCommitFiberRoot(Jd,e,void 0,(e.current.flags&128)===128)}catch{}}var xn=Math.clz32?Math.clz32:e2,QT=Math.log,JT=Math.LN2;function e2(e){return e>>>=0,e===0?32:31-(QT(e)/JT|0)|0}var eu=64,tu=4194304;function ol(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 td(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,i=r&268435455;if(i!==0){var l=i&~s;l!==0?n=ol(l):(o&=i,o!==0&&(n=ol(o)))}else i=r&~s,i!==0?n=ol(i):o!==0&&(n=ol(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-xn(t),s=1<<r,n|=e[r],t&=~s;return n}function t2(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 r2(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-xn(o),l=1<<i,c=s[i];c===-1?(!(l&r)||l&n)&&(s[i]=t2(l,t)):c<=t&&(e.expiredLanes|=l),o&=~l}}function Sp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function p_(){var e=eu;return eu<<=1,!(eu&4194240)&&(eu=64),e}function mh(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function xc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xn(t),e[t]=r}function n2(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-xn(r),o=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~o}}function Xm(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-xn(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var mt=0;function m_(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var g_,Qm,v_,y_,x_,kp=!1,ru=[],oo=null,io=null,ao=null,Dl=new Map,Ol=new Map,Zs=[],s2="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 ix(e,t){switch(e){case"focusin":case"focusout":oo=null;break;case"dragenter":case"dragleave":io=null;break;case"mouseover":case"mouseout":ao=null;break;case"pointerover":case"pointerout":Dl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ol.delete(t.pointerId)}}function Ba(e,t,r,n,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[s]},t!==null&&(t=_c(t),t!==null&&Qm(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function o2(e,t,r,n,s){switch(t){case"focusin":return oo=Ba(oo,e,t,r,n,s),!0;case"dragenter":return io=Ba(io,e,t,r,n,s),!0;case"mouseover":return ao=Ba(ao,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return Dl.set(o,Ba(Dl.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,Ol.set(o,Ba(Ol.get(o)||null,e,t,r,n,s)),!0}return!1}function w_(e){var t=Fo(e.target);if(t!==null){var r=ui(t);if(r!==null){if(t=r.tag,t===13){if(t=l_(r),t!==null){e.blockedOn=t,x_(e.priority,function(){v_(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Tu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Cp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);xp=n,r.target.dispatchEvent(n),xp=null}else return t=_c(r),t!==null&&Qm(t),e.blockedOn=r,!1;t.shift()}return!0}function ax(e,t,r){Tu(e)&&r.delete(t)}function i2(){kp=!1,oo!==null&&Tu(oo)&&(oo=null),io!==null&&Tu(io)&&(io=null),ao!==null&&Tu(ao)&&(ao=null),Dl.forEach(ax),Ol.forEach(ax)}function Wa(e,t){e.blockedOn===t&&(e.blockedOn=null,kp||(kp=!0,Hr.unstable_scheduleCallback(Hr.unstable_NormalPriority,i2)))}function Ml(e){function t(s){return Wa(s,e)}if(0<ru.length){Wa(ru[0],e);for(var r=1;r<ru.length;r++){var n=ru[r];n.blockedOn===e&&(n.blockedOn=null)}}for(oo!==null&&Wa(oo,e),io!==null&&Wa(io,e),ao!==null&&Wa(ao,e),Dl.forEach(t),Ol.forEach(t),r=0;r<Zs.length;r++)n=Zs[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Zs.length&&(r=Zs[0],r.blockedOn===null);)w_(r),r.blockedOn===null&&Zs.shift()}var qi=Ns.ReactCurrentBatchConfig,rd=!0;function a2(e,t,r,n){var s=mt,o=qi.transition;qi.transition=null;try{mt=1,Jm(e,t,r,n)}finally{mt=s,qi.transition=o}}function l2(e,t,r,n){var s=mt,o=qi.transition;qi.transition=null;try{mt=4,Jm(e,t,r,n)}finally{mt=s,qi.transition=o}}function Jm(e,t,r,n){if(rd){var s=Cp(e,t,r,n);if(s===null)Ch(e,t,n,nd,r),ix(e,n);else if(o2(s,e,t,r,n))n.stopPropagation();else if(ix(e,n),t&4&&-1<s2.indexOf(e)){for(;s!==null;){var o=_c(s);if(o!==null&&g_(o),o=Cp(e,t,r,n),o===null&&Ch(e,t,n,nd,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else Ch(e,t,n,null,r)}}var nd=null;function Cp(e,t,r,n){if(nd=null,e=Zm(n),e=Fo(e),e!==null)if(t=ui(e),t===null)e=null;else if(r=t.tag,r===13){if(e=l_(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return nd=e,null}function __(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(ZT()){case qm:return 1;case f_:return 4;case ed:case qT:return 16;case h_:return 536870912;default:return 16}default:return 16}}var eo=null,eg=null,Ru=null;function b_(){if(Ru)return Ru;var e,t=eg,r=t.length,n,s="value"in eo?eo.value:eo.textContent,o=s.length;for(e=0;e<r&&t[e]===s[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===s[o-n];n++);return Ru=s.slice(e,1<n?1-n:void 0)}function Pu(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 nu(){return!0}function lx(){return!1}function Gr(e){function t(r,n,s,o,i){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?nu:lx,this.isPropagationStopped=lx,this}return Mt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=nu)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=nu)},persist:function(){},isPersistent:nu}),t}var Ca={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tg=Gr(Ca),wc=Mt({},Ca,{view:0,detail:0}),c2=Gr(wc),gh,vh,Ha,ef=Mt({},wc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rg,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!==Ha&&(Ha&&e.type==="mousemove"?(gh=e.screenX-Ha.screenX,vh=e.screenY-Ha.screenY):vh=gh=0,Ha=e),gh)},movementY:function(e){return"movementY"in e?e.movementY:vh}}),cx=Gr(ef),u2=Mt({},ef,{dataTransfer:0}),d2=Gr(u2),f2=Mt({},wc,{relatedTarget:0}),yh=Gr(f2),h2=Mt({},Ca,{animationName:0,elapsedTime:0,pseudoElement:0}),p2=Gr(h2),m2=Mt({},Ca,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),g2=Gr(m2),v2=Mt({},Ca,{data:0}),ux=Gr(v2),y2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},x2={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"},w2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=w2[e])?!!t[e]:!1}function rg(){return _2}var b2=Mt({},wc,{key:function(e){if(e.key){var t=y2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Pu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?x2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rg,charCode:function(e){return e.type==="keypress"?Pu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Pu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),S2=Gr(b2),k2=Mt({},ef,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dx=Gr(k2),C2=Mt({},wc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rg}),j2=Gr(C2),E2=Mt({},Ca,{propertyName:0,elapsedTime:0,pseudoElement:0}),N2=Gr(E2),T2=Mt({},ef,{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}),R2=Gr(T2),P2=[9,13,27,32],ng=ys&&"CompositionEvent"in window,yl=null;ys&&"documentMode"in document&&(yl=document.documentMode);var A2=ys&&"TextEvent"in window&&!yl,S_=ys&&(!ng||yl&&8<yl&&11>=yl),fx=" ",hx=!1;function k_(e,t){switch(e){case"keyup":return P2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function C_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ai=!1;function D2(e,t){switch(e){case"compositionend":return C_(t);case"keypress":return t.which!==32?null:(hx=!0,fx);case"textInput":return e=t.data,e===fx&&hx?null:e;default:return null}}function O2(e,t){if(Ai)return e==="compositionend"||!ng&&k_(e,t)?(e=b_(),Ru=eg=eo=null,Ai=!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 S_&&t.locale!=="ko"?null:t.data;default:return null}}var M2={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 px(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!M2[e.type]:t==="textarea"}function j_(e,t,r,n){n_(n),t=sd(t,"onChange"),0<t.length&&(r=new tg("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var xl=null,Il=null;function I2(e){L_(e,0)}function tf(e){var t=Mi(e);if(qw(t))return e}function L2(e,t){if(e==="change")return t}var E_=!1;if(ys){var xh;if(ys){var wh="oninput"in document;if(!wh){var mx=document.createElement("div");mx.setAttribute("oninput","return;"),wh=typeof mx.oninput=="function"}xh=wh}else xh=!1;E_=xh&&(!document.documentMode||9<document.documentMode)}function gx(){xl&&(xl.detachEvent("onpropertychange",N_),Il=xl=null)}function N_(e){if(e.propertyName==="value"&&tf(Il)){var t=[];j_(t,Il,e,Zm(e)),a_(I2,t)}}function F2(e,t,r){e==="focusin"?(gx(),xl=t,Il=r,xl.attachEvent("onpropertychange",N_)):e==="focusout"&&gx()}function z2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tf(Il)}function U2(e,t){if(e==="click")return tf(t)}function $2(e,t){if(e==="input"||e==="change")return tf(t)}function V2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bn=typeof Object.is=="function"?Object.is:V2;function Ll(e,t){if(bn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!ap.call(t,s)||!bn(e[s],t[s]))return!1}return!0}function vx(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yx(e,t){var r=vx(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=vx(r)}}function T_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?T_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function R_(){for(var e=window,t=Xu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Xu(e.document)}return t}function sg(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 B2(e){var t=R_(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&T_(r.ownerDocument.documentElement,r)){if(n!==null&&sg(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,o=Math.min(n.start,s);n=n.end===void 0?o:Math.min(n.end,s),!e.extend&&o>n&&(s=n,n=o,o=s),s=yx(r,o);var i=yx(r,n);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var W2=ys&&"documentMode"in document&&11>=document.documentMode,Di=null,jp=null,wl=null,Ep=!1;function xx(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ep||Di==null||Di!==Xu(n)||(n=Di,"selectionStart"in n&&sg(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),wl&&Ll(wl,n)||(wl=n,n=sd(jp,"onSelect"),0<n.length&&(t=new tg("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Di)))}function su(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Oi={animationend:su("Animation","AnimationEnd"),animationiteration:su("Animation","AnimationIteration"),animationstart:su("Animation","AnimationStart"),transitionend:su("Transition","TransitionEnd")},_h={},P_={};ys&&(P_=document.createElement("div").style,"AnimationEvent"in window||(delete Oi.animationend.animation,delete Oi.animationiteration.animation,delete Oi.animationstart.animation),"TransitionEvent"in window||delete Oi.transitionend.transition);function rf(e){if(_h[e])return _h[e];if(!Oi[e])return e;var t=Oi[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in P_)return _h[e]=t[r];return e}var A_=rf("animationend"),D_=rf("animationiteration"),O_=rf("animationstart"),M_=rf("transitionend"),I_=new Map,wx="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 jo(e,t){I_.set(e,t),ci(t,[e])}for(var bh=0;bh<wx.length;bh++){var Sh=wx[bh],H2=Sh.toLowerCase(),Y2=Sh[0].toUpperCase()+Sh.slice(1);jo(H2,"on"+Y2)}jo(A_,"onAnimationEnd");jo(D_,"onAnimationIteration");jo(O_,"onAnimationStart");jo("dblclick","onDoubleClick");jo("focusin","onFocus");jo("focusout","onBlur");jo(M_,"onTransitionEnd");ca("onMouseEnter",["mouseout","mouseover"]);ca("onMouseLeave",["mouseout","mouseover"]);ca("onPointerEnter",["pointerout","pointerover"]);ca("onPointerLeave",["pointerout","pointerover"]);ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ci("onBeforeInput",["compositionend","keypress","textInput","paste"]);ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var il="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(" "),K2=new Set("cancel close invalid load scroll toggle".split(" ").concat(il));function _x(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,HT(n,t,void 0,e),e.currentTarget=null}function L_(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var i=n.length-1;0<=i;i--){var l=n[i],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==o&&s.isPropagationStopped())break e;_x(s,l,u),o=c}else for(i=0;i<n.length;i++){if(l=n[i],c=l.instance,u=l.currentTarget,l=l.listener,c!==o&&s.isPropagationStopped())break e;_x(s,l,u),o=c}}}if(Ju)throw e=bp,Ju=!1,bp=null,e}function bt(e,t){var r=t[Ap];r===void 0&&(r=t[Ap]=new Set);var n=e+"__bubble";r.has(n)||(F_(t,e,2,!1),r.add(n))}function kh(e,t,r){var n=0;t&&(n|=4),F_(r,e,n,t)}var ou="_reactListening"+Math.random().toString(36).slice(2);function Fl(e){if(!e[ou]){e[ou]=!0,Hw.forEach(function(r){r!=="selectionchange"&&(K2.has(r)||kh(r,!1,e),kh(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ou]||(t[ou]=!0,kh("selectionchange",!1,t))}}function F_(e,t,r,n){switch(__(t)){case 1:var s=a2;break;case 4:s=l2;break;default:s=Jm}r=s.bind(null,t,r,e),s=void 0,!_p||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function Ch(e,t,r,n,s){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var l=n.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(i===4)for(i=n.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;i=i.return}for(;l!==null;){if(i=Fo(l),i===null)return;if(c=i.tag,c===5||c===6){n=o=i;continue e}l=l.parentNode}}n=n.return}a_(function(){var u=o,d=Zm(r),f=[];e:{var m=I_.get(e);if(m!==void 0){var v=tg,x=e;switch(e){case"keypress":if(Pu(r)===0)break e;case"keydown":case"keyup":v=S2;break;case"focusin":x="focus",v=yh;break;case"focusout":x="blur",v=yh;break;case"beforeblur":case"afterblur":v=yh;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=cx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=d2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=j2;break;case A_:case D_:case O_:v=p2;break;case M_:v=N2;break;case"scroll":v=c2;break;case"wheel":v=R2;break;case"copy":case"cut":case"paste":v=g2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=dx}var y=(t&4)!==0,_=!y&&e==="scroll",p=y?m!==null?m+"Capture":null:m;y=[];for(var h=u,w;h!==null;){w=h;var C=w.stateNode;if(w.tag===5&&C!==null&&(w=C,p!==null&&(C=Al(h,p),C!=null&&y.push(zl(h,C,w)))),_)break;h=h.return}0<y.length&&(m=new v(m,x,null,r,d),f.push({event:m,listeners:y}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",m&&r!==xp&&(x=r.relatedTarget||r.fromElement)&&(Fo(x)||x[xs]))break e;if((v||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,v?(x=r.relatedTarget||r.toElement,v=u,x=x?Fo(x):null,x!==null&&(_=ui(x),x!==_||x.tag!==5&&x.tag!==6)&&(x=null)):(v=null,x=u),v!==x)){if(y=cx,C="onMouseLeave",p="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(y=dx,C="onPointerLeave",p="onPointerEnter",h="pointer"),_=v==null?m:Mi(v),w=x==null?m:Mi(x),m=new y(C,h+"leave",v,r,d),m.target=_,m.relatedTarget=w,C=null,Fo(d)===u&&(y=new y(p,h+"enter",x,r,d),y.target=w,y.relatedTarget=_,C=y),_=C,v&&x)t:{for(y=v,p=x,h=0,w=y;w;w=_i(w))h++;for(w=0,C=p;C;C=_i(C))w++;for(;0<h-w;)y=_i(y),h--;for(;0<w-h;)p=_i(p),w--;for(;h--;){if(y===p||p!==null&&y===p.alternate)break t;y=_i(y),p=_i(p)}y=null}else y=null;v!==null&&bx(f,m,v,y,!1),x!==null&&_!==null&&bx(f,_,x,y,!0)}}e:{if(m=u?Mi(u):window,v=m.nodeName&&m.nodeName.toLowerCase(),v==="select"||v==="input"&&m.type==="file")var j=L2;else if(px(m))if(E_)j=$2;else{j=z2;var E=F2}else(v=m.nodeName)&&v.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(j=U2);if(j&&(j=j(e,u))){j_(f,j,r,d);break e}E&&E(e,m,u),e==="focusout"&&(E=m._wrapperState)&&E.controlled&&m.type==="number"&&pp(m,"number",m.value)}switch(E=u?Mi(u):window,e){case"focusin":(px(E)||E.contentEditable==="true")&&(Di=E,jp=u,wl=null);break;case"focusout":wl=jp=Di=null;break;case"mousedown":Ep=!0;break;case"contextmenu":case"mouseup":case"dragend":Ep=!1,xx(f,r,d);break;case"selectionchange":if(W2)break;case"keydown":case"keyup":xx(f,r,d)}var R;if(ng)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Ai?k_(e,r)&&(P="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(P="onCompositionStart");P&&(S_&&r.locale!=="ko"&&(Ai||P!=="onCompositionStart"?P==="onCompositionEnd"&&Ai&&(R=b_()):(eo=d,eg="value"in eo?eo.value:eo.textContent,Ai=!0)),E=sd(u,P),0<E.length&&(P=new ux(P,e,null,r,d),f.push({event:P,listeners:E}),R?P.data=R:(R=C_(r),R!==null&&(P.data=R)))),(R=A2?D2(e,r):O2(e,r))&&(u=sd(u,"onBeforeInput"),0<u.length&&(d=new ux("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:u}),d.data=R))}L_(f,t)})}function zl(e,t,r){return{instance:e,listener:t,currentTarget:r}}function sd(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Al(e,r),o!=null&&n.unshift(zl(e,o,s)),o=Al(e,t),o!=null&&n.push(zl(e,o,s))),e=e.return}return n}function _i(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function bx(e,t,r,n,s){for(var o=t._reactName,i=[];r!==null&&r!==n;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&u!==null&&(l=u,s?(c=Al(r,o),c!=null&&i.unshift(zl(r,c,l))):s||(c=Al(r,o),c!=null&&i.push(zl(r,c,l)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var G2=/\r\n?/g,Z2=/\u0000|\uFFFD/g;function Sx(e){return(typeof e=="string"?e:""+e).replace(G2,`
`).replace(Z2,"")}function iu(e,t,r){if(t=Sx(t),Sx(e)!==t&&r)throw Error(ie(425))}function od(){}var Np=null,Tp=null;function Rp(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 Pp=typeof setTimeout=="function"?setTimeout:void 0,q2=typeof clearTimeout=="function"?clearTimeout:void 0,kx=typeof Promise=="function"?Promise:void 0,X2=typeof queueMicrotask=="function"?queueMicrotask:typeof kx<"u"?function(e){return kx.resolve(null).then(e).catch(Q2)}:Pp;function Q2(e){setTimeout(function(){throw e})}function jh(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),Ml(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Ml(t)}function lo(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 Cx(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var ja=Math.random().toString(36).slice(2),In="__reactFiber$"+ja,Ul="__reactProps$"+ja,xs="__reactContainer$"+ja,Ap="__reactEvents$"+ja,J2="__reactListeners$"+ja,eR="__reactHandles$"+ja;function Fo(e){var t=e[In];if(t)return t;for(var r=e.parentNode;r;){if(t=r[xs]||r[In]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Cx(e);e!==null;){if(r=e[In])return r;e=Cx(e)}return t}e=r,r=e.parentNode}return null}function _c(e){return e=e[In]||e[xs],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Mi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ie(33))}function nf(e){return e[Ul]||null}var Dp=[],Ii=-1;function Eo(e){return{current:e}}function St(e){0>Ii||(e.current=Dp[Ii],Dp[Ii]=null,Ii--)}function wt(e,t){Ii++,Dp[Ii]=e.current,e.current=t}var vo={},ur=Eo(vo),Nr=Eo(!1),Xo=vo;function ua(e,t){var r=e.type.contextTypes;if(!r)return vo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Tr(e){return e=e.childContextTypes,e!=null}function id(){St(Nr),St(ur)}function jx(e,t,r){if(ur.current!==vo)throw Error(ie(168));wt(ur,t),wt(Nr,r)}function z_(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(ie(108,FT(e)||"Unknown",s));return Mt({},r,n)}function ad(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vo,Xo=ur.current,wt(ur,e),wt(Nr,Nr.current),!0}function Ex(e,t,r){var n=e.stateNode;if(!n)throw Error(ie(169));r?(e=z_(e,t,Xo),n.__reactInternalMemoizedMergedChildContext=e,St(Nr),St(ur),wt(ur,e)):St(Nr),wt(Nr,r)}var cs=null,sf=!1,Eh=!1;function U_(e){cs===null?cs=[e]:cs.push(e)}function tR(e){sf=!0,U_(e)}function No(){if(!Eh&&cs!==null){Eh=!0;var e=0,t=mt;try{var r=cs;for(mt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}cs=null,sf=!1}catch(s){throw cs!==null&&(cs=cs.slice(e+1)),d_(qm,No),s}finally{mt=t,Eh=!1}}return null}var Li=[],Fi=0,ld=null,cd=0,Qr=[],Jr=0,Qo=null,us=1,ds="";function Do(e,t){Li[Fi++]=cd,Li[Fi++]=ld,ld=e,cd=t}function $_(e,t,r){Qr[Jr++]=us,Qr[Jr++]=ds,Qr[Jr++]=Qo,Qo=e;var n=us;e=ds;var s=32-xn(n)-1;n&=~(1<<s),r+=1;var o=32-xn(t)+s;if(30<o){var i=s-s%5;o=(n&(1<<i)-1).toString(32),n>>=i,s-=i,us=1<<32-xn(t)+s|r<<s|n,ds=o+e}else us=1<<o|r<<s|n,ds=e}function og(e){e.return!==null&&(Do(e,1),$_(e,1,0))}function ig(e){for(;e===ld;)ld=Li[--Fi],Li[Fi]=null,cd=Li[--Fi],Li[Fi]=null;for(;e===Qo;)Qo=Qr[--Jr],Qr[Jr]=null,ds=Qr[--Jr],Qr[Jr]=null,us=Qr[--Jr],Qr[Jr]=null}var Ur=null,zr=null,Tt=!1,mn=null;function V_(e,t){var r=tn(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Nx(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ur=e,zr=lo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ur=e,zr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Qo!==null?{id:us,overflow:ds}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=tn(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Ur=e,zr=null,!0):!1;default:return!1}}function Op(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Mp(e){if(Tt){var t=zr;if(t){var r=t;if(!Nx(e,t)){if(Op(e))throw Error(ie(418));t=lo(r.nextSibling);var n=Ur;t&&Nx(e,t)?V_(n,r):(e.flags=e.flags&-4097|2,Tt=!1,Ur=e)}}else{if(Op(e))throw Error(ie(418));e.flags=e.flags&-4097|2,Tt=!1,Ur=e}}}function Tx(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ur=e}function au(e){if(e!==Ur)return!1;if(!Tt)return Tx(e),Tt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Rp(e.type,e.memoizedProps)),t&&(t=zr)){if(Op(e))throw B_(),Error(ie(418));for(;t;)V_(e,t),t=lo(t.nextSibling)}if(Tx(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ie(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){zr=lo(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}zr=null}}else zr=Ur?lo(e.stateNode.nextSibling):null;return!0}function B_(){for(var e=zr;e;)e=lo(e.nextSibling)}function da(){zr=Ur=null,Tt=!1}function ag(e){mn===null?mn=[e]:mn.push(e)}var rR=Ns.ReactCurrentBatchConfig;function Ya(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(ie(309));var n=r.stateNode}if(!n)throw Error(ie(147,e));var s=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var l=s.refs;i===null?delete l[o]:l[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(ie(284));if(!r._owner)throw Error(ie(290,e))}return e}function lu(e,t){throw e=Object.prototype.toString.call(t),Error(ie(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Rx(e){var t=e._init;return t(e._payload)}function W_(e){function t(p,h){if(e){var w=p.deletions;w===null?(p.deletions=[h],p.flags|=16):w.push(h)}}function r(p,h){if(!e)return null;for(;h!==null;)t(p,h),h=h.sibling;return null}function n(p,h){for(p=new Map;h!==null;)h.key!==null?p.set(h.key,h):p.set(h.index,h),h=h.sibling;return p}function s(p,h){return p=ho(p,h),p.index=0,p.sibling=null,p}function o(p,h,w){return p.index=w,e?(w=p.alternate,w!==null?(w=w.index,w<h?(p.flags|=2,h):w):(p.flags|=2,h)):(p.flags|=1048576,h)}function i(p){return e&&p.alternate===null&&(p.flags|=2),p}function l(p,h,w,C){return h===null||h.tag!==6?(h=Oh(w,p.mode,C),h.return=p,h):(h=s(h,w),h.return=p,h)}function c(p,h,w,C){var j=w.type;return j===Pi?d(p,h,w.props.children,C,w.key):h!==null&&(h.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Ks&&Rx(j)===h.type)?(C=s(h,w.props),C.ref=Ya(p,h,w),C.return=p,C):(C=Fu(w.type,w.key,w.props,null,p.mode,C),C.ref=Ya(p,h,w),C.return=p,C)}function u(p,h,w,C){return h===null||h.tag!==4||h.stateNode.containerInfo!==w.containerInfo||h.stateNode.implementation!==w.implementation?(h=Mh(w,p.mode,C),h.return=p,h):(h=s(h,w.children||[]),h.return=p,h)}function d(p,h,w,C,j){return h===null||h.tag!==7?(h=Go(w,p.mode,C,j),h.return=p,h):(h=s(h,w),h.return=p,h)}function f(p,h,w){if(typeof h=="string"&&h!==""||typeof h=="number")return h=Oh(""+h,p.mode,w),h.return=p,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Xc:return w=Fu(h.type,h.key,h.props,null,p.mode,w),w.ref=Ya(p,null,h),w.return=p,w;case Ri:return h=Mh(h,p.mode,w),h.return=p,h;case Ks:var C=h._init;return f(p,C(h._payload),w)}if(sl(h)||$a(h))return h=Go(h,p.mode,w,null),h.return=p,h;lu(p,h)}return null}function m(p,h,w,C){var j=h!==null?h.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return j!==null?null:l(p,h,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Xc:return w.key===j?c(p,h,w,C):null;case Ri:return w.key===j?u(p,h,w,C):null;case Ks:return j=w._init,m(p,h,j(w._payload),C)}if(sl(w)||$a(w))return j!==null?null:d(p,h,w,C,null);lu(p,w)}return null}function v(p,h,w,C,j){if(typeof C=="string"&&C!==""||typeof C=="number")return p=p.get(w)||null,l(h,p,""+C,j);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Xc:return p=p.get(C.key===null?w:C.key)||null,c(h,p,C,j);case Ri:return p=p.get(C.key===null?w:C.key)||null,u(h,p,C,j);case Ks:var E=C._init;return v(p,h,w,E(C._payload),j)}if(sl(C)||$a(C))return p=p.get(w)||null,d(h,p,C,j,null);lu(h,C)}return null}function x(p,h,w,C){for(var j=null,E=null,R=h,P=h=0,A=null;R!==null&&P<w.length;P++){R.index>P?(A=R,R=null):A=R.sibling;var L=m(p,R,w[P],C);if(L===null){R===null&&(R=A);break}e&&R&&L.alternate===null&&t(p,R),h=o(L,h,P),E===null?j=L:E.sibling=L,E=L,R=A}if(P===w.length)return r(p,R),Tt&&Do(p,P),j;if(R===null){for(;P<w.length;P++)R=f(p,w[P],C),R!==null&&(h=o(R,h,P),E===null?j=R:E.sibling=R,E=R);return Tt&&Do(p,P),j}for(R=n(p,R);P<w.length;P++)A=v(R,p,P,w[P],C),A!==null&&(e&&A.alternate!==null&&R.delete(A.key===null?P:A.key),h=o(A,h,P),E===null?j=A:E.sibling=A,E=A);return e&&R.forEach(function(q){return t(p,q)}),Tt&&Do(p,P),j}function y(p,h,w,C){var j=$a(w);if(typeof j!="function")throw Error(ie(150));if(w=j.call(w),w==null)throw Error(ie(151));for(var E=j=null,R=h,P=h=0,A=null,L=w.next();R!==null&&!L.done;P++,L=w.next()){R.index>P?(A=R,R=null):A=R.sibling;var q=m(p,R,L.value,C);if(q===null){R===null&&(R=A);break}e&&R&&q.alternate===null&&t(p,R),h=o(q,h,P),E===null?j=q:E.sibling=q,E=q,R=A}if(L.done)return r(p,R),Tt&&Do(p,P),j;if(R===null){for(;!L.done;P++,L=w.next())L=f(p,L.value,C),L!==null&&(h=o(L,h,P),E===null?j=L:E.sibling=L,E=L);return Tt&&Do(p,P),j}for(R=n(p,R);!L.done;P++,L=w.next())L=v(R,p,P,L.value,C),L!==null&&(e&&L.alternate!==null&&R.delete(L.key===null?P:L.key),h=o(L,h,P),E===null?j=L:E.sibling=L,E=L);return e&&R.forEach(function(N){return t(p,N)}),Tt&&Do(p,P),j}function _(p,h,w,C){if(typeof w=="object"&&w!==null&&w.type===Pi&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Xc:e:{for(var j=w.key,E=h;E!==null;){if(E.key===j){if(j=w.type,j===Pi){if(E.tag===7){r(p,E.sibling),h=s(E,w.props.children),h.return=p,p=h;break e}}else if(E.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Ks&&Rx(j)===E.type){r(p,E.sibling),h=s(E,w.props),h.ref=Ya(p,E,w),h.return=p,p=h;break e}r(p,E);break}else t(p,E);E=E.sibling}w.type===Pi?(h=Go(w.props.children,p.mode,C,w.key),h.return=p,p=h):(C=Fu(w.type,w.key,w.props,null,p.mode,C),C.ref=Ya(p,h,w),C.return=p,p=C)}return i(p);case Ri:e:{for(E=w.key;h!==null;){if(h.key===E)if(h.tag===4&&h.stateNode.containerInfo===w.containerInfo&&h.stateNode.implementation===w.implementation){r(p,h.sibling),h=s(h,w.children||[]),h.return=p,p=h;break e}else{r(p,h);break}else t(p,h);h=h.sibling}h=Mh(w,p.mode,C),h.return=p,p=h}return i(p);case Ks:return E=w._init,_(p,h,E(w._payload),C)}if(sl(w))return x(p,h,w,C);if($a(w))return y(p,h,w,C);lu(p,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,h!==null&&h.tag===6?(r(p,h.sibling),h=s(h,w),h.return=p,p=h):(r(p,h),h=Oh(w,p.mode,C),h.return=p,p=h),i(p)):r(p,h)}return _}var fa=W_(!0),H_=W_(!1),ud=Eo(null),dd=null,zi=null,lg=null;function cg(){lg=zi=dd=null}function ug(e){var t=ud.current;St(ud),e._currentValue=t}function Ip(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Xi(e,t){dd=e,lg=zi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Er=!0),e.firstContext=null)}function sn(e){var t=e._currentValue;if(lg!==e)if(e={context:e,memoizedValue:t,next:null},zi===null){if(dd===null)throw Error(ie(308));zi=e,dd.dependencies={lanes:0,firstContext:e}}else zi=zi.next=e;return t}var zo=null;function dg(e){zo===null?zo=[e]:zo.push(e)}function Y_(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,dg(t)):(r.next=s.next,s.next=r),t.interleaved=r,ws(e,n)}function ws(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Gs=!1;function fg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function K_(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 ps(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function co(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,lt&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,ws(e,r)}return s=n.interleaved,s===null?(t.next=t,dg(n)):(t.next=s.next,s.next=t),n.interleaved=t,ws(e,r)}function Au(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xm(e,r)}}function Px(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=i:o=o.next=i,r=r.next}while(r!==null);o===null?s=o=t:o=o.next=t}else s=o=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function fd(e,t,r,n){var s=e.updateQueue;Gs=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,i===null?o=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==i&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=s.baseState;i=0,d=u=c=null,l=o;do{var m=l.lane,v=l.eventTime;if((n&m)===m){d!==null&&(d=d.next={eventTime:v,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,y=l;switch(m=t,v=r,y.tag){case 1:if(x=y.payload,typeof x=="function"){f=x.call(v,f,m);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=y.payload,m=typeof x=="function"?x.call(v,f,m):x,m==null)break e;f=Mt({},f,m);break e;case 2:Gs=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,m=s.effects,m===null?s.effects=[l]:m.push(l))}else v={eventTime:v,lane:m,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=v,c=f):d=d.next=v,i|=m;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;m=l,l=m.next,m.next=null,s.lastBaseUpdate=m,s.shared.pending=null}}while(!0);if(d===null&&(c=f),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);ei|=i,e.lanes=i,e.memoizedState=f}}function Ax(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(ie(191,s));s.call(n)}}}var bc={},Bn=Eo(bc),$l=Eo(bc),Vl=Eo(bc);function Uo(e){if(e===bc)throw Error(ie(174));return e}function hg(e,t){switch(wt(Vl,t),wt($l,e),wt(Bn,bc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gp(t,e)}St(Bn),wt(Bn,t)}function ha(){St(Bn),St($l),St(Vl)}function G_(e){Uo(Vl.current);var t=Uo(Bn.current),r=gp(t,e.type);t!==r&&(wt($l,e),wt(Bn,r))}function pg(e){$l.current===e&&(St(Bn),St($l))}var At=Eo(0);function hd(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 Nh=[];function mg(){for(var e=0;e<Nh.length;e++)Nh[e]._workInProgressVersionPrimary=null;Nh.length=0}var Du=Ns.ReactCurrentDispatcher,Th=Ns.ReactCurrentBatchConfig,Jo=0,Ot=null,Kt=null,Xt=null,pd=!1,_l=!1,Bl=0,nR=0;function ir(){throw Error(ie(321))}function gg(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!bn(e[r],t[r]))return!1;return!0}function vg(e,t,r,n,s,o){if(Jo=o,Ot=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Du.current=e===null||e.memoizedState===null?aR:lR,e=r(n,s),_l){o=0;do{if(_l=!1,Bl=0,25<=o)throw Error(ie(301));o+=1,Xt=Kt=null,t.updateQueue=null,Du.current=cR,e=r(n,s)}while(_l)}if(Du.current=md,t=Kt!==null&&Kt.next!==null,Jo=0,Xt=Kt=Ot=null,pd=!1,t)throw Error(ie(300));return e}function yg(){var e=Bl!==0;return Bl=0,e}function Mn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xt===null?Ot.memoizedState=Xt=e:Xt=Xt.next=e,Xt}function on(){if(Kt===null){var e=Ot.alternate;e=e!==null?e.memoizedState:null}else e=Kt.next;var t=Xt===null?Ot.memoizedState:Xt.next;if(t!==null)Xt=t,Kt=e;else{if(e===null)throw Error(ie(310));Kt=e,e={memoizedState:Kt.memoizedState,baseState:Kt.baseState,baseQueue:Kt.baseQueue,queue:Kt.queue,next:null},Xt===null?Ot.memoizedState=Xt=e:Xt=Xt.next=e}return Xt}function Wl(e,t){return typeof t=="function"?t(e):t}function Rh(e){var t=on(),r=t.queue;if(r===null)throw Error(ie(311));r.lastRenderedReducer=e;var n=Kt,s=n.baseQueue,o=r.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}n.baseQueue=s=o,r.pending=null}if(s!==null){o=s.next,n=n.baseState;var l=i=null,c=null,u=o;do{var d=u.lane;if((Jo&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,i=n):c=c.next=f,Ot.lanes|=d,ei|=d}u=u.next}while(u!==null&&u!==o);c===null?i=n:c.next=l,bn(n,t.memoizedState)||(Er=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do o=s.lane,Ot.lanes|=o,ei|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Ph(e){var t=on(),r=t.queue;if(r===null)throw Error(ie(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,o=t.memoizedState;if(s!==null){r.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);bn(o,t.memoizedState)||(Er=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function Z_(){}function q_(e,t){var r=Ot,n=on(),s=t(),o=!bn(n.memoizedState,s);if(o&&(n.memoizedState=s,Er=!0),n=n.queue,xg(J_.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||Xt!==null&&Xt.memoizedState.tag&1){if(r.flags|=2048,Hl(9,Q_.bind(null,r,n,s,t),void 0,null),Qt===null)throw Error(ie(349));Jo&30||X_(r,t,s)}return s}function X_(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ot.updateQueue,t===null?(t={lastEffect:null,stores:null},Ot.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Q_(e,t,r,n){t.value=r,t.getSnapshot=n,e1(t)&&t1(e)}function J_(e,t,r){return r(function(){e1(t)&&t1(e)})}function e1(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!bn(e,r)}catch{return!0}}function t1(e){var t=ws(e,1);t!==null&&wn(t,e,1,-1)}function Dx(e){var t=Mn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Wl,lastRenderedState:e},t.queue=e,e=e.dispatch=iR.bind(null,Ot,e),[t.memoizedState,e]}function Hl(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Ot.updateQueue,t===null?(t={lastEffect:null,stores:null},Ot.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function r1(){return on().memoizedState}function Ou(e,t,r,n){var s=Mn();Ot.flags|=e,s.memoizedState=Hl(1|t,r,void 0,n===void 0?null:n)}function of(e,t,r,n){var s=on();n=n===void 0?null:n;var o=void 0;if(Kt!==null){var i=Kt.memoizedState;if(o=i.destroy,n!==null&&gg(n,i.deps)){s.memoizedState=Hl(t,r,o,n);return}}Ot.flags|=e,s.memoizedState=Hl(1|t,r,o,n)}function Ox(e,t){return Ou(8390656,8,e,t)}function xg(e,t){return of(2048,8,e,t)}function n1(e,t){return of(4,2,e,t)}function s1(e,t){return of(4,4,e,t)}function o1(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 i1(e,t,r){return r=r!=null?r.concat([e]):null,of(4,4,o1.bind(null,t,e),r)}function wg(){}function a1(e,t){var r=on();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&gg(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function l1(e,t){var r=on();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&gg(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function c1(e,t,r){return Jo&21?(bn(r,t)||(r=p_(),Ot.lanes|=r,ei|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Er=!0),e.memoizedState=r)}function sR(e,t){var r=mt;mt=r!==0&&4>r?r:4,e(!0);var n=Th.transition;Th.transition={};try{e(!1),t()}finally{mt=r,Th.transition=n}}function u1(){return on().memoizedState}function oR(e,t,r){var n=fo(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},d1(e))f1(t,r);else if(r=Y_(e,t,r,n),r!==null){var s=xr();wn(r,e,n,s),h1(r,t,n)}}function iR(e,t,r){var n=fo(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(d1(e))f1(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,l=o(i,r);if(s.hasEagerState=!0,s.eagerState=l,bn(l,i)){var c=t.interleaved;c===null?(s.next=s,dg(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}r=Y_(e,t,s,n),r!==null&&(s=xr(),wn(r,e,n,s),h1(r,t,n))}}function d1(e){var t=e.alternate;return e===Ot||t!==null&&t===Ot}function f1(e,t){_l=pd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function h1(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xm(e,r)}}var md={readContext:sn,useCallback:ir,useContext:ir,useEffect:ir,useImperativeHandle:ir,useInsertionEffect:ir,useLayoutEffect:ir,useMemo:ir,useReducer:ir,useRef:ir,useState:ir,useDebugValue:ir,useDeferredValue:ir,useTransition:ir,useMutableSource:ir,useSyncExternalStore:ir,useId:ir,unstable_isNewReconciler:!1},aR={readContext:sn,useCallback:function(e,t){return Mn().memoizedState=[e,t===void 0?null:t],e},useContext:sn,useEffect:Ox,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ou(4194308,4,o1.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ou(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ou(4,2,e,t)},useMemo:function(e,t){var r=Mn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Mn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=oR.bind(null,Ot,e),[n.memoizedState,e]},useRef:function(e){var t=Mn();return e={current:e},t.memoizedState=e},useState:Dx,useDebugValue:wg,useDeferredValue:function(e){return Mn().memoizedState=e},useTransition:function(){var e=Dx(!1),t=e[0];return e=sR.bind(null,e[1]),Mn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ot,s=Mn();if(Tt){if(r===void 0)throw Error(ie(407));r=r()}else{if(r=t(),Qt===null)throw Error(ie(349));Jo&30||X_(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,Ox(J_.bind(null,n,o,e),[e]),n.flags|=2048,Hl(9,Q_.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=Mn(),t=Qt.identifierPrefix;if(Tt){var r=ds,n=us;r=(n&~(1<<32-xn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Bl++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=nR++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},lR={readContext:sn,useCallback:a1,useContext:sn,useEffect:xg,useImperativeHandle:i1,useInsertionEffect:n1,useLayoutEffect:s1,useMemo:l1,useReducer:Rh,useRef:r1,useState:function(){return Rh(Wl)},useDebugValue:wg,useDeferredValue:function(e){var t=on();return c1(t,Kt.memoizedState,e)},useTransition:function(){var e=Rh(Wl)[0],t=on().memoizedState;return[e,t]},useMutableSource:Z_,useSyncExternalStore:q_,useId:u1,unstable_isNewReconciler:!1},cR={readContext:sn,useCallback:a1,useContext:sn,useEffect:xg,useImperativeHandle:i1,useInsertionEffect:n1,useLayoutEffect:s1,useMemo:l1,useReducer:Ph,useRef:r1,useState:function(){return Ph(Wl)},useDebugValue:wg,useDeferredValue:function(e){var t=on();return Kt===null?t.memoizedState=e:c1(t,Kt.memoizedState,e)},useTransition:function(){var e=Ph(Wl)[0],t=on().memoizedState;return[e,t]},useMutableSource:Z_,useSyncExternalStore:q_,useId:u1,unstable_isNewReconciler:!1};function dn(e,t){if(e&&e.defaultProps){t=Mt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Lp(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Mt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var af={isMounted:function(e){return(e=e._reactInternals)?ui(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=xr(),s=fo(e),o=ps(n,s);o.payload=t,r!=null&&(o.callback=r),t=co(e,o,s),t!==null&&(wn(t,e,s,n),Au(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=xr(),s=fo(e),o=ps(n,s);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=co(e,o,s),t!==null&&(wn(t,e,s,n),Au(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=xr(),n=fo(e),s=ps(r,n);s.tag=2,t!=null&&(s.callback=t),t=co(e,s,n),t!==null&&(wn(t,e,n,r),Au(t,e,n))}};function Mx(e,t,r,n,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,i):t.prototype&&t.prototype.isPureReactComponent?!Ll(r,n)||!Ll(s,o):!0}function p1(e,t,r){var n=!1,s=vo,o=t.contextType;return typeof o=="object"&&o!==null?o=sn(o):(s=Tr(t)?Xo:ur.current,n=t.contextTypes,o=(n=n!=null)?ua(e,s):vo),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=af,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Ix(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&af.enqueueReplaceState(t,t.state,null)}function Fp(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},fg(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=sn(o):(o=Tr(t)?Xo:ur.current,s.context=ua(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Lp(e,t,o,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&af.enqueueReplaceState(s,s.state,null),fd(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function pa(e,t){try{var r="",n=t;do r+=LT(n),n=n.return;while(n);var s=r}catch(o){s=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Ah(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function zp(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var uR=typeof WeakMap=="function"?WeakMap:Map;function m1(e,t,r){r=ps(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){vd||(vd=!0,Zp=n),zp(e,t)},r}function g1(e,t,r){r=ps(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){zp(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){zp(e,t),typeof n!="function"&&(uo===null?uo=new Set([this]):uo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function Lx(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new uR;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=kR.bind(null,e,t,r),t.then(e,e))}function Fx(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 zx(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=ps(-1,1),t.tag=2,co(r,t,1))),r.lanes|=1),e)}var dR=Ns.ReactCurrentOwner,Er=!1;function vr(e,t,r,n){t.child=e===null?H_(t,null,r,n):fa(t,e.child,r,n)}function Ux(e,t,r,n,s){r=r.render;var o=t.ref;return Xi(t,s),n=vg(e,t,r,n,o,s),r=yg(),e!==null&&!Er?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,_s(e,t,s)):(Tt&&r&&og(t),t.flags|=1,vr(e,t,n,s),t.child)}function $x(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!Ng(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,v1(e,t,o,n,s)):(e=Fu(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(r=r.compare,r=r!==null?r:Ll,r(i,n)&&e.ref===t.ref)return _s(e,t,s)}return t.flags|=1,e=ho(o,n),e.ref=t.ref,e.return=t,t.child=e}function v1(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(Ll(o,n)&&e.ref===t.ref)if(Er=!1,t.pendingProps=n=o,(e.lanes&s)!==0)e.flags&131072&&(Er=!0);else return t.lanes=e.lanes,_s(e,t,s)}return Up(e,t,r,n,s)}function y1(e,t,r){var n=t.pendingProps,s=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},wt($i,Ir),Ir|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,wt($i,Ir),Ir|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,wt($i,Ir),Ir|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,wt($i,Ir),Ir|=n;return vr(e,t,s,r),t.child}function x1(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Up(e,t,r,n,s){var o=Tr(r)?Xo:ur.current;return o=ua(t,o),Xi(t,s),r=vg(e,t,r,n,o,s),n=yg(),e!==null&&!Er?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,_s(e,t,s)):(Tt&&n&&og(t),t.flags|=1,vr(e,t,r,s),t.child)}function Vx(e,t,r,n,s){if(Tr(r)){var o=!0;ad(t)}else o=!1;if(Xi(t,s),t.stateNode===null)Mu(e,t),p1(t,r,n),Fp(t,r,n,s),n=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=sn(u):(u=Tr(r)?Xo:ur.current,u=ua(t,u));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==n||c!==u)&&Ix(t,i,n,u),Gs=!1;var m=t.memoizedState;i.state=m,fd(t,n,i,s),c=t.memoizedState,l!==n||m!==c||Nr.current||Gs?(typeof d=="function"&&(Lp(t,r,d,n),c=t.memoizedState),(l=Gs||Mx(t,r,l,n,m,c,u))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),i.props=n,i.state=c,i.context=u,n=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,K_(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:dn(t.type,l),i.props=u,f=t.pendingProps,m=i.context,c=r.contextType,typeof c=="object"&&c!==null?c=sn(c):(c=Tr(r)?Xo:ur.current,c=ua(t,c));var v=r.getDerivedStateFromProps;(d=typeof v=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==f||m!==c)&&Ix(t,i,n,c),Gs=!1,m=t.memoizedState,i.state=m,fd(t,n,i,s);var x=t.memoizedState;l!==f||m!==x||Nr.current||Gs?(typeof v=="function"&&(Lp(t,r,v,n),x=t.memoizedState),(u=Gs||Mx(t,r,u,n,m,x,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,x,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,x,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=x),i.props=n,i.state=x,i.context=c,n=u):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),n=!1)}return $p(e,t,r,n,o,s)}function $p(e,t,r,n,s,o){x1(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return s&&Ex(t,r,!1),_s(e,t,o);n=t.stateNode,dR.current=t;var l=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=fa(t,e.child,null,o),t.child=fa(t,null,l,o)):vr(e,t,l,o),t.memoizedState=n.state,s&&Ex(t,r,!0),t.child}function w1(e){var t=e.stateNode;t.pendingContext?jx(e,t.pendingContext,t.pendingContext!==t.context):t.context&&jx(e,t.context,!1),hg(e,t.containerInfo)}function Bx(e,t,r,n,s){return da(),ag(s),t.flags|=256,vr(e,t,r,n),t.child}var Vp={dehydrated:null,treeContext:null,retryLane:0};function Bp(e){return{baseLanes:e,cachePool:null,transitions:null}}function _1(e,t,r){var n=t.pendingProps,s=At.current,o=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),wt(At,s&1),e===null)return Mp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=n.children,e=n.fallback,o?(n=t.mode,o=t.child,i={mode:"hidden",children:i},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=uf(i,n,0,null),e=Go(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Bp(r),t.memoizedState=Vp,e):_g(t,i));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return fR(e,t,i,n,l,s,r);if(o){o=n.fallback,i=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:n.children};return!(i&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=ho(s,c),n.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=ho(l,o):(o=Go(o,i,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,i=e.child.memoizedState,i=i===null?Bp(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~r,t.memoizedState=Vp,n}return o=e.child,e=o.sibling,n=ho(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function _g(e,t){return t=uf({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function cu(e,t,r,n){return n!==null&&ag(n),fa(t,e.child,null,r),e=_g(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fR(e,t,r,n,s,o,i){if(r)return t.flags&256?(t.flags&=-257,n=Ah(Error(ie(422))),cu(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=uf({mode:"visible",children:n.children},s,0,null),o=Go(o,s,i,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&fa(t,e.child,null,i),t.child.memoizedState=Bp(i),t.memoizedState=Vp,o);if(!(t.mode&1))return cu(e,t,i,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var l=n.dgst;return n=l,o=Error(ie(419)),n=Ah(o,n,void 0),cu(e,t,i,n)}if(l=(i&e.childLanes)!==0,Er||l){if(n=Qt,n!==null){switch(i&-i){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,ws(e,s),wn(n,e,s,-1))}return Eg(),n=Ah(Error(ie(421))),cu(e,t,i,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=CR.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,zr=lo(s.nextSibling),Ur=t,Tt=!0,mn=null,e!==null&&(Qr[Jr++]=us,Qr[Jr++]=ds,Qr[Jr++]=Qo,us=e.id,ds=e.overflow,Qo=t),t=_g(t,n.children),t.flags|=4096,t)}function Wx(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Ip(e.return,t,r)}function Dh(e,t,r,n,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=s)}function b1(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if(vr(e,t,n.children,r),n=At.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wx(e,r,t);else if(e.tag===19)Wx(e,r,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}n&=1}if(wt(At,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&hd(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),Dh(t,!1,s,r,o);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&hd(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}Dh(t,!0,r,null,o);break;case"together":Dh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Mu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function _s(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),ei|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ie(153));if(t.child!==null){for(e=t.child,r=ho(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=ho(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function hR(e,t,r){switch(t.tag){case 3:w1(t),da();break;case 5:G_(t);break;case 1:Tr(t.type)&&ad(t);break;case 4:hg(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;wt(ud,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(wt(At,At.current&1),t.flags|=128,null):r&t.child.childLanes?_1(e,t,r):(wt(At,At.current&1),e=_s(e,t,r),e!==null?e.sibling:null);wt(At,At.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return b1(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),wt(At,At.current),n)break;return null;case 22:case 23:return t.lanes=0,y1(e,t,r)}return _s(e,t,r)}var S1,Wp,k1,C1;S1=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Wp=function(){};k1=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Uo(Bn.current);var o=null;switch(r){case"input":s=fp(e,s),n=fp(e,n),o=[];break;case"select":s=Mt({},s,{value:void 0}),n=Mt({},n,{value:void 0}),o=[];break;case"textarea":s=mp(e,s),n=mp(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=od)}vp(r,n);var i;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(i in l)l.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Rl.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in n){var c=n[u];if(l=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(r||(r={}),r[i]=c[i])}else r||(o||(o=[]),o.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Rl.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&bt("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}r&&(o=o||[]).push("style",r);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};C1=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ka(e,t){if(!Tt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ar(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function pR(e,t,r){var n=t.pendingProps;switch(ig(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ar(t),null;case 1:return Tr(t.type)&&id(),ar(t),null;case 3:return n=t.stateNode,ha(),St(Nr),St(ur),mg(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(au(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,mn!==null&&(Qp(mn),mn=null))),Wp(e,t),ar(t),null;case 5:pg(t);var s=Uo(Vl.current);if(r=t.type,e!==null&&t.stateNode!=null)k1(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(ie(166));return ar(t),null}if(e=Uo(Bn.current),au(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[In]=t,n[Ul]=o,e=(t.mode&1)!==0,r){case"dialog":bt("cancel",n),bt("close",n);break;case"iframe":case"object":case"embed":bt("load",n);break;case"video":case"audio":for(s=0;s<il.length;s++)bt(il[s],n);break;case"source":bt("error",n);break;case"img":case"image":case"link":bt("error",n),bt("load",n);break;case"details":bt("toggle",n);break;case"input":Jy(n,o),bt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},bt("invalid",n);break;case"textarea":tx(n,o),bt("invalid",n)}vp(r,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var l=o[i];i==="children"?typeof l=="string"?n.textContent!==l&&(o.suppressHydrationWarning!==!0&&iu(n.textContent,l,e),s=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&iu(n.textContent,l,e),s=["children",""+l]):Rl.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&bt("scroll",n)}switch(r){case"input":Qc(n),ex(n,o,!0);break;case"textarea":Qc(n),rx(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=od)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Jw(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[In]=t,e[Ul]=n,S1(e,t,!1,!1),t.stateNode=e;e:{switch(i=yp(r,n),r){case"dialog":bt("cancel",e),bt("close",e),s=n;break;case"iframe":case"object":case"embed":bt("load",e),s=n;break;case"video":case"audio":for(s=0;s<il.length;s++)bt(il[s],e);s=n;break;case"source":bt("error",e),s=n;break;case"img":case"image":case"link":bt("error",e),bt("load",e),s=n;break;case"details":bt("toggle",e),s=n;break;case"input":Jy(e,n),s=fp(e,n),bt("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=Mt({},n,{value:void 0}),bt("invalid",e);break;case"textarea":tx(e,n),s=mp(e,n),bt("invalid",e);break;default:s=n}vp(r,s),l=s;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?r_(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&e_(e,c)):o==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&Pl(e,c):typeof c=="number"&&Pl(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Rl.hasOwnProperty(o)?c!=null&&o==="onScroll"&&bt("scroll",e):c!=null&&Hm(e,o,c,i))}switch(r){case"input":Qc(e),ex(e,n,!1);break;case"textarea":Qc(e),rx(e);break;case"option":n.value!=null&&e.setAttribute("value",""+go(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?Ki(e,!!n.multiple,o,!1):n.defaultValue!=null&&Ki(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=od)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ar(t),null;case 6:if(e&&t.stateNode!=null)C1(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(ie(166));if(r=Uo(Vl.current),Uo(Bn.current),au(t)){if(n=t.stateNode,r=t.memoizedProps,n[In]=t,(o=n.nodeValue!==r)&&(e=Ur,e!==null))switch(e.tag){case 3:iu(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&iu(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[In]=t,t.stateNode=n}return ar(t),null;case 13:if(St(At),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Tt&&zr!==null&&t.mode&1&&!(t.flags&128))B_(),da(),t.flags|=98560,o=!1;else if(o=au(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(ie(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(ie(317));o[In]=t}else da(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ar(t),o=!1}else mn!==null&&(Qp(mn),mn=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||At.current&1?Gt===0&&(Gt=3):Eg())),t.updateQueue!==null&&(t.flags|=4),ar(t),null);case 4:return ha(),Wp(e,t),e===null&&Fl(t.stateNode.containerInfo),ar(t),null;case 10:return ug(t.type._context),ar(t),null;case 17:return Tr(t.type)&&id(),ar(t),null;case 19:if(St(At),o=t.memoizedState,o===null)return ar(t),null;if(n=(t.flags&128)!==0,i=o.rendering,i===null)if(n)Ka(o,!1);else{if(Gt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=hd(e),i!==null){for(t.flags|=128,Ka(o,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return wt(At,At.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ut()>ma&&(t.flags|=128,n=!0,Ka(o,!1),t.lanes=4194304)}else{if(!n)if(e=hd(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ka(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Tt)return ar(t),null}else 2*Ut()-o.renderingStartTime>ma&&r!==1073741824&&(t.flags|=128,n=!0,Ka(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(r=o.last,r!==null?r.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ut(),t.sibling=null,r=At.current,wt(At,n?r&1|2:r&1),t):(ar(t),null);case 22:case 23:return jg(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Ir&1073741824&&(ar(t),t.subtreeFlags&6&&(t.flags|=8192)):ar(t),null;case 24:return null;case 25:return null}throw Error(ie(156,t.tag))}function mR(e,t){switch(ig(t),t.tag){case 1:return Tr(t.type)&&id(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ha(),St(Nr),St(ur),mg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return pg(t),null;case 13:if(St(At),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ie(340));da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return St(At),null;case 4:return ha(),null;case 10:return ug(t.type._context),null;case 22:case 23:return jg(),null;case 24:return null;default:return null}}var uu=!1,lr=!1,gR=typeof WeakSet=="function"?WeakSet:Set,Ee=null;function Ui(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Lt(e,t,n)}else r.current=null}function Hp(e,t,r){try{r()}catch(n){Lt(e,t,n)}}var Hx=!1;function vR(e,t){if(Np=rd,e=R_(),sg(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,l=-1,c=-1,u=0,d=0,f=e,m=null;t:for(;;){for(var v;f!==r||s!==0&&f.nodeType!==3||(l=i+s),f!==o||n!==0&&f.nodeType!==3||(c=i+n),f.nodeType===3&&(i+=f.nodeValue.length),(v=f.firstChild)!==null;)m=f,f=v;for(;;){if(f===e)break t;if(m===r&&++u===s&&(l=i),m===o&&++d===n&&(c=i),(v=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=v}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Tp={focusedElem:e,selectionRange:r},rd=!1,Ee=t;Ee!==null;)if(t=Ee,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ee=e;else for(;Ee!==null;){t=Ee;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var y=x.memoizedProps,_=x.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?y:dn(t.type,y),_);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ie(163))}}catch(C){Lt(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,Ee=e;break}Ee=t.return}return x=Hx,Hx=!1,x}function bl(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&Hp(t,r,o)}s=s.next}while(s!==n)}}function lf(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Yp(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function j1(e){var t=e.alternate;t!==null&&(e.alternate=null,j1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[In],delete t[Ul],delete t[Ap],delete t[J2],delete t[eR])),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 E1(e){return e.tag===5||e.tag===3||e.tag===4}function Yx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||E1(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 Kp(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=od));else if(n!==4&&(e=e.child,e!==null))for(Kp(e,t,r),e=e.sibling;e!==null;)Kp(e,t,r),e=e.sibling}function Gp(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Gp(e,t,r),e=e.sibling;e!==null;)Gp(e,t,r),e=e.sibling}var tr=null,fn=!1;function Vs(e,t,r){for(r=r.child;r!==null;)N1(e,t,r),r=r.sibling}function N1(e,t,r){if(Vn&&typeof Vn.onCommitFiberUnmount=="function")try{Vn.onCommitFiberUnmount(Jd,r)}catch{}switch(r.tag){case 5:lr||Ui(r,t);case 6:var n=tr,s=fn;tr=null,Vs(e,t,r),tr=n,fn=s,tr!==null&&(fn?(e=tr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):tr.removeChild(r.stateNode));break;case 18:tr!==null&&(fn?(e=tr,r=r.stateNode,e.nodeType===8?jh(e.parentNode,r):e.nodeType===1&&jh(e,r),Ml(e)):jh(tr,r.stateNode));break;case 4:n=tr,s=fn,tr=r.stateNode.containerInfo,fn=!0,Vs(e,t,r),tr=n,fn=s;break;case 0:case 11:case 14:case 15:if(!lr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Hp(r,t,i),s=s.next}while(s!==n)}Vs(e,t,r);break;case 1:if(!lr&&(Ui(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){Lt(r,t,l)}Vs(e,t,r);break;case 21:Vs(e,t,r);break;case 22:r.mode&1?(lr=(n=lr)||r.memoizedState!==null,Vs(e,t,r),lr=n):Vs(e,t,r);break;default:Vs(e,t,r)}}function Kx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new gR),t.forEach(function(n){var s=jR.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function un(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var o=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:tr=l.stateNode,fn=!1;break e;case 3:tr=l.stateNode.containerInfo,fn=!0;break e;case 4:tr=l.stateNode.containerInfo,fn=!0;break e}l=l.return}if(tr===null)throw Error(ie(160));N1(o,i,s),tr=null,fn=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){Lt(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)T1(t,e),t=t.sibling}function T1(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(un(t,e),On(e),n&4){try{bl(3,e,e.return),lf(3,e)}catch(y){Lt(e,e.return,y)}try{bl(5,e,e.return)}catch(y){Lt(e,e.return,y)}}break;case 1:un(t,e),On(e),n&512&&r!==null&&Ui(r,r.return);break;case 5:if(un(t,e),On(e),n&512&&r!==null&&Ui(r,r.return),e.flags&32){var s=e.stateNode;try{Pl(s,"")}catch(y){Lt(e,e.return,y)}}if(n&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=r!==null?r.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&Xw(s,o),yp(l,i);var u=yp(l,o);for(i=0;i<c.length;i+=2){var d=c[i],f=c[i+1];d==="style"?r_(s,f):d==="dangerouslySetInnerHTML"?e_(s,f):d==="children"?Pl(s,f):Hm(s,d,f,u)}switch(l){case"input":hp(s,o);break;case"textarea":Qw(s,o);break;case"select":var m=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var v=o.value;v!=null?Ki(s,!!o.multiple,v,!1):m!==!!o.multiple&&(o.defaultValue!=null?Ki(s,!!o.multiple,o.defaultValue,!0):Ki(s,!!o.multiple,o.multiple?[]:"",!1))}s[Ul]=o}catch(y){Lt(e,e.return,y)}}break;case 6:if(un(t,e),On(e),n&4){if(e.stateNode===null)throw Error(ie(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(y){Lt(e,e.return,y)}}break;case 3:if(un(t,e),On(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ml(t.containerInfo)}catch(y){Lt(e,e.return,y)}break;case 4:un(t,e),On(e);break;case 13:un(t,e),On(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(kg=Ut())),n&4&&Kx(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(lr=(u=lr)||d,un(t,e),lr=u):un(t,e),On(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Ee=e,d=e.child;d!==null;){for(f=Ee=d;Ee!==null;){switch(m=Ee,v=m.child,m.tag){case 0:case 11:case 14:case 15:bl(4,m,m.return);break;case 1:Ui(m,m.return);var x=m.stateNode;if(typeof x.componentWillUnmount=="function"){n=m,r=m.return;try{t=n,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(y){Lt(n,r,y)}}break;case 5:Ui(m,m.return);break;case 22:if(m.memoizedState!==null){Zx(f);continue}}v!==null?(v.return=m,Ee=v):Zx(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=f.stateNode,c=f.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=t_("display",i))}catch(y){Lt(e,e.return,y)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(y){Lt(e,e.return,y)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:un(t,e),On(e),n&4&&Kx(e);break;case 21:break;default:un(t,e),On(e)}}function On(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(E1(r)){var n=r;break e}r=r.return}throw Error(ie(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(Pl(s,""),n.flags&=-33);var o=Yx(e);Gp(e,o,s);break;case 3:case 4:var i=n.stateNode.containerInfo,l=Yx(e);Kp(e,l,i);break;default:throw Error(ie(161))}}catch(c){Lt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yR(e,t,r){Ee=e,R1(e)}function R1(e,t,r){for(var n=(e.mode&1)!==0;Ee!==null;){var s=Ee,o=s.child;if(s.tag===22&&n){var i=s.memoizedState!==null||uu;if(!i){var l=s.alternate,c=l!==null&&l.memoizedState!==null||lr;l=uu;var u=lr;if(uu=i,(lr=c)&&!u)for(Ee=s;Ee!==null;)i=Ee,c=i.child,i.tag===22&&i.memoizedState!==null?qx(s):c!==null?(c.return=i,Ee=c):qx(s);for(;o!==null;)Ee=o,R1(o),o=o.sibling;Ee=s,uu=l,lr=u}Gx(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,Ee=o):Gx(e)}}function Gx(e){for(;Ee!==null;){var t=Ee;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:lr||lf(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!lr)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:dn(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Ax(t,o,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Ax(t,i,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Ml(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ie(163))}lr||t.flags&512&&Yp(t)}catch(m){Lt(t,t.return,m)}}if(t===e){Ee=null;break}if(r=t.sibling,r!==null){r.return=t.return,Ee=r;break}Ee=t.return}}function Zx(e){for(;Ee!==null;){var t=Ee;if(t===e){Ee=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Ee=r;break}Ee=t.return}}function qx(e){for(;Ee!==null;){var t=Ee;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{lf(4,t)}catch(c){Lt(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(c){Lt(t,s,c)}}var o=t.return;try{Yp(t)}catch(c){Lt(t,o,c)}break;case 5:var i=t.return;try{Yp(t)}catch(c){Lt(t,i,c)}}}catch(c){Lt(t,t.return,c)}if(t===e){Ee=null;break}var l=t.sibling;if(l!==null){l.return=t.return,Ee=l;break}Ee=t.return}}var xR=Math.ceil,gd=Ns.ReactCurrentDispatcher,bg=Ns.ReactCurrentOwner,rn=Ns.ReactCurrentBatchConfig,lt=0,Qt=null,Wt=null,rr=0,Ir=0,$i=Eo(0),Gt=0,Yl=null,ei=0,cf=0,Sg=0,Sl=null,jr=null,kg=0,ma=1/0,is=null,vd=!1,Zp=null,uo=null,du=!1,to=null,yd=0,kl=0,qp=null,Iu=-1,Lu=0;function xr(){return lt&6?Ut():Iu!==-1?Iu:Iu=Ut()}function fo(e){return e.mode&1?lt&2&&rr!==0?rr&-rr:rR.transition!==null?(Lu===0&&(Lu=p_()),Lu):(e=mt,e!==0||(e=window.event,e=e===void 0?16:__(e.type)),e):1}function wn(e,t,r,n){if(50<kl)throw kl=0,qp=null,Error(ie(185));xc(e,r,n),(!(lt&2)||e!==Qt)&&(e===Qt&&(!(lt&2)&&(cf|=r),Gt===4&&qs(e,rr)),Rr(e,n),r===1&&lt===0&&!(t.mode&1)&&(ma=Ut()+500,sf&&No()))}function Rr(e,t){var r=e.callbackNode;r2(e,t);var n=td(e,e===Qt?rr:0);if(n===0)r!==null&&ox(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&ox(r),t===1)e.tag===0?tR(Xx.bind(null,e)):U_(Xx.bind(null,e)),X2(function(){!(lt&6)&&No()}),r=null;else{switch(m_(n)){case 1:r=qm;break;case 4:r=f_;break;case 16:r=ed;break;case 536870912:r=h_;break;default:r=ed}r=F1(r,P1.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function P1(e,t){if(Iu=-1,Lu=0,lt&6)throw Error(ie(327));var r=e.callbackNode;if(Qi()&&e.callbackNode!==r)return null;var n=td(e,e===Qt?rr:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=xd(e,n);else{t=n;var s=lt;lt|=2;var o=D1();(Qt!==e||rr!==t)&&(is=null,ma=Ut()+500,Ko(e,t));do try{bR();break}catch(l){A1(e,l)}while(!0);cg(),gd.current=o,lt=s,Wt!==null?t=0:(Qt=null,rr=0,t=Gt)}if(t!==0){if(t===2&&(s=Sp(e),s!==0&&(n=s,t=Xp(e,s))),t===1)throw r=Yl,Ko(e,0),qs(e,n),Rr(e,Ut()),r;if(t===6)qs(e,n);else{if(s=e.current.alternate,!(n&30)&&!wR(s)&&(t=xd(e,n),t===2&&(o=Sp(e),o!==0&&(n=o,t=Xp(e,o))),t===1))throw r=Yl,Ko(e,0),qs(e,n),Rr(e,Ut()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(ie(345));case 2:Oo(e,jr,is);break;case 3:if(qs(e,n),(n&130023424)===n&&(t=kg+500-Ut(),10<t)){if(td(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){xr(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Pp(Oo.bind(null,e,jr,is),t);break}Oo(e,jr,is);break;case 4:if(qs(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var i=31-xn(n);o=1<<i,i=t[i],i>s&&(s=i),n&=~o}if(n=s,n=Ut()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*xR(n/1960))-n,10<n){e.timeoutHandle=Pp(Oo.bind(null,e,jr,is),n);break}Oo(e,jr,is);break;case 5:Oo(e,jr,is);break;default:throw Error(ie(329))}}}return Rr(e,Ut()),e.callbackNode===r?P1.bind(null,e):null}function Xp(e,t){var r=Sl;return e.current.memoizedState.isDehydrated&&(Ko(e,t).flags|=256),e=xd(e,t),e!==2&&(t=jr,jr=r,t!==null&&Qp(t)),e}function Qp(e){jr===null?jr=e:jr.push.apply(jr,e)}function wR(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],o=s.getSnapshot;s=s.value;try{if(!bn(o(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 qs(e,t){for(t&=~Sg,t&=~cf,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-xn(t),n=1<<r;e[r]=-1,t&=~n}}function Xx(e){if(lt&6)throw Error(ie(327));Qi();var t=td(e,0);if(!(t&1))return Rr(e,Ut()),null;var r=xd(e,t);if(e.tag!==0&&r===2){var n=Sp(e);n!==0&&(t=n,r=Xp(e,n))}if(r===1)throw r=Yl,Ko(e,0),qs(e,t),Rr(e,Ut()),r;if(r===6)throw Error(ie(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Oo(e,jr,is),Rr(e,Ut()),null}function Cg(e,t){var r=lt;lt|=1;try{return e(t)}finally{lt=r,lt===0&&(ma=Ut()+500,sf&&No())}}function ti(e){to!==null&&to.tag===0&&!(lt&6)&&Qi();var t=lt;lt|=1;var r=rn.transition,n=mt;try{if(rn.transition=null,mt=1,e)return e()}finally{mt=n,rn.transition=r,lt=t,!(lt&6)&&No()}}function jg(){Ir=$i.current,St($i)}function Ko(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,q2(r)),Wt!==null)for(r=Wt.return;r!==null;){var n=r;switch(ig(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&id();break;case 3:ha(),St(Nr),St(ur),mg();break;case 5:pg(n);break;case 4:ha();break;case 13:St(At);break;case 19:St(At);break;case 10:ug(n.type._context);break;case 22:case 23:jg()}r=r.return}if(Qt=e,Wt=e=ho(e.current,null),rr=Ir=t,Gt=0,Yl=null,Sg=cf=ei=0,jr=Sl=null,zo!==null){for(t=0;t<zo.length;t++)if(r=zo[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,o=r.pending;if(o!==null){var i=o.next;o.next=s,n.next=i}r.pending=n}zo=null}return e}function A1(e,t){do{var r=Wt;try{if(cg(),Du.current=md,pd){for(var n=Ot.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}pd=!1}if(Jo=0,Xt=Kt=Ot=null,_l=!1,Bl=0,bg.current=null,r===null||r.return===null){Gt=1,Yl=t,Wt=null;break}e:{var o=e,i=r.return,l=r,c=t;if(t=rr,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var v=Fx(i);if(v!==null){v.flags&=-257,zx(v,i,l,o,t),v.mode&1&&Lx(o,u,t),t=v,c=u;var x=t.updateQueue;if(x===null){var y=new Set;y.add(c),t.updateQueue=y}else x.add(c);break e}else{if(!(t&1)){Lx(o,u,t),Eg();break e}c=Error(ie(426))}}else if(Tt&&l.mode&1){var _=Fx(i);if(_!==null){!(_.flags&65536)&&(_.flags|=256),zx(_,i,l,o,t),ag(pa(c,l));break e}}o=c=pa(c,l),Gt!==4&&(Gt=2),Sl===null?Sl=[o]:Sl.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var p=m1(o,c,t);Px(o,p);break e;case 1:l=c;var h=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof h.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(uo===null||!uo.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var C=g1(o,l,t);Px(o,C);break e}}o=o.return}while(o!==null)}M1(r)}catch(j){t=j,Wt===r&&r!==null&&(Wt=r=r.return);continue}break}while(!0)}function D1(){var e=gd.current;return gd.current=md,e===null?md:e}function Eg(){(Gt===0||Gt===3||Gt===2)&&(Gt=4),Qt===null||!(ei&268435455)&&!(cf&268435455)||qs(Qt,rr)}function xd(e,t){var r=lt;lt|=2;var n=D1();(Qt!==e||rr!==t)&&(is=null,Ko(e,t));do try{_R();break}catch(s){A1(e,s)}while(!0);if(cg(),lt=r,gd.current=n,Wt!==null)throw Error(ie(261));return Qt=null,rr=0,Gt}function _R(){for(;Wt!==null;)O1(Wt)}function bR(){for(;Wt!==null&&!KT();)O1(Wt)}function O1(e){var t=L1(e.alternate,e,Ir);e.memoizedProps=e.pendingProps,t===null?M1(e):Wt=t,bg.current=null}function M1(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=mR(r,t),r!==null){r.flags&=32767,Wt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Gt=6,Wt=null;return}}else if(r=pR(r,t,Ir),r!==null){Wt=r;return}if(t=t.sibling,t!==null){Wt=t;return}Wt=t=e}while(t!==null);Gt===0&&(Gt=5)}function Oo(e,t,r){var n=mt,s=rn.transition;try{rn.transition=null,mt=1,SR(e,t,r,n)}finally{rn.transition=s,mt=n}return null}function SR(e,t,r,n){do Qi();while(to!==null);if(lt&6)throw Error(ie(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(ie(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(n2(e,o),e===Qt&&(Wt=Qt=null,rr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||du||(du=!0,F1(ed,function(){return Qi(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=rn.transition,rn.transition=null;var i=mt;mt=1;var l=lt;lt|=4,bg.current=null,vR(e,r),T1(r,e),B2(Tp),rd=!!Np,Tp=Np=null,e.current=r,yR(r),GT(),lt=l,mt=i,rn.transition=o}else e.current=r;if(du&&(du=!1,to=e,yd=s),o=e.pendingLanes,o===0&&(uo=null),XT(r.stateNode),Rr(e,Ut()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(vd)throw vd=!1,e=Zp,Zp=null,e;return yd&1&&e.tag!==0&&Qi(),o=e.pendingLanes,o&1?e===qp?kl++:(kl=0,qp=e):kl=0,No(),null}function Qi(){if(to!==null){var e=m_(yd),t=rn.transition,r=mt;try{if(rn.transition=null,mt=16>e?16:e,to===null)var n=!1;else{if(e=to,to=null,yd=0,lt&6)throw Error(ie(331));var s=lt;for(lt|=4,Ee=e.current;Ee!==null;){var o=Ee,i=o.child;if(Ee.flags&16){var l=o.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(Ee=u;Ee!==null;){var d=Ee;switch(d.tag){case 0:case 11:case 15:bl(8,d,o)}var f=d.child;if(f!==null)f.return=d,Ee=f;else for(;Ee!==null;){d=Ee;var m=d.sibling,v=d.return;if(j1(d),d===u){Ee=null;break}if(m!==null){m.return=v,Ee=m;break}Ee=v}}}var x=o.alternate;if(x!==null){var y=x.child;if(y!==null){x.child=null;do{var _=y.sibling;y.sibling=null,y=_}while(y!==null)}}Ee=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,Ee=i;else e:for(;Ee!==null;){if(o=Ee,o.flags&2048)switch(o.tag){case 0:case 11:case 15:bl(9,o,o.return)}var p=o.sibling;if(p!==null){p.return=o.return,Ee=p;break e}Ee=o.return}}var h=e.current;for(Ee=h;Ee!==null;){i=Ee;var w=i.child;if(i.subtreeFlags&2064&&w!==null)w.return=i,Ee=w;else e:for(i=h;Ee!==null;){if(l=Ee,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:lf(9,l)}}catch(j){Lt(l,l.return,j)}if(l===i){Ee=null;break e}var C=l.sibling;if(C!==null){C.return=l.return,Ee=C;break e}Ee=l.return}}if(lt=s,No(),Vn&&typeof Vn.onPostCommitFiberRoot=="function")try{Vn.onPostCommitFiberRoot(Jd,e)}catch{}n=!0}return n}finally{mt=r,rn.transition=t}}return!1}function Qx(e,t,r){t=pa(r,t),t=m1(e,t,1),e=co(e,t,1),t=xr(),e!==null&&(xc(e,1,t),Rr(e,t))}function Lt(e,t,r){if(e.tag===3)Qx(e,e,r);else for(;t!==null;){if(t.tag===3){Qx(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(uo===null||!uo.has(n))){e=pa(r,e),e=g1(t,e,1),t=co(t,e,1),e=xr(),t!==null&&(xc(t,1,e),Rr(t,e));break}}t=t.return}}function kR(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=xr(),e.pingedLanes|=e.suspendedLanes&r,Qt===e&&(rr&r)===r&&(Gt===4||Gt===3&&(rr&130023424)===rr&&500>Ut()-kg?Ko(e,0):Sg|=r),Rr(e,t)}function I1(e,t){t===0&&(e.mode&1?(t=tu,tu<<=1,!(tu&130023424)&&(tu=4194304)):t=1);var r=xr();e=ws(e,t),e!==null&&(xc(e,t,r),Rr(e,r))}function CR(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),I1(e,r)}function jR(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ie(314))}n!==null&&n.delete(t),I1(e,r)}var L1;L1=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Nr.current)Er=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Er=!1,hR(e,t,r);Er=!!(e.flags&131072)}else Er=!1,Tt&&t.flags&1048576&&$_(t,cd,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Mu(e,t),e=t.pendingProps;var s=ua(t,ur.current);Xi(t,r),s=vg(null,t,n,e,s,r);var o=yg();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Tr(n)?(o=!0,ad(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,fg(t),s.updater=af,t.stateNode=s,s._reactInternals=t,Fp(t,n,e,r),t=$p(null,t,n,!0,o,r)):(t.tag=0,Tt&&o&&og(t),vr(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Mu(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=NR(n),e=dn(n,e),s){case 0:t=Up(null,t,n,e,r);break e;case 1:t=Vx(null,t,n,e,r);break e;case 11:t=Ux(null,t,n,e,r);break e;case 14:t=$x(null,t,n,dn(n.type,e),r);break e}throw Error(ie(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:dn(n,s),Up(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:dn(n,s),Vx(e,t,n,s,r);case 3:e:{if(w1(t),e===null)throw Error(ie(387));n=t.pendingProps,o=t.memoizedState,s=o.element,K_(e,t),fd(t,n,null,r);var i=t.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=pa(Error(ie(423)),t),t=Bx(e,t,n,r,s);break e}else if(n!==s){s=pa(Error(ie(424)),t),t=Bx(e,t,n,r,s);break e}else for(zr=lo(t.stateNode.containerInfo.firstChild),Ur=t,Tt=!0,mn=null,r=H_(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(da(),n===s){t=_s(e,t,r);break e}vr(e,t,n,r)}t=t.child}return t;case 5:return G_(t),e===null&&Mp(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Rp(n,s)?i=null:o!==null&&Rp(n,o)&&(t.flags|=32),x1(e,t),vr(e,t,i,r),t.child;case 6:return e===null&&Mp(t),null;case 13:return _1(e,t,r);case 4:return hg(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=fa(t,null,n,r):vr(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:dn(n,s),Ux(e,t,n,s,r);case 7:return vr(e,t,t.pendingProps,r),t.child;case 8:return vr(e,t,t.pendingProps.children,r),t.child;case 12:return vr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,wt(ud,n._currentValue),n._currentValue=i,o!==null)if(bn(o.value,i)){if(o.children===s.children&&!Nr.current){t=_s(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){i=o.child;for(var c=l.firstContext;c!==null;){if(c.context===n){if(o.tag===1){c=ps(-1,r&-r),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=r,c=o.alternate,c!==null&&(c.lanes|=r),Ip(o.return,r,t),l.lanes|=r;break}c=c.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(ie(341));i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Ip(i,r,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}vr(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Xi(t,r),s=sn(s),n=n(s),t.flags|=1,vr(e,t,n,r),t.child;case 14:return n=t.type,s=dn(n,t.pendingProps),s=dn(n.type,s),$x(e,t,n,s,r);case 15:return v1(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:dn(n,s),Mu(e,t),t.tag=1,Tr(n)?(e=!0,ad(t)):e=!1,Xi(t,r),p1(t,n,s),Fp(t,n,s,r),$p(null,t,n,!0,e,r);case 19:return b1(e,t,r);case 22:return y1(e,t,r)}throw Error(ie(156,t.tag))};function F1(e,t){return d_(e,t)}function ER(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tn(e,t,r,n){return new ER(e,t,r,n)}function Ng(e){return e=e.prototype,!(!e||!e.isReactComponent)}function NR(e){if(typeof e=="function")return Ng(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Km)return 11;if(e===Gm)return 14}return 2}function ho(e,t){var r=e.alternate;return r===null?(r=tn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Fu(e,t,r,n,s,o){var i=2;if(n=e,typeof e=="function")Ng(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Pi:return Go(r.children,s,o,t);case Ym:i=8,s|=8;break;case lp:return e=tn(12,r,t,s|2),e.elementType=lp,e.lanes=o,e;case cp:return e=tn(13,r,t,s),e.elementType=cp,e.lanes=o,e;case up:return e=tn(19,r,t,s),e.elementType=up,e.lanes=o,e;case Gw:return uf(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yw:i=10;break e;case Kw:i=9;break e;case Km:i=11;break e;case Gm:i=14;break e;case Ks:i=16,n=null;break e}throw Error(ie(130,e==null?e:typeof e,""))}return t=tn(i,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function Go(e,t,r,n){return e=tn(7,e,n,t),e.lanes=r,e}function uf(e,t,r,n){return e=tn(22,e,n,t),e.elementType=Gw,e.lanes=r,e.stateNode={isHidden:!1},e}function Oh(e,t,r){return e=tn(6,e,null,t),e.lanes=r,e}function Mh(e,t,r){return t=tn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function TR(e,t,r,n,s){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=mh(0),this.expirationTimes=mh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mh(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Tg(e,t,r,n,s,o,i,l,c){return e=new TR(e,t,r,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=tn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},fg(o),e}function RR(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ri,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function z1(e){if(!e)return vo;e=e._reactInternals;e:{if(ui(e)!==e||e.tag!==1)throw Error(ie(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Tr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ie(171))}if(e.tag===1){var r=e.type;if(Tr(r))return z_(e,r,t)}return t}function U1(e,t,r,n,s,o,i,l,c){return e=Tg(r,n,!0,e,s,o,i,l,c),e.context=z1(null),r=e.current,n=xr(),s=fo(r),o=ps(n,s),o.callback=t??null,co(r,o,s),e.current.lanes=s,xc(e,s,n),Rr(e,n),e}function df(e,t,r,n){var s=t.current,o=xr(),i=fo(s);return r=z1(r),t.context===null?t.context=r:t.pendingContext=r,t=ps(o,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=co(s,t,i),e!==null&&(wn(e,s,i,o),Au(e,s,i)),i}function wd(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 Jx(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Rg(e,t){Jx(e,t),(e=e.alternate)&&Jx(e,t)}function PR(){return null}var $1=typeof reportError=="function"?reportError:function(e){console.error(e)};function Pg(e){this._internalRoot=e}ff.prototype.render=Pg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ie(409));df(e,t,null,null)};ff.prototype.unmount=Pg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ti(function(){df(null,e,null,null)}),t[xs]=null}};function ff(e){this._internalRoot=e}ff.prototype.unstable_scheduleHydration=function(e){if(e){var t=y_();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Zs.length&&t!==0&&t<Zs[r].priority;r++);Zs.splice(r,0,e),r===0&&w_(e)}};function Ag(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function hf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function e0(){}function AR(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var u=wd(i);o.call(u)}}var i=U1(t,n,e,0,null,!1,!1,"",e0);return e._reactRootContainer=i,e[xs]=i.current,Fl(e.nodeType===8?e.parentNode:e),ti(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var l=n;n=function(){var u=wd(c);l.call(u)}}var c=Tg(e,0,!1,null,null,!1,!1,"",e0);return e._reactRootContainer=c,e[xs]=c.current,Fl(e.nodeType===8?e.parentNode:e),ti(function(){df(t,c,r,n)}),c}function pf(e,t,r,n,s){var o=r._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var l=s;s=function(){var c=wd(i);l.call(c)}}df(t,i,e,s)}else i=AR(r,t,e,s,n);return wd(i)}g_=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ol(t.pendingLanes);r!==0&&(Xm(t,r|1),Rr(t,Ut()),!(lt&6)&&(ma=Ut()+500,No()))}break;case 13:ti(function(){var n=ws(e,1);if(n!==null){var s=xr();wn(n,e,1,s)}}),Rg(e,1)}};Qm=function(e){if(e.tag===13){var t=ws(e,134217728);if(t!==null){var r=xr();wn(t,e,134217728,r)}Rg(e,134217728)}};v_=function(e){if(e.tag===13){var t=fo(e),r=ws(e,t);if(r!==null){var n=xr();wn(r,e,t,n)}Rg(e,t)}};y_=function(){return mt};x_=function(e,t){var r=mt;try{return mt=e,t()}finally{mt=r}};wp=function(e,t,r){switch(t){case"input":if(hp(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=nf(n);if(!s)throw Error(ie(90));qw(n),hp(n,s)}}}break;case"textarea":Qw(e,r);break;case"select":t=r.value,t!=null&&Ki(e,!!r.multiple,t,!1)}};o_=Cg;i_=ti;var DR={usingClientEntryPoint:!1,Events:[_c,Mi,nf,n_,s_,Cg]},Ga={findFiberByHostInstance:Fo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},OR={bundleType:Ga.bundleType,version:Ga.version,rendererPackageName:Ga.rendererPackageName,rendererConfig:Ga.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ns.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=c_(e),e===null?null:e.stateNode},findFiberByHostInstance:Ga.findFiberByHostInstance||PR,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 fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fu.isDisabled&&fu.supportsFiber)try{Jd=fu.inject(OR),Vn=fu}catch{}}Kr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DR;Kr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ag(t))throw Error(ie(200));return RR(e,t,null,r)};Kr.createRoot=function(e,t){if(!Ag(e))throw Error(ie(299));var r=!1,n="",s=$1;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Tg(e,1,!1,null,null,r,!1,n,s),e[xs]=t.current,Fl(e.nodeType===8?e.parentNode:e),new Pg(t)};Kr.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(ie(188)):(e=Object.keys(e).join(","),Error(ie(268,e)));return e=c_(t),e=e===null?null:e.stateNode,e};Kr.flushSync=function(e){return ti(e)};Kr.hydrate=function(e,t,r){if(!hf(t))throw Error(ie(200));return pf(null,e,t,!0,r)};Kr.hydrateRoot=function(e,t,r){if(!Ag(e))throw Error(ie(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",i=$1;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=U1(t,null,e,1,r??null,s,!1,o,i),e[xs]=t.current,Fl(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new ff(t)};Kr.render=function(e,t,r){if(!hf(t))throw Error(ie(200));return pf(null,e,t,!1,r)};Kr.unmountComponentAtNode=function(e){if(!hf(e))throw Error(ie(40));return e._reactRootContainer?(ti(function(){pf(null,null,e,!1,function(){e._reactRootContainer=null,e[xs]=null})}),!0):!1};Kr.unstable_batchedUpdates=Cg;Kr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!hf(r))throw Error(ie(200));if(e==null||e._reactInternals===void 0)throw Error(ie(38));return pf(e,t,r,!1,n)};Kr.version="18.3.1-next-f1338f8080-20240426";function V1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(V1)}catch(e){console.error(e)}}V1(),Vw.exports=Kr;var Ts=Vw.exports;const B1=Fm(Ts),MR=Tw({__proto__:null,default:B1},[Ts]);var t0=Ts;ip.createRoot=t0.createRoot,ip.hydrateRoot=t0.hydrateRoot;/**
* @remix-run/router v1.18.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Pt(){return Pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pt.apply(this,arguments)}var Vt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Vt||(Vt={}));const r0="popstate";function IR(e){e===void 0&&(e={});function t(s,o){let{pathname:i="/",search:l="",hash:c=""}=Rs(s.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),Kl("",{pathname:i,search:l,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(s,o){let i=s.document.querySelector("base"),l="";if(i&&i.getAttribute("href")){let c=s.location.href,u=c.indexOf("#");l=u===-1?c:c.slice(0,u)}return l+"#"+(typeof o=="string"?o:ni(o))}function n(s,o){ri(s.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return FR(t,r,n,e)}function et(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ri(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function LR(){return Math.random().toString(36).substr(2,8)}function n0(e,t){return{usr:e.state,key:e.key,idx:t}}function Kl(e,t,r,n){return r===void 0&&(r=null),Pt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Rs(t):t,{state:r,key:t&&t.key||n||LR()})}function ni(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Rs(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function FR(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,i=s.history,l=Vt.Pop,c=null,u=d();u==null&&(u=0,i.replaceState(Pt({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function f(){l=Vt.Pop;let _=d(),p=_==null?null:_-u;u=_,c&&c({action:l,location:y.location,delta:p})}function m(_,p){l=Vt.Push;let h=Kl(y.location,_,p);r&&r(h,_),u=d()+1;let w=n0(h,u),C=y.createHref(h);try{i.pushState(w,"",C)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(C)}o&&c&&c({action:l,location:y.location,delta:1})}function v(_,p){l=Vt.Replace;let h=Kl(y.location,_,p);r&&r(h,_),u=d();let w=n0(h,u),C=y.createHref(h);i.replaceState(w,"",C),o&&c&&c({action:l,location:y.location,delta:0})}function x(_){let p=s.location.origin!=="null"?s.location.origin:s.location.href,h=typeof _=="string"?_:ni(_);return h=h.replace(/ $/,"%20"),et(p,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,p)}let y={get action(){return l},get location(){return e(s,i)},listen(_){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(r0,f),c=_,()=>{s.removeEventListener(r0,f),c=null}},createHref(_){return t(s,_)},createURL:x,encodeLocation(_){let p=x(_);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:m,replace:v,go(_){return i.go(_)}};return y}var xt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(xt||(xt={}));const zR=new Set(["lazy","caseSensitive","path","id","index","children"]);function UR(e){return e.index===!0}function Gl(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((s,o)=>{let i=[...r,String(o)],l=typeof s.id=="string"?s.id:i.join("-");if(et(s.index!==!0||!s.children,"Cannot specify children on an index route"),et(!n[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),UR(s)){let c=Pt({},s,t(s),{id:l});return n[l]=c,c}else{let c=Pt({},s,t(s),{id:l,children:void 0});return n[l]=c,s.children&&(c.children=Gl(s.children,t,i,n)),c}})}function Mo(e,t,r){return r===void 0&&(r="/"),zu(e,t,r,!1)}function zu(e,t,r,n){let s=typeof t=="string"?Rs(t):t,o=Ea(s.pathname||"/",r);if(o==null)return null;let i=W1(e);VR(i);let l=null;for(let c=0;l==null&&c<i.length;++c){let u=JR(o);l=XR(i[c],u,n)}return l}function $R(e,t){let{route:r,pathname:n,params:s}=e;return{id:r.id,pathname:n,params:s,data:t[r.id],handle:r.handle}}function W1(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(o,i,l)=>{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};c.relativePath.startsWith("/")&&(et(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=ms([n,c.relativePath]),d=r.concat(c);o.children&&o.children.length>0&&(et(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),W1(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:ZR(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))s(o,i);else for(let c of H1(o.path))s(o,i,c)}),t}function H1(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let i=H1(n.join("/")),l=[];return l.push(...i.map(c=>c===""?o:[o,c].join("/"))),s&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function VR(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:qR(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const BR=/^:[\w-]+$/,WR=3,HR=2,YR=1,KR=10,GR=-2,s0=e=>e==="*";function ZR(e,t){let r=e.split("/"),n=r.length;return r.some(s0)&&(n+=GR),t&&(n+=HR),r.filter(s=>!s0(s)).reduce((s,o)=>s+(BR.test(o)?WR:o===""?YR:KR),n)}function qR(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function XR(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,s={},o="/",i=[];for(let l=0;l<n.length;++l){let c=n[l],u=l===n.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=o0({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),m=c.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=o0({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),i.push({params:s,pathname:ms([o,f.pathname]),pathnameBase:rP(ms([o,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(o=ms([o,f.pathnameBase]))}return i}function o0(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=QR(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:n.reduce((u,d,f)=>{let{paramName:m,isOptional:v}=d;if(m==="*"){let y=l[f]||"";i=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const x=l[f];return v&&!x?u[m]=void 0:u[m]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function QR(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ri(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function JR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ri(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ea(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function eP(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Rs(e):e;return{pathname:r?r.startsWith("/")?r:tP(r,t):t,search:nP(n),hash:sP(s)}}function tP(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function Ih(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Y1(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function mf(e,t){let r=Y1(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function gf(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Rs(e):(s=Pt({},e),et(!s.pathname||!s.pathname.includes("?"),Ih("?","pathname","search",s)),et(!s.pathname||!s.pathname.includes("#"),Ih("#","pathname","hash",s)),et(!s.search||!s.search.includes("#"),Ih("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,l;if(i==null)l=r;else{let f=t.length-1;if(!n&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),f-=1;s.pathname=m.join("/")}l=f>=0?t[f]:"/"}let c=eP(s,l),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const ms=e=>e.join("/").replace(/\/\/+/g,"/"),rP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),nP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,sP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Dg{constructor(t,r,n,s){s===void 0&&(s=!1),this.status=t,this.statusText=r||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function vf(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const K1=["post","put","patch","delete"],oP=new Set(K1),iP=["get",...K1],aP=new Set(iP),lP=new Set([301,302,303,307,308]),cP=new Set([307,308]),Lh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},uP={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Za={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Og=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dP=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),G1="remix-router-transitions";function fP(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;et(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(e.mapRouteProperties)s=e.mapRouteProperties;else if(e.detectErrorBoundary){let U=e.detectErrorBoundary;s=W=>({hasErrorBoundary:U(W)})}else s=dP;let o={},i=Gl(e.routes,s,void 0,o),l,c=e.basename||"/",u=e.unstable_dataStrategy||vP,d=e.unstable_patchRoutesOnMiss,f=Pt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),m=null,v=new Set,x=null,y=null,_=null,p=e.hydrationData!=null,h=Mo(i,e.history.location,c),w=null;if(h==null&&!d){let U=mr(404,{pathname:e.history.location.pathname}),{matches:W,route:Z}=m0(i);h=W,w={[Z.id]:U}}h&&d&&!e.hydrationData&&ch(h,i,e.history.location.pathname).active&&(h=null);let C;if(!h)C=!1,h=[];else if(h.some(U=>U.route.lazy))C=!1;else if(!h.some(U=>U.route.loader))C=!0;else if(f.v7_partialHydration){let U=e.hydrationData?e.hydrationData.loaderData:null,W=e.hydrationData?e.hydrationData.errors:null,Z=re=>re.route.loader?typeof re.route.loader=="function"&&re.route.loader.hydrate===!0?!1:U&&U[re.route.id]!==void 0||W&&W[re.route.id]!==void 0:!0;if(W){let re=h.findIndex(ke=>W[ke.route.id]!==void 0);C=h.slice(0,re+1).every(Z)}else C=h.every(Z)}else C=e.hydrationData!=null;let j,E={historyAction:e.history.action,location:e.history.location,matches:h,initialized:C,navigation:Lh,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||w,fetchers:new Map,blockers:new Map},R=Vt.Pop,P=!1,A,L=!1,q=new Map,N=null,F=!1,b=!1,V=[],te=[],B=new Map,K=0,I=-1,Q=new Map,z=new Set,$=new Map,he=new Map,ne=new Set,se=new Map,Oe=new Map,pe=new Map,xe=!1;function Te(){if(m=e.history.listen(U=>{let{action:W,location:Z,delta:re}=U;if(xe){xe=!1;return}ri(Oe.size===0||re!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ke=Wc({currentLocation:E.location,nextLocation:Z,historyAction:W});if(ke&&re!=null){xe=!0,e.history.go(re*-1),gi(ke,{state:"blocked",location:Z,proceed(){gi(ke,{state:"proceeding",proceed:void 0,reset:void 0,location:Z}),e.history.go(re)},reset(){let Ae=new Map(E.blockers);Ae.set(ke,Za),Pe({blockers:Ae})}});return}return G(W,Z)}),r){RP(t,q);let U=()=>PP(t,q);t.addEventListener("pagehide",U),N=()=>t.removeEventListener("pagehide",U)}return E.initialized||G(Vt.Pop,E.location,{initialHydration:!0}),j}function Fe(){m&&m(),N&&N(),v.clear(),A&&A.abort(),E.fetchers.forEach((U,W)=>Ht(W)),E.blockers.forEach((U,W)=>Bc(W))}function Me(U){return v.add(U),()=>v.delete(U)}function Pe(U,W){W===void 0&&(W={}),E=Pt({},E,U);let Z=[],re=[];f.v7_fetcherPersist&&E.fetchers.forEach((ke,Ae)=>{ke.state==="idle"&&(ne.has(Ae)?re.push(Ae):Z.push(Ae))}),[...v].forEach(ke=>ke(E,{deletedFetchers:re,unstable_viewTransitionOpts:W.viewTransitionOpts,unstable_flushSync:W.flushSync===!0})),f.v7_fetcherPersist&&(Z.forEach(ke=>E.fetchers.delete(ke)),re.forEach(ke=>Ht(ke)))}function nt(U,W,Z){var re,ke;let{flushSync:Ae}=Z===void 0?{}:Z,Ve=E.actionData!=null&&E.navigation.formMethod!=null&&hn(E.navigation.formMethod)&&E.navigation.state==="loading"&&((re=U.state)==null?void 0:re._isRedirect)!==!0,fe;W.actionData?Object.keys(W.actionData).length>0?fe=W.actionData:fe=null:Ve?fe=E.actionData:fe=null;let Ze=W.loaderData?h0(E.loaderData,W.loaderData,W.matches||[],W.errors):E.loaderData,Le=E.blockers;Le.size>0&&(Le=new Map(Le),Le.forEach((pt,yt)=>Le.set(yt,Za)));let ze=P===!0||E.navigation.formMethod!=null&&hn(E.navigation.formMethod)&&((ke=U.state)==null?void 0:ke._isRedirect)!==!0;l&&(i=l,l=void 0),F||R===Vt.Pop||(R===Vt.Push?e.history.push(U,U.state):R===Vt.Replace&&e.history.replace(U,U.state));let gt;if(R===Vt.Pop){let pt=q.get(E.location.pathname);pt&&pt.has(U.pathname)?gt={currentLocation:E.location,nextLocation:U}:q.has(U.pathname)&&(gt={currentLocation:U,nextLocation:E.location})}else if(L){let pt=q.get(E.location.pathname);pt?pt.add(U.pathname):(pt=new Set([U.pathname]),q.set(E.location.pathname,pt)),gt={currentLocation:E.location,nextLocation:U}}Pe(Pt({},W,{actionData:fe,loaderData:Ze,historyAction:R,location:U,initialized:!0,navigation:Lh,revalidation:"idle",restoreScrollPosition:Hy(U,W.matches||E.matches),preventScrollReset:ze,blockers:Le}),{viewTransitionOpts:gt,flushSync:Ae===!0}),R=Vt.Pop,P=!1,L=!1,F=!1,b=!1,V=[],te=[]}async function k(U,W){if(typeof U=="number"){e.history.go(U);return}let Z=Jp(E.location,E.matches,c,f.v7_prependBasename,U,f.v7_relativeSplatPath,W==null?void 0:W.fromRouteId,W==null?void 0:W.relative),{path:re,submission:ke,error:Ae}=i0(f.v7_normalizeFormMethod,!1,Z,W),Ve=E.location,fe=Kl(E.location,re,W&&W.state);fe=Pt({},fe,e.history.encodeLocation(fe));let Ze=W&&W.replace!=null?W.replace:void 0,Le=Vt.Push;Ze===!0?Le=Vt.Replace:Ze===!1||ke!=null&&hn(ke.formMethod)&&ke.formAction===E.location.pathname+E.location.search&&(Le=Vt.Replace);let ze=W&&"preventScrollReset"in W?W.preventScrollReset===!0:void 0,gt=(W&&W.unstable_flushSync)===!0,pt=Wc({currentLocation:Ve,nextLocation:fe,historyAction:Le});if(pt){gi(pt,{state:"blocked",location:fe,proceed(){gi(pt,{state:"proceeding",proceed:void 0,reset:void 0,location:fe}),k(U,W)},reset(){let yt=new Map(E.blockers);yt.set(pt,Za),Pe({blockers:yt})}});return}return await G(Le,fe,{submission:ke,pendingError:Ae,preventScrollReset:ze,replace:W&&W.replace,enableViewTransition:W&&W.unstable_viewTransition,flushSync:gt})}function J(){if(Ye(),Pe({revalidation:"loading"}),E.navigation.state!=="submitting"){if(E.navigation.state==="idle"){G(E.historyAction,E.location,{startUninterruptedRevalidation:!0});return}G(R||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation})}}async function G(U,W,Z){A&&A.abort(),A=null,R=U,F=(Z&&Z.startUninterruptedRevalidation)===!0,oT(E.location,E.matches),P=(Z&&Z.preventScrollReset)===!0,L=(Z&&Z.enableViewTransition)===!0;let re=l||i,ke=Z&&Z.overrideNavigation,Ae=Mo(re,W,c),Ve=(Z&&Z.flushSync)===!0,fe=ch(Ae,re,W.pathname);if(fe.active&&fe.matches&&(Ae=fe.matches),!Ae){let{error:dt,notFoundMatches:er,route:$t}=vi(W.pathname);nt(W,{matches:er,loaderData:{},errors:{[$t.id]:dt}},{flushSync:Ve});return}if(E.initialized&&!b&&SP(E.location,W)&&!(Z&&Z.submission&&hn(Z.submission.formMethod))){nt(W,{matches:Ae},{flushSync:Ve});return}A=new AbortController;let Ze=bi(e.history,W,A.signal,Z&&Z.submission),Le;if(Z&&Z.pendingError)Le=[Vi(Ae).route.id,{type:xt.error,error:Z.pendingError}];else if(Z&&Z.submission&&hn(Z.submission.formMethod)){let dt=await D(Ze,W,Z.submission,Ae,fe.active,{replace:Z.replace,flushSync:Ve});if(dt.shortCircuited)return;if(dt.pendingActionResult){let[er,$t]=dt.pendingActionResult;if(Lr($t)&&vf($t.error)&&$t.error.status===404){A=null,nt(W,{matches:dt.matches,loaderData:{},errors:{[er]:$t.error}});return}}Ae=dt.matches||Ae,Le=dt.pendingActionResult,ke=Fh(W,Z.submission),Ve=!1,fe.active=!1,Ze=bi(e.history,Ze.url,Ze.signal)}let{shortCircuited:ze,matches:gt,loaderData:pt,errors:yt}=await S(Ze,W,Ae,fe.active,ke,Z&&Z.submission,Z&&Z.fetcherSubmission,Z&&Z.replace,Z&&Z.initialHydration===!0,Ve,Le);ze||(A=null,nt(W,Pt({matches:gt||Ae},p0(Le),{loaderData:pt,errors:yt})))}async function D(U,W,Z,re,ke,Ae){Ae===void 0&&(Ae={}),Ye();let Ve=NP(W,Z);if(Pe({navigation:Ve},{flushSync:Ae.flushSync===!0}),ke){let Le=await Hc(re,W.pathname,U.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){let{boundaryId:ze,error:gt}=An(W.pathname,Le);return{matches:Le.partialMatches,pendingActionResult:[ze,{type:xt.error,error:gt}]}}else if(Le.matches)re=Le.matches;else{let{notFoundMatches:ze,error:gt,route:pt}=vi(W.pathname);return{matches:ze,pendingActionResult:[pt.id,{type:xt.error,error:gt}]}}}let fe,Ze=al(re,W);if(!Ze.route.action&&!Ze.route.lazy)fe={type:xt.error,error:mr(405,{method:U.method,pathname:W.pathname,routeId:Ze.route.id})};else if(fe=(await ee("action",U,[Ze],re))[0],U.signal.aborted)return{shortCircuited:!0};if(Vo(fe)){let Le;return Ae&&Ae.replace!=null?Le=Ae.replace:Le=u0(fe.response.headers.get("Location"),new URL(U.url),c)===E.location.pathname+E.location.search,await X(U,fe,{submission:Z,replace:Le}),{shortCircuited:!0}}if($o(fe))throw mr(400,{type:"defer-action"});if(Lr(fe)){let Le=Vi(re,Ze.route.id);return(Ae&&Ae.replace)!==!0&&(R=Vt.Push),{matches:re,pendingActionResult:[Le.route.id,fe]}}return{matches:re,pendingActionResult:[Ze.route.id,fe]}}async function S(U,W,Z,re,ke,Ae,Ve,fe,Ze,Le,ze){let gt=ke||Fh(W,Ae),pt=Ae||Ve||y0(gt),yt=!F&&(!f.v7_partialHydration||!Ze);if(re){if(yt){let It=T(ze);Pe(Pt({navigation:gt},It!==void 0?{actionData:It}:{}),{flushSync:Le})}let Qe=await Hc(Z,W.pathname,U.signal);if(Qe.type==="aborted")return{shortCircuited:!0};if(Qe.type==="error"){let{boundaryId:It,error:Dr}=An(W.pathname,Qe);return{matches:Qe.partialMatches,loaderData:{},errors:{[It]:Dr}}}else if(Qe.matches)Z=Qe.matches;else{let{error:It,notFoundMatches:Dr,route:Et}=vi(W.pathname);return{matches:Dr,loaderData:{},errors:{[Et.id]:It}}}}let dt=l||i,[er,$t]=a0(e.history,E,Z,pt,W,f.v7_partialHydration&&Ze===!0,f.v7_skipActionErrorRevalidation,b,V,te,ne,$,z,dt,c,ze);if(Us(Qe=>!(Z&&Z.some(It=>It.route.id===Qe))||er&&er.some(It=>It.route.id===Qe)),I=++K,er.length===0&&$t.length===0){let Qe=es();return nt(W,Pt({matches:Z,loaderData:{},errors:ze&&Lr(ze[1])?{[ze[0]]:ze[1].error}:null},p0(ze),Qe?{fetchers:new Map(E.fetchers)}:{}),{flushSync:Le}),{shortCircuited:!0}}if(yt){let Qe={};if(!re){Qe.navigation=gt;let It=T(ze);It!==void 0&&(Qe.actionData=It)}$t.length>0&&(Qe.fetchers=O($t)),Pe(Qe,{flushSync:Le})}$t.forEach(Qe=>{B.has(Qe.key)&&at(Qe.key),Qe.controller&&B.set(Qe.key,Qe.controller)});let Ua=()=>$t.forEach(Qe=>at(Qe.key));A&&A.signal.addEventListener("abort",Ua);let{loaderResults:$s,fetcherResults:yi}=await me(E.matches,Z,er,$t,U);if(U.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",Ua),$t.forEach(Qe=>B.delete(Qe.key));let xi=g0([...$s,...yi]);if(xi){if(xi.idx>=er.length){let Qe=$t[xi.idx-er.length].key;z.add(Qe)}return await X(U,xi.result,{replace:fe}),{shortCircuited:!0}}let{loaderData:wi,errors:Dn}=f0(E,Z,er,$s,ze,$t,yi,se);se.forEach((Qe,It)=>{Qe.subscribe(Dr=>{(Dr||Qe.done)&&se.delete(It)})}),f.v7_partialHydration&&Ze&&E.errors&&Object.entries(E.errors).filter(Qe=>{let[It]=Qe;return!er.some(Dr=>Dr.route.id===It)}).forEach(Qe=>{let[It,Dr]=Qe;Dn=Object.assign(Dn||{},{[It]:Dr})});let Yc=es(),Kc=Xr(I),Gc=Yc||Kc||$t.length>0;return Pt({matches:Z,loaderData:wi,errors:Dn},Gc?{fetchers:new Map(E.fetchers)}:{})}function T(U){if(U&&!Lr(U[1]))return{[U[0]]:U[1].data};if(E.actionData)return Object.keys(E.actionData).length===0?null:E.actionData}function O(U){return U.forEach(W=>{let Z=E.fetchers.get(W.key),re=qa(void 0,Z?Z.data:void 0);E.fetchers.set(W.key,re)}),new Map(E.fetchers)}function Y(U,W,Z,re){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");B.has(U)&&at(U);let ke=(re&&re.unstable_flushSync)===!0,Ae=l||i,Ve=Jp(E.location,E.matches,c,f.v7_prependBasename,Z,f.v7_relativeSplatPath,W,re==null?void 0:re.relative),fe=Mo(Ae,Ve,c),Ze=ch(fe,Ae,Ve);if(Ze.active&&Ze.matches&&(fe=Ze.matches),!fe){jt(U,W,mr(404,{pathname:Ve}),{flushSync:ke});return}let{path:Le,submission:ze,error:gt}=i0(f.v7_normalizeFormMethod,!0,Ve,re);if(gt){jt(U,W,gt,{flushSync:ke});return}let pt=al(fe,Le);if(P=(re&&re.preventScrollReset)===!0,ze&&hn(ze.formMethod)){M(U,W,Le,pt,fe,Ze.active,ke,ze);return}$.set(U,{routeId:W,path:Le}),H(U,W,Le,pt,fe,Ze.active,ke,ze)}async function M(U,W,Z,re,ke,Ae,Ve,fe){Ye(),$.delete(U);function Ze(Et){if(!Et.route.action&&!Et.route.lazy){let ts=mr(405,{method:fe.formMethod,pathname:Z,routeId:W});return jt(U,W,ts,{flushSync:Ve}),!0}return!1}if(!Ae&&Ze(re))return;let Le=E.fetchers.get(U);Ue(U,TP(fe,Le),{flushSync:Ve});let ze=new AbortController,gt=bi(e.history,Z,ze.signal,fe);if(Ae){let Et=await Hc(ke,Z,gt.signal);if(Et.type==="aborted")return;if(Et.type==="error"){let{error:ts}=An(Z,Et);jt(U,W,ts,{flushSync:Ve});return}else if(Et.matches){if(ke=Et.matches,re=al(ke,Z),Ze(re))return}else{jt(U,W,mr(404,{pathname:Z}),{flushSync:Ve});return}}B.set(U,ze);let pt=K,dt=(await ee("action",gt,[re],ke))[0];if(gt.signal.aborted){B.get(U)===ze&&B.delete(U);return}if(f.v7_fetcherPersist&&ne.has(U)){if(Vo(dt)||Lr(dt)){Ue(U,Hs(void 0));return}}else{if(Vo(dt))if(B.delete(U),I>pt){Ue(U,Hs(void 0));return}else return z.add(U),Ue(U,qa(fe)),X(gt,dt,{fetcherSubmission:fe});if(Lr(dt)){jt(U,W,dt.error);return}}if($o(dt))throw mr(400,{type:"defer-action"});let er=E.navigation.location||E.location,$t=bi(e.history,er,ze.signal),Ua=l||i,$s=E.navigation.state!=="idle"?Mo(Ua,E.navigation.location,c):E.matches;et($s,"Didn't find any matches after fetcher action");let yi=++K;Q.set(U,yi);let xi=qa(fe,dt.data);E.fetchers.set(U,xi);let[wi,Dn]=a0(e.history,E,$s,fe,er,!1,f.v7_skipActionErrorRevalidation,b,V,te,ne,$,z,Ua,c,[re.route.id,dt]);Dn.filter(Et=>Et.key!==U).forEach(Et=>{let ts=Et.key,Yy=E.fetchers.get(ts),lT=qa(void 0,Yy?Yy.data:void 0);E.fetchers.set(ts,lT),B.has(ts)&&at(ts),Et.controller&&B.set(ts,Et.controller)}),Pe({fetchers:new Map(E.fetchers)});let Yc=()=>Dn.forEach(Et=>at(Et.key));ze.signal.addEventListener("abort",Yc);let{loaderResults:Kc,fetcherResults:Gc}=await me(E.matches,$s,wi,Dn,$t);if(ze.signal.aborted)return;ze.signal.removeEventListener("abort",Yc),Q.delete(U),B.delete(U),Dn.forEach(Et=>B.delete(Et.key));let Qe=g0([...Kc,...Gc]);if(Qe){if(Qe.idx>=wi.length){let Et=Dn[Qe.idx-wi.length].key;z.add(Et)}return X($t,Qe.result)}let{loaderData:It,errors:Dr}=f0(E,E.matches,wi,Kc,void 0,Dn,Gc,se);if(E.fetchers.has(U)){let Et=Hs(dt.data);E.fetchers.set(U,Et)}Xr(yi),E.navigation.state==="loading"&&yi>I?(et(R,"Expected pending action"),A&&A.abort(),nt(E.navigation.location,{matches:$s,loaderData:It,errors:Dr,fetchers:new Map(E.fetchers)})):(Pe({errors:Dr,loaderData:h0(E.loaderData,It,$s,Dr),fetchers:new Map(E.fetchers)}),b=!1)}async function H(U,W,Z,re,ke,Ae,Ve,fe){let Ze=E.fetchers.get(U);Ue(U,qa(fe,Ze?Ze.data:void 0),{flushSync:Ve});let Le=new AbortController,ze=bi(e.history,Z,Le.signal);if(Ae){let dt=await Hc(ke,Z,ze.signal);if(dt.type==="aborted")return;if(dt.type==="error"){let{error:er}=An(Z,dt);jt(U,W,er,{flushSync:Ve});return}else if(dt.matches)ke=dt.matches,re=al(ke,Z);else{jt(U,W,mr(404,{pathname:Z}),{flushSync:Ve});return}}B.set(U,Le);let gt=K,yt=(await ee("loader",ze,[re],ke))[0];if($o(yt)&&(yt=await J1(yt,ze.signal,!0)||yt),B.get(U)===Le&&B.delete(U),!ze.signal.aborted){if(ne.has(U)){Ue(U,Hs(void 0));return}if(Vo(yt))if(I>gt){Ue(U,Hs(void 0));return}else{z.add(U),await X(ze,yt);return}if(Lr(yt)){jt(U,W,yt.error);return}et(!$o(yt),"Unhandled fetcher deferred data"),Ue(U,Hs(yt.data))}}async function X(U,W,Z){let{submission:re,fetcherSubmission:ke,replace:Ae}=Z===void 0?{}:Z;W.response.headers.has("X-Remix-Revalidate")&&(b=!0);let Ve=W.response.headers.get("Location");et(Ve,"Expected a Location header on the redirect Response"),Ve=u0(Ve,new URL(U.url),c);let fe=Kl(E.location,Ve,{_isRedirect:!0});if(r){let yt=!1;if(W.response.headers.has("X-Remix-Reload-Document"))yt=!0;else if(Og.test(Ve)){const dt=e.history.createURL(Ve);yt=dt.origin!==t.location.origin||Ea(dt.pathname,c)==null}if(yt){Ae?t.location.replace(Ve):t.location.assign(Ve);return}}A=null;let Ze=Ae===!0?Vt.Replace:Vt.Push,{formMethod:Le,formAction:ze,formEncType:gt}=E.navigation;!re&&!ke&&Le&&ze&&gt&&(re=y0(E.navigation));let pt=re||ke;if(cP.has(W.response.status)&&pt&&hn(pt.formMethod))await G(Ze,fe,{submission:Pt({},pt,{formAction:Ve}),preventScrollReset:P});else{let yt=Fh(fe,re);await G(Ze,fe,{overrideNavigation:yt,fetcherSubmission:ke,preventScrollReset:P})}}async function ee(U,W,Z,re){try{let ke=await yP(u,U,W,Z,re,o,s);return await Promise.all(ke.map((Ae,Ve)=>{if(CP(Ae)){let fe=Ae.result;return{type:xt.redirect,response:_P(fe,W,Z[Ve].route.id,re,c,f.v7_relativeSplatPath)}}return wP(Ae)}))}catch(ke){return Z.map(()=>({type:xt.error,error:ke}))}}async function me(U,W,Z,re,ke){let[Ae,...Ve]=await Promise.all([Z.length?ee("loader",ke,Z,W):[],...re.map(fe=>{if(fe.matches&&fe.match&&fe.controller){let Ze=bi(e.history,fe.path,fe.controller.signal);return ee("loader",Ze,[fe.match],fe.matches).then(Le=>Le[0])}else return Promise.resolve({type:xt.error,error:mr(404,{pathname:fe.path})})})]);return await Promise.all([v0(U,Z,Ae,Ae.map(()=>ke.signal),!1,E.loaderData),v0(U,re.map(fe=>fe.match),Ve,re.map(fe=>fe.controller?fe.controller.signal:null),!0)]),{loaderResults:Ae,fetcherResults:Ve}}function Ye(){b=!0,V.push(...Us()),$.forEach((U,W)=>{B.has(W)&&(te.push(W),at(W))})}function Ue(U,W,Z){Z===void 0&&(Z={}),E.fetchers.set(U,W),Pe({fetchers:new Map(E.fetchers)},{flushSync:(Z&&Z.flushSync)===!0})}function jt(U,W,Z,re){re===void 0&&(re={});let ke=Vi(E.matches,W);Ht(U),Pe({errors:{[ke.route.id]:Z},fetchers:new Map(E.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function qr(U){return f.v7_fetcherPersist&&(he.set(U,(he.get(U)||0)+1),ne.has(U)&&ne.delete(U)),E.fetchers.get(U)||uP}function Ht(U){let W=E.fetchers.get(U);B.has(U)&&!(W&&W.state==="loading"&&Q.has(U))&&at(U),$.delete(U),Q.delete(U),z.delete(U),ne.delete(U),E.fetchers.delete(U)}function Qn(U){if(f.v7_fetcherPersist){let W=(he.get(U)||0)-1;W<=0?(he.delete(U),ne.add(U)):he.set(U,W)}else Ht(U);Pe({fetchers:new Map(E.fetchers)})}function at(U){let W=B.get(U);et(W,"Expected fetch controller: "+U),W.abort(),B.delete(U)}function Jn(U){for(let W of U){let Z=qr(W),re=Hs(Z.data);E.fetchers.set(W,re)}}function es(){let U=[],W=!1;for(let Z of z){let re=E.fetchers.get(Z);et(re,"Expected fetcher: "+Z),re.state==="loading"&&(z.delete(Z),U.push(Z),W=!0)}return Jn(U),W}function Xr(U){let W=[];for(let[Z,re]of Q)if(re<U){let ke=E.fetchers.get(Z);et(ke,"Expected fetcher: "+Z),ke.state==="loading"&&(at(Z),Q.delete(Z),W.push(Z))}return Jn(W),W.length>0}function Vc(U,W){let Z=E.blockers.get(U)||Za;return Oe.get(U)!==W&&Oe.set(U,W),Z}function Bc(U){E.blockers.delete(U),Oe.delete(U)}function gi(U,W){let Z=E.blockers.get(U)||Za;et(Z.state==="unblocked"&&W.state==="blocked"||Z.state==="blocked"&&W.state==="blocked"||Z.state==="blocked"&&W.state==="proceeding"||Z.state==="blocked"&&W.state==="unblocked"||Z.state==="proceeding"&&W.state==="unblocked","Invalid blocker state transition: "+Z.state+" -> "+W.state);let re=new Map(E.blockers);re.set(U,W),Pe({blockers:re})}function Wc(U){let{currentLocation:W,nextLocation:Z,historyAction:re}=U;if(Oe.size===0)return;Oe.size>1&&ri(!1,"A router only supports one blocker at a time");let ke=Array.from(Oe.entries()),[Ae,Ve]=ke[ke.length-1],fe=E.blockers.get(Ae);if(!(fe&&fe.state==="proceeding")&&Ve({currentLocation:W,nextLocation:Z,historyAction:re}))return Ae}function vi(U){let W=mr(404,{pathname:U}),Z=l||i,{matches:re,route:ke}=m0(Z);return Us(),{notFoundMatches:re,route:ke,error:W}}function An(U,W){return{boundaryId:Vi(W.partialMatches).route.id,error:mr(400,{type:"route-discovery",pathname:U,message:W.error!=null&&"message"in W.error?W.error:String(W.error)})}}function Us(U){let W=[];return se.forEach((Z,re)=>{(!U||U(re))&&(Z.cancel(),W.push(re),se.delete(re))}),W}function sT(U,W,Z){if(x=U,_=W,y=Z||null,!p&&E.navigation===Lh){p=!0;let re=Hy(E.location,E.matches);re!=null&&Pe({restoreScrollPosition:re})}return()=>{x=null,_=null,y=null}}function Wy(U,W){return y&&y(U,W.map(re=>$R(re,E.loaderData)))||U.key}function oT(U,W){if(x&&_){let Z=Wy(U,W);x[Z]=_()}}function Hy(U,W){if(x){let Z=Wy(U,W),re=x[Z];if(typeof re=="number")return re}return null}function ch(U,W,Z){if(d)if(U){let re=U[U.length-1].route;if(re.path&&(re.path==="*"||re.path.endsWith("/*")))return{active:!0,matches:zu(W,Z,c,!0)}}else return{active:!0,matches:zu(W,Z,c,!0)||[]};return{active:!1,matches:null}}async function Hc(U,W,Z){let re=U,ke=re.length>0?re[re.length-1].route:null;for(;;){let Ae=l==null,Ve=l||i;try{await gP(d,W,re,Ve,o,s,pe,Z)}catch(ze){return{type:"error",error:ze,partialMatches:re}}finally{Ae&&(i=[...i])}if(Z.aborted)return{type:"aborted"};let fe=Mo(Ve,W,c),Ze=!1;if(fe){let ze=fe[fe.length-1].route;if(ze.index)return{type:"success",matches:fe};if(ze.path&&ze.path.length>0)if(ze.path==="*")Ze=!0;else return{type:"success",matches:fe}}let Le=zu(Ve,W,c,!0);if(!Le||re.map(ze=>ze.route.id).join("-")===Le.map(ze=>ze.route.id).join("-"))return{type:"success",matches:Ze?fe:null};if(re=Le,ke=re[re.length-1].route,ke.path==="*")return{type:"success",matches:re}}}function iT(U){o={},l=Gl(U,s,void 0,o)}function aT(U,W){let Z=l==null;q1(U,W,l||i,o,s),Z&&(i=[...i],Pe({}))}return j={get basename(){return c},get future(){return f},get state(){return E},get routes(){return i},get window(){return t},initialize:Te,subscribe:Me,enableScrollRestoration:sT,navigate:k,fetch:Y,revalidate:J,createHref:U=>e.history.createHref(U),encodeLocation:U=>e.history.encodeLocation(U),getFetcher:qr,deleteFetcher:Qn,dispose:Fe,getBlocker:Vc,deleteBlocker:Bc,patchRoutes:aT,_internalFetchControllers:B,_internalActiveDeferreds:se,_internalSetRoutes:iT},j}function hP(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Jp(e,t,r,n,s,o,i,l){let c,u;if(i){c=[];for(let f of t)if(c.push(f),f.route.id===i){u=f;break}}else c=t,u=t[t.length-1];let d=gf(s||".",mf(c,o),Ea(e.pathname,r)||e.pathname,l==="path");return s==null&&(d.search=e.search,d.hash=e.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!Mg(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(d.pathname=d.pathname==="/"?r:ms([r,d.pathname])),ni(d)}function i0(e,t,r,n){if(!n||!hP(n))return{path:r};if(n.formMethod&&!EP(n.formMethod))return{path:r,error:mr(405,{method:n.formMethod})};let s=()=>({path:r,error:mr(400,{type:"invalid-body"})}),o=n.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),l=X1(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!hn(i))return s();let m=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((v,x)=>{let[y,_]=x;return""+v+y+"="+_+`
`},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:m}}}else if(n.formEncType==="application/json"){if(!hn(i))return s();try{let m=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:l,formEncType:n.formEncType,formData:void 0,json:m,text:void 0}}}catch{return s()}}}et(typeof FormData=="function","FormData is not available in this environment");let c,u;if(n.formData)c=em(n.formData),u=n.formData;else if(n.body instanceof FormData)c=em(n.body),u=n.body;else if(n.body instanceof URLSearchParams)c=n.body,u=d0(c);else if(n.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(n.body),u=d0(c)}catch{return s()}let d={formMethod:i,formAction:l,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(hn(d.formMethod))return{path:r,submission:d};let f=Rs(r);return t&&f.search&&Mg(f.search)&&c.append("index",""),f.search="?"+c,{path:ni(f),submission:d}}function pP(e,t){let r=e;if(t){let n=e.findIndex(s=>s.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function a0(e,t,r,n,s,o,i,l,c,u,d,f,m,v,x,y){let _=y?Lr(y[1])?y[1].error:y[1].data:void 0,p=e.createURL(t.location),h=e.createURL(s),w=y&&Lr(y[1])?y[0]:void 0,C=w?pP(r,w):r,j=y?y[1].statusCode:void 0,E=i&&j&&j>=400,R=C.filter((A,L)=>{let{route:q}=A;if(q.lazy)return!0;if(q.loader==null)return!1;if(o)return typeof q.loader!="function"||q.loader.hydrate?!0:t.loaderData[q.id]===void 0&&(!t.errors||t.errors[q.id]===void 0);if(mP(t.loaderData,t.matches[L],A)||c.some(b=>b===A.route.id))return!0;let N=t.matches[L],F=A;return l0(A,Pt({currentUrl:p,currentParams:N.params,nextUrl:h,nextParams:F.params},n,{actionResult:_,actionStatus:j,defaultShouldRevalidate:E?!1:l||p.pathname+p.search===h.pathname+h.search||p.search!==h.search||Z1(N,F)}))}),P=[];return f.forEach((A,L)=>{if(o||!r.some(V=>V.route.id===A.routeId)||d.has(L))return;let q=Mo(v,A.path,x);if(!q){P.push({key:L,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(L),F=al(q,A.path),b=!1;m.has(L)?b=!1:u.includes(L)?b=!0:N&&N.state!=="idle"&&N.data===void 0?b=l:b=l0(F,Pt({currentUrl:p,currentParams:t.matches[t.matches.length-1].params,nextUrl:h,nextParams:r[r.length-1].params},n,{actionResult:_,actionStatus:j,defaultShouldRevalidate:E?!1:l})),b&&P.push({key:L,routeId:A.routeId,path:A.path,matches:q,match:F,controller:new AbortController})}),[R,P]}function mP(e,t,r){let n=!t||r.route.id!==t.route.id,s=e[r.route.id]===void 0;return n||s}function Z1(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function l0(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function gP(e,t,r,n,s,o,i,l){let c=[t,...r.map(u=>u.route.id)].join("-");try{let u=i.get(c);u||(u=e({path:t,matches:r,patch:(d,f)=>{l.aborted||q1(d,f,n,s,o)}}),i.set(c,u)),u&&kP(u)&&await u}finally{i.delete(c)}}function q1(e,t,r,n,s){if(e){var o;let i=n[e];et(i,"No route found to patch children into: routeId = "+e);let l=Gl(t,s,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],n);i.children?i.children.push(...l):i.children=l}else{let i=Gl(t,s,["patch",String(r.length||"0")],n);r.push(...i)}}async function c0(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let s=r[e.id];et(s,"No route found in manifest");let o={};for(let i in n){let c=s[i]!==void 0&&i!=="hasErrorBoundary";ri(!c,'Route "'+s.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!c&&!zR.has(i)&&(o[i]=n[i])}Object.assign(s,o),Object.assign(s,Pt({},t(s),{lazy:void 0}))}function vP(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function yP(e,t,r,n,s,o,i,l){let c=n.reduce((f,m)=>f.add(m.route.id),new Set),u=new Set,d=await e({matches:s.map(f=>{let m=c.has(f.route.id);return Pt({},f,{shouldLoad:m,resolve:x=>(u.add(f.route.id),m?xP(t,r,f,o,i,x,l):Promise.resolve({type:xt.data,result:void 0}))})}),request:r,params:s[0].params,context:l});return s.forEach(f=>et(u.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((f,m)=>c.has(s[m].route.id))}async function xP(e,t,r,n,s,o,i){let l,c,u=d=>{let f,m=new Promise((y,_)=>f=_);c=()=>f(),t.signal.addEventListener("abort",c);let v=y=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):d({request:t,params:r.params,context:i},...y!==void 0?[y]:[]),x;return o?x=o(y=>v(y)):x=(async()=>{try{return{type:"data",result:await v()}}catch(y){return{type:"error",result:y}}})(),Promise.race([x,m])};try{let d=r.route[e];if(r.route.lazy)if(d){let f,[m]=await Promise.all([u(d).catch(v=>{f=v}),c0(r.route,s,n)]);if(f!==void 0)throw f;l=m}else if(await c0(r.route,s,n),d=r.route[e],d)l=await u(d);else if(e==="action"){let f=new URL(t.url),m=f.pathname+f.search;throw mr(405,{method:t.method,pathname:m,routeId:r.route.id})}else return{type:xt.data,result:void 0};else if(d)l=await u(d);else{let f=new URL(t.url),m=f.pathname+f.search;throw mr(404,{pathname:m})}et(l.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:xt.error,result:d}}finally{c&&t.signal.removeEventListener("abort",c)}return l}async function wP(e){let{result:t,type:r,status:n}=e;if(Q1(t)){let i;try{let l=t.headers.get("Content-Type");l&&/\bapplication\/json\b/.test(l)?t.body==null?i=null:i=await t.json():i=await t.text()}catch(l){return{type:xt.error,error:l}}return r===xt.error?{type:xt.error,error:new Dg(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:xt.data,data:i,statusCode:t.status,headers:t.headers}}if(r===xt.error)return{type:xt.error,error:t,statusCode:vf(t)?t.status:n};if(jP(t)){var s,o;return{type:xt.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:xt.data,data:t,statusCode:n}}function _P(e,t,r,n,s,o){let i=e.headers.get("Location");if(et(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Og.test(i)){let l=n.slice(0,n.findIndex(c=>c.route.id===r)+1);i=Jp(new URL(t.url),l,s,!0,i,o),e.headers.set("Location",i)}return e}function u0(e,t,r){if(Og.test(e)){let n=e,s=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=Ea(s.pathname,r)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function bi(e,t,r,n){let s=e.createURL(X1(t)).toString(),o={signal:r};if(n&&hn(n.formMethod)){let{formMethod:i,formEncType:l}=n;o.method=i.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(n.json)):l==="text/plain"?o.body=n.text:l==="application/x-www-form-urlencoded"&&n.formData?o.body=em(n.formData):o.body=n.formData}return new Request(s,o)}function em(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function d0(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function bP(e,t,r,n,s,o){let i={},l=null,c,u=!1,d={},f=n&&Lr(n[1])?n[1].error:void 0;return r.forEach((m,v)=>{let x=t[v].route.id;if(et(!Vo(m),"Cannot handle redirect results in processLoaderData"),Lr(m)){let y=m.error;f!==void 0&&(y=f,f=void 0),l=l||{};{let _=Vi(e,x);l[_.route.id]==null&&(l[_.route.id]=y)}i[x]=void 0,u||(u=!0,c=vf(m.error)?m.error.status:500),m.headers&&(d[x]=m.headers)}else $o(m)?(s.set(x,m.deferredData),i[x]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!u&&(c=m.statusCode),m.headers&&(d[x]=m.headers)):(i[x]=m.data,m.statusCode&&m.statusCode!==200&&!u&&(c=m.statusCode),m.headers&&(d[x]=m.headers))}),f!==void 0&&n&&(l={[n[0]]:f},i[n[0]]=void 0),{loaderData:i,errors:l,statusCode:c||200,loaderHeaders:d}}function f0(e,t,r,n,s,o,i,l){let{loaderData:c,errors:u}=bP(t,r,n,s,l);for(let d=0;d<o.length;d++){let{key:f,match:m,controller:v}=o[d];et(i!==void 0&&i[d]!==void 0,"Did not find corresponding fetcher result");let x=i[d];if(!(v&&v.signal.aborted))if(Lr(x)){let y=Vi(e.matches,m==null?void 0:m.route.id);u&&u[y.route.id]||(u=Pt({},u,{[y.route.id]:x.error})),e.fetchers.delete(f)}else if(Vo(x))et(!1,"Unhandled fetcher revalidation redirect");else if($o(x))et(!1,"Unhandled fetcher deferred data");else{let y=Hs(x.data);e.fetchers.set(f,y)}}return{loaderData:c,errors:u}}function h0(e,t,r,n){let s=Pt({},t);for(let o of r){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(s[i]=t[i]):e[i]!==void 0&&o.route.loader&&(s[i]=e[i]),n&&n.hasOwnProperty(i))break}return s}function p0(e){return e?Lr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Vi(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function m0(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function mr(e,t){let{pathname:r,routeId:n,method:s,type:o,message:i}=t===void 0?{}:t,l="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(l="Bad Request",o==="route-discovery"?c='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error:
`+i):s&&r&&n?c="You made a "+s+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?c="defer() is not supported in actions":o==="invalid-body"&&(c="Unable to encode submission body")):e===403?(l="Forbidden",c='Route "'+n+'" does not match URL "'+r+'"'):e===404?(l="Not Found",c='No route matches URL "'+r+'"'):e===405&&(l="Method Not Allowed",s&&r&&n?c="You made a "+s.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":s&&(c='Invalid request method "'+s.toUpperCase()+'"')),new Dg(e||500,l,new Error(c),!0)}function g0(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Vo(r))return{result:r,idx:t}}}function X1(e){let t=typeof e=="string"?Rs(e):e;return ni(Pt({},t,{hash:""}))}function SP(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function kP(e){return typeof e=="object"&&e!=null&&"then"in e}function CP(e){return Q1(e.result)&&lP.has(e.result.status)}function $o(e){return e.type===xt.deferred}function Lr(e){return e.type===xt.error}function Vo(e){return(e&&e.type)===xt.redirect}function jP(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Q1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function EP(e){return aP.has(e.toLowerCase())}function hn(e){return oP.has(e.toLowerCase())}async function v0(e,t,r,n,s,o){for(let i=0;i<r.length;i++){let l=r[i],c=t[i];if(!c)continue;let u=e.find(f=>f.route.id===c.route.id),d=u!=null&&!Z1(u,c)&&(o&&o[c.route.id])!==void 0;if($o(l)&&(s||d)){let f=n[i];et(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await J1(l,f,s).then(m=>{m&&(r[i]=m||r[i])})}}}async function J1(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:xt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:xt.error,error:s}}return{type:xt.data,data:e.deferredData.data}}}function Mg(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function al(e,t){let r=typeof t=="string"?Rs(t).search:t.search;if(e[e.length-1].route.index&&Mg(r||""))return e[e.length-1];let n=Y1(e);return n[n.length-1]}function y0(e){let{formMethod:t,formAction:r,formEncType:n,text:s,formData:o,json:i}=e;if(!(!t||!r||!n)){if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function Fh(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function NP(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function qa(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function TP(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Hs(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function RP(e,t){try{let r=e.sessionStorage.getItem(G1);if(r){let n=JSON.parse(r);for(let[s,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function PP(e,t){if(t.size>0){let r={};for(let[n,s]of t)r[n]=[...s];try{e.sessionStorage.setItem(G1,JSON.stringify(r))}catch(n){ri(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
* React Router v6.25.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function _d(){return _d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_d.apply(this,arguments)}const yf=g.createContext(null),eb=g.createContext(null),To=g.createContext(null),Ig=g.createContext(null),Ps=g.createContext({outlet:null,matches:[],isDataRoute:!1}),tb=g.createContext(null);function AP(e,t){let{relative:r}=t===void 0?{}:t;Na()||et(!1);let{basename:n,navigator:s}=g.useContext(To),{hash:o,pathname:i,search:l}=nb(e,{relative:r}),c=i;return n!=="/"&&(c=i==="/"?n:ms([n,i])),s.createHref({pathname:c,search:l,hash:o})}function Na(){return g.useContext(Ig)!=null}function Nn(){return Na()||et(!1),g.useContext(Ig).location}function rb(e){g.useContext(To).static||g.useLayoutEffect(e)}function Pr(){let{isDataRoute:e}=g.useContext(Ps);return e?YP():DP()}function DP(){Na()||et(!1);let e=g.useContext(yf),{basename:t,future:r,navigator:n}=g.useContext(To),{matches:s}=g.useContext(Ps),{pathname:o}=Nn(),i=JSON.stringify(mf(s,r.v7_relativeSplatPath)),l=g.useRef(!1);return rb(()=>{l.current=!0}),g.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){n.go(u);return}let f=gf(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:ms([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,i,o,e])}const OP=g.createContext(null);function MP(e){let t=g.useContext(Ps).outlet;return t&&g.createElement(OP.Provider,{value:e},t)}function nb(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=g.useContext(To),{matches:s}=g.useContext(Ps),{pathname:o}=Nn(),i=JSON.stringify(mf(s,n.v7_relativeSplatPath));return g.useMemo(()=>gf(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function IP(e,t,r,n){Na()||et(!1);let{navigator:s}=g.useContext(To),{matches:o}=g.useContext(Ps),i=o[o.length-1],l=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let u=Nn(),d;d=u;let f=d.pathname||"/",m=f;if(c!=="/"){let y=c.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let v=Mo(e,{pathname:m});return $P(v&&v.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:ms([c,s.encodeLocation?s.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:ms([c,s.encodeLocation?s.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,r,n)}function LP(){let e=HP(),t=vf(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:s},r):null,null)}const FP=g.createElement(LP,null);class zP extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?g.createElement(Ps.Provider,{value:this.props.routeContext},g.createElement(tb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function UP(e){let{routeContext:t,match:r,children:n}=e,s=g.useContext(yf);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),g.createElement(Ps.Provider,{value:t},n)}function $P(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let i=e,l=(s=r)==null?void 0:s.errors;if(l!=null){let d=i.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||et(!1),i=i.slice(0,Math.min(i.length,d+1))}let c=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<i.length;d++){let f=i[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:m,errors:v}=r,x=f.route.loader&&m[f.route.id]===void 0&&(!v||v[f.route.id]===void 0);if(f.route.lazy||x){c=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,f,m)=>{let v,x=!1,y=null,_=null;r&&(v=l&&f.route.id?l[f.route.id]:void 0,y=f.route.errorElement||FP,c&&(u<0&&m===0?(KP("route-fallback"),x=!0,_=null):u===m&&(x=!0,_=f.route.hydrateFallbackElement||null)));let p=t.concat(i.slice(0,m+1)),h=()=>{let w;return v?w=y:x?w=_:f.route.Component?w=g.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,g.createElement(UP,{match:f,routeContext:{outlet:d,matches:p,isDataRoute:r!=null},children:w})};return r&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?g.createElement(zP,{location:r.location,revalidation:r.revalidation,component:y,error:v,children:h(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):h()},null)}var sb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(sb||{}),bd=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(bd||{});function VP(e){let t=g.useContext(yf);return t||et(!1),t}function BP(e){let t=g.useContext(eb);return t||et(!1),t}function WP(e){let t=g.useContext(Ps);return t||et(!1),t}function ob(e){let t=WP(),r=t.matches[t.matches.length-1];return r.route.id||et(!1),r.route.id}function HP(){var e;let t=g.useContext(tb),r=BP(bd.UseRouteError),n=ob(bd.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function YP(){let{router:e}=VP(sb.UseNavigateStable),t=ob(bd.UseNavigateStable),r=g.useRef(!1);return rb(()=>{r.current=!0}),g.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,_d({fromRouteId:t},o)))},[e,t])}const x0={};function KP(e,t,r){x0[e]||(x0[e]=!0)}function ib(e){let{to:t,replace:r,state:n,relative:s}=e;Na()||et(!1);let{future:o,static:i}=g.useContext(To),{matches:l}=g.useContext(Ps),{pathname:c}=Nn(),u=Pr(),d=gf(t,mf(l,o.v7_relativeSplatPath),c,s==="path"),f=JSON.stringify(d);return g.useEffect(()=>u(JSON.parse(f),{replace:r,state:n,relative:s}),[u,f,s,r,n]),null}function Lg(e){return MP(e.context)}function GP(e){let{basename:t="/",children:r=null,location:n,navigationType:s=Vt.Pop,navigator:o,static:i=!1,future:l}=e;Na()&&et(!1);let c=t.replace(/^\/*/,"/"),u=g.useMemo(()=>({basename:c,navigator:o,static:i,future:_d({v7_relativeSplatPath:!1},l)}),[c,l,o,i]);typeof n=="string"&&(n=Rs(n));let{pathname:d="/",search:f="",hash:m="",state:v=null,key:x="default"}=n,y=g.useMemo(()=>{let _=Ea(d,c);return _==null?null:{location:{pathname:_,search:f,hash:m,state:v,key:x},navigationType:s}},[c,d,f,m,v,x,s]);return y==null?null:g.createElement(To.Provider,{value:u},g.createElement(Ig.Provider,{children:r,value:y}))}new Promise(()=>{});function ZP(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:g.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:g.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:g.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
* React Router DOM v6.25.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Zl(){return Zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zl.apply(this,arguments)}function qP(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function XP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function QP(e,t){return e.button===0&&(!t||t==="_self")&&!XP(e)}function tm(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function JP(e,t){let r=tm(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}const eA=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],tA="6";try{window.__reactRouterVersion=tA}catch{}function rA(e,t){return fP({basename:void 0,future:Zl({},void 0,{v7_prependBasename:!0}),history:IR({window:void 0}),hydrationData:nA(),routes:e,mapRouteProperties:ZP,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function nA(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Zl({},t,{errors:sA(t.errors)})),t}function sA(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,s]of t)if(s&&s.__type==="RouteErrorResponse")r[n]=new Dg(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let o=window[s.__subType];if(typeof o=="function")try{let i=new o(s.message);i.stack="",r[n]=i}catch{}}if(r[n]==null){let o=new Error(s.message);o.stack="",r[n]=o}}else r[n]=s;return r}const oA=g.createContext({isTransitioning:!1}),iA=g.createContext(new Map),aA="startTransition",w0=Uw[aA],lA="flushSync",_0=MR[lA];function cA(e){w0?w0(e):e()}function Xa(e){_0?_0(e):e()}class uA{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function dA(e){let{fallbackElement:t,router:r,future:n}=e,[s,o]=g.useState(r.state),[i,l]=g.useState(),[c,u]=g.useState({isTransitioning:!1}),[d,f]=g.useState(),[m,v]=g.useState(),[x,y]=g.useState(),_=g.useRef(new Map),{v7_startTransition:p}=n||{},h=g.useCallback(P=>{p?cA(P):P()},[p]),w=g.useCallback((P,A)=>{let{deletedFetchers:L,unstable_flushSync:q,unstable_viewTransitionOpts:N}=A;L.forEach(b=>_.current.delete(b)),P.fetchers.forEach((b,V)=>{b.data!==void 0&&_.current.set(V,b.data)});let F=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!N||F){q?Xa(()=>o(P)):h(()=>o(P));return}if(q){Xa(()=>{m&&(d&&d.resolve(),m.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let b=r.window.document.startViewTransition(()=>{Xa(()=>o(P))});b.finished.finally(()=>{Xa(()=>{f(void 0),v(void 0),l(void 0),u({isTransitioning:!1})})}),Xa(()=>v(b));return}m?(d&&d.resolve(),m.skipTransition(),y({state:P,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(l(P),u({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[r.window,m,d,_,h]);g.useLayoutEffect(()=>r.subscribe(w),[r,w]),g.useEffect(()=>{c.isTransitioning&&!c.flushSync&&f(new uA)},[c]),g.useEffect(()=>{if(d&&i&&r.window){let P=i,A=d.promise,L=r.window.document.startViewTransition(async()=>{h(()=>o(P)),await A});L.finished.finally(()=>{f(void 0),v(void 0),l(void 0),u({isTransitioning:!1})}),v(L)}},[h,i,d,r.window]),g.useEffect(()=>{d&&i&&s.location.key===i.location.key&&d.resolve()},[d,m,s.location,i]),g.useEffect(()=>{!c.isTransitioning&&x&&(l(x.state),u({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),y(void 0))},[c.isTransitioning,x]),g.useEffect(()=>{},[]);let C=g.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:P=>r.navigate(P),push:(P,A,L)=>r.navigate(P,{state:A,preventScrollReset:L==null?void 0:L.preventScrollReset}),replace:(P,A,L)=>r.navigate(P,{replace:!0,state:A,preventScrollReset:L==null?void 0:L.preventScrollReset})}),[r]),j=r.basename||"/",E=g.useMemo(()=>({router:r,navigator:C,static:!1,basename:j}),[r,C,j]),R=g.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return g.createElement(g.Fragment,null,g.createElement(yf.Provider,{value:E},g.createElement(eb.Provider,{value:s},g.createElement(iA.Provider,{value:_.current},g.createElement(oA.Provider,{value:c},g.createElement(GP,{basename:j,location:s.location,navigationType:s.historyAction,navigator:C,future:R},s.initialized||r.future.v7_partialHydration?g.createElement(fA,{routes:r.routes,future:r.future,state:s}):t))))),null)}const fA=g.memo(hA);function hA(e){let{routes:t,future:r,state:n}=e;return IP(t,void 0,n,r)}const pA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gr=g.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:o,replace:i,state:l,target:c,to:u,preventScrollReset:d,unstable_viewTransition:f}=t,m=qP(t,eA),{basename:v}=g.useContext(To),x,y=!1;if(typeof u=="string"&&mA.test(u)&&(x=u,pA))try{let w=new URL(window.location.href),C=u.startsWith("//")?new URL(w.protocol+u):new URL(u),j=Ea(C.pathname,v);C.origin===w.origin&&j!=null?u=j+C.search+C.hash:y=!0}catch{}let _=AP(u,{relative:s}),p=gA(u,{replace:i,state:l,target:c,preventScrollReset:d,relative:s,unstable_viewTransition:f});function h(w){n&&n(w),w.defaultPrevented||p(w)}return g.createElement("a",Zl({},m,{href:x||_,onClick:y||o?n:h,ref:r,target:c}))});var b0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(b0||(b0={}));var S0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(S0||(S0={}));function gA(e,t){let{target:r,replace:n,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:l}=t===void 0?{}:t,c=Pr(),u=Nn(),d=nb(e,{relative:i});return g.useCallback(f=>{if(QP(f,r)){f.preventDefault();let m=n!==void 0?n:ni(u)===ni(d);c(e,{replace:m,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:l})}},[u,c,d,n,s,r,e,o,i,l])}function vA(e){let t=g.useRef(tm(e)),r=g.useRef(!1),n=Nn(),s=g.useMemo(()=>JP(n.search,r.current?null:t.current),[n.search]),o=Pr(),i=g.useCallback((l,c)=>{const u=tm(typeof l=="function"?l(s):l);r.current=!0,o("?"+u,c)},[o,s]);return[s,i]}/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ab=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var xA={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wA=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:i,...l},c)=>g.createElement("svg",{ref:c,...xA,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:ab("lucide",s),...l},[...i.map(([u,d])=>g.createElement(u,d)),...Array.isArray(o)?o:[o]]));/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ht=(e,t)=>{const r=g.forwardRef(({className:n,...s},o)=>g.createElement(wA,{ref:o,iconNode:t,className:ab(`lucide-${yA(e)}`,n),...s}));return r.displayName=`${e}`,r};/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _A=ht("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bA=ht("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const SA=ht("CalendarX2",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m17 22 5-5",key:"1k6ppv"}],["path",{d:"m17 17 5 5",key:"p7ous7"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lb=ht("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fg=ht("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kA=ht("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const CA=ht("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jA=ht("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const EA=ht("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const k0=ht("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cb=ht("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rm=ht("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const NA=ht("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const C0=ht("Group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const j0=ht("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const E0=ht("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const TA=ht("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const RA=ht("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const PA=ht("LoaderPinwheel",[["path",{d:"M2 12c0-2.8 2.2-5 5-5s5 2.2 5 5 2.2 5 5 5 5-2.2 5-5",key:"1cg5zf"}],["path",{d:"M7 20.7a1 1 0 1 1 5-8.7 1 1 0 1 0 5-8.6",key:"1gnrpi"}],["path",{d:"M7 3.3a1 1 0 1 1 5 8.6 1 1 0 1 0 5 8.6",key:"u9yy5q"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const AA=ht("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const DA=ht("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const OA=ht("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Uu=ht("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const N0=ht("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const MA=ht("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ub=ht("Smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const IA=ht("SquareSigma",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M16 8.9V7H8l4 5-4 5h8v-1.9",key:"9nih0i"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const LA=ht("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const FA=ht("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zg=ht("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function zA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function xf(...e){return t=>e.forEach(r=>zA(r,t))}function Ke(...e){return g.useCallback(xf(...e),e)}var bs=g.forwardRef((e,t)=>{const{children:r,...n}=e,s=g.Children.toArray(r),o=s.find(UA);if(o){const i=o.props.children,l=s.map(c=>c===o?g.Children.count(i)>1?g.Children.only(null):g.isValidElement(i)?i.props.children:null:c);return a.jsx(nm,{...n,ref:t,children:g.isValidElement(i)?g.cloneElement(i,void 0,l):null})}return a.jsx(nm,{...n,ref:t,children:r})});bs.displayName="Slot";var nm=g.forwardRef((e,t)=>{const{children:r,...n}=e;if(g.isValidElement(r)){const s=VA(r);return g.cloneElement(r,{...$A(n,r.props),ref:t?xf(t,s):s})}return g.Children.count(r)>1?g.Children.only(null):null});nm.displayName="SlotClone";var Ug=({children:e})=>a.jsx(a.Fragment,{children:e});function UA(e){return g.isValidElement(e)&&e.type===Ug}function $A(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...l)=>{o(...l),s(...l)}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function VA(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function db(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=db(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function BA(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=db(e))&&(n&&(n+=" "),n+=t);return n}const T0=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,R0=BA,Sc=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return R0(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const d=r==null?void 0:r[u],f=o==null?void 0:o[u];if(d===null)return null;const m=T0(d)||T0(f);return s[u][m]}),l=r&&Object.entries(r).reduce((u,d)=>{let[f,m]=d;return m===void 0||(u[f]=m),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:f,className:m,...v}=d;return Object.entries(v).every(x=>{let[y,_]=x;return Array.isArray(_)?_.includes({...o,...l}[y]):{...o,...l}[y]===_})?[...u,f,m]:u},[]);return R0(e,i,c,r==null?void 0:r.class,r==null?void 0:r.className)};function fb(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=fb(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function WA(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=fb(e))&&(n&&(n+=" "),n+=t);return n}const $g="-";function HA(e){const t=KA(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;function s(i){const l=i.split($g);return l[0]===""&&l.length!==1&&l.shift(),hb(l,t)||YA(i)}function o(i,l){const c=r[i]||[];return l&&n[i]?[...c,...n[i]]:c}return{getClassGroupId:s,getConflictingClassGroupIds:o}}function hb(e,t){var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?hb(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join($g);return(i=t.validators.find(({validator:l})=>l(o)))==null?void 0:i.classGroupId}const P0=/^\[(.+)\]$/;function YA(e){if(P0.test(e)){const t=P0.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function KA(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return ZA(Object.entries(e.classGroups),r).forEach(([o,i])=>{sm(i,n,o,t)}),n}function sm(e,t,r,n){e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:A0(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(GA(s)){sm(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,i])=>{sm(i,A0(t,o),r,n)})})}function A0(e,t){let r=e;return t.split($g).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function GA(e){return e.isThemeGetter}function ZA(e,t){return t?e.map(([r,n])=>{const s=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,l])=>[t+i,l])):o);return[r,s]}):e}function qA(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function s(o,i){r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)}return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return s(o,i),i},set(o,i){r.has(o)?r.set(o,i):s(o,i)}}}const pb="!";function XA(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],o=t.length;function i(l){const c=[];let u=0,d=0,f;for(let _=0;_<l.length;_++){let p=l[_];if(u===0){if(p===s&&(n||l.slice(_,_+o)===t)){c.push(l.slice(d,_)),d=_+o;continue}if(p==="/"){f=_;continue}}p==="["?u++:p==="]"&&u--}const m=c.length===0?l:l.substring(d),v=m.startsWith(pb),x=v?m.substring(1):m,y=f&&f>d?f-d:void 0;return{modifiers:c,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:y}}return r?function(c){return r({className:c,parseClassName:i})}:i}function QA(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t}function JA(e){return{cache:qA(e.cacheSize),parseClassName:XA(e),...HA(e)}}const eD=/\s+/;function tD(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,o=new Set;return e.trim().split(eD).map(i=>{const{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=r(i);let f=!!d,m=n(f?u.substring(0,d):u);if(!m){if(!f)return{isTailwindClass:!1,originalClassName:i};if(m=n(u),!m)return{isTailwindClass:!1,originalClassName:i};f=!1}const v=QA(l).join(":");return{isTailwindClass:!0,modifierId:c?v+pb:v,classGroupId:m,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:l,classGroupId:c,hasPostfixModifier:u}=i,d=l+c;return o.has(d)?!1:(o.add(d),s(c,u).forEach(f=>o.add(l+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function rD(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=mb(t))&&(n&&(n+=" "),n+=r);return n}function mb(e){if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=mb(e[n]))&&(r&&(r+=" "),r+=t);return r}function nD(e,...t){let r,n,s,o=i;function i(c){const u=t.reduce((d,f)=>f(d),e());return r=JA(u),n=r.cache.get,s=r.cache.set,o=l,l(c)}function l(c){const u=n(c);if(u)return u;const d=tD(c,r);return s(c,d),d}return function(){return o(rD.apply(null,arguments))}}function _t(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const gb=/^\[(?:([a-z-]+):)?(.+)\]$/i,sD=/^\d+\/\d+$/,oD=new Set(["px","full","screen"]),iD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aD=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,lD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,cD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,uD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function rs(e){return Bo(e)||oD.has(e)||sD.test(e)}function Bs(e){return Ta(e,"length",yD)}function Bo(e){return!!e&&!Number.isNaN(Number(e))}function hu(e){return Ta(e,"number",Bo)}function Qa(e){return!!e&&Number.isInteger(Number(e))}function dD(e){return e.endsWith("%")&&Bo(e.slice(0,-1))}function qe(e){return gb.test(e)}function Ws(e){return iD.test(e)}const fD=new Set(["length","size","percentage"]);function hD(e){return Ta(e,fD,vb)}function pD(e){return Ta(e,"position",vb)}const mD=new Set(["image","url"]);function gD(e){return Ta(e,mD,wD)}function vD(e){return Ta(e,"",xD)}function Ja(){return!0}function Ta(e,t,r){const n=gb.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function yD(e){return aD.test(e)&&!lD.test(e)}function vb(){return!1}function xD(e){return cD.test(e)}function wD(e){return uD.test(e)}function _D(){const e=_t("colors"),t=_t("spacing"),r=_t("blur"),n=_t("brightness"),s=_t("borderColor"),o=_t("borderRadius"),i=_t("borderSpacing"),l=_t("borderWidth"),c=_t("contrast"),u=_t("grayscale"),d=_t("hueRotate"),f=_t("invert"),m=_t("gap"),v=_t("gradientColorStops"),x=_t("gradientColorStopPositions"),y=_t("inset"),_=_t("margin"),p=_t("opacity"),h=_t("padding"),w=_t("saturate"),C=_t("scale"),j=_t("sepia"),E=_t("skew"),R=_t("space"),P=_t("translate"),A=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",qe,t],N=()=>[qe,t],F=()=>["",rs,Bs],b=()=>["auto",Bo,qe],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",qe],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[Bo,hu],$=()=>[Bo,qe];return{cacheSize:500,separator:":",theme:{colors:[Ja],spacing:[rs,Bs],blur:["none","",Ws,qe],brightness:z(),borderColor:[e],borderRadius:["none","","full",Ws,qe],borderSpacing:N(),borderWidth:F(),contrast:z(),grayscale:I(),hueRotate:$(),invert:I(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[dD,Bs],inset:q(),margin:q(),opacity:z(),padding:N(),saturate:z(),scale:z(),sepia:I(),skew:$(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",qe]}],container:["container"],columns:[{columns:[Ws]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...V(),qe]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Qa,qe]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qe]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",Qa,qe]}],"grid-cols":[{"grid-cols":[Ja]}],"col-start-end":[{col:["auto",{span:["full",Qa,qe]},qe]}],"col-start":[{"col-start":b()}],"col-end":[{"col-end":b()}],"grid-rows":[{"grid-rows":[Ja]}],"row-start-end":[{row:["auto",{span:[Qa,qe]},qe]}],"row-start":[{"row-start":b()}],"row-end":[{"row-end":b()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qe]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...K()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...K(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...K(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[h]}],px:[{px:[h]}],py:[{py:[h]}],ps:[{ps:[h]}],pe:[{pe:[h]}],pt:[{pt:[h]}],pr:[{pr:[h]}],pb:[{pb:[h]}],pl:[{pl:[h]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qe,t]}],"min-w":[{"min-w":[qe,t,"min","max","fit"]}],"max-w":[{"max-w":[qe,t,"none","full","min","max","fit","prose",{screen:[Ws]},Ws]}],h:[{h:[qe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ws,Bs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",hu]}],"font-family":[{font:[Ja]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",qe]}],"line-clamp":[{"line-clamp":["none",Bo,hu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",rs,qe]}],"list-image":[{"list-image":["none",qe]}],"list-style-type":[{list:["none","disc","decimal",qe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",rs,Bs]}],"underline-offset":[{"underline-offset":["auto",rs,qe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...V(),pD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",hD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},gD]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...te(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[p]}],"divide-style":[{divide:te()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...te()]}],"outline-offset":[{"outline-offset":[rs,qe]}],"outline-w":[{outline:[rs,Bs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[rs,Bs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ws,vD]}],"shadow-color":[{shadow:[Ja]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Ws,qe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",qe]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",qe]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",qe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Qa,qe]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",qe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[rs,Bs,hu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const bD=nD(_D);function oe(...e){return bD(WA(e))}const wf=Sc("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),He=g.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const i=n?bs:"button";return a.jsx(i,{className:oe(wf({variant:t,size:r,className:e})),ref:o,...s})});He.displayName="Button";function ue(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function SD(e,t){const r=g.createContext(t);function n(o){const{children:i,...l}=o,c=g.useMemo(()=>l,Object.values(l));return a.jsx(r.Provider,{value:c,children:i})}function s(o){const i=g.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,s]}function sr(e,t=[]){let r=[];function n(o,i){const l=g.createContext(i),c=r.length;r=[...r,i];function u(f){const{scope:m,children:v,...x}=f,y=(m==null?void 0:m[e][c])||l,_=g.useMemo(()=>x,Object.values(x));return a.jsx(y.Provider,{value:_,children:v})}function d(f,m){const v=(m==null?void 0:m[e][c])||l,x=g.useContext(v);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const s=()=>{const o=r.map(i=>g.createContext(i));return function(l){const c=(l==null?void 0:l[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[n,kD(s,...t)]}function kD(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=n.reduce((l,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...l,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Dt(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Yr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,s]=CD({defaultProp:t,onChange:r}),o=e!==void 0,i=o?e:n,l=Dt(r),c=g.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&l(f)}else s(u)},[o,e,s,l]);return[i,c]}function CD({defaultProp:e,onChange:t}){const r=g.useState(e),[n]=r,s=g.useRef(n),o=Dt(t);return g.useEffect(()=>{s.current!==n&&(o(n),s.current=n)},[n,s,o]),r}var jD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Re=jD.reduce((e,t)=>{const r=g.forwardRef((n,s)=>{const{asChild:o,...i}=n,l=o?bs:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(l,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Vg(e,t){e&&Ts.flushSync(()=>e.dispatchEvent(t))}function kc(e){const t=e+"CollectionProvider",[r,n]=sr(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:x,children:y}=v,_=Be.useRef(null),p=Be.useRef(new Map).current;return a.jsx(s,{scope:x,itemMap:p,collectionRef:_,children:y})};i.displayName=t;const l=e+"CollectionSlot",c=Be.forwardRef((v,x)=>{const{scope:y,children:_}=v,p=o(l,y),h=Ke(x,p.collectionRef);return a.jsx(bs,{ref:h,children:_})});c.displayName=l;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=Be.forwardRef((v,x)=>{const{scope:y,children:_,...p}=v,h=Be.useRef(null),w=Ke(x,h),C=o(u,y);return Be.useEffect(()=>(C.itemMap.set(h,{ref:h,...p}),()=>void C.itemMap.delete(h))),a.jsx(bs,{[d]:"",ref:w,children:_})});f.displayName=u;function m(v){const x=o(e+"CollectionConsumer",v);return Be.useCallback(()=>{const _=x.collectionRef.current;if(!_)return[];const p=Array.from(_.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((C,j)=>p.indexOf(C.ref.current)-p.indexOf(j.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:c,ItemSlot:f},m,n]}var ED=g.createContext(void 0);function di(e){const t=g.useContext(ED);return e||t||"ltr"}function ND(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e);g.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var TD="DismissableLayer",om="dismissableLayer.update",RD="dismissableLayer.pointerDownOutside",PD="dismissableLayer.focusOutside",D0,yb=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ra=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:l,...c}=e,u=g.useContext(yb),[d,f]=g.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=g.useState({}),x=Ke(t,R=>f(R)),y=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=y.indexOf(_),h=d?y.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=h>=p,j=DD(R=>{const P=R.target,A=[...u.branches].some(L=>L.contains(P));!C||A||(s==null||s(R),i==null||i(R),R.defaultPrevented||l==null||l())},m),E=OD(R=>{const P=R.target;[...u.branches].some(L=>L.contains(P))||(o==null||o(R),i==null||i(R),R.defaultPrevented||l==null||l())},m);return ND(R=>{h===u.layers.size-1&&(n==null||n(R),!R.defaultPrevented&&l&&(R.preventDefault(),l()))},m),g.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(D0=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),O0(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=D0)}},[d,m,r,u]),g.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),O0())},[d,u]),g.useEffect(()=>{const R=()=>v({});return document.addEventListener(om,R),()=>document.removeEventListener(om,R)},[]),a.jsx(Re.div,{...c,ref:x,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,j.onPointerDownCapture)})});Ra.displayName=TD;var AD="DismissableLayerBranch",xb=g.forwardRef((e,t)=>{const r=g.useContext(yb),n=g.useRef(null),s=Ke(t,n);return g.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),a.jsx(Re.div,{...e,ref:s})});xb.displayName=AD;function DD(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e),n=g.useRef(!1),s=g.useRef(()=>{});return g.useEffect(()=>{const o=l=>{if(l.target&&!n.current){let c=function(){wb(RD,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function OD(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e),n=g.useRef(!1);return g.useEffect(()=>{const s=o=>{o.target&&!n.current&&wb(PD,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function O0(){const e=new CustomEvent(om);document.dispatchEvent(e)}function wb(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Vg(s,o):s.dispatchEvent(o)}var MD=Ra,ID=xb,zh=0;function Bg(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??M0()),document.body.insertAdjacentElement("beforeend",e[1]??M0()),zh++,()=>{zh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),zh--}},[])}function M0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Uh="focusScope.autoFocusOnMount",$h="focusScope.autoFocusOnUnmount",I0={bubbles:!1,cancelable:!0},LD="FocusScope",_f=g.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[l,c]=g.useState(null),u=Dt(s),d=Dt(o),f=g.useRef(null),m=Ke(t,y=>c(y)),v=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(n){let y=function(w){if(v.paused||!l)return;const C=w.target;l.contains(C)?f.current=C:Ys(f.current,{select:!0})},_=function(w){if(v.paused||!l)return;const C=w.relatedTarget;C!==null&&(l.contains(C)||Ys(f.current,{select:!0}))},p=function(w){if(document.activeElement===document.body)for(const j of w)j.removedNodes.length>0&&Ys(l)};document.addEventListener("focusin",y),document.addEventListener("focusout",_);const h=new MutationObserver(p);return l&&h.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",_),h.disconnect()}}},[n,l,v.paused]),g.useEffect(()=>{if(l){F0.add(v);const y=document.activeElement;if(!l.contains(y)){const p=new CustomEvent(Uh,I0);l.addEventListener(Uh,u),l.dispatchEvent(p),p.defaultPrevented||(FD(BD(_b(l)),{select:!0}),document.activeElement===y&&Ys(l))}return()=>{l.removeEventListener(Uh,u),setTimeout(()=>{const p=new CustomEvent($h,I0);l.addEventListener($h,d),l.dispatchEvent(p),p.defaultPrevented||Ys(y??document.body,{select:!0}),l.removeEventListener($h,d),F0.remove(v)},0)}}},[l,u,d,v]);const x=g.useCallback(y=>{if(!r&&!n||v.paused)return;const _=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,p=document.activeElement;if(_&&p){const h=y.currentTarget,[w,C]=zD(h);w&&C?!y.shiftKey&&p===C?(y.preventDefault(),r&&Ys(w,{select:!0})):y.shiftKey&&p===w&&(y.preventDefault(),r&&Ys(C,{select:!0})):p===h&&y.preventDefault()}},[r,n,v.paused]);return a.jsx(Re.div,{tabIndex:-1,...i,ref:m,onKeyDown:x})});_f.displayName=LD;function FD(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ys(n,{select:t}),document.activeElement!==r)return}function zD(e){const t=_b(e),r=L0(t,e),n=L0(t.reverse(),e);return[r,n]}function _b(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function L0(e,t){for(const r of e)if(!UD(r,{upTo:t}))return r}function UD(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $D(e){return e instanceof HTMLInputElement&&"select"in e}function Ys(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&$D(e)&&t&&e.select()}}var F0=VD();function VD(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=z0(e,t),e.unshift(t)},remove(t){var r;e=z0(e,t),(r=e[0])==null||r.resume()}}}function z0(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function BD(e){return e.filter(t=>t.tagName!=="A")}var Jt=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},WD=Uw.useId||(()=>{}),HD=0;function $r(e){const[t,r]=g.useState(WD());return Jt(()=>{r(n=>n??String(HD++))},[e]),t?`radix-${t}`:""}const YD=["top","right","bottom","left"],Un=Math.min,Fr=Math.max,Sd=Math.round,pu=Math.floor,yo=e=>({x:e,y:e}),KD={left:"right",right:"left",bottom:"top",top:"bottom"},GD={start:"end",end:"start"};function im(e,t,r){return Fr(e,Un(t,r))}function Ss(e,t){return typeof e=="function"?e(t):e}function ks(e){return e.split("-")[0]}function Pa(e){return e.split("-")[1]}function Wg(e){return e==="x"?"y":"x"}function Hg(e){return e==="y"?"height":"width"}function xo(e){return["top","bottom"].includes(ks(e))?"y":"x"}function Yg(e){return Wg(xo(e))}function ZD(e,t,r){r===void 0&&(r=!1);const n=Pa(e),s=Yg(e),o=Hg(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=kd(i)),[i,kd(i)]}function qD(e){const t=kd(e);return[am(e),t,am(t)]}function am(e){return e.replace(/start|end/g,t=>GD[t])}function XD(e,t,r){const n=["left","right"],s=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?s:n:t?n:s;case"left":case"right":return t?o:i;default:return[]}}function QD(e,t,r,n){const s=Pa(e);let o=XD(ks(e),r==="start",n);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(am)))),o}function kd(e){return e.replace(/left|right|bottom|top/g,t=>KD[t])}function JD(e){return{top:0,right:0,bottom:0,left:0,...e}}function bb(e){return typeof e!="number"?JD(e):{top:e,right:e,bottom:e,left:e}}function Cd(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function U0(e,t,r){let{reference:n,floating:s}=e;const o=xo(t),i=Yg(t),l=Hg(i),c=ks(t),u=o==="y",d=n.x+n.width/2-s.width/2,f=n.y+n.height/2-s.height/2,m=n[l]/2-s[l]/2;let v;switch(c){case"top":v={x:d,y:n.y-s.height};break;case"bottom":v={x:d,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:f};break;case"left":v={x:n.x-s.width,y:f};break;default:v={x:n.x,y:n.y}}switch(Pa(t)){case"start":v[i]-=m*(r&&u?-1:1);break;case"end":v[i]+=m*(r&&u?-1:1);break}return v}const eO=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:i}=r,l=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=U0(u,n,c),m=n,v={},x=0;for(let y=0;y<l.length;y++){const{name:_,fn:p}=l[y],{x:h,y:w,data:C,reset:j}=await p({x:d,y:f,initialPlacement:n,placement:m,strategy:s,middlewareData:v,rects:u,platform:i,elements:{reference:e,floating:t}});d=h??d,f=w??f,v={...v,[_]:{...v[_],...C}},j&&x<=50&&(x++,typeof j=="object"&&(j.placement&&(m=j.placement),j.rects&&(u=j.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):j.rects),{x:d,y:f}=U0(u,m,c)),y=-1)}return{x:d,y:f,placement:m,strategy:s,middlewareData:v}};async function ql(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:v=0}=Ss(t,e),x=bb(v),_=l[m?f==="floating"?"reference":"floating":f],p=Cd(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(_)))==null||r?_:_.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),h=f==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),C=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},j=Cd(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:h,offsetParent:w,strategy:c}):h);return{top:(p.top-j.top+x.top)/C.y,bottom:(j.bottom-p.bottom+x.bottom)/C.y,left:(p.left-j.left+x.left)/C.x,right:(j.right-p.right+x.right)/C.x}}const tO=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Ss(e,t)||{};if(u==null)return{};const f=bb(d),m={x:r,y:n},v=Yg(s),x=Hg(v),y=await i.getDimensions(u),_=v==="y",p=_?"top":"left",h=_?"bottom":"right",w=_?"clientHeight":"clientWidth",C=o.reference[x]+o.reference[v]-m[v]-o.floating[x],j=m[v]-o.reference[v],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let R=E?E[w]:0;(!R||!await(i.isElement==null?void 0:i.isElement(E)))&&(R=l.floating[w]||o.floating[x]);const P=C/2-j/2,A=R/2-y[x]/2-1,L=Un(f[p],A),q=Un(f[h],A),N=L,F=R-y[x]-q,b=R/2-y[x]/2+P,V=im(N,b,F),te=!c.arrow&&Pa(s)!=null&&b!==V&&o.reference[x]/2-(b<N?L:q)-y[x]/2<0,B=te?b<N?b-N:b-F:0;return{[v]:m[v]+B,data:{[v]:V,centerOffset:b-V-B,...te&&{alignmentOffset:B}},reset:te}}}),rO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:i,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:y=!0,..._}=Ss(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const p=ks(s),h=xo(l),w=ks(l)===l,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=m||(w||!y?[kd(l)]:qD(l)),E=x!=="none";!m&&E&&j.push(...QD(l,y,x,C));const R=[l,...j],P=await ql(t,_),A=[];let L=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&A.push(P[p]),f){const b=ZD(s,i,C);A.push(P[b[0]],P[b[1]])}if(L=[...L,{placement:s,overflows:A}],!A.every(b=>b<=0)){var q,N;const b=(((q=o.flip)==null?void 0:q.index)||0)+1,V=R[b];if(V)return{data:{index:b,overflows:L},reset:{placement:V}};let te=(N=L.filter(B=>B.overflows[0]<=0).sort((B,K)=>B.overflows[1]-K.overflows[1])[0])==null?void 0:N.placement;if(!te)switch(v){case"bestFit":{var F;const B=(F=L.filter(K=>{if(E){const I=xo(K.placement);return I===h||I==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(I=>I>0).reduce((I,Q)=>I+Q,0)]).sort((K,I)=>K[1]-I[1])[0])==null?void 0:F[0];B&&(te=B);break}case"initialPlacement":te=l;break}if(s!==te)return{reset:{placement:te}}}return{}}}};function $0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function V0(e){return YD.some(t=>e[t]>=0)}const nO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Ss(e,t);switch(n){case"referenceHidden":{const o=await ql(t,{...s,elementContext:"reference"}),i=$0(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:V0(i)}}}case"escaped":{const o=await ql(t,{...s,altBoundary:!0}),i=$0(o,r.floating);return{data:{escapedOffsets:i,escaped:V0(i)}}}default:return{}}}}};async function sO(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=ks(r),l=Pa(r),c=xo(r)==="y",u=["left","top"].includes(i)?-1:1,d=o&&c?-1:1,f=Ss(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&typeof x=="number"&&(v=l==="end"?x*-1:x),c?{x:v*d,y:m*u}:{x:m*u,y:v*d}}const oO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:i,middlewareData:l}=t,c=await sO(t,e);return i===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:i}}}}},iO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:l={fn:_=>{let{x:p,y:h}=_;return{x:p,y:h}}},...c}=Ss(e,t),u={x:r,y:n},d=await ql(t,c),f=xo(ks(s)),m=Wg(f);let v=u[m],x=u[f];if(o){const _=m==="y"?"top":"left",p=m==="y"?"bottom":"right",h=v+d[_],w=v-d[p];v=im(h,v,w)}if(i){const _=f==="y"?"top":"left",p=f==="y"?"bottom":"right",h=x+d[_],w=x-d[p];x=im(h,x,w)}const y=l.fn({...t,[m]:v,[f]:x});return{...y,data:{x:y.x-r,y:y.y-n}}}}},aO=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Ss(e,t),d={x:r,y:n},f=xo(s),m=Wg(f);let v=d[m],x=d[f];const y=Ss(l,t),_=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const w=m==="y"?"height":"width",C=o.reference[m]-o.floating[w]+_.mainAxis,j=o.reference[m]+o.reference[w]-_.mainAxis;v<C?v=C:v>j&&(v=j)}if(u){var p,h;const w=m==="y"?"width":"height",C=["top","left"].includes(ks(s)),j=o.reference[f]-o.floating[w]+(C&&((p=i.offset)==null?void 0:p[f])||0)+(C?0:_.crossAxis),E=o.reference[f]+o.reference[w]+(C?0:((h=i.offset)==null?void 0:h[f])||0)-(C?_.crossAxis:0);x<j?x=j:x>E&&(x=E)}return{[m]:v,[f]:x}}}},lO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:s,elements:o}=t,{apply:i=()=>{},...l}=Ss(e,t),c=await ql(t,l),u=ks(r),d=Pa(r),f=xo(r)==="y",{width:m,height:v}=n.floating;let x,y;u==="top"||u==="bottom"?(x=u,y=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(y=u,x=d==="end"?"top":"bottom");const _=v-c.top-c.bottom,p=m-c.left-c.right,h=Un(v-c[x],_),w=Un(m-c[y],p),C=!t.middlewareData.shift;let j=h,E=w;if(f?E=d||C?Un(w,p):p:j=d||C?Un(h,_):_,C&&!d){const P=Fr(c.left,0),A=Fr(c.right,0),L=Fr(c.top,0),q=Fr(c.bottom,0);f?E=m-2*(P!==0||A!==0?P+A:Fr(c.left,c.right)):j=v-2*(L!==0||q!==0?L+q:Fr(c.top,c.bottom))}await i({...t,availableWidth:E,availableHeight:j});const R=await s.getDimensions(o.floating);return m!==R.width||v!==R.height?{reset:{rects:!0}}:{}}}};function Aa(e){return Sb(e)?(e.nodeName||"").toLowerCase():"#document"}function Vr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function As(e){var t;return(t=(Sb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sb(e){return e instanceof Node||e instanceof Vr(e).Node}function Sn(e){return e instanceof Element||e instanceof Vr(e).Element}function Hn(e){return e instanceof HTMLElement||e instanceof Vr(e).HTMLElement}function B0(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vr(e).ShadowRoot}function Cc(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=kn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(s)}function cO(e){return["table","td","th"].includes(Aa(e))}function bf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Kg(e){const t=Gg(),r=Sn(e)?kn(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function uO(e){let t=wo(e);for(;Hn(t)&&!ga(t);){if(Kg(t))return t;if(bf(t))return null;t=wo(t)}return null}function Gg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ga(e){return["html","body","#document"].includes(Aa(e))}function kn(e){return Vr(e).getComputedStyle(e)}function Sf(e){return Sn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wo(e){if(Aa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||B0(e)&&e.host||As(e);return B0(t)?t.host:t}function kb(e){const t=wo(e);return ga(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hn(t)&&Cc(t)?t:kb(t)}function Xl(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=kb(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=Vr(s);return o?t.concat(i,i.visualViewport||[],Cc(s)?s:[],i.frameElement&&r?Xl(i.frameElement):[]):t.concat(s,Xl(s,[],r))}function Cb(e){const t=kn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Hn(e),o=s?e.offsetWidth:r,i=s?e.offsetHeight:n,l=Sd(r)!==o||Sd(n)!==i;return l&&(r=o,n=i),{width:r,height:n,$:l}}function Zg(e){return Sn(e)?e:e.contextElement}function Ji(e){const t=Zg(e);if(!Hn(t))return yo(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=Cb(t);let i=(o?Sd(r.width):r.width)/n,l=(o?Sd(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const dO=yo(0);function jb(e){const t=Vr(e);return!Gg()||!t.visualViewport?dO:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fO(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Vr(e)?!1:t}function si(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=Zg(e);let i=yo(1);t&&(n?Sn(n)&&(i=Ji(n)):i=Ji(e));const l=fO(o,r,n)?jb(o):yo(0);let c=(s.left+l.x)/i.x,u=(s.top+l.y)/i.y,d=s.width/i.x,f=s.height/i.y;if(o){const m=Vr(o),v=n&&Sn(n)?Vr(n):n;let x=m,y=x.frameElement;for(;y&&n&&v!==x;){const _=Ji(y),p=y.getBoundingClientRect(),h=kn(y),w=p.left+(y.clientLeft+parseFloat(h.paddingLeft))*_.x,C=p.top+(y.clientTop+parseFloat(h.paddingTop))*_.y;c*=_.x,u*=_.y,d*=_.x,f*=_.y,c+=w,u+=C,x=Vr(y),y=x.frameElement}}return Cd({width:d,height:f,x:c,y:u})}function hO(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",i=As(n),l=t?bf(t.floating):!1;if(n===i||l&&o)return r;let c={scrollLeft:0,scrollTop:0},u=yo(1);const d=yo(0),f=Hn(n);if((f||!f&&!o)&&((Aa(n)!=="body"||Cc(i))&&(c=Sf(n)),Hn(n))){const m=si(n);u=Ji(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x,y:r.y*u.y-c.scrollTop*u.y+d.y}}function pO(e){return Array.from(e.getClientRects())}function Eb(e){return si(As(e)).left+Sf(e).scrollLeft}function mO(e){const t=As(e),r=Sf(e),n=e.ownerDocument.body,s=Fr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Fr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Eb(e);const l=-r.scrollTop;return kn(n).direction==="rtl"&&(i+=Fr(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:i,y:l}}function gO(e,t){const r=Vr(e),n=As(e),s=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,l=0,c=0;if(s){o=s.width,i=s.height;const u=Gg();(!u||u&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:o,height:i,x:l,y:c}}function vO(e,t){const r=si(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=Hn(e)?Ji(e):yo(1),i=e.clientWidth*o.x,l=e.clientHeight*o.y,c=s*o.x,u=n*o.y;return{width:i,height:l,x:c,y:u}}function W0(e,t,r){let n;if(t==="viewport")n=gO(e,r);else if(t==="document")n=mO(As(e));else if(Sn(t))n=vO(t,r);else{const s=jb(e);n={...t,x:t.x-s.x,y:t.y-s.y}}return Cd(n)}function Nb(e,t){const r=wo(e);return r===t||!Sn(r)||ga(r)?!1:kn(r).position==="fixed"||Nb(r,t)}function yO(e,t){const r=t.get(e);if(r)return r;let n=Xl(e,[],!1).filter(l=>Sn(l)&&Aa(l)!=="body"),s=null;const o=kn(e).position==="fixed";let i=o?wo(e):e;for(;Sn(i)&&!ga(i);){const l=kn(i),c=Kg(i);!c&&l.position==="fixed"&&(s=null),(o?!c&&!s:!c&&l.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Cc(i)&&!c&&Nb(e,i))?n=n.filter(d=>d!==i):s=l,i=wo(i)}return t.set(e,n),n}function xO(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?bf(t)?[]:yO(t,this._c):[].concat(r),n],l=i[0],c=i.reduce((u,d)=>{const f=W0(t,d,s);return u.top=Fr(f.top,u.top),u.right=Un(f.right,u.right),u.bottom=Un(f.bottom,u.bottom),u.left=Fr(f.left,u.left),u},W0(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function wO(e){const{width:t,height:r}=Cb(e);return{width:t,height:r}}function _O(e,t,r){const n=Hn(t),s=As(t),o=r==="fixed",i=si(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=yo(0);if(n||!n&&!o)if((Aa(t)!=="body"||Cc(s))&&(l=Sf(t)),n){const f=si(t,!0,o,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else s&&(c.x=Eb(s));const u=i.left+l.scrollLeft-c.x,d=i.top+l.scrollTop-c.y;return{x:u,y:d,width:i.width,height:i.height}}function Vh(e){return kn(e).position==="static"}function H0(e,t){return!Hn(e)||kn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Tb(e,t){const r=Vr(e);if(bf(e))return r;if(!Hn(e)){let s=wo(e);for(;s&&!ga(s);){if(Sn(s)&&!Vh(s))return s;s=wo(s)}return r}let n=H0(e,t);for(;n&&cO(n)&&Vh(n);)n=H0(n,t);return n&&ga(n)&&Vh(n)&&!Kg(n)?r:n||uO(e)||r}const bO=async function(e){const t=this.getOffsetParent||Tb,r=this.getDimensions,n=await r(e.floating);return{reference:_O(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function SO(e){return kn(e).direction==="rtl"}const kO={convertOffsetParentRelativeRectToViewportRelativeRect:hO,getDocumentElement:As,getClippingRect:xO,getOffsetParent:Tb,getElementRects:bO,getClientRects:pO,getDimensions:wO,getScale:Ji,isElement:Sn,isRTL:SO};function CO(e,t){let r=null,n;const s=As(e);function o(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const{left:u,top:d,width:f,height:m}=e.getBoundingClientRect();if(l||t(),!f||!m)return;const v=pu(d),x=pu(s.clientWidth-(u+f)),y=pu(s.clientHeight-(d+m)),_=pu(u),h={rootMargin:-v+"px "+-x+"px "+-y+"px "+-_+"px",threshold:Fr(0,Un(1,c))||1};let w=!0;function C(j){const E=j[0].intersectionRatio;if(E!==c){if(!w)return i();E?i(!1,E):n=setTimeout(()=>{i(!1,1e-7)},1e3)}w=!1}try{r=new IntersectionObserver(C,{...h,root:s.ownerDocument})}catch{r=new IntersectionObserver(C,h)}r.observe(e)}return i(!0),o}function jO(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=Zg(e),d=s||o?[...u?Xl(u):[],...Xl(t)]:[];d.forEach(p=>{s&&p.addEventListener("scroll",r,{passive:!0}),o&&p.addEventListener("resize",r)});const f=u&&l?CO(u,r):null;let m=-1,v=null;i&&(v=new ResizeObserver(p=>{let[h]=p;h&&h.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=v)==null||w.observe(t)})),r()}),u&&!c&&v.observe(u),v.observe(t));let x,y=c?si(e):null;c&&_();function _(){const p=si(e);y&&(p.x!==y.x||p.y!==y.y||p.width!==y.width||p.height!==y.height)&&r(),y=p,x=requestAnimationFrame(_)}return r(),()=>{var p;d.forEach(h=>{s&&h.removeEventListener("scroll",r),o&&h.removeEventListener("resize",r)}),f==null||f(),(p=v)==null||p.disconnect(),v=null,c&&cancelAnimationFrame(x)}}const EO=oO,NO=iO,TO=rO,RO=lO,PO=nO,Y0=tO,AO=aO,DO=(e,t,r)=>{const n=new Map,s={platform:kO,...r},o={...s.platform,_c:n};return eO(e,t,{...s,platform:o})};var $u=typeof document<"u"?g.useLayoutEffect:g.useEffect;function jd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!jd(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!jd(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Rb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function K0(e,t){const r=Rb(e);return Math.round(t*r)/r}function G0(e){const t=g.useRef(e);return $u(()=>{t.current=e}),t}function OO(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=g.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=g.useState(n);jd(m,n)||v(n);const[x,y]=g.useState(null),[_,p]=g.useState(null),h=g.useCallback(B=>{B!==E.current&&(E.current=B,y(B))},[]),w=g.useCallback(B=>{B!==R.current&&(R.current=B,p(B))},[]),C=o||x,j=i||_,E=g.useRef(null),R=g.useRef(null),P=g.useRef(d),A=c!=null,L=G0(c),q=G0(s),N=g.useCallback(()=>{if(!E.current||!R.current)return;const B={placement:t,strategy:r,middleware:m};q.current&&(B.platform=q.current),DO(E.current,R.current,B).then(K=>{const I={...K,isPositioned:!0};F.current&&!jd(P.current,I)&&(P.current=I,Ts.flushSync(()=>{f(I)}))})},[m,t,r,q]);$u(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(B=>({...B,isPositioned:!1})))},[u]);const F=g.useRef(!1);$u(()=>(F.current=!0,()=>{F.current=!1}),[]),$u(()=>{if(C&&(E.current=C),j&&(R.current=j),C&&j){if(L.current)return L.current(C,j,N);N()}},[C,j,N,L,A]);const b=g.useMemo(()=>({reference:E,floating:R,setReference:h,setFloating:w}),[h,w]),V=g.useMemo(()=>({reference:C,floating:j}),[C,j]),te=g.useMemo(()=>{const B={position:r,left:0,top:0};if(!V.floating)return B;const K=K0(V.floating,d.x),I=K0(V.floating,d.y);return l?{...B,transform:"translate("+K+"px, "+I+"px)",...Rb(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:K,top:I}},[r,l,V.floating,d.x,d.y]);return g.useMemo(()=>({...d,update:N,refs:b,elements:V,floatingStyles:te}),[d,N,b,V,te])}const MO=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Y0({element:n.current,padding:s}).fn(r):{}:n?Y0({element:n,padding:s}).fn(r):{}}}},IO=(e,t)=>({...EO(e),options:[e,t]}),LO=(e,t)=>({...NO(e),options:[e,t]}),FO=(e,t)=>({...AO(e),options:[e,t]}),zO=(e,t)=>({...TO(e),options:[e,t]}),UO=(e,t)=>({...RO(e),options:[e,t]}),$O=(e,t)=>({...PO(e),options:[e,t]}),VO=(e,t)=>({...MO(e),options:[e,t]});var BO="Arrow",Pb=g.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return a.jsx(Re.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Pb.displayName=BO;var WO=Pb;function qg(e){const[t,r]=g.useState(void 0);return Jt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,l;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;r({width:i,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Xg="Popper",[Ab,Da]=sr(Xg),[HO,Db]=Ab(Xg),Ob=e=>{const{__scopePopper:t,children:r}=e,[n,s]=g.useState(null);return a.jsx(HO,{scope:t,anchor:n,onAnchorChange:s,children:r})};Ob.displayName=Xg;var Mb="PopperAnchor",Ib=g.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=Db(Mb,r),i=g.useRef(null),l=Ke(t,i);return g.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:a.jsx(Re.div,{...s,ref:l})});Ib.displayName=Mb;var Qg="PopperContent",[YO,KO]=Ab(Qg),Lb=g.forwardRef((e,t)=>{var pe,xe,Te,Fe,Me,Pe;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:x,...y}=e,_=Db(Qg,r),[p,h]=g.useState(null),w=Ke(t,nt=>h(nt)),[C,j]=g.useState(null),E=qg(C),R=(E==null?void 0:E.width)??0,P=(E==null?void 0:E.height)??0,A=n+(o!=="center"?"-"+o:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},q=Array.isArray(u)?u:[u],N=q.length>0,F={padding:L,boundary:q.filter(ZO),altBoundary:N},{refs:b,floatingStyles:V,placement:te,isPositioned:B,middlewareData:K}=OO({strategy:"fixed",placement:A,whileElementsMounted:(...nt)=>jO(...nt,{animationFrame:v==="always"}),elements:{reference:_.anchor},middleware:[IO({mainAxis:s+P,alignmentAxis:i}),c&&LO({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?FO():void 0,...F}),c&&zO({...F}),UO({...F,apply:({elements:nt,rects:k,availableWidth:J,availableHeight:G})=>{const{width:D,height:S}=k.reference,T=nt.floating.style;T.setProperty("--radix-popper-available-width",`${J}px`),T.setProperty("--radix-popper-available-height",`${G}px`),T.setProperty("--radix-popper-anchor-width",`${D}px`),T.setProperty("--radix-popper-anchor-height",`${S}px`)}}),C&&VO({element:C,padding:l}),qO({arrowWidth:R,arrowHeight:P}),m&&$O({strategy:"referenceHidden",...F})]}),[I,Q]=Ub(te),z=Dt(x);Jt(()=>{B&&(z==null||z())},[B,z]);const $=(pe=K.arrow)==null?void 0:pe.x,he=(xe=K.arrow)==null?void 0:xe.y,ne=((Te=K.arrow)==null?void 0:Te.centerOffset)!==0,[se,Oe]=g.useState();return Jt(()=>{p&&Oe(window.getComputedStyle(p).zIndex)},[p]),a.jsx("div",{ref:b.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:B?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(Fe=K.transformOrigin)==null?void 0:Fe.x,(Me=K.transformOrigin)==null?void 0:Me.y].join(" "),...((Pe=K.hide)==null?void 0:Pe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(YO,{scope:r,placedSide:I,onArrowChange:j,arrowX:$,arrowY:he,shouldHideArrow:ne,children:a.jsx(Re.div,{"data-side":I,"data-align":Q,...y,ref:w,style:{...y.style,animation:B?void 0:"none"}})})})});Lb.displayName=Qg;var Fb="PopperArrow",GO={top:"bottom",right:"left",bottom:"top",left:"right"},zb=g.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=KO(Fb,n),i=GO[o.placedSide];return a.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:a.jsx(WO,{...s,ref:r,style:{...s.style,display:"block"}})})});zb.displayName=Fb;function ZO(e){return e!==null}var qO=e=>({name:"transformOrigin",options:e,fn(t){var _,p,h;const{placement:r,rects:n,middlewareData:s}=t,i=((_=s.arrow)==null?void 0:_.centerOffset)!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=Ub(r),f={start:"0%",center:"50%",end:"100%"}[d],m=(((p=s.arrow)==null?void 0:p.x)??0)+l/2,v=(((h=s.arrow)==null?void 0:h.y)??0)+c/2;let x="",y="";return u==="bottom"?(x=i?f:`${m}px`,y=`${-c}px`):u==="top"?(x=i?f:`${m}px`,y=`${n.floating.height+c}px`):u==="right"?(x=`${-c}px`,y=i?f:`${v}px`):u==="left"&&(x=`${n.floating.width+c}px`,y=i?f:`${v}px`),{data:{x,y}}}});function Ub(e){const[t,r="center"]=e.split("-");return[t,r]}var Jg=Ob,ev=Ib,tv=Lb,rv=zb,XO="Portal",jc=g.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[s,o]=g.useState(!1);Jt(()=>o(!0),[]);const i=r||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?B1.createPortal(a.jsx(Re.div,{...n,ref:t}),i):null});jc.displayName=XO;function QO(e,t){return g.useReducer((r,n)=>t[r][n]??r,e)}var or=e=>{const{present:t,children:r}=e,n=JO(t),s=typeof r=="function"?r({present:n.isPresent}):g.Children.only(r),o=Ke(n.ref,eM(s));return typeof r=="function"||n.isPresent?g.cloneElement(s,{ref:o}):null};or.displayName="Presence";function JO(e){const[t,r]=g.useState(),n=g.useRef({}),s=g.useRef(e),o=g.useRef("none"),i=e?"mounted":"unmounted",[l,c]=QO(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=mu(n.current);o.current=l==="mounted"?u:"none"},[l]),Jt(()=>{const u=n.current,d=s.current;if(d!==e){const m=o.current,v=mu(u);e?c("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Jt(()=>{if(t){const u=f=>{const v=mu(n.current).includes(f.animationName);f.target===t&&v&&Ts.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=mu(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:g.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function mu(e){return(e==null?void 0:e.animationName)||"none"}function eM(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Bh="rovingFocusGroup.onEntryFocus",tM={bubbles:!1,cancelable:!0},kf="RovingFocusGroup",[lm,$b,rM]=kc(kf),[nM,Oa]=sr(kf,[rM]),[sM,oM]=nM(kf),Vb=g.forwardRef((e,t)=>a.jsx(lm.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(lm.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(iM,{...e,ref:t})})}));Vb.displayName=kf;var iM=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,m=g.useRef(null),v=Ke(t,m),x=di(o),[y=null,_]=Yr({prop:i,defaultProp:l,onChange:c}),[p,h]=g.useState(!1),w=Dt(u),C=$b(r),j=g.useRef(!1),[E,R]=g.useState(0);return g.useEffect(()=>{const P=m.current;if(P)return P.addEventListener(Bh,w),()=>P.removeEventListener(Bh,w)},[w]),a.jsx(sM,{scope:r,orientation:n,dir:x,loop:s,currentTabStopId:y,onItemFocus:g.useCallback(P=>_(P),[_]),onItemShiftTab:g.useCallback(()=>h(!0),[]),onFocusableItemAdd:g.useCallback(()=>R(P=>P+1),[]),onFocusableItemRemove:g.useCallback(()=>R(P=>P-1),[]),children:a.jsx(Re.div,{tabIndex:p||E===0?-1:0,"data-orientation":n,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:ue(e.onMouseDown,()=>{j.current=!0}),onFocus:ue(e.onFocus,P=>{const A=!j.current;if(P.target===P.currentTarget&&A&&!p){const L=new CustomEvent(Bh,tM);if(P.currentTarget.dispatchEvent(L),!L.defaultPrevented){const q=C().filter(te=>te.focusable),N=q.find(te=>te.active),F=q.find(te=>te.id===y),V=[N,F,...q].filter(Boolean).map(te=>te.ref.current);Hb(V,d)}}j.current=!1}),onBlur:ue(e.onBlur,()=>h(!1))})})}),Bb="RovingFocusGroupItem",Wb=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,...i}=e,l=$r(),c=o||l,u=oM(Bb,r),d=u.currentTabStopId===c,f=$b(r),{onFocusableItemAdd:m,onFocusableItemRemove:v}=u;return g.useEffect(()=>{if(n)return m(),()=>v()},[n,m,v]),a.jsx(lm.ItemSlot,{scope:r,id:c,focusable:n,active:s,children:a.jsx(Re.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:ue(e.onMouseDown,x=>{n?u.onItemFocus(c):x.preventDefault()}),onFocus:ue(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:ue(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=cM(x,u.orientation,u.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let p=f().filter(h=>h.focusable).map(h=>h.ref.current);if(y==="last")p.reverse();else if(y==="prev"||y==="next"){y==="prev"&&p.reverse();const h=p.indexOf(x.currentTarget);p=u.loop?uM(p,h+1):p.slice(h+1)}setTimeout(()=>Hb(p))}})})})});Wb.displayName=Bb;var aM={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function lM(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function cM(e,t,r){const n=lM(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return aM[n]}function Hb(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function uM(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var nv=Vb,sv=Wb,dM=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Si=new WeakMap,gu=new WeakMap,vu={},Wh=0,Yb=function(e){return e&&(e.host||Yb(e.parentNode))},fM=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Yb(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},hM=function(e,t,r,n){var s=fM(t,Array.isArray(e)?e:[e]);vu[r]||(vu[r]=new WeakMap);var o=vu[r],i=[],l=new Set,c=new Set(s),u=function(f){!f||l.has(f)||(l.add(f),u(f.parentNode))};s.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(m){if(l.has(m))d(m);else try{var v=m.getAttribute(n),x=v!==null&&v!=="false",y=(Si.get(m)||0)+1,_=(o.get(m)||0)+1;Si.set(m,y),o.set(m,_),i.push(m),y===1&&x&&gu.set(m,!0),_===1&&m.setAttribute(r,"true"),x||m.setAttribute(n,"true")}catch(p){console.error("aria-hidden: cannot operate on ",m,p)}})};return d(t),l.clear(),Wh++,function(){i.forEach(function(f){var m=Si.get(f)-1,v=o.get(f)-1;Si.set(f,m),o.set(f,v),m||(gu.has(f)||f.removeAttribute(n),gu.delete(f)),v||f.removeAttribute(r)}),Wh--,Wh||(Si=new WeakMap,Si=new WeakMap,gu=new WeakMap,vu={})}},ov=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=dM(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),hM(n,s,r,"aria-hidden")):function(){return null}},Ln=function(){return Ln=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Ln.apply(this,arguments)};function Kb(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function pM(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var Vu="right-scroll-bar-position",Bu="width-before-scroll-bar",mM="with-scroll-bars-hidden",gM="--removed-body-scroll-bar-size";function Hh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vM(e,t){var r=g.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var yM=typeof window<"u"?g.useLayoutEffect:g.useEffect,Z0=new WeakMap;function xM(e,t){var r=vM(null,function(n){return e.forEach(function(s){return Hh(s,n)})});return yM(function(){var n=Z0.get(r);if(n){var s=new Set(n),o=new Set(e),i=r.current;s.forEach(function(l){o.has(l)||Hh(l,null)}),o.forEach(function(l){s.has(l)||Hh(l,i)})}Z0.set(r,e)},[e]),r}function wM(e){return e}function _M(e,t){t===void 0&&(t=wM);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var i=t(o,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(o){for(n=!0;r.length;){var i=r;r=[],i.forEach(o)}r={push:function(l){return o(l)},filter:function(){return r}}},assignMedium:function(o){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(o),i=r}var c=function(){var d=i;i=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),r}}}};return s}function bM(e){e===void 0&&(e={});var t=_M(null);return t.options=Ln({async:!0,ssr:!1},e),t}var Gb=function(e){var t=e.sideCar,r=Kb(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return g.createElement(n,Ln({},r))};Gb.isSideCarExport=!0;function SM(e,t){return e.useMedium(t),Gb}var Zb=bM(),Yh=function(){},Cf=g.forwardRef(function(e,t){var r=g.useRef(null),n=g.useState({onScrollCapture:Yh,onWheelCapture:Yh,onTouchMoveCapture:Yh}),s=n[0],o=n[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,v=e.noIsolation,x=e.inert,y=e.allowPinchZoom,_=e.as,p=_===void 0?"div":_,h=e.gapMode,w=Kb(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,j=xM([r,t]),E=Ln(Ln({},w),s);return g.createElement(g.Fragment,null,d&&g.createElement(C,{sideCar:Zb,removeScrollBar:u,shards:f,noIsolation:v,inert:x,setCallbacks:o,allowPinchZoom:!!y,lockRef:r,gapMode:h}),i?g.cloneElement(g.Children.only(l),Ln(Ln({},E),{ref:j})):g.createElement(p,Ln({},E,{className:c,ref:j}),l))});Cf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Cf.classNames={fullWidth:Bu,zeroRight:Vu};var kM=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function CM(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kM();return t&&e.setAttribute("nonce",t),e}function jM(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function EM(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var NM=function(){var e=0,t=null;return{add:function(r){e==0&&(t=CM())&&(jM(t,r),EM(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},TM=function(){var e=NM();return function(t,r){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},qb=function(){var e=TM(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},RM={left:0,top:0,right:0,gap:0},Kh=function(e){return parseInt(e||"",10)||0},PM=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Kh(r),Kh(n),Kh(s)]},AM=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return RM;var t=PM(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},DM=qb(),ea="data-scroll-locked",OM=function(e,t,r,n){var s=e.left,o=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
.`.concat(mM,` {
overflow: hidden `).concat(n,`;
padding-right: `).concat(l,"px ").concat(n,`;
}
body[`).concat(ea,`] {
overflow: hidden `).concat(n,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
padding-left: `.concat(s,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(i,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(l,"px ").concat(n,`;
`),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
}
.`).concat(Vu,` {
right: `).concat(l,"px ").concat(n,`;
}
.`).concat(Bu,` {
margin-right: `).concat(l,"px ").concat(n,`;
}
.`).concat(Vu," .").concat(Vu,` {
right: 0 `).concat(n,`;
}
.`).concat(Bu," .").concat(Bu,` {
margin-right: 0 `).concat(n,`;
}
body[`).concat(ea,`] {
`).concat(gM,": ").concat(l,`px;
}
`)},q0=function(){var e=parseInt(document.body.getAttribute(ea)||"0",10);return isFinite(e)?e:0},MM=function(){g.useEffect(function(){return document.body.setAttribute(ea,(q0()+1).toString()),function(){var e=q0()-1;e<=0?document.body.removeAttribute(ea):document.body.setAttribute(ea,e.toString())}},[])},IM=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;MM();var o=g.useMemo(function(){return AM(s)},[s]);return g.createElement(DM,{styles:OM(o,!t,s,r?"":"!important")})},cm=!1;if(typeof window<"u")try{var yu=Object.defineProperty({},"passive",{get:function(){return cm=!0,!0}});window.addEventListener("test",yu,yu),window.removeEventListener("test",yu,yu)}catch{cm=!1}var ki=cm?{passive:!1}:!1,LM=function(e){return e.tagName==="TEXTAREA"},Xb=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!LM(e)&&r[t]==="visible")},FM=function(e){return Xb(e,"overflowY")},zM=function(e){return Xb(e,"overflowX")},X0=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=Qb(e,n);if(s){var o=Jb(e,n),i=o[1],l=o[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},UM=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},$M=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Qb=function(e,t){return e==="v"?FM(t):zM(t)},Jb=function(e,t){return e==="v"?UM(t):$M(t)},VM=function(e,t){return e==="h"&&t==="rtl"?-1:1},BM=function(e,t,r,n,s){var o=VM(e,window.getComputedStyle(t).direction),i=o*n,l=r.target,c=t.contains(l),u=!1,d=i>0,f=0,m=0;do{var v=Jb(e,l),x=v[0],y=v[1],_=v[2],p=y-_-o*x;(x||p)&&Qb(e,l)&&(f+=p,m+=x),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(m)<1||!s))&&(u=!0),u},xu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Q0=function(e){return[e.deltaX,e.deltaY]},J0=function(e){return e&&"current"in e?e.current:e},WM=function(e,t){return e[0]===t[0]&&e[1]===t[1]},HM=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},YM=0,Ci=[];function KM(e){var t=g.useRef([]),r=g.useRef([0,0]),n=g.useRef(),s=g.useState(YM++)[0],o=g.useState(qb)[0],i=g.useRef(e);g.useEffect(function(){i.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var y=pM([e.lockRef.current],(e.shards||[]).map(J0),!0).filter(Boolean);return y.forEach(function(_){return _.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=g.useCallback(function(y,_){if("touches"in y&&y.touches.length===2)return!i.current.allowPinchZoom;var p=xu(y),h=r.current,w="deltaX"in y?y.deltaX:h[0]-p[0],C="deltaY"in y?y.deltaY:h[1]-p[1],j,E=y.target,R=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in y&&R==="h"&&E.type==="range")return!1;var P=X0(R,E);if(!P)return!0;if(P?j=R:(j=R==="v"?"h":"v",P=X0(R,E)),!P)return!1;if(!n.current&&"changedTouches"in y&&(w||C)&&(n.current=j),!j)return!0;var A=n.current||j;return BM(A,_,y,A==="h"?w:C,!0)},[]),c=g.useCallback(function(y){var _=y;if(!(!Ci.length||Ci[Ci.length-1]!==o)){var p="deltaY"in _?Q0(_):xu(_),h=t.current.filter(function(j){return j.name===_.type&&(j.target===_.target||_.target===j.shadowParent)&&WM(j.delta,p)})[0];if(h&&h.should){_.cancelable&&_.preventDefault();return}if(!h){var w=(i.current.shards||[]).map(J0).filter(Boolean).filter(function(j){return j.contains(_.target)}),C=w.length>0?l(_,w[0]):!i.current.noIsolation;C&&_.cancelable&&_.preventDefault()}}},[]),u=g.useCallback(function(y,_,p,h){var w={name:y,delta:_,target:p,should:h,shadowParent:GM(p)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),d=g.useCallback(function(y){r.current=xu(y),n.current=void 0},[]),f=g.useCallback(function(y){u(y.type,Q0(y),y.target,l(y,e.lockRef.current))},[]),m=g.useCallback(function(y){u(y.type,xu(y),y.target,l(y,e.lockRef.current))},[]);g.useEffect(function(){return Ci.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,ki),document.addEventListener("touchmove",c,ki),document.addEventListener("touchstart",d,ki),function(){Ci=Ci.filter(function(y){return y!==o}),document.removeEventListener("wheel",c,ki),document.removeEventListener("touchmove",c,ki),document.removeEventListener("touchstart",d,ki)}},[]);var v=e.removeScrollBar,x=e.inert;return g.createElement(g.Fragment,null,x?g.createElement(o,{styles:HM(s)}):null,v?g.createElement(IM,{gapMode:e.gapMode}):null)}function GM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ZM=SM(Zb,KM);var jf=g.forwardRef(function(e,t){return g.createElement(Cf,Ln({},e,{ref:t,sideCar:ZM}))});jf.classNames=Cf.classNames;var um=["Enter"," "],qM=["ArrowDown","PageUp","Home"],eS=["ArrowUp","PageDown","End"],XM=[...qM,...eS],QM={ltr:[...um,"ArrowRight"],rtl:[...um,"ArrowLeft"]},JM={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ec="Menu",[Ql,eI,tI]=kc(Ec),[fi,tS]=sr(Ec,[tI,Da,Oa]),Ef=Da(),rS=Oa(),[rI,hi]=fi(Ec),[nI,Nc]=fi(Ec),nS=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:s,onOpenChange:o,modal:i=!0}=e,l=Ef(t),[c,u]=g.useState(null),d=g.useRef(!1),f=Dt(o),m=di(s);return g.useEffect(()=>{const v=()=>{d.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>d.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),a.jsx(Jg,{...l,children:a.jsx(rI,{scope:t,open:r,onOpenChange:f,content:c,onContentChange:u,children:a.jsx(nI,{scope:t,onClose:g.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:m,modal:i,children:n})})})};nS.displayName=Ec;var sI="MenuAnchor",iv=g.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=Ef(r);return a.jsx(ev,{...s,...n,ref:t})});iv.displayName=sI;var av="MenuPortal",[oI,sS]=fi(av,{forceMount:void 0}),oS=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:s}=e,o=hi(av,t);return a.jsx(oI,{scope:t,forceMount:r,children:a.jsx(or,{present:r||o.open,children:a.jsx(jc,{asChild:!0,container:s,children:n})})})};oS.displayName=av;var nn="MenuContent",[iI,lv]=fi(nn),iS=g.forwardRef((e,t)=>{const r=sS(nn,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=hi(nn,e.__scopeMenu),i=Nc(nn,e.__scopeMenu);return a.jsx(Ql.Provider,{scope:e.__scopeMenu,children:a.jsx(or,{present:n||o.open,children:a.jsx(Ql.Slot,{scope:e.__scopeMenu,children:i.modal?a.jsx(aI,{...s,ref:t}):a.jsx(lI,{...s,ref:t})})})})}),aI=g.forwardRef((e,t)=>{const r=hi(nn,e.__scopeMenu),n=g.useRef(null),s=Ke(t,n);return g.useEffect(()=>{const o=n.current;if(o)return ov(o)},[]),a.jsx(cv,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ue(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),lI=g.forwardRef((e,t)=>{const r=hi(nn,e.__scopeMenu);return a.jsx(cv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),cv=g.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:v,disableOutsideScroll:x,...y}=e,_=hi(nn,r),p=Nc(nn,r),h=Ef(r),w=rS(r),C=eI(r),[j,E]=g.useState(null),R=g.useRef(null),P=Ke(t,R,_.onContentChange),A=g.useRef(0),L=g.useRef(""),q=g.useRef(0),N=g.useRef(null),F=g.useRef("right"),b=g.useRef(0),V=x?jf:g.Fragment,te=x?{as:bs,allowPinchZoom:!0}:void 0,B=I=>{var pe,xe;const Q=L.current+I,z=C().filter(Te=>!Te.disabled),$=document.activeElement,he=(pe=z.find(Te=>Te.ref.current===$))==null?void 0:pe.textValue,ne=z.map(Te=>Te.textValue),se=wI(ne,Q,he),Oe=(xe=z.find(Te=>Te.textValue===se))==null?void 0:xe.ref.current;(function Te(Fe){L.current=Fe,window.clearTimeout(A.current),Fe!==""&&(A.current=window.setTimeout(()=>Te(""),1e3))})(Q),Oe&&setTimeout(()=>Oe.focus())};g.useEffect(()=>()=>window.clearTimeout(A.current),[]),Bg();const K=g.useCallback(I=>{var z,$;return F.current===((z=N.current)==null?void 0:z.side)&&bI(I,($=N.current)==null?void 0:$.area)},[]);return a.jsx(iI,{scope:r,searchRef:L,onItemEnter:g.useCallback(I=>{K(I)&&I.preventDefault()},[K]),onItemLeave:g.useCallback(I=>{var Q;K(I)||((Q=R.current)==null||Q.focus(),E(null))},[K]),onTriggerLeave:g.useCallback(I=>{K(I)&&I.preventDefault()},[K]),pointerGraceTimerRef:q,onPointerGraceIntentChange:g.useCallback(I=>{N.current=I},[]),children:a.jsx(V,{...te,children:a.jsx(_f,{asChild:!0,trapped:s,onMountAutoFocus:ue(o,I=>{var Q;I.preventDefault(),(Q=R.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:a.jsx(Ra,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:v,children:a.jsx(nv,{asChild:!0,...w,dir:p.dir,orientation:"vertical",loop:n,currentTabStopId:j,onCurrentTabStopIdChange:E,onEntryFocus:ue(c,I=>{p.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(tv,{role:"menu","aria-orientation":"vertical","data-state":bS(_.open),"data-radix-menu-content":"",dir:p.dir,...h,...y,ref:P,style:{outline:"none",...y.style},onKeyDown:ue(y.onKeyDown,I=>{const z=I.target.closest("[data-radix-menu-content]")===I.currentTarget,$=I.ctrlKey||I.altKey||I.metaKey,he=I.key.length===1;z&&(I.key==="Tab"&&I.preventDefault(),!$&&he&&B(I.key));const ne=R.current;if(I.target!==ne||!XM.includes(I.key))return;I.preventDefault();const Oe=C().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);eS.includes(I.key)&&Oe.reverse(),yI(Oe)}),onBlur:ue(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(A.current),L.current="")}),onPointerMove:ue(e.onPointerMove,Jl(I=>{const Q=I.target,z=b.current!==I.clientX;if(I.currentTarget.contains(Q)&&z){const $=I.clientX>b.current?"right":"left";F.current=$,b.current=I.clientX}}))})})})})})})});iS.displayName=nn;var cI="MenuGroup",uv=g.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return a.jsx(Re.div,{role:"group",...n,ref:t})});uv.displayName=cI;var uI="MenuLabel",aS=g.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return a.jsx(Re.div,{...n,ref:t})});aS.displayName=uI;var Ed="MenuItem",ew="menu.itemSelect",Nf=g.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...s}=e,o=g.useRef(null),i=Nc(Ed,e.__scopeMenu),l=lv(Ed,e.__scopeMenu),c=Ke(t,o),u=g.useRef(!1),d=()=>{const f=o.current;if(!r&&f){const m=new CustomEvent(ew,{bubbles:!0,cancelable:!0});f.addEventListener(ew,v=>n==null?void 0:n(v),{once:!0}),Vg(f,m),m.defaultPrevented?u.current=!1:i.onClose()}};return a.jsx(lS,{...s,ref:c,disabled:r,onClick:ue(e.onClick,d),onPointerDown:f=>{var m;(m=e.onPointerDown)==null||m.call(e,f),u.current=!0},onPointerUp:ue(e.onPointerUp,f=>{var m;u.current||(m=f.currentTarget)==null||m.click()}),onKeyDown:ue(e.onKeyDown,f=>{const m=l.searchRef.current!=="";r||m&&f.key===" "||um.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Nf.displayName=Ed;var lS=g.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...o}=e,i=lv(Ed,r),l=rS(r),c=g.useRef(null),u=Ke(t,c),[d,f]=g.useState(!1),[m,v]=g.useState("");return g.useEffect(()=>{const x=c.current;x&&v((x.textContent??"").trim())},[o.children]),a.jsx(Ql.ItemSlot,{scope:r,disabled:n,textValue:s??m,children:a.jsx(sv,{asChild:!0,...l,focusable:!n,children:a.jsx(Re.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...o,ref:u,onPointerMove:ue(e.onPointerMove,Jl(x=>{n?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ue(e.onPointerLeave,Jl(x=>i.onItemLeave(x))),onFocus:ue(e.onFocus,()=>f(!0)),onBlur:ue(e.onBlur,()=>f(!1))})})})}),dI="MenuCheckboxItem",cS=g.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...s}=e;return a.jsx(pS,{scope:e.__scopeMenu,checked:r,children:a.jsx(Nf,{role:"menuitemcheckbox","aria-checked":Nd(r)?"mixed":r,...s,ref:t,"data-state":fv(r),onSelect:ue(s.onSelect,()=>n==null?void 0:n(Nd(r)?!0:!r),{checkForDefaultPrevented:!1})})})});cS.displayName=dI;var uS="MenuRadioGroup",[fI,hI]=fi(uS,{value:void 0,onValueChange:()=>{}}),dS=g.forwardRef((e,t)=>{const{value:r,onValueChange:n,...s}=e,o=Dt(n);return a.jsx(fI,{scope:e.__scopeMenu,value:r,onValueChange:o,children:a.jsx(uv,{...s,ref:t})})});dS.displayName=uS;var fS="MenuRadioItem",hS=g.forwardRef((e,t)=>{const{value:r,...n}=e,s=hI(fS,e.__scopeMenu),o=r===s.value;return a.jsx(pS,{scope:e.__scopeMenu,checked:o,children:a.jsx(Nf,{role:"menuitemradio","aria-checked":o,...n,ref:t,"data-state":fv(o),onSelect:ue(n.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,r)},{checkForDefaultPrevented:!1})})})});hS.displayName=fS;var dv="MenuItemIndicator",[pS,pI]=fi(dv,{checked:!1}),mS=g.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...s}=e,o=pI(dv,r);return a.jsx(or,{present:n||Nd(o.checked)||o.checked===!0,children:a.jsx(Re.span,{...s,ref:t,"data-state":fv(o.checked)})})});mS.displayName=dv;var mI="MenuSeparator",gS=g.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return a.jsx(Re.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});gS.displayName=mI;var gI="MenuArrow",vS=g.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=Ef(r);return a.jsx(rv,{...s,...n,ref:t})});vS.displayName=gI;var vI="MenuSub",[X$,yS]=fi(vI),ll="MenuSubTrigger",xS=g.forwardRef((e,t)=>{const r=hi(ll,e.__scopeMenu),n=Nc(ll,e.__scopeMenu),s=yS(ll,e.__scopeMenu),o=lv(ll,e.__scopeMenu),i=g.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=o,u={__scopeMenu:e.__scopeMenu},d=g.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return g.useEffect(()=>d,[d]),g.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),c(null)}},[l,c]),a.jsx(iv,{asChild:!0,...u,children:a.jsx(lS,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":bS(r.open),...e,ref:xf(t,s.onTriggerChange),onClick:f=>{var m;(m=e.onClick)==null||m.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:ue(e.onPointerMove,Jl(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:ue(e.onPointerLeave,Jl(f=>{var v,x;d();const m=(v=r.content)==null?void 0:v.getBoundingClientRect();if(m){const y=(x=r.content)==null?void 0:x.dataset.side,_=y==="right",p=_?-5:5,h=m[_?"left":"right"],w=m[_?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+p,y:f.clientY},{x:h,y:m.top},{x:w,y:m.top},{x:w,y:m.bottom},{x:h,y:m.bottom}],side:y}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ue(e.onKeyDown,f=>{var v;const m=o.searchRef.current!=="";e.disabled||m&&f.key===" "||QM[n.dir].includes(f.key)&&(r.onOpenChange(!0),(v=r.content)==null||v.focus(),f.preventDefault())})})})});xS.displayName=ll;var wS="MenuSubContent",_S=g.forwardRef((e,t)=>{const r=sS(nn,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=hi(nn,e.__scopeMenu),i=Nc(nn,e.__scopeMenu),l=yS(wS,e.__scopeMenu),c=g.useRef(null),u=Ke(t,c);return a.jsx(Ql.Provider,{scope:e.__scopeMenu,children:a.jsx(or,{present:n||o.open,children:a.jsx(Ql.Slot,{scope:e.__scopeMenu,children:a.jsx(cv,{id:l.contentId,"aria-labelledby":l.triggerId,...s,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;i.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ue(e.onFocusOutside,d=>{d.target!==l.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ue(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:ue(e.onKeyDown,d=>{var v;const f=d.currentTarget.contains(d.target),m=JM[i.dir].includes(d.key);f&&m&&(o.onOpenChange(!1),(v=l.trigger)==null||v.focus(),d.preventDefault())})})})})})});_S.displayName=wS;function bS(e){return e?"open":"closed"}function Nd(e){return e==="indeterminate"}function fv(e){return Nd(e)?"indeterminate":e?"checked":"unchecked"}function yI(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function xI(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function wI(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=xI(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==r));const c=i.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function _I(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const l=t[o].x,c=t[o].y,u=t[i].x,d=t[i].y;c>n!=d>n&&r<(u-l)*(n-c)/(d-c)+l&&(s=!s)}return s}function bI(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return _I(r,t)}function Jl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var SI=nS,kI=iv,CI=oS,jI=iS,EI=uv,NI=aS,TI=Nf,RI=cS,PI=dS,AI=hS,DI=mS,OI=gS,MI=vS,II=xS,LI=_S,hv="DropdownMenu",[FI,Q$]=sr(hv,[tS]),Sr=tS(),[zI,SS]=FI(hv),kS=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:s,defaultOpen:o,onOpenChange:i,modal:l=!0}=e,c=Sr(t),u=g.useRef(null),[d=!1,f]=Yr({prop:s,defaultProp:o,onChange:i});return a.jsx(zI,{scope:t,triggerId:$r(),triggerRef:u,contentId:$r(),open:d,onOpenChange:f,onOpenToggle:g.useCallback(()=>f(m=>!m),[f]),modal:l,children:a.jsx(SI,{...c,open:d,onOpenChange:f,dir:n,modal:l,children:r})})};kS.displayName=hv;var CS="DropdownMenuTrigger",jS=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,o=SS(CS,r),i=Sr(r);return a.jsx(kI,{asChild:!0,...i,children:a.jsx(Re.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:xf(t,o.triggerRef),onPointerDown:ue(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(o.onOpenToggle(),o.open||l.preventDefault())}),onKeyDown:ue(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&o.onOpenToggle(),l.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});jS.displayName=CS;var UI="DropdownMenuPortal",ES=e=>{const{__scopeDropdownMenu:t,...r}=e,n=Sr(t);return a.jsx(CI,{...n,...r})};ES.displayName=UI;var NS="DropdownMenuContent",TS=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=SS(NS,r),o=Sr(r),i=g.useRef(!1);return a.jsx(jI,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...n,ref:t,onCloseAutoFocus:ue(e.onCloseAutoFocus,l=>{var c;i.current||(c=s.triggerRef.current)==null||c.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:ue(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!s.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});TS.displayName=NS;var $I="DropdownMenuGroup",VI=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Sr(r);return a.jsx(EI,{...s,...n,ref:t})});VI.displayName=$I;var BI="DropdownMenuLabel",RS=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Sr(r);return a.jsx(NI,{...s,...n,ref:t})});RS.displayName=BI;var WI="DropdownMenuItem",PS=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Sr(r);return a.jsx(TI,{...s,...n,ref:t})});PS.displayName=WI;var HI="DropdownMenuCheckboxItem",AS=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Sr(r);return a.jsx(RI,{...s,...n,ref:t})});AS.displayName=HI;var YI="DropdownMenuRadioGroup",KI=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Sr(r);return a.jsx(PI,{...s,...n,ref:t})});KI.displayName=YI;var GI="DropdownMenuRadioItem",DS=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Sr(r);return a.jsx(AI,{...s,...n,ref:t})});DS.displayName=GI;var ZI="DropdownMenuItemIndicator",OS=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Sr(r);return a.jsx(DI,{...s,...n,ref:t})});OS.displayName=ZI;var qI="DropdownMenuSeparator",MS=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Sr(r);return a.jsx(OI,{...s,...n,ref:t})});MS.displayName=qI;var XI="DropdownMenuArrow",QI=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Sr(r);return a.jsx(MI,{...s,...n,ref:t})});QI.displayName=XI;var JI="DropdownMenuSubTrigger",IS=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Sr(r);return a.jsx(II,{...s,...n,ref:t})});IS.displayName=JI;var eL="DropdownMenuSubContent",LS=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Sr(r);return a.jsx(LI,{...s,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});LS.displayName=eL;var tL=kS,rL=jS,nL=ES,FS=TS,zS=RS,US=PS,$S=AS,VS=DS,BS=OS,WS=MS,HS=IS,YS=LS;const KS=tL,GS=rL,sL=g.forwardRef(({className:e,inset:t,children:r,...n},s)=>a.jsxs(HS,{ref:s,className:oe("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...n,children:[r,a.jsx(kA,{className:"ml-auto h-4 w-4"})]}));sL.displayName=HS.displayName;const oL=g.forwardRef(({className:e,...t},r)=>a.jsx(YS,{ref:r,className:oe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));oL.displayName=YS.displayName;const pv=g.forwardRef(({className:e,sideOffset:t=4,...r},n)=>a.jsx(nL,{children:a.jsx(FS,{ref:n,sideOffset:t,className:oe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));pv.displayName=FS.displayName;const ta=g.forwardRef(({className:e,inset:t,...r},n)=>a.jsx(US,{ref:n,className:oe("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));ta.displayName=US.displayName;const iL=g.forwardRef(({className:e,children:t,checked:r,...n},s)=>a.jsxs($S,{ref:s,className:oe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(BS,{children:a.jsx(lb,{className:"h-4 w-4"})})}),t]}));iL.displayName=$S.displayName;const aL=g.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(VS,{ref:n,className:oe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(BS,{children:a.jsx(cb,{className:"h-2 w-2 fill-current"})})}),t]}));aL.displayName=VS.displayName;const ZS=g.forwardRef(({className:e,inset:t,...r},n)=>a.jsx(zS,{ref:n,className:oe("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));ZS.displayName=zS.displayName;const qS=g.forwardRef(({className:e,...t},r)=>a.jsx(WS,{ref:r,className:oe("-mx-1 my-1 h-px bg-muted",e),...t}));qS.displayName=WS.displayName;var mv="Dialog",[XS,QS]=sr(mv),[lL,Tn]=XS(mv),JS=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,l=g.useRef(null),c=g.useRef(null),[u=!1,d]=Yr({prop:n,defaultProp:s,onChange:o});return a.jsx(lL,{scope:t,triggerRef:l,contentRef:c,contentId:$r(),titleId:$r(),descriptionId:$r(),open:u,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(f=>!f),[d]),modal:i,children:r})};JS.displayName=mv;var ek="DialogTrigger",tk=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tn(ek,r),o=Ke(t,s.triggerRef);return a.jsx(Re.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":yv(s.open),...n,ref:o,onClick:ue(e.onClick,s.onOpenToggle)})});tk.displayName=ek;var gv="DialogPortal",[cL,rk]=XS(gv,{forceMount:void 0}),nk=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=Tn(gv,t);return a.jsx(cL,{scope:t,forceMount:r,children:g.Children.map(n,i=>a.jsx(or,{present:r||o.open,children:a.jsx(jc,{asChild:!0,container:s,children:i})}))})};nk.displayName=gv;var Td="DialogOverlay",sk=g.forwardRef((e,t)=>{const r=rk(Td,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Tn(Td,e.__scopeDialog);return o.modal?a.jsx(or,{present:n||o.open,children:a.jsx(uL,{...s,ref:t})}):null});sk.displayName=Td;var uL=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tn(Td,r);return a.jsx(jf,{as:bs,allowPinchZoom:!0,shards:[s.contentRef],children:a.jsx(Re.div,{"data-state":yv(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),oi="DialogContent",ok=g.forwardRef((e,t)=>{const r=rk(oi,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Tn(oi,e.__scopeDialog);return a.jsx(or,{present:n||o.open,children:o.modal?a.jsx(dL,{...s,ref:t}):a.jsx(fL,{...s,ref:t})})});ok.displayName=oi;var dL=g.forwardRef((e,t)=>{const r=Tn(oi,e.__scopeDialog),n=g.useRef(null),s=Ke(t,r.contentRef,n);return g.useEffect(()=>{const o=n.current;if(o)return ov(o)},[]),a.jsx(ik,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&o.preventDefault()}),onFocusOutside:ue(e.onFocusOutside,o=>o.preventDefault())})}),fL=g.forwardRef((e,t)=>{const r=Tn(oi,e.__scopeDialog),n=g.useRef(!1),s=g.useRef(!1);return a.jsx(ik,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((u=r.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),ik=g.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,l=Tn(oi,r),c=g.useRef(null),u=Ke(t,c);return Bg(),a.jsxs(a.Fragment,{children:[a.jsx(_f,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:a.jsx(Ra,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":yv(l.open),...i,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(pL,{titleId:l.titleId}),a.jsx(gL,{contentRef:c,descriptionId:l.descriptionId})]})]})}),vv="DialogTitle",ak=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tn(vv,r);return a.jsx(Re.h2,{id:s.titleId,...n,ref:t})});ak.displayName=vv;var lk="DialogDescription",ck=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tn(lk,r);return a.jsx(Re.p,{id:s.descriptionId,...n,ref:t})});ck.displayName=lk;var uk="DialogClose",dk=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tn(uk,r);return a.jsx(Re.button,{type:"button",...n,ref:t,onClick:ue(e.onClick,()=>s.onOpenChange(!1))})});dk.displayName=uk;function yv(e){return e?"open":"closed"}var fk="DialogTitleWarning",[hL,hk]=SD(fk,{contentName:oi,titleName:vv,docsSlug:"dialog"}),pL=({titleId:e})=>{const t=hk(fk),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},mL="DialogDescriptionWarning",gL=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${hk(mL).contentName}}.`;return g.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},xv=JS,wv=tk,_v=nk,Tc=sk,Rc=ok,Pc=ak,Ac=ck,Tf=dk;const bv=xv,Sv=wv,vL=_v,pk=g.forwardRef(({className:e,...t},r)=>a.jsx(Tc,{className:oe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));pk.displayName=Tc.displayName;const yL=Sc("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Rf=g.forwardRef(({side:e="right",className:t,children:r,...n},s)=>a.jsxs(vL,{children:[a.jsx(pk,{}),a.jsxs(Rc,{ref:s,className:oe(yL({side:e}),t),...n,children:[r,a.jsxs(Tf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[a.jsx(zg,{className:"h-4 w-4 dark:text-stone-200"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Rf.displayName=Rc.displayName;const kv=({className:e,...t})=>a.jsx("div",{className:oe("flex flex-col space-y-2 text-center sm:text-left",e),...t});kv.displayName="SheetHeader";const Cv=g.forwardRef(({className:e,...t},r)=>a.jsx(Pc,{ref:r,className:oe("text-lg font-semibold text-foreground",e),...t}));Cv.displayName=Pc.displayName;const xL=g.forwardRef(({className:e,...t},r)=>a.jsx(Ac,{ref:r,className:oe("text-sm text-muted-foreground",e),...t}));xL.displayName=Ac.displayName;class Br extends Error{constructor(t){var r,n,s,o;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Br.prototype),t!==null&&typeof t=="object"&&(this.url=typeof t.url=="string"?t.url:"",this.status=typeof t.status=="number"?t.status:0,this.isAbort=!!t.isAbort,this.originalError=t.originalError,t.response!==null&&typeof t.response=="object"?this.response=t.response:t.data!==null&&typeof t.data=="object"?this.response=t.data:this.response={}),this.originalError||t instanceof Br||(this.originalError=t),typeof DOMException<"u"&&t instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(r=this.response)==null?void 0:r.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":(o=(s=(n=this.originalError)==null?void 0:n.cause)==null?void 0:s.message)!=null&&o.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong while processing your request.")}get data(){return this.response}toJSON(){return{...this}}}const wu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function wL(e,t){const r={};if(typeof e!="string")return r;const n=Object.assign({},{}).decode||_L;let s=0;for(;s<e.length;){const o=e.indexOf("=",s);if(o===-1)break;let i=e.indexOf(";",s);if(i===-1)i=e.length;else if(i<o){s=e.lastIndexOf(";",o-1)+1;continue}const l=e.slice(s,o).trim();if(r[l]===void 0){let c=e.slice(o+1,i).trim();c.charCodeAt(0)===34&&(c=c.slice(1,-1));try{r[l]=n(c)}catch{r[l]=c}}s=i+1}return r}function tw(e,t,r){const n=Object.assign({},r||{}),s=n.encode||bL;if(!wu.test(e))throw new TypeError("argument name is invalid");const o=s(t);if(o&&!wu.test(o))throw new TypeError("argument val is invalid");let i=e+"="+o;if(n.maxAge!=null){const l=n.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(l)}if(n.domain){if(!wu.test(n.domain))throw new TypeError("option domain is invalid");i+="; Domain="+n.domain}if(n.path){if(!wu.test(n.path))throw new TypeError("option path is invalid");i+="; Path="+n.path}if(n.expires){if(!function(c){return Object.prototype.toString.call(c)==="[object Date]"||c instanceof Date}(n.expires)||isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");i+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i}function _L(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function bL(e){return encodeURIComponent(e)}const SL=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let mk;function ra(e){if(e)try{const t=decodeURIComponent(mk(e.split(".")[1]).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}}function gk(e,t=0){let r=ra(e);return!(Object.keys(r).length>0&&(!r.exp||r.exp-t>Date.now()/1e3))}mk=typeof atob!="function"||SL?e=>{let t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,n,s=0,o=0,i="";n=t.charAt(o++);~n&&(r=s%4?64*r+n:n,s++%4)?i+=String.fromCharCode(255&r>>(-2*s&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return i}:atob;const rw="pb_auth";class kL{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!gk(this.token)}get isAdmin(){return ra(this.token).type==="admin"}get isAuthRecord(){return ra(this.token).type==="authRecord"}save(t,r){this.baseToken=t||"",this.baseModel=r||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(t,r=rw){const n=wL(t||"")[r]||"";let s={};try{s=JSON.parse(n),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(t,r=rw){var c,u;const n={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=ra(this.token);n.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},n,t);const o={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let i=tw(r,JSON.stringify(o),t);const l=typeof Blob<"u"?new Blob([i]).size:i.length;if(o.model&&l>4096){o.model={id:(c=o==null?void 0:o.model)==null?void 0:c.id,email:(u=o==null?void 0:o.model)==null?void 0:u.email};const d=["collectionId","username","verified"];for(const f in this.model)d.includes(f)&&(o.model[f]=this.model[f]);i=tw(r,JSON.stringify(o),t)}return i}onChange(t,r=!1){return this._onChangeCallbacks.push(t),r&&t(this.token,this.model),()=>{for(let n=this._onChangeCallbacks.length-1;n>=0;n--)if(this._onChangeCallbacks[n]==t)return delete this._onChangeCallbacks[n],void this._onChangeCallbacks.splice(n,1)}}triggerChange(){for(const t of this._onChangeCallbacks)t&&t(this.token,this.model)}}class CL extends kL{constructor(t="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=t,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get model(){return(this._storageGet(this.storageKey)||{}).model||null}save(t,r){this._storageSet(this.storageKey,{token:t,model:r}),super.save(t,r)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(t){if(typeof window<"u"&&(window!=null&&window.localStorage)){const r=window.localStorage.getItem(t)||"";try{return JSON.parse(r)}catch{return r}}return this.storageFallback[t]}_storageSet(t,r){if(typeof window<"u"&&(window!=null&&window.localStorage)){let n=r;typeof r!="string"&&(n=JSON.stringify(r)),window.localStorage.setItem(t,n)}else this.storageFallback[t]=r}_storageRemove(t){var r;typeof window<"u"&&(window!=null&&window.localStorage)&&((r=window.localStorage)==null||r.removeItem(t)),delete this.storageFallback[t]}_bindStorageEvent(){typeof window<"u"&&(window!=null&&window.localStorage)&&window.addEventListener&&window.addEventListener("storage",t=>{if(t.key!=this.storageKey)return;const r=this._storageGet(this.storageKey)||{};super.save(r.token||"",r.model||null)})}}class pi{constructor(t){this.client=t}}class jL extends pi{async getAll(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/settings",t)}async update(t,r){return r=Object.assign({method:"PATCH",body:t},r),this.client.send("/api/settings",r)}async testS3(t="storage",r){return r=Object.assign({method:"POST",body:{filesystem:t}},r),this.client.send("/api/settings/test/s3",r).then(()=>!0)}async testEmail(t,r,n){return n=Object.assign({method:"POST",body:{email:t,template:r}},n),this.client.send("/api/settings/test/email",n).then(()=>!0)}async generateAppleClientSecret(t,r,n,s,o,i){return i=Object.assign({method:"POST",body:{clientId:t,teamId:r,keyId:n,privateKey:s,duration:o}},i),this.client.send("/api/settings/apple/generate-client-secret",i)}}class jv extends pi{decode(t){return t}async getFullList(t,r){if(typeof t=="number")return this._getFullList(t,r);let n=500;return(r=Object.assign({},t,r)).batch&&(n=r.batch,delete r.batch),this._getFullList(n,r)}async getList(t=1,r=30,n){return(n=Object.assign({method:"GET"},n)).query=Object.assign({page:t,perPage:r},n.query),this.client.send(this.baseCrudPath,n).then(s=>{var o;return s.items=((o=s.items)==null?void 0:o.map(i=>this.decode(i)))||[],s})}async getFirstListItem(t,r){return(r=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+t},r)).query=Object.assign({filter:t,skipTotal:1},r.query),this.getList(1,1,r).then(n=>{var s;if(!((s=n==null?void 0:n.items)!=null&&s.length))throw new Br({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return n.items[0]})}async getOne(t,r){if(!t)throw new Br({url:this.client.buildUrl(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return r=Object.assign({method:"GET"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(n=>this.decode(n))}async create(t,r){return r=Object.assign({method:"POST",body:t},r),this.client.send(this.baseCrudPath,r).then(n=>this.decode(n))}async update(t,r,n){return n=Object.assign({method:"PATCH",body:r},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(s=>this.decode(s))}async delete(t,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(()=>!0)}_getFullList(t=500,r){(r=r||{}).query=Object.assign({skipTotal:1},r.query);let n=[],s=async o=>this.getList(o,t||500,r).then(i=>{const l=i.items;return n=n.concat(l),l.length==i.perPage?s(o+1):n});return s(1)}}function Or(e,t,r,n){const s=n!==void 0;return s||r!==void 0?s?(console.warn(e),t.body=Object.assign({},t.body,r),t.query=Object.assign({},t.query,n),t):Object.assign(t,r):t}function Gh(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class EL extends jv{get baseCrudPath(){return"/api/admins"}async update(t,r,n){return super.update(t,r,n).then(s=>{var o,i;return((o=this.client.authStore.model)==null?void 0:o.id)===s.id&&((i=this.client.authStore.model)==null?void 0:i.collectionId)===void 0&&this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,r){return super.delete(t,r).then(n=>{var s,o;return n&&((s=this.client.authStore.model)==null?void 0:s.id)===t&&((o=this.client.authStore.model)==null?void 0:o.collectionId)===void 0&&this.client.authStore.clear(),n})}authResponse(t){const r=this.decode((t==null?void 0:t.admin)||{});return t!=null&&t.token&&(t!=null&&t.admin)&&this.client.authStore.save(t.token,r),Object.assign({},t,{token:(t==null?void 0:t.token)||"",admin:r})}async authWithPassword(t,r,n,s){let o={method:"POST",body:{identity:t,password:r}};o=Or("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",o,n,s);const i=o.autoRefreshThreshold;delete o.autoRefreshThreshold,o.autoRefresh||Gh(this.client);let l=await this.client.send(this.baseCrudPath+"/auth-with-password",o);return l=this.authResponse(l),i&&function(u,d,f,m){Gh(u);const v=u.beforeSend,x=u.authStore.model,y=u.authStore.onChange((_,p)=>{(!_||(p==null?void 0:p.id)!=(x==null?void 0:x.id)||(p!=null&&p.collectionId||x!=null&&x.collectionId)&&(p==null?void 0:p.collectionId)!=(x==null?void 0:x.collectionId))&&Gh(u)});u._resetAutoRefresh=function(){y(),u.beforeSend=v,delete u._resetAutoRefresh},u.beforeSend=async(_,p)=>{var j;const h=u.authStore.token;if((j=p.query)!=null&&j.autoRefresh)return v?v(_,p):{url:_,sendOptions:p};let w=u.authStore.isValid;if(w&&gk(u.authStore.token,d))try{await f()}catch{w=!1}w||await m();const C=p.headers||{};for(let E in C)if(E.toLowerCase()=="authorization"&&h==C[E]&&u.authStore.token){C[E]=u.authStore.token;break}return p.headers=C,v?v(_,p):{url:_,sendOptions:p}}}(this.client,i,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,r,Object.assign({autoRefresh:!0},o))),l}async authRefresh(t,r){let n={method:"POST"};return n=Or("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",n,t,r),this.client.send(this.baseCrudPath+"/auth-refresh",n).then(this.authResponse.bind(this))}async requestPasswordReset(t,r,n){let s={method:"POST",body:{email:t}};return s=Or("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,r,n),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,r,n,s,o){let i={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return i=Or("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCrudPath+"/confirm-password-reset",i).then(()=>!0)}}const NL=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function vk(e){if(e){e.query=e.query||{};for(let t in e)NL.includes(t)||(e.query[t]=e[t],delete e[t])}}class yk extends pi{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(t,r,n){var i;if(!t)throw new Error("topic must be set.");let s=t;if(n){vk(n);const l="options="+encodeURIComponent(JSON.stringify({query:n.query,headers:n.headers}));s+=(s.includes("?")?"&":"?")+l}const o=function(l){const c=l;let u;try{u=JSON.parse(c==null?void 0:c.data)}catch{}r(u||{})};return this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(o),this.isConnected?this.subscriptions[s].length===1?await this.submitSubscriptions():(i=this.eventSource)==null||i.addEventListener(s,o):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,o)}async unsubscribe(t){var n;let r=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let o in s)if(this.hasSubscriptionListeners(o)){for(let i of this.subscriptions[o])(n=this.eventSource)==null||n.removeEventListener(o,i);delete this.subscriptions[o],r||(r=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?r&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){var n;let r=!1;for(let s in this.subscriptions)if((s+"?").startsWith(t)){r=!0;for(let o of this.subscriptions[s])(n=this.eventSource)==null||n.removeEventListener(s,o);delete this.subscriptions[s]}r&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,r){var o;let n=!1;const s=this.getSubscriptionsByTopic(t);for(let i in s){if(!Array.isArray(this.subscriptions[i])||!this.subscriptions[i].length)continue;let l=!1;for(let c=this.subscriptions[i].length-1;c>=0;c--)this.subscriptions[i][c]===r&&(l=!0,delete this.subscriptions[i][c],this.subscriptions[i].splice(c,1),(o=this.eventSource)==null||o.removeEventListener(i,r));l&&(this.subscriptions[i].length||delete this.subscriptions[i],n||this.hasSubscriptionListeners(i)||(n=!0))}this.hasSubscriptionListeners()?n&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(t){var r,n;if(this.subscriptions=this.subscriptions||{},t)return!!((r=this.subscriptions[t])!=null&&r.length);for(let s in this.subscriptions)if((n=this.subscriptions[s])!=null&&n.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch(t=>{if(!(t!=null&&t.isAbort))throw t})}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(t){const r={};t=t.includes("?")?t:t+"?";for(let n in this.subscriptions)(n+"?").startsWith(t)&&(r[n]=this.subscriptions[n]);return r}getNonEmptySubscriptionKeys(){const t=[];for(let r in this.subscriptions)this.subscriptions[r].length&&t.push(r);return t}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let t in this.subscriptions)for(let r of this.subscriptions[t])this.eventSource.addEventListener(t,r)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let t in this.subscriptions)for(let r of this.subscriptions[t])this.eventSource.removeEventListener(t,r)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((t,r)=>{this.pendingConnects.push({resolve:t,reject:r}),this.pendingConnects.length>1||this.initConnect()})}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=t=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",t=>{const r=t;this.clientId=r==null?void 0:r.lastEventId,this.submitSubscriptions().then(async()=>{let n=3;for(;this.hasUnsentSubscriptions()&&n>0;)n--,await this.submitSubscriptions()}).then(()=>{for(let s of this.pendingConnects)s.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const n=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in n)for(let o of n[s])o(t)}).catch(n=>{this.clientId="",this.connectErrorHandler(n)})})}hasUnsentSubscriptions(){const t=this.getNonEmptySubscriptionKeys();if(t.length!=this.lastSentSubscriptions.length)return!0;for(const r of t)if(!this.lastSentSubscriptions.includes(r))return!0;return!1}connectErrorHandler(t){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let n of this.pendingConnects)n.reject(new Br(t));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const r=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},r)}disconnect(t=!1){var r;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(r=this.eventSource)==null||r.close(),this.eventSource=null,this.clientId="",!t){this.reconnectAttempts=0;for(let n of this.pendingConnects)n.resolve();this.pendingConnects=[]}}}class TL extends jv{constructor(t,r){super(t),this.collectionIdOrName=r}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}async subscribe(t,r,n){if(!t)throw new Error("Missing topic.");if(!r)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+t,r,n)}async unsubscribe(t){return t?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+t):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(t,r){if(typeof t=="number")return super.getFullList(t,r);const n=Object.assign({},t,r);return super.getFullList(n)}async getList(t=1,r=30,n){return super.getList(t,r,n)}async getFirstListItem(t,r){return super.getFirstListItem(t,r)}async getOne(t,r){return super.getOne(t,r)}async create(t,r){return super.create(t,r)}async update(t,r,n){return super.update(t,r,n).then(s=>{var o,i,l;return((o=this.client.authStore.model)==null?void 0:o.id)!==(s==null?void 0:s.id)||((i=this.client.authStore.model)==null?void 0:i.collectionId)!==this.collectionIdOrName&&((l=this.client.authStore.model)==null?void 0:l.collectionName)!==this.collectionIdOrName||this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,r){return super.delete(t,r).then(n=>{var s,o,i;return!n||((s=this.client.authStore.model)==null?void 0:s.id)!==t||((o=this.client.authStore.model)==null?void 0:o.collectionId)!==this.collectionIdOrName&&((i=this.client.authStore.model)==null?void 0:i.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),n})}authResponse(t){const r=this.decode((t==null?void 0:t.record)||{});return this.client.authStore.save(t==null?void 0:t.token,r),Object.assign({},t,{token:(t==null?void 0:t.token)||"",record:r})}async listAuthMethods(t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCollectionPath+"/auth-methods",t).then(r=>Object.assign({},r,{usernamePassword:!!(r!=null&&r.usernamePassword),emailPassword:!!(r!=null&&r.emailPassword),authProviders:Array.isArray(r==null?void 0:r.authProviders)?r==null?void 0:r.authProviders:[]}))}async authWithPassword(t,r,n,s){let o={method:"POST",body:{identity:t,password:r}};return o=Or("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",o,n,s),this.client.send(this.baseCollectionPath+"/auth-with-password",o).then(i=>this.authResponse(i))}async authWithOAuth2Code(t,r,n,s,o,i,l){let c={method:"POST",body:{provider:t,code:r,codeVerifier:n,redirectUrl:s,createData:o}};return c=Or("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, options?).",c,i,l),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",c).then(u=>this.authResponse(u))}authWithOAuth2(...t){if(t.length>1||typeof(t==null?void 0:t[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{});const r=(t==null?void 0:t[0])||{};let n=null;r.urlCallback||(n=nw(void 0));const s=new yk(this.client);function o(){n==null||n.close(),s.unsubscribe()}const i={},l=r.requestKey;return l&&(i.requestKey=l),this.listAuthMethods(i).then(c=>{var m;const u=c.authProviders.find(v=>v.name===r.provider);if(!u)throw new Br(new Error(`Missing or invalid provider "${r.provider}".`));const d=this.client.buildUrl("/api/oauth2-redirect"),f=l?(m=this.client.cancelControllers)==null?void 0:m[l]:void 0;return f&&(f.signal.onabort=()=>{o()}),new Promise(async(v,x)=>{var y;try{await s.subscribe("@oauth2",async w=>{var j;const C=s.clientId;try{if(!w.state||C!==w.state)throw new Error("State parameters don't match.");if(w.error||!w.code)throw new Error("OAuth2 redirect error or missing code: "+w.error);const E=Object.assign({},r);delete E.provider,delete E.scopes,delete E.createData,delete E.urlCallback,(j=f==null?void 0:f.signal)!=null&&j.onabort&&(f.signal.onabort=null);const R=await this.authWithOAuth2Code(u.name,w.code,u.codeVerifier,d,r.createData,E);v(R)}catch(E){x(new Br(E))}o()});const _={state:s.clientId};(y=r.scopes)!=null&&y.length&&(_.scope=r.scopes.join(" "));const p=this._replaceQueryParams(u.authUrl+d,_);await(r.urlCallback||function(w){n?n.location.href=w:n=nw(w)})(p)}catch(_){o(),x(new Br(_))}})}).catch(c=>{throw o(),c})}async authRefresh(t,r){let n={method:"POST"};return n=Or("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",n,t,r),this.client.send(this.baseCollectionPath+"/auth-refresh",n).then(s=>this.authResponse(s))}async requestPasswordReset(t,r,n){let s={method:"POST",body:{email:t}};return s=Or("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,r,n,s,o){let i={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return i=Or("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCollectionPath+"/confirm-password-reset",i).then(()=>!0)}async requestVerification(t,r,n){let s={method:"POST",body:{email:t}};return s=Or("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}async confirmVerification(t,r,n){let s={method:"POST",body:{token:t}};return s=Or("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>{const o=ra(t),i=this.client.authStore.model;return i&&!i.verified&&i.id===o.id&&i.collectionId===o.collectionId&&(i.verified=!0,this.client.authStore.save(this.client.authStore.token,i)),!0})}async requestEmailChange(t,r,n){let s={method:"POST",body:{newEmail:t}};return s=Or("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}async confirmEmailChange(t,r,n,s){let o={method:"POST",body:{token:t,password:r}};return o=Or("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",o,n,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",o).then(()=>{const i=ra(t),l=this.client.authStore.model;return l&&l.id===i.id&&l.collectionId===i.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(t,r){return r=Object.assign({method:"GET"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",r)}async unlinkExternalAuth(t,r,n){return n=Object.assign({method:"DELETE"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths/"+encodeURIComponent(r),n).then(()=>!0)}_replaceQueryParams(t,r={}){let n=t,s="";t.indexOf("?")>=0&&(n=t.substring(0,t.indexOf("?")),s=t.substring(t.indexOf("?")+1));const o={},i=s.split("&");for(const l of i){if(l=="")continue;const c=l.split("=");o[decodeURIComponent(c[0].replace(/\+/g," "))]=decodeURIComponent((c[1]||"").replace(/\+/g," "))}for(let l in r)r.hasOwnProperty(l)&&(r[l]==null?delete o[l]:o[l]=r[l]);s="";for(let l in o)o.hasOwnProperty(l)&&(s!=""&&(s+="&"),s+=encodeURIComponent(l.replace(/%20/g,"+"))+"="+encodeURIComponent(o[l].replace(/%20/g,"+")));return s!=""?n+"?"+s:n}}function nw(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Br(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,r=768,n=window.innerWidth,s=window.innerHeight;t=t>n?n:t,r=r>s?s:r;let o=n/2-t/2,i=s/2-r/2;return window.open(e,"popup_window","width="+t+",height="+r+",top="+i+",left="+o+",resizable,menubar=no")}class RL extends jv{get baseCrudPath(){return"/api/collections"}async import(t,r=!1,n){return n=Object.assign({method:"PUT",body:{collections:t,deleteMissing:r}},n),this.client.send(this.baseCrudPath+"/import",n).then(()=>!0)}}class PL extends pi{async getList(t=1,r=30,n){return(n=Object.assign({method:"GET"},n)).query=Object.assign({page:t,perPage:r},n.query),this.client.send("/api/logs",n)}async getOne(t,r){if(!t)throw new Br({url:this.client.buildUrl("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return r=Object.assign({method:"GET"},r),this.client.send("/api/logs/"+encodeURIComponent(t),r)}async getStats(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/stats",t)}}class AL extends pi{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class DL extends pi{getUrl(t,r,n={}){if(!r||!(t!=null&&t.id)||!(t!=null&&t.collectionId)&&!(t!=null&&t.collectionName))return"";const s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(t.collectionId||t.collectionName)),s.push(encodeURIComponent(t.id)),s.push(encodeURIComponent(r));let o=this.client.buildUrl(s.join("/"));if(Object.keys(n).length){n.download===!1&&delete n.download;const i=new URLSearchParams(n);o+=(o.includes("?")?"&":"?")+i}return o}async getToken(t){return t=Object.assign({method:"POST"},t),this.client.send("/api/files/token",t).then(r=>(r==null?void 0:r.token)||"")}}class OL extends pi{async getFullList(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/backups",t)}async create(t,r){return r=Object.assign({method:"POST",body:{name:t}},r),this.client.send("/api/backups",r).then(()=>!0)}async upload(t,r){return r=Object.assign({method:"POST",body:t},r),this.client.send("/api/backups/upload",r).then(()=>!0)}async delete(t,r){return r=Object.assign({method:"DELETE"},r),this.client.send(`/api/backups/${encodeURIComponent(t)}`,r).then(()=>!0)}async restore(t,r){return r=Object.assign({method:"POST"},r),this.client.send(`/api/backups/${encodeURIComponent(t)}/restore`,r).then(()=>!0)}getDownloadUrl(t,r){return this.client.buildUrl(`/api/backups/${encodeURIComponent(r)}?token=${encodeURIComponent(t)}`)}}class ML{constructor(t="/",r,n="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=n,this.authStore=r||new CL,this.admins=new EL(this),this.collections=new RL(this),this.files=new DL(this),this.logs=new PL(this),this.settings=new jL(this),this.realtime=new yk(this),this.health=new AL(this),this.backups=new OL(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new TL(this,t)),this.recordServices[t]}autoCancellation(t){return this.enableAutoCancellation=!!t,this}cancelRequest(t){return this.cancelControllers[t]&&(this.cancelControllers[t].abort(),delete this.cancelControllers[t]),this}cancelAllRequests(){for(let t in this.cancelControllers)this.cancelControllers[t].abort();return this.cancelControllers={},this}filter(t,r){if(!r)return t;for(let n in r){let s=r[n];switch(typeof s){case"boolean":case"number":s=""+s;break;case"string":s="'"+s.replace(/'/g,"\\'")+"'";break;default:s=s===null?"null":s instanceof Date?"'"+s.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(s).replace(/'/g,"\\'")+"'"}t=t.replaceAll("{:"+n+"}",s)}return t}getFileUrl(t,r,n={}){return this.files.getUrl(t,r,n)}buildUrl(t){var n;let r=this.baseUrl;return typeof window>"u"||!window.location||r.startsWith("https://")||r.startsWith("http://")||(r=(n=window.location.origin)!=null&&n.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(r+=window.location.pathname||"/",r+=r.endsWith("/")?"":"/"),r+=this.baseUrl),t&&(r+=r.endsWith("/")?"":"/",r+=t.startsWith("/")?t.substring(1):t),r}async send(t,r){r=this.initSendOptions(t,r);let n=this.buildUrl(t);if(this.beforeSend){const s=Object.assign({},await this.beforeSend(n,r));s.url!==void 0||s.options!==void 0?(n=s.url||n,r=s.options||r):Object.keys(s).length&&(r=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(r.query!==void 0){const s=this.serializeQueryParams(r.query);s&&(n+=(n.includes("?")?"&":"?")+s),delete r.query}return this.getHeader(r.headers,"Content-Type")=="application/json"&&r.body&&typeof r.body!="string"&&(r.body=JSON.stringify(r.body)),(r.fetch||fetch)(n,r).then(async s=>{let o={};try{o=await s.json()}catch{}if(this.afterSend&&(o=await this.afterSend(s,o)),s.status>=400)throw new Br({url:s.url,status:s.status,data:o});return o}).catch(s=>{throw new Br(s)})}initSendOptions(t,r){if((r=Object.assign({method:"GET"},r)).body=this.convertToFormDataIfNeeded(r.body),vk(r),r.query=Object.assign({},r.params,r.query),r.requestKey===void 0&&(r.$autoCancel===!1||r.query.$autoCancel===!1?r.requestKey=null:(r.$cancelKey||r.query.$cancelKey)&&(r.requestKey=r.$cancelKey||r.query.$cancelKey)),delete r.$autoCancel,delete r.query.$autoCancel,delete r.$cancelKey,delete r.query.$cancelKey,this.getHeader(r.headers,"Content-Type")!==null||this.isFormData(r.body)||(r.headers=Object.assign({},r.headers,{"Content-Type":"application/json"})),this.getHeader(r.headers,"Accept-Language")===null&&(r.headers=Object.assign({},r.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(r.headers,"Authorization")===null&&(r.headers=Object.assign({},r.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&r.requestKey!==null){const n=r.requestKey||(r.method||"GET")+t;delete r.requestKey,this.cancelRequest(n);const s=new AbortController;this.cancelControllers[n]=s,r.signal=s.signal}return r}convertToFormDataIfNeeded(t){if(typeof FormData>"u"||t===void 0||typeof t!="object"||t===null||this.isFormData(t)||!this.hasBlobField(t))return t;const r=new FormData;for(const n in t){const s=t[n];if(typeof s!="object"||this.hasBlobField({data:s})){const o=Array.isArray(s)?s:[s];for(let i of o)r.append(n,i)}else{let o={};o[n]=s,r.append("@jsonPayload",JSON.stringify(o))}}return r}hasBlobField(t){for(const r in t){const n=Array.isArray(t[r])?t[r]:[t[r]];for(const s of n)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(t,r){t=t||{},r=r.toLowerCase();for(let n in t)if(n.toLowerCase()==r)return t[n];return null}isFormData(t){return t&&(t.constructor.name==="FormData"||typeof FormData<"u"&&t instanceof FormData)}serializeQueryParams(t){const r=[];for(const n in t){if(t[n]===null)continue;const s=t[n],o=encodeURIComponent(n);if(Array.isArray(s))for(const i of s)r.push(o+"="+encodeURIComponent(i));else s instanceof Date?r.push(o+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?r.push(o+"="+encodeURIComponent(JSON.stringify(s))):r.push(o+"="+encodeURIComponent(s))}return r.join("&")}}var IL={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const LL=IL.VITE_API_DOMAIN;console.log(LL);let _u;const st=()=>_u||(_u=new ML("/"),_u);//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var xk;function ye(){return xk.apply(null,arguments)}function FL(e){xk=e}function Cn(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Zo(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function ct(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ev(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(ct(e,t))return!1;return!0}function kr(e){return e===void 0}function Cs(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Dc(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function wk(e,t){var r=[],n,s=e.length;for(n=0;n<s;++n)r.push(t(e[n],n));return r}function ro(e,t){for(var r in t)ct(t,r)&&(e[r]=t[r]);return ct(t,"toString")&&(e.toString=t.toString),ct(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Zn(e,t,r,n){return Bk(e,t,r,n,!0).utc()}function zL(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Xe(e){return e._pf==null&&(e._pf=zL()),e._pf}var dm;Array.prototype.some?dm=Array.prototype.some:dm=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function Nv(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=Xe(e),r=dm.call(t.parsedDateParts,function(s){return s!=null}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function Pf(e){var t=Zn(NaN);return e!=null?ro(Xe(t),e):Xe(t).userInvalidated=!0,t}var sw=ye.momentProperties=[],Zh=!1;function Tv(e,t){var r,n,s,o=sw.length;if(kr(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),kr(t._i)||(e._i=t._i),kr(t._f)||(e._f=t._f),kr(t._l)||(e._l=t._l),kr(t._strict)||(e._strict=t._strict),kr(t._tzm)||(e._tzm=t._tzm),kr(t._isUTC)||(e._isUTC=t._isUTC),kr(t._offset)||(e._offset=t._offset),kr(t._pf)||(e._pf=Xe(t)),kr(t._locale)||(e._locale=t._locale),o>0)for(r=0;r<o;r++)n=sw[r],s=t[n],kr(s)||(e[n]=s);return e}function Oc(e){Tv(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Zh===!1&&(Zh=!0,ye.updateOffset(this),Zh=!1)}function jn(e){return e instanceof Oc||e!=null&&e._isAMomentObject!=null}function _k(e){ye.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function an(e,t){var r=!0;return ro(function(){if(ye.deprecationHandler!=null&&ye.deprecationHandler(null,e),r){var n=[],s,o,i,l=arguments.length;for(o=0;o<l;o++){if(s="",typeof arguments[o]=="object"){s+=`
[`+o+"] ";for(i in arguments[0])ct(arguments[0],i)&&(s+=i+": "+arguments[0][i]+", ");s=s.slice(0,-2)}else s=arguments[o];n.push(s)}_k(e+`
Arguments: `+Array.prototype.slice.call(n).join("")+`
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var ow={};function bk(e,t){ye.deprecationHandler!=null&&ye.deprecationHandler(e,t),ow[e]||(_k(t),ow[e]=!0)}ye.suppressDeprecationWarnings=!1;ye.deprecationHandler=null;function qn(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function UL(e){var t,r;for(r in e)ct(e,r)&&(t=e[r],qn(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function fm(e,t){var r=ro({},e),n;for(n in t)ct(t,n)&&(Zo(e[n])&&Zo(t[n])?(r[n]={},ro(r[n],e[n]),ro(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)ct(e,n)&&!ct(t,n)&&Zo(e[n])&&(r[n]=ro({},r[n]));return r}function Rv(e){e!=null&&this.set(e)}var hm;Object.keys?hm=Object.keys:hm=function(e){var t,r=[];for(t in e)ct(e,t)&&r.push(t);return r};var $L={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function VL(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return qn(n)?n.call(t,r):n}function Yn(e,t,r){var n=""+Math.abs(e),s=t-n.length,o=e>=0;return(o?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var Pv=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,bu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,qh={},na={};function Ie(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(na[e]=s),t&&(na[t[0]]=function(){return Yn(s.apply(this,arguments),t[1],t[2])}),r&&(na[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function BL(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function WL(e){var t=e.match(Pv),r,n;for(r=0,n=t.length;r<n;r++)na[t[r]]?t[r]=na[t[r]]:t[r]=BL(t[r]);return function(s){var o="",i;for(i=0;i<n;i++)o+=qn(t[i])?t[i].call(s,e):t[i];return o}}function Wu(e,t){return e.isValid()?(t=Sk(t,e.localeData()),qh[t]=qh[t]||WL(t),qh[t](e)):e.localeData().invalidDate()}function Sk(e,t){var r=5;function n(s){return t.longDateFormat(s)||s}for(bu.lastIndex=0;r>=0&&bu.test(e);)e=e.replace(bu,n),bu.lastIndex=0,r-=1;return e}var HL={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function YL(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(Pv).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var KL="Invalid date";function GL(){return this._invalidDate}var ZL="%d",qL=/\d{1,2}/;function XL(e){return this._ordinal.replace("%d",e)}var QL={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function JL(e,t,r,n){var s=this._relativeTime[r];return qn(s)?s(e,t,r,n):s.replace(/%d/i,e)}function e4(e,t){var r=this._relativeTime[e>0?"future":"past"];return qn(r)?r(t):r.replace(/%s/i,t)}var iw={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ln(e){return typeof e=="string"?iw[e]||iw[e.toLowerCase()]:void 0}function Av(e){var t={},r,n;for(n in e)ct(e,n)&&(r=ln(n),r&&(t[r]=e[n]));return t}var t4={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function r4(e){var t=[],r;for(r in e)ct(e,r)&&t.push({unit:r,priority:t4[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var kk=/\d/,Zr=/\d\d/,Ck=/\d{3}/,Dv=/\d{4}/,Af=/[+-]?\d{6}/,Ct=/\d\d?/,jk=/\d\d\d\d?/,Ek=/\d\d\d\d\d\d?/,Df=/\d{1,3}/,Ov=/\d{1,4}/,Of=/[+-]?\d{1,6}/,Ma=/\d+/,Mf=/[+-]?\d+/,n4=/Z|[+-]\d\d:?\d\d/gi,If=/Z|[+-]\d\d(?::?\d\d)?/gi,s4=/[+-]?\d+(\.\d{1,3})?/,Mc=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ia=/^[1-9]\d?/,Mv=/^([1-9]\d|\d)/,Rd;Rd={};function je(e,t,r){Rd[e]=qn(t)?t:function(n,s){return n&&r?r:t}}function o4(e,t){return ct(Rd,e)?Rd[e](t._strict,t._locale):new RegExp(i4(e))}function i4(e){return gs(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,o){return r||n||s||o}))}function gs(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function en(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function rt(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=en(t)),r}var pm={};function vt(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),Cs(t)&&(n=function(o,i){i[t]=rt(o)}),s=e.length,r=0;r<s;r++)pm[e[r]]=n}function Ic(e,t){vt(e,function(r,n,s,o){s._w=s._w||{},t(r,s._w,s,o)})}function a4(e,t,r){t!=null&&ct(pm,e)&&pm[e](t,r._a,r,e)}function Lf(e){return e%4===0&&e%100!==0||e%400===0}var cr=0,fs=1,Fn=2,Zt=3,vn=4,hs=5,Wo=6,l4=7,c4=8;Ie("Y",0,0,function(){var e=this.year();return e<=9999?Yn(e,4):"+"+e});Ie(0,["YY",2],0,function(){return this.year()%100});Ie(0,["YYYY",4],0,"year");Ie(0,["YYYYY",5],0,"year");Ie(0,["YYYYYY",6,!0],0,"year");je("Y",Mf);je("YY",Ct,Zr);je("YYYY",Ov,Dv);je("YYYYY",Of,Af);je("YYYYYY",Of,Af);vt(["YYYYY","YYYYYY"],cr);vt("YYYY",function(e,t){t[cr]=e.length===2?ye.parseTwoDigitYear(e):rt(e)});vt("YY",function(e,t){t[cr]=ye.parseTwoDigitYear(e)});vt("Y",function(e,t){t[cr]=parseInt(e,10)});function Cl(e){return Lf(e)?366:365}ye.parseTwoDigitYear=function(e){return rt(e)+(rt(e)>68?1900:2e3)};var Nk=La("FullYear",!0);function u4(){return Lf(this.year())}function La(e,t){return function(r){return r!=null?(Tk(this,e,r),ye.updateOffset(this,t),this):ec(this,e)}}function ec(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function Tk(e,t,r){var n,s,o,i,l;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(s?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(s?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(s?n.setUTCHours(r):n.setHours(r));case"Date":return void(s?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}o=r,i=e.month(),l=e.date(),l=l===29&&i===1&&!Lf(o)?28:l,s?n.setUTCFullYear(o,i,l):n.setFullYear(o,i,l)}}function d4(e){return e=ln(e),qn(this[e])?this[e]():this}function f4(e,t){if(typeof e=="object"){e=Av(e);var r=r4(e),n,s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(e=ln(e),qn(this[e]))return this[e](t);return this}function h4(e,t){return(e%t+t)%t}var zt;Array.prototype.indexOf?zt=Array.prototype.indexOf:zt=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Iv(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=h4(t,12);return e+=(t-r)/12,r===1?Lf(e)?29:28:31-r%7%2}Ie("M",["MM",2],"Mo",function(){return this.month()+1});Ie("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Ie("MMMM",0,0,function(e){return this.localeData().months(this,e)});je("M",Ct,Ia);je("MM",Ct,Zr);je("MMM",function(e,t){return t.monthsShortRegex(e)});je("MMMM",function(e,t){return t.monthsRegex(e)});vt(["M","MM"],function(e,t){t[fs]=rt(e)-1});vt(["MMM","MMMM"],function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);s!=null?t[fs]=s:Xe(r).invalidMonth=e});var p4="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Rk="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Pk=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,m4=Mc,g4=Mc;function v4(e,t){return e?Cn(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Pk).test(t)?"format":"standalone"][e.month()]:Cn(this._months)?this._months:this._months.standalone}function y4(e,t){return e?Cn(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Pk.test(t)?"format":"standalone"][e.month()]:Cn(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function x4(e,t,r){var n,s,o,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=Zn([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();return r?t==="MMM"?(s=zt.call(this._shortMonthsParse,i),s!==-1?s:null):(s=zt.call(this._longMonthsParse,i),s!==-1?s:null):t==="MMM"?(s=zt.call(this._shortMonthsParse,i),s!==-1?s:(s=zt.call(this._longMonthsParse,i),s!==-1?s:null)):(s=zt.call(this._longMonthsParse,i),s!==-1?s:(s=zt.call(this._shortMonthsParse,i),s!==-1?s:null))}function w4(e,t,r){var n,s,o;if(this._monthsParseExact)return x4.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=Zn([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(o="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function Ak(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=rt(t);else if(t=e.localeData().monthsParse(t),!Cs(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,Iv(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function Dk(e){return e!=null?(Ak(this,e),ye.updateOffset(this,!0),this):ec(this,"Month")}function _4(){return Iv(this.year(),this.month())}function b4(e){return this._monthsParseExact?(ct(this,"_monthsRegex")||Ok.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(ct(this,"_monthsShortRegex")||(this._monthsShortRegex=m4),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function S4(e){return this._monthsParseExact?(ct(this,"_monthsRegex")||Ok.call(this),e?this._monthsStrictRegex:this._monthsRegex):(ct(this,"_monthsRegex")||(this._monthsRegex=g4),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Ok(){function e(c,u){return u.length-c.length}var t=[],r=[],n=[],s,o,i,l;for(s=0;s<12;s++)o=Zn([2e3,s]),i=gs(this.monthsShort(o,"")),l=gs(this.months(o,"")),t.push(i),r.push(l),n.push(l),n.push(i);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function k4(e,t,r,n,s,o,i){var l;return e<100&&e>=0?(l=new Date(e+400,t,r,n,s,o,i),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,r,n,s,o,i),l}function tc(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Pd(e,t,r){var n=7+t-r,s=(7+tc(e,0,n).getUTCDay()-t)%7;return-s+n-1}function Mk(e,t,r,n,s){var o=(7+r-n)%7,i=Pd(e,n,s),l=1+7*(t-1)+o+i,c,u;return l<=0?(c=e-1,u=Cl(c)+l):l>Cl(e)?(c=e+1,u=l-Cl(e)):(c=e,u=l),{year:c,dayOfYear:u}}function rc(e,t,r){var n=Pd(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+vs(i,t,r)):s>vs(e.year(),t,r)?(o=s-vs(e.year(),t,r),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function vs(e,t,r){var n=Pd(e,t,r),s=Pd(e+1,t,r);return(Cl(e)-n+s)/7}Ie("w",["ww",2],"wo","week");Ie("W",["WW",2],"Wo","isoWeek");je("w",Ct,Ia);je("ww",Ct,Zr);je("W",Ct,Ia);je("WW",Ct,Zr);Ic(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=rt(e)});function C4(e){return rc(e,this._week.dow,this._week.doy).week}var j4={dow:0,doy:6};function E4(){return this._week.dow}function N4(){return this._week.doy}function T4(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function R4(e){var t=rc(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Ie("d",0,"do","day");Ie("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Ie("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Ie("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Ie("e",0,0,"weekday");Ie("E",0,0,"isoWeekday");je("d",Ct);je("e",Ct);je("E",Ct);je("dd",function(e,t){return t.weekdaysMinRegex(e)});je("ddd",function(e,t){return t.weekdaysShortRegex(e)});je("dddd",function(e,t){return t.weekdaysRegex(e)});Ic(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:Xe(r).invalidWeekday=e});Ic(["d","e","E"],function(e,t,r,n){t[n]=rt(e)});function P4(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function A4(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Lv(e,t){return e.slice(t,7).concat(e.slice(0,t))}var D4="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ik="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),O4="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),M4=Mc,I4=Mc,L4=Mc;function F4(e,t){var r=Cn(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Lv(r,this._week.dow):e?r[e.day()]:r}function z4(e){return e===!0?Lv(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function U4(e){return e===!0?Lv(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function $4(e,t,r){var n,s,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=Zn([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return r?t==="dddd"?(s=zt.call(this._weekdaysParse,i),s!==-1?s:null):t==="ddd"?(s=zt.call(this._shortWeekdaysParse,i),s!==-1?s:null):(s=zt.call(this._minWeekdaysParse,i),s!==-1?s:null):t==="dddd"?(s=zt.call(this._weekdaysParse,i),s!==-1||(s=zt.call(this._shortWeekdaysParse,i),s!==-1)?s:(s=zt.call(this._minWeekdaysParse,i),s!==-1?s:null)):t==="ddd"?(s=zt.call(this._shortWeekdaysParse,i),s!==-1||(s=zt.call(this._weekdaysParse,i),s!==-1)?s:(s=zt.call(this._minWeekdaysParse,i),s!==-1?s:null)):(s=zt.call(this._minWeekdaysParse,i),s!==-1||(s=zt.call(this._weekdaysParse,i),s!==-1)?s:(s=zt.call(this._shortWeekdaysParse,i),s!==-1?s:null))}function V4(e,t,r){var n,s,o;if(this._weekdaysParseExact)return $4.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=Zn([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function B4(e){if(!this.isValid())return e!=null?this:NaN;var t=ec(this,"Day");return e!=null?(e=P4(e,this.localeData()),this.add(e-t,"d")):t}function W4(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function H4(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=A4(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Y4(e){return this._weekdaysParseExact?(ct(this,"_weekdaysRegex")||Fv.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(ct(this,"_weekdaysRegex")||(this._weekdaysRegex=M4),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function K4(e){return this._weekdaysParseExact?(ct(this,"_weekdaysRegex")||Fv.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ct(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=I4),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function G4(e){return this._weekdaysParseExact?(ct(this,"_weekdaysRegex")||Fv.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ct(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=L4),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Fv(){function e(d,f){return f.length-d.length}var t=[],r=[],n=[],s=[],o,i,l,c,u;for(o=0;o<7;o++)i=Zn([2e3,1]).day(o),l=gs(this.weekdaysMin(i,"")),c=gs(this.weekdaysShort(i,"")),u=gs(this.weekdays(i,"")),t.push(l),r.push(c),n.push(u),s.push(l),s.push(c),s.push(u);t.sort(e),r.sort(e),n.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function zv(){return this.hours()%12||12}function Z4(){return this.hours()||24}Ie("H",["HH",2],0,"hour");Ie("h",["hh",2],0,zv);Ie("k",["kk",2],0,Z4);Ie("hmm",0,0,function(){return""+zv.apply(this)+Yn(this.minutes(),2)});Ie("hmmss",0,0,function(){return""+zv.apply(this)+Yn(this.minutes(),2)+Yn(this.seconds(),2)});Ie("Hmm",0,0,function(){return""+this.hours()+Yn(this.minutes(),2)});Ie("Hmmss",0,0,function(){return""+this.hours()+Yn(this.minutes(),2)+Yn(this.seconds(),2)});function Lk(e,t){Ie(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Lk("a",!0);Lk("A",!1);function Fk(e,t){return t._meridiemParse}je("a",Fk);je("A",Fk);je("H",Ct,Mv);je("h",Ct,Ia);je("k",Ct,Ia);je("HH",Ct,Zr);je("hh",Ct,Zr);je("kk",Ct,Zr);je("hmm",jk);je("hmmss",Ek);je("Hmm",jk);je("Hmmss",Ek);vt(["H","HH"],Zt);vt(["k","kk"],function(e,t,r){var n=rt(e);t[Zt]=n===24?0:n});vt(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});vt(["h","hh"],function(e,t,r){t[Zt]=rt(e),Xe(r).bigHour=!0});vt("hmm",function(e,t,r){var n=e.length-2;t[Zt]=rt(e.substr(0,n)),t[vn]=rt(e.substr(n)),Xe(r).bigHour=!0});vt("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Zt]=rt(e.substr(0,n)),t[vn]=rt(e.substr(n,2)),t[hs]=rt(e.substr(s)),Xe(r).bigHour=!0});vt("Hmm",function(e,t,r){var n=e.length-2;t[Zt]=rt(e.substr(0,n)),t[vn]=rt(e.substr(n))});vt("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Zt]=rt(e.substr(0,n)),t[vn]=rt(e.substr(n,2)),t[hs]=rt(e.substr(s))});function q4(e){return(e+"").toLowerCase().charAt(0)==="p"}var X4=/[ap]\.?m?\.?/i,Q4=La("Hours",!0);function J4(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var zk={calendar:$L,longDateFormat:HL,invalidDate:KL,ordinal:ZL,dayOfMonthOrdinalParse:qL,relativeTime:QL,months:p4,monthsShort:Rk,week:j4,weekdays:D4,weekdaysMin:O4,weekdaysShort:Ik,meridiemParse:X4},Nt={},el={},nc;function e5(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function aw(e){return e&&e.toLowerCase().replace("_","-")}function t5(e){for(var t=0,r,n,s,o;t<e.length;){for(o=aw(e[t]).split("-"),r=o.length,n=aw(e[t+1]),n=n?n.split("-"):null;r>0;){if(s=Ff(o.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&e5(o,n)>=r-1)break;r--}t++}return nc}function r5(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Ff(e){var t=null,r;if(Nt[e]===void 0&&typeof qu<"u"&&qu&&qu.exports&&r5(e))try{t=nc._abbr,r=require,r("./locale/"+e),po(t)}catch{Nt[e]=null}return Nt[e]}function po(e,t){var r;return e&&(kr(t)?r=Ds(e):r=Uv(e,t),r?nc=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nc._abbr}function Uv(e,t){if(t!==null){var r,n=zk;if(t.abbr=e,Nt[e]!=null)bk("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Nt[e]._config;else if(t.parentLocale!=null)if(Nt[t.parentLocale]!=null)n=Nt[t.parentLocale]._config;else if(r=Ff(t.parentLocale),r!=null)n=r._config;else return el[t.parentLocale]||(el[t.parentLocale]=[]),el[t.parentLocale].push({name:e,config:t}),null;return Nt[e]=new Rv(fm(n,t)),el[e]&&el[e].forEach(function(s){Uv(s.name,s.config)}),po(e),Nt[e]}else return delete Nt[e],null}function n5(e,t){if(t!=null){var r,n,s=zk;Nt[e]!=null&&Nt[e].parentLocale!=null?Nt[e].set(fm(Nt[e]._config,t)):(n=Ff(e),n!=null&&(s=n._config),t=fm(s,t),n==null&&(t.abbr=e),r=new Rv(t),r.parentLocale=Nt[e],Nt[e]=r),po(e)}else Nt[e]!=null&&(Nt[e].parentLocale!=null?(Nt[e]=Nt[e].parentLocale,e===po()&&po(e)):Nt[e]!=null&&delete Nt[e]);return Nt[e]}function Ds(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nc;if(!Cn(e)){if(t=Ff(e),t)return t;e=[e]}return t5(e)}function s5(){return hm(Nt)}function $v(e){var t,r=e._a;return r&&Xe(e).overflow===-2&&(t=r[fs]<0||r[fs]>11?fs:r[Fn]<1||r[Fn]>Iv(r[cr],r[fs])?Fn:r[Zt]<0||r[Zt]>24||r[Zt]===24&&(r[vn]!==0||r[hs]!==0||r[Wo]!==0)?Zt:r[vn]<0||r[vn]>59?vn:r[hs]<0||r[hs]>59?hs:r[Wo]<0||r[Wo]>999?Wo:-1,Xe(e)._overflowDayOfYear&&(t<cr||t>Fn)&&(t=Fn),Xe(e)._overflowWeeks&&t===-1&&(t=l4),Xe(e)._overflowWeekday&&t===-1&&(t=c4),Xe(e).overflow=t),e}var o5=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,i5=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,a5=/Z|[+-]\d\d(?::?\d\d)?/,Su=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Xh=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],l5=/^\/?Date\((-?\d+)/i,c5=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,u5={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Uk(e){var t,r,n=e._i,s=o5.exec(n)||i5.exec(n),o,i,l,c,u=Su.length,d=Xh.length;if(s){for(Xe(e).iso=!0,t=0,r=u;t<r;t++)if(Su[t][1].exec(s[1])){i=Su[t][0],o=Su[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(s[3]){for(t=0,r=d;t<r;t++)if(Xh[t][1].exec(s[3])){l=(s[2]||" ")+Xh[t][0];break}if(l==null){e._isValid=!1;return}}if(!o&&l!=null){e._isValid=!1;return}if(s[4])if(a5.exec(s[4]))c="Z";else{e._isValid=!1;return}e._f=i+(l||"")+(c||""),Bv(e)}else e._isValid=!1}function d5(e,t,r,n,s,o){var i=[f5(e),Rk.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return o&&i.push(parseInt(o,10)),i}function f5(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function h5(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function p5(e,t,r){if(e){var n=Ik.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(n!==s)return Xe(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function m5(e,t,r){if(e)return u5[e];if(t)return 0;var n=parseInt(r,10),s=n%100,o=(n-s)/100;return o*60+s}function $k(e){var t=c5.exec(h5(e._i)),r;if(t){if(r=d5(t[4],t[3],t[2],t[5],t[6],t[7]),!p5(t[1],r,e))return;e._a=r,e._tzm=m5(t[8],t[9],t[10]),e._d=tc.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Xe(e).rfc2822=!0}else e._isValid=!1}function g5(e){var t=l5.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Uk(e),e._isValid===!1)delete e._isValid;else return;if($k(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ye.createFromInputFallback(e)}ye.createFromInputFallback=an("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Ni(e,t,r){return e??t??r}function v5(e){var t=new Date(ye.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Vv(e){var t,r,n=[],s,o,i;if(!e._d){for(s=v5(e),e._w&&e._a[Fn]==null&&e._a[fs]==null&&y5(e),e._dayOfYear!=null&&(i=Ni(e._a[cr],s[cr]),(e._dayOfYear>Cl(i)||e._dayOfYear===0)&&(Xe(e)._overflowDayOfYear=!0),r=tc(i,0,e._dayOfYear),e._a[fs]=r.getUTCMonth(),e._a[Fn]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=s[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Zt]===24&&e._a[vn]===0&&e._a[hs]===0&&e._a[Wo]===0&&(e._nextDay=!0,e._a[Zt]=0),e._d=(e._useUTC?tc:k4).apply(null,n),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Zt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(Xe(e).weekdayMismatch=!0)}}function y5(e){var t,r,n,s,o,i,l,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,r=Ni(t.GG,e._a[cr],rc(kt(),1,4).year),n=Ni(t.W,1),s=Ni(t.E,1),(s<1||s>7)&&(c=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,u=rc(kt(),o,i),r=Ni(t.gg,e._a[cr],u.year),n=Ni(t.w,u.week),t.d!=null?(s=t.d,(s<0||s>6)&&(c=!0)):t.e!=null?(s=t.e+o,(t.e<0||t.e>6)&&(c=!0)):s=o),n<1||n>vs(r,o,i)?Xe(e)._overflowWeeks=!0:c!=null?Xe(e)._overflowWeekday=!0:(l=Mk(r,n,s,o,i),e._a[cr]=l.year,e._dayOfYear=l.dayOfYear)}ye.ISO_8601=function(){};ye.RFC_2822=function(){};function Bv(e){if(e._f===ye.ISO_8601){Uk(e);return}if(e._f===ye.RFC_2822){$k(e);return}e._a=[],Xe(e).empty=!0;var t=""+e._i,r,n,s,o,i,l=t.length,c=0,u,d;for(s=Sk(e._f,e._locale).match(Pv)||[],d=s.length,r=0;r<d;r++)o=s[r],n=(t.match(o4(o,e))||[])[0],n&&(i=t.substr(0,t.indexOf(n)),i.length>0&&Xe(e).unusedInput.push(i),t=t.slice(t.indexOf(n)+n.length),c+=n.length),na[o]?(n?Xe(e).empty=!1:Xe(e).unusedTokens.push(o),a4(o,n,e)):e._strict&&!n&&Xe(e).unusedTokens.push(o);Xe(e).charsLeftOver=l-c,t.length>0&&Xe(e).unusedInput.push(t),e._a[Zt]<=12&&Xe(e).bigHour===!0&&e._a[Zt]>0&&(Xe(e).bigHour=void 0),Xe(e).parsedDateParts=e._a.slice(0),Xe(e).meridiem=e._meridiem,e._a[Zt]=x5(e._locale,e._a[Zt],e._meridiem),u=Xe(e).era,u!==null&&(e._a[cr]=e._locale.erasConvertYear(u,e._a[cr])),Vv(e),$v(e)}function x5(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function w5(e){var t,r,n,s,o,i,l=!1,c=e._f.length;if(c===0){Xe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<c;s++)o=0,i=!1,t=Tv({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],Bv(t),Nv(t)&&(i=!0),o+=Xe(t).charsLeftOver,o+=Xe(t).unusedTokens.length*10,Xe(t).score=o,l?o<n&&(n=o,r=t):(n==null||o<n||i)&&(n=o,r=t,i&&(l=!0));ro(e,r||t)}function _5(e){if(!e._d){var t=Av(e._i),r=t.day===void 0?t.date:t.day;e._a=wk([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Vv(e)}}function b5(e){var t=new Oc($v(Vk(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Vk(e){var t=e._i,r=e._f;return e._locale=e._locale||Ds(e._l),t===null||r===void 0&&t===""?Pf({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),jn(t)?new Oc($v(t)):(Dc(t)?e._d=t:Cn(r)?w5(e):r?Bv(e):S5(e),Nv(e)||(e._d=null),e))}function S5(e){var t=e._i;kr(t)?e._d=new Date(ye.now()):Dc(t)?e._d=new Date(t.valueOf()):typeof t=="string"?g5(e):Cn(t)?(e._a=wk(t.slice(0),function(r){return parseInt(r,10)}),Vv(e)):Zo(t)?_5(e):Cs(t)?e._d=new Date(t):ye.createFromInputFallback(e)}function Bk(e,t,r,n,s){var o={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Zo(e)&&Ev(e)||Cn(e)&&e.length===0)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=s,o._l=r,o._i=e,o._f=t,o._strict=n,b5(o)}function kt(e,t,r,n){return Bk(e,t,r,n,!1)}var k5=an("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=kt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Pf()}),C5=an("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=kt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Pf()});function Wk(e,t){var r,n;if(t.length===1&&Cn(t[0])&&(t=t[0]),!t.length)return kt();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function j5(){var e=[].slice.call(arguments,0);return Wk("isBefore",e)}function E5(){var e=[].slice.call(arguments,0);return Wk("isAfter",e)}var N5=function(){return Date.now?Date.now():+new Date},tl=["year","quarter","month","week","day","hour","minute","second","millisecond"];function T5(e){var t,r=!1,n,s=tl.length;for(t in e)if(ct(e,t)&&!(zt.call(tl,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<s;++n)if(e[tl[n]]){if(r)return!1;parseFloat(e[tl[n]])!==rt(e[tl[n]])&&(r=!0)}return!0}function R5(){return this._isValid}function P5(){return Rn(NaN)}function zf(e){var t=Av(e),r=t.year||0,n=t.quarter||0,s=t.month||0,o=t.week||t.isoWeek||0,i=t.day||0,l=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=T5(t),this._milliseconds=+d+u*1e3+c*6e4+l*1e3*60*60,this._days=+i+o*7,this._months=+s+n*3+r*12,this._data={},this._locale=Ds(),this._bubble()}function Hu(e){return e instanceof zf}function mm(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function A5(e,t,r){var n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0,i;for(i=0;i<n;i++)rt(e[i])!==rt(t[i])&&o++;return o+s}function Hk(e,t){Ie(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Yn(~~(r/60),2)+t+Yn(~~r%60,2)})}Hk("Z",":");Hk("ZZ","");je("Z",If);je("ZZ",If);vt(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=Wv(If,e)});var D5=/([\+\-]|\d\d)/gi;function Wv(e,t){var r=(t||"").match(e),n,s,o;return r===null?null:(n=r[r.length-1]||[],s=(n+"").match(D5)||["-",0,0],o=+(s[1]*60)+rt(s[2]),o===0?0:s[0]==="+"?o:-o)}function Hv(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(jn(e)||Dc(e)?e.valueOf():kt(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),ye.updateOffset(r,!1),r):kt(e).local()}function gm(e){return-Math.round(e._d.getTimezoneOffset())}ye.updateOffset=function(){};function O5(e,t,r){var n=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Wv(If,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(s=gm(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?Gk(this,Rn(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ye.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:gm(this)}function M5(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function I5(e){return this.utcOffset(0,e)}function L5(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(gm(this),"m")),this}function F5(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Wv(n4,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function z5(e){return this.isValid()?(e=e?kt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function U5(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function $5(){if(!kr(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Tv(e,this),e=Vk(e),e._a?(t=e._isUTC?Zn(e._a):kt(e._a),this._isDSTShifted=this.isValid()&&A5(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function V5(){return this.isValid()?!this._isUTC:!1}function B5(){return this.isValid()?this._isUTC:!1}function Yk(){return this.isValid()?this._isUTC&&this._offset===0:!1}var W5=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,H5=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Rn(e,t){var r=e,n=null,s,o,i;return Hu(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:Cs(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=W5.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:rt(n[Fn])*s,h:rt(n[Zt])*s,m:rt(n[vn])*s,s:rt(n[hs])*s,ms:rt(mm(n[Wo]*1e3))*s}):(n=H5.exec(e))?(s=n[1]==="-"?-1:1,r={y:Ao(n[2],s),M:Ao(n[3],s),w:Ao(n[4],s),d:Ao(n[5],s),h:Ao(n[6],s),m:Ao(n[7],s),s:Ao(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(i=Y5(kt(r.from),kt(r.to)),r={},r.ms=i.milliseconds,r.M=i.months),o=new zf(r),Hu(e)&&ct(e,"_locale")&&(o._locale=e._locale),Hu(e)&&ct(e,"_isValid")&&(o._isValid=e._isValid),o}Rn.fn=zf.prototype;Rn.invalid=P5;function Ao(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function lw(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function Y5(e,t){var r;return e.isValid()&&t.isValid()?(t=Hv(t,e),e.isBefore(t)?r=lw(e,t):(r=lw(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Kk(e,t){return function(r,n){var s,o;return n!==null&&!isNaN(+n)&&(bk(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=r,r=n,n=o),s=Rn(r,n),Gk(this,s,e),this}}function Gk(e,t,r,n){var s=t._milliseconds,o=mm(t._days),i=mm(t._months);e.isValid()&&(n=n??!0,i&&Ak(e,ec(e,"Month")+i*r),o&&Tk(e,"Date",ec(e,"Date")+o*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&ye.updateOffset(e,o||i))}var K5=Kk(1,"add"),G5=Kk(-1,"subtract");function Zk(e){return typeof e=="string"||e instanceof String}function Z5(e){return jn(e)||Dc(e)||Zk(e)||Cs(e)||X5(e)||q5(e)||e===null||e===void 0}function q5(e){var t=Zo(e)&&!Ev(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,o,i=n.length;for(s=0;s<i;s+=1)o=n[s],r=r||ct(e,o);return t&&r}function X5(e){var t=Cn(e),r=!1;return t&&(r=e.filter(function(n){return!Cs(n)&&Zk(e)}).length===0),t&&r}function Q5(e){var t=Zo(e)&&!Ev(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,o;for(s=0;s<n.length;s+=1)o=n[s],r=r||ct(e,o);return t&&r}function J5(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function eF(e,t){arguments.length===1&&(arguments[0]?Z5(arguments[0])?(e=arguments[0],t=void 0):Q5(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||kt(),n=Hv(r,this).startOf("day"),s=ye.calendarFormat(this,n)||"sameElse",o=t&&(qn(t[s])?t[s].call(this,r):t[s]);return this.format(o||this.localeData().calendar(s,this,kt(r)))}function tF(){return new Oc(this)}function rF(e,t){var r=jn(e)?e:kt(e);return this.isValid()&&r.isValid()?(t=ln(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function nF(e,t){var r=jn(e)?e:kt(e);return this.isValid()&&r.isValid()?(t=ln(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function sF(e,t,r,n){var s=jn(e)?e:kt(e),o=jn(t)?t:kt(t);return this.isValid()&&s.isValid()&&o.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(s,r):!this.isBefore(s,r))&&(n[1]===")"?this.isBefore(o,r):!this.isAfter(o,r))):!1}function oF(e,t){var r=jn(e)?e:kt(e),n;return this.isValid()&&r.isValid()?(t=ln(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function iF(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function aF(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function lF(e,t,r){var n,s,o;if(!this.isValid())return NaN;if(n=Hv(e,this),!n.isValid())return NaN;switch(s=(n.utcOffset()-this.utcOffset())*6e4,t=ln(t),t){case"year":o=Yu(this,n)/12;break;case"month":o=Yu(this,n);break;case"quarter":o=Yu(this,n)/3;break;case"second":o=(this-n)/1e3;break;case"minute":o=(this-n)/6e4;break;case"hour":o=(this-n)/36e5;break;case"day":o=(this-n-s)/864e5;break;case"week":o=(this-n-s)/6048e5;break;default:o=this-n}return r?o:en(o)}function Yu(e,t){if(e.date()<t.date())return-Yu(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),s,o;return t-n<0?(s=e.clone().add(r-1,"months"),o=(t-n)/(n-s)):(s=e.clone().add(r+1,"months"),o=(t-n)/(s-n)),-(r+o)||0}ye.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";ye.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function cF(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function uF(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?Wu(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):qn(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Wu(r,"Z")):Wu(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function dF(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(r+n+s+o)}function fF(e){e||(e=this.isUtc()?ye.defaultFormatUtc:ye.defaultFormat);var t=Wu(this,e);return this.localeData().postformat(t)}function hF(e,t){return this.isValid()&&(jn(e)&&e.isValid()||kt(e).isValid())?Rn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function pF(e){return this.from(kt(),e)}function mF(e,t){return this.isValid()&&(jn(e)&&e.isValid()||kt(e).isValid())?Rn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function gF(e){return this.to(kt(),e)}function qk(e){var t;return e===void 0?this._locale._abbr:(t=Ds(e),t!=null&&(this._locale=t),this)}var Xk=an("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Qk(){return this._locale}var Ad=1e3,sa=60*Ad,Dd=60*sa,Jk=(365*400+97)*24*Dd;function oa(e,t){return(e%t+t)%t}function eC(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Jk:new Date(e,t,r).valueOf()}function tC(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Jk:Date.UTC(e,t,r)}function vF(e){var t,r;if(e=ln(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?tC:eC,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=oa(t+(this._isUTC?0:this.utcOffset()*sa),Dd);break;case"minute":t=this._d.valueOf(),t-=oa(t,sa);break;case"second":t=this._d.valueOf(),t-=oa(t,Ad);break}return this._d.setTime(t),ye.updateOffset(this,!0),this}function yF(e){var t,r;if(e=ln(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?tC:eC,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Dd-oa(t+(this._isUTC?0:this.utcOffset()*sa),Dd)-1;break;case"minute":t=this._d.valueOf(),t+=sa-oa(t,sa)-1;break;case"second":t=this._d.valueOf(),t+=Ad-oa(t,Ad)-1;break}return this._d.setTime(t),ye.updateOffset(this,!0),this}function xF(){return this._d.valueOf()-(this._offset||0)*6e4}function wF(){return Math.floor(this.valueOf()/1e3)}function _F(){return new Date(this.valueOf())}function bF(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function SF(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function kF(){return this.isValid()?this.toISOString():null}function CF(){return Nv(this)}function jF(){return ro({},Xe(this))}function EF(){return Xe(this).overflow}function NF(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Ie("N",0,0,"eraAbbr");Ie("NN",0,0,"eraAbbr");Ie("NNN",0,0,"eraAbbr");Ie("NNNN",0,0,"eraName");Ie("NNNNN",0,0,"eraNarrow");Ie("y",["y",1],"yo","eraYear");Ie("y",["yy",2],0,"eraYear");Ie("y",["yyy",3],0,"eraYear");Ie("y",["yyyy",4],0,"eraYear");je("N",Yv);je("NN",Yv);je("NNN",Yv);je("NNNN",zF);je("NNNNN",UF);vt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?Xe(r).era=s:Xe(r).invalidEra=e});je("y",Ma);je("yy",Ma);je("yyy",Ma);je("yyyy",Ma);je("yo",$F);vt(["y","yy","yyy","yyyy"],cr);vt(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[cr]=r._locale.eraYearOrdinalParse(e,s):t[cr]=parseInt(e,10)});function TF(e,t){var r,n,s,o=this._eras||Ds("en")._eras;for(r=0,n=o.length;r<n;++r){switch(typeof o[r].since){case"string":s=ye(o[r].since).startOf("day"),o[r].since=s.valueOf();break}switch(typeof o[r].until){case"undefined":o[r].until=1/0;break;case"string":s=ye(o[r].until).startOf("day").valueOf(),o[r].until=s.valueOf();break}}return o}function RF(e,t,r){var n,s,o=this.eras(),i,l,c;for(e=e.toUpperCase(),n=0,s=o.length;n<s;++n)if(i=o[n].name.toUpperCase(),l=o[n].abbr.toUpperCase(),c=o[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(l===e)return o[n];break;case"NNNN":if(i===e)return o[n];break;case"NNNNN":if(c===e)return o[n];break}else if([i,l,c].indexOf(e)>=0)return o[n]}function PF(e,t){var r=e.since<=e.until?1:-1;return t===void 0?ye(e.since).year():ye(e.since).year()+(t-e.offset)*r}function AF(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function DF(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function OF(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function MF(){var e,t,r,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=s[e].since<=s[e].until?1:-1,n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return(this.year()-ye(s[e].since).year())*r+s[e].offset;return this.year()}function IF(e){return ct(this,"_erasNameRegex")||Kv.call(this),e?this._erasNameRegex:this._erasRegex}function LF(e){return ct(this,"_erasAbbrRegex")||Kv.call(this),e?this._erasAbbrRegex:this._erasRegex}function FF(e){return ct(this,"_erasNarrowRegex")||Kv.call(this),e?this._erasNarrowRegex:this._erasRegex}function Yv(e,t){return t.erasAbbrRegex(e)}function zF(e,t){return t.erasNameRegex(e)}function UF(e,t){return t.erasNarrowRegex(e)}function $F(e,t){return t._eraYearOrdinalRegex||Ma}function Kv(){var e=[],t=[],r=[],n=[],s,o,i,l,c,u=this.eras();for(s=0,o=u.length;s<o;++s)i=gs(u[s].name),l=gs(u[s].abbr),c=gs(u[s].narrow),t.push(i),e.push(l),r.push(c),n.push(i),n.push(l),n.push(c);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}Ie(0,["gg",2],0,function(){return this.weekYear()%100});Ie(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Uf(e,t){Ie(0,[e,e.length],0,t)}Uf("gggg","weekYear");Uf("ggggg","weekYear");Uf("GGGG","isoWeekYear");Uf("GGGGG","isoWeekYear");je("G",Mf);je("g",Mf);je("GG",Ct,Zr);je("gg",Ct,Zr);je("GGGG",Ov,Dv);je("gggg",Ov,Dv);je("GGGGG",Of,Af);je("ggggg",Of,Af);Ic(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=rt(e)});Ic(["gg","GG"],function(e,t,r,n){t[n]=ye.parseTwoDigitYear(e)});function VF(e){return rC.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function BF(e){return rC.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function WF(){return vs(this.year(),1,4)}function HF(){return vs(this.isoWeekYear(),1,4)}function YF(){var e=this.localeData()._week;return vs(this.year(),e.dow,e.doy)}function KF(){var e=this.localeData()._week;return vs(this.weekYear(),e.dow,e.doy)}function rC(e,t,r,n,s){var o;return e==null?rc(this,n,s).year:(o=vs(e,n,s),t>o&&(t=o),GF.call(this,e,t,r,n,s))}function GF(e,t,r,n,s){var o=Mk(e,t,r,n,s),i=tc(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}Ie("Q",0,"Qo","quarter");je("Q",kk);vt("Q",function(e,t){t[fs]=(rt(e)-1)*3});function ZF(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Ie("D",["DD",2],"Do","date");je("D",Ct,Ia);je("DD",Ct,Zr);je("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});vt(["D","DD"],Fn);vt("Do",function(e,t){t[Fn]=rt(e.match(Ct)[0])});var nC=La("Date",!0);Ie("DDD",["DDDD",3],"DDDo","dayOfYear");je("DDD",Df);je("DDDD",Ck);vt(["DDD","DDDD"],function(e,t,r){r._dayOfYear=rt(e)});function qF(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Ie("m",["mm",2],0,"minute");je("m",Ct,Mv);je("mm",Ct,Zr);vt(["m","mm"],vn);var XF=La("Minutes",!1);Ie("s",["ss",2],0,"second");je("s",Ct,Mv);je("ss",Ct,Zr);vt(["s","ss"],hs);var QF=La("Seconds",!1);Ie("S",0,0,function(){return~~(this.millisecond()/100)});Ie(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Ie(0,["SSS",3],0,"millisecond");Ie(0,["SSSS",4],0,function(){return this.millisecond()*10});Ie(0,["SSSSS",5],0,function(){return this.millisecond()*100});Ie(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Ie(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Ie(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Ie(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});je("S",Df,kk);je("SS",Df,Zr);je("SSS",Df,Ck);var no,sC;for(no="SSSS";no.length<=9;no+="S")je(no,Ma);function JF(e,t){t[Wo]=rt(("0."+e)*1e3)}for(no="S";no.length<=9;no+="S")vt(no,JF);sC=La("Milliseconds",!1);Ie("z",0,0,"zoneAbbr");Ie("zz",0,0,"zoneName");function e3(){return this._isUTC?"UTC":""}function t3(){return this._isUTC?"Coordinated Universal Time":""}var le=Oc.prototype;le.add=K5;le.calendar=eF;le.clone=tF;le.diff=lF;le.endOf=yF;le.format=fF;le.from=hF;le.fromNow=pF;le.to=mF;le.toNow=gF;le.get=d4;le.invalidAt=EF;le.isAfter=rF;le.isBefore=nF;le.isBetween=sF;le.isSame=oF;le.isSameOrAfter=iF;le.isSameOrBefore=aF;le.isValid=CF;le.lang=Xk;le.locale=qk;le.localeData=Qk;le.max=C5;le.min=k5;le.parsingFlags=jF;le.set=f4;le.startOf=vF;le.subtract=G5;le.toArray=bF;le.toObject=SF;le.toDate=_F;le.toISOString=uF;le.inspect=dF;typeof Symbol<"u"&&Symbol.for!=null&&(le[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});le.toJSON=kF;le.toString=cF;le.unix=wF;le.valueOf=xF;le.creationData=NF;le.eraName=AF;le.eraNarrow=DF;le.eraAbbr=OF;le.eraYear=MF;le.year=Nk;le.isLeapYear=u4;le.weekYear=VF;le.isoWeekYear=BF;le.quarter=le.quarters=ZF;le.month=Dk;le.daysInMonth=_4;le.week=le.weeks=T4;le.isoWeek=le.isoWeeks=R4;le.weeksInYear=YF;le.weeksInWeekYear=KF;le.isoWeeksInYear=WF;le.isoWeeksInISOWeekYear=HF;le.date=nC;le.day=le.days=B4;le.weekday=W4;le.isoWeekday=H4;le.dayOfYear=qF;le.hour=le.hours=Q4;le.minute=le.minutes=XF;le.second=le.seconds=QF;le.millisecond=le.milliseconds=sC;le.utcOffset=O5;le.utc=I5;le.local=L5;le.parseZone=F5;le.hasAlignedHourOffset=z5;le.isDST=U5;le.isLocal=V5;le.isUtcOffset=B5;le.isUtc=Yk;le.isUTC=Yk;le.zoneAbbr=e3;le.zoneName=t3;le.dates=an("dates accessor is deprecated. Use date instead.",nC);le.months=an("months accessor is deprecated. Use month instead",Dk);le.years=an("years accessor is deprecated. Use year instead",Nk);le.zone=an("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",M5);le.isDSTShifted=an("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",$5);function r3(e){return kt(e*1e3)}function n3(){return kt.apply(null,arguments).parseZone()}function oC(e){return e}var ut=Rv.prototype;ut.calendar=VL;ut.longDateFormat=YL;ut.invalidDate=GL;ut.ordinal=XL;ut.preparse=oC;ut.postformat=oC;ut.relativeTime=JL;ut.pastFuture=e4;ut.set=UL;ut.eras=TF;ut.erasParse=RF;ut.erasConvertYear=PF;ut.erasAbbrRegex=LF;ut.erasNameRegex=IF;ut.erasNarrowRegex=FF;ut.months=v4;ut.monthsShort=y4;ut.monthsParse=w4;ut.monthsRegex=S4;ut.monthsShortRegex=b4;ut.week=C4;ut.firstDayOfYear=N4;ut.firstDayOfWeek=E4;ut.weekdays=F4;ut.weekdaysMin=U4;ut.weekdaysShort=z4;ut.weekdaysParse=V4;ut.weekdaysRegex=Y4;ut.weekdaysShortRegex=K4;ut.weekdaysMinRegex=G4;ut.isPM=q4;ut.meridiem=J4;function Od(e,t,r,n){var s=Ds(),o=Zn().set(n,t);return s[r](o,e)}function iC(e,t,r){if(Cs(e)&&(t=e,e=void 0),e=e||"",t!=null)return Od(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=Od(e,n,r,"month");return s}function Gv(e,t,r,n){typeof e=="boolean"?(Cs(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,Cs(t)&&(r=t,t=void 0),t=t||"");var s=Ds(),o=e?s._week.dow:0,i,l=[];if(r!=null)return Od(t,(r+o)%7,n,"day");for(i=0;i<7;i++)l[i]=Od(t,(i+o)%7,n,"day");return l}function s3(e,t){return iC(e,t,"months")}function o3(e,t){return iC(e,t,"monthsShort")}function i3(e,t,r){return Gv(e,t,r,"weekdays")}function a3(e,t,r){return Gv(e,t,r,"weekdaysShort")}function l3(e,t,r){return Gv(e,t,r,"weekdaysMin")}po("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=rt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});ye.lang=an("moment.lang is deprecated. Use moment.locale instead.",po);ye.langData=an("moment.langData is deprecated. Use moment.localeData instead.",Ds);var ns=Math.abs;function c3(){var e=this._data;return this._milliseconds=ns(this._milliseconds),this._days=ns(this._days),this._months=ns(this._months),e.milliseconds=ns(e.milliseconds),e.seconds=ns(e.seconds),e.minutes=ns(e.minutes),e.hours=ns(e.hours),e.months=ns(e.months),e.years=ns(e.years),this}function aC(e,t,r,n){var s=Rn(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function u3(e,t){return aC(this,e,t,1)}function d3(e,t){return aC(this,e,t,-1)}function cw(e){return e<0?Math.floor(e):Math.ceil(e)}function f3(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,o,i,l,c;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=cw(vm(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=en(e/1e3),n.seconds=s%60,o=en(s/60),n.minutes=o%60,i=en(o/60),n.hours=i%24,t+=en(i/24),c=en(lC(t)),r+=c,t-=cw(vm(c)),l=en(r/12),r%=12,n.days=t,n.months=r,n.years=l,this}function lC(e){return e*4800/146097}function vm(e){return e*146097/4800}function h3(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=ln(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+lC(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(vm(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function Os(e){return function(){return this.as(e)}}var cC=Os("ms"),p3=Os("s"),m3=Os("m"),g3=Os("h"),v3=Os("d"),y3=Os("w"),x3=Os("M"),w3=Os("Q"),_3=Os("y"),b3=cC;function S3(){return Rn(this)}function k3(e){return e=ln(e),this.isValid()?this[e+"s"]():NaN}function mi(e){return function(){return this.isValid()?this._data[e]:NaN}}var C3=mi("milliseconds"),j3=mi("seconds"),E3=mi("minutes"),N3=mi("hours"),T3=mi("days"),R3=mi("months"),P3=mi("years");function A3(){return en(this.days()/7)}var as=Math.round,Bi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function D3(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function O3(e,t,r,n){var s=Rn(e).abs(),o=as(s.as("s")),i=as(s.as("m")),l=as(s.as("h")),c=as(s.as("d")),u=as(s.as("M")),d=as(s.as("w")),f=as(s.as("y")),m=o<=r.ss&&["s",o]||o<r.s&&["ss",o]||i<=1&&["m"]||i<r.m&&["mm",i]||l<=1&&["h"]||l<r.h&&["hh",l]||c<=1&&["d"]||c<r.d&&["dd",c];return r.w!=null&&(m=m||d<=1&&["w"]||d<r.w&&["ww",d]),m=m||u<=1&&["M"]||u<r.M&&["MM",u]||f<=1&&["y"]||["yy",f],m[2]=t,m[3]=+e>0,m[4]=n,D3.apply(null,m)}function M3(e){return e===void 0?as:typeof e=="function"?(as=e,!0):!1}function I3(e,t){return Bi[e]===void 0?!1:t===void 0?Bi[e]:(Bi[e]=t,e==="s"&&(Bi.ss=t-1),!0)}function L3(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Bi,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Bi,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),o=O3(this,!r,n,s),r&&(o=s.pastFuture(+this,o)),s.postformat(o)}var Qh=Math.abs;function ji(e){return(e>0)-(e<0)||+e}function $f(){if(!this.isValid())return this.localeData().invalidDate();var e=Qh(this._milliseconds)/1e3,t=Qh(this._days),r=Qh(this._months),n,s,o,i,l=this.asSeconds(),c,u,d,f;return l?(n=en(e/60),s=en(n/60),e%=60,n%=60,o=en(r/12),r%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=l<0?"-":"",u=ji(this._months)!==ji(l)?"-":"",d=ji(this._days)!==ji(l)?"-":"",f=ji(this._milliseconds)!==ji(l)?"-":"",c+"P"+(o?u+o+"Y":"")+(r?u+r+"M":"")+(t?d+t+"D":"")+(s||n||e?"T":"")+(s?f+s+"H":"")+(n?f+n+"M":"")+(e?f+i+"S":"")):"P0D"}var it=zf.prototype;it.isValid=R5;it.abs=c3;it.add=u3;it.subtract=d3;it.as=h3;it.asMilliseconds=cC;it.asSeconds=p3;it.asMinutes=m3;it.asHours=g3;it.asDays=v3;it.asWeeks=y3;it.asMonths=x3;it.asQuarters=w3;it.asYears=_3;it.valueOf=b3;it._bubble=f3;it.clone=S3;it.get=k3;it.milliseconds=C3;it.seconds=j3;it.minutes=E3;it.hours=N3;it.days=T3;it.weeks=A3;it.months=R3;it.years=P3;it.humanize=L3;it.toISOString=$f;it.toString=$f;it.toJSON=$f;it.locale=qk;it.localeData=Qk;it.toIsoString=an("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$f);it.lang=Xk;Ie("X",0,0,"unix");Ie("x",0,0,"valueOf");je("x",Mf);je("X",s4);vt("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});vt("x",function(e,t,r){r._d=new Date(rt(e))});//! moment.js
ye.version="2.30.1";FL(kt);ye.fn=le;ye.min=j5;ye.max=E5;ye.now=N5;ye.utc=Zn;ye.unix=r3;ye.months=s3;ye.isDate=Dc;ye.locale=po;ye.invalid=Pf;ye.duration=Rn;ye.isMoment=jn;ye.weekdays=i3;ye.parseZone=n3;ye.localeData=Ds;ye.isDuration=Hu;ye.monthsShort=o3;ye.weekdaysMin=l3;ye.defineLocale=Uv;ye.updateLocale=n5;ye.locales=s5;ye.weekdaysShort=a3;ye.normalizeUnits=ln;ye.relativeTimeRounding=M3;ye.relativeTimeThreshold=I3;ye.calendarFormat=J5;ye.prototype=le;ye.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const F3=async()=>await st().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),Ms=async e=>e.id?await st().collection("access").update(e.id,e):await st().collection("access").create(e),z3=async e=>(e.deleted=ye.utc().format("YYYY-MM-DD HH:mm:ss"),await st().collection("access").update(e.id,e)),uw=async()=>await st().collection("access_groups").getFullList({sort:"-created",expand:"access"}),U3=async e=>{const t=st();if((await t.collection("access").getList(1,1,{filter:`group='${e}' && deleted=null`})).items.length>0)throw new Error("该分组下有授权配置,无法删除");await t.collection("access_groups").delete(e)},$3=async e=>{const t=st();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},dw=async e=>await st().collection("access_groups").update(e.id,e),V3=(e,t)=>{switch(t.type){case"SET_ACCESSES":return{...e,accesses:t.payload};case"ADD_ACCESS":return{...e,accesses:[t.payload,...e.accesses]};case"DELETE_ACCESS":return{...e,accesses:e.accesses.filter(r=>r.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(r=>r.id===t.payload.id?t.payload:r)};case"SET_EMAILS":return{...e,emails:t.payload};case"ADD_EMAIL":return{...e,emails:{...e.emails,content:{emails:[...e.emails.content.emails,t.payload]}}};case"SET_ACCESS_GROUPS":return{...e,accessGroups:t.payload};default:return e}},B3=async()=>{try{return await st().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},Zv=async e=>{try{return await st().collection("settings").getFirstListItem(`name='${e}'`)}catch{return{name:e}}},Fa=async e=>{const t=st();let r;return e.id?r=await t.collection("settings").update(e.id,e):r=await t.collection("settings").create(e),r},uC=g.createContext({}),Ar=()=>g.useContext(uC),W3=({children:e})=>{const[t,r]=g.useReducer(V3,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});g.useEffect(()=>{(async()=>{const d=await F3();r({type:"SET_ACCESSES",payload:d})})()},[]),g.useEffect(()=>{(async()=>{const d=await B3();r({type:"SET_EMAILS",payload:d})})()},[]),g.useEffect(()=>{(async()=>{const d=await uw();r({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const n=g.useCallback(async()=>{const u=await uw();r({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=g.useCallback(u=>{r({type:"SET_EMAILS",payload:u})},[]),o=g.useCallback(u=>{r({type:"DELETE_ACCESS",payload:u})},[]),i=g.useCallback(u=>{r({type:"ADD_ACCESS",payload:u})},[]),l=g.useCallback(u=>{r({type:"UPDATE_ACCESS",payload:u})},[]),c=g.useCallback(u=>{r({type:"SET_ACCESS_GROUPS",payload:u})},[]);return a.jsx(uC.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:o,addAccess:i,setEmails:s,updateAccess:l,setAccessGroups:c,reloadAccessGroups:n},children:e&&e})},H3={theme:"system",setTheme:()=>null},dC=g.createContext(H3);function Y3({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme",...n}){const[s,o]=g.useState(()=>localStorage.getItem(r)||t);g.useEffect(()=>{const l=window.document.documentElement;if(l.classList.remove("light","dark"),s==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";l.classList.add(c);return}l.classList.add(s)},[s]);const i={theme:s,setTheme:l=>{localStorage.setItem(r,l),o(l)}};return a.jsx(dC.Provider,{...n,value:i,children:e})}const K3=()=>{const e=g.useContext(dC);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function G3(){const{setTheme:e}=K3();return a.jsxs(KS,{children:[a.jsx(GS,{asChild:!0,children:a.jsxs(He,{variant:"outline",size:"icon",children:[a.jsx(LA,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),a.jsx(OA,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),a.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),a.jsxs(pv,{align:"end",children:[a.jsx(ta,{onClick:()=>e("light"),children:"浅色"}),a.jsx(ta,{onClick:()=>e("dark"),children:"暗黑"}),a.jsx(ta,{onClick:()=>e("system"),children:"系统"})]})]})}var Z3="Separator",fw="horizontal",q3=["horizontal","vertical"],fC=g.forwardRef((e,t)=>{const{decorative:r,orientation:n=fw,...s}=e,o=X3(n)?n:fw,l=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return a.jsx(Re.div,{"data-orientation":o,...l,...s,ref:t})});fC.displayName=Z3;function X3(e){return q3.includes(e)}var hC=fC;const Bt=g.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},s)=>a.jsx(hC,{ref:s,decorative:r,orientation:t,className:oe("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Bt.displayName=hC.displayName;const Q3="Certimate v0.1.11",pC=()=>a.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[a.jsx("div",{className:""}),a.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[a.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[a.jsx(bA,{size:16}),a.jsx("div",{className:"ml-1",children:"文档"})]}),a.jsx(Bt,{orientation:"vertical",className:"mx-2"}),a.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:Q3})]})]});function J3(){const e=Pr(),t=Nn();if(!st().authStore.isValid||!st().authStore.isAdmin)return a.jsx(ib,{to:"/login"});const r=t.pathname,n=i=>(console.log(r),i==r?"bg-muted text-primary":"text-muted-foreground"),s=()=>{st().authStore.clear(),e("/login")},o=()=>{e("/setting/account")};return a.jsx(a.Fragment,{children:a.jsx(W3,{children:a.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[180px_1fr] lg:grid-cols-[200px_1fr] 2xl:md:grid-cols-[280px_1fr] ",children:[a.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:a.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[a.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:a.jsxs(gr,{to:"/",className:"flex items-center gap-2 font-semibold",children:[a.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),a.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),a.jsx("div",{className:"flex-1",children:a.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[a.jsxs(gr,{to:"/",className:oe("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/")),children:[a.jsx(E0,{className:"h-4 w-4"}),"控制面板"]}),a.jsxs(gr,{to:"/domains",className:oe("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/domains")),children:[a.jsx(rm,{className:"h-4 w-4"}),"域名列表"]}),a.jsxs(gr,{to:"/access",className:oe("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/access")),children:[a.jsx(N0,{className:"h-4 w-4"}),"授权管理"]}),a.jsxs(gr,{to:"/history",className:oe("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/history")),children:[a.jsx(j0,{className:"h-4 w-4"}),"部署历史"]})]})})]})}),a.jsxs("div",{className:"flex flex-col",children:[a.jsxs("header",{className:"flex h-14 items-center gap-4 border-b dark:border-stone-500 bg-muted/40 px-4 lg:h-[60px] lg:px-6",children:[a.jsxs(bv,{children:[a.jsx(Sv,{asChild:!0,children:a.jsxs(He,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[a.jsx(DA,{className:"h-5 w-5 dark:text-white"}),a.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),a.jsx(Rf,{side:"left",className:"flex flex-col",children:a.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[a.jsxs(gr,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[a.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),a.jsx("span",{className:"dark:text-white",children:"Certimate"}),a.jsx("span",{className:"sr-only",children:"Certimate"})]}),a.jsxs(gr,{to:"/",className:oe("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/")),children:[a.jsx(E0,{className:"h-5 w-5"}),"控制面板"]}),a.jsxs(gr,{to:"/domains",className:oe("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/domains")),children:[a.jsx(rm,{className:"h-5 w-5"}),"域名列表"]}),a.jsxs(gr,{to:"/access",className:oe("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/access")),children:[a.jsx(N0,{className:"h-5 w-5"}),"授权管理"]}),a.jsxs(gr,{to:"/history",className:oe("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/history")),children:[a.jsx(j0,{className:"h-5 w-5"}),"部署历史"]})]})})]}),a.jsx("div",{className:"w-full flex-1"}),a.jsx(G3,{}),a.jsxs(KS,{children:[a.jsx(GS,{asChild:!0,children:a.jsxs(He,{variant:"secondary",size:"icon",className:"rounded-full",children:[a.jsx(EA,{className:"h-5 w-5"}),a.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),a.jsxs(pv,{align:"end",children:[a.jsx(ZS,{children:"账户"}),a.jsx(qS,{}),a.jsx(ta,{onClick:o,children:"偏好设置"}),a.jsx(ta,{onClick:s,children:"退出"})]})]})]}),a.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[a.jsx(Lg,{}),a.jsx(pC,{})]})]})]})})})}const qv=({phase:e,phaseSuccess:t})=>{let r=a.jsx(a.Fragment,{children:" "});return e==="check"&&(t?r=a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),a.jsx(Bt,{className:"h-1 grow"}),a.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),a.jsx(Bt,{className:"h-1 grow"}),a.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"检查 "}),a.jsx(Bt,{className:"h-1 grow"}),a.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),a.jsx(Bt,{className:"h-1 grow"}),a.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="apply"&&(t?r=a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),a.jsx(Bt,{className:"h-1 grow bg-green-600"}),a.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),a.jsx(Bt,{className:"h-1 grow"}),a.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),a.jsx(Bt,{className:"h-1 grow bg-green-600"}),a.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"获取"}),a.jsx(Bt,{className:"h-1 grow"}),a.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="deploy"&&(t?r=a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),a.jsx(Bt,{className:"h-1 grow bg-green-600"}),a.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),a.jsx(Bt,{className:"h-1 grow bg-green-600"}),a.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"部署"})]}):r=a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),a.jsx(Bt,{className:"h-1 grow bg-green-600"}),a.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),a.jsx(Bt,{className:"h-1 grow bg-green-600"}),a.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"部署"})]})),r};var e6="VisuallyHidden",Lc=g.forwardRef((e,t)=>a.jsx(Re.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Lc.displayName=e6;var t6=Lc,[Vf,J$]=sr("Tooltip",[Da]),Bf=Da(),mC="TooltipProvider",r6=700,ym="tooltip.open",[n6,Xv]=Vf(mC),Qv=e=>{const{__scopeTooltip:t,delayDuration:r=r6,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,[i,l]=g.useState(!0),c=g.useRef(!1),u=g.useRef(0);return g.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),a.jsx(n6,{scope:t,isOpenDelayed:i,delayDuration:r,onOpen:g.useCallback(()=>{window.clearTimeout(u.current),l(!1)},[]),onClose:g.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>l(!0),n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:g.useCallback(d=>{c.current=d},[]),disableHoverableContent:s,children:o})};Qv.displayName=mC;var Wf="Tooltip",[s6,Hf]=Vf(Wf),gC=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:l}=e,c=Xv(Wf,e.__scopeTooltip),u=Bf(t),[d,f]=g.useState(null),m=$r(),v=g.useRef(0),x=i??c.disableHoverableContent,y=l??c.delayDuration,_=g.useRef(!1),[p=!1,h]=Yr({prop:n,defaultProp:s,onChange:R=>{R?(c.onOpen(),document.dispatchEvent(new CustomEvent(ym))):c.onClose(),o==null||o(R)}}),w=g.useMemo(()=>p?_.current?"delayed-open":"instant-open":"closed",[p]),C=g.useCallback(()=>{window.clearTimeout(v.current),_.current=!1,h(!0)},[h]),j=g.useCallback(()=>{window.clearTimeout(v.current),h(!1)},[h]),E=g.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{_.current=!0,h(!0)},y)},[y,h]);return g.useEffect(()=>()=>window.clearTimeout(v.current),[]),a.jsx(Jg,{...u,children:a.jsx(s6,{scope:t,contentId:m,open:p,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayed?E():C()},[c.isOpenDelayed,E,C]),onTriggerLeave:g.useCallback(()=>{x?j():window.clearTimeout(v.current)},[j,x]),onOpen:C,onClose:j,disableHoverableContent:x,children:r})})};gC.displayName=Wf;var xm="TooltipTrigger",vC=g.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Hf(xm,r),o=Xv(xm,r),i=Bf(r),l=g.useRef(null),c=Ke(t,l,s.onTriggerChange),u=g.useRef(!1),d=g.useRef(!1),f=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),a.jsx(ev,{asChild:!0,...i,children:a.jsx(Re.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:ue(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ue(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ue(e.onBlur,s.onClose),onClick:ue(e.onClick,s.onClose)})})});vC.displayName=xm;var o6="TooltipPortal",[eV,i6]=Vf(o6,{forceMount:void 0}),va="TooltipContent",Jv=g.forwardRef((e,t)=>{const r=i6(va,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,i=Hf(va,e.__scopeTooltip);return a.jsx(or,{present:n||i.open,children:i.disableHoverableContent?a.jsx(yC,{side:s,...o,ref:t}):a.jsx(a6,{side:s,...o,ref:t})})}),a6=g.forwardRef((e,t)=>{const r=Hf(va,e.__scopeTooltip),n=Xv(va,e.__scopeTooltip),s=g.useRef(null),o=Ke(t,s),[i,l]=g.useState(null),{trigger:c,onClose:u}=r,d=s.current,{onPointerInTransitChange:f}=n,m=g.useCallback(()=>{l(null),f(!1)},[f]),v=g.useCallback((x,y)=>{const _=x.currentTarget,p={x:x.clientX,y:x.clientY},h=d6(p,_.getBoundingClientRect()),w=f6(p,h),C=h6(y.getBoundingClientRect()),j=m6([...w,...C]);l(j),f(!0)},[f]);return g.useEffect(()=>()=>m(),[m]),g.useEffect(()=>{if(c&&d){const x=_=>v(_,d),y=_=>v(_,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",y)}}},[c,d,v,m]),g.useEffect(()=>{if(i){const x=y=>{const _=y.target,p={x:y.clientX,y:y.clientY},h=(c==null?void 0:c.contains(_))||(d==null?void 0:d.contains(_)),w=!p6(p,i);h?m():w&&(m(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,i,u,m]),a.jsx(yC,{...e,ref:o})}),[l6,c6]=Vf(Wf,{isInside:!1}),yC=g.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...l}=e,c=Hf(va,r),u=Bf(r),{onClose:d}=c;return g.useEffect(()=>(document.addEventListener(ym,d),()=>document.removeEventListener(ym,d)),[d]),g.useEffect(()=>{if(c.trigger){const f=m=>{const v=m.target;v!=null&&v.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),a.jsx(Ra,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:a.jsxs(tv,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[a.jsx(Ug,{children:n}),a.jsx(l6,{scope:r,isInside:!0,children:a.jsx(t6,{id:c.contentId,role:"tooltip",children:s||n})})]})})});Jv.displayName=va;var xC="TooltipArrow",u6=g.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Bf(r);return c6(xC,r).isInside?null:a.jsx(rv,{...s,...n,ref:t})});u6.displayName=xC;function d6(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function f6(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function h6(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function p6(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const l=t[o].x,c=t[o].y,u=t[i].x,d=t[i].y;c>n!=d>n&&r<(u-l)*(n-c)/(d-c)+l&&(s=!s)}return s}function m6(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),g6(t)}function g6(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],i=r[r.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var v6=Qv,y6=gC,x6=vC,wC=Jv;const w6=v6,_C=y6,bC=x6,SC=g.forwardRef(({className:e,sideOffset:t=4,...r},n)=>a.jsx(wC,{ref:n,sideOffset:t,className:oe("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));SC.displayName=wC.displayName;const ey=({deployment:e})=>{const t=r=>e.log[r]?e.log[r][e.log[r].length-1].error:"";return a.jsx(a.Fragment,{children:e.phase==="deploy"&&e.phaseSuccess||e.wholeSuccess?a.jsx(jA,{size:16,className:"text-green-700"}):a.jsx(a.Fragment,{children:t(e.phase).length?a.jsx(w6,{children:a.jsxs(_C,{children:[a.jsx(bC,{asChild:!0,className:"cursor-pointer",children:a.jsx(k0,{size:16,className:"text-red-700"})}),a.jsx(SC,{className:"max-w-[35em]",children:t(e.phase)})]})}):a.jsx(k0,{size:16,className:"text-red-700"})})})},kC=({className:e,...t})=>a.jsx("nav",{role:"navigation","aria-label":"pagination",className:oe("mx-auto flex w-full justify-center",e),...t});kC.displayName="Pagination";const CC=g.forwardRef(({className:e,...t},r)=>a.jsx("ul",{ref:r,className:oe("flex flex-row items-center gap-1",e),...t}));CC.displayName="PaginationContent";const wm=g.forwardRef(({className:e,...t},r)=>a.jsx("li",{ref:r,className:oe("",e),...t}));wm.displayName="PaginationItem";const jC=({className:e,isActive:t,size:r="icon",...n})=>a.jsx("a",{"aria-current":t?"page":void 0,className:oe(wf({variant:t?"outline":"ghost",size:r}),e),...n});jC.displayName="PaginationLink";const EC=({className:e,...t})=>a.jsxs("span",{"aria-hidden":!0,className:oe("flex h-9 w-9 items-center justify-center",e),...t,children:[a.jsx(NA,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"More pages"})]});EC.displayName="PaginationEllipsis";const NC=({totalPages:e,currentPage:t,onPageChange:r})=>{const s=()=>{if(e>7){let u=[];const d=Math.max(2,t-1),f=Math.min(e-1,t+1),m=e-1;return u=o(d,f),t>3&&u.unshift("..."),t<m-1&&u.push("..."),u.unshift(1),u.push(e),u}return o(1,e)},o=(l,c,u=1)=>{let d=l;const f=[];for(;d<=c;)f.push(d),d+=u;return f},i=s();return a.jsx(a.Fragment,{children:a.jsx(kC,{className:"dark:text-stone-200 justify-end mt-3",children:a.jsx(CC,{children:i.map((l,c)=>l==="..."?a.jsx(wm,{children:a.jsx(EC,{})},c):a.jsx(wm,{children:a.jsx(jC,{href:"#",isActive:t==l,onClick:u=>{u.preventDefault(),r(l)},children:l})},c))})})})},ia=({when:e,children:t,fallback:r})=>e?t:r;var TC="AlertDialog",[_6,tV]=sr(TC,[QS]),Is=QS(),RC=e=>{const{__scopeAlertDialog:t,...r}=e,n=Is(t);return a.jsx(xv,{...n,...r,modal:!0})};RC.displayName=TC;var b6="AlertDialogTrigger",PC=g.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Is(r);return a.jsx(wv,{...s,...n,ref:t})});PC.displayName=b6;var S6="AlertDialogPortal",AC=e=>{const{__scopeAlertDialog:t,...r}=e,n=Is(t);return a.jsx(_v,{...n,...r})};AC.displayName=S6;var k6="AlertDialogOverlay",DC=g.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Is(r);return a.jsx(Tc,{...s,...n,ref:t})});DC.displayName=k6;var aa="AlertDialogContent",[C6,j6]=_6(aa),OC=g.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,o=Is(r),i=g.useRef(null),l=Ke(t,i),c=g.useRef(null);return a.jsx(hL,{contentName:aa,titleName:MC,docsSlug:"alert-dialog",children:a.jsx(C6,{scope:r,cancelRef:c,children:a.jsxs(Rc,{role:"alertdialog",...o,...s,ref:l,onOpenAutoFocus:ue(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[a.jsx(Ug,{children:n}),a.jsx(N6,{contentRef:i})]})})})});OC.displayName=aa;var MC="AlertDialogTitle",IC=g.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Is(r);return a.jsx(Pc,{...s,...n,ref:t})});IC.displayName=MC;var LC="AlertDialogDescription",FC=g.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Is(r);return a.jsx(Ac,{...s,...n,ref:t})});FC.displayName=LC;var E6="AlertDialogAction",zC=g.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Is(r);return a.jsx(Tf,{...s,...n,ref:t})});zC.displayName=E6;var UC="AlertDialogCancel",$C=g.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}=j6(UC,r),o=Is(r),i=Ke(t,s);return a.jsx(Tf,{...o,...n,ref:i})});$C.displayName=UC;var N6=({contentRef:e})=>{const t=`\`${aa}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${aa}\` by passing a \`${LC}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${aa}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},T6=RC,R6=PC,P6=AC,VC=DC,BC=OC,WC=zC,HC=$C,YC=IC,KC=FC;const GC=T6,ZC=R6,A6=P6,qC=g.forwardRef(({className:e,...t},r)=>a.jsx(VC,{className:oe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));qC.displayName=VC.displayName;const ty=g.forwardRef(({className:e,...t},r)=>a.jsxs(A6,{children:[a.jsx(qC,{}),a.jsx(BC,{ref:r,className:oe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));ty.displayName=BC.displayName;const ry=({className:e,...t})=>a.jsx("div",{className:oe("flex flex-col space-y-2 text-center sm:text-left",e),...t});ry.displayName="AlertDialogHeader";const ny=({className:e,...t})=>a.jsx("div",{className:oe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ny.displayName="AlertDialogFooter";const sy=g.forwardRef(({className:e,...t},r)=>a.jsx(YC,{ref:r,className:oe("text-lg font-semibold",e),...t}));sy.displayName=YC.displayName;const oy=g.forwardRef(({className:e,...t},r)=>a.jsx(KC,{ref:r,className:oe("text-sm text-muted-foreground",e),...t}));oy.displayName=KC.displayName;const iy=g.forwardRef(({className:e,...t},r)=>a.jsx(WC,{ref:r,className:oe(wf(),e),...t}));iy.displayName=WC.displayName;const ay=g.forwardRef(({className:e,...t},r)=>a.jsx(HC,{ref:r,className:oe(wf({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));ay.displayName=HC.displayName;function ly(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var cy="Switch",[D6,rV]=sr(cy),[O6,M6]=D6(cy),XC=g.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:o,required:i,disabled:l,value:c="on",onCheckedChange:u,...d}=e,[f,m]=g.useState(null),v=Ke(t,h=>m(h)),x=g.useRef(!1),y=f?!!f.closest("form"):!0,[_=!1,p]=Yr({prop:s,defaultProp:o,onChange:u});return a.jsxs(O6,{scope:r,checked:_,disabled:l,children:[a.jsx(Re.button,{type:"button",role:"switch","aria-checked":_,"aria-required":i,"data-state":ej(_),"data-disabled":l?"":void 0,disabled:l,value:c,...d,ref:v,onClick:ue(e.onClick,h=>{p(w=>!w),y&&(x.current=h.isPropagationStopped(),x.current||h.stopPropagation())})}),y&&a.jsx(I6,{control:f,bubbles:!x.current,name:n,value:c,checked:_,required:i,disabled:l,style:{transform:"translateX(-100%)"}})]})});XC.displayName=cy;var QC="SwitchThumb",JC=g.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=M6(QC,r);return a.jsx(Re.span,{"data-state":ej(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});JC.displayName=QC;var I6=e=>{const{control:t,checked:r,bubbles:n=!0,...s}=e,o=g.useRef(null),i=ly(r),l=qg(t);return g.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==r&&f){const m=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(m)}},[i,r,n]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:o,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function ej(e){return e?"checked":"unchecked"}var tj=XC,L6=JC;const Fc=g.forwardRef(({className:e,...t},r)=>a.jsx(tj,{className:oe("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r,children:a.jsx(L6,{className:oe("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Fc.displayName=tj.displayName;var uy="ToastProvider",[dy,F6,z6]=kc("Toast"),[rj,nV]=sr("Toast",[z6]),[U6,Yf]=rj(uy),nj=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[l,c]=g.useState(null),[u,d]=g.useState(0),f=g.useRef(!1),m=g.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${uy}\`. Expected non-empty \`string\`.`),a.jsx(dy.Provider,{scope:t,children:a.jsx(U6,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:g.useCallback(()=>d(v=>v+1),[]),onToastRemove:g.useCallback(()=>d(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:m,children:i})})};nj.displayName=uy;var sj="ToastViewport",$6=["F8"],_m="toast.viewportPause",bm="toast.viewportResume",oj=g.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=$6,label:s="Notifications ({hotkey})",...o}=e,i=Yf(sj,r),l=F6(r),c=g.useRef(null),u=g.useRef(null),d=g.useRef(null),f=g.useRef(null),m=Ke(t,f,i.onViewportChange),v=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=i.toastCount>0;g.useEffect(()=>{const _=p=>{var w;n.every(C=>p[C]||p.code===C)&&((w=f.current)==null||w.focus())};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[n]),g.useEffect(()=>{const _=c.current,p=f.current;if(x&&_&&p){const h=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(_m);p.dispatchEvent(E),i.isClosePausedRef.current=!0}},w=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(bm);p.dispatchEvent(E),i.isClosePausedRef.current=!1}},C=E=>{!_.contains(E.relatedTarget)&&w()},j=()=>{_.contains(document.activeElement)||w()};return _.addEventListener("focusin",h),_.addEventListener("focusout",C),_.addEventListener("pointermove",h),_.addEventListener("pointerleave",j),window.addEventListener("blur",h),window.addEventListener("focus",w),()=>{_.removeEventListener("focusin",h),_.removeEventListener("focusout",C),_.removeEventListener("pointermove",h),_.removeEventListener("pointerleave",j),window.removeEventListener("blur",h),window.removeEventListener("focus",w)}}},[x,i.isClosePausedRef]);const y=g.useCallback(({tabbingDirection:_})=>{const h=l().map(w=>{const C=w.ref.current,j=[C,...ez(C)];return _==="forwards"?j:j.reverse()});return(_==="forwards"?h.reverse():h).flat()},[l]);return g.useEffect(()=>{const _=f.current;if(_){const p=h=>{var j,E,R;const w=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!w){const P=document.activeElement,A=h.shiftKey;if(h.target===_&&A){(j=u.current)==null||j.focus();return}const N=y({tabbingDirection:A?"backwards":"forwards"}),F=N.findIndex(b=>b===P);Jh(N.slice(F+1))?h.preventDefault():A?(E=u.current)==null||E.focus():(R=d.current)==null||R.focus()}};return _.addEventListener("keydown",p),()=>_.removeEventListener("keydown",p)}},[l,y]),a.jsxs(ID,{ref:c,role:"region","aria-label":s.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&a.jsx(Sm,{ref:u,onFocusFromOutsideViewport:()=>{const _=y({tabbingDirection:"forwards"});Jh(_)}}),a.jsx(dy.Slot,{scope:r,children:a.jsx(Re.ol,{tabIndex:-1,...o,ref:m})}),x&&a.jsx(Sm,{ref:d,onFocusFromOutsideViewport:()=>{const _=y({tabbingDirection:"backwards"});Jh(_)}})]})});oj.displayName=sj;var ij="ToastFocusProxy",Sm=g.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,o=Yf(ij,r);return a.jsx(Lc,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const l=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(l))&&n()}})});Sm.displayName=ij;var Kf="Toast",V6="toast.swipeStart",B6="toast.swipeMove",W6="toast.swipeCancel",H6="toast.swipeEnd",aj=g.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...i}=e,[l=!0,c]=Yr({prop:n,defaultProp:s,onChange:o});return a.jsx(or,{present:r||l,children:a.jsx(G6,{open:l,...i,ref:t,onClose:()=>c(!1),onPause:Dt(e.onPause),onResume:Dt(e.onResume),onSwipeStart:ue(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ue(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ue(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ue(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});aj.displayName=Kf;var[Y6,K6]=rj(Kf,{onClose(){}}),G6=g.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:m,onSwipeEnd:v,...x}=e,y=Yf(Kf,r),[_,p]=g.useState(null),h=Ke(t,b=>p(b)),w=g.useRef(null),C=g.useRef(null),j=s||y.duration,E=g.useRef(0),R=g.useRef(j),P=g.useRef(0),{onToastAdd:A,onToastRemove:L}=y,q=Dt(()=>{var V;(_==null?void 0:_.contains(document.activeElement))&&((V=y.viewport)==null||V.focus()),i()}),N=g.useCallback(b=>{!b||b===1/0||(window.clearTimeout(P.current),E.current=new Date().getTime(),P.current=window.setTimeout(q,b))},[q]);g.useEffect(()=>{const b=y.viewport;if(b){const V=()=>{N(R.current),u==null||u()},te=()=>{const B=new Date().getTime()-E.current;R.current=R.current-B,window.clearTimeout(P.current),c==null||c()};return b.addEventListener(_m,te),b.addEventListener(bm,V),()=>{b.removeEventListener(_m,te),b.removeEventListener(bm,V)}}},[y.viewport,j,c,u,N]),g.useEffect(()=>{o&&!y.isClosePausedRef.current&&N(j)},[o,j,y.isClosePausedRef,N]),g.useEffect(()=>(A(),()=>L()),[A,L]);const F=g.useMemo(()=>_?pj(_):null,[_]);return y.viewport?a.jsxs(a.Fragment,{children:[F&&a.jsx(Z6,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),a.jsx(Y6,{scope:r,onClose:q,children:Ts.createPortal(a.jsx(dy.ItemSlot,{scope:r,children:a.jsx(MD,{asChild:!0,onEscapeKeyDown:ue(l,()=>{y.isFocusedToastEscapeKeyDownRef.current||q(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:a.jsx(Re.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":y.swipeDirection,...x,ref:h,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ue(e.onKeyDown,b=>{b.key==="Escape"&&(l==null||l(b.nativeEvent),b.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:ue(e.onPointerDown,b=>{b.button===0&&(w.current={x:b.clientX,y:b.clientY})}),onPointerMove:ue(e.onPointerMove,b=>{if(!w.current)return;const V=b.clientX-w.current.x,te=b.clientY-w.current.y,B=!!C.current,K=["left","right"].includes(y.swipeDirection),I=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,Q=K?I(0,V):0,z=K?0:I(0,te),$=b.pointerType==="touch"?10:2,he={x:Q,y:z},ne={originalEvent:b,delta:he};B?(C.current=he,ku(B6,f,ne,{discrete:!1})):hw(he,y.swipeDirection,$)?(C.current=he,ku(V6,d,ne,{discrete:!1}),b.target.setPointerCapture(b.pointerId)):(Math.abs(V)>$||Math.abs(te)>$)&&(w.current=null)}),onPointerUp:ue(e.onPointerUp,b=>{const V=C.current,te=b.target;if(te.hasPointerCapture(b.pointerId)&&te.releasePointerCapture(b.pointerId),C.current=null,w.current=null,V){const B=b.currentTarget,K={originalEvent:b,delta:V};hw(V,y.swipeDirection,y.swipeThreshold)?ku(H6,v,K,{discrete:!0}):ku(W6,m,K,{discrete:!0}),B.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),Z6=e=>{const{__scopeToast:t,children:r,...n}=e,s=Yf(Kf,t),[o,i]=g.useState(!1),[l,c]=g.useState(!1);return Q6(()=>i(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:a.jsx(jc,{asChild:!0,children:a.jsx(Lc,{...n,children:o&&a.jsxs(a.Fragment,{children:[s.label," ",r]})})})},q6="ToastTitle",lj=g.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return a.jsx(Re.div,{...n,ref:t})});lj.displayName=q6;var X6="ToastDescription",cj=g.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return a.jsx(Re.div,{...n,ref:t})});cj.displayName=X6;var uj="ToastAction",dj=g.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?a.jsx(hj,{altText:r,asChild:!0,children:a.jsx(fy,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${uj}\`. Expected non-empty \`string\`.`),null)});dj.displayName=uj;var fj="ToastClose",fy=g.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=K6(fj,r);return a.jsx(hj,{asChild:!0,children:a.jsx(Re.button,{type:"button",...n,ref:t,onClick:ue(e.onClick,s.onClose)})})});fy.displayName=fj;var hj=g.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return a.jsx(Re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function pj(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),J6(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...pj(n))}}),t}function ku(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Vg(s,o):s.dispatchEvent(o)}var hw=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),o=n>s;return t==="left"||t==="right"?o&&n>r:!o&&s>r};function Q6(e=()=>{}){const t=Dt(e);Jt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function J6(e){return e.nodeType===e.ELEMENT_NODE}function ez(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Jh(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var tz=nj,mj=oj,gj=aj,vj=lj,yj=cj,xj=dj,wj=fy;const rz=tz,_j=g.forwardRef(({className:e,...t},r)=>a.jsx(mj,{ref:r,className:oe("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));_j.displayName=mj.displayName;const nz=Sc("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),bj=g.forwardRef(({className:e,variant:t,...r},n)=>a.jsx(gj,{ref:n,className:oe(nz({variant:t}),e),...r}));bj.displayName=gj.displayName;const sz=g.forwardRef(({className:e,...t},r)=>a.jsx(xj,{ref:r,className:oe("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));sz.displayName=xj.displayName;const Sj=g.forwardRef(({className:e,...t},r)=>a.jsx(wj,{ref:r,className:oe("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsx(zg,{className:"h-4 w-4"})}));Sj.displayName=wj.displayName;const kj=g.forwardRef(({className:e,...t},r)=>a.jsx(vj,{ref:r,className:oe("text-sm font-semibold",e),...t}));kj.displayName=vj.displayName;const Cj=g.forwardRef(({className:e,...t},r)=>a.jsx(yj,{ref:r,className:oe("text-sm opacity-90",e),...t}));Cj.displayName=yj.displayName;const oz=1,iz=1e6;let ep=0;function az(){return ep=(ep+1)%Number.MAX_SAFE_INTEGER,ep.toString()}const tp=new Map,pw=e=>{if(tp.has(e))return;const t=setTimeout(()=>{tp.delete(e),jl({type:"REMOVE_TOAST",toastId:e})},iz);tp.set(e,t)},lz=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,oz)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?pw(r):e.toasts.forEach(n=>{pw(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Ku=[];let Gu={toasts:[]};function jl(e){Gu=lz(Gu,e),Ku.forEach(t=>{t(Gu)})}function cz({...e}){const t=az(),r=s=>jl({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>jl({type:"DISMISS_TOAST",toastId:t});return jl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function Pn(){const[e,t]=g.useState(Gu);return g.useEffect(()=>(Ku.push(t),()=>{const r=Ku.indexOf(t);r>-1&&Ku.splice(r,1)}),[e]),{...e,toast:cz,dismiss:r=>jl({type:"DISMISS_TOAST",toastId:r})}}function hy(){const{toasts:e}=Pn();return a.jsxs(rz,{children:[e.map(function({id:t,title:r,description:n,action:s,...o}){return a.jsxs(bj,{...o,children:[a.jsxs("div",{className:"grid gap-1",children:[r&&a.jsx(kj,{children:r}),n&&a.jsx(Cj,{children:n})]}),s,a.jsx(Sj,{})]},t)}),a.jsx(_j,{})]})}function Cu(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var jj={exports:{}};/*!
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/main/LICENSE
*/(function(e,t){(function(r){e.exports=r()})(function(){return function r(n,s,o){function i(u,d){if(!s[u]){if(!n[u]){var f=typeof Cu=="function"&&Cu;if(!d&&f)return f(u,!0);if(l)return l(u,!0);var m=new Error("Cannot find module '"+u+"'");throw m.code="MODULE_NOT_FOUND",m}var v=s[u]={exports:{}};n[u][0].call(v.exports,function(x){var y=n[u][1][x];return i(y||x)},v,v.exports,r,n,s,o)}return s[u].exports}for(var l=typeof Cu=="function"&&Cu,c=0;c<o.length;c++)i(o[c]);return i}({1:[function(r,n,s){var o=r("./utils"),i=r("./support"),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(c){for(var u,d,f,m,v,x,y,_=[],p=0,h=c.length,w=h,C=o.getTypeOf(c)!=="string";p<c.length;)w=h-p,f=C?(u=c[p++],d=p<h?c[p++]:0,p<h?c[p++]:0):(u=c.charCodeAt(p++),d=p<h?c.charCodeAt(p++):0,p<h?c.charCodeAt(p++):0),m=u>>2,v=(3&u)<<4|d>>4,x=1<w?(15&d)<<2|f>>6:64,y=2<w?63&f:64,_.push(l.charAt(m)+l.charAt(v)+l.charAt(x)+l.charAt(y));return _.join("")},s.decode=function(c){var u,d,f,m,v,x,y=0,_=0,p="data:";if(c.substr(0,p.length)===p)throw new Error("Invalid base64 input, it looks like a data url.");var h,w=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===l.charAt(64)&&w--,c.charAt(c.length-2)===l.charAt(64)&&w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=i.uint8array?new Uint8Array(0|w):new Array(0|w);y<c.length;)u=l.indexOf(c.charAt(y++))<<2|(m=l.indexOf(c.charAt(y++)))>>4,d=(15&m)<<4|(v=l.indexOf(c.charAt(y++)))>>2,f=(3&v)<<6|(x=l.indexOf(c.charAt(y++))),h[_++]=u,v!==64&&(h[_++]=d),x!==64&&(h[_++]=f);return h}},{"./support":30,"./utils":32}],2:[function(r,n,s){var o=r("./external"),i=r("./stream/DataWorker"),l=r("./stream/Crc32Probe"),c=r("./stream/DataLengthProbe");function u(d,f,m,v,x){this.compressedSize=d,this.uncompressedSize=f,this.crc32=m,this.compression=v,this.compressedContent=x}u.prototype={getContentWorker:function(){var d=new i(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),f=this;return d.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new i(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(d,f,m){return d.pipe(new l).pipe(new c("uncompressedSize")).pipe(f.compressWorker(m)).pipe(new c("compressedSize")).withStreamInfo("compression",f)},n.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,s){var o=r("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},s.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,s){var o=r("./utils"),i=function(){for(var l,c=[],u=0;u<256;u++){l=u;for(var d=0;d<8;d++)l=1&l?3988292384^l>>>1:l>>>1;c[u]=l}return c}();n.exports=function(l,c){return l!==void 0&&l.length?o.getTypeOf(l)!=="string"?function(u,d,f,m){var v=i,x=m+f;u^=-1;for(var y=m;y<x;y++)u=u>>>8^v[255&(u^d[y])];return-1^u}(0|c,l,l.length,0):function(u,d,f,m){var v=i,x=m+f;u^=-1;for(var y=m;y<x;y++)u=u>>>8^v[255&(u^d.charCodeAt(y))];return-1^u}(0|c,l,l.length,0):0}},{"./utils":32}],5:[function(r,n,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(r,n,s){var o=null;o=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:o}},{lie:37}],7:[function(r,n,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=r("pako"),l=r("./utils"),c=r("./stream/GenericWorker"),u=o?"uint8array":"array";function d(f,m){c.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=m,this.meta={}}s.magic="\b\0",l.inherits(d,c),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(l.transformTo(u,f.data),!1)},d.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(m){f.push({data:m,meta:f.meta})}},s.compressWorker=function(f){return new d("Deflate",f)},s.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,n,s){function o(v,x){var y,_="";for(y=0;y<x;y++)_+=String.fromCharCode(255&v),v>>>=8;return _}function i(v,x,y,_,p,h){var w,C,j=v.file,E=v.compression,R=h!==u.utf8encode,P=l.transformTo("string",h(j.name)),A=l.transformTo("string",u.utf8encode(j.name)),L=j.comment,q=l.transformTo("string",h(L)),N=l.transformTo("string",u.utf8encode(L)),F=A.length!==j.name.length,b=N.length!==L.length,V="",te="",B="",K=j.dir,I=j.date,Q={crc32:0,compressedSize:0,uncompressedSize:0};x&&!y||(Q.crc32=v.crc32,Q.compressedSize=v.compressedSize,Q.uncompressedSize=v.uncompressedSize);var z=0;x&&(z|=8),R||!F&&!b||(z|=2048);var $=0,he=0;K&&($|=16),p==="UNIX"?(he=798,$|=function(se,Oe){var pe=se;return se||(pe=Oe?16893:33204),(65535&pe)<<16}(j.unixPermissions,K)):(he=20,$|=function(se){return 63&(se||0)}(j.dosPermissions)),w=I.getUTCHours(),w<<=6,w|=I.getUTCMinutes(),w<<=5,w|=I.getUTCSeconds()/2,C=I.getUTCFullYear()-1980,C<<=4,C|=I.getUTCMonth()+1,C<<=5,C|=I.getUTCDate(),F&&(te=o(1,1)+o(d(P),4)+A,V+="up"+o(te.length,2)+te),b&&(B=o(1,1)+o(d(q),4)+N,V+="uc"+o(B.length,2)+B);var ne="";return ne+=`
\0`,ne+=o(z,2),ne+=E.magic,ne+=o(w,2),ne+=o(C,2),ne+=o(Q.crc32,4),ne+=o(Q.compressedSize,4),ne+=o(Q.uncompressedSize,4),ne+=o(P.length,2),ne+=o(V.length,2),{fileRecord:f.LOCAL_FILE_HEADER+ne+P+V,dirRecord:f.CENTRAL_FILE_HEADER+o(he,2)+ne+o(q.length,2)+"\0\0\0\0"+o($,4)+o(_,4)+P+V+q}}var l=r("../utils"),c=r("../stream/GenericWorker"),u=r("../utf8"),d=r("../crc32"),f=r("../signature");function m(v,x,y,_){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=x,this.zipPlatform=y,this.encodeFileName=_,this.streamFiles=v,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(m,c),m.prototype.push=function(v){var x=v.meta.percent||0,y=this.entriesCount,_=this._sources.length;this.accumulate?this.contentBuffer.push(v):(this.bytesWritten+=v.data.length,c.prototype.push.call(this,{data:v.data,meta:{currentFile:this.currentFile,percent:y?(x+100*(y-_-1))/y:100}}))},m.prototype.openedSource=function(v){this.currentSourceOffset=this.bytesWritten,this.currentFile=v.file.name;var x=this.streamFiles&&!v.file.dir;if(x){var y=i(v,x,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:y.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(v){this.accumulate=!1;var x=this.streamFiles&&!v.file.dir,y=i(v,x,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(y.dirRecord),x)this.push({data:function(_){return f.DATA_DESCRIPTOR+o(_.crc32,4)+o(_.compressedSize,4)+o(_.uncompressedSize,4)}(v),meta:{percent:100}});else for(this.push({data:y.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var v=this.bytesWritten,x=0;x<this.dirRecords.length;x++)this.push({data:this.dirRecords[x],meta:{percent:100}});var y=this.bytesWritten-v,_=function(p,h,w,C,j){var E=l.transformTo("string",j(C));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(p,2)+o(p,2)+o(h,4)+o(w,4)+o(E.length,2)+E}(this.dirRecords.length,y,v,this.zipComment,this.encodeFileName);this.push({data:_,meta:{percent:100}})},m.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},m.prototype.registerPrevious=function(v){this._sources.push(v);var x=this;return v.on("data",function(y){x.processChunk(y)}),v.on("end",function(){x.closedSource(x.previous.streamInfo),x._sources.length?x.prepareNextSource():x.end()}),v.on("error",function(y){x.error(y)}),this},m.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},m.prototype.error=function(v){var x=this._sources;if(!c.prototype.error.call(this,v))return!1;for(var y=0;y<x.length;y++)try{x[y].error(v)}catch{}return!0},m.prototype.lock=function(){c.prototype.lock.call(this);for(var v=this._sources,x=0;x<v.length;x++)v[x].lock()},n.exports=m},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,n,s){var o=r("../compressions"),i=r("./ZipFileWorker");s.generateWorker=function(l,c,u){var d=new i(c.streamFiles,u,c.platform,c.encodeFileName),f=0;try{l.forEach(function(m,v){f++;var x=function(h,w){var C=h||w,j=o[C];if(!j)throw new Error(C+" is not a valid compression method !");return j}(v.options.compression,c.compression),y=v.options.compressionOptions||c.compressionOptions||{},_=v.dir,p=v.date;v._compressWorker(x,y).withStreamInfo("file",{name:m,dir:_,date:p,comment:v.comment||"",unixPermissions:v.unixPermissions,dosPermissions:v.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(m){d.error(m)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,n,s){function o(){if(!(this instanceof o))return new o;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new o;for(var l in this)typeof this[l]!="function"&&(i[l]=this[l]);return i}}(o.prototype=r("./object")).loadAsync=r("./load"),o.support=r("./support"),o.defaults=r("./defaults"),o.version="3.10.1",o.loadAsync=function(i,l){return new o().loadAsync(i,l)},o.external=r("./external"),n.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,n,s){var o=r("./utils"),i=r("./external"),l=r("./utf8"),c=r("./zipEntries"),u=r("./stream/Crc32Probe"),d=r("./nodejsUtils");function f(m){return new i.Promise(function(v,x){var y=m.decompressed.getContentWorker().pipe(new u);y.on("error",function(_){x(_)}).on("end",function(){y.streamInfo.crc32!==m.decompressed.crc32?x(new Error("Corrupted zip : CRC32 mismatch")):v()}).resume()})}n.exports=function(m,v){var x=this;return v=o.extend(v||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:l.utf8decode}),d.isNode&&d.isStream(m)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",m,!0,v.optimizedBinaryString,v.base64).then(function(y){var _=new c(v);return _.load(y),_}).then(function(y){var _=[i.Promise.resolve(y)],p=y.files;if(v.checkCRC32)for(var h=0;h<p.length;h++)_.push(f(p[h]));return i.Promise.all(_)}).then(function(y){for(var _=y.shift(),p=_.files,h=0;h<p.length;h++){var w=p[h],C=w.fileNameStr,j=o.resolve(w.fileNameStr);x.file(j,w.decompressed,{binary:!0,optimizedBinaryString:!0,date:w.date,dir:w.dir,comment:w.fileCommentStr.length?w.fileCommentStr:null,unixPermissions:w.unixPermissions,dosPermissions:w.dosPermissions,createFolders:v.createFolders}),w.dir||(x.file(j).unsafeOriginalName=C)}return _.zipComment.length&&(x.comment=_.zipComment),x})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,n,s){var o=r("../utils"),i=r("../stream/GenericWorker");function l(c,u){i.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}o.inherits(l,i),l.prototype._bindStream=function(c){var u=this;(this._stream=c).pause(),c.on("data",function(d){u.push({data:d,meta:{percent:0}})}).on("error",function(d){u.isPaused?this.generatedError=d:u.error(d)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},l.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},l.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=l},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,n,s){var o=r("readable-stream").Readable;function i(l,c,u){o.call(this,c),this._helper=l;var d=this;l.on("data",function(f,m){d.push(f)||d._helper.pause(),u&&u(m)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}r("../utils").inherits(i,o),i.prototype._read=function(){this._helper.resume()},n.exports=i},{"../utils":32,"readable-stream":16}],14:[function(r,n,s){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(o,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(o,i);if(typeof o=="number")throw new Error('The "data" argument must not be a number');return new Buffer(o,i)},allocBuffer:function(o){if(Buffer.alloc)return Buffer.alloc(o);var i=new Buffer(o);return i.fill(0),i},isBuffer:function(o){return Buffer.isBuffer(o)},isStream:function(o){return o&&typeof o.on=="function"&&typeof o.pause=="function"&&typeof o.resume=="function"}}},{}],15:[function(r,n,s){function o(j,E,R){var P,A=l.getTypeOf(E),L=l.extend(R||{},d);L.date=L.date||new Date,L.compression!==null&&(L.compression=L.compression.toUpperCase()),typeof L.unixPermissions=="string"&&(L.unixPermissions=parseInt(L.unixPermissions,8)),L.unixPermissions&&16384&L.unixPermissions&&(L.dir=!0),L.dosPermissions&&16&L.dosPermissions&&(L.dir=!0),L.dir&&(j=p(j)),L.createFolders&&(P=_(j))&&h.call(this,P,!0);var q=A==="string"&&L.binary===!1&&L.base64===!1;R&&R.binary!==void 0||(L.binary=!q),(E instanceof f&&E.uncompressedSize===0||L.dir||!E||E.length===0)&&(L.base64=!1,L.binary=!0,E="",L.compression="STORE",A="string");var N=null;N=E instanceof f||E instanceof c?E:x.isNode&&x.isStream(E)?new y(j,E):l.prepareContent(j,E,L.binary,L.optimizedBinaryString,L.base64);var F=new m(j,N,L);this.files[j]=F}var i=r("./utf8"),l=r("./utils"),c=r("./stream/GenericWorker"),u=r("./stream/StreamHelper"),d=r("./defaults"),f=r("./compressedObject"),m=r("./zipObject"),v=r("./generate"),x=r("./nodejsUtils"),y=r("./nodejs/NodejsStreamInputAdapter"),_=function(j){j.slice(-1)==="/"&&(j=j.substring(0,j.length-1));var E=j.lastIndexOf("/");return 0<E?j.substring(0,E):""},p=function(j){return j.slice(-1)!=="/"&&(j+="/"),j},h=function(j,E){return E=E!==void 0?E:d.createFolders,j=p(j),this.files[j]||o.call(this,j,null,{dir:!0,createFolders:E}),this.files[j]};function w(j){return Object.prototype.toString.call(j)==="[object RegExp]"}var C={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(j){var E,R,P;for(E in this.files)P=this.files[E],(R=E.slice(this.root.length,E.length))&&E.slice(0,this.root.length)===this.root&&j(R,P)},filter:function(j){var E=[];return this.forEach(function(R,P){j(R,P)&&E.push(P)}),E},file:function(j,E,R){if(arguments.length!==1)return j=this.root+j,o.call(this,j,E,R),this;if(w(j)){var P=j;return this.filter(function(L,q){return!q.dir&&P.test(L)})}var A=this.files[this.root+j];return A&&!A.dir?A:null},folder:function(j){if(!j)return this;if(w(j))return this.filter(function(A,L){return L.dir&&j.test(A)});var E=this.root+j,R=h.call(this,E),P=this.clone();return P.root=R.name,P},remove:function(j){j=this.root+j;var E=this.files[j];if(E||(j.slice(-1)!=="/"&&(j+="/"),E=this.files[j]),E&&!E.dir)delete this.files[j];else for(var R=this.filter(function(A,L){return L.name.slice(0,j.length)===j}),P=0;P<R.length;P++)delete this.files[R[P].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(j){var E,R={};try{if((R=l.extend(j||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=R.type.toLowerCase(),R.compression=R.compression.toUpperCase(),R.type==="binarystring"&&(R.type="string"),!R.type)throw new Error("No output type specified.");l.checkSupport(R.type),R.platform!=="darwin"&&R.platform!=="freebsd"&&R.platform!=="linux"&&R.platform!=="sunos"||(R.platform="UNIX"),R.platform==="win32"&&(R.platform="DOS");var P=R.comment||this.comment||"";E=v.generateWorker(this,R,P)}catch(A){(E=new c("error")).error(A)}return new u(E,R.type||"string",R.mimeType)},generateAsync:function(j,E){return this.generateInternalStream(j).accumulate(E)},generateNodeStream:function(j,E){return(j=j||{}).type||(j.type="nodebuffer"),this.generateInternalStream(j).toNodejsStream(E)}};n.exports=C},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(r,n,s){n.exports=r("stream")},{stream:void 0}],17:[function(r,n,s){var o=r("./DataReader");function i(l){o.call(this,l);for(var c=0;c<this.data.length;c++)l[c]=255&l[c]}r("../utils").inherits(i,o),i.prototype.byteAt=function(l){return this.data[this.zero+l]},i.prototype.lastIndexOfSignature=function(l){for(var c=l.charCodeAt(0),u=l.charCodeAt(1),d=l.charCodeAt(2),f=l.charCodeAt(3),m=this.length-4;0<=m;--m)if(this.data[m]===c&&this.data[m+1]===u&&this.data[m+2]===d&&this.data[m+3]===f)return m-this.zero;return-1},i.prototype.readAndCheckSignature=function(l){var c=l.charCodeAt(0),u=l.charCodeAt(1),d=l.charCodeAt(2),f=l.charCodeAt(3),m=this.readData(4);return c===m[0]&&u===m[1]&&d===m[2]&&f===m[3]},i.prototype.readData=function(l){if(this.checkOffset(l),l===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},n.exports=i},{"../utils":32,"./DataReader":18}],18:[function(r,n,s){var o=r("../utils");function i(l){this.data=l,this.length=l.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(l){this.checkIndex(this.index+l)},checkIndex:function(l){if(this.length<this.zero+l||l<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+l+"). Corrupted zip ?")},setIndex:function(l){this.checkIndex(l),this.index=l},skip:function(l){this.setIndex(this.index+l)},byteAt:function(){},readInt:function(l){var c,u=0;for(this.checkOffset(l),c=this.index+l-1;c>=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=l,u},readString:function(l){return o.transformTo("string",this.readData(l))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var l=this.readInt(4);return new Date(Date.UTC(1980+(l>>25&127),(l>>21&15)-1,l>>16&31,l>>11&31,l>>5&63,(31&l)<<1))}},n.exports=i},{"../utils":32}],19:[function(r,n,s){var o=r("./Uint8ArrayReader");function i(l){o.call(this,l)}r("../utils").inherits(i,o),i.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},n.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,s){var o=r("./DataReader");function i(l){o.call(this,l)}r("../utils").inherits(i,o),i.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},i.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},i.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},i.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},n.exports=i},{"../utils":32,"./DataReader":18}],21:[function(r,n,s){var o=r("./ArrayReader");function i(l){o.call(this,l)}r("../utils").inherits(i,o),i.prototype.readData=function(l){if(this.checkOffset(l),l===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},n.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,s){var o=r("../utils"),i=r("../support"),l=r("./ArrayReader"),c=r("./StringReader"),u=r("./NodeBufferReader"),d=r("./Uint8ArrayReader");n.exports=function(f){var m=o.getTypeOf(f);return o.checkSupport(m),m!=="string"||i.uint8array?m==="nodebuffer"?new u(f):i.uint8array?new d(o.transformTo("uint8array",f)):new l(o.transformTo("array",f)):new c(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,s){var o=r("./GenericWorker"),i=r("../utils");function l(c){o.call(this,"ConvertWorker to "+c),this.destType=c}i.inherits(l,o),l.prototype.processChunk=function(c){this.push({data:i.transformTo(this.destType,c.data),meta:c.meta})},n.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,s){var o=r("./GenericWorker"),i=r("../crc32");function l(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(l,o),l.prototype.processChunk=function(c){this.streamInfo.crc32=i(c.data,this.streamInfo.crc32||0),this.push(c)},n.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,s){var o=r("../utils"),i=r("./GenericWorker");function l(c){i.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}o.inherits(l,i),l.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}i.prototype.processChunk.call(this,c)},n.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,s){var o=r("../utils"),i=r("./GenericWorker");function l(c){i.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=o.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}o.inherits(l,i),l.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},l.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,s){function o(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,l){return this._listeners[i].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,l){if(this._listeners[i])for(var c=0;c<this._listeners[i].length;c++)this._listeners[i][c].call(this,l)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var l=this;return i.on("data",function(c){l.processChunk(c)}),i.on("end",function(){l.end()}),i.on("error",function(c){l.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,l){return this.extraStreamInfo[i]=l,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},n.exports=o},{}],29:[function(r,n,s){var o=r("../utils"),i=r("./ConvertWorker"),l=r("./GenericWorker"),c=r("../base64"),u=r("../support"),d=r("../external"),f=null;if(u.nodestream)try{f=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(x,y){return new d.Promise(function(_,p){var h=[],w=x._internalType,C=x._outputType,j=x._mimeType;x.on("data",function(E,R){h.push(E),y&&y(R)}).on("error",function(E){h=[],p(E)}).on("end",function(){try{var E=function(R,P,A){switch(R){case"blob":return o.newBlob(o.transformTo("arraybuffer",P),A);case"base64":return c.encode(P);default:return o.transformTo(R,P)}}(C,function(R,P){var A,L=0,q=null,N=0;for(A=0;A<P.length;A++)N+=P[A].length;switch(R){case"string":return P.join("");case"array":return Array.prototype.concat.apply([],P);case"uint8array":for(q=new Uint8Array(N),A=0;A<P.length;A++)q.set(P[A],L),L+=P[A].length;return q;case"nodebuffer":return Buffer.concat(P);default:throw new Error("concat : unsupported type '"+R+"'")}}(w,h),j);_(E)}catch(R){p(R)}h=[]}).resume()})}function v(x,y,_){var p=y;switch(y){case"blob":case"arraybuffer":p="uint8array";break;case"base64":p="string"}try{this._internalType=p,this._outputType=y,this._mimeType=_,o.checkSupport(p),this._worker=x.pipe(new i(p)),x.lock()}catch(h){this._worker=new l("error"),this._worker.error(h)}}v.prototype={accumulate:function(x){return m(this,x)},on:function(x,y){var _=this;return x==="data"?this._worker.on(x,function(p){y.call(_,p.data,p.meta)}):this._worker.on(x,function(){o.delay(y,arguments,_)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(x){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},x)}},n.exports=v},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,n,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var o=new ArrayBuffer(0);try{s.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(o),s.blob=i.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!r("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,s){for(var o=r("./utils"),i=r("./support"),l=r("./nodejsUtils"),c=r("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function f(){c.call(this,"utf-8 decode"),this.leftOver=null}function m(){c.call(this,"utf-8 encode")}s.utf8encode=function(v){return i.nodebuffer?l.newBufferFrom(v,"utf-8"):function(x){var y,_,p,h,w,C=x.length,j=0;for(h=0;h<C;h++)(64512&(_=x.charCodeAt(h)))==55296&&h+1<C&&(64512&(p=x.charCodeAt(h+1)))==56320&&(_=65536+(_-55296<<10)+(p-56320),h++),j+=_<128?1:_<2048?2:_<65536?3:4;for(y=i.uint8array?new Uint8Array(j):new Array(j),h=w=0;w<j;h++)(64512&(_=x.charCodeAt(h)))==55296&&h+1<C&&(64512&(p=x.charCodeAt(h+1)))==56320&&(_=65536+(_-55296<<10)+(p-56320),h++),_<128?y[w++]=_:(_<2048?y[w++]=192|_>>>6:(_<65536?y[w++]=224|_>>>12:(y[w++]=240|_>>>18,y[w++]=128|_>>>12&63),y[w++]=128|_>>>6&63),y[w++]=128|63&_);return y}(v)},s.utf8decode=function(v){return i.nodebuffer?o.transformTo("nodebuffer",v).toString("utf-8"):function(x){var y,_,p,h,w=x.length,C=new Array(2*w);for(y=_=0;y<w;)if((p=x[y++])<128)C[_++]=p;else if(4<(h=u[p]))C[_++]=65533,y+=h-1;else{for(p&=h===2?31:h===3?15:7;1<h&&y<w;)p=p<<6|63&x[y++],h--;1<h?C[_++]=65533:p<65536?C[_++]=p:(p-=65536,C[_++]=55296|p>>10&1023,C[_++]=56320|1023&p)}return C.length!==_&&(C.subarray?C=C.subarray(0,_):C.length=_),o.applyFromCharCode(C)}(v=o.transformTo(i.uint8array?"uint8array":"array",v))},o.inherits(f,c),f.prototype.processChunk=function(v){var x=o.transformTo(i.uint8array?"uint8array":"array",v.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var y=x;(x=new Uint8Array(y.length+this.leftOver.length)).set(this.leftOver,0),x.set(y,this.leftOver.length)}else x=this.leftOver.concat(x);this.leftOver=null}var _=function(h,w){var C;for((w=w||h.length)>h.length&&(w=h.length),C=w-1;0<=C&&(192&h[C])==128;)C--;return C<0||C===0?w:C+u[h[C]]>w?C:w}(x),p=x;_!==x.length&&(i.uint8array?(p=x.subarray(0,_),this.leftOver=x.subarray(_,x.length)):(p=x.slice(0,_),this.leftOver=x.slice(_,x.length))),this.push({data:s.utf8decode(p),meta:v.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=f,o.inherits(m,c),m.prototype.processChunk=function(v){this.push({data:s.utf8encode(v.data),meta:v.meta})},s.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,s){var o=r("./support"),i=r("./base64"),l=r("./nodejsUtils"),c=r("./external");function u(y){return y}function d(y,_){for(var p=0;p<y.length;++p)_[p]=255&y.charCodeAt(p);return _}r("setimmediate"),s.newBlob=function(y,_){s.checkSupport("blob");try{return new Blob([y],{type:_})}catch{try{var p=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return p.append(y),p.getBlob(_)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(y,_,p){var h=[],w=0,C=y.length;if(C<=p)return String.fromCharCode.apply(null,y);for(;w<C;)_==="array"||_==="nodebuffer"?h.push(String.fromCharCode.apply(null,y.slice(w,Math.min(w+p,C)))):h.push(String.fromCharCode.apply(null,y.subarray(w,Math.min(w+p,C)))),w+=p;return h.join("")},stringifyByChar:function(y){for(var _="",p=0;p<y.length;p++)_+=String.fromCharCode(y[p]);return _},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&String.fromCharCode.apply(null,l.allocBuffer(1)).length===1}catch{return!1}}()}};function m(y){var _=65536,p=s.getTypeOf(y),h=!0;if(p==="uint8array"?h=f.applyCanBeUsed.uint8array:p==="nodebuffer"&&(h=f.applyCanBeUsed.nodebuffer),h)for(;1<_;)try{return f.stringifyByChunk(y,p,_)}catch{_=Math.floor(_/2)}return f.stringifyByChar(y)}function v(y,_){for(var p=0;p<y.length;p++)_[p]=y[p];return _}s.applyFromCharCode=m;var x={};x.string={string:u,array:function(y){return d(y,new Array(y.length))},arraybuffer:function(y){return x.string.uint8array(y).buffer},uint8array:function(y){return d(y,new Uint8Array(y.length))},nodebuffer:function(y){return d(y,l.allocBuffer(y.length))}},x.array={string:m,array:u,arraybuffer:function(y){return new Uint8Array(y).buffer},uint8array:function(y){return new Uint8Array(y)},nodebuffer:function(y){return l.newBufferFrom(y)}},x.arraybuffer={string:function(y){return m(new Uint8Array(y))},array:function(y){return v(new Uint8Array(y),new Array(y.byteLength))},arraybuffer:u,uint8array:function(y){return new Uint8Array(y)},nodebuffer:function(y){return l.newBufferFrom(new Uint8Array(y))}},x.uint8array={string:m,array:function(y){return v(y,new Array(y.length))},arraybuffer:function(y){return y.buffer},uint8array:u,nodebuffer:function(y){return l.newBufferFrom(y)}},x.nodebuffer={string:m,array:function(y){return v(y,new Array(y.length))},arraybuffer:function(y){return x.nodebuffer.uint8array(y).buffer},uint8array:function(y){return v(y,new Uint8Array(y.length))},nodebuffer:u},s.transformTo=function(y,_){if(_=_||"",!y)return _;s.checkSupport(y);var p=s.getTypeOf(_);return x[p][y](_)},s.resolve=function(y){for(var _=y.split("/"),p=[],h=0;h<_.length;h++){var w=_[h];w==="."||w===""&&h!==0&&h!==_.length-1||(w===".."?p.pop():p.push(w))}return p.join("/")},s.getTypeOf=function(y){return typeof y=="string"?"string":Object.prototype.toString.call(y)==="[object Array]"?"array":o.nodebuffer&&l.isBuffer(y)?"nodebuffer":o.uint8array&&y instanceof Uint8Array?"uint8array":o.arraybuffer&&y instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(y){if(!o[y.toLowerCase()])throw new Error(y+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(y){var _,p,h="";for(p=0;p<(y||"").length;p++)h+="\\x"+((_=y.charCodeAt(p))<16?"0":"")+_.toString(16).toUpperCase();return h},s.delay=function(y,_,p){setImmediate(function(){y.apply(p||null,_||[])})},s.inherits=function(y,_){function p(){}p.prototype=_.prototype,y.prototype=new p},s.extend=function(){var y,_,p={};for(y=0;y<arguments.length;y++)for(_ in arguments[y])Object.prototype.hasOwnProperty.call(arguments[y],_)&&p[_]===void 0&&(p[_]=arguments[y][_]);return p},s.prepareContent=function(y,_,p,h,w){return c.Promise.resolve(_).then(function(C){return o.blob&&(C instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(C))!==-1)&&typeof FileReader<"u"?new c.Promise(function(j,E){var R=new FileReader;R.onload=function(P){j(P.target.result)},R.onerror=function(P){E(P.target.error)},R.readAsArrayBuffer(C)}):C}).then(function(C){var j=s.getTypeOf(C);return j?(j==="arraybuffer"?C=s.transformTo("uint8array",C):j==="string"&&(w?C=i.decode(C):p&&h!==!0&&(C=function(E){return d(E,o.uint8array?new Uint8Array(E.length):new Array(E.length))}(C))),C):c.Promise.reject(new Error("Can't read the data of '"+y+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,n,s){var o=r("./reader/readerFor"),i=r("./utils"),l=r("./signature"),c=r("./zipEntry"),u=r("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var m=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(m)+", expected "+i.pretty(f)+")")}},isSignature:function(f,m){var v=this.reader.index;this.reader.setIndex(f);var x=this.reader.readString(4)===m;return this.reader.setIndex(v),x},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),m=u.uint8array?"uint8array":"array",v=i.transformTo(m,f);this.zipComment=this.loadOptions.decodeFileName(v)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,m,v,x=this.zip64EndOfCentralSize-44;0<x;)f=this.reader.readInt(2),m=this.reader.readInt(4),v=this.reader.readData(m),this.zip64ExtensibleData[f]={id:f,length:m,value:v}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,m;for(f=0;f<this.files.length;f++)m=this.files[f],this.reader.setIndex(m.localHeaderOffset),this.checkSignature(l.LOCAL_FILE_HEADER),m.readLocalPart(this.reader),m.handleUTF8(),m.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(l.CENTRAL_FILE_HEADER);)(f=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(l.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,l.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var m=f;if(this.checkSignature(l.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,l.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var v=this.centralDirOffset+this.centralDirSize;this.zip64&&(v+=20,v+=12+this.zip64EndOfCentralSize);var x=m-v;if(0<x)this.isSignature(m,l.CENTRAL_FILE_HEADER)||(this.reader.zero=x);else if(x<0)throw new Error("Corrupted zip: missing "+Math.abs(x)+" bytes.")},prepareReader:function(f){this.reader=o(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,n,s){var o=r("./reader/readerFor"),i=r("./utils"),l=r("./compressedObject"),c=r("./crc32"),u=r("./utf8"),d=r("./compressions"),f=r("./support");function m(v,x){this.options=v,this.loadOptions=x}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(v){var x,y;if(v.skip(22),this.fileNameLength=v.readInt(2),y=v.readInt(2),this.fileName=v.readData(this.fileNameLength),v.skip(y),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((x=function(_){for(var p in d)if(Object.prototype.hasOwnProperty.call(d,p)&&d[p].magic===_)return d[p];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new l(this.compressedSize,this.uncompressedSize,this.crc32,x,v.readData(this.compressedSize))},readCentralPart:function(v){this.versionMadeBy=v.readInt(2),v.skip(2),this.bitFlag=v.readInt(2),this.compressionMethod=v.readString(2),this.date=v.readDate(),this.crc32=v.readInt(4),this.compressedSize=v.readInt(4),this.uncompressedSize=v.readInt(4);var x=v.readInt(2);if(this.extraFieldsLength=v.readInt(2),this.fileCommentLength=v.readInt(2),this.diskNumberStart=v.readInt(2),this.internalFileAttributes=v.readInt(2),this.externalFileAttributes=v.readInt(4),this.localHeaderOffset=v.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");v.skip(x),this.readExtraFields(v),this.parseZIP64ExtraField(v),this.fileComment=v.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var v=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),v==0&&(this.dosPermissions=63&this.externalFileAttributes),v==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var v=o(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=v.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=v.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=v.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=v.readInt(4))}},readExtraFields:function(v){var x,y,_,p=v.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});v.index+4<p;)x=v.readInt(2),y=v.readInt(2),_=v.readData(y),this.extraFields[x]={id:x,length:y,value:_};v.setIndex(p)},handleUTF8:function(){var v=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var x=this.findExtraFieldUnicodePath();if(x!==null)this.fileNameStr=x;else{var y=i.transformTo(v,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(y)}var _=this.findExtraFieldUnicodeComment();if(_!==null)this.fileCommentStr=_;else{var p=i.transformTo(v,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(p)}}},findExtraFieldUnicodePath:function(){var v=this.extraFields[28789];if(v){var x=o(v.value);return x.readInt(1)!==1||c(this.fileName)!==x.readInt(4)?null:u.utf8decode(x.readData(v.length-5))}return null},findExtraFieldUnicodeComment:function(){var v=this.extraFields[25461];if(v){var x=o(v.value);return x.readInt(1)!==1||c(this.fileComment)!==x.readInt(4)?null:u.utf8decode(x.readData(v.length-5))}return null}},n.exports=m},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,n,s){function o(x,y,_){this.name=x,this.dir=_.dir,this.date=_.date,this.comment=_.comment,this.unixPermissions=_.unixPermissions,this.dosPermissions=_.dosPermissions,this._data=y,this._dataBinary=_.binary,this.options={compression:_.compression,compressionOptions:_.compressionOptions}}var i=r("./stream/StreamHelper"),l=r("./stream/DataWorker"),c=r("./utf8"),u=r("./compressedObject"),d=r("./stream/GenericWorker");o.prototype={internalStream:function(x){var y=null,_="string";try{if(!x)throw new Error("No output type specified.");var p=(_=x.toLowerCase())==="string"||_==="text";_!=="binarystring"&&_!=="text"||(_="string"),y=this._decompressWorker();var h=!this._dataBinary;h&&!p&&(y=y.pipe(new c.Utf8EncodeWorker)),!h&&p&&(y=y.pipe(new c.Utf8DecodeWorker))}catch(w){(y=new d("error")).error(w)}return new i(y,_,"")},async:function(x,y){return this.internalStream(x).accumulate(y)},nodeStream:function(x,y){return this.internalStream(x||"nodebuffer").toNodejsStream(y)},_compressWorker:function(x,y){if(this._data instanceof u&&this._data.compression.magic===x.magic)return this._data.getCompressedWorker();var _=this._decompressWorker();return this._dataBinary||(_=_.pipe(new c.Utf8EncodeWorker)),u.createWorkerFrom(_,x,y)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof d?this._data:new l(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],m=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},v=0;v<f.length;v++)o.prototype[f[v]]=m;n.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,n,s){(function(o){var i,l,c=o.MutationObserver||o.WebKitMutationObserver;if(c){var u=0,d=new c(x),f=o.document.createTextNode("");d.observe(f,{characterData:!0}),i=function(){f.data=u=++u%2}}else if(o.setImmediate||o.MessageChannel===void 0)i="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var y=o.document.createElement("script");y.onreadystatechange=function(){x(),y.onreadystatechange=null,y.parentNode.removeChild(y),y=null},o.document.documentElement.appendChild(y)}:function(){setTimeout(x,0)};else{var m=new o.MessageChannel;m.port1.onmessage=x,i=function(){m.port2.postMessage(0)}}var v=[];function x(){var y,_;l=!0;for(var p=v.length;p;){for(_=v,v=[],y=-1;++y<p;)_[y]();p=v.length}l=!1}n.exports=function(y){v.push(y)!==1||l||i()}}).call(this,typeof Zc<"u"?Zc:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,n,s){var o=r("immediate");function i(){}var l={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function f(p){if(typeof p!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,p!==i&&y(this,p)}function m(p,h,w){this.promise=p,typeof h=="function"&&(this.onFulfilled=h,this.callFulfilled=this.otherCallFulfilled),typeof w=="function"&&(this.onRejected=w,this.callRejected=this.otherCallRejected)}function v(p,h,w){o(function(){var C;try{C=h(w)}catch(j){return l.reject(p,j)}C===p?l.reject(p,new TypeError("Cannot resolve promise with itself")):l.resolve(p,C)})}function x(p){var h=p&&p.then;if(p&&(typeof p=="object"||typeof p=="function")&&typeof h=="function")return function(){h.apply(p,arguments)}}function y(p,h){var w=!1;function C(R){w||(w=!0,l.reject(p,R))}function j(R){w||(w=!0,l.resolve(p,R))}var E=_(function(){h(j,C)});E.status==="error"&&C(E.value)}function _(p,h){var w={};try{w.value=p(h),w.status="success"}catch(C){w.status="error",w.value=C}return w}(n.exports=f).prototype.finally=function(p){if(typeof p!="function")return this;var h=this.constructor;return this.then(function(w){return h.resolve(p()).then(function(){return w})},function(w){return h.resolve(p()).then(function(){throw w})})},f.prototype.catch=function(p){return this.then(null,p)},f.prototype.then=function(p,h){if(typeof p!="function"&&this.state===u||typeof h!="function"&&this.state===c)return this;var w=new this.constructor(i);return this.state!==d?v(w,this.state===u?p:h,this.outcome):this.queue.push(new m(w,p,h)),w},m.prototype.callFulfilled=function(p){l.resolve(this.promise,p)},m.prototype.otherCallFulfilled=function(p){v(this.promise,this.onFulfilled,p)},m.prototype.callRejected=function(p){l.reject(this.promise,p)},m.prototype.otherCallRejected=function(p){v(this.promise,this.onRejected,p)},l.resolve=function(p,h){var w=_(x,h);if(w.status==="error")return l.reject(p,w.value);var C=w.value;if(C)y(p,C);else{p.state=u,p.outcome=h;for(var j=-1,E=p.queue.length;++j<E;)p.queue[j].callFulfilled(h)}return p},l.reject=function(p,h){p.state=c,p.outcome=h;for(var w=-1,C=p.queue.length;++w<C;)p.queue[w].callRejected(h);return p},f.resolve=function(p){return p instanceof this?p:l.resolve(new this(i),p)},f.reject=function(p){var h=new this(i);return l.reject(h,p)},f.all=function(p){var h=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=p.length,C=!1;if(!w)return this.resolve([]);for(var j=new Array(w),E=0,R=-1,P=new this(i);++R<w;)A(p[R],R);return P;function A(L,q){h.resolve(L).then(function(N){j[q]=N,++E!==w||C||(C=!0,l.resolve(P,j))},function(N){C||(C=!0,l.reject(P,N))})}},f.race=function(p){var h=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=p.length,C=!1;if(!w)return this.resolve([]);for(var j=-1,E=new this(i);++j<w;)R=p[j],h.resolve(R).then(function(P){C||(C=!0,l.resolve(E,P))},function(P){C||(C=!0,l.reject(E,P))});var R;return E}},{immediate:36}],38:[function(r,n,s){var o={};(0,r("./lib/utils/common").assign)(o,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),n.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,n,s){var o=r("./zlib/deflate"),i=r("./utils/common"),l=r("./utils/strings"),c=r("./zlib/messages"),u=r("./zlib/zstream"),d=Object.prototype.toString,f=0,m=-1,v=0,x=8;function y(p){if(!(this instanceof y))return new y(p);this.options=i.assign({level:m,method:x,chunkSize:16384,windowBits:15,memLevel:8,strategy:v,to:""},p||{});var h=this.options;h.raw&&0<h.windowBits?h.windowBits=-h.windowBits:h.gzip&&0<h.windowBits&&h.windowBits<16&&(h.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var w=o.deflateInit2(this.strm,h.level,h.method,h.windowBits,h.memLevel,h.strategy);if(w!==f)throw new Error(c[w]);if(h.header&&o.deflateSetHeader(this.strm,h.header),h.dictionary){var C;if(C=typeof h.dictionary=="string"?l.string2buf(h.dictionary):d.call(h.dictionary)==="[object ArrayBuffer]"?new Uint8Array(h.dictionary):h.dictionary,(w=o.deflateSetDictionary(this.strm,C))!==f)throw new Error(c[w]);this._dict_set=!0}}function _(p,h){var w=new y(h);if(w.push(p,!0),w.err)throw w.msg||c[w.err];return w.result}y.prototype.push=function(p,h){var w,C,j=this.strm,E=this.options.chunkSize;if(this.ended)return!1;C=h===~~h?h:h===!0?4:0,typeof p=="string"?j.input=l.string2buf(p):d.call(p)==="[object ArrayBuffer]"?j.input=new Uint8Array(p):j.input=p,j.next_in=0,j.avail_in=j.input.length;do{if(j.avail_out===0&&(j.output=new i.Buf8(E),j.next_out=0,j.avail_out=E),(w=o.deflate(j,C))!==1&&w!==f)return this.onEnd(w),!(this.ended=!0);j.avail_out!==0&&(j.avail_in!==0||C!==4&&C!==2)||(this.options.to==="string"?this.onData(l.buf2binstring(i.shrinkBuf(j.output,j.next_out))):this.onData(i.shrinkBuf(j.output,j.next_out)))}while((0<j.avail_in||j.avail_out===0)&&w!==1);return C===4?(w=o.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===f):C!==2||(this.onEnd(f),!(j.avail_out=0))},y.prototype.onData=function(p){this.chunks.push(p)},y.prototype.onEnd=function(p){p===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},s.Deflate=y,s.deflate=_,s.deflateRaw=function(p,h){return(h=h||{}).raw=!0,_(p,h)},s.gzip=function(p,h){return(h=h||{}).gzip=!0,_(p,h)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,n,s){var o=r("./zlib/inflate"),i=r("./utils/common"),l=r("./utils/strings"),c=r("./zlib/constants"),u=r("./zlib/messages"),d=r("./zlib/zstream"),f=r("./zlib/gzheader"),m=Object.prototype.toString;function v(y){if(!(this instanceof v))return new v(y);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},y||{});var _=this.options;_.raw&&0<=_.windowBits&&_.windowBits<16&&(_.windowBits=-_.windowBits,_.windowBits===0&&(_.windowBits=-15)),!(0<=_.windowBits&&_.windowBits<16)||y&&y.windowBits||(_.windowBits+=32),15<_.windowBits&&_.windowBits<48&&!(15&_.windowBits)&&(_.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var p=o.inflateInit2(this.strm,_.windowBits);if(p!==c.Z_OK)throw new Error(u[p]);this.header=new f,o.inflateGetHeader(this.strm,this.header)}function x(y,_){var p=new v(_);if(p.push(y,!0),p.err)throw p.msg||u[p.err];return p.result}v.prototype.push=function(y,_){var p,h,w,C,j,E,R=this.strm,P=this.options.chunkSize,A=this.options.dictionary,L=!1;if(this.ended)return!1;h=_===~~_?_:_===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof y=="string"?R.input=l.binstring2buf(y):m.call(y)==="[object ArrayBuffer]"?R.input=new Uint8Array(y):R.input=y,R.next_in=0,R.avail_in=R.input.length;do{if(R.avail_out===0&&(R.output=new i.Buf8(P),R.next_out=0,R.avail_out=P),(p=o.inflate(R,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&A&&(E=typeof A=="string"?l.string2buf(A):m.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,p=o.inflateSetDictionary(this.strm,E)),p===c.Z_BUF_ERROR&&L===!0&&(p=c.Z_OK,L=!1),p!==c.Z_STREAM_END&&p!==c.Z_OK)return this.onEnd(p),!(this.ended=!0);R.next_out&&(R.avail_out!==0&&p!==c.Z_STREAM_END&&(R.avail_in!==0||h!==c.Z_FINISH&&h!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(w=l.utf8border(R.output,R.next_out),C=R.next_out-w,j=l.buf2string(R.output,w),R.next_out=C,R.avail_out=P-C,C&&i.arraySet(R.output,R.output,w,C,0),this.onData(j)):this.onData(i.shrinkBuf(R.output,R.next_out)))),R.avail_in===0&&R.avail_out===0&&(L=!0)}while((0<R.avail_in||R.avail_out===0)&&p!==c.Z_STREAM_END);return p===c.Z_STREAM_END&&(h=c.Z_FINISH),h===c.Z_FINISH?(p=o.inflateEnd(this.strm),this.onEnd(p),this.ended=!0,p===c.Z_OK):h!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(R.avail_out=0))},v.prototype.onData=function(y){this.chunks.push(y)},v.prototype.onEnd=function(y){y===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=y,this.msg=this.strm.msg},s.Inflate=v,s.inflate=x,s.inflateRaw=function(y,_){return(_=_||{}).raw=!0,x(y,_)},s.ungzip=x},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,n,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(c){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var d=u.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(c[f]=d[f])}}return c},s.shrinkBuf=function(c,u){return c.length===u?c:c.subarray?c.subarray(0,u):(c.length=u,c)};var i={arraySet:function(c,u,d,f,m){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+f),m);else for(var v=0;v<f;v++)c[m+v]=u[d+v]},flattenChunks:function(c){var u,d,f,m,v,x;for(u=f=0,d=c.length;u<d;u++)f+=c[u].length;for(x=new Uint8Array(f),u=m=0,d=c.length;u<d;u++)v=c[u],x.set(v,m),m+=v.length;return x}},l={arraySet:function(c,u,d,f,m){for(var v=0;v<f;v++)c[m+v]=u[d+v]},flattenChunks:function(c){return[].concat.apply([],c)}};s.setTyped=function(c){c?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,i)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,l))},s.setTyped(o)},{}],42:[function(r,n,s){var o=r("./common"),i=!0,l=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{l=!1}for(var c=new o.Buf8(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function d(f,m){if(m<65537&&(f.subarray&&l||!f.subarray&&i))return String.fromCharCode.apply(null,o.shrinkBuf(f,m));for(var v="",x=0;x<m;x++)v+=String.fromCharCode(f[x]);return v}c[254]=c[254]=1,s.string2buf=function(f){var m,v,x,y,_,p=f.length,h=0;for(y=0;y<p;y++)(64512&(v=f.charCodeAt(y)))==55296&&y+1<p&&(64512&(x=f.charCodeAt(y+1)))==56320&&(v=65536+(v-55296<<10)+(x-56320),y++),h+=v<128?1:v<2048?2:v<65536?3:4;for(m=new o.Buf8(h),y=_=0;_<h;y++)(64512&(v=f.charCodeAt(y)))==55296&&y+1<p&&(64512&(x=f.charCodeAt(y+1)))==56320&&(v=65536+(v-55296<<10)+(x-56320),y++),v<128?m[_++]=v:(v<2048?m[_++]=192|v>>>6:(v<65536?m[_++]=224|v>>>12:(m[_++]=240|v>>>18,m[_++]=128|v>>>12&63),m[_++]=128|v>>>6&63),m[_++]=128|63&v);return m},s.buf2binstring=function(f){return d(f,f.length)},s.binstring2buf=function(f){for(var m=new o.Buf8(f.length),v=0,x=m.length;v<x;v++)m[v]=f.charCodeAt(v);return m},s.buf2string=function(f,m){var v,x,y,_,p=m||f.length,h=new Array(2*p);for(v=x=0;v<p;)if((y=f[v++])<128)h[x++]=y;else if(4<(_=c[y]))h[x++]=65533,v+=_-1;else{for(y&=_===2?31:_===3?15:7;1<_&&v<p;)y=y<<6|63&f[v++],_--;1<_?h[x++]=65533:y<65536?h[x++]=y:(y-=65536,h[x++]=55296|y>>10&1023,h[x++]=56320|1023&y)}return d(h,x)},s.utf8border=function(f,m){var v;for((m=m||f.length)>f.length&&(m=f.length),v=m-1;0<=v&&(192&f[v])==128;)v--;return v<0||v===0?m:v+c[f[v]]>m?v:m}},{"./common":41}],43:[function(r,n,s){n.exports=function(o,i,l,c){for(var u=65535&o|0,d=o>>>16&65535|0,f=0;l!==0;){for(l-=f=2e3<l?2e3:l;d=d+(u=u+i[c++]|0)|0,--f;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(r,n,s){n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(r,n,s){var o=function(){for(var i,l=[],c=0;c<256;c++){i=c;for(var u=0;u<8;u++)i=1&i?3988292384^i>>>1:i>>>1;l[c]=i}return l}();n.exports=function(i,l,c,u){var d=o,f=u+c;i^=-1;for(var m=u;m<f;m++)i=i>>>8^d[255&(i^l[m])];return-1^i}},{}],46:[function(r,n,s){var o,i=r("../utils/common"),l=r("./trees"),c=r("./adler32"),u=r("./crc32"),d=r("./messages"),f=0,m=4,v=0,x=-2,y=-1,_=4,p=2,h=8,w=9,C=286,j=30,E=19,R=2*C+1,P=15,A=3,L=258,q=L+A+1,N=42,F=113,b=1,V=2,te=3,B=4;function K(k,J){return k.msg=d[J],J}function I(k){return(k<<1)-(4<k?9:0)}function Q(k){for(var J=k.length;0<=--J;)k[J]=0}function z(k){var J=k.state,G=J.pending;G>k.avail_out&&(G=k.avail_out),G!==0&&(i.arraySet(k.output,J.pending_buf,J.pending_out,G,k.next_out),k.next_out+=G,J.pending_out+=G,k.total_out+=G,k.avail_out-=G,J.pending-=G,J.pending===0&&(J.pending_out=0))}function $(k,J){l._tr_flush_block(k,0<=k.block_start?k.block_start:-1,k.strstart-k.block_start,J),k.block_start=k.strstart,z(k.strm)}function he(k,J){k.pending_buf[k.pending++]=J}function ne(k,J){k.pending_buf[k.pending++]=J>>>8&255,k.pending_buf[k.pending++]=255&J}function se(k,J){var G,D,S=k.max_chain_length,T=k.strstart,O=k.prev_length,Y=k.nice_match,M=k.strstart>k.w_size-q?k.strstart-(k.w_size-q):0,H=k.window,X=k.w_mask,ee=k.prev,me=k.strstart+L,Ye=H[T+O-1],Ue=H[T+O];k.prev_length>=k.good_match&&(S>>=2),Y>k.lookahead&&(Y=k.lookahead);do if(H[(G=J)+O]===Ue&&H[G+O-1]===Ye&&H[G]===H[T]&&H[++G]===H[T+1]){T+=2,G++;do;while(H[++T]===H[++G]&&H[++T]===H[++G]&&H[++T]===H[++G]&&H[++T]===H[++G]&&H[++T]===H[++G]&&H[++T]===H[++G]&&H[++T]===H[++G]&&H[++T]===H[++G]&&T<me);if(D=L-(me-T),T=me-L,O<D){if(k.match_start=J,Y<=(O=D))break;Ye=H[T+O-1],Ue=H[T+O]}}while((J=ee[J&X])>M&&--S!=0);return O<=k.lookahead?O:k.lookahead}function Oe(k){var J,G,D,S,T,O,Y,M,H,X,ee=k.w_size;do{if(S=k.window_size-k.lookahead-k.strstart,k.strstart>=ee+(ee-q)){for(i.arraySet(k.window,k.window,ee,ee,0),k.match_start-=ee,k.strstart-=ee,k.block_start-=ee,J=G=k.hash_size;D=k.head[--J],k.head[J]=ee<=D?D-ee:0,--G;);for(J=G=ee;D=k.prev[--J],k.prev[J]=ee<=D?D-ee:0,--G;);S+=ee}if(k.strm.avail_in===0)break;if(O=k.strm,Y=k.window,M=k.strstart+k.lookahead,H=S,X=void 0,X=O.avail_in,H<X&&(X=H),G=X===0?0:(O.avail_in-=X,i.arraySet(Y,O.input,O.next_in,X,M),O.state.wrap===1?O.adler=c(O.adler,Y,X,M):O.state.wrap===2&&(O.adler=u(O.adler,Y,X,M)),O.next_in+=X,O.total_in+=X,X),k.lookahead+=G,k.lookahead+k.insert>=A)for(T=k.strstart-k.insert,k.ins_h=k.window[T],k.ins_h=(k.ins_h<<k.hash_shift^k.window[T+1])&k.hash_mask;k.insert&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[T+A-1])&k.hash_mask,k.prev[T&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=T,T++,k.insert--,!(k.lookahead+k.insert<A)););}while(k.lookahead<q&&k.strm.avail_in!==0)}function pe(k,J){for(var G,D;;){if(k.lookahead<q){if(Oe(k),k.lookahead<q&&J===f)return b;if(k.lookahead===0)break}if(G=0,k.lookahead>=A&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+A-1])&k.hash_mask,G=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),G!==0&&k.strstart-G<=k.w_size-q&&(k.match_length=se(k,G)),k.match_length>=A)if(D=l._tr_tally(k,k.strstart-k.match_start,k.match_length-A),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=A){for(k.match_length--;k.strstart++,k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+A-1])&k.hash_mask,G=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart,--k.match_length!=0;);k.strstart++}else k.strstart+=k.match_length,k.match_length=0,k.ins_h=k.window[k.strstart],k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+1])&k.hash_mask;else D=l._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++;if(D&&($(k,!1),k.strm.avail_out===0))return b}return k.insert=k.strstart<A-1?k.strstart:A-1,J===m?($(k,!0),k.strm.avail_out===0?te:B):k.last_lit&&($(k,!1),k.strm.avail_out===0)?b:V}function xe(k,J){for(var G,D,S;;){if(k.lookahead<q){if(Oe(k),k.lookahead<q&&J===f)return b;if(k.lookahead===0)break}if(G=0,k.lookahead>=A&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+A-1])&k.hash_mask,G=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),k.prev_length=k.match_length,k.prev_match=k.match_start,k.match_length=A-1,G!==0&&k.prev_length<k.max_lazy_match&&k.strstart-G<=k.w_size-q&&(k.match_length=se(k,G),k.match_length<=5&&(k.strategy===1||k.match_length===A&&4096<k.strstart-k.match_start)&&(k.match_length=A-1)),k.prev_length>=A&&k.match_length<=k.prev_length){for(S=k.strstart+k.lookahead-A,D=l._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-A),k.lookahead-=k.prev_length-1,k.prev_length-=2;++k.strstart<=S&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+A-1])&k.hash_mask,G=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),--k.prev_length!=0;);if(k.match_available=0,k.match_length=A-1,k.strstart++,D&&($(k,!1),k.strm.avail_out===0))return b}else if(k.match_available){if((D=l._tr_tally(k,0,k.window[k.strstart-1]))&&$(k,!1),k.strstart++,k.lookahead--,k.strm.avail_out===0)return b}else k.match_available=1,k.strstart++,k.lookahead--}return k.match_available&&(D=l._tr_tally(k,0,k.window[k.strstart-1]),k.match_available=0),k.insert=k.strstart<A-1?k.strstart:A-1,J===m?($(k,!0),k.strm.avail_out===0?te:B):k.last_lit&&($(k,!1),k.strm.avail_out===0)?b:V}function Te(k,J,G,D,S){this.good_length=k,this.max_lazy=J,this.nice_length=G,this.max_chain=D,this.func=S}function Fe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=h,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*R),this.dyn_dtree=new i.Buf16(2*(2*j+1)),this.bl_tree=new i.Buf16(2*(2*E+1)),Q(this.dyn_ltree),Q(this.dyn_dtree),Q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(P+1),this.heap=new i.Buf16(2*C+1),Q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*C+1),Q(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Me(k){var J;return k&&k.state?(k.total_in=k.total_out=0,k.data_type=p,(J=k.state).pending=0,J.pending_out=0,J.wrap<0&&(J.wrap=-J.wrap),J.status=J.wrap?N:F,k.adler=J.wrap===2?0:1,J.last_flush=f,l._tr_init(J),v):K(k,x)}function Pe(k){var J=Me(k);return J===v&&function(G){G.window_size=2*G.w_size,Q(G.head),G.max_lazy_match=o[G.level].max_lazy,G.good_match=o[G.level].good_length,G.nice_match=o[G.level].nice_length,G.max_chain_length=o[G.level].max_chain,G.strstart=0,G.block_start=0,G.lookahead=0,G.insert=0,G.match_length=G.prev_length=A-1,G.match_available=0,G.ins_h=0}(k.state),J}function nt(k,J,G,D,S,T){if(!k)return x;var O=1;if(J===y&&(J=6),D<0?(O=0,D=-D):15<D&&(O=2,D-=16),S<1||w<S||G!==h||D<8||15<D||J<0||9<J||T<0||_<T)return K(k,x);D===8&&(D=9);var Y=new Fe;return(k.state=Y).strm=k,Y.wrap=O,Y.gzhead=null,Y.w_bits=D,Y.w_size=1<<Y.w_bits,Y.w_mask=Y.w_size-1,Y.hash_bits=S+7,Y.hash_size=1<<Y.hash_bits,Y.hash_mask=Y.hash_size-1,Y.hash_shift=~~((Y.hash_bits+A-1)/A),Y.window=new i.Buf8(2*Y.w_size),Y.head=new i.Buf16(Y.hash_size),Y.prev=new i.Buf16(Y.w_size),Y.lit_bufsize=1<<S+6,Y.pending_buf_size=4*Y.lit_bufsize,Y.pending_buf=new i.Buf8(Y.pending_buf_size),Y.d_buf=1*Y.lit_bufsize,Y.l_buf=3*Y.lit_bufsize,Y.level=J,Y.strategy=T,Y.method=G,Pe(k)}o=[new Te(0,0,0,0,function(k,J){var G=65535;for(G>k.pending_buf_size-5&&(G=k.pending_buf_size-5);;){if(k.lookahead<=1){if(Oe(k),k.lookahead===0&&J===f)return b;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var D=k.block_start+G;if((k.strstart===0||k.strstart>=D)&&(k.lookahead=k.strstart-D,k.strstart=D,$(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-q&&($(k,!1),k.strm.avail_out===0))return b}return k.insert=0,J===m?($(k,!0),k.strm.avail_out===0?te:B):(k.strstart>k.block_start&&($(k,!1),k.strm.avail_out),b)}),new Te(4,4,8,4,pe),new Te(4,5,16,8,pe),new Te(4,6,32,32,pe),new Te(4,4,16,16,xe),new Te(8,16,32,32,xe),new Te(8,16,128,128,xe),new Te(8,32,128,256,xe),new Te(32,128,258,1024,xe),new Te(32,258,258,4096,xe)],s.deflateInit=function(k,J){return nt(k,J,h,15,8,0)},s.deflateInit2=nt,s.deflateReset=Pe,s.deflateResetKeep=Me,s.deflateSetHeader=function(k,J){return k&&k.state?k.state.wrap!==2?x:(k.state.gzhead=J,v):x},s.deflate=function(k,J){var G,D,S,T;if(!k||!k.state||5<J||J<0)return k?K(k,x):x;if(D=k.state,!k.output||!k.input&&k.avail_in!==0||D.status===666&&J!==m)return K(k,k.avail_out===0?-5:x);if(D.strm=k,G=D.last_flush,D.last_flush=J,D.status===N)if(D.wrap===2)k.adler=0,he(D,31),he(D,139),he(D,8),D.gzhead?(he(D,(D.gzhead.text?1:0)+(D.gzhead.hcrc?2:0)+(D.gzhead.extra?4:0)+(D.gzhead.name?8:0)+(D.gzhead.comment?16:0)),he(D,255&D.gzhead.time),he(D,D.gzhead.time>>8&255),he(D,D.gzhead.time>>16&255),he(D,D.gzhead.time>>24&255),he(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),he(D,255&D.gzhead.os),D.gzhead.extra&&D.gzhead.extra.length&&(he(D,255&D.gzhead.extra.length),he(D,D.gzhead.extra.length>>8&255)),D.gzhead.hcrc&&(k.adler=u(k.adler,D.pending_buf,D.pending,0)),D.gzindex=0,D.status=69):(he(D,0),he(D,0),he(D,0),he(D,0),he(D,0),he(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),he(D,3),D.status=F);else{var O=h+(D.w_bits-8<<4)<<8;O|=(2<=D.strategy||D.level<2?0:D.level<6?1:D.level===6?2:3)<<6,D.strstart!==0&&(O|=32),O+=31-O%31,D.status=F,ne(D,O),D.strstart!==0&&(ne(D,k.adler>>>16),ne(D,65535&k.adler)),k.adler=1}if(D.status===69)if(D.gzhead.extra){for(S=D.pending;D.gzindex<(65535&D.gzhead.extra.length)&&(D.pending!==D.pending_buf_size||(D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending!==D.pending_buf_size));)he(D,255&D.gzhead.extra[D.gzindex]),D.gzindex++;D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),D.gzindex===D.gzhead.extra.length&&(D.gzindex=0,D.status=73)}else D.status=73;if(D.status===73)if(D.gzhead.name){S=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending===D.pending_buf_size)){T=1;break}T=D.gzindex<D.gzhead.name.length?255&D.gzhead.name.charCodeAt(D.gzindex++):0,he(D,T)}while(T!==0);D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),T===0&&(D.gzindex=0,D.status=91)}else D.status=91;if(D.status===91)if(D.gzhead.comment){S=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending===D.pending_buf_size)){T=1;break}T=D.gzindex<D.gzhead.comment.length?255&D.gzhead.comment.charCodeAt(D.gzindex++):0,he(D,T)}while(T!==0);D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),T===0&&(D.status=103)}else D.status=103;if(D.status===103&&(D.gzhead.hcrc?(D.pending+2>D.pending_buf_size&&z(k),D.pending+2<=D.pending_buf_size&&(he(D,255&k.adler),he(D,k.adler>>8&255),k.adler=0,D.status=F)):D.status=F),D.pending!==0){if(z(k),k.avail_out===0)return D.last_flush=-1,v}else if(k.avail_in===0&&I(J)<=I(G)&&J!==m)return K(k,-5);if(D.status===666&&k.avail_in!==0)return K(k,-5);if(k.avail_in!==0||D.lookahead!==0||J!==f&&D.status!==666){var Y=D.strategy===2?function(M,H){for(var X;;){if(M.lookahead===0&&(Oe(M),M.lookahead===0)){if(H===f)return b;break}if(M.match_length=0,X=l._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,X&&($(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===m?($(M,!0),M.strm.avail_out===0?te:B):M.last_lit&&($(M,!1),M.strm.avail_out===0)?b:V}(D,J):D.strategy===3?function(M,H){for(var X,ee,me,Ye,Ue=M.window;;){if(M.lookahead<=L){if(Oe(M),M.lookahead<=L&&H===f)return b;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=A&&0<M.strstart&&(ee=Ue[me=M.strstart-1])===Ue[++me]&&ee===Ue[++me]&&ee===Ue[++me]){Ye=M.strstart+L;do;while(ee===Ue[++me]&&ee===Ue[++me]&&ee===Ue[++me]&&ee===Ue[++me]&&ee===Ue[++me]&&ee===Ue[++me]&&ee===Ue[++me]&&ee===Ue[++me]&&me<Ye);M.match_length=L-(Ye-me),M.match_length>M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=A?(X=l._tr_tally(M,1,M.match_length-A),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(X=l._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),X&&($(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===m?($(M,!0),M.strm.avail_out===0?te:B):M.last_lit&&($(M,!1),M.strm.avail_out===0)?b:V}(D,J):o[D.level].func(D,J);if(Y!==te&&Y!==B||(D.status=666),Y===b||Y===te)return k.avail_out===0&&(D.last_flush=-1),v;if(Y===V&&(J===1?l._tr_align(D):J!==5&&(l._tr_stored_block(D,0,0,!1),J===3&&(Q(D.head),D.lookahead===0&&(D.strstart=0,D.block_start=0,D.insert=0))),z(k),k.avail_out===0))return D.last_flush=-1,v}return J!==m?v:D.wrap<=0?1:(D.wrap===2?(he(D,255&k.adler),he(D,k.adler>>8&255),he(D,k.adler>>16&255),he(D,k.adler>>24&255),he(D,255&k.total_in),he(D,k.total_in>>8&255),he(D,k.total_in>>16&255),he(D,k.total_in>>24&255)):(ne(D,k.adler>>>16),ne(D,65535&k.adler)),z(k),0<D.wrap&&(D.wrap=-D.wrap),D.pending!==0?v:1)},s.deflateEnd=function(k){var J;return k&&k.state?(J=k.state.status)!==N&&J!==69&&J!==73&&J!==91&&J!==103&&J!==F&&J!==666?K(k,x):(k.state=null,J===F?K(k,-3):v):x},s.deflateSetDictionary=function(k,J){var G,D,S,T,O,Y,M,H,X=J.length;if(!k||!k.state||(T=(G=k.state).wrap)===2||T===1&&G.status!==N||G.lookahead)return x;for(T===1&&(k.adler=c(k.adler,J,X,0)),G.wrap=0,X>=G.w_size&&(T===0&&(Q(G.head),G.strstart=0,G.block_start=0,G.insert=0),H=new i.Buf8(G.w_size),i.arraySet(H,J,X-G.w_size,G.w_size,0),J=H,X=G.w_size),O=k.avail_in,Y=k.next_in,M=k.input,k.avail_in=X,k.next_in=0,k.input=J,Oe(G);G.lookahead>=A;){for(D=G.strstart,S=G.lookahead-(A-1);G.ins_h=(G.ins_h<<G.hash_shift^G.window[D+A-1])&G.hash_mask,G.prev[D&G.w_mask]=G.head[G.ins_h],G.head[G.ins_h]=D,D++,--S;);G.strstart=D,G.lookahead=A-1,Oe(G)}return G.strstart+=G.lookahead,G.block_start=G.strstart,G.insert=G.lookahead,G.lookahead=0,G.match_length=G.prev_length=A-1,G.match_available=0,k.next_in=Y,k.input=M,k.avail_in=O,G.wrap=T,v},s.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,n,s){n.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(r,n,s){n.exports=function(o,i){var l,c,u,d,f,m,v,x,y,_,p,h,w,C,j,E,R,P,A,L,q,N,F,b,V;l=o.state,c=o.next_in,b=o.input,u=c+(o.avail_in-5),d=o.next_out,V=o.output,f=d-(i-o.avail_out),m=d+(o.avail_out-257),v=l.dmax,x=l.wsize,y=l.whave,_=l.wnext,p=l.window,h=l.hold,w=l.bits,C=l.lencode,j=l.distcode,E=(1<<l.lenbits)-1,R=(1<<l.distbits)-1;e:do{w<15&&(h+=b[c++]<<w,w+=8,h+=b[c++]<<w,w+=8),P=C[h&E];t:for(;;){if(h>>>=A=P>>>24,w-=A,(A=P>>>16&255)===0)V[d++]=65535&P;else{if(!(16&A)){if(!(64&A)){P=C[(65535&P)+(h&(1<<A)-1)];continue t}if(32&A){l.mode=12;break e}o.msg="invalid literal/length code",l.mode=30;break e}L=65535&P,(A&=15)&&(w<A&&(h+=b[c++]<<w,w+=8),L+=h&(1<<A)-1,h>>>=A,w-=A),w<15&&(h+=b[c++]<<w,w+=8,h+=b[c++]<<w,w+=8),P=j[h&R];r:for(;;){if(h>>>=A=P>>>24,w-=A,!(16&(A=P>>>16&255))){if(!(64&A)){P=j[(65535&P)+(h&(1<<A)-1)];continue r}o.msg="invalid distance code",l.mode=30;break e}if(q=65535&P,w<(A&=15)&&(h+=b[c++]<<w,(w+=8)<A&&(h+=b[c++]<<w,w+=8)),v<(q+=h&(1<<A)-1)){o.msg="invalid distance too far back",l.mode=30;break e}if(h>>>=A,w-=A,(A=d-f)<q){if(y<(A=q-A)&&l.sane){o.msg="invalid distance too far back",l.mode=30;break e}if(F=p,(N=0)===_){if(N+=x-A,A<L){for(L-=A;V[d++]=p[N++],--A;);N=d-q,F=V}}else if(_<A){if(N+=x+_-A,(A-=_)<L){for(L-=A;V[d++]=p[N++],--A;);if(N=0,_<L){for(L-=A=_;V[d++]=p[N++],--A;);N=d-q,F=V}}}else if(N+=_-A,A<L){for(L-=A;V[d++]=p[N++],--A;);N=d-q,F=V}for(;2<L;)V[d++]=F[N++],V[d++]=F[N++],V[d++]=F[N++],L-=3;L&&(V[d++]=F[N++],1<L&&(V[d++]=F[N++]))}else{for(N=d-q;V[d++]=V[N++],V[d++]=V[N++],V[d++]=V[N++],2<(L-=3););L&&(V[d++]=V[N++],1<L&&(V[d++]=V[N++]))}break}}break}}while(c<u&&d<m);c-=L=w>>3,h&=(1<<(w-=L<<3))-1,o.next_in=c,o.next_out=d,o.avail_in=c<u?u-c+5:5-(c-u),o.avail_out=d<m?m-d+257:257-(d-m),l.hold=h,l.bits=w}},{}],49:[function(r,n,s){var o=r("../utils/common"),i=r("./adler32"),l=r("./crc32"),c=r("./inffast"),u=r("./inftrees"),d=1,f=2,m=0,v=-2,x=1,y=852,_=592;function p(N){return(N>>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(N){var F;return N&&N.state?(F=N.state,N.total_in=N.total_out=F.total=0,N.msg="",F.wrap&&(N.adler=1&F.wrap),F.mode=x,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new o.Buf32(y),F.distcode=F.distdyn=new o.Buf32(_),F.sane=1,F.back=-1,m):v}function C(N){var F;return N&&N.state?((F=N.state).wsize=0,F.whave=0,F.wnext=0,w(N)):v}function j(N,F){var b,V;return N&&N.state?(V=N.state,F<0?(b=0,F=-F):(b=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15<F)?v:(V.window!==null&&V.wbits!==F&&(V.window=null),V.wrap=b,V.wbits=F,C(N))):v}function E(N,F){var b,V;return N?(V=new h,(N.state=V).window=null,(b=j(N,F))!==m&&(N.state=null),b):v}var R,P,A=!0;function L(N){if(A){var F;for(R=new o.Buf32(512),P=new o.Buf32(32),F=0;F<144;)N.lens[F++]=8;for(;F<256;)N.lens[F++]=9;for(;F<280;)N.lens[F++]=7;for(;F<288;)N.lens[F++]=8;for(u(d,N.lens,0,288,R,0,N.work,{bits:9}),F=0;F<32;)N.lens[F++]=5;u(f,N.lens,0,32,P,0,N.work,{bits:5}),A=!1}N.lencode=R,N.lenbits=9,N.distcode=P,N.distbits=5}function q(N,F,b,V){var te,B=N.state;return B.window===null&&(B.wsize=1<<B.wbits,B.wnext=0,B.whave=0,B.window=new o.Buf8(B.wsize)),V>=B.wsize?(o.arraySet(B.window,F,b-B.wsize,B.wsize,0),B.wnext=0,B.whave=B.wsize):(V<(te=B.wsize-B.wnext)&&(te=V),o.arraySet(B.window,F,b-V,te,B.wnext),(V-=te)?(o.arraySet(B.window,F,b-V,V,0),B.wnext=V,B.whave=B.wsize):(B.wnext+=te,B.wnext===B.wsize&&(B.wnext=0),B.whave<B.wsize&&(B.whave+=te))),0}s.inflateReset=C,s.inflateReset2=j,s.inflateResetKeep=w,s.inflateInit=function(N){return E(N,15)},s.inflateInit2=E,s.inflate=function(N,F){var b,V,te,B,K,I,Q,z,$,he,ne,se,Oe,pe,xe,Te,Fe,Me,Pe,nt,k,J,G,D,S=0,T=new o.Buf8(4),O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!N||!N.state||!N.output||!N.input&&N.avail_in!==0)return v;(b=N.state).mode===12&&(b.mode=13),K=N.next_out,te=N.output,Q=N.avail_out,B=N.next_in,V=N.input,I=N.avail_in,z=b.hold,$=b.bits,he=I,ne=Q,J=m;e:for(;;)switch(b.mode){case x:if(b.wrap===0){b.mode=13;break}for(;$<16;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}if(2&b.wrap&&z===35615){T[b.check=0]=255&z,T[1]=z>>>8&255,b.check=l(b.check,T,2,0),$=z=0,b.mode=2;break}if(b.flags=0,b.head&&(b.head.done=!1),!(1&b.wrap)||(((255&z)<<8)+(z>>8))%31){N.msg="incorrect header check",b.mode=30;break}if((15&z)!=8){N.msg="unknown compression method",b.mode=30;break}if($-=4,k=8+(15&(z>>>=4)),b.wbits===0)b.wbits=k;else if(k>b.wbits){N.msg="invalid window size",b.mode=30;break}b.dmax=1<<k,N.adler=b.check=1,b.mode=512&z?10:12,$=z=0;break;case 2:for(;$<16;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}if(b.flags=z,(255&b.flags)!=8){N.msg="unknown compression method",b.mode=30;break}if(57344&b.flags){N.msg="unknown header flags set",b.mode=30;break}b.head&&(b.head.text=z>>8&1),512&b.flags&&(T[0]=255&z,T[1]=z>>>8&255,b.check=l(b.check,T,2,0)),$=z=0,b.mode=3;case 3:for(;$<32;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}b.head&&(b.head.time=z),512&b.flags&&(T[0]=255&z,T[1]=z>>>8&255,T[2]=z>>>16&255,T[3]=z>>>24&255,b.check=l(b.check,T,4,0)),$=z=0,b.mode=4;case 4:for(;$<16;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}b.head&&(b.head.xflags=255&z,b.head.os=z>>8),512&b.flags&&(T[0]=255&z,T[1]=z>>>8&255,b.check=l(b.check,T,2,0)),$=z=0,b.mode=5;case 5:if(1024&b.flags){for(;$<16;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}b.length=z,b.head&&(b.head.extra_len=z),512&b.flags&&(T[0]=255&z,T[1]=z>>>8&255,b.check=l(b.check,T,2,0)),$=z=0}else b.head&&(b.head.extra=null);b.mode=6;case 6:if(1024&b.flags&&(I<(se=b.length)&&(se=I),se&&(b.head&&(k=b.head.extra_len-b.length,b.head.extra||(b.head.extra=new Array(b.head.extra_len)),o.arraySet(b.head.extra,V,B,se,k)),512&b.flags&&(b.check=l(b.check,V,se,B)),I-=se,B+=se,b.length-=se),b.length))break e;b.length=0,b.mode=7;case 7:if(2048&b.flags){if(I===0)break e;for(se=0;k=V[B+se++],b.head&&k&&b.length<65536&&(b.head.name+=String.fromCharCode(k)),k&&se<I;);if(512&b.flags&&(b.check=l(b.check,V,se,B)),I-=se,B+=se,k)break e}else b.head&&(b.head.name=null);b.length=0,b.mode=8;case 8:if(4096&b.flags){if(I===0)break e;for(se=0;k=V[B+se++],b.head&&k&&b.length<65536&&(b.head.comment+=String.fromCharCode(k)),k&&se<I;);if(512&b.flags&&(b.check=l(b.check,V,se,B)),I-=se,B+=se,k)break e}else b.head&&(b.head.comment=null);b.mode=9;case 9:if(512&b.flags){for(;$<16;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}if(z!==(65535&b.check)){N.msg="header crc mismatch",b.mode=30;break}$=z=0}b.head&&(b.head.hcrc=b.flags>>9&1,b.head.done=!0),N.adler=b.check=0,b.mode=12;break;case 10:for(;$<32;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}N.adler=b.check=p(z),$=z=0,b.mode=11;case 11:if(b.havedict===0)return N.next_out=K,N.avail_out=Q,N.next_in=B,N.avail_in=I,b.hold=z,b.bits=$,2;N.adler=b.check=1,b.mode=12;case 12:if(F===5||F===6)break e;case 13:if(b.last){z>>>=7&$,$-=7&$,b.mode=27;break}for(;$<3;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}switch(b.last=1&z,$-=1,3&(z>>>=1)){case 0:b.mode=14;break;case 1:if(L(b),b.mode=20,F!==6)break;z>>>=2,$-=2;break e;case 2:b.mode=17;break;case 3:N.msg="invalid block type",b.mode=30}z>>>=2,$-=2;break;case 14:for(z>>>=7&$,$-=7&$;$<32;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}if((65535&z)!=(z>>>16^65535)){N.msg="invalid stored block lengths",b.mode=30;break}if(b.length=65535&z,$=z=0,b.mode=15,F===6)break e;case 15:b.mode=16;case 16:if(se=b.length){if(I<se&&(se=I),Q<se&&(se=Q),se===0)break e;o.arraySet(te,V,B,se,K),I-=se,B+=se,Q-=se,K+=se,b.length-=se;break}b.mode=12;break;case 17:for(;$<14;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}if(b.nlen=257+(31&z),z>>>=5,$-=5,b.ndist=1+(31&z),z>>>=5,$-=5,b.ncode=4+(15&z),z>>>=4,$-=4,286<b.nlen||30<b.ndist){N.msg="too many length or distance symbols",b.mode=30;break}b.have=0,b.mode=18;case 18:for(;b.have<b.ncode;){for(;$<3;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}b.lens[O[b.have++]]=7&z,z>>>=3,$-=3}for(;b.have<19;)b.lens[O[b.have++]]=0;if(b.lencode=b.lendyn,b.lenbits=7,G={bits:b.lenbits},J=u(0,b.lens,0,19,b.lencode,0,b.work,G),b.lenbits=G.bits,J){N.msg="invalid code lengths set",b.mode=30;break}b.have=0,b.mode=19;case 19:for(;b.have<b.nlen+b.ndist;){for(;Te=(S=b.lencode[z&(1<<b.lenbits)-1])>>>16&255,Fe=65535&S,!((xe=S>>>24)<=$);){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}if(Fe<16)z>>>=xe,$-=xe,b.lens[b.have++]=Fe;else{if(Fe===16){for(D=xe+2;$<D;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}if(z>>>=xe,$-=xe,b.have===0){N.msg="invalid bit length repeat",b.mode=30;break}k=b.lens[b.have-1],se=3+(3&z),z>>>=2,$-=2}else if(Fe===17){for(D=xe+3;$<D;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}$-=xe,k=0,se=3+(7&(z>>>=xe)),z>>>=3,$-=3}else{for(D=xe+7;$<D;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}$-=xe,k=0,se=11+(127&(z>>>=xe)),z>>>=7,$-=7}if(b.have+se>b.nlen+b.ndist){N.msg="invalid bit length repeat",b.mode=30;break}for(;se--;)b.lens[b.have++]=k}}if(b.mode===30)break;if(b.lens[256]===0){N.msg="invalid code -- missing end-of-block",b.mode=30;break}if(b.lenbits=9,G={bits:b.lenbits},J=u(d,b.lens,0,b.nlen,b.lencode,0,b.work,G),b.lenbits=G.bits,J){N.msg="invalid literal/lengths set",b.mode=30;break}if(b.distbits=6,b.distcode=b.distdyn,G={bits:b.distbits},J=u(f,b.lens,b.nlen,b.ndist,b.distcode,0,b.work,G),b.distbits=G.bits,J){N.msg="invalid distances set",b.mode=30;break}if(b.mode=20,F===6)break e;case 20:b.mode=21;case 21:if(6<=I&&258<=Q){N.next_out=K,N.avail_out=Q,N.next_in=B,N.avail_in=I,b.hold=z,b.bits=$,c(N,ne),K=N.next_out,te=N.output,Q=N.avail_out,B=N.next_in,V=N.input,I=N.avail_in,z=b.hold,$=b.bits,b.mode===12&&(b.back=-1);break}for(b.back=0;Te=(S=b.lencode[z&(1<<b.lenbits)-1])>>>16&255,Fe=65535&S,!((xe=S>>>24)<=$);){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}if(Te&&!(240&Te)){for(Me=xe,Pe=Te,nt=Fe;Te=(S=b.lencode[nt+((z&(1<<Me+Pe)-1)>>Me)])>>>16&255,Fe=65535&S,!(Me+(xe=S>>>24)<=$);){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}z>>>=Me,$-=Me,b.back+=Me}if(z>>>=xe,$-=xe,b.back+=xe,b.length=Fe,Te===0){b.mode=26;break}if(32&Te){b.back=-1,b.mode=12;break}if(64&Te){N.msg="invalid literal/length code",b.mode=30;break}b.extra=15&Te,b.mode=22;case 22:if(b.extra){for(D=b.extra;$<D;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}b.length+=z&(1<<b.extra)-1,z>>>=b.extra,$-=b.extra,b.back+=b.extra}b.was=b.length,b.mode=23;case 23:for(;Te=(S=b.distcode[z&(1<<b.distbits)-1])>>>16&255,Fe=65535&S,!((xe=S>>>24)<=$);){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}if(!(240&Te)){for(Me=xe,Pe=Te,nt=Fe;Te=(S=b.distcode[nt+((z&(1<<Me+Pe)-1)>>Me)])>>>16&255,Fe=65535&S,!(Me+(xe=S>>>24)<=$);){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}z>>>=Me,$-=Me,b.back+=Me}if(z>>>=xe,$-=xe,b.back+=xe,64&Te){N.msg="invalid distance code",b.mode=30;break}b.offset=Fe,b.extra=15&Te,b.mode=24;case 24:if(b.extra){for(D=b.extra;$<D;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}b.offset+=z&(1<<b.extra)-1,z>>>=b.extra,$-=b.extra,b.back+=b.extra}if(b.offset>b.dmax){N.msg="invalid distance too far back",b.mode=30;break}b.mode=25;case 25:if(Q===0)break e;if(se=ne-Q,b.offset>se){if((se=b.offset-se)>b.whave&&b.sane){N.msg="invalid distance too far back",b.mode=30;break}Oe=se>b.wnext?(se-=b.wnext,b.wsize-se):b.wnext-se,se>b.length&&(se=b.length),pe=b.window}else pe=te,Oe=K-b.offset,se=b.length;for(Q<se&&(se=Q),Q-=se,b.length-=se;te[K++]=pe[Oe++],--se;);b.length===0&&(b.mode=21);break;case 26:if(Q===0)break e;te[K++]=b.length,Q--,b.mode=21;break;case 27:if(b.wrap){for(;$<32;){if(I===0)break e;I--,z|=V[B++]<<$,$+=8}if(ne-=Q,N.total_out+=ne,b.total+=ne,ne&&(N.adler=b.check=b.flags?l(b.check,te,ne,K-ne):i(b.check,te,ne,K-ne)),ne=Q,(b.flags?z:p(z))!==b.check){N.msg="incorrect data check",b.mode=30;break}$=z=0}b.mode=28;case 28:if(b.wrap&&b.flags){for(;$<32;){if(I===0)break e;I--,z+=V[B++]<<$,$+=8}if(z!==(4294967295&b.total)){N.msg="incorrect length check",b.mode=30;break}$=z=0}b.mode=29;case 29:J=1;break e;case 30:J=-3;break e;case 31:return-4;case 32:default:return v}return N.next_out=K,N.avail_out=Q,N.next_in=B,N.avail_in=I,b.hold=z,b.bits=$,(b.wsize||ne!==N.avail_out&&b.mode<30&&(b.mode<27||F!==4))&&q(N,N.output,N.next_out,ne-N.avail_out)?(b.mode=31,-4):(he-=N.avail_in,ne-=N.avail_out,N.total_in+=he,N.total_out+=ne,b.total+=ne,b.wrap&&ne&&(N.adler=b.check=b.flags?l(b.check,te,ne,N.next_out-ne):i(b.check,te,ne,N.next_out-ne)),N.data_type=b.bits+(b.last?64:0)+(b.mode===12?128:0)+(b.mode===20||b.mode===15?256:0),(he==0&&ne===0||F===4)&&J===m&&(J=-5),J)},s.inflateEnd=function(N){if(!N||!N.state)return v;var F=N.state;return F.window&&(F.window=null),N.state=null,m},s.inflateGetHeader=function(N,F){var b;return N&&N.state&&2&(b=N.state).wrap?((b.head=F).done=!1,m):v},s.inflateSetDictionary=function(N,F){var b,V=F.length;return N&&N.state?(b=N.state).wrap!==0&&b.mode!==11?v:b.mode===11&&i(1,F,V,0)!==b.check?-3:q(N,F,V,V)?(b.mode=31,-4):(b.havedict=1,m):v},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,n,s){var o=r("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];n.exports=function(d,f,m,v,x,y,_,p){var h,w,C,j,E,R,P,A,L,q=p.bits,N=0,F=0,b=0,V=0,te=0,B=0,K=0,I=0,Q=0,z=0,$=null,he=0,ne=new o.Buf16(16),se=new o.Buf16(16),Oe=null,pe=0;for(N=0;N<=15;N++)ne[N]=0;for(F=0;F<v;F++)ne[f[m+F]]++;for(te=q,V=15;1<=V&&ne[V]===0;V--);if(V<te&&(te=V),V===0)return x[y++]=20971520,x[y++]=20971520,p.bits=1,0;for(b=1;b<V&&ne[b]===0;b++);for(te<b&&(te=b),N=I=1;N<=15;N++)if(I<<=1,(I-=ne[N])<0)return-1;if(0<I&&(d===0||V!==1))return-1;for(se[1]=0,N=1;N<15;N++)se[N+1]=se[N]+ne[N];for(F=0;F<v;F++)f[m+F]!==0&&(_[se[f[m+F]]++]=F);if(R=d===0?($=Oe=_,19):d===1?($=i,he-=257,Oe=l,pe-=257,256):($=c,Oe=u,-1),N=b,E=y,K=F=z=0,C=-1,j=(Q=1<<(B=te))-1,d===1&&852<Q||d===2&&592<Q)return 1;for(;;){for(P=N-K,L=_[F]<R?(A=0,_[F]):_[F]>R?(A=Oe[pe+_[F]],$[he+_[F]]):(A=96,0),h=1<<N-K,b=w=1<<B;x[E+(z>>K)+(w-=h)]=P<<24|A<<16|L|0,w!==0;);for(h=1<<N-1;z&h;)h>>=1;if(h!==0?(z&=h-1,z+=h):z=0,F++,--ne[N]==0){if(N===V)break;N=f[m+_[F]]}if(te<N&&(z&j)!==C){for(K===0&&(K=te),E+=b,I=1<<(B=N-K);B+K<V&&!((I-=ne[B+K])<=0);)B++,I<<=1;if(Q+=1<<B,d===1&&852<Q||d===2&&592<Q)return 1;x[C=z&j]=te<<24|B<<16|E-y|0}}return z!==0&&(x[E+z]=N-K<<24|64<<16|0),p.bits=te,0}},{"../utils/common":41}],51:[function(r,n,s){n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(r,n,s){var o=r("../utils/common"),i=0,l=1;function c(S){for(var T=S.length;0<=--T;)S[T]=0}var u=0,d=29,f=256,m=f+1+d,v=30,x=19,y=2*m+1,_=15,p=16,h=7,w=256,C=16,j=17,E=18,R=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],P=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],q=new Array(2*(m+2));c(q);var N=new Array(2*v);c(N);var F=new Array(512);c(F);var b=new Array(256);c(b);var V=new Array(d);c(V);var te,B,K,I=new Array(v);function Q(S,T,O,Y,M){this.static_tree=S,this.extra_bits=T,this.extra_base=O,this.elems=Y,this.max_length=M,this.has_stree=S&&S.length}function z(S,T){this.dyn_tree=S,this.max_code=0,this.stat_desc=T}function $(S){return S<256?F[S]:F[256+(S>>>7)]}function he(S,T){S.pending_buf[S.pending++]=255&T,S.pending_buf[S.pending++]=T>>>8&255}function ne(S,T,O){S.bi_valid>p-O?(S.bi_buf|=T<<S.bi_valid&65535,he(S,S.bi_buf),S.bi_buf=T>>p-S.bi_valid,S.bi_valid+=O-p):(S.bi_buf|=T<<S.bi_valid&65535,S.bi_valid+=O)}function se(S,T,O){ne(S,O[2*T],O[2*T+1])}function Oe(S,T){for(var O=0;O|=1&S,S>>>=1,O<<=1,0<--T;);return O>>>1}function pe(S,T,O){var Y,M,H=new Array(_+1),X=0;for(Y=1;Y<=_;Y++)H[Y]=X=X+O[Y-1]<<1;for(M=0;M<=T;M++){var ee=S[2*M+1];ee!==0&&(S[2*M]=Oe(H[ee]++,ee))}}function xe(S){var T;for(T=0;T<m;T++)S.dyn_ltree[2*T]=0;for(T=0;T<v;T++)S.dyn_dtree[2*T]=0;for(T=0;T<x;T++)S.bl_tree[2*T]=0;S.dyn_ltree[2*w]=1,S.opt_len=S.static_len=0,S.last_lit=S.matches=0}function Te(S){8<S.bi_valid?he(S,S.bi_buf):0<S.bi_valid&&(S.pending_buf[S.pending++]=S.bi_buf),S.bi_buf=0,S.bi_valid=0}function Fe(S,T,O,Y){var M=2*T,H=2*O;return S[M]<S[H]||S[M]===S[H]&&Y[T]<=Y[O]}function Me(S,T,O){for(var Y=S.heap[O],M=O<<1;M<=S.heap_len&&(M<S.heap_len&&Fe(T,S.heap[M+1],S.heap[M],S.depth)&&M++,!Fe(T,Y,S.heap[M],S.depth));)S.heap[O]=S.heap[M],O=M,M<<=1;S.heap[O]=Y}function Pe(S,T,O){var Y,M,H,X,ee=0;if(S.last_lit!==0)for(;Y=S.pending_buf[S.d_buf+2*ee]<<8|S.pending_buf[S.d_buf+2*ee+1],M=S.pending_buf[S.l_buf+ee],ee++,Y===0?se(S,M,T):(se(S,(H=b[M])+f+1,T),(X=R[H])!==0&&ne(S,M-=V[H],X),se(S,H=$(--Y),O),(X=P[H])!==0&&ne(S,Y-=I[H],X)),ee<S.last_lit;);se(S,w,T)}function nt(S,T){var O,Y,M,H=T.dyn_tree,X=T.stat_desc.static_tree,ee=T.stat_desc.has_stree,me=T.stat_desc.elems,Ye=-1;for(S.heap_len=0,S.heap_max=y,O=0;O<me;O++)H[2*O]!==0?(S.heap[++S.heap_len]=Ye=O,S.depth[O]=0):H[2*O+1]=0;for(;S.heap_len<2;)H[2*(M=S.heap[++S.heap_len]=Ye<2?++Ye:0)]=1,S.depth[M]=0,S.opt_len--,ee&&(S.static_len-=X[2*M+1]);for(T.max_code=Ye,O=S.heap_len>>1;1<=O;O--)Me(S,H,O);for(M=me;O=S.heap[1],S.heap[1]=S.heap[S.heap_len--],Me(S,H,1),Y=S.heap[1],S.heap[--S.heap_max]=O,S.heap[--S.heap_max]=Y,H[2*M]=H[2*O]+H[2*Y],S.depth[M]=(S.depth[O]>=S.depth[Y]?S.depth[O]:S.depth[Y])+1,H[2*O+1]=H[2*Y+1]=M,S.heap[1]=M++,Me(S,H,1),2<=S.heap_len;);S.heap[--S.heap_max]=S.heap[1],function(Ue,jt){var qr,Ht,Qn,at,Jn,es,Xr=jt.dyn_tree,Vc=jt.max_code,Bc=jt.stat_desc.static_tree,gi=jt.stat_desc.has_stree,Wc=jt.stat_desc.extra_bits,vi=jt.stat_desc.extra_base,An=jt.stat_desc.max_length,Us=0;for(at=0;at<=_;at++)Ue.bl_count[at]=0;for(Xr[2*Ue.heap[Ue.heap_max]+1]=0,qr=Ue.heap_max+1;qr<y;qr++)An<(at=Xr[2*Xr[2*(Ht=Ue.heap[qr])+1]+1]+1)&&(at=An,Us++),Xr[2*Ht+1]=at,Vc<Ht||(Ue.bl_count[at]++,Jn=0,vi<=Ht&&(Jn=Wc[Ht-vi]),es=Xr[2*Ht],Ue.opt_len+=es*(at+Jn),gi&&(Ue.static_len+=es*(Bc[2*Ht+1]+Jn)));if(Us!==0){do{for(at=An-1;Ue.bl_count[at]===0;)at--;Ue.bl_count[at]--,Ue.bl_count[at+1]+=2,Ue.bl_count[An]--,Us-=2}while(0<Us);for(at=An;at!==0;at--)for(Ht=Ue.bl_count[at];Ht!==0;)Vc<(Qn=Ue.heap[--qr])||(Xr[2*Qn+1]!==at&&(Ue.opt_len+=(at-Xr[2*Qn+1])*Xr[2*Qn],Xr[2*Qn+1]=at),Ht--)}}(S,T),pe(H,Ye,S.bl_count)}function k(S,T,O){var Y,M,H=-1,X=T[1],ee=0,me=7,Ye=4;for(X===0&&(me=138,Ye=3),T[2*(O+1)+1]=65535,Y=0;Y<=O;Y++)M=X,X=T[2*(Y+1)+1],++ee<me&&M===X||(ee<Ye?S.bl_tree[2*M]+=ee:M!==0?(M!==H&&S.bl_tree[2*M]++,S.bl_tree[2*C]++):ee<=10?S.bl_tree[2*j]++:S.bl_tree[2*E]++,H=M,Ye=(ee=0)===X?(me=138,3):M===X?(me=6,3):(me=7,4))}function J(S,T,O){var Y,M,H=-1,X=T[1],ee=0,me=7,Ye=4;for(X===0&&(me=138,Ye=3),Y=0;Y<=O;Y++)if(M=X,X=T[2*(Y+1)+1],!(++ee<me&&M===X)){if(ee<Ye)for(;se(S,M,S.bl_tree),--ee!=0;);else M!==0?(M!==H&&(se(S,M,S.bl_tree),ee--),se(S,C,S.bl_tree),ne(S,ee-3,2)):ee<=10?(se(S,j,S.bl_tree),ne(S,ee-3,3)):(se(S,E,S.bl_tree),ne(S,ee-11,7));H=M,Ye=(ee=0)===X?(me=138,3):M===X?(me=6,3):(me=7,4)}}c(I);var G=!1;function D(S,T,O,Y){ne(S,(u<<1)+(Y?1:0),3),function(M,H,X,ee){Te(M),he(M,X),he(M,~X),o.arraySet(M.pending_buf,M.window,H,X,M.pending),M.pending+=X}(S,T,O)}s._tr_init=function(S){G||(function(){var T,O,Y,M,H,X=new Array(_+1);for(M=Y=0;M<d-1;M++)for(V[M]=Y,T=0;T<1<<R[M];T++)b[Y++]=M;for(b[Y-1]=M,M=H=0;M<16;M++)for(I[M]=H,T=0;T<1<<P[M];T++)F[H++]=M;for(H>>=7;M<v;M++)for(I[M]=H<<7,T=0;T<1<<P[M]-7;T++)F[256+H++]=M;for(O=0;O<=_;O++)X[O]=0;for(T=0;T<=143;)q[2*T+1]=8,T++,X[8]++;for(;T<=255;)q[2*T+1]=9,T++,X[9]++;for(;T<=279;)q[2*T+1]=7,T++,X[7]++;for(;T<=287;)q[2*T+1]=8,T++,X[8]++;for(pe(q,m+1,X),T=0;T<v;T++)N[2*T+1]=5,N[2*T]=Oe(T,5);te=new Q(q,R,f+1,m,_),B=new Q(N,P,0,v,_),K=new Q(new Array(0),A,0,x,h)}(),G=!0),S.l_desc=new z(S.dyn_ltree,te),S.d_desc=new z(S.dyn_dtree,B),S.bl_desc=new z(S.bl_tree,K),S.bi_buf=0,S.bi_valid=0,xe(S)},s._tr_stored_block=D,s._tr_flush_block=function(S,T,O,Y){var M,H,X=0;0<S.level?(S.strm.data_type===2&&(S.strm.data_type=function(ee){var me,Ye=4093624447;for(me=0;me<=31;me++,Ye>>>=1)if(1&Ye&&ee.dyn_ltree[2*me]!==0)return i;if(ee.dyn_ltree[18]!==0||ee.dyn_ltree[20]!==0||ee.dyn_ltree[26]!==0)return l;for(me=32;me<f;me++)if(ee.dyn_ltree[2*me]!==0)return l;return i}(S)),nt(S,S.l_desc),nt(S,S.d_desc),X=function(ee){var me;for(k(ee,ee.dyn_ltree,ee.l_desc.max_code),k(ee,ee.dyn_dtree,ee.d_desc.max_code),nt(ee,ee.bl_desc),me=x-1;3<=me&&ee.bl_tree[2*L[me]+1]===0;me--);return ee.opt_len+=3*(me+1)+5+5+4,me}(S),M=S.opt_len+3+7>>>3,(H=S.static_len+3+7>>>3)<=M&&(M=H)):M=H=O+5,O+4<=M&&T!==-1?D(S,T,O,Y):S.strategy===4||H===M?(ne(S,2+(Y?1:0),3),Pe(S,q,N)):(ne(S,4+(Y?1:0),3),function(ee,me,Ye,Ue){var jt;for(ne(ee,me-257,5),ne(ee,Ye-1,5),ne(ee,Ue-4,4),jt=0;jt<Ue;jt++)ne(ee,ee.bl_tree[2*L[jt]+1],3);J(ee,ee.dyn_ltree,me-1),J(ee,ee.dyn_dtree,Ye-1)}(S,S.l_desc.max_code+1,S.d_desc.max_code+1,X+1),Pe(S,S.dyn_ltree,S.dyn_dtree)),xe(S),Y&&Te(S)},s._tr_tally=function(S,T,O){return S.pending_buf[S.d_buf+2*S.last_lit]=T>>>8&255,S.pending_buf[S.d_buf+2*S.last_lit+1]=255&T,S.pending_buf[S.l_buf+S.last_lit]=255&O,S.last_lit++,T===0?S.dyn_ltree[2*O]++:(S.matches++,T--,S.dyn_ltree[2*(b[O]+f+1)]++,S.dyn_dtree[2*$(T)]++),S.last_lit===S.lit_bufsize-1},s._tr_align=function(S){ne(S,2,3),se(S,w,q),function(T){T.bi_valid===16?(he(T,T.bi_buf),T.bi_buf=0,T.bi_valid=0):8<=T.bi_valid&&(T.pending_buf[T.pending++]=255&T.bi_buf,T.bi_buf>>=8,T.bi_valid-=8)}(S)}},{"../utils/common":41}],53:[function(r,n,s){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,n,s){(function(o){(function(i,l){if(!i.setImmediate){var c,u,d,f,m=1,v={},x=!1,y=i.document,_=Object.getPrototypeOf&&Object.getPrototypeOf(i);_=_&&_.setTimeout?_:i,c={}.toString.call(i.process)==="[object process]"?function(C){process.nextTick(function(){h(C)})}:function(){if(i.postMessage&&!i.importScripts){var C=!0,j=i.onmessage;return i.onmessage=function(){C=!1},i.postMessage("","*"),i.onmessage=j,C}}()?(f="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",w,!1):i.attachEvent("onmessage",w),function(C){i.postMessage(f+C,"*")}):i.MessageChannel?((d=new MessageChannel).port1.onmessage=function(C){h(C.data)},function(C){d.port2.postMessage(C)}):y&&"onreadystatechange"in y.createElement("script")?(u=y.documentElement,function(C){var j=y.createElement("script");j.onreadystatechange=function(){h(C),j.onreadystatechange=null,u.removeChild(j),j=null},u.appendChild(j)}):function(C){setTimeout(h,0,C)},_.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var j=new Array(arguments.length-1),E=0;E<j.length;E++)j[E]=arguments[E+1];var R={callback:C,args:j};return v[m]=R,c(m),m++},_.clearImmediate=p}function p(C){delete v[C]}function h(C){if(x)setTimeout(h,0,C);else{var j=v[C];if(j){x=!0;try{(function(E){var R=E.callback,P=E.args;switch(P.length){case 0:R();break;case 1:R(P[0]);break;case 2:R(P[0],P[1]);break;case 3:R(P[0],P[1],P[2]);break;default:R.apply(l,P)}})(j)}finally{p(C),x=!1}}}}function w(C){C.source===i&&typeof C.data=="string"&&C.data.indexOf(f)===0&&h(+C.data.slice(f.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof Zc<"u"?Zc:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(jj);var uz=jj.exports;const dz=Fm(uz);function fz(e){return new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{n.result?t(n.result.toString()):r("No content found")},n.onerror=()=>r(n.error),n.readAsText(e)})}const hz=async(e,t)=>{const r=new dz;t.forEach(o=>{r.file(o.name,o.content)});const n=await r.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(n),s.download=e,s.click()},ya=e=>{const t=new Date(e);return new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"Asia/Shanghai"}).format(t)},pz=e=>ya(e).split(" ")[0];function Ej(e){const t=new Date;t.setUTCDate(t.getUTCDate()+e);const r=t.getUTCFullYear(),n=String(t.getUTCMonth()+1).padStart(2,"0"),s=String(t.getUTCDate()).padStart(2,"0"),o=String(t.getUTCHours()).padStart(2,"0"),i=String(t.getUTCMinutes()).padStart(2,"0"),l=String(t.getUTCSeconds()).padStart(2,"0");return`${r}-${n}-${s} ${o}:${i}:${l}`}const mz=async e=>{let t=1;e.page&&(t=e.page);let r=2;e.perPage&&(r=e.perPage);const n=st();let s="";return e.state==="enabled"?s="enabled=true":e.state==="disabled"?s="enabled=false":e.state==="expired"&&(s=n.filter("expiredAt<{:expiredAt}",{expiredAt:Ej(15)})),n.collection("domains").getList(t,r,{sort:"-created",expand:"lastDeployment",filter:s})},gz=async()=>{const e=st(),t=await e.collection("domains").getList(1,1,{}),r=await e.collection("domains").getList(1,1,{filter:e.filter("expiredAt<{:expiredAt}",{expiredAt:Ej(15)})}),n=await e.collection("domains").getList(1,1,{filter:"enabled=true"}),s=await e.collection("domains").getList(1,1,{filter:"enabled=false"});return{total:t.totalItems,expired:r.totalItems,enabled:n.totalItems,disabled:s.totalItems}},vz=async e=>await st().collection("domains").getOne(e),km=async e=>e.id?await st().collection("domains").update(e.id,e):await st().collection("domains").create(e),yz=async e=>await st().collection("domains").delete(e),xz=(e,t)=>st().collection("domains").subscribe(e,r=>{r.action==="update"&&t(r.record)},{expand:"lastDeployment"}),wz=e=>{st().collection("domains").unsubscribe(e)},_z=()=>{const e=Pn(),t=Pr(),r=Nn(),n=new URLSearchParams(r.search),s=n.get("page"),o=n.get("state"),[i,l]=g.useState(0),c=()=>{t("/edit")},u=w=>{n.set("page",w.toString()),t(`?${n.toString()}`)},d=w=>{t(`/edit?id=${w}`)},f=w=>{t(`/history?domain=${w}`)},m=async w=>{try{await yz(w),x(v.filter(C=>C.id!==w))}catch(C){console.error("Error deleting domain:",C)}},[v,x]=g.useState([]);g.useEffect(()=>{(async()=>{const C=await mz({page:s?Number(s):1,perPage:10,state:o||""});x(C.items),l(C.totalPages)})()},[s,o]);const y=async w=>{const C=v.filter(P=>P.id===w),j=C[0].enabled,E=C[0];E.enabled=!j,await km(E);const R=v.map(P=>P.id===w?{...P,checked:!j}:P);x(R)},_=async w=>{try{wz(w.id),xz(w.id,C=>{console.log(C);const j=v.map(E=>E.id===C.id?{...C}:E);x(j)}),w.rightnow=!0,await km(w),e.toast({title:"操作成功",description:"已发起部署,请稍后查看部署日志。"})}catch{e.toast({title:"执行失败",description:a.jsxs(a.Fragment,{children:["执行失败,请查看",a.jsx(gr,{to:`/history?domain=${w.id}`,className:"underline text-blue-500",children:"部署日志"}),"查看详情。"]}),variant:"destructive"})}},p=async w=>{await _({...w,deployed:!1})},h=async w=>{const C=`${w.id}-${w.domain}.zip`,j=[{name:`${w.domain}.pem`,content:w.certificate?w.certificate:""},{name:`${w.domain}.key`,content:w.privateKey?w.privateKey:""}];await hz(C,j)};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"",children:[a.jsx(hy,{}),a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("div",{className:"text-muted-foreground",children:"域名列表"}),a.jsx(He,{onClick:c,children:"新增域名"})]}),v.length?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[a.jsx("div",{className:"w-36",children:"域名"}),a.jsx("div",{className:"w-40",children:"有效期限"}),a.jsx("div",{className:"w-32",children:"最近执行状态"}),a.jsx("div",{className:"w-64",children:"最近执行阶段"}),a.jsx("div",{className:"w-40 sm:ml-2",children:"最近执行时间"}),a.jsx("div",{className:"w-24",children:"是否启用"}),a.jsx("div",{className:"grow",children:"操作"})]}),a.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"域名"}),v.map(w=>{var C,j,E,R;return a.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[a.jsx("div",{className:"sm:w-36 w-full pt-1 sm:pt-0 flex items-center",children:w.domain}),a.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:a.jsx("div",{children:w.expiredAt?a.jsxs(a.Fragment,{children:[a.jsx("div",{children:"有效期90天"}),a.jsxs("div",{children:[pz(w.expiredAt),"到期"]})]}):"---"})}),a.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:w.lastDeployedAt&&((C=w.expand)!=null&&C.lastDeployment)?a.jsx(a.Fragment,{children:a.jsx(ey,{deployment:w.expand.lastDeployment})}):"---"}),a.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:w.lastDeployedAt&&((j=w.expand)!=null&&j.lastDeployment)?a.jsx(qv,{phase:(E=w.expand.lastDeployment)==null?void 0:E.phase,phaseSuccess:(R=w.expand.lastDeployment)==null?void 0:R.phaseSuccess}):"---"}),a.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:w.lastDeployedAt?ya(w.lastDeployedAt):"---"}),a.jsx("div",{className:"sm:w-24 flex items-center",children:a.jsx(Qv,{children:a.jsxs(_C,{children:[a.jsx(bC,{children:a.jsx(Fc,{checked:w.enabled,onCheckedChange:()=>{y(w.id)}})}),a.jsx(Jv,{children:a.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:w.enabled?"禁用":"启用"})})]})})}),a.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[a.jsx(He,{variant:"link",className:"p-0",onClick:()=>f(w.id),children:"部署历史"}),a.jsxs(ia,{when:!!w.enabled,children:[a.jsx(Bt,{orientation:"vertical",className:"h-4 mx-2"}),a.jsx(He,{variant:"link",className:"p-0",onClick:()=>_(w),children:"立即部署"})]}),a.jsxs(ia,{when:!!(w.enabled&&w.deployed),children:[a.jsx(Bt,{orientation:"vertical",className:"h-4 mx-2"}),a.jsx(He,{variant:"link",className:"p-0",onClick:()=>p(w),children:"强行部署"})]}),a.jsxs(ia,{when:!!w.expiredAt,children:[a.jsx(Bt,{orientation:"vertical",className:"h-4 mx-2"}),a.jsx(He,{variant:"link",className:"p-0",onClick:()=>h(w),children:"下载"})]}),!w.enabled&&a.jsxs(a.Fragment,{children:[a.jsx(Bt,{orientation:"vertical",className:"h-4 mx-2"}),a.jsxs(GC,{children:[a.jsx(ZC,{asChild:!0,children:a.jsx(He,{variant:"link",className:"p-0",children:"删除"})}),a.jsxs(ty,{children:[a.jsxs(ry,{children:[a.jsx(sy,{children:"删除域名"}),a.jsx(oy,{children:"确定要删除域名吗?"})]}),a.jsxs(ny,{children:[a.jsx(ay,{children:"取消"}),a.jsx(iy,{onClick:()=>{m(w.id)},children:"确认"})]})]})]}),a.jsx(Bt,{orientation:"vertical",className:"h-4 mx-2"}),a.jsx(He,{variant:"link",className:"p-0",onClick:()=>d(w.id),children:"编辑"})]})]})]},w.id)}),a.jsx(NC,{totalPages:i,currentPage:s?Number(s):1,onPageChange:w=>{u(w)}})]}):a.jsx(a.Fragment,{children:a.jsxs("div",{className:"flex flex-col items-center mt-10",children:[a.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:a.jsx(rm,{size:40,className:"text-primary"})}),a.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),a.jsx(He,{onClick:c,className:"mt-3",children:"添加域名"})]})})]})})},Ne=g.forwardRef(({className:e,type:t,...r},n)=>a.jsx("input",{type:t,className:oe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...r}));Ne.displayName="Input";var zc=e=>e.type==="checkbox",Wi=e=>e instanceof Date,yr=e=>e==null;const Nj=e=>typeof e=="object";var qt=e=>!yr(e)&&!Array.isArray(e)&&Nj(e)&&!Wi(e),Tj=e=>qt(e)&&e.target?zc(e.target)?e.target.checked:e.target.value:e,bz=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Rj=(e,t)=>e.has(bz(t)),Sz=e=>{const t=e.constructor&&e.constructor.prototype;return qt(t)&&t.hasOwnProperty("isPrototypeOf")},py=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Cr(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(py&&(e instanceof Blob||e instanceof FileList))&&(r||qt(e)))if(t=r?[]:{},!r&&!Sz(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=Cr(e[n]));else return e;return t}var Gf=e=>Array.isArray(e)?e.filter(Boolean):[],Ft=e=>e===void 0,de=(e,t,r)=>{if(!t||!qt(e))return r;const n=Gf(t.split(/[,[\].]+?/)).reduce((s,o)=>yr(s)?s:s[o],e);return Ft(n)||n===e?Ft(e[t])?r:e[t]:n},zn=e=>typeof e=="boolean",my=e=>/^\w*$/.test(e),Pj=e=>Gf(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ft=(e,t,r)=>{let n=-1;const s=my(t)?[t]:Pj(t),o=s.length,i=o-1;for(;++n<o;){const l=s[n];let c=r;if(n!==i){const u=e[l];c=qt(u)||Array.isArray(u)?u:isNaN(+s[n+1])?{}:[]}if(l==="__proto__")return;e[l]=c,e=e[l]}return e};const Md={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},gn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ss={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Aj=Be.createContext(null),Zf=()=>Be.useContext(Aj),kz=e=>{const{children:t,...r}=e;return Be.createElement(Aj.Provider,{value:r},t)};var Dj=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==gn.all&&(t._proxyFormState[i]=!n||gn.all),r&&(r[i]=!0),e[i]}});return s},Mr=e=>qt(e)&&!Object.keys(e).length,Oj=(e,t,r,n)=>{r(e);const{name:s,...o}=e;return Mr(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!n||gn.all))},El=e=>Array.isArray(e)?e:[e],Mj=(e,t,r)=>!e||!t||e===t||El(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function gy(e){const t=Be.useRef(e);t.current=e,Be.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function Cz(e){const t=Zf(),{control:r=t.control,disabled:n,name:s,exact:o}=e||{},[i,l]=Be.useState(r._formState),c=Be.useRef(!0),u=Be.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=Be.useRef(s);return d.current=s,gy({disabled:n,next:f=>c.current&&Mj(d.current,f.name,o)&&Oj(f,u.current,r._updateFormState)&&l({...r._formState,...f}),subject:r._subjects.state}),Be.useEffect(()=>(c.current=!0,u.current.isValid&&r._updateValid(!0),()=>{c.current=!1}),[r]),Dj(i,r,u.current,!1)}var $n=e=>typeof e=="string",Ij=(e,t,r,n,s)=>$n(e)?(n&&t.watch.add(e),de(r,e,s)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),de(r,o))):(n&&(t.watchAll=!0),r);function jz(e){const t=Zf(),{control:r=t.control,name:n,defaultValue:s,disabled:o,exact:i}=e||{},l=Be.useRef(n);l.current=n,gy({disabled:o,subject:r._subjects.values,next:d=>{Mj(l.current,d.name,i)&&u(Cr(Ij(l.current,r._names,d.values||r._formValues,!1,s)))}});const[c,u]=Be.useState(r._getWatch(n,s));return Be.useEffect(()=>r._removeUnmounted()),c}function Ez(e){const t=Zf(),{name:r,disabled:n,control:s=t.control,shouldUnregister:o}=e,i=Rj(s._names.array,r),l=jz({control:s,name:r,defaultValue:de(s._formValues,r,de(s._defaultValues,r,e.defaultValue)),exact:!0}),c=Cz({control:s,name:r}),u=Be.useRef(s.register(r,{...e.rules,value:l,...zn(e.disabled)?{disabled:e.disabled}:{}}));return Be.useEffect(()=>{const d=s._options.shouldUnregister||o,f=(m,v)=>{const x=de(s._fields,m);x&&x._f&&(x._f.mount=v)};if(f(r,!0),d){const m=Cr(de(s._options.defaultValues,r));ft(s._defaultValues,r,m),Ft(de(s._formValues,r))&&ft(s._formValues,r,m)}return()=>{(i?d&&!s._state.action:d)?s.unregister(r):f(r,!1)}},[r,s,i,o]),Be.useEffect(()=>{de(s._fields,r)&&s._updateDisabledField({disabled:n,fields:s._fields,name:r,value:de(s._fields,r)._f.value})},[n,r,s]),{field:{name:r,value:l,...zn(n)||c.disabled?{disabled:c.disabled||n}:{},onChange:Be.useCallback(d=>u.current.onChange({target:{value:Tj(d),name:r},type:Md.CHANGE}),[r]),onBlur:Be.useCallback(()=>u.current.onBlur({target:{value:de(s._formValues,r),name:r},type:Md.BLUR}),[r,s]),ref:d=>{const f=de(s._fields,r);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:m=>d.setCustomValidity(m),reportValidity:()=>d.reportValidity()})}},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!de(c.errors,r)},isDirty:{enumerable:!0,get:()=>!!de(c.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!de(c.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!de(c.validatingFields,r)},error:{enumerable:!0,get:()=>de(c.errors,r)}})}}const Nz=e=>e.render(Ez(e));var Lj=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},mw=e=>({isOnSubmit:!e||e===gn.onSubmit,isOnBlur:e===gn.onBlur,isOnChange:e===gn.onChange,isOnAll:e===gn.all,isOnTouch:e===gn.onTouched}),gw=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Nl=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const o=de(e,s);if(o){const{_f:i,...l}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!n)break;if(i.ref&&t(i.ref,i.name)&&!n)break;Nl(l,t)}else qt(l)&&Nl(l,t)}}};var Tz=(e,t,r)=>{const n=El(de(e,r));return ft(n,"root",t[r]),ft(e,r,n),e},vy=e=>e.type==="file",so=e=>typeof e=="function",Id=e=>{if(!py)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Zu=e=>$n(e),yy=e=>e.type==="radio",Ld=e=>e instanceof RegExp;const vw={value:!1,isValid:!1},yw={value:!0,isValid:!0};var Fj=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ft(e[0].attributes.value)?Ft(e[0].value)||e[0].value===""?yw:{value:e[0].value,isValid:!0}:yw:vw}return vw};const xw={isValid:!1,value:null};var zj=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,xw):xw;function ww(e,t,r="validate"){if(Zu(e)||Array.isArray(e)&&e.every(Zu)||zn(e)&&!e)return{type:r,message:Zu(e)?e:"",ref:t}}var Ei=e=>qt(e)&&!Ld(e)?e:{value:e,message:""},_w=async(e,t,r,n,s)=>{const{ref:o,refs:i,required:l,maxLength:c,minLength:u,min:d,max:f,pattern:m,validate:v,name:x,valueAsNumber:y,mount:_,disabled:p}=e._f,h=de(t,x);if(!_||p)return{};const w=i?i[0]:o,C=N=>{n&&w.reportValidity&&(w.setCustomValidity(zn(N)?"":N||""),w.reportValidity())},j={},E=yy(o),R=zc(o),P=E||R,A=(y||vy(o))&&Ft(o.value)&&Ft(h)||Id(o)&&o.value===""||h===""||Array.isArray(h)&&!h.length,L=Lj.bind(null,x,r,j),q=(N,F,b,V=ss.maxLength,te=ss.minLength)=>{const B=N?F:b;j[x]={type:N?V:te,message:B,ref:o,...L(N?V:te,B)}};if(s?!Array.isArray(h)||!h.length:l&&(!P&&(A||yr(h))||zn(h)&&!h||R&&!Fj(i).isValid||E&&!zj(i).isValid)){const{value:N,message:F}=Zu(l)?{value:!!l,message:l}:Ei(l);if(N&&(j[x]={type:ss.required,message:F,ref:w,...L(ss.required,F)},!r))return C(F),j}if(!A&&(!yr(d)||!yr(f))){let N,F;const b=Ei(f),V=Ei(d);if(!yr(h)&&!isNaN(h)){const te=o.valueAsNumber||h&&+h;yr(b.value)||(N=te>b.value),yr(V.value)||(F=te<V.value)}else{const te=o.valueAsDate||new Date(h),B=Q=>new Date(new Date().toDateString()+" "+Q),K=o.type=="time",I=o.type=="week";$n(b.value)&&h&&(N=K?B(h)>B(b.value):I?h>b.value:te>new Date(b.value)),$n(V.value)&&h&&(F=K?B(h)<B(V.value):I?h<V.value:te<new Date(V.value))}if((N||F)&&(q(!!N,b.message,V.message,ss.max,ss.min),!r))return C(j[x].message),j}if((c||u)&&!A&&($n(h)||s&&Array.isArray(h))){const N=Ei(c),F=Ei(u),b=!yr(N.value)&&h.length>+N.value,V=!yr(F.value)&&h.length<+F.value;if((b||V)&&(q(b,N.message,F.message),!r))return C(j[x].message),j}if(m&&!A&&$n(h)){const{value:N,message:F}=Ei(m);if(Ld(N)&&!h.match(N)&&(j[x]={type:ss.pattern,message:F,ref:o,...L(ss.pattern,F)},!r))return C(F),j}if(v){if(so(v)){const N=await v(h,t),F=ww(N,w);if(F&&(j[x]={...F,...L(ss.validate,F.message)},!r))return C(F.message),j}else if(qt(v)){let N={};for(const F in v){if(!Mr(N)&&!r)break;const b=ww(await v[F](h,t),w,F);b&&(N={...b,...L(F,b.message)},C(b.message),r&&(j[x]=N))}if(!Mr(N)&&(j[x]={ref:w,...N},!r))return j}}return C(!0),j};function Rz(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Ft(e)?n++:e[t[n++]];return e}function Pz(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ft(e[t]))return!1;return!0}function Yt(e,t){const r=Array.isArray(t)?t:my(t)?[t]:Pj(t),n=r.length===1?e:Rz(e,r),s=r.length-1,o=r[s];return n&&delete n[o],s!==0&&(qt(n)&&Mr(n)||Array.isArray(n)&&Pz(n))&&Yt(e,r.slice(0,-1)),e}var rp=()=>{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}},Fd=e=>yr(e)||!Nj(e);function Ho(e,t){if(Fd(e)||Fd(t))return e===t;if(Wi(e)&&Wi(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const s of r){const o=e[s];if(!n.includes(s))return!1;if(s!=="ref"){const i=t[s];if(Wi(o)&&Wi(i)||qt(o)&&qt(i)||Array.isArray(o)&&Array.isArray(i)?!Ho(o,i):o!==i)return!1}}return!0}var Uj=e=>e.type==="select-multiple",Az=e=>yy(e)||zc(e),np=e=>Id(e)&&e.isConnected,$j=e=>{for(const t in e)if(so(e[t]))return!0;return!1};function zd(e,t={}){const r=Array.isArray(e);if(qt(e)||r)for(const n in e)Array.isArray(e[n])||qt(e[n])&&!$j(e[n])?(t[n]=Array.isArray(e[n])?[]:{},zd(e[n],t[n])):yr(e[n])||(t[n]=!0);return t}function Vj(e,t,r){const n=Array.isArray(e);if(qt(e)||n)for(const s in e)Array.isArray(e[s])||qt(e[s])&&!$j(e[s])?Ft(t)||Fd(r[s])?r[s]=Array.isArray(e[s])?zd(e[s],[]):{...zd(e[s])}:Vj(e[s],yr(t)?{}:t[s],r[s]):r[s]=!Ho(e[s],t[s]);return r}var ju=(e,t)=>Vj(e,t,zd(t)),Bj=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Ft(e)?e:t?e===""?NaN:e&&+e:r&&$n(e)?new Date(e):n?n(e):e;function sp(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return vy(t)?t.files:yy(t)?zj(e.refs).value:Uj(t)?[...t.selectedOptions].map(({value:r})=>r):zc(t)?Fj(e.refs).value:Bj(Ft(t.value)?e.ref.value:t.value,e)}var Dz=(e,t,r,n)=>{const s={};for(const o of e){const i=de(t,o);i&&ft(s,o,i._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},rl=e=>Ft(e)?e:Ld(e)?e.source:qt(e)?Ld(e.value)?e.value.source:e.value:e,Oz=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function bw(e,t,r){const n=de(e,r);if(n||my(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const o=s.join("."),i=de(t,o),l=de(e,o);if(i&&!Array.isArray(i)&&r!==o)return{name:r};if(l&&l.type)return{name:o,error:l};s.pop()}return{name:r}}var Mz=(e,t,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(t||e):(r?n.isOnBlur:s.isOnBlur)?!e:(r?n.isOnChange:s.isOnChange)?e:!0,Iz=(e,t)=>!Gf(de(e,t)).length&&Yt(e,t);const Lz={mode:gn.onSubmit,reValidateMode:gn.onChange,shouldFocusError:!0};function Fz(e={}){let t={...Lz,...e},r={submitCount:0,isDirty:!1,isLoading:so(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},s=qt(t.defaultValues)||qt(t.values)?Cr(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:Cr(s),i={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:rp(),array:rp(),state:rp()},m=mw(t.mode),v=mw(t.reValidateMode),x=t.criteriaMode===gn.all,y=S=>T=>{clearTimeout(u),u=setTimeout(S,T)},_=async S=>{if(d.isValid||S){const T=t.resolver?Mr((await P()).errors):await L(n,!0);T!==r.isValid&&f.state.next({isValid:T})}},p=(S,T)=>{(d.isValidating||d.validatingFields)&&((S||Array.from(l.mount)).forEach(O=>{O&&(T?ft(r.validatingFields,O,T):Yt(r.validatingFields,O))}),f.state.next({validatingFields:r.validatingFields,isValidating:!Mr(r.validatingFields)}))},h=(S,T=[],O,Y,M=!0,H=!0)=>{if(Y&&O){if(i.action=!0,H&&Array.isArray(de(n,S))){const X=O(de(n,S),Y.argA,Y.argB);M&&ft(n,S,X)}if(H&&Array.isArray(de(r.errors,S))){const X=O(de(r.errors,S),Y.argA,Y.argB);M&&ft(r.errors,S,X),Iz(r.errors,S)}if(d.touchedFields&&H&&Array.isArray(de(r.touchedFields,S))){const X=O(de(r.touchedFields,S),Y.argA,Y.argB);M&&ft(r.touchedFields,S,X)}d.dirtyFields&&(r.dirtyFields=ju(s,o)),f.state.next({name:S,isDirty:N(S,T),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ft(o,S,T)},w=(S,T)=>{ft(r.errors,S,T),f.state.next({errors:r.errors})},C=S=>{r.errors=S,f.state.next({errors:r.errors,isValid:!1})},j=(S,T,O,Y)=>{const M=de(n,S);if(M){const H=de(o,S,Ft(O)?de(s,S):O);Ft(H)||Y&&Y.defaultChecked||T?ft(o,S,T?H:sp(M._f)):V(S,H),i.mount&&_()}},E=(S,T,O,Y,M)=>{let H=!1,X=!1;const ee={name:S},me=!!(de(n,S)&&de(n,S)._f&&de(n,S)._f.disabled);if(!O||Y){d.isDirty&&(X=r.isDirty,r.isDirty=ee.isDirty=N(),H=X!==ee.isDirty);const Ye=me||Ho(de(s,S),T);X=!!(!me&&de(r.dirtyFields,S)),Ye||me?Yt(r.dirtyFields,S):ft(r.dirtyFields,S,!0),ee.dirtyFields=r.dirtyFields,H=H||d.dirtyFields&&X!==!Ye}if(O){const Ye=de(r.touchedFields,S);Ye||(ft(r.touchedFields,S,O),ee.touchedFields=r.touchedFields,H=H||d.touchedFields&&Ye!==O)}return H&&M&&f.state.next(ee),H?ee:{}},R=(S,T,O,Y)=>{const M=de(r.errors,S),H=d.isValid&&zn(T)&&r.isValid!==T;if(e.delayError&&O?(c=y(()=>w(S,O)),c(e.delayError)):(clearTimeout(u),c=null,O?ft(r.errors,S,O):Yt(r.errors,S)),(O?!Ho(M,O):M)||!Mr(Y)||H){const X={...Y,...H&&zn(T)?{isValid:T}:{},errors:r.errors,name:S};r={...r,...X},f.state.next(X)}},P=async S=>{p(S,!0);const T=await t.resolver(o,t.context,Dz(S||l.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return p(S),T},A=async S=>{const{errors:T}=await P(S);if(S)for(const O of S){const Y=de(T,O);Y?ft(r.errors,O,Y):Yt(r.errors,O)}else r.errors=T;return T},L=async(S,T,O={valid:!0})=>{for(const Y in S){const M=S[Y];if(M){const{_f:H,...X}=M;if(H){const ee=l.array.has(H.name);p([Y],!0);const me=await _w(M,o,x,t.shouldUseNativeValidation&&!T,ee);if(p([Y]),me[H.name]&&(O.valid=!1,T))break;!T&&(de(me,H.name)?ee?Tz(r.errors,me,H.name):ft(r.errors,H.name,me[H.name]):Yt(r.errors,H.name))}X&&await L(X,T,O)}}return O.valid},q=()=>{for(const S of l.unMount){const T=de(n,S);T&&(T._f.refs?T._f.refs.every(O=>!np(O)):!np(T._f.ref))&&Oe(S)}l.unMount=new Set},N=(S,T)=>(S&&T&&ft(o,S,T),!Ho(z(),s)),F=(S,T,O)=>Ij(S,l,{...i.mount?o:Ft(T)?s:$n(S)?{[S]:T}:T},O,T),b=S=>Gf(de(i.mount?o:s,S,e.shouldUnregister?de(s,S,[]):[])),V=(S,T,O={})=>{const Y=de(n,S);let M=T;if(Y){const H=Y._f;H&&(!H.disabled&&ft(o,S,Bj(T,H)),M=Id(H.ref)&&yr(T)?"":T,Uj(H.ref)?[...H.ref.options].forEach(X=>X.selected=M.includes(X.value)):H.refs?zc(H.ref)?H.refs.length>1?H.refs.forEach(X=>(!X.defaultChecked||!X.disabled)&&(X.checked=Array.isArray(M)?!!M.find(ee=>ee===X.value):M===X.value)):H.refs[0]&&(H.refs[0].checked=!!M):H.refs.forEach(X=>X.checked=X.value===M):vy(H.ref)?H.ref.value="":(H.ref.value=M,H.ref.type||f.values.next({name:S,values:{...o}})))}(O.shouldDirty||O.shouldTouch)&&E(S,M,O.shouldTouch,O.shouldDirty,!0),O.shouldValidate&&Q(S)},te=(S,T,O)=>{for(const Y in T){const M=T[Y],H=`${S}.${Y}`,X=de(n,H);(l.array.has(S)||!Fd(M)||X&&!X._f)&&!Wi(M)?te(H,M,O):V(H,M,O)}},B=(S,T,O={})=>{const Y=de(n,S),M=l.array.has(S),H=Cr(T);ft(o,S,H),M?(f.array.next({name:S,values:{...o}}),(d.isDirty||d.dirtyFields)&&O.shouldDirty&&f.state.next({name:S,dirtyFields:ju(s,o),isDirty:N(S,H)})):Y&&!Y._f&&!yr(H)?te(S,H,O):V(S,H,O),gw(S,l)&&f.state.next({...r}),f.values.next({name:i.mount?S:void 0,values:{...o}})},K=async S=>{i.mount=!0;const T=S.target;let O=T.name,Y=!0;const M=de(n,O),H=()=>T.type?sp(M._f):Tj(S),X=ee=>{Y=Number.isNaN(ee)||ee===de(o,O,ee)};if(M){let ee,me;const Ye=H(),Ue=S.type===Md.BLUR||S.type===Md.FOCUS_OUT,jt=!Oz(M._f)&&!t.resolver&&!de(r.errors,O)&&!M._f.deps||Mz(Ue,de(r.touchedFields,O),r.isSubmitted,v,m),qr=gw(O,l,Ue);ft(o,O,Ye),Ue?(M._f.onBlur&&M._f.onBlur(S),c&&c(0)):M._f.onChange&&M._f.onChange(S);const Ht=E(O,Ye,Ue,!1),Qn=!Mr(Ht)||qr;if(!Ue&&f.values.next({name:O,type:S.type,values:{...o}}),jt)return d.isValid&&_(),Qn&&f.state.next({name:O,...qr?{}:Ht});if(!Ue&&qr&&f.state.next({...r}),t.resolver){const{errors:at}=await P([O]);if(X(Ye),Y){const Jn=bw(r.errors,n,O),es=bw(at,n,Jn.name||O);ee=es.error,O=es.name,me=Mr(at)}}else p([O],!0),ee=(await _w(M,o,x,t.shouldUseNativeValidation))[O],p([O]),X(Ye),Y&&(ee?me=!1:d.isValid&&(me=await L(n,!0)));Y&&(M._f.deps&&Q(M._f.deps),R(O,me,ee,Ht))}},I=(S,T)=>{if(de(r.errors,T)&&S.focus)return S.focus(),1},Q=async(S,T={})=>{let O,Y;const M=El(S);if(t.resolver){const H=await A(Ft(S)?S:M);O=Mr(H),Y=S?!M.some(X=>de(H,X)):O}else S?(Y=(await Promise.all(M.map(async H=>{const X=de(n,H);return await L(X&&X._f?{[H]:X}:X)}))).every(Boolean),!(!Y&&!r.isValid)&&_()):Y=O=await L(n);return f.state.next({...!$n(S)||d.isValid&&O!==r.isValid?{}:{name:S},...t.resolver||!S?{isValid:O}:{},errors:r.errors}),T.shouldFocus&&!Y&&Nl(n,I,S?M:l.mount),Y},z=S=>{const T={...i.mount?o:s};return Ft(S)?T:$n(S)?de(T,S):S.map(O=>de(T,O))},$=(S,T)=>({invalid:!!de((T||r).errors,S),isDirty:!!de((T||r).dirtyFields,S),error:de((T||r).errors,S),isValidating:!!de(r.validatingFields,S),isTouched:!!de((T||r).touchedFields,S)}),he=S=>{S&&El(S).forEach(T=>Yt(r.errors,T)),f.state.next({errors:S?r.errors:{}})},ne=(S,T,O)=>{const Y=(de(n,S,{_f:{}})._f||{}).ref,M=de(r.errors,S)||{},{ref:H,message:X,type:ee,...me}=M;ft(r.errors,S,{...me,...T,ref:Y}),f.state.next({name:S,errors:r.errors,isValid:!1}),O&&O.shouldFocus&&Y&&Y.focus&&Y.focus()},se=(S,T)=>so(S)?f.values.subscribe({next:O=>S(F(void 0,T),O)}):F(S,T,!0),Oe=(S,T={})=>{for(const O of S?El(S):l.mount)l.mount.delete(O),l.array.delete(O),T.keepValue||(Yt(n,O),Yt(o,O)),!T.keepError&&Yt(r.errors,O),!T.keepDirty&&Yt(r.dirtyFields,O),!T.keepTouched&&Yt(r.touchedFields,O),!T.keepIsValidating&&Yt(r.validatingFields,O),!t.shouldUnregister&&!T.keepDefaultValue&&Yt(s,O);f.values.next({values:{...o}}),f.state.next({...r,...T.keepDirty?{isDirty:N()}:{}}),!T.keepIsValid&&_()},pe=({disabled:S,name:T,field:O,fields:Y,value:M})=>{if(zn(S)&&i.mount||S){const H=S?void 0:Ft(M)?sp(O?O._f:de(Y,T)._f):M;ft(o,T,H),E(T,H,!1,!1,!0)}},xe=(S,T={})=>{let O=de(n,S);const Y=zn(T.disabled);return ft(n,S,{...O||{},_f:{...O&&O._f?O._f:{ref:{name:S}},name:S,mount:!0,...T}}),l.mount.add(S),O?pe({field:O,disabled:T.disabled,name:S,value:T.value}):j(S,!0,T.value),{...Y?{disabled:T.disabled}:{},...t.progressive?{required:!!T.required,min:rl(T.min),max:rl(T.max),minLength:rl(T.minLength),maxLength:rl(T.maxLength),pattern:rl(T.pattern)}:{},name:S,onChange:K,onBlur:K,ref:M=>{if(M){xe(S,T),O=de(n,S);const H=Ft(M.value)&&M.querySelectorAll&&M.querySelectorAll("input,select,textarea")[0]||M,X=Az(H),ee=O._f.refs||[];if(X?ee.find(me=>me===H):H===O._f.ref)return;ft(n,S,{_f:{...O._f,...X?{refs:[...ee.filter(np),H,...Array.isArray(de(s,S))?[{}]:[]],ref:{type:H.type,name:S}}:{ref:H}}}),j(S,!1,void 0,H)}else O=de(n,S,{}),O._f&&(O._f.mount=!1),(t.shouldUnregister||T.shouldUnregister)&&!(Rj(l.array,S)&&i.action)&&l.unMount.add(S)}}},Te=()=>t.shouldFocusError&&Nl(n,I,l.mount),Fe=S=>{zn(S)&&(f.state.next({disabled:S}),Nl(n,(T,O)=>{const Y=de(n,O);Y&&(T.disabled=Y._f.disabled||S,Array.isArray(Y._f.refs)&&Y._f.refs.forEach(M=>{M.disabled=Y._f.disabled||S}))},0,!1))},Me=(S,T)=>async O=>{let Y;O&&(O.preventDefault&&O.preventDefault(),O.persist&&O.persist());let M=Cr(o);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:H,values:X}=await P();r.errors=H,M=X}else await L(n);if(Yt(r.errors,"root"),Mr(r.errors)){f.state.next({errors:{}});try{await S(M,O)}catch(H){Y=H}}else T&&await T({...r.errors},O),Te(),setTimeout(Te);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Mr(r.errors)&&!Y,submitCount:r.submitCount+1,errors:r.errors}),Y)throw Y},Pe=(S,T={})=>{de(n,S)&&(Ft(T.defaultValue)?B(S,Cr(de(s,S))):(B(S,T.defaultValue),ft(s,S,Cr(T.defaultValue))),T.keepTouched||Yt(r.touchedFields,S),T.keepDirty||(Yt(r.dirtyFields,S),r.isDirty=T.defaultValue?N(S,Cr(de(s,S))):N()),T.keepError||(Yt(r.errors,S),d.isValid&&_()),f.state.next({...r}))},nt=(S,T={})=>{const O=S?Cr(S):s,Y=Cr(O),M=Mr(S),H=M?s:Y;if(T.keepDefaultValues||(s=O),!T.keepValues){if(T.keepDirtyValues)for(const X of l.mount)de(r.dirtyFields,X)?ft(H,X,de(o,X)):B(X,de(H,X));else{if(py&&Ft(S))for(const X of l.mount){const ee=de(n,X);if(ee&&ee._f){const me=Array.isArray(ee._f.refs)?ee._f.refs[0]:ee._f.ref;if(Id(me)){const Ye=me.closest("form");if(Ye){Ye.reset();break}}}}n={}}o=e.shouldUnregister?T.keepDefaultValues?Cr(s):{}:Cr(H),f.array.next({values:{...H}}),f.values.next({values:{...H}})}l={mount:T.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!T.keepIsValid||!!T.keepDirtyValues,i.watch=!!e.shouldUnregister,f.state.next({submitCount:T.keepSubmitCount?r.submitCount:0,isDirty:M?!1:T.keepDirty?r.isDirty:!!(T.keepDefaultValues&&!Ho(S,s)),isSubmitted:T.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:M?{}:T.keepDirtyValues?T.keepDefaultValues&&o?ju(s,o):r.dirtyFields:T.keepDefaultValues&&S?ju(s,S):T.keepDirty?r.dirtyFields:{},touchedFields:T.keepTouched?r.touchedFields:{},errors:T.keepErrors?r.errors:{},isSubmitSuccessful:T.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},k=(S,T)=>nt(so(S)?S(o):S,T);return{control:{register:xe,unregister:Oe,getFieldState:$,handleSubmit:Me,setError:ne,_executeSchema:P,_getWatch:F,_getDirty:N,_updateValid:_,_removeUnmounted:q,_updateFieldArray:h,_updateDisabledField:pe,_getFieldArray:b,_reset:nt,_resetDefaultValues:()=>so(t.defaultValues)&&t.defaultValues().then(S=>{k(S,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:S=>{r={...r,...S}},_disableForm:Fe,_subjects:f,_proxyFormState:d,_setErrors:C,get _fields(){return n},get _formValues(){return o},get _state(){return i},set _state(S){i=S},get _defaultValues(){return s},get _names(){return l},set _names(S){l=S},get _formState(){return r},set _formState(S){r=S},get _options(){return t},set _options(S){t={...t,...S}}},trigger:Q,register:xe,handleSubmit:Me,watch:se,setValue:B,getValues:z,reset:k,resetField:Pe,clearErrors:he,unregister:Oe,setError:ne,setFocus:(S,T={})=>{const O=de(n,S),Y=O&&O._f;if(Y){const M=Y.refs?Y.refs[0]:Y.ref;M.focus&&(M.focus(),T.shouldSelect&&M.select())}},getFieldState:$}}function fr(e={}){const t=Be.useRef(),r=Be.useRef(),[n,s]=Be.useState({isDirty:!1,isValidating:!1,isLoading:so(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:so(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Fz(e),formState:n});const o=t.current.control;return o._options=e,gy({subject:o._subjects.state,next:i=>{Oj(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),Be.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Be.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==n.isDirty&&o._subjects.state.next({isDirty:i})}},[o,n.isDirty]),Be.useEffect(()=>{e.values&&!Ho(e.values,r.current)?(o._reset(e.values,o._options.resetOptions),r.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),Be.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),Be.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),Be.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=Dj(n,o),t.current}const Sw=(e,t,r)=>{if(e&&"reportValidity"in e){const n=de(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Wj=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Sw(n.ref,r,e):n.refs&&n.refs.forEach(s=>Sw(s,r,e))}},zz=(e,t)=>{t.shouldUseNativeValidation&&Wj(e,t);const r={};for(const n in e){const s=de(t.fields,n),o=Object.assign(e[n]||{},{ref:s&&s.ref});if(Uz(t.names||Object.keys(e),n)){const i=Object.assign({},de(r,n));ft(i,"root",o),ft(r,n,i)}else ft(r,n,o)}return r},Uz=(e,t)=>e.some(r=>r.startsWith(t+"."));var $z=function(e,t){for(var r={};e.length;){var n=e[0],s=n.code,o=n.message,i=n.path.join(".");if(!r[i])if("unionErrors"in n){var l=n.unionErrors[0].errors[0];r[i]={message:l.message,type:l.code}}else r[i]={message:o,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var c=r[i].types,u=c&&c[n.code];r[i]=Lj(i,t,r,s,u?[].concat(u,n.message):n.message)}e.shift()}return r},hr=function(e,t,r){return r===void 0&&(r={}),function(n,s,o){try{return Promise.resolve(function(i,l){try{var c=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(u){return o.shouldUseNativeValidation&&Wj({},o),{errors:{},values:r.raw?n:u}})}catch(u){return l(u)}return c&&c.then?c.then(void 0,l):c}(0,function(i){if(function(l){return Array.isArray(l==null?void 0:l.errors)}(i))return{values:{},errors:zz($z(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}},ot;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),i={};for(const l of o)i[l]=s[l];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(const i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(ot||(ot={}));var Cm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Cm||(Cm={}));const Ce=ot.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xs=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},ae=ot.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Vz=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Wr extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let l=n,c=0;for(;c<i.path.length;){const u=i.path[c];c===i.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(r(i))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return s(this),n}static assert(t){if(!(t instanceof Wr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ot.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Wr.create=e=>new Wr(e);const xa=(e,t)=>{let r;switch(e.code){case ae.invalid_type:e.received===Ce.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case ae.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ot.jsonStringifyReplacer)}`;break;case ae.unrecognized_keys:r=`Unrecognized key(s) in object: ${ot.joinValues(e.keys,", ")}`;break;case ae.invalid_union:r="Invalid input";break;case ae.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ot.joinValues(e.options)}`;break;case ae.invalid_enum_value:r=`Invalid enum value. Expected ${ot.joinValues(e.options)}, received '${e.received}'`;break;case ae.invalid_arguments:r="Invalid function arguments";break;case ae.invalid_return_type:r="Invalid function return type";break;case ae.invalid_date:r="Invalid date";break;case ae.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:ot.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case ae.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case ae.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case ae.custom:r="Invalid input";break;case ae.invalid_intersection_types:r="Intersection results could not be merged";break;case ae.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ae.not_finite:r="Number must be finite";break;default:r=t.defaultError,ot.assertNever(e)}return{message:r}};let Hj=xa;function Bz(e){Hj=e}function Ud(){return Hj}const $d=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let l="";const c=n.filter(u=>!!u).slice().reverse();for(const u of c)l=u(i,{data:t,defaultError:l}).message;return{...s,path:o,message:l}},Wz=[];function ve(e,t){const r=Ud(),n=$d({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===xa?void 0:xa].filter(s=>!!s)});e.common.issues.push(n)}class dr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const s of r){if(s.status==="aborted")return We;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const o=await s.key,i=await s.value;n.push({key:o,value:i})}return dr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return We;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[o.value]=i.value)}return{status:t.value,value:n}}}const We=Object.freeze({status:"aborted"}),Hi=e=>({status:"dirty",value:e}),wr=e=>({status:"valid",value:e}),jm=e=>e.status==="aborted",Em=e=>e.status==="dirty",sc=e=>e.status==="valid",oc=e=>typeof Promise<"u"&&e instanceof Promise;function Vd(e,t,r,n){if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Yj(e,t,r,n,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,r),r}var De;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(De||(De={}));var cl,ul;class Kn{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const kw=(e,t)=>{if(sc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Wr(e.common.issues);return this._error=r,this._error}}};function Ge(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,l)=>{var c,u;const{message:d}=e;return i.code==="invalid_enum_value"?{message:d??l.defaultError}:typeof l.data>"u"?{message:(c=d??n)!==null&&c!==void 0?c:l.defaultError}:i.code!=="invalid_type"?{message:l.defaultError}:{message:(u=d??r)!==null&&u!==void 0?u:l.defaultError}},description:s}}class Je{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Xs(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Xs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new dr,ctx:{common:t.parent.common,data:t.data,parsedType:Xs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(oc(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const s={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xs(t)},o=this._parseSync({data:t,path:s.path,parent:s});return kw(s,o)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xs(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(oc(s)?s:Promise.resolve(s));return kw(n,o)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{const i=t(s),l=()=>o.addIssue({code:ae.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(l(),!1)):i?!0:(l(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new En({schema:this,typeName:$e.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Wn.create(this,this._def)}nullable(){return ko.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _n.create(this,this._def)}promise(){return _a.create(this,this._def)}or(t){return cc.create([this,t],this._def)}and(t){return uc.create(this,t,this._def)}transform(t){return new En({...Ge(this._def),schema:this,typeName:$e.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new mc({...Ge(this._def),innerType:this,defaultValue:r,typeName:$e.ZodDefault})}brand(){return new xy({typeName:$e.ZodBranded,type:this,...Ge(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new gc({...Ge(this._def),innerType:this,catchValue:r,typeName:$e.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Uc.create(this,t)}readonly(){return vc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Hz=/^c[^\s-]{8,}$/i,Yz=/^[0-9a-z]+$/,Kz=/^[0-9A-HJKMNP-TV-Z]{26}$/,Gz=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Zz=/^[a-z0-9_-]{21}$/i,qz=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Xz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Qz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let op;const Jz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,e8=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,t8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Kj="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",r8=new RegExp(`^${Kj}$`);function Gj(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function n8(e){return new RegExp(`^${Gj(e)}$`)}function Zj(e){let t=`${Kj}T${Gj(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function s8(e,t){return!!((t==="v4"||!t)&&Jz.test(e)||(t==="v6"||!t)&&e8.test(e))}class yn extends Je{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const o=this._getOrReturnCtx(t);return ve(o,{code:ae.invalid_type,expected:Ce.string,received:o.parsedType}),We}const n=new dr;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const i=t.data.length>o.value,l=t.data.length<o.value;(i||l)&&(s=this._getOrReturnCtx(t,s),i?ve(s,{code:ae.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):l&&ve(s,{code:ae.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")Xz.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"email",code:ae.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")op||(op=new RegExp(Qz,"u")),op.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"emoji",code:ae.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Gz.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"uuid",code:ae.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")Zz.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"nanoid",code:ae.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")Hz.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"cuid",code:ae.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Yz.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"cuid2",code:ae.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Kz.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"ulid",code:ae.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ve(s,{validation:"url",code:ae.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"regex",code:ae.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Zj(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?r8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?n8(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?qz.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"duration",code:ae.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?s8(t.data,o.version)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"ip",code:ae.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?t8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"base64",code:ae.invalid_string,message:o.message}),n.dirty()):ot.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:ae.invalid_string,...De.errToObj(n)})}_addCheck(t){return new yn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...De.errToObj(t)})}url(t){return this._addCheck({kind:"url",...De.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...De.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...De.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...De.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...De.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...De.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...De.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...De.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...De.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,...De.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...De.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...De.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...De.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...De.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...De.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...De.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...De.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...De.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...De.errToObj(r)})}nonempty(t){return this.min(1,De.errToObj(t))}trim(){return new yn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new yn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new yn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}yn.create=e=>{var t;return new yn({checks:[],typeName:$e.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ge(e)})};function o8(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class _o extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ce.number){const o=this._getOrReturnCtx(t);return ve(o,{code:ae.invalid_type,expected:Ce.number,received:o.parsedType}),We}let n;const s=new dr;for(const o of this._def.checks)o.kind==="int"?ot.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ve(n,{code:ae.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),ve(n,{code:ae.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),ve(n,{code:ae.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?o8(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),ve(n,{code:ae.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),ve(n,{code:ae.not_finite,message:o.message}),s.dirty()):ot.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,De.toString(r))}gt(t,r){return this.setLimit("min",t,!1,De.toString(r))}lte(t,r){return this.setLimit("max",t,!0,De.toString(r))}lt(t,r){return this.setLimit("max",t,!1,De.toString(r))}setLimit(t,r,n,s){return new _o({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:De.toString(s)}]})}_addCheck(t){return new _o({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:De.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:De.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:De.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:De.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:De.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:De.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:De.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:De.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:De.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ot.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}_o.create=e=>new _o({checks:[],typeName:$e.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class bo extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Ce.bigint){const o=this._getOrReturnCtx(t);return ve(o,{code:ae.invalid_type,expected:Ce.bigint,received:o.parsedType}),We}let n;const s=new dr;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),ve(n,{code:ae.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),ve(n,{code:ae.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),ve(n,{code:ae.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):ot.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,De.toString(r))}gt(t,r){return this.setLimit("min",t,!1,De.toString(r))}lte(t,r){return this.setLimit("max",t,!0,De.toString(r))}lt(t,r){return this.setLimit("max",t,!1,De.toString(r))}setLimit(t,r,n,s){return new bo({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:De.toString(s)}]})}_addCheck(t){return new bo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:De.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:De.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:De.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:De.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:De.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}bo.create=e=>{var t;return new bo({checks:[],typeName:$e.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ge(e)})};class ic extends Je{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const n=this._getOrReturnCtx(t);return ve(n,{code:ae.invalid_type,expected:Ce.boolean,received:n.parsedType}),We}return wr(t.data)}}ic.create=e=>new ic({typeName:$e.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class ii extends Je{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const o=this._getOrReturnCtx(t);return ve(o,{code:ae.invalid_type,expected:Ce.date,received:o.parsedType}),We}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ve(o,{code:ae.invalid_date}),We}const n=new dr;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):ot.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ii({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:De.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:De.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}ii.create=e=>new ii({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:$e.ZodDate,...Ge(e)});class Bd extends Je{_parse(t){if(this._getType(t)!==Ce.symbol){const n=this._getOrReturnCtx(t);return ve(n,{code:ae.invalid_type,expected:Ce.symbol,received:n.parsedType}),We}return wr(t.data)}}Bd.create=e=>new Bd({typeName:$e.ZodSymbol,...Ge(e)});class ac extends Je{_parse(t){if(this._getType(t)!==Ce.undefined){const n=this._getOrReturnCtx(t);return ve(n,{code:ae.invalid_type,expected:Ce.undefined,received:n.parsedType}),We}return wr(t.data)}}ac.create=e=>new ac({typeName:$e.ZodUndefined,...Ge(e)});class lc extends Je{_parse(t){if(this._getType(t)!==Ce.null){const n=this._getOrReturnCtx(t);return ve(n,{code:ae.invalid_type,expected:Ce.null,received:n.parsedType}),We}return wr(t.data)}}lc.create=e=>new lc({typeName:$e.ZodNull,...Ge(e)});class wa extends Je{constructor(){super(...arguments),this._any=!0}_parse(t){return wr(t.data)}}wa.create=e=>new wa({typeName:$e.ZodAny,...Ge(e)});class qo extends Je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return wr(t.data)}}qo.create=e=>new qo({typeName:$e.ZodUnknown,...Ge(e)});class js extends Je{_parse(t){const r=this._getOrReturnCtx(t);return ve(r,{code:ae.invalid_type,expected:Ce.never,received:r.parsedType}),We}}js.create=e=>new js({typeName:$e.ZodNever,...Ge(e)});class Wd extends Je{_parse(t){if(this._getType(t)!==Ce.undefined){const n=this._getOrReturnCtx(t);return ve(n,{code:ae.invalid_type,expected:Ce.void,received:n.parsedType}),We}return wr(t.data)}}Wd.create=e=>new Wd({typeName:$e.ZodVoid,...Ge(e)});class _n extends Je{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==Ce.array)return ve(r,{code:ae.invalid_type,expected:Ce.array,received:r.parsedType}),We;if(s.exactLength!==null){const i=r.data.length>s.exactLength.value,l=r.data.length<s.exactLength.value;(i||l)&&(ve(r,{code:i?ae.too_big:ae.too_small,minimum:l?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(ve(r,{code:ae.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(ve(r,{code:ae.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,l)=>s.type._parseAsync(new Kn(r,i,r.path,l)))).then(i=>dr.mergeArray(n,i));const o=[...r.data].map((i,l)=>s.type._parseSync(new Kn(r,i,r.path,l)));return dr.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new _n({...this._def,minLength:{value:t,message:De.toString(r)}})}max(t,r){return new _n({...this._def,maxLength:{value:t,message:De.toString(r)}})}length(t,r){return new _n({...this._def,exactLength:{value:t,message:De.toString(r)}})}nonempty(t){return this.min(1,t)}}_n.create=(e,t)=>new _n({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$e.ZodArray,...Ge(t)});function Ti(e){if(e instanceof Rt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Wn.create(Ti(n))}return new Rt({...e._def,shape:()=>t})}else return e instanceof _n?new _n({...e._def,type:Ti(e.element)}):e instanceof Wn?Wn.create(Ti(e.unwrap())):e instanceof ko?ko.create(Ti(e.unwrap())):e instanceof Gn?Gn.create(e.items.map(t=>Ti(t))):e}class Rt extends Je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=ot.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==Ce.object){const u=this._getOrReturnCtx(t);return ve(u,{code:ae.invalid_type,expected:Ce.object,received:u.parsedType}),We}const{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),l=[];if(!(this._def.catchall instanceof js&&this._def.unknownKeys==="strip"))for(const u in s.data)i.includes(u)||l.push(u);const c=[];for(const u of i){const d=o[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new Kn(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof js){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of l)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")l.length>0&&(ve(s,{code:ae.unrecognized_keys,keys:l}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of l){const f=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new Kn(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const f=await d.key,m=await d.value;u.push({key:f,value:m,alwaysSet:d.alwaysSet})}return u}).then(u=>dr.mergeObjectSync(n,u)):dr.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return De.errToObj,new Rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,o,i,l;const c=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,r,n).message)!==null&&i!==void 0?i:n.defaultError;return r.code==="unrecognized_keys"?{message:(l=De.errToObj(t).message)!==null&&l!==void 0?l:c}:{message:c}}}:{}})}strip(){return new Rt({...this._def,unknownKeys:"strip"})}passthrough(){return new Rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$e.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Rt({...this._def,catchall:t})}pick(t){const r={};return ot.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Rt({...this._def,shape:()=>r})}omit(t){const r={};return ot.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new Rt({...this._def,shape:()=>r})}deepPartial(){return Ti(this)}partial(t){const r={};return ot.objectKeys(this.shape).forEach(n=>{const s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}),new Rt({...this._def,shape:()=>r})}required(t){const r={};return ot.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof Wn;)o=o._def.innerType;r[n]=o}}),new Rt({...this._def,shape:()=>r})}keyof(){return qj(ot.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:js.create(),typeName:$e.ZodObject,...Ge(t)});Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:js.create(),typeName:$e.ZodObject,...Ge(t)});Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:js.create(),typeName:$e.ZodObject,...Ge(t)});class cc extends Je{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(const l of o)if(l.result.status==="valid")return l.result;for(const l of o)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;const i=o.map(l=>new Wr(l.ctx.common.issues));return ve(r,{code:ae.invalid_union,unionErrors:i}),We}if(r.common.async)return Promise.all(n.map(async o=>{const i={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const c of n){const u={...r,common:{...r.common,issues:[]},parent:null},d=c._parseSync({data:r.data,path:r.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const l=i.map(c=>new Wr(c));return ve(r,{code:ae.invalid_union,unionErrors:l}),We}}get options(){return this._def.options}}cc.create=(e,t)=>new cc({options:e,typeName:$e.ZodUnion,...Ge(t)});const os=e=>e instanceof fc?os(e.schema):e instanceof En?os(e.innerType()):e instanceof hc?[e.value]:e instanceof So?e.options:e instanceof pc?ot.objectValues(e.enum):e instanceof mc?os(e._def.innerType):e instanceof ac?[void 0]:e instanceof lc?[null]:e instanceof Wn?[void 0,...os(e.unwrap())]:e instanceof ko?[null,...os(e.unwrap())]:e instanceof xy||e instanceof vc?os(e.unwrap()):e instanceof gc?os(e._def.innerType):[];class qf extends Je{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.object)return ve(r,{code:ae.invalid_type,expected:Ce.object,received:r.parsedType}),We;const n=this.discriminator,s=r.data[n],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(ve(r,{code:ae.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),We)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const s=new Map;for(const o of r){const i=os(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const l of i){if(s.has(l))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(l)}`);s.set(l,o)}}return new qf({typeName:$e.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...Ge(n)})}}function Nm(e,t){const r=Xs(e),n=Xs(t);if(e===t)return{valid:!0,data:e};if(r===Ce.object&&n===Ce.object){const s=ot.objectKeys(t),o=ot.objectKeys(e).filter(l=>s.indexOf(l)!==-1),i={...e,...t};for(const l of o){const c=Nm(e[l],t[l]);if(!c.valid)return{valid:!1};i[l]=c.data}return{valid:!0,data:i}}else if(r===Ce.array&&n===Ce.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const i=e[o],l=t[o],c=Nm(i,l);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===Ce.date&&n===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class uc extends Je{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=(o,i)=>{if(jm(o)||jm(i))return We;const l=Nm(o.value,i.value);return l.valid?((Em(o)||Em(i))&&r.dirty(),{status:r.value,value:l.data}):(ve(n,{code:ae.invalid_intersection_types}),We)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}uc.create=(e,t,r)=>new uc({left:e,right:t,typeName:$e.ZodIntersection,...Ge(r)});class Gn extends Je{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.array)return ve(n,{code:ae.invalid_type,expected:Ce.array,received:n.parsedType}),We;if(n.data.length<this._def.items.length)return ve(n,{code:ae.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),We;!this._def.rest&&n.data.length>this._def.items.length&&(ve(n,{code:ae.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...n.data].map((i,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new Kn(n,i,n.path,l)):null}).filter(i=>!!i);return n.common.async?Promise.all(o).then(i=>dr.mergeArray(r,i)):dr.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new Gn({...this._def,rest:t})}}Gn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gn({items:e,typeName:$e.ZodTuple,rest:null,...Ge(t)})};class dc extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.object)return ve(n,{code:ae.invalid_type,expected:Ce.object,received:n.parsedType}),We;const s=[],o=this._def.keyType,i=this._def.valueType;for(const l in n.data)s.push({key:o._parse(new Kn(n,l,n.path,l)),value:i._parse(new Kn(n,n.data[l],n.path,l)),alwaysSet:l in n.data});return n.common.async?dr.mergeObjectAsync(r,s):dr.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Je?new dc({keyType:t,valueType:r,typeName:$e.ZodRecord,...Ge(n)}):new dc({keyType:yn.create(),valueType:t,typeName:$e.ZodRecord,...Ge(r)})}}class Hd extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.map)return ve(n,{code:ae.invalid_type,expected:Ce.map,received:n.parsedType}),We;const s=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([l,c],u)=>({key:s._parse(new Kn(n,l,n.path,[u,"key"])),value:o._parse(new Kn(n,c,n.path,[u,"value"]))}));if(n.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of i){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return We;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),l.set(u.value,d.value)}return{status:r.value,value:l}})}else{const l=new Map;for(const c of i){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return We;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),l.set(u.value,d.value)}return{status:r.value,value:l}}}}Hd.create=(e,t,r)=>new Hd({valueType:t,keyType:e,typeName:$e.ZodMap,...Ge(r)});class ai extends Je{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.set)return ve(n,{code:ae.invalid_type,expected:Ce.set,received:n.parsedType}),We;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(ve(n,{code:ae.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(ve(n,{code:ae.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const o=this._def.valueType;function i(c){const u=new Set;for(const d of c){if(d.status==="aborted")return We;d.status==="dirty"&&r.dirty(),u.add(d.value)}return{status:r.value,value:u}}const l=[...n.data.values()].map((c,u)=>o._parse(new Kn(n,c,n.path,u)));return n.common.async?Promise.all(l).then(c=>i(c)):i(l)}min(t,r){return new ai({...this._def,minSize:{value:t,message:De.toString(r)}})}max(t,r){return new ai({...this._def,maxSize:{value:t,message:De.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}ai.create=(e,t)=>new ai({valueType:e,minSize:null,maxSize:null,typeName:$e.ZodSet,...Ge(t)});class la extends Je{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.function)return ve(r,{code:ae.invalid_type,expected:Ce.function,received:r.parsedType}),We;function n(l,c){return $d({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ud(),xa].filter(u=>!!u),issueData:{code:ae.invalid_arguments,argumentsError:c}})}function s(l,c){return $d({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ud(),xa].filter(u=>!!u),issueData:{code:ae.invalid_return_type,returnTypeError:c}})}const o={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof _a){const l=this;return wr(async function(...c){const u=new Wr([]),d=await l._def.args.parseAsync(c,o).catch(v=>{throw u.addIssue(n(c,v)),u}),f=await Reflect.apply(i,this,d);return await l._def.returns._def.type.parseAsync(f,o).catch(v=>{throw u.addIssue(s(f,v)),u})})}else{const l=this;return wr(function(...c){const u=l._def.args.safeParse(c,o);if(!u.success)throw new Wr([n(c,u.error)]);const d=Reflect.apply(i,this,u.data),f=l._def.returns.safeParse(d,o);if(!f.success)throw new Wr([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new la({...this._def,args:Gn.create(t).rest(qo.create())})}returns(t){return new la({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new la({args:t||Gn.create([]).rest(qo.create()),returns:r||qo.create(),typeName:$e.ZodFunction,...Ge(n)})}}class fc extends Je{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}fc.create=(e,t)=>new fc({getter:e,typeName:$e.ZodLazy,...Ge(t)});class hc extends Je{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return ve(r,{received:r.data,code:ae.invalid_literal,expected:this._def.value}),We}return{status:"valid",value:t.data}}get value(){return this._def.value}}hc.create=(e,t)=>new hc({value:e,typeName:$e.ZodLiteral,...Ge(t)});function qj(e,t){return new So({values:e,typeName:$e.ZodEnum,...Ge(t)})}class So extends Je{constructor(){super(...arguments),cl.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return ve(r,{expected:ot.joinValues(n),received:r.parsedType,code:ae.invalid_type}),We}if(Vd(this,cl)||Yj(this,cl,new Set(this._def.values)),!Vd(this,cl).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return ve(r,{received:r.data,code:ae.invalid_enum_value,options:n}),We}return wr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return So.create(t,{...this._def,...r})}exclude(t,r=this._def){return So.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}cl=new WeakMap;So.create=qj;class pc extends Je{constructor(){super(...arguments),ul.set(this,void 0)}_parse(t){const r=ot.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==Ce.string&&n.parsedType!==Ce.number){const s=ot.objectValues(r);return ve(n,{expected:ot.joinValues(s),received:n.parsedType,code:ae.invalid_type}),We}if(Vd(this,ul)||Yj(this,ul,new Set(ot.getValidEnumValues(this._def.values))),!Vd(this,ul).has(t.data)){const s=ot.objectValues(r);return ve(n,{received:n.data,code:ae.invalid_enum_value,options:s}),We}return wr(t.data)}get enum(){return this._def.values}}ul=new WeakMap;pc.create=(e,t)=>new pc({values:e,typeName:$e.ZodNativeEnum,...Ge(t)});class _a extends Je{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.promise&&r.common.async===!1)return ve(r,{code:ae.invalid_type,expected:Ce.promise,received:r.parsedType}),We;const n=r.parsedType===Ce.promise?r.data:Promise.resolve(r.data);return wr(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}_a.create=(e,t)=>new _a({type:e,typeName:$e.ZodPromise,...Ge(t)});class En extends Je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$e.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{ve(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(n.data,o);if(n.common.async)return Promise.resolve(i).then(async l=>{if(r.value==="aborted")return We;const c=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return c.status==="aborted"?We:c.status==="dirty"||r.value==="dirty"?Hi(c.value):c});{if(r.value==="aborted")return We;const l=this._def.schema._parseSync({data:i,path:n.path,parent:n});return l.status==="aborted"?We:l.status==="dirty"||r.value==="dirty"?Hi(l.value):l}}if(s.type==="refinement"){const i=l=>{const c=s.refinement(l,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?We:(l.status==="dirty"&&r.dirty(),i(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?We:(l.status==="dirty"&&r.dirty(),i(l.value).then(()=>({status:r.value,value:l.value}))))}if(s.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!sc(i))return i;const l=s.transform(i.value,o);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>sc(i)?Promise.resolve(s.transform(i.value,o)).then(l=>({status:r.value,value:l})):i);ot.assertNever(s)}}En.create=(e,t,r)=>new En({schema:e,typeName:$e.ZodEffects,effect:t,...Ge(r)});En.createWithPreprocess=(e,t,r)=>new En({schema:t,effect:{type:"preprocess",transform:e},typeName:$e.ZodEffects,...Ge(r)});class Wn extends Je{_parse(t){return this._getType(t)===Ce.undefined?wr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Wn.create=(e,t)=>new Wn({innerType:e,typeName:$e.ZodOptional,...Ge(t)});class ko extends Je{_parse(t){return this._getType(t)===Ce.null?wr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ko.create=(e,t)=>new ko({innerType:e,typeName:$e.ZodNullable,...Ge(t)});class mc extends Je{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===Ce.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}mc.create=(e,t)=>new mc({innerType:e,typeName:$e.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ge(t)});class gc extends Je{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return oc(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Wr(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Wr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}gc.create=(e,t)=>new gc({innerType:e,typeName:$e.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ge(t)});class Yd extends Je{_parse(t){if(this._getType(t)!==Ce.nan){const n=this._getOrReturnCtx(t);return ve(n,{code:ae.invalid_type,expected:Ce.nan,received:n.parsedType}),We}return{status:"valid",value:t.data}}}Yd.create=e=>new Yd({typeName:$e.ZodNaN,...Ge(e)});const i8=Symbol("zod_brand");class xy extends Je{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Uc extends Je{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?We:o.status==="dirty"?(r.dirty(),Hi(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?We:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new Uc({in:t,out:r,typeName:$e.ZodPipeline})}}class vc extends Je{_parse(t){const r=this._def.innerType._parse(t),n=s=>(sc(s)&&(s.value=Object.freeze(s.value)),s);return oc(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}vc.create=(e,t)=>new vc({innerType:e,typeName:$e.ZodReadonly,...Ge(t)});function Xj(e,t={},r){return e?wa.create().superRefine((n,s)=>{var o,i;if(!e(n)){const l=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,c=(i=(o=l.fatal)!==null&&o!==void 0?o:r)!==null&&i!==void 0?i:!0,u=typeof l=="string"?{message:l}:l;s.addIssue({code:"custom",...u,fatal:c})}}):wa.create()}const a8={object:Rt.lazycreate};var $e;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})($e||($e={}));const l8=(e,t={message:`Input not instance of ${e.name}`})=>Xj(r=>r instanceof e,t),Qj=yn.create,Jj=_o.create,c8=Yd.create,u8=bo.create,eE=ic.create,d8=ii.create,f8=Bd.create,h8=ac.create,p8=lc.create,m8=wa.create,g8=qo.create,v8=js.create,y8=Wd.create,x8=_n.create,w8=Rt.create,_8=Rt.strictCreate,b8=cc.create,S8=qf.create,k8=uc.create,C8=Gn.create,j8=dc.create,E8=Hd.create,N8=ai.create,T8=la.create,R8=fc.create,P8=hc.create,A8=So.create,D8=pc.create,O8=_a.create,Cw=En.create,M8=Wn.create,I8=ko.create,L8=En.createWithPreprocess,F8=Uc.create,z8=()=>Qj().optional(),U8=()=>Jj().optional(),$8=()=>eE().optional(),V8={string:e=>yn.create({...e,coerce:!0}),number:e=>_o.create({...e,coerce:!0}),boolean:e=>ic.create({...e,coerce:!0}),bigint:e=>bo.create({...e,coerce:!0}),date:e=>ii.create({...e,coerce:!0})},B8=We;var ce=Object.freeze({__proto__:null,defaultErrorMap:xa,setErrorMap:Bz,getErrorMap:Ud,makeIssue:$d,EMPTY_PATH:Wz,addIssueToContext:ve,ParseStatus:dr,INVALID:We,DIRTY:Hi,OK:wr,isAborted:jm,isDirty:Em,isValid:sc,isAsync:oc,get util(){return ot},get objectUtil(){return Cm},ZodParsedType:Ce,getParsedType:Xs,ZodType:Je,datetimeRegex:Zj,ZodString:yn,ZodNumber:_o,ZodBigInt:bo,ZodBoolean:ic,ZodDate:ii,ZodSymbol:Bd,ZodUndefined:ac,ZodNull:lc,ZodAny:wa,ZodUnknown:qo,ZodNever:js,ZodVoid:Wd,ZodArray:_n,ZodObject:Rt,ZodUnion:cc,ZodDiscriminatedUnion:qf,ZodIntersection:uc,ZodTuple:Gn,ZodRecord:dc,ZodMap:Hd,ZodSet:ai,ZodFunction:la,ZodLazy:fc,ZodLiteral:hc,ZodEnum:So,ZodNativeEnum:pc,ZodPromise:_a,ZodEffects:En,ZodTransformer:En,ZodOptional:Wn,ZodNullable:ko,ZodDefault:mc,ZodCatch:gc,ZodNaN:Yd,BRAND:i8,ZodBranded:xy,ZodPipeline:Uc,ZodReadonly:vc,custom:Xj,Schema:Je,ZodSchema:Je,late:a8,get ZodFirstPartyTypeKind(){return $e},coerce:V8,any:m8,array:x8,bigint:u8,boolean:eE,date:d8,discriminatedUnion:S8,effect:Cw,enum:A8,function:T8,instanceof:l8,intersection:k8,lazy:R8,literal:P8,map:E8,nan:c8,nativeEnum:D8,never:v8,null:p8,nullable:I8,number:Jj,object:w8,oboolean:$8,onumber:U8,optional:M8,ostring:z8,pipeline:F8,preprocess:L8,promise:O8,record:j8,set:N8,strictObject:_8,string:Qj,symbol:f8,transformer:Cw,tuple:C8,undefined:h8,union:b8,unknown:g8,void:y8,NEVER:B8,ZodIssueCode:ae,quotelessJson:Vz,ZodError:Wr}),W8="Label",tE=g.forwardRef((e,t)=>a.jsx(Re.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));tE.displayName=W8;var rE=tE;const H8=Sc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Co=g.forwardRef(({className:e,...t},r)=>a.jsx(rE,{ref:r,className:oe(H8(),e),...t}));Co.displayName=rE.displayName;const pr=kz,nE=g.createContext({}),Se=({...e})=>a.jsx(nE.Provider,{value:{name:e.name},children:a.jsx(Nz,{...e})}),Xf=()=>{const e=g.useContext(nE),t=g.useContext(sE),{getFieldState:r,formState:n}=Zf(),s=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},sE=g.createContext({}),we=g.forwardRef(({className:e,...t},r)=>{const n=g.useId();return a.jsx(sE.Provider,{value:{id:n},children:a.jsx("div",{ref:r,className:oe("space-y-2",e),...t})})});we.displayName="FormItem";const _e=g.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:s}=Xf();return a.jsx(Co,{ref:r,className:oe(n&&"text-destructive",e),htmlFor:s,...t})});_e.displayName="FormLabel";const be=g.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:s,formMessageId:o}=Xf();return a.jsx(bs,{ref:t,id:n,"aria-describedby":r?`${s} ${o}`:`${s}`,"aria-invalid":!!r,...e})});be.displayName="FormControl";const Y8=g.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=Xf();return a.jsx("p",{ref:r,id:n,className:oe("text-sm text-muted-foreground",e),...t})});Y8.displayName="FormDescription";const ge=g.forwardRef(({className:e,children:t,...r},n)=>{const{error:s,formMessageId:o}=Xf(),i=s?String(s==null?void 0:s.message):t;return i?a.jsx("p",{ref:n,id:o,className:oe("text-sm font-medium text-destructive",e),...r,children:i}):null});ge.displayName="FormMessage";function Tm(e,[t,r]){return Math.min(r,Math.max(t,e))}var K8=[" ","Enter","ArrowUp","ArrowDown"],G8=[" ","Enter"],$c="Select",[Qf,Jf,Z8]=kc($c),[za,sV]=sr($c,[Z8,Da]),eh=Da(),[q8,Ro]=za($c),[X8,Q8]=za($c),oE=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:o,value:i,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:m,required:v}=e,x=eh(t),[y,_]=g.useState(null),[p,h]=g.useState(null),[w,C]=g.useState(!1),j=di(u),[E=!1,R]=Yr({prop:n,defaultProp:s,onChange:o}),[P,A]=Yr({prop:i,defaultProp:l,onChange:c}),L=g.useRef(null),q=y?!!y.closest("form"):!0,[N,F]=g.useState(new Set),b=Array.from(N).map(V=>V.props.value).join(";");return a.jsx(Jg,{...x,children:a.jsxs(q8,{required:v,scope:t,trigger:y,onTriggerChange:_,valueNode:p,onValueNodeChange:h,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:$r(),value:P,onValueChange:A,open:E,onOpenChange:R,dir:j,triggerPointerDownPosRef:L,disabled:m,children:[a.jsx(Qf.Provider,{scope:t,children:a.jsx(X8,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(V=>{F(te=>new Set(te).add(V))},[]),onNativeOptionRemove:g.useCallback(V=>{F(te=>{const B=new Set(te);return B.delete(V),B})},[]),children:r})}),q?a.jsxs(PE,{"aria-hidden":!0,required:v,tabIndex:-1,name:d,autoComplete:f,value:P,onChange:V=>A(V.target.value),disabled:m,children:[P===void 0?a.jsx("option",{value:""}):null,Array.from(N)]},b):null]})})};oE.displayName=$c;var iE="SelectTrigger",aE=g.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,o=eh(r),i=Ro(iE,r),l=i.disabled||n,c=Ke(t,i.onTriggerChange),u=Jf(r),[d,f,m]=AE(x=>{const y=u().filter(h=>!h.disabled),_=y.find(h=>h.value===i.value),p=DE(y,x,_);p!==void 0&&i.onValueChange(p.value)}),v=()=>{l||(i.onOpenChange(!0),m())};return a.jsx(ev,{asChild:!0,...o,children:a.jsx(Re.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":RE(i.value)?"":void 0,...s,ref:c,onClick:ue(s.onClick,x=>{x.currentTarget.focus()}),onPointerDown:ue(s.onPointerDown,x=>{const y=x.target;y.hasPointerCapture(x.pointerId)&&y.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(v(),i.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:ue(s.onKeyDown,x=>{const y=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(y&&x.key===" ")&&K8.includes(x.key)&&(v(),x.preventDefault())})})})});aE.displayName=iE;var lE="SelectValue",cE=g.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:i="",...l}=e,c=Ro(lE,r),{onValueNodeHasChildrenChange:u}=c,d=o!==void 0,f=Ke(t,c.onValueNodeChange);return Jt(()=>{u(d)},[u,d]),a.jsx(Re.span,{...l,ref:f,style:{pointerEvents:"none"},children:RE(c.value)?a.jsx(a.Fragment,{children:i}):o})});cE.displayName=lE;var J8="SelectIcon",uE=g.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return a.jsx(Re.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});uE.displayName=J8;var eU="SelectPortal",dE=e=>a.jsx(jc,{asChild:!0,...e});dE.displayName=eU;var li="SelectContent",fE=g.forwardRef((e,t)=>{const r=Ro(li,e.__scopeSelect),[n,s]=g.useState();if(Jt(()=>{s(new DocumentFragment)},[]),!r.open){const o=n;return o?Ts.createPortal(a.jsx(hE,{scope:e.__scopeSelect,children:a.jsx(Qf.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),o):null}return a.jsx(pE,{...e,ref:t})});fE.displayName=li;var ls=10,[hE,Po]=za(li),tU="SelectContentImpl",pE=g.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:v,sticky:x,hideWhenDetached:y,avoidCollisions:_,...p}=e,h=Ro(li,r),[w,C]=g.useState(null),[j,E]=g.useState(null),R=Ke(t,pe=>C(pe)),[P,A]=g.useState(null),[L,q]=g.useState(null),N=Jf(r),[F,b]=g.useState(!1),V=g.useRef(!1);g.useEffect(()=>{if(w)return ov(w)},[w]),Bg();const te=g.useCallback(pe=>{const[xe,...Te]=N().map(Pe=>Pe.ref.current),[Fe]=Te.slice(-1),Me=document.activeElement;for(const Pe of pe)if(Pe===Me||(Pe==null||Pe.scrollIntoView({block:"nearest"}),Pe===xe&&j&&(j.scrollTop=0),Pe===Fe&&j&&(j.scrollTop=j.scrollHeight),Pe==null||Pe.focus(),document.activeElement!==Me))return},[N,j]),B=g.useCallback(()=>te([P,w]),[te,P,w]);g.useEffect(()=>{F&&B()},[F,B]);const{onOpenChange:K,triggerPointerDownPosRef:I}=h;g.useEffect(()=>{if(w){let pe={x:0,y:0};const xe=Fe=>{var Me,Pe;pe={x:Math.abs(Math.round(Fe.pageX)-(((Me=I.current)==null?void 0:Me.x)??0)),y:Math.abs(Math.round(Fe.pageY)-(((Pe=I.current)==null?void 0:Pe.y)??0))}},Te=Fe=>{pe.x<=10&&pe.y<=10?Fe.preventDefault():w.contains(Fe.target)||K(!1),document.removeEventListener("pointermove",xe),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",xe),document.addEventListener("pointerup",Te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",Te,{capture:!0})}}},[w,K,I]),g.useEffect(()=>{const pe=()=>K(!1);return window.addEventListener("blur",pe),window.addEventListener("resize",pe),()=>{window.removeEventListener("blur",pe),window.removeEventListener("resize",pe)}},[K]);const[Q,z]=AE(pe=>{const xe=N().filter(Me=>!Me.disabled),Te=xe.find(Me=>Me.ref.current===document.activeElement),Fe=DE(xe,pe,Te);Fe&&setTimeout(()=>Fe.ref.current.focus())}),$=g.useCallback((pe,xe,Te)=>{const Fe=!V.current&&!Te;(h.value!==void 0&&h.value===xe||Fe)&&(A(pe),Fe&&(V.current=!0))},[h.value]),he=g.useCallback(()=>w==null?void 0:w.focus(),[w]),ne=g.useCallback((pe,xe,Te)=>{const Fe=!V.current&&!Te;(h.value!==void 0&&h.value===xe||Fe)&&q(pe)},[h.value]),se=n==="popper"?Rm:mE,Oe=se===Rm?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:v,sticky:x,hideWhenDetached:y,avoidCollisions:_}:{};return a.jsx(hE,{scope:r,content:w,viewport:j,onViewportChange:E,itemRefCallback:$,selectedItem:P,onItemLeave:he,itemTextRefCallback:ne,focusSelectedItem:B,selectedItemText:L,position:n,isPositioned:F,searchRef:Q,children:a.jsx(jf,{as:bs,allowPinchZoom:!0,children:a.jsx(_f,{asChild:!0,trapped:h.open,onMountAutoFocus:pe=>{pe.preventDefault()},onUnmountAutoFocus:ue(s,pe=>{var xe;(xe=h.trigger)==null||xe.focus({preventScroll:!0}),pe.preventDefault()}),children:a.jsx(Ra,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:pe=>pe.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:a.jsx(se,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:pe=>pe.preventDefault(),...p,...Oe,onPlaced:()=>b(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...p.style},onKeyDown:ue(p.onKeyDown,pe=>{const xe=pe.ctrlKey||pe.altKey||pe.metaKey;if(pe.key==="Tab"&&pe.preventDefault(),!xe&&pe.key.length===1&&z(pe.key),["ArrowUp","ArrowDown","Home","End"].includes(pe.key)){let Fe=N().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);if(["ArrowUp","End"].includes(pe.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(pe.key)){const Me=pe.target,Pe=Fe.indexOf(Me);Fe=Fe.slice(Pe+1)}setTimeout(()=>te(Fe)),pe.preventDefault()}})})})})})})});pE.displayName=tU;var rU="SelectItemAlignedPosition",mE=g.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=Ro(li,r),i=Po(li,r),[l,c]=g.useState(null),[u,d]=g.useState(null),f=Ke(t,R=>d(R)),m=Jf(r),v=g.useRef(!1),x=g.useRef(!0),{viewport:y,selectedItem:_,selectedItemText:p,focusSelectedItem:h}=i,w=g.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&u&&y&&_&&p){const R=o.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),A=o.valueNode.getBoundingClientRect(),L=p.getBoundingClientRect();if(o.dir!=="rtl"){const Me=L.left-P.left,Pe=A.left-Me,nt=R.left-Pe,k=R.width+nt,J=Math.max(k,P.width),G=window.innerWidth-ls,D=Tm(Pe,[ls,G-J]);l.style.minWidth=k+"px",l.style.left=D+"px"}else{const Me=P.right-L.right,Pe=window.innerWidth-A.right-Me,nt=window.innerWidth-R.right-Pe,k=R.width+nt,J=Math.max(k,P.width),G=window.innerWidth-ls,D=Tm(Pe,[ls,G-J]);l.style.minWidth=k+"px",l.style.right=D+"px"}const q=m(),N=window.innerHeight-ls*2,F=y.scrollHeight,b=window.getComputedStyle(u),V=parseInt(b.borderTopWidth,10),te=parseInt(b.paddingTop,10),B=parseInt(b.borderBottomWidth,10),K=parseInt(b.paddingBottom,10),I=V+te+F+K+B,Q=Math.min(_.offsetHeight*5,I),z=window.getComputedStyle(y),$=parseInt(z.paddingTop,10),he=parseInt(z.paddingBottom,10),ne=R.top+R.height/2-ls,se=N-ne,Oe=_.offsetHeight/2,pe=_.offsetTop+Oe,xe=V+te+pe,Te=I-xe;if(xe<=ne){const Me=_===q[q.length-1].ref.current;l.style.bottom="0px";const Pe=u.clientHeight-y.offsetTop-y.offsetHeight,nt=Math.max(se,Oe+(Me?he:0)+Pe+B),k=xe+nt;l.style.height=k+"px"}else{const Me=_===q[0].ref.current;l.style.top="0px";const nt=Math.max(ne,V+y.offsetTop+(Me?$:0)+Oe)+Te;l.style.height=nt+"px",y.scrollTop=xe-ne+y.offsetTop}l.style.margin=`${ls}px 0`,l.style.minHeight=Q+"px",l.style.maxHeight=N+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[m,o.trigger,o.valueNode,l,u,y,_,p,o.dir,n]);Jt(()=>w(),[w]);const[C,j]=g.useState();Jt(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);const E=g.useCallback(R=>{R&&x.current===!0&&(w(),h==null||h(),x.current=!1)},[w,h]);return a.jsx(sU,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:v,onScrollButtonChange:E,children:a.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:a.jsx(Re.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});mE.displayName=rU;var nU="SelectPopperPosition",Rm=g.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=ls,...o}=e,i=eh(r);return a.jsx(tv,{...i,...o,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Rm.displayName=nU;var[sU,wy]=za(li,{}),Pm="SelectViewport",gE=g.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=Po(Pm,r),i=wy(Pm,r),l=Ke(t,o.onViewportChange),c=g.useRef(0);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),a.jsx(Qf.Slot,{scope:r,children:a.jsx(Re.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ue(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=i;if(m!=null&&m.current&&f){const v=Math.abs(c.current-d.scrollTop);if(v>0){const x=window.innerHeight-ls*2,y=parseFloat(f.style.minHeight),_=parseFloat(f.style.height),p=Math.max(y,_);if(p<x){const h=p+v,w=Math.min(x,h),C=h-w;f.style.height=w+"px",f.style.bottom==="0px"&&(d.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});gE.displayName=Pm;var vE="SelectGroup",[oU,iU]=za(vE),yE=g.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=$r();return a.jsx(oU,{scope:r,id:s,children:a.jsx(Re.div,{role:"group","aria-labelledby":s,...n,ref:t})})});yE.displayName=vE;var xE="SelectLabel",wE=g.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=iU(xE,r);return a.jsx(Re.div,{id:s.id,...n,ref:t})});wE.displayName=xE;var Kd="SelectItem",[aU,_E]=za(Kd),bE=g.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:o,...i}=e,l=Ro(Kd,r),c=Po(Kd,r),u=l.value===n,[d,f]=g.useState(o??""),[m,v]=g.useState(!1),x=Ke(t,p=>{var h;return(h=c.itemRefCallback)==null?void 0:h.call(c,p,n,s)}),y=$r(),_=()=>{s||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return a.jsx(aU,{scope:r,value:n,disabled:s,textId:y,isSelected:u,onItemTextChange:g.useCallback(p=>{f(h=>h||((p==null?void 0:p.textContent)??"").trim())},[]),children:a.jsx(Qf.ItemSlot,{scope:r,value:n,disabled:s,textValue:d,children:a.jsx(Re.div,{role:"option","aria-labelledby":y,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:x,onFocus:ue(i.onFocus,()=>v(!0)),onBlur:ue(i.onBlur,()=>v(!1)),onPointerUp:ue(i.onPointerUp,_),onPointerMove:ue(i.onPointerMove,p=>{var h;s?(h=c.onItemLeave)==null||h.call(c):p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(i.onPointerLeave,p=>{var h;p.currentTarget===document.activeElement&&((h=c.onItemLeave)==null||h.call(c))}),onKeyDown:ue(i.onKeyDown,p=>{var w;((w=c.searchRef)==null?void 0:w.current)!==""&&p.key===" "||(G8.includes(p.key)&&_(),p.key===" "&&p.preventDefault())})})})})});bE.displayName=Kd;var dl="SelectItemText",SE=g.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,i=Ro(dl,r),l=Po(dl,r),c=_E(dl,r),u=Q8(dl,r),[d,f]=g.useState(null),m=Ke(t,p=>f(p),c.onItemTextChange,p=>{var h;return(h=l.itemTextRefCallback)==null?void 0:h.call(l,p,c.value,c.disabled)}),v=d==null?void 0:d.textContent,x=g.useMemo(()=>a.jsx("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:y,onNativeOptionRemove:_}=u;return Jt(()=>(y(x),()=>_(x)),[y,_,x]),a.jsxs(a.Fragment,{children:[a.jsx(Re.span,{id:c.textId,...o,ref:m}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Ts.createPortal(o.children,i.valueNode):null]})});SE.displayName=dl;var kE="SelectItemIndicator",CE=g.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return _E(kE,r).isSelected?a.jsx(Re.span,{"aria-hidden":!0,...n,ref:t}):null});CE.displayName=kE;var Am="SelectScrollUpButton",jE=g.forwardRef((e,t)=>{const r=Po(Am,e.__scopeSelect),n=wy(Am,e.__scopeSelect),[s,o]=g.useState(!1),i=Ke(t,n.onScrollButtonChange);return Jt(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollTop>0;o(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),s?a.jsx(NE,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});jE.displayName=Am;var Dm="SelectScrollDownButton",EE=g.forwardRef((e,t)=>{const r=Po(Dm,e.__scopeSelect),n=wy(Dm,e.__scopeSelect),[s,o]=g.useState(!1),i=Ke(t,n.onScrollButtonChange);return Jt(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;o(d)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),s?a.jsx(NE,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});EE.displayName=Dm;var NE=g.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=Po("SelectScrollButton",r),i=g.useRef(null),l=Jf(r),c=g.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return g.useEffect(()=>()=>c(),[c]),Jt(()=>{var d;const u=l().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),a.jsx(Re.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ue(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:ue(s.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:ue(s.onPointerLeave,()=>{c()})})}),lU="SelectSeparator",TE=g.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return a.jsx(Re.div,{"aria-hidden":!0,...n,ref:t})});TE.displayName=lU;var Om="SelectArrow",cU=g.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=eh(r),o=Ro(Om,r),i=Po(Om,r);return o.open&&i.position==="popper"?a.jsx(rv,{...s,...n,ref:t}):null});cU.displayName=Om;function RE(e){return e===""||e===void 0}var PE=g.forwardRef((e,t)=>{const{value:r,...n}=e,s=g.useRef(null),o=Ke(t,s),i=ly(r);return g.useEffect(()=>{const l=s.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==r&&d){const f=new Event("change",{bubbles:!0});d.call(l,r),l.dispatchEvent(f)}},[i,r]),a.jsx(Lc,{asChild:!0,children:a.jsx("select",{...n,ref:o,defaultValue:r})})});PE.displayName="BubbleSelect";function AE(e){const t=Dt(e),r=g.useRef(""),n=g.useRef(0),s=g.useCallback(i=>{const l=r.current+i;t(l),function c(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),o=g.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function DE(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=uU(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==r));const c=i.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function uU(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var dU=oE,OE=aE,fU=cE,hU=uE,pU=dE,ME=fE,mU=gE,gU=yE,IE=wE,LE=bE,vU=SE,yU=CE,FE=jE,zE=EE,UE=TE;const Io=dU,fl=gU,Lo=fU,Qs=g.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(OE,{ref:n,className:oe("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,a.jsx(hU,{asChild:!0,children:a.jsx(Fg,{className:"h-4 w-4 opacity-50"})})]}));Qs.displayName=OE.displayName;const $E=g.forwardRef(({className:e,...t},r)=>a.jsx(FE,{ref:r,className:oe("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(CA,{className:"h-4 w-4"})}));$E.displayName=FE.displayName;const VE=g.forwardRef(({className:e,...t},r)=>a.jsx(zE,{ref:r,className:oe("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Fg,{className:"h-4 w-4"})}));VE.displayName=zE.displayName;const Js=g.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>a.jsx(pU,{children:a.jsxs(ME,{ref:s,className:oe("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[a.jsx($E,{}),a.jsx(mU,{className:oe("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(VE,{})]})}));Js.displayName=ME.displayName;const Yi=g.forwardRef(({className:e,...t},r)=>a.jsx(IE,{ref:r,className:oe("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Yi.displayName=IE.displayName;const pn=g.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(LE,{ref:n,className:oe("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(yU,{children:a.jsx(lb,{className:"h-4 w-4"})})}),a.jsx(vU,{children:t})]}));pn.displayName=LE.displayName;const xU=g.forwardRef(({className:e,...t},r)=>a.jsx(UE,{ref:r,className:oe("-mx-1 my-1 h-px bg-muted",e),...t}));xU.displayName=UE.displayName;const Mm=new Map([["aliyun-cdn",["阿里云-CDN","/imgs/providers/aliyun.svg"]],["aliyun-oss",["阿里云-OSS","/imgs/providers/aliyun.svg"]],["aliyun-dcdn",["阿里云-DCDN","/imgs/providers/aliyun.svg"]],["tencent-cdn",["腾讯云-CDN","/imgs/providers/tencent.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.svg"]],["qiniu-cdn",["七牛云-CDN","/imgs/providers/qiniu.svg"]],["webhook",["Webhook","/imgs/providers/webhook.svg"]],["local",["本地部署","/imgs/providers/local.svg"]]]),wU=Array.from(Mm.keys()),_y=xv,by=wv,_U=_v,BE=g.forwardRef(({className:e,...t},r)=>a.jsx(Tc,{ref:r,className:oe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));BE.displayName=Tc.displayName;const th=g.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(_U,{children:[a.jsx(BE,{}),a.jsxs(Rc,{ref:n,className:oe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,a.jsxs(Tf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[a.jsx(zg,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));th.displayName=Rc.displayName;const rh=({className:e,...t})=>a.jsx("div",{className:oe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});rh.displayName="DialogHeader";const nh=g.forwardRef(({className:e,...t},r)=>a.jsx(Pc,{ref:r,className:oe("text-lg font-semibold leading-none tracking-tight",e),...t}));nh.displayName=Pc.displayName;const bU=g.forwardRef(({className:e,...t},r)=>a.jsx(Ac,{ref:r,className:oe("text-sm text-muted-foreground",e),...t}));bU.displayName=Ac.displayName;function SU(e,t){return g.useReducer((r,n)=>t[r][n]??r,e)}var Sy="ScrollArea",[WE,oV]=sr(Sy),[kU,cn]=WE(Sy),HE=g.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:o=600,...i}=e,[l,c]=g.useState(null),[u,d]=g.useState(null),[f,m]=g.useState(null),[v,x]=g.useState(null),[y,_]=g.useState(null),[p,h]=g.useState(0),[w,C]=g.useState(0),[j,E]=g.useState(!1),[R,P]=g.useState(!1),A=Ke(t,q=>c(q)),L=di(s);return a.jsx(kU,{scope:r,type:n,dir:L,scrollHideDelay:o,scrollArea:l,viewport:u,onViewportChange:d,content:f,onContentChange:m,scrollbarX:v,onScrollbarXChange:x,scrollbarXEnabled:j,onScrollbarXEnabledChange:E,scrollbarY:y,onScrollbarYChange:_,scrollbarYEnabled:R,onScrollbarYEnabledChange:P,onCornerWidthChange:h,onCornerHeightChange:C,children:a.jsx(Re.div,{dir:L,...i,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":p+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});HE.displayName=Sy;var YE="ScrollAreaViewport",KE=g.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...o}=e,i=cn(YE,r),l=g.useRef(null),c=Ke(t,l,i.onViewportChange);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),a.jsx(Re.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:a.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});KE.displayName=YE;var Xn="ScrollAreaScrollbar",ky=g.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=cn(Xn,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=s,l=e.orientation==="horizontal";return g.useEffect(()=>(l?o(!0):i(!0),()=>{l?o(!1):i(!1)}),[l,o,i]),s.type==="hover"?a.jsx(CU,{...n,ref:t,forceMount:r}):s.type==="scroll"?a.jsx(jU,{...n,ref:t,forceMount:r}):s.type==="auto"?a.jsx(GE,{...n,ref:t,forceMount:r}):s.type==="always"?a.jsx(Cy,{...n,ref:t}):null});ky.displayName=Xn;var CU=g.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=cn(Xn,e.__scopeScrollArea),[o,i]=g.useState(!1);return g.useEffect(()=>{const l=s.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),i(!0)},d=()=>{c=window.setTimeout(()=>i(!1),s.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),a.jsx(or,{present:r||o,children:a.jsx(GE,{"data-state":o?"visible":"hidden",...n,ref:t})})}),jU=g.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=cn(Xn,e.__scopeScrollArea),o=e.orientation==="horizontal",i=oh(()=>c("SCROLL_END"),100),[l,c]=SU("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return g.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,s.scrollHideDelay,c]),g.useEffect(()=>{const u=s.viewport,d=o?"scrollLeft":"scrollTop";if(u){let f=u[d];const m=()=>{const v=u[d];f!==v&&(c("SCROLL"),i()),f=v};return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[s.viewport,o,c,i]),a.jsx(or,{present:r||l!=="hidden",children:a.jsx(Cy,{"data-state":l==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:ue(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ue(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),GE=g.forwardRef((e,t)=>{const r=cn(Xn,e.__scopeScrollArea),{forceMount:n,...s}=e,[o,i]=g.useState(!1),l=e.orientation==="horizontal",c=oh(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;i(l?u:d)}},10);return ba(r.viewport,c),ba(r.content,c),a.jsx(or,{present:n||o,children:a.jsx(Cy,{"data-state":o?"visible":"hidden",...s,ref:t})})}),Cy=g.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,s=cn(Xn,e.__scopeScrollArea),o=g.useRef(null),i=g.useRef(0),[l,c]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=JE(l.viewport,l.content),d={...n,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:m=>o.current=m,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:m=>i.current=m};function f(m,v){return AU(m,i.current,l,v)}return r==="horizontal"?a.jsx(EU,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const m=s.viewport.scrollLeft,v=jw(m,l,s.dir);o.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollLeft=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollLeft=f(m,s.dir))}}):r==="vertical"?a.jsx(NU,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const m=s.viewport.scrollTop,v=jw(m,l);o.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollTop=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollTop=f(m))}}):null}),EU=g.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=cn(Xn,e.__scopeScrollArea),[i,l]=g.useState(),c=g.useRef(null),u=Ke(t,c,o.onScrollbarXChange);return g.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(qE,{"data-orientation":"horizontal",...s,ref:u,sizes:r,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":sh(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(o.viewport){const m=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),tN(m,f)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&i&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Zd(i.paddingLeft),paddingEnd:Zd(i.paddingRight)}})}})}),NU=g.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=cn(Xn,e.__scopeScrollArea),[i,l]=g.useState(),c=g.useRef(null),u=Ke(t,c,o.onScrollbarYChange);return g.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(qE,{"data-orientation":"vertical",...s,ref:u,sizes:r,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":sh(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(o.viewport){const m=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),tN(m,f)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&i&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Zd(i.paddingTop),paddingEnd:Zd(i.paddingBottom)}})}})}),[TU,ZE]=WE(Xn),qE=g.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...m}=e,v=cn(Xn,r),[x,y]=g.useState(null),_=Ke(t,A=>y(A)),p=g.useRef(null),h=g.useRef(""),w=v.viewport,C=n.content-n.viewport,j=Dt(d),E=Dt(c),R=oh(f,10);function P(A){if(p.current){const L=A.clientX-p.current.left,q=A.clientY-p.current.top;u({x:L,y:q})}}return g.useEffect(()=>{const A=L=>{const q=L.target;(x==null?void 0:x.contains(q))&&j(L,C)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[w,x,C,j]),g.useEffect(E,[n,E]),ba(x,R),ba(v.content,R),a.jsx(TU,{scope:r,scrollbar:x,hasThumb:s,onThumbChange:Dt(o),onThumbPointerUp:Dt(i),onThumbPositionChange:E,onThumbPointerDown:Dt(l),children:a.jsx(Re.div,{...m,ref:_,style:{position:"absolute",...m.style},onPointerDown:ue(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),p.current=x.getBoundingClientRect(),h.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),P(A))}),onPointerMove:ue(e.onPointerMove,P),onPointerUp:ue(e.onPointerUp,A=>{const L=A.target;L.hasPointerCapture(A.pointerId)&&L.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=h.current,v.viewport&&(v.viewport.style.scrollBehavior=""),p.current=null})})})}),Gd="ScrollAreaThumb",XE=g.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=ZE(Gd,e.__scopeScrollArea);return a.jsx(or,{present:r||s.hasThumb,children:a.jsx(RU,{ref:t,...n})})}),RU=g.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,o=cn(Gd,r),i=ZE(Gd,r),{onThumbPositionChange:l}=i,c=Ke(t,f=>i.onThumbChange(f)),u=g.useRef(),d=oh(()=>{u.current&&(u.current(),u.current=void 0)},100);return g.useEffect(()=>{const f=o.viewport;if(f){const m=()=>{if(d(),!u.current){const v=DU(f,l);u.current=v,l()}};return l(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[o.viewport,d,l]),a.jsx(Re.div,{"data-state":i.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:ue(e.onPointerDownCapture,f=>{const v=f.target.getBoundingClientRect(),x=f.clientX-v.left,y=f.clientY-v.top;i.onThumbPointerDown({x,y})}),onPointerUp:ue(e.onPointerUp,i.onThumbPointerUp)})});XE.displayName=Gd;var jy="ScrollAreaCorner",QE=g.forwardRef((e,t)=>{const r=cn(jy,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?a.jsx(PU,{...e,ref:t}):null});QE.displayName=jy;var PU=g.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=cn(jy,r),[o,i]=g.useState(0),[l,c]=g.useState(0),u=!!(o&&l);return ba(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),c(d)}),ba(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),i(d)}),u?a.jsx(Re.div,{...n,ref:t,style:{width:o,height:l,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Zd(e){return e?parseInt(e,10):0}function JE(e,t){const r=e/t;return isNaN(r)?0:r}function sh(e){const t=JE(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function AU(e,t,r,n="ltr"){const s=sh(r),o=s/2,i=t||o,l=s-i,c=r.scrollbar.paddingStart+i,u=r.scrollbar.size-r.scrollbar.paddingEnd-l,d=r.content-r.viewport,f=n==="ltr"?[0,d]:[d*-1,0];return eN([c,u],f)(e)}function jw(e,t,r="ltr"){const n=sh(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,i=t.content-t.viewport,l=o-n,c=r==="ltr"?[0,i]:[i*-1,0],u=Tm(e,c);return eN([0,i],[0,l])(u)}function eN(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function tN(e,t){return e>0&&e<t}var DU=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},i=r.left!==o.left,l=r.top!==o.top;(i||l)&&t(),r=o,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function oh(e,t){const r=Dt(e),n=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(n.current),[]),g.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ba(e,t){const r=Dt(t);Jt(()=>{let n=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return s.observe(e),()=>{window.cancelAnimationFrame(n),s.unobserve(e)}}},[e,r])}var rN=HE,OU=KE,MU=QE;const ih=g.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(rN,{ref:n,className:oe("relative overflow-hidden",e),...r,children:[a.jsx(OU,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsx(nN,{}),a.jsx(MU,{})]}));ih.displayName=rN.displayName;const nN=g.forwardRef(({className:e,orientation:t="vertical",...r},n)=>a.jsx(ky,{ref:n,orientation:t,className:oe("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:a.jsx(XE,{className:"relative flex-1 rounded-full bg-border"})}));nN.displayName=ky.displayName;const mo=new Map([["tencent",["腾讯云","/imgs/providers/tencent.svg"]],["aliyun",["阿里云","/imgs/providers/aliyun.svg"]],["cloudflare",["Cloudflare","/imgs/providers/cloudflare.svg"]],["namesilo",["Namesilo","/imgs/providers/namesilo.svg"]],["godaddy",["GoDaddy","/imgs/providers/godaddy.svg"]],["qiniu",["七牛云","/imgs/providers/qiniu.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.svg"]],["webhook",["Webhook","/imgs/providers/webhook.svg"]],["local",["本地部署","/imgs/providers/local.svg"]]]),Ew=e=>mo.get(e),Ls=ce.union([ce.literal("aliyun"),ce.literal("tencent"),ce.literal("ssh"),ce.literal("webhook"),ce.literal("cloudflare"),ce.literal("qiniu"),ce.literal("namesilo"),ce.literal("godaddy"),ce.literal("local")],{message:"请选择云服务商"}),Fs=e=>{switch(e){case"aliyun":case"tencent":return"all";case"ssh":case"webhook":case"qiniu":case"local":return"deploy";case"cloudflare":case"namesilo":case"godaddy":return"apply";default:return"all"}},IU=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Ar(),s=ce.object({id:ce.string().optional(),name:ce.string().min(1).max(64),configType:Ls,secretId:ce.string().min(1).max(64),secretKey:ce.string().min(1).max(64)});let o={secretId:"",secretKey:""};e&&(o=e.config);const i=fr({resolver:hr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"tencent",secretId:o.secretId,secretKey:o.secretKey}}),l=async c=>{const u={id:c.id,name:c.name,configType:c.configType,usage:Fs(c.configType),config:{secretId:c.secretId,secretKey:c.secretKey}};try{const d=await Ms(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,c.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,v])=>{i.setError(m,{type:"manual",message:v.message})})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(pr,{...i,children:a.jsxs("form",{onSubmit:c=>{c.stopPropagation(),i.handleSubmit(l)(c)},className:"space-y-8",children:[a.jsx(Se,{control:i.control,name:"name",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"名称"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入授权名称",...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"id",render:({field:c})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"configType",render:({field:c})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"secretId",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"SecretId"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入SecretId",...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"secretKey",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"SecretKey"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入SecretKey",...c})}),a.jsx(ge,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(He,{type:"submit",children:"保存"})})]})})})})},LU=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Ar(),s=ce.object({id:ce.string().optional(),name:ce.string().min(1).max(64),configType:Ls,accessKeyId:ce.string().min(1).max(64),accessSecretId:ce.string().min(1).max(64)});let o={accessKeyId:"",accessKeySecret:""};e&&(o=e.config);const i=fr({resolver:hr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"aliyun",accessKeyId:o.accessKeyId,accessSecretId:o.accessKeySecret}}),l=async c=>{const u={id:c.id,name:c.name,configType:c.configType,usage:Fs(c.configType),config:{accessKeyId:c.accessKeyId,accessKeySecret:c.accessSecretId}};try{const d=await Ms(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,c.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,v])=>{i.setError(m,{type:"manual",message:v.message})});return}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(pr,{...i,children:a.jsxs("form",{onSubmit:c=>{c.stopPropagation(),i.handleSubmit(l)(c)},className:"space-y-8",children:[a.jsx(Se,{control:i.control,name:"name",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"名称"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入授权名称",...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"id",render:({field:c})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"configType",render:({field:c})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"accessKeyId",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"AccessKeyId"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入AccessKeyId",...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"accessSecretId",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"AccessKeySecret"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入AccessKeySecret",...c})}),a.jsx(ge,{})]})}),a.jsx(ge,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(He,{type:"submit",children:"保存"})})]})})})})},Sa=g.forwardRef(({className:e,...t},r)=>a.jsx("textarea",{className:oe("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));Sa.displayName="Textarea";const Ey=({className:e,trigger:t})=>{const{reloadAccessGroups:r}=Ar(),[n,s]=g.useState(!1),o=ce.object({name:ce.string().min(1).max(64)}),i=fr({resolver:hr(o),defaultValues:{name:""}}),l=async c=>{try{await $3({name:c.name}),r(),s(!1)}catch(u){Object.entries(u.response.data).forEach(([f,m])=>{i.setError(f,{type:"manual",message:m.message})})}};return a.jsxs(_y,{onOpenChange:s,open:n,children:[a.jsx(by,{asChild:!0,className:oe(e),children:t}),a.jsxs(th,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[a.jsx(rh,{children:a.jsx(nh,{children:"添加分组"})}),a.jsx("div",{className:"container py-3",children:a.jsx(pr,{...i,children:a.jsxs("form",{onSubmit:c=>{console.log(c),c.stopPropagation(),i.handleSubmit(l)(c)},className:"space-y-8",children:[a.jsx(Se,{control:i.control,name:"name",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"组名"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入组名",...c,type:"text"})}),a.jsx(ge,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(He,{type:"submit",children:"保存"})})]})})})]})]})},FU=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n,reloadAccessGroups:s,config:{accessGroups:o}}=Ar(),i=g.useRef(null),[l,c]=g.useState(""),u=e&&e.group?e.group:"",d=/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,f=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,m=ce.object({id:ce.string().optional(),name:ce.string().min(1).max(64),configType:Ls,host:ce.string().refine(h=>f.test(h)||d.test(h),{message:"请输入正确的域名或IP"}),group:ce.string().optional(),port:ce.string().min(1).max(5),username:ce.string().min(1).max(64),password:ce.string().min(0).max(64),key:ce.string().min(0).max(20480),keyFile:ce.any().optional(),command:ce.string().min(1).max(2048),certPath:ce.string().min(0).max(2048),keyPath:ce.string().min(0).max(2048)});let v={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:"",command:"sudo service nginx restart",certPath:"/etc/nginx/ssl/certificate.crt",keyPath:"/etc/nginx/ssl/private.key"};e&&(v=e.config);const x=fr({resolver:hr(m),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"ssh",group:e==null?void 0:e.group,host:v.host,port:v.port,username:v.username,password:v.password,key:v.key,keyFile:v.keyFile,certPath:v.certPath,keyPath:v.keyPath,command:v.command}}),y=async h=>{console.log(h);let w=h.group;w=="emptyId"&&(w="");const C={id:h.id,name:h.name,configType:h.configType,usage:Fs(h.configType),group:w,config:{host:h.host,port:h.port,username:h.username,password:h.password,key:h.key,command:h.command,certPath:h.certPath,keyPath:h.keyPath}};try{const j=await Ms(C);t(),C.id=j.id,C.created=j.created,C.updated=j.updated,h.id?n(C):r(C),w!=u&&(u&&await dw({id:u,"access-":C.id}),w&&await dw({id:w,"access+":C.id})),s()}catch(j){Object.entries(j.response.data).forEach(([R,P])=>{x.setError(R,{type:"manual",message:P.message})});return}},_=async h=>{var E;const w=(E=h.target.files)==null?void 0:E[0];if(!w)return;const C=w;c(C.name);const j=await fz(C);x.setValue("key",j)},p=()=>{var h;console.log(i.current),(h=i.current)==null||h.click()};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(pr,{...x,children:a.jsxs("form",{onSubmit:h=>{h.stopPropagation(),x.handleSubmit(y)(h)},className:"space-y-3",children:[a.jsx(Se,{control:x.control,name:"name",render:({field:h})=>a.jsxs(we,{children:[a.jsx(_e,{children:"名称"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入授权名称",...h})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:x.control,name:"group",render:({field:h})=>a.jsxs(we,{children:[a.jsxs(_e,{className:"w-full flex justify-between",children:[a.jsx("div",{children:"授权配置组(用于将一个域名证书部署到多个 ssh 主机)"}),a.jsx(Ey,{trigger:a.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[a.jsx(Uu,{size:14}),"新增"]})})]}),a.jsx(be,{children:a.jsxs(Io,{...h,value:h.value,defaultValue:"emptyId",onValueChange:w=>{x.setValue("group",w)},children:[a.jsx(Qs,{children:a.jsx(Lo,{placeholder:"请选择分组"})}),a.jsxs(Js,{children:[a.jsx(pn,{value:"emptyId",children:a.jsx("div",{className:oe("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),o.map(w=>a.jsx(pn,{value:w.id?w.id:"",children:a.jsx("div",{className:oe("flex items-center space-x-2 rounded cursor-pointer"),children:w.name})},w.id))]})]})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:x.control,name:"id",render:({field:h})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...h})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:x.control,name:"configType",render:({field:h})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...h})}),a.jsx(ge,{})]})}),a.jsxs("div",{className:"flex space-x-2",children:[a.jsx(Se,{control:x.control,name:"host",render:({field:h})=>a.jsxs(we,{className:"grow",children:[a.jsx(_e,{children:"服务器HOST"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入Host",...h})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:x.control,name:"port",render:({field:h})=>a.jsxs(we,{children:[a.jsx(_e,{children:"SSH端口"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入Port",...h,type:"number"})}),a.jsx(ge,{})]})})]}),a.jsx(Se,{control:x.control,name:"username",render:({field:h})=>a.jsxs(we,{children:[a.jsx(_e,{children:"用户名"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入用户名",...h})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:x.control,name:"password",render:({field:h})=>a.jsxs(we,{children:[a.jsx(_e,{children:"密码"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入密码",...h,type:"password"})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:x.control,name:"key",render:({field:h})=>a.jsxs(we,{hidden:!0,children:[a.jsx(_e,{children:"Key使用证书登录"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入Key",...h})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:x.control,name:"keyFile",render:({field:h})=>a.jsxs(we,{children:[a.jsx(_e,{children:"Key使用证书登录"}),a.jsx(be,{children:a.jsxs("div",{children:[a.jsx(He,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:p,children:l||"请选择文件"}),a.jsx(Ne,{placeholder:"请输入Key",...h,ref:i,className:"hidden",hidden:!0,type:"file",onChange:_})]})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:x.control,name:"certPath",render:({field:h})=>a.jsxs(we,{children:[a.jsx(_e,{children:"证书上传路径"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入证书上传路径",...h})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:x.control,name:"keyPath",render:({field:h})=>a.jsxs(we,{children:[a.jsx(_e,{children:"私钥上传路径"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入私钥上传路径",...h})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:x.control,name:"command",render:({field:h})=>a.jsxs(we,{children:[a.jsx(_e,{children:"Command"}),a.jsx(be,{children:a.jsx(Sa,{placeholder:"请输入要执行的命令",...h})}),a.jsx(ge,{})]})}),a.jsx(ge,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(He,{type:"submit",children:"保存"})})]})})})})},zU=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Ar(),s=ce.object({id:ce.string().optional(),name:ce.string().min(1).max(64),configType:Ls,url:ce.string().url()});let o={url:""};e&&(o=e.config);const i=fr({resolver:hr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"webhook",url:o.url}}),l=async c=>{console.log(c);const u={id:c.id,name:c.name,configType:c.configType,usage:Fs(c.configType),config:{url:c.url}};try{const d=await Ms(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,c.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,v])=>{i.setError(m,{type:"manual",message:v.message})})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(pr,{...i,children:a.jsxs("form",{onSubmit:c=>{console.log(c),c.stopPropagation(),i.handleSubmit(l)(c)},className:"space-y-8",children:[a.jsx(Se,{control:i.control,name:"name",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"名称"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入授权名称",...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"id",render:({field:c})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"configType",render:({field:c})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"url",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"Webhook Url"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入Webhook Url",...c})}),a.jsx(ge,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(He,{type:"submit",children:"保存"})})]})})})})},UU=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Ar(),s=ce.object({id:ce.string().optional(),name:ce.string().min(1).max(64),configType:Ls,dnsApiToken:ce.string().min(1).max(64)});let o={dnsApiToken:""};e&&(o=e.config);const i=fr({resolver:hr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"cloudflare",dnsApiToken:o.dnsApiToken}}),l=async c=>{console.log(c);const u={id:c.id,name:c.name,configType:c.configType,usage:Fs(c.configType),config:{dnsApiToken:c.dnsApiToken}};try{const d=await Ms(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,c.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,v])=>{i.setError(m,{type:"manual",message:v.message})})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(pr,{...i,children:a.jsxs("form",{onSubmit:c=>{console.log(c),c.stopPropagation(),i.handleSubmit(l)(c)},className:"space-y-8",children:[a.jsx(Se,{control:i.control,name:"name",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"名称"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入授权名称",...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"id",render:({field:c})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"configType",render:({field:c})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"dnsApiToken",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"CLOUD_DNS_API_TOKEN"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入CLOUD_DNS_API_TOKEN",...c})}),a.jsx(ge,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(He,{type:"submit",children:"保存"})})]})})})})},$U=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Ar(),s=ce.object({id:ce.string().optional(),name:ce.string().min(1).max(64),configType:Ls,accessKey:ce.string().min(1).max(64),secretKey:ce.string().min(1).max(64)});let o={accessKey:"",secretKey:""};e&&(o=e.config);const i=fr({resolver:hr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"qiniu",accessKey:o.accessKey,secretKey:o.secretKey}}),l=async c=>{const u={id:c.id,name:c.name,configType:c.configType,usage:Fs(c.configType),config:{accessKey:c.accessKey,secretKey:c.secretKey}};try{const d=await Ms(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,c.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,v])=>{i.setError(m,{type:"manual",message:v.message})});return}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(pr,{...i,children:a.jsxs("form",{onSubmit:c=>{c.stopPropagation(),i.handleSubmit(l)(c)},className:"space-y-8",children:[a.jsx(Se,{control:i.control,name:"name",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"名称"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入授权名称",...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"id",render:({field:c})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"configType",render:({field:c})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"accessKey",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"AccessKey"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入AccessKey",...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"secretKey",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"SecretKey"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入SecretKey",...c})}),a.jsx(ge,{})]})}),a.jsx(ge,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(He,{type:"submit",children:"保存"})})]})})})})},VU=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Ar(),s=ce.object({id:ce.string().optional(),name:ce.string().min(1).max(64),configType:Ls,apiKey:ce.string().min(1).max(64)});let o={apiKey:""};e&&(o=e.config);const i=fr({resolver:hr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"namesilo",apiKey:o.apiKey}}),l=async c=>{console.log(c);const u={id:c.id,name:c.name,configType:c.configType,usage:Fs(c.configType),config:{apiKey:c.apiKey}};try{const d=await Ms(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,c.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,v])=>{i.setError(m,{type:"manual",message:v.message})})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(pr,{...i,children:a.jsxs("form",{onSubmit:c=>{console.log(c),c.stopPropagation(),i.handleSubmit(l)(c)},className:"space-y-8",children:[a.jsx(Se,{control:i.control,name:"name",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"名称"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入授权名称",...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"id",render:({field:c})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"configType",render:({field:c})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"apiKey",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"NAMESILO_API_KEY"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入NAMESILO_API_KEY",...c})}),a.jsx(ge,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(He,{type:"submit",children:"保存"})})]})})})})},BU=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Ar(),s=ce.object({id:ce.string().optional(),name:ce.string().min(1).max(64),configType:Ls,apiKey:ce.string().min(1).max(64),apiSecret:ce.string().min(1).max(64)});let o={apiKey:"",apiSecret:""};e&&(o=e.config);const i=fr({resolver:hr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"godaddy",apiKey:o.apiKey,apiSecret:o.apiSecret}}),l=async c=>{console.log(c);const u={id:c.id,name:c.name,configType:c.configType,usage:Fs(c.configType),config:{apiKey:c.apiKey,apiSecret:c.apiSecret}};try{const d=await Ms(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,c.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,v])=>{i.setError(m,{type:"manual",message:v.message})})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(pr,{...i,children:a.jsxs("form",{onSubmit:c=>{console.log(c),c.stopPropagation(),i.handleSubmit(l)(c)},className:"space-y-8",children:[a.jsx(Se,{control:i.control,name:"name",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"名称"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入授权名称",...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"id",render:({field:c})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"configType",render:({field:c})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"apiKey",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"GODADDY_API_KEY"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入GODADDY_API_KEY",...c})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:i.control,name:"apiSecret",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"GODADDY_API_SECRET"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入GODADDY_API_SECRET",...c})}),a.jsx(ge,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(He,{type:"submit",children:"保存"})})]})})})})},WU=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n,reloadAccessGroups:s}=Ar(),o=ce.object({id:ce.string().optional(),name:ce.string().min(1).max(64),configType:Ls,command:ce.string().min(1).max(2048),certPath:ce.string().min(0).max(2048),keyPath:ce.string().min(0).max(2048)});let i={command:"sudo service nginx restart",certPath:"/etc/nginx/ssl/certificate.crt",keyPath:"/etc/nginx/ssl/private.key"};e&&(i=e.config);const l=fr({resolver:hr(o),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"local",certPath:i.certPath,keyPath:i.keyPath,command:i.command}}),c=async u=>{const d={id:u.id,name:u.name,configType:u.configType,usage:Fs(u.configType),config:{command:u.command,certPath:u.certPath,keyPath:u.keyPath}};try{const f=await Ms(d);t(),d.id=f.id,d.created=f.created,d.updated=f.updated,u.id?n(d):r(d),s()}catch(f){Object.entries(f.response.data).forEach(([v,x])=>{l.setError(v,{type:"manual",message:x.message})});return}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(pr,{...l,children:a.jsxs("form",{onSubmit:u=>{u.stopPropagation(),l.handleSubmit(c)(u)},className:"space-y-3",children:[a.jsx(Se,{control:l.control,name:"name",render:({field:u})=>a.jsxs(we,{children:[a.jsx(_e,{children:"名称"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入授权名称",...u})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:l.control,name:"id",render:({field:u})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...u})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:l.control,name:"configType",render:({field:u})=>a.jsxs(we,{className:"hidden",children:[a.jsx(_e,{children:"配置类型"}),a.jsx(be,{children:a.jsx(Ne,{...u})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:l.control,name:"certPath",render:({field:u})=>a.jsxs(we,{children:[a.jsx(_e,{children:"证书保存路径"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入证书上传路径",...u})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:l.control,name:"keyPath",render:({field:u})=>a.jsxs(we,{children:[a.jsx(_e,{children:"私钥保存路径"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入私钥上传路径",...u})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:l.control,name:"command",render:({field:u})=>a.jsxs(we,{children:[a.jsx(_e,{children:"Command"}),a.jsx(be,{children:a.jsx(Sa,{placeholder:"请输入要执行的命令",...u})}),a.jsx(ge,{})]})}),a.jsx(ge,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(He,{type:"submit",children:"保存"})})]})})})})};function Tl({trigger:e,op:t,data:r,className:n}){const[s,o]=g.useState(!1),i=Array.from(mo.keys()),[l,c]=g.useState((r==null?void 0:r.configType)||"");let u=a.jsx(a.Fragment,{children:" "});switch(l){case"tencent":u=a.jsx(IU,{data:r,onAfterReq:()=>{o(!1)}});break;case"aliyun":u=a.jsx(LU,{data:r,onAfterReq:()=>{o(!1)}});break;case"ssh":u=a.jsx(FU,{data:r,onAfterReq:()=>{o(!1)}});break;case"webhook":u=a.jsx(zU,{data:r,onAfterReq:()=>{o(!1)}});break;case"cloudflare":u=a.jsx(UU,{data:r,onAfterReq:()=>{o(!1)}});break;case"qiniu":u=a.jsx($U,{data:r,onAfterReq:()=>{o(!1)}});break;case"namesilo":u=a.jsx(VU,{data:r,onAfterReq:()=>{o(!1)}});break;case"godaddy":u=a.jsx(BU,{data:r,onAfterReq:()=>{o(!1)}});break;case"local":u=a.jsx(WU,{data:r,onAfterReq:()=>{o(!1)}});break}const d=f=>f==l?"border-primary":"";return a.jsxs(_y,{onOpenChange:o,open:s,children:[a.jsx(by,{asChild:!0,className:oe(n),children:e}),a.jsxs(th,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[a.jsx(rh,{children:a.jsxs(nh,{children:[t=="add"?"添加":"编辑","授权"]})}),a.jsx(ih,{className:"max-h-[80vh]",children:a.jsxs("div",{className:"container py-3",children:[a.jsx(Co,{children:"服务商"}),a.jsxs(Io,{onValueChange:f=>{console.log(f),c(f)},defaultValue:l,children:[a.jsx(Qs,{className:"mt-3",children:a.jsx(Lo,{placeholder:"请选择服务商"})}),a.jsx(Js,{children:a.jsxs(fl,{children:[a.jsx(Yi,{children:"服务商"}),i.map(f=>{var m,v;return a.jsx(pn,{value:f,children:a.jsxs("div",{className:oe("flex items-center space-x-2 rounded cursor-pointer",d(f)),children:[a.jsx("img",{src:(m=mo.get(f))==null?void 0:m[1],className:"h-6 w-6"}),a.jsx("div",{children:(v=mo.get(f))==null?void 0:v[0]})]})},f)})]})})]}),u]})})]})]})}const HU=({className:e,trigger:t})=>{const{config:{emails:r},setEmails:n}=Ar(),[s,o]=g.useState(!1),i=ce.object({email:ce.string().email()}),l=fr({resolver:hr(i),defaultValues:{email:""}}),c=async u=>{if(r.content.emails.includes(u.email)){l.setError("email",{message:"邮箱已存在"});return}const d=[...r.content.emails,u.email];try{const f=await Fa({...r,name:"emails",content:{emails:d}});n(f),l.reset(),l.clearErrors(),o(!1)}catch(f){Object.entries(f.response.data).forEach(([v,x])=>{l.setError(v,{type:"manual",message:x.message})})}};return a.jsxs(_y,{onOpenChange:o,open:s,children:[a.jsx(by,{asChild:!0,className:oe(e),children:t}),a.jsxs(th,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[a.jsx(rh,{children:a.jsx(nh,{children:"添加邮箱"})}),a.jsx("div",{className:"container py-3",children:a.jsx(pr,{...l,children:a.jsxs("form",{onSubmit:u=>{console.log(u),u.stopPropagation(),l.handleSubmit(c)(u)},className:"space-y-8",children:[a.jsx(Se,{control:l.control,name:"email",render:({field:u})=>a.jsxs(we,{children:[a.jsx(_e,{children:"邮箱"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入邮箱",...u,type:"email"})}),a.jsx(ge,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(He,{type:"submit",children:"保存"})})]})})})]})]})},YU=()=>{const{config:{accesses:e,emails:t,accessGroups:r}}=Ar(),[n,s]=g.useState(),o=Nn(),[i,l]=g.useState("base"),[c,u]=g.useState(n?n.targetType:"");g.useEffect(()=>{const p=new URLSearchParams(o.search).get("id");p&&(async()=>{const w=await vz(p);s(w),u(w.targetType)})()},[o.search]);const d=ce.object({id:ce.string().optional(),domain:ce.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:"请输入正确的域名"}),email:ce.string().email().optional(),access:ce.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择DNS服务商授权配置"}),targetAccess:ce.string().optional(),targetType:ce.string().regex(/^[a-zA-Z0-9-]+$/,{message:"请选择部署服务类型"}),variables:ce.string().optional(),group:ce.string().optional(),nameservers:ce.string().optional()}),f=fr({resolver:hr(d),defaultValues:{id:"",domain:"",email:"",access:"",targetAccess:"",targetType:"",variables:"",group:"",nameservers:""}});g.useEffect(()=>{n&&f.reset({id:n.id,domain:n.domain,email:n.email,access:n.access,targetAccess:n.targetAccess,targetType:n.targetType,variables:n.variables,group:n.group,nameservers:n.nameservers})},[n,f]);const m=e.filter(_=>{if(_.usage=="apply")return!1;if(c=="")return!0;const p=c.split("-");return _.configType===p[0]}),{toast:v}=Pn(),x=Pr(),y=async _=>{const p=_.group=="emptyId"?"":_.group,h=_.targetAccess==="emptyId"?"":_.targetAccess;if(p==""&&h==""){f.setError("group",{type:"manual",message:"部署授权和部署授权组至少选一个"}),f.setError("targetAccess",{type:"manual",message:"部署授权和部署授权组至少选一个"});return}const w={id:_.id,crontab:"0 0 * * *",domain:_.domain,email:_.email,access:_.access,group:p,targetAccess:h,targetType:_.targetType,variables:_.variables,nameservers:_.nameservers};try{await km(w);let C="域名编辑成功";w.id==""&&(C="域名添加成功"),v({title:"成功",description:C}),x("/domains")}catch(C){Object.entries(C.response.data).forEach(([E,R])=>{f.setError(E,{type:"manual",message:R.message})});return}};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"",children:[a.jsx(hy,{}),a.jsxs("div",{className:" h-5 text-muted-foreground",children:[n!=null&&n.id?"编辑":"新增","域名"]}),a.jsxs("div",{className:"mt-5 flex w-full justify-center md:space-x-10 flex-col md:flex-row",children:[a.jsxs("div",{className:"w-full md:w-[200px] text-muted-foreground space-x-3 md:space-y-3 flex-row md:flex-col flex",children:[a.jsx("div",{className:oe("cursor-pointer text-right",i==="base"?"text-primary":""),onClick:()=>{l("base")},children:"基础设置"}),a.jsx("div",{className:oe("cursor-pointer text-right",i==="advance"?"text-primary":""),onClick:()=>{l("advance")},children:"高级设置"})]}),a.jsx("div",{className:"w-full md:w-[35em] bg-gray-100 dark:bg-gray-900 p-5 rounded mt-3 md:mt-0",children:a.jsx(pr,{...f,children:a.jsxs("form",{onSubmit:f.handleSubmit(y),className:"space-y-8 dark:text-stone-200",children:[a.jsx(Se,{control:f.control,name:"domain",render:({field:_})=>a.jsxs(we,{hidden:i!="base",children:[a.jsx(_e,{children:"域名"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入域名",..._})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:f.control,name:"email",render:({field:_})=>a.jsxs(we,{hidden:i!="base",children:[a.jsxs(_e,{className:"flex w-full justify-between",children:[a.jsx("div",{children:"Email申请证书需要提供邮箱"}),a.jsx(HU,{trigger:a.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[a.jsx(Uu,{size:14}),"新增"]})})]}),a.jsx(be,{children:a.jsxs(Io,{..._,value:_.value,onValueChange:p=>{f.setValue("email",p)},children:[a.jsx(Qs,{children:a.jsx(Lo,{placeholder:"请选择邮箱"})}),a.jsx(Js,{children:a.jsxs(fl,{children:[a.jsx(Yi,{children:"邮箱列表"}),t.content.emails.map(p=>a.jsx(pn,{value:p,children:a.jsx("div",{children:p})},p))]})})]})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:f.control,name:"access",render:({field:_})=>a.jsxs(we,{hidden:i!="base",children:[a.jsxs(_e,{className:"flex w-full justify-between",children:[a.jsx("div",{children:"DNS 服务商授权配置"}),a.jsx(Tl,{trigger:a.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[a.jsx(Uu,{size:14}),"新增"]}),op:"add"})]}),a.jsx(be,{children:a.jsxs(Io,{..._,value:_.value,onValueChange:p=>{f.setValue("access",p)},children:[a.jsx(Qs,{children:a.jsx(Lo,{placeholder:"请选择授权配置"})}),a.jsx(Js,{children:a.jsxs(fl,{children:[a.jsx(Yi,{children:"服务商授权配置"}),e.filter(p=>p.usage!="deploy").map(p=>{var h;return a.jsx(pn,{value:p.id,children:a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("img",{className:"w-6",src:(h=mo.get(p.configType))==null?void 0:h[1]}),a.jsx("div",{children:p.name})]})},p.id)})]})})]})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:f.control,name:"targetType",render:({field:_})=>a.jsxs(we,{hidden:i!="base",children:[a.jsx(_e,{children:"部署服务类型"}),a.jsx(be,{children:a.jsxs(Io,{..._,onValueChange:p=>{u(p),f.setValue("targetType",p)},children:[a.jsx(Qs,{children:a.jsx(Lo,{placeholder:"请选择部署服务类型"})}),a.jsx(Js,{children:a.jsxs(fl,{children:[a.jsx(Yi,{children:"部署服务类型"}),wU.map(p=>{var h,w;return a.jsx(pn,{value:p,children:a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("img",{className:"w-6",src:(h=Mm.get(p))==null?void 0:h[1]}),a.jsx("div",{children:(w=Mm.get(p))==null?void 0:w[0]})]})},p)})]})})]})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:f.control,name:"targetAccess",render:({field:_})=>a.jsxs(we,{hidden:i!="base",children:[a.jsxs(_e,{className:"w-full flex justify-between",children:[a.jsx("div",{children:"部署服务商授权配置"}),a.jsx(Tl,{trigger:a.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[a.jsx(Uu,{size:14}),"新增"]}),op:"add"})]}),a.jsx(be,{children:a.jsxs(Io,{..._,onValueChange:p=>{f.setValue("targetAccess",p)},children:[a.jsx(Qs,{children:a.jsx(Lo,{placeholder:"请选择授权配置"})}),a.jsx(Js,{children:a.jsxs(fl,{children:[a.jsxs(Yi,{children:["服务商授权配置",f.getValues().targetAccess]}),a.jsx(pn,{value:"emptyId",children:a.jsx("div",{className:"flex items-center space-x-2",children:"--"})}),m.map(p=>{var h;return a.jsx(pn,{value:p.id,children:a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("img",{className:"w-6",src:(h=mo.get(p.configType))==null?void 0:h[1]}),a.jsx("div",{children:p.name})]})},p.id)})]})})]})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:f.control,name:"group",render:({field:_})=>a.jsxs(we,{hidden:i!="advance"||c!="ssh",children:[a.jsx(_e,{className:"w-full flex justify-between",children:a.jsx("div",{children:"部署配置组(用于将一个域名证书部署到多个 ssh 主机)"})}),a.jsx(be,{children:a.jsxs(Io,{..._,value:_.value,defaultValue:"emptyId",onValueChange:p=>{f.setValue("group",p)},children:[a.jsx(Qs,{children:a.jsx(Lo,{placeholder:"请选择分组"})}),a.jsxs(Js,{children:[a.jsx(pn,{value:"emptyId",children:a.jsx("div",{className:oe("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),r.filter(p=>{var h;return p.expand&&((h=p.expand)==null?void 0:h.access.length)>0}).map(p=>a.jsx(pn,{value:p.id?p.id:"",children:a.jsx("div",{className:oe("flex items-center space-x-2 rounded cursor-pointer"),children:p.name})},p.id))]})]})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:f.control,name:"variables",render:({field:_})=>a.jsxs(we,{hidden:i!="advance",children:[a.jsx(_e,{children:"变量"}),a.jsx(be,{children:a.jsx(Sa,{placeholder:`可在SSH部署中使用,形如:
key=val;
key2=val2;`,..._,className:"placeholder:whitespace-pre-wrap"})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:f.control,name:"nameservers",render:({field:_})=>a.jsxs(we,{hidden:i!="advance",children:[a.jsx(_e,{children:"域名服务器"}),a.jsx(be,{children:a.jsx(Sa,{placeholder:`自定义域名服务器,多个用分号隔开,如:
8.8.8.8;
8.8.4.4;`,..._,className:"placeholder:whitespace-pre-wrap"})}),a.jsx(ge,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(He,{type:"submit",children:"保存"})})]})})})]})]})})},sN=g.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:oe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));sN.displayName="Card";const oN=g.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:oe("flex flex-col space-y-1.5 p-6",e),...t}));oN.displayName="CardHeader";const iN=g.forwardRef(({className:e,...t},r)=>a.jsx("h3",{ref:r,className:oe("text-2xl font-semibold leading-none tracking-tight",e),...t}));iN.displayName="CardTitle";const aN=g.forwardRef(({className:e,...t},r)=>a.jsx("p",{ref:r,className:oe("text-sm text-muted-foreground",e),...t}));aN.displayName="CardDescription";const lN=g.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:oe("p-6 pt-0",e),...t}));lN.displayName="CardContent";const cN=g.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:oe("flex items-center p-6 pt-0",e),...t}));cN.displayName="CardFooter";const Es=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",KU=()=>{const{config:{accessGroups:e},reloadAccessGroups:t}=Ar(),{toast:r}=Pn(),n=Pr(),s=async i=>{try{await U3(i),t()}catch(l){r({title:"删除失败",description:Es(l),variant:"destructive"});return}},o=()=>{n("/access")};return a.jsxs("div",{className:"mt-10",children:[a.jsx(ia,{when:e.length==0,children:a.jsx(a.Fragment,{children:a.jsxs("div",{className:"flex flex-col items-center mt-10",children:[a.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:a.jsx(C0,{size:40,className:"text-primary"})}),a.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),a.jsx(Ey,{trigger:a.jsx(He,{children:"新增授权组"}),className:"mt-3"})]})})}),a.jsx(ih,{className:"h-[75vh] overflow-hidden",children:a.jsx("div",{className:"flex gap-5 flex-wrap",children:e.map(i=>a.jsxs(sN,{className:"w-full md:w-[350px]",children:[a.jsxs(oN,{children:[a.jsx(iN,{children:i.name}),a.jsxs(aN,{children:["共有",i.expand?i.expand.access.length:0,"个部署授权配置"]})]}),a.jsx(lN,{className:"min-h-[180px]",children:i.expand?a.jsx(a.Fragment,{children:i.expand.access.slice(0,3).map(l=>a.jsx("div",{className:"flex flex-col mb-3",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"",children:a.jsx("img",{src:Ew(l.configType)[1],alt:"provider",className:"w-8 h-8"})}),a.jsxs("div",{className:"ml-3",children:[a.jsx("div",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:l.name}),a.jsx("div",{className:"text-xs text-muted-foreground",children:Ew(l.configType)[0]})]})]})},l.id))}):a.jsx(a.Fragment,{children:a.jsxs("div",{className:"flex text-gray-700 dark:text-gray-200 items-center",children:[a.jsx("div",{children:a.jsx(C0,{size:40})}),a.jsx("div",{className:"ml-2",children:"暂无部署授权配置,请添加后开始使用吧"})]})})}),a.jsx(cN,{children:a.jsxs("div",{className:"flex justify-end w-full",children:[a.jsx(ia,{when:!!(i.expand&&i.expand.access.length>0),children:a.jsx("div",{children:a.jsx(He,{size:"sm",variant:"link",onClick:()=>{n(`/access?accessGroupId=${i.id}&tab=access`,{replace:!0})},children:"所有授权"})})}),a.jsx(ia,{when:!i.expand||i.expand.access.length==0,children:a.jsx("div",{children:a.jsx(He,{size:"sm",onClick:o,children:"新增授权"})})}),a.jsx("div",{className:"ml-3",children:a.jsxs(GC,{children:[a.jsx(ZC,{asChild:!0,children:a.jsx(He,{variant:"destructive",size:"sm",children:"删除"})}),a.jsxs(ty,{children:[a.jsxs(ry,{children:[a.jsx(sy,{className:"dark:text-gray-200",children:"删除组"}),a.jsx(oy,{children:"确定要删除部署授权组吗?"})]}),a.jsxs(ny,{children:[a.jsx(ay,{className:"dark:text-gray-200",children:"取消"}),a.jsx(iy,{onClick:()=>{s(i.id?i.id:"")},children:"确认"})]})]})]})})]})})]}))})})]})};var Ny="Tabs",[GU,iV]=sr(Ny,[Oa]),uN=Oa(),[ZU,Ty]=GU(Ny),dN=g.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:o,orientation:i="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=di(l),[f,m]=Yr({prop:n,onChange:s,defaultProp:o});return a.jsx(ZU,{scope:r,baseId:$r(),value:f,onValueChange:m,orientation:i,dir:d,activationMode:c,children:a.jsx(Re.div,{dir:d,"data-orientation":i,...u,ref:t})})});dN.displayName=Ny;var fN="TabsList",hN=g.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...s}=e,o=Ty(fN,r),i=uN(r);return a.jsx(nv,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:n,children:a.jsx(Re.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});hN.displayName=fN;var pN="TabsTrigger",mN=g.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...o}=e,i=Ty(pN,r),l=uN(r),c=yN(i.baseId,n),u=xN(i.baseId,n),d=n===i.value;return a.jsx(sv,{asChild:!0,...l,focusable:!s,active:d,children:a.jsx(Re.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...o,ref:t,onMouseDown:ue(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?i.onValueChange(n):f.preventDefault()}),onKeyDown:ue(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(n)}),onFocus:ue(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!s&&f&&i.onValueChange(n)})})})});mN.displayName=pN;var gN="TabsContent",vN=g.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:s,children:o,...i}=e,l=Ty(gN,r),c=yN(l.baseId,n),u=xN(l.baseId,n),d=n===l.value,f=g.useRef(d);return g.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),a.jsx(or,{present:s||d,children:({present:m})=>a.jsx(Re.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!m,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&o})})});vN.displayName=gN;function yN(e,t){return`${e}-trigger-${t}`}function xN(e,t){return`${e}-content-${t}`}var qU=dN,wN=hN,_N=mN,bN=vN;const SN=qU,Ry=g.forwardRef(({className:e,...t},r)=>a.jsx(wN,{ref:r,className:oe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Ry.displayName=wN.displayName;const Yo=g.forwardRef(({className:e,...t},r)=>a.jsx(_N,{ref:r,className:oe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Yo.displayName=_N.displayName;const qd=g.forwardRef(({className:e,...t},r)=>a.jsx(bN,{ref:r,className:oe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));qd.displayName=bN.displayName;const XU=()=>{const{config:e,deleteAccess:t}=Ar(),{accesses:r}=e,n=10,s=Math.ceil(r.length/n),o=Pr(),i=Nn(),l=new URLSearchParams(i.search),c=l.get("page"),u=c?Number(c):1,d=l.get("tab"),f=l.get("accessGroupId"),m=(u-1)*n,v=m+n,x=async _=>{const p=await z3(_);t(p.id)},y=_=>{l.set("tab",_),o({search:l.toString()})};return a.jsxs("div",{className:"",children:[a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("div",{className:"text-muted-foreground",children:"授权管理"}),d!="access_group"?a.jsx(Tl,{trigger:a.jsx(He,{children:"添加授权"}),op:"add"}):a.jsx(Ey,{trigger:a.jsx(He,{children:"添加授权组"})})]}),a.jsxs(SN,{defaultValue:d||"access",value:d||"access",className:"w-full mt-5",children:[a.jsxs(Ry,{className:"space-x-5 px-3",children:[a.jsx(Yo,{value:"access",onClick:()=>{y("access")},children:"授权管理"}),a.jsx(Yo,{value:"access_group",onClick:()=>{y("access_group")},children:"授权组管理"})]}),a.jsx(qd,{value:"access",children:r.length===0?a.jsxs("div",{className:"flex flex-col items-center mt-10",children:[a.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:a.jsx(RA,{size:40,className:"text-primary"})}),a.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加授权开始部署证书吧。"}),a.jsx(Tl,{trigger:a.jsx(He,{children:"添加授权"}),op:"add",className:"mt-3"})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[a.jsx("div",{className:"w-48",children:"名称"}),a.jsx("div",{className:"w-48",children:"服务商"}),a.jsx("div",{className:"w-52",children:"创建时间"}),a.jsx("div",{className:"w-52",children:"更新时间"}),a.jsx("div",{className:"grow",children:"操作"})]}),a.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"授权列表"}),r.filter(_=>f?_.group==f:!0).slice(m,v).map(_=>{var p,h;return a.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[a.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:_.name}),a.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[a.jsx("img",{src:(p=mo.get(_.configType))==null?void 0:p[1],className:"w-6"}),a.jsx("div",{children:(h=mo.get(_.configType))==null?void 0:h[0]})]}),a.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["创建于"," ",_.created&&ya(_.created)]}),a.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["更新于"," ",_.updated&&ya(_.updated)]}),a.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[a.jsx(Tl,{trigger:a.jsx(He,{variant:"link",className:"p-0",children:"编辑"}),op:"edit",data:_}),a.jsx(Bt,{orientation:"vertical",className:"h-4 mx-2"}),a.jsx(He,{variant:"link",className:"p-0",onClick:()=>{x(_)},children:"删除"})]})]},_.id)}),a.jsx(NC,{totalPages:s,currentPage:u,onPageChange:_=>{l.set("page",_.toString()),o({search:l.toString()})}})]})}),a.jsx(qd,{value:"access_group",children:a.jsx(KU,{})})]})]})},QU=Sc("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Py=g.forwardRef(({className:e,variant:t,...r},n)=>a.jsx("div",{ref:n,role:"alert",className:oe(QU({variant:t}),e),...r}));Py.displayName="Alert";const Ay=g.forwardRef(({className:e,...t},r)=>a.jsx("h5",{ref:r,className:oe("mb-1 font-medium leading-none tracking-tight",e),...t}));Ay.displayName="AlertTitle";const Dy=g.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:oe("text-sm [&_p]:leading-relaxed",e),...t}));Dy.displayName="AlertDescription";const kN=async e=>{let t=1;e.page&&(t=e.page);let r=50;e.perPage&&(r=e.perPage);let n="domain!=null";return e.domain&&(n=`domain="${e.domain}"`),await st().collection("deployments").getList(t,r,{filter:n,sort:"-deployedAt",expand:"domain"})},JU=()=>{const e=Pr(),[t,r]=g.useState(),[n]=vA(),s=n.get("domain");return g.useEffect(()=>{(async()=>{const i={};s&&(i.domain=s);const l=await kN(i);r(l.items)})()},[s]),a.jsxs(ih,{className:"h-[80vh] overflow-hidden",children:[a.jsx("div",{className:"text-muted-foreground",children:"部署历史"}),t!=null&&t.length?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[a.jsx("div",{className:"w-48",children:"域名"}),a.jsx("div",{className:"w-24",children:"状态"}),a.jsx("div",{className:"w-56",children:"阶段"}),a.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),a.jsx("div",{className:"grow",children:"操作"})]}),a.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),t==null?void 0:t.map(o=>{var i,l;return a.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[a.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(i=o.expand.domain)==null?void 0:i.domain}),a.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:a.jsx(ey,{deployment:o})}),a.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:a.jsx(qv,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),a.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:ya(o.deployedAt)}),a.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:a.jsxs(bv,{children:[a.jsx(Sv,{asChild:!0,children:a.jsx(He,{variant:"link",className:"p-0",children:"日志"})}),a.jsxs(Rf,{className:"sm:max-w-5xl",children:[a.jsx(kv,{children:a.jsxs(Cv,{children:[(l=o.expand.domain)==null?void 0:l.domain,"-",o.id,"部署详情"]})}),a.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&a.jsx(a.Fragment,{children:o.log.check.map(c=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",c.time,"]"]}),a.jsx("div",{className:"ml-2",children:c.message})]}),c.error&&a.jsx("div",{className:"mt-1 text-red-600",children:c.error})]}))}),o.log.apply&&a.jsx(a.Fragment,{children:o.log.apply.map(c=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",c.time,"]"]}),a.jsx("div",{className:"ml-2",children:c.message})]}),c.info&&c.info.map(u=>a.jsx("div",{className:"mt-1 text-green-600",children:u})),c.error&&a.jsx("div",{className:"mt-1 text-red-600",children:c.error})]}))}),o.log.deploy&&a.jsx(a.Fragment,{children:o.log.deploy.map(c=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",c.time,"]"]}),a.jsx("div",{className:"ml-2",children:c.message})]}),c.error&&a.jsx("div",{className:"mt-1 text-red-600",children:c.error})]}))})]})]})]})})]},o.id)})]}):a.jsx(a.Fragment,{children:a.jsxs(Py,{className:"max-w-[40em] mx-auto mt-20",children:[a.jsx(Ay,{children:"暂无数据"}),a.jsxs(Dy,{children:[a.jsxs("div",{className:"flex items-center mt-5",children:[a.jsx("div",{children:a.jsx(ub,{className:"text-yellow-400",size:36})}),a.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),a.jsx("div",{className:"mt-2 flex justify-end",children:a.jsx(He,{onClick:()=>{e("/")},children:"添加域名"})})]})]})})]})},e$=ce.object({username:ce.string().email({message:"请输入正确的邮箱地址"}),password:ce.string().min(10,{message:"密码至少10个字符"})}),t$=()=>{const e=fr({resolver:hr(e$),defaultValues:{username:"",password:""}}),t=async n=>{try{await st().admins.authWithPassword(n.username,n.password),r("/")}catch(s){const o=Es(s);e.setError("username",{message:o}),e.setError("password",{message:o})}},r=Pr();return a.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[a.jsx("div",{className:"flex justify-center mb-10",children:a.jsx("img",{src:"/vite.svg",className:"w-16"})}),a.jsx(pr,{...e,children:a.jsxs("form",{onSubmit:e.handleSubmit(t),className:"space-y-8 dark:text-stone-200",children:[a.jsx(Se,{control:e.control,name:"username",render:({field:n})=>a.jsxs(we,{children:[a.jsx(_e,{children:"用户名"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"email",...n})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:e.control,name:"password",render:({field:n})=>a.jsxs(we,{children:[a.jsx(_e,{children:"密码"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"password",...n,type:"password"})}),a.jsx(ge,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(He,{type:"submit",children:"登录"})})]})})]})},r$=()=>st().authStore.isValid&&st().authStore.isAdmin?a.jsx(ib,{to:"/"}):a.jsxs("div",{className:"container",children:[a.jsx(Lg,{}),a.jsx(pC,{})]}),n$=ce.object({oldPassword:ce.string().min(10,{message:"密码至少10个字符"}),newPassword:ce.string().min(10,{message:"密码至少10个字符"}),confirmPassword:ce.string().min(10,{message:"密码至少10个字符"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"两次密码不一致",path:["confirmPassword"]}),s$=()=>{const{toast:e}=Pn(),t=Pr(),r=fr({resolver:hr(n$),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),n=async s=>{var o,i;try{await st().admins.authWithPassword((o=st().authStore.model)==null?void 0:o.email,s.oldPassword)}catch(l){const c=Es(l);r.setError("oldPassword",{message:c})}try{await st().admins.update((i=st().authStore.model)==null?void 0:i.id,{password:s.newPassword,passwordConfirm:s.confirmPassword}),st().authStore.clear(),e({title:"修改密码成功",description:"请重新登录"}),setTimeout(()=>{t("/login")},500)}catch(l){const c=Es(l);e({title:"修改密码失败",description:c,variant:"destructive"})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"w-full md:max-w-[35em]",children:a.jsx(pr,{...r,children:a.jsxs("form",{onSubmit:r.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[a.jsx(Se,{control:r.control,name:"oldPassword",render:({field:s})=>a.jsxs(we,{children:[a.jsx(_e,{children:"当前密码"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"当前密码",...s,type:"password"})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:r.control,name:"newPassword",render:({field:s})=>a.jsxs(we,{children:[a.jsx(_e,{children:"新密码"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"newPassword",...s,type:"password"})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:r.control,name:"confirmPassword",render:({field:s})=>a.jsxs(we,{children:[a.jsx(_e,{children:"确认密码"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"confirmPassword",...s,type:"password"})}),a.jsx(ge,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(He,{type:"submit",children:"确认修改"})})]})})})})},o$=()=>{const e=Nn(),[t,r]=g.useState("account"),n=Pr();return g.useEffect(()=>{const o=e.pathname.split("/")[2];r(o)},[e]),a.jsxs("div",{children:[a.jsx(hy,{}),a.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:"偏好设置"}),a.jsx("div",{className:"w-full mt-5 p-0 md:p-3 flex justify-center",children:a.jsxs(SN,{defaultValue:"account",className:"w-full",value:t,children:[a.jsxs(Ry,{className:"mx-auto",children:[a.jsxs(Yo,{value:"account",onClick:()=>{n("/setting/account")},className:"px-5",children:[a.jsx(FA,{size:14}),a.jsx("div",{className:"ml-1",children:"账户"})]}),a.jsxs(Yo,{value:"password",onClick:()=>{n("/setting/password")},className:"px-5",children:[a.jsx(TA,{size:14}),a.jsx("div",{className:"ml-1",children:"密码"})]}),a.jsxs(Yo,{value:"notify",onClick:()=>{n("/setting/notify")},className:"px-5",children:[a.jsx(AA,{size:14}),a.jsx("div",{className:"ml-1",children:"消息推送"})]}),a.jsxs(Yo,{value:"ssl-provider",onClick:()=>{n("/setting/ssl-provider")},className:"px-5",children:[a.jsx(MA,{size:14}),a.jsx("div",{className:"ml-1",children:"证书厂商"})]})]}),a.jsx(qd,{value:t,children:a.jsx("div",{className:"mt-5 w-full md:w-[45em]",children:a.jsx(Lg,{})})})]})})]})},i$=()=>{const[e,t]=g.useState(),[r,n]=g.useState(),s=Pr();return g.useEffect(()=>{(async()=>{const i=await gz();t(i)})()},[]),g.useEffect(()=>{(async()=>{const l=await kN({perPage:8});n(l.items)})()},[]),a.jsxs("div",{className:"flex flex-col",children:[a.jsx("div",{className:"flex justify-between items-center",children:a.jsx("div",{className:"text-muted-foreground",children:"控制面板"})}),a.jsxs("div",{className:"flex mt-10 gap-5 flex-col flex-wrap md:flex-row",children:[a.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[a.jsx("div",{className:"p-3",children:a.jsx(IA,{size:48,strokeWidth:1,className:"text-blue-400"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-muted-foreground font-semibold",children:"所有"}),a.jsxs("div",{className:"flex items-baseline",children:[a.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.total?a.jsx(gr,{to:"/domains",className:"hover:underline",children:e==null?void 0:e.total}):0}),a.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),a.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[a.jsx("div",{className:"p-3",children:a.jsx(SA,{size:48,strokeWidth:1,className:"text-red-400"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-muted-foreground font-semibold",children:"即将过期"}),a.jsxs("div",{className:"flex items-baseline",children:[a.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.expired?a.jsx(gr,{to:"/domains?state=expired",className:"hover:underline",children:e==null?void 0:e.expired}):0}),a.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),a.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[a.jsx("div",{className:"p-3",children:a.jsx(PA,{size:48,strokeWidth:1,className:"text-green-400"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-muted-foreground font-semibold",children:"启用中"}),a.jsxs("div",{className:"flex items-baseline",children:[a.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.enabled?a.jsx(gr,{to:"/domains?state=enabled",className:"hover:underline",children:e==null?void 0:e.enabled}):0}),a.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),a.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[a.jsx("div",{className:"p-3",children:a.jsx(_A,{size:48,strokeWidth:1,className:"text-gray-400"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-muted-foreground font-semibold",children:"未启用"}),a.jsxs("div",{className:"flex items-baseline",children:[a.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.disabled?a.jsx(gr,{to:"/domains?state=disabled",className:"hover:underline",children:e==null?void 0:e.disabled}):0}),a.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-muted-foreground mt-5 text-sm",children:"部署历史"}),(r==null?void 0:r.length)==0?a.jsx(a.Fragment,{children:a.jsxs(Py,{className:"max-w-[40em] mt-10",children:[a.jsx(Ay,{children:"暂无数据"}),a.jsxs(Dy,{children:[a.jsxs("div",{className:"flex items-center mt-5",children:[a.jsx("div",{children:a.jsx(ub,{className:"text-yellow-400",size:36})}),a.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),a.jsx("div",{className:"mt-2 flex justify-end",children:a.jsx(He,{onClick:()=>{s("/edit")},children:"添加域名"})})]})]})}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[a.jsx("div",{className:"w-48",children:"域名"}),a.jsx("div",{className:"w-24",children:"状态"}),a.jsx("div",{className:"w-56",children:"阶段"}),a.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),a.jsx("div",{className:"grow",children:"操作"})]}),a.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),r==null?void 0:r.map(o=>{var i,l;return a.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[a.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(i=o.expand.domain)==null?void 0:i.domain}),a.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:a.jsx(ey,{deployment:o})}),a.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:a.jsx(qv,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),a.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:ya(o.deployedAt)}),a.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:a.jsxs(bv,{children:[a.jsx(Sv,{asChild:!0,children:a.jsx(He,{variant:"link",className:"p-0",children:"日志"})}),a.jsxs(Rf,{className:"sm:max-w-5xl",children:[a.jsx(kv,{children:a.jsxs(Cv,{children:[(l=o.expand.domain)==null?void 0:l.domain,"-",o.id,"部署详情"]})}),a.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&a.jsx(a.Fragment,{children:o.log.check.map(c=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",c.time,"]"]}),a.jsx("div",{className:"ml-2",children:c.message})]}),c.error&&a.jsx("div",{className:"mt-1 text-red-600",children:c.error})]}))}),o.log.apply&&a.jsx(a.Fragment,{children:o.log.apply.map(c=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",c.time,"]"]}),a.jsx("div",{className:"ml-2",children:c.message})]}),c.info&&c.info.map(u=>a.jsx("div",{className:"mt-1 text-green-600",children:u})),c.error&&a.jsx("div",{className:"mt-1 text-red-600",children:c.error})]}))}),o.log.deploy&&a.jsx(a.Fragment,{children:o.log.deploy.map(c=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",c.time,"]"]}),a.jsx("div",{className:"ml-2",children:c.message})]}),c.error&&a.jsx("div",{className:"mt-1 text-red-600",children:c.error})]}))})]})]})]})})]},o.id)})]})]})]})},a$=ce.object({email:ce.string().email("请输入正确的邮箱")}),l$=()=>{var i;const{toast:e}=Pn(),t=Pr(),[r,n]=g.useState(!1),s=fr({resolver:hr(a$),defaultValues:{email:(i=st().authStore.model)==null?void 0:i.email}}),o=async l=>{var c;try{await st().admins.update((c=st().authStore.model)==null?void 0:c.id,{email:l.email}),st().authStore.clear(),e({title:"修改账户邮箱功",description:"请重新登录"}),setTimeout(()=>{t("/login")},500)}catch(u){const d=Es(u);e({title:"修改账户邮箱失败",description:d,variant:"destructive"})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"w-full md:max-w-[35em]",children:a.jsx(pr,{...s,children:a.jsxs("form",{onSubmit:s.handleSubmit(o),className:"space-y-8 dark:text-stone-200",children:[a.jsx(Se,{control:s.control,name:"email",render:({field:l})=>a.jsxs(we,{children:[a.jsx(_e,{children:"邮箱"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入邮箱",...l,type:"email",onChange:c=>{n(!0),s.setValue("email",c.target.value)}})}),a.jsx(ge,{})]})}),a.jsx("div",{className:"flex justify-end",children:r?a.jsx(He,{type:"submit",children:"确认修改"}):a.jsx(He,{type:"submit",disabled:!0,variant:"secondary",children:"确认修改"})})]})})})})},c$=(e,t)=>{switch(t.type){case"SET_CHANNEL":{const r=t.payload.channel;return{...e,content:{...e.content,[r]:t.payload.data}}}case"SET_CHANNELS":return{...t.payload};default:return e}},CN=g.createContext({}),Oy=()=>g.useContext(CN),u$=({children:e})=>{const[t,r]=g.useReducer(c$,{});g.useEffect(()=>{(async()=>{const i=await Zv("notifyChannels");r({type:"SET_CHANNELS",payload:i})})()},[]);const n=g.useCallback(o=>{r({type:"SET_CHANNEL",payload:o})},[]),s=g.useCallback(o=>{r({type:"SET_CHANNELS",payload:o})},[]);return a.jsx(CN.Provider,{value:{config:t,setChannel:n,setChannels:s},children:e})},d$=()=>{const{config:e,setChannels:t}=Oy(),[r,n]=g.useState({id:e.id??"",name:"notifyChannels",data:{accessToken:"",secret:"",enabled:!1}});g.useEffect(()=>{const l=(()=>{const c={accessToken:"",secret:"",enabled:!1};if(!e.content)return c;const u=e.content;return u.dingtalk?u.dingtalk:c})();n({id:e.id??"",name:"dingtalk",data:l})},[e]);const{toast:s}=Pn(),o=async()=>{try{const i=await Fa({...e,name:"notifyChannels",content:{...e.content,dingtalk:{...r.data}}});t(i),s({title:"保存成功",description:"配置保存成功"})}catch(i){const l=Es(i);s({title:"保存失败",description:"配置保存失败:"+l,variant:"destructive"})}};return a.jsxs("div",{children:[a.jsx(Ne,{placeholder:"AccessToken",value:r.data.accessToken,onChange:i=>{n({...r,data:{...r.data,accessToken:i.target.value}})}}),a.jsx(Ne,{placeholder:"加签的签名",className:"mt-2",value:r.data.secret,onChange:i=>{n({...r,data:{...r.data,secret:i.target.value}})}}),a.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[a.jsx(Fc,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{n({...r,data:{...r.data,enabled:!r.data.enabled}})}}),a.jsx(Co,{htmlFor:"airplane-mode",children:"是否启用"})]}),a.jsx("div",{className:"flex justify-end mt-2",children:a.jsx(He,{onClick:()=>{o()},children:"保存"})})]})},f$={title:"您有{COUNT}张证书即将过期",content:"有{COUNT}张证书即将过期,域名分别为{DOMAINS},请保持关注!"},h$=()=>{const[e,t]=g.useState(""),[r,n]=g.useState([f$]),{toast:s}=Pn();g.useEffect(()=>{(async()=>{const u=await Zv("templates");u.content&&(n(u.content.notifyTemplates),t(u.id?u.id:""))})()},[]);const o=c=>{const u=r[0];n([{...u,title:c}])},i=c=>{const u=r[0];n([{...u,content:c}])},l=async()=>{const c=await Fa({id:e,content:{notifyTemplates:r},name:"templates"});c.id&&t(c.id),s({title:"保存成功",description:"通知模板保存成功"})};return a.jsxs("div",{children:[a.jsx(Ne,{value:r[0].title,onChange:c=>{o(c.target.value)}}),a.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:"可选的变量, COUNT:即将过期张数"}),a.jsx(Sa,{className:"mt-2",value:r[0].content,onChange:c=>{i(c.target.value)}}),a.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:"可选的变量, COUNT:即将过期张数DOMAINS:域名列表"}),a.jsx("div",{className:"flex justify-end mt-2",children:a.jsx(He,{onClick:l,children:"保存"})})]})},p$=()=>{const{config:e,setChannels:t}=Oy(),[r,n]=g.useState({id:e.id??"",name:"notifyChannels",data:{apiToken:"",chatId:"",enabled:!1}});g.useEffect(()=>{const l=(()=>{const c={apiToken:"",chatId:"",enabled:!1};if(!e.content)return c;const u=e.content;return u.telegram?u.telegram:c})();n({id:e.id??"",name:"telegram",data:l})},[e]);const{toast:s}=Pn(),o=async()=>{try{const i=await Fa({...e,name:"notifyChannels",content:{...e.content,telegram:{...r.data}}});t(i),s({title:"保存成功",description:"配置保存成功"})}catch(i){const l=Es(i);s({title:"保存失败",description:"配置保存失败:"+l,variant:"destructive"})}};return a.jsxs("div",{children:[a.jsx(Ne,{placeholder:"ApiToken",value:r.data.apiToken,onChange:i=>{n({...r,data:{...r.data,apiToken:i.target.value}})}}),a.jsx(Ne,{placeholder:"ChatId",value:r.data.chatId,onChange:i=>{n({...r,data:{...r.data,chatId:i.target.value}})}}),a.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[a.jsx(Fc,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{n({...r,data:{...r.data,enabled:!r.data.enabled}})}}),a.jsx(Co,{htmlFor:"airplane-mode",children:"是否启用"})]}),a.jsx("div",{className:"flex justify-end mt-2",children:a.jsx(He,{onClick:()=>{o()},children:"保存"})})]})};function m$(e){try{return new URL(e),!0}catch{return!1}}const g$=()=>{const{config:e,setChannels:t}=Oy(),[r,n]=g.useState({id:e.id??"",name:"notifyChannels",data:{url:"",enabled:!1}});g.useEffect(()=>{const l=(()=>{const c={url:"",enabled:!1};if(!e.content)return c;const u=e.content;return u.webhook?u.webhook:c})();n({id:e.id??"",name:"webhook",data:l})},[e]);const{toast:s}=Pn(),o=async()=>{try{if(r.data.url=r.data.url.trim(),!m$(r.data.url)){s({title:"保存失败",description:"Url格式不正确",variant:"destructive"});return}const i=await Fa({...e,name:"notifyChannels",content:{...e.content,webhook:{...r.data}}});t(i),s({title:"保存成功",description:"配置保存成功"})}catch(i){const l=Es(i);s({title:"保存失败",description:"配置保存失败:"+l,variant:"destructive"})}};return a.jsxs("div",{children:[a.jsx(Ne,{placeholder:"Url",value:r.data.url,onChange:i=>{n({...r,data:{...r.data,url:i.target.value}})}}),a.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[a.jsx(Fc,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{n({...r,data:{...r.data,enabled:!r.data.enabled}})}}),a.jsx(Co,{htmlFor:"airplane-mode",children:"是否启用"})]}),a.jsx("div",{className:"flex justify-end mt-2",children:a.jsx(He,{onClick:()=>{o()},children:"保存"})})]})};var My="Collapsible",[v$,jN]=sr(My),[y$,Iy]=v$(My),EN=g.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:o,onOpenChange:i,...l}=e,[c=!1,u]=Yr({prop:n,defaultProp:s,onChange:i});return a.jsx(y$,{scope:r,disabled:o,contentId:$r(),open:c,onOpenToggle:g.useCallback(()=>u(d=>!d),[u]),children:a.jsx(Re.div,{"data-state":Fy(c),"data-disabled":o?"":void 0,...l,ref:t})})});EN.displayName=My;var NN="CollapsibleTrigger",TN=g.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,s=Iy(NN,r);return a.jsx(Re.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":Fy(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:t,onClick:ue(e.onClick,s.onOpenToggle)})});TN.displayName=NN;var Ly="CollapsibleContent",RN=g.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=Iy(Ly,e.__scopeCollapsible);return a.jsx(or,{present:r||s.open,children:({present:o})=>a.jsx(x$,{...n,ref:t,present:o})})});RN.displayName=Ly;var x$=g.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:s,...o}=e,i=Iy(Ly,r),[l,c]=g.useState(n),u=g.useRef(null),d=Ke(t,u),f=g.useRef(0),m=f.current,v=g.useRef(0),x=v.current,y=i.open||l,_=g.useRef(y),p=g.useRef();return g.useEffect(()=>{const h=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(h)},[]),Jt(()=>{const h=u.current;if(h){p.current=p.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";const w=h.getBoundingClientRect();f.current=w.height,v.current=w.width,_.current||(h.style.transitionDuration=p.current.transitionDuration,h.style.animationName=p.current.animationName),c(n)}},[i.open,n]),a.jsx(Re.div,{"data-state":Fy(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!y,...o,ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:y&&s})});function Fy(e){return e?"open":"closed"}var w$=EN,_$=TN,b$=RN,zs="Accordion",S$=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[zy,k$,C$]=kc(zs),[ah,aV]=sr(zs,[C$,jN]),Uy=jN(),PN=Be.forwardRef((e,t)=>{const{type:r,...n}=e,s=n,o=n;return a.jsx(zy.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?a.jsx(T$,{...o,ref:t}):a.jsx(N$,{...s,ref:t})})});PN.displayName=zs;var[AN,j$]=ah(zs),[DN,E$]=ah(zs,{collapsible:!1}),N$=Be.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},collapsible:o=!1,...i}=e,[l,c]=Yr({prop:r,defaultProp:n,onChange:s});return a.jsx(AN,{scope:e.__scopeAccordion,value:l?[l]:[],onItemOpen:c,onItemClose:Be.useCallback(()=>o&&c(""),[o,c]),children:a.jsx(DN,{scope:e.__scopeAccordion,collapsible:o,children:a.jsx(ON,{...i,ref:t})})})}),T$=Be.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},...o}=e,[i=[],l]=Yr({prop:r,defaultProp:n,onChange:s}),c=Be.useCallback(d=>l((f=[])=>[...f,d]),[l]),u=Be.useCallback(d=>l((f=[])=>f.filter(m=>m!==d)),[l]);return a.jsx(AN,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:a.jsx(DN,{scope:e.__scopeAccordion,collapsible:!0,children:a.jsx(ON,{...o,ref:t})})})}),[R$,lh]=ah(zs),ON=Be.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:s,orientation:o="vertical",...i}=e,l=Be.useRef(null),c=Ke(l,t),u=k$(r),f=di(s)==="ltr",m=ue(e.onKeyDown,v=>{var P;if(!S$.includes(v.key))return;const x=v.target,y=u().filter(A=>{var L;return!((L=A.ref.current)!=null&&L.disabled)}),_=y.findIndex(A=>A.ref.current===x),p=y.length;if(_===-1)return;v.preventDefault();let h=_;const w=0,C=p-1,j=()=>{h=_+1,h>C&&(h=w)},E=()=>{h=_-1,h<w&&(h=C)};switch(v.key){case"Home":h=w;break;case"End":h=C;break;case"ArrowRight":o==="horizontal"&&(f?j():E());break;case"ArrowDown":o==="vertical"&&j();break;case"ArrowLeft":o==="horizontal"&&(f?E():j());break;case"ArrowUp":o==="vertical"&&E();break}const R=h%p;(P=y[R].ref.current)==null||P.focus()});return a.jsx(R$,{scope:r,disabled:n,direction:s,orientation:o,children:a.jsx(zy.Slot,{scope:r,children:a.jsx(Re.div,{...i,"data-orientation":o,ref:c,onKeyDown:n?void 0:m})})})}),Xd="AccordionItem",[P$,$y]=ah(Xd),MN=Be.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...s}=e,o=lh(Xd,r),i=j$(Xd,r),l=Uy(r),c=$r(),u=n&&i.value.includes(n)||!1,d=o.disabled||e.disabled;return a.jsx(P$,{scope:r,open:u,disabled:d,triggerId:c,children:a.jsx(w$,{"data-orientation":o.orientation,"data-state":$N(u),...l,...s,ref:t,disabled:d,open:u,onOpenChange:f=>{f?i.onItemOpen(n):i.onItemClose(n)}})})});MN.displayName=Xd;var IN="AccordionHeader",LN=Be.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=lh(zs,r),o=$y(IN,r);return a.jsx(Re.h3,{"data-orientation":s.orientation,"data-state":$N(o.open),"data-disabled":o.disabled?"":void 0,...n,ref:t})});LN.displayName=IN;var Im="AccordionTrigger",FN=Be.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=lh(zs,r),o=$y(Im,r),i=E$(Im,r),l=Uy(r);return a.jsx(zy.ItemSlot,{scope:r,children:a.jsx(_$,{"aria-disabled":o.open&&!i.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...l,...n,ref:t})})});FN.displayName=Im;var zN="AccordionContent",UN=Be.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=lh(zs,r),o=$y(zN,r),i=Uy(r);return a.jsx(b$,{role:"region","aria-labelledby":o.triggerId,"data-orientation":s.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});UN.displayName=zN;function $N(e){return e?"open":"closed"}var A$=PN,D$=MN,O$=LN,VN=FN,BN=UN;const Nw=A$,hl=g.forwardRef(({className:e,...t},r)=>a.jsx(D$,{ref:r,className:oe("border-b",e),...t}));hl.displayName="AccordionItem";const pl=g.forwardRef(({className:e,children:t,...r},n)=>a.jsx(O$,{className:"flex",children:a.jsxs(VN,{ref:n,className:oe("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,a.jsx(Fg,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));pl.displayName=VN.displayName;const ml=g.forwardRef(({className:e,children:t,...r},n)=>a.jsx(BN,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:a.jsx("div",{className:oe("pb-4 pt-0",e),children:t})}));ml.displayName=BN.displayName;const M$=()=>a.jsx(a.Fragment,{children:a.jsxs(u$,{children:[a.jsx("div",{className:"border rounded-sm p-5 shadow-lg",children:a.jsx(Nw,{type:"multiple",className:"dark:text-stone-200",children:a.jsxs(hl,{value:"item-1",className:"dark:border-stone-200",children:[a.jsx(pl,{children:"模板"}),a.jsx(ml,{children:a.jsx(h$,{})})]})})}),a.jsx("div",{className:"border rounded-md p-5 mt-7 shadow-lg",children:a.jsxs(Nw,{type:"single",className:"dark:text-stone-200",children:[a.jsxs(hl,{value:"item-2",className:"dark:border-stone-200",children:[a.jsx(pl,{children:"钉钉"}),a.jsx(ml,{children:a.jsx(d$,{})})]}),a.jsxs(hl,{value:"item-4",className:"dark:border-stone-200",children:[a.jsx(pl,{children:"Telegram"}),a.jsx(ml,{children:a.jsx(p$,{})})]}),a.jsxs(hl,{value:"item-5",className:"dark:border-stone-200",children:[a.jsx(pl,{children:"Webhook"}),a.jsx(ml,{children:a.jsx(g$,{})})]})]})})]})});var Vy="Radio",[I$,WN]=sr(Vy),[L$,F$]=I$(Vy),HN=g.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:o,disabled:i,value:l="on",onCheck:c,...u}=e,[d,f]=g.useState(null),m=Ke(t,y=>f(y)),v=g.useRef(!1),x=d?!!d.closest("form"):!0;return a.jsxs(L$,{scope:r,checked:s,disabled:i,children:[a.jsx(Re.button,{type:"button",role:"radio","aria-checked":s,"data-state":GN(s),"data-disabled":i?"":void 0,disabled:i,value:l,...u,ref:m,onClick:ue(e.onClick,y=>{s||c==null||c(),x&&(v.current=y.isPropagationStopped(),v.current||y.stopPropagation())})}),x&&a.jsx(z$,{control:d,bubbles:!v.current,name:n,value:l,checked:s,required:o,disabled:i,style:{transform:"translateX(-100%)"}})]})});HN.displayName=Vy;var YN="RadioIndicator",KN=g.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...s}=e,o=F$(YN,r);return a.jsx(or,{present:n||o.checked,children:a.jsx(Re.span,{"data-state":GN(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});KN.displayName=YN;var z$=e=>{const{control:t,checked:r,bubbles:n=!0,...s}=e,o=g.useRef(null),i=ly(r),l=qg(t);return g.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==r&&f){const m=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(m)}},[i,r,n]),a.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:o,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function GN(e){return e?"checked":"unchecked"}var U$=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],By="RadioGroup",[$$,lV]=sr(By,[Oa,WN]),ZN=Oa(),qN=WN(),[V$,B$]=$$(By),XN=g.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:o,required:i=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...m}=e,v=ZN(r),x=di(u),[y,_]=Yr({prop:o,defaultProp:s,onChange:f});return a.jsx(V$,{scope:r,name:n,required:i,disabled:l,value:y,onValueChange:_,children:a.jsx(nv,{asChild:!0,...v,orientation:c,dir:x,loop:d,children:a.jsx(Re.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":l?"":void 0,dir:x,...m,ref:t})})})});XN.displayName=By;var QN="RadioGroupItem",JN=g.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...s}=e,o=B$(QN,r),i=o.disabled||n,l=ZN(r),c=qN(r),u=g.useRef(null),d=Ke(t,u),f=o.value===s.value,m=g.useRef(!1);return g.useEffect(()=>{const v=y=>{U$.includes(y.key)&&(m.current=!0)},x=()=>m.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",x)}},[]),a.jsx(sv,{asChild:!0,...l,focusable:!i,active:f,children:a.jsx(HN,{disabled:i,required:o.required,checked:f,...c,...s,name:o.name,ref:d,onCheck:()=>o.onValueChange(s.value),onKeyDown:ue(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:ue(s.onFocus,()=>{var v;m.current&&((v=u.current)==null||v.click())})})})});JN.displayName=QN;var W$="RadioGroupIndicator",eT=g.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,s=qN(r);return a.jsx(KN,{...s,...n,ref:t})});eT.displayName=W$;var tT=XN,rT=JN,H$=eT;const nT=g.forwardRef(({className:e,...t},r)=>a.jsx(tT,{className:oe("grid gap-2",e),...t,ref:r}));nT.displayName=tT.displayName;const Lm=g.forwardRef(({className:e,...t},r)=>a.jsx(rT,{ref:r,className:oe("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:a.jsx(H$,{className:"flex items-center justify-center",children:a.jsx(cb,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Lm.displayName=rT.displayName;const Y$=ce.object({provider:ce.enum(["letsencrypt","zerossl"],{message:"请选择SSL提供商"}),eabKid:ce.string().optional(),eabHmacKey:ce.string().optional()}),K$=()=>{const e=fr({resolver:hr(Y$),defaultValues:{provider:"letsencrypt"}}),[t,r]=g.useState("letsencrypt"),[n,s]=g.useState(),{toast:o}=Pn();g.useEffect(()=>{(async()=>{const u=await Zv("ssl-provider");if(u){s(u);const d=u.content;e.setValue("provider",d.provider),e.setValue("eabKid",d.config[d.provider].eabKid),e.setValue("eabHmacKey",d.config[d.provider].eabHmacKey),r(d.provider)}else e.setValue("provider","letsencrypt"),r("letsencrypt")})()},[]);const i=c=>t===c?"border-primary":"",l=async c=>{if(c.provider==="zerossl"&&(c.eabKid||e.setError("eabKid",{message:"请输入EAB_KID和EAB_HMAC_KEY"}),c.eabHmacKey||e.setError("eabHmacKey",{message:"请输入EAB_KID和EAB_HMAC_KEY"}),!c.eabKid||!c.eabHmacKey))return;const u={id:n==null?void 0:n.id,name:"ssl-provider",content:{provider:c.provider,config:{letsencrypt:{},zerossl:{eabKid:c.eabKid??"",eabHmacKey:c.eabHmacKey??""}}}};try{await Fa(u),o({title:"修改成功",description:"修改成功"})}catch(d){const f=Es(d);o({title:"修改失败",description:f,variant:"destructive"})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"w-full md:max-w-[35em]",children:a.jsx(pr,{...e,children:a.jsxs("form",{onSubmit:e.handleSubmit(l),className:"space-y-8 dark:text-stone-200",children:[a.jsx(Se,{control:e.control,name:"provider",render:({field:c})=>a.jsxs(we,{children:[a.jsx(_e,{children:"证书厂商"}),a.jsx(be,{children:a.jsxs(nT,{...c,className:"flex",onValueChange:u=>{r(u),e.setValue("provider",u)},value:t,children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(Lm,{value:"letsencrypt",id:"letsencrypt"}),a.jsx(Co,{htmlFor:"letsencrypt",children:a.jsxs("div",{className:oe("flex items-center space-x-2 border p-2 rounded cursor-pointer",i("letsencrypt")),children:[a.jsx("img",{src:"/imgs/providers/letsencrypt.svg",className:"h-6"}),a.jsx("div",{children:"Let's Encrypt"})]})})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(Lm,{value:"zerossl",id:"zerossl"}),a.jsx(Co,{htmlFor:"zerossl",children:a.jsxs("div",{className:oe("flex items-center space-x-2 border p-2 rounded cursor-pointer",i("zerossl")),children:[a.jsx("img",{src:"/imgs/providers/zerossl.svg",className:"h-6"}),a.jsx("div",{children:"ZeroSSL"})]})})]})]})}),a.jsx(Se,{control:e.control,name:"eabKid",render:({field:u})=>a.jsxs(we,{hidden:t!=="zerossl",children:[a.jsx(_e,{children:"EAB_KID"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入EAB_KID",...u,type:"text"})}),a.jsx(ge,{})]})}),a.jsx(Se,{control:e.control,name:"eabHmacKey",render:({field:u})=>a.jsxs(we,{hidden:t!=="zerossl",children:[a.jsx(_e,{children:"EAB_HMAC_KEY"}),a.jsx(be,{children:a.jsx(Ne,{placeholder:"请输入EAB_HMAC_KEY",...u,type:"text"})}),a.jsx(ge,{})]})}),a.jsx(ge,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(He,{type:"submit",children:"确认修改"})})]})})})})},G$=rA([{path:"/",element:a.jsx(J3,{}),children:[{path:"/",element:a.jsx(i$,{})},{path:"/domains",element:a.jsx(_z,{})},{path:"/edit",element:a.jsx(YU,{})},{path:"/access",element:a.jsx(XU,{})},{path:"/history",element:a.jsx(JU,{})},{path:"/setting",element:a.jsx(o$,{}),children:[{path:"/setting/password",element:a.jsx(s$,{})},{path:"/setting/account",element:a.jsx(l$,{})},{path:"/setting/notify",element:a.jsx(M$,{})},{path:"/setting/ssl-provider",element:a.jsx(K$,{})}]}]},{path:"/login",element:a.jsx(r$,{}),children:[{path:"/login",element:a.jsx(t$,{})}]},{path:"/about",element:a.jsx("div",{children:"About"})}]);ip.createRoot(document.getElementById("root")).render(a.jsx(Be.StrictMode,{children:a.jsx(Y3,{defaultTheme:"system",storageKey:"vite-ui-theme",children:a.jsx(dA,{router:G$})})}))});export default Z$();